@frontile/theme 0.18.12 → 0.18.14
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/declarations/components/app-layout.d.ts +2 -1
- package/declarations/components/app-layout.d.ts.map +1 -1
- package/declarations/components/badge.d.ts +1 -0
- package/declarations/components/badge.d.ts.map +1 -1
- package/declarations/components/icon.d.ts.map +1 -1
- package/declarations/components/tooltip.d.ts +1 -1
- package/declarations/components/tooltip.d.ts.map +1 -1
- package/declarations/plugin.d.ts.map +1 -1
- package/dist/index.js +95 -34
- package/dist/index.js.map +1 -1
- package/dist/plugin.js +15 -0
- package/dist/plugin.js.map +1 -1
- package/package.json +2 -2
|
@@ -152,9 +152,10 @@ declare const appLayout: import("tailwind-variants").TVReturnType<{
|
|
|
152
152
|
pageHeaderTitle: string;
|
|
153
153
|
pageHeaderDescription: string;
|
|
154
154
|
pageHeaderActions: string;
|
|
155
|
-
aside: string;
|
|
155
|
+
aside: string[];
|
|
156
156
|
mobileAside: string;
|
|
157
157
|
asideToggle: string[];
|
|
158
|
+
region: string;
|
|
158
159
|
skipLink: string[];
|
|
159
160
|
}, undefined, undefined, undefined, undefined>;
|
|
160
161
|
export { appLayout };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-layout.d.ts","sourceRoot":"","sources":["../../src/components/app-layout.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AA2K1C,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"app-layout.d.ts","sourceRoot":"","sources":["../../src/components/app-layout.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AA2K1C,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8CAmmBb,CAAC;AAEH,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,MAAM,MAAM,cAAc,GAAG,MAAM,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAChE,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/components/badge.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/components/badge.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8CAuOT,CAAC;AAEH,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/components/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/components/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAmF9C,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uIAuHR,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,IAAI,CAAC,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/components/tooltip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAE9C,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/components/tooltip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAE9C,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8CAkFX,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,OAAO,CAAC,CAAC;AAC3D,MAAM,MAAM,YAAY,GAAG,MAAM,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;AAE5D,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AASxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,iBAAS,QAAQ,CAAC,MAAM,GAAE,YAAiB,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AASxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,iBAAS,QAAQ,CAAC,MAAM,GAAE,YAAiB,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAuEtE;AAeD,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -423,9 +423,9 @@ const avatar = tv({
|
|
|
423
423
|
|
|
424
424
|
const badge = tv({
|
|
425
425
|
slots: {
|
|
426
|
-
//
|
|
426
|
+
// Semibold; the `text-strong-*` size tokens would set bold, so the
|
|
427
427
|
// weight is pinned here and only `value` is heavier.
|
|
428
|
-
base: 'inline-flex items-center whitespace-nowrap font-label font-
|
|
428
|
+
base: 'inline-flex items-center whitespace-nowrap font-label font-semibold leading-none',
|
|
429
429
|
// emphasized value, e.g. a price
|
|
430
430
|
value: 'font-bold tabular-nums leading-none',
|
|
431
431
|
// unit following the value, e.g. "/mo"
|
|
@@ -436,6 +436,7 @@ const badge = tv({
|
|
|
436
436
|
},
|
|
437
437
|
variants: {
|
|
438
438
|
variant: {
|
|
439
|
+
solid: '',
|
|
439
440
|
soft: '',
|
|
440
441
|
outline: ''
|
|
441
442
|
},
|
|
@@ -506,6 +507,51 @@ const badge = tv({
|
|
|
506
507
|
}
|
|
507
508
|
},
|
|
508
509
|
compoundVariants: [
|
|
510
|
+
// VARIANT: solid (filled). The fill is the color's DEFAULT level, as on
|
|
511
|
+
// Chip; neutral steps up to `-bolder` because its DEFAULT is too light to
|
|
512
|
+
// read as a fill. The dot follows the text color so it stays visible.
|
|
513
|
+
{
|
|
514
|
+
variant: 'solid',
|
|
515
|
+
class: {
|
|
516
|
+
dot: 'bg-current'
|
|
517
|
+
}
|
|
518
|
+
}, {
|
|
519
|
+
variant: 'solid',
|
|
520
|
+
color: 'neutral',
|
|
521
|
+
class: {
|
|
522
|
+
base: 'bg-neutral-bolder text-on-neutral-bolder'
|
|
523
|
+
}
|
|
524
|
+
}, {
|
|
525
|
+
variant: 'solid',
|
|
526
|
+
color: 'primary',
|
|
527
|
+
class: {
|
|
528
|
+
base: 'bg-primary text-on-primary'
|
|
529
|
+
}
|
|
530
|
+
}, {
|
|
531
|
+
variant: 'solid',
|
|
532
|
+
color: 'secondary',
|
|
533
|
+
class: {
|
|
534
|
+
base: 'bg-secondary text-on-secondary'
|
|
535
|
+
}
|
|
536
|
+
}, {
|
|
537
|
+
variant: 'solid',
|
|
538
|
+
color: 'tertiary',
|
|
539
|
+
class: {
|
|
540
|
+
base: 'bg-tertiary text-on-tertiary'
|
|
541
|
+
}
|
|
542
|
+
}, {
|
|
543
|
+
variant: 'solid',
|
|
544
|
+
color: 'success',
|
|
545
|
+
class: {
|
|
546
|
+
base: 'bg-success text-on-success'
|
|
547
|
+
}
|
|
548
|
+
}, {
|
|
549
|
+
variant: 'solid',
|
|
550
|
+
color: 'danger',
|
|
551
|
+
class: {
|
|
552
|
+
base: 'bg-danger text-on-danger'
|
|
553
|
+
}
|
|
554
|
+
},
|
|
509
555
|
// VARIANT: soft (tonal). One level above Chip's `soft` (`-subtle`).
|
|
510
556
|
{
|
|
511
557
|
variant: 'soft',
|
|
@@ -585,7 +631,7 @@ const badge = tv({
|
|
|
585
631
|
defaultVariants: {
|
|
586
632
|
size: 'xs',
|
|
587
633
|
color: 'neutral',
|
|
588
|
-
variant: '
|
|
634
|
+
variant: 'solid'
|
|
589
635
|
}
|
|
590
636
|
});
|
|
591
637
|
|
|
@@ -1410,7 +1456,10 @@ const BY_VARIANT = {
|
|
|
1410
1456
|
// A circle that centers an icon, sized from the design artifact: the circle
|
|
1411
1457
|
// diameter, the icon inside it, and for `plain` a tighter box with no circle.
|
|
1412
1458
|
// The icon is the `svg` the block contains, so it needs no size class of its
|
|
1413
|
-
// own.
|
|
1459
|
+
// own. Its size is important: a Font Awesome glyph gets an unlayered
|
|
1460
|
+
// `.svg-inline--fa { width; height }` from the library, which beats any layered
|
|
1461
|
+
// utility, so without `!` the glyph would keep Font Awesome's size.
|
|
1462
|
+
// These are the artifact's pixel values, not the `size-icon-*` ramp, which
|
|
1414
1463
|
// follows the label text. Outline draws its ring as an inset shadow in the
|
|
1415
1464
|
// icon color, 0.5px at 4xs up to 2.5px at 3xl.
|
|
1416
1465
|
//
|
|
@@ -1421,16 +1470,16 @@ const icon = tv({
|
|
|
1421
1470
|
base: 'box-border inline-flex shrink-0 items-center justify-center rounded-full align-middle',
|
|
1422
1471
|
variants: {
|
|
1423
1472
|
size: {
|
|
1424
|
-
'4xs': 'size-4 [&_svg]:size-[8px]',
|
|
1425
|
-
'3xs': 'size-5 [&_svg]:size-[10px]',
|
|
1426
|
-
'2xs': 'size-6 [&_svg]:size-[12px]',
|
|
1427
|
-
xs: 'size-8 [&_svg]:size-[16px]',
|
|
1428
|
-
sm: 'size-10 [&_svg]:size-[20px]',
|
|
1429
|
-
md: 'size-12 [&_svg]:size-[28px]',
|
|
1430
|
-
lg: 'size-16 [&_svg]:size-[32px]',
|
|
1431
|
-
xl: 'size-18 [&_svg]:size-[40px]',
|
|
1432
|
-
'2xl': 'size-20 [&_svg]:size-[48px]',
|
|
1433
|
-
'3xl': 'size-24 [&_svg]:size-[56px]'
|
|
1473
|
+
'4xs': 'size-4 [&_svg]:size-[8px]!',
|
|
1474
|
+
'3xs': 'size-5 [&_svg]:size-[10px]!',
|
|
1475
|
+
'2xs': 'size-6 [&_svg]:size-[12px]!',
|
|
1476
|
+
xs: 'size-8 [&_svg]:size-[16px]!',
|
|
1477
|
+
sm: 'size-10 [&_svg]:size-[20px]!',
|
|
1478
|
+
md: 'size-12 [&_svg]:size-[28px]!',
|
|
1479
|
+
lg: 'size-16 [&_svg]:size-[32px]!',
|
|
1480
|
+
xl: 'size-18 [&_svg]:size-[40px]!',
|
|
1481
|
+
'2xl': 'size-20 [&_svg]:size-[48px]!',
|
|
1482
|
+
'3xl': 'size-24 [&_svg]:size-[56px]!'
|
|
1434
1483
|
},
|
|
1435
1484
|
color: {
|
|
1436
1485
|
neutral: '',
|
|
@@ -3939,10 +3988,14 @@ const appLayout = tv({
|
|
|
3939
3988
|
// Literal `lg:block` here, not tied to `breakpoint`: the aside is a
|
|
3940
3989
|
// wide-viewport affordance regardless of where the sidebar collapses.
|
|
3941
3990
|
// Below `lg` the same block renders in a Drawer instead (`mobileAside`).
|
|
3942
|
-
|
|
3991
|
+
// Its `data-state` drives the motion (`Aside` keeps it mounted until the
|
|
3992
|
+
// exit ends); `data-animated=false` and reduced motion turn it off.
|
|
3993
|
+
aside: ['col-start-3 row-start-2 hidden w-72 shrink-0 overflow-y-auto overflow-x-clip p-4 font-body text-body-sm lg:block', 'data-[animated=true]:data-[state=open]:animate-[frontile-aside-in_200ms_ease-out]', 'data-[animated=true]:data-[state=closed]:animate-[frontile-aside-out_200ms_ease-in_forwards]', 'motion-reduce:animate-none'],
|
|
3943
3994
|
// The aside's `aside` element inside the drawer: as tall as the drawer.
|
|
3944
3995
|
mobileAside: 'min-h-0 flex-1 overflow-y-auto p-4 font-body text-body-sm',
|
|
3945
3996
|
asideToggle: iconButton,
|
|
3997
|
+
// A `layout.Region`: its children lay out as children of its parent.
|
|
3998
|
+
region: 'contents',
|
|
3946
3999
|
skipLink: [...focusVisibleRing, 'sr-only focus:not-sr-only', 'focus:absolute focus:start-2 focus:top-2 focus:z-50', 'focus:rounded-md focus:bg-surface-app focus:px-3 focus:py-2', 'focus:text-on-surface-app focus:shadow-md']
|
|
3947
4000
|
},
|
|
3948
4001
|
variants: {
|
|
@@ -4974,39 +5027,47 @@ const tooltip = tv({
|
|
|
4974
5027
|
// one wraps instead of running off the viewport. `origin-*` is keyed off
|
|
4975
5028
|
// the resolved placement the content carries as `data-placement`, so the
|
|
4976
5029
|
// enter transition grows out of the anchor rather than out of nowhere.
|
|
4977
|
-
|
|
5030
|
+
//
|
|
5031
|
+
// Type is the `body` role, not `label`: a tooltip is a sentence read in
|
|
5032
|
+
// passing, so it wants regular weight and running-text leading. `label`
|
|
5033
|
+
// is semibold at a leading of 1, which renders a short tip heavy and
|
|
5034
|
+
// packs a wrapped one into touching lines. `antialiased` keeps light
|
|
5035
|
+
// text on the dark fill from blooming on macOS.
|
|
5036
|
+
base: ['relative w-max max-w-xs rounded-md shadow-md overflow-visible', 'font-body antialiased', 'data-[placement^=top]:origin-bottom', 'data-[placement^=bottom]:origin-top', 'data-[placement^=left]:origin-right', 'data-[placement^=right]:origin-left'],
|
|
4978
5037
|
arrow: ''
|
|
4979
5038
|
},
|
|
4980
5039
|
variants: {
|
|
4981
5040
|
size: {
|
|
4982
5041
|
sm: {
|
|
4983
|
-
base: 'px-
|
|
5042
|
+
base: 'px-1.5 py-0.5 text-body-2xs'
|
|
4984
5043
|
},
|
|
4985
5044
|
md: {
|
|
4986
|
-
base: 'px-2
|
|
5045
|
+
base: 'px-2 py-1 text-body-xs'
|
|
4987
5046
|
},
|
|
4988
5047
|
lg: {
|
|
4989
|
-
base: 'px-
|
|
5048
|
+
base: 'px-2.5 py-1.5 text-body-sm'
|
|
4990
5049
|
}
|
|
4991
5050
|
},
|
|
4992
5051
|
// `bg-inherit` on the arrow (see `overlayArrow`) means each color only
|
|
4993
|
-
// has to state the background once, on `base`. The border is
|
|
4994
|
-
// both `base` and `arrow` for every color
|
|
4995
|
-
//
|
|
4996
|
-
//
|
|
4997
|
-
// `
|
|
4998
|
-
//
|
|
4999
|
-
//
|
|
5000
|
-
//
|
|
5001
|
-
//
|
|
5002
|
-
//
|
|
5003
|
-
//
|
|
5004
|
-
//
|
|
5005
|
-
// `
|
|
5052
|
+
// has to state the background once, on `base`. The border is cleared to
|
|
5053
|
+
// `border-transparent` on both `base` and `arrow` for every color. The
|
|
5054
|
+
// body needs it explicitly: `Content`'s classNames (`popover.gts`) run
|
|
5055
|
+
// this `base` class through the *`popover`* tv, whose own base carries
|
|
5056
|
+
// `border border-neutral-subtle` (`popover.ts`), and twMerge only drops
|
|
5057
|
+
// that when a later class from the same border-color group replaces it.
|
|
5058
|
+
// Leaving it would show a hairline on the body that the arrow lacks, a
|
|
5059
|
+
// seam at the join.
|
|
5060
|
+
//
|
|
5061
|
+
// `neutral` is a raised warm gray in *both* schemes rather than a
|
|
5062
|
+
// scheme-following surface. `surface-input` is pure black in dark mode,
|
|
5063
|
+
// which sits *below* a warm-black page and leaves a border to do all the
|
|
5064
|
+
// separating. `neutral-strong` (light) and `neutral-muted` (dark) resolve
|
|
5065
|
+
// to the same step of the gray ramp, so the tooltip reads as a lifted
|
|
5066
|
+
// chip on either ground, and its edge comes from the fill, not a border.
|
|
5006
5067
|
color: {
|
|
5007
5068
|
neutral: {
|
|
5008
|
-
base: 'bg-
|
|
5009
|
-
arrow: 'border-
|
|
5069
|
+
base: ['bg-neutral-strong text-on-neutral-strong border-transparent', 'dark:bg-neutral-muted dark:text-on-neutral-muted'],
|
|
5070
|
+
arrow: 'border-transparent'
|
|
5010
5071
|
},
|
|
5011
5072
|
primary: {
|
|
5012
5073
|
base: 'bg-primary text-on-primary border-transparent',
|