@dropins/tools 0.21.2-alpha3 → 0.22.0-alpha1
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 -64
- 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 -81
- package/lib/initializer.d.ts.map +0 -1
- package/lib/initializer.js +0 -96
- 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,206 +0,0 @@
|
|
|
1
|
-
import { within } from '@storybook/testing-library';
|
|
2
|
-
import { expect } from '@storybook/jest';
|
|
3
|
-
import { action } from '@storybook/addon-actions';
|
|
4
|
-
import { ImageSwatch, } from '@adobe/elsie/components/ImageSwatch';
|
|
5
|
-
const defaultWidth = 200;
|
|
6
|
-
const defaultHeight = 200;
|
|
7
|
-
/**
|
|
8
|
-
* Use Image Swatches to display thumbnails of photos or illustrations.
|
|
9
|
-
*/
|
|
10
|
-
const meta = {
|
|
11
|
-
title: 'Components/ImageSwatch',
|
|
12
|
-
component: ImageSwatch,
|
|
13
|
-
argTypes: {
|
|
14
|
-
name: {
|
|
15
|
-
description: 'Field name (used for mapping the value in a form)',
|
|
16
|
-
type: {
|
|
17
|
-
required: false,
|
|
18
|
-
name: 'string',
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
label: {
|
|
22
|
-
description: 'Field label',
|
|
23
|
-
type: {
|
|
24
|
-
required: true,
|
|
25
|
-
name: 'string',
|
|
26
|
-
},
|
|
27
|
-
groupAriaLabel: {
|
|
28
|
-
description: 'Label name for the swatch group',
|
|
29
|
-
type: {
|
|
30
|
-
required: true,
|
|
31
|
-
name: 'string',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
id: {
|
|
36
|
-
description: 'Field id',
|
|
37
|
-
type: {
|
|
38
|
-
required: false,
|
|
39
|
-
name: 'string',
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
alt: {
|
|
43
|
-
description: 'Alt Text',
|
|
44
|
-
type: {
|
|
45
|
-
required: false,
|
|
46
|
-
name: 'string',
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
value: {
|
|
50
|
-
description: 'Field value',
|
|
51
|
-
type: {
|
|
52
|
-
required: false,
|
|
53
|
-
name: 'string',
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
disabled: {
|
|
57
|
-
description: 'ImageSwatch disabled',
|
|
58
|
-
type: {
|
|
59
|
-
required: false,
|
|
60
|
-
name: 'boolean',
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
selected: {
|
|
64
|
-
description: 'ImageSwatch active',
|
|
65
|
-
type: {
|
|
66
|
-
required: false,
|
|
67
|
-
name: 'boolean',
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
multi: {
|
|
71
|
-
description: 'ImageSwatch multi',
|
|
72
|
-
type: {
|
|
73
|
-
required: false,
|
|
74
|
-
name: 'boolean',
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
src: {
|
|
78
|
-
description: 'Image path',
|
|
79
|
-
type: {
|
|
80
|
-
required: true,
|
|
81
|
-
name: 'string',
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
};
|
|
86
|
-
export default meta;
|
|
87
|
-
/**
|
|
88
|
-
* ```ts
|
|
89
|
-
* import { ImageSwatch } from '@adobe/elsie/components/ImageSwatch';
|
|
90
|
-
* ```
|
|
91
|
-
*/
|
|
92
|
-
export const DefaultImageSwatch = {
|
|
93
|
-
args: {
|
|
94
|
-
name: 'imageSwatchField',
|
|
95
|
-
id: 'imageSwatch1',
|
|
96
|
-
label: 'imageSwatch1Example',
|
|
97
|
-
groupAriaLabel: 'Image Swatches',
|
|
98
|
-
value: 'imageSwatchExample',
|
|
99
|
-
src: `https://picsum.photos/${defaultWidth}/${defaultHeight}`,
|
|
100
|
-
alt: 'Some alternative text',
|
|
101
|
-
selected: false,
|
|
102
|
-
disabled: false,
|
|
103
|
-
outOfStock: false,
|
|
104
|
-
onValue: action('onValue'),
|
|
105
|
-
},
|
|
106
|
-
play: async ({ canvasElement }) => {
|
|
107
|
-
const canvas = within(canvasElement);
|
|
108
|
-
const imageSwatch = await canvas.findByRole('radio');
|
|
109
|
-
const spanElement = document.querySelector('.dropin-image-swatch__span');
|
|
110
|
-
expect(spanElement).toBeVisible();
|
|
111
|
-
await expect(imageSwatch).not.toBeChecked();
|
|
112
|
-
},
|
|
113
|
-
};
|
|
114
|
-
export const ImageSwatchSelected = {
|
|
115
|
-
args: {
|
|
116
|
-
name: 'imageSwatchField',
|
|
117
|
-
id: 'imageSwatch1',
|
|
118
|
-
label: 'imageSwatch1Example',
|
|
119
|
-
groupAriaLabel: 'Image Swatches',
|
|
120
|
-
value: 'imageSwatchExample',
|
|
121
|
-
src: `https://picsum.photos/400/400`,
|
|
122
|
-
alt: 'imageSwatch1Example',
|
|
123
|
-
selected: true,
|
|
124
|
-
disabled: false,
|
|
125
|
-
outOfStock: false,
|
|
126
|
-
onValue: action('onValue'),
|
|
127
|
-
},
|
|
128
|
-
play: async ({ canvasElement }) => {
|
|
129
|
-
const canvas = within(canvasElement);
|
|
130
|
-
const imageSwatch = await canvas.findByRole('radio');
|
|
131
|
-
const spanElement = document.querySelector('.dropin-image-swatch__span');
|
|
132
|
-
expect(spanElement).toBeVisible();
|
|
133
|
-
await expect(imageSwatch).toBeChecked();
|
|
134
|
-
await expect(canvas.getByLabelText('Image Swatches: imageSwatch1Example swatch selected')).toBeChecked();
|
|
135
|
-
},
|
|
136
|
-
};
|
|
137
|
-
export const ImageSwatchDisabled = {
|
|
138
|
-
args: {
|
|
139
|
-
name: 'imageSwatchField',
|
|
140
|
-
id: 'imageSwatch1',
|
|
141
|
-
label: 'imageSwatch1Example',
|
|
142
|
-
groupAriaLabel: 'Image Swatches',
|
|
143
|
-
value: 'imageSwatchExample',
|
|
144
|
-
src: `https://picsum.photos/${defaultWidth}/${defaultHeight}`,
|
|
145
|
-
alt: 'Some alternative text',
|
|
146
|
-
selected: false,
|
|
147
|
-
disabled: true,
|
|
148
|
-
outOfStock: false,
|
|
149
|
-
onValue: action('onValue'),
|
|
150
|
-
},
|
|
151
|
-
play: async ({ canvasElement }) => {
|
|
152
|
-
const canvas = within(canvasElement);
|
|
153
|
-
await expect(await canvas.findByRole('radio')).toBeDisabled();
|
|
154
|
-
},
|
|
155
|
-
};
|
|
156
|
-
export const OutOfStockImageSwatch = {
|
|
157
|
-
args: {
|
|
158
|
-
name: 'imageSwatchField',
|
|
159
|
-
id: 'imageSwatch1',
|
|
160
|
-
label: 'imageSwatch1Example',
|
|
161
|
-
groupAriaLabel: 'Image Swatches',
|
|
162
|
-
value: 'imageSwatchExample',
|
|
163
|
-
src: `https://picsum.photos/${defaultWidth}/${defaultHeight}`,
|
|
164
|
-
alt: 'Some alternative text',
|
|
165
|
-
selected: false,
|
|
166
|
-
disabled: false,
|
|
167
|
-
outOfStock: true,
|
|
168
|
-
onValue: action('onValue'),
|
|
169
|
-
},
|
|
170
|
-
};
|
|
171
|
-
export const SelectedOutOfStockImageSwatch = {
|
|
172
|
-
args: {
|
|
173
|
-
name: 'imageSwatchField',
|
|
174
|
-
id: 'imageSwatch1',
|
|
175
|
-
label: 'imageSwatch1Example',
|
|
176
|
-
groupAriaLabel: 'Image Swatches',
|
|
177
|
-
value: 'imageSwatchExample',
|
|
178
|
-
src: `https://picsum.photos/${defaultWidth}/${defaultHeight}`,
|
|
179
|
-
alt: 'Some alternative text',
|
|
180
|
-
selected: true,
|
|
181
|
-
disabled: false,
|
|
182
|
-
outOfStock: true,
|
|
183
|
-
onValue: action('onValue'),
|
|
184
|
-
'aria-label': 'image swatch example',
|
|
185
|
-
},
|
|
186
|
-
};
|
|
187
|
-
export const MultiImageSwatch = {
|
|
188
|
-
args: {
|
|
189
|
-
name: 'imageSwatchField',
|
|
190
|
-
id: 'imageSwatch1',
|
|
191
|
-
value: 'imageSwatchExample',
|
|
192
|
-
src: `https://picsum.photos/${defaultWidth}/${defaultHeight}`,
|
|
193
|
-
alt: 'Some alternative text',
|
|
194
|
-
selected: false,
|
|
195
|
-
disabled: false,
|
|
196
|
-
outOfStock: false,
|
|
197
|
-
multi: true,
|
|
198
|
-
onValue: action('onValue'),
|
|
199
|
-
'aria-label': 'image swatch example',
|
|
200
|
-
},
|
|
201
|
-
render: (args) => (<div style="display: flex; flex-wrap:wrap; gap: 25px">
|
|
202
|
-
<ImageSwatch {...args} id={'imageSwatch1'} value={'image1'}/>
|
|
203
|
-
<ImageSwatch {...args} id={'imageSwatch2'} value={'image2'}/>
|
|
204
|
-
<ImageSwatch {...args} id={'imageSwatch3'} value={'image1'}/>
|
|
205
|
-
</div>),
|
|
206
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ImageSwatch.test.d.ts","sourceRoot":"","sources":["../../../src/components/ImageSwatch/ImageSwatch.test.tsx"],"names":[],"mappings":"AAAA,6DAA6D;AAM7D,OAAO,2BAA2B,CAAC"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/** https://preactjs.com/guide/v10/preact-testing-library/ */
|
|
2
|
-
import { render, fireEvent, waitFor, screen } from '@adobe/elsie/lib/tests';
|
|
3
|
-
import { ImageSwatch } from '@adobe/elsie/components/ImageSwatch';
|
|
4
|
-
import { Image } from '@adobe/elsie/components/Image';
|
|
5
|
-
import '@testing-library/jest-dom';
|
|
6
|
-
describe('Base/Components/ImageSwatch', () => {
|
|
7
|
-
test('renders', () => {
|
|
8
|
-
const { container } = render(<ImageSwatch name="imageSwatchField" id="imageSwatchExample" src="https://picsum.photos/20/20" value="imageExample"/>);
|
|
9
|
-
expect(!!container).toEqual(true);
|
|
10
|
-
});
|
|
11
|
-
});
|
|
12
|
-
test('Does not break when onValue() is not provided', () => {
|
|
13
|
-
const { container } = render(<ImageSwatch name="imageSwatchField" id="imageSwatchExample" src="https://picsum.photos/20/20" value="imageExample"/>);
|
|
14
|
-
const imageSwatch = container.querySelector('.dropin-image-swatch');
|
|
15
|
-
fireEvent.click(imageSwatch);
|
|
16
|
-
expect(!!container).toEqual(true);
|
|
17
|
-
});
|
|
18
|
-
test('Calls onUpdateError() when onValue() returns a rejected promise', async () => {
|
|
19
|
-
const mockFn = jest.fn(() => {
|
|
20
|
-
throw new Error('Mock error!');
|
|
21
|
-
});
|
|
22
|
-
const { container } = render(<ImageSwatch name="imageSwatchField" id="imageSwatchExample" src="https://picsum.photos/20/20" value="imageExample" onValue={mockFn}/>);
|
|
23
|
-
const imageSwatch = container.querySelector('.dropin-image-swatch');
|
|
24
|
-
fireEvent.click(imageSwatch);
|
|
25
|
-
await waitFor(() => expect(mockFn).toHaveBeenCalled());
|
|
26
|
-
});
|
|
27
|
-
test('Calls onUpdateError() when onValue() throws an error', async () => {
|
|
28
|
-
const mockFn = jest.fn();
|
|
29
|
-
const mockError = new Error('onValue() error');
|
|
30
|
-
const { container } = render(<ImageSwatch name="imageSwatchField" id="imageSwatchExample" src="https://picsum.photos/20/20" value="imageExample" onValue={() => {
|
|
31
|
-
throw mockError;
|
|
32
|
-
}} onUpdateError={mockFn}/>);
|
|
33
|
-
const imageSwatch = container.querySelector('.dropin-image-swatch');
|
|
34
|
-
fireEvent.click(imageSwatch);
|
|
35
|
-
await waitFor(() => expect(mockFn).toHaveBeenCalled());
|
|
36
|
-
await waitFor(() => expect(mockFn).toHaveBeenCalledWith(mockError));
|
|
37
|
-
});
|
|
38
|
-
test('Calls onError() when src throws an error', () => {
|
|
39
|
-
const onError = jest.fn();
|
|
40
|
-
render(<Image alt="test" src="crap.junk" onError={onError}/>);
|
|
41
|
-
fireEvent.error(screen.getByAltText('test'));
|
|
42
|
-
expect(onError).toHaveBeenCalled();
|
|
43
|
-
});
|
|
44
|
-
test('Hides the image when src throws an error', () => {
|
|
45
|
-
const { getByRole } = render(<ImageSwatch src="broken-url.jpg"/>);
|
|
46
|
-
const img = getByRole('img');
|
|
47
|
-
img.dispatchEvent(new Event('error'));
|
|
48
|
-
expect(img).toHaveStyle('display: none');
|
|
49
|
-
});
|
|
50
|
-
test('Renders out of stock swatch when outOfStock is true', () => {
|
|
51
|
-
const { container } = render(<ImageSwatch name="imageSwatchField" id="imageSwatchExample" src="https://picsum.photos/20/20" label="imageExample" value="imageExample" outOfStock/>);
|
|
52
|
-
const imageSwatch = container.querySelector('.dropin-image-swatch__span');
|
|
53
|
-
expect(imageSwatch).toHaveClass('dropin-image-swatch__span--out-of-stock');
|
|
54
|
-
});
|
|
55
|
-
test('Renders selected swatch when selected is true', () => {
|
|
56
|
-
const { container } = render(<ImageSwatch name="imageSwatchField" id="imageSwatchExample" src="https://picsum.photos/20/20" label="imageExample" value="imageExample" selected/>);
|
|
57
|
-
const imageSwatch = container.querySelector('.dropin-image-swatch');
|
|
58
|
-
expect(imageSwatch).toHaveClass('dropin-image-swatch--selected');
|
|
59
|
-
});
|
|
60
|
-
test('Renders swatch when multi prop is true', () => {
|
|
61
|
-
const { container } = render(<ImageSwatch name="imageSwatchField" id="imageSwatchExample" src="https://picsum.photos/20/20" value="imageExample" multi={true}/>);
|
|
62
|
-
const imageSwatch = container.querySelector('.dropin-image-swatch');
|
|
63
|
-
expect(imageSwatch.type === 'checkbox').toEqual(true);
|
|
64
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ImageSwatch/index.ts"],"names":[],"mappings":"AAAA,cAAc,iDAAiD,CAAC;AAChE,OAAO,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,iDAAiD,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, VNode } from 'preact';
|
|
2
|
-
import { HTMLAttributes } from 'preact/compat';
|
|
3
|
-
import '@adobe/elsie/components/InLineAlert/InLineAlert.css';
|
|
4
|
-
export interface InLineAlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'icon'> {
|
|
5
|
-
heading: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
type?: 'error' | 'warning' | 'success';
|
|
8
|
-
icon?: VNode<HTMLAttributes<SVGSVGElement>>;
|
|
9
|
-
additionalActions?: Array<{
|
|
10
|
-
label: string;
|
|
11
|
-
onClick: (event: Event) => void;
|
|
12
|
-
}>;
|
|
13
|
-
onDismiss?: (event: Event) => void;
|
|
14
|
-
}
|
|
15
|
-
export declare const InLineAlert: FunctionComponent<InLineAlertProps>;
|
|
16
|
-
//# sourceMappingURL=InLineAlert.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InLineAlert.d.ts","sourceRoot":"","sources":["../../../src/components/InLineAlert/InLineAlert.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,qDAAqD,CAAC;AAC7D,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;IACvC,IAAI,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC,CAAC;IAC5C,iBAAiB,CAAC,EAAE,KAAK,CAAC;QACxB,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;KACjC,CAAC,CAAC;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACpC;AAED,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,gBAAgB,CA2E3D,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Button, Icon } from '@adobe/elsie/components';
|
|
2
|
-
import { useText } from '@adobe/elsie/i18n';
|
|
3
|
-
import { Close } from '@adobe/elsie/icons';
|
|
4
|
-
import { VComponent, classes } from '@adobe/elsie/lib';
|
|
5
|
-
import '@adobe/elsie/components/InLineAlert/InLineAlert.css';
|
|
6
|
-
export const InLineAlert = ({ className, type = 'warning', additionalActions, onDismiss, heading, description, icon, ...props }) => {
|
|
7
|
-
const translations = useText({
|
|
8
|
-
dismiss: 'Dropin.InlineAlert.dismissLabel',
|
|
9
|
-
});
|
|
10
|
-
return (<div {...props} className={classes([
|
|
11
|
-
'dropin-in-line-alert',
|
|
12
|
-
`dropin-in-line-alert--${type}`,
|
|
13
|
-
className,
|
|
14
|
-
])}>
|
|
15
|
-
<div className={'dropin-in-line-alert__heading'}>
|
|
16
|
-
<div className={'dropin-in-line-alert__title-container'}>
|
|
17
|
-
{icon && (<VComponent node={icon} className={'dropin-in-line-alert__icon'}/>)}
|
|
18
|
-
|
|
19
|
-
<span className={'dropin-in-line-alert__title'}>{heading}</span>
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
|
-
<div className={'dropin-in-line-alert__actions-container'}>
|
|
23
|
-
{additionalActions?.length == 1 && (<Button variant="tertiary" className={'dropin-in-line-alert__additional-action'} onClick={additionalActions[0]?.onClick} aria-label={additionalActions[0]?.label}>
|
|
24
|
-
{additionalActions[0]?.label}
|
|
25
|
-
</Button>)}
|
|
26
|
-
{onDismiss && (<Button icon={<Icon source={Close} size="24" stroke="2"/>} className={'dropin-in-line-alert__dismiss-button'} variant="tertiary" onClick={onDismiss} aria-label={translations.dismiss}/>)}
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
{description && (<p className={'dropin-in-line-alert__description'}>{description}</p>)}
|
|
31
|
-
|
|
32
|
-
{additionalActions && additionalActions?.length > 1 && (<div className={'dropin-in-line-alert__additional-actions-container'}>
|
|
33
|
-
{additionalActions.map((action) => (<Button key={action.label} variant="tertiary" className={'dropin-in-line-alert__additional-action'} onClick={action.onClick}>
|
|
34
|
-
{action.label}
|
|
35
|
-
</Button>))}
|
|
36
|
-
</div>)}
|
|
37
|
-
</div>);
|
|
38
|
-
};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/preact';
|
|
2
|
-
import { InLineAlertProps } from '@adobe/elsie/components/InLineAlert';
|
|
3
|
-
/**
|
|
4
|
-
* Use Inline Alerts to display messages or warnings to the user.
|
|
5
|
-
*/
|
|
6
|
-
declare const meta: Meta<InLineAlertProps>;
|
|
7
|
-
export default meta;
|
|
8
|
-
type Story = StoryObj<InLineAlertProps>;
|
|
9
|
-
/**
|
|
10
|
-
* ```ts
|
|
11
|
-
* import { InLineAlert } from '@adobe/elsie/components/InLineAlert';
|
|
12
|
-
* ```
|
|
13
|
-
* ```tsx
|
|
14
|
-
* <InLineAlert
|
|
15
|
-
* heading="In Line Alert heading"
|
|
16
|
-
* description="Description of the In Line Alert"
|
|
17
|
-
* variant="warning"
|
|
18
|
-
* additionalActions={[
|
|
19
|
-
* {
|
|
20
|
-
* label: 'Action 1',
|
|
21
|
-
* onClick: ()=>{},
|
|
22
|
-
* },
|
|
23
|
-
* ]}
|
|
24
|
-
* />
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
export declare const InLineAlert: Story;
|
|
28
|
-
/**
|
|
29
|
-
* You can create the small variant by skipping the description prop.
|
|
30
|
-
*
|
|
31
|
-
* ```tsx
|
|
32
|
-
* <InLineAlert
|
|
33
|
-
* heading="In Line Alert heading"
|
|
34
|
-
* variant="success"
|
|
35
|
-
* additionalActions={[
|
|
36
|
-
* {
|
|
37
|
-
* label: 'Action',
|
|
38
|
-
* onClick: ()=>{},
|
|
39
|
-
* },
|
|
40
|
-
* ]}
|
|
41
|
-
* />
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
export declare const InLineAlertSmall: Story;
|
|
45
|
-
/**
|
|
46
|
-
* You can create the medium variant by including the description prop.
|
|
47
|
-
*
|
|
48
|
-
* ```tsx
|
|
49
|
-
* <InLineAlert
|
|
50
|
-
* heading="In Line Alert heading"
|
|
51
|
-
* description="Description of the In Line Alert"
|
|
52
|
-
* variant="error"
|
|
53
|
-
* additionalActions={[
|
|
54
|
-
* {
|
|
55
|
-
* label: 'Action',
|
|
56
|
-
* onClick: ()=>{},
|
|
57
|
-
* },
|
|
58
|
-
* ]}
|
|
59
|
-
* />
|
|
60
|
-
* ```
|
|
61
|
-
*/
|
|
62
|
-
export declare const InLineAlertMedium: Story;
|
|
63
|
-
/**
|
|
64
|
-
* You can create the large variant by including more than one additional actions.
|
|
65
|
-
*
|
|
66
|
-
* ```tsx
|
|
67
|
-
* <InLineAlert
|
|
68
|
-
* heading="In Line Alert heading"
|
|
69
|
-
* description="Description of the In Line Alert"
|
|
70
|
-
* variant="warning"
|
|
71
|
-
* additionalActions={[
|
|
72
|
-
* {
|
|
73
|
-
* label: 'Action 1',
|
|
74
|
-
* onClick: ()=>{},
|
|
75
|
-
* },
|
|
76
|
-
* {
|
|
77
|
-
* label: 'Action 2',
|
|
78
|
-
* onClick: ()=>{},
|
|
79
|
-
* },
|
|
80
|
-
* ]}
|
|
81
|
-
* />
|
|
82
|
-
* ```
|
|
83
|
-
*/
|
|
84
|
-
export declare const InLineAlertLarge: Story;
|
|
85
|
-
export declare const NoDismiss: Story;
|
|
86
|
-
//# sourceMappingURL=InLineAlert.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InLineAlert.stories.d.ts","sourceRoot":"","sources":["../../../src/components/InLineAlert/InLineAlert.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAEL,gBAAgB,EACjB,MAAM,qCAAqC,CAAC;AAI7C;;GAEG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAuChC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAExC;;;;;;;;;;;;;;;;;GAiBG;AAEH,eAAO,MAAM,WAAW,EAAE,KAczB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAa9B,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAc/B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAkB9B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAavB,CAAC"}
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
import { InLineAlert as component, } from '@adobe/elsie/components/InLineAlert';
|
|
2
|
-
import { action } from '@storybook/addon-actions';
|
|
3
|
-
import { IconsList } from '@adobe/elsie/components/Icon/Icon.stories.helpers';
|
|
4
|
-
/**
|
|
5
|
-
* Use Inline Alerts to display messages or warnings to the user.
|
|
6
|
-
*/
|
|
7
|
-
const meta = {
|
|
8
|
-
title: 'Components/InLineAlert',
|
|
9
|
-
component,
|
|
10
|
-
argTypes: {
|
|
11
|
-
heading: {
|
|
12
|
-
description: 'Heading message',
|
|
13
|
-
type: { name: 'string', required: true },
|
|
14
|
-
},
|
|
15
|
-
description: {
|
|
16
|
-
description: 'Alert description',
|
|
17
|
-
type: { name: 'string', required: false },
|
|
18
|
-
},
|
|
19
|
-
type: {
|
|
20
|
-
description: 'Alert variant type (determines the border color).<br/>`"error"` | `"warning"` | `"success"`',
|
|
21
|
-
defaultValue: { summary: 'warning' },
|
|
22
|
-
type: { name: 'string', required: false },
|
|
23
|
-
options: ['error', 'warning', 'success'],
|
|
24
|
-
control: 'radio',
|
|
25
|
-
},
|
|
26
|
-
onDismiss: {
|
|
27
|
-
description: 'When set, the component renders a dismiss button and calls this function when clicked',
|
|
28
|
-
type: { name: 'function', required: false },
|
|
29
|
-
control: { disable: true },
|
|
30
|
-
action: 'Dismiss clicked',
|
|
31
|
-
},
|
|
32
|
-
additionalActions: {
|
|
33
|
-
description: 'An array of additional action objects that must contain `label` and `onClick()` properties',
|
|
34
|
-
},
|
|
35
|
-
icon: {
|
|
36
|
-
description: 'Icon `(FunctionComponent)`',
|
|
37
|
-
type: { name: 'symbol' },
|
|
38
|
-
options: Object.keys(IconsList),
|
|
39
|
-
mapping: IconsList,
|
|
40
|
-
control: 'select',
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
export default meta;
|
|
45
|
-
/**
|
|
46
|
-
* ```ts
|
|
47
|
-
* import { InLineAlert } from '@adobe/elsie/components/InLineAlert';
|
|
48
|
-
* ```
|
|
49
|
-
* ```tsx
|
|
50
|
-
* <InLineAlert
|
|
51
|
-
* heading="In Line Alert heading"
|
|
52
|
-
* description="Description of the In Line Alert"
|
|
53
|
-
* variant="warning"
|
|
54
|
-
* additionalActions={[
|
|
55
|
-
* {
|
|
56
|
-
* label: 'Action 1',
|
|
57
|
-
* onClick: ()=>{},
|
|
58
|
-
* },
|
|
59
|
-
* ]}
|
|
60
|
-
* />
|
|
61
|
-
* ```
|
|
62
|
-
*/
|
|
63
|
-
export const InLineAlert = {
|
|
64
|
-
args: {
|
|
65
|
-
heading: 'In Line Alert heading',
|
|
66
|
-
description: 'Description of the In Line Alert',
|
|
67
|
-
type: 'warning',
|
|
68
|
-
//@ts-ignore
|
|
69
|
-
icon: IconsList.WarningFilled,
|
|
70
|
-
additionalActions: [
|
|
71
|
-
{
|
|
72
|
-
label: 'Action',
|
|
73
|
-
onClick: action('Action clicked'),
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
},
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* You can create the small variant by skipping the description prop.
|
|
80
|
-
*
|
|
81
|
-
* ```tsx
|
|
82
|
-
* <InLineAlert
|
|
83
|
-
* heading="In Line Alert heading"
|
|
84
|
-
* variant="success"
|
|
85
|
-
* additionalActions={[
|
|
86
|
-
* {
|
|
87
|
-
* label: 'Action',
|
|
88
|
-
* onClick: ()=>{},
|
|
89
|
-
* },
|
|
90
|
-
* ]}
|
|
91
|
-
* />
|
|
92
|
-
* ```
|
|
93
|
-
*/
|
|
94
|
-
export const InLineAlertSmall = {
|
|
95
|
-
args: {
|
|
96
|
-
heading: 'In Line Alert heading',
|
|
97
|
-
type: 'success',
|
|
98
|
-
//@ts-ignore
|
|
99
|
-
icon: IconsList.CheckWithCircle,
|
|
100
|
-
additionalActions: [
|
|
101
|
-
{
|
|
102
|
-
label: 'Action',
|
|
103
|
-
onClick: action('Action clicked'),
|
|
104
|
-
},
|
|
105
|
-
],
|
|
106
|
-
},
|
|
107
|
-
};
|
|
108
|
-
/**
|
|
109
|
-
* You can create the medium variant by including the description prop.
|
|
110
|
-
*
|
|
111
|
-
* ```tsx
|
|
112
|
-
* <InLineAlert
|
|
113
|
-
* heading="In Line Alert heading"
|
|
114
|
-
* description="Description of the In Line Alert"
|
|
115
|
-
* variant="error"
|
|
116
|
-
* additionalActions={[
|
|
117
|
-
* {
|
|
118
|
-
* label: 'Action',
|
|
119
|
-
* onClick: ()=>{},
|
|
120
|
-
* },
|
|
121
|
-
* ]}
|
|
122
|
-
* />
|
|
123
|
-
* ```
|
|
124
|
-
*/
|
|
125
|
-
export const InLineAlertMedium = {
|
|
126
|
-
args: {
|
|
127
|
-
heading: 'In Line Alert heading',
|
|
128
|
-
description: 'Description of the In Line Alert',
|
|
129
|
-
type: 'error',
|
|
130
|
-
//@ts-ignore
|
|
131
|
-
icon: IconsList.WarningFilled,
|
|
132
|
-
additionalActions: [
|
|
133
|
-
{
|
|
134
|
-
label: 'Action',
|
|
135
|
-
onClick: action('Action clicked'),
|
|
136
|
-
},
|
|
137
|
-
],
|
|
138
|
-
},
|
|
139
|
-
};
|
|
140
|
-
/**
|
|
141
|
-
* You can create the large variant by including more than one additional actions.
|
|
142
|
-
*
|
|
143
|
-
* ```tsx
|
|
144
|
-
* <InLineAlert
|
|
145
|
-
* heading="In Line Alert heading"
|
|
146
|
-
* description="Description of the In Line Alert"
|
|
147
|
-
* variant="warning"
|
|
148
|
-
* additionalActions={[
|
|
149
|
-
* {
|
|
150
|
-
* label: 'Action 1',
|
|
151
|
-
* onClick: ()=>{},
|
|
152
|
-
* },
|
|
153
|
-
* {
|
|
154
|
-
* label: 'Action 2',
|
|
155
|
-
* onClick: ()=>{},
|
|
156
|
-
* },
|
|
157
|
-
* ]}
|
|
158
|
-
* />
|
|
159
|
-
* ```
|
|
160
|
-
*/
|
|
161
|
-
export const InLineAlertLarge = {
|
|
162
|
-
args: {
|
|
163
|
-
heading: 'In Line Alert heading',
|
|
164
|
-
description: 'Description of the In Line Alert',
|
|
165
|
-
type: 'warning',
|
|
166
|
-
//@ts-ignore
|
|
167
|
-
icon: IconsList.WarningFilled,
|
|
168
|
-
additionalActions: [
|
|
169
|
-
{
|
|
170
|
-
label: 'Action 1',
|
|
171
|
-
onClick: action('Action 1 clicked'),
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
label: 'Action 2',
|
|
175
|
-
onClick: action('Action 2 clicked'),
|
|
176
|
-
},
|
|
177
|
-
],
|
|
178
|
-
},
|
|
179
|
-
};
|
|
180
|
-
export const NoDismiss = {
|
|
181
|
-
args: {
|
|
182
|
-
heading: 'In Line Alert heading',
|
|
183
|
-
description: 'Description of the In Line Alert',
|
|
184
|
-
type: 'warning',
|
|
185
|
-
additionalActions: [
|
|
186
|
-
{
|
|
187
|
-
label: 'Action 1',
|
|
188
|
-
onClick: action('Action 1 clicked'),
|
|
189
|
-
},
|
|
190
|
-
],
|
|
191
|
-
onDismiss: undefined,
|
|
192
|
-
},
|
|
193
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InLineAlert.test.d.ts","sourceRoot":"","sources":["../../../src/components/InLineAlert/InLineAlert.test.tsx"],"names":[],"mappings":"AAAA,6DAA6D"}
|