@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,78 +0,0 @@
|
|
|
1
|
-
import { Price } from '@adobe/elsie/components/Price';
|
|
2
|
-
import { within } from '@storybook/testing-library';
|
|
3
|
-
import { expect } from '@storybook/jest';
|
|
4
|
-
/**
|
|
5
|
-
* Use Price components to display the cost of an item or service.
|
|
6
|
-
*/
|
|
7
|
-
const meta = {
|
|
8
|
-
title: 'Components/Price',
|
|
9
|
-
component: Price,
|
|
10
|
-
argTypes: {
|
|
11
|
-
currency: {
|
|
12
|
-
control: 'select',
|
|
13
|
-
options: ['USD', 'EUR'],
|
|
14
|
-
},
|
|
15
|
-
locale: {
|
|
16
|
-
control: 'select',
|
|
17
|
-
options: ['en-US', 'fr-FR'],
|
|
18
|
-
},
|
|
19
|
-
variant: {
|
|
20
|
-
description: 'Font variant',
|
|
21
|
-
defaultValue: 'default',
|
|
22
|
-
control: 'select',
|
|
23
|
-
options: ['default', 'strikethrough'],
|
|
24
|
-
},
|
|
25
|
-
size: {
|
|
26
|
-
control: 'select',
|
|
27
|
-
options: ['small', 'medium', 'large'],
|
|
28
|
-
},
|
|
29
|
-
weight: {
|
|
30
|
-
description: 'Font weight',
|
|
31
|
-
defaultValue: 'bold',
|
|
32
|
-
control: 'select',
|
|
33
|
-
options: ['bold', 'normal'],
|
|
34
|
-
},
|
|
35
|
-
formatOptions: {
|
|
36
|
-
control: { type: 'object' },
|
|
37
|
-
defaultValue: {
|
|
38
|
-
minimumFractionDigits: 2,
|
|
39
|
-
maximumFractionDigits: 2,
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
export default meta;
|
|
45
|
-
/**
|
|
46
|
-
* ```ts
|
|
47
|
-
* import { Price } from '@adobe/elsie/components/Price';
|
|
48
|
-
* ```
|
|
49
|
-
*/
|
|
50
|
-
export const Primary = {
|
|
51
|
-
args: {
|
|
52
|
-
amount: 9.99,
|
|
53
|
-
sale: false,
|
|
54
|
-
size: 'small',
|
|
55
|
-
},
|
|
56
|
-
play: async ({ canvasElement }) => {
|
|
57
|
-
const canvas = within(canvasElement);
|
|
58
|
-
await expect(await canvas.findByText('$9.99')).toBeVisible();
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
export const SpecialDefault = {
|
|
62
|
-
args: {
|
|
63
|
-
size: 'small',
|
|
64
|
-
},
|
|
65
|
-
render: (args) => (<div style="display: flex; flex-wrap:wrap; gap: 5px">
|
|
66
|
-
<Price {...args} amount={59.99} variant={'strikethrough'}/>
|
|
67
|
-
<Price {...args} amount={55.99} variant={'default'}/>
|
|
68
|
-
</div>),
|
|
69
|
-
};
|
|
70
|
-
export const HighContrast = {
|
|
71
|
-
args: {
|
|
72
|
-
size: 'small',
|
|
73
|
-
},
|
|
74
|
-
render: (args) => (<div style="display: flex; flex-wrap:wrap; gap: 5px">
|
|
75
|
-
<Price {...args} amount={59.99} variant={'strikethrough'}/>
|
|
76
|
-
<Price {...args} amount={55.99} variant={'default'} sale/>
|
|
77
|
-
</div>),
|
|
78
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Price.test.d.ts","sourceRoot":"","sources":["../../../src/components/Price/Price.test.tsx"],"names":[],"mappings":"AAAA,6DAA6D"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/** https://preactjs.com/guide/v10/preact-testing-library/ */
|
|
2
|
-
import { render } from '@adobe/elsie/lib/tests';
|
|
3
|
-
import { Price } from '@adobe/elsie/components/Price';
|
|
4
|
-
describe('Patterns/Price', () => {
|
|
5
|
-
test('renders', () => {
|
|
6
|
-
const { container } = render(<Price />);
|
|
7
|
-
const elem = container.querySelector('.dropin-price');
|
|
8
|
-
expect(!!elem).toEqual(true);
|
|
9
|
-
});
|
|
10
|
-
test('renders the correct shape', () => {
|
|
11
|
-
const { container } = render(<Price amount={9.99}/>);
|
|
12
|
-
const elem = container.querySelector('.dropin-price');
|
|
13
|
-
expect(elem).toMatchSnapshot();
|
|
14
|
-
});
|
|
15
|
-
test('renders the price with strikethrough', () => {
|
|
16
|
-
const { container } = render(<Price amount={9.99} variant="strikethrough"/>);
|
|
17
|
-
const elem = container.querySelector('.dropin-price--strikethrough');
|
|
18
|
-
expect(elem).not.toBeNull();
|
|
19
|
-
});
|
|
20
|
-
test('renders the price with sale', () => {
|
|
21
|
-
const { container, rerender } = render(<Price amount={9.99} sale={false}/>);
|
|
22
|
-
const notSaleElem = container.querySelector('.dropin-price--sale');
|
|
23
|
-
expect(notSaleElem).toBeNull();
|
|
24
|
-
rerender(<Price amount={9.99} sale={true}/>);
|
|
25
|
-
const saleElem = container.querySelector('.dropin-price--sale');
|
|
26
|
-
expect(saleElem).not.toBeNull();
|
|
27
|
-
});
|
|
28
|
-
test('renders the price with normal weight', () => {
|
|
29
|
-
const { container, rerender } = render(<Price amount={9.99} weight="normal"/>);
|
|
30
|
-
const normalElem = container.querySelector('.dropin-price--normal');
|
|
31
|
-
expect(normalElem).not.toBeNull();
|
|
32
|
-
rerender(<Price amount={9.99}/>);
|
|
33
|
-
const boldElem = container.querySelector('.dropin-price--bold');
|
|
34
|
-
expect(boldElem).not.toBeNull();
|
|
35
|
-
});
|
|
36
|
-
test('renders the price with currency', () => {
|
|
37
|
-
const { container, rerender } = render(<Price amount={9.99} currency="USD"/>);
|
|
38
|
-
const usdElem = container.querySelector('.dropin-price');
|
|
39
|
-
expect(usdElem?.innerHTML).toContain('$');
|
|
40
|
-
rerender(<Price amount={9.99} currency="EUR"/>);
|
|
41
|
-
const eurElem = container.querySelector('.dropin-price');
|
|
42
|
-
expect(eurElem?.innerHTML).toContain('€');
|
|
43
|
-
});
|
|
44
|
-
test('renders the price with locale and format options', () => {
|
|
45
|
-
const { container, rerender } = render(<Price amount={9.9555} currency="USD" locale="en-US" formatOptions={{ minimumFractionDigits: 3, maximumFractionDigits: 3 }}/>);
|
|
46
|
-
const usdElem = container.querySelector('.dropin-price');
|
|
47
|
-
expect(usdElem?.textContent).toBe('$9.956');
|
|
48
|
-
rerender(<Price amount={9.9555} currency="USD" locale="fr-FR" formatOptions={{ minimumFractionDigits: 2, maximumFractionDigits: 2 }}/>);
|
|
49
|
-
const eurElem = container.querySelector('.dropin-price');
|
|
50
|
-
expect(eurElem?.innerHTML).toContain('9,96 $US');
|
|
51
|
-
});
|
|
52
|
-
test('renders the price with falsy currency', () => {
|
|
53
|
-
const { container } = render(<Price amount={9.99} currency=""/>);
|
|
54
|
-
const elem = container.querySelector('.dropin-price');
|
|
55
|
-
expect(elem?.innerHTML).toContain('$9.99');
|
|
56
|
-
});
|
|
57
|
-
test('renders the price with null currency', () => {
|
|
58
|
-
//@ts-ignore
|
|
59
|
-
const { container } = render(<Price amount={9.99} currency={null}/>);
|
|
60
|
-
const elem = container.querySelector('.dropin-price');
|
|
61
|
-
expect(elem?.innerHTML).toContain('$9.99');
|
|
62
|
-
});
|
|
63
|
-
test('renders the price with undefined currency', () => {
|
|
64
|
-
const { container } = render(<Price amount={9.99} currency={undefined}/>);
|
|
65
|
-
const elem = container.querySelector('.dropin-price');
|
|
66
|
-
expect(elem?.innerHTML).toContain('$9.99');
|
|
67
|
-
});
|
|
68
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Price/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@adobe/elsie/components/Price/Price';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent } from 'preact';
|
|
2
|
-
import { HTMLAttributes } from 'preact/compat';
|
|
3
|
-
import '@adobe/elsie/components/PriceRange/PriceRange.css';
|
|
4
|
-
export interface PriceRangeProps extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {
|
|
5
|
-
locale?: string;
|
|
6
|
-
currency?: string;
|
|
7
|
-
amount?: number;
|
|
8
|
-
variant?: 'default' | 'strikethrough';
|
|
9
|
-
minimumAmount?: number;
|
|
10
|
-
maximumAmount?: number;
|
|
11
|
-
display?: 'dash' | 'from to' | 'as low as';
|
|
12
|
-
size?: 'small' | 'medium' | 'large';
|
|
13
|
-
specialPrice?: number;
|
|
14
|
-
sale?: boolean;
|
|
15
|
-
}
|
|
16
|
-
export declare const PriceRange: FunctionComponent<PriceRangeProps>;
|
|
17
|
-
//# sourceMappingURL=PriceRange.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PriceRange.d.ts","sourceRoot":"","sources":["../../../src/components/PriceRange/PriceRange.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAW,MAAM,eAAe,CAAC;AAExD,OAAO,mDAAmD,CAAC;AAI3D,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,SAAS,GAAG,eAAe,CAAC;IACtC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,CAAC;IAC3C,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,CA+EzD,CAAC"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { useMemo } from 'preact/compat';
|
|
2
|
-
import { classes } from '@adobe/elsie/lib';
|
|
3
|
-
import '@adobe/elsie/components/PriceRange/PriceRange.css';
|
|
4
|
-
import { Price } from '@adobe/elsie/components/Price';
|
|
5
|
-
import { useText } from '@adobe/elsie/i18n';
|
|
6
|
-
export const PriceRange = ({ className, children, locale, currency, amount, variant = 'default', minimumAmount, maximumAmount, size = 'small', display = 'dash', specialPrice, sale = false, ...props }) => {
|
|
7
|
-
const isSimpleProduct = useMemo(() => amount ||
|
|
8
|
-
minimumAmount === maximumAmount ||
|
|
9
|
-
(minimumAmount && !maximumAmount) ||
|
|
10
|
-
(maximumAmount && !minimumAmount), [amount, maximumAmount, minimumAmount]);
|
|
11
|
-
return (<div>
|
|
12
|
-
{/* Simple product price or when configurable product minimum price equals to maximum price */}
|
|
13
|
-
{isSimpleProduct ? (<div {...props} className={classes(['dropin-price-range', className])}>
|
|
14
|
-
<Price amount={amount ?? minimumAmount ?? maximumAmount} currency={currency} locale={locale} size={size} variant={variant} sale={sale}/>
|
|
15
|
-
</div>) : (<div {...props} className={classes(['dropin-price-range', className])}>
|
|
16
|
-
{display === 'dash' ? (<Dashed specialPrice={specialPrice} minimumAmount={minimumAmount} maximumAmount={maximumAmount} currency={currency} locale={locale} size={size} sale={sale}/>) : null}
|
|
17
|
-
|
|
18
|
-
{display === 'from to' ? (<FromTo specialPrice={specialPrice} minimumAmount={minimumAmount} maximumAmount={maximumAmount} currency={currency} locale={locale} size={size} sale={sale}/>) : null}
|
|
19
|
-
|
|
20
|
-
{display === 'as low as' ? (<SpecialPrice specialPrice={specialPrice} minimumAmount={minimumAmount} maximumAmount={maximumAmount} currency={currency} locale={locale} size={size} sale={sale}/>) : null}
|
|
21
|
-
</div>)}
|
|
22
|
-
</div>);
|
|
23
|
-
};
|
|
24
|
-
// Variations
|
|
25
|
-
function Dashed({ specialPrice, minimumAmount, maximumAmount, currency, locale, size, sale, }) {
|
|
26
|
-
return (<>
|
|
27
|
-
<Price amount={specialPrice ?? minimumAmount} currency={currency} locale={locale} size={size} sale={!!specialPrice && sale}/>
|
|
28
|
-
<span className="dropin-price-range__separator">-</span>
|
|
29
|
-
<Price amount={maximumAmount} currency={currency} locale={locale} size={size}/>
|
|
30
|
-
</>);
|
|
31
|
-
}
|
|
32
|
-
function FromTo({ specialPrice, minimumAmount, maximumAmount, currency, locale, size, sale, }) {
|
|
33
|
-
// Translations
|
|
34
|
-
const translations = useText({
|
|
35
|
-
from: 'Dropin.PriceRange.from.label',
|
|
36
|
-
to: 'Dropin.PriceRange.to.label',
|
|
37
|
-
asLowAs: 'Dropin.PriceRange.asLowAs.label',
|
|
38
|
-
});
|
|
39
|
-
return (<>
|
|
40
|
-
<span className={classes([
|
|
41
|
-
'dropin-price-range__from',
|
|
42
|
-
`dropin-price-range__from--${size}`,
|
|
43
|
-
])}>
|
|
44
|
-
{translations.from}
|
|
45
|
-
</span>
|
|
46
|
-
<Price amount={specialPrice ?? minimumAmount} currency={currency} locale={locale} size={size} sale={!!specialPrice && sale}/>
|
|
47
|
-
<span className={classes([
|
|
48
|
-
'dropin-price-range__to',
|
|
49
|
-
`dropin-price-range__to--${size}`,
|
|
50
|
-
])}>
|
|
51
|
-
{translations.to}
|
|
52
|
-
</span>
|
|
53
|
-
<Price amount={maximumAmount} currency={currency} locale={locale} size={size}/>
|
|
54
|
-
</>);
|
|
55
|
-
}
|
|
56
|
-
function SpecialPrice({ specialPrice, minimumAmount, maximumAmount, currency, locale, size, sale, }) {
|
|
57
|
-
// Translations
|
|
58
|
-
const translations = useText({
|
|
59
|
-
from: 'Dropin.PriceRange.from.label',
|
|
60
|
-
to: 'Dropin.PriceRange.to.label',
|
|
61
|
-
asLowAs: 'Dropin.PriceRange.asLowAs.label',
|
|
62
|
-
});
|
|
63
|
-
return (<>
|
|
64
|
-
<span className={classes([
|
|
65
|
-
'dropin-price-range__as-low-as',
|
|
66
|
-
`dropin-price-range__as-low-as--${size}`,
|
|
67
|
-
])}>
|
|
68
|
-
{translations.asLowAs}
|
|
69
|
-
</span>
|
|
70
|
-
{specialPrice ? (<div>
|
|
71
|
-
<Price amount={maximumAmount} currency={currency} locale={locale} size={size} variant="strikethrough"/>
|
|
72
|
-
<Price amount={specialPrice} currency={currency} locale={locale} size={size} className="dropin-price-range__special" sale={!!specialPrice && sale}/>
|
|
73
|
-
</div>) : (<Price amount={minimumAmount} currency={currency} locale={locale} size={size}/>)}
|
|
74
|
-
</>);
|
|
75
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/preact';
|
|
2
|
-
import { PriceRangeProps } from '@adobe/elsie/components/PriceRange';
|
|
3
|
-
/**
|
|
4
|
-
* Use PriceRanges to display price range.
|
|
5
|
-
*
|
|
6
|
-
* Import the component like this:
|
|
7
|
-
*
|
|
8
|
-
* ```tsx
|
|
9
|
-
* import { PriceRange } from '@adobe/elsie/components/PriceRange';
|
|
10
|
-
* ```
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
declare const meta: Meta<PriceRangeProps>;
|
|
14
|
-
export default meta;
|
|
15
|
-
type Story = StoryObj<PriceRangeProps>;
|
|
16
|
-
/**
|
|
17
|
-
* Use the component like this to get a price for a simple product:
|
|
18
|
-
*
|
|
19
|
-
* ```tsx
|
|
20
|
-
* <PriceRange
|
|
21
|
-
* currency: 'USD',
|
|
22
|
-
* amount: 36.0,
|
|
23
|
-
* size: 'small',
|
|
24
|
-
* variant: 'default',
|
|
25
|
-
* sale: false,
|
|
26
|
-
* />
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
export declare const SimplePrice: Story;
|
|
30
|
-
/**
|
|
31
|
-
* Use the component like this to get a simple PriceRange:
|
|
32
|
-
*
|
|
33
|
-
* ```tsx
|
|
34
|
-
* <PriceRange
|
|
35
|
-
* currency: 'USD',
|
|
36
|
-
* minimumAmount: 56.0,
|
|
37
|
-
* maximumAmount: 58.0,
|
|
38
|
-
* size: 'small',
|
|
39
|
-
* display: 'dash',
|
|
40
|
-
* sale: false,
|
|
41
|
-
* />
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
export declare const PriceRangeDash: Story;
|
|
45
|
-
/**
|
|
46
|
-
* Use the component like this to get a from / to PriceRange:
|
|
47
|
-
*
|
|
48
|
-
* ```tsx
|
|
49
|
-
* <PriceRange
|
|
50
|
-
* currency: 'USD',
|
|
51
|
-
* minimumAmount: 56.0,
|
|
52
|
-
* maximumAmount: 58.0,
|
|
53
|
-
* size: 'small',
|
|
54
|
-
* display: 'from to',
|
|
55
|
-
* sale: false,
|
|
56
|
-
* />
|
|
57
|
-
* ```
|
|
58
|
-
*/
|
|
59
|
-
export declare const PriceRangeFromTo: Story;
|
|
60
|
-
/**
|
|
61
|
-
* Use the component like this to get a as low as PriceRange:
|
|
62
|
-
*
|
|
63
|
-
* ```tsx
|
|
64
|
-
* <PriceRange
|
|
65
|
-
* currency: 'USD',
|
|
66
|
-
* minimumAmount: 56.0,
|
|
67
|
-
* maximumAmount: 58.0,
|
|
68
|
-
* size: 'small',
|
|
69
|
-
* display: 'as low as',
|
|
70
|
-
* sale: false,
|
|
71
|
-
* />
|
|
72
|
-
* ```
|
|
73
|
-
*/
|
|
74
|
-
export declare const PriceRangeAsLowAs: Story;
|
|
75
|
-
/**
|
|
76
|
-
* Use the component like this to get a simple PriceRange with special price:
|
|
77
|
-
*
|
|
78
|
-
* ```tsx
|
|
79
|
-
* <PriceRange
|
|
80
|
-
* currency: 'USD',
|
|
81
|
-
* minimumAmount: 56.0,
|
|
82
|
-
* maximumAmount: 58.0,
|
|
83
|
-
* size: 'small',
|
|
84
|
-
* display: 'dash',
|
|
85
|
-
* sale: false,
|
|
86
|
-
* specialPrice: 9.99,
|
|
87
|
-
* />
|
|
88
|
-
* ```
|
|
89
|
-
*/
|
|
90
|
-
export declare const PriceRangeSpecialPrice: Story;
|
|
91
|
-
/**
|
|
92
|
-
* Use the component like this to get a simple PriceRange with high contrast special price:
|
|
93
|
-
*
|
|
94
|
-
* ```tsx
|
|
95
|
-
* <PriceRange
|
|
96
|
-
* currency: 'USD',
|
|
97
|
-
* minimumAmount: 56.0,
|
|
98
|
-
* maximumAmount: 58.0,
|
|
99
|
-
* size: 'small',
|
|
100
|
-
* display: 'dash',
|
|
101
|
-
* sale: true,
|
|
102
|
-
* specialPrice: 9.99,
|
|
103
|
-
* />
|
|
104
|
-
* ```
|
|
105
|
-
*/
|
|
106
|
-
export declare const PriceRangeSpecialPriceContrast: Story;
|
|
107
|
-
//# sourceMappingURL=PriceRange.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PriceRange.stories.d.ts","sourceRoot":"","sources":["../../../src/components/PriceRange/PriceRange.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAEL,eAAe,EAChB,MAAM,oCAAoC,CAAC;AAE5C;;;;;;;;;GASG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,eAAe,CAoD/B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAEvC;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,WAAW,EAAE,KAQzB,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,EAAE,KAS5B,CAAC;AAEF;;;;;;;;;;;;;GAaG;AAEH,eAAO,MAAM,gBAAgB,EAAE,KAS9B,CAAC;AAEF;;;;;;;;;;;;;GAaG;AAEH,eAAO,MAAM,iBAAiB,EAAE,KAS/B,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,sBAAsB,EAAE,KAUpC,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,8BAA8B,EAAE,KAU5C,CAAC"}
|
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
import { PriceRange as component, } from '@adobe/elsie/components/PriceRange';
|
|
2
|
-
/**
|
|
3
|
-
* Use PriceRanges to display price range.
|
|
4
|
-
*
|
|
5
|
-
* Import the component like this:
|
|
6
|
-
*
|
|
7
|
-
* ```tsx
|
|
8
|
-
* import { PriceRange } from '@adobe/elsie/components/PriceRange';
|
|
9
|
-
* ```
|
|
10
|
-
*
|
|
11
|
-
*/
|
|
12
|
-
const meta = {
|
|
13
|
-
title: 'Components/PriceRange',
|
|
14
|
-
component,
|
|
15
|
-
argTypes: {
|
|
16
|
-
currency: {
|
|
17
|
-
description: 'Currency of price',
|
|
18
|
-
control: 'select',
|
|
19
|
-
options: ['USD', 'EUR'],
|
|
20
|
-
},
|
|
21
|
-
locale: {
|
|
22
|
-
description: 'Locale of price',
|
|
23
|
-
control: 'select',
|
|
24
|
-
options: ['en-US', 'fr-FR'],
|
|
25
|
-
},
|
|
26
|
-
amount: {
|
|
27
|
-
description: 'Price of a simple product',
|
|
28
|
-
control: 'number',
|
|
29
|
-
},
|
|
30
|
-
variant: {
|
|
31
|
-
description: 'Price display variant',
|
|
32
|
-
control: 'select',
|
|
33
|
-
options: ['default', 'strikethrough'],
|
|
34
|
-
},
|
|
35
|
-
minimumAmount: {
|
|
36
|
-
description: 'Minimum price of a product price range',
|
|
37
|
-
control: 'number',
|
|
38
|
-
},
|
|
39
|
-
maximumAmount: {
|
|
40
|
-
description: 'Maximum price of a product price range',
|
|
41
|
-
control: 'number',
|
|
42
|
-
},
|
|
43
|
-
size: {
|
|
44
|
-
description: 'Size of price',
|
|
45
|
-
control: 'select',
|
|
46
|
-
options: ['small', 'medium', 'large'],
|
|
47
|
-
},
|
|
48
|
-
display: {
|
|
49
|
-
description: 'Price range display option',
|
|
50
|
-
control: 'select',
|
|
51
|
-
options: ['dash', 'from to', 'as low as'],
|
|
52
|
-
},
|
|
53
|
-
specialPrice: {
|
|
54
|
-
description: 'Special price of a product',
|
|
55
|
-
control: 'select',
|
|
56
|
-
options: [undefined, 9.99],
|
|
57
|
-
},
|
|
58
|
-
sale: {
|
|
59
|
-
description: 'Whether or not to display contrast color for special sale price',
|
|
60
|
-
control: 'boolean',
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
export default meta;
|
|
65
|
-
/**
|
|
66
|
-
* Use the component like this to get a price for a simple product:
|
|
67
|
-
*
|
|
68
|
-
* ```tsx
|
|
69
|
-
* <PriceRange
|
|
70
|
-
* currency: 'USD',
|
|
71
|
-
* amount: 36.0,
|
|
72
|
-
* size: 'small',
|
|
73
|
-
* variant: 'default',
|
|
74
|
-
* sale: false,
|
|
75
|
-
* />
|
|
76
|
-
* ```
|
|
77
|
-
*/
|
|
78
|
-
export const SimplePrice = {
|
|
79
|
-
args: {
|
|
80
|
-
currency: 'USD',
|
|
81
|
-
amount: 36.0,
|
|
82
|
-
size: 'small',
|
|
83
|
-
variant: 'default',
|
|
84
|
-
sale: false,
|
|
85
|
-
},
|
|
86
|
-
};
|
|
87
|
-
/**
|
|
88
|
-
* Use the component like this to get a simple PriceRange:
|
|
89
|
-
*
|
|
90
|
-
* ```tsx
|
|
91
|
-
* <PriceRange
|
|
92
|
-
* currency: 'USD',
|
|
93
|
-
* minimumAmount: 56.0,
|
|
94
|
-
* maximumAmount: 58.0,
|
|
95
|
-
* size: 'small',
|
|
96
|
-
* display: 'dash',
|
|
97
|
-
* sale: false,
|
|
98
|
-
* />
|
|
99
|
-
* ```
|
|
100
|
-
*/
|
|
101
|
-
export const PriceRangeDash = {
|
|
102
|
-
args: {
|
|
103
|
-
currency: 'USD',
|
|
104
|
-
minimumAmount: 56.0,
|
|
105
|
-
maximumAmount: 58.0,
|
|
106
|
-
size: 'small',
|
|
107
|
-
display: 'dash',
|
|
108
|
-
sale: false,
|
|
109
|
-
},
|
|
110
|
-
};
|
|
111
|
-
/**
|
|
112
|
-
* Use the component like this to get a from / to PriceRange:
|
|
113
|
-
*
|
|
114
|
-
* ```tsx
|
|
115
|
-
* <PriceRange
|
|
116
|
-
* currency: 'USD',
|
|
117
|
-
* minimumAmount: 56.0,
|
|
118
|
-
* maximumAmount: 58.0,
|
|
119
|
-
* size: 'small',
|
|
120
|
-
* display: 'from to',
|
|
121
|
-
* sale: false,
|
|
122
|
-
* />
|
|
123
|
-
* ```
|
|
124
|
-
*/
|
|
125
|
-
export const PriceRangeFromTo = {
|
|
126
|
-
args: {
|
|
127
|
-
currency: 'USD',
|
|
128
|
-
minimumAmount: 56.0,
|
|
129
|
-
maximumAmount: 58.0,
|
|
130
|
-
size: 'small',
|
|
131
|
-
display: 'from to',
|
|
132
|
-
sale: false,
|
|
133
|
-
},
|
|
134
|
-
};
|
|
135
|
-
/**
|
|
136
|
-
* Use the component like this to get a as low as PriceRange:
|
|
137
|
-
*
|
|
138
|
-
* ```tsx
|
|
139
|
-
* <PriceRange
|
|
140
|
-
* currency: 'USD',
|
|
141
|
-
* minimumAmount: 56.0,
|
|
142
|
-
* maximumAmount: 58.0,
|
|
143
|
-
* size: 'small',
|
|
144
|
-
* display: 'as low as',
|
|
145
|
-
* sale: false,
|
|
146
|
-
* />
|
|
147
|
-
* ```
|
|
148
|
-
*/
|
|
149
|
-
export const PriceRangeAsLowAs = {
|
|
150
|
-
args: {
|
|
151
|
-
currency: 'USD',
|
|
152
|
-
minimumAmount: 56.0,
|
|
153
|
-
maximumAmount: 58.0,
|
|
154
|
-
size: 'small',
|
|
155
|
-
display: 'as low as',
|
|
156
|
-
sale: false,
|
|
157
|
-
},
|
|
158
|
-
};
|
|
159
|
-
/**
|
|
160
|
-
* Use the component like this to get a simple PriceRange with special price:
|
|
161
|
-
*
|
|
162
|
-
* ```tsx
|
|
163
|
-
* <PriceRange
|
|
164
|
-
* currency: 'USD',
|
|
165
|
-
* minimumAmount: 56.0,
|
|
166
|
-
* maximumAmount: 58.0,
|
|
167
|
-
* size: 'small',
|
|
168
|
-
* display: 'dash',
|
|
169
|
-
* sale: false,
|
|
170
|
-
* specialPrice: 9.99,
|
|
171
|
-
* />
|
|
172
|
-
* ```
|
|
173
|
-
*/
|
|
174
|
-
export const PriceRangeSpecialPrice = {
|
|
175
|
-
args: {
|
|
176
|
-
currency: 'USD',
|
|
177
|
-
minimumAmount: 56.0,
|
|
178
|
-
maximumAmount: 58.0,
|
|
179
|
-
size: 'small',
|
|
180
|
-
display: 'dash',
|
|
181
|
-
sale: false,
|
|
182
|
-
specialPrice: 9.99,
|
|
183
|
-
},
|
|
184
|
-
};
|
|
185
|
-
/**
|
|
186
|
-
* Use the component like this to get a simple PriceRange with high contrast special price:
|
|
187
|
-
*
|
|
188
|
-
* ```tsx
|
|
189
|
-
* <PriceRange
|
|
190
|
-
* currency: 'USD',
|
|
191
|
-
* minimumAmount: 56.0,
|
|
192
|
-
* maximumAmount: 58.0,
|
|
193
|
-
* size: 'small',
|
|
194
|
-
* display: 'dash',
|
|
195
|
-
* sale: true,
|
|
196
|
-
* specialPrice: 9.99,
|
|
197
|
-
* />
|
|
198
|
-
* ```
|
|
199
|
-
*/
|
|
200
|
-
export const PriceRangeSpecialPriceContrast = {
|
|
201
|
-
args: {
|
|
202
|
-
currency: 'USD',
|
|
203
|
-
minimumAmount: 56.0,
|
|
204
|
-
maximumAmount: 58.0,
|
|
205
|
-
size: 'small',
|
|
206
|
-
display: 'dash',
|
|
207
|
-
sale: true,
|
|
208
|
-
specialPrice: 9.99,
|
|
209
|
-
},
|
|
210
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PriceRange.test.d.ts","sourceRoot":"","sources":["../../../src/components/PriceRange/PriceRange.test.tsx"],"names":[],"mappings":"AAAA,6DAA6D"}
|