themelia-ui 3.0.0 → 3.2.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 (746) hide show
  1. package/.agents/skills/themelia-ui/SKILL.md +60 -33
  2. package/.agents/skills/themelia-ui/manifest.json +23 -0
  3. package/.agents/skills/themelia-ui/references/api-compatibility.md +5 -4
  4. package/.agents/skills/themelia-ui/references/blocks.md +123 -0
  5. package/.agents/skills/themelia-ui/references/composition-ladder.md +8 -8
  6. package/.agents/skills/themelia-ui/references/composition.md +100 -19
  7. package/.agents/skills/themelia-ui/references/forms.md +23 -3
  8. package/.agents/skills/themelia-ui/references/framework-wiring.md +41 -13
  9. package/.agents/skills/themelia-ui/references/i18n.md +4 -2
  10. package/.agents/skills/themelia-ui/references/imports.md +104 -104
  11. package/.agents/skills/themelia-ui/references/installation.md +60 -31
  12. package/.agents/skills/themelia-ui/references/migration.md +156 -5
  13. package/.agents/skills/themelia-ui/references/provider-and-scoping.md +37 -25
  14. package/.agents/skills/themelia-ui/references/reference-workflows.md +43 -0
  15. package/.agents/skills/themelia-ui/references/structure-and-spacing.md +147 -0
  16. package/.agents/skills/themelia-ui/references/theming.md +174 -131
  17. package/.agents/skills/themelia-ui/references/troubleshooting.md +88 -30
  18. package/.agents/skills/themelia-ui/references/verification.md +60 -5
  19. package/CHANGELOG.md +212 -0
  20. package/README.md +48 -60
  21. package/dist/accordion-CHuzMmWL.js +143 -0
  22. package/dist/{action-menu-BNLURfMK.js → action-menu-BwiL_F6I.js} +35 -33
  23. package/dist/{alert-dialog-BMVo6Z-8.js → alert-dialog-Cg2HhuBe.js} +1 -1
  24. package/dist/avatar-Dc_BNYfB.js +93 -0
  25. package/dist/badge-VlJVZjdm.js +45 -0
  26. package/dist/base/accordion.js +1 -1
  27. package/dist/base/action-menu.js +1 -1
  28. package/dist/base/alert-dialog.js +1 -1
  29. package/dist/base/aspect-ratio.js +3 -1
  30. package/dist/base/avatar.js +1 -1
  31. package/dist/base/badge.js +2 -2
  32. package/dist/base/batch-action-bar.js +1 -1
  33. package/dist/base/buttons.js +1 -1
  34. package/dist/base/cards.js +1 -1
  35. package/dist/base/carousel.js +6 -4
  36. package/dist/base/chart.js +1 -1
  37. package/dist/base/choice-inputs.js +1 -1
  38. package/dist/base/combobox.js +1 -1
  39. package/dist/base/command.js +1 -1
  40. package/dist/base/context-menu.js +22 -21
  41. package/dist/base/copyable.js +1 -1
  42. package/dist/base/date-pickers.js +1 -1
  43. package/dist/base/dialog.js +1 -1
  44. package/dist/base/display.js +1 -1
  45. package/dist/base/dropdown-menu.js +1 -1
  46. package/dist/base/feedback.js +1 -1
  47. package/dist/base/forms-numeric.js +1 -1
  48. package/dist/base/forms.js +1 -1
  49. package/dist/base/hover-card.js +26 -23
  50. package/dist/base/input-group.js +1 -1
  51. package/dist/base/item.js +1 -1
  52. package/dist/base/label.js +1 -1
  53. package/dist/base/menubar.js +20 -14
  54. package/dist/base/navigation-menu.js +47 -38
  55. package/dist/base/navigation.js +1 -1
  56. package/dist/base/otp-input.js +36 -30
  57. package/dist/base/overlay.js +1 -1
  58. package/dist/base/popover-menu.js +1 -1
  59. package/dist/base/popover.js +1 -1
  60. package/dist/base/qr-code.js +51 -47
  61. package/dist/base/repeaters.js +1 -1
  62. package/dist/base/resizable.js +2 -0
  63. package/dist/base/sheet.js +1 -1
  64. package/dist/base/sidebar.js +1 -1
  65. package/dist/base/skeleton.js +1 -1
  66. package/dist/base/spinner.js +1 -1
  67. package/dist/base/structure.js +1 -1
  68. package/dist/base/table.js +1 -1
  69. package/dist/base/text-inputs.js +1 -1
  70. package/dist/base/timeline.js +1 -1
  71. package/dist/base/toaster.js +1 -1
  72. package/dist/base/toggle.js +21 -15
  73. package/dist/base/toolbar.js +1 -1
  74. package/dist/base/tooltip.js +1 -1
  75. package/dist/base/typography.js +2 -2
  76. package/dist/base/upload.js +1 -1
  77. package/dist/base/value-inputs.js +1 -1
  78. package/dist/{batch-action-bar-BZYNKXdV.js → batch-action-bar-DZVMVW83.js} +11 -8
  79. package/dist/{admin/patterns → blocks/admin}/access.js +79 -76
  80. package/dist/blocks/admin/commerce.js +2493 -0
  81. package/dist/{patterns → blocks}/analytics.js +312 -303
  82. package/dist/{patterns → blocks}/onboarding.js +27 -23
  83. package/dist/{patterns → blocks}/timelines.js +1 -1
  84. package/dist/buttons-BX2JfL5X.js +173 -0
  85. package/dist/cards-Ddhz43Bz.js +279 -0
  86. package/dist/chart-BkK3Xm10.js +201 -0
  87. package/dist/choice-inputs-NwRxvmZN.js +694 -0
  88. package/dist/combobox-519ubijc.js +292 -0
  89. package/dist/command-JjApYFds.js +156 -0
  90. package/dist/comments-CCQ2QRaU.js +1443 -0
  91. package/dist/components/base/action-menu/action-menu.d.ts +1 -1
  92. package/dist/components/base/action-menu/action-menu.types.d.ts +2 -2
  93. package/dist/components/base/avatar/avatar.d.ts +5 -2
  94. package/dist/components/base/badge/badge.d.ts +10 -10
  95. package/dist/components/base/badge/badge.variants.d.ts +1 -2
  96. package/dist/components/base/badge/index.d.ts +1 -2
  97. package/dist/components/base/buttons/button.d.ts +9 -8
  98. package/dist/components/base/buttons/button.types.d.ts +2 -2
  99. package/dist/components/base/buttons/index.d.ts +1 -1
  100. package/dist/components/base/buttons/text-button.d.ts +1 -1
  101. package/dist/components/base/cards/card-actions.d.ts +1 -1
  102. package/dist/components/base/cards/card.d.ts +3 -1
  103. package/dist/components/base/cards/partials/card-header.d.ts +2 -1
  104. package/dist/components/base/choice-inputs/choice.types.d.ts +2 -2
  105. package/dist/components/base/choice-inputs/partials/choice-parts.d.ts +3 -3
  106. package/dist/components/base/command/command.d.ts +5 -2
  107. package/dist/components/base/display/icon-badge.d.ts +5 -3
  108. package/dist/components/base/display/index.d.ts +1 -1
  109. package/dist/components/base/display/metadata-list.d.ts +6 -6
  110. package/dist/components/base/display/metadata-value.d.ts +1 -1
  111. package/dist/components/base/display/separator.d.ts +2 -2
  112. package/dist/components/base/feedback/alert.d.ts +3 -2
  113. package/dist/components/base/feedback/empty.d.ts +5 -4
  114. package/dist/components/base/feedback/progress-circle.d.ts +2 -2
  115. package/dist/components/base/feedback/progress.d.ts +3 -1
  116. package/dist/components/base/forms/form-field.d.ts +2 -2
  117. package/dist/components/base/input-group/input-group.d.ts +8 -10
  118. package/dist/components/base/item/item.d.ts +2 -2
  119. package/dist/components/base/overlay/index.d.ts +1 -1
  120. package/dist/components/base/overlay/overlay.types.d.ts +7 -5
  121. package/dist/components/base/qr-code/qr-code.d.ts +4 -4
  122. package/dist/components/base/sheet/sheet.d.ts +1 -1
  123. package/dist/components/base/sidebar/sidebar.d.ts +9 -13
  124. package/dist/components/base/spinner/spinner.d.ts +2 -2
  125. package/dist/components/base/structure/adaptive-grid.d.ts +3 -3
  126. package/dist/components/base/structure/bleed.d.ts +4 -2
  127. package/dist/components/base/structure/grid.d.ts +10 -4
  128. package/dist/components/base/structure/index.d.ts +1 -1
  129. package/dist/components/base/structure/split.d.ts +4 -3
  130. package/dist/components/base/structure/stack.d.ts +5 -5
  131. package/dist/components/base/structure/structure.maps.d.ts +2 -1
  132. package/dist/components/base/structure/structure.types.d.ts +10 -4
  133. package/dist/components/base/toggle/toggle.d.ts +2 -2
  134. package/dist/components/base/toolbar/toolbar.d.ts +3 -3
  135. package/dist/components/base/typography/index.d.ts +2 -0
  136. package/dist/components/base/typography/rich-text/rich-text.variants.d.ts +9 -0
  137. package/dist/components/base/typography/text/index.d.ts +1 -0
  138. package/dist/components/base/typography/text/text.d.ts +15 -8
  139. package/dist/components/base/typography/text/text.variants.d.ts +41 -0
  140. package/dist/components/base/value-inputs/color-input.d.ts +1 -7
  141. package/dist/components/base/value-inputs/slider.d.ts +2 -7
  142. package/dist/components/{admin/patterns → blocks/admin}/commerce/vendor-profile.d.ts +2 -1
  143. package/dist/components/{patterns → blocks}/analytics/analytics.strings.d.ts +2 -5
  144. package/dist/components/features/actions/action-adapters.d.ts +3 -3
  145. package/dist/components/features/actions/actions.types.d.ts +3 -5
  146. package/dist/components/features/actions/index.d.ts +1 -1
  147. package/dist/components/features/activities/activities-feed.d.ts +1 -1
  148. package/dist/components/features/activities/activities.types.d.ts +4 -4
  149. package/dist/components/features/activities/activity-parts.d.ts +3 -3
  150. package/dist/components/features/activities/activity-row.d.ts +4 -4
  151. package/dist/components/features/activities/index.d.ts +1 -1
  152. package/dist/components/features/ai-chat/ai-chat.types.d.ts +10 -3
  153. package/dist/components/features/ai-chat/ai-message-surfaces.d.ts +1 -1
  154. package/dist/components/features/ai-chat/ai-work-surfaces.d.ts +1 -1
  155. package/dist/components/features/combobox/combobox.strings.d.ts +2 -2
  156. package/dist/components/features/combobox/fetching-combobox.d.ts +2 -1
  157. package/dist/components/features/combobox/resource-combobox.d.ts +3 -0
  158. package/dist/components/features/combobox/use-suggestions.d.ts +7 -0
  159. package/dist/components/features/event-calendar/event-calendar.types.d.ts +3 -0
  160. package/dist/components/features/media-library/index.d.ts +1 -1
  161. package/dist/components/features/media-library/media-library-parts.d.ts +4 -3
  162. package/dist/components/features/media-library/media-library-views.d.ts +4 -3
  163. package/dist/components/features/media-library/media-library.d.ts +1 -1
  164. package/dist/components/features/media-library/media-library.strings.d.ts +12 -13
  165. package/dist/components/features/media-library/media-library.types.d.ts +11 -9
  166. package/dist/components/features/media-library/media-resource-gallery.d.ts +1 -1
  167. package/dist/components/features/media-library/use-media-library.d.ts +1 -4
  168. package/dist/components/features/overlays/action-overlay-frame.d.ts +1 -1
  169. package/dist/components/features/overlays/index.d.ts +1 -1
  170. package/dist/components/features/overlays/overlay-parts.d.ts +3 -3
  171. package/dist/components/features/overlays/overlays.types.d.ts +8 -7
  172. package/dist/components/features/rich-text-editor/index.d.ts +0 -1
  173. package/dist/components/features/table/data-table-body.d.ts +1 -1
  174. package/dist/components/features/table/data-table-expanded-row.d.ts +27 -0
  175. package/dist/components/features/table/data-table-header.d.ts +1 -1
  176. package/dist/components/features/table/data-table-size.d.ts +1 -1
  177. package/dist/components/features/table/data-table.d.ts +1 -1
  178. package/dist/components/features/table/index.d.ts +1 -1
  179. package/dist/components/features/table/table-helpers.d.ts +9 -3
  180. package/dist/components/features/table/table.strings.d.ts +11 -0
  181. package/dist/components/features/table/table.types.d.ts +60 -2
  182. package/dist/components/features/theme-tweaker/index.d.ts +1 -1
  183. package/dist/components/features/theme-tweaker/theme-tweaker.strings.d.ts +1 -1
  184. package/dist/components/features/theme-tweaker/theme-tweaker.types.d.ts +6 -10
  185. package/dist/components/features/theme-tweaker/theme-tweaker.utils.d.ts +22 -6
  186. package/dist/components/layout/app-shell/topbar-sidebar-layout.d.ts +1 -1
  187. package/dist/components/layout/auth/auth.d.ts +1 -1
  188. package/dist/components/layout/auth/auth.types.d.ts +1 -1
  189. package/dist/components/primitives/value.d.ts +3 -1
  190. package/dist/containers-B8d8U9GS.js +2 -0
  191. package/dist/{copyable-H1TUEY-H.js → copyable-D9Okb1w6.js} +12 -11
  192. package/dist/core.css +2 -2
  193. package/dist/css/access.css +2 -1
  194. package/dist/css/accordion.css +2 -1
  195. package/dist/css/action-menu.css +2 -1
  196. package/dist/css/activities.css +2 -1
  197. package/dist/css/ai-chat.css +2 -1
  198. package/dist/css/analytics.css +2 -1
  199. package/dist/css/app-shell.css +2 -1
  200. package/dist/css/aspect-ratio.css +2 -1
  201. package/dist/css/async-preview.css +2 -1
  202. package/dist/css/auth.css +2 -1
  203. package/dist/css/avatar.css +2 -1
  204. package/dist/css/badge.css +2 -1
  205. package/dist/css/batch-action-bar.css +2 -1
  206. package/dist/css/buttons.css +2 -1
  207. package/dist/css/cards.css +2 -1
  208. package/dist/css/carousel.css +2 -1
  209. package/dist/css/chart.css +2 -1
  210. package/dist/css/choice-inputs.css +2 -1
  211. package/dist/css/combobox.css +2 -1
  212. package/dist/css/combobox2.css +2 -1
  213. package/dist/css/command.css +2 -1
  214. package/dist/css/comments.css +2 -1
  215. package/dist/css/commerce.css +2 -1
  216. package/dist/css/containers.css +2 -1
  217. package/dist/css/copyable.css +2 -1
  218. package/dist/css/data-view.css +2 -1
  219. package/dist/css/date-pickers.css +2 -1
  220. package/dist/css/display.css +2 -1
  221. package/dist/css/dropdown-menu.css +2 -1
  222. package/dist/css/event-calendar.css +2 -1
  223. package/dist/css/feedback.css +2 -1
  224. package/dist/css/filters.css +2 -1
  225. package/dist/css/forms-numeric.css +2 -1
  226. package/dist/css/forms.css +2 -1
  227. package/dist/css/global-search.css +2 -1
  228. package/dist/css/header.css +2 -1
  229. package/dist/css/hover-card.css +2 -1
  230. package/dist/css/input-group.css +2 -1
  231. package/dist/css/item.css +2 -1
  232. package/dist/css/kanban.css +2 -1
  233. package/dist/css/label.css +2 -1
  234. package/dist/css/map.css +2 -1
  235. package/dist/css/media-library.css +2 -1
  236. package/dist/css/mentions.css +2 -1
  237. package/dist/css/menubar.css +2 -1
  238. package/dist/css/navigation-menu.css +2 -1
  239. package/dist/css/navigation.css +2 -1
  240. package/dist/css/navigation2.css +2 -1
  241. package/dist/css/onboarding.css +2 -1
  242. package/dist/css/otp-input.css +2 -1
  243. package/dist/css/overlay.css +2 -1
  244. package/dist/css/overlays.css +2 -1
  245. package/dist/css/page.css +2 -1
  246. package/dist/css/popover-menu.css +2 -1
  247. package/dist/css/popover.css +2 -1
  248. package/dist/css/primitives.css +2 -1
  249. package/dist/css/products.css +2 -1
  250. package/dist/css/qr-code.css +2 -1
  251. package/dist/css/repeaters.css +2 -1
  252. package/dist/css/resizable.css +2 -1
  253. package/dist/css/resource-assignment.css +2 -1
  254. package/dist/css/resource.css +2 -1
  255. package/dist/css/rich-text-editor.css +2 -1
  256. package/dist/css/schema-form.css +2 -1
  257. package/dist/css/sidebar.css +2 -1
  258. package/dist/css/sidebar2.css +2 -1
  259. package/dist/css/skeleton.css +2 -1
  260. package/dist/css/spinner.css +2 -1
  261. package/dist/css/structure.css +2 -1
  262. package/dist/css/sync.css +2 -1
  263. package/dist/css/table.css +2 -1
  264. package/dist/css/table2.css +2 -1
  265. package/dist/css/text-inputs.css +2 -1
  266. package/dist/css/theme-tweaker.css +2 -1
  267. package/dist/css/timeline.css +2 -1
  268. package/dist/css/timelines.css +2 -1
  269. package/dist/css/toaster.css +2 -1
  270. package/dist/css/toggle.css +2 -1
  271. package/dist/css/toolbar.css +2 -1
  272. package/dist/css/tooltip.css +2 -1
  273. package/dist/css/typography.css +2 -1
  274. package/dist/css/upload.css +2 -1
  275. package/dist/css/value-inputs.css +2 -1
  276. package/dist/css/workspace.css +2 -1
  277. package/dist/css-graph.json +1027 -0
  278. package/dist/date-pickers-BwCwKIVM.js +685 -0
  279. package/dist/{dialog-CtFCuTUF.js → dialog-CAnwRNrm.js} +1 -1
  280. package/dist/display-a7AoX_u7.js +664 -0
  281. package/dist/dropdown-menu-Br8kvjrF.js +235 -0
  282. package/dist/empty.js +0 -0
  283. package/dist/features/actions.js +6 -6
  284. package/dist/features/activities.js +219 -216
  285. package/dist/features/ai-chat.js +593 -565
  286. package/dist/features/async-preview.js +105 -286
  287. package/dist/features/combobox.js +328 -314
  288. package/dist/features/comments.js +1 -1
  289. package/dist/features/data-view.js +56 -55
  290. package/dist/features/event-calendar.js +189 -185
  291. package/dist/features/filters.js +1 -1
  292. package/dist/features/global-search.js +259 -260
  293. package/dist/features/kanban.js +39 -37
  294. package/dist/features/map.js +357 -354
  295. package/dist/features/media-library.js +931 -931
  296. package/dist/features/mentions.js +1 -1
  297. package/dist/features/overlays.js +1 -1
  298. package/dist/features/products.js +950 -942
  299. package/dist/features/resource-assignment.js +39 -37
  300. package/dist/features/resource.js +70 -71
  301. package/dist/features/rich-text-editor.js +2 -2
  302. package/dist/features/schema-form.js +342 -338
  303. package/dist/features/sync.js +14 -12
  304. package/dist/features/table.js +1 -1
  305. package/dist/features/theme-tweaker.js +1002 -962
  306. package/dist/feedback-D4qVsKlD.js +430 -0
  307. package/dist/{filters-DOLKRSmb.js → filters-BhsTkWpZ.js} +386 -383
  308. package/dist/forms-C0WeNPFF.js +250 -0
  309. package/dist/forms-numeric-IwQ1ltNf.js +582 -0
  310. package/dist/hooks/use-native-dialog.d.ts +1 -1
  311. package/dist/index.js +2 -2
  312. package/dist/input-group-HS_Z0Ei_.js +119 -0
  313. package/dist/item-M2pmpWXh.js +150 -0
  314. package/dist/{label-DumoMDm6.js → label-HOBXAscw.js} +7 -5
  315. package/dist/layout/app-shell.js +4 -2
  316. package/dist/layout/auth.js +102 -100
  317. package/dist/layout/header.js +190 -180
  318. package/dist/layout/navigation.js +1 -1
  319. package/dist/layout/page.js +18 -16
  320. package/dist/layout/settings.js +2 -2
  321. package/dist/layout/sidebar.js +50 -46
  322. package/dist/layout/workspace.js +71 -69
  323. package/dist/lib/action-presentation.d.ts +3 -3
  324. package/dist/lib/component-vocabulary.d.ts +2 -2
  325. package/dist/lib/css-length.d.ts +2 -0
  326. package/dist/lib/responsive.d.ts +1 -1
  327. package/dist/lib/theming/index.d.ts +1 -0
  328. package/dist/lib/theming/recipes.d.ts +2 -2
  329. package/dist/lib/theming/themes/dense.d.ts +3 -0
  330. package/dist/lib/theming/themes/editorial.d.ts +3 -0
  331. package/dist/lib/theming/themes/index.d.ts +8 -0
  332. package/dist/lib/theming/themes/pair.d.ts +7 -0
  333. package/dist/lib/theming/themes/sharp.d.ts +3 -0
  334. package/dist/lib/theming/themes/soft.d.ts +3 -0
  335. package/dist/lib/theming/themes/types.d.ts +12 -0
  336. package/dist/lib/ui-provider/index.d.ts +1 -1
  337. package/dist/lib/ui-provider/scope.d.ts +5 -8
  338. package/dist/lib/ui-provider/tokens.d.ts +11 -3
  339. package/dist/lib/ui-provider/tokens.generated.d.ts +6 -4
  340. package/dist/lib/ui-provider/types.d.ts +17 -19
  341. package/dist/lib/ui-provider/ui-scope.d.ts +1 -1
  342. package/dist/{mentions-BbsEHlcH.js → mentions-BOxbigwp.js} +113 -111
  343. package/dist/navigation-Bgu7Vc0M.js +622 -0
  344. package/dist/navigation-DiYACqpE.js +216 -0
  345. package/dist/overlay-BuQOl8aP.js +356 -0
  346. package/dist/{overlays-DvVoS3td.js → overlays-1sULyytH.js} +77 -75
  347. package/dist/popover-CA7SP_iz.js +127 -0
  348. package/dist/popover-menu-QXgQeWeG.js +192 -0
  349. package/dist/{primitives-D0bdDozz.js → primitives-BskKlf35.js} +181 -178
  350. package/dist/primitives.js +1 -1
  351. package/dist/profiles/admin.json +6 -36
  352. package/dist/profiles/general.json +6 -96
  353. package/dist/repeaters-CeH20dvr.js +445 -0
  354. package/dist/rich-text-editor-D_Ppm8yh.js +491 -0
  355. package/dist/{sheet-CKcmRbJ9.js → sheet-CJ1-OAla.js} +3 -3
  356. package/dist/sidebar-D8uGqxio.js +421 -0
  357. package/dist/skeleton-BTKNKTdj.js +173 -0
  358. package/dist/spinner-Tc1QCnxM.js +30 -0
  359. package/dist/{structure-D0WGQAP3.js → structure-CynEZ-OY.js} +15 -23
  360. package/dist/style.css +1 -1
  361. package/dist/styles/TOKENS.md +116 -275
  362. package/dist/styles/animation.css +114 -0
  363. package/dist/styles/base.css +7 -6
  364. package/dist/styles/fields.css +45 -63
  365. package/dist/styles/focus.css +12 -0
  366. package/dist/styles/forced-colors.css +11 -10
  367. package/dist/styles/index.css +23 -30
  368. package/dist/styles/map.css +45 -34
  369. package/dist/styles/mentions.css +14 -52
  370. package/dist/styles/overlays.css +7 -7
  371. package/dist/styles/tailwind.css +76 -127
  372. package/dist/styles/targets.css +3 -3
  373. package/dist/styles/theme/colour.css +86 -0
  374. package/dist/styles/theme/density.css +31 -0
  375. package/dist/styles/theme/elevation.css +9 -0
  376. package/dist/styles/theme/layout.css +18 -0
  377. package/dist/styles/theme/motion.css +18 -0
  378. package/dist/styles/theme/shape.css +12 -0
  379. package/dist/styles/theme/size.css +10 -0
  380. package/dist/styles/theme/spacing.css +11 -0
  381. package/dist/styles/theme/typography.css +20 -0
  382. package/dist/styles/tone.css +61 -0
  383. package/dist/table-B7dtIFUx.js +1262 -0
  384. package/dist/table-Ds_eO9av.js +191 -0
  385. package/dist/tailwind.css +76 -127
  386. package/dist/text-inputs-BboE77nZ.js +395 -0
  387. package/dist/theming-C5ygF5uf.js +292 -0
  388. package/dist/theming.js +2 -2
  389. package/dist/{timeline-BdaGRyj-.js → timeline-BR_jNgvz.js} +57 -49
  390. package/dist/{timelines-BB7550mz.js → timelines-DXG1BfIN.js} +69 -67
  391. package/dist/{toaster-bBMgXm8z.js → toaster-CXL8L7Mm.js} +106 -99
  392. package/dist/tokens.json +1027 -636
  393. package/dist/toolbar-DBK-c4yy.js +74 -0
  394. package/dist/tooltip-BPYP-jUm.js +76 -0
  395. package/dist/{typography-BkxEiwQ1.js → typography-DmeR05Er.js} +87 -53
  396. package/dist/{ui-provider-Cmoq6i_D.js → ui-provider-DpzLUD12.js} +117 -69
  397. package/dist/ui-provider.js +1 -1
  398. package/dist/upload-CYuoJykZ.js +968 -0
  399. package/dist/use-async-preview-BFwf9ElY.js +188 -0
  400. package/dist/value-inputs-ng8aVJJZ.js +728 -0
  401. package/docs/README.md +13 -3
  402. package/docs/build/browser-composition-fixture.ts +28 -0
  403. package/docs/build/recipes.md +11484 -10723
  404. package/docs/generated/component-index.json +9809 -9169
  405. package/docs/generated/components/INDEX.md +5 -5
  406. package/docs/generated/components/base--accordion.md +51 -2
  407. package/docs/generated/components/base--action-menu.md +14 -15
  408. package/docs/generated/components/base--alert-dialog.md +3 -4
  409. package/docs/generated/components/base--aspect-ratio.md +3 -4
  410. package/docs/generated/components/base--avatar.md +7 -7
  411. package/docs/generated/components/base--badge.md +159 -27
  412. package/docs/generated/components/base--batch-action-bar.md +6 -7
  413. package/docs/generated/components/base--buttons.md +151 -47
  414. package/docs/generated/components/base--cards.md +107 -14
  415. package/docs/generated/components/base--carousel.md +1 -2
  416. package/docs/generated/components/base--chart.md +44 -8
  417. package/docs/generated/components/base--choice-inputs.md +10 -11
  418. package/docs/generated/components/base--combobox.md +3 -4
  419. package/docs/generated/components/base--command.md +6 -6
  420. package/docs/generated/components/base--context-menu.md +1 -2
  421. package/docs/generated/components/base--copyable.md +6 -7
  422. package/docs/generated/components/base--date-pickers.md +6 -7
  423. package/docs/generated/components/base--dialog.md +6 -7
  424. package/docs/generated/components/base--direction.md +1 -1
  425. package/docs/generated/components/base--display.md +234 -54
  426. package/docs/generated/components/base--dropdown-menu.md +6 -7
  427. package/docs/generated/components/base--feedback.md +71 -18
  428. package/docs/generated/components/base--forms-numeric.md +6 -7
  429. package/docs/generated/components/base--forms.md +84 -14
  430. package/docs/generated/components/base--hover-card.md +3 -4
  431. package/docs/generated/components/base--input-group.md +27 -30
  432. package/docs/generated/components/base--item.md +8 -9
  433. package/docs/generated/components/base--label.md +2 -3
  434. package/docs/generated/components/base--menubar.md +2 -4
  435. package/docs/generated/components/base--navigation-menu.md +2 -3
  436. package/docs/generated/components/base--navigation.md +2 -3
  437. package/docs/generated/components/base--otp-input.md +3 -4
  438. package/docs/generated/components/base--overlay.md +56 -47
  439. package/docs/generated/components/base--popover-menu.md +7 -8
  440. package/docs/generated/components/base--popover.md +9 -10
  441. package/docs/generated/components/base--qr-code.md +7 -8
  442. package/docs/generated/components/base--repeaters.md +6 -7
  443. package/docs/generated/components/base--resizable.md +2 -3
  444. package/docs/generated/components/base--sheet.md +12 -13
  445. package/docs/generated/components/base--sidebar.md +9 -11
  446. package/docs/generated/components/base--skeleton.md +6 -7
  447. package/docs/generated/components/base--slot.md +1 -1
  448. package/docs/generated/components/base--spinner.md +5 -7
  449. package/docs/generated/components/base--structure.md +320 -70
  450. package/docs/generated/components/base--table.md +61 -3
  451. package/docs/generated/components/base--text-inputs.md +17 -18
  452. package/docs/generated/components/base--timeline.md +45 -4
  453. package/docs/generated/components/base--toaster.md +43 -12
  454. package/docs/generated/components/base--toggle.md +11 -12
  455. package/docs/generated/components/base--toolbar.md +7 -8
  456. package/docs/generated/components/base--tooltip.md +5 -6
  457. package/docs/generated/components/base--typography.md +317 -32
  458. package/docs/generated/components/base--upload.md +8 -9
  459. package/docs/generated/components/base--value-inputs.md +9 -38
  460. package/docs/generated/components/{admin--patterns--access.md → blocks--admin--access.md} +15 -6
  461. package/docs/generated/components/{admin--patterns--commerce.md → blocks--admin--commerce.md} +40 -41
  462. package/docs/generated/components/{patterns--analytics.md → blocks--analytics.md} +57 -14
  463. package/docs/generated/components/{patterns--onboarding.md → blocks--onboarding.md} +6 -7
  464. package/docs/generated/components/{patterns--timelines.md → blocks--timelines.md} +6 -7
  465. package/docs/generated/components/features--actions.md +8 -18
  466. package/docs/generated/components/features--activities.md +31 -32
  467. package/docs/generated/components/features--ai-chat.md +15 -15
  468. package/docs/generated/components/features--async-preview.md +5 -6
  469. package/docs/generated/components/features--combobox.md +71 -5
  470. package/docs/generated/components/features--comments.md +0 -1
  471. package/docs/generated/components/features--data-view.md +63 -8
  472. package/docs/generated/components/features--event-calendar.md +1 -2
  473. package/docs/generated/components/features--filters.md +11 -2
  474. package/docs/generated/components/features--global-search.md +1 -2
  475. package/docs/generated/components/features--kanban.md +1 -2
  476. package/docs/generated/components/features--map.md +1 -2
  477. package/docs/generated/components/features--media-library.md +105 -38
  478. package/docs/generated/components/features--mentions.md +7 -7
  479. package/docs/generated/components/features--overlays.md +75 -22
  480. package/docs/generated/components/features--products.md +10 -11
  481. package/docs/generated/components/features--resource-assignment.md +2 -3
  482. package/docs/generated/components/features--resource.md +3 -4
  483. package/docs/generated/components/features--rich-text-editor.md +42 -13
  484. package/docs/generated/components/features--schema-form.md +1 -2
  485. package/docs/generated/components/features--sync.md +2 -3
  486. package/docs/generated/components/features--table.md +162 -12
  487. package/docs/generated/components/features--theme-tweaker.md +30 -15
  488. package/docs/generated/components/forms.md +2 -2
  489. package/docs/generated/components/layout--app-shell.md +41 -11
  490. package/docs/generated/components/layout--auth.md +8 -9
  491. package/docs/generated/components/layout--containers.md +40 -1
  492. package/docs/generated/components/layout--header.md +2 -3
  493. package/docs/generated/components/layout--navigation.md +0 -1
  494. package/docs/generated/components/layout--page.md +33 -5
  495. package/docs/generated/components/layout--settings.md +0 -1
  496. package/docs/generated/components/layout--sidebar.md +47 -7
  497. package/docs/generated/components/layout--workspace.md +3 -4
  498. package/docs/generated/components/primitives.md +128 -17
  499. package/docs/generated/components/theming.md +147 -4
  500. package/docs/generated/components/ui-provider.md +96 -78
  501. package/docs/generated/composition-ladder.md +8 -8
  502. package/docs/generated/consumer-contract.json +5736 -0
  503. package/docs/generated/imports.md +104 -104
  504. package/docs/generated/migration-broad-imports.json +267 -90
  505. package/docs/generated/migration-broad-imports.md +266 -101
  506. package/docs/generated/migration-codemod.json +365 -70
  507. package/docs/generated/migration.md +665 -95
  508. package/docs/generated/profiles.md +27 -27
  509. package/docs/generated/public-api.md +104 -102
  510. package/docs/generated/recipes.json +755 -810
  511. package/docs/generated/workflows/communications-overview/analytics/communications-reference.tsx +19 -0
  512. package/docs/generated/workflows/index.json +691 -0
  513. package/docs/generated/workflows/media-picking/media-library/media-picking-reference.tsx +63 -0
  514. package/docs/generated/workflows/media-picking/media-library/reference-data.ts +3 -0
  515. package/docs/generated/workflows/multi-section-form/form-workflow/multi-section-reference.tsx +46 -0
  516. package/docs/generated/workflows/nested-action-flow/action-overlays/nested-action-reference.tsx +39 -0
  517. package/docs/generated/workflows/record-detail/page-layout/record-detail-reference.tsx +24 -0
  518. package/docs/generated/workflows/resource-index/data-view/resource-index-reference.tsx +51 -0
  519. package/docs/generated/workflows/scoped-resource-selection/combobox/scoped-resource-reference.tsx +50 -0
  520. package/docs/generated/workflows/website-content-editor/media-library/reference-data.ts +3 -0
  521. package/docs/generated/workflows/website-content-editor/rich-text-editor/website-content-reference.tsx +33 -0
  522. package/docs/generated/workflows/workspace-navigation/app-shell/workspace-navigation-reference.tsx +26 -0
  523. package/docs/learn/api-compatibility.md +5 -4
  524. package/docs/learn/blocks.md +123 -0
  525. package/docs/learn/composition.md +100 -19
  526. package/docs/learn/forms.md +23 -3
  527. package/docs/learn/framework-wiring.md +41 -13
  528. package/docs/learn/i18n.md +4 -2
  529. package/docs/learn/installation.md +60 -31
  530. package/docs/learn/migration.md +156 -5
  531. package/docs/learn/provider-and-scoping.md +37 -25
  532. package/docs/learn/reference-workflows.md +43 -0
  533. package/docs/learn/structure-and-spacing.md +147 -0
  534. package/docs/learn/theming.md +174 -131
  535. package/docs/learn/troubleshooting.md +88 -30
  536. package/docs/learn/verification.md +60 -5
  537. package/package.json +42 -473
  538. package/scripts/consumer/codemod.mjs +50 -32
  539. package/scripts/consumer/contract-reader.mjs +42 -0
  540. package/scripts/consumer/css-scan.mjs +51 -0
  541. package/scripts/consumer/diagnose.mjs +136 -0
  542. package/scripts/consumer/find-component.mjs +30 -17
  543. package/scripts/consumer/install-skill.mjs +93 -11
  544. package/src/styles/TOKENS.md +116 -275
  545. package/dist/accordion-6YPJ9XRO.js +0 -135
  546. package/dist/admin/patterns/access.css +0 -15
  547. package/dist/admin/patterns/commerce.css +0 -29
  548. package/dist/admin/patterns/commerce.js +0 -2493
  549. package/dist/avatar-CS7zow2q.js +0 -85
  550. package/dist/badge-CxOuTfVr.js +0 -63
  551. package/dist/base/accordion.css +0 -3
  552. package/dist/base/action-menu.css +0 -6
  553. package/dist/base/alert-dialog.css +0 -4
  554. package/dist/base/aspect-ratio.css +0 -2
  555. package/dist/base/avatar.css +0 -4
  556. package/dist/base/badge.css +0 -2
  557. package/dist/base/batch-action-bar.css +0 -5
  558. package/dist/base/buttons.css +0 -4
  559. package/dist/base/cards.css +0 -13
  560. package/dist/base/carousel.css +0 -5
  561. package/dist/base/chart.css +0 -2
  562. package/dist/base/choice-inputs.css +0 -10
  563. package/dist/base/combobox.css +0 -3
  564. package/dist/base/command.css +0 -9
  565. package/dist/base/context-menu.css +0 -2
  566. package/dist/base/copyable.css +0 -6
  567. package/dist/base/date-pickers.css +0 -11
  568. package/dist/base/dialog.css +0 -4
  569. package/dist/base/display.css +0 -8
  570. package/dist/base/dropdown-menu.css +0 -2
  571. package/dist/base/feedback.css +0 -5
  572. package/dist/base/forms-numeric.css +0 -12
  573. package/dist/base/forms.css +0 -14
  574. package/dist/base/hover-card.css +0 -2
  575. package/dist/base/input-group.css +0 -6
  576. package/dist/base/item.css +0 -9
  577. package/dist/base/label.css +0 -3
  578. package/dist/base/menubar.css +0 -2
  579. package/dist/base/navigation-menu.css +0 -2
  580. package/dist/base/navigation.css +0 -12
  581. package/dist/base/otp-input.css +0 -9
  582. package/dist/base/overlay.css +0 -4
  583. package/dist/base/popover-menu.css +0 -11
  584. package/dist/base/popover.css +0 -3
  585. package/dist/base/qr-code.css +0 -2
  586. package/dist/base/repeaters.css +0 -18
  587. package/dist/base/resizable.css +0 -2
  588. package/dist/base/sheet.css +0 -4
  589. package/dist/base/sidebar.css +0 -12
  590. package/dist/base/skeleton.css +0 -9
  591. package/dist/base/spinner.css +0 -2
  592. package/dist/base/structure.css +0 -2
  593. package/dist/base/table.css +0 -3
  594. package/dist/base/text-inputs.css +0 -2
  595. package/dist/base/timeline.css +0 -9
  596. package/dist/base/toaster.css +0 -2
  597. package/dist/base/toggle.css +0 -2
  598. package/dist/base/toolbar.css +0 -5
  599. package/dist/base/tooltip.css +0 -2
  600. package/dist/base/typography.css +0 -2
  601. package/dist/base/upload.css +0 -10
  602. package/dist/base/value-inputs.css +0 -14
  603. package/dist/buttons-CqXKWty3.js +0 -179
  604. package/dist/cards-C6Ulbkw7.js +0 -271
  605. package/dist/chart-nomhJ87z.js +0 -193
  606. package/dist/choice-inputs-OUDn0kQw.js +0 -680
  607. package/dist/combobox-C8oP92bT.js +0 -266
  608. package/dist/command-Bp3B6pUu.js +0 -143
  609. package/dist/comments-CAnDlyXO.js +0 -1438
  610. package/dist/components/admin/patterns/index.d.ts +0 -2
  611. package/dist/components/features/rich-text-editor/exec-command-engine.d.ts +0 -2
  612. package/dist/components/patterns/index.d.ts +0 -3
  613. package/dist/css/styles.css +0 -1
  614. package/dist/date-pickers-DOwIT-Nk.js +0 -661
  615. package/dist/display-B3Q17h5z.js +0 -645
  616. package/dist/dropdown-menu-TyNLCLML.js +0 -223
  617. package/dist/features/actions.css +0 -11
  618. package/dist/features/activities.css +0 -25
  619. package/dist/features/ai-chat.css +0 -14
  620. package/dist/features/async-preview.css +0 -10
  621. package/dist/features/combobox.css +0 -12
  622. package/dist/features/comments.css +0 -24
  623. package/dist/features/data-view.css +0 -31
  624. package/dist/features/event-calendar.css +0 -17
  625. package/dist/features/filters.css +0 -24
  626. package/dist/features/global-search.css +0 -19
  627. package/dist/features/kanban.css +0 -7
  628. package/dist/features/map.css +0 -15
  629. package/dist/features/media-library.css +0 -27
  630. package/dist/features/mentions.css +0 -17
  631. package/dist/features/overlays.css +0 -11
  632. package/dist/features/products.css +0 -29
  633. package/dist/features/resource-assignment.css +0 -14
  634. package/dist/features/resource.css +0 -15
  635. package/dist/features/rich-text-editor.css +0 -8
  636. package/dist/features/schema-form.css +0 -22
  637. package/dist/features/sync.css +0 -11
  638. package/dist/features/table.css +0 -20
  639. package/dist/features/theme-tweaker.css +0 -27
  640. package/dist/feedback-DRerHGuV.js +0 -469
  641. package/dist/forms-CPrGGif_.js +0 -242
  642. package/dist/forms-numeric-CPVsL7Vf.js +0 -569
  643. package/dist/index.css +0 -3
  644. package/dist/input-group-BYe0rhoB.js +0 -126
  645. package/dist/item-B3yQ26as.js +0 -146
  646. package/dist/layout/app-shell.css +0 -13
  647. package/dist/layout/auth.css +0 -14
  648. package/dist/layout/containers.css +0 -2
  649. package/dist/layout/header.css +0 -20
  650. package/dist/layout/navigation.css +0 -11
  651. package/dist/layout/page.css +0 -15
  652. package/dist/layout/settings.css +0 -16
  653. package/dist/layout/sidebar.css +0 -16
  654. package/dist/layout/workspace.css +0 -15
  655. package/dist/navigation-CsqTA16F.js +0 -614
  656. package/dist/navigation-DzxzPuwg.js +0 -202
  657. package/dist/overlay-WQOsLd69.js +0 -345
  658. package/dist/patterns/analytics.css +0 -15
  659. package/dist/patterns/onboarding.css +0 -11
  660. package/dist/patterns/timelines.css +0 -11
  661. package/dist/popover-DriLnIFc.js +0 -123
  662. package/dist/popover-menu-C2UCMAe7.js +0 -189
  663. package/dist/primitives.css +0 -3
  664. package/dist/repeaters-DuP1N0nw.js +0 -438
  665. package/dist/rich-text-editor-BQXFe9oN.js +0 -595
  666. package/dist/sidebar-D0N6ckJL.js +0 -412
  667. package/dist/skeleton-DGR9df28.js +0 -172
  668. package/dist/spinner-CUAVFecI.js +0 -52
  669. package/dist/styles/FACTORS.md +0 -36
  670. package/dist/styles/SCOPES.md +0 -86
  671. package/dist/styles/themes/default.css +0 -164
  672. package/dist/styles/theming/animation.css +0 -143
  673. package/dist/styles/theming/colors.css +0 -97
  674. package/dist/styles/theming/feedback.css +0 -17
  675. package/dist/styles/theming/field.css +0 -21
  676. package/dist/styles/theming/focus.css +0 -88
  677. package/dist/styles/theming/layers.css +0 -13
  678. package/dist/styles/theming/layout.css +0 -21
  679. package/dist/styles/theming/motion.css +0 -42
  680. package/dist/styles/theming/overlay.css +0 -52
  681. package/dist/styles/theming/sizing.css +0 -118
  682. package/dist/styles/theming/text.css +0 -30
  683. package/dist/styles/theming/typography.css +0 -26
  684. package/dist/styles/tokens/components.css +0 -22
  685. package/dist/styles/tokens/foundation.css +0 -80
  686. package/dist/styles/tokens/layout.css +0 -19
  687. package/dist/styles/tokens/palette.css +0 -88
  688. package/dist/styles/tokens/primitives.css +0 -18
  689. package/dist/styles/tokens/states.css +0 -77
  690. package/dist/table-BC4qqsUb.js +0 -180
  691. package/dist/table-BHDpjajL.js +0 -982
  692. package/dist/text-inputs-DF_lD7pA.js +0 -385
  693. package/dist/theming-D6KRU7hO.js +0 -104
  694. package/dist/toolbar-DWRywF0R.js +0 -68
  695. package/dist/tooltip-t1VQQ2tZ.js +0 -73
  696. package/dist/upload-B38YZeFJ.js +0 -938
  697. package/dist/value-inputs-Q4ymjXlV.js +0 -716
  698. package/src/styles/FACTORS.md +0 -36
  699. package/src/styles/SCOPES.md +0 -86
  700. /package/dist/components/{admin/patterns → blocks/admin}/access/admin.strings.d.ts +0 -0
  701. /package/dist/components/{admin/patterns → blocks/admin}/access/credential-list.d.ts +0 -0
  702. /package/dist/components/{admin/patterns → blocks/admin}/access/index.d.ts +0 -0
  703. /package/dist/components/{admin/patterns → blocks/admin}/access/role-permissions.d.ts +0 -0
  704. /package/dist/components/{admin/patterns → blocks/admin}/access/sensitive-action.d.ts +0 -0
  705. /package/dist/components/{admin/patterns → blocks/admin}/commerce/account.d.ts +0 -0
  706. /package/dist/components/{admin/patterns → blocks/admin}/commerce/address-lines.d.ts +0 -0
  707. /package/dist/components/{admin/patterns → blocks/admin}/commerce/booking.d.ts +0 -0
  708. /package/dist/components/{admin/patterns → blocks/admin}/commerce/cart.d.ts +0 -0
  709. /package/dist/components/{admin/patterns → blocks/admin}/commerce/commerce.strings.d.ts +0 -0
  710. /package/dist/components/{admin/patterns → blocks/admin}/commerce/commerce.types.d.ts +0 -0
  711. /package/dist/components/{admin/patterns → blocks/admin}/commerce/format-amount.d.ts +0 -0
  712. /package/dist/components/{admin/patterns → blocks/admin}/commerce/index.d.ts +0 -0
  713. /package/dist/components/{admin/patterns → blocks/admin}/commerce/inventory-section.d.ts +0 -0
  714. /package/dist/components/{admin/patterns → blocks/admin}/commerce/invoice.d.ts +0 -0
  715. /package/dist/components/{admin/patterns → blocks/admin}/commerce/loyalty.d.ts +0 -0
  716. /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-customer.d.ts +0 -0
  717. /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-detail.d.ts +0 -0
  718. /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-line-item.d.ts +0 -0
  719. /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-transactions.d.ts +0 -0
  720. /package/dist/components/{admin/patterns → blocks/admin}/commerce/order.d.ts +0 -0
  721. /package/dist/components/{admin/patterns → blocks/admin}/commerce/seo-listing.d.ts +0 -0
  722. /package/dist/components/{admin/patterns → blocks/admin}/commerce/seo-score.d.ts +0 -0
  723. /package/dist/components/{admin/patterns → blocks/admin}/commerce/summary-panel.d.ts +0 -0
  724. /package/dist/components/{patterns → blocks}/analytics/activity-heatmap.d.ts +0 -0
  725. /package/dist/components/{patterns → blocks}/analytics/analytics.types.d.ts +0 -0
  726. /package/dist/components/{patterns → blocks}/analytics/chart-card.d.ts +0 -0
  727. /package/dist/components/{patterns → blocks}/analytics/format-metric-value.d.ts +0 -0
  728. /package/dist/components/{patterns → blocks}/analytics/index.d.ts +0 -0
  729. /package/dist/components/{patterns → blocks}/analytics/metric-bar.d.ts +0 -0
  730. /package/dist/components/{patterns → blocks}/analytics/metric-comparison.d.ts +0 -0
  731. /package/dist/components/{patterns → blocks}/analytics/metric-gradient.d.ts +0 -0
  732. /package/dist/components/{patterns → blocks}/analytics/metric-grid.d.ts +0 -0
  733. /package/dist/components/{patterns → blocks}/analytics/metric-micro-grid.d.ts +0 -0
  734. /package/dist/components/{patterns → blocks}/analytics/metric-skeleton.d.ts +0 -0
  735. /package/dist/components/{patterns → blocks}/analytics/metric-trend-chip.d.ts +0 -0
  736. /package/dist/components/{patterns → blocks}/analytics/metric.d.ts +0 -0
  737. /package/dist/components/{patterns → blocks}/analytics/time-ruler.d.ts +0 -0
  738. /package/dist/components/{patterns → blocks}/onboarding/checklist.d.ts +0 -0
  739. /package/dist/components/{patterns → blocks}/onboarding/index.d.ts +0 -0
  740. /package/dist/components/{patterns → blocks}/onboarding/onboarding.strings.d.ts +0 -0
  741. /package/dist/components/{patterns → blocks}/timelines/changelog-timeline.d.ts +0 -0
  742. /package/dist/components/{patterns → blocks}/timelines/index.d.ts +0 -0
  743. /package/dist/components/{patterns → blocks}/timelines/milestones-timeline.d.ts +0 -0
  744. /package/dist/components/{patterns → blocks}/timelines/steps.d.ts +0 -0
  745. /package/dist/components/{patterns → blocks}/timelines/timelines.strings.d.ts +0 -0
  746. /package/dist/styles/{theming/breakpoints.css → breakpoints.css} +0 -0
@@ -1,37 +1,39 @@
1
1
  "use client";
2
- import { t as e } from "../cx--CBrhWH0.js";
3
- import { i as t, o as n } from "../typography-BkxEiwQ1.js";
4
- import { p as r, s as i } from "../feedback-DRerHGuV.js";
5
- import { c as a } from "../buttons-CqXKWty3.js";
6
- import { n as o } from "../action-menu-BNLURfMK.js";
7
- import { d as s, l as c, n as l, v as u } from "../display-B3Q17h5z.js";
8
- import { o as d } from "../structure-D0WGQAP3.js";
9
- import { T as f, U as p } from "../primitives-D0bdDozz.js";
10
- import { t as m } from "../badge-CxOuTfVr.js";
11
- import { c as h, i as g, n as _, o as v, r as y, t as b, u as x } from "../item-B3yQ26as.js";
12
- import { y as S } from "../upload-B38YZeFJ.js";
13
- import { u as C } from "../forms-CPrGGif_.js";
14
- import { t as ee } from "../strings-Co9_qArR.js";
15
- import { c as w, l as T } from "../text-inputs-DF_lD7pA.js";
16
- import { c as E, i as D, l as O, n as k, s as A, t as j } from "../table-BC4qqsUb.js";
17
- import { n as M, s as N, x as P } from "../choice-inputs-OUDn0kQw.js";
18
- import { t as F } from "../batch-action-bar-BZYNKXdV.js";
19
- import { s as I } from "../repeaters-DuP1N0nw.js";
20
- import { i as te, t as ne } from "../overlays-DvVoS3td.js";
21
- import { t as re } from "../use-synced-state-DnZ4lW4g.js";
22
- import { C as ie } from "../table-BHDpjajL.js";
23
- import { ArrowLeftIcon as ae, BoxesIcon as L, ChevronDownIcon as R, ChevronRightIcon as z, ClipboardCheckIcon as oe, CopyIcon as se, EyeIcon as B, FileTextIcon as ce, ImagePlusIcon as V, LayersIcon as le, ListChecksIcon as ue, PencilIcon as H, PlusIcon as U, ReceiptIcon as W, RotateCcwIcon as G, SaveIcon as de, SettingsIcon as fe, ShieldCheckIcon as pe, SparklesIcon as me, Trash2Icon as K, XIcon as he } from "lucide-react";
24
- import { Fragment as ge, useId as _e, useMemo as ve, useState as q } from "react";
25
- import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
2
+ import "#core.css";
3
+ import { a as e, c as t, s as n } from "../typography-DmeR05Er.js";
4
+ import { t as r } from "../cx--CBrhWH0.js";
5
+ import { c as i } from "../buttons-BX2JfL5X.js";
6
+ import { n as a } from "../action-menu-BwiL_F6I.js";
7
+ import { o } from "../structure-CynEZ-OY.js";
8
+ import { t as s } from "../strings-Co9_qArR.js";
9
+ import { T as c, U as l } from "../primitives-BskKlf35.js";
10
+ import { t as u } from "../badge-VlJVZjdm.js";
11
+ import { t as d } from "../batch-action-bar-DZVMVW83.js";
12
+ import { p as f, s as p } from "../feedback-D4qVsKlD.js";
13
+ import { d as m, l as h, n as g, v as _ } from "../display-a7AoX_u7.js";
14
+ import { n as v, s as y, x as b } from "../choice-inputs-NwRxvmZN.js";
15
+ import { c as x, l as S } from "../text-inputs-BboE77nZ.js";
16
+ import { u as C } from "../forms-C0WeNPFF.js";
17
+ import { c as w, i as T, n as E, o as D, r as O, t as k, u as A } from "../item-M2pmpWXh.js";
18
+ import { s as j } from "../repeaters-CeH20dvr.js";
19
+ import { y as M } from "../upload-CYuoJykZ.js";
20
+ import { c as N, i as P, l as F, n as ee, s as I, t as te } from "../table-Ds_eO9av.js";
21
+ import { i as ne, t as re } from "../overlays-1sULyytH.js";
22
+ import { t as ie } from "../use-synced-state-DnZ4lW4g.js";
23
+ import { C as ae } from "../table-B7dtIFUx.js";
24
+ import { ArrowLeftIcon as L, BoxesIcon as R, ChevronDownIcon as oe, ChevronRightIcon as se, ClipboardCheckIcon as ce, CopyIcon as z, EyeIcon as le, FileTextIcon as B, ImagePlusIcon as ue, LayersIcon as de, ListChecksIcon as V, PencilIcon as H, PlusIcon as U, ReceiptIcon as W, RotateCcwIcon as fe, SaveIcon as pe, SettingsIcon as me, ShieldCheckIcon as he, SparklesIcon as ge, Trash2Icon as _e, XIcon as ve } from "lucide-react";
25
+ import { Fragment as ye, useId as be, useMemo as xe, useState as G } from "react";
26
+ import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
27
+ import "#css/products.css";
26
28
  //#region src/components/features/products/product-tone.ts
27
- var ye = {
29
+ var Se = {
28
30
  neutral: "neutral",
29
31
  primary: "primary",
30
32
  success: "success",
31
33
  warning: "warning",
32
34
  destructive: "destructive",
33
35
  info: "info"
34
- }, be = {
36
+ }, Ce = {
35
37
  title: "Readiness",
36
38
  description: "What is still needed before this can go live.",
37
39
  scoreLabel: "Complete",
@@ -43,7 +45,7 @@ var ye = {
43
45
  actionsLabel: "Check actions",
44
46
  emptyTitle: "Nothing outstanding",
45
47
  emptyDescription: "Every readiness check has passed."
46
- }, xe = {
48
+ }, we = {
47
49
  title: "Structure",
48
50
  description: "How this product is put together.",
49
51
  createLabel: "Add a metric",
@@ -52,7 +54,7 @@ var ye = {
52
54
  actionsLabel: "Metric actions",
53
55
  emptyTitle: "No metrics yet",
54
56
  emptyDescription: "Add one to summarise how this product is structured."
55
- }, Se = {
57
+ }, Te = {
56
58
  title: "Operations",
57
59
  description: "How this product is delivered and supported.",
58
60
  createLabel: "Add an entry",
@@ -62,13 +64,13 @@ var ye = {
62
64
  actionsLabel: "Entry actions",
63
65
  emptyTitle: "Nothing configured",
64
66
  emptyDescription: "Add an operational detail to show it here."
65
- }, Ce = {
67
+ }, Ee = {
66
68
  title: "Details",
67
69
  description: "The facts that identify this product.",
68
70
  editLabel: "Edit details",
69
71
  emptyTitle: "No details yet",
70
72
  emptyDescription: "Add the facts that identify this product."
71
- }, we = {
73
+ }, De = {
72
74
  title: "Contract",
73
75
  description: "The commercial terms this product is sold under.",
74
76
  termsTitle: "Terms",
@@ -81,7 +83,7 @@ var ye = {
81
83
  ruleActionsLabel: "Rule actions",
82
84
  emptyTitle: "No rules yet",
83
85
  emptyDescription: "Add a rule to govern how this product is sold."
84
- }, Te = {
86
+ }, Oe = {
85
87
  title: "Policies",
86
88
  description: "Cancellation, refunds, and everything else the customer agrees to.",
87
89
  createLabel: "Add a policy",
@@ -90,7 +92,7 @@ var ye = {
90
92
  actionsLabel: "Policy actions",
91
93
  emptyTitle: "No policies yet",
92
94
  emptyDescription: "Add one to say what the customer is agreeing to."
93
- }, Ee = {
95
+ }, ke = {
94
96
  title: "Options",
95
97
  description: "What a customer chooses between.",
96
98
  manageLabel: "Manage options",
@@ -101,7 +103,7 @@ var ye = {
101
103
  actionsLabel: "Option actions",
102
104
  emptyTitle: "No options yet",
103
105
  emptyDescription: "Add one — size, colour, duration — to generate variants from it."
104
- }, De = {
106
+ }, Ae = {
105
107
  title: "Options and values",
106
108
  description: "Each option's values combine into the variants below.",
107
109
  createLabel: "Add an option",
@@ -126,13 +128,13 @@ var ye = {
126
128
  confirmDeleteCancel: "Keep it",
127
129
  emptyTitle: "No options yet",
128
130
  emptyDescription: "Add one — size, colour, duration — to generate variants from it."
129
- }, Oe = {
131
+ }, je = {
130
132
  menuLabel: "Variant actions",
131
133
  openLabel: "Open",
132
134
  editLabel: "Edit",
133
135
  duplicateLabel: "Duplicate",
134
136
  deleteLabel: "Delete"
135
- }, ke = {
137
+ }, Me = {
136
138
  title: "Variants",
137
139
  description: "Every combination this product is sold as.",
138
140
  createLabel: "Add a variant",
@@ -148,8 +150,8 @@ var ye = {
148
150
  },
149
151
  emptyTitle: "No variants yet",
150
152
  emptyDescription: "Add an option above, then generate the variants from it."
151
- }, Ae = {
152
- ...ke,
153
+ }, Ne = {
154
+ ...Me,
153
155
  generateLabel: "Generate variants",
154
156
  selectAllLabel: "Select every variant",
155
157
  selectRowLabel: (e) => `Select ${e}`,
@@ -164,25 +166,25 @@ var ye = {
164
166
  expandGroup: "Show these variants",
165
167
  collapseGroup: "Hide these variants",
166
168
  setImageLabel: (e) => `Choose a picture for ${e}`
167
- }, je = {
169
+ }, Pe = {
168
170
  title: "Variants",
169
171
  groupByLabel: "Group by",
170
172
  groupByNone: "Nothing"
171
- }, Me = {
173
+ }, Fe = {
172
174
  title: "Overview",
173
175
  description: "How this product is doing."
174
- }, Ne = {
176
+ }, Ie = {
175
177
  title: "Quote preview",
176
178
  description: "What a customer sees before they book.",
177
179
  recalculateLabel: "Recalculate",
178
180
  emptyTitle: "Nothing to price yet",
179
181
  emptyDescription: "Add a rate or a policy to see the quote build up."
180
- }, Pe = "—", Fe = {
182
+ }, Le = "—", Re = {
181
183
  viewLabel: "Open option",
182
184
  editLabel: "Edit option",
183
185
  deleteLabel: "Delete option",
184
186
  actionsLabel: "Option actions"
185
- }, Ie = {
187
+ }, ze = {
186
188
  title: "Variant",
187
189
  description: "Options, pricing, and fulfilment for one sellable variant.",
188
190
  backLabel: "Back",
@@ -199,7 +201,7 @@ var ye = {
199
201
  channels: "Channels",
200
202
  updated: "Updated"
201
203
  }
202
- }, Le = {
204
+ }, Be = {
203
205
  title: "Edit variant",
204
206
  description: "Identity, pricing, inventory, and the option values this variant stands for.",
205
207
  identityTitle: "Identity",
@@ -229,13 +231,11 @@ var ye = {
229
231
  status: "Active",
230
232
  channels: "Online store, POS"
231
233
  }
232
- }, Z = {
234
+ }, Y = {
233
235
  card: "products__card___Fq32o",
234
236
  dot: "products__dot___P862v",
235
- rowMedia: "products__rowMedia___yeoOC",
236
- metricValue: "products__metricValue___8ccmN",
237
- quoteValue: "products__quoteValue___A9bDU",
238
237
  row: "products__row___R-owj",
238
+ rowMedia: "products__rowMedia___yeoOC",
239
239
  rowContent: "products__rowContent___byFAL",
240
240
  rowTrailing: "products__rowTrailing___5UOjV",
241
241
  rowChevron: "products__rowChevron___-iLRs",
@@ -243,11 +243,12 @@ var ye = {
243
243
  rowActions: "products__rowActions___Jvn8j",
244
244
  score: "products__score___yo1iz",
245
245
  scoreHead: "products__scoreHead___q2QBx",
246
- numeric: "products__numeric___IO4KP",
246
+ metricValue: "products__metricValue___8ccmN",
247
247
  section: "products__section___kvUJr",
248
248
  sectionHead: "products__sectionHead___EsSd6",
249
249
  media: "products__media___0_ZxS",
250
250
  empty: "products__empty___1bPpK",
251
+ quoteValue: "products__quoteValue___A9bDU",
251
252
  quoteTotal: "products__quoteTotal___gol6U",
252
253
  quoteTotalRow: "products__quoteTotalRow___RpU_B",
253
254
  matrix: "products__matrix___5exBf",
@@ -287,144 +288,146 @@ var ye = {
287
288
  };
288
289
  //#endregion
289
290
  //#region src/components/features/products/product-parts.tsx
290
- function Re(e, t) {
291
+ function Ve(e, t) {
291
292
  let n = (e) => typeof e == "string" || typeof e == "number" ? String(e) : "", r = n(e), i = n(t);
292
293
  if (!(!r && !i)) return r && i ? `${r}: ${i}` : r || i;
293
294
  }
294
- function ze({ tone: t = "neutral" }) {
295
- return /* @__PURE__ */ Y("span", {
295
+ function He({ tone: e = "neutral" }) {
296
+ return /* @__PURE__ */ q("span", {
296
297
  "aria-hidden": !0,
297
- "data-tone": t,
298
- className: e("product-tone-dot--component", Z.dot)
298
+ "data-tone": e,
299
+ className: r("product-tone-dot--component", Y.dot)
299
300
  });
300
301
  }
301
- function Be({ src: t, alt: n, media: r, onSelect: i, label: a, className: o }) {
302
- let s = r ?? (t ? /* @__PURE__ */ Y(S, {
303
- src: t,
304
- alt: n,
305
- fallback: /* @__PURE__ */ Y(V, { "aria-hidden": !0 }),
306
- className: Z.thumbImage
307
- }) : /* @__PURE__ */ Y(V, { "aria-hidden": !0 })), c = !!r || !!t, l = e("product-thumbnail--component", Z.thumb, o);
308
- return i ? /* @__PURE__ */ Y("button", {
302
+ function Ue({ src: e, alt: t, media: n, onSelect: i, label: a, className: o }) {
303
+ let s = n ?? (e ? /* @__PURE__ */ q(M, {
304
+ src: e,
305
+ alt: t,
306
+ fallback: /* @__PURE__ */ q(ue, { "aria-hidden": !0 }),
307
+ className: Y.thumbImage
308
+ }) : /* @__PURE__ */ q(ue, { "aria-hidden": !0 })), c = !!n || !!e, l = r("product-thumbnail--component", Y.thumb, o);
309
+ return i ? /* @__PURE__ */ q("button", {
309
310
  type: "button",
310
311
  "aria-label": a,
311
312
  "data-filled": c || void 0,
312
313
  className: l,
313
314
  onClick: i,
314
315
  children: s
315
- }) : /* @__PURE__ */ Y("span", {
316
- "aria-hidden": !n || void 0,
316
+ }) : /* @__PURE__ */ q("span", {
317
+ "aria-hidden": !t || void 0,
317
318
  "data-filled": c || void 0,
318
319
  className: l,
319
320
  children: s
320
321
  });
321
322
  }
322
- function Q({ title: t, description: n, action: i, className: a }) {
323
- return /* @__PURE__ */ Y(r, {
324
- padding: "md",
323
+ function X({ title: e, description: t, action: n, className: i }) {
324
+ return /* @__PURE__ */ q(f, {
325
325
  border: !0,
326
- title: t,
327
- description: n,
328
- action: i,
329
- className: e("product-empty-state--component", Z.empty, a)
326
+ title: e,
327
+ description: t,
328
+ action: n,
329
+ className: r("product-empty-state--component", Y.empty, i)
330
330
  });
331
331
  }
332
- function Ve({ item: t, actions: n, menuLabel: r, className: i }) {
333
- return n.length === 0 ? null : /* @__PURE__ */ Y("div", {
334
- className: e("product-row-actions--component", Z.rowActions, i),
335
- children: /* @__PURE__ */ Y(ie, {
336
- row: t,
337
- actions: n,
338
- menuLabel: r,
332
+ function We({ item: e, actions: t, menuLabel: n, className: i }) {
333
+ return t.length === 0 ? null : /* @__PURE__ */ q("div", {
334
+ className: r("product-row-actions--component", Y.rowActions, i),
335
+ children: /* @__PURE__ */ q(ae, {
336
+ row: e,
337
+ actions: t,
338
+ menuLabel: n,
339
339
  displayMode: "menu"
340
340
  })
341
341
  });
342
342
  }
343
- function He({ tone: e = "neutral", label: t, description: n, media: r, trailing: i, onSelect: a, selectLabel: o, children: s }) {
343
+ function Ge({ tone: e = "neutral", label: t, description: n, media: r, trailing: i, onSelect: a, selectLabel: o, children: s }) {
344
344
  let c = !!a;
345
- return /* @__PURE__ */ X(b, {
346
- render: c ? /* @__PURE__ */ Y("button", { type: "button" }) : void 0,
345
+ return /* @__PURE__ */ J(k, {
346
+ render: c ? /* @__PURE__ */ q("button", { type: "button" }) : void 0,
347
347
  onClick: a,
348
348
  "aria-label": o,
349
349
  "data-interactive": c || void 0,
350
- className: Z.row,
350
+ className: Y.row,
351
351
  children: [
352
- /* @__PURE__ */ Y(h, {
352
+ /* @__PURE__ */ q(w, {
353
353
  variant: "icon",
354
354
  "data-tone": e,
355
- className: Z.rowMedia,
356
- children: r ?? /* @__PURE__ */ Y(ze, { tone: e })
355
+ className: Y.rowMedia,
356
+ children: r ?? /* @__PURE__ */ q(He, { tone: e })
357
357
  }),
358
- /* @__PURE__ */ X(y, {
359
- className: Z.rowContent,
358
+ /* @__PURE__ */ J(O, {
359
+ className: Y.rowContent,
360
360
  children: [
361
- /* @__PURE__ */ Y(x, { children: t }),
362
- !!n && /* @__PURE__ */ Y(g, { children: n }),
361
+ /* @__PURE__ */ q(A, { children: t }),
362
+ !!n && /* @__PURE__ */ q(T, { children: n }),
363
363
  s
364
364
  ]
365
365
  }),
366
- (!!i || c) && /* @__PURE__ */ X(_, {
367
- className: Z.rowTrailing,
368
- children: [i, c && /* @__PURE__ */ Y(z, {
366
+ (!!i || c) && /* @__PURE__ */ J(E, {
367
+ className: Y.rowTrailing,
368
+ children: [i, c && /* @__PURE__ */ q(se, {
369
369
  "aria-hidden": !0,
370
- className: Z.rowChevron
370
+ className: Y.rowChevron
371
371
  })]
372
372
  })
373
373
  ]
374
374
  });
375
375
  }
376
- function Ue({ metric: t, actions: n }) {
377
- return /* @__PURE__ */ Y(He, {
378
- tone: t.tone ?? "neutral",
379
- label: t.label,
380
- description: t.description,
381
- media: t.icon,
382
- trailing: /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(p, {
376
+ function Ke({ metric: e, actions: n }) {
377
+ return /* @__PURE__ */ q(Ge, {
378
+ tone: e.tone ?? "neutral",
379
+ label: e.label,
380
+ description: e.description,
381
+ media: e.icon,
382
+ trailing: /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(l, {
383
383
  weight: "semibold",
384
- className: e("product-structure-metric-row--component", Z.numeric),
385
- children: t.value
384
+ className: r("product-structure-metric-row--component", t({
385
+ size: "inherit",
386
+ numeric: !0
387
+ })),
388
+ children: e.value
386
389
  }), n] })
387
390
  });
388
391
  }
389
- function We({ item: e, actionFallback: t, onSelect: n, actions: r }) {
392
+ function qe({ item: e, actionFallback: t, onSelect: n, actions: r }) {
390
393
  let i = e.tone ?? (e.completed ? "success" : "neutral"), a = e.onSelect ?? n, o = r ? void 0 : a;
391
- return /* @__PURE__ */ Y(He, {
394
+ return /* @__PURE__ */ q(Ge, {
392
395
  tone: i,
393
396
  label: e.label,
394
397
  description: e.description,
395
398
  onSelect: o,
396
- selectLabel: o ? Re(e.actionLabel ?? t, e.label) : void 0,
397
- trailing: e.value || r ? /* @__PURE__ */ X(J, { children: [!!e.value && /* @__PURE__ */ Y(m, {
398
- tone: ye[i],
399
+ selectLabel: o ? Ve(e.actionLabel ?? t, e.label) : void 0,
400
+ trailing: e.value || r ? /* @__PURE__ */ J(K, { children: [!!e.value && /* @__PURE__ */ q(u, {
401
+ tone: Se[i],
399
402
  children: e.value
400
403
  }), r] }) : void 0
401
404
  });
402
405
  }
403
- function Ge({ item: e, actionFallback: t, onSelect: r, actions: i }) {
406
+ function Je({ item: e, actionFallback: t, onSelect: r, actions: i }) {
404
407
  let a = e.tone ?? "neutral", o = e.onSelect ?? r, s = i ? void 0 : o;
405
- return /* @__PURE__ */ Y(He, {
408
+ return /* @__PURE__ */ q(Ge, {
406
409
  tone: a,
407
410
  label: e.label,
408
411
  description: e.description,
409
412
  onSelect: s,
410
- selectLabel: s ? Re(e.actionLabel ?? t, e.label) : void 0,
411
- trailing: e.value || i ? /* @__PURE__ */ X(J, { children: [!!e.value && /* @__PURE__ */ Y(n, {
413
+ selectLabel: s ? Ve(e.actionLabel ?? t, e.label) : void 0,
414
+ trailing: e.value || i ? /* @__PURE__ */ J(K, { children: [!!e.value && /* @__PURE__ */ q(n, {
412
415
  tag: "span",
413
416
  weight: "semibold",
414
417
  children: e.value
415
418
  }), i] }) : void 0
416
419
  });
417
420
  }
418
- function Ke({ item: e, actionLabel: t, onSelect: r, actions: i }) {
421
+ function Ye({ item: e, actionLabel: t, onSelect: r, actions: i }) {
419
422
  let a = e.tone ?? "neutral", o = "values" in e ? e.values : void 0, s = i ? void 0 : r;
420
- return /* @__PURE__ */ Y(He, {
423
+ return /* @__PURE__ */ q(Ge, {
421
424
  tone: a,
422
425
  label: e.label,
423
426
  description: e.description,
424
427
  onSelect: s,
425
- selectLabel: s ? Re(t, e.label) : void 0,
426
- trailing: e.value || e.badge || i ? /* @__PURE__ */ X(J, { children: [
427
- !!e.value && /* @__PURE__ */ Y(n, {
428
+ selectLabel: s ? Ve(t, e.label) : void 0,
429
+ trailing: e.value || e.badge || i ? /* @__PURE__ */ J(K, { children: [
430
+ !!e.value && /* @__PURE__ */ q(n, {
428
431
  tag: "span",
429
432
  weight: "semibold",
430
433
  children: e.value
@@ -432,62 +435,62 @@ function Ke({ item: e, actionLabel: t, onSelect: r, actions: i }) {
432
435
  e.badge,
433
436
  i
434
437
  ] }) : void 0,
435
- children: !!o?.length && /* @__PURE__ */ Y("div", {
436
- className: Z.rowValues,
437
- children: o.map((e, t) => /* @__PURE__ */ Y(m, {
438
+ children: !!o?.length && /* @__PURE__ */ q("div", {
439
+ className: Y.rowValues,
440
+ children: o.map((e, t) => /* @__PURE__ */ q(u, {
438
441
  tone: "neutral",
439
442
  children: e
440
443
  }, t))
441
444
  })
442
445
  });
443
446
  }
444
- function qe({ option: t, index: n = 0, onSelectOption: r, onEditOption: i, onDeleteOption: a, renderOptionActions: o, menuLabel: s, className: c, strings: l }) {
447
+ function Xe({ option: e, index: t = 0, onSelectOption: n, onEditOption: i, onDeleteOption: a, renderOptionActions: o, menuLabel: s, className: c, strings: l }) {
445
448
  let u = {
446
- ...Fe,
449
+ ...Re,
447
450
  ...l
448
- }, d = r ? () => r(t) : void 0, f = i ? () => i(t) : void 0, p = a ? () => a(t) : void 0;
449
- return o ? /* @__PURE__ */ Y("div", {
450
- className: e("product-option-action-menu--component", Z.rowActions, c),
451
- children: o(t, {
452
- index: n,
451
+ }, d = n ? () => n(e) : void 0, f = i ? () => i(e) : void 0, p = a ? () => a(e) : void 0;
452
+ return o ? /* @__PURE__ */ q("div", {
453
+ className: r("product-option-action-menu--component", Y.rowActions, c),
454
+ children: o(e, {
455
+ index: t,
453
456
  onSelect: d,
454
457
  onEdit: f,
455
458
  onDelete: p
456
459
  })
457
- }) : /* @__PURE__ */ Y(Ve, {
458
- item: t,
460
+ }) : /* @__PURE__ */ q(We, {
461
+ item: e,
459
462
  menuLabel: s ?? u.actionsLabel,
460
- className: e("product-option-action-menu--component", c),
463
+ className: r("product-option-action-menu--component", c),
461
464
  actions: [
462
465
  ...d ? [{
463
466
  id: "open",
464
467
  label: u.viewLabel,
465
- icon: /* @__PURE__ */ Y(B, {}),
468
+ icon: /* @__PURE__ */ q(le, {}),
466
469
  onClick: d
467
470
  }] : [],
468
471
  ...f ? [{
469
472
  id: "edit",
470
473
  label: u.editLabel,
471
- icon: /* @__PURE__ */ Y(H, {}),
474
+ icon: /* @__PURE__ */ q(H, {}),
472
475
  onClick: f
473
476
  }] : [],
474
477
  ...p ? [{
475
478
  id: "delete",
476
479
  label: u.deleteLabel,
477
- icon: /* @__PURE__ */ Y(K, {}),
480
+ icon: /* @__PURE__ */ q(_e, {}),
478
481
  tone: "destructive",
479
482
  onClick: p
480
483
  }] : []
481
484
  ]
482
485
  });
483
486
  }
484
- function Je({ label: r, weight: i, className: a, children: o }) {
485
- return /* @__PURE__ */ X("div", {
486
- className: e("product-variant-cell--component", Z.variantPair, a),
487
- children: [/* @__PURE__ */ Y(t, {
488
- className: Z.variantPairLabel,
489
- children: r
490
- }), /* @__PURE__ */ Y(n, {
487
+ function Ze({ label: t, weight: i, className: a, children: o }) {
488
+ return /* @__PURE__ */ J("div", {
489
+ className: r("product-variant-cell--component", Y.variantPair, a),
490
+ children: [/* @__PURE__ */ q(e, {
491
+ className: Y.variantPairLabel,
492
+ children: t
493
+ }), /* @__PURE__ */ q(n, {
491
494
  weight: i,
492
495
  truncate: !0,
493
496
  children: o
@@ -496,551 +499,556 @@ function Je({ label: r, weight: i, className: a, children: o }) {
496
499
  }
497
500
  //#endregion
498
501
  //#region src/components/features/products/product-percent.ts
499
- function Ye(e) {
502
+ function Qe(e) {
500
503
  return Number.isFinite(e) ? Math.min(100, Math.max(0, Math.round(e))) : 0;
501
504
  }
502
505
  //#endregion
503
506
  //#region src/components/features/products/product-cards.tsx
504
- function Xe(e, t, n, r) {
507
+ function Z(e, t, n, r) {
505
508
  return [...n ? [{
506
509
  id: "edit",
507
510
  label: e,
508
- icon: /* @__PURE__ */ Y(H, {}),
511
+ icon: /* @__PURE__ */ q(H, {}),
509
512
  onClick: n
510
513
  }] : [], ...r ? [{
511
514
  id: "delete",
512
515
  label: t,
513
- icon: /* @__PURE__ */ Y(K, {}),
516
+ icon: /* @__PURE__ */ q(_e, {}),
514
517
  tone: "destructive",
515
518
  onClick: r
516
519
  }] : []];
517
520
  }
518
- function Ze(e, t, n, r) {
521
+ function Q(e, t, n, r) {
519
522
  if (e) return e;
520
- if (n.length !== 0) return /* @__PURE__ */ Y(Ve, {
523
+ if (n.length !== 0) return /* @__PURE__ */ q(We, {
521
524
  item: t,
522
525
  actions: n,
523
526
  menuLabel: r
524
527
  });
525
528
  }
526
- function Qe(e) {
529
+ var $e = t({
530
+ size: "inherit",
531
+ numeric: !0
532
+ });
533
+ function et(e) {
527
534
  return e.map((e) => ({
528
535
  id: e.id,
529
536
  label: e.label,
530
537
  description: e.description,
531
- render: () => /* @__PURE__ */ Y(p, {
538
+ render: () => /* @__PURE__ */ q(l, {
532
539
  weight: "semibold",
540
+ type: "inherit",
533
541
  "data-tone": e.tone ?? "neutral",
534
- className: Z.metricValue,
542
+ className: r(Y.metricValue, $e),
535
543
  children: e.value
536
544
  })
537
545
  }));
538
546
  }
539
- function $e(e, t, n, r) {
540
- if (!(!t && !n?.length && !r)) return /* @__PURE__ */ X(J, { children: [
547
+ function tt(e, t, n, r) {
548
+ if (!(!t && !n?.length && !r)) return /* @__PURE__ */ J(K, { children: [
541
549
  r,
542
- !!t && /* @__PURE__ */ X(a, {
550
+ !!t && /* @__PURE__ */ J(i, {
543
551
  type: "button",
544
552
  tone: "neutral",
545
- buttonStyle: "ghost",
553
+ appearance: "ghost",
546
554
  onClick: t,
547
- children: [/* @__PURE__ */ Y(U, {}), e]
555
+ children: [/* @__PURE__ */ q(U, {}), e]
548
556
  }),
549
- !!n?.length && /* @__PURE__ */ Y(o, { actions: n })
557
+ !!n?.length && /* @__PURE__ */ q(a, { actions: n })
550
558
  ] });
551
559
  }
552
- function et({ items: t = [], score: r, scoreLabel: o, summary: s, onCreateReadinessItem: l, onSelectReadinessItem: u, onEditReadinessItem: d, onDeleteReadinessItem: p, renderReadinessItemActions: m, actions: h, footerSlot: g, renderItem: _, empty: y, className: b, strings: x }) {
553
- let S = {
554
- ...be,
555
- ...x
556
- }, C = r === void 0 ? void 0 : Ye(r);
557
- return /* @__PURE__ */ X(c, {
560
+ function nt({ items: e = [], score: t, scoreLabel: a, summary: o, onCreateReadinessItem: s, onSelectReadinessItem: l, onEditReadinessItem: u, onDeleteReadinessItem: d, renderReadinessItemActions: f, actions: m, footerSlot: g, renderItem: _, empty: v, className: y, strings: b }) {
561
+ let x = {
562
+ ...Ce,
563
+ ...b
564
+ }, S = t === void 0 ? void 0 : Qe(t);
565
+ return /* @__PURE__ */ J(h, {
558
566
  surface: "bordered",
559
- icon: /* @__PURE__ */ Y(oe, {}),
560
- title: S.title,
561
- description: S.description,
562
- headerEnd: $e(S.createLabel, l, h),
563
- className: e("product-readiness-card--component", Z.card, b),
567
+ icon: /* @__PURE__ */ q(ce, {}),
568
+ title: x.title,
569
+ description: x.description,
570
+ headerEnd: tt(x.createLabel, s, m),
571
+ className: r("product-readiness-card--component", Y.card, y),
564
572
  children: [
565
- C !== void 0 && /* @__PURE__ */ X("div", {
566
- className: Z.score,
567
- children: [/* @__PURE__ */ X("div", {
568
- className: Z.scoreHead,
569
- children: [/* @__PURE__ */ Y(n, {
573
+ S !== void 0 && /* @__PURE__ */ J("div", {
574
+ className: Y.score,
575
+ children: [/* @__PURE__ */ J("div", {
576
+ className: Y.scoreHead,
577
+ children: [/* @__PURE__ */ q(n, {
570
578
  size: "xs",
571
579
  type: "secondary",
572
- children: o ?? S.scoreLabel
573
- }), /* @__PURE__ */ Y(f, {
574
- value: C,
580
+ children: a ?? x.scoreLabel
581
+ }), /* @__PURE__ */ q(c, {
582
+ value: S,
575
583
  scaled: !0,
576
584
  size: "xs",
577
585
  weight: "semibold"
578
586
  })]
579
- }), /* @__PURE__ */ Y(i, {
580
- value: C,
581
- "aria-label": typeof o == "string" ? o : S.progressLabel
587
+ }), /* @__PURE__ */ q(p, {
588
+ value: S,
589
+ "aria-label": typeof a == "string" ? a : x.progressLabel
582
590
  })]
583
591
  }),
584
- !!s && /* @__PURE__ */ Y(n, {
592
+ !!o && /* @__PURE__ */ q(n, {
585
593
  type: "secondary",
586
- children: s
594
+ children: o
587
595
  }),
588
- t.length === 0 ? y ?? /* @__PURE__ */ Y(Q, {
589
- title: S.emptyTitle,
590
- description: S.emptyDescription,
591
- action: l ? /* @__PURE__ */ X(a, {
596
+ e.length === 0 ? v ?? /* @__PURE__ */ q(X, {
597
+ title: x.emptyTitle,
598
+ description: x.emptyDescription,
599
+ action: s ? /* @__PURE__ */ J(i, {
592
600
  type: "button",
593
- onClick: l,
594
- children: [/* @__PURE__ */ Y(U, {}), S.createLabel]
601
+ onClick: s,
602
+ children: [/* @__PURE__ */ q(U, {}), x.createLabel]
595
603
  }) : void 0
596
- }) : /* @__PURE__ */ Y(v, { children: t.map((e, t) => {
597
- if (_) return /* @__PURE__ */ Y("div", { children: _(e, t) }, e.id);
598
- let n = u ? () => u(e) : void 0, r = d ? () => d(e) : void 0, i = p ? () => p(e) : void 0, a = {
604
+ }) : /* @__PURE__ */ q(D, { children: e.map((e, t) => {
605
+ if (_) return /* @__PURE__ */ q("div", { children: _(e, t) }, e.id);
606
+ let n = l ? () => l(e) : void 0, r = u ? () => u(e) : void 0, i = d ? () => d(e) : void 0, a = {
599
607
  index: t,
600
608
  onSelect: n,
601
609
  onEdit: r,
602
610
  onDelete: i
603
611
  };
604
- return /* @__PURE__ */ Y(We, {
612
+ return /* @__PURE__ */ q(qe, {
605
613
  item: e,
606
- actionFallback: S.actionLabel,
614
+ actionFallback: x.actionLabel,
607
615
  onSelect: n,
608
- actions: Ze(m?.(e, a), e, Xe(S.editLabel, S.deleteLabel, r, i), S.actionsLabel)
616
+ actions: Q(f?.(e, a), e, Z(x.editLabel, x.deleteLabel, r, i), x.actionsLabel)
609
617
  }, e.id);
610
618
  }) }),
611
619
  g
612
620
  ]
613
621
  });
614
622
  }
615
- function tt({ metrics: t = [], onCreateMetric: n, onSelectMetric: r, onEditMetric: i, onDeleteMetric: a, renderMetricActions: o, actions: s, footerSlot: l, empty: u, className: d, strings: f }) {
616
- let p = {
617
- ...xe,
618
- ...f
623
+ function rt({ metrics: e = [], onCreateMetric: t, onSelectMetric: n, onEditMetric: i, onDeleteMetric: a, renderMetricActions: o, actions: s, footerSlot: c, empty: l, className: u, strings: d }) {
624
+ let f = {
625
+ ...we,
626
+ ...d
619
627
  };
620
- return /* @__PURE__ */ X(c, {
628
+ return /* @__PURE__ */ J(h, {
621
629
  surface: "bordered",
622
- icon: /* @__PURE__ */ Y(le, {}),
623
- title: p.title,
624
- description: p.description,
625
- headerEnd: $e(p.createLabel, n, s),
626
- className: e("product-structure-card--component", Z.card, d),
627
- children: [t.length === 0 ? u ?? /* @__PURE__ */ Y(Q, {
628
- title: p.emptyTitle,
629
- description: p.emptyDescription
630
- }) : /* @__PURE__ */ Y(v, { children: t.map((e, t) => {
631
- let n = r ? () => r(e) : void 0, s = i ? () => i(e) : void 0, c = a ? () => a(e) : void 0;
632
- return /* @__PURE__ */ Y(Ue, {
630
+ icon: /* @__PURE__ */ q(de, {}),
631
+ title: f.title,
632
+ description: f.description,
633
+ headerEnd: tt(f.createLabel, t, s),
634
+ className: r("product-structure-card--component", Y.card, u),
635
+ children: [e.length === 0 ? l ?? /* @__PURE__ */ q(X, {
636
+ title: f.emptyTitle,
637
+ description: f.emptyDescription
638
+ }) : /* @__PURE__ */ q(D, { children: e.map((e, t) => {
639
+ let r = n ? () => n(e) : void 0, s = i ? () => i(e) : void 0, c = a ? () => a(e) : void 0;
640
+ return /* @__PURE__ */ q(Ke, {
633
641
  metric: e,
634
- actions: Ze(o?.(e, {
642
+ actions: Q(o?.(e, {
635
643
  index: t,
636
- onSelect: n,
644
+ onSelect: r,
637
645
  onEdit: s,
638
646
  onDelete: c
639
- }), e, Xe(p.editLabel, p.deleteLabel, s, c), p.actionsLabel)
647
+ }), e, Z(f.editLabel, f.deleteLabel, s, c), f.actionsLabel)
640
648
  }, e.id);
641
- }) }), l]
649
+ }) }), c]
642
650
  });
643
651
  }
644
- function nt({ items: t = [], onCreateOperation: n, onSelectOperation: r, onEditOperation: i, onDeleteOperation: a, renderOperationActions: o, actions: s, footerSlot: l, renderItem: u, empty: d, className: f, strings: p }) {
645
- let m = {
646
- ...Se,
647
- ...p
652
+ function it({ items: e = [], onCreateOperation: t, onSelectOperation: n, onEditOperation: i, onDeleteOperation: a, renderOperationActions: o, actions: s, footerSlot: c, renderItem: l, empty: u, className: d, strings: f }) {
653
+ let p = {
654
+ ...Te,
655
+ ...f
648
656
  };
649
- return /* @__PURE__ */ X(c, {
657
+ return /* @__PURE__ */ J(h, {
650
658
  surface: "bordered",
651
- icon: /* @__PURE__ */ Y(fe, {}),
652
- title: m.title,
653
- description: m.description,
654
- headerEnd: $e(m.createLabel, n, s),
655
- className: e("product-operations-card--component", Z.card, f),
656
- children: [t.length === 0 ? d ?? /* @__PURE__ */ Y(Q, {
657
- title: m.emptyTitle,
658
- description: m.emptyDescription
659
- }) : /* @__PURE__ */ Y(v, { children: t.map((e, t) => {
660
- if (u) return /* @__PURE__ */ Y("div", { children: u(e, t) }, e.id);
661
- let n = r ? () => r(e) : void 0, s = i ? () => i(e) : void 0, c = a ? () => a(e) : void 0;
662
- return /* @__PURE__ */ Y(Ge, {
659
+ icon: /* @__PURE__ */ q(me, {}),
660
+ title: p.title,
661
+ description: p.description,
662
+ headerEnd: tt(p.createLabel, t, s),
663
+ className: r("product-operations-card--component", Y.card, d),
664
+ children: [e.length === 0 ? u ?? /* @__PURE__ */ q(X, {
665
+ title: p.emptyTitle,
666
+ description: p.emptyDescription
667
+ }) : /* @__PURE__ */ q(D, { children: e.map((e, t) => {
668
+ if (l) return /* @__PURE__ */ q("div", { children: l(e, t) }, e.id);
669
+ let r = n ? () => n(e) : void 0, s = i ? () => i(e) : void 0, c = a ? () => a(e) : void 0;
670
+ return /* @__PURE__ */ q(Je, {
663
671
  item: e,
664
- actionFallback: m.actionLabel,
665
- onSelect: n,
666
- actions: Ze(o?.(e, {
672
+ actionFallback: p.actionLabel,
673
+ onSelect: r,
674
+ actions: Q(o?.(e, {
667
675
  index: t,
668
- onSelect: n,
676
+ onSelect: r,
669
677
  onEdit: s,
670
678
  onDelete: c
671
- }), e, Xe(m.editLabel, m.deleteLabel, s, c), m.actionsLabel)
679
+ }), e, Z(p.editLabel, p.deleteLabel, s, c), p.actionsLabel)
672
680
  }, e.id);
673
- }) }), l]
681
+ }) }), c]
674
682
  });
675
683
  }
676
- function rt({ title: t, description: n, metadata: r = [], media: i, onEditDetails: s, actions: u, headerEnd: d, footerSlot: f, empty: p, className: m, strings: h }) {
677
- let g = {
678
- ...Ce,
679
- ...h
684
+ function at({ title: e, description: t, metadata: n = [], media: o, onEditDetails: s, actions: c, headerEnd: l, footerSlot: u, empty: d, className: f, strings: p }) {
685
+ let m = {
686
+ ...Ee,
687
+ ...p
680
688
  };
681
- return /* @__PURE__ */ X(c, {
689
+ return /* @__PURE__ */ J(h, {
682
690
  surface: "bordered",
683
- icon: /* @__PURE__ */ Y(ce, {}),
684
- title: t ?? g.title,
685
- description: n === !1 ? void 0 : n ?? g.description,
686
- headerEnd: /* @__PURE__ */ X(J, { children: [
687
- d,
688
- !!s && /* @__PURE__ */ X(a, {
691
+ icon: /* @__PURE__ */ q(B, {}),
692
+ title: e ?? m.title,
693
+ description: t === !1 ? void 0 : t ?? m.description,
694
+ headerEnd: /* @__PURE__ */ J(K, { children: [
695
+ l,
696
+ !!s && /* @__PURE__ */ J(i, {
689
697
  type: "button",
690
698
  tone: "neutral",
691
- buttonStyle: "ghost",
699
+ appearance: "ghost",
692
700
  onClick: s,
693
- children: [/* @__PURE__ */ Y(H, {}), g.editLabel]
701
+ children: [/* @__PURE__ */ q(H, {}), m.editLabel]
694
702
  }),
695
- !!u?.length && /* @__PURE__ */ Y(o, { actions: u })
703
+ !!c?.length && /* @__PURE__ */ q(a, { actions: c })
696
704
  ] }),
697
- className: e("product-details-card--component", Z.card, m),
705
+ className: r("product-details-card--component", Y.card, f),
698
706
  children: [
699
- !!i && /* @__PURE__ */ Y("div", {
700
- className: Z.media,
701
- children: i
707
+ !!o && /* @__PURE__ */ q("div", {
708
+ className: Y.media,
709
+ children: o
702
710
  }),
703
- r.length === 0 ? p ?? /* @__PURE__ */ Y(Q, {
704
- title: g.emptyTitle,
705
- description: g.emptyDescription
706
- }) : /* @__PURE__ */ Y(l, {
707
- items: r,
711
+ n.length === 0 ? d ?? /* @__PURE__ */ q(X, {
712
+ title: m.emptyTitle,
713
+ description: m.emptyDescription
714
+ }) : /* @__PURE__ */ q(g, {
715
+ items: n,
708
716
  columns: 2
709
717
  }),
710
- f
718
+ u
711
719
  ]
712
720
  });
713
721
  }
714
- function it({ metricColumns: n = 3, metrics: r = [], terms: i = [], rules: s = [], onOpenContract: u, onEditContract: d, onCreateRule: f, onSelectRule: p, onEditRule: m, onDeleteRule: h, renderRuleActions: g, actions: _, footerSlot: y, empty: b, className: x, strings: S }) {
715
- let C = {
716
- ...we,
717
- ...S
722
+ function ot({ metricColumns: t = 3, metrics: n = [], terms: o = [], rules: s = [], onOpenContract: c, onEditContract: l, onCreateRule: u, onSelectRule: d, onEditRule: f, onDeleteRule: p, renderRuleActions: m, actions: _, footerSlot: v, empty: y, className: b, strings: x }) {
723
+ let S = {
724
+ ...De,
725
+ ...x
718
726
  };
719
- return /* @__PURE__ */ X(c, {
727
+ return /* @__PURE__ */ J(h, {
720
728
  surface: "bordered",
721
- icon: /* @__PURE__ */ Y(pe, {}),
722
- title: C.title,
723
- description: C.description,
724
- headerEnd: /* @__PURE__ */ X(J, { children: [
725
- !!u && /* @__PURE__ */ Y(a, {
729
+ icon: /* @__PURE__ */ q(he, {}),
730
+ title: S.title,
731
+ description: S.description,
732
+ headerEnd: /* @__PURE__ */ J(K, { children: [
733
+ !!c && /* @__PURE__ */ q(i, {
726
734
  type: "button",
727
735
  tone: "neutral",
728
- buttonStyle: "ghost",
729
- onClick: u,
730
- children: C.openLabel
736
+ appearance: "ghost",
737
+ onClick: c,
738
+ children: S.openLabel
731
739
  }),
732
- !!d && /* @__PURE__ */ X(a, {
740
+ !!l && /* @__PURE__ */ J(i, {
733
741
  type: "button",
734
742
  tone: "neutral",
735
- buttonStyle: "ghost",
736
- onClick: d,
737
- children: [/* @__PURE__ */ Y(H, {}), C.editLabel]
743
+ appearance: "ghost",
744
+ onClick: l,
745
+ children: [/* @__PURE__ */ q(H, {}), S.editLabel]
738
746
  }),
739
- !!_?.length && /* @__PURE__ */ Y(o, { actions: _ })
747
+ !!_?.length && /* @__PURE__ */ q(a, { actions: _ })
740
748
  ] }),
741
- className: e("product-contract-overview--component", Z.card, x),
749
+ className: r("product-contract-overview--component", Y.card, b),
742
750
  children: [
743
- r.length > 0 && /* @__PURE__ */ Y(l, {
744
- columns: n,
745
- items: Qe(r)
751
+ n.length > 0 && /* @__PURE__ */ q(g, {
752
+ columns: t,
753
+ items: et(n)
746
754
  }),
747
- i.length > 0 && /* @__PURE__ */ X("section", {
748
- className: Z.section,
749
- children: [/* @__PURE__ */ Y(t, { children: C.termsTitle }), /* @__PURE__ */ Y(l, {
750
- items: i,
755
+ o.length > 0 && /* @__PURE__ */ J("section", {
756
+ className: Y.section,
757
+ children: [/* @__PURE__ */ q(e, { children: S.termsTitle }), /* @__PURE__ */ q(g, {
758
+ items: o,
751
759
  columns: 2
752
760
  })]
753
761
  }),
754
- /* @__PURE__ */ X("section", {
755
- className: Z.section,
756
- children: [/* @__PURE__ */ X("div", {
757
- className: Z.sectionHead,
758
- children: [/* @__PURE__ */ Y(t, { children: C.rulesTitle }), !!f && /* @__PURE__ */ X(a, {
762
+ /* @__PURE__ */ J("section", {
763
+ className: Y.section,
764
+ children: [/* @__PURE__ */ J("div", {
765
+ className: Y.sectionHead,
766
+ children: [/* @__PURE__ */ q(e, { children: S.rulesTitle }), !!u && /* @__PURE__ */ J(i, {
759
767
  type: "button",
760
768
  tone: "neutral",
761
- buttonStyle: "ghost",
762
- onClick: f,
763
- children: [/* @__PURE__ */ Y(U, {}), C.createRuleLabel]
769
+ appearance: "ghost",
770
+ onClick: u,
771
+ children: [/* @__PURE__ */ q(U, {}), S.createRuleLabel]
764
772
  })]
765
- }), s.length === 0 ? b ?? /* @__PURE__ */ Y(Q, {
766
- title: C.emptyTitle,
767
- description: C.emptyDescription
768
- }) : /* @__PURE__ */ Y(v, { children: s.map((e, t) => {
769
- let n = p ? () => p(e) : void 0, r = m ? () => m(e) : void 0, i = h ? () => h(e) : void 0;
770
- return /* @__PURE__ */ Y(Ke, {
773
+ }), s.length === 0 ? y ?? /* @__PURE__ */ q(X, {
774
+ title: S.emptyTitle,
775
+ description: S.emptyDescription
776
+ }) : /* @__PURE__ */ q(D, { children: s.map((e, t) => {
777
+ let n = d ? () => d(e) : void 0, r = f ? () => f(e) : void 0, i = p ? () => p(e) : void 0;
778
+ return /* @__PURE__ */ q(Ye, {
771
779
  item: e,
772
780
  onSelect: n,
773
- actions: Ze(g?.(e, {
781
+ actions: Q(m?.(e, {
774
782
  index: t,
775
783
  onSelect: n,
776
784
  onEdit: r,
777
785
  onDelete: i
778
- }), e, Xe(C.editRuleLabel, C.deleteRuleLabel, r, i), C.ruleActionsLabel)
786
+ }), e, Z(S.editRuleLabel, S.deleteRuleLabel, r, i), S.ruleActionsLabel)
779
787
  }, e.id);
780
788
  }) })]
781
789
  }),
782
- y
790
+ v
783
791
  ]
784
792
  });
785
793
  }
786
- function at({ policies: t = [], onCreatePolicy: n, onSelectPolicy: r, onEditPolicy: i, onDeletePolicy: a, renderPolicyActions: o, actions: s, footerSlot: l, empty: u, className: d, strings: f }) {
787
- let p = {
788
- ...Te,
789
- ...f
794
+ function st({ policies: e = [], onCreatePolicy: t, onSelectPolicy: n, onEditPolicy: i, onDeletePolicy: a, renderPolicyActions: o, actions: s, footerSlot: c, empty: l, className: u, strings: d }) {
795
+ let f = {
796
+ ...Oe,
797
+ ...d
790
798
  };
791
- return /* @__PURE__ */ X(c, {
799
+ return /* @__PURE__ */ J(h, {
792
800
  surface: "bordered",
793
- icon: /* @__PURE__ */ Y(pe, {}),
794
- title: p.title,
795
- description: p.description,
796
- headerEnd: $e(p.createLabel, n, s),
797
- className: e("product-policies-card--component", Z.card, d),
798
- children: [t.length === 0 ? u ?? /* @__PURE__ */ Y(Q, {
799
- title: p.emptyTitle,
800
- description: p.emptyDescription
801
- }) : /* @__PURE__ */ Y(v, { children: t.map((e, t) => {
802
- let n = r ? () => r(e) : void 0, s = i ? () => i(e) : void 0, c = a ? () => a(e) : void 0;
803
- return /* @__PURE__ */ Y(Ke, {
801
+ icon: /* @__PURE__ */ q(he, {}),
802
+ title: f.title,
803
+ description: f.description,
804
+ headerEnd: tt(f.createLabel, t, s),
805
+ className: r("product-policies-card--component", Y.card, u),
806
+ children: [e.length === 0 ? l ?? /* @__PURE__ */ q(X, {
807
+ title: f.emptyTitle,
808
+ description: f.emptyDescription
809
+ }) : /* @__PURE__ */ q(D, { children: e.map((e, t) => {
810
+ let r = n ? () => n(e) : void 0, s = i ? () => i(e) : void 0, c = a ? () => a(e) : void 0;
811
+ return /* @__PURE__ */ q(Ye, {
804
812
  item: e,
805
- onSelect: n,
806
- actions: Ze(o?.(e, {
813
+ onSelect: r,
814
+ actions: Q(o?.(e, {
807
815
  index: t,
808
- onSelect: n,
816
+ onSelect: r,
809
817
  onEdit: s,
810
818
  onDelete: c
811
- }), e, Xe(p.editLabel, p.deleteLabel, s, c), p.actionsLabel)
819
+ }), e, Z(f.editLabel, f.deleteLabel, s, c), f.actionsLabel)
812
820
  }, e.id);
813
- }) }), l]
821
+ }) }), c]
814
822
  });
815
823
  }
816
- function ot({ options: t = [], onManageOptions: n, onCreateOption: r, onSelectOption: i, onEditOption: o, onDeleteOption: s, renderOptionActions: l, actions: u, footerSlot: d, empty: f, className: p, strings: m }) {
817
- let h = {
818
- ...Ee,
819
- ...m
824
+ function ct({ options: e = [], onManageOptions: t, onCreateOption: n, onSelectOption: a, onEditOption: o, onDeleteOption: s, renderOptionActions: c, actions: l, footerSlot: u, empty: d, className: f, strings: p }) {
825
+ let m = {
826
+ ...ke,
827
+ ...p
820
828
  };
821
- return /* @__PURE__ */ X(c, {
829
+ return /* @__PURE__ */ J(h, {
822
830
  surface: "bordered",
823
- icon: /* @__PURE__ */ Y(le, {}),
824
- title: h.title,
825
- description: h.description,
826
- headerEnd: $e(h.createLabel, r, u, n ? /* @__PURE__ */ Y(a, {
831
+ icon: /* @__PURE__ */ q(de, {}),
832
+ title: m.title,
833
+ description: m.description,
834
+ headerEnd: tt(m.createLabel, n, l, t ? /* @__PURE__ */ q(i, {
827
835
  type: "button",
828
836
  tone: "neutral",
829
- buttonStyle: "ghost",
830
- onClick: n,
831
- children: h.manageLabel
837
+ appearance: "ghost",
838
+ onClick: t,
839
+ children: m.manageLabel
832
840
  }) : void 0),
833
- className: e("product-options-summary--component", Z.card, p),
834
- children: [t.length === 0 ? f ?? /* @__PURE__ */ Y(Q, {
835
- title: h.emptyTitle,
836
- description: h.emptyDescription,
837
- action: r ? /* @__PURE__ */ X(a, {
841
+ className: r("product-options-summary--component", Y.card, f),
842
+ children: [e.length === 0 ? d ?? /* @__PURE__ */ q(X, {
843
+ title: m.emptyTitle,
844
+ description: m.emptyDescription,
845
+ action: n ? /* @__PURE__ */ J(i, {
838
846
  type: "button",
839
- onClick: r,
840
- children: [/* @__PURE__ */ Y(U, {}), h.createLabel]
847
+ onClick: n,
848
+ children: [/* @__PURE__ */ q(U, {}), m.createLabel]
841
849
  }) : void 0
842
- }) : /* @__PURE__ */ Y(v, { children: t.map((e, t) => {
843
- let n = i ? () => i(e) : void 0, r = o ? () => o(e) : void 0, a = s ? () => s(e) : void 0;
844
- return /* @__PURE__ */ Y(Ke, {
850
+ }) : /* @__PURE__ */ q(D, { children: e.map((e, t) => {
851
+ let n = a ? () => a(e) : void 0, r = o ? () => o(e) : void 0, i = s ? () => s(e) : void 0;
852
+ return /* @__PURE__ */ q(Ye, {
845
853
  item: e,
846
- actionLabel: h.actionLabel,
854
+ actionLabel: m.actionLabel,
847
855
  onSelect: n,
848
- actions: Ze(l?.(e, {
856
+ actions: Q(c?.(e, {
849
857
  index: t,
850
858
  onSelect: n,
851
859
  onEdit: r,
852
- onDelete: a
853
- }), e, Xe(h.editLabel, h.deleteLabel, r, a), h.actionsLabel)
860
+ onDelete: i
861
+ }), e, Z(m.editLabel, m.deleteLabel, r, i), m.actionsLabel)
854
862
  }, e.id);
855
- }) }), d]
863
+ }) }), u]
856
864
  });
857
865
  }
858
- function st({ metricColumns: t = 3, title: n, description: r, metrics: i = [], media: a, status: s, statusTone: u = "neutral", actions: d, headerEnd: f, footerSlot: p, className: h, strings: g }) {
866
+ function lt({ metricColumns: e = 3, title: t, description: n, metrics: i = [], media: o, status: s, statusTone: c = "neutral", actions: l, headerEnd: d, footerSlot: f, className: p, strings: m }) {
859
867
  let _ = {
860
- ...Me,
861
- ...g
868
+ ...Fe,
869
+ ...m
862
870
  };
863
- return /* @__PURE__ */ X(c, {
871
+ return /* @__PURE__ */ J(h, {
864
872
  surface: "bordered",
865
- title: n ?? _.title,
866
- description: r ?? _.description,
867
- titleSuffix: s ? /* @__PURE__ */ Y(m, {
868
- tone: u,
873
+ title: t ?? _.title,
874
+ description: n ?? _.description,
875
+ titleSuffix: s ? /* @__PURE__ */ q(u, {
876
+ tone: c,
869
877
  children: s
870
878
  }) : void 0,
871
- headerEnd: /* @__PURE__ */ X(J, { children: [f, !!d?.length && /* @__PURE__ */ Y(o, { actions: d })] }),
872
- className: e("product-overview--component", Z.card, h),
879
+ headerEnd: /* @__PURE__ */ J(K, { children: [d, !!l?.length && /* @__PURE__ */ q(a, { actions: l })] }),
880
+ className: r("product-overview--component", Y.card, p),
873
881
  children: [
874
- !!a && /* @__PURE__ */ Y("div", {
875
- className: Z.media,
876
- children: a
882
+ !!o && /* @__PURE__ */ q("div", {
883
+ className: Y.media,
884
+ children: o
877
885
  }),
878
- i.length > 0 && /* @__PURE__ */ Y(l, {
879
- columns: t,
880
- items: Qe(i)
886
+ i.length > 0 && /* @__PURE__ */ q(g, {
887
+ columns: e,
888
+ items: et(i)
881
889
  }),
882
- p
890
+ f
883
891
  ]
884
892
  });
885
893
  }
886
- function ct({ lines: t = [], summary: r, note: i, onRecalculate: s, actions: d, footerSlot: f, empty: m, className: h, strings: g }) {
887
- let _ = {
888
- ...Ne,
889
- ...g
890
- }, v = t.filter((e) => !e.emphasis), y = t.filter((e) => e.emphasis);
891
- return /* @__PURE__ */ X(c, {
894
+ function ut({ lines: e = [], summary: t, note: o, onRecalculate: s, actions: c, footerSlot: u, empty: d, className: f, strings: p }) {
895
+ let m = {
896
+ ...Ie,
897
+ ...p
898
+ }, v = e.filter((e) => !e.emphasis), y = e.filter((e) => e.emphasis);
899
+ return /* @__PURE__ */ J(h, {
892
900
  surface: "bordered",
893
- icon: /* @__PURE__ */ Y(W, {}),
894
- title: _.title,
895
- description: _.description,
896
- headerEnd: /* @__PURE__ */ X(J, { children: [!!s && /* @__PURE__ */ X(a, {
901
+ icon: /* @__PURE__ */ q(W, {}),
902
+ title: m.title,
903
+ description: m.description,
904
+ headerEnd: /* @__PURE__ */ J(K, { children: [!!s && /* @__PURE__ */ J(i, {
897
905
  type: "button",
898
906
  tone: "neutral",
899
- buttonStyle: "ghost",
907
+ appearance: "ghost",
900
908
  onClick: s,
901
- children: [/* @__PURE__ */ Y(G, {}), _.recalculateLabel]
902
- }), !!d?.length && /* @__PURE__ */ Y(o, { actions: d })] }),
903
- className: e("product-quote-card--component", Z.card, h),
909
+ children: [/* @__PURE__ */ q(fe, {}), m.recalculateLabel]
910
+ }), !!c?.length && /* @__PURE__ */ q(a, { actions: c })] }),
911
+ className: r("product-quote-card--component", Y.card, f),
904
912
  children: [
905
- t.length === 0 ? m ?? /* @__PURE__ */ Y(Q, {
906
- title: _.emptyTitle,
907
- description: _.emptyDescription
908
- }) : /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(l, {
913
+ e.length === 0 ? d ?? /* @__PURE__ */ q(X, {
914
+ title: m.emptyTitle,
915
+ description: m.emptyDescription
916
+ }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(g, {
909
917
  layout: "rows",
910
918
  columns: 1,
911
919
  items: v.map((e) => ({
912
920
  id: e.id,
913
921
  label: e.label,
914
922
  description: e.description,
915
- render: () => /* @__PURE__ */ Y(p, {
923
+ render: () => /* @__PURE__ */ q(l, {
924
+ type: "inherit",
916
925
  "data-tone": e.tone ?? "neutral",
917
- className: Z.quoteValue,
926
+ className: r(Y.quoteValue, $e),
918
927
  children: e.value
919
928
  })
920
929
  }))
921
- }), y.map((e) => /* @__PURE__ */ X("div", {
922
- className: Z.quoteTotal,
930
+ }), y.map((e) => /* @__PURE__ */ J("div", {
931
+ className: Y.quoteTotal,
923
932
  children: [
924
- /* @__PURE__ */ Y(u, {}),
925
- /* @__PURE__ */ X("div", {
926
- className: Z.quoteTotalRow,
927
- children: [/* @__PURE__ */ Y(n, {
933
+ /* @__PURE__ */ q(_, {}),
934
+ /* @__PURE__ */ J("div", {
935
+ className: Y.quoteTotalRow,
936
+ children: [/* @__PURE__ */ q(n, {
928
937
  tag: "span",
929
938
  weight: "semibold",
930
939
  children: e.label
931
- }), /* @__PURE__ */ Y(p, {
940
+ }), /* @__PURE__ */ q(l, {
932
941
  weight: "semibold",
933
- className: Z.numeric,
942
+ className: $e,
934
943
  children: e.value
935
944
  })]
936
945
  }),
937
- !!e.description && /* @__PURE__ */ Y(n, {
946
+ !!e.description && /* @__PURE__ */ q(n, {
938
947
  size: "xs",
939
948
  type: "secondary",
940
949
  children: e.description
941
950
  })
942
951
  ]
943
952
  }, e.id))] }),
944
- !!r && /* @__PURE__ */ Y(n, {
953
+ !!t && /* @__PURE__ */ q(n, {
945
954
  type: "secondary",
946
- children: r
955
+ children: t
947
956
  }),
948
- !!i && /* @__PURE__ */ Y(n, {
957
+ !!o && /* @__PURE__ */ q(n, {
949
958
  size: "xs",
950
959
  type: "secondary",
951
- children: i
960
+ children: o
952
961
  }),
953
- f
962
+ u
954
963
  ]
955
964
  });
956
965
  }
957
966
  //#endregion
958
967
  //#region src/components/features/products/product-options-matrix.tsx
959
- function lt(e) {
968
+ function dt(e) {
960
969
  return typeof e == "string" || typeof e == "number" ? String(e) : "";
961
970
  }
962
- var ut = 0;
963
- function dt(e, t, n) {
971
+ var ft = 0;
972
+ function pt(e, t, n) {
964
973
  let r = [...e];
965
974
  return r.splice(n, 0, ...r.splice(t, 1)), r;
966
975
  }
967
- function ft({ optionGroups: t = [], surface: r = "card", editingOptionId: i, defaultEditingOptionId: s = null, onEditingOptionIdChange: l, onCreateOption: u, onEditOption: f, onDeleteOption: p, confirmDelete: h = !0, onAddValue: _, onDeleteValue: v, onOptionNameChange: S, onValueLabelChange: ee, onSaveEditingOption: w, onCancelEditingOption: E, onToggleUsedForVariants: D, onReorderOptions: O, actions: k, footerSlot: A, empty: j, className: N, strings: P }) {
968
- let F = {
969
- ...De,
970
- ...P
971
- }, [re, ie] = q(s), ae = i === void 0 ? re : i, [L, R] = q({
976
+ function mt({ optionGroups: e = [], surface: t = "card", editingOptionId: s, defaultEditingOptionId: c = null, onEditingOptionIdChange: l, onCreateOption: d, onEditOption: f, onDeleteOption: p, confirmDelete: m = !0, onAddValue: g, onDeleteValue: _, onOptionNameChange: y, onValueLabelChange: b, onSaveEditingOption: x, onCancelEditingOption: w, onToggleUsedForVariants: E, onReorderOptions: D, actions: M, footerSlot: N, empty: P, className: F, strings: ee }) {
977
+ let I = {
978
+ ...Ae,
979
+ ...ee
980
+ }, [te, ie] = G(c), ae = s === void 0 ? te : s, [L, R] = G({
972
981
  name: "",
973
982
  values: []
974
- }), [z, oe] = q(null), se = te(), B = ve(() => [...t].sort((e, t) => (e.position ?? 0) - (t.position ?? 0)), [t]), ce = (e) => {
983
+ }), [oe, se] = G(null), ce = ne(), z = xe(() => [...e].sort((e, t) => (e.position ?? 0) - (t.position ?? 0)), [e]), le = (e) => {
975
984
  R({
976
- name: lt(e.name),
985
+ name: dt(e.name),
977
986
  values: [...e.values ?? []]
978
- }), i === void 0 && ie(e.id), l?.(e.id, e), f?.(e);
979
- }, V = () => {
980
- i === void 0 && ie(null), l?.(null);
987
+ }), s === void 0 && ie(e.id), l?.(e.id, e), f?.(e);
988
+ }, B = () => {
989
+ s === void 0 && ie(null), l?.(null);
981
990
  }, ue = (e) => {
982
991
  if (p) {
983
- if (!h) {
984
- p(e), V();
992
+ if (!m) {
993
+ p(e), B();
985
994
  return;
986
995
  }
987
- oe(e), se.show();
996
+ se(e), ce.show();
988
997
  }
989
- }, H = (e) => /* @__PURE__ */ X(d, {
990
- gap: "lg",
991
- className: Z.optionEditor,
998
+ }, V = (e) => /* @__PURE__ */ J(o, {
999
+ className: Y.optionEditor,
992
1000
  children: [
993
- /* @__PURE__ */ Y(C, {
994
- label: F.nameLabel,
995
- children: /* @__PURE__ */ Y(T, {
1001
+ /* @__PURE__ */ q(C, {
1002
+ label: I.nameLabel,
1003
+ children: /* @__PURE__ */ q(S, {
996
1004
  value: L.name,
997
- placeholder: F.namePlaceholder,
1005
+ placeholder: I.namePlaceholder,
998
1006
  onChange: (t) => {
999
1007
  R((e) => ({
1000
1008
  ...e,
1001
1009
  name: t.target.value
1002
- })), S?.(e, t.target.value);
1010
+ })), y?.(e, t.target.value);
1003
1011
  }
1004
1012
  })
1005
1013
  }),
1006
- /* @__PURE__ */ Y(C, {
1007
- label: F.valuesLabel,
1008
- children: /* @__PURE__ */ Y(I, {
1014
+ /* @__PURE__ */ q(C, {
1015
+ label: I.valuesLabel,
1016
+ children: /* @__PURE__ */ q(j, {
1009
1017
  items: L.values,
1010
1018
  getKey: (e) => e.id,
1011
1019
  strings: {
1012
- add: F.addValueLabel,
1013
- remove: (e) => `${F.removeValueLabel} ${e}`
1020
+ add: I.addValueLabel,
1021
+ remove: (e) => `${I.removeValueLabel} ${e}`
1014
1022
  },
1015
- emptyState: /* @__PURE__ */ Y(n, {
1023
+ emptyState: /* @__PURE__ */ q(n, {
1016
1024
  type: "secondary",
1017
- children: F.noValues
1025
+ children: I.noValues
1018
1026
  }),
1019
1027
  onAdd: () => {
1020
1028
  let t = {
1021
- id: `draft-value-${ut += 1}`,
1029
+ id: `draft-value-${ft += 1}`,
1022
1030
  label: ""
1023
1031
  };
1024
1032
  R((e) => ({
1025
1033
  ...e,
1026
1034
  values: [...e.values, t]
1027
- })), _?.(e);
1035
+ })), g?.(e);
1028
1036
  },
1029
1037
  onRemove: (t) => {
1030
1038
  let n = L.values[t];
1031
1039
  R((e) => ({
1032
1040
  ...e,
1033
1041
  values: e.values.filter((e, n) => n !== t)
1034
- })), n && v?.(e, n);
1042
+ })), n && _?.(e, n);
1035
1043
  },
1036
1044
  onMove: (e, t) => R((n) => ({
1037
1045
  ...n,
1038
- values: dt(n.values, e, t)
1046
+ values: pt(n.values, e, t)
1039
1047
  })),
1040
- children: (t, { index: n }) => /* @__PURE__ */ Y(T, {
1041
- value: lt(t.label),
1042
- placeholder: F.valuePlaceholder,
1043
- "aria-label": `${F.valuesLabel} ${n + 1}`,
1048
+ children: (t, { index: n }) => /* @__PURE__ */ q(S, {
1049
+ value: dt(t.label),
1050
+ placeholder: I.valuePlaceholder,
1051
+ "aria-label": `${I.valuesLabel} ${n + 1}`,
1044
1052
  onChange: (r) => {
1045
1053
  let i = r.target.value;
1046
1054
  R((e) => ({
@@ -1049,78 +1057,78 @@ function ft({ optionGroups: t = [], surface: r = "card", editingOptionId: i, def
1049
1057
  ...e,
1050
1058
  label: i
1051
1059
  } : e)
1052
- })), ee?.(e, t, i);
1060
+ })), b?.(e, t, i);
1053
1061
  }
1054
1062
  })
1055
1063
  })
1056
1064
  }),
1057
- !!D && /* @__PURE__ */ Y(M, {
1058
- label: F.usedForVariantsLabel,
1059
- description: F.usedForVariantsDescription,
1065
+ !!E && /* @__PURE__ */ q(v, {
1066
+ label: I.usedForVariantsLabel,
1067
+ description: I.usedForVariantsDescription,
1060
1068
  value: e.usedForVariants ?? !0,
1061
- onValueChange: (t) => D(e, t)
1069
+ onValueChange: (t) => E(e, t)
1062
1070
  }),
1063
- /* @__PURE__ */ X("div", {
1064
- className: Z.optionEditorActions,
1065
- children: [/* @__PURE__ */ Y("div", { children: !!p && /* @__PURE__ */ Y(a, {
1071
+ /* @__PURE__ */ J("div", {
1072
+ className: Y.optionEditorActions,
1073
+ children: [/* @__PURE__ */ q("div", { children: !!p && /* @__PURE__ */ q(i, {
1066
1074
  type: "button",
1067
1075
  tone: "destructive",
1068
- buttonStyle: "ghost",
1076
+ appearance: "ghost",
1069
1077
  onClick: () => ue(e),
1070
- children: F.deleteLabel
1071
- }) }), /* @__PURE__ */ X(d, {
1078
+ children: I.deleteLabel
1079
+ }) }), /* @__PURE__ */ J(o, {
1072
1080
  direction: "horizontal",
1073
1081
  gap: "sm",
1074
1082
  align: "center",
1075
- children: [/* @__PURE__ */ Y(a, {
1083
+ children: [/* @__PURE__ */ q(i, {
1076
1084
  type: "button",
1077
1085
  tone: "neutral",
1078
- buttonStyle: "ghost",
1086
+ appearance: "ghost",
1079
1087
  onClick: () => {
1080
- E?.(e, L), V();
1088
+ w?.(e, L), B();
1081
1089
  },
1082
- children: F.cancelLabel
1083
- }), /* @__PURE__ */ Y(a, {
1090
+ children: I.cancelLabel
1091
+ }), /* @__PURE__ */ q(i, {
1084
1092
  type: "button",
1085
1093
  onClick: () => {
1086
- w?.(e, L), V();
1094
+ x?.(e, L), B();
1087
1095
  },
1088
- children: F.doneLabel
1096
+ children: I.doneLabel
1089
1097
  })]
1090
1098
  })]
1091
1099
  })
1092
1100
  ]
1093
- }), U = B.length === 0 ? j ?? /* @__PURE__ */ Y(Q, {
1094
- title: F.emptyTitle,
1095
- description: F.emptyDescription,
1096
- action: u ? /* @__PURE__ */ Y(a, {
1101
+ }), H = z.length === 0 ? P ?? /* @__PURE__ */ q(X, {
1102
+ title: I.emptyTitle,
1103
+ description: I.emptyDescription,
1104
+ action: d ? /* @__PURE__ */ q(i, {
1097
1105
  type: "button",
1098
- onClick: u,
1099
- children: F.createLabel
1106
+ onClick: d,
1107
+ children: I.createLabel
1100
1108
  }) : void 0
1101
- }) : /* @__PURE__ */ Y(I, {
1102
- items: B,
1109
+ }) : /* @__PURE__ */ q(j, {
1110
+ items: z,
1103
1111
  getKey: (e) => e.id,
1104
- strings: { add: F.createLabel },
1105
- className: Z.optionList,
1106
- onAdd: u,
1107
- onMove: O ? (e, t) => O(dt(B, e, t).map((e, t) => ({
1112
+ strings: { add: I.createLabel },
1113
+ className: Y.optionList,
1114
+ onAdd: d,
1115
+ onMove: D ? (e, t) => D(pt(z, e, t).map((e, t) => ({
1108
1116
  ...e,
1109
1117
  position: t
1110
1118
  }))) : void 0,
1111
1119
  children: (e) => {
1112
- if (ae === e.id) return H(e);
1120
+ if (ae === e.id) return V(e);
1113
1121
  let t = e.values ?? [];
1114
- return /* @__PURE__ */ Y(b, {
1115
- render: /* @__PURE__ */ Y("button", { type: "button" }),
1116
- onClick: () => ce(e),
1117
- className: Z.optionRow,
1118
- children: /* @__PURE__ */ X(y, { children: [
1119
- /* @__PURE__ */ X(x, { children: [e.name, e.badge] }),
1120
- !!e.description && /* @__PURE__ */ Y(g, { children: e.description }),
1121
- /* @__PURE__ */ Y("span", {
1122
- className: Z.optionValues,
1123
- children: t.map((e) => /* @__PURE__ */ Y(m, {
1122
+ return /* @__PURE__ */ q(k, {
1123
+ render: /* @__PURE__ */ q("button", { type: "button" }),
1124
+ onClick: () => le(e),
1125
+ className: Y.optionRow,
1126
+ children: /* @__PURE__ */ J(O, { children: [
1127
+ /* @__PURE__ */ J(A, { children: [e.name, e.badge] }),
1128
+ !!e.description && /* @__PURE__ */ q(T, { children: e.description }),
1129
+ /* @__PURE__ */ q("span", {
1130
+ className: Y.optionValues,
1131
+ children: t.map((e) => /* @__PURE__ */ q(u, {
1124
1132
  tone: "neutral",
1125
1133
  children: e.label
1126
1134
  }, e.id))
@@ -1128,49 +1136,49 @@ function ft({ optionGroups: t = [], surface: r = "card", editingOptionId: i, def
1128
1136
  ] })
1129
1137
  });
1130
1138
  }
1131
- }), W = /* @__PURE__ */ Y(ne, {
1132
- ...se.overlayProps,
1139
+ }), U = /* @__PURE__ */ q(re, {
1140
+ ...ce.overlayProps,
1133
1141
  destructive: !0,
1134
- title: F.confirmDeleteTitle,
1135
- description: z ? F.confirmDeleteDescription(lt(z.name)) : void 0,
1142
+ title: I.confirmDeleteTitle,
1143
+ description: oe ? I.confirmDeleteDescription(dt(oe.name)) : void 0,
1136
1144
  strings: {
1137
- confirm: F.confirmDeleteConfirm,
1138
- cancel: F.confirmDeleteCancel
1145
+ confirm: I.confirmDeleteConfirm,
1146
+ cancel: I.confirmDeleteCancel
1139
1147
  },
1140
1148
  onConfirm: () => {
1141
- z && p?.(z), oe(null), V();
1149
+ oe && p?.(oe), se(null), B();
1142
1150
  }
1143
1151
  });
1144
- return r === "embedded" ? /* @__PURE__ */ X("div", {
1145
- className: e("product-options-matrix--component", Z.matrix, N),
1152
+ return t === "embedded" ? /* @__PURE__ */ J("div", {
1153
+ className: r("product-options-matrix--component", Y.matrix, F),
1146
1154
  children: [
1147
- U,
1148
- A,
1149
- W
1155
+ H,
1156
+ N,
1157
+ U
1150
1158
  ]
1151
- }) : /* @__PURE__ */ X(c, {
1159
+ }) : /* @__PURE__ */ J(h, {
1152
1160
  surface: "bordered",
1153
- icon: /* @__PURE__ */ Y(le, {}),
1154
- title: F.title,
1155
- description: F.description,
1156
- headerEnd: k?.length ? /* @__PURE__ */ Y(o, { actions: k }) : void 0,
1157
- className: e("product-options-matrix--component", Z.card, N),
1161
+ icon: /* @__PURE__ */ q(de, {}),
1162
+ title: I.title,
1163
+ description: I.description,
1164
+ headerEnd: M?.length ? /* @__PURE__ */ q(a, { actions: M }) : void 0,
1165
+ className: r("product-options-matrix--component", Y.card, F),
1158
1166
  children: [
1159
- U,
1160
- A,
1161
- W
1167
+ H,
1168
+ N,
1169
+ U
1162
1170
  ]
1163
1171
  });
1164
1172
  }
1165
1173
  //#endregion
1166
1174
  //#region src/components/features/products/product-variants.tsx
1167
- var pt = [
1175
+ var ht = [
1168
1176
  "variant",
1169
1177
  "sku",
1170
1178
  "price",
1171
1179
  "inventory",
1172
1180
  "status"
1173
- ], mt = {
1181
+ ], gt = {
1174
1182
  variant: null,
1175
1183
  sku: "sku",
1176
1184
  price: "price",
@@ -1181,7 +1189,7 @@ var pt = [
1181
1189
  function $(e) {
1182
1190
  return typeof e == "string" || typeof e == "number" ? String(e) : "";
1183
1191
  }
1184
- function ht(e) {
1192
+ function _t(e) {
1185
1193
  let t = e.map($).filter(Boolean);
1186
1194
  if (t.length === 0) return "—";
1187
1195
  let n = [...new Set(t)];
@@ -1193,15 +1201,15 @@ function ht(e) {
1193
1201
  }
1194
1202
  return `${n[0]} – ${n[n.length - 1]}`;
1195
1203
  }
1196
- function gt(e) {
1204
+ function vt(e) {
1197
1205
  let t = e.map($).filter(Boolean);
1198
1206
  if (t.length === 0) return "—";
1199
1207
  let n = t.map((e) => Number(e.replace(/[^0-9.-]/g, "")));
1200
1208
  return n.every(Number.isFinite) ? String(n.reduce((e, t) => e + t, 0)) : "—";
1201
1209
  }
1202
- function _t({ variant: e, index: t = 0, onSelectVariant: n, onEditVariant: r, onDuplicateVariant: i, onDeleteVariant: a, renderVariantActions: o, menuLabel: s, className: c, strings: l }) {
1210
+ function yt({ variant: e, index: t = 0, onSelectVariant: n, onEditVariant: r, onDuplicateVariant: i, onDeleteVariant: a, renderVariantActions: o, menuLabel: s, className: c, strings: l }) {
1203
1211
  let u = {
1204
- ...Oe,
1212
+ ...je,
1205
1213
  ...l
1206
1214
  }, d = n ? () => n(e) : void 0, f = r ? () => r(e) : void 0, p = i ? () => i(e) : void 0, m = a ? () => a(e) : void 0, h = o?.(e, {
1207
1215
  index: t,
@@ -1210,7 +1218,7 @@ function _t({ variant: e, index: t = 0, onSelectVariant: n, onEditVariant: r, on
1210
1218
  onDuplicate: p,
1211
1219
  onDelete: m
1212
1220
  });
1213
- if (h) return /* @__PURE__ */ Y(J, { children: h });
1221
+ if (h) return /* @__PURE__ */ q(K, { children: h });
1214
1222
  let g = [
1215
1223
  ...d ? [{
1216
1224
  id: "open",
@@ -1220,457 +1228,457 @@ function _t({ variant: e, index: t = 0, onSelectVariant: n, onEditVariant: r, on
1220
1228
  ...f ? [{
1221
1229
  id: "edit",
1222
1230
  label: u.editLabel,
1223
- icon: /* @__PURE__ */ Y(H, {}),
1231
+ icon: /* @__PURE__ */ q(H, {}),
1224
1232
  onClick: f
1225
1233
  }] : [],
1226
1234
  ...p ? [{
1227
1235
  id: "duplicate",
1228
1236
  label: u.duplicateLabel,
1229
- icon: /* @__PURE__ */ Y(se, {}),
1237
+ icon: /* @__PURE__ */ q(z, {}),
1230
1238
  onClick: p
1231
1239
  }] : [],
1232
1240
  ...m ? [{
1233
1241
  id: "delete",
1234
1242
  label: u.deleteLabel,
1235
- icon: /* @__PURE__ */ Y(K, {}),
1243
+ icon: /* @__PURE__ */ q(_e, {}),
1236
1244
  tone: "destructive",
1237
1245
  onClick: m
1238
1246
  }] : []
1239
1247
  ];
1240
- return g.length === 0 ? null : /* @__PURE__ */ Y(Ve, {
1248
+ return g.length === 0 ? null : /* @__PURE__ */ q(We, {
1241
1249
  item: e,
1242
1250
  actions: g,
1243
1251
  menuLabel: s ?? u.menuLabel,
1244
1252
  className: c
1245
1253
  });
1246
1254
  }
1247
- function vt({ variants: t = [], onCreateVariant: r, onSelectVariant: i, onEditVariant: l, onDuplicateVariant: u, onDeleteVariant: d, renderVariantActions: f, actions: p, footerSlot: h, empty: g, className: _, strings: v }) {
1255
+ function bt({ variants: e = [], onCreateVariant: t, onSelectVariant: o, onEditVariant: s, onDuplicateVariant: c, onDeleteVariant: l, renderVariantActions: d, actions: f, footerSlot: p, empty: g, className: _, strings: v }) {
1248
1256
  let y = {
1249
- ...ke,
1257
+ ...Me,
1250
1258
  ...v
1251
1259
  };
1252
- return /* @__PURE__ */ X(c, {
1260
+ return /* @__PURE__ */ J(h, {
1253
1261
  surface: "bordered",
1254
- icon: /* @__PURE__ */ Y(L, {}),
1262
+ icon: /* @__PURE__ */ q(R, {}),
1255
1263
  title: y.title,
1256
1264
  description: y.description,
1257
- headerEnd: /* @__PURE__ */ X(J, { children: [!!r && /* @__PURE__ */ X(a, {
1265
+ headerEnd: /* @__PURE__ */ J(K, { children: [!!t && /* @__PURE__ */ J(i, {
1258
1266
  type: "button",
1259
1267
  tone: "neutral",
1260
- buttonStyle: "ghost",
1261
- onClick: r,
1262
- children: [/* @__PURE__ */ Y(U, {}), y.createLabel]
1263
- }), !!p?.length && /* @__PURE__ */ Y(o, { actions: p })] }),
1264
- className: e("product-variants-table--component", Z.card, _),
1265
- children: [t.length === 0 ? g ?? /* @__PURE__ */ Y(Q, {
1268
+ appearance: "ghost",
1269
+ onClick: t,
1270
+ children: [/* @__PURE__ */ q(U, {}), y.createLabel]
1271
+ }), !!f?.length && /* @__PURE__ */ q(a, { actions: f })] }),
1272
+ className: r("product-variants-table--component", Y.card, _),
1273
+ children: [e.length === 0 ? g ?? /* @__PURE__ */ q(X, {
1266
1274
  title: y.emptyTitle,
1267
1275
  description: y.emptyDescription
1268
- }) : /* @__PURE__ */ X(j, { children: [/* @__PURE__ */ Y(E, { children: /* @__PURE__ */ X(O, { children: [
1269
- /* @__PURE__ */ Y(A, { children: y.columns.variant }),
1270
- /* @__PURE__ */ Y(A, { children: y.columns.sku }),
1271
- /* @__PURE__ */ Y(A, {
1276
+ }) : /* @__PURE__ */ J(te, { children: [/* @__PURE__ */ q(N, { children: /* @__PURE__ */ J(F, { children: [
1277
+ /* @__PURE__ */ q(I, { children: y.columns.variant }),
1278
+ /* @__PURE__ */ q(I, { children: y.columns.sku }),
1279
+ /* @__PURE__ */ q(I, {
1272
1280
  align: "end",
1273
1281
  children: y.columns.price
1274
1282
  }),
1275
- /* @__PURE__ */ Y(A, {
1283
+ /* @__PURE__ */ q(I, {
1276
1284
  align: "end",
1277
1285
  children: y.columns.inventory
1278
1286
  }),
1279
- /* @__PURE__ */ Y(A, { children: y.columns.status }),
1280
- /* @__PURE__ */ Y(A, {
1287
+ /* @__PURE__ */ q(I, { children: y.columns.status }),
1288
+ /* @__PURE__ */ q(I, {
1281
1289
  align: "end",
1282
- children: /* @__PURE__ */ Y(s, { children: y.columns.actions })
1290
+ children: /* @__PURE__ */ q(m, { children: y.columns.actions })
1283
1291
  })
1284
- ] }) }), /* @__PURE__ */ Y(k, { children: t.map((e, t) => /* @__PURE__ */ X(O, { children: [
1285
- /* @__PURE__ */ Y(D, { children: /* @__PURE__ */ X("span", {
1286
- className: Z.variantCell,
1287
- children: [/* @__PURE__ */ Y(n, {
1292
+ ] }) }), /* @__PURE__ */ q(ee, { children: e.map((e, t) => /* @__PURE__ */ J(F, { children: [
1293
+ /* @__PURE__ */ q(P, { children: /* @__PURE__ */ J("span", {
1294
+ className: Y.variantCell,
1295
+ children: [/* @__PURE__ */ q(n, {
1288
1296
  tag: "span",
1289
1297
  weight: "medium",
1290
1298
  children: e.name
1291
- }), !!e.options?.length && /* @__PURE__ */ Y("span", {
1292
- className: Z.variantOptions,
1293
- children: e.options.map((e, t) => /* @__PURE__ */ Y(m, {
1299
+ }), !!e.options?.length && /* @__PURE__ */ q("span", {
1300
+ className: Y.variantOptions,
1301
+ children: e.options.map((e, t) => /* @__PURE__ */ q(u, {
1294
1302
  tone: "neutral",
1295
1303
  children: e
1296
1304
  }, t))
1297
1305
  })]
1298
1306
  }) }),
1299
- /* @__PURE__ */ Y(D, { children: e.sku ?? "—" }),
1300
- /* @__PURE__ */ Y(D, {
1307
+ /* @__PURE__ */ q(P, { children: e.sku ?? "—" }),
1308
+ /* @__PURE__ */ q(P, {
1301
1309
  align: "end",
1302
1310
  children: e.price ?? "—"
1303
1311
  }),
1304
- /* @__PURE__ */ Y(D, {
1312
+ /* @__PURE__ */ q(P, {
1305
1313
  align: "end",
1306
1314
  children: e.inventory ?? "—"
1307
1315
  }),
1308
- /* @__PURE__ */ Y(D, { children: e.status ? /* @__PURE__ */ Y(m, {
1316
+ /* @__PURE__ */ q(P, { children: e.status ? /* @__PURE__ */ q(u, {
1309
1317
  tone: e.statusTone ?? "neutral",
1310
1318
  children: e.status
1311
1319
  }) : "—" }),
1312
- /* @__PURE__ */ Y(D, {
1320
+ /* @__PURE__ */ q(P, {
1313
1321
  align: "end",
1314
- children: /* @__PURE__ */ Y(_t, {
1322
+ children: /* @__PURE__ */ q(yt, {
1315
1323
  variant: e,
1316
1324
  index: t,
1317
- onSelectVariant: i,
1318
- onEditVariant: l,
1319
- onDuplicateVariant: u,
1320
- onDeleteVariant: d,
1321
- renderVariantActions: f
1325
+ onSelectVariant: o,
1326
+ onEditVariant: s,
1327
+ onDuplicateVariant: c,
1328
+ onDeleteVariant: l,
1329
+ renderVariantActions: d
1322
1330
  })
1323
1331
  })
1324
- ] }, e.id)) })] }), h]
1332
+ ] }, e.id)) })] }), p]
1325
1333
  });
1326
1334
  }
1327
- function yt({ value: e, field: t, align: n, label: r, onValueChange: i, onBlur: a }) {
1328
- let [o, s] = re($(e));
1329
- return /* @__PURE__ */ Y("span", {
1335
+ function xt({ value: e, field: t, align: n, label: r, onValueChange: i, onBlur: a }) {
1336
+ let [o, s] = ie($(e));
1337
+ return /* @__PURE__ */ q("span", {
1330
1338
  "data-field": t,
1331
1339
  "data-align": n,
1332
- className: Z.variantFieldCell,
1333
- children: /* @__PURE__ */ Y(T, {
1340
+ className: Y.variantFieldCell,
1341
+ children: /* @__PURE__ */ q(S, {
1334
1342
  value: o,
1335
1343
  "aria-label": r,
1336
1344
  onChange: (e) => {
1337
1345
  s(e.target.value), i?.(e.target.value);
1338
1346
  },
1339
1347
  onBlur: () => a?.(o),
1340
- className: Z.variantField
1348
+ className: Y.variantField
1341
1349
  })
1342
1350
  });
1343
1351
  }
1344
- function bt({ variants: t = [], optionGroups: r = [], groupByOptionId: i = null, visibleColumns: l = pt, optionCombinationDisplay: u = "tags", cellDisplay: d = "text", selectionMode: f = "multiple", renderOptionCombination: p, selectedVariantIds: h, defaultSelectedVariantIds: g, onSelectedVariantIdsChange: _, onVariantFieldChange: v, onVariantFieldBlur: y, onCreateVariant: b, onGenerateVariants: x, onSelectVariant: S, onEditVariant: C, onDuplicateVariant: ee, onDeleteVariant: w, onSetVariantImage: T, onBulkEdit: M, onBulkDelete: N, renderVariantActions: I, renderBulkActions: te, actions: ne, headerEnd: re, footerSlot: ie, empty: ae, surface: z = "card", className: oe, strings: se }) {
1345
- let B = {
1346
- ...Ae,
1347
- ...se
1348
- }, [ce, V] = q(() => g ?? []), [le, ue] = q([]), H = h ?? ce, W = ve(() => new Set(H), [H]), G = (e) => {
1349
- h === void 0 && V(e);
1350
- let n = new Set(e);
1351
- _?.(e, t.filter((e) => n.has(e.id)));
1352
- }, de = (e) => typeof d == "string" ? d : d[e] ?? "text", fe = ve(() => {
1353
- if (!i) return [{
1352
+ function St({ variants: e = [], optionGroups: t = [], groupByOptionId: o = null, visibleColumns: s = ht, optionCombinationDisplay: c = "tags", cellDisplay: l = "text", selectionMode: f = "multiple", renderOptionCombination: p, selectedVariantIds: g, defaultSelectedVariantIds: _, onSelectedVariantIdsChange: v, onVariantFieldChange: y, onVariantFieldBlur: x, onCreateVariant: S, onGenerateVariants: C, onSelectVariant: w, onEditVariant: T, onDuplicateVariant: E, onDeleteVariant: D, onSetVariantImage: O, onBulkEdit: k, onBulkDelete: A, renderVariantActions: j, renderBulkActions: M, actions: ne, headerEnd: re, footerSlot: ie, empty: ae, surface: L = "card", className: se, strings: ce }) {
1353
+ let z = {
1354
+ ...Ne,
1355
+ ...ce
1356
+ }, [le, B] = G(() => _ ?? []), [ue, de] = G([]), V = g ?? le, H = xe(() => new Set(V), [V]), W = (t) => {
1357
+ g === void 0 && B(t);
1358
+ let n = new Set(t);
1359
+ v?.(t, e.filter((e) => n.has(e.id)));
1360
+ }, fe = (e) => typeof l == "string" ? l : l[e] ?? "text", pe = xe(() => {
1361
+ if (!o) return [{
1354
1362
  key: "",
1355
1363
  option: "",
1356
1364
  value: "",
1357
- rows: t
1365
+ rows: e
1358
1366
  }];
1359
- let e = r.find((e) => e.id === i), n = /* @__PURE__ */ new Map(), a = [];
1360
- for (let e of t) {
1361
- let t = e.optionValueIds?.[i];
1362
- if (!t) {
1363
- a.push(e);
1367
+ let n = t.find((e) => e.id === o), r = /* @__PURE__ */ new Map(), i = [];
1368
+ for (let t of e) {
1369
+ let e = t.optionValueIds?.[o];
1370
+ if (!e) {
1371
+ i.push(t);
1364
1372
  continue;
1365
1373
  }
1366
- let r = n.get(t);
1367
- r ? r.push(e) : n.set(t, [e]);
1374
+ let n = r.get(e);
1375
+ n ? n.push(t) : r.set(e, [t]);
1368
1376
  }
1369
- let o = (e?.values ?? []).filter((e) => n.has(e.id)).map((t) => ({
1370
- key: t.id,
1371
- option: $(e?.name),
1372
- value: $(t.label),
1373
- rows: n.get(t.id) ?? []
1377
+ let a = (n?.values ?? []).filter((e) => r.has(e.id)).map((e) => ({
1378
+ key: e.id,
1379
+ option: $(n?.name),
1380
+ value: $(e.label),
1381
+ rows: r.get(e.id) ?? []
1374
1382
  }));
1375
- return a.length > 0 ? [...o, {
1383
+ return i.length > 0 ? [...a, {
1376
1384
  key: "__ungrouped",
1377
1385
  option: "",
1378
1386
  value: "",
1379
- rows: a
1380
- }] : o;
1387
+ rows: i
1388
+ }] : a;
1381
1389
  }, [
1382
- i,
1383
- r,
1384
- t
1385
- ]), pe = t.length === 0 && !ae, K = t.length > 0 && H.length === t.length, he = f === "multiple" && H.length > 0 && /* @__PURE__ */ Y(F, {
1390
+ o,
1391
+ t,
1392
+ e
1393
+ ]), me = e.length === 0 && !ae, he = e.length > 0 && V.length === e.length, _e = f === "multiple" && V.length > 0 && /* @__PURE__ */ q(d, {
1386
1394
  placement: "inline",
1387
- className: Z.bulkBar,
1388
- selectedCount: H.length,
1389
- totalCount: t.length,
1390
- onClear: () => G([]),
1395
+ className: Y.bulkBar,
1396
+ selectedCount: V.length,
1397
+ totalCount: e.length,
1398
+ onClear: () => W([]),
1391
1399
  strings: {
1392
- summary: (e, n) => B.selectedCount(e, n ?? t.length),
1393
- clear: B.clearSelection
1400
+ summary: (t, n) => z.selectedCount(t, n ?? e.length),
1401
+ clear: z.clearSelection
1394
1402
  },
1395
- children: te?.({
1396
- selectedRows: t.filter((e) => W.has(e.id)),
1397
- selectedIds: H,
1398
- allRows: t,
1399
- selectedCount: H.length,
1400
- totalCount: t.length,
1401
- allRowsSelected: K,
1402
- clearSelection: () => G([]),
1403
- setSelectedIds: G
1404
- }) ?? /* @__PURE__ */ X(J, { children: [!!M && /* @__PURE__ */ Y(a, {
1403
+ children: M?.({
1404
+ selectedRows: e.filter((e) => H.has(e.id)),
1405
+ selectedIds: V,
1406
+ allRows: e,
1407
+ selectedCount: V.length,
1408
+ totalCount: e.length,
1409
+ allRowsSelected: he,
1410
+ clearSelection: () => W([]),
1411
+ setSelectedIds: W
1412
+ }) ?? /* @__PURE__ */ J(K, { children: [!!k && /* @__PURE__ */ q(i, {
1405
1413
  type: "button",
1406
1414
  tone: "neutral",
1407
- buttonStyle: "outline",
1408
- onClick: () => M(t.filter((e) => W.has(e.id))),
1409
- children: B.bulkEditLabel
1410
- }), !!N && /* @__PURE__ */ Y(a, {
1415
+ appearance: "outline",
1416
+ onClick: () => k(e.filter((e) => H.has(e.id))),
1417
+ children: z.bulkEditLabel
1418
+ }), !!A && /* @__PURE__ */ q(i, {
1411
1419
  type: "button",
1412
1420
  tone: "destructive",
1413
- buttonStyle: "outline",
1414
- onClick: () => N(t.filter((e) => W.has(e.id))),
1415
- children: B.bulkDeleteLabel
1421
+ appearance: "outline",
1422
+ onClick: () => A(e.filter((e) => H.has(e.id))),
1423
+ children: z.bulkDeleteLabel
1416
1424
  })] })
1417
- }), _e = t.length === 0 ? ae ?? /* @__PURE__ */ Y(Q, {
1418
- title: B.emptyTitle,
1419
- description: B.emptyDescription,
1420
- action: x ? /* @__PURE__ */ X(a, {
1425
+ }), ve = e.length === 0 ? ae ?? /* @__PURE__ */ q(X, {
1426
+ title: z.emptyTitle,
1427
+ description: z.emptyDescription,
1428
+ action: C ? /* @__PURE__ */ J(i, {
1421
1429
  type: "button",
1422
- onClick: x,
1423
- children: [/* @__PURE__ */ Y(me, {}), B.generateLabel]
1430
+ onClick: C,
1431
+ children: [/* @__PURE__ */ q(ge, {}), z.generateLabel]
1424
1432
  }) : void 0
1425
- }) : /* @__PURE__ */ X(J, { children: [he, /* @__PURE__ */ X(j, { children: [/* @__PURE__ */ Y(E, { children: /* @__PURE__ */ X(O, { children: [
1426
- f === "multiple" && /* @__PURE__ */ Y(A, {
1427
- className: Z.selectCell,
1428
- children: /* @__PURE__ */ Y(P, {
1429
- checked: K,
1430
- indeterminate: H.length > 0 && !K,
1431
- onChange: (e) => G(e.target.checked ? t.map((e) => e.id) : []),
1432
- "aria-label": B.selectAllLabel
1433
+ }) : /* @__PURE__ */ J(K, { children: [_e, /* @__PURE__ */ J(te, { children: [/* @__PURE__ */ q(N, { children: /* @__PURE__ */ J(F, { children: [
1434
+ f === "multiple" && /* @__PURE__ */ q(I, {
1435
+ className: Y.selectCell,
1436
+ children: /* @__PURE__ */ q(b, {
1437
+ checked: he,
1438
+ indeterminate: V.length > 0 && !he,
1439
+ onChange: (t) => W(t.target.checked ? e.map((e) => e.id) : []),
1440
+ "aria-label": z.selectAllLabel
1433
1441
  })
1434
1442
  }),
1435
- l.map((e) => /* @__PURE__ */ Y(A, {
1443
+ s.map((e) => /* @__PURE__ */ q(I, {
1436
1444
  align: e === "price" || e === "inventory" ? "end" : "start",
1437
- children: B.columns[e === "updated" ? "updated" : e]
1445
+ children: z.columns[e === "updated" ? "updated" : e]
1438
1446
  }, e)),
1439
- /* @__PURE__ */ Y(A, {
1447
+ /* @__PURE__ */ q(I, {
1440
1448
  align: "end",
1441
- children: /* @__PURE__ */ Y(s, { children: B.columns.actions })
1449
+ children: /* @__PURE__ */ q(m, { children: z.columns.actions })
1442
1450
  })
1443
- ] }) }), /* @__PURE__ */ Y(k, { children: fe.map((e) => {
1444
- let t = e.rows.map((e) => e.id), o = t.every((e) => W.has(e)), s = !i || le.includes(e.key);
1445
- return /* @__PURE__ */ X(ge, { children: [!!i && /* @__PURE__ */ X(O, {
1446
- className: Z.groupRow,
1451
+ ] }) }), /* @__PURE__ */ q(ee, { children: pe.map((e) => {
1452
+ let r = e.rows.map((e) => e.id), a = r.every((e) => H.has(e)), l = !o || ue.includes(e.key);
1453
+ return /* @__PURE__ */ J(ye, { children: [!!o && /* @__PURE__ */ J(F, {
1454
+ className: Y.groupRow,
1447
1455
  children: [
1448
- f === "multiple" && /* @__PURE__ */ Y(D, {
1449
- className: Z.selectCell,
1450
- children: /* @__PURE__ */ Y(P, {
1451
- checked: o,
1452
- indeterminate: !o && t.some((e) => W.has(e)),
1453
- "aria-label": B.selectGroupLabel(e.key === "__ungrouped" ? String(B.ungrouped) : B.groupLabel(e.option, e.value)),
1454
- onChange: (e) => G(e.target.checked ? [.../* @__PURE__ */ new Set([...H, ...t])] : H.filter((e) => !t.includes(e)))
1456
+ f === "multiple" && /* @__PURE__ */ q(P, {
1457
+ className: Y.selectCell,
1458
+ children: /* @__PURE__ */ q(b, {
1459
+ checked: a,
1460
+ indeterminate: !a && r.some((e) => H.has(e)),
1461
+ "aria-label": z.selectGroupLabel(e.key === "__ungrouped" ? String(z.ungrouped) : z.groupLabel(e.option, e.value)),
1462
+ onChange: (e) => W(e.target.checked ? [.../* @__PURE__ */ new Set([...V, ...r])] : V.filter((e) => !r.includes(e)))
1455
1463
  })
1456
1464
  }),
1457
- l.map((t) => {
1465
+ s.map((t) => {
1458
1466
  if (t === "variant") {
1459
1467
  let r = e.rows.find((e) => e.image || e.media);
1460
- return /* @__PURE__ */ Y(D, { children: /* @__PURE__ */ X("span", {
1461
- className: Z.variantHead,
1462
- children: [/* @__PURE__ */ Y(Be, {
1468
+ return /* @__PURE__ */ q(P, { children: /* @__PURE__ */ J("span", {
1469
+ className: Y.variantHead,
1470
+ children: [/* @__PURE__ */ q(Ue, {
1463
1471
  src: r?.image,
1464
1472
  alt: r?.imageAlt,
1465
1473
  media: r?.media
1466
- }), /* @__PURE__ */ X("span", {
1467
- className: Z.variantCell,
1468
- children: [/* @__PURE__ */ Y(n, {
1474
+ }), /* @__PURE__ */ J("span", {
1475
+ className: Y.variantCell,
1476
+ children: [/* @__PURE__ */ q(n, {
1469
1477
  tag: "span",
1470
1478
  weight: "semibold",
1471
- children: e.key === "__ungrouped" ? B.ungrouped : B.groupLabel(e.option, e.value)
1472
- }), /* @__PURE__ */ Y(n, {
1479
+ children: e.key === "__ungrouped" ? z.ungrouped : z.groupLabel(e.option, e.value)
1480
+ }), /* @__PURE__ */ q(n, {
1473
1481
  tag: "span",
1474
1482
  size: "xs",
1475
1483
  type: "secondary",
1476
- children: B.groupCount(e.rows.length)
1484
+ children: z.groupCount(e.rows.length)
1477
1485
  })]
1478
1486
  })]
1479
1487
  }) }, t);
1480
1488
  }
1481
- return t === "price" || t === "inventory" ? /* @__PURE__ */ Y(D, {
1489
+ return t === "price" || t === "inventory" ? /* @__PURE__ */ q(P, {
1482
1490
  align: "end",
1483
- children: /* @__PURE__ */ Y(n, {
1491
+ children: /* @__PURE__ */ q(n, {
1484
1492
  tag: "span",
1485
1493
  weight: "medium",
1486
- className: Z.numeric,
1487
- children: t === "price" ? ht(e.rows.map((e) => e.price)) : gt(e.rows.map((e) => e.inventory))
1494
+ numeric: !0,
1495
+ children: t === "price" ? _t(e.rows.map((e) => e.price)) : vt(e.rows.map((e) => e.inventory))
1488
1496
  })
1489
- }, t) : /* @__PURE__ */ Y(D, {}, t);
1497
+ }, t) : /* @__PURE__ */ q(P, {}, t);
1490
1498
  }),
1491
- /* @__PURE__ */ Y(D, {
1499
+ /* @__PURE__ */ q(P, {
1492
1500
  align: "end",
1493
- children: /* @__PURE__ */ Y(a, {
1501
+ children: /* @__PURE__ */ q(i, {
1494
1502
  type: "button",
1495
1503
  tone: "neutral",
1496
- buttonStyle: "ghost",
1504
+ appearance: "ghost",
1497
1505
  iconOnly: !0,
1498
- "aria-expanded": s,
1499
- "aria-label": s ? B.collapseGroup : B.expandGroup,
1500
- onClick: () => ue((t) => s ? t.filter((t) => t !== e.key) : [...t, e.key]),
1501
- children: /* @__PURE__ */ Y(R, {
1502
- "data-expanded": s || void 0,
1503
- className: Z.groupChevron
1506
+ "aria-expanded": l,
1507
+ "aria-label": l ? z.collapseGroup : z.expandGroup,
1508
+ onClick: () => de((t) => l ? t.filter((t) => t !== e.key) : [...t, e.key]),
1509
+ children: /* @__PURE__ */ q(oe, {
1510
+ "data-expanded": l || void 0,
1511
+ className: Y.groupChevron
1504
1512
  })
1505
1513
  })
1506
1514
  })
1507
1515
  ]
1508
- }), s && e.rows.map((e, t) => {
1509
- let a = W.has(e.id);
1510
- return /* @__PURE__ */ X(O, {
1511
- "data-state": a ? "selected" : void 0,
1512
- "data-nested": i ? !0 : void 0,
1513
- className: Z.variantRow,
1516
+ }), l && e.rows.map((e, r) => {
1517
+ let i = H.has(e.id);
1518
+ return /* @__PURE__ */ J(F, {
1519
+ "data-state": i ? "selected" : void 0,
1520
+ "data-nested": o ? !0 : void 0,
1521
+ className: Y.variantRow,
1514
1522
  children: [
1515
- f === "multiple" && /* @__PURE__ */ Y(D, {
1516
- className: Z.selectCell,
1517
- children: /* @__PURE__ */ Y(P, {
1518
- checked: a,
1519
- onChange: (t) => G(t.target.checked ? [...H, e.id] : H.filter((t) => t !== e.id)),
1520
- "aria-label": B.selectRowLabel($(e.name))
1523
+ f === "multiple" && /* @__PURE__ */ q(P, {
1524
+ className: Y.selectCell,
1525
+ children: /* @__PURE__ */ q(b, {
1526
+ checked: i,
1527
+ onChange: (t) => W(t.target.checked ? [...V, e.id] : V.filter((t) => t !== e.id)),
1528
+ "aria-label": z.selectRowLabel($(e.name))
1521
1529
  })
1522
1530
  }),
1523
- l.map((a) => {
1524
- if (a === "variant") {
1525
- let t = r.filter((e) => e.id !== i).map((t) => e.optionValues?.[t.id]).filter(Boolean), o = i && t.length > 0 ? t.map($).join(" · ") : e.name;
1526
- return /* @__PURE__ */ Y(D, { children: /* @__PURE__ */ X("span", {
1527
- className: Z.variantHead,
1528
- children: [/* @__PURE__ */ Y(Be, {
1531
+ s.map((i) => {
1532
+ if (i === "variant") {
1533
+ let r = t.filter((e) => e.id !== o).map((t) => e.optionValues?.[t.id]).filter(Boolean), a = o && r.length > 0 ? r.map($).join(" · ") : e.name;
1534
+ return /* @__PURE__ */ q(P, { children: /* @__PURE__ */ J("span", {
1535
+ className: Y.variantHead,
1536
+ children: [/* @__PURE__ */ q(Ue, {
1529
1537
  src: e.image,
1530
1538
  alt: e.imageAlt,
1531
1539
  media: e.media,
1532
- label: T ? B.setImageLabel($(e.name)) : void 0,
1533
- onSelect: T ? () => T(e) : void 0
1534
- }), /* @__PURE__ */ X("span", {
1535
- className: Z.variantCell,
1536
- children: [/* @__PURE__ */ Y(n, {
1540
+ label: O ? z.setImageLabel($(e.name)) : void 0,
1541
+ onSelect: O ? () => O(e) : void 0
1542
+ }), /* @__PURE__ */ J("span", {
1543
+ className: Y.variantCell,
1544
+ children: [/* @__PURE__ */ q(n, {
1537
1545
  tag: "span",
1538
1546
  weight: "medium",
1539
- children: o
1540
- }), p?.(e, t) ?? (u === "tags" && !i && t.length > 0 ? /* @__PURE__ */ Y("span", {
1541
- className: Z.variantOptions,
1542
- children: t.map((e, t) => /* @__PURE__ */ Y(m, {
1547
+ children: a
1548
+ }), p?.(e, r) ?? (c === "tags" && !o && r.length > 0 ? /* @__PURE__ */ q("span", {
1549
+ className: Y.variantOptions,
1550
+ children: r.map((e, t) => /* @__PURE__ */ q(u, {
1543
1551
  tone: "neutral",
1544
1552
  children: e
1545
1553
  }, t))
1546
- }) : u === "text" && !i && t.length > 0 ? /* @__PURE__ */ Y(n, {
1554
+ }) : c === "text" && !o && r.length > 0 ? /* @__PURE__ */ q(n, {
1547
1555
  tag: "span",
1548
1556
  size: "xs",
1549
1557
  type: "secondary",
1550
- children: t.map($).join(" · ")
1558
+ children: r.map($).join(" · ")
1551
1559
  }) : null)]
1552
1560
  })]
1553
- }) }, a);
1561
+ }) }, i);
1554
1562
  }
1555
- if (a === "status") return /* @__PURE__ */ Y(D, { children: e.status ? /* @__PURE__ */ Y(m, {
1563
+ if (i === "status") return /* @__PURE__ */ q(P, { children: e.status ? /* @__PURE__ */ q(u, {
1556
1564
  tone: e.statusTone ?? "neutral",
1557
1565
  children: e.status
1558
- }) : "—" }, a);
1559
- if (a === "updated") return /* @__PURE__ */ Y(D, { children: e.updatedAt ?? "—" }, a);
1560
- let o = mt[a], s = o ? e[o] : void 0, c = a === "price" || a === "inventory" ? "end" : "start";
1561
- return o && de(o) === "field" ? /* @__PURE__ */ Y(D, {
1562
- align: c,
1563
- children: /* @__PURE__ */ Y(yt, {
1566
+ }) : "—" }, i);
1567
+ if (i === "updated") return /* @__PURE__ */ q(P, { children: e.updatedAt ?? "—" }, i);
1568
+ let a = gt[i], s = a ? e[a] : void 0, l = i === "price" || i === "inventory" ? "end" : "start";
1569
+ return a && fe(a) === "field" ? /* @__PURE__ */ q(P, {
1570
+ align: l,
1571
+ children: /* @__PURE__ */ q(xt, {
1564
1572
  value: s,
1565
- field: o,
1566
- align: c,
1567
- label: `${B.columns[a]}: ${$(e.name)}`,
1568
- onValueChange: (n) => v?.(e, o, n, {
1569
- index: t,
1570
- field: o,
1573
+ field: a,
1574
+ align: l,
1575
+ label: `${z.columns[i]}: ${$(e.name)}`,
1576
+ onValueChange: (t) => y?.(e, a, t, {
1577
+ index: r,
1578
+ field: a,
1571
1579
  previousValue: s,
1572
- value: n
1580
+ value: t
1573
1581
  }),
1574
- onBlur: (n) => y?.(e, o, n, {
1575
- index: t,
1576
- field: o,
1582
+ onBlur: (t) => x?.(e, a, t, {
1583
+ index: r,
1584
+ field: a,
1577
1585
  previousValue: s,
1578
- value: n
1586
+ value: t
1579
1587
  })
1580
1588
  })
1581
- }, a) : /* @__PURE__ */ Y(D, {
1582
- align: c,
1589
+ }, i) : /* @__PURE__ */ q(P, {
1590
+ align: l,
1583
1591
  children: s ?? "—"
1584
- }, a);
1592
+ }, i);
1585
1593
  }),
1586
- /* @__PURE__ */ Y(D, {
1594
+ /* @__PURE__ */ q(P, {
1587
1595
  align: "end",
1588
- children: /* @__PURE__ */ Y(_t, {
1596
+ children: /* @__PURE__ */ q(yt, {
1589
1597
  variant: e,
1590
- index: t,
1591
- onSelectVariant: S,
1592
- onEditVariant: C,
1593
- onDuplicateVariant: ee,
1594
- onDeleteVariant: w,
1595
- renderVariantActions: I
1598
+ index: r,
1599
+ onSelectVariant: w,
1600
+ onEditVariant: T,
1601
+ onDuplicateVariant: E,
1602
+ onDeleteVariant: D,
1603
+ renderVariantActions: j
1596
1604
  })
1597
1605
  })
1598
1606
  ]
1599
1607
  }, e.id);
1600
1608
  })] }, e.key);
1601
1609
  }) })] })] });
1602
- return z === "embedded" ? /* @__PURE__ */ X("div", {
1603
- className: e("product-variants-bulk-table--component", Z.variants, oe),
1604
- children: [_e, ie]
1605
- }) : /* @__PURE__ */ X(c, {
1610
+ return L === "embedded" ? /* @__PURE__ */ J("div", {
1611
+ className: r("product-variants-bulk-table--component", Y.variants, se),
1612
+ children: [ve, ie]
1613
+ }) : /* @__PURE__ */ J(h, {
1606
1614
  surface: "bordered",
1607
- icon: /* @__PURE__ */ Y(L, {}),
1608
- title: B.title,
1609
- description: B.description,
1610
- headerEnd: /* @__PURE__ */ X(J, { children: [
1615
+ icon: /* @__PURE__ */ q(R, {}),
1616
+ title: z.title,
1617
+ description: z.description,
1618
+ headerEnd: /* @__PURE__ */ J(K, { children: [
1611
1619
  re,
1612
- !!x && !pe && /* @__PURE__ */ X(a, {
1620
+ !!C && !me && /* @__PURE__ */ J(i, {
1613
1621
  type: "button",
1614
1622
  tone: "neutral",
1615
- buttonStyle: "ghost",
1616
- onClick: x,
1617
- children: [/* @__PURE__ */ Y(me, {}), B.generateLabel]
1623
+ appearance: "ghost",
1624
+ onClick: C,
1625
+ children: [/* @__PURE__ */ q(ge, {}), z.generateLabel]
1618
1626
  }),
1619
- !!b && /* @__PURE__ */ X(a, {
1627
+ !!S && /* @__PURE__ */ J(i, {
1620
1628
  type: "button",
1621
1629
  tone: "neutral",
1622
- buttonStyle: "ghost",
1623
- onClick: b,
1624
- children: [/* @__PURE__ */ Y(U, {}), B.createLabel]
1630
+ appearance: "ghost",
1631
+ onClick: S,
1632
+ children: [/* @__PURE__ */ q(U, {}), z.createLabel]
1625
1633
  }),
1626
- !!ne?.length && /* @__PURE__ */ Y(o, { actions: ne })
1634
+ !!ne?.length && /* @__PURE__ */ q(a, { actions: ne })
1627
1635
  ] }),
1628
- className: e("product-variants-bulk-table--component", Z.card, oe),
1629
- children: [_e, ie]
1636
+ className: r("product-variants-bulk-table--component", Y.card, se),
1637
+ children: [ve, ie]
1630
1638
  });
1631
1639
  }
1632
- function xt({ className: t, strings: r, optionsStrings: i, variantsStrings: o, optionGroups: s = [], editingOptionId: c, defaultEditingOptionId: l, onEditingOptionIdChange: u, onCreateOption: d, onEditOption: f, onDeleteOption: p, onAddValue: m, onDeleteValue: h, onOptionNameChange: g, onValueLabelChange: _, onSaveEditingOption: v, onCancelEditingOption: y, onToggleUsedForVariants: b, onReorderOptions: x, confirmDelete: S, groupByOptionId: C, defaultGroupByOptionId: ee = null, onGroupByOptionIdChange: w, showGroupBy: T = !0, ...E }) {
1633
- let D = {
1634
- ...je,
1635
- ...r
1636
- }, O = {
1637
- ...Ae,
1640
+ function Ct({ className: e, strings: t, optionsStrings: a, variantsStrings: o, optionGroups: s = [], editingOptionId: c, defaultEditingOptionId: l, onEditingOptionIdChange: u, onCreateOption: d, onEditOption: f, onDeleteOption: p, onAddValue: m, onDeleteValue: h, onOptionNameChange: g, onValueLabelChange: _, onSaveEditingOption: v, onCancelEditingOption: b, onToggleUsedForVariants: x, onReorderOptions: S, confirmDelete: C, groupByOptionId: w, defaultGroupByOptionId: T = null, onGroupByOptionIdChange: E, showGroupBy: D = !0, ...O }) {
1641
+ let k = {
1642
+ ...Pe,
1643
+ ...t
1644
+ }, A = {
1645
+ ...Ne,
1638
1646
  ...o
1639
- }, [k, A] = q(ee), j = C === void 0 ? k : C, M = (e) => {
1640
- C === void 0 && A(e), w?.(e);
1641
- }, P = s.filter((e) => e.usedForVariants ?? !0);
1642
- return /* @__PURE__ */ X("section", {
1643
- className: e("product-variants-manager--component", Z.manager, t),
1647
+ }, [j, M] = G(T), N = w === void 0 ? j : w, P = (e) => {
1648
+ w === void 0 && M(e), E?.(e);
1649
+ }, F = s.filter((e) => e.usedForVariants ?? !0);
1650
+ return /* @__PURE__ */ J("section", {
1651
+ className: r("product-variants-manager--component", Y.manager, e),
1644
1652
  children: [
1645
- /* @__PURE__ */ X("header", {
1646
- className: Z.managerHead,
1647
- children: [/* @__PURE__ */ X("span", {
1648
- className: Z.managerTitle,
1649
- children: [/* @__PURE__ */ Y(L, { "aria-hidden": !0 }), /* @__PURE__ */ Y(n, {
1653
+ /* @__PURE__ */ J("header", {
1654
+ className: Y.managerHead,
1655
+ children: [/* @__PURE__ */ J("span", {
1656
+ className: Y.managerTitle,
1657
+ children: [/* @__PURE__ */ q(R, { "aria-hidden": !0 }), /* @__PURE__ */ q(n, {
1650
1658
  tag: "span",
1651
1659
  weight: "semibold",
1652
- children: D.title
1660
+ children: k.title
1653
1661
  })]
1654
- }), /* @__PURE__ */ X("div", {
1655
- className: Z.managerActions,
1656
- children: [!!E.onGenerateVariants && /* @__PURE__ */ X(a, {
1662
+ }), /* @__PURE__ */ J("div", {
1663
+ className: Y.managerActions,
1664
+ children: [!!O.onGenerateVariants && /* @__PURE__ */ J(i, {
1657
1665
  type: "button",
1658
1666
  tone: "neutral",
1659
- buttonStyle: "ghost",
1660
- onClick: E.onGenerateVariants,
1661
- children: [/* @__PURE__ */ Y(me, {}), O.generateLabel]
1662
- }), !!E.onCreateVariant && /* @__PURE__ */ X(a, {
1667
+ appearance: "ghost",
1668
+ onClick: O.onGenerateVariants,
1669
+ children: [/* @__PURE__ */ q(ge, {}), A.generateLabel]
1670
+ }), !!O.onCreateVariant && /* @__PURE__ */ J(i, {
1663
1671
  type: "button",
1664
1672
  tone: "neutral",
1665
- buttonStyle: "ghost",
1666
- onClick: E.onCreateVariant,
1667
- children: [/* @__PURE__ */ Y(U, {}), O.createLabel]
1673
+ appearance: "ghost",
1674
+ onClick: O.onCreateVariant,
1675
+ children: [/* @__PURE__ */ q(U, {}), A.createLabel]
1668
1676
  })]
1669
1677
  })]
1670
1678
  }),
1671
- /* @__PURE__ */ Y("div", {
1672
- className: Z.managerOptions,
1673
- children: /* @__PURE__ */ Y(ft, {
1679
+ /* @__PURE__ */ q("div", {
1680
+ className: Y.managerOptions,
1681
+ children: /* @__PURE__ */ q(mt, {
1674
1682
  surface: "embedded",
1675
1683
  optionGroups: s,
1676
1684
  editingOptionId: c,
@@ -1684,37 +1692,37 @@ function xt({ className: t, strings: r, optionsStrings: i, variantsStrings: o, o
1684
1692
  onOptionNameChange: g,
1685
1693
  onValueLabelChange: _,
1686
1694
  onSaveEditingOption: v,
1687
- onCancelEditingOption: y,
1688
- onToggleUsedForVariants: b,
1689
- onReorderOptions: x,
1690
- confirmDelete: S,
1691
- strings: i
1695
+ onCancelEditingOption: b,
1696
+ onToggleUsedForVariants: x,
1697
+ onReorderOptions: S,
1698
+ confirmDelete: C,
1699
+ strings: a
1692
1700
  })
1693
1701
  }),
1694
- T && P.length > 1 && /* @__PURE__ */ X("div", {
1695
- className: Z.managerToolbar,
1696
- children: [/* @__PURE__ */ Y(n, {
1702
+ D && F.length > 1 && /* @__PURE__ */ J("div", {
1703
+ className: Y.managerToolbar,
1704
+ children: [/* @__PURE__ */ q(n, {
1697
1705
  tag: "span",
1698
1706
  type: "secondary",
1699
- children: D.groupByLabel
1700
- }), /* @__PURE__ */ Y(N, {
1701
- "aria-label": D.groupByLabel,
1702
- value: j,
1707
+ children: k.groupByLabel
1708
+ }), /* @__PURE__ */ q(y, {
1709
+ "aria-label": k.groupByLabel,
1710
+ value: N,
1703
1711
  allowClear: !0,
1704
- strings: { clear: D.groupByNone },
1705
- options: P.map((e) => ({
1712
+ strings: { clear: k.groupByNone },
1713
+ options: F.map((e) => ({
1706
1714
  value: e.id,
1707
1715
  label: typeof e.name == "string" ? e.name : e.id
1708
1716
  })),
1709
- onValueChange: (e) => M(e ?? null),
1710
- className: Z.managerGroupBy
1717
+ onValueChange: (e) => P(e ?? null),
1718
+ className: Y.managerGroupBy
1711
1719
  })]
1712
1720
  }),
1713
- /* @__PURE__ */ Y(bt, {
1714
- ...E,
1721
+ /* @__PURE__ */ q(St, {
1722
+ ...O,
1715
1723
  surface: "embedded",
1716
1724
  optionGroups: s,
1717
- groupByOptionId: j,
1725
+ groupByOptionId: N,
1718
1726
  strings: o
1719
1727
  })
1720
1728
  ]
@@ -1722,10 +1730,10 @@ function xt({ className: t, strings: r, optionsStrings: i, variantsStrings: o, o
1722
1730
  }
1723
1731
  //#endregion
1724
1732
  //#region src/components/features/products/product-variant-details.tsx
1725
- function St(e) {
1733
+ function wt(e) {
1726
1734
  return e != null && e !== !1 && e !== "";
1727
1735
  }
1728
- function Ct(e, t) {
1736
+ function Tt(e, t) {
1729
1737
  return [
1730
1738
  {
1731
1739
  id: "price",
@@ -1752,154 +1760,154 @@ function Ct(e, t) {
1752
1760
  label: t.updated,
1753
1761
  value: e.updatedAt
1754
1762
  }
1755
- ].filter((e) => St(e.value));
1763
+ ].filter((e) => wt(e.value));
1756
1764
  }
1757
- function wt({ variant: n, metadata: r, optionItems: i = [], media: s, onBack: u, onSelectVariant: d, onEditVariant: f, onDuplicateVariant: p, onDeleteVariant: h, onSelectOption: g, actions: _, headerEnd: y, footerSlot: b, empty: x, renderActions: S, renderMetadata: C, renderOption: w, className: T, strings: E }) {
1758
- let D = ee(Ie, E), O = n ? r ?? Ct(n, D.metadata) : [], k = !!(n && (d || f || p || h || S)), A = n?.options ?? [];
1759
- return /* @__PURE__ */ X(c, {
1765
+ function Et({ variant: t, metadata: n, optionItems: o = [], media: c, onBack: l, onSelectVariant: d, onEditVariant: f, onDuplicateVariant: p, onDeleteVariant: m, onSelectOption: _, actions: v, headerEnd: y, footerSlot: b, empty: x, renderActions: S, renderMetadata: C, renderOption: w, className: T, strings: E }) {
1766
+ let O = s(ze, E), k = t ? n ?? Tt(t, O.metadata) : [], A = !!(t && (d || f || p || m || S)), j = t?.options ?? [];
1767
+ return /* @__PURE__ */ J(h, {
1760
1768
  surface: "bordered",
1761
- icon: /* @__PURE__ */ Y(ue, {}),
1762
- title: n?.name ?? D.title,
1763
- titleSuffix: n?.status ? /* @__PURE__ */ Y(m, {
1764
- tone: n.statusTone ?? "neutral",
1765
- children: n.status
1769
+ icon: /* @__PURE__ */ q(V, {}),
1770
+ title: t?.name ?? O.title,
1771
+ titleSuffix: t?.status ? /* @__PURE__ */ q(u, {
1772
+ tone: t.statusTone ?? "neutral",
1773
+ children: t.status
1766
1774
  }) : void 0,
1767
- description: n?.description ?? D.description,
1768
- headerEnd: /* @__PURE__ */ X(J, { children: [
1769
- !!u && /* @__PURE__ */ X(a, {
1775
+ description: t?.description ?? O.description,
1776
+ headerEnd: /* @__PURE__ */ J(K, { children: [
1777
+ !!l && /* @__PURE__ */ J(i, {
1770
1778
  type: "button",
1771
1779
  tone: "neutral",
1772
- buttonStyle: "ghost",
1773
- onClick: u,
1774
- children: [/* @__PURE__ */ Y(ae, {}), D.backLabel]
1780
+ appearance: "ghost",
1781
+ onClick: l,
1782
+ children: [/* @__PURE__ */ q(L, {}), O.backLabel]
1775
1783
  }),
1776
- !!k && !!n && /* @__PURE__ */ Y(_t, {
1777
- variant: n,
1784
+ !!A && !!t && /* @__PURE__ */ q(yt, {
1785
+ variant: t,
1778
1786
  onSelectVariant: d,
1779
1787
  onEditVariant: f,
1780
1788
  onDuplicateVariant: p,
1781
- onDeleteVariant: h,
1789
+ onDeleteVariant: m,
1782
1790
  renderVariantActions: S
1783
1791
  }),
1784
1792
  y,
1785
- !!_?.length && /* @__PURE__ */ Y(o, { actions: _ })
1793
+ !!v?.length && /* @__PURE__ */ q(a, { actions: v })
1786
1794
  ] }),
1787
- className: e("product-variant-details--component", Z.card, T),
1788
- children: [n ? /* @__PURE__ */ X(J, { children: [
1789
- !!s && /* @__PURE__ */ Y("div", {
1790
- className: Z.media,
1791
- children: s
1795
+ className: r("product-variant-details--component", Y.card, T),
1796
+ children: [t ? /* @__PURE__ */ J(K, { children: [
1797
+ !!c && /* @__PURE__ */ q("div", {
1798
+ className: Y.media,
1799
+ children: c
1792
1800
  }),
1793
- C ? C(n) : /* @__PURE__ */ Y(l, {
1794
- title: D.factsTitle,
1795
- items: O,
1801
+ C ? C(t) : /* @__PURE__ */ q(g, {
1802
+ title: O.factsTitle,
1803
+ items: k,
1796
1804
  columns: 3,
1797
- density: "compact"
1805
+ size: "sm"
1798
1806
  }),
1799
- A.length > 0 && /* @__PURE__ */ X("section", {
1800
- className: Z.section,
1801
- children: [/* @__PURE__ */ Y(t, { children: D.selectedOptionsTitle }), /* @__PURE__ */ Y("div", {
1802
- className: Z.rowValues,
1803
- children: A.map((e, t) => /* @__PURE__ */ Y(m, {
1807
+ j.length > 0 && /* @__PURE__ */ J("section", {
1808
+ className: Y.section,
1809
+ children: [/* @__PURE__ */ q(e, { children: O.selectedOptionsTitle }), /* @__PURE__ */ q("div", {
1810
+ className: Y.rowValues,
1811
+ children: j.map((e, t) => /* @__PURE__ */ q(u, {
1804
1812
  tone: "neutral",
1805
1813
  children: e
1806
1814
  }, t))
1807
1815
  })]
1808
1816
  }),
1809
- i.length > 0 && /* @__PURE__ */ X("section", {
1810
- className: Z.section,
1811
- children: [/* @__PURE__ */ Y(t, { children: D.relatedOptionsTitle }), /* @__PURE__ */ Y(v, { children: i.map((e, t) => w ? /* @__PURE__ */ Y("div", { children: w(e, t) }, e.id) : /* @__PURE__ */ Y(Ke, {
1817
+ o.length > 0 && /* @__PURE__ */ J("section", {
1818
+ className: Y.section,
1819
+ children: [/* @__PURE__ */ q(e, { children: O.relatedOptionsTitle }), /* @__PURE__ */ q(D, { children: o.map((e, t) => w ? /* @__PURE__ */ q("div", { children: w(e, t) }, e.id) : /* @__PURE__ */ q(Ye, {
1812
1820
  item: e,
1813
- actionLabel: D.viewOptionLabel,
1814
- onSelect: g ? () => g(e) : void 0
1821
+ actionLabel: O.viewOptionLabel,
1822
+ onSelect: _ ? () => _(e) : void 0
1815
1823
  }, e.id)) })]
1816
1824
  })
1817
- ] }) : x ?? /* @__PURE__ */ Y(Q, {
1818
- title: D.emptyTitle,
1819
- description: D.emptyDescription
1825
+ ] }) : x ?? /* @__PURE__ */ q(X, {
1826
+ title: O.emptyTitle,
1827
+ description: O.emptyDescription
1820
1828
  }), b]
1821
1829
  });
1822
1830
  }
1823
1831
  //#endregion
1824
1832
  //#region src/components/features/products/product-variant-editor.tsx
1825
- function Tt(e) {
1833
+ function Dt(e) {
1826
1834
  return e.map((e) => ({
1827
1835
  value: e.value,
1828
1836
  label: e.label,
1829
1837
  disabled: e.disabled
1830
1838
  }));
1831
1839
  }
1832
- function Et({ value: n, defaultValue: r, optionFields: i = [], statusOptions: s = [], onValueChange: l, onSubmit: u, onError: d, onCancel: f, onDelete: p, actions: m, headerEnd: h, footerSlot: g, disabled: _ = !1, submitting: v = !1, className: y, strings: b }) {
1833
- let x = ee(Le, b), S = _e(), E = n !== void 0, [D, O] = q(() => r ?? {}), [k, A] = q(!1), j = (E ? n : D) ?? {}, M = v || k, P = _ || M, F = (e) => {
1834
- E || O(e), l?.(e);
1840
+ function Ot({ value: t, defaultValue: n, optionFields: o = [], statusOptions: c = [], onValueChange: l, onSubmit: u, onError: d, onCancel: f, onDelete: p, actions: m, headerEnd: g, footerSlot: _, disabled: v = !1, submitting: b = !1, className: w, strings: T }) {
1841
+ let E = s(Be, T), D = be(), O = t !== void 0, [k, A] = G(() => n ?? {}), [j, M] = G(!1), N = (O ? t : k) ?? {}, P = b || j, F = v || P, ee = (e) => {
1842
+ O || A(e), l?.(e);
1835
1843
  }, I = (e, t) => {
1836
- F({
1837
- ...j,
1844
+ ee({
1845
+ ...N,
1838
1846
  [e]: t
1839
1847
  });
1840
1848
  }, te = (e, t) => {
1841
- F({
1842
- ...j,
1849
+ ee({
1850
+ ...N,
1843
1851
  options: {
1844
- ...j.options ?? {},
1852
+ ...N.options ?? {},
1845
1853
  [e.id]: t
1846
1854
  }
1847
1855
  });
1848
1856
  }, ne = async (e) => {
1849
- if (e.preventDefault(), !(!u || M)) {
1850
- A(!0);
1857
+ if (e.preventDefault(), !(!u || P)) {
1858
+ M(!0);
1851
1859
  try {
1852
- await u(j);
1860
+ await u(N);
1853
1861
  } catch (e) {
1854
1862
  d?.(e);
1855
1863
  } finally {
1856
- A(!1);
1864
+ M(!1);
1857
1865
  }
1858
1866
  }
1859
1867
  }, re = !!(p || f || u);
1860
- return /* @__PURE__ */ X(c, {
1868
+ return /* @__PURE__ */ J(h, {
1861
1869
  surface: "bordered",
1862
- icon: /* @__PURE__ */ Y(H, {}),
1863
- title: x.title,
1864
- description: x.description,
1865
- headerEnd: /* @__PURE__ */ X(J, { children: [h, !!m?.length && /* @__PURE__ */ Y(o, { actions: m })] }),
1866
- className: e("product-variant-editor--component", Z.editor, y),
1867
- children: [/* @__PURE__ */ X("form", {
1868
- id: S,
1869
- className: Z.editorForm,
1870
+ icon: /* @__PURE__ */ q(H, {}),
1871
+ title: E.title,
1872
+ description: E.description,
1873
+ headerEnd: /* @__PURE__ */ J(K, { children: [g, !!m?.length && /* @__PURE__ */ q(a, { actions: m })] }),
1874
+ className: r("product-variant-editor--component", Y.editor, w),
1875
+ children: [/* @__PURE__ */ J("form", {
1876
+ id: D,
1877
+ className: Y.editorForm,
1870
1878
  onSubmit: ne,
1871
1879
  children: [
1872
- /* @__PURE__ */ X("section", {
1873
- className: Z.section,
1874
- children: [/* @__PURE__ */ Y(t, { children: x.identityTitle }), /* @__PURE__ */ X("div", {
1875
- className: Z.fields,
1880
+ /* @__PURE__ */ J("section", {
1881
+ className: Y.section,
1882
+ children: [/* @__PURE__ */ q(e, { children: E.identityTitle }), /* @__PURE__ */ J("div", {
1883
+ className: Y.fields,
1876
1884
  children: [
1877
- /* @__PURE__ */ Y(C, {
1878
- label: x.fields.name,
1885
+ /* @__PURE__ */ q(C, {
1886
+ label: E.fields.name,
1879
1887
  required: !0,
1880
- children: /* @__PURE__ */ Y(T, {
1881
- value: j.name ?? "",
1882
- placeholder: x.placeholders.name,
1883
- disabled: P,
1888
+ children: /* @__PURE__ */ q(S, {
1889
+ value: N.name ?? "",
1890
+ placeholder: E.placeholders.name,
1891
+ disabled: F,
1884
1892
  onChange: (e) => I("name", e.target.value)
1885
1893
  })
1886
1894
  }),
1887
- /* @__PURE__ */ Y(C, {
1888
- label: x.fields.sku,
1889
- children: /* @__PURE__ */ Y(T, {
1890
- value: j.sku ?? "",
1891
- placeholder: x.placeholders.sku,
1892
- disabled: P,
1895
+ /* @__PURE__ */ q(C, {
1896
+ label: E.fields.sku,
1897
+ children: /* @__PURE__ */ q(S, {
1898
+ value: N.sku ?? "",
1899
+ placeholder: E.placeholders.sku,
1900
+ disabled: F,
1893
1901
  onChange: (e) => I("sku", e.target.value)
1894
1902
  })
1895
1903
  }),
1896
- /* @__PURE__ */ Y(C, {
1897
- label: x.fields.description,
1898
- className: Z.fieldWide,
1899
- children: /* @__PURE__ */ Y(w, {
1900
- value: j.description ?? "",
1901
- placeholder: x.placeholders.description,
1902
- disabled: P,
1904
+ /* @__PURE__ */ q(C, {
1905
+ label: E.fields.description,
1906
+ className: Y.fieldWide,
1907
+ children: /* @__PURE__ */ q(x, {
1908
+ value: N.description ?? "",
1909
+ placeholder: E.placeholders.description,
1910
+ disabled: F,
1903
1911
  minRows: 2,
1904
1912
  onChange: (e) => I("description", e.target.value)
1905
1913
  })
@@ -1907,78 +1915,78 @@ function Et({ value: n, defaultValue: r, optionFields: i = [], statusOptions: s
1907
1915
  ]
1908
1916
  })]
1909
1917
  }),
1910
- /* @__PURE__ */ X("section", {
1911
- className: Z.section,
1912
- children: [/* @__PURE__ */ Y(t, { children: x.commercialTitle }), /* @__PURE__ */ X("div", {
1913
- className: Z.fields,
1918
+ /* @__PURE__ */ J("section", {
1919
+ className: Y.section,
1920
+ children: [/* @__PURE__ */ q(e, { children: E.commercialTitle }), /* @__PURE__ */ J("div", {
1921
+ className: Y.fields,
1914
1922
  children: [
1915
- /* @__PURE__ */ Y(C, {
1916
- label: x.fields.price,
1917
- children: /* @__PURE__ */ Y(T, {
1918
- value: j.price ?? "",
1919
- placeholder: x.placeholders.price,
1920
- disabled: P,
1923
+ /* @__PURE__ */ q(C, {
1924
+ label: E.fields.price,
1925
+ children: /* @__PURE__ */ q(S, {
1926
+ value: N.price ?? "",
1927
+ placeholder: E.placeholders.price,
1928
+ disabled: F,
1921
1929
  onChange: (e) => I("price", e.target.value)
1922
1930
  })
1923
1931
  }),
1924
- /* @__PURE__ */ Y(C, {
1925
- label: x.fields.inventory,
1926
- children: /* @__PURE__ */ Y(T, {
1927
- value: j.inventory ?? "",
1928
- placeholder: x.placeholders.inventory,
1929
- disabled: P,
1932
+ /* @__PURE__ */ q(C, {
1933
+ label: E.fields.inventory,
1934
+ children: /* @__PURE__ */ q(S, {
1935
+ value: N.inventory ?? "",
1936
+ placeholder: E.placeholders.inventory,
1937
+ disabled: F,
1930
1938
  inputMode: "numeric",
1931
1939
  onChange: (e) => I("inventory", e.target.value)
1932
1940
  })
1933
1941
  }),
1934
- /* @__PURE__ */ Y(C, {
1935
- label: x.fields.status,
1936
- children: s.length > 0 ? /* @__PURE__ */ Y(N, {
1937
- options: Tt(s),
1938
- value: j.status ?? null,
1939
- placeholder: x.statusPlaceholder,
1940
- disabled: P,
1941
- "aria-label": x.fields.status,
1942
+ /* @__PURE__ */ q(C, {
1943
+ label: E.fields.status,
1944
+ children: c.length > 0 ? /* @__PURE__ */ q(y, {
1945
+ options: Dt(c),
1946
+ value: N.status ?? null,
1947
+ placeholder: E.statusPlaceholder,
1948
+ disabled: F,
1949
+ "aria-label": E.fields.status,
1942
1950
  onValueChange: (e) => I("status", e ?? "")
1943
- }) : /* @__PURE__ */ Y(T, {
1944
- value: j.status ?? "",
1945
- placeholder: x.placeholders.status,
1946
- disabled: P,
1951
+ }) : /* @__PURE__ */ q(S, {
1952
+ value: N.status ?? "",
1953
+ placeholder: E.placeholders.status,
1954
+ disabled: F,
1947
1955
  onChange: (e) => I("status", e.target.value)
1948
1956
  })
1949
1957
  }),
1950
- /* @__PURE__ */ Y(C, {
1951
- label: x.fields.channels,
1952
- children: /* @__PURE__ */ Y(T, {
1953
- value: j.channels ?? "",
1954
- placeholder: x.placeholders.channels,
1955
- disabled: P,
1958
+ /* @__PURE__ */ q(C, {
1959
+ label: E.fields.channels,
1960
+ children: /* @__PURE__ */ q(S, {
1961
+ value: N.channels ?? "",
1962
+ placeholder: E.placeholders.channels,
1963
+ disabled: F,
1956
1964
  onChange: (e) => I("channels", e.target.value)
1957
1965
  })
1958
1966
  })
1959
1967
  ]
1960
1968
  })]
1961
1969
  }),
1962
- i.length > 0 && /* @__PURE__ */ X("section", {
1963
- className: Z.section,
1964
- children: [/* @__PURE__ */ Y(t, { children: x.optionsTitle }), /* @__PURE__ */ Y("div", {
1965
- className: Z.fields,
1966
- children: i.map((e) => {
1967
- let t = e.value ?? j.options?.[e.id] ?? "";
1968
- return /* @__PURE__ */ Y(C, {
1970
+ o.length > 0 && /* @__PURE__ */ J("section", {
1971
+ className: Y.section,
1972
+ children: [/* @__PURE__ */ q(e, { children: E.optionsTitle }), /* @__PURE__ */ q("div", {
1973
+ className: Y.fields,
1974
+ children: o.map((e) => {
1975
+ let t = e.value ?? N.options?.[e.id] ?? "";
1976
+ return /* @__PURE__ */ q(C, {
1969
1977
  label: e.label,
1970
1978
  helperText: e.helperText,
1971
- children: e.choices?.length ? /* @__PURE__ */ Y(N, {
1972
- options: Tt(e.choices),
1979
+ children: e.choices?.length ? /* @__PURE__ */ q(y, {
1980
+ options: Dt(e.choices),
1973
1981
  value: t || null,
1974
- placeholder: e.placeholder ?? x.optionPlaceholder,
1975
- disabled: P,
1982
+ placeholder: e.placeholder ?? E.optionPlaceholder,
1983
+ disabled: F,
1976
1984
  "aria-label": e.label,
1977
1985
  onValueChange: (t) => te(e, t)
1978
- }) : /* @__PURE__ */ Y(T, {
1986
+ }) : /* @__PURE__ */ q(S, {
1979
1987
  value: t,
1980
- placeholder: e.placeholder ?? x.optionPlaceholder,
1981
- disabled: P,
1988
+ placeholder: e.placeholder ?? E.optionPlaceholder,
1989
+ disabled: F,
1982
1990
  onChange: (t) => te(e, t.target.value)
1983
1991
  })
1984
1992
  }, e.id);
@@ -1986,34 +1994,34 @@ function Et({ value: n, defaultValue: r, optionFields: i = [], statusOptions: s
1986
1994
  })]
1987
1995
  })
1988
1996
  ]
1989
- }), g ?? (re && /* @__PURE__ */ X("div", {
1990
- className: Z.editorFooter,
1991
- children: [/* @__PURE__ */ Y("div", { children: !!p && /* @__PURE__ */ X(a, {
1997
+ }), _ ?? (re && /* @__PURE__ */ J("div", {
1998
+ className: Y.editorFooter,
1999
+ children: [/* @__PURE__ */ q("div", { children: !!p && /* @__PURE__ */ J(i, {
1992
2000
  type: "button",
1993
2001
  tone: "destructive",
1994
- buttonStyle: "ghost",
1995
- disabled: P,
1996
- onClick: () => p(j),
1997
- children: [/* @__PURE__ */ Y(K, {}), x.deleteLabel]
1998
- }) }), /* @__PURE__ */ X("div", {
1999
- className: Z.editorFooterEnd,
2000
- children: [!!f && /* @__PURE__ */ X(a, {
2002
+ appearance: "ghost",
2003
+ disabled: F,
2004
+ onClick: () => p(N),
2005
+ children: [/* @__PURE__ */ q(_e, {}), E.deleteLabel]
2006
+ }) }), /* @__PURE__ */ J("div", {
2007
+ className: Y.editorFooterEnd,
2008
+ children: [!!f && /* @__PURE__ */ J(i, {
2001
2009
  type: "button",
2002
2010
  tone: "neutral",
2003
- buttonStyle: "ghost",
2004
- disabled: P,
2011
+ appearance: "ghost",
2012
+ disabled: F,
2005
2013
  onClick: f,
2006
- children: [/* @__PURE__ */ Y(he, {}), x.cancelLabel]
2007
- }), !!u && /* @__PURE__ */ X(a, {
2014
+ children: [/* @__PURE__ */ q(ve, {}), E.cancelLabel]
2015
+ }), !!u && /* @__PURE__ */ J(i, {
2008
2016
  type: "submit",
2009
- form: S,
2010
- disabled: P,
2011
- loading: M,
2012
- children: [/* @__PURE__ */ Y(de, {}), M ? x.savingLabel : x.saveLabel]
2017
+ form: D,
2018
+ disabled: F,
2019
+ loading: P,
2020
+ children: [/* @__PURE__ */ q(pe, {}), P ? E.savingLabel : E.saveLabel]
2013
2021
  })]
2014
2022
  })]
2015
2023
  }))]
2016
2024
  });
2017
2025
  }
2018
2026
  //#endregion
2019
- export { Pe as PRODUCT_EMPTY_VALUE, ye as PRODUCT_TONE_BADGE, it as ProductContractOverview, rt as ProductDetailsCard, Q as ProductEmptyState, Ge as ProductOperationRow, nt as ProductOperationsCard, qe as ProductOptionActionMenu, ft as ProductOptionsMatrix, ot as ProductOptionsSummary, st as ProductOverview, at as ProductPoliciesCard, ct as ProductQuotePreviewCard, et as ProductReadinessCard, We as ProductReadinessRow, Ve as ProductRowActions, tt as ProductStructureCard, Ue as ProductStructureMetricRow, Ke as ProductSummaryRow, Be as ProductThumbnail, ze as ProductToneDot, _t as ProductVariantActionMenu, Je as ProductVariantCell, wt as ProductVariantDetails, Et as ProductVariantEditor, bt as ProductVariantsBulkTable, xt as ProductVariantsManager, vt as ProductVariantsTable, Ye as clampProductPercent, we as defaultProductContractOverviewStrings, Ce as defaultProductDetailsCardStrings, Se as defaultProductOperationsCardStrings, Fe as defaultProductOptionActionMenuStrings, De as defaultProductOptionsMatrixStrings, Ee as defaultProductOptionsSummaryStrings, Me as defaultProductOverviewStrings, Te as defaultProductPoliciesCardStrings, Ne as defaultProductQuotePreviewCardStrings, be as defaultProductReadinessCardStrings, xe as defaultProductStructureCardStrings, Oe as defaultProductVariantActionMenuStrings, Ae as defaultProductVariantBulkTableStrings, Ie as defaultProductVariantDetailsStrings, Le as defaultProductVariantEditorStrings, je as defaultProductVariantsManagerStrings, ke as defaultProductVariantsTableStrings };
2027
+ export { Le as PRODUCT_EMPTY_VALUE, Se as PRODUCT_TONE_BADGE, ot as ProductContractOverview, at as ProductDetailsCard, X as ProductEmptyState, Je as ProductOperationRow, it as ProductOperationsCard, Xe as ProductOptionActionMenu, mt as ProductOptionsMatrix, ct as ProductOptionsSummary, lt as ProductOverview, st as ProductPoliciesCard, ut as ProductQuotePreviewCard, nt as ProductReadinessCard, qe as ProductReadinessRow, We as ProductRowActions, rt as ProductStructureCard, Ke as ProductStructureMetricRow, Ye as ProductSummaryRow, Ue as ProductThumbnail, He as ProductToneDot, yt as ProductVariantActionMenu, Ze as ProductVariantCell, Et as ProductVariantDetails, Ot as ProductVariantEditor, St as ProductVariantsBulkTable, Ct as ProductVariantsManager, bt as ProductVariantsTable, Qe as clampProductPercent, De as defaultProductContractOverviewStrings, Ee as defaultProductDetailsCardStrings, Te as defaultProductOperationsCardStrings, Re as defaultProductOptionActionMenuStrings, Ae as defaultProductOptionsMatrixStrings, ke as defaultProductOptionsSummaryStrings, Fe as defaultProductOverviewStrings, Oe as defaultProductPoliciesCardStrings, Ie as defaultProductQuotePreviewCardStrings, Ce as defaultProductReadinessCardStrings, we as defaultProductStructureCardStrings, je as defaultProductVariantActionMenuStrings, Ne as defaultProductVariantBulkTableStrings, ze as defaultProductVariantDetailsStrings, Be as defaultProductVariantEditorStrings, Pe as defaultProductVariantsManagerStrings, Me as defaultProductVariantsTableStrings };