@orcestr/ui 0.1.0 → 0.2.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 (205) hide show
  1. package/README.md +11 -11
  2. package/README.ru.md +10 -10
  3. package/dist/components/Action/ActionConfirmModal.d.ts.map +1 -1
  4. package/dist/components/Action/ActionTypes.d.ts +1 -1
  5. package/dist/components/Action/ActionTypes.d.ts.map +1 -1
  6. package/dist/components/ActionMenu/ActionMenu.d.ts.map +1 -1
  7. package/dist/components/Alert/Alert.d.ts.map +1 -1
  8. package/dist/components/Alert/Alert.js +1 -1
  9. package/dist/components/AppShell/AppShell.d.ts +11 -0
  10. package/dist/components/AppShell/AppShell.d.ts.map +1 -1
  11. package/dist/components/AppShell/AppShell.js +15 -14
  12. package/dist/components/AppSidebar/AppSidebar.d.ts.map +1 -1
  13. package/dist/components/AppSidebar/AppSidebar.js +84 -15
  14. package/dist/components/Badge/Badge.d.ts.map +1 -1
  15. package/dist/components/Badge/Badge.js +1 -1
  16. package/dist/components/BadgeSelectMenu/BadgeSelectMenu.d.ts.map +1 -1
  17. package/dist/components/BadgeSelectMenu/BadgeSelectMenu.js +5 -5
  18. package/dist/components/Box/Box.d.ts.map +1 -1
  19. package/dist/components/Box/Box.js +1 -1
  20. package/dist/components/Button/Button.d.ts.map +1 -1
  21. package/dist/components/Button/Button.js +2 -2
  22. package/dist/components/Card/Card.d.ts.map +1 -1
  23. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  24. package/dist/components/Checkbox/Checkbox.js +1 -1
  25. package/dist/components/Collapse/Collapse.d.ts.map +1 -1
  26. package/dist/components/Collapse/Collapse.js +5 -25
  27. package/dist/components/Combobox/Combobox.d.ts.map +1 -1
  28. package/dist/components/Combobox/Combobox.js +7 -2
  29. package/dist/components/CommandPalette/CommandPalette.d.ts.map +1 -1
  30. package/dist/components/CommandPalette/CommandPalette.js +6 -12
  31. package/dist/components/ConfirmDialog/ConfirmDialog.d.ts +1 -1
  32. package/dist/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -1
  33. package/dist/components/ConfirmDialog/ConfirmDialog.js +1 -1
  34. package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
  35. package/dist/components/ContextMenu/ContextMenu.js +3 -3
  36. package/dist/components/CopyButton/CopyButton.d.ts +24 -0
  37. package/dist/components/CopyButton/CopyButton.d.ts.map +1 -0
  38. package/dist/components/CopyButton/CopyButton.js +81 -0
  39. package/dist/components/DataTable/DataTable.d.ts.map +1 -1
  40. package/dist/components/DataTable/DataTable.js +29 -22
  41. package/dist/components/DataTable/DataTableStateAdapters.d.ts.map +1 -1
  42. package/dist/components/DataTable/DataTableStateAdapters.js +3 -4
  43. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
  44. package/dist/components/DatePicker/DatePicker.js +1 -1
  45. package/dist/components/DatePicker/DatePickerState.d.ts.map +1 -1
  46. package/dist/components/DatePicker/DatePickerState.js +3 -1
  47. package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
  48. package/dist/components/DateRangePresetPicker/DateRangePresetPicker.d.ts.map +1 -1
  49. package/dist/components/DateRangePresetPicker/DateRangePresetPicker.js +1 -1
  50. package/dist/components/DateRangePresetPicker/DateRangePresetPickerState.d.ts.map +1 -1
  51. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  52. package/dist/components/Drawer/Drawer.d.ts +2 -1
  53. package/dist/components/Drawer/Drawer.d.ts.map +1 -1
  54. package/dist/components/Drawer/Drawer.js +3 -3
  55. package/dist/components/EntityPicker/EntityPicker.d.ts.map +1 -1
  56. package/dist/components/EntityPicker/EntityPicker.js +2 -2
  57. package/dist/components/Field/Field.d.ts.map +1 -1
  58. package/dist/components/Field/Field.js +1 -1
  59. package/dist/components/Flex/Flex.d.ts.map +1 -1
  60. package/dist/components/Flex/Flex.js +1 -1
  61. package/dist/components/Grid/Grid.d.ts.map +1 -1
  62. package/dist/components/Highlight/Highlight.d.ts.map +1 -1
  63. package/dist/components/Highlight/Highlight.js +1 -1
  64. package/dist/components/IconButton/IconButton.d.ts.map +1 -1
  65. package/dist/components/IconButton/IconButton.js +3 -3
  66. package/dist/components/IconText/IconText.d.ts.map +1 -1
  67. package/dist/components/IconText/IconText.js +3 -1
  68. package/dist/components/IconTextButton/IconTextButton.d.ts.map +1 -1
  69. package/dist/components/InlineEdit/InlineEdit.d.ts.map +1 -1
  70. package/dist/components/InlineEdit/InlineEdit.js +22 -7
  71. package/dist/components/LinkButton/LinkButton.d.ts.map +1 -1
  72. package/dist/components/LinkButton/LinkButton.js +2 -2
  73. package/dist/components/Listbox/Listbox.js +2 -2
  74. package/dist/components/Menu/Menu.d.ts.map +1 -1
  75. package/dist/components/Menu/Menu.js +5 -5
  76. package/dist/components/Modal/Modal.d.ts.map +1 -1
  77. package/dist/components/Modal/Modal.js +4 -8
  78. package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
  79. package/dist/components/MultiSelect/MultiSelect.js +5 -7
  80. package/dist/components/NumberField/NumberField.d.ts.map +1 -1
  81. package/dist/components/NumberField/NumberField.js +1 -1
  82. package/dist/components/Overlay/OverlayProvider.d.ts +1 -1
  83. package/dist/components/Overlay/OverlayProvider.d.ts.map +1 -1
  84. package/dist/components/Overlay/OverlayProvider.js +3 -7
  85. package/dist/components/PaginatedCombobox/PaginatedCombobox.d.ts.map +1 -1
  86. package/dist/components/PaginatedCombobox/PaginatedCombobox.js +9 -8
  87. package/dist/components/PaginatedCombobox/PaginatedComboboxReactQueryAdapter.d.ts.map +1 -1
  88. package/dist/components/PaginatedCombobox/PaginatedComboboxReactQueryAdapter.js +2 -2
  89. package/dist/components/Pagination/Pagination.js +1 -1
  90. package/dist/components/Popover/Popover.d.ts.map +1 -1
  91. package/dist/components/Popover/Popover.js +16 -18
  92. package/dist/components/Portal/Portal.d.ts.map +1 -1
  93. package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
  94. package/dist/components/RadioGroup/RadioGroup.js +1 -1
  95. package/dist/components/ScrollArea/ScrollArea.d.ts.map +1 -1
  96. package/dist/components/ScrollArea/ScrollArea.js +10 -23
  97. package/dist/components/Section/Section.d.ts.map +1 -1
  98. package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  99. package/dist/components/SegmentedControl/SegmentedControl.js +1 -1
  100. package/dist/components/Select/Select.d.ts.map +1 -1
  101. package/dist/components/Select/Select.js +4 -4
  102. package/dist/components/Separator/Separator.d.ts.map +1 -1
  103. package/dist/components/Separator/Separator.js +1 -1
  104. package/dist/components/Skeleton/Skeleton.d.ts.map +1 -1
  105. package/dist/components/Skeleton/Skeleton.js +1 -1
  106. package/dist/components/SpecialModal/SpecialModal.d.ts.map +1 -1
  107. package/dist/components/SpecialModal/SpecialModal.js +2 -2
  108. package/dist/components/Spinner/Spinner.d.ts.map +1 -1
  109. package/dist/components/Spinner/Spinner.js +1 -1
  110. package/dist/components/Stack/Stack.d.ts.map +1 -1
  111. package/dist/components/Stack/Stack.js +1 -1
  112. package/dist/components/State/State.d.ts.map +1 -1
  113. package/dist/components/State/State.js +5 -5
  114. package/dist/components/State/stateIcon.d.ts.map +1 -1
  115. package/dist/components/StepperInput/StepperInput.js +2 -2
  116. package/dist/components/Switch/Switch.js +1 -1
  117. package/dist/components/Table/Table.d.ts.map +1 -1
  118. package/dist/components/Table/Table.js +2 -2
  119. package/dist/components/Tabs/Tabs.d.ts.map +1 -1
  120. package/dist/components/Tabs/Tabs.js +24 -15
  121. package/dist/components/Text/Text.d.ts.map +1 -1
  122. package/dist/components/Text/Text.js +1 -1
  123. package/dist/components/TextArea/TextArea.d.ts.map +1 -1
  124. package/dist/components/TextArea/TextArea.js +2 -2
  125. package/dist/components/TextField/TextField.d.ts.map +1 -1
  126. package/dist/components/TextField/TextField.js +3 -3
  127. package/dist/components/Toast/Toast.d.ts +0 -4
  128. package/dist/components/Toast/Toast.d.ts.map +1 -1
  129. package/dist/components/Toast/Toast.js +63 -45
  130. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  131. package/dist/components/Tooltip/Tooltip.js +7 -9
  132. package/dist/components/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
  133. package/dist/example/CodePreview.d.ts +2 -1
  134. package/dist/example/CodePreview.d.ts.map +1 -1
  135. package/dist/example/CodePreview.js +18 -53
  136. package/dist/example/ExampleActionsSection.d.ts +1 -1
  137. package/dist/example/ExampleActionsSection.d.ts.map +1 -1
  138. package/dist/example/ExampleActionsSection.js +3 -3
  139. package/dist/example/ExampleApplicationSection.d.ts.map +1 -1
  140. package/dist/example/ExampleApplicationSection.js +91 -23
  141. package/dist/example/ExampleBasicsSections.d.ts +1 -1
  142. package/dist/example/ExampleBasicsSections.d.ts.map +1 -1
  143. package/dist/example/ExampleBasicsSections.js +22 -8
  144. package/dist/example/ExampleDataSection.d.ts.map +1 -1
  145. package/dist/example/ExampleDataSection.js +5 -5
  146. package/dist/example/ExampleFieldsSection.d.ts.map +1 -1
  147. package/dist/example/ExampleFieldsSection.js +8 -10
  148. package/dist/example/ExampleFoundationsSection.d.ts +1 -1
  149. package/dist/example/ExampleFoundationsSection.d.ts.map +1 -1
  150. package/dist/example/ExampleFoundationsSection.js +4 -4
  151. package/dist/example/ExampleOverlays.d.ts.map +1 -1
  152. package/dist/example/ExampleOverlays.js +4 -4
  153. package/dist/example/ExampleOverlaysSection.d.ts.map +1 -1
  154. package/dist/example/ExampleOverlaysSection.js +22 -35
  155. package/dist/example/ExampleSelectionSection.d.ts.map +1 -1
  156. package/dist/example/ExampleSelectionSection.js +8 -8
  157. package/dist/example/ExampleStateSection.d.ts +3 -3
  158. package/dist/example/ExampleStateSection.d.ts.map +1 -1
  159. package/dist/example/ExampleStateSection.js +15 -14
  160. package/dist/example/ExampleThemePlayground.d.ts +26 -26
  161. package/dist/example/ExampleThemePlayground.d.ts.map +1 -1
  162. package/dist/example/ExampleThemePlayground.js +58 -44
  163. package/dist/example/UiExamplePage.d.ts.map +1 -1
  164. package/dist/example/UiExamplePage.js +42 -55
  165. package/dist/example/UiExampleSection.d.ts.map +1 -1
  166. package/dist/example/UiExampleSection.js +1 -1
  167. package/dist/example/codeSamples.d.ts +1 -1
  168. package/dist/example/codeSamples.d.ts.map +1 -1
  169. package/dist/example/codeSamples.js +172 -70
  170. package/dist/example/exampleData.d.ts.map +1 -1
  171. package/dist/example/exampleData.js +5 -11
  172. package/dist/example/styles.css +79 -119
  173. package/dist/hooks/useControllableState.d.ts.map +1 -1
  174. package/dist/hooks/useControllableState.js +1 -3
  175. package/dist/hooks/useFloatingLayer.d.ts.map +1 -1
  176. package/dist/hooks/useFloatingLayer.js +1 -1
  177. package/dist/hooks/useFloatingPosition.d.ts.map +1 -1
  178. package/dist/hooks/useFloatingPosition.js +10 -15
  179. package/dist/hooks/useFocusTrap.d.ts.map +1 -1
  180. package/dist/hooks/useListNavigation.d.ts.map +1 -1
  181. package/dist/hooks/useListNavigation.js +2 -4
  182. package/dist/hooks/useOutsidePointerDown.d.ts.map +1 -1
  183. package/dist/hooks/useTypeahead.d.ts.map +1 -1
  184. package/dist/index.d.ts +1 -0
  185. package/dist/index.d.ts.map +1 -1
  186. package/dist/index.js +1 -0
  187. package/dist/locale/LocaleProvider.d.ts.map +1 -1
  188. package/dist/locale/LocaleProvider.js +1 -1
  189. package/dist/provider/OrcestrUiProvider.d.ts.map +1 -1
  190. package/dist/styles/orcestr-ui.css +658 -1033
  191. package/dist/theme/ThemeProvider.d.ts.map +1 -1
  192. package/dist/theme/ThemeProvider.js +21 -29
  193. package/dist/theme/defaultTheme.d.ts.map +1 -1
  194. package/dist/theme/defaultTheme.js +200 -89
  195. package/dist/theme/systemProps.d.ts +2 -2
  196. package/dist/theme/systemProps.d.ts.map +1 -1
  197. package/dist/theme/systemProps.js +4 -35
  198. package/dist/theme/themeTypes.d.ts +24 -19
  199. package/dist/theme/themeTypes.d.ts.map +1 -1
  200. package/dist/theme/useTheme.d.ts.map +1 -1
  201. package/dist/utils/cn.d.ts.map +1 -1
  202. package/dist/utils/composeRefs.d.ts.map +1 -1
  203. package/dist/utils/mergeProps.d.ts.map +1 -1
  204. package/dist/utils/polymorphic.d.ts.map +1 -1
  205. package/package.json +4 -1
@@ -33,26 +33,24 @@ export function FieldsSection({ stepperValue, onStepperValueChange, dateValue, o
33
33
  const selectedPaymentTerm = inlinePaymentTermOptions.find((item) => item.key === paymentTermKey);
34
34
  const selectedOwners = useMemo(() => inlineOwnerOptions.filter((item) => ownerKeys.includes(item.key)), [ownerKeys]);
35
35
  const toggleOwner = (key) => {
36
- setOwnerKeys((current) => current.includes(key)
37
- ? current.filter((item) => item !== key)
38
- : [...current, key]);
36
+ setOwnerKeys((current) => current.includes(key) ? current.filter((item) => item !== key) : [...current, key]);
39
37
  };
40
- return (_jsxs(_Fragment, { children: [_jsx(UiExampleSection, { id: 'text-fields-example', title: 'Text fields', description: 'TextField and TextArea inside Field.', children: _jsxs(ExampleTile, { title: 'Text fields', code: codeSamples.textFields, onOpen: onOpenCode, children: [_jsx(Field, { label: 'Search', helperText: 'Clearable field with left slot.', children: _jsxs(Flex, { g: 2, a: 'c', children: [_jsx(TextField, { size: 2, placeholder: 'Search item', clearable: true, leftSlot: _jsx(LuSearch, { size: 16 }) }), _jsx(Button, { size: 2, v: 'surface', children: "Search" })] }) }), _jsx(Field, { label: 'Comment', children: _jsx(TextArea, { rows: 4, placeholder: 'Internal note' }) })] }) }), _jsx(UiExampleSection, { id: 'grouped-fields-example', title: 'Grouped fields', description: 'Layout primitives group fields without owning form state.', children: _jsx(ExampleTile, { title: 'Grouped fields', code: codeSamples.groupedFields, onOpen: onOpenCode, children: _jsxs(Section, { g: 3, children: [_jsxs(Stack, { g: 1, children: [_jsx(Text, { fw: 760, children: "Request details" }), _jsx(Text, { fs: '12px', tone: 'muted', children: "Layout primitives group fields without owning state." })] }), _jsxs(Stack, { g: 3, children: [_jsxs(Grid, { columns: 'repeat(auto-fit, minmax(min(100%, 180px), 1fr))', g: 3, children: [_jsx(Field, { label: 'Source', required: true, error: 'Choose a source', children: _jsx(TextField, { placeholder: 'Search source', invalid: true }) }), _jsx(Field, { label: 'Contact', children: _jsx(TextField, { placeholder: 'Name or email' }) })] }), _jsx(Field, { label: 'Review note', helperText: 'Visible to operators.', children: _jsx(TextArea, { rows: 3, placeholder: 'Internal instructions' }) }), _jsxs(Flex, { g: 2, j: 'e', wrap: true, children: [_jsx(Button, { type: 'button', v: 'surface', children: "Cancel" }), _jsx(Button, { type: 'button', children: "Save request" })] })] })] }) }) }), _jsx(UiExampleSection, { id: 'inline-edit-example', title: 'Inline edit', description: 'Compact value displays for editable entity fields.', children: _jsx(ExampleTile, { title: 'Inline edit', code: codeSamples.inlineEdit, onOpen: onOpenCode, children: _jsxs(Stack, { g: 3, children: [_jsx(Field, { label: 'Single value', children: _jsx(InlineEditField, { label: selectedSupplier?.label ?? 'Choose supplier', meta: 'Supplier', onOpen: () => setSupplierOpen(true), action: (_jsx(Popover, { open: supplierOpen, onOpenChange: setSupplierOpen, trigger: (_jsx(IconButton, { size: 1, v: 'ghost', icon: _jsx(LuPencil, { size: 13 }), "aria-label": 'Edit supplier' })), className: 'oui-combobox-content oui-ui-inline-edit-popover', sideOffset: 4, children: _jsx(Listbox, { className: 'oui-combobox-options', items: inlineSupplierOptions.map((item) => ({
38
+ return (_jsxs(_Fragment, { children: [_jsx(UiExampleSection, { id: "text-fields-example", title: "Text fields", description: "TextField and TextArea inside Field.", children: _jsxs(ExampleTile, { title: "Text fields", code: codeSamples.textFields, onOpen: onOpenCode, children: [_jsx(Field, { label: "Search", helperText: "Clearable field with left slot.", children: _jsxs(Flex, { g: 2, a: "c", children: [_jsx(TextField, { size: 2, placeholder: "Search item", clearable: true, leftSlot: _jsx(LuSearch, { size: 16 }) }), _jsx(Button, { size: 2, v: "surface", children: "Search" })] }) }), _jsx(Field, { label: "Comment", children: _jsx(TextArea, { rows: 4, placeholder: "Internal note" }) })] }) }), _jsx(UiExampleSection, { id: "grouped-fields-example", title: "Grouped fields", description: "Layout primitives group fields without owning form state.", children: _jsx(ExampleTile, { title: "Grouped fields", code: codeSamples.groupedFields, onOpen: onOpenCode, children: _jsxs(Section, { g: 3, children: [_jsxs(Stack, { g: 1, children: [_jsx(Text, { fw: 760, children: "Request details" }), _jsx(Text, { fs: "12px", tone: "muted", children: "Layout primitives group fields without owning state." })] }), _jsxs(Stack, { g: 3, children: [_jsxs(Grid, { columns: "repeat(auto-fit, minmax(min(100%, 180px), 1fr))", g: 3, children: [_jsx(Field, { label: "Source", required: true, error: "Choose a source", children: _jsx(TextField, { placeholder: "Search source", invalid: true }) }), _jsx(Field, { label: "Contact", children: _jsx(TextField, { placeholder: "Name or email" }) })] }), _jsx(Field, { label: "Review note", helperText: "Visible to operators.", children: _jsx(TextArea, { rows: 3, placeholder: "Internal instructions" }) }), _jsxs(Flex, { g: 2, j: "e", wrap: true, children: [_jsx(Button, { type: "button", v: "surface", children: "Cancel" }), _jsx(Button, { type: "button", children: "Save request" })] })] })] }) }) }), _jsx(UiExampleSection, { id: "inline-edit-example", title: "Inline edit", description: "Compact value displays for editable entity fields.", children: _jsx(ExampleTile, { title: "Inline edit", code: codeSamples.inlineEdit, onOpen: onOpenCode, children: _jsxs(Stack, { g: 3, children: [_jsx(Field, { label: "Single value", children: _jsx(InlineEditField, { label: selectedSupplier?.label ?? 'Choose supplier', meta: "Supplier", onOpen: () => setSupplierOpen(true), action: _jsx(Popover, { open: supplierOpen, onOpenChange: setSupplierOpen, trigger: _jsx(IconButton, { size: 1, v: "ghost", icon: _jsx(LuPencil, { size: 13 }), "aria-label": "Edit supplier" }), className: "oui-combobox-content oui-ui-inline-edit-popover", sideOffset: 4, children: _jsx(Listbox, { className: "oui-combobox-options", items: inlineSupplierOptions.map((item) => ({
41
39
  value: item.key,
42
40
  label: item.label,
43
41
  })), value: supplierKey, onValueChange: (nextKey) => {
44
42
  setSupplierKey(nextKey);
45
43
  setSupplierOpen(false);
46
- } }) })), clearable: Boolean(selectedSupplier), onClear: () => setSupplierKey(null) }) }), _jsx(Field, { label: 'Single value without meta', children: _jsx(InlineEditField, { label: selectedPaymentTerm?.label ?? 'Choose payment terms', onOpen: () => setPaymentOpen(true), action: (_jsx(Popover, { open: paymentOpen, onOpenChange: setPaymentOpen, trigger: (_jsx(IconButton, { size: 1, v: 'ghost', icon: _jsx(LuPencil, { size: 13 }), "aria-label": 'Edit payment terms' })), className: 'oui-combobox-content oui-ui-inline-edit-popover', sideOffset: 4, children: _jsx(Listbox, { className: 'oui-combobox-options', items: inlinePaymentTermOptions.map((item) => ({
44
+ } }) }), clearable: Boolean(selectedSupplier), onClear: () => setSupplierKey(null) }) }), _jsx(Field, { label: "Single value without meta", children: _jsx(InlineEditField, { label: selectedPaymentTerm?.label ?? 'Choose payment terms', onOpen: () => setPaymentOpen(true), action: _jsx(Popover, { open: paymentOpen, onOpenChange: setPaymentOpen, trigger: _jsx(IconButton, { size: 1, v: "ghost", icon: _jsx(LuPencil, { size: 13 }), "aria-label": "Edit payment terms" }), className: "oui-combobox-content oui-ui-inline-edit-popover", sideOffset: 4, children: _jsx(Listbox, { className: "oui-combobox-options", items: inlinePaymentTermOptions.map((item) => ({
47
45
  value: item.key,
48
46
  label: item.label,
49
47
  })), value: paymentTermKey, onValueChange: (nextKey) => {
50
48
  setPaymentTermKey(nextKey);
51
49
  setPaymentOpen(false);
52
- } }) })), clearable: Boolean(selectedPaymentTerm), onClear: () => setPaymentTermKey(null) }) }), _jsx(Field, { label: 'Multiple values', children: _jsx(InlineEditMultiField, { onOpen: () => setOwnerOpen(true), action: (_jsx("span", { onClick: (event) => event.stopPropagation(), children: _jsx(Popover, { open: ownerOpen, onOpenChange: setOwnerOpen, trigger: (_jsx(IconButton, { size: 1, v: 'ghost', icon: _jsx(LuPencil, { size: 13 }), "aria-label": 'Edit owners' })), className: 'oui-combobox-content oui-ui-inline-edit-popover', sideOffset: 4, children: _jsx(Stack, { g: 1, p: 1, children: inlineOwnerOptions.map((item) => {
50
+ } }) }), clearable: Boolean(selectedPaymentTerm), onClear: () => setPaymentTermKey(null) }) }), _jsx(Field, { label: "Multiple values", children: _jsx(InlineEditMultiField, { onOpen: () => setOwnerOpen(true), action: _jsx("span", { onClick: (event) => event.stopPropagation(), children: _jsx(Popover, { open: ownerOpen, onOpenChange: setOwnerOpen, trigger: _jsx(IconButton, { size: 1, v: "ghost", icon: _jsx(LuPencil, { size: 13 }), "aria-label": "Edit owners" }), className: "oui-combobox-content oui-ui-inline-edit-popover", sideOffset: 4, children: _jsx(Stack, { g: 1, p: 1, children: inlineOwnerOptions.map((item) => {
53
51
  const selected = ownerKeys.includes(item.key);
54
- return (_jsxs("button", { type: 'button', className: 'oui-combobox-option oui-ui-inline-edit-option', "data-selected": selected ? 'true' : 'false', onClick: () => toggleOwner(item.key), children: [_jsx("span", { className: 'oui-multi-select-check', children: selected ? _jsx(LuCheck, { size: 13 }) : null }), _jsx("span", { className: 'oui-combobox-option-main', children: item.label })] }, item.key));
55
- }) }) }) })), col: true, empty: 'No owners selected', children: selectedOwners.length
56
- ? selectedOwners.map((item, index) => (_jsx(Badge, { tone: index === 0 ? 'info' : 'neutral', v: 'soft', children: item.label }, item.key)))
57
- : null }) }), _jsx(Field, { label: 'Pending update', children: _jsx(InlineEditField, { label: 'Payment terms', meta: 'Saving', busy: true }) })] }) }) }), _jsx(UiExampleSection, { id: 'number-date-fields-example', title: 'Number and date fields', description: 'StepperInput, NumberField and DatePicker.', children: _jsxs(ExampleTile, { title: 'Number and date fields', code: codeSamples.numberAndDateFields, onOpen: onOpenCode, children: [_jsx(Field, { label: 'Quantity', children: _jsx(StepperInput, { value: stepperValue, onChange: onStepperValueChange, min: 0, max: 200 }) }), _jsx(Field, { label: 'Price', children: _jsx(NumberField, { defaultValue: 1250, min: 0 }) }), _jsx(Field, { label: 'Date', children: _jsx(DatePicker, { value: dateValue, onValueChange: onDateValueChange }) })] }) }), _jsx(UiExampleSection, { id: 'date-range-example', title: 'Date range', description: 'DateRangePicker and preset helper.', children: _jsxs(ExampleTile, { title: 'Date range', code: codeSamples.dateRangeFields, onOpen: onOpenCode, children: [_jsx(Field, { label: 'Range', children: _jsx(DateRangePicker, { value: dateRange, onValueChange: onDateRangeChange }) }), _jsx(DateRangePresetPicker, { today: '2026-06-26', onValueChange: onDateRangeChange }), _jsx(Text, { fs: '12px', tone: 'muted', children: "Date inputs stay as controls. Form ownership belongs to the application." })] }) })] }));
52
+ return (_jsxs("button", { type: "button", className: "oui-combobox-option oui-ui-inline-edit-option", "data-selected": selected ? 'true' : 'false', onClick: () => toggleOwner(item.key), children: [_jsx("span", { className: "oui-multi-select-check", children: selected ? (_jsx(LuCheck, { size: 13 })) : null }), _jsx("span", { className: "oui-combobox-option-main", children: item.label })] }, item.key));
53
+ }) }) }) }), col: true, empty: "No owners selected", children: selectedOwners.length
54
+ ? selectedOwners.map((item, index) => (_jsx(Badge, { tone: index === 0 ? 'info' : 'neutral', v: "soft", children: item.label }, item.key)))
55
+ : null }) }), _jsx(Field, { label: "Pending update", children: _jsx(InlineEditField, { label: "Payment terms", meta: "Saving", busy: true }) })] }) }) }), _jsx(UiExampleSection, { id: "number-date-fields-example", title: "Number and date fields", description: "StepperInput, NumberField and DatePicker.", children: _jsxs(ExampleTile, { title: "Number and date fields", code: codeSamples.numberAndDateFields, onOpen: onOpenCode, children: [_jsx(Field, { label: "Quantity", children: _jsx(StepperInput, { value: stepperValue, onChange: onStepperValueChange, min: 0, max: 200 }) }), _jsx(Field, { label: "Price", children: _jsx(NumberField, { defaultValue: 1250, min: 0 }) }), _jsx(Field, { label: "Date", children: _jsx(DatePicker, { value: dateValue, onValueChange: onDateValueChange }) })] }) }), _jsx(UiExampleSection, { id: "date-range-example", title: "Date range", description: "DateRangePicker and preset helper.", children: _jsxs(ExampleTile, { title: "Date range", code: codeSamples.dateRangeFields, onOpen: onOpenCode, children: [_jsx(Field, { label: "Range", children: _jsx(DateRangePicker, { value: dateRange, onValueChange: onDateRangeChange }) }), _jsx(DateRangePresetPicker, { today: "2026-06-26", onValueChange: onDateRangeChange }), _jsx(Text, { fs: "12px", tone: "muted", children: "Date inputs stay as controls. Form ownership belongs to the application." })] }) })] }));
58
56
  }
@@ -1,5 +1,5 @@
1
1
  import { type CodeExample } from './codeSamples';
2
- export declare function FoundationsSection({ onOpenCode, }: {
2
+ export declare function FoundationsSection({ onOpenCode }: {
3
3
  onOpenCode: (example: CodeExample) => void;
4
4
  }): import("react/jsx-runtime").JSX.Element;
5
5
  //# sourceMappingURL=ExampleFoundationsSection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleFoundationsSection.d.ts","sourceRoot":"","sources":["../../src/example/ExampleFoundationsSection.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAC,KAAK,WAAW,EAAC,MAAM,eAAe,CAAC;AAe/C,wBAAgB,kBAAkB,CAAC,EAC/B,UAAU,GACb,EAAE;IACC,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;CAC9C,2CAiCA"}
1
+ {"version":3,"file":"ExampleFoundationsSection.d.ts","sourceRoot":"","sources":["../../src/example/ExampleFoundationsSection.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAejD,wBAAgB,kBAAkB,CAAC,EAAE,UAAU,EAAE,EAAE;IAAE,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAA;CAAE,2CAiChG"}
@@ -9,17 +9,17 @@ const providerSample = {
9
9
  code: `import {OrcestrUiProvider} from '@orcestr/ui';
10
10
 
11
11
  <OrcestrUiProvider
12
- surface='operations'
12
+ surface='deliveries'
13
13
  locale='ru'
14
14
  >
15
15
  <App />
16
16
  </OrcestrUiProvider>`,
17
17
  };
18
- export function FoundationsSection({ onOpenCode, }) {
19
- return (_jsx(UiExampleSection, { id: 'foundations', title: '\u041A\u043E\u043D\u0442\u0440\u0430\u043A\u0442\u044B \u0431\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u0438', description: '\u0411\u0430\u0437\u043E\u0432\u044B\u0435 \u043F\u0440\u0430\u0432\u0438\u043B\u0430 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F Orcestr UI: provider, \u043F\u0443\u0431\u043B\u0438\u0447\u043D\u044B\u0439 API, \u0442\u043E\u043A\u0435\u043D\u044B \u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438.', children: _jsx(Stack, { g: 3, children: _jsx(ExampleTile, { id: 'provider-contract-example', title: 'OrcestrUiProvider', code: providerSample.code, onOpen: onOpenCode, children: _jsx("div", { className: 'oui-ui-contract-grid', children: [
18
+ export function FoundationsSection({ onOpenCode }) {
19
+ return (_jsx(UiExampleSection, { id: "foundations", title: "\u041A\u043E\u043D\u0442\u0440\u0430\u043A\u0442\u044B \u0431\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u0438", description: "\u0411\u0430\u0437\u043E\u0432\u044B\u0435 \u043F\u0440\u0430\u0432\u0438\u043B\u0430 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F Orcestr UI: provider, \u043F\u0443\u0431\u043B\u0438\u0447\u043D\u044B\u0439 API, \u0442\u043E\u043A\u0435\u043D\u044B \u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438.", children: _jsx(Stack, { g: 3, children: _jsx(ExampleTile, { id: "provider-contract-example", title: "OrcestrUiProvider", code: providerSample.code, onOpen: onOpenCode, children: _jsx("div", { className: "oui-ui-contract-grid", children: [
20
20
  ['Provider', 'theme, locale, portal, overlays, toast'],
21
21
  ['Публичный API', 'size, tone, v, disabled, loading, invalid, testId'],
22
22
  ['Стили', 'только oui-* классы внутри @orcestr/ui/styles.css'],
23
23
  ['Проверки', 'tsc, contract tests, diff check, /ui smoke'],
24
- ].map(([title, description]) => (_jsxs("div", { className: 'oui-ui-contract-item', children: [_jsx(Badge, { tone: 'primary', children: title }), _jsx(Text, { fs: '12px', tone: 'muted', children: description })] }, title))) }) }) }) }));
24
+ ].map(([title, description]) => (_jsxs("div", { className: "oui-ui-contract-item", children: [_jsx(Badge, { tone: "primary", children: title }), _jsx(Text, { fs: "12px", tone: "muted", children: description })] }, title))) }) }) }) }));
25
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleOverlays.d.ts","sourceRoot":"","sources":["../../src/example/ExampleOverlays.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAC,KAAK,eAAe,EAAC,MAAM,IAAI,CAAC;AAExC,KAAK,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC/C,KAAK,OAAO,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;AAuCvC,KAAK,oBAAoB,GAAG;IACxB,MAAM,EAAE,eAAe,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS,KAAK,IAAI,CAAC;CACtD,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC5B,MAAM,EACN,SAAS,EACT,YAAY,EACZ,UAAU,EACV,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,WAAW,EACX,cAAc,EACd,OAAO,GACV,EAAE,oBAAoB,2CAgOtB"}
1
+ {"version":3,"file":"ExampleOverlays.d.ts","sourceRoot":"","sources":["../../src/example/ExampleOverlays.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,IAAI,CAAC;AAE1C,KAAK,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC/C,KAAK,OAAO,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;AAqCvC,KAAK,oBAAoB,GAAG;IACxB,MAAM,EAAE,eAAe,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS,KAAK,IAAI,CAAC;CACtD,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC5B,MAAM,EACN,SAAS,EACT,YAAY,EACZ,UAAU,EACV,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,WAAW,EACX,cAAc,EACd,OAAO,GACV,EAAE,oBAAoB,2CA+OtB"}
@@ -2,16 +2,16 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import {} from 'react';
4
4
  import { LuX } from 'react-icons/lu';
5
- import { Button, CommandPalette, Flex, Field, IconButton, Modal, Stack, Text, TextField } from '..';
5
+ import { Button, CommandPalette, Flex, Field, IconButton, Modal, Stack, Text, TextField, } from '..';
6
6
  import { getCommandItems } from './exampleData';
7
7
  import {} from '..';
8
8
  function ExampleModal({ title, description, footer, children, onOpenChange, ...props }) {
9
- return (_jsxs(Modal, { ...props, onOpenChange: onOpenChange, children: [_jsxs(Modal.Header, { children: [_jsxs("div", { className: 'oui-modal-title-wrap', children: [_jsx("h2", { className: 'oui-modal-title', children: title }), description ? (_jsx("p", { className: 'oui-modal-description', children: description })) : null] }), _jsx(IconButton, { v: 'ghost', icon: _jsx(LuX, { size: 18 }), "aria-label": 'Close', onClick: () => onOpenChange(false) })] }), _jsx(Modal.Body, { children: children }), footer ? _jsx(Modal.Footer, { children: footer }) : null] }));
9
+ return (_jsxs(Modal, { ...props, onOpenChange: onOpenChange, children: [_jsxs(Modal.Header, { children: [_jsxs("div", { className: "oui-modal-title-wrap", children: [_jsx("h2", { className: "oui-modal-title", children: title }), description ? _jsx("p", { className: "oui-modal-description", children: description }) : null] }), _jsx(IconButton, { v: "ghost", icon: _jsx(LuX, { size: 18 }), "aria-label": "Close", onClick: () => onOpenChange(false) })] }), _jsx(Modal.Body, { children: children }), footer ? _jsx(Modal.Footer, { children: footer }) : null] }));
10
10
  }
11
11
  export function ExampleOverlays({ locale, modalOpen, setModalOpen, nestedOpen, setNestedOpen, blurModalOpen, setBlurModalOpen, blurNestedOpen, setBlurNestedOpen, blurFinalOpen, setBlurFinalOpen, fastModalOpen, setFastModalOpen, slowModalOpen, setSlowModalOpen, riseModalOpen, setRiseModalOpen, dangerModalOpen, setDangerModalOpen, paletteOpen, setPaletteOpen, onToast, }) {
12
12
  const commandItems = getCommandItems(locale);
13
- return (_jsxs(_Fragment, { children: [_jsx(ExampleModal, { open: modalOpen, onOpenChange: setModalOpen, title: 'Custom modal', description: 'First modal layer with the default theme blur backdrop.', footer: _jsxs(Flex, { g: 2, j: 'e', w: '100%', children: [_jsx(Button, { v: 'surface', onClick: () => setModalOpen(false), children: "Close" }), _jsx(Button, { onClick: () => setNestedOpen(true), children: "Open nested" })] }), children: _jsxs(Stack, { g: 3, children: [_jsx(Text, { color: 'var(--oui-muted)', lh: 1.5, children: "Nested modals stack above the previous layer and keep independent smooth open and close animations." }), _jsx(Field, { label: 'Modal field', children: _jsx(TextField, { placeholder: 'Focus stays inside modal' }) })] }) }), _jsx(ExampleModal, { open: nestedOpen, onOpenChange: setNestedOpen, title: 'Nested modal', description: 'Second layer with the same default modal animation.', maxWidth: 440, children: _jsxs(Stack, { g: 3, children: [_jsx(Text, { color: 'var(--oui-muted)', lh: 1.5, children: "This checks layer indexes, focus trap and escape handling." }), _jsx(Button, { onClick: () => onToast('Nested modal action completed', 'success'), children: "Show toast" })] }) }), _jsx(ExampleModal, { open: blurModalOpen, onOpenChange: setBlurModalOpen, title: 'Blur modal', description: 'Default modal surface with pure backdrop blur and no overlay tint.', maxWidth: 560, overlayColor: 'transparent', overlayOpacity: 0, overlayBlur: 10, borderColor: 'color-mix(in srgb, var(--oui-primary-base) 34%, var(--oui-border))', radius: 10, shadow: '0 24px 90px rgb(0 0 0 / 44%)', footer: _jsxs(Flex, { g: 2, j: 'e', w: '100%', children: [_jsx(Button, { v: 'surface', onClick: () => setBlurModalOpen(false), children: "Close" }), _jsx(Button, { onClick: () => setBlurNestedOpen(true), children: "Open nested blur" })] }), children: _jsxs(Stack, { g: 3, children: [_jsx(Text, { color: 'var(--oui-muted)', lh: 1.5, children: "This variant checks a strong backdrop blur while the overlay tint stays fully transparent." }), _jsx(Field, { label: 'Reference', children: _jsx(TextField, { placeholder: 'ORD-2048' }) })] }) }), _jsx(ExampleModal, { open: blurNestedOpen, onOpenChange: setBlurNestedOpen, title: 'Nested blur modal', description: 'Second blur layer without overlay tint.', maxWidth: 500, overlayColor: 'transparent', overlayOpacity: 0, overlayBlur: 8, borderColor: 'color-mix(in srgb, var(--oui-primary-base) 38%, var(--oui-border))', radius: 10, footer: _jsxs(Flex, { g: 2, j: 'e', w: '100%', children: [_jsx(Button, { v: 'surface', onClick: () => setBlurNestedOpen(false), children: "Close" }), _jsx(Button, { onClick: () => setBlurFinalOpen(true), children: "Open final blur" })] }), children: _jsxs(Stack, { g: 3, children: [_jsx(Text, { color: 'var(--oui-muted)', lh: 1.5, children: "This layer keeps the backdrop blur transparent while stacking above the first blur modal." }), _jsx(TextField, { placeholder: 'Nested value' })] }) }), _jsx(ExampleModal, { open: blurFinalOpen, onOpenChange: setBlurFinalOpen, title: 'Final blur modal', description: 'Top blur layer. Toast must appear above this modal.', maxWidth: 440, overlayColor: 'transparent', overlayOpacity: 0, overlayBlur: 6, borderColor: 'color-mix(in srgb, var(--oui-primary-base) 42%, var(--oui-border))', radius: 10, children: _jsxs(Stack, { g: 3, children: [_jsx(Text, { color: 'var(--oui-muted)', lh: 1.5, children: "Use this modal to verify blur stacking and toast z-index." }), _jsx(Button, { onClick: () => onToast('Toast above nested blur modals', 'success'), children: "Show toast" })] }) }), _jsx(ExampleModal, { open: fastModalOpen, onOpenChange: setFastModalOpen, title: 'Fast modal', description: 'Short animationDuration passed directly to the modal.', maxWidth: 460, overlayColor: '#0b1020', overlayOpacity: 0.28, overlayBlur: 4, animationDuration: '160ms', children: _jsxs(Stack, { g: 3, children: [_jsx(Text, { color: 'var(--oui-muted)', lh: 1.5, children: "This variant opens and closes quickly while still animating the backdrop blur." }), _jsx(Button, { onClick: () => setFastModalOpen(false), children: "Close" })] }) }), _jsx(ExampleModal, { open: slowModalOpen, onOpenChange: setSlowModalOpen, title: 'Very slow modal', description: 'Long animationDuration for checking smooth blur ramp.', maxWidth: 520, overlayColor: 'transparent', overlayOpacity: 0, overlayBlur: 14, animationDuration: '1200ms', borderColor: 'color-mix(in srgb, var(--oui-primary-base) 42%, var(--oui-border))', radius: 10, children: _jsxs(Stack, { g: 3, children: [_jsx(Text, { color: 'var(--oui-muted)', lh: 1.5, children: "The backdrop blur should build up and fade out gradually during the whole animation." }), _jsx(Button, { onClick: () => setSlowModalOpen(false), children: "Close" })] }) }), _jsx(ExampleModal, { open: riseModalOpen, onOpenChange: setRiseModalOpen, title: 'Rise modal', description: 'Legacy rise animation kept as an explicit modal animation variant.', maxWidth: 480, overlayColor: '#0b1020', overlayOpacity: 0.28, overlayBlur: 4, animation: 'rise', children: _jsxs(Stack, { g: 3, children: [_jsx(Text, { color: 'var(--oui-muted)', lh: 1.5, children: "This keeps the previous small scale and vertical movement without content blur." }), _jsx(Button, { onClick: () => setRiseModalOpen(false), children: "Close" })] }) }), _jsx(ExampleModal, { open: dangerModalOpen, onOpenChange: setDangerModalOpen, title: 'Danger modal', description: 'Strong colored overlay, danger border and compact radius.', maxWidth: 500, overlayColor: '#3b0712', overlayOpacity: 0.48, overlayBlur: 3, borderColor: 'color-mix(in srgb, var(--oui-danger-base) 46%, var(--oui-border))', radius: 8, footer: _jsxs(Flex, { g: 2, j: 'e', w: '100%', children: [_jsx(Button, { v: 'surface', onClick: () => setDangerModalOpen(false), children: "Cancel" }), _jsx(Button, { tone: 'danger', onClick: () => {
13
+ return (_jsxs(_Fragment, { children: [_jsx(ExampleModal, { open: modalOpen, onOpenChange: setModalOpen, title: "Custom modal", description: "First modal layer with the default theme blur backdrop.", footer: _jsxs(Flex, { g: 2, j: "e", w: "100%", children: [_jsx(Button, { v: "surface", onClick: () => setModalOpen(false), children: "Close" }), _jsx(Button, { onClick: () => setNestedOpen(true), children: "Open nested" })] }), children: _jsxs(Stack, { g: 3, children: [_jsx(Text, { color: "var(--oui-muted)", lh: 1.5, children: "Nested modals stack above the previous layer and keep independent smooth open and close animations." }), _jsx(Field, { label: "Modal field", children: _jsx(TextField, { placeholder: "Focus stays inside modal" }) })] }) }), _jsx(ExampleModal, { open: nestedOpen, onOpenChange: setNestedOpen, title: "Nested modal", description: "Second layer with the same default modal animation.", maxWidth: 440, children: _jsxs(Stack, { g: 3, children: [_jsx(Text, { color: "var(--oui-muted)", lh: 1.5, children: "This checks layer indexes, focus trap and escape handling." }), _jsx(Button, { onClick: () => onToast('Nested modal action completed', 'success'), children: "Show toast" })] }) }), _jsx(ExampleModal, { open: blurModalOpen, onOpenChange: setBlurModalOpen, title: "Blur modal", description: "Default modal surface with pure backdrop blur and no overlay tint.", maxWidth: 560, overlayColor: "transparent", overlayOpacity: 0, overlayBlur: 10, borderColor: "color-mix(in srgb, var(--oui-primary-base) 34%, var(--oui-border))", radius: 10, shadow: "0 24px 90px rgb(0 0 0 / 44%)", footer: _jsxs(Flex, { g: 2, j: "e", w: "100%", children: [_jsx(Button, { v: "surface", onClick: () => setBlurModalOpen(false), children: "Close" }), _jsx(Button, { onClick: () => setBlurNestedOpen(true), children: "Open nested blur" })] }), children: _jsxs(Stack, { g: 3, children: [_jsx(Text, { color: "var(--oui-muted)", lh: 1.5, children: "This variant checks a strong backdrop blur while the overlay tint stays fully transparent." }), _jsx(Field, { label: "Reference", children: _jsx(TextField, { placeholder: "ORD-2048" }) })] }) }), _jsx(ExampleModal, { open: blurNestedOpen, onOpenChange: setBlurNestedOpen, title: "Nested blur modal", description: "Second blur layer without overlay tint.", maxWidth: 500, overlayColor: "transparent", overlayOpacity: 0, overlayBlur: 8, borderColor: "color-mix(in srgb, var(--oui-primary-base) 38%, var(--oui-border))", radius: 10, footer: _jsxs(Flex, { g: 2, j: "e", w: "100%", children: [_jsx(Button, { v: "surface", onClick: () => setBlurNestedOpen(false), children: "Close" }), _jsx(Button, { onClick: () => setBlurFinalOpen(true), children: "Open final blur" })] }), children: _jsxs(Stack, { g: 3, children: [_jsx(Text, { color: "var(--oui-muted)", lh: 1.5, children: "This layer keeps the backdrop blur transparent while stacking above the first blur modal." }), _jsx(TextField, { placeholder: "Nested value" })] }) }), _jsx(ExampleModal, { open: blurFinalOpen, onOpenChange: setBlurFinalOpen, title: "Final blur modal", description: "Top blur layer. Toast must appear above this modal.", maxWidth: 440, overlayColor: "transparent", overlayOpacity: 0, overlayBlur: 6, borderColor: "color-mix(in srgb, var(--oui-primary-base) 42%, var(--oui-border))", radius: 10, children: _jsxs(Stack, { g: 3, children: [_jsx(Text, { color: "var(--oui-muted)", lh: 1.5, children: "Use this modal to verify blur stacking and toast z-index." }), _jsx(Button, { onClick: () => onToast('Toast above nested blur modals', 'success'), children: "Show toast" })] }) }), _jsx(ExampleModal, { open: fastModalOpen, onOpenChange: setFastModalOpen, title: "Fast modal", description: "Short animationDuration passed directly to the modal.", maxWidth: 460, overlayColor: "#0b1020", overlayOpacity: 0.28, overlayBlur: 4, animationDuration: "160ms", children: _jsxs(Stack, { g: 3, children: [_jsx(Text, { color: "var(--oui-muted)", lh: 1.5, children: "This variant opens and closes quickly while still animating the backdrop blur." }), _jsx(Button, { onClick: () => setFastModalOpen(false), children: "Close" })] }) }), _jsx(ExampleModal, { open: slowModalOpen, onOpenChange: setSlowModalOpen, title: "Very slow modal", description: "Long animationDuration for checking smooth blur ramp.", maxWidth: 520, overlayColor: "transparent", overlayOpacity: 0, overlayBlur: 14, animationDuration: "1200ms", borderColor: "color-mix(in srgb, var(--oui-primary-base) 42%, var(--oui-border))", radius: 10, children: _jsxs(Stack, { g: 3, children: [_jsx(Text, { color: "var(--oui-muted)", lh: 1.5, children: "The backdrop blur should build up and fade out gradually during the whole animation." }), _jsx(Button, { onClick: () => setSlowModalOpen(false), children: "Close" })] }) }), _jsx(ExampleModal, { open: riseModalOpen, onOpenChange: setRiseModalOpen, title: "Rise modal", description: "Legacy rise animation kept as an explicit modal animation variant.", maxWidth: 480, overlayColor: "#0b1020", overlayOpacity: 0.28, overlayBlur: 4, animation: "rise", children: _jsxs(Stack, { g: 3, children: [_jsx(Text, { color: "var(--oui-muted)", lh: 1.5, children: "This keeps the previous small scale and vertical movement without content blur." }), _jsx(Button, { onClick: () => setRiseModalOpen(false), children: "Close" })] }) }), _jsx(ExampleModal, { open: dangerModalOpen, onOpenChange: setDangerModalOpen, title: "Danger modal", description: "Strong colored overlay, danger border and compact radius.", maxWidth: 500, overlayColor: "#3b0712", overlayOpacity: 0.48, overlayBlur: 3, borderColor: "color-mix(in srgb, var(--oui-danger-base) 46%, var(--oui-border))", radius: 8, footer: _jsxs(Flex, { g: 2, j: "e", w: "100%", children: [_jsx(Button, { v: "surface", onClick: () => setDangerModalOpen(false), children: "Cancel" }), _jsx(Button, { tone: "danger", onClick: () => {
14
14
  setDangerModalOpen(false);
15
15
  onToast('Danger action confirmed', 'danger');
16
- }, children: "Confirm" })] }), children: _jsxs(Stack, { g: 3, children: [_jsx(Text, { color: 'var(--oui-muted)', lh: 1.5, children: "This variant checks a colored backdrop without a hard flash on open or close." }), _jsx(TextField, { value: 'Archive selected record', readOnly: true })] }) }), _jsx(CommandPalette, { open: paletteOpen, onOpenChange: setPaletteOpen, items: commandItems, recentItems: commandItems.slice(1, 3), globalOpenEvents: ['orcestr:open-command-palette'], onSelect: (value) => onToast(`Command selected: ${value}`, 'info') })] }));
16
+ }, children: "Confirm" })] }), children: _jsxs(Stack, { g: 3, children: [_jsx(Text, { color: "var(--oui-muted)", lh: 1.5, children: "This variant checks a colored backdrop without a hard flash on open or close." }), _jsx(TextField, { value: "Archive selected record", readOnly: true })] }) }), _jsx(CommandPalette, { open: paletteOpen, onOpenChange: setPaletteOpen, items: commandItems, recentItems: commandItems.slice(1, 3), globalOpenEvents: ['orcestr:open-command-palette'], onSelect: (value) => onToast(`Command selected: ${value}`, 'info') })] }));
17
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleOverlaysSection.d.ts","sourceRoot":"","sources":["../../src/example/ExampleOverlaysSection.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAc,KAAK,WAAW,EAAC,MAAM,eAAe,CAAC;AAG5D,KAAK,OAAO,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;AAEvC,KAAK,oBAAoB,GAAG;IACxB,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;CAC9C,CAAC;AAgEF,wBAAgB,eAAe,CAAC,EAC5B,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,GACb,EAAE,oBAAoB,2CA8RtB"}
1
+ {"version":3,"file":"ExampleOverlaysSection.d.ts","sourceRoot":"","sources":["../../src/example/ExampleOverlaysSection.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAG9D,KAAK,OAAO,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;AAEvC,KAAK,oBAAoB,GAAG;IACxB,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;CAC9C,CAAC;AAuDF,wBAAgB,eAAe,CAAC,EAC5B,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,GACb,EAAE,oBAAoB,2CAyRtB"}
@@ -19,60 +19,59 @@ const toastPositionVariants = [
19
19
  position: 'top-left',
20
20
  label: 'Status synced',
21
21
  tone: 'success',
22
- message: 'Glass toast from the left edge.',
23
- blur: 14,
22
+ message: 'Default glass toast from the left edge.',
24
23
  },
25
24
  {
26
25
  position: 'top-center',
27
26
  label: 'Command ready',
28
27
  tone: 'info',
29
- message: 'Centered toast drops from the top.',
30
- background: 'rgb(18 28 42 / 88%)',
31
- blur: 10,
28
+ message: 'Centered toast uses the same glass surface.',
32
29
  },
33
30
  {
34
31
  position: 'top-right',
35
32
  label: 'Needs attention',
36
33
  tone: 'warning',
37
- message: 'Right edge bubble animation.',
38
- blur: 12,
34
+ message: 'Right edge toast keeps the same translucent surface.',
39
35
  },
40
36
  {
41
37
  position: 'bottom-left',
42
38
  label: 'Import queued',
43
39
  tone: 'info',
44
- message: 'Static background, no blur.',
45
- blur: false,
40
+ message: 'Bottom left toast keeps the same theme blur.',
46
41
  },
47
42
  {
48
43
  position: 'bottom-center',
49
44
  label: 'Batch completed',
50
45
  tone: 'success',
51
- message: 'Bottom center rises into place.',
52
- blur: 16,
46
+ message: 'Bottom center toast uses the theme defaults.',
53
47
  },
54
48
  {
55
49
  position: 'bottom-right',
56
50
  label: 'Export failed',
57
51
  tone: 'danger',
58
52
  message: 'Actionable toast from the right edge.',
59
- blur: 12,
60
53
  },
61
54
  ];
62
55
  export function OverlaysSection({ setModalOpen, setBlurModalOpen, setFastModalOpen, setRiseModalOpen, setSlowModalOpen, setDangerModalOpen, onOpenCode, }) {
63
56
  const toast = useToast();
64
57
  const [dialogOpen, setDialogOpen] = useState(false);
65
58
  const [drawerOpen, setDrawerOpen] = useState(false);
66
- return (_jsxs(_Fragment, { children: [_jsx(UiExampleSection, { id: 'overlay-primitives-example', title: 'Overlay primitives', description: 'Popover, Tooltip and Modal entry points.', children: _jsxs(ExampleTile, { title: 'Popover, tooltip and modal', code: codeSamples.overlays, onOpen: onOpenCode, children: [_jsxs("div", { className: 'oui-ui-row', children: [_jsx(Popover, { trigger: _jsx(Button, { v: 'surface', rightIcon: _jsx(LuChevronDown, { size: 16 }), children: "Open popover" }), children: _jsxs(Stack, { g: 2, p: 1, children: [_jsx(Text, { fw: 700, children: "Popover content" }), _jsx(Text, { color: 'var(--oui-muted)', fs: '13px', children: "Shared positioning and presence." })] }) }), _jsx(Tooltip, { content: 'Tooltip uses the same floating layer', children: _jsx(Button, { v: 'outline', children: "Hover me" }) }), _jsx(Button, { v: 'surface', onClick: () => setDialogOpen(true), children: "Dialog" }), _jsx(Button, { v: 'surface', onClick: () => setDrawerOpen(true), children: "Drawer" })] }), _jsxs("div", { className: 'oui-ui-row', children: [_jsx(Button, { onClick: () => setModalOpen(true), children: "Default modal" }), _jsx(Button, { v: 'surface', onClick: () => setBlurModalOpen(true), children: "Blur modal" }), _jsx(Button, { v: 'outline', onClick: () => setFastModalOpen(true), children: "Fast modal" }), _jsx(Button, { v: 'outline', onClick: () => setRiseModalOpen(true), children: "Rise modal" }), _jsx(Button, { v: 'outline', onClick: () => setSlowModalOpen(true), children: "Very slow modal" }), _jsx(Button, { v: 'soft', tone: 'danger', onClick: () => setDangerModalOpen(true), children: "Danger modal" })] })] }) }), _jsx(Dialog.Root, { open: dialogOpen, onOpenChange: setDialogOpen, children: _jsx(Dialog.Content, { maxWidth: 460, children: _jsxs(Stack, { g: 3, children: [_jsxs(Stack, { g: 1, children: [_jsx(Dialog.Title, { children: "Dialog title" }), _jsx(Dialog.Description, { children: "Dialog keeps the Modal layer but owns accessible title and description." })] }), _jsxs(Flex, { g: 2, j: 'e', children: [_jsx(Dialog.Close, { children: _jsx(Button, { v: 'surface', children: "Cancel" }) }), _jsx(Button, { onClick: () => setDialogOpen(false), children: "Confirm" })] })] }) }) }), _jsx(Drawer, { open: drawerOpen, onOpenChange: setDrawerOpen, title: 'Drawer title', description: 'Drawer uses the same overlay stack and focus behavior.', footer: (_jsxs(Flex, { g: 2, j: 'e', children: [_jsx(Button, { v: 'surface', onClick: () => setDrawerOpen(false), children: "Close" }), _jsx(Button, { children: "Apply" })] })), children: _jsxs(Stack, { g: 2, children: [_jsx(Text, { tone: 'muted', fs: '13px', children: "Use Drawer for side panels and contextual forms." }), _jsx(Button, { v: 'soft', children: "Panel action" })] }) }), _jsx(UiExampleSection, { id: 'toast-example', title: 'Toast', description: 'Toast positions, actions, progress, dedupe and glass background.', children: _jsx(ExampleTile, { title: 'Toast', code: codeSamples.toast, onOpen: onOpenCode, children: _jsxs(Stack, { g: 2, children: [_jsxs("div", { className: 'oui-ui-row', children: [_jsx(Button, { v: 'soft', tone: 'success', onClick: () => toast.success({
59
+ return (_jsxs(_Fragment, { children: [_jsx(UiExampleSection, { id: "overlay-primitives-example", title: "Overlay primitives", description: "Popover, Tooltip and Modal entry points.", children: _jsxs(ExampleTile, { title: "Popover, tooltip and modal", code: codeSamples.overlays, onOpen: onOpenCode, children: [_jsxs("div", { className: "oui-ui-row", children: [_jsx(Popover, { trigger: _jsx(Button, { v: "surface", rightIcon: _jsx(LuChevronDown, { size: 16 }), children: "Open popover" }), children: _jsxs(Stack, { g: 2, p: 1, children: [_jsx(Text, { fw: 700, children: "Popover content" }), _jsx(Text, { color: "var(--oui-muted)", fs: "13px", children: "Shared positioning and presence." })] }) }), _jsx(Tooltip, { content: "Tooltip uses the same floating layer", children: _jsx(Button, { v: "outline", children: "Hover me" }) }), _jsx(Button, { v: "surface", onClick: () => setDialogOpen(true), children: "Dialog" }), _jsx(Button, { v: "surface", onClick: () => setDrawerOpen(true), children: "Drawer" })] }), _jsxs("div", { className: "oui-ui-row", children: [_jsx(Button, { onClick: () => setModalOpen(true), children: "Default modal" }), _jsx(Button, { v: "surface", onClick: () => setBlurModalOpen(true), children: "Blur modal" }), _jsx(Button, { v: "outline", onClick: () => setFastModalOpen(true), children: "Fast modal" }), _jsx(Button, { v: "outline", onClick: () => setRiseModalOpen(true), children: "Rise modal" }), _jsx(Button, { v: "outline", onClick: () => setSlowModalOpen(true), children: "Very slow modal" }), _jsx(Button, { v: "soft", tone: "danger", onClick: () => setDangerModalOpen(true), children: "Danger modal" })] })] }) }), _jsx(Dialog.Root, { open: dialogOpen, onOpenChange: setDialogOpen, children: _jsx(Dialog.Content, { maxWidth: 460, children: _jsxs(Stack, { g: 3, children: [_jsxs(Stack, { g: 1, children: [_jsx(Dialog.Title, { children: "Dialog title" }), _jsx(Dialog.Description, { children: "Dialog keeps the Modal layer but owns accessible title and description." })] }), _jsxs(Flex, { g: 2, j: "e", children: [_jsx(Dialog.Close, { children: _jsx(Button, { v: "surface", children: "Cancel" }) }), _jsx(Button, { onClick: () => setDialogOpen(false), children: "Confirm" })] })] }) }) }), _jsx(Drawer, { open: drawerOpen, onOpenChange: setDrawerOpen, title: "Drawer title", description: "Drawer uses the same overlay stack and focus behavior.", footer: _jsxs(Flex, { g: 2, j: "e", children: [_jsx(Button, { v: "surface", onClick: () => setDrawerOpen(false), children: "Close" }), _jsx(Button, { children: "Apply" })] }), children: _jsxs(Stack, { g: 2, children: [_jsx(Text, { tone: "muted", fs: "13px", children: "Use Drawer for side panels and contextual forms." }), _jsx(Button, { v: "soft", children: "Panel action" })] }) }), _jsx(UiExampleSection, { id: "toast-example", title: "Toast", description: "Toast positions, actions, progress, dedupe and glass background.", children: _jsx(ExampleTile, { title: "Toast", code: codeSamples.toast, onOpen: onOpenCode, children: _jsxs(Stack, { g: 2, children: [_jsxs("div", { className: "oui-ui-row", children: [_jsx(Button, { v: "soft", tone: "success", onClick: () => toast.success({
67
60
  title: 'Saved successfully',
68
61
  message: 'The settings are synced with the current theme.',
69
62
  position: 'bottom-right',
70
- }), children: "Success" }), _jsx(Button, { v: 'soft', tone: 'warning', onClick: () => toast.warning({
63
+ }), children: "Success" }), _jsx(Button, { v: "soft", tone: "success", onClick: () => toast.success({
64
+ title: 'Endless',
65
+ message: 'This success toast stays until you click it.',
66
+ position: 'bottom-right',
67
+ duration: null,
68
+ dedupeKey: 'endless-success-toast',
69
+ }), children: "Endless" }), _jsx(Button, { v: "soft", tone: "warning", onClick: () => toast.warning({
71
70
  title: 'Needs attention',
72
71
  message: 'Only 4 items need attention in this view.',
73
72
  dedupeKey: 'needs-attention',
74
73
  position: 'top-right',
75
- }), children: "Warning dedupe" }), _jsx(Button, { v: 'soft', tone: 'danger', onClick: () => toast.error({
74
+ }), children: "Warning dedupe" }), _jsx(Button, { v: "soft", tone: "danger", onClick: () => toast.error({
76
75
  title: 'Export failed',
77
76
  message: 'The report can be retried without closing this page.',
78
77
  position: 'bottom-right',
@@ -80,33 +79,23 @@ export function OverlaysSection({ setModalOpen, setBlurModalOpen, setFastModalOp
80
79
  label: 'Retry',
81
80
  onClick: () => toast.info('Retry queued'),
82
81
  },
83
- }), children: "Error action" }), _jsx(Button, { v: 'surface', onClick: () => toast.info({
82
+ }), children: "Error action" }), _jsx(Button, { v: "surface", onClick: () => toast.info({
84
83
  title: 'Pinned note',
85
84
  message: 'duration: null keeps this toast visible.',
86
85
  position: 'top-center',
87
86
  duration: null,
88
87
  closeButton: true,
89
- }), children: "Pinned" }), _jsx(Button, { v: 'surface', onClick: () => toast.info({
88
+ }), children: "Pinned" }), _jsx(Button, { v: "surface", onClick: () => toast.info({
90
89
  title: 'Glass background',
91
- message: 'Custom blur and translucent background.',
90
+ message: 'Theme blur and translucent background.',
92
91
  position: 'bottom-right',
93
- background: 'rgb(18 24 34 / 72%)',
94
- blur: 18,
95
- borderColor: 'rgb(255 255 255 / 18%)',
96
- duration: 5200,
97
- }), children: "Glass" }), _jsx(Button, { v: 'surface', onClick: () => toast.info({
98
- title: 'Static background',
99
- message: 'Blur can be disabled per toast.',
100
- position: 'bottom-left',
101
- background: 'var(--oui-floating-bg)',
102
- blur: false,
103
92
  duration: 5200,
104
- }), children: "Static" })] }), _jsx(Text, { color: 'var(--oui-muted)', fs: '13px', lh: 1.45, children: "Toasts support typed helpers, controlled position, progress line, dedupe keys, actions and fixed viewport above modals." }), _jsx("div", { className: 'oui-ui-row', children: toastPositions.map((item) => (_jsx(Button, { size: 1, v: 'surface', onClick: () => toast.info({
93
+ }), children: "Glass" })] }), _jsx(Text, { color: "var(--oui-muted)", fs: "13px", lh: 1.45, children: "Toasts support typed helpers, controlled position, progress line, dedupe keys, actions and fixed viewport above modals." }), _jsx("div", { className: "oui-ui-row", children: toastPositions.map((item) => (_jsx(Button, { size: 1, v: "surface", onClick: () => toast.info({
105
94
  title: item.label,
106
- message: 'Positioned toast with directional bubble animation.',
95
+ message: 'Positioned toast with the default glass surface.',
107
96
  position: item.position,
108
97
  duration: 3600,
109
- }), children: item.label }, item.position))) }), _jsxs("div", { className: 'oui-ui-row', children: [_jsx(Button, { size: 1, tone: 'success', v: 'soft', onClick: () => {
98
+ }), children: item.label }, item.position))) }), _jsxs("div", { className: "oui-ui-row", children: [_jsx(Button, { size: 1, tone: "success", v: "soft", onClick: () => {
110
99
  toastPositionVariants.forEach((item, index) => {
111
100
  window.setTimeout(() => {
112
101
  toast.push({
@@ -114,16 +103,14 @@ export function OverlaysSection({ setModalOpen, setBlurModalOpen, setFastModalOp
114
103
  message: item.message,
115
104
  position: item.position,
116
105
  tone: item.tone,
117
- background: item.background,
118
- blur: item.blur,
119
106
  duration: 4200 + index * 220,
120
107
  });
121
108
  }, index * 120);
122
109
  });
123
- }, children: "Show all positions" }), _jsx(Button, { size: 1, tone: 'warning', v: 'soft', onClick: () => toast.warning({
110
+ }, children: "Show all positions" }), _jsx(Button, { size: 1, tone: "warning", v: "soft", onClick: () => toast.warning({
124
111
  title: 'Long task queued',
125
112
  message: 'A longer duration shows the progress strip clearly.',
126
113
  position: 'bottom-center',
127
114
  duration: 9000,
128
- }), children: "Long progress" })] })] }) }) }), _jsx(UiExampleSection, { id: 'overlay-settings-example', title: 'Overlay settings', description: 'Modal overlay color, opacity, blur and animation settings.', children: _jsx(ExampleTile, { title: 'Overlay settings', code: codeSamples.overlaySettings, onOpen: onOpenCode, children: _jsx(Text, { color: 'var(--oui-muted)', lh: 1.5, children: "The modal accepts overlay color, opacity, blur, animation and animationDuration props. Default animation and duration come from the theme." }) }) })] }));
115
+ }), children: "Long progress" })] })] }) }) }), _jsx(UiExampleSection, { id: "overlay-settings-example", title: "Overlay settings", description: "Modal overlay color, opacity, blur and animation settings.", children: _jsx(ExampleTile, { title: "Overlay settings", code: codeSamples.overlaySettings, onOpen: onOpenCode, children: _jsx(Text, { color: "var(--oui-muted)", lh: 1.5, children: "The modal accepts overlay color, opacity, blur, animation and animationDuration props. Default animation and duration come from the theme." }) }) })] }));
129
116
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleSelectionSection.d.ts","sourceRoot":"","sources":["../../src/example/ExampleSelectionSection.tsx"],"names":[],"mappings":"AAKA,OAAO,EAYH,KAAK,eAAe,EACvB,MAAM,IAAI,CAAC;AAEZ,OAAO,EAAc,KAAK,WAAW,EAAC,MAAM,eAAe,CAAC;AAC5D,OAAO,EAIH,KAAK,YAAY,EACpB,MAAM,eAAe,CAAC;AAGvB,KAAK,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE/C,KAAK,qBAAqB,GAAG;IACzB,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACpD,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,4BAA4B,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7D,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,wBAAwB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzD,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,kBAAkB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACnD,WAAW,EAAE,YAAY,GAAG,IAAI,CAAC;IACjC,mBAAmB,EAAE,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1D,cAAc,EAAE,YAAY,GAAG,IAAI,CAAC;IACpC,sBAAsB,EAAE,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7D,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IAC3C,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS,KAAK,IAAI,CAAC;CACtD,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,EAC7B,MAAM,EACN,OAAO,EACP,eAAe,EACf,WAAW,EACX,mBAAmB,EACnB,oBAAoB,EACpB,4BAA4B,EAC5B,gBAAgB,EAChB,wBAAwB,EACxB,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,WAAW,EACX,mBAAmB,EACnB,UAAU,EACV,kBAAkB,EAClB,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,OAAO,GACV,EAAE,qBAAqB,2CAqMvB"}
1
+ {"version":3,"file":"ExampleSelectionSection.d.ts","sourceRoot":"","sources":["../../src/example/ExampleSelectionSection.tsx"],"names":[],"mappings":"AAKA,OAAO,EAYH,KAAK,eAAe,EACvB,MAAM,IAAI,CAAC;AAEZ,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAiD,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAGjG,KAAK,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE/C,KAAK,qBAAqB,GAAG;IACzB,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACpD,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,4BAA4B,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7D,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,wBAAwB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzD,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,kBAAkB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACnD,WAAW,EAAE,YAAY,GAAG,IAAI,CAAC;IACjC,mBAAmB,EAAE,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1D,cAAc,EAAE,YAAY,GAAG,IAAI,CAAC;IACpC,sBAAsB,EAAE,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7D,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IAC3C,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS,KAAK,IAAI,CAAC;CACtD,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,EAC7B,MAAM,EACN,OAAO,EACP,eAAe,EACf,WAAW,EACX,mBAAmB,EACnB,oBAAoB,EACpB,4BAA4B,EAC5B,gBAAgB,EAChB,wBAAwB,EACxB,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,WAAW,EACX,mBAAmB,EACnB,UAAU,EACV,kBAAkB,EAClB,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,OAAO,GACV,EAAE,qBAAqB,2CAmLvB"}
@@ -5,23 +5,23 @@ import { LuHistory, LuListChecks, LuPlus } from 'react-icons/lu';
5
5
  import { Checkbox, Combobox, EntityPicker, MultiSelect, PaginatedCombobox, RadioGroup, SegmentedControl, Select, Switch, Tabs, Text, } from '..';
6
6
  import { ExampleTile } from './CodePreview';
7
7
  import { codeSamples } from './codeSamples';
8
- import { getOptionItems, getOwnerItems, loadEntityPage, } from './exampleData';
8
+ import { getOptionItems, getOwnerItems, loadEntityPage } from './exampleData';
9
9
  import { UiExampleSection } from './UiExampleSection';
10
10
  export function SelectionSection({ locale, segment, onSegmentChange, selectValue, onSelectValueChange, selectNoChevronValue, onSelectNoChevronValueChange, selectPlainValue, onSelectPlainValueChange, comboValue, onComboValueChange, entityValue, onEntityValueChange, paginatedValue, onPaginatedValueChange, ownerValues, onOwnerValuesChange, radioValue, onRadioValueChange, tabValue, onTabValueChange, onOpenCode, onToast, }) {
11
11
  const optionItems = getOptionItems(locale);
12
12
  const ownerItems = getOwnerItems(locale);
13
13
  const copy = selectionCopy[locale];
14
14
  const loadLocalizedEntityPage = useCallback((page, search) => loadEntityPage(locale, page, search), [locale]);
15
- return (_jsxs(_Fragment, { children: [_jsx(UiExampleSection, { id: 'selects-example', title: 'Selects', description: 'Select, Combobox, MultiSelect, EntityPicker wrapper, lower-level PaginatedCombobox and SegmentedControl.', children: _jsxs(ExampleTile, { title: 'Selects and comboboxes', code: codeSamples.selection, onOpen: onOpenCode, children: [_jsx(Select, { items: optionItems, value: selectValue, onValueChange: onSelectValueChange, clearable: true }), _jsx(Select, { items: optionItems, value: selectNoChevronValue, onValueChange: onSelectNoChevronValueChange, clearable: true, showChevron: false, placeholder: 'Clearable without chevron' }), _jsx(Select, { items: optionItems, value: selectPlainValue, onValueChange: onSelectPlainValueChange, clearable: false, showChevron: false, placeholder: 'Plain select' }), _jsx(Combobox, { items: optionItems, value: comboValue, onValueChange: onComboValueChange, placeholder: 'Find status' }), _jsx(MultiSelect, { items: ownerItems, value: ownerValues, onValueChange: onOwnerValuesChange, placeholder: copy.responsibleUsers, clearable: true, renderValue: (items) => items.length === 1
15
+ return (_jsxs(_Fragment, { children: [_jsx(UiExampleSection, { id: "selects-example", title: "Selects", description: "Select, Combobox, MultiSelect, EntityPicker wrapper, lower-level PaginatedCombobox and SegmentedControl.", children: _jsxs(ExampleTile, { title: "Selects and comboboxes", code: codeSamples.selection, onOpen: onOpenCode, children: [_jsx(Select, { items: optionItems, value: selectValue, onValueChange: onSelectValueChange, clearable: true }), _jsx(Select, { items: optionItems, value: selectNoChevronValue, onValueChange: onSelectNoChevronValueChange, clearable: true, showChevron: false, placeholder: "Clearable without chevron" }), _jsx(Select, { items: optionItems, value: selectPlainValue, onValueChange: onSelectPlainValueChange, clearable: false, showChevron: false, placeholder: "Plain select" }), _jsx(Combobox, { items: optionItems, value: comboValue, onValueChange: onComboValueChange, placeholder: "Find status" }), _jsx(MultiSelect, { items: ownerItems, value: ownerValues, onValueChange: onOwnerValuesChange, placeholder: copy.responsibleUsers, clearable: true, renderValue: (items) => items.length === 1
16
16
  ? items[0]?.label
17
- : copy.responsibleCount(items.length) }), _jsx(EntityPicker, { value: entityValue, onValueChange: onEntityValueChange, loadPage: loadLocalizedEntityPage, getEntityId: (item) => item.id, renderValue: (item) => item.article, renderEntity: (item) => (_jsxs(_Fragment, { children: [_jsxs("span", { className: 'oui-entity-option-main', children: [_jsx("span", { className: 'oui-entity-option-code', children: item.article }), _jsx("span", { className: 'oui-entity-option-meta', children: item.name })] }), _jsx("span", { className: 'oui-entity-option-badge', children: item.status })] })), placeholder: copy.entityPicker, clearable: true, createAction: {
17
+ : copy.responsibleCount(items.length) }), _jsx(EntityPicker, { value: entityValue, onValueChange: onEntityValueChange, loadPage: loadLocalizedEntityPage, getEntityId: (item) => item.id, renderValue: (item) => item.article, renderEntity: (item) => (_jsxs(_Fragment, { children: [_jsxs("span", { className: "oui-entity-option-main", children: [_jsx("span", { className: "oui-entity-option-code", children: item.article }), _jsx("span", { className: "oui-entity-option-meta", children: item.name })] }), _jsx("span", { className: "oui-entity-option-badge", children: item.status })] })), placeholder: copy.entityPicker, clearable: true, createAction: {
18
18
  label: copy.createEntityFromSearch,
19
19
  onCreate: (search) => onToast(copy.createEntityToast(search), 'info'),
20
20
  }, optionAction: {
21
21
  icon: _jsx(LuPlus, { size: 14 }),
22
22
  label: (item) => copy.addEntity(item.article),
23
23
  onClick: (item) => onToast(copy.entityAction(item.article), 'success'),
24
- } }), _jsx(PaginatedCombobox, { value: paginatedValue, onChange: onPaginatedValueChange, loadPage: loadLocalizedEntityPage, getItemId: (item) => item.id, renderSelectedLabel: (item) => item.article, renderOption: (item) => (_jsxs("span", { className: 'oui-entity-option-main', children: [_jsx("span", { className: 'oui-entity-option-code', children: item.article }), _jsx("span", { className: 'oui-entity-option-meta', children: item.name })] })), placeholder: 'Paginated combobox', clearable: true, searchAction: {
24
+ } }), _jsx(PaginatedCombobox, { value: paginatedValue, onChange: onPaginatedValueChange, loadPage: loadLocalizedEntityPage, getItemId: (item) => item.id, renderSelectedLabel: (item) => item.article, renderOption: (item) => (_jsxs("span", { className: "oui-entity-option-main", children: [_jsx("span", { className: "oui-entity-option-code", children: item.article }), _jsx("span", { className: "oui-entity-option-meta", children: item.name })] })), placeholder: "Paginated combobox", clearable: true, searchAction: {
25
25
  label: copy.createEntityFromSearch,
26
26
  onClick: (search) => onToast(copy.createEntityToast(search), 'info'),
27
27
  }, optionAction: {
@@ -32,22 +32,22 @@ export function SelectionSection({ locale, segment, onSegmentChange, selectValue
32
32
  { value: 'active', label: 'Active' },
33
33
  { value: 'drafts', label: 'Drafts' },
34
34
  { value: 'archive', label: 'Archive' },
35
- ], value: segment, onValueChange: onSegmentChange })] }) }), _jsx(UiExampleSection, { id: 'choice-controls-example', title: 'Checkbox, switch and radio', description: 'Binary and single-choice controls.', children: _jsxs(ExampleTile, { title: 'Checkbox, switch and radio', code: codeSamples.selectionGroup, onOpen: onOpenCode, children: [_jsx(Checkbox, { defaultChecked: true, children: "Confirmed" }), _jsx(Checkbox, { children: "Needs review" }), _jsx(Checkbox, { disabled: true, children: "Locked option" }), _jsx(Switch, { defaultChecked: true, children: "Auto updates" }), _jsx(Switch, { children: "Manual mode" }), _jsx(Switch, { disabled: true, children: "Disabled switch" }), _jsx(RadioGroup, { value: radioValue, onValueChange: onRadioValueChange, name: 'oui-example-mode', items: [
35
+ ], value: segment, onValueChange: onSegmentChange })] }) }), _jsx(UiExampleSection, { id: "choice-controls-example", title: "Checkbox, switch and radio", description: "Binary and single-choice controls.", children: _jsxs(ExampleTile, { title: "Checkbox, switch and radio", code: codeSamples.selectionGroup, onOpen: onOpenCode, children: [_jsx(Checkbox, { defaultChecked: true, children: "Confirmed" }), _jsx(Checkbox, { children: "Needs review" }), _jsx(Checkbox, { disabled: true, children: "Locked option" }), _jsx(Switch, { defaultChecked: true, children: "Auto updates" }), _jsx(Switch, { children: "Manual mode" }), _jsx(Switch, { disabled: true, children: "Disabled switch" }), _jsx(RadioGroup, { value: radioValue, onValueChange: onRadioValueChange, name: "oui-example-mode", items: [
36
36
  { value: 'manual', label: 'Manual' },
37
37
  { value: 'auto', label: 'Automatic' },
38
- ] })] }) }), _jsx(UiExampleSection, { id: 'tabs-example', title: 'Tabs', description: 'Segmented content navigation with icons, badges and controlled value.', children: _jsx(ExampleTile, { title: 'Tabs', code: codeSamples.tabs, onOpen: onOpenCode, children: _jsx(Tabs, { value: tabValue, onValueChange: onTabValueChange, items: [
38
+ ] })] }) }), _jsx(UiExampleSection, { id: "tabs-example", title: "Tabs", description: "Segmented content navigation with icons, badges and controlled value.", children: _jsx(ExampleTile, { title: "Tabs", code: codeSamples.tabs, onOpen: onOpenCode, children: _jsx(Tabs, { value: tabValue, onValueChange: onTabValueChange, items: [
39
39
  {
40
40
  value: 'overview',
41
41
  label: 'Overview',
42
42
  icon: _jsx(LuListChecks, { size: 16 }),
43
43
  badge: '12',
44
- content: _jsx(Text, { color: 'var(--oui-muted)', children: "Main summary tab." }),
44
+ content: _jsx(Text, { color: "var(--oui-muted)", children: "Main summary tab." }),
45
45
  },
46
46
  {
47
47
  value: 'history',
48
48
  label: 'History',
49
49
  icon: _jsx(LuHistory, { size: 16 }),
50
- content: _jsx(Text, { color: 'var(--oui-muted)', children: "History and changes." }),
50
+ content: _jsx(Text, { color: "var(--oui-muted)", children: "History and changes." }),
51
51
  },
52
52
  ] }) }) })] }));
53
53
  }
@@ -1,11 +1,11 @@
1
1
  import { type CodeExample } from './codeSamples';
2
- export declare function BadgeSection({ onOpenCode, }: {
2
+ export declare function BadgeSection({ onOpenCode }: {
3
3
  onOpenCode: (example: CodeExample) => void;
4
4
  }): import("react/jsx-runtime").JSX.Element;
5
- export declare function StateCardSection({ onOpenCode, }: {
5
+ export declare function StateCardSection({ onOpenCode }: {
6
6
  onOpenCode: (example: CodeExample) => void;
7
7
  }): import("react/jsx-runtime").JSX.Element;
8
- export declare function IconTextSection({ onOpenCode, }: {
8
+ export declare function IconTextSection({ onOpenCode }: {
9
9
  onOpenCode: (example: CodeExample) => void;
10
10
  }): import("react/jsx-runtime").JSX.Element;
11
11
  //# sourceMappingURL=ExampleStateSection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleStateSection.d.ts","sourceRoot":"","sources":["../../src/example/ExampleStateSection.tsx"],"names":[],"mappings":"AA2BA,OAAO,EAAC,KAAK,WAAW,EAAC,MAAM,eAAe,CAAC;AAmH/C,wBAAgB,YAAY,CAAC,EACzB,UAAU,GACb,EAAE;IACC,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;CAC9C,2CAoCA;AAED,wBAAgB,gBAAgB,CAAC,EAC7B,UAAU,GACb,EAAE;IACC,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;CAC9C,2CAsEA;AAED,wBAAgB,eAAe,CAAC,EAC5B,UAAU,GACb,EAAE;IACC,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;CAC9C,2CAgCA"}
1
+ {"version":3,"file":"ExampleStateSection.d.ts","sourceRoot":"","sources":["../../src/example/ExampleStateSection.tsx"],"names":[],"mappings":"AA6BA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAoHjD,wBAAgB,YAAY,CAAC,EAAE,UAAU,EAAE,EAAE;IAAE,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAA;CAAE,2CA4C1F;AAED,wBAAgB,gBAAgB,CAAC,EAAE,UAAU,EAAE,EAAE;IAAE,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAA;CAAE,2CAqE9F;AAED,wBAAgB,eAAe,CAAC,EAAE,UAAU,EAAE,EAAE;IAAE,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAA;CAAE,2CA4B7F"}
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useState } from 'react';
4
4
  import { LuCircleAlert, LuCircleCheck, LuCircleX, LuClock3, LuInfo, LuLoaderCircle, LuPackageCheck, LuShieldCheck, } from 'react-icons/lu';
5
- import { Badge, BadgeSelectMenu, Button, EmptyState, ErrorState, IconText, LoadingState, Stack, StateCard, Text, } from '..';
5
+ import { Badge, BadgeSelectMenu, Button, EmptyState, ErrorState, Flex, Grid, IconText, LoadingState, Stack, StateCard, Text, } from '..';
6
6
  import { ExampleTile } from './CodePreview';
7
7
  import {} from './codeSamples';
8
8
  import { UiExampleSection } from './UiExampleSection';
@@ -16,6 +16,7 @@ const stateCardSample = {
16
16
  Button,
17
17
  EmptyState,
18
18
  ErrorState,
19
+ Grid,
19
20
  LoadingState,
20
21
  Stack,
21
22
  StateCard,
@@ -33,7 +34,7 @@ const validationItems = [
33
34
  title='General state'
34
35
  description='One card for informational, empty, loading and error states.'
35
36
  />
36
- <div className='oui-ui-state-grid'>
37
+ <Grid columns='repeat(auto-fit, minmax(min(100%, 260px), 1fr))' g={2}>
37
38
  <StateCard
38
39
  v='surface'
39
40
  tone='primary'
@@ -54,7 +55,7 @@ const validationItems = [
54
55
  title='Ghost'
55
56
  description='No extra background.'
56
57
  />
57
- </div>
58
+ </Grid>
58
59
  <StateCard tone='danger' title='Validation failed'>
59
60
  <Stack g={1}>
60
61
  {validationItems.map((item) => (
@@ -65,11 +66,11 @@ const validationItems = [
65
66
  ))}
66
67
  </Stack>
67
68
  </StateCard>
68
- <div className='oui-ui-state-grid'>
69
+ <Grid columns='repeat(auto-fit, minmax(min(100%, 260px), 1fr))' g={2}>
69
70
  <EmptyState compact description='No records yet.' />
70
71
  <LoadingState compact description='Loading the next page.' />
71
72
  <ErrorState compact description='Request failed.' onRetry={reload} />
72
- </div>
73
+ </Grid>
73
74
  <StateCard
74
75
  tone='success'
75
76
  title='Saved'
@@ -103,29 +104,29 @@ const statusItems = [
103
104
  };
104
105
  const iconTextSample = {
105
106
  title: 'IconText',
106
- code: `import {IconText, Stack} from '@orcestr/ui';
107
+ code: `import {Flex, IconText} from '@orcestr/ui';
107
108
  import {LuCircleAlert, LuCircleCheck, LuCircleX, LuInfo, LuLoaderCircle} from 'react-icons/lu';
108
109
 
109
- <Stack g={1}>
110
+ <Flex g={2} wrap>
110
111
  <IconText icon={<LuLoaderCircle />} iconTone='info' iconSpin>Saving changes</IconText>
111
112
  <IconText icon={<LuCircleCheck />} iconTone='success'>Saved</IconText>
112
113
  <IconText icon={<LuCircleX />} iconTone='danger'>Save failed</IconText>
113
114
  <IconText icon={<LuCircleAlert />} iconTone='warning' fw={760}>Review required</IconText>
114
115
  <IconText icon={<LuInfo />} iconTone='info' fs='13px'>Sync scheduled</IconText>
115
- </Stack>`,
116
+ </Flex>`,
116
117
  };
117
- export function BadgeSection({ onOpenCode, }) {
118
+ export function BadgeSection({ onOpenCode }) {
118
119
  const [status, setStatus] = useState('review');
119
120
  const statusItems = [
120
121
  { value: 'draft', label: 'Draft' },
121
122
  { value: 'review', label: 'Review' },
122
123
  { value: 'accepted', label: 'Accepted' },
123
124
  ];
124
- return (_jsx(UiExampleSection, { id: 'badges-example', title: 'Badge', description: 'Compact counters and statuses without a special wrapper.', children: _jsx(ExampleTile, { title: 'Badge', code: badgeSample.code, onOpen: onOpenCode, children: _jsxs("div", { className: 'oui-ui-badge-demo', children: [_jsxs(Badge, { tone: 'neutral', children: ["Requested ", _jsx("strong", { children: "43" })] }), _jsxs(Badge, { tone: 'info', icon: _jsx(LuClock3, {}), children: ["Ordered ", _jsx("strong", { children: "12" })] }), _jsxs(Badge, { tone: 'success', icon: _jsx(LuPackageCheck, {}), children: ["Accepted ", _jsx("strong", { children: "8" })] }), _jsx(Badge, { tone: 'warning', v: 'surface', icon: _jsx(LuShieldCheck, {}), children: "Review" }), _jsx(Badge, { tone: 'danger', v: 'outline', children: "Blocked" }), _jsx(Badge, { tone: 'primary', v: 'solid', children: "Primary" }), _jsx(BadgeSelectMenu, { value: status, items: statusItems, onValueChange: setStatus, tone: 'warning' })] }) }) }));
125
+ return (_jsx(UiExampleSection, { id: "badges-example", title: "Badge", description: "Compact counters and statuses without a special wrapper.", children: _jsx(ExampleTile, { title: "Badge", code: badgeSample.code, onOpen: onOpenCode, children: _jsxs(Flex, { g: 2, wrap: true, children: [_jsxs(Badge, { tone: "neutral", children: ["Requested ", _jsx("strong", { children: "43" })] }), _jsxs(Badge, { tone: "info", icon: _jsx(LuClock3, {}), children: ["Ordered ", _jsx("strong", { children: "12" })] }), _jsxs(Badge, { tone: "success", icon: _jsx(LuPackageCheck, {}), children: ["Accepted ", _jsx("strong", { children: "8" })] }), _jsx(Badge, { tone: "warning", v: "surface", icon: _jsx(LuShieldCheck, {}), children: "Review" }), _jsx(Badge, { tone: "danger", v: "outline", children: "Blocked" }), _jsx(Badge, { tone: "primary", v: "solid", children: "Primary" }), _jsx(BadgeSelectMenu, { value: status, items: statusItems, onValueChange: setStatus, tone: "warning" })] }) }) }));
125
126
  }
126
- export function StateCardSection({ onOpenCode, }) {
127
- return (_jsx(UiExampleSection, { id: 'state-card-example', title: 'StateCard', description: 'Block-level state for empty, loading, error, access and status surfaces.', children: _jsx(ExampleTile, { title: 'StateCard', code: stateCardSample.code, onOpen: onOpenCode, children: _jsxs(Stack, { g: 2, children: [_jsx(StateCard, { tone: 'info', title: 'General state', description: 'One card for informational, empty, loading and error states.' }), _jsxs("div", { className: 'oui-ui-state-grid', children: [_jsx(StateCard, { v: 'surface', tone: 'primary', title: 'Surface', titleTone: 'primary', description: 'Uses the regular surface with a toned title.', descriptionTone: 'muted' }), _jsx(StateCard, { v: 'outline', tone: 'warning', title: 'Outline', description: 'Useful when the card should stay quiet.' }), _jsx(StateCard, { v: 'ghost', tone: 'success', title: 'Ghost', description: 'No extra background.' })] }), _jsx(StateCard, { tone: 'danger', title: 'Validation failed', children: _jsx(Stack, { g: 1, children: validationItems.map((item) => (_jsxs(Text, { fs: '13px', lh: 1.3, children: [_jsxs("strong", { children: [item.label, ": "] }), item.message] }, item.key))) }) }), _jsxs("div", { className: 'oui-ui-state-grid', children: [_jsx(EmptyState, { compact: true, description: 'No records yet.' }), _jsx(LoadingState, { compact: true, description: 'Loading the next page.' }), _jsx(ErrorState, { compact: true, description: 'Request failed.', onRetry: () => undefined })] }), _jsx(StateCard, { tone: 'success', title: 'Saved', description: 'Changes were applied.', action: _jsx(Button, { size: 1, v: 'surface', children: "Open" }) })] }) }) }));
127
+ export function StateCardSection({ onOpenCode }) {
128
+ return (_jsx(UiExampleSection, { id: "state-card-example", title: "StateCard", description: "Block-level state for empty, loading, error, access and status surfaces.", children: _jsx(ExampleTile, { title: "StateCard", code: stateCardSample.code, onOpen: onOpenCode, children: _jsxs(Stack, { g: 2, children: [_jsx(StateCard, { tone: "info", title: "General state", description: "One card for informational, empty, loading and error states." }), _jsxs(Grid, { columns: "repeat(auto-fit, minmax(min(100%, 260px), 1fr))", g: 2, children: [_jsx(StateCard, { v: "surface", tone: "primary", title: "Surface", titleTone: "primary", description: "Uses the regular surface with a toned title.", descriptionTone: "muted" }), _jsx(StateCard, { v: "outline", tone: "warning", title: "Outline", description: "Useful when the card should stay quiet." }), _jsx(StateCard, { v: "ghost", tone: "success", title: "Ghost", description: "No extra background." })] }), _jsx(StateCard, { tone: "danger", title: "Validation failed", children: _jsx(Stack, { g: 1, children: validationItems.map((item) => (_jsxs(Text, { fs: "13px", lh: 1.3, children: [_jsxs("strong", { children: [item.label, ": "] }), item.message] }, item.key))) }) }), _jsxs(Grid, { columns: "repeat(auto-fit, minmax(min(100%, 260px), 1fr))", g: 2, children: [_jsx(EmptyState, { compact: true, description: "No records yet." }), _jsx(LoadingState, { compact: true, description: "Loading the next page." }), _jsx(ErrorState, { compact: true, description: "Request failed.", onRetry: () => undefined })] }), _jsx(StateCard, { tone: "success", title: "Saved", description: "Changes were applied.", action: _jsx(Button, { size: 1, v: "surface", children: "Open" }) })] }) }) }));
128
129
  }
129
- export function IconTextSection({ onOpenCode, }) {
130
- return (_jsx(UiExampleSection, { id: 'icon-text-example', title: 'IconText', description: 'Inline text primitive with an icon, text props and independent icon tone.', children: _jsx(ExampleTile, { title: 'IconText', code: iconTextSample.code, onOpen: onOpenCode, children: _jsxs("div", { className: 'oui-ui-icon-text-list', children: [_jsx(IconText, { icon: _jsx(LuLoaderCircle, {}), iconTone: 'info', iconSpin: true, children: "Saving changes" }), _jsx(IconText, { icon: _jsx(LuCircleCheck, {}), iconTone: 'success', children: "Saved" }), _jsx(IconText, { icon: _jsx(LuCircleX, {}), iconTone: 'danger', children: "Save failed" }), _jsx(IconText, { icon: _jsx(LuCircleAlert, {}), iconTone: 'warning', fw: 760, children: "Review required" }), _jsx(IconText, { icon: _jsx(LuInfo, {}), iconTone: 'info', fs: '13px', children: "Sync scheduled" })] }) }) }));
130
+ export function IconTextSection({ onOpenCode }) {
131
+ return (_jsx(UiExampleSection, { id: "icon-text-example", title: "IconText", description: "Inline text primitive with an icon, text props and independent icon tone.", children: _jsx(ExampleTile, { title: "IconText", code: iconTextSample.code, onOpen: onOpenCode, children: _jsxs(Flex, { g: 2, wrap: true, children: [_jsx(IconText, { icon: _jsx(LuLoaderCircle, {}), iconTone: "info", iconSpin: true, children: "Saving changes" }), _jsx(IconText, { icon: _jsx(LuCircleCheck, {}), iconTone: "success", children: "Saved" }), _jsx(IconText, { icon: _jsx(LuCircleX, {}), iconTone: "danger", children: "Save failed" }), _jsx(IconText, { icon: _jsx(LuCircleAlert, {}), iconTone: "warning", fw: 760, children: "Review required" }), _jsx(IconText, { icon: _jsx(LuInfo, {}), iconTone: "info", fs: "13px", children: "Sync scheduled" })] }) }) }));
131
132
  }