@dashforge/tw 0.1.0-beta → 0.2.1-beta
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/A11Y.md +130 -0
- package/CHANGELOG.md +231 -0
- package/dist/index.d.ts +1 -82
- package/dist/index.esm.js +1608 -11
- package/dist/src/components/AspectRatio/AspectRatio.d.ts +36 -0
- package/dist/src/components/AspectRatio/AspectRatio.d.ts.map +1 -0
- package/dist/src/components/AspectRatio/aspectRatio.types.d.ts +50 -0
- package/dist/src/components/AspectRatio/aspectRatio.types.d.ts.map +1 -0
- package/dist/src/components/Box/Box.d.ts +36 -0
- package/dist/src/components/Box/Box.d.ts.map +1 -0
- package/dist/src/components/Box/box.types.d.ts +54 -0
- package/dist/src/components/Box/box.types.d.ts.map +1 -0
- package/dist/src/components/Box/box.variants.d.ts +402 -0
- package/dist/src/components/Box/box.variants.d.ts.map +1 -0
- package/dist/src/components/Button/Button.d.ts.map +1 -1
- package/dist/src/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/src/components/Container/Container.d.ts +35 -0
- package/dist/src/components/Container/Container.d.ts.map +1 -0
- package/dist/src/components/Container/container.types.d.ts +41 -0
- package/dist/src/components/Container/container.types.d.ts.map +1 -0
- package/dist/src/components/Container/container.variants.d.ts +93 -0
- package/dist/src/components/Container/container.variants.d.ts.map +1 -0
- package/dist/src/components/Divider/Divider.d.ts +50 -0
- package/dist/src/components/Divider/Divider.d.ts.map +1 -0
- package/dist/src/components/Divider/divider.types.d.ts +47 -0
- package/dist/src/components/Divider/divider.types.d.ts.map +1 -0
- package/dist/src/components/Divider/divider.variants.d.ts +129 -0
- package/dist/src/components/Divider/divider.variants.d.ts.map +1 -0
- package/dist/src/components/Grid/Grid.d.ts +32 -0
- package/dist/src/components/Grid/Grid.d.ts.map +1 -0
- package/dist/src/components/Grid/grid.types.d.ts +103 -0
- package/dist/src/components/Grid/grid.types.d.ts.map +1 -0
- package/dist/src/components/Grid/grid.variants.d.ts +453 -0
- package/dist/src/components/Grid/grid.variants.d.ts.map +1 -0
- package/dist/src/components/NumberField/NumberField.d.ts.map +1 -1
- package/dist/src/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/src/components/Stack/Stack.d.ts +24 -0
- package/dist/src/components/Stack/Stack.d.ts.map +1 -0
- package/dist/src/components/Stack/stack.types.d.ts +61 -0
- package/dist/src/components/Stack/stack.types.d.ts.map +1 -0
- package/dist/src/components/Stack/stack.variants.d.ts +163 -0
- package/dist/src/components/Stack/stack.variants.d.ts.map +1 -0
- package/dist/src/components/Typography/Typography.d.ts +42 -0
- package/dist/src/components/Typography/Typography.d.ts.map +1 -0
- package/dist/src/components/Typography/typography.types.d.ts +61 -0
- package/dist/src/components/Typography/typography.types.d.ts.map +1 -0
- package/dist/src/components/Typography/typography.variants.d.ts +167 -0
- package/dist/src/components/Typography/typography.variants.d.ts.map +1 -0
- package/dist/src/components/VisuallyHidden/VisuallyHidden.d.ts +42 -0
- package/dist/src/components/VisuallyHidden/VisuallyHidden.d.ts.map +1 -0
- package/dist/src/components/VisuallyHidden/visuallyHidden.types.d.ts +42 -0
- package/dist/src/components/VisuallyHidden/visuallyHidden.types.d.ts.map +1 -0
- package/dist/src/index.d.ts +23 -1
- package/dist/src/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/AspectRatio/AspectRatio.test.tsx +173 -0
- package/src/components/AspectRatio/AspectRatio.tsx +73 -0
- package/src/components/AspectRatio/aspectRatio.types.ts +54 -0
- package/src/components/Box/Box.test.tsx +349 -0
- package/src/components/Box/Box.tsx +83 -0
- package/src/components/Box/box.types.ts +61 -0
- package/src/components/Box/box.variants.ts +211 -0
- package/src/components/Button/Button.tsx +11 -0
- package/src/components/Checkbox/Checkbox.tsx +26 -2
- package/src/components/Container/Container.test.tsx +209 -0
- package/src/components/Container/Container.tsx +74 -0
- package/src/components/Container/container.types.ts +45 -0
- package/src/components/Container/container.variants.ts +81 -0
- package/src/components/Divider/Divider.test.tsx +241 -0
- package/src/components/Divider/Divider.tsx +140 -0
- package/src/components/Divider/divider.types.ts +52 -0
- package/src/components/Divider/divider.variants.ts +115 -0
- package/src/components/Grid/Grid.test.tsx +321 -0
- package/src/components/Grid/Grid.tsx +148 -0
- package/src/components/Grid/grid.types.ts +112 -0
- package/src/components/Grid/grid.variants.ts +133 -0
- package/src/components/NumberField/NumberField.tsx +30 -2
- package/src/components/RadioGroup/RadioGroup.tsx +23 -1
- package/src/components/Stack/Stack.test.tsx +309 -0
- package/src/components/Stack/Stack.tsx +115 -0
- package/src/components/Stack/stack.types.ts +68 -0
- package/src/components/Stack/stack.variants.ts +80 -0
- package/src/components/Typography/Typography.test.tsx +230 -0
- package/src/components/Typography/Typography.tsx +112 -0
- package/src/components/Typography/typography.types.ts +65 -0
- package/src/components/Typography/typography.variants.ts +113 -0
- package/src/components/VisuallyHidden/VisuallyHidden.test.tsx +86 -0
- package/src/components/VisuallyHidden/VisuallyHidden.tsx +59 -0
- package/src/components/VisuallyHidden/visuallyHidden.types.ts +45 -0
- package/src/index.ts +50 -1
- package/LICENSE +0 -21
- package/dist/components/AppShell/AppShell.d.ts +0 -32
- package/dist/components/AppShell/AppShell.d.ts.map +0 -1
- package/dist/components/AppShell/appShell.types.d.ts +0 -62
- package/dist/components/AppShell/appShell.types.d.ts.map +0 -1
- package/dist/components/AppShell/appShell.variants.d.ts +0 -65
- package/dist/components/AppShell/appShell.variants.d.ts.map +0 -1
- package/dist/components/Autocomplete/Autocomplete.d.ts +0 -32
- package/dist/components/Autocomplete/Autocomplete.d.ts.map +0 -1
- package/dist/components/Autocomplete/autocomplete.types.d.ts +0 -214
- package/dist/components/Autocomplete/autocomplete.types.d.ts.map +0 -1
- package/dist/components/Autocomplete/autocomplete.variants.d.ts +0 -214
- package/dist/components/Autocomplete/autocomplete.variants.d.ts.map +0 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +0 -23
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts.map +0 -1
- package/dist/components/Breadcrumbs/breadcrumbs.types.d.ts +0 -98
- package/dist/components/Breadcrumbs/breadcrumbs.types.d.ts.map +0 -1
- package/dist/components/Breadcrumbs/breadcrumbs.variants.d.ts +0 -85
- package/dist/components/Breadcrumbs/breadcrumbs.variants.d.ts.map +0 -1
- package/dist/components/Button/Button.d.ts +0 -44
- package/dist/components/Button/Button.d.ts.map +0 -1
- package/dist/components/Button/button.types.d.ts +0 -66
- package/dist/components/Button/button.types.d.ts.map +0 -1
- package/dist/components/Button/button.variants.d.ts +0 -104
- package/dist/components/Button/button.variants.d.ts.map +0 -1
- package/dist/components/Checkbox/Checkbox.d.ts +0 -31
- package/dist/components/Checkbox/Checkbox.d.ts.map +0 -1
- package/dist/components/Checkbox/checkbox.types.d.ts +0 -86
- package/dist/components/Checkbox/checkbox.types.d.ts.map +0 -1
- package/dist/components/Checkbox/checkbox.variants.d.ts +0 -109
- package/dist/components/Checkbox/checkbox.variants.d.ts.map +0 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts +0 -38
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts.map +0 -1
- package/dist/components/ConfirmDialog/confirmDialog.types.d.ts +0 -80
- package/dist/components/ConfirmDialog/confirmDialog.types.d.ts.map +0 -1
- package/dist/components/ConfirmDialog/confirmDialog.variants.d.ts +0 -90
- package/dist/components/ConfirmDialog/confirmDialog.variants.d.ts.map +0 -1
- package/dist/components/DateTimePicker/DateTimePicker.d.ts +0 -49
- package/dist/components/DateTimePicker/DateTimePicker.d.ts.map +0 -1
- package/dist/components/DateTimePicker/dateTimePicker.types.d.ts +0 -95
- package/dist/components/DateTimePicker/dateTimePicker.types.d.ts.map +0 -1
- package/dist/components/DateTimePicker/dateTimePicker.variants.d.ts +0 -165
- package/dist/components/DateTimePicker/dateTimePicker.variants.d.ts.map +0 -1
- package/dist/components/LeftNav/LeftNav.d.ts +0 -34
- package/dist/components/LeftNav/LeftNav.d.ts.map +0 -1
- package/dist/components/LeftNav/leftNav.types.d.ts +0 -136
- package/dist/components/LeftNav/leftNav.types.d.ts.map +0 -1
- package/dist/components/LeftNav/leftNav.variants.d.ts +0 -143
- package/dist/components/LeftNav/leftNav.variants.d.ts.map +0 -1
- package/dist/components/NumberField/NumberField.d.ts +0 -18
- package/dist/components/NumberField/NumberField.d.ts.map +0 -1
- package/dist/components/NumberField/numberField.types.d.ts +0 -79
- package/dist/components/NumberField/numberField.types.d.ts.map +0 -1
- package/dist/components/NumberField/numberField.variants.d.ts +0 -169
- package/dist/components/NumberField/numberField.variants.d.ts.map +0 -1
- package/dist/components/OTPField/OTPField.d.ts +0 -25
- package/dist/components/OTPField/OTPField.d.ts.map +0 -1
- package/dist/components/OTPField/otpField.types.d.ts +0 -74
- package/dist/components/OTPField/otpField.types.d.ts.map +0 -1
- package/dist/components/OTPField/otpField.variants.d.ts +0 -105
- package/dist/components/OTPField/otpField.variants.d.ts.map +0 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +0 -35
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +0 -1
- package/dist/components/RadioGroup/radioGroup.types.d.ts +0 -103
- package/dist/components/RadioGroup/radioGroup.types.d.ts.map +0 -1
- package/dist/components/RadioGroup/radioGroup.variants.d.ts +0 -166
- package/dist/components/RadioGroup/radioGroup.variants.d.ts.map +0 -1
- package/dist/components/Snackbar/Snackbar.d.ts +0 -37
- package/dist/components/Snackbar/Snackbar.d.ts.map +0 -1
- package/dist/components/Snackbar/snackbar.types.d.ts +0 -86
- package/dist/components/Snackbar/snackbar.types.d.ts.map +0 -1
- package/dist/components/Snackbar/snackbar.variants.d.ts +0 -153
- package/dist/components/Snackbar/snackbar.variants.d.ts.map +0 -1
- package/dist/components/Switch/Switch.d.ts +0 -15
- package/dist/components/Switch/Switch.d.ts.map +0 -1
- package/dist/components/Switch/switch.types.d.ts +0 -47
- package/dist/components/Switch/switch.types.d.ts.map +0 -1
- package/dist/components/Switch/switch.variants.d.ts +0 -105
- package/dist/components/Switch/switch.variants.d.ts.map +0 -1
- package/dist/components/TextField/TextField.d.ts +0 -25
- package/dist/components/TextField/TextField.d.ts.map +0 -1
- package/dist/components/TextField/textField.types.d.ts +0 -72
- package/dist/components/TextField/textField.types.d.ts.map +0 -1
- package/dist/components/TextField/textField.variants.d.ts +0 -160
- package/dist/components/TextField/textField.variants.d.ts.map +0 -1
- package/dist/components/Textarea/Textarea.d.ts +0 -16
- package/dist/components/Textarea/Textarea.d.ts.map +0 -1
- package/dist/components/Textarea/textarea.types.d.ts +0 -63
- package/dist/components/Textarea/textarea.types.d.ts.map +0 -1
- package/dist/components/Textarea/textarea.variants.d.ts +0 -197
- package/dist/components/Textarea/textarea.variants.d.ts.map +0 -1
- package/dist/components/TopBar/TopBar.d.ts +0 -33
- package/dist/components/TopBar/TopBar.d.ts.map +0 -1
- package/dist/components/TopBar/topBar.types.d.ts +0 -49
- package/dist/components/TopBar/topBar.types.d.ts.map +0 -1
- package/dist/components/TopBar/topBar.variants.d.ts +0 -79
- package/dist/components/TopBar/topBar.variants.d.ts.map +0 -1
- package/dist/components/_shared/resolveValidationState.d.ts +0 -42
- package/dist/components/_shared/resolveValidationState.d.ts.map +0 -1
- package/dist/hooks/useAccessState.d.ts +0 -37
- package/dist/hooks/useAccessState.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/tsconfig.lib.tsbuildinfo +0 -1
- package/dist/utils/cn.d.ts +0 -26
- package/dist/utils/cn.d.ts.map +0 -1
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { type VariantProps } from 'tailwind-variants';
|
|
2
|
-
/**
|
|
3
|
-
* Tailwind-variants recipe for `<ConfirmDialog>`.
|
|
4
|
-
*
|
|
5
|
-
* Built on the native HTML `<dialog>` element + `showModal()`, which
|
|
6
|
-
* gives us focus-trap, Escape handling, and `::backdrop` pseudo-element
|
|
7
|
-
* for free. The styling here is for the dialog body — the backdrop is
|
|
8
|
-
* styled via the `::backdrop` selector inside the dialog rule.
|
|
9
|
-
*
|
|
10
|
-
* Slots:
|
|
11
|
-
* - `backdrop` — semi-opaque overlay (`::backdrop` pseudo)
|
|
12
|
-
* - `dialog` — the modal box
|
|
13
|
-
* - `title` — modal heading
|
|
14
|
-
* - `body` — message text
|
|
15
|
-
* - `actions` — bottom button row
|
|
16
|
-
* - `confirmButton` — primary action
|
|
17
|
-
* - `cancelButton` — secondary action
|
|
18
|
-
*/
|
|
19
|
-
export declare const confirmDialogVariants: import("tailwind-variants").TVReturnType<{
|
|
20
|
-
severity: {
|
|
21
|
-
info: {
|
|
22
|
-
confirmButton: string;
|
|
23
|
-
};
|
|
24
|
-
warning: {
|
|
25
|
-
confirmButton: string;
|
|
26
|
-
};
|
|
27
|
-
danger: {
|
|
28
|
-
confirmButton: string;
|
|
29
|
-
};
|
|
30
|
-
success: {
|
|
31
|
-
confirmButton: string;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
}, {
|
|
35
|
-
backdrop: string;
|
|
36
|
-
dialog: string[];
|
|
37
|
-
title: string;
|
|
38
|
-
body: string;
|
|
39
|
-
actions: string;
|
|
40
|
-
confirmButton: string[];
|
|
41
|
-
cancelButton: string[];
|
|
42
|
-
}, undefined, {
|
|
43
|
-
severity: {
|
|
44
|
-
info: {
|
|
45
|
-
confirmButton: string;
|
|
46
|
-
};
|
|
47
|
-
warning: {
|
|
48
|
-
confirmButton: string;
|
|
49
|
-
};
|
|
50
|
-
danger: {
|
|
51
|
-
confirmButton: string;
|
|
52
|
-
};
|
|
53
|
-
success: {
|
|
54
|
-
confirmButton: string;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
}, {
|
|
58
|
-
backdrop: string;
|
|
59
|
-
dialog: string[];
|
|
60
|
-
title: string;
|
|
61
|
-
body: string;
|
|
62
|
-
actions: string;
|
|
63
|
-
confirmButton: string[];
|
|
64
|
-
cancelButton: string[];
|
|
65
|
-
}, import("tailwind-variants").TVReturnType<{
|
|
66
|
-
severity: {
|
|
67
|
-
info: {
|
|
68
|
-
confirmButton: string;
|
|
69
|
-
};
|
|
70
|
-
warning: {
|
|
71
|
-
confirmButton: string;
|
|
72
|
-
};
|
|
73
|
-
danger: {
|
|
74
|
-
confirmButton: string;
|
|
75
|
-
};
|
|
76
|
-
success: {
|
|
77
|
-
confirmButton: string;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
}, {
|
|
81
|
-
backdrop: string;
|
|
82
|
-
dialog: string[];
|
|
83
|
-
title: string;
|
|
84
|
-
body: string;
|
|
85
|
-
actions: string;
|
|
86
|
-
confirmButton: string[];
|
|
87
|
-
cancelButton: string[];
|
|
88
|
-
}, undefined, unknown, unknown, undefined>>;
|
|
89
|
-
export type ConfirmDialogVariants = VariantProps<typeof confirmDialogVariants>;
|
|
90
|
-
//# sourceMappingURL=confirmDialog.variants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"confirmDialog.variants.d.ts","sourceRoot":"","sources":["../../../src/components/ConfirmDialog/confirmDialog.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAsDhC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { DateTimePickerMode, DateTimePickerProps } from './dateTimePicker.types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Coerce a stored/exposed value (ISO 8601-ish string or `null`/`undefined`)
|
|
4
|
-
* into the format the native input expects.
|
|
5
|
-
*
|
|
6
|
-
* Contract:
|
|
7
|
-
* - `date` → `YYYY-MM-DD`
|
|
8
|
-
* - `time` → `HH:mm` (or `HH:mm:ss` if seconds present)
|
|
9
|
-
* - `datetime` → `YYYY-MM-DDTHH:mm` (no timezone, datetime-local
|
|
10
|
-
* rejects `Z` / offset suffixes)
|
|
11
|
-
*
|
|
12
|
-
* The function is intentionally lenient:
|
|
13
|
-
* - Pass-through when the input already matches the expected shape.
|
|
14
|
-
* - Truncates a richer ISO string (e.g. `2026-05-16T10:23:45.000Z`)
|
|
15
|
-
* down to the mode-appropriate prefix.
|
|
16
|
-
* - Returns `''` for null / undefined / unparseable inputs (native
|
|
17
|
-
* inputs use `''` to represent "no value").
|
|
18
|
-
*/
|
|
19
|
-
export declare function isoToInputValue(mode: DateTimePickerMode, raw: string | null | undefined): string;
|
|
20
|
-
/**
|
|
21
|
-
* Dashforge TW DateTimePicker — bridge-integrated native date/time input.
|
|
22
|
-
*
|
|
23
|
-
* Three modes (`mode` prop):
|
|
24
|
-
* - `date` — `<input type="date">` → `YYYY-MM-DD`
|
|
25
|
-
* - `time` — `<input type="time">` → `HH:mm` (`HH:mm:ss` with `step={1}`)
|
|
26
|
-
* - `datetime` — `<input type="datetime-local">` → `YYYY-MM-DDTHH:mm`
|
|
27
|
-
*
|
|
28
|
-
* **Why native inputs instead of React Aria `<DatePicker>`?**
|
|
29
|
-
*
|
|
30
|
-
* 1. Zero new deps (`@internationalized/date` would add ~30 KB).
|
|
31
|
-
* 2. Mirrors `@dashforge/ui/DateTimePicker` (MUI side) for API parity.
|
|
32
|
-
* 3. Native inputs are AAA-grade a11y out of the box — screen readers,
|
|
33
|
-
* keyboard nav, OS-provided calendar/clock UI.
|
|
34
|
-
* 4. Predictable state (no internal Aria state machine that fights
|
|
35
|
-
* controlled props — the F5-A lesson learned in `<Autocomplete>`).
|
|
36
|
-
*
|
|
37
|
-
* A richer custom-calendar version (range mode, locale awareness,
|
|
38
|
-
* custom popover styling) can land as F5-B-bis built on Aria
|
|
39
|
-
* `<DatePicker>` / `<Calendar>`.
|
|
40
|
-
*
|
|
41
|
-
* **A11y**:
|
|
42
|
-
* - `aria-invalid` driven by the resolved validation state.
|
|
43
|
-
* - `aria-describedby` links input ↔ helper/error.
|
|
44
|
-
* - Required fields get the native `required` attribute + a visual `*`.
|
|
45
|
-
* - `color-scheme: light dark` keeps the OS calendar icon readable
|
|
46
|
-
* in both color schemes.
|
|
47
|
-
*/
|
|
48
|
-
export declare function DateTimePicker(props: DateTimePickerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
49
|
-
//# sourceMappingURL=DateTimePicker.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimePicker.d.ts","sourceRoot":"","sources":["../../../src/components/DateTimePicker/DateTimePicker.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,2BAA2B,CAAC;AAiBnC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,kBAAkB,EACxB,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC7B,MAAM,CA2BR;AAWD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,kDAsMxD"}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import type { Engine } from '@dashforge/ui-core';
|
|
3
|
-
import type { AccessRequirement } from '@dashforge/rbac';
|
|
4
|
-
import type { DateTimePickerVariants } from './dateTimePicker.variants.js';
|
|
5
|
-
/**
|
|
6
|
-
* Operating mode of the picker.
|
|
7
|
-
*
|
|
8
|
-
* - `'date'` — `YYYY-MM-DD` (native `<input type="date">`)
|
|
9
|
-
* - `'time'` — `HH:mm` or `HH:mm:ss` (native `<input type="time">`)
|
|
10
|
-
* - `'datetime'` — `YYYY-MM-DDTHH:mm` (native `<input type="datetime-local">`)
|
|
11
|
-
*
|
|
12
|
-
* Note: `datetime-local` does NOT include timezone info. Values are
|
|
13
|
-
* naive local-time strings. If you need TZ-aware persistence, convert
|
|
14
|
-
* upstream (e.g., interpret as UTC, or attach the user's TZ from a
|
|
15
|
-
* separate field).
|
|
16
|
-
*/
|
|
17
|
-
export type DateTimePickerMode = 'date' | 'time' | 'datetime';
|
|
18
|
-
export interface DateTimePickerSlotProps {
|
|
19
|
-
root?: {
|
|
20
|
-
className?: string;
|
|
21
|
-
};
|
|
22
|
-
label?: {
|
|
23
|
-
className?: string;
|
|
24
|
-
};
|
|
25
|
-
requiredMark?: {
|
|
26
|
-
className?: string;
|
|
27
|
-
};
|
|
28
|
-
inputWrapper?: {
|
|
29
|
-
className?: string;
|
|
30
|
-
};
|
|
31
|
-
input?: {
|
|
32
|
-
className?: string;
|
|
33
|
-
};
|
|
34
|
-
helperText?: {
|
|
35
|
-
className?: string;
|
|
36
|
-
};
|
|
37
|
-
errorText?: {
|
|
38
|
-
className?: string;
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Props for `<DateTimePicker>`.
|
|
43
|
-
*
|
|
44
|
-
* Bridge-integrated date / time / datetime input built on the native
|
|
45
|
-
* HTML5 input types (`type="date|time|datetime-local"`). Chosen over a
|
|
46
|
-
* custom React Aria `<DatePicker>` for F5-B because:
|
|
47
|
-
*
|
|
48
|
-
* 1. **Zero new deps** — no `@internationalized/date`.
|
|
49
|
-
* 2. **A11y by default** — screen readers know how to announce these
|
|
50
|
-
* inputs, including the OS-provided calendar/clock popup.
|
|
51
|
-
* 3. **Bundle size** — saves ~30KB minified over the Aria stack.
|
|
52
|
-
* 4. **API parity** with the MUI side (`@dashforge/ui/DateTimePicker`).
|
|
53
|
-
* 5. **Predictability** — no internal state machine to fight (see the
|
|
54
|
-
* ComboBox lesson learned in `<Autocomplete>` F5-A).
|
|
55
|
-
*
|
|
56
|
-
* A richer "always-visible calendar grid" upgrade can come as F5-B-bis.
|
|
57
|
-
*
|
|
58
|
-
* Value contract: ISO 8601-ish naive strings, always.
|
|
59
|
-
*/
|
|
60
|
-
export interface DateTimePickerProps extends DateTimePickerVariants {
|
|
61
|
-
name: string;
|
|
62
|
-
rules?: unknown;
|
|
63
|
-
/** Which native input to render. @default 'date' */
|
|
64
|
-
mode?: DateTimePickerMode;
|
|
65
|
-
label?: ReactNode;
|
|
66
|
-
helperText?: ReactNode;
|
|
67
|
-
required?: boolean;
|
|
68
|
-
error?: boolean;
|
|
69
|
-
disabled?: boolean;
|
|
70
|
-
placeholder?: string;
|
|
71
|
-
/** Minimum value (ISO string compatible with the mode). */
|
|
72
|
-
min?: string;
|
|
73
|
-
/** Maximum value (ISO string compatible with the mode). */
|
|
74
|
-
max?: string;
|
|
75
|
-
/**
|
|
76
|
-
* Step in seconds (time / datetime). Default 60 ⇒ minute precision.
|
|
77
|
-
* Set to 1 to allow seconds.
|
|
78
|
-
*/
|
|
79
|
-
step?: number;
|
|
80
|
-
/** Engine predicate — field not rendered when it returns `false`. */
|
|
81
|
-
visibleWhen?: (engine: Engine) => boolean;
|
|
82
|
-
/** RBAC access requirement. */
|
|
83
|
-
access?: AccessRequirement;
|
|
84
|
-
/** Root className shortcut. */
|
|
85
|
-
sx?: string;
|
|
86
|
-
/** Per-slot className overrides. */
|
|
87
|
-
slotProps?: DateTimePickerSlotProps;
|
|
88
|
-
/** Controlled value (form mode reads from the bridge if omitted). */
|
|
89
|
-
value?: string | null;
|
|
90
|
-
/** Default value for uncontrolled mode (no-op in form mode). */
|
|
91
|
-
defaultValue?: string | null;
|
|
92
|
-
/** Fires when the user picks a date/time (after bridge update in form mode). */
|
|
93
|
-
onValueChange?: (value: string | null) => void;
|
|
94
|
-
}
|
|
95
|
-
//# sourceMappingURL=dateTimePicker.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dateTimePicker.types.d.ts","sourceRoot":"","sources":["../../../src/components/DateTimePicker/dateTimePicker.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,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AAC,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;IAC1C,+BAA+B;IAC/B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,+BAA+B;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,oCAAoC;IACpC,SAAS,CAAC,EAAE,uBAAuB,CAAC;IACpC,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,gFAAgF;IAChF,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAChD"}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import { type VariantProps } from 'tailwind-variants';
|
|
2
|
-
/**
|
|
3
|
-
* Tailwind-variants recipe for `<DateTimePicker>` with 6 slots.
|
|
4
|
-
*
|
|
5
|
-
* Styling mirrors `<TextField>` for layout / sizes / error states so
|
|
6
|
-
* the two field types compose visually in the same form.
|
|
7
|
-
*
|
|
8
|
-
* Native `<input type="date|time|datetime-local">` quirks handled here:
|
|
9
|
-
*
|
|
10
|
-
* - The browser-rendered placeholder mask (e.g., `mm/dd/yyyy`) is
|
|
11
|
-
* invisible on `bg-neutral-50` by default in some themes; we keep
|
|
12
|
-
* the same neutral palette and rely on the input's own contrast
|
|
13
|
-
* rules (no extra `::placeholder` styling — browsers don't honor it
|
|
14
|
-
* on these input types).
|
|
15
|
-
* - The native picker indicator (calendar / clock icon) is
|
|
16
|
-
* browser-supplied; we ensure it stays visible in dark mode via
|
|
17
|
-
* `color-scheme: light dark` on the input (set inline below).
|
|
18
|
-
*/
|
|
19
|
-
export declare const dateTimePickerVariants: import("tailwind-variants").TVReturnType<{
|
|
20
|
-
size: {
|
|
21
|
-
sm: {
|
|
22
|
-
inputWrapper: string;
|
|
23
|
-
input: string;
|
|
24
|
-
};
|
|
25
|
-
md: {
|
|
26
|
-
inputWrapper: string;
|
|
27
|
-
input: string;
|
|
28
|
-
};
|
|
29
|
-
lg: {
|
|
30
|
-
inputWrapper: string;
|
|
31
|
-
input: string;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
layout: {
|
|
35
|
-
stacked: {
|
|
36
|
-
root: string;
|
|
37
|
-
};
|
|
38
|
-
inline: {
|
|
39
|
-
root: string;
|
|
40
|
-
label: string;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
error: {
|
|
44
|
-
true: {
|
|
45
|
-
inputWrapper: string;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
fullWidth: {
|
|
49
|
-
true: {
|
|
50
|
-
root: string;
|
|
51
|
-
inputWrapper: string;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
disabled: {
|
|
55
|
-
true: {
|
|
56
|
-
inputWrapper: string;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
}, {
|
|
60
|
-
root: string;
|
|
61
|
-
label: string;
|
|
62
|
-
requiredMark: string;
|
|
63
|
-
inputWrapper: string[];
|
|
64
|
-
input: string[];
|
|
65
|
-
helperText: string;
|
|
66
|
-
errorText: string;
|
|
67
|
-
}, undefined, {
|
|
68
|
-
size: {
|
|
69
|
-
sm: {
|
|
70
|
-
inputWrapper: string;
|
|
71
|
-
input: string;
|
|
72
|
-
};
|
|
73
|
-
md: {
|
|
74
|
-
inputWrapper: string;
|
|
75
|
-
input: string;
|
|
76
|
-
};
|
|
77
|
-
lg: {
|
|
78
|
-
inputWrapper: string;
|
|
79
|
-
input: string;
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
layout: {
|
|
83
|
-
stacked: {
|
|
84
|
-
root: string;
|
|
85
|
-
};
|
|
86
|
-
inline: {
|
|
87
|
-
root: string;
|
|
88
|
-
label: string;
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
error: {
|
|
92
|
-
true: {
|
|
93
|
-
inputWrapper: string;
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
fullWidth: {
|
|
97
|
-
true: {
|
|
98
|
-
root: string;
|
|
99
|
-
inputWrapper: string;
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
disabled: {
|
|
103
|
-
true: {
|
|
104
|
-
inputWrapper: string;
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
}, {
|
|
108
|
-
root: string;
|
|
109
|
-
label: string;
|
|
110
|
-
requiredMark: string;
|
|
111
|
-
inputWrapper: string[];
|
|
112
|
-
input: string[];
|
|
113
|
-
helperText: string;
|
|
114
|
-
errorText: string;
|
|
115
|
-
}, import("tailwind-variants").TVReturnType<{
|
|
116
|
-
size: {
|
|
117
|
-
sm: {
|
|
118
|
-
inputWrapper: string;
|
|
119
|
-
input: string;
|
|
120
|
-
};
|
|
121
|
-
md: {
|
|
122
|
-
inputWrapper: string;
|
|
123
|
-
input: string;
|
|
124
|
-
};
|
|
125
|
-
lg: {
|
|
126
|
-
inputWrapper: string;
|
|
127
|
-
input: string;
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
|
-
layout: {
|
|
131
|
-
stacked: {
|
|
132
|
-
root: string;
|
|
133
|
-
};
|
|
134
|
-
inline: {
|
|
135
|
-
root: string;
|
|
136
|
-
label: string;
|
|
137
|
-
};
|
|
138
|
-
};
|
|
139
|
-
error: {
|
|
140
|
-
true: {
|
|
141
|
-
inputWrapper: string;
|
|
142
|
-
};
|
|
143
|
-
};
|
|
144
|
-
fullWidth: {
|
|
145
|
-
true: {
|
|
146
|
-
root: string;
|
|
147
|
-
inputWrapper: string;
|
|
148
|
-
};
|
|
149
|
-
};
|
|
150
|
-
disabled: {
|
|
151
|
-
true: {
|
|
152
|
-
inputWrapper: string;
|
|
153
|
-
};
|
|
154
|
-
};
|
|
155
|
-
}, {
|
|
156
|
-
root: string;
|
|
157
|
-
label: string;
|
|
158
|
-
requiredMark: string;
|
|
159
|
-
inputWrapper: string[];
|
|
160
|
-
input: string[];
|
|
161
|
-
helperText: string;
|
|
162
|
-
errorText: string;
|
|
163
|
-
}, undefined, unknown, unknown, undefined>>;
|
|
164
|
-
export type DateTimePickerVariants = VariantProps<typeof dateTimePickerVariants>;
|
|
165
|
-
//# sourceMappingURL=dateTimePicker.variants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dateTimePicker.variants.d.ts","sourceRoot":"","sources":["../../../src/components/DateTimePicker/dateTimePicker.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CA8DjC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,YAAY,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { LeftNavProps } from './leftNav.types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Dashforge TW LeftNav — router-agnostic sidebar navigation.
|
|
4
|
-
*
|
|
5
|
-
* Pure presentational. The consumer wires `activeId` from the current
|
|
6
|
-
* route. Each row renders as a real `<a>` (with `href`) or a `<button>`
|
|
7
|
-
* (with `onSelect`); `linkComponent` swaps in a router-aware link
|
|
8
|
-
* component for SPA navigation.
|
|
9
|
-
*
|
|
10
|
-
* Modes:
|
|
11
|
-
* - **Expanded** (`collapsed={false}`): full-width with labels +
|
|
12
|
-
* badges + group children visible.
|
|
13
|
-
* - **Rail** (`collapsed={true}`): 56px wide, icons only, labels
|
|
14
|
-
* hidden from sighted users (still announced to screen readers via
|
|
15
|
-
* `sr-only`). Group children are hidden — clicking the group
|
|
16
|
-
* header is a no-op visually in rail mode (consumer is expected
|
|
17
|
-
* to either expand the nav or surface a flyout in a follow-up).
|
|
18
|
-
*
|
|
19
|
-
* **A11y**:
|
|
20
|
-
* - `<nav aria-label="…">` landmark.
|
|
21
|
-
* - `aria-current="page"` on the active row.
|
|
22
|
-
* - Groups expose `aria-expanded` / `aria-controls` and the children
|
|
23
|
-
* wrapper is `role="region" aria-labelledby="…-header"`.
|
|
24
|
-
* - Rail-mode tooltips via the native `title` attribute (preserves
|
|
25
|
-
* hover discoverability when labels are visually hidden).
|
|
26
|
-
*
|
|
27
|
-
* **Re-render contract**:
|
|
28
|
-
* - Rows are extracted into stable sub-components so a single
|
|
29
|
-
* `activeId` change re-renders all rows but each does only its
|
|
30
|
-
* own `useAccessState` lookup; this is the price of per-row RBAC.
|
|
31
|
-
* - Group expand/collapse re-renders ONLY that group (local state).
|
|
32
|
-
*/
|
|
33
|
-
export declare function LeftNav(props: LeftNavProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
-
//# sourceMappingURL=LeftNav.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LeftNav.d.ts","sourceRoot":"","sources":["../../../src/components/LeftNav/LeftNav.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAIV,YAAY,EACb,MAAM,oBAAoB,CAAC;AA+M5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,2CAkF1C"}
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import type { ReactNode, ComponentType, AnchorHTMLAttributes, Ref } from 'react';
|
|
2
|
-
import type { AccessRequirement } from '@dashforge/rbac';
|
|
3
|
-
import type { LeftNavVariants } from './leftNav.variants.js';
|
|
4
|
-
/**
|
|
5
|
-
* One row in the LeftNav. May be either a clickable item OR a group
|
|
6
|
-
* (a header that owns nested children, optionally collapsible).
|
|
7
|
-
*/
|
|
8
|
-
export type LeftNavNode = LeftNavItem | LeftNavGroup;
|
|
9
|
-
export interface LeftNavItem {
|
|
10
|
-
kind?: 'item';
|
|
11
|
-
/** Stable id used for `activeId` matching + React keys. */
|
|
12
|
-
id: string;
|
|
13
|
-
label: ReactNode;
|
|
14
|
-
icon?: ReactNode;
|
|
15
|
-
/**
|
|
16
|
-
* Destination for navigation. Omit for a pure-callback item (use
|
|
17
|
-
* `onSelect`).
|
|
18
|
-
*/
|
|
19
|
-
href?: string;
|
|
20
|
-
/** Fired when the row is clicked (in addition to navigation). */
|
|
21
|
-
onSelect?: () => void;
|
|
22
|
-
/** Optional pill / counter rendered to the right of the label. */
|
|
23
|
-
badge?: ReactNode;
|
|
24
|
-
/** Per-item disabled flag. */
|
|
25
|
-
disabled?: boolean;
|
|
26
|
-
/** RBAC access requirement — hides / disables the row. */
|
|
27
|
-
access?: AccessRequirement;
|
|
28
|
-
}
|
|
29
|
-
export interface LeftNavGroup {
|
|
30
|
-
kind: 'group';
|
|
31
|
-
id: string;
|
|
32
|
-
label: ReactNode;
|
|
33
|
-
icon?: ReactNode;
|
|
34
|
-
children: LeftNavItem[];
|
|
35
|
-
/**
|
|
36
|
-
* Initial expanded state when used in uncontrolled mode. Default
|
|
37
|
-
* `true` (groups open by default — most app navs want immediate
|
|
38
|
-
* visibility).
|
|
39
|
-
*/
|
|
40
|
-
defaultExpanded?: boolean;
|
|
41
|
-
/** Controlled expanded state. Provide `onExpandedChange` to update. */
|
|
42
|
-
expanded?: boolean;
|
|
43
|
-
/** RBAC access requirement — hides / disables the whole group. */
|
|
44
|
-
access?: AccessRequirement;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Polymorphic link component prop. Defaults to `<a>`. Pass a
|
|
48
|
-
* router-aware component (react-router `Link`, Next `Link`) for SPA
|
|
49
|
-
* navigation.
|
|
50
|
-
*/
|
|
51
|
-
export type LeftNavLinkComponent = ComponentType<AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
52
|
-
ref?: Ref<HTMLAnchorElement>;
|
|
53
|
-
}>;
|
|
54
|
-
export interface LeftNavSlotProps {
|
|
55
|
-
root?: {
|
|
56
|
-
className?: string;
|
|
57
|
-
};
|
|
58
|
-
brand?: {
|
|
59
|
-
className?: string;
|
|
60
|
-
};
|
|
61
|
-
list?: {
|
|
62
|
-
className?: string;
|
|
63
|
-
};
|
|
64
|
-
item?: {
|
|
65
|
-
className?: string;
|
|
66
|
-
};
|
|
67
|
-
itemLink?: {
|
|
68
|
-
className?: string;
|
|
69
|
-
};
|
|
70
|
-
itemActive?: {
|
|
71
|
-
className?: string;
|
|
72
|
-
};
|
|
73
|
-
itemIcon?: {
|
|
74
|
-
className?: string;
|
|
75
|
-
};
|
|
76
|
-
itemLabel?: {
|
|
77
|
-
className?: string;
|
|
78
|
-
};
|
|
79
|
-
itemBadge?: {
|
|
80
|
-
className?: string;
|
|
81
|
-
};
|
|
82
|
-
group?: {
|
|
83
|
-
className?: string;
|
|
84
|
-
};
|
|
85
|
-
groupHeader?: {
|
|
86
|
-
className?: string;
|
|
87
|
-
};
|
|
88
|
-
groupChildren?: {
|
|
89
|
-
className?: string;
|
|
90
|
-
};
|
|
91
|
-
footer?: {
|
|
92
|
-
className?: string;
|
|
93
|
-
};
|
|
94
|
-
collapseToggle?: {
|
|
95
|
-
className?: string;
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Props for `<LeftNav>`.
|
|
100
|
-
*
|
|
101
|
-
* Router-agnostic sidebar navigation. The consumer drives the active
|
|
102
|
-
* item via `activeId` (typically derived from the current route).
|
|
103
|
-
*
|
|
104
|
-
* Rail / drawer responsive behaviour is handled by `<AppShell>`; this
|
|
105
|
-
* component renders the actual nav content and exposes a `collapsed`
|
|
106
|
-
* prop for the icon-only "rail" rendering.
|
|
107
|
-
*/
|
|
108
|
-
export interface LeftNavProps extends LeftNavVariants {
|
|
109
|
-
items: LeftNavNode[];
|
|
110
|
-
/** Currently-active item id (highlight + `aria-current="page"`). */
|
|
111
|
-
activeId?: string;
|
|
112
|
-
/**
|
|
113
|
-
* Icon-only rail mode. When `true`, labels and group children are
|
|
114
|
-
* visually hidden (kept for screen readers via `sr-only`).
|
|
115
|
-
*/
|
|
116
|
-
collapsed?: boolean;
|
|
117
|
-
/** Fired when the user clicks the collapse-toggle button. */
|
|
118
|
-
onCollapseChange?: (collapsed: boolean) => void;
|
|
119
|
-
/** Fired when a group's expanded state changes (controlled or not). */
|
|
120
|
-
onGroupExpandedChange?: (groupId: string, expanded: boolean) => void;
|
|
121
|
-
/** Brand / logo node rendered at the top. */
|
|
122
|
-
brand?: ReactNode;
|
|
123
|
-
/** Footer node (e.g., user badge). */
|
|
124
|
-
footer?: ReactNode;
|
|
125
|
-
/** Override the link component. @default 'a' */
|
|
126
|
-
linkComponent?: LeftNavLinkComponent;
|
|
127
|
-
/** Visible label of the nav landmark. @default 'Main navigation' */
|
|
128
|
-
ariaLabel?: string;
|
|
129
|
-
/** Root className shortcut. */
|
|
130
|
-
sx?: string;
|
|
131
|
-
/** Per-slot className overrides. */
|
|
132
|
-
slotProps?: LeftNavSlotProps;
|
|
133
|
-
/** Show / hide the collapse toggle button. @default true */
|
|
134
|
-
showCollapseToggle?: boolean;
|
|
135
|
-
}
|
|
136
|
-
//# sourceMappingURL=leftNav.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"leftNav.types.d.ts","sourceRoot":"","sources":["../../../src/components/LeftNav/leftNav.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,oBAAoB,EACpB,GAAG,EACJ,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,K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