burne-ui 1.7.6 → 1.7.9

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.
Files changed (33) hide show
  1. package/README.md +3 -3
  2. package/cli/init.js +16 -16
  3. package/cli/theme-bridge.css +107 -0
  4. package/dist/components/core/Breadcrumbs/breadcrumbsTypes.d.ts +1 -1
  5. package/dist/components/core/Disclosure/Disclosure.d.ts +4 -4
  6. package/dist/components/core/Disclosure/disclosureAPI.d.ts +8 -0
  7. package/dist/components/core/Disclosure/disclosureParts.d.ts +11 -1
  8. package/dist/components/core/Disclosure/disclosureStyles.d.ts +7 -0
  9. package/dist/components/core/Disclosure/disclosureTypes.d.ts +13 -7
  10. package/dist/components/core/Disclosure/index.d.ts +7 -4
  11. package/dist/components/core/Disclosure/useDisclosureRootState.d.ts +1 -1
  12. package/dist/components/core/Dropdown/dropdownTypes.d.ts +4 -4
  13. package/dist/components/core/Field/Field.d.ts +1 -1
  14. package/dist/components/core/Field/fieldContext.d.ts +4 -4
  15. package/dist/components/core/Field/fieldParts.d.ts +7 -4
  16. package/dist/components/core/Field/fieldStyles.d.ts +31 -8
  17. package/dist/components/core/Field/fieldTypes.d.ts +12 -1
  18. package/dist/components/core/Field/index.d.ts +3 -3
  19. package/dist/components/core/Label/Label.d.ts +1 -1
  20. package/dist/components/core/Label/labelParts.d.ts +1 -1
  21. package/dist/components/core/Label/labelTypes.d.ts +4 -0
  22. package/dist/components/core/Link/Link.d.ts +1 -1
  23. package/dist/components/core/Link/index.d.ts +1 -1
  24. package/dist/components/core/Link/linkStyles.d.ts +3 -3
  25. package/dist/components/core/Link/linkTypes.d.ts +5 -7
  26. package/dist/components/core/SelectionIndicator/selectionIndicatorTokens.d.ts +1 -1
  27. package/dist/components/core/Table/tableTypes.d.ts +1 -1
  28. package/dist/index.cjs +1 -1
  29. package/dist/index.d.ts +3 -3
  30. package/dist/index.js +8435 -8281
  31. package/dist/tokens/config.d.ts +6 -5
  32. package/dist/ui.css +18 -18
  33. package/package.json +2 -1
package/README.md CHANGED
@@ -44,7 +44,7 @@ import "burne-ui/styles.css";
44
44
  В нём:
45
45
 
46
46
  - **Дизайн-токены** как CSS-переменные: `--color-*`, `--space` / `--space-*`, `--size` / `--size-*`, `--radius`, `--text-scale-*`, и др. Полный перечень имён — экспорт **`designTokenNames`** из `burne-ui`; исходные значения по умолчанию смотрите в репозитории в `src/tokens/styles.css`.
47
- - **Мост Tailwind** (`@theme inline`): цвета в утилитах вида `bg-background`, `text-foreground`, `border-border`, отступы `gap-large`, `p-mid`, радиусы `rounded-base` и т.д.
47
+ - **Мост Tailwind** (`@theme inline` в ките + consumer-файл **`burne-ui/theme-bridge.css`**): цвета `bg-background`, отступы `gap-large` / `px-2xlarge`, радиусы `rounded-base` и т.д. Prebuilt `ui.css` содержит только классы, встретившиеся при сборке кита — мост нужен, чтобы Tailwind приложения догенерировал остальные.
48
48
  - **Кастомные утилиты** (`@utility`): например `border-token`, `border-t-token`, `text-header-1`, `text-mid`, `max-w-component-base`, `min-w-button-base`.
49
49
 
50
50
  Имена переменных **не** с префиксом `brn-`; это обычные `--color-background`, `--space-large` и т.п.
@@ -60,7 +60,7 @@ import "burne-ui/styles.css";
60
60
 
61
61
  `--space-*` и `--spacing-*` — разные имена **намеренно**: у Tailwind namespace отступов — `spacing`.
62
62
 
63
- Шкала spacing: `xsmall` 0.5 · `small` 0.75 · `base` 1 · `mid` 1.5 · `large` 2 · `xlarge` 2.5 · `2xlarge` 3 · `3xlarge` 3.875 (× `--space`).
63
+ Шкала spacing: `xsmall` 0.618 · `small` 0.875 · `base` 1 · `mid` 1.5 · `large` 2 · `xlarge` 2.5 · `2xlarge` 4 · `3xlarge` 6 (× `--space`).
64
64
 
65
65
  ### Типографика
66
66
 
@@ -72,7 +72,7 @@ import "burne-ui/styles.css";
72
72
  | `small` / `text-small` | 0.75 |
73
73
  | `base` / `text-base` | 0.875 |
74
74
  | `mid` / `text-mid` | 1 |
75
- | `large` / `text-large` | 1.25 |
75
+ | `large` / `text-large` | 1.15 |
76
76
  | `xlarge` → `text-header-2` | 1.5 |
77
77
  | `2xlarge` → `text-header-1` | 1.875 |
78
78
  | `3xlarge` → `text-accent-header` | 2.25 |
package/cli/init.js CHANGED
@@ -7,18 +7,15 @@ import * as prompts from "./prompts.js";
7
7
 
8
8
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
9
9
 
10
- const THEME_BRIDGE_CSS = `
11
- /*
12
- * Tailwind v4 can regenerate theme tokens — bind them back to burne runtime vars.
13
- */
14
- @theme {
15
- --text-base: var(--text-base-size);
16
- --text-base--line-height: var(--text-base-line-height);
17
- --text-base--font-weight: var(--text-base-weight);
18
- --font-sans: var(--font-family-sans);
19
- --font-mono: var(--font-family-mono);
10
+ const THEME_BRIDGE_IMPORT = `@import "burne-ui/theme-bridge.css";`;
11
+
12
+ /** @param {string} css */
13
+ function hasThemeBridge(css) {
14
+ return (
15
+ css.includes("burne-ui/theme-bridge.css") ||
16
+ css.includes("--text-base: var(--text-base-size)")
17
+ );
20
18
  }
21
- `;
22
19
 
23
20
  /**
24
21
  * @returns {Promise<string>}
@@ -113,7 +110,7 @@ export function patchCssFile(cssPath) {
113
110
  let css = fs.readFileSync(cssPath, "utf8");
114
111
  const hadBurne = css.includes("burne-ui/styles.css");
115
112
  const hadTailwind = /@import\s+["']tailwindcss["']/.test(css);
116
- const hadThemeBridge = css.includes("--text-base: var(--text-base-size)");
113
+ const hadThemeBridge = hasThemeBridge(css);
117
114
 
118
115
  if (!hadBurne) {
119
116
  if (hadTailwind) {
@@ -141,13 +138,16 @@ export function patchCssFile(cssPath) {
141
138
  css += `\n@import "burne-ui/styles.css";\n`;
142
139
  }
143
140
 
144
- if (!hadThemeBridge) {
141
+ if (!css.includes("burne-ui/theme-bridge.css")) {
145
142
  const burneImport = css.match(/@import\s+["']burne-ui\/styles\.css["']\s*;/);
146
143
  if (burneImport && burneImport.index != null) {
147
144
  const insertAt = burneImport.index + burneImport[0].length;
148
- css = css.slice(0, insertAt) + "\n" + THEME_BRIDGE_CSS + css.slice(insertAt);
145
+ css =
146
+ css.slice(0, insertAt) +
147
+ `\n${THEME_BRIDGE_IMPORT}\n` +
148
+ css.slice(insertAt);
149
149
  } else {
150
- css += "\n" + THEME_BRIDGE_CSS;
150
+ css += `\n${THEME_BRIDGE_IMPORT}\n`;
151
151
  }
152
152
  }
153
153
 
@@ -425,7 +425,7 @@ export async function runInit(argv, cliVersion) {
425
425
  if (!fs.existsSync(abs)) throw new Error(`CSS not found: ${cssRel}`);
426
426
  const { hadBurne, hadTailwind, hadThemeBridge } = patchCssFile(abs);
427
427
  console.log(hadBurne ? `CSS OK (already linked): ${cssRel}` : `Patched CSS: ${cssRel}`);
428
- if (!hadThemeBridge) console.log("Added @theme bridge (text-base / font-sans).");
428
+ if (!hadThemeBridge) console.log("Added @theme bridge (burne-ui/theme-bridge.css).");
429
429
  if (!hadTailwind) {
430
430
  console.log('Note: no @import "tailwindcss" — add Tailwind v4 for className utilities.');
431
431
  }
@@ -0,0 +1,107 @@
1
+ /*
2
+ * Consumer Tailwind v4 theme bridge.
3
+ *
4
+ * Prebuilt `burne-ui/styles.css` (ui.css) only emits utilities that were used when
5
+ * building the kit. Apps that run their own `@import "tailwindcss"` + `@source`
6
+ * must re-bind kit tokens here so classes like `px-2xlarge`, `bg-primary`,
7
+ * `rounded-base` generate against runtime CSS variables.
8
+ *
9
+ * Use `@theme inline` so identity mappings (`--color-background: var(--color-background)`)
10
+ * do not emit circular `:root` custom properties.
11
+ *
12
+ * Import after `burne-ui/styles.css`:
13
+ * @import "burne-ui/theme-bridge.css";
14
+ */
15
+ @theme inline {
16
+ --font-sans: var(--font-family-sans);
17
+ --font-mono: var(--font-family-mono);
18
+
19
+ --color-background: var(--color-background);
20
+ --color-foreground: var(--color-foreground);
21
+ --color-muted: var(--color-muted);
22
+ --color-muted-foreground: var(--color-muted-foreground);
23
+ --color-surface: var(--color-surface);
24
+ --color-border: var(--color-border);
25
+
26
+ --color-primary: var(--color-primary);
27
+ --color-primary-foreground: var(--color-primary-foreground);
28
+ --color-primary-hover: var(--color-primary-hover);
29
+
30
+ --color-default-hover: var(--color-default-hover);
31
+ --color-transparent-hover: var(--color-transparent-hover);
32
+
33
+ --color-indicator: var(--color-indicator);
34
+ --color-indicator-foreground: var(--color-indicator-foreground);
35
+
36
+ --color-focus-ring: var(--color-focus-ring);
37
+ --color-focus-ring-danger: var(--color-focus-ring-danger);
38
+ --color-focus-ring-success: var(--color-focus-ring-success);
39
+ --color-focus-ring-info: var(--color-focus-ring-info);
40
+ --color-focus-ring-warning: var(--color-focus-ring-warning);
41
+ --focus-ring-width: var(--focus-ring-width);
42
+ --focus-ring-offset: var(--focus-ring-offset);
43
+
44
+ --z-index-dialog: var(--z-dialog);
45
+ --z-index-dropdown: var(--z-dropdown);
46
+ --z-index-dropdown-sub: var(--z-dropdown-sub);
47
+ --z-index-popover: var(--z-popover);
48
+ --z-index-toast: var(--z-toast);
49
+ --z-index-tooltip: var(--z-tooltip);
50
+
51
+ --color-primary-tint: var(--color-primary-tint);
52
+ --color-primary-tint-strong: var(--color-primary-tint-strong);
53
+
54
+ --color-secondary: var(--color-secondary);
55
+ --color-secondary-foreground: var(--color-secondary-foreground);
56
+ --color-secondary-hover: var(--color-secondary-hover);
57
+ --color-tertiary: var(--color-tertiary);
58
+ --color-tertiary-foreground: var(--color-tertiary-foreground);
59
+ --color-tertiary-hover: var(--color-tertiary-hover);
60
+
61
+ --color-danger: var(--color-danger);
62
+ --color-danger-fill-hover: var(--color-danger-fill-hover);
63
+ --color-danger-foreground: var(--color-danger-foreground);
64
+ --color-success: var(--color-success);
65
+ --color-success-foreground: var(--color-success-foreground);
66
+ --color-success-fill-hover: var(--color-success-fill-hover);
67
+ --color-info: var(--color-info);
68
+ --color-info-foreground: var(--color-info-foreground);
69
+ --color-info-fill-hover: var(--color-info-fill-hover);
70
+ --color-warning: var(--color-warning);
71
+ --color-warning-foreground: var(--color-warning-foreground);
72
+ --color-warning-fill-hover: var(--color-warning-fill-hover);
73
+ --color-surface-tint-danger: var(--color-surface-tint-danger);
74
+ --color-surface-tint-success: var(--color-surface-tint-success);
75
+ --color-surface-tint-info: var(--color-surface-tint-info);
76
+ --color-surface-tint-warning: var(--color-surface-tint-warning);
77
+ --color-surface-tint-danger-hover: var(--color-surface-tint-danger-hover);
78
+ --color-surface-tint-success-hover: var(--color-surface-tint-success-hover);
79
+ --color-surface-tint-info-hover: var(--color-surface-tint-info-hover);
80
+ --color-surface-tint-warning-hover: var(--color-surface-tint-warning-hover);
81
+
82
+ --spacing-xsmall: var(--space-xsmall);
83
+ --spacing-small: var(--space-small);
84
+ --spacing-base: var(--space-base);
85
+ --spacing-mid: var(--space-mid);
86
+ --spacing-large: var(--space-large);
87
+ --spacing-xlarge: var(--space-xlarge);
88
+ --spacing-2xlarge: var(--space-2xlarge);
89
+ --spacing-3xlarge: var(--space-3xlarge);
90
+
91
+ --radius-xsmall: var(--radius-xsmall);
92
+ --radius-small: var(--radius-small);
93
+ --radius-base: var(--radius-base);
94
+ --radius-mid: var(--radius-mid);
95
+ --radius-large: var(--radius-large);
96
+
97
+ --shadow-token-base: var(--shadow-base);
98
+ --shadow-token-mid: var(--shadow-mid);
99
+ --shadow-token-large: var(--shadow-large);
100
+
101
+ --text-base: var(--text-base-size);
102
+ --text-base--line-height: var(--text-base-line-height);
103
+ --text-base--font-weight: var(--text-base-weight);
104
+
105
+ --border-width-DEFAULT: var(--border-width, 1px);
106
+ --border-width-1: var(--border-width, 1px);
107
+ }
@@ -12,7 +12,7 @@ export type BreadcrumbsClassNames = {
12
12
  /** `<span>` wrapper on `Breadcrumbs.Separator`. */
13
13
  separatorWrapper?: string;
14
14
  /** Current page content (`aria-current="page"`) — Item sub-slot. */
15
- itemCurrent?: string;
15
+ itemActive?: string;
16
16
  /** Link / button inside interactive crumb — Item sub-slot. */
17
17
  itemLink?: string;
18
18
  /** `<span>` wrapper around crumb link — Item sub-slot. */
@@ -1,5 +1,5 @@
1
- import { DisclosureContent, DisclosureHandleInner, DisclosureTrigger } from './disclosureParts';
2
- export type { DisclosureProps, DisclosureGroupProps, DisclosureTriggerProps, DisclosureHandleProps, DisclosureContentProps, DisclosureVariant, DisclosureSize, DisclosureIconPos, DisclosureClassNames, } from './disclosureTypes';
1
+ import { DisclosureContent, DisclosureHandleInner, DisclosureTrigger, DisclosureIcon, DisclosureChevron } from './disclosureParts';
2
+ export type { DisclosureProps, DisclosureGroupProps, DisclosureTriggerProps, DisclosureHandleProps, DisclosureContentProps, DisclosureIconProps, DisclosureChevronProps, DisclosureVariant, DisclosureSize, DisclosureChevronPos, DisclosureClassNames, } from './disclosureTypes';
3
3
  export declare const DisclosureRoot: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
4
4
  children?: import('react').ReactNode;
5
5
  open?: boolean;
@@ -9,8 +9,8 @@ export declare const DisclosureRoot: import('react').ForwardRefExoticComponent<i
9
9
  variant?: import('./disclosureTypes').DisclosureVariant;
10
10
  size?: import('./disclosureTypes').DisclosureSize;
11
11
  disabled?: boolean;
12
- iconPosition?: import('../utils/iconPosition').IconPosition;
12
+ chevronPosition?: import('../utils/iconPosition').IconPosition;
13
13
  dragHandle?: boolean;
14
14
  classNames?: import('../../..').Prettify<import('./disclosureTypes').DisclosureClassNames>;
15
15
  } & import('react').RefAttributes<HTMLDivElement>>;
16
- export { DisclosureTrigger, DisclosureHandleInner, DisclosureContent, };
16
+ export { DisclosureTrigger, DisclosureHandleInner, DisclosureContent, DisclosureIcon, DisclosureChevron, };
@@ -1,5 +1,13 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { DisclosureVariant } from './disclosureTypes';
3
+ export type ResolvedDisclosureTriggerBody = {
4
+ icon: ReactNode | null;
5
+ chevron: ReactNode | null;
6
+ title: ReactNode;
7
+ hasIconPart: boolean;
8
+ hasChevronPart: boolean;
9
+ };
3
10
  export declare function isFramedVariant(variant: DisclosureVariant): boolean;
4
11
  export declare function readDisclosurePartDisplayName(type: unknown): string | undefined;
12
+ export declare function resolveDisclosureTriggerBody(children: ReactNode): ResolvedDisclosureTriggerBody;
5
13
  export declare function orderDragHandleChildren(children: ReactNode): ReactNode[];
@@ -1,7 +1,17 @@
1
1
  import { HTMLAttributes } from 'react';
2
+ import { DisclosureChevronProps, DisclosureIconProps } from './disclosureTypes';
3
+ export declare function DisclosureIcon({ className, children, ...props }: DisclosureIconProps): import("react/jsx-runtime").JSX.Element | null;
4
+ export declare namespace DisclosureIcon {
5
+ var displayName: string;
6
+ }
7
+ export declare function DisclosureChevron({ className, children, ...props }: DisclosureChevronProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare namespace DisclosureChevron {
9
+ var displayName: string;
10
+ }
2
11
  export declare const DisclosureTrigger: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLButtonElement> & {
3
12
  children?: import('react').ReactNode;
4
- icon?: import('react').ReactNode | null;
13
+ icon?: import('react').ReactNode;
14
+ chevron?: import('react').ReactNode | null;
5
15
  asChild?: boolean;
6
16
  } & import('react').RefAttributes<HTMLButtonElement>>;
7
17
  export { DisclosureHandleInner } from './disclosureHandleInnerPart';
@@ -5,6 +5,7 @@ export declare const DISCLOSURE_TRIGGER_DISABLED_CLASS = "cursor-not-allowed opa
5
5
  export declare const DISCLOSURE_TRIGGER_ENABLED_CLASS = "cursor-pointer";
6
6
  export declare const DISCLOSURE_TRIGGER_TITLE_LIFT_CLASS = "min-w-0 flex-1 origin-center";
7
7
  export declare const DISCLOSURE_TRIGGER_TITLE_CLASS = "block";
8
+ export declare const DISCLOSURE_TRIGGER_ICON_BASE_CLASS = "inline-flex shrink-0 text-primary [&_svg]:size-full";
8
9
  export declare const DISCLOSURE_TRIGGER_CHEVRON_BASE_CLASS = "inline-flex shrink-0 origin-center items-center justify-center text-muted";
9
10
  export declare const DISCLOSURE_TRIGGER_CHEVRON_ICON_CLASS = "size-full";
10
11
  export declare const DISCLOSURE_TRIGGER_CHEVRON_OPEN_CLASS = "text-primary";
@@ -18,8 +19,14 @@ export declare function disclosureTriggerShell(size: DisclosureSize): {
18
19
  pad: string;
19
20
  text: import('../Text').TextVariant;
20
21
  titleClassName: string;
22
+ icon: string;
21
23
  chevron: string;
22
24
  };
25
+ export declare function disclosureTriggerIconClass({ size, className, slotClass, }: {
26
+ size: DisclosureSize;
27
+ className?: string;
28
+ slotClass?: string;
29
+ }): string;
23
30
  export declare function disclosureRootClass({ variant, groupedCardShell, className, slotClass, }: {
24
31
  variant: DisclosureVariant;
25
32
  groupedCardShell: boolean;
@@ -5,13 +5,14 @@ import { IconPosition } from '../utils/iconPosition';
5
5
  export type DisclosureVariant = "default" | "outline" | "secondary" | "card" | "ghost" | "gloss";
6
6
  export type DisclosureSize = ComponentSize;
7
7
  /** Alias of shared `IconPosition` (chevron start/end). */
8
- export type DisclosureIconPos = IconPosition;
8
+ export type DisclosureChevronPos = IconPosition;
9
9
  export type DisclosureClassNames = {
10
10
  root?: string;
11
11
  trigger?: string;
12
- triggerTitleLift?: string;
13
- triggerTitle?: string;
14
- triggerChevron?: string;
12
+ titleLift?: string;
13
+ title?: string;
14
+ icon?: string;
15
+ chevron?: string;
15
16
  contentShell?: string;
16
17
  contentWrap?: string;
17
18
  contentPanel?: string;
@@ -36,7 +37,7 @@ export type DisclosureContextValue = {
36
37
  variant: DisclosureVariant;
37
38
  size: DisclosureSize;
38
39
  disabled: boolean;
39
- iconPosition: IconPosition;
40
+ chevronPosition: IconPosition;
40
41
  dragHandle: boolean;
41
42
  shellRef: RefObject<HTMLDivElement | null>;
42
43
  innerRef: RefObject<HTMLDivElement | null>;
@@ -56,7 +57,7 @@ export type DisclosureProps = HTMLAttributes<HTMLDivElement> & {
56
57
  variant?: DisclosureVariant;
57
58
  size?: DisclosureSize;
58
59
  disabled?: boolean;
59
- iconPosition?: IconPosition;
60
+ chevronPosition?: IconPosition;
60
61
  dragHandle?: boolean;
61
62
  classNames?: Prettify<DisclosureClassNames>;
62
63
  };
@@ -73,9 +74,14 @@ export type DisclosureGroupProps = HTMLAttributes<HTMLDivElement> & {
73
74
  };
74
75
  export type DisclosureTriggerProps = HTMLAttributes<HTMLButtonElement> & {
75
76
  children?: ReactNode;
76
- icon?: ReactNode | null;
77
+ /** Leading indicator icon (left of title). */
78
+ icon?: ReactNode;
79
+ /** Expand chevron; `null` hides the default chevron. */
80
+ chevron?: ReactNode | null;
77
81
  asChild?: boolean;
78
82
  };
83
+ export type DisclosureIconProps = HTMLAttributes<HTMLSpanElement>;
84
+ export type DisclosureChevronProps = HTMLAttributes<HTMLSpanElement>;
79
85
  export type DisclosureHandleProps = HTMLAttributes<HTMLDivElement>;
80
86
  export type DisclosureContentProps = HTMLAttributes<HTMLDivElement> & {
81
87
  children?: ReactNode;
@@ -1,4 +1,4 @@
1
- import { DisclosureHandleInner } from './Disclosure';
1
+ import { DisclosureChevron, DisclosureHandleInner, DisclosureIcon } from './Disclosure';
2
2
  export declare const Disclosure: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
3
3
  children?: import('react').ReactNode;
4
4
  open?: boolean;
@@ -8,15 +8,18 @@ export declare const Disclosure: import('react').ForwardRefExoticComponent<impor
8
8
  variant?: import('./disclosureTypes').DisclosureVariant;
9
9
  size?: import('./disclosureTypes').DisclosureSize;
10
10
  disabled?: boolean;
11
- iconPosition?: import('../utils/iconPosition').IconPosition;
11
+ chevronPosition?: import('../utils/iconPosition').IconPosition;
12
12
  dragHandle?: boolean;
13
13
  classNames?: import('../../..').Prettify<import('./disclosureTypes').DisclosureClassNames>;
14
14
  } & import('react').RefAttributes<HTMLDivElement>> & {
15
15
  Trigger: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLButtonElement> & {
16
16
  children?: import('react').ReactNode;
17
- icon?: import('react').ReactNode | null;
17
+ icon?: import('react').ReactNode;
18
+ chevron?: import('react').ReactNode | null;
18
19
  asChild?: boolean;
19
20
  } & import('react').RefAttributes<HTMLButtonElement>>;
21
+ Icon: typeof DisclosureIcon;
22
+ Chevron: typeof DisclosureChevron;
20
23
  Handle: typeof DisclosureHandleInner;
21
24
  Content: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
22
25
  children?: import('react').ReactNode;
@@ -33,4 +36,4 @@ export declare const Disclosure: import('react').ForwardRefExoticComponent<impor
33
36
  classNames?: import('../../..').Prettify<import('./disclosureTypes').DisclosureClassNames>;
34
37
  } & import('react').RefAttributes<HTMLDivElement>>;
35
38
  };
36
- export type { DisclosureProps, DisclosureGroupProps, DisclosureTriggerProps, DisclosureHandleProps, DisclosureContentProps, DisclosureVariant, DisclosureSize, DisclosureIconPos, DisclosureClassNames, } from './disclosureTypes';
39
+ export type { DisclosureProps, DisclosureGroupProps, DisclosureTriggerProps, DisclosureHandleProps, DisclosureContentProps, DisclosureIconProps, DisclosureChevronProps, DisclosureVariant, DisclosureSize, DisclosureChevronPos, DisclosureClassNames, } from './disclosureTypes';
@@ -1,5 +1,5 @@
1
1
  import { DisclosureContextValue, UseDisclosureRootStateProps } from './disclosureTypes';
2
- export declare function useDisclosureRootState({ children, open: openProp, defaultOpen, onOpenChange, value, variant: variantProp, size: sizeProp, disabled, iconPosition, dragHandle, }: UseDisclosureRootStateProps): {
2
+ export declare function useDisclosureRootState({ children, open: openProp, defaultOpen, onOpenChange, value, variant: variantProp, size: sizeProp, disabled, chevronPosition, dragHandle, }: UseDisclosureRootStateProps): {
3
3
  contextValue: DisclosureContextValue;
4
4
  variant: import('./disclosureTypes').DisclosureVariant;
5
5
  groupedCardShell: boolean;
@@ -23,10 +23,10 @@ export type DropdownClassNames = {
23
23
  sub?: string;
24
24
  subTrigger?: string;
25
25
  subTriggerLabelWrap?: string;
26
- subTriggerChevron?: string;
27
- subContent?: string;
28
- subContentGlossPanel?: string;
29
- subContentGlossContent?: string;
26
+ subTriggerIcon?: string;
27
+ subPopover?: string;
28
+ subPopoverGlossPanel?: string;
29
+ subPopoverBody?: string;
30
30
  };
31
31
  export type DropdownProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
32
32
  children: ReactNode;
@@ -1,5 +1,5 @@
1
1
  import { FieldError, FieldHint, FieldLabel, FieldLegend, FieldLegendHeader, FieldRoot, FieldSetActions, FieldSetGroup } from './fieldParts';
2
- export type { FieldProps, FieldHintProps, FieldHintStatus, FieldLabelProps, FieldErrorProps, FieldSetProps, FieldSetGroupProps, FieldSetActionsProps, FieldLegendProps, FieldLegendHeaderProps, FieldSetSize, FieldClassNames, FieldSetClassNames, } from './fieldTypes';
2
+ export type { FieldProps, FieldHintProps, FieldHintStatus, FieldLabelProps, FieldErrorProps, FieldSetProps, FieldSetGroupProps, FieldSetActionsProps, FieldLegendProps, FieldLegendHeaderProps, FieldSetSize, FieldSize, FieldClassNames, FieldSetClassNames, } from './fieldTypes';
3
3
  export { FieldRoot };
4
4
  export declare const FieldSetRoot: import('react').ForwardRefExoticComponent<Omit<import('react').FieldsetHTMLAttributes<HTMLFieldSetElement>, "children"> & {
5
5
  children?: import('react').ReactNode;
@@ -1,12 +1,12 @@
1
1
  import { ReactNode } from 'react';
2
- import { ComponentSize } from '../utils/sizeLayout';
3
- import { FieldClassNames, FieldClassNamesProviderProps, FieldSetClassNames, FieldSetClassNamesProviderProps } from './fieldTypes';
2
+ import { FieldClassNames, FieldClassNamesProviderProps, FieldSetClassNames, FieldSetClassNamesProviderProps, FieldSize } from './fieldTypes';
4
3
  export declare function FieldClassNamesProvider({ classNames, children, }: FieldClassNamesProviderProps): import("react/jsx-runtime").JSX.Element;
5
4
  export declare function useFieldClassNames(): FieldClassNames;
6
5
  export declare function FieldSetClassNamesProvider({ classNames, children, }: FieldSetClassNamesProviderProps): import("react/jsx-runtime").JSX.Element;
7
6
  export declare function useFieldSetClassNames(): FieldSetClassNames;
8
7
  export declare function FieldSetSizeProvider({ size, children, }: {
9
- size: ComponentSize;
8
+ size: FieldSize;
10
9
  children: ReactNode;
11
10
  }): import("react/jsx-runtime").JSX.Element;
12
- export declare function useFieldSetSize(): ComponentSize;
11
+ export declare function useOptionalFieldSize(): FieldSize | null;
12
+ export declare function useFieldSetSize(): FieldSize;
@@ -1,14 +1,17 @@
1
1
  import { ReactNode } from 'react';
2
- import { FieldErrorProps, FieldLegendHeaderProps, FieldProps, FieldSetProps, UseFieldSetRootStateResult } from './fieldTypes';
3
- export declare function FieldRootShell({ className, children, ...rest }: Omit<FieldProps, "classNames">): import("react/jsx-runtime").JSX.Element;
4
- export declare function FieldRoot({ classNames, ...rest }: FieldProps): import("react/jsx-runtime").JSX.Element;
2
+ import { FieldErrorProps, FieldLabelProps, FieldLegendHeaderProps, FieldProps, FieldSetProps, UseFieldSetRootStateResult } from './fieldTypes';
3
+ export declare function FieldRootShell({ className, size: sizeProp, children, ...rest }: Omit<FieldProps, "classNames">): import("react/jsx-runtime").JSX.Element;
4
+ export declare function FieldRoot({ classNames, size, children, ...rest }: FieldProps): import("react/jsx-runtime").JSX.Element;
5
5
  export declare const FieldHint: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLElement> & {
6
6
  children?: ReactNode;
7
7
  status?: import('./fieldTypes').FieldHintStatus;
8
8
  as?: "p" | "span";
9
9
  variant?: import('../Text').TextVariant;
10
10
  } & import('react').RefAttributes<HTMLElement>>;
11
- export declare const FieldLabel: import('../Label').LabelComponent;
11
+ export declare function FieldLabel({ variant: variantProp, ...rest }: FieldLabelProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare namespace FieldLabel {
13
+ var displayName: string;
14
+ }
12
15
  export declare function FieldError({ role, className, ...props }: FieldErrorProps): import("react/jsx-runtime").JSX.Element;
13
16
  export declare const FieldLegend: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLLegendElement> & {
14
17
  children?: ReactNode;
@@ -1,37 +1,60 @@
1
+ import { TextVariant } from '../Text';
1
2
  import { ComponentSize } from '../utils/sizeLayout';
2
3
  import { FieldHintStatus } from './fieldTypes';
3
- export type FieldSetSizeLayout = {
4
+ export type FieldSize = ComponentSize;
5
+ export type FieldSizeLayout = {
6
+ /** Gap between Field Label / control / Hint */
7
+ fieldGap: string;
4
8
  legendGap: string;
9
+ legendHeaderGap: string;
5
10
  stackGap: string;
6
11
  groupGap: string;
7
12
  actionsGap: string;
13
+ labelVariant: TextVariant;
14
+ hintVariant: TextVariant;
8
15
  };
9
- export declare const FIELD_ROOT_CLASS = "flex w-full flex-col gap-xsmall";
16
+ export declare const FIELD_ROOT_BASE_CLASS = "flex w-full flex-col";
10
17
  export declare const FIELD_HINT_STATUS_CLASS: Record<FieldHintStatus, string>;
11
18
  export declare const FIELD_SET_CLASS = "m-0 min-w-0 border-0 p-0 disabled:pointer-events-none disabled:opacity-55";
12
19
  export declare const FIELD_SET_STACK_BASE_CLASS = "flex min-w-0 w-full flex-col";
13
20
  export declare const FIELD_LEGEND_CLASS = "m-0 block w-full max-w-full border-0 p-0";
14
- export declare const FIELD_LEGEND_HEADER_CLASS = "flex flex-col w-fit";
21
+ export declare const FIELD_LEGEND_HEADER_BASE_CLASS = "flex w-fit flex-col";
15
22
  export declare const FIELD_SET_GROUP_BASE_CLASS = "flex min-w-0 w-full flex-col";
16
- export declare const FIELD_SET_ACTIONS_BASE_CLASS = "flex flex-wrap w-fit items-center";
17
- export declare const FIELD_SET_SIZE_LAYOUT: Record<ComponentSize, FieldSetSizeLayout>;
23
+ export declare const FIELD_SET_ACTIONS_BASE_CLASS = "flex w-fit flex-wrap items-center";
24
+ export declare const FIELD_SIZE_LAYOUT: Record<FieldSize, FieldSizeLayout>;
25
+ /** Alias — same grid as `FIELD_SIZE_LAYOUT`. */
26
+ export declare const FIELD_SET_SIZE_LAYOUT: Record<ComponentSize, FieldSizeLayout>;
27
+ export declare function resolveFieldSize(size?: FieldSize): FieldSize;
28
+ export declare function fieldSizeLayout(size?: FieldSize): FieldSizeLayout;
29
+ export declare function fieldRootClass({ size, className, slotClass, }: {
30
+ size?: FieldSize;
31
+ className?: string;
32
+ slotClass?: string;
33
+ }): string;
18
34
  export declare function fieldHintClass({ status, className, slotClass, }: {
19
35
  status: FieldHintStatus;
20
36
  className?: string;
21
37
  slotClass?: string;
22
38
  }): string;
39
+ export declare function fieldHintVariant(size?: FieldSize): TextVariant;
40
+ export declare function fieldLabelVariant(size?: FieldSize): TextVariant;
41
+ export declare function fieldLegendHeaderClass({ size, className, slotClass, }: {
42
+ size?: FieldSize;
43
+ className?: string;
44
+ slotClass?: string;
45
+ }): string;
23
46
  export declare function fieldSetStackClass({ size, hasLegend, slotClass, }: {
24
- size: ComponentSize;
47
+ size: FieldSize;
25
48
  hasLegend: boolean;
26
49
  slotClass?: string;
27
50
  }): string;
28
51
  export declare function fieldSetGroupClass({ size, className, slotClass, }: {
29
- size: ComponentSize;
52
+ size: FieldSize;
30
53
  className?: string;
31
54
  slotClass?: string;
32
55
  }): string;
33
56
  export declare function fieldSetActionsClass({ size, className, slotClass, }: {
34
- size: ComponentSize;
57
+ size: FieldSize;
35
58
  className?: string;
36
59
  slotClass?: string;
37
60
  }): string;
@@ -5,7 +5,8 @@ import { TextVariant } from '../Text';
5
5
  import { ComponentSize } from '../utils/sizeLayout';
6
6
  import { SemanticStatus } from '../utils/semanticStatusIcons';
7
7
  export type FieldHintStatus = SemanticStatus;
8
- export type FieldSetSize = ComponentSize;
8
+ export type FieldSize = ComponentSize;
9
+ export type FieldSetSize = FieldSize;
9
10
  export type FieldClassNames = {
10
11
  root?: string;
11
12
  hint?: string;
@@ -22,6 +23,12 @@ export type FieldSetClassNames = {
22
23
  export type FieldProps = HTMLAttributes<HTMLDivElement> & {
23
24
  children?: ReactNode;
24
25
  classNames?: Prettify<FieldClassNames>;
26
+ /**
27
+ * Scales Field chrome (gap, Label / Hint / Error type).
28
+ * Inside `Field.Set`, inherits Set size unless overridden.
29
+ * Does not cascade into embedded controls.
30
+ */
31
+ size?: FieldSize;
25
32
  };
26
33
  export type FieldClassNamesProviderProps = {
27
34
  classNames?: Prettify<FieldClassNames>;
@@ -55,6 +62,10 @@ export type FieldSetProps = Omit<FieldsetHTMLAttributes<HTMLFieldSetElement>, "c
55
62
  children?: ReactNode;
56
63
  hintId?: string;
57
64
  errorId?: string;
65
+ /**
66
+ * Scales Set chrome (stack / group / actions gaps, legend header, Label / Hint type via context).
67
+ * Does not cascade into embedded controls (`Input`, `Button`, …).
68
+ */
58
69
  size?: FieldSetSize;
59
70
  classNames?: Prettify<FieldSetClassNames>;
60
71
  };
@@ -1,4 +1,4 @@
1
- import { FieldError, FieldLegendHeader, FieldRoot, useFieldSetErrorId, useFieldSetHintId } from './Field';
1
+ import { FieldError, FieldLabel, FieldLegendHeader, FieldRoot, useFieldSetErrorId, useFieldSetHintId } from './Field';
2
2
  import { fieldErrorId, fieldHintId, joinFieldDescribedBy } from './fieldA11y';
3
3
  export declare const Field: typeof FieldRoot & {
4
4
  Hint: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLElement> & {
@@ -7,7 +7,7 @@ export declare const Field: typeof FieldRoot & {
7
7
  as?: "p" | "span";
8
8
  variant?: import('../Text').TextVariant;
9
9
  } & import('react').RefAttributes<HTMLElement>>;
10
- Label: import('../Label').LabelComponent;
10
+ Label: typeof FieldLabel;
11
11
  Error: typeof FieldError;
12
12
  Set: import('react').ForwardRefExoticComponent<Omit<import('react').FieldsetHTMLAttributes<HTMLFieldSetElement>, "children"> & {
13
13
  children?: import('react').ReactNode;
@@ -39,4 +39,4 @@ export declare const Field: typeof FieldRoot & {
39
39
  } & import('react').RefAttributes<HTMLDivElement>>;
40
40
  };
41
41
  export { useFieldSetHintId, useFieldSetErrorId, joinFieldDescribedBy, fieldHintId, fieldErrorId, };
42
- export type { FieldProps, FieldHintProps, FieldHintStatus, FieldLabelProps, FieldErrorProps, FieldSetProps, FieldSetGroupProps, FieldSetActionsProps, FieldLegendProps, FieldLegendHeaderProps, FieldSetSize, FieldClassNames, FieldSetClassNames, } from './fieldTypes';
42
+ export type { FieldProps, FieldHintProps, FieldHintStatus, FieldLabelProps, FieldErrorProps, FieldSetProps, FieldSetGroupProps, FieldSetActionsProps, FieldLegendProps, FieldLegendHeaderProps, FieldSetSize, FieldSize, FieldClassNames, FieldSetClassNames, } from './fieldTypes';
@@ -1,6 +1,6 @@
1
1
  import { LabelSlot } from './labelParts';
2
2
  import { LabelProps } from './labelTypes';
3
3
  export type { LabelProps, LabelClassNames, FieldLabelContextValue, } from './labelTypes';
4
- export declare function LabelRoot({ children, className, required: requiredProp, htmlFor: htmlForProp, id: idProp, ...rest }: Omit<LabelProps, "classNames">): import("react/jsx-runtime").JSX.Element;
4
+ export declare function LabelRoot({ children, className, required: requiredProp, htmlFor: htmlForProp, id: idProp, variant, ...rest }: Omit<LabelProps, "classNames">): import("react/jsx-runtime").JSX.Element;
5
5
  export declare function Label({ classNames, ...rest }: LabelProps): import("react/jsx-runtime").JSX.Element;
6
6
  export { LabelSlot };
@@ -3,4 +3,4 @@ export declare function LabelSlot(_props: LabelProps): null;
3
3
  export declare namespace LabelSlot {
4
4
  var displayName: string;
5
5
  }
6
- export declare function LabelContent({ children, required }: LabelContentProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function LabelContent({ children, required, variant }: LabelContentProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import { LabelHTMLAttributes, ReactNode } from 'react';
2
+ import { TextVariant } from '../Text';
2
3
  import { Prettify } from '../../../utils/prettify';
3
4
  export type LabelClassNames = {
4
5
  root?: string;
@@ -8,6 +9,8 @@ export type LabelClassNames = {
8
9
  export type LabelProps = Omit<LabelHTMLAttributes<HTMLLabelElement>, "children"> & {
9
10
  children?: ReactNode;
10
11
  required?: boolean;
12
+ /** Text size for the label copy. Default `base`. */
13
+ variant?: TextVariant;
11
14
  classNames?: Prettify<LabelClassNames>;
12
15
  };
13
16
  export type LabelClassNamesProviderProps = {
@@ -23,4 +26,5 @@ export type UseLabelRootStateProps = Pick<LabelProps, "required" | "htmlFor" | "
23
26
  export type LabelContentProps = {
24
27
  children?: ReactNode;
25
28
  required: boolean;
29
+ variant?: TextVariant;
26
30
  };
@@ -1,6 +1,6 @@
1
1
  import { LinkIcon } from './linkParts';
2
2
  import { LinkProps } from './linkTypes';
3
- export type { LinkProps, LinkSize, LinkIconPosition, LinkIconProps, LinkClassNames, } from './linkTypes';
3
+ export type { LinkProps, LinkSize, LinkIconPos, LinkIconProps, LinkClassNames, } from './linkTypes';
4
4
  export { LinkIcon };
5
5
  export declare const LinkRoot: import('react').ForwardRefExoticComponent<Omit<LinkProps, "classNames"> & import('react').RefAttributes<HTMLAnchorElement>>;
6
6
  export declare const Link: import('react').ForwardRefExoticComponent<LinkProps & import('react').RefAttributes<HTMLAnchorElement>>;
@@ -6,4 +6,4 @@ export type LinkComponent = ((props: LinkProps & RefAttributes<HTMLAnchorElement
6
6
  };
7
7
  declare const LinkCompound: LinkComponent;
8
8
  export { LinkCompound as Link };
9
- export type { LinkProps, LinkSize, LinkIconPosition, LinkIconProps, LinkClassNames, } from './linkTypes';
9
+ export type { LinkProps, LinkSize, LinkIconPos, LinkIconProps, LinkClassNames, } from './linkTypes';