@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.
- package/GUIDE.md +210 -0
- package/dist/components/Accordion/Accordion.d.ts +48 -0
- package/dist/components/Accordion/index.d.ts +2 -0
- package/dist/components/Alert/Alert.d.ts +23 -0
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/AppBar/AppBar.d.ts +22 -0
- package/dist/components/AppBar/index.d.ts +2 -0
- package/dist/components/ArrowButton/ArrowButton.d.ts +20 -0
- package/dist/components/ArrowButton/index.d.ts +2 -0
- package/dist/components/Avatar/Avatar.d.ts +38 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Badge/Badge.d.ts +30 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +21 -0
- package/dist/components/Breadcrumb/index.d.ts +2 -0
- package/dist/components/Button/Button.d.ts +22 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Calendar/Calendar.d.ts +37 -0
- package/dist/components/Calendar/index.d.ts +2 -0
- package/dist/components/Card/Card.d.ts +13 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Carousel/Carousel.d.ts +47 -0
- package/dist/components/Carousel/index.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +9 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/ChoiceChips/ChoiceChips.d.ts +45 -0
- package/dist/components/ChoiceChips/index.d.ts +2 -0
- package/dist/components/Combobox/Combobox.d.ts +23 -0
- package/dist/components/Combobox/index.d.ts +2 -0
- package/dist/components/DataTable/DataTable.d.ts +70 -0
- package/dist/components/DataTable/index.d.ts +2 -0
- package/dist/components/DateRange/DateRange.d.ts +39 -0
- package/dist/components/DateRange/index.d.ts +2 -0
- package/dist/components/DescriptionList/DescriptionList.d.ts +12 -0
- package/dist/components/DescriptionList/index.d.ts +2 -0
- package/dist/components/Dialog/Dialog.d.ts +29 -0
- package/dist/components/Dialog/index.d.ts +2 -0
- package/dist/components/Drawer/Drawer.d.ts +28 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/Dropdown/Dropdown.d.ts +65 -0
- package/dist/components/Dropdown/index.d.ts +2 -0
- package/dist/components/Editor/Editor.d.ts +60 -0
- package/dist/components/Editor/index.d.ts +2 -0
- package/dist/components/EmptyState/EmptyState.d.ts +17 -0
- package/dist/components/EmptyState/index.d.ts +2 -0
- package/dist/components/FileUpload/FileUpload.d.ts +29 -0
- package/dist/components/FileUpload/index.d.ts +2 -0
- package/dist/components/Filter/Filter.d.ts +27 -0
- package/dist/components/Filter/index.d.ts +2 -0
- package/dist/components/Floating/Floating.d.ts +50 -0
- package/dist/components/Floating/index.d.ts +4 -0
- package/dist/components/FormSection/FormSection.d.ts +40 -0
- package/dist/components/FormSection/index.d.ts +2 -0
- package/dist/components/IconButton/IconButton.d.ts +17 -0
- package/dist/components/IconButton/index.d.ts +2 -0
- package/dist/components/Input/Input.d.ts +57 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Kbd/Kbd.d.ts +18 -0
- package/dist/components/Kbd/index.d.ts +2 -0
- package/dist/components/Layout/Layout.d.ts +127 -0
- package/dist/components/Layout/index.d.ts +2 -0
- package/dist/components/LayoutPicker/LayoutPicker.d.ts +69 -0
- package/dist/components/LayoutPicker/index.d.ts +2 -0
- package/dist/components/List/List.d.ts +67 -0
- package/dist/components/List/index.d.ts +2 -0
- package/dist/components/Marquee/Marquee.d.ts +24 -0
- package/dist/components/Marquee/index.d.ts +2 -0
- package/dist/components/Media/Media.d.ts +19 -0
- package/dist/components/Media/index.d.ts +2 -0
- package/dist/components/Menu/Menu.d.ts +15 -0
- package/dist/components/Menu/index.d.ts +2 -0
- package/dist/components/NumberBoard/NumberBoard.d.ts +47 -0
- package/dist/components/NumberBoard/index.d.ts +2 -0
- package/dist/components/NumberStepper/NumberStepper.d.ts +36 -0
- package/dist/components/NumberStepper/index.d.ts +2 -0
- package/dist/components/OptionCard/OptionCard.d.ts +66 -0
- package/dist/components/OptionCard/index.d.ts +2 -0
- package/dist/components/PageHeader/PageHeader.d.ts +25 -0
- package/dist/components/PageHeader/index.d.ts +2 -0
- package/dist/components/Pagination/Pagination.d.ts +10 -0
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/Popover/Popover.d.ts +8 -0
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/Progress/Progress.d.ts +24 -0
- package/dist/components/Progress/index.d.ts +2 -0
- package/dist/components/QueueItem/QueueItem.d.ts +55 -0
- package/dist/components/QueueItem/index.d.ts +2 -0
- package/dist/components/Radio/Radio.d.ts +6 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/Resizable/Resizable.d.ts +40 -0
- package/dist/components/Resizable/index.d.ts +2 -0
- package/dist/components/Schedule/Schedule.d.ts +17 -0
- package/dist/components/Schedule/index.d.ts +2 -0
- package/dist/components/ScreenHeader/Clock.d.ts +21 -0
- package/dist/components/ScreenHeader/ScreenHeader.d.ts +21 -0
- package/dist/components/ScreenHeader/index.d.ts +4 -0
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +17 -0
- package/dist/components/SegmentedControl/index.d.ts +2 -0
- package/dist/components/Select/Select.d.ts +14 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Separator/Separator.d.ts +21 -0
- package/dist/components/Separator/index.d.ts +2 -0
- package/dist/components/SideRail/SideRail.d.ts +18 -0
- package/dist/components/SideRail/index.d.ts +2 -0
- package/dist/components/Slider/Slider.d.ts +52 -0
- package/dist/components/Slider/index.d.ts +2 -0
- package/dist/components/Spinner/Spinner.d.ts +29 -0
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/StatBar/StatBar.d.ts +18 -0
- package/dist/components/StatBar/index.d.ts +2 -0
- package/dist/components/Stepper/Stepper.d.ts +16 -0
- package/dist/components/Stepper/index.d.ts +2 -0
- package/dist/components/Summary/Summary.d.ts +10 -0
- package/dist/components/Summary/index.d.ts +2 -0
- package/dist/components/Switch/Switch.d.ts +10 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Tabs/Tabs.d.ts +14 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/TagInput/TagInput.d.ts +27 -0
- package/dist/components/TagInput/index.d.ts +2 -0
- package/dist/components/TicketNumber/TicketNumber.d.ts +39 -0
- package/dist/components/TicketNumber/index.d.ts +2 -0
- package/dist/components/TileCard/TileCard.d.ts +49 -0
- package/dist/components/TileCard/index.d.ts +2 -0
- package/dist/components/TimeInput/TimeInput.d.ts +10 -0
- package/dist/components/TimeInput/index.d.ts +2 -0
- package/dist/components/Timeline/Timeline.d.ts +83 -0
- package/dist/components/Timeline/index.d.ts +2 -0
- package/dist/components/Toast/Toast.d.ts +15 -0
- package/dist/components/Toast/index.d.ts +2 -0
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +72 -0
- package/dist/components/ToggleGroup/index.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.d.ts +21 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/Tree/Tree.d.ts +18 -0
- package/dist/components/Tree/index.d.ts +2 -0
- package/dist/components/Typography/Typography.d.ts +64 -0
- package/dist/components/Typography/index.d.ts +2 -0
- package/dist/index.d.ts +68 -0
- package/dist/index.js +5075 -0
- package/dist/utils/floating.d.ts +29 -0
- package/package.json +39 -4
- package/README.md +0 -3
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { HTMLAttributes, InputHTMLAttributes, ReactNode, TextareaHTMLAttributes } from 'react';
|
|
2
|
+
interface FieldProps {
|
|
3
|
+
/** Label rendered above the control. */
|
|
4
|
+
label?: ReactNode;
|
|
5
|
+
/** Helper or error text below the control. */
|
|
6
|
+
hint?: ReactNode;
|
|
7
|
+
/** Marks the field invalid: red border and hint. */
|
|
8
|
+
error?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>, FieldProps {
|
|
11
|
+
/** Compact 12px variant (same as size="sm"). */
|
|
12
|
+
small?: boolean;
|
|
13
|
+
/** 44px modal-form height (same as size="lg"). */
|
|
14
|
+
large?: boolean;
|
|
15
|
+
/** `sm` 32 · `md` 36 (editor) · `lg` 44 (console forms) · `xl` 50 radius 5 (mobile). */
|
|
16
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
17
|
+
/** Leading icon; renders the borderless search style used in list toolbars. */
|
|
18
|
+
searchIcon?: ReactNode;
|
|
19
|
+
/** Unit text at the right edge, e.g. 秒. */
|
|
20
|
+
suffix?: ReactNode;
|
|
21
|
+
/** Trailing control inside the field, typically `<Button size="sm">產生</Button>`. */
|
|
22
|
+
action?: ReactNode;
|
|
23
|
+
/** Extra node beside the label, e.g. an `InfoIcon`. */
|
|
24
|
+
labelExtra?: ReactNode;
|
|
25
|
+
/** 16px decorative icon at the right edge (calendar, clock). */
|
|
26
|
+
trailingIcon?: ReactNode;
|
|
27
|
+
/** Monospace text (keys, templates). */
|
|
28
|
+
mono?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/** Text input with optional label / hint. White surface, 1px border, radius 3. */
|
|
31
|
+
export declare function Input({ label, hint, error, small, large, size, searchIcon, suffix, action, labelExtra, trailingIcon, mono, id, className, ...rest }: InputProps): import('react').JSX.Element;
|
|
32
|
+
/** Two-column form layout used in modals (Figma 裝置設定). Wrap a full-width field in `<FormGrid.Full>`. */
|
|
33
|
+
export declare function FormGrid({ className, children, ...rest }: HTMLAttributes<HTMLDivElement>): import('react').JSX.Element;
|
|
34
|
+
export declare namespace FormGrid {
|
|
35
|
+
var Full: ({ className, children, ...rest }: HTMLAttributes<HTMLDivElement>) => import("react").JSX.Element;
|
|
36
|
+
}
|
|
37
|
+
/** A label-styled slot for controls that sit where a label would (e.g. the 定時返回 switch). */
|
|
38
|
+
export declare function FieldSlot({ label, children, className, ...rest }: HTMLAttributes<HTMLDivElement> & {
|
|
39
|
+
label: ReactNode;
|
|
40
|
+
}): import('react').JSX.Element;
|
|
41
|
+
export interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement>, FieldProps {
|
|
42
|
+
}
|
|
43
|
+
/** Multi-line input sharing the Input look. */
|
|
44
|
+
export declare function Textarea({ label, hint, error, id, className, ...rest }: TextareaProps): import('react').JSX.Element;
|
|
45
|
+
export type DateInputProps = Omit<InputProps, 'type' | 'trailingIcon' | 'searchIcon' | 'suffix' | 'action'>;
|
|
46
|
+
/** Native date input styled like the filter's calendar field (Figma module/dropdown/calendar). */
|
|
47
|
+
export declare function DateInput({ className, ...rest }: DateInputProps): import('react').JSX.Element;
|
|
48
|
+
export interface ColorInputProps extends Omit<InputProps, 'value' | 'onChange'> {
|
|
49
|
+
/** Hex colour or empty for "none". */
|
|
50
|
+
value: string;
|
|
51
|
+
onChange?: (hex: string) => void;
|
|
52
|
+
}
|
|
53
|
+
/** Hex text field with a 20px swatch (Figma elements/input/labeled/left in the editor settings). */
|
|
54
|
+
export declare function ColorInput({ value, onChange, className, ...rest }: ColorInputProps): import('react').JSX.Element;
|
|
55
|
+
/** Two fields side by side (editor X/Y, W/H). */
|
|
56
|
+
export declare function FieldPair({ className, children, ...rest }: HTMLAttributes<HTMLDivElement>): import('react').JSX.Element;
|
|
57
|
+
export {};
|
|
@@ -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,127 @@
|
|
|
1
|
+
import { ElementType, HTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
|
+
/** A spacing step: `--kb-space-N` (0 = none). */
|
|
3
|
+
export type Space = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12;
|
|
4
|
+
export type Align = 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
|
5
|
+
export type Justify = 'start' | 'center' | 'end' | 'between';
|
|
6
|
+
export type Surface = 'canvas' | 'surface' | 'subtle' | 'muted' | 'band' | 'selected' | 'stage';
|
|
7
|
+
export type Border = boolean | 'faint' | 'top' | 'bottom' | 'start' | 'end';
|
|
8
|
+
export interface BoxProps extends Omit<HTMLAttributes<HTMLElement>, 'color'> {
|
|
9
|
+
/** Element to render. @default 'div' */
|
|
10
|
+
as?: ElementType;
|
|
11
|
+
/** Reaches the rendered element. */
|
|
12
|
+
ref?: Ref<HTMLElement>;
|
|
13
|
+
/** Padding on every side, then per axis / side (override `padding`). */
|
|
14
|
+
padding?: Space;
|
|
15
|
+
paddingX?: Space;
|
|
16
|
+
paddingY?: Space;
|
|
17
|
+
paddingTop?: Space;
|
|
18
|
+
paddingBottom?: Space;
|
|
19
|
+
/** Padding at the start / end of the line (left / right in left-to-right text). */
|
|
20
|
+
paddingStart?: Space;
|
|
21
|
+
paddingEnd?: Space;
|
|
22
|
+
/** Margin on every side, then per axis / side. */
|
|
23
|
+
margin?: Space;
|
|
24
|
+
marginX?: Space;
|
|
25
|
+
marginY?: Space;
|
|
26
|
+
marginTop?: Space;
|
|
27
|
+
marginBottom?: Space;
|
|
28
|
+
marginStart?: Space;
|
|
29
|
+
marginEnd?: Space;
|
|
30
|
+
/** Fixed width in px (does not shrink in a row). */
|
|
31
|
+
width?: number;
|
|
32
|
+
minWidth?: number;
|
|
33
|
+
/** Maximum width in px. With `center`, the box is centred in its parent. */
|
|
34
|
+
maxWidth?: number;
|
|
35
|
+
height?: number;
|
|
36
|
+
/** Minimum / maximum height: px, or a share of the viewport as `'60vh'`. */
|
|
37
|
+
minHeight?: number | `${number}vh`;
|
|
38
|
+
maxHeight?: number | `${number}vh`;
|
|
39
|
+
center?: boolean;
|
|
40
|
+
/** Take the remaining space in a row or column (`auto`: in proportion to content). */
|
|
41
|
+
grow?: boolean | 'auto';
|
|
42
|
+
/** Keep its size in a row or column. */
|
|
43
|
+
noShrink?: boolean;
|
|
44
|
+
/** Fill the parent's height (and let children scroll inside). */
|
|
45
|
+
fullHeight?: boolean;
|
|
46
|
+
fullWidth?: boolean;
|
|
47
|
+
/** The viewport's height (`full`, an app shell) or at least it (`min`, a page that grows). */
|
|
48
|
+
viewport?: 'full' | 'min';
|
|
49
|
+
/** Scroll its overflow. */
|
|
50
|
+
scroll?: boolean;
|
|
51
|
+
/** Clip its overflow. */
|
|
52
|
+
clip?: boolean;
|
|
53
|
+
relative?: boolean;
|
|
54
|
+
/** Cover the nearest positioned parent (position absolute, inset 0). */
|
|
55
|
+
overlay?: boolean;
|
|
56
|
+
/** Let pointer events through to what lies under it. */
|
|
57
|
+
passThrough?: boolean;
|
|
58
|
+
/** No text selection (drag surfaces). */
|
|
59
|
+
noSelect?: boolean;
|
|
60
|
+
/** Takes clicks again inside a `passThrough` overlay. */
|
|
61
|
+
takePointer?: boolean;
|
|
62
|
+
/** Pinned to a corner of the nearest positioned parent, `cornerOffset` from its edges. */
|
|
63
|
+
corner?: 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
|
|
64
|
+
cornerOffset?: Space;
|
|
65
|
+
/** Dimmed at half opacity (inactive, empty). */
|
|
66
|
+
muted?: boolean;
|
|
67
|
+
alignSelf?: 'start' | 'center' | 'end' | 'stretch';
|
|
68
|
+
background?: Surface;
|
|
69
|
+
border?: Border;
|
|
70
|
+
/** Colour of the border (default: the default border colour). */
|
|
71
|
+
borderTone?: 'error' | 'brand' | 'divider';
|
|
72
|
+
/** A 4px start border (with `border="start"`), the grouping bar of a card. */
|
|
73
|
+
borderStrong?: boolean;
|
|
74
|
+
/** Dashed instead of solid (with a border prop): drop targets, drafts. */
|
|
75
|
+
dashed?: boolean;
|
|
76
|
+
/** Stacking order among positioned siblings (1–3). */
|
|
77
|
+
layer?: 1 | 2 | 3;
|
|
78
|
+
/** A 2px accent ring (a picked or pointed-at item). */
|
|
79
|
+
ring?: boolean;
|
|
80
|
+
/** Focus outline when the block itself takes keyboard focus. */
|
|
81
|
+
focusRing?: boolean;
|
|
82
|
+
/** For media rendered as a Box (`as="video"` / `"img"`): fill the box, cropped (`cover`) or whole (`contain`). */
|
|
83
|
+
fit?: 'cover' | 'contain';
|
|
84
|
+
/** Tint on hover (a clickable row or block). */
|
|
85
|
+
hover?: boolean;
|
|
86
|
+
radius?: 'sm' | 'md' | 'lg';
|
|
87
|
+
shadow?: 'sm' | 'md';
|
|
88
|
+
children?: ReactNode;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* A plain block with spacing, size and surface from tokens: the layout atom.
|
|
92
|
+
* Use it where a component would otherwise need an ad-hoc wrapper with its own CSS.
|
|
93
|
+
*/
|
|
94
|
+
export declare function Box(props: BoxProps): import('react').JSX.Element;
|
|
95
|
+
export interface FlexProps extends BoxProps {
|
|
96
|
+
/** Space between children. */
|
|
97
|
+
gap?: Space;
|
|
98
|
+
/** Cross-axis alignment. Stack defaults to stretch, Inline to center. */
|
|
99
|
+
align?: Align;
|
|
100
|
+
justify?: Justify;
|
|
101
|
+
/** Let children wrap onto more lines (Inline). */
|
|
102
|
+
wrap?: boolean;
|
|
103
|
+
/** Inline: become a column below this breakpoint (sm 640, md 768, lg 1024, xl 1280). */
|
|
104
|
+
stackBelow?: Breakpoint;
|
|
105
|
+
}
|
|
106
|
+
export type Breakpoint = 'sm' | 'md' | 'lg' | 'xl';
|
|
107
|
+
/** Children in a column with a token gap. */
|
|
108
|
+
export declare function Stack({ gap, align, justify, wrap, stackBelow: _ignored, ...props }: FlexProps): import('react').JSX.Element;
|
|
109
|
+
/** Children in a row (centred vertically by default) with a token gap; `wrap` for a wrapping row. */
|
|
110
|
+
export declare function Inline({ gap, align, justify, wrap, stackBelow, ...props }: FlexProps): import('react').JSX.Element;
|
|
111
|
+
export interface GridProps extends BoxProps {
|
|
112
|
+
/** Equal columns (a number) or a `grid-template-columns` value. @default 1 */
|
|
113
|
+
columns?: number | string;
|
|
114
|
+
/** Instead of `columns`: as many columns as fit, each at least this many px wide. */
|
|
115
|
+
minColumnWidth?: number;
|
|
116
|
+
/** One column below this breakpoint. */
|
|
117
|
+
stackBelow?: Breakpoint;
|
|
118
|
+
gap?: Space;
|
|
119
|
+
/** Gap between rows / columns when they differ (override `gap`). */
|
|
120
|
+
rowGap?: Space;
|
|
121
|
+
columnGap?: Space;
|
|
122
|
+
align?: Align;
|
|
123
|
+
}
|
|
124
|
+
/** Children on a grid of columns with a token gap. */
|
|
125
|
+
export declare function Grid({ columns, minColumnWidth, stackBelow, gap, rowGap, columnGap, align, style, ...props }: GridProps): import('react').JSX.Element;
|
|
126
|
+
/** Pushes the items after it to the far end of a row or column. */
|
|
127
|
+
export declare function Spacer(): import('react').JSX.Element;
|
|
@@ -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,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,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,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,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,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,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,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,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;
|