@dropins/tools 0.21.2-alpha2 → 0.21.2-alpha389
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/event-bus.js +1 -49
- package/fetch-graphql.js +1 -62
- package/initializer.js +1 -61
- package/package.json +1 -1
- package/preact-compat.js +1 -93
- package/preact-hooks.js +1 -40
- package/preact-jsx-runtime.js +1 -35
- package/preact.js +1 -21
- package/runtime.js +1 -69
- package/components/Accordion/Accordion.d.ts +0 -25
- package/components/Accordion/Accordion.d.ts.map +0 -1
- package/components/Accordion/Accordion.jsx +0 -59
- package/components/Accordion/Accordion.stories.d.ts +0 -22
- package/components/Accordion/Accordion.stories.d.ts.map +0 -1
- package/components/Accordion/Accordion.stories.jsx +0 -320
- package/components/Accordion/Accordion.test.d.ts +0 -3
- package/components/Accordion/Accordion.test.d.ts.map +0 -1
- package/components/Accordion/Accordion.test.jsx +0 -79
- package/components/Accordion/index.d.ts +0 -3
- package/components/Accordion/index.d.ts.map +0 -1
- package/components/Accordion/index.js +0 -2
- package/components/ActionButton/ActionButton.d.ts +0 -11
- package/components/ActionButton/ActionButton.d.ts.map +0 -1
- package/components/ActionButton/ActionButton.jsx +0 -14
- package/components/ActionButton/ActionButton.stories.d.ts +0 -16
- package/components/ActionButton/ActionButton.stories.d.ts.map +0 -1
- package/components/ActionButton/ActionButton.stories.jsx +0 -119
- package/components/ActionButton/ActionButton.test.d.ts +0 -3
- package/components/ActionButton/ActionButton.test.d.ts.map +0 -1
- package/components/ActionButton/ActionButton.test.jsx +0 -47
- package/components/ActionButton/index.d.ts +0 -2
- package/components/ActionButton/index.d.ts.map +0 -1
- package/components/ActionButton/index.js +0 -1
- package/components/ActionButtonGroup/ActionButtonGroup.d.ts +0 -20
- package/components/ActionButtonGroup/ActionButtonGroup.d.ts.map +0 -1
- package/components/ActionButtonGroup/ActionButtonGroup.jsx +0 -39
- package/components/ActionButtonGroup/ActionButtonGroup.stories.d.ts +0 -16
- package/components/ActionButtonGroup/ActionButtonGroup.stories.d.ts.map +0 -1
- package/components/ActionButtonGroup/ActionButtonGroup.stories.jsx +0 -72
- package/components/ActionButtonGroup/ActionButtonGroup.test.d.ts +0 -3
- package/components/ActionButtonGroup/ActionButtonGroup.test.d.ts.map +0 -1
- package/components/ActionButtonGroup/ActionButtonGroup.test.jsx +0 -78
- package/components/ActionButtonGroup/index.d.ts +0 -2
- package/components/ActionButtonGroup/index.d.ts.map +0 -1
- package/components/ActionButtonGroup/index.js +0 -1
- package/components/AlertBanner/AlertBanner.d.ts +0 -15
- package/components/AlertBanner/AlertBanner.d.ts.map +0 -1
- package/components/AlertBanner/AlertBanner.jsx +0 -30
- package/components/AlertBanner/AlertBanner.stories.d.ts +0 -17
- package/components/AlertBanner/AlertBanner.stories.d.ts.map +0 -1
- package/components/AlertBanner/AlertBanner.stories.jsx +0 -128
- package/components/AlertBanner/AlertBanner.test.d.ts +0 -3
- package/components/AlertBanner/AlertBanner.test.d.ts.map +0 -1
- package/components/AlertBanner/AlertBanner.test.jsx +0 -40
- package/components/AlertBanner/index.d.ts +0 -3
- package/components/AlertBanner/index.d.ts.map +0 -1
- package/components/AlertBanner/index.js +0 -2
- package/components/Breadcrumbs/Breadcrumbs.d.ts +0 -9
- package/components/Breadcrumbs/Breadcrumbs.d.ts.map +0 -1
- package/components/Breadcrumbs/Breadcrumbs.jsx +0 -26
- package/components/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -15
- package/components/Breadcrumbs/Breadcrumbs.stories.d.ts.map +0 -1
- package/components/Breadcrumbs/Breadcrumbs.stories.jsx +0 -110
- package/components/Breadcrumbs/Breadcrumbs.test.d.ts +0 -3
- package/components/Breadcrumbs/Breadcrumbs.test.d.ts.map +0 -1
- package/components/Breadcrumbs/Breadcrumbs.test.jsx +0 -67
- package/components/Breadcrumbs/index.d.ts +0 -3
- package/components/Breadcrumbs/index.d.ts.map +0 -1
- package/components/Breadcrumbs/index.js +0 -2
- package/components/Button/Button.d.ts +0 -15
- package/components/Button/Button.d.ts.map +0 -1
- package/components/Button/Button.jsx +0 -59
- package/components/Button/Button.stories.d.ts +0 -135
- package/components/Button/Button.stories.d.ts.map +0 -1
- package/components/Button/Button.stories.jsx +0 -354
- package/components/Button/Button.test.d.ts +0 -2
- package/components/Button/Button.test.d.ts.map +0 -1
- package/components/Button/Button.test.jsx +0 -134
- package/components/Button/index.d.ts +0 -3
- package/components/Button/index.d.ts.map +0 -1
- package/components/Button/index.js +0 -2
- package/components/Card/Card.d.ts +0 -9
- package/components/Card/Card.d.ts.map +0 -1
- package/components/Card/Card.jsx +0 -7
- package/components/Card/Card.stories.d.ts +0 -16
- package/components/Card/Card.stories.d.ts.map +0 -1
- package/components/Card/Card.stories.jsx +0 -47
- package/components/Card/Card.test.d.ts +0 -3
- package/components/Card/Card.test.d.ts.map +0 -1
- package/components/Card/Card.test.jsx +0 -26
- package/components/Card/index.d.ts +0 -2
- package/components/Card/index.d.ts.map +0 -1
- package/components/Card/index.js +0 -1
- package/components/CartItem/CartItem.d.ts +0 -25
- package/components/CartItem/CartItem.d.ts.map +0 -1
- package/components/CartItem/CartItem.jsx +0 -124
- package/components/CartItem/CartItem.stories.d.ts +0 -54
- package/components/CartItem/CartItem.stories.d.ts.map +0 -1
- package/components/CartItem/CartItem.stories.jsx +0 -309
- package/components/CartItem/CartItem.test.d.ts +0 -3
- package/components/CartItem/CartItem.test.d.ts.map +0 -1
- package/components/CartItem/CartItem.test.jsx +0 -71
- package/components/CartItem/CartItemSkeleton.d.ts +0 -3
- package/components/CartItem/CartItemSkeleton.d.ts.map +0 -1
- package/components/CartItem/CartItemSkeleton.jsx +0 -25
- package/components/CartItem/CartItemSkeleton.test.d.ts +0 -3
- package/components/CartItem/CartItemSkeleton.test.d.ts.map +0 -1
- package/components/CartItem/CartItemSkeleton.test.jsx +0 -11
- package/components/CartItem/index.d.ts +0 -4
- package/components/CartItem/index.d.ts.map +0 -1
- package/components/CartItem/index.js +0 -3
- package/components/CartList/CartList.d.ts +0 -7
- package/components/CartList/CartList.d.ts.map +0 -1
- package/components/CartList/CartList.jsx +0 -14
- package/components/CartList/CartList.stories.d.ts +0 -17
- package/components/CartList/CartList.stories.d.ts.map +0 -1
- package/components/CartList/CartList.stories.jsx +0 -54
- package/components/CartList/CartList.test.d.ts +0 -3
- package/components/CartList/CartList.test.d.ts.map +0 -1
- package/components/CartList/CartList.test.jsx +0 -12
- package/components/CartList/index.d.ts +0 -3
- package/components/CartList/index.d.ts.map +0 -1
- package/components/CartList/index.js +0 -2
- package/components/Checkbox/Checkbox.d.ts +0 -13
- package/components/Checkbox/Checkbox.d.ts.map +0 -1
- package/components/Checkbox/Checkbox.jsx +0 -51
- package/components/Checkbox/Checkbox.stories.d.ts +0 -22
- package/components/Checkbox/Checkbox.stories.d.ts.map +0 -1
- package/components/Checkbox/Checkbox.stories.jsx +0 -157
- package/components/Checkbox/Checkbox.test.d.ts +0 -3
- package/components/Checkbox/Checkbox.test.d.ts.map +0 -1
- package/components/Checkbox/Checkbox.test.jsx +0 -136
- package/components/Checkbox/index.d.ts +0 -2
- package/components/Checkbox/index.d.ts.map +0 -1
- package/components/Checkbox/index.js +0 -1
- package/components/ColorSwatch/ColorSwatch.d.ts +0 -20
- package/components/ColorSwatch/ColorSwatch.d.ts.map +0 -1
- package/components/ColorSwatch/ColorSwatch.jsx +0 -57
- package/components/ColorSwatch/ColorSwatch.stories.d.ts +0 -20
- package/components/ColorSwatch/ColorSwatch.stories.d.ts.map +0 -1
- package/components/ColorSwatch/ColorSwatch.stories.jsx +0 -206
- package/components/ColorSwatch/ColorSwatch.test.d.ts +0 -3
- package/components/ColorSwatch/ColorSwatch.test.d.ts.map +0 -1
- package/components/ColorSwatch/ColorSwatch.test.jsx +0 -87
- package/components/ColorSwatch/index.d.ts +0 -3
- package/components/ColorSwatch/index.d.ts.map +0 -1
- package/components/ColorSwatch/index.js +0 -2
- package/components/Divider/Divider.d.ts +0 -8
- package/components/Divider/Divider.d.ts.map +0 -1
- package/components/Divider/Divider.jsx +0 -9
- package/components/Divider/Divider.stories.d.ts +0 -11
- package/components/Divider/Divider.stories.d.ts.map +0 -1
- package/components/Divider/Divider.stories.jsx +0 -43
- package/components/Divider/Divider.test.d.ts +0 -2
- package/components/Divider/Divider.test.d.ts.map +0 -1
- package/components/Divider/Divider.test.jsx +0 -19
- package/components/Divider/index.d.ts +0 -3
- package/components/Divider/index.d.ts.map +0 -1
- package/components/Divider/index.js +0 -2
- package/components/Field/Field.d.ts +0 -14
- package/components/Field/Field.d.ts.map +0 -1
- package/components/Field/Field.jsx +0 -29
- package/components/Field/Field.stories.d.ts +0 -37
- package/components/Field/Field.stories.d.ts.map +0 -1
- package/components/Field/Field.stories.jsx +0 -174
- package/components/Field/Field.test.d.ts +0 -3
- package/components/Field/Field.test.d.ts.map +0 -1
- package/components/Field/Field.test.jsx +0 -91
- package/components/Field/index.d.ts +0 -2
- package/components/Field/index.d.ts.map +0 -1
- package/components/Field/index.js +0 -1
- package/components/Icon/Icon.d.ts +0 -11
- package/components/Icon/Icon.d.ts.map +0 -1
- package/components/Icon/Icon.jsx +0 -57
- package/components/Icon/Icon.stories.d.ts +0 -16
- package/components/Icon/Icon.stories.d.ts.map +0 -1
- package/components/Icon/Icon.stories.helpers.d.ts +0 -4
- package/components/Icon/Icon.stories.helpers.d.ts.map +0 -1
- package/components/Icon/Icon.stories.helpers.jsx +0 -7
- package/components/Icon/Icon.stories.jsx +0 -48
- package/components/Icon/Icon.test.d.ts +0 -3
- package/components/Icon/Icon.test.d.ts.map +0 -1
- package/components/Icon/Icon.test.jsx +0 -67
- package/components/Icon/index.d.ts +0 -2
- package/components/Icon/index.d.ts.map +0 -1
- package/components/Icon/index.js +0 -1
- package/components/IllustratedMessage/IllustratedMessage.d.ts +0 -13
- package/components/IllustratedMessage/IllustratedMessage.d.ts.map +0 -1
- package/components/IllustratedMessage/IllustratedMessage.jsx +0 -21
- package/components/IllustratedMessage/IllustratedMessage.stories.d.ts +0 -10
- package/components/IllustratedMessage/IllustratedMessage.stories.d.ts.map +0 -1
- package/components/IllustratedMessage/IllustratedMessage.stories.jsx +0 -90
- package/components/IllustratedMessage/IllustratedMessage.test.d.ts +0 -3
- package/components/IllustratedMessage/IllustratedMessage.test.d.ts.map +0 -1
- package/components/IllustratedMessage/IllustratedMessage.test.jsx +0 -42
- package/components/IllustratedMessage/index.d.ts +0 -3
- package/components/IllustratedMessage/index.d.ts.map +0 -1
- package/components/IllustratedMessage/index.js +0 -2
- package/components/Image/Image.d.ts +0 -11
- package/components/Image/Image.d.ts.map +0 -1
- package/components/Image/Image.jsx +0 -26
- package/components/Image/Image.stories.d.ts +0 -11
- package/components/Image/Image.stories.d.ts.map +0 -1
- package/components/Image/Image.stories.jsx +0 -66
- package/components/Image/Image.test.d.ts +0 -3
- package/components/Image/Image.test.d.ts.map +0 -1
- package/components/Image/Image.test.jsx +0 -82
- package/components/Image/index.d.ts +0 -2
- package/components/Image/index.d.ts.map +0 -1
- package/components/Image/index.js +0 -1
- package/components/ImageSwatch/ImageSwatch.d.ts +0 -20
- package/components/ImageSwatch/ImageSwatch.d.ts.map +0 -1
- package/components/ImageSwatch/ImageSwatch.jsx +0 -49
- package/components/ImageSwatch/ImageSwatch.stories.d.ts +0 -20
- package/components/ImageSwatch/ImageSwatch.stories.d.ts.map +0 -1
- package/components/ImageSwatch/ImageSwatch.stories.jsx +0 -206
- package/components/ImageSwatch/ImageSwatch.test.d.ts +0 -3
- package/components/ImageSwatch/ImageSwatch.test.d.ts.map +0 -1
- package/components/ImageSwatch/ImageSwatch.test.jsx +0 -64
- package/components/ImageSwatch/index.d.ts +0 -3
- package/components/ImageSwatch/index.d.ts.map +0 -1
- package/components/ImageSwatch/index.js +0 -2
- package/components/InLineAlert/InLineAlert.d.ts +0 -16
- package/components/InLineAlert/InLineAlert.d.ts.map +0 -1
- package/components/InLineAlert/InLineAlert.jsx +0 -38
- package/components/InLineAlert/InLineAlert.stories.d.ts +0 -86
- package/components/InLineAlert/InLineAlert.stories.d.ts.map +0 -1
- package/components/InLineAlert/InLineAlert.stories.jsx +0 -193
- package/components/InLineAlert/InLineAlert.test.d.ts +0 -3
- package/components/InLineAlert/InLineAlert.test.d.ts.map +0 -1
- package/components/InLineAlert/InLineAlert.test.jsx +0 -77
- package/components/InLineAlert/index.d.ts +0 -3
- package/components/InLineAlert/index.d.ts.map +0 -1
- package/components/InLineAlert/index.js +0 -2
- package/components/Incrementer/Incrementer.d.ts +0 -17
- package/components/Incrementer/Incrementer.d.ts.map +0 -1
- package/components/Incrementer/Incrementer.jsx +0 -87
- package/components/Incrementer/Incrementer.stories.d.ts +0 -10
- package/components/Incrementer/Incrementer.stories.d.ts.map +0 -1
- package/components/Incrementer/Incrementer.stories.jsx +0 -68
- package/components/Incrementer/Incrementer.test.d.ts +0 -3
- package/components/Incrementer/Incrementer.test.d.ts.map +0 -1
- package/components/Incrementer/Incrementer.test.jsx +0 -112
- package/components/Incrementer/index.d.ts +0 -2
- package/components/Incrementer/index.d.ts.map +0 -1
- package/components/Incrementer/index.js +0 -1
- package/components/Input/Input.d.ts +0 -19
- package/components/Input/Input.d.ts.map +0 -1
- package/components/Input/Input.jsx +0 -73
- package/components/Input/Input.stories.d.ts +0 -11
- package/components/Input/Input.stories.d.ts.map +0 -1
- package/components/Input/Input.stories.jsx +0 -115
- package/components/Input/Input.test.d.ts +0 -3
- package/components/Input/Input.test.d.ts.map +0 -1
- package/components/Input/Input.test.jsx +0 -111
- package/components/Input/index.d.ts +0 -3
- package/components/Input/index.d.ts.map +0 -1
- package/components/Input/index.js +0 -2
- package/components/Modal/Modal.d.ts +0 -15
- package/components/Modal/Modal.d.ts.map +0 -1
- package/components/Modal/Modal.jsx +0 -93
- package/components/Modal/Modal.stories.d.ts +0 -56
- package/components/Modal/Modal.stories.d.ts.map +0 -1
- package/components/Modal/Modal.stories.jsx +0 -189
- package/components/Modal/Modal.test.d.ts +0 -3
- package/components/Modal/Modal.test.d.ts.map +0 -1
- package/components/Modal/Modal.test.jsx +0 -85
- package/components/Modal/index.d.ts +0 -2
- package/components/Modal/index.d.ts.map +0 -1
- package/components/Modal/index.js +0 -14
- package/components/Picker/Picker.d.ts +0 -26
- package/components/Picker/Picker.d.ts.map +0 -1
- package/components/Picker/Picker.jsx +0 -81
- package/components/Picker/Picker.stories.d.ts +0 -22
- package/components/Picker/Picker.stories.d.ts.map +0 -1
- package/components/Picker/Picker.stories.jsx +0 -236
- package/components/Picker/Picker.test.d.ts +0 -2
- package/components/Picker/Picker.test.d.ts.map +0 -1
- package/components/Picker/Picker.test.jsx +0 -190
- package/components/Picker/index.d.ts +0 -2
- package/components/Picker/index.d.ts.map +0 -1
- package/components/Picker/index.js +0 -1
- package/components/Price/Price.d.ts +0 -17
- package/components/Price/Price.d.ts.map +0 -1
- package/components/Price/Price.jsx +0 -24
- package/components/Price/Price.stories.d.ts +0 -17
- package/components/Price/Price.stories.d.ts.map +0 -1
- package/components/Price/Price.stories.jsx +0 -78
- package/components/Price/Price.test.d.ts +0 -3
- package/components/Price/Price.test.d.ts.map +0 -1
- package/components/Price/Price.test.jsx +0 -68
- package/components/Price/index.d.ts +0 -2
- package/components/Price/index.d.ts.map +0 -1
- package/components/Price/index.js +0 -1
- package/components/PriceRange/PriceRange.d.ts +0 -17
- package/components/PriceRange/PriceRange.d.ts.map +0 -1
- package/components/PriceRange/PriceRange.jsx +0 -75
- package/components/PriceRange/PriceRange.stories.d.ts +0 -107
- package/components/PriceRange/PriceRange.stories.d.ts.map +0 -1
- package/components/PriceRange/PriceRange.stories.jsx +0 -210
- package/components/PriceRange/PriceRange.test.d.ts +0 -3
- package/components/PriceRange/PriceRange.test.d.ts.map +0 -1
- package/components/PriceRange/PriceRange.test.jsx +0 -188
- package/components/PriceRange/index.d.ts +0 -3
- package/components/PriceRange/index.d.ts.map +0 -1
- package/components/PriceRange/index.js +0 -2
- package/components/PriceSummary/PriceSummary.d.ts +0 -43
- package/components/PriceSummary/PriceSummary.d.ts.map +0 -1
- package/components/PriceSummary/PriceSummary.jsx +0 -228
- package/components/PriceSummary/PriceSummary.stories.d.ts +0 -127
- package/components/PriceSummary/PriceSummary.stories.d.ts.map +0 -1
- package/components/PriceSummary/PriceSummary.stories.jsx +0 -456
- package/components/PriceSummary/PriceSummary.test.d.ts +0 -3
- package/components/PriceSummary/PriceSummary.test.d.ts.map +0 -1
- package/components/PriceSummary/PriceSummary.test.jsx +0 -275
- package/components/PriceSummary/index.d.ts +0 -3
- package/components/PriceSummary/index.d.ts.map +0 -1
- package/components/PriceSummary/index.js +0 -2
- package/components/ProgressSpinner/ProgressSpinner.d.ts +0 -14
- package/components/ProgressSpinner/ProgressSpinner.d.ts.map +0 -1
- package/components/ProgressSpinner/ProgressSpinner.jsx +0 -31
- package/components/ProgressSpinner/ProgressSpinner.stories.d.ts +0 -19
- package/components/ProgressSpinner/ProgressSpinner.stories.d.ts.map +0 -1
- package/components/ProgressSpinner/ProgressSpinner.stories.jsx +0 -195
- package/components/ProgressSpinner/ProgressSpinner.test.d.ts +0 -3
- package/components/ProgressSpinner/ProgressSpinner.test.d.ts.map +0 -1
- package/components/ProgressSpinner/ProgressSpinner.test.jsx +0 -40
- package/components/ProgressSpinner/index.d.ts +0 -3
- package/components/ProgressSpinner/index.d.ts.map +0 -1
- package/components/ProgressSpinner/index.js +0 -2
- package/components/RadioButton/RadioButton.d.ts +0 -15
- package/components/RadioButton/RadioButton.d.ts.map +0 -1
- package/components/RadioButton/RadioButton.jsx +0 -31
- package/components/RadioButton/RadioButton.stories.d.ts +0 -15
- package/components/RadioButton/RadioButton.stories.d.ts.map +0 -1
- package/components/RadioButton/RadioButton.stories.jsx +0 -92
- package/components/RadioButton/RadioButton.test.d.ts +0 -3
- package/components/RadioButton/RadioButton.test.d.ts.map +0 -1
- package/components/RadioButton/RadioButton.test.jsx +0 -62
- package/components/RadioButton/index.d.ts +0 -3
- package/components/RadioButton/index.d.ts.map +0 -1
- package/components/RadioButton/index.js +0 -2
- package/components/Skeleton/Skeleton.d.ts +0 -17
- package/components/Skeleton/Skeleton.d.ts.map +0 -1
- package/components/Skeleton/Skeleton.jsx +0 -52
- package/components/Skeleton/Skeleton.stories.d.ts +0 -67
- package/components/Skeleton/Skeleton.stories.d.ts.map +0 -1
- package/components/Skeleton/Skeleton.stories.jsx +0 -184
- package/components/Skeleton/Skeleton.test.d.ts +0 -3
- package/components/Skeleton/Skeleton.test.d.ts.map +0 -1
- package/components/Skeleton/Skeleton.test.jsx +0 -62
- package/components/Skeleton/index.d.ts +0 -2
- package/components/Skeleton/index.d.ts.map +0 -1
- package/components/Skeleton/index.js +0 -1
- package/components/TextSwatch/TextSwatch.d.ts +0 -18
- package/components/TextSwatch/TextSwatch.d.ts.map +0 -1
- package/components/TextSwatch/TextSwatch.jsx +0 -56
- package/components/TextSwatch/TextSwatch.stories.d.ts +0 -21
- package/components/TextSwatch/TextSwatch.stories.d.ts.map +0 -1
- package/components/TextSwatch/TextSwatch.stories.jsx +0 -211
- package/components/TextSwatch/TextSwatch.test.d.ts +0 -3
- package/components/TextSwatch/TextSwatch.test.d.ts.map +0 -1
- package/components/TextSwatch/TextSwatch.test.jsx +0 -85
- package/components/TextSwatch/index.d.ts +0 -3
- package/components/TextSwatch/index.d.ts.map +0 -1
- package/components/TextSwatch/index.js +0 -2
- package/components/UIProvider/UIProvider.d.ts +0 -18
- package/components/UIProvider/UIProvider.d.ts.map +0 -1
- package/components/UIProvider/UIProvider.jsx +0 -26
- package/components/UIProvider/UIProvider.test.d.ts +0 -2
- package/components/UIProvider/UIProvider.test.d.ts.map +0 -1
- package/components/UIProvider/UIProvider.test.jsx +0 -9
- package/components/UIProvider/index.d.ts +0 -2
- package/components/UIProvider/index.d.ts.map +0 -1
- package/components/UIProvider/index.js +0 -1
- package/components/index.d.ts +0 -34
- package/components/index.d.ts.map +0 -1
- package/components/index.js +0 -33
- package/docs/Design/designBlocks.d.ts +0 -21
- package/docs/Design/designBlocks.d.ts.map +0 -1
- package/docs/Design/designBlocks.jsx +0 -59
- package/docs/Design/getTokenData.d.ts +0 -7
- package/docs/Design/getTokenData.d.ts.map +0 -1
- package/docs/Design/getTokenData.js +0 -18
- package/docs/Design/getTokenData.test.d.ts +0 -2
- package/docs/Design/getTokenData.test.d.ts.map +0 -1
- package/docs/Design/getTokenData.test.js +0 -92
- package/i18n/en_US.json +0 -112
- package/i18n/index.d.ts +0 -341
- package/i18n/index.d.ts.map +0 -1
- package/i18n/index.js +0 -12
- package/i18n/index.test.d.ts +0 -2
- package/i18n/index.test.d.ts.map +0 -1
- package/i18n/index.test.js +0 -11
- package/icons/index.d.ts +0 -35
- package/icons/index.d.ts.map +0 -1
- package/icons/index.js +0 -34
- package/lib/classes.d.ts +0 -5
- package/lib/classes.d.ts.map +0 -1
- package/lib/classes.js +0 -16
- package/lib/classes.test.d.ts +0 -2
- package/lib/classes.test.d.ts.map +0 -1
- package/lib/classes.test.js +0 -18
- package/lib/config.d.ts +0 -7
- package/lib/config.d.ts.map +0 -1
- package/lib/config.js +0 -12
- package/lib/config.test.d.ts +0 -2
- package/lib/config.test.d.ts.map +0 -1
- package/lib/config.test.js +0 -12
- package/lib/debounce.d.ts +0 -2
- package/lib/debounce.d.ts.map +0 -1
- package/lib/debounce.js +0 -7
- package/lib/debounce.test.d.ts +0 -2
- package/lib/debounce.test.d.ts.map +0 -1
- package/lib/debounce.test.js +0 -40
- package/lib/deepmerge.d.ts +0 -2
- package/lib/deepmerge.d.ts.map +0 -1
- package/lib/deepmerge.js +0 -1
- package/lib/form-values.d.ts +0 -5
- package/lib/form-values.d.ts.map +0 -1
- package/lib/form-values.js +0 -17
- package/lib/form-values.test.d.ts +0 -2
- package/lib/form-values.test.d.ts.map +0 -1
- package/lib/form-values.test.jsx +0 -29
- package/lib/i18n.d.ts +0 -8
- package/lib/i18n.d.ts.map +0 -1
- package/lib/i18n.js +0 -9
- package/lib/i18n.test.d.ts +0 -2
- package/lib/i18n.test.d.ts.map +0 -1
- package/lib/i18n.test.jsx +0 -8
- package/lib/image-params-keymap.d.ts +0 -4
- package/lib/image-params-keymap.d.ts.map +0 -1
- package/lib/image-params-keymap.js +0 -19
- package/lib/image-params-keymap.test.d.ts +0 -2
- package/lib/image-params-keymap.test.d.ts.map +0 -1
- package/lib/image-params-keymap.test.js +0 -7
- package/lib/index.d.ts +0 -14
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -13
- package/lib/initializer.d.ts +0 -78
- package/lib/initializer.d.ts.map +0 -1
- package/lib/initializer.js +0 -93
- package/lib/initializer.test.d.ts +0 -2
- package/lib/initializer.test.d.ts.map +0 -1
- package/lib/initializer.test.js +0 -64
- package/lib/render.d.ts +0 -10
- package/lib/render.d.ts.map +0 -1
- package/lib/render.jsx +0 -34
- package/lib/render.test.d.ts +0 -2
- package/lib/render.test.d.ts.map +0 -1
- package/lib/render.test.jsx +0 -70
- package/lib/resolve-image.d.ts +0 -10
- package/lib/resolve-image.d.ts.map +0 -1
- package/lib/resolve-image.js +0 -57
- package/lib/resolve-image.test.d.ts +0 -2
- package/lib/resolve-image.test.d.ts.map +0 -1
- package/lib/resolve-image.test.jsx +0 -146
- package/lib/slot.d.ts +0 -43
- package/lib/slot.d.ts.map +0 -1
- package/lib/slot.jsx +0 -184
- package/lib/slot.test.d.ts +0 -2
- package/lib/slot.test.d.ts.map +0 -1
- package/lib/slot.test.jsx +0 -325
- package/lib/tests.d.ts +0 -4
- package/lib/tests.d.ts.map +0 -1
- package/lib/tests.jsx +0 -19
- package/lib/tests.test.d.ts +0 -2
- package/lib/tests.test.d.ts.map +0 -1
- package/lib/tests.test.jsx +0 -13
- package/lib/types.d.ts +0 -9
- package/lib/types.d.ts.map +0 -1
- package/lib/types.js +0 -1
- package/lib/vcomponent.d.ts +0 -8
- package/lib/vcomponent.d.ts.map +0 -1
- package/lib/vcomponent.jsx +0 -27
- package/lib/vcomponent.test.d.ts +0 -2
- package/lib/vcomponent.test.d.ts.map +0 -1
- package/lib/vcomponent.test.jsx +0 -51
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { classes } from '@adobe/elsie/lib';
|
|
2
|
-
import '@adobe/elsie/components/RadioButton/RadioButton.css';
|
|
3
|
-
export const RadioButton = ({ name, label, value, size = 'medium', checked = false, disabled = false, error = false, description = '', className, children, ...props }) => {
|
|
4
|
-
return (<label className={classes([
|
|
5
|
-
className,
|
|
6
|
-
'dropin-radio-button',
|
|
7
|
-
['dropin-radio-button--error', error],
|
|
8
|
-
['dropin-radio-button--disabled', disabled],
|
|
9
|
-
])}>
|
|
10
|
-
<input name={name} value={value} checked={checked} disabled={disabled} type="radio" className={classes([
|
|
11
|
-
'dropin-radio-button__input',
|
|
12
|
-
['dropin-radio-button__input--error', error],
|
|
13
|
-
['dropin-radio-button__input--disabled', disabled],
|
|
14
|
-
])} {...props}/>
|
|
15
|
-
<span className={classes([
|
|
16
|
-
'dropin-radio-button__label',
|
|
17
|
-
`dropin-radio-button__label--${size}`,
|
|
18
|
-
['dropin-radio-button__label--error', error],
|
|
19
|
-
['dropin-radio-button__label--disabled', disabled],
|
|
20
|
-
])}>
|
|
21
|
-
{label}
|
|
22
|
-
</span>
|
|
23
|
-
<span className={classes([
|
|
24
|
-
'dropin-radio-button__description',
|
|
25
|
-
`dropin-radio-button__description--${size}`,
|
|
26
|
-
['dropin-radio-button__description--disabled', disabled],
|
|
27
|
-
])}>
|
|
28
|
-
{description}
|
|
29
|
-
</span>
|
|
30
|
-
</label>);
|
|
31
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/preact';
|
|
2
|
-
import { RadioButtonProps } from '@adobe/elsie/components/RadioButton';
|
|
3
|
-
/**
|
|
4
|
-
* Use Radio Buttons to let users select one option from a set of mutually exclusive choices.
|
|
5
|
-
*/
|
|
6
|
-
declare const meta: Meta<RadioButtonProps>;
|
|
7
|
-
export default meta;
|
|
8
|
-
type Story = StoryObj<RadioButtonProps>;
|
|
9
|
-
/**
|
|
10
|
-
* ```ts
|
|
11
|
-
* import { RadioButton } from '@adobe/elsie/components/RadioButton';
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
export declare const RadioButtonStory: Story;
|
|
15
|
-
//# sourceMappingURL=RadioButton.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.stories.d.ts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAc,gBAAgB,EAAC,MAAM,qCAAqC,CAAC;AAIlF;;GAEG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,gBAAgB,CA4DhC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAExC;;;;GAIG;AAEH,eAAO,MAAM,gBAAgB,EAAE,KAmB9B,CAAC"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { RadioButton } from '@adobe/elsie/components/RadioButton';
|
|
2
|
-
import { userEvent, within } from '@storybook/testing-library';
|
|
3
|
-
import { expect } from '@storybook/jest';
|
|
4
|
-
/**
|
|
5
|
-
* Use Radio Buttons to let users select one option from a set of mutually exclusive choices.
|
|
6
|
-
*/
|
|
7
|
-
const meta = {
|
|
8
|
-
title: 'Components/RadioButton',
|
|
9
|
-
component: RadioButton,
|
|
10
|
-
argTypes: {
|
|
11
|
-
label: {
|
|
12
|
-
description: 'Label to be shown beside of the radio button',
|
|
13
|
-
type: {
|
|
14
|
-
required: true,
|
|
15
|
-
name: 'string',
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
name: {
|
|
19
|
-
description: 'Field name (used for mapping the value in a form)',
|
|
20
|
-
type: {
|
|
21
|
-
required: true,
|
|
22
|
-
name: 'string',
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
value: {
|
|
26
|
-
description: 'Field value',
|
|
27
|
-
type: {
|
|
28
|
-
required: true,
|
|
29
|
-
name: 'string',
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
description: {
|
|
33
|
-
description: 'Additional secondary description if needed',
|
|
34
|
-
type: {
|
|
35
|
-
required: false,
|
|
36
|
-
name: 'string',
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
disabled: {
|
|
40
|
-
description: 'Whether or not the radio button is disabled',
|
|
41
|
-
type: {
|
|
42
|
-
required: false,
|
|
43
|
-
name: 'boolean',
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
error: {
|
|
47
|
-
description: 'Whether or not the radio button is in error state',
|
|
48
|
-
type: {
|
|
49
|
-
required: false,
|
|
50
|
-
name: 'boolean',
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
size: {
|
|
54
|
-
description: 'Available sizes for the checkbox label and description texts',
|
|
55
|
-
type: 'string',
|
|
56
|
-
options: ['medium', 'large'],
|
|
57
|
-
defaultValue: {
|
|
58
|
-
summary: 'medium',
|
|
59
|
-
},
|
|
60
|
-
control: {
|
|
61
|
-
type: 'radio',
|
|
62
|
-
default: 'medium',
|
|
63
|
-
},
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
export default meta;
|
|
68
|
-
/**
|
|
69
|
-
* ```ts
|
|
70
|
-
* import { RadioButton } from '@adobe/elsie/components/RadioButton';
|
|
71
|
-
* ```
|
|
72
|
-
*/
|
|
73
|
-
export const RadioButtonStory = {
|
|
74
|
-
name: "Radio button",
|
|
75
|
-
args: {
|
|
76
|
-
name: 'standard',
|
|
77
|
-
label: 'Standard',
|
|
78
|
-
value: 'standard',
|
|
79
|
-
description: 'Description',
|
|
80
|
-
size: 'medium',
|
|
81
|
-
disabled: false,
|
|
82
|
-
error: false,
|
|
83
|
-
},
|
|
84
|
-
play: async ({ canvasElement }) => {
|
|
85
|
-
const canvas = within(canvasElement);
|
|
86
|
-
const radioButton = await canvas.findByRole('radio');
|
|
87
|
-
const radioButtonText = await canvas.findByText('Standard');
|
|
88
|
-
await expect(radioButton).not.toBeChecked();
|
|
89
|
-
await userEvent.click(radioButtonText);
|
|
90
|
-
await expect(radioButton).toBeChecked();
|
|
91
|
-
},
|
|
92
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.test.d.ts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.test.tsx"],"names":[],"mappings":"AAAA,6DAA6D"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/** https://preactjs.com/guide/v10/preact-testing-library/ */
|
|
2
|
-
import { render } from '@adobe/elsie/lib/tests';
|
|
3
|
-
import { RadioButton, } from '@adobe/elsie/components/RadioButton';
|
|
4
|
-
describe('Base/Components/RadioButton', () => {
|
|
5
|
-
const DEFAULT_PROPS = {
|
|
6
|
-
name: 'name',
|
|
7
|
-
label: 'label',
|
|
8
|
-
value: 'value',
|
|
9
|
-
};
|
|
10
|
-
test('renders', () => {
|
|
11
|
-
const { container } = render(<RadioButton {...DEFAULT_PROPS}/>);
|
|
12
|
-
expect(!!container).toEqual(true);
|
|
13
|
-
});
|
|
14
|
-
test('Renders the correct shape for default props', () => {
|
|
15
|
-
const { container } = render(<RadioButton {...DEFAULT_PROPS}/>);
|
|
16
|
-
// Ensure the component with default properties matches the snapshot
|
|
17
|
-
const elem = container.querySelector('.dropin-radio-button');
|
|
18
|
-
expect(elem).toMatchSnapshot();
|
|
19
|
-
});
|
|
20
|
-
test('Renders the radioButton enabled by default, checked and size large', () => {
|
|
21
|
-
const { container } = render(<RadioButton {...DEFAULT_PROPS} checked={true} size={'large'}/>);
|
|
22
|
-
// Ensure the radioButton is not disabled
|
|
23
|
-
const elem = container.querySelector('.dropin-radio-button');
|
|
24
|
-
expect(elem.classList.contains('dropin-radio-button--disabled')).toEqual(false);
|
|
25
|
-
// Ensure the radioButton is checked
|
|
26
|
-
const checked = container.querySelector('.dropin-radio-button__input');
|
|
27
|
-
expect(checked?.checked).toEqual(true);
|
|
28
|
-
// Ensure the radioButton size is large
|
|
29
|
-
const elemTextMedium = container.querySelector('.dropin-radio-button__label');
|
|
30
|
-
expect(elemTextMedium.classList.contains('dropin-radio-button__label--large')).toEqual(true);
|
|
31
|
-
});
|
|
32
|
-
test('Renders the radioButton enabled by default, not checked and size medium', () => {
|
|
33
|
-
const { container } = render(<RadioButton {...DEFAULT_PROPS} checked={false}/>);
|
|
34
|
-
// Ensure the radioButton is not disabled
|
|
35
|
-
const elem = container.querySelector('.dropin-radio-button');
|
|
36
|
-
expect(elem.classList.contains('dropin-radio-button--disabled')).toEqual(false);
|
|
37
|
-
// Ensure the radioButton is not checked
|
|
38
|
-
const checked = container.querySelector('.dropin-radio-button__input');
|
|
39
|
-
expect(checked?.checked).toEqual(false);
|
|
40
|
-
// Ensure the radioButton size is medium
|
|
41
|
-
const elemTextMedium = container.querySelector('.dropin-radio-button__label');
|
|
42
|
-
expect(elemTextMedium.classList.contains('dropin-radio-button__label--medium')).toEqual(true);
|
|
43
|
-
});
|
|
44
|
-
test('Renders the radioButton in disabled state and not checked', () => {
|
|
45
|
-
const { container } = render(<RadioButton {...DEFAULT_PROPS} disabled={true}/>);
|
|
46
|
-
// Ensure the radioButton is disabled
|
|
47
|
-
const elem = container.querySelector('.dropin-radio-button');
|
|
48
|
-
expect(elem.classList.contains('dropin-radio-button--disabled')).toEqual(true);
|
|
49
|
-
// Ensure the radioButton is not checked
|
|
50
|
-
const checked = container.querySelector('.dropin-radio-button__input');
|
|
51
|
-
expect(checked?.checked).toEqual(false);
|
|
52
|
-
});
|
|
53
|
-
test('Renders the radioButton in error state and not checked', () => {
|
|
54
|
-
const { container } = render(<RadioButton {...DEFAULT_PROPS} error={true}/>);
|
|
55
|
-
// Ensure the radioButton is not disabled
|
|
56
|
-
const elem = container.querySelector('.dropin-radio-button');
|
|
57
|
-
expect(elem.classList.contains('dropin-radio-button--error')).toEqual(true);
|
|
58
|
-
// Ensure the radioButton is not checked
|
|
59
|
-
const checked = container.querySelector('.dropin-radio-button__input');
|
|
60
|
-
expect(checked?.checked).toEqual(false);
|
|
61
|
-
});
|
|
62
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/RadioButton/index.ts"],"names":[],"mappings":"AAAA,cAAc,iDAAiD,CAAC;AAChE,OAAO,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,iDAAiD,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent } from 'preact';
|
|
2
|
-
import { HTMLAttributes } from 'preact/compat';
|
|
3
|
-
import '@adobe/elsie/components/Skeleton/Skeleton.css';
|
|
4
|
-
export interface SkeletonRowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {
|
|
5
|
-
fullWidth?: boolean;
|
|
6
|
-
lines?: number;
|
|
7
|
-
size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
|
|
8
|
-
variant?: 'heading' | 'row' | 'empty';
|
|
9
|
-
multilineGap?: 'xsmall' | 'small' | 'medium' | 'big' | 'xbig';
|
|
10
|
-
children?: string;
|
|
11
|
-
}
|
|
12
|
-
export declare const SkeletonRow: FunctionComponent<SkeletonRowProps>;
|
|
13
|
-
export interface SkeletonProps extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {
|
|
14
|
-
rowGap?: 'xsmall' | 'small' | 'medium' | 'big' | 'xbig';
|
|
15
|
-
}
|
|
16
|
-
export declare const Skeleton: FunctionComponent<SkeletonProps>;
|
|
17
|
-
//# sourceMappingURL=Skeleton.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,+CAA+C,CAAC;AAEvD,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACpD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC1D,OAAO,CAAC,EAAE,SAAS,GAAG,KAAK,GAAG,OAAO,CAAC;IACtC,YAAY,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAID,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,gBAAgB,CAkF3D,CAAC;AAEF,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACpD,MAAM,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;CACzD;AAED,eAAO,MAAM,QAAQ,EAAE,iBAAiB,CAAC,aAAa,CAiBrD,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { classes } from '@adobe/elsie/lib';
|
|
2
|
-
import '@adobe/elsie/components/Skeleton/Skeleton.css';
|
|
3
|
-
const SINGLELINE = 1;
|
|
4
|
-
export const SkeletonRow = ({ className, fullWidth = false, lines = SINGLELINE, size = 'small', variant = 'row', children = null, multilineGap = 'medium', ...props }) => {
|
|
5
|
-
const sharedClasses = [
|
|
6
|
-
[`dropin-skeleton-row__${variant}`, variant],
|
|
7
|
-
[`dropin-skeleton-row__${variant}-${size}`, variant && size],
|
|
8
|
-
];
|
|
9
|
-
if (!children && variant === 'empty') {
|
|
10
|
-
return (<div className={classes([
|
|
11
|
-
'dropin-skeleton-row dropin-skeleton-row__empty',
|
|
12
|
-
className,
|
|
13
|
-
])}/>);
|
|
14
|
-
}
|
|
15
|
-
if (children) {
|
|
16
|
-
const svg = children.trim();
|
|
17
|
-
return (<div {...props} class={classes([
|
|
18
|
-
'dropin-skeleton-row',
|
|
19
|
-
[`dropin-skeleton-row--full`, fullWidth],
|
|
20
|
-
className,
|
|
21
|
-
])}
|
|
22
|
-
// eslint-disable-next-line react/no-danger
|
|
23
|
-
dangerouslySetInnerHTML={{ __html: svg }}/>);
|
|
24
|
-
}
|
|
25
|
-
const isMultiline = lines > SINGLELINE;
|
|
26
|
-
if (isMultiline === false) {
|
|
27
|
-
return (<div {...props} class={classes([
|
|
28
|
-
'dropin-skeleton-row',
|
|
29
|
-
[`dropin-skeleton-row--full`, fullWidth],
|
|
30
|
-
'dropin-skeleton--row__content',
|
|
31
|
-
...sharedClasses,
|
|
32
|
-
className,
|
|
33
|
-
])}/>);
|
|
34
|
-
}
|
|
35
|
-
return (<div {...props} style={{ '--multiline-gap-spacing': `var(--spacing-${multilineGap})` }} class={classes([
|
|
36
|
-
'dropin-skeleton-row--multiline',
|
|
37
|
-
[`dropin-skeleton-row--full`, fullWidth],
|
|
38
|
-
className,
|
|
39
|
-
])}>
|
|
40
|
-
{Array.from({ length: lines }).map((_, index) => (<div key={index} class={classes([
|
|
41
|
-
'dropin-skeleton-row',
|
|
42
|
-
[`dropin-skeleton-row--full`, fullWidth],
|
|
43
|
-
'dropin-skeleton--row__content',
|
|
44
|
-
...sharedClasses,
|
|
45
|
-
])}/>))}
|
|
46
|
-
</div>);
|
|
47
|
-
};
|
|
48
|
-
export const Skeleton = ({ className, children, rowGap = 'medium', ...props }) => {
|
|
49
|
-
return (<div style={{ '--row-gap-spacing': `var(--spacing-${rowGap})` }} {...props} className={classes(['dropin-skeleton', className])} role="status" aria-label="Loading...">
|
|
50
|
-
{children}
|
|
51
|
-
</div>);
|
|
52
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/preact';
|
|
2
|
-
import { SkeletonProps, SkeletonRowProps } from './Skeleton';
|
|
3
|
-
/**
|
|
4
|
-
* Use Skeletons to display content placeholders while content is loading.
|
|
5
|
-
*/
|
|
6
|
-
declare const meta: Meta<SkeletonRowProps & SkeletonProps>;
|
|
7
|
-
export default meta;
|
|
8
|
-
type Story = StoryObj<SkeletonRowProps & SkeletonProps>;
|
|
9
|
-
/**
|
|
10
|
-
* Import the component to use in your components:
|
|
11
|
-
*
|
|
12
|
-
* ```ts
|
|
13
|
-
* import { Skeleton, SkeletonRow } from '@adobe/elsie/components';
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* Pass in an SVG element as a child to render a shimmering skeleton version of it.
|
|
18
|
-
*
|
|
19
|
-
* ```tsx
|
|
20
|
-
* <Skeleton>
|
|
21
|
-
* <SkeletonRow>
|
|
22
|
-
* `<svg width="450" height="400">
|
|
23
|
-
* <rect x="43" y="304" rx="4" ry="4" width="271" height="9" />
|
|
24
|
-
* <rect x="44" y="323" rx="3" ry="3" width="119" height="6" />
|
|
25
|
-
* <rect x="42" y="77" rx="10" ry="10" width="388" height="217" />
|
|
26
|
-
* </svg>`
|
|
27
|
-
* </SkeletonRow>
|
|
28
|
-
* </Skeleton>
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
export declare const SVG: Story;
|
|
32
|
-
/**
|
|
33
|
-
* Use a Row HTML element
|
|
34
|
-
*
|
|
35
|
-
* ```tsx
|
|
36
|
-
* <Skeleton>
|
|
37
|
-
* <SkeletonRow variant="row" size="medium" />
|
|
38
|
-
* <SkeletonRow variant="row" size="medium" />
|
|
39
|
-
* <SkeletonRow variant="row" size="medium" />
|
|
40
|
-
* </Skeleton>
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
|
-
export declare const Rows: Story;
|
|
44
|
-
/**
|
|
45
|
-
* Use a Heading HTML element
|
|
46
|
-
*
|
|
47
|
-
* ```tsx
|
|
48
|
-
* <Skeleton>
|
|
49
|
-
* <SkeletonRow variant="heading" size="medium" />
|
|
50
|
-
* </Skeleton>
|
|
51
|
-
* ```
|
|
52
|
-
*/
|
|
53
|
-
export declare const Headings: Story;
|
|
54
|
-
/**
|
|
55
|
-
* HTML Example
|
|
56
|
-
*
|
|
57
|
-
* ```tsx
|
|
58
|
-
* <Skeleton>
|
|
59
|
-
* <SkeletonRow variant="heading" size="medium" />
|
|
60
|
-
* <SkeletonRow variant="empty" size="medium" />
|
|
61
|
-
* <SkeletonRow size="medium" fullWidth={true} />
|
|
62
|
-
* <SkeletonRow size="medium" fullWidth={true} lines={3} />
|
|
63
|
-
* </Skeleton>
|
|
64
|
-
* ```
|
|
65
|
-
*/
|
|
66
|
-
export declare const HTMLExample: Story;
|
|
67
|
-
//# sourceMappingURL=Skeleton.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAEL,aAAa,EAEb,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAGpB;;GAEG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,gBAAgB,GAAG,aAAa,CA0DhD,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,gBAAgB,GAAG,aAAa,CAAC,CAAC;AAExD;;;;;;GAMG;AAEH;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,GAAG,EAAE,KAyBjB,CAAC;AAEF;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,IAAI,EAAE,KAkClB,CAAC;AAEF;;;;;;;;GAQG;AAEH,eAAO,MAAM,QAAQ,EAAE,KAoBtB,CAAC;AAEF;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,WAAW,EAAE,KAmCzB,CAAC"}
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import { Skeleton, SkeletonRow, } from './Skeleton';
|
|
2
|
-
import { expect } from '@storybook/jest';
|
|
3
|
-
/**
|
|
4
|
-
* Use Skeletons to display content placeholders while content is loading.
|
|
5
|
-
*/
|
|
6
|
-
const meta = {
|
|
7
|
-
title: 'Components/Skeleton',
|
|
8
|
-
component: Skeleton,
|
|
9
|
-
argTypes: {
|
|
10
|
-
size: {
|
|
11
|
-
type: 'string',
|
|
12
|
-
options: ['xsmall', 'small', 'medium', 'large', 'xlarge'],
|
|
13
|
-
control: {
|
|
14
|
-
type: 'radio',
|
|
15
|
-
},
|
|
16
|
-
defaultValue: {
|
|
17
|
-
summary: 'small',
|
|
18
|
-
},
|
|
19
|
-
description: 'Size of the skeleton',
|
|
20
|
-
},
|
|
21
|
-
variant: {
|
|
22
|
-
type: 'string',
|
|
23
|
-
options: ['row', 'heading', 'empty'],
|
|
24
|
-
control: { type: 'radio' },
|
|
25
|
-
defaultValue: {
|
|
26
|
-
summary: 'row',
|
|
27
|
-
},
|
|
28
|
-
description: 'Variant of the skeleton',
|
|
29
|
-
},
|
|
30
|
-
fullWidth: {
|
|
31
|
-
type: 'boolean',
|
|
32
|
-
defaultValue: {
|
|
33
|
-
summary: 'false',
|
|
34
|
-
},
|
|
35
|
-
description: 'Stretch the skeleton to full width',
|
|
36
|
-
},
|
|
37
|
-
lines: {
|
|
38
|
-
type: 'number',
|
|
39
|
-
defaultValue: {
|
|
40
|
-
summary: '1',
|
|
41
|
-
},
|
|
42
|
-
description: 'No. of times to repeat the row',
|
|
43
|
-
},
|
|
44
|
-
multilineGap: {
|
|
45
|
-
type: 'string',
|
|
46
|
-
options: ['xsmall', 'small', 'medium', 'big', 'xbig'],
|
|
47
|
-
control: { type: 'radio' },
|
|
48
|
-
defaultValue: {
|
|
49
|
-
summary: 'medium',
|
|
50
|
-
},
|
|
51
|
-
description: 'Vertical gap between multiline items',
|
|
52
|
-
},
|
|
53
|
-
rowGap: {
|
|
54
|
-
type: 'string',
|
|
55
|
-
options: ['xsmall', 'small', 'medium', 'big', 'xbig'],
|
|
56
|
-
control: { type: 'radio' },
|
|
57
|
-
defaultValue: {
|
|
58
|
-
summary: 'medium',
|
|
59
|
-
},
|
|
60
|
-
description: 'Horizontal and vertical gap between SkeletonRows',
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
decorators: [(Story) => <div style={{ width: '400px' }}>{Story()}</div>],
|
|
64
|
-
};
|
|
65
|
-
export default meta;
|
|
66
|
-
/**
|
|
67
|
-
* Import the component to use in your components:
|
|
68
|
-
*
|
|
69
|
-
* ```ts
|
|
70
|
-
* import { Skeleton, SkeletonRow } from '@adobe/elsie/components';
|
|
71
|
-
* ```
|
|
72
|
-
*/
|
|
73
|
-
/**
|
|
74
|
-
* Pass in an SVG element as a child to render a shimmering skeleton version of it.
|
|
75
|
-
*
|
|
76
|
-
* ```tsx
|
|
77
|
-
* <Skeleton>
|
|
78
|
-
* <SkeletonRow>
|
|
79
|
-
* `<svg width="450" height="400">
|
|
80
|
-
* <rect x="43" y="304" rx="4" ry="4" width="271" height="9" />
|
|
81
|
-
* <rect x="44" y="323" rx="3" ry="3" width="119" height="6" />
|
|
82
|
-
* <rect x="42" y="77" rx="10" ry="10" width="388" height="217" />
|
|
83
|
-
* </svg>`
|
|
84
|
-
* </SkeletonRow>
|
|
85
|
-
* </Skeleton>
|
|
86
|
-
* ```
|
|
87
|
-
*/
|
|
88
|
-
export const SVG = {
|
|
89
|
-
args: {
|
|
90
|
-
children: `<svg width="450" height="400">
|
|
91
|
-
<rect x="43" y="304" rx="4" ry="4" width="271" height="9" />
|
|
92
|
-
<rect x="44" y="323" rx="3" ry="3" width="119" height="6" />
|
|
93
|
-
<rect x="42" y="77" rx="10" ry="10" width="388" height="217" />
|
|
94
|
-
</svg>`,
|
|
95
|
-
},
|
|
96
|
-
render: (args) => {
|
|
97
|
-
return (<Skeleton>
|
|
98
|
-
<SkeletonRow>{args.children}</SkeletonRow>
|
|
99
|
-
</Skeleton>);
|
|
100
|
-
},
|
|
101
|
-
play: async () => {
|
|
102
|
-
const skeleton = document.querySelector('.dropin-skeleton');
|
|
103
|
-
const skeletonRow = document.querySelector('.dropin-skeleton-row');
|
|
104
|
-
await expect(skeleton).toBeVisible();
|
|
105
|
-
await expect(skeletonRow).toBeVisible();
|
|
106
|
-
},
|
|
107
|
-
};
|
|
108
|
-
/**
|
|
109
|
-
* Use a Row HTML element
|
|
110
|
-
*
|
|
111
|
-
* ```tsx
|
|
112
|
-
* <Skeleton>
|
|
113
|
-
* <SkeletonRow variant="row" size="medium" />
|
|
114
|
-
* <SkeletonRow variant="row" size="medium" />
|
|
115
|
-
* <SkeletonRow variant="row" size="medium" />
|
|
116
|
-
* </Skeleton>
|
|
117
|
-
* ```
|
|
118
|
-
*/
|
|
119
|
-
export const Rows = {
|
|
120
|
-
args: {
|
|
121
|
-
size: 'medium',
|
|
122
|
-
variant: 'row',
|
|
123
|
-
multilineGap: 'medium',
|
|
124
|
-
rowGap: 'medium',
|
|
125
|
-
},
|
|
126
|
-
render: (args) => {
|
|
127
|
-
return (<Skeleton rowGap={args.rowGap}>
|
|
128
|
-
<SkeletonRow variant={args.variant} size={args.size} fullWidth={args.fullWidth} lines={args.lines} multilineGap={args.multilineGap}/>
|
|
129
|
-
<SkeletonRow variant={args.variant} size={args.size} fullWidth={args.fullWidth} lines={args.lines} multilineGap={args.multilineGap}/>
|
|
130
|
-
<SkeletonRow variant={args.variant} size={args.size} fullWidth={args.fullWidth} lines={args.lines} multilineGap={args.multilineGap}/>
|
|
131
|
-
</Skeleton>);
|
|
132
|
-
},
|
|
133
|
-
};
|
|
134
|
-
/**
|
|
135
|
-
* Use a Heading HTML element
|
|
136
|
-
*
|
|
137
|
-
* ```tsx
|
|
138
|
-
* <Skeleton>
|
|
139
|
-
* <SkeletonRow variant="heading" size="medium" />
|
|
140
|
-
* </Skeleton>
|
|
141
|
-
* ```
|
|
142
|
-
*/
|
|
143
|
-
export const Headings = {
|
|
144
|
-
args: {
|
|
145
|
-
size: 'medium',
|
|
146
|
-
variant: 'heading',
|
|
147
|
-
multilineGap: 'medium',
|
|
148
|
-
rowGap: 'medium',
|
|
149
|
-
},
|
|
150
|
-
render: (args) => {
|
|
151
|
-
return (<Skeleton rowGap={args.rowGap}>
|
|
152
|
-
<SkeletonRow variant={args.variant} size={args.size} fullWidth={args.fullWidth} lines={args.lines} multilineGap={args.multilineGap}/>
|
|
153
|
-
</Skeleton>);
|
|
154
|
-
},
|
|
155
|
-
};
|
|
156
|
-
/**
|
|
157
|
-
* HTML Example
|
|
158
|
-
*
|
|
159
|
-
* ```tsx
|
|
160
|
-
* <Skeleton>
|
|
161
|
-
* <SkeletonRow variant="heading" size="medium" />
|
|
162
|
-
* <SkeletonRow variant="empty" size="medium" />
|
|
163
|
-
* <SkeletonRow size="medium" fullWidth={true} />
|
|
164
|
-
* <SkeletonRow size="medium" fullWidth={true} lines={3} />
|
|
165
|
-
* </Skeleton>
|
|
166
|
-
* ```
|
|
167
|
-
*/
|
|
168
|
-
export const HTMLExample = {
|
|
169
|
-
args: {
|
|
170
|
-
size: 'medium',
|
|
171
|
-
multilineGap: 'medium',
|
|
172
|
-
rowGap: 'medium',
|
|
173
|
-
},
|
|
174
|
-
render: (args) => {
|
|
175
|
-
return (<Skeleton rowGap={args.rowGap}>
|
|
176
|
-
<SkeletonRow variant={'heading'} size={args.size} multilineGap={args.multilineGap}/>
|
|
177
|
-
<SkeletonRow variant={'empty'} size={args.size} multilineGap={args.multilineGap}/>
|
|
178
|
-
<SkeletonRow size={args.size} fullWidth={true} multilineGap={args.multilineGap}/>
|
|
179
|
-
<SkeletonRow size={args.size} fullWidth={true} lines={3} multilineGap={args.multilineGap}/>
|
|
180
|
-
<SkeletonRow size={args.size} multilineGap={args.multilineGap}/>
|
|
181
|
-
<SkeletonRow size={args.size} multilineGap={args.multilineGap}/>
|
|
182
|
-
</Skeleton>);
|
|
183
|
-
},
|
|
184
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.test.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.test.tsx"],"names":[],"mappings":"AAAA,6DAA6D"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/** https://preactjs.com/guide/v10/preact-testing-library/ */
|
|
2
|
-
import { render } from '@adobe/elsie/lib/tests';
|
|
3
|
-
import { Skeleton, SkeletonRow } from '@adobe/elsie/components';
|
|
4
|
-
describe('Foundations/Assets/Skeleton', () => {
|
|
5
|
-
test('renders if it has children', () => {
|
|
6
|
-
const { container } = render(<Skeleton>
|
|
7
|
-
<SkeletonRow>{`<svg />`}</SkeletonRow>
|
|
8
|
-
</Skeleton>);
|
|
9
|
-
const elem = container.querySelector('.dropin-skeleton-row');
|
|
10
|
-
expect(!!elem).toEqual(true);
|
|
11
|
-
});
|
|
12
|
-
test('renders empty if missing children && params', () => {
|
|
13
|
-
// @ts-ignore
|
|
14
|
-
const { container } = render(<Skeleton>
|
|
15
|
-
<SkeletonRow />
|
|
16
|
-
</Skeleton>);
|
|
17
|
-
const elem = container.querySelector('.dropin-skeleton-row__empty');
|
|
18
|
-
expect(!!elem).toEqual(false);
|
|
19
|
-
});
|
|
20
|
-
test('render with row html element', () => {
|
|
21
|
-
const { container } = render(<Skeleton>
|
|
22
|
-
<SkeletonRow variant="row" size="small"/>
|
|
23
|
-
</Skeleton>);
|
|
24
|
-
const elem = container.querySelector('.dropin-skeleton'), row = container.querySelector('.dropin-skeleton-row__row');
|
|
25
|
-
expect(!!elem && !!row).toEqual(true);
|
|
26
|
-
});
|
|
27
|
-
test('render with heading html element', () => {
|
|
28
|
-
const { container } = render(<Skeleton>
|
|
29
|
-
<SkeletonRow variant="heading" size="small"/>
|
|
30
|
-
</Skeleton>);
|
|
31
|
-
const elem = container.querySelector('.dropin-skeleton'), row = container.querySelector('.dropin-skeleton-row__heading');
|
|
32
|
-
expect(!!elem && !!row).toEqual(true);
|
|
33
|
-
});
|
|
34
|
-
test('render multiline skeleton row', () => {
|
|
35
|
-
const { container } = render(<Skeleton>
|
|
36
|
-
<SkeletonRow variant="row" size="medium" lines={5}/>
|
|
37
|
-
</Skeleton>);
|
|
38
|
-
const elem = container.querySelector('.dropin-skeleton'), rows = container.querySelectorAll('.dropin-skeleton-row__row-medium');
|
|
39
|
-
expect(!!elem && !!(rows.length === 5)).toEqual(true);
|
|
40
|
-
});
|
|
41
|
-
test('render full width skeleton row', () => {
|
|
42
|
-
const { container } = render(<Skeleton>
|
|
43
|
-
<SkeletonRow variant="row" size="small" fullWidth/>
|
|
44
|
-
</Skeleton>);
|
|
45
|
-
const elem = container.querySelector('.dropin-skeleton'), row = container.querySelector('.dropin-skeleton-row--full');
|
|
46
|
-
expect(!!elem && !!row).toEqual(true);
|
|
47
|
-
});
|
|
48
|
-
test('render empty skeleton row', () => {
|
|
49
|
-
const { container } = render(<Skeleton>
|
|
50
|
-
<SkeletonRow variant="empty"/>
|
|
51
|
-
</Skeleton>);
|
|
52
|
-
const elem = container.querySelector('.dropin-skeleton'), row = container.querySelector('.dropin-skeleton-row__empty');
|
|
53
|
-
expect(!!elem && !!row).toEqual(true);
|
|
54
|
-
});
|
|
55
|
-
test('render skeleton with gaps', () => {
|
|
56
|
-
const { container } = render(<Skeleton rowGap={'big'}>
|
|
57
|
-
<SkeletonRow variant="row" size="medium" lines={5} multilineGap={'big'}/>
|
|
58
|
-
</Skeleton>);
|
|
59
|
-
const elem = container.querySelector('.dropin-skeleton'), rows = container.querySelectorAll('.dropin-skeleton-row__row-medium');
|
|
60
|
-
expect(!!elem && !!rows && !!(rows.length === 5)).toEqual(true);
|
|
61
|
-
});
|
|
62
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":"AAAA,cAAc,2CAA2C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@adobe/elsie/components/Skeleton/Skeleton';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent } from 'preact';
|
|
2
|
-
import { HTMLAttributes } from 'preact/compat';
|
|
3
|
-
import '@adobe/elsie/components/TextSwatch/TextSwatch.css';
|
|
4
|
-
export interface TextSwatchProps extends Omit<HTMLAttributes<HTMLInputElement>, 'label'> {
|
|
5
|
-
name?: string;
|
|
6
|
-
label: string;
|
|
7
|
-
groupAriaLabel?: string;
|
|
8
|
-
value?: string;
|
|
9
|
-
id: string;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
selected?: boolean;
|
|
12
|
-
outOfStock?: boolean;
|
|
13
|
-
multi?: boolean;
|
|
14
|
-
onValue?: (value: any) => void;
|
|
15
|
-
onUpdateError?: (error: Error) => void;
|
|
16
|
-
}
|
|
17
|
-
export declare const TextSwatch: FunctionComponent<TextSwatchProps>;
|
|
18
|
-
//# sourceMappingURL=TextSwatch.d.ts.map
|