burne-ui 1.6.4 → 1.6.6
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/README.md +50 -8
- package/cli/init.js +8 -2
- package/dist/components/composite/AlertDialog/AlertDialog.d.ts +1 -1
- package/dist/components/composite/AlertDialog/alertDialogA11y.d.ts +1 -0
- package/dist/components/composite/AlertDialog/alertDialogParts.d.ts +1 -1
- package/dist/components/composite/AlertDialog/alertDialogStyles.d.ts +5 -4
- package/dist/components/composite/AlertDialog/alertDialogTypes.d.ts +14 -1
- package/dist/components/composite/AlertDialog/useAlertDialogRootState.d.ts +1 -1
- package/dist/components/core/Breadcrumbs/breadcrumbsA11y.d.ts +3 -4
- package/dist/components/core/Calendar/calendarA11y.d.ts +5 -0
- package/dist/components/core/Calendar/calendarAPI.d.ts +22 -0
- package/dist/components/core/Calendar/calendarTypes.d.ts +9 -1
- package/dist/components/core/Card/cardStyles.d.ts +3 -3
- package/dist/components/core/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/core/Checkbox/index.d.ts +1 -1
- package/dist/components/core/CloseButton/closeButtonA11y.d.ts +1 -1
- package/dist/components/core/CloseButton/closeButtonStyles.d.ts +1 -2
- package/dist/components/core/ColorPicker/colorPickerA11y.d.ts +10 -5
- package/dist/components/core/ColorPicker/colorPickerAnimations.d.ts +3 -1
- package/dist/components/core/ColorPicker/colorPickerStyles.d.ts +5 -5
- package/dist/components/core/ComboBox/comboBoxA11y.d.ts +4 -1
- package/dist/components/core/ComboBox/comboBoxStyles.d.ts +2 -2
- package/dist/components/core/Dialog/dialogParts.d.ts +1 -1
- package/dist/components/core/Dialog/dialogStyles.d.ts +7 -6
- package/dist/components/core/Dialog/dialogTypes.d.ts +3 -0
- package/dist/components/core/Drawer/drawerA11y.d.ts +4 -2
- package/dist/components/core/Drawer/drawerParts.d.ts +2 -2
- package/dist/components/core/Drawer/drawerStyles.d.ts +11 -10
- package/dist/components/core/Drawer/drawerTypes.d.ts +3 -0
- package/dist/components/core/Dropdown/dropdownA11y.d.ts +1 -0
- package/dist/components/core/Dropdown/dropdownAnimations.d.ts +3 -1
- package/dist/components/core/Dropdown/dropdownStyles.d.ts +3 -3
- package/dist/components/core/Dropdown/dropdownTypes.d.ts +8 -0
- package/dist/components/core/Input/index.d.ts +1 -1
- package/dist/components/core/Input/inputA11y.d.ts +3 -3
- package/dist/components/core/Input/inputControlParts.d.ts +1 -1
- package/dist/components/core/Kbd/kbdStyles.d.ts +1 -1
- package/dist/components/core/ListBox/listBoxA11y.d.ts +3 -0
- package/dist/components/core/ListBox/listBoxAPI.d.ts +13 -0
- package/dist/components/core/ListBox/listBoxParts.d.ts +1 -1
- package/dist/components/core/ListBox/listBoxStyles.d.ts +5 -5
- package/dist/components/core/ListBox/listBoxTypes.d.ts +5 -0
- package/dist/components/core/Pagination/paginationA11y.d.ts +3 -4
- package/dist/components/core/Popover/popoverA11y.d.ts +8 -0
- package/dist/components/core/Popover/popoverStyles.d.ts +2 -2
- package/dist/components/core/Popover/popoverTypes.d.ts +1 -1
- package/dist/components/core/Radio/Radio.d.ts +1 -1
- package/dist/components/core/Radio/index.d.ts +1 -1
- package/dist/components/core/SearchInput/SearchInput.d.ts +1 -1
- package/dist/components/core/SearchInput/searchInputA11y.d.ts +3 -3
- package/dist/components/core/SearchInput/searchInputStyles.d.ts +2 -1
- package/dist/components/core/SearchInput/searchInputTypes.d.ts +2 -0
- package/dist/components/core/SearchInput/useSearchInputRootState.d.ts +2 -2
- package/dist/components/core/Select/selectA11y.d.ts +4 -1
- package/dist/components/core/Select/selectAPI.d.ts +3 -0
- package/dist/components/core/Select/selectStyles.d.ts +4 -4
- package/dist/components/core/Skeleton/Skeleton.d.ts +3 -3
- package/dist/components/core/Skeleton/index.d.ts +5 -1
- package/dist/components/core/Skeleton/skeletonA11y.d.ts +5 -0
- package/dist/components/core/Skeleton/skeletonParts.d.ts +4 -0
- package/dist/components/core/Skeleton/skeletonStyles.d.ts +1 -1
- package/dist/components/core/Skeleton/skeletonTypes.d.ts +9 -0
- package/dist/components/core/Slider/sliderThumbParts.d.ts +1 -1
- package/dist/components/core/Slider/useSliderTrackState.d.ts +2 -2
- package/dist/components/core/Surface/surfaceStyles.d.ts +1 -1
- package/dist/components/core/Surface/surfaceTypes.d.ts +1 -1
- package/dist/components/core/Switch/index.d.ts +1 -1
- package/dist/components/core/Switch/switchControlParts.d.ts +1 -1
- package/dist/components/core/Switch/useSwitchRootState.d.ts +1 -1
- package/dist/components/core/Table/tableA11y.d.ts +9 -2
- package/dist/components/core/Table/tableAPI.d.ts +5 -0
- package/dist/components/core/Table/tableStyles.d.ts +9 -4
- package/dist/components/core/Table/tableTypes.d.ts +5 -0
- package/dist/components/core/Text/textTypes.d.ts +1 -1
- package/dist/components/core/TextArea/textAreaA11y.d.ts +1 -1
- package/dist/components/core/TextArea/textAreaStyles.d.ts +1 -1
- package/dist/components/core/TextArea/useTextAreaResize.d.ts +2 -1
- package/dist/components/core/TimeField/timeFieldA11y.d.ts +7 -5
- package/dist/components/core/TimeField/useTimeFieldControlState.d.ts +1 -1
- package/dist/components/core/TimeField/useTimeFieldRootState.d.ts +0 -1
- package/dist/components/core/Toast/toastA11y.d.ts +8 -2
- package/dist/components/core/Toast/toastStyles.d.ts +1 -1
- package/dist/components/core/Toast/toastTypes.d.ts +6 -0
- package/dist/components/core/Toast/useToastProviderState.d.ts +2 -1
- package/dist/components/core/Toast/useToastRootState.d.ts +0 -1
- package/dist/components/core/ToggleButton/toggleButtonStyles.d.ts +2 -0
- package/dist/components/core/ToggleButton/toggleButtonTypes.d.ts +0 -2
- package/dist/components/core/Tooltip/tooltipStyles.d.ts +2 -2
- package/dist/components/core/utils/motionConfig.d.ts +42 -6
- package/dist/components/core/utils/typeahead.d.ts +20 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +14132 -12875
- package/dist/internal.cjs +1 -1
- package/dist/internal.d.ts +3 -1
- package/dist/internal.js +75 -68
- package/dist/theme/BurneLabelsProvider.d.ts +17 -0
- package/dist/theme/BurneUIProvider.d.ts +11 -3
- package/dist/theme/burneLabels.d.ts +54 -0
- package/dist/theme/index.d.ts +5 -2
- package/dist/theme/themeConfig.d.ts +11 -1
- package/dist/theme/themeDefaults.d.ts +62 -76
- package/dist/theme/themeScript.d.ts +30 -0
- package/dist/themeRuntimeContext-DHGARM65.cjs +50 -0
- package/dist/{themeRuntimeContext-rM9wHr74.js → themeRuntimeContext-cixzM5Ix.js} +1867 -1767
- package/dist/tokens/config.d.ts +42 -12
- package/dist/tokens/index.d.ts +5 -2
- package/dist/tokens/overlayBackdrop.d.ts +17 -0
- package/dist/tokens/shadows.d.ts +21 -0
- package/dist/tokens/textScale.d.ts +36 -0
- package/dist/tokens/zIndex.d.ts +15 -0
- package/dist/ui.css +363 -244
- package/package.json +4 -3
- package/dist/components/core/Dialog/dialogA11y.d.ts +0 -1
- package/dist/themeRuntimeContext-Cn9YgR1F.cjs +0 -50
package/dist/tokens/config.d.ts
CHANGED
|
@@ -2,14 +2,38 @@
|
|
|
2
2
|
* Token layer metadata. Values are defined in `./styles.css`,
|
|
3
3
|
* Tailwind utilities — in `src/styles.css` (`@theme`, `@utility`).
|
|
4
4
|
*
|
|
5
|
+
* ## Naming layers (knob → steps → Tailwind)
|
|
6
|
+
*
|
|
7
|
+
* | Domain | Knob | Design steps | Tailwind `@theme` bridge | Utilities |
|
|
8
|
+
* |---|---|---|---|---|
|
|
9
|
+
* | Spacing | `--space` | `--space-*` | `--spacing-*` (Tailwind spacing ns) | `gap-*`, `p-*`, `m-*` |
|
|
10
|
+
* | Radius | `--radius` | `--radius-*` | `--radius-*` (identity) | `rounded-*` |
|
|
11
|
+
* | Control box | — | `--control-height-*` | — | `h-control-*`, `min-h-control-*` |
|
|
12
|
+
* | Control square | — | `--control-size-*` (= height) | — | `w-control-*`, `min/max-w-control-*` |
|
|
13
|
+
* | Icons | `--size` | `--size-scale-*` → `--icon-size-*` (1:1) | — | `icon-xsmall` … `icon-3xlarge` |
|
|
14
|
+
*
|
|
15
|
+
* ## Typography
|
|
16
|
+
*
|
|
17
|
+
* `--text-scale-*` steps (rem) align with semantic roles / utilities of the same name:
|
|
18
|
+
* `xsmall` 0.6875 · `small` 0.75 · `base` 0.875 · `mid` 1 · `large` 1.25 ·
|
|
19
|
+
* `xlarge` 1.5 · `2xlarge` 1.875 · `3xlarge` 2.25.
|
|
20
|
+
* Headers: `text-header-2` → `xlarge`, `text-header-1` → `2xlarge`, `text-accent-header` → `3xlarge`.
|
|
21
|
+
*
|
|
5
22
|
* Customization:
|
|
6
|
-
* - `--space` — spacing (gap, padding); steps `gap-*`, `p-*` via multipliers; fluid `clamp` by viewport.
|
|
23
|
+
* - `--space` — spacing (gap, padding); steps `gap-*`, `p-*` via multipliers; fluid `clamp` by viewport (theme JS writes scaled `clamp`, not fixed rem).
|
|
7
24
|
* - `--size` — control sizes (icons, indicators, button min-width, modal max-w); fluid `clamp` by viewport.
|
|
8
25
|
* - `--radius` — base radius; `rounded-*` steps via multipliers; fluid `clamp` by viewport.
|
|
9
|
-
* - `--shadow-size` — blur/offset multiplier for `--shadow-base|mid|large
|
|
26
|
+
* - `--shadow-size` — blur/offset multiplier for `--shadow-base|mid|large` (`calc(… * var(--shadow-size))`; do not bake px).
|
|
10
27
|
* - `--toast-scrim-size` / `--toast-scrim-density` — Toast scrim backdrop size and density.
|
|
11
|
-
* - `--
|
|
28
|
+
* - `--focus-ring-width` / `--focus-ring-offset` — keyboard focus ring geometry (`focus-ring*` utilities).
|
|
29
|
+
* - `--motion-surface-duration` — CSS transitions for `surface-color-transition` / `animate-shadow` / field shells (from `surfaceTransitionDuration` in motion config).
|
|
30
|
+
* - `--overlay-backdrop-color` / `--overlay-backdrop-blur` / `--overlay-backdrop-saturate` — frosted modal scrim (`overlay-backdrop`); `--overlay-backdrop-scrim` — solid dark-UI scrim.
|
|
31
|
+
* - `--z-dialog` / `--z-dropdown` / `--z-popover` / `--z-toast` / `--z-tooltip` — overlay stacking (`z-*` utilities).
|
|
32
|
+
* - `--text-scale-*` — primitive typography; roles `text-base` / `text-mid` / … map 1:1 by name.
|
|
12
33
|
* - `--font-w-*` — primitive font-weight scale;
|
|
34
|
+
*
|
|
35
|
+
* Fonts / text-scale / shadow geometry defaults: `tokenPrimitives.json` → TS modules + generated CSS
|
|
36
|
+
* (`npm run sync:tokens` / `scripts/sync-generated-tokens.mjs`).
|
|
13
37
|
*/
|
|
14
38
|
export declare const tokensConfig: {
|
|
15
39
|
/** Namespace for documentation */
|
|
@@ -20,15 +44,16 @@ export declare const tokensConfig: {
|
|
|
20
44
|
readonly "spacing-xsmall": "space-xsmall";
|
|
21
45
|
readonly "spacing-small": "space-small";
|
|
22
46
|
readonly "spacing-base": "space-base";
|
|
23
|
-
readonly "spacing-plus": "space-plus";
|
|
24
47
|
readonly "spacing-mid": "space-mid";
|
|
25
48
|
readonly "spacing-large": "space-large";
|
|
26
49
|
readonly "spacing-xlarge": "space-xlarge";
|
|
27
|
-
readonly "
|
|
28
|
-
readonly "
|
|
29
|
-
readonly "radius-
|
|
30
|
-
readonly "radius-
|
|
31
|
-
readonly "radius-
|
|
50
|
+
readonly "spacing-2xlarge": "space-2xlarge";
|
|
51
|
+
readonly "spacing-3xlarge": "space-3xlarge";
|
|
52
|
+
readonly "radius-xsmall": "radius-xsmall";
|
|
53
|
+
readonly "radius-small": "radius-small";
|
|
54
|
+
readonly "radius-base": "radius-base";
|
|
55
|
+
readonly "radius-mid": "radius-mid";
|
|
56
|
+
readonly "radius-large": "radius-large";
|
|
32
57
|
readonly "color-background": "color-background";
|
|
33
58
|
readonly "color-foreground": "color-foreground";
|
|
34
59
|
readonly "color-muted": "color-muted";
|
|
@@ -84,17 +109,22 @@ export declare const tokensConfig: {
|
|
|
84
109
|
readonly "icon-large": "icon-size-large";
|
|
85
110
|
readonly "icon-xlarge": "icon-size-xlarge";
|
|
86
111
|
readonly "icon-2xlarge": "icon-size-2xlarge";
|
|
112
|
+
readonly "icon-3xlarge": "icon-size-3xlarge";
|
|
87
113
|
};
|
|
88
114
|
};
|
|
89
115
|
/** `--spacing-*` steps → `gap-*`, `p-*`, `m-*`, `space-*`, … utilities */
|
|
90
|
-
export declare const burneSpacingScale: readonly ["xsmall", "small", "base", "
|
|
116
|
+
export declare const burneSpacingScale: readonly ["xsmall", "small", "base", "mid", "large", "xlarge", "2xlarge", "3xlarge"];
|
|
91
117
|
/** `--radius-*` steps → `rounded-*` utilities */
|
|
92
118
|
export declare const burneRadiusScale: readonly ["xsmall", "small", "base", "mid", "large"];
|
|
119
|
+
/**
|
|
120
|
+
* Icon utilities `icon-*` — 1:1 with `--size-scale-*` / `--icon-size-*`.
|
|
121
|
+
*/
|
|
122
|
+
export declare const burneIconScale: readonly ["xsmall", "small", "base", "mid", "large", "xlarge", "2xlarge", "3xlarge"];
|
|
93
123
|
/**
|
|
94
124
|
* `@utility text-*` roles (size/weight); not to be confused with `text-foreground` and other colors.
|
|
95
|
-
* `text-base` — Tailwind default override;
|
|
125
|
+
* `text-base` — Tailwind default override; maps 1:1 to `--text-scale-base` (0.875rem).
|
|
96
126
|
*/
|
|
97
|
-
export declare const burneTextScale: readonly ["small", "mid", "
|
|
127
|
+
export declare const burneTextScale: readonly ["small", "mid", "xsmall", "accent-header", "header-1", "header-2", "large"];
|
|
98
128
|
export { burneShadowScale, type ShadowSize, type ShadowLevel, SHADOW_CSS_VAR, shadowToken, } from './shadows';
|
|
99
129
|
export { TOAST_SCRIM_CSS_VAR, TOAST_SCRIM_DEFAULTS, toastScrimToken, type ToastScrimCssVar, } from './toastScrim';
|
|
100
130
|
export type TokensConfig = typeof tokensConfig;
|
package/dist/tokens/index.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export { tokensConfig, type TokensConfig } from './config';
|
|
2
2
|
export { burneFontWeightScale, FONT_WEIGHT_CSS_VAR, FONT_WEIGHT_DEFAULTS, fontWeightToken, type FontWeightStep, } from './fontWeights';
|
|
3
|
-
export { burneShadowScale, type ShadowSize, type ShadowLevel, SHADOW_CSS_VAR, shadowToken, } from './shadows';
|
|
3
|
+
export { burneShadowScale, type ShadowSize, type ShadowLevel, SHADOW_CSS_VAR, SHADOW_LAYER_GEOM, SHADOW_OPACITY_BASE, SHADOW_SIZE_CSS_DEFAULT, shadowToken, } from './shadows';
|
|
4
|
+
export { TEXT_SCALE_BASES, type TextScaleStep, } from './textScale';
|
|
4
5
|
export { TOAST_SCRIM_CSS_VAR, TOAST_SCRIM_DEFAULTS, toastScrimToken, type ToastScrimCssVar, } from './toastScrim';
|
|
6
|
+
export { OVERLAY_BACKDROP_CSS_VAR, OVERLAY_BACKDROP_DEFAULTS, overlayBackdropToken, type OverlayBackdropCssVar, } from './overlayBackdrop';
|
|
7
|
+
export { burneZIndexScale, Z_INDEX_CSS_VAR, Z_INDEX_DEFAULTS, zIndexToken, type ZIndexLayer, } from './zIndex';
|
|
5
8
|
/** CSS variable names for type-safe access and generators */
|
|
6
|
-
export declare const designTokenNames: readonly ["--border-width", "--color-background", "--color-surface", "--color-border", "--color-foreground", "--color-muted", "--color-primary", "--color-primary-foreground", "--color-primary-hover", "--color-default-hover", "--color-primary-tint", "--color-primary-tint-strong", "--color-indicator", "--color-indicator-foreground", "--color-secondary", "--color-secondary-foreground", "--color-secondary-hover", "--color-tertiary", "--color-tertiary-foreground", "--color-tertiary-hover", "--color-focus-ring", "--color-converge-ripple-primary-fill", "--color-converge-ripple-neutral", "--color-converge-ripple-neutral-muted", "--color-converge-ripple-danger", "--color-converge-ripple-info", "--color-converge-ripple-success", "--color-converge-ripple-warning", "--color-danger", "--color-danger-fill-hover", "--color-danger-foreground", "--color-success", "--color-success-foreground", "--color-success-fill-hover", "--color-info", "--color-info-foreground", "--color-info-fill-hover", "--color-warning", "--color-warning-foreground", "--color-warning-fill-hover", "--color-surface-tint-danger", "--color-surface-tint-success", "--color-surface-tint-info", "--color-surface-tint-warning", "--color-surface-tint-danger-hover", "--color-surface-tint-success-hover", "--color-surface-tint-info-hover", "--color-surface-tint-warning-hover", "--font-family-sans", "--font-family-mono", "--font-w-small", "--font-w-base", "--font-w-mid", "--font-w-strong", "--font-w-bold", "--space", "--space-xsmall", "--space-small", "--space-base", "--space-
|
|
9
|
+
export declare const designTokenNames: readonly ["--border-width", "--focus-ring-width", "--focus-ring-offset", "--motion-surface-duration", "--motion-surface-ease", "--motion-shadow-ease", "--overlay-backdrop-color", "--overlay-backdrop-blur", "--overlay-backdrop-saturate", "--overlay-backdrop-scrim", "--z-dialog", "--z-dropdown", "--z-dropdown-sub", "--z-popover", "--z-toast", "--z-tooltip", "--color-background", "--color-surface", "--color-border", "--color-foreground", "--color-muted", "--color-primary", "--color-primary-foreground", "--color-primary-hover", "--color-default-hover", "--color-primary-tint", "--color-primary-tint-strong", "--color-indicator", "--color-indicator-foreground", "--color-secondary", "--color-secondary-foreground", "--color-secondary-hover", "--color-tertiary", "--color-tertiary-foreground", "--color-tertiary-hover", "--color-focus-ring", "--color-converge-ripple-primary-fill", "--color-converge-ripple-neutral", "--color-converge-ripple-neutral-muted", "--color-converge-ripple-danger", "--color-converge-ripple-info", "--color-converge-ripple-success", "--color-converge-ripple-warning", "--color-danger", "--color-danger-fill-hover", "--color-danger-foreground", "--color-success", "--color-success-foreground", "--color-success-fill-hover", "--color-info", "--color-info-foreground", "--color-info-fill-hover", "--color-warning", "--color-warning-foreground", "--color-warning-fill-hover", "--color-surface-tint-danger", "--color-surface-tint-success", "--color-surface-tint-info", "--color-surface-tint-warning", "--color-surface-tint-danger-hover", "--color-surface-tint-success-hover", "--color-surface-tint-info-hover", "--color-surface-tint-warning-hover", "--font-family-sans", "--font-family-mono", "--font-w-small", "--font-w-base", "--font-w-mid", "--font-w-strong", "--font-w-bold", "--space", "--space-xsmall", "--space-small", "--space-base", "--space-mid", "--space-large", "--space-xlarge", "--space-2xlarge", "--space-3xlarge", "--size", "--size-scale-xsmall", "--size-scale-small", "--size-scale-base", "--size-scale-mid", "--size-scale-large", "--size-scale-xlarge", "--size-scale-2xlarge", "--size-scale-3xlarge", "--selection-indicator-small", "--selection-indicator-base", "--selection-indicator-mid", "--selection-indicator-large", "--radius", "--radius-xsmall", "--radius-small", "--radius-base", "--radius-mid", "--radius-large", "--text-scale-xsmall", "--text-scale-xsmall--line-height", "--text-scale-small", "--text-scale-small--line-height", "--text-scale-base", "--text-scale-base--line-height", "--text-scale-mid", "--text-scale-mid--line-height", "--text-scale-large", "--text-scale-large--line-height", "--text-scale-xlarge", "--text-scale-xlarge--line-height", "--text-scale-2xlarge", "--text-scale-2xlarge--line-height", "--text-scale-3xlarge", "--text-scale-3xlarge--line-height", "--text-accent-header-size", "--text-accent-header-line-height", "--text-accent-header-weight", "--text-header-1-size", "--text-header-1-line-height", "--text-header-1-weight", "--text-header-2-size", "--text-header-2-line-height", "--text-header-2-weight", "--text-large-size", "--text-large-line-height", "--text-large-weight", "--text-base-size", "--text-base-line-height", "--text-base-weight", "--text-small-size", "--text-small-line-height", "--text-small-weight", "--text-mid-size", "--text-mid-line-height", "--text-mid-weight", "--text-xsmall-size", "--text-xsmall-line-height", "--text-xsmall-weight", "--max-component-small", "--max-component-base", "--max-component-mid", "--max-component-large", "--button-min-width-small", "--button-min-width-base", "--button-min-width-mid", "--button-min-width-large", "--control-height-xsmall", "--control-height-small", "--control-height-base", "--control-height-mid", "--control-height-large", "--control-size-xsmall", "--control-size-small", "--control-size-base", "--control-size-mid", "--control-size-large", "--avatar-size-small", "--avatar-size-base", "--avatar-size-mid", "--avatar-size-large", "--icon-size-xsmall", "--icon-size-small", "--icon-size-base", "--icon-size-mid", "--icon-size-large", "--icon-size-xlarge", "--icon-size-2xlarge", "--icon-size-3xlarge", "--shadow-size", "--shadow-none", "--shadow-base", "--shadow-mid", "--shadow-large", "--toast-scrim-size", "--toast-scrim-density"];
|
|
7
10
|
export type DesignCssVar = (typeof designTokenNames)[number];
|
|
8
11
|
type ColorCssVarName = Extract<DesignCssVar, `--color-${string}`>;
|
|
9
12
|
/** Suffix after `--color-` (same as theme key without the `color-` prefix) */
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Modal overlay backdrop tokens — see `--overlay-backdrop-*` in `tokens/styles.css`. */
|
|
2
|
+
export declare const OVERLAY_BACKDROP_CSS_VAR: {
|
|
3
|
+
readonly color: "--overlay-backdrop-color";
|
|
4
|
+
readonly blur: "--overlay-backdrop-blur";
|
|
5
|
+
readonly saturate: "--overlay-backdrop-saturate";
|
|
6
|
+
readonly scrim: "--overlay-backdrop-scrim";
|
|
7
|
+
};
|
|
8
|
+
export type OverlayBackdropCssVar = (typeof OVERLAY_BACKDROP_CSS_VAR)[keyof typeof OVERLAY_BACKDROP_CSS_VAR];
|
|
9
|
+
/** CSS `var(--overlay-backdrop-*)` for inline styles and documentation. */
|
|
10
|
+
export declare function overlayBackdropToken<V extends OverlayBackdropCssVar>(name: V): `var(${V})`;
|
|
11
|
+
/** Defaults — match `:root` in tokens/styles.css. */
|
|
12
|
+
export declare const OVERLAY_BACKDROP_DEFAULTS: {
|
|
13
|
+
readonly color: "color-mix(in oklab, var(--color-foreground) 14%, transparent)";
|
|
14
|
+
readonly blur: "14px";
|
|
15
|
+
readonly saturate: 1.5;
|
|
16
|
+
readonly scrim: "color-mix(in oklab, black 58%, transparent)";
|
|
17
|
+
};
|
package/dist/tokens/shadows.d.ts
CHANGED
|
@@ -3,5 +3,26 @@ export declare const burneShadowScale: readonly ["none", "base", "mid", "large"]
|
|
|
3
3
|
export type ShadowSize = (typeof burneShadowScale)[number];
|
|
4
4
|
export type ShadowLevel = Exclude<ShadowSize, "none">;
|
|
5
5
|
export declare const SHADOW_CSS_VAR: Record<ShadowLevel, `--shadow-${ShadowLevel}`>;
|
|
6
|
+
/** Default `--shadow-size` in `tokens/styles.css` (theme knob identity is separate in SCALE_DEFAULTS). */
|
|
7
|
+
export declare const SHADOW_SIZE_CSS_DEFAULT: number;
|
|
8
|
+
/** Opacity bases per theme × level — single source with `tokens/styles.css` (via sync script). */
|
|
9
|
+
export declare const SHADOW_OPACITY_BASE: {
|
|
10
|
+
dark: {
|
|
11
|
+
base: number;
|
|
12
|
+
mid: number;
|
|
13
|
+
large: number;
|
|
14
|
+
};
|
|
15
|
+
light: {
|
|
16
|
+
base: number;
|
|
17
|
+
mid: number;
|
|
18
|
+
large: number;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
/** One layer: [offsetX, offsetY, blur, spread] — single source with CSS (via sync script). */
|
|
22
|
+
export declare const SHADOW_LAYER_GEOM: {
|
|
23
|
+
readonly base: readonly [number[]];
|
|
24
|
+
readonly mid: readonly [number[]];
|
|
25
|
+
readonly large: readonly [number[]];
|
|
26
|
+
};
|
|
6
27
|
/** CSS `var(--shadow-base|mid|large)` for inline styles and documentation. */
|
|
7
28
|
export declare function shadowToken<S extends ShadowLevel>(level: S): `var(--shadow-${S})`;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** Primitive typography sizes (rem) — single source with `tokens/styles.css` (via sync script). */
|
|
2
|
+
export declare const TEXT_SCALE_BASES: {
|
|
3
|
+
xsmall: {
|
|
4
|
+
size: number;
|
|
5
|
+
line: number;
|
|
6
|
+
};
|
|
7
|
+
small: {
|
|
8
|
+
size: number;
|
|
9
|
+
line: number;
|
|
10
|
+
};
|
|
11
|
+
base: {
|
|
12
|
+
size: number;
|
|
13
|
+
line: number;
|
|
14
|
+
};
|
|
15
|
+
mid: {
|
|
16
|
+
size: number;
|
|
17
|
+
line: number;
|
|
18
|
+
};
|
|
19
|
+
large: {
|
|
20
|
+
size: number;
|
|
21
|
+
line: number;
|
|
22
|
+
};
|
|
23
|
+
xlarge: {
|
|
24
|
+
size: number;
|
|
25
|
+
line: number;
|
|
26
|
+
};
|
|
27
|
+
"2xlarge": {
|
|
28
|
+
size: number;
|
|
29
|
+
line: number;
|
|
30
|
+
};
|
|
31
|
+
"3xlarge": {
|
|
32
|
+
size: number;
|
|
33
|
+
line: number;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export type TextScaleStep = keyof typeof TEXT_SCALE_BASES;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Overlay z-index scale — match `--z-*` tokens and `z-*` utilities.
|
|
3
|
+
*
|
|
4
|
+
* Hierarchy (low → high): dialog → dropdown / popover → toast → tooltip.
|
|
5
|
+
* Applies inside one stacking context. Default modal Dialog (`showModal()`) uses
|
|
6
|
+
* the browser top layer — body portals cannot outrank it via z-index alone.
|
|
7
|
+
* `dropdown-sub` is slightly above `dropdown` for nested menus.
|
|
8
|
+
*/
|
|
9
|
+
export declare const burneZIndexScale: readonly ["dialog", "dropdown", "dropdown-sub", "popover", "toast", "tooltip"];
|
|
10
|
+
export type ZIndexLayer = (typeof burneZIndexScale)[number];
|
|
11
|
+
export declare const Z_INDEX_CSS_VAR: Record<ZIndexLayer, `--z-${ZIndexLayer}`>;
|
|
12
|
+
/** Default numeric values (`dropdown-sub` resolves via CSS `calc(var(--z-dropdown) + 10)`). */
|
|
13
|
+
export declare const Z_INDEX_DEFAULTS: Record<ZIndexLayer, number>;
|
|
14
|
+
/** CSS `var(--z-dialog|…)` for inline styles and documentation. */
|
|
15
|
+
export declare function zIndexToken<L extends ZIndexLayer>(layer: L): `var(--z-${L})`;
|