@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
@@ -2,6 +2,14 @@
2
2
 
3
3
  import * as React from 'react'
4
4
  import { X, ChevronUp, ChevronDown } from 'lucide-react'
5
+ import { Input } from '@open-mercato/ui/primitives/input'
6
+ import {
7
+ Select,
8
+ SelectContent,
9
+ SelectItem,
10
+ SelectTrigger,
11
+ SelectValue,
12
+ } from '@open-mercato/ui/primitives/select'
5
13
  import type { Action } from './utils/actionValidation'
6
14
  import { getActionTypeOptions, getRequiredConfigFields, getOptionalConfigFields } from './utils/actionValidation'
7
15
  import { useT } from '@open-mercato/shared/lib/i18n/context'
@@ -62,12 +70,12 @@ export function ActionRow({
62
70
  <label className="text-xs font-medium text-foreground col-span-1">
63
71
  {t('business_rules.components.actionRow.config.recipients')} {required && <span className="text-red-500">{t('business_rules.components.actionRow.actionType.required')}</span>}
64
72
  </label>
65
- <input
73
+ <Input
66
74
  type="text"
67
75
  value={value}
68
76
  onChange={(e) => handleConfigChange(field, e.target.value.split(',').map((s) => s.trim()))}
69
77
  placeholder={t('business_rules.components.actionRow.config.recipients.placeholder')}
70
- className="col-span-3 px-2 py-1.5 text-sm border border-border rounded bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
78
+ className="col-span-3"
71
79
  />
72
80
  <div className="col-span-4 col-start-2">
73
81
  <p className="text-xs text-muted-foreground">{t('business_rules.components.actionRow.config.recipients.help')}</p>
@@ -80,16 +88,20 @@ export function ActionRow({
80
88
  return (
81
89
  <div key={field} className="grid grid-cols-4 gap-2 items-center">
82
90
  <label className="text-xs font-medium text-foreground col-span-1">{t('business_rules.components.actionRow.config.level')}</label>
83
- <select
91
+ <Select
84
92
  value={value || 'info'}
85
- onChange={(e) => handleConfigChange(field, e.target.value)}
86
- className="col-span-3 px-2 py-1.5 text-sm border border-border rounded bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
93
+ onValueChange={(next) => handleConfigChange(field, next)}
87
94
  >
88
- <option value="info">{t('business_rules.components.actionRow.config.level.info')}</option>
89
- <option value="warn">{t('business_rules.components.actionRow.config.level.warn')}</option>
90
- <option value="error">{t('business_rules.components.actionRow.config.level.error')}</option>
91
- <option value="debug">{t('business_rules.components.actionRow.config.level.debug')}</option>
92
- </select>
95
+ <SelectTrigger size="sm" className="col-span-3">
96
+ <SelectValue />
97
+ </SelectTrigger>
98
+ <SelectContent>
99
+ <SelectItem value="info">{t('business_rules.components.actionRow.config.level.info')}</SelectItem>
100
+ <SelectItem value="warn">{t('business_rules.components.actionRow.config.level.warn')}</SelectItem>
101
+ <SelectItem value="error">{t('business_rules.components.actionRow.config.level.error')}</SelectItem>
102
+ <SelectItem value="debug">{t('business_rules.components.actionRow.config.level.debug')}</SelectItem>
103
+ </SelectContent>
104
+ </Select>
93
105
  </div>
94
106
  )
95
107
  }
@@ -98,17 +110,21 @@ export function ActionRow({
98
110
  return (
99
111
  <div key={field} className="grid grid-cols-4 gap-2 items-center">
100
112
  <label className="text-xs font-medium text-foreground col-span-1">{t('business_rules.components.actionRow.config.method')}</label>
101
- <select
113
+ <Select
102
114
  value={value || 'POST'}
103
- onChange={(e) => handleConfigChange(field, e.target.value)}
104
- className="col-span-3 px-2 py-1.5 text-sm border border-border rounded bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
115
+ onValueChange={(next) => handleConfigChange(field, next)}
105
116
  >
106
- <option value="GET">GET</option>
107
- <option value="POST">POST</option>
108
- <option value="PUT">PUT</option>
109
- <option value="PATCH">PATCH</option>
110
- <option value="DELETE">DELETE</option>
111
- </select>
117
+ <SelectTrigger size="sm" className="col-span-3">
118
+ <SelectValue />
119
+ </SelectTrigger>
120
+ <SelectContent>
121
+ <SelectItem value="GET">GET</SelectItem>
122
+ <SelectItem value="POST">POST</SelectItem>
123
+ <SelectItem value="PUT">PUT</SelectItem>
124
+ <SelectItem value="PATCH">PATCH</SelectItem>
125
+ <SelectItem value="DELETE">DELETE</SelectItem>
126
+ </SelectContent>
127
+ </Select>
112
128
  </div>
113
129
  )
114
130
  }
@@ -139,12 +155,12 @@ export function ActionRow({
139
155
  <label className="text-xs font-medium text-foreground col-span-1">
140
156
  {field} {required && <span className="text-red-500">{t('business_rules.components.actionRow.actionType.required')}</span>}
141
157
  </label>
142
- <input
158
+ <Input
143
159
  type="text"
144
160
  value={value}
145
161
  onChange={(e) => handleConfigChange(field, e.target.value)}
146
162
  placeholder={t('business_rules.components.actionRow.config.field.placeholder', { field })}
147
- className="col-span-3 px-2 py-1.5 text-sm border border-border rounded bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
163
+ className="col-span-3"
148
164
  />
149
165
  </div>
150
166
  )
@@ -158,18 +174,21 @@ export function ActionRow({
158
174
  <label className="text-xs font-medium text-foreground col-span-1">
159
175
  {t('business_rules.components.actionRow.actionType')} <span className="text-red-500">{t('business_rules.components.actionRow.actionType.required')}</span>
160
176
  </label>
161
- <select
162
- value={action.type || ''}
163
- onChange={handleTypeChange}
164
- className="col-span-3 px-2 py-1.5 text-sm border border-border rounded bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring font-medium"
177
+ <Select
178
+ value={action.type || undefined}
179
+ onValueChange={(value) => handleTypeChange({ target: { value } } as React.ChangeEvent<HTMLSelectElement>)}
165
180
  >
166
- <option value="">{t('business_rules.components.actionRow.actionType.placeholder')}</option>
167
- {actionTypes.map((type) => (
168
- <option key={type.value} value={type.value}>
169
- {type.label}
170
- </option>
171
- ))}
172
- </select>
181
+ <SelectTrigger size="sm" className="col-span-3 font-medium">
182
+ <SelectValue placeholder={t('business_rules.components.actionRow.actionType.placeholder')} />
183
+ </SelectTrigger>
184
+ <SelectContent>
185
+ {actionTypes.map((type) => (
186
+ <SelectItem key={type.value} value={type.value}>
187
+ {type.label}
188
+ </SelectItem>
189
+ ))}
190
+ </SelectContent>
191
+ </Select>
173
192
  </div>
174
193
 
175
194
  {/* Config Fields */}
@@ -3,6 +3,13 @@
3
3
  import * as React from 'react'
4
4
  import { Plus, X } from 'lucide-react'
5
5
  import { Button } from '@open-mercato/ui/primitives/button'
6
+ import {
7
+ Select,
8
+ SelectContent,
9
+ SelectItem,
10
+ SelectTrigger,
11
+ SelectValue,
12
+ } from '@open-mercato/ui/primitives/select'
6
13
  import { ConditionRow } from './ConditionRow'
7
14
  import type { GroupCondition, ConditionExpression, SimpleCondition } from './utils/conditionValidation'
8
15
  import type { LogicalOperator } from './../data/validators'
@@ -104,17 +111,21 @@ export function ConditionGroup({ group, onChange, onDelete, depth, maxDepth = 5,
104
111
  <span className="text-xs font-medium text-muted-foreground">
105
112
  {t('business_rules.components.conditionGroup.group', { depth: depth + 1 })}
106
113
  </span>
107
- <select
114
+ <Select
108
115
  value={group.operator}
109
- onChange={handleOperatorChange}
110
- className="px-3 py-1.5 text-sm font-semibold border border-border rounded bg-card focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
116
+ onValueChange={(value) => handleOperatorChange({ target: { value } } as React.ChangeEvent<HTMLSelectElement>)}
111
117
  >
112
- {logicalOperators.map((op) => (
113
- <option key={op.value} value={op.value}>
114
- {op.label}
115
- </option>
116
- ))}
117
- </select>
118
+ <SelectTrigger size="sm" className="w-auto min-w-[6rem] font-semibold">
119
+ <SelectValue />
120
+ </SelectTrigger>
121
+ <SelectContent>
122
+ {logicalOperators.map((op) => (
123
+ <SelectItem key={op.value} value={op.value}>
124
+ {op.label}
125
+ </SelectItem>
126
+ ))}
127
+ </SelectContent>
128
+ </Select>
118
129
 
119
130
  <span className="text-xs text-muted-foreground">
120
131
  ({t('business_rules.components.conditionGroup.ruleCount', { count: group.rules.length })})
@@ -2,6 +2,14 @@
2
2
 
3
3
  import * as React from 'react'
4
4
  import { Button } from '@open-mercato/ui/primitives/button'
5
+ import { Input } from '@open-mercato/ui/primitives/input'
6
+ import {
7
+ Select,
8
+ SelectContent,
9
+ SelectItem,
10
+ SelectTrigger,
11
+ SelectValue,
12
+ } from '@open-mercato/ui/primitives/select'
5
13
  import { X } from 'lucide-react'
6
14
  import type { SimpleCondition } from './utils/conditionValidation'
7
15
  import { getComparisonOperators, isValidFieldPath } from './utils/conditionValidation'
@@ -72,14 +80,12 @@ export function ConditionRow({ condition, onChange, onDelete, error }: Condition
72
80
  <label className="block text-xs font-medium text-foreground mb-1">
73
81
  {t('business_rules.components.conditionRow.field')}
74
82
  </label>
75
- <input
83
+ <Input
76
84
  type="text"
77
85
  value={condition.field || ''}
78
86
  onChange={handleFieldChange}
79
87
  placeholder={t('business_rules.components.conditionRow.field.placeholder')}
80
- className={`w-full px-2 py-1.5 text-sm border rounded bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${
81
- fieldError ? 'border-red-500' : 'border-border'
82
- }`}
88
+ aria-invalid={fieldError ? true : undefined}
83
89
  />
84
90
  {fieldError && (
85
91
  <p className="text-xs text-red-600 mt-0.5">
@@ -93,17 +99,21 @@ export function ConditionRow({ condition, onChange, onDelete, error }: Condition
93
99
  <label className="block text-xs font-medium text-foreground mb-1">
94
100
  {t('business_rules.components.conditionRow.operator')}
95
101
  </label>
96
- <select
102
+ <Select
97
103
  value={condition.operator || '='}
98
- onChange={handleOperatorChange}
99
- className="w-full px-2 py-1.5 text-sm border border-border rounded bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
104
+ onValueChange={(value) => handleOperatorChange({ target: { value } } as React.ChangeEvent<HTMLSelectElement>)}
100
105
  >
101
- {operators.map((op) => (
102
- <option key={op.value} value={op.value}>
103
- {op.label}
104
- </option>
105
- ))}
106
- </select>
106
+ <SelectTrigger size="sm">
107
+ <SelectValue />
108
+ </SelectTrigger>
109
+ <SelectContent>
110
+ {operators.map((op) => (
111
+ <SelectItem key={op.value} value={op.value}>
112
+ {op.label}
113
+ </SelectItem>
114
+ ))}
115
+ </SelectContent>
116
+ </Select>
107
117
  </div>
108
118
 
109
119
  {/* Value Input */}
@@ -128,7 +138,7 @@ export function ConditionRow({ condition, onChange, onDelete, error }: Condition
128
138
  }
129
139
  </button>
130
140
  </div>
131
- <input
141
+ <Input
132
142
  type="text"
133
143
  value={
134
144
  useFieldComparison
@@ -144,7 +154,6 @@ export function ConditionRow({ condition, onChange, onDelete, error }: Condition
144
154
  ? t('business_rules.components.conditionRow.field.comparisonPlaceholder')
145
155
  : t('business_rules.components.conditionRow.value.placeholder')
146
156
  }
147
- className="w-full px-2 py-1.5 text-sm border border-border rounded bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
148
157
  />
149
158
  <p className="text-xs text-muted-foreground mt-0.5">
150
159
  {useFieldComparison
@@ -2,6 +2,14 @@
2
2
 
3
3
  import * as React from 'react'
4
4
  import { Button } from '@open-mercato/ui/primitives/button'
5
+ import { Input } from '@open-mercato/ui/primitives/input'
6
+ import {
7
+ Select,
8
+ SelectContent,
9
+ SelectItem,
10
+ SelectTrigger,
11
+ SelectValue,
12
+ } from '@open-mercato/ui/primitives/select'
5
13
  import { Plus, ChevronUp, ChevronDown, X } from 'lucide-react'
6
14
  import { useQuery } from '@tanstack/react-query'
7
15
  import { apiCall } from '@open-mercato/ui/backend/utils/apiCall'
@@ -168,30 +176,32 @@ export function RuleSetMembers({ members, onAdd, onUpdate, onRemove }: RuleSetMe
168
176
  <label className="block text-sm font-medium text-foreground mb-1">
169
177
  {t('business_rules.sets.members.form.selectRule')}
170
178
  </label>
171
- <select
172
- value={selectedRuleId}
173
- onChange={(e) => setSelectedRuleId(e.target.value)}
174
- className="w-full px-3 py-2 border border-border rounded bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
179
+ <Select
180
+ value={selectedRuleId || undefined}
181
+ onValueChange={(value) => setSelectedRuleId(value ?? '')}
175
182
  >
176
- <option value="">{t('business_rules.sets.members.form.selectRulePlaceholder')}</option>
177
- {rulesNotInSet.map((rule) => (
178
- <option key={rule.id} value={rule.id}>
179
- {rule.ruleName} ({rule.ruleId})
180
- </option>
181
- ))}
182
- </select>
183
+ <SelectTrigger>
184
+ <SelectValue placeholder={t('business_rules.sets.members.form.selectRulePlaceholder')} />
185
+ </SelectTrigger>
186
+ <SelectContent>
187
+ {rulesNotInSet.map((rule) => (
188
+ <SelectItem key={rule.id} value={rule.id}>
189
+ {rule.ruleName} ({rule.ruleId})
190
+ </SelectItem>
191
+ ))}
192
+ </SelectContent>
193
+ </Select>
183
194
  </div>
184
195
 
185
196
  <div className="w-32">
186
197
  <label className="block text-sm font-medium text-foreground mb-1">
187
198
  {t('business_rules.sets.members.form.sequence')}
188
199
  </label>
189
- <input
200
+ <Input
190
201
  type="number"
191
202
  value={sequence}
192
203
  onChange={(e) => setSequence(parseInt(e.target.value) || 0)}
193
204
  min={0}
194
- className="w-full px-3 py-2 border border-border rounded bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
195
205
  />
196
206
  </div>
197
207
  </div>
@@ -21,6 +21,13 @@ import { flash } from "@open-mercato/ui/backend/FlashMessages";
21
21
  import { Button } from "@open-mercato/ui/primitives/button";
22
22
  import { Input } from "@open-mercato/ui/primitives/input";
23
23
  import { Label } from "@open-mercato/ui/primitives/label";
24
+ import {
25
+ Select,
26
+ SelectContent,
27
+ SelectItem,
28
+ SelectTrigger,
29
+ SelectValue,
30
+ } from "@open-mercato/ui/primitives/select";
24
31
  import { TagsInput } from "@open-mercato/ui/backend/inputs/TagsInput";
25
32
  import { Textarea } from "@open-mercato/ui/primitives/textarea";
26
33
  import { DataLoader } from "@open-mercato/ui/primitives/DataLoader";
@@ -2473,44 +2480,34 @@ function ProductMetaSection({
2473
2480
  <Label>
2474
2481
  {t("catalog.products.form.productType", "Product type")}
2475
2482
  </Label>
2476
- <select
2477
- 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"
2483
+ <Select
2478
2484
  value={values.productType || "simple"}
2479
- onChange={(event) => {
2480
- const nextType = event.target.value;
2485
+ onValueChange={(value) => {
2486
+ const nextType = value;
2481
2487
  setValue("productType", nextType);
2482
- const nextIsConfigurable =
2483
- isConfigurableProductType(nextType);
2488
+ const nextIsConfigurable = isConfigurableProductType(nextType);
2484
2489
  if (nextIsConfigurable && !values.hasVariants) {
2485
2490
  setValue("hasVariants", true);
2486
- } else if (
2487
- !nextIsConfigurable &&
2488
- values.hasVariants
2489
- ) {
2491
+ } else if (!nextIsConfigurable && values.hasVariants) {
2490
2492
  setValue("hasVariants", false);
2491
2493
  }
2492
2494
  }}
2493
2495
  >
2494
- {CATALOG_PRODUCT_TYPES.map((type) => {
2495
- const isDisabled =
2496
- type === "bundle" || type === "grouped";
2497
- return (
2498
- <option
2499
- key={type}
2500
- value={type}
2501
- disabled={isDisabled}
2502
- >
2503
- {t(
2504
- `catalog.products.types.${type}`,
2505
- type,
2506
- )}
2507
- {isDisabled
2508
- ? ` (${t("common.comingSoon", "Coming soon")})`
2509
- : ""}
2510
- </option>
2511
- );
2512
- })}
2513
- </select>
2496
+ <SelectTrigger>
2497
+ <SelectValue />
2498
+ </SelectTrigger>
2499
+ <SelectContent>
2500
+ {CATALOG_PRODUCT_TYPES.map((type) => {
2501
+ const isDisabled = type === "bundle" || type === "grouped";
2502
+ return (
2503
+ <SelectItem key={type} value={type} disabled={isDisabled}>
2504
+ {t(`catalog.products.types.${type}`, type)}
2505
+ {isDisabled ? ` (${t("common.comingSoon", "Coming soon")})` : ""}
2506
+ </SelectItem>
2507
+ );
2508
+ })}
2509
+ </SelectContent>
2510
+ </Select>
2514
2511
  {errors.productType ? (
2515
2512
  <p className="text-xs text-red-600">
2516
2513
  {errors.productType}
@@ -2551,31 +2548,28 @@ function ProductMetaSection({
2551
2548
  </span>
2552
2549
  </Button>
2553
2550
  </div>
2554
- <select
2555
- 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"
2556
- value={values.taxRateId ?? ""}
2557
- onChange={(event) =>
2558
- setValue("taxRateId", event.target.value || null)
2559
- }
2551
+ <Select
2552
+ value={values.taxRateId || undefined}
2553
+ onValueChange={(value) => setValue("taxRateId", value || null)}
2560
2554
  disabled={!taxRates.length}
2561
2555
  >
2562
- <option value="">
2563
- {taxRates.length
2564
- ? t(
2565
- "catalog.products.create.taxRates.noneSelected",
2566
- "No tax class selected",
2567
- )
2568
- : t(
2569
- "catalog.products.create.taxRates.emptyOption",
2570
- "No tax classes available",
2571
- )}
2572
- </option>
2573
- {taxRates.map((rate) => (
2574
- <option key={rate.id} value={rate.id}>
2575
- {formatTaxRateLabel(rate)}
2576
- </option>
2577
- ))}
2578
- </select>
2556
+ <SelectTrigger>
2557
+ <SelectValue
2558
+ placeholder={
2559
+ taxRates.length
2560
+ ? t("catalog.products.create.taxRates.noneSelected", "No tax class selected")
2561
+ : t("catalog.products.create.taxRates.emptyOption", "No tax classes available")
2562
+ }
2563
+ />
2564
+ </SelectTrigger>
2565
+ <SelectContent>
2566
+ {taxRates.map((rate) => (
2567
+ <SelectItem key={rate.id} value={rate.id}>
2568
+ {formatTaxRateLabel(rate)}
2569
+ </SelectItem>
2570
+ ))}
2571
+ </SelectContent>
2572
+ </Select>
2579
2573
  <p className="text-xs text-muted-foreground">
2580
2574
  {taxRates.length
2581
2575
  ? t(