themelia-react-ui 1.0.1 → 2.0.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 (640) hide show
  1. package/CHANGELOG.md +417 -0
  2. package/README.md +67 -16
  3. package/dist/{accordion-B-5Focs8.js → accordion-CQXVcd7Q.js} +15 -15
  4. package/dist/accordion-CQXVcd7Q.js.map +1 -0
  5. package/dist/action-menu-BTpyPWJ2.js +264 -0
  6. package/dist/action-menu-BTpyPWJ2.js.map +1 -0
  7. package/dist/affordance-geometry.generated-CCIXb2A1.js +68 -0
  8. package/dist/affordance-geometry.generated-CCIXb2A1.js.map +1 -0
  9. package/dist/{ai-artifact-B5tPpXnS.js → ai-artifact-2PQ2fItc.js} +206 -215
  10. package/dist/ai-artifact-2PQ2fItc.js.map +1 -0
  11. package/dist/{app-shell-at8Kt4l_.js → app-shell-BE_j8-AT.js} +11 -10
  12. package/dist/app-shell-BE_j8-AT.js.map +1 -0
  13. package/dist/{attachment-BO2R47wn.js → attachment-q69dlt5Y.js} +14 -14
  14. package/dist/attachment-q69dlt5Y.js.map +1 -0
  15. package/dist/auth-M3vGMgDR.js +723 -0
  16. package/dist/auth-M3vGMgDR.js.map +1 -0
  17. package/dist/{avatar-Bpzty83c.js → avatar-djdaaQ_s.js} +15 -13
  18. package/dist/avatar-djdaaQ_s.js.map +1 -0
  19. package/dist/{badge-BZXZT9wd.js → badge-0tATj-tW.js} +9 -9
  20. package/dist/badge-0tATj-tW.js.map +1 -0
  21. package/dist/base/accordion.js +1 -1
  22. package/dist/base/action-menu.js +1 -1
  23. package/dist/base/attachment.js +1 -1
  24. package/dist/base/avatar.js +1 -1
  25. package/dist/base/badge.js +1 -1
  26. package/dist/base/buttons.js +3 -2
  27. package/dist/base/cards.js +3 -3
  28. package/dist/base/carousel.js +33 -35
  29. package/dist/base/carousel.js.map +1 -1
  30. package/dist/base/cascader.js +246 -222
  31. package/dist/base/cascader.js.map +1 -1
  32. package/dist/base/chart.js +1 -1
  33. package/dist/base/choice-inputs.js +2 -2
  34. package/dist/base/code-block.js +1 -1
  35. package/dist/base/combobox.js +1 -1
  36. package/dist/base/command.js +1 -1
  37. package/dist/base/copyable.js +1 -1
  38. package/dist/base/date-pickers.js +3 -3
  39. package/dist/base/display.js +7 -7
  40. package/dist/base/feedback.js +4 -4
  41. package/dist/base/forms-numeric.js +1 -1
  42. package/dist/base/forms.js +2 -2
  43. package/dist/base/inline-edit.js +94 -92
  44. package/dist/base/inline-edit.js.map +1 -1
  45. package/dist/base/item.js +1 -1
  46. package/dist/base/media-gallery.js +1 -1
  47. package/dist/base/navigation.js +6 -6
  48. package/dist/base/popover-menu.js +1 -1
  49. package/dist/base/popover.js +1 -1
  50. package/dist/base/qr-code.js +7 -4
  51. package/dist/base/qr-code.js.map +1 -1
  52. package/dist/base/repeaters.js +53 -53
  53. package/dist/base/repeaters.js.map +1 -1
  54. package/dist/base/sheet.js +1 -1
  55. package/dist/base/sidebar.js +1 -1
  56. package/dist/base/signature-pad.js +84 -82
  57. package/dist/base/signature-pad.js.map +1 -1
  58. package/dist/base/skeleton.js +1 -1
  59. package/dist/base/spinner.js +1 -1
  60. package/dist/base/structure.js +1 -1
  61. package/dist/base/table.js +1 -1
  62. package/dist/base/text-inputs.js +2 -2
  63. package/dist/base/toaster.js +7 -7
  64. package/dist/base/toaster.js.map +1 -1
  65. package/dist/base/tree.js +1 -1
  66. package/dist/base/upload-queue.js +1 -1
  67. package/dist/base/upload.js +3 -3
  68. package/dist/base/value-inputs.js +1 -1
  69. package/dist/blocks/admin.js +228 -219
  70. package/dist/blocks/admin.js.map +1 -1
  71. package/dist/blocks/ai.js +182 -212
  72. package/dist/blocks/ai.js.map +1 -1
  73. package/dist/blocks/analytics/usage-card.js +1 -1
  74. package/dist/blocks/analytics.js +665 -620
  75. package/dist/blocks/analytics.js.map +1 -1
  76. package/dist/blocks/collaboration.js +2 -2
  77. package/dist/blocks/commerce/receipt.js +1 -1
  78. package/dist/blocks/commerce.js +1439 -1553
  79. package/dist/blocks/commerce.js.map +1 -1
  80. package/dist/blocks/data-display.js +1 -1
  81. package/dist/blocks/onboarding.js +6 -6
  82. package/dist/blocks/onboarding.js.map +1 -1
  83. package/dist/blocks/planning.js +88 -97
  84. package/dist/blocks/planning.js.map +1 -1
  85. package/dist/blocks/timelines.js +1 -1
  86. package/dist/{breadcrumbs-DdQ_I5ra.js → breadcrumbs-BG_FfMK4.js} +10 -9
  87. package/dist/breadcrumbs-BG_FfMK4.js.map +1 -0
  88. package/dist/button-BS3KDg00.js +674 -0
  89. package/dist/button-BS3KDg00.js.map +1 -0
  90. package/dist/{button-BS6l5JUw.js → button-R9CCoH7A.js} +3 -3
  91. package/dist/button-R9CCoH7A.js.map +1 -0
  92. package/dist/buttons-DS0ZIwJ_.js +99 -0
  93. package/dist/buttons-DS0ZIwJ_.js.map +1 -0
  94. package/dist/{cards-Cum56XOF.js → cards-QoJ4syG9.js} +12 -12
  95. package/dist/{cards-Cum56XOF.js.map → cards-QoJ4syG9.js.map} +1 -1
  96. package/dist/chart-DwYRKKc-.js +152 -0
  97. package/dist/chart-DwYRKKc-.js.map +1 -0
  98. package/dist/checkbox-B7ygNTYp.js +35 -0
  99. package/dist/checkbox-B7ygNTYp.js.map +1 -0
  100. package/dist/choice-inputs-DrJ17tpL.js +752 -0
  101. package/dist/choice-inputs-DrJ17tpL.js.map +1 -0
  102. package/dist/{code-block-xHKbAJDj.js → code-block-CD0B7M93.js} +27 -27
  103. package/dist/code-block-CD0B7M93.js.map +1 -0
  104. package/dist/{collapsible-DsnktFNv.js → collapsible-oMUGM4tr.js} +3 -3
  105. package/dist/{collapsible-DsnktFNv.js.map → collapsible-oMUGM4tr.js.map} +1 -1
  106. package/dist/{collection-content-C4fthJV_.js → collection-content-Ys-OZOkY.js} +3 -3
  107. package/dist/{collection-content-C4fthJV_.js.map → collection-content-Ys-OZOkY.js.map} +1 -1
  108. package/dist/combobox-6dvVny2q.js +272 -0
  109. package/dist/combobox-6dvVny2q.js.map +1 -0
  110. package/dist/combobox-CB7039j7.js +865 -0
  111. package/dist/combobox-CB7039j7.js.map +1 -0
  112. package/dist/{command-C0xe7u9B.js → command-kPMPjIxJ.js} +35 -31
  113. package/dist/command-kPMPjIxJ.js.map +1 -0
  114. package/dist/{comments-DviPLnwy.js → comments-You0Bzbr.js} +434 -409
  115. package/dist/comments-You0Bzbr.js.map +1 -0
  116. package/dist/components/base/accordion/accordion-variants.d.ts +3 -3
  117. package/dist/components/base/action-menu/action-menu.d.ts +7 -2
  118. package/dist/components/base/avatar/stacked-avatars.d.ts +5 -4
  119. package/dist/components/base/badge/badge.d.ts +1 -1
  120. package/dist/components/base/badge/badge.recipes.d.ts +4 -4
  121. package/dist/components/base/buttons/base-button.d.ts +7 -0
  122. package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
  123. package/dist/components/base/buttons/button.recipes.d.ts +10 -19
  124. package/dist/components/base/buttons/button.variants.d.ts +1 -0
  125. package/dist/components/base/buttons/loader-button.d.ts +3 -1
  126. package/dist/components/base/buttons/text-button.d.ts +2 -2
  127. package/dist/components/base/buttons/use-pending-button-focus.d.ts +3 -0
  128. package/dist/components/base/cards/card.recipes.d.ts +13 -5
  129. package/dist/components/base/cards/partials/card-primitives.d.ts +9 -4
  130. package/dist/components/base/cards/smart-card.types.d.ts +1 -1
  131. package/dist/components/base/carousel/carousel.d.ts +3 -1
  132. package/dist/components/base/chart/chart.d.ts +7 -7
  133. package/dist/components/base/choice-inputs/checkbox.d.ts +6 -7
  134. package/dist/components/base/choice-inputs/choice-types.d.ts +10 -1
  135. package/dist/components/base/choice-inputs/pill-radio-group.d.ts +9 -0
  136. package/dist/components/base/choice-inputs/select-popup.d.ts +9 -1
  137. package/dist/components/base/choice-inputs/switch-card.d.ts +1 -1
  138. package/dist/components/base/date-pickers/date-picker-field.d.ts +23 -0
  139. package/dist/components/base/date-pickers/date-picker.recipes.d.ts +5 -18
  140. package/dist/components/base/date-pickers/datepicker.types.d.ts +16 -3
  141. package/dist/components/base/display/alert-dialog.d.ts +8 -2
  142. package/dist/components/base/display/content-block.d.ts +4 -2
  143. package/dist/components/base/display/date-block.d.ts +1 -1
  144. package/dist/components/base/display/dialog.d.ts +12 -5
  145. package/dist/components/base/display/surface-title.d.ts +6 -1
  146. package/dist/components/base/feedback/alert.d.ts +1 -1
  147. package/dist/components/base/feedback/state-display.d.ts +5 -4
  148. package/dist/components/base/forms/form-field.d.ts +1 -0
  149. package/dist/components/base/forms/form-sizing.d.ts +35 -3
  150. package/dist/components/base/forms/workflow.d.ts +2 -0
  151. package/dist/components/base/forms-numeric/coordinates-input.d.ts +3 -0
  152. package/dist/components/base/forms-numeric/rounding-mode-select.d.ts +4 -1
  153. package/dist/components/base/navigation/dropdown-menu.d.ts +2 -2
  154. package/dist/components/base/navigation/language-switcher.d.ts +4 -1
  155. package/dist/components/base/navigation/overflow-tab-bar.d.ts +7 -0
  156. package/dist/components/base/navigation/page-header/page-header.d.ts +4 -1
  157. package/dist/components/base/navigation/tabs.d.ts +3 -5
  158. package/dist/components/base/popover/popover.recipes.d.ts +3 -3
  159. package/dist/components/base/qr-code/qr-code.d.ts +2 -0
  160. package/dist/components/base/sheet/index.d.ts +29 -1
  161. package/dist/components/base/sheet/sheet.d.ts +14 -5
  162. package/dist/components/base/spinner/spinner.d.ts +3 -2
  163. package/dist/components/base/structure/structure.types.d.ts +1 -1
  164. package/dist/components/base/table/index.d.ts +1 -1
  165. package/dist/components/base/text-inputs/clear-native-field.d.ts +2 -0
  166. package/dist/components/base/text-inputs/input-group.d.ts +2 -2
  167. package/dist/components/base/text-inputs/input-trailing-action.d.ts +3 -0
  168. package/dist/components/base/upload/upload.recipes.d.ts +11 -0
  169. package/dist/components/base/value-inputs/date-time-input.d.ts +4 -2
  170. package/dist/components/base/value-inputs/tags-input.d.ts +2 -0
  171. package/dist/components/blocks/admin/api-key-list/api-key-list.types.d.ts +1 -1
  172. package/dist/components/blocks/analytics/format-metric-value.d.ts +11 -1
  173. package/dist/components/blocks/analytics/index.d.ts +1 -1
  174. package/dist/components/blocks/analytics/types.d.ts +1 -1
  175. package/dist/components/blocks/analytics/use-metric-format-options.d.ts +3 -0
  176. package/dist/components/blocks/collaboration/message/message.recipes.d.ts +12 -0
  177. package/dist/components/blocks/commerce/address-card/address-card.d.ts +1 -1
  178. package/dist/components/blocks/commerce/address-card/types.d.ts +3 -1
  179. package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.d.ts +4 -0
  180. package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.types.d.ts +2 -2
  181. package/dist/components/blocks/commerce/discount-stack/types.d.ts +1 -1
  182. package/dist/components/blocks/commerce/inventory-section/types.d.ts +4 -1
  183. package/dist/components/blocks/commerce/loyalty-points/types.d.ts +1 -1
  184. package/dist/components/blocks/commerce/order-status/types.d.ts +4 -0
  185. package/dist/components/blocks/commerce/payment-method/payment-method.d.ts +1 -1
  186. package/dist/components/blocks/commerce/payment-method/types.d.ts +3 -1
  187. package/dist/components/blocks/commerce/seo-listing/seo-listing-card.d.ts +1 -1
  188. package/dist/components/blocks/commerce/seo-listing/types.d.ts +3 -1
  189. package/dist/components/blocks/commerce/vendor-profile/types.d.ts +4 -1
  190. package/dist/components/blocks/data-display/dense-info-card/dense-info.strings.d.ts +4 -1
  191. package/dist/components/blocks/data-display/empty-state/partials/illustrations/document-stack.d.ts +1 -4
  192. package/dist/components/blocks/data-display/empty-state/partials/illustrations/inbox-clean.d.ts +1 -4
  193. package/dist/components/blocks/data-display/empty-state/partials/illustrations/index.d.ts +3 -3
  194. package/dist/components/blocks/data-display/empty-state/partials/illustrations/stacked-cards.d.ts +1 -6
  195. package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +4 -1
  196. package/dist/components/features/combobox/components/error-message.d.ts +1 -1
  197. package/dist/components/features/comments/hooks/use-attachment-upload.d.ts +5 -0
  198. package/dist/components/features/filters/facets/search-facet.d.ts +0 -12
  199. package/dist/components/features/filters/facets/tags-facet.d.ts +1 -1
  200. package/dist/components/features/global-search/partials/global-search-idle-state.d.ts +1 -1
  201. package/dist/components/features/media-library/media-library.d.ts +1 -1
  202. package/dist/components/features/media-library/media-library.types.d.ts +9 -1
  203. package/dist/components/features/media-library/partials/media-library-partials.d.ts +1 -1
  204. package/dist/components/features/overlays/alert-dialog.d.ts +1 -1
  205. package/dist/components/features/overlays/drawer.d.ts +1 -1
  206. package/dist/components/features/overlays/hooks/use-overlay-actions.d.ts +2 -2
  207. package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +11 -4
  208. package/dist/components/features/overlays/hooks/use-pending-overlay-focus.d.ts +2 -0
  209. package/dist/components/features/overlays/overlay-tone-icon.d.ts +37 -0
  210. package/dist/components/features/overlays/overlays.types.d.ts +46 -22
  211. package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
  212. package/dist/components/features/products/partials/index.d.ts +1 -1
  213. package/dist/components/features/products/partials/product-metric-tile.d.ts +6 -0
  214. package/dist/components/features/products/partials/product-tone.d.ts +11 -1
  215. package/dist/components/features/products/products.types.d.ts +2 -1
  216. package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +2 -1
  217. package/dist/components/features/table/data-table.d.ts +1 -1
  218. package/dist/components/features/table/partials/cell-renderers.d.ts +1 -1
  219. package/dist/components/features/table/table.types.d.ts +1 -1
  220. package/dist/components/features/theme-tweaker/theme-provider-settings.d.ts +3 -1
  221. package/dist/components/layout/auth/auth.types.d.ts +1 -0
  222. package/dist/components/layout/page/index.d.ts +1 -1
  223. package/dist/components/layout/page/page.d.ts +0 -1
  224. package/dist/components/layout/page/page.types.d.ts +62 -6
  225. package/dist/components/layout/page/partials/page-header-commands.d.ts +13 -0
  226. package/dist/components/layout/page/partials/page-header.d.ts +1 -1
  227. package/dist/components/layout/sidebar/sidebar.context.d.ts +1 -1
  228. package/dist/components/layout/sidebar/sidebar.types.d.ts +4 -0
  229. package/dist/components/layout/workspace/workspace.types.d.ts +3 -0
  230. package/dist/components/primitives/date.d.ts +16 -3
  231. package/dist/components/primitives/dimensions.d.ts +6 -0
  232. package/dist/components/primitives/duration.d.ts +6 -0
  233. package/dist/components/primitives/file-size.d.ts +6 -0
  234. package/dist/components/primitives/index.d.ts +1 -1
  235. package/dist/components/primitives/initials.d.ts +11 -2
  236. package/dist/components/primitives/link.d.ts +7 -0
  237. package/dist/components/primitives/money.d.ts +29 -7
  238. package/dist/components/primitives/number.d.ts +17 -0
  239. package/dist/components/primitives/value-typography.d.ts +54 -0
  240. package/dist/components/primitives/value.d.ts +31 -6
  241. package/dist/components/typography/heading.d.ts +13 -2
  242. package/dist/components/typography/index.d.ts +1 -1
  243. package/dist/components/typography/label.d.ts +3 -0
  244. package/dist/components/typography/running-text.d.ts +12 -0
  245. package/dist/components/typography/text-link.d.ts +23 -1
  246. package/dist/components/typography/text.d.ts +12 -0
  247. package/dist/components/typography/text.styles.d.ts +37 -5
  248. package/dist/components/ui/button.d.ts +1 -1
  249. package/dist/components/ui/checkbox.d.ts +5 -0
  250. package/dist/components/ui/overlay.recipes.d.ts +15 -2
  251. package/dist/components/ui/popover.d.ts +1 -1
  252. package/dist/components/ui/select.d.ts +3 -1
  253. package/dist/components/ui/sidebar.d.ts +1 -1
  254. package/dist/components/ui/switch.d.ts +5 -0
  255. package/dist/components/ui/table.d.ts +2 -1
  256. package/dist/container.recipes-D9t8MHR3.js +27 -0
  257. package/dist/container.recipes-D9t8MHR3.js.map +1 -0
  258. package/dist/{containers-6s-ucRQQ.js → containers-D_L4mTVb.js} +34 -57
  259. package/dist/containers-D_L4mTVb.js.map +1 -0
  260. package/dist/control-group-recipes-DBXmfh2E.js +21 -0
  261. package/dist/control-group-recipes-DBXmfh2E.js.map +1 -0
  262. package/dist/{copyable-B7SBXJMr.js → copyable-DDjTeW_j.js} +6 -6
  263. package/dist/{copyable-B7SBXJMr.js.map → copyable-DDjTeW_j.js.map} +1 -1
  264. package/dist/data-display-3xWQUnMA.js +1335 -0
  265. package/dist/data-display-3xWQUnMA.js.map +1 -0
  266. package/dist/date-picker-DrDFj8Lo.js +1527 -0
  267. package/dist/date-picker-DrDFj8Lo.js.map +1 -0
  268. package/dist/date-pickers-CnFCb0n2.js +174 -0
  269. package/dist/date-pickers-CnFCb0n2.js.map +1 -0
  270. package/dist/date-uf3z37Nm.js +144 -0
  271. package/dist/date-uf3z37Nm.js.map +1 -0
  272. package/dist/{display-CFM5myut.js → display-DrdvPwF0.js} +25 -25
  273. package/dist/display-DrdvPwF0.js.map +1 -0
  274. package/dist/{dropdown-menu-BlnyHr-9.js → dropdown-menu-CURh59jb.js} +22 -15
  275. package/dist/dropdown-menu-CURh59jb.js.map +1 -0
  276. package/dist/features/activities.js +177 -163
  277. package/dist/features/activities.js.map +1 -1
  278. package/dist/features/ai-chat.js +187 -183
  279. package/dist/features/ai-chat.js.map +1 -1
  280. package/dist/features/async-preview.js +9 -9
  281. package/dist/features/async-preview.js.map +1 -1
  282. package/dist/features/combobox.js +1 -1
  283. package/dist/features/comments.js +1 -1
  284. package/dist/features/data-view.js +25 -23
  285. package/dist/features/data-view.js.map +1 -1
  286. package/dist/features/email-composer/engine.js +1 -1
  287. package/dist/features/email-composer.js +353 -355
  288. package/dist/features/email-composer.js.map +1 -1
  289. package/dist/features/event-calendar.js +346 -354
  290. package/dist/features/event-calendar.js.map +1 -1
  291. package/dist/features/filters.js +1 -1
  292. package/dist/features/global-search.js +225 -227
  293. package/dist/features/global-search.js.map +1 -1
  294. package/dist/features/kanban.js +29 -29
  295. package/dist/features/kanban.js.map +1 -1
  296. package/dist/features/map.js +59 -58
  297. package/dist/features/map.js.map +1 -1
  298. package/dist/features/media-library.js +898 -900
  299. package/dist/features/media-library.js.map +1 -1
  300. package/dist/features/mentions.js +1 -1
  301. package/dist/features/overlays.js +1 -1
  302. package/dist/features/products.js +1412 -1444
  303. package/dist/features/products.js.map +1 -1
  304. package/dist/features/questionnaire.js +51 -49
  305. package/dist/features/questionnaire.js.map +1 -1
  306. package/dist/features/resource-assignment.js +103 -97
  307. package/dist/features/resource-assignment.js.map +1 -1
  308. package/dist/features/resource.js +13 -13
  309. package/dist/features/resource.js.map +1 -1
  310. package/dist/features/rich-text-editor.js +2 -2
  311. package/dist/features/schema-form.js +187 -183
  312. package/dist/features/schema-form.js.map +1 -1
  313. package/dist/features/suggestions.js +3 -3
  314. package/dist/features/sync.js +7 -7
  315. package/dist/features/sync.js.map +1 -1
  316. package/dist/features/table.js +1 -1
  317. package/dist/features/theme-tweaker.js +508 -503
  318. package/dist/features/theme-tweaker.js.map +1 -1
  319. package/dist/{feedback-DWUkgEjR.js → feedback-C7nR0UtT.js} +30 -31
  320. package/dist/feedback-C7nR0UtT.js.map +1 -0
  321. package/dist/field-affordance-recipes-CkOCdE2y.js +46 -0
  322. package/dist/field-affordance-recipes-CkOCdE2y.js.map +1 -0
  323. package/dist/{field-state-recipes-CBTRt9Bt.js → field-state-recipes-C-MFBX_8.js} +5 -5
  324. package/dist/field-state-recipes-C-MFBX_8.js.map +1 -0
  325. package/dist/{filters-BhsUtsxW.js → filters-Da-gNPsE.js} +760 -765
  326. package/dist/filters-Da-gNPsE.js.map +1 -0
  327. package/dist/{form-field-Bn7ZH1rA.js → form-field-VZRULhUK.js} +20 -12
  328. package/dist/form-field-VZRULhUK.js.map +1 -0
  329. package/dist/form-sizing-uWP4lzVh.js +126 -0
  330. package/dist/form-sizing-uWP4lzVh.js.map +1 -0
  331. package/dist/{forms-B7pzS25o.js → forms-DDeEnXSY.js} +38 -38
  332. package/dist/forms-DDeEnXSY.js.map +1 -0
  333. package/dist/forms-numeric-D3CO60IF.js +905 -0
  334. package/dist/forms-numeric-D3CO60IF.js.map +1 -0
  335. package/dist/{header-C59QZyxV.js → header-2ycNqGOR.js} +42 -37
  336. package/dist/header-2ycNqGOR.js.map +1 -0
  337. package/dist/{hooks-CM1Vp9Pe.js → hooks-DQ5SPwZw.js} +2 -2
  338. package/dist/{hooks-CM1Vp9Pe.js.map → hooks-DQ5SPwZw.js.map} +1 -1
  339. package/dist/{http-CLTVJc5I.js → http-CdEIHyQf.js} +2 -2
  340. package/dist/http-CdEIHyQf.js.map +1 -0
  341. package/dist/{icon-badge-Dv0RYQwj.js → icon-badge-DKlaKXoo.js} +4 -4
  342. package/dist/{icon-badge-Dv0RYQwj.js.map → icon-badge-DKlaKXoo.js.map} +1 -1
  343. package/dist/index.js +2 -2
  344. package/dist/input-BoLm9Hks.js +20 -0
  345. package/dist/input-BoLm9Hks.js.map +1 -0
  346. package/dist/input-DhQdBnV3.js +255 -0
  347. package/dist/input-DhQdBnV3.js.map +1 -0
  348. package/dist/item-xzh8Df65.js +264 -0
  349. package/dist/item-xzh8Df65.js.map +1 -0
  350. package/dist/layout/app-shell.js +1 -1
  351. package/dist/layout/auth.js +1 -1
  352. package/dist/layout/containers.js +1 -1
  353. package/dist/layout/header.js +1 -1
  354. package/dist/layout/hooks.js +1 -1
  355. package/dist/layout/navigation.js +1 -1
  356. package/dist/layout/page.js +1 -1
  357. package/dist/layout/settings.js +1 -1
  358. package/dist/layout/sidebar.js +2 -2
  359. package/dist/layout/workspace.js +1 -1
  360. package/dist/layout.js +10 -10
  361. package/dist/lib/affordance-geometry.generated.d.ts +46 -10
  362. package/dist/lib/control-group-recipes.d.ts +22 -0
  363. package/dist/lib/field-affordance-recipes.d.ts +70 -2
  364. package/dist/lib/field-state-recipes.d.ts +6 -4
  365. package/dist/lib/format.d.ts +9 -0
  366. package/dist/lib/money-format.d.ts +30 -0
  367. package/dist/lib/navigation-row-recipes.d.ts +3 -2
  368. package/dist/lib/overlay-anatomy-recipes.d.ts +2 -2
  369. package/dist/lib/surface-recipes.d.ts +13 -8
  370. package/dist/lib/token-merge.generated.d.ts +144 -2
  371. package/dist/lib/track-recipes.d.ts +1 -1
  372. package/dist/lib/ui-provider/provider.d.ts +7 -2
  373. package/dist/lib/ui-provider/store.d.ts +6 -2
  374. package/dist/lib/ui-provider/types.d.ts +9 -4
  375. package/dist/lib/use-prefers-reduced-motion.d.ts +2 -0
  376. package/dist/lib/utils.js +1 -1
  377. package/dist/media-gallery-DQUQ0m3O.js +201 -0
  378. package/dist/media-gallery-DQUQ0m3O.js.map +1 -0
  379. package/dist/{mentions-B8Ko-fhS.js → mentions-DwnO1hh4.js} +40 -39
  380. package/dist/{mentions-B8Ko-fhS.js.map → mentions-DwnO1hh4.js.map} +1 -1
  381. package/dist/message-YfFmbXNP.js +127 -0
  382. package/dist/message-YfFmbXNP.js.map +1 -0
  383. package/dist/{navigation-BUIn2Qxx.js → navigation-Cbp5V8gG.js} +27 -28
  384. package/dist/navigation-Cbp5V8gG.js.map +1 -0
  385. package/dist/navigation-Cs1npsPm.js +300 -0
  386. package/dist/navigation-Cs1npsPm.js.map +1 -0
  387. package/dist/{navigation-row-recipes-GVh11KiT.js → navigation-row-recipes-DlU-4QYO.js} +3 -3
  388. package/dist/navigation-row-recipes-DlU-4QYO.js.map +1 -0
  389. package/dist/number-CKRBYmZK.js +352 -0
  390. package/dist/number-CKRBYmZK.js.map +1 -0
  391. package/dist/overlay.recipes-CNO2S9V6.js +34 -0
  392. package/dist/overlay.recipes-CNO2S9V6.js.map +1 -0
  393. package/dist/overlays-DhZO7N-I.js +994 -0
  394. package/dist/overlays-DhZO7N-I.js.map +1 -0
  395. package/dist/page-C6R_8jFt.js +325 -0
  396. package/dist/page-C6R_8jFt.js.map +1 -0
  397. package/dist/{page-header-DQRa0jug.js → page-header-hUTzcRZX.js} +12 -12
  398. package/dist/page-header-hUTzcRZX.js.map +1 -0
  399. package/dist/{pagination-C29vvt3I.js → pagination-Cm0jqa3I.js} +21 -21
  400. package/dist/pagination-Cm0jqa3I.js.map +1 -0
  401. package/dist/{popover-CoLDEg19.js → popover-Dcv_9jxr.js} +23 -22
  402. package/dist/popover-Dcv_9jxr.js.map +1 -0
  403. package/dist/{popover-menu-GLIQTJTx.js → popover-menu-DnRFKnHP.js} +6 -6
  404. package/dist/{popover-menu-GLIQTJTx.js.map → popover-menu-DnRFKnHP.js.map} +1 -1
  405. package/dist/{popover.recipes-zgBhMlUu.js → popover.recipes-wmbvL8Ah.js} +5 -5
  406. package/dist/popover.recipes-wmbvL8Ah.js.map +1 -0
  407. package/dist/primitives-BHrwQXFC.js +379 -0
  408. package/dist/primitives-BHrwQXFC.js.map +1 -0
  409. package/dist/primitives.js +5 -5
  410. package/dist/{progress-BOe8l_FZ.js → progress-Br9WTFya.js} +12 -11
  411. package/dist/progress-Br9WTFya.js.map +1 -0
  412. package/dist/{receipt-BM8xsGFy.js → receipt-CV89q1fs.js} +8 -8
  413. package/dist/{receipt-BM8xsGFy.js.map → receipt-CV89q1fs.js.map} +1 -1
  414. package/dist/rich-text-editor-CF8QYt5p.js +574 -0
  415. package/dist/rich-text-editor-CF8QYt5p.js.map +1 -0
  416. package/dist/{rich-text-editor.recipes-DxvOE0Lp.js → rich-text-editor.recipes-CnrbmTS1.js} +35 -26
  417. package/dist/rich-text-editor.recipes-CnrbmTS1.js.map +1 -0
  418. package/dist/{rich-text-B7sBAdDG.js → rich-text-j-FGAeZW.js} +4 -4
  419. package/dist/{rich-text-B7sBAdDG.js.map → rich-text-j-FGAeZW.js.map} +1 -1
  420. package/dist/{scroll-area-BheMQ270.js → scroll-area-DRdr16Pt.js} +3 -3
  421. package/dist/scroll-area-DRdr16Pt.js.map +1 -0
  422. package/dist/{separator-DO0EbCEm.js → separator-BMEvwnSX.js} +2 -2
  423. package/dist/{separator-DO0EbCEm.js.map → separator-BMEvwnSX.js.map} +1 -1
  424. package/dist/{separator-Gk_WXH-l.js → separator-Do5GWDYi.js} +4 -4
  425. package/dist/separator-Do5GWDYi.js.map +1 -0
  426. package/dist/services/actions/action-adapters.d.ts +4 -0
  427. package/dist/services/actions.js +8 -3
  428. package/dist/services/actions.js.map +1 -1
  429. package/dist/{settings-BnCyyPOJ.js → settings-DHk0L2MF.js} +20 -19
  430. package/dist/settings-DHk0L2MF.js.map +1 -0
  431. package/dist/sheet-DRFNY1_D.js +207 -0
  432. package/dist/sheet-DRFNY1_D.js.map +1 -0
  433. package/dist/sidebar-Cb8WzOvE.js +511 -0
  434. package/dist/sidebar-Cb8WzOvE.js.map +1 -0
  435. package/dist/{sidebar-DPR7fmqN.js → sidebar-Crc9M9JV.js} +220 -201
  436. package/dist/sidebar-Crc9M9JV.js.map +1 -0
  437. package/dist/{skeleton-CmT1ppqb.js → skeleton-DVMXr15h.js} +5 -5
  438. package/dist/{skeleton-CmT1ppqb.js.map → skeleton-DVMXr15h.js.map} +1 -1
  439. package/dist/smart-card-Bek-TwUp.js +599 -0
  440. package/dist/smart-card-Bek-TwUp.js.map +1 -0
  441. package/dist/{spinner-BY9HbUEh.js → spinner-CmTAbEp0.js} +8 -6
  442. package/dist/spinner-CmTAbEp0.js.map +1 -0
  443. package/dist/{structure-MvKVq-oL.js → structure-hzCW-XsV.js} +3 -3
  444. package/dist/{structure-MvKVq-oL.js.map → structure-hzCW-XsV.js.map} +1 -1
  445. package/dist/{structure.recipes-Bqhf9oIh.js → structure.recipes-EPz60cU8.js} +37 -19
  446. package/dist/structure.recipes-EPz60cU8.js.map +1 -0
  447. package/dist/style.css +1 -1
  448. package/dist/surface-recipes-DOdoBXGm.js +28 -0
  449. package/dist/surface-recipes-DOdoBXGm.js.map +1 -0
  450. package/dist/table-D6zKeYQX.js +162 -0
  451. package/dist/table-D6zKeYQX.js.map +1 -0
  452. package/dist/table-Dn4XSrSB.js +1444 -0
  453. package/dist/table-Dn4XSrSB.js.map +1 -0
  454. package/dist/tabs-Dk8E_knt.js +189 -0
  455. package/dist/tabs-Dk8E_knt.js.map +1 -0
  456. package/dist/text-inputs-BFpku0Qd.js +331 -0
  457. package/dist/text-inputs-BFpku0Qd.js.map +1 -0
  458. package/dist/{text.styles-BwB7vAF2.js → text.styles-g4He6UIW.js} +26 -15
  459. package/dist/text.styles-g4He6UIW.js.map +1 -0
  460. package/dist/theme.css +90 -124
  461. package/dist/themes/green.css +24 -0
  462. package/dist/{timelines-B9ICkQcV.js → timelines-CxuAFIc2.js} +97 -104
  463. package/dist/timelines-CxuAFIc2.js.map +1 -0
  464. package/dist/track-recipes-CDcKmndW.js +10 -0
  465. package/dist/track-recipes-CDcKmndW.js.map +1 -0
  466. package/dist/{tree-BdWSaoFT.js → tree-BotPlyiD.js} +13 -13
  467. package/dist/{tree-BdWSaoFT.js.map → tree-BotPlyiD.js.map} +1 -1
  468. package/dist/typography/rich-text.js +1 -1
  469. package/dist/typography-CAr3dQhX.js +116 -0
  470. package/dist/typography-CAr3dQhX.js.map +1 -0
  471. package/dist/typography.js +2 -2
  472. package/dist/{ui-provider-CftIB6TY.js → ui-provider-D2_TeLqw.js} +22 -22
  473. package/dist/ui-provider-D2_TeLqw.js.map +1 -0
  474. package/dist/ui-provider.js +1 -1
  475. package/dist/{upload-D8Za5x_c.js → upload-B0WHW7ak.js} +278 -274
  476. package/dist/upload-B0WHW7ak.js.map +1 -0
  477. package/dist/{upload-queue-hIIYBLS7.js → upload-queue-BHZ_wBfd.js} +72 -75
  478. package/dist/upload-queue-BHZ_wBfd.js.map +1 -0
  479. package/dist/{usage-card-DnmnJ58D.js → usage-card-U0YBLTNT.js} +31 -33
  480. package/dist/usage-card-U0YBLTNT.js.map +1 -0
  481. package/dist/utils-Cospvlj1.js +4445 -0
  482. package/dist/utils-Cospvlj1.js.map +1 -0
  483. package/dist/value-inputs-CjfzGMsN.js +854 -0
  484. package/dist/value-inputs-CjfzGMsN.js.map +1 -0
  485. package/dist/value-typography-Deb3yQZg.js +116 -0
  486. package/dist/value-typography-Deb3yQZg.js.map +1 -0
  487. package/dist/{workspace-C1PZmk8L.js → workspace-YoFjXi6i.js} +97 -105
  488. package/dist/workspace-YoFjXi6i.js.map +1 -0
  489. package/docs/consumer-skill/SKILL.md +123 -119
  490. package/docs/consumer-skill/examples/analytics.tsx +34 -0
  491. package/docs/consumer-skill/examples/app-layout.tsx +42 -14
  492. package/docs/consumer-skill/examples/detail.tsx +20 -5
  493. package/docs/consumer-skill/examples/edit.tsx +1 -1
  494. package/docs/consumer-skill/examples/layout-blocks.tsx +20 -0
  495. package/docs/consumer-skill/examples/manifest.json +37 -3
  496. package/docs/consumer-skill/examples/scoped-directory.tsx +2 -2
  497. package/docs/consumer-skill/examples/website.tsx +56 -0
  498. package/docs/consumer-skill/references/analytics.md +70 -0
  499. package/docs/consumer-skill/references/composition.md +195 -9
  500. package/docs/consumer-skill/references/design-contract.md +33 -7
  501. package/docs/consumer-skill/references/discovery.md +80 -5
  502. package/docs/consumer-skill/references/installation.md +22 -0
  503. package/docs/consumer-skill/references/integration.md +46 -1
  504. package/docs/consumer-skill/references/public-api.json +2083 -237
  505. package/docs/consumer-skill/references/review.md +74 -6
  506. package/docs/consumer-skill/references/theming.md +59 -8
  507. package/docs/consumer-skill/references/tokens.json +180 -9
  508. package/docs/consumer-skill/references/workflows.md +34 -0
  509. package/docs/consumer-skill/scripts/check-composition.mjs +1 -1
  510. package/docs/consumer-skill/scripts/composition-policy.mjs +271 -18
  511. package/docs/consumer-skill/scripts/discovery.mjs +69 -9
  512. package/docs/consumer-skill/scripts/pin-button-defaults.mjs +95 -0
  513. package/docs/consumer-skill/scripts/surface-policy.mjs +44 -0
  514. package/package.json +11 -6
  515. package/dist/accordion-B-5Focs8.js.map +0 -1
  516. package/dist/action-menu-Cx3SdfbN.js +0 -265
  517. package/dist/action-menu-Cx3SdfbN.js.map +0 -1
  518. package/dist/affordance-geometry.generated-D8Jcfb0G.js +0 -32
  519. package/dist/affordance-geometry.generated-D8Jcfb0G.js.map +0 -1
  520. package/dist/ai-artifact-B5tPpXnS.js.map +0 -1
  521. package/dist/app-shell-at8Kt4l_.js.map +0 -1
  522. package/dist/attachment-BO2R47wn.js.map +0 -1
  523. package/dist/auth-OFwWSAap.js +0 -704
  524. package/dist/auth-OFwWSAap.js.map +0 -1
  525. package/dist/avatar-Bpzty83c.js.map +0 -1
  526. package/dist/badge-BZXZT9wd.js.map +0 -1
  527. package/dist/breadcrumbs-DdQ_I5ra.js.map +0 -1
  528. package/dist/button-BS6l5JUw.js.map +0 -1
  529. package/dist/buttons-Co6GavvM.js +0 -674
  530. package/dist/buttons-Co6GavvM.js.map +0 -1
  531. package/dist/chart-DVfcwQu6.js +0 -149
  532. package/dist/chart-DVfcwQu6.js.map +0 -1
  533. package/dist/checkbox-BavDRjF7.js +0 -34
  534. package/dist/checkbox-BavDRjF7.js.map +0 -1
  535. package/dist/choice-inputs-CC7XqPQO.js +0 -619
  536. package/dist/choice-inputs-CC7XqPQO.js.map +0 -1
  537. package/dist/code-block-xHKbAJDj.js.map +0 -1
  538. package/dist/combobox-DEbdr-3u.js +0 -273
  539. package/dist/combobox-DEbdr-3u.js.map +0 -1
  540. package/dist/combobox-xv3yJbzl.js +0 -850
  541. package/dist/combobox-xv3yJbzl.js.map +0 -1
  542. package/dist/command-C0xe7u9B.js.map +0 -1
  543. package/dist/comments-DviPLnwy.js.map +0 -1
  544. package/dist/containers-6s-ucRQQ.js.map +0 -1
  545. package/dist/data-display-cWIRdeaf.js +0 -1129
  546. package/dist/data-display-cWIRdeaf.js.map +0 -1
  547. package/dist/date-BFNMnrS5.js +0 -140
  548. package/dist/date-BFNMnrS5.js.map +0 -1
  549. package/dist/date-picker-CA6ogMQB.js +0 -1521
  550. package/dist/date-picker-CA6ogMQB.js.map +0 -1
  551. package/dist/date-pickers-BPIKLdsD.js +0 -224
  552. package/dist/date-pickers-BPIKLdsD.js.map +0 -1
  553. package/dist/display-CFM5myut.js.map +0 -1
  554. package/dist/dropdown-menu-BlnyHr-9.js.map +0 -1
  555. package/dist/feedback-DWUkgEjR.js.map +0 -1
  556. package/dist/field-affordance-recipes-IjzPrCTw.js +0 -17
  557. package/dist/field-affordance-recipes-IjzPrCTw.js.map +0 -1
  558. package/dist/field-state-recipes-CBTRt9Bt.js.map +0 -1
  559. package/dist/filters-BhsUtsxW.js.map +0 -1
  560. package/dist/form-field-Bn7ZH1rA.js.map +0 -1
  561. package/dist/form-sizing-BWs70_a2.js +0 -100
  562. package/dist/form-sizing-BWs70_a2.js.map +0 -1
  563. package/dist/format-iamDSqs2.js +0 -110
  564. package/dist/format-iamDSqs2.js.map +0 -1
  565. package/dist/forms-B7pzS25o.js.map +0 -1
  566. package/dist/forms-numeric-BUBxELBv.js +0 -867
  567. package/dist/forms-numeric-BUBxELBv.js.map +0 -1
  568. package/dist/header-C59QZyxV.js.map +0 -1
  569. package/dist/http-CLTVJc5I.js.map +0 -1
  570. package/dist/input-WwYQZJzG.js +0 -202
  571. package/dist/input-WwYQZJzG.js.map +0 -1
  572. package/dist/input-ci9fIgFH.js +0 -20
  573. package/dist/input-ci9fIgFH.js.map +0 -1
  574. package/dist/item-pJ0GsOiJ.js +0 -257
  575. package/dist/item-pJ0GsOiJ.js.map +0 -1
  576. package/dist/media-gallery-DhDRgnVZ.js +0 -200
  577. package/dist/media-gallery-DhDRgnVZ.js.map +0 -1
  578. package/dist/message-COsdEvXT.js +0 -108
  579. package/dist/message-COsdEvXT.js.map +0 -1
  580. package/dist/navigation-BUIn2Qxx.js.map +0 -1
  581. package/dist/navigation-DBEu4POU.js +0 -267
  582. package/dist/navigation-DBEu4POU.js.map +0 -1
  583. package/dist/navigation-row-recipes-GVh11KiT.js.map +0 -1
  584. package/dist/number-BNT_BIzJ.js +0 -269
  585. package/dist/number-BNT_BIzJ.js.map +0 -1
  586. package/dist/overlay.recipes-BxW5FIfK.js +0 -6
  587. package/dist/overlay.recipes-BxW5FIfK.js.map +0 -1
  588. package/dist/overlays-B11wZka6.js +0 -982
  589. package/dist/overlays-B11wZka6.js.map +0 -1
  590. package/dist/page-BV6ioQg3.js +0 -202
  591. package/dist/page-BV6ioQg3.js.map +0 -1
  592. package/dist/page-header-DQRa0jug.js.map +0 -1
  593. package/dist/pagination-C29vvt3I.js.map +0 -1
  594. package/dist/popover-CoLDEg19.js.map +0 -1
  595. package/dist/popover.recipes-zgBhMlUu.js.map +0 -1
  596. package/dist/primitives-DKPOGVpj.js +0 -330
  597. package/dist/primitives-DKPOGVpj.js.map +0 -1
  598. package/dist/progress-BOe8l_FZ.js.map +0 -1
  599. package/dist/rich-text-editor-CoVrTiSv.js +0 -575
  600. package/dist/rich-text-editor-CoVrTiSv.js.map +0 -1
  601. package/dist/rich-text-editor.recipes-DxvOE0Lp.js.map +0 -1
  602. package/dist/scroll-area-BheMQ270.js.map +0 -1
  603. package/dist/select-B2mb-qN2.js +0 -108
  604. package/dist/select-B2mb-qN2.js.map +0 -1
  605. package/dist/separator-Gk_WXH-l.js.map +0 -1
  606. package/dist/settings-BnCyyPOJ.js.map +0 -1
  607. package/dist/sheet-B-q914Ad.js +0 -205
  608. package/dist/sheet-B-q914Ad.js.map +0 -1
  609. package/dist/sidebar-C_2p3Tfj.js +0 -501
  610. package/dist/sidebar-C_2p3Tfj.js.map +0 -1
  611. package/dist/sidebar-DPR7fmqN.js.map +0 -1
  612. package/dist/smart-card-CYLn46e6.js +0 -578
  613. package/dist/smart-card-CYLn46e6.js.map +0 -1
  614. package/dist/spinner-BY9HbUEh.js.map +0 -1
  615. package/dist/structure.recipes-Bqhf9oIh.js.map +0 -1
  616. package/dist/surface-recipes-CQfRr-VL.js +0 -27
  617. package/dist/surface-recipes-CQfRr-VL.js.map +0 -1
  618. package/dist/table-BS39xnlq.js +0 -1424
  619. package/dist/table-BS39xnlq.js.map +0 -1
  620. package/dist/table-DnlAJ-xR.js +0 -146
  621. package/dist/table-DnlAJ-xR.js.map +0 -1
  622. package/dist/tabs-B5cNMWiP.js +0 -187
  623. package/dist/tabs-B5cNMWiP.js.map +0 -1
  624. package/dist/text-inputs-Dh9XGyiS.js +0 -331
  625. package/dist/text-inputs-Dh9XGyiS.js.map +0 -1
  626. package/dist/text.styles-BwB7vAF2.js.map +0 -1
  627. package/dist/timelines-B9ICkQcV.js.map +0 -1
  628. package/dist/track-recipes-LLPNVwFg.js +0 -10
  629. package/dist/track-recipes-LLPNVwFg.js.map +0 -1
  630. package/dist/typography-Cv8MT-82.js +0 -96
  631. package/dist/typography-Cv8MT-82.js.map +0 -1
  632. package/dist/ui-provider-CftIB6TY.js.map +0 -1
  633. package/dist/upload-D8Za5x_c.js.map +0 -1
  634. package/dist/upload-queue-hIIYBLS7.js.map +0 -1
  635. package/dist/usage-card-DnmnJ58D.js.map +0 -1
  636. package/dist/utils-C2EKeIw3.js +0 -72
  637. package/dist/utils-C2EKeIw3.js.map +0 -1
  638. package/dist/value-inputs-DX2dbxjj.js +0 -824
  639. package/dist/value-inputs-DX2dbxjj.js.map +0 -1
  640. package/dist/workspace-C1PZmk8L.js.map +0 -1
@@ -1,27 +1,32 @@
1
1
  "use client";
2
- import { interpolateString as e, useStrings as t } from "../lib/strings.js";
3
- import { t as n } from "../utils-C2EKeIw3.js";
4
- import { n as r } from "../buttons-Co6GavvM.js";
5
- import { a as i, r as a } from "../typography-Cv8MT-82.js";
6
- import { r as o, t as s } from "../structure-MvKVq-oL.js";
7
- import { t as c } from "../progress-BOe8l_FZ.js";
8
- import { i as l, t as u } from "../overlays-B11wZka6.js";
9
- import { _ as d, g as f } from "../primitives-DKPOGVpj.js";
10
- import { n as p } from "../number-BNT_BIzJ.js";
11
- import { t as m } from "../badge-BZXZT9wd.js";
12
- import { t as h } from "../input-WwYQZJzG.js";
13
- import { d as g } from "../text-inputs-Dh9XGyiS.js";
14
- import { n as _ } from "../display-CFM5myut.js";
15
- import { t as v } from "../form-field-Bn7ZH1rA.js";
16
- import { c as y, s as ee } from "../choice-inputs-CC7XqPQO.js";
17
- import { t as b } from "../checkbox-BavDRjF7.js";
18
- import { c as x, i as S, n as C, o as w, r as T, t as E, u as D } from "../item-pJ0GsOiJ.js";
19
- import { c as O, i as k, n as te, o as A, s as j, t as M } from "../table-DnlAJ-xR.js";
20
- import { g as N, l as P, n as ne } from "../data-display-cWIRdeaf.js";
21
- import { O as re, f as ie } from "../table-BS39xnlq.js";
22
- import { Fragment as ae, useCallback as F, useId as oe, useMemo as I, useState as se } from "react";
23
- import { Fragment as ce, jsx as L, jsxs as R } from "react/jsx-runtime";
24
- import { ArrowLeft as le, ArrowRight as ue, Box as de, ChevronDown as fe, ClipboardCheck as z, Copy as pe, Eye as me, FileText as B, GripVertical as he, Layers3 as ge, ListChecks as _e, ListFilter as ve, PackageCheck as ye, Pencil as V, Plus as H, PlusCircle as U, ReceiptText as be, RefreshCw as xe, Save as Se, Search as W, ShieldCheck as Ce, SlidersHorizontal as G, Trash2 as K, X as q } from "lucide-react";
2
+ import { _ as e, s as t } from "../ui-provider-D2_TeLqw.js";
3
+ import { interpolateString as n, useStrings as r } from "../lib/strings.js";
4
+ import { t as i } from "../utils-Cospvlj1.js";
5
+ import { a, s as o } from "../typography-CAr3dQhX.js";
6
+ import { t as s } from "../button-BS3KDg00.js";
7
+ import { r as c, t as l } from "../structure-hzCW-XsV.js";
8
+ import { t as u } from "../smart-card-Bek-TwUp.js";
9
+ import { t as d } from "../progress-Br9WTFya.js";
10
+ import { i as f, t as p } from "../overlays-DhZO7N-I.js";
11
+ import { _ as m, g as h } from "../primitives-BHrwQXFC.js";
12
+ import { n as g } from "../number-CKRBYmZK.js";
13
+ import { t as _ } from "../badge-0tATj-tW.js";
14
+ import { t as v } from "../separator-Do5GWDYi.js";
15
+ import { t as y } from "../field-affordance-recipes-CkOCdE2y.js";
16
+ import { t as b } from "../input-DhQdBnV3.js";
17
+ import { t as x } from "../form-field-VZRULhUK.js";
18
+ import { d as S } from "../text-inputs-BFpku0Qd.js";
19
+ import { c as C, s as w } from "../choice-inputs-DrJ17tpL.js";
20
+ import { t as T } from "../checkbox-B7ygNTYp.js";
21
+ import { n as E } from "../display-DrdvPwF0.js";
22
+ import { r as D, t as O } from "../control-group-recipes-DBXmfh2E.js";
23
+ import { c as k, i as A, n as j, o as M, r as N, t as P, u as F } from "../item-xzh8Df65.js";
24
+ import { c as ee, i as I, n as te, o as ne, s as re, t as ie } from "../table-D6zKeYQX.js";
25
+ import { g as ae, l as oe, n as se } from "../data-display-3xWQUnMA.js";
26
+ import { O as L, f as ce } from "../table-Dn4XSrSB.js";
27
+ import { Fragment as le, useCallback as R, useId as z, useMemo as B, useState as ue } from "react";
28
+ import { Fragment as de, jsx as V, jsxs as H } from "react/jsx-runtime";
29
+ import { ArrowLeft as fe, ChevronDown as pe, Copy as me, Eye as he, GripVertical as ge, ListFilter as U, Pencil as W, Plus as G, PlusCircle as _e, Search as ve, SlidersHorizontal as K, Trash2 as q, X as ye } from "lucide-react";
25
30
  //#region src/components/features/products/products.strings.ts
26
31
  var J = {
27
32
  title: "Readiness",
@@ -35,7 +40,7 @@ var J = {
35
40
  emptyTitle: "No readiness checks",
36
41
  emptyDescription: "Pass readiness items from your product workflow to show progress.",
37
42
  actionLabel: "Open"
38
- }, we = {
43
+ }, Y = {
39
44
  title: "Structure",
40
45
  description: "Media, taxonomy, options, and content coverage.",
41
46
  createLabel: "Add metric",
@@ -45,7 +50,7 @@ var J = {
45
50
  actionsLabel: "Metric actions",
46
51
  emptyTitle: "No structure metrics",
47
52
  emptyDescription: "Pass structure metrics to summarize the product setup."
48
- }, Te = {
53
+ }, be = {
49
54
  title: "Operations",
50
55
  description: "Availability, channels, service rules, and fulfilment signals.",
51
56
  createLabel: "Add signal",
@@ -55,13 +60,13 @@ var J = {
55
60
  emptyTitle: "No operational signals",
56
61
  emptyDescription: "Pass operational rows to show channel and availability health.",
57
62
  actionLabel: "Open"
58
- }, Y = {
63
+ }, xe = {
59
64
  title: "Product details",
60
65
  description: "Core identity and catalogue fields.",
61
66
  editLabel: "Edit details",
62
67
  emptyTitle: "No details",
63
68
  emptyDescription: "Pass metadata rows to render product details."
64
- }, Ee = {
69
+ }, Se = {
65
70
  title: "Contract",
66
71
  description: "Commercial terms, pricing rules, and customer-facing conditions.",
67
72
  termsTitle: "Terms",
@@ -75,7 +80,7 @@ var J = {
75
80
  ruleActionsLabel: "Rule actions",
76
81
  emptyTitle: "No contract summary",
77
82
  emptyDescription: "Pass metrics, terms, or rules to summarize the product contract."
78
- }, X = {
83
+ }, Ce = {
79
84
  title: "Options",
80
85
  description: "Variant-driving choices and add-ons customers can select.",
81
86
  manageLabel: "Manage options",
@@ -86,12 +91,12 @@ var J = {
86
91
  actionsLabel: "Option actions",
87
92
  emptyTitle: "No options",
88
93
  emptyDescription: "Pass option groups to summarize configurable product choices."
89
- }, Z = {
94
+ }, we = {
90
95
  viewLabel: "Open option",
91
96
  editLabel: "Edit option",
92
97
  deleteLabel: "Delete option",
93
98
  actionsLabel: "Option actions"
94
- }, De = {
99
+ }, Te = {
95
100
  title: "Variant options",
96
101
  description: "Define option groups and values before generating sellable variants.",
97
102
  createLabel: "Add attribute",
@@ -121,7 +126,7 @@ var J = {
121
126
  emptyTitle: "No option groups",
122
127
  emptyDescription: "Add options such as size, color, or packaging to create variant combinations.",
123
128
  noValuesLabel: "No values"
124
- }, Q = {
129
+ }, Ee = {
125
130
  title: "Quote preview",
126
131
  description: "How the product appears in a compact customer quote.",
127
132
  subtotalLabel: "Subtotal",
@@ -136,7 +141,7 @@ var J = {
136
141
  lineActionsLabel: "Line actions",
137
142
  emptyTitle: "No quote lines",
138
143
  emptyDescription: "Pass quote lines to preview pricing."
139
- }, Oe = {
144
+ }, X = {
140
145
  title: "Policies",
141
146
  description: "Cancellation, booking, service, and customer-facing rules.",
142
147
  createLabel: "Add policy",
@@ -146,7 +151,7 @@ var J = {
146
151
  actionsLabel: "Policy actions",
147
152
  emptyTitle: "No policies",
148
153
  emptyDescription: "Pass policies to summarize customer-facing rules."
149
- }, ke = {
154
+ }, Z = {
150
155
  title: "Variants",
151
156
  description: "Sellable combinations with price, availability, and SKU.",
152
157
  createLabel: "Add variant",
@@ -165,7 +170,7 @@ var J = {
165
170
  updated: "Updated",
166
171
  actions: "Actions"
167
172
  }
168
- }, Ae = {
173
+ }, De = {
169
174
  title: "Variants",
170
175
  description: "Review generated combinations, select rows, and apply bulk operations.",
171
176
  createLabel: "Add variant",
@@ -193,7 +198,7 @@ var J = {
193
198
  updated: "Updated",
194
199
  actions: "Actions"
195
200
  }
196
- }, je = {
201
+ }, Oe = {
197
202
  title: "Variants",
198
203
  description: "Configure option groups first, then manage the generated sellable variants.",
199
204
  optionsTitle: "Variant options",
@@ -204,13 +209,13 @@ var J = {
204
209
  generateLabel: "Generate variants",
205
210
  createVariantLabel: "Add variant",
206
211
  actionsLabel: "Variant manager actions"
207
- }, Me = {
212
+ }, ke = {
208
213
  viewLabel: "Open variant",
209
214
  editLabel: "Edit",
210
215
  duplicateLabel: "Duplicate",
211
216
  deleteLabel: "Delete",
212
217
  actionsLabel: "Variant actions"
213
- }, Ne = {
218
+ }, Q = {
214
219
  title: "Variant",
215
220
  description: "Sellable variant details, options, pricing, and fulfilment data.",
216
221
  backLabel: "Back",
@@ -227,7 +232,7 @@ var J = {
227
232
  channels: "Channels",
228
233
  updated: "Updated"
229
234
  }
230
- }, Pe = {
235
+ }, Ae = {
231
236
  title: "Edit variant",
232
237
  description: "Controlled form for variant identity, pricing, inventory, and option values.",
233
238
  identityTitle: "Identity",
@@ -257,48 +262,55 @@ var J = {
257
262
  status: "Active",
258
263
  channels: "Online store, POS"
259
264
  }
260
- }, Fe = {
265
+ }, je = {
261
266
  mainLabel: "Product overview",
262
267
  railLabel: "Product supporting information"
263
268
  };
264
269
  //#endregion
265
270
  //#region src/components/features/products/partials/product-empty-state.tsx
266
- function $({ title: e, description: t, action: r, className: i }) {
267
- return /* @__PURE__ */ L(P, {
271
+ function $({ title: e, description: t, action: n, className: r }) {
272
+ return /* @__PURE__ */ V(oe, {
268
273
  padding: "md",
269
274
  border: !0,
270
275
  title: e,
271
276
  description: t,
272
- actions: r,
273
- className: n("product-empty-state--component bg-muted/20", i)
277
+ actions: n,
278
+ className: i("product-empty-state--component bg-muted/20", r)
274
279
  });
275
280
  }
276
281
  //#endregion
277
282
  //#region src/components/features/products/partials/product-tone.tsx
278
- var Ie = {
283
+ var Me = {
279
284
  neutral: "secondary",
280
- primary: "primary",
285
+ primary: "secondary",
281
286
  success: "success",
282
287
  warning: "warning",
283
288
  destructive: "destructive",
284
289
  info: "info"
285
- }, Le = {
286
- neutral: "border-border bg-card text-muted-foreground",
287
- primary: "border-primary-accent/20 bg-primary/5 text-primary-accent",
288
- success: "border-success/20 bg-success/5 text-success",
289
- warning: "border-warning/30 bg-warning/8 text-warning",
290
- destructive: "border-destructive/25 bg-destructive/8 text-destructive",
291
- info: "border-info/20 bg-info/5 text-info"
292
- };
293
- function Re(e) {
290
+ }, Ne = {
291
+ neutral: void 0,
292
+ primary: void 0,
293
+ success: "text-success",
294
+ warning: "text-warning-accent",
295
+ destructive: "text-destructive",
296
+ info: "text-info"
297
+ }, Pe = /* @__PURE__ */ new Set([
298
+ "success",
299
+ "warning",
300
+ "destructive",
301
+ "info"
302
+ ]);
303
+ function Fe(e) {
304
+ return e !== void 0 && Pe.has(e);
305
+ }
306
+ function Ie(e) {
294
307
  return Number.isFinite(e) ? Math.min(100, Math.max(0, Math.round(e))) : 0;
295
308
  }
296
- function ze({ tone: e = "neutral" }) {
297
- return /* @__PURE__ */ L("span", {
309
+ function Le({ tone: e = "neutral" }) {
310
+ return /* @__PURE__ */ V("span", {
298
311
  "aria-hidden": "true",
299
- className: n("product-tone-dot--component size-2 rounded-full", {
300
- "bg-muted-foreground": e === "neutral",
301
- "bg-primary": e === "primary",
312
+ className: i("product-tone-dot--component size-2 shrink-0 rounded-full", {
313
+ "bg-muted-foreground": e === "neutral" || e === "primary",
302
314
  "bg-success": e === "success",
303
315
  "bg-warning": e === "warning",
304
316
  "bg-destructive": e === "destructive",
@@ -308,301 +320,278 @@ function ze({ tone: e = "neutral" }) {
308
320
  }
309
321
  //#endregion
310
322
  //#region src/components/features/products/partials/product-metric-tile.tsx
311
- function Be({ metric: e }) {
312
- let t = e.tone ?? "neutral";
313
- return /* @__PURE__ */ R("div", {
314
- className: n("border-border product-metric-tile--component rounded-radius-md border p-surface-xs", Le[t]),
315
- children: [/* @__PURE__ */ R(s, {
316
- direction: "horizontal",
317
- align: "start",
318
- justify: "between",
319
- gap: "md",
320
- children: [/* @__PURE__ */ R(s, {
321
- gap: "2xs",
322
- className: "min-w-0",
323
- children: [/* @__PURE__ */ L(i, {
324
- size: "xs",
325
- type: t === "neutral" ? "secondary" : "main",
326
- className: "truncate",
327
- children: e.label
328
- }), /* @__PURE__ */ L(d, {
329
- weight: "semibold",
330
- className: "tabular-nums",
331
- children: e.value
332
- })]
333
- }), "icon" in e && !!e.icon && /* @__PURE__ */ L("div", {
334
- className: "shrink-0 opacity-80",
335
- children: e.icon
336
- })]
337
- }), !!e.description && /* @__PURE__ */ L(i, {
338
- size: "xs",
339
- type: "secondary",
340
- className: "mt-1.5 leading-snug",
341
- children: e.description
342
- })]
323
+ function Re({ metric: e }) {
324
+ let t = "icon" in e ? e.icon : void 0;
325
+ return /* @__PURE__ */ H(l, {
326
+ gap: "dense",
327
+ className: "product-metric-tile--component min-w-0",
328
+ children: [
329
+ /* @__PURE__ */ H(l, {
330
+ direction: "horizontal",
331
+ gap: "sm",
332
+ wrap: !1,
333
+ children: [
334
+ Fe(e.tone) && /* @__PURE__ */ V(Le, { tone: e.tone }),
335
+ !!t && /* @__PURE__ */ V("span", {
336
+ className: "flex shrink-0 text-muted-foreground",
337
+ children: t
338
+ }),
339
+ /* @__PURE__ */ V(a, {
340
+ className: "truncate",
341
+ children: e.label
342
+ })
343
+ ]
344
+ }),
345
+ /* @__PURE__ */ V(m, {
346
+ weight: "semibold",
347
+ className: "tabular-nums",
348
+ children: e.value
349
+ }),
350
+ !!e.description && /* @__PURE__ */ V(o, {
351
+ size: "xs",
352
+ type: "secondary",
353
+ lineHeight: "snug",
354
+ children: e.description
355
+ })
356
+ ]
343
357
  });
344
358
  }
345
359
  //#endregion
346
360
  //#region src/components/features/products/partials/product-actions.tsx
347
- function Ve({ item: e, actions: t, menuLabel: r, className: i }) {
348
- return t.length === 0 ? null : /* @__PURE__ */ L("div", {
349
- className: n("product-row-actions--component flex justify-end", i),
350
- children: /* @__PURE__ */ L(re, {
361
+ function ze({ item: e, actions: t, menuLabel: n, className: r }) {
362
+ return t.length === 0 ? null : /* @__PURE__ */ V("div", {
363
+ className: i("product-row-actions--component flex justify-end", r),
364
+ children: /* @__PURE__ */ V(L, {
351
365
  row: e,
352
366
  actions: t,
353
- menuLabel: r,
367
+ menuLabel: n,
354
368
  displayMode: "menu"
355
369
  })
356
370
  });
357
371
  }
358
372
  //#endregion
359
373
  //#region src/components/features/products/partials/product-rows.tsx
360
- var He = "min-w-0 basis-48", Ue = "line-clamp-none break-words overflow-visible";
361
- function We({ metric: e, actions: t }) {
362
- let r = e.tone ?? "neutral";
363
- return /* @__PURE__ */ R(E, {
374
+ var Be = "min-w-0 basis-48", Ve = "line-clamp-none break-words overflow-visible", He = "ml-auto shrink-0 flex-wrap justify-end gap-space-md";
375
+ function Ue({ label: e, value: t, tone: n, badge: r }) {
376
+ let i = /* @__PURE__ */ V(F, {
377
+ className: Ve,
378
+ children: e
379
+ });
380
+ return !t && !r ? i : /* @__PURE__ */ H(l, {
381
+ direction: "horizontal",
382
+ gap: "sm",
383
+ className: "product-row--heading",
384
+ children: [
385
+ i,
386
+ !!t && (Fe(n) ? /* @__PURE__ */ V(_, {
387
+ tone: Me[n],
388
+ children: t
389
+ }) : /* @__PURE__ */ V(o, {
390
+ tag: "span",
391
+ type: "secondary",
392
+ lineHeight: "tight",
393
+ children: t
394
+ })),
395
+ r
396
+ ]
397
+ });
398
+ }
399
+ function We({ label: e, onSelect: t }) {
400
+ return /* @__PURE__ */ V(s, {
401
+ type: "button",
402
+ tone: "secondary",
403
+ buttonStyle: "ghost",
404
+ onClick: t,
405
+ children: e
406
+ });
407
+ }
408
+ function Ge({ metric: e, actions: t }) {
409
+ return /* @__PURE__ */ H(P, {
364
410
  className: "product-structure-metric-row--component product-structure-card--item",
365
411
  children: [
366
- /* @__PURE__ */ L(x, {
412
+ !!e.icon && /* @__PURE__ */ V(k, {
367
413
  variant: "icon",
368
- className: n("border-border rounded-full border", Le[r]),
369
- children: e.icon ?? /* @__PURE__ */ L(ze, { tone: r })
414
+ className: "text-muted-foreground",
415
+ children: e.icon
370
416
  }),
371
- /* @__PURE__ */ R(T, {
372
- className: He,
373
- children: [/* @__PURE__ */ L(D, {
374
- className: Ue,
417
+ /* @__PURE__ */ H(N, {
418
+ className: Be,
419
+ children: [/* @__PURE__ */ V(F, {
420
+ className: Ve,
375
421
  children: e.label
376
- }), !!e.description && /* @__PURE__ */ L(S, {
422
+ }), !!e.description && /* @__PURE__ */ V(A, {
377
423
  clamp: 2,
378
424
  children: e.description
379
425
  })]
380
426
  }),
381
- /* @__PURE__ */ R(C, {
427
+ /* @__PURE__ */ H(j, {
382
428
  className: "ml-auto shrink-0 gap-space-md",
383
- children: [/* @__PURE__ */ L(d, {
429
+ children: [/* @__PURE__ */ V(m, {
384
430
  weight: "semibold",
385
- className: "tabular-nums",
431
+ className: i("tabular-nums", e.tone && Ne[e.tone]),
386
432
  children: e.value
387
433
  }), t]
388
434
  })
389
435
  ]
390
436
  });
391
437
  }
392
- function Ge({ item: e, actionFallback: t, onSelect: i, actions: a }) {
393
- let o = e.tone ?? (e.completed ? "success" : "neutral"), s = e.onSelect ?? i;
394
- return /* @__PURE__ */ R(E, {
438
+ function Ke({ item: e, actionFallback: t, onSelect: n, actions: r }) {
439
+ let i = e.tone ?? (e.completed ? "success" : "neutral"), a = e.onSelect ?? n;
440
+ return /* @__PURE__ */ H(P, {
395
441
  className: "product-readiness-row--component product-readiness-card--item",
396
442
  children: [
397
- /* @__PURE__ */ L(x, {
398
- variant: "icon",
399
- className: n("border-border rounded-full border", Le[o]),
400
- children: /* @__PURE__ */ L(ze, { tone: o })
443
+ /* @__PURE__ */ V(k, {
444
+ className: "product-readiness-row--state h-icon-lg",
445
+ children: /* @__PURE__ */ V(Le, { tone: i })
401
446
  }),
402
- /* @__PURE__ */ R(T, {
403
- className: He,
404
- children: [/* @__PURE__ */ L(D, {
405
- className: Ue,
406
- children: e.label
407
- }), !!e.description && /* @__PURE__ */ L(S, {
447
+ /* @__PURE__ */ H(N, {
448
+ className: Be,
449
+ children: [/* @__PURE__ */ V(Ue, {
450
+ label: e.label,
451
+ value: e.value,
452
+ tone: e.tone
453
+ }), !!e.description && /* @__PURE__ */ V(A, {
408
454
  clamp: 2,
409
455
  children: e.description
410
456
  })]
411
457
  }),
412
- !!(e.value || s || a) && /* @__PURE__ */ R(C, {
413
- className: "ml-auto shrink-0 flex-wrap justify-end gap-space-md",
414
- children: [
415
- !!e.value && /* @__PURE__ */ L(m, {
416
- tone: Ie[o],
417
- children: e.value
418
- }),
419
- !!s && /* @__PURE__ */ L(r, {
420
- type: "button",
421
- tone: "secondary",
422
- buttonStyle: "ghost",
423
- onClick: s,
424
- icon: ue,
425
- iconPosition: "right",
426
- children: e.actionLabel ?? t
427
- }),
428
- a
429
- ]
458
+ !!(a || r) && /* @__PURE__ */ H(j, {
459
+ className: He,
460
+ children: [!!a && /* @__PURE__ */ V(We, {
461
+ label: e.actionLabel ?? t,
462
+ onSelect: a
463
+ }), r]
430
464
  })
431
465
  ]
432
466
  });
433
467
  }
434
- function Ke({ item: e, actionFallback: t, onSelect: a, actions: o }) {
435
- let s = e.tone ?? "neutral", c = e.onSelect ?? a;
436
- return /* @__PURE__ */ R(E, {
468
+ function qe({ item: e, actionFallback: t, onSelect: n, actions: r }) {
469
+ let i = e.onSelect ?? n;
470
+ return /* @__PURE__ */ H(P, {
437
471
  className: "product-operation-row--component product-operations-card--item",
438
- children: [
439
- /* @__PURE__ */ L(x, {
440
- variant: "icon",
441
- className: n("border-border rounded-full border", Le[s]),
442
- children: /* @__PURE__ */ L(ze, { tone: s })
443
- }),
444
- /* @__PURE__ */ R(T, {
445
- className: He,
446
- children: [/* @__PURE__ */ L(D, {
447
- className: Ue,
448
- children: e.label
449
- }), !!e.description && /* @__PURE__ */ L(S, {
450
- clamp: 2,
451
- children: e.description
452
- })]
453
- }),
454
- !!(e.value || c || o) && /* @__PURE__ */ R(C, {
455
- className: "ml-auto shrink-0 flex-wrap justify-end gap-space-md",
456
- children: [
457
- !!e.value && /* @__PURE__ */ L(i, {
458
- tag: "span",
459
- weight: "semibold",
460
- children: e.value
461
- }),
462
- !!c && /* @__PURE__ */ L(r, {
463
- type: "button",
464
- tone: "secondary",
465
- buttonStyle: "ghost",
466
- onClick: c,
467
- icon: ue,
468
- iconPosition: "right",
469
- children: e.actionLabel ?? t
470
- }),
471
- o
472
- ]
473
- })
474
- ]
472
+ children: [/* @__PURE__ */ H(N, {
473
+ className: Be,
474
+ children: [/* @__PURE__ */ V(Ue, {
475
+ label: e.label,
476
+ value: e.value,
477
+ tone: e.tone
478
+ }), !!e.description && /* @__PURE__ */ V(A, {
479
+ clamp: 2,
480
+ children: e.description
481
+ })]
482
+ }), !!(i || r) && /* @__PURE__ */ H(j, {
483
+ className: He,
484
+ children: [!!i && /* @__PURE__ */ V(We, {
485
+ label: e.actionLabel ?? t,
486
+ onSelect: i
487
+ }), r]
488
+ })]
475
489
  });
476
490
  }
477
- function qe({ item: e, actionLabel: t, onSelect: a, actions: o }) {
478
- let s = e.tone ?? "neutral", c = "values" in e ? e.values : void 0;
479
- return /* @__PURE__ */ R(E, {
491
+ function Je({ item: e, actionLabel: t, onSelect: n, actions: r }) {
492
+ let i = "values" in e ? e.values : void 0;
493
+ return /* @__PURE__ */ H(P, {
480
494
  className: "product-summary-row--component",
481
- children: [
482
- /* @__PURE__ */ L(x, {
483
- variant: "icon",
484
- className: n("border-border rounded-full border", Le[s]),
485
- children: /* @__PURE__ */ L(ze, { tone: s })
486
- }),
487
- /* @__PURE__ */ R(T, {
488
- className: He,
489
- children: [
490
- /* @__PURE__ */ L(D, {
491
- className: Ue,
492
- children: e.label
493
- }),
494
- !!e.description && /* @__PURE__ */ L(S, {
495
- clamp: 2,
496
- children: e.description
497
- }),
498
- !!c?.length && /* @__PURE__ */ L("div", {
499
- className: "mt-space-md flex flex-wrap gap-space-xs",
500
- children: c.map((e, t) => /* @__PURE__ */ L(m, {
501
- tone: "secondary",
502
- children: e
503
- }, t))
504
- })
505
- ]
506
- }),
507
- !!(e.value || e.badge || a || o) && /* @__PURE__ */ R(C, {
508
- className: "ml-auto shrink-0 flex-wrap justify-end gap-space-md",
509
- children: [
510
- !!e.value && /* @__PURE__ */ L(i, {
511
- tag: "span",
512
- weight: "semibold",
513
- children: e.value
514
- }),
515
- !!e.badge && e.badge,
516
- !!a && /* @__PURE__ */ L(r, {
517
- type: "button",
495
+ children: [/* @__PURE__ */ H(N, {
496
+ className: Be,
497
+ children: [
498
+ /* @__PURE__ */ V(Ue, {
499
+ label: e.label,
500
+ value: e.value,
501
+ tone: e.tone,
502
+ badge: e.badge
503
+ }),
504
+ !!e.description && /* @__PURE__ */ V(A, {
505
+ clamp: 2,
506
+ children: e.description
507
+ }),
508
+ !!i?.length && /* @__PURE__ */ V("div", {
509
+ className: "mt-space-md flex flex-wrap gap-space-xs",
510
+ children: i.map((e, t) => /* @__PURE__ */ V(_, {
518
511
  tone: "secondary",
519
- buttonStyle: "ghost",
520
- onClick: a,
521
- icon: ue,
522
- iconPosition: "right",
523
- children: t
524
- }),
525
- o
526
- ]
527
- })
528
- ]
512
+ children: e
513
+ }, t))
514
+ })
515
+ ]
516
+ }), !!(n || r) && /* @__PURE__ */ H(j, {
517
+ className: He,
518
+ children: [!!n && /* @__PURE__ */ V(We, {
519
+ label: t,
520
+ onSelect: n
521
+ }), r]
522
+ })]
529
523
  });
530
524
  }
531
525
  //#endregion
532
526
  //#region src/components/features/products/components/product-contract-overview.tsx
533
- function Je({ metrics: e = [], terms: a = [], rules: c = [], onOpenContract: l, onEditContract: u, onCreateRule: d, onSelectRule: f, onEditRule: p, onDeleteRule: m, renderRuleActions: h, actions: g, footerSlot: v, empty: y, className: ee, strings: b }) {
534
- let x = t(Ee, b), S = e.length > 0 || a.length > 0 || c.length > 0, C = l || u || d ? /* @__PURE__ */ R("div", {
527
+ function Ye({ metrics: e = [], terms: t = [], rules: n = [], onOpenContract: a, onEditContract: u, onCreateRule: d, onSelectRule: f, onEditRule: p, onDeleteRule: m, renderRuleActions: h, actions: g, footerSlot: _, empty: v, className: y, strings: b }) {
528
+ let x = r(Se, b), S = e.length > 0 || t.length > 0 || n.length > 0, C = a || u || d ? /* @__PURE__ */ H("div", {
535
529
  className: "flex items-center gap-space-md",
536
530
  children: [
537
- !!d && /* @__PURE__ */ L(r, {
531
+ !!d && /* @__PURE__ */ V(s, {
538
532
  type: "button",
539
533
  tone: "secondary",
540
534
  buttonStyle: "ghost",
541
535
  onClick: d,
542
- icon: H,
536
+ icon: G,
543
537
  children: x.createRuleLabel
544
538
  }),
545
- !!u && /* @__PURE__ */ L(r, {
539
+ !!u && /* @__PURE__ */ V(s, {
546
540
  type: "button",
547
541
  tone: "secondary",
548
542
  buttonStyle: "ghost",
549
543
  onClick: u,
550
- icon: V,
551
544
  children: x.editLabel
552
545
  }),
553
- !!l && /* @__PURE__ */ L(r, {
546
+ !!a && /* @__PURE__ */ V(s, {
554
547
  type: "button",
555
548
  tone: "secondary",
556
549
  buttonStyle: "ghost",
557
- onClick: l,
558
- icon: ue,
559
- iconPosition: "right",
550
+ onClick: a,
560
551
  children: x.actionLabel
561
552
  })
562
553
  ]
563
554
  }) : void 0;
564
- return /* @__PURE__ */ L(_, {
565
- icon: /* @__PURE__ */ L(B, { className: "size-icon" }),
555
+ return /* @__PURE__ */ V(E, {
566
556
  title: x.title,
567
557
  description: x.description,
568
558
  actions: g,
569
559
  headerAction: C,
570
- footerSlot: v,
571
- contentClassName: "mt-1",
572
- className: n("product-contract-overview--component w-full", ee),
573
- children: S ? /* @__PURE__ */ R(s, {
574
- gap: "xl",
560
+ footerSlot: _,
561
+ className: i("product-contract-overview--component w-full", y),
562
+ children: S ? /* @__PURE__ */ H(l, {
563
+ gap: "2xl",
575
564
  children: [
576
- e.length > 0 && /* @__PURE__ */ L(o, {
565
+ e.length > 0 && /* @__PURE__ */ V(c, {
577
566
  columns: {
578
567
  base: 1,
579
568
  sm: 3
580
569
  },
581
570
  gap: "md",
582
- children: e.map((e) => /* @__PURE__ */ L(Be, { metric: e }, e.id))
571
+ children: e.map((e) => /* @__PURE__ */ V(Re, { metric: e }, e.id))
583
572
  }),
584
- a.length > 0 && /* @__PURE__ */ R(s, {
573
+ t.length > 0 && /* @__PURE__ */ H(l, {
585
574
  gap: "md",
586
- children: [/* @__PURE__ */ L(i, {
575
+ children: [/* @__PURE__ */ V(o, {
587
576
  weight: "semibold",
588
577
  children: x.termsTitle
589
- }), /* @__PURE__ */ L(ne, {
590
- items: a,
578
+ }), /* @__PURE__ */ V(se, {
579
+ items: t,
591
580
  columns: 2,
592
581
  density: "compact"
593
582
  })]
594
583
  }),
595
- c.length > 0 && /* @__PURE__ */ R(s, {
584
+ n.length > 0 && /* @__PURE__ */ H(l, {
596
585
  gap: "md",
597
- children: [/* @__PURE__ */ L(i, {
586
+ children: [/* @__PURE__ */ V(o, {
598
587
  weight: "semibold",
599
588
  children: x.rulesTitle
600
- }), /* @__PURE__ */ L(w, { children: c.map((e, t) => {
589
+ }), /* @__PURE__ */ V(M, { children: n.map((e, t) => {
601
590
  let n = f ? () => f(e) : void 0, r = p ? () => p(e) : void 0, i = m ? () => m(e) : void 0, a = [
602
591
  ...n ? [{
603
592
  id: "open",
604
593
  label: x.viewRuleLabel,
605
- icon: /* @__PURE__ */ L(me, { className: "size-icon-md" }),
594
+ icon: /* @__PURE__ */ V(he, { className: "size-icon-md" }),
606
595
  onClick: () => n(),
607
596
  tone: "secondary",
608
597
  buttonStyle: "ghost"
@@ -610,7 +599,7 @@ function Je({ metrics: e = [], terms: a = [], rules: c = [], onOpenContract: l,
610
599
  ...r ? [{
611
600
  id: "edit",
612
601
  label: x.editRuleLabel,
613
- icon: /* @__PURE__ */ L(V, { className: "size-icon-md" }),
602
+ icon: /* @__PURE__ */ V(W, { className: "size-icon-md" }),
614
603
  onClick: () => r(),
615
604
  tone: "secondary",
616
605
  buttonStyle: "ghost"
@@ -618,7 +607,7 @@ function Je({ metrics: e = [], terms: a = [], rules: c = [], onOpenContract: l,
618
607
  ...i ? [{
619
608
  id: "delete",
620
609
  label: x.deleteRuleLabel,
621
- icon: /* @__PURE__ */ L(K, { className: "size-icon-md" }),
610
+ icon: /* @__PURE__ */ V(q, { className: "size-icon-md" }),
622
611
  onClick: () => i(),
623
612
  tone: "destructive"
624
613
  }] : []
@@ -627,65 +616,63 @@ function Je({ metrics: e = [], terms: a = [], rules: c = [], onOpenContract: l,
627
616
  onSelect: n,
628
617
  onEdit: r,
629
618
  onDelete: i
630
- }) : /* @__PURE__ */ L(Ve, {
619
+ }) : /* @__PURE__ */ V(ze, {
631
620
  item: e,
632
621
  actions: a,
633
622
  menuLabel: x.ruleActionsLabel
634
623
  });
635
- return /* @__PURE__ */ L(qe, {
624
+ return /* @__PURE__ */ V(Je, {
636
625
  item: e,
637
626
  actions: o
638
627
  }, e.id);
639
628
  }) })]
640
629
  })
641
630
  ]
642
- }) : y ?? /* @__PURE__ */ L($, {
631
+ }) : v ?? /* @__PURE__ */ V($, {
643
632
  title: x.emptyTitle,
644
633
  description: x.emptyDescription,
645
- action: d ? /* @__PURE__ */ L(r, {
634
+ action: d ? /* @__PURE__ */ V(s, {
635
+ tone: "primary",
646
636
  type: "button",
647
637
  onClick: d,
648
- icon: H,
638
+ icon: G,
649
639
  children: x.createRuleLabel
650
640
  }) : void 0
651
641
  })
652
642
  });
653
643
  }
654
- Je.displayName = "ProductContractOverview";
644
+ Ye.displayName = "ProductContractOverview";
655
645
  //#endregion
656
646
  //#region src/components/features/products/components/product-details-card.tsx
657
- function Ye({ title: e, description: i, metadata: a = [], media: o, onEditDetails: s, actions: c, headerEnd: l, footerSlot: u, empty: d, className: f, strings: p }) {
658
- let m = t(Y, p), h = s ? /* @__PURE__ */ L(r, {
647
+ function Xe({ title: e, description: t, metadata: n = [], media: a, onEditDetails: o, actions: c, headerEnd: l, footerSlot: u, empty: d, className: f, strings: p }) {
648
+ let m = r(xe, p), h = o ? /* @__PURE__ */ V(s, {
659
649
  type: "button",
660
650
  tone: "secondary",
661
651
  buttonStyle: "ghost",
662
- onClick: s,
663
- icon: V,
652
+ onClick: o,
664
653
  children: m.editLabel
665
654
  }) : void 0;
666
- return /* @__PURE__ */ L(_, {
667
- icon: /* @__PURE__ */ L(de, { className: "size-icon" }),
655
+ return /* @__PURE__ */ V(E, {
668
656
  title: e ?? m.title,
669
- description: i === !1 ? void 0 : i ?? m.description,
657
+ description: t === !1 ? void 0 : t ?? m.description,
670
658
  actions: c,
671
659
  headerAction: h,
672
660
  headerEnd: l,
673
661
  footerSlot: u,
674
- contentClassName: "mt-1",
675
- className: n("product-details-card--component w-full", f),
676
- children: a.length === 0 ? d ?? /* @__PURE__ */ L($, {
662
+ className: i("product-details-card--component w-full", f),
663
+ children: n.length === 0 ? d ?? /* @__PURE__ */ V($, {
677
664
  title: m.emptyTitle,
678
665
  description: m.emptyDescription
679
- }) : /* @__PURE__ */ L("div", {
666
+ }) : /* @__PURE__ */ V("div", {
680
667
  className: "@container/product-details",
681
- children: /* @__PURE__ */ R("div", {
682
- className: n("grid min-w-0 grid-cols-1 gap-space-xl", o && "@xl/product-details:grid-cols-[12rem_minmax(0,1fr)]"),
683
- children: [!!o && /* @__PURE__ */ L("div", {
684
- className: "product-details-card--media overflow-hidden rounded-radius-md border border-border bg-muted/30",
685
- children: o
686
- }), /* @__PURE__ */ L(ne, {
687
- items: a,
688
- columns: o ? 1 : 2,
668
+ children: /* @__PURE__ */ H("div", {
669
+ className: i("grid min-w-0 grid-cols-1 gap-space-xl", a && "@xl/product-details:grid-cols-[12rem_minmax(0,1fr)]"),
670
+ children: [!!a && /* @__PURE__ */ V("div", {
671
+ className: "product-details-card--media self-start overflow-hidden rounded-inner border border-border bg-muted/30",
672
+ children: a
673
+ }), /* @__PURE__ */ V(se, {
674
+ items: n,
675
+ columns: a ? 1 : 2,
689
676
  density: "compact",
690
677
  className: "min-w-0 [&_.metadata-list--value]:break-words"
691
678
  })]
@@ -693,28 +680,28 @@ function Ye({ title: e, description: i, metadata: a = [], media: o, onEditDetail
693
680
  })
694
681
  });
695
682
  }
696
- Ye.displayName = "ProductDetailsCard";
683
+ Xe.displayName = "ProductDetailsCard";
697
684
  //#endregion
698
685
  //#region src/components/features/products/components/product-option-action-menu.tsx
699
- function Xe({ option: e, index: r = 0, onSelectOption: i, onEditOption: a, onDeleteOption: o, renderOptionActions: s, menuLabel: c, className: l, strings: u }) {
700
- let d = t(Z, u), f = i ? () => i(e) : void 0, p = a ? () => a(e) : void 0, m = o ? () => o(e) : void 0;
701
- return f || p || m || s ? s ? /* @__PURE__ */ L("div", {
702
- className: n("product-option-action-menu--component flex justify-end", l),
686
+ function Ze({ option: e, index: t = 0, onSelectOption: n, onEditOption: a, onDeleteOption: o, renderOptionActions: s, menuLabel: c, className: l, strings: u }) {
687
+ let d = r(we, u), f = n ? () => n(e) : void 0, p = a ? () => a(e) : void 0, m = o ? () => o(e) : void 0;
688
+ return f || p || m || s ? s ? /* @__PURE__ */ V("div", {
689
+ className: i("product-option-action-menu--component flex justify-end", l),
703
690
  children: s(e, {
704
- index: r,
691
+ index: t,
705
692
  onSelect: f,
706
693
  onEdit: p,
707
694
  onDelete: m
708
695
  })
709
- }) : /* @__PURE__ */ L(Ve, {
696
+ }) : /* @__PURE__ */ V(ze, {
710
697
  item: e,
711
698
  menuLabel: c ?? d.actionsLabel,
712
- className: n("product-option-action-menu--component", l),
699
+ className: i("product-option-action-menu--component", l),
713
700
  actions: [
714
701
  ...f ? [{
715
702
  id: "open",
716
703
  label: d.viewLabel,
717
- icon: /* @__PURE__ */ L(me, { className: "size-icon-md" }),
704
+ icon: /* @__PURE__ */ V(he, { className: "size-icon-md" }),
718
705
  onClick: () => f(),
719
706
  tone: "secondary",
720
707
  buttonStyle: "ghost"
@@ -722,7 +709,7 @@ function Xe({ option: e, index: r = 0, onSelectOption: i, onEditOption: a, onDel
722
709
  ...p ? [{
723
710
  id: "edit",
724
711
  label: d.editLabel,
725
- icon: /* @__PURE__ */ L(V, { className: "size-icon-md" }),
712
+ icon: /* @__PURE__ */ V(W, { className: "size-icon-md" }),
726
713
  onClick: () => p(),
727
714
  tone: "secondary",
728
715
  buttonStyle: "ghost"
@@ -730,306 +717,305 @@ function Xe({ option: e, index: r = 0, onSelectOption: i, onEditOption: a, onDel
730
717
  ...m ? [{
731
718
  id: "delete",
732
719
  label: d.deleteLabel,
733
- icon: /* @__PURE__ */ L(K, { className: "size-icon-md" }),
720
+ icon: /* @__PURE__ */ V(q, { className: "size-icon-md" }),
734
721
  onClick: () => m(),
735
722
  tone: "destructive"
736
723
  }] : []
737
724
  ]
738
725
  }) : null;
739
726
  }
740
- Xe.displayName = "ProductOptionActionMenu";
727
+ Ze.displayName = "ProductOptionActionMenu";
741
728
  //#endregion
742
729
  //#region src/components/features/products/components/product-operations-card.tsx
743
- function Ze({ items: e = [], onCreateOperation: i, onSelectOperation: a, onEditOperation: o, onDeleteOperation: s, renderOperationActions: c, actions: l, footerSlot: u, renderItem: d, empty: f, className: p, strings: m }) {
744
- let h = t(Te, m), g = i ? /* @__PURE__ */ L(r, {
730
+ function Qe({ items: e = [], onCreateOperation: t, onSelectOperation: n, onEditOperation: a, onDeleteOperation: o, renderOperationActions: c, actions: l, footerSlot: u, renderItem: d, empty: f, className: p, strings: m }) {
731
+ let h = r(be, m), g = t ? /* @__PURE__ */ V(s, {
745
732
  type: "button",
746
733
  tone: "secondary",
747
734
  buttonStyle: "ghost",
748
- onClick: i,
749
- icon: H,
735
+ onClick: t,
736
+ icon: G,
750
737
  children: h.createLabel
751
738
  }) : void 0;
752
- return /* @__PURE__ */ L(_, {
753
- icon: /* @__PURE__ */ L(ye, { className: "size-icon" }),
739
+ return /* @__PURE__ */ V(E, {
754
740
  title: h.title,
755
741
  description: h.description,
756
742
  actions: l,
757
743
  headerAction: g,
758
744
  footerSlot: u,
759
- contentClassName: "mt-1",
760
- className: n("product-operations-card--component w-full", p),
761
- children: e.length === 0 ? f ?? /* @__PURE__ */ L($, {
745
+ className: i("product-operations-card--component w-full", p),
746
+ children: e.length === 0 ? f ?? /* @__PURE__ */ V($, {
762
747
  title: h.emptyTitle,
763
748
  description: h.emptyDescription,
764
- action: i ? /* @__PURE__ */ L(r, {
749
+ action: t ? /* @__PURE__ */ V(s, {
750
+ tone: "primary",
765
751
  type: "button",
766
- onClick: i,
767
- icon: H,
752
+ onClick: t,
753
+ icon: G,
768
754
  children: h.createLabel
769
755
  }) : void 0
770
- }) : /* @__PURE__ */ L(w, { children: e.map((e, t) => {
771
- let n = a ? () => a(e) : void 0, r = o ? () => o(e) : void 0, i = s ? () => s(e) : void 0, l = [...r ? [{
756
+ }) : /* @__PURE__ */ V(M, { children: e.map((e, t) => {
757
+ let r = n ? () => n(e) : void 0, i = a ? () => a(e) : void 0, s = o ? () => o(e) : void 0, l = [...i ? [{
772
758
  id: "edit",
773
759
  label: h.editLabel,
774
- icon: /* @__PURE__ */ L(V, { className: "size-icon-md" }),
775
- onClick: () => r(),
760
+ icon: /* @__PURE__ */ V(W, { className: "size-icon-md" }),
761
+ onClick: () => i(),
776
762
  tone: "secondary",
777
763
  buttonStyle: "ghost"
778
- }] : [], ...i ? [{
764
+ }] : [], ...s ? [{
779
765
  id: "delete",
780
766
  label: h.deleteLabel,
781
- icon: /* @__PURE__ */ L(K, { className: "size-icon-md" }),
782
- onClick: () => i(),
767
+ icon: /* @__PURE__ */ V(q, { className: "size-icon-md" }),
768
+ onClick: () => s(),
783
769
  tone: "destructive"
784
770
  }] : []], u = c ? c(e, {
785
771
  index: t,
786
- onSelect: n,
787
- onEdit: r,
788
- onDelete: i
789
- }) : /* @__PURE__ */ L(Ve, {
772
+ onSelect: r,
773
+ onEdit: i,
774
+ onDelete: s
775
+ }) : /* @__PURE__ */ V(ze, {
790
776
  item: e,
791
777
  actions: l,
792
778
  menuLabel: h.actionsLabel
793
779
  });
794
- return d ? /* @__PURE__ */ L("div", { children: d(e, t) }, e.id) : /* @__PURE__ */ L(Ke, {
780
+ return d ? /* @__PURE__ */ V("div", { children: d(e, t) }, e.id) : /* @__PURE__ */ V(qe, {
795
781
  item: e,
796
782
  actionFallback: h.actionLabel,
797
- onSelect: n,
783
+ onSelect: r,
798
784
  actions: u
799
785
  }, e.id);
800
786
  }) })
801
787
  });
802
788
  }
803
- Ze.displayName = "ProductOperationsCard";
789
+ Qe.displayName = "ProductOperationsCard";
804
790
  //#endregion
805
791
  //#region src/components/features/products/components/product-options-matrix.tsx
806
- function Qe(e) {
792
+ function $e(e) {
807
793
  return typeof e == "string" || typeof e == "number" ? String(e) : "";
808
794
  }
809
- function $e(e) {
795
+ function et(e) {
810
796
  return typeof e == "string" || typeof e == "number" || typeof e == "bigint";
811
797
  }
812
- function et(e, t) {
813
- let n = Qe(t.name);
798
+ function tt(e, t) {
799
+ let n = $e(t.name);
814
800
  return n ? `${e}: ${n}` : e;
815
801
  }
816
- function tt(e) {
802
+ function nt(e) {
817
803
  return {
818
- name: Qe(e.name),
804
+ name: $e(e.name),
819
805
  values: (e.values ?? []).map((e) => ({
820
806
  ...e,
821
- label: Qe(e.label)
807
+ label: $e(e.label)
822
808
  }))
823
809
  };
824
810
  }
825
- function nt({ optionGroups: a = [], surface: o = "card", collapsedOptionIds: c, defaultCollapsedOptionIds: d = [], onCollapsedOptionIdsChange: f, editingOptionId: p, defaultEditingOptionId: m, onEditingOptionIdChange: g, onCreateOption: y, onEditOption: b, onDeleteOption: x, confirmDelete: S, onAddValue: C, onDeleteValue: w, onOptionNameChange: T, onValueLabelChange: E, onDoneEditingOption: D, onSaveEditingOption: O, onCancelEditingOption: k, onToggleUsedForVariants: te, renderOptionActions: A, renderValue: j, showHeader: M, showCollapseControls: N = !0, showInlineActions: P = !0, showVariantToggle: ne = !0, actions: re, headerEnd: ie, footerSlot: oe, empty: le, className: ue, strings: de }) {
826
- let z = t(De, de), pe = c !== void 0, [me, B] = se(d), ge = pe ? c : me, _e = I(() => new Set(ge), [ge]), ve = p !== void 0 || m !== void 0 || !!g || !!T || !!E || !!D || !!O || !!k, ye = p !== void 0, [V, be] = se(m ?? null), [xe, Se] = se({}), W = ve ? ye ? p : V : null, Ce = a.length > 0, G = o === "embedded" && M !== !1, J = Ce && !!y, we = F((e) => {
827
- pe || B(e), f?.(e, a.filter((t) => e.includes(t.id)));
811
+ function rt({ optionGroups: e = [], surface: t = "card", collapsedOptionIds: a, defaultCollapsedOptionIds: c = [], onCollapsedOptionIdsChange: u, editingOptionId: d, defaultEditingOptionId: m, onEditingOptionIdChange: h, onCreateOption: g, onEditOption: _, onDeleteOption: v, confirmDelete: S, onAddValue: C, onDeleteValue: T, onOptionNameChange: D, onValueLabelChange: O, onDoneEditingOption: k, onSaveEditingOption: A, onCancelEditingOption: j, onToggleUsedForVariants: M, renderOptionActions: N, renderValue: P, showHeader: F, showCollapseControls: ee = !0, showInlineActions: I = !0, showVariantToggle: te = !0, actions: ne, headerEnd: re, footerSlot: ie, empty: ae, className: oe, strings: se }) {
812
+ let L = r(Te, se), ce = a !== void 0, [z, fe] = ue(c), me = ce ? a : z, he = B(() => new Set(me), [me]), U = d !== void 0 || m !== void 0 || !!h || !!D || !!O || !!k || !!A || !!j, W = d !== void 0, [ve, K] = ue(m ?? null), [J, Y] = ue({}), be = U ? W ? d : ve : null, xe = e.length > 0, Se = t === "embedded" && F !== !1, Ce = xe && !!g, we = R((t) => {
813
+ ce || fe(t), u?.(t, e.filter((e) => t.includes(e.id)));
828
814
  }, [
829
- pe,
830
- f,
831
- a
832
- ]), Te = F((e) => {
833
- let t = _e.has(e.id) ? ge.filter((t) => t !== e.id) : [...ge, e.id];
815
+ ce,
816
+ u,
817
+ e
818
+ ]), Ee = R((e) => {
819
+ let t = he.has(e.id) ? me.filter((t) => t !== e.id) : [...me, e.id];
834
820
  we(t);
835
821
  }, [
836
- _e,
837
- ge,
822
+ he,
823
+ me,
838
824
  we
839
- ]), Y = F((e, t) => {
840
- ve && (ye || be(e), g?.(e, t));
825
+ ]), X = R((e, t) => {
826
+ U && (W || K(e), h?.(e, t));
841
827
  }, [
842
- ye,
843
- g,
844
- ve
845
- ]), Ee = F((e) => {
846
- Se((t) => ({
828
+ W,
829
+ h,
830
+ U
831
+ ]), Z = R((e) => {
832
+ Y((t) => ({
847
833
  ...t,
848
- [e.id]: tt(e)
849
- })), Y(e.id, e), b?.(e);
850
- }, [b, Y]), X = F((e) => xe[e.id] ?? tt(e), [xe]), Z = F((e, t) => {
851
- Se((n) => ({
834
+ [e.id]: nt(e)
835
+ })), X(e.id, e), _?.(e);
836
+ }, [_, X]), De = R((e) => J[e.id] ?? nt(e), [J]), Oe = R((e, t) => {
837
+ Y((n) => ({
852
838
  ...n,
853
- [e.id]: t(n[e.id] ?? tt(e))
839
+ [e.id]: t(n[e.id] ?? nt(e))
854
840
  }));
855
- }, []), Q = F((e) => {
856
- let t = X(e);
857
- Se((t) => {
841
+ }, []), ke = R((e) => {
842
+ let t = De(e);
843
+ Y((t) => {
858
844
  let { [e.id]: n, ...r } = t;
859
845
  return r;
860
- }), Y(null, e), k?.(e, t);
846
+ }), X(null, e), j?.(e, t);
861
847
  }, [
862
- X,
863
- k,
864
- Y
865
- ]), Oe = F((e) => {
866
- let t = X(e), n = e.values ?? [], r = new Set(n.map((e) => e.id)), i = new Set(t.values.map((e) => e.id));
867
- O?.(e, t), T?.(e, t.name), n.forEach((n) => {
848
+ De,
849
+ j,
850
+ X
851
+ ]), Q = R((e) => {
852
+ let t = De(e), n = e.values ?? [], r = new Set(n.map((e) => e.id)), i = new Set(t.values.map((e) => e.id));
853
+ A?.(e, t), D?.(e, t.name), n.forEach((n) => {
868
854
  let r = t.values.find((e) => e.id === n.id);
869
- r && Qe(n.label) !== Qe(r.label) && E?.(e, n, Qe(r.label));
855
+ r && $e(n.label) !== $e(r.label) && O?.(e, n, $e(r.label));
870
856
  }), t.values.forEach((t) => {
871
857
  r.has(t.id) || C?.(e);
872
858
  }), n.forEach((t) => {
873
- i.has(t.id) || w?.(e, t);
874
- }), Se((t) => {
859
+ i.has(t.id) || T?.(e, t);
860
+ }), Y((t) => {
875
861
  let { [e.id]: n, ...r } = t;
876
862
  return r;
877
- }), Y(null, e), D?.(e);
863
+ }), X(null, e), k?.(e);
878
864
  }, [
879
- X,
865
+ De,
880
866
  C,
881
- w,
882
- D,
883
867
  T,
868
+ k,
869
+ D,
870
+ A,
884
871
  O,
885
- E,
886
- Y
887
- ]), ke = l(), [Ae, je] = se(null), Me = F((e) => {
888
- let t = X(e), n = new Set(t.values.map((e) => e.id)), r = (e.values ?? []).filter((e) => !n.has(e.id)).length;
872
+ X
873
+ ]), Ae = f(), [je, Me] = ue(null), Ne = R((e) => {
874
+ let t = De(e), n = new Set(t.values.map((e) => e.id)), r = (e.values ?? []).filter((e) => !n.has(e.id)).length;
889
875
  if (S === !1 || r === 0) {
890
- Oe(e);
876
+ Q(e);
891
877
  return;
892
878
  }
893
- je({
879
+ Me({
894
880
  option: e,
895
881
  removed: r
896
- }), ke.show();
882
+ }), Ae.show();
897
883
  }, [
898
- Oe,
884
+ Q,
899
885
  S,
900
- X,
901
- ke
902
- ]), Ne = F((e) => {
903
- W === e.id && (Se((t) => {
886
+ De,
887
+ Ae
888
+ ]), Pe = R((e) => {
889
+ be === e.id && (Y((t) => {
904
890
  let { [e.id]: n, ...r } = t;
905
891
  return r;
906
- }), Y(null, e)), x?.(e);
892
+ }), X(null, e)), v?.(e);
907
893
  }, [
908
- x,
909
- W,
910
- Y
911
- ]), Pe = l(), [Fe, Ie] = se(null), Le = F((e) => {
894
+ v,
895
+ be,
896
+ X
897
+ ]), Fe = f(), [Ie, Le] = ue(null), Re = R((e) => {
912
898
  if (S === !1) {
913
- Ne(e);
899
+ Pe(e);
914
900
  return;
915
901
  }
916
- Ie(e), Pe.show();
902
+ Le(e), Fe.show();
917
903
  }, [
918
904
  S,
919
- Ne,
920
- Pe
921
- ]), Re = y ? /* @__PURE__ */ L(r, {
905
+ Pe,
906
+ Fe
907
+ ]), Be = g ? /* @__PURE__ */ V(s, {
922
908
  type: "button",
923
909
  tone: "neutral",
924
- onClick: y,
925
- icon: H,
926
- children: z.createLabel
927
- }) : void 0, ze = G ? /* @__PURE__ */ L("div", {
910
+ onClick: g,
911
+ icon: G,
912
+ children: L.createLabel
913
+ }) : void 0, Ve = Se ? /* @__PURE__ */ V("div", {
928
914
  className: "product-options-matrix--panel-header p-surface",
929
- children: /* @__PURE__ */ R(s, {
915
+ children: /* @__PURE__ */ H(l, {
930
916
  direction: "horizontal",
931
917
  gap: "md",
932
918
  justify: "between",
933
- children: [/* @__PURE__ */ L(i, {
919
+ children: [/* @__PURE__ */ V(o, {
934
920
  weight: "semibold",
935
- children: z.title
936
- }), Re]
921
+ children: L.title
922
+ }), Be]
937
923
  })
938
- }) : null, Be = /* @__PURE__ */ R("div", {
924
+ }) : null, He = /* @__PURE__ */ H("div", {
939
925
  className: "product-options-matrix--body min-w-0",
940
926
  children: [
941
- /* @__PURE__ */ R("div", {
942
- className: "product-options-matrix--panel overflow-hidden rounded-radius-lg border border-border bg-background",
943
- children: [ze, Ce ? /* @__PURE__ */ R("div", {
944
- className: n("product-options-matrix--list", G && "border-t border-border/70"),
945
- children: [a.map((e, t) => {
946
- let a = e.values ?? [], o = _e.has(e.id), c = W === e.id, l = !!b || ve, u = !!x, d = !!C, f = X(e), p = A?.(e, {
927
+ /* @__PURE__ */ H("div", {
928
+ className: "product-options-matrix--panel overflow-hidden rounded-radius border border-border bg-background",
929
+ children: [Ve, xe ? /* @__PURE__ */ H("div", {
930
+ className: i("product-options-matrix--list", Se && "border-t border-border/70"),
931
+ children: [e.map((e, t) => {
932
+ let n = e.values ?? [], r = he.has(e.id), a = be === e.id, c = !!_ || U, u = !!v, d = !!C, f = De(e), p = N?.(e, {
947
933
  index: t,
948
- onEdit: l ? () => Ee(e) : void 0,
949
- onDelete: x ? () => Le(e) : void 0,
934
+ onEdit: c ? () => Z(e) : void 0,
935
+ onDelete: v ? () => Re(e) : void 0,
950
936
  onAddValue: C ? () => C(e) : void 0,
951
- onToggleCollapsed: () => Te(e),
952
- collapsed: o
937
+ onToggleCollapsed: () => Ee(e),
938
+ collapsed: r
953
939
  }), m = [...d ? [{
954
940
  id: "add-value",
955
- label: z.addValueLabel,
956
- icon: /* @__PURE__ */ L(H, { className: "size-icon-md" }),
941
+ label: L.addValueLabel,
942
+ icon: /* @__PURE__ */ V(G, { className: "size-icon-md" }),
957
943
  onClick: () => C?.(e),
958
944
  tone: "secondary",
959
945
  buttonStyle: "ghost"
960
946
  }] : [], ...u ? [{
961
947
  id: "delete",
962
- label: z.deleteLabel,
963
- icon: /* @__PURE__ */ L(K, { className: "size-icon-md" }),
964
- onClick: () => Le(e),
948
+ label: L.deleteLabel,
949
+ icon: /* @__PURE__ */ V(q, { className: "size-icon-md" }),
950
+ onClick: () => Re(e),
965
951
  tone: "destructive"
966
- }] : []], g = P ? /* @__PURE__ */ R(ce, { children: [!!l && /* @__PURE__ */ L(r, {
952
+ }] : []], h = I ? /* @__PURE__ */ H(de, { children: [!!c && /* @__PURE__ */ V(s, {
967
953
  type: "button",
968
954
  tone: "secondary",
969
955
  buttonStyle: "ghost",
970
- onClick: () => Ee(e),
971
- children: z.editLabel
972
- }), /* @__PURE__ */ L(Ve, {
956
+ onClick: () => Z(e),
957
+ children: L.editLabel
958
+ }), /* @__PURE__ */ V(ze, {
973
959
  item: e,
974
960
  actions: m,
975
- menuLabel: z.actionsLabel
976
- })] }) : null, _ = p === void 0 ? g : p;
977
- if (c) return /* @__PURE__ */ L("div", {
961
+ menuLabel: L.actionsLabel
962
+ })] }) : null, g = p === void 0 ? h : p;
963
+ if (a) return /* @__PURE__ */ V("div", {
978
964
  className: "product-options-matrix--item product-options-matrix--item-editing border-b border-border/70 p-surface last:border-b-0",
979
- children: /* @__PURE__ */ R("div", {
965
+ children: /* @__PURE__ */ H("div", {
980
966
  className: "grid min-w-0 grid-cols-[auto_minmax(0,1fr)] gap-x-space-md gap-y-space-lg",
981
- children: [/* @__PURE__ */ L("span", {
982
- className: "product-options-matrix--drag-handle mt-[2.625rem] flex size-icon-lg items-center justify-center text-muted-foreground",
967
+ children: [/* @__PURE__ */ V("span", {
968
+ className: "product-options-matrix--drag-handle self-start flex size-icon-lg items-center justify-center text-muted-foreground",
983
969
  "aria-hidden": "true",
984
- children: /* @__PURE__ */ L(he, { className: "size-icon-sm" })
985
- }), /* @__PURE__ */ R(s, {
970
+ children: /* @__PURE__ */ V(ge, { className: "size-icon-sm" })
971
+ }), /* @__PURE__ */ H(l, {
986
972
  gap: "lg",
987
973
  className: "product-options-matrix--editor",
988
974
  children: [
989
- /* @__PURE__ */ L(v, {
990
- label: z.optionNameLabel,
975
+ /* @__PURE__ */ V(x, {
976
+ label: L.optionNameLabel,
991
977
  className: "product-options-matrix--editor-field",
992
- children: /* @__PURE__ */ L(h, {
978
+ children: /* @__PURE__ */ V(b, {
993
979
  value: f.name,
994
980
  onChange: (t) => {
995
981
  let n = t.currentTarget.value;
996
- Z(e, (e) => ({
982
+ Oe(e, (e) => ({
997
983
  ...e,
998
984
  name: n
999
985
  }));
1000
986
  },
1001
- "aria-label": z.optionNameLabel,
987
+ "aria-label": L.optionNameLabel,
1002
988
  className: "bg-background"
1003
989
  })
1004
990
  }),
1005
- /* @__PURE__ */ R(s, {
991
+ /* @__PURE__ */ H(l, {
1006
992
  gap: "sm",
1007
993
  className: "product-options-matrix--editor-field",
1008
- children: [/* @__PURE__ */ L(i, {
994
+ children: [/* @__PURE__ */ V(o, {
1009
995
  weight: "medium",
1010
- children: z.optionValuesLabel
1011
- }), /* @__PURE__ */ R(s, {
996
+ children: L.optionValuesLabel
997
+ }), /* @__PURE__ */ H(l, {
1012
998
  gap: "xs",
1013
999
  className: "product-options-matrix--editor-values",
1014
1000
  children: [
1015
- f.values.length === 0 && /* @__PURE__ */ L(i, {
1001
+ f.values.length === 0 && /* @__PURE__ */ V(o, {
1016
1002
  size: "xs",
1017
1003
  type: "secondary",
1018
- children: z.noValuesLabel
1004
+ children: L.noValuesLabel
1019
1005
  }),
1020
- f.values.map((t) => /* @__PURE__ */ R("div", {
1006
+ f.values.map((t) => /* @__PURE__ */ H("div", {
1021
1007
  className: "product-options-matrix--editor-value grid min-w-0 grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-space-sm",
1022
1008
  children: [
1023
- /* @__PURE__ */ L("span", {
1009
+ /* @__PURE__ */ V("span", {
1024
1010
  className: "flex size-icon-lg items-center justify-center text-muted-foreground",
1025
1011
  "aria-hidden": "true",
1026
- children: /* @__PURE__ */ L(he, { className: "size-icon-sm" })
1012
+ children: /* @__PURE__ */ V(ge, { className: "size-icon-sm" })
1027
1013
  }),
1028
- /* @__PURE__ */ L(h, {
1029
- value: Qe(t.label),
1014
+ /* @__PURE__ */ V(b, {
1015
+ value: $e(t.label),
1030
1016
  onChange: (n) => {
1031
1017
  let r = n.currentTarget.value;
1032
- Z(e, (e) => ({
1018
+ Oe(e, (e) => ({
1033
1019
  ...e,
1034
1020
  values: e.values.map((e) => e.id === t.id ? {
1035
1021
  ...e,
@@ -1037,45 +1023,45 @@ function nt({ optionGroups: a = [], surface: o = "card", collapsedOptionIds: c,
1037
1023
  } : e)
1038
1024
  }));
1039
1025
  },
1040
- "aria-label": `${z.optionValuesLabel}: ${Qe(t.label)}`,
1026
+ "aria-label": `${L.optionValuesLabel}: ${$e(t.label)}`,
1041
1027
  className: "bg-background"
1042
1028
  }),
1043
- /* @__PURE__ */ R(r, {
1029
+ /* @__PURE__ */ H(s, {
1044
1030
  type: "button",
1045
1031
  size: "sm",
1046
1032
  iconOnly: !0,
1047
1033
  tone: "secondary",
1048
1034
  buttonStyle: "ghost",
1049
- onClick: () => Z(e, (e) => ({
1035
+ onClick: () => Oe(e, (e) => ({
1050
1036
  ...e,
1051
1037
  values: e.values.filter((e) => e.id !== t.id)
1052
1038
  })),
1053
- "aria-label": z.deleteValueLabel,
1039
+ "aria-label": L.deleteValueLabel,
1054
1040
  className: "text-muted-foreground hover:text-destructive",
1055
- children: [/* @__PURE__ */ L(K, {
1041
+ children: [/* @__PURE__ */ V(q, {
1056
1042
  className: "size-icon-sm",
1057
1043
  "aria-hidden": "true"
1058
- }), /* @__PURE__ */ L(i, {
1044
+ }), /* @__PURE__ */ V(o, {
1059
1045
  tag: "span",
1060
1046
  size: "pxs",
1061
1047
  className: "sr-only",
1062
- children: z.deleteValueLabel
1048
+ children: L.deleteValueLabel
1063
1049
  })]
1064
1050
  })
1065
1051
  ]
1066
1052
  }, t.id)),
1067
- /* @__PURE__ */ R("div", {
1053
+ /* @__PURE__ */ H("div", {
1068
1054
  className: "product-options-matrix--editor-add-value grid min-w-0 grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-space-sm",
1069
1055
  children: [
1070
- /* @__PURE__ */ L("span", {
1056
+ /* @__PURE__ */ V("span", {
1071
1057
  className: "size-icon-lg",
1072
1058
  "aria-hidden": "true"
1073
1059
  }),
1074
- /* @__PURE__ */ L(r, {
1060
+ /* @__PURE__ */ V(s, {
1075
1061
  type: "button",
1076
1062
  tone: "secondary",
1077
1063
  buttonStyle: "outline",
1078
- onClick: () => Z(e, (t) => {
1064
+ onClick: () => Oe(e, (t) => {
1079
1065
  let n = t.values.length + 1;
1080
1066
  return {
1081
1067
  ...t,
@@ -1087,9 +1073,9 @@ function nt({ optionGroups: a = [], surface: o = "card", collapsedOptionIds: c,
1087
1073
  }),
1088
1074
  fullWidth: !0,
1089
1075
  className: "justify-start border-input bg-background text-muted-foreground hover:bg-muted/60",
1090
- children: z.addAnotherValueLabel
1076
+ children: L.addAnotherValueLabel
1091
1077
  }),
1092
- /* @__PURE__ */ L("span", {
1078
+ /* @__PURE__ */ V("span", {
1093
1079
  className: "size-action-sm",
1094
1080
  "aria-hidden": "true"
1095
1081
  })
@@ -1098,34 +1084,34 @@ function nt({ optionGroups: a = [], surface: o = "card", collapsedOptionIds: c,
1098
1084
  ]
1099
1085
  })]
1100
1086
  }),
1101
- /* @__PURE__ */ R(s, {
1087
+ /* @__PURE__ */ H(l, {
1102
1088
  direction: "horizontal",
1103
1089
  gap: "md",
1104
1090
  justify: "between",
1105
1091
  wrap: !1,
1106
1092
  className: "product-options-matrix--editor-actions",
1107
- children: [/* @__PURE__ */ L("div", { children: !!x && /* @__PURE__ */ L(r, {
1093
+ children: [/* @__PURE__ */ V("div", { children: !!v && /* @__PURE__ */ V(s, {
1108
1094
  type: "button",
1109
1095
  tone: "destructive",
1110
1096
  buttonStyle: "outline",
1111
- onClick: () => Le(e),
1112
- children: z.deleteLabel
1113
- }) }), /* @__PURE__ */ R(s, {
1097
+ onClick: () => Re(e),
1098
+ children: L.deleteLabel
1099
+ }) }), /* @__PURE__ */ H(l, {
1114
1100
  direction: "horizontal",
1115
1101
  gap: "sm",
1116
1102
  justify: "end",
1117
1103
  wrap: !1,
1118
- children: [/* @__PURE__ */ L(r, {
1104
+ children: [/* @__PURE__ */ V(s, {
1119
1105
  type: "button",
1120
1106
  tone: "secondary",
1121
1107
  buttonStyle: "ghost",
1122
- onClick: () => Q(e),
1123
- children: z.cancelLabel
1124
- }), /* @__PURE__ */ L(r, {
1108
+ onClick: () => ke(e),
1109
+ children: L.cancelLabel
1110
+ }), /* @__PURE__ */ V(s, {
1125
1111
  type: "button",
1126
1112
  tone: "neutral",
1127
- onClick: () => Me(e),
1128
- children: z.saveLabel ?? z.doneLabel
1113
+ onClick: () => Ne(e),
1114
+ children: L.saveLabel ?? L.doneLabel
1129
1115
  })]
1130
1116
  })]
1131
1117
  })
@@ -1133,247 +1119,242 @@ function nt({ optionGroups: a = [], surface: o = "card", collapsedOptionIds: c,
1133
1119
  })]
1134
1120
  })
1135
1121
  }, e.id);
1136
- let y = /* @__PURE__ */ R(s, {
1137
- render: /* @__PURE__ */ L("span", {}),
1122
+ let S = /* @__PURE__ */ H(l, {
1123
+ render: /* @__PURE__ */ V("span", {}),
1138
1124
  gap: "sm",
1139
1125
  children: [
1140
- /* @__PURE__ */ R(s, {
1141
- render: /* @__PURE__ */ L("span", {}),
1126
+ /* @__PURE__ */ H(l, {
1127
+ render: /* @__PURE__ */ V("span", {}),
1142
1128
  direction: "horizontal",
1143
1129
  gap: "sm",
1144
- children: [/* @__PURE__ */ L(i, {
1130
+ children: [/* @__PURE__ */ V(o, {
1145
1131
  tag: "span",
1146
1132
  weight: "semibold",
1147
1133
  className: "min-w-0 whitespace-normal break-words",
1148
1134
  children: e.name
1149
1135
  }), e.badge]
1150
1136
  }),
1151
- !!e.description && /* @__PURE__ */ L(i, {
1137
+ !!e.description && /* @__PURE__ */ V(o, {
1152
1138
  tag: "span",
1153
1139
  size: "xs",
1154
1140
  type: "secondary",
1155
1141
  className: "max-w-prose",
1156
1142
  children: e.description
1157
1143
  }),
1158
- !o && /* @__PURE__ */ L(s, {
1159
- render: /* @__PURE__ */ L("span", {}),
1144
+ !r && /* @__PURE__ */ V(l, {
1145
+ render: /* @__PURE__ */ V("span", {}),
1160
1146
  gap: "sm",
1161
1147
  className: "product-options-matrix--values",
1162
- children: a.length === 0 ? /* @__PURE__ */ L(i, {
1148
+ children: n.length === 0 ? /* @__PURE__ */ V(o, {
1163
1149
  tag: "span",
1164
1150
  size: "xs",
1165
1151
  type: "secondary",
1166
- children: z.noValuesLabel
1167
- }) : /* @__PURE__ */ L("span", {
1152
+ children: L.noValuesLabel
1153
+ }) : /* @__PURE__ */ V("span", {
1168
1154
  className: "flex flex-wrap gap-space-xs",
1169
- children: a.map((a, o) => {
1170
- let s = w ? () => w(e, a) : void 0, c = j?.(a, {
1155
+ children: n.map((n, r) => {
1156
+ let a = T ? () => T(e, n) : void 0, s = P?.(n, {
1171
1157
  option: e,
1172
1158
  optionIndex: t,
1173
- valueIndex: o,
1174
- onDelete: s
1159
+ valueIndex: r,
1160
+ onDelete: a
1175
1161
  });
1176
- return c ? /* @__PURE__ */ L(ae, { children: c }, a.id) : /* @__PURE__ */ R("span", {
1177
- className: n("product-options-matrix--value inline-flex max-w-full items-center gap-space-xs rounded-radius bg-muted px-space-sm py-space-xs text-pxs font-medium leading-none text-muted-foreground", a.disabled && "opacity-60"),
1162
+ return s ? /* @__PURE__ */ V(le, { children: s }, n.id) : /* @__PURE__ */ H("span", {
1163
+ className: i("product-options-matrix--value inline-flex max-w-full items-center gap-space-xs rounded-radius bg-muted px-space-sm py-space-xs text-pxs font-medium leading-none text-muted-foreground", n.disabled && "opacity-60"),
1178
1164
  children: [
1179
- $e(a.label) ? /* @__PURE__ */ L(i, {
1165
+ et(n.label) ? /* @__PURE__ */ V(o, {
1180
1166
  tag: "span",
1181
1167
  size: "inherit",
1182
1168
  className: "min-w-0 whitespace-normal break-words",
1183
- children: a.label
1184
- }) : a.label,
1185
- a.badge,
1186
- !!s && P && /* @__PURE__ */ R(r, {
1169
+ children: n.label
1170
+ }) : n.label,
1171
+ n.badge,
1172
+ !!a && I && /* @__PURE__ */ H("button", {
1187
1173
  type: "button",
1188
- size: "sm",
1189
- iconOnly: !0,
1190
- tone: "secondary",
1191
- buttonStyle: "ghost",
1192
- onClick: s,
1193
- "aria-label": z.deleteValueLabel,
1194
- className: "size-icon-sm shrink-0 rounded-radius text-muted-foreground/70 hover:text-destructive",
1195
- children: [/* @__PURE__ */ L(q, {
1196
- className: "size-icon-sm",
1174
+ onClick: a,
1175
+ "aria-label": L.deleteValueLabel,
1176
+ className: i(y.target, y.focus, y.clear, "hover:text-destructive"),
1177
+ children: [/* @__PURE__ */ V(ye, {
1178
+ className: y.icon,
1197
1179
  "aria-hidden": "true"
1198
- }), /* @__PURE__ */ L(i, {
1180
+ }), /* @__PURE__ */ V(o, {
1199
1181
  tag: "span",
1200
1182
  size: "pxs",
1201
1183
  className: "sr-only",
1202
- children: z.deleteValueLabel
1184
+ children: L.deleteValueLabel
1203
1185
  })]
1204
1186
  })
1205
1187
  ]
1206
- }, a.id);
1188
+ }, n.id);
1207
1189
  })
1208
1190
  })
1209
1191
  })
1210
1192
  ]
1211
1193
  });
1212
- return /* @__PURE__ */ L("div", {
1194
+ return /* @__PURE__ */ V("div", {
1213
1195
  className: "product-options-matrix--item border-b border-border/70 last:border-b-0",
1214
- children: /* @__PURE__ */ R("div", {
1196
+ children: /* @__PURE__ */ H("div", {
1215
1197
  className: "grid min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-space-md gap-y-space-md p-surface @2xl/product-options-matrix:grid-cols-[auto_minmax(0,1fr)_auto]",
1216
1198
  children: [
1217
- N ? /* @__PURE__ */ R(r, {
1199
+ ee ? /* @__PURE__ */ H(s, {
1218
1200
  type: "button",
1219
1201
  size: "sm",
1220
1202
  iconOnly: !0,
1221
1203
  tone: "secondary",
1222
1204
  buttonStyle: "ghost",
1223
- onClick: () => Te(e),
1224
- "aria-expanded": !o,
1225
- "aria-label": o ? z.expandOptionLabel : z.collapseOptionLabel,
1205
+ onClick: () => Ee(e),
1206
+ "aria-expanded": !r,
1207
+ "aria-label": r ? L.expandOptionLabel : L.collapseOptionLabel,
1226
1208
  className: "product-options-matrix--collapse-trigger mt-space-2xs shrink-0 text-muted-foreground",
1227
- children: [/* @__PURE__ */ L(fe, {
1228
- className: n("size-icon-sm transition-transform", o && "-rotate-90"),
1209
+ children: [/* @__PURE__ */ V(pe, {
1210
+ className: i("size-icon-sm transition-transform", r && "-rotate-90"),
1229
1211
  "aria-hidden": "true"
1230
- }), /* @__PURE__ */ L(i, {
1212
+ }), /* @__PURE__ */ V(o, {
1231
1213
  tag: "span",
1232
1214
  size: "pxs",
1233
1215
  className: "sr-only",
1234
- children: o ? z.expandOptionLabel : z.collapseOptionLabel
1216
+ children: r ? L.expandOptionLabel : L.collapseOptionLabel
1235
1217
  })]
1236
- }) : /* @__PURE__ */ L("span", {
1218
+ }) : /* @__PURE__ */ V("span", {
1237
1219
  className: "product-options-matrix--drag-handle flex size-icon-lg items-center justify-center text-muted-foreground",
1238
1220
  "aria-hidden": "true",
1239
- children: /* @__PURE__ */ L(he, { className: "size-icon-sm" })
1221
+ children: /* @__PURE__ */ V(ge, { className: "size-icon-sm" })
1240
1222
  }),
1241
- /* @__PURE__ */ L("div", {
1223
+ /* @__PURE__ */ V("div", {
1242
1224
  className: "product-options-matrix--item-main min-w-0",
1243
- children: l && !P ? /* @__PURE__ */ L(r, {
1225
+ children: c && !I ? /* @__PURE__ */ V("button", {
1244
1226
  type: "button",
1245
- tone: "secondary",
1246
- buttonStyle: "ghost",
1247
- onClick: () => Ee(e),
1248
- "aria-label": et(z.editLabel, e),
1249
- className: "h-auto min-h-0 w-full justify-start whitespace-normal rounded-radius p-0 text-left hover:bg-transparent focus-visible:ring-offset-2",
1250
- children: y
1251
- }) : y
1227
+ onClick: () => Z(e),
1228
+ "aria-label": tt(L.editLabel, e),
1229
+ className: "product-options-matrix--edit-summary box-border block w-full cursor-pointer whitespace-normal rounded-inner border-0 bg-transparent p-0 text-start font-sans text-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
1230
+ children: S
1231
+ }) : S
1252
1232
  }),
1253
- (ne || !!_) && /* @__PURE__ */ R("div", {
1233
+ (te || !!g) && /* @__PURE__ */ H("div", {
1254
1234
  className: "product-options-matrix--item-actions col-start-2 flex min-w-fit items-center gap-space-md justify-start @2xl/product-options-matrix:justify-end lg:col-start-auto",
1255
- children: [!!te && ne && /* @__PURE__ */ R("div", {
1235
+ children: [!!M && te && /* @__PURE__ */ H("div", {
1256
1236
  className: "inline-flex items-center gap-space-sm",
1257
- children: [/* @__PURE__ */ L(i, {
1237
+ children: [/* @__PURE__ */ V(o, {
1258
1238
  tag: "span",
1259
1239
  id: `product-option-${e.id}-variant-toggle-label`,
1260
1240
  size: "pxs",
1261
1241
  type: "secondary",
1262
1242
  weight: "medium",
1263
- children: z.useForVariantsLabel
1264
- }), /* @__PURE__ */ L(ee, {
1243
+ children: L.useForVariantsLabel
1244
+ }), /* @__PURE__ */ V(w, {
1265
1245
  checked: !!e.usedForVariants,
1266
- onValueChange: (t) => te(e, t),
1246
+ onValueChange: (t) => M(e, t),
1267
1247
  "aria-labelledby": `product-option-${e.id}-variant-toggle-label`
1268
1248
  })]
1269
- }), _]
1249
+ }), g]
1270
1250
  })
1271
1251
  ]
1272
1252
  })
1273
1253
  }, e.id);
1274
- }), !!J && /* @__PURE__ */ L("div", {
1275
- className: "product-options-matrix--create-row border-t border-border/70",
1276
- children: /* @__PURE__ */ L(r, {
1254
+ }), !!Ce && /* @__PURE__ */ V("div", {
1255
+ className: "product-options-matrix--create-row border-t border-border/70 p-surface-xs",
1256
+ children: /* @__PURE__ */ V(s, {
1277
1257
  type: "button",
1278
1258
  tone: "secondary",
1279
1259
  buttonStyle: "ghost",
1280
- onClick: y,
1281
- icon: U,
1282
- className: "h-auto min-h-action-sm w-full justify-start rounded-none px-surface py-space-sm text-foreground hover:bg-muted/60",
1283
- children: z.addAnotherOptionLabel
1260
+ onClick: g,
1261
+ icon: _e,
1262
+ size: "sm",
1263
+ fullWidth: !0,
1264
+ className: "justify-start text-foreground",
1265
+ children: L.addAnotherOptionLabel
1284
1266
  })
1285
1267
  })]
1286
- }) : /* @__PURE__ */ L("div", {
1287
- className: n(G && "border-t border-border/70"),
1288
- children: le ?? /* @__PURE__ */ L($, {
1289
- title: z.emptyTitle,
1290
- description: z.emptyDescription,
1291
- action: y && !G ? /* @__PURE__ */ L(r, {
1268
+ }) : /* @__PURE__ */ V("div", {
1269
+ className: i(Se && "border-t border-border/70"),
1270
+ children: ae ?? /* @__PURE__ */ V($, {
1271
+ title: L.emptyTitle,
1272
+ description: L.emptyDescription,
1273
+ action: g && !Se ? /* @__PURE__ */ V(s, {
1274
+ tone: "primary",
1292
1275
  type: "button",
1293
- onClick: y,
1294
- icon: H,
1295
- children: z.createLabel
1276
+ onClick: g,
1277
+ icon: G,
1278
+ children: L.createLabel
1296
1279
  }) : void 0
1297
1280
  })
1298
1281
  })]
1299
1282
  }),
1300
- !!(S !== !1 && Ae) && /* @__PURE__ */ L(u, {
1301
- ...ke.overlayProps,
1283
+ !!(S !== !1 && je) && /* @__PURE__ */ V(p, {
1284
+ ...Ae.overlayProps,
1302
1285
  destructive: !0,
1303
- title: z.confirmRemoveValuesTitle,
1304
- description: e(z.confirmRemoveValuesDescription, { count: Ae.removed }),
1305
- strings: { confirm: z.confirmRemoveValuesLabel },
1306
- onConfirm: () => Oe(Ae.option)
1286
+ title: L.confirmRemoveValuesTitle,
1287
+ description: n(L.confirmRemoveValuesDescription, { count: je.removed }),
1288
+ strings: { confirm: L.confirmRemoveValuesLabel },
1289
+ onConfirm: () => Q(je.option)
1307
1290
  }),
1308
- !!(S !== !1 && x) && /* @__PURE__ */ L(u, {
1309
- ...Pe.overlayProps,
1291
+ !!(S !== !1 && v) && /* @__PURE__ */ V(p, {
1292
+ ...Fe.overlayProps,
1310
1293
  destructive: !0,
1311
- title: z.confirmDeleteOptionTitle,
1312
- description: z.confirmDeleteOptionDescription,
1313
- strings: { confirm: z.deleteLabel },
1294
+ title: L.confirmDeleteOptionTitle,
1295
+ description: L.confirmDeleteOptionDescription,
1296
+ strings: { confirm: L.deleteLabel },
1314
1297
  onConfirm: () => {
1315
- Fe && Ne(Fe);
1298
+ Ie && Pe(Ie);
1316
1299
  }
1317
1300
  })
1318
1301
  ]
1319
1302
  });
1320
- return o === "embedded" ? /* @__PURE__ */ L("section", {
1321
- "aria-label": z.title,
1322
- className: n("product-options-matrix--component @container/product-options-matrix min-w-0", ue),
1323
- children: Be
1324
- }) : /* @__PURE__ */ L(_, {
1325
- title: z.title,
1326
- description: z.description,
1327
- actions: re,
1328
- headerAction: Re,
1329
- headerEnd: ie,
1330
- footerSlot: oe,
1331
- contentClassName: "mt-1",
1332
- className: n("product-options-matrix--component @container/product-options-matrix w-full", ue),
1333
- children: Be
1303
+ return t === "embedded" ? /* @__PURE__ */ V("section", {
1304
+ "aria-label": L.title,
1305
+ className: i("product-options-matrix--component @container/product-options-matrix min-w-0", oe),
1306
+ children: He
1307
+ }) : /* @__PURE__ */ V(E, {
1308
+ title: L.title,
1309
+ description: L.description,
1310
+ actions: ne,
1311
+ headerAction: Be,
1312
+ headerEnd: re,
1313
+ footerSlot: ie,
1314
+ className: i("product-options-matrix--component @container/product-options-matrix w-full", oe),
1315
+ children: He
1334
1316
  });
1335
1317
  }
1336
- nt.displayName = "ProductOptionsMatrix";
1318
+ rt.displayName = "ProductOptionsMatrix";
1337
1319
  //#endregion
1338
1320
  //#region src/components/features/products/components/product-options-summary.tsx
1339
- function rt({ options: e = [], onManageOptions: i, onCreateOption: a, onSelectOption: o, onEditOption: s, onDeleteOption: c, renderOptionActions: l, actions: u, footerSlot: d, renderOption: f, empty: p, className: m, strings: h }) {
1340
- let g = t(X, h), v = !!(o || s || c || l), y = [...u ?? [], ...a && i ? [{
1321
+ function it({ options: e = [], onManageOptions: t, onCreateOption: n, onSelectOption: a, onEditOption: o, onDeleteOption: c, renderOptionActions: l, actions: u, footerSlot: d, renderOption: f, empty: p, className: m, strings: h }) {
1322
+ let g = r(Ce, h), _ = !!(a || o || c || l), v = [...u ?? [], ...n && t ? [{
1341
1323
  id: "manage-options",
1342
1324
  label: g.manageLabel,
1343
- icon: /* @__PURE__ */ L(G, { className: "size-icon-md" }),
1344
- onClick: i
1345
- }] : []], ee = a || i ? /* @__PURE__ */ L(r, {
1325
+ icon: /* @__PURE__ */ V(K, { className: "size-icon-md" }),
1326
+ onClick: t
1327
+ }] : []], y = n || t ? /* @__PURE__ */ V(s, {
1346
1328
  type: "button",
1347
1329
  tone: "secondary",
1348
1330
  buttonStyle: "ghost",
1349
- onClick: a ?? i,
1350
- icon: a ? H : G,
1351
- children: a ? g.createLabel : g.manageLabel
1331
+ onClick: n ?? t,
1332
+ icon: n ? G : void 0,
1333
+ children: n ? g.createLabel : g.manageLabel
1352
1334
  }) : void 0;
1353
- return /* @__PURE__ */ L(_, {
1354
- icon: /* @__PURE__ */ L(G, { className: "size-icon" }),
1335
+ return /* @__PURE__ */ V(E, {
1355
1336
  title: g.title,
1356
1337
  description: g.description,
1357
- actions: y.length > 0 ? y : void 0,
1358
- headerAction: ee,
1338
+ actions: v.length > 0 ? v : void 0,
1339
+ headerAction: y,
1359
1340
  footerSlot: d,
1360
- contentClassName: "mt-1",
1361
- className: n("product-options-summary--component w-full", m),
1362
- children: e.length === 0 ? p ?? /* @__PURE__ */ L($, {
1341
+ className: i("product-options-summary--component w-full", m),
1342
+ children: e.length === 0 ? p ?? /* @__PURE__ */ V($, {
1363
1343
  title: g.emptyTitle,
1364
1344
  description: g.emptyDescription,
1365
- action: a ? /* @__PURE__ */ L(r, {
1345
+ action: n ? /* @__PURE__ */ V(s, {
1346
+ tone: "primary",
1366
1347
  type: "button",
1367
- onClick: a,
1368
- icon: H,
1348
+ onClick: n,
1349
+ icon: G,
1369
1350
  children: g.createLabel
1370
1351
  }) : void 0
1371
- }) : /* @__PURE__ */ L(w, { children: e.map((e, t) => (() => {
1372
- let n = v ? /* @__PURE__ */ L(Xe, {
1352
+ }) : /* @__PURE__ */ V(M, { children: e.map((e, t) => (() => {
1353
+ let n = _ ? /* @__PURE__ */ V(Ze, {
1373
1354
  option: e,
1374
1355
  index: t,
1375
- onSelectOption: o,
1376
- onEditOption: s,
1356
+ onSelectOption: a,
1357
+ onEditOption: o,
1377
1358
  onDeleteOption: c,
1378
1359
  renderOptionActions: l,
1379
1360
  menuLabel: g.actionsLabel,
@@ -1384,141 +1365,138 @@ function rt({ options: e = [], onManageOptions: i, onCreateOption: a, onSelectOp
1384
1365
  actionsLabel: g.actionsLabel
1385
1366
  }
1386
1367
  }) : void 0;
1387
- return f ? /* @__PURE__ */ L("div", { children: f(e, t) }, e.id) : /* @__PURE__ */ L(qe, {
1368
+ return f ? /* @__PURE__ */ V("div", { children: f(e, t) }, e.id) : /* @__PURE__ */ V(Je, {
1388
1369
  item: e,
1389
1370
  actions: n
1390
1371
  }, e.id);
1391
1372
  })()) })
1392
1373
  });
1393
1374
  }
1394
- rt.displayName = "ProductOptionsSummary";
1375
+ it.displayName = "ProductOptionsSummary";
1395
1376
  //#endregion
1396
1377
  //#region src/components/features/products/components/product-policies-card.tsx
1397
- function it({ policies: e = [], onCreatePolicy: i, onSelectPolicy: a, onEditPolicy: o, onDeletePolicy: s, renderPolicyActions: c, actions: l, footerSlot: u, renderPolicy: d, empty: f, className: p, strings: m }) {
1398
- let h = t(Oe, m), g = i ? /* @__PURE__ */ L(r, {
1378
+ function at({ policies: e = [], onCreatePolicy: t, onSelectPolicy: n, onEditPolicy: a, onDeletePolicy: o, renderPolicyActions: c, actions: l, footerSlot: u, renderPolicy: d, empty: f, className: p, strings: m }) {
1379
+ let h = r(X, m), g = t ? /* @__PURE__ */ V(s, {
1399
1380
  type: "button",
1400
1381
  tone: "secondary",
1401
1382
  buttonStyle: "ghost",
1402
- onClick: i,
1403
- icon: H,
1383
+ onClick: t,
1384
+ icon: G,
1404
1385
  children: h.createLabel
1405
1386
  }) : void 0;
1406
- return /* @__PURE__ */ L(_, {
1407
- icon: /* @__PURE__ */ L(Ce, { className: "size-icon" }),
1387
+ return /* @__PURE__ */ V(E, {
1408
1388
  title: h.title,
1409
1389
  description: h.description,
1410
1390
  actions: l,
1411
1391
  headerAction: g,
1412
1392
  footerSlot: u,
1413
- contentClassName: "mt-1",
1414
- className: n("product-policies-card--component w-full", p),
1415
- children: e.length === 0 ? f ?? /* @__PURE__ */ L($, {
1393
+ className: i("product-policies-card--component w-full", p),
1394
+ children: e.length === 0 ? f ?? /* @__PURE__ */ V($, {
1416
1395
  title: h.emptyTitle,
1417
1396
  description: h.emptyDescription,
1418
- action: i ? /* @__PURE__ */ L(r, {
1397
+ action: t ? /* @__PURE__ */ V(s, {
1398
+ tone: "primary",
1419
1399
  type: "button",
1420
- onClick: i,
1421
- icon: H,
1400
+ onClick: t,
1401
+ icon: G,
1422
1402
  children: h.createLabel
1423
1403
  }) : void 0
1424
- }) : /* @__PURE__ */ L(w, { children: e.map((e, t) => (() => {
1425
- let n = a ? () => a(e) : void 0, r = o ? () => o(e) : void 0, i = s ? () => s(e) : void 0, l = [...r ? [{
1404
+ }) : /* @__PURE__ */ V(M, { children: e.map((e, t) => (() => {
1405
+ let r = n ? () => n(e) : void 0, i = a ? () => a(e) : void 0, s = o ? () => o(e) : void 0, l = [...i ? [{
1426
1406
  id: "edit",
1427
1407
  label: h.editLabel,
1428
- icon: /* @__PURE__ */ L(V, { className: "size-icon-md" }),
1429
- onClick: () => r(),
1408
+ icon: /* @__PURE__ */ V(W, { className: "size-icon-md" }),
1409
+ onClick: () => i(),
1430
1410
  tone: "secondary",
1431
1411
  buttonStyle: "ghost"
1432
- }] : [], ...i ? [{
1412
+ }] : [], ...s ? [{
1433
1413
  id: "delete",
1434
1414
  label: h.deleteLabel,
1435
- icon: /* @__PURE__ */ L(K, { className: "size-icon-md" }),
1436
- onClick: () => i(),
1415
+ icon: /* @__PURE__ */ V(q, { className: "size-icon-md" }),
1416
+ onClick: () => s(),
1437
1417
  tone: "destructive"
1438
1418
  }] : []], u = c ? c(e, {
1439
1419
  index: t,
1440
- onSelect: n,
1441
- onEdit: r,
1442
- onDelete: i
1443
- }) : /* @__PURE__ */ L(Ve, {
1420
+ onSelect: r,
1421
+ onEdit: i,
1422
+ onDelete: s
1423
+ }) : /* @__PURE__ */ V(ze, {
1444
1424
  item: e,
1445
1425
  actions: l,
1446
1426
  menuLabel: h.actionsLabel
1447
1427
  });
1448
- return d ? /* @__PURE__ */ L("div", { children: d(e, t) }, e.id) : /* @__PURE__ */ L(qe, {
1428
+ return d ? /* @__PURE__ */ V("div", { children: d(e, t) }, e.id) : /* @__PURE__ */ V(Je, {
1449
1429
  item: e,
1450
1430
  actionLabel: h.viewLabel,
1451
- onSelect: n,
1431
+ onSelect: r,
1452
1432
  actions: u
1453
1433
  }, e.id);
1454
1434
  })()) })
1455
1435
  });
1456
1436
  }
1457
- it.displayName = "ProductPoliciesCard";
1437
+ at.displayName = "ProductPoliciesCard";
1458
1438
  //#endregion
1459
1439
  //#region src/components/features/products/components/product-quote-preview-card.tsx
1460
- function at({ lines: e = [], subtotal: a, tax: o, discount: c, total: l, onOpenQuote: u, onCreateLine: f, onSelectLine: p, onEditLine: m, onDeleteLine: h, renderLineActions: g, actions: v, footerSlot: y, empty: ee, className: b, strings: x }) {
1461
- let O = t(Q, x), k = f || u ? /* @__PURE__ */ R("div", {
1440
+ function ot({ lines: e = [], subtotal: t, tax: n, discount: a, total: c, onOpenQuote: u, onCreateLine: d, onSelectLine: f, onEditLine: p, onDeleteLine: h, renderLineActions: g, actions: _, footerSlot: y, empty: b, className: x, strings: S }) {
1441
+ let C = r(Ee, S), w = t !== void 0 || n !== void 0 || a !== void 0, T = d || u ? /* @__PURE__ */ H("div", {
1462
1442
  className: "flex items-center gap-space-md",
1463
- children: [!!f && /* @__PURE__ */ L(r, {
1443
+ children: [!!d && /* @__PURE__ */ V(s, {
1464
1444
  type: "button",
1465
1445
  tone: "secondary",
1466
1446
  buttonStyle: "ghost",
1467
- onClick: f,
1468
- icon: H,
1469
- children: O.createLineLabel
1470
- }), !!u && /* @__PURE__ */ L(r, {
1447
+ onClick: d,
1448
+ icon: G,
1449
+ children: C.createLineLabel
1450
+ }), !!u && /* @__PURE__ */ V(s, {
1471
1451
  type: "button",
1472
1452
  tone: "secondary",
1473
1453
  buttonStyle: "ghost",
1474
1454
  onClick: u,
1475
- icon: ue,
1476
- iconPosition: "right",
1477
- children: O.actionLabel
1455
+ children: C.actionLabel
1478
1456
  })]
1479
1457
  }) : void 0;
1480
- return /* @__PURE__ */ L(_, {
1481
- icon: /* @__PURE__ */ L(be, { className: "size-icon" }),
1482
- title: O.title,
1483
- description: O.description,
1484
- actions: v,
1485
- headerAction: k,
1458
+ return /* @__PURE__ */ V(E, {
1459
+ title: C.title,
1460
+ description: C.description,
1461
+ actions: _,
1462
+ headerAction: T,
1486
1463
  footerSlot: y,
1487
- contentClassName: "mt-1",
1488
- className: n("product-quote-preview-card--component w-full", b),
1489
- children: e.length === 0 ? ee ?? /* @__PURE__ */ L($, {
1490
- title: O.emptyTitle,
1491
- description: O.emptyDescription,
1492
- action: f ? /* @__PURE__ */ L(r, {
1464
+ className: i("product-quote-preview-card--component w-full", x),
1465
+ children: e.length === 0 ? b ?? /* @__PURE__ */ V($, {
1466
+ title: C.emptyTitle,
1467
+ description: C.emptyDescription,
1468
+ action: d ? /* @__PURE__ */ V(s, {
1469
+ tone: "primary",
1493
1470
  type: "button",
1494
- onClick: f,
1495
- icon: H,
1496
- children: O.createLineLabel
1471
+ onClick: d,
1472
+ icon: G,
1473
+ children: C.createLineLabel
1497
1474
  }) : void 0
1498
- }) : /* @__PURE__ */ R(s, {
1499
- gap: "lg",
1500
- children: [/* @__PURE__ */ L(w, { children: e.map((e, t) => {
1501
- let n = p ? () => p(e) : void 0, r = m ? () => m(e) : void 0, i = h ? () => h(e) : void 0, a = [
1475
+ }) : /* @__PURE__ */ H(l, {
1476
+ gap: "2xl",
1477
+ className: "product-quote-preview-card--body",
1478
+ children: [/* @__PURE__ */ V(M, { children: e.map((e, t) => {
1479
+ let n = f ? () => f(e) : void 0, r = p ? () => p(e) : void 0, i = h ? () => h(e) : void 0, a = [
1502
1480
  ...n ? [{
1503
1481
  id: "open",
1504
- label: O.viewLineLabel,
1505
- icon: /* @__PURE__ */ L(me, { className: "size-icon-md" }),
1482
+ label: C.viewLineLabel,
1483
+ icon: /* @__PURE__ */ V(he, { className: "size-icon-md" }),
1506
1484
  onClick: () => n(),
1507
1485
  tone: "secondary",
1508
1486
  buttonStyle: "ghost"
1509
1487
  }] : [],
1510
1488
  ...r ? [{
1511
1489
  id: "edit",
1512
- label: O.editLineLabel,
1513
- icon: /* @__PURE__ */ L(V, { className: "size-icon-md" }),
1490
+ label: C.editLineLabel,
1491
+ icon: /* @__PURE__ */ V(W, { className: "size-icon-md" }),
1514
1492
  onClick: () => r(),
1515
1493
  tone: "secondary",
1516
1494
  buttonStyle: "ghost"
1517
1495
  }] : [],
1518
1496
  ...i ? [{
1519
1497
  id: "delete",
1520
- label: O.deleteLineLabel,
1521
- icon: /* @__PURE__ */ L(K, { className: "size-icon-md" }),
1498
+ label: C.deleteLineLabel,
1499
+ icon: /* @__PURE__ */ V(q, { className: "size-icon-md" }),
1522
1500
  onClick: () => i(),
1523
1501
  tone: "destructive"
1524
1502
  }] : []
@@ -1527,321 +1505,315 @@ function at({ lines: e = [], subtotal: a, tax: o, discount: c, total: l, onOpenQ
1527
1505
  onSelect: n,
1528
1506
  onEdit: r,
1529
1507
  onDelete: i
1530
- }) : /* @__PURE__ */ L(Ve, {
1508
+ }) : /* @__PURE__ */ V(ze, {
1531
1509
  item: e,
1532
1510
  actions: a,
1533
- menuLabel: O.lineActionsLabel
1511
+ menuLabel: C.lineActionsLabel
1534
1512
  });
1535
- return /* @__PURE__ */ R(E, {
1536
- size: "sm",
1537
- className: "rounded-radius-md border border-border bg-muted/20 px-row-x py-row-y",
1538
- children: [/* @__PURE__ */ R(T, { children: [
1539
- /* @__PURE__ */ L(D, { children: e.label }),
1540
- !!e.description && /* @__PURE__ */ L(S, { children: e.description }),
1541
- !!e.quantity && /* @__PURE__ */ L(S, { children: e.quantity })
1542
- ] }), /* @__PURE__ */ R(C, { children: [/* @__PURE__ */ L(d, {
1543
- weight: "semibold",
1513
+ return /* @__PURE__ */ H(P, {
1514
+ className: "product-quote-preview-card--line",
1515
+ children: [/* @__PURE__ */ H(N, { children: [
1516
+ /* @__PURE__ */ V(F, { children: e.label }),
1517
+ !!e.description && /* @__PURE__ */ V(A, { children: e.description }),
1518
+ !!e.quantity && /* @__PURE__ */ V(A, { children: e.quantity })
1519
+ ] }), /* @__PURE__ */ H(j, { children: [/* @__PURE__ */ V(m, {
1544
1520
  className: "tabular-nums",
1545
1521
  children: e.amount
1546
1522
  }), o] })]
1547
1523
  }, e.id);
1548
- }) }), /* @__PURE__ */ L("div", {
1549
- className: "rounded-radius-md bg-muted/30 p-surface",
1550
- children: /* @__PURE__ */ R(s, {
1551
- gap: "sm",
1552
- children: [
1553
- a !== void 0 && /* @__PURE__ */ L(N, {
1554
- label: O.subtotalLabel,
1555
- value: a,
1556
- mono: !0
1557
- }),
1558
- o !== void 0 && /* @__PURE__ */ L(N, {
1559
- label: O.taxLabel,
1560
- value: o,
1561
- mono: !0
1562
- }),
1563
- c !== void 0 && /* @__PURE__ */ L(N, {
1564
- label: O.discountLabel,
1565
- value: c,
1566
- mono: !0,
1567
- valueClassName: "text-success"
1568
- }),
1569
- /* @__PURE__ */ L(N, {
1570
- label: /* @__PURE__ */ L(i, {
1571
- tag: "span",
1572
- weight: "semibold",
1573
- lineHeight: "tight",
1574
- children: O.totalLabel
1524
+ }) }), /* @__PURE__ */ H(l, {
1525
+ gap: "lg",
1526
+ className: "product-quote-preview-card--totals",
1527
+ children: [
1528
+ !!w && /* @__PURE__ */ H(l, {
1529
+ gap: "sm",
1530
+ children: [
1531
+ t !== void 0 && /* @__PURE__ */ V(ae, {
1532
+ label: C.subtotalLabel,
1533
+ value: t,
1534
+ valueClassName: "tabular-nums"
1575
1535
  }),
1576
- value: l ?? "-",
1577
- mono: !0,
1578
- valueClassName: "font-semibold"
1579
- })
1580
- ]
1581
- })
1536
+ n !== void 0 && /* @__PURE__ */ V(ae, {
1537
+ label: C.taxLabel,
1538
+ value: n,
1539
+ valueClassName: "tabular-nums"
1540
+ }),
1541
+ a !== void 0 && /* @__PURE__ */ V(ae, {
1542
+ label: C.discountLabel,
1543
+ value: a,
1544
+ valueClassName: "tabular-nums text-success"
1545
+ })
1546
+ ]
1547
+ }),
1548
+ !!w && /* @__PURE__ */ V(v, {}),
1549
+ /* @__PURE__ */ V(ae, {
1550
+ label: /* @__PURE__ */ V(o, {
1551
+ tag: "span",
1552
+ weight: "semibold",
1553
+ lineHeight: "tight",
1554
+ children: C.totalLabel
1555
+ }),
1556
+ value: c ?? "-",
1557
+ valueClassName: "font-semibold tabular-nums"
1558
+ })
1559
+ ]
1582
1560
  })]
1583
1561
  })
1584
1562
  });
1585
1563
  }
1586
- at.displayName = "ProductQuotePreviewCard";
1564
+ ot.displayName = "ProductQuotePreviewCard";
1587
1565
  //#endregion
1588
1566
  //#region src/components/features/products/components/product-readiness-card.tsx
1589
- function ot({ items: e = [], score: a, scoreLabel: o, summary: l, onCreateReadinessItem: u, onSelectReadinessItem: d, onEditReadinessItem: f, onDeleteReadinessItem: m, renderReadinessItemActions: h, actions: g, footerSlot: v, renderItem: y, empty: ee, className: b, strings: x }) {
1590
- let S = t(J, x), C = a === void 0 ? void 0 : Re(a), T = u ? /* @__PURE__ */ L(r, {
1567
+ function st({ items: e = [], score: t, scoreLabel: n, summary: a, onCreateReadinessItem: c, onSelectReadinessItem: u, onEditReadinessItem: f, onDeleteReadinessItem: p, renderReadinessItemActions: m, actions: h, footerSlot: _, renderItem: v, empty: y, className: b, strings: x }) {
1568
+ let S = r(J, x), C = t === void 0 ? void 0 : Ie(t), w = c ? /* @__PURE__ */ V(s, {
1591
1569
  type: "button",
1592
1570
  tone: "secondary",
1593
1571
  buttonStyle: "ghost",
1594
- onClick: u,
1595
- icon: H,
1572
+ onClick: c,
1573
+ icon: G,
1596
1574
  children: S.createLabel
1597
1575
  }) : void 0;
1598
- return /* @__PURE__ */ R(_, {
1599
- icon: /* @__PURE__ */ L(z, { className: "size-icon" }),
1576
+ return /* @__PURE__ */ H(E, {
1600
1577
  title: S.title,
1601
1578
  description: S.description,
1602
- actions: g,
1603
- headerAction: T,
1604
- footerSlot: v,
1605
- contentClassName: "mt-1",
1606
- className: n("product-readiness-card--component w-full", b),
1607
- children: [
1608
- C !== void 0 && /* @__PURE__ */ R("div", {
1609
- className: "mb-space-lg rounded-radius-md border border-border bg-muted/20 p-surface",
1610
- children: [/* @__PURE__ */ R(s, {
1579
+ actions: h,
1580
+ headerAction: w,
1581
+ footerSlot: _,
1582
+ contentGap: "2xl",
1583
+ className: i("product-readiness-card--component w-full", b),
1584
+ children: [(C !== void 0 || !!a) && /* @__PURE__ */ H(l, {
1585
+ gap: "lg",
1586
+ className: "product-readiness-card--summary",
1587
+ children: [C !== void 0 && /* @__PURE__ */ H(l, {
1588
+ gap: "sm",
1589
+ className: "product-readiness-card--score",
1590
+ children: [/* @__PURE__ */ H(l, {
1611
1591
  direction: "horizontal",
1612
- align: "center",
1613
1592
  justify: "between",
1614
1593
  gap: "lg",
1615
- className: "mb-space-md",
1616
- children: [/* @__PURE__ */ L(i, {
1594
+ children: [/* @__PURE__ */ V(o, {
1617
1595
  size: "xs",
1618
1596
  type: "secondary",
1619
- children: o ?? S.scoreLabel
1620
- }), /* @__PURE__ */ L(p, {
1597
+ children: n ?? S.scoreLabel
1598
+ }), /* @__PURE__ */ V(g, {
1621
1599
  value: C,
1622
1600
  scaled: !0,
1623
1601
  size: "xs",
1624
1602
  weight: "semibold"
1625
1603
  })]
1626
- }), /* @__PURE__ */ L(c, {
1604
+ }), /* @__PURE__ */ V(d, {
1627
1605
  value: C,
1628
- "aria-label": typeof o == "string" ? o : S.progressLabel,
1606
+ "aria-label": typeof n == "string" ? n : S.progressLabel,
1629
1607
  "aria-valuetext": `${C}%`,
1630
1608
  className: "h-1.5"
1631
1609
  })]
1632
- }),
1633
- !!l && /* @__PURE__ */ L(i, {
1610
+ }), !!a && /* @__PURE__ */ V(o, {
1634
1611
  type: "secondary",
1635
- className: "mb-space-lg leading-relaxed",
1636
- children: l
1637
- }),
1638
- e.length === 0 ? ee ?? /* @__PURE__ */ L($, {
1639
- title: S.emptyTitle,
1640
- description: S.emptyDescription,
1641
- action: u ? /* @__PURE__ */ L(r, {
1642
- type: "button",
1643
- onClick: u,
1644
- icon: H,
1645
- children: S.createLabel
1646
- }) : void 0
1647
- }) : /* @__PURE__ */ L(w, { children: e.map((e, t) => {
1648
- let n = d ? () => d(e) : void 0, r = f ? () => f(e) : void 0, i = m ? () => m(e) : void 0, a = [...r ? [{
1649
- id: "edit",
1650
- label: S.editLabel,
1651
- icon: /* @__PURE__ */ L(V, { className: "size-icon-md" }),
1652
- onClick: () => r(),
1653
- tone: "secondary",
1654
- buttonStyle: "ghost"
1655
- }] : [], ...i ? [{
1656
- id: "delete",
1657
- label: S.deleteLabel,
1658
- icon: /* @__PURE__ */ L(K, { className: "size-icon-md" }),
1659
- onClick: () => i(),
1660
- tone: "destructive"
1661
- }] : []], o = h ? h(e, {
1662
- index: t,
1663
- onSelect: n,
1664
- onEdit: r,
1665
- onDelete: i
1666
- }) : /* @__PURE__ */ L(Ve, {
1667
- item: e,
1668
- actions: a,
1669
- menuLabel: S.actionsLabel
1670
- });
1671
- return y ? /* @__PURE__ */ L("div", { children: y(e, t) }, e.id) : /* @__PURE__ */ L(Ge, {
1672
- item: e,
1673
- actionFallback: S.actionLabel,
1674
- onSelect: n,
1675
- actions: o
1676
- }, e.id);
1677
- }) })
1678
- ]
1612
+ children: a
1613
+ })]
1614
+ }), e.length === 0 ? y ?? /* @__PURE__ */ V($, {
1615
+ title: S.emptyTitle,
1616
+ description: S.emptyDescription,
1617
+ action: c ? /* @__PURE__ */ V(s, {
1618
+ tone: "primary",
1619
+ type: "button",
1620
+ onClick: c,
1621
+ icon: G,
1622
+ children: S.createLabel
1623
+ }) : void 0
1624
+ }) : /* @__PURE__ */ V(M, { children: e.map((e, t) => {
1625
+ let n = u ? () => u(e) : void 0, r = f ? () => f(e) : void 0, i = p ? () => p(e) : void 0, a = [...r ? [{
1626
+ id: "edit",
1627
+ label: S.editLabel,
1628
+ icon: /* @__PURE__ */ V(W, { className: "size-icon-md" }),
1629
+ onClick: () => r(),
1630
+ tone: "secondary",
1631
+ buttonStyle: "ghost"
1632
+ }] : [], ...i ? [{
1633
+ id: "delete",
1634
+ label: S.deleteLabel,
1635
+ icon: /* @__PURE__ */ V(q, { className: "size-icon-md" }),
1636
+ onClick: () => i(),
1637
+ tone: "destructive"
1638
+ }] : []], o = m ? m(e, {
1639
+ index: t,
1640
+ onSelect: n,
1641
+ onEdit: r,
1642
+ onDelete: i
1643
+ }) : /* @__PURE__ */ V(ze, {
1644
+ item: e,
1645
+ actions: a,
1646
+ menuLabel: S.actionsLabel
1647
+ });
1648
+ return v ? /* @__PURE__ */ V("div", { children: v(e, t) }, e.id) : /* @__PURE__ */ V(Ke, {
1649
+ item: e,
1650
+ actionFallback: S.actionLabel,
1651
+ onSelect: n,
1652
+ actions: o
1653
+ }, e.id);
1654
+ }) })]
1679
1655
  });
1680
1656
  }
1681
- ot.displayName = "ProductReadinessCard";
1657
+ st.displayName = "ProductReadinessCard";
1682
1658
  //#endregion
1683
1659
  //#region src/components/features/products/components/product-structure-card.tsx
1684
- function st({ metrics: e = [], onCreateMetric: i, onSelectMetric: a, onEditMetric: o, onDeleteMetric: s, renderMetricActions: c, actions: l, footerSlot: u, empty: d, className: f, strings: p }) {
1685
- let m = t(we, p), h = i ? /* @__PURE__ */ L(r, {
1660
+ function ct({ metrics: e = [], onCreateMetric: t, onSelectMetric: n, onEditMetric: a, onDeleteMetric: o, renderMetricActions: c, actions: l, footerSlot: u, empty: d, className: f, strings: p }) {
1661
+ let m = r(Y, p), h = t ? /* @__PURE__ */ V(s, {
1686
1662
  type: "button",
1687
1663
  tone: "secondary",
1688
1664
  buttonStyle: "ghost",
1689
- onClick: i,
1690
- icon: H,
1665
+ onClick: t,
1666
+ icon: G,
1691
1667
  children: m.createLabel
1692
1668
  }) : void 0;
1693
- return /* @__PURE__ */ L(_, {
1694
- icon: /* @__PURE__ */ L(ge, { className: "size-icon" }),
1669
+ return /* @__PURE__ */ V(E, {
1695
1670
  title: m.title,
1696
1671
  description: m.description,
1697
1672
  actions: l,
1698
1673
  headerAction: h,
1699
1674
  footerSlot: u,
1700
- contentClassName: "mt-1",
1701
- className: n("product-structure-card--component w-full", f),
1702
- children: e.length === 0 ? d ?? /* @__PURE__ */ L($, {
1675
+ className: i("product-structure-card--component w-full", f),
1676
+ children: e.length === 0 ? d ?? /* @__PURE__ */ V($, {
1703
1677
  title: m.emptyTitle,
1704
1678
  description: m.emptyDescription,
1705
- action: i ? /* @__PURE__ */ L(r, {
1679
+ action: t ? /* @__PURE__ */ V(s, {
1680
+ tone: "primary",
1706
1681
  type: "button",
1707
- onClick: i,
1708
- icon: H,
1682
+ onClick: t,
1683
+ icon: G,
1709
1684
  children: m.createLabel
1710
1685
  }) : void 0
1711
- }) : /* @__PURE__ */ L(w, { children: e.map((e, t) => {
1712
- let n = a ? () => a(e) : void 0, r = o ? () => o(e) : void 0, i = s ? () => s(e) : void 0, l = [
1713
- ...n ? [{
1686
+ }) : /* @__PURE__ */ V(M, { children: e.map((e, t) => {
1687
+ let r = n ? () => n(e) : void 0, i = a ? () => a(e) : void 0, s = o ? () => o(e) : void 0, l = [
1688
+ ...r ? [{
1714
1689
  id: "open",
1715
1690
  label: m.viewLabel,
1716
- icon: /* @__PURE__ */ L(me, { className: "size-icon-md" }),
1717
- onClick: () => n(),
1691
+ icon: /* @__PURE__ */ V(he, { className: "size-icon-md" }),
1692
+ onClick: () => r(),
1718
1693
  tone: "secondary",
1719
1694
  buttonStyle: "ghost"
1720
1695
  }] : [],
1721
- ...r ? [{
1696
+ ...i ? [{
1722
1697
  id: "edit",
1723
1698
  label: m.editLabel,
1724
- icon: /* @__PURE__ */ L(V, { className: "size-icon-md" }),
1725
- onClick: () => r(),
1699
+ icon: /* @__PURE__ */ V(W, { className: "size-icon-md" }),
1700
+ onClick: () => i(),
1726
1701
  tone: "secondary",
1727
1702
  buttonStyle: "ghost"
1728
1703
  }] : [],
1729
- ...i ? [{
1704
+ ...s ? [{
1730
1705
  id: "delete",
1731
1706
  label: m.deleteLabel,
1732
- icon: /* @__PURE__ */ L(K, { className: "size-icon-md" }),
1733
- onClick: () => i(),
1707
+ icon: /* @__PURE__ */ V(q, { className: "size-icon-md" }),
1708
+ onClick: () => s(),
1734
1709
  tone: "destructive"
1735
1710
  }] : []
1736
1711
  ], u = c ? c(e, {
1737
1712
  index: t,
1738
- onSelect: n,
1739
- onEdit: r,
1740
- onDelete: i
1741
- }) : /* @__PURE__ */ L(Ve, {
1713
+ onSelect: r,
1714
+ onEdit: i,
1715
+ onDelete: s
1716
+ }) : /* @__PURE__ */ V(ze, {
1742
1717
  item: e,
1743
1718
  actions: l,
1744
1719
  menuLabel: m.actionsLabel
1745
1720
  });
1746
- return /* @__PURE__ */ L(We, {
1721
+ return /* @__PURE__ */ V(Ge, {
1747
1722
  metric: e,
1748
1723
  actions: u
1749
1724
  }, e.id);
1750
1725
  }) })
1751
1726
  });
1752
1727
  }
1753
- st.displayName = "ProductStructureCard";
1728
+ ct.displayName = "ProductStructureCard";
1754
1729
  //#endregion
1755
1730
  //#region src/components/features/products/components/product-variants-table.tsx
1756
- function ct({ variant: e, channelsLabel: t }) {
1757
- return /* @__PURE__ */ R("div", {
1731
+ function lt({ variant: e, channelsLabel: t }) {
1732
+ return /* @__PURE__ */ H(l, {
1733
+ gap: "xs",
1758
1734
  className: "product-variants-table--variant-cell min-w-0",
1759
- children: [
1760
- /* @__PURE__ */ R(s, {
1735
+ children: [/* @__PURE__ */ H(l, {
1736
+ gap: "dense",
1737
+ children: [/* @__PURE__ */ H(l, {
1761
1738
  direction: "horizontal",
1762
1739
  gap: "sm",
1763
- children: [/* @__PURE__ */ L(i, {
1740
+ children: [/* @__PURE__ */ V(o, {
1764
1741
  weight: "semibold",
1765
1742
  className: "truncate",
1766
1743
  children: e.name
1767
- }), !!e.status && /* @__PURE__ */ L(m, {
1744
+ }), !!e.status && /* @__PURE__ */ V(_, {
1768
1745
  tone: e.statusTone ?? "secondary",
1769
1746
  children: e.status
1770
1747
  })]
1771
- }),
1772
- !!e.description && /* @__PURE__ */ L(i, {
1748
+ }), !!e.description && /* @__PURE__ */ V(o, {
1773
1749
  size: "xs",
1774
1750
  type: "secondary",
1775
- className: "mt-space-2xs",
1776
1751
  children: e.description
1777
- }),
1778
- !!(e.options?.length || e.channels) && /* @__PURE__ */ R(s, {
1779
- direction: "horizontal",
1780
- gap: "xs",
1781
- className: "mt-space-xs",
1782
- children: [e.options?.map((e, t) => /* @__PURE__ */ L(m, {
1783
- tone: "secondary",
1784
- children: e
1785
- }, t)), !!e.channels && /* @__PURE__ */ R(i, {
1786
- tag: "span",
1787
- size: "xs",
1788
- type: "secondary",
1789
- className: "pl-space-2xs",
1790
- children: [
1791
- t,
1792
- ": ",
1793
- e.channels
1794
- ]
1795
- })]
1796
- })
1797
- ]
1752
+ })]
1753
+ }), !!(e.options?.length || e.channels) && /* @__PURE__ */ H(l, {
1754
+ direction: "horizontal",
1755
+ gap: "xs",
1756
+ children: [e.options?.map((e, t) => /* @__PURE__ */ V(_, {
1757
+ tone: "secondary",
1758
+ children: e
1759
+ }, t)), !!e.channels && /* @__PURE__ */ H(o, {
1760
+ tag: "span",
1761
+ size: "xs",
1762
+ type: "secondary",
1763
+ children: [
1764
+ t,
1765
+ ": ",
1766
+ e.channels
1767
+ ]
1768
+ })]
1769
+ })]
1798
1770
  });
1799
1771
  }
1800
- function lt({ value: e, emphasis: t = !1 }) {
1801
- return /* @__PURE__ */ L(e ? d : f, {
1772
+ function ut({ value: e, emphasis: t = !1 }) {
1773
+ return /* @__PURE__ */ V(e ? m : h, {
1802
1774
  weight: t ? "semibold" : void 0,
1803
1775
  className: "min-w-0 tabular-nums",
1804
1776
  children: e ?? "-"
1805
1777
  });
1806
1778
  }
1807
- function ut({ variants: e = [], onCreateVariant: i, onSelectVariant: a, onEditVariant: o, onDuplicateVariant: s, onDeleteVariant: c, renderVariantActions: l, actions: u, footerSlot: d, empty: f, className: p, strings: m }) {
1808
- let h = t(ke, m), g = I(() => {
1779
+ function dt({ variants: e = [], onCreateVariant: t, onSelectVariant: n, onEditVariant: a, onDuplicateVariant: o, onDeleteVariant: c, renderVariantActions: l, actions: u, footerSlot: d, empty: f, className: p, strings: m }) {
1780
+ let h = r(Z, m), g = B(() => {
1809
1781
  if (l) return;
1810
1782
  let e = [
1811
- ...a ? [{
1783
+ ...n ? [{
1812
1784
  id: "open",
1813
1785
  label: h.viewLabel,
1814
- icon: /* @__PURE__ */ L(me, {
1786
+ icon: /* @__PURE__ */ V(he, {
1815
1787
  className: "size-icon-sm",
1816
1788
  "aria-hidden": "true"
1817
1789
  }),
1818
- onClick: a,
1790
+ onClick: n,
1819
1791
  buttonStyle: "ghost"
1820
1792
  }] : [],
1821
- ...o ? [{
1793
+ ...a ? [{
1822
1794
  id: "edit",
1823
1795
  label: h.editLabel,
1824
- icon: /* @__PURE__ */ L(V, {
1796
+ icon: /* @__PURE__ */ V(W, {
1825
1797
  className: "size-icon-sm",
1826
1798
  "aria-hidden": "true"
1827
1799
  }),
1828
- onClick: o,
1800
+ onClick: a,
1829
1801
  buttonStyle: "ghost"
1830
1802
  }] : [],
1831
- ...s ? [{
1803
+ ...o ? [{
1832
1804
  id: "duplicate",
1833
1805
  label: h.duplicateLabel,
1834
- icon: /* @__PURE__ */ L(pe, {
1806
+ icon: /* @__PURE__ */ V(me, {
1835
1807
  className: "size-icon-sm",
1836
1808
  "aria-hidden": "true"
1837
1809
  }),
1838
- onClick: s,
1810
+ onClick: o,
1839
1811
  buttonStyle: "ghost"
1840
1812
  }] : [],
1841
1813
  ...c ? [{
1842
1814
  id: "delete",
1843
1815
  label: h.deleteLabel,
1844
- icon: /* @__PURE__ */ L(K, {
1816
+ icon: /* @__PURE__ */ V(q, {
1845
1817
  className: "size-icon-sm",
1846
1818
  "aria-hidden": "true"
1847
1819
  }),
@@ -1852,20 +1824,20 @@ function ut({ variants: e = [], onCreateVariant: i, onSelectVariant: a, onEditVa
1852
1824
  return e.length > 0 ? e : void 0;
1853
1825
  }, [
1854
1826
  c,
1855
- s,
1856
1827
  o,
1857
1828
  a,
1829
+ n,
1858
1830
  l,
1859
1831
  h.deleteLabel,
1860
1832
  h.duplicateLabel,
1861
1833
  h.editLabel,
1862
1834
  h.viewLabel
1863
- ]), v = I(() => {
1835
+ ]), _ = B(() => {
1864
1836
  let e = [
1865
1837
  {
1866
1838
  accessorKey: "name",
1867
1839
  header: h.headers.variant,
1868
- cell: ({ row: e }) => /* @__PURE__ */ L(ct, {
1840
+ cell: ({ row: e }) => /* @__PURE__ */ V(lt, {
1869
1841
  variant: e.original,
1870
1842
  channelsLabel: h.headers.channels
1871
1843
  })
@@ -1873,7 +1845,7 @@ function ut({ variants: e = [], onCreateVariant: i, onSelectVariant: a, onEditVa
1873
1845
  {
1874
1846
  accessorKey: "price",
1875
1847
  header: h.headers.price,
1876
- cell: ({ row: e }) => /* @__PURE__ */ L(lt, {
1848
+ cell: ({ row: e }) => /* @__PURE__ */ V(ut, {
1877
1849
  value: e.original.price,
1878
1850
  emphasis: !0
1879
1851
  }),
@@ -1882,17 +1854,17 @@ function ut({ variants: e = [], onCreateVariant: i, onSelectVariant: a, onEditVa
1882
1854
  {
1883
1855
  accessorKey: "inventory",
1884
1856
  header: h.headers.inventory,
1885
- cell: ({ row: e }) => /* @__PURE__ */ L(lt, { value: e.original.inventory })
1857
+ cell: ({ row: e }) => /* @__PURE__ */ V(ut, { value: e.original.inventory })
1886
1858
  },
1887
1859
  {
1888
1860
  accessorKey: "sku",
1889
1861
  header: h.headers.sku,
1890
- cell: ({ row: e }) => /* @__PURE__ */ L(lt, { value: e.original.sku })
1862
+ cell: ({ row: e }) => /* @__PURE__ */ V(ut, { value: e.original.sku })
1891
1863
  },
1892
1864
  {
1893
1865
  accessorKey: "updatedAt",
1894
1866
  header: h.headers.updated,
1895
- cell: ({ row: e }) => /* @__PURE__ */ L(lt, { value: e.original.updatedAt })
1867
+ cell: ({ row: e }) => /* @__PURE__ */ V(ut, { value: e.original.updatedAt })
1896
1868
  }
1897
1869
  ];
1898
1870
  return l && e.push({
@@ -1900,18 +1872,18 @@ function ut({ variants: e = [], onCreateVariant: i, onSelectVariant: a, onEditVa
1900
1872
  header: h.headers.actions,
1901
1873
  cell: ({ row: e }) => l(e.original, {
1902
1874
  index: e.index,
1903
- onSelect: a ? () => a(e.original) : void 0,
1904
- onEdit: o ? () => o(e.original) : void 0,
1905
- onDuplicate: s ? () => s(e.original) : void 0,
1875
+ onSelect: n ? () => n(e.original) : void 0,
1876
+ onEdit: a ? () => a(e.original) : void 0,
1877
+ onDuplicate: o ? () => o(e.original) : void 0,
1906
1878
  onDelete: c ? () => c(e.original) : void 0
1907
1879
  }),
1908
1880
  meta: { align: "end" }
1909
1881
  }), e;
1910
1882
  }, [
1911
1883
  c,
1912
- s,
1913
1884
  o,
1914
1885
  a,
1886
+ n,
1915
1887
  l,
1916
1888
  h.headers.actions,
1917
1889
  h.headers.channels,
@@ -1920,35 +1892,34 @@ function ut({ variants: e = [], onCreateVariant: i, onSelectVariant: a, onEditVa
1920
1892
  h.headers.sku,
1921
1893
  h.headers.updated,
1922
1894
  h.headers.variant
1923
- ]), y = i ? /* @__PURE__ */ L(r, {
1895
+ ]), v = t ? /* @__PURE__ */ V(s, {
1924
1896
  type: "button",
1925
1897
  tone: "secondary",
1926
1898
  buttonStyle: "ghost",
1927
- onClick: i,
1928
- icon: H,
1899
+ onClick: t,
1900
+ icon: G,
1929
1901
  children: h.createLabel
1930
1902
  }) : void 0;
1931
- return /* @__PURE__ */ L(_, {
1932
- icon: /* @__PURE__ */ L(_e, { className: "size-icon" }),
1903
+ return /* @__PURE__ */ V(E, {
1933
1904
  title: h.title,
1934
1905
  description: h.description,
1935
1906
  actions: u,
1936
- headerAction: y,
1907
+ headerAction: v,
1937
1908
  footerSlot: d,
1938
- contentClassName: "mt-1",
1939
- className: n("product-variants-table--component w-full", p),
1940
- children: e.length === 0 ? f ?? /* @__PURE__ */ L($, {
1909
+ className: i("product-variants-table--component w-full", p),
1910
+ children: e.length === 0 ? f ?? /* @__PURE__ */ V($, {
1941
1911
  title: h.emptyTitle,
1942
1912
  description: h.emptyDescription,
1943
- action: i ? /* @__PURE__ */ L(r, {
1913
+ action: t ? /* @__PURE__ */ V(s, {
1914
+ tone: "primary",
1944
1915
  type: "button",
1945
- onClick: i,
1946
- icon: H,
1916
+ onClick: t,
1917
+ icon: G,
1947
1918
  children: h.createLabel
1948
1919
  }) : void 0
1949
- }) : /* @__PURE__ */ L(ie, {
1920
+ }) : /* @__PURE__ */ V(ce, {
1950
1921
  data: e,
1951
- columns: v,
1922
+ columns: _,
1952
1923
  getRowId: (e) => e.id,
1953
1924
  enableColumnVisibility: !0,
1954
1925
  surface: "glass",
@@ -1963,43 +1934,43 @@ function ut({ variants: e = [], onCreateVariant: i, onSelectVariant: a, onEditVa
1963
1934
  })
1964
1935
  });
1965
1936
  }
1966
- ut.displayName = "ProductVariantsTable";
1937
+ dt.displayName = "ProductVariantsTable";
1967
1938
  //#endregion
1968
1939
  //#region src/components/features/products/components/product-overview.tsx
1969
- function dt({ details: e, contract: r, options: i, variants: a, readiness: o, structure: c, operations: l, quote: u, policies: d, slots: f, className: p, mainClassName: m, railClassName: h, strings: g }) {
1970
- let _ = t(Fe, g), v = !!(o || c || l || u || d || f?.railTop || f?.railBottom);
1971
- return /* @__PURE__ */ R(s, {
1972
- gap: "xl",
1973
- className: n("product-overview--component @container/product-overview", p),
1940
+ function ft({ details: e, contract: t, options: n, variants: a, readiness: o, structure: s, operations: c, quote: u, policies: d, slots: f, className: p, mainClassName: m, railClassName: h, strings: g }) {
1941
+ let _ = r(je, g), v = !!(o || s || c || u || d || f?.railTop || f?.railBottom);
1942
+ return /* @__PURE__ */ H(l, {
1943
+ gap: "3xl",
1944
+ className: i("product-overview--component @container/product-overview", p),
1974
1945
  children: [
1975
1946
  f?.before,
1976
- /* @__PURE__ */ R("div", {
1977
- className: n("grid min-w-0 grid-cols-1 gap-space-xl", v && "@5xl/product-overview:grid-cols-[minmax(0,1fr)_22rem]"),
1978
- children: [/* @__PURE__ */ R(s, {
1979
- render: /* @__PURE__ */ L("section", {}),
1980
- gap: "xl",
1947
+ /* @__PURE__ */ H("div", {
1948
+ className: i("grid min-w-0 grid-cols-1 gap-space-3xl", v && "@5xl/product-overview:grid-cols-[minmax(0,1fr)_22rem]"),
1949
+ children: [/* @__PURE__ */ H(l, {
1950
+ render: /* @__PURE__ */ V("section", {}),
1951
+ gap: "3xl",
1981
1952
  "aria-label": _.mainLabel,
1982
- className: n("product-overview--main", m),
1953
+ className: i("product-overview--main", m),
1983
1954
  children: [
1984
1955
  f?.mainTop,
1985
- !!e && /* @__PURE__ */ L(Ye, { ...e }),
1986
- !!r && /* @__PURE__ */ L(Je, { ...r }),
1987
- !!i && /* @__PURE__ */ L(rt, { ...i }),
1988
- !!a && /* @__PURE__ */ L(ut, { ...a }),
1956
+ !!e && /* @__PURE__ */ V(Xe, { ...e }),
1957
+ !!t && /* @__PURE__ */ V(Ye, { ...t }),
1958
+ !!n && /* @__PURE__ */ V(it, { ...n }),
1959
+ !!a && /* @__PURE__ */ V(dt, { ...a }),
1989
1960
  f?.mainBottom
1990
1961
  ]
1991
- }), !!v && /* @__PURE__ */ R(s, {
1992
- render: /* @__PURE__ */ L("aside", {}),
1993
- gap: "xl",
1962
+ }), !!v && /* @__PURE__ */ H(l, {
1963
+ render: /* @__PURE__ */ V("aside", {}),
1964
+ gap: "3xl",
1994
1965
  "aria-label": _.railLabel,
1995
- className: n("product-overview--rail", h),
1966
+ className: i("product-overview--rail", h),
1996
1967
  children: [
1997
1968
  f?.railTop,
1998
- !!o && /* @__PURE__ */ L(ot, { ...o }),
1999
- !!c && /* @__PURE__ */ L(st, { ...c }),
2000
- !!l && /* @__PURE__ */ L(Ze, { ...l }),
2001
- !!u && /* @__PURE__ */ L(at, { ...u }),
2002
- !!d && /* @__PURE__ */ L(it, { ...d }),
1969
+ !!o && /* @__PURE__ */ V(st, { ...o }),
1970
+ !!s && /* @__PURE__ */ V(ct, { ...s }),
1971
+ !!c && /* @__PURE__ */ V(Qe, { ...c }),
1972
+ !!u && /* @__PURE__ */ V(ot, { ...u }),
1973
+ !!d && /* @__PURE__ */ V(at, { ...d }),
2003
1974
  f?.railBottom
2004
1975
  ]
2005
1976
  })]
@@ -2008,29 +1979,29 @@ function dt({ details: e, contract: r, options: i, variants: a, readiness: o, st
2008
1979
  ]
2009
1980
  });
2010
1981
  }
2011
- dt.displayName = "ProductOverview";
1982
+ ft.displayName = "ProductOverview";
2012
1983
  //#endregion
2013
1984
  //#region src/components/features/products/components/product-variant-action-menu.tsx
2014
- function ft({ variant: e, index: r = 0, onSelectVariant: i, onEditVariant: a, onDuplicateVariant: o, onDeleteVariant: s, renderVariantActions: c, menuLabel: l, className: u, strings: d }) {
2015
- let f = t(Me, d), p = i ? () => i(e) : void 0, m = a ? () => a(e) : void 0, h = o ? () => o(e) : void 0, g = s ? () => s(e) : void 0;
2016
- return p || m || h || g || c ? c ? /* @__PURE__ */ L("div", {
2017
- className: n("product-variant-action-menu--component flex justify-end", u),
1985
+ function pt({ variant: e, index: t = 0, onSelectVariant: n, onEditVariant: a, onDuplicateVariant: o, onDeleteVariant: s, renderVariantActions: c, menuLabel: l, className: u, strings: d }) {
1986
+ let f = r(ke, d), p = n ? () => n(e) : void 0, m = a ? () => a(e) : void 0, h = o ? () => o(e) : void 0, g = s ? () => s(e) : void 0;
1987
+ return p || m || h || g || c ? c ? /* @__PURE__ */ V("div", {
1988
+ className: i("product-variant-action-menu--component flex justify-end", u),
2018
1989
  children: c(e, {
2019
- index: r,
1990
+ index: t,
2020
1991
  onSelect: p,
2021
1992
  onEdit: m,
2022
1993
  onDuplicate: h,
2023
1994
  onDelete: g
2024
1995
  })
2025
- }) : /* @__PURE__ */ L(Ve, {
1996
+ }) : /* @__PURE__ */ V(ze, {
2026
1997
  item: e,
2027
1998
  menuLabel: l ?? f.actionsLabel,
2028
- className: n("product-variant-action-menu--component", u),
1999
+ className: i("product-variant-action-menu--component", u),
2029
2000
  actions: [
2030
2001
  ...p ? [{
2031
2002
  id: "open",
2032
2003
  label: f.viewLabel,
2033
- icon: /* @__PURE__ */ L(me, { className: "size-icon-md" }),
2004
+ icon: /* @__PURE__ */ V(he, { className: "size-icon-md" }),
2034
2005
  onClick: () => p(),
2035
2006
  tone: "secondary",
2036
2007
  buttonStyle: "ghost"
@@ -2038,7 +2009,7 @@ function ft({ variant: e, index: r = 0, onSelectVariant: i, onEditVariant: a, on
2038
2009
  ...m ? [{
2039
2010
  id: "edit",
2040
2011
  label: f.editLabel,
2041
- icon: /* @__PURE__ */ L(V, { className: "size-icon-md" }),
2012
+ icon: /* @__PURE__ */ V(W, { className: "size-icon-md" }),
2042
2013
  onClick: () => m(),
2043
2014
  tone: "secondary",
2044
2015
  buttonStyle: "ghost"
@@ -2046,7 +2017,7 @@ function ft({ variant: e, index: r = 0, onSelectVariant: i, onEditVariant: a, on
2046
2017
  ...h ? [{
2047
2018
  id: "duplicate",
2048
2019
  label: f.duplicateLabel,
2049
- icon: /* @__PURE__ */ L(pe, { className: "size-icon-md" }),
2020
+ icon: /* @__PURE__ */ V(me, { className: "size-icon-md" }),
2050
2021
  onClick: () => h(),
2051
2022
  tone: "secondary",
2052
2023
  buttonStyle: "ghost"
@@ -2054,18 +2025,18 @@ function ft({ variant: e, index: r = 0, onSelectVariant: i, onEditVariant: a, on
2054
2025
  ...g ? [{
2055
2026
  id: "delete",
2056
2027
  label: f.deleteLabel,
2057
- icon: /* @__PURE__ */ L(K, { className: "size-icon-md" }),
2028
+ icon: /* @__PURE__ */ V(q, { className: "size-icon-md" }),
2058
2029
  onClick: () => g(),
2059
2030
  tone: "destructive"
2060
2031
  }] : []
2061
2032
  ]
2062
2033
  }) : null;
2063
2034
  }
2064
- ft.displayName = "ProductVariantActionMenu";
2035
+ pt.displayName = "ProductVariantActionMenu";
2065
2036
  //#endregion
2066
2037
  //#region src/components/features/products/components/product-variant-details.tsx
2067
- var pt = (e) => e != null && e !== !1 && e !== "";
2068
- function mt(e, t) {
2038
+ var mt = (e) => e != null && e !== !1 && e !== "";
2039
+ function ht(e, t) {
2069
2040
  return [
2070
2041
  {
2071
2042
  label: t.price,
@@ -2087,19 +2058,19 @@ function mt(e, t) {
2087
2058
  label: t.updated,
2088
2059
  value: e.updatedAt
2089
2060
  }
2090
- ].filter((e) => pt(e.value));
2061
+ ].filter((e) => mt(e.value));
2091
2062
  }
2092
- function ht({ variant: e, metadata: a, optionItems: o = [], media: c, onBack: l, onSelectVariant: u, onEditVariant: d, onDuplicateVariant: f, onDeleteVariant: p, onSelectOption: h, actions: g, headerEnd: v, footerSlot: y, empty: ee, renderActions: b, renderMetadata: x, renderOption: S, className: C, strings: T }) {
2093
- let E = t(Ne, T), D = e ? a ?? mt(e, E.metadata) : [], O = !!(e && (u || d || f || p || b)), k = /* @__PURE__ */ R("div", {
2063
+ function gt({ variant: e, metadata: t, optionItems: n = [], media: a, onBack: c, onSelectVariant: u, onEditVariant: d, onDuplicateVariant: f, onDeleteVariant: p, onSelectOption: m, actions: h, headerEnd: g, footerSlot: v, empty: y, renderActions: b, renderMetadata: x, renderOption: S, className: C, strings: w }) {
2064
+ let T = r(Q, w), D = e ? t ?? ht(e, T.metadata) : [], O = !!(e && (u || d || f || p || b)), k = /* @__PURE__ */ H("div", {
2094
2065
  className: "product-variant-details--header-actions flex items-center gap-space-md",
2095
- children: [!!l && /* @__PURE__ */ L(r, {
2066
+ children: [!!c && /* @__PURE__ */ V(s, {
2096
2067
  type: "button",
2097
2068
  tone: "secondary",
2098
2069
  buttonStyle: "ghost",
2099
- onClick: l,
2100
- icon: le,
2101
- children: E.backLabel
2102
- }), !!O && e && /* @__PURE__ */ L(ft, {
2070
+ onClick: c,
2071
+ icon: fe,
2072
+ children: T.backLabel
2073
+ }), !!O && e && /* @__PURE__ */ V(pt, {
2103
2074
  variant: e,
2104
2075
  onSelectVariant: u,
2105
2076
  onEditVariant: d,
@@ -2107,183 +2078,185 @@ function ht({ variant: e, metadata: a, optionItems: o = [], media: c, onBack: l,
2107
2078
  onDeleteVariant: p,
2108
2079
  renderVariantActions: b
2109
2080
  })]
2110
- }), te = e?.options ?? [];
2111
- return /* @__PURE__ */ L(_, {
2112
- icon: /* @__PURE__ */ L(_e, { className: "size-icon" }),
2113
- title: e?.name ?? E.title,
2114
- titleSuffix: e?.status ? /* @__PURE__ */ L(m, {
2081
+ }), A = e?.options ?? [];
2082
+ return /* @__PURE__ */ V(E, {
2083
+ title: e?.name ?? T.title,
2084
+ titleSuffix: e?.status ? /* @__PURE__ */ V(_, {
2115
2085
  tone: e.statusTone ?? "secondary",
2116
2086
  children: e.status
2117
2087
  }) : void 0,
2118
- description: e?.description ?? E.description,
2119
- actions: g,
2120
- headerAction: l || O ? k : void 0,
2121
- headerEnd: v,
2122
- footerSlot: y,
2123
- contentClassName: "mt-1",
2124
- className: n("product-variant-details--component w-full", C),
2125
- children: e ? /* @__PURE__ */ R(s, {
2126
- gap: "xl",
2088
+ description: e?.description ?? T.description,
2089
+ actions: h,
2090
+ headerAction: c || O ? k : void 0,
2091
+ headerEnd: g,
2092
+ footerSlot: v,
2093
+ className: i("product-variant-details--component w-full", C),
2094
+ children: e ? /* @__PURE__ */ H(l, {
2095
+ gap: "2xl",
2127
2096
  className: "product-variant-details--body",
2128
2097
  children: [
2129
- !!c && /* @__PURE__ */ L("div", {
2130
- className: "product-variant-details--media overflow-hidden rounded-radius-md border border-border bg-muted/30",
2131
- children: c
2098
+ !!a && /* @__PURE__ */ V("div", {
2099
+ className: "product-variant-details--media overflow-hidden rounded-inner border border-border bg-muted/30",
2100
+ children: a
2132
2101
  }),
2133
- x ? x(e) : /* @__PURE__ */ L(ne, {
2134
- title: E.factsTitle,
2135
- items: D,
2136
- columns: 3,
2137
- density: "compact",
2138
- className: "product-variant-details--metadata"
2102
+ x ? x(e) : D.some(Boolean) && /* @__PURE__ */ H(l, {
2103
+ gap: "md",
2104
+ className: "product-variant-details--facts",
2105
+ children: [/* @__PURE__ */ V(o, {
2106
+ weight: "semibold",
2107
+ children: T.factsTitle
2108
+ }), /* @__PURE__ */ V(se, {
2109
+ items: D,
2110
+ columns: 3,
2111
+ density: "compact",
2112
+ className: "product-variant-details--metadata"
2113
+ })]
2139
2114
  }),
2140
- !!te.length && /* @__PURE__ */ R(s, {
2115
+ !!A.length && /* @__PURE__ */ H(l, {
2141
2116
  gap: "md",
2142
2117
  className: "product-variant-details--selected-options",
2143
- children: [/* @__PURE__ */ L(i, {
2118
+ children: [/* @__PURE__ */ V(o, {
2144
2119
  weight: "semibold",
2145
- children: E.selectedOptionsTitle
2146
- }), /* @__PURE__ */ L("div", {
2120
+ children: T.selectedOptionsTitle
2121
+ }), /* @__PURE__ */ V("div", {
2147
2122
  className: "flex flex-wrap gap-space-sm",
2148
- children: te.map((e, t) => /* @__PURE__ */ L(m, {
2123
+ children: A.map((e, t) => /* @__PURE__ */ V(_, {
2149
2124
  tone: "secondary",
2150
2125
  children: e
2151
2126
  }, t))
2152
2127
  })]
2153
2128
  }),
2154
- !!o.length && /* @__PURE__ */ R(s, {
2129
+ !!n.length && /* @__PURE__ */ H(l, {
2155
2130
  gap: "md",
2156
2131
  className: "product-variant-details--related-options",
2157
- children: [/* @__PURE__ */ L(i, {
2132
+ children: [/* @__PURE__ */ V(o, {
2158
2133
  weight: "semibold",
2159
- children: E.relatedOptionsTitle
2160
- }), /* @__PURE__ */ L(w, { children: o.map((e, t) => S ? /* @__PURE__ */ L("div", { children: S(e, t) }, e.id) : /* @__PURE__ */ L(qe, {
2134
+ children: T.relatedOptionsTitle
2135
+ }), /* @__PURE__ */ V(M, { children: n.map((e, t) => S ? /* @__PURE__ */ V("div", { children: S(e, t) }, e.id) : /* @__PURE__ */ V(Je, {
2161
2136
  item: e,
2162
- actionLabel: E.viewOptionLabel,
2163
- onSelect: h ? () => h(e) : void 0
2137
+ actionLabel: T.viewOptionLabel,
2138
+ onSelect: m ? () => m(e) : void 0
2164
2139
  }, e.id)) })]
2165
2140
  })
2166
2141
  ]
2167
- }) : ee ?? /* @__PURE__ */ L($, {
2168
- title: E.emptyTitle,
2169
- description: E.emptyDescription
2142
+ }) : y ?? /* @__PURE__ */ V($, {
2143
+ title: T.emptyTitle,
2144
+ description: T.emptyDescription
2170
2145
  })
2171
2146
  });
2172
2147
  }
2173
- ht.displayName = "ProductVariantDetails";
2148
+ gt.displayName = "ProductVariantDetails";
2174
2149
  //#endregion
2175
2150
  //#region src/components/features/products/components/product-variant-editor.tsx
2176
- var gt = (e) => e.map((e) => ({
2151
+ var _t = (e) => e.map((e) => ({
2177
2152
  value: e.value,
2178
2153
  label: e.label,
2179
2154
  disabled: e.disabled
2180
2155
  }));
2181
- function _t({ value: e, defaultValue: a, optionFields: o = [], statusOptions: s = [], onValueChange: c, onSubmit: l, onError: u, onCancel: d, onDelete: f, actions: p, headerEnd: m, footerSlot: ee, disabled: b = !1, submitting: x = !1, className: S, strings: C }) {
2182
- let w = t(Pe, C), T = oe(), E = e !== void 0, [D, O] = se(a ?? {}), [k, te] = se(!1), A = (E ? e : D) ?? {}, j = x || k, M = b || j, N = (e) => {
2183
- E || O(e), c?.(e);
2184
- }, P = (e, t) => {
2185
- N({
2186
- ...A,
2156
+ function vt({ value: e, defaultValue: t, optionFields: n = [], statusOptions: a = [], onValueChange: c, onSubmit: u, onError: d, onCancel: f, onDelete: p, actions: m, headerEnd: h, footerSlot: g, disabled: _ = !1, submitting: v = !1, className: y, strings: w }) {
2157
+ let T = r(Ae, w), D = z(), O = e !== void 0, [k, A] = ue(t ?? {}), [j, M] = ue(!1), N = (O ? e : k) ?? {}, P = v || j, F = _ || P, ee = (e) => {
2158
+ O || A(e), c?.(e);
2159
+ }, I = (e, t) => {
2160
+ ee({
2161
+ ...N,
2187
2162
  [e]: t
2188
2163
  });
2189
- }, ne = (e, t) => {
2190
- N({
2191
- ...A,
2164
+ }, te = (e, t) => {
2165
+ ee({
2166
+ ...N,
2192
2167
  options: {
2193
- ...A.options ?? {},
2168
+ ...N.options,
2194
2169
  [e.id]: t
2195
2170
  }
2196
2171
  });
2197
- }, re = async (e) => {
2198
- if (e.preventDefault(), l && !j) {
2199
- te(!0);
2172
+ }, ne = async (e) => {
2173
+ if (e.preventDefault(), u && !P) {
2174
+ M(!0);
2200
2175
  try {
2201
- await l(A);
2176
+ await u(N);
2202
2177
  } catch (e) {
2203
- u?.(e);
2178
+ d?.(e);
2204
2179
  } finally {
2205
- te(!1);
2180
+ M(!1);
2206
2181
  }
2207
2182
  }
2208
- }, ie = /* @__PURE__ */ R("div", {
2183
+ }, re = /* @__PURE__ */ H("div", {
2209
2184
  className: "product-variant-editor--footer flex flex-col-reverse gap-space-md @sm/product-variant-editor:flex-row @sm/product-variant-editor:items-center @sm/product-variant-editor:justify-between",
2210
- children: [/* @__PURE__ */ L("div", { children: !!f && /* @__PURE__ */ L(r, {
2185
+ children: [/* @__PURE__ */ V("div", { children: !!p && /* @__PURE__ */ V(s, {
2211
2186
  type: "button",
2212
2187
  tone: "destructive",
2213
2188
  buttonStyle: "ghost",
2214
- onClick: () => f(A),
2215
- disabled: M,
2216
- icon: K,
2217
- children: w.deleteLabel
2218
- }) }), /* @__PURE__ */ R("div", {
2189
+ onClick: () => p(N),
2190
+ disabled: F,
2191
+ children: T.deleteLabel
2192
+ }) }), /* @__PURE__ */ H("div", {
2219
2193
  className: "flex flex-col-reverse gap-space-md @sm/product-variant-editor:flex-row @sm/product-variant-editor:justify-end",
2220
- children: [!!d && /* @__PURE__ */ L(r, {
2194
+ children: [!!f && /* @__PURE__ */ V(s, {
2221
2195
  type: "button",
2222
2196
  tone: "secondary",
2223
2197
  buttonStyle: "ghost",
2224
- onClick: d,
2225
- disabled: M,
2226
- icon: q,
2227
- children: w.cancelLabel
2228
- }), !!l && /* @__PURE__ */ L(r, {
2198
+ onClick: f,
2199
+ disabled: F,
2200
+ children: T.cancelLabel
2201
+ }), !!u && /* @__PURE__ */ V(s, {
2202
+ tone: "primary",
2229
2203
  type: "submit",
2230
- form: T,
2231
- disabled: M,
2232
- icon: Se,
2233
- children: j ? w.savingLabel : w.saveLabel
2204
+ form: D,
2205
+ disabled: F,
2206
+ children: P ? T.savingLabel : T.saveLabel
2234
2207
  })]
2235
2208
  })]
2236
- }), ae = !!(f || d || l);
2237
- return /* @__PURE__ */ L(_, {
2238
- icon: /* @__PURE__ */ L(V, { className: "size-4" }),
2239
- title: w.title,
2240
- description: w.description,
2241
- actions: p,
2242
- headerEnd: m,
2243
- footerSlot: ee ?? (ae ? ie : void 0),
2244
- footerDivider: !0,
2245
- contentClassName: "mt-1",
2246
- className: n("product-variant-editor--component @container/product-variant-editor w-full", S),
2247
- children: /* @__PURE__ */ R("form", {
2248
- id: T,
2249
- className: "product-variant-editor--form grid gap-5",
2250
- onSubmit: re,
2209
+ }), ie = !!(p || f || u);
2210
+ return /* @__PURE__ */ V(E, {
2211
+ title: T.title,
2212
+ description: T.description,
2213
+ actions: m,
2214
+ headerEnd: h,
2215
+ footerSlot: g,
2216
+ className: i("product-variant-editor--component @container/product-variant-editor w-full", y),
2217
+ children: /* @__PURE__ */ H(l, {
2218
+ render: /* @__PURE__ */ V("form", {
2219
+ id: D,
2220
+ onSubmit: ne
2221
+ }),
2222
+ gap: "2xl",
2223
+ className: "product-variant-editor--form",
2251
2224
  children: [
2252
- /* @__PURE__ */ R("section", {
2225
+ /* @__PURE__ */ H("section", {
2253
2226
  className: "product-variant-editor--section grid gap-space-lg",
2254
- children: [/* @__PURE__ */ L(i, {
2227
+ children: [/* @__PURE__ */ V(o, {
2255
2228
  weight: "semibold",
2256
- children: w.identityTitle
2257
- }), /* @__PURE__ */ R("div", {
2229
+ children: T.identityTitle
2230
+ }), /* @__PURE__ */ H("div", {
2258
2231
  className: "grid gap-space-lg @sm/product-variant-editor:grid-cols-2",
2259
2232
  children: [
2260
- /* @__PURE__ */ L(v, {
2261
- label: w.fields.name,
2233
+ /* @__PURE__ */ V(x, {
2234
+ label: T.fields.name,
2262
2235
  required: !0,
2263
- children: /* @__PURE__ */ L(h, {
2264
- value: A.name ?? "",
2265
- onChange: (e) => P("name", e.target.value),
2266
- placeholder: w.placeholders.name,
2267
- disabled: M
2236
+ children: /* @__PURE__ */ V(b, {
2237
+ value: N.name ?? "",
2238
+ onChange: (e) => I("name", e.target.value),
2239
+ placeholder: T.placeholders.name,
2240
+ disabled: F
2268
2241
  })
2269
2242
  }),
2270
- /* @__PURE__ */ L(v, {
2271
- label: w.fields.sku,
2272
- children: /* @__PURE__ */ L(h, {
2273
- value: A.sku ?? "",
2274
- onChange: (e) => P("sku", e.target.value),
2275
- placeholder: w.placeholders.sku,
2276
- disabled: M
2243
+ /* @__PURE__ */ V(x, {
2244
+ label: T.fields.sku,
2245
+ children: /* @__PURE__ */ V(b, {
2246
+ value: N.sku ?? "",
2247
+ onChange: (e) => I("sku", e.target.value),
2248
+ placeholder: T.placeholders.sku,
2249
+ disabled: F
2277
2250
  })
2278
2251
  }),
2279
- /* @__PURE__ */ L(v, {
2280
- label: w.fields.description,
2252
+ /* @__PURE__ */ V(x, {
2253
+ label: T.fields.description,
2281
2254
  className: "@sm/product-variant-editor:col-span-2",
2282
- children: /* @__PURE__ */ L(g, {
2283
- value: A.description ?? "",
2284
- onChange: (e) => P("description", e.target.value),
2285
- placeholder: w.placeholders.description,
2286
- disabled: M,
2255
+ children: /* @__PURE__ */ V(S, {
2256
+ value: N.description ?? "",
2257
+ onChange: (e) => I("description", e.target.value),
2258
+ placeholder: T.placeholders.description,
2259
+ disabled: F,
2287
2260
  autoResize: !0,
2288
2261
  minRows: 2
2289
2262
  })
@@ -2291,141 +2264,142 @@ function _t({ value: e, defaultValue: a, optionFields: o = [], statusOptions: s
2291
2264
  ]
2292
2265
  })]
2293
2266
  }),
2294
- /* @__PURE__ */ R("section", {
2267
+ /* @__PURE__ */ H("section", {
2295
2268
  className: "product-variant-editor--section grid gap-space-lg",
2296
- children: [/* @__PURE__ */ L(i, {
2269
+ children: [/* @__PURE__ */ V(o, {
2297
2270
  weight: "semibold",
2298
- children: w.commercialTitle
2299
- }), /* @__PURE__ */ R("div", {
2271
+ children: T.commercialTitle
2272
+ }), /* @__PURE__ */ H("div", {
2300
2273
  className: "grid gap-space-lg @sm/product-variant-editor:grid-cols-2",
2301
2274
  children: [
2302
- /* @__PURE__ */ L(v, {
2303
- label: w.fields.price,
2304
- children: /* @__PURE__ */ L(h, {
2305
- value: A.price ?? "",
2306
- onChange: (e) => P("price", e.target.value),
2307
- placeholder: w.placeholders.price,
2308
- disabled: M
2275
+ /* @__PURE__ */ V(x, {
2276
+ label: T.fields.price,
2277
+ children: /* @__PURE__ */ V(b, {
2278
+ value: N.price ?? "",
2279
+ onChange: (e) => I("price", e.target.value),
2280
+ placeholder: T.placeholders.price,
2281
+ disabled: F
2309
2282
  })
2310
2283
  }),
2311
- /* @__PURE__ */ L(v, {
2312
- label: w.fields.inventory,
2313
- children: /* @__PURE__ */ L(h, {
2314
- value: A.inventory ?? "",
2315
- onChange: (e) => P("inventory", e.target.value),
2316
- placeholder: w.placeholders.inventory,
2317
- disabled: M,
2284
+ /* @__PURE__ */ V(x, {
2285
+ label: T.fields.inventory,
2286
+ children: /* @__PURE__ */ V(b, {
2287
+ value: N.inventory ?? "",
2288
+ onChange: (e) => I("inventory", e.target.value),
2289
+ placeholder: T.placeholders.inventory,
2290
+ disabled: F,
2318
2291
  inputMode: "numeric"
2319
2292
  })
2320
2293
  }),
2321
- /* @__PURE__ */ L(v, {
2322
- label: w.fields.status,
2323
- children: s.length > 0 ? /* @__PURE__ */ L(y, {
2324
- options: gt(s),
2325
- value: A.status ?? null,
2326
- onValueChange: (e) => P("status", e ?? ""),
2327
- placeholder: w.statusPlaceholder,
2328
- disabled: M,
2329
- "aria-label": w.fields.status
2330
- }) : /* @__PURE__ */ L(h, {
2331
- value: A.status ?? "",
2332
- onChange: (e) => P("status", e.target.value),
2333
- placeholder: w.placeholders.status,
2334
- disabled: M
2294
+ /* @__PURE__ */ V(x, {
2295
+ label: T.fields.status,
2296
+ children: a.length > 0 ? /* @__PURE__ */ V(C, {
2297
+ options: _t(a),
2298
+ value: N.status ?? null,
2299
+ onValueChange: (e) => I("status", e ?? ""),
2300
+ placeholder: T.statusPlaceholder,
2301
+ disabled: F,
2302
+ "aria-label": T.fields.status
2303
+ }) : /* @__PURE__ */ V(b, {
2304
+ value: N.status ?? "",
2305
+ onChange: (e) => I("status", e.target.value),
2306
+ placeholder: T.placeholders.status,
2307
+ disabled: F
2335
2308
  })
2336
2309
  }),
2337
- /* @__PURE__ */ L(v, {
2338
- label: w.fields.channels,
2339
- children: /* @__PURE__ */ L(h, {
2340
- value: A.channels ?? "",
2341
- onChange: (e) => P("channels", e.target.value),
2342
- placeholder: w.placeholders.channels,
2343
- disabled: M
2310
+ /* @__PURE__ */ V(x, {
2311
+ label: T.fields.channels,
2312
+ children: /* @__PURE__ */ V(b, {
2313
+ value: N.channels ?? "",
2314
+ onChange: (e) => I("channels", e.target.value),
2315
+ placeholder: T.placeholders.channels,
2316
+ disabled: F
2344
2317
  })
2345
2318
  })
2346
2319
  ]
2347
2320
  })]
2348
2321
  }),
2349
- !!o.length && /* @__PURE__ */ R("section", {
2322
+ !!n.length && /* @__PURE__ */ H("section", {
2350
2323
  className: "product-variant-editor--section grid gap-space-lg",
2351
- children: [/* @__PURE__ */ L(i, {
2324
+ children: [/* @__PURE__ */ V(o, {
2352
2325
  weight: "semibold",
2353
- children: w.optionsTitle
2354
- }), /* @__PURE__ */ L("div", {
2326
+ children: T.optionsTitle
2327
+ }), /* @__PURE__ */ V("div", {
2355
2328
  className: "grid gap-space-lg @sm/product-variant-editor:grid-cols-2",
2356
- children: o.map((e) => {
2357
- let t = e.value ?? A.options?.[e.id] ?? "", n = !!e.choices?.length;
2358
- return /* @__PURE__ */ L(v, {
2329
+ children: n.map((e) => {
2330
+ let t = e.value ?? N.options?.[e.id] ?? "", n = !!e.choices?.length;
2331
+ return /* @__PURE__ */ V(x, {
2359
2332
  label: e.label,
2360
2333
  helperText: e.helperText,
2361
- children: n ? /* @__PURE__ */ L(y, {
2362
- options: gt(e.choices ?? []),
2334
+ children: n ? /* @__PURE__ */ V(C, {
2335
+ options: _t(e.choices ?? []),
2363
2336
  value: t || null,
2364
- onValueChange: (t) => ne(e, t),
2365
- placeholder: e.placeholder ?? w.optionPlaceholder,
2366
- disabled: M,
2337
+ onValueChange: (t) => te(e, t),
2338
+ placeholder: e.placeholder ?? T.optionPlaceholder,
2339
+ disabled: F,
2367
2340
  "aria-label": e.label
2368
- }) : /* @__PURE__ */ L(h, {
2341
+ }) : /* @__PURE__ */ V(b, {
2369
2342
  value: t,
2370
- onChange: (t) => ne(e, t.target.value),
2371
- placeholder: e.placeholder ?? w.optionPlaceholder,
2372
- disabled: M
2343
+ onChange: (t) => te(e, t.target.value),
2344
+ placeholder: e.placeholder ?? T.optionPlaceholder,
2345
+ disabled: F
2373
2346
  })
2374
2347
  }, e.id);
2375
2348
  })
2376
2349
  })]
2377
- })
2350
+ }),
2351
+ g == null && ie && re
2378
2352
  ]
2379
2353
  })
2380
2354
  });
2381
2355
  }
2382
- _t.displayName = "ProductVariantEditor";
2356
+ vt.displayName = "ProductVariantEditor";
2383
2357
  //#endregion
2384
2358
  //#region src/components/features/products/components/product-variants-bulk-table.tsx
2385
- var vt = [
2359
+ var yt = [
2386
2360
  "variant",
2387
2361
  "sku",
2388
2362
  "price",
2389
2363
  "inventory",
2390
2364
  "status"
2391
- ], yt = "text", bt = "text", xt = "multiple";
2392
- function St(e) {
2365
+ ], bt = "text", xt = "text", St = "multiple";
2366
+ function Ct(e) {
2393
2367
  return typeof e == "string" || typeof e == "number" ? String(e) : "";
2394
2368
  }
2395
- function Ct(e, t) {
2369
+ function wt(e, t) {
2396
2370
  let n = e.optionValues?.[t.id];
2397
2371
  if (n != null && n !== !1 && n !== "") return n;
2398
2372
  let r = e.optionValueIds?.[t.id];
2399
2373
  return t.values?.find((e) => e.id === r)?.label ?? void 0;
2400
2374
  }
2401
- function wt(e, t) {
2402
- return e.name !== void 0 && e.name !== null && e.name !== "" ? e.name : t.filter((e) => e.usedForVariants !== !1).map((t) => Ct(e, t)).filter((e) => e != null && e !== "").map((e) => St(e)).filter(Boolean).join(" / ") || "-";
2403
- }
2404
2375
  function Tt(e, t) {
2405
- return t.filter((e) => e.usedForVariants !== !1).map((t) => Ct(e, t)).filter((e) => e != null && e !== "");
2376
+ return e.name !== void 0 && e.name !== null && e.name !== "" ? e.name : t.filter((e) => e.usedForVariants !== !1).map((t) => wt(e, t)).filter((e) => e != null && e !== "").map((e) => Ct(e)).filter(Boolean).join(" / ") || "-";
2406
2377
  }
2407
- function Et(e) {
2408
- return e.map(St).filter(Boolean).join(" / ");
2378
+ function Et(e, t) {
2379
+ return t.filter((e) => e.usedForVariants !== !1).map((t) => wt(e, t)).filter((e) => e != null && e !== "");
2409
2380
  }
2410
- function Dt(e, t) {
2411
- return St(Ct(e, t)) || "-";
2381
+ function Dt(e) {
2382
+ return e.map(Ct).filter(Boolean).join(" / ");
2412
2383
  }
2413
2384
  function Ot(e, t) {
2385
+ return Ct(wt(e, t)) || "-";
2386
+ }
2387
+ function kt(e, t) {
2414
2388
  return e.map((e) => t.get(e)).filter((e) => !!e);
2415
2389
  }
2416
- function kt(e) {
2390
+ function At(e) {
2417
2391
  return e == null || e === "" ? "-" : e;
2418
2392
  }
2419
- function At(e) {
2393
+ function jt(e) {
2420
2394
  return e != null && e !== "";
2421
2395
  }
2422
- function jt(e) {
2396
+ function Mt(e) {
2423
2397
  return e === "sku" || e === "price" || e === "inventory";
2424
2398
  }
2425
- function Mt(e, t) {
2426
- return e === "text" || e === "field" ? e : e[t] ?? bt;
2399
+ function Nt(e, t) {
2400
+ return e === "text" || e === "field" ? e : e[t] ?? xt;
2427
2401
  }
2428
- function Nt(e, t, n, r) {
2402
+ function Pt(e, t, n, r) {
2429
2403
  return {
2430
2404
  index: e,
2431
2405
  field: t,
@@ -2433,378 +2407,376 @@ function Nt(e, t, n, r) {
2433
2407
  value: r
2434
2408
  };
2435
2409
  }
2436
- function Pt(e, t, r, i, a) {
2437
- let o = St(e);
2438
- if (r === "field") {
2439
- let e = !!i;
2440
- return /* @__PURE__ */ L(h, {
2410
+ function Ft(e, t, n, r, a) {
2411
+ let o = Ct(e);
2412
+ if (n === "field") {
2413
+ let e = !!r;
2414
+ return /* @__PURE__ */ V(b, {
2441
2415
  readOnly: !e,
2442
2416
  value: o,
2443
- onChange: e ? (e) => i(e.currentTarget.value) : void 0,
2417
+ onChange: e ? (e) => r(e.currentTarget.value) : void 0,
2444
2418
  onBlur: a ? (e) => a(e.currentTarget.value) : void 0,
2445
2419
  "aria-label": t,
2446
- className: n("h-control-lg w-full min-w-36 bg-background px-control shadow-xs", !e && "text-muted-foreground")
2420
+ className: i("h-control-lg w-full min-w-24 bg-background px-control shadow-xs", !e && "text-muted-foreground")
2447
2421
  });
2448
2422
  }
2449
- let s = At(e) ? d : f;
2450
- return /* @__PURE__ */ L(s, {
2423
+ let s = jt(e) ? m : h;
2424
+ return /* @__PURE__ */ V(s, {
2451
2425
  className: "min-w-0 whitespace-normal break-words tabular-nums",
2452
- children: kt(e)
2426
+ children: At(e)
2453
2427
  });
2454
2428
  }
2455
- function Ft({ variants: e = [], optionGroups: o = [], groupByOptionId: c, visibleColumns: l = vt, optionCombinationDisplay: u = yt, cellDisplay: d = bt, selectionMode: f, renderOptionCombination: p, renderCell: h, selectedVariantIds: g, defaultSelectedVariantIds: v = [], onSelectedVariantIdsChange: y, onVariantFieldChange: ee, onVariantFieldBlur: x, onCreateVariant: S, onGenerateVariants: C, onSelectVariant: w, onEditVariant: T, onDuplicateVariant: E, onDeleteVariant: D, onBulkEdit: N, onBulkApply: P, onBulkDelete: ne, renderVariantActions: re, renderBulkActions: ie, actions: oe, headerEnd: ce, footerSlot: le, empty: ue, surface: de = "card", className: fe, strings: z }) {
2456
- let B = t(Ae, z), he = g !== void 0, [ge, ve] = se(v), ye = !!(ie || N || P || ne), U = (f ?? (ye || he || y ? xt : "none")) === "multiple", be = I(() => U ? he ? g : ge : [], [
2457
- ge,
2429
+ function It({ variants: e = [], optionGroups: t = [], groupByOptionId: n, visibleColumns: c = yt, optionCombinationDisplay: u = bt, cellDisplay: d = xt, selectionMode: f, renderOptionCombination: p, renderCell: m, selectedVariantIds: h, defaultSelectedVariantIds: g = [], onSelectedVariantIdsChange: v, onVariantFieldChange: y, onVariantFieldBlur: b, onCreateVariant: x, onGenerateVariants: S, onSelectVariant: C, onEditVariant: w, onDuplicateVariant: D, onDeleteVariant: O, onBulkEdit: k, onBulkApply: A, onBulkDelete: j, renderVariantActions: M, renderBulkActions: N, actions: P, headerEnd: F, footerSlot: ae, empty: oe, surface: se = "card", className: L, strings: ce }) {
2430
+ let z = r(De, ce), de = h !== void 0, [fe, pe] = ue(g), ge = !!(N || k || A || j), U = (f ?? (ge || de || v ? St : "none")) === "multiple", _e = B(() => U ? de ? h : fe : [], [
2431
+ fe,
2458
2432
  U,
2459
- he,
2460
- g
2461
- ]), Se = I(() => new Map(e.map((e) => [e.id, e])), [e]), W = I(() => Ot(be, Se), [Se, be]), Ce = I(() => new Set(be), [be]), G = I(() => new Set(l), [l]), q = I(() => o.find((e) => e.id === c), [o, c]), J = I(() => new Map(e.map((e, t) => [e.id, t])), [e]), we = I(() => {
2462
- if (!q) return e;
2463
- let t = new Map((q.values ?? []).map((e, t) => [e.id, t]));
2433
+ de,
2434
+ h
2435
+ ]), ve = B(() => new Map(e.map((e) => [e.id, e])), [e]), K = B(() => kt(_e, ve), [ve, _e]), ye = B(() => new Set(_e), [_e]), J = B(() => new Set(c), [c]), Y = B(() => t.find((e) => e.id === n), [t, n]), be = B(() => new Map(e.map((e, t) => [e.id, t])), [e]), xe = B(() => {
2436
+ if (!Y) return e;
2437
+ let t = new Map((Y.values ?? []).map((e, t) => [e.id, t]));
2464
2438
  return [...e].sort((e, n) => {
2465
- let r = e.optionValueIds?.[q.id], i = n.optionValueIds?.[q.id], a = r === void 0 ? void 0 : t.get(r), o = i === void 0 ? void 0 : t.get(i), s = a ?? 2 ** 53 - 1, c = o ?? 2 ** 53 - 1;
2466
- return s === c ? (J.get(e.id) ?? 0) - (J.get(n.id) ?? 0) : s - c;
2439
+ let r = e.optionValueIds?.[Y.id], i = n.optionValueIds?.[Y.id], a = r === void 0 ? void 0 : t.get(r), o = i === void 0 ? void 0 : t.get(i), s = a ?? 2 ** 53 - 1, c = o ?? 2 ** 53 - 1;
2440
+ return s === c ? (be.get(e.id) ?? 0) - (be.get(n.id) ?? 0) : s - c;
2467
2441
  });
2468
2442
  }, [
2469
- q,
2470
- J,
2443
+ Y,
2444
+ be,
2471
2445
  e
2472
- ]), Te = I(() => {
2473
- if (!q) return /* @__PURE__ */ new Map();
2446
+ ]), Se = B(() => {
2447
+ if (!Y) return /* @__PURE__ */ new Map();
2474
2448
  let t = /* @__PURE__ */ new Map();
2475
2449
  return e.forEach((e) => {
2476
- let n = Dt(e, q);
2450
+ let n = Ot(e, Y);
2477
2451
  t.set(n, (t.get(n) ?? 0) + 1);
2478
2452
  }), t;
2479
- }, [q, e]), Y = U && ye, Ee = e.length > 0, X = U && Ee && e.every((e) => Ce.has(e.id)), Z = !!(w || T || E || D || re), De = l.filter((e) => G.has(e)).length + +!!U + +!!Z, Q = F((e) => {
2480
- let t = Ot(e, Se);
2481
- he || ve(e), y?.(e, t);
2453
+ }, [Y, e]), Ce = U && ge, we = e.length > 0, Te = U && we && e.every((e) => ye.has(e.id)), Ee = !!(C || w || D || O || M), X = c.filter((e) => J.has(e)).length + +!!U + +!!Ee, Z = R((e) => {
2454
+ let t = kt(e, ve);
2455
+ de || pe(e), v?.(e, t);
2482
2456
  }, [
2483
- he,
2484
- y,
2485
- Se
2486
- ]), Oe = F(() => Q([]), [Q]), ke = F((e, t) => {
2457
+ de,
2458
+ v,
2459
+ ve
2460
+ ]), Oe = R(() => Z([]), [Z]), ke = R((e, t) => {
2487
2461
  if (!U) return;
2488
- let n = t === !0 ? Array.from(/* @__PURE__ */ new Set([...be, e.id])) : be.filter((t) => t !== e.id);
2489
- Q(n);
2462
+ let n = t === !0 ? Array.from(/* @__PURE__ */ new Set([..._e, e.id])) : _e.filter((t) => t !== e.id);
2463
+ Z(n);
2490
2464
  }, [
2491
2465
  U,
2492
- be,
2493
- Q
2494
- ]), je = F((t) => {
2495
- U && Q(t === !0 ? e.map((e) => e.id) : []);
2466
+ _e,
2467
+ Z
2468
+ ]), Q = R((t) => {
2469
+ U && Z(t === !0 ? e.map((e) => e.id) : []);
2496
2470
  }, [
2497
2471
  U,
2498
- Q,
2472
+ Z,
2499
2473
  e
2500
- ]), Me = {
2501
- selectedRows: W,
2502
- selectedIds: be,
2474
+ ]), Ae = {
2475
+ selectedRows: K,
2476
+ selectedIds: _e,
2503
2477
  allRows: e,
2504
- selectedCount: W.length,
2478
+ selectedCount: K.length,
2505
2479
  totalCount: e.length,
2506
- allRowsSelected: X,
2480
+ allRowsSelected: Te,
2507
2481
  clearSelection: Oe,
2508
- setSelectedIds: Q
2509
- }, Ne = S || C ? /* @__PURE__ */ R(s, {
2482
+ setSelectedIds: Z
2483
+ }, je = x || S ? /* @__PURE__ */ H(l, {
2510
2484
  direction: "horizontal",
2511
2485
  gap: "sm",
2512
2486
  justify: "end",
2513
2487
  className: "product-variants-bulk-table--header-actions",
2514
- children: [!!C && /* @__PURE__ */ L(r, {
2488
+ children: [!!S && /* @__PURE__ */ V(s, {
2515
2489
  type: "button",
2516
2490
  tone: "secondary",
2517
2491
  buttonStyle: "outline",
2518
- onClick: C,
2519
- icon: xe,
2520
- children: B.generateLabel
2521
- }), !!S && /* @__PURE__ */ L(r, {
2492
+ onClick: S,
2493
+ children: z.generateLabel
2494
+ }), !!x && /* @__PURE__ */ V(s, {
2522
2495
  type: "button",
2523
2496
  tone: "secondary",
2524
2497
  buttonStyle: "ghost",
2525
- onClick: S,
2526
- icon: H,
2527
- children: B.createLabel
2498
+ onClick: x,
2499
+ icon: G,
2500
+ children: z.createLabel
2528
2501
  })]
2529
- }) : void 0, Pe = Y ? /* @__PURE__ */ R(s, {
2502
+ }) : void 0, Me = Ce ? /* @__PURE__ */ H(l, {
2530
2503
  direction: "horizontal",
2531
2504
  gap: "md",
2532
2505
  justify: "between",
2533
- className: "product-variants-bulk-table--bulk-toolbar rounded-radius-lg bg-muted/45 px-space-lg py-space-md",
2534
- children: [/* @__PURE__ */ R(s, {
2506
+ className: "product-variants-bulk-table--bulk-toolbar rounded-radius bg-muted/45 px-space-lg py-space-md",
2507
+ children: [/* @__PURE__ */ H(l, {
2535
2508
  direction: "horizontal",
2536
2509
  gap: "md",
2537
- children: [/* @__PURE__ */ L(i, {
2510
+ children: [/* @__PURE__ */ V(o, {
2538
2511
  size: "xs",
2539
2512
  type: "secondary",
2540
- children: B.selectedLabel(W.length, e.length)
2541
- }), !!W.length && /* @__PURE__ */ L(r, {
2513
+ children: z.selectedLabel(K.length, e.length)
2514
+ }), !!K.length && /* @__PURE__ */ V(s, {
2542
2515
  type: "button",
2543
2516
  tone: "secondary",
2544
2517
  buttonStyle: "ghost",
2545
2518
  size: "sm",
2546
2519
  onClick: Oe,
2547
- children: B.clearSelectionLabel
2520
+ children: z.clearSelectionLabel
2548
2521
  })]
2549
- }), /* @__PURE__ */ R(s, {
2522
+ }), /* @__PURE__ */ H(l, {
2550
2523
  direction: "horizontal",
2551
2524
  gap: "md",
2552
2525
  justify: "end",
2553
2526
  children: [
2554
- !!N && /* @__PURE__ */ L(r, {
2527
+ !!k && /* @__PURE__ */ V(s, {
2555
2528
  type: "button",
2556
2529
  tone: "secondary",
2557
2530
  buttonStyle: "solid",
2558
- disabled: !W.length,
2559
- onClick: () => N(W),
2531
+ disabled: !K.length,
2532
+ onClick: () => k(K),
2560
2533
  className: "bg-background text-foreground hover:bg-background/80",
2561
- children: B.bulkEditLabel
2534
+ children: z.bulkEditLabel
2562
2535
  }),
2563
- !!ne && /* @__PURE__ */ R(r, {
2536
+ !!j && /* @__PURE__ */ H(s, {
2564
2537
  type: "button",
2565
2538
  tone: "secondary",
2566
2539
  buttonStyle: "ghost",
2567
- disabled: !W.length,
2568
- onClick: () => ne(W),
2569
- icon: K,
2540
+ disabled: !K.length,
2541
+ onClick: () => j(K),
2570
2542
  className: "text-muted-foreground hover:text-destructive disabled:text-muted-foreground/55",
2571
2543
  children: [
2572
- B.bulkDeleteLabel,
2544
+ z.bulkDeleteLabel,
2573
2545
  " (",
2574
- W.length,
2546
+ K.length,
2575
2547
  ")"
2576
2548
  ]
2577
2549
  }),
2578
- !!P && /* @__PURE__ */ L(r, {
2550
+ !!A && /* @__PURE__ */ V(s, {
2579
2551
  type: "button",
2580
2552
  tone: "secondary",
2581
2553
  buttonStyle: "ghost",
2582
- disabled: !W.length,
2583
- onClick: () => P(W),
2554
+ disabled: !K.length,
2555
+ onClick: () => A(K),
2584
2556
  className: "text-muted-foreground disabled:text-muted-foreground/55",
2585
- children: B.bulkApplyLabel
2557
+ children: z.bulkApplyLabel
2586
2558
  }),
2587
- ie?.(Me)
2559
+ N?.(Ae)
2588
2560
  ]
2589
2561
  })]
2590
- }) : null, Fe = e.length === 0 ? ue ?? /* @__PURE__ */ L($, {
2591
- title: B.emptyTitle,
2592
- description: B.emptyDescription,
2593
- action: C ? /* @__PURE__ */ L(r, {
2562
+ }) : null, Ne = e.length === 0 ? oe ?? /* @__PURE__ */ V($, {
2563
+ title: z.emptyTitle,
2564
+ description: z.emptyDescription,
2565
+ action: S ? /* @__PURE__ */ V(s, {
2566
+ tone: "primary",
2594
2567
  type: "button",
2595
- onClick: C,
2596
- icon: xe,
2597
- children: B.generateLabel
2568
+ onClick: S,
2569
+ children: z.generateLabel
2598
2570
  }) : void 0
2599
- }) : /* @__PURE__ */ R(s, {
2571
+ }) : /* @__PURE__ */ H(l, {
2600
2572
  gap: "md",
2601
2573
  className: "product-variants-bulk-table--body",
2602
- children: [Pe, /* @__PURE__ */ L("div", {
2603
- className: "product-variants-bulk-table--table overflow-hidden rounded-radius-lg border border-border bg-background",
2604
- children: /* @__PURE__ */ R(M, {
2574
+ children: [Me, /* @__PURE__ */ V("div", {
2575
+ className: "product-variants-bulk-table--table overflow-hidden rounded-radius border border-border bg-background",
2576
+ children: /* @__PURE__ */ H(ie, {
2605
2577
  containerClassName: "[scrollbar-gutter:stable] [scrollbar-width:thin] [&::-webkit-scrollbar]:h-2.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-border [&::-webkit-scrollbar-track]:bg-muted/40",
2606
- className: "min-w-max border-collapse",
2578
+ className: "w-full border-collapse",
2607
2579
  children: [
2608
- /* @__PURE__ */ R("colgroup", { children: [
2609
- U && /* @__PURE__ */ L("col", {
2580
+ /* @__PURE__ */ H("colgroup", { children: [
2581
+ U && /* @__PURE__ */ V("col", {
2610
2582
  className: "w-14 min-w-14 max-w-14",
2611
2583
  style: { width: "3.5rem" }
2612
2584
  }),
2613
- G.has("variant") && /* @__PURE__ */ L("col", {}),
2614
- G.has("sku") && /* @__PURE__ */ L("col", {}),
2615
- G.has("price") && /* @__PURE__ */ L("col", {}),
2616
- G.has("inventory") && /* @__PURE__ */ L("col", {}),
2617
- G.has("status") && /* @__PURE__ */ L("col", {}),
2618
- G.has("updated") && /* @__PURE__ */ L("col", {}),
2619
- Z && /* @__PURE__ */ L("col", { style: { width: "4.5rem" } })
2585
+ J.has("variant") && /* @__PURE__ */ V("col", {}),
2586
+ J.has("sku") && /* @__PURE__ */ V("col", {}),
2587
+ J.has("price") && /* @__PURE__ */ V("col", {}),
2588
+ J.has("inventory") && /* @__PURE__ */ V("col", {}),
2589
+ J.has("status") && /* @__PURE__ */ V("col", {}),
2590
+ J.has("updated") && /* @__PURE__ */ V("col", {}),
2591
+ Ee && /* @__PURE__ */ V("col", { style: { width: "4.5rem" } })
2620
2592
  ] }),
2621
- /* @__PURE__ */ L(j, { children: /* @__PURE__ */ R(O, {
2593
+ /* @__PURE__ */ V(re, { children: /* @__PURE__ */ H(ee, {
2622
2594
  className: "h-12 border-b border-border/70 bg-muted/45",
2623
2595
  children: [
2624
- U && /* @__PURE__ */ L(A, {
2596
+ U && /* @__PURE__ */ V(ne, {
2625
2597
  className: "w-14 min-w-14 max-w-14 px-0 py-space-md text-center align-middle",
2626
2598
  style: { width: "3.5rem" },
2627
- children: /* @__PURE__ */ L(b, {
2628
- checked: X,
2629
- onCheckedChange: je,
2630
- "aria-label": B.selectAllLabel,
2599
+ children: /* @__PURE__ */ V(T, {
2600
+ checked: Te,
2601
+ onCheckedChange: Q,
2602
+ "aria-label": z.selectAllLabel,
2631
2603
  className: "mx-auto"
2632
2604
  })
2633
2605
  }),
2634
- G.has("variant") && /* @__PURE__ */ L(A, {
2606
+ J.has("variant") && /* @__PURE__ */ V(ne, {
2635
2607
  className: "px-space-lg py-space-md text-left align-middle",
2636
- children: /* @__PURE__ */ L(a, {
2608
+ children: /* @__PURE__ */ V(a, {
2637
2609
  className: "whitespace-normal",
2638
- children: B.headers.variant
2610
+ children: z.headers.variant
2639
2611
  })
2640
2612
  }),
2641
- G.has("sku") && /* @__PURE__ */ L(A, {
2613
+ J.has("sku") && /* @__PURE__ */ V(ne, {
2642
2614
  className: "px-space-lg py-space-md text-left align-middle",
2643
- children: /* @__PURE__ */ L(a, {
2615
+ children: /* @__PURE__ */ V(a, {
2644
2616
  className: "whitespace-normal",
2645
- children: B.headers.sku
2617
+ children: z.headers.sku
2646
2618
  })
2647
2619
  }),
2648
- G.has("price") && /* @__PURE__ */ L(A, {
2620
+ J.has("price") && /* @__PURE__ */ V(ne, {
2649
2621
  className: "px-space-lg py-space-md text-left align-middle",
2650
- children: /* @__PURE__ */ L(a, {
2622
+ children: /* @__PURE__ */ V(a, {
2651
2623
  className: "whitespace-normal",
2652
- children: B.headers.price
2624
+ children: z.headers.price
2653
2625
  })
2654
2626
  }),
2655
- G.has("inventory") && /* @__PURE__ */ L(A, {
2627
+ J.has("inventory") && /* @__PURE__ */ V(ne, {
2656
2628
  className: "px-space-lg py-space-md text-left align-middle",
2657
- children: /* @__PURE__ */ L(a, {
2629
+ children: /* @__PURE__ */ V(a, {
2658
2630
  className: "whitespace-normal",
2659
- children: B.headers.inventory
2631
+ children: z.headers.inventory
2660
2632
  })
2661
2633
  }),
2662
- G.has("status") && /* @__PURE__ */ L(A, {
2634
+ J.has("status") && /* @__PURE__ */ V(ne, {
2663
2635
  className: "px-space-lg py-space-md text-left align-middle",
2664
- children: /* @__PURE__ */ L(a, {
2636
+ children: /* @__PURE__ */ V(a, {
2665
2637
  className: "whitespace-normal",
2666
- children: B.headers.status
2638
+ children: z.headers.status
2667
2639
  })
2668
2640
  }),
2669
- G.has("updated") && /* @__PURE__ */ L(A, {
2641
+ J.has("updated") && /* @__PURE__ */ V(ne, {
2670
2642
  className: "px-space-lg py-space-md text-left align-middle",
2671
- children: /* @__PURE__ */ L(a, {
2643
+ children: /* @__PURE__ */ V(a, {
2672
2644
  className: "whitespace-normal",
2673
- children: B.headers.updated
2645
+ children: z.headers.updated
2674
2646
  })
2675
2647
  }),
2676
- Z && /* @__PURE__ */ L(A, {
2648
+ Ee && /* @__PURE__ */ V(ne, {
2677
2649
  className: "px-space-lg py-space-md text-right align-middle",
2678
- children: /* @__PURE__ */ L(a, {
2650
+ children: /* @__PURE__ */ V(a, {
2679
2651
  className: "whitespace-normal",
2680
- children: B.headers.actions
2652
+ children: z.headers.actions
2681
2653
  })
2682
2654
  })
2683
2655
  ]
2684
2656
  }) }),
2685
- /* @__PURE__ */ L(te, { children: we.map((e, t) => {
2686
- let n = J.get(e.id) ?? t, r = q ? Dt(e, q) : null, a = t > 0 ? we[t - 1] : void 0, c = q && a ? Dt(a, q) : null, l = !!q && r !== c, f = Ce.has(e.id), g = {
2687
- index: n,
2688
- onSelect: w ? () => w(e) : void 0,
2689
- onEdit: T ? () => T(e) : void 0,
2690
- onDuplicate: E ? () => E(e) : void 0,
2691
- onDelete: D ? () => D(e) : void 0,
2657
+ /* @__PURE__ */ V(te, { children: xe.map((e, n) => {
2658
+ let r = be.get(e.id) ?? n, i = Y ? Ot(e, Y) : null, a = n > 0 ? xe[n - 1] : void 0, s = Y && a ? Ot(a, Y) : null, c = !!Y && i !== s, f = ye.has(e.id), h = {
2659
+ index: r,
2660
+ onSelect: C ? () => C(e) : void 0,
2661
+ onEdit: w ? () => w(e) : void 0,
2662
+ onDuplicate: D ? () => D(e) : void 0,
2663
+ onDelete: O ? () => O(e) : void 0,
2692
2664
  isSelected: f,
2693
2665
  onToggleSelected: U ? (t) => ke(e, t) : void 0
2694
- }, _ = q ? o.filter((e) => e.id !== q.id) : o, v = Tt(e, _), y = q ? wt({
2666
+ }, g = Y ? t.filter((e) => e.id !== Y.id) : t, v = Et(e, g), x = Y ? Tt({
2695
2667
  ...e,
2696
2668
  name: void 0
2697
- }, _) : wt(e, o), S = y === "-" && q ? wt(e, o) : y, C = Et(v), te = C === St(S), A = (t, r, i = bt) => {
2698
- let a = jt(t) && ee ? (i) => ee(e, t, i, Nt(n, t, r, i)) : void 0, o = jt(t) && x ? (i) => x(e, t, i, Nt(n, t, r, i)) : void 0;
2669
+ }, g) : Tt(e, t), S = x === "-" && Y ? Tt(e, t) : x, E = Dt(v), k = E === Ct(S), A = (t, n, i = xt) => {
2670
+ let a = Mt(t) && y ? (i) => y(e, t, i, Pt(r, t, n, i)) : void 0, o = Mt(t) && b ? (i) => b(e, t, i, Pt(r, t, n, i)) : void 0;
2699
2671
  return {
2700
- index: n,
2672
+ index: r,
2701
2673
  column: t,
2702
- value: r,
2674
+ value: n,
2703
2675
  variantName: S,
2704
2676
  optionValues: v,
2705
- optionLabel: C,
2677
+ optionLabel: E,
2706
2678
  cellDisplay: i,
2707
2679
  onValueChange: a,
2708
2680
  onBlur: o
2709
2681
  };
2710
2682
  }, j = (t, n, r, i) => {
2711
- let a = A(t, n, r), o = h?.(e, a);
2683
+ let a = A(t, n, r), o = m?.(e, a);
2712
2684
  return o === void 0 ? i(a) : o;
2713
- }, M = u !== "none" && v.length > 0 && (q ? !te : u === "tags" || !te), N = u === "none" ? null : p?.(e, {
2714
- optionGroups: o,
2685
+ }, N = u !== "none" && v.length > 0 && (Y ? !k : u === "tags" || !k), P = u === "none" ? null : p?.(e, {
2686
+ optionGroups: t,
2715
2687
  optionValues: v,
2716
- optionLabel: C,
2688
+ optionLabel: E,
2717
2689
  display: u
2718
- }), P = [
2719
- ...w ? [{
2690
+ }), F = [
2691
+ ...C ? [{
2720
2692
  id: "view",
2721
- label: B.viewLabel,
2722
- icon: /* @__PURE__ */ L(me, { className: "size-icon-md" }),
2723
- onClick: () => w(e),
2693
+ label: z.viewLabel,
2694
+ icon: /* @__PURE__ */ V(he, { className: "size-icon-md" }),
2695
+ onClick: () => C(e),
2724
2696
  tone: "secondary",
2725
2697
  buttonStyle: "ghost"
2726
2698
  }] : [],
2727
- ...T ? [{
2699
+ ...w ? [{
2728
2700
  id: "edit",
2729
- label: B.editLabel,
2730
- icon: /* @__PURE__ */ L(V, { className: "size-icon-md" }),
2731
- onClick: () => T(e),
2701
+ label: z.editLabel,
2702
+ icon: /* @__PURE__ */ V(W, { className: "size-icon-md" }),
2703
+ onClick: () => w(e),
2732
2704
  tone: "secondary",
2733
2705
  buttonStyle: "ghost"
2734
2706
  }] : [],
2735
- ...E ? [{
2707
+ ...D ? [{
2736
2708
  id: "duplicate",
2737
- label: B.duplicateLabel,
2738
- icon: /* @__PURE__ */ L(pe, { className: "size-icon-md" }),
2739
- onClick: () => E(e),
2709
+ label: z.duplicateLabel,
2710
+ icon: /* @__PURE__ */ V(me, { className: "size-icon-md" }),
2711
+ onClick: () => D(e),
2740
2712
  tone: "secondary",
2741
2713
  buttonStyle: "ghost"
2742
2714
  }] : [],
2743
- ...D ? [{
2715
+ ...O ? [{
2744
2716
  id: "delete",
2745
- label: B.deleteLabel,
2746
- icon: /* @__PURE__ */ L(K, { className: "size-icon-md" }),
2747
- onClick: () => D(e),
2717
+ label: z.deleteLabel,
2718
+ icon: /* @__PURE__ */ V(q, { className: "size-icon-md" }),
2719
+ onClick: () => O(e),
2748
2720
  tone: "destructive"
2749
2721
  }] : []
2750
2722
  ];
2751
- return /* @__PURE__ */ R(ae, { children: [l && /* @__PURE__ */ L(O, {
2723
+ return /* @__PURE__ */ H(le, { children: [c && /* @__PURE__ */ V(ee, {
2752
2724
  className: "product-variants-bulk-table--group-row border-b border-border/70 bg-muted/30",
2753
- children: /* @__PURE__ */ L(k, {
2754
- colSpan: De,
2725
+ children: /* @__PURE__ */ V(I, {
2726
+ colSpan: X,
2755
2727
  className: "px-space-lg py-space-md align-middle",
2756
- children: /* @__PURE__ */ R(s, {
2728
+ children: /* @__PURE__ */ H(l, {
2757
2729
  direction: "horizontal",
2758
2730
  gap: "sm",
2759
2731
  wrap: !1,
2760
- children: [/* @__PURE__ */ L(i, {
2732
+ children: [/* @__PURE__ */ V(o, {
2761
2733
  tag: "span",
2762
2734
  weight: "semibold",
2763
2735
  className: "min-w-0 whitespace-normal break-words",
2764
- children: r
2765
- }), /* @__PURE__ */ L(i, {
2736
+ children: i
2737
+ }), /* @__PURE__ */ V(o, {
2766
2738
  tag: "span",
2767
2739
  size: "xs",
2768
2740
  type: "secondary",
2769
2741
  className: "whitespace-nowrap",
2770
- children: B.groupCountLabel(Te.get(r ?? "") ?? 0)
2742
+ children: z.groupCountLabel(Se.get(i ?? "") ?? 0)
2771
2743
  })]
2772
2744
  })
2773
2745
  })
2774
- }), /* @__PURE__ */ R(O, {
2746
+ }), /* @__PURE__ */ H(ee, {
2775
2747
  className: "h-20 border-b border-border/70 last:border-b-0",
2776
2748
  children: [
2777
- U && /* @__PURE__ */ L(k, {
2749
+ U && /* @__PURE__ */ V(I, {
2778
2750
  className: "w-14 min-w-14 max-w-14 px-0 py-space-lg text-center align-middle",
2779
2751
  style: { width: "3.5rem" },
2780
- children: /* @__PURE__ */ L(b, {
2752
+ children: /* @__PURE__ */ V(T, {
2781
2753
  checked: f,
2782
2754
  onCheckedChange: (t) => ke(e, t),
2783
- "aria-label": B.selectRowLabel(n),
2755
+ "aria-label": z.selectRowLabel(r),
2784
2756
  className: "mx-auto"
2785
2757
  })
2786
2758
  }),
2787
- G.has("variant") && /* @__PURE__ */ L(k, {
2759
+ J.has("variant") && /* @__PURE__ */ V(I, {
2788
2760
  className: "px-space-lg py-space-lg align-middle",
2789
- children: j("variant", S, bt, () => /* @__PURE__ */ R(s, {
2761
+ children: j("variant", S, xt, () => /* @__PURE__ */ H(l, {
2790
2762
  gap: "xs",
2791
2763
  children: [
2792
- /* @__PURE__ */ L(i, {
2764
+ /* @__PURE__ */ V(o, {
2793
2765
  weight: "medium",
2794
2766
  className: "min-w-0 whitespace-normal break-words",
2795
2767
  children: S
2796
2768
  }),
2797
- N,
2798
- !N && M && u === "text" && /* @__PURE__ */ L(i, {
2769
+ P,
2770
+ !P && N && u === "text" && /* @__PURE__ */ V(o, {
2799
2771
  size: "xs",
2800
2772
  type: "secondary",
2801
2773
  className: "min-w-0 whitespace-normal break-words",
2802
- children: v.map((t, n) => /* @__PURE__ */ R("span", { children: [n > 0 ? " / " : null, t] }, `${e.id}-option-text-${n}`))
2774
+ children: v.map((t, n) => /* @__PURE__ */ H("span", { children: [n > 0 ? " / " : null, t] }, `${e.id}-option-text-${n}`))
2803
2775
  }),
2804
- !N && M && u === "tags" && /* @__PURE__ */ L(s, {
2776
+ !P && N && u === "tags" && /* @__PURE__ */ V(l, {
2805
2777
  direction: "horizontal",
2806
2778
  gap: "xs",
2807
- children: v.map((t, n) => /* @__PURE__ */ L(m, {
2779
+ children: v.map((t, n) => /* @__PURE__ */ V(_, {
2808
2780
  size: "sm",
2809
2781
  tone: "secondary",
2810
2782
  className: "max-w-full",
@@ -2814,42 +2786,38 @@ function Ft({ variants: e = [], optionGroups: o = [], groupByOptionId: c, visibl
2814
2786
  ]
2815
2787
  }))
2816
2788
  }),
2817
- G.has("sku") && /* @__PURE__ */ L(k, {
2789
+ J.has("sku") && /* @__PURE__ */ V(I, {
2818
2790
  className: "px-space-lg py-space-md align-middle",
2819
- children: j("sku", e.sku, Mt(d, "sku"), (t) => Pt(e.sku, `${B.headers.sku}: ${St(S)}`, t.cellDisplay, t.onValueChange, t.onBlur))
2791
+ children: j("sku", e.sku, Nt(d, "sku"), (t) => Ft(e.sku, `${z.headers.sku}: ${Ct(S)}`, t.cellDisplay, t.onValueChange, t.onBlur))
2820
2792
  }),
2821
- G.has("price") && /* @__PURE__ */ L(k, {
2793
+ J.has("price") && /* @__PURE__ */ V(I, {
2822
2794
  className: "px-space-lg py-space-md align-middle",
2823
- children: j("price", e.price, Mt(d, "price"), (t) => Pt(e.price, `${B.headers.price}: ${St(S)}`, t.cellDisplay, t.onValueChange, t.onBlur))
2795
+ children: j("price", e.price, Nt(d, "price"), (t) => Ft(e.price, `${z.headers.price}: ${Ct(S)}`, t.cellDisplay, t.onValueChange, t.onBlur))
2824
2796
  }),
2825
- G.has("inventory") && /* @__PURE__ */ L(k, {
2797
+ J.has("inventory") && /* @__PURE__ */ V(I, {
2826
2798
  className: "px-space-lg py-space-md align-middle",
2827
- children: j("inventory", e.inventory, Mt(d, "inventory"), (t) => Pt(e.inventory, `${B.headers.inventory}: ${St(S)}`, t.cellDisplay, t.onValueChange, t.onBlur))
2799
+ children: j("inventory", e.inventory, Nt(d, "inventory"), (t) => Ft(e.inventory, `${z.headers.inventory}: ${Ct(S)}`, t.cellDisplay, t.onValueChange, t.onBlur))
2828
2800
  }),
2829
- G.has("status") && /* @__PURE__ */ L(k, {
2801
+ J.has("status") && /* @__PURE__ */ V(I, {
2830
2802
  className: "px-space-lg py-space-lg align-middle",
2831
- children: j("status", e.status, bt, () => e.status ? /* @__PURE__ */ L(m, {
2803
+ children: j("status", e.status, xt, () => e.status ? /* @__PURE__ */ V(_, {
2832
2804
  tone: e.statusTone ?? "secondary",
2833
2805
  children: e.status
2834
- }) : /* @__PURE__ */ L(i, {
2806
+ }) : /* @__PURE__ */ V(o, {
2835
2807
  type: "secondary",
2836
2808
  children: "-"
2837
2809
  }))
2838
2810
  }),
2839
- G.has("updated") && /* @__PURE__ */ L(k, {
2811
+ J.has("updated") && /* @__PURE__ */ V(I, {
2840
2812
  className: "px-space-lg py-space-lg align-middle",
2841
- children: j("updated", e.updatedAt, bt, () => /* @__PURE__ */ L(i, {
2842
- size: "xs",
2843
- type: "secondary",
2844
- children: kt(e.updatedAt)
2845
- }))
2813
+ children: j("updated", e.updatedAt, xt, () => Ft(e.updatedAt, `${z.headers.updated}: ${Ct(S)}`, "text"))
2846
2814
  }),
2847
- Z && /* @__PURE__ */ L(k, {
2815
+ Ee && /* @__PURE__ */ V(I, {
2848
2816
  className: "px-space-lg py-space-lg text-right align-middle",
2849
- children: re ? re(e, g) : /* @__PURE__ */ L(Ve, {
2817
+ children: M ? M(e, h) : /* @__PURE__ */ V(ze, {
2850
2818
  item: e,
2851
- actions: P,
2852
- menuLabel: B.headers.actions
2819
+ actions: F,
2820
+ menuLabel: z.headers.actions
2853
2821
  })
2854
2822
  })
2855
2823
  ]
@@ -2859,219 +2827,219 @@ function Ft({ variants: e = [], optionGroups: o = [], groupByOptionId: c, visibl
2859
2827
  })
2860
2828
  })]
2861
2829
  });
2862
- return de === "embedded" ? /* @__PURE__ */ L("section", {
2863
- "aria-label": B.title,
2864
- className: n("product-variants-bulk-table--component min-w-0", fe),
2865
- children: Fe
2866
- }) : /* @__PURE__ */ L(_, {
2867
- icon: /* @__PURE__ */ L(_e, { className: "size-icon" }),
2868
- title: B.title,
2869
- description: B.description,
2870
- actions: oe,
2871
- headerAction: Ne,
2872
- headerEnd: ce,
2873
- footerSlot: le,
2874
- contentClassName: "mt-1",
2875
- className: n("product-variants-bulk-table--component w-full", fe),
2876
- children: Fe
2830
+ return se === "embedded" ? /* @__PURE__ */ V("section", {
2831
+ "aria-label": z.title,
2832
+ className: i("product-variants-bulk-table--component min-w-0", L),
2833
+ children: Ne
2834
+ }) : /* @__PURE__ */ V(E, {
2835
+ title: z.title,
2836
+ description: z.description,
2837
+ actions: P,
2838
+ headerAction: je,
2839
+ headerEnd: F,
2840
+ footerSlot: ae,
2841
+ className: i("product-variants-bulk-table--component w-full", L),
2842
+ children: Ne
2877
2843
  });
2878
2844
  }
2879
- Ft.displayName = "ProductVariantsBulkTable";
2845
+ It.displayName = "ProductVariantsBulkTable";
2880
2846
  //#endregion
2881
2847
  //#region src/components/features/products/components/product-variants-manager.tsx
2882
- function It({ optionGroups: e = [], variants: a = [], visibleColumns: o, optionCombinationDisplay: c, cellDisplay: l, selectionMode: u, renderOptionCombination: d, renderCell: f, selectedVariantIds: p, defaultSelectedVariantIds: m, onSelectedVariantIdsChange: h, onVariantFieldChange: g, onVariantFieldBlur: v, collapsedOptionIds: ee, defaultCollapsedOptionIds: b, onCollapsedOptionIdsChange: x, editingOptionId: S, defaultEditingOptionId: C, onEditingOptionIdChange: w, onCreateOption: T, onEditOption: E, onDeleteOption: D, onAddValue: O, onDeleteValue: k, onOptionNameChange: te, onValueLabelChange: A, onDoneEditingOption: j, onSaveEditingOption: M, onCancelEditingOption: N, onToggleUsedForVariants: P, renderOptionActions: ne, renderValue: re, onCreateVariant: ie, onGenerateVariants: ae, onSelectVariant: oe, onEditVariant: ce, onDuplicateVariant: le, onDeleteVariant: ue, onBulkEdit: de, onBulkApply: fe, onBulkDelete: z, renderVariantActions: pe, renderBulkActions: me, groupByOptionId: B, defaultGroupByOptionId: he, onGroupByOptionIdChange: ge, onSearchVariants: _e, onFilterVariants: ye, controlsEnd: V, actions: U, headerEnd: be, footerSlot: Se, className: Ce, strings: G, optionsStrings: K, variantsStrings: q }) {
2883
- let J = t(je, G), we = I(() => e.filter((e) => e.usedForVariants !== !1), [e]), Te = we[0]?.id ?? null, Y = B !== void 0, [Ee, X] = se(he ?? Te), Z = B ?? Ee ?? Te, De = I(() => we.map((e) => ({
2848
+ function Lt({ optionGroups: n = [], variants: a = [], visibleColumns: c, optionCombinationDisplay: d, cellDisplay: f, selectionMode: p, renderOptionCombination: m, renderCell: h, selectedVariantIds: g, defaultSelectedVariantIds: _, onSelectedVariantIdsChange: v, onVariantFieldChange: y, onVariantFieldBlur: b, collapsedOptionIds: x, defaultCollapsedOptionIds: S, onCollapsedOptionIdsChange: w, editingOptionId: T, defaultEditingOptionId: E, onEditingOptionIdChange: k, onCreateOption: A, onEditOption: j, onDeleteOption: M, onAddValue: N, onDeleteValue: P, onOptionNameChange: F, onValueLabelChange: ee, onDoneEditingOption: I, onSaveEditingOption: te, onCancelEditingOption: ne, onToggleUsedForVariants: re, renderOptionActions: ie, renderValue: ae, onCreateVariant: oe, onGenerateVariants: se, onSelectVariant: L, onEditVariant: ce, onDuplicateVariant: le, onDeleteVariant: z, onBulkEdit: de, onBulkApply: fe, onBulkDelete: pe, renderVariantActions: me, renderBulkActions: he, groupByOptionId: ge, defaultGroupByOptionId: W, onGroupByOptionIdChange: _e, onSearchVariants: K, onFilterVariants: q, controlsEnd: ye, actions: J, headerEnd: Y, footerSlot: be, surface: xe = "flat", padding: Se = xe === "flat" ? "none" : "md", headerDivider: Ce = xe !== "flat" && void 0, footerDivider: we = xe !== "flat" && void 0, className: Te, strings: Ee, optionsStrings: X, variantsStrings: Z }) {
2849
+ let { defaultScale: De } = t(), ke = e(void 0, De), Q = r(Oe, Ee), Ae = B(() => n.filter((e) => e.usedForVariants !== !1), [n]), je = Ae[0]?.id ?? null, $ = ge !== void 0, [Me, Ne] = ue(W ?? je), Pe = ge ?? Me ?? je, Fe = B(() => Ae.map((e) => ({
2884
2850
  value: e.id,
2885
2851
  label: String(typeof e.name == "string" || typeof e.name == "number" ? e.name : e.id)
2886
- })), [we]), Q = F((t) => {
2887
- let n = e.find((e) => e.id === t);
2888
- Y || X(t ?? null), ge?.(t, n);
2852
+ })), [Ae]), Ie = R((e) => {
2853
+ let t = n.find((t) => t.id === e);
2854
+ $ || Ne(e ?? null), _e?.(e, t);
2889
2855
  }, [
2890
- Y,
2891
- ge,
2892
- e
2893
- ]), Oe = ae || ie ? /* @__PURE__ */ R(s, {
2856
+ $,
2857
+ _e,
2858
+ n
2859
+ ]), Le = se || oe ? /* @__PURE__ */ H(l, {
2894
2860
  direction: "horizontal",
2895
2861
  gap: "sm",
2896
2862
  justify: "end",
2897
2863
  className: "product-variants-manager--header-actions",
2898
- children: [!!ae && /* @__PURE__ */ L(r, {
2864
+ children: [!!se && /* @__PURE__ */ V(s, {
2899
2865
  type: "button",
2900
2866
  tone: "secondary",
2901
2867
  buttonStyle: "outline",
2902
- onClick: ae,
2903
- icon: xe,
2904
- children: J.generateLabel
2905
- }), !!ie && /* @__PURE__ */ L(r, {
2868
+ onClick: se,
2869
+ children: Q.generateLabel
2870
+ }), !!oe && /* @__PURE__ */ V(s, {
2906
2871
  type: "button",
2907
2872
  tone: "secondary",
2908
2873
  buttonStyle: "outline",
2909
- onClick: ie,
2910
- icon: H,
2911
- children: J.createVariantLabel
2874
+ onClick: oe,
2875
+ icon: G,
2876
+ children: Q.createVariantLabel
2912
2877
  })]
2913
2878
  }) : void 0;
2914
- return /* @__PURE__ */ L(_, {
2915
- title: J.title,
2916
- description: J.description,
2917
- actions: U,
2918
- actionsLabel: J.actionsLabel,
2919
- headerAction: Oe,
2920
- headerEnd: be,
2921
- footerSlot: Se,
2922
- contentClassName: "mt-1 px-0 pb-0",
2923
- className: n("product-variants-manager--component w-full", Ce),
2924
- children: /* @__PURE__ */ R(s, {
2925
- gap: "none",
2879
+ return /* @__PURE__ */ V(u, {
2880
+ surface: xe,
2881
+ padding: Se,
2882
+ headerDivider: Ce,
2883
+ footerDivider: we,
2884
+ title: Q.title,
2885
+ description: Q.description,
2886
+ actions: J,
2887
+ actionsLabel: Q.actionsLabel,
2888
+ headerAction: Le,
2889
+ headerEnd: Y,
2890
+ footerSlot: be,
2891
+ className: i("product-variants-manager--component w-full", Te),
2892
+ children: /* @__PURE__ */ H(l, {
2893
+ gap: "2xl",
2926
2894
  className: "product-variants-manager--body",
2927
- children: [
2928
- /* @__PURE__ */ L("section", {
2929
- className: "product-variants-manager--options min-w-0 px-surface pb-space-lg",
2930
- children: /* @__PURE__ */ L(nt, {
2931
- optionGroups: e,
2932
- collapsedOptionIds: ee,
2933
- defaultCollapsedOptionIds: b,
2934
- onCollapsedOptionIdsChange: x,
2935
- editingOptionId: S,
2936
- defaultEditingOptionId: C,
2937
- onEditingOptionIdChange: w,
2938
- surface: "embedded",
2939
- onCreateOption: T,
2940
- onEditOption: E,
2941
- onDeleteOption: D,
2942
- onAddValue: O,
2943
- onDeleteValue: k,
2944
- onOptionNameChange: te,
2945
- onValueLabelChange: A,
2946
- onDoneEditingOption: j,
2947
- onSaveEditingOption: M,
2948
- onCancelEditingOption: N,
2949
- onToggleUsedForVariants: P,
2950
- renderOptionActions: ne,
2951
- renderValue: re,
2952
- showHeader: !1,
2953
- showCollapseControls: !1,
2954
- showInlineActions: !1,
2955
- showVariantToggle: !1,
2956
- strings: {
2957
- title: J.optionsTitle,
2958
- ...K
2959
- }
2960
- })
2961
- }),
2962
- /* @__PURE__ */ L("div", {
2963
- className: "product-variants-manager--controls border-t border-border/70 px-surface py-space-md",
2964
- children: /* @__PURE__ */ R(s, {
2895
+ children: [/* @__PURE__ */ V("section", {
2896
+ className: "product-variants-manager--options min-w-0",
2897
+ children: /* @__PURE__ */ V(rt, {
2898
+ optionGroups: n,
2899
+ collapsedOptionIds: x,
2900
+ defaultCollapsedOptionIds: S,
2901
+ onCollapsedOptionIdsChange: w,
2902
+ editingOptionId: T,
2903
+ defaultEditingOptionId: E,
2904
+ onEditingOptionIdChange: k,
2905
+ surface: "embedded",
2906
+ onCreateOption: A,
2907
+ onEditOption: j,
2908
+ onDeleteOption: M,
2909
+ onAddValue: N,
2910
+ onDeleteValue: P,
2911
+ onOptionNameChange: F,
2912
+ onValueLabelChange: ee,
2913
+ onDoneEditingOption: I,
2914
+ onSaveEditingOption: te,
2915
+ onCancelEditingOption: ne,
2916
+ onToggleUsedForVariants: re,
2917
+ renderOptionActions: ie,
2918
+ renderValue: ae,
2919
+ showHeader: !1,
2920
+ showCollapseControls: !1,
2921
+ showInlineActions: !1,
2922
+ showVariantToggle: !1,
2923
+ strings: {
2924
+ title: Q.optionsTitle,
2925
+ ...X
2926
+ }
2927
+ })
2928
+ }), /* @__PURE__ */ H(l, {
2929
+ gap: "md",
2930
+ className: "product-variants-manager--variants-region",
2931
+ children: [/* @__PURE__ */ V("div", {
2932
+ className: "product-variants-manager--controls",
2933
+ children: /* @__PURE__ */ H(l, {
2965
2934
  direction: "horizontal",
2966
2935
  gap: "md",
2967
2936
  justify: "between",
2968
- children: [/* @__PURE__ */ R(s, {
2937
+ children: [/* @__PURE__ */ H(l, {
2969
2938
  direction: "horizontal",
2970
2939
  gap: "sm",
2971
2940
  wrap: !1,
2972
2941
  className: "product-variants-manager--group-by",
2973
- children: [/* @__PURE__ */ L(i, {
2942
+ children: [/* @__PURE__ */ V(o, {
2974
2943
  type: "secondary",
2975
2944
  className: "whitespace-nowrap",
2976
- children: J.groupByLabel
2977
- }), De.length > 0 && /* @__PURE__ */ L(y, {
2978
- options: De,
2979
- value: Z,
2980
- onValueChange: Q,
2981
- "aria-label": J.groupByLabel,
2945
+ children: Q.groupByLabel
2946
+ }), Fe.length > 0 && /* @__PURE__ */ V(C, {
2947
+ options: Fe,
2948
+ value: Pe,
2949
+ onValueChange: Ie,
2950
+ "aria-label": Q.groupByLabel,
2982
2951
  className: "min-w-32 bg-background"
2983
2952
  })]
2984
- }), /* @__PURE__ */ R(s, {
2953
+ }), /* @__PURE__ */ H(l, {
2985
2954
  direction: "horizontal",
2986
2955
  gap: "sm",
2987
2956
  justify: "end",
2988
2957
  wrap: !1,
2989
2958
  className: "product-variants-manager--controls-end",
2990
- children: [/* @__PURE__ */ R("div", {
2991
- className: "product-variants-manager--tool-buttons inline-flex overflow-hidden rounded-radius border border-border bg-background shadow-xs",
2992
- children: [/* @__PURE__ */ R(r, {
2959
+ children: [/* @__PURE__ */ H("div", {
2960
+ className: i("product-variants-manager--tool-buttons bg-background shadow-xs", D.joinedFrame, O[ke]),
2961
+ children: [/* @__PURE__ */ H(s, {
2993
2962
  type: "button",
2994
2963
  size: "sm",
2995
2964
  iconOnly: !0,
2996
2965
  tone: "secondary",
2997
2966
  buttonStyle: "ghost",
2998
- onClick: _e,
2999
- "aria-label": J.searchLabel,
3000
- className: "rounded-none border-r border-border text-muted-foreground hover:text-foreground",
3001
- children: [/* @__PURE__ */ L(W, {
2967
+ onClick: K,
2968
+ "aria-label": Q.searchLabel,
2969
+ className: i(D.joinedItem, D.firstItem, "border-r border-border text-muted-foreground hover:text-foreground"),
2970
+ children: [/* @__PURE__ */ V(ve, {
3002
2971
  className: "size-icon-sm",
3003
2972
  "aria-hidden": "true"
3004
- }), /* @__PURE__ */ L(i, {
2973
+ }), /* @__PURE__ */ V(o, {
3005
2974
  tag: "span",
3006
2975
  size: "pxs",
3007
2976
  className: "sr-only",
3008
- children: J.searchLabel
2977
+ children: Q.searchLabel
3009
2978
  })]
3010
- }), /* @__PURE__ */ R(r, {
2979
+ }), /* @__PURE__ */ H(s, {
3011
2980
  type: "button",
3012
2981
  size: "sm",
3013
2982
  iconOnly: !0,
3014
2983
  tone: "secondary",
3015
2984
  buttonStyle: "ghost",
3016
- onClick: ye,
3017
- "aria-label": J.filterLabel,
3018
- className: "rounded-none text-muted-foreground hover:text-foreground",
3019
- children: [/* @__PURE__ */ L(ve, {
2985
+ onClick: q,
2986
+ "aria-label": Q.filterLabel,
2987
+ className: i(D.joinedItem, D.lastItem, "text-muted-foreground hover:text-foreground"),
2988
+ children: [/* @__PURE__ */ V(U, {
3020
2989
  className: "size-icon-sm",
3021
2990
  "aria-hidden": "true"
3022
- }), /* @__PURE__ */ L(i, {
2991
+ }), /* @__PURE__ */ V(o, {
3023
2992
  tag: "span",
3024
2993
  size: "pxs",
3025
2994
  className: "sr-only",
3026
- children: J.filterLabel
2995
+ children: Q.filterLabel
3027
2996
  })]
3028
2997
  })]
3029
- }), V]
2998
+ }), ye]
3030
2999
  })]
3031
3000
  })
3032
- }),
3033
- /* @__PURE__ */ L("section", {
3034
- className: "product-variants-manager--variants min-w-0 px-surface pb-surface pt-space-md",
3035
- children: /* @__PURE__ */ L(Ft, {
3001
+ }), /* @__PURE__ */ V("section", {
3002
+ className: "product-variants-manager--variants min-w-0",
3003
+ children: /* @__PURE__ */ V(It, {
3036
3004
  variants: a,
3037
- optionGroups: e,
3038
- groupByOptionId: Z,
3039
- visibleColumns: o,
3040
- optionCombinationDisplay: c,
3041
- cellDisplay: l,
3042
- selectionMode: u,
3043
- renderOptionCombination: d,
3044
- renderCell: f,
3005
+ optionGroups: n,
3006
+ groupByOptionId: Pe,
3007
+ visibleColumns: c,
3008
+ optionCombinationDisplay: d,
3009
+ cellDisplay: f,
3010
+ selectionMode: p,
3011
+ renderOptionCombination: m,
3012
+ renderCell: h,
3045
3013
  surface: "embedded",
3046
- selectedVariantIds: p,
3047
- defaultSelectedVariantIds: m,
3048
- onSelectedVariantIdsChange: h,
3049
- onVariantFieldChange: g,
3050
- onVariantFieldBlur: v,
3051
- onCreateVariant: ie,
3052
- onGenerateVariants: ae,
3053
- onSelectVariant: oe,
3014
+ selectedVariantIds: g,
3015
+ defaultSelectedVariantIds: _,
3016
+ onSelectedVariantIdsChange: v,
3017
+ onVariantFieldChange: y,
3018
+ onVariantFieldBlur: b,
3019
+ onCreateVariant: oe,
3020
+ onGenerateVariants: se,
3021
+ onSelectVariant: L,
3054
3022
  onEditVariant: ce,
3055
3023
  onDuplicateVariant: le,
3056
- onDeleteVariant: ue,
3024
+ onDeleteVariant: z,
3057
3025
  onBulkEdit: de,
3058
3026
  onBulkApply: fe,
3059
- onBulkDelete: z,
3060
- renderVariantActions: pe,
3061
- renderBulkActions: me,
3027
+ onBulkDelete: pe,
3028
+ renderVariantActions: me,
3029
+ renderBulkActions: he,
3062
3030
  strings: {
3063
- title: J.variantsTitle,
3064
- generateLabel: J.generateLabel,
3065
- ...q
3031
+ title: Q.variantsTitle,
3032
+ generateLabel: Q.generateLabel,
3033
+ ...Z
3066
3034
  }
3067
3035
  })
3068
- })
3069
- ]
3036
+ })]
3037
+ })]
3070
3038
  })
3071
3039
  });
3072
3040
  }
3073
- It.displayName = "ProductVariantsManager";
3041
+ Lt.displayName = "ProductVariantsManager";
3074
3042
  //#endregion
3075
- export { Je as ProductContractOverview, Ye as ProductDetailsCard, Ze as ProductOperationsCard, Xe as ProductOptionActionMenu, nt as ProductOptionsMatrix, rt as ProductOptionsSummary, dt as ProductOverview, it as ProductPoliciesCard, at as ProductQuotePreviewCard, ot as ProductReadinessCard, st as ProductStructureCard, ft as ProductVariantActionMenu, ht as ProductVariantDetails, _t as ProductVariantEditor, Ft as ProductVariantsBulkTable, It as ProductVariantsManager, ut as ProductVariantsTable, Ee as defaultProductContractOverviewStrings, Y as defaultProductDetailsCardStrings, Te as defaultProductOperationsCardStrings, Z as defaultProductOptionActionMenuStrings, De as defaultProductOptionsMatrixStrings, X as defaultProductOptionsSummaryStrings, Fe as defaultProductOverviewStrings, Oe as defaultProductPoliciesCardStrings, Q as defaultProductQuotePreviewCardStrings, J as defaultProductReadinessCardStrings, we as defaultProductStructureCardStrings, Me as defaultProductVariantActionMenuStrings, Ne as defaultProductVariantDetailsStrings, Pe as defaultProductVariantEditorStrings, Ae as defaultProductVariantsBulkTableStrings, je as defaultProductVariantsManagerStrings, ke as defaultProductVariantsTableStrings };
3043
+ export { Ye as ProductContractOverview, Xe as ProductDetailsCard, Qe as ProductOperationsCard, Ze as ProductOptionActionMenu, rt as ProductOptionsMatrix, it as ProductOptionsSummary, ft as ProductOverview, at as ProductPoliciesCard, ot as ProductQuotePreviewCard, st as ProductReadinessCard, ct as ProductStructureCard, pt as ProductVariantActionMenu, gt as ProductVariantDetails, vt as ProductVariantEditor, It as ProductVariantsBulkTable, Lt as ProductVariantsManager, dt as ProductVariantsTable, Se as defaultProductContractOverviewStrings, xe as defaultProductDetailsCardStrings, be as defaultProductOperationsCardStrings, we as defaultProductOptionActionMenuStrings, Te as defaultProductOptionsMatrixStrings, Ce as defaultProductOptionsSummaryStrings, je as defaultProductOverviewStrings, X as defaultProductPoliciesCardStrings, Ee as defaultProductQuotePreviewCardStrings, J as defaultProductReadinessCardStrings, Y as defaultProductStructureCardStrings, ke as defaultProductVariantActionMenuStrings, Q as defaultProductVariantDetailsStrings, Ae as defaultProductVariantEditorStrings, De as defaultProductVariantsBulkTableStrings, Oe as defaultProductVariantsManagerStrings, Z as defaultProductVariantsTableStrings };
3076
3044
 
3077
3045
  //# sourceMappingURL=products.js.map