@dropins/tools 0.21.2-alpha2 → 0.21.2-alpha389
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/event-bus.js +1 -49
- package/fetch-graphql.js +1 -62
- package/initializer.js +1 -61
- package/package.json +1 -1
- package/preact-compat.js +1 -93
- package/preact-hooks.js +1 -40
- package/preact-jsx-runtime.js +1 -35
- package/preact.js +1 -21
- package/runtime.js +1 -69
- package/components/Accordion/Accordion.d.ts +0 -25
- package/components/Accordion/Accordion.d.ts.map +0 -1
- package/components/Accordion/Accordion.jsx +0 -59
- package/components/Accordion/Accordion.stories.d.ts +0 -22
- package/components/Accordion/Accordion.stories.d.ts.map +0 -1
- package/components/Accordion/Accordion.stories.jsx +0 -320
- package/components/Accordion/Accordion.test.d.ts +0 -3
- package/components/Accordion/Accordion.test.d.ts.map +0 -1
- package/components/Accordion/Accordion.test.jsx +0 -79
- package/components/Accordion/index.d.ts +0 -3
- package/components/Accordion/index.d.ts.map +0 -1
- package/components/Accordion/index.js +0 -2
- package/components/ActionButton/ActionButton.d.ts +0 -11
- package/components/ActionButton/ActionButton.d.ts.map +0 -1
- package/components/ActionButton/ActionButton.jsx +0 -14
- package/components/ActionButton/ActionButton.stories.d.ts +0 -16
- package/components/ActionButton/ActionButton.stories.d.ts.map +0 -1
- package/components/ActionButton/ActionButton.stories.jsx +0 -119
- package/components/ActionButton/ActionButton.test.d.ts +0 -3
- package/components/ActionButton/ActionButton.test.d.ts.map +0 -1
- package/components/ActionButton/ActionButton.test.jsx +0 -47
- package/components/ActionButton/index.d.ts +0 -2
- package/components/ActionButton/index.d.ts.map +0 -1
- package/components/ActionButton/index.js +0 -1
- package/components/ActionButtonGroup/ActionButtonGroup.d.ts +0 -20
- package/components/ActionButtonGroup/ActionButtonGroup.d.ts.map +0 -1
- package/components/ActionButtonGroup/ActionButtonGroup.jsx +0 -39
- package/components/ActionButtonGroup/ActionButtonGroup.stories.d.ts +0 -16
- package/components/ActionButtonGroup/ActionButtonGroup.stories.d.ts.map +0 -1
- package/components/ActionButtonGroup/ActionButtonGroup.stories.jsx +0 -72
- package/components/ActionButtonGroup/ActionButtonGroup.test.d.ts +0 -3
- package/components/ActionButtonGroup/ActionButtonGroup.test.d.ts.map +0 -1
- package/components/ActionButtonGroup/ActionButtonGroup.test.jsx +0 -78
- package/components/ActionButtonGroup/index.d.ts +0 -2
- package/components/ActionButtonGroup/index.d.ts.map +0 -1
- package/components/ActionButtonGroup/index.js +0 -1
- package/components/AlertBanner/AlertBanner.d.ts +0 -15
- package/components/AlertBanner/AlertBanner.d.ts.map +0 -1
- package/components/AlertBanner/AlertBanner.jsx +0 -30
- package/components/AlertBanner/AlertBanner.stories.d.ts +0 -17
- package/components/AlertBanner/AlertBanner.stories.d.ts.map +0 -1
- package/components/AlertBanner/AlertBanner.stories.jsx +0 -128
- package/components/AlertBanner/AlertBanner.test.d.ts +0 -3
- package/components/AlertBanner/AlertBanner.test.d.ts.map +0 -1
- package/components/AlertBanner/AlertBanner.test.jsx +0 -40
- package/components/AlertBanner/index.d.ts +0 -3
- package/components/AlertBanner/index.d.ts.map +0 -1
- package/components/AlertBanner/index.js +0 -2
- package/components/Breadcrumbs/Breadcrumbs.d.ts +0 -9
- package/components/Breadcrumbs/Breadcrumbs.d.ts.map +0 -1
- package/components/Breadcrumbs/Breadcrumbs.jsx +0 -26
- package/components/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -15
- package/components/Breadcrumbs/Breadcrumbs.stories.d.ts.map +0 -1
- package/components/Breadcrumbs/Breadcrumbs.stories.jsx +0 -110
- package/components/Breadcrumbs/Breadcrumbs.test.d.ts +0 -3
- package/components/Breadcrumbs/Breadcrumbs.test.d.ts.map +0 -1
- package/components/Breadcrumbs/Breadcrumbs.test.jsx +0 -67
- package/components/Breadcrumbs/index.d.ts +0 -3
- package/components/Breadcrumbs/index.d.ts.map +0 -1
- package/components/Breadcrumbs/index.js +0 -2
- package/components/Button/Button.d.ts +0 -15
- package/components/Button/Button.d.ts.map +0 -1
- package/components/Button/Button.jsx +0 -59
- package/components/Button/Button.stories.d.ts +0 -135
- package/components/Button/Button.stories.d.ts.map +0 -1
- package/components/Button/Button.stories.jsx +0 -354
- package/components/Button/Button.test.d.ts +0 -2
- package/components/Button/Button.test.d.ts.map +0 -1
- package/components/Button/Button.test.jsx +0 -134
- package/components/Button/index.d.ts +0 -3
- package/components/Button/index.d.ts.map +0 -1
- package/components/Button/index.js +0 -2
- package/components/Card/Card.d.ts +0 -9
- package/components/Card/Card.d.ts.map +0 -1
- package/components/Card/Card.jsx +0 -7
- package/components/Card/Card.stories.d.ts +0 -16
- package/components/Card/Card.stories.d.ts.map +0 -1
- package/components/Card/Card.stories.jsx +0 -47
- package/components/Card/Card.test.d.ts +0 -3
- package/components/Card/Card.test.d.ts.map +0 -1
- package/components/Card/Card.test.jsx +0 -26
- package/components/Card/index.d.ts +0 -2
- package/components/Card/index.d.ts.map +0 -1
- package/components/Card/index.js +0 -1
- package/components/CartItem/CartItem.d.ts +0 -25
- package/components/CartItem/CartItem.d.ts.map +0 -1
- package/components/CartItem/CartItem.jsx +0 -124
- package/components/CartItem/CartItem.stories.d.ts +0 -54
- package/components/CartItem/CartItem.stories.d.ts.map +0 -1
- package/components/CartItem/CartItem.stories.jsx +0 -309
- package/components/CartItem/CartItem.test.d.ts +0 -3
- package/components/CartItem/CartItem.test.d.ts.map +0 -1
- package/components/CartItem/CartItem.test.jsx +0 -71
- package/components/CartItem/CartItemSkeleton.d.ts +0 -3
- package/components/CartItem/CartItemSkeleton.d.ts.map +0 -1
- package/components/CartItem/CartItemSkeleton.jsx +0 -25
- package/components/CartItem/CartItemSkeleton.test.d.ts +0 -3
- package/components/CartItem/CartItemSkeleton.test.d.ts.map +0 -1
- package/components/CartItem/CartItemSkeleton.test.jsx +0 -11
- package/components/CartItem/index.d.ts +0 -4
- package/components/CartItem/index.d.ts.map +0 -1
- package/components/CartItem/index.js +0 -3
- package/components/CartList/CartList.d.ts +0 -7
- package/components/CartList/CartList.d.ts.map +0 -1
- package/components/CartList/CartList.jsx +0 -14
- package/components/CartList/CartList.stories.d.ts +0 -17
- package/components/CartList/CartList.stories.d.ts.map +0 -1
- package/components/CartList/CartList.stories.jsx +0 -54
- package/components/CartList/CartList.test.d.ts +0 -3
- package/components/CartList/CartList.test.d.ts.map +0 -1
- package/components/CartList/CartList.test.jsx +0 -12
- package/components/CartList/index.d.ts +0 -3
- package/components/CartList/index.d.ts.map +0 -1
- package/components/CartList/index.js +0 -2
- package/components/Checkbox/Checkbox.d.ts +0 -13
- package/components/Checkbox/Checkbox.d.ts.map +0 -1
- package/components/Checkbox/Checkbox.jsx +0 -51
- package/components/Checkbox/Checkbox.stories.d.ts +0 -22
- package/components/Checkbox/Checkbox.stories.d.ts.map +0 -1
- package/components/Checkbox/Checkbox.stories.jsx +0 -157
- package/components/Checkbox/Checkbox.test.d.ts +0 -3
- package/components/Checkbox/Checkbox.test.d.ts.map +0 -1
- package/components/Checkbox/Checkbox.test.jsx +0 -136
- package/components/Checkbox/index.d.ts +0 -2
- package/components/Checkbox/index.d.ts.map +0 -1
- package/components/Checkbox/index.js +0 -1
- package/components/ColorSwatch/ColorSwatch.d.ts +0 -20
- package/components/ColorSwatch/ColorSwatch.d.ts.map +0 -1
- package/components/ColorSwatch/ColorSwatch.jsx +0 -57
- package/components/ColorSwatch/ColorSwatch.stories.d.ts +0 -20
- package/components/ColorSwatch/ColorSwatch.stories.d.ts.map +0 -1
- package/components/ColorSwatch/ColorSwatch.stories.jsx +0 -206
- package/components/ColorSwatch/ColorSwatch.test.d.ts +0 -3
- package/components/ColorSwatch/ColorSwatch.test.d.ts.map +0 -1
- package/components/ColorSwatch/ColorSwatch.test.jsx +0 -87
- package/components/ColorSwatch/index.d.ts +0 -3
- package/components/ColorSwatch/index.d.ts.map +0 -1
- package/components/ColorSwatch/index.js +0 -2
- package/components/Divider/Divider.d.ts +0 -8
- package/components/Divider/Divider.d.ts.map +0 -1
- package/components/Divider/Divider.jsx +0 -9
- package/components/Divider/Divider.stories.d.ts +0 -11
- package/components/Divider/Divider.stories.d.ts.map +0 -1
- package/components/Divider/Divider.stories.jsx +0 -43
- package/components/Divider/Divider.test.d.ts +0 -2
- package/components/Divider/Divider.test.d.ts.map +0 -1
- package/components/Divider/Divider.test.jsx +0 -19
- package/components/Divider/index.d.ts +0 -3
- package/components/Divider/index.d.ts.map +0 -1
- package/components/Divider/index.js +0 -2
- package/components/Field/Field.d.ts +0 -14
- package/components/Field/Field.d.ts.map +0 -1
- package/components/Field/Field.jsx +0 -29
- package/components/Field/Field.stories.d.ts +0 -37
- package/components/Field/Field.stories.d.ts.map +0 -1
- package/components/Field/Field.stories.jsx +0 -174
- package/components/Field/Field.test.d.ts +0 -3
- package/components/Field/Field.test.d.ts.map +0 -1
- package/components/Field/Field.test.jsx +0 -91
- package/components/Field/index.d.ts +0 -2
- package/components/Field/index.d.ts.map +0 -1
- package/components/Field/index.js +0 -1
- package/components/Icon/Icon.d.ts +0 -11
- package/components/Icon/Icon.d.ts.map +0 -1
- package/components/Icon/Icon.jsx +0 -57
- package/components/Icon/Icon.stories.d.ts +0 -16
- package/components/Icon/Icon.stories.d.ts.map +0 -1
- package/components/Icon/Icon.stories.helpers.d.ts +0 -4
- package/components/Icon/Icon.stories.helpers.d.ts.map +0 -1
- package/components/Icon/Icon.stories.helpers.jsx +0 -7
- package/components/Icon/Icon.stories.jsx +0 -48
- package/components/Icon/Icon.test.d.ts +0 -3
- package/components/Icon/Icon.test.d.ts.map +0 -1
- package/components/Icon/Icon.test.jsx +0 -67
- package/components/Icon/index.d.ts +0 -2
- package/components/Icon/index.d.ts.map +0 -1
- package/components/Icon/index.js +0 -1
- package/components/IllustratedMessage/IllustratedMessage.d.ts +0 -13
- package/components/IllustratedMessage/IllustratedMessage.d.ts.map +0 -1
- package/components/IllustratedMessage/IllustratedMessage.jsx +0 -21
- package/components/IllustratedMessage/IllustratedMessage.stories.d.ts +0 -10
- package/components/IllustratedMessage/IllustratedMessage.stories.d.ts.map +0 -1
- package/components/IllustratedMessage/IllustratedMessage.stories.jsx +0 -90
- package/components/IllustratedMessage/IllustratedMessage.test.d.ts +0 -3
- package/components/IllustratedMessage/IllustratedMessage.test.d.ts.map +0 -1
- package/components/IllustratedMessage/IllustratedMessage.test.jsx +0 -42
- package/components/IllustratedMessage/index.d.ts +0 -3
- package/components/IllustratedMessage/index.d.ts.map +0 -1
- package/components/IllustratedMessage/index.js +0 -2
- package/components/Image/Image.d.ts +0 -11
- package/components/Image/Image.d.ts.map +0 -1
- package/components/Image/Image.jsx +0 -26
- package/components/Image/Image.stories.d.ts +0 -11
- package/components/Image/Image.stories.d.ts.map +0 -1
- package/components/Image/Image.stories.jsx +0 -66
- package/components/Image/Image.test.d.ts +0 -3
- package/components/Image/Image.test.d.ts.map +0 -1
- package/components/Image/Image.test.jsx +0 -82
- package/components/Image/index.d.ts +0 -2
- package/components/Image/index.d.ts.map +0 -1
- package/components/Image/index.js +0 -1
- package/components/ImageSwatch/ImageSwatch.d.ts +0 -20
- package/components/ImageSwatch/ImageSwatch.d.ts.map +0 -1
- package/components/ImageSwatch/ImageSwatch.jsx +0 -49
- package/components/ImageSwatch/ImageSwatch.stories.d.ts +0 -20
- package/components/ImageSwatch/ImageSwatch.stories.d.ts.map +0 -1
- package/components/ImageSwatch/ImageSwatch.stories.jsx +0 -206
- package/components/ImageSwatch/ImageSwatch.test.d.ts +0 -3
- package/components/ImageSwatch/ImageSwatch.test.d.ts.map +0 -1
- package/components/ImageSwatch/ImageSwatch.test.jsx +0 -64
- package/components/ImageSwatch/index.d.ts +0 -3
- package/components/ImageSwatch/index.d.ts.map +0 -1
- package/components/ImageSwatch/index.js +0 -2
- package/components/InLineAlert/InLineAlert.d.ts +0 -16
- package/components/InLineAlert/InLineAlert.d.ts.map +0 -1
- package/components/InLineAlert/InLineAlert.jsx +0 -38
- package/components/InLineAlert/InLineAlert.stories.d.ts +0 -86
- package/components/InLineAlert/InLineAlert.stories.d.ts.map +0 -1
- package/components/InLineAlert/InLineAlert.stories.jsx +0 -193
- package/components/InLineAlert/InLineAlert.test.d.ts +0 -3
- package/components/InLineAlert/InLineAlert.test.d.ts.map +0 -1
- package/components/InLineAlert/InLineAlert.test.jsx +0 -77
- package/components/InLineAlert/index.d.ts +0 -3
- package/components/InLineAlert/index.d.ts.map +0 -1
- package/components/InLineAlert/index.js +0 -2
- package/components/Incrementer/Incrementer.d.ts +0 -17
- package/components/Incrementer/Incrementer.d.ts.map +0 -1
- package/components/Incrementer/Incrementer.jsx +0 -87
- package/components/Incrementer/Incrementer.stories.d.ts +0 -10
- package/components/Incrementer/Incrementer.stories.d.ts.map +0 -1
- package/components/Incrementer/Incrementer.stories.jsx +0 -68
- package/components/Incrementer/Incrementer.test.d.ts +0 -3
- package/components/Incrementer/Incrementer.test.d.ts.map +0 -1
- package/components/Incrementer/Incrementer.test.jsx +0 -112
- package/components/Incrementer/index.d.ts +0 -2
- package/components/Incrementer/index.d.ts.map +0 -1
- package/components/Incrementer/index.js +0 -1
- package/components/Input/Input.d.ts +0 -19
- package/components/Input/Input.d.ts.map +0 -1
- package/components/Input/Input.jsx +0 -73
- package/components/Input/Input.stories.d.ts +0 -11
- package/components/Input/Input.stories.d.ts.map +0 -1
- package/components/Input/Input.stories.jsx +0 -115
- package/components/Input/Input.test.d.ts +0 -3
- package/components/Input/Input.test.d.ts.map +0 -1
- package/components/Input/Input.test.jsx +0 -111
- package/components/Input/index.d.ts +0 -3
- package/components/Input/index.d.ts.map +0 -1
- package/components/Input/index.js +0 -2
- package/components/Modal/Modal.d.ts +0 -15
- package/components/Modal/Modal.d.ts.map +0 -1
- package/components/Modal/Modal.jsx +0 -93
- package/components/Modal/Modal.stories.d.ts +0 -56
- package/components/Modal/Modal.stories.d.ts.map +0 -1
- package/components/Modal/Modal.stories.jsx +0 -189
- package/components/Modal/Modal.test.d.ts +0 -3
- package/components/Modal/Modal.test.d.ts.map +0 -1
- package/components/Modal/Modal.test.jsx +0 -85
- package/components/Modal/index.d.ts +0 -2
- package/components/Modal/index.d.ts.map +0 -1
- package/components/Modal/index.js +0 -14
- package/components/Picker/Picker.d.ts +0 -26
- package/components/Picker/Picker.d.ts.map +0 -1
- package/components/Picker/Picker.jsx +0 -81
- package/components/Picker/Picker.stories.d.ts +0 -22
- package/components/Picker/Picker.stories.d.ts.map +0 -1
- package/components/Picker/Picker.stories.jsx +0 -236
- package/components/Picker/Picker.test.d.ts +0 -2
- package/components/Picker/Picker.test.d.ts.map +0 -1
- package/components/Picker/Picker.test.jsx +0 -190
- package/components/Picker/index.d.ts +0 -2
- package/components/Picker/index.d.ts.map +0 -1
- package/components/Picker/index.js +0 -1
- package/components/Price/Price.d.ts +0 -17
- package/components/Price/Price.d.ts.map +0 -1
- package/components/Price/Price.jsx +0 -24
- package/components/Price/Price.stories.d.ts +0 -17
- package/components/Price/Price.stories.d.ts.map +0 -1
- package/components/Price/Price.stories.jsx +0 -78
- package/components/Price/Price.test.d.ts +0 -3
- package/components/Price/Price.test.d.ts.map +0 -1
- package/components/Price/Price.test.jsx +0 -68
- package/components/Price/index.d.ts +0 -2
- package/components/Price/index.d.ts.map +0 -1
- package/components/Price/index.js +0 -1
- package/components/PriceRange/PriceRange.d.ts +0 -17
- package/components/PriceRange/PriceRange.d.ts.map +0 -1
- package/components/PriceRange/PriceRange.jsx +0 -75
- package/components/PriceRange/PriceRange.stories.d.ts +0 -107
- package/components/PriceRange/PriceRange.stories.d.ts.map +0 -1
- package/components/PriceRange/PriceRange.stories.jsx +0 -210
- package/components/PriceRange/PriceRange.test.d.ts +0 -3
- package/components/PriceRange/PriceRange.test.d.ts.map +0 -1
- package/components/PriceRange/PriceRange.test.jsx +0 -188
- package/components/PriceRange/index.d.ts +0 -3
- package/components/PriceRange/index.d.ts.map +0 -1
- package/components/PriceRange/index.js +0 -2
- package/components/PriceSummary/PriceSummary.d.ts +0 -43
- package/components/PriceSummary/PriceSummary.d.ts.map +0 -1
- package/components/PriceSummary/PriceSummary.jsx +0 -228
- package/components/PriceSummary/PriceSummary.stories.d.ts +0 -127
- package/components/PriceSummary/PriceSummary.stories.d.ts.map +0 -1
- package/components/PriceSummary/PriceSummary.stories.jsx +0 -456
- package/components/PriceSummary/PriceSummary.test.d.ts +0 -3
- package/components/PriceSummary/PriceSummary.test.d.ts.map +0 -1
- package/components/PriceSummary/PriceSummary.test.jsx +0 -275
- package/components/PriceSummary/index.d.ts +0 -3
- package/components/PriceSummary/index.d.ts.map +0 -1
- package/components/PriceSummary/index.js +0 -2
- package/components/ProgressSpinner/ProgressSpinner.d.ts +0 -14
- package/components/ProgressSpinner/ProgressSpinner.d.ts.map +0 -1
- package/components/ProgressSpinner/ProgressSpinner.jsx +0 -31
- package/components/ProgressSpinner/ProgressSpinner.stories.d.ts +0 -19
- package/components/ProgressSpinner/ProgressSpinner.stories.d.ts.map +0 -1
- package/components/ProgressSpinner/ProgressSpinner.stories.jsx +0 -195
- package/components/ProgressSpinner/ProgressSpinner.test.d.ts +0 -3
- package/components/ProgressSpinner/ProgressSpinner.test.d.ts.map +0 -1
- package/components/ProgressSpinner/ProgressSpinner.test.jsx +0 -40
- package/components/ProgressSpinner/index.d.ts +0 -3
- package/components/ProgressSpinner/index.d.ts.map +0 -1
- package/components/ProgressSpinner/index.js +0 -2
- package/components/RadioButton/RadioButton.d.ts +0 -15
- package/components/RadioButton/RadioButton.d.ts.map +0 -1
- package/components/RadioButton/RadioButton.jsx +0 -31
- package/components/RadioButton/RadioButton.stories.d.ts +0 -15
- package/components/RadioButton/RadioButton.stories.d.ts.map +0 -1
- package/components/RadioButton/RadioButton.stories.jsx +0 -92
- package/components/RadioButton/RadioButton.test.d.ts +0 -3
- package/components/RadioButton/RadioButton.test.d.ts.map +0 -1
- package/components/RadioButton/RadioButton.test.jsx +0 -62
- package/components/RadioButton/index.d.ts +0 -3
- package/components/RadioButton/index.d.ts.map +0 -1
- package/components/RadioButton/index.js +0 -2
- package/components/Skeleton/Skeleton.d.ts +0 -17
- package/components/Skeleton/Skeleton.d.ts.map +0 -1
- package/components/Skeleton/Skeleton.jsx +0 -52
- package/components/Skeleton/Skeleton.stories.d.ts +0 -67
- package/components/Skeleton/Skeleton.stories.d.ts.map +0 -1
- package/components/Skeleton/Skeleton.stories.jsx +0 -184
- package/components/Skeleton/Skeleton.test.d.ts +0 -3
- package/components/Skeleton/Skeleton.test.d.ts.map +0 -1
- package/components/Skeleton/Skeleton.test.jsx +0 -62
- package/components/Skeleton/index.d.ts +0 -2
- package/components/Skeleton/index.d.ts.map +0 -1
- package/components/Skeleton/index.js +0 -1
- package/components/TextSwatch/TextSwatch.d.ts +0 -18
- package/components/TextSwatch/TextSwatch.d.ts.map +0 -1
- package/components/TextSwatch/TextSwatch.jsx +0 -56
- package/components/TextSwatch/TextSwatch.stories.d.ts +0 -21
- package/components/TextSwatch/TextSwatch.stories.d.ts.map +0 -1
- package/components/TextSwatch/TextSwatch.stories.jsx +0 -211
- package/components/TextSwatch/TextSwatch.test.d.ts +0 -3
- package/components/TextSwatch/TextSwatch.test.d.ts.map +0 -1
- package/components/TextSwatch/TextSwatch.test.jsx +0 -85
- package/components/TextSwatch/index.d.ts +0 -3
- package/components/TextSwatch/index.d.ts.map +0 -1
- package/components/TextSwatch/index.js +0 -2
- package/components/UIProvider/UIProvider.d.ts +0 -18
- package/components/UIProvider/UIProvider.d.ts.map +0 -1
- package/components/UIProvider/UIProvider.jsx +0 -26
- package/components/UIProvider/UIProvider.test.d.ts +0 -2
- package/components/UIProvider/UIProvider.test.d.ts.map +0 -1
- package/components/UIProvider/UIProvider.test.jsx +0 -9
- package/components/UIProvider/index.d.ts +0 -2
- package/components/UIProvider/index.d.ts.map +0 -1
- package/components/UIProvider/index.js +0 -1
- package/components/index.d.ts +0 -34
- package/components/index.d.ts.map +0 -1
- package/components/index.js +0 -33
- package/docs/Design/designBlocks.d.ts +0 -21
- package/docs/Design/designBlocks.d.ts.map +0 -1
- package/docs/Design/designBlocks.jsx +0 -59
- package/docs/Design/getTokenData.d.ts +0 -7
- package/docs/Design/getTokenData.d.ts.map +0 -1
- package/docs/Design/getTokenData.js +0 -18
- package/docs/Design/getTokenData.test.d.ts +0 -2
- package/docs/Design/getTokenData.test.d.ts.map +0 -1
- package/docs/Design/getTokenData.test.js +0 -92
- package/i18n/en_US.json +0 -112
- package/i18n/index.d.ts +0 -341
- package/i18n/index.d.ts.map +0 -1
- package/i18n/index.js +0 -12
- package/i18n/index.test.d.ts +0 -2
- package/i18n/index.test.d.ts.map +0 -1
- package/i18n/index.test.js +0 -11
- package/icons/index.d.ts +0 -35
- package/icons/index.d.ts.map +0 -1
- package/icons/index.js +0 -34
- package/lib/classes.d.ts +0 -5
- package/lib/classes.d.ts.map +0 -1
- package/lib/classes.js +0 -16
- package/lib/classes.test.d.ts +0 -2
- package/lib/classes.test.d.ts.map +0 -1
- package/lib/classes.test.js +0 -18
- package/lib/config.d.ts +0 -7
- package/lib/config.d.ts.map +0 -1
- package/lib/config.js +0 -12
- package/lib/config.test.d.ts +0 -2
- package/lib/config.test.d.ts.map +0 -1
- package/lib/config.test.js +0 -12
- package/lib/debounce.d.ts +0 -2
- package/lib/debounce.d.ts.map +0 -1
- package/lib/debounce.js +0 -7
- package/lib/debounce.test.d.ts +0 -2
- package/lib/debounce.test.d.ts.map +0 -1
- package/lib/debounce.test.js +0 -40
- package/lib/deepmerge.d.ts +0 -2
- package/lib/deepmerge.d.ts.map +0 -1
- package/lib/deepmerge.js +0 -1
- package/lib/form-values.d.ts +0 -5
- package/lib/form-values.d.ts.map +0 -1
- package/lib/form-values.js +0 -17
- package/lib/form-values.test.d.ts +0 -2
- package/lib/form-values.test.d.ts.map +0 -1
- package/lib/form-values.test.jsx +0 -29
- package/lib/i18n.d.ts +0 -8
- package/lib/i18n.d.ts.map +0 -1
- package/lib/i18n.js +0 -9
- package/lib/i18n.test.d.ts +0 -2
- package/lib/i18n.test.d.ts.map +0 -1
- package/lib/i18n.test.jsx +0 -8
- package/lib/image-params-keymap.d.ts +0 -4
- package/lib/image-params-keymap.d.ts.map +0 -1
- package/lib/image-params-keymap.js +0 -19
- package/lib/image-params-keymap.test.d.ts +0 -2
- package/lib/image-params-keymap.test.d.ts.map +0 -1
- package/lib/image-params-keymap.test.js +0 -7
- package/lib/index.d.ts +0 -14
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -13
- package/lib/initializer.d.ts +0 -78
- package/lib/initializer.d.ts.map +0 -1
- package/lib/initializer.js +0 -93
- package/lib/initializer.test.d.ts +0 -2
- package/lib/initializer.test.d.ts.map +0 -1
- package/lib/initializer.test.js +0 -64
- package/lib/render.d.ts +0 -10
- package/lib/render.d.ts.map +0 -1
- package/lib/render.jsx +0 -34
- package/lib/render.test.d.ts +0 -2
- package/lib/render.test.d.ts.map +0 -1
- package/lib/render.test.jsx +0 -70
- package/lib/resolve-image.d.ts +0 -10
- package/lib/resolve-image.d.ts.map +0 -1
- package/lib/resolve-image.js +0 -57
- package/lib/resolve-image.test.d.ts +0 -2
- package/lib/resolve-image.test.d.ts.map +0 -1
- package/lib/resolve-image.test.jsx +0 -146
- package/lib/slot.d.ts +0 -43
- package/lib/slot.d.ts.map +0 -1
- package/lib/slot.jsx +0 -184
- package/lib/slot.test.d.ts +0 -2
- package/lib/slot.test.d.ts.map +0 -1
- package/lib/slot.test.jsx +0 -325
- package/lib/tests.d.ts +0 -4
- package/lib/tests.d.ts.map +0 -1
- package/lib/tests.jsx +0 -19
- package/lib/tests.test.d.ts +0 -2
- package/lib/tests.test.d.ts.map +0 -1
- package/lib/tests.test.jsx +0 -13
- package/lib/types.d.ts +0 -9
- package/lib/types.d.ts.map +0 -1
- package/lib/types.js +0 -1
- package/lib/vcomponent.d.ts +0 -8
- package/lib/vcomponent.d.ts.map +0 -1
- package/lib/vcomponent.jsx +0 -27
- package/lib/vcomponent.test.d.ts +0 -2
- package/lib/vcomponent.test.d.ts.map +0 -1
- package/lib/vcomponent.test.jsx +0 -51
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import { Field, Picker, Input, Incrementer, Checkbox, } from '@adobe/elsie/components';
|
|
2
|
-
import { within, userEvent } from '@storybook/testing-library';
|
|
3
|
-
import { expect } from '@storybook/jest';
|
|
4
|
-
/**
|
|
5
|
-
* Use Field Labels to wrap form inputs with titles and help text.
|
|
6
|
-
*/
|
|
7
|
-
const meta = {
|
|
8
|
-
title: 'Components/Field',
|
|
9
|
-
component: Field,
|
|
10
|
-
argTypes: {
|
|
11
|
-
label: {
|
|
12
|
-
description: 'Label',
|
|
13
|
-
control: 'text',
|
|
14
|
-
},
|
|
15
|
-
hint: {
|
|
16
|
-
description: 'Helper Text',
|
|
17
|
-
control: 'text',
|
|
18
|
-
},
|
|
19
|
-
error: {
|
|
20
|
-
description: 'Error Text',
|
|
21
|
-
control: 'text',
|
|
22
|
-
},
|
|
23
|
-
success: {
|
|
24
|
-
description: 'Success Text',
|
|
25
|
-
control: 'text',
|
|
26
|
-
},
|
|
27
|
-
size: {
|
|
28
|
-
description: '',
|
|
29
|
-
options: ['medium', 'large'],
|
|
30
|
-
control: { type: 'radio' },
|
|
31
|
-
defaultValue: {
|
|
32
|
-
summary: 'medium',
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
disabled: {
|
|
36
|
-
description: 'Whether or not the field is disabled',
|
|
37
|
-
control: 'boolean',
|
|
38
|
-
defaultValue: {
|
|
39
|
-
summary: false,
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
export default meta;
|
|
45
|
-
/**
|
|
46
|
-
* ```ts
|
|
47
|
-
* import { Field } from '@adobe/elsie/components/Field';
|
|
48
|
-
* import { Input } from '@adobe/elsie/components/Input';
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
export const InputField = {
|
|
52
|
-
render: (args) => (<Field {...args}>
|
|
53
|
-
<Input name="inputField" placeholder="Input"/>
|
|
54
|
-
</Field>),
|
|
55
|
-
args: {
|
|
56
|
-
label: 'Label',
|
|
57
|
-
hint: 'Helper Text',
|
|
58
|
-
error: '',
|
|
59
|
-
success: '',
|
|
60
|
-
size: 'medium',
|
|
61
|
-
disabled: false,
|
|
62
|
-
},
|
|
63
|
-
play: async ({ canvasElement }) => {
|
|
64
|
-
const canvas = within(canvasElement);
|
|
65
|
-
await userEvent.type(canvas.getByPlaceholderText('Input'), 'Test Content');
|
|
66
|
-
await expect(await canvas.findByDisplayValue('Test Content')).toBeVisible();
|
|
67
|
-
await expect(canvas.getByText('Label')).toBeVisible();
|
|
68
|
-
await expect(canvas.getByText('Helper Text')).toBeVisible();
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* ```ts
|
|
73
|
-
* import { Field } from '@adobe/elsie/components/Field';
|
|
74
|
-
* import { Incrementer } from '@adobe/elsie/components/Incrementer';
|
|
75
|
-
* ```
|
|
76
|
-
*/
|
|
77
|
-
export const IncrementerField = {
|
|
78
|
-
render: (args) => (<Field {...args}>
|
|
79
|
-
<Incrementer name="incrementerField" value="0" min={0} max={100}/>
|
|
80
|
-
</Field>),
|
|
81
|
-
args: {
|
|
82
|
-
label: 'Label',
|
|
83
|
-
hint: 'Helper Text',
|
|
84
|
-
error: '',
|
|
85
|
-
success: '',
|
|
86
|
-
size: 'medium',
|
|
87
|
-
disabled: false,
|
|
88
|
-
},
|
|
89
|
-
play: async () => {
|
|
90
|
-
const canvasElement = document.querySelector('#storybook-root');
|
|
91
|
-
const canvas = within(canvasElement);
|
|
92
|
-
const decreaseButton = document.querySelector('button[aria-label="Decrease Quantity"]');
|
|
93
|
-
const inputField = document.querySelector('input');
|
|
94
|
-
const increaseButton = document.querySelector('button[aria-label="Increase Quantity"]');
|
|
95
|
-
// Without this wait test failing intermittently as click event is triggerning before even element fully loaded
|
|
96
|
-
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
97
|
-
await userEvent.click(increaseButton);
|
|
98
|
-
await expect(await canvas.findByDisplayValue('1')).toBeTruthy();
|
|
99
|
-
await userEvent.click(decreaseButton);
|
|
100
|
-
await expect(await canvas.findByDisplayValue('0')).toBeTruthy();
|
|
101
|
-
await userEvent.type(inputField, '99');
|
|
102
|
-
await expect(await canvas.findByDisplayValue('99')).toBeTruthy();
|
|
103
|
-
await userEvent.click(increaseButton);
|
|
104
|
-
await expect(await canvas.findByDisplayValue('100')).toBeTruthy();
|
|
105
|
-
await userEvent.click(increaseButton);
|
|
106
|
-
await expect(await canvas.findByDisplayValue('100')).toBeTruthy();
|
|
107
|
-
await userEvent.click(decreaseButton);
|
|
108
|
-
await expect(await canvas.findByDisplayValue('99')).toBeTruthy();
|
|
109
|
-
await userEvent.clear(inputField);
|
|
110
|
-
await userEvent.type(inputField, '0');
|
|
111
|
-
await expect(await canvas.findByDisplayValue('0')).toBeTruthy();
|
|
112
|
-
},
|
|
113
|
-
};
|
|
114
|
-
/**
|
|
115
|
-
* ```ts
|
|
116
|
-
* import { Field } from '@adobe/elsie/components/Field';
|
|
117
|
-
* import { Picker } from '@adobe/elsie/components/Picker';
|
|
118
|
-
* ```
|
|
119
|
-
*/
|
|
120
|
-
export const PickerField = {
|
|
121
|
-
render: (args) => (<Field {...args}>
|
|
122
|
-
<Picker name="pickerField" placeholder="Select an option" options={[
|
|
123
|
-
{
|
|
124
|
-
value: 'option1',
|
|
125
|
-
text: 'Option 1',
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
value: 'option2',
|
|
129
|
-
text: 'Option 2',
|
|
130
|
-
disabled: true,
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
value: 'option3',
|
|
134
|
-
text: 'Option 3',
|
|
135
|
-
},
|
|
136
|
-
]} disabled={false}/>
|
|
137
|
-
</Field>),
|
|
138
|
-
args: {
|
|
139
|
-
label: 'Label',
|
|
140
|
-
hint: 'Helper Text',
|
|
141
|
-
error: '',
|
|
142
|
-
success: '',
|
|
143
|
-
size: 'medium',
|
|
144
|
-
disabled: false,
|
|
145
|
-
},
|
|
146
|
-
play: async ({ canvasElement }) => {
|
|
147
|
-
const canvas = within(canvasElement);
|
|
148
|
-
await userEvent.click(canvas.getByText('Select an option'));
|
|
149
|
-
await expect(canvas.getByText('Option 1')).toBeVisible();
|
|
150
|
-
await expect(canvas.getByText('Option 2')).toBeVisible();
|
|
151
|
-
const select = document.querySelector('.dropin-picker__select');
|
|
152
|
-
await userEvent.selectOptions(select, 'option3');
|
|
153
|
-
await expect(select.textContent).toContain('Option 3');
|
|
154
|
-
},
|
|
155
|
-
};
|
|
156
|
-
export const CheckboxField = {
|
|
157
|
-
render: (args) => (<Field {...args}>
|
|
158
|
-
<Checkbox name="checkboxField" label="Option" description="Optional description text goes here"/>
|
|
159
|
-
</Field>),
|
|
160
|
-
args: {
|
|
161
|
-
label: 'Label',
|
|
162
|
-
hint: 'Helper Text',
|
|
163
|
-
error: '',
|
|
164
|
-
success: '',
|
|
165
|
-
size: 'medium',
|
|
166
|
-
disabled: false,
|
|
167
|
-
},
|
|
168
|
-
};
|
|
169
|
-
/**
|
|
170
|
-
* ```ts
|
|
171
|
-
* import { Field } from '@adobe/elsie/components/Field';
|
|
172
|
-
* import { TextSwatch } from '@adobe/elsie/components/TextSwatch';
|
|
173
|
-
* ```
|
|
174
|
-
*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Field.test.d.ts","sourceRoot":"","sources":["../../../src/components/Field/Field.test.tsx"],"names":[],"mappings":"AAAA,6DAA6D"}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/** https://preactjs.com/guide/v10/preact-testing-library/ */
|
|
2
|
-
import { render } from '@adobe/elsie/lib/tests';
|
|
3
|
-
import { Field } from '@adobe/elsie/components/Field';
|
|
4
|
-
import { Input } from '@adobe/elsie/components/Input';
|
|
5
|
-
describe('Base/Components/Field', () => {
|
|
6
|
-
test('renders', () => {
|
|
7
|
-
const { container } = render(<Field label="Label">
|
|
8
|
-
<Input name="foo"/>
|
|
9
|
-
</Field>);
|
|
10
|
-
const elem = container.querySelector('.dropin-field');
|
|
11
|
-
expect(!!elem).toEqual(true);
|
|
12
|
-
});
|
|
13
|
-
test('uses generated id as label "for" attribute value, if no id provided', () => {
|
|
14
|
-
const { container } = render(<Field label="Label">
|
|
15
|
-
<Input name="foo"/>
|
|
16
|
-
</Field>);
|
|
17
|
-
const input = container.querySelector('input');
|
|
18
|
-
const label = container.querySelector('.dropin-field__label');
|
|
19
|
-
expect(label?.getAttribute('for')).toEqual(input?.id);
|
|
20
|
-
});
|
|
21
|
-
test('uses child id as label "for" attribute value', () => {
|
|
22
|
-
const { container } = render(<Field label="Label">
|
|
23
|
-
<Input id="foo" name="foo"/>
|
|
24
|
-
</Field>);
|
|
25
|
-
const label = container.querySelector('.dropin-field__label');
|
|
26
|
-
expect(label?.getAttribute('for')).toEqual('foo');
|
|
27
|
-
});
|
|
28
|
-
test('shows error', () => {
|
|
29
|
-
const { container } = render(<Field label="Label" error="Oops!">
|
|
30
|
-
<Input name="foo"/>
|
|
31
|
-
</Field>);
|
|
32
|
-
const footer = container.querySelector('.dropin-field__hint');
|
|
33
|
-
expect(footer?.classList.contains('dropin-field__hint--error')).toEqual(true);
|
|
34
|
-
expect(footer?.textContent).toEqual('Oops!');
|
|
35
|
-
});
|
|
36
|
-
test('shows success', () => {
|
|
37
|
-
const { container } = render(<Field label="Label" success="Yay!">
|
|
38
|
-
<Input name="foo"/>
|
|
39
|
-
</Field>);
|
|
40
|
-
const footer = container.querySelector('.dropin-field__hint');
|
|
41
|
-
expect(footer?.classList.contains('dropin-field__hint--success')).toEqual(true);
|
|
42
|
-
expect(footer?.textContent).toEqual('Yay!');
|
|
43
|
-
});
|
|
44
|
-
test('shows hint', () => {
|
|
45
|
-
const { container } = render(<Field label="Label" hint="Howdy!">
|
|
46
|
-
<Input name="foo"/>
|
|
47
|
-
</Field>);
|
|
48
|
-
const hint = container.querySelector('.dropin-field__hint');
|
|
49
|
-
expect(hint?.classList.contains('dropin-field__hint')).toEqual(true);
|
|
50
|
-
expect(hint?.textContent).toEqual('Howdy!');
|
|
51
|
-
});
|
|
52
|
-
test('shows error over hint', () => {
|
|
53
|
-
const { container } = render(<Field label="Label" hint="Howdy!" error="Nope!">
|
|
54
|
-
<Input name="foo"/>
|
|
55
|
-
</Field>);
|
|
56
|
-
const footer = container.querySelector('.dropin-field__hint');
|
|
57
|
-
expect(footer?.classList.contains('dropin-field__hint--error')).toEqual(true);
|
|
58
|
-
expect(footer?.textContent).toEqual('Nope!');
|
|
59
|
-
});
|
|
60
|
-
test('shows success over hint', () => {
|
|
61
|
-
const { container } = render(<Field label="Label" hint="Howdy!" success="Yay!">
|
|
62
|
-
<Input name="foo"/>
|
|
63
|
-
</Field>);
|
|
64
|
-
const footer = container.querySelector('.dropin-field__hint');
|
|
65
|
-
expect(footer?.classList.contains('dropin-field__hint--success')).toEqual(true);
|
|
66
|
-
expect(footer?.textContent).toEqual('Yay!');
|
|
67
|
-
});
|
|
68
|
-
test('shows error over success', () => {
|
|
69
|
-
const { container } = render(<Field label="Label" success="Yay!" error="Nope!">
|
|
70
|
-
<Input name="foo"/>
|
|
71
|
-
</Field>);
|
|
72
|
-
const footer = container.querySelector('.dropin-field__hint');
|
|
73
|
-
expect(footer?.classList.contains('dropin-field__hint--error')).toEqual(true);
|
|
74
|
-
expect(footer?.textContent).toEqual('Nope!');
|
|
75
|
-
const input = container.querySelector('.dropin-input');
|
|
76
|
-
expect(input?.classList).toContain('dropin-input--error');
|
|
77
|
-
expect(input?.classList).not.toContain('dropin-input--success');
|
|
78
|
-
});
|
|
79
|
-
test('children as string returns empty', () => {
|
|
80
|
-
// @ts-ignore
|
|
81
|
-
const { container } = render(<Field label="Label">Howdy!</Field>);
|
|
82
|
-
const elem = container.querySelector('.dropin-field');
|
|
83
|
-
expect(elem?.querySelector('.dropin-field__content')?.innerHTML).toEqual('');
|
|
84
|
-
});
|
|
85
|
-
test('returns children', () => {
|
|
86
|
-
const { container } = render(<Field label="Label">
|
|
87
|
-
<Input name="foo"/>
|
|
88
|
-
</Field>);
|
|
89
|
-
expect(container?.querySelector('input')?.getAttribute('name')).toEqual(`foo`);
|
|
90
|
-
});
|
|
91
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Field/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@adobe/elsie/components/Field/Field';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { JSX, FunctionComponent } from 'preact';
|
|
2
|
-
import '@adobe/elsie/components/Icon/Icon.css';
|
|
3
|
-
export type IconType = keyof typeof import('@adobe/elsie/icons');
|
|
4
|
-
export interface IconProps extends Omit<JSX.SVGAttributes, 'size'> {
|
|
5
|
-
source: FunctionComponent<JSX.SVGAttributes<SVGElement>> | IconType;
|
|
6
|
-
size?: '12' | '16' | '24' | '32' | '64' | '80';
|
|
7
|
-
stroke?: '1' | '2' | '3' | '4';
|
|
8
|
-
className?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function Icon({ source: Source, size, stroke, viewBox, className, ...props }: IconProps): JSX.Element;
|
|
11
|
-
//# sourceMappingURL=Icon.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAIhD,OAAO,uCAAuC,CAAC;AAE/C,MAAM,MAAM,QAAQ,GAAG,MAAM,cAAc,oBAAoB,CAAC,CAAC;AAuCjE,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,MAAM,CAAC;IAChE,MAAM,EAAE,iBAAiB,CAAC,GAAG,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,GAAG,QAAQ,CAAC;IACpE,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC/C,MAAM,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,IAAI,CAAC,EACnB,MAAM,EAAE,MAAM,EACd,IAAW,EACX,MAAY,EACZ,OAAqB,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,SAAS,eAyBX"}
|
package/components/Icon/Icon.jsx
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { classes } from '@adobe/elsie/lib/classes';
|
|
2
|
-
import { lazy, Suspense } from 'preact/compat';
|
|
3
|
-
import '@adobe/elsie/components/Icon/Icon.css';
|
|
4
|
-
const lazyIcons = {
|
|
5
|
-
Add: lazy(() => import('@adobe/elsie/icons/Add.svg')),
|
|
6
|
-
Bulk: lazy(() => import('@adobe/elsie/icons/Bulk.svg')),
|
|
7
|
-
Burger: lazy(() => import('@adobe/elsie/icons/Burger.svg')),
|
|
8
|
-
Cart: lazy(() => import('@adobe/elsie/icons/Cart.svg')),
|
|
9
|
-
Check: lazy(() => import('@adobe/elsie/icons/Check.svg')),
|
|
10
|
-
ChevronDown: lazy(() => import('@adobe/elsie/icons/ChevronDown.svg')),
|
|
11
|
-
ChevronUp: lazy(() => import('@adobe/elsie/icons/ChevronUp.svg')),
|
|
12
|
-
ChevronRight: lazy(() => import('@adobe/elsie/icons/ChevronRight.svg')),
|
|
13
|
-
Close: lazy(() => import('@adobe/elsie/icons/Close.svg')),
|
|
14
|
-
Heart: lazy(() => import('@adobe/elsie/icons/Heart.svg')),
|
|
15
|
-
Minus: lazy(() => import('@adobe/elsie/icons/Minus.svg')),
|
|
16
|
-
Placeholder: lazy(() => import('@adobe/elsie/icons/Placeholder.svg')),
|
|
17
|
-
PlaceholderFilled: lazy(() => import('@adobe/elsie/icons/PlaceholderFilled.svg')),
|
|
18
|
-
Search: lazy(() => import('@adobe/elsie/icons/Search.svg')),
|
|
19
|
-
SearchFilled: lazy(() => import('@adobe/elsie/icons/SearchFilled.svg')),
|
|
20
|
-
Sort: lazy(() => import('@adobe/elsie/icons/Sort.svg')),
|
|
21
|
-
Star: lazy(() => import('@adobe/elsie/icons/Star.svg')),
|
|
22
|
-
View: lazy(() => import('@adobe/elsie/icons/View.svg')),
|
|
23
|
-
User: lazy(() => import('@adobe/elsie/icons/User.svg')),
|
|
24
|
-
Warning: lazy(() => import('@adobe/elsie/icons/Warning.svg')),
|
|
25
|
-
Locker: lazy(() => import('@adobe/elsie/icons/Locker.svg')),
|
|
26
|
-
Wallet: lazy(() => import('@adobe/elsie/icons/Wallet.svg')),
|
|
27
|
-
Card: lazy(() => import('@adobe/elsie/icons/Card.svg')),
|
|
28
|
-
Order: lazy(() => import('@adobe/elsie/icons/Order.svg')),
|
|
29
|
-
Delivery: lazy(() => import('@adobe/elsie/icons/Delivery.svg')),
|
|
30
|
-
OrderError: lazy(() => import('@adobe/elsie/icons/OrderError.svg')),
|
|
31
|
-
OrderSuccess: lazy(() => import('@adobe/elsie/icons/OrderSuccess.svg')),
|
|
32
|
-
PaymentError: lazy(() => import('@adobe/elsie/icons/PaymentError.svg')),
|
|
33
|
-
CheckWithCircle: lazy(() => import('@adobe/elsie/icons/CheckWithCircle.svg')),
|
|
34
|
-
WarningWithCircle: lazy(() => import('@adobe/elsie/icons/WarningWithCircle.svg')),
|
|
35
|
-
WarningFilled: lazy(() => import('@adobe/elsie/icons/WarningFilled.svg')),
|
|
36
|
-
InfoFilled: lazy(() => import('@adobe/elsie/icons/InfoFilled.svg')),
|
|
37
|
-
HeartFilled: lazy(() => import('@adobe/elsie/icons/HeartFilled.svg')),
|
|
38
|
-
Trash: lazy(() => import('@adobe/elsie/icons/Trash.svg')),
|
|
39
|
-
};
|
|
40
|
-
export function Icon({ source: Source, size = '24', stroke = '2', viewBox = '0 0 24 24', className, ...props }) {
|
|
41
|
-
const LazyIcon = typeof Source === 'string' ? lazyIcons[Source] : null;
|
|
42
|
-
const defaultProps = {
|
|
43
|
-
className: classes([
|
|
44
|
-
'dropin-icon',
|
|
45
|
-
`dropin-icon--shape-stroke-${stroke}`,
|
|
46
|
-
className,
|
|
47
|
-
]),
|
|
48
|
-
width: size,
|
|
49
|
-
height: size,
|
|
50
|
-
viewBox,
|
|
51
|
-
};
|
|
52
|
-
return (<Suspense fallback={null}>
|
|
53
|
-
{LazyIcon ? (<LazyIcon {...props} {...defaultProps}/>) : (
|
|
54
|
-
// @ts-ignore
|
|
55
|
-
<Source {...props} {...defaultProps}/>)}
|
|
56
|
-
</Suspense>);
|
|
57
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/preact';
|
|
2
|
-
import { IconProps } from '@adobe/elsie/components/Icon';
|
|
3
|
-
/**
|
|
4
|
-
* Use Icons as symbols or metaphors to communicate and enhance the user experience.
|
|
5
|
-
*/
|
|
6
|
-
declare const meta: Meta<IconProps>;
|
|
7
|
-
export default meta;
|
|
8
|
-
type Story = StoryObj<IconProps>;
|
|
9
|
-
/**
|
|
10
|
-
* ```ts
|
|
11
|
-
* import { Icon } from '@adobe/elsie/components/Icon';
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
export declare const Primary: Story;
|
|
15
|
-
export declare const Lazy: Story;
|
|
16
|
-
//# sourceMappingURL=Icon.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAQ,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAI/D;;GAEG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,SAAS,CAoBzB,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;AAEjC;;;;GAIG;AAEH,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KASlB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.stories.helpers.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.stories.helpers.jsx"],"names":[],"mappings":""}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as Icons from '@adobe/elsie/icons';
|
|
2
|
-
import { Icon } from './Icon';
|
|
3
|
-
const iconNames = Object.keys(Icons);
|
|
4
|
-
export const IconsList = iconNames.reduce((acc, name) => {
|
|
5
|
-
acc[name] = <Icon source={Icons[name]} size="24" stroke="1"/>;
|
|
6
|
-
return acc;
|
|
7
|
-
}, { none: null });
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Icon } from '@adobe/elsie/components/Icon';
|
|
2
|
-
import { Cart } from '@adobe/elsie/icons/index';
|
|
3
|
-
import * as Icons from '@adobe/elsie/icons';
|
|
4
|
-
/**
|
|
5
|
-
* Use Icons as symbols or metaphors to communicate and enhance the user experience.
|
|
6
|
-
*/
|
|
7
|
-
const meta = {
|
|
8
|
-
title: 'Components/Icon',
|
|
9
|
-
component: Icon,
|
|
10
|
-
argTypes: {
|
|
11
|
-
source: {
|
|
12
|
-
options: Object.keys(Icons),
|
|
13
|
-
mapping: Icons,
|
|
14
|
-
control: {
|
|
15
|
-
type: 'select',
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
size: {
|
|
19
|
-
control: 'select',
|
|
20
|
-
options: ['12', '16', '24', '32', '64', '80'],
|
|
21
|
-
},
|
|
22
|
-
stroke: {
|
|
23
|
-
control: 'select',
|
|
24
|
-
options: ['1', '2', '3', '4'],
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
export default meta;
|
|
29
|
-
/**
|
|
30
|
-
* ```ts
|
|
31
|
-
* import { Icon } from '@adobe/elsie/components/Icon';
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
export const Primary = {
|
|
35
|
-
args: {
|
|
36
|
-
source: Cart,
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
export const Lazy = {
|
|
40
|
-
argTypes: {
|
|
41
|
-
source: {
|
|
42
|
-
mapping: Object.keys(Icons),
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
args: {
|
|
46
|
-
source: 'Cart',
|
|
47
|
-
},
|
|
48
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.test.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.test.tsx"],"names":[],"mappings":"AAAA,6DAA6D"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/** https://preactjs.com/guide/v10/preact-testing-library/ */
|
|
2
|
-
import { render } from '@adobe/elsie/lib/tests';
|
|
3
|
-
import { Icon } from '@adobe/elsie/components/Icon';
|
|
4
|
-
// @ts-ignore
|
|
5
|
-
import Burger from '@adobe/elsie/icons/Burger.svg';
|
|
6
|
-
import * as icons from '@adobe/elsie/icons';
|
|
7
|
-
jest.mock('@adobe/elsie/icons/Icon.svg', () => {
|
|
8
|
-
return function TestIcon(props) {
|
|
9
|
-
return (<svg {...props} data-testid="icon">
|
|
10
|
-
Icon
|
|
11
|
-
</svg>);
|
|
12
|
-
};
|
|
13
|
-
});
|
|
14
|
-
describe('Foundations/Assets/Icon', () => {
|
|
15
|
-
test('renders', async () => {
|
|
16
|
-
const { findByTestId } = render(<Icon source={Burger}/>);
|
|
17
|
-
const icon = await findByTestId('icon');
|
|
18
|
-
expect(icon).toMatchInlineSnapshot(`
|
|
19
|
-
<svg
|
|
20
|
-
class="dropin-icon dropin-icon--shape-stroke-2"
|
|
21
|
-
data-testid="icon"
|
|
22
|
-
height="24"
|
|
23
|
-
viewBox="0 0 24 24"
|
|
24
|
-
width="24"
|
|
25
|
-
>
|
|
26
|
-
Icon
|
|
27
|
-
</svg>
|
|
28
|
-
`);
|
|
29
|
-
});
|
|
30
|
-
test('renders Icons with different size', async () => {
|
|
31
|
-
const size = '32';
|
|
32
|
-
const { findByTestId } = render(<Icon source={Burger} size={size}/>);
|
|
33
|
-
const icon = await findByTestId('icon');
|
|
34
|
-
expect(icon.getAttribute('width')).toEqual(size);
|
|
35
|
-
expect(icon.getAttribute('height')).toEqual(size);
|
|
36
|
-
});
|
|
37
|
-
test('renders Icons with stroke', async () => {
|
|
38
|
-
const stroke = '2';
|
|
39
|
-
const { findByTestId } = render(<Icon source={Burger} stroke={stroke}/>);
|
|
40
|
-
const icon = await findByTestId('icon');
|
|
41
|
-
expect(icon.classList).toMatchInlineSnapshot(`
|
|
42
|
-
DOMTokenList {
|
|
43
|
-
"0": "dropin-icon",
|
|
44
|
-
"1": "dropin-icon--shape-stroke-2",
|
|
45
|
-
}
|
|
46
|
-
`);
|
|
47
|
-
});
|
|
48
|
-
// Test lazy icons
|
|
49
|
-
for (const iconName of Object.keys(icons)) {
|
|
50
|
-
test(`renders ${iconName} Icon`, async () => {
|
|
51
|
-
// @ts-ignore
|
|
52
|
-
const { findByTestId } = render(<Icon source={iconName}/>);
|
|
53
|
-
const icon = await findByTestId('icon');
|
|
54
|
-
expect(icon).toMatchInlineSnapshot(`
|
|
55
|
-
<svg
|
|
56
|
-
class="dropin-icon dropin-icon--shape-stroke-2"
|
|
57
|
-
data-testid="icon"
|
|
58
|
-
height="24"
|
|
59
|
-
viewBox="0 0 24 24"
|
|
60
|
-
width="24"
|
|
61
|
-
>
|
|
62
|
-
Icon
|
|
63
|
-
</svg>
|
|
64
|
-
`);
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC"}
|
package/components/Icon/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@adobe/elsie/components/Icon/Icon';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, VNode } from 'preact';
|
|
2
|
-
import { HTMLAttributes } from 'preact/compat';
|
|
3
|
-
import '@adobe/elsie/components/IllustratedMessage/IllustratedMessage.css';
|
|
4
|
-
export interface IllustratedMessageProps extends Omit<HTMLAttributes<HTMLDivElement>, 'icon' | 'action'> {
|
|
5
|
-
icon?: VNode<HTMLAttributes<SVGSVGElement>>;
|
|
6
|
-
heading?: string;
|
|
7
|
-
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
8
|
-
message?: VNode<HTMLAttributes<HTMLElement>>;
|
|
9
|
-
action?: VNode;
|
|
10
|
-
variant?: 'primary' | 'secondary';
|
|
11
|
-
}
|
|
12
|
-
export declare const IllustratedMessage: FunctionComponent<IllustratedMessageProps>;
|
|
13
|
-
//# sourceMappingURL=IllustratedMessage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IllustratedMessage.d.ts","sourceRoot":"","sources":["../../../src/components/IllustratedMessage/IllustratedMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,cAAc,EAAO,MAAM,eAAe,CAAC;AAEpD,OAAO,mEAAmE,CAAC;AAG3E,MAAM,WAAW,uBACf,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC/D,IAAI,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC,CAAC;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC;IAC7C,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;CACnC;AAED,eAAO,MAAM,kBAAkB,EAAE,iBAAiB,CAAC,uBAAuB,CAoDzE,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { classes, VComponent } from '@adobe/elsie/lib';
|
|
2
|
-
import '@adobe/elsie/components/IllustratedMessage/IllustratedMessage.css';
|
|
3
|
-
import { Card } from '@adobe/elsie/components';
|
|
4
|
-
export const IllustratedMessage = ({ className, icon, heading, headingLevel = 2, message, action, variant = 'secondary', ...props }) => {
|
|
5
|
-
const Heading = headingLevel >= 1 && headingLevel <= 6
|
|
6
|
-
? `h${headingLevel}`
|
|
7
|
-
: 'h2';
|
|
8
|
-
return (<div {...props} className={classes(['dropin-illustrated-message', className])}>
|
|
9
|
-
<Card variant={variant}>
|
|
10
|
-
{icon && (<VComponent node={icon} aria-hidden="true" size="80" className="dropin-illustrated-message__icon"/>)}
|
|
11
|
-
|
|
12
|
-
{heading && (<Heading className="dropin-illustrated-message__heading">
|
|
13
|
-
{heading}
|
|
14
|
-
</Heading>)}
|
|
15
|
-
|
|
16
|
-
{message && (<VComponent node={message} className="dropin-illustrated-message__message"/>)}
|
|
17
|
-
|
|
18
|
-
{action && (<VComponent node={action} className="dropin-illustrated-message__action"/>)}
|
|
19
|
-
</Card>
|
|
20
|
-
</div>);
|
|
21
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/preact';
|
|
2
|
-
import { IllustratedMessageProps } from '@adobe/elsie/components/IllustratedMessage';
|
|
3
|
-
/**
|
|
4
|
-
* Use IllustratedMessages to display an illustration and a message, usually for an empty state or an error page.
|
|
5
|
-
*/
|
|
6
|
-
declare const meta: Meta<IllustratedMessageProps>;
|
|
7
|
-
export default meta;
|
|
8
|
-
type Story = StoryObj<IllustratedMessageProps>;
|
|
9
|
-
export declare const IllustratedMessage: Story;
|
|
10
|
-
//# sourceMappingURL=IllustratedMessage.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IllustratedMessage.stories.d.ts","sourceRoot":"","sources":["../../../src/components/IllustratedMessage/IllustratedMessage.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAEL,uBAAuB,EACxB,MAAM,4CAA4C,CAAC;AAMpD;;GAEG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,uBAAuB,CA4DvC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,uBAAuB,CAAC,CAAC;AAE/C,eAAO,MAAM,kBAAkB,EAAE,KAoChC,CAAC"}
|