@shopify/ui-extensions 2.0.0-alpha.2 → 2022.10.1
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/build/cjs/index.js +1 -43
- package/build/cjs/surfaces/checkout/components/Banner/Banner.js +12 -0
- package/build/cjs/surfaces/checkout/components/BlockLayout/BlockLayout.js +14 -0
- package/build/cjs/surfaces/checkout/components/BlockSpacer/BlockSpacer.js +15 -0
- package/build/cjs/surfaces/checkout/components/BlockStack/BlockStack.js +12 -0
- package/build/cjs/surfaces/checkout/components/Button/Button.js +12 -0
- package/build/cjs/surfaces/checkout/components/Checkbox/Checkbox.js +12 -0
- package/build/cjs/surfaces/checkout/components/Choice/Choice.js +13 -0
- package/build/cjs/surfaces/checkout/components/ChoiceList/ChoiceList.js +13 -0
- package/build/cjs/surfaces/checkout/components/Divider/Divider.js +12 -0
- package/build/cjs/surfaces/checkout/components/Form/Form.js +20 -0
- package/build/cjs/surfaces/checkout/components/Grid/Grid.js +12 -0
- package/build/cjs/surfaces/checkout/components/GridItem/GridItem.js +14 -0
- package/build/cjs/surfaces/checkout/components/Heading/Heading.js +17 -0
- package/build/cjs/surfaces/checkout/components/HeadingGroup/HeadingGroup.js +16 -0
- package/build/cjs/surfaces/checkout/components/Icon/Icon.js +13 -0
- package/build/cjs/surfaces/checkout/components/Image/Image.js +12 -0
- package/build/cjs/surfaces/checkout/components/InlineLayout/InlineLayout.js +16 -0
- package/build/cjs/surfaces/checkout/components/InlineSpacer/InlineSpacer.js +15 -0
- package/build/cjs/surfaces/checkout/components/InlineStack/InlineStack.js +12 -0
- package/build/cjs/surfaces/checkout/components/Link/Link.js +12 -0
- package/build/cjs/surfaces/checkout/components/List/List.js +12 -0
- package/build/cjs/surfaces/checkout/components/ListItem/ListItem.js +14 -0
- package/build/cjs/surfaces/checkout/components/PhoneField/PhoneField.js +17 -0
- package/build/cjs/surfaces/checkout/components/Pressable/Pressable.js +14 -0
- package/build/cjs/surfaces/checkout/components/ScrollView/ScrollView.js +13 -0
- package/build/cjs/surfaces/checkout/components/Select/Select.js +13 -0
- package/build/cjs/surfaces/checkout/components/SkeletonImage/SkeletonImage.js +12 -0
- package/build/cjs/surfaces/checkout/components/SkeletonText/SkeletonText.js +12 -0
- package/build/cjs/surfaces/checkout/components/SkeletonTextBlock/SkeletonTextBlock.js +12 -0
- package/build/cjs/surfaces/checkout/components/Spinner/Spinner.js +13 -0
- package/build/cjs/surfaces/checkout/components/Stepper/Stepper.js +12 -0
- package/build/cjs/surfaces/checkout/components/Tag/Tag.js +12 -0
- package/build/cjs/surfaces/checkout/components/Text/Text.js +13 -0
- package/build/cjs/surfaces/checkout/components/TextBlock/TextBlock.js +12 -0
- package/build/cjs/surfaces/checkout/components/TextField/TextField.js +12 -0
- package/build/cjs/surfaces/checkout/components/Tooltip/Tooltip.js +17 -0
- package/build/cjs/surfaces/checkout/components/View/View.js +17 -0
- package/build/cjs/surfaces/checkout/extension.js +5 -23
- package/build/cjs/surfaces/checkout/index.js +82 -65
- package/build/cjs/surfaces/checkout/style/isEqual.js +29 -0
- package/build/cjs/surfaces/checkout/style/memoize.js +138 -0
- package/build/cjs/surfaces/checkout/style/style.js +74 -0
- package/build/cjs/utilities/registration.js +8 -98
- package/build/esm/index.mjs +1 -3
- package/build/esm/surfaces/checkout/components/Banner/Banner.mjs +8 -0
- package/build/esm/surfaces/checkout/components/BlockLayout/BlockLayout.mjs +10 -0
- package/build/esm/surfaces/checkout/components/BlockSpacer/BlockSpacer.mjs +11 -0
- package/build/esm/surfaces/checkout/components/BlockStack/BlockStack.mjs +8 -0
- package/build/esm/surfaces/checkout/components/Button/Button.mjs +8 -0
- package/build/esm/surfaces/checkout/components/Checkbox/Checkbox.mjs +8 -0
- package/build/esm/surfaces/checkout/components/Choice/Choice.mjs +9 -0
- package/build/esm/surfaces/checkout/components/ChoiceList/ChoiceList.mjs +9 -0
- package/build/esm/surfaces/checkout/components/Divider/Divider.mjs +8 -0
- package/build/esm/surfaces/checkout/components/Form/Form.mjs +16 -0
- package/build/esm/surfaces/checkout/components/Grid/Grid.mjs +8 -0
- package/build/esm/surfaces/checkout/components/GridItem/GridItem.mjs +10 -0
- package/build/esm/surfaces/checkout/components/Heading/Heading.mjs +13 -0
- package/build/esm/surfaces/checkout/components/HeadingGroup/HeadingGroup.mjs +12 -0
- package/build/esm/surfaces/checkout/components/Icon/Icon.mjs +9 -0
- package/build/esm/surfaces/checkout/components/Image/Image.mjs +8 -0
- package/build/esm/surfaces/checkout/components/InlineLayout/InlineLayout.mjs +12 -0
- package/build/esm/surfaces/checkout/components/InlineSpacer/InlineSpacer.mjs +11 -0
- package/build/esm/surfaces/checkout/components/InlineStack/InlineStack.mjs +8 -0
- package/build/esm/surfaces/checkout/components/Link/Link.mjs +8 -0
- package/build/esm/surfaces/checkout/components/List/List.mjs +8 -0
- package/build/esm/surfaces/checkout/components/ListItem/ListItem.mjs +10 -0
- package/build/esm/surfaces/checkout/components/PhoneField/PhoneField.mjs +13 -0
- package/build/esm/surfaces/checkout/components/Pressable/Pressable.mjs +10 -0
- package/build/esm/surfaces/checkout/components/ScrollView/ScrollView.mjs +9 -0
- package/build/esm/surfaces/checkout/components/Select/Select.mjs +9 -0
- package/build/esm/surfaces/checkout/components/SkeletonImage/SkeletonImage.mjs +8 -0
- package/build/esm/surfaces/checkout/components/SkeletonText/SkeletonText.mjs +8 -0
- package/build/esm/surfaces/checkout/components/SkeletonTextBlock/SkeletonTextBlock.mjs +8 -0
- package/build/esm/surfaces/checkout/components/Spinner/Spinner.mjs +9 -0
- package/build/esm/surfaces/checkout/components/Stepper/Stepper.mjs +8 -0
- package/build/esm/surfaces/checkout/components/Tag/Tag.mjs +8 -0
- package/build/esm/surfaces/checkout/components/Text/Text.mjs +9 -0
- package/build/esm/surfaces/checkout/components/TextBlock/TextBlock.mjs +8 -0
- package/build/esm/surfaces/checkout/components/TextField/TextField.mjs +8 -0
- package/build/esm/surfaces/checkout/components/Tooltip/Tooltip.mjs +13 -0
- package/build/esm/surfaces/checkout/components/View/View.mjs +13 -0
- package/build/esm/surfaces/checkout/extension.mjs +5 -3
- package/build/esm/surfaces/checkout/index.mjs +39 -5
- package/build/esm/surfaces/checkout/style/isEqual.mjs +25 -0
- package/build/esm/surfaces/checkout/style/memoize.mjs +132 -0
- package/build/esm/surfaces/checkout/style/style.mjs +68 -0
- package/build/esm/utilities/registration.mjs +7 -92
- package/build/esnext/index.esnext +1 -3
- package/build/esnext/surfaces/checkout/components/Banner/Banner.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/BlockLayout/BlockLayout.esnext +10 -0
- package/build/esnext/surfaces/checkout/components/BlockSpacer/BlockSpacer.esnext +11 -0
- package/build/esnext/surfaces/checkout/components/BlockStack/BlockStack.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/Button/Button.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/Checkbox/Checkbox.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/Choice/Choice.esnext +9 -0
- package/build/esnext/surfaces/checkout/components/ChoiceList/ChoiceList.esnext +9 -0
- package/build/esnext/surfaces/checkout/components/Divider/Divider.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/Form/Form.esnext +16 -0
- package/build/esnext/surfaces/checkout/components/Grid/Grid.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/GridItem/GridItem.esnext +10 -0
- package/build/esnext/surfaces/checkout/components/Heading/Heading.esnext +13 -0
- package/build/esnext/surfaces/checkout/components/HeadingGroup/HeadingGroup.esnext +12 -0
- package/build/esnext/surfaces/checkout/components/Icon/Icon.esnext +9 -0
- package/build/esnext/surfaces/checkout/components/Image/Image.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/InlineLayout/InlineLayout.esnext +12 -0
- package/build/esnext/surfaces/checkout/components/InlineSpacer/InlineSpacer.esnext +11 -0
- package/build/esnext/surfaces/checkout/components/InlineStack/InlineStack.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/Link/Link.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/List/List.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/ListItem/ListItem.esnext +10 -0
- package/build/esnext/surfaces/checkout/components/PhoneField/PhoneField.esnext +13 -0
- package/build/esnext/surfaces/checkout/components/Pressable/Pressable.esnext +10 -0
- package/build/esnext/surfaces/checkout/components/ScrollView/ScrollView.esnext +9 -0
- package/build/esnext/surfaces/checkout/components/Select/Select.esnext +9 -0
- package/build/esnext/surfaces/checkout/components/SkeletonImage/SkeletonImage.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/SkeletonText/SkeletonText.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/SkeletonTextBlock/SkeletonTextBlock.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/Spinner/Spinner.esnext +9 -0
- package/build/esnext/surfaces/checkout/components/Stepper/Stepper.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/Tag/Tag.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/Text/Text.esnext +9 -0
- package/build/esnext/surfaces/checkout/components/TextBlock/TextBlock.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/TextField/TextField.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/Tooltip/Tooltip.esnext +13 -0
- package/build/esnext/surfaces/checkout/components/View/View.esnext +13 -0
- package/build/esnext/surfaces/checkout/extension.esnext +5 -3
- package/build/esnext/surfaces/checkout/index.esnext +39 -5
- package/build/esnext/surfaces/checkout/style/isEqual.esnext +25 -0
- package/build/esnext/surfaces/checkout/style/memoize.esnext +132 -0
- package/build/esnext/surfaces/checkout/style/style.esnext +68 -0
- package/build/esnext/utilities/registration.esnext +7 -28
- package/build/ts/api.d.ts +0 -4
- package/build/ts/api.d.ts.map +1 -1
- package/build/ts/extension.d.ts +2 -9
- package/build/ts/extension.d.ts.map +1 -1
- package/build/ts/index.d.ts +1 -1
- package/build/ts/index.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/cart-line-details/render-after.d.ts +6 -3
- package/build/ts/surfaces/checkout/api/cart-line-details/render-after.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/shared.d.ts +4 -3
- package/build/ts/surfaces/checkout/api/shared.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts +1046 -2
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Banner/Banner.d.ts +38 -0
- package/build/ts/surfaces/checkout/components/Banner/Banner.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Banner/examples/basic-banner.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/Banner/examples/basic-banner.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/BlockLayout/BlockLayout.d.ts +41 -0
- package/build/ts/surfaces/checkout/components/BlockLayout/BlockLayout.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/BlockLayout/examples/basic-blockLayout.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/BlockLayout/examples/basic-blockLayout.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/BlockSpacer/BlockSpacer.d.ts +22 -0
- package/build/ts/surfaces/checkout/components/BlockSpacer/BlockSpacer.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/BlockSpacer/examples/basic-blockspacer.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/BlockSpacer/examples/basic-blockspacer.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/BlockStack/BlockStack.d.ts +42 -0
- package/build/ts/surfaces/checkout/components/BlockStack/BlockStack.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/BlockStack/examples/basic-blockstack.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/BlockStack/examples/basic-blockstack.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Button/Button.d.ts +83 -0
- package/build/ts/surfaces/checkout/components/Button/Button.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Button/examples/basic-button.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/Button/examples/basic-button.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Checkbox/Checkbox.d.ts +59 -0
- package/build/ts/surfaces/checkout/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Checkbox/examples/basic-checkbox.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/Checkbox/examples/basic-checkbox.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Choice/Choice.d.ts +27 -0
- package/build/ts/surfaces/checkout/components/Choice/Choice.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Choice/examples/basic-choice.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/Choice/examples/basic-choice.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/ChoiceList/ChoiceList.d.ts +32 -0
- package/build/ts/surfaces/checkout/components/ChoiceList/ChoiceList.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/ChoiceList/examples/basic-choicelist.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/ChoiceList/examples/basic-choicelist.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Divider/Divider.d.ts +30 -0
- package/build/ts/surfaces/checkout/components/Divider/Divider.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Divider/examples/basic-divider.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/Divider/examples/basic-divider.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Form/Form.d.ts +32 -0
- package/build/ts/surfaces/checkout/components/Form/Form.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Form/examples/basic-form.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/Form/examples/basic-form.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Grid/Grid.d.ts +95 -0
- package/build/ts/surfaces/checkout/components/Grid/Grid.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Grid/examples/basic-grid.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/Grid/examples/basic-grid.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/GridItem/GridItem.d.ts +36 -0
- package/build/ts/surfaces/checkout/components/GridItem/GridItem.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/GridItem/examples/basic-griditem.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/GridItem/examples/basic-griditem.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Heading/Heading.d.ts +43 -0
- package/build/ts/surfaces/checkout/components/Heading/Heading.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Heading/examples/basic-heading.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/Heading/examples/basic-heading.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/HeadingGroup/HeadingGroup.d.ts +15 -0
- package/build/ts/surfaces/checkout/components/HeadingGroup/HeadingGroup.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/HeadingGroup/examples/basic-headinggroup.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/HeadingGroup/examples/basic-headinggroup.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Icon/Icon.d.ts +38 -0
- package/build/ts/surfaces/checkout/components/Icon/Icon.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Icon/examples/basic-icon.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/Icon/examples/basic-icon.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Image/Image.d.ts +73 -0
- package/build/ts/surfaces/checkout/components/Image/Image.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Image/examples/basic-image.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/Image/examples/basic-image.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/InlineLayout/InlineLayout.d.ts +43 -0
- package/build/ts/surfaces/checkout/components/InlineLayout/InlineLayout.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/InlineLayout/examples/basic-inlineLayout.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/InlineLayout/examples/basic-inlineLayout.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/InlineSpacer/InlineSpacer.d.ts +22 -0
- package/build/ts/surfaces/checkout/components/InlineSpacer/InlineSpacer.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/InlineSpacer/examples/basic-inlinespacer.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/InlineSpacer/examples/basic-inlinespacer.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/InlineStack/InlineStack.d.ts +50 -0
- package/build/ts/surfaces/checkout/components/InlineStack/InlineStack.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/InlineStack/examples/basic-inlinestack.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/InlineStack/examples/basic-inlinestack.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Link/Link.d.ts +50 -0
- package/build/ts/surfaces/checkout/components/Link/Link.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Link/examples/basic-link.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/Link/examples/basic-link.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/List/List.d.ts +32 -0
- package/build/ts/surfaces/checkout/components/List/List.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/List/examples/basic-list.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/List/examples/basic-list.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/ListItem/ListItem.d.ts +13 -0
- package/build/ts/surfaces/checkout/components/ListItem/ListItem.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/ListItem/examples/basic-listitem.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/ListItem/examples/basic-listitem.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/PhoneField/PhoneField.d.ts +58 -0
- package/build/ts/surfaces/checkout/components/PhoneField/PhoneField.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/PhoneField/examples/basic-phonefield.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/PhoneField/examples/basic-phonefield.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Pressable/Pressable.d.ts +96 -0
- package/build/ts/surfaces/checkout/components/Pressable/Pressable.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Pressable/examples/basic-pressable.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/Pressable/examples/basic-pressable.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/ScrollView/ScrollView.d.ts +74 -0
- package/build/ts/surfaces/checkout/components/ScrollView/ScrollView.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/ScrollView/examples/basic-scrollview.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/ScrollView/examples/basic-scrollview.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Select/Select.d.ts +98 -0
- package/build/ts/surfaces/checkout/components/Select/Select.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Select/examples/basic-select.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/Select/examples/basic-select.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/SkeletonImage/SkeletonImage.d.ts +25 -0
- package/build/ts/surfaces/checkout/components/SkeletonImage/SkeletonImage.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/SkeletonImage/examples/basic-skeletonimage.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/SkeletonImage/examples/basic-skeletonimage.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/SkeletonText/SkeletonText.d.ts +21 -0
- package/build/ts/surfaces/checkout/components/SkeletonText/SkeletonText.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/SkeletonText/examples/basic-skeletontext.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/SkeletonText/examples/basic-skeletontext.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/SkeletonTextBlock/SkeletonTextBlock.d.ts +22 -0
- package/build/ts/surfaces/checkout/components/SkeletonTextBlock/SkeletonTextBlock.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/SkeletonTextBlock/examples/basic-skeletontextblock.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/SkeletonTextBlock/examples/basic-skeletontextblock.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Spinner/Spinner.d.ts +32 -0
- package/build/ts/surfaces/checkout/components/Spinner/Spinner.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Spinner/examples/basic-spinner.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/Spinner/examples/basic-spinner.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Stepper/Stepper.d.ts +42 -0
- package/build/ts/surfaces/checkout/components/Stepper/Stepper.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Stepper/examples/basic-stepper.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/Stepper/examples/basic-stepper.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Tag/Tag.d.ts +31 -0
- package/build/ts/surfaces/checkout/components/Tag/Tag.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Tag/examples/basic-tag.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/Tag/examples/basic-tag.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Text/Text.d.ts +34 -0
- package/build/ts/surfaces/checkout/components/Text/Text.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Text/examples/basic-text.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/Text/examples/basic-text.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/TextBlock/TextBlock.d.ts +32 -0
- package/build/ts/surfaces/checkout/components/TextBlock/TextBlock.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/TextBlock/examples/basic-textblock.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/TextBlock/examples/basic-textblock.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/TextField/TextField.d.ts +175 -0
- package/build/ts/surfaces/checkout/components/TextField/TextField.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/TextField/examples/basic-textfield.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/TextField/examples/basic-textfield.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Tooltip/Tooltip.d.ts +16 -0
- package/build/ts/surfaces/checkout/components/Tooltip/Tooltip.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Tooltip/examples/basic-tooltip.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/Tooltip/examples/basic-tooltip.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/View/View.d.ts +169 -0
- package/build/ts/surfaces/checkout/components/View/View.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/View/examples/basic-view.example.d.ts +2 -0
- package/build/ts/surfaces/checkout/components/View/examples/basic-view.example.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/shared.d.ts +388 -0
- package/build/ts/surfaces/checkout/components/shared.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components.d.ts +75 -1
- package/build/ts/surfaces/checkout/components.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/extension-points.d.ts +50 -2
- package/build/ts/surfaces/checkout/extension-points.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/globals.d.ts +11 -0
- package/build/ts/surfaces/checkout/globals.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/index.d.ts +2 -0
- package/build/ts/surfaces/checkout/index.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/shared.d.ts +3 -3
- package/build/ts/surfaces/checkout/shared.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/style/isEqual.d.ts +8 -0
- package/build/ts/surfaces/checkout/style/isEqual.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/style/isEqual.test.d.ts +2 -0
- package/build/ts/surfaces/checkout/style/isEqual.test.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/style/memoize.d.ts +13 -0
- package/build/ts/surfaces/checkout/style/memoize.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/style/style.d.ts +70 -0
- package/build/ts/surfaces/checkout/style/style.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/style/style.test.d.ts +2 -0
- package/build/ts/surfaces/checkout/style/style.test.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/style/types.d.ts +46 -0
- package/build/ts/surfaces/checkout/style/types.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/style.d.ts +3 -0
- package/build/ts/surfaces/checkout/style.d.ts.map +1 -0
- package/build/ts/utilities/registration.d.ts +1 -2
- package/build/ts/utilities/registration.d.ts.map +1 -1
- package/checkout.esnext +1 -1
- package/checkout.js +1 -1
- package/checkout.mjs +1 -1
- package/index.esnext +1 -1
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +17 -11
- package/src/api.ts +0 -5
- package/src/extension.ts +3 -29
- package/src/index.ts +1 -1
- package/src/surfaces/checkout/api/cart-line-details/render-after.ts +7 -3
- package/src/surfaces/checkout/api/shared.ts +810 -3
- package/src/surfaces/checkout/api/standard/standard.ts +1240 -2
- package/src/surfaces/checkout/components/Banner/Banner.ts +37 -0
- package/src/surfaces/checkout/components/Banner/README.md +14 -0
- package/src/surfaces/checkout/components/Banner/content/guidelines.md +9 -0
- package/src/surfaces/checkout/components/Banner/examples/basic-banner.example.ts +11 -0
- package/src/surfaces/checkout/components/BlockLayout/BlockLayout.ts +43 -0
- package/src/surfaces/checkout/components/BlockLayout/README.md +101 -0
- package/src/surfaces/checkout/components/BlockLayout/examples/basic-blockLayout.example.ts +16 -0
- package/src/surfaces/checkout/components/BlockSpacer/BlockSpacer.ts +25 -0
- package/src/surfaces/checkout/components/BlockSpacer/README.md +14 -0
- package/src/surfaces/checkout/components/BlockSpacer/examples/basic-blockspacer.example.ts +11 -0
- package/src/surfaces/checkout/components/BlockStack/BlockStack.ts +53 -0
- package/src/surfaces/checkout/components/BlockStack/README.md +77 -0
- package/src/surfaces/checkout/components/BlockStack/examples/basic-blockstack.example.ts +11 -0
- package/src/surfaces/checkout/components/Button/Button.ts +87 -0
- package/src/surfaces/checkout/components/Button/README.md +22 -0
- package/src/surfaces/checkout/components/Button/content/guidelines.md +10 -0
- package/src/surfaces/checkout/components/Button/examples/basic-button.example.ts +11 -0
- package/src/{components → surfaces/checkout/components}/Checkbox/Checkbox.ts +32 -1
- package/src/surfaces/checkout/components/Checkbox/README.md +18 -0
- package/src/surfaces/checkout/components/Checkbox/content/guidelines.md +9 -0
- package/src/surfaces/checkout/components/Checkbox/examples/basic-checkbox.example.ts +11 -0
- package/src/surfaces/checkout/components/Choice/Choice.ts +25 -0
- package/src/surfaces/checkout/components/Choice/README.md +14 -0
- package/src/surfaces/checkout/components/Choice/content/guidelines.md +9 -0
- package/src/surfaces/checkout/components/Choice/examples/basic-choice.example.ts +50 -0
- package/src/surfaces/checkout/components/ChoiceList/ChoiceList.ts +33 -0
- package/src/surfaces/checkout/components/ChoiceList/README.md +14 -0
- package/src/surfaces/checkout/components/ChoiceList/content/guidelines.md +10 -0
- package/src/surfaces/checkout/components/ChoiceList/examples/basic-choicelist.example.ts +50 -0
- package/src/surfaces/checkout/components/Divider/Divider.ts +33 -0
- package/src/surfaces/checkout/components/Divider/README.md +13 -0
- package/src/surfaces/checkout/components/Divider/examples/basic-divider.example.ts +7 -0
- package/src/surfaces/checkout/components/Form/Form.ts +30 -0
- package/src/surfaces/checkout/components/Form/README.md +21 -0
- package/src/surfaces/checkout/components/Form/content/guidelines.md +4 -0
- package/src/surfaces/checkout/components/Form/examples/basic-form.example.ts +48 -0
- package/src/surfaces/checkout/components/Grid/Grid.ts +104 -0
- package/src/surfaces/checkout/components/Grid/README.md +105 -0
- package/src/surfaces/checkout/components/Grid/content/guidelines.md +3 -0
- package/src/surfaces/checkout/components/Grid/examples/basic-grid.example.ts +45 -0
- package/src/surfaces/checkout/components/GridItem/GridItem.ts +42 -0
- package/src/surfaces/checkout/components/GridItem/README.md +72 -0
- package/src/surfaces/checkout/components/GridItem/content/guidelines.md +3 -0
- package/src/surfaces/checkout/components/GridItem/examples/basic-griditem.example.ts +42 -0
- package/src/surfaces/checkout/components/Heading/Heading.ts +44 -0
- package/src/surfaces/checkout/components/Heading/README.md +19 -0
- package/src/surfaces/checkout/components/Heading/content/guidelines.md +10 -0
- package/src/surfaces/checkout/components/Heading/examples/basic-heading.example.ts +7 -0
- package/src/surfaces/checkout/components/HeadingGroup/HeadingGroup.ts +15 -0
- package/src/surfaces/checkout/components/HeadingGroup/README.md +7 -0
- package/src/surfaces/checkout/components/HeadingGroup/content/guidelines.md +9 -0
- package/src/surfaces/checkout/components/HeadingGroup/examples/basic-headinggroup.example.ts +20 -0
- package/src/surfaces/checkout/components/Icon/Icon.ts +91 -0
- package/src/surfaces/checkout/components/Icon/README.md +15 -0
- package/src/surfaces/checkout/components/Icon/examples/basic-icon.example.ts +7 -0
- package/src/surfaces/checkout/components/Image/Image.ts +83 -0
- package/src/surfaces/checkout/components/Image/README.md +53 -0
- package/src/surfaces/checkout/components/Image/examples/basic-image.example.ts +10 -0
- package/src/surfaces/checkout/components/InlineLayout/InlineLayout.ts +49 -0
- package/src/surfaces/checkout/components/InlineLayout/README.md +103 -0
- package/src/surfaces/checkout/components/InlineLayout/examples/basic-inlineLayout.example.ts +16 -0
- package/src/surfaces/checkout/components/InlineSpacer/InlineSpacer.ts +24 -0
- package/src/surfaces/checkout/components/InlineSpacer/README.md +14 -0
- package/src/surfaces/checkout/components/InlineSpacer/examples/basic-inlinespacer.example.ts +16 -0
- package/src/surfaces/checkout/components/InlineStack/InlineStack.ts +63 -0
- package/src/surfaces/checkout/components/InlineStack/README.md +87 -0
- package/src/surfaces/checkout/components/InlineStack/examples/basic-inlinestack.example.ts +18 -0
- package/src/surfaces/checkout/components/Link/Link.ts +49 -0
- package/src/surfaces/checkout/components/Link/README.md +18 -0
- package/src/surfaces/checkout/components/Link/content/guidelines.md +9 -0
- package/src/surfaces/checkout/components/Link/examples/basic-link.example.ts +11 -0
- package/src/surfaces/checkout/components/List/List.ts +32 -0
- package/src/surfaces/checkout/components/List/README.md +19 -0
- package/src/surfaces/checkout/components/List/content/guidelines.md +11 -0
- package/src/surfaces/checkout/components/List/examples/basic-list.example.ts +11 -0
- package/src/surfaces/checkout/components/ListItem/ListItem.ts +12 -0
- package/src/surfaces/checkout/components/ListItem/README.md +5 -0
- package/src/surfaces/checkout/components/ListItem/content/guidelines.md +3 -0
- package/src/surfaces/checkout/components/ListItem/examples/basic-listitem.example.ts +9 -0
- package/src/surfaces/checkout/components/PhoneField/PhoneField.ts +77 -0
- package/src/surfaces/checkout/components/PhoneField/README.md +49 -0
- package/src/surfaces/checkout/components/PhoneField/examples/basic-phonefield.example.ts +10 -0
- package/src/surfaces/checkout/components/Pressable/Pressable.ts +128 -0
- package/src/surfaces/checkout/components/Pressable/README.md +74 -0
- package/src/surfaces/checkout/components/Pressable/examples/basic-pressable.example.ts +27 -0
- package/src/surfaces/checkout/components/ScrollView/README.md +62 -0
- package/src/surfaces/checkout/components/ScrollView/ScrollView.ts +76 -0
- package/src/surfaces/checkout/components/ScrollView/examples/basic-scrollview.example.ts +38 -0
- package/src/surfaces/checkout/components/Select/README.md +41 -0
- package/src/surfaces/checkout/components/Select/Select.ts +97 -0
- package/src/surfaces/checkout/components/Select/content/guidelines.md +4 -0
- package/src/surfaces/checkout/components/Select/examples/basic-select.example.ts +36 -0
- package/src/surfaces/checkout/components/SkeletonImage/README.md +13 -0
- package/src/surfaces/checkout/components/SkeletonImage/SkeletonImage.ts +27 -0
- package/src/surfaces/checkout/components/SkeletonImage/examples/basic-skeletonimage.example.ts +10 -0
- package/src/surfaces/checkout/components/SkeletonText/README.md +13 -0
- package/src/surfaces/checkout/components/SkeletonText/SkeletonText.ts +23 -0
- package/src/surfaces/checkout/components/SkeletonText/examples/basic-skeletontext.example.ts +7 -0
- package/src/surfaces/checkout/components/SkeletonTextBlock/README.md +13 -0
- package/src/surfaces/checkout/components/SkeletonTextBlock/SkeletonTextBlock.ts +24 -0
- package/src/surfaces/checkout/components/SkeletonTextBlock/examples/basic-skeletontextblock.example.ts +7 -0
- package/src/surfaces/checkout/components/Spinner/README.md +14 -0
- package/src/surfaces/checkout/components/Spinner/Spinner.ts +35 -0
- package/src/surfaces/checkout/components/Spinner/examples/basic-spinner.example.ts +7 -0
- package/src/surfaces/checkout/components/Stepper/README.md +28 -0
- package/src/surfaces/checkout/components/Stepper/Stepper.ts +63 -0
- package/src/surfaces/checkout/components/Stepper/content/guidelines.md +4 -0
- package/src/surfaces/checkout/components/Stepper/examples/basic-stepper.example.ts +10 -0
- package/src/surfaces/checkout/components/Tag/README.md +14 -0
- package/src/surfaces/checkout/components/Tag/Tag.ts +26 -0
- package/src/surfaces/checkout/components/Tag/examples/basic-tag.example.ts +7 -0
- package/src/surfaces/checkout/components/Text/README.md +17 -0
- package/src/surfaces/checkout/components/Text/Text.ts +44 -0
- package/src/surfaces/checkout/components/Text/content/guidelines.md +10 -0
- package/src/surfaces/checkout/components/Text/examples/basic-text.example.ts +14 -0
- package/src/surfaces/checkout/components/TextBlock/README.md +15 -0
- package/src/surfaces/checkout/components/TextBlock/TextBlock.ts +38 -0
- package/src/surfaces/checkout/components/TextBlock/content/guidelines.md +9 -0
- package/src/surfaces/checkout/components/TextBlock/examples/basic-textblock.example.ts +18 -0
- package/src/surfaces/checkout/components/TextField/README.md +49 -0
- package/src/surfaces/checkout/components/TextField/TextField.ts +173 -0
- package/src/surfaces/checkout/components/TextField/content/guidelines.md +5 -0
- package/src/surfaces/checkout/components/TextField/examples/basic-textfield.example.ts +9 -0
- package/src/surfaces/checkout/components/Tooltip/README.md +8 -0
- package/src/surfaces/checkout/components/Tooltip/Tooltip.ts +15 -0
- package/src/surfaces/checkout/components/Tooltip/examples/basic-tooltip.example.ts +23 -0
- package/src/surfaces/checkout/components/View/README.md +97 -0
- package/src/surfaces/checkout/components/View/View.ts +196 -0
- package/src/surfaces/checkout/components/View/examples/basic-view.example.ts +11 -0
- package/src/surfaces/checkout/components/shared.ts +560 -0
- package/src/surfaces/checkout/components.ts +155 -1
- package/src/surfaces/checkout/extension-points.ts +83 -3
- package/src/surfaces/checkout/globals.ts +15 -0
- package/src/surfaces/checkout/index.ts +2 -0
- package/src/surfaces/checkout/style/isEqual.test.ts +67 -0
- package/src/surfaces/checkout/style/isEqual.ts +41 -0
- package/src/surfaces/checkout/style/memoize.ts +176 -0
- package/src/surfaces/checkout/style/style.test.ts +131 -0
- package/src/surfaces/checkout/style/style.ts +161 -0
- package/src/surfaces/checkout/style/types.ts +67 -0
- package/src/surfaces/checkout/style.ts +16 -0
- package/src/utilities/registration.ts +9 -42
- package/LICENSE.md +0 -7
- package/admin.d.ts +0 -1
- package/admin.esnext +0 -1
- package/admin.js +0 -1
- package/admin.mjs +0 -1
- package/build/cjs/api.js +0 -1
- package/build/cjs/components/BlockStack/BlockStack.js +0 -11
- package/build/cjs/components/BlockStack/README.md +0 -1
- package/build/cjs/components/Button/Button.js +0 -11
- package/build/cjs/components/Button/README.md +0 -1
- package/build/cjs/components/Checkbox/Checkbox.js +0 -14
- package/build/cjs/components/Checkbox/README.md +0 -1
- package/build/cjs/components/Text/README.md +0 -1
- package/build/cjs/components/Text/Text.js +0 -11
- package/build/cjs/components/TextField/README.md +0 -1
- package/build/cjs/components/TextField/TextField.js +0 -11
- package/build/cjs/components/View/README.md +0 -1
- package/build/cjs/components/View/View.js +0 -11
- package/build/cjs/components.js +0 -53
- package/build/cjs/extension.js +0 -1
- package/build/cjs/surfaces/admin/api/checkout-editor/README.md +0 -1
- package/build/cjs/surfaces/admin/api/checkout-editor/render-settings.js +0 -1
- package/build/cjs/surfaces/admin/api/standard/README.md +0 -1
- package/build/cjs/surfaces/admin/api/standard/standard.js +0 -1
- package/build/cjs/surfaces/admin/api.js +0 -1
- package/build/cjs/surfaces/admin/components/TextField/TextField.js +0 -11
- package/build/cjs/surfaces/admin/components.js +0 -30
- package/build/cjs/surfaces/admin/extension-points.js +0 -1
- package/build/cjs/surfaces/admin/extension.js +0 -27
- package/build/cjs/surfaces/admin/index.js +0 -70
- package/build/cjs/surfaces/admin/shared.js +0 -1
- package/build/cjs/surfaces/checkout/api/cart-line-details/README.md +0 -1
- package/build/cjs/surfaces/checkout/api/cart-line-details/render-after.js +0 -1
- package/build/cjs/surfaces/checkout/api/shared.js +0 -1
- package/build/cjs/surfaces/checkout/api/standard/README.md +0 -1
- package/build/cjs/surfaces/checkout/api/standard/standard.js +0 -1
- package/build/cjs/surfaces/checkout/api.js +0 -1
- package/build/cjs/surfaces/checkout/components.js +0 -18
- package/build/cjs/surfaces/checkout/extension-points.js +0 -1
- package/build/cjs/surfaces/checkout/shared.js +0 -1
- package/build/esm/api.mjs +0 -0
- package/build/esm/components/BlockStack/BlockStack.mjs +0 -2
- package/build/esm/components/BlockStack/README.md +0 -1
- package/build/esm/components/Button/Button.mjs +0 -2
- package/build/esm/components/Button/README.md +0 -1
- package/build/esm/components/Checkbox/Checkbox.mjs +0 -6
- package/build/esm/components/Checkbox/README.md +0 -1
- package/build/esm/components/Text/README.md +0 -1
- package/build/esm/components/Text/Text.mjs +0 -2
- package/build/esm/components/TextField/README.md +0 -1
- package/build/esm/components/TextField/TextField.mjs +0 -2
- package/build/esm/components/View/README.md +0 -1
- package/build/esm/components/View/View.mjs +0 -2
- package/build/esm/components.mjs +0 -6
- package/build/esm/extension.mjs +0 -0
- package/build/esm/surfaces/admin/api/checkout-editor/README.md +0 -1
- package/build/esm/surfaces/admin/api/checkout-editor/render-settings.mjs +0 -0
- package/build/esm/surfaces/admin/api/standard/README.md +0 -1
- package/build/esm/surfaces/admin/api/standard/standard.mjs +0 -0
- package/build/esm/surfaces/admin/api.mjs +0 -0
- package/build/esm/surfaces/admin/components/TextField/TextField.mjs +0 -2
- package/build/esm/surfaces/admin/components.mjs +0 -2
- package/build/esm/surfaces/admin/extension-points.mjs +0 -0
- package/build/esm/surfaces/admin/extension.mjs +0 -3
- package/build/esm/surfaces/admin/index.mjs +0 -5
- package/build/esm/surfaces/admin/shared.mjs +0 -0
- package/build/esm/surfaces/checkout/api/cart-line-details/README.md +0 -1
- package/build/esm/surfaces/checkout/api/cart-line-details/render-after.mjs +0 -0
- package/build/esm/surfaces/checkout/api/shared.mjs +0 -0
- package/build/esm/surfaces/checkout/api/standard/README.md +0 -1
- package/build/esm/surfaces/checkout/api/standard/standard.mjs +0 -0
- package/build/esm/surfaces/checkout/api.mjs +0 -0
- package/build/esm/surfaces/checkout/components.mjs +0 -1
- package/build/esm/surfaces/checkout/extension-points.mjs +0 -0
- package/build/esm/surfaces/checkout/shared.mjs +0 -0
- package/build/esnext/api.esnext +0 -0
- package/build/esnext/components/BlockStack/BlockStack.esnext +0 -2
- package/build/esnext/components/BlockStack/README.md +0 -1
- package/build/esnext/components/Button/Button.esnext +0 -2
- package/build/esnext/components/Button/README.md +0 -1
- package/build/esnext/components/Checkbox/Checkbox.esnext +0 -6
- package/build/esnext/components/Checkbox/README.md +0 -1
- package/build/esnext/components/Text/README.md +0 -1
- package/build/esnext/components/Text/Text.esnext +0 -2
- package/build/esnext/components/TextField/README.md +0 -1
- package/build/esnext/components/TextField/TextField.esnext +0 -2
- package/build/esnext/components/View/README.md +0 -1
- package/build/esnext/components/View/View.esnext +0 -2
- package/build/esnext/components.esnext +0 -6
- package/build/esnext/extension.esnext +0 -0
- package/build/esnext/surfaces/admin/api/checkout-editor/README.md +0 -1
- package/build/esnext/surfaces/admin/api/checkout-editor/render-settings.esnext +0 -0
- package/build/esnext/surfaces/admin/api/standard/README.md +0 -1
- package/build/esnext/surfaces/admin/api/standard/standard.esnext +0 -0
- package/build/esnext/surfaces/admin/api.esnext +0 -0
- package/build/esnext/surfaces/admin/components/TextField/TextField.esnext +0 -2
- package/build/esnext/surfaces/admin/components.esnext +0 -2
- package/build/esnext/surfaces/admin/extension-points.esnext +0 -0
- package/build/esnext/surfaces/admin/extension.esnext +0 -3
- package/build/esnext/surfaces/admin/index.esnext +0 -5
- package/build/esnext/surfaces/admin/shared.esnext +0 -0
- package/build/esnext/surfaces/checkout/api/cart-line-details/README.md +0 -1
- package/build/esnext/surfaces/checkout/api/cart-line-details/render-after.esnext +0 -0
- package/build/esnext/surfaces/checkout/api/shared.esnext +0 -0
- package/build/esnext/surfaces/checkout/api/standard/README.md +0 -1
- package/build/esnext/surfaces/checkout/api/standard/standard.esnext +0 -0
- package/build/esnext/surfaces/checkout/api.esnext +0 -0
- package/build/esnext/surfaces/checkout/components.esnext +0 -1
- package/build/esnext/surfaces/checkout/extension-points.esnext +0 -0
- package/build/esnext/surfaces/checkout/shared.esnext +0 -0
- package/build/node/api.js +0 -1
- package/build/node/components/BlockStack/BlockStack.js +0 -11
- package/build/node/components/BlockStack/README.md +0 -1
- package/build/node/components/Button/Button.js +0 -11
- package/build/node/components/Button/README.md +0 -1
- package/build/node/components/Checkbox/Checkbox.js +0 -14
- package/build/node/components/Checkbox/README.md +0 -1
- package/build/node/components/Text/README.md +0 -1
- package/build/node/components/Text/Text.js +0 -11
- package/build/node/components/TextField/README.md +0 -1
- package/build/node/components/TextField/TextField.js +0 -11
- package/build/node/components/View/README.md +0 -1
- package/build/node/components/View/View.js +0 -11
- package/build/node/components.js +0 -53
- package/build/node/extension.js +0 -1
- package/build/node/index.js +0 -44
- package/build/node/surfaces/admin/api/checkout-editor/README.md +0 -1
- package/build/node/surfaces/admin/api/checkout-editor/render-settings.js +0 -1
- package/build/node/surfaces/admin/api/standard/README.md +0 -1
- package/build/node/surfaces/admin/api/standard/standard.js +0 -1
- package/build/node/surfaces/admin/api.js +0 -1
- package/build/node/surfaces/admin/components/TextField/TextField.js +0 -11
- package/build/node/surfaces/admin/components.js +0 -30
- package/build/node/surfaces/admin/extension-points.js +0 -1
- package/build/node/surfaces/admin/extension.js +0 -27
- package/build/node/surfaces/admin/index.js +0 -70
- package/build/node/surfaces/admin/shared.js +0 -1
- package/build/node/surfaces/checkout/api/cart-line-details/README.md +0 -1
- package/build/node/surfaces/checkout/api/cart-line-details/render-after.js +0 -1
- package/build/node/surfaces/checkout/api/shared.js +0 -1
- package/build/node/surfaces/checkout/api/standard/README.md +0 -1
- package/build/node/surfaces/checkout/api/standard/standard.js +0 -1
- package/build/node/surfaces/checkout/api.js +0 -1
- package/build/node/surfaces/checkout/components.js +0 -18
- package/build/node/surfaces/checkout/extension-points.js +0 -1
- package/build/node/surfaces/checkout/extension.js +0 -27
- package/build/node/surfaces/checkout/index.js +0 -70
- package/build/node/surfaces/checkout/shared.js +0 -1
- package/build/node/utilities/registration.js +0 -44
- package/build/ts/api.js +0 -2
- package/build/ts/components/BlockStack/BlockStack.d.ts +0 -8
- package/build/ts/components/BlockStack/BlockStack.d.ts.map +0 -1
- package/build/ts/components/BlockStack/BlockStack.js +0 -5
- package/build/ts/components/Button/Button.d.ts +0 -12
- package/build/ts/components/Button/Button.d.ts.map +0 -1
- package/build/ts/components/Button/Button.js +0 -5
- package/build/ts/components/Checkbox/Checkbox.d.ts +0 -30
- package/build/ts/components/Checkbox/Checkbox.d.ts.map +0 -1
- package/build/ts/components/Checkbox/Checkbox.js +0 -8
- package/build/ts/components/Text/Text.d.ts +0 -8
- package/build/ts/components/Text/Text.d.ts.map +0 -1
- package/build/ts/components/Text/Text.js +0 -5
- package/build/ts/components/TextField/TextField.d.ts +0 -53
- package/build/ts/components/TextField/TextField.d.ts.map +0 -1
- package/build/ts/components/TextField/TextField.js +0 -5
- package/build/ts/components/View/View.d.ts +0 -8
- package/build/ts/components/View/View.d.ts.map +0 -1
- package/build/ts/components/View/View.js +0 -5
- package/build/ts/components.d.ts +0 -13
- package/build/ts/components.d.ts.map +0 -1
- package/build/ts/components.js +0 -15
- package/build/ts/extension.js +0 -2
- package/build/ts/index.js +0 -19
- package/build/ts/surfaces/admin/api/checkout-editor/render-settings.d.ts +0 -19
- package/build/ts/surfaces/admin/api/checkout-editor/render-settings.d.ts.map +0 -1
- package/build/ts/surfaces/admin/api/checkout-editor/render-settings.js +0 -2
- package/build/ts/surfaces/admin/api/standard/standard.d.ts +0 -7
- package/build/ts/surfaces/admin/api/standard/standard.d.ts.map +0 -1
- package/build/ts/surfaces/admin/api/standard/standard.js +0 -2
- package/build/ts/surfaces/admin/api.d.ts +0 -3
- package/build/ts/surfaces/admin/api.d.ts.map +0 -1
- package/build/ts/surfaces/admin/api.js +0 -2
- package/build/ts/surfaces/admin/components/TextField/TextField.d.ts +0 -15
- package/build/ts/surfaces/admin/components/TextField/TextField.d.ts.map +0 -1
- package/build/ts/surfaces/admin/components/TextField/TextField.js +0 -5
- package/build/ts/surfaces/admin/components.d.ts +0 -4
- package/build/ts/surfaces/admin/components.d.ts.map +0 -1
- package/build/ts/surfaces/admin/components.js +0 -20
- package/build/ts/surfaces/admin/extension-points.d.ts +0 -9
- package/build/ts/surfaces/admin/extension-points.d.ts.map +0 -1
- package/build/ts/surfaces/admin/extension-points.js +0 -2
- package/build/ts/surfaces/admin/extension.d.ts +0 -4
- package/build/ts/surfaces/admin/extension.d.ts.map +0 -1
- package/build/ts/surfaces/admin/extension.js +0 -20
- package/build/ts/surfaces/admin/index.d.ts +0 -6
- package/build/ts/surfaces/admin/index.d.ts.map +0 -1
- package/build/ts/surfaces/admin/index.js +0 -21
- package/build/ts/surfaces/admin/shared.d.ts +0 -8
- package/build/ts/surfaces/admin/shared.d.ts.map +0 -1
- package/build/ts/surfaces/admin/shared.js +0 -2
- package/build/ts/surfaces/checkout/api/cart-line-details/render-after.js +0 -2
- package/build/ts/surfaces/checkout/api/shared.js +0 -2
- package/build/ts/surfaces/checkout/api/standard/standard.js +0 -2
- package/build/ts/surfaces/checkout/api.js +0 -2
- package/build/ts/surfaces/checkout/components.js +0 -17
- package/build/ts/surfaces/checkout/extension-points.js +0 -2
- package/build/ts/surfaces/checkout/extension.js +0 -20
- package/build/ts/surfaces/checkout/index.js +0 -21
- package/build/ts/surfaces/checkout/shared.js +0 -2
- package/build/ts/utilities/registration.js +0 -111
- package/build/tsconfig.tsbuildinfo +0 -1
- package/checkout.d.ts +0 -1
- package/index.d.ts +0 -1
- package/sewing-kit.config.ts +0 -9
- package/src/components/BlockStack/BlockStack.ts +0 -7
- package/src/components/BlockStack/README.md +0 -1
- package/src/components/Button/Button.ts +0 -10
- package/src/components/Button/README.md +0 -1
- package/src/components/Checkbox/README.md +0 -1
- package/src/components/Text/README.md +0 -1
- package/src/components/Text/Text.ts +0 -5
- package/src/components/TextField/README.md +0 -1
- package/src/components/TextField/TextField.ts +0 -56
- package/src/components/View/README.md +0 -1
- package/src/components/View/View.ts +0 -5
- package/src/components.ts +0 -17
- package/src/surfaces/admin/api/checkout-editor/README.md +0 -1
- package/src/surfaces/admin/api/checkout-editor/render-settings.ts +0 -26
- package/src/surfaces/admin/api/standard/README.md +0 -1
- package/src/surfaces/admin/api/standard/standard.ts +0 -8
- package/src/surfaces/admin/api.ts +0 -2
- package/src/surfaces/admin/components/TextField/TextField.ts +0 -16
- package/src/surfaces/admin/components.ts +0 -4
- package/src/surfaces/admin/extension-points.ts +0 -17
- package/src/surfaces/admin/extension.ts +0 -7
- package/src/surfaces/admin/index.ts +0 -5
- package/src/surfaces/admin/shared.ts +0 -14
- package/tsconfig.json +0 -9
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createRemoteComponent } from '@remote-ui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Heading group controls the heading level of headings nested within it, like H1, H2, H3.
|
|
5
|
+
*
|
|
6
|
+
* Use a heading group whenever you use a heading to ensure the experience is the same
|
|
7
|
+
* for screen reader users. When using a heading, any children related to that
|
|
8
|
+
* heading should be nested within the same heading group.
|
|
9
|
+
*/
|
|
10
|
+
const HeadingGroup = createRemoteComponent('HeadingGroup');
|
|
11
|
+
|
|
12
|
+
export { HeadingGroup };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createRemoteComponent } from '@remote-ui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Icons are pictograms or graphic symbols.
|
|
5
|
+
* They can act as wayfinding tools or as a means of communicating functionality.
|
|
6
|
+
*/
|
|
7
|
+
const Icon = createRemoteComponent('Icon');
|
|
8
|
+
|
|
9
|
+
export { Icon };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createRemoteComponent } from '@remote-ui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* InlineLayout is used to lay out content over multiple columns.
|
|
5
|
+
*
|
|
6
|
+
* By default, all columns are of equal size and fill the available inline space.
|
|
7
|
+
* Content does not wrap on new rows when not enough columns have been explicitly set,
|
|
8
|
+
* instead they are added as new column and fill the remaining inline space.
|
|
9
|
+
*/
|
|
10
|
+
const InlineLayout = createRemoteComponent('InlineLayout');
|
|
11
|
+
|
|
12
|
+
export { InlineLayout };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRemoteComponent } from '@remote-ui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* InlineSpacer is used to create empty inline space, typically when variable spacing
|
|
5
|
+
* is needed between multiple elements.
|
|
6
|
+
*
|
|
7
|
+
* Note that you should favor InlineStack when spacing between all elements is the same.
|
|
8
|
+
*/
|
|
9
|
+
const InlineSpacer = createRemoteComponent('InlineSpacer');
|
|
10
|
+
|
|
11
|
+
export { InlineSpacer };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createRemoteComponent } from '@remote-ui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* List items are used as children of the `List` component.
|
|
5
|
+
*
|
|
6
|
+
* They usually begins with a bullet or a number.
|
|
7
|
+
*/
|
|
8
|
+
const ListItem = createRemoteComponent('ListItem');
|
|
9
|
+
|
|
10
|
+
export { ListItem };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createRemoteComponent } from '@remote-ui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A PhoneField is an input field that merchants can type into optimized
|
|
5
|
+
* for phone numbers with a country code base auto-formatting.
|
|
6
|
+
* The country code is required for the initial render of the field but
|
|
7
|
+
* it can be overriden later by the user either by selecting a country
|
|
8
|
+
* in the country selection dropdown or by manually editing the country phone code
|
|
9
|
+
* directly in the text field.
|
|
10
|
+
*/
|
|
11
|
+
const PhoneField = createRemoteComponent('PhoneField');
|
|
12
|
+
|
|
13
|
+
export { PhoneField };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createRemoteComponent } from '@remote-ui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Pressable is a generic interactive component. It shares the same styling properties as View but also adds
|
|
5
|
+
* pressable behavior, meaning that you can execute some logic in response to user interaction.
|
|
6
|
+
* Use this component for creating interactive elements without the default styling that comes with `Button` and `Link`.
|
|
7
|
+
*/
|
|
8
|
+
const Pressable = createRemoteComponent('Pressable');
|
|
9
|
+
|
|
10
|
+
export { Pressable };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createRemoteComponent } from '@remote-ui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ScrollView is a container for long form content, such as order summary line items,
|
|
5
|
+
* that allows for scrolling so customers can expose more content as they view.
|
|
6
|
+
*/
|
|
7
|
+
const ScrollView = createRemoteComponent('ScrollView');
|
|
8
|
+
|
|
9
|
+
export { ScrollView };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createRemoteComponent } from '@remote-ui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Selects let buyers choose one option from an options menu. Consider select
|
|
5
|
+
* when you have 4 or more options, to avoid cluttering the interface.
|
|
6
|
+
*/
|
|
7
|
+
const Select = createRemoteComponent('Select');
|
|
8
|
+
|
|
9
|
+
export { Select };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createRemoteComponent } from '@remote-ui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* SkeletonImage is used to provide a low fidelity representation of an image before it appears on the page.
|
|
5
|
+
*/
|
|
6
|
+
const SkeletonImage = createRemoteComponent('SkeletonImage');
|
|
7
|
+
|
|
8
|
+
export { SkeletonImage };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createRemoteComponent } from '@remote-ui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* SkeletonText is used to provide a low fidelity representation of text content before it appears on the page.
|
|
5
|
+
*/
|
|
6
|
+
const SkeletonText = createRemoteComponent('SkeletonText');
|
|
7
|
+
|
|
8
|
+
export { SkeletonText };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createRemoteComponent } from '@remote-ui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* SkeletonTextBlock is used to provide a low fidelity representation of a block of text before it appears on the page.
|
|
5
|
+
*/
|
|
6
|
+
const SkeletonTextBlock = createRemoteComponent('SkeletonTextBlock');
|
|
7
|
+
|
|
8
|
+
export { SkeletonTextBlock };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createRemoteComponent } from '@remote-ui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Spinner is used to notify buyers that their action is being processed.
|
|
5
|
+
* The Spinner is usually used when sending or receiving data from a server.
|
|
6
|
+
*/
|
|
7
|
+
const Spinner = createRemoteComponent('Spinner');
|
|
8
|
+
|
|
9
|
+
export { Spinner };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createRemoteComponent } from '@remote-ui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A Tag is used to help label, organize or categorize objects. It is commonly used in Checkout to display the discounts applied to a cart.
|
|
5
|
+
*/
|
|
6
|
+
const Tag = createRemoteComponent('Tag');
|
|
7
|
+
|
|
8
|
+
export { Tag };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createRemoteComponent } from '@remote-ui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Tooltips are floating labels that briefly explain the function of a user interface element.
|
|
5
|
+
* They must be specified inside the `overlay` prop of an activator component.
|
|
6
|
+
* Currently, activator components are `Button`, `Link`, and `Pressable`.
|
|
7
|
+
*
|
|
8
|
+
* The library takes care of applying the WAI-ARIA Tooltip Widget pattern automatically for the activator
|
|
9
|
+
* and the tooltip content. Expect screen readers to read the tooltip content when the user focuses the activator.
|
|
10
|
+
*/
|
|
11
|
+
const Tooltip = createRemoteComponent('Tooltip');
|
|
12
|
+
|
|
13
|
+
export { Tooltip };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createRemoteComponent } from '@remote-ui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* View is a generic container component. Its contents will always be their
|
|
5
|
+
* “natural” size, so this component can be useful in layout components (like `Grid`,
|
|
6
|
+
* `BlockStack`, `InlineStack`) that would otherwise stretch their children to fit.
|
|
7
|
+
*
|
|
8
|
+
* Note: View’s box model related properties like `padding`, `border`, `borderRadius`, and `borderColor` are implemented as
|
|
9
|
+
* [CSS Logical Properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties/Basic_concepts).
|
|
10
|
+
*/
|
|
11
|
+
const View = createRemoteComponent('View');
|
|
12
|
+
|
|
13
|
+
export { View };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import { createExtensionRegistrationFunction } from '../../utilities/registration';
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { createExtensionRegistrationFunction } from '../../utilities/registration.mjs';
|
|
2
|
+
|
|
3
|
+
const extension = createExtensionRegistrationFunction();
|
|
4
|
+
|
|
5
|
+
export { extension };
|
|
@@ -1,5 +1,39 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
1
|
+
export { extension } from './extension.mjs';
|
|
2
|
+
export { Banner } from './components/Banner/Banner.mjs';
|
|
3
|
+
export { BlockLayout } from './components/BlockLayout/BlockLayout.mjs';
|
|
4
|
+
export { BlockSpacer } from './components/BlockSpacer/BlockSpacer.mjs';
|
|
5
|
+
export { BlockStack } from './components/BlockStack/BlockStack.mjs';
|
|
6
|
+
export { Button } from './components/Button/Button.mjs';
|
|
7
|
+
export { Checkbox } from './components/Checkbox/Checkbox.mjs';
|
|
8
|
+
export { Choice } from './components/Choice/Choice.mjs';
|
|
9
|
+
export { ChoiceList } from './components/ChoiceList/ChoiceList.mjs';
|
|
10
|
+
export { Divider } from './components/Divider/Divider.mjs';
|
|
11
|
+
export { Form } from './components/Form/Form.mjs';
|
|
12
|
+
export { Grid } from './components/Grid/Grid.mjs';
|
|
13
|
+
export { GridItem } from './components/GridItem/GridItem.mjs';
|
|
14
|
+
export { Heading } from './components/Heading/Heading.mjs';
|
|
15
|
+
export { HeadingGroup } from './components/HeadingGroup/HeadingGroup.mjs';
|
|
16
|
+
export { Icon } from './components/Icon/Icon.mjs';
|
|
17
|
+
export { Image } from './components/Image/Image.mjs';
|
|
18
|
+
export { InlineLayout } from './components/InlineLayout/InlineLayout.mjs';
|
|
19
|
+
export { InlineStack } from './components/InlineStack/InlineStack.mjs';
|
|
20
|
+
export { InlineSpacer } from './components/InlineSpacer/InlineSpacer.mjs';
|
|
21
|
+
export { Link } from './components/Link/Link.mjs';
|
|
22
|
+
export { List } from './components/List/List.mjs';
|
|
23
|
+
export { ListItem } from './components/ListItem/ListItem.mjs';
|
|
24
|
+
export { PhoneField } from './components/PhoneField/PhoneField.mjs';
|
|
25
|
+
export { Pressable } from './components/Pressable/Pressable.mjs';
|
|
26
|
+
export { ScrollView } from './components/ScrollView/ScrollView.mjs';
|
|
27
|
+
export { Select } from './components/Select/Select.mjs';
|
|
28
|
+
export { SkeletonImage } from './components/SkeletonImage/SkeletonImage.mjs';
|
|
29
|
+
export { SkeletonText } from './components/SkeletonText/SkeletonText.mjs';
|
|
30
|
+
export { SkeletonTextBlock } from './components/SkeletonTextBlock/SkeletonTextBlock.mjs';
|
|
31
|
+
export { Spinner } from './components/Spinner/Spinner.mjs';
|
|
32
|
+
export { Stepper } from './components/Stepper/Stepper.mjs';
|
|
33
|
+
export { Tag } from './components/Tag/Tag.mjs';
|
|
34
|
+
export { Text } from './components/Text/Text.mjs';
|
|
35
|
+
export { TextBlock } from './components/TextBlock/TextBlock.mjs';
|
|
36
|
+
export { TextField } from './components/TextField/TextField.mjs';
|
|
37
|
+
export { Tooltip } from './components/Tooltip/Tooltip.mjs';
|
|
38
|
+
export { View } from './components/View/View.mjs';
|
|
39
|
+
export { Style, isConditionalStyle, isConditionalStyleWithDefault } from './style/style.mjs';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A simple isEqual function that can be used to compare two style objects that's
|
|
3
|
+
* good enough for our use case on the style builder.
|
|
4
|
+
*/
|
|
5
|
+
function isEqual(first, second) {
|
|
6
|
+
if (Object.is(first, second)) {
|
|
7
|
+
return true;
|
|
8
|
+
}
|
|
9
|
+
if (typeof first === 'object' && typeof second === 'object') {
|
|
10
|
+
if (Array.isArray(first) && Array.isArray(second)) {
|
|
11
|
+
if (first.length === second.length) {
|
|
12
|
+
return first.every((value, index) => isEqual(value, second[index]));
|
|
13
|
+
}
|
|
14
|
+
} else {
|
|
15
|
+
const firstEntries = Object.entries(first);
|
|
16
|
+
const secondEntries = Object.entries(second);
|
|
17
|
+
if (firstEntries.length === secondEntries.length) {
|
|
18
|
+
return firstEntries.every(([key]) => isEqual(first[key], second[key]));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { isEqual };
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/* eslint-disable prefer-rest-params */
|
|
2
|
+
/* eslint-disable prefer-spread */
|
|
3
|
+
|
|
4
|
+
// This memoize function is heavily inspired by reselect's defaultMemoize
|
|
5
|
+
// https://github.com/reduxjs/reselect
|
|
6
|
+
|
|
7
|
+
// Cache implementation based on Erik Rasmussen's `lru-memoize`:
|
|
8
|
+
// https://github.com/erikras/lru-memoize
|
|
9
|
+
|
|
10
|
+
const NOT_FOUND = 'NOT_FOUND';
|
|
11
|
+
function createSingletonCache(equals) {
|
|
12
|
+
let entry;
|
|
13
|
+
return {
|
|
14
|
+
get(key) {
|
|
15
|
+
if (entry && equals(entry.key, key)) {
|
|
16
|
+
return entry.value;
|
|
17
|
+
}
|
|
18
|
+
return NOT_FOUND;
|
|
19
|
+
},
|
|
20
|
+
put(key, value) {
|
|
21
|
+
entry = {
|
|
22
|
+
key,
|
|
23
|
+
value
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
getEntries() {
|
|
27
|
+
return entry ? [entry] : [];
|
|
28
|
+
},
|
|
29
|
+
clear() {
|
|
30
|
+
entry = undefined;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function createLruCache(maxSize, equals) {
|
|
35
|
+
let entries = [];
|
|
36
|
+
function get(key) {
|
|
37
|
+
const cacheIndex = entries.findIndex(entry => equals(key, entry.key));
|
|
38
|
+
|
|
39
|
+
// We found a cached entry
|
|
40
|
+
if (cacheIndex > -1) {
|
|
41
|
+
const entry = entries[cacheIndex];
|
|
42
|
+
|
|
43
|
+
// Cached entry not at top of cache, move it to the top
|
|
44
|
+
if (cacheIndex > 0) {
|
|
45
|
+
entries.splice(cacheIndex, 1);
|
|
46
|
+
entries.unshift(entry);
|
|
47
|
+
}
|
|
48
|
+
return entry.value;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// No entry found in cache, return sentinel
|
|
52
|
+
return NOT_FOUND;
|
|
53
|
+
}
|
|
54
|
+
function put(key, value) {
|
|
55
|
+
if (get(key) === NOT_FOUND) {
|
|
56
|
+
entries.unshift({
|
|
57
|
+
key,
|
|
58
|
+
value
|
|
59
|
+
});
|
|
60
|
+
if (entries.length > maxSize) {
|
|
61
|
+
entries.pop();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function getEntries() {
|
|
66
|
+
return entries;
|
|
67
|
+
}
|
|
68
|
+
function clear() {
|
|
69
|
+
entries = [];
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
get,
|
|
73
|
+
put,
|
|
74
|
+
getEntries,
|
|
75
|
+
clear
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
const defaultEqualityCheck = (first, second) => {
|
|
79
|
+
return first === second;
|
|
80
|
+
};
|
|
81
|
+
function createCacheKeyComparator(equalityCheck) {
|
|
82
|
+
return function areArgumentsShallowlyEqual(prev, next) {
|
|
83
|
+
if (prev === null || next === null || prev.length !== next.length) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible.
|
|
88
|
+
const length = prev.length;
|
|
89
|
+
for (let i = 0; i < length; i++) {
|
|
90
|
+
if (!equalityCheck(prev[i], next[i])) {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return true;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
// defaultMemoize now supports a configurable cache size with LRU behavior,
|
|
98
|
+
// and optional comparison of the result value with existing values
|
|
99
|
+
function memoize(func, equalityCheckOrOptions) {
|
|
100
|
+
const providedOptions = typeof equalityCheckOrOptions === 'object' ? equalityCheckOrOptions : {
|
|
101
|
+
equalityCheck: equalityCheckOrOptions
|
|
102
|
+
};
|
|
103
|
+
const {
|
|
104
|
+
equalityCheck = defaultEqualityCheck,
|
|
105
|
+
maxSize = 1,
|
|
106
|
+
resultEqualityCheck
|
|
107
|
+
} = providedOptions;
|
|
108
|
+
const comparator = createCacheKeyComparator(equalityCheck);
|
|
109
|
+
const cache = maxSize === 1 ? createSingletonCache(comparator) : createLruCache(maxSize, comparator);
|
|
110
|
+
|
|
111
|
+
// we reference arguments instead of spreading them for performance reasons
|
|
112
|
+
function memoized() {
|
|
113
|
+
let value = cache.get(arguments);
|
|
114
|
+
if (value === NOT_FOUND) {
|
|
115
|
+
// @ts-expect-error - we know that arguments is an array-like object
|
|
116
|
+
value = func.apply(null, arguments);
|
|
117
|
+
if (resultEqualityCheck) {
|
|
118
|
+
const entries = cache.getEntries();
|
|
119
|
+
const matchingEntry = entries.find(entry => resultEqualityCheck(entry.value, value));
|
|
120
|
+
if (matchingEntry) {
|
|
121
|
+
value = matchingEntry.value;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
cache.put(arguments, value);
|
|
125
|
+
}
|
|
126
|
+
return value;
|
|
127
|
+
}
|
|
128
|
+
memoized.clearCache = () => cache.clear();
|
|
129
|
+
return memoized;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export { createCacheKeyComparator, defaultEqualityCheck, memoize };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { memoize } from './memoize.mjs';
|
|
2
|
+
import { isEqual } from './isEqual.mjs';
|
|
3
|
+
|
|
4
|
+
const MAX_CACHE_SIZE = 50;
|
|
5
|
+
const MEMOIZE_OPTIONS = {
|
|
6
|
+
equalityCheck: isEqual,
|
|
7
|
+
maxSize: MAX_CACHE_SIZE
|
|
8
|
+
};
|
|
9
|
+
// eslint-disable-next-line func-style
|
|
10
|
+
const when = function when(conditions, value) {
|
|
11
|
+
const config = isConditionalStyle(this) ? {
|
|
12
|
+
default: this.default,
|
|
13
|
+
conditionals: [...this.conditionals, {
|
|
14
|
+
conditions,
|
|
15
|
+
value
|
|
16
|
+
}]
|
|
17
|
+
} : {
|
|
18
|
+
conditionals: [{
|
|
19
|
+
conditions,
|
|
20
|
+
value
|
|
21
|
+
}]
|
|
22
|
+
};
|
|
23
|
+
return createChainableConditionalStyle(config);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Style is a helper for authoring conditional values for prop styles.
|
|
28
|
+
* Write complex conditional styles based on one or more conditions (viewport
|
|
29
|
+
* sizes and interactive states) in a concise and expressive way.
|
|
30
|
+
*/
|
|
31
|
+
const Style = {
|
|
32
|
+
/**
|
|
33
|
+
* Sets an optional default value to use when no other condition is met.
|
|
34
|
+
*
|
|
35
|
+
* @param defaultValue The default value
|
|
36
|
+
* @returns The chainable condition style
|
|
37
|
+
*/
|
|
38
|
+
default: memoize(defaultValue => createChainableConditionalStyle({
|
|
39
|
+
default: defaultValue,
|
|
40
|
+
conditionals: []
|
|
41
|
+
}), MEMOIZE_OPTIONS),
|
|
42
|
+
/**
|
|
43
|
+
* Adjusts the style based on different conditions. All conditions, expressed
|
|
44
|
+
* as a literal object, must be met for the associated value to be applied.
|
|
45
|
+
*
|
|
46
|
+
* The `when` method can be chained together to build more complex styles.
|
|
47
|
+
*
|
|
48
|
+
* @param conditions The condition(s)
|
|
49
|
+
* @param value The conditional value that can be applied if the conditions are met
|
|
50
|
+
* @returns The chainable condition style
|
|
51
|
+
*/
|
|
52
|
+
when: memoize(when, MEMOIZE_OPTIONS)
|
|
53
|
+
};
|
|
54
|
+
function createChainableConditionalStyle(conditionalStyle) {
|
|
55
|
+
const proto = {};
|
|
56
|
+
const returnConditionalStyle = Object.create(proto);
|
|
57
|
+
Object.assign(returnConditionalStyle, conditionalStyle);
|
|
58
|
+
proto.when = memoize(when.bind(returnConditionalStyle), MEMOIZE_OPTIONS);
|
|
59
|
+
return returnConditionalStyle;
|
|
60
|
+
}
|
|
61
|
+
function isConditionalStyle(value) {
|
|
62
|
+
return value !== null && typeof value === 'object' && 'conditionals' in value;
|
|
63
|
+
}
|
|
64
|
+
function isConditionalStyleWithDefault(value) {
|
|
65
|
+
return isConditionalStyle(value) && 'default' in value && value.default !== undefined;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export { Style, isConditionalStyle, isConditionalStyleWithDefault };
|
|
@@ -1,25 +1,3 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
|
-
|
|
3
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
|
-
|
|
5
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
-
|
|
7
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
-
|
|
9
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
10
|
-
|
|
11
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
|
-
|
|
13
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
14
|
-
|
|
15
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
16
|
-
|
|
17
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
18
|
-
|
|
19
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
20
|
-
|
|
21
|
-
import { createRemoteRoot } from '@remote-ui/core';
|
|
22
|
-
|
|
23
1
|
/**
|
|
24
2
|
* This function takes an extension function that is expecting a `RemoteRoot` as its
|
|
25
3
|
* first argument, and returns a new function that accepts a `RemoteChannel` instead.
|
|
@@ -27,75 +5,12 @@ import { createRemoteRoot } from '@remote-ui/core';
|
|
|
27
5
|
* `RemoteChannel` type, while allowing the extension to use the more powerful `RemoteRoot`,
|
|
28
6
|
* provided by a version of `@remote-ui/core` that the extension controls.
|
|
29
7
|
*/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function _extension() {
|
|
37
|
-
_extension = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
38
|
-
var _len,
|
|
39
|
-
args,
|
|
40
|
-
_key,
|
|
41
|
-
_result,
|
|
42
|
-
_args$,
|
|
43
|
-
channel,
|
|
44
|
-
components,
|
|
45
|
-
rest,
|
|
46
|
-
root,
|
|
47
|
-
result,
|
|
48
|
-
_args = arguments;
|
|
49
|
-
|
|
50
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
51
|
-
while (1) {
|
|
52
|
-
switch (_context.prev = _context.next) {
|
|
53
|
-
case 0:
|
|
54
|
-
for (_len = _args.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
55
|
-
args[_key] = _args[_key];
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
if (!(args.length === 1 || _typeof(args[0]) !== 'object' || args[0] == null || !('channel' in args[0]))) {
|
|
59
|
-
_context.next = 6;
|
|
60
|
-
break;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
_context.next = 4;
|
|
64
|
-
return extensionWithRemoteRoot.apply(void 0, args);
|
|
65
|
-
|
|
66
|
-
case 4:
|
|
67
|
-
_result = _context.sent;
|
|
68
|
-
return _context.abrupt("return", _result);
|
|
69
|
-
|
|
70
|
-
case 6:
|
|
71
|
-
_args$ = args[0], channel = _args$.channel, components = _args$.components, rest = args.slice(1);
|
|
72
|
-
root = createRemoteRoot(channel, {
|
|
73
|
-
components: components,
|
|
74
|
-
strict: true
|
|
75
|
-
});
|
|
76
|
-
_context.next = 10;
|
|
77
|
-
return extensionWithRemoteRoot.apply(void 0, [root].concat(_toConsumableArray(rest)));
|
|
78
|
-
|
|
79
|
-
case 10:
|
|
80
|
-
result = _context.sent;
|
|
81
|
-
_context.next = 13;
|
|
82
|
-
return root.mount();
|
|
83
|
-
|
|
84
|
-
case 13:
|
|
85
|
-
return _context.abrupt("return", result);
|
|
86
|
-
|
|
87
|
-
case 14:
|
|
88
|
-
case "end":
|
|
89
|
-
return _context.stop();
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}, _callee);
|
|
93
|
-
}));
|
|
94
|
-
return _extension.apply(this, arguments);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return extension;
|
|
8
|
+
function createExtensionRegistrationFunction() {
|
|
9
|
+
const extensionWrapper = (target, implementation) => {
|
|
10
|
+
globalThis.shopify.extend(target, implementation);
|
|
11
|
+
return implementation;
|
|
98
12
|
};
|
|
99
|
-
|
|
100
13
|
return extensionWrapper;
|
|
101
|
-
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { createExtensionRegistrationFunction };
|