@cjlapao/ui-kit-vue 0.2.0 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +18 -25
- package/dist/index.css +37732 -13285
- package/dist/index.js +31192 -21036
- package/dist/types/common/chat/markdown.d.ts +8 -0
- package/dist/types/common/chat/storage.d.ts +48 -0
- package/dist/types/common/chat/stream.d.ts +43 -0
- package/dist/types/common/chat/types.d.ts +143 -0
- package/dist/types/common/connectionFlow/header.d.ts +56 -0
- package/dist/types/common/connectionFlow/icons.d.ts +15 -0
- package/dist/types/common/connectionFlow/index.d.ts +6 -0
- package/dist/types/common/connectionFlow/layout.d.ts +73 -0
- package/dist/types/common/connectionFlow/measure.d.ts +94 -0
- package/dist/types/common/connectionFlow/paint.d.ts +36 -0
- package/dist/types/common/connectionFlow/router.d.ts +131 -0
- package/dist/types/common/connectionFlow/tones.d.ts +79 -0
- package/dist/types/common/connectionFlow/types.d.ts +394 -0
- package/dist/types/common/gantt/drag.d.ts +221 -0
- package/dist/types/common/gantt/index.d.ts +11 -0
- package/dist/types/common/gantt/layout.d.ts +133 -0
- package/dist/types/common/gantt/sample.d.ts +15 -0
- package/dist/types/common/gantt/time.d.ts +77 -0
- package/dist/types/common/gantt/tokens.d.ts +73 -0
- package/dist/types/common/gantt/types.d.ts +216 -0
- package/dist/types/common/i18n/builtIn/de.d.ts +2 -0
- package/dist/types/common/i18n/builtIn/en.d.ts +2 -0
- package/dist/types/common/i18n/builtIn/es.d.ts +2 -0
- package/dist/types/common/i18n/builtIn/fr.d.ts +2 -0
- package/dist/types/common/i18n/builtIn/index.d.ts +15 -0
- package/dist/types/common/i18n/builtIn/pt.d.ts +2 -0
- package/dist/types/common/i18n/catalog.d.ts +32 -0
- package/dist/types/common/i18n/createI18n.d.ts +2 -0
- package/dist/types/common/i18n/dates.d.ts +12 -0
- package/dist/types/common/i18n/detect.d.ts +29 -0
- package/dist/types/common/i18n/icu.d.ts +36 -0
- package/dist/types/common/i18n/index.d.ts +10 -0
- package/dist/types/common/i18n/provider.d.ts +7 -0
- package/dist/types/common/i18n/storage.d.ts +8 -0
- package/dist/types/common/i18n/types.d.ts +64 -0
- package/dist/types/common/i18n/warn.d.ts +5 -0
- package/dist/types/common/theme/Theme.d.ts +941 -3
- package/dist/types/common/theme/glass.d.ts +90 -11
- package/dist/types/common/theme/randomThemeColor.d.ts +4 -4
- package/dist/types/common/tooltip/placement.d.ts +103 -0
- package/dist/types/common/tooltip/tokens.d.ts +40 -0
- package/dist/types/common/types/TableSettings.d.ts +15 -0
- package/dist/types/common/types/Variables.d.ts +71 -1
- package/dist/types/common/utils/dates.d.ts +113 -0
- package/dist/types/common/utils/gravatar.d.ts +0 -10
- package/dist/types/common/utils/safeStorage.d.ts +28 -0
- package/dist/types/common/utils/sanitizeSvg.d.ts +44 -0
- package/dist/types/common/utils/smartVariables.d.ts +74 -18
- package/dist/types/common/utils/tableStorage.d.ts +38 -0
- package/dist/types/vue/src/chat/index.d.ts +4 -0
- package/dist/types/vue/src/components/AccessMatrix.test.d.ts +1 -0
- package/dist/types/vue/src/components/AccessMatrix.vue.d.ts +23 -1
- package/dist/types/vue/src/components/Accordion.test.d.ts +1 -0
- package/dist/types/vue/src/components/Accordion.vue.d.ts +42 -28
- package/dist/types/vue/src/components/ActivityFeed.test.d.ts +1 -0
- package/dist/types/vue/src/components/ActivityFeed.vue.d.ts +141 -0
- package/dist/types/vue/src/components/Alert.test.d.ts +1 -0
- package/dist/types/vue/src/components/Alert.vue.d.ts +59 -2
- package/dist/types/vue/src/components/ApiErrorState.test.d.ts +1 -0
- package/dist/types/vue/src/components/ApiErrorState.vue.d.ts +28 -8
- package/dist/types/vue/src/components/AppDivider.vue.d.ts +53 -4
- package/dist/types/vue/src/components/Badge.vue.d.ts +45 -13
- package/dist/types/vue/src/components/BadgeIcon.vue.d.ts +1 -1
- package/dist/types/vue/src/components/BreakdownCard.test.d.ts +1 -0
- package/dist/types/vue/src/components/BreakdownCard.vue.d.ts +81 -0
- package/dist/types/vue/src/components/Button.vue.d.ts +22 -11
- package/dist/types/vue/src/components/Chat.test.d.ts +1 -0
- package/dist/types/vue/src/components/Chat.vue.d.ts +80 -0
- package/dist/types/vue/src/components/Checkbox.test.d.ts +1 -0
- package/dist/types/vue/src/components/Checkbox.vue.d.ts +44 -29
- package/dist/types/vue/src/components/CollapsiblePanel.vue.d.ts +5 -5
- package/dist/types/vue/src/components/ColorSwatches.test.d.ts +1 -0
- package/dist/types/vue/src/components/ColorSwatches.vue.d.ts +42 -0
- package/dist/types/vue/src/components/Combobox.test.d.ts +1 -0
- package/dist/types/vue/src/components/Combobox.vue.d.ts +61 -12
- package/dist/types/vue/src/components/ConnectionFlow/ConnectionFlow.vue.d.ts +153 -17
- package/dist/types/vue/src/components/ConnectionFlow/ConnectionFlowCanvas.vue.d.ts +28 -0
- package/dist/types/vue/src/components/ConnectionFlow/ConnectionFlowHeader.vue.d.ts +33 -0
- package/dist/types/vue/src/components/ConnectionFlow/ConnectionFlowNodeBody.vue.d.ts +32 -0
- package/dist/types/vue/src/components/ConnectionFlow/ConnectionFlowSkeleton.vue.d.ts +18 -0
- package/dist/types/vue/src/components/ConnectionFlow/ConnectionFlowSvg.vue.d.ts +52 -0
- package/dist/types/vue/src/components/ConnectionFlow/connectionFlow.test.d.ts +1 -0
- package/dist/types/vue/src/components/ConnectionFlow/index.d.ts +11 -4
- package/dist/types/vue/src/components/CustomIcon.vue.d.ts +35 -11
- package/dist/types/vue/src/components/DetailItemCard.vue.d.ts +37 -5
- package/dist/types/vue/src/components/DropdownButton.vue.d.ts +3 -3
- package/dist/types/vue/src/components/DropdownMenu.test.d.ts +1 -0
- package/dist/types/vue/src/components/DropdownMenu.vue.d.ts +1 -1
- package/dist/types/vue/src/components/DynamicFormField.test.d.ts +1 -0
- package/dist/types/vue/src/components/DynamicFormField.vue.d.ts +61 -5
- package/dist/types/vue/src/components/DynamicImg.vue.d.ts +28 -3
- package/dist/types/vue/src/components/EmptyState.test.d.ts +1 -0
- package/dist/types/vue/src/components/EmptyState.vue.d.ts +104 -24
- package/dist/types/vue/src/components/FormField.vue.d.ts +2 -1
- package/dist/types/vue/src/components/Gantt/Gantt.test.d.ts +1 -0
- package/dist/types/vue/src/components/Gantt/Gantt.vue.d.ts +160 -0
- package/dist/types/vue/src/components/Gantt/GanttBodyRow.vue.d.ts +78 -0
- package/dist/types/vue/src/components/Gantt/GanttCell.vue.d.ts +28 -0
- package/dist/types/vue/src/components/Gantt/GanttLinkLayer.vue.d.ts +22 -0
- package/dist/types/vue/src/components/Gantt/GanttScale.vue.d.ts +7 -0
- package/dist/types/vue/src/components/Gantt/GanttTaskBar.vue.d.ts +53 -0
- package/dist/types/vue/src/components/Gantt/GanttToolbar.vue.d.ts +22 -0
- package/dist/types/vue/src/components/Gantt/index.d.ts +18 -0
- package/dist/types/vue/src/components/Gantt/labels.d.ts +3 -0
- package/dist/types/vue/src/components/Gantt/types.d.ts +11 -0
- package/dist/types/vue/src/components/Gantt/useGanttDrag.d.ts +105 -0
- package/dist/types/vue/src/components/GlassBackground.vue.d.ts +4 -3
- package/dist/types/vue/src/components/GlassPanel.vue.d.ts +2 -2
- package/dist/types/vue/src/components/HeaderGroup.vue.d.ts +19 -1
- package/dist/types/vue/src/components/HelpButton.test.d.ts +1 -0
- package/dist/types/vue/src/components/HelpButton.vue.d.ts +15 -6
- package/dist/types/vue/src/components/Hero.test.d.ts +1 -0
- package/dist/types/vue/src/components/Hero.vue.d.ts +52 -31
- package/dist/types/vue/src/components/IconButton.vue.d.ts +12 -6
- package/dist/types/vue/src/components/InfiniteScrollPanel.vue.d.ts +61 -14
- package/dist/types/vue/src/components/InfoRow.test.d.ts +1 -0
- package/dist/types/vue/src/components/InfoRow.vue.d.ts +67 -37
- package/dist/types/vue/src/components/InlinePanel.vue.d.ts +12 -18
- package/dist/types/vue/src/components/Input.test.d.ts +1 -0
- package/dist/types/vue/src/components/Input.vue.d.ts +42 -13
- package/dist/types/vue/src/components/InputGroup.test.d.ts +1 -0
- package/dist/types/vue/src/components/InputGroup.vue.d.ts +20 -5
- package/dist/types/vue/src/components/Loader.test.d.ts +1 -0
- package/dist/types/vue/src/components/Loader.vue.d.ts +30 -11
- package/dist/types/vue/src/components/MarkdownEditor.vue.d.ts +1 -1
- package/dist/types/vue/src/components/MetricBar.test.d.ts +1 -0
- package/dist/types/vue/src/components/MetricBar.vue.d.ts +16 -5
- package/dist/types/vue/src/components/Modal.vue.d.ts +18 -19
- package/dist/types/vue/src/components/MultiProgressBar.vue.d.ts +15 -2
- package/dist/types/vue/src/components/MultiSelectPills.test.d.ts +1 -0
- package/dist/types/vue/src/components/MultiSelectPills.vue.d.ts +47 -43
- package/dist/types/vue/src/components/MultiToggle.test.d.ts +1 -0
- package/dist/types/vue/src/components/MultiToggle.vue.d.ts +33 -6
- package/dist/types/vue/src/components/NotificationModal.test.d.ts +1 -0
- package/dist/types/vue/src/components/NotificationModal.vue.d.ts +19 -2
- package/dist/types/vue/src/components/PageHeader.test.d.ts +1 -0
- package/dist/types/vue/src/components/PageHeader.vue.d.ts +18 -0
- package/dist/types/vue/src/components/PagedPanel.test.d.ts +1 -0
- package/dist/types/vue/src/components/PagedPanel.vue.d.ts +39 -11
- package/dist/types/vue/src/components/Panel.vue.d.ts +18 -9
- package/dist/types/vue/src/components/PasswordInput.test.d.ts +1 -0
- package/dist/types/vue/src/components/PasswordInput.vue.d.ts +20 -3
- package/dist/types/vue/src/components/Picker.test.d.ts +1 -0
- package/dist/types/vue/src/components/Picker.vue.d.ts +3 -3
- package/dist/types/vue/src/components/Pill.vue.d.ts +63 -5
- package/dist/types/vue/src/components/Progress.test.d.ts +1 -0
- package/dist/types/vue/src/components/Progress.vue.d.ts +60 -11
- package/dist/types/vue/src/components/ProgressSpinner.test.d.ts +1 -0
- package/dist/types/vue/src/components/ProgressSpinner.vue.d.ts +46 -0
- package/dist/types/vue/src/components/ScrollArea.test.d.ts +1 -0
- package/dist/types/vue/src/components/ScrollArea.vue.d.ts +52 -0
- package/dist/types/vue/src/components/SearchBar.vue.d.ts +2 -3
- package/dist/types/vue/src/components/Section.vue.d.ts +1 -1
- package/dist/types/vue/src/components/SectionCard.vue.d.ts +2 -2
- package/dist/types/vue/src/components/Select.test.d.ts +1 -0
- package/dist/types/vue/src/components/Select.vue.d.ts +41 -16
- package/dist/types/vue/src/components/SidePanel.vue.d.ts +1 -1
- package/dist/types/vue/src/components/SmartInput.vue.d.ts +49 -18
- package/dist/types/vue/src/components/SmartValue.vue.d.ts +20 -13
- package/dist/types/vue/src/components/SmartVariableBadge.vue.d.ts +17 -0
- package/dist/types/vue/src/components/Spinner.test.d.ts +1 -0
- package/dist/types/vue/src/components/Spinner.vue.d.ts +12 -5
- package/dist/types/vue/src/components/SplitView.vue.d.ts +6 -6
- package/dist/types/vue/src/components/StartupStageStepper.vue.d.ts +1 -1
- package/dist/types/vue/src/components/StatChartTile.vue.d.ts +5 -0
- package/dist/types/vue/src/components/StatCountTile.vue.d.ts +5 -1
- package/dist/types/vue/src/components/StatGraphTile.vue.d.ts +1 -1
- package/dist/types/vue/src/components/StatTile.test.d.ts +1 -0
- package/dist/types/vue/src/components/StatTile.vue.d.ts +5 -1
- package/dist/types/vue/src/components/StatusSpinner.test.d.ts +1 -0
- package/dist/types/vue/src/components/StatusSpinner.vue.d.ts +10 -5
- package/dist/types/vue/src/components/Stepper.test.d.ts +1 -0
- package/dist/types/vue/src/components/Stepper.vue.d.ts +62 -25
- package/dist/types/vue/src/components/Table.test.d.ts +1 -0
- package/dist/types/vue/src/components/Table.vue.d.ts +67 -14
- package/dist/types/vue/src/components/Tabs.vue.d.ts +20 -3
- package/dist/types/vue/src/components/TagPicker.vue.d.ts +3 -3
- package/dist/types/vue/src/components/Textarea.vue.d.ts +8 -5
- package/dist/types/vue/src/components/TimelinePanel/TimelinePanel.vue.d.ts +4 -4
- package/dist/types/vue/src/components/Toggle.vue.d.ts +4 -4
- package/dist/types/vue/src/components/Toolbar.test.d.ts +1 -0
- package/dist/types/vue/src/components/Toolbar.vue.d.ts +62 -0
- package/dist/types/vue/src/components/Tooltip.test.d.ts +1 -0
- package/dist/types/vue/src/components/Tooltip.vue.d.ts +20 -3
- package/dist/types/vue/src/components/TooltipWrapper.vue.d.ts +24 -3
- package/dist/types/vue/src/components/TreeView/TreeFlowSvg.vue.d.ts +5 -5
- package/dist/types/vue/src/components/TreeView/TreeItemRow.vue.d.ts +2 -2
- package/dist/types/vue/src/components/TreeView/TreeView.vue.d.ts +4 -4
- package/dist/types/vue/src/components/UserAvatar.test.d.ts +1 -0
- package/dist/types/vue/src/components/UserAvatar.vue.d.ts +56 -6
- package/dist/types/vue/src/components/VariablePicker.vue.d.ts +23 -6
- package/dist/types/vue/src/components/__dbg.test.d.ts +1 -0
- package/dist/types/vue/src/components/index.d.ts +50 -31
- package/dist/types/vue/src/components/internal/InfoRowContent.vue.d.ts +52 -0
- package/dist/types/vue/src/components/internal/PagedPanelContent.vue.d.ts +47 -0
- package/dist/types/vue/src/connectionFlow/index.d.ts +1 -0
- package/dist/types/vue/src/contexts/IconContext.d.ts +8 -3
- package/dist/types/vue/src/i18n/I18nContext.d.ts +14 -0
- package/dist/types/vue/src/i18n/I18nProvider.test.d.ts +2 -0
- package/dist/types/vue/src/i18n/I18nProvider.vue.d.ts +35 -0
- package/dist/types/vue/src/i18n/index.d.ts +8 -0
- package/dist/types/vue/src/i18n/kit-components-spot.test.d.ts +1 -0
- package/dist/types/vue/src/i18n/useI18n.d.ts +44 -0
- package/dist/types/vue/src/index.d.ts +2 -2
- package/dist/types/vue/src/test-setup.d.ts +5 -0
- package/dist/types/vue/src/types/Icon.d.ts +11 -2
- package/dist/types/vue/src/types/TableSettings.d.ts +1 -0
- package/dist/types/vue/src/types/index.d.ts +1 -0
- package/dist/types/vue/src/utils/index.d.ts +1 -0
- package/dist/types/vue/src/utils/sanitizeSvg.d.ts +1 -0
- package/dist/types/vue/src/utils/tableStorage.d.ts +1 -0
- package/dist/ui-kit-vue.css +1 -1
- package/package.json +8 -3
|
@@ -1,15 +1,589 @@
|
|
|
1
|
-
|
|
1
|
+
import { type GlassOpacity } from "./glass";
|
|
2
|
+
export declare const BUTTON_VARIANTS: readonly ["solid", "soft", "outline", "ghost", "link", "clear", "icon", "glass"];
|
|
3
|
+
export type ButtonVariant = (typeof BUTTON_VARIANTS)[number];
|
|
4
|
+
/** Label weight. Derived from the runtime list for the same reason. */
|
|
5
|
+
export declare const BUTTON_WEIGHTS: readonly ["normal", "medium", "semibold", "bold"];
|
|
6
|
+
export type ButtonWeight = (typeof BUTTON_WEIGHTS)[number];
|
|
7
|
+
/**
|
|
8
|
+
* The 21 Tailwind palette colours the kit supports.
|
|
9
|
+
*
|
|
10
|
+
* `TrueColor` is derived from this array rather than declared alongside it, so
|
|
11
|
+
* the runtime list and the type can never drift — adding a colour here adds it
|
|
12
|
+
* to the type, the generated theme, and every consumer that enumerates colours.
|
|
13
|
+
*/
|
|
14
|
+
export declare const TRUE_COLORS: readonly ["red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "rose", "slate", "gray", "zinc", "neutral", "stone"];
|
|
2
15
|
/**
|
|
3
16
|
* TrueColor is the only valid color type in the ui-kit theme system.
|
|
4
|
-
* It comprises 21 Tailwind palette color names (red through stone, including fuchsia and rose).
|
|
5
17
|
* All components, tokens, and utilities must use TrueColor exclusively.
|
|
6
18
|
*/
|
|
7
|
-
export type TrueColor =
|
|
19
|
+
export type TrueColor = (typeof TRUE_COLORS)[number];
|
|
20
|
+
/**
|
|
21
|
+
* The fill class for a dot/swatch of each TrueColor: the 500 step in light
|
|
22
|
+
* mode, the 400 step in dark. Literal per colour — never interpolated — so
|
|
23
|
+
* Tailwind's scanner always sees them; the helper is what components share.
|
|
24
|
+
*/
|
|
25
|
+
export declare const TRUE_COLOR_DOT_CLASSES: Record<TrueColor, string>;
|
|
26
|
+
/** Dot/swatch fill for a TrueColor. */
|
|
27
|
+
export declare function getTrueColorDotClass(tone: TrueColor): string;
|
|
28
|
+
/**
|
|
29
|
+
* The ink class for a TrueColor: the 500 step in light mode, the 400 step
|
|
30
|
+
* in dark — what SVG strokes (`stroke-current`) and legends use where a
|
|
31
|
+
* fill class would not apply. Literal per colour, as above.
|
|
32
|
+
*/
|
|
33
|
+
export declare const TRUE_COLOR_TEXT_CLASSES: Record<TrueColor, string>;
|
|
34
|
+
/** Ink (stroke/text) class for a TrueColor. */
|
|
35
|
+
export declare function getTrueColorTextClass(tone: TrueColor): string;
|
|
8
36
|
/**
|
|
9
37
|
* Shared size type used across all frameworks and components.
|
|
10
38
|
* Replaces both the old ThemeSize (dead code) and ModalSize.
|
|
11
39
|
*/
|
|
12
40
|
export type Size = "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "2xl" | "3xl" | "full";
|
|
41
|
+
/**
|
|
42
|
+
* The size scale every interactive control shares. Derived from the runtime
|
|
43
|
+
* list so the two cannot drift, and so demos/docs can enumerate it.
|
|
44
|
+
*/
|
|
45
|
+
export declare const CONTROL_SIZES: readonly ["xs", "sm", "md", "lg", "xl"];
|
|
46
|
+
export type ControlSize = (typeof CONTROL_SIZES)[number];
|
|
47
|
+
/**
|
|
48
|
+
* The two layouts a linear control can take.
|
|
49
|
+
*
|
|
50
|
+
* This union was declared independently in `Slider`, `Rating`, `AppDivider`,
|
|
51
|
+
* `Stepper` and `Tabs` (five names for one scale), so a rename or addition in
|
|
52
|
+
* the theme would never reach any of them. It lives here once; each control
|
|
53
|
+
* keeps its own alias (`SliderOrientation`, …) so call sites and the barrels
|
|
54
|
+
* are unaffected.
|
|
55
|
+
*/
|
|
56
|
+
export declare const ORIENTATIONS: readonly ["horizontal", "vertical"];
|
|
57
|
+
export type Orientation = (typeof ORIENTATIONS)[number];
|
|
58
|
+
/**
|
|
59
|
+
* The geometry of an interactive control at each shared size.
|
|
60
|
+
*
|
|
61
|
+
* Every control in the trigger family needs the same answer to "how big is the
|
|
62
|
+
* icon, the box, the spinner at this size". That table was copy-pasted into
|
|
63
|
+
* `Button` (text padding, icon-only padding, icon and spinner sizes) and
|
|
64
|
+
* `IconButton` (square box, icon, `<Spinner>` size) — two copies of one scale,
|
|
65
|
+
* drifting independently. It lives here once; the components import it.
|
|
66
|
+
*/
|
|
67
|
+
export type ControlSizeTokens = {
|
|
68
|
+
/** Font size and padding of a labelled control. */
|
|
69
|
+
text: string;
|
|
70
|
+
/** Padding of a square (icon-only) control. */
|
|
71
|
+
iconOnly: string;
|
|
72
|
+
/** Fixed box of a square control (`IconButton`). */
|
|
73
|
+
box: string;
|
|
74
|
+
/** Space between an icon and its label. */
|
|
75
|
+
gap: string;
|
|
76
|
+
/** Icon dimensions at this control size — identical across controls. */
|
|
77
|
+
icon: string;
|
|
78
|
+
/** Dimensions of the inline spinner inside a labelled control. */
|
|
79
|
+
spinner: string;
|
|
80
|
+
/** Size to pass to `<Spinner>` inside a square control. */
|
|
81
|
+
spinnerSize: ControlSize;
|
|
82
|
+
};
|
|
83
|
+
export declare const getControlSizeTokens: (size: ControlSize) => ControlSizeTokens;
|
|
84
|
+
/**
|
|
85
|
+
* The corner radius every trigger-family control shares, so a `Button` next to
|
|
86
|
+
* an `Input` is the same box (both `rounded-lg`). Panel-family containers use
|
|
87
|
+
* `DEFAULT_SURFACE_CORNER` instead — a different scale, deliberately.
|
|
88
|
+
*/
|
|
89
|
+
export declare const DEFAULT_TRIGGER_CORNER = "rounded-lg";
|
|
90
|
+
/**
|
|
91
|
+
* Strength of a decorative glow behind a control (currently `SearchBar`'s
|
|
92
|
+
* gradient variant).
|
|
93
|
+
*/
|
|
94
|
+
export declare const GLOW_INTENSITIES: readonly ["subtle", "soft", "medium", "strong"];
|
|
95
|
+
export type GlowIntensity = (typeof GLOW_INTENSITIES)[number];
|
|
96
|
+
/**
|
|
97
|
+
* The kit's standing glow intensity: the tone reads as a hint at rest and
|
|
98
|
+
* the field itself brightens it on focus — the glow should never be the
|
|
99
|
+
* loudest thing in a form. Gradient fields destructure this as their prop
|
|
100
|
+
* default, and `getGlowTokens` falls back to it.
|
|
101
|
+
*/
|
|
102
|
+
export declare const DEFAULT_GLOW_INTENSITY: GlowIntensity;
|
|
103
|
+
/**
|
|
104
|
+
* Surface treatments shared by every text-entry control — `Input`, `Textarea`,
|
|
105
|
+
* `SearchBar`. Defined once here so the three are the same box when they sit
|
|
106
|
+
* next to each other in a form.
|
|
107
|
+
*/
|
|
108
|
+
export declare const INPUT_VARIANTS: readonly ["flat", "elevated", "ghost", "underline", "glass", "gradient"];
|
|
109
|
+
export type InputVariant = (typeof INPUT_VARIANTS)[number];
|
|
110
|
+
export type InputVariantTokens = {
|
|
111
|
+
/** Border, fill, radius, shadow, backdrop. */
|
|
112
|
+
surface: string;
|
|
113
|
+
/** Text and placeholder colours. */
|
|
114
|
+
text: string;
|
|
115
|
+
/** Resting colour for a leading icon or other adornment. */
|
|
116
|
+
icon: string;
|
|
117
|
+
/** True when the surface is see-through and sits over unknown content. */
|
|
118
|
+
translucent: boolean;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* The variant's surface with its border colour removed, keeping the width and
|
|
122
|
+
* sides.
|
|
123
|
+
*
|
|
124
|
+
* A validation state paints its own border colour, and `border-rose-500`
|
|
125
|
+
* beside the variant's `border-neutral-300` is a same-specificity collision
|
|
126
|
+
* whose winner is emission order — measured in the built stylesheet,
|
|
127
|
+
* `.border-emerald-500` lands *before* `.border-neutral-300` and
|
|
128
|
+
* `.border-rose-500` after it, so an errored field turned rose and a
|
|
129
|
+
* successful one stayed grey. Strip the colour so only one class can apply.
|
|
130
|
+
*/
|
|
131
|
+
export declare const stripBorderColor: (surface: string) => string;
|
|
132
|
+
/** True when a caller-supplied class string sets a text colour of its own. */
|
|
133
|
+
export declare const hasTextColor: (className?: string) => boolean;
|
|
134
|
+
/**
|
|
135
|
+
* A class string with its text colour removed.
|
|
136
|
+
*
|
|
137
|
+
* Same trap as `stripBorderColor`: a component's own `text-neutral-500` and a
|
|
138
|
+
* caller's `text-emerald-600` are the same specificity, so the winner is
|
|
139
|
+
* emission order in the built stylesheet — which means a documented override
|
|
140
|
+
* works for some colours and silently does nothing for others.
|
|
141
|
+
*/
|
|
142
|
+
export declare const stripTextColor: (className: string) => string;
|
|
143
|
+
/**
|
|
144
|
+
* The field surface tokens. `corner="auto"` (the default) leaves the radius
|
|
145
|
+
* baked into the surface in place — `rounded-lg`, the theme's control corner
|
|
146
|
+
* (`DEFAULT_CONTROL_CORNER`), one step looser than the container default so
|
|
147
|
+
* a field sits proud of the card it lives in. Any other corner token
|
|
148
|
+
* replaces it. (`underline` paints no box, so a corner there has nowhere
|
|
149
|
+
* to land — honestly no-op.)
|
|
150
|
+
*/
|
|
151
|
+
export declare const getInputVariantTokens: (variant: InputVariant, tone?: TrueColor, corner?: SurfaceCorner) => InputVariantTokens;
|
|
152
|
+
export type FieldToneTokens = {
|
|
153
|
+
/** Border colour while anything inside the field has focus. */
|
|
154
|
+
focusBorder: string;
|
|
155
|
+
/** Glow ring while anything inside the field has focus. */
|
|
156
|
+
focusRing: string;
|
|
157
|
+
/** Leading/trailing icon colour while the field has focus. */
|
|
158
|
+
icon: string;
|
|
159
|
+
/** Focus ring for an inline trailing button. */
|
|
160
|
+
buttonFocusRing: string;
|
|
161
|
+
};
|
|
162
|
+
export declare const getFieldToneTokens: (color: TrueColor) => FieldToneTokens;
|
|
163
|
+
export type FieldSizeTokens = {
|
|
164
|
+
px: string;
|
|
165
|
+
py: string;
|
|
166
|
+
/** `underline` has no box to inset from, and needs room above the rule. */
|
|
167
|
+
underlinePy: string;
|
|
168
|
+
text: string;
|
|
169
|
+
icon: ControlSize;
|
|
170
|
+
/** Inline trailing button. */
|
|
171
|
+
button: string;
|
|
172
|
+
};
|
|
173
|
+
/** Padding and type scale, so any two fields line up when stacked. */
|
|
174
|
+
export declare const FIELD_SIZE_STYLES: Record<ControlSize, FieldSizeTokens>;
|
|
175
|
+
export declare const getFieldSizeTokens: (size: ControlSize) => FieldSizeTokens;
|
|
176
|
+
/**
|
|
177
|
+
* Border only at rest; the ring is part of the focus state, exactly as it is
|
|
178
|
+
* for the tone tokens. A status used to add a bare `ring-2 ring-inset` at rest
|
|
179
|
+
* with no ring *colour* — an unset ring colour resolves to `currentColor`, so
|
|
180
|
+
* every errored or successful field carried a near-black 2px halo inside its
|
|
181
|
+
* coloured border.
|
|
182
|
+
*
|
|
183
|
+
* These also carry no copy colour. Forcing `text-neutral-900 dark:text-neutral-100`
|
|
184
|
+
* alongside the border costs an errored `underline` or `glass` field the
|
|
185
|
+
* high-contrast pair it needs to stay legible over a backdrop.
|
|
186
|
+
*/
|
|
187
|
+
export declare const FIELD_STATUS_CLASSES: Record<"error" | "success", string>;
|
|
188
|
+
/**
|
|
189
|
+
* Surface treatments for containers — `Panel` and anything built on it
|
|
190
|
+
* (`FormSection`). Kept here so the type and the text that sits on those
|
|
191
|
+
* surfaces are defined once, not per component.
|
|
192
|
+
*/
|
|
193
|
+
export declare const SURFACE_VARIANTS: readonly ["elevated", "outlined", "subtle", "tonal", "default", "glass", "simple", "liquid-glass"];
|
|
194
|
+
export type SurfaceVariant = (typeof SURFACE_VARIANTS)[number];
|
|
195
|
+
/**
|
|
196
|
+
* The button a card surface implies — what a card CTA wears when it is not
|
|
197
|
+
* given a variant of its own. An outlined card offers an outlined button.
|
|
198
|
+
*/
|
|
199
|
+
export declare const SURFACE_TO_BUTTON_VARIANT: Record<SurfaceVariant, ButtonVariant>;
|
|
200
|
+
/**
|
|
201
|
+
* The surface family plus `plain` — "draw a card, or draw nothing at all".
|
|
202
|
+
*
|
|
203
|
+
* A control that may already sit inside a card the app owns needs a way to say
|
|
204
|
+
* "no surface of my own"; nine components had each spelled that out for
|
|
205
|
+
* themselves (`PanelVariant | "plain"` seven times, `[...SURFACE_VARIANTS,
|
|
206
|
+
* "plain"]` twice) and only one of them exported a runtime list, so demos could
|
|
207
|
+
* not enumerate the others. Same list, nine names: the day `SURFACE_VARIANTS`
|
|
208
|
+
* gains a member, eight of them keep working only by luck.
|
|
209
|
+
*/
|
|
210
|
+
export declare const PLAIN_SURFACE_VARIANTS: readonly ["elevated", "outlined", "subtle", "tonal", "default", "glass", "simple", "liquid-glass", "plain"];
|
|
211
|
+
export type PlainSurfaceVariant = (typeof PLAIN_SURFACE_VARIANTS)[number];
|
|
212
|
+
export type SurfaceTextTokens = {
|
|
213
|
+
/** Section and card headings. */
|
|
214
|
+
heading: string;
|
|
215
|
+
/** Body copy. */
|
|
216
|
+
body: string;
|
|
217
|
+
/** Secondary copy — descriptions under a label. */
|
|
218
|
+
description: string;
|
|
219
|
+
/** Tertiary copy — hints, counters, "optional" markers. */
|
|
220
|
+
muted: string;
|
|
221
|
+
/** Hairline between regions of the surface. */
|
|
222
|
+
divider: string;
|
|
223
|
+
translucent: boolean;
|
|
224
|
+
};
|
|
225
|
+
export declare const getSurfaceTextTokens: (variant: SurfaceVariant) => SurfaceTextTokens;
|
|
226
|
+
/**
|
|
227
|
+
* A full-bleed interactive region on a container surface — a disclosure header,
|
|
228
|
+
* a clickable card row.
|
|
229
|
+
*
|
|
230
|
+
* Two rules learned the hard way, both encoded here so callers cannot get them
|
|
231
|
+
* wrong: a ring colour is inert without a ring *width*, and an outer ring is
|
|
232
|
+
* clipped by any ancestor with `overflow: hidden` (which every `Panel` has), so
|
|
233
|
+
* the ring is inset.
|
|
234
|
+
*/
|
|
235
|
+
export type SurfaceTriggerTokens = {
|
|
236
|
+
/** Background wash on hover. Low-alpha, so it works on glass too. */
|
|
237
|
+
hover: string;
|
|
238
|
+
/** Complete focus indicator: outline reset, width, inset, colour. */
|
|
239
|
+
focusRing: string;
|
|
240
|
+
};
|
|
241
|
+
export declare const getSurfaceTriggerTokens: (color: TrueColor) => SurfaceTriggerTokens;
|
|
242
|
+
/**
|
|
243
|
+
* The `CollapsibleHelpText` trigger — the shared surface-trigger tokens plus
|
|
244
|
+
* the accent glyph, icon chip and title line.
|
|
245
|
+
*
|
|
246
|
+
* The accent sits ON a same-hue `bg-{c}-50` chip, so it steps to the 700
|
|
247
|
+
* light shade rather than the usual 600: hue stacked on its own 50 shade is
|
|
248
|
+
* where 600 dropped under the 3:1 non-text bar (yellow landed ≈2.5:1).
|
|
249
|
+
*/
|
|
250
|
+
export type CollapsibleHelpToneTokens = SurfaceTriggerTokens & {
|
|
251
|
+
/** Chevron and icon glyph. */
|
|
252
|
+
accent: string;
|
|
253
|
+
/** Icon chip fill. */
|
|
254
|
+
iconBg: string;
|
|
255
|
+
/** Title line. */
|
|
256
|
+
title: string;
|
|
257
|
+
};
|
|
258
|
+
export declare const getCollapsibleHelpToneTokens: (color: TrueColor) => CollapsibleHelpToneTokens;
|
|
259
|
+
export declare const getAppDividerToneTokens: (color: TrueColor) => string;
|
|
260
|
+
/**
|
|
261
|
+
* Corner radius scale for container surfaces.
|
|
262
|
+
*
|
|
263
|
+
* The token names are historical and do NOT map 1:1 onto Tailwind's radius
|
|
264
|
+
* utilities — `rounded-sm` here is Tailwind's `rounded-lg`. They are kept as
|
|
265
|
+
* they are because the whole kit already calls them by these names and the
|
|
266
|
+
* scale itself is monotonic and correct; renaming would silently reshape every
|
|
267
|
+
* existing card. `getSurfaceCornerRem` exposes the real radius so a demo can
|
|
268
|
+
* label them honestly.
|
|
269
|
+
*
|
|
270
|
+
* Capsule radii (`rounded-full` / `pill`) are not part of the container scale:
|
|
271
|
+
* a capsule is a shape, and the `Pill` component owns it. Containers that need
|
|
272
|
+
* one take a `rounded-full` class directly.
|
|
273
|
+
*/
|
|
274
|
+
export declare const SURFACE_CORNERS: readonly ["auto", "none", "rounded", "rounded-sm", "rounded-md", "rounded-lg", "rounded-xl"];
|
|
275
|
+
export type SurfaceCorner = (typeof SURFACE_CORNERS)[number];
|
|
276
|
+
/** The radius a container uses when the caller does not pick one. */
|
|
277
|
+
export declare const DEFAULT_SURFACE_CORNER: Exclude<SurfaceCorner, "auto">;
|
|
278
|
+
/**
|
|
279
|
+
* The radius a control uses when the caller does not pick one — the
|
|
280
|
+
* input/button/segment scale, one step looser than the container default
|
|
281
|
+
* (`rounded-md` → `rounded-lg`) on purpose, so a control sits visibly proud
|
|
282
|
+
* of the card it lives in. Components whose docs say "the control corner
|
|
283
|
+
* from the theme" take this.
|
|
284
|
+
*/
|
|
285
|
+
export declare const DEFAULT_CONTROL_CORNER: Exclude<SurfaceCorner, "auto">;
|
|
286
|
+
/**
|
|
287
|
+
* The container surface a field implies — used by composite controls (the
|
|
288
|
+
* `DatePicker` calendar's `panelVariant="auto"`) so their furniture reads as
|
|
289
|
+
* part of the field instead of a foreign surface dropped beside it. Field
|
|
290
|
+
* surfaces have no exact container twin, so this picks the nearest fit:
|
|
291
|
+
* `flat` is a bordered box → `outlined`; `elevated` and the lifted `gradient`
|
|
292
|
+
* → `elevated`; `ghost`/`underline` carry no box, so `subtle`; `glass` →
|
|
293
|
+
* `glass`. (Deliberately not `tonal`/`simple` — the hover-filled tints read
|
|
294
|
+
* as chrome, not as a floating calendar.)
|
|
295
|
+
*/
|
|
296
|
+
export declare const SURFACE_VARIANT_FOR_FIELD: Record<InputVariant, SurfaceVariant>;
|
|
297
|
+
/**
|
|
298
|
+
* The surface variants that *are* glass — the ones where chrome has to sit
|
|
299
|
+
* *in* glass rather than on it. Every composite (calendar panels, array
|
|
300
|
+
* cards, the variable picker) used to keep its own copy of this two-item
|
|
301
|
+
* list, which is exactly how one of them ends up rendering a solid button
|
|
302
|
+
* on a blurred card.
|
|
303
|
+
*/
|
|
304
|
+
export declare const isGlassSurface: (variant: PlainSurfaceVariant) => boolean;
|
|
305
|
+
/** The panel tone that follows a field: the field keeps its accent as the
|
|
306
|
+
* selected-day tint either way, so the fill takes the neutral default. */
|
|
307
|
+
export declare const PANEL_TONE_FOR_FIELD: "neutral";
|
|
308
|
+
/**
|
|
309
|
+
* The field surface a container implies — the reverse pairing: composite
|
|
310
|
+
* controls whose rows of inputs sit *inside* a card (the `KeyValueArrayField`)
|
|
311
|
+
* take their inputs' variant from the card so nothing reads as slabs punched
|
|
312
|
+
* through it (`"auto"`). It is SplitView's search mapping, generalised: boxed
|
|
313
|
+
* surfaces carry bordered `flat` fields, tinted ones the boxless `ghost`,
|
|
314
|
+
* glass needs glass, and a plain (cardless) host gives the default field.
|
|
315
|
+
*/
|
|
316
|
+
export declare const INPUT_VARIANT_FOR_SURFACE: Record<PlainSurfaceVariant, InputVariant>;
|
|
317
|
+
/**
|
|
318
|
+
* The tone a surface takes when the caller does not pick one. Every surface
|
|
319
|
+
* component — `Panel` and its wrappers — resolves to this same constant, so a
|
|
320
|
+
* default cannot be restated wrongly in one of them.
|
|
321
|
+
*/
|
|
322
|
+
export declare const DEFAULT_SURFACE_TONE: TrueColor;
|
|
323
|
+
/**
|
|
324
|
+
* The `EmptyState` size for a pane that has its own header — a `Panel`
|
|
325
|
+
* sibling like `PagedPanel` or `TagPanel`. `EmptyState`'s own scale is tuned
|
|
326
|
+
* for full-page views (its `md` is a text-lg title with an h-12 disc), so
|
|
327
|
+
* inside a pane the empty/error state must never outgrow the pane's header:
|
|
328
|
+
* pick it at least two steps under the pane's control size.
|
|
329
|
+
*/
|
|
330
|
+
/**
|
|
331
|
+
* The expand/retract cascade shared by the kit's unfolding collections —
|
|
332
|
+
* `ColorSwatches`, `TagPanel`: a left-to-right step per item opening, a
|
|
333
|
+
* swifter reverse ripple closing, and a hold long enough for the fade to
|
|
334
|
+
* finish before the condensed geometry commits.
|
|
335
|
+
*/
|
|
336
|
+
export declare const CASCADE_EXPAND: {
|
|
337
|
+
/** Per-item cascade step, expanding. */
|
|
338
|
+
readonly stepMs: 20;
|
|
339
|
+
/** Per-item step, retracting — swift, right to left. */
|
|
340
|
+
readonly retractStepMs: 8;
|
|
341
|
+
/** How long the expanded layout is held while items step away. */
|
|
342
|
+
readonly holdMs: 300;
|
|
343
|
+
/** How long the clip takes to grow. */
|
|
344
|
+
readonly growMs: 400;
|
|
345
|
+
};
|
|
346
|
+
export declare const PANE_EMPTY_STATE_SIZE: Record<ControlSize, ControlSize>;
|
|
347
|
+
export declare const getSurfaceCornerClass: (corner: SurfaceCorner) => string;
|
|
348
|
+
export declare const getSurfaceCornerRem: (corner: SurfaceCorner) => string;
|
|
349
|
+
/**
|
|
350
|
+
* Container padding, on the same scale every control uses plus a `none` step,
|
|
351
|
+
* so a Panel's padding and the Button inside it are described in one language.
|
|
352
|
+
*/
|
|
353
|
+
export declare const SURFACE_PADDINGS: readonly ["none", "xs", "sm", "md", "lg", "xl"];
|
|
354
|
+
export type SurfacePadding = "none" | ControlSize;
|
|
355
|
+
/**
|
|
356
|
+
* The header seam. `SideMenu` draws it below its logo block, and `PageHeader`
|
|
357
|
+
* continues it into the main column; both paint these same classes on their
|
|
358
|
+
* facing edges, so the horizontal line the user sees crossing the shell is
|
|
359
|
+
* spelled exactly once. A component that rounded, padded or recoloured past
|
|
360
|
+
* these would visibly break the seam where the two meet.
|
|
361
|
+
*/
|
|
362
|
+
export declare const SIDE_MENU_HEADER_HEIGHT = "h-15";
|
|
363
|
+
export declare const SIDE_MENU_HEADER_SEAM = "border-neutral-200 dark:border-neutral-700";
|
|
364
|
+
export declare const SIDE_MENU_HEADER_FILL = "bg-white dark:bg-neutral-900";
|
|
365
|
+
/**
|
|
366
|
+
* The webkit scrollbar paint every native scroller in the kit shares — a thin
|
|
367
|
+
* rounded thumb on a transparent track. These live here as complete literals
|
|
368
|
+
* (Tailwind extracts them from this file) so no component re-derives the
|
|
369
|
+
* recipe and quietly drifts a shade.
|
|
370
|
+
*
|
|
371
|
+
* Two tiers, one shade apart:
|
|
372
|
+
* - `THIN_SCROLLBAR` for card and panel bodies, where the surface itself
|
|
373
|
+
* frames the gutter.
|
|
374
|
+
* - `THIN_SCROLLBAR_FIELD` steps the thumb one shade darker for white
|
|
375
|
+
* popovers, inputs and bare scroll regions, where the panel-tier thumb
|
|
376
|
+
* disappears against the field.
|
|
377
|
+
*
|
|
378
|
+
* Scrollers that also scroll horizontally add their own
|
|
379
|
+
* `[&::-webkit-scrollbar]:h-*` alongside the constant. `ScrollArea`
|
|
380
|
+
* deliberately opts out — it hides the native scrollbar and paints its own
|
|
381
|
+
* overlay thumb.
|
|
382
|
+
*/
|
|
383
|
+
export declare const THIN_SCROLLBAR = "[&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-neutral-200 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-700 hover:[&::-webkit-scrollbar-thumb]:bg-neutral-300 dark:hover:[&::-webkit-scrollbar-thumb]:bg-neutral-600 [&::-webkit-scrollbar-track]:bg-transparent";
|
|
384
|
+
export declare const THIN_SCROLLBAR_FIELD = "[&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-neutral-300 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-600 hover:[&::-webkit-scrollbar-thumb]:bg-neutral-400 dark:hover:[&::-webkit-scrollbar-thumb]:bg-neutral-500 [&::-webkit-scrollbar-track]:bg-transparent";
|
|
385
|
+
/** The padding a container uses when the caller does not pick one. */
|
|
386
|
+
export declare const DEFAULT_SURFACE_PADDING: SurfacePadding;
|
|
387
|
+
export declare const getSurfacePaddingClass: (padding: SurfacePadding) => string;
|
|
388
|
+
/** Every padding token but `none`, for the callers that require a real inset. */
|
|
389
|
+
export declare const getSurfacePaddingClasses: () => Record<SurfacePadding, string>;
|
|
390
|
+
/**
|
|
391
|
+
* The tones that read as "no tint". Consumers that tint chrome per tone
|
|
392
|
+
* (Table's header band, for instance) route these through the neutral
|
|
393
|
+
* treatment instead of painting a grey-blue header.
|
|
394
|
+
*/
|
|
395
|
+
export declare const NEUTRAL_TONES: TrueColor[];
|
|
396
|
+
/**
|
|
397
|
+
* Cell density for data grids. Deliberately orthogonal to the surface
|
|
398
|
+
* variant: the variant decides how the container is drawn, the density how
|
|
399
|
+
* tight the cells inside it sit. A compact table on glass must read the same
|
|
400
|
+
* as a compact table on an outlined card.
|
|
401
|
+
*/
|
|
402
|
+
export declare const TABLE_DENSITIES: readonly ["default", "compact", "minimal"];
|
|
403
|
+
export type TableDensity = (typeof TABLE_DENSITIES)[number];
|
|
404
|
+
export type TableDensityTokens = {
|
|
405
|
+
/** Padding + text size for body and header cells. */
|
|
406
|
+
cell: string;
|
|
407
|
+
/** Leading cell of a row (overrides `cell`'s left padding). */
|
|
408
|
+
sideLeft: string;
|
|
409
|
+
/** Trailing cell of a row (overrides `cell`'s right padding). */
|
|
410
|
+
sideRight: string;
|
|
411
|
+
/** Vertical padding inside the cell's inner flex wrapper. */
|
|
412
|
+
contentVertical: string;
|
|
413
|
+
};
|
|
414
|
+
export declare const getTableDensityTokens: (density: TableDensity) => TableDensityTokens;
|
|
415
|
+
/**
|
|
416
|
+
* Geometry and opacity of the `gradient` variant's glow.
|
|
417
|
+
*
|
|
418
|
+
* `pad` is reserved on the control's own wrapper and `inset` positions the glow
|
|
419
|
+
* inside it, so the halo is drawn **within the control's layout box**. Painting
|
|
420
|
+
* it outside — the obvious way — means any ancestor with `overflow: auto`
|
|
421
|
+
* clips it, and `Panel`'s body is `overflow-auto` by default. Same rule as the
|
|
422
|
+
* inset focus ring.
|
|
423
|
+
*/
|
|
424
|
+
export type GlowTokens = {
|
|
425
|
+
/**
|
|
426
|
+
* Padding on the wrapper — sized so the shadow's full reach (offset +
|
|
427
|
+
* spread + blur/2) lands inside the box, where no clipping ancestor can
|
|
428
|
+
* slice the glow.
|
|
429
|
+
*/
|
|
430
|
+
pad: string;
|
|
431
|
+
/** Positions the emitter exactly over the field, inside the pad. */
|
|
432
|
+
inset: string;
|
|
433
|
+
/** Shadow blur radius in px. */
|
|
434
|
+
blur: number;
|
|
435
|
+
/** Shadow spread in px. */
|
|
436
|
+
spread: number;
|
|
437
|
+
/** How far apart the two colour lobes sit, in px — the gradient axis. */
|
|
438
|
+
offset: number;
|
|
439
|
+
idleOpacity: number;
|
|
440
|
+
focusOpacity: number;
|
|
441
|
+
};
|
|
442
|
+
export declare const getGlowTokens: (intensity: GlowIntensity) => GlowTokens;
|
|
443
|
+
/**
|
|
444
|
+
* Glow gradient stops: the tone's 600 and 400 shades, read from Tailwind's own
|
|
445
|
+
* custom properties rather than a hard-coded hex table.
|
|
446
|
+
*/
|
|
447
|
+
export declare const resolveGlowGradient: (tone: TrueColor, from?: string, to?: string) => [string, string];
|
|
448
|
+
/**
|
|
449
|
+
* Surface treatments for the `SideMenu` container.
|
|
450
|
+
*
|
|
451
|
+
* `sidebar` is the kit's standing look (a translucent blur pushed into the
|
|
452
|
+
* layout), `inset` is a flat panel with a hairline on the content edge,
|
|
453
|
+
* `floating` is a detached rounded card, `floating-glass` is that card in the
|
|
454
|
+
* kit's liquid-glass language, and `glass` is the liquid-glass language flush
|
|
455
|
+
* in the layout — both glass treatments are tinted with the menu's tone. The
|
|
456
|
+
* rows inside a menu take the matching treatment automatically.
|
|
457
|
+
*/
|
|
458
|
+
export declare const SIDEBAR_VARIANTS: readonly ["sidebar", "inset", "floating", "floating-glass", "glass"];
|
|
459
|
+
export type SidebarVariant = (typeof SIDEBAR_VARIANTS)[number];
|
|
460
|
+
/**
|
|
461
|
+
* How a `SideMenu` collapses on desktop.
|
|
462
|
+
*
|
|
463
|
+
* `icon` shrinks it to an icon rail, `offcanvas` removes the panel from the
|
|
464
|
+
* layout entirely (a small handle at the edge opens it again), and `none`
|
|
465
|
+
* makes the panel non-collapsible.
|
|
466
|
+
*/
|
|
467
|
+
export declare const SIDEBAR_COLLAPSIBLE_MODES: readonly ["icon", "offcanvas", "none"];
|
|
468
|
+
export type SidebarCollapsible = (typeof SIDEBAR_COLLAPSIBLE_MODES)[number];
|
|
469
|
+
/** Which edge of the layout the `SideMenu` sits on. */
|
|
470
|
+
export declare const SIDEBAR_SIDES: readonly ["left", "right"];
|
|
471
|
+
export type SidebarSide = (typeof SIDEBAR_SIDES)[number];
|
|
472
|
+
/**
|
|
473
|
+
* The media query at which a responsive `SideMenu` becomes an offcanvas
|
|
474
|
+
* overlay (below it) instead of using its desktop collapsible mode (above it).
|
|
475
|
+
*/
|
|
476
|
+
export declare const SIDEBAR_MOBILE_QUERY = "(max-width: 1023px)";
|
|
477
|
+
export interface SideMenuItemTokens {
|
|
478
|
+
/** Fill of the active row. */
|
|
479
|
+
bg: string;
|
|
480
|
+
/** Copy of the active row. */
|
|
481
|
+
text: string;
|
|
482
|
+
/** Wash under the cursor on an idle row. */
|
|
483
|
+
hoverBg: string;
|
|
484
|
+
/** Copy of an idle row under the cursor. */
|
|
485
|
+
hoverText: string;
|
|
486
|
+
/** Icon of the active row. */
|
|
487
|
+
iconActive: string;
|
|
488
|
+
/** Icon of an idle row under the cursor. */
|
|
489
|
+
iconHover: string;
|
|
490
|
+
}
|
|
491
|
+
export declare const getSideMenuItemTokens: (color: TrueColor) => SideMenuItemTokens;
|
|
492
|
+
/**
|
|
493
|
+
* Resting copy for an idle `SideMenu` row, per surface context.
|
|
494
|
+
*
|
|
495
|
+
* A see-through surface composites over unknown content, so the light end of
|
|
496
|
+
* the neutral scale disappears on it — the same two-step rule as
|
|
497
|
+
* `getSurfaceTextTokens`.
|
|
498
|
+
*/
|
|
499
|
+
export declare const SIDEBAR_IDLE_COPY: {
|
|
500
|
+
readonly solid: {
|
|
501
|
+
readonly text: "text-neutral-600 dark:text-neutral-400";
|
|
502
|
+
readonly icon: "text-neutral-400 dark:text-neutral-500";
|
|
503
|
+
};
|
|
504
|
+
readonly glass: {
|
|
505
|
+
readonly text: "text-neutral-800 dark:text-neutral-100";
|
|
506
|
+
readonly icon: "text-neutral-600 dark:text-neutral-300";
|
|
507
|
+
};
|
|
508
|
+
};
|
|
509
|
+
export type SidebarIdleCopyKind = keyof typeof SIDEBAR_IDLE_COPY;
|
|
510
|
+
export interface SidebarSurfaceTokens {
|
|
511
|
+
/** Fill and blur of the layer painted behind the content. */
|
|
512
|
+
fill: string;
|
|
513
|
+
/**
|
|
514
|
+
* Opaque counterpart of `fill`, for states where the panel grows over other
|
|
515
|
+
* content (the hover-rail expansion) and must not show it through. A
|
|
516
|
+
* translucent `fill` there reads as a second, see-through layer.
|
|
517
|
+
*/
|
|
518
|
+
solidFill: string;
|
|
519
|
+
/** Edge treatment. Empty when the panel is flush and borderless. */
|
|
520
|
+
border: string;
|
|
521
|
+
/** Which edges carry the border: the content-facing one only, or all. */
|
|
522
|
+
borderSides: "start" | "all";
|
|
523
|
+
/** Shadow cast toward the content (left-side panel). */
|
|
524
|
+
shadow: string;
|
|
525
|
+
/** Shadow cast toward the content (right-side panel). */
|
|
526
|
+
shadowRight: string;
|
|
527
|
+
/** Corner radius. Empty when flush. */
|
|
528
|
+
radius: string;
|
|
529
|
+
/** Offset from the layout edges ("" = flush, a margin when detached). */
|
|
530
|
+
offset: string;
|
|
531
|
+
/** Whether the row copy needs the see-through contrast step. */
|
|
532
|
+
idleCopy: SidebarIdleCopyKind;
|
|
533
|
+
/** Hairline between regions of the panel (dividers, section seams). */
|
|
534
|
+
divider: string;
|
|
535
|
+
/** Tertiary copy — section titles, the empty-search note, idle glyphs. */
|
|
536
|
+
muted: string;
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* The container treatment for a `SideMenu` variant. The glass treatments are
|
|
540
|
+
* resolved from the shared glass module at the call site, so their fill is
|
|
541
|
+
* tinted with the menu's tone and cannot drift from `Panel`'s glass.
|
|
542
|
+
* `floating-glass` is the glass treatment with the floating card's geometry
|
|
543
|
+
* (offset, radius) layered on top.
|
|
544
|
+
*/
|
|
545
|
+
export declare const getSidebarSurfaceTokens: (variant: SidebarVariant, color: TrueColor) => SidebarSurfaceTokens;
|
|
546
|
+
/**
|
|
547
|
+
* The tone of a `Breadcrumb` — what the links turn into under the cursor,
|
|
548
|
+
* what the current crumb is painted with, and the ring a crumb focuses with.
|
|
549
|
+
*
|
|
550
|
+
* The copy pair follows the kit's contrast rule for text on the page
|
|
551
|
+
* background (the one `Button`'s `link` treatment follows): `-700` light —
|
|
552
|
+
* measured min 4.93:1 across the 21 tones — and `-300` dark. The old inline
|
|
553
|
+
* `-600`/`-400` hover pair was the mid-luminance band that whole rule exists
|
|
554
|
+
* to leave: `{c}-600` on white measured 2.94:1 on yellow.
|
|
555
|
+
*/
|
|
556
|
+
export type BreadcrumbToneTokens = {
|
|
557
|
+
/** Copy of a crumb under the cursor. */
|
|
558
|
+
hover: string;
|
|
559
|
+
/** Copy of the crumb that *is* the current page. */
|
|
560
|
+
current: string;
|
|
561
|
+
/** Focus ring of a crumb link, including its `focus-visible:` prefix. */
|
|
562
|
+
focusRing: string;
|
|
563
|
+
};
|
|
564
|
+
export declare const getBreadcrumbToneTokens: (color: TrueColor) => BreadcrumbToneTokens;
|
|
565
|
+
/**
|
|
566
|
+
* Geometry of a `Breadcrumb` at each shared control size.
|
|
567
|
+
*
|
|
568
|
+
* Anchored to the control scale — the text step is `getControlSizeTokens`'
|
|
569
|
+
* at every size — but the chip insets and icons are the compact versions of
|
|
570
|
+
* those steps, because a crumb is hierarchy copy that happens to be a link,
|
|
571
|
+
* not a control: the trigger-family paddings would space the trail wider
|
|
572
|
+
* than the sentence it sits in. Same precedent as the Toast size table.
|
|
573
|
+
*/
|
|
574
|
+
export type BreadcrumbSizeTokens = {
|
|
575
|
+
/** Crumb text size — the control scale's step. */
|
|
576
|
+
text: string;
|
|
577
|
+
/** Hit-area inset of the crumb chip. */
|
|
578
|
+
chip: string;
|
|
579
|
+
/** Space between a crumb's icon and its label. */
|
|
580
|
+
gap: string;
|
|
581
|
+
/** Icon dimensions. */
|
|
582
|
+
icon: string;
|
|
583
|
+
/** Separator glyph dimensions. */
|
|
584
|
+
separator: string;
|
|
585
|
+
};
|
|
586
|
+
export declare const getBreadcrumbSizeTokens: (size: ControlSize) => BreadcrumbSizeTokens;
|
|
13
587
|
type ButtonTheme = Record<ButtonVariant, Record<TrueColor, string>>;
|
|
14
588
|
type ButtonHoverTheme = Record<ButtonVariant, Record<TrueColor, string>>;
|
|
15
589
|
type ButtonActiveTheme = Record<ButtonVariant, Record<TrueColor, string>>;
|
|
@@ -50,6 +624,12 @@ type TabsColorTokens = {
|
|
|
50
624
|
type TabsTheme = Record<TrueColor, TabsColorTokens>;
|
|
51
625
|
type PanelToneConfig = {
|
|
52
626
|
border: string;
|
|
627
|
+
/**
|
|
628
|
+
* Hairline for the `outlined` variant. Deliberately lighter than `border`
|
|
629
|
+
* and paired with a low-alpha dark value, so the outline reads as a hairline
|
|
630
|
+
* in both modes instead of a hard rule in light mode.
|
|
631
|
+
*/
|
|
632
|
+
outlineBorder: string;
|
|
53
633
|
heading: string;
|
|
54
634
|
muted: string;
|
|
55
635
|
badge: string;
|
|
@@ -80,6 +660,7 @@ type BadgeTheme = Record<TrueColor, string>;
|
|
|
80
660
|
type PillTheme = Record<TrueColor, Record<"solid" | "soft" | "outline", {
|
|
81
661
|
base: string;
|
|
82
662
|
border?: string;
|
|
663
|
+
hover?: string;
|
|
83
664
|
}>>;
|
|
84
665
|
type AlertTheme = Record<TrueColor, {
|
|
85
666
|
subtle: string;
|
|
@@ -135,9 +716,164 @@ export declare const getButtonHoverClasses: (variant: ButtonVariant, color: True
|
|
|
135
716
|
export declare const getButtonActiveClasses: (variant: ButtonVariant, color: TrueColor) => string;
|
|
136
717
|
export declare const getButtonActiveHoverClasses: (variant: ButtonVariant, color: TrueColor) => string;
|
|
137
718
|
export declare const getButtonBaseClasses: (variant: ButtonVariant, color: TrueColor) => string;
|
|
719
|
+
/**
|
|
720
|
+
* The `ButtonVariant`s that read as a slider.
|
|
721
|
+
*
|
|
722
|
+
* `link` and `clear` are text treatments — a slider has no text to treat —
|
|
723
|
+
* and `icon` is a square affordance, so all three are excluded rather than
|
|
724
|
+
* aliased onto something else. What remains covers the full range a track
|
|
725
|
+
* can express: a saturated fill, a tinted one, a bordered wash, a quiet
|
|
726
|
+
* translucent one and a frosted one.
|
|
727
|
+
*/
|
|
728
|
+
export declare const SLIDER_VARIANTS: readonly ["solid", "soft", "outline", "ghost", "glass"];
|
|
729
|
+
export type SliderVariant = (typeof SLIDER_VARIANTS)[number];
|
|
730
|
+
export interface SliderVariantTokens {
|
|
731
|
+
/** Paint for the active track segment, from the start (or min handle) to the value. */
|
|
732
|
+
fill: string;
|
|
733
|
+
/** Border of the handle. */
|
|
734
|
+
handle: string;
|
|
735
|
+
/** The handle's focus-ring colour, including its `focus-visible:` prefix. */
|
|
736
|
+
ring: string;
|
|
737
|
+
}
|
|
738
|
+
/**
|
|
739
|
+
* Slider treatments — the same visual language `Button` uses, mapped onto a
|
|
740
|
+
* slider's two paintable surfaces (the track segment and the handle) so a
|
|
741
|
+
* slider dropped next to a button row reads as part of the same UI.
|
|
742
|
+
*/
|
|
743
|
+
export declare const getSliderVariantTokens: (color: TrueColor, variant: SliderVariant) => SliderVariantTokens;
|
|
744
|
+
/**
|
|
745
|
+
* The `ButtonVariant`s that read as a toggle.
|
|
746
|
+
*
|
|
747
|
+
* Same rationale as `SLIDER_VARIANTS`: `link` and `clear` are text treatments
|
|
748
|
+
* a track has nothing to treat, and `icon` is a square affordance. What
|
|
749
|
+
* remains covers the full range a track can express — a saturated fill, a
|
|
750
|
+
* tinted one, a bordered wash, a quiet translucent one and a frosted one.
|
|
751
|
+
*/
|
|
752
|
+
export declare const TOGGLE_VARIANTS: readonly ["solid", "soft", "outline", "ghost", "glass"];
|
|
753
|
+
export type ToggleVariant = (typeof TOGGLE_VARIANTS)[number];
|
|
754
|
+
export interface ToggleVariantTokens {
|
|
755
|
+
/** Paint for the track when the switch is on (carries `peer-checked:`). */
|
|
756
|
+
track: string;
|
|
757
|
+
/** The thumb's focus-ring colour, driven off the input's `focus-visible`. */
|
|
758
|
+
ring: string;
|
|
759
|
+
/** True when the on-state fill is see-through and sits over unknown content. */
|
|
760
|
+
translucent: boolean;
|
|
761
|
+
}
|
|
762
|
+
/**
|
|
763
|
+
* Toggle treatments — the same visual language `Button` and `Slider` use,
|
|
764
|
+
* mapped onto the toggle's one paintable surface (the on-state track fill) so
|
|
765
|
+
* a toggle dropped next to a button or slider reads as part of the same UI.
|
|
766
|
+
*
|
|
767
|
+
* The off-state track is deliberately identical across variants — the neutral
|
|
768
|
+
* base — so the on-state fill is what expresses the treatment, exactly as a
|
|
769
|
+
* slider's neutral track does.
|
|
770
|
+
*
|
|
771
|
+
* The `glass` token only carries the frosted fill; the backdrop blur,
|
|
772
|
+
* vibrancy and specular overlay stay with the component, because they depend
|
|
773
|
+
* on the `glassOpacity` / `vibrancy` / `specularMode` props. The same numeric
|
|
774
|
+
* opacity caveat as `getGlassFillClass` applies: only the three presets are
|
|
775
|
+
* safelisted.
|
|
776
|
+
*/
|
|
777
|
+
export declare const getToggleVariantTokens: (color: TrueColor, variant: ToggleVariant, glassOpacity?: GlassOpacity) => ToggleVariantTokens;
|
|
138
778
|
export declare const getToggleColorClasses: (color: TrueColor) => string;
|
|
779
|
+
/**
|
|
780
|
+
* @deprecated Returns `accent-{color}-600`, which only paints a *native*
|
|
781
|
+
* checkbox — and a native checkbox ignores border, radius and background, so
|
|
782
|
+
* every other class the control carried was dead. Use
|
|
783
|
+
* `getCheckboxControlTokens`, which styles a real box.
|
|
784
|
+
*/
|
|
139
785
|
export declare const getCheckboxColorClasses: (color: TrueColor) => string;
|
|
786
|
+
export interface CheckboxControlTokens {
|
|
787
|
+
/** Fill and border of the box once checked or indeterminate. */
|
|
788
|
+
checked: string;
|
|
789
|
+
/** Focus ring, driven off the sibling input's focus. */
|
|
790
|
+
ring: string;
|
|
791
|
+
/** Colour of the tick/dash glyph, which sits on the checked fill. */
|
|
792
|
+
glyph: string;
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* Fills step to `-700` light / `-400` dark rather than the `-600` / `-500` the
|
|
796
|
+
* native `accent-color` used, for the same reason `Alert`'s solid variant does:
|
|
797
|
+
* a white glyph on `{color}-600` measures 2.94:1 on yellow and 3.06 on lime,
|
|
798
|
+
* under even the 3:1 that WCAG asks of a *graphical* object, and on a `-500`
|
|
799
|
+
* fill it is worse. At `-700` under white and `-400` under `{color}-950` the
|
|
800
|
+
* worst case across all 21 tones is 4.93:1.
|
|
801
|
+
*/
|
|
802
|
+
export interface CheckboxVariantTokens {
|
|
803
|
+
/** Fill, shadow and backdrop of the resting box. */
|
|
804
|
+
fill: string;
|
|
805
|
+
/** Resting border colour. Replaced wholesale by the error state. */
|
|
806
|
+
border: string;
|
|
807
|
+
/** Border colour under the cursor. */
|
|
808
|
+
hover: string;
|
|
809
|
+
/** True when the box is see-through and sits over unknown content. */
|
|
810
|
+
translucent: boolean;
|
|
811
|
+
}
|
|
812
|
+
export declare const getCheckboxVariantTokens: (variant: InputVariant) => CheckboxVariantTokens;
|
|
813
|
+
/**
|
|
814
|
+
* The checked/indeterminate fill for the checkbox `glass` variant — Toggle's
|
|
815
|
+
* glass rule in miniature: the full-chroma 500 step at a translucent alpha
|
|
816
|
+
* (600 in dark), never the `100` pastel, so the box reads as *tinted glass*
|
|
817
|
+
* on any surface. The border is deliberately left out: unlike the opaque
|
|
818
|
+
* variants, glass keeps its frost edge in the on-state and lets the fill
|
|
819
|
+
* alone carry the tone.
|
|
820
|
+
*/
|
|
821
|
+
export declare const getCheckboxGlassCheckedTokens: (color: TrueColor) => string;
|
|
822
|
+
export declare const getCheckboxControlTokens: (color: TrueColor) => CheckboxControlTokens;
|
|
140
823
|
export declare const getSpinnerColorTokens: (color: TrueColor) => [string, string, string, string];
|
|
824
|
+
/**
|
|
825
|
+
* The geometry of a `StatusSpinner` at each shared control size.
|
|
826
|
+
*
|
|
827
|
+
* The wrapper is the same circle `Spinner` draws at that size, so the two can
|
|
828
|
+
* sit side by side and line up; the dot and the ring width scale with it.
|
|
829
|
+
*/
|
|
830
|
+
export interface StatusSpinnerSizeTokens {
|
|
831
|
+
/** Outer circle. Matches `Spinner`'s diameter at the same size. */
|
|
832
|
+
wrapper: string;
|
|
833
|
+
/** Centre dot. */
|
|
834
|
+
dot: string;
|
|
835
|
+
/** Ring border width. */
|
|
836
|
+
border: string;
|
|
837
|
+
}
|
|
838
|
+
export declare const getStatusSpinnerSizeTokens: (size: ControlSize) => StatusSpinnerSizeTokens;
|
|
839
|
+
/**
|
|
840
|
+
* The paint of a `StatusSpinner` in one tone.
|
|
841
|
+
*
|
|
842
|
+
* Generated from `TRUE_COLORS` — there is no hand-written per-colour map to
|
|
843
|
+
* drift. `dot` is the one class-shaped token (both steps are already in the
|
|
844
|
+
* generated safelist); the arc and track are CSS colours rather than classes,
|
|
845
|
+
* because the four border sides carry four different values and a `dark:`
|
|
846
|
+
* variant cannot reach an inline style. They read the tone's own Tailwind
|
|
847
|
+
* variable — emitted for all 21 tones — and `color-mix` derives the track and
|
|
848
|
+
* the glow from it, so a tone can never render as another colour.
|
|
849
|
+
*/
|
|
850
|
+
export interface StatusSpinnerToneTokens {
|
|
851
|
+
/** Centre dot fill. */
|
|
852
|
+
dot: string;
|
|
853
|
+
/** The rotating arc, as a CSS colour. */
|
|
854
|
+
arc: string;
|
|
855
|
+
/** The idle ring (30% of the tone), as a CSS colour. */
|
|
856
|
+
track: string;
|
|
857
|
+
/** The halo around the dot, as a CSS colour. */
|
|
858
|
+
glow: string;
|
|
859
|
+
}
|
|
860
|
+
export declare const getStatusSpinnerToneTokens: (tone: TrueColor) => StatusSpinnerToneTokens;
|
|
861
|
+
/**
|
|
862
|
+
* The paint of a `ProgressSpinner` in one tone.
|
|
863
|
+
*
|
|
864
|
+
* The same generated-from-`TRUE_COLORS` approach as `StatusSpinner`: the arc
|
|
865
|
+
* reads the tone's own Tailwind variable and `color-mix` derives the idle
|
|
866
|
+
* track from it, so a tone can never render as another colour. The inline
|
|
867
|
+
* SVG cannot use `dark:` variants, which is why these are CSS colours rather
|
|
868
|
+
* than classes.
|
|
869
|
+
*/
|
|
870
|
+
export interface ProgressSpinnerToneTokens {
|
|
871
|
+
/** The moving arc (or the determinate range), as a CSS colour. */
|
|
872
|
+
arc: string;
|
|
873
|
+
/** The idle ring (30% of the tone), as a CSS colour. */
|
|
874
|
+
track: string;
|
|
875
|
+
}
|
|
876
|
+
export declare const getProgressSpinnerToneTokens: (tone: TrueColor) => ProgressSpinnerToneTokens;
|
|
141
877
|
export declare const getLoaderProgressColors: (color: TrueColor) => {
|
|
142
878
|
track: string;
|
|
143
879
|
bar: string;
|
|
@@ -150,13 +886,215 @@ export declare const getMultiToggleColorTokens: (color: TrueColor) => {
|
|
|
150
886
|
};
|
|
151
887
|
export declare const getMultiToggleVariantTokens: (color: TrueColor) => MultiToggleVariantTokens;
|
|
152
888
|
export declare const getTabsColorTokens: (color: TrueColor) => TabsColorTokens;
|
|
889
|
+
/**
|
|
890
|
+
* Base treatment per surface variant — the shadow, ring, blur and fill that do
|
|
891
|
+
* not depend on tone.
|
|
892
|
+
*
|
|
893
|
+
* Lifted out of `Panel` so any control that draws a *surface* can mirror it
|
|
894
|
+
* exactly rather than copying the switch. `MultiToggle`'s track is the first
|
|
895
|
+
* other consumer: a segmented control is a container holding segments, so it
|
|
896
|
+
* belongs to the same family and has to read identically beside a `Panel`.
|
|
897
|
+
*/
|
|
898
|
+
export declare const SURFACE_VARIANT_BASE: Record<SurfaceVariant, string>;
|
|
899
|
+
/**
|
|
900
|
+
* Rim for the translucent variants. Deliberately tone-independent: a saturated
|
|
901
|
+
* `{tone}-500` edge fights the backdrop it is meant to sit over, so glass gets
|
|
902
|
+
* a light rim that reads as a bevel instead of an outline.
|
|
903
|
+
*/
|
|
904
|
+
export declare const SURFACE_GLASS_RIM = "border-white/50 dark:border-white/10";
|
|
905
|
+
/** Variants whose surface is see-through. */
|
|
906
|
+
export declare const TRANSLUCENT_SURFACE_VARIANTS: readonly SurfaceVariant[];
|
|
907
|
+
export interface SurfaceVariantOverrides {
|
|
908
|
+
/** Replaces the variant's own fill, keeping its shadow and ring. */
|
|
909
|
+
bgClass?: string;
|
|
910
|
+
/** Replaces the variant's own rim colour. */
|
|
911
|
+
borderClass?: string;
|
|
912
|
+
/** Extra classes folded in for `liquid-glass` (vibrancy, glass fill). */
|
|
913
|
+
liquidExtras?: string;
|
|
914
|
+
}
|
|
915
|
+
/**
|
|
916
|
+
* The full class set for a surface variant at a tone — the same combination
|
|
917
|
+
* `Panel` renders, so a control using this sits flush beside one.
|
|
918
|
+
*/
|
|
919
|
+
export declare const getSurfaceVariantClasses: (variant: SurfaceVariant, tone: TrueColor, overrides?: SurfaceVariantOverrides) => string;
|
|
153
920
|
export declare const getPanelToneStyles: (tone: TrueColor) => PanelToneConfig;
|
|
154
921
|
export declare const getStepperTonePalette: (tone: TrueColor) => StepperToneConfig;
|
|
155
922
|
export declare const getBadgeColorClasses: (color: TrueColor) => string;
|
|
156
923
|
export declare const getPillColorClasses: (color: TrueColor, variant: "solid" | "soft" | "outline") => {
|
|
157
924
|
base: string;
|
|
158
925
|
border?: string;
|
|
926
|
+
hover?: string;
|
|
159
927
|
};
|
|
928
|
+
/**
|
|
929
|
+
* @deprecated Use `getAlertVariantTokens(color, variant)`. This bag hands the
|
|
930
|
+
* same icon/text/dismiss classes to every variant, which is unreadable on
|
|
931
|
+
* `solid`. Kept so existing call sites keep compiling.
|
|
932
|
+
*/
|
|
160
933
|
export declare const getAlertColorClasses: (color: TrueColor) => AlertTheme[TrueColor];
|
|
934
|
+
/**
|
|
935
|
+
* Alert treatments. `glass` and `liquid-glass` are the same pair `Panel` and
|
|
936
|
+
* `Pill` offer, so a callout dropped on a glass card no longer has to be the
|
|
937
|
+
* one opaque slab in the layout.
|
|
938
|
+
*/
|
|
939
|
+
export declare const ALERT_VARIANTS: readonly ["subtle", "solid", "outline", "glass", "liquid-glass"];
|
|
940
|
+
export type AlertVariant = (typeof ALERT_VARIANTS)[number];
|
|
941
|
+
/**
|
|
942
|
+
* Where the leading icon sits against the callout's content.
|
|
943
|
+
*
|
|
944
|
+
* `top` is the default and the only one that was previously possible: the icon
|
|
945
|
+
* centres on the *title's* line box, which is what you want for a one- or
|
|
946
|
+
* two-line callout. `center` centres it against the whole block — right when
|
|
947
|
+
* the body runs long enough that a top-aligned glyph looks stranded — and
|
|
948
|
+
* `bottom` pins it to the last line.
|
|
949
|
+
*/
|
|
950
|
+
export declare const ALERT_ICON_ALIGNMENTS: readonly ["top", "center", "bottom"];
|
|
951
|
+
export type AlertIconAlign = (typeof ALERT_ICON_ALIGNMENTS)[number];
|
|
952
|
+
/**
|
|
953
|
+
* What the callout *means*, as opposed to what colour it is.
|
|
954
|
+
*
|
|
955
|
+
* Both kits' demos have been passing `tone="info"` / `"success"` / `"warning"`
|
|
956
|
+
* / `"danger"` since tone became a `TrueColor` — none of them are one, so every
|
|
957
|
+
* such alert fell through to the blue fallback and four "different" tones
|
|
958
|
+
* rendered identically. The semantics were real and worth keeping; they just
|
|
959
|
+
* belong in their own prop, which resolves to a tone *and* the right icon *and*
|
|
960
|
+
* the right live-region politeness.
|
|
961
|
+
*/
|
|
962
|
+
export declare const ALERT_INTENTS: readonly ["info", "success", "warning", "danger", "neutral"];
|
|
963
|
+
export type AlertIntent = (typeof ALERT_INTENTS)[number];
|
|
964
|
+
export interface AlertIntentConfig {
|
|
965
|
+
tone: TrueColor;
|
|
966
|
+
/** Registry icon name used when the caller does not supply one. */
|
|
967
|
+
icon: string;
|
|
968
|
+
/**
|
|
969
|
+
* How assistive technology should announce it. `role="alert"` is an
|
|
970
|
+
* *assertive* live region: it interrupts whatever the user is reading, which
|
|
971
|
+
* is right for a failure and wrong for a page that merely renders an
|
|
972
|
+
* informational banner on load.
|
|
973
|
+
*/
|
|
974
|
+
live: "assertive" | "polite";
|
|
975
|
+
}
|
|
976
|
+
export declare const ALERT_INTENT_CONFIG: Record<AlertIntent, AlertIntentConfig>;
|
|
977
|
+
/**
|
|
978
|
+
* Where a toast viewport sits on the screen — PrimeVue's seven anchor
|
|
979
|
+
* positions, kept as a runtime list so demos and docs enumerate the same
|
|
980
|
+
* seven. `center` is the only one without a corner.
|
|
981
|
+
*/
|
|
982
|
+
export declare const TOAST_POSITIONS: readonly ["top-left", "top-center", "top-right", "bottom-left", "bottom-center", "bottom-right", "center"];
|
|
983
|
+
export type ToastPosition = (typeof TOAST_POSITIONS)[number];
|
|
984
|
+
/**
|
|
985
|
+
* How the stack reads: `stacked` (the PrimeVue 4.5.5 default — a deck of
|
|
986
|
+
* collapsed cards that fans out on hover) or `expanded` (always fanned out,
|
|
987
|
+
* the classic list).
|
|
988
|
+
*/
|
|
989
|
+
export declare const TOAST_MODES: readonly ["stacked", "expanded"];
|
|
990
|
+
export type ToastMode = (typeof TOAST_MODES)[number];
|
|
991
|
+
export declare const DEFAULT_TOAST_POSITION: ToastPosition;
|
|
992
|
+
export declare const DEFAULT_TOAST_MODE: ToastMode;
|
|
993
|
+
/** Distance the stack offsets each card (stacked peek and expanded seam). */
|
|
994
|
+
export declare const DEFAULT_TOAST_GAP_PX = 12;
|
|
995
|
+
/** How many newest toasts stay visible; older ones wait their turn. */
|
|
996
|
+
export declare const DEFAULT_TOAST_LIMIT = 3;
|
|
997
|
+
/**
|
|
998
|
+
* Kit default — PrimeVue has no default auto-dismiss, and a toast that never
|
|
999
|
+
* dies is a trap. `life: 0` or `sticky: true` for a persistent message.
|
|
1000
|
+
*/
|
|
1001
|
+
export declare const DEFAULT_TOAST_LIFE_MS = 5000;
|
|
1002
|
+
/** Above Modal's 1600: a toast raised while a modal is open sits above it. */
|
|
1003
|
+
export declare const DEFAULT_TOAST_Z_INDEX = 2000;
|
|
1004
|
+
/** PrimeVue's viewport width (18.75rem = 300px). */
|
|
1005
|
+
export declare const TOAST_DEFAULT_WIDTH = "18.75rem";
|
|
1006
|
+
/**
|
|
1007
|
+
* The geometry of a toast card at each shared control size.
|
|
1008
|
+
*
|
|
1009
|
+
* Same reasoning as Alert's size table, promoted to the theme because the
|
|
1010
|
+
* card lives in a different folder than the callout it shares its language
|
|
1011
|
+
* with, and a second size table for the same scale would drift (brief §2).
|
|
1012
|
+
* The close button and the action buttons sit on the trigger family's scale,
|
|
1013
|
+
* so a toast and the Button beside it are described in the same language.
|
|
1014
|
+
*/
|
|
1015
|
+
export interface ToastSizeTokens {
|
|
1016
|
+
/** The card's own padding. */
|
|
1017
|
+
container: string;
|
|
1018
|
+
/** Space between the leading glyph and the copy. */
|
|
1019
|
+
gap: string;
|
|
1020
|
+
/** Title type. */
|
|
1021
|
+
title: string;
|
|
1022
|
+
/** Detail type. */
|
|
1023
|
+
detail: string;
|
|
1024
|
+
/** The intent glyph, on the shared control scale. */
|
|
1025
|
+
icon: ControlSize;
|
|
1026
|
+
/**
|
|
1027
|
+
* Height of the glyph's box: exactly the title's line box, so the glyph
|
|
1028
|
+
* centres on the title's cap height at any size (Alert's calibration).
|
|
1029
|
+
*/
|
|
1030
|
+
iconBox: string;
|
|
1031
|
+
/** The close button's square box. */
|
|
1032
|
+
close: string;
|
|
1033
|
+
/** The close glyph's size. */
|
|
1034
|
+
closeIcon: ControlSize;
|
|
1035
|
+
/** The progress bar's height, on the shared scale. */
|
|
1036
|
+
progress: ControlSize;
|
|
1037
|
+
/** The action buttons' size (trigger family). */
|
|
1038
|
+
action: ControlSize;
|
|
1039
|
+
/** Space above the actions row. */
|
|
1040
|
+
actions: string;
|
|
1041
|
+
}
|
|
1042
|
+
export declare const getToastSizeTokens: (size: ControlSize) => ToastSizeTokens;
|
|
1043
|
+
/**
|
|
1044
|
+
* Whether a field is reporting a problem.
|
|
1045
|
+
*
|
|
1046
|
+
* One list, because it was six: `INPUT_`, `SELECT_`, `CHECKBOX_` and
|
|
1047
|
+
* `INPUT_GROUP_VALIDATION_STATUSES` each declared it, and `Textarea` and
|
|
1048
|
+
* `FormField` had bare unions exporting no runtime list at all — so their
|
|
1049
|
+
* demos could not enumerate the states they support. Same three strings, six
|
|
1050
|
+
* names: the day one changes, the other five will not.
|
|
1051
|
+
*/
|
|
1052
|
+
export declare const VALIDATION_STATUSES: readonly ["none", "error", "success"];
|
|
1053
|
+
export type ValidationStatus = (typeof VALIDATION_STATUSES)[number];
|
|
1054
|
+
/**
|
|
1055
|
+
* What went wrong with a request, as opposed to what colour to paint it.
|
|
1056
|
+
*
|
|
1057
|
+
* The same reasoning as `ALERT_INTENTS`: a failing call already knows whether
|
|
1058
|
+
* it was refused, throttled, or simply could not be reached, and every caller
|
|
1059
|
+
* translating that into a tone *and* a glyph *and* two strings is how one
|
|
1060
|
+
* screen ends up saying "Connection Error" for a 403. The kind resolves all
|
|
1061
|
+
* four; anything the caller states explicitly still wins.
|
|
1062
|
+
*/
|
|
1063
|
+
export declare const API_ERROR_KINDS: readonly ["unknown", "offline", "server", "forbidden", "notFound", "rateLimited"];
|
|
1064
|
+
export type ApiErrorKind = (typeof API_ERROR_KINDS)[number];
|
|
1065
|
+
export interface ApiErrorKindConfig {
|
|
1066
|
+
tone: TrueColor;
|
|
1067
|
+
/** Registry icon name used when the caller does not supply one. */
|
|
1068
|
+
icon: string;
|
|
1069
|
+
title: string;
|
|
1070
|
+
subtitle: string;
|
|
1071
|
+
/**
|
|
1072
|
+
* Whether retrying it stands a chance. A 403 does not get a "Try again"
|
|
1073
|
+
* button by default — offering one for a failure the user cannot clear is
|
|
1074
|
+
* how a dead end starts looking like a bug.
|
|
1075
|
+
*/
|
|
1076
|
+
retryable: boolean;
|
|
1077
|
+
}
|
|
1078
|
+
export declare const API_ERROR_KIND_CONFIG: Record<ApiErrorKind, ApiErrorKindConfig>;
|
|
1079
|
+
export interface AlertVariantTokens {
|
|
1080
|
+
/** Fill plus the callout's base copy colour. */
|
|
1081
|
+
surface: string;
|
|
1082
|
+
/** Border colour. The `border` utility itself is on the base class. */
|
|
1083
|
+
border: string;
|
|
1084
|
+
/** Leading icon. */
|
|
1085
|
+
icon: string;
|
|
1086
|
+
/** Secondary copy under the title. */
|
|
1087
|
+
text: string;
|
|
1088
|
+
/** Dismiss button: rest, hover and focus ring. */
|
|
1089
|
+
dismiss: string;
|
|
1090
|
+
}
|
|
1091
|
+
/**
|
|
1092
|
+
* Replaces the old flat `getAlertColorClasses` bag, which handed the *same*
|
|
1093
|
+
* `icon`, `text` and `dismiss` classes to every variant. On `solid` — a
|
|
1094
|
+
* `{color}-600` fill — that painted the description `{color}-700` and the icon
|
|
1095
|
+
* `{color}-500`, i.e. a dark tone on a saturated tone of itself. It was
|
|
1096
|
+
* unreadable at every tone and no test could see it.
|
|
1097
|
+
*/
|
|
1098
|
+
export declare const getAlertVariantTokens: (color: TrueColor, variant: AlertVariant) => AlertVariantTokens;
|
|
161
1099
|
export declare const getStatTileColorClasses: (color: TrueColor) => StatTileTheme[TrueColor];
|
|
162
1100
|
export {};
|