@open-mercato/core 0.5.1-develop.2949.009dcdd2d5 → 0.5.1-develop.2954.610bab2d08

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 (229) hide show
  1. package/dist/helpers/integration/salesUi.js +25 -23
  2. package/dist/helpers/integration/salesUi.js.map +2 -2
  3. package/dist/modules/api_docs/frontend/docs/api/Explorer.js +24 -24
  4. package/dist/modules/api_docs/frontend/docs/api/Explorer.js.map +2 -2
  5. package/dist/modules/attachments/components/AttachmentPartitionSettings.js +15 -7
  6. package/dist/modules/attachments/components/AttachmentPartitionSettings.js.map +2 -2
  7. package/dist/modules/attachments/fields/attachment.js +4 -6
  8. package/dist/modules/attachments/fields/attachment.js.map +2 -2
  9. package/dist/modules/auth/api/users/route.js +63 -23
  10. package/dist/modules/auth/api/users/route.js.map +2 -2
  11. package/dist/modules/auth/backend/users/create/page.js +26 -26
  12. package/dist/modules/auth/backend/users/create/page.js.map +2 -2
  13. package/dist/modules/business_rules/components/ActionRow.js +36 -25
  14. package/dist/modules/business_rules/components/ActionRow.js.map +2 -2
  15. package/dist/modules/business_rules/components/ConditionGroup.js +14 -5
  16. package/dist/modules/business_rules/components/ConditionGroup.js.map +2 -2
  17. package/dist/modules/business_rules/components/ConditionRow.js +19 -10
  18. package/dist/modules/business_rules/components/ConditionRow.js.map +2 -2
  19. package/dist/modules/business_rules/components/RuleSetMembers.js +16 -10
  20. package/dist/modules/business_rules/components/RuleSetMembers.js.map +2 -2
  21. package/dist/modules/catalog/backend/catalog/products/[id]/page.js +30 -34
  22. package/dist/modules/catalog/backend/catalog/products/[id]/page.js.map +2 -2
  23. package/dist/modules/catalog/backend/catalog/products/create/page.js +220 -223
  24. package/dist/modules/catalog/backend/catalog/products/create/page.js.map +2 -2
  25. package/dist/modules/catalog/components/PriceKindSettings.js +20 -19
  26. package/dist/modules/catalog/components/PriceKindSettings.js.map +2 -2
  27. package/dist/modules/catalog/components/products/ProductUomSection.js +42 -37
  28. package/dist/modules/catalog/components/products/ProductUomSection.js.map +2 -2
  29. package/dist/modules/catalog/components/products/VariantBuilder.js +22 -18
  30. package/dist/modules/catalog/components/products/VariantBuilder.js.map +2 -2
  31. package/dist/modules/customer_accounts/backend/customer_accounts/users/[id]/page.js +18 -26
  32. package/dist/modules/customer_accounts/backend/customer_accounts/users/[id]/page.js.map +2 -2
  33. package/dist/modules/customer_accounts/backend/customer_accounts/users/page.js +4 -6
  34. package/dist/modules/customer_accounts/backend/customer_accounts/users/page.js.map +2 -2
  35. package/dist/modules/customer_accounts/widgets/injection/account-status/widget.client.js +5 -4
  36. package/dist/modules/customer_accounts/widgets/injection/account-status/widget.client.js.map +2 -2
  37. package/dist/modules/customers/backend/config/customers/pipeline-stages/page.js +19 -7
  38. package/dist/modules/customers/backend/config/customers/pipeline-stages/page.js.map +2 -2
  39. package/dist/modules/customers/backend/customers/deals/pipeline/page.js +24 -21
  40. package/dist/modules/customers/backend/customers/deals/pipeline/page.js.map +2 -2
  41. package/dist/modules/customers/components/AddressEditor.js +24 -7
  42. package/dist/modules/customers/components/AddressEditor.js.map +2 -2
  43. package/dist/modules/customers/components/AddressFormatSettings.js +35 -25
  44. package/dist/modules/customers/components/AddressFormatSettings.js.map +2 -2
  45. package/dist/modules/customers/components/detail/ActivityForm.js +20 -12
  46. package/dist/modules/customers/components/detail/ActivityForm.js.map +2 -2
  47. package/dist/modules/customers/components/detail/AnnualRevenueField.js +2 -2
  48. package/dist/modules/customers/components/detail/AnnualRevenueField.js.map +2 -2
  49. package/dist/modules/customers/components/detail/DealForm.js +19 -14
  50. package/dist/modules/customers/components/detail/DealForm.js.map +2 -2
  51. package/dist/modules/customers/components/formConfig.js +16 -12
  52. package/dist/modules/customers/components/formConfig.js.map +2 -2
  53. package/dist/modules/customers/widgets/dashboard/customer-todos/widget.client.js +3 -2
  54. package/dist/modules/customers/widgets/dashboard/customer-todos/widget.client.js.map +2 -2
  55. package/dist/modules/customers/widgets/dashboard/new-customers/widget.client.js +18 -10
  56. package/dist/modules/customers/widgets/dashboard/new-customers/widget.client.js.map +2 -2
  57. package/dist/modules/customers/widgets/dashboard/new-deals/widget.client.js +3 -2
  58. package/dist/modules/customers/widgets/dashboard/new-deals/widget.client.js.map +2 -2
  59. package/dist/modules/customers/widgets/dashboard/next-interactions/widget.client.js +3 -2
  60. package/dist/modules/customers/widgets/dashboard/next-interactions/widget.client.js.map +2 -2
  61. package/dist/modules/dashboards/components/WidgetVisibilityEditor.js +27 -28
  62. package/dist/modules/dashboards/components/WidgetVisibilityEditor.js.map +2 -2
  63. package/dist/modules/dashboards/widgets/dashboard/orders-by-status/widget.client.js +14 -6
  64. package/dist/modules/dashboards/widgets/dashboard/orders-by-status/widget.client.js.map +2 -2
  65. package/dist/modules/dashboards/widgets/dashboard/revenue-trend/widget.client.js +14 -6
  66. package/dist/modules/dashboards/widgets/dashboard/revenue-trend/widget.client.js.map +2 -2
  67. package/dist/modules/dashboards/widgets/dashboard/sales-by-region/widget.client.js +3 -2
  68. package/dist/modules/dashboards/widgets/dashboard/sales-by-region/widget.client.js.map +2 -2
  69. package/dist/modules/dashboards/widgets/dashboard/top-customers/widget.client.js +3 -2
  70. package/dist/modules/dashboards/widgets/dashboard/top-customers/widget.client.js.map +2 -2
  71. package/dist/modules/dashboards/widgets/dashboard/top-products/widget.client.js +17 -8
  72. package/dist/modules/dashboards/widgets/dashboard/top-products/widget.client.js.map +2 -2
  73. package/dist/modules/data_sync/backend/data-sync/page.js +40 -23
  74. package/dist/modules/data_sync/backend/data-sync/page.js.map +2 -2
  75. package/dist/modules/data_sync/components/IntegrationScheduleTab.js +15 -6
  76. package/dist/modules/data_sync/components/IntegrationScheduleTab.js.map +2 -2
  77. package/dist/modules/dictionaries/components/AppearanceSelector.js +4 -4
  78. package/dist/modules/dictionaries/components/AppearanceSelector.js.map +2 -2
  79. package/dist/modules/dictionaries/components/DictionaryEntriesEditor.js +4 -5
  80. package/dist/modules/dictionaries/components/DictionaryEntriesEditor.js.map +2 -2
  81. package/dist/modules/dictionaries/components/DictionaryEntrySelect.js +22 -14
  82. package/dist/modules/dictionaries/components/DictionaryEntrySelect.js.map +2 -2
  83. package/dist/modules/dictionaries/fields/dictionary.js +18 -13
  84. package/dist/modules/dictionaries/fields/dictionary.js.map +2 -2
  85. package/dist/modules/entities/components/EncryptionManager.js +23 -19
  86. package/dist/modules/entities/components/EncryptionManager.js.map +2 -2
  87. package/dist/modules/feature_toggles/components/formConfig.js +17 -9
  88. package/dist/modules/feature_toggles/components/formConfig.js.map +2 -2
  89. package/dist/modules/feature_toggles/components/overrideFormConfig.js +17 -9
  90. package/dist/modules/feature_toggles/components/overrideFormConfig.js.map +2 -2
  91. package/dist/modules/inbox_ops/backend/inbox-ops/settings/page.js +15 -8
  92. package/dist/modules/inbox_ops/backend/inbox-ops/settings/page.js.map +2 -2
  93. package/dist/modules/inbox_ops/components/proposals/EditActionDialog.js +37 -22
  94. package/dist/modules/inbox_ops/components/proposals/EditActionDialog.js.map +2 -2
  95. package/dist/modules/integrations/backend/integrations/[id]/page.js +22 -17
  96. package/dist/modules/integrations/backend/integrations/[id]/page.js.map +2 -2
  97. package/dist/modules/integrations/backend/integrations/bundle/[id]/page.js +12 -6
  98. package/dist/modules/integrations/backend/integrations/bundle/[id]/page.js.map +2 -2
  99. package/dist/modules/planner/components/AvailabilityRulesEditor.js +19 -12
  100. package/dist/modules/planner/components/AvailabilityRulesEditor.js.map +2 -2
  101. package/dist/modules/resources/components/ResourceCrudForm.js +15 -10
  102. package/dist/modules/resources/components/ResourceCrudForm.js.map +3 -3
  103. package/dist/modules/sales/backend/sales/documents/[id]/page.js +15 -18
  104. package/dist/modules/sales/backend/sales/documents/[id]/page.js.map +2 -2
  105. package/dist/modules/sales/components/ProviderFieldInput.js +23 -20
  106. package/dist/modules/sales/components/ProviderFieldInput.js.map +2 -2
  107. package/dist/modules/sales/components/ShippingMethodsSettings.js +25 -17
  108. package/dist/modules/sales/components/ShippingMethodsSettings.js.map +3 -3
  109. package/dist/modules/sales/components/channels/ChannelOfferForm.js +35 -42
  110. package/dist/modules/sales/components/channels/ChannelOfferForm.js.map +2 -2
  111. package/dist/modules/sales/components/documents/AddressesSection.js +87 -90
  112. package/dist/modules/sales/components/documents/AddressesSection.js.map +2 -2
  113. package/dist/modules/sales/components/documents/AdjustmentDialog.js +17 -6
  114. package/dist/modules/sales/components/documents/AdjustmentDialog.js.map +3 -3
  115. package/dist/modules/sales/components/documents/LineItemDialog.js +42 -25
  116. package/dist/modules/sales/components/documents/LineItemDialog.js.map +2 -2
  117. package/dist/modules/sales/components/documents/SalesDocumentForm.js +96 -87
  118. package/dist/modules/sales/components/documents/SalesDocumentForm.js.map +2 -2
  119. package/dist/modules/sales/widgets/dashboard/new-orders/widget.client.js +20 -11
  120. package/dist/modules/sales/widgets/dashboard/new-orders/widget.client.js.map +2 -2
  121. package/dist/modules/sales/widgets/dashboard/new-quotes/widget.client.js +20 -11
  122. package/dist/modules/sales/widgets/dashboard/new-quotes/widget.client.js.map +2 -2
  123. package/dist/modules/shipping_carriers/lib/shipment-wizard/components/ConfigureStep.js +36 -22
  124. package/dist/modules/shipping_carriers/lib/shipment-wizard/components/ConfigureStep.js.map +2 -2
  125. package/dist/modules/staff/components/TeamMemberForm.js +14 -9
  126. package/dist/modules/staff/components/TeamMemberForm.js.map +3 -3
  127. package/dist/modules/workflows/backend/tasks/[id]/page.js +42 -21
  128. package/dist/modules/workflows/backend/tasks/[id]/page.js.map +2 -2
  129. package/dist/modules/workflows/components/ActivitiesEditor.js +14 -6
  130. package/dist/modules/workflows/components/ActivitiesEditor.js.map +3 -3
  131. package/dist/modules/workflows/components/DefinitionTriggersEditor.js +25 -17
  132. package/dist/modules/workflows/components/DefinitionTriggersEditor.js.map +3 -3
  133. package/dist/modules/workflows/components/EdgeEditDialog.js +48 -45
  134. package/dist/modules/workflows/components/EdgeEditDialog.js.map +2 -2
  135. package/dist/modules/workflows/components/NodeEditDialog.js +90 -90
  136. package/dist/modules/workflows/components/NodeEditDialog.js.map +2 -2
  137. package/dist/modules/workflows/components/StepsEditor.js +14 -6
  138. package/dist/modules/workflows/components/StepsEditor.js.map +3 -3
  139. package/dist/modules/workflows/components/TransitionsEditor.js +31 -26
  140. package/dist/modules/workflows/components/TransitionsEditor.js.map +3 -3
  141. package/dist/modules/workflows/components/fields/ActivityArrayEditor.js +19 -11
  142. package/dist/modules/workflows/components/fields/ActivityArrayEditor.js.map +3 -3
  143. package/dist/modules/workflows/components/fields/BusinessRuleConditionsEditor.js +12 -14
  144. package/dist/modules/workflows/components/fields/BusinessRuleConditionsEditor.js.map +2 -2
  145. package/dist/modules/workflows/components/fields/FormFieldArrayEditor.js +24 -16
  146. package/dist/modules/workflows/components/fields/FormFieldArrayEditor.js.map +3 -3
  147. package/dist/modules/workflows/components/fields/StartPreConditionsEditor.js +12 -13
  148. package/dist/modules/workflows/components/fields/StartPreConditionsEditor.js.map +2 -2
  149. package/dist/modules/workflows/components/mobile/MobileTaskForm.js +12 -8
  150. package/dist/modules/workflows/components/mobile/MobileTaskForm.js.map +2 -2
  151. package/dist/modules/workflows/frontend/checkout-demo/page.js +43 -46
  152. package/dist/modules/workflows/frontend/checkout-demo/page.js.map +2 -2
  153. package/package.json +3 -3
  154. package/src/helpers/integration/salesUi.ts +40 -30
  155. package/src/modules/api_docs/frontend/docs/api/Explorer.tsx +25 -19
  156. package/src/modules/attachments/components/AttachmentPartitionSettings.tsx +21 -11
  157. package/src/modules/attachments/fields/attachment.tsx +4 -6
  158. package/src/modules/auth/api/users/route.ts +75 -25
  159. package/src/modules/auth/backend/users/create/page.tsx +16 -20
  160. package/src/modules/business_rules/components/ActionRow.tsx +51 -32
  161. package/src/modules/business_rules/components/ConditionGroup.tsx +20 -9
  162. package/src/modules/business_rules/components/ConditionRow.tsx +24 -15
  163. package/src/modules/business_rules/components/RuleSetMembers.tsx +23 -13
  164. package/src/modules/catalog/backend/catalog/products/[id]/page.tsx +47 -53
  165. package/src/modules/catalog/backend/catalog/products/create/page.tsx +84 -87
  166. package/src/modules/catalog/components/PriceKindSettings.tsx +9 -9
  167. package/src/modules/catalog/components/products/ProductUomSection.tsx +85 -83
  168. package/src/modules/catalog/components/products/VariantBuilder.tsx +49 -33
  169. package/src/modules/customer_accounts/backend/customer_accounts/users/[id]/page.tsx +12 -27
  170. package/src/modules/customer_accounts/backend/customer_accounts/users/page.tsx +4 -6
  171. package/src/modules/customer_accounts/widgets/injection/account-status/widget.client.tsx +5 -4
  172. package/src/modules/customers/backend/config/customers/pipeline-stages/page.tsx +28 -15
  173. package/src/modules/customers/backend/customers/deals/pipeline/page.tsx +37 -26
  174. package/src/modules/customers/components/AddressEditor.tsx +30 -16
  175. package/src/modules/customers/components/AddressFormatSettings.tsx +25 -19
  176. package/src/modules/customers/components/detail/ActivityForm.tsx +35 -23
  177. package/src/modules/customers/components/detail/AnnualRevenueField.tsx +2 -2
  178. package/src/modules/customers/components/detail/DealForm.tsx +33 -20
  179. package/src/modules/customers/components/formConfig.tsx +25 -17
  180. package/src/modules/customers/widgets/dashboard/customer-todos/widget.client.tsx +3 -2
  181. package/src/modules/customers/widgets/dashboard/new-customers/widget.client.tsx +21 -11
  182. package/src/modules/customers/widgets/dashboard/new-deals/widget.client.tsx +3 -2
  183. package/src/modules/customers/widgets/dashboard/next-interactions/widget.client.tsx +3 -2
  184. package/src/modules/dashboards/components/WidgetVisibilityEditor.tsx +17 -22
  185. package/src/modules/dashboards/widgets/dashboard/orders-by-status/widget.client.tsx +17 -7
  186. package/src/modules/dashboards/widgets/dashboard/revenue-trend/widget.client.tsx +20 -10
  187. package/src/modules/dashboards/widgets/dashboard/sales-by-region/widget.client.tsx +3 -2
  188. package/src/modules/dashboards/widgets/dashboard/top-customers/widget.client.tsx +3 -2
  189. package/src/modules/dashboards/widgets/dashboard/top-products/widget.client.tsx +20 -9
  190. package/src/modules/data_sync/backend/data-sync/page.tsx +64 -38
  191. package/src/modules/data_sync/components/IntegrationScheduleTab.tsx +18 -7
  192. package/src/modules/dictionaries/components/AppearanceSelector.tsx +4 -4
  193. package/src/modules/dictionaries/components/DictionaryEntriesEditor.tsx +3 -4
  194. package/src/modules/dictionaries/components/DictionaryEntrySelect.tsx +27 -21
  195. package/src/modules/dictionaries/fields/dictionary.tsx +36 -23
  196. package/src/modules/entities/components/EncryptionManager.tsx +49 -33
  197. package/src/modules/feature_toggles/components/formConfig.tsx +20 -10
  198. package/src/modules/feature_toggles/components/overrideFormConfig.tsx +20 -10
  199. package/src/modules/inbox_ops/backend/inbox-ops/settings/page.tsx +19 -10
  200. package/src/modules/inbox_ops/components/proposals/EditActionDialog.tsx +49 -26
  201. package/src/modules/integrations/backend/integrations/[id]/page.tsx +20 -11
  202. package/src/modules/integrations/backend/integrations/bundle/[id]/page.tsx +19 -9
  203. package/src/modules/planner/components/AvailabilityRulesEditor.tsx +34 -21
  204. package/src/modules/resources/components/ResourceCrudForm.tsx +24 -15
  205. package/src/modules/sales/backend/sales/documents/[id]/page.tsx +12 -15
  206. package/src/modules/sales/components/ProviderFieldInput.tsx +26 -17
  207. package/src/modules/sales/components/ShippingMethodsSettings.tsx +28 -20
  208. package/src/modules/sales/components/channels/ChannelOfferForm.tsx +51 -46
  209. package/src/modules/sales/components/documents/AddressesSection.tsx +78 -76
  210. package/src/modules/sales/components/documents/AdjustmentDialog.tsx +27 -15
  211. package/src/modules/sales/components/documents/LineItemDialog.tsx +69 -51
  212. package/src/modules/sales/components/documents/SalesDocumentForm.tsx +98 -87
  213. package/src/modules/sales/widgets/dashboard/new-orders/widget.client.tsx +23 -12
  214. package/src/modules/sales/widgets/dashboard/new-quotes/widget.client.tsx +23 -12
  215. package/src/modules/shipping_carriers/lib/shipment-wizard/components/ConfigureStep.tsx +35 -19
  216. package/src/modules/staff/components/TeamMemberForm.tsx +23 -14
  217. package/src/modules/workflows/backend/tasks/[id]/page.tsx +51 -23
  218. package/src/modules/workflows/components/ActivitiesEditor.tsx +20 -10
  219. package/src/modules/workflows/components/DefinitionTriggersEditor.tsx +28 -18
  220. package/src/modules/workflows/components/EdgeEditDialog.tsx +51 -40
  221. package/src/modules/workflows/components/NodeEditDialog.tsx +81 -77
  222. package/src/modules/workflows/components/StepsEditor.tsx +20 -10
  223. package/src/modules/workflows/components/TransitionsEditor.tsx +61 -44
  224. package/src/modules/workflows/components/fields/ActivityArrayEditor.tsx +22 -12
  225. package/src/modules/workflows/components/fields/BusinessRuleConditionsEditor.tsx +9 -13
  226. package/src/modules/workflows/components/fields/FormFieldArrayEditor.tsx +27 -17
  227. package/src/modules/workflows/components/fields/StartPreConditionsEditor.tsx +9 -12
  228. package/src/modules/workflows/components/mobile/MobileTaskForm.tsx +19 -11
  229. package/src/modules/workflows/frontend/checkout-demo/page.tsx +71 -60
@@ -17,6 +17,14 @@ import { TagsInput } from "@open-mercato/ui/backend/inputs/TagsInput";
17
17
  import { Button } from "@open-mercato/ui/primitives/button";
18
18
  import { Input } from "@open-mercato/ui/primitives/input";
19
19
  import { Label } from "@open-mercato/ui/primitives/label";
20
+ import { RadioGroup, Radio } from "@open-mercato/ui/primitives/radio";
21
+ import {
22
+ Select,
23
+ SelectContent,
24
+ SelectItem,
25
+ SelectTrigger,
26
+ SelectValue,
27
+ } from "@open-mercato/ui/primitives/select";
20
28
  import { cn } from "@open-mercato/shared/lib/utils";
21
29
  import {
22
30
  Plus,
@@ -1551,6 +1559,12 @@ function ProductBuilder({
1551
1559
  ) : null}
1552
1560
 
1553
1561
  <div className="rounded-lg border">
1562
+ <RadioGroup
1563
+ className="contents"
1564
+ name="defaultVariant"
1565
+ value={(Array.isArray(values.variants) ? values.variants : []).find((v) => v.isDefault)?.id ?? ''}
1566
+ onValueChange={(next) => markDefaultVariant(next)}
1567
+ >
1554
1568
  <div className="w-full overflow-x-auto">
1555
1569
  <table className="w-full min-w-[900px] table-fixed border-collapse text-sm">
1556
1570
  <thead className="bg-muted/50">
@@ -1642,12 +1656,7 @@ function ProductBuilder({
1642
1656
  <tr key={variant.id} className="border-t">
1643
1657
  <td className="px-3 py-2">
1644
1658
  <label className="inline-flex items-center gap-1 text-xs">
1645
- <input
1646
- type="radio"
1647
- name="defaultVariant"
1648
- checked={variant.isDefault}
1649
- onChange={() => markDefaultVariant(variant.id)}
1650
- />
1659
+ <Radio value={variant.id} />
1651
1660
  {variant.isDefault
1652
1661
  ? t(
1653
1662
  "catalog.products.create.variantsBuilder.defaultLabel",
@@ -1697,35 +1706,36 @@ function ProductBuilder({
1697
1706
  />
1698
1707
  </td>
1699
1708
  <td className="px-3 py-2">
1700
- <select
1701
- className="flex h-9 w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
1702
- value={variant.taxRateId ?? ""}
1703
- onChange={(event) =>
1704
- setVariantField(
1705
- variant.id,
1706
- "taxRateId",
1707
- event.target.value || null,
1708
- )
1709
+ <Select
1710
+ value={variant.taxRateId || undefined}
1711
+ onValueChange={(value) =>
1712
+ setVariantField(variant.id, "taxRateId", value || null)
1709
1713
  }
1710
1714
  disabled={!taxRates.length}
1711
1715
  >
1712
- <option value="">
1713
- {defaultTaxRateLabel
1714
- ? t(
1715
- "catalog.products.create.variantsBuilder.vatOptionDefault",
1716
- "Use product tax class ({{label}})",
1717
- ).replace("{{label}}", defaultTaxRateLabel)
1718
- : t(
1719
- "catalog.products.create.variantsBuilder.vatOptionNone",
1720
- "No tax class",
1721
- )}
1722
- </option>
1723
- {taxRates.map((rate) => (
1724
- <option key={rate.id} value={rate.id}>
1725
- {formatTaxRateLabel(rate)}
1726
- </option>
1727
- ))}
1728
- </select>
1716
+ <SelectTrigger>
1717
+ <SelectValue
1718
+ placeholder={
1719
+ defaultTaxRateLabel
1720
+ ? t(
1721
+ "catalog.products.create.variantsBuilder.vatOptionDefault",
1722
+ "Use product tax class ({{label}})",
1723
+ ).replace("{{label}}", defaultTaxRateLabel)
1724
+ : t(
1725
+ "catalog.products.create.variantsBuilder.vatOptionNone",
1726
+ "No tax class",
1727
+ )
1728
+ }
1729
+ />
1730
+ </SelectTrigger>
1731
+ <SelectContent>
1732
+ {taxRates.map((rate) => (
1733
+ <SelectItem key={rate.id} value={rate.id}>
1734
+ {formatTaxRateLabel(rate)}
1735
+ </SelectItem>
1736
+ ))}
1737
+ </SelectContent>
1738
+ </Select>
1729
1739
  </td>
1730
1740
  {priceKinds.map((kind) => (
1731
1741
  <td key={kind.id} className="px-3 py-2">
@@ -1733,9 +1743,8 @@ function ProductBuilder({
1733
1743
  <span className="text-xs text-muted-foreground">
1734
1744
  {kind.currencyCode ?? "—"}
1735
1745
  </span>
1736
- <input
1746
+ <Input
1737
1747
  type="number"
1738
- className="w-full rounded-md border px-2 py-1"
1739
1748
  value={variant.prices?.[kind.id]?.amount ?? ""}
1740
1749
  onChange={(event) =>
1741
1750
  setVariantPrice(
@@ -1803,6 +1812,7 @@ function ProductBuilder({
1803
1812
  </tbody>
1804
1813
  </table>
1805
1814
  </div>
1815
+ </RadioGroup>
1806
1816
  {!priceKinds.length ? (
1807
1817
  <div className="flex items-center gap-2 border-t px-4 py-3 text-sm text-muted-foreground">
1808
1818
  <AlertCircle className="h-4 w-4" />
@@ -1964,44 +1974,34 @@ function ProductMetaSection({
1964
1974
  <Label>
1965
1975
  {t("catalog.products.form.productType", "Product type")}
1966
1976
  </Label>
1967
- <select
1968
- className="w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
1977
+ <Select
1969
1978
  value={values.productType || "simple"}
1970
- onChange={(event) => {
1971
- const nextType = event.target.value;
1979
+ onValueChange={(value) => {
1980
+ const nextType = value;
1972
1981
  setValue("productType", nextType);
1973
- const nextIsConfigurable =
1974
- isConfigurableProductType(nextType);
1982
+ const nextIsConfigurable = isConfigurableProductType(nextType);
1975
1983
  if (nextIsConfigurable && !values.hasVariants) {
1976
1984
  setValue("hasVariants", true);
1977
- } else if (
1978
- !nextIsConfigurable &&
1979
- values.hasVariants
1980
- ) {
1985
+ } else if (!nextIsConfigurable && values.hasVariants) {
1981
1986
  setValue("hasVariants", false);
1982
1987
  }
1983
1988
  }}
1984
1989
  >
1985
- {CATALOG_PRODUCT_TYPES.map((type) => {
1986
- const isDisabled =
1987
- type === "bundle" || type === "grouped";
1988
- return (
1989
- <option
1990
- key={type}
1991
- value={type}
1992
- disabled={isDisabled}
1993
- >
1994
- {t(
1995
- `catalog.products.types.${type}`,
1996
- type,
1997
- )}
1998
- {isDisabled
1999
- ? ` (${t("common.comingSoon", "Coming soon")})`
2000
- : ""}
2001
- </option>
2002
- );
2003
- })}
2004
- </select>
1990
+ <SelectTrigger>
1991
+ <SelectValue />
1992
+ </SelectTrigger>
1993
+ <SelectContent>
1994
+ {CATALOG_PRODUCT_TYPES.map((type) => {
1995
+ const isDisabled = type === "bundle" || type === "grouped";
1996
+ return (
1997
+ <SelectItem key={type} value={type} disabled={isDisabled}>
1998
+ {t(`catalog.products.types.${type}`, type)}
1999
+ {isDisabled ? ` (${t("common.comingSoon", "Coming soon")})` : ""}
2000
+ </SelectItem>
2001
+ );
2002
+ })}
2003
+ </SelectContent>
2004
+ </Select>
2005
2005
  {errors.productType ? (
2006
2006
  <p className="text-xs text-red-600">
2007
2007
  {errors.productType}
@@ -2042,31 +2042,28 @@ function ProductMetaSection({
2042
2042
  </span>
2043
2043
  </Button>
2044
2044
  </div>
2045
- <select
2046
- className="w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
2047
- value={values.taxRateId ?? ""}
2048
- onChange={(event) =>
2049
- setValue("taxRateId", event.target.value || null)
2050
- }
2045
+ <Select
2046
+ value={values.taxRateId || undefined}
2047
+ onValueChange={(value) => setValue("taxRateId", value || null)}
2051
2048
  disabled={!taxRates.length}
2052
2049
  >
2053
- <option value="">
2054
- {taxRates.length
2055
- ? t(
2056
- "catalog.products.create.taxRates.noneSelected",
2057
- "No tax class selected",
2058
- )
2059
- : t(
2060
- "catalog.products.create.taxRates.emptyOption",
2061
- "No tax classes available",
2062
- )}
2063
- </option>
2064
- {taxRates.map((rate) => (
2065
- <option key={rate.id} value={rate.id}>
2066
- {formatTaxRateLabel(rate)}
2067
- </option>
2068
- ))}
2069
- </select>
2050
+ <SelectTrigger>
2051
+ <SelectValue
2052
+ placeholder={
2053
+ taxRates.length
2054
+ ? t("catalog.products.create.taxRates.noneSelected", "No tax class selected")
2055
+ : t("catalog.products.create.taxRates.emptyOption", "No tax classes available")
2056
+ }
2057
+ />
2058
+ </SelectTrigger>
2059
+ <SelectContent>
2060
+ {taxRates.map((rate) => (
2061
+ <SelectItem key={rate.id} value={rate.id}>
2062
+ {formatTaxRateLabel(rate)}
2063
+ </SelectItem>
2064
+ ))}
2065
+ </SelectContent>
2066
+ </Select>
2070
2067
  <p className="text-xs text-muted-foreground">
2071
2068
  {taxRates.length
2072
2069
  ? t(
@@ -7,6 +7,7 @@ import { RowActions } from '@open-mercato/ui/backend/RowActions'
7
7
  import { Button } from '@open-mercato/ui/primitives/button'
8
8
  import { Input } from '@open-mercato/ui/primitives/input'
9
9
  import { Label } from '@open-mercato/ui/primitives/label'
10
+ import { RadioGroup, Radio } from '@open-mercato/ui/primitives/radio'
10
11
  import {
11
12
  Dialog,
12
13
  DialogContent,
@@ -480,7 +481,12 @@ export function PriceKindSettings() {
480
481
  </div>
481
482
  <div className="space-y-2">
482
483
  <Label>{t('catalog.priceKinds.form.displayModeLabel', 'Display mode')}</Label>
483
- <div className="grid gap-2 md:grid-cols-2">
484
+ <RadioGroup
485
+ className="grid gap-2 md:grid-cols-2"
486
+ name="displayMode"
487
+ value={form.displayMode}
488
+ onValueChange={(next) => setForm((prev) => ({ ...prev, displayMode: next as CatalogPriceDisplayMode }))}
489
+ >
484
490
  {displayModeOptions.map((mode) => (
485
491
  <label
486
492
  key={mode.value}
@@ -488,17 +494,11 @@ export function PriceKindSettings() {
488
494
  form.displayMode === mode.value ? 'border-primary bg-primary/5' : 'border-border'
489
495
  }`}
490
496
  >
491
- <input
492
- type="radio"
493
- name="displayMode"
494
- value={mode.value}
495
- checked={form.displayMode === mode.value}
496
- onChange={() => setForm((prev) => ({ ...prev, displayMode: mode.value }))}
497
- />
497
+ <Radio value={mode.value} />
498
498
  <span>{mode.label}</span>
499
499
  </label>
500
500
  ))}
501
- </div>
501
+ </RadioGroup>
502
502
  </div>
503
503
  <div className="space-y-2">
504
504
  <Label>{t('catalog.priceKinds.form.currencyLabel', 'Currency (optional)')}</Label>
@@ -7,6 +7,13 @@ import { Button } from "@open-mercato/ui/primitives/button";
7
7
  import { Checkbox } from "@open-mercato/ui/primitives/checkbox";
8
8
  import { Input } from "@open-mercato/ui/primitives/input";
9
9
  import { Label } from "@open-mercato/ui/primitives/label";
10
+ import {
11
+ Select,
12
+ SelectContent,
13
+ SelectItem,
14
+ SelectTrigger,
15
+ SelectValue,
16
+ } from "@open-mercato/ui/primitives/select";
10
17
  import { Spinner } from "@open-mercato/ui/primitives/spinner";
11
18
  import { ArrowDown, ArrowUp, Plus, Trash2 } from "lucide-react";
12
19
  import type {
@@ -318,24 +325,22 @@ export function ProductUomSection({
318
325
  <div className="grid gap-4 md:grid-cols-2">
319
326
  <div className="space-y-2">
320
327
  <Label htmlFor="catalog-product-uom-base-unit">{t("catalog.products.uom.baseUnit", "Base unit")}</Label>
321
- <select
322
- id="catalog-product-uom-base-unit"
323
- className="w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
324
- value={defaultUnit}
325
- onChange={(event) =>
326
- setValue("defaultUnit", event.target.value || null)
327
- }
328
+ <Select
329
+ value={defaultUnit || undefined}
330
+ onValueChange={(value) => setValue("defaultUnit", value || null)}
328
331
  disabled={loadingUnits}
329
332
  >
330
- <option value="">
331
- {t("catalog.products.uom.selectUnit", "Select unit")}
332
- </option>
333
- {unitOptions.map((option) => (
334
- <option key={option.value} value={option.value}>
335
- {option.label}
336
- </option>
337
- ))}
338
- </select>
333
+ <SelectTrigger id="catalog-product-uom-base-unit">
334
+ <SelectValue placeholder={t("catalog.products.uom.selectUnit", "Select unit")} />
335
+ </SelectTrigger>
336
+ <SelectContent>
337
+ {unitOptions.map((option) => (
338
+ <SelectItem key={option.value} value={option.value}>
339
+ {option.label}
340
+ </SelectItem>
341
+ ))}
342
+ </SelectContent>
343
+ </Select>
339
344
  {errors.defaultUnit ? (
340
345
  <p className="text-xs text-destructive">{errors.defaultUnit}</p>
341
346
  ) : null}
@@ -345,24 +350,22 @@ export function ProductUomSection({
345
350
  <Label htmlFor="catalog-product-uom-sales-unit">
346
351
  {t("catalog.products.uom.defaultSalesUnit", "Default sales unit")}
347
352
  </Label>
348
- <select
349
- id="catalog-product-uom-sales-unit"
350
- className="w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
351
- value={defaultSalesUnit}
352
- onChange={(event) =>
353
- setValue("defaultSalesUnit", event.target.value || null)
354
- }
353
+ <Select
354
+ value={defaultSalesUnit || undefined}
355
+ onValueChange={(value) => setValue("defaultSalesUnit", value || null)}
355
356
  disabled={loadingUnits}
356
357
  >
357
- <option value="">
358
- {t("catalog.products.uom.selectUnit", "Select unit")}
359
- </option>
360
- {unitOptions.map((option) => (
361
- <option key={option.value} value={option.value}>
362
- {option.label}
363
- </option>
364
- ))}
365
- </select>
358
+ <SelectTrigger id="catalog-product-uom-sales-unit">
359
+ <SelectValue placeholder={t("catalog.products.uom.selectUnit", "Select unit")} />
360
+ </SelectTrigger>
361
+ <SelectContent>
362
+ {unitOptions.map((option) => (
363
+ <SelectItem key={option.value} value={option.value}>
364
+ {option.label}
365
+ </SelectItem>
366
+ ))}
367
+ </SelectContent>
368
+ </Select>
366
369
  {errors.defaultSalesUnit ? (
367
370
  <p className="text-xs text-destructive">{errors.defaultSalesUnit}</p>
368
371
  ) : null}
@@ -432,24 +435,25 @@ export function ProductUomSection({
432
435
  <Label htmlFor="catalog-product-uom-rounding-mode">
433
436
  {t("catalog.products.uom.roundingMode", "Rounding mode")}
434
437
  </Label>
435
- <select
436
- id="catalog-product-uom-rounding-mode"
437
- className="w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
438
+ <Select
438
439
  value={values.uomRoundingMode ?? "half_up"}
439
- onChange={(event) =>
440
- setValue("uomRoundingMode", event.target.value)
441
- }
440
+ onValueChange={(value) => setValue("uomRoundingMode", value)}
442
441
  >
443
- <option value="half_up">
444
- {t("catalog.products.uom.roundingModeHalfUp", "Half up (default)")}
445
- </option>
446
- <option value="down">
447
- {t("catalog.products.uom.roundingModeDown", "Round down")}
448
- </option>
449
- <option value="up">
450
- {t("catalog.products.uom.roundingModeUp", "Round up")}
451
- </option>
452
- </select>
442
+ <SelectTrigger id="catalog-product-uom-rounding-mode">
443
+ <SelectValue />
444
+ </SelectTrigger>
445
+ <SelectContent>
446
+ <SelectItem value="half_up">
447
+ {t("catalog.products.uom.roundingModeHalfUp", "Half up (default)")}
448
+ </SelectItem>
449
+ <SelectItem value="down">
450
+ {t("catalog.products.uom.roundingModeDown", "Round down")}
451
+ </SelectItem>
452
+ <SelectItem value="up">
453
+ {t("catalog.products.uom.roundingModeUp", "Round up")}
454
+ </SelectItem>
455
+ </SelectContent>
456
+ </Select>
453
457
  </div>
454
458
  <div className="space-y-2">
455
459
  <Label htmlFor="catalog-product-uom-rounding-scale">
@@ -498,26 +502,26 @@ export function ProductUomSection({
498
502
  "Reference unit",
499
503
  )}
500
504
  </Label>
501
- <select
502
- id="catalog-product-uom-reference-unit"
503
- className="w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
504
- value={unitPriceReferenceUnit}
505
- onChange={(event) =>
506
- setValue("unitPriceReferenceUnit", event.target.value || null)
507
- }
505
+ <Select
506
+ value={unitPriceReferenceUnit || undefined}
507
+ onValueChange={(value) => setValue("unitPriceReferenceUnit", value || null)}
508
508
  >
509
- <option value="">
510
- {t(
511
- "catalog.products.unitPrice.selectReferenceUnit",
512
- "Select reference unit",
513
- )}
514
- </option>
515
- {REFERENCE_UNIT_OPTIONS.map((option) => (
516
- <option key={option.value} value={option.value}>
517
- {t(option.i18nKey, option.fallback)}
518
- </option>
519
- ))}
520
- </select>
509
+ <SelectTrigger id="catalog-product-uom-reference-unit">
510
+ <SelectValue
511
+ placeholder={t(
512
+ "catalog.products.unitPrice.selectReferenceUnit",
513
+ "Select reference unit",
514
+ )}
515
+ />
516
+ </SelectTrigger>
517
+ <SelectContent>
518
+ {REFERENCE_UNIT_OPTIONS.map((option) => (
519
+ <SelectItem key={option.value} value={option.value}>
520
+ {t(option.i18nKey, option.fallback)}
521
+ </SelectItem>
522
+ ))}
523
+ </SelectContent>
524
+ </Select>
521
525
  </div>
522
526
  <div className="space-y-2">
523
527
  <Label htmlFor="catalog-product-uom-unit-price-base-quantity">
@@ -613,24 +617,22 @@ export function ProductUomSection({
613
617
  <Label htmlFor={`catalog-product-uom-conversion-unit-${index}`} className="text-xs text-muted-foreground">
614
618
  {t("catalog.products.uom.conversionUnit", "Sales unit")}
615
619
  </Label>
616
- <select
617
- id={`catalog-product-uom-conversion-unit-${index}`}
618
- className="w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
619
- value={entry.unitCode}
620
- onChange={(event) =>
621
- updateConversion(index, { unitCode: event.target.value })
622
- }
620
+ <Select
621
+ value={entry.unitCode || undefined}
622
+ onValueChange={(value) => updateConversion(index, { unitCode: value ?? '' })}
623
623
  disabled={loadingUnits}
624
624
  >
625
- <option value="">
626
- {t("catalog.products.uom.selectUnit", "Select unit")}
627
- </option>
628
- {unitOptions.map((option) => (
629
- <option key={option.value} value={option.value}>
630
- {option.label}
631
- </option>
632
- ))}
633
- </select>
625
+ <SelectTrigger id={`catalog-product-uom-conversion-unit-${index}`}>
626
+ <SelectValue placeholder={t("catalog.products.uom.selectUnit", "Select unit")} />
627
+ </SelectTrigger>
628
+ <SelectContent>
629
+ {unitOptions.map((option) => (
630
+ <SelectItem key={option.value} value={option.value}>
631
+ {option.label}
632
+ </SelectItem>
633
+ ))}
634
+ </SelectContent>
635
+ </Select>
634
636
  </div>
635
637
 
636
638
  <div className="space-y-1 md:col-span-3">
@@ -4,6 +4,13 @@ import * as React from 'react'
4
4
  import { useT } from '@open-mercato/shared/lib/i18n/context'
5
5
  import { Label } from '@open-mercato/ui/primitives/label'
6
6
  import { Input } from '@open-mercato/ui/primitives/input'
7
+ import {
8
+ Select,
9
+ SelectContent,
10
+ SelectItem,
11
+ SelectTrigger,
12
+ SelectValue,
13
+ } from '@open-mercato/ui/primitives/select'
7
14
  import { Switch } from '@open-mercato/ui/primitives/switch'
8
15
  import { ProductMediaManager } from './ProductMediaManager'
9
16
  import { MetadataEditor } from './MetadataEditor'
@@ -160,18 +167,21 @@ export function VariantOptionValuesSection({
160
167
  {optionDefinitions.map((option) => (
161
168
  <div key={option.code} className="space-y-2">
162
169
  <Label className="text-xs uppercase text-muted-foreground">{option.label}</Label>
163
- <select
164
- className="w-full rounded border px-3 py-2 text-sm"
165
- value={values.optionValues?.[option.code] ?? ''}
166
- onChange={(event) => handleOptionChange(option.code, event.target.value)}
170
+ <Select
171
+ value={values.optionValues?.[option.code] || undefined}
172
+ onValueChange={(value) => handleOptionChange(option.code, value ?? '')}
167
173
  >
168
- <option value="">{t('catalog.variants.form.optionPlaceholder', 'Select value')}</option>
169
- {option.values.map((value) => (
170
- <option key={value.id} value={value.label}>
171
- {value.label}
172
- </option>
173
- ))}
174
- </select>
174
+ <SelectTrigger>
175
+ <SelectValue placeholder={t('catalog.variants.form.optionPlaceholder', 'Select value')} />
176
+ </SelectTrigger>
177
+ <SelectContent>
178
+ {option.values.map((value) => (
179
+ <SelectItem key={value.id} value={value.label}>
180
+ {value.label}
181
+ </SelectItem>
182
+ ))}
183
+ </SelectContent>
184
+ </Select>
175
185
  </div>
176
186
  ))}
177
187
  </div>
@@ -294,34 +304,40 @@ export function VariantPricesSection({
294
304
  </p>
295
305
  </div>
296
306
  <div className="flex items-center gap-2">
297
- <select
298
- className="rounded border px-3 py-2 text-sm"
299
- value={values.taxRateId ?? ''}
300
- onChange={(event) => setValue('taxRateId', event.target.value || null)}
307
+ <Select
308
+ value={values.taxRateId || undefined}
309
+ onValueChange={(value) => setValue('taxRateId', value || null)}
301
310
  >
302
- <option value="">{t('catalog.variants.form.pricesTaxNone', 'No tax override')}</option>
303
- {taxRates.map((rate) => (
304
- <option key={rate.id} value={rate.id}>
305
- {formatTaxRateLabel(rate)}
306
- </option>
307
- ))}
308
- </select>
311
+ <SelectTrigger>
312
+ <SelectValue placeholder={t('catalog.variants.form.pricesTaxNone', 'No tax override')} />
313
+ </SelectTrigger>
314
+ <SelectContent>
315
+ {taxRates.map((rate) => (
316
+ <SelectItem key={rate.id} value={rate.id}>
317
+ {formatTaxRateLabel(rate)}
318
+ </SelectItem>
319
+ ))}
320
+ </SelectContent>
321
+ </Select>
309
322
  </div>
310
323
  </div>
311
324
  ) : (
312
325
  <div className="flex justify-end">
313
- <select
314
- className="rounded border px-3 py-2 text-sm"
315
- value={values.taxRateId ?? ''}
316
- onChange={(event) => setValue('taxRateId', event.target.value || null)}
326
+ <Select
327
+ value={values.taxRateId || undefined}
328
+ onValueChange={(value) => setValue('taxRateId', value || null)}
317
329
  >
318
- <option value="">{t('catalog.variants.form.pricesTaxNone', 'No tax override')}</option>
319
- {taxRates.map((rate) => (
320
- <option key={rate.id} value={rate.id}>
321
- {formatTaxRateLabel(rate)}
322
- </option>
323
- ))}
324
- </select>
330
+ <SelectTrigger>
331
+ <SelectValue placeholder={t('catalog.variants.form.pricesTaxNone', 'No tax override')} />
332
+ </SelectTrigger>
333
+ <SelectContent>
334
+ {taxRates.map((rate) => (
335
+ <SelectItem key={rate.id} value={rate.id}>
336
+ {formatTaxRateLabel(rate)}
337
+ </SelectItem>
338
+ ))}
339
+ </SelectContent>
340
+ </Select>
325
341
  </div>
326
342
  )}
327
343
  <div className="space-y-3">