Skip to content

Commit

Permalink
feat(minimal inputdropdown): update Minimal Dropdown Style (#354)
Browse files Browse the repository at this point in the history
* feat(minimal inputdropdown): update Minimal Dropdown Style

* change color to use palette

* snapshots

* update label style

* update after running yarn test -u

* not forward isMinimal

---------

Co-authored-by: Lia Prins <liajprins@gmail.com>
  • Loading branch information
tihuan and liaprins authored Feb 14, 2023
1 parent b9a3662 commit 56d99ff
Show file tree
Hide file tree
Showing 21 changed files with 351 additions and 195 deletions.
2 changes: 1 addition & 1 deletion src/core/Accordion/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ exports[`<Accordion /> Test story renders snapshot 1`] = `
class="MuiAccordionSummary-expandIconWrapper css-yw020d-MuiAccordionSummary-expandIconWrapper"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand Down
16 changes: 8 additions & 8 deletions src/core/Banner/__snapshots__/banner.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports[`<Banner /> LivePreview story renders snapshot 1`] = `
class="css-1f3aume"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand All @@ -38,7 +38,7 @@ exports[`<Banner /> LivePreview story renders snapshot 1`] = `
type="button"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand Down Expand Up @@ -70,7 +70,7 @@ exports[`<Banner /> LivePreview story renders snapshot 1`] = `
class="css-1f3aume"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand Down Expand Up @@ -102,7 +102,7 @@ exports[`<Banner /> LivePreview story renders snapshot 1`] = `
type="button"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand Down Expand Up @@ -134,7 +134,7 @@ exports[`<Banner /> LivePreview story renders snapshot 1`] = `
class="css-1f3aume"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand All @@ -157,7 +157,7 @@ exports[`<Banner /> LivePreview story renders snapshot 1`] = `
type="button"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand Down Expand Up @@ -190,7 +190,7 @@ exports[`<Banner /> Test story renders snapshot 1`] = `
class="css-1f3aume"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand All @@ -213,7 +213,7 @@ exports[`<Banner /> Test story renders snapshot 1`] = `
type="button"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand Down
10 changes: 5 additions & 5 deletions src/core/Button/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ exports[`<button /> MinimalLivePreview story renders snapshot 1`] = `
class="MuiButton-startIcon MuiButton-iconSizeMedium css-1d6wzja-MuiButton-startIcon"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand Down Expand Up @@ -78,7 +78,7 @@ exports[`<button /> RoundedLivePreview story renders snapshot 1`] = `
class="MuiButton-startIcon MuiButton-iconSizeMedium css-1d6wzja-MuiButton-startIcon"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand Down Expand Up @@ -116,7 +116,7 @@ exports[`<button /> RoundedLivePreview story renders snapshot 1`] = `
class="MuiButton-startIcon MuiButton-iconSizeMedium css-1d6wzja-MuiButton-startIcon"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand Down Expand Up @@ -161,7 +161,7 @@ exports[`<button /> SquareLivePreview story renders snapshot 1`] = `
class="MuiButton-startIcon MuiButton-iconSizeMedium css-1d6wzja-MuiButton-startIcon"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand Down Expand Up @@ -199,7 +199,7 @@ exports[`<button /> SquareLivePreview story renders snapshot 1`] = `
class="MuiButton-startIcon MuiButton-iconSizeMedium css-1d6wzja-MuiButton-startIcon"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand Down
4 changes: 2 additions & 2 deletions src/core/ButtonDropdown/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ exports[`<ButtonDropdown /> Test story renders snapshot 1`] = `
class="MuiButton-startIcon MuiButton-iconSizeMedium css-1d6wzja-MuiButton-startIcon"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand All @@ -31,7 +31,7 @@ exports[`<ButtonDropdown /> Test story renders snapshot 1`] = `
class="MuiButton-endIcon MuiButton-iconSizeMedium css-9tj150-MuiButton-endIcon"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand Down
2 changes: 1 addition & 1 deletion src/core/ButtonIcon/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exports[`<ButtonIcon /> Test story renders snapshot 1`] = `
type="button"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand Down
2 changes: 1 addition & 1 deletion src/core/CellBasic/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ exports[`<CellBasic /> Test story renders snapshot 1`] = `
class="css-fm7ypo"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand Down
4 changes: 2 additions & 2 deletions src/core/CellHeader/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports[`<CellHeader /> Ascending story renders snapshot 1`] = `
type="button"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand Down Expand Up @@ -67,7 +67,7 @@ exports[`<CellHeader /> Test story renders snapshot 1`] = `
type="button"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand Down
39 changes: 23 additions & 16 deletions src/core/ComplexFilter/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,37 @@ exports[`<ComplexFilter /> Default story renders snapshot 1`] = `
class="css-1x0reya"
>
<button
class="MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButtonBase-root css-6o30iu-MuiButtonBase-root-MuiButton-root"
class="MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButtonBase-root css-je8px9-MuiButtonBase-root-MuiButton-root"
label="Click Target"
tabindex="0"
type="button"
>
<span
class="css-1sjvubj"
class="css-t2kylo"
>
Click Target
<span
class="styled-label css-1wq753n"
>
Click Target
</span>
<div
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-tr2xv3-MuiSvgIcon-root"
data-jest-file-name="IconChevronDownSmall.svg"
data-jest-svg-name="IconChevronDownSmall"
data-testid="IconChevronDownSmall"
fillcontrast="white"
focusable="false"
viewBox="0 0 14 14"
/>
</div>
</span>
<div
class="css-jbvua0"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-tr2xv3-MuiSvgIcon-root"
data-jest-file-name="IconChevronDownSmall.svg"
data-jest-svg-name="IconChevronDownSmall"
data-testid="IconChevronDownSmall"
fillcontrast="white"
focusable="false"
viewBox="0 0 14 14"
/>
</div>
class="css-z8cnb2"
/>
<span
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
/>
Expand Down
8 changes: 4 additions & 4 deletions src/core/Dialog/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exports[`<Dialog /> Dialog all sizes match the snapshots 1`] = `
type="button"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand Down Expand Up @@ -93,7 +93,7 @@ exports[`<Dialog /> Dialog all sizes match the snapshots 4`] = `
type="button"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand Down Expand Up @@ -173,7 +173,7 @@ exports[`<Dialog /> Dialog all sizes match the snapshots 7`] = `
type="button"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand Down Expand Up @@ -253,7 +253,7 @@ exports[`<Dialog /> Dialog all sizes match the snapshots 10`] = `
type="button"
>
<div
class="css-jbvua0"
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
Expand Down
39 changes: 23 additions & 16 deletions src/core/Dropdown/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,38 @@

exports[`<Dropdown /> Test story renders snapshot 1`] = `
<button
class="MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButtonBase-root css-6o30iu-MuiButtonBase-root-MuiButton-root"
class="MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButtonBase-root css-je8px9-MuiButtonBase-root-MuiButton-root"
data-testid="dropdown"
label="Click Target"
tabindex="0"
type="button"
>
<span
class="css-1sjvubj"
class="css-t2kylo"
>
Click Target
<span
class="styled-label css-1wq753n"
>
Click Target
</span>
<div
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-tr2xv3-MuiSvgIcon-root"
data-jest-file-name="IconChevronDownSmall.svg"
data-jest-svg-name="IconChevronDownSmall"
data-testid="IconChevronDownSmall"
fillcontrast="white"
focusable="false"
viewBox="0 0 14 14"
/>
</div>
</span>
<div
class="css-jbvua0"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-tr2xv3-MuiSvgIcon-root"
data-jest-file-name="IconChevronDownSmall.svg"
data-jest-svg-name="IconChevronDownSmall"
data-testid="IconChevronDownSmall"
fillcontrast="white"
focusable="false"
viewBox="0 0 14 14"
/>
</div>
class="css-z8cnb2"
/>
<span
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
/>
Expand Down
38 changes: 21 additions & 17 deletions src/core/DropdownMenu/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,34 @@

exports[`<DropdownMenu /> Default story renders snapshot 1`] = `
<button
class="MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButtonBase-root css-1ptdbw3-MuiButtonBase-root-MuiButton-root"
class="MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButtonBase-root css-1t6yh93-MuiButtonBase-root-MuiButton-root"
label="Click Target"
tabindex="0"
type="button"
>
<span
class="css-1sjvubj"
class="css-112kt0x"
>
Click Target
<span
class="styled-label css-1wq753n"
>
Click Target
</span>
<div
class="css-1ft6wgl"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-tr2xv3-MuiSvgIcon-root"
data-jest-file-name="IconChevronDownSmall.svg"
data-jest-svg-name="IconChevronDownSmall"
data-testid="IconChevronDownSmall"
fillcontrast="white"
focusable="false"
viewBox="0 0 14 14"
/>
</div>
</span>
<div
class="css-jbvua0"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-tr2xv3-MuiSvgIcon-root"
data-jest-file-name="IconChevronDownSmall.svg"
data-jest-svg-name="IconChevronDownSmall"
data-testid="IconChevronDownSmall"
fillcontrast="white"
focusable="false"
viewBox="0 0 14 14"
/>
</div>
<span
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
/>
Expand Down
1 change: 1 addition & 0 deletions src/core/Icon/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,6 @@ export const StyledSvgIcon = styled(SvgIcon, {
`;

export const StyledIcon = styled("div")`
/* display: contents causes an element's children to appear as if they were direct children of the element's parent, ignoring the element itself. This can be useful when a wrapper element should be ignored when using CSS grid or similar layout techniques. */
display: contents;
`;
Loading

0 comments on commit 56d99ff

Please sign in to comment.