@ensi-platform/admin-ui 0.13.2 → 0.14.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/dist/Component--pn4mDeS.js +870 -0
- package/dist/Component--pn4mDeS.js.map +1 -0
- package/dist/{Component-BhZC1r4b.js → Component-BJz78zCJ.js} +2 -2
- package/dist/{Component-BhZC1r4b.js.map → Component-BJz78zCJ.js.map} +1 -1
- package/dist/{Component-DV6H96-0.js → Component-BbslNbTq.js} +2 -2
- package/dist/{Component-DV6H96-0.js.map → Component-BbslNbTq.js.map} +1 -1
- package/dist/{Component-B6OSgrmp.js → Component-COgt_U9z.js} +3 -3
- package/dist/{Component-B6OSgrmp.js.map → Component-COgt_U9z.js.map} +1 -1
- package/dist/{Component-kqMyROjC.js → Component-DHBQ3LMI.js} +2 -2
- package/dist/{Component-kqMyROjC.js.map → Component-DHBQ3LMI.js.map} +1 -1
- package/dist/{Component-BoAQ166N.js → Component-DrdEP1wD.js} +3 -3
- package/dist/{Component-BoAQ166N.js.map → Component-DrdEP1wD.js.map} +1 -1
- package/dist/{Component-CMdJyqc-.js → Component-Qhj0uSjq.js} +2 -2
- package/dist/{Component-CMdJyqc-.js.map → Component-Qhj0uSjq.js.map} +1 -1
- package/dist/{Component-CiwX3wP8.js → Component-Zja2mwzK.js} +2 -2
- package/dist/{Component-CiwX3wP8.js.map → Component-Zja2mwzK.js.map} +1 -1
- package/dist/{Component-CS-9-L8S.js → Component-_PP1i9V1.js} +3 -3
- package/dist/{Component-CS-9-L8S.js.map → Component-_PP1i9V1.js.map} +1 -1
- package/dist/{Component-BBzbDcdq.js → Component-yeVZUFid.js} +2 -2
- package/dist/{Component-BBzbDcdq.js.map → Component-yeVZUFid.js.map} +1 -1
- package/dist/{Search-CS1rsu-f.js → Search-dQa9wT3n.js} +3 -3
- package/dist/{Search-CS1rsu-f.js.map → Search-dQa9wT3n.js.map} +1 -1
- package/dist/Star-JBCU7DBD.js +28 -0
- package/dist/Star-JBCU7DBD.js.map +1 -0
- package/dist/action-popup/index.js +2 -2
- package/dist/active-filters/index.js +1 -1
- package/dist/arrangement-settings/index.js +2 -2
- package/dist/assets/Component16.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -0
- package/dist/autocomplete/index.js +1 -1
- package/dist/autocomplete-async/Component.d.ts.map +1 -1
- package/dist/autocomplete-async/index.js +98 -92
- package/dist/autocomplete-async/index.js.map +1 -1
- package/dist/bottom-sheet/index.js +2 -2
- package/dist/cascade-menu/index.js +4 -4
- package/dist/color-field/index.js +2 -2
- package/dist/color-picker/index.js +1 -1
- package/dist/combobox/components/Trigger/index.d.ts +1 -0
- package/dist/combobox/components/Trigger/index.d.ts.map +1 -1
- package/dist/combobox/index.d.ts +1 -1
- package/dist/combobox/index.d.ts.map +1 -1
- package/dist/combobox/index.js +15 -14
- package/dist/copy-button/index.js +1 -1
- package/dist/data-table/Component.d.ts +1 -1
- package/dist/data-table/index.js +2 -2
- package/dist/date-picker/index.js +2 -2
- package/dist/date-range-picker/index.js +2 -2
- package/dist/drawer/index.js +1 -1
- package/dist/dropzone/index.js +2 -2
- package/dist/{hooks-Di5rgHTG.js → hooks-BSSTu-2y.js} +3 -2
- package/dist/{hooks-Di5rgHTG.js.map → hooks-BSSTu-2y.js.map} +1 -1
- package/dist/icons/AlignCenter.d.ts +7 -0
- package/dist/icons/AlignCenter.d.ts.map +1 -0
- package/dist/icons/AlignJustify.d.ts +7 -0
- package/dist/icons/AlignJustify.d.ts.map +1 -0
- package/dist/icons/AlignLeft.d.ts +7 -0
- package/dist/icons/AlignLeft.d.ts.map +1 -0
- package/dist/icons/AlignRight.d.ts +7 -0
- package/dist/icons/AlignRight.d.ts.map +1 -0
- package/dist/icons/Anchor.d.ts +7 -0
- package/dist/icons/Anchor.d.ts.map +1 -0
- package/dist/icons/Bold.d.ts +7 -0
- package/dist/icons/Bold.d.ts.map +1 -0
- package/dist/icons/Code.d.ts +7 -0
- package/dist/icons/Code.d.ts.map +1 -0
- package/dist/icons/HorizontalRule.d.ts +7 -0
- package/dist/icons/HorizontalRule.d.ts.map +1 -0
- package/dist/icons/Indent.d.ts +7 -0
- package/dist/icons/Indent.d.ts.map +1 -0
- package/dist/icons/Italic.d.ts +7 -0
- package/dist/icons/Italic.d.ts.map +1 -0
- package/dist/icons/Link.d.ts +7 -0
- package/dist/icons/Link.d.ts.map +1 -0
- package/dist/icons/List.d.ts +7 -0
- package/dist/icons/List.d.ts.map +1 -0
- package/dist/icons/ListOrdered.d.ts +7 -0
- package/dist/icons/ListOrdered.d.ts.map +1 -0
- package/dist/icons/Maximize.d.ts +7 -0
- package/dist/icons/Maximize.d.ts.map +1 -0
- package/dist/icons/Outdent.d.ts +7 -0
- package/dist/icons/Outdent.d.ts.map +1 -0
- package/dist/icons/Palette.d.ts +7 -0
- package/dist/icons/Palette.d.ts.map +1 -0
- package/dist/icons/Quote.d.ts +7 -0
- package/dist/icons/Quote.d.ts.map +1 -0
- package/dist/icons/Redo.d.ts +7 -0
- package/dist/icons/Redo.d.ts.map +1 -0
- package/dist/icons/Smile.d.ts +7 -0
- package/dist/icons/Smile.d.ts.map +1 -0
- package/dist/icons/Star.d.ts +7 -0
- package/dist/icons/Star.d.ts.map +1 -0
- package/dist/icons/Strike.d.ts +7 -0
- package/dist/icons/Strike.d.ts.map +1 -0
- package/dist/icons/Subscript.d.ts +7 -0
- package/dist/icons/Subscript.d.ts.map +1 -0
- package/dist/icons/Superscript.d.ts +7 -0
- package/dist/icons/Superscript.d.ts.map +1 -0
- package/dist/icons/Table.d.ts +7 -0
- package/dist/icons/Table.d.ts.map +1 -0
- package/dist/icons/Underline.d.ts +7 -0
- package/dist/icons/Underline.d.ts.map +1 -0
- package/dist/icons/Undo.d.ts +7 -0
- package/dist/icons/Undo.d.ts.map +1 -0
- package/dist/icons/Video.d.ts +7 -0
- package/dist/icons/Video.d.ts.map +1 -0
- package/dist/icons/index.d.ts +27 -0
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/icons/index.js +709 -177
- package/dist/icons/index.js.map +1 -1
- package/dist/{index-Co6mzXrw.js → index-CYUeRS10.js} +3 -3
- package/dist/{index-Co6mzXrw.js.map → index-CYUeRS10.js.map} +1 -1
- package/dist/index-Rx06m88a.js +101 -0
- package/dist/index-Rx06m88a.js.map +1 -0
- package/dist/{index-BAFoUNz-.js → index-o14ps46j.js} +2 -2
- package/dist/{index-BAFoUNz-.js.map → index-o14ps46j.js.map} +1 -1
- package/dist/input/index.js +1 -1
- package/dist/loader/index.js +1 -1
- package/dist/mask/index.js +1 -1
- package/dist/menu-list/index.js +1 -1
- package/dist/{metrics-CaN_sENu.js → metrics-D4vChkd-.js} +2 -2
- package/dist/{metrics-CaN_sENu.js.map → metrics-D4vChkd-.js.map} +1 -1
- package/dist/modal/index.js +1 -1
- package/dist/multi-autocomplete/index.js +1 -1
- package/dist/multi-autocomplete-async/index.js +1 -1
- package/dist/multi-select/index.js +2 -2
- package/dist/number-input/index.js +1 -1
- package/dist/number-range/index.js +1 -1
- package/dist/password/index.js +2 -2
- package/dist/provider/context.d.ts.map +1 -1
- package/dist/provider/index.js +2 -2
- package/dist/provider/types.d.ts +2 -0
- package/dist/provider/types.d.ts.map +1 -1
- package/dist/rating/Component.d.ts +5 -0
- package/dist/rating/Component.d.ts.map +1 -0
- package/dist/rating/FormRating.d.ts +6 -0
- package/dist/rating/FormRating.d.ts.map +1 -0
- package/dist/rating/components/Star/index.d.ts +14 -0
- package/dist/rating/components/Star/index.d.ts.map +1 -0
- package/dist/rating/components/Star/theme.d.ts +5 -0
- package/dist/rating/components/Star/theme.d.ts.map +1 -0
- package/dist/rating/components/Track/index.d.ts +41 -0
- package/dist/rating/components/Track/index.d.ts.map +1 -0
- package/dist/rating/index.d.ts +4 -0
- package/dist/rating/index.d.ts.map +1 -0
- package/dist/rating/index.js +361 -0
- package/dist/rating/index.js.map +1 -0
- package/dist/rating/theme.d.ts +5 -0
- package/dist/rating/theme.d.ts.map +1 -0
- package/dist/rating/types.d.ts +56 -0
- package/dist/rating/types.d.ts.map +1 -0
- package/dist/rating/utils.d.ts +11 -0
- package/dist/rating/utils.d.ts.map +1 -0
- package/dist/select/index.js +1 -1
- package/dist/suggest-checklist/index.js +3 -3
- package/dist/table/Component.d.ts +3 -3
- package/dist/table/components/Cell/index.d.ts +1 -1
- package/dist/table/components/Cell/index.d.ts.map +1 -1
- package/dist/table/components/Cell/theme.d.ts +1 -0
- package/dist/table/components/Cell/theme.d.ts.map +1 -1
- package/dist/table/components/CheckboxCell/index.d.ts.map +1 -1
- package/dist/table/components/HeaderCell/index.d.ts +1 -1
- package/dist/table/components/HeaderCell/index.d.ts.map +1 -1
- package/dist/table/components/HeaderCell/theme.d.ts +1 -0
- package/dist/table/components/HeaderCell/theme.d.ts.map +1 -1
- package/dist/table/components/HeaderCheckboxCell/index.d.ts.map +1 -1
- package/dist/table/components/Row/index.d.ts +1 -1
- package/dist/table/components/Row/index.d.ts.map +1 -1
- package/dist/table/components/Row/types.d.ts +6 -0
- package/dist/table/components/Row/types.d.ts.map +1 -1
- package/dist/table/components/TableElement/index.d.ts.map +1 -1
- package/dist/table/hooks/useTablePin.d.ts +6 -0
- package/dist/table/hooks/useTablePin.d.ts.map +1 -0
- package/dist/table/index.js +1 -1
- package/dist/table/types.d.ts +5 -1
- package/dist/table/types.d.ts.map +1 -1
- package/dist/table/utils.d.ts +45 -1
- package/dist/table/utils.d.ts.map +1 -1
- package/dist/tabs/index.js +1 -1
- package/dist/tag/index.js +1 -1
- package/dist/textarea/index.js +1 -1
- package/dist/time-field/index.js +1 -1
- package/dist/toast/index.js +2 -2
- package/dist/typography/index.js +1 -1
- package/dist/{utils-qHAuIhao.js → utils-Dfp1NDWx.js} +3 -3
- package/dist/{utils-qHAuIhao.js.map → utils-Dfp1NDWx.js.map} +1 -1
- package/dist/vertical-tabs/index.js +1 -1
- package/docs/design-language.md +14 -13
- package/package.json +5 -1
- package/src/autocomplete/docs/Description.md +2 -0
- package/src/autocomplete-async/docs/Description.md +1 -1
- package/src/badge/docs/cssVariables.ts +3 -3
- package/src/bottom-sheet/docs/cssVariables.ts +1 -1
- package/src/cascade-menu/docs/cssVariables.ts +7 -7
- package/src/data-table/docs/Description.md +2 -1
- package/src/ds/tokens/docs/Description.md +2 -1
- package/src/link/docs/cssVariables.ts +1 -1
- package/src/provider/docs/cssVariables.ts +1 -1
- package/src/provider/types.ts +2 -0
- package/src/rating/docs/Description.md +47 -0
- package/src/rating/docs/Example.md +9 -0
- package/src/rating/docs/cssVariables.ts +14 -0
- package/src/rating/types.ts +69 -0
- package/src/table/docs/Description.md +10 -8
- package/src/table/docs/Example.md +22 -5
- package/src/table/docs/cssVariables.ts +8 -3
- package/src/table/types.ts +6 -1
- package/src/toast/docs/cssVariables.ts +4 -4
- package/src/tooltip/docs/cssVariables.ts +2 -2
- package/dist/Component-DmKmX7so.js +0 -712
- package/dist/Component-DmKmX7so.js.map +0 -1
- package/dist/index-BHUJOcwj.js +0 -85
- package/dist/index-BHUJOcwj.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ensi-platform/admin-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Admin UI for Ensi admin panel",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -237,6 +237,10 @@
|
|
|
237
237
|
"types": "./dist/provider/index.d.ts",
|
|
238
238
|
"import": "./dist/provider/index.js"
|
|
239
239
|
},
|
|
240
|
+
"./rating": {
|
|
241
|
+
"types": "./dist/rating/index.d.ts",
|
|
242
|
+
"import": "./dist/rating/index.js"
|
|
243
|
+
},
|
|
240
244
|
"./select": {
|
|
241
245
|
"types": "./dist/select/index.d.ts",
|
|
242
246
|
"import": "./dist/select/index.js"
|
|
@@ -34,6 +34,8 @@ import { Autocomplete, FormAutocomplete } from '@ensi-platform/admin-ui/autocomp
|
|
|
34
34
|
| `block` | `boolean` | — | full width |
|
|
35
35
|
| `dataTestId` | `string` | — | `data-test-id` for tests |
|
|
36
36
|
|
|
37
|
+
A click on the field opens the list. A second click leaves it open.
|
|
38
|
+
|
|
37
39
|
### FormAutocomplete
|
|
38
40
|
|
|
39
41
|
| Prop | Values | Default | Description |
|
|
@@ -50,7 +50,7 @@ Pass a stable module hook reference (not inline or conditional).
|
|
|
50
50
|
| `block` | `boolean` | — | full width |
|
|
51
51
|
| `dataTestId` | `string` | — | `data-test-id` for tests |
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
Backspace keeps the typed remainder and does not change `value`. Tab and one Escape restore the selected label without `onChange`. A click on another option changes `value`. A click on the field opens the list.
|
|
54
54
|
|
|
55
55
|
No external `options` / `isLoading`.
|
|
56
56
|
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
export const docsCssVariables = `/* CSS variables — Badge (--aui-badge-*) */
|
|
3
3
|
--aui-badge-bg-neutral: var(--aui-surface-bg-muted); /* neutral fill */
|
|
4
4
|
--aui-badge-fg-neutral: var(--aui-page-fg-primary); /* neutral foreground */
|
|
5
|
-
--aui-badge-bg-success: var(--aui-green-
|
|
5
|
+
--aui-badge-bg-success: color-mix(in srgb, var(--aui-green-700) 22%, var(--aui-surface-bg-primary)); /* success fill */
|
|
6
6
|
--aui-badge-fg-success: var(--aui-green-700); /* success foreground */
|
|
7
|
-
--aui-badge-bg-warning: var(--aui-yellow-
|
|
7
|
+
--aui-badge-bg-warning: color-mix(in srgb, var(--aui-yellow-700) 22%, var(--aui-surface-bg-primary)); /* warning fill */
|
|
8
8
|
--aui-badge-fg-warning: var(--aui-yellow-700); /* warning foreground */
|
|
9
|
-
--aui-badge-bg-danger: var(--aui-red-
|
|
9
|
+
--aui-badge-bg-danger: color-mix(in srgb, var(--aui-red-700) 22%, var(--aui-surface-bg-primary)); /* danger fill */
|
|
10
10
|
--aui-badge-fg-danger: var(--aui-red-700); /* danger foreground */
|
|
11
11
|
--aui-badge-bg-info: var(--aui-badge-bg-neutral); /* info fill = neutral */
|
|
12
12
|
--aui-badge-fg-info: var(--aui-badge-fg-neutral); /* info foreground = neutral */
|
|
@@ -24,7 +24,7 @@ export const docsCssVariables = `/* CSS variables — BottomSheet (--aui-bottom-
|
|
|
24
24
|
--aui-bottom-sheet-handle-w-md: var(--aui-spacing-48); /* drag handle w md */
|
|
25
25
|
--aui-bottom-sheet-handle-h-md: var(--aui-spacing-4); /* drag handle h md */
|
|
26
26
|
--aui-bottom-sheet-handle-radius-md: var(--aui-radius-4); /* drag handle radius md */
|
|
27
|
-
--aui-bottom-sheet-handle-bg-primary: var(--aui-
|
|
27
|
+
--aui-bottom-sheet-handle-bg-primary: var(--aui-surface-bg-muted-active); /* drag handle bg primary */
|
|
28
28
|
|
|
29
29
|
--aui-bottom-sheet-close-size-sm: var(--aui-spacing-16); /* close button size sm */
|
|
30
30
|
--aui-bottom-sheet-close-hit-sm: var(--aui-spacing-32); /* close button hit sm */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export const docsCssVariables = `/* CSS variables — CascadeMenu (--aui-cascade-menu-*)
|
|
2
|
-
* Light/default values below (semantic.css). Dark
|
|
2
|
+
* Light/default values below (semantic.css). Dark remaps page, surface, and control only.
|
|
3
3
|
*/
|
|
4
|
-
--aui-cascade-menu-bg-primary: var(--aui-
|
|
4
|
+
--aui-cascade-menu-bg-primary: var(--aui-page-bg-subtle); /* L0 — matches the page; the divider is the edge */
|
|
5
5
|
--aui-cascade-menu-fg-primary: var(--aui-page-fg-primary); /* primary text / logo currentColor */
|
|
6
6
|
--aui-cascade-menu-fg-muted: var(--aui-page-fg-muted); /* secondary text on L0 */
|
|
7
|
-
--aui-cascade-menu-border-divider: var(--aui-surface-border-primary); /* footer / edges / L0+flyout border-right
|
|
7
|
+
--aui-cascade-menu-border-divider: var(--aui-surface-border-primary); /* footer / edges / L0+flyout border-right */
|
|
8
8
|
--aui-cascade-menu-border-focus: var(--aui-control-border-focus); /* focus / resize hover */
|
|
9
9
|
--aui-cascade-menu-w-md: 280px; /* default L0 width token (resize 200–400) */
|
|
10
10
|
--aui-cascade-menu-w-collapsed: 64px; /* collapsed rail width */
|
|
@@ -21,11 +21,11 @@ export const docsCssVariables = `/* CSS variables — CascadeMenu (--aui-cascade
|
|
|
21
21
|
--aui-cascade-menu-user-pad-y-md: var(--aui-spacing-12); /* footer top pad */
|
|
22
22
|
--aui-cascade-menu-handle-w: 4px; /* resize line width */
|
|
23
23
|
--aui-cascade-menu-handle-delay: 400ms; /* hover dwell before the resize line thickens; drag skips it */
|
|
24
|
-
--aui-cascade-menu-item-bg-hover: var(--aui-surface-bg-muted); /* L0 item / user / collapse hover
|
|
24
|
+
--aui-cascade-menu-item-bg-hover: var(--aui-surface-bg-muted); /* L0 item / user / collapse hover */
|
|
25
25
|
--aui-cascade-menu-item-bg-active: transparent; /* current leaf — no fill (breadcrumbs own “where am I”) */
|
|
26
|
-
--aui-cascade-menu-item-bg-active-hover: var(--aui-surface-bg-muted); /* current leaf hover = same as hover
|
|
27
|
-
--aui-cascade-menu-item-bg-open: var(--aui-surface-bg-muted); /* open folder / path fill
|
|
28
|
-
--aui-cascade-menu-item-bg-open-hover: var(--aui-surface-bg-muted-hover); /* open folder hover
|
|
26
|
+
--aui-cascade-menu-item-bg-active-hover: var(--aui-surface-bg-muted); /* current leaf hover = same as hover */
|
|
27
|
+
--aui-cascade-menu-item-bg-open: var(--aui-surface-bg-muted); /* open folder / path fill */
|
|
28
|
+
--aui-cascade-menu-item-bg-open-hover: var(--aui-surface-bg-muted-hover); /* open folder hover */
|
|
29
29
|
--aui-cascade-menu-nested-bg: var(--aui-cascade-menu-bg-primary); /* flyout fill = L0 chrome */
|
|
30
30
|
--aui-cascade-menu-nested-shadow: none; /* full-height panel flush to L0 — no elevation */
|
|
31
31
|
--aui-cascade-menu-z: var(--aui-z-chrome); /* L0 stacking context — above sticky table, below dropdown */
|
|
@@ -28,6 +28,7 @@ Slots: `Header` / `Body` / `Footer` / `Row` / `Cell` / `HeaderCell` / `CheckboxC
|
|
|
28
28
|
- The root renders the scroll area and `<table>`. `Header` and `Body` sit inside the table, `Footer` sits outside
|
|
29
29
|
- `HeaderCell`: `column` and `sortable`. Without `Filter`, sorting is a header click (`none` → `asc` → `desc` → `none`). Switching column clears the previous one
|
|
30
30
|
- `Filter` is the drop body inside `HeaderCell`. `active` colors the icon. No slot — no drop. When the column is `sortable`, sort actions sit under the filter
|
|
31
|
-
- `
|
|
31
|
+
- `Cell` / `HeaderCell` `pin` and `Row` `pin` match `Table`. Checkbox cells stay pinned to the start
|
|
32
|
+
- `Row` `onContextMenu` is the right click, the same prop as on a `Table` row. The row does not open a menu. `active` keeps `--aui-table-bg-hover`, including on a checked row, while the screen keeps the menu open
|
|
32
33
|
- `Actions` is a quiet “⋯” button with `onClick`. It stays visible, with no fill. The row assembly decides what the click opens
|
|
33
34
|
- `Pagination` and `PageSize` match `Table` and usually live in `Footer`
|
|
@@ -19,6 +19,7 @@ An app layout may use only these:
|
|
|
19
19
|
| Token | Role |
|
|
20
20
|
| --- | --- |
|
|
21
21
|
| `--aui-page-bg-primary` | page fill |
|
|
22
|
+
| `--aui-page-bg-subtle` | sidebar, matches the page; the divider is the edge |
|
|
22
23
|
| `--aui-page-fg-primary` | page text |
|
|
23
24
|
| `--aui-page-fg-muted` | secondary text |
|
|
24
25
|
| `--aui-page-fg-link` | link text (underline; same as page text) |
|
|
@@ -27,4 +28,4 @@ An app layout may use only these:
|
|
|
27
28
|
| `--aui-surface-bg-elevated` | raised surface |
|
|
28
29
|
| `--aui-surface-border-primary` | zone stroke, when the zone has no fill |
|
|
29
30
|
|
|
30
|
-
Primitive scales (`--aui-neutral-*`, `--aui-
|
|
31
|
+
Primitive scales (`--aui-neutral-*`, `--aui-red-*`, radius, spacing) are not for app CSS. Screen layers and hex roles — `docs/design-language.md`.
|
|
@@ -3,7 +3,7 @@ export const docsCssVariables = `/* CSS variables — Link (--aui-link-*)
|
|
|
3
3
|
* Light/default below (semantic.css). Dark: hover white in semantic.dark.css.
|
|
4
4
|
*/
|
|
5
5
|
--aui-link-fg: var(--aui-page-fg-link); /* link text = page fg */
|
|
6
|
-
--aui-link-fg-hover: var(--aui-
|
|
6
|
+
--aui-link-fg-hover: var(--aui-control-bg-brand); /* link hover; dark mirrors brand */
|
|
7
7
|
--aui-link-border-focus: var(--aui-control-border-focus); /* focus ring */
|
|
8
8
|
--aui-link-duration-fast: var(--aui-control-duration-fast); /* transition duration */
|
|
9
9
|
--aui-link-ease-out: var(--aui-control-ease-out); /* transition easing */`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Page substrate CSS variables used by AdminUiProvider root (--aui-page-*). */
|
|
2
2
|
export const docsCssVariables = `/* CSS variables — AdminUiProvider page substrate (--aui-page-*) */
|
|
3
3
|
--aui-page-bg-primary: var(--aui-white); /* page canvas background */
|
|
4
|
-
--aui-page-fg-primary: var(--aui-
|
|
4
|
+
--aui-page-fg-primary: var(--aui-neutral-900); /* page default foreground */
|
|
5
5
|
`;
|
package/src/provider/types.ts
CHANGED
|
@@ -152,6 +152,8 @@ export interface IAuiLabels {
|
|
|
152
152
|
dropzoneLimitReached: string;
|
|
153
153
|
/** Dropzone: form message while a file is still uploading. */
|
|
154
154
|
dropzoneUploading: string;
|
|
155
|
+
/** Rating value text (`{value}`, `{max}`). */
|
|
156
|
+
ratingValue: string;
|
|
155
157
|
}
|
|
156
158
|
|
|
157
159
|
export type TAuiLabels = IAuiLabels;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
Star rating in whole and half steps.
|
|
2
|
+
|
|
3
|
+
```tsx
|
|
4
|
+
import { Rating, FormRating } from '@ensi-platform/admin-ui/rating';
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
## When to use
|
|
8
|
+
|
|
9
|
+
- a product, review, or quality score
|
|
10
|
+
- a track without stars — see `Slider`
|
|
11
|
+
- a status with no number — see `Badge`
|
|
12
|
+
|
|
13
|
+
## API (short)
|
|
14
|
+
|
|
15
|
+
### Rating
|
|
16
|
+
|
|
17
|
+
| Prop | Values | Default | Description |
|
|
18
|
+
| -------------- | ------------------------- | --------- | -------------------------------------------------------- |
|
|
19
|
+
| `size` | `sm` \| `md` \| `lg` | `md` | star size |
|
|
20
|
+
| `variant` | `primary` | `primary` | palette |
|
|
21
|
+
| `value` | `number` | — | controlled value |
|
|
22
|
+
| `defaultValue` | `number` | — | initial value |
|
|
23
|
+
| `onChange` | `(value: number) => void` | — | value change |
|
|
24
|
+
| `minValue` | `number` | `0` | minimum; a second press on the current half returns here |
|
|
25
|
+
| `maxValue` | `number` | `5` | maximum; one star per unit above `minValue` |
|
|
26
|
+
| `step` | `number` | `0.5` | step |
|
|
27
|
+
| `readOnly` | `boolean` | `false` | display without a slider: `role="img"` |
|
|
28
|
+
| `invalid` | `boolean` | `false` | error |
|
|
29
|
+
| `disabled` | `boolean` | `false` | unavailable; with `readOnly` it stays a slider |
|
|
30
|
+
| `dataTestId` | `string` | — | `data-test-id` for tests |
|
|
31
|
+
|
|
32
|
+
Label it with `Field` or `aria-label`. The number is not shown. On the slider it is `aria-valuetext` from the `ratingValue` template (`{value}` of `{max}`). On `readOnly` the same string is the image name. No `as`.
|
|
33
|
+
|
|
34
|
+
### FormRating
|
|
35
|
+
|
|
36
|
+
| Prop | Values | Default | Description |
|
|
37
|
+
| ------------ | -------------------- | ------- | ---------------------------- |
|
|
38
|
+
| `name` | `string` | — | `Form` field name (`number`) |
|
|
39
|
+
| `label` | `ReactNode` | — | label |
|
|
40
|
+
| `hint` | `ReactNode` | — | hint under the stars |
|
|
41
|
+
| `size` | `sm` \| `md` \| `lg` | `md` | size |
|
|
42
|
+
| `readOnly` | `boolean` | — | display only |
|
|
43
|
+
| `disabled` | `boolean` | — | unavailable |
|
|
44
|
+
| `block` | `boolean` | `true` | `Field` column width |
|
|
45
|
+
| `dataTestId` | `string` | — | `data-test-id` for tests |
|
|
46
|
+
|
|
47
|
+
A missing field value becomes `minValue` (`0`).
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Rating CSS variables from semantic tokens (--aui-rating-*). */
|
|
2
|
+
export const docsCssVariables = `/* CSS variables — Rating (--aui-rating-*) */
|
|
3
|
+
--aui-rating-fg-primary: var(--aui-yellow-500); /* filled star */
|
|
4
|
+
--aui-rating-fg-primary-hover: color-mix(in srgb, var(--aui-yellow-500) 65%, transparent); /* preview fill */
|
|
5
|
+
--aui-rating-fg-muted: var(--aui-page-fg-muted); /* empty star */
|
|
6
|
+
--aui-rating-border-focus: var(--aui-control-border-focus); /* focus outline */
|
|
7
|
+
--aui-rating-border-danger: var(--aui-control-border-danger); /* invalid outline */
|
|
8
|
+
--aui-rating-icon-sm: var(--aui-spacing-16); /* star sm */
|
|
9
|
+
--aui-rating-icon-md: var(--aui-spacing-20); /* star md */
|
|
10
|
+
--aui-rating-icon-lg: var(--aui-spacing-24); /* star lg */
|
|
11
|
+
--aui-rating-gap: var(--aui-spacing-4); /* gap between stars */
|
|
12
|
+
--aui-rating-duration-fast: var(--aui-control-duration-fast); /* fill transition */
|
|
13
|
+
--aui-rating-ease-out: var(--aui-control-ease-out); /* fill easing */
|
|
14
|
+
`;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { type FocusEventHandler, type Ref } from 'react';
|
|
2
|
+
|
|
3
|
+
import { type SliderProps as RacSliderProps } from 'react-aria-components';
|
|
4
|
+
|
|
5
|
+
import { type IDataTestIdProps } from '@ds/common';
|
|
6
|
+
|
|
7
|
+
import { type IFieldStateProps } from '@/field/types';
|
|
8
|
+
import { type IFormFieldLayoutProps } from '@/form/types';
|
|
9
|
+
|
|
10
|
+
export type TRatingSize = 'sm' | 'md' | 'lg';
|
|
11
|
+
|
|
12
|
+
export type TRatingVariant = 'primary';
|
|
13
|
+
|
|
14
|
+
/** Theme inputs. */
|
|
15
|
+
export interface IRatingThemeProps {
|
|
16
|
+
/** Rating size. */
|
|
17
|
+
size?: TRatingSize;
|
|
18
|
+
/** Visual variant. */
|
|
19
|
+
variant?: TRatingVariant;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** Control state (our names, not RAC). */
|
|
23
|
+
export interface IRatingControlProps {
|
|
24
|
+
/** Controlled value. */
|
|
25
|
+
value?: number;
|
|
26
|
+
/** Uncontrolled initial value. */
|
|
27
|
+
defaultValue?: number;
|
|
28
|
+
/** Value change handler. */
|
|
29
|
+
onChange?: (value: number) => void;
|
|
30
|
+
/** Blur handler for the range input. */
|
|
31
|
+
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
32
|
+
/** Minimum value. A click on the current half returns here. */
|
|
33
|
+
minValue?: number;
|
|
34
|
+
/** Maximum value. One star per unit above `minValue`. */
|
|
35
|
+
maxValue?: number;
|
|
36
|
+
/** Step between values. */
|
|
37
|
+
step?: number;
|
|
38
|
+
/** Show the value without a slider. */
|
|
39
|
+
readOnly?: boolean;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Own / chrome props (not from RAC). */
|
|
43
|
+
export interface IRatingOwnProps extends IDataTestIdProps {
|
|
44
|
+
/** Ref to the range input (React 19 prop). */
|
|
45
|
+
ref?: Ref<HTMLInputElement>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** Content slice for FormRating. */
|
|
49
|
+
export interface IRatingContentProps {
|
|
50
|
+
minValue?: number;
|
|
51
|
+
maxValue?: number;
|
|
52
|
+
step?: number;
|
|
53
|
+
readOnly?: boolean;
|
|
54
|
+
/** Accessible name when there is no visible `label`. */
|
|
55
|
+
'aria-label'?: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface IRatingBaseProps
|
|
59
|
+
extends IRatingThemeProps, Pick<IFieldStateProps, 'invalid' | 'disabled'>, IRatingControlProps, IRatingOwnProps {}
|
|
60
|
+
|
|
61
|
+
/** RAC keys omitted because names differ from ours. */
|
|
62
|
+
export type TRatingRacOmit =
|
|
63
|
+
'isDisabled' | 'value' | 'defaultValue' | 'onChange' | 'onBlur' | 'minValue' | 'maxValue' | 'step';
|
|
64
|
+
|
|
65
|
+
export interface IRatingProps
|
|
66
|
+
extends IRatingBaseProps, Omit<RacSliderProps<number>, keyof IRatingBaseProps | TRatingRacOmit> {}
|
|
67
|
+
|
|
68
|
+
export interface IFormRatingProps
|
|
69
|
+
extends IFormFieldLayoutProps, Pick<IRatingThemeProps, 'variant'>, IRatingContentProps {}
|
|
@@ -10,20 +10,22 @@ import { Table, useTableRowSelection } from '@ensi-platform/admin-ui/table';
|
|
|
10
10
|
|
|
11
11
|
## API (short)
|
|
12
12
|
|
|
13
|
-
| Prop | Values | Default | Description
|
|
14
|
-
| ------------ | -------------------- | ------- |
|
|
15
|
-
| `size` | `sm` \| `md` \| `lg` | `md` | row density
|
|
16
|
-
| `block` | `boolean` | `true` | stretch to 100% of parent width
|
|
17
|
-
| `hasChecked` | `boolean` | `false` | reserve layout for a leading checkbox column
|
|
18
|
-
| `zebra` | `boolean` | `false` | subtle even-row background (
|
|
19
|
-
| `dataTestId` | `string` | — | `data-test-id` for tests
|
|
13
|
+
| Prop | Values | Default | Description |
|
|
14
|
+
| ------------ | -------------------- | ------- | -------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `size` | `sm` \| `md` \| `lg` | `md` | row density |
|
|
16
|
+
| `block` | `boolean` | `true` | stretch to 100% of parent width |
|
|
17
|
+
| `hasChecked` | `boolean` | `false` | reserve layout for a leading checkbox column |
|
|
18
|
+
| `zebra` | `boolean` | `false` | subtle even-row background (checked / hover win; a checked row hovers with `--aui-table-bg-hover`) |
|
|
19
|
+
| `dataTestId` | `string` | — | `data-test-id` for tests |
|
|
20
20
|
|
|
21
21
|
Slots: `Scroll` / `Table` / `Header` / `Body` / `Footer` / `Row` / `Cell` / `HeaderCell` / `CheckboxCell` / `HeaderCheckboxCell` / `ActionBar` / `SortIndicator` / `Pagination` / `PageSize`.
|
|
22
22
|
|
|
23
23
|
- `Scroll` — scroll area; `Footer` is a sibling (not inside `Table.Table` / `<table>`)
|
|
24
24
|
- `Table` — native `<table>`: only `Header` / `Body` / `Row` / cells
|
|
25
25
|
- `Header`: `sticky?`; `Footer`: `sticky?` (default `true`); left `PageSize`, right `Pagination`
|
|
26
|
-
- `Cell` / `HeaderCell`: `numeric?`, `align?`, `utility?`, `noWrap?`, `width
|
|
26
|
+
- `Cell` / `HeaderCell`: `numeric?`, `align?`, `utility?`, `noWrap?`, `width?`, `pin?` (`start` | `end`); `HeaderCell` also has `sortable?`, `sortDirection?`, `onSort?`, `filter?`, `filterActive?`
|
|
27
|
+
- the same `pin` goes on every cell of that column, including the header. Several columns on one edge stack their offsets. Checkbox cells are always `start`. The edge seam shows only while that edge is stuck to the scroll area
|
|
28
|
+
- `Row`: `pin?` (`top` | `bottom`) for body rows. Several rows on one edge stack under the sticky header or up from the bottom of the scroll area. `active` keeps `--aui-table-bg-hover`, including on a checked row; the row does not open a menu
|
|
27
29
|
- `filter` is the drop body in the column header. The trigger is a floating pill. When the column is `sortable`, sort actions sit under the filter. Without `filter`, sorting stays a click on the header. `filterActive` colors the filter icon
|
|
28
30
|
- `Pagination`: controlled `page` + `pageCount` + `onPageChange` + `from` + `to` + `total`; numbered pages (window, first and last always present); optional `rangeLabel?`, `prevLabel?` / `nextLabel?`, `disabled?`
|
|
29
31
|
- `PageSize`: controlled `value` + `onChange`; `options?` (default `[5, 10, 25, 50, 100]`); `label?`; `disabled?`
|
|
@@ -27,10 +27,18 @@ const onPageSizeChange = (size: number) => {
|
|
|
27
27
|
onChange={setAllOnPage}
|
|
28
28
|
aria-label="Select all"
|
|
29
29
|
/>
|
|
30
|
-
<Table.HeaderCell sortable sortDirection={sort} onSort={setSort}>
|
|
30
|
+
<Table.HeaderCell pin="start" width={180} sortable sortDirection={sort} onSort={setSort}>
|
|
31
31
|
Name
|
|
32
32
|
</Table.HeaderCell>
|
|
33
|
-
<Table.HeaderCell
|
|
33
|
+
<Table.HeaderCell width={160}>City</Table.HeaderCell>
|
|
34
|
+
<Table.HeaderCell width={140}>Status</Table.HeaderCell>
|
|
35
|
+
<Table.HeaderCell width={180}>Manager</Table.HeaderCell>
|
|
36
|
+
<Table.HeaderCell width={160}>Warehouse</Table.HeaderCell>
|
|
37
|
+
<Table.HeaderCell width={180}>Channel</Table.HeaderCell>
|
|
38
|
+
<Table.HeaderCell numeric width={120}>
|
|
39
|
+
Amount
|
|
40
|
+
</Table.HeaderCell>
|
|
41
|
+
<Table.HeaderCell pin="end" utility />
|
|
34
42
|
</Table.Row>
|
|
35
43
|
</Table.Header>
|
|
36
44
|
<Table.Body>
|
|
@@ -41,9 +49,18 @@ const onPageSizeChange = (size: number) => {
|
|
|
41
49
|
onChange={() => toggle(row.id)}
|
|
42
50
|
aria-label={`Select ${row.name}`}
|
|
43
51
|
/>
|
|
44
|
-
<Table.Cell
|
|
45
|
-
|
|
46
|
-
|
|
52
|
+
<Table.Cell pin="start" width={180}>
|
|
53
|
+
{row.name}
|
|
54
|
+
</Table.Cell>
|
|
55
|
+
<Table.Cell width={160}>{row.city}</Table.Cell>
|
|
56
|
+
<Table.Cell width={140}>{row.status}</Table.Cell>
|
|
57
|
+
<Table.Cell width={180}>{row.manager}</Table.Cell>
|
|
58
|
+
<Table.Cell width={160}>{row.warehouse}</Table.Cell>
|
|
59
|
+
<Table.Cell width={180}>{row.channel}</Table.Cell>
|
|
60
|
+
<Table.Cell numeric width={120}>
|
|
61
|
+
{row.amount}
|
|
62
|
+
</Table.Cell>
|
|
63
|
+
<Table.Cell pin="end" utility>
|
|
47
64
|
<Table.ActionBar visibleCount={0} items={[{ text: 'Edit', onClick: () => {} }]} />
|
|
48
65
|
</Table.Cell>
|
|
49
66
|
</Table.Row>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/** Table CSS variables from semantic tokens (--aui-table-*). */
|
|
2
2
|
export const docsCssVariables = `/* CSS variables — Table (--aui-table-*) */
|
|
3
3
|
--aui-table-bg-primary: var(--aui-surface-bg-primary); /* primary fill */
|
|
4
|
-
--aui-table-bg-hover: var(--aui-
|
|
5
|
-
--aui-table-bg-selected: var(--aui-
|
|
6
|
-
--aui-table-bg-zebra: var(--aui-neutral-50); /* zebra fill; dark
|
|
4
|
+
--aui-table-bg-hover: var(--aui-surface-bg-muted-active); /* hover fill */
|
|
5
|
+
--aui-table-bg-selected: var(--aui-surface-bg-muted); /* selected fill */
|
|
6
|
+
--aui-table-bg-zebra: var(--aui-neutral-50); /* zebra fill; dark is a quiet white mix */
|
|
7
7
|
--aui-table-bg-header: var(--aui-surface-bg-primary); /* header fill */
|
|
8
8
|
--aui-table-bg-footer: var(--aui-surface-bg-primary); /* footer fill */
|
|
9
9
|
|
|
@@ -56,8 +56,13 @@ export const docsCssVariables = `/* CSS variables — Table (--aui-table-*) */
|
|
|
56
56
|
--aui-table-page-size-min: var(--aui-spacing-64); /* page-size select min width */
|
|
57
57
|
|
|
58
58
|
--aui-table-z-sticky: 2; /* z-index */
|
|
59
|
+
--aui-table-z-pin: 1; /* pinned cell z-index */
|
|
60
|
+
--aui-table-z-pin-cross: 2; /* pinned row and column intersection z-index */
|
|
59
61
|
|
|
60
62
|
--aui-table-shadow-sticky: 0 1px 0 var(--aui-table-border-primary); /* sticky shadow */
|
|
63
|
+
--aui-table-shadow-pin-start: 1px 0 0 var(--aui-table-border-primary); /* pin seam at the inline start */
|
|
64
|
+
--aui-table-shadow-pin-end: -1px 0 0 var(--aui-table-border-primary); /* pin seam at the inline end */
|
|
65
|
+
--aui-table-shadow-pin-bottom: 0 -1px 0 var(--aui-table-border-primary); /* pin seam above a bottom row */
|
|
61
66
|
|
|
62
67
|
--aui-table-duration-fast: var(--aui-control-duration-fast); /* transition duration (fast) */
|
|
63
68
|
--aui-table-ease-out: var(--aui-control-ease-out); /* transition easing */`;
|
package/src/table/types.ts
CHANGED
|
@@ -11,6 +11,9 @@ export type TTableSortDirection = 'asc' | 'desc';
|
|
|
11
11
|
/** Cell horizontal alignment. */
|
|
12
12
|
export type TTableAlign = 'start' | 'end' | 'center';
|
|
13
13
|
|
|
14
|
+
/** Column pin edge. */
|
|
15
|
+
export type TTablePin = 'start' | 'end';
|
|
16
|
+
|
|
14
17
|
/** Theme inputs. */
|
|
15
18
|
export interface ITableThemeProps {
|
|
16
19
|
/** Row density. */
|
|
@@ -54,6 +57,8 @@ export interface ITableCellChromeProps {
|
|
|
54
57
|
width?: CSSProperties['width'];
|
|
55
58
|
/** Utility column (checkbox / actions / settings). */
|
|
56
59
|
utility?: boolean;
|
|
60
|
+
/** Stick to the inline start or end while the shell scrolls. */
|
|
61
|
+
pin?: TTablePin;
|
|
57
62
|
}
|
|
58
63
|
|
|
59
64
|
export type { ITableHeaderProps } from './components/Header/types';
|
|
@@ -61,7 +66,7 @@ export type { ITableBodyProps } from './components/Body/types';
|
|
|
61
66
|
export type { ITableFooterProps } from './components/Footer/types';
|
|
62
67
|
export type { ITableScrollProps } from './components/Scroll/types';
|
|
63
68
|
export type { ITableElementProps } from './components/TableElement/types';
|
|
64
|
-
export type { ITableRowProps } from './components/Row/types';
|
|
69
|
+
export type { ITableRowProps, TTableRowPin } from './components/Row/types';
|
|
65
70
|
export type { ITableCellProps } from './components/Cell/types';
|
|
66
71
|
export type { ITableHeaderCellProps } from './components/HeaderCell/types';
|
|
67
72
|
export type { ITableCheckboxCellProps } from './components/CheckboxCell/types';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/** Toast CSS variables from semantic tokens (--aui-toast-*). */
|
|
2
2
|
export const docsCssVariables = `/* CSS variables — Toast (--aui-toast-*) */
|
|
3
3
|
--aui-toast-bg-neutral: var(--aui-surface-bg-muted); /* neutral fill */
|
|
4
|
-
--aui-toast-accent-neutral: var(--aui-
|
|
5
|
-
--aui-toast-bg-success: var(--aui-green-
|
|
4
|
+
--aui-toast-accent-neutral: var(--aui-page-fg-muted); /* neutral accent */
|
|
5
|
+
--aui-toast-bg-success: color-mix(in srgb, var(--aui-green-700) 22%, var(--aui-surface-bg-primary)); /* success fill */
|
|
6
6
|
--aui-toast-accent-success: var(--aui-green-700); /* success accent */
|
|
7
|
-
--aui-toast-bg-warning: var(--aui-yellow-
|
|
7
|
+
--aui-toast-bg-warning: color-mix(in srgb, var(--aui-yellow-700) 22%, var(--aui-surface-bg-primary)); /* warning fill */
|
|
8
8
|
--aui-toast-accent-warning: var(--aui-yellow-700); /* warning accent */
|
|
9
|
-
--aui-toast-bg-danger: var(--aui-red-
|
|
9
|
+
--aui-toast-bg-danger: color-mix(in srgb, var(--aui-red-700) 22%, var(--aui-surface-bg-primary)); /* danger fill */
|
|
10
10
|
--aui-toast-accent-danger: var(--aui-red-700); /* danger accent */
|
|
11
11
|
--aui-toast-bg-info: var(--aui-surface-bg-muted); /* info fill = muted */
|
|
12
12
|
--aui-toast-accent-info: var(--aui-page-fg-muted); /* info accent = muted fg */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Tooltip CSS variables from semantic tokens (--aui-tooltip-*). */
|
|
2
2
|
export const docsCssVariables = `/* CSS variables — Tooltip (--aui-tooltip-*) */
|
|
3
|
-
--aui-tooltip-bg-primary: var(--aui-
|
|
4
|
-
--aui-tooltip-fg-primary: var(--aui-
|
|
3
|
+
--aui-tooltip-bg-primary: var(--aui-control-bg-brand); /* primary fill */
|
|
4
|
+
--aui-tooltip-fg-primary: var(--aui-control-fg-brand); /* primary foreground */
|
|
5
5
|
|
|
6
6
|
--aui-tooltip-radius-md: var(--aui-control-radius-sm); /* md radius */
|
|
7
7
|
--aui-tooltip-pad-y-sm: var(--aui-spacing-4); /* padding-y sm */
|