@tinybigui/react 0.11.2 → 0.12.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 +10 -10
- package/dist/index.cjs +41 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +73 -40
- package/dist/index.d.ts +73 -40
- package/dist/index.js +41 -48
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -4317,31 +4317,49 @@ declare const ProgressHeadless: React__default.ForwardRefExoticComponent<Progres
|
|
|
4317
4317
|
*/
|
|
4318
4318
|
type DividerOrientation = "horizontal" | "vertical";
|
|
4319
4319
|
/**
|
|
4320
|
-
* Divider inset — controls which end(s) of the rule are
|
|
4321
|
-
*
|
|
4320
|
+
* Divider inset — controls which end(s) of the rule are offset by 16dp.
|
|
4321
|
+
*
|
|
4322
|
+
* Uses logical inline properties (inline-start / inline-end) so insets adapt
|
|
4323
|
+
* correctly to RTL writing modes.
|
|
4324
|
+
*
|
|
4322
4325
|
* @default 'none'
|
|
4323
4326
|
*/
|
|
4324
4327
|
type DividerInset = "none" | "start" | "end" | "both";
|
|
4328
|
+
/**
|
|
4329
|
+
* CSS custom properties supported by the Divider component.
|
|
4330
|
+
* Extends `React.CSSProperties` to allow the `--md-divider-thickness` variable.
|
|
4331
|
+
*/
|
|
4332
|
+
interface DividerCSSProperties extends React__default.CSSProperties {
|
|
4333
|
+
/** Thickness of the divider rule. MD3 default: 1dp (1px). */
|
|
4334
|
+
"--md-divider-thickness"?: string;
|
|
4335
|
+
}
|
|
4325
4336
|
/**
|
|
4326
4337
|
* Material Design 3 Divider Component Props
|
|
4327
4338
|
*
|
|
4328
4339
|
* A thin line that groups content in lists and containers.
|
|
4329
|
-
* Supports horizontal/vertical orientations
|
|
4330
|
-
*
|
|
4340
|
+
* Supports horizontal/vertical orientations and four inset variants.
|
|
4341
|
+
*
|
|
4342
|
+
* Thickness is controlled via the `--md-divider-thickness` CSS custom property
|
|
4343
|
+
* (default `1px`, matching the MD3 1dp specification). Override it with a style
|
|
4344
|
+
* prop or an arbitrary Tailwind property:
|
|
4345
|
+
*
|
|
4346
|
+
* ```tsx
|
|
4347
|
+
* <Divider style={{ "--md-divider-thickness": "2px" }} />
|
|
4348
|
+
* ```
|
|
4331
4349
|
*
|
|
4332
4350
|
* @example
|
|
4333
4351
|
* ```tsx
|
|
4334
4352
|
* // Full-bleed horizontal divider (default)
|
|
4335
4353
|
* <Divider />
|
|
4336
4354
|
*
|
|
4337
|
-
* // Inset divider
|
|
4355
|
+
* // Inset divider — logical 16dp from inline-start (RTL-aware)
|
|
4338
4356
|
* <Divider inset="start" />
|
|
4339
4357
|
*
|
|
4340
|
-
* // Vertical divider
|
|
4358
|
+
* // Vertical divider inside a flex row
|
|
4341
4359
|
* <Divider orientation="vertical" />
|
|
4342
4360
|
*
|
|
4343
|
-
* //
|
|
4344
|
-
* <Divider
|
|
4361
|
+
* // Custom thickness
|
|
4362
|
+
* <Divider style={{ "--md-divider-thickness": "2px" }} />
|
|
4345
4363
|
* ```
|
|
4346
4364
|
*/
|
|
4347
4365
|
interface DividerProps {
|
|
@@ -4351,19 +4369,19 @@ interface DividerProps {
|
|
|
4351
4369
|
*/
|
|
4352
4370
|
orientation?: DividerOrientation;
|
|
4353
4371
|
/**
|
|
4354
|
-
* Inset — shifts the start and/or end of the rule by 16dp.
|
|
4372
|
+
* Inset — shifts the start and/or end of the rule by 16dp (logical, RTL-aware).
|
|
4355
4373
|
* @default 'none'
|
|
4356
4374
|
*/
|
|
4357
4375
|
inset?: DividerInset;
|
|
4358
|
-
/**
|
|
4359
|
-
* When provided, renders a subheader (labeled) divider with the text
|
|
4360
|
-
* centered between two rule lines.
|
|
4361
|
-
*/
|
|
4362
|
-
label?: string;
|
|
4363
4376
|
/**
|
|
4364
4377
|
* Additional Tailwind CSS classes.
|
|
4365
4378
|
*/
|
|
4366
4379
|
className?: string;
|
|
4380
|
+
/**
|
|
4381
|
+
* Inline styles. Supports the `--md-divider-thickness` CSS custom property
|
|
4382
|
+
* to override the default 1dp thickness.
|
|
4383
|
+
*/
|
|
4384
|
+
style?: DividerCSSProperties;
|
|
4367
4385
|
}
|
|
4368
4386
|
/**
|
|
4369
4387
|
* Props for the headless Divider primitive.
|
|
@@ -4375,7 +4393,7 @@ interface DividerProps {
|
|
|
4375
4393
|
* ```tsx
|
|
4376
4394
|
* <DividerHeadless
|
|
4377
4395
|
* orientation="horizontal"
|
|
4378
|
-
* className="
|
|
4396
|
+
* className="w-full h-px bg-outline-variant"
|
|
4379
4397
|
* />
|
|
4380
4398
|
* ```
|
|
4381
4399
|
*/
|
|
@@ -4390,40 +4408,40 @@ interface DividerHeadlessProps {
|
|
|
4390
4408
|
*/
|
|
4391
4409
|
className?: string;
|
|
4392
4410
|
/**
|
|
4393
|
-
*
|
|
4394
|
-
* rendering is handled by the styled `Divider` layer.
|
|
4411
|
+
* Inline styles forwarded to the underlying element.
|
|
4395
4412
|
*/
|
|
4396
|
-
|
|
4397
|
-
/**
|
|
4398
|
-
* Child content. Declared for interface extensibility;
|
|
4399
|
-
* the headless primitive itself is a void/leaf element.
|
|
4400
|
-
*/
|
|
4401
|
-
children?: React__default.ReactNode;
|
|
4413
|
+
style?: DividerCSSProperties;
|
|
4402
4414
|
}
|
|
4403
4415
|
|
|
4404
4416
|
/**
|
|
4405
4417
|
* Divider — MD3 Styled Component (Layer 3)
|
|
4406
4418
|
*
|
|
4407
4419
|
* A thin rule that separates content in lists and containers.
|
|
4408
|
-
* Supports horizontal/vertical orientations
|
|
4409
|
-
* optional subheader label that renders the text centered between two rules.
|
|
4420
|
+
* Supports horizontal/vertical orientations and four inset variants.
|
|
4410
4421
|
*
|
|
4411
4422
|
* Built on `DividerHeadless` (React Aria `useSeparator`) for accessible
|
|
4412
4423
|
* ARIA semantics. Uses CVA variants mapped to MD3 design tokens.
|
|
4413
4424
|
*
|
|
4425
|
+
* Thickness is controlled via the `--md-divider-thickness` CSS custom property
|
|
4426
|
+
* (default `1px`, matching the MD3 1dp spec). Override with a `style` prop:
|
|
4427
|
+
*
|
|
4428
|
+
* ```tsx
|
|
4429
|
+
* <Divider style={{ "--md-divider-thickness": "2px" }} />
|
|
4430
|
+
* ```
|
|
4431
|
+
*
|
|
4414
4432
|
* @example
|
|
4415
4433
|
* ```tsx
|
|
4416
4434
|
* // Full-bleed horizontal divider
|
|
4417
4435
|
* <Divider />
|
|
4418
4436
|
*
|
|
4419
|
-
* // Inset from
|
|
4437
|
+
* // Inset from inline-start (RTL-aware, 16dp)
|
|
4420
4438
|
* <Divider inset="start" />
|
|
4421
4439
|
*
|
|
4422
4440
|
* // Vertical divider inside a flex row
|
|
4423
4441
|
* <Divider orientation="vertical" />
|
|
4424
4442
|
*
|
|
4425
|
-
* //
|
|
4426
|
-
* <Divider
|
|
4443
|
+
* // Custom thickness
|
|
4444
|
+
* <Divider style={{ "--md-divider-thickness": "2px" }} />
|
|
4427
4445
|
* ```
|
|
4428
4446
|
*/
|
|
4429
4447
|
declare const Divider: React$1.ForwardRefExoticComponent<DividerProps & React$1.RefAttributes<HTMLElement>>;
|
|
@@ -4437,14 +4455,13 @@ declare const Divider: React$1.ForwardRefExoticComponent<DividerProps & React$1.
|
|
|
4437
4455
|
* - Horizontal → renders `<hr>` (implicit ARIA separator role)
|
|
4438
4456
|
* - Vertical → renders `<div>` with explicit `role="separator"`
|
|
4439
4457
|
*
|
|
4440
|
-
* Bring your own styles via the `className`
|
|
4458
|
+
* Bring your own styles via the `className` or `style` props.
|
|
4441
4459
|
*
|
|
4442
4460
|
* @example
|
|
4443
4461
|
* ```tsx
|
|
4444
|
-
* // Used inside the styled Divider, or directly for custom styling:
|
|
4445
4462
|
* <DividerHeadless
|
|
4446
4463
|
* orientation="horizontal"
|
|
4447
|
-
* className="
|
|
4464
|
+
* className="w-full h-px bg-outline-variant"
|
|
4448
4465
|
* />
|
|
4449
4466
|
* ```
|
|
4450
4467
|
*/
|
|
@@ -4453,17 +4470,33 @@ declare const DividerHeadless: React$1.ForwardRefExoticComponent<DividerHeadless
|
|
|
4453
4470
|
/**
|
|
4454
4471
|
* Material Design 3 Divider Variants (CVA)
|
|
4455
4472
|
*
|
|
4456
|
-
*
|
|
4457
|
-
*
|
|
4473
|
+
* Architecture: Variants only — the Divider is a static, non-interactive element
|
|
4474
|
+
* (no hover/focus/pressed states) so there is no state-layer machinery.
|
|
4458
4475
|
*
|
|
4459
|
-
*
|
|
4460
|
-
*
|
|
4461
|
-
*
|
|
4476
|
+
* Implementation strategy:
|
|
4477
|
+
* The border-* approach used previously required separate horizontal/vertical
|
|
4478
|
+
* logic and could not share a single thickness control. We now use a background
|
|
4479
|
+
* fill on a zero-border element, driven by a CSS custom property, which is the
|
|
4480
|
+
* same technique used by the official @material/web md-divider implementation.
|
|
4481
|
+
*
|
|
4482
|
+
* CSS variable:
|
|
4483
|
+
* --md-divider-thickness (default: 1px, MD3 spec: 1dp)
|
|
4484
|
+
* Override via style or a Tailwind arbitrary property:
|
|
4485
|
+
* <Divider style={{ "--md-divider-thickness": "2px" }} />
|
|
4462
4486
|
*
|
|
4463
|
-
*
|
|
4464
|
-
*
|
|
4465
|
-
*
|
|
4466
|
-
*
|
|
4487
|
+
* Orientation:
|
|
4488
|
+
* horizontal — full-width strip, height driven by --md-divider-thickness
|
|
4489
|
+
* vertical — self-stretches to container height, width driven by var
|
|
4490
|
+
*
|
|
4491
|
+
* Inset (MD3 spec: 16dp logical offset, RTL-aware):
|
|
4492
|
+
* start — ms-4 (inline-start, adapts to writing direction)
|
|
4493
|
+
* end — me-4 (inline-end)
|
|
4494
|
+
* both — ms-4 me-4
|
|
4495
|
+
*
|
|
4496
|
+
* MD3 Spec references:
|
|
4497
|
+
* Color: outline-variant (--md-sys-color-outline-variant)
|
|
4498
|
+
* Thickness: 1dp (no MD3 component token — exposed as a CSS var for parity with md-web)
|
|
4499
|
+
* Inset: 16dp (--md-comp-divider-leading-space / --md-comp-divider-trailing-space)
|
|
4467
4500
|
*/
|
|
4468
4501
|
declare const dividerVariants: (props?: ({
|
|
4469
4502
|
orientation?: "vertical" | "horizontal" | null | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -4317,31 +4317,49 @@ declare const ProgressHeadless: React__default.ForwardRefExoticComponent<Progres
|
|
|
4317
4317
|
*/
|
|
4318
4318
|
type DividerOrientation = "horizontal" | "vertical";
|
|
4319
4319
|
/**
|
|
4320
|
-
* Divider inset — controls which end(s) of the rule are
|
|
4321
|
-
*
|
|
4320
|
+
* Divider inset — controls which end(s) of the rule are offset by 16dp.
|
|
4321
|
+
*
|
|
4322
|
+
* Uses logical inline properties (inline-start / inline-end) so insets adapt
|
|
4323
|
+
* correctly to RTL writing modes.
|
|
4324
|
+
*
|
|
4322
4325
|
* @default 'none'
|
|
4323
4326
|
*/
|
|
4324
4327
|
type DividerInset = "none" | "start" | "end" | "both";
|
|
4328
|
+
/**
|
|
4329
|
+
* CSS custom properties supported by the Divider component.
|
|
4330
|
+
* Extends `React.CSSProperties` to allow the `--md-divider-thickness` variable.
|
|
4331
|
+
*/
|
|
4332
|
+
interface DividerCSSProperties extends React__default.CSSProperties {
|
|
4333
|
+
/** Thickness of the divider rule. MD3 default: 1dp (1px). */
|
|
4334
|
+
"--md-divider-thickness"?: string;
|
|
4335
|
+
}
|
|
4325
4336
|
/**
|
|
4326
4337
|
* Material Design 3 Divider Component Props
|
|
4327
4338
|
*
|
|
4328
4339
|
* A thin line that groups content in lists and containers.
|
|
4329
|
-
* Supports horizontal/vertical orientations
|
|
4330
|
-
*
|
|
4340
|
+
* Supports horizontal/vertical orientations and four inset variants.
|
|
4341
|
+
*
|
|
4342
|
+
* Thickness is controlled via the `--md-divider-thickness` CSS custom property
|
|
4343
|
+
* (default `1px`, matching the MD3 1dp specification). Override it with a style
|
|
4344
|
+
* prop or an arbitrary Tailwind property:
|
|
4345
|
+
*
|
|
4346
|
+
* ```tsx
|
|
4347
|
+
* <Divider style={{ "--md-divider-thickness": "2px" }} />
|
|
4348
|
+
* ```
|
|
4331
4349
|
*
|
|
4332
4350
|
* @example
|
|
4333
4351
|
* ```tsx
|
|
4334
4352
|
* // Full-bleed horizontal divider (default)
|
|
4335
4353
|
* <Divider />
|
|
4336
4354
|
*
|
|
4337
|
-
* // Inset divider
|
|
4355
|
+
* // Inset divider — logical 16dp from inline-start (RTL-aware)
|
|
4338
4356
|
* <Divider inset="start" />
|
|
4339
4357
|
*
|
|
4340
|
-
* // Vertical divider
|
|
4358
|
+
* // Vertical divider inside a flex row
|
|
4341
4359
|
* <Divider orientation="vertical" />
|
|
4342
4360
|
*
|
|
4343
|
-
* //
|
|
4344
|
-
* <Divider
|
|
4361
|
+
* // Custom thickness
|
|
4362
|
+
* <Divider style={{ "--md-divider-thickness": "2px" }} />
|
|
4345
4363
|
* ```
|
|
4346
4364
|
*/
|
|
4347
4365
|
interface DividerProps {
|
|
@@ -4351,19 +4369,19 @@ interface DividerProps {
|
|
|
4351
4369
|
*/
|
|
4352
4370
|
orientation?: DividerOrientation;
|
|
4353
4371
|
/**
|
|
4354
|
-
* Inset — shifts the start and/or end of the rule by 16dp.
|
|
4372
|
+
* Inset — shifts the start and/or end of the rule by 16dp (logical, RTL-aware).
|
|
4355
4373
|
* @default 'none'
|
|
4356
4374
|
*/
|
|
4357
4375
|
inset?: DividerInset;
|
|
4358
|
-
/**
|
|
4359
|
-
* When provided, renders a subheader (labeled) divider with the text
|
|
4360
|
-
* centered between two rule lines.
|
|
4361
|
-
*/
|
|
4362
|
-
label?: string;
|
|
4363
4376
|
/**
|
|
4364
4377
|
* Additional Tailwind CSS classes.
|
|
4365
4378
|
*/
|
|
4366
4379
|
className?: string;
|
|
4380
|
+
/**
|
|
4381
|
+
* Inline styles. Supports the `--md-divider-thickness` CSS custom property
|
|
4382
|
+
* to override the default 1dp thickness.
|
|
4383
|
+
*/
|
|
4384
|
+
style?: DividerCSSProperties;
|
|
4367
4385
|
}
|
|
4368
4386
|
/**
|
|
4369
4387
|
* Props for the headless Divider primitive.
|
|
@@ -4375,7 +4393,7 @@ interface DividerProps {
|
|
|
4375
4393
|
* ```tsx
|
|
4376
4394
|
* <DividerHeadless
|
|
4377
4395
|
* orientation="horizontal"
|
|
4378
|
-
* className="
|
|
4396
|
+
* className="w-full h-px bg-outline-variant"
|
|
4379
4397
|
* />
|
|
4380
4398
|
* ```
|
|
4381
4399
|
*/
|
|
@@ -4390,40 +4408,40 @@ interface DividerHeadlessProps {
|
|
|
4390
4408
|
*/
|
|
4391
4409
|
className?: string;
|
|
4392
4410
|
/**
|
|
4393
|
-
*
|
|
4394
|
-
* rendering is handled by the styled `Divider` layer.
|
|
4411
|
+
* Inline styles forwarded to the underlying element.
|
|
4395
4412
|
*/
|
|
4396
|
-
|
|
4397
|
-
/**
|
|
4398
|
-
* Child content. Declared for interface extensibility;
|
|
4399
|
-
* the headless primitive itself is a void/leaf element.
|
|
4400
|
-
*/
|
|
4401
|
-
children?: React__default.ReactNode;
|
|
4413
|
+
style?: DividerCSSProperties;
|
|
4402
4414
|
}
|
|
4403
4415
|
|
|
4404
4416
|
/**
|
|
4405
4417
|
* Divider — MD3 Styled Component (Layer 3)
|
|
4406
4418
|
*
|
|
4407
4419
|
* A thin rule that separates content in lists and containers.
|
|
4408
|
-
* Supports horizontal/vertical orientations
|
|
4409
|
-
* optional subheader label that renders the text centered between two rules.
|
|
4420
|
+
* Supports horizontal/vertical orientations and four inset variants.
|
|
4410
4421
|
*
|
|
4411
4422
|
* Built on `DividerHeadless` (React Aria `useSeparator`) for accessible
|
|
4412
4423
|
* ARIA semantics. Uses CVA variants mapped to MD3 design tokens.
|
|
4413
4424
|
*
|
|
4425
|
+
* Thickness is controlled via the `--md-divider-thickness` CSS custom property
|
|
4426
|
+
* (default `1px`, matching the MD3 1dp spec). Override with a `style` prop:
|
|
4427
|
+
*
|
|
4428
|
+
* ```tsx
|
|
4429
|
+
* <Divider style={{ "--md-divider-thickness": "2px" }} />
|
|
4430
|
+
* ```
|
|
4431
|
+
*
|
|
4414
4432
|
* @example
|
|
4415
4433
|
* ```tsx
|
|
4416
4434
|
* // Full-bleed horizontal divider
|
|
4417
4435
|
* <Divider />
|
|
4418
4436
|
*
|
|
4419
|
-
* // Inset from
|
|
4437
|
+
* // Inset from inline-start (RTL-aware, 16dp)
|
|
4420
4438
|
* <Divider inset="start" />
|
|
4421
4439
|
*
|
|
4422
4440
|
* // Vertical divider inside a flex row
|
|
4423
4441
|
* <Divider orientation="vertical" />
|
|
4424
4442
|
*
|
|
4425
|
-
* //
|
|
4426
|
-
* <Divider
|
|
4443
|
+
* // Custom thickness
|
|
4444
|
+
* <Divider style={{ "--md-divider-thickness": "2px" }} />
|
|
4427
4445
|
* ```
|
|
4428
4446
|
*/
|
|
4429
4447
|
declare const Divider: React$1.ForwardRefExoticComponent<DividerProps & React$1.RefAttributes<HTMLElement>>;
|
|
@@ -4437,14 +4455,13 @@ declare const Divider: React$1.ForwardRefExoticComponent<DividerProps & React$1.
|
|
|
4437
4455
|
* - Horizontal → renders `<hr>` (implicit ARIA separator role)
|
|
4438
4456
|
* - Vertical → renders `<div>` with explicit `role="separator"`
|
|
4439
4457
|
*
|
|
4440
|
-
* Bring your own styles via the `className`
|
|
4458
|
+
* Bring your own styles via the `className` or `style` props.
|
|
4441
4459
|
*
|
|
4442
4460
|
* @example
|
|
4443
4461
|
* ```tsx
|
|
4444
|
-
* // Used inside the styled Divider, or directly for custom styling:
|
|
4445
4462
|
* <DividerHeadless
|
|
4446
4463
|
* orientation="horizontal"
|
|
4447
|
-
* className="
|
|
4464
|
+
* className="w-full h-px bg-outline-variant"
|
|
4448
4465
|
* />
|
|
4449
4466
|
* ```
|
|
4450
4467
|
*/
|
|
@@ -4453,17 +4470,33 @@ declare const DividerHeadless: React$1.ForwardRefExoticComponent<DividerHeadless
|
|
|
4453
4470
|
/**
|
|
4454
4471
|
* Material Design 3 Divider Variants (CVA)
|
|
4455
4472
|
*
|
|
4456
|
-
*
|
|
4457
|
-
*
|
|
4473
|
+
* Architecture: Variants only — the Divider is a static, non-interactive element
|
|
4474
|
+
* (no hover/focus/pressed states) so there is no state-layer machinery.
|
|
4458
4475
|
*
|
|
4459
|
-
*
|
|
4460
|
-
*
|
|
4461
|
-
*
|
|
4476
|
+
* Implementation strategy:
|
|
4477
|
+
* The border-* approach used previously required separate horizontal/vertical
|
|
4478
|
+
* logic and could not share a single thickness control. We now use a background
|
|
4479
|
+
* fill on a zero-border element, driven by a CSS custom property, which is the
|
|
4480
|
+
* same technique used by the official @material/web md-divider implementation.
|
|
4481
|
+
*
|
|
4482
|
+
* CSS variable:
|
|
4483
|
+
* --md-divider-thickness (default: 1px, MD3 spec: 1dp)
|
|
4484
|
+
* Override via style or a Tailwind arbitrary property:
|
|
4485
|
+
* <Divider style={{ "--md-divider-thickness": "2px" }} />
|
|
4462
4486
|
*
|
|
4463
|
-
*
|
|
4464
|
-
*
|
|
4465
|
-
*
|
|
4466
|
-
*
|
|
4487
|
+
* Orientation:
|
|
4488
|
+
* horizontal — full-width strip, height driven by --md-divider-thickness
|
|
4489
|
+
* vertical — self-stretches to container height, width driven by var
|
|
4490
|
+
*
|
|
4491
|
+
* Inset (MD3 spec: 16dp logical offset, RTL-aware):
|
|
4492
|
+
* start — ms-4 (inline-start, adapts to writing direction)
|
|
4493
|
+
* end — me-4 (inline-end)
|
|
4494
|
+
* both — ms-4 me-4
|
|
4495
|
+
*
|
|
4496
|
+
* MD3 Spec references:
|
|
4497
|
+
* Color: outline-variant (--md-sys-color-outline-variant)
|
|
4498
|
+
* Thickness: 1dp (no MD3 component token — exposed as a CSS var for parity with md-web)
|
|
4499
|
+
* Inset: 16dp (--md-comp-divider-leading-space / --md-comp-divider-trailing-space)
|
|
4467
4500
|
*/
|
|
4468
4501
|
declare const dividerVariants: (props?: ({
|
|
4469
4502
|
orientation?: "vertical" | "horizontal" | null | undefined;
|
package/dist/index.js
CHANGED
|
@@ -4713,13 +4713,21 @@ var HeadlessDrawerItem = forwardRef(
|
|
|
4713
4713
|
);
|
|
4714
4714
|
HeadlessDrawerItem.displayName = "HeadlessDrawerItem";
|
|
4715
4715
|
var DividerHeadless = forwardRef(
|
|
4716
|
-
({ orientation = "horizontal", className }, ref) => {
|
|
4716
|
+
({ orientation = "horizontal", className, style }, ref) => {
|
|
4717
4717
|
const { separatorProps } = useSeparator({
|
|
4718
4718
|
orientation,
|
|
4719
4719
|
elementType: orientation === "vertical" ? "div" : "hr"
|
|
4720
4720
|
});
|
|
4721
4721
|
if (orientation === "vertical") {
|
|
4722
|
-
return /* @__PURE__ */ jsx(
|
|
4722
|
+
return /* @__PURE__ */ jsx(
|
|
4723
|
+
"div",
|
|
4724
|
+
{
|
|
4725
|
+
...separatorProps,
|
|
4726
|
+
ref,
|
|
4727
|
+
className,
|
|
4728
|
+
style
|
|
4729
|
+
}
|
|
4730
|
+
);
|
|
4723
4731
|
}
|
|
4724
4732
|
return /* @__PURE__ */ jsx(
|
|
4725
4733
|
"hr",
|
|
@@ -4727,32 +4735,46 @@ var DividerHeadless = forwardRef(
|
|
|
4727
4735
|
...separatorProps,
|
|
4728
4736
|
"aria-orientation": "horizontal",
|
|
4729
4737
|
ref,
|
|
4730
|
-
className
|
|
4738
|
+
className,
|
|
4739
|
+
style
|
|
4731
4740
|
}
|
|
4732
4741
|
);
|
|
4733
4742
|
}
|
|
4734
4743
|
);
|
|
4735
4744
|
DividerHeadless.displayName = "DividerHeadless";
|
|
4736
4745
|
var dividerVariants = cva(
|
|
4737
|
-
|
|
4738
|
-
|
|
4746
|
+
[
|
|
4747
|
+
// Zero border — color comes from background fill (matches md-web strategy)
|
|
4748
|
+
"shrink-0 border-0",
|
|
4749
|
+
// MD3 outline-variant color token
|
|
4750
|
+
"bg-outline-variant",
|
|
4751
|
+
// Default thickness — consumers override via the CSS custom property
|
|
4752
|
+
"[--md-divider-thickness:1px]"
|
|
4753
|
+
],
|
|
4739
4754
|
{
|
|
4740
4755
|
variants: {
|
|
4741
4756
|
/**
|
|
4742
4757
|
* Controls the axis of the visual rule.
|
|
4758
|
+
*
|
|
4759
|
+
* horizontal — stretches to full inline width; block size is --md-divider-thickness
|
|
4760
|
+
* vertical — self-stretches to the block axis of the flex/grid parent;
|
|
4761
|
+
* inline size is --md-divider-thickness
|
|
4743
4762
|
*/
|
|
4744
4763
|
orientation: {
|
|
4745
|
-
horizontal: "
|
|
4746
|
-
vertical: "
|
|
4764
|
+
horizontal: "w-full h-[var(--md-divider-thickness)]",
|
|
4765
|
+
vertical: "self-stretch h-auto w-[var(--md-divider-thickness)]"
|
|
4747
4766
|
},
|
|
4748
4767
|
/**
|
|
4749
|
-
* Inset —
|
|
4768
|
+
* Inset — logical inline offset per MD3 spec (16dp = 1rem = Tailwind spacing-4).
|
|
4769
|
+
*
|
|
4770
|
+
* Uses logical properties (ms-N / me-N) for correct behaviour under RTL
|
|
4771
|
+
* writing modes (Arabic, Hebrew, etc.).
|
|
4750
4772
|
*/
|
|
4751
4773
|
inset: {
|
|
4752
4774
|
none: "",
|
|
4753
|
-
start: "
|
|
4754
|
-
end: "
|
|
4755
|
-
both: "
|
|
4775
|
+
start: "ms-4",
|
|
4776
|
+
end: "me-4",
|
|
4777
|
+
both: "ms-4 me-4"
|
|
4756
4778
|
}
|
|
4757
4779
|
},
|
|
4758
4780
|
defaultVariants: {
|
|
@@ -4762,44 +4784,15 @@ var dividerVariants = cva(
|
|
|
4762
4784
|
}
|
|
4763
4785
|
);
|
|
4764
4786
|
var Divider = forwardRef(
|
|
4765
|
-
({ orientation = "horizontal", inset = "none",
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
"aria-label": label,
|
|
4773
|
-
className: cn("flex items-center gap-4", className),
|
|
4774
|
-
children: [
|
|
4775
|
-
/* @__PURE__ */ jsx(
|
|
4776
|
-
DividerHeadless,
|
|
4777
|
-
{
|
|
4778
|
-
orientation: "horizontal",
|
|
4779
|
-
className: cn(dividerVariants({ orientation: "horizontal", inset: "none" }), "flex-1")
|
|
4780
|
-
}
|
|
4781
|
-
),
|
|
4782
|
-
/* @__PURE__ */ jsx("span", { className: "text-on-surface-variant text-label-large whitespace-nowrap", children: label }),
|
|
4783
|
-
/* @__PURE__ */ jsx(
|
|
4784
|
-
DividerHeadless,
|
|
4785
|
-
{
|
|
4786
|
-
orientation: "horizontal",
|
|
4787
|
-
className: cn(dividerVariants({ orientation: "horizontal", inset: "none" }), "flex-1")
|
|
4788
|
-
}
|
|
4789
|
-
)
|
|
4790
|
-
]
|
|
4791
|
-
}
|
|
4792
|
-
);
|
|
4787
|
+
({ orientation = "horizontal", inset = "none", className, style }, ref) => /* @__PURE__ */ jsx(
|
|
4788
|
+
DividerHeadless,
|
|
4789
|
+
{
|
|
4790
|
+
ref,
|
|
4791
|
+
orientation,
|
|
4792
|
+
className: cn(dividerVariants({ orientation, inset }), className),
|
|
4793
|
+
...style !== void 0 && { style }
|
|
4793
4794
|
}
|
|
4794
|
-
|
|
4795
|
-
DividerHeadless,
|
|
4796
|
-
{
|
|
4797
|
-
ref,
|
|
4798
|
-
orientation,
|
|
4799
|
-
className: cn(dividerVariants({ orientation, inset }), className)
|
|
4800
|
-
}
|
|
4801
|
-
);
|
|
4802
|
-
}
|
|
4795
|
+
)
|
|
4803
4796
|
);
|
|
4804
4797
|
Divider.displayName = "Divider";
|
|
4805
4798
|
var drawerVariants = cva(
|