@adobe-commerce/elsie 1.0.0-alpha4 → 1.0.0-beta1
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 +9 -0
- package/.eslintrc.js +9 -0
- package/__mocks__/svg.js +9 -0
- package/bin/lib/validate-typeof.js +9 -0
- package/bin/lib/write-file.js +9 -0
- package/bin/lib/write-parent-index.js +9 -0
- package/config/eslint.js +9 -0
- package/config/jest.js +9 -0
- package/config/prettier.js +9 -0
- package/config/setEnvVars.js +9 -0
- package/config/storybook/addon.js +9 -0
- package/config/storybook/components/FileTree/FileTree.jsx +9 -0
- package/config/storybook/components/FileTree/index.js +9 -0
- package/config/storybook/components/Flex/Flex.jsx +9 -0
- package/config/storybook/components/Flex/Flex.module.css +9 -0
- package/config/storybook/components/Flex/index.js +9 -0
- package/config/storybook/components/OptionsTable/OptionsTable.jsx +9 -0
- package/config/storybook/components/OptionsTable/OptionsTable.module.css +9 -0
- package/config/storybook/components/OptionsTable/index.js +9 -0
- package/config/storybook/components/Panel/Panel.module.css +9 -0
- package/config/storybook/components/Panel/Panel.tsx +9 -0
- package/config/storybook/components/Panel/index.ts +9 -0
- package/config/storybook/components/Screenshot/Screenshot.jsx +9 -0
- package/config/storybook/components/Screenshot/Screenshot.module.css +9 -0
- package/config/storybook/components/Screenshot/index.js +9 -0
- package/config/storybook/components/Steps/Steps.jsx +9 -0
- package/config/storybook/components/Steps/Steps.module.css +9 -0
- package/config/storybook/components/Steps/index.js +9 -0
- package/config/storybook/components/StoryWrapper/StoryWrapper.jsx +9 -0
- package/config/storybook/components/StoryWrapper/StoryWrapper.module.css +9 -0
- package/config/storybook/components/StoryWrapper/index.js +9 -0
- package/config/storybook/components/Summary/Summary.jsx +9 -0
- package/config/storybook/components/Summary/Summary.module.css +9 -0
- package/config/storybook/components/Summary/index.js +9 -0
- package/config/storybook/components/Variants/Variants.js +9 -0
- package/config/storybook/components/Variants/docs.css +9 -0
- package/config/storybook/components/Variants/index.js +9 -0
- package/config/storybook/components/video/index.jsx +9 -0
- package/config/storybook/manager.js +9 -0
- package/config/storybook/preview.jsx +9 -0
- package/config/storybook/theming/fonts.css +9 -0
- package/config/storybook/theming/manager.css +9 -0
- package/config/storybook/theming/preview.css +9 -0
- package/config/storybook/theming/theme.js +9 -0
- package/config/vite.mjs +9 -0
- package/package.json +1 -1
- package/post-release.sh +5 -0
- package/src/components/Accordion/Accordion.css +10 -1
- package/src/components/Accordion/Accordion.stories.tsx +9 -0
- package/src/components/Accordion/Accordion.tsx +9 -0
- package/src/components/Accordion/index.ts +9 -0
- package/src/components/ActionButton/ActionButton.css +9 -0
- package/src/components/ActionButton/ActionButton.stories.tsx +9 -0
- package/src/components/ActionButton/ActionButton.tsx +9 -0
- package/src/components/ActionButton/index.ts +9 -0
- package/src/components/ActionButtonGroup/ActionButtonGroup.css +9 -0
- package/src/components/ActionButtonGroup/ActionButtonGroup.stories.tsx +9 -0
- package/src/components/ActionButtonGroup/ActionButtonGroup.tsx +9 -0
- package/src/components/ActionButtonGroup/index.ts +9 -0
- package/src/components/AlertBanner/AlertBanner.css +9 -0
- package/src/components/AlertBanner/AlertBanner.stories.tsx +9 -0
- package/src/components/AlertBanner/AlertBanner.tsx +9 -0
- package/src/components/AlertBanner/index.ts +9 -0
- package/src/components/Breadcrumbs/Breadcrumbs.css +9 -0
- package/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +9 -0
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +9 -0
- package/src/components/Breadcrumbs/index.ts +9 -0
- package/src/components/Button/Button.css +9 -0
- package/src/components/Button/Button.stories.tsx +9 -0
- package/src/components/Button/Button.tsx +9 -0
- package/src/components/Button/index.ts +9 -0
- package/src/components/Card/Card.css +9 -0
- package/src/components/Card/Card.stories.tsx +9 -0
- package/src/components/Card/Card.tsx +9 -0
- package/src/components/Card/index.ts +9 -0
- package/src/components/CartItem/CartItem.css +40 -5
- package/src/components/CartItem/CartItem.stories.tsx +84 -44
- package/src/components/CartItem/CartItem.tsx +343 -320
- package/src/components/CartItem/CartItemSkeleton.tsx +9 -0
- package/src/components/CartItem/index.ts +9 -0
- package/src/components/CartList/CartList.css +9 -0
- package/src/components/CartList/CartList.stories.tsx +9 -0
- package/src/components/CartList/CartList.tsx +9 -0
- package/src/components/CartList/index.ts +9 -0
- package/src/components/Checkbox/Checkbox.css +9 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +9 -0
- package/src/components/Checkbox/Checkbox.tsx +9 -0
- package/src/components/Checkbox/index.ts +9 -0
- package/src/components/ColorSwatch/ColorSwatch.css +9 -0
- package/src/components/ColorSwatch/ColorSwatch.stories.tsx +9 -0
- package/src/components/ColorSwatch/ColorSwatch.tsx +9 -0
- package/src/components/ColorSwatch/index.ts +9 -0
- package/src/components/ContentGrid/ContentGrid.css +3 -11
- package/src/components/ContentGrid/ContentGrid.stories.tsx +3 -11
- package/src/components/ContentGrid/ContentGrid.tsx +3 -11
- package/src/components/ContentGrid/index.ts +3 -11
- package/src/components/Divider/Divider.css +9 -0
- package/src/components/Divider/Divider.stories.tsx +9 -0
- package/src/components/Divider/Divider.tsx +9 -0
- package/src/components/Divider/index.ts +9 -0
- package/src/components/Field/Field.css +9 -0
- package/src/components/Field/Field.stories.tsx +9 -0
- package/src/components/Field/Field.tsx +9 -0
- package/src/components/Field/index.ts +9 -0
- package/src/components/Header/Header.css +9 -0
- package/src/components/Header/Header.stories.tsx +52 -0
- package/src/components/Header/Header.tsx +31 -3
- package/src/components/Header/index.ts +9 -0
- package/src/components/Icon/Icon.css +9 -0
- package/src/components/Icon/Icon.stories.helpers.jsx +9 -0
- package/src/components/Icon/Icon.stories.tsx +9 -0
- package/src/components/Icon/Icon.tsx +9 -0
- package/src/components/Icon/index.ts +9 -0
- package/src/components/IllustratedMessage/IllustratedMessage.css +9 -0
- package/src/components/IllustratedMessage/IllustratedMessage.stories.tsx +9 -0
- package/src/components/IllustratedMessage/IllustratedMessage.tsx +9 -0
- package/src/components/IllustratedMessage/index.ts +9 -0
- package/src/components/Image/Image.css +9 -0
- package/src/components/Image/Image.stories.tsx +9 -0
- package/src/components/Image/Image.tsx +9 -0
- package/src/components/Image/index.ts +9 -0
- package/src/components/ImageSwatch/ImageSwatch.css +9 -0
- package/src/components/ImageSwatch/ImageSwatch.stories.tsx +58 -0
- package/src/components/ImageSwatch/ImageSwatch.tsx +22 -10
- package/src/components/ImageSwatch/index.ts +9 -0
- package/src/components/InLineAlert/InLineAlert.css +9 -0
- package/src/components/InLineAlert/InLineAlert.stories.tsx +9 -0
- package/src/components/InLineAlert/InLineAlert.tsx +9 -0
- package/src/components/InLineAlert/index.ts +9 -0
- package/src/components/Incrementer/Incrementer.css +9 -0
- package/src/components/Incrementer/Incrementer.stories.tsx +9 -0
- package/src/components/Incrementer/Incrementer.tsx +9 -0
- package/src/components/Incrementer/index.ts +9 -0
- package/src/components/Input/Input.css +9 -0
- package/src/components/Input/Input.stories.tsx +9 -0
- package/src/components/Input/Input.tsx +9 -0
- package/src/components/Input/index.ts +9 -0
- package/src/components/InputDate/InputDate.css +9 -0
- package/src/components/InputDate/InputDate.stories.tsx +9 -0
- package/src/components/InputDate/InputDate.tsx +9 -0
- package/src/components/InputDate/index.ts +9 -0
- package/src/components/InputPassword/InputPassword.css +9 -0
- package/src/components/InputPassword/InputPassword.stories.tsx +9 -0
- package/src/components/InputPassword/InputPassword.tsx +9 -0
- package/src/components/InputPassword/PasswordStatusIndicator/PasswordStatusIndicator.css +9 -0
- package/src/components/InputPassword/PasswordStatusIndicator/PasswordStatusIndicator.tsx +9 -0
- package/src/components/InputPassword/PasswordStatusIndicator/index.ts +9 -0
- package/src/components/InputPassword/index.ts +9 -0
- package/src/components/Modal/Modal.css +8 -13
- package/src/components/Modal/Modal.stories.tsx +8 -13
- package/src/components/Modal/Modal.tsx +8 -13
- package/src/components/Modal/index.ts +8 -13
- package/src/components/Pagination/Pagination.css +9 -0
- package/src/components/Pagination/Pagination.stories.tsx +9 -0
- package/src/components/Pagination/Pagination.tsx +9 -0
- package/src/components/Pagination/index.ts +9 -0
- package/src/components/Picker/Picker.css +9 -0
- package/src/components/Picker/Picker.stories.tsx +9 -0
- package/src/components/Picker/Picker.tsx +9 -0
- package/src/components/Picker/index.ts +9 -0
- package/src/components/Price/Price.css +9 -0
- package/src/components/Price/Price.stories.tsx +9 -0
- package/src/components/Price/Price.tsx +9 -0
- package/src/components/Price/index.ts +9 -0
- package/src/components/PriceRange/PriceRange.css +9 -0
- package/src/components/PriceRange/PriceRange.stories.tsx +9 -0
- package/src/components/PriceRange/PriceRange.tsx +9 -0
- package/src/components/PriceRange/index.ts +9 -0
- package/src/components/ProgressSpinner/ProgressSpinner.css +9 -0
- package/src/components/ProgressSpinner/ProgressSpinner.stories.tsx +9 -0
- package/src/components/ProgressSpinner/ProgressSpinner.tsx +9 -0
- package/src/components/ProgressSpinner/index.ts +9 -0
- package/src/components/RadioButton/RadioButton.css +9 -0
- package/src/components/RadioButton/RadioButton.stories.tsx +9 -0
- package/src/components/RadioButton/RadioButton.tsx +9 -0
- package/src/components/RadioButton/index.ts +9 -0
- package/src/components/Skeleton/Skeleton.css +9 -0
- package/src/components/Skeleton/Skeleton.stories.tsx +9 -0
- package/src/components/Skeleton/Skeleton.tsx +9 -0
- package/src/components/Skeleton/index.ts +9 -0
- package/src/components/Tag/Tag.css +9 -0
- package/src/components/Tag/Tag.stories.tsx +9 -0
- package/src/components/Tag/Tag.tsx +9 -0
- package/src/components/Tag/index.ts +9 -0
- package/src/components/TextArea/TextArea.css +9 -0
- package/src/components/TextArea/TextArea.stories.tsx +9 -0
- package/src/components/TextArea/TextArea.tsx +9 -0
- package/src/components/TextArea/index.ts +9 -0
- package/src/components/TextSwatch/TextSwatch.css +9 -0
- package/src/components/TextSwatch/TextSwatch.stories.tsx +9 -0
- package/src/components/TextSwatch/TextSwatch.tsx +9 -0
- package/src/components/TextSwatch/index.ts +9 -0
- package/src/components/ToggleButton/ToggleButton.css +18 -0
- package/src/components/ToggleButton/ToggleButton.stories.tsx +47 -3
- package/src/components/ToggleButton/ToggleButton.tsx +19 -11
- package/src/components/ToggleButton/index.ts +9 -0
- package/src/components/UIProvider/UIProvider.css +9 -0
- package/src/components/UIProvider/UIProvider.tsx +9 -0
- package/src/components/UIProvider/debugger.css +9 -0
- package/src/components/UIProvider/index.ts +9 -0
- package/src/components/UIProvider/normalize.css +9 -0
- package/src/components/index.ts +9 -0
- package/src/i18n/index.ts +9 -0
- package/src/lib/classes.ts +9 -0
- package/src/lib/config.ts +9 -0
- package/src/lib/debounce.ts +9 -0
- package/src/lib/deepmerge.ts +9 -0
- package/src/lib/deviceUtils.ts +9 -0
- package/src/lib/form-values.ts +9 -0
- package/src/lib/i18n.ts +9 -0
- package/src/lib/image-params-keymap.ts +9 -0
- package/src/lib/index.ts +9 -0
- package/src/lib/initializer.ts +9 -0
- package/src/lib/is-number.ts +9 -0
- package/src/lib/render.tsx +9 -0
- package/src/lib/resolve-image.ts +9 -0
- package/src/lib/signals.ts +9 -0
- package/src/lib/slot.tsx +9 -0
- package/src/lib/tests.tsx +9 -0
- package/src/lib/types.ts +9 -0
- package/src/lib/vcomponent.tsx +8 -13
- package/static/assets/images/index.ts +9 -0
- package/storybook-stories.js +9 -0
- package/tests/__mocks__/browserMocks.ts +9 -0
- package/tests/__mocks__/fileMocks.ts +9 -0
- package/types/icons.d.ts +9 -0
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
import { FunctionComponent } from 'preact';
|
|
2
11
|
import { Skeleton, SkeletonRow } from '@adobe-commerce/elsie/components';
|
|
3
12
|
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
export * from '@adobe-commerce/elsie/components/CartItem/CartItem';
|
|
2
11
|
export * from '@adobe-commerce/elsie/components/CartItem/CartItemSkeleton';
|
|
3
12
|
export { CartItem as default } from '@adobe-commerce/elsie/components/CartItem/CartItem';
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
/* https://cssguidelin.es/#bem-like-naming */
|
|
2
11
|
|
|
3
12
|
.dropin-cart-list {
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
// https://storybook.js.org/docs/7.0/preact/writing-stories/introduction
|
|
2
11
|
import type { Meta, StoryObj } from '@storybook/preact';
|
|
3
12
|
import {
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
import { FunctionComponent } from 'preact';
|
|
2
11
|
import { HTMLAttributes, Children } from 'preact/compat';
|
|
3
12
|
import { classes } from '@adobe-commerce/elsie/lib';
|
|
@@ -1,2 +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
|
+
|
|
1
10
|
export * from '@adobe-commerce/elsie/components/CartList/CartList';
|
|
2
11
|
export { CartList as default } from '@adobe-commerce/elsie/components/CartList/CartList';
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
/* https://cssguidelin.es/#bem-like-naming */
|
|
2
11
|
|
|
3
12
|
.dropin-checkbox {
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
// https://storybook.js.org/docs/7.0/preact/writing-stories/introduction
|
|
2
11
|
import type { Meta, StoryObj } from '@storybook/preact';
|
|
3
12
|
import { Checkbox, CheckboxProps } from '@adobe-commerce/elsie/components/Checkbox';
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
import { FunctionComponent, VNode } from 'preact';
|
|
2
11
|
import { ChangeEvent, HTMLAttributes, useRef, useState } from 'preact/compat';
|
|
3
12
|
import { classes } from '@adobe-commerce/elsie/lib';
|
|
@@ -1 +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
|
+
|
|
1
10
|
export * from '@adobe-commerce/elsie/components/Checkbox/Checkbox';
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
/* https://cssguidelin.es/#bem-like-naming */
|
|
2
11
|
|
|
3
12
|
/* Hide the default radio/checkbox button */
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
// https://storybook.js.org/docs/7.0/preact/writing-stories/introduction
|
|
2
11
|
import type { Meta, StoryObj } from '@storybook/preact';
|
|
3
12
|
import { action } from '@storybook/addon-actions';
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
import { FunctionComponent } from 'preact';
|
|
2
11
|
import { HTMLAttributes, useCallback } from 'preact/compat';
|
|
3
12
|
import { classes } from '@adobe-commerce/elsie/lib';
|
|
@@ -1,2 +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
|
+
|
|
1
10
|
export * from '@adobe-commerce/elsie/components/ColorSwatch/ColorSwatch';
|
|
2
11
|
export { ColorSwatch as default } from '@adobe-commerce/elsie/components/ColorSwatch/ColorSwatch';
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
/********************************************************************
|
|
2
|
-
* ADOBE CONFIDENTIAL
|
|
3
|
-
* __________________
|
|
4
|
-
*
|
|
5
2
|
* Copyright 2024 Adobe
|
|
6
3
|
* All Rights Reserved.
|
|
7
4
|
*
|
|
8
|
-
* NOTICE:
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
-
* property laws, including trade secret and copyright laws.
|
|
13
|
-
* Dissemination of this information or reproduction of this material
|
|
14
|
-
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
-
* from Adobe.
|
|
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.
|
|
16
8
|
*******************************************************************/
|
|
17
9
|
|
|
18
10
|
/* https://cssguidelin.es/#bem-like-naming */
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
/********************************************************************
|
|
2
|
-
* ADOBE CONFIDENTIAL
|
|
3
|
-
* __________________
|
|
4
|
-
*
|
|
5
2
|
* Copyright 2024 Adobe
|
|
6
3
|
* All Rights Reserved.
|
|
7
4
|
*
|
|
8
|
-
* NOTICE:
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
-
* property laws, including trade secret and copyright laws.
|
|
13
|
-
* Dissemination of this information or reproduction of this material
|
|
14
|
-
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
-
* from Adobe.
|
|
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.
|
|
16
8
|
*******************************************************************/
|
|
17
9
|
|
|
18
10
|
// https://storybook.js.org/docs/7.0/preact/writing-stories/introduction
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
/********************************************************************
|
|
2
|
-
* ADOBE CONFIDENTIAL
|
|
3
|
-
* __________________
|
|
4
|
-
*
|
|
5
2
|
* Copyright 2024 Adobe
|
|
6
3
|
* All Rights Reserved.
|
|
7
4
|
*
|
|
8
|
-
* NOTICE:
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
-
* property laws, including trade secret and copyright laws.
|
|
13
|
-
* Dissemination of this information or reproduction of this material
|
|
14
|
-
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
-
* from Adobe.
|
|
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.
|
|
16
8
|
*******************************************************************/
|
|
17
9
|
|
|
18
10
|
import { FunctionComponent, VNode } from 'preact';
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
/********************************************************************
|
|
2
|
-
* ADOBE CONFIDENTIAL
|
|
3
|
-
* __________________
|
|
4
|
-
*
|
|
5
2
|
* Copyright 2024 Adobe
|
|
6
3
|
* All Rights Reserved.
|
|
7
4
|
*
|
|
8
|
-
* NOTICE:
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
-
* property laws, including trade secret and copyright laws.
|
|
13
|
-
* Dissemination of this information or reproduction of this material
|
|
14
|
-
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
-
* from Adobe.
|
|
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.
|
|
16
8
|
*******************************************************************/
|
|
17
9
|
|
|
18
10
|
export * from '@adobe-commerce/elsie/components/ContentGrid/ContentGrid';
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
.dropin-divider {
|
|
2
11
|
border: none;
|
|
3
12
|
}
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
import type { Meta, StoryObj } from '@storybook/preact';
|
|
2
11
|
import { Divider, DividerProps } from '@adobe-commerce/elsie/components/Divider';
|
|
3
12
|
import { expect, within } from '@storybook/test';
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
import { FunctionComponent } from 'preact';
|
|
2
11
|
import { HTMLAttributes } from 'preact/compat';
|
|
3
12
|
import { classes } from '@adobe-commerce/elsie/lib';
|
|
@@ -1,2 +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
|
+
|
|
1
10
|
export * from '@adobe-commerce/elsie/components/Divider/Divider';
|
|
2
11
|
export { Divider as default } from '@adobe-commerce/elsie/components/Divider/Divider';
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
/* https://cssguidelin.es/#bem-like-naming */
|
|
2
11
|
.dropin-field {
|
|
3
12
|
display: grid;
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
// https://storybook.js.org/docs/7.0/preact/writing-stories/introduction
|
|
2
11
|
/* eslint-disable react/no-danger */
|
|
3
12
|
import type { Meta, StoryObj } from '@storybook/preact';
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
import '@adobe-commerce/elsie/components/Field/Field.css';
|
|
2
11
|
import { classes } from '@adobe-commerce/elsie/lib';
|
|
3
12
|
import { FunctionComponent, VNode } from 'preact';
|
|
@@ -1 +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
|
+
|
|
1
10
|
export * from '@adobe-commerce/elsie/components/Field/Field';
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
.dropin-header-container {
|
|
2
11
|
display: grid;
|
|
3
12
|
grid-template-columns: repeat(2, auto);
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
// https://storybook.js.org/docs/7.0/preact/writing-stories/introduction
|
|
2
11
|
import type { Meta, StoryObj } from '@storybook/preact';
|
|
3
12
|
import { Header, HeaderProps } from '@adobe-commerce/elsie/components/Header';
|
|
@@ -50,6 +59,22 @@ export default {
|
|
|
50
59
|
},
|
|
51
60
|
defaultValue: { summary: '<empty string>' },
|
|
52
61
|
},
|
|
62
|
+
level: {
|
|
63
|
+
description: 'Set the heading level',
|
|
64
|
+
options: [1, 2, 3, 4, 5, 6],
|
|
65
|
+
control: {
|
|
66
|
+
type: 'select',
|
|
67
|
+
labels: {
|
|
68
|
+
1: 'h1',
|
|
69
|
+
2: 'h2',
|
|
70
|
+
3: 'h3',
|
|
71
|
+
4: 'h4',
|
|
72
|
+
5: 'h5',
|
|
73
|
+
6: 'h6'
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
defaultValue: { summary: 2 },
|
|
77
|
+
},
|
|
53
78
|
},
|
|
54
79
|
} as Meta<HeaderProps>;
|
|
55
80
|
|
|
@@ -75,6 +100,7 @@ export const MediumSize = {
|
|
|
75
100
|
Print order details
|
|
76
101
|
</Button>
|
|
77
102
|
),
|
|
103
|
+
level: 2,
|
|
78
104
|
},
|
|
79
105
|
play: async ({ canvasElement }) => {
|
|
80
106
|
const canvas = within(canvasElement);
|
|
@@ -98,6 +124,7 @@ export const LargeSize = {
|
|
|
98
124
|
size: 'large',
|
|
99
125
|
divider: true,
|
|
100
126
|
cta: <a href="#">Print order details</a>,
|
|
127
|
+
level: 2,
|
|
101
128
|
},
|
|
102
129
|
};
|
|
103
130
|
|
|
@@ -111,6 +138,7 @@ export const WithoutLine = {
|
|
|
111
138
|
size: 'medium',
|
|
112
139
|
divider: false,
|
|
113
140
|
cta: <button>Print order details</button>,
|
|
141
|
+
level: 2,
|
|
114
142
|
},
|
|
115
143
|
};
|
|
116
144
|
|
|
@@ -124,5 +152,29 @@ export const WithoutActions = {
|
|
|
124
152
|
size: 'medium',
|
|
125
153
|
divider: false,
|
|
126
154
|
cta: null,
|
|
155
|
+
level: 2,
|
|
127
156
|
},
|
|
128
157
|
};
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
export const HeadingLevels = {
|
|
161
|
+
...Template,
|
|
162
|
+
parameters: {
|
|
163
|
+
layout: 'fullscreen',
|
|
164
|
+
},
|
|
165
|
+
args: {
|
|
166
|
+
title: 'Heading Levels',
|
|
167
|
+
size: 'medium',
|
|
168
|
+
divider: true,
|
|
169
|
+
level: 1,
|
|
170
|
+
},
|
|
171
|
+
argTypes: {
|
|
172
|
+
level: {
|
|
173
|
+
control: {
|
|
174
|
+
type: 'select',
|
|
175
|
+
options: [1, 2, 3, 4, 5, 6]
|
|
176
|
+
},
|
|
177
|
+
description: 'Set the heading level',
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
};
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
|
|
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 { ComponentChildren, FunctionComponent, VNode } from 'preact';
|
|
2
11
|
import { HTMLAttributes } from 'preact/compat';
|
|
3
12
|
import { classes, VComponent } from '@adobe-commerce/elsie/lib';
|
|
4
13
|
import { Divider } from '@adobe-commerce/elsie/components';
|
|
@@ -9,14 +18,32 @@ export interface HeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
9
18
|
size?: 'medium' | 'large';
|
|
10
19
|
divider?: boolean;
|
|
11
20
|
cta?: VNode;
|
|
21
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
12
22
|
}
|
|
13
23
|
|
|
24
|
+
const Heading = ({
|
|
25
|
+
level,
|
|
26
|
+
className,
|
|
27
|
+
children,
|
|
28
|
+
}: {
|
|
29
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
30
|
+
className?: string;
|
|
31
|
+
children?: ComponentChildren;
|
|
32
|
+
}) => {
|
|
33
|
+
const HeadingTag = level && level >= 1 && level <= 6
|
|
34
|
+
? `h${level}` as keyof JSX.IntrinsicElements
|
|
35
|
+
: 'span';
|
|
36
|
+
|
|
37
|
+
return <HeadingTag className={className}>{children as any}</HeadingTag>;
|
|
38
|
+
};
|
|
39
|
+
|
|
14
40
|
export const Header: FunctionComponent<HeaderProps> = ({
|
|
15
41
|
title = null,
|
|
16
42
|
size = 'medium',
|
|
17
43
|
cta,
|
|
18
44
|
divider = true,
|
|
19
45
|
className,
|
|
46
|
+
level,
|
|
20
47
|
...props
|
|
21
48
|
}) => {
|
|
22
49
|
if (!title) return null;
|
|
@@ -27,15 +54,16 @@ export const Header: FunctionComponent<HeaderProps> = ({
|
|
|
27
54
|
className={classes(['dropin-header-container', className])}
|
|
28
55
|
data-testid="dropin-header-container"
|
|
29
56
|
>
|
|
30
|
-
<
|
|
57
|
+
<Heading
|
|
31
58
|
className={classes([
|
|
32
59
|
'dropin-header-container__title',
|
|
33
60
|
['dropin-header-container__title--medium', size === 'medium'],
|
|
34
61
|
['dropin-header-container__title--large', size === 'large'],
|
|
35
62
|
])}
|
|
63
|
+
level={level}
|
|
36
64
|
>
|
|
37
65
|
{title}
|
|
38
|
-
</
|
|
66
|
+
</Heading>
|
|
39
67
|
{cta ? (
|
|
40
68
|
<VComponent node={cta} className="dropin-header-container__actions" />
|
|
41
69
|
) : null}
|
|
@@ -1,2 +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
|
+
|
|
1
10
|
export * from '@adobe-commerce/elsie/components/Header/Header';
|
|
2
11
|
export { Header as default } from '@adobe-commerce/elsie/components/Header/Header';
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
/* https://cssguidelin.es/#bem-like-naming */
|
|
2
11
|
|
|
3
12
|
.dropin-icon--shape-stroke-1 {
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
import * as Icons from '@adobe-commerce/elsie/icons';
|
|
2
11
|
import { Icon } from './Icon';
|
|
3
12
|
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
import type { Meta, StoryObj } from '@storybook/preact';
|
|
2
11
|
import { Icon, IconProps } from '@adobe-commerce/elsie/components/Icon';
|
|
3
12
|
import { Cart } from '@adobe-commerce/elsie/icons/index';
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
import { FunctionComponent } from 'preact';
|
|
2
11
|
import { classes } from '@adobe-commerce/elsie/lib/classes';
|
|
3
12
|
import { lazy, Suspense, SVGProps } from 'preact/compat';
|
|
@@ -1 +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
|
+
|
|
1
10
|
export * from '@adobe-commerce/elsie/components/Icon/Icon';
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
/* https://cssguidelin.es/#bem-like-naming */
|
|
2
11
|
|
|
3
12
|
.dropin-illustrated-message {
|