@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,10 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export interface PaginationProps extends Omit<HTMLAttributes<HTMLElement>, 'onChange'> {
3
+ page: number;
4
+ pageCount: number;
5
+ onChange: (page: number) => void;
6
+ /** Max numbered buttons shown (odd number works best). */
7
+ siblings?: number;
8
+ }
9
+ /** First / prev / numbered pages / next / last (Figma module/order). */
10
+ export declare function Pagination({ page, pageCount, onChange, siblings, className, ...rest }: PaginationProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Pagination } from './Pagination';
2
+ export type { PaginationProps } from './Pagination';
@@ -0,0 +1,8 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export interface PopoverProps extends HTMLAttributes<HTMLDivElement> {
3
+ }
4
+ /** Light floating panel (Figma full_dropdown). Positioning is up to the caller; use `PopoverColumns` inside. */
5
+ export declare function Popover({ className, children, ...rest }: PopoverProps): import('react').JSX.Element;
6
+ export declare function PopoverColumns({ className, children, ...rest }: HTMLAttributes<HTMLDivElement>): import('react').JSX.Element;
7
+ export declare function PopoverColumn({ className, children, ...rest }: HTMLAttributes<HTMLDivElement>): import('react').JSX.Element;
8
+ export declare function PopoverFooter({ className, children, ...rest }: HTMLAttributes<HTMLDivElement>): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Popover, PopoverColumns, PopoverColumn, PopoverFooter } from './Popover';
2
+ export type { PopoverProps } from './Popover';
@@ -0,0 +1,24 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export type ProgressTone = 'brand' | 'success' | 'warning' | 'error';
3
+ export interface ProgressProps extends HTMLAttributes<HTMLDivElement> {
4
+ /** Current value. Omit (or set `indeterminate`) for an indeterminate bar. With `steps`, the number of completed steps. */
5
+ value?: number;
6
+ /** Maximum value. Default 100 (ignored with `steps`, which uses the step count). */
7
+ max?: number;
8
+ /** Force the indeterminate animation. */
9
+ indeterminate?: boolean;
10
+ /** Label above the bar (left). Also the accessible name. */
11
+ label?: ReactNode;
12
+ /** Show the value above the bar (right). `true` shows a percentage (or "n / total" for steps). */
13
+ showValue?: boolean;
14
+ /** Custom value text; overrides the default percentage when `showValue` is set. */
15
+ valueLabel?: ReactNode;
16
+ /** Bar colour. Default `brand` (accent). */
17
+ tone?: ProgressTone;
18
+ /** `md` 8px track (default) or `sm` 4px. */
19
+ size?: 'sm' | 'md';
20
+ /** Segmented variant: split the track into this many steps and fill `value` of them. */
21
+ steps?: number;
22
+ }
23
+ /** Linear progress bar (determinate or indeterminate) with an optional label/value and a segmented `steps` variant. */
24
+ export declare function Progress({ value, max, indeterminate, label, showValue, valueLabel, tone, size, steps, className, 'aria-label': ariaLabel, ...rest }: ProgressProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Progress } from './Progress';
2
+ export type { ProgressProps, ProgressTone } from './Progress';
@@ -0,0 +1,55 @@
1
+ import { HTMLAttributes, MouseEventHandler, ReactNode } from 'react';
2
+ export type QueueItemState = 'waiting' | 'active' | 'called' | 'cancelled' | 'no-show';
3
+ export type QueueSurface = 'light' | 'dark';
4
+ export interface QueueItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSelect'> {
5
+ /** Ticket number, e.g. "713002". */
6
+ number: ReactNode;
7
+ /** Secondary line under the number, e.g. "from counter ABCD". */
8
+ subline?: ReactNode;
9
+ /**
10
+ * Lifecycle state. `called`, `cancelled` and `no-show` dim the card to 50%;
11
+ * `cancelled` also strikes the number through; `active` outlines it in the accent.
12
+ */
13
+ state?: QueueItemState;
14
+ /**
15
+ * Corner tag. Defaults to "Cancel" / "No Show" for those states; pass your own (e.g. translated)
16
+ * text, or `false` to hide it.
17
+ */
18
+ tag?: ReactNode | false;
19
+ /** Currently selected ticket (accent tint + border). Never dimmed. */
20
+ selected?: boolean;
21
+ /** `light` follows the theme; `dark` is for a dark rail and looks the same in either theme. Inherits from `QueueRail`. */
22
+ surface?: QueueSurface;
23
+ /** Trailing actions, typically two round `IconButton`s (info, re-call). */
24
+ actions?: ReactNode;
25
+ /** Makes the card a button (stretched over the card; actions stay separately clickable). */
26
+ onSelect?: MouseEventHandler<HTMLButtonElement>;
27
+ /** Accessible name for the select button. Defaults to the visible number and subline. */
28
+ selectLabel?: string;
29
+ }
30
+ /** Ticket card for queue lists (counter app rail). */
31
+ export declare function QueueItem({ number, subline, state, tag, selected, surface, actions, onSelect, selectLabel, className, ...rest }: QueueItemProps): import('react').JSX.Element;
32
+ export interface QueueRailProps extends HTMLAttributes<HTMLElement> {
33
+ /** `dark` for the counter-app rail (grey-800, white text in any theme). Passed down to `QueueItem`s. */
34
+ surface?: QueueSurface;
35
+ /** Slot above the sections, typically a search `Input`. */
36
+ search?: ReactNode;
37
+ /** Accessible name of the rail landmark. */
38
+ label?: string;
39
+ }
40
+ /** Scrollable column of `QueueRailSection`s. Renders an `<aside>`. */
41
+ export declare function QueueRail({ surface, search, label, className, children, ...rest }: QueueRailProps): import('react').JSX.Element;
42
+ export interface QueueRailSectionProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
43
+ /** Section heading, e.g. "Up coming" or "Called". */
44
+ title: ReactNode;
45
+ /** Count shown after the title. */
46
+ count?: ReactNode;
47
+ /** Trailing header slot, e.g. `<Button variant="link">more →</Button>`. */
48
+ action?: ReactNode;
49
+ /** Text shown when the section has no children. */
50
+ emptyText?: ReactNode;
51
+ /** `QueueItem`s. Each child is wrapped in an `<li>`. */
52
+ children?: ReactNode;
53
+ }
54
+ /** Titled group inside a `QueueRail`. Children render as a list. */
55
+ export declare function QueueRailSection({ title, count, action, emptyText, className, children, ...rest }: QueueRailSectionProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { QueueItem, QueueRail, QueueRailSection } from './QueueItem';
2
+ export type { QueueItemProps, QueueItemState, QueueSurface, QueueRailProps, QueueRailSectionProps } from './QueueItem';
@@ -0,0 +1,6 @@
1
+ import { InputHTMLAttributes, ReactNode } from 'react';
2
+ export interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
3
+ children?: ReactNode;
4
+ }
5
+ /** 16px radio. Teal ring with white dot when selected. Group radios with the same `name`. */
6
+ export declare function Radio({ children, className, ...rest }: RadioProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Radio } from './Radio';
2
+ export type { RadioProps } from './Radio';
@@ -0,0 +1,40 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export type ResizableDirection = 'horizontal' | 'vertical';
3
+ export interface ResizablePanelProps extends HTMLAttributes<HTMLDivElement> {
4
+ /** Initial size in % of the group. Panels without one share the remaining space. */
5
+ defaultSize?: number;
6
+ /** Smallest size in %. @default 0 */
7
+ minSize?: number;
8
+ /** Largest size in %. @default 100 */
9
+ maxSize?: number;
10
+ children?: ReactNode;
11
+ }
12
+ /** A pane inside a `ResizablePanelGroup`. Size is managed by the group. */
13
+ export declare function ResizablePanel({ defaultSize: _d, minSize: _min, maxSize: _max, className, style, id, children, ...rest }: ResizablePanelProps): import('react').JSX.Element;
14
+ export interface ResizableHandleProps extends HTMLAttributes<HTMLDivElement> {
15
+ /** Always show the grip (otherwise it appears on hover / focus / drag). */
16
+ withGrip?: boolean;
17
+ /** Lock this divider. */
18
+ disabled?: boolean;
19
+ }
20
+ /**
21
+ * Draggable divider between two panels (`role="separator"`).
22
+ * Keyboard: arrows resize by the group's `keyboardStep` (Shift = 10%), Home/End jump to the
23
+ * panel's min/max, Enter restores the default layout.
24
+ */
25
+ export declare function ResizableHandle({ withGrip, disabled, className, onKeyDown, onDoubleClick, ...rest }: ResizableHandleProps): import('react').JSX.Element;
26
+ export interface ResizablePanelGroupProps extends HTMLAttributes<HTMLDivElement> {
27
+ /** `horizontal` = panels side by side, `vertical` = stacked. @default 'horizontal' */
28
+ direction?: ResizableDirection;
29
+ /** Called with panel sizes (%) after every change. */
30
+ onLayout?: (sizes: number[]) => void;
31
+ /** Arrow-key resize step in %. Shift+arrow always moves 10%. @default 2 */
32
+ keyboardStep?: number;
33
+ /** `ResizablePanel` and `ResizableHandle` elements, alternating, as direct children. */
34
+ children?: ReactNode;
35
+ }
36
+ /**
37
+ * Split view whose panels the user can resize (editor canvas / layers / settings).
38
+ * Sizes are percentages; each handle resizes the two panels on either side.
39
+ */
40
+ export declare function ResizablePanelGroup({ direction, onLayout, keyboardStep, className, children, ...rest }: ResizablePanelGroupProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { ResizablePanelGroup, ResizablePanel, ResizableHandle } from './Resizable';
2
+ export type { ResizablePanelGroupProps, ResizablePanelProps, ResizableHandleProps, ResizableDirection, } from './Resizable';
@@ -0,0 +1,17 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export declare function ScheduleBoard({ className, children, ...rest }: HTMLAttributes<HTMLDivElement>): import('react').JSX.Element;
3
+ export interface ScheduleColumnProps extends HTMLAttributes<HTMLDivElement> {
4
+ day: ReactNode;
5
+ onAdd?: () => void;
6
+ }
7
+ /** One weekday column with a teal add button (Figma 營業時間). */
8
+ export declare function ScheduleColumn({ day, onAdd, className, children, ...rest }: ScheduleColumnProps): import('react').JSX.Element;
9
+ export type ScheduleTone = 'blue' | 'green' | 'violet';
10
+ export interface ScheduleCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
11
+ title: ReactNode;
12
+ tone?: ScheduleTone;
13
+ /** Menu trigger at the right of the header. */
14
+ menu?: ReactNode;
15
+ }
16
+ /** Tinted action card: Wake (blue), Reboot (green), Sleep (violet). */
17
+ export declare function ScheduleCard({ title, tone, menu, className, children, ...rest }: ScheduleCardProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { ScheduleBoard, ScheduleColumn, ScheduleCard } from './Schedule';
2
+ export type { ScheduleColumnProps, ScheduleCardProps, ScheduleTone } from './Schedule';
@@ -0,0 +1,21 @@
1
+ import { HTMLAttributes } from 'react';
2
+ /** Default clock pattern, as on the Figma kiosk header: `2020/03/25 Wed. 18:13`. */
3
+ export declare const CLOCK_DEFAULT_PATTERN = "YYYY/MM/DD ddd. HH:mm";
4
+ /**
5
+ * Minimal date formatter. Tokens: `YYYY` `MM` `DD` `ddd` (Sun–Sat) `HH` `mm` `ss`.
6
+ * Any other text is kept as is. Use the `format` function prop for locale-aware output.
7
+ */
8
+ export declare function formatClock(date: Date, pattern?: string): string;
9
+ export interface ClockProps extends Omit<HTMLAttributes<HTMLTimeElement>, 'children'> {
10
+ /**
11
+ * Pattern string (see `formatClock`) or a function `(date) => string`.
12
+ * Default `"YYYY/MM/DD ddd. HH:mm"`.
13
+ */
14
+ format?: string | ((date: Date) => string);
15
+ /** Fixed time to show. When set, the clock does not tick (deterministic stories and tests). */
16
+ now?: Date;
17
+ /** Tick interval in ms while live. Default 1000. */
18
+ interval?: number;
19
+ }
20
+ /** Live-updating date/time text for screen headers and boards. Renders a `<time>` element. */
21
+ export declare function Clock({ format, now, interval, className, ...rest }: ClockProps): import('react').JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export type ScreenHeaderVariant = 'surface' | 'muted' | 'transparent';
3
+ export interface ScreenHeaderProps extends HTMLAttributes<HTMLElement> {
4
+ /** Background: `surface` white (default), `muted` subtle grey as on the Figma kiosk, `transparent` over a backdrop. */
5
+ variant?: ScreenHeaderVariant;
6
+ /** Soft shadow under the bar, separating it from the screen content. */
7
+ shadow?: boolean;
8
+ /** Left slot, e.g. a home button and opening hours (wrap text in `.kb-screen-header__info`). */
9
+ start?: ReactNode;
10
+ /** Centre slot, e.g. a logo (wrap in `.kb-screen-header__logo`). Falls back to `children`. */
11
+ center?: ReactNode;
12
+ /** Right slot, e.g. a language picker above a `Clock` (wrap both in `.kb-screen-header__stack`). */
13
+ end?: ReactNode;
14
+ }
15
+ /**
16
+ * Three-slot top bar for customer-facing screens (ticket kiosks, signage, calling boards).
17
+ * The centre slot stays centred whatever the side slots contain. Height follows `data-scale`
18
+ * (120px under `data-scale="kiosk"`).
19
+ * Figma: Tico RUN kiosk header (1:625).
20
+ */
21
+ export declare function ScreenHeader({ variant, shadow, start, center, end, className, children, ...rest }: ScreenHeaderProps): import('react').JSX.Element;
@@ -0,0 +1,4 @@
1
+ export { ScreenHeader } from './ScreenHeader';
2
+ export type { ScreenHeaderProps, ScreenHeaderVariant } from './ScreenHeader';
3
+ export { Clock, formatClock, CLOCK_DEFAULT_PATTERN } from './Clock';
4
+ export type { ClockProps } from './Clock';
@@ -0,0 +1,17 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export interface SegmentedOption<T extends string = string> {
3
+ value: T;
4
+ label: string;
5
+ disabled?: boolean;
6
+ }
7
+ export interface SegmentedControlProps<T extends string = string> extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
8
+ options: SegmentedOption<T>[];
9
+ value: T;
10
+ onChange: (value: T) => void;
11
+ /** Active item shows teal text on translucent bg (Figma settings_tab). */
12
+ accent?: boolean;
13
+ /** Items share the width equally. */
14
+ block?: boolean;
15
+ }
16
+ /** Dark segmented toggle (Figma settings_tab / weekday_tab). Track stays dark in both themes. */
17
+ export declare function SegmentedControl<T extends string>({ options, value, onChange, accent, block, className, ...rest }: SegmentedControlProps<T>): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { SegmentedControl } from './SegmentedControl';
2
+ export type { SegmentedControlProps, SegmentedOption } from './SegmentedControl';
@@ -0,0 +1,14 @@
1
+ import { ReactNode, SelectHTMLAttributes } from 'react';
2
+ export interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
3
+ /** Compact 12px variant (same as size="sm"). */
4
+ small?: boolean;
5
+ size?: 'sm' | 'md' | 'lg' | 'xl';
6
+ /** Label above the control (12px bold). */
7
+ label?: ReactNode;
8
+ /** Helper or error text below the control (shown when `label` is set). */
9
+ hint?: ReactNode;
10
+ /** Marks the control invalid: red border (and red hint). */
11
+ error?: boolean;
12
+ }
13
+ /** Native select styled like Input, with the 10x5 chevron from Figma. Pass `<option>` children. */
14
+ export declare function Select({ small, size, label, hint, error, id, className, children, ...rest }: SelectProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Select } from './Select';
2
+ export type { SelectProps } from './Select';
@@ -0,0 +1,21 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export type SeparatorOrientation = 'horizontal' | 'vertical';
3
+ export type SeparatorTone = 'default' | 'faint';
4
+ export interface SeparatorProps extends HTMLAttributes<HTMLDivElement> {
5
+ /** Direction of the rule. Vertical stretches to the height of its flex row. */
6
+ orientation?: SeparatorOrientation;
7
+ /** `default` = border-default, `faint` = border-faint (toolbar / popover dividers). */
8
+ tone?: SeparatorTone;
9
+ /** Optional text centred between two rules, e.g. 或 / OR. */
10
+ label?: ReactNode;
11
+ /** Add space-4 margin on both sides of the rule. */
12
+ spaced?: boolean;
13
+ /**
14
+ * Purely visual: hidden from assistive tech (`role="none"`).
15
+ * Set to false when the rule separates meaningful sections.
16
+ * @default true
17
+ */
18
+ decorative?: boolean;
19
+ }
20
+ /** Thin rule between content groups. Horizontal or vertical, with an optional centred label. */
21
+ export declare function Separator({ orientation, tone, label, spaced, decorative, className, ...rest }: SeparatorProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Separator } from './Separator';
2
+ export type { SeparatorProps, SeparatorOrientation, SeparatorTone } from './Separator';
@@ -0,0 +1,18 @@
1
+ import { AnchorHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
2
+ export interface SideRailProps extends HTMLAttributes<HTMLElement> {
3
+ /** Widen over the page on hover or keyboard focus and show each item's label (sits in a 60px slot). */
4
+ expandable?: boolean;
5
+ }
6
+ /** 60px icon-only navigation rail. Compose with `RailItem`. */
7
+ export declare function SideRail({ expandable, className, children, ...rest }: SideRailProps): import('react').JSX.Element;
8
+ export interface RailItemProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
9
+ /** Accessible name; the item shows only an icon. */
10
+ label: string;
11
+ active?: boolean;
12
+ /** Pin to the bottom of the rail (language switch). */
13
+ bottom?: boolean;
14
+ /** Red notification dot beside the icon. */
15
+ dot?: boolean;
16
+ children: ReactNode;
17
+ }
18
+ export declare function RailItem({ label, active, bottom, dot, className, children, ...rest }: RailItemProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { SideRail, RailItem } from './SideRail';
2
+ export type { SideRailProps, RailItemProps } from './SideRail';
@@ -0,0 +1,52 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export type SliderValue = number | [number, number];
3
+ export type SliderMark = number | {
4
+ value: number;
5
+ label?: ReactNode;
6
+ };
7
+ export interface SliderProps<V extends SliderValue = number> extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
8
+ /** Controlled value. Pass a `[low, high]` tuple for a range slider with two thumbs. */
9
+ value?: V;
10
+ /** Initial value when uncontrolled. A tuple makes it a range slider. */
11
+ defaultValue?: V;
12
+ /** Called continuously while dragging or on each key press. */
13
+ onChange?: (value: V) => void;
14
+ /** Called once when a drag ends or after a key press (commit point, e.g. to save volume). */
15
+ onChangeEnd?: (value: V) => void;
16
+ /** @default 0 */
17
+ min?: number;
18
+ /** @default 100 */
19
+ max?: number;
20
+ /** Increment; values snap to `min + n * step`. @default 1 */
21
+ step?: number;
22
+ /** Keyboard PageUp / PageDown increment. @default max(step, (max - min) / 10) */
23
+ pageStep?: number;
24
+ /** Minimum gap between the two thumbs of a range slider. @default 0 */
25
+ minDistance?: number;
26
+ /**
27
+ * Tick marks: `true` = a tick at every step (only if ≤ 50 steps),
28
+ * or a list of values / `{ value, label }` objects. Labels render below the rail.
29
+ */
30
+ marks?: boolean | SliderMark[];
31
+ /** Visible label above the rail; also the accessible name. */
32
+ label?: ReactNode;
33
+ /** Show the formatted value at the right of the label row. @default true when `label` is set */
34
+ showOutput?: boolean;
35
+ /** Value bubble over the thumb: on hover / focus / drag, always, or never. @default 'auto' */
36
+ tooltip?: 'auto' | 'always' | 'none';
37
+ /** Format the value for the tooltip, output and `aria-valuetext`, e.g. `(v) => v + '%'`. */
38
+ formatValue?: (value: number) => string;
39
+ /** Accessible names for the thumbs when there is no visible `label` (range: `[low, high]`). */
40
+ thumbLabels?: string | [string, string];
41
+ /** Smaller 12px knob / 3px rail. @default 'md' */
42
+ size?: 'sm' | 'md';
43
+ /** Disable interaction. */
44
+ disabled?: boolean;
45
+ /** Name of a hidden input (range: `name` twice) so the value submits with a form. */
46
+ name?: string;
47
+ }
48
+ /**
49
+ * Horizontal slider for volume, opacity, zoom. Single value or range (two thumbs).
50
+ * Keyboard: arrows ±step, PageUp/PageDown ±pageStep, Home/End jump to the bounds.
51
+ */
52
+ export declare function Slider<V extends SliderValue = number>({ value, defaultValue, onChange, onChangeEnd, min, max, step, pageStep, minDistance, marks, label, showOutput, tooltip, formatValue, thumbLabels, size, disabled, name, className, ...rest }: SliderProps<V>): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Slider } from './Slider';
2
+ export type { SliderProps, SliderValue, SliderMark } from './Slider';
@@ -0,0 +1,29 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export type SpinnerSize = 'sm' | 'md' | 'lg';
3
+ export interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {
4
+ /** `sm` 16px (inline / buttons), `md` 24px (default), `lg` 40px (page / panel). */
5
+ size?: SpinnerSize;
6
+ /** Visible text next to (or under, with `vertical`) the ring. Also used as the accessible name. */
7
+ label?: ReactNode;
8
+ /** Stack the label under the ring. */
9
+ vertical?: boolean;
10
+ /** `brand` accent colour (default) or `current` to inherit the text colour (e.g. inside a filled button). */
11
+ tone?: 'brand' | 'current';
12
+ /** Accessible name when no visible `label` is given. Default "Loading". */
13
+ 'aria-label'?: string;
14
+ }
15
+ /** Brand-coloured loading spinner. Renders `role="status"`; slows down under prefers-reduced-motion. */
16
+ export declare function Spinner({ size, label, vertical, tone, className, 'aria-label': ariaLabel, ...rest }: SpinnerProps): import('react').JSX.Element;
17
+ export type SkeletonVariant = 'text' | 'rect' | 'circle';
18
+ export interface SkeletonProps extends HTMLAttributes<HTMLSpanElement> {
19
+ /** `text` one line of text height (default), `rect` block (64px default height), `circle` avatar / icon. */
20
+ variant?: SkeletonVariant;
21
+ /** CSS width (px number or length). Text lines default to 100%, circles to 36px. */
22
+ width?: number | string;
23
+ /** CSS height (px number or length). */
24
+ height?: number | string;
25
+ /** For `text`: render this many lines; the last one is 60% wide. */
26
+ lines?: number;
27
+ }
28
+ /** Placeholder shape with a shimmer while content loads. Hidden from assistive tech; shimmer stops under reduced motion. */
29
+ export declare function Skeleton({ variant, width, height, lines, className, style, ...rest }: SkeletonProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Spinner, Skeleton } from './Spinner';
2
+ export type { SpinnerProps, SpinnerSize, SkeletonProps, SkeletonVariant } from './Spinner';
@@ -0,0 +1,18 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface StatBarProps extends HTMLAttributes<HTMLDivElement> {
3
+ /** Left summary, e.g. daily usage. Use `StatLabel` for the muted parts. */
4
+ summary?: ReactNode;
5
+ }
6
+ /** White strip of counters above a list (Figma 裝置顯示狀態列). Put `Stat`s as children. */
7
+ export declare function StatBar({ summary, className, children, ...rest }: StatBarProps): import('react').JSX.Element;
8
+ export declare function StatLabel({ children }: {
9
+ children: ReactNode;
10
+ }): import('react').JSX.Element;
11
+ export type StatTone = 'success' | 'info' | 'warning' | 'error' | 'pending' | 'neutral';
12
+ export interface StatProps extends HTMLAttributes<HTMLSpanElement> {
13
+ tone?: StatTone;
14
+ icon: ReactNode;
15
+ /** Accessible description of what the number means. */
16
+ label: string;
17
+ }
18
+ export declare function Stat({ tone, icon, label, className, children, ...rest }: StatProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { StatBar, StatLabel, Stat } from './StatBar';
2
+ export type { StatBarProps, StatProps, StatTone } from './StatBar';
@@ -0,0 +1,16 @@
1
+ import { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
2
+ export declare function StepNav({ className, children, ...rest }: HTMLAttributes<HTMLElement>): import('react').JSX.Element;
3
+ export interface StepItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {
4
+ /** "STEP 1", "STEP 3-2"… Omit for a plain title item like 功能總覽. */
5
+ step?: ReactNode;
6
+ /** The step being shown (teal). */
7
+ active?: boolean;
8
+ /** The selected sub-step (tint + teal border). */
9
+ current?: boolean;
10
+ }
11
+ /** Vertical onboarding step (Figma 12874:27182). */
12
+ export declare function StepItem({ step, active, current, type, className, children, ...rest }: StepItemProps): import('react').JSX.Element;
13
+ /** Orange label used beside step instructions (Figma 12874:27233). */
14
+ export declare function StepTag({ step, className, children, ...rest }: HTMLAttributes<HTMLSpanElement> & {
15
+ step: ReactNode;
16
+ }): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { StepNav, StepItem, StepTag } from './Stepper';
2
+ export type { StepItemProps } from './Stepper';
@@ -0,0 +1,10 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface SummaryItem {
3
+ label: ReactNode;
4
+ value: ReactNode;
5
+ }
6
+ export interface SummaryProps extends HTMLAttributes<HTMLDListElement> {
7
+ items: SummaryItem[];
8
+ }
9
+ /** Read-only key/value strip on a teal tint (Figma 項目 block: UID, 建立時間, 版本, MAC address). */
10
+ export declare function Summary({ items, className, ...rest }: SummaryProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Summary } from './Summary';
2
+ export type { SummaryProps, SummaryItem } from './Summary';
@@ -0,0 +1,10 @@
1
+ import { InputHTMLAttributes, ReactNode } from 'react';
2
+ export interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'role'> {
3
+ children?: ReactNode;
4
+ /** Render the text as a 12px bold field label (Figma 定時返回). */
5
+ asLabel?: boolean;
6
+ /** Node after the text, e.g. an `InfoIcon`. */
7
+ extra?: ReactNode;
8
+ }
9
+ /** 28x16 toggle. Track turns teal and the knob slides right when on. */
10
+ export declare function Switch({ children, asLabel, extra, className, ...rest }: SwitchProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Switch } from './Switch';
2
+ export type { SwitchProps } from './Switch';
@@ -0,0 +1,14 @@
1
+ import { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
2
+ export interface TabsProps extends HTMLAttributes<HTMLDivElement> {
3
+ /** 12px variant with 32px gaps (Figma Month / Week / Day). */
4
+ size?: 'sm' | 'md';
5
+ }
6
+ /** Horizontal tab strip with teal underline. Compose with `<Tab>`. */
7
+ export declare function Tabs({ size, className, children, ...rest }: TabsProps): import('react').JSX.Element;
8
+ export interface TabProps extends ButtonHTMLAttributes<HTMLButtonElement> {
9
+ /** Selected tab: full opacity + 3px teal bar. */
10
+ active?: boolean;
11
+ /** Optional second line (12px, muted), as in the editor tab. */
12
+ subtitle?: ReactNode;
13
+ }
14
+ export declare function Tab({ active, subtitle, type, className, children, ...rest }: TabProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Tabs, Tab } from './Tabs';
2
+ export type { TabsProps, TabProps } from './Tabs';
@@ -0,0 +1,27 @@
1
+ import { InputHTMLAttributes, ReactNode } from 'react';
2
+ export interface TagInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'onChange' | 'size' | 'type'> {
3
+ /** Current tags (controlled). */
4
+ value: string[];
5
+ /** Called with the next tag list whenever a tag is added or removed. */
6
+ onChange: (tags: string[]) => void;
7
+ /** Label rendered above the control. */
8
+ label?: ReactNode;
9
+ /** Helper or error text below the control. */
10
+ hint?: ReactNode;
11
+ /** Marks the field invalid: red border and hint. */
12
+ error?: boolean;
13
+ /** `sm` 32 · `md` 36 · `lg` 44 (default). */
14
+ size?: 'sm' | 'md' | 'lg';
15
+ /** `inline`: chips wrap inside the field (default). `stacked`: field on top, chips below. */
16
+ layout?: 'inline' | 'stacked';
17
+ /** Keys that commit the typed text as a tag. Default Enter and comma. */
18
+ separators?: string[];
19
+ /** Allow the same tag twice. Default false (duplicates are ignored). */
20
+ allowDuplicates?: boolean;
21
+ /** Maximum number of tags; input is disabled once reached. */
22
+ max?: number;
23
+ /** Accessible label for each chip's remove button. Default `Remove <tag>`. */
24
+ removeLabel?: (tag: string) => string;
25
+ }
26
+ /** Text input that turns Enter / comma into removable chips. Backspace on an empty field removes the last chip; pasted comma lists are split. */
27
+ export declare function TagInput({ value, onChange, label, hint, error, size, layout, separators, allowDuplicates, max, removeLabel, disabled, id, className, style, onKeyDown, onBlur, onPaste, placeholder, ...rest }: TagInputProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { TagInput } from './TagInput';
2
+ export type { TagInputProps } from './TagInput';
@@ -0,0 +1,39 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export type TicketNumberSize = 'sm' | 'md' | 'lg' | 'xl' | 'display';
3
+ export type TicketNumberTone = 'default' | 'brand' | 'muted';
4
+ export interface TicketNumberMetaItem {
5
+ /** Muted label, e.g. "Ticket issue time". */
6
+ label: ReactNode;
7
+ /** Value, e.g. "10:24". */
8
+ value: ReactNode;
9
+ }
10
+ export interface TicketNumberProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
11
+ /** The queue / ticket number. Rendered with tabular figures. */
12
+ number: ReactNode;
13
+ /** Caption for the number, e.g. "NOW" or "Your Queue Number". */
14
+ label?: ReactNode;
15
+ /**
16
+ * `sm` 20 · `md` 24 (rail card) · `lg` 48 · `xl` 72 · `display` 120 (signage / mobile hero).
17
+ * Sizes follow the font tokens, so `data-scale="kiosk"` enlarges them.
18
+ */
19
+ size?: TicketNumberSize;
20
+ /** Number colour: `default` text, `brand` accent (now serving), `muted` (done / inactive). */
21
+ tone?: TicketNumberTone;
22
+ /** `stack` puts the label above; `inline` puts it on the baseline to the left ("NOW 713002"). */
23
+ layout?: 'stack' | 'inline';
24
+ /** Centre label, number and meta (mobile ticket page, signage). */
25
+ centered?: boolean;
26
+ /** Status pill slot, typically a `Badge` ("準備中"). */
27
+ status?: ReactNode;
28
+ /** Label / value pairs rendered as a description list under the number. */
29
+ meta?: TicketNumberMetaItem[];
30
+ /**
31
+ * Announce changes to screen readers (`aria-live="polite"`). Use on the one number that
32
+ * updates when a ticket is called, not on every number of a board.
33
+ */
34
+ live?: boolean;
35
+ /** Free slot under the meta list, e.g. a name tag. */
36
+ children?: ReactNode;
37
+ }
38
+ /** Queue / ticket number with optional label, status pill and meta list. */
39
+ export declare function TicketNumber({ number, label, size, tone, layout, centered, status, meta, live, className, children, ...rest }: TicketNumberProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { TicketNumber } from './TicketNumber';
2
+ export type { TicketNumberProps, TicketNumberSize, TicketNumberTone, TicketNumberMetaItem } from './TicketNumber';