@lerianstudio/sindarian-ui 2.0.0-beta.2 → 2.0.0-beta.21
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/LICENSE +93 -0
- package/README.md +52 -1
- package/dist/components/breadcrumb/index.d.ts.map +1 -1
- package/dist/components/breadcrumb/index.js +25 -1
- package/dist/components/card/account-card/index.js +5 -5
- package/dist/components/card/basic-card/index.d.ts.map +1 -1
- package/dist/components/card/basic-card/index.js +2 -2
- package/dist/components/card/entity-card/index.js +1 -1
- package/dist/components/dialog/confirmation-dialog/index.d.ts.map +1 -1
- package/dist/components/dialog/confirmation-dialog/index.js +4 -1
- package/dist/components/entity-box/index.d.ts +18 -2
- package/dist/components/entity-box/index.d.ts.map +1 -1
- package/dist/components/entity-box/index.js +32 -4
- package/dist/components/form/date-picker-field/index.js +1 -1
- package/dist/components/form/date-range-field/index.js +1 -1
- package/dist/components/form/date-time-picker-field/index.js +1 -1
- package/dist/components/form/password-field/index.d.ts +5 -1
- package/dist/components/form/password-field/index.d.ts.map +1 -1
- package/dist/components/form/password-field/index.js +2 -2
- package/dist/components/form/select-field/index.d.ts +15 -1
- package/dist/components/form/select-field/index.d.ts.map +1 -1
- package/dist/components/form/select-field/index.js +28 -3
- package/dist/components/form/switch-field/index.d.ts.map +1 -1
- package/dist/components/form/switch-field/index.js +6 -1
- package/dist/components/page/index.d.ts +35 -1
- package/dist/components/page/index.d.ts.map +1 -1
- package/dist/components/page/index.js +6 -2
- package/dist/components/page-header/index.js +1 -1
- package/dist/components/table/id-table-cell.d.ts +13 -1
- package/dist/components/table/id-table-cell.d.ts.map +1 -1
- package/dist/components/table/id-table-cell.js +99 -9
- package/dist/components/table/index.d.ts +1 -0
- package/dist/components/table/index.d.ts.map +1 -1
- package/dist/components/table/index.js +1 -0
- package/dist/components/table/locked-table-actions.d.ts +24 -0
- package/dist/components/table/locked-table-actions.d.ts.map +1 -1
- package/dist/components/table/locked-table-actions.js +31 -1
- package/dist/components/table/name-table-cell.d.ts +57 -4
- package/dist/components/table/name-table-cell.d.ts.map +1 -1
- package/dist/components/table/name-table-cell.js +50 -2
- package/dist/components/ui/autocomplete/index.d.ts +24 -0
- package/dist/components/ui/autocomplete/index.d.ts.map +1 -1
- package/dist/components/ui/autocomplete/index.js +24 -0
- package/dist/components/ui/badge/index.d.ts +11 -7
- package/dist/components/ui/badge/index.d.ts.map +1 -1
- package/dist/components/ui/badge/index.js +20 -8
- package/dist/components/ui/button/index.d.ts +3 -3
- package/dist/components/ui/copy-field/index.d.ts +25 -1
- package/dist/components/ui/copy-field/index.d.ts.map +1 -1
- package/dist/components/ui/copy-field/index.js +16 -8
- package/dist/components/ui/dialog/index.d.ts +1 -1
- package/dist/components/ui/dialog/index.d.ts.map +1 -1
- package/dist/components/ui/dialog/index.js +2 -2
- package/dist/components/ui/file-upload/index.d.ts +159 -0
- package/dist/components/ui/file-upload/index.d.ts.map +1 -1
- package/dist/components/ui/file-upload/index.js +308 -6
- package/dist/components/ui/icon-button/index.d.ts +1 -1
- package/dist/components/ui/icon-button/styles.css +42 -0
- package/dist/components/ui/input/styles.css +79 -4
- package/dist/components/ui/lerian-wordmark/index.d.ts +6 -0
- package/dist/components/ui/lerian-wordmark/index.d.ts.map +1 -0
- package/dist/components/ui/lerian-wordmark/index.js +7 -0
- package/dist/components/ui/otp-input/index.js +1 -1
- package/dist/components/ui/radio-group/index.js +1 -1
- package/dist/components/ui/select/index.d.ts.map +1 -1
- package/dist/components/ui/select/index.js +8 -4
- package/dist/components/ui/select/styles.css +1 -1
- package/dist/components/ui/sheet/index.d.ts +42 -0
- package/dist/components/ui/sheet/index.d.ts.map +1 -1
- package/dist/components/ui/sheet/index.js +47 -14
- package/dist/components/ui/sidebar/index.d.ts +1 -0
- package/dist/components/ui/sidebar/index.d.ts.map +1 -1
- package/dist/components/ui/sidebar/index.js +1 -0
- package/dist/components/ui/sidebar/sidebar-expand-button.d.ts +1 -1
- package/dist/components/ui/sidebar/sidebar-expand-button.d.ts.map +1 -1
- package/dist/components/ui/sidebar/sidebar-expand-button.js +15 -1
- package/dist/components/ui/sidebar/sidebar-item.d.ts +1 -1
- package/dist/components/ui/sidebar/sidebar-item.d.ts.map +1 -1
- package/dist/components/ui/sidebar/sidebar-item.js +28 -4
- package/dist/components/ui/sidebar/sidebar-provider.d.ts +58 -0
- package/dist/components/ui/sidebar/sidebar-provider.d.ts.map +1 -1
- package/dist/components/ui/sidebar/sidebar-provider.js +146 -4
- package/dist/components/ui/sidebar/sidebar-root.d.ts +38 -1
- package/dist/components/ui/sidebar/sidebar-root.d.ts.map +1 -1
- package/dist/components/ui/sidebar/sidebar-root.js +111 -5
- package/dist/components/ui/sidebar/sidebar-trigger.d.ts +45 -0
- package/dist/components/ui/sidebar/sidebar-trigger.d.ts.map +1 -0
- package/dist/components/ui/sidebar/sidebar-trigger.js +57 -0
- package/dist/components/ui/textarea/index.js +1 -1
- package/dist/components/ui/toast/toaster.d.ts +5 -1
- package/dist/components/ui/toast/toaster.d.ts.map +1 -1
- package/dist/components/ui/toast/toaster.js +3 -2
- package/dist/enterprise/data-table/index.d.ts +77 -7
- package/dist/enterprise/data-table/index.d.ts.map +1 -1
- package/dist/enterprise/data-table/index.js +56 -11
- package/dist/enterprise/date-range-picker/index.js +4 -4
- package/dist/enterprise/number-input/index.d.ts.map +1 -1
- package/dist/enterprise/number-input/index.js +1 -1
- package/dist/esm/components/breadcrumb/index.d.ts.map +1 -1
- package/dist/esm/components/breadcrumb/index.js +25 -1
- package/dist/esm/components/card/account-card/index.js +5 -5
- package/dist/esm/components/card/basic-card/index.d.ts.map +1 -1
- package/dist/esm/components/card/basic-card/index.js +2 -2
- package/dist/esm/components/card/entity-card/index.js +1 -1
- package/dist/esm/components/dialog/confirmation-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/dialog/confirmation-dialog/index.js +4 -1
- package/dist/esm/components/entity-box/index.d.ts +18 -2
- package/dist/esm/components/entity-box/index.d.ts.map +1 -1
- package/dist/esm/components/entity-box/index.js +29 -4
- package/dist/esm/components/form/date-picker-field/index.js +1 -1
- package/dist/esm/components/form/date-range-field/index.js +1 -1
- package/dist/esm/components/form/date-time-picker-field/index.js +1 -1
- package/dist/esm/components/form/password-field/index.d.ts +5 -1
- package/dist/esm/components/form/password-field/index.d.ts.map +1 -1
- package/dist/esm/components/form/password-field/index.js +2 -2
- package/dist/esm/components/form/select-field/index.d.ts +15 -1
- package/dist/esm/components/form/select-field/index.d.ts.map +1 -1
- package/dist/esm/components/form/select-field/index.js +29 -4
- package/dist/esm/components/form/switch-field/index.d.ts.map +1 -1
- package/dist/esm/components/form/switch-field/index.js +7 -2
- package/dist/esm/components/page/index.d.ts +35 -1
- package/dist/esm/components/page/index.d.ts.map +1 -1
- package/dist/esm/components/page/index.js +6 -2
- package/dist/esm/components/page-header/index.js +1 -1
- package/dist/esm/components/table/id-table-cell.d.ts +13 -1
- package/dist/esm/components/table/id-table-cell.d.ts.map +1 -1
- package/dist/esm/components/table/id-table-cell.js +100 -7
- package/dist/esm/components/table/index.d.ts +1 -0
- package/dist/esm/components/table/index.d.ts.map +1 -1
- package/dist/esm/components/table/index.js +1 -0
- package/dist/esm/components/table/locked-table-actions.d.ts +24 -0
- package/dist/esm/components/table/locked-table-actions.d.ts.map +1 -1
- package/dist/esm/components/table/locked-table-actions.js +31 -1
- package/dist/esm/components/table/name-table-cell.d.ts +57 -4
- package/dist/esm/components/table/name-table-cell.d.ts.map +1 -1
- package/dist/esm/components/table/name-table-cell.js +50 -2
- package/dist/esm/components/ui/autocomplete/index.d.ts +24 -0
- package/dist/esm/components/ui/autocomplete/index.d.ts.map +1 -1
- package/dist/esm/components/ui/autocomplete/index.js +24 -0
- package/dist/esm/components/ui/badge/index.d.ts +11 -7
- package/dist/esm/components/ui/badge/index.d.ts.map +1 -1
- package/dist/esm/components/ui/badge/index.js +20 -8
- package/dist/esm/components/ui/button/index.d.ts +3 -3
- package/dist/esm/components/ui/copy-field/index.d.ts +25 -1
- package/dist/esm/components/ui/copy-field/index.d.ts.map +1 -1
- package/dist/esm/components/ui/copy-field/index.js +16 -8
- package/dist/esm/components/ui/dialog/index.d.ts +1 -1
- package/dist/esm/components/ui/dialog/index.d.ts.map +1 -1
- package/dist/esm/components/ui/dialog/index.js +3 -3
- package/dist/esm/components/ui/file-upload/index.d.ts +159 -0
- package/dist/esm/components/ui/file-upload/index.d.ts.map +1 -1
- package/dist/esm/components/ui/file-upload/index.js +307 -5
- package/dist/esm/components/ui/icon-button/index.d.ts +1 -1
- package/dist/esm/components/ui/lerian-wordmark/index.d.ts +6 -0
- package/dist/esm/components/ui/lerian-wordmark/index.d.ts.map +1 -0
- package/dist/esm/components/ui/lerian-wordmark/index.js +4 -0
- package/dist/esm/components/ui/otp-input/index.js +1 -1
- package/dist/esm/components/ui/radio-group/index.js +1 -1
- package/dist/esm/components/ui/select/index.d.ts.map +1 -1
- package/dist/esm/components/ui/select/index.js +8 -4
- package/dist/esm/components/ui/sheet/index.d.ts +42 -0
- package/dist/esm/components/ui/sheet/index.d.ts.map +1 -1
- package/dist/esm/components/ui/sheet/index.js +48 -15
- package/dist/esm/components/ui/sidebar/index.d.ts +1 -0
- package/dist/esm/components/ui/sidebar/index.d.ts.map +1 -1
- package/dist/esm/components/ui/sidebar/index.js +1 -0
- package/dist/esm/components/ui/sidebar/sidebar-expand-button.d.ts +1 -1
- package/dist/esm/components/ui/sidebar/sidebar-expand-button.d.ts.map +1 -1
- package/dist/esm/components/ui/sidebar/sidebar-expand-button.js +15 -1
- package/dist/esm/components/ui/sidebar/sidebar-item.d.ts +1 -1
- package/dist/esm/components/ui/sidebar/sidebar-item.d.ts.map +1 -1
- package/dist/esm/components/ui/sidebar/sidebar-item.js +28 -4
- package/dist/esm/components/ui/sidebar/sidebar-provider.d.ts +58 -0
- package/dist/esm/components/ui/sidebar/sidebar-provider.d.ts.map +1 -1
- package/dist/esm/components/ui/sidebar/sidebar-provider.js +143 -1
- package/dist/esm/components/ui/sidebar/sidebar-root.d.ts +38 -1
- package/dist/esm/components/ui/sidebar/sidebar-root.d.ts.map +1 -1
- package/dist/esm/components/ui/sidebar/sidebar-root.js +113 -7
- package/dist/esm/components/ui/sidebar/sidebar-trigger.d.ts +45 -0
- package/dist/esm/components/ui/sidebar/sidebar-trigger.d.ts.map +1 -0
- package/dist/esm/components/ui/sidebar/sidebar-trigger.js +53 -0
- package/dist/esm/components/ui/textarea/index.js +1 -1
- package/dist/esm/components/ui/toast/toaster.d.ts +5 -1
- package/dist/esm/components/ui/toast/toaster.d.ts.map +1 -1
- package/dist/esm/components/ui/toast/toaster.js +3 -2
- package/dist/esm/enterprise/data-table/index.d.ts +77 -7
- package/dist/esm/enterprise/data-table/index.d.ts.map +1 -1
- package/dist/esm/enterprise/data-table/index.js +57 -12
- package/dist/esm/enterprise/date-range-picker/index.js +4 -4
- package/dist/esm/enterprise/number-input/index.d.ts.map +1 -1
- package/dist/esm/enterprise/number-input/index.js +1 -1
- package/dist/esm/hooks/use-toast.d.ts +18 -2
- package/dist/esm/hooks/use-toast.d.ts.map +1 -1
- package/dist/esm/hooks/use-toast.js +60 -16
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +3 -0
- package/dist/esm/lib/utils.d.ts +2 -0
- package/dist/esm/lib/utils.d.ts.map +1 -1
- package/dist/esm/lib/utils.js +10 -0
- package/dist/esm/toast/helpers.d.ts +13 -0
- package/dist/esm/toast/helpers.d.ts.map +1 -1
- package/dist/esm/toast/helpers.js +8 -1
- package/dist/fonts/OFL.txt +96 -0
- package/dist/fonts/ibm-plex-mono-latin-400.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-500.woff2 +0 -0
- package/dist/fonts/ibm-plex-serif-latin-400.woff2 +0 -0
- package/dist/fonts/ibm-plex-serif-latin-500.woff2 +0 -0
- package/dist/fonts/inter-latin.woff2 +0 -0
- package/dist/fonts.css +46 -0
- package/dist/globals.css +62 -362
- package/dist/hooks/use-toast.d.ts +18 -2
- package/dist/hooks/use-toast.d.ts.map +1 -1
- package/dist/hooks/use-toast.js +61 -16
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +11 -0
- package/dist/public/wordmark.svg +1 -0
- package/dist/standalone.css +10 -0
- package/dist/toast/helpers.d.ts +13 -0
- package/dist/toast/helpers.d.ts.map +1 -1
- package/dist/toast/helpers.js +8 -1
- package/dist/tokens.css +367 -0
- package/package.json +9 -6
|
@@ -1,3 +1,40 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type SidebarRootProps = React.ComponentProps<'nav'> & {
|
|
3
|
+
/**
|
|
4
|
+
* What this rail becomes below 768px.
|
|
5
|
+
*
|
|
6
|
+
* - `'inline'` (default): nothing changes. The rail renders at every
|
|
7
|
+
* viewport exactly as it always has, and the reader's collapsed preference
|
|
8
|
+
* is untouched.
|
|
9
|
+
* - `'drawer'`: the inline rail is not rendered below the breakpoint and the
|
|
10
|
+
* navigation moves into an overlay drawer that `SidebarTrigger` opens.
|
|
11
|
+
*
|
|
12
|
+
* ⛔ THE DEFAULT IS NOT A TASTE, IT IS A CONSUMER-SAFETY RULE. `SidebarTrigger`
|
|
13
|
+
* is the only way back into the drawer and it must render inside
|
|
14
|
+
* `SidebarProvider`. A consumer that has not placed one yet — which is every
|
|
15
|
+
* consumer at the moment this shipped — would get a phone with NO navigation
|
|
16
|
+
* rather than a rail that takes 63% of it, and that is strictly worse. Opt in
|
|
17
|
+
* once there is somewhere to put the trigger.
|
|
18
|
+
*/
|
|
19
|
+
mobile?: 'inline' | 'drawer';
|
|
20
|
+
/**
|
|
21
|
+
* The drawer's accessible name. A dialog needs one, and it is read out when
|
|
22
|
+
* the drawer opens. Unused while `mobile` is `'inline'`.
|
|
23
|
+
*/
|
|
24
|
+
mobileTitle?: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* ⛔ BELOW 768px A RAIL IS NOT A LAYOUT — once a consumer opts in.
|
|
28
|
+
*
|
|
29
|
+
* The widths above are a fixed share of a flex row, so at 390px the expanded
|
|
30
|
+
* rail took 63% of the screen and left the page 146px, and the only affordance
|
|
31
|
+
* — `SidebarExpandButton` — shrinks it to 72px, which is still 18% and still
|
|
32
|
+
* permanently on screen. There was nothing that removed it.
|
|
33
|
+
*
|
|
34
|
+
* With `mobile="drawer"` the rail is replaced below the breakpoint by an
|
|
35
|
+
* overlay drawer. Escape, the backdrop click, the focus trap and returning
|
|
36
|
+
* focus to whatever opened it are Radix Dialog's, through the kit's own
|
|
37
|
+
* `Sheet`; none of that is re-implemented here.
|
|
38
|
+
*/
|
|
39
|
+
export declare const SidebarRoot: ({ className, id, mobile, mobileTitle, ...props }: SidebarRootProps) => React.JSX.Element;
|
|
3
40
|
//# sourceMappingURL=sidebar-root.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar-root.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/sidebar/sidebar-root.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"sidebar-root.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/sidebar/sidebar-root.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAqEzB,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC3D;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAA;IAC5B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,GAAI,kDAMzB,gBAAgB,sBAqHlB,CAAA"}
|
|
@@ -1,20 +1,126 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
|
-
import { useSidebar } from './sidebar-provider.js';
|
|
4
|
+
import { SidebarContext, useSidebar } from './sidebar-provider.js';
|
|
5
5
|
import { cn } from '../../../lib/utils.js';
|
|
6
|
+
import { Sheet, SheetContent, SheetTitle } from '../sheet/index.js';
|
|
7
|
+
/**
|
|
8
|
+
* ⛔ THE WIDTHS ARE TOKENS, NOT LITERALS.
|
|
9
|
+
*
|
|
10
|
+
* They were `w-[72px]` and `w-[244px]`, which a consumer could only override by
|
|
11
|
+
* winning a specificity argument with `cn`. `--sidebar-width` and
|
|
12
|
+
* `--sidebar-width-collapsed` are declared in `tokens.css`, so the default
|
|
13
|
+
* still ships with the stylesheet, and a consumer re-points either one with
|
|
14
|
+
* `className="[--sidebar-width:280px]"` ON THE RAIL, which moves the rail and
|
|
15
|
+
* the mobile drawer together (see `liftWidthOverrides` below), or with a rule
|
|
16
|
+
* on `:root`/`html`.
|
|
17
|
+
*
|
|
18
|
+
* ⚠️ A DECLARATION ON A REACT-TREE ANCESTOR REACHES THE RAIL AND NOT THE
|
|
19
|
+
* DRAWER. Custom properties inherit down the DOM tree, and the drawer is
|
|
20
|
+
* portalled to `document.body`, so a layout wrapper is not an ancestor of it.
|
|
21
|
+
* `:root` is, which is why it is named above and a wrapper is not.
|
|
22
|
+
*/
|
|
6
23
|
const sidebarVariants = cva('group/sidebar shadow-sidebar relative flex flex-col transition-[width] duration-300 ease-in-out', {
|
|
7
24
|
variants: {
|
|
8
25
|
collapsed: {
|
|
9
|
-
true: 'w-[
|
|
10
|
-
false: 'w-[
|
|
26
|
+
true: 'w-[var(--sidebar-width-collapsed)]',
|
|
27
|
+
false: 'w-[var(--sidebar-width)]'
|
|
11
28
|
}
|
|
12
29
|
},
|
|
13
30
|
defaultVariants: {
|
|
14
31
|
collapsed: false
|
|
15
32
|
}
|
|
16
33
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Tailwind arbitrary-property classes that re-point the sidebar geometry, e.g.
|
|
36
|
+
* `[--sidebar-width:320px]` or `[--sidebar-width-collapsed:88px]`.
|
|
37
|
+
*
|
|
38
|
+
* ⚠️ ANCHORED TO A CLASS BOUNDARY, WHICH IS THE WHOLE POINT OF THE LOOKBEHIND.
|
|
39
|
+
* Unanchored it also matched the tail of `md:[--sidebar-width:320px]` and
|
|
40
|
+
* lifted it with the prefix stripped — an override a consumer scoped to
|
|
41
|
+
* ≥768px, applied unconditionally to the drawer that only exists below it.
|
|
42
|
+
*/
|
|
43
|
+
const WIDTH_OVERRIDE = /(?<=^|\s)\[--sidebar-width(?:-collapsed)?:[^\]]+\]/g;
|
|
44
|
+
/**
|
|
45
|
+
* ⛔ THE ONE PART OF THE CONSUMER'S className THAT HAS TO CROSS THE PORTAL.
|
|
46
|
+
*
|
|
47
|
+
* `SheetContent` mounts through `SheetPortal` into `document.body`, and custom
|
|
48
|
+
* properties inherit down the DOM tree rather than the React tree. So the
|
|
49
|
+
* documented override — a class on the rail — set `--sidebar-width` on an
|
|
50
|
+
* element the drawer is not a descendant of, and the whole className that DOES
|
|
51
|
+
* travel lands on the inner `<nav>`, which is BELOW the element that reads the
|
|
52
|
+
* variable. Measured in Chromium: rail 320px, drawer 244px. Following the
|
|
53
|
+
* instruction handed to product-console produced a 280px rail on desktop and a
|
|
54
|
+
* 244px drawer on a phone, silently.
|
|
55
|
+
*
|
|
56
|
+
* ⚠️ ONLY THE GEOMETRY TOKENS. The rest of a rail className is rail-shaped —
|
|
57
|
+
* `h-full`, and the `data-[collapsed=false]:min-w-70` all eight console
|
|
58
|
+
* sidebars pass — and putting that on the sheet would reinstate the
|
|
59
|
+
* 280px-inside-a-244px-sheet overflow from the other side.
|
|
60
|
+
*/
|
|
61
|
+
function liftWidthOverrides(className) {
|
|
62
|
+
return className?.match(WIDTH_OVERRIDE)?.join(' ');
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* ⛔ BELOW 768px A RAIL IS NOT A LAYOUT — once a consumer opts in.
|
|
66
|
+
*
|
|
67
|
+
* The widths above are a fixed share of a flex row, so at 390px the expanded
|
|
68
|
+
* rail took 63% of the screen and left the page 146px, and the only affordance
|
|
69
|
+
* — `SidebarExpandButton` — shrinks it to 72px, which is still 18% and still
|
|
70
|
+
* permanently on screen. There was nothing that removed it.
|
|
71
|
+
*
|
|
72
|
+
* With `mobile="drawer"` the rail is replaced below the breakpoint by an
|
|
73
|
+
* overlay drawer. Escape, the backdrop click, the focus trap and returning
|
|
74
|
+
* focus to whatever opened it are Radix Dialog's, through the kit's own
|
|
75
|
+
* `Sheet`; none of that is re-implemented here.
|
|
76
|
+
*/
|
|
77
|
+
export const SidebarRoot = ({ className, id, mobile = 'inline', mobileTitle = 'Navigation', ...props }) => {
|
|
78
|
+
const context = useSidebar();
|
|
79
|
+
const { isCollapsed, isMobile, openMobile, setOpenMobile, restoreDrawerFocus, sidebarId } = context;
|
|
80
|
+
if (!isMobile || mobile === 'inline') {
|
|
81
|
+
return (_jsx("nav", { "data-slot": "sidebar-root", className: cn(sidebarVariants({ collapsed: isCollapsed }), className), "data-collapsed": isCollapsed, ...props, id: mobile === 'drawer' ? sidebarId : id }));
|
|
82
|
+
}
|
|
83
|
+
return (_jsx(SidebarContext.Provider, { value: { ...context, isCollapsed: false, isDrawer: true }, children: _jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, children: _jsxs(SheetContent, { side: "left",
|
|
84
|
+
// The Sheet's own paddings are built for a form panel; a rail brings
|
|
85
|
+
// its own. `max-w-full` so a consumer widening `--sidebar-width` past
|
|
86
|
+
// the viewport still cannot push the drawer off screen. The lifted
|
|
87
|
+
// override goes LAST so it re-points the variable this element reads.
|
|
88
|
+
//
|
|
89
|
+
// ⛔ THE `max-sm:` PAIR IS NOT A DUPLICATE. `SheetContent` grew a
|
|
90
|
+
// phone step — `max-sm:w-full max-sm:px-4` — because a form panel at
|
|
91
|
+
// two fifths of a 390px screen is unreadable. A NAVIGATION drawer is
|
|
92
|
+
// the one panel that must not take it: 244px over a dimmed page is
|
|
93
|
+
// the design, and full-bleed removes the tap-outside-to-close target
|
|
94
|
+
// that every other way out of this drawer is an alternative to.
|
|
95
|
+
// tailwind-merge drops a conflicting class only when the modifiers
|
|
96
|
+
// match, so a bare `w-[…]` cannot reach `max-sm:w-full` and these two
|
|
97
|
+
// tokens are what state the exemption. Measured: without them the
|
|
98
|
+
// drawer is 390px wide with 16px of inset on a 390px phone.
|
|
99
|
+
className: cn('w-[var(--sidebar-width)] max-w-full gap-0 p-0 max-sm:w-[var(--sidebar-width)] max-sm:p-0', liftWidthOverrides(className)), "aria-describedby": undefined,
|
|
100
|
+
// ⛔ RADIX'S OWN RESTORE GOES NOWHERE HERE. `DialogContent`
|
|
101
|
+
// preventDefaults the focus scope's restore and focuses the ref a
|
|
102
|
+
// `SheetTrigger` would have filled; this drawer is opened from provider
|
|
103
|
+
// state, so that ref is null and closing dropped focus onto `<body>`.
|
|
104
|
+
// Running first means `composeEventHandlers` skips Radix's half.
|
|
105
|
+
onCloseAutoFocus: (event) => {
|
|
106
|
+
event.preventDefault();
|
|
107
|
+
restoreDrawerFocus();
|
|
108
|
+
}, children: [_jsx(SheetTitle, { className: "sr-only", children: mobileTitle }), _jsx("nav", { "data-slot": "sidebar-root", "data-mobile": "true",
|
|
109
|
+
/* ⛔ NO `data-collapsed` HERE. The consumer className is forwarded
|
|
110
|
+
verbatim, and all eight console sidebars pass
|
|
111
|
+
`data-[collapsed=false]:min-w-70`; stamping the attribute armed
|
|
112
|
+
it, giving the navigation a 280px min-width inside a 244px sheet.
|
|
113
|
+
`min-width` resolves after `max-width`, so the sheet could not
|
|
114
|
+
claw it back and the contents were 36px wider than the drawer.
|
|
115
|
+
`data-mobile` already names this surface and a drawer is never
|
|
116
|
+
collapsed, so the attribute had nothing left to say. */
|
|
117
|
+
className: cn(sidebarVariants({ collapsed: false }), 'h-full w-full shadow-none', className), ...props,
|
|
118
|
+
/* ⛔ AFTER THE SPREAD, AND NOT THE CALLER'S. This is the target of
|
|
119
|
+
`SidebarTrigger`'s `aria-controls` and the handle the provider
|
|
120
|
+
uses to put focus back into the navigation when the viewport
|
|
121
|
+
grows. Spread first, a caller that set `id` replaced it and left
|
|
122
|
+
a dangling `aria-controls` — which axe reports as a CRITICAL
|
|
123
|
+
`aria-valid-attr-value` — and a focus restore that lands on
|
|
124
|
+
`<body>`. Both silent. */
|
|
125
|
+
id: sidebarId })] }) }) }));
|
|
20
126
|
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconButton } from '../icon-button/index.js';
|
|
3
|
+
export type SidebarTriggerProps = React.ComponentProps<typeof IconButton>;
|
|
4
|
+
/**
|
|
5
|
+
* The control that opens the mobile drawer.
|
|
6
|
+
*
|
|
7
|
+
* Hidden from 768px up by default, because above it the rail is already on
|
|
8
|
+
* screen and a second way to reach it is a second thing to explain; a consumer
|
|
9
|
+
* that wants it everywhere passes its own display class.
|
|
10
|
+
*
|
|
11
|
+
* ⛔ THE BREAKPOINT IS IN PIXELS, AND `md:hidden` IS NOT A SPELLING OF IT.
|
|
12
|
+
*
|
|
13
|
+
* Whether the rail became a drawer is decided by `SIDEBAR_MOBILE_QUERY`, which
|
|
14
|
+
* is `not (min-width: 768px)` — pixels. `md:` is 48rem, and rem inside a MEDIA
|
|
15
|
+
* QUERY resolves against the browser's default font size rather than anything
|
|
16
|
+
* the page declares, so the two flip at different widths the moment a reader
|
|
17
|
+
* changes that setting. At Chrome's "Small" (12px) `md:` turns over at 576px
|
|
18
|
+
* while the drawer still turns over at 768px: every window between them showed
|
|
19
|
+
* NO RAIL AND NO HAMBURGER, which is a console with no navigation at all.
|
|
20
|
+
* Measured on product-console; the band is four of this package's own fixtures
|
|
21
|
+
* in `scripts/measure-phone-shapes.mjs`. At "Very large" (20px) the same
|
|
22
|
+
* mismatch runs the other way and 768–959px drew both.
|
|
23
|
+
*
|
|
24
|
+
* `min-[768px]:hidden` is the exact complement of that query, at every font
|
|
25
|
+
* size AND at any sub-pixel precision — which is why the query next door is
|
|
26
|
+
* spelled as a negation rather than as `(max-width: 767px)`: that pair leaves
|
|
27
|
+
* the open interval (767, 768) matched by neither, and a viewport there draws
|
|
28
|
+
* the rail plus a hamburger that opens nothing.
|
|
29
|
+
*
|
|
30
|
+
* ⚠️ THE PROPERTY IS ABOUT THE TWO MEDIA DECISIONS, NOT ABOUT THE FIRST PAINT.
|
|
31
|
+
* The harness enforces one of the two and never neither or both, which holds
|
|
32
|
+
* wherever `isMobile` has been read. `isMobile` starts false on purpose — there
|
|
33
|
+
* is no viewport on the server — and is corrected in an effect, so on a phone
|
|
34
|
+
* the first painted frame shows the inline rail while this control is already
|
|
35
|
+
* on screen. That one hydration is the deliberate price of hydration safety,
|
|
36
|
+
* documented on `SidebarProvider`'s own effect, and predates this class.
|
|
37
|
+
*
|
|
38
|
+
* ⚠️ `aria-controls` IS SET ONLY WHILE THE DRAWER EXISTS. Radix unmounts the
|
|
39
|
+
* dialog content when closed, and a reference to an element that is not in the
|
|
40
|
+
* DOM is what axe-core reports as a CRITICAL `aria-valid-attr-value` — the same
|
|
41
|
+
* defect the Autocomplete panel was repaired for (console-sdk#150). A toggle
|
|
42
|
+
* with `aria-expanded="false"` and no `aria-controls` is complete on its own.
|
|
43
|
+
*/
|
|
44
|
+
export declare const SidebarTrigger: ({ className, onClick, "aria-label": ariaLabel, ...props }: SidebarTriggerProps) => React.JSX.Element;
|
|
45
|
+
//# sourceMappingURL=sidebar-trigger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-trigger.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/sidebar/sidebar-trigger.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAG3C,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,CAAA;AAEzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,cAAc,GAAI,2DAK5B,mBAAmB,sBAqBrB,CAAA"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Menu } from 'lucide-react';
|
|
4
|
+
import { cn } from '../../../lib/utils.js';
|
|
5
|
+
import { IconButton } from '../icon-button/index.js';
|
|
6
|
+
import { useSidebar } from './sidebar-provider.js';
|
|
7
|
+
/**
|
|
8
|
+
* The control that opens the mobile drawer.
|
|
9
|
+
*
|
|
10
|
+
* Hidden from 768px up by default, because above it the rail is already on
|
|
11
|
+
* screen and a second way to reach it is a second thing to explain; a consumer
|
|
12
|
+
* that wants it everywhere passes its own display class.
|
|
13
|
+
*
|
|
14
|
+
* ⛔ THE BREAKPOINT IS IN PIXELS, AND `md:hidden` IS NOT A SPELLING OF IT.
|
|
15
|
+
*
|
|
16
|
+
* Whether the rail became a drawer is decided by `SIDEBAR_MOBILE_QUERY`, which
|
|
17
|
+
* is `not (min-width: 768px)` — pixels. `md:` is 48rem, and rem inside a MEDIA
|
|
18
|
+
* QUERY resolves against the browser's default font size rather than anything
|
|
19
|
+
* the page declares, so the two flip at different widths the moment a reader
|
|
20
|
+
* changes that setting. At Chrome's "Small" (12px) `md:` turns over at 576px
|
|
21
|
+
* while the drawer still turns over at 768px: every window between them showed
|
|
22
|
+
* NO RAIL AND NO HAMBURGER, which is a console with no navigation at all.
|
|
23
|
+
* Measured on product-console; the band is four of this package's own fixtures
|
|
24
|
+
* in `scripts/measure-phone-shapes.mjs`. At "Very large" (20px) the same
|
|
25
|
+
* mismatch runs the other way and 768–959px drew both.
|
|
26
|
+
*
|
|
27
|
+
* `min-[768px]:hidden` is the exact complement of that query, at every font
|
|
28
|
+
* size AND at any sub-pixel precision — which is why the query next door is
|
|
29
|
+
* spelled as a negation rather than as `(max-width: 767px)`: that pair leaves
|
|
30
|
+
* the open interval (767, 768) matched by neither, and a viewport there draws
|
|
31
|
+
* the rail plus a hamburger that opens nothing.
|
|
32
|
+
*
|
|
33
|
+
* ⚠️ THE PROPERTY IS ABOUT THE TWO MEDIA DECISIONS, NOT ABOUT THE FIRST PAINT.
|
|
34
|
+
* The harness enforces one of the two and never neither or both, which holds
|
|
35
|
+
* wherever `isMobile` has been read. `isMobile` starts false on purpose — there
|
|
36
|
+
* is no viewport on the server — and is corrected in an effect, so on a phone
|
|
37
|
+
* the first painted frame shows the inline rail while this control is already
|
|
38
|
+
* on screen. That one hydration is the deliberate price of hydration safety,
|
|
39
|
+
* documented on `SidebarProvider`'s own effect, and predates this class.
|
|
40
|
+
*
|
|
41
|
+
* ⚠️ `aria-controls` IS SET ONLY WHILE THE DRAWER EXISTS. Radix unmounts the
|
|
42
|
+
* dialog content when closed, and a reference to an element that is not in the
|
|
43
|
+
* DOM is what axe-core reports as a CRITICAL `aria-valid-attr-value` — the same
|
|
44
|
+
* defect the Autocomplete panel was repaired for (console-sdk#150). A toggle
|
|
45
|
+
* with `aria-expanded="false"` and no `aria-controls` is complete on its own.
|
|
46
|
+
*/
|
|
47
|
+
export const SidebarTrigger = ({ className, onClick, 'aria-label': ariaLabel = 'Open navigation', ...props }) => {
|
|
48
|
+
const { openMobile, setOpenMobile, sidebarId } = useSidebar();
|
|
49
|
+
return (_jsx(IconButton, { type: "button", variant: "outline", "data-slot": "sidebar-trigger", "aria-label": ariaLabel, "aria-expanded": openMobile, "aria-controls": openMobile ? sidebarId : undefined, className: cn('min-[768px]:hidden', className), onClick: (event) => {
|
|
50
|
+
onClick?.(event);
|
|
51
|
+
setOpenMobile(!openMobile);
|
|
52
|
+
}, ...props, children: _jsx(Menu, { "aria-hidden": true }) }));
|
|
53
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from '../../../lib/utils.js';
|
|
3
3
|
function Textarea({ className, ...props }) {
|
|
4
|
-
return (_jsx("textarea", { className: cn('border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex w-full rounded-md border px-3 py-2 text-base focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden', 'read-only:bg-muted read-only:cursor-default read-only:caret-transparent read-only:opacity-50 read-only:select-text read-only:focus:ring-0 read-only:focus:ring-offset-0 read-only:focus:outline-hidden', 'disabled:cursor-not-allowed disabled:opacity-50', className), ...props }));
|
|
4
|
+
return (_jsx("textarea", { className: cn('border-input-border bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex w-full rounded-md border px-3 py-2 text-base focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden', 'read-only:bg-muted read-only:cursor-default read-only:caret-transparent read-only:opacity-50 read-only:select-text read-only:focus:ring-0 read-only:focus:ring-offset-0 read-only:focus:outline-hidden', 'disabled:cursor-not-allowed disabled:opacity-50', className), ...props }));
|
|
5
5
|
}
|
|
6
6
|
export { Textarea };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import { Toaster as SonnerToaster } from 'sonner';
|
|
1
3
|
type ToasterProps = {
|
|
2
4
|
/**
|
|
3
5
|
* Forces the toast theme. Omit it inside a `ThemeProvider` to follow the
|
|
@@ -5,7 +7,9 @@ type ToasterProps = {
|
|
|
5
7
|
* leaving the light/dark call to sonner's own media query.
|
|
6
8
|
*/
|
|
7
9
|
theme?: 'light' | 'dark' | 'system';
|
|
10
|
+
/** Where the toast stack sits on screen. Defaults to `'bottom-right'`. */
|
|
11
|
+
position?: ComponentProps<typeof SonnerToaster>['position'];
|
|
8
12
|
};
|
|
9
|
-
export declare function Toaster({ theme }: ToasterProps): import("react").JSX.Element;
|
|
13
|
+
export declare function Toaster({ theme, position }: ToasterProps): import("react").JSX.Element;
|
|
10
14
|
export {};
|
|
11
15
|
//# sourceMappingURL=toaster.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toaster.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/toast/toaster.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toaster.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/toast/toaster.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,QAAQ,CAAA;AAKjD,KAAK,YAAY,GAAG;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAA;IACnC,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC,UAAU,CAAC,CAAA;CAC5D,CAAA;AAED,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,QAAyB,EAAE,EAAE,YAAY,+BAqBzE"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Toaster as SonnerToaster } from 'sonner';
|
|
4
|
+
import { DEFAULT_DURATION } from '../../../hooks/use-toast.js';
|
|
4
5
|
import { useOptionalTheme } from '../../../theme/theme-provider.js';
|
|
5
|
-
export function Toaster({ theme }) {
|
|
6
|
+
export function Toaster({ theme, position = 'bottom-right' }) {
|
|
6
7
|
// Optional read: a Toaster mounted outside any ThemeProvider must still
|
|
7
8
|
// render, so this cannot go through `useTheme`, which throws.
|
|
8
9
|
const themeContext = useOptionalTheme();
|
|
9
|
-
return (_jsx(SonnerToaster, { theme: theme ?? themeContext?.resolvedTheme ?? 'system', position:
|
|
10
|
+
return (_jsx(SonnerToaster, { theme: theme ?? themeContext?.resolvedTheme ?? 'system', position: position, visibleToasts: 3, duration: DEFAULT_DURATION, expand: false, closeButton: true, richColors: false, offset: 16, gap: 8, toastOptions: {
|
|
10
11
|
className: 'font-sans !text-sm !font-medium'
|
|
11
12
|
} }));
|
|
12
13
|
}
|
|
@@ -1,13 +1,53 @@
|
|
|
1
|
-
import { type ColumnDef, type OnChangeFn, type RowData, type RowSelectionState, type SortingState } from '@tanstack/react-table';
|
|
1
|
+
import { type ColumnDef, type OnChangeFn, type RowData, type RowSelectionState, type SortingState, type VisibilityState } from '@tanstack/react-table';
|
|
2
2
|
import { type EmptyStateProps } from '../empty-state/index.js';
|
|
3
3
|
/**
|
|
4
|
-
* Per-column
|
|
5
|
-
*
|
|
6
|
-
* its
|
|
4
|
+
* Per-column channel into the cells DataTable renders on the consumer's behalf:
|
|
5
|
+
* how a column aligns, what classes it carries on head and body, and whether it
|
|
6
|
+
* renders its own `<td>` at all. The member names are frozen by plan
|
|
7
|
+
* 2026-09-21-console-simplification C9.
|
|
7
8
|
*/
|
|
8
9
|
declare module '@tanstack/react-table' {
|
|
9
10
|
interface ColumnMeta<TData extends RowData, TValue> {
|
|
11
|
+
/**
|
|
12
|
+
* Ledger numeric treatment: right-aligns the header and its body cells and
|
|
13
|
+
* gives the body mono tabular figures. `align` overrides the alignment half
|
|
14
|
+
* on its own — the figures stay mono.
|
|
15
|
+
*/
|
|
10
16
|
numeric?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Column alignment, header and body. Beats `numeric`'s implicit right, so a
|
|
19
|
+
* money column can read left or centre without losing its figure treatment.
|
|
20
|
+
* With `renderOwnCell` it reaches the header only — the body cell is the
|
|
21
|
+
* consumer's, and so is aligning it.
|
|
22
|
+
*/
|
|
23
|
+
align?: 'left' | 'right' | 'center';
|
|
24
|
+
/**
|
|
25
|
+
* Extra classes on this column's `<th>`, merged AFTER the table-level
|
|
26
|
+
* `headClassName` so one column can override what the table set for all.
|
|
27
|
+
*/
|
|
28
|
+
headerClassName?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Extra classes on this column's body `<td>`, merged after the numeric and
|
|
31
|
+
* density treatments. IGNORED when `renderOwnCell` is set: there is no cell
|
|
32
|
+
* of the table's left to carry them. Use `headerClassName` for the `<th>`,
|
|
33
|
+
* which the table still owns either way.
|
|
34
|
+
*/
|
|
35
|
+
className?: string;
|
|
36
|
+
/**
|
|
37
|
+
* The column's `cell` renderer emits its own `<td>`; DataTable renders it
|
|
38
|
+
* bare rather than wrapping it. The HEADER is still the table's `<th>` —
|
|
39
|
+
* nothing about owning a body cell makes a column own its header, and a
|
|
40
|
+
* table whose head and body disagree on cell count is broken markup.
|
|
41
|
+
*
|
|
42
|
+
* So the split is by element, not by column: the head still takes `align`,
|
|
43
|
+
* `numeric`, `headerClassName` and the declared width, because the `<th>`
|
|
44
|
+
* is the table's to style; the BODY takes none of them, because the `<td>`
|
|
45
|
+
* is the consumer's. A money column declaring `align: 'right'` therefore
|
|
46
|
+
* gets a right-aligned header and must right-align its own cell to match —
|
|
47
|
+
* leave the cell's alignment out and the figures sit under a heading that
|
|
48
|
+
* points somewhere else.
|
|
49
|
+
*/
|
|
50
|
+
renderOwnCell?: boolean;
|
|
11
51
|
}
|
|
12
52
|
}
|
|
13
53
|
/**
|
|
@@ -71,6 +111,35 @@ type SortingProps = {
|
|
|
71
111
|
/** Controlled sort updater (TanStack `OnChangeFn`). */
|
|
72
112
|
onSortingChange: OnChangeFn<SortingState>;
|
|
73
113
|
};
|
|
114
|
+
/**
|
|
115
|
+
* Column visibility is controlled but, deliberately, NOT a required pair — a
|
|
116
|
+
* departure from the two unions above, and not drift. Those two are unions
|
|
117
|
+
* because each has an `enable*` flag whose "on" state is meaningless without
|
|
118
|
+
* the controlled pair. TanStack has no enable flag for visibility: the model is
|
|
119
|
+
* always running, and the only shipped consumer passes STATE WITH NO UPDATER,
|
|
120
|
+
* because a separate dropdown owns the state on the page. Requiring the pair
|
|
121
|
+
* would refuse that usage.
|
|
122
|
+
*
|
|
123
|
+
* What the union does forbid is the updater ALONE: TanStack reads an
|
|
124
|
+
* `on[State]Change` callback as a declaration of controlled state, so a
|
|
125
|
+
* callback with no `columnVisibility` freezes visibility at its initial value
|
|
126
|
+
* while the callback keeps firing. Prop names frozen by plan
|
|
127
|
+
* 2026-09-21-console-simplification C9.
|
|
128
|
+
*
|
|
129
|
+
* Omit both and the table keeps its own visibility state, exactly as before.
|
|
130
|
+
*/
|
|
131
|
+
type ColumnVisibilityProps = {
|
|
132
|
+
/** Controlled column-visibility state (TanStack `VisibilityState`). */
|
|
133
|
+
columnVisibility: VisibilityState;
|
|
134
|
+
/**
|
|
135
|
+
* Controlled updater (TanStack `OnChangeFn`). Optional: a consumer may
|
|
136
|
+
* drive the state from outside the table entirely.
|
|
137
|
+
*/
|
|
138
|
+
onColumnVisibilityChange?: OnChangeFn<VisibilityState>;
|
|
139
|
+
} | {
|
|
140
|
+
columnVisibility?: undefined;
|
|
141
|
+
onColumnVisibilityChange?: undefined;
|
|
142
|
+
};
|
|
74
143
|
type DataTableBaseProps<TData> = {
|
|
75
144
|
columns: ColumnDef<TData, unknown>[];
|
|
76
145
|
data: TData[];
|
|
@@ -117,7 +186,8 @@ type DataTableBaseProps<TData> = {
|
|
|
117
186
|
/**
|
|
118
187
|
* Extra classes merged onto every header cell, after the kit label voice —
|
|
119
188
|
* so a caller can override the voice's size/tracking/color for one table
|
|
120
|
-
* without restating the cluster. Per
|
|
189
|
+
* without restating the cluster. Per column, `meta.headerClassName` merges
|
|
190
|
+
* after this one and `meta.align` / `meta.numeric` own the alignment.
|
|
121
191
|
*/
|
|
122
192
|
headClassName?: string;
|
|
123
193
|
/**
|
|
@@ -127,7 +197,7 @@ type DataTableBaseProps<TData> = {
|
|
|
127
197
|
*/
|
|
128
198
|
footer?: React.ReactNode;
|
|
129
199
|
};
|
|
130
|
-
export type DataTableProps<TData> = DataTableBaseProps<TData> & RowSelectionProps<TData> & SortingProps;
|
|
131
|
-
export declare function DataTable<TData>({ columns, data, loading, skeletonRows, loadingLabel, empty, getRowId, flush, density, enableRowSelection, rowSelection, onRowSelectionChange, getRowSelectionLabel, enableSorting, sorting, onSortingChange, onRowActivate, rowHref, className, headClassName, footer }: DataTableProps<TData>): import("react").JSX.Element;
|
|
200
|
+
export type DataTableProps<TData> = DataTableBaseProps<TData> & RowSelectionProps<TData> & SortingProps & ColumnVisibilityProps;
|
|
201
|
+
export declare function DataTable<TData>({ columns, data, loading, skeletonRows, loadingLabel, empty, getRowId, flush, density, enableRowSelection, rowSelection, onRowSelectionChange, getRowSelectionLabel, enableSorting, sorting, onSortingChange, columnVisibility, onColumnVisibilityChange, onRowActivate, rowHref, className, headClassName, footer }: DataTableProps<TData>): import("react").JSX.Element;
|
|
132
202
|
export {};
|
|
133
203
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/enterprise/data-table/index.tsx"],"names":[],"mappings":"AAuDA,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,UAAU,EAEf,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/enterprise/data-table/index.tsx"],"names":[],"mappings":"AAuDA,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,UAAU,EAEf,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAEjB,KAAK,eAAe,EACrB,MAAM,uBAAuB,CAAA;AAc9B,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAGjE;;;;;GAKG;AACH,OAAO,QAAQ,uBAAuB,CAAC;IAIrC,UAAU,UAAU,CAAC,KAAK,SAAS,OAAO,EAAE,MAAM;QAChD;;;;WAIG;QACH,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB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AAa,EACb,OAAuB,EACvB,kBAA0B,EAC1B,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,EACpB,aAAqB,EACrB,OAAO,EACP,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACxB,aAAa,EACb,OAAO,EACP,SAAS,EACT,aAAa,EACb,MAAM,EACP,EAAE,cAAc,CAAC,KAAK,CAAC,+BAgWvB"}
|
|
@@ -52,7 +52,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
52
52
|
* activation. Keydown events originating from interactive children (links,
|
|
53
53
|
* buttons, checkboxes, form fields) are never hijacked.
|
|
54
54
|
*/
|
|
55
|
-
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
55
|
+
import { Fragment, useEffect, useMemo, useRef, useState } from 'react';
|
|
56
56
|
import { flexRender, getCoreRowModel, useReactTable } from '@tanstack/react-table';
|
|
57
57
|
import { Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow } from '../../components/ui/table/index.js';
|
|
58
58
|
import { Skeleton } from '../../components/ui/skeleton/index.js';
|
|
@@ -62,8 +62,21 @@ import { EmptyState } from '../empty-state/index.js';
|
|
|
62
62
|
import { readPreferredColumnSize, UNSIZED_DEFAULT_COLUMN } from './column-size.js';
|
|
63
63
|
const SELECTION_COLUMN_ID = '__select__';
|
|
64
64
|
const CHECKBOX_CLASS = 'accent-primary block size-4';
|
|
65
|
-
/**
|
|
66
|
-
|
|
65
|
+
/** Figure treatment for `meta: { numeric: true }` columns; the alignment half
|
|
66
|
+
* lives in ALIGN_CELL_CLASS so `meta.align` can override one without the other. */
|
|
67
|
+
const NUMERIC_FIGURE_CLASS = 'font-mono tabular-nums';
|
|
68
|
+
/**
|
|
69
|
+
* Body-cell alignment, one class per direction rather than a single string with
|
|
70
|
+
* `text-right` baked in: an explicit `meta.align` has to beat `numeric` by
|
|
71
|
+
* choosing the class, not by out-ordering it — tailwind-merge resolving two
|
|
72
|
+
* conflicting alignment utilities by source order is not a contract worth
|
|
73
|
+
* relying on.
|
|
74
|
+
*/
|
|
75
|
+
const ALIGN_CELL_CLASS = {
|
|
76
|
+
left: 'text-left',
|
|
77
|
+
center: 'text-center',
|
|
78
|
+
right: 'text-right'
|
|
79
|
+
};
|
|
67
80
|
/**
|
|
68
81
|
* Keydown events whose target sits inside one of these are never hijacked
|
|
69
82
|
* by the row-level keyboard handler — Space in a checkbox and Enter on an
|
|
@@ -113,7 +126,7 @@ function createSelectionColumn(getLabel) {
|
|
|
113
126
|
cell: ({ row }) => _jsx(RowSelectionCheckbox, { row: row, getLabel: getLabel })
|
|
114
127
|
};
|
|
115
128
|
}
|
|
116
|
-
export function DataTable({ columns, data, loading = false, skeletonRows = 8, loadingLabel = 'Loading table rows', empty, getRowId, flush = false, density = 'comfortable', enableRowSelection = false, rowSelection, onRowSelectionChange, getRowSelectionLabel, enableSorting = false, sorting, onSortingChange, onRowActivate, rowHref, className, headClassName, footer }) {
|
|
129
|
+
export function DataTable({ columns, data, loading = false, skeletonRows = 8, loadingLabel = 'Loading table rows', empty, getRowId, flush = false, density = 'comfortable', enableRowSelection = false, rowSelection, onRowSelectionChange, getRowSelectionLabel, enableSorting = false, sorting, onSortingChange, columnVisibility, onColumnVisibilityChange, onRowActivate, rowHref, className, headClassName, footer }) {
|
|
117
130
|
const tableColumns = useMemo(() => enableRowSelection
|
|
118
131
|
? [createSelectionColumn(getRowSelectionLabel), ...columns]
|
|
119
132
|
: columns, [columns, enableRowSelection, getRowSelectionLabel]);
|
|
@@ -139,12 +152,33 @@ export function DataTable({ columns, data, loading = false, skeletonRows = 8, lo
|
|
|
139
152
|
manualSorting: true,
|
|
140
153
|
enableSorting,
|
|
141
154
|
onSortingChange: enableSorting ? onSortingChange : undefined,
|
|
155
|
+
// ⛔ EACH VISIBILITY ENTRY IS GUARDED ON ITS OWN PROP, NEVER ON THE OTHER.
|
|
156
|
+
//
|
|
157
|
+
// TanStack merges options as `{...defaultOptions, ...options}` and state as
|
|
158
|
+
// `{...internalState, ...options.state}`, both plain spreads — so a key
|
|
159
|
+
// present and holding `undefined` OVERWRITES what it was meant to leave
|
|
160
|
+
// alone. `onColumnVisibilityChange: undefined` replaces the feature's own
|
|
161
|
+
// `makeStateUpdater`, and `setColumnVisibility` reads
|
|
162
|
+
// `options.onColumnVisibilityChange == null ? void 0 : ...`, so it (and
|
|
163
|
+
// every `column.toggleVisibility` behind it) becomes a silent no-op.
|
|
164
|
+
// `columnVisibility: undefined` replaces the table's initial `{}`, so a
|
|
165
|
+
// consumer reading the slice gets `undefined` instead of an empty object.
|
|
166
|
+
//
|
|
167
|
+
// Guarding the UPDATER on the STATE put that `undefined` back for the
|
|
168
|
+
// union's first arm — state with no updater, which is the shipped console
|
|
169
|
+
// usage, where a separate dropdown owns the state. A table that passes
|
|
170
|
+
// neither prop is uncontrolled, exactly as before.
|
|
171
|
+
...(onColumnVisibilityChange !== undefined && { onColumnVisibilityChange }),
|
|
142
172
|
state: {
|
|
143
173
|
rowSelection: enableRowSelection ? (rowSelection ?? {}) : undefined,
|
|
144
|
-
sorting: enableSorting ? (sorting ?? []) : undefined
|
|
174
|
+
sorting: enableSorting ? (sorting ?? []) : undefined,
|
|
175
|
+
...(columnVisibility !== undefined && { columnVisibility })
|
|
145
176
|
}
|
|
146
177
|
});
|
|
147
|
-
|
|
178
|
+
// Visible, not declared: the skeleton grid and the empty row's colSpan have
|
|
179
|
+
// to match the header the table actually rendered, and a hidden column is in
|
|
180
|
+
// `tableColumns` but in no `<th>`.
|
|
181
|
+
const colCount = table.getVisibleLeafColumns().length;
|
|
148
182
|
const dataRows = table.getRowModel().rows;
|
|
149
183
|
const rowCount = dataRows.length;
|
|
150
184
|
// Compact density overrides only THIS table's cell padding (tailwind-merge
|
|
@@ -262,13 +296,13 @@ export function DataTable({ columns, data, loading = false, skeletonRows = 8, lo
|
|
|
262
296
|
: rowCount === 0
|
|
263
297
|
? 'No rows'
|
|
264
298
|
: `${rowCount} rows` }), _jsxs(Table, { "aria-busy": loading ? 'true' : undefined, children: [_jsx(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => (_jsx(TableRow, { className: "hover:bg-transparent", children: headerGroup.headers.map((header) => {
|
|
265
|
-
const
|
|
266
|
-
return (_jsx(TableHead, { align: numeric ? 'right' : undefined, "aria-sort": header.isPlaceholder
|
|
299
|
+
const meta = header.column.columnDef.meta;
|
|
300
|
+
return (_jsx(TableHead, { align: meta?.align ?? (meta?.numeric ? 'right' : undefined), "aria-sort": header.isPlaceholder
|
|
267
301
|
? undefined
|
|
268
302
|
: ariaSortFor(header.column),
|
|
269
303
|
// Only a column that DECLARED sizing gets an inline width;
|
|
270
304
|
// everything else keeps the auto table layout it has today.
|
|
271
|
-
style: readPreferredColumnSize(header.column), className: cn(LABEL_VOICE_CLASS, headDensityClass, header.column.id === SELECTION_COLUMN_ID && 'w-10', headClassName), children: header.isPlaceholder
|
|
305
|
+
style: readPreferredColumnSize(header.column), className: cn(LABEL_VOICE_CLASS, headDensityClass, header.column.id === SELECTION_COLUMN_ID && 'w-10', headClassName, meta?.headerClassName), children: header.isPlaceholder
|
|
272
306
|
? null
|
|
273
307
|
: flexRender(header.column.columnDef.header, header.getContext()) }, header.id));
|
|
274
308
|
}) }, headerGroup.id))) }), _jsx(TableBody, { children: loading ? (Array.from({ length: skeletonRows }).map((_, rowIndex) => (_jsx(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: colCount }).map((__, cellIndex) => (_jsx(TableCell, { className: cellDensityClass, children: _jsx(Skeleton, { className: "h-4 w-full max-w-[160px]" }) }, `skeleton-${rowIndex}-${cellIndex}`))) }, `skeleton-${rowIndex}`)))) : rowCount === 0 ? (_jsx(TableRow, { className: "hover:bg-transparent", children: _jsx(TableCell, { colSpan: colCount, className: "p-0", children: _jsx(EmptyState, { title: empty?.title ?? 'Nothing here yet', description: empty?.description, icon: empty?.icon, action: empty?.action,
|
|
@@ -291,7 +325,18 @@ export function DataTable({ columns, data, loading = false, skeletonRows = 8, lo
|
|
|
291
325
|
? (event) => handleRowKeyDown(event, row, rowIndex)
|
|
292
326
|
: undefined, className: keyboardNav ? ROW_FOCUS_CLASS : undefined, "data-state": enableRowSelection && row.getIsSelected()
|
|
293
327
|
? 'selected'
|
|
294
|
-
: undefined, children: row.getVisibleCells().map((cell) =>
|
|
295
|
-
|
|
296
|
-
|
|
328
|
+
: undefined, children: row.getVisibleCells().map((cell) => {
|
|
329
|
+
const meta = cell.column.columnDef.meta;
|
|
330
|
+
const content = flexRender(cell.column.columnDef.cell, cell.getContext());
|
|
331
|
+
// The column owns its `<td>`: render the consumer's cell bare.
|
|
332
|
+
// The kit's selection column is built here and carries no
|
|
333
|
+
// meta, so it can never take this path.
|
|
334
|
+
if (meta?.renderOwnCell) {
|
|
335
|
+
return _jsx(Fragment, { children: content }, cell.id);
|
|
336
|
+
}
|
|
337
|
+
const align = meta?.align ?? (meta?.numeric ? 'right' : undefined);
|
|
338
|
+
return (_jsx(TableCell, { style: readPreferredColumnSize(cell.column), className: cn(meta?.numeric && NUMERIC_FIGURE_CLASS, align && ALIGN_CELL_CLASS[align], cellDensityClass, cell.column.id === SELECTION_COLUMN_ID && 'w-10', meta?.className), onClick: cell.column.id === SELECTION_COLUMN_ID
|
|
339
|
+
? stopPropagation
|
|
340
|
+
: undefined, children: content }, cell.id));
|
|
341
|
+
}) }, row.id)))) }), footer ? _jsx(TableFooter, { children: footer }) : null] })] }));
|
|
297
342
|
}
|
|
@@ -89,12 +89,12 @@ export function DateRangePicker({ value, onValueChange, fromId, toId, fromLabel,
|
|
|
89
89
|
});
|
|
90
90
|
};
|
|
91
91
|
const triggerClass = cn(
|
|
92
|
-
// border-
|
|
93
|
-
// white in the light theme, so the trigger had no visible edge next to
|
|
94
|
-
// Input and Select it sits with. font-sans, not font-mono: the dates are
|
|
92
|
+
// border-input-border, not border-input: `--input` is a SURFACE token and
|
|
93
|
+
// is white in the light theme, so the trigger had no visible edge next to
|
|
94
|
+
// the Input and Select it sits with. font-sans, not font-mono: the dates are
|
|
95
95
|
// figures in the body face with tabular figures, like every other figure in
|
|
96
96
|
// the console.
|
|
97
|
-
'border-
|
|
97
|
+
'border-input-border bg-card hover:bg-secondary focus-visible:ring-ring flex h-9 items-center gap-2 rounded-md border px-3 text-left font-sans text-sm tabular-nums transition-colors duration-150 ease-out focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:outline-none sm:w-40', invalid && 'border-destructive',
|
|
98
98
|
// Conditional rather than `disabled:` variants, matching how this file
|
|
99
99
|
// already applies `border-destructive`: with the prop absent the class
|
|
100
100
|
// string stays byte-identical to what consumers render today.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/enterprise/number-input/index.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,MAAM,MAAM,gBAAgB,GAAG;IAC7B,wDAAwD;IACxD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,+EAA+E;IAC/E,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAC5C,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kEAAkE;IAClE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,8CAA8C;IAC9C,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,sDAAsD;IACtD,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAmED;;;;;;;GAOG;AACH,w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