@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,105 @@
1
+ # Grid
2
+
3
+ Grid is used to lay out content in a matrix of rows and columns.
4
+
5
+ ## Props
6
+
7
+ optional = ?
8
+
9
+ | Name | Type | Description |
10
+ | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11
+ | 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 content.<br /><br />`fill`: fills the remaining available space. When multiple columns 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. - Except when in scrollview, where the grid will fill the space with the defined sizes.<br /><br />- When only one size is set and outside of an array, the grid will have one column of that size.<br /><br />Default value: <code>'fill'</code> |
12
+ | rows? | <code><a href="#rows">Rows</a> &#124; ConditionalStyle<<wbr><a href="#rows">Rows</a>, AcceptedConditions<wbr>></code> | Sizes for each row of the layout.<br /><br />`auto`: intrinsic size of the content.<br /><br />`fill`: fills the remaining available space. When multiple rows 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 only one size is set and outside of an array, the grid will have one row of that size.<br /><br />Default value: <code>'fill'</code> |
13
+ | 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> |
14
+ | blockAlignment? | <code><a href="#blockalignment">BlockAlignment</a> &#124; ConditionalStyle<<wbr><a href="#blockalignment">BlockAlignment</a>, AcceptedConditions<wbr>></code> | Position children along the cross axis. |
15
+ | inlineAlignment? | <code><a href="#inlinealignment">InlineAlignment</a> &#124; ConditionalStyle<<wbr><a href="#inlinealignment">InlineAlignment</a>, AcceptedConditions<wbr>></code> | Position children along the main axis. |
16
+ | 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; |
17
+ | 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. |
18
+ | 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` |
19
+ | 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` |
20
+ | 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` |
21
+ | 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. |
22
+ | 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. |
23
+ | 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. |
24
+ | 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. |
25
+ | 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` |
26
+
27
+ <a name="BorderRadius"></a>
28
+
29
+ ### BorderRadius
30
+
31
+ <code>"base" &#124; "tight" &#124; "loose" &#124; "fullyRounded" &#124; "none"</code>
32
+ <a name="BorderWidth"></a>
33
+
34
+ ### BorderWidth
35
+
36
+ <code>"base" &#124; "medium"</code>
37
+ <a name="MaybeShorthandProperty"></a>
38
+
39
+ ### MaybeShorthandProperty
40
+
41
+ <code>T &#124; <a href="#shorthandproperty">ShorthandProperty</a><<wbr>T<wbr>></code>
42
+ <a name="ShorthandProperty"></a>
43
+
44
+ ### ShorthandProperty
45
+
46
+ <code>[T, T] &#124; [T, T, T, T]</code>
47
+ <a name="BorderStyle"></a>
48
+
49
+ ### BorderStyle
50
+
51
+ <code>"base" &#124; "dotted" &#124; "none"</code>
52
+ <a name="NonPresentationalAccessibilityRole"></a>
53
+
54
+ ### NonPresentationalAccessibilityRole
55
+
56
+ | Value | Description |
57
+ | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
58
+ | <code>"main"</code> | Used to indicate the primary content. |
59
+ | <code>"header"</code> | Used to indicate the component is a header. |
60
+ | <code>"footer"</code> | Used to display information such as copyright information, navigation links, and privacy statements. |
61
+ | <code>"section"</code> | Used to indicate a generic section. |
62
+ | <code>"complementary"</code> | Used to designate a supporting section that relates to the main content. |
63
+ | <code>"navigation"</code> | Used to identify major groups of links used for navigating. |
64
+ | <code>"orderedList"</code> | Used to identify a list of ordered items. |
65
+ | <code>"listItem"</code> | Used to identify an item inside a list of items. |
66
+ | <code>"unorderedList"</code> | Used to identify a list of unordered items. |
67
+ | <code>"separator"</code> | Used to indicates the component acts as a divider that separates and distinguishes sections of content. |
68
+ | <code>"status"</code> | Used to define a live region containing advisory information for the user that is not important enough to be an alert. |
69
+ | <code>"alert"</code> | Used for important, and usually time-sensitive, information. |
70
+
71
+ <a name="InlineAlignment"></a>
72
+
73
+ ### InlineAlignment
74
+
75
+ <code>"start" &#124; "center" &#124; "end"</code>
76
+ <a name="BlockAlignment"></a>
77
+
78
+ ### BlockAlignment
79
+
80
+ <code><a href="#alignment">Alignment</a> &#124; "baseline"</code>
81
+ <a name="Alignment"></a>
82
+
83
+ ### Alignment
84
+
85
+ <code>"start" &#124; "center" &#124; "end"</code>
86
+ <a name="Spacing"></a>
87
+
88
+ ### Spacing
89
+
90
+ <code>"none" &#124; "extraTight" &#124; "tight" &#124; "base" &#124; "loose" &#124; "extraLoose"</code>
91
+ <a name="Rows"></a>
92
+
93
+ ### Rows
94
+
95
+ <code><a href="#griditemsize">GridItemSize</a>[] &#124; <a href="#griditemsize">GridItemSize</a></code>
96
+ <a name="Columns"></a>
97
+
98
+ ### Columns
99
+
100
+ <code><a href="#griditemsize">GridItemSize</a>[] &#124; <a href="#griditemsize">GridItemSize</a></code>
101
+ <a name="GridItemSize"></a>
102
+
103
+ ### GridItemSize
104
+
105
+ <code>"auto" &#124; "fill" &#124; number &#124; &#96;&dollar;{number}fr&#96; &#124; &#96;&dollar;{number}%&#96;</code>
@@ -0,0 +1,3 @@
1
+ ## Related components
2
+
3
+ - [`GridItem`](https://github.com/Shopify/ui-extensions/tree/main/packages/checkout-ui-extensions/src/components/GridItem): Used as children of the `Grid` component. The `GridItem` offers a way to span the element across a number of columns and rows.
@@ -0,0 +1,45 @@
1
+ import {extend, Grid, View} from '@shopify/checkout-ui-extensions';
2
+
3
+ extend('Checkout::Dynamic::Render', (root) => {
4
+ const grid = root.createComponent(
5
+ Grid,
6
+ {
7
+ columns: ['20%', 'fill', 'auto'],
8
+ rows: [300, 'auto'],
9
+ },
10
+ [
11
+ root.createComponent(
12
+ View,
13
+ {border: 'base', padding: 'base'},
14
+ '20% / 300',
15
+ ),
16
+ root.createComponent(
17
+ View,
18
+ {border: 'base', padding: 'base'},
19
+ 'fill / 300',
20
+ ),
21
+ root.createComponent(
22
+ View,
23
+ {border: 'base', padding: 'base'},
24
+ 'auto / 300',
25
+ ),
26
+ root.createComponent(
27
+ View,
28
+ {border: 'base', padding: 'base'},
29
+ '20% / auto',
30
+ ),
31
+ root.createComponent(
32
+ View,
33
+ {border: 'base', padding: 'base'},
34
+ 'fill / auto',
35
+ ),
36
+ root.createComponent(
37
+ View,
38
+ {border: 'base', padding: 'base'},
39
+ 'auto / auto',
40
+ ),
41
+ ],
42
+ );
43
+
44
+ root.appendChild(grid);
45
+ });
@@ -0,0 +1,42 @@
1
+ import {createRemoteComponent} from '@remote-ui/core';
2
+
3
+ import type {MaybeResponsiveConditionalStyle} from '../../style';
4
+ import type {
5
+ BorderProps,
6
+ SizingProps,
7
+ SpacingProps,
8
+ ViewLikeAccessibilityRole,
9
+ } from '../shared';
10
+
11
+ export interface GridItemProps extends BorderProps, SizingProps, SpacingProps {
12
+ /**
13
+ * Number of columns the item will span across
14
+ */
15
+ columnSpan?: MaybeResponsiveConditionalStyle<number>;
16
+ /**
17
+ * Number of rows the item will span across
18
+ */
19
+ rowSpan?: MaybeResponsiveConditionalStyle<number>;
20
+ /**
21
+ * Sets the semantic meaning of the component’s content. When set,
22
+ * the role will be used by assistive technologies to help buyers
23
+ * navigate the page.
24
+ *
25
+ *
26
+ * For example:
27
+ *
28
+ * - In an HTML host a `['listItem', 'separator']` tuple will render: <li role='separator'>
29
+ *
30
+ * - In an HTML host a `listItem` string will render: <li>
31
+ */
32
+ accessibilityRole?: ViewLikeAccessibilityRole;
33
+ }
34
+
35
+ /**
36
+ * GridItem can be used as children of Grid.
37
+ *
38
+ * It offers a way to span the element across a number of columns and rows.
39
+ */
40
+ export const GridItem = createRemoteComponent<'GridItem', GridItemProps>(
41
+ 'GridItem',
42
+ );
@@ -0,0 +1,72 @@
1
+ # GridItem
2
+
3
+ GridItem can be used as children of Grid.
4
+
5
+ It offers a way to span the element across a number of columns and rows.
6
+
7
+ ## Props
8
+
9
+ optional = ?
10
+
11
+ | Name | Type | Description |
12
+ | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
13
+ | columnSpan? | <code>number &#124; ConditionalStyle<<wbr>number, AcceptedConditions<wbr>></code> | Number of columns the item will span across |
14
+ | rowSpan? | <code>number &#124; ConditionalStyle<<wbr>number, AcceptedConditions<wbr>></code> | Number of rows the item will span across |
15
+ | 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; |
16
+ | 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` |
17
+ | 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` |
18
+ | 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` |
19
+ | 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. |
20
+ | 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. |
21
+ | 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. |
22
+ | 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. |
23
+ | 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` |
24
+
25
+ <a name="Spacing"></a>
26
+
27
+ ### Spacing
28
+
29
+ <code>"none" &#124; "extraTight" &#124; "tight" &#124; "base" &#124; "loose" &#124; "extraLoose"</code>
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. |
@@ -0,0 +1,3 @@
1
+ ## Related components
2
+
3
+ - [`Grid`](https://github.com/Shopify/ui-extensions/tree/main/packages/checkout-ui-extensions/src/components/Grid): Used to lay out content in a matrix of rows and columns. It should always be the parent of `GridItem` components.
@@ -0,0 +1,42 @@
1
+ import {extend, Grid, GridItem, View} from '@shopify/checkout-ui-extensions';
2
+
3
+ extend('Checkout::Dynamic::Render', (root) => {
4
+ const grid = root.createComponent(
5
+ Grid,
6
+ {
7
+ columns: ['20%', 'fill', 'auto'],
8
+ rows: [300, 'auto'],
9
+ },
10
+ [
11
+ root.createComponent(
12
+ View,
13
+ {border: 'base', padding: 'base'},
14
+ '20% / 300',
15
+ ),
16
+ root.createComponent(
17
+ View,
18
+ {border: 'base', padding: 'base'},
19
+ 'fill / 300',
20
+ ),
21
+ root.createComponent(
22
+ View,
23
+ {border: 'base', padding: 'base'},
24
+ 'auto / 300',
25
+ ),
26
+ root.createComponent(GridItem, {columnSpan: 2}, [
27
+ root.createComponent(
28
+ View,
29
+ {border: 'base', padding: 'base'},
30
+ '20% + fill / auto',
31
+ ),
32
+ ]),
33
+ root.createComponent(
34
+ View,
35
+ {border: 'base', padding: 'base'},
36
+ 'auto / auto',
37
+ ),
38
+ ],
39
+ );
40
+
41
+ root.appendChild(grid);
42
+ });
@@ -0,0 +1,44 @@
1
+ import {createRemoteComponent} from '@remote-ui/core';
2
+
3
+ import type {InlineAlignment, AccessibilityRole} from '../shared';
4
+
5
+ type Level = 1 | 2 | 3;
6
+
7
+ export interface HeadingProps {
8
+ /**
9
+ * Unique identifier.
10
+ * Typically used to make the heading a target that another component
11
+ * can refer to in order to provide an alternative accessibility label.
12
+ */
13
+ id?: string;
14
+ /**
15
+ * The visual level of the heading. When not set, the heading will use
16
+ * its “automatic” heading level, which is determined by the level of nesting
17
+ * within ancestor `HeadingGroup`s. No matter what value you provide here,
18
+ * the semantic level (e.g., how the heading contributes to the document outline)
19
+ * is determined exclusively by the “automatic” heading level.
20
+ */
21
+ level?: Level;
22
+ /**
23
+ * Sets the semantic meaning of the component’s content. When set,
24
+ * the role will be used by assistive technologies to help buyers
25
+ * navigate the page.
26
+ */
27
+ accessibilityRole?: Extract<AccessibilityRole, 'presentation'>;
28
+ /**
29
+ * Align text along the main axis.
30
+ */
31
+ inlineAlignment?: InlineAlignment;
32
+ }
33
+
34
+ /**
35
+ * Headings control the visual style of headings. Use headings to introduce major
36
+ * sections, like Contact information, Shipping address, or Shipping method.
37
+ *
38
+ * Unlike HTML headings, you don’t explicitly specify the position of the heading in the
39
+ * document outline. Nest headings within the heading group component to control
40
+ * the document outline structure used by assistive technologies.
41
+ */
42
+ export const Heading = createRemoteComponent<'Heading', HeadingProps>(
43
+ 'Heading',
44
+ );
@@ -0,0 +1,19 @@
1
+ # Heading
2
+
3
+ Headings control the visual style of headings. Use headings to introduce major
4
+ sections, like Contact information, Shipping address, or Shipping method.
5
+
6
+ Unlike HTML headings, you don’t explicitly specify the position of the heading in the
7
+ document outline. Nest headings within the heading group component to control
8
+ the document outline structure used by assistive technologies.
9
+
10
+ ## Props
11
+
12
+ optional = ?
13
+
14
+ | Name | Type | Description |
15
+ | ------------------ | ------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
16
+ | id? | <code>string</code> | Unique identifier. Typically used to make the heading a target that another component can refer to in order to provide an alternative accessibility label. |
17
+ | level? | <code>1 &#124; 2 &#124; 3</code> | The visual level of the heading. When not set, the heading will use its “automatic” heading level, which is determined by the level of nesting within ancestor `HeadingGroup`s. No matter what value you provide here, the semantic level (e.g., how the heading contributes to the document outline) is determined exclusively by the “automatic” heading level. |
18
+ | accessibilityRole? | <code>"presentation"</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>"presentation"</code>: Used to strip the semantic meaning of an element, but leave the visual styling intact. |
19
+ | inlineAlignment? | <code>"start" &#124; "center" &#124; "end"</code> | Align text along the main axis. |
@@ -0,0 +1,10 @@
1
+ ## Best practices
2
+
3
+ - Add a heading at the top of each section that clearly describe what’s below.
4
+ - Use the heading to highlight the most important concepts or pieces of information that customers need to know.
5
+
6
+ ## Related components
7
+
8
+ - [`HeadingGroup`](https://github.com/Shopify/ui-extensions/tree/main/packages/checkout-ui-extensions/src/components/HeadingGroup): Controls the H level of headings when nested within the group, like H1, H2, and H3.
9
+ - [`Text`](https://github.com/Shopify/ui-extensions/tree/main/packages/checkout-ui-extensions/src/components/Text): Styles and provides semantic value for a specific piece of text content.
10
+ - [`TextBlock`](https://github.com/Shopify/ui-extensions/tree/main/packages/checkout-ui-extensions/src/components/TextBlock): Renders a block of text that occupies the full width available, like a paragraph.
@@ -0,0 +1,7 @@
1
+ import {extend, Heading} from '@shopify/checkout-ui-extensions';
2
+
3
+ extend('Checkout::Dynamic::Render', (root) => {
4
+ const heading = root.createComponent(Heading, undefined, 'Store name');
5
+
6
+ root.appendChild(heading);
7
+ });
@@ -0,0 +1,15 @@
1
+ import {createRemoteComponent} from '@remote-ui/core';
2
+
3
+ export interface HeadingGroupProps {}
4
+
5
+ /**
6
+ * Heading group controls the heading level of headings nested within it, like H1, H2, H3.
7
+ *
8
+ * Use a heading group whenever you use a heading to ensure the experience is the same
9
+ * for screen reader users. When using a heading, any children related to that
10
+ * heading should be nested within the same heading group.
11
+ */
12
+ export const HeadingGroup = createRemoteComponent<
13
+ 'HeadingGroup',
14
+ HeadingGroupProps
15
+ >('HeadingGroup');
@@ -0,0 +1,7 @@
1
+ # HeadingGroup
2
+
3
+ Heading group controls the heading level of headings nested within it, like H1, H2, H3.
4
+
5
+ Use a heading group whenever you use a heading to ensure the experience is the same
6
+ for screen reader users. When using a heading, any children related to that
7
+ heading should be nested within the same heading group.
@@ -0,0 +1,9 @@
1
+ ## Best practices
2
+
3
+ - Use this component to create a content hierarchy within the document outline.
4
+
5
+ ## Related components
6
+
7
+ - [`Heading`](https://github.com/Shopify/ui-extensions/tree/main/packages/checkout-ui-extensions/src/components/Heading): Controls the visual style of headings. Use headings to introduce major sections, like Contact information, Shipping address, or Shipping method.
8
+ - [`Text`](https://github.com/Shopify/ui-extensions/tree/main/packages/checkout-ui-extensions/src/components/Text): Used to visually style and provide semantic value for a specific piece of text content.
9
+ - [`TextBlock`](https://github.com/Shopify/ui-extensions/tree/main/packages/checkout-ui-extensions/src/components/TextBlock): Used to render a block of text that occupies the full width available, like a paragraph.
@@ -0,0 +1,20 @@
1
+ import {
2
+ extend,
3
+ HeadingGroup,
4
+ Heading,
5
+ View,
6
+ } from '@shopify/checkout-ui-extensions';
7
+
8
+ extend('Checkout::Dynamic::Render', (root) => {
9
+ const headingGroup = root.createComponent(View, undefined, [
10
+ root.createComponent(Heading, undefined, 'Heading <h1>'),
11
+ root.createComponent(HeadingGroup, undefined, [
12
+ root.createComponent(Heading, undefined, 'Heading <h2>'),
13
+ root.createComponent(HeadingGroup, undefined, [
14
+ root.createComponent(Heading, undefined, 'Heading <h3>'),
15
+ ]),
16
+ ]),
17
+ ]);
18
+
19
+ root.appendChild(headingGroup);
20
+ });
@@ -0,0 +1,91 @@
1
+ import {createRemoteComponent} from '@remote-ui/core';
2
+
3
+ import type {Appearance, Size} from '../shared';
4
+
5
+ export type IconSource =
6
+ | 'arrowLeft'
7
+ | 'arrowRight'
8
+ | 'arrowUp'
9
+ | 'arrowUpRight'
10
+ | 'arrowDown'
11
+ | 'bag'
12
+ | 'calendar'
13
+ | 'camera'
14
+ | 'caretDown'
15
+ | 'cart'
16
+ | 'checkmark'
17
+ | 'chevronDown'
18
+ | 'chevronUp'
19
+ | 'chevronRight'
20
+ | 'chevronLeft'
21
+ | 'close'
22
+ | 'critical'
23
+ | 'discount'
24
+ | 'delivered'
25
+ | 'delivery'
26
+ | 'disabled'
27
+ | 'email'
28
+ | 'errorFill'
29
+ | 'geolocation'
30
+ | 'grid'
31
+ | 'hamburger'
32
+ | 'horizontalDots'
33
+ | 'info'
34
+ | 'infoFill'
35
+ | 'list'
36
+ | 'lock'
37
+ | 'magnify'
38
+ | 'map'
39
+ | 'marker'
40
+ | 'minus'
41
+ | 'mobile'
42
+ | 'note'
43
+ | 'pen'
44
+ | 'verticalDots'
45
+ | 'plus'
46
+ | 'questionFill'
47
+ | 'reorder'
48
+ | 'store'
49
+ | 'success'
50
+ | 'truck'
51
+ | 'warning'
52
+ | 'warningFill'
53
+ | 'giftFill'
54
+ | 'external'
55
+ | 'profile';
56
+
57
+ export interface IconProps {
58
+ /**
59
+ * A label that describes the purpose or contents of the icon. When set,
60
+ * it will be announced to buyers using assistive technologies and will
61
+ * provide them with more context.
62
+ */
63
+ accessibilityLabel?: string;
64
+
65
+ /**
66
+ * Sets the appearance (color) of the icon.
67
+ *
68
+ * By default the icon will inherit the color of its parent.
69
+ *
70
+ * @defaultValue 'monochrome'
71
+ */
72
+ appearance?: Appearance;
73
+
74
+ /**
75
+ * Adjusts the size of the icon.
76
+ *
77
+ * @defaultValue 'base'
78
+ */
79
+ size?: Extract<Size, 'extraSmall' | 'small' | 'base' | 'large' | 'fill'>;
80
+
81
+ /**
82
+ * Specifies which icon to display
83
+ */
84
+ source: IconSource;
85
+ }
86
+
87
+ /**
88
+ * Icons are pictograms or graphic symbols.
89
+ * They can act as wayfinding tools or as a means of communicating functionality.
90
+ */
91
+ export const Icon = createRemoteComponent<'Icon', IconProps>('Icon');