@tinybigui/react 0.14.0 → 0.16.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/README.md +18 -18
- package/dist/index.cjs +775 -204
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +9 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +130 -38
- package/dist/index.d.ts +130 -38
- package/dist/index.js +775 -204
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -49,5 +49,13 @@
|
|
|
49
49
|
stroke-dashoffset: -124px;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
@
|
|
52
|
+
@keyframes progress-wave-translate {
|
|
53
|
+
0% {
|
|
54
|
+
transform: translateX(0);
|
|
55
|
+
}
|
|
56
|
+
100% {
|
|
57
|
+
transform: translateX(var(--progress-wave-wavelength, -40px));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
@theme { --animate-progress-linear-indeterminate-1: progress-linear-indeterminate-1 var(--md-sys-motion-duration-long2) var(--md-sys-motion-easing-standard) infinite; --animate-progress-linear-indeterminate-2: progress-linear-indeterminate-2 var(--md-sys-motion-duration-long2) var(--md-sys-motion-easing-standard) infinite; --animate-progress-circular-rotate: progress-circular-rotate var(--md-sys-motion-duration-long4) linear infinite; --animate-progress-circular-dash: progress-circular-dash var(--md-sys-motion-duration-long4) var(--md-sys-motion-easing-standard) infinite; --animate-progress-wave-translate: progress-wave-translate var(--md-sys-motion-duration-extra-long4) linear infinite; }
|
|
53
61
|
/*# sourceMappingURL=index.css.map */
|
package/dist/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Progress/Progress.css"],"sourcesContent":["/*\n * Progress Indicator Animations\n * Material Design 3 motion tokens for indeterminate progress states.\n *\n * Keyframes are defined here (co-located with the component) per project\n * convention — they are NOT added to the global tokens.css.\n *\n * Motion tokens referenced (from packages/tokens/src/tokens.css):\n * --md-sys-motion-duration-
|
|
1
|
+
{"version":3,"sources":["../src/components/Progress/Progress.css"],"sourcesContent":["/*\n * Progress Indicator Animations\n * Material Design 3 motion tokens for indeterminate and wavy progress states.\n *\n * Keyframes are defined here (co-located with the component) per project\n * convention — they are NOT added to the global tokens.css.\n *\n * All timing values reference MD3 motion token CSS custom properties.\n * Hardcoded durations are forbidden — use the token vars below.\n *\n * Motion tokens referenced (from packages/tokens/src/tokens.css):\n * --md-sys-motion-duration-long2 : 500ms (linear indeterminate cycle)\n * --md-sys-motion-duration-long4 : 600ms (circular indeterminate rotation)\n * --md-sys-motion-duration-extra-long4 : 1000ms (wave horizontal translation)\n * --md-sys-motion-easing-standard : cubic-bezier(0.2, 0, 0, 1)\n */\n\n/* ---------------------------------------------------------------------------\n LINEAR INDETERMINATE\n Two-segment bar animation per MD3 spec.\n First segment: starts narrow at left, expands, then slides off right.\n Second segment: follows the first with a short delay.\n Duration: long2 = 500ms per cycle (repeating).\n --------------------------------------------------------------------------- */\n\n@keyframes progress-linear-indeterminate-1 {\n 0% {\n left: -35%;\n right: 100%;\n }\n 60% {\n left: 100%;\n right: -90%;\n }\n 100% {\n left: 100%;\n right: -90%;\n }\n}\n\n@keyframes progress-linear-indeterminate-2 {\n 0% {\n left: -200%;\n right: 100%;\n }\n 60% {\n left: 107%;\n right: -8%;\n }\n 100% {\n left: 107%;\n right: -8%;\n }\n}\n\n/* ---------------------------------------------------------------------------\n CIRCULAR INDETERMINATE\n Two-part animation per MD3 spec:\n 1. Container rotation: continuous 360° spin.\n 2. Dash animation: stroke-dasharray pulses between a short and long arc.\n Rotation duration: long4 = 600ms per cycle (repeating).\n --------------------------------------------------------------------------- */\n\n@keyframes progress-circular-rotate {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n@keyframes progress-circular-dash {\n 0% {\n stroke-dasharray: 1, 200;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -35px;\n }\n 100% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -124px;\n }\n}\n\n/* ---------------------------------------------------------------------------\n WAVY TRANSLATION\n Horizontal wave motion: the wavy path translates one full wavelength so\n the wave appears to flow continuously.\n Duration: extra-long4 = 1000ms per cycle (repeating).\n --------------------------------------------------------------------------- */\n\n@keyframes progress-wave-translate {\n 0% {\n transform: translateX(0);\n }\n 100% {\n /* Translate exactly one wavelength. The wavelength is baked into the SVG\n path so the visual loop is seamless. The actual translate distance is\n set via --progress-wave-wavelength CSS custom property on the element. */\n transform: translateX(var(--progress-wave-wavelength, -40px));\n }\n}\n\n/* ---------------------------------------------------------------------------\n TAILWIND @theme INTEGRATION\n Register animations so they can be used as Tailwind utilities.\n --------------------------------------------------------------------------- */\n\n@theme {\n --animate-progress-linear-indeterminate-1: progress-linear-indeterminate-1\n var(--md-sys-motion-duration-long2) var(--md-sys-motion-easing-standard) infinite;\n\n --animate-progress-linear-indeterminate-2: progress-linear-indeterminate-2\n var(--md-sys-motion-duration-long2) var(--md-sys-motion-easing-standard) infinite;\n\n --animate-progress-circular-rotate: progress-circular-rotate var(--md-sys-motion-duration-long4)\n linear infinite;\n\n --animate-progress-circular-dash: progress-circular-dash var(--md-sys-motion-duration-long4)\n var(--md-sys-motion-easing-standard) infinite;\n\n --animate-progress-wave-translate: progress-wave-translate\n var(--md-sys-motion-duration-extra-long4) linear infinite;\n}\n"],"mappings":";AAyBA,WAAW;AACT;AACE,UAAM;AACN,WAAO;AACT;AACA;AACE,UAAM;AACN,WAAO;AACT;AACA;AACE,UAAM;AACN,WAAO;AACT;AACF;AAEA,WAAW;AACT;AACE,UAAM;AACN,WAAO;AACT;AACA;AACE,UAAM;AACN,WAAO;AACT;AACA;AACE,UAAM;AACN,WAAO;AACT;AACF;AAUA,WAAW;AACT;AACE,eAAW,OAAO;AACpB;AACA;AACE,eAAW,OAAO;AACpB;AACF;AAEA,WAAW;AACT;AACE,sBAAkB,CAAC,EAAE;AACrB,uBAAmB;AACrB;AACA;AACE,sBAAkB,EAAE,EAAE;AACtB,uBAAmB;AACrB;AACA;AACE,sBAAkB,EAAE,EAAE;AACtB,uBAAmB;AACrB;AACF;AASA,WAAW;AACT;AACE,eAAW,WAAW;AACxB;AACA;AAIE,eAAW,WAAW,IAAI,0BAA0B,EAAE;AACxD;AACF;AAOA,OAAO,EACL,yCAAyC,EAAE,gCACzC,IAAI,gCAAgC,IAAI,iCAAiC,QAAQ,EAEnF,yCAAyC,EAAE,gCACzC,IAAI,gCAAgC,IAAI,iCAAiC,QAAQ,EAEnF,kCAAkC,EAAE,yBAAyB,IAAI,gCAC/D,OAAO,QAAQ,EAEjB,gCAAgC,EAAE,uBAAuB,IAAI,gCAC3D,IAAI,iCAAiC,QAAQ,EAE/C,iCAAiC,EAAE,wBACjC,IAAI,sCAAsC,OAAO,QAAQ;","names":[]}
|
package/dist/index.d.cts
CHANGED
|
@@ -4150,7 +4150,9 @@ declare const HeadlessDrawerItem: React__default.ForwardRefExoticComponent<Headl
|
|
|
4150
4150
|
* Built on React Aria for world-class accessibility.
|
|
4151
4151
|
* Supports four variants: Linear Determinate, Linear Indeterminate,
|
|
4152
4152
|
* Circular Determinate, and Circular Indeterminate.
|
|
4153
|
-
*
|
|
4153
|
+
* Implements MD3 Expressive styling: colorful primary-container track,
|
|
4154
|
+
* 4dp indicator-track gap, fully-rounded segments, thick track option,
|
|
4155
|
+
* and optional wavy shape.
|
|
4154
4156
|
*
|
|
4155
4157
|
* @example
|
|
4156
4158
|
* ```tsx
|
|
@@ -4169,6 +4171,9 @@ declare const HeadlessDrawerItem: React__default.ForwardRefExoticComponent<Headl
|
|
|
4169
4171
|
* // Circular with size
|
|
4170
4172
|
* <Progress type="circular" indeterminate size="small" aria-label="Loading" />
|
|
4171
4173
|
*
|
|
4174
|
+
* // Thick wavy linear (MD3 Expressive)
|
|
4175
|
+
* <Progress type="linear" indeterminate shape="wavy" thickness="thick" aria-label="Loading" />
|
|
4176
|
+
*
|
|
4172
4177
|
* // Custom range
|
|
4173
4178
|
* <Progress type="linear" minValue={0} maxValue={200} value={150} label="Progress" />
|
|
4174
4179
|
* ```
|
|
@@ -4191,6 +4196,22 @@ interface ProgressProps extends AriaProgressBarProps {
|
|
|
4191
4196
|
* @default "medium"
|
|
4192
4197
|
*/
|
|
4193
4198
|
size?: "small" | "medium" | "large";
|
|
4199
|
+
/**
|
|
4200
|
+
* Visual shape of the progress indicator.
|
|
4201
|
+
* - `"flat"` — standard rounded rectangular/circular track.
|
|
4202
|
+
* - `"wavy"` — MD3 Expressive sine-wave active indicator.
|
|
4203
|
+
* Increases linear container height to accommodate wave amplitude.
|
|
4204
|
+
* Reduced-motion users receive a flat fallback automatically.
|
|
4205
|
+
* @default "flat"
|
|
4206
|
+
*/
|
|
4207
|
+
shape?: "flat" | "wavy";
|
|
4208
|
+
/**
|
|
4209
|
+
* Track thickness.
|
|
4210
|
+
* - `"default"` — 4dp per MD3 baseline spec.
|
|
4211
|
+
* - `"thick"` — 8dp MD3 Expressive variant (fully rounded, `trackCornerRadius` = 4dp).
|
|
4212
|
+
* @default "default"
|
|
4213
|
+
*/
|
|
4214
|
+
thickness?: "default" | "thick";
|
|
4194
4215
|
/**
|
|
4195
4216
|
* Additional CSS classes (Tailwind).
|
|
4196
4217
|
*/
|
|
@@ -4206,7 +4227,7 @@ interface ProgressProps extends AriaProgressBarProps {
|
|
|
4206
4227
|
* type="linear"
|
|
4207
4228
|
* value={50}
|
|
4208
4229
|
* label="Upload"
|
|
4209
|
-
* renderProgress={({ percentage }) => (
|
|
4230
|
+
* renderProgress={({ percentage, shape, thickness }) => (
|
|
4210
4231
|
* <div style={{ width: `${percentage}%` }} />
|
|
4211
4232
|
* )}
|
|
4212
4233
|
* />
|
|
@@ -4228,6 +4249,16 @@ interface ProgressHeadlessProps extends AriaProgressBarProps {
|
|
|
4228
4249
|
* @default "medium"
|
|
4229
4250
|
*/
|
|
4230
4251
|
size?: "small" | "medium" | "large";
|
|
4252
|
+
/**
|
|
4253
|
+
* Visual shape of the progress indicator.
|
|
4254
|
+
* @default "flat"
|
|
4255
|
+
*/
|
|
4256
|
+
shape?: "flat" | "wavy";
|
|
4257
|
+
/**
|
|
4258
|
+
* Track thickness.
|
|
4259
|
+
* @default "default"
|
|
4260
|
+
*/
|
|
4261
|
+
thickness?: "default" | "thick";
|
|
4231
4262
|
/**
|
|
4232
4263
|
* Additional CSS classes.
|
|
4233
4264
|
*/
|
|
@@ -4245,6 +4276,8 @@ interface ProgressHeadlessProps extends AriaProgressBarProps {
|
|
|
4245
4276
|
isIndeterminate: boolean;
|
|
4246
4277
|
type: "linear" | "circular";
|
|
4247
4278
|
size: "small" | "medium" | "large";
|
|
4279
|
+
shape: "flat" | "wavy";
|
|
4280
|
+
thickness: "default" | "thick";
|
|
4248
4281
|
}) => React__default.ReactNode;
|
|
4249
4282
|
}
|
|
4250
4283
|
|
|
@@ -4252,23 +4285,20 @@ interface ProgressHeadlessProps extends AriaProgressBarProps {
|
|
|
4252
4285
|
* Material Design 3 Progress Indicator (Layer 3: Styled)
|
|
4253
4286
|
*
|
|
4254
4287
|
* Built on React Aria for world-class accessibility.
|
|
4255
|
-
*
|
|
4288
|
+
* Implements MD3 Expressive spec:
|
|
4289
|
+
* - Colorful track: primary-container (inactive), primary (active)
|
|
4290
|
+
* - 4dp indicator-track gap (linear + circular)
|
|
4291
|
+
* - Fully-rounded segments
|
|
4292
|
+
* - Optional thick (8dp) track
|
|
4293
|
+
* - Optional wavy shape with amplitude ramp
|
|
4294
|
+
* - useReducedMotion guard: wavy falls back to flat when reduced-motion is set
|
|
4295
|
+
*
|
|
4296
|
+
* Four variants driven by `type` × `indeterminate`:
|
|
4256
4297
|
* - Linear Determinate
|
|
4257
4298
|
* - Linear Indeterminate
|
|
4258
4299
|
* - Circular Determinate
|
|
4259
4300
|
* - Circular Indeterminate
|
|
4260
4301
|
*
|
|
4261
|
-
* MD3 Specifications:
|
|
4262
|
-
* - Linear track height: 4dp (h-1)
|
|
4263
|
-
* - Linear track shape: rounded-full
|
|
4264
|
-
* - Circular default size: 48dp (medium)
|
|
4265
|
-
* - Circular stroke width: 4dp (SVG attribute)
|
|
4266
|
-
* - Active track: primary
|
|
4267
|
-
* - Inactive track: surface-container-highest
|
|
4268
|
-
* - Determinate transitions: duration-medium4 + ease-standard
|
|
4269
|
-
* - Indeterminate linear cycle: duration-long2
|
|
4270
|
-
* - Indeterminate circular rotation: duration-long4
|
|
4271
|
-
*
|
|
4272
4302
|
* @example
|
|
4273
4303
|
* ```tsx
|
|
4274
4304
|
* // Linear determinate
|
|
@@ -4283,8 +4313,8 @@ interface ProgressHeadlessProps extends AriaProgressBarProps {
|
|
|
4283
4313
|
* // Circular indeterminate
|
|
4284
4314
|
* <Progress type="circular" indeterminate aria-label="Loading" />
|
|
4285
4315
|
*
|
|
4286
|
-
* //
|
|
4287
|
-
* <Progress type="
|
|
4316
|
+
* // Thick wavy (MD3 Expressive)
|
|
4317
|
+
* <Progress type="linear" indeterminate shape="wavy" thickness="thick" aria-label="Loading" />
|
|
4288
4318
|
* ```
|
|
4289
4319
|
*/
|
|
4290
4320
|
declare const Progress: React__default.ForwardRefExoticComponent<ProgressProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
@@ -4300,7 +4330,7 @@ declare const Progress: React__default.ForwardRefExoticComponent<ProgressProps &
|
|
|
4300
4330
|
* - Determinate and indeterminate progress support
|
|
4301
4331
|
* - Internationalized value label formatting via React Aria
|
|
4302
4332
|
* - Label linkage via aria-labelledby / aria-label
|
|
4303
|
-
* - Render prop for custom visual rendering
|
|
4333
|
+
* - Render prop for custom visual rendering (receives shape + thickness)
|
|
4304
4334
|
*
|
|
4305
4335
|
* @example
|
|
4306
4336
|
* ```tsx
|
|
@@ -4308,7 +4338,7 @@ declare const Progress: React__default.ForwardRefExoticComponent<ProgressProps &
|
|
|
4308
4338
|
* <ProgressHeadless
|
|
4309
4339
|
* value={50}
|
|
4310
4340
|
* label="Upload"
|
|
4311
|
-
* renderProgress={({ percentage }) => (
|
|
4341
|
+
* renderProgress={({ percentage, shape, thickness }) => (
|
|
4312
4342
|
* <div style={{ width: `${percentage}%` }} />
|
|
4313
4343
|
* )}
|
|
4314
4344
|
* />
|
|
@@ -7093,9 +7123,9 @@ type RichTooltipVariants = VariantProps<typeof richTooltipVariants>;
|
|
|
7093
7123
|
/**
|
|
7094
7124
|
* Visual density based on content lines (MD3 List)
|
|
7095
7125
|
*
|
|
7096
|
-
* - `one-line`: headline only (
|
|
7097
|
-
* - `two-line`: headline + supporting text (
|
|
7098
|
-
* - `three-line`: overline + headline + supporting text (88dp)
|
|
7126
|
+
* - `one-line`: headline only (56dp min-height)
|
|
7127
|
+
* - `two-line`: headline + supporting text (72dp min-height)
|
|
7128
|
+
* - `three-line`: overline + headline + supporting text (88dp min-height)
|
|
7099
7129
|
*/
|
|
7100
7130
|
type ListDensity = "one-line" | "two-line" | "three-line";
|
|
7101
7131
|
/**
|
|
@@ -7201,8 +7231,6 @@ interface ListItemProps {
|
|
|
7201
7231
|
insetDivider?: boolean;
|
|
7202
7232
|
/** Additional CSS classes */
|
|
7203
7233
|
className?: string;
|
|
7204
|
-
/** Item-specific action callback */
|
|
7205
|
-
onAction?: (value: string | number) => void;
|
|
7206
7234
|
}
|
|
7207
7235
|
/**
|
|
7208
7236
|
* Props for the ListItem leading slot
|
|
@@ -7276,24 +7304,44 @@ declare const List: React__default.ForwardRefExoticComponent<ListProps & React__
|
|
|
7276
7304
|
/**
|
|
7277
7305
|
* Material Design 3 List Item (Layer 3: Styled)
|
|
7278
7306
|
*
|
|
7279
|
-
*
|
|
7280
|
-
*
|
|
7307
|
+
* Architecture: Variants-vs-States
|
|
7308
|
+
* - Design-time variant: `density` (auto-derived from content).
|
|
7309
|
+
* - All interaction/selection states are expressed as data-* attributes on the root <li>
|
|
7310
|
+
* via `getInteractionDataAttributes`, consumed by each slot via group-data-[x]/list-item.
|
|
7311
|
+
* - Content flags (`data-with-leading`, `data-with-trailing`) describe structure, set explicitly.
|
|
7281
7312
|
*
|
|
7282
|
-
*
|
|
7283
|
-
*
|
|
7284
|
-
*
|
|
7285
|
-
*
|
|
7313
|
+
* Two operating modes:
|
|
7314
|
+
* - **Interactive** (inside a `List` with `selectionMode` or `onAction`):
|
|
7315
|
+
* uses `useOption` for ARIA semantics, renders state layer + focus ring + ripple.
|
|
7316
|
+
* - **Static**: renders `<li role="listitem">`, no interactive affordances.
|
|
7286
7317
|
*
|
|
7287
7318
|
* Density is auto-derived from content:
|
|
7288
|
-
* - one-line (56dp)
|
|
7289
|
-
* - two-line (72dp)
|
|
7319
|
+
* - one-line (56dp) — headline only
|
|
7320
|
+
* - two-line (72dp) — headline + supportingText
|
|
7290
7321
|
* - three-line (88dp) — overline present
|
|
7322
|
+
*
|
|
7323
|
+
* @example
|
|
7324
|
+
* ```tsx
|
|
7325
|
+
* // Static
|
|
7326
|
+
* <List aria-label="Settings">
|
|
7327
|
+
* <ListItem value="wifi" headline="Wi-Fi" supportingText="Connected" leadingType="icon" leadingSlot={<IconWifi />} />
|
|
7328
|
+
* </List>
|
|
7329
|
+
*
|
|
7330
|
+
* // Interactive single-select
|
|
7331
|
+
* <List aria-label="Alignment" selectionMode="single">
|
|
7332
|
+
* <ListItem value="left" headline="Left" />
|
|
7333
|
+
* <ListItem value="center" headline="Center" />
|
|
7334
|
+
* </List>
|
|
7335
|
+
* ```
|
|
7291
7336
|
*/
|
|
7292
7337
|
declare const ListItem: React__default.ForwardRefExoticComponent<ListItemProps & React__default.RefAttributes<HTMLLIElement>>;
|
|
7293
7338
|
|
|
7294
7339
|
/**
|
|
7295
7340
|
* MD3 ListItem leading slot.
|
|
7296
7341
|
*
|
|
7342
|
+
* Uses `listItemLeadingVariants` CVA so icon/text colors automatically react to
|
|
7343
|
+
* the parent `group/list-item` data-selected and data-disabled attributes.
|
|
7344
|
+
*
|
|
7297
7345
|
* For `checkbox` and `radio` types the children are wrapped with
|
|
7298
7346
|
* `aria-hidden="true"` and `tabIndex={-1}` because the parent
|
|
7299
7347
|
* `ListItem`'s `useOption` already conveys selection state to
|
|
@@ -7304,6 +7352,9 @@ declare const ListItemLeading: React$1.ForwardRefExoticComponent<ListItemLeading
|
|
|
7304
7352
|
/**
|
|
7305
7353
|
* MD3 ListItem trailing slot.
|
|
7306
7354
|
*
|
|
7355
|
+
* Uses `listItemTrailingVariants` CVA so icon/text colors automatically react to
|
|
7356
|
+
* the parent `group/list-item` data-selected and data-disabled attributes.
|
|
7357
|
+
*
|
|
7307
7358
|
* For `checkbox` and `radio` types the children are wrapped with
|
|
7308
7359
|
* `aria-hidden="true"` and `tabIndex={-1}` — selection semantics
|
|
7309
7360
|
* come from the parent `ListItem`'s `useOption`.
|
|
@@ -7313,6 +7364,9 @@ declare const ListItemTrailing: React$1.ForwardRefExoticComponent<ListItemTraili
|
|
|
7313
7364
|
/**
|
|
7314
7365
|
* MD3 ListItem text block — overline + headline + supporting text.
|
|
7315
7366
|
*
|
|
7367
|
+
* Each text element uses its own slot CVA so colors automatically react to
|
|
7368
|
+
* the parent `group/list-item` data-selected and data-disabled attributes.
|
|
7369
|
+
*
|
|
7316
7370
|
* Uses `min-w-0` to allow text truncation inside flex containers.
|
|
7317
7371
|
*/
|
|
7318
7372
|
declare const ListItemText: React$1.ForwardRefExoticComponent<ListItemTextProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -7357,20 +7411,58 @@ declare const ListHeadless: React__default.ForwardRefExoticComponent<ListProps &
|
|
|
7357
7411
|
declare const ListItemHeadless: React__default.ForwardRefExoticComponent<ListItemProps & React__default.RefAttributes<HTMLLIElement>>;
|
|
7358
7412
|
|
|
7359
7413
|
/**
|
|
7360
|
-
*
|
|
7414
|
+
* Material Design 3 List Variants
|
|
7415
|
+
*
|
|
7416
|
+
* Architecture: Variants vs States
|
|
7417
|
+
* - CVA holds design-time structure only (density, slot type).
|
|
7418
|
+
* - All interaction/selection states are driven by data-* attributes on the root <li>
|
|
7419
|
+
* via group-data-[x]/list-item Tailwind selectors in each slot's base classes.
|
|
7420
|
+
* - Content flags (data-with-leading, data-with-trailing) are set explicitly by ListItem.
|
|
7421
|
+
*
|
|
7422
|
+
* Slot responsibilities:
|
|
7423
|
+
* listVariants — container <ul>; bg-surface
|
|
7424
|
+
* listItemVariants — root <li>; group/list-item; density height; cursor; disabled
|
|
7425
|
+
* listItemStateLayerVariants — absolute inset overlay; hover/focus/pressed opacity ring
|
|
7426
|
+
* listItemFocusRingVariants — keyboard focus indicator outline
|
|
7427
|
+
* listItemLeadingVariants — leading slot wrapper; type-specific size/shape + color states
|
|
7428
|
+
* listItemTrailingVariants — trailing slot wrapper; type-specific size/shape + color states
|
|
7429
|
+
* listItemOverlineVariants — overline text; color reacts to selected/disabled
|
|
7430
|
+
* listItemHeadlineVariants — headline text; color reacts to selected/disabled
|
|
7431
|
+
* listItemSupportingTextVariants — supporting text; color reacts to selected/disabled
|
|
7432
|
+
*
|
|
7433
|
+
* MD3 Spec (lists/specs):
|
|
7434
|
+
* One-line: 56dp min-height
|
|
7435
|
+
* Two-line: 72dp min-height
|
|
7436
|
+
* Three-line: 88dp min-height (leading/trailing top-aligned)
|
|
7437
|
+
* Padding: 16dp horizontal, 8dp vertical
|
|
7438
|
+
* Leading icon: 24dp, text-on-surface-variant
|
|
7439
|
+
* Leading avatar: 40dp circle
|
|
7440
|
+
* State-layer opacities: hover 8% | focus 10% | pressed 10%
|
|
7441
|
+
* Disabled: content 38% opacity, pointer-events none
|
|
7442
|
+
* Selected: bg-secondary-container, text/icons on-secondary-container
|
|
7443
|
+
*/
|
|
7444
|
+
/**
|
|
7445
|
+
* List container (<ul>).
|
|
7446
|
+
* MD3: Lists use `surface` color role for their container.
|
|
7361
7447
|
*/
|
|
7362
7448
|
declare const listVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
7363
7449
|
/**
|
|
7364
|
-
*
|
|
7450
|
+
* Root <li> element — carries `group/list-item` and emits data-* interaction attributes.
|
|
7451
|
+
*
|
|
7452
|
+
* Design-time variant: `density` only.
|
|
7453
|
+
* All interaction/selection states are driven via group-data-[x]/list-item selectors
|
|
7454
|
+
* in the slot CVAs below — NOT as CVA variant keys here.
|
|
7365
7455
|
*
|
|
7366
|
-
*
|
|
7367
|
-
*
|
|
7456
|
+
* one-line: 56dp (min-h-14)
|
|
7457
|
+
* two-line: 72dp (min-h-18)
|
|
7458
|
+
* three-line: 88dp (min-h-22, items-start for top-aligned slots)
|
|
7459
|
+
*
|
|
7460
|
+
* Selected background: group-data-[selected]/list-item:bg-secondary-container
|
|
7461
|
+
* Interactive cursor: data-[interactive]:cursor-pointer
|
|
7462
|
+
* Disabled: self-targeting data-[disabled]: selectors (38% + no pointer)
|
|
7368
7463
|
*/
|
|
7369
7464
|
declare const listItemVariants: (props?: ({
|
|
7370
7465
|
density?: "one-line" | "two-line" | "three-line" | null | undefined;
|
|
7371
|
-
isSelected?: boolean | null | undefined;
|
|
7372
|
-
isDisabled?: boolean | null | undefined;
|
|
7373
|
-
isInteractive?: boolean | null | undefined;
|
|
7374
7466
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
7375
7467
|
type ListVariants = VariantProps<typeof listVariants>;
|
|
7376
7468
|
type ListItemVariants = VariantProps<typeof listItemVariants>;
|
package/dist/index.d.ts
CHANGED
|
@@ -4150,7 +4150,9 @@ declare const HeadlessDrawerItem: React__default.ForwardRefExoticComponent<Headl
|
|
|
4150
4150
|
* Built on React Aria for world-class accessibility.
|
|
4151
4151
|
* Supports four variants: Linear Determinate, Linear Indeterminate,
|
|
4152
4152
|
* Circular Determinate, and Circular Indeterminate.
|
|
4153
|
-
*
|
|
4153
|
+
* Implements MD3 Expressive styling: colorful primary-container track,
|
|
4154
|
+
* 4dp indicator-track gap, fully-rounded segments, thick track option,
|
|
4155
|
+
* and optional wavy shape.
|
|
4154
4156
|
*
|
|
4155
4157
|
* @example
|
|
4156
4158
|
* ```tsx
|
|
@@ -4169,6 +4171,9 @@ declare const HeadlessDrawerItem: React__default.ForwardRefExoticComponent<Headl
|
|
|
4169
4171
|
* // Circular with size
|
|
4170
4172
|
* <Progress type="circular" indeterminate size="small" aria-label="Loading" />
|
|
4171
4173
|
*
|
|
4174
|
+
* // Thick wavy linear (MD3 Expressive)
|
|
4175
|
+
* <Progress type="linear" indeterminate shape="wavy" thickness="thick" aria-label="Loading" />
|
|
4176
|
+
*
|
|
4172
4177
|
* // Custom range
|
|
4173
4178
|
* <Progress type="linear" minValue={0} maxValue={200} value={150} label="Progress" />
|
|
4174
4179
|
* ```
|
|
@@ -4191,6 +4196,22 @@ interface ProgressProps extends AriaProgressBarProps {
|
|
|
4191
4196
|
* @default "medium"
|
|
4192
4197
|
*/
|
|
4193
4198
|
size?: "small" | "medium" | "large";
|
|
4199
|
+
/**
|
|
4200
|
+
* Visual shape of the progress indicator.
|
|
4201
|
+
* - `"flat"` — standard rounded rectangular/circular track.
|
|
4202
|
+
* - `"wavy"` — MD3 Expressive sine-wave active indicator.
|
|
4203
|
+
* Increases linear container height to accommodate wave amplitude.
|
|
4204
|
+
* Reduced-motion users receive a flat fallback automatically.
|
|
4205
|
+
* @default "flat"
|
|
4206
|
+
*/
|
|
4207
|
+
shape?: "flat" | "wavy";
|
|
4208
|
+
/**
|
|
4209
|
+
* Track thickness.
|
|
4210
|
+
* - `"default"` — 4dp per MD3 baseline spec.
|
|
4211
|
+
* - `"thick"` — 8dp MD3 Expressive variant (fully rounded, `trackCornerRadius` = 4dp).
|
|
4212
|
+
* @default "default"
|
|
4213
|
+
*/
|
|
4214
|
+
thickness?: "default" | "thick";
|
|
4194
4215
|
/**
|
|
4195
4216
|
* Additional CSS classes (Tailwind).
|
|
4196
4217
|
*/
|
|
@@ -4206,7 +4227,7 @@ interface ProgressProps extends AriaProgressBarProps {
|
|
|
4206
4227
|
* type="linear"
|
|
4207
4228
|
* value={50}
|
|
4208
4229
|
* label="Upload"
|
|
4209
|
-
* renderProgress={({ percentage }) => (
|
|
4230
|
+
* renderProgress={({ percentage, shape, thickness }) => (
|
|
4210
4231
|
* <div style={{ width: `${percentage}%` }} />
|
|
4211
4232
|
* )}
|
|
4212
4233
|
* />
|
|
@@ -4228,6 +4249,16 @@ interface ProgressHeadlessProps extends AriaProgressBarProps {
|
|
|
4228
4249
|
* @default "medium"
|
|
4229
4250
|
*/
|
|
4230
4251
|
size?: "small" | "medium" | "large";
|
|
4252
|
+
/**
|
|
4253
|
+
* Visual shape of the progress indicator.
|
|
4254
|
+
* @default "flat"
|
|
4255
|
+
*/
|
|
4256
|
+
shape?: "flat" | "wavy";
|
|
4257
|
+
/**
|
|
4258
|
+
* Track thickness.
|
|
4259
|
+
* @default "default"
|
|
4260
|
+
*/
|
|
4261
|
+
thickness?: "default" | "thick";
|
|
4231
4262
|
/**
|
|
4232
4263
|
* Additional CSS classes.
|
|
4233
4264
|
*/
|
|
@@ -4245,6 +4276,8 @@ interface ProgressHeadlessProps extends AriaProgressBarProps {
|
|
|
4245
4276
|
isIndeterminate: boolean;
|
|
4246
4277
|
type: "linear" | "circular";
|
|
4247
4278
|
size: "small" | "medium" | "large";
|
|
4279
|
+
shape: "flat" | "wavy";
|
|
4280
|
+
thickness: "default" | "thick";
|
|
4248
4281
|
}) => React__default.ReactNode;
|
|
4249
4282
|
}
|
|
4250
4283
|
|
|
@@ -4252,23 +4285,20 @@ interface ProgressHeadlessProps extends AriaProgressBarProps {
|
|
|
4252
4285
|
* Material Design 3 Progress Indicator (Layer 3: Styled)
|
|
4253
4286
|
*
|
|
4254
4287
|
* Built on React Aria for world-class accessibility.
|
|
4255
|
-
*
|
|
4288
|
+
* Implements MD3 Expressive spec:
|
|
4289
|
+
* - Colorful track: primary-container (inactive), primary (active)
|
|
4290
|
+
* - 4dp indicator-track gap (linear + circular)
|
|
4291
|
+
* - Fully-rounded segments
|
|
4292
|
+
* - Optional thick (8dp) track
|
|
4293
|
+
* - Optional wavy shape with amplitude ramp
|
|
4294
|
+
* - useReducedMotion guard: wavy falls back to flat when reduced-motion is set
|
|
4295
|
+
*
|
|
4296
|
+
* Four variants driven by `type` × `indeterminate`:
|
|
4256
4297
|
* - Linear Determinate
|
|
4257
4298
|
* - Linear Indeterminate
|
|
4258
4299
|
* - Circular Determinate
|
|
4259
4300
|
* - Circular Indeterminate
|
|
4260
4301
|
*
|
|
4261
|
-
* MD3 Specifications:
|
|
4262
|
-
* - Linear track height: 4dp (h-1)
|
|
4263
|
-
* - Linear track shape: rounded-full
|
|
4264
|
-
* - Circular default size: 48dp (medium)
|
|
4265
|
-
* - Circular stroke width: 4dp (SVG attribute)
|
|
4266
|
-
* - Active track: primary
|
|
4267
|
-
* - Inactive track: surface-container-highest
|
|
4268
|
-
* - Determinate transitions: duration-medium4 + ease-standard
|
|
4269
|
-
* - Indeterminate linear cycle: duration-long2
|
|
4270
|
-
* - Indeterminate circular rotation: duration-long4
|
|
4271
|
-
*
|
|
4272
4302
|
* @example
|
|
4273
4303
|
* ```tsx
|
|
4274
4304
|
* // Linear determinate
|
|
@@ -4283,8 +4313,8 @@ interface ProgressHeadlessProps extends AriaProgressBarProps {
|
|
|
4283
4313
|
* // Circular indeterminate
|
|
4284
4314
|
* <Progress type="circular" indeterminate aria-label="Loading" />
|
|
4285
4315
|
*
|
|
4286
|
-
* //
|
|
4287
|
-
* <Progress type="
|
|
4316
|
+
* // Thick wavy (MD3 Expressive)
|
|
4317
|
+
* <Progress type="linear" indeterminate shape="wavy" thickness="thick" aria-label="Loading" />
|
|
4288
4318
|
* ```
|
|
4289
4319
|
*/
|
|
4290
4320
|
declare const Progress: React__default.ForwardRefExoticComponent<ProgressProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
@@ -4300,7 +4330,7 @@ declare const Progress: React__default.ForwardRefExoticComponent<ProgressProps &
|
|
|
4300
4330
|
* - Determinate and indeterminate progress support
|
|
4301
4331
|
* - Internationalized value label formatting via React Aria
|
|
4302
4332
|
* - Label linkage via aria-labelledby / aria-label
|
|
4303
|
-
* - Render prop for custom visual rendering
|
|
4333
|
+
* - Render prop for custom visual rendering (receives shape + thickness)
|
|
4304
4334
|
*
|
|
4305
4335
|
* @example
|
|
4306
4336
|
* ```tsx
|
|
@@ -4308,7 +4338,7 @@ declare const Progress: React__default.ForwardRefExoticComponent<ProgressProps &
|
|
|
4308
4338
|
* <ProgressHeadless
|
|
4309
4339
|
* value={50}
|
|
4310
4340
|
* label="Upload"
|
|
4311
|
-
* renderProgress={({ percentage }) => (
|
|
4341
|
+
* renderProgress={({ percentage, shape, thickness }) => (
|
|
4312
4342
|
* <div style={{ width: `${percentage}%` }} />
|
|
4313
4343
|
* )}
|
|
4314
4344
|
* />
|
|
@@ -7093,9 +7123,9 @@ type RichTooltipVariants = VariantProps<typeof richTooltipVariants>;
|
|
|
7093
7123
|
/**
|
|
7094
7124
|
* Visual density based on content lines (MD3 List)
|
|
7095
7125
|
*
|
|
7096
|
-
* - `one-line`: headline only (
|
|
7097
|
-
* - `two-line`: headline + supporting text (
|
|
7098
|
-
* - `three-line`: overline + headline + supporting text (88dp)
|
|
7126
|
+
* - `one-line`: headline only (56dp min-height)
|
|
7127
|
+
* - `two-line`: headline + supporting text (72dp min-height)
|
|
7128
|
+
* - `three-line`: overline + headline + supporting text (88dp min-height)
|
|
7099
7129
|
*/
|
|
7100
7130
|
type ListDensity = "one-line" | "two-line" | "three-line";
|
|
7101
7131
|
/**
|
|
@@ -7201,8 +7231,6 @@ interface ListItemProps {
|
|
|
7201
7231
|
insetDivider?: boolean;
|
|
7202
7232
|
/** Additional CSS classes */
|
|
7203
7233
|
className?: string;
|
|
7204
|
-
/** Item-specific action callback */
|
|
7205
|
-
onAction?: (value: string | number) => void;
|
|
7206
7234
|
}
|
|
7207
7235
|
/**
|
|
7208
7236
|
* Props for the ListItem leading slot
|
|
@@ -7276,24 +7304,44 @@ declare const List: React__default.ForwardRefExoticComponent<ListProps & React__
|
|
|
7276
7304
|
/**
|
|
7277
7305
|
* Material Design 3 List Item (Layer 3: Styled)
|
|
7278
7306
|
*
|
|
7279
|
-
*
|
|
7280
|
-
*
|
|
7307
|
+
* Architecture: Variants-vs-States
|
|
7308
|
+
* - Design-time variant: `density` (auto-derived from content).
|
|
7309
|
+
* - All interaction/selection states are expressed as data-* attributes on the root <li>
|
|
7310
|
+
* via `getInteractionDataAttributes`, consumed by each slot via group-data-[x]/list-item.
|
|
7311
|
+
* - Content flags (`data-with-leading`, `data-with-trailing`) describe structure, set explicitly.
|
|
7281
7312
|
*
|
|
7282
|
-
*
|
|
7283
|
-
*
|
|
7284
|
-
*
|
|
7285
|
-
*
|
|
7313
|
+
* Two operating modes:
|
|
7314
|
+
* - **Interactive** (inside a `List` with `selectionMode` or `onAction`):
|
|
7315
|
+
* uses `useOption` for ARIA semantics, renders state layer + focus ring + ripple.
|
|
7316
|
+
* - **Static**: renders `<li role="listitem">`, no interactive affordances.
|
|
7286
7317
|
*
|
|
7287
7318
|
* Density is auto-derived from content:
|
|
7288
|
-
* - one-line (56dp)
|
|
7289
|
-
* - two-line (72dp)
|
|
7319
|
+
* - one-line (56dp) — headline only
|
|
7320
|
+
* - two-line (72dp) — headline + supportingText
|
|
7290
7321
|
* - three-line (88dp) — overline present
|
|
7322
|
+
*
|
|
7323
|
+
* @example
|
|
7324
|
+
* ```tsx
|
|
7325
|
+
* // Static
|
|
7326
|
+
* <List aria-label="Settings">
|
|
7327
|
+
* <ListItem value="wifi" headline="Wi-Fi" supportingText="Connected" leadingType="icon" leadingSlot={<IconWifi />} />
|
|
7328
|
+
* </List>
|
|
7329
|
+
*
|
|
7330
|
+
* // Interactive single-select
|
|
7331
|
+
* <List aria-label="Alignment" selectionMode="single">
|
|
7332
|
+
* <ListItem value="left" headline="Left" />
|
|
7333
|
+
* <ListItem value="center" headline="Center" />
|
|
7334
|
+
* </List>
|
|
7335
|
+
* ```
|
|
7291
7336
|
*/
|
|
7292
7337
|
declare const ListItem: React__default.ForwardRefExoticComponent<ListItemProps & React__default.RefAttributes<HTMLLIElement>>;
|
|
7293
7338
|
|
|
7294
7339
|
/**
|
|
7295
7340
|
* MD3 ListItem leading slot.
|
|
7296
7341
|
*
|
|
7342
|
+
* Uses `listItemLeadingVariants` CVA so icon/text colors automatically react to
|
|
7343
|
+
* the parent `group/list-item` data-selected and data-disabled attributes.
|
|
7344
|
+
*
|
|
7297
7345
|
* For `checkbox` and `radio` types the children are wrapped with
|
|
7298
7346
|
* `aria-hidden="true"` and `tabIndex={-1}` because the parent
|
|
7299
7347
|
* `ListItem`'s `useOption` already conveys selection state to
|
|
@@ -7304,6 +7352,9 @@ declare const ListItemLeading: React$1.ForwardRefExoticComponent<ListItemLeading
|
|
|
7304
7352
|
/**
|
|
7305
7353
|
* MD3 ListItem trailing slot.
|
|
7306
7354
|
*
|
|
7355
|
+
* Uses `listItemTrailingVariants` CVA so icon/text colors automatically react to
|
|
7356
|
+
* the parent `group/list-item` data-selected and data-disabled attributes.
|
|
7357
|
+
*
|
|
7307
7358
|
* For `checkbox` and `radio` types the children are wrapped with
|
|
7308
7359
|
* `aria-hidden="true"` and `tabIndex={-1}` — selection semantics
|
|
7309
7360
|
* come from the parent `ListItem`'s `useOption`.
|
|
@@ -7313,6 +7364,9 @@ declare const ListItemTrailing: React$1.ForwardRefExoticComponent<ListItemTraili
|
|
|
7313
7364
|
/**
|
|
7314
7365
|
* MD3 ListItem text block — overline + headline + supporting text.
|
|
7315
7366
|
*
|
|
7367
|
+
* Each text element uses its own slot CVA so colors automatically react to
|
|
7368
|
+
* the parent `group/list-item` data-selected and data-disabled attributes.
|
|
7369
|
+
*
|
|
7316
7370
|
* Uses `min-w-0` to allow text truncation inside flex containers.
|
|
7317
7371
|
*/
|
|
7318
7372
|
declare const ListItemText: React$1.ForwardRefExoticComponent<ListItemTextProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -7357,20 +7411,58 @@ declare const ListHeadless: React__default.ForwardRefExoticComponent<ListProps &
|
|
|
7357
7411
|
declare const ListItemHeadless: React__default.ForwardRefExoticComponent<ListItemProps & React__default.RefAttributes<HTMLLIElement>>;
|
|
7358
7412
|
|
|
7359
7413
|
/**
|
|
7360
|
-
*
|
|
7414
|
+
* Material Design 3 List Variants
|
|
7415
|
+
*
|
|
7416
|
+
* Architecture: Variants vs States
|
|
7417
|
+
* - CVA holds design-time structure only (density, slot type).
|
|
7418
|
+
* - All interaction/selection states are driven by data-* attributes on the root <li>
|
|
7419
|
+
* via group-data-[x]/list-item Tailwind selectors in each slot's base classes.
|
|
7420
|
+
* - Content flags (data-with-leading, data-with-trailing) are set explicitly by ListItem.
|
|
7421
|
+
*
|
|
7422
|
+
* Slot responsibilities:
|
|
7423
|
+
* listVariants — container <ul>; bg-surface
|
|
7424
|
+
* listItemVariants — root <li>; group/list-item; density height; cursor; disabled
|
|
7425
|
+
* listItemStateLayerVariants — absolute inset overlay; hover/focus/pressed opacity ring
|
|
7426
|
+
* listItemFocusRingVariants — keyboard focus indicator outline
|
|
7427
|
+
* listItemLeadingVariants — leading slot wrapper; type-specific size/shape + color states
|
|
7428
|
+
* listItemTrailingVariants — trailing slot wrapper; type-specific size/shape + color states
|
|
7429
|
+
* listItemOverlineVariants — overline text; color reacts to selected/disabled
|
|
7430
|
+
* listItemHeadlineVariants — headline text; color reacts to selected/disabled
|
|
7431
|
+
* listItemSupportingTextVariants — supporting text; color reacts to selected/disabled
|
|
7432
|
+
*
|
|
7433
|
+
* MD3 Spec (lists/specs):
|
|
7434
|
+
* One-line: 56dp min-height
|
|
7435
|
+
* Two-line: 72dp min-height
|
|
7436
|
+
* Three-line: 88dp min-height (leading/trailing top-aligned)
|
|
7437
|
+
* Padding: 16dp horizontal, 8dp vertical
|
|
7438
|
+
* Leading icon: 24dp, text-on-surface-variant
|
|
7439
|
+
* Leading avatar: 40dp circle
|
|
7440
|
+
* State-layer opacities: hover 8% | focus 10% | pressed 10%
|
|
7441
|
+
* Disabled: content 38% opacity, pointer-events none
|
|
7442
|
+
* Selected: bg-secondary-container, text/icons on-secondary-container
|
|
7443
|
+
*/
|
|
7444
|
+
/**
|
|
7445
|
+
* List container (<ul>).
|
|
7446
|
+
* MD3: Lists use `surface` color role for their container.
|
|
7361
7447
|
*/
|
|
7362
7448
|
declare const listVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
7363
7449
|
/**
|
|
7364
|
-
*
|
|
7450
|
+
* Root <li> element — carries `group/list-item` and emits data-* interaction attributes.
|
|
7451
|
+
*
|
|
7452
|
+
* Design-time variant: `density` only.
|
|
7453
|
+
* All interaction/selection states are driven via group-data-[x]/list-item selectors
|
|
7454
|
+
* in the slot CVAs below — NOT as CVA variant keys here.
|
|
7365
7455
|
*
|
|
7366
|
-
*
|
|
7367
|
-
*
|
|
7456
|
+
* one-line: 56dp (min-h-14)
|
|
7457
|
+
* two-line: 72dp (min-h-18)
|
|
7458
|
+
* three-line: 88dp (min-h-22, items-start for top-aligned slots)
|
|
7459
|
+
*
|
|
7460
|
+
* Selected background: group-data-[selected]/list-item:bg-secondary-container
|
|
7461
|
+
* Interactive cursor: data-[interactive]:cursor-pointer
|
|
7462
|
+
* Disabled: self-targeting data-[disabled]: selectors (38% + no pointer)
|
|
7368
7463
|
*/
|
|
7369
7464
|
declare const listItemVariants: (props?: ({
|
|
7370
7465
|
density?: "one-line" | "two-line" | "three-line" | null | undefined;
|
|
7371
|
-
isSelected?: boolean | null | undefined;
|
|
7372
|
-
isDisabled?: boolean | null | undefined;
|
|
7373
|
-
isInteractive?: boolean | null | undefined;
|
|
7374
7466
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
7375
7467
|
type ListVariants = VariantProps<typeof listVariants>;
|
|
7376
7468
|
type ListItemVariants = VariantProps<typeof listItemVariants>;
|