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