@kabobcompany/react 0.0.0-stage → 0.1.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 (141) hide show
  1. package/GUIDE.md +185 -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 +24 -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 +55 -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/LayoutPicker/LayoutPicker.d.ts +69 -0
  61. package/dist/components/LayoutPicker/index.d.ts +2 -0
  62. package/dist/components/List/List.d.ts +67 -0
  63. package/dist/components/List/index.d.ts +2 -0
  64. package/dist/components/Marquee/Marquee.d.ts +24 -0
  65. package/dist/components/Marquee/index.d.ts +2 -0
  66. package/dist/components/Media/Media.d.ts +19 -0
  67. package/dist/components/Media/index.d.ts +2 -0
  68. package/dist/components/Menu/Menu.d.ts +15 -0
  69. package/dist/components/Menu/index.d.ts +2 -0
  70. package/dist/components/NumberBoard/NumberBoard.d.ts +47 -0
  71. package/dist/components/NumberBoard/index.d.ts +2 -0
  72. package/dist/components/NumberStepper/NumberStepper.d.ts +36 -0
  73. package/dist/components/NumberStepper/index.d.ts +2 -0
  74. package/dist/components/OptionCard/OptionCard.d.ts +66 -0
  75. package/dist/components/OptionCard/index.d.ts +2 -0
  76. package/dist/components/PageHeader/PageHeader.d.ts +25 -0
  77. package/dist/components/PageHeader/index.d.ts +2 -0
  78. package/dist/components/Pagination/Pagination.d.ts +10 -0
  79. package/dist/components/Pagination/index.d.ts +2 -0
  80. package/dist/components/Popover/Popover.d.ts +8 -0
  81. package/dist/components/Popover/index.d.ts +2 -0
  82. package/dist/components/Progress/Progress.d.ts +24 -0
  83. package/dist/components/Progress/index.d.ts +2 -0
  84. package/dist/components/QueueItem/QueueItem.d.ts +55 -0
  85. package/dist/components/QueueItem/index.d.ts +2 -0
  86. package/dist/components/Radio/Radio.d.ts +6 -0
  87. package/dist/components/Radio/index.d.ts +2 -0
  88. package/dist/components/Resizable/Resizable.d.ts +40 -0
  89. package/dist/components/Resizable/index.d.ts +2 -0
  90. package/dist/components/Schedule/Schedule.d.ts +17 -0
  91. package/dist/components/Schedule/index.d.ts +2 -0
  92. package/dist/components/ScreenHeader/Clock.d.ts +21 -0
  93. package/dist/components/ScreenHeader/ScreenHeader.d.ts +21 -0
  94. package/dist/components/ScreenHeader/index.d.ts +4 -0
  95. package/dist/components/SegmentedControl/SegmentedControl.d.ts +17 -0
  96. package/dist/components/SegmentedControl/index.d.ts +2 -0
  97. package/dist/components/Select/Select.d.ts +10 -0
  98. package/dist/components/Select/index.d.ts +2 -0
  99. package/dist/components/Separator/Separator.d.ts +21 -0
  100. package/dist/components/Separator/index.d.ts +2 -0
  101. package/dist/components/SideRail/SideRail.d.ts +16 -0
  102. package/dist/components/SideRail/index.d.ts +2 -0
  103. package/dist/components/Slider/Slider.d.ts +52 -0
  104. package/dist/components/Slider/index.d.ts +2 -0
  105. package/dist/components/Spinner/Spinner.d.ts +29 -0
  106. package/dist/components/Spinner/index.d.ts +2 -0
  107. package/dist/components/StatBar/StatBar.d.ts +18 -0
  108. package/dist/components/StatBar/index.d.ts +2 -0
  109. package/dist/components/Stepper/Stepper.d.ts +16 -0
  110. package/dist/components/Stepper/index.d.ts +2 -0
  111. package/dist/components/Summary/Summary.d.ts +10 -0
  112. package/dist/components/Summary/index.d.ts +2 -0
  113. package/dist/components/Switch/Switch.d.ts +10 -0
  114. package/dist/components/Switch/index.d.ts +2 -0
  115. package/dist/components/Tabs/Tabs.d.ts +14 -0
  116. package/dist/components/Tabs/index.d.ts +2 -0
  117. package/dist/components/TagInput/TagInput.d.ts +27 -0
  118. package/dist/components/TagInput/index.d.ts +2 -0
  119. package/dist/components/TicketNumber/TicketNumber.d.ts +39 -0
  120. package/dist/components/TicketNumber/index.d.ts +2 -0
  121. package/dist/components/TileCard/TileCard.d.ts +49 -0
  122. package/dist/components/TileCard/index.d.ts +2 -0
  123. package/dist/components/TimeInput/TimeInput.d.ts +10 -0
  124. package/dist/components/TimeInput/index.d.ts +2 -0
  125. package/dist/components/Timeline/Timeline.d.ts +83 -0
  126. package/dist/components/Timeline/index.d.ts +2 -0
  127. package/dist/components/Toast/Toast.d.ts +11 -0
  128. package/dist/components/Toast/index.d.ts +2 -0
  129. package/dist/components/ToggleGroup/ToggleGroup.d.ts +72 -0
  130. package/dist/components/ToggleGroup/index.d.ts +2 -0
  131. package/dist/components/Tooltip/Tooltip.d.ts +21 -0
  132. package/dist/components/Tooltip/index.d.ts +2 -0
  133. package/dist/components/Tree/Tree.d.ts +18 -0
  134. package/dist/components/Tree/index.d.ts +2 -0
  135. package/dist/components/Typography/Typography.d.ts +54 -0
  136. package/dist/components/Typography/index.d.ts +2 -0
  137. package/dist/index.d.ts +67 -0
  138. package/dist/index.js +4935 -0
  139. package/dist/utils/floating.d.ts +29 -0
  140. package/package.json +39 -4
  141. package/README.md +0 -3
@@ -0,0 +1,2 @@
1
+ export { Input, Textarea, FormGrid, FieldSlot, DateInput, ColorInput, FieldPair } from './Input';
2
+ export type { InputProps, TextareaProps, DateInputProps, ColorInputProps } from './Input';
@@ -0,0 +1,18 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface KbdProps extends HTMLAttributes<HTMLElement> {
3
+ /** Smaller 16px chip for dense menus. */
4
+ small?: boolean;
5
+ children?: ReactNode;
6
+ }
7
+ /** Keyboard key hint chip (`<kbd>`). */
8
+ export declare function Kbd({ small, className, children, ...rest }: KbdProps): import('react').JSX.Element;
9
+ export interface KbdGroupProps extends HTMLAttributes<HTMLSpanElement> {
10
+ /** Keys of the shortcut, in order, e.g. `['Ctrl', 'S']`. */
11
+ keys: ReactNode[];
12
+ /** Text between keys. Pass `null` for none. @default '+' */
13
+ separator?: ReactNode;
14
+ /** Use small chips. */
15
+ small?: boolean;
16
+ }
17
+ /** A shortcut made of several keys, e.g. Ctrl + S. */
18
+ export declare function KbdGroup({ keys, separator, small, className, ...rest }: KbdGroupProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Kbd, KbdGroup } from './Kbd';
2
+ export type { KbdProps, KbdGroupProps } from './Kbd';
@@ -0,0 +1,69 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ /** One rectangular region of a screen, in 0..1 units of the screen's width / height. */
3
+ export interface LayoutRegion {
4
+ /** Left edge, 0..1. */
5
+ x: number;
6
+ /** Top edge, 0..1. */
7
+ y: number;
8
+ /** Width, 0..1. */
9
+ w: number;
10
+ /** Height, 0..1. */
11
+ h: number;
12
+ /** Optional region name, e.g. "Main", "Side", "Ticker". Shown by `LayoutPreview` with `showNames`. */
13
+ name?: string;
14
+ }
15
+ export type LayoutOrientation = 'landscape' | 'portrait';
16
+ /** A screen layout: how one screen is split into regions that each play their own playlist. */
17
+ export interface ScreenLayout {
18
+ id: string;
19
+ /** Display name under the thumbnail. */
20
+ name: string;
21
+ /** `landscape` renders 16:9, `portrait` 9:16. */
22
+ orientation: LayoutOrientation;
23
+ /** Regions in paint order; index + 1 is the region number shown in the thumbnail. */
24
+ regions: LayoutRegion[];
25
+ /** Not selectable (e.g. unsupported by the player). */
26
+ disabled?: boolean;
27
+ }
28
+ /** Ready-made layouts for signage templates. Consumers may pass their own list instead. */
29
+ export declare const presetLayouts: ScreenLayout[];
30
+ export interface LayoutPreviewProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSelect'> {
31
+ /** The layout to draw. */
32
+ layout: ScreenLayout;
33
+ /** `sm` picker thumbnail (3px gaps, index only) · `md` default · `lg` large preview with index badges. */
34
+ size?: 'sm' | 'md' | 'lg';
35
+ /** Show each region's `name` under its number. */
36
+ showNames?: boolean;
37
+ /** Per-region secondary line (e.g. the assigned playlist), indexed like `layout.regions`. */
38
+ regionContent?: ReactNode[];
39
+ /** Highlight one region (accent border + tint), e.g. the region whose playlist is being edited. */
40
+ activeRegion?: number;
41
+ /** Makes regions buttons; called with the region index when one is clicked. */
42
+ onRegionSelect?: (index: number, region: LayoutRegion) => void;
43
+ /** Accessible label. Defaults to the layout name. */
44
+ label?: string;
45
+ }
46
+ /** Draws one screen layout as region boxes. Use `size="lg"` with `showNames` / `regionContent` for editor previews. */
47
+ export declare function LayoutPreview({ layout, size, showNames, regionContent, activeRegion, onRegionSelect, label, className, ...rest }: LayoutPreviewProps): import('react').JSX.Element;
48
+ export interface LayoutPickerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
49
+ /** Layouts to offer. Defaults to `presetLayouts`. */
50
+ layouts?: ScreenLayout[];
51
+ /** Selected layout id (controlled). */
52
+ value?: string | null;
53
+ /** Initially selected layout id (uncontrolled). */
54
+ defaultValue?: string;
55
+ /** Called with the new id and layout when the user picks one (click, Space/Enter or arrow keys). */
56
+ onChange?: (id: string, layout: ScreenLayout) => void;
57
+ /** Show layout names under thumbnails. Default `true`. */
58
+ showNames?: boolean;
59
+ /** Minimum thumbnail column width, any CSS length. Default 112px (from CSS). */
60
+ minColumnWidth?: string;
61
+ /** Disables every option. */
62
+ disabled?: boolean;
63
+ }
64
+ /**
65
+ * Grid of selectable layout thumbnails with radiogroup semantics: Tab enters the group at the selected
66
+ * option, arrow keys move and select, Home/End jump, Space/Enter select.
67
+ * Give it an accessible name with `aria-label` or `aria-labelledby`.
68
+ */
69
+ export declare function LayoutPicker({ layouts, value, defaultValue, onChange, showNames, minColumnWidth, disabled, className, style, ...rest }: LayoutPickerProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { LayoutPicker, LayoutPreview, presetLayouts } from './LayoutPicker';
2
+ export type { LayoutPickerProps, LayoutPreviewProps, ScreenLayout, LayoutRegion, LayoutOrientation } from './LayoutPicker';
@@ -0,0 +1,67 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface ListProps extends HTMLAttributes<HTMLDivElement> {
3
+ }
4
+ /** Vertical stack of `ListRow`s with 6px gaps. */
5
+ export declare function List({ className, children, ...rest }: ListProps): import('react').JSX.Element;
6
+ export interface ListHeaderProps extends HTMLAttributes<HTMLDivElement> {
7
+ }
8
+ /** Column label row (12px muted). Use `ListColumn` children. */
9
+ export declare function ListHeader({ className, children, ...rest }: ListHeaderProps): import('react').JSX.Element;
10
+ export interface ListColumnProps extends HTMLAttributes<HTMLSpanElement> {
11
+ sortable?: boolean;
12
+ sort?: 'ascending' | 'descending';
13
+ /** Fixed width in px; omit for flexible. */
14
+ width?: number;
15
+ grow?: boolean;
16
+ }
17
+ export declare function ListColumn({ sortable, sort, width, grow, className, style, children, ...rest }: ListColumnProps): import('react').JSX.Element;
18
+ export type ListRowStatus = 'none' | 'success' | 'error' | 'warning' | 'pending';
19
+ export interface ListRowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onToggle'> {
20
+ /** Colour of the 4px bar at the left edge. */
21
+ status?: ListRowStatus;
22
+ interactive?: boolean;
23
+ selected?: boolean;
24
+ /** Icon / thumbnail slot at the start. */
25
+ thumb?: ReactNode;
26
+ /** Large 46px thumbnail (template list). */
27
+ thumbLarge?: boolean;
28
+ /** Action icons at the end. */
29
+ actions?: ReactNode;
30
+ /** Small tag above the title (e.g. NEW). */
31
+ tag?: ReactNode;
32
+ /** Show a chevron toggle at the end; pair with `expanded` / `onToggle` and a following `ListDetail`. */
33
+ expandable?: boolean;
34
+ expanded?: boolean;
35
+ onToggle?: (expanded: boolean) => void;
36
+ }
37
+ /** 64px list row (Figma device_list). Compose cells with `ListCell`. */
38
+ export declare function ListRow({ status, interactive, selected, thumb, thumbLarge, actions, tag, expandable, expanded, onToggle, className, children, ...rest }: ListRowProps): import('react').JSX.Element;
39
+ /** Nested detail block under an expanded row. Put a `SubTable` inside. */
40
+ export declare function ListDetail({ className, children, ...rest }: HTMLAttributes<HTMLDivElement>): import('react').JSX.Element;
41
+ export interface SubTableColumn {
42
+ key: string;
43
+ label: ReactNode;
44
+ width?: number;
45
+ }
46
+ export interface SubTableProps extends HTMLAttributes<HTMLTableElement> {
47
+ columns: SubTableColumn[];
48
+ rows: Array<Record<string, ReactNode> & {
49
+ id: string;
50
+ }>;
51
+ }
52
+ /** Compact table inside a list detail (Figma 12920:38999 nested device rows). */
53
+ export declare function SubTable({ columns, rows, className, ...rest }: SubTableProps): import('react').JSX.Element;
54
+ /** 70x48 thumbnail with a hover action (Figma 預覽 overlay). */
55
+ export declare function Thumbnail({ src, alt, action, onAction, className, ...rest }: HTMLAttributes<HTMLSpanElement> & {
56
+ src: string;
57
+ alt?: string;
58
+ action?: ReactNode;
59
+ onAction?: () => void;
60
+ }): import('react').JSX.Element;
61
+ export interface ListCellProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
62
+ /** Primary 13px medium text. */
63
+ title?: ReactNode;
64
+ width?: number;
65
+ grow?: boolean;
66
+ }
67
+ export declare function ListCell({ title, width, grow, className, style, children, ...rest }: ListCellProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { List, ListHeader, ListColumn, ListRow, ListCell, ListDetail, SubTable, Thumbnail } from './List';
2
+ export type { ListProps, ListHeaderProps, ListColumnProps, ListRowProps, ListRowStatus, ListCellProps, SubTableProps, SubTableColumn } from './List';
@@ -0,0 +1,24 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface MarqueeProps extends HTMLAttributes<HTMLDivElement> {
3
+ /** Messages to cycle through, separated by `separator`. Use this or `children`. */
4
+ items?: ReactNode[];
5
+ /** Node placed between `items`. Default "•". */
6
+ separator?: ReactNode;
7
+ /** Scroll speed in pixels per second. Default 80. */
8
+ speed?: number;
9
+ /** `neutral` slate bar (default) or `brand` accent bar. */
10
+ tone?: 'neutral' | 'brand';
11
+ /** `md` (default, 16px text) or `sm`. Both follow the kiosk scale. */
12
+ size?: 'sm' | 'md';
13
+ /** Stop the animation (e.g. from a pause button — recommended for WCAG 2.2.2 on interactive pages). */
14
+ paused?: boolean;
15
+ /** Pause while hovered or focused. Default true. */
16
+ pauseOnHover?: boolean;
17
+ /** Content, when not using `items`. */
18
+ children?: ReactNode;
19
+ }
20
+ /**
21
+ * Horizontally scrolling ticker. Content is rendered twice for a seamless loop; the copy is
22
+ * `aria-hidden`. Under `prefers-reduced-motion` the text is static and truncated.
23
+ */
24
+ export declare function Marquee({ items, separator, speed, tone, size, paused, pauseOnHover, className, style, children, ...rest }: MarqueeProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Marquee } from './Marquee';
2
+ export type { MarqueeProps } from './Marquee';
@@ -0,0 +1,19 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export declare function MediaGrid({ className, children, ...rest }: HTMLAttributes<HTMLDivElement>): import('react').JSX.Element;
3
+ export interface MediaCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSelect'> {
4
+ name: ReactNode;
5
+ /** Thumbnail URL. Omit with `folder` for a folder card. */
6
+ src?: string;
7
+ folder?: boolean;
8
+ selected?: boolean;
9
+ /** Show the 16px checkbox; fires with the new state. */
10
+ onSelect?: (selected: boolean) => void;
11
+ }
12
+ /** Square media tile (Figma screen / folder_s in the media picker). */
13
+ export declare function MediaCard({ name, src, folder, selected, onSelect, className, ...rest }: MediaCardProps): import('react').JSX.Element;
14
+ export interface MediaNoticeProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
15
+ title?: ReactNode;
16
+ limits: Array<[ReactNode, ReactNode]>;
17
+ }
18
+ /** "支援格式與大小限制" footer text (Figma notice 4352:11379). */
19
+ export declare function MediaNotice({ title, limits, className, ...rest }: MediaNoticeProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { MediaGrid, MediaCard, MediaNotice } from './Media';
2
+ export type { MediaCardProps, MediaNoticeProps } from './Media';
@@ -0,0 +1,15 @@
1
+ import { ButtonHTMLAttributes, HTMLAttributes } from 'react';
2
+ export interface MenuProps extends HTMLAttributes<HTMLDivElement> {
3
+ /** Where the caret points from. `none` hides it. */
4
+ arrow?: 'center' | 'left' | 'right' | 'none';
5
+ /** Left-align item text (default is centred, per Figma). */
6
+ align?: 'center' | 'start';
7
+ }
8
+ /** Dark popup menu (Figma module/popup/tooltip). Positioning is up to the caller. */
9
+ export declare function Menu({ arrow, align, className, children, ...rest }: MenuProps): import('react').JSX.Element;
10
+ export interface MenuItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {
11
+ /** Warning-coloured text for destructive actions. */
12
+ danger?: boolean;
13
+ }
14
+ export declare function MenuItem({ danger, type, className, children, disabled, ...rest }: MenuItemProps): import('react').JSX.Element;
15
+ export declare function MenuDivider(): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Menu, MenuItem, MenuDivider } from './Menu';
2
+ export type { MenuProps, MenuItemProps } from './Menu';
@@ -0,0 +1,47 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export type NumberBoardHighlight = 'calling' | 'yours';
3
+ export type NumberBoardSize = 'compact' | 'display';
4
+ export interface NumberBoardItem {
5
+ /** Number to display. Also used as the key and to look up `highlight`. */
6
+ number: string | number;
7
+ /** Highlight for this cell; overrides the `highlight` map. */
8
+ highlight?: NumberBoardHighlight;
9
+ /** Custom tag text for this cell. */
10
+ tag?: ReactNode;
11
+ }
12
+ export interface NumberBoardProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
13
+ /** Header band text, e.g. "已叫號碼". Omit for no band. */
14
+ title?: ReactNode;
15
+ /** Header band colour: `brand` (accent, default) or `neutral` (slate band). */
16
+ headerTone?: 'brand' | 'neutral';
17
+ /** Numbers to show, in order. Strings / numbers or `NumberBoardItem`s. */
18
+ numbers: Array<string | number | NumberBoardItem>;
19
+ /** Grid column count. */
20
+ columns?: number;
21
+ /** `compact` mobile tiles (bg-subtle, 50px) or `display` signage (big numbers, card shadow). */
22
+ size?: NumberBoardSize;
23
+ /** Map of number → highlight. Flagged cells get an outline and a tag. */
24
+ highlight?: Record<string, NumberBoardHighlight>;
25
+ /** Tag text per highlight kind. Defaults: "Calling" / "Yours". */
26
+ tagLabels?: Partial<Record<NumberBoardHighlight, ReactNode>>;
27
+ /** Text shown when `numbers` is empty. */
28
+ emptyText?: ReactNode;
29
+ /** Heading level for the title (default 2). */
30
+ headingLevel?: 2 | 3 | 4;
31
+ /** Announce newly added numbers politely to screen readers (calling boards). */
32
+ live?: boolean;
33
+ }
34
+ /** Titled grid of queue numbers for calling boards and mobile queue pages. */
35
+ export declare function NumberBoard({ title, headerTone, numbers, columns, size, highlight, tagLabels, emptyText, headingLevel, live, className, style, ...rest }: NumberBoardProps): import('react').JSX.Element;
36
+ export interface CounterTileProps extends HTMLAttributes<HTMLDivElement> {
37
+ /** Counter name in the header band, e.g. "Counter 1" / "3番窓口". */
38
+ counter: ReactNode;
39
+ /** Number being served. Omit (or pass `null`) when the counter is idle. */
40
+ number?: ReactNode;
41
+ /** Placeholder when idle. Default "—". */
42
+ idleText?: ReactNode;
43
+ /** Just called: accent band + outline, and a short pulse (off with reduced motion). */
44
+ calling?: boolean;
45
+ }
46
+ /** Counter name band with the number it is serving (calling board). */
47
+ export declare function CounterTile({ counter, number, idleText, calling, className, ...rest }: CounterTileProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { NumberBoard, CounterTile } from './NumberBoard';
2
+ export type { NumberBoardProps, NumberBoardItem, NumberBoardHighlight, NumberBoardSize, CounterTileProps } from './NumberBoard';
@@ -0,0 +1,36 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface NumberStepperProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
3
+ /** Current value (controlled). */
4
+ value?: number;
5
+ /** Initial value when uncontrolled. Default `min` or 0. */
6
+ defaultValue?: number;
7
+ /** Called with the new, clamped value. */
8
+ onChange?: (value: number) => void;
9
+ /** Lower bound; the − button disables at it. */
10
+ min?: number;
11
+ /** Upper bound; the + button disables at it. */
12
+ max?: number;
13
+ /** Increment for the buttons and ArrowUp / ArrowDown (PageUp / PageDown step ×10). Default 1. */
14
+ step?: number;
15
+ /** Disables the whole control. */
16
+ disabled?: boolean;
17
+ /** Marks the control invalid (red border). */
18
+ error?: boolean;
19
+ /** `sm` 32 · `md` 36 (default) · `lg` 44. */
20
+ size?: 'sm' | 'md' | 'lg';
21
+ /** Stretch to the container width. */
22
+ block?: boolean;
23
+ /** Label rendered above the control. */
24
+ label?: ReactNode;
25
+ /** Helper or error text below the control. */
26
+ hint?: ReactNode;
27
+ /** Form field name; the value is submitted from the text input. */
28
+ name?: string;
29
+ /** Id for the text input (label target). */
30
+ inputId?: string;
31
+ /** Accessible names for the buttons. */
32
+ decrementLabel?: string;
33
+ incrementLabel?: string;
34
+ }
35
+ /** "− value +" numeric stepper with min/max/step and typed entry (commits on Enter or blur). */
36
+ export declare function NumberStepper({ value, defaultValue, onChange, min, max, step, disabled, error, size, block, label, hint, name, inputId, decrementLabel, incrementLabel, className, ...rest }: NumberStepperProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { NumberStepper } from './NumberStepper';
2
+ export type { NumberStepperProps } from './NumberStepper';
@@ -0,0 +1,66 @@
1
+ import { ChangeEvent, HTMLAttributes, InputHTMLAttributes, ReactNode } from 'react';
2
+ type Indicator = 'radio' | 'checkbox';
3
+ export interface OptionCardProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'title' | 'size' | 'onChange'> {
4
+ /** Main label (bold 14px). */
5
+ title: ReactNode;
6
+ /** Muted second line. */
7
+ description?: ReactNode;
8
+ /** Indicator type when used outside a group. Inside `OptionCardGroup` the group decides. */
9
+ indicator?: Indicator;
10
+ /** Leading icon (24px, accent). */
11
+ icon?: ReactNode;
12
+ /** Trailing slot, e.g. a price or count. */
13
+ aside?: ReactNode;
14
+ /** `md` 72px (default) or `sm` 56px. Inside a group the group decides. */
15
+ size?: 'sm' | 'md';
16
+ /** Value submitted with the form and used by `OptionCardGroup`. */
17
+ value?: string;
18
+ /** Change handler for standalone use; receives the new checked state. */
19
+ onChange?: (checked: boolean, event: ChangeEvent<HTMLInputElement>) => void;
20
+ }
21
+ /**
22
+ * Large selectable card. A native radio / checkbox lives inside a `<label>`,
23
+ * so keyboard, forms and screen readers work as with a plain input.
24
+ */
25
+ export declare function OptionCard({ title, description, indicator, icon, aside, size, value, checked, disabled, onChange, className, id, name, ...rest }: OptionCardProps): import('react').JSX.Element;
26
+ interface GroupBase extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
27
+ /** Accessible name of the group (use this or `aria-labelledby`). */
28
+ label?: string;
29
+ /** Shared input `name`; generated if omitted. */
30
+ name?: string;
31
+ /** Lay cards out side by side in equal columns. */
32
+ horizontal?: boolean;
33
+ /** Disable every card. */
34
+ disabled?: boolean;
35
+ /** Card size for every card. */
36
+ size?: 'sm' | 'md';
37
+ /** `OptionCard`s. */
38
+ children?: ReactNode;
39
+ }
40
+ export interface OptionCardRadioGroupProps extends GroupBase {
41
+ /** Single choice (default): renders `role="radiogroup"`. Arrow keys move and select, as with native radios. */
42
+ type?: 'radio';
43
+ /** Selected value (controlled). */
44
+ value?: string | null;
45
+ /** Initial value (uncontrolled). */
46
+ defaultValue?: string;
47
+ /** Called with the newly selected value. */
48
+ onChange?: (value: string) => void;
49
+ }
50
+ export interface OptionCardCheckboxGroupProps extends GroupBase {
51
+ /** Multiple choice: renders `role="group"` with checkboxes. */
52
+ type: 'checkbox';
53
+ /** Selected values (controlled). */
54
+ value?: string[];
55
+ /** Initial values (uncontrolled). */
56
+ defaultValue?: string[];
57
+ /** Called with the new list of selected values. */
58
+ onChange?: (value: string[]) => void;
59
+ }
60
+ export type OptionCardGroupProps = OptionCardRadioGroupProps | OptionCardCheckboxGroupProps;
61
+ /**
62
+ * Group of `OptionCard`s. Radio mode (default) is a `radiogroup`: Tab enters at the selected card,
63
+ * arrow keys move the selection (native radio behaviour). Checkbox mode allows several.
64
+ */
65
+ export declare function OptionCardGroup(props: OptionCardGroupProps): import('react').JSX.Element;
66
+ export {};
@@ -0,0 +1,2 @@
1
+ export { OptionCard, OptionCardGroup } from './OptionCard';
2
+ export type { OptionCardProps, OptionCardGroupProps, OptionCardRadioGroupProps, OptionCardCheckboxGroupProps } from './OptionCard';
@@ -0,0 +1,25 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface PageHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
3
+ /** Usually a `<Tabs>`; rendered at the left, bottom-aligned. */
4
+ tabs?: ReactNode;
5
+ /** Rounded action buttons at the right. */
6
+ actions?: ReactNode;
7
+ /** Back-arrow title variant (Figma calendar page). */
8
+ title?: ReactNode;
9
+ onBack?: () => void;
10
+ }
11
+ /** Light blue-grey band under the app bar (Figma 裝置清單 / 裝置組 + 下載 / 新增). */
12
+ export declare function PageHeader({ tabs, actions, title, onBack, className, children, ...rest }: PageHeaderProps): import('react').JSX.Element;
13
+ export interface PageTitleProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
14
+ title: ReactNode;
15
+ /** e.g. "22個項目" */
16
+ count?: ReactNode;
17
+ /** Text action at the right, e.g. 選取. */
18
+ action?: ReactNode;
19
+ }
20
+ /** Section heading with item count (所有裝置 / 22個項目). */
21
+ export declare function PageTitle({ title, count, action, className, ...rest }: PageTitleProps): import('react').JSX.Element;
22
+ export interface ToolbarProps extends HTMLAttributes<HTMLDivElement> {
23
+ }
24
+ /** Thin row for search + filters above a list. Use `<div className="kb-toolbar__spacer" />` to push items right. */
25
+ export declare function Toolbar({ className, children, ...rest }: ToolbarProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { PageHeader, PageTitle, Toolbar } from './PageHeader';
2
+ export type { PageHeaderProps, PageTitleProps, ToolbarProps } from './PageHeader';
@@ -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';