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