@frontile/theme 0.18.0-beta.4 → 0.18.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.
@@ -0,0 +1,161 @@
1
+ import type { VariantProps } from 'tailwind-variants';
2
+ /**
3
+ * The separator is rendered *inside* each `<li>` and hidden on the last one
4
+ * with `group-last/item:hidden` (the `<li>` carries `group/item`), so neither
5
+ * authoring form has to know which crumb is last.
6
+ */
7
+ declare const breadcrumbs: import("tailwind-variants").TVReturnType<{
8
+ size: {
9
+ sm: {
10
+ list: string;
11
+ item: string;
12
+ separator: string;
13
+ ellipsis: string;
14
+ };
15
+ md: {
16
+ list: string;
17
+ item: string;
18
+ separator: string;
19
+ ellipsis: string;
20
+ };
21
+ lg: {
22
+ list: string;
23
+ item: string;
24
+ separator: string;
25
+ ellipsis: string;
26
+ };
27
+ };
28
+ color: {
29
+ neutral: {
30
+ link: string;
31
+ };
32
+ primary: {
33
+ link: string;
34
+ };
35
+ danger: {
36
+ link: string;
37
+ };
38
+ };
39
+ underline: {
40
+ always: {
41
+ link: string;
42
+ };
43
+ hover: {
44
+ link: string;
45
+ };
46
+ none: {
47
+ link: string;
48
+ };
49
+ };
50
+ }, {
51
+ base: string;
52
+ list: string;
53
+ item: string;
54
+ link: string[];
55
+ separator: string;
56
+ ellipsis: string;
57
+ }, undefined, {
58
+ size: {
59
+ sm: {
60
+ list: string;
61
+ item: string;
62
+ separator: string;
63
+ ellipsis: string;
64
+ };
65
+ md: {
66
+ list: string;
67
+ item: string;
68
+ separator: string;
69
+ ellipsis: string;
70
+ };
71
+ lg: {
72
+ list: string;
73
+ item: string;
74
+ separator: string;
75
+ ellipsis: string;
76
+ };
77
+ };
78
+ color: {
79
+ neutral: {
80
+ link: string;
81
+ };
82
+ primary: {
83
+ link: string;
84
+ };
85
+ danger: {
86
+ link: string;
87
+ };
88
+ };
89
+ underline: {
90
+ always: {
91
+ link: string;
92
+ };
93
+ hover: {
94
+ link: string;
95
+ };
96
+ none: {
97
+ link: string;
98
+ };
99
+ };
100
+ }, {
101
+ base: string;
102
+ list: string;
103
+ item: string;
104
+ link: string[];
105
+ separator: string;
106
+ ellipsis: string;
107
+ }, import("tailwind-variants").TVReturnTypeLike<{
108
+ size: {
109
+ sm: {
110
+ list: string;
111
+ item: string;
112
+ separator: string;
113
+ ellipsis: string;
114
+ };
115
+ md: {
116
+ list: string;
117
+ item: string;
118
+ separator: string;
119
+ ellipsis: string;
120
+ };
121
+ lg: {
122
+ list: string;
123
+ item: string;
124
+ separator: string;
125
+ ellipsis: string;
126
+ };
127
+ };
128
+ color: {
129
+ neutral: {
130
+ link: string;
131
+ };
132
+ primary: {
133
+ link: string;
134
+ };
135
+ danger: {
136
+ link: string;
137
+ };
138
+ };
139
+ underline: {
140
+ always: {
141
+ link: string;
142
+ };
143
+ hover: {
144
+ link: string;
145
+ };
146
+ none: {
147
+ link: string;
148
+ };
149
+ };
150
+ }, {
151
+ base: string;
152
+ list: string;
153
+ item: string;
154
+ link: string[];
155
+ separator: string;
156
+ ellipsis: string;
157
+ }>>;
158
+ export type BreadcrumbsVariants = VariantProps<typeof breadcrumbs>;
159
+ export type BreadcrumbsSlots = keyof ReturnType<typeof breadcrumbs>;
160
+ export { breadcrumbs };
161
+ //# sourceMappingURL=breadcrumbs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/components/breadcrumbs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;;;GAIG;AACH,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwGf,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,WAAW,CAAC,CAAC;AACnE,MAAM,MAAM,gBAAgB,GAAG,MAAM,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -1,4 +1,31 @@
1
1
  import { type VariantProps } from '../../tw';
2
+ /**
3
+ * A note on the colour levels used for text and borders below.
4
+ *
5
+ * The `soft` level is a *translucent* fill (10-25% alpha) -- it exists to tint
6
+ * a surface, and composites to ~1.1-1.5:1 against whatever is behind it. Used
7
+ * as a border or a text colour it is effectively invisible, which is what the
8
+ * invalid field state used to be in dark mode. Borders and rings here take an
9
+ * opaque level instead, and the translucent-halo job is left to `muted`, which
10
+ * is what `ring-focus` (`--color-primary-muted`) already resolves to.
11
+ *
12
+ * For text, the `DEFAULT` level of the tint-shaped categories (`secondary`,
13
+ * `tertiary`, `success`, `warning`) is a light fill colour, not an ink: in
14
+ * light mode it lands at 1.3-2.6:1, well under AA. `alert.ts` hit the same
15
+ * thing first and settled on `bolder` for success/warning, `firm` for danger
16
+ * and `neutral`, and plain `DEFAULT` for primary; the levels below match it so
17
+ * that the same status reads the same weight in an Alert and in form feedback.
18
+ *
19
+ * Two known failures are deliberately left alone, because changing either one
20
+ * restyles every field in the library and is a design decision rather than a
21
+ * bug:
22
+ * - the resting `border-neutral-soft` is 1.37:1 in light mode, against the
23
+ * 3:1 WCAG 1.4.11 asks of a control's visual boundary (and in light mode
24
+ * `surface-input` equals `surface-app`, so the border is the only boundary);
25
+ * - `placeholder-neutral` is 3.13:1 in light mode, against AA's 4.5:1.
26
+ * `tests/unit/forms/forms-contrast-test.ts` in test-app asserts everything
27
+ * else, and documents these two as the deliberate gaps.
28
+ */
2
29
  declare const label: import("tailwind-variants").TVReturnType<{
3
30
  size: {
4
31
  sm: {
@@ -45,7 +72,7 @@ declare const formDescription: import("tailwind-variants").TVReturnType<{
45
72
  md: "";
46
73
  lg: "text-body-sm";
47
74
  };
48
- }, undefined, "text-neutral font-body text-body-2xs pb-1 last:pb-0", {
75
+ }, undefined, "text-neutral-firm font-body text-body-2xs pb-1 last:pb-0", {
49
76
  size: {
50
77
  sm: "text-body-2xs";
51
78
  md: "";
@@ -61,11 +88,11 @@ declare const formDescription: import("tailwind-variants").TVReturnType<{
61
88
  declare const formFeedback: import("tailwind-variants").TVReturnType<{
62
89
  status: {
63
90
  primary: "text-primary";
64
- secondary: "text-secondary";
65
- tertiary: "text-tertiary";
66
- success: "text-success";
67
- danger: "text-danger";
68
- warning: "text-warning";
91
+ secondary: "text-secondary-bolder";
92
+ tertiary: "text-tertiary-strong";
93
+ success: "text-success-bolder";
94
+ danger: "text-danger-firm";
95
+ warning: "text-warning-bolder";
69
96
  };
70
97
  size: {
71
98
  sm: "text-body-2xs";
@@ -75,11 +102,11 @@ declare const formFeedback: import("tailwind-variants").TVReturnType<{
75
102
  }, undefined, "font-body text-body-2xs pt-1", {
76
103
  status: {
77
104
  primary: "text-primary";
78
- secondary: "text-secondary";
79
- tertiary: "text-tertiary";
80
- success: "text-success";
81
- danger: "text-danger";
82
- warning: "text-warning";
105
+ secondary: "text-secondary-bolder";
106
+ tertiary: "text-tertiary-strong";
107
+ success: "text-success-bolder";
108
+ danger: "text-danger-firm";
109
+ warning: "text-warning-bolder";
83
110
  };
84
111
  size: {
85
112
  sm: "text-body-2xs";
@@ -89,11 +116,11 @@ declare const formFeedback: import("tailwind-variants").TVReturnType<{
89
116
  }, undefined, import("tailwind-variants").TVReturnTypeLike<{
90
117
  status: {
91
118
  primary: "text-primary";
92
- secondary: "text-secondary";
93
- tertiary: "text-tertiary";
94
- success: "text-success";
95
- danger: "text-danger";
96
- warning: "text-warning";
119
+ secondary: "text-secondary-bolder";
120
+ tertiary: "text-tertiary-strong";
121
+ success: "text-success-bolder";
122
+ danger: "text-danger-firm";
123
+ warning: "text-warning-bolder";
97
124
  };
98
125
  size: {
99
126
  sm: "text-body-2xs";
@@ -1 +1 @@
1
- {"version":3,"file":"forms.d.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AO,YAAY,CAAC,CAAC;AACrE,MAAM,MAAM,iBAAiB,GAAG,MAAM,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AACtE,MAAM,MAAM,oBAAoB,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC;AACrE,MAAM,MAAM,iBAAiB,GAAG,MAAM,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AACtE,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC;AACvE,MAAM,MAAM,kBAAkB,GAAG,MAAM,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACxE,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;AACjE,MAAM,MAAM,eAAe,GAAG,MAAM,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAClE,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,WAAW,CAAC,CAAC;AAC9D,MAAM,MAAM,WAAW,GAAG,MAAM,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAC/D,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;AACjE,MAAM,MAAM,eAAe,GAAG,MAAM,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAElE,OAAO,EACL,KAAK,EACL,eAAe,EACf,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,UAAU,EACV,WAAW,EACX,UAAU,EACX,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export * from './alert';
2
2
  export * from './avatar';
3
+ export * from './breadcrumbs';
3
4
  export * from './button';
4
5
  export * from './chip';
5
6
  export * from './progress-bar';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB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C;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAE1B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AAEpC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -351,6 +351,103 @@ const avatar = tv({
351
351
  }
352
352
  });
353
353
 
354
+ /**
355
+ * The separator is rendered *inside* each `<li>` and hidden on the last one
356
+ * with `group-last/item:hidden` (the `<li>` carries `group/item`), so neither
357
+ * authoring form has to know which crumb is last.
358
+ */
359
+ const breadcrumbs = tv({
360
+ slots: {
361
+ // Layout only. The nav landmark carries no ink of its own; every colour
362
+ // decision belongs to `link` so the two stay in one place.
363
+ base: '',
364
+ // `flex-wrap`, so a long trail wraps onto a second line rather than
365
+ // overflowing its container. Breadcrumbs have no horizontal-scroll
366
+ // affordance, so overflow would simply hide the current page.
367
+ list: 'flex flex-wrap items-center',
368
+ item: 'group/item inline-flex items-center',
369
+ link: [...focusVisibleRing, 'inline-flex items-center gap-1 rounded-sm',
370
+ // `firm`, not `DEFAULT`: as ink on the light surface `neutral` is 3.13:1,
371
+ // under WCAG AA. `pagination.ts` uses `firm` for the same job.
372
+ 'text-neutral-firm', 'transition-colors duration-200', 'motion-reduce:transition-none',
373
+ // The current crumb is the only weight change in the trail: colour alone
374
+ // is not a sufficient distinction, and it is the one crumb a reader
375
+ // scans for.
376
+ 'data-[current=true]:font-medium', 'aria-disabled:cursor-not-allowed aria-disabled:opacity-disabled aria-disabled:pointer-events-none'],
377
+ // The crumb's own ink, deliberately: receding a separator with colour costs
378
+ // more contrast than it buys -- `neutral` lands at 2.95:1 on a gray-50
379
+ // canvas. A thin chevron already reads lighter than a word beside it.
380
+ separator: 'shrink-0 text-neutral-firm group-last/item:hidden',
381
+ // The crumbs' weight, since it stands in for crumbs, but no focus ring and
382
+ // no hover: it is a gap marker, and an affordance would promise a
383
+ // destination it does not have.
384
+ ellipsis: 'inline-flex shrink-0 items-center justify-center select-none text-neutral-firm'
385
+ },
386
+ variants: {
387
+ // Written as whole literal class strings rather than composed from parts --
388
+ // Tailwind generates nothing from an interpolated class, so the scanner has
389
+ // to see each one intact.
390
+ size: {
391
+ sm: {
392
+ list: 'gap-1 text-body-xs',
393
+ item: 'gap-1',
394
+ separator: '[&_svg]:size-3.5',
395
+ ellipsis: 'text-body-xs'
396
+ },
397
+ md: {
398
+ list: 'gap-1.5 text-body-sm',
399
+ item: 'gap-1.5',
400
+ separator: '[&_svg]:size-4',
401
+ ellipsis: 'text-body-sm'
402
+ },
403
+ lg: {
404
+ list: 'gap-2 text-body-md',
405
+ item: 'gap-2',
406
+ separator: '[&_svg]:size-5',
407
+ ellipsis: 'text-body-md'
408
+ }
409
+ },
410
+ // Hover and current share one ink, so the row reads as a single control.
411
+ //
412
+ // Three categories, not the usual seven: the other four are fill colours,
413
+ // meant to carry `text-on-*` on top of them the way `pagination.ts` uses
414
+ // them. As ink they fail at every level -- `success` tops out at 2.30:1.
415
+ color: {
416
+ neutral: {
417
+ link: 'hover:text-neutral-strong data-[current=true]:text-neutral-strong'
418
+ },
419
+ primary: {
420
+ link: 'hover:text-primary-firm data-[current=true]:text-primary-firm'
421
+ },
422
+ danger: {
423
+ link: 'hover:text-danger-firm data-[current=true]:text-danger-firm'
424
+ }
425
+ },
426
+ // The current crumb is never underlined in any mode: it is the page you
427
+ // are on, and underlining it would advertise a navigation that does
428
+ // nothing.
429
+ underline: {
430
+ always: {
431
+ link: 'underline underline-offset-2 data-[current=true]:no-underline'
432
+ },
433
+ hover: {
434
+ link: 'no-underline underline-offset-2 hover:underline data-[current=true]:hover:no-underline'
435
+ },
436
+ none: {
437
+ link: 'no-underline hover:no-underline'
438
+ }
439
+ }
440
+ },
441
+ defaultVariants: {
442
+ size: 'md',
443
+ color: 'neutral',
444
+ // Not `ExternalLink`'s `always`: breadcrumbs sit in their own nav row where
445
+ // the layout already marks them as links, whereas an external link lives in
446
+ // running text and has to announce itself.
447
+ underline: 'hover'
448
+ }
449
+ });
450
+
354
451
  const baseButton = tv({
355
452
  base: ['inline-flex items-center justify-center', '[&_svg]:size-[1em]', 'font-header', 'border', 'border-transparent', 'disabled:cursor-not-allowed', 'disabled:opacity-disabled', ...focusVisibleRing],
356
453
  variants: {
@@ -3224,11 +3321,38 @@ const notificationCard = tv({
3224
3321
  }
3225
3322
  });
3226
3323
 
3324
+ /**
3325
+ * A note on the colour levels used for text and borders below.
3326
+ *
3327
+ * The `soft` level is a *translucent* fill (10-25% alpha) -- it exists to tint
3328
+ * a surface, and composites to ~1.1-1.5:1 against whatever is behind it. Used
3329
+ * as a border or a text colour it is effectively invisible, which is what the
3330
+ * invalid field state used to be in dark mode. Borders and rings here take an
3331
+ * opaque level instead, and the translucent-halo job is left to `muted`, which
3332
+ * is what `ring-focus` (`--color-primary-muted`) already resolves to.
3333
+ *
3334
+ * For text, the `DEFAULT` level of the tint-shaped categories (`secondary`,
3335
+ * `tertiary`, `success`, `warning`) is a light fill colour, not an ink: in
3336
+ * light mode it lands at 1.3-2.6:1, well under AA. `alert.ts` hit the same
3337
+ * thing first and settled on `bolder` for success/warning, `firm` for danger
3338
+ * and `neutral`, and plain `DEFAULT` for primary; the levels below match it so
3339
+ * that the same status reads the same weight in an Alert and in form feedback.
3340
+ *
3341
+ * Two known failures are deliberately left alone, because changing either one
3342
+ * restyles every field in the library and is a design decision rather than a
3343
+ * bug:
3344
+ * - the resting `border-neutral-soft` is 1.37:1 in light mode, against the
3345
+ * 3:1 WCAG 1.4.11 asks of a control's visual boundary (and in light mode
3346
+ * `surface-input` equals `surface-app`, so the border is the only boundary);
3347
+ * - `placeholder-neutral` is 3.13:1 in light mode, against AA's 4.5:1.
3348
+ * `tests/unit/forms/forms-contrast-test.ts` in test-app asserts everything
3349
+ * else, and documents these two as the deliberate gaps.
3350
+ */
3227
3351
  const label = tv({
3228
3352
  slots: {
3229
3353
  // label text role (Open Sans semibold, tight leading)
3230
3354
  base: 'text-neutral-bolder inline-block font-label text-label-sm pb-2',
3231
- asterisk: 'text-danger'
3355
+ asterisk: 'text-danger-firm'
3232
3356
  },
3233
3357
  variants: {
3234
3358
  size: {
@@ -3246,8 +3370,10 @@ const label = tv({
3246
3370
  }
3247
3371
  });
3248
3372
  const formDescription = tv({
3249
- // help/description text — body role
3250
- base: 'text-neutral font-body text-body-2xs pb-1 last:pb-0',
3373
+ // help/description text — body role. `text-neutral` (the DEFAULT level) is
3374
+ // only ~3:1 on a light surface; `firm` clears AA in both modes, and is the
3375
+ // same level `alert.ts` uses for its description.
3376
+ base: 'text-neutral-firm font-body text-body-2xs pb-1 last:pb-0',
3251
3377
  variants: {
3252
3378
  size: {
3253
3379
  sm: 'text-body-2xs',
@@ -3266,12 +3392,15 @@ const formFeedback = tv({
3266
3392
  // `status`, not `color`: this value also decides whether the message is
3267
3393
  // announced assertively. See `isError` in form-feedback.gts.
3268
3394
  status: {
3395
+ // Levels, not bare categories: see the note above `label`. Each one is
3396
+ // the lightest level that clears AA against both `surface-app` and
3397
+ // `surface-card` in light *and* dark mode.
3269
3398
  primary: 'text-primary',
3270
- secondary: 'text-secondary',
3271
- tertiary: 'text-tertiary',
3272
- success: 'text-success',
3273
- danger: 'text-danger',
3274
- warning: 'text-warning'
3399
+ secondary: 'text-secondary-bolder',
3400
+ tertiary: 'text-tertiary-strong',
3401
+ success: 'text-success-bolder',
3402
+ danger: 'text-danger-firm',
3403
+ warning: 'text-warning-bolder'
3275
3404
  },
3276
3405
  size: {
3277
3406
  sm: 'text-body-2xs',
@@ -3296,7 +3425,9 @@ const input = tv({
3296
3425
  endContent: 'absolute inset-y-0 right-0 flex items-center',
3297
3426
  input: ['appearance-none', 'flex-1', 'w-full', ...fieldShell, 'text-neutral-strong', 'placeholder-neutral',
3298
3427
  // body role family; single-line controls keep tight leading (not the body relaxed leading)
3299
- 'font-body text-base text-left', 'leading-tight', 'focus:ring-3', 'focus:ring-focus', 'focus:outline-hidden', 'focus:border-primary-soft', 'disabled:border-neutral-subtle disabled:text-neutral-soft', 'aria-invalid:border-danger-soft', 'aria-invalid:focus:ring-danger-soft']
3428
+ 'font-body text-base text-left', 'leading-tight', 'focus:ring-3', 'focus:ring-focus', 'focus:outline-hidden', 'focus:border-primary', 'disabled:border-neutral-subtle disabled:text-neutral-soft', 'aria-invalid:border-danger',
3429
+ // The invalid counterpart of `ring-focus`, which is `primary-muted`.
3430
+ 'aria-invalid:focus:ring-danger-muted']
3300
3431
  },
3301
3432
  variants: {
3302
3433
  size: {
@@ -3441,14 +3572,14 @@ const inputOtp = tv({
3441
3572
  // z-10 keeps the active cell's ring from being clipped by its neighbour.
3442
3573
  isActive: {
3443
3574
  true: {
3444
- cell: 'z-10 border-primary-soft ring-3 ring-focus'
3575
+ cell: 'z-10 border-primary ring-3 ring-focus'
3445
3576
  }
3446
3577
  },
3447
- // Mirrors `input`'s `aria-invalid:focus:ring-danger-soft`: a focused invalid
3448
- // cell must ring red, not keep the neutral focus ring.
3578
+ // Mirrors `input`'s `aria-invalid:focus:ring-danger-muted`: a focused
3579
+ // invalid cell must ring red, not keep the neutral focus ring.
3449
3580
  isInvalid: {
3450
3581
  true: {
3451
- cell: 'border-danger-soft ring-danger-soft'
3582
+ cell: 'border-danger ring-danger-muted'
3452
3583
  }
3453
3584
  },
3454
3585
  isDisabled: {
@@ -3574,7 +3705,7 @@ const select = tv({
3574
3705
  // `aria-invalid:` and `disabled:` only match the element carrying them.
3575
3706
  hasChips: {
3576
3707
  true: {
3577
- chipsField: [...fieldShell, 'flex', 'flex-wrap', 'items-center', 'gap-1', 'w-full', 'cursor-default', 'focus-within:ring-3', 'focus-within:ring-focus', 'focus-within:border-primary-soft', 'data-[invalid=true]:border-danger-soft', 'data-[invalid=true]:focus-within:ring-danger-soft', 'data-[disabled=true]:border-neutral-subtle', 'data-[disabled=true]:text-neutral-soft']
3708
+ chipsField: [...fieldShell, 'flex', 'flex-wrap', 'items-center', 'gap-1', 'w-full', 'cursor-default', 'focus-within:ring-3', 'focus-within:ring-focus', 'focus-within:border-primary', 'data-[invalid=true]:border-danger', 'data-[invalid=true]:focus-within:ring-danger-muted', 'data-[disabled=true]:border-neutral-subtle', 'data-[disabled=true]:text-neutral-soft']
3578
3709
  },
3579
3710
  false: {
3580
3711
  chipsField: 'flex w-full min-w-0'
@@ -3963,6 +4094,7 @@ var components = /*#__PURE__*/Object.freeze({
3963
4094
  autocomplete: autocomplete,
3964
4095
  avatar: avatar,
3965
4096
  backdrop: backdrop,
4097
+ breadcrumbs: breadcrumbs,
3966
4098
  button: button,
3967
4099
  buttonGroup: buttonGroup,
3968
4100
  buttonSpinner: buttonSpinner,