@shopify/ui-extensions 2.0.0-alpha.2 → 2022.10.0

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.
Files changed (431) hide show
  1. package/checkout.esnext +1 -1
  2. package/checkout.js +1 -1
  3. package/checkout.mjs +1 -1
  4. package/index.esnext +1 -1
  5. package/index.js +1 -1
  6. package/index.mjs +1 -1
  7. package/loom.config.ts +9 -0
  8. package/package.json +10 -11
  9. package/src/api.ts +0 -5
  10. package/src/extension.ts +3 -29
  11. package/src/index.ts +1 -1
  12. package/src/surfaces/checkout/api/cart-line-details/render-after.ts +7 -3
  13. package/src/surfaces/checkout/api/shared.ts +810 -3
  14. package/src/surfaces/checkout/api/standard/standard.ts +1240 -2
  15. package/src/surfaces/checkout/components/Banner/Banner.ts +37 -0
  16. package/src/surfaces/checkout/components/Banner/README.md +14 -0
  17. package/src/surfaces/checkout/components/Banner/content/guidelines.md +9 -0
  18. package/src/surfaces/checkout/components/Banner/examples/basic-banner.example.ts +11 -0
  19. package/src/surfaces/checkout/components/BlockLayout/BlockLayout.ts +43 -0
  20. package/src/surfaces/checkout/components/BlockLayout/README.md +101 -0
  21. package/src/surfaces/checkout/components/BlockLayout/examples/basic-blockLayout.example.ts +16 -0
  22. package/src/surfaces/checkout/components/BlockSpacer/BlockSpacer.ts +25 -0
  23. package/src/surfaces/checkout/components/BlockSpacer/README.md +14 -0
  24. package/src/surfaces/checkout/components/BlockSpacer/examples/basic-blockspacer.example.ts +11 -0
  25. package/src/surfaces/checkout/components/BlockStack/BlockStack.ts +53 -0
  26. package/src/surfaces/checkout/components/BlockStack/README.md +77 -0
  27. package/src/surfaces/checkout/components/BlockStack/examples/basic-blockstack.example.ts +11 -0
  28. package/src/surfaces/checkout/components/Button/Button.ts +87 -0
  29. package/src/surfaces/checkout/components/Button/README.md +22 -0
  30. package/src/surfaces/checkout/components/Button/content/guidelines.md +10 -0
  31. package/src/surfaces/checkout/components/Button/examples/basic-button.example.ts +11 -0
  32. package/src/{components → surfaces/checkout/components}/Checkbox/Checkbox.ts +32 -1
  33. package/src/surfaces/checkout/components/Checkbox/README.md +18 -0
  34. package/src/surfaces/checkout/components/Checkbox/content/guidelines.md +9 -0
  35. package/src/surfaces/checkout/components/Checkbox/examples/basic-checkbox.example.ts +11 -0
  36. package/src/surfaces/checkout/components/Choice/Choice.ts +25 -0
  37. package/src/surfaces/checkout/components/Choice/README.md +14 -0
  38. package/src/surfaces/checkout/components/Choice/content/guidelines.md +9 -0
  39. package/src/surfaces/checkout/components/Choice/examples/basic-choice.example.ts +50 -0
  40. package/src/surfaces/checkout/components/ChoiceList/ChoiceList.ts +33 -0
  41. package/src/surfaces/checkout/components/ChoiceList/README.md +14 -0
  42. package/src/surfaces/checkout/components/ChoiceList/content/guidelines.md +10 -0
  43. package/src/surfaces/checkout/components/ChoiceList/examples/basic-choicelist.example.ts +50 -0
  44. package/src/surfaces/checkout/components/Divider/Divider.ts +33 -0
  45. package/src/surfaces/checkout/components/Divider/README.md +13 -0
  46. package/src/surfaces/checkout/components/Divider/examples/basic-divider.example.ts +7 -0
  47. package/src/surfaces/checkout/components/Form/Form.ts +30 -0
  48. package/src/surfaces/checkout/components/Form/README.md +21 -0
  49. package/src/surfaces/checkout/components/Form/content/guidelines.md +4 -0
  50. package/src/surfaces/checkout/components/Form/examples/basic-form.example.ts +48 -0
  51. package/src/surfaces/checkout/components/Grid/Grid.ts +104 -0
  52. package/src/surfaces/checkout/components/Grid/README.md +105 -0
  53. package/src/surfaces/checkout/components/Grid/content/guidelines.md +3 -0
  54. package/src/surfaces/checkout/components/Grid/examples/basic-grid.example.ts +45 -0
  55. package/src/surfaces/checkout/components/GridItem/GridItem.ts +42 -0
  56. package/src/surfaces/checkout/components/GridItem/README.md +72 -0
  57. package/src/surfaces/checkout/components/GridItem/content/guidelines.md +3 -0
  58. package/src/surfaces/checkout/components/GridItem/examples/basic-griditem.example.ts +42 -0
  59. package/src/surfaces/checkout/components/Heading/Heading.ts +44 -0
  60. package/src/surfaces/checkout/components/Heading/README.md +19 -0
  61. package/src/surfaces/checkout/components/Heading/content/guidelines.md +10 -0
  62. package/src/surfaces/checkout/components/Heading/examples/basic-heading.example.ts +7 -0
  63. package/src/surfaces/checkout/components/HeadingGroup/HeadingGroup.ts +15 -0
  64. package/src/surfaces/checkout/components/HeadingGroup/README.md +7 -0
  65. package/src/surfaces/checkout/components/HeadingGroup/content/guidelines.md +9 -0
  66. package/src/surfaces/checkout/components/HeadingGroup/examples/basic-headinggroup.example.ts +20 -0
  67. package/src/surfaces/checkout/components/Icon/Icon.ts +91 -0
  68. package/src/surfaces/checkout/components/Icon/README.md +15 -0
  69. package/src/surfaces/checkout/components/Icon/examples/basic-icon.example.ts +7 -0
  70. package/src/surfaces/checkout/components/Image/Image.ts +83 -0
  71. package/src/surfaces/checkout/components/Image/README.md +53 -0
  72. package/src/surfaces/checkout/components/Image/examples/basic-image.example.ts +10 -0
  73. package/src/surfaces/checkout/components/InlineLayout/InlineLayout.ts +49 -0
  74. package/src/surfaces/checkout/components/InlineLayout/README.md +103 -0
  75. package/src/surfaces/checkout/components/InlineLayout/examples/basic-inlineLayout.example.ts +16 -0
  76. package/src/surfaces/checkout/components/InlineSpacer/InlineSpacer.ts +24 -0
  77. package/src/surfaces/checkout/components/InlineSpacer/README.md +14 -0
  78. package/src/surfaces/checkout/components/InlineSpacer/examples/basic-inlinespacer.example.ts +16 -0
  79. package/src/surfaces/checkout/components/InlineStack/InlineStack.ts +63 -0
  80. package/src/surfaces/checkout/components/InlineStack/README.md +87 -0
  81. package/src/surfaces/checkout/components/InlineStack/examples/basic-inlinestack.example.ts +18 -0
  82. package/src/surfaces/checkout/components/Link/Link.ts +49 -0
  83. package/src/surfaces/checkout/components/Link/README.md +18 -0
  84. package/src/surfaces/checkout/components/Link/content/guidelines.md +9 -0
  85. package/src/surfaces/checkout/components/Link/examples/basic-link.example.ts +11 -0
  86. package/src/surfaces/checkout/components/List/List.ts +32 -0
  87. package/src/surfaces/checkout/components/List/README.md +19 -0
  88. package/src/surfaces/checkout/components/List/content/guidelines.md +11 -0
  89. package/src/surfaces/checkout/components/List/examples/basic-list.example.ts +11 -0
  90. package/src/surfaces/checkout/components/ListItem/ListItem.ts +12 -0
  91. package/src/surfaces/checkout/components/ListItem/README.md +5 -0
  92. package/src/surfaces/checkout/components/ListItem/content/guidelines.md +3 -0
  93. package/src/surfaces/checkout/components/ListItem/examples/basic-listitem.example.ts +9 -0
  94. package/src/surfaces/checkout/components/PhoneField/PhoneField.ts +77 -0
  95. package/src/surfaces/checkout/components/PhoneField/README.md +49 -0
  96. package/src/surfaces/checkout/components/PhoneField/examples/basic-phonefield.example.ts +10 -0
  97. package/src/surfaces/checkout/components/Pressable/Pressable.ts +128 -0
  98. package/src/surfaces/checkout/components/Pressable/README.md +74 -0
  99. package/src/surfaces/checkout/components/Pressable/examples/basic-pressable.example.ts +27 -0
  100. package/src/surfaces/checkout/components/ScrollView/README.md +62 -0
  101. package/src/surfaces/checkout/components/ScrollView/ScrollView.ts +76 -0
  102. package/src/surfaces/checkout/components/ScrollView/examples/basic-scrollview.example.ts +38 -0
  103. package/src/surfaces/checkout/components/Select/README.md +41 -0
  104. package/src/surfaces/checkout/components/Select/Select.ts +97 -0
  105. package/src/surfaces/checkout/components/Select/content/guidelines.md +4 -0
  106. package/src/surfaces/checkout/components/Select/examples/basic-select.example.ts +36 -0
  107. package/src/surfaces/checkout/components/SkeletonImage/README.md +13 -0
  108. package/src/surfaces/checkout/components/SkeletonImage/SkeletonImage.ts +27 -0
  109. package/src/surfaces/checkout/components/SkeletonImage/examples/basic-skeletonimage.example.ts +10 -0
  110. package/src/surfaces/checkout/components/SkeletonText/README.md +13 -0
  111. package/src/surfaces/checkout/components/SkeletonText/SkeletonText.ts +23 -0
  112. package/src/surfaces/checkout/components/SkeletonText/examples/basic-skeletontext.example.ts +7 -0
  113. package/src/surfaces/checkout/components/SkeletonTextBlock/README.md +13 -0
  114. package/src/surfaces/checkout/components/SkeletonTextBlock/SkeletonTextBlock.ts +24 -0
  115. package/src/surfaces/checkout/components/SkeletonTextBlock/examples/basic-skeletontextblock.example.ts +7 -0
  116. package/src/surfaces/checkout/components/Spinner/README.md +14 -0
  117. package/src/surfaces/checkout/components/Spinner/Spinner.ts +35 -0
  118. package/src/surfaces/checkout/components/Spinner/examples/basic-spinner.example.ts +7 -0
  119. package/src/surfaces/checkout/components/Stepper/README.md +28 -0
  120. package/src/surfaces/checkout/components/Stepper/Stepper.ts +63 -0
  121. package/src/surfaces/checkout/components/Stepper/content/guidelines.md +4 -0
  122. package/src/surfaces/checkout/components/Stepper/examples/basic-stepper.example.ts +10 -0
  123. package/src/surfaces/checkout/components/Tag/README.md +14 -0
  124. package/src/surfaces/checkout/components/Tag/Tag.ts +26 -0
  125. package/src/surfaces/checkout/components/Tag/examples/basic-tag.example.ts +7 -0
  126. package/src/surfaces/checkout/components/Text/README.md +17 -0
  127. package/src/surfaces/checkout/components/Text/Text.ts +44 -0
  128. package/src/surfaces/checkout/components/Text/content/guidelines.md +10 -0
  129. package/src/surfaces/checkout/components/Text/examples/basic-text.example.ts +14 -0
  130. package/src/surfaces/checkout/components/TextBlock/README.md +15 -0
  131. package/src/surfaces/checkout/components/TextBlock/TextBlock.ts +38 -0
  132. package/src/surfaces/checkout/components/TextBlock/content/guidelines.md +9 -0
  133. package/src/surfaces/checkout/components/TextBlock/examples/basic-textblock.example.ts +18 -0
  134. package/src/surfaces/checkout/components/TextField/README.md +49 -0
  135. package/src/surfaces/checkout/components/TextField/TextField.ts +173 -0
  136. package/src/surfaces/checkout/components/TextField/content/guidelines.md +5 -0
  137. package/src/surfaces/checkout/components/TextField/examples/basic-textfield.example.ts +9 -0
  138. package/src/surfaces/checkout/components/Tooltip/README.md +8 -0
  139. package/src/surfaces/checkout/components/Tooltip/Tooltip.ts +15 -0
  140. package/src/surfaces/checkout/components/Tooltip/examples/basic-tooltip.example.ts +23 -0
  141. package/src/surfaces/checkout/components/View/README.md +97 -0
  142. package/src/surfaces/checkout/components/View/View.ts +196 -0
  143. package/src/surfaces/checkout/components/View/examples/basic-view.example.ts +11 -0
  144. package/src/surfaces/checkout/components/shared.ts +560 -0
  145. package/src/surfaces/checkout/components.ts +155 -1
  146. package/src/surfaces/checkout/extension-points.ts +83 -3
  147. package/src/surfaces/checkout/globals.ts +15 -0
  148. package/src/surfaces/checkout/index.ts +2 -0
  149. package/src/surfaces/checkout/style/isEqual.test.ts +67 -0
  150. package/src/surfaces/checkout/style/isEqual.ts +41 -0
  151. package/src/surfaces/checkout/style/memoize.ts +176 -0
  152. package/src/surfaces/checkout/style/style.test.ts +131 -0
  153. package/src/surfaces/checkout/style/style.ts +161 -0
  154. package/src/surfaces/checkout/style/types.ts +67 -0
  155. package/src/surfaces/checkout/style.ts +16 -0
  156. package/src/utilities/registration.ts +9 -42
  157. package/LICENSE.md +0 -7
  158. package/admin.d.ts +0 -1
  159. package/admin.esnext +0 -1
  160. package/admin.js +0 -1
  161. package/admin.mjs +0 -1
  162. package/build/cjs/api.js +0 -1
  163. package/build/cjs/components/BlockStack/BlockStack.js +0 -11
  164. package/build/cjs/components/BlockStack/README.md +0 -1
  165. package/build/cjs/components/Button/Button.js +0 -11
  166. package/build/cjs/components/Button/README.md +0 -1
  167. package/build/cjs/components/Checkbox/Checkbox.js +0 -14
  168. package/build/cjs/components/Checkbox/README.md +0 -1
  169. package/build/cjs/components/Text/README.md +0 -1
  170. package/build/cjs/components/Text/Text.js +0 -11
  171. package/build/cjs/components/TextField/README.md +0 -1
  172. package/build/cjs/components/TextField/TextField.js +0 -11
  173. package/build/cjs/components/View/README.md +0 -1
  174. package/build/cjs/components/View/View.js +0 -11
  175. package/build/cjs/components.js +0 -53
  176. package/build/cjs/extension.js +0 -1
  177. package/build/cjs/index.js +0 -44
  178. package/build/cjs/surfaces/admin/api/checkout-editor/README.md +0 -1
  179. package/build/cjs/surfaces/admin/api/checkout-editor/render-settings.js +0 -1
  180. package/build/cjs/surfaces/admin/api/standard/README.md +0 -1
  181. package/build/cjs/surfaces/admin/api/standard/standard.js +0 -1
  182. package/build/cjs/surfaces/admin/api.js +0 -1
  183. package/build/cjs/surfaces/admin/components/TextField/TextField.js +0 -11
  184. package/build/cjs/surfaces/admin/components.js +0 -30
  185. package/build/cjs/surfaces/admin/extension-points.js +0 -1
  186. package/build/cjs/surfaces/admin/extension.js +0 -27
  187. package/build/cjs/surfaces/admin/index.js +0 -70
  188. package/build/cjs/surfaces/admin/shared.js +0 -1
  189. package/build/cjs/surfaces/checkout/api/cart-line-details/README.md +0 -1
  190. package/build/cjs/surfaces/checkout/api/cart-line-details/render-after.js +0 -1
  191. package/build/cjs/surfaces/checkout/api/shared.js +0 -1
  192. package/build/cjs/surfaces/checkout/api/standard/README.md +0 -1
  193. package/build/cjs/surfaces/checkout/api/standard/standard.js +0 -1
  194. package/build/cjs/surfaces/checkout/api.js +0 -1
  195. package/build/cjs/surfaces/checkout/components.js +0 -18
  196. package/build/cjs/surfaces/checkout/extension-points.js +0 -1
  197. package/build/cjs/surfaces/checkout/extension.js +0 -27
  198. package/build/cjs/surfaces/checkout/index.js +0 -70
  199. package/build/cjs/surfaces/checkout/shared.js +0 -1
  200. package/build/cjs/utilities/registration.js +0 -110
  201. package/build/esm/api.mjs +0 -0
  202. package/build/esm/components/BlockStack/BlockStack.mjs +0 -2
  203. package/build/esm/components/BlockStack/README.md +0 -1
  204. package/build/esm/components/Button/Button.mjs +0 -2
  205. package/build/esm/components/Button/README.md +0 -1
  206. package/build/esm/components/Checkbox/Checkbox.mjs +0 -6
  207. package/build/esm/components/Checkbox/README.md +0 -1
  208. package/build/esm/components/Text/README.md +0 -1
  209. package/build/esm/components/Text/Text.mjs +0 -2
  210. package/build/esm/components/TextField/README.md +0 -1
  211. package/build/esm/components/TextField/TextField.mjs +0 -2
  212. package/build/esm/components/View/README.md +0 -1
  213. package/build/esm/components/View/View.mjs +0 -2
  214. package/build/esm/components.mjs +0 -6
  215. package/build/esm/extension.mjs +0 -0
  216. package/build/esm/index.mjs +0 -3
  217. package/build/esm/surfaces/admin/api/checkout-editor/README.md +0 -1
  218. package/build/esm/surfaces/admin/api/checkout-editor/render-settings.mjs +0 -0
  219. package/build/esm/surfaces/admin/api/standard/README.md +0 -1
  220. package/build/esm/surfaces/admin/api/standard/standard.mjs +0 -0
  221. package/build/esm/surfaces/admin/api.mjs +0 -0
  222. package/build/esm/surfaces/admin/components/TextField/TextField.mjs +0 -2
  223. package/build/esm/surfaces/admin/components.mjs +0 -2
  224. package/build/esm/surfaces/admin/extension-points.mjs +0 -0
  225. package/build/esm/surfaces/admin/extension.mjs +0 -3
  226. package/build/esm/surfaces/admin/index.mjs +0 -5
  227. package/build/esm/surfaces/admin/shared.mjs +0 -0
  228. package/build/esm/surfaces/checkout/api/cart-line-details/README.md +0 -1
  229. package/build/esm/surfaces/checkout/api/cart-line-details/render-after.mjs +0 -0
  230. package/build/esm/surfaces/checkout/api/shared.mjs +0 -0
  231. package/build/esm/surfaces/checkout/api/standard/README.md +0 -1
  232. package/build/esm/surfaces/checkout/api/standard/standard.mjs +0 -0
  233. package/build/esm/surfaces/checkout/api.mjs +0 -0
  234. package/build/esm/surfaces/checkout/components.mjs +0 -1
  235. package/build/esm/surfaces/checkout/extension-points.mjs +0 -0
  236. package/build/esm/surfaces/checkout/extension.mjs +0 -3
  237. package/build/esm/surfaces/checkout/index.mjs +0 -5
  238. package/build/esm/surfaces/checkout/shared.mjs +0 -0
  239. package/build/esm/utilities/registration.mjs +0 -101
  240. package/build/esnext/api.esnext +0 -0
  241. package/build/esnext/components/BlockStack/BlockStack.esnext +0 -2
  242. package/build/esnext/components/BlockStack/README.md +0 -1
  243. package/build/esnext/components/Button/Button.esnext +0 -2
  244. package/build/esnext/components/Button/README.md +0 -1
  245. package/build/esnext/components/Checkbox/Checkbox.esnext +0 -6
  246. package/build/esnext/components/Checkbox/README.md +0 -1
  247. package/build/esnext/components/Text/README.md +0 -1
  248. package/build/esnext/components/Text/Text.esnext +0 -2
  249. package/build/esnext/components/TextField/README.md +0 -1
  250. package/build/esnext/components/TextField/TextField.esnext +0 -2
  251. package/build/esnext/components/View/README.md +0 -1
  252. package/build/esnext/components/View/View.esnext +0 -2
  253. package/build/esnext/components.esnext +0 -6
  254. package/build/esnext/extension.esnext +0 -0
  255. package/build/esnext/index.esnext +0 -3
  256. package/build/esnext/surfaces/admin/api/checkout-editor/README.md +0 -1
  257. package/build/esnext/surfaces/admin/api/checkout-editor/render-settings.esnext +0 -0
  258. package/build/esnext/surfaces/admin/api/standard/README.md +0 -1
  259. package/build/esnext/surfaces/admin/api/standard/standard.esnext +0 -0
  260. package/build/esnext/surfaces/admin/api.esnext +0 -0
  261. package/build/esnext/surfaces/admin/components/TextField/TextField.esnext +0 -2
  262. package/build/esnext/surfaces/admin/components.esnext +0 -2
  263. package/build/esnext/surfaces/admin/extension-points.esnext +0 -0
  264. package/build/esnext/surfaces/admin/extension.esnext +0 -3
  265. package/build/esnext/surfaces/admin/index.esnext +0 -5
  266. package/build/esnext/surfaces/admin/shared.esnext +0 -0
  267. package/build/esnext/surfaces/checkout/api/cart-line-details/README.md +0 -1
  268. package/build/esnext/surfaces/checkout/api/cart-line-details/render-after.esnext +0 -0
  269. package/build/esnext/surfaces/checkout/api/shared.esnext +0 -0
  270. package/build/esnext/surfaces/checkout/api/standard/README.md +0 -1
  271. package/build/esnext/surfaces/checkout/api/standard/standard.esnext +0 -0
  272. package/build/esnext/surfaces/checkout/api.esnext +0 -0
  273. package/build/esnext/surfaces/checkout/components.esnext +0 -1
  274. package/build/esnext/surfaces/checkout/extension-points.esnext +0 -0
  275. package/build/esnext/surfaces/checkout/extension.esnext +0 -3
  276. package/build/esnext/surfaces/checkout/index.esnext +0 -5
  277. package/build/esnext/surfaces/checkout/shared.esnext +0 -0
  278. package/build/esnext/utilities/registration.esnext +0 -37
  279. package/build/node/api.js +0 -1
  280. package/build/node/components/BlockStack/BlockStack.js +0 -11
  281. package/build/node/components/BlockStack/README.md +0 -1
  282. package/build/node/components/Button/Button.js +0 -11
  283. package/build/node/components/Button/README.md +0 -1
  284. package/build/node/components/Checkbox/Checkbox.js +0 -14
  285. package/build/node/components/Checkbox/README.md +0 -1
  286. package/build/node/components/Text/README.md +0 -1
  287. package/build/node/components/Text/Text.js +0 -11
  288. package/build/node/components/TextField/README.md +0 -1
  289. package/build/node/components/TextField/TextField.js +0 -11
  290. package/build/node/components/View/README.md +0 -1
  291. package/build/node/components/View/View.js +0 -11
  292. package/build/node/components.js +0 -53
  293. package/build/node/extension.js +0 -1
  294. package/build/node/index.js +0 -44
  295. package/build/node/surfaces/admin/api/checkout-editor/README.md +0 -1
  296. package/build/node/surfaces/admin/api/checkout-editor/render-settings.js +0 -1
  297. package/build/node/surfaces/admin/api/standard/README.md +0 -1
  298. package/build/node/surfaces/admin/api/standard/standard.js +0 -1
  299. package/build/node/surfaces/admin/api.js +0 -1
  300. package/build/node/surfaces/admin/components/TextField/TextField.js +0 -11
  301. package/build/node/surfaces/admin/components.js +0 -30
  302. package/build/node/surfaces/admin/extension-points.js +0 -1
  303. package/build/node/surfaces/admin/extension.js +0 -27
  304. package/build/node/surfaces/admin/index.js +0 -70
  305. package/build/node/surfaces/admin/shared.js +0 -1
  306. package/build/node/surfaces/checkout/api/cart-line-details/README.md +0 -1
  307. package/build/node/surfaces/checkout/api/cart-line-details/render-after.js +0 -1
  308. package/build/node/surfaces/checkout/api/shared.js +0 -1
  309. package/build/node/surfaces/checkout/api/standard/README.md +0 -1
  310. package/build/node/surfaces/checkout/api/standard/standard.js +0 -1
  311. package/build/node/surfaces/checkout/api.js +0 -1
  312. package/build/node/surfaces/checkout/components.js +0 -18
  313. package/build/node/surfaces/checkout/extension-points.js +0 -1
  314. package/build/node/surfaces/checkout/extension.js +0 -27
  315. package/build/node/surfaces/checkout/index.js +0 -70
  316. package/build/node/surfaces/checkout/shared.js +0 -1
  317. package/build/node/utilities/registration.js +0 -44
  318. package/build/ts/api.d.ts +0 -8
  319. package/build/ts/api.d.ts.map +0 -1
  320. package/build/ts/api.js +0 -2
  321. package/build/ts/components/BlockStack/BlockStack.d.ts +0 -8
  322. package/build/ts/components/BlockStack/BlockStack.d.ts.map +0 -1
  323. package/build/ts/components/BlockStack/BlockStack.js +0 -5
  324. package/build/ts/components/Button/Button.d.ts +0 -12
  325. package/build/ts/components/Button/Button.d.ts.map +0 -1
  326. package/build/ts/components/Button/Button.js +0 -5
  327. package/build/ts/components/Checkbox/Checkbox.d.ts +0 -30
  328. package/build/ts/components/Checkbox/Checkbox.d.ts.map +0 -1
  329. package/build/ts/components/Checkbox/Checkbox.js +0 -8
  330. package/build/ts/components/Text/Text.d.ts +0 -8
  331. package/build/ts/components/Text/Text.d.ts.map +0 -1
  332. package/build/ts/components/Text/Text.js +0 -5
  333. package/build/ts/components/TextField/TextField.d.ts +0 -53
  334. package/build/ts/components/TextField/TextField.d.ts.map +0 -1
  335. package/build/ts/components/TextField/TextField.js +0 -5
  336. package/build/ts/components/View/View.d.ts +0 -8
  337. package/build/ts/components/View/View.d.ts.map +0 -1
  338. package/build/ts/components/View/View.js +0 -5
  339. package/build/ts/components.d.ts +0 -13
  340. package/build/ts/components.d.ts.map +0 -1
  341. package/build/ts/components.js +0 -15
  342. package/build/ts/extension.d.ts +0 -15
  343. package/build/ts/extension.d.ts.map +0 -1
  344. package/build/ts/extension.js +0 -2
  345. package/build/ts/index.d.ts +0 -4
  346. package/build/ts/index.d.ts.map +0 -1
  347. package/build/ts/index.js +0 -19
  348. package/build/ts/surfaces/admin/api/checkout-editor/render-settings.d.ts +0 -19
  349. package/build/ts/surfaces/admin/api/checkout-editor/render-settings.d.ts.map +0 -1
  350. package/build/ts/surfaces/admin/api/checkout-editor/render-settings.js +0 -2
  351. package/build/ts/surfaces/admin/api/standard/standard.d.ts +0 -7
  352. package/build/ts/surfaces/admin/api/standard/standard.d.ts.map +0 -1
  353. package/build/ts/surfaces/admin/api/standard/standard.js +0 -2
  354. package/build/ts/surfaces/admin/api.d.ts +0 -3
  355. package/build/ts/surfaces/admin/api.d.ts.map +0 -1
  356. package/build/ts/surfaces/admin/api.js +0 -2
  357. package/build/ts/surfaces/admin/components/TextField/TextField.d.ts +0 -15
  358. package/build/ts/surfaces/admin/components/TextField/TextField.d.ts.map +0 -1
  359. package/build/ts/surfaces/admin/components/TextField/TextField.js +0 -5
  360. package/build/ts/surfaces/admin/components.d.ts +0 -4
  361. package/build/ts/surfaces/admin/components.d.ts.map +0 -1
  362. package/build/ts/surfaces/admin/components.js +0 -20
  363. package/build/ts/surfaces/admin/extension-points.d.ts +0 -9
  364. package/build/ts/surfaces/admin/extension-points.d.ts.map +0 -1
  365. package/build/ts/surfaces/admin/extension-points.js +0 -2
  366. package/build/ts/surfaces/admin/extension.d.ts +0 -4
  367. package/build/ts/surfaces/admin/extension.d.ts.map +0 -1
  368. package/build/ts/surfaces/admin/extension.js +0 -20
  369. package/build/ts/surfaces/admin/index.d.ts +0 -6
  370. package/build/ts/surfaces/admin/index.d.ts.map +0 -1
  371. package/build/ts/surfaces/admin/index.js +0 -21
  372. package/build/ts/surfaces/admin/shared.d.ts +0 -8
  373. package/build/ts/surfaces/admin/shared.d.ts.map +0 -1
  374. package/build/ts/surfaces/admin/shared.js +0 -2
  375. package/build/ts/surfaces/checkout/api/cart-line-details/render-after.d.ts +0 -6
  376. package/build/ts/surfaces/checkout/api/cart-line-details/render-after.d.ts.map +0 -1
  377. package/build/ts/surfaces/checkout/api/cart-line-details/render-after.js +0 -2
  378. package/build/ts/surfaces/checkout/api/shared.d.ts +0 -4
  379. package/build/ts/surfaces/checkout/api/shared.d.ts.map +0 -1
  380. package/build/ts/surfaces/checkout/api/shared.js +0 -2
  381. package/build/ts/surfaces/checkout/api/standard/standard.d.ts +0 -7
  382. package/build/ts/surfaces/checkout/api/standard/standard.d.ts.map +0 -1
  383. package/build/ts/surfaces/checkout/api/standard/standard.js +0 -2
  384. package/build/ts/surfaces/checkout/api.d.ts +0 -3
  385. package/build/ts/surfaces/checkout/api.d.ts.map +0 -1
  386. package/build/ts/surfaces/checkout/api.js +0 -2
  387. package/build/ts/surfaces/checkout/components.d.ts +0 -2
  388. package/build/ts/surfaces/checkout/components.d.ts.map +0 -1
  389. package/build/ts/surfaces/checkout/components.js +0 -17
  390. package/build/ts/surfaces/checkout/extension-points.d.ts +0 -10
  391. package/build/ts/surfaces/checkout/extension-points.d.ts.map +0 -1
  392. package/build/ts/surfaces/checkout/extension-points.js +0 -2
  393. package/build/ts/surfaces/checkout/extension.d.ts +0 -4
  394. package/build/ts/surfaces/checkout/extension.d.ts.map +0 -1
  395. package/build/ts/surfaces/checkout/extension.js +0 -20
  396. package/build/ts/surfaces/checkout/index.d.ts +0 -6
  397. package/build/ts/surfaces/checkout/index.d.ts.map +0 -1
  398. package/build/ts/surfaces/checkout/index.js +0 -21
  399. package/build/ts/surfaces/checkout/shared.d.ts +0 -8
  400. package/build/ts/surfaces/checkout/shared.d.ts.map +0 -1
  401. package/build/ts/surfaces/checkout/shared.js +0 -2
  402. package/build/ts/utilities/registration.d.ts +0 -13
  403. package/build/ts/utilities/registration.d.ts.map +0 -1
  404. package/build/ts/utilities/registration.js +0 -111
  405. package/build/tsconfig.tsbuildinfo +0 -1
  406. package/checkout.d.ts +0 -1
  407. package/index.d.ts +0 -1
  408. package/sewing-kit.config.ts +0 -9
  409. package/src/components/BlockStack/BlockStack.ts +0 -7
  410. package/src/components/BlockStack/README.md +0 -1
  411. package/src/components/Button/Button.ts +0 -10
  412. package/src/components/Button/README.md +0 -1
  413. package/src/components/Checkbox/README.md +0 -1
  414. package/src/components/Text/README.md +0 -1
  415. package/src/components/Text/Text.ts +0 -5
  416. package/src/components/TextField/README.md +0 -1
  417. package/src/components/TextField/TextField.ts +0 -56
  418. package/src/components/View/README.md +0 -1
  419. package/src/components/View/View.ts +0 -5
  420. package/src/components.ts +0 -17
  421. package/src/surfaces/admin/api/checkout-editor/README.md +0 -1
  422. package/src/surfaces/admin/api/checkout-editor/render-settings.ts +0 -26
  423. package/src/surfaces/admin/api/standard/README.md +0 -1
  424. package/src/surfaces/admin/api/standard/standard.ts +0 -8
  425. package/src/surfaces/admin/api.ts +0 -2
  426. package/src/surfaces/admin/components/TextField/TextField.ts +0 -16
  427. package/src/surfaces/admin/components.ts +0 -4
  428. package/src/surfaces/admin/extension-points.ts +0 -17
  429. package/src/surfaces/admin/extension.ts +0 -7
  430. package/src/surfaces/admin/index.ts +0 -5
  431. package/src/surfaces/admin/shared.ts +0 -14
@@ -0,0 +1,15 @@
1
+ # Icon
2
+
3
+ Icons are pictograms or graphic symbols.
4
+ They can act as wayfinding tools or as a means of communicating functionality.
5
+
6
+ ## Props
7
+
8
+ optional = ?
9
+
10
+ | Name | Type | Description |
11
+ | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
12
+ | accessibilityLabel? | <code>string</code> | A label that describes the purpose or contents of the icon. When set, it will be announced to buyers using assistive technologies and will provide them with more context. |
13
+ | appearance? | <code>"accent" &#124; "interactive" &#124; "subdued" &#124; "info" &#124; "success" &#124; "warning" &#124; "critical" &#124; "monochrome"</code> | Sets the appearance (color) of the icon.<br /><br />By default the icon will inherit the color of its parent.<br /><br /><code>"accent"</code>: Use to convey emphasis and draw attention to the icon.<br /><br /><code>"interactive"</code>: Use to convey that the icon is pressable, hoverable or otherwise interactive.<br /><br /><code>"subdued"</code>: Use to convey a subdued or disabled state for the icon.<br /><br /><code>"info"</code>: Use to convey icon is informative or has information.<br /><br /><code>"success"</code>: Use to convey a successful interaction.<br /><br /><code>"warning"</code>: Use to convey something needs attention or an action needs to be taken.<br /><br /><code>"critical"</code>: Use to convey a problem has arisen.<br /><br /><code>"monochrome"</code>: Will take the color of its parent<br /><br />Default value: <code>'monochrome'</code> |
14
+ | size? | <code>"extraSmall" &#124; "small" &#124; "base" &#124; "large" &#124; "fill"</code> | Adjusts the size of the icon.<br /><br />Default value: <code>'base'</code> |
15
+ | source | <code>"arrowLeft" &#124; "arrowRight" &#124; "arrowUp" &#124; "arrowUpRight" &#124; "arrowDown" &#124; "bag" &#124; "calendar" &#124; "camera" &#124; "caretDown" &#124; "cart" &#124; "checkmark" &#124; "chevronDown" &#124; "chevronUp" &#124; "chevronRight" &#124; "chevronLeft" &#124; "close" &#124; "critical" &#124; "discount" &#124; "delivered" &#124; "delivery" &#124; "disabled" &#124; "email" &#124; "errorFill" &#124; "geolocation" &#124; "grid" &#124; "hamburger" &#124; "horizontalDots" &#124; "info" &#124; "infoFill" &#124; "list" &#124; "lock" &#124; "magnify" &#124; "map" &#124; "marker" &#124; "minus" &#124; "mobile" &#124; "note" &#124; "pen" &#124; "verticalDots" &#124; "plus" &#124; "questionFill" &#124; "reorder" &#124; "store" &#124; "success" &#124; "truck" &#124; "warning" &#124; "warningFill" &#124; "giftFill" &#124; "external" &#124; "profile"</code> | Specifies which icon to display |
@@ -0,0 +1,7 @@
1
+ import {extend, Icon} from '@shopify/checkout-ui-extensions';
2
+
3
+ extend('Checkout::Dynamic::Render', (root) => {
4
+ const icon = root.createComponent(Icon, {source: 'discount'});
5
+
6
+ root.appendChild(icon);
7
+ });
@@ -0,0 +1,83 @@
1
+ import {createRemoteComponent} from '@remote-ui/core';
2
+
3
+ import type {
4
+ MaybeConditionalStyle,
5
+ MaybeResponsiveConditionalStyle,
6
+ ResolutionCondition,
7
+ ViewportSizeCondition,
8
+ AtLeastOne,
9
+ } from '../../style';
10
+ import {BorderProps} from '../shared';
11
+ import type {Fit, AccessibilityRole} from '../shared';
12
+
13
+ export interface ImageProps extends BorderProps {
14
+ /**
15
+ * The URL or path to the image. Supports the `resolution` and `viewportInlineSize` conditional styles only.
16
+ */
17
+ source: Required<
18
+ MaybeConditionalStyle<
19
+ string,
20
+ AtLeastOne<ViewportSizeCondition & ResolutionCondition>
21
+ >
22
+ >;
23
+ /**
24
+ * An alternative text description that describe the image for the reader to
25
+ * understand what it is about. It is extremely useful for both buyers using
26
+ * assistive technology and sighted buyers. A well written `description`
27
+ * provides people with visual impairments the ability to participate in
28
+ * consuming non-text content. When a screen readers encounters an `Image`,
29
+ * the description is read and announced aloud. If an image fails to load,
30
+ * potentially due to a poor connection, the `description` is displayed on
31
+ * screen instead. This has the benefit of letting a sighted buyer know an
32
+ * image was meant to load here, but as an alternative, they’re still able to
33
+ * consume the text content. Read
34
+ * [considerations when writing alternative text](https://ux.shopify.com/considerations-when-writing-alt-text-a9c1985a8204)
35
+ * to learn more.
36
+ *
37
+ * @defaultValue ''
38
+ */
39
+ accessibilityDescription?: string;
40
+ /**
41
+ * Indicates how the browser should load the image, either eager or lazy.
42
+ *
43
+ * Uses native browser behavior and is not supported by all browsers.
44
+ * If no value is provided then the image is loaded immediately, regardless of
45
+ * whether or not the image is currently within the visible viewport.
46
+ */
47
+ loading?: Loading;
48
+ /**
49
+ * Displays the image at the specified aspect ratio (fills the width of the
50
+ * parent container and sets the height accordingly) and creates an invisible
51
+ * placeholder to prevent content jumping when the image loads. Use along
52
+ * with `fit` if the specified aspect ratio does not match the intrinsic
53
+ * aspect ratio to prevent the image from stretching.
54
+ */
55
+ aspectRatio?: number;
56
+ /**
57
+ * Indicates how the image fits in its frame.
58
+ * Use if the image is not displayed at its intrinsic size to maintain
59
+ * the aspect ratio.
60
+ */
61
+ fit?: MaybeResponsiveConditionalStyle<Fit>;
62
+ /**
63
+ * Sets the semantic meaning of the component’s content. When set,
64
+ * the role will be used by assistive technologies to help buyers
65
+ * navigate the page.
66
+ */
67
+ accessibilityRole?: Extract<AccessibilityRole, 'decorative'>;
68
+ }
69
+
70
+ type Loading =
71
+ /**
72
+ * Image is loaded immediately, regardless of whether or not the image is currently within the visible viewport.
73
+ */
74
+ | 'eager'
75
+ /**
76
+ * Image is loaded when it’s within the visible viewport.
77
+ */
78
+ | 'lazy';
79
+
80
+ /**
81
+ * Image is used for large format, responsive images.
82
+ */
83
+ export const Image = createRemoteComponent<'Image', ImageProps>('Image');
@@ -0,0 +1,53 @@
1
+ # Image
2
+
3
+ Image is used for large format, responsive images.
4
+
5
+ ## Props
6
+
7
+ optional = ?
8
+
9
+ | Name | Type | Description |
10
+ | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11
+ | source | <code>Required<<wbr>string &#124; ConditionalStyle<<wbr>string, AcceptedConditions<wbr>><wbr>></code> | The URL or path to the image. Supports the `resolution` and `viewportInlineSize` conditional styles only. |
12
+ | accessibilityDescription? | <code>string</code> | An alternative text description that describe the image for the reader to understand what it is about. It is extremely useful for both buyers using assistive technology and sighted buyers. A well written `description` provides people with visual impairments the ability to participate in consuming non-text content. When a screen readers encounters an `Image`, the description is read and announced aloud. If an image fails to load, potentially due to a poor connection, the `description` is displayed on screen instead. This has the benefit of letting a sighted buyer know an image was meant to load here, but as an alternative, they’re still able to consume the text content. Read [considerations when writing alternative text](https://ux.shopify.com/considerations-when-writing-alt-text-a9c1985a8204) to learn more.<br /><br />Default value: <code>''</code> |
13
+ | loading? | <code>"eager" &#124; "lazy"</code> | Indicates how the browser should load the image, either eager or lazy.<br /><br />Uses native browser behavior and is not supported by all browsers. If no value is provided then the image is loaded immediately, regardless of whether or not the image is currently within the visible viewport.<br /><br /><code>"eager"</code>: Image is loaded immediately, regardless of whether or not the image is currently within the visible viewport.<br /><br /><code>"lazy"</code>: Image is loaded when it’s within the visible viewport. |
14
+ | aspectRatio? | <code>number</code> | Displays the image at the specified aspect ratio (fills the width of the parent container and sets the height accordingly) and creates an invisible placeholder to prevent content jumping when the image loads. Use along with `fit` if the specified aspect ratio does not match the intrinsic aspect ratio to prevent the image from stretching. |
15
+ | fit? | <code><a href="#fit">Fit</a> &#124; ConditionalStyle<<wbr><a href="#fit">Fit</a>, AcceptedConditions<wbr>></code> | Indicates how the image fits in its frame. Use if the image is not displayed at its intrinsic size to maintain the aspect ratio. |
16
+ | accessibilityRole? | <code>"decorative"</code> | Sets the semantic meaning of the component’s content. When set, the role will be used by assistive technologies to help buyers navigate the page.<br /><br /><code>"decorative"</code>: Used to indicate that an image is decorative and should be hidden from assistive technologies. |
17
+ | border? | <code><a href="#maybeshorthandproperty">MaybeShorthandProperty</a><<wbr><a href="#borderstyle">BorderStyle</a><wbr>> &#124; ConditionalStyle<<wbr><a href="#maybeshorthandproperty">MaybeShorthandProperty</a><<wbr><a href="#borderstyle">BorderStyle</a><wbr>>, AcceptedConditions<wbr>></code> | Adjust the border style.<br /><br />To shorten the code, it is possible to specify all the border style properties in one property.<br /><br />For example:<br /><br />- `base` means blockStart, inlineEnd, blockEnd and inlineStart border styles are `base`<br /><br />- `['base', 'none']` means blockStart and blockEnd border styles are `base`, inlineStart and inlineEnd border styles are `none`<br /><br />- `['base', 'none', 'dotted', 'base']` means blockStart border style is `base`, inlineEnd border style is `none`, blockEnd border style is `dotted` and blockStart border style is `base` |
18
+ | borderWidth? | <code><a href="#maybeshorthandproperty">MaybeShorthandProperty</a><<wbr><a href="#borderwidth">BorderWidth</a><wbr>> &#124; ConditionalStyle<<wbr><a href="#maybeshorthandproperty">MaybeShorthandProperty</a><<wbr><a href="#borderwidth">BorderWidth</a><wbr>>, AcceptedConditions<wbr>></code> | Adjust the border width.<br /><br />To shorten the code, it is possible to specify all the border width properties in one property.<br /><br />For example:<br /><br />- `base` means blockStart, inlineEnd, blockEnd and inlineStart border widths are `base`<br /><br />- `['base', 'medium']` means blockStart and blockEnd border widths are `base`, inlineStart and inlineEnd border widths are `medium`<br /><br />- `['base', 'medium', 'medium', 'base']` means blockStart border width is `base`, inlineEnd border width is `medium`, blockEnd border width is `medium` and blockStart border width is `base` |
19
+ | borderRadius? | <code><a href="#maybeshorthandproperty">MaybeShorthandProperty</a><<wbr><a href="#borderradius">BorderRadius</a><wbr>> &#124; ConditionalStyle<<wbr><a href="#maybeshorthandproperty">MaybeShorthandProperty</a><<wbr><a href="#borderradius">BorderRadius</a><wbr>>, AcceptedConditions<wbr>></code> | Adjust the border radius.<br /><br />To shorten the code, it is possible to specify all the border width properties in one property.<br /><br />For example:<br /><br />- `base` means blockStart, inlineEnd, blockEnd and inlineStart border radii are `base`<br /><br />- `['base', 'none']` means blockStart and blockEnd border radii are `base`, inlineStart and inlineEnd border radii are `none`<br /><br />- `['base', 'none', 'tight', 'base']` means blockStart border radius is `base`, inlineEnd border radius is `none`, blockEnd border radius is `tight` and blockStart border radius is `base` |
20
+
21
+ <a name="BorderRadius"></a>
22
+
23
+ ### BorderRadius
24
+
25
+ <code>"base" &#124; "tight" &#124; "loose" &#124; "fullyRounded" &#124; "none"</code>
26
+ <a name="BorderWidth"></a>
27
+
28
+ ### BorderWidth
29
+
30
+ <code>"base" &#124; "medium"</code>
31
+ <a name="MaybeShorthandProperty"></a>
32
+
33
+ ### MaybeShorthandProperty
34
+
35
+ <code>T &#124; <a href="#shorthandproperty">ShorthandProperty</a><<wbr>T<wbr>></code>
36
+ <a name="ShorthandProperty"></a>
37
+
38
+ ### ShorthandProperty
39
+
40
+ <code>[T, T] &#124; [T, T, T, T]</code>
41
+ <a name="BorderStyle"></a>
42
+
43
+ ### BorderStyle
44
+
45
+ <code>"base" &#124; "dotted" &#124; "none"</code>
46
+ <a name="Fit"></a>
47
+
48
+ ### Fit
49
+
50
+ | Value | Description |
51
+ | ---------------------- | ------------------------------------------------------------------------------------------------------------------------- |
52
+ | <code>"cover"</code> | Image maintains its aspect ratio while fitting within the frame. |
53
+ | <code>"contain"</code> | Image maintains its aspect ratio while filling the frame. If the image is larger than the frame, then it will be cropped. |
@@ -0,0 +1,10 @@
1
+ import {extend, Image} from '@shopify/checkout-ui-extensions';
2
+
3
+ extend('Checkout::Dynamic::Render', (root) => {
4
+ const image = root.createComponent(Image, {
5
+ source:
6
+ 'https://shopify.dev/assets/api/checkout-extensions/checkout/components/image-example-code.png',
7
+ });
8
+
9
+ root.appendChild(image);
10
+ });
@@ -0,0 +1,49 @@
1
+ import {createRemoteComponent} from '@remote-ui/core';
2
+
3
+ import type {MaybeResponsiveConditionalStyle} from '../../style';
4
+ import type {BorderProps, Columns, SizingProps, SpacingProps} from '../shared';
5
+ import type {GridProps} from '../Grid/Grid';
6
+
7
+ export interface InlineLayoutProps
8
+ extends Omit<GridProps, 'columns' | 'rows'>,
9
+ BorderProps,
10
+ SizingProps,
11
+ SpacingProps {
12
+ /**
13
+ * Sizes for each column of the layout.
14
+ *
15
+ *
16
+ * `auto`: intrinsic size of the element.
17
+ *
18
+ * `fill`: fills the remaining available space. When multiple elements are set to `fill`, the remaining space is shared equally.
19
+ *
20
+ * `` `${number}%` ``: size in percentages.
21
+ *
22
+ * `` `${number}fr` ``: size in fractions.
23
+ *
24
+ * `number`: size in pixels.
25
+ *
26
+ *
27
+ * - When the sum of the defined sizes is larger than the available space, elements will shrink to avoid overflow.
28
+ *
29
+ * - When the size of an element is not explicitly set, it will fill the remaining space available.
30
+ *
31
+ * - When only one size is set and outside of an array, all elements of the layout will take that size.
32
+ *
33
+ *
34
+ * @defaultValue 'fill'
35
+ */
36
+ columns?: MaybeResponsiveConditionalStyle<Columns>;
37
+ }
38
+
39
+ /**
40
+ * InlineLayout is used to lay out content over multiple columns.
41
+ *
42
+ * By default, all columns are of equal size and fill the available inline space.
43
+ * Content does not wrap on new rows when not enough columns have been explicitly set,
44
+ * instead they are added as new column and fill the remaining inline space.
45
+ */
46
+ export const InlineLayout = createRemoteComponent<
47
+ 'InlineLayout',
48
+ InlineLayoutProps
49
+ >('InlineLayout');
@@ -0,0 +1,103 @@
1
+ # InlineLayout
2
+
3
+ InlineLayout is used to lay out content over multiple columns.
4
+
5
+ By default, all columns are of equal size and fill the available inline space.
6
+ Content does not wrap on new rows when not enough columns have been explicitly set,
7
+ instead they are added as new column and fill the remaining inline space.
8
+
9
+ ## Props
10
+
11
+ optional = ?
12
+
13
+ | Name | Type | Description |
14
+ | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
15
+ | columns? | <code><a href="#columns">Columns</a> &#124; ConditionalStyle<<wbr><a href="#columns">Columns</a>, AcceptedConditions<wbr>></code> | Sizes for each column of the layout.<br /><br />`auto`: intrinsic size of the element.<br /><br />`fill`: fills the remaining available space. When multiple elements are set to `fill`, the remaining space is shared equally.<br /><br />`` `${number}%` ``: size in percentages.<br /><br />`` `${number}fr` ``: size in fractions.<br /><br />`number`: size in pixels.<br /><br />- When the sum of the defined sizes is larger than the available space, elements will shrink to avoid overflow.<br /><br />- When the size of an element is not explicitly set, it will fill the remaining space available.<br /><br />- When only one size is set and outside of an array, all elements of the layout will take that size.<br /><br />Default value: <code>'fill'</code> |
16
+ | spacing? | <code><a href="#spacing">Spacing</a> &#124; [<a href="#spacing">Spacing</a>, <a href="#spacing">Spacing</a>] &#124; ConditionalStyle<<wbr><a href="#spacing">Spacing</a> &#124; [<a href="#spacing">Spacing</a>, <a href="#spacing">Spacing</a>], AcceptedConditions<wbr>></code> | Adjust spacing between children.<br /><br />- `base` means the space between rows and columns is `base`.<br /><br />- [`base`, `none`] means the space between rows is `base`, space between columns is `none`.<br /><br />Default value: <code>'none'</code> |
17
+ | blockAlignment? | <code><a href="#blockalignment">BlockAlignment</a> &#124; ConditionalStyle<<wbr><a href="#blockalignment">BlockAlignment</a>, AcceptedConditions<wbr>></code> | Position children along the cross axis. |
18
+ | inlineAlignment? | <code><a href="#inlinealignment">InlineAlignment</a> &#124; ConditionalStyle<<wbr><a href="#inlinealignment">InlineAlignment</a>, AcceptedConditions<wbr>></code> | Position children along the main axis. |
19
+ | accessibilityRole? | <code><a href="#nonpresentationalaccessibilityrole">NonPresentationalAccessibilityRole</a> &#124; [<a href="#nonpresentationalaccessibilityrole">NonPresentationalAccessibilityRole</a>, <a href="#nonpresentationalaccessibilityrole">NonPresentationalAccessibilityRole</a>]</code> | Sets the semantic meaning of the component’s content. When set, the role will be used by assistive technologies to help buyers navigate the page.<br /><br />For example:<br /><br />- In an HTML host a `['listItem', 'separator']` tuple will render: &lt;li role='separator'&gt;<br /><br />- In an HTML host a `listItem` string will render: &lt;li&gt; |
20
+ | accessibilityLabel? | <code>string</code> | A label that describes the purpose or contents of the element. When set, it will be announced to buyers using assistive technologies and will provide them with more context. |
21
+ | border? | <code><a href="#maybeshorthandproperty">MaybeShorthandProperty</a><<wbr><a href="#borderstyle">BorderStyle</a><wbr>> &#124; ConditionalStyle<<wbr><a href="#maybeshorthandproperty">MaybeShorthandProperty</a><<wbr><a href="#borderstyle">BorderStyle</a><wbr>>, AcceptedConditions<wbr>></code> | Adjust the border style.<br /><br />To shorten the code, it is possible to specify all the border style properties in one property.<br /><br />For example:<br /><br />- `base` means blockStart, inlineEnd, blockEnd and inlineStart border styles are `base`<br /><br />- `['base', 'none']` means blockStart and blockEnd border styles are `base`, inlineStart and inlineEnd border styles are `none`<br /><br />- `['base', 'none', 'dotted', 'base']` means blockStart border style is `base`, inlineEnd border style is `none`, blockEnd border style is `dotted` and blockStart border style is `base` |
22
+ | borderWidth? | <code><a href="#maybeshorthandproperty">MaybeShorthandProperty</a><<wbr><a href="#borderwidth">BorderWidth</a><wbr>> &#124; ConditionalStyle<<wbr><a href="#maybeshorthandproperty">MaybeShorthandProperty</a><<wbr><a href="#borderwidth">BorderWidth</a><wbr>>, AcceptedConditions<wbr>></code> | Adjust the border width.<br /><br />To shorten the code, it is possible to specify all the border width properties in one property.<br /><br />For example:<br /><br />- `base` means blockStart, inlineEnd, blockEnd and inlineStart border widths are `base`<br /><br />- `['base', 'medium']` means blockStart and blockEnd border widths are `base`, inlineStart and inlineEnd border widths are `medium`<br /><br />- `['base', 'medium', 'medium', 'base']` means blockStart border width is `base`, inlineEnd border width is `medium`, blockEnd border width is `medium` and blockStart border width is `base` |
23
+ | borderRadius? | <code><a href="#maybeshorthandproperty">MaybeShorthandProperty</a><<wbr><a href="#borderradius">BorderRadius</a><wbr>> &#124; ConditionalStyle<<wbr><a href="#maybeshorthandproperty">MaybeShorthandProperty</a><<wbr><a href="#borderradius">BorderRadius</a><wbr>>, AcceptedConditions<wbr>></code> | Adjust the border radius.<br /><br />To shorten the code, it is possible to specify all the border width properties in one property.<br /><br />For example:<br /><br />- `base` means blockStart, inlineEnd, blockEnd and inlineStart border radii are `base`<br /><br />- `['base', 'none']` means blockStart and blockEnd border radii are `base`, inlineStart and inlineEnd border radii are `none`<br /><br />- `['base', 'none', 'tight', 'base']` means blockStart border radius is `base`, inlineEnd border radius is `none`, blockEnd border radius is `tight` and blockStart border radius is `base` |
24
+ | maxBlockSize? | <code>number &#124; &#96;&dollar;{number}%&#96; &#124; "fill" &#124; ConditionalStyle<<wbr>number &#124; &#96;&dollar;{number}%&#96; &#124; "fill", AcceptedConditions<wbr>></code> | Adjust the maximum block size.<br /><br />`number`: size in pixels.<br /><br />`` `${number}%` ``: size in percentages.<br /><br />`fill`: takes all the available space. |
25
+ | maxInlineSize? | <code>number &#124; &#96;&dollar;{number}%&#96; &#124; "fill" &#124; ConditionalStyle<<wbr>number &#124; &#96;&dollar;{number}%&#96; &#124; "fill", AcceptedConditions<wbr>></code> | Adjust the maximum inline size.<br /><br />`number`: size in pixels.<br /><br />`` `${number}%` ``: size in percentages.<br /><br />`fill`: takes all the available space. |
26
+ | minInlineSize? | <code>number &#124; &#96;&dollar;{number}%&#96; &#124; "fill" &#124; ConditionalStyle<<wbr>number &#124; &#96;&dollar;{number}%&#96; &#124; "fill", AcceptedConditions<wbr>></code> | Adjust the minimum inline size.<br /><br />`number`: size in pixels.<br /><br />`` `${number}%` ``: size in percentages.<br /><br />`fill`: takes all the available space. |
27
+ | minBlockSize? | <code>number &#124; &#96;&dollar;{number}%&#96; &#124; "fill" &#124; ConditionalStyle<<wbr>number &#124; &#96;&dollar;{number}%&#96; &#124; "fill", AcceptedConditions<wbr>></code> | Adjust the block size.<br /><br />`number`: size in pixels.<br /><br />`` `${number}%` ``: size in percentages.<br /><br />`fill`: takes all the available space. |
28
+ | padding? | <code><a href="#maybeshorthandproperty">MaybeShorthandProperty</a><<wbr><a href="#spacing">Spacing</a><wbr>> &#124; ConditionalStyle<<wbr><a href="#maybeshorthandproperty">MaybeShorthandProperty</a><<wbr><a href="#spacing">Spacing</a><wbr>>, AcceptedConditions<wbr>></code> | Adjust the padding.<br /><br />To shorten the code, it is possible to specify all the padding properties in one property.<br /><br />Examples:<br /><br />- `base` means blockStart, inlineEnd, blockEnd and inlineStart paddings are `base`<br /><br />- [`base`, `none`] means blockStart and blockEnd paddings are `base`, inlineStart and inlineEnd paddings are `none`<br /><br />- [`base`, `none`, `loose`, `tight`] means blockStart padding is `base`, inlineEnd padding is `none`, blockEnd padding is `loose` and blockStart padding is `tight` |
29
+
30
+ <a name="BorderRadius"></a>
31
+
32
+ ### BorderRadius
33
+
34
+ <code>"base" &#124; "tight" &#124; "loose" &#124; "fullyRounded" &#124; "none"</code>
35
+ <a name="BorderWidth"></a>
36
+
37
+ ### BorderWidth
38
+
39
+ <code>"base" &#124; "medium"</code>
40
+ <a name="MaybeShorthandProperty"></a>
41
+
42
+ ### MaybeShorthandProperty
43
+
44
+ <code>T &#124; <a href="#shorthandproperty">ShorthandProperty</a><<wbr>T<wbr>></code>
45
+ <a name="ShorthandProperty"></a>
46
+
47
+ ### ShorthandProperty
48
+
49
+ <code>[T, T] &#124; [T, T, T, T]</code>
50
+ <a name="BorderStyle"></a>
51
+
52
+ ### BorderStyle
53
+
54
+ <code>"base" &#124; "dotted" &#124; "none"</code>
55
+ <a name="NonPresentationalAccessibilityRole"></a>
56
+
57
+ ### NonPresentationalAccessibilityRole
58
+
59
+ | Value | Description |
60
+ | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
61
+ | <code>"main"</code> | Used to indicate the primary content. |
62
+ | <code>"header"</code> | Used to indicate the component is a header. |
63
+ | <code>"footer"</code> | Used to display information such as copyright information, navigation links, and privacy statements. |
64
+ | <code>"section"</code> | Used to indicate a generic section. |
65
+ | <code>"complementary"</code> | Used to designate a supporting section that relates to the main content. |
66
+ | <code>"navigation"</code> | Used to identify major groups of links used for navigating. |
67
+ | <code>"orderedList"</code> | Used to identify a list of ordered items. |
68
+ | <code>"listItem"</code> | Used to identify an item inside a list of items. |
69
+ | <code>"unorderedList"</code> | Used to identify a list of unordered items. |
70
+ | <code>"separator"</code> | Used to indicates the component acts as a divider that separates and distinguishes sections of content. |
71
+ | <code>"status"</code> | Used to define a live region containing advisory information for the user that is not important enough to be an alert. |
72
+ | <code>"alert"</code> | Used for important, and usually time-sensitive, information. |
73
+
74
+ <a name="InlineAlignment"></a>
75
+
76
+ ### InlineAlignment
77
+
78
+ <code>"start" &#124; "center" &#124; "end"</code>
79
+ <a name="BlockAlignment"></a>
80
+
81
+ ### BlockAlignment
82
+
83
+ <code><a href="#alignment">Alignment</a> &#124; "baseline"</code>
84
+ <a name="Alignment"></a>
85
+
86
+ ### Alignment
87
+
88
+ <code>"start" &#124; "center" &#124; "end"</code>
89
+ <a name="Spacing"></a>
90
+
91
+ ### Spacing
92
+
93
+ <code>"none" &#124; "extraTight" &#124; "tight" &#124; "base" &#124; "loose" &#124; "extraLoose"</code>
94
+ <a name="Columns"></a>
95
+
96
+ ### Columns
97
+
98
+ <code><a href="#griditemsize">GridItemSize</a>[] &#124; <a href="#griditemsize">GridItemSize</a></code>
99
+ <a name="GridItemSize"></a>
100
+
101
+ ### GridItemSize
102
+
103
+ <code>"auto" &#124; "fill" &#124; number &#124; &#96;&dollar;{number}fr&#96; &#124; &#96;&dollar;{number}%&#96;</code>
@@ -0,0 +1,16 @@
1
+ import {extend, InlineLayout, View} from '@shopify/checkout-ui-extensions';
2
+
3
+ extend('Checkout::Dynamic::Render', (root) => {
4
+ const inlineLayout = root.createComponent(
5
+ InlineLayout,
6
+ {
7
+ columns: ['20%', 'fill'],
8
+ },
9
+ [
10
+ root.createComponent(View, {border: 'base', padding: 'base'}, '20%'),
11
+ root.createComponent(View, {border: 'base', padding: 'base'}, 'fill'),
12
+ ],
13
+ );
14
+
15
+ root.appendChild(inlineLayout);
16
+ });
@@ -0,0 +1,24 @@
1
+ import {createRemoteComponent} from '@remote-ui/core';
2
+
3
+ import type {MaybeResponsiveConditionalStyle} from '../../style';
4
+ import type {Spacing} from '../shared';
5
+
6
+ export interface InlineSpacerProps {
7
+ /**
8
+ * Adjust size of the spacer
9
+ *
10
+ * @defaultValue 'base'
11
+ **/
12
+ spacing?: MaybeResponsiveConditionalStyle<Exclude<Spacing, 'none'>>;
13
+ }
14
+
15
+ /**
16
+ * InlineSpacer is used to create empty inline space, typically when variable spacing
17
+ * is needed between multiple elements.
18
+ *
19
+ * Note that you should favor InlineStack when spacing between all elements is the same.
20
+ */
21
+ export const InlineSpacer = createRemoteComponent<
22
+ 'InlineSpacer',
23
+ InlineSpacerProps
24
+ >('InlineSpacer');
@@ -0,0 +1,14 @@
1
+ # InlineSpacer
2
+
3
+ InlineSpacer is used to create empty inline space, typically when variable spacing
4
+ is needed between multiple elements.
5
+
6
+ Note that you should favor InlineStack when spacing between all elements is the same.
7
+
8
+ ## Props
9
+
10
+ optional = ?
11
+
12
+ | Name | Type | Description |
13
+ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
14
+ | spacing? | <code>"extraTight" &#124; "tight" &#124; "base" &#124; "loose" &#124; "extraLoose" &#124; ConditionalStyle<<wbr>"extraTight" &#124; "tight" &#124; "base" &#124; "loose" &#124; "extraLoose", AcceptedConditions<wbr>></code> | Adjust size of the spacer<br /><br />Default value: <code>'base'</code> |
@@ -0,0 +1,16 @@
1
+ import {
2
+ extend,
3
+ InlineSpacer,
4
+ InlineStack,
5
+ View,
6
+ } from '@shopify/checkout-ui-extensions';
7
+
8
+ extend('Checkout::Dynamic::Render', (root) => {
9
+ const inlineSpacer = root.createComponent(InlineStack, {spacing: 'none'}, [
10
+ root.createComponent(View, {border: 'base', padding: 'base'}, 'View'),
11
+ root.createComponent(InlineSpacer, {spacing: 'loose'}),
12
+ root.createComponent(View, {border: 'base', padding: 'base'}, 'View'),
13
+ ]);
14
+
15
+ root.appendChild(inlineSpacer);
16
+ });
@@ -0,0 +1,63 @@
1
+ import {createRemoteComponent} from '@remote-ui/core';
2
+
3
+ import type {MaybeResponsiveConditionalStyle} from '../../style';
4
+ import type {
5
+ BlockAlignment,
6
+ BorderProps,
7
+ InlineAlignment,
8
+ SizingProps,
9
+ Spacing,
10
+ SpacingProps,
11
+ ViewLikeAccessibilityRole,
12
+ } from '../shared';
13
+
14
+ export interface InlineStackProps
15
+ extends BorderProps,
16
+ SizingProps,
17
+ SpacingProps {
18
+ /**
19
+ * Sets the semantic meaning of the component’s content. When set,
20
+ * the role will be used by assistive technologies to help buyers
21
+ * navigate the page.
22
+ *
23
+ *
24
+ * For example:
25
+ *
26
+ * - In an HTML host a `'listItem'` string will render: `<li>`
27
+ *
28
+ * - In an HTML host a `['listItem', 'separator']` tuple will render: `<li role='separator'>`
29
+ */
30
+ accessibilityRole?: ViewLikeAccessibilityRole;
31
+ /**
32
+ * A label that describes the purpose or contents of the element. When set,
33
+ * it will be announced to buyers using assistive technologies and will
34
+ * provide them with more context.
35
+ */
36
+ accessibilityLabel?: string;
37
+ /**
38
+ * Position children along the cross axis
39
+ *
40
+ * @defaultValue 'start'
41
+ */
42
+ blockAlignment?: MaybeResponsiveConditionalStyle<BlockAlignment>;
43
+ /**
44
+ * Position children along the main axis
45
+ *
46
+ * @defaultValue 'start'
47
+ */
48
+ inlineAlignment?: MaybeResponsiveConditionalStyle<InlineAlignment>;
49
+ /**
50
+ * Adjust spacing between children
51
+ *
52
+ * @defaultValue 'base'
53
+ **/
54
+ spacing?: MaybeResponsiveConditionalStyle<Spacing>;
55
+ }
56
+
57
+ /**
58
+ * InlineStack is used to lay out a horizontal row of elements. Elements always wrap.
59
+ */
60
+ export const InlineStack = createRemoteComponent<
61
+ 'InlineStack',
62
+ InlineStackProps
63
+ >('InlineStack');