@optimum-intelligence/opti-ui 0.7.6 → 0.8.1
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 +121 -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 +25 -8
- package/dist/components/app-shell/AppShell.js +428 -397
- package/dist/components/app-shell/AppShell.js.map +1 -1
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +6 -1
- package/dist/components/breadcrumbs/Breadcrumbs.js +42 -40
- package/dist/components/breadcrumbs/Breadcrumbs.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 +9 -3
- package/dist/components/combobox/Combobox.js +220 -231
- package/dist/components/combobox/Combobox.js.map +1 -1
- package/dist/components/command-palette/CommandPalette.d.ts +13 -4
- package/dist/components/command-palette/CommandPalette.js +91 -89
- package/dist/components/command-palette/CommandPalette.js.map +1 -1
- package/dist/components/data-table/DataTable.d.ts +51 -17
- package/dist/components/data-table/DataTable.js +489 -278
- package/dist/components/data-table/DataTable.js.map +1 -1
- package/dist/components/data-table/DataTableContent.d.ts +7 -1
- package/dist/components/data-table/DataTableContent.js +247 -211
- package/dist/components/data-table/DataTableContent.js.map +1 -1
- package/dist/components/data-table/DataTableFilters.d.ts +56 -4
- package/dist/components/data-table/DataTableFilters.js +493 -77
- package/dist/components/data-table/DataTableFilters.js.map +1 -1
- package/dist/components/data-table/layout.d.ts +5 -0
- package/dist/components/data-table/layout.js +23 -1
- package/dist/components/data-table/layout.js.map +1 -1
- package/dist/components/data-table/types.d.ts +35 -2
- package/dist/components/data-table/useDataTable.d.ts +1 -1
- package/dist/components/data-table/useDataTable.js +386 -332
- 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/progress/Progress.d.ts +2 -1
- package/dist/components/progress/Progress.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/stat-card/StatCard.d.ts +7 -2
- package/dist/components/stat-card/StatCard.js +1 -1
- package/dist/components/stat-card/StatCard.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 +475 -68
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.js +12 -1
- package/dist/icons/index.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7 -4
- package/dist/labels/Labels.d.ts +93 -0
- package/dist/labels/Labels.js +96 -0
- package/dist/labels/Labels.js.map +1 -0
- package/dist/labels/hu.d.ts +17 -0
- package/dist/labels/hu.js +124 -0
- package/dist/labels/hu.js.map +1 -0
- package/dist/llms-full.txt +274 -48
- package/dist/llms.txt +11 -4
- package/dist/opti-ui.css +370 -47
- 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.1",
|
|
4
4
|
"description": "Optimum's customizable React component library, built on Base UI.",
|
|
5
5
|
"categories": [
|
|
6
6
|
"Theme",
|
|
@@ -23,6 +23,37 @@
|
|
|
23
23
|
"import": "import { createTheme } from '@optimum-intelligence/opti-ui';",
|
|
24
24
|
"signature": "createTheme(...themes: Theme[])"
|
|
25
25
|
},
|
|
26
|
+
{
|
|
27
|
+
"name": "huLabels",
|
|
28
|
+
"kind": "constant",
|
|
29
|
+
"category": "Theme",
|
|
30
|
+
"description": "Hungarian texts for every built-in label of the library, in the formal register (magázás). Pass it to\n`LabelsProvider` once at the app root; spread it to change single texts. Dates also need `locale=\"hu\"` (or\n`DateConfigProvider`) for month and weekday names. Map texts are separate: see `MapLabels`.",
|
|
31
|
+
"import": "import { huLabels } from '@optimum-intelligence/opti-ui';",
|
|
32
|
+
"example": "<LabelsProvider labels={{ ...huLabels, dataTable: { ...huLabels.dataTable, count: (n) => `${n} jármű` } }}>\n <App />\n</LabelsProvider>"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "LabelsProvider",
|
|
36
|
+
"kind": "component",
|
|
37
|
+
"category": "Theme",
|
|
38
|
+
"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.",
|
|
39
|
+
"import": "import { LabelsProvider } from '@optimum-intelligence/opti-ui';",
|
|
40
|
+
"propsType": "LabelsProviderProps",
|
|
41
|
+
"props": [
|
|
42
|
+
{
|
|
43
|
+
"name": "labels",
|
|
44
|
+
"type": "Partial<Labels>",
|
|
45
|
+
"required": true,
|
|
46
|
+
"description": "Texts to replace. Nested providers override only what they pass; props on a component still win."
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "children",
|
|
50
|
+
"type": "React.ReactNode",
|
|
51
|
+
"required": false,
|
|
52
|
+
"description": "The subtree that uses these texts."
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"example": "<LabelsProvider labels={{ close: 'Bezárás', selectPlaceholder: 'Válasszon…', dataTable: { search: 'Keresés…' } }}>\n <App />\n</LabelsProvider>"
|
|
56
|
+
},
|
|
26
57
|
{
|
|
27
58
|
"name": "seriesColor",
|
|
28
59
|
"kind": "function",
|
|
@@ -58,9 +89,10 @@
|
|
|
58
89
|
"required": false,
|
|
59
90
|
"values": [
|
|
60
91
|
"light",
|
|
61
|
-
"dark"
|
|
92
|
+
"dark",
|
|
93
|
+
"system"
|
|
62
94
|
],
|
|
63
|
-
"description": "Color mode for this subtree."
|
|
95
|
+
"description": "Color mode for this subtree; `system` follows the OS. Left out, the subtree inherits its ancestor's mode."
|
|
64
96
|
}
|
|
65
97
|
],
|
|
66
98
|
"extends": [
|
|
@@ -75,6 +107,14 @@
|
|
|
75
107
|
"import": "import { themeToStyle } from '@optimum-intelligence/opti-ui';",
|
|
76
108
|
"signature": "themeToStyle(theme: Theme | undefined)"
|
|
77
109
|
},
|
|
110
|
+
{
|
|
111
|
+
"name": "useLabels",
|
|
112
|
+
"kind": "hook",
|
|
113
|
+
"category": "Theme",
|
|
114
|
+
"description": "The texts from the nearest `LabelsProvider`, with English defaults for the rest.",
|
|
115
|
+
"import": "import { useLabels } from '@optimum-intelligence/opti-ui';",
|
|
116
|
+
"signature": "useLabels()"
|
|
117
|
+
},
|
|
78
118
|
{
|
|
79
119
|
"name": "Calendar",
|
|
80
120
|
"kind": "component",
|
|
@@ -176,6 +216,12 @@
|
|
|
176
216
|
"required": false,
|
|
177
217
|
"description": "Error message. When set, the field is marked invalid."
|
|
178
218
|
},
|
|
219
|
+
{
|
|
220
|
+
"name": "fieldProps",
|
|
221
|
+
"type": "FormFieldProps['fieldProps']",
|
|
222
|
+
"required": false,
|
|
223
|
+
"description": "Props for the wrapping `Field.Root` (className, validate, validationMode…)."
|
|
224
|
+
},
|
|
179
225
|
{
|
|
180
226
|
"name": "placeholder",
|
|
181
227
|
"type": "string",
|
|
@@ -186,8 +232,8 @@
|
|
|
186
232
|
"name": "emptyText",
|
|
187
233
|
"type": "React.ReactNode",
|
|
188
234
|
"required": false,
|
|
189
|
-
"
|
|
190
|
-
"
|
|
235
|
+
"default": "'No results found.'",
|
|
236
|
+
"description": "Shown when the filter matches nothing. Set app-wide with `LabelsProvider` (`noResults`)."
|
|
191
237
|
},
|
|
192
238
|
{
|
|
193
239
|
"name": "size",
|
|
@@ -451,8 +497,7 @@
|
|
|
451
497
|
"name": "placeholder",
|
|
452
498
|
"type": "React.ReactNode",
|
|
453
499
|
"required": false,
|
|
454
|
-
"description": "Text shown while no date is selected."
|
|
455
|
-
"default": "'Select dates'"
|
|
500
|
+
"description": "Text shown while no date is selected. Defaults to the `selectDate…` label of the picker's `labels`."
|
|
456
501
|
},
|
|
457
502
|
{
|
|
458
503
|
"name": "size",
|
|
@@ -505,7 +550,7 @@
|
|
|
505
550
|
"name": "contentProps",
|
|
506
551
|
"type": "Omit<PopoverContentProps, 'children'>",
|
|
507
552
|
"required": false,
|
|
508
|
-
"description": "Props for the popover content."
|
|
553
|
+
"description": "Props for the popover content. Not used on phones, where the calendar opens in a bottom sheet."
|
|
509
554
|
},
|
|
510
555
|
{
|
|
511
556
|
"name": "value",
|
|
@@ -1014,6 +1059,65 @@
|
|
|
1014
1059
|
"import": "import { formatFileSize } from '@optimum-intelligence/opti-ui';",
|
|
1015
1060
|
"signature": "formatFileSize(bytes: number, locale?: string)"
|
|
1016
1061
|
},
|
|
1062
|
+
{
|
|
1063
|
+
"name": "FormField",
|
|
1064
|
+
"kind": "component",
|
|
1065
|
+
"category": "Forms",
|
|
1066
|
+
"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.",
|
|
1067
|
+
"import": "import { FormField } from '@optimum-intelligence/opti-ui';",
|
|
1068
|
+
"propsType": "FormFieldProps",
|
|
1069
|
+
"props": [
|
|
1070
|
+
{
|
|
1071
|
+
"name": "label",
|
|
1072
|
+
"type": "React.ReactNode",
|
|
1073
|
+
"required": false,
|
|
1074
|
+
"description": "Visible label above the control."
|
|
1075
|
+
},
|
|
1076
|
+
{
|
|
1077
|
+
"name": "description",
|
|
1078
|
+
"type": "React.ReactNode",
|
|
1079
|
+
"required": false,
|
|
1080
|
+
"description": "Help text under the control."
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
"name": "error",
|
|
1084
|
+
"type": "React.ReactNode",
|
|
1085
|
+
"required": false,
|
|
1086
|
+
"description": "Error message. When set, the field is marked invalid and the message shows under the control."
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
"name": "required",
|
|
1090
|
+
"type": "boolean",
|
|
1091
|
+
"required": false,
|
|
1092
|
+
"description": "Adds the required marker to the label. Pass `required` to the control as well, so the browser checks it."
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
"name": "name",
|
|
1096
|
+
"type": "string",
|
|
1097
|
+
"required": false,
|
|
1098
|
+
"description": "Field name, used by `Form` to match server-side errors to this field."
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
"name": "disabled",
|
|
1102
|
+
"type": "boolean",
|
|
1103
|
+
"required": false,
|
|
1104
|
+
"description": "Disables the field and the control inside it."
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
"name": "fieldProps",
|
|
1108
|
+
"type": "Omit<React.ComponentProps<typeof FieldRoot>, 'children'>",
|
|
1109
|
+
"required": false,
|
|
1110
|
+
"description": "Props for the wrapping `Field.Root` (className, validate, validationMode…)."
|
|
1111
|
+
},
|
|
1112
|
+
{
|
|
1113
|
+
"name": "children",
|
|
1114
|
+
"type": "React.ReactNode",
|
|
1115
|
+
"required": false,
|
|
1116
|
+
"description": "The control: `Input`, `Select.Root`, `NumberField`, a custom control…"
|
|
1117
|
+
}
|
|
1118
|
+
],
|
|
1119
|
+
"example": "<FormField label=\"Plate\" description=\"As on the registration.\" error={errors.plate} required>\n <Input name=\"plate\" required />\n</FormField>"
|
|
1120
|
+
},
|
|
1017
1121
|
{
|
|
1018
1122
|
"name": "Input",
|
|
1019
1123
|
"kind": "component",
|
|
@@ -1077,6 +1181,12 @@
|
|
|
1077
1181
|
"required": false,
|
|
1078
1182
|
"description": "Error message. When set, the field is marked invalid."
|
|
1079
1183
|
},
|
|
1184
|
+
{
|
|
1185
|
+
"name": "fieldProps",
|
|
1186
|
+
"type": "FormFieldProps['fieldProps']",
|
|
1187
|
+
"required": false,
|
|
1188
|
+
"description": "Props for the wrapping `Field.Root` (className, validate, validationMode…)."
|
|
1189
|
+
},
|
|
1080
1190
|
{
|
|
1081
1191
|
"name": "size",
|
|
1082
1192
|
"type": "ControlSize",
|
|
@@ -1105,15 +1215,15 @@
|
|
|
1105
1215
|
"name": "decrementLabel",
|
|
1106
1216
|
"type": "string",
|
|
1107
1217
|
"required": false,
|
|
1108
|
-
"
|
|
1109
|
-
"
|
|
1218
|
+
"default": "'Decrease'",
|
|
1219
|
+
"description": "Accessible name of the − button. Set app-wide with `LabelsProvider` (`decrease`)."
|
|
1110
1220
|
},
|
|
1111
1221
|
{
|
|
1112
1222
|
"name": "incrementLabel",
|
|
1113
1223
|
"type": "string",
|
|
1114
1224
|
"required": false,
|
|
1115
|
-
"
|
|
1116
|
-
"
|
|
1225
|
+
"default": "'Increase'",
|
|
1226
|
+
"description": "Accessible name of the + button. Set app-wide with `LabelsProvider` (`increase`)."
|
|
1117
1227
|
}
|
|
1118
1228
|
],
|
|
1119
1229
|
"extends": [
|
|
@@ -1167,12 +1277,42 @@
|
|
|
1167
1277
|
"name": "toggleLabel",
|
|
1168
1278
|
"type": "string",
|
|
1169
1279
|
"required": false,
|
|
1170
|
-
"
|
|
1280
|
+
"default": "'Show password'",
|
|
1281
|
+
"description": "Accessible name of the show/hide button. Set app-wide with `LabelsProvider` (`showPassword`)."
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
"name": "label",
|
|
1285
|
+
"type": "React.ReactNode",
|
|
1286
|
+
"required": false,
|
|
1287
|
+
"description": "Visible label above the control."
|
|
1288
|
+
},
|
|
1289
|
+
{
|
|
1290
|
+
"name": "description",
|
|
1291
|
+
"type": "React.ReactNode",
|
|
1292
|
+
"required": false,
|
|
1293
|
+
"description": "Help text under the control."
|
|
1294
|
+
},
|
|
1295
|
+
{
|
|
1296
|
+
"name": "error",
|
|
1297
|
+
"type": "React.ReactNode",
|
|
1298
|
+
"required": false,
|
|
1299
|
+
"description": "Error message. When set, the field is marked invalid and the message shows under the control."
|
|
1300
|
+
},
|
|
1301
|
+
{
|
|
1302
|
+
"name": "required",
|
|
1303
|
+
"type": "boolean",
|
|
1304
|
+
"required": false,
|
|
1305
|
+
"description": "Adds the required marker to the label. Pass `required` to the control as well, so the browser checks it."
|
|
1306
|
+
},
|
|
1307
|
+
{
|
|
1308
|
+
"name": "fieldProps",
|
|
1309
|
+
"type": "Omit<React.ComponentProps<typeof FieldRoot>, 'children'>",
|
|
1310
|
+
"required": false,
|
|
1311
|
+
"description": "Props for the wrapping `Field.Root` (className, validate, validationMode…)."
|
|
1171
1312
|
}
|
|
1172
1313
|
],
|
|
1173
1314
|
"extends": [
|
|
1174
|
-
"Omit<BaseInput.Props, 'size'>"
|
|
1175
|
-
"FieldShellProps"
|
|
1315
|
+
"Omit<BaseInput.Props, 'size'>"
|
|
1176
1316
|
]
|
|
1177
1317
|
},
|
|
1178
1318
|
{
|
|
@@ -1223,8 +1363,8 @@
|
|
|
1223
1363
|
"name": "toggleLabel",
|
|
1224
1364
|
"type": "string",
|
|
1225
1365
|
"required": false,
|
|
1226
|
-
"
|
|
1227
|
-
"
|
|
1366
|
+
"default": "'Show password'",
|
|
1367
|
+
"description": "Accessible name of the show/hide button. Set app-wide with `LabelsProvider` (`showPassword`)."
|
|
1228
1368
|
}
|
|
1229
1369
|
],
|
|
1230
1370
|
"extends": [
|
|
@@ -1341,8 +1481,8 @@
|
|
|
1341
1481
|
"name": "clearLabel",
|
|
1342
1482
|
"type": "string",
|
|
1343
1483
|
"required": false,
|
|
1344
|
-
"
|
|
1345
|
-
"
|
|
1484
|
+
"default": "'Clear search'",
|
|
1485
|
+
"description": "Accessible name of the clear button. Set app-wide with `LabelsProvider` (`clearSearch`)."
|
|
1346
1486
|
},
|
|
1347
1487
|
{
|
|
1348
1488
|
"name": "icon",
|
|
@@ -1387,12 +1527,18 @@
|
|
|
1387
1527
|
"required": false,
|
|
1388
1528
|
"description": "Error message. When set, the field is marked invalid."
|
|
1389
1529
|
},
|
|
1530
|
+
{
|
|
1531
|
+
"name": "fieldProps",
|
|
1532
|
+
"type": "FormFieldProps['fieldProps']",
|
|
1533
|
+
"required": false,
|
|
1534
|
+
"description": "Props for the wrapping `Field.Root` (className, validate, validationMode…)."
|
|
1535
|
+
},
|
|
1390
1536
|
{
|
|
1391
1537
|
"name": "placeholder",
|
|
1392
1538
|
"type": "React.ReactNode",
|
|
1393
1539
|
"required": false,
|
|
1394
|
-
"
|
|
1395
|
-
"
|
|
1540
|
+
"default": "'Select…'",
|
|
1541
|
+
"description": "Text shown while nothing is selected. Set app-wide with `LabelsProvider` (`selectPlaceholder`)."
|
|
1396
1542
|
},
|
|
1397
1543
|
{
|
|
1398
1544
|
"name": "allLabel",
|
|
@@ -1437,7 +1583,19 @@
|
|
|
1437
1583
|
},
|
|
1438
1584
|
{
|
|
1439
1585
|
"name": "Select.Label",
|
|
1440
|
-
"description": ""
|
|
1586
|
+
"description": "",
|
|
1587
|
+
"propsType": "SelectLabelProps",
|
|
1588
|
+
"props": [
|
|
1589
|
+
{
|
|
1590
|
+
"name": "required",
|
|
1591
|
+
"type": "boolean",
|
|
1592
|
+
"required": false,
|
|
1593
|
+
"description": "Appends a required marker."
|
|
1594
|
+
}
|
|
1595
|
+
],
|
|
1596
|
+
"extends": [
|
|
1597
|
+
"BaseSelect.Label.Props"
|
|
1598
|
+
]
|
|
1441
1599
|
},
|
|
1442
1600
|
{
|
|
1443
1601
|
"name": "Select.Trigger",
|
|
@@ -1619,11 +1777,40 @@
|
|
|
1619
1777
|
"type": "boolean",
|
|
1620
1778
|
"required": false,
|
|
1621
1779
|
"description": "Grow with content up to `maxRows` (uses CSS field-sizing where supported)."
|
|
1780
|
+
},
|
|
1781
|
+
{
|
|
1782
|
+
"name": "label",
|
|
1783
|
+
"type": "React.ReactNode",
|
|
1784
|
+
"required": false,
|
|
1785
|
+
"description": "Visible label above the control."
|
|
1786
|
+
},
|
|
1787
|
+
{
|
|
1788
|
+
"name": "description",
|
|
1789
|
+
"type": "React.ReactNode",
|
|
1790
|
+
"required": false,
|
|
1791
|
+
"description": "Help text under the control."
|
|
1792
|
+
},
|
|
1793
|
+
{
|
|
1794
|
+
"name": "error",
|
|
1795
|
+
"type": "React.ReactNode",
|
|
1796
|
+
"required": false,
|
|
1797
|
+
"description": "Error message. When set, the field is marked invalid and the message shows under the control."
|
|
1798
|
+
},
|
|
1799
|
+
{
|
|
1800
|
+
"name": "required",
|
|
1801
|
+
"type": "boolean",
|
|
1802
|
+
"required": false,
|
|
1803
|
+
"description": "Adds the required marker to the label. Pass `required` to the control as well, so the browser checks it."
|
|
1804
|
+
},
|
|
1805
|
+
{
|
|
1806
|
+
"name": "fieldProps",
|
|
1807
|
+
"type": "Omit<React.ComponentProps<typeof FieldRoot>, 'children'>",
|
|
1808
|
+
"required": false,
|
|
1809
|
+
"description": "Props for the wrapping `Field.Root` (className, validate, validationMode…)."
|
|
1622
1810
|
}
|
|
1623
1811
|
],
|
|
1624
1812
|
"extends": [
|
|
1625
|
-
"React.TextareaHTMLAttributes<HTMLTextAreaElement>"
|
|
1626
|
-
"FieldShellProps"
|
|
1813
|
+
"React.TextareaHTMLAttributes<HTMLTextAreaElement>"
|
|
1627
1814
|
]
|
|
1628
1815
|
},
|
|
1629
1816
|
{
|
|
@@ -1656,11 +1843,40 @@
|
|
|
1656
1843
|
"type": "React.ReactNode",
|
|
1657
1844
|
"required": false,
|
|
1658
1845
|
"description": "Icon, text or button rendered inside the box, after the value."
|
|
1846
|
+
},
|
|
1847
|
+
{
|
|
1848
|
+
"name": "label",
|
|
1849
|
+
"type": "React.ReactNode",
|
|
1850
|
+
"required": false,
|
|
1851
|
+
"description": "Visible label above the control."
|
|
1852
|
+
},
|
|
1853
|
+
{
|
|
1854
|
+
"name": "description",
|
|
1855
|
+
"type": "React.ReactNode",
|
|
1856
|
+
"required": false,
|
|
1857
|
+
"description": "Help text under the control."
|
|
1858
|
+
},
|
|
1859
|
+
{
|
|
1860
|
+
"name": "error",
|
|
1861
|
+
"type": "React.ReactNode",
|
|
1862
|
+
"required": false,
|
|
1863
|
+
"description": "Error message. When set, the field is marked invalid and the message shows under the control."
|
|
1864
|
+
},
|
|
1865
|
+
{
|
|
1866
|
+
"name": "required",
|
|
1867
|
+
"type": "boolean",
|
|
1868
|
+
"required": false,
|
|
1869
|
+
"description": "Adds the required marker to the label. Pass `required` to the control as well, so the browser checks it."
|
|
1870
|
+
},
|
|
1871
|
+
{
|
|
1872
|
+
"name": "fieldProps",
|
|
1873
|
+
"type": "Omit<React.ComponentProps<typeof FieldRoot>, 'children'>",
|
|
1874
|
+
"required": false,
|
|
1875
|
+
"description": "Props for the wrapping `Field.Root` (className, validate, validationMode…)."
|
|
1659
1876
|
}
|
|
1660
1877
|
],
|
|
1661
1878
|
"extends": [
|
|
1662
|
-
"Omit<BaseInput.Props, 'size'>"
|
|
1663
|
-
"FieldShellProps"
|
|
1879
|
+
"Omit<BaseInput.Props, 'size'>"
|
|
1664
1880
|
]
|
|
1665
1881
|
},
|
|
1666
1882
|
{
|
|
@@ -1719,15 +1935,15 @@
|
|
|
1719
1935
|
"name": "menuLabel",
|
|
1720
1936
|
"type": "string",
|
|
1721
1937
|
"required": false,
|
|
1722
|
-
"
|
|
1723
|
-
"
|
|
1938
|
+
"default": "'Open navigation'",
|
|
1939
|
+
"description": "Accessible name of the button that opens the navigation drawer on small screens. Set app-wide with `LabelsProvider` (`openNavigation`)."
|
|
1724
1940
|
},
|
|
1725
1941
|
{
|
|
1726
1942
|
"name": "moreLabel",
|
|
1727
1943
|
"type": "string",
|
|
1728
1944
|
"required": false,
|
|
1729
|
-
"
|
|
1730
|
-
"
|
|
1945
|
+
"default": "'More'",
|
|
1946
|
+
"description": "Label of the tab-bar slot that opens the navigation drawer. Set app-wide with `LabelsProvider` (`more`)."
|
|
1731
1947
|
},
|
|
1732
1948
|
{
|
|
1733
1949
|
"name": "moreTabPosition",
|
|
@@ -1977,15 +2193,15 @@
|
|
|
1977
2193
|
"name": "collapseLabel",
|
|
1978
2194
|
"type": "string",
|
|
1979
2195
|
"required": false,
|
|
1980
|
-
"
|
|
1981
|
-
"
|
|
2196
|
+
"default": "'Collapse'",
|
|
2197
|
+
"description": "Accessible names for the icon-only toggle. Set app-wide with `LabelsProvider` (`collapseNavbar`)."
|
|
1982
2198
|
},
|
|
1983
2199
|
{
|
|
1984
2200
|
"name": "expandLabel",
|
|
1985
2201
|
"type": "string",
|
|
1986
2202
|
"required": false,
|
|
1987
|
-
"
|
|
1988
|
-
"
|
|
2203
|
+
"default": "'Expand'",
|
|
2204
|
+
"description": "Accessible name of the toggle while collapsed. Set app-wide with `LabelsProvider` (`expandNavbar`)."
|
|
1989
2205
|
}
|
|
1990
2206
|
],
|
|
1991
2207
|
"extends": [
|
|
@@ -2145,6 +2361,12 @@
|
|
|
2145
2361
|
"required": false,
|
|
2146
2362
|
"description": "Also shows the item in the `AppShell` mobile tab bar (icon and label). Pin up to four items; the\nfirst four in navbar order are used. Has no effect outside an `AppShell`.",
|
|
2147
2363
|
"default": "false"
|
|
2364
|
+
},
|
|
2365
|
+
{
|
|
2366
|
+
"name": "tabLabel",
|
|
2367
|
+
"type": "React.ReactNode",
|
|
2368
|
+
"required": false,
|
|
2369
|
+
"description": "Shorter label for the mobile tab bar, where long labels are cut short (e.g. \"Vehicles\" for \"Vehicle\nregister\"). The full label stays in the navbar and becomes the tab's tooltip. Only used with `pinned`."
|
|
2148
2370
|
}
|
|
2149
2371
|
],
|
|
2150
2372
|
"extends": [
|
|
@@ -2219,7 +2441,7 @@
|
|
|
2219
2441
|
"name": "actions",
|
|
2220
2442
|
"type": "React.ReactNode",
|
|
2221
2443
|
"required": false,
|
|
2222
|
-
"description": "Buttons or controls
|
|
2444
|
+
"description": "Buttons or controls on the title's row, at the right; they wrap below the title when the row is too narrow."
|
|
2223
2445
|
}
|
|
2224
2446
|
],
|
|
2225
2447
|
"extends": [
|
|
@@ -2417,11 +2639,13 @@
|
|
|
2417
2639
|
"type": "StatTone",
|
|
2418
2640
|
"required": false,
|
|
2419
2641
|
"values": [
|
|
2642
|
+
"success",
|
|
2643
|
+
"danger",
|
|
2644
|
+
"neutral",
|
|
2420
2645
|
"positive",
|
|
2421
|
-
"negative"
|
|
2422
|
-
"neutral"
|
|
2646
|
+
"negative"
|
|
2423
2647
|
],
|
|
2424
|
-
"description": "
|
|
2648
|
+
"description": "Colour of the delta: whether the change is good (`success`) or bad (`danger`), which the direction\nalone does not say. Defaults to `success` for `up`, `danger` for `down`. `positive` and `negative`\nstill work but are deprecated."
|
|
2425
2649
|
},
|
|
2426
2650
|
{
|
|
2427
2651
|
"name": "hint",
|
|
@@ -3274,22 +3498,22 @@
|
|
|
3274
3498
|
"name": "title",
|
|
3275
3499
|
"type": "string",
|
|
3276
3500
|
"required": false,
|
|
3277
|
-
"
|
|
3278
|
-
"
|
|
3501
|
+
"default": "'Command palette'",
|
|
3502
|
+
"description": "Accessible name of the dialog. Set app-wide with `LabelsProvider` (`commandPalette`)."
|
|
3279
3503
|
},
|
|
3280
3504
|
{
|
|
3281
3505
|
"name": "placeholder",
|
|
3282
3506
|
"type": "string",
|
|
3283
3507
|
"required": false,
|
|
3284
|
-
"
|
|
3285
|
-
"
|
|
3508
|
+
"default": "'Search…'",
|
|
3509
|
+
"description": "Placeholder and accessible name of the search input. Set app-wide with `LabelsProvider` (`commandSearch`)."
|
|
3286
3510
|
},
|
|
3287
3511
|
{
|
|
3288
3512
|
"name": "emptyText",
|
|
3289
3513
|
"type": "React.ReactNode",
|
|
3290
3514
|
"required": false,
|
|
3291
|
-
"
|
|
3292
|
-
"
|
|
3515
|
+
"default": "'No results found.'",
|
|
3516
|
+
"description": "Shown when nothing matches. Set app-wide with `LabelsProvider` (`noResults`)."
|
|
3293
3517
|
},
|
|
3294
3518
|
{
|
|
3295
3519
|
"name": "loading",
|
|
@@ -3386,8 +3610,8 @@
|
|
|
3386
3610
|
"name": "cancelLabel",
|
|
3387
3611
|
"type": "React.ReactNode",
|
|
3388
3612
|
"required": false,
|
|
3389
|
-
"
|
|
3390
|
-
"
|
|
3613
|
+
"default": "'Cancel'",
|
|
3614
|
+
"description": "Text of the cancel button. Set app-wide with `LabelsProvider` (`cancel`)."
|
|
3391
3615
|
},
|
|
3392
3616
|
{
|
|
3393
3617
|
"name": "onConfirm",
|
|
@@ -3517,8 +3741,8 @@
|
|
|
3517
3741
|
"name": "closeLabel",
|
|
3518
3742
|
"type": "string",
|
|
3519
3743
|
"required": false,
|
|
3520
|
-
"
|
|
3521
|
-
"
|
|
3744
|
+
"default": "'Close'",
|
|
3745
|
+
"description": "Accessible name of the close button. Set app-wide with `LabelsProvider` (`close`)."
|
|
3522
3746
|
},
|
|
3523
3747
|
{
|
|
3524
3748
|
"name": "backdropBlur",
|
|
@@ -3633,8 +3857,8 @@
|
|
|
3633
3857
|
{
|
|
3634
3858
|
"name": "title",
|
|
3635
3859
|
"type": "React.ReactNode",
|
|
3636
|
-
"required":
|
|
3637
|
-
"description": "Header title; also the drawer's accessible name."
|
|
3860
|
+
"required": false,
|
|
3861
|
+
"description": "Header title; also the drawer's accessible name. Needed unless `header` replaces the built-in header."
|
|
3638
3862
|
},
|
|
3639
3863
|
{
|
|
3640
3864
|
"name": "eyebrow",
|
|
@@ -3654,6 +3878,12 @@
|
|
|
3654
3878
|
"required": false,
|
|
3655
3879
|
"description": "Header content next to the close button (edit, delete, a menu…)."
|
|
3656
3880
|
},
|
|
3881
|
+
{
|
|
3882
|
+
"name": "header",
|
|
3883
|
+
"type": "React.ReactNode",
|
|
3884
|
+
"required": false,
|
|
3885
|
+
"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."
|
|
3886
|
+
},
|
|
3657
3887
|
{
|
|
3658
3888
|
"name": "footer",
|
|
3659
3889
|
"type": "React.ReactNode",
|
|
@@ -3716,8 +3946,8 @@
|
|
|
3716
3946
|
"name": "closeLabel",
|
|
3717
3947
|
"type": "string",
|
|
3718
3948
|
"required": false,
|
|
3719
|
-
"
|
|
3720
|
-
"
|
|
3949
|
+
"default": "'Close'",
|
|
3950
|
+
"description": "Accessible name of the close button. Set app-wide with `LabelsProvider` (`close`)."
|
|
3721
3951
|
},
|
|
3722
3952
|
{
|
|
3723
3953
|
"name": "className",
|
|
@@ -3885,7 +4115,7 @@
|
|
|
3885
4115
|
"name": "ToastProvider",
|
|
3886
4116
|
"kind": "component",
|
|
3887
4117
|
"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.",
|
|
4118
|
+
"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
4119
|
"import": "import { ToastProvider } from '@optimum-intelligence/opti-ui';",
|
|
3890
4120
|
"propsType": "ToastProviderProps",
|
|
3891
4121
|
"props": [
|
|
@@ -4038,9 +4268,10 @@
|
|
|
4038
4268
|
"name": "useToast",
|
|
4039
4269
|
"kind": "hook",
|
|
4040
4270
|
"category": "Overlays",
|
|
4041
|
-
"description": "Toast API with tone shortcuts: `toast.success({ title })`.",
|
|
4271
|
+
"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
4272
|
"import": "import { useToast } from '@optimum-intelligence/opti-ui';",
|
|
4043
|
-
"signature": "useToast()"
|
|
4273
|
+
"signature": "useToast()",
|
|
4274
|
+
"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
4275
|
},
|
|
4045
4276
|
{
|
|
4046
4277
|
"name": "Accordion",
|
|
@@ -4124,6 +4355,13 @@
|
|
|
4124
4355
|
"type": "React.ReactNode",
|
|
4125
4356
|
"required": false,
|
|
4126
4357
|
"description": "Shown between items. Defaults to a chevron."
|
|
4358
|
+
},
|
|
4359
|
+
{
|
|
4360
|
+
"name": "aria-label",
|
|
4361
|
+
"type": "string",
|
|
4362
|
+
"required": false,
|
|
4363
|
+
"default": "'Breadcrumb'",
|
|
4364
|
+
"description": "Accessible name of the `<nav>`. Set app-wide with `LabelsProvider` (`breadcrumbs`)."
|
|
4127
4365
|
}
|
|
4128
4366
|
],
|
|
4129
4367
|
"extends": [
|
|
@@ -4439,8 +4677,8 @@
|
|
|
4439
4677
|
"name": "dismissLabel",
|
|
4440
4678
|
"type": "string",
|
|
4441
4679
|
"required": false,
|
|
4442
|
-
"
|
|
4443
|
-
"
|
|
4680
|
+
"default": "'Dismiss'",
|
|
4681
|
+
"description": "Accessible name of the dismiss button. Set app-wide with `LabelsProvider` (`dismiss`)."
|
|
4444
4682
|
}
|
|
4445
4683
|
],
|
|
4446
4684
|
"extends": [
|
|
@@ -4596,7 +4834,7 @@
|
|
|
4596
4834
|
"name": "DataTable",
|
|
4597
4835
|
"kind": "compound",
|
|
4598
4836
|
"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
|
|
4837
|
+
"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.ColumnsMenu`,\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
4838
|
"import": "import { DataTable } from '@optimum-intelligence/opti-ui';",
|
|
4601
4839
|
"propsType": "DataTableProps",
|
|
4602
4840
|
"props": [
|
|
@@ -4666,13 +4904,26 @@
|
|
|
4666
4904
|
"name": "toolbar",
|
|
4667
4905
|
"type": "React.ReactNode | ((context: DataTableToolbarContext<T>) => React.ReactNode)",
|
|
4668
4906
|
"required": false,
|
|
4669
|
-
"description": "Extra toolbar content (add,
|
|
4907
|
+
"description": "Extra toolbar content (add, import…). A function receives the processed rows."
|
|
4908
|
+
},
|
|
4909
|
+
{
|
|
4910
|
+
"name": "bulkActions",
|
|
4911
|
+
"type": "(context: DataTableToolbarContext<T>) => React.ReactNode",
|
|
4912
|
+
"required": false,
|
|
4913
|
+
"description": "Actions on the selected rows. While rows are selected, the header row shows their count, a clear\nbutton and these actions in place of the column names. Needs `onSelectionChange`."
|
|
4914
|
+
},
|
|
4915
|
+
{
|
|
4916
|
+
"name": "columnsMenu",
|
|
4917
|
+
"type": "boolean",
|
|
4918
|
+
"required": false,
|
|
4919
|
+
"description": "Adds an icon button whose menu shows and hides columns (`DataTable.ColumnsMenu`).",
|
|
4920
|
+
"default": "false"
|
|
4670
4921
|
},
|
|
4671
4922
|
{
|
|
4672
4923
|
"name": "showToolbar",
|
|
4673
4924
|
"type": "boolean",
|
|
4674
4925
|
"required": false,
|
|
4675
|
-
"description": "`false` drops the search, filters,
|
|
4926
|
+
"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, a \"Filters (n)\" button whose panel holds the filters\nthat are not `quick`, the `quick` filters and a clear button on the left; the loading spinner,\n`toolbar` content, columns menu and export on the right. Active filters from the panel show\nas tags under it. The row count sits in the footer: the pagination's range, or a count when the table\nis not paginated. Below 640px the toolbar is one line: the search, a filter icon button whose bottom\nsheet holds every filter and the `toolbar` content, and export.",
|
|
4676
4927
|
"default": "true"
|
|
4677
4928
|
},
|
|
4678
4929
|
{
|
|
@@ -4750,7 +5001,8 @@
|
|
|
4750
5001
|
"name": "clearLabel",
|
|
4751
5002
|
"type": "string",
|
|
4752
5003
|
"required": false,
|
|
4753
|
-
"
|
|
5004
|
+
"default": "'Clear search'",
|
|
5005
|
+
"description": "Accessible name of the clear button. Set app-wide with `LabelsProvider` (`clearSearch`)."
|
|
4754
5006
|
},
|
|
4755
5007
|
{
|
|
4756
5008
|
"name": "icon",
|
|
@@ -4771,7 +5023,7 @@
|
|
|
4771
5023
|
},
|
|
4772
5024
|
{
|
|
4773
5025
|
"name": "DataTable.Filters",
|
|
4774
|
-
"description": "
|
|
5026
|
+
"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
5027
|
"propsType": "DataTableFiltersProps",
|
|
4776
5028
|
"props": [
|
|
4777
5029
|
{
|
|
@@ -4788,7 +5040,13 @@
|
|
|
4788
5040
|
"name": "stacked",
|
|
4789
5041
|
"type": "boolean",
|
|
4790
5042
|
"required": false,
|
|
4791
|
-
"description": "One filter per row at full width, chip rows and date ranges under their name: the layout of the\nfilter
|
|
5043
|
+
"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."
|
|
5044
|
+
},
|
|
5045
|
+
{
|
|
5046
|
+
"name": "quick",
|
|
5047
|
+
"type": "boolean",
|
|
5048
|
+
"required": false,
|
|
5049
|
+
"description": "`true` renders only the quick filters, `false` only the others. Left out, every filter."
|
|
4792
5050
|
}
|
|
4793
5051
|
],
|
|
4794
5052
|
"extends": [
|
|
@@ -4826,7 +5084,7 @@
|
|
|
4826
5084
|
},
|
|
4827
5085
|
{
|
|
4828
5086
|
"name": "DataTable.FilterSheet",
|
|
4829
|
-
"description": "The phone toolbar's
|
|
5087
|
+
"description": "The phone toolbar's filter button: an icon with the number of active filters, so the search next to it\nkeeps the width. It opens a bottom sheet holding every filter and the `children`. Filters apply as they\nchange. The footer keeps a clear button (disabled while no filter is set, so nothing moves when one is)\nand a button that closes the sheet on the result count.",
|
|
4830
5088
|
"propsType": "DataTableFilterSheetProps",
|
|
4831
5089
|
"props": [
|
|
4832
5090
|
{
|
|
@@ -4848,13 +5106,112 @@
|
|
|
4848
5106
|
}
|
|
4849
5107
|
]
|
|
4850
5108
|
},
|
|
5109
|
+
{
|
|
5110
|
+
"name": "DataTable.FilterPanel",
|
|
5111
|
+
"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.",
|
|
5112
|
+
"propsType": "DataTableFilterPanelProps",
|
|
5113
|
+
"props": [
|
|
5114
|
+
{
|
|
5115
|
+
"name": "size",
|
|
5116
|
+
"type": "DataTableControlSize",
|
|
5117
|
+
"required": false,
|
|
5118
|
+
"values": [
|
|
5119
|
+
"sm",
|
|
5120
|
+
"md"
|
|
5121
|
+
],
|
|
5122
|
+
"description": "Height of the button; the filters in the panel are full size."
|
|
5123
|
+
},
|
|
5124
|
+
{
|
|
5125
|
+
"name": "open",
|
|
5126
|
+
"type": "boolean",
|
|
5127
|
+
"required": false,
|
|
5128
|
+
"description": "Whether the panel is open. Set it with `onOpenChange` to open the panel from elsewhere."
|
|
5129
|
+
},
|
|
5130
|
+
{
|
|
5131
|
+
"name": "onOpenChange",
|
|
5132
|
+
"type": "(open: boolean) => void",
|
|
5133
|
+
"required": false,
|
|
5134
|
+
"description": "Called when the panel opens or closes."
|
|
5135
|
+
},
|
|
5136
|
+
{
|
|
5137
|
+
"name": "className",
|
|
5138
|
+
"type": "string",
|
|
5139
|
+
"required": false,
|
|
5140
|
+
"description": "Class name for the button."
|
|
5141
|
+
}
|
|
5142
|
+
],
|
|
5143
|
+
"example": "<DataTable.Root table={table}>\n <DataTable.Toolbar>\n <DataTable.Controls>\n <DataTable.Search />\n <DataTable.FilterPanel />\n <DataTable.Filters quick />\n <DataTable.ClearFilters keepSpace />\n </DataTable.Controls>\n </DataTable.Toolbar>\n <DataTable.ActiveFilters />\n <DataTable.Content />\n</DataTable.Root>"
|
|
5144
|
+
},
|
|
5145
|
+
{
|
|
5146
|
+
"name": "DataTable.ActiveFilters",
|
|
5147
|
+
"description": "Removable tags for the active filters that are not `quick` (those show their value in the toolbar).\nRenders nothing while none is set.",
|
|
5148
|
+
"propsType": "DataTableActiveFiltersProps",
|
|
5149
|
+
"props": [
|
|
5150
|
+
{
|
|
5151
|
+
"name": "onEdit",
|
|
5152
|
+
"type": "(id: string) => void",
|
|
5153
|
+
"required": false,
|
|
5154
|
+
"description": "Called with the filter id when a tag's text is clicked; the default toolbar opens the filter panel."
|
|
5155
|
+
}
|
|
5156
|
+
],
|
|
5157
|
+
"extends": [
|
|
5158
|
+
"React.HTMLAttributes<HTMLDivElement>"
|
|
5159
|
+
]
|
|
5160
|
+
},
|
|
4851
5161
|
{
|
|
4852
5162
|
"name": "DataTable.Actions",
|
|
4853
5163
|
"description": "Styled `<div>` (`.oui-data-table__actions`). Accepts `className`, `style`, the `render` prop and all `<div>` attributes."
|
|
4854
5164
|
},
|
|
5165
|
+
{
|
|
5166
|
+
"name": "DataTable.ClearFilters",
|
|
5167
|
+
"description": "Button that clears every filter. Place it after the filters with `keepSpace`, so nothing shifts when it appears.",
|
|
5168
|
+
"propsType": "DataTableClearFiltersProps",
|
|
5169
|
+
"props": [
|
|
5170
|
+
{
|
|
5171
|
+
"name": "className",
|
|
5172
|
+
"type": "string",
|
|
5173
|
+
"required": false,
|
|
5174
|
+
"description": "Class name for the button."
|
|
5175
|
+
},
|
|
5176
|
+
{
|
|
5177
|
+
"name": "keepSpace",
|
|
5178
|
+
"type": "boolean",
|
|
5179
|
+
"required": false,
|
|
5180
|
+
"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."
|
|
5181
|
+
}
|
|
5182
|
+
]
|
|
5183
|
+
},
|
|
5184
|
+
{
|
|
5185
|
+
"name": "DataTable.ColumnsMenu",
|
|
5186
|
+
"description": "Icon button with a menu of checkboxes that show or hide columns. Columns with `hidden` or\n`hideable: false` are not listed. The choice is in `table.hiddenColumns`; keep it across visits with\n`hiddenColumns` and `onHiddenColumnsChange`.",
|
|
5187
|
+
"propsType": "DataTableColumnsMenuProps",
|
|
5188
|
+
"props": [
|
|
5189
|
+
{
|
|
5190
|
+
"name": "size",
|
|
5191
|
+
"type": "DataTableControlSize",
|
|
5192
|
+
"required": false,
|
|
5193
|
+
"values": [
|
|
5194
|
+
"sm",
|
|
5195
|
+
"md"
|
|
5196
|
+
],
|
|
5197
|
+
"description": "Height of the button.",
|
|
5198
|
+
"default": "'md'"
|
|
5199
|
+
},
|
|
5200
|
+
{
|
|
5201
|
+
"name": "className",
|
|
5202
|
+
"type": "string",
|
|
5203
|
+
"required": false,
|
|
5204
|
+
"description": "Class name for the button."
|
|
5205
|
+
}
|
|
5206
|
+
]
|
|
5207
|
+
},
|
|
5208
|
+
{
|
|
5209
|
+
"name": "DataTable.Loading",
|
|
5210
|
+
"description": "Spinner while the table loads. It keeps its space while idle, so nothing moves when it shows."
|
|
5211
|
+
},
|
|
4855
5212
|
{
|
|
4856
5213
|
"name": "DataTable.Summary",
|
|
4857
|
-
"description": "Row count, or the number of selected rows
|
|
5214
|
+
"description": "Row count, or the number of selected rows. The default table shows it in the footer."
|
|
4858
5215
|
},
|
|
4859
5216
|
{
|
|
4860
5217
|
"name": "DataTable.Content",
|
|
@@ -4901,6 +5258,12 @@
|
|
|
4901
5258
|
"required": false,
|
|
4902
5259
|
"description": "Replaces the default empty state."
|
|
4903
5260
|
},
|
|
5261
|
+
{
|
|
5262
|
+
"name": "selectionActions",
|
|
5263
|
+
"type": "React.ReactNode",
|
|
5264
|
+
"required": false,
|
|
5265
|
+
"description": "Actions on the selected rows (delete, export, assign…). While rows are selected, the header row shows\ntheir count, a button that clears the selection and these actions in place of the column names, at the\nheader's height, so the rows do not move. Buttons in it are made header-sized."
|
|
5266
|
+
},
|
|
4904
5267
|
{
|
|
4905
5268
|
"name": "tableProps",
|
|
4906
5269
|
"type": "Omit<TableProps, 'children'>",
|
|
@@ -5107,6 +5470,7 @@
|
|
|
5107
5470
|
"required": false,
|
|
5108
5471
|
"values": [
|
|
5109
5472
|
"accent",
|
|
5473
|
+
"info",
|
|
5110
5474
|
"primary",
|
|
5111
5475
|
"success",
|
|
5112
5476
|
"warning",
|
|
@@ -5158,6 +5522,7 @@
|
|
|
5158
5522
|
"required": false,
|
|
5159
5523
|
"values": [
|
|
5160
5524
|
"accent",
|
|
5525
|
+
"info",
|
|
5161
5526
|
"primary",
|
|
5162
5527
|
"success",
|
|
5163
5528
|
"warning",
|
|
@@ -5276,8 +5641,8 @@
|
|
|
5276
5641
|
"name": "label",
|
|
5277
5642
|
"type": "string | null",
|
|
5278
5643
|
"required": false,
|
|
5279
|
-
"
|
|
5280
|
-
"
|
|
5644
|
+
"default": "'Loading'",
|
|
5645
|
+
"description": "Accessible label. Set to `null` when a parent already announces loading. Set app-wide with\n`LabelsProvider` (`loading`)."
|
|
5281
5646
|
}
|
|
5282
5647
|
],
|
|
5283
5648
|
"extends": [
|
|
@@ -5730,6 +6095,24 @@
|
|
|
5730
6095
|
"required": false,
|
|
5731
6096
|
"description": "Called with the selected row ids."
|
|
5732
6097
|
},
|
|
6098
|
+
{
|
|
6099
|
+
"name": "hiddenColumns",
|
|
6100
|
+
"type": "string[]",
|
|
6101
|
+
"required": false,
|
|
6102
|
+
"description": "Ids of the columns hidden from the columns menu (controlled). Columns with `hidden` stay hidden regardless."
|
|
6103
|
+
},
|
|
6104
|
+
{
|
|
6105
|
+
"name": "defaultHiddenColumns",
|
|
6106
|
+
"type": "string[]",
|
|
6107
|
+
"required": false,
|
|
6108
|
+
"description": "Initial hidden column ids when uncontrolled."
|
|
6109
|
+
},
|
|
6110
|
+
{
|
|
6111
|
+
"name": "onHiddenColumnsChange",
|
|
6112
|
+
"type": "(hiddenColumns: string[]) => void",
|
|
6113
|
+
"required": false,
|
|
6114
|
+
"description": "Called with the hidden column ids when one is shown or hidden; store them to keep the choice."
|
|
6115
|
+
},
|
|
5733
6116
|
{
|
|
5734
6117
|
"name": "onRowClick",
|
|
5735
6118
|
"type": "(row: T) => void",
|
|
@@ -5818,6 +6201,7 @@
|
|
|
5818
6201
|
"CircleIcon",
|
|
5819
6202
|
"CircleXIcon",
|
|
5820
6203
|
"ClockIcon",
|
|
6204
|
+
"ColumnsIcon",
|
|
5821
6205
|
"DownloadIcon",
|
|
5822
6206
|
"ExternalLinkIcon",
|
|
5823
6207
|
"EyeIcon",
|
|
@@ -5857,6 +6241,13 @@
|
|
|
5857
6241
|
"import": "import { matchesQuery } from '@optimum-intelligence/opti-ui';",
|
|
5858
6242
|
"signature": "matchesQuery(text: unknown, query: string)"
|
|
5859
6243
|
},
|
|
6244
|
+
{
|
|
6245
|
+
"name": "NARROW_SCREEN",
|
|
6246
|
+
"kind": "constant",
|
|
6247
|
+
"category": "Icons & utilities",
|
|
6248
|
+
"description": "Media query for phones, which get their own layout at and below 640px. Pass it to `useMediaQuery`.",
|
|
6249
|
+
"import": "import { NARROW_SCREEN } from '@optimum-intelligence/opti-ui';"
|
|
6250
|
+
},
|
|
5860
6251
|
{
|
|
5861
6252
|
"name": "normalizeText",
|
|
5862
6253
|
"kind": "function",
|
|
@@ -5865,6 +6256,22 @@
|
|
|
5865
6256
|
"import": "import { normalizeText } from '@optimum-intelligence/opti-ui';",
|
|
5866
6257
|
"signature": "normalizeText(value: unknown)"
|
|
5867
6258
|
},
|
|
6259
|
+
{
|
|
6260
|
+
"name": "SHELL_COLLAPSED",
|
|
6261
|
+
"kind": "constant",
|
|
6262
|
+
"category": "Icons & utilities",
|
|
6263
|
+
"description": "Media query for screens where `AppShell` moves its navbar into a drawer and shows the tab bar (900px and below).",
|
|
6264
|
+
"import": "import { SHELL_COLLAPSED } from '@optimum-intelligence/opti-ui';"
|
|
6265
|
+
},
|
|
6266
|
+
{
|
|
6267
|
+
"name": "useMediaQuery",
|
|
6268
|
+
"kind": "hook",
|
|
6269
|
+
"category": "Icons & utilities",
|
|
6270
|
+
"description": "Whether a media query matches, following changes. `false` during server rendering.",
|
|
6271
|
+
"import": "import { useMediaQuery } from '@optimum-intelligence/opti-ui';",
|
|
6272
|
+
"signature": "useMediaQuery(query: string)",
|
|
6273
|
+
"example": "const phone = useMediaQuery(NARROW_SCREEN);"
|
|
6274
|
+
},
|
|
5868
6275
|
{
|
|
5869
6276
|
"name": "usePortalContainer",
|
|
5870
6277
|
"kind": "hook",
|
|
@@ -6380,7 +6787,7 @@
|
|
|
6380
6787
|
"name": "useResolvedColors",
|
|
6381
6788
|
"kind": "hook",
|
|
6382
6789
|
"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.",
|
|
6790
|
+
"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
6791
|
"import": "import { useResolvedColors } from '@optimum-intelligence/opti-ui/map';",
|
|
6385
6792
|
"signature": "useResolvedColors(element: HTMLElement | null)"
|
|
6386
6793
|
}
|