@mrpelz/uikit-ish 7.26.2 → 7.29.1
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/dist/components/accordion/style.css +0 -3
- package/dist/components/activity-view/style.css +17 -17
- package/dist/components/alert/style.css +12 -10
- package/dist/components/avatar/style.css +2 -2
- package/dist/components/badge/style.css +1 -1
- package/dist/components/button/style.css +12 -12
- package/dist/components/card/buttons.d.ts +35 -0
- package/dist/components/card/buttons.d.ts.map +1 -0
- package/dist/components/card/buttons.js +60 -0
- package/dist/components/card/buttons.js.map +1 -0
- package/dist/components/card/channels.d.ts +43 -0
- package/dist/components/card/channels.d.ts.map +1 -0
- package/dist/components/card/channels.js +321 -0
- package/dist/components/card/channels.js.map +1 -0
- package/dist/components/card/color.d.ts +21 -0
- package/dist/components/card/color.d.ts.map +1 -0
- package/dist/components/card/color.js +100 -0
- package/dist/components/card/color.js.map +1 -0
- package/dist/components/card/main.d.ts +67 -39
- package/dist/components/card/main.d.ts.map +1 -1
- package/dist/components/card/main.js +79 -274
- package/dist/components/card/main.js.map +1 -1
- package/dist/components/card/parts.css +769 -0
- package/dist/components/card/press.d.ts +25 -0
- package/dist/components/card/press.d.ts.map +1 -0
- package/dist/components/card/press.js +111 -0
- package/dist/components/card/press.js.map +1 -0
- package/dist/components/card/progress.d.ts +43 -0
- package/dist/components/card/progress.d.ts.map +1 -0
- package/dist/components/card/progress.js +122 -0
- package/dist/components/card/progress.js.map +1 -0
- package/dist/components/card/props.d.ts +324 -14
- package/dist/components/card/props.d.ts.map +1 -1
- package/dist/components/card/root.d.ts +100 -0
- package/dist/components/card/root.d.ts.map +1 -0
- package/dist/components/card/root.js +388 -0
- package/dist/components/card/root.js.map +1 -0
- package/dist/components/card/rows.d.ts +19 -0
- package/dist/components/card/rows.d.ts.map +1 -0
- package/dist/components/card/rows.js +185 -0
- package/dist/components/card/rows.js.map +1 -0
- package/dist/components/card/segmented.d.ts +61 -0
- package/dist/components/card/segmented.d.ts.map +1 -0
- package/dist/components/card/segmented.js +289 -0
- package/dist/components/card/segmented.js.map +1 -0
- package/dist/components/card/shared.d.ts +55 -0
- package/dist/components/card/shared.d.ts.map +1 -0
- package/dist/components/card/shared.js +80 -0
- package/dist/components/card/shared.js.map +1 -0
- package/dist/components/card/slider.d.ts +16 -0
- package/dist/components/card/slider.d.ts.map +1 -0
- package/dist/components/card/slider.js +48 -0
- package/dist/components/card/slider.js.map +1 -0
- package/dist/components/card/stages.d.ts +18 -0
- package/dist/components/card/stages.d.ts.map +1 -0
- package/dist/components/card/stages.js +37 -0
- package/dist/components/card/stages.js.map +1 -0
- package/dist/components/card/style.css +125 -66
- package/dist/components/checkbox/style.css +10 -5
- package/dist/components/collapsible/style.css +0 -3
- package/dist/components/color-picker/color.d.ts +2 -2
- package/dist/components/color-picker/color.d.ts.map +1 -1
- package/dist/components/color-picker/color.js +7 -7
- package/dist/components/color-picker/color.js.map +1 -1
- package/dist/components/color-picker/main.d.ts +11 -5
- package/dist/components/color-picker/main.d.ts.map +1 -1
- package/dist/components/color-picker/main.js +128 -57
- package/dist/components/color-picker/main.js.map +1 -1
- package/dist/components/color-picker/props.d.ts +216 -6
- package/dist/components/color-picker/props.d.ts.map +1 -1
- package/dist/components/color-picker/style.css +8 -8
- package/dist/components/control-cards/main.d.ts +6 -17
- package/dist/components/control-cards/main.d.ts.map +1 -1
- package/dist/components/control-cards/main.js +119 -758
- package/dist/components/control-cards/main.js.map +1 -1
- package/dist/components/control-cards/props.d.ts +79 -250
- package/dist/components/control-cards/props.d.ts.map +1 -1
- package/dist/components/control-cards/style.css +2 -492
- package/dist/components/date-picker/main.d.ts +8 -3
- package/dist/components/date-picker/main.d.ts.map +1 -1
- package/dist/components/date-picker/main.js +71 -29
- package/dist/components/date-picker/main.js.map +1 -1
- package/dist/components/date-picker/pager.d.ts.map +1 -1
- package/dist/components/date-picker/pager.js +9 -2
- package/dist/components/date-picker/pager.js.map +1 -1
- package/dist/components/date-picker/props.d.ts +81 -5
- package/dist/components/date-picker/props.d.ts.map +1 -1
- package/dist/components/date-picker/style.css +24 -16
- package/dist/components/edit-menu/style.css +2 -2
- package/dist/components/glass/style.css +38 -5
- package/dist/components/grid/main.d.ts +1 -1
- package/dist/components/grid/main.d.ts.map +1 -1
- package/dist/components/grid/main.js +104 -21
- package/dist/components/grid/main.js.map +1 -1
- package/dist/components/grid/props.d.ts +75 -5
- package/dist/components/grid/props.d.ts.map +1 -1
- package/dist/components/grid/style.css +68 -38
- package/dist/components/header/style.css +12 -6
- package/dist/components/index.d.ts +10 -8
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +6 -4
- package/dist/components/index.js.map +1 -1
- package/dist/components/layout/style.css +0 -3
- package/dist/components/list/main.d.ts +5 -3
- package/dist/components/list/main.d.ts.map +1 -1
- package/dist/components/list/main.js +42 -5
- package/dist/components/list/main.js.map +1 -1
- package/dist/components/list/props.d.ts +5 -0
- package/dist/components/list/props.d.ts.map +1 -1
- package/dist/components/list/reorder.d.ts +34 -0
- package/dist/components/list/reorder.d.ts.map +1 -1
- package/dist/components/list/reorder.js +40 -17
- package/dist/components/list/reorder.js.map +1 -1
- package/dist/components/list/style.css +135 -72
- package/dist/components/menu/style.css +38 -30
- package/dist/components/navigation/main.d.ts.map +1 -1
- package/dist/components/navigation/main.js +35 -13
- package/dist/components/navigation/main.js.map +1 -1
- package/dist/components/navigation/style.css +7 -0
- package/dist/components/page-control/main.d.ts.map +1 -1
- package/dist/components/page-control/main.js +32 -15
- package/dist/components/page-control/main.js.map +1 -1
- package/dist/components/page-control/props.d.ts +6 -0
- package/dist/components/page-control/props.d.ts.map +1 -1
- package/dist/components/page-control/style.css +36 -0
- package/dist/components/pager/main.d.ts +12 -0
- package/dist/components/pager/main.d.ts.map +1 -0
- package/dist/components/pager/main.js +368 -0
- package/dist/components/pager/main.js.map +1 -0
- package/dist/components/pager/props.d.ts +36 -0
- package/dist/components/pager/props.d.ts.map +1 -0
- package/dist/components/pager/props.js +2 -0
- package/dist/components/pager/props.js.map +1 -0
- package/dist/components/pager/style.css +42 -0
- package/dist/components/progress/main.d.ts.map +1 -1
- package/dist/components/progress/main.js +3 -2
- package/dist/components/progress/main.js.map +1 -1
- package/dist/components/progress/style.css +4 -10
- package/dist/components/roll/style.css +2 -2
- package/dist/components/segmented/style.css +16 -7
- package/dist/components/settings/main.d.ts +35 -1
- package/dist/components/settings/main.d.ts.map +1 -1
- package/dist/components/settings/main.js +297 -68
- package/dist/components/settings/main.js.map +1 -1
- package/dist/components/settings/props.d.ts +45 -4
- package/dist/components/settings/props.d.ts.map +1 -1
- package/dist/components/settings/region.d.ts +3 -0
- package/dist/components/settings/region.d.ts.map +1 -0
- package/dist/components/settings/region.js +120 -0
- package/dist/components/settings/region.js.map +1 -0
- package/dist/components/settings/style.css +2 -2
- package/dist/components/sheet/snap.d.ts.map +1 -1
- package/dist/components/sheet/snap.js +13 -5
- package/dist/components/sheet/snap.js.map +1 -1
- package/dist/components/sheet/style.css +48 -3
- package/dist/components/slider/main.d.ts.map +1 -1
- package/dist/components/slider/main.js +5 -2
- package/dist/components/slider/main.js.map +1 -1
- package/dist/components/slider/style.css +6 -6
- package/dist/components/stack/main.d.ts +8 -0
- package/dist/components/stack/main.d.ts.map +1 -0
- package/dist/components/stack/main.js +25 -0
- package/dist/components/stack/main.js.map +1 -0
- package/dist/components/stack/props.d.ts +42 -0
- package/dist/components/stack/props.d.ts.map +1 -0
- package/dist/components/stack/props.js +2 -0
- package/dist/components/stack/props.js.map +1 -0
- package/dist/components/stack/style.css +68 -0
- package/dist/components/stepper/main.d.ts +3 -1
- package/dist/components/stepper/main.d.ts.map +1 -1
- package/dist/components/stepper/main.js +4 -0
- package/dist/components/stepper/main.js.map +1 -1
- package/dist/components/stepper/style.css +2 -2
- package/dist/components/switch/main.d.ts.map +1 -1
- package/dist/components/switch/main.js +5 -1
- package/dist/components/switch/main.js.map +1 -1
- package/dist/components/switch/props.d.ts +4 -1
- package/dist/components/switch/props.d.ts.map +1 -1
- package/dist/components/tab-bar/style.css +36 -13
- package/dist/components/text-field/style.css +28 -17
- package/dist/components/toolbar/main.d.ts +5 -2
- package/dist/components/toolbar/main.d.ts.map +1 -1
- package/dist/components/toolbar/main.js +18 -0
- package/dist/components/toolbar/main.js.map +1 -1
- package/dist/components/toolbar/props.d.ts +15 -0
- package/dist/components/toolbar/props.d.ts.map +1 -1
- package/dist/components/toolbar/style.css +126 -10
- package/dist/components/tooltip/style.css +2 -2
- package/dist/components/typography/main.d.ts +1 -0
- package/dist/components/typography/main.d.ts.map +1 -1
- package/dist/components/typography/main.js +1 -0
- package/dist/components/typography/main.js.map +1 -1
- package/dist/components/typography/sizes.css +456 -0
- package/dist/components/typography/style.css +24 -456
- package/dist/components/utils/main.d.ts +23 -6
- package/dist/components/utils/main.d.ts.map +1 -1
- package/dist/components/utils/main.js +60 -7
- package/dist/components/utils/main.js.map +1 -1
- package/dist/components/viewport/edge-effect.d.ts.map +1 -1
- package/dist/components/viewport/edge-effect.js +6 -2
- package/dist/components/viewport/edge-effect.js.map +1 -1
- package/dist/components/viewport/focus-scroll.d.ts.map +1 -1
- package/dist/components/viewport/focus-scroll.js +2 -1
- package/dist/components/viewport/focus-scroll.js.map +1 -1
- package/dist/components/viewport/main.d.ts.map +1 -1
- package/dist/components/viewport/main.js +34 -2
- package/dist/components/viewport/main.js.map +1 -1
- package/dist/components/viewport/style.css +7 -13
- package/dist/styles.css +287 -120
- package/package.json +1 -1
|
@@ -1,10 +1,35 @@
|
|
|
1
|
+
import type { Radio as BaseRadio } from '@base-ui/react/radio';
|
|
2
|
+
import type { RadioGroup as BaseRadioGroup } from '@base-ui/react/radio-group';
|
|
3
|
+
import type { Slider as BaseSlider } from '@base-ui/react/slider';
|
|
1
4
|
import type { useRender } from '@base-ui/react/use-render';
|
|
2
5
|
import type { ComponentProps, ReactNode, RefObject } from 'react';
|
|
3
6
|
import type { GlassSurfaceProps } from '../glass/main.js';
|
|
4
7
|
import type { GridCornerButtonProps, GridSize } from '../grid/main.js';
|
|
8
|
+
import type { ListItemProps, ListRootProps } from '../list/props.js';
|
|
9
|
+
import type { SliderRootProps } from '../slider/props.js';
|
|
5
10
|
import type { SwitchRootProps } from '../switch/props.js';
|
|
11
|
+
import type { SymbolIcon } from '../symbol/main.js';
|
|
12
|
+
/** How a part's number is shown (`Intl.NumberFormat`'s, as Base UI's). */
|
|
13
|
+
export type CardFormat = {
|
|
14
|
+
/** Its number's format (e.g. `{ style: 'percent' }`). */
|
|
15
|
+
format?: Intl.NumberFormatOptions;
|
|
16
|
+
/**
|
|
17
|
+
* Its number's locale.
|
|
18
|
+
* @default the document's language
|
|
19
|
+
*/
|
|
20
|
+
locale?: Intl.LocalesArgument;
|
|
21
|
+
};
|
|
6
22
|
/** A card's corner button: a `Grid.CornerButton` (see `Card.CornerButton`). */
|
|
7
|
-
export type CardCornerButtonProps = GridCornerButtonProps
|
|
23
|
+
export type CardCornerButtonProps = Omit<GridCornerButtonProps, 'whileEditing'> & {
|
|
24
|
+
/**
|
|
25
|
+
* In edit mode: hidden then (`hide`), shown only then (`show`, e.g. a
|
|
26
|
+
* button opening the card's settings), or either way (`stay`). Shown
|
|
27
|
+
* while editing, it's over the card's veil, in the grid's controls'
|
|
28
|
+
* color (see `Grid.CornerButton`).
|
|
29
|
+
* @default 'hide'
|
|
30
|
+
*/
|
|
31
|
+
whileEditing?: GridCornerButtonProps['whileEditing'];
|
|
32
|
+
};
|
|
8
33
|
/** A card's actions (see `CardRootProps.actionsRef`). */
|
|
9
34
|
export type CardActions = {
|
|
10
35
|
/**
|
|
@@ -34,7 +59,7 @@ export type CardRootProps = useRender.ComponentProps<'div'> & GlassSurfaceProps
|
|
|
34
59
|
*/
|
|
35
60
|
momentary?: boolean;
|
|
36
61
|
};
|
|
37
|
-
export type CardSymbolProps = ComponentProps<'span'> & {
|
|
62
|
+
export type CardSymbolProps = useRender.ComponentProps<'span'> & {
|
|
38
63
|
/**
|
|
39
64
|
* Whether it shows what it stands for as on, in its tint and its
|
|
40
65
|
* `Symbol`'s `emphasizedIcon` (e.g. filled): for a card that isn't lit
|
|
@@ -55,29 +80,314 @@ export type CardSwitchProps = Omit<SwitchRootProps, 'children' | 'ref' | 'tint'>
|
|
|
55
80
|
* Its color while on (a CSS color): the card's tint, as its symbol's.
|
|
56
81
|
* Over a slider's fill, and in a card never lit (`active` given false,
|
|
57
82
|
* e.g. a dimmer's) at every size, a darker shade of it (it's the fill's
|
|
58
|
-
* color too, see `
|
|
83
|
+
* color too, see `Card.Slider`); off there, a darker shade of the fill's
|
|
59
84
|
* gray.
|
|
60
85
|
* @default the system green; over a slider's fill, the app's tint
|
|
61
86
|
*/
|
|
62
87
|
tint?: string;
|
|
63
88
|
};
|
|
64
|
-
export type CardTitleProps = ComponentProps<'span'>;
|
|
65
|
-
export type CardValueProps = Omit<ComponentProps<'span'>, 'children'> & {
|
|
66
|
-
/** What it shows instead of a number (e.g. a state: “Locked”). */
|
|
67
|
-
children?: ReactNode;
|
|
89
|
+
export type CardTitleProps = useRender.ComponentProps<'span'>;
|
|
90
|
+
export type CardValueProps = Omit<useRender.ComponentProps<'span'>, 'children'> & CardFormat & {
|
|
68
91
|
/**
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* app's to choose (its unit, its decimal places).
|
|
92
|
+
* What it shows instead of a number (e.g. a state: “Locked”); with a
|
|
93
|
+
* number, after it (e.g. a `Card.Trend`).
|
|
72
94
|
*/
|
|
73
|
-
|
|
74
|
-
/** The locale its `value` is formatted for (default: the document's). */
|
|
75
|
-
locale?: Intl.LocalesArgument;
|
|
95
|
+
children?: ReactNode;
|
|
76
96
|
/** A number, formatted (see `format`); else its children. */
|
|
77
97
|
value?: number;
|
|
78
98
|
};
|
|
99
|
+
/**
|
|
100
|
+
* A card's subtitle (`Card.Subtitle`): more words under its title, where
|
|
101
|
+
* there's room for them.
|
|
102
|
+
*/
|
|
103
|
+
export type CardSubtitleProps = useRender.ComponentProps<'span'>;
|
|
104
|
+
/** A value's trend (`Card.Trend`): an arrow, in a `Card.Value`. */
|
|
105
|
+
export type CardTrendProps = Omit<useRender.ComponentProps<'span'>, 'children'> & {
|
|
106
|
+
/**
|
|
107
|
+
* How steeply its value changes: -90 (falling) to 90 (rising) degrees, 0
|
|
108
|
+
* steady. Its arrow points so; named rising, falling or steady.
|
|
109
|
+
*/
|
|
110
|
+
angle: number;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* A slider filling its card (`Card.Slider`): Base UI's slider (its
|
|
114
|
+
* `Slider.Root`'s props: `min`, `max`, `step`, `format`, `disabled`,
|
|
115
|
+
* `name`…), one value.
|
|
116
|
+
*/
|
|
117
|
+
export type CardSliderProps = Omit<SliderRootProps, 'children' | 'defaultValue' | 'onValueChange' | 'onValueCommitted' | 'orientation' | 'ref' | 'thumbAlignment' | 'value'> & {
|
|
118
|
+
/**
|
|
119
|
+
* Its value's words, from its formatted value (see `format`) and its
|
|
120
|
+
* value: e.g. its card's state with it, the app's.
|
|
121
|
+
* @default its formatted value
|
|
122
|
+
*/
|
|
123
|
+
children?: (formattedValue: string, value: number) => ReactNode;
|
|
124
|
+
/** Its value at first (uncontrolled). */
|
|
125
|
+
defaultValue?: number;
|
|
126
|
+
/**
|
|
127
|
+
* What assistive technology reads as its value (as Base UI's
|
|
128
|
+
* `getAriaValueText`), from its formatted value and its value.
|
|
129
|
+
* @default its formatted value
|
|
130
|
+
*/
|
|
131
|
+
getAriaValueText?: (formattedValue: string, value: number) => string;
|
|
132
|
+
/** Its label, and its accessible name (e.g. the card's title). */
|
|
133
|
+
label: string;
|
|
134
|
+
/**
|
|
135
|
+
* A press on it (released before it moves): this, not a value (e.g. its
|
|
136
|
+
* card's switch toggled); a drag sets its value. None: a press sets it.
|
|
137
|
+
*/
|
|
138
|
+
onPress?: () => void;
|
|
139
|
+
/** As its value changes, dragged (or by keyboard). */
|
|
140
|
+
onValueChange?: (value: number) => void;
|
|
141
|
+
/**
|
|
142
|
+
* Its fill's color: opaque, any color (what's over it drawn again in it,
|
|
143
|
+
* dark on a bright fill, light on a dim one).
|
|
144
|
+
* @default the app's tint
|
|
145
|
+
*/
|
|
146
|
+
tint?: string;
|
|
147
|
+
/** Its value (controlled). */
|
|
148
|
+
value?: number;
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* A card's progress (`Card.Progress`): its value and range, as Base UI's
|
|
152
|
+
* `Progress.Root`, for its parts (`Card.ProgressValue`,
|
|
153
|
+
* `Card.ProgressBar`). Renders no element of its own.
|
|
154
|
+
*/
|
|
155
|
+
export type CardProgressProps = CardFormat & {
|
|
156
|
+
/** Its parts (and anything else of the card's). */
|
|
157
|
+
children?: ReactNode;
|
|
158
|
+
/**
|
|
159
|
+
* What assistive technology reads as its value (as Base UI's), from its
|
|
160
|
+
* formatted value and its value.
|
|
161
|
+
* @default its formatted value
|
|
162
|
+
*/
|
|
163
|
+
getAriaValueText?: (formattedValue: string, value: number | null) => string;
|
|
164
|
+
/**
|
|
165
|
+
* Its greatest value.
|
|
166
|
+
* @default 100
|
|
167
|
+
*/
|
|
168
|
+
max?: number;
|
|
169
|
+
/**
|
|
170
|
+
* Its least value.
|
|
171
|
+
* @default 0
|
|
172
|
+
*/
|
|
173
|
+
min?: number;
|
|
174
|
+
/** Its value (`min` to `max`); `null`, none under way (its bar empty). */
|
|
175
|
+
value: number | null;
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* A card's progress bar (`Card.ProgressBar`): a pill at the card's bottom,
|
|
179
|
+
* Base UI's progress bar.
|
|
180
|
+
*/
|
|
181
|
+
export type CardProgressBarProps = useRender.ComponentProps<'div'> & {
|
|
182
|
+
/**
|
|
183
|
+
* What's on it (a `Card.ProgressLabel`, a `Card.ProgressDetail`), drawn
|
|
184
|
+
* on the well and again on the fill.
|
|
185
|
+
*/
|
|
186
|
+
children?: ReactNode;
|
|
187
|
+
/**
|
|
188
|
+
* Its fill's color.
|
|
189
|
+
* @default the app's tint
|
|
190
|
+
*/
|
|
191
|
+
tint?: string;
|
|
192
|
+
};
|
|
193
|
+
/** A progress bar's words at its start (`Card.ProgressLabel`). */
|
|
194
|
+
export type CardProgressLabelProps = useRender.ComponentProps<'span'>;
|
|
195
|
+
/** A progress bar's words at its end (`Card.ProgressDetail`). */
|
|
196
|
+
export type CardProgressDetailProps = useRender.ComponentProps<'span'>;
|
|
197
|
+
/** A card's progress in words (`Card.ProgressValue`). */
|
|
198
|
+
export type CardProgressValueProps = Omit<useRender.ComponentProps<'span'>, 'children'> & {
|
|
199
|
+
/**
|
|
200
|
+
* Its words, from its formatted value and its value (as Base UI's
|
|
201
|
+
* `Progress.Value`); none, its formatted value.
|
|
202
|
+
*/
|
|
203
|
+
children?: (formattedValue: string, value: number) => ReactNode;
|
|
204
|
+
};
|
|
205
|
+
/** A card's stages (`Card.StageList`): an ordered list. */
|
|
206
|
+
export type CardStageListProps = Omit<ComponentProps<'ol'>, 'children'> & {
|
|
207
|
+
/** Its stages (`Card.Stage`s), in order. */
|
|
208
|
+
children: ReactNode;
|
|
209
|
+
/**
|
|
210
|
+
* The color of its current stage, and of those done.
|
|
211
|
+
* @default the app's tint
|
|
212
|
+
*/
|
|
213
|
+
tint?: string;
|
|
214
|
+
/**
|
|
215
|
+
* Its current stage's value: those before it done, those after to come;
|
|
216
|
+
* none, all to come.
|
|
217
|
+
*/
|
|
218
|
+
value?: string;
|
|
219
|
+
};
|
|
220
|
+
/** A stage (`Card.Stage`), in a `Card.StageList`. */
|
|
221
|
+
export type CardStageProps = Omit<ComponentProps<'li'>, 'children' | 'value'> & {
|
|
222
|
+
/** Its words, under its dot. */
|
|
223
|
+
children: ReactNode;
|
|
224
|
+
/** What it is (its list's `value` names the current one). */
|
|
225
|
+
value: string;
|
|
226
|
+
};
|
|
227
|
+
/** The light a card's channels make together (see `Card.Channels`). */
|
|
228
|
+
export type CardLight = {
|
|
229
|
+
/**
|
|
230
|
+
* Its brightness (0 to 1): its strongest amount channel's share; none of
|
|
231
|
+
* those, 1.
|
|
232
|
+
*/
|
|
233
|
+
brightness: number;
|
|
234
|
+
/** Its color at full strength (a CSS color); giving none, none. */
|
|
235
|
+
color: string | undefined;
|
|
236
|
+
};
|
|
237
|
+
/** A card's channels (`Card.Channels`): its sliders, stacked. */
|
|
238
|
+
export type CardChannelsProps = ComponentProps<'div'> & {
|
|
239
|
+
/** Its channels (`Card.Channel`s), in order. */
|
|
240
|
+
children: ReactNode;
|
|
241
|
+
/** As the light its channels make changes (see `CardLight`). */
|
|
242
|
+
onLightChange?: (light: CardLight) => void;
|
|
243
|
+
};
|
|
244
|
+
/**
|
|
245
|
+
* A channel (`Card.Channel`): Base UI's slider in a well of its own (its
|
|
246
|
+
* `Slider.Root`'s props), one value. An amount (`tint`: e.g. a light's red,
|
|
247
|
+
* black to red), or a scale (`colors`: e.g. a color temperature).
|
|
248
|
+
*/
|
|
249
|
+
export type CardChannelProps = Omit<BaseSlider.Root.Props, 'children' | 'defaultValue' | 'onValueChange' | 'onValueCommitted' | 'orientation' | 'ref' | 'thumbAlignment' | 'value'> & {
|
|
250
|
+
/**
|
|
251
|
+
* Its value's words, from its formatted value and its value (e.g.
|
|
252
|
+
* `3800 K`); none, its formatted value.
|
|
253
|
+
*/
|
|
254
|
+
children?: (formattedValue: string, value: number) => ReactNode;
|
|
255
|
+
/**
|
|
256
|
+
* Its colors from its least value to its greatest (evenly spread; two or
|
|
257
|
+
* more): a scale, shown whole on its well, its thumb the color at its
|
|
258
|
+
* value (e.g. a color temperature's, warm to cold). Instead of `tint`.
|
|
259
|
+
*/
|
|
260
|
+
colors?: readonly string[];
|
|
261
|
+
/** Its value at first (uncontrolled). */
|
|
262
|
+
defaultValue?: number;
|
|
263
|
+
/**
|
|
264
|
+
* What assistive technology reads as its value (as Base UI's), from its
|
|
265
|
+
* formatted value and its value.
|
|
266
|
+
* @default its formatted value
|
|
267
|
+
*/
|
|
268
|
+
getAriaValueText?: (formattedValue: string, value: number) => string;
|
|
269
|
+
/** Its name (e.g. `Red`): on its well, and its slider's name. */
|
|
270
|
+
label: string;
|
|
271
|
+
/** As its value changes. */
|
|
272
|
+
onValueChange?: (value: number) => void;
|
|
273
|
+
/**
|
|
274
|
+
* An amount's color at its greatest value (e.g. a light's red): its fill,
|
|
275
|
+
* its thumb that color mixed on black by its share (as light adds up).
|
|
276
|
+
* @default the app's tint
|
|
277
|
+
*/
|
|
278
|
+
tint?: string;
|
|
279
|
+
/** Its value (controlled). */
|
|
280
|
+
value?: number;
|
|
281
|
+
};
|
|
282
|
+
/** A choice's option (`Card.SegmentedItem`). */
|
|
283
|
+
export type CardSegmentedItemProps = Omit<BaseRadio.Root.Props, 'children' | 'ref' | 'value'> & {
|
|
284
|
+
/**
|
|
285
|
+
* Its words: its segment's (its name with its symbol only, see
|
|
286
|
+
* `optionContent`), and a ready-made card's value while it's chosen.
|
|
287
|
+
*/
|
|
288
|
+
children: ReactNode;
|
|
289
|
+
/**
|
|
290
|
+
* Whether it can't be chosen now (as Segmented's items): dimmed, not
|
|
291
|
+
* pressed, dragged past, skipped by keys (see Base UI's Radio).
|
|
292
|
+
*/
|
|
293
|
+
disabled?: boolean;
|
|
294
|
+
/** Its symbol: in its segment (a ready-made card's while it's chosen). */
|
|
295
|
+
icon?: SymbolIcon;
|
|
296
|
+
/**
|
|
297
|
+
* More words, under its words (in the card's value's color), where
|
|
298
|
+
* there's room for them: in a tile taller than a row (not across one,
|
|
299
|
+
* not with its symbol only, see `optionContent`); stacked, once its
|
|
300
|
+
* segment's tall enough.
|
|
301
|
+
*/
|
|
302
|
+
subtitle?: ReactNode;
|
|
303
|
+
/** A ready-made card's symbol's tint while it's chosen. */
|
|
304
|
+
tint?: string;
|
|
305
|
+
/** What it stands for (unique in its choice). */
|
|
306
|
+
value: string;
|
|
307
|
+
};
|
|
308
|
+
/** A choice of a few (`Card.Segmented`): Base UI's radio group. */
|
|
309
|
+
export type CardSegmentedProps = Omit<BaseRadioGroup.Props, 'children' | 'defaultValue' | 'onValueChange' | 'ref' | 'value'> & {
|
|
310
|
+
/**
|
|
311
|
+
* Its options (`Card.SegmentedItem`s), in order: segments in a well at
|
|
312
|
+
* its card's bottom, side by side (across a row, a symbol beside its
|
|
313
|
+
* words; taller, over them), or stacked (beside them; one wide, over
|
|
314
|
+
* them), the chosen one's raised; dragged between (each chosen as it's
|
|
315
|
+
* reached).
|
|
316
|
+
*/
|
|
317
|
+
children: ReactNode;
|
|
318
|
+
/** The option chosen at first (uncontrolled). @default its first's */
|
|
319
|
+
defaultValue?: string;
|
|
320
|
+
/** Chosen, as it's pressed (or by keys, see Base UI's RadioGroup). */
|
|
321
|
+
onValueChange?: (value: string) => void;
|
|
322
|
+
/**
|
|
323
|
+
* What its options' segments show: their symbols and words (`both`; an
|
|
324
|
+
* option without a symbol, its words), their symbols only (`icon`, its
|
|
325
|
+
* words its name, unseen), or their words only (`label`).
|
|
326
|
+
* @default 'both'
|
|
327
|
+
*/
|
|
328
|
+
optionContent?: 'both' | 'icon' | 'label';
|
|
329
|
+
/**
|
|
330
|
+
* Its options side by side (`horizontal`) or stacked (`vertical`), in a
|
|
331
|
+
* tile taller than a row; in one row, side by side only (vertical: none,
|
|
332
|
+
* as 1x1). None: by its tile's size (one wide and taller, stacked; else
|
|
333
|
+
* side by side).
|
|
334
|
+
*/
|
|
335
|
+
orientation?: 'horizontal' | 'vertical';
|
|
336
|
+
/** The option chosen (controlled). */
|
|
337
|
+
value?: string;
|
|
338
|
+
};
|
|
339
|
+
/**
|
|
340
|
+
* A card's rows (`Card.Rows`): a list, as many rows as fit whole (its
|
|
341
|
+
* `List.Root`'s props).
|
|
342
|
+
*/
|
|
343
|
+
export type CardRowsProps = Omit<ListRootProps, 'children'> & {
|
|
344
|
+
/** Its rows (`Card.Row`s), in order. */
|
|
345
|
+
children: ReactNode;
|
|
346
|
+
/**
|
|
347
|
+
* Its last row while rows are left out (their count given).
|
|
348
|
+
* @default `${count} more`
|
|
349
|
+
*/
|
|
350
|
+
getMoreLabel?: (count: number) => string;
|
|
351
|
+
/**
|
|
352
|
+
* Its last row while its tile's expanded (see `Grid.Item`'s `expanded`).
|
|
353
|
+
* @default 'Less'
|
|
354
|
+
*/
|
|
355
|
+
lessLabel?: string;
|
|
356
|
+
};
|
|
357
|
+
/**
|
|
358
|
+
* A card's row (`Card.Row`): its symbol, its label, its value (its
|
|
359
|
+
* `List.Item`'s props).
|
|
360
|
+
*/
|
|
361
|
+
export type CardRowProps = Omit<ListItemProps, 'children' | 'onClick' | 'value'> & {
|
|
362
|
+
/** Its label (unique in its card). */
|
|
363
|
+
children: ReactNode;
|
|
364
|
+
/** Its symbol, before its label. */
|
|
365
|
+
icon?: SymbolIcon;
|
|
366
|
+
/**
|
|
367
|
+
* Pressed (anywhere on it), e.g. going to a page of its own: a chevron
|
|
368
|
+
* after its value (List's `DrillIn`), its label a button.
|
|
369
|
+
*/
|
|
370
|
+
onClick?: () => void;
|
|
371
|
+
/** Its value, at its end. */
|
|
372
|
+
value?: ReactNode;
|
|
373
|
+
};
|
|
374
|
+
/**
|
|
375
|
+
* A corner button expanding its card's tile and making it small again
|
|
376
|
+
* (`Card.ExpandButton`), by its grid item's expansion.
|
|
377
|
+
*/
|
|
378
|
+
export type CardExpandButtonProps = Omit<CardCornerButtonProps, 'corner' | 'icon' | 'mirrored' | 'visible'>;
|
|
379
|
+
/**
|
|
380
|
+
* A corner button opening its card's tile above the page
|
|
381
|
+
* (`Card.OpenButton`), by its grid item's `open`.
|
|
382
|
+
*/
|
|
383
|
+
export type CardOpenButtonProps = Omit<CardCornerButtonProps, 'corner' | 'icon' | 'visible'>;
|
|
384
|
+
/**
|
|
385
|
+
* A corner button closing its card's tile opened above the page
|
|
386
|
+
* (`Card.CloseButton`): its top trailing corner.
|
|
387
|
+
*/
|
|
388
|
+
export type CardCloseButtonProps = Omit<CardCornerButtonProps, 'corner' | 'icon' | 'visible'>;
|
|
79
389
|
/** A card's orientation (see `useCardOrientation`). */
|
|
80
390
|
export type CardOrientation = 'horizontal' | 'vertical';
|
|
81
391
|
/** The sizes each kind of card supports (see `cardSizes`). */
|
|
82
|
-
export type CardSizes = Readonly<Record<'binaryControl' | 'binaryDisplay' | 'choiceControl' | 'numericalControl' | 'numericalDisplay' | 'summaryDisplay', readonly GridSize[]>>;
|
|
392
|
+
export type CardSizes = Readonly<Record<'binaryControl' | 'binaryDisplay' | 'choiceControl' | 'numericalControl' | 'numericalDisplay' | 'progressDisplay' | 'stagesDisplay' | 'summaryDisplay', readonly GridSize[]>>;
|
|
83
393
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/card/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/card/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAA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AQ,CAC9B,MAAM,CACF,eAAe,GACf,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,kBAAkB,GAClB,iBAAiB,GACjB,eAAe,GACf,gBAAgB,EAClB,SAAS,QAAQ,EAAE,CACpB,CACF,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { type Ref } from 'react';
|
|
2
|
+
import type { CardCornerButtonProps, CardOrientation, CardRootProps, CardSizes, CardSubtitleProps, CardSwitchProps, CardSymbolProps, CardTitleProps, CardTrendProps, CardValueProps } from './props.js';
|
|
3
|
+
/** A card's copy layer and its setter (see `CardBlendScope`). */
|
|
4
|
+
type CardBlend = {
|
|
5
|
+
layer: HTMLElement | null;
|
|
6
|
+
setLayer: (layer: HTMLElement | null) => void;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* A layer over the card's content where its parts draw a copy of
|
|
10
|
+
* themselves (`Card.Symbol`, `Card.CornerButton`): e.g. inside a slider's
|
|
11
|
+
* fill filling the card, in the fill's color scheme, clipped by its edge
|
|
12
|
+
* (see `Card.Slider`), registered by it (`setLayer`); the
|
|
13
|
+
* root marked `data-card-blend` while there is one (its originals under
|
|
14
|
+
* the fill, see style.css). None: no copies. Internal.
|
|
15
|
+
*/
|
|
16
|
+
export declare const CardBlendScope: import("preact").Context<CardBlend | undefined>;
|
|
17
|
+
/** The tile's shape (its item's effective size): wide, horizontal. */
|
|
18
|
+
export declare const useCardOrientation: () => CardOrientation;
|
|
19
|
+
/**
|
|
20
|
+
* The sizes the library's kinds of cards support, for their items'
|
|
21
|
+
* `supportedSizes`: a binary display or control (a state, a switch), a
|
|
22
|
+
* numerical display (a value) or control (a slider: never square, so it
|
|
23
|
+
* has a direction), a choice of a few (segments: across a row, taller,
|
|
24
|
+
* upright, or 1x1 opening to choose), a summary (rows: never 1x1), a
|
|
25
|
+
* progress (a pill), a run of stages (along a line: never 1x1, too narrow
|
|
26
|
+
* for them).
|
|
27
|
+
*/
|
|
28
|
+
export declare const cardSizes: CardSizes;
|
|
29
|
+
/**
|
|
30
|
+
* The card: its glass, its parts on it; bright while `active` (or a switch
|
|
31
|
+
* in it is on); pressable as a whole with an `onClick` (its feedback, see
|
|
32
|
+
* style.css); in a grid's tile (its item's), inert and veiled while
|
|
33
|
+
* editing (see the top).
|
|
34
|
+
*/
|
|
35
|
+
declare const Root: import("preact").FunctionalComponent<import("react").PropsWithoutRef<CardRootProps> & {
|
|
36
|
+
ref?: Ref<HTMLDivElement> | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
/**
|
|
39
|
+
* Its symbol (e.g. a `Symbol`), at its top leading corner: on (its card lit,
|
|
40
|
+
* or its own `active`), in its tint, its `Symbol`'s emphasized icon (e.g.
|
|
41
|
+
* filled) shown; else its icon (e.g. outlined). Over a slider's fill (see
|
|
42
|
+
* `CardBlendScope`): in its text's color, drawn again in the
|
|
43
|
+
* fill, its emphasis on both.
|
|
44
|
+
*/
|
|
45
|
+
declare const CardSymbol: import("preact").FunctionalComponent<import("react").PropsWithoutRef<CardSymbolProps> & {
|
|
46
|
+
ref?: Ref<HTMLSpanElement> | undefined;
|
|
47
|
+
}>;
|
|
48
|
+
/**
|
|
49
|
+
* Its switch (a `Switch.Root` with its thumb): its top trailing corner, the
|
|
50
|
+
* card's state (on, lit), on in the card's tint (`tint`; see style.css: on
|
|
51
|
+
* a slider's fill, or in a card never lit, a darker shade of it). A part of
|
|
52
|
+
* the card's (moved with its other parts as its tile changes, see
|
|
53
|
+
* `useGridItemLayout`).
|
|
54
|
+
*/
|
|
55
|
+
declare const CardSwitch: import("preact").FunctionalComponent<import("react").PropsWithoutRef<CardSwitchProps> & {
|
|
56
|
+
ref?: Ref<HTMLSpanElement> | undefined;
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* What it is (e.g. a device's name), above its value; what its parts are
|
|
60
|
+
* named by (its id, its own or one of its card's, told the card).
|
|
61
|
+
*/
|
|
62
|
+
declare const Title: import("preact").FunctionalComponent<import("react").PropsWithoutRef<CardTitleProps> & {
|
|
63
|
+
ref?: Ref<HTMLSpanElement> | undefined;
|
|
64
|
+
}>;
|
|
65
|
+
/**
|
|
66
|
+
* Its value: a number formatted as the app says (`format`, `locale`:
|
|
67
|
+
* `Intl.NumberFormat`'s), what's given after it (e.g. a `Trend`); or,
|
|
68
|
+
* without a number, what's given instead (e.g. a state).
|
|
69
|
+
*/
|
|
70
|
+
declare const Value: import("preact").FunctionalComponent<import("react").PropsWithoutRef<CardValueProps> & {
|
|
71
|
+
ref?: Ref<HTMLSpanElement> | undefined;
|
|
72
|
+
}>;
|
|
73
|
+
/**
|
|
74
|
+
* Its subtitle: more words under its title (e.g. a program's), small, in
|
|
75
|
+
* its secondary text color; where there's room for them (in a tile a row
|
|
76
|
+
* tall beside a bar, stages or channels, none: see the CSS).
|
|
77
|
+
*/
|
|
78
|
+
declare const Subtitle: import("preact").FunctionalComponent<import("react").PropsWithoutRef<CardSubtitleProps> & {
|
|
79
|
+
ref?: Ref<HTMLSpanElement> | undefined;
|
|
80
|
+
}>;
|
|
81
|
+
/**
|
|
82
|
+
* A value's trend (in its `Value`, after its number): an arrow pointing up
|
|
83
|
+
* as steeply as it rises (`angle`, -90 to 90 degrees: 0 steady), named for
|
|
84
|
+
* assistive technology. It turns to a new angle by its own transform.
|
|
85
|
+
*/
|
|
86
|
+
declare const Trend: import("preact").FunctionalComponent<import("react").PropsWithoutRef<CardTrendProps> & {
|
|
87
|
+
ref?: Ref<HTMLSpanElement> | undefined;
|
|
88
|
+
}>;
|
|
89
|
+
/**
|
|
90
|
+
* A button in its corner (see `Grid.CornerButton`): shown while its grid
|
|
91
|
+
* isn't editing (faded out, inert, while it is), or while it is too, or
|
|
92
|
+
* then only (`whileEditing`: over its veil then); and as `visible` says. A
|
|
93
|
+
* press on it is its own, not the card's (e.g. not toggling a switch in
|
|
94
|
+
* it, see `forwardClick`).
|
|
95
|
+
*/
|
|
96
|
+
declare const CornerButton: import("preact").FunctionalComponent<import("react").PropsWithoutRef<CardCornerButtonProps> & {
|
|
97
|
+
ref?: Ref<HTMLButtonElement> | undefined;
|
|
98
|
+
}>;
|
|
99
|
+
export { CardSwitch, CardSymbol, CornerButton, Root, Subtitle, Title, Trend, Value, };
|
|
100
|
+
//# sourceMappingURL=root.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../src/components/card/root.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,GAAG,EAWT,MAAM,OAAO,CAAC;AAgBf,OAAO,KAAK,EAEV,qBAAqB,EACrB,eAAe,EACf,aAAa,EACb,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACf,MAAM,YAAY,CAAC;AAMpB,iEAAiE;AACjE,KAAK,SAAS,GAAG;IACf,KAAK,EAAE,WAAW,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;CAC/C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,iDAAkD,CAAC;AAQ9E,sEAAsE;AACtE,eAAO,MAAM,kBAAkB,QAAO,eAOrC,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,EAAE,SAsBvB,CAAC;AA4HF;;;;;GAKG;AACH,QAAA,MAAM,IAAI;;EA2GT,CAAC;AAEF;;;;;;GAMG;AACH,QAAA,MAAM,UAAU;;EAqCf,CAAC;AAEF;;;;;;GAMG;AACH,QAAA,MAAM,UAAU;;EAYf,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,KAAK;;EAqBV,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,KAAK;;EA4BV,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,QAAQ;;EAYb,CAAC;AAcF;;;;GAIG;AACH,QAAA,MAAM,KAAK;;EAkBV,CAAC;AAEF;;;;;;G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