@adobe-commerce/elsie 1.0.0-alpha04071347
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.elsie.js +21 -0
- package/.eslintrc.js +18 -0
- package/README.md +52 -0
- package/__mocks__/svg.js +11 -0
- package/bin/builders/build/index.js +20 -0
- package/bin/builders/generate/api/index.js +65 -0
- package/bin/builders/generate/api/templates/function.js +9 -0
- package/bin/builders/generate/api/templates/index.js +7 -0
- package/bin/builders/generate/api/templates/story.js +23 -0
- package/bin/builders/generate/api/templates/unit-test.js +15 -0
- package/bin/builders/generate/component/index.js +87 -0
- package/bin/builders/generate/component/templates/Component.js +43 -0
- package/bin/builders/generate/component/templates/css.js +24 -0
- package/bin/builders/generate/component/templates/index.js +8 -0
- package/bin/builders/generate/component/templates/stories.js +46 -0
- package/bin/builders/generate/component/templates/unit-test.js +19 -0
- package/bin/builders/generate/config/index.js +54 -0
- package/bin/builders/generate/config/templates/elsie.js +29 -0
- package/bin/builders/generate/container/index.js +65 -0
- package/bin/builders/generate/container/templates/Component.js +18 -0
- package/bin/builders/generate/container/templates/index.js +8 -0
- package/bin/builders/generate/container/templates/stories.js +34 -0
- package/bin/builders/generate/container/templates/unit-test.js +19 -0
- package/bin/builders/generate/index.js +283 -0
- package/bin/builders/gql/createOrClearDirectory.js +33 -0
- package/bin/builders/gql/getSchemaRef.js +25 -0
- package/bin/builders/gql/index.js +71 -0
- package/bin/builders/lint/index.js +5 -0
- package/bin/builders/serve/index.js +44 -0
- package/bin/builders/storybook/index.js +5 -0
- package/bin/builders/test/index.js +5 -0
- package/bin/index.js +26 -0
- package/bin/lib/cli.js +8 -0
- package/bin/lib/config.js +12 -0
- package/bin/lib/log-message.js +11 -0
- package/bin/lib/string.js +26 -0
- package/bin/lib/validate-typeof.js +28 -0
- package/bin/lib/write-file.js +30 -0
- package/bin/lib/write-parent-index.js +45 -0
- package/config/eslint.js +113 -0
- package/config/jest.js +90 -0
- package/config/prettier.js +16 -0
- package/config/setEnvVars.js +14 -0
- package/config/storybook/addon.js +130 -0
- package/config/storybook/components/FileTree/FileTree.jsx +192 -0
- package/config/storybook/components/FileTree/index.js +10 -0
- package/config/storybook/components/Flex/Flex.jsx +21 -0
- package/config/storybook/components/Flex/Flex.module.css +29 -0
- package/config/storybook/components/Flex/index.js +10 -0
- package/config/storybook/components/OptionsTable/OptionsTable.jsx +88 -0
- package/config/storybook/components/OptionsTable/OptionsTable.module.css +104 -0
- package/config/storybook/components/OptionsTable/index.js +10 -0
- package/config/storybook/components/Panel/Panel.module.css +56 -0
- package/config/storybook/components/Panel/Panel.tsx +46 -0
- package/config/storybook/components/Panel/index.ts +10 -0
- package/config/storybook/components/Screenshot/Screenshot.jsx +23 -0
- package/config/storybook/components/Screenshot/Screenshot.module.css +28 -0
- package/config/storybook/components/Screenshot/index.js +10 -0
- package/config/storybook/components/Steps/Steps.jsx +21 -0
- package/config/storybook/components/Steps/Steps.module.css +43 -0
- package/config/storybook/components/Steps/index.js +10 -0
- package/config/storybook/components/StoryWrapper/StoryWrapper.jsx +18 -0
- package/config/storybook/components/StoryWrapper/StoryWrapper.module.css +22 -0
- package/config/storybook/components/StoryWrapper/index.js +10 -0
- package/config/storybook/components/Summary/Summary.jsx +19 -0
- package/config/storybook/components/Summary/Summary.module.css +20 -0
- package/config/storybook/components/Summary/index.js +10 -0
- package/config/storybook/components/Variants/Variants.js +57 -0
- package/config/storybook/components/Variants/docs.css +48 -0
- package/config/storybook/components/Variants/index.js +10 -0
- package/config/storybook/components/video/index.jsx +28 -0
- package/config/storybook/manager.js +23 -0
- package/config/storybook/preview.jsx +88 -0
- package/config/storybook/theming/fonts.css +68 -0
- package/config/storybook/theming/logo.svg +19 -0
- package/config/storybook/theming/manager.css +63 -0
- package/config/storybook/theming/preview.css +93 -0
- package/config/storybook/theming/theme.js +61 -0
- package/config/tsconfig-base.json +16 -0
- package/config/tsconfig-preact.json +15 -0
- package/config/vite.mjs +306 -0
- package/package.json +113 -0
- package/post-release.sh +5 -0
- package/src/components/Accordion/Accordion.css +88 -0
- package/src/components/Accordion/Accordion.stories.tsx +582 -0
- package/src/components/Accordion/Accordion.tsx +177 -0
- package/src/components/Accordion/index.ts +11 -0
- package/src/components/ActionButton/ActionButton.css +100 -0
- package/src/components/ActionButton/ActionButton.stories.tsx +169 -0
- package/src/components/ActionButton/ActionButton.tsx +53 -0
- package/src/components/ActionButton/index.ts +10 -0
- package/src/components/ActionButtonGroup/ActionButtonGroup.css +77 -0
- package/src/components/ActionButtonGroup/ActionButtonGroup.stories.tsx +97 -0
- package/src/components/ActionButtonGroup/ActionButtonGroup.tsx +91 -0
- package/src/components/ActionButtonGroup/index.ts +10 -0
- package/src/components/AlertBanner/AlertBanner.css +144 -0
- package/src/components/AlertBanner/AlertBanner.stories.tsx +165 -0
- package/src/components/AlertBanner/AlertBanner.tsx +90 -0
- package/src/components/AlertBanner/index.ts +11 -0
- package/src/components/Breadcrumbs/Breadcrumbs.css +60 -0
- package/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +195 -0
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +71 -0
- package/src/components/Breadcrumbs/index.ts +11 -0
- package/src/components/Button/Button.css +213 -0
- package/src/components/Button/Button.mdx +133 -0
- package/src/components/Button/Button.stories.tsx +398 -0
- package/src/components/Button/Button.tsx +121 -0
- package/src/components/Button/index.ts +11 -0
- package/src/components/Card/Card.css +34 -0
- package/src/components/Card/Card.stories.tsx +76 -0
- package/src/components/Card/Card.tsx +34 -0
- package/src/components/Card/index.ts +10 -0
- package/src/components/CartItem/CartItem.css +509 -0
- package/src/components/CartItem/CartItem.stories.tsx +628 -0
- package/src/components/CartItem/CartItem.tsx +467 -0
- package/src/components/CartItem/CartItemSkeleton.tsx +38 -0
- package/src/components/CartItem/index.ts +12 -0
- package/src/components/CartList/CartList.css +35 -0
- package/src/components/CartList/CartList.stories.tsx +111 -0
- package/src/components/CartList/CartList.tsx +40 -0
- package/src/components/CartList/index.ts +11 -0
- package/src/components/Checkbox/Checkbox.css +255 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +290 -0
- package/src/components/Checkbox/Checkbox.tsx +138 -0
- package/src/components/Checkbox/index.ts +10 -0
- package/src/components/ColorSwatch/ColorSwatch.css +132 -0
- package/src/components/ColorSwatch/ColorSwatch.stories.tsx +274 -0
- package/src/components/ColorSwatch/ColorSwatch.tsx +127 -0
- package/src/components/ColorSwatch/index.ts +11 -0
- package/src/components/ContentGrid/ContentGrid.css +54 -0
- package/src/components/ContentGrid/ContentGrid.stories.tsx +137 -0
- package/src/components/ContentGrid/ContentGrid.tsx +57 -0
- package/src/components/ContentGrid/index.ts +11 -0
- package/src/components/Divider/Divider.css +22 -0
- package/src/components/Divider/Divider.stories.tsx +62 -0
- package/src/components/Divider/Divider.tsx +33 -0
- package/src/components/Divider/index.ts +11 -0
- package/src/components/Field/Field.css +83 -0
- package/src/components/Field/Field.stories.tsx +238 -0
- package/src/components/Field/Field.tsx +84 -0
- package/src/components/Field/index.ts +10 -0
- package/src/components/Header/Header.css +56 -0
- package/src/components/Header/Header.stories.tsx +180 -0
- package/src/components/Header/Header.tsx +81 -0
- package/src/components/Header/index.ts +11 -0
- package/src/components/Icon/Icon.css +26 -0
- package/src/components/Icon/Icon.stories.helpers.jsx +21 -0
- package/src/components/Icon/Icon.stories.tsx +98 -0
- package/src/components/Icon/Icon.tsx +112 -0
- package/src/components/Icon/index.ts +10 -0
- package/src/components/IllustratedMessage/IllustratedMessage.css +61 -0
- package/src/components/IllustratedMessage/IllustratedMessage.stories.tsx +126 -0
- package/src/components/IllustratedMessage/IllustratedMessage.tsx +78 -0
- package/src/components/IllustratedMessage/index.ts +11 -0
- package/src/components/Image/Image.css +52 -0
- package/src/components/Image/Image.stories.tsx +89 -0
- package/src/components/Image/Image.tsx +66 -0
- package/src/components/Image/index.ts +10 -0
- package/src/components/ImageSwatch/ImageSwatch.css +154 -0
- package/src/components/ImageSwatch/ImageSwatch.stories.tsx +310 -0
- package/src/components/ImageSwatch/ImageSwatch.tsx +123 -0
- package/src/components/ImageSwatch/index.ts +11 -0
- package/src/components/InLineAlert/InLineAlert.css +116 -0
- package/src/components/InLineAlert/InLineAlert.stories.tsx +326 -0
- package/src/components/InLineAlert/InLineAlert.tsx +128 -0
- package/src/components/InLineAlert/index.ts +11 -0
- package/src/components/Incrementer/Incrementer.css +165 -0
- package/src/components/Incrementer/Incrementer.stories.tsx +172 -0
- package/src/components/Incrementer/Incrementer.tsx +192 -0
- package/src/components/Incrementer/index.ts +10 -0
- package/src/components/Input/Input.css +304 -0
- package/src/components/Input/Input.stories.tsx +155 -0
- package/src/components/Input/Input.tsx +166 -0
- package/src/components/Input/index.ts +11 -0
- package/src/components/InputDate/InputDate.css +56 -0
- package/src/components/InputDate/InputDate.stories.tsx +117 -0
- package/src/components/InputDate/InputDate.tsx +120 -0
- package/src/components/InputDate/index.ts +11 -0
- package/src/components/InputPassword/InputPassword.css +31 -0
- package/src/components/InputPassword/InputPassword.stories.tsx +148 -0
- package/src/components/InputPassword/InputPassword.tsx +135 -0
- package/src/components/InputPassword/PasswordStatusIndicator/PasswordStatusIndicator.css +31 -0
- package/src/components/InputPassword/PasswordStatusIndicator/PasswordStatusIndicator.tsx +96 -0
- package/src/components/InputPassword/PasswordStatusIndicator/index.ts +11 -0
- package/src/components/InputPassword/index.ts +11 -0
- package/src/components/Modal/Modal.css +125 -0
- package/src/components/Modal/Modal.stories.tsx +250 -0
- package/src/components/Modal/Modal.tsx +157 -0
- package/src/components/Modal/index.ts +10 -0
- package/src/components/Pagination/Pagination.css +95 -0
- package/src/components/Pagination/Pagination.stories.tsx +117 -0
- package/src/components/Pagination/Pagination.tsx +149 -0
- package/src/components/Pagination/index.ts +11 -0
- package/src/components/Picker/Picker.css +220 -0
- package/src/components/Picker/Picker.stories.tsx +318 -0
- package/src/components/Picker/Picker.tsx +203 -0
- package/src/components/Picker/index.ts +10 -0
- package/src/components/Price/Price.css +57 -0
- package/src/components/Price/Price.stories.tsx +110 -0
- package/src/components/Price/Price.tsx +75 -0
- package/src/components/Price/index.ts +10 -0
- package/src/components/PriceRange/PriceRange.css +66 -0
- package/src/components/PriceRange/PriceRange.stories.tsx +240 -0
- package/src/components/PriceRange/PriceRange.tsx +248 -0
- package/src/components/PriceRange/index.ts +11 -0
- package/src/components/ProgressSpinner/ProgressSpinner.css +91 -0
- package/src/components/ProgressSpinner/ProgressSpinner.stories.tsx +300 -0
- package/src/components/ProgressSpinner/ProgressSpinner.tsx +86 -0
- package/src/components/ProgressSpinner/index.ts +11 -0
- package/src/components/RadioButton/RadioButton.css +134 -0
- package/src/components/RadioButton/RadioButton.stories.tsx +126 -0
- package/src/components/RadioButton/RadioButton.tsx +86 -0
- package/src/components/RadioButton/index.ts +11 -0
- package/src/components/Skeleton/Skeleton.css +145 -0
- package/src/components/Skeleton/Skeleton.stories.tsx +265 -0
- package/src/components/Skeleton/Skeleton.tsx +133 -0
- package/src/components/Skeleton/index.ts +10 -0
- package/src/components/Tag/Tag.css +26 -0
- package/src/components/Tag/Tag.stories.tsx +103 -0
- package/src/components/Tag/Tag.tsx +38 -0
- package/src/components/Tag/index.ts +11 -0
- package/src/components/TextArea/TextArea.css +140 -0
- package/src/components/TextArea/TextArea.stories.tsx +130 -0
- package/src/components/TextArea/TextArea.tsx +89 -0
- package/src/components/TextArea/index.ts +11 -0
- package/src/components/TextSwatch/TextSwatch.css +152 -0
- package/src/components/TextSwatch/TextSwatch.stories.tsx +277 -0
- package/src/components/TextSwatch/TextSwatch.tsx +131 -0
- package/src/components/TextSwatch/index.ts +11 -0
- package/src/components/ToggleButton/ToggleButton.css +95 -0
- package/src/components/ToggleButton/ToggleButton.stories.tsx +190 -0
- package/src/components/ToggleButton/ToggleButton.tsx +75 -0
- package/src/components/ToggleButton/index.ts +11 -0
- package/src/components/UIProvider/UIProvider.css +140 -0
- package/src/components/UIProvider/UIProvider.tsx +61 -0
- package/src/components/UIProvider/debugger.css +47 -0
- package/src/components/UIProvider/index.ts +10 -0
- package/src/components/UIProvider/normalize.css +26 -0
- package/src/components/index.ts +49 -0
- package/src/docs/API/event-bus.mdx +52 -0
- package/src/docs/API/graphql.mdx +214 -0
- package/src/docs/API/initializer.mdx +119 -0
- package/src/docs/API/render.mdx +125 -0
- package/src/docs/Design/colors.mdx +202 -0
- package/src/docs/Design/designBlocks.jsx +87 -0
- package/src/docs/Design/getTokenData.ts +28 -0
- package/src/docs/Design/grid.mdx +365 -0
- package/src/docs/Design/overview.mdx +69 -0
- package/src/docs/Design/shapes.mdx +100 -0
- package/src/docs/Design/spacing.mdx +22 -0
- package/src/docs/Design/typography.mdx +126 -0
- package/src/docs/Utilities/classList.mdx +52 -0
- package/src/docs/Utilities/debounce.mdx +49 -0
- package/src/docs/Utilities/deepmerge.mdx +12 -0
- package/src/docs/Utilities/getFormErrors.mdx +41 -0
- package/src/docs/Utilities/getFormValues.mdx +38 -0
- package/src/docs/assets/Banner.png +0 -0
- package/src/docs/assets/Colors.png +0 -0
- package/src/docs/assets/DropinBanner.png +0 -0
- package/src/docs/assets/ShapeStyles.png +0 -0
- package/src/docs/assets/Spacing.png +0 -0
- package/src/docs/assets/Typography.png +0 -0
- package/src/docs/cli-usage.mdx +181 -0
- package/src/docs/components/overview.mdx +124 -0
- package/src/docs/quick-start.mdx +245 -0
- package/src/docs/slots.mdx +211 -0
- package/src/docs/welcome.mdx +52 -0
- package/src/i18n/en_US.json +146 -0
- package/src/i18n/index.ts +26 -0
- package/src/icons/Add.svg +9 -0
- package/src/icons/AddressBook.svg +3 -0
- package/src/icons/Bulk.svg +24 -0
- package/src/icons/Burger.svg +5 -0
- package/src/icons/Card.svg +7 -0
- package/src/icons/Cart.svg +11 -0
- package/src/icons/Check.svg +8 -0
- package/src/icons/CheckWithCircle.svg +4 -0
- package/src/icons/ChevronDown.svg +3 -0
- package/src/icons/ChevronRight.svg +8 -0
- package/src/icons/ChevronUp.svg +3 -0
- package/src/icons/Close.svg +4 -0
- package/src/icons/Coupon.svg +3 -0
- package/src/icons/Date.svg +4 -0
- package/src/icons/Delivery.svg +11 -0
- package/src/icons/EmptyBox.svg +3 -0
- package/src/icons/Eye.svg +3 -0
- package/src/icons/EyeClose.svg +3 -0
- package/src/icons/Gift.svg +3 -0
- package/src/icons/GiftCard.svg +3 -0
- package/src/icons/Heart.svg +3 -0
- package/src/icons/HeartFilled.svg +3 -0
- package/src/icons/InfoFilled.svg +3 -0
- package/src/icons/Locker.svg +11 -0
- package/src/icons/Minus.svg +3 -0
- package/src/icons/Order.svg +6 -0
- package/src/icons/OrderError.svg +15 -0
- package/src/icons/OrderSuccess.svg +15 -0
- package/src/icons/PaymentError.svg +16 -0
- package/src/icons/Placeholder.svg +3 -0
- package/src/icons/PlaceholderFilled.svg +4 -0
- package/src/icons/Search.svg +9 -0
- package/src/icons/SearchFilled.svg +10 -0
- package/src/icons/Sort.svg +12 -0
- package/src/icons/Star.svg +8 -0
- package/src/icons/Trash.svg +7 -0
- package/src/icons/User.svg +5 -0
- package/src/icons/View.svg +14 -0
- package/src/icons/Wallet.svg +6 -0
- package/src/icons/Warning.svg +12 -0
- package/src/icons/WarningFilled.svg +3 -0
- package/src/icons/WarningWithCircle.svg +4 -0
- package/src/icons/index.ts +42 -0
- package/src/lib/classes.ts +34 -0
- package/src/lib/config.ts +24 -0
- package/src/lib/debounce.ts +16 -0
- package/src/lib/deepmerge.ts +45 -0
- package/src/lib/deviceUtils.ts +16 -0
- package/src/lib/form-values.ts +31 -0
- package/src/lib/i18n.ts +18 -0
- package/src/lib/image-params-keymap.ts +36 -0
- package/src/lib/index.ts +24 -0
- package/src/lib/initializer.ts +134 -0
- package/src/lib/is-number.ts +12 -0
- package/src/lib/render.tsx +138 -0
- package/src/lib/resolve-image.ts +101 -0
- package/src/lib/signals.ts +11 -0
- package/src/lib/slot.tsx +434 -0
- package/src/lib/tests.tsx +47 -0
- package/src/lib/types.ts +16 -0
- package/src/lib/vcomponent.tsx +42 -0
- package/static/assets/images/Card.png +0 -0
- package/static/assets/images/example.jpg +0 -0
- package/static/assets/images/index.ts +11 -0
- package/static/dropin.png +0 -0
- package/static/favicon.svg +14 -0
- package/storybook-stories.js +21 -0
- package/tests/__mocks__/browserMocks.ts +28 -0
- package/tests/__mocks__/fileMocks.ts +12 -0
- package/tests/__mocks__/styleMock.ts +0 -0
- package/types/icons.d.ts +18 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* Copyright 2024 Adobe
|
|
3
|
+
* All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* NOTICE: Adobe permits you to use, modify, and distribute this
|
|
6
|
+
* file in accordance with the terms of the Adobe license agreement
|
|
7
|
+
* accompanying it.
|
|
8
|
+
*******************************************************************/
|
|
9
|
+
|
|
10
|
+
export * from '@adobe-commerce/elsie/components/InputPassword/PasswordStatusIndicator/PasswordStatusIndicator';
|
|
11
|
+
export { PasswordStatusIndicator as default } from '@adobe-commerce/elsie/components/InputPassword/PasswordStatusIndicator/PasswordStatusIndicator';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* Copyright 2024 Adobe
|
|
3
|
+
* All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* NOTICE: Adobe permits you to use, modify, and distribute this
|
|
6
|
+
* file in accordance with the terms of the Adobe license agreement
|
|
7
|
+
* accompanying it.
|
|
8
|
+
*******************************************************************/
|
|
9
|
+
|
|
10
|
+
export * from '@adobe-commerce/elsie/components/InputPassword/InputPassword';
|
|
11
|
+
export { InputPassword as default } from '@adobe-commerce/elsie/components/InputPassword/InputPassword';
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* Copyright 2024 Adobe
|
|
3
|
+
* All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* NOTICE: Adobe permits you to use, modify, and distribute this
|
|
6
|
+
* file in accordance with the terms of the Adobe license agreement
|
|
7
|
+
* accompanying it.
|
|
8
|
+
*******************************************************************/
|
|
9
|
+
|
|
10
|
+
/* https://cssguidelin.es/#bem-like-naming */
|
|
11
|
+
|
|
12
|
+
.dropin-modal {
|
|
13
|
+
height: 100vh;
|
|
14
|
+
width: 100vw;
|
|
15
|
+
position: fixed;
|
|
16
|
+
top: 0;
|
|
17
|
+
left: 0;
|
|
18
|
+
z-index: 99999;
|
|
19
|
+
overflow: auto;
|
|
20
|
+
display: grid;
|
|
21
|
+
grid-template-columns: repeat(var(--grid-2-columns), 1fr);
|
|
22
|
+
grid-auto-flow: column;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.dropin-modal--dim {
|
|
26
|
+
background-color: rgba(0, 0, 0, 0.24);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.dropin-modal__body {
|
|
30
|
+
background-color: var(--color-neutral-50);
|
|
31
|
+
padding: var(--spacing-medium);
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
text-align: left;
|
|
34
|
+
vertical-align: middle;
|
|
35
|
+
position: relative;
|
|
36
|
+
box-shadow: var(--shape-shadow-2);
|
|
37
|
+
border-radius: 4px;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.dropin-modal__body--centered {
|
|
42
|
+
text-align: center;
|
|
43
|
+
margin-left: auto;
|
|
44
|
+
margin-right: auto;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.dropin-modal__body--full {
|
|
48
|
+
grid-column-start: 1;
|
|
49
|
+
grid-column-end: span var(--grid-2-columns);
|
|
50
|
+
margin-block: auto;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.dropin-modal__body--small,
|
|
54
|
+
.dropin-modal__body--medium {
|
|
55
|
+
grid-column-start: 3;
|
|
56
|
+
grid-column-end: 11;
|
|
57
|
+
margin-block: auto;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.dropin-modal__body--small > .dropin-modal__content,
|
|
61
|
+
.dropin-modal__body--medium > .dropin-modal__content,
|
|
62
|
+
.dropin-modal__body--full > .dropin-modal__content {
|
|
63
|
+
margin-bottom: var(--spacing-xbig);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* Modal Contents */
|
|
67
|
+
|
|
68
|
+
.dropin-modal__header {
|
|
69
|
+
flex-direction: row;
|
|
70
|
+
min-height: var(--spacing-medium);
|
|
71
|
+
display: flex;
|
|
72
|
+
position: relative;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.dropin-modal__header-title {
|
|
76
|
+
margin-bottom: var(--spacing-small);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.dropin-modal__header-title-content {
|
|
80
|
+
flex-direction: row;
|
|
81
|
+
display: flex;
|
|
82
|
+
position: relative;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.dropin-modal__header-close-button {
|
|
86
|
+
margin-left: auto;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Medium (portrait tablets and large phones, 768px and up) */
|
|
90
|
+
@media only screen and (min-width: 768px) {
|
|
91
|
+
.dropin-modal__body--small {
|
|
92
|
+
grid-column-start: 6;
|
|
93
|
+
grid-column-end: 9;
|
|
94
|
+
margin-block: auto;
|
|
95
|
+
}
|
|
96
|
+
.dropin-modal__body--medium {
|
|
97
|
+
grid-column-start: 4;
|
|
98
|
+
grid-column-end: 10;
|
|
99
|
+
margin-block: auto;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.dropin-modal__body--medium > .dropin-modal__content,
|
|
103
|
+
.dropin-modal__body--full > .dropin-modal__content {
|
|
104
|
+
margin: 0 var(--spacing-xxbig) var(--spacing-large);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.dropin-modal__body--medium > .dropin-modal__header,
|
|
108
|
+
.dropin-modal__body--full > .dropin-modal__header {
|
|
109
|
+
min-height: var(--spacing-xxbig);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.dropin-modal__body--medium > .dropin-modal__header-title,
|
|
113
|
+
.dropin-modal__body--full > .dropin-modal__header-title {
|
|
114
|
+
margin-bottom: var(--spacing-medium);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Large (landscape tablets, 1024px and up) */
|
|
119
|
+
/* @media only screen and (min-width: 1024px) { } */
|
|
120
|
+
|
|
121
|
+
/* XLarge (laptops/desktops, 1366px and up) */
|
|
122
|
+
/* @media only screen and (min-width: 1366px) { } */
|
|
123
|
+
|
|
124
|
+
/* XXlarge (large laptops and desktops, 1920px and up) */
|
|
125
|
+
/* @media only screen and (min-width: 1920px) { } */
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* Copyright 2024 Adobe
|
|
3
|
+
* All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* NOTICE: Adobe permits you to use, modify, and distribute this
|
|
6
|
+
* file in accordance with the terms of the Adobe license agreement
|
|
7
|
+
* accompanying it.
|
|
8
|
+
*******************************************************************/
|
|
9
|
+
|
|
10
|
+
import { Meta, StoryObj } from '@storybook/preact';
|
|
11
|
+
import { Modal as component, ModalProps } from './Modal';
|
|
12
|
+
import { useState } from 'preact/hooks';
|
|
13
|
+
import { Button } from '../Button';
|
|
14
|
+
import { expect, userEvent, within } from '@storybook/test';
|
|
15
|
+
|
|
16
|
+
const meta: Meta<ModalProps> = {
|
|
17
|
+
title: 'Components/Modal',
|
|
18
|
+
component,
|
|
19
|
+
parameters: {
|
|
20
|
+
layout: 'centered',
|
|
21
|
+
},
|
|
22
|
+
tags: ['autodocs'],
|
|
23
|
+
argTypes: {
|
|
24
|
+
children: {
|
|
25
|
+
description: 'Content',
|
|
26
|
+
control: { type: 'text' },
|
|
27
|
+
defaultValue: { summary: '<empty string>' },
|
|
28
|
+
},
|
|
29
|
+
size: {
|
|
30
|
+
description: 'Modal size',
|
|
31
|
+
control: { type: 'radio' },
|
|
32
|
+
options: ['small', 'medium', 'full'],
|
|
33
|
+
defaultValue: { summary: 'small' },
|
|
34
|
+
},
|
|
35
|
+
title: {
|
|
36
|
+
description: 'Title',
|
|
37
|
+
control: { type: 'text' },
|
|
38
|
+
defaultValue: { summary: '<empty string>' },
|
|
39
|
+
},
|
|
40
|
+
centered: {
|
|
41
|
+
description: 'Content inside modal is centered',
|
|
42
|
+
type: 'boolean',
|
|
43
|
+
defaultValue: { summary: 'false' },
|
|
44
|
+
},
|
|
45
|
+
onClose: {
|
|
46
|
+
description: 'On close modal callback',
|
|
47
|
+
control: { type: 'null' },
|
|
48
|
+
defaultValue: { summary: 'null' },
|
|
49
|
+
},
|
|
50
|
+
backgroundDim: {
|
|
51
|
+
description: 'Background behind modal content is dimmed',
|
|
52
|
+
type: 'boolean',
|
|
53
|
+
defaultValue: { summary: 'true' },
|
|
54
|
+
},
|
|
55
|
+
clickToDismiss: {
|
|
56
|
+
description: 'Enable click on background to dismiss the modal',
|
|
57
|
+
type: 'boolean',
|
|
58
|
+
defaultValue: { summary: 'true' },
|
|
59
|
+
},
|
|
60
|
+
escapeToDismiss: {
|
|
61
|
+
description: 'Enable ESCAPE key press to dismiss the modal',
|
|
62
|
+
type: 'boolean',
|
|
63
|
+
defaultValue: { summary: 'true' },
|
|
64
|
+
},
|
|
65
|
+
showCloseButton: {
|
|
66
|
+
description: 'Show close button',
|
|
67
|
+
type: 'boolean',
|
|
68
|
+
defaultValue: { summary: 'true' },
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
decorators: [
|
|
72
|
+
(Story, attrs) => {
|
|
73
|
+
const [active, setActive] = useState(false);
|
|
74
|
+
|
|
75
|
+
attrs.args.onClose = () => setActive(false);
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<div>
|
|
79
|
+
<Button onClick={() => setActive(true)}>Open Modal</Button>
|
|
80
|
+
|
|
81
|
+
{active && Story()}
|
|
82
|
+
</div>
|
|
83
|
+
);
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
type Story = StoryObj<ModalProps>;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* ```ts
|
|
92
|
+
* import { Modal } from '@/elsie/components/Modal';
|
|
93
|
+
*
|
|
94
|
+
* <Modal size="small" title={<h4>Modal Title</h4>}>
|
|
95
|
+
* <div>👋 Howdy, I'm Howdy!</div>
|
|
96
|
+
* </Modal>
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
|
|
100
|
+
export const SmallModal: Story = {
|
|
101
|
+
args: {
|
|
102
|
+
size: 'small',
|
|
103
|
+
children: "👋 Howdy, I'm Howdy!",
|
|
104
|
+
title: <h4>Small modal</h4>,
|
|
105
|
+
},
|
|
106
|
+
play: async ({ canvasElement }) => {
|
|
107
|
+
const canvas = within(canvasElement);
|
|
108
|
+
await userEvent.click(canvas.getByRole('button'));
|
|
109
|
+
|
|
110
|
+
const modal = document.querySelector(
|
|
111
|
+
'.dropin-modal__body'
|
|
112
|
+
) as HTMLDivElement;
|
|
113
|
+
|
|
114
|
+
await expect(modal).toBeVisible();
|
|
115
|
+
|
|
116
|
+
await expect(await canvas.findByText('Small modal')).toBeVisible();
|
|
117
|
+
|
|
118
|
+
const closeButton = document.querySelector(
|
|
119
|
+
'.dropin-modal__header-close-button'
|
|
120
|
+
) as HTMLButtonElement;
|
|
121
|
+
|
|
122
|
+
await userEvent.click(closeButton);
|
|
123
|
+
|
|
124
|
+
await expect(modal).not.toBeVisible();
|
|
125
|
+
|
|
126
|
+
await expect(canvas.getByText('Open Modal')).toBeVisible();
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* ```ts
|
|
132
|
+
* import { Modal } from '@/elsie/components/Modal';
|
|
133
|
+
*
|
|
134
|
+
* <Modal size="medium" centered={true} title={<h3>Medium modal</h3>}>
|
|
135
|
+
* <div>👋 Howdy, I'm Howdy!</div>
|
|
136
|
+
* </Modal>
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
|
|
140
|
+
export const MediumModal: Story = {
|
|
141
|
+
args: {
|
|
142
|
+
size: 'medium',
|
|
143
|
+
centered: true,
|
|
144
|
+
children: "👋 Howdy, I'm Howdy!",
|
|
145
|
+
title: <h3>Medium modal</h3>,
|
|
146
|
+
},
|
|
147
|
+
play: async ({ canvasElement }) => {
|
|
148
|
+
const canvas = within(canvasElement);
|
|
149
|
+
await userEvent.click(canvas.getByRole('button'));
|
|
150
|
+
|
|
151
|
+
const modal = document.querySelector(
|
|
152
|
+
'.dropin-modal__body'
|
|
153
|
+
) as HTMLDivElement;
|
|
154
|
+
|
|
155
|
+
await expect(modal).toBeVisible();
|
|
156
|
+
|
|
157
|
+
await expect(await canvas.findByText('Medium modal')).toBeVisible();
|
|
158
|
+
|
|
159
|
+
const closeButton = document.querySelector(
|
|
160
|
+
'.dropin-modal__header-close-button'
|
|
161
|
+
) as HTMLButtonElement;
|
|
162
|
+
|
|
163
|
+
await userEvent.click(closeButton);
|
|
164
|
+
|
|
165
|
+
await expect(modal).not.toBeVisible();
|
|
166
|
+
|
|
167
|
+
await expect(canvas.getByText('Open Modal')).toBeVisible();
|
|
168
|
+
},
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* ```ts
|
|
173
|
+
* import { Modal } from '@/elsie/components/Modal';
|
|
174
|
+
*
|
|
175
|
+
* <Modal size="full">
|
|
176
|
+
* <div>👋 Howdy, I'm Howdy!</div>
|
|
177
|
+
* </Modal>
|
|
178
|
+
* ```
|
|
179
|
+
*/
|
|
180
|
+
|
|
181
|
+
export const FullModal: Story = {
|
|
182
|
+
args: {
|
|
183
|
+
size: 'full',
|
|
184
|
+
children: "👋 Howdy, I'm Howdy!",
|
|
185
|
+
},
|
|
186
|
+
play: async ({ canvasElement }) => {
|
|
187
|
+
const canvas = within(canvasElement);
|
|
188
|
+
await userEvent.click(canvas.getByRole('button'));
|
|
189
|
+
|
|
190
|
+
const modal = document.querySelector(
|
|
191
|
+
'.dropin-modal__body'
|
|
192
|
+
) as HTMLDivElement;
|
|
193
|
+
|
|
194
|
+
await expect(modal).toBeVisible();
|
|
195
|
+
|
|
196
|
+
const closeButton = document.querySelector(
|
|
197
|
+
'.dropin-modal__header-close-button'
|
|
198
|
+
) as HTMLButtonElement;
|
|
199
|
+
|
|
200
|
+
await userEvent.click(closeButton);
|
|
201
|
+
|
|
202
|
+
await expect(modal).not.toBeVisible();
|
|
203
|
+
|
|
204
|
+
await expect(canvas.getByText('Open Modal')).toBeVisible();
|
|
205
|
+
},
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* ```ts
|
|
210
|
+
* import { Modal } from '@/elsie/components/Modal';
|
|
211
|
+
*
|
|
212
|
+
* <Modal size="full" centered={true}>
|
|
213
|
+
* Lorem ipsum...
|
|
214
|
+
* </Modal>
|
|
215
|
+
* ```
|
|
216
|
+
*/
|
|
217
|
+
|
|
218
|
+
export const OverflowingChildren: Story = {
|
|
219
|
+
args: {
|
|
220
|
+
size: 'full',
|
|
221
|
+
centered: true,
|
|
222
|
+
children: `
|
|
223
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras tincidunt neque gravida ligula malesuada bibendum et quis enim. Mauris sed nunc odio. Sed ornare nec nulla at fringilla. Cras egestas laoreet mi, sit amet tristique ipsum. Quisque facilisis ante et nisi hendrerit, et cursus est iaculis. Vestibulum nec erat eleifend, convallis velit quis, pharetra est. Nam augue dolor, blandit ac suscipit pretium, efficitur ut mi. Donec et suscipit ipsum, vel ultricies felis. Maecenas vestibulum velit mauris, ut sagittis arcu auctor maximus. Nullam gravida eget felis ac iaculis. Ut a consectetur ipsum, ac cursus magna. Quisque tempus tempus magna at vehicula. Duis ac imperdiet purus, finibus aliquet enim. Sed vel diam pretium, blandit risus vel, convallis mauris. Mauris consectetur iaculis diam.
|
|
224
|
+
`.repeat(15),
|
|
225
|
+
},
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* ```ts
|
|
230
|
+
* import { Modal } from '@/elsie/components/Modal';
|
|
231
|
+
*
|
|
232
|
+
* <Modal size="medium" title={<h3 style={{marginTop: 0}}>{`Howdy! This is the modal title`.repeat(5)}</h3>}>
|
|
233
|
+
* Howdy! This is the modal content.
|
|
234
|
+
* </Modal>
|
|
235
|
+
* ```
|
|
236
|
+
*/
|
|
237
|
+
|
|
238
|
+
export const OverflowingTitle: Story = {
|
|
239
|
+
args: {
|
|
240
|
+
size: 'medium',
|
|
241
|
+
children: `Howdy! This is the modal content.`,
|
|
242
|
+
title: (
|
|
243
|
+
<h3 style={{ marginTop: 0 }}>
|
|
244
|
+
{`Howdy! This is the modal title`.repeat(5)}
|
|
245
|
+
</h3>
|
|
246
|
+
),
|
|
247
|
+
},
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
export default meta;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* Copyright 2024 Adobe
|
|
3
|
+
* All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* NOTICE: Adobe permits you to use, modify, and distribute this
|
|
6
|
+
* file in accordance with the terms of the Adobe license agreement
|
|
7
|
+
* accompanying it.
|
|
8
|
+
*******************************************************************/
|
|
9
|
+
|
|
10
|
+
import { useText } from '@adobe-commerce/elsie/i18n';
|
|
11
|
+
import { classes } from '@adobe-commerce/elsie/lib';
|
|
12
|
+
import {
|
|
13
|
+
FunctionComponent,
|
|
14
|
+
HTMLAttributes,
|
|
15
|
+
useCallback,
|
|
16
|
+
useEffect,
|
|
17
|
+
} from 'preact/compat';
|
|
18
|
+
import { Button } from '../Button';
|
|
19
|
+
import { Close as CloseSVG } from '@adobe-commerce/elsie/icons';
|
|
20
|
+
import { VNode } from 'preact';
|
|
21
|
+
|
|
22
|
+
import '@adobe-commerce/elsie/components/Modal/Modal.css';
|
|
23
|
+
|
|
24
|
+
export interface ModalProps
|
|
25
|
+
extends Omit<HTMLAttributes<HTMLDivElement>, 'size' | 'title'> {
|
|
26
|
+
size?: 'small' | 'medium' | 'full';
|
|
27
|
+
title?: VNode;
|
|
28
|
+
centered?: boolean;
|
|
29
|
+
onClose?: () => void;
|
|
30
|
+
backgroundDim?: boolean;
|
|
31
|
+
clickToDismiss?: boolean;
|
|
32
|
+
escapeToDismiss?: boolean;
|
|
33
|
+
showCloseButton?: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const Modal: FunctionComponent<ModalProps> = ({
|
|
37
|
+
size = 'small',
|
|
38
|
+
title = null,
|
|
39
|
+
centered = false,
|
|
40
|
+
backgroundDim = true,
|
|
41
|
+
clickToDismiss = true,
|
|
42
|
+
escapeToDismiss = true,
|
|
43
|
+
onClose,
|
|
44
|
+
showCloseButton = true,
|
|
45
|
+
className,
|
|
46
|
+
children = null,
|
|
47
|
+
...props
|
|
48
|
+
}) => {
|
|
49
|
+
const handleOnClose = useCallback(() => {
|
|
50
|
+
onClose?.();
|
|
51
|
+
}, [onClose]);
|
|
52
|
+
|
|
53
|
+
const translations = useText({
|
|
54
|
+
modalCloseLabel: 'Dropin.Modal.Close.label',
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// Close on background click
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
const handleOutsideClick = (event: MouseEvent) => {
|
|
60
|
+
const modal = document.querySelector('.dropin-modal');
|
|
61
|
+
const modalBody = document.querySelector('.dropin-modal__body');
|
|
62
|
+
|
|
63
|
+
if (
|
|
64
|
+
clickToDismiss &&
|
|
65
|
+
modal &&
|
|
66
|
+
modalBody &&
|
|
67
|
+
!modalBody.contains(event.target as Node)
|
|
68
|
+
) {
|
|
69
|
+
handleOnClose();
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
document.addEventListener('mousedown', handleOutsideClick);
|
|
74
|
+
|
|
75
|
+
return () => {
|
|
76
|
+
document.removeEventListener('mousedown', handleOutsideClick);
|
|
77
|
+
};
|
|
78
|
+
}, [handleOnClose, clickToDismiss]);
|
|
79
|
+
|
|
80
|
+
// Close on ESC
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
const handleKeyDown = (event: KeyboardEvent) => {
|
|
83
|
+
if (event.key === 'Escape' && escapeToDismiss) {
|
|
84
|
+
handleOnClose();
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
89
|
+
|
|
90
|
+
return () => {
|
|
91
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
92
|
+
};
|
|
93
|
+
}, [handleOnClose, escapeToDismiss]);
|
|
94
|
+
|
|
95
|
+
// Prevent document scrolling
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
const scrollingElement = document.scrollingElement as HTMLElement;
|
|
98
|
+
|
|
99
|
+
const defaultOverflowValue = scrollingElement.style.overflow;
|
|
100
|
+
|
|
101
|
+
scrollingElement.style.overflow = 'hidden';
|
|
102
|
+
|
|
103
|
+
return () => {
|
|
104
|
+
scrollingElement.style.overflow = defaultOverflowValue;
|
|
105
|
+
};
|
|
106
|
+
}, []);
|
|
107
|
+
|
|
108
|
+
return (
|
|
109
|
+
<div
|
|
110
|
+
className={classes([
|
|
111
|
+
'dropin-modal',
|
|
112
|
+
['dropin-modal--dim', backgroundDim],
|
|
113
|
+
])}
|
|
114
|
+
>
|
|
115
|
+
<div
|
|
116
|
+
{...props}
|
|
117
|
+
className={classes([
|
|
118
|
+
'dropin-modal__body',
|
|
119
|
+
[`dropin-modal__body--${size}`, size],
|
|
120
|
+
className,
|
|
121
|
+
])}
|
|
122
|
+
>
|
|
123
|
+
<div
|
|
124
|
+
className={classes([
|
|
125
|
+
'dropin-modal__header',
|
|
126
|
+
['dropin-modal__header-title', !!title],
|
|
127
|
+
])}
|
|
128
|
+
>
|
|
129
|
+
{title && (
|
|
130
|
+
<div className={classes(['dropin-modal__header-title-content'])}>
|
|
131
|
+
{title}
|
|
132
|
+
</div>
|
|
133
|
+
)}
|
|
134
|
+
|
|
135
|
+
{showCloseButton && (
|
|
136
|
+
<Button
|
|
137
|
+
aria-label={translations.modalCloseLabel}
|
|
138
|
+
variant="tertiary"
|
|
139
|
+
className="dropin-modal__header-close-button"
|
|
140
|
+
onClick={handleOnClose}
|
|
141
|
+
icon={<CloseSVG />}
|
|
142
|
+
/>
|
|
143
|
+
)}
|
|
144
|
+
</div>
|
|
145
|
+
|
|
146
|
+
<div
|
|
147
|
+
className={classes([
|
|
148
|
+
'dropin-modal__content',
|
|
149
|
+
['dropin-modal__body--centered', centered],
|
|
150
|
+
])}
|
|
151
|
+
>
|
|
152
|
+
{children}
|
|
153
|
+
</div>
|
|
154
|
+
</div>
|
|
155
|
+
</div>
|
|
156
|
+
);
|
|
157
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* Copyright 2024 Adobe
|
|
3
|
+
* All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* NOTICE: Adobe permits you to use, modify, and distribute this
|
|
6
|
+
* file in accordance with the terms of the Adobe license agreement
|
|
7
|
+
* accompanying it.
|
|
8
|
+
*******************************************************************/
|
|
9
|
+
|
|
10
|
+
export * from '@adobe-commerce/elsie/components/Modal/Modal';
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* Copyright 2024 Adobe
|
|
3
|
+
* All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* NOTICE: Adobe permits you to use, modify, and distribute this
|
|
6
|
+
* file in accordance with the terms of the Adobe license agreement
|
|
7
|
+
* accompanying it.
|
|
8
|
+
*******************************************************************/
|
|
9
|
+
|
|
10
|
+
.dropin-pagination {
|
|
11
|
+
display: flex;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: 0 var(--grid-2-gutters);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.dropin-pagination-arrow {
|
|
18
|
+
margin: 0;
|
|
19
|
+
padding: 0;
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
background-color: transparent;
|
|
22
|
+
border: none;
|
|
23
|
+
display: flex;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
align-items: center;
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.dropin-pagination-arrow--backward svg {
|
|
30
|
+
transform: rotate(90deg);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.dropin-pagination-arrow--forward svg {
|
|
34
|
+
transform: rotate(-90deg);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.dropin-pagination_list {
|
|
38
|
+
list-style: none;
|
|
39
|
+
display: flex;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
align-items: center;
|
|
42
|
+
gap: 0 var(--grid-2-gutters);
|
|
43
|
+
margin: 0;
|
|
44
|
+
padding: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.dropin-pagination_list-item {
|
|
48
|
+
display: flex;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
align-items: center;
|
|
51
|
+
margin: 0;
|
|
52
|
+
padding: 0;
|
|
53
|
+
width: 16px;
|
|
54
|
+
height: 16px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.dropin-pagination_list-item--active {
|
|
58
|
+
background-color: var(--color-neutral-300);
|
|
59
|
+
width: 16px;
|
|
60
|
+
height: 16px;
|
|
61
|
+
border-radius: 50%;
|
|
62
|
+
display: flex;
|
|
63
|
+
justify-content: center;
|
|
64
|
+
align-items: center;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.dropin-pagination_list-item button {
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
margin: 0;
|
|
70
|
+
padding: 0;
|
|
71
|
+
background-color: transparent;
|
|
72
|
+
border: none;
|
|
73
|
+
font: var(--type-details-caption-1-font);
|
|
74
|
+
letter-spacing: var(--type-details-caption-1-letter-spacing);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.dropin-pagination_list-item--active button {
|
|
78
|
+
cursor: default;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.dropin-pagination_list-item--active button:disabled,
|
|
82
|
+
.dropin-pagination_list-item--ellipsis button,
|
|
83
|
+
.dropin-pagination-arrow--backward:disabled,
|
|
84
|
+
.dropin-pagination-arrow--forward:disabled {
|
|
85
|
+
cursor: default;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.dropin-pagination button:not(:disabled) {
|
|
89
|
+
color: var(--color-neutral-800);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.dropin-pagination button {
|
|
93
|
+
appearance: none;
|
|
94
|
+
-webkit-appearance: none;
|
|
95
|
+
}
|