@kabobcompany/react 0.0.0-stage → 0.2.0

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 (143) hide show
  1. package/GUIDE.md +210 -0
  2. package/dist/components/Accordion/Accordion.d.ts +48 -0
  3. package/dist/components/Accordion/index.d.ts +2 -0
  4. package/dist/components/Alert/Alert.d.ts +23 -0
  5. package/dist/components/Alert/index.d.ts +2 -0
  6. package/dist/components/AppBar/AppBar.d.ts +22 -0
  7. package/dist/components/AppBar/index.d.ts +2 -0
  8. package/dist/components/ArrowButton/ArrowButton.d.ts +20 -0
  9. package/dist/components/ArrowButton/index.d.ts +2 -0
  10. package/dist/components/Avatar/Avatar.d.ts +38 -0
  11. package/dist/components/Avatar/index.d.ts +2 -0
  12. package/dist/components/Badge/Badge.d.ts +30 -0
  13. package/dist/components/Badge/index.d.ts +2 -0
  14. package/dist/components/Breadcrumb/Breadcrumb.d.ts +21 -0
  15. package/dist/components/Breadcrumb/index.d.ts +2 -0
  16. package/dist/components/Button/Button.d.ts +22 -0
  17. package/dist/components/Button/index.d.ts +2 -0
  18. package/dist/components/Calendar/Calendar.d.ts +37 -0
  19. package/dist/components/Calendar/index.d.ts +2 -0
  20. package/dist/components/Card/Card.d.ts +13 -0
  21. package/dist/components/Card/index.d.ts +2 -0
  22. package/dist/components/Carousel/Carousel.d.ts +47 -0
  23. package/dist/components/Carousel/index.d.ts +2 -0
  24. package/dist/components/Checkbox/Checkbox.d.ts +9 -0
  25. package/dist/components/Checkbox/index.d.ts +2 -0
  26. package/dist/components/ChoiceChips/ChoiceChips.d.ts +45 -0
  27. package/dist/components/ChoiceChips/index.d.ts +2 -0
  28. package/dist/components/Combobox/Combobox.d.ts +23 -0
  29. package/dist/components/Combobox/index.d.ts +2 -0
  30. package/dist/components/DataTable/DataTable.d.ts +70 -0
  31. package/dist/components/DataTable/index.d.ts +2 -0
  32. package/dist/components/DateRange/DateRange.d.ts +39 -0
  33. package/dist/components/DateRange/index.d.ts +2 -0
  34. package/dist/components/DescriptionList/DescriptionList.d.ts +12 -0
  35. package/dist/components/DescriptionList/index.d.ts +2 -0
  36. package/dist/components/Dialog/Dialog.d.ts +29 -0
  37. package/dist/components/Dialog/index.d.ts +2 -0
  38. package/dist/components/Drawer/Drawer.d.ts +28 -0
  39. package/dist/components/Drawer/index.d.ts +2 -0
  40. package/dist/components/Dropdown/Dropdown.d.ts +65 -0
  41. package/dist/components/Dropdown/index.d.ts +2 -0
  42. package/dist/components/Editor/Editor.d.ts +60 -0
  43. package/dist/components/Editor/index.d.ts +2 -0
  44. package/dist/components/EmptyState/EmptyState.d.ts +17 -0
  45. package/dist/components/EmptyState/index.d.ts +2 -0
  46. package/dist/components/FileUpload/FileUpload.d.ts +29 -0
  47. package/dist/components/FileUpload/index.d.ts +2 -0
  48. package/dist/components/Filter/Filter.d.ts +27 -0
  49. package/dist/components/Filter/index.d.ts +2 -0
  50. package/dist/components/Floating/Floating.d.ts +50 -0
  51. package/dist/components/Floating/index.d.ts +4 -0
  52. package/dist/components/FormSection/FormSection.d.ts +40 -0
  53. package/dist/components/FormSection/index.d.ts +2 -0
  54. package/dist/components/IconButton/IconButton.d.ts +17 -0
  55. package/dist/components/IconButton/index.d.ts +2 -0
  56. package/dist/components/Input/Input.d.ts +57 -0
  57. package/dist/components/Input/index.d.ts +2 -0
  58. package/dist/components/Kbd/Kbd.d.ts +18 -0
  59. package/dist/components/Kbd/index.d.ts +2 -0
  60. package/dist/components/Layout/Layout.d.ts +127 -0
  61. package/dist/components/Layout/index.d.ts +2 -0
  62. package/dist/components/LayoutPicker/LayoutPicker.d.ts +69 -0
  63. package/dist/components/LayoutPicker/index.d.ts +2 -0
  64. package/dist/components/List/List.d.ts +67 -0
  65. package/dist/components/List/index.d.ts +2 -0
  66. package/dist/components/Marquee/Marquee.d.ts +24 -0
  67. package/dist/components/Marquee/index.d.ts +2 -0
  68. package/dist/components/Media/Media.d.ts +19 -0
  69. package/dist/components/Media/index.d.ts +2 -0
  70. package/dist/components/Menu/Menu.d.ts +15 -0
  71. package/dist/components/Menu/index.d.ts +2 -0
  72. package/dist/components/NumberBoard/NumberBoard.d.ts +47 -0
  73. package/dist/components/NumberBoard/index.d.ts +2 -0
  74. package/dist/components/NumberStepper/NumberStepper.d.ts +36 -0
  75. package/dist/components/NumberStepper/index.d.ts +2 -0
  76. package/dist/components/OptionCard/OptionCard.d.ts +66 -0
  77. package/dist/components/OptionCard/index.d.ts +2 -0
  78. package/dist/components/PageHeader/PageHeader.d.ts +25 -0
  79. package/dist/components/PageHeader/index.d.ts +2 -0
  80. package/dist/components/Pagination/Pagination.d.ts +10 -0
  81. package/dist/components/Pagination/index.d.ts +2 -0
  82. package/dist/components/Popover/Popover.d.ts +8 -0
  83. package/dist/components/Popover/index.d.ts +2 -0
  84. package/dist/components/Progress/Progress.d.ts +24 -0
  85. package/dist/components/Progress/index.d.ts +2 -0
  86. package/dist/components/QueueItem/QueueItem.d.ts +55 -0
  87. package/dist/components/QueueItem/index.d.ts +2 -0
  88. package/dist/components/Radio/Radio.d.ts +6 -0
  89. package/dist/components/Radio/index.d.ts +2 -0
  90. package/dist/components/Resizable/Resizable.d.ts +40 -0
  91. package/dist/components/Resizable/index.d.ts +2 -0
  92. package/dist/components/Schedule/Schedule.d.ts +17 -0
  93. package/dist/components/Schedule/index.d.ts +2 -0
  94. package/dist/components/ScreenHeader/Clock.d.ts +21 -0
  95. package/dist/components/ScreenHeader/ScreenHeader.d.ts +21 -0
  96. package/dist/components/ScreenHeader/index.d.ts +4 -0
  97. package/dist/components/SegmentedControl/SegmentedControl.d.ts +17 -0
  98. package/dist/components/SegmentedControl/index.d.ts +2 -0
  99. package/dist/components/Select/Select.d.ts +14 -0
  100. package/dist/components/Select/index.d.ts +2 -0
  101. package/dist/components/Separator/Separator.d.ts +21 -0
  102. package/dist/components/Separator/index.d.ts +2 -0
  103. package/dist/components/SideRail/SideRail.d.ts +18 -0
  104. package/dist/components/SideRail/index.d.ts +2 -0
  105. package/dist/components/Slider/Slider.d.ts +52 -0
  106. package/dist/components/Slider/index.d.ts +2 -0
  107. package/dist/components/Spinner/Spinner.d.ts +29 -0
  108. package/dist/components/Spinner/index.d.ts +2 -0
  109. package/dist/components/StatBar/StatBar.d.ts +18 -0
  110. package/dist/components/StatBar/index.d.ts +2 -0
  111. package/dist/components/Stepper/Stepper.d.ts +16 -0
  112. package/dist/components/Stepper/index.d.ts +2 -0
  113. package/dist/components/Summary/Summary.d.ts +10 -0
  114. package/dist/components/Summary/index.d.ts +2 -0
  115. package/dist/components/Switch/Switch.d.ts +10 -0
  116. package/dist/components/Switch/index.d.ts +2 -0
  117. package/dist/components/Tabs/Tabs.d.ts +14 -0
  118. package/dist/components/Tabs/index.d.ts +2 -0
  119. package/dist/components/TagInput/TagInput.d.ts +27 -0
  120. package/dist/components/TagInput/index.d.ts +2 -0
  121. package/dist/components/TicketNumber/TicketNumber.d.ts +39 -0
  122. package/dist/components/TicketNumber/index.d.ts +2 -0
  123. package/dist/components/TileCard/TileCard.d.ts +49 -0
  124. package/dist/components/TileCard/index.d.ts +2 -0
  125. package/dist/components/TimeInput/TimeInput.d.ts +10 -0
  126. package/dist/components/TimeInput/index.d.ts +2 -0
  127. package/dist/components/Timeline/Timeline.d.ts +83 -0
  128. package/dist/components/Timeline/index.d.ts +2 -0
  129. package/dist/components/Toast/Toast.d.ts +15 -0
  130. package/dist/components/Toast/index.d.ts +2 -0
  131. package/dist/components/ToggleGroup/ToggleGroup.d.ts +72 -0
  132. package/dist/components/ToggleGroup/index.d.ts +2 -0
  133. package/dist/components/Tooltip/Tooltip.d.ts +21 -0
  134. package/dist/components/Tooltip/index.d.ts +2 -0
  135. package/dist/components/Tree/Tree.d.ts +18 -0
  136. package/dist/components/Tree/index.d.ts +2 -0
  137. package/dist/components/Typography/Typography.d.ts +64 -0
  138. package/dist/components/Typography/index.d.ts +2 -0
  139. package/dist/index.d.ts +68 -0
  140. package/dist/index.js +5075 -0
  141. package/dist/utils/floating.d.ts +29 -0
  142. package/package.json +39 -4
  143. package/README.md +0 -3
@@ -0,0 +1,49 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export type TileCardTone = 'brand' | 'neutral' | 'none';
3
+ export type TileCardIndicator = 'checkbox' | 'radio' | 'none';
4
+ export interface TileCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'onChange' | 'onSelect'> {
5
+ /** Card title. Shown in the header band (or centred when `solid`). */
6
+ title?: ReactNode;
7
+ /** Optional icon before the title (sized to the title, 1em). */
8
+ icon?: ReactNode;
9
+ /** Header band colour: `brand` accent band with white title (default), `neutral` grey band, `none` no band. */
10
+ tone?: TileCardTone;
11
+ /**
12
+ * Trailing selection mark. Also sets the ARIA role when selectable:
13
+ * `checkbox` → role="checkbox", `radio` → role="radio", `none` → role="button" with aria-pressed.
14
+ */
15
+ indicator?: TileCardIndicator;
16
+ /** Muted description in the body, clamped to two lines. */
17
+ description?: ReactNode;
18
+ /** Footer stats row, usually `TileStat` elements (laid out in equal columns). */
19
+ stats?: ReactNode;
20
+ /** Selected state: accent ring and tinted body; ticks the indicator. */
21
+ selected?: boolean;
22
+ /** Called with the next selected value when the card is activated (click, Enter or Space). */
23
+ onSelectedChange?: (selected: boolean) => void;
24
+ /**
25
+ * Make the card focusable and operable as a toggle. Defaults to true when `onSelectedChange` or
26
+ * `onClick` is given.
27
+ */
28
+ selectable?: boolean;
29
+ /** Dimmed and not operable. */
30
+ disabled?: boolean;
31
+ /** Whole card filled with the accent and content centred (e.g. a "talk to staff" option). */
32
+ solid?: boolean;
33
+ }
34
+ /**
35
+ * Large selectable tile for kiosk and touch screens: header band with a big title and a checkbox/radio
36
+ * mark, a short description and footer stats. Scales with `data-scale="kiosk"`.
37
+ * Figma: Tico RUN kiosk service selection (1:625).
38
+ */
39
+ export declare function TileCard({ title, icon, tone, indicator, description, stats, selected, onSelectedChange, selectable, disabled, solid, className, children, onClick, onKeyDown, ...rest }: TileCardProps): import('react').JSX.Element;
40
+ export interface TileStatProps extends HTMLAttributes<HTMLDivElement> {
41
+ /** Big number, e.g. `10`. */
42
+ value: ReactNode;
43
+ /** Small unit after the value, e.g. `ppl`, `mins`. */
44
+ unit?: ReactNode;
45
+ /** Caption under the value, e.g. "Wait In Line". */
46
+ caption?: ReactNode;
47
+ }
48
+ /** One statistic in a TileCard footer: big value + small unit, with a muted caption. */
49
+ export declare function TileStat({ value, unit, caption, className, ...rest }: TileStatProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { TileCard, TileStat } from './TileCard';
2
+ export type { TileCardProps, TileCardTone, TileCardIndicator, TileStatProps } from './TileCard';
@@ -0,0 +1,10 @@
1
+ import { InputProps } from '../Input/Input';
2
+ export interface TimeInputProps extends Omit<InputProps, 'type' | 'trailingIcon' | 'searchIcon' | 'suffix' | 'action'> {
3
+ /** Show a seconds field (sets `step` to 1 unless you pass one). */
4
+ withSeconds?: boolean;
5
+ }
6
+ /**
7
+ * Native time input with the Input look and a 16px clock glyph. Value is `HH:MM` (or `HH:MM:SS` with `withSeconds`).
8
+ * Accepts every Input prop: `label`, `hint`, `error`, `size`, `min`, `max`, `step`.
9
+ */
10
+ export declare function TimeInput({ withSeconds, step, className, ...rest }: TimeInputProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { TimeInput } from './TimeInput';
2
+ export type { TimeInputProps } from './TimeInput';
@@ -0,0 +1,83 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ /**
3
+ * A point in time. Either minutes (e.g. from midnight: 480 = 08:00, 1440 = 24:00) or a `Date`.
4
+ * Use one kind consistently for `start`, `end`, `now` and every item.
5
+ */
6
+ export type TimeValue = number | Date;
7
+ export type TimelineTone = 'accent' | 'neutral' | 'success' | 'warning' | 'error' | 'violet';
8
+ export interface TimelineItem {
9
+ id: string;
10
+ start: TimeValue;
11
+ end: TimeValue;
12
+ /** Bar text, e.g. the playlist or schedule name. */
13
+ label: ReactNode;
14
+ /** Bar colour. Default `accent`. */
15
+ tone?: TimelineTone;
16
+ /** Plain-text name for the accessible label / tooltip when `label` is not a string. */
17
+ title?: string;
18
+ }
19
+ export interface TimelineTrack {
20
+ id: string;
21
+ /** Row label, e.g. a screen or region name. Stays visible while scrolling horizontally. */
22
+ label: ReactNode;
23
+ /** Second line under the label, e.g. "Online · 1920×1080". */
24
+ meta?: ReactNode;
25
+ items: TimelineItem[];
26
+ }
27
+ export interface TimelineProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSelect'> {
28
+ /** Range start, e.g. `0` (00:00) or a Date. */
29
+ start: TimeValue;
30
+ /** Range end, e.g. `1440` (24:00) or a Date. */
31
+ end: TimeValue;
32
+ /** Rows to draw. Items overlapping in time stack into sub-rows within their track. */
33
+ tracks: TimelineTrack[];
34
+ /** Current time; draws a vertical line when inside the range. */
35
+ now?: TimeValue;
36
+ /** Id of the selected item (ring around the bar). */
37
+ selectedId?: string | null;
38
+ /** Makes items buttons; called when one is clicked or activated with Enter/Space. */
39
+ onSelect?: (item: TimelineItem, track: TimelineTrack) => void;
40
+ /** Zoom: pixel width of one hour. Default 80. */
41
+ pxPerHour?: number;
42
+ /** Width of the sticky label column, any CSS length. Default 160px (from CSS). */
43
+ labelWidth?: string;
44
+ /** Header text above the label column, e.g. "Screen". */
45
+ corner?: ReactNode;
46
+ /** Time formatter for ruler, bar times and accessible labels. Default `HH:MM`. */
47
+ formatTime?: (value: TimeValue) => string;
48
+ /** Hide the start–end time inside bars. Times still appear in the tooltip / accessible label. */
49
+ hideItemTimes?: boolean;
50
+ /** Shown when `tracks` is empty. */
51
+ emptyMessage?: ReactNode;
52
+ }
53
+ /**
54
+ * Horizontal time track for a day or any range: hour ruler, one row per track, bars per item, current-time
55
+ * line. Scrolls horizontally with the label column pinned. Works in light and dark themes.
56
+ */
57
+ export declare function Timeline({ start, end, tracks, now, selectedId, onSelect, pxPerHour, labelWidth, corner, formatTime, hideItemTimes, emptyMessage, className, style, ...rest }: TimelineProps): import('react').JSX.Element;
58
+ export interface PlaylistStripItem {
59
+ id: string;
60
+ /** Content name. */
61
+ label: ReactNode;
62
+ /** Play duration in seconds; sets the block's relative width. */
63
+ duration: number;
64
+ /** Image URL or a node (e.g. a media-type icon) shown at the left of the block. */
65
+ thumbnail?: string | ReactNode;
66
+ }
67
+ export interface PlaylistStripProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSelect'> {
68
+ items: PlaylistStripItem[];
69
+ /** Id of the highlighted block. */
70
+ selectedId?: string | null;
71
+ /** Makes blocks buttons; called when one is clicked. */
72
+ onSelect?: (item: PlaylistStripItem) => void;
73
+ /** Duration formatter (seconds → text). Default `MM:SS`, or `H:MM:SS` from one hour. */
74
+ formatDuration?: (seconds: number) => string;
75
+ /** Caption above the total. Default "Total". Pass `null` to hide the total. */
76
+ totalLabel?: ReactNode;
77
+ /** Shown when `items` is empty. */
78
+ emptyMessage?: ReactNode;
79
+ /** Accessible name for the list. Default "Playlist". */
80
+ label?: string;
81
+ }
82
+ /** Compact single-row playlist: blocks proportional to duration (with a minimum width), total at the end. */
83
+ export declare function PlaylistStrip({ items, selectedId, onSelect, formatDuration, totalLabel, emptyMessage, label, className, ...rest }: PlaylistStripProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Timeline, PlaylistStrip } from './Timeline';
2
+ export type { TimelineProps, TimelineTrack, TimelineItem, TimelineTone, TimeValue, PlaylistStripProps, PlaylistStripItem } from './Timeline';
@@ -0,0 +1,15 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface ToastProps extends HTMLAttributes<HTMLDivElement> {
3
+ /** Optional accent bar. Not in Figma; added for review. */
4
+ tone?: 'neutral' | 'success' | 'error';
5
+ onClose?: () => void;
6
+ children: ReactNode;
7
+ }
8
+ /** Dark bottom-centre notice (Figma 防止登出密碼設定成功). Render inside `ToastRegion`. */
9
+ export declare function Toast({ tone, onClose, className, children, ...rest }: ToastProps): import('react').JSX.Element;
10
+ export interface ToastRegionProps extends HTMLAttributes<HTMLDivElement> {
11
+ /** `bottom` (default) for toasts; `top` for page notices under the app bar (e.g. an `Alert` after a save). */
12
+ placement?: 'bottom' | 'top';
13
+ }
14
+ /** Fixed container at the bottom (or top) centre of the viewport. */
15
+ export declare function ToastRegion({ placement, className, children, ...rest }: ToastRegionProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Toast, ToastRegion } from './Toast';
2
+ export type { ToastProps } from './Toast';
@@ -0,0 +1,72 @@
1
+ import { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
2
+ export type ToggleSize = 'sm' | 'md' | 'lg';
3
+ export interface ToggleProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'value' | 'defaultValue'> {
4
+ /** Controlled pressed state. */
5
+ pressed?: boolean;
6
+ /** Initial pressed state when uncontrolled. */
7
+ defaultPressed?: boolean;
8
+ /** Called with the new pressed state. */
9
+ onPressedChange?: (pressed: boolean) => void;
10
+ /** 28 / 32 / 36px. @default 'md' */
11
+ size?: ToggleSize;
12
+ /** Square icon-only button. Give it an `aria-label`. */
13
+ icon?: boolean;
14
+ children?: ReactNode;
15
+ }
16
+ /** Standalone outline toggle button (e.g. Bold, Mute). Pressed = accent tint + accent text. */
17
+ export declare function Toggle({ pressed, defaultPressed, onPressedChange, size, icon, className, onClick, children, ...rest }: ToggleProps): import('react').JSX.Element;
18
+ export interface ToggleGroupItem<T extends string = string> {
19
+ /** Value reported in `onChange`. */
20
+ value: T;
21
+ /** Text label. Optional when `icon` is given. */
22
+ label?: ReactNode;
23
+ /** Icon before the label, or alone for an icon-only item. */
24
+ icon?: ReactNode;
25
+ /** Accessible name; required for icon-only items. */
26
+ ariaLabel?: string;
27
+ /** Hover hint (native title). */
28
+ title?: string;
29
+ /** Disable this item only. */
30
+ disabled?: boolean;
31
+ }
32
+ interface ToggleGroupBaseProps<T extends string> extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
33
+ /** Items to render. */
34
+ items: ToggleGroupItem<T>[];
35
+ /** 28 / 32 / 36px. @default 'md' */
36
+ size?: ToggleSize;
37
+ /** Items share the full width equally. */
38
+ block?: boolean;
39
+ /** Disable the whole group. */
40
+ disabled?: boolean;
41
+ }
42
+ export interface ToggleGroupSingleProps<T extends string = string> extends ToggleGroupBaseProps<T> {
43
+ /** One item at a time (radio-like). */
44
+ type: 'single';
45
+ /** Controlled value; `''` / `undefined` = none selected. */
46
+ value?: T | '';
47
+ /** Initial value when uncontrolled. */
48
+ defaultValue?: T | '';
49
+ /** Called with the new value (`''` when the active item is pressed again and `allowEmpty`). */
50
+ onChange?: (value: T | '') => void;
51
+ /** Allow deselecting the active item so none is selected. @default false */
52
+ allowEmpty?: boolean;
53
+ }
54
+ export interface ToggleGroupMultipleProps<T extends string = string> extends ToggleGroupBaseProps<T> {
55
+ /** Any number of items on (checkbox-like). */
56
+ type: 'multiple';
57
+ /** Controlled list of pressed values. */
58
+ value?: T[];
59
+ /** Initial list when uncontrolled. */
60
+ defaultValue?: T[];
61
+ /** Called with the new list of pressed values. */
62
+ onChange?: (value: T[]) => void;
63
+ allowEmpty?: never;
64
+ }
65
+ export type ToggleGroupProps<T extends string = string> = ToggleGroupSingleProps<T> | ToggleGroupMultipleProps<T>;
66
+ /**
67
+ * Joined outline toggle buttons on a light surface. `single` behaves like a radio group
68
+ * (arrow keys move and select), `multiple` like a row of toggles (arrow keys move focus).
69
+ * For the dark editor tab strip use `SegmentedControl` instead.
70
+ */
71
+ export declare function ToggleGroup<T extends string = string>(props: ToggleGroupProps<T>): import('react').JSX.Element;
72
+ export {};
@@ -0,0 +1,2 @@
1
+ export { ToggleGroup, Toggle } from './ToggleGroup';
2
+ export type { ToggleGroupProps, ToggleGroupSingleProps, ToggleGroupMultipleProps, ToggleGroupItem, ToggleProps, ToggleSize, } from './ToggleGroup';
@@ -0,0 +1,21 @@
1
+ import { HTMLAttributes, ReactElement, ReactNode } from 'react';
2
+ export interface TooltipProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'content'> {
3
+ /** Tooltip text. */
4
+ content: ReactNode;
5
+ /** The trigger element. Receives `aria-describedby`. */
6
+ children: ReactElement<{
7
+ 'aria-describedby'?: string;
8
+ }>;
9
+ placement?: 'top' | 'bottom';
10
+ /** Force visible (for docs / testing). */
11
+ open?: boolean;
12
+ }
13
+ /** CSS-only hover/focus tooltip on the dark menu surface. */
14
+ export declare function Tooltip({ content, children, placement, open, className, ...rest }: TooltipProps): import('react').JSX.Element;
15
+ export interface InfoIconProps extends Omit<HTMLAttributes<HTMLButtonElement>, 'content'> {
16
+ /** Hint shown on hover/focus. */
17
+ content?: ReactNode;
18
+ label?: string;
19
+ }
20
+ /** 20px "i" circle (Figma `info`). With `content`, wraps itself in a Tooltip. */
21
+ export declare function InfoIcon({ content, label, className, ...rest }: InfoIconProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Tooltip, InfoIcon } from './Tooltip';
2
+ export type { TooltipProps, InfoIconProps } from './Tooltip';
@@ -0,0 +1,18 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface TreeProps extends HTMLAttributes<HTMLElement> {
3
+ }
4
+ /** 220px folder tree panel. Compose with `TreeItem`. */
5
+ export declare function Tree({ className, children, ...rest }: TreeProps): import('react').JSX.Element;
6
+ export interface TreeItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
7
+ /** Nesting level; each level indents 18px. */
8
+ depth?: number;
9
+ active?: boolean;
10
+ /** Renders a chevron. `true`/`false` also sets aria-expanded. */
11
+ expanded?: boolean;
12
+ /** The taller root row (所有裝置) with a divider below. */
13
+ root?: boolean;
14
+ icon?: ReactNode;
15
+ /** Trailing control, e.g. a settings IconButton. */
16
+ trailing?: ReactNode;
17
+ }
18
+ export declare function TreeItem({ depth, active, expanded, root, icon, trailing, className, style, children, ...rest }: TreeItemProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Tree, TreeItem } from './Tree';
2
+ export type { TreeProps, TreeItemProps } from './Tree';
@@ -0,0 +1,64 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export type HeadingLevel = 1 | 2 | 3 | 4;
3
+ export type TextSize = '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
4
+ export type TextWeight = 'regular' | 'medium' | 'bold';
5
+ export type TextTone = 'primary' | 'secondary' | 'muted' | 'brand' | 'error' | 'warning' | 'success' | 'inherit';
6
+ export interface HeadingProps extends Omit<HTMLAttributes<HTMLHeadingElement>, 'color'> {
7
+ /**
8
+ * Visual level: 1 = 20px page title, 2 = 16px section / dialog title,
9
+ * 3 = 14px card title, 4 = 13px group title. All bold.
10
+ * @default 2
11
+ */
12
+ level?: HeadingLevel;
13
+ /** Render a different heading element than the level implies (keeps the visual size). */
14
+ as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';
15
+ /** Text colour. @default 'primary' */
16
+ tone?: TextTone;
17
+ /** Single line with ellipsis. */
18
+ truncate?: boolean;
19
+ /** Clamp to this many lines with ellipsis. Ignored when `truncate` is set. */
20
+ lineClamp?: number;
21
+ children?: ReactNode;
22
+ }
23
+ /** Section heading, sizes mapped to the type scale. */
24
+ export declare function Heading({ level, as, tone, truncate, lineClamp, className, style, children, ...rest }: HeadingProps): import('react').JSX.Element;
25
+ export interface TextProps extends Omit<HTMLAttributes<HTMLElement>, 'color'> {
26
+ /** Element to render. @default 'p' */
27
+ as?: 'p' | 'span' | 'div' | 'label' | 'strong' | 'em' | 'small';
28
+ /** Font size token. `xs` (12px) is the UI default. @default 'xs' */
29
+ size?: TextSize;
30
+ /** Font weight. @default 'regular' */
31
+ weight?: TextWeight;
32
+ /** Text colour. @default 'primary' */
33
+ tone?: TextTone;
34
+ /** Single line with ellipsis. */
35
+ truncate?: boolean;
36
+ /** Clamp to this many lines with ellipsis. Ignored when `truncate` is set. */
37
+ lineClamp?: number;
38
+ /** `for` attribute when rendered as a `label`. */
39
+ htmlFor?: string;
40
+ /** Keep the line breaks written in the text. */
41
+ preLine?: boolean;
42
+ /** Capitals with a little letter spacing (section labels). */
43
+ uppercase?: boolean;
44
+ /** Monospace (keys, templates, codes). */
45
+ mono?: boolean;
46
+ /** Digits of equal width (counters, times). */
47
+ tabular?: boolean;
48
+ /** Text alignment. @default start */
49
+ align?: 'start' | 'center' | 'end';
50
+ children?: ReactNode;
51
+ }
52
+ /** Body text with size, weight, tone and overflow control. */
53
+ export declare function Text({ as: Tag, size, weight, tone, truncate, lineClamp, preLine, uppercase, mono, tabular, align, className, style, children, ...rest }: TextProps): import('react').JSX.Element;
54
+ export interface CaptionProps extends HTMLAttributes<HTMLElement> {
55
+ /** Element to render. @default 'span' */
56
+ as?: 'span' | 'p' | 'div' | 'label' | 'figcaption';
57
+ /** 12px bold field-label style instead of the 11px muted caption. */
58
+ label?: boolean;
59
+ /** `for` attribute when rendered as a `label`. */
60
+ htmlFor?: string;
61
+ children?: ReactNode;
62
+ }
63
+ /** Small supporting text (timestamps, hints) or a field-label style caption. */
64
+ export declare function Caption({ as: Tag, label, className, children, ...rest }: CaptionProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Heading, Text, Caption } from './Typography';
2
+ export type { HeadingProps, HeadingLevel, TextProps, TextSize, TextWeight, TextTone, CaptionProps, } from './Typography';
@@ -0,0 +1,68 @@
1
+ export * from './components/Button';
2
+ export * from './components/IconButton';
3
+ export * from './components/Checkbox';
4
+ export * from './components/Radio';
5
+ export * from './components/Switch';
6
+ export * from './components/Input';
7
+ export * from './components/Select';
8
+ export * from './components/Tabs';
9
+ export * from './components/SegmentedControl';
10
+ export * from './components/Badge';
11
+ export * from './components/Menu';
12
+ export * from './components/Tooltip';
13
+ export * from './components/Card';
14
+ export * from './components/List';
15
+ export * from './components/AppBar';
16
+ export * from './components/PageHeader';
17
+ export * from './components/SideRail';
18
+ export * from './components/Tree';
19
+ export * from './components/StatBar';
20
+ export * from './components/Dialog';
21
+ export * from './components/Summary';
22
+ export * from './components/Popover';
23
+ export * from './components/Filter';
24
+ export * from './components/Pagination';
25
+ export * from './components/Toast';
26
+ export * from './components/Calendar';
27
+ export * from './components/Schedule';
28
+ export * from './components/DescriptionList';
29
+ export * from './components/Stepper';
30
+ export * from './components/Media';
31
+ export * from './components/Editor';
32
+ export * from './components/TagInput';
33
+ export * from './components/NumberStepper';
34
+ export * from './components/Dropdown';
35
+ export * from './components/DateRange';
36
+ export * from './components/TimeInput';
37
+ export * from './components/FileUpload';
38
+ export * from './components/ChoiceChips';
39
+ export * from './components/Accordion';
40
+ export * from './components/DataTable';
41
+ export * from './components/EmptyState';
42
+ export * from './components/Spinner';
43
+ export * from './components/Progress';
44
+ export * from './components/Alert';
45
+ export * from './components/Breadcrumb';
46
+ export * from './components/Drawer';
47
+ export * from './components/FormSection';
48
+ export * from './components/OptionCard';
49
+ export * from './components/TicketNumber';
50
+ export * from './components/QueueItem';
51
+ export * from './components/NumberBoard';
52
+ export * from './components/Marquee';
53
+ export * from './components/ScreenHeader';
54
+ export * from './components/TileCard';
55
+ export * from './components/ArrowButton';
56
+ export * from './components/LayoutPicker';
57
+ export * from './components/Timeline';
58
+ export * from './components/Avatar';
59
+ export * from './components/Slider';
60
+ export * from './components/Carousel';
61
+ export * from './components/Separator';
62
+ export * from './components/Kbd';
63
+ export * from './components/Typography';
64
+ export * from './components/Resizable';
65
+ export * from './components/ToggleGroup';
66
+ export * from './components/Floating';
67
+ export * from './components/Combobox';
68
+ export * from './components/Layout';