@heymantle/litho 0.0.3 → 0.0.4

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 (353) hide show
  1. package/dist/cjs/components/ActionList.js +50 -16
  2. package/dist/cjs/components/AnnouncementBar.js +10 -3
  3. package/dist/cjs/components/AppProvider.js +10 -1
  4. package/dist/cjs/components/Autocomplete.js +33 -11
  5. package/dist/cjs/components/Badge.js +2 -1
  6. package/dist/cjs/components/Banner.js +35 -31
  7. package/dist/cjs/components/Box.js +5 -3
  8. package/dist/cjs/components/Button.js +34 -12
  9. package/dist/cjs/components/Card.js +5 -45
  10. package/dist/cjs/components/Checkbox.js +16 -6
  11. package/dist/cjs/components/ChoiceList.js +7 -4
  12. package/dist/cjs/components/ColorField.js +8 -3
  13. package/dist/cjs/components/DatePicker.js +13 -8
  14. package/dist/cjs/components/DropZone.js +33 -18
  15. package/dist/cjs/components/EmptyState.js +15 -7
  16. package/dist/cjs/components/Filters.js +32 -20
  17. package/dist/cjs/components/FooterHelp.js +7 -2
  18. package/dist/cjs/components/Form.js +18 -3
  19. package/dist/cjs/components/Frame.js +40 -15
  20. package/dist/cjs/components/FrameSaveBar.js +21 -12
  21. package/dist/cjs/components/Layout.js +3 -3
  22. package/dist/cjs/components/LayoutSection.js +2 -2
  23. package/dist/cjs/components/Link.js +6 -2
  24. package/dist/cjs/components/List.js +1 -0
  25. package/dist/cjs/components/Listbox.js +9 -4
  26. package/dist/cjs/components/Modal.js +26 -17
  27. package/dist/cjs/components/Navigation.js +30 -20
  28. package/dist/cjs/components/Page.js +8 -3
  29. package/dist/cjs/components/Pagination.js +11 -4
  30. package/dist/cjs/components/Pane.js +118 -35
  31. package/dist/cjs/components/Popover.js +59 -6
  32. package/dist/cjs/components/RangeSlider.js +11 -4
  33. package/dist/cjs/components/ResourceList.js +9 -3
  34. package/dist/cjs/components/Select.js +2 -0
  35. package/dist/cjs/components/Table.js +32 -19
  36. package/dist/cjs/components/Text.js +8 -5
  37. package/dist/cjs/components/TextField.js +23 -13
  38. package/dist/cjs/components/Thumbnail.js +7 -2
  39. package/dist/cjs/components/TimePicker.js +7 -2
  40. package/dist/cjs/components/Tip.js +10 -4
  41. package/dist/cjs/components/Tooltip.js +16 -8
  42. package/dist/cjs/components/TopBar.js +17 -9
  43. package/dist/cjs/dev/verify-publish.js +37 -4
  44. package/dist/cjs/postcss.config.js +21 -0
  45. package/dist/cjs/stories/ActionList.stories.js +365 -0
  46. package/dist/cjs/stories/AnnouncementBar.stories.js +244 -0
  47. package/dist/cjs/stories/Autocomplete.stories.js +871 -0
  48. package/dist/cjs/stories/Badge.stories.js +183 -0
  49. package/dist/cjs/stories/Banner.stories.js +201 -0
  50. package/dist/cjs/stories/Box.stories.js +599 -0
  51. package/dist/cjs/stories/Button.stories.js +325 -0
  52. package/dist/cjs/stories/ButtonGroup.stories.js +404 -0
  53. package/dist/cjs/stories/Card.stories.js +278 -0
  54. package/dist/cjs/stories/Checkbox.stories.js +266 -0
  55. package/dist/cjs/stories/ChoiceList.stories.js +884 -0
  56. package/dist/cjs/stories/Collapsible.stories.js +905 -0
  57. package/dist/cjs/stories/ColorField.stories.js +883 -0
  58. package/dist/cjs/stories/ContextualSaveBar.stories.js +970 -0
  59. package/dist/cjs/stories/DatePicker.stories.js +584 -0
  60. package/dist/cjs/stories/Divider.stories.js +759 -0
  61. package/dist/cjs/stories/DropZone.stories.js +1205 -0
  62. package/dist/cjs/stories/EmptyState.stories.js +296 -0
  63. package/dist/cjs/stories/Filters.stories.js +1353 -0
  64. package/dist/cjs/stories/FooterHelp.stories.js +869 -0
  65. package/dist/cjs/stories/Form.stories.js +940 -0
  66. package/dist/cjs/stories/Grid.stories.js +1199 -0
  67. package/dist/cjs/stories/HorizontalStack.stories.js +1064 -0
  68. package/dist/cjs/stories/Icon.stories.js +596 -0
  69. package/dist/cjs/stories/Image.stories.js +883 -0
  70. package/dist/cjs/stories/InlineError.stories.js +710 -0
  71. package/dist/cjs/stories/Label.stories.js +665 -0
  72. package/dist/cjs/stories/Layout.stories.js +685 -0
  73. package/dist/cjs/stories/LayoutSection.stories.js +1267 -0
  74. package/dist/cjs/stories/Link.stories.js +423 -0
  75. package/dist/cjs/stories/List.stories.js +1031 -0
  76. package/dist/cjs/stories/Listbox.stories.js +820 -0
  77. package/dist/cjs/stories/Loading.stories.js +900 -0
  78. package/dist/cjs/stories/Modal.stories.js +363 -0
  79. package/dist/cjs/stories/Navigation.stories.js +605 -0
  80. package/dist/cjs/stories/Page.stories.js +318 -0
  81. package/dist/cjs/stories/Pagination.stories.js +438 -0
  82. package/dist/cjs/stories/Pane.stories.js +1535 -0
  83. package/dist/cjs/stories/Popover.stories.js +637 -0
  84. package/dist/cjs/stories/PopoverManager.stories.js +1225 -0
  85. package/dist/cjs/stories/ProgressBar.stories.js +506 -0
  86. package/dist/cjs/stories/RadioButton.stories.js +642 -0
  87. package/dist/cjs/stories/RadioButtonCard.stories.js +816 -0
  88. package/dist/cjs/stories/RangeSlider.stories.js +892 -0
  89. package/dist/cjs/stories/ResourceList.stories.js +1067 -0
  90. package/dist/cjs/stories/Select.stories.js +413 -0
  91. package/dist/cjs/stories/SkeletonText.stories.js +776 -0
  92. package/dist/cjs/stories/Spinner.stories.js +396 -0
  93. package/dist/cjs/stories/Table.stories.js +628 -0
  94. package/dist/cjs/stories/Tabs.stories.js +723 -0
  95. package/dist/cjs/stories/Tag.stories.js +620 -0
  96. package/dist/cjs/stories/Text.stories.js +262 -0
  97. package/dist/cjs/stories/TextField.stories.js +377 -0
  98. package/dist/cjs/stories/Thumbnail.stories.js +859 -0
  99. package/dist/cjs/stories/TimePicker.stories.js +966 -0
  100. package/dist/cjs/stories/Tip.stories.js +753 -0
  101. package/dist/cjs/stories/Tooltip.stories.js +357 -0
  102. package/dist/cjs/stories/TopBar.stories.js +155 -0
  103. package/dist/cjs/stories/VerticalStack.stories.js +1287 -0
  104. package/dist/cjs/tailwind.config.js +17 -0
  105. package/dist/cjs/utilities/transformers.js +66 -0
  106. package/dist/cjs/vite.config.js +35 -0
  107. package/dist/esm/components/ActionList.js +41 -12
  108. package/dist/esm/components/AnnouncementBar.js +3 -1
  109. package/dist/esm/components/AppProvider.js +10 -1
  110. package/dist/esm/components/Autocomplete.js +21 -4
  111. package/dist/esm/components/Badge.js +2 -2
  112. package/dist/esm/components/Banner.js +20 -21
  113. package/dist/esm/components/Box.js +5 -4
  114. package/dist/esm/components/Button.js +24 -7
  115. package/dist/esm/components/Card.js +5 -4
  116. package/dist/esm/components/Checkbox.js +6 -1
  117. package/dist/esm/components/ChoiceList.js +7 -4
  118. package/dist/esm/components/ColorField.js +1 -1
  119. package/dist/esm/components/DatePicker.js +6 -1
  120. package/dist/esm/components/DropZone.js +14 -4
  121. package/dist/esm/components/EmptyState.js +4 -1
  122. package/dist/esm/components/Filters.js +10 -3
  123. package/dist/esm/components/FooterHelp.js +1 -1
  124. package/dist/esm/components/Form.js +18 -3
  125. package/dist/esm/components/Frame.js +18 -6
  126. package/dist/esm/components/FrameSaveBar.js +10 -6
  127. package/dist/esm/components/InlineError.js +1 -1
  128. package/dist/esm/components/Layout.js +4 -4
  129. package/dist/esm/components/LayoutSection.js +2 -2
  130. package/dist/esm/components/Link.js +6 -2
  131. package/dist/esm/components/List.js +1 -0
  132. package/dist/esm/components/Listbox.js +4 -4
  133. package/dist/esm/components/Modal.js +8 -4
  134. package/dist/esm/components/Navigation.js +16 -11
  135. package/dist/esm/components/Page.js +9 -4
  136. package/dist/esm/components/Pagination.js +3 -1
  137. package/dist/esm/components/Pane.js +114 -36
  138. package/dist/esm/components/Popover.js +18 -6
  139. package/dist/esm/components/RangeSlider.js +3 -1
  140. package/dist/esm/components/ResourceList.js +2 -1
  141. package/dist/esm/components/Select.js +2 -0
  142. package/dist/esm/components/Table.js +16 -3
  143. package/dist/esm/components/Text.js +8 -6
  144. package/dist/esm/components/TextField.js +6 -1
  145. package/dist/esm/components/Thumbnail.js +1 -1
  146. package/dist/esm/components/TimePicker.js +1 -1
  147. package/dist/esm/components/Tip.js +3 -2
  148. package/dist/esm/components/Tooltip.js +4 -1
  149. package/dist/esm/components/TopBar.js +7 -4
  150. package/dist/esm/dev/verify-publish.js +37 -4
  151. package/dist/esm/postcss.config.js +6 -0
  152. package/dist/esm/stories/ActionList.stories.js +327 -0
  153. package/dist/esm/stories/AnnouncementBar.stories.js +212 -0
  154. package/dist/esm/stories/Autocomplete.stories.js +833 -0
  155. package/dist/esm/stories/Badge.stories.js +138 -0
  156. package/dist/esm/stories/Banner.stories.js +159 -0
  157. package/dist/esm/stories/Box.stories.js +558 -0
  158. package/dist/esm/stories/Button.stories.js +277 -0
  159. package/dist/esm/stories/ButtonGroup.stories.js +357 -0
  160. package/dist/esm/stories/Card.stories.js +240 -0
  161. package/dist/esm/stories/Checkbox.stories.js +219 -0
  162. package/dist/esm/stories/ChoiceList.stories.js +834 -0
  163. package/dist/esm/stories/Collapsible.stories.js +867 -0
  164. package/dist/esm/stories/ColorField.stories.js +842 -0
  165. package/dist/esm/stories/ContextualSaveBar.stories.js +938 -0
  166. package/dist/esm/stories/DatePicker.stories.js +537 -0
  167. package/dist/esm/stories/Divider.stories.js +715 -0
  168. package/dist/esm/stories/DropZone.stories.js +1161 -0
  169. package/dist/esm/stories/EmptyState.stories.js +246 -0
  170. package/dist/esm/stories/Filters.stories.js +1315 -0
  171. package/dist/esm/stories/FooterHelp.stories.js +813 -0
  172. package/dist/esm/stories/Form.stories.js +905 -0
  173. package/dist/esm/stories/Grid.stories.js +1152 -0
  174. package/dist/esm/stories/HorizontalStack.stories.js +1011 -0
  175. package/dist/esm/stories/Icon.stories.js +555 -0
  176. package/dist/esm/stories/Image.stories.js +836 -0
  177. package/dist/esm/stories/InlineError.stories.js +666 -0
  178. package/dist/esm/stories/Label.stories.js +612 -0
  179. package/dist/esm/stories/Layout.stories.js +647 -0
  180. package/dist/esm/stories/LayoutSection.stories.js +1226 -0
  181. package/dist/esm/stories/Link.stories.js +379 -0
  182. package/dist/esm/stories/List.stories.js +975 -0
  183. package/dist/esm/stories/Listbox.stories.js +776 -0
  184. package/dist/esm/stories/Loading.stories.js +850 -0
  185. package/dist/esm/stories/Modal.stories.js +322 -0
  186. package/dist/esm/stories/Navigation.stories.js +567 -0
  187. package/dist/esm/stories/Page.stories.js +276 -0
  188. package/dist/esm/stories/Pagination.stories.js +394 -0
  189. package/dist/esm/stories/Pane.stories.js +1497 -0
  190. package/dist/esm/stories/Popover.stories.js +605 -0
  191. package/dist/esm/stories/PopoverManager.stories.js +1193 -0
  192. package/dist/esm/stories/ProgressBar.stories.js +465 -0
  193. package/dist/esm/stories/RadioButton.stories.js +598 -0
  194. package/dist/esm/stories/RadioButtonCard.stories.js +772 -0
  195. package/dist/esm/stories/RangeSlider.stories.js +845 -0
  196. package/dist/esm/stories/ResourceList.stories.js +1029 -0
  197. package/dist/esm/stories/Select.stories.js +363 -0
  198. package/dist/esm/stories/SkeletonText.stories.js +717 -0
  199. package/dist/esm/stories/Spinner.stories.js +355 -0
  200. package/dist/esm/stories/Table.stories.js +584 -0
  201. package/dist/esm/stories/Tabs.stories.js +685 -0
  202. package/dist/esm/stories/Tag.stories.js +573 -0
  203. package/dist/esm/stories/Text.stories.js +217 -0
  204. package/dist/esm/stories/TextField.stories.js +332 -0
  205. package/dist/esm/stories/Thumbnail.stories.js +806 -0
  206. package/dist/esm/stories/TimePicker.stories.js +910 -0
  207. package/dist/esm/stories/Tip.stories.js +706 -0
  208. package/dist/esm/stories/Tooltip.stories.js +313 -0
  209. package/dist/esm/stories/TopBar.stories.js +114 -0
  210. package/dist/esm/stories/VerticalStack.stories.js +1240 -0
  211. package/dist/esm/tailwind.config.js +7 -0
  212. package/dist/esm/utilities/transformers.js +47 -0
  213. package/dist/esm/vite.config.js +20 -0
  214. package/dist/types/components/ActionList.d.ts +122 -0
  215. package/dist/types/components/ActionList.d.ts.map +1 -0
  216. package/dist/types/components/AnnouncementBar.d.ts +21 -0
  217. package/dist/types/components/AnnouncementBar.d.ts.map +1 -0
  218. package/dist/types/components/AppProvider.d.ts +61 -0
  219. package/dist/types/components/AppProvider.d.ts.map +1 -0
  220. package/dist/types/components/Autocomplete.d.ts +130 -0
  221. package/dist/types/components/Autocomplete.d.ts.map +1 -0
  222. package/dist/types/components/Badge.d.ts +21 -0
  223. package/dist/types/components/Badge.d.ts.map +1 -0
  224. package/dist/types/components/Banner.d.ts +78 -0
  225. package/dist/types/components/Banner.d.ts.map +1 -0
  226. package/dist/types/components/Box.d.ts +70 -0
  227. package/dist/types/components/Box.d.ts.map +1 -0
  228. package/dist/types/components/Button.d.ts +123 -0
  229. package/dist/types/components/Button.d.ts.map +1 -0
  230. package/dist/types/components/ButtonGroup.d.ts +26 -0
  231. package/dist/types/components/ButtonGroup.d.ts.map +1 -0
  232. package/dist/types/components/Card.d.ts +139 -0
  233. package/dist/types/components/Card.d.ts.map +1 -0
  234. package/dist/types/components/Checkbox.d.ts +56 -0
  235. package/dist/types/components/Checkbox.d.ts.map +1 -0
  236. package/dist/types/components/ChoiceList.d.ts +69 -0
  237. package/dist/types/components/ChoiceList.d.ts.map +1 -0
  238. package/dist/types/components/Collapsible.d.ts +17 -0
  239. package/dist/types/components/Collapsible.d.ts.map +1 -0
  240. package/dist/types/components/ColorField.d.ts +36 -0
  241. package/dist/types/components/ColorField.d.ts.map +1 -0
  242. package/dist/types/components/ContextualSaveBar.d.ts +22 -0
  243. package/dist/types/components/ContextualSaveBar.d.ts.map +1 -0
  244. package/dist/types/components/DatePicker.d.ts +66 -0
  245. package/dist/types/components/DatePicker.d.ts.map +1 -0
  246. package/dist/types/components/Divider.d.ts +21 -0
  247. package/dist/types/components/Divider.d.ts.map +1 -0
  248. package/dist/types/components/DropZone.d.ts +108 -0
  249. package/dist/types/components/DropZone.d.ts.map +1 -0
  250. package/dist/types/components/EmptyState.d.ts +52 -0
  251. package/dist/types/components/EmptyState.d.ts.map +1 -0
  252. package/dist/types/components/Filters.d.ts +166 -0
  253. package/dist/types/components/Filters.d.ts.map +1 -0
  254. package/dist/types/components/FooterHelp.d.ts +21 -0
  255. package/dist/types/components/FooterHelp.d.ts.map +1 -0
  256. package/dist/types/components/Form.d.ts +39 -0
  257. package/dist/types/components/Form.d.ts.map +1 -0
  258. package/dist/types/components/Frame.d.ts +51 -0
  259. package/dist/types/components/Frame.d.ts.map +1 -0
  260. package/dist/types/components/FrameSaveBar.d.ts +8 -0
  261. package/dist/types/components/FrameSaveBar.d.ts.map +1 -0
  262. package/dist/types/components/Grid.d.ts +39 -0
  263. package/dist/types/components/Grid.d.ts.map +1 -0
  264. package/dist/types/components/HorizontalStack.d.ts +36 -0
  265. package/dist/types/components/HorizontalStack.d.ts.map +1 -0
  266. package/dist/types/components/Icon.d.ts +43 -0
  267. package/dist/types/components/Icon.d.ts.map +1 -0
  268. package/dist/types/components/Image.d.ts +45 -0
  269. package/dist/types/components/Image.d.ts.map +1 -0
  270. package/dist/types/components/InlineError.d.ts +22 -0
  271. package/dist/types/components/InlineError.d.ts.map +1 -0
  272. package/dist/types/components/Label.d.ts +28 -0
  273. package/dist/types/components/Label.d.ts.map +1 -0
  274. package/dist/types/components/Layout.d.ts +44 -0
  275. package/dist/types/components/Layout.d.ts.map +1 -0
  276. package/dist/types/components/LayoutSection.d.ts +24 -0
  277. package/dist/types/components/LayoutSection.d.ts.map +1 -0
  278. package/dist/types/components/Link.d.ts +38 -0
  279. package/dist/types/components/Link.d.ts.map +1 -0
  280. package/dist/types/components/List.d.ts +33 -0
  281. package/dist/types/components/List.d.ts.map +1 -0
  282. package/dist/types/components/Listbox.d.ts +34 -0
  283. package/dist/types/components/Listbox.d.ts.map +1 -0
  284. package/dist/types/components/Loading.d.ts +13 -0
  285. package/dist/types/components/Loading.d.ts.map +1 -0
  286. package/dist/types/components/Modal.d.ts +75 -0
  287. package/dist/types/components/Modal.d.ts.map +1 -0
  288. package/dist/types/components/Navigation.d.ts +105 -0
  289. package/dist/types/components/Navigation.d.ts.map +1 -0
  290. package/dist/types/components/Page.d.ts +59 -0
  291. package/dist/types/components/Page.d.ts.map +1 -0
  292. package/dist/types/components/Pagination.d.ts +39 -0
  293. package/dist/types/components/Pagination.d.ts.map +1 -0
  294. package/dist/types/components/Pane.d.ts +11 -0
  295. package/dist/types/components/Pane.d.ts.map +1 -0
  296. package/dist/types/components/Popover.d.ts +56 -0
  297. package/dist/types/components/Popover.d.ts.map +1 -0
  298. package/dist/types/components/PopoverManager.d.ts +3 -0
  299. package/dist/types/components/PopoverManager.d.ts.map +1 -0
  300. package/dist/types/components/ProgressBar.d.ts +24 -0
  301. package/dist/types/components/ProgressBar.d.ts.map +1 -0
  302. package/dist/types/components/RadioButton.d.ts +39 -0
  303. package/dist/types/components/RadioButton.d.ts.map +1 -0
  304. package/dist/types/components/RadioButtonCard.d.ts +41 -0
  305. package/dist/types/components/RadioButtonCard.d.ts.map +1 -0
  306. package/dist/types/components/RangeSlider.d.ts +44 -0
  307. package/dist/types/components/RangeSlider.d.ts.map +1 -0
  308. package/dist/types/components/ResourceList.d.ts +54 -0
  309. package/dist/types/components/ResourceList.d.ts.map +1 -0
  310. package/dist/types/components/Select.d.ts +48 -0
  311. package/dist/types/components/Select.d.ts.map +1 -0
  312. package/dist/types/components/SkeletonText.d.ts +28 -0
  313. package/dist/types/components/SkeletonText.d.ts.map +1 -0
  314. package/dist/types/components/Spinner.d.ts +18 -0
  315. package/dist/types/components/Spinner.d.ts.map +1 -0
  316. package/dist/types/components/Table.d.ts +197 -0
  317. package/dist/types/components/Table.d.ts.map +1 -0
  318. package/dist/types/components/Tabs.d.ts +41 -0
  319. package/dist/types/components/Tabs.d.ts.map +1 -0
  320. package/dist/types/components/Tag.d.ts +26 -0
  321. package/dist/types/components/Tag.d.ts.map +1 -0
  322. package/dist/types/components/Text.d.ts +32 -0
  323. package/dist/types/components/Text.d.ts.map +1 -0
  324. package/dist/types/components/TextField.d.ts +109 -0
  325. package/dist/types/components/TextField.d.ts.map +1 -0
  326. package/dist/types/components/Thumbnail.d.ts +18 -0
  327. package/dist/types/components/Thumbnail.d.ts.map +1 -0
  328. package/dist/types/components/TimePicker.d.ts +3 -0
  329. package/dist/types/components/TimePicker.d.ts.map +1 -0
  330. package/dist/types/components/Tip.d.ts +23 -0
  331. package/dist/types/components/Tip.d.ts.map +1 -0
  332. package/dist/types/components/Tooltip.d.ts +84 -0
  333. package/dist/types/components/Tooltip.d.ts.map +1 -0
  334. package/dist/types/components/TopBar.d.ts +43 -0
  335. package/dist/types/components/TopBar.d.ts.map +1 -0
  336. package/dist/types/components/VerticalStack.d.ts +27 -0
  337. package/dist/types/components/VerticalStack.d.ts.map +1 -0
  338. package/dist/types/index.d.ts +62 -0
  339. package/dist/types/index.d.ts.map +1 -0
  340. package/dist/types/styles/Table.d.ts +1570 -0
  341. package/dist/types/styles/Table.d.ts.map +1 -0
  342. package/dist/types/utilities/dates.d.ts +46 -0
  343. package/dist/types/utilities/dates.d.ts.map +1 -0
  344. package/dist/types/utilities/transformers.d.ts +4 -0
  345. package/dist/types/utilities/transformers.d.ts.map +1 -0
  346. package/dist/types/utilities/useIndexResourceState.d.ts +21 -0
  347. package/dist/types/utilities/useIndexResourceState.d.ts.map +1 -0
  348. package/dist/types/utilities/useMounted.d.ts +2 -0
  349. package/dist/types/utilities/useMounted.d.ts.map +1 -0
  350. package/dist/types/utilities/useTableScrollState.d.ts +29 -0
  351. package/dist/types/utilities/useTableScrollState.d.ts.map +1 -0
  352. package/index.css +6 -0
  353. package/package.json +37 -6
@@ -0,0 +1,1497 @@
1
+ function _array_like_to_array(arr, len) {
2
+ if (len == null || len > arr.length) len = arr.length;
3
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4
+ return arr2;
5
+ }
6
+ function _array_with_holes(arr) {
7
+ if (Array.isArray(arr)) return arr;
8
+ }
9
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
10
+ try {
11
+ var info = gen[key](arg);
12
+ var value = info.value;
13
+ } catch (error) {
14
+ reject(error);
15
+ return;
16
+ }
17
+ if (info.done) {
18
+ resolve(value);
19
+ } else {
20
+ Promise.resolve(value).then(_next, _throw);
21
+ }
22
+ }
23
+ function _async_to_generator(fn) {
24
+ return function() {
25
+ var self = this, args = arguments;
26
+ return new Promise(function(resolve, reject) {
27
+ var gen = fn.apply(self, args);
28
+ function _next(value) {
29
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
30
+ }
31
+ function _throw(err) {
32
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
33
+ }
34
+ _next(undefined);
35
+ });
36
+ };
37
+ }
38
+ function _define_property(obj, key, value) {
39
+ if (key in obj) {
40
+ Object.defineProperty(obj, key, {
41
+ value: value,
42
+ enumerable: true,
43
+ configurable: true,
44
+ writable: true
45
+ });
46
+ } else {
47
+ obj[key] = value;
48
+ }
49
+ return obj;
50
+ }
51
+ function _iterable_to_array_limit(arr, i) {
52
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
53
+ if (_i == null) return;
54
+ var _arr = [];
55
+ var _n = true;
56
+ var _d = false;
57
+ var _s, _e;
58
+ try {
59
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
60
+ _arr.push(_s.value);
61
+ if (i && _arr.length === i) break;
62
+ }
63
+ } catch (err) {
64
+ _d = true;
65
+ _e = err;
66
+ } finally{
67
+ try {
68
+ if (!_n && _i["return"] != null) _i["return"]();
69
+ } finally{
70
+ if (_d) throw _e;
71
+ }
72
+ }
73
+ return _arr;
74
+ }
75
+ function _non_iterable_rest() {
76
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
77
+ }
78
+ function _object_spread(target) {
79
+ for(var i = 1; i < arguments.length; i++){
80
+ var source = arguments[i] != null ? arguments[i] : {};
81
+ var ownKeys = Object.keys(source);
82
+ if (typeof Object.getOwnPropertySymbols === "function") {
83
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
84
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
85
+ }));
86
+ }
87
+ ownKeys.forEach(function(key) {
88
+ _define_property(target, key, source[key]);
89
+ });
90
+ }
91
+ return target;
92
+ }
93
+ function ownKeys(object, enumerableOnly) {
94
+ var keys = Object.keys(object);
95
+ if (Object.getOwnPropertySymbols) {
96
+ var symbols = Object.getOwnPropertySymbols(object);
97
+ if (enumerableOnly) {
98
+ symbols = symbols.filter(function(sym) {
99
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
100
+ });
101
+ }
102
+ keys.push.apply(keys, symbols);
103
+ }
104
+ return keys;
105
+ }
106
+ function _object_spread_props(target, source) {
107
+ source = source != null ? source : {};
108
+ if (Object.getOwnPropertyDescriptors) {
109
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
110
+ } else {
111
+ ownKeys(Object(source)).forEach(function(key) {
112
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
113
+ });
114
+ }
115
+ return target;
116
+ }
117
+ function _sliced_to_array(arr, i) {
118
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
119
+ }
120
+ function _unsupported_iterable_to_array(o, minLen) {
121
+ if (!o) return;
122
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
123
+ var n = Object.prototype.toString.call(o).slice(8, -1);
124
+ if (n === "Object" && o.constructor) n = o.constructor.name;
125
+ if (n === "Map" || n === "Set") return Array.from(n);
126
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
127
+ }
128
+ function _ts_generator(thisArg, body) {
129
+ var f, y, t, _ = {
130
+ label: 0,
131
+ sent: function() {
132
+ if (t[0] & 1) throw t[1];
133
+ return t[1];
134
+ },
135
+ trys: [],
136
+ ops: []
137
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
138
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
139
+ return this;
140
+ }), g;
141
+ function verb(n) {
142
+ return function(v) {
143
+ return step([
144
+ n,
145
+ v
146
+ ]);
147
+ };
148
+ }
149
+ function step(op) {
150
+ if (f) throw new TypeError("Generator is already executing.");
151
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
152
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
153
+ if (y = 0, t) op = [
154
+ op[0] & 2,
155
+ t.value
156
+ ];
157
+ switch(op[0]){
158
+ case 0:
159
+ case 1:
160
+ t = op;
161
+ break;
162
+ case 4:
163
+ _.label++;
164
+ return {
165
+ value: op[1],
166
+ done: false
167
+ };
168
+ case 5:
169
+ _.label++;
170
+ y = op[1];
171
+ op = [
172
+ 0
173
+ ];
174
+ continue;
175
+ case 7:
176
+ op = _.ops.pop();
177
+ _.trys.pop();
178
+ continue;
179
+ default:
180
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
181
+ _ = 0;
182
+ continue;
183
+ }
184
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
185
+ _.label = op[1];
186
+ break;
187
+ }
188
+ if (op[0] === 6 && _.label < t[1]) {
189
+ _.label = t[1];
190
+ t = op;
191
+ break;
192
+ }
193
+ if (t && _.label < t[2]) {
194
+ _.label = t[2];
195
+ _.ops.push(op);
196
+ break;
197
+ }
198
+ if (t[2]) _.ops.pop();
199
+ _.trys.pop();
200
+ continue;
201
+ }
202
+ op = body.call(thisArg, _);
203
+ } catch (e) {
204
+ op = [
205
+ 6,
206
+ e
207
+ ];
208
+ y = 0;
209
+ } finally{
210
+ f = t = 0;
211
+ }
212
+ if (op[0] & 5) throw op[1];
213
+ return {
214
+ value: op[0] ? op[1] : void 0,
215
+ done: true
216
+ };
217
+ }
218
+ }
219
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
220
+ import { useState } from "react";
221
+ import { transformStorySource } from "../utilities/transformers.js";
222
+ import Pane from "../components/Pane.js";
223
+ import Text from "../components/Text.js";
224
+ import Card from "../components/Card.js";
225
+ import Button from "../components/Button.js";
226
+ import TextField from "../components/TextField.js";
227
+ import Page from "../components/Page.js";
228
+ import { HorizontalStack, VerticalStack, Box } from "../dist/esm/index.js";
229
+ import { EditMajor, DeleteMajor, ShareIosMinor, DuplicateMinor } from "@shopify/polaris-icons";
230
+ export default {
231
+ title: 'Litho/Pane',
232
+ component: Pane,
233
+ parameters: {
234
+ layout: 'fullscreen',
235
+ docs: {
236
+ description: {
237
+ component: "A Pane component that provides a slide-out panel interface, typically used on the right side of the screen. It includes header, content, and footer sections with support for actions and close functionality."
238
+ },
239
+ source: {
240
+ transform: transformStorySource
241
+ }
242
+ }
243
+ },
244
+ tags: [
245
+ 'autodocs'
246
+ ],
247
+ argTypes: {
248
+ open: {
249
+ control: 'boolean',
250
+ description: 'Whether the pane is open'
251
+ },
252
+ onClose: {
253
+ control: false,
254
+ description: 'Callback when the pane is closed'
255
+ },
256
+ children: {
257
+ control: false,
258
+ description: 'Content to render inside the pane'
259
+ }
260
+ }
261
+ };
262
+ export var Default = {
263
+ render: function(args) {
264
+ var _useState = _sliced_to_array(useState(false), 2), paneOpen = _useState[0], setPaneOpen = _useState[1];
265
+ return /*#__PURE__*/ _jsxs(Page, {
266
+ title: "Pane Demo",
267
+ children: [
268
+ /*#__PURE__*/ _jsxs(Card, {
269
+ title: "Basic Pane Example",
270
+ padded: true,
271
+ children: [
272
+ /*#__PURE__*/ _jsx(Box, {
273
+ paddingBlockEnd: "4",
274
+ children: /*#__PURE__*/ _jsx(Text, {
275
+ children: "Click the button below to open a basic pane with header, content, and footer sections."
276
+ })
277
+ }),
278
+ /*#__PURE__*/ _jsx(Button, {
279
+ primary: true,
280
+ onClick: function() {
281
+ return setPaneOpen(true);
282
+ },
283
+ children: "Open Pane"
284
+ })
285
+ ]
286
+ }),
287
+ /*#__PURE__*/ _jsxs(Pane, {
288
+ open: paneOpen,
289
+ onClose: function() {
290
+ return setPaneOpen(false);
291
+ },
292
+ children: [
293
+ /*#__PURE__*/ _jsx(Pane.Header, {
294
+ children: /*#__PURE__*/ _jsx(Text, {
295
+ variant: "headingMd",
296
+ children: "Basic Pane"
297
+ })
298
+ }),
299
+ /*#__PURE__*/ _jsx(Pane.Content, {
300
+ children: /*#__PURE__*/ _jsxs(Box, {
301
+ padding: "4",
302
+ children: [
303
+ /*#__PURE__*/ _jsx(Box, {
304
+ paddingBlockEnd: "4",
305
+ children: /*#__PURE__*/ _jsx(Text, {
306
+ children: "This is the content area of the pane. You can put any content here, including forms, lists, or other components."
307
+ })
308
+ }),
309
+ /*#__PURE__*/ _jsx(Text, {
310
+ children: "The pane can be closed by clicking the close button in the header, pressing the Escape key, or programmatically."
311
+ })
312
+ ]
313
+ })
314
+ }),
315
+ /*#__PURE__*/ _jsx(Pane.Footer, {
316
+ children: /*#__PURE__*/ _jsx(Box, {
317
+ padding: "4",
318
+ children: /*#__PURE__*/ _jsxs(HorizontalStack, {
319
+ gap: "4",
320
+ align: "end",
321
+ children: [
322
+ /*#__PURE__*/ _jsx(Button, {
323
+ onClick: function() {
324
+ return setPaneOpen(false);
325
+ },
326
+ children: "Cancel"
327
+ }),
328
+ /*#__PURE__*/ _jsx(Button, {
329
+ primary: true,
330
+ onClick: function() {
331
+ return setPaneOpen(false);
332
+ },
333
+ children: "Save"
334
+ })
335
+ ]
336
+ })
337
+ })
338
+ })
339
+ ]
340
+ })
341
+ ]
342
+ });
343
+ }
344
+ };
345
+ export var WithActions = {
346
+ render: function() {
347
+ var _useState = _sliced_to_array(useState(false), 2), paneOpen = _useState[0], setPaneOpen = _useState[1];
348
+ var headerActions = [
349
+ {
350
+ icon: EditMajor,
351
+ onAction: function() {
352
+ return alert('Edit action clicked');
353
+ },
354
+ tooltip: 'Edit item'
355
+ },
356
+ {
357
+ icon: ShareIosMinor,
358
+ onAction: function() {
359
+ return alert('Share action clicked');
360
+ },
361
+ tooltip: 'Share item'
362
+ },
363
+ {
364
+ icon: DeleteMajor,
365
+ onAction: function() {
366
+ return alert('Delete action clicked');
367
+ },
368
+ tooltip: 'Delete item',
369
+ destructive: true
370
+ }
371
+ ];
372
+ return /*#__PURE__*/ _jsxs(Page, {
373
+ title: "Pane with Actions",
374
+ children: [
375
+ /*#__PURE__*/ _jsxs(Card, {
376
+ title: "Pane with Header Actions",
377
+ padded: true,
378
+ children: [
379
+ /*#__PURE__*/ _jsx(Box, {
380
+ paddingBlockEnd: "4",
381
+ children: /*#__PURE__*/ _jsx(Text, {
382
+ children: "This example shows a pane with action buttons in the header alongside the close button."
383
+ })
384
+ }),
385
+ /*#__PURE__*/ _jsx(Button, {
386
+ primary: true,
387
+ onClick: function() {
388
+ return setPaneOpen(true);
389
+ },
390
+ children: "Open Pane with Actions"
391
+ })
392
+ ]
393
+ }),
394
+ /*#__PURE__*/ _jsxs(Pane, {
395
+ open: paneOpen,
396
+ onClose: function() {
397
+ return setPaneOpen(false);
398
+ },
399
+ children: [
400
+ /*#__PURE__*/ _jsx(Pane.Header, {
401
+ actions: headerActions,
402
+ children: /*#__PURE__*/ _jsx(Text, {
403
+ variant: "headingMd",
404
+ children: "Product Details"
405
+ })
406
+ }),
407
+ /*#__PURE__*/ _jsx(Pane.Content, {
408
+ children: /*#__PURE__*/ _jsx(Box, {
409
+ padding: "4",
410
+ children: /*#__PURE__*/ _jsxs(VerticalStack, {
411
+ gap: "4",
412
+ children: [
413
+ /*#__PURE__*/ _jsxs(Box, {
414
+ children: [
415
+ /*#__PURE__*/ _jsx(Box, {
416
+ paddingBlockEnd: "2",
417
+ children: /*#__PURE__*/ _jsx(Text, {
418
+ variant: "headingSm",
419
+ children: "Product Name"
420
+ })
421
+ }),
422
+ /*#__PURE__*/ _jsx(Text, {
423
+ children: "Awesome Product"
424
+ })
425
+ ]
426
+ }),
427
+ /*#__PURE__*/ _jsxs(Box, {
428
+ children: [
429
+ /*#__PURE__*/ _jsx(Box, {
430
+ paddingBlockEnd: "2",
431
+ children: /*#__PURE__*/ _jsx(Text, {
432
+ variant: "headingSm",
433
+ children: "Description"
434
+ })
435
+ }),
436
+ /*#__PURE__*/ _jsx(Text, {
437
+ children: "This is a detailed description of the awesome product. It has many great features and benefits that customers will love."
438
+ })
439
+ ]
440
+ }),
441
+ /*#__PURE__*/ _jsxs(Box, {
442
+ children: [
443
+ /*#__PURE__*/ _jsx(Box, {
444
+ paddingBlockEnd: "2",
445
+ children: /*#__PURE__*/ _jsx(Text, {
446
+ variant: "headingSm",
447
+ children: "Price"
448
+ })
449
+ }),
450
+ /*#__PURE__*/ _jsx(Text, {
451
+ variant: "headingLg",
452
+ children: "$99.99"
453
+ })
454
+ ]
455
+ }),
456
+ /*#__PURE__*/ _jsxs(Box, {
457
+ children: [
458
+ /*#__PURE__*/ _jsx(Box, {
459
+ paddingBlockEnd: "2",
460
+ children: /*#__PURE__*/ _jsx(Text, {
461
+ variant: "headingSm",
462
+ children: "Status"
463
+ })
464
+ }),
465
+ /*#__PURE__*/ _jsx(Box, {
466
+ as: "span",
467
+ padding: "1",
468
+ borderRadius: "1",
469
+ background: "bg-success-subdued",
470
+ children: /*#__PURE__*/ _jsx(Text, {
471
+ variant: "bodySm",
472
+ tone: "success",
473
+ children: "Active"
474
+ })
475
+ })
476
+ ]
477
+ })
478
+ ]
479
+ })
480
+ })
481
+ }),
482
+ /*#__PURE__*/ _jsx(Pane.Footer, {
483
+ children: /*#__PURE__*/ _jsx(Box, {
484
+ padding: "4",
485
+ children: /*#__PURE__*/ _jsxs(HorizontalStack, {
486
+ gap: "4",
487
+ align: "space-between",
488
+ children: [
489
+ /*#__PURE__*/ _jsx(Text, {
490
+ variant: "bodySm",
491
+ color: "subdued",
492
+ children: "Last updated: 2 hours ago"
493
+ }),
494
+ /*#__PURE__*/ _jsxs(HorizontalStack, {
495
+ gap: "4",
496
+ children: [
497
+ /*#__PURE__*/ _jsx(Button, {
498
+ onClick: function() {
499
+ return setPaneOpen(false);
500
+ },
501
+ children: "Close"
502
+ }),
503
+ /*#__PURE__*/ _jsx(Button, {
504
+ primary: true,
505
+ onClick: function() {
506
+ return alert('Changes saved!');
507
+ },
508
+ children: "Save Changes"
509
+ })
510
+ ]
511
+ })
512
+ ]
513
+ })
514
+ })
515
+ })
516
+ ]
517
+ })
518
+ ]
519
+ });
520
+ },
521
+ parameters: {
522
+ docs: {
523
+ description: {
524
+ story: 'Pane with action buttons in the header for common operations like edit, share, and delete.'
525
+ }
526
+ }
527
+ }
528
+ };
529
+ export var FormPane = {
530
+ render: function() {
531
+ var _useState = _sliced_to_array(useState(false), 2), paneOpen = _useState[0], setPaneOpen = _useState[1];
532
+ var _useState1 = _sliced_to_array(useState({
533
+ name: '',
534
+ email: '',
535
+ phone: '',
536
+ company: '',
537
+ notes: ''
538
+ }), 2), formData = _useState1[0], setFormData = _useState1[1];
539
+ var _useState2 = _sliced_to_array(useState(false), 2), loading = _useState2[0], setLoading = _useState2[1];
540
+ var handleSave = function() {
541
+ return _async_to_generator(function() {
542
+ return _ts_generator(this, function(_state) {
543
+ switch(_state.label){
544
+ case 0:
545
+ setLoading(true);
546
+ // Simulate API call
547
+ return [
548
+ 4,
549
+ new Promise(function(resolve) {
550
+ return setTimeout(resolve, 2000);
551
+ })
552
+ ];
553
+ case 1:
554
+ _state.sent();
555
+ setLoading(false);
556
+ setPaneOpen(false);
557
+ alert('Contact saved successfully!');
558
+ return [
559
+ 2
560
+ ];
561
+ }
562
+ });
563
+ })();
564
+ };
565
+ var handleFieldChange = function(field, value) {
566
+ setFormData(function(prev) {
567
+ return _object_spread_props(_object_spread({}, prev), _define_property({}, field, value));
568
+ });
569
+ };
570
+ return /*#__PURE__*/ _jsxs(Page, {
571
+ title: "Form in Pane",
572
+ children: [
573
+ /*#__PURE__*/ _jsxs(Card, {
574
+ title: "Contact Form Example",
575
+ padded: true,
576
+ children: [
577
+ /*#__PURE__*/ _jsx(Box, {
578
+ paddingBlockEnd: "4",
579
+ children: /*#__PURE__*/ _jsx(Text, {
580
+ children: "This example shows how to use a pane for forms, providing a focused editing experience."
581
+ })
582
+ }),
583
+ /*#__PURE__*/ _jsx(Button, {
584
+ primary: true,
585
+ onClick: function() {
586
+ return setPaneOpen(true);
587
+ },
588
+ children: "Add New Contact"
589
+ })
590
+ ]
591
+ }),
592
+ /*#__PURE__*/ _jsxs(Pane, {
593
+ open: paneOpen,
594
+ onClose: function() {
595
+ return setPaneOpen(false);
596
+ },
597
+ children: [
598
+ /*#__PURE__*/ _jsx(Pane.Header, {
599
+ children: /*#__PURE__*/ _jsx(Text, {
600
+ variant: "headingMd",
601
+ children: "Add New Contact"
602
+ })
603
+ }),
604
+ /*#__PURE__*/ _jsx(Pane.Content, {
605
+ children: /*#__PURE__*/ _jsx(Box, {
606
+ padding: "4",
607
+ children: /*#__PURE__*/ _jsxs(VerticalStack, {
608
+ gap: "6",
609
+ children: [
610
+ /*#__PURE__*/ _jsx(TextField, {
611
+ label: "Full Name",
612
+ value: formData.name,
613
+ onChange: function(value) {
614
+ return handleFieldChange('name', value);
615
+ },
616
+ placeholder: "Enter full name"
617
+ }),
618
+ /*#__PURE__*/ _jsx(TextField, {
619
+ label: "Email Address",
620
+ type: "email",
621
+ value: formData.email,
622
+ onChange: function(value) {
623
+ return handleFieldChange('email', value);
624
+ },
625
+ placeholder: "Enter email address"
626
+ }),
627
+ /*#__PURE__*/ _jsx(TextField, {
628
+ label: "Phone Number",
629
+ type: "tel",
630
+ value: formData.phone,
631
+ onChange: function(value) {
632
+ return handleFieldChange('phone', value);
633
+ },
634
+ placeholder: "Enter phone number"
635
+ }),
636
+ /*#__PURE__*/ _jsx(TextField, {
637
+ label: "Company",
638
+ value: formData.company,
639
+ onChange: function(value) {
640
+ return handleFieldChange('company', value);
641
+ },
642
+ placeholder: "Enter company name"
643
+ }),
644
+ /*#__PURE__*/ _jsx(TextField, {
645
+ label: "Notes",
646
+ value: formData.notes,
647
+ onChange: function(value) {
648
+ return handleFieldChange('notes', value);
649
+ },
650
+ multiline: 4,
651
+ placeholder: "Add any additional notes..."
652
+ })
653
+ ]
654
+ })
655
+ })
656
+ }),
657
+ /*#__PURE__*/ _jsx(Pane.Footer, {
658
+ children: /*#__PURE__*/ _jsx(Box, {
659
+ padding: "4",
660
+ children: /*#__PURE__*/ _jsxs(HorizontalStack, {
661
+ gap: "4",
662
+ align: "end",
663
+ children: [
664
+ /*#__PURE__*/ _jsx(Button, {
665
+ onClick: function() {
666
+ return setPaneOpen(false);
667
+ },
668
+ disabled: loading,
669
+ children: "Cancel"
670
+ }),
671
+ /*#__PURE__*/ _jsx(Button, {
672
+ primary: true,
673
+ onClick: handleSave,
674
+ loading: loading,
675
+ disabled: !formData.name || !formData.email,
676
+ children: loading ? 'Saving...' : 'Save Contact'
677
+ })
678
+ ]
679
+ })
680
+ })
681
+ })
682
+ ]
683
+ })
684
+ ]
685
+ });
686
+ },
687
+ parameters: {
688
+ docs: {
689
+ description: {
690
+ story: 'Pane containing a form for creating or editing data with validation and loading states.'
691
+ }
692
+ }
693
+ }
694
+ };
695
+ export var DetailViewPane = {
696
+ render: function() {
697
+ var _useState = _sliced_to_array(useState(false), 2), paneOpen = _useState[0], setPaneOpen = _useState[1];
698
+ var _useState1 = _sliced_to_array(useState(null), 2), selectedOrder = _useState1[0], setSelectedOrder = _useState1[1];
699
+ var orders = [
700
+ {
701
+ id: 'ORD-001',
702
+ customer: 'John Smith',
703
+ date: '2024-01-15',
704
+ total: '$234.50',
705
+ status: 'Shipped',
706
+ items: [
707
+ {
708
+ name: 'Wireless Headphones',
709
+ quantity: 1,
710
+ price: '$159.99'
711
+ },
712
+ {
713
+ name: 'Phone Case',
714
+ quantity: 2,
715
+ price: '$24.99'
716
+ },
717
+ {
718
+ name: 'Screen Protector',
719
+ quantity: 1,
720
+ price: '$12.99'
721
+ }
722
+ ],
723
+ shipping: {
724
+ address: '123 Main St, Anytown, ST 12345',
725
+ method: 'Standard Shipping',
726
+ tracking: 'TRK123456789'
727
+ }
728
+ },
729
+ {
730
+ id: 'ORD-002',
731
+ customer: 'Sarah Johnson',
732
+ date: '2024-01-16',
733
+ total: '$89.99',
734
+ status: 'Processing',
735
+ items: [
736
+ {
737
+ name: 'Bluetooth Speaker',
738
+ quantity: 1,
739
+ price: '$89.99'
740
+ }
741
+ ],
742
+ shipping: {
743
+ address: '456 Oak Ave, Another City, ST 67890',
744
+ method: 'Express Shipping',
745
+ tracking: null
746
+ }
747
+ }
748
+ ];
749
+ var handleViewOrder = function(order) {
750
+ setSelectedOrder(order);
751
+ setPaneOpen(true);
752
+ };
753
+ var headerActions = selectedOrder ? [
754
+ {
755
+ icon: EditMajor,
756
+ onAction: function() {
757
+ return alert('Edit order functionality');
758
+ },
759
+ tooltip: 'Edit order'
760
+ },
761
+ {
762
+ icon: DuplicateMinor,
763
+ onAction: function() {
764
+ return alert('Duplicate order functionality');
765
+ },
766
+ tooltip: 'Duplicate order'
767
+ }
768
+ ] : [];
769
+ return /*#__PURE__*/ _jsxs(Page, {
770
+ title: "Order Management",
771
+ children: [
772
+ /*#__PURE__*/ _jsx(Card, {
773
+ title: "Orders List",
774
+ padded: true,
775
+ children: /*#__PURE__*/ _jsx(VerticalStack, {
776
+ gap: "2",
777
+ children: orders.map(function(order) {
778
+ return /*#__PURE__*/ _jsx(Box, {
779
+ padding: "4",
780
+ borderWidth: "1",
781
+ borderColor: "border",
782
+ borderRadius: "1",
783
+ children: /*#__PURE__*/ _jsxs(HorizontalStack, {
784
+ align: "space-between",
785
+ blockAlign: "center",
786
+ children: [
787
+ /*#__PURE__*/ _jsxs(VerticalStack, {
788
+ gap: "1",
789
+ children: [
790
+ /*#__PURE__*/ _jsx(Text, {
791
+ variant: "headingSm",
792
+ children: order.id
793
+ }),
794
+ /*#__PURE__*/ _jsxs(Text, {
795
+ variant: "bodySm",
796
+ color: "subdued",
797
+ children: [
798
+ order.customer,
799
+ " • ",
800
+ order.date,
801
+ " • ",
802
+ order.total
803
+ ]
804
+ })
805
+ ]
806
+ }),
807
+ /*#__PURE__*/ _jsxs(HorizontalStack, {
808
+ gap: "4",
809
+ blockAlign: "center",
810
+ children: [
811
+ /*#__PURE__*/ _jsx(Box, {
812
+ as: "span",
813
+ paddingInlineStart: "2",
814
+ paddingInlineEnd: "2",
815
+ paddingBlockStart: "1",
816
+ paddingBlockEnd: "1",
817
+ borderRadius: "1",
818
+ background: order.status === 'Shipped' ? 'bg-success-subdued' : 'bg-warning-subdued',
819
+ children: /*#__PURE__*/ _jsx(Text, {
820
+ variant: "caption",
821
+ tone: order.status === 'Shipped' ? 'success' : 'warning',
822
+ children: order.status
823
+ })
824
+ }),
825
+ /*#__PURE__*/ _jsx(Button, {
826
+ size: "slim",
827
+ onClick: function() {
828
+ return handleViewOrder(order);
829
+ },
830
+ children: "View Details"
831
+ })
832
+ ]
833
+ })
834
+ ]
835
+ })
836
+ }, order.id);
837
+ })
838
+ })
839
+ }),
840
+ /*#__PURE__*/ _jsxs(Pane, {
841
+ open: paneOpen,
842
+ onClose: function() {
843
+ return setPaneOpen(false);
844
+ },
845
+ children: [
846
+ /*#__PURE__*/ _jsx(Pane.Header, {
847
+ actions: headerActions,
848
+ children: /*#__PURE__*/ _jsxs(Text, {
849
+ variant: "headingMd",
850
+ children: [
851
+ "Order ",
852
+ selectedOrder === null || selectedOrder === void 0 ? void 0 : selectedOrder.id
853
+ ]
854
+ })
855
+ }),
856
+ /*#__PURE__*/ _jsx(Pane.Content, {
857
+ children: selectedOrder && /*#__PURE__*/ _jsx(Box, {
858
+ padding: "4",
859
+ children: /*#__PURE__*/ _jsxs(VerticalStack, {
860
+ gap: "8",
861
+ children: [
862
+ /*#__PURE__*/ _jsxs(Box, {
863
+ children: [
864
+ /*#__PURE__*/ _jsx(Box, {
865
+ paddingBlockEnd: "4",
866
+ children: /*#__PURE__*/ _jsx(Text, {
867
+ variant: "headingSm",
868
+ children: "Order Information"
869
+ })
870
+ }),
871
+ /*#__PURE__*/ _jsxs(Box, {
872
+ as: "div",
873
+ display: "grid",
874
+ style: {
875
+ gridTemplateColumns: '1fr 1fr',
876
+ gap: '1rem'
877
+ },
878
+ children: [
879
+ /*#__PURE__*/ _jsxs(VerticalStack, {
880
+ gap: "1",
881
+ children: [
882
+ /*#__PURE__*/ _jsx(Text, {
883
+ variant: "bodySm",
884
+ color: "subdued",
885
+ children: "Customer"
886
+ }),
887
+ /*#__PURE__*/ _jsx(Text, {
888
+ children: selectedOrder.customer
889
+ })
890
+ ]
891
+ }),
892
+ /*#__PURE__*/ _jsxs(VerticalStack, {
893
+ gap: "1",
894
+ children: [
895
+ /*#__PURE__*/ _jsx(Text, {
896
+ variant: "bodySm",
897
+ color: "subdued",
898
+ children: "Date"
899
+ }),
900
+ /*#__PURE__*/ _jsx(Text, {
901
+ children: selectedOrder.date
902
+ })
903
+ ]
904
+ }),
905
+ /*#__PURE__*/ _jsxs(VerticalStack, {
906
+ gap: "1",
907
+ children: [
908
+ /*#__PURE__*/ _jsx(Text, {
909
+ variant: "bodySm",
910
+ color: "subdued",
911
+ children: "Total"
912
+ }),
913
+ /*#__PURE__*/ _jsx(Text, {
914
+ variant: "headingSm",
915
+ children: selectedOrder.total
916
+ })
917
+ ]
918
+ }),
919
+ /*#__PURE__*/ _jsxs(VerticalStack, {
920
+ gap: "1",
921
+ children: [
922
+ /*#__PURE__*/ _jsx(Text, {
923
+ variant: "bodySm",
924
+ color: "subdued",
925
+ children: "Status"
926
+ }),
927
+ /*#__PURE__*/ _jsx(Box, {
928
+ as: "span",
929
+ paddingInlineStart: "2",
930
+ paddingInlineEnd: "2",
931
+ paddingBlockStart: "1",
932
+ paddingBlockEnd: "1",
933
+ borderRadius: "1",
934
+ background: selectedOrder.status === 'Shipped' ? 'bg-success-subdued' : 'bg-warning-subdued',
935
+ children: /*#__PURE__*/ _jsx(Text, {
936
+ variant: "caption",
937
+ tone: selectedOrder.status === 'Shipped' ? 'success' : 'warning',
938
+ children: selectedOrder.status
939
+ })
940
+ })
941
+ ]
942
+ })
943
+ ]
944
+ })
945
+ ]
946
+ }),
947
+ /*#__PURE__*/ _jsxs(Box, {
948
+ children: [
949
+ /*#__PURE__*/ _jsx(Box, {
950
+ paddingBlockEnd: "4",
951
+ children: /*#__PURE__*/ _jsx(Text, {
952
+ variant: "headingSm",
953
+ children: "Items Ordered"
954
+ })
955
+ }),
956
+ /*#__PURE__*/ _jsx(VerticalStack, {
957
+ gap: "2",
958
+ children: selectedOrder.items.map(function(item, index) {
959
+ return /*#__PURE__*/ _jsx(Box, {
960
+ padding: "3",
961
+ borderWidth: "1",
962
+ borderColor: "border",
963
+ borderRadius: "1",
964
+ children: /*#__PURE__*/ _jsxs(HorizontalStack, {
965
+ align: "space-between",
966
+ children: [
967
+ /*#__PURE__*/ _jsxs(VerticalStack, {
968
+ gap: "1",
969
+ children: [
970
+ /*#__PURE__*/ _jsx(Text, {
971
+ children: item.name
972
+ }),
973
+ /*#__PURE__*/ _jsxs(Text, {
974
+ variant: "bodySm",
975
+ color: "subdued",
976
+ children: [
977
+ "Quantity: ",
978
+ item.quantity
979
+ ]
980
+ })
981
+ ]
982
+ }),
983
+ /*#__PURE__*/ _jsx(Text, {
984
+ variant: "headingSm",
985
+ children: item.price
986
+ })
987
+ ]
988
+ })
989
+ }, index);
990
+ })
991
+ })
992
+ ]
993
+ }),
994
+ /*#__PURE__*/ _jsxs(Box, {
995
+ children: [
996
+ /*#__PURE__*/ _jsx(Box, {
997
+ paddingBlockEnd: "4",
998
+ children: /*#__PURE__*/ _jsx(Text, {
999
+ variant: "headingSm",
1000
+ children: "Shipping Information"
1001
+ })
1002
+ }),
1003
+ /*#__PURE__*/ _jsxs(VerticalStack, {
1004
+ gap: "2",
1005
+ children: [
1006
+ /*#__PURE__*/ _jsxs(VerticalStack, {
1007
+ gap: "1",
1008
+ children: [
1009
+ /*#__PURE__*/ _jsx(Text, {
1010
+ variant: "bodySm",
1011
+ color: "subdued",
1012
+ children: "Address"
1013
+ }),
1014
+ /*#__PURE__*/ _jsx(Text, {
1015
+ children: selectedOrder.shipping.address
1016
+ })
1017
+ ]
1018
+ }),
1019
+ /*#__PURE__*/ _jsxs(VerticalStack, {
1020
+ gap: "1",
1021
+ children: [
1022
+ /*#__PURE__*/ _jsx(Text, {
1023
+ variant: "bodySm",
1024
+ color: "subdued",
1025
+ children: "Method"
1026
+ }),
1027
+ /*#__PURE__*/ _jsx(Text, {
1028
+ children: selectedOrder.shipping.method
1029
+ })
1030
+ ]
1031
+ }),
1032
+ selectedOrder.shipping.tracking && /*#__PURE__*/ _jsxs(VerticalStack, {
1033
+ gap: "1",
1034
+ children: [
1035
+ /*#__PURE__*/ _jsx(Text, {
1036
+ variant: "bodySm",
1037
+ color: "subdued",
1038
+ children: "Tracking Number"
1039
+ }),
1040
+ /*#__PURE__*/ _jsx(Text, {
1041
+ children: selectedOrder.shipping.tracking
1042
+ })
1043
+ ]
1044
+ })
1045
+ ]
1046
+ })
1047
+ ]
1048
+ })
1049
+ ]
1050
+ })
1051
+ })
1052
+ }),
1053
+ /*#__PURE__*/ _jsx(Pane.Footer, {
1054
+ children: /*#__PURE__*/ _jsx(Box, {
1055
+ padding: "4",
1056
+ children: /*#__PURE__*/ _jsxs(HorizontalStack, {
1057
+ gap: "4",
1058
+ align: "end",
1059
+ children: [
1060
+ /*#__PURE__*/ _jsx(Button, {
1061
+ onClick: function() {
1062
+ return setPaneOpen(false);
1063
+ },
1064
+ children: "Close"
1065
+ }),
1066
+ /*#__PURE__*/ _jsx(Button, {
1067
+ primary: true,
1068
+ onClick: function() {
1069
+ return alert('Print order functionality');
1070
+ },
1071
+ children: "Print Order"
1072
+ })
1073
+ ]
1074
+ })
1075
+ })
1076
+ })
1077
+ ]
1078
+ })
1079
+ ]
1080
+ });
1081
+ },
1082
+ parameters: {
1083
+ docs: {
1084
+ description: {
1085
+ story: 'Pane used for displaying detailed views of list items with comprehensive information.'
1086
+ }
1087
+ }
1088
+ }
1089
+ };
1090
+ export var StackedPanes = {
1091
+ render: function() {
1092
+ var _useState = _sliced_to_array(useState(false), 2), firstPaneOpen = _useState[0], setFirstPaneOpen = _useState[1];
1093
+ var _useState1 = _sliced_to_array(useState(false), 2), secondPaneOpen = _useState1[0], setSecondPaneOpen = _useState1[1];
1094
+ return /*#__PURE__*/ _jsxs(Page, {
1095
+ title: "Stacked Panes",
1096
+ children: [
1097
+ /*#__PURE__*/ _jsx(Card, {
1098
+ title: "Multiple Panes Example",
1099
+ padded: true,
1100
+ children: /*#__PURE__*/ _jsxs(VerticalStack, {
1101
+ gap: "4",
1102
+ children: [
1103
+ /*#__PURE__*/ _jsx(Text, {
1104
+ children: "This example demonstrates how panes can be stacked when multiple levels of detail are needed."
1105
+ }),
1106
+ /*#__PURE__*/ _jsx(Button, {
1107
+ primary: true,
1108
+ onClick: function() {
1109
+ return setFirstPaneOpen(true);
1110
+ },
1111
+ children: "Open First Pane"
1112
+ })
1113
+ ]
1114
+ })
1115
+ }),
1116
+ /*#__PURE__*/ _jsxs(Pane, {
1117
+ open: firstPaneOpen,
1118
+ onClose: function() {
1119
+ return setFirstPaneOpen(false);
1120
+ },
1121
+ children: [
1122
+ /*#__PURE__*/ _jsx(Pane.Header, {
1123
+ children: /*#__PURE__*/ _jsx(Text, {
1124
+ variant: "headingMd",
1125
+ children: "Categories"
1126
+ })
1127
+ }),
1128
+ /*#__PURE__*/ _jsx(Pane.Content, {
1129
+ children: /*#__PURE__*/ _jsx(Box, {
1130
+ padding: "4",
1131
+ children: /*#__PURE__*/ _jsxs(VerticalStack, {
1132
+ gap: "4",
1133
+ children: [
1134
+ /*#__PURE__*/ _jsx(Text, {
1135
+ children: "Select a category to view its details in a nested pane."
1136
+ }),
1137
+ /*#__PURE__*/ _jsx(VerticalStack, {
1138
+ gap: "2",
1139
+ children: [
1140
+ 'Electronics',
1141
+ 'Clothing',
1142
+ 'Books',
1143
+ 'Home & Garden'
1144
+ ].map(function(category) {
1145
+ return /*#__PURE__*/ _jsx(Box, {
1146
+ padding: "4",
1147
+ borderWidth: "1",
1148
+ borderColor: "border",
1149
+ borderRadius: "1",
1150
+ children: /*#__PURE__*/ _jsxs(HorizontalStack, {
1151
+ align: "space-between",
1152
+ blockAlign: "center",
1153
+ children: [
1154
+ /*#__PURE__*/ _jsx(Text, {
1155
+ children: category
1156
+ }),
1157
+ /*#__PURE__*/ _jsx(Button, {
1158
+ size: "slim",
1159
+ onClick: function() {
1160
+ return setSecondPaneOpen(true);
1161
+ },
1162
+ children: "View Details"
1163
+ })
1164
+ ]
1165
+ })
1166
+ }, category);
1167
+ })
1168
+ })
1169
+ ]
1170
+ })
1171
+ })
1172
+ }),
1173
+ /*#__PURE__*/ _jsx(Pane.Footer, {
1174
+ children: /*#__PURE__*/ _jsx(Box, {
1175
+ padding: "4",
1176
+ children: /*#__PURE__*/ _jsx(HorizontalStack, {
1177
+ gap: "4",
1178
+ align: "end",
1179
+ children: /*#__PURE__*/ _jsx(Button, {
1180
+ onClick: function() {
1181
+ return setFirstPaneOpen(false);
1182
+ },
1183
+ children: "Close"
1184
+ })
1185
+ })
1186
+ })
1187
+ })
1188
+ ]
1189
+ }),
1190
+ /*#__PURE__*/ _jsxs(Pane, {
1191
+ open: secondPaneOpen,
1192
+ onClose: function() {
1193
+ return setSecondPaneOpen(false);
1194
+ },
1195
+ children: [
1196
+ /*#__PURE__*/ _jsx(Pane.Header, {
1197
+ children: /*#__PURE__*/ _jsx(Text, {
1198
+ variant: "headingMd",
1199
+ children: "Category Details"
1200
+ })
1201
+ }),
1202
+ /*#__PURE__*/ _jsx(Pane.Content, {
1203
+ children: /*#__PURE__*/ _jsx(Box, {
1204
+ padding: "4",
1205
+ children: /*#__PURE__*/ _jsxs(VerticalStack, {
1206
+ gap: "4",
1207
+ children: [
1208
+ /*#__PURE__*/ _jsx(Text, {
1209
+ children: "This is a nested pane showing detailed information about the selected category."
1210
+ }),
1211
+ /*#__PURE__*/ _jsxs(VerticalStack, {
1212
+ gap: "4",
1213
+ children: [
1214
+ /*#__PURE__*/ _jsxs(VerticalStack, {
1215
+ gap: "2",
1216
+ children: [
1217
+ /*#__PURE__*/ _jsx(Text, {
1218
+ variant: "headingSm",
1219
+ children: "Category Name"
1220
+ }),
1221
+ /*#__PURE__*/ _jsx(Text, {
1222
+ children: "Electronics"
1223
+ })
1224
+ ]
1225
+ }),
1226
+ /*#__PURE__*/ _jsxs(VerticalStack, {
1227
+ gap: "2",
1228
+ children: [
1229
+ /*#__PURE__*/ _jsx(Text, {
1230
+ variant: "headingSm",
1231
+ children: "Description"
1232
+ }),
1233
+ /*#__PURE__*/ _jsx(Text, {
1234
+ children: "Consumer electronics including phones, computers, accessories, and gadgets."
1235
+ })
1236
+ ]
1237
+ }),
1238
+ /*#__PURE__*/ _jsxs(VerticalStack, {
1239
+ gap: "2",
1240
+ children: [
1241
+ /*#__PURE__*/ _jsx(Text, {
1242
+ variant: "headingSm",
1243
+ children: "Total Products"
1244
+ }),
1245
+ /*#__PURE__*/ _jsx(Text, {
1246
+ children: "1,234 products"
1247
+ })
1248
+ ]
1249
+ }),
1250
+ /*#__PURE__*/ _jsxs(VerticalStack, {
1251
+ gap: "2",
1252
+ children: [
1253
+ /*#__PURE__*/ _jsx(Text, {
1254
+ variant: "headingSm",
1255
+ children: "Popular Items"
1256
+ }),
1257
+ /*#__PURE__*/ _jsxs(VerticalStack, {
1258
+ gap: "1",
1259
+ children: [
1260
+ /*#__PURE__*/ _jsx(Text, {
1261
+ children: "• Smartphones"
1262
+ }),
1263
+ /*#__PURE__*/ _jsx(Text, {
1264
+ children: "• Laptops"
1265
+ }),
1266
+ /*#__PURE__*/ _jsx(Text, {
1267
+ children: "• Headphones"
1268
+ }),
1269
+ /*#__PURE__*/ _jsx(Text, {
1270
+ children: "• Tablets"
1271
+ })
1272
+ ]
1273
+ })
1274
+ ]
1275
+ })
1276
+ ]
1277
+ })
1278
+ ]
1279
+ })
1280
+ })
1281
+ }),
1282
+ /*#__PURE__*/ _jsx(Pane.Footer, {
1283
+ children: /*#__PURE__*/ _jsx(Box, {
1284
+ padding: "4",
1285
+ children: /*#__PURE__*/ _jsxs(HorizontalStack, {
1286
+ gap: "4",
1287
+ align: "end",
1288
+ children: [
1289
+ /*#__PURE__*/ _jsx(Button, {
1290
+ onClick: function() {
1291
+ return setSecondPaneOpen(false);
1292
+ },
1293
+ children: "Close"
1294
+ }),
1295
+ /*#__PURE__*/ _jsx(Button, {
1296
+ primary: true,
1297
+ onClick: function() {
1298
+ return alert('Edit category functionality');
1299
+ },
1300
+ children: "Edit Category"
1301
+ })
1302
+ ]
1303
+ })
1304
+ })
1305
+ })
1306
+ ]
1307
+ })
1308
+ ]
1309
+ });
1310
+ },
1311
+ parameters: {
1312
+ docs: {
1313
+ description: {
1314
+ story: 'Example of stacked panes for hierarchical navigation and detailed views.'
1315
+ }
1316
+ }
1317
+ }
1318
+ };
1319
+ export var CustomLayout = {
1320
+ render: function() {
1321
+ var _useState = _sliced_to_array(useState(false), 2), paneOpen = _useState[0], setPaneOpen = _useState[1];
1322
+ return /*#__PURE__*/ _jsxs(Page, {
1323
+ title: "Custom Pane Layout",
1324
+ children: [
1325
+ /*#__PURE__*/ _jsx(Card, {
1326
+ title: "Pane Customization",
1327
+ padded: true,
1328
+ children: /*#__PURE__*/ _jsxs(VerticalStack, {
1329
+ gap: "4",
1330
+ children: [
1331
+ /*#__PURE__*/ _jsx(Text, {
1332
+ children: "This example shows a pane with custom header layout (no borders) and footer styling."
1333
+ }),
1334
+ /*#__PURE__*/ _jsx(Button, {
1335
+ primary: true,
1336
+ onClick: function() {
1337
+ return setPaneOpen(true);
1338
+ },
1339
+ children: "Open Custom Pane"
1340
+ })
1341
+ ]
1342
+ })
1343
+ }),
1344
+ /*#__PURE__*/ _jsxs(Pane, {
1345
+ open: paneOpen,
1346
+ onClose: function() {
1347
+ return setPaneOpen(false);
1348
+ },
1349
+ children: [
1350
+ /*#__PURE__*/ _jsxs(Pane.Header, {
1351
+ bottomBorder: false,
1352
+ showCloseButton: false,
1353
+ children: [
1354
+ /*#__PURE__*/ _jsxs(HorizontalStack, {
1355
+ gap: "2",
1356
+ blockAlign: "center",
1357
+ children: [
1358
+ /*#__PURE__*/ _jsx(Box, {
1359
+ as: "div",
1360
+ style: {
1361
+ width: '8px',
1362
+ height: '8px',
1363
+ borderRadius: '50%',
1364
+ backgroundColor: '#28a745'
1365
+ }
1366
+ }),
1367
+ /*#__PURE__*/ _jsx(Text, {
1368
+ variant: "headingMd",
1369
+ children: "Live Chat Support"
1370
+ })
1371
+ ]
1372
+ }),
1373
+ /*#__PURE__*/ _jsx(Text, {
1374
+ variant: "bodySm",
1375
+ color: "subdued",
1376
+ children: "Online"
1377
+ })
1378
+ ]
1379
+ }),
1380
+ /*#__PURE__*/ _jsx(Pane.Content, {
1381
+ children: /*#__PURE__*/ _jsxs(Box, {
1382
+ padding: "4",
1383
+ style: {
1384
+ display: 'flex',
1385
+ flexDirection: 'column',
1386
+ gap: '1rem',
1387
+ height: '100%'
1388
+ },
1389
+ children: [
1390
+ /*#__PURE__*/ _jsxs(VerticalStack, {
1391
+ gap: "4",
1392
+ style: {
1393
+ flex: 1
1394
+ },
1395
+ children: [
1396
+ /*#__PURE__*/ _jsx("div", {
1397
+ style: {
1398
+ alignSelf: 'flex-start',
1399
+ padding: '0.75rem',
1400
+ backgroundColor: '#f0f0f0',
1401
+ borderRadius: '12px',
1402
+ maxWidth: '80%'
1403
+ },
1404
+ children: /*#__PURE__*/ _jsx(Text, {
1405
+ variant: "bodySm",
1406
+ children: "Hello! How can I help you today?"
1407
+ })
1408
+ }),
1409
+ /*#__PURE__*/ _jsx("div", {
1410
+ style: {
1411
+ alignSelf: 'flex-end',
1412
+ padding: '0.75rem',
1413
+ backgroundColor: '#007bff',
1414
+ color: 'white',
1415
+ borderRadius: '12px',
1416
+ maxWidth: '80%'
1417
+ },
1418
+ children: /*#__PURE__*/ _jsx(Text, {
1419
+ variant: "bodySm",
1420
+ children: "I'm having trouble with my order"
1421
+ })
1422
+ }),
1423
+ /*#__PURE__*/ _jsx("div", {
1424
+ style: {
1425
+ alignSelf: 'flex-start',
1426
+ padding: '0.75rem',
1427
+ backgroundColor: '#f0f0f0',
1428
+ borderRadius: '12px',
1429
+ maxWidth: '80%'
1430
+ },
1431
+ children: /*#__PURE__*/ _jsx(Text, {
1432
+ variant: "bodySm",
1433
+ children: "I'd be happy to help with your order. Can you provide your order number?"
1434
+ })
1435
+ })
1436
+ ]
1437
+ }),
1438
+ /*#__PURE__*/ _jsxs(HorizontalStack, {
1439
+ gap: "2",
1440
+ children: [
1441
+ /*#__PURE__*/ _jsx("input", {
1442
+ type: "text",
1443
+ placeholder: "Type your message...",
1444
+ style: {
1445
+ flex: 1,
1446
+ padding: '0.75rem',
1447
+ border: '1px solid #ccc',
1448
+ borderRadius: '20px',
1449
+ outline: 'none'
1450
+ }
1451
+ }),
1452
+ /*#__PURE__*/ _jsx(Button, {
1453
+ primary: true,
1454
+ children: "Send"
1455
+ })
1456
+ ]
1457
+ })
1458
+ ]
1459
+ })
1460
+ }),
1461
+ /*#__PURE__*/ _jsx(Pane.Footer, {
1462
+ topBorder: false,
1463
+ children: /*#__PURE__*/ _jsx(Box, {
1464
+ padding: "4",
1465
+ children: /*#__PURE__*/ _jsxs(HorizontalStack, {
1466
+ gap: "4",
1467
+ align: "space-between",
1468
+ blockAlign: "center",
1469
+ children: [
1470
+ /*#__PURE__*/ _jsx(Text, {
1471
+ variant: "bodySm",
1472
+ color: "subdued",
1473
+ children: "Agent: Sarah M. • Response time: <1 min"
1474
+ }),
1475
+ /*#__PURE__*/ _jsx(Button, {
1476
+ onClick: function() {
1477
+ return setPaneOpen(false);
1478
+ },
1479
+ children: "End Chat"
1480
+ })
1481
+ ]
1482
+ })
1483
+ })
1484
+ })
1485
+ ]
1486
+ })
1487
+ ]
1488
+ });
1489
+ },
1490
+ parameters: {
1491
+ docs: {
1492
+ description: {
1493
+ story: 'Pane with custom layout including no borders and specialized content like a chat interface.'
1494
+ }
1495
+ }
1496
+ }
1497
+ };