@phreshos/react-ui 0.1.36 → 0.1.38

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 (202) hide show
  1. package/README.md +147 -167
  2. package/dist/accordion.d.ts +7 -6
  3. package/dist/accordion.js +5 -5
  4. package/dist/alert-dialog.d.ts +2 -2
  5. package/dist/alert-dialog.js +3 -1
  6. package/dist/alert.d.ts +17 -0
  7. package/dist/alert.js +30 -0
  8. package/dist/app-layout.d.ts +13 -0
  9. package/dist/app-layout.js +84 -0
  10. package/dist/button.d.ts +31 -27
  11. package/dist/button.js +48 -40
  12. package/dist/calendar-layout.d.ts +9 -5
  13. package/dist/calendar-layout.js +67 -78
  14. package/dist/calendar-trigger.d.ts +4 -4
  15. package/dist/calendar-trigger.js +7 -29
  16. package/dist/calendar.d.ts +2 -2
  17. package/dist/calendar.js +6 -5
  18. package/dist/checkbox.d.ts +4 -4
  19. package/dist/checkbox.js +16 -6
  20. package/dist/color-area.d.ts +20 -0
  21. package/dist/color-area.js +30 -0
  22. package/dist/color-field.d.ts +17 -0
  23. package/dist/color-field.js +17 -0
  24. package/dist/color-picker.d.ts +24 -0
  25. package/dist/color-picker.js +30 -0
  26. package/dist/color-slider.d.ts +19 -0
  27. package/dist/color-slider.js +29 -0
  28. package/dist/color-swatch-picker.d.ts +23 -0
  29. package/dist/color-swatch-picker.js +36 -0
  30. package/dist/color-swatch.d.ts +18 -0
  31. package/dist/color-swatch.js +20 -0
  32. package/dist/combo-box.d.ts +18 -10
  33. package/dist/combo-box.js +43 -58
  34. package/dist/context-menu.d.ts +14 -10
  35. package/dist/context-menu.js +7 -6
  36. package/dist/control/color-thumb.d.ts +13 -0
  37. package/dist/control/color-thumb.js +33 -0
  38. package/dist/control/color-value.d.ts +6 -0
  39. package/dist/control/color-value.js +7 -0
  40. package/dist/control/control.d.ts +60 -0
  41. package/dist/control/control.js +71 -0
  42. package/dist/control/field-button.d.ts +13 -0
  43. package/dist/control/field-button.js +28 -0
  44. package/dist/control/field.d.ts +20 -0
  45. package/dist/control/field.js +34 -0
  46. package/dist/control/icon.d.ts +11 -0
  47. package/dist/control/icon.js +8 -0
  48. package/dist/control/item.d.ts +37 -0
  49. package/dist/control/item.js +57 -0
  50. package/dist/control/open-state.d.ts +25 -0
  51. package/dist/control/open-state.js +8 -0
  52. package/dist/control/selection-track.d.ts +39 -0
  53. package/dist/control/selection-track.js +122 -0
  54. package/dist/control/selection.d.ts +44 -0
  55. package/dist/{selection.js → control/selection.js} +16 -0
  56. package/dist/control/surface-render.d.ts +10 -0
  57. package/dist/control/surface-render.js +12 -0
  58. package/dist/control/text-control.d.ts +32 -0
  59. package/dist/control/text-control.js +31 -0
  60. package/dist/control/toggle.d.ts +32 -0
  61. package/dist/control/toggle.js +80 -0
  62. package/dist/date-control.d.ts +9 -9
  63. package/dist/date-control.js +31 -34
  64. package/dist/date-field.d.ts +7 -6
  65. package/dist/date-field.js +8 -6
  66. package/dist/date-picker.d.ts +13 -6
  67. package/dist/date-picker.js +9 -6
  68. package/dist/date-range-picker.d.ts +15 -6
  69. package/dist/date-range-picker.js +12 -9
  70. package/dist/dialog.d.ts +29 -15
  71. package/dist/dialog.js +37 -28
  72. package/dist/disclosure.d.ts +8 -7
  73. package/dist/disclosure.js +31 -52
  74. package/dist/drop-zone.d.ts +18 -0
  75. package/dist/drop-zone.js +32 -0
  76. package/dist/dropdown-menu.d.ts +11 -8
  77. package/dist/dropdown-menu.js +5 -4
  78. package/dist/fieldset.d.ts +13 -0
  79. package/dist/fieldset.js +26 -0
  80. package/dist/file-trigger.d.ts +13 -0
  81. package/dist/file-trigger.js +6 -0
  82. package/dist/flex.d.ts +1 -1
  83. package/dist/flex.js +5 -4
  84. package/dist/foundation/appearance.d.ts +83 -0
  85. package/dist/foundation/appearance.js +38 -0
  86. package/dist/{aria-direction.js → foundation/aria-direction.js} +3 -1
  87. package/dist/foundation/color.d.ts +61 -0
  88. package/dist/foundation/color.js +247 -0
  89. package/dist/{layout.d.ts → foundation/layout.d.ts} +6 -4
  90. package/dist/{layout.js → foundation/layout.js} +7 -5
  91. package/dist/foundation/motion-style.d.ts +9 -0
  92. package/dist/foundation/motion-style.js +50 -0
  93. package/dist/foundation/preferences.d.ts +15 -0
  94. package/dist/{ui-provider.d.ts → foundation/provider.d.ts} +9 -5
  95. package/dist/{ui-provider.js → foundation/provider.js} +18 -27
  96. package/dist/{radius.d.ts → foundation/radius.d.ts} +6 -3
  97. package/dist/foundation/radius.js +11 -0
  98. package/dist/foundation/spacing.d.ts +11 -0
  99. package/dist/foundation/spacing.js +4 -0
  100. package/dist/foundation/visual.d.ts +42 -0
  101. package/dist/{appearance-context.js → foundation/visual.js} +41 -27
  102. package/dist/grid.d.ts +1 -1
  103. package/dist/grid.js +5 -4
  104. package/dist/icons/main.d.ts +5 -3
  105. package/dist/icons/main.js +5 -3
  106. package/dist/input.d.ts +2 -2
  107. package/dist/input.js +9 -7
  108. package/dist/list-box.d.ts +24 -19
  109. package/dist/list-box.js +52 -109
  110. package/dist/main.d.ts +28 -17
  111. package/dist/main.js +22 -9
  112. package/dist/menu.d.ts +28 -32
  113. package/dist/menu.js +47 -93
  114. package/dist/number-field.d.ts +17 -0
  115. package/dist/number-field.js +28 -0
  116. package/dist/panel.d.ts +10 -5
  117. package/dist/panel.js +33 -12
  118. package/dist/popover.d.ts +26 -12
  119. package/dist/popover.js +22 -15
  120. package/dist/progress-bar.d.ts +8 -10
  121. package/dist/progress-bar.js +18 -34
  122. package/dist/radio.d.ts +15 -12
  123. package/dist/radio.js +27 -37
  124. package/dist/range-calendar.d.ts +5 -3
  125. package/dist/range-calendar.js +8 -7
  126. package/dist/scroll-area.d.ts +2 -2
  127. package/dist/scroll-area.js +10 -9
  128. package/dist/segmented-control.d.ts +23 -0
  129. package/dist/segmented-control.js +38 -0
  130. package/dist/select.d.ts +40 -13
  131. package/dist/select.js +63 -18
  132. package/dist/slider.d.ts +7 -3
  133. package/dist/slider.js +51 -50
  134. package/dist/spinner.d.ts +5 -8
  135. package/dist/spinner.js +12 -27
  136. package/dist/surface/grain.d.ts +12 -0
  137. package/dist/surface/grain.js +65 -0
  138. package/dist/{material-options.d.ts → surface/material-options.d.ts} +1 -2
  139. package/dist/{material-options.js → surface/material-options.js} +2 -2
  140. package/dist/surface/paint-class.d.ts +13 -0
  141. package/dist/surface/paint-class.js +47 -0
  142. package/dist/{shadow-options.d.ts → surface/shadow-options.d.ts} +13 -1
  143. package/dist/{shadow-options.js → surface/shadow-options.js} +17 -2
  144. package/dist/surface/surface.d.ts +80 -0
  145. package/dist/surface/surface.js +239 -0
  146. package/dist/switch.d.ts +4 -5
  147. package/dist/switch.js +17 -8
  148. package/dist/table.d.ts +29 -32
  149. package/dist/table.js +68 -106
  150. package/dist/tabs.d.ts +16 -15
  151. package/dist/tabs.js +44 -86
  152. package/dist/textarea.d.ts +2 -2
  153. package/dist/textarea.js +10 -14
  154. package/dist/time-field.d.ts +6 -6
  155. package/dist/time-field.js +8 -6
  156. package/dist/toolbar.d.ts +6 -4
  157. package/dist/toolbar.js +16 -15
  158. package/dist/tooltip.d.ts +17 -8
  159. package/dist/tooltip.js +17 -15
  160. package/dist/tree.d.ts +22 -27
  161. package/dist/tree.js +54 -99
  162. package/dist/window.d.ts +4 -4
  163. package/dist/window.js +18 -20
  164. package/package.json +3 -3
  165. package/dist/appearance-context.d.ts +0 -54
  166. package/dist/appearance.d.ts +0 -11
  167. package/dist/appearance.js +0 -11
  168. package/dist/color.d.ts +0 -69
  169. package/dist/color.js +0 -192
  170. package/dist/control-surface.d.ts +0 -20
  171. package/dist/control-surface.js +0 -11
  172. package/dist/control.d.ts +0 -70
  173. package/dist/control.js +0 -105
  174. package/dist/field-style.d.ts +0 -3
  175. package/dist/field-style.js +0 -12
  176. package/dist/material-paint.d.ts +0 -13
  177. package/dist/material-paint.js +0 -119
  178. package/dist/motion-style.d.ts +0 -13
  179. package/dist/motion-style.js +0 -75
  180. package/dist/preferences.d.ts +0 -12
  181. package/dist/radius.js +0 -11
  182. package/dist/readiness.d.ts +0 -37
  183. package/dist/readiness.js +0 -134
  184. package/dist/selection.d.ts +0 -18
  185. package/dist/spacing.d.ts +0 -8
  186. package/dist/spacing.js +0 -8
  187. package/dist/surface-edge.d.ts +0 -11
  188. package/dist/surface-edge.js +0 -55
  189. package/dist/surface.d.ts +0 -27
  190. package/dist/surface.js +0 -92
  191. package/dist/text-control.d.ts +0 -10
  192. package/dist/text-control.js +0 -0
  193. package/dist/toggle-indicator.d.ts +0 -18
  194. package/dist/toggle-indicator.js +0 -49
  195. /package/dist/{aria-direction.d.ts → foundation/aria-direction.d.ts} +0 -0
  196. /package/dist/{direction.d.ts → foundation/direction.d.ts} +0 -0
  197. /package/dist/{direction.js → foundation/direction.js} +0 -0
  198. /package/dist/{overlay-placement.d.ts → foundation/overlay-placement.d.ts} +0 -0
  199. /package/dist/{overlay-placement.js → foundation/overlay-placement.js} +0 -0
  200. /package/dist/{preferences.js → foundation/preferences.js} +0 -0
  201. /package/dist/{scale.d.ts → foundation/scale.d.ts} +0 -0
  202. /package/dist/{scale.js → foundation/scale.js} +0 -0
package/dist/menu.d.ts CHANGED
@@ -1,51 +1,47 @@
1
1
  import type { CSSProperties, ReactElement, RefAttributes } from "react";
2
2
  import type { HeaderProps as AriaHeaderProps, MenuItemProps as AriaMenuItemProps, MenuProps as AriaMenuProps, MenuSectionProps as AriaMenuSectionProps, SeparatorProps as AriaSeparatorProps } from "react-aria-components";
3
- import { type ControlColor } from "./control.js";
4
- import type { ScaleLevel } from "./scale.js";
5
- import { type MultipleStringSelection, type MultipleStringSelectionProps, type SingleStringSelectionProps } from "./selection.js";
6
- type MenuRootBaseProps<T extends object> = Omit<AriaMenuProps<T>, "className" | "defaultSelectedKeys" | "disabledKeys" | "onAction" | "onSelectionChange" | "selectedKeys" | "selectionMode" | "style"> & Readonly<{
7
- readonly className?: string;
8
- readonly color?: ControlColor;
9
- readonly disabledValues?: readonly string[];
10
- readonly onItemAction?: (value: string) => void;
11
- readonly size?: ScaleLevel;
12
- readonly style?: CSSProperties;
13
- }>;
14
- export type MenuNoSelectionProps = Readonly<{
15
- selectionMode?: "none";
16
- value?: never;
17
- defaultValue?: never;
18
- onChange?: never;
19
- }>;
20
- export type MenuSingleSelectionProps = SingleStringSelectionProps & Readonly<{
21
- selectionMode: "single";
3
+ import { type MultipleSelectionProps, type MultipleStringSelection, type NoSelectionProps, type SingleSelectionProps } from "./control/selection.js";
4
+ import type { Color } from "./foundation/color.js";
5
+ import type { RadiusProps } from "./foundation/radius.js";
6
+ import type { ScaleLevel } from "./foundation/scale.js";
7
+ type MenuRootBaseProps<T extends object> = Omit<AriaMenuProps<T>, "className" | "defaultSelectedKeys" | "disabledKeys" | "onAction" | "onSelectionChange" | "selectedKeys" | "selectionMode" | "style" | "shouldFocusWrap" | "shouldCloseOnSelect"> & RadiusProps & Readonly<{
8
+ className?: string;
9
+ /** Whether activating an Item closes the menu. Defaults to `true`. */
10
+ closeOnSelect?: boolean;
11
+ /** Color laid beneath selected Items. */
12
+ color?: Color;
13
+ /** Whether arrow keys wrap from the last Item to the first. */
14
+ focusWrap?: boolean;
15
+ /** Runs with the value of the Item that was activated. */
16
+ onAction?: (value: string) => void;
17
+ size?: ScaleLevel;
18
+ style?: CSSProperties;
22
19
  }>;
20
+ export type MenuNoSelectionProps = NoSelectionProps;
21
+ export type MenuSingleSelectionProps = SingleSelectionProps;
23
22
  export type MenuMultipleValue = MultipleStringSelection;
24
- export type MenuMultipleSelectionProps = MultipleStringSelectionProps & Readonly<{
25
- selectionMode: "multiple";
26
- }>;
23
+ export type MenuMultipleSelectionProps = MultipleSelectionProps;
27
24
  export type MenuRootProps<T extends object = object> = MenuRootBaseProps<T> & (MenuNoSelectionProps | MenuSingleSelectionProps | MenuMultipleSelectionProps);
28
25
  export type MenuRootComponent = <T extends object = object>(properties: MenuRootProps<T> & RefAttributes<HTMLDivElement>) => ReactElement | null;
29
- export declare const MenuRoot: MenuRootComponent;
30
- export interface MenuItemProps<T = object> extends Omit<AriaMenuItemProps<T>, "className" | "id" | "isDisabled" | "style"> {
26
+ export interface MenuItemProps<T = object> extends Omit<AriaMenuItemProps<T>, "className" | "id" | "isDisabled" | "render" | "style" | "shouldCloseOnSelect"> {
27
+ /** Identity of this Item within its Menu. */
28
+ readonly id: string;
31
29
  readonly className?: string;
32
- readonly color?: ControlColor;
30
+ /** Whether activating this Item closes the menu, overriding the Menu. */
31
+ readonly closeOnSelect?: boolean;
32
+ /** Color laid beneath this Item when it is selected. */
33
+ readonly color?: Color;
33
34
  readonly disabled?: boolean;
34
- readonly id?: string;
35
35
  readonly style?: CSSProperties;
36
36
  }
37
37
  export type MenuItemComponent = <T = object>(properties: MenuItemProps<T> & RefAttributes<HTMLDivElement>) => ReactElement | null;
38
- export declare const MenuItem: MenuItemComponent;
39
- export type MenuSectionProps<T extends object = object> = AriaMenuSectionProps<T>;
40
- export declare const MenuSection: <T>(props: AriaMenuSectionProps<T> & React.RefAttributes<HTMLElement>) => ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
38
+ export type MenuSectionProps<T extends object = object> = Omit<AriaMenuSectionProps<T>, "defaultSelectedKeys" | "selectedKeys" | "onSelectionChange" | "selectionMode" | "disallowEmptySelection" | "shouldCloseOnSelect">;
41
39
  export type MenuHeaderProps = AriaHeaderProps;
42
- export declare const MenuHeader: import("react").ForwardRefExoticComponent<AriaHeaderProps & RefAttributes<HTMLElement>>;
43
40
  export type MenuSeparatorProps = AriaSeparatorProps;
44
- export declare const MenuSeparator: import("react").ForwardRefExoticComponent<AriaSeparatorProps & RefAttributes<HTMLElement>>;
45
41
  /** A keyboard-navigable collection of commands or selectable options. */
46
42
  export declare const Menu: MenuRootComponent & {
47
43
  Item: MenuItemComponent;
48
- Section: <T>(props: AriaMenuSectionProps<T> & React.RefAttributes<HTMLElement>) => ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
44
+ Section: <T extends object = object>(properties: MenuSectionProps<T>) => ReactElement | null;
49
45
  Header: import("react").ForwardRefExoticComponent<AriaHeaderProps & RefAttributes<HTMLElement>>;
50
46
  Separator: import("react").ForwardRefExoticComponent<AriaSeparatorProps & RefAttributes<HTMLElement>>;
51
47
  };
package/dist/menu.js CHANGED
@@ -1,116 +1,70 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { createContext, forwardRef, useContext, useMemo } from "react";
3
3
  import { Header as AriaHeader, Menu as AriaMenu, MenuItem as AriaMenuItem, MenuSection as AriaMenuSection, Separator as AriaSeparator } from "react-aria-components";
4
- import { colorOpacity } from "./color.js";
5
- import { controlFontWeight, controlOpacity, useControlTheme } from "./control.js";
6
- import { multipleSelection, singleSelection, stringKey, toAriaSelection } from "./selection.js";
7
- const MenuThemeContext = createContext(null);
8
- const MenuRootImplementation = forwardRef(function MenuRoot(properties, ref) {
9
- const { className, color, defaultValue, disabledValues, onChange, onItemAction, selectionMode = "none", size = "medium", style, value, ...native } = properties;
10
- const theme = useControlTheme({ color, size });
11
- const context = useMemo(() => ({ color, size, theme }), [color, size, theme]);
12
- return _jsx(MenuThemeContext.Provider, { value: context, children: _jsx(AriaMenu, { ...native, ...selectionProperties(properties), ref: ref, className: className, disabledKeys: disabledValues, selectionMode: selectionMode === "none" ? undefined : selectionMode, onAction: onItemAction == null ? undefined : key => onItemAction(stringKey(key)), style: {
4
+ import { useControlMetrics } from "./control/control.js";
5
+ import { separatorColor } from "./control/field.js";
6
+ import { itemStyle, itemSurface, SelectionMark } from "./control/item.js";
7
+ import { ariaSelection, stringKey } from "./control/selection.js";
8
+ import { surfaceRender } from "./control/surface-render.js";
9
+ import { collectionHeaderStyle } from "./list-box.js";
10
+ const MenuStyleContext = createContext(null);
11
+ const MenuRootImplementation = forwardRef(function Menu(properties, ref) {
12
+ const { className, closeOnSelect, color = "primary", defaultValue: _defaultValue, focusWrap, onAction, onChange: _onChange, radius, selectionMode = "none", size, style, value: _value, ...native } = properties;
13
+ const metrics = useControlMetrics(size, radius);
14
+ // Items are controls: they take the control radius at their size.
15
+ const itemRadius = metrics.radius;
16
+ const context = useMemo(() => ({ color, metrics, itemRadius, selecting: selectionMode !== "none" }), [color, metrics, itemRadius, selectionMode]);
17
+ const selection = ariaSelection(properties, "none");
18
+ return _jsx(MenuStyleContext.Provider, { value: context, children: _jsx(AriaMenu, { ...native, ...selection, selectionMode: selection.selectionMode === "none" ? undefined : selection.selectionMode, shouldCloseOnSelect: closeOnSelect, shouldFocusWrap: focusWrap, ref: ref, className: className, onAction: onAction == null ? undefined : key => onAction(stringKey(key)), style: {
13
19
  display: "grid",
14
- gap: theme.gap,
15
- minWidth: theme.height * 4,
16
- padding: theme.gap,
20
+ gap: 2,
21
+ minWidth: metrics.height * 5,
22
+ padding: metrics.listInset,
17
23
  boxSizing: "border-box",
18
24
  outline: "none",
19
25
  fontFamily: "inherit",
20
- fontSize: theme.fontSize,
26
+ fontSize: metrics.fontSize,
21
27
  ...style
22
28
  } }) });
23
29
  });
24
- function selectionProperties(properties) {
25
- const selectedKeys = toAriaSelection(properties.value);
26
- const defaultSelectedKeys = toAriaSelection(properties.defaultValue);
27
- const onSelectionChange = properties.onChange == null
28
- ? undefined
29
- : (selection) => {
30
- if (properties.selectionMode === "multiple") {
31
- properties.onChange?.(multipleSelection(selection));
32
- return;
33
- }
34
- if (properties.selectionMode === "single")
35
- properties.onChange?.(singleSelection(selection));
36
- };
37
- return {
38
- ...(selectedKeys !== undefined ? { selectedKeys } : {}),
39
- ...(defaultSelectedKeys !== undefined ? { defaultSelectedKeys } : {}),
40
- ...(onSelectionChange !== undefined ? { onSelectionChange } : {})
41
- };
42
- }
43
- export const MenuRoot = MenuRootImplementation;
44
- const MenuItemImplementation = forwardRef(function MenuItem({ className, color, disabled = false, style, ...properties }, ref) {
45
- const inherited = useContext(MenuThemeContext);
46
- const item = { className, disabled, properties, ref, style };
47
- return inherited != null && color === undefined
48
- ? _jsx(MenuItemView, { ...item, theme: inherited.theme })
49
- : _jsx(ResolvedMenuItem, { ...item, color: color ?? inherited?.color, size: inherited?.size });
30
+ const MenuItemImplementation = forwardRef(function MenuItem({ children, className, closeOnSelect, color, disabled = false, style, textValue, ...properties }, ref) {
31
+ const { color: inherited, metrics, itemRadius, selecting } = useMenuStyle();
32
+ const itemColor = color ?? inherited;
33
+ return _jsx(AriaMenuItem, { ...properties, shouldCloseOnSelect: closeOnSelect, ref: ref, textValue: textValue ?? (typeof children === "string" ? children : undefined), className: className, isDisabled: disabled, render: surfaceRender("div", state => itemSurface(metrics.visual, itemColor, {
34
+ selected: state.isSelected,
35
+ // Keyboard focus moves the highlight through a menu the way the pointer does;
36
+ // pointer-restored focus alone must not keep an item highlighted.
37
+ hovered: state.isHovered || state.isFocusVisible,
38
+ pressed: state.isPressed,
39
+ focusVisible: false,
40
+ disabled: state.isDisabled
41
+ }, itemRadius)), style: { ...itemStyle(metrics, disabled), ...style }, children: state => _jsxs(_Fragment, { children: [typeof children === "function" ? children(state) : children, selecting && _jsx(SelectionMark, { visible: state.isSelected })] }) });
50
42
  });
51
- function ResolvedMenuItem({ color, size, ...properties }) {
52
- return _jsx(MenuItemView, { ...properties, theme: useControlTheme({ color, size }) });
53
- }
54
- function MenuItemView({ className, disabled, properties, ref, style, theme }) {
55
- return _jsx(AriaMenuItem, { ...properties, ref: ref, className: className, isDisabled: disabled, style: state => {
56
- const paint = state.isPressed
57
- ? theme.paints.palette.pressed
58
- : state.isHovered || state.isSelected
59
- ? theme.paints.palette.hover
60
- : { background: "transparent", color: "inherit" };
61
- return {
62
- ...theme.transition,
63
- display: "flex",
64
- alignItems: "center",
65
- justifyContent: "space-between",
66
- gap: theme.gap,
67
- minWidth: 0,
68
- minHeight: theme.height,
69
- paddingInline: Math.max(8, theme.spacing),
70
- boxSizing: "border-box",
71
- borderRadius: theme.radius,
72
- outline: state.isFocusVisible ? `1px solid ${theme.focusColor}` : "none",
73
- outlineOffset: 1,
74
- cursor: disabled ? "not-allowed" : "pointer",
75
- opacity: disabled ? controlOpacity.disabled : 1,
76
- userSelect: "none",
77
- ...paint,
78
- ...style
79
- };
80
- } });
81
- }
82
- export const MenuItem = MenuItemImplementation;
83
- export const MenuSection = AriaMenuSection;
84
- export const MenuHeader = forwardRef(function MenuHeader({ style, ...properties }, ref) {
85
- const theme = useMenuTheme();
86
- return _jsx(AriaHeader, { ...properties, ref: ref, style: {
87
- paddingInline: Math.max(8, theme.spacing),
88
- paddingBlock: theme.gap,
89
- fontWeight: controlFontWeight,
90
- opacity: controlOpacity.secondary,
91
- ...style
92
- } });
43
+ const MenuHeader = forwardRef(function MenuHeader({ style, ...properties }, ref) {
44
+ const { metrics } = useMenuStyle();
45
+ return _jsx(AriaHeader, { ...properties, ref: ref, style: collectionHeaderStyle(metrics, style) });
93
46
  });
94
- export const MenuSeparator = forwardRef(function MenuSeparator({ style, ...properties }, ref) {
95
- const theme = useMenuTheme();
47
+ const MenuSeparator = forwardRef(function MenuSeparator({ style, ...properties }, ref) {
48
+ const { metrics } = useMenuStyle();
96
49
  return _jsx(AriaSeparator, { ...properties, ref: ref, style: {
97
50
  height: 1,
98
- marginBlock: theme.gap,
51
+ marginBlock: 4,
52
+ marginInline: metrics.inset,
99
53
  border: 0,
100
- background: colorOpacity(theme.tint, controlOpacity.separator),
54
+ background: separatorColor(metrics),
101
55
  ...style
102
56
  } });
103
57
  });
104
- function useMenuTheme() {
105
- const inherited = useContext(MenuThemeContext);
106
- if (inherited == null)
58
+ function useMenuStyle() {
59
+ const context = useContext(MenuStyleContext);
60
+ if (context == null)
107
61
  throw new Error("Menu parts must be used inside Menu");
108
- return inherited.theme;
62
+ return context;
109
63
  }
110
64
  /** A keyboard-navigable collection of commands or selectable options. */
111
- export const Menu = Object.assign(MenuRoot, {
112
- Item: MenuItem,
113
- Section: MenuSection,
65
+ export const Menu = Object.assign(MenuRootImplementation, {
66
+ Item: MenuItemImplementation,
67
+ Section: AriaMenuSection,
114
68
  Header: MenuHeader,
115
69
  Separator: MenuSeparator
116
70
  });
@@ -0,0 +1,17 @@
1
+ import type { NumberFieldProps as AriaNumberFieldProps } from "react-aria-components";
2
+ import { type ControlOverrides, type ControlProps, type FieldProps } from "./control/control.js";
3
+ import type { RadiusProps } from "./foundation/radius.js";
4
+ import type { MaterialOverrides } from "./surface/material-options.js";
5
+ export interface NumberFieldProps extends Omit<AriaNumberFieldProps, ControlOverrides | "value" | "defaultValue" | "onChange" | "className" | "style">, ControlProps, FieldProps, RadiusProps, MaterialOverrides {
6
+ /** A number, or `null` while the field is empty. */
7
+ readonly value?: number | null;
8
+ readonly defaultValue?: number | null;
9
+ readonly onChange?: (value: number | null) => void;
10
+ readonly placeholder?: string;
11
+ readonly readOnly?: boolean;
12
+ }
13
+ /**
14
+ * A number typed or stepped within a range. It is formatted by the locale and
15
+ * `formatOptions`, such as a unit, and checked against its range on blur.
16
+ */
17
+ export declare const NumberField: import("react").ForwardRefExoticComponent<NumberFieldProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { Group, Input as AriaInput, NumberField as AriaNumberField } from "react-aria-components";
4
+ import { Minus, Plus } from "lucide-react";
5
+ import { useControlMetrics } from "./control/control.js";
6
+ import { FieldButton } from "./control/field-button.js";
7
+ import { FieldFeedback, FieldLabel, fieldStyle } from "./control/field.js";
8
+ import { iconProps } from "./control/icon.js";
9
+ import { surfaceRender } from "./control/surface-render.js";
10
+ import { nativeTextStyle } from "./control/text-control.js";
11
+ import MotionStyle, { textControlClass } from "./foundation/motion-style.js";
12
+ import { dimmedClass } from "./surface/surface.js";
13
+ /**
14
+ * A number typed or stepped within a range. It is formatted by the locale and
15
+ * `formatOptions`, such as a unit, and checked against its range on blur.
16
+ */
17
+ export const NumberField = forwardRef(function NumberField({ label, description, errorMessage, disabled, readOnly, required, invalid, value, defaultValue, onChange, size, color = "background", radius, style, className, placeholder, material, ...properties }, ref) {
18
+ const metrics = useControlMetrics(size, radius);
19
+ // React Aria spells an empty number as NaN; React UI spells it as null.
20
+ const number = (next) => next === null ? Number.NaN : next;
21
+ return _jsxs(AriaNumberField, { ...properties, ...(value !== undefined ? { value: number(value) } : {}), ...(defaultValue !== undefined ? { defaultValue: number(defaultValue) } : {}), onChange: next => onChange?.(Number.isNaN(next) ? null : next), className: dimmedClass(disabled ?? false, className), isDisabled: disabled, isReadOnly: readOnly, isRequired: required, isInvalid: invalid, style: fieldStyle(metrics, style), children: [_jsx(MotionStyle, {}), _jsx(FieldLabel, { label: label }), _jsxs(Group, { render: surfaceRender("div", group => ({
22
+ color,
23
+ depth: "recessed",
24
+ material,
25
+ radius: metrics.radius,
26
+ interaction: { hovered: group.isHovered, focusVisible: group.isFocusWithin, invalid: group.isInvalid, disabled: group.isDisabled }
27
+ })), style: { display: "grid", gridTemplateColumns: "minmax(0, 1fr) auto auto", alignItems: "center", minWidth: 0, height: metrics.height, paddingInlineEnd: 4 }, children: [_jsx(AriaInput, { ref: ref, placeholder: placeholder, className: textControlClass, style: { ...nativeTextStyle(metrics, false), paddingInlineEnd: metrics.gap, fontVariantNumeric: "tabular-nums" } }), _jsx(FieldButton, { slot: "decrement", metrics: metrics, children: _jsx(Minus, { ...iconProps(14) }) }), _jsx(FieldButton, { slot: "increment", metrics: metrics, children: _jsx(Plus, { ...iconProps(14) }) })] }), _jsx(FieldFeedback, { metrics: metrics, description: description, errorMessage: errorMessage })] });
28
+ });
package/dist/panel.d.ts CHANGED
@@ -1,15 +1,20 @@
1
1
  import type { ComponentProps, HTMLAttributes } from "react";
2
- import { type SurfaceProps } from "./surface.js";
3
- /** Optional content placed before the inset Panel surface. */
2
+ import { type SurfaceProps } from "./surface/surface.js";
3
+ /** Optional heading placed before the inset Panel content. */
4
4
  export type PanelHeaderProps = HTMLAttributes<HTMLDivElement>;
5
5
  export declare const PanelHeader: import("react").ForwardRefExoticComponent<PanelHeaderProps & import("react").RefAttributes<HTMLDivElement>>;
6
- /** The material shell that owns a Panel's vertical composition. */
6
+ /** The raised, frosted shell that owns a Panel's vertical composition. */
7
7
  export type PanelRootProps = SurfaceProps;
8
8
  export declare const PanelRoot: import("react").ForwardRefExoticComponent<Omit<PanelRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
9
- /** The independently configurable inset Surface that owns Panel content. */
9
+ /**
10
+ * The inset region that holds a Panel's content. It is the Panel's own color,
11
+ * raised, with a more solid material than the frosted shell, so recessed
12
+ * fields inside it stand out. It sits `small` spacing inside the frame and
13
+ * pads its content by the Appearance spacing.
14
+ */
10
15
  export type PanelContentProps = SurfaceProps;
11
16
  export declare const PanelContent: import("react").ForwardRefExoticComponent<Omit<PanelContentProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
12
- /** A material shell whose named parts remain independently composable. */
17
+ /** A raised shell with an optional header and one inset content region. */
13
18
  export declare const Panel: import("react").ForwardRefExoticComponent<Omit<PanelRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
14
19
  Header: import("react").ForwardRefExoticComponent<PanelHeaderProps & import("react").RefAttributes<HTMLDivElement>>;
15
20
  Content: import("react").ForwardRefExoticComponent<Omit<PanelContentProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
package/dist/panel.js CHANGED
@@ -1,18 +1,34 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Children, createContext, forwardRef, isValidElement, useContext } from "react";
3
- import { useAppearance } from "./ui-provider.js";
4
- import { scale } from "./scale.js";
5
- import { Surface } from "./surface.js";
6
- const PanelContext = createContext({ hasHeader: false });
3
+ import { controlFontSizes, controlFontWeight } from "./control/control.js";
4
+ import { headerHeight } from "./foundation/layout.js";
5
+ import { resolveRadius } from "./foundation/radius.js";
6
+ import { scale } from "./foundation/scale.js";
7
+ import { useVisual } from "./foundation/visual.js";
8
+ import { paintClass, usePaintClasses } from "./surface/paint-class.js";
9
+ import { Surface } from "./surface/surface.js";
10
+ const PanelContext = createContext({ color: undefined, hasHeader: false, radius: undefined });
7
11
  export const PanelHeader = forwardRef(function PanelHeader({ style, ...properties }, ref) {
12
+ const { spacing } = useVisual();
13
+ // The same header row as a Window: its height and its side padding.
8
14
  return _jsx("div", { ...properties, ref: ref, style: {
15
+ boxSizing: "border-box",
16
+ // A grid keeps the header's content full width and centers it in the row.
17
+ display: "grid",
18
+ alignContent: "center",
9
19
  minWidth: 0,
20
+ minHeight: headerHeight(spacing),
21
+ paddingInline: spacing,
22
+ fontSize: controlFontSizes.medium,
23
+ fontWeight: controlFontWeight,
10
24
  ...style
11
25
  } });
12
26
  });
13
- export const PanelRoot = forwardRef(function PanelRoot({ children, style, ...properties }, ref) {
27
+ export const PanelRoot = forwardRef(function Panel({ children, style, ...properties }, ref) {
14
28
  const hasHeader = Children.toArray(children).some(child => isValidElement(child) && child.type === PanelHeader);
15
- return _jsx(PanelContext.Provider, { value: { hasHeader }, children: _jsx(Surface, { ...properties, ref: ref, style: {
29
+ // The shell and its content share one radius: the Appearance radius.
30
+ const radius = resolveRadius(properties.radius ?? "medium", useVisual().radius);
31
+ return _jsx(PanelContext.Provider, { value: { color: properties.color, hasHeader, radius }, children: _jsx(Surface, { material: "full", ...properties, ref: ref, radius: radius, style: {
16
32
  display: "grid",
17
33
  gridTemplateRows: hasHeader ? "auto minmax(0, 1fr)" : "minmax(0, 1fr)",
18
34
  minWidth: 0,
@@ -21,11 +37,16 @@ export const PanelRoot = forwardRef(function PanelRoot({ children, style, ...pro
21
37
  ...style
22
38
  }, children: children }) });
23
39
  });
24
- export const PanelContent = forwardRef(function PanelContent({ style, ...properties }, ref) {
25
- const inset = scale(useAppearance().spacing, "small");
26
- const { hasHeader } = useContext(PanelContext);
27
- return _jsx(Surface, { ...properties, ref: ref, style: {
28
- position: "relative",
40
+ export const PanelContent = forwardRef(function PanelContent({ className, style, ...properties }, ref) {
41
+ const { spacing } = useVisual();
42
+ const inset = scale(spacing, "small");
43
+ const padding = scale(spacing, "medium");
44
+ const { color, hasHeader, radius } = useContext(PanelContext);
45
+ // A zero-specificity class keeps the padding a default: any consumer class
46
+ // or style still sets its own.
47
+ const padded = usePaintClasses() ? paintClass(`padding: ${padding}px`) : undefined;
48
+ return _jsx(Surface, { color: color, material: "extended", radius: radius, ...properties, ref: ref, className: [padded, className].filter(Boolean).join(" ") || undefined, style: {
49
+ ...(padded === undefined ? { padding } : {}),
29
50
  minWidth: 0,
30
51
  minHeight: 0,
31
52
  margin: inset,
@@ -34,7 +55,7 @@ export const PanelContent = forwardRef(function PanelContent({ style, ...propert
34
55
  ...style
35
56
  } });
36
57
  });
37
- /** A material shell whose named parts remain independently composable. */
58
+ /** A raised shell with an optional header and one inset content region. */
38
59
  export const Panel = Object.assign(PanelRoot, {
39
60
  Header: PanelHeader,
40
61
  Content: PanelContent
package/dist/popover.d.ts CHANGED
@@ -1,14 +1,24 @@
1
1
  import type { ComponentProps, CSSProperties, ReactNode } from "react";
2
- import type { DialogProps as AriaDialogProps, DialogTriggerProps as AriaDialogTriggerProps, HeadingProps as AriaHeadingProps, PopoverProps as AriaPopoverProps } from "react-aria-components";
3
- import { type ButtonProps } from "./button.js";
4
- import { type SurfaceOwnProps } from "./surface.js";
5
- export type PopoverRootProps = AriaDialogTriggerProps;
6
- export declare function PopoverRoot(properties: PopoverRootProps): import("react").JSX.Element;
7
- export type PopoverTriggerProps = ButtonProps;
8
- export declare const PopoverTrigger: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
9
- export interface PopoverContentProps extends Omit<AriaPopoverProps, "children" | "className" | "color" | "style">, SurfaceOwnProps {
2
+ import type { DialogProps as AriaDialogProps, HeadingProps as AriaHeadingProps, PopoverProps as AriaPopoverProps } from "react-aria-components";
3
+ import { type ButtonActionProps } from "./button.js";
4
+ import { type AriaOverlayInternals, type OverlayRootProps } from "./control/open-state.js";
5
+ import { type Direction } from "./foundation/direction.js";
6
+ import { type SurfaceOwnProps } from "./surface/surface.js";
7
+ export type PopoverRootProps = OverlayRootProps;
8
+ export declare function PopoverRoot({ children, ...state }: PopoverRootProps): import("react").JSX.Element;
9
+ export type PopoverTriggerProps = ButtonActionProps;
10
+ export declare const PopoverTrigger: import("react").ForwardRefExoticComponent<ButtonActionProps & import("react").RefAttributes<HTMLButtonElement>>;
11
+ /**
12
+ * The floating Surface of an overlay. Its open state belongs to the family
13
+ * root, so this part takes placement, its own Surface, and ordinary element
14
+ * attributes.
15
+ */
16
+ export interface PopoverContentProps extends Omit<AriaPopoverProps, AriaOverlayInternals | "children" | "className" | "color" | "style" | "dir">, SurfaceOwnProps {
10
17
  readonly children?: ReactNode;
11
18
  readonly className?: string;
19
+ readonly dir?: Direction;
20
+ /** DOM container that owns the positioned overlay's coordinate space. */
21
+ readonly portalContainer?: Element;
12
22
  readonly style?: CSSProperties;
13
23
  }
14
24
  export declare const PopoverContent: import("react").ForwardRefExoticComponent<PopoverContentProps & import("react").RefAttributes<HTMLElement>>;
@@ -16,14 +26,18 @@ export type PopoverDialogProps = AriaDialogProps;
16
26
  export declare const PopoverDialog: import("react").ForwardRefExoticComponent<AriaDialogProps & import("react").RefAttributes<HTMLElement>>;
17
27
  export type PopoverTitleProps = AriaHeadingProps;
18
28
  export declare const PopoverTitle: import("react").ForwardRefExoticComponent<AriaHeadingProps & import("react").RefAttributes<HTMLHeadingElement>>;
19
- export type PopoverCloseProps = ButtonProps;
20
- export declare const PopoverClose: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
29
+ export type PopoverCloseProps = ButtonActionProps;
30
+ export declare const PopoverClose: import("react").ForwardRefExoticComponent<ButtonActionProps & import("react").RefAttributes<HTMLButtonElement>>;
31
+ /** Positioned content that holds a Menu; it keeps the Appearance radius like every shell. */
32
+ export declare const MenuContent: import("react").ForwardRefExoticComponent<PopoverContentProps & Readonly<{
33
+ nonModal?: boolean;
34
+ }> & import("react").RefAttributes<HTMLElement>>;
21
35
  /** An anchored non-modal overlay with explicit trigger, surface, and dialog roles. */
22
36
  export declare const Popover: typeof PopoverRoot & {
23
- Trigger: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
37
+ Trigger: import("react").ForwardRefExoticComponent<ButtonActionProps & import("react").RefAttributes<HTMLButtonElement>>;
24
38
  Content: import("react").ForwardRefExoticComponent<PopoverContentProps & import("react").RefAttributes<HTMLElement>>;
25
39
  Dialog: import("react").ForwardRefExoticComponent<AriaDialogProps & import("react").RefAttributes<HTMLElement>>;
26
40
  Title: import("react").ForwardRefExoticComponent<AriaHeadingProps & import("react").RefAttributes<HTMLHeadingElement>>;
27
- Close: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
41
+ Close: import("react").ForwardRefExoticComponent<ButtonActionProps & import("react").RefAttributes<HTMLButtonElement>>;
28
42
  };
29
43
  export type PopoverProps = ComponentProps<typeof PopoverRoot>;
package/dist/popover.js CHANGED
@@ -1,26 +1,28 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import { Dialog as AriaDialog, DialogTrigger as AriaDialogTrigger, Heading as AriaHeading, Popover as AriaPopover } from "react-aria-components";
4
- import { useResolvedAppearance } from "./appearance-context.js";
5
4
  import { Button } from "./button.js";
6
- import { controlFontSizes, controlFontWeight } from "./control.js";
7
- import MotionStyle, { overlayMotionClass, overlayTransition } from "./motion-style.js";
8
- import { scale } from "./scale.js";
9
- import { Surface } from "./surface.js";
10
- import { resolveDirection, useDirection } from "./direction.js";
11
- import { resolveDirectionalPlacement } from "./overlay-placement.js";
12
- export function PopoverRoot(properties) {
13
- return _jsx(AriaDialogTrigger, { ...properties });
5
+ import { controlFontSizes, controlFontWeight } from "./control/control.js";
6
+ import { ariaOpenState } from "./control/open-state.js";
7
+ import { resolveDirection, useDirection } from "./foundation/direction.js";
8
+ import MotionStyle, { overlayMotionClass, overlayTransition } from "./foundation/motion-style.js";
9
+ import { resolveDirectionalPlacement } from "./foundation/overlay-placement.js";
10
+ import { scale } from "./foundation/scale.js";
11
+ import { useVisual } from "./foundation/visual.js";
12
+ import { floatingShadow } from "./surface/shadow-options.js";
13
+ import { Surface } from "./surface/surface.js";
14
+ export function PopoverRoot({ children, ...state }) {
15
+ return _jsx(AriaDialogTrigger, { ...ariaOpenState(state), children: children });
14
16
  }
15
17
  export const PopoverTrigger = forwardRef(function PopoverTrigger(properties, ref) {
16
18
  return _jsx(Button, { ...properties, ref: ref });
17
19
  });
18
- export const PopoverContent = forwardRef(function PopoverContent({ children, className, color, material, radius, shadow, style, offset, placement = "bottom", ...properties }, ref) {
19
- const resolved = useResolvedAppearance();
20
- const inset = scale(resolved.appearance.spacing, "small");
21
- const transition = overlayTransition(resolved.transaction, resolved.preferences.animations);
22
- const direction = resolveDirection(properties.dir, useDirection());
23
- return _jsxs(_Fragment, { children: [_jsx(MotionStyle, {}), _jsx(AriaPopover, { ...properties, ref: ref, dir: direction, offset: offset ?? inset, placement: resolveDirectionalPlacement(placement, direction), className: overlayMotionClass, style: transition, children: _jsx(Surface, { dir: direction, className: className, color: color, material: material, radius: radius, shadow: shadow, style: {
20
+ const PositionedContent = forwardRef(function PositionedContent({ children, className, color, material, radius, shadow, style, offset, placement = "bottom", nonModal, dir, portalContainer, ...attributes }, ref) {
21
+ const visual = useVisual();
22
+ const inset = scale(visual.spacing, "small");
23
+ const transition = overlayTransition(visual);
24
+ const direction = resolveDirection(dir, useDirection());
25
+ return _jsxs(_Fragment, { children: [_jsx(MotionStyle, {}), _jsx(AriaPopover, { ...attributes, isNonModal: nonModal, ref: ref, dir: direction, offset: offset ?? inset, placement: resolveDirectionalPlacement(placement, direction), UNSTABLE_portalContainer: portalContainer, className: overlayMotionClass, style: transition, children: _jsx(Surface, { dir: direction, className: className, color: color, material: material, shadow: shadow ?? floatingShadow(visual.shadow), radius: radius, style: {
24
26
  boxSizing: "border-box",
25
27
  maxWidth: `calc(100vw - ${inset * 2}px)`,
26
28
  maxHeight: `calc(100vh - ${inset * 2}px)`,
@@ -28,6 +30,9 @@ export const PopoverContent = forwardRef(function PopoverContent({ children, cla
28
30
  ...style
29
31
  }, children: children }) })] });
30
32
  });
33
+ export const PopoverContent = forwardRef(function PopoverContent(properties, ref) {
34
+ return _jsx(PositionedContent, { ...properties, ref: ref });
35
+ });
31
36
  export const PopoverDialog = forwardRef(function PopoverDialog({ style, ...properties }, ref) {
32
37
  return _jsx(AriaDialog, { ...properties, ref: ref, style: { minWidth: 0, outline: "none", ...style } });
33
38
  });
@@ -47,6 +52,8 @@ export const PopoverTitle = forwardRef(function PopoverTitle({ style, ...propert
47
52
  export const PopoverClose = forwardRef(function PopoverClose(properties, ref) {
48
53
  return _jsx(Button, { ...properties, ref: ref, slot: "close" });
49
54
  });
55
+ /** Positioned content that holds a Menu; it keeps the Appearance radius like every shell. */
56
+ export const MenuContent = PositionedContent;
50
57
  /** An anchored non-modal overlay with explicit trigger, surface, and dialog roles. */
51
58
  export const Popover = Object.assign(PopoverRoot, {
52
59
  Trigger: PopoverTrigger,
@@ -1,22 +1,20 @@
1
1
  import type { CSSProperties, ReactNode } from "react";
2
2
  import type { ProgressBarProps as AriaProgressBarProps } from "react-aria-components";
3
- import type { ControlColor } from "./control.js";
4
- import type { ScaleLevel } from "./scale.js";
3
+ import { type Color } from "./foundation/color.js";
4
+ import type { ScaleLevel } from "./foundation/scale.js";
5
+ import type { MaterialOverrides } from "./surface/material-options.js";
5
6
  type NativeProgressBarProps = Omit<AriaProgressBarProps, "children" | "className" | "isIndeterminate" | "style">;
6
- export interface ProgressBarProps extends NativeProgressBarProps {
7
- /** Native class name applied without replacing the component contract. */
7
+ export interface ProgressBarProps extends NativeProgressBarProps, MaterialOverrides {
8
8
  readonly className?: string;
9
- /** Color used for the completed or moving portion. */
10
- readonly color?: ControlColor;
11
- /** Displays progress without asserting a current value. */
9
+ /** Color of the completed or moving portion. */
10
+ readonly color?: Color;
11
+ /** Shows progress without asserting a current value. */
12
12
  readonly indeterminate?: boolean;
13
13
  /** Visible label associated with the progress value. */
14
14
  readonly label?: ReactNode;
15
- /** Derives typography and track thickness from Appearance. */
16
15
  readonly size?: ScaleLevel;
17
- /** Native styles applied after ProgressBar defaults. */
18
16
  readonly style?: CSSProperties;
19
17
  }
20
- /** Determinate or indeterminate progress for an operation over time. */
18
+ /** Progress over time: a recessed rail filled in the owner's color. */
21
19
  export declare const ProgressBar: import("react").ForwardRefExoticComponent<ProgressBarProps & import("react").RefAttributes<HTMLDivElement>>;
22
20
  export {};