From a73c0f07c9e1661476a571c8735c3acc48b50e3c Mon Sep 17 00:00:00 2001 From: mimo Date: Thu, 8 Feb 2024 15:06:58 +0900 Subject: [PATCH 1/2] chore: update snapshots --- .../__snapshots__/index.story.storyshot | 107 ------------------ .../LoadingSpinnerIcon.story.storyshot | 28 +++++ .../__snapshots__/index.story.storyshot | 36 +----- 3 files changed, 29 insertions(+), 142 deletions(-) create mode 100644 packages/react/src/components/LoadingSpinner/__snapshots__/LoadingSpinnerIcon.story.storyshot diff --git a/packages/react/src/components/DropdownSelector/__snapshots__/index.story.storyshot b/packages/react/src/components/DropdownSelector/__snapshots__/index.story.storyshot index fe5fdb18d..bce6e99a4 100644 --- a/packages/react/src/components/DropdownSelector/__snapshots__/index.story.storyshot +++ b/packages/react/src/components/DropdownSelector/__snapshots__/index.story.storyshot @@ -751,113 +751,6 @@ exports[`Storyshots DropdownSelector In Modal 1`] = ` `; -exports[`Storyshots DropdownSelector Long Names 1`] = ` -.c0 { - display: inline-block; - width: 100%; -} - -.c0:disabled, -.c0[aria-disabled]:not([aria-disabled=false]) { - cursor: default; - opacity: 0.32; -} - -.c1 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: justify; - -webkit-justify-content: space-between; - -ms-flex-pack: justify; - justify-content: space-between; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - height: 40px; - width: 100%; - box-sizing: border-box; - border: none; - cursor: pointer; - gap: 4px; - padding-right: 8px; - padding-left: 8px; - background-color: var(--charcoal-surface3); - border-radius: 4px; - -webkit-transition: 0.2s box-shadow,0.2s background-color; - transition: 0.2s box-shadow,0.2s background-color; -} - -.c1:disabled, -.c1[aria-disabled]:not([aria-disabled=false]) { - cursor: default; -} - -.c1:not(:disabled):not([aria-disabled]):focus, -.c1[aria-disabled='false']:focus, -.c1:not(:disabled):not([aria-disabled]):active, -.c1[aria-disabled='false']:active, -.c1:not(:disabled):not([aria-disabled]):focus-visible, -.c1[aria-disabled='false']:focus-visible { - outline: none; - box-shadow: 0 0 0 4px rgba(0,150,250,0.32); -} - -.c1:not(:disabled):not([aria-disabled]):hover, -.c1[aria-disabled='false']:hover { - background-color: var(--charcoal-surface3-hover); -} - -.c2 { - text-align: left; - font-size: 14px; - line-height: 22px; - display: flow-root; - color: var(--charcoal-text2); - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.c3 { - color: var(--charcoal-text2); -} - -
-
-
- -
-
-
-`; - exports[`Storyshots DropdownSelector Playground 1`] = ` .c0 { cursor: pointer; diff --git a/packages/react/src/components/LoadingSpinner/__snapshots__/LoadingSpinnerIcon.story.storyshot b/packages/react/src/components/LoadingSpinner/__snapshots__/LoadingSpinnerIcon.story.storyshot new file mode 100644 index 000000000..121a1ab24 --- /dev/null +++ b/packages/react/src/components/LoadingSpinner/__snapshots__/LoadingSpinnerIcon.story.storyshot @@ -0,0 +1,28 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots LoadingSpinnerIcon Icon 1`] = ` +.c0 { + width: 1em; + height: 1em; + border-radius: 1em; + background-color: currentColor; + -webkit-animation: cNZOgq 1s both ease-out; + animation: cNZOgq 1s both ease-out; + -webkit-animation-iteration-count: infinite; + animation-iteration-count: infinite; +} + +.c0[data-reset-animation] { + -webkit-animation: none; + animation: none; +} + +
+
+
+`; diff --git a/packages/react/src/components/LoadingSpinner/__snapshots__/index.story.storyshot b/packages/react/src/components/LoadingSpinner/__snapshots__/index.story.storyshot index 39a8621a4..9cb701798 100644 --- a/packages/react/src/components/LoadingSpinner/__snapshots__/index.story.storyshot +++ b/packages/react/src/components/LoadingSpinner/__snapshots__/index.story.storyshot @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Storyshots LoadingSpinner Basic 1`] = ` +exports[`Storyshots LoadingSpinner Default 1`] = ` .c0 { box-sizing: content-box; margin: auto; @@ -45,37 +45,3 @@ exports[`Storyshots LoadingSpinner Basic 1`] = `
`; - -exports[`Storyshots LoadingSpinner Icon 1`] = ` -.c0 { - width: 1em; - height: 1em; - border-radius: 1em; - background-color: currentColor; - -webkit-animation: cNZOgq 1s both ease-out; - animation: cNZOgq 1s both ease-out; - -webkit-animation-iteration-count: infinite; - animation-iteration-count: infinite; -} - -.c0[data-reset-animation] { - -webkit-animation: none; - animation: none; -} - -
-
-
-
-
-`; From 30b934e5d6eb6aa33d188967cd1212b7ecbc58ca Mon Sep 17 00:00:00 2001 From: mimo Date: Thu, 8 Feb 2024 15:23:31 +0900 Subject: [PATCH 2/2] fix: add dropdown selector long name story --- .../__snapshots__/index.story.storyshot | 107 ++++++++++++++++++ .../DropdownSelector/index.story.tsx | 33 ++++++ 2 files changed, 140 insertions(+) diff --git a/packages/react/src/components/DropdownSelector/__snapshots__/index.story.storyshot b/packages/react/src/components/DropdownSelector/__snapshots__/index.story.storyshot index bce6e99a4..fe5fdb18d 100644 --- a/packages/react/src/components/DropdownSelector/__snapshots__/index.story.storyshot +++ b/packages/react/src/components/DropdownSelector/__snapshots__/index.story.storyshot @@ -751,6 +751,113 @@ exports[`Storyshots DropdownSelector In Modal 1`] = `
`; +exports[`Storyshots DropdownSelector Long Names 1`] = ` +.c0 { + display: inline-block; + width: 100%; +} + +.c0:disabled, +.c0[aria-disabled]:not([aria-disabled=false]) { + cursor: default; + opacity: 0.32; +} + +.c1 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: justify; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + height: 40px; + width: 100%; + box-sizing: border-box; + border: none; + cursor: pointer; + gap: 4px; + padding-right: 8px; + padding-left: 8px; + background-color: var(--charcoal-surface3); + border-radius: 4px; + -webkit-transition: 0.2s box-shadow,0.2s background-color; + transition: 0.2s box-shadow,0.2s background-color; +} + +.c1:disabled, +.c1[aria-disabled]:not([aria-disabled=false]) { + cursor: default; +} + +.c1:not(:disabled):not([aria-disabled]):focus, +.c1[aria-disabled='false']:focus, +.c1:not(:disabled):not([aria-disabled]):active, +.c1[aria-disabled='false']:active, +.c1:not(:disabled):not([aria-disabled]):focus-visible, +.c1[aria-disabled='false']:focus-visible { + outline: none; + box-shadow: 0 0 0 4px rgba(0,150,250,0.32); +} + +.c1:not(:disabled):not([aria-disabled]):hover, +.c1[aria-disabled='false']:hover { + background-color: var(--charcoal-surface3-hover); +} + +.c2 { + text-align: left; + font-size: 14px; + line-height: 22px; + display: flow-root; + color: var(--charcoal-text2); + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.c3 { + color: var(--charcoal-text2); +} + +
+
+
+ +
+
+
+`; + exports[`Storyshots DropdownSelector Playground 1`] = ` .c0 { cursor: pointer; diff --git a/packages/react/src/components/DropdownSelector/index.story.tsx b/packages/react/src/components/DropdownSelector/index.story.tsx index 7ac0c05d3..20ffdc1a4 100644 --- a/packages/react/src/components/DropdownSelector/index.story.tsx +++ b/packages/react/src/components/DropdownSelector/index.story.tsx @@ -85,6 +85,39 @@ export const Basic: StoryObj = { ), } +export const LongNames: StoryObj = { + render: function Render(args) { + const [selected, setSelected] = useState('10') + return ( +
+ { + setSelected(value) + }} + value={selected} + label="label" + > + + Lorem ipsum dolor sit amet, consectetur adipisicing elit, + + + sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + + + Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris + nisi ut aliquip ex ea commodo consequat. + + +
+ ) + }, +} + const DummyBox = styled.div` border: solid 1px ${({ theme }) => theme.border.default.color}; display: flex;