@zazz-ui/core 0.7.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUTHORING.md +21 -20
- package/CHANGELOG.md +151 -0
- package/README.md +4 -4
- package/dist/csp-DR-s45Kg.js +1 -0
- package/dist/sri.json +86 -85
- package/dist/zazz.css +1 -1
- package/dist/zazz.js +1 -1
- package/editor/zazz.css-data.json +4129 -1410
- package/editor/zazz.html-data.json +15 -3
- package/editor/zazz.language-data.json +99 -97
- package/editor/zazz.lint-data.json +1609 -1283
- package/package.json +9 -8
- package/src/base/_defaults.css +48 -2
- package/src/base/_properties-2xl.css +12 -0
- package/src/base/_properties-active.css +20 -0
- package/src/base/_properties-checked.css +20 -0
- package/src/base/_properties-current.css +20 -0
- package/src/base/_properties-disabled.css +20 -0
- package/src/base/_properties-focus-visible.css +20 -0
- package/src/base/_properties-focus-within.css +20 -0
- package/src/base/_properties-hover.css +20 -0
- package/src/base/_properties-lg.css +12 -0
- package/src/base/_properties-md.css +12 -0
- package/src/base/_properties-open.css +20 -0
- package/src/base/_properties-sm.css +12 -0
- package/src/base/_properties-starting.css +10 -0
- package/src/base/_properties-stuck.css +10 -0
- package/src/base/_properties-xl.css +12 -0
- package/src/base/_properties.css +46 -6
- package/src/base/_shadows.css +46 -0
- package/src/base/_utilities-box.css +182 -9
- package/src/base/_utilities-color.css +1 -0
- package/src/base/_utilities-effects.css +41 -139
- package/src/base/_utilities-flow.css +1 -0
- package/src/base/_utilities-grid.css +1 -0
- package/src/base/_utilities-margin.css +1 -0
- package/src/base/_utilities-pseudo.css +58 -4
- package/src/base/_utilities-sizing.css +1 -0
- package/src/base/_utilities-spacing.css +173 -0
- package/src/base/_utilities-tier-2xl.css +6 -0
- package/src/base/_utilities-tier-active.css +10 -0
- package/src/base/_utilities-tier-checked.css +10 -0
- package/src/base/_utilities-tier-current.css +10 -0
- package/src/base/_utilities-tier-disabled.css +10 -0
- package/src/base/_utilities-tier-focus-visible.css +10 -0
- package/src/base/_utilities-tier-focus-within.css +10 -0
- package/src/base/_utilities-tier-hover.css +10 -0
- package/src/base/_utilities-tier-lg.css +6 -0
- package/src/base/_utilities-tier-md.css +6 -0
- package/src/base/_utilities-tier-open.css +10 -0
- package/src/base/_utilities-tier-sm.css +6 -0
- package/src/base/_utilities-tier-starting.css +5 -0
- package/src/base/_utilities-tier-stuck.css +5 -0
- package/src/base/_utilities-tier-xl.css +6 -0
- package/src/base/_utilities-typography.css +1 -0
- package/src/base/_variables.css +5 -85
- package/src/base/kit-styling.d.ts.map +1 -1
- package/src/base/kit-styling.js +173 -136
- package/src/base/kit-styling.ts +173 -136
- package/src/base/reveal.d.ts +3 -3
- package/src/base/reveal.d.ts.map +1 -1
- package/src/base/reveal.js +34 -18
- package/src/base/reveal.ts +42 -20
- package/src/base/utilities.d.ts +18 -8
- package/src/base/utilities.d.ts.map +1 -1
- package/src/base/utilities.js +119 -19
- package/src/base/utilities.ts +145 -45
- package/src/index.css +1 -0
- package/src/manifest.d.ts.map +1 -1
- package/src/manifest.js +1 -0
- package/src/manifest.ts +1 -0
- package/src/primitives/avatar/avatar.html +2 -2
- package/src/primitives/badge/badge.css +17 -13
- package/src/primitives/button/button.css +17 -13
- package/src/primitives/button-group/button-group.css +13 -6
- package/src/primitives/callout/callout.css +6 -2
- package/src/primitives/card/card-subgrid.html +3 -3
- package/src/primitives/card/card.css +8 -4
- package/src/primitives/card/card.html +2 -2
- package/src/primitives/carousel/carousel.html +12 -12
- package/src/primitives/checkbox/checkbox.css +6 -2
- package/src/primitives/combobox/combobox.css +8 -4
- package/src/primitives/debug/audit-core.d.ts.map +1 -1
- package/src/primitives/debug/audit-core.js +8 -4
- package/src/primitives/debug/audit-core.ts +9 -4
- package/src/primitives/dialog/dialog-with-form.html +1 -1
- package/src/primitives/dialog/dialog.css +35 -14
- package/src/primitives/fields/fields.css +8 -4
- package/src/primitives/input/input.css +6 -2
- package/src/primitives/input-group/input-group.css +5 -1
- package/src/primitives/kbd/kbd.css +6 -2
- package/src/primitives/layout/layout.html +1 -1
- package/src/primitives/lightbox/lightbox.css +12 -16
- package/src/primitives/lightbox/lightbox.html +1 -1
- package/src/primitives/menu/menu.css +3 -3
- package/src/primitives/meter/meter.css +6 -2
- package/src/primitives/mobile-menu/mobile-menu.css +2 -2
- package/src/primitives/mobile-menu/mobile-menu.html +1 -1
- package/src/primitives/navigation-menu/navigation-menu-featured.html +1 -1
- package/src/primitives/navigation-menu/navigation-menu.css +4 -4
- package/src/primitives/navigation-menu/navigation-menu.html +1 -1
- package/src/primitives/otp/otp.css +6 -2
- package/src/primitives/password-group/password-group.css +5 -1
- package/src/primitives/popover/popover.css +8 -4
- package/src/primitives/progress/progress.css +6 -2
- package/src/primitives/radio/radio.css +6 -2
- package/src/primitives/reveal/reveal.css +17 -11
- package/src/primitives/scroll-fade/scroll-fade.css +16 -5
- package/src/primitives/select/select.css +15 -7
- package/src/primitives/slider/slider.css +7 -7
- package/src/primitives/switch/switch.css +6 -2
- package/src/primitives/tabs/tabs.css +10 -6
- package/src/primitives/tabs/tabs.html +6 -6
- package/src/primitives/textarea/textarea.css +6 -2
- package/src/primitives/toaster/toaster.css +2 -2
- package/src/primitives/toggle/toggle.css +9 -5
- package/src/primitives/toggle-group/toggle-group.css +13 -6
- package/src/primitives/toolbar/toolbar.html +1 -1
- package/src/primitives/tooltip/tooltip.css +6 -2
- package/src/primitives/utilities/aspect-ratio.html +3 -3
- package/src/primitives/utilities/basis.html +5 -5
- package/src/primitives/utilities/col-span.html +5 -5
- package/src/primitives/utilities/compose.html +2 -2
- package/src/primitives/utilities/flex-align.html +3 -3
- package/src/primitives/utilities/flex-direction.html +6 -6
- package/src/primitives/utilities/flex-grow.html +3 -3
- package/src/primitives/utilities/gap.html +9 -9
- package/src/primitives/utilities/grid-cols.html +6 -6
- package/src/primitives/utilities/grid-responsive.html +8 -8
- package/src/primitives/utilities/margin-auto.html +3 -3
- package/src/primitives/utilities/object-fit.html +3 -3
- package/src/primitives/utilities/order.html +3 -3
- package/src/primitives/utilities/overflow.html +2 -2
- package/src/primitives/utilities/padding-compose.html +6 -6
- package/src/primitives/utilities/padding.html +8 -8
- package/src/primitives/utilities/pile.html +1 -1
- package/src/primitives/utilities/position.html +2 -2
- package/src/primitives/utilities/responsive-flex.html +3 -3
- package/src/primitives/utilities/responsive-grid.html +8 -8
- package/src/primitives/utilities/size.html +5 -5
- package/src/primitives/utilities/width.html +5 -5
- package/dist/csp-D72qtdXZ.js +0 -1
package/src/base/utilities.ts
CHANGED
|
@@ -169,6 +169,11 @@ export interface Utility {
|
|
|
169
169
|
* inherit, for a switch that draws them on the element's children (`--divide`).
|
|
170
170
|
*/
|
|
171
171
|
inherits?: true;
|
|
172
|
+
/**
|
|
173
|
+
* What a dual utility's number multiplies (default `var(--spacing)`):
|
|
174
|
+
* `--radius: 2` is two steps of `--spacing` times `--radius-multiplier`.
|
|
175
|
+
*/
|
|
176
|
+
scale?: string;
|
|
172
177
|
/**
|
|
173
178
|
* No-base allowlist: the CSS initial value as a literal. A utility with
|
|
174
179
|
* `noBase` applies a tier without a base value wherever no kit rule sets its
|
|
@@ -190,18 +195,18 @@ export interface Utility {
|
|
|
190
195
|
*/
|
|
191
196
|
pseudo?: true;
|
|
192
197
|
/**
|
|
193
|
-
* Keyword shorthands: `--
|
|
198
|
+
* Keyword shorthands: `--font-weight: strong` reads as `var(--font-weight-strong)`.
|
|
194
199
|
* Each is an exact-value rule at the base and at every tier of the family, so
|
|
195
|
-
* it works in `--
|
|
200
|
+
* it works in `--font-weight--md: strong` too; any other value passes through as
|
|
196
201
|
* usual. A keyword that is a prefix of another must come first.
|
|
197
202
|
*/
|
|
198
203
|
aliases?: Readonly<Record<string, string>>;
|
|
199
204
|
}
|
|
200
205
|
|
|
201
206
|
/**
|
|
202
|
-
* The utilities that compose into one `box-shadow` (
|
|
203
|
-
* composite's chains all end in a literal, so a tier alone
|
|
204
|
-
* a no-base utility.
|
|
207
|
+
* The utilities that compose into one `box-shadow` (the rings, shadow, and
|
|
208
|
+
* elevation): the composite's chains all end in a literal, so a tier alone
|
|
209
|
+
* works on them, like a no-base utility.
|
|
205
210
|
*/
|
|
206
211
|
export const BOX_SHADOW_COMPOSITE = [
|
|
207
212
|
"shadow",
|
|
@@ -209,6 +214,7 @@ export const BOX_SHADOW_COMPOSITE = [
|
|
|
209
214
|
"ring-color",
|
|
210
215
|
"ring-offset",
|
|
211
216
|
"ring-offset-color",
|
|
217
|
+
"elevation",
|
|
212
218
|
] as const;
|
|
213
219
|
|
|
214
220
|
/**
|
|
@@ -227,17 +233,15 @@ export const SHORTHAND_OF: Readonly<Record<string, readonly string[]>> = {
|
|
|
227
233
|
"gap-y": ["gap"],
|
|
228
234
|
basis: ["flex"],
|
|
229
235
|
shrink: ["flex"],
|
|
236
|
+
"radius-t": ["radius"],
|
|
237
|
+
"radius-b": ["radius"],
|
|
238
|
+
"radius-l": ["radius"],
|
|
239
|
+
"radius-r": ["radius"],
|
|
230
240
|
};
|
|
231
241
|
|
|
232
242
|
/** Gradient types: `--bg-<type>` emits `<type>-gradient(<prelude>, <--bg-stops>)`. */
|
|
233
243
|
export const GRADIENT_TYPES = ["linear", "radial", "conic"] as const;
|
|
234
244
|
|
|
235
|
-
/** The size scale shared by the token keywords (`--shadow: md`). */
|
|
236
|
-
export const SIZE_KEYWORDS = ["2xs", "xs", "sm", "md", "lg", "xl", "2xl"] as const;
|
|
237
|
-
|
|
238
|
-
/** `--shadow: md` → `var(--shadow-md)`. */
|
|
239
|
-
const SHADOWS = Object.fromEntries(SIZE_KEYWORDS.map((size) => [size, `var(--shadow-${size})`]));
|
|
240
|
-
|
|
241
245
|
/**
|
|
242
246
|
* `--font-weight: strong` → `var(--font-weight-strong)`: the role weights, so a
|
|
243
247
|
* theme's weights reach utilities. Standard names (`medium`) are not keywords:
|
|
@@ -312,6 +316,14 @@ export const BORDER_SIDES = [
|
|
|
312
316
|
export const SIZING_KEYWORDS = ["auto", "fit-content", "min-content", "max-content"] as const;
|
|
313
317
|
export const MARGIN_KEYWORDS = ["auto"] as const;
|
|
314
318
|
|
|
319
|
+
/**
|
|
320
|
+
* Keywords the side insets (`--top --right --bottom --left`) take besides a
|
|
321
|
+
* length: `auto` releases a side at a breakpoint (`--bottom: 0; --bottom--lg:
|
|
322
|
+
* auto` sticks to the bottom below lg only). Each keyword costs ~16 [style*=]
|
|
323
|
+
* substrings (SPEC claim 16), so the axis and `--inset` shorthands go without.
|
|
324
|
+
*/
|
|
325
|
+
export const INSET_KEYWORDS = ["auto"] as const;
|
|
326
|
+
|
|
315
327
|
/**
|
|
316
328
|
* Track-list keywords `--grid-cols` / `--grid-rows` take besides a count. `none`
|
|
317
329
|
* is not one: `--template-cols: none` says the same, and every keyword
|
|
@@ -524,30 +536,54 @@ export const UTILITIES: readonly Utility[] = [
|
|
|
524
536
|
["pl", "padding-inline-start"],
|
|
525
537
|
["pr", "padding-inline-end"],
|
|
526
538
|
] as const
|
|
527
|
-
).map(
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
}),
|
|
536
|
-
),
|
|
539
|
+
).map(([name, property]): Utility => ({
|
|
540
|
+
name,
|
|
541
|
+
pseudo: true,
|
|
542
|
+
properties: [property],
|
|
543
|
+
mode: "dual",
|
|
544
|
+
family: "spacing",
|
|
545
|
+
noBase: "0",
|
|
546
|
+
})),
|
|
537
547
|
{ name: "gap", properties: ["gap"], mode: "dual", family: "spacing", noBase: "0" },
|
|
538
548
|
{ name: "gap-x", properties: ["column-gap"], mode: "dual", family: "spacing", noBase: "0" },
|
|
539
549
|
{ name: "gap-y", properties: ["row-gap"], mode: "dual", family: "spacing", noBase: "0" },
|
|
540
|
-
{
|
|
550
|
+
{
|
|
551
|
+
name: "inset",
|
|
552
|
+
pseudo: true,
|
|
553
|
+
properties: ["inset"],
|
|
554
|
+
mode: "dual",
|
|
555
|
+
family: "spacing",
|
|
556
|
+
},
|
|
541
557
|
// axis insets: left + right and top + bottom (logical, like the sides)
|
|
542
|
-
{
|
|
543
|
-
|
|
544
|
-
|
|
558
|
+
{
|
|
559
|
+
name: "inset-x",
|
|
560
|
+
pseudo: true,
|
|
561
|
+
properties: ["inset-inline"],
|
|
562
|
+
mode: "dual",
|
|
563
|
+
family: "spacing",
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
name: "inset-y",
|
|
567
|
+
pseudo: true,
|
|
568
|
+
properties: ["inset-block"],
|
|
569
|
+
mode: "dual",
|
|
570
|
+
family: "spacing",
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
name: "top",
|
|
574
|
+
pseudo: true,
|
|
575
|
+
properties: ["inset-block-start"],
|
|
576
|
+
mode: "dual",
|
|
577
|
+
family: "spacing",
|
|
578
|
+
keywords: INSET_KEYWORDS,
|
|
579
|
+
},
|
|
545
580
|
{
|
|
546
581
|
name: "bottom",
|
|
547
582
|
pseudo: true,
|
|
548
583
|
properties: ["inset-block-end"],
|
|
549
584
|
mode: "dual",
|
|
550
585
|
family: "spacing",
|
|
586
|
+
keywords: INSET_KEYWORDS,
|
|
551
587
|
},
|
|
552
588
|
{
|
|
553
589
|
name: "left",
|
|
@@ -555,6 +591,7 @@ export const UTILITIES: readonly Utility[] = [
|
|
|
555
591
|
properties: ["inset-inline-start"],
|
|
556
592
|
mode: "dual",
|
|
557
593
|
family: "spacing",
|
|
594
|
+
keywords: INSET_KEYWORDS,
|
|
558
595
|
},
|
|
559
596
|
{
|
|
560
597
|
name: "right",
|
|
@@ -562,6 +599,7 @@ export const UTILITIES: readonly Utility[] = [
|
|
|
562
599
|
properties: ["inset-inline-end"],
|
|
563
600
|
mode: "dual",
|
|
564
601
|
family: "spacing",
|
|
602
|
+
keywords: INSET_KEYWORDS,
|
|
565
603
|
},
|
|
566
604
|
// margin: dual mode plus `auto`
|
|
567
605
|
{ name: "m", properties: ["margin"], mode: "dual", family: "margin", keywords: MARGIN_KEYWORDS },
|
|
@@ -736,16 +774,14 @@ export const UTILITIES: readonly Utility[] = [
|
|
|
736
774
|
// into background-image. `--bg: none` also clears background-image.
|
|
737
775
|
// No tiers: a gradient rarely changes per state or breakpoint, and every tier
|
|
738
776
|
// of four utilities cost 1 KB; `--bg--<tier>: none` still clears one.
|
|
739
|
-
...GRADIENT_TYPES.map(
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
}),
|
|
748
|
-
),
|
|
777
|
+
...GRADIENT_TYPES.map((type): Utility => ({
|
|
778
|
+
name: `bg-${type}`,
|
|
779
|
+
properties: [],
|
|
780
|
+
mode: "raw",
|
|
781
|
+
family: "color",
|
|
782
|
+
emit: "none",
|
|
783
|
+
tiers: "none",
|
|
784
|
+
})),
|
|
749
785
|
{ name: "bg-stops", properties: [], mode: "raw", family: "color", emit: "none", tiers: "none" },
|
|
750
786
|
{
|
|
751
787
|
name: "border-color",
|
|
@@ -772,9 +808,13 @@ export const UTILITIES: readonly Utility[] = [
|
|
|
772
808
|
// read them after the all-sides longhands, so --border-color beats --border.
|
|
773
809
|
// A side takes only the shorthand (`--border-b: 1`, `--border-t: red`):
|
|
774
810
|
// per-side width and color longhands were dropped as too rare for their cost
|
|
775
|
-
...BORDER_SHORTHANDS.map(
|
|
776
|
-
|
|
777
|
-
|
|
811
|
+
...BORDER_SHORTHANDS.map((name): Utility => ({
|
|
812
|
+
name,
|
|
813
|
+
properties: [],
|
|
814
|
+
mode: "raw",
|
|
815
|
+
family: "color",
|
|
816
|
+
emit: "border",
|
|
817
|
+
})),
|
|
778
818
|
// effects: states; ring* and shadow compose into one box-shadow
|
|
779
819
|
{
|
|
780
820
|
name: "opacity",
|
|
@@ -784,19 +824,54 @@ export const UTILITIES: readonly Utility[] = [
|
|
|
784
824
|
family: "effects",
|
|
785
825
|
noBase: "1",
|
|
786
826
|
},
|
|
827
|
+
{
|
|
828
|
+
name: "filter",
|
|
829
|
+
pseudo: true,
|
|
830
|
+
properties: ["filter"],
|
|
831
|
+
mode: "raw",
|
|
832
|
+
family: "effects",
|
|
833
|
+
noBase: "none",
|
|
834
|
+
},
|
|
835
|
+
// a height: a four-layer box-shadow with a negative spread, drawn with the elevation
|
|
836
|
+
// formula (generate-utilities.ts) in --shadow-angle's light and --shadow-tint; shares
|
|
837
|
+
// one box-shadow with --ring* and --shadow (an explicit --shadow wins)
|
|
838
|
+
{
|
|
839
|
+
name: "elevation",
|
|
840
|
+
properties: [],
|
|
841
|
+
mode: "raw",
|
|
842
|
+
family: "effects",
|
|
843
|
+
tiers: "both",
|
|
844
|
+
noBase: "0",
|
|
845
|
+
emit: "none",
|
|
846
|
+
},
|
|
847
|
+
{
|
|
848
|
+
name: "backdrop-filter",
|
|
849
|
+
pseudo: true,
|
|
850
|
+
properties: ["backdrop-filter"],
|
|
851
|
+
mode: "raw",
|
|
852
|
+
family: "effects",
|
|
853
|
+
noBase: "none",
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
name: "mix-blend",
|
|
857
|
+
pseudo: true,
|
|
858
|
+
properties: ["mix-blend-mode"],
|
|
859
|
+
mode: "keyword",
|
|
860
|
+
family: "effects",
|
|
861
|
+
noBase: "normal",
|
|
862
|
+
},
|
|
787
863
|
{
|
|
788
864
|
name: "shadow",
|
|
789
865
|
properties: [],
|
|
790
866
|
mode: "raw",
|
|
791
867
|
family: "effects",
|
|
792
868
|
emit: "none",
|
|
793
|
-
aliases: SHADOWS,
|
|
794
869
|
},
|
|
795
|
-
// the shadow color for an element and its subtree:
|
|
796
|
-
// --shadow-* tokens wherever this is set, so
|
|
797
|
-
{ name: "shadow-
|
|
870
|
+
// the shadow color for an element and its subtree: _shadows.css re-declares the
|
|
871
|
+
// --shadow-* tokens wherever this is set, so var() and primitive shadows follow
|
|
872
|
+
{ name: "shadow-tint", properties: [], mode: "raw", family: "box", emit: "none" },
|
|
798
873
|
// the shadow's cast direction: the --shadow-* tokens rotate their offsets by it
|
|
799
|
-
// (0deg casts down, clockwise), re-declared where it is set (
|
|
874
|
+
// (0deg casts down, clockwise), re-declared where it is set (_shadows.css)
|
|
800
875
|
{
|
|
801
876
|
name: "shadow-angle",
|
|
802
877
|
properties: [],
|
|
@@ -886,13 +961,38 @@ export const UTILITIES: readonly Utility[] = [
|
|
|
886
961
|
tiers: "both",
|
|
887
962
|
},
|
|
888
963
|
// box: no tiers
|
|
964
|
+
// a number is that many --spacing steps times --radius-multiplier, like the
|
|
965
|
+
// --radius-* tokens (`--radius: 2.5` is --radius-md); `full` is the pill token
|
|
889
966
|
{
|
|
890
|
-
name: "
|
|
967
|
+
name: "radius",
|
|
891
968
|
properties: ["border-radius"],
|
|
892
|
-
mode: "
|
|
969
|
+
mode: "dual",
|
|
893
970
|
family: "box",
|
|
971
|
+
tiers: "both",
|
|
972
|
+
noBase: "0",
|
|
894
973
|
pseudo: true,
|
|
974
|
+
scale: "var(--spacing) * var(--radius-multiplier)",
|
|
975
|
+
aliases: { full: "var(--radius-full)" },
|
|
895
976
|
},
|
|
977
|
+
// two logical corners each (Tailwind's rounded-t/-b/-l/-r), after --radius so they
|
|
978
|
+
// win over it; l and r follow the writing direction
|
|
979
|
+
...(
|
|
980
|
+
[
|
|
981
|
+
["radius-t", ["border-start-start-radius", "border-start-end-radius"]],
|
|
982
|
+
["radius-b", ["border-end-start-radius", "border-end-end-radius"]],
|
|
983
|
+
["radius-l", ["border-start-start-radius", "border-end-start-radius"]],
|
|
984
|
+
["radius-r", ["border-start-end-radius", "border-end-end-radius"]],
|
|
985
|
+
] as const
|
|
986
|
+
).map(([name, properties]): Utility => ({
|
|
987
|
+
name,
|
|
988
|
+
properties,
|
|
989
|
+
mode: "dual",
|
|
990
|
+
family: "box",
|
|
991
|
+
tiers: "breakpoints",
|
|
992
|
+
noBase: "0",
|
|
993
|
+
scale: "var(--spacing) * var(--radius-multiplier)",
|
|
994
|
+
aliases: { full: "var(--radius-full)" },
|
|
995
|
+
})),
|
|
896
996
|
{ name: "overflow", properties: ["overflow"], mode: "keyword", family: "box" },
|
|
897
997
|
{
|
|
898
998
|
name: "overflow-x",
|
package/src/index.css
CHANGED
package/src/manifest.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["manifest.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AAIH;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAIlC,yEAAyE;AACzE,MAAM,WAAW,cAAc;IAC7B,6EAA6E;IAC7E,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,qDAAqD;IACrD,EAAE,EAAE,MAAM,EAAE,CAAC;IACb;;;;OAIG;IACH,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,0EAA0E;IAC1E,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB;;;;;OAKG;IACH,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,uDAAuD;IACvD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,uGAAuG;IACvG,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAgBD;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CA8erD,CAAC;AAIF;;;;;;GAMG;AACH;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["manifest.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AAIH;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAIlC,yEAAyE;AACzE,MAAM,WAAW,cAAc;IAC7B,6EAA6E;IAC7E,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,qDAAqD;IACrD,EAAE,EAAE,MAAM,EAAE,CAAC;IACb;;;;OAIG;IACH,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,0EAA0E;IAC1E,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB;;;;;OAKG;IACH,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,uDAAuD;IACvD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,uGAAuG;IACvG,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAgBD;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CA8erD,CAAC;AAIF;;;;;;GAMG;AACH;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,EAQhC,CAAC;AAEF,iFAAiF;AACjF,eAAO,MAAM,aAAa,EAAE,MAAM,EA4CjC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,EAMhC,CAAC;AAEF,0EAA0E;AAC1E,MAAM,WAAW,eAAe;IAC9B,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,iFAAiF;IACjF,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;CAC7C;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,eAAe,EAE3C,CAAC;AAEF,yGAAyG;AACzG,MAAM,WAAW,eAAe;IAC9B,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB;;;;OAIG;IACH,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,eAAe,EAE3C,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,SAAS,EAAE,MAAM,EAErB,CAAC;AAEV,eAAO,MAAM,iBAAiB,EAAE,MAAM,EA0CrC,CAAC;AAIF;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAoBxD;AAID,MAAM,MAAM,aAAa,GACrB,cAAc,GACd,UAAU,GACV,SAAS,GACT,iBAAiB,GACjB,OAAO,GACP,QAAQ,GACR,UAAU,GACV,UAAU,GACV,UAAU,GACV,MAAM,GACN,aAAa,GACb,KAAK,GACL,UAAU,GACV,MAAM,GACN,SAAS,CAAC;AAEd;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,CAAC,CAmC/E,CAAC"}
|
package/src/manifest.js
CHANGED
package/src/manifest.ts
CHANGED
|
@@ -589,6 +589,7 @@ export const PRIMITIVES: Record<string, PrimitiveEntry> = {
|
|
|
589
589
|
export const BASE_CSS_PRE: string[] = [
|
|
590
590
|
"base/_layers.css",
|
|
591
591
|
"base/_variables.css",
|
|
592
|
+
"base/_shadows.css",
|
|
592
593
|
"base/_breakpoints.css",
|
|
593
594
|
"base/_reset.css",
|
|
594
595
|
"base/_typography.css",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
--bg: var(--color-background);
|
|
15
15
|
--border-color: var(--color-border);
|
|
16
16
|
--border-width: 1px;
|
|
17
|
-
--
|
|
17
|
+
--radius: full;
|
|
18
18
|
--overflow: clip;
|
|
19
19
|
"
|
|
20
20
|
>
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
--bg: var(--color-background);
|
|
92
92
|
--border-color: var(--color-border);
|
|
93
93
|
--border-width: 1px;
|
|
94
|
-
--
|
|
94
|
+
--radius: full;
|
|
95
95
|
--overflow: clip;
|
|
96
96
|
"
|
|
97
97
|
>
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
--ui-badge-gap: var(--spacing);
|
|
42
42
|
--ui-badge-px: calc(var(--spacing) * 1.25);
|
|
43
43
|
--ui-badge-h: calc(var(--spacing) * 5);
|
|
44
|
-
--ui-badge-
|
|
44
|
+
--ui-badge-radius: var(--radius-sm);
|
|
45
45
|
|
|
46
46
|
--ui-badge-icon-size: calc(var(--spacing) * 3);
|
|
47
47
|
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
inherits: false;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
@property --_badge-
|
|
149
|
+
@property --_badge-radius {
|
|
150
150
|
syntax: "*";
|
|
151
151
|
inherits: false;
|
|
152
152
|
}
|
|
@@ -204,7 +204,11 @@
|
|
|
204
204
|
--_border-color-resolved,
|
|
205
205
|
var(--_badge-border-color, var(--ui-badge-border-color))
|
|
206
206
|
);
|
|
207
|
-
|
|
207
|
+
--_radius-len: var(--_radius-resolved, var(--_badge-radius, var(--ui-badge-radius)));
|
|
208
|
+
--_radius-num: var(--_radius-resolved, var(--_badge-radius, var(--ui-badge-radius)));
|
|
209
|
+
border-radius: calc(
|
|
210
|
+
var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-multiplier)
|
|
211
|
+
);
|
|
208
212
|
|
|
209
213
|
color: var(--_text-resolved, var(--_badge-text, var(--ui-badge-text)));
|
|
210
214
|
background-color: var(--_bg-resolved, var(--_badge-bg, var(--ui-badge-bg)));
|
|
@@ -280,9 +284,9 @@
|
|
|
280
284
|
}
|
|
281
285
|
|
|
282
286
|
:where([data-ui~="badge"]):is(button, a[href]):focus-visible:not(
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
287
|
+
:disabled,
|
|
288
|
+
[aria-disabled="true"]
|
|
289
|
+
) {
|
|
286
290
|
--_ring-offset-width: var(--ring-offset-width);
|
|
287
291
|
--_ring-width: abs(var(--_focus-ring-w, var(--ring-width)));
|
|
288
292
|
|
|
@@ -313,8 +317,8 @@
|
|
|
313
317
|
|
|
314
318
|
:where([data-ui~="badge"][data-badge-variant="primary"]) {
|
|
315
319
|
--_badge-bg: var(--color-primary);
|
|
316
|
-
--_badge-bg--hover: oklch(from var(--color-primary) l c h / 0.
|
|
317
|
-
--_badge-bg--active: oklch(from var(--color-primary) l c h / 0.
|
|
320
|
+
--_badge-bg--hover: oklch(from var(--color-primary) l c h / 0.8);
|
|
321
|
+
--_badge-bg--active: oklch(from var(--color-primary) l c h / 0.7);
|
|
318
322
|
|
|
319
323
|
--_badge-text: var(--color-primary-foreground);
|
|
320
324
|
--_badge-text--hover: var(--color-primary-foreground);
|
|
@@ -327,8 +331,8 @@
|
|
|
327
331
|
|
|
328
332
|
:where([data-ui~="badge"][data-badge-variant="secondary"]) {
|
|
329
333
|
--_badge-bg: var(--color-secondary);
|
|
330
|
-
--_badge-bg--hover: oklch(from var(--color-secondary) l c h / 0.
|
|
331
|
-
--_badge-bg--active: oklch(from var(--color-secondary) l c h / 0.
|
|
334
|
+
--_badge-bg--hover: oklch(from var(--color-secondary) l c h / 0.8);
|
|
335
|
+
--_badge-bg--active: oklch(from var(--color-secondary) l c h / 0.7);
|
|
332
336
|
|
|
333
337
|
--_badge-text: var(--color-secondary-foreground);
|
|
334
338
|
--_badge-text--hover: var(--color-secondary-foreground);
|
|
@@ -341,8 +345,8 @@
|
|
|
341
345
|
|
|
342
346
|
:where([data-ui~="badge"][data-badge-variant="tertiary"]) {
|
|
343
347
|
--_badge-bg: var(--color-tertiary);
|
|
344
|
-
--_badge-bg--hover: oklch(from var(--color-tertiary) l c h / 0.
|
|
345
|
-
--_badge-bg--active: oklch(from var(--color-tertiary) l c h / 0.
|
|
348
|
+
--_badge-bg--hover: oklch(from var(--color-tertiary) l c h / 0.8);
|
|
349
|
+
--_badge-bg--active: oklch(from var(--color-tertiary) l c h / 0.7);
|
|
346
350
|
|
|
347
351
|
--_badge-text: var(--color-tertiary-foreground);
|
|
348
352
|
--_badge-text--hover: var(--color-tertiary-foreground);
|
|
@@ -468,7 +472,7 @@
|
|
|
468
472
|
--_badge-border-style: none;
|
|
469
473
|
|
|
470
474
|
--_badge-px: 0;
|
|
471
|
-
--_badge-
|
|
475
|
+
--_badge-radius: 0;
|
|
472
476
|
|
|
473
477
|
--_badge-shadow: 0 0 transparent;
|
|
474
478
|
}
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
--ui-button-gap: var(--spacing);
|
|
47
47
|
--ui-button-px: var(--ui-field-px);
|
|
48
48
|
--ui-button-min-h: var(--ui-field-h);
|
|
49
|
-
--ui-button-
|
|
49
|
+
--ui-button-radius: var(--ui-field-radius);
|
|
50
50
|
|
|
51
51
|
--ui-button-icon-size: var(--ui-field-icon-size);
|
|
52
52
|
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
inherits: false;
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
@property --_button-
|
|
155
|
+
@property --_button-radius {
|
|
156
156
|
syntax: "*";
|
|
157
157
|
inherits: false;
|
|
158
158
|
}
|
|
@@ -210,7 +210,11 @@
|
|
|
210
210
|
--_border-color-resolved,
|
|
211
211
|
var(--_button-border-color, var(--ui-button-border-color))
|
|
212
212
|
);
|
|
213
|
-
|
|
213
|
+
--_radius-len: var(--_radius-resolved, var(--_button-radius, var(--ui-button-radius)));
|
|
214
|
+
--_radius-num: var(--_radius-resolved, var(--_button-radius, var(--ui-button-radius)));
|
|
215
|
+
border-radius: calc(
|
|
216
|
+
var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-multiplier)
|
|
217
|
+
);
|
|
214
218
|
|
|
215
219
|
color: var(--_text-resolved, var(--_button-text, var(--ui-button-text)));
|
|
216
220
|
background-color: var(--_bg-resolved, var(--_button-bg, var(--ui-button-bg)));
|
|
@@ -333,8 +337,8 @@
|
|
|
333
337
|
|
|
334
338
|
:where([data-ui~="button"][data-button-variant="primary"]) {
|
|
335
339
|
--_button-bg: var(--color-primary);
|
|
336
|
-
--_button-bg--hover: oklch(from var(--color-primary) l c h / 0.
|
|
337
|
-
--_button-bg--active: oklch(from var(--color-primary) l c h / 0.
|
|
340
|
+
--_button-bg--hover: oklch(from var(--color-primary) l c h / 0.8);
|
|
341
|
+
--_button-bg--active: oklch(from var(--color-primary) l c h / 0.7);
|
|
338
342
|
|
|
339
343
|
--_button-text: var(--color-primary-foreground);
|
|
340
344
|
--_button-text--hover: var(--color-primary-foreground);
|
|
@@ -349,8 +353,8 @@
|
|
|
349
353
|
|
|
350
354
|
:where([data-ui~="button"][data-button-variant="secondary"]) {
|
|
351
355
|
--_button-bg: var(--color-secondary);
|
|
352
|
-
--_button-bg--hover: oklch(from var(--color-secondary) l c h / 0.
|
|
353
|
-
--_button-bg--active: oklch(from var(--color-secondary) l c h / 0.
|
|
356
|
+
--_button-bg--hover: oklch(from var(--color-secondary) l c h / 0.8);
|
|
357
|
+
--_button-bg--active: oklch(from var(--color-secondary) l c h / 0.7);
|
|
354
358
|
|
|
355
359
|
--_button-text: var(--color-secondary-foreground);
|
|
356
360
|
--_button-text--hover: var(--color-secondary-foreground);
|
|
@@ -365,8 +369,8 @@
|
|
|
365
369
|
|
|
366
370
|
:where([data-ui~="button"][data-button-variant="tertiary"]) {
|
|
367
371
|
--_button-bg: var(--color-tertiary);
|
|
368
|
-
--_button-bg--hover: oklch(from var(--color-tertiary) l c h / 0.
|
|
369
|
-
--_button-bg--active: oklch(from var(--color-tertiary) l c h / 0.
|
|
372
|
+
--_button-bg--hover: oklch(from var(--color-tertiary) l c h / 0.8);
|
|
373
|
+
--_button-bg--active: oklch(from var(--color-tertiary) l c h / 0.7);
|
|
370
374
|
|
|
371
375
|
--_button-text: var(--color-tertiary-foreground);
|
|
372
376
|
--_button-text--hover: var(--color-tertiary-foreground);
|
|
@@ -499,7 +503,7 @@
|
|
|
499
503
|
|
|
500
504
|
--_button-min-h: 0;
|
|
501
505
|
--_button-px: 0;
|
|
502
|
-
--_button-
|
|
506
|
+
--_button-radius: 0;
|
|
503
507
|
|
|
504
508
|
--_button-shadow: 0 0 transparent;
|
|
505
509
|
}
|
|
@@ -511,14 +515,14 @@
|
|
|
511
515
|
:where([data-ui~="button"][data-button-size="sm"]) {
|
|
512
516
|
--_button-min-h: calc(var(--spacing) * 6);
|
|
513
517
|
--_button-px: calc(var(--spacing) * 2);
|
|
514
|
-
--_button-
|
|
518
|
+
--_button-radius: var(--radius-sm);
|
|
515
519
|
--_button-font-size: var(--font-size-xs);
|
|
516
520
|
}
|
|
517
521
|
|
|
518
522
|
:where(
|
|
519
523
|
:is(ui-button-group, [data-ui~="button-group"]):has([data-ui~="button"][data-button-size="sm"])
|
|
520
524
|
) {
|
|
521
|
-
--_button-group-
|
|
525
|
+
--_button-group-radius: var(--radius-sm);
|
|
522
526
|
}
|
|
523
527
|
|
|
524
528
|
:where([data-ui~="button"][data-button-size="icon"]) {
|
|
@@ -531,7 +535,7 @@
|
|
|
531
535
|
:where([data-ui~="button"][data-button-size="icon-sm"]) {
|
|
532
536
|
--_button-min-h: calc(var(--spacing) * 6);
|
|
533
537
|
--_button-px: calc(var(--spacing) * 2);
|
|
534
|
-
--_button-
|
|
538
|
+
--_button-radius: var(--radius-sm);
|
|
535
539
|
/* the hook, not a private: it must inherit to reach the icon */
|
|
536
540
|
--ui-button-icon-size: calc(var(--spacing) * 3.5);
|
|
537
541
|
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
|
|
12
12
|
@layer variables {
|
|
13
13
|
:root {
|
|
14
|
-
--ui-button-group-
|
|
14
|
+
--ui-button-group-radius: var(--ui-button-radius);
|
|
15
15
|
--ui-button-group-bg: var(--color-card);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
@property --_button-group-
|
|
19
|
+
@property --_button-group-radius {
|
|
20
20
|
syntax: "*";
|
|
21
21
|
inherits: false;
|
|
22
22
|
}
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
BUTTON GROUP
|
|
32
32
|
|
|
33
33
|
Joins adjacent controls (buttons, and any child it wraps) into a single
|
|
34
|
-
segmented unit. Children keep their own --ui-button-
|
|
34
|
+
segmented unit. Children keep their own --ui-button-radius, so the outer corners
|
|
35
35
|
follow the buttons' size preset automatically; only the *inner* corners are
|
|
36
36
|
squared off and the doubled border is collapsed by dropping
|
|
37
37
|
each later control's leading border (no overlap).
|
|
@@ -42,9 +42,16 @@
|
|
|
42
42
|
inline-size: fit-content;
|
|
43
43
|
/* stretch so mixed-height children share one edge */
|
|
44
44
|
align-items: stretch;
|
|
45
|
-
|
|
46
|
-
--
|
|
47
|
-
var(--_button-group-
|
|
45
|
+
--_radius-len: var(
|
|
46
|
+
--_radius-resolved,
|
|
47
|
+
var(--_button-group-radius, var(--ui-button-group-radius))
|
|
48
|
+
);
|
|
49
|
+
--_radius-num: var(
|
|
50
|
+
--_radius-resolved,
|
|
51
|
+
var(--_button-group-radius, var(--ui-button-group-radius))
|
|
52
|
+
);
|
|
53
|
+
border-radius: calc(
|
|
54
|
+
var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-multiplier)
|
|
48
55
|
);
|
|
49
56
|
background-color: var(--_bg-resolved, var(--_button-group-bg, var(--ui-button-group-bg)));
|
|
50
57
|
position: relative;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
:root {
|
|
27
27
|
--ui-callout-bg: var(--color-card);
|
|
28
28
|
--ui-callout-text: var(--color-card-foreground);
|
|
29
|
-
--ui-callout-
|
|
29
|
+
--ui-callout-radius: var(--radius-md);
|
|
30
30
|
--ui-callout-shadow: none;
|
|
31
31
|
|
|
32
32
|
--ui-callout-border-width: 1px;
|
|
@@ -72,7 +72,11 @@
|
|
|
72
72
|
--_border-color-resolved,
|
|
73
73
|
var(--_callout-border-color, var(--ui-callout-border-color))
|
|
74
74
|
);
|
|
75
|
-
|
|
75
|
+
--_radius-len: var(--_radius-resolved, var(--ui-callout-radius));
|
|
76
|
+
--_radius-num: var(--_radius-resolved, var(--ui-callout-radius));
|
|
77
|
+
border-radius: calc(
|
|
78
|
+
var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-multiplier)
|
|
79
|
+
);
|
|
76
80
|
box-shadow: var(--_shadow-resolved, var(--ui-callout-shadow));
|
|
77
81
|
}
|
|
78
82
|
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
--row-span: 1;
|
|
29
29
|
--template-rows: subgrid;
|
|
30
30
|
--aspect: 3 / 2;
|
|
31
|
-
--
|
|
31
|
+
--radius-t: 2.5;
|
|
32
32
|
--overflow: clip;
|
|
33
33
|
"
|
|
34
34
|
>
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
--size: 11;
|
|
129
129
|
--border-color: var(--color-border);
|
|
130
130
|
--border-width: 1px;
|
|
131
|
-
--
|
|
131
|
+
--radius: full;
|
|
132
132
|
--overflow: clip;
|
|
133
133
|
"
|
|
134
134
|
>
|
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
--row-span: 1;
|
|
216
216
|
--template-rows: subgrid;
|
|
217
217
|
--aspect: 3 / 2;
|
|
218
|
-
--
|
|
218
|
+
--radius-t: 2.5;
|
|
219
219
|
--overflow: clip;
|
|
220
220
|
"
|
|
221
221
|
>
|