@optimum-intelligence/opti-ui 0.7.6 → 0.8.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.
- package/CHANGELOG.md +63 -0
- package/README.md +20 -10
- package/dist/components/alert/Alert.d.ts +5 -2
- package/dist/components/alert/Alert.js +67 -65
- package/dist/components/alert/Alert.js.map +1 -1
- package/dist/components/app-shell/AppShell.d.ts +19 -7
- package/dist/components/app-shell/AppShell.js +329 -303
- package/dist/components/app-shell/AppShell.js.map +1 -1
- package/dist/components/calendar/Calendar.js +140 -136
- package/dist/components/calendar/Calendar.js.map +1 -1
- package/dist/components/combobox/Combobox.d.ts +8 -2
- package/dist/components/combobox/Combobox.js +182 -202
- package/dist/components/combobox/Combobox.js.map +1 -1
- package/dist/components/data-table/DataTable.d.ts +23 -11
- package/dist/components/data-table/DataTable.js +148 -88
- package/dist/components/data-table/DataTable.js.map +1 -1
- package/dist/components/data-table/DataTableContent.js +1 -1
- package/dist/components/data-table/DataTableFilters.d.ts +56 -4
- package/dist/components/data-table/DataTableFilters.js +492 -77
- package/dist/components/data-table/DataTableFilters.js.map +1 -1
- package/dist/components/data-table/types.d.ts +13 -2
- package/dist/components/data-table/useDataTable.d.ts +1 -1
- package/dist/components/data-table/useDataTable.js +251 -229
- package/dist/components/data-table/useDataTable.js.map +1 -1
- package/dist/components/date-picker/DatePicker.d.ts +5 -0
- package/dist/components/date-picker/DatePicker.js +148 -140
- package/dist/components/date-picker/DatePicker.js.map +1 -1
- package/dist/components/date-picker/DateRangePicker.d.ts +2 -0
- package/dist/components/date-picker/DateRangePicker.js +171 -164
- package/dist/components/date-picker/DateRangePicker.js.map +1 -1
- package/dist/components/date-picker/PickerField.d.ts +6 -3
- package/dist/components/date-picker/PickerField.js +166 -159
- package/dist/components/date-picker/PickerField.js.map +1 -1
- package/dist/components/dialog/ConfirmDialog.d.ts +5 -2
- package/dist/components/dialog/ConfirmDialog.js +79 -77
- package/dist/components/dialog/ConfirmDialog.js.map +1 -1
- package/dist/components/dialog/Dialog.d.ts +5 -2
- package/dist/components/dialog/Dialog.js +65 -63
- package/dist/components/dialog/Dialog.js.map +1 -1
- package/dist/components/drawer/Drawer.d.ts +13 -4
- package/dist/components/drawer/Drawer.js +122 -164
- package/dist/components/drawer/Drawer.js.map +1 -1
- package/dist/components/field/Field.d.ts +38 -9
- package/dist/components/field/Field.js +66 -1
- package/dist/components/field/Field.js.map +1 -1
- package/dist/components/file-upload/FileUpload.js +2 -0
- package/dist/components/file-upload/FileUpload.js.map +1 -1
- package/dist/components/input/Input.d.ts +9 -16
- package/dist/components/input/Input.js +124 -206
- package/dist/components/input/Input.js.map +1 -1
- package/dist/components/map/colors.d.ts +2 -2
- package/dist/components/map/colors.js +12 -3
- package/dist/components/map/colors.js.map +1 -1
- package/dist/components/number-field/NumberField.d.ts +12 -3
- package/dist/components/number-field/NumberField.js +109 -130
- package/dist/components/number-field/NumberField.js.map +1 -1
- package/dist/components/pagination/Pagination.js +135 -186
- package/dist/components/pagination/Pagination.js.map +1 -1
- package/dist/components/search-input/SearchInput.d.ts +5 -2
- package/dist/components/search-input/SearchInput.js +47 -45
- package/dist/components/search-input/SearchInput.js.map +1 -1
- package/dist/components/select/Select.d.ts +13 -3
- package/dist/components/select/Select.js +144 -139
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/spinner/Spinner.d.ts +6 -2
- package/dist/components/spinner/Spinner.js +42 -40
- package/dist/components/spinner/Spinner.js.map +1 -1
- package/dist/components/stepper/Stepper.js +44 -40
- package/dist/components/stepper/Stepper.js.map +1 -1
- package/dist/components/toast/Toast.d.ts +17 -1
- package/dist/components/toast/Toast.js +65 -33
- package/dist/components/toast/Toast.js.map +1 -1
- package/dist/components.json +377 -57
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -3
- package/dist/labels/Labels.d.ts +85 -0
- package/dist/labels/Labels.js +92 -0
- package/dist/labels/Labels.js.map +1 -0
- package/dist/llms-full.txt +224 -37
- package/dist/llms.txt +10 -4
- package/dist/opti-ui.css +210 -18
- package/dist/theme/ThemeProvider.d.ts +8 -4
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/dist/utils/media.d.ts +9 -2
- package/dist/utils/media.js +10 -3
- package/dist/utils/media.js.map +1 -1
- package/package.json +5 -2
package/dist/components.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "@optimum-intelligence/opti-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Optimum's customizable React component library, built on Base UI.",
|
|
5
5
|
"categories": [
|
|
6
6
|
"Theme",
|
|
@@ -23,6 +23,29 @@
|
|
|
23
23
|
"import": "import { createTheme } from '@optimum-intelligence/opti-ui';",
|
|
24
24
|
"signature": "createTheme(...themes: Theme[])"
|
|
25
25
|
},
|
|
26
|
+
{
|
|
27
|
+
"name": "LabelsProvider",
|
|
28
|
+
"kind": "component",
|
|
29
|
+
"category": "Theme",
|
|
30
|
+
"description": "Replaces the library's built-in English texts (button names, placeholders, table and calendar texts) for\neverything inside it, so an app translates them once instead of per component.",
|
|
31
|
+
"import": "import { LabelsProvider } from '@optimum-intelligence/opti-ui';",
|
|
32
|
+
"propsType": "LabelsProviderProps",
|
|
33
|
+
"props": [
|
|
34
|
+
{
|
|
35
|
+
"name": "labels",
|
|
36
|
+
"type": "Partial<Labels>",
|
|
37
|
+
"required": true,
|
|
38
|
+
"description": "Texts to replace. Nested providers override only what they pass; props on a component still win."
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "children",
|
|
42
|
+
"type": "React.ReactNode",
|
|
43
|
+
"required": false,
|
|
44
|
+
"description": "The subtree that uses these texts."
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"example": "<LabelsProvider labels={{ close: 'Bezárás', selectPlaceholder: 'Válasszon…', dataTable: { search: 'Keresés…' } }}>\n <App />\n</LabelsProvider>"
|
|
48
|
+
},
|
|
26
49
|
{
|
|
27
50
|
"name": "seriesColor",
|
|
28
51
|
"kind": "function",
|
|
@@ -58,9 +81,10 @@
|
|
|
58
81
|
"required": false,
|
|
59
82
|
"values": [
|
|
60
83
|
"light",
|
|
61
|
-
"dark"
|
|
84
|
+
"dark",
|
|
85
|
+
"system"
|
|
62
86
|
],
|
|
63
|
-
"description": "Color mode for this subtree."
|
|
87
|
+
"description": "Color mode for this subtree; `system` follows the OS. Left out, the subtree inherits its ancestor's mode."
|
|
64
88
|
}
|
|
65
89
|
],
|
|
66
90
|
"extends": [
|
|
@@ -75,6 +99,14 @@
|
|
|
75
99
|
"import": "import { themeToStyle } from '@optimum-intelligence/opti-ui';",
|
|
76
100
|
"signature": "themeToStyle(theme: Theme | undefined)"
|
|
77
101
|
},
|
|
102
|
+
{
|
|
103
|
+
"name": "useLabels",
|
|
104
|
+
"kind": "hook",
|
|
105
|
+
"category": "Theme",
|
|
106
|
+
"description": "The texts from the nearest `LabelsProvider`, with English defaults for the rest.",
|
|
107
|
+
"import": "import { useLabels } from '@optimum-intelligence/opti-ui';",
|
|
108
|
+
"signature": "useLabels()"
|
|
109
|
+
},
|
|
78
110
|
{
|
|
79
111
|
"name": "Calendar",
|
|
80
112
|
"kind": "component",
|
|
@@ -176,6 +208,12 @@
|
|
|
176
208
|
"required": false,
|
|
177
209
|
"description": "Error message. When set, the field is marked invalid."
|
|
178
210
|
},
|
|
211
|
+
{
|
|
212
|
+
"name": "fieldProps",
|
|
213
|
+
"type": "FormFieldProps['fieldProps']",
|
|
214
|
+
"required": false,
|
|
215
|
+
"description": "Props for the wrapping `Field.Root` (className, validate, validationMode…)."
|
|
216
|
+
},
|
|
179
217
|
{
|
|
180
218
|
"name": "placeholder",
|
|
181
219
|
"type": "string",
|
|
@@ -186,8 +224,8 @@
|
|
|
186
224
|
"name": "emptyText",
|
|
187
225
|
"type": "React.ReactNode",
|
|
188
226
|
"required": false,
|
|
189
|
-
"
|
|
190
|
-
"
|
|
227
|
+
"default": "'No results found.'",
|
|
228
|
+
"description": "Shown when the filter matches nothing. Set app-wide with `LabelsProvider` (`noResults`)."
|
|
191
229
|
},
|
|
192
230
|
{
|
|
193
231
|
"name": "size",
|
|
@@ -451,8 +489,7 @@
|
|
|
451
489
|
"name": "placeholder",
|
|
452
490
|
"type": "React.ReactNode",
|
|
453
491
|
"required": false,
|
|
454
|
-
"description": "Text shown while no date is selected."
|
|
455
|
-
"default": "'Select dates'"
|
|
492
|
+
"description": "Text shown while no date is selected. Defaults to the `selectDate…` label of the picker's `labels`."
|
|
456
493
|
},
|
|
457
494
|
{
|
|
458
495
|
"name": "size",
|
|
@@ -505,7 +542,7 @@
|
|
|
505
542
|
"name": "contentProps",
|
|
506
543
|
"type": "Omit<PopoverContentProps, 'children'>",
|
|
507
544
|
"required": false,
|
|
508
|
-
"description": "Props for the popover content."
|
|
545
|
+
"description": "Props for the popover content. Not used on phones, where the calendar opens in a bottom sheet."
|
|
509
546
|
},
|
|
510
547
|
{
|
|
511
548
|
"name": "value",
|
|
@@ -1014,6 +1051,65 @@
|
|
|
1014
1051
|
"import": "import { formatFileSize } from '@optimum-intelligence/opti-ui';",
|
|
1015
1052
|
"signature": "formatFileSize(bytes: number, locale?: string)"
|
|
1016
1053
|
},
|
|
1054
|
+
{
|
|
1055
|
+
"name": "FormField",
|
|
1056
|
+
"kind": "component",
|
|
1057
|
+
"category": "Forms",
|
|
1058
|
+
"description": "Label, control, description and error in one: the shell every labelled control (`TextField`, `Select`,\n`Combobox`, `NumberField`) is built on. Use it to give your own control the same layout and wiring.",
|
|
1059
|
+
"import": "import { FormField } from '@optimum-intelligence/opti-ui';",
|
|
1060
|
+
"propsType": "FormFieldProps",
|
|
1061
|
+
"props": [
|
|
1062
|
+
{
|
|
1063
|
+
"name": "label",
|
|
1064
|
+
"type": "React.ReactNode",
|
|
1065
|
+
"required": false,
|
|
1066
|
+
"description": "Visible label above the control."
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
"name": "description",
|
|
1070
|
+
"type": "React.ReactNode",
|
|
1071
|
+
"required": false,
|
|
1072
|
+
"description": "Help text under the control."
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
"name": "error",
|
|
1076
|
+
"type": "React.ReactNode",
|
|
1077
|
+
"required": false,
|
|
1078
|
+
"description": "Error message. When set, the field is marked invalid and the message shows under the control."
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
"name": "required",
|
|
1082
|
+
"type": "boolean",
|
|
1083
|
+
"required": false,
|
|
1084
|
+
"description": "Adds the required marker to the label. Pass `required` to the control as well, so the browser checks it."
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
"name": "name",
|
|
1088
|
+
"type": "string",
|
|
1089
|
+
"required": false,
|
|
1090
|
+
"description": "Field name, used by `Form` to match server-side errors to this field."
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
"name": "disabled",
|
|
1094
|
+
"type": "boolean",
|
|
1095
|
+
"required": false,
|
|
1096
|
+
"description": "Disables the field and the control inside it."
|
|
1097
|
+
},
|
|
1098
|
+
{
|
|
1099
|
+
"name": "fieldProps",
|
|
1100
|
+
"type": "Omit<React.ComponentProps<typeof FieldRoot>, 'children'>",
|
|
1101
|
+
"required": false,
|
|
1102
|
+
"description": "Props for the wrapping `Field.Root` (className, validate, validationMode…)."
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
"name": "children",
|
|
1106
|
+
"type": "React.ReactNode",
|
|
1107
|
+
"required": false,
|
|
1108
|
+
"description": "The control: `Input`, `Select.Root`, `NumberField`, a custom control…"
|
|
1109
|
+
}
|
|
1110
|
+
],
|
|
1111
|
+
"example": "<FormField label=\"Plate\" description=\"As on the registration.\" error={errors.plate} required>\n <Input name=\"plate\" required />\n</FormField>"
|
|
1112
|
+
},
|
|
1017
1113
|
{
|
|
1018
1114
|
"name": "Input",
|
|
1019
1115
|
"kind": "component",
|
|
@@ -1077,6 +1173,12 @@
|
|
|
1077
1173
|
"required": false,
|
|
1078
1174
|
"description": "Error message. When set, the field is marked invalid."
|
|
1079
1175
|
},
|
|
1176
|
+
{
|
|
1177
|
+
"name": "fieldProps",
|
|
1178
|
+
"type": "FormFieldProps['fieldProps']",
|
|
1179
|
+
"required": false,
|
|
1180
|
+
"description": "Props for the wrapping `Field.Root` (className, validate, validationMode…)."
|
|
1181
|
+
},
|
|
1080
1182
|
{
|
|
1081
1183
|
"name": "size",
|
|
1082
1184
|
"type": "ControlSize",
|
|
@@ -1105,15 +1207,15 @@
|
|
|
1105
1207
|
"name": "decrementLabel",
|
|
1106
1208
|
"type": "string",
|
|
1107
1209
|
"required": false,
|
|
1108
|
-
"
|
|
1109
|
-
"
|
|
1210
|
+
"default": "'Decrease'",
|
|
1211
|
+
"description": "Accessible name of the − button. Set app-wide with `LabelsProvider` (`decrease`)."
|
|
1110
1212
|
},
|
|
1111
1213
|
{
|
|
1112
1214
|
"name": "incrementLabel",
|
|
1113
1215
|
"type": "string",
|
|
1114
1216
|
"required": false,
|
|
1115
|
-
"
|
|
1116
|
-
"
|
|
1217
|
+
"default": "'Increase'",
|
|
1218
|
+
"description": "Accessible name of the + button. Set app-wide with `LabelsProvider` (`increase`)."
|
|
1117
1219
|
}
|
|
1118
1220
|
],
|
|
1119
1221
|
"extends": [
|
|
@@ -1167,12 +1269,42 @@
|
|
|
1167
1269
|
"name": "toggleLabel",
|
|
1168
1270
|
"type": "string",
|
|
1169
1271
|
"required": false,
|
|
1170
|
-
"
|
|
1272
|
+
"default": "'Show password'",
|
|
1273
|
+
"description": "Accessible name of the show/hide button. Set app-wide with `LabelsProvider` (`showPassword`)."
|
|
1274
|
+
},
|
|
1275
|
+
{
|
|
1276
|
+
"name": "label",
|
|
1277
|
+
"type": "React.ReactNode",
|
|
1278
|
+
"required": false,
|
|
1279
|
+
"description": "Visible label above the control."
|
|
1280
|
+
},
|
|
1281
|
+
{
|
|
1282
|
+
"name": "description",
|
|
1283
|
+
"type": "React.ReactNode",
|
|
1284
|
+
"required": false,
|
|
1285
|
+
"description": "Help text under the control."
|
|
1286
|
+
},
|
|
1287
|
+
{
|
|
1288
|
+
"name": "error",
|
|
1289
|
+
"type": "React.ReactNode",
|
|
1290
|
+
"required": false,
|
|
1291
|
+
"description": "Error message. When set, the field is marked invalid and the message shows under the control."
|
|
1292
|
+
},
|
|
1293
|
+
{
|
|
1294
|
+
"name": "required",
|
|
1295
|
+
"type": "boolean",
|
|
1296
|
+
"required": false,
|
|
1297
|
+
"description": "Adds the required marker to the label. Pass `required` to the control as well, so the browser checks it."
|
|
1298
|
+
},
|
|
1299
|
+
{
|
|
1300
|
+
"name": "fieldProps",
|
|
1301
|
+
"type": "Omit<React.ComponentProps<typeof FieldRoot>, 'children'>",
|
|
1302
|
+
"required": false,
|
|
1303
|
+
"description": "Props for the wrapping `Field.Root` (className, validate, validationMode…)."
|
|
1171
1304
|
}
|
|
1172
1305
|
],
|
|
1173
1306
|
"extends": [
|
|
1174
|
-
"Omit<BaseInput.Props, 'size'>"
|
|
1175
|
-
"FieldShellProps"
|
|
1307
|
+
"Omit<BaseInput.Props, 'size'>"
|
|
1176
1308
|
]
|
|
1177
1309
|
},
|
|
1178
1310
|
{
|
|
@@ -1223,8 +1355,8 @@
|
|
|
1223
1355
|
"name": "toggleLabel",
|
|
1224
1356
|
"type": "string",
|
|
1225
1357
|
"required": false,
|
|
1226
|
-
"
|
|
1227
|
-
"
|
|
1358
|
+
"default": "'Show password'",
|
|
1359
|
+
"description": "Accessible name of the show/hide button. Set app-wide with `LabelsProvider` (`showPassword`)."
|
|
1228
1360
|
}
|
|
1229
1361
|
],
|
|
1230
1362
|
"extends": [
|
|
@@ -1341,8 +1473,8 @@
|
|
|
1341
1473
|
"name": "clearLabel",
|
|
1342
1474
|
"type": "string",
|
|
1343
1475
|
"required": false,
|
|
1344
|
-
"
|
|
1345
|
-
"
|
|
1476
|
+
"default": "'Clear search'",
|
|
1477
|
+
"description": "Accessible name of the clear button. Set app-wide with `LabelsProvider` (`clearSearch`)."
|
|
1346
1478
|
},
|
|
1347
1479
|
{
|
|
1348
1480
|
"name": "icon",
|
|
@@ -1387,12 +1519,18 @@
|
|
|
1387
1519
|
"required": false,
|
|
1388
1520
|
"description": "Error message. When set, the field is marked invalid."
|
|
1389
1521
|
},
|
|
1522
|
+
{
|
|
1523
|
+
"name": "fieldProps",
|
|
1524
|
+
"type": "FormFieldProps['fieldProps']",
|
|
1525
|
+
"required": false,
|
|
1526
|
+
"description": "Props for the wrapping `Field.Root` (className, validate, validationMode…)."
|
|
1527
|
+
},
|
|
1390
1528
|
{
|
|
1391
1529
|
"name": "placeholder",
|
|
1392
1530
|
"type": "React.ReactNode",
|
|
1393
1531
|
"required": false,
|
|
1394
|
-
"
|
|
1395
|
-
"
|
|
1532
|
+
"default": "'Select…'",
|
|
1533
|
+
"description": "Text shown while nothing is selected. Set app-wide with `LabelsProvider` (`selectPlaceholder`)."
|
|
1396
1534
|
},
|
|
1397
1535
|
{
|
|
1398
1536
|
"name": "allLabel",
|
|
@@ -1437,7 +1575,19 @@
|
|
|
1437
1575
|
},
|
|
1438
1576
|
{
|
|
1439
1577
|
"name": "Select.Label",
|
|
1440
|
-
"description": ""
|
|
1578
|
+
"description": "",
|
|
1579
|
+
"propsType": "SelectLabelProps",
|
|
1580
|
+
"props": [
|
|
1581
|
+
{
|
|
1582
|
+
"name": "required",
|
|
1583
|
+
"type": "boolean",
|
|
1584
|
+
"required": false,
|
|
1585
|
+
"description": "Appends a required marker."
|
|
1586
|
+
}
|
|
1587
|
+
],
|
|
1588
|
+
"extends": [
|
|
1589
|
+
"BaseSelect.Label.Props"
|
|
1590
|
+
]
|
|
1441
1591
|
},
|
|
1442
1592
|
{
|
|
1443
1593
|
"name": "Select.Trigger",
|
|
@@ -1619,11 +1769,40 @@
|
|
|
1619
1769
|
"type": "boolean",
|
|
1620
1770
|
"required": false,
|
|
1621
1771
|
"description": "Grow with content up to `maxRows` (uses CSS field-sizing where supported)."
|
|
1772
|
+
},
|
|
1773
|
+
{
|
|
1774
|
+
"name": "label",
|
|
1775
|
+
"type": "React.ReactNode",
|
|
1776
|
+
"required": false,
|
|
1777
|
+
"description": "Visible label above the control."
|
|
1778
|
+
},
|
|
1779
|
+
{
|
|
1780
|
+
"name": "description",
|
|
1781
|
+
"type": "React.ReactNode",
|
|
1782
|
+
"required": false,
|
|
1783
|
+
"description": "Help text under the control."
|
|
1784
|
+
},
|
|
1785
|
+
{
|
|
1786
|
+
"name": "error",
|
|
1787
|
+
"type": "React.ReactNode",
|
|
1788
|
+
"required": false,
|
|
1789
|
+
"description": "Error message. When set, the field is marked invalid and the message shows under the control."
|
|
1790
|
+
},
|
|
1791
|
+
{
|
|
1792
|
+
"name": "required",
|
|
1793
|
+
"type": "boolean",
|
|
1794
|
+
"required": false,
|
|
1795
|
+
"description": "Adds the required marker to the label. Pass `required` to the control as well, so the browser checks it."
|
|
1796
|
+
},
|
|
1797
|
+
{
|
|
1798
|
+
"name": "fieldProps",
|
|
1799
|
+
"type": "Omit<React.ComponentProps<typeof FieldRoot>, 'children'>",
|
|
1800
|
+
"required": false,
|
|
1801
|
+
"description": "Props for the wrapping `Field.Root` (className, validate, validationMode…)."
|
|
1622
1802
|
}
|
|
1623
1803
|
],
|
|
1624
1804
|
"extends": [
|
|
1625
|
-
"React.TextareaHTMLAttributes<HTMLTextAreaElement>"
|
|
1626
|
-
"FieldShellProps"
|
|
1805
|
+
"React.TextareaHTMLAttributes<HTMLTextAreaElement>"
|
|
1627
1806
|
]
|
|
1628
1807
|
},
|
|
1629
1808
|
{
|
|
@@ -1656,11 +1835,40 @@
|
|
|
1656
1835
|
"type": "React.ReactNode",
|
|
1657
1836
|
"required": false,
|
|
1658
1837
|
"description": "Icon, text or button rendered inside the box, after the value."
|
|
1838
|
+
},
|
|
1839
|
+
{
|
|
1840
|
+
"name": "label",
|
|
1841
|
+
"type": "React.ReactNode",
|
|
1842
|
+
"required": false,
|
|
1843
|
+
"description": "Visible label above the control."
|
|
1844
|
+
},
|
|
1845
|
+
{
|
|
1846
|
+
"name": "description",
|
|
1847
|
+
"type": "React.ReactNode",
|
|
1848
|
+
"required": false,
|
|
1849
|
+
"description": "Help text under the control."
|
|
1850
|
+
},
|
|
1851
|
+
{
|
|
1852
|
+
"name": "error",
|
|
1853
|
+
"type": "React.ReactNode",
|
|
1854
|
+
"required": false,
|
|
1855
|
+
"description": "Error message. When set, the field is marked invalid and the message shows under the control."
|
|
1856
|
+
},
|
|
1857
|
+
{
|
|
1858
|
+
"name": "required",
|
|
1859
|
+
"type": "boolean",
|
|
1860
|
+
"required": false,
|
|
1861
|
+
"description": "Adds the required marker to the label. Pass `required` to the control as well, so the browser checks it."
|
|
1862
|
+
},
|
|
1863
|
+
{
|
|
1864
|
+
"name": "fieldProps",
|
|
1865
|
+
"type": "Omit<React.ComponentProps<typeof FieldRoot>, 'children'>",
|
|
1866
|
+
"required": false,
|
|
1867
|
+
"description": "Props for the wrapping `Field.Root` (className, validate, validationMode…)."
|
|
1659
1868
|
}
|
|
1660
1869
|
],
|
|
1661
1870
|
"extends": [
|
|
1662
|
-
"Omit<BaseInput.Props, 'size'>"
|
|
1663
|
-
"FieldShellProps"
|
|
1871
|
+
"Omit<BaseInput.Props, 'size'>"
|
|
1664
1872
|
]
|
|
1665
1873
|
},
|
|
1666
1874
|
{
|
|
@@ -1719,15 +1927,15 @@
|
|
|
1719
1927
|
"name": "menuLabel",
|
|
1720
1928
|
"type": "string",
|
|
1721
1929
|
"required": false,
|
|
1722
|
-
"
|
|
1723
|
-
"
|
|
1930
|
+
"default": "'Open navigation'",
|
|
1931
|
+
"description": "Accessible name of the button that opens the navigation drawer on small screens. Set app-wide with `LabelsProvider` (`openNavigation`)."
|
|
1724
1932
|
},
|
|
1725
1933
|
{
|
|
1726
1934
|
"name": "moreLabel",
|
|
1727
1935
|
"type": "string",
|
|
1728
1936
|
"required": false,
|
|
1729
|
-
"
|
|
1730
|
-
"
|
|
1937
|
+
"default": "'More'",
|
|
1938
|
+
"description": "Label of the tab-bar slot that opens the navigation drawer. Set app-wide with `LabelsProvider` (`more`)."
|
|
1731
1939
|
},
|
|
1732
1940
|
{
|
|
1733
1941
|
"name": "moreTabPosition",
|
|
@@ -1977,15 +2185,15 @@
|
|
|
1977
2185
|
"name": "collapseLabel",
|
|
1978
2186
|
"type": "string",
|
|
1979
2187
|
"required": false,
|
|
1980
|
-
"
|
|
1981
|
-
"
|
|
2188
|
+
"default": "'Collapse'",
|
|
2189
|
+
"description": "Accessible names for the icon-only toggle. Set app-wide with `LabelsProvider` (`collapseNavbar`)."
|
|
1982
2190
|
},
|
|
1983
2191
|
{
|
|
1984
2192
|
"name": "expandLabel",
|
|
1985
2193
|
"type": "string",
|
|
1986
2194
|
"required": false,
|
|
1987
|
-
"
|
|
1988
|
-
"
|
|
2195
|
+
"default": "'Expand'",
|
|
2196
|
+
"description": "Accessible name of the toggle while collapsed. Set app-wide with `LabelsProvider` (`expandNavbar`)."
|
|
1989
2197
|
}
|
|
1990
2198
|
],
|
|
1991
2199
|
"extends": [
|
|
@@ -2219,7 +2427,7 @@
|
|
|
2219
2427
|
"name": "actions",
|
|
2220
2428
|
"type": "React.ReactNode",
|
|
2221
2429
|
"required": false,
|
|
2222
|
-
"description": "Buttons or controls
|
|
2430
|
+
"description": "Buttons or controls on the title's row, at the right; they wrap below the title when the row is too narrow."
|
|
2223
2431
|
}
|
|
2224
2432
|
],
|
|
2225
2433
|
"extends": [
|
|
@@ -3386,8 +3594,8 @@
|
|
|
3386
3594
|
"name": "cancelLabel",
|
|
3387
3595
|
"type": "React.ReactNode",
|
|
3388
3596
|
"required": false,
|
|
3389
|
-
"
|
|
3390
|
-
"
|
|
3597
|
+
"default": "'Cancel'",
|
|
3598
|
+
"description": "Text of the cancel button. Set app-wide with `LabelsProvider` (`cancel`)."
|
|
3391
3599
|
},
|
|
3392
3600
|
{
|
|
3393
3601
|
"name": "onConfirm",
|
|
@@ -3517,8 +3725,8 @@
|
|
|
3517
3725
|
"name": "closeLabel",
|
|
3518
3726
|
"type": "string",
|
|
3519
3727
|
"required": false,
|
|
3520
|
-
"
|
|
3521
|
-
"
|
|
3728
|
+
"default": "'Close'",
|
|
3729
|
+
"description": "Accessible name of the close button. Set app-wide with `LabelsProvider` (`close`)."
|
|
3522
3730
|
},
|
|
3523
3731
|
{
|
|
3524
3732
|
"name": "backdropBlur",
|
|
@@ -3633,8 +3841,8 @@
|
|
|
3633
3841
|
{
|
|
3634
3842
|
"name": "title",
|
|
3635
3843
|
"type": "React.ReactNode",
|
|
3636
|
-
"required":
|
|
3637
|
-
"description": "Header title; also the drawer's accessible name."
|
|
3844
|
+
"required": false,
|
|
3845
|
+
"description": "Header title; also the drawer's accessible name. Needed unless `header` replaces the built-in header."
|
|
3638
3846
|
},
|
|
3639
3847
|
{
|
|
3640
3848
|
"name": "eyebrow",
|
|
@@ -3654,6 +3862,12 @@
|
|
|
3654
3862
|
"required": false,
|
|
3655
3863
|
"description": "Header content next to the close button (edit, delete, a menu…)."
|
|
3656
3864
|
},
|
|
3865
|
+
{
|
|
3866
|
+
"name": "header",
|
|
3867
|
+
"type": "React.ReactNode",
|
|
3868
|
+
"required": false,
|
|
3869
|
+
"description": "Replaces the built-in header (eyebrow, title, description, actions and close button) inside the pinned\nheader bar; `null` drops the bar. Put a `Dialog.Title` in it so the drawer keeps an accessible name;\n`Dialog.Close` closes it."
|
|
3870
|
+
},
|
|
3657
3871
|
{
|
|
3658
3872
|
"name": "footer",
|
|
3659
3873
|
"type": "React.ReactNode",
|
|
@@ -3716,8 +3930,8 @@
|
|
|
3716
3930
|
"name": "closeLabel",
|
|
3717
3931
|
"type": "string",
|
|
3718
3932
|
"required": false,
|
|
3719
|
-
"
|
|
3720
|
-
"
|
|
3933
|
+
"default": "'Close'",
|
|
3934
|
+
"description": "Accessible name of the close button. Set app-wide with `LabelsProvider` (`close`)."
|
|
3721
3935
|
},
|
|
3722
3936
|
{
|
|
3723
3937
|
"name": "className",
|
|
@@ -3885,7 +4099,7 @@
|
|
|
3885
4099
|
"name": "ToastProvider",
|
|
3886
4100
|
"kind": "component",
|
|
3887
4101
|
"category": "Overlays",
|
|
3888
|
-
"description": "Mount once near the app root. Then call `useToast()` anywhere below, or pass\na `toastManager` from `createToastManager()` to trigger toasts outside React.",
|
|
4102
|
+
"description": "Mount once near the app root. Then call `useToast()` anywhere below, or pass\na `toastManager` from `createToastManager()` to trigger toasts outside React.\nBottom toasts sit `--oui-toast-offset-bottom` above the screen edge; AppShell sets it for its mobile tab bar.",
|
|
3889
4103
|
"import": "import { ToastProvider } from '@optimum-intelligence/opti-ui';",
|
|
3890
4104
|
"propsType": "ToastProviderProps",
|
|
3891
4105
|
"props": [
|
|
@@ -4038,9 +4252,10 @@
|
|
|
4038
4252
|
"name": "useToast",
|
|
4039
4253
|
"kind": "hook",
|
|
4040
4254
|
"category": "Overlays",
|
|
4041
|
-
"description": "Toast API with tone shortcuts: `toast.success({ title })`.",
|
|
4255
|
+
"description": "Toast API with tone shortcuts: `toast.success({ title })`. `data` takes a custom `icon` and `content`\n(`ToastData`), and `toast.promise()` shows a loading toast that turns into success or error.",
|
|
4042
4256
|
"import": "import { useToast } from '@optimum-intelligence/opti-ui';",
|
|
4043
|
-
"signature": "useToast()"
|
|
4257
|
+
"signature": "useToast()",
|
|
4258
|
+
"example": "const toast = useToast();\ntoast.success({ title: 'Route saved', data: { content: <Link href=\"/routes/12\">Open route</Link> } });\ntoast.promise(save(), { loading: 'Saving…', success: 'Saved', error: 'Could not save' });"
|
|
4044
4259
|
},
|
|
4045
4260
|
{
|
|
4046
4261
|
"name": "Accordion",
|
|
@@ -4439,8 +4654,8 @@
|
|
|
4439
4654
|
"name": "dismissLabel",
|
|
4440
4655
|
"type": "string",
|
|
4441
4656
|
"required": false,
|
|
4442
|
-
"
|
|
4443
|
-
"
|
|
4657
|
+
"default": "'Dismiss'",
|
|
4658
|
+
"description": "Accessible name of the dismiss button. Set app-wide with `LabelsProvider` (`dismiss`)."
|
|
4444
4659
|
}
|
|
4445
4660
|
],
|
|
4446
4661
|
"extends": [
|
|
@@ -4596,7 +4811,7 @@
|
|
|
4596
4811
|
"name": "DataTable",
|
|
4597
4812
|
"kind": "compound",
|
|
4598
4813
|
"category": "Feedback & data display",
|
|
4599
|
-
"description": "`<DataTable data={…} columns={…} />` renders a complete table with search,\nfilters, sorting, pagination, row selection, row actions and inline editing;\ncolumns declare what they take part in. Every piece of state works\nuncontrolled or controlled (`search` / `filterValues` / `sort` / `page` /\n`selection`), and with `mode=\"server\"` the same state drives an API.\n\nFor another layout, create the table with `useDataTable` and compose the\nparts: `DataTable.Root`, `DataTable.Toolbar`, `DataTable.Controls` (the\ntoolbar's left column), `DataTable.Search
|
|
4814
|
+
"description": "`<DataTable data={…} columns={…} />` renders a complete table with search,\nfilters, sorting, pagination, row selection, row actions and inline editing;\ncolumns declare what they take part in. Every piece of state works\nuncontrolled or controlled (`search` / `filterValues` / `sort` / `page` /\n`selection`), and with `mode=\"server\"` the same state drives an API.\n\nFor another layout, create the table with `useDataTable` and compose the\nparts: `DataTable.Root`, `DataTable.Toolbar`, `DataTable.Controls` (the\ntoolbar's left column), `DataTable.Search`, `DataTable.Filters` (`quick`\npicks the toolbar filters), `DataTable.Filter`, `DataTable.FilterPanel`\n(the \"Filters\" button and panel for the other filters),\n`DataTable.ActiveFilters` (their tags), `DataTable.FilterSheet` (the phone\nfilter button and sheet), `DataTable.ClearFilters`, `DataTable.Actions`,\n`DataTable.Loading`, `DataTable.Summary`, `DataTable.Content`,\n`DataTable.Pagination`.\n\nOn phones (below 640px) columns with `priority: 'low'` are hidden, and\n`stickyFirstColumn` keeps each row's name in view while the rest scrolls.",
|
|
4600
4815
|
"import": "import { DataTable } from '@optimum-intelligence/opti-ui';",
|
|
4601
4816
|
"propsType": "DataTableProps",
|
|
4602
4817
|
"props": [
|
|
@@ -4672,7 +4887,7 @@
|
|
|
4672
4887
|
"name": "showToolbar",
|
|
4673
4888
|
"type": "boolean",
|
|
4674
4889
|
"required": false,
|
|
4675
|
-
"description": "`false` drops the search, filters,
|
|
4890
|
+
"description": "`false` drops the search, filters, row count and toolbar content: rows only, for short tables under\ntheir own heading. The toolbar holds the search, the `quick` filters, a \"Filters (n)\" button whose\npanel holds the other filters, and a clear button on the left; the loading spinner, `toolbar` content\nand export on the right. Active filters from the panel show as tags under it. The row count sits in\nthe footer: the pagination's range, or a count when the table is not paginated or rows are selected.\nBelow 640px the toolbar is one line: the search, a \"Filters (n)\" button whose bottom sheet holds every\nfilter and the `toolbar` content, and export.",
|
|
4676
4891
|
"default": "true"
|
|
4677
4892
|
},
|
|
4678
4893
|
{
|
|
@@ -4750,7 +4965,8 @@
|
|
|
4750
4965
|
"name": "clearLabel",
|
|
4751
4966
|
"type": "string",
|
|
4752
4967
|
"required": false,
|
|
4753
|
-
"
|
|
4968
|
+
"default": "'Clear search'",
|
|
4969
|
+
"description": "Accessible name of the clear button. Set app-wide with `LabelsProvider` (`clearSearch`)."
|
|
4754
4970
|
},
|
|
4755
4971
|
{
|
|
4756
4972
|
"name": "icon",
|
|
@@ -4771,7 +4987,7 @@
|
|
|
4771
4987
|
},
|
|
4772
4988
|
{
|
|
4773
4989
|
"name": "DataTable.Filters",
|
|
4774
|
-
"description": "
|
|
4990
|
+
"description": "The filters of the table, in a wrapping row. Children are added after the filters. Selects and date\nranges in the row have a fixed width (`--oui-data-table-filter-width`), so picking a value moves nothing.",
|
|
4775
4991
|
"propsType": "DataTableFiltersProps",
|
|
4776
4992
|
"props": [
|
|
4777
4993
|
{
|
|
@@ -4788,7 +5004,13 @@
|
|
|
4788
5004
|
"name": "stacked",
|
|
4789
5005
|
"type": "boolean",
|
|
4790
5006
|
"required": false,
|
|
4791
|
-
"description": "One filter per row at full width, chip rows and date ranges under their name: the layout of the\nfilter
|
|
5007
|
+
"description": "One filter per row at full width, chip rows and date ranges under their name: the layout of the\nfilter panel and the phone sheet."
|
|
5008
|
+
},
|
|
5009
|
+
{
|
|
5010
|
+
"name": "quick",
|
|
5011
|
+
"type": "boolean",
|
|
5012
|
+
"required": false,
|
|
5013
|
+
"description": "`true` renders only the quick filters, `false` only the others. Left out, every filter."
|
|
4792
5014
|
}
|
|
4793
5015
|
],
|
|
4794
5016
|
"extends": [
|
|
@@ -4848,13 +5070,88 @@
|
|
|
4848
5070
|
}
|
|
4849
5071
|
]
|
|
4850
5072
|
},
|
|
5073
|
+
{
|
|
5074
|
+
"name": "DataTable.FilterPanel",
|
|
5075
|
+
"description": "\"Filters (n)\" button that opens a panel holding every filter that is not `quick`, one per row. Filters\napply as they change; the footer clears them or closes the panel on the result count. Renders nothing\nwhen every filter is quick.",
|
|
5076
|
+
"propsType": "DataTableFilterPanelProps",
|
|
5077
|
+
"props": [
|
|
5078
|
+
{
|
|
5079
|
+
"name": "size",
|
|
5080
|
+
"type": "DataTableControlSize",
|
|
5081
|
+
"required": false,
|
|
5082
|
+
"values": [
|
|
5083
|
+
"sm",
|
|
5084
|
+
"md"
|
|
5085
|
+
],
|
|
5086
|
+
"description": "Height of the button; the filters in the panel are full size."
|
|
5087
|
+
},
|
|
5088
|
+
{
|
|
5089
|
+
"name": "open",
|
|
5090
|
+
"type": "boolean",
|
|
5091
|
+
"required": false,
|
|
5092
|
+
"description": "Whether the panel is open. Set it with `onOpenChange` to open the panel from elsewhere."
|
|
5093
|
+
},
|
|
5094
|
+
{
|
|
5095
|
+
"name": "onOpenChange",
|
|
5096
|
+
"type": "(open: boolean) => void",
|
|
5097
|
+
"required": false,
|
|
5098
|
+
"description": "Called when the panel opens or closes."
|
|
5099
|
+
},
|
|
5100
|
+
{
|
|
5101
|
+
"name": "className",
|
|
5102
|
+
"type": "string",
|
|
5103
|
+
"required": false,
|
|
5104
|
+
"description": "Class name for the button."
|
|
5105
|
+
}
|
|
5106
|
+
],
|
|
5107
|
+
"example": "<DataTable.Root table={table}>\n <DataTable.Toolbar>\n <DataTable.Controls>\n <DataTable.Search />\n <DataTable.Filters quick />\n <DataTable.FilterPanel />\n <DataTable.ClearFilters keepSpace />\n </DataTable.Controls>\n </DataTable.Toolbar>\n <DataTable.ActiveFilters />\n <DataTable.Content />\n</DataTable.Root>"
|
|
5108
|
+
},
|
|
5109
|
+
{
|
|
5110
|
+
"name": "DataTable.ActiveFilters",
|
|
5111
|
+
"description": "Removable tags for the active filters that are not `quick` (those show their value in the toolbar).\nRenders nothing while none is set.",
|
|
5112
|
+
"propsType": "DataTableActiveFiltersProps",
|
|
5113
|
+
"props": [
|
|
5114
|
+
{
|
|
5115
|
+
"name": "onEdit",
|
|
5116
|
+
"type": "(id: string) => void",
|
|
5117
|
+
"required": false,
|
|
5118
|
+
"description": "Called with the filter id when a tag's text is clicked; the default toolbar opens the filter panel."
|
|
5119
|
+
}
|
|
5120
|
+
],
|
|
5121
|
+
"extends": [
|
|
5122
|
+
"React.HTMLAttributes<HTMLDivElement>"
|
|
5123
|
+
]
|
|
5124
|
+
},
|
|
4851
5125
|
{
|
|
4852
5126
|
"name": "DataTable.Actions",
|
|
4853
5127
|
"description": "Styled `<div>` (`.oui-data-table__actions`). Accepts `className`, `style`, the `render` prop and all `<div>` attributes."
|
|
4854
5128
|
},
|
|
5129
|
+
{
|
|
5130
|
+
"name": "DataTable.ClearFilters",
|
|
5131
|
+
"description": "Button that clears every filter. Place it after the filters with `keepSpace`, so nothing shifts when it appears.",
|
|
5132
|
+
"propsType": "DataTableClearFiltersProps",
|
|
5133
|
+
"props": [
|
|
5134
|
+
{
|
|
5135
|
+
"name": "className",
|
|
5136
|
+
"type": "string",
|
|
5137
|
+
"required": false,
|
|
5138
|
+
"description": "Class name for the button."
|
|
5139
|
+
},
|
|
5140
|
+
{
|
|
5141
|
+
"name": "keepSpace",
|
|
5142
|
+
"type": "boolean",
|
|
5143
|
+
"required": false,
|
|
5144
|
+
"description": "While no filter is set, hide the button but keep its space, so the controls around it never move.\nWithout it the button renders nothing then."
|
|
5145
|
+
}
|
|
5146
|
+
]
|
|
5147
|
+
},
|
|
5148
|
+
{
|
|
5149
|
+
"name": "DataTable.Loading",
|
|
5150
|
+
"description": "Spinner while the table loads. It keeps its space while idle, so nothing moves when it shows."
|
|
5151
|
+
},
|
|
4855
5152
|
{
|
|
4856
5153
|
"name": "DataTable.Summary",
|
|
4857
|
-
"description": "Row count, or the number of selected rows
|
|
5154
|
+
"description": "Row count, or the number of selected rows. The default table shows it in the footer."
|
|
4858
5155
|
},
|
|
4859
5156
|
{
|
|
4860
5157
|
"name": "DataTable.Content",
|
|
@@ -5276,8 +5573,8 @@
|
|
|
5276
5573
|
"name": "label",
|
|
5277
5574
|
"type": "string | null",
|
|
5278
5575
|
"required": false,
|
|
5279
|
-
"
|
|
5280
|
-
"
|
|
5576
|
+
"default": "'Loading'",
|
|
5577
|
+
"description": "Accessible label. Set to `null` when a parent already announces loading. Set app-wide with\n`LabelsProvider` (`loading`)."
|
|
5281
5578
|
}
|
|
5282
5579
|
],
|
|
5283
5580
|
"extends": [
|
|
@@ -5857,6 +6154,13 @@
|
|
|
5857
6154
|
"import": "import { matchesQuery } from '@optimum-intelligence/opti-ui';",
|
|
5858
6155
|
"signature": "matchesQuery(text: unknown, query: string)"
|
|
5859
6156
|
},
|
|
6157
|
+
{
|
|
6158
|
+
"name": "NARROW_SCREEN",
|
|
6159
|
+
"kind": "constant",
|
|
6160
|
+
"category": "Icons & utilities",
|
|
6161
|
+
"description": "Media query for phones, which get their own layout at and below 640px. Pass it to `useMediaQuery`.",
|
|
6162
|
+
"import": "import { NARROW_SCREEN } from '@optimum-intelligence/opti-ui';"
|
|
6163
|
+
},
|
|
5860
6164
|
{
|
|
5861
6165
|
"name": "normalizeText",
|
|
5862
6166
|
"kind": "function",
|
|
@@ -5865,6 +6169,22 @@
|
|
|
5865
6169
|
"import": "import { normalizeText } from '@optimum-intelligence/opti-ui';",
|
|
5866
6170
|
"signature": "normalizeText(value: unknown)"
|
|
5867
6171
|
},
|
|
6172
|
+
{
|
|
6173
|
+
"name": "SHELL_COLLAPSED",
|
|
6174
|
+
"kind": "constant",
|
|
6175
|
+
"category": "Icons & utilities",
|
|
6176
|
+
"description": "Media query for screens where `AppShell` moves its navbar into a drawer and shows the tab bar (900px and below).",
|
|
6177
|
+
"import": "import { SHELL_COLLAPSED } from '@optimum-intelligence/opti-ui';"
|
|
6178
|
+
},
|
|
6179
|
+
{
|
|
6180
|
+
"name": "useMediaQuery",
|
|
6181
|
+
"kind": "hook",
|
|
6182
|
+
"category": "Icons & utilities",
|
|
6183
|
+
"description": "Whether a media query matches, following changes. `false` during server rendering.",
|
|
6184
|
+
"import": "import { useMediaQuery } from '@optimum-intelligence/opti-ui';",
|
|
6185
|
+
"signature": "useMediaQuery(query: string)",
|
|
6186
|
+
"example": "const phone = useMediaQuery(NARROW_SCREEN);"
|
|
6187
|
+
},
|
|
5868
6188
|
{
|
|
5869
6189
|
"name": "usePortalContainer",
|
|
5870
6190
|
"kind": "hook",
|
|
@@ -6380,7 +6700,7 @@
|
|
|
6380
6700
|
"name": "useResolvedColors",
|
|
6381
6701
|
"kind": "hook",
|
|
6382
6702
|
"category": "Maps",
|
|
6383
|
-
"description": "Resolves `--oui-*` colour tokens to `rgba()` strings inside `element`, for MapLibre paint properties,\nwhich accept no `var()` or `color-mix()`. It re-reads them when `data-oui-theme`, `class` or `style`\nchanges on the element or an ancestor (theme switches, `ThemeProvider`).\n`Map.Root` calls it for you; use it for your own `Source`/`Layer` children.",
|
|
6703
|
+
"description": "Resolves `--oui-*` colour tokens to `rgba()` strings inside `element`, for MapLibre paint properties,\nwhich accept no `var()` or `color-mix()`. It re-reads them when `data-oui-theme`, `class` or `style`\nchanges on the element or an ancestor (theme switches, `ThemeProvider`), and when the OS colour scheme changes.\n`Map.Root` calls it for you; use it for your own `Source`/`Layer` children.",
|
|
6384
6704
|
"import": "import { useResolvedColors } from '@optimum-intelligence/opti-ui/map';",
|
|
6385
6705
|
"signature": "useResolvedColors(element: HTMLElement | null)"
|
|
6386
6706
|
}
|