@zazz-ui/core 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUTHORING.md +29 -14
- package/CHANGELOG.md +162 -0
- package/README.md +6 -5
- package/dist/{csp-LRx1fynI.js → csp-C1f62vyT.js} +1 -1
- package/dist/sri.json +70 -65
- package/dist/zazz.css +1 -1
- package/dist/zazz.js +1 -1
- package/editor/zazz.css-data.json +74 -2
- package/editor/zazz.html-data.json +119 -79
- package/editor/zazz.language-data.json +402 -314
- package/editor/zazz.lint-data.json +1752 -1731
- package/package.json +2 -1
- package/src/base/_defaults.css +11 -11
- package/src/base/_reset.css +2 -10
- package/src/base/_typography.css +17 -568
- package/src/base/_utilities-box.css +17 -17
- package/src/base/_utilities-pseudo.css +2 -2
- package/src/base/_variables.css +142 -97
- package/src/base/carousel-scroll.d.ts +1 -1
- package/src/base/carousel-scroll.js +6 -6
- package/src/base/carousel-scroll.ts +6 -6
- package/src/base/carousel.d.ts.map +1 -1
- package/src/base/carousel.js +6 -2
- package/src/base/carousel.ts +6 -2
- package/src/base/csp.js +2 -2
- package/src/base/csp.ts +2 -2
- package/src/base/kit-styling.d.ts.map +1 -1
- package/src/base/kit-styling.js +186 -183
- package/src/base/kit-styling.ts +186 -183
- package/src/base/navigation.d.ts +2 -2
- package/src/base/navigation.d.ts.map +1 -1
- package/src/base/navigation.js +25 -21
- package/src/base/navigation.ts +27 -21
- package/src/base/utilities.d.ts +1 -1
- package/src/base/utilities.d.ts.map +1 -1
- package/src/base/utilities.js +20 -4
- package/src/base/utilities.ts +21 -5
- package/src/base/zazz-element.d.ts +1 -1
- package/src/base/zazz-element.js +1 -1
- package/src/base/zazz-element.ts +1 -1
- package/src/{base → behaviors}/gesture.d.ts +4 -3
- package/src/behaviors/gesture.d.ts.map +1 -0
- package/src/{base → behaviors}/gesture.js +1 -1
- package/src/{base → behaviors}/gesture.ts +5 -4
- package/src/{base → behaviors}/hotkeys.d.ts +2 -1
- package/src/behaviors/hotkeys.d.ts.map +1 -0
- package/src/{base → behaviors}/hotkeys.ts +2 -1
- package/src/behaviors/list-navigation.d.ts +64 -0
- package/src/behaviors/list-navigation.d.ts.map +1 -0
- package/src/behaviors/list-navigation.js +66 -0
- package/src/behaviors/list-navigation.ts +107 -0
- package/src/{base → behaviors}/typeahead.d.ts +3 -1
- package/src/behaviors/typeahead.d.ts.map +1 -0
- package/src/{base → behaviors}/typeahead.js +12 -17
- package/src/{base → behaviors}/typeahead.ts +12 -17
- package/src/css-properties.json +704 -0
- package/src/index.css +7 -0
- package/src/manifest.d.ts +20 -9
- package/src/manifest.d.ts.map +1 -1
- package/src/manifest.js +125 -37
- package/src/manifest.ts +132 -38
- package/src/primitives/accordion/accordion.json +49 -0
- package/src/primitives/alert-dialog/alert-dialog.json +35 -0
- package/src/primitives/autocomplete/autocomplete.d.ts +2 -2
- package/src/primitives/autocomplete/autocomplete.d.ts.map +1 -1
- package/src/primitives/autocomplete/autocomplete.js +2 -2
- package/src/primitives/autocomplete/autocomplete.json +65 -0
- package/src/primitives/autocomplete/autocomplete.ts +2 -2
- package/src/primitives/avatar/avatar.css +108 -0
- package/src/primitives/avatar/avatar.html +20 -74
- package/src/primitives/avatar/avatar.json +48 -0
- package/src/primitives/badge/badge.css +45 -10
- package/src/primitives/badge/badge.html +4 -0
- package/src/primitives/badge/badge.json +83 -0
- package/src/primitives/breadcrumbs/breadcrumbs.json +20 -0
- package/src/primitives/button/button.css +50 -66
- package/src/primitives/button/button.html +4 -0
- package/src/primitives/button/button.json +85 -0
- package/src/primitives/button-group/button-group.css +4 -15
- package/src/primitives/button-group/button-group.json +40 -0
- package/src/primitives/callout/callout.css +1 -1
- package/src/primitives/callout/callout.html +12 -12
- package/src/primitives/callout/callout.json +54 -0
- package/src/primitives/card/card-article.html +13 -37
- package/src/primitives/card/card-horizontal.html +11 -14
- package/src/primitives/card/card-login.html +4 -4
- package/src/primitives/card/card-product.html +3 -3
- package/src/primitives/card/card-subgrid.html +4 -4
- package/src/primitives/card/card.css +1 -1
- package/src/primitives/card/card.html +8 -8
- package/src/primitives/card/card.json +73 -0
- package/src/primitives/carousel/carousel.css +1 -1
- package/src/primitives/carousel/carousel.json +89 -0
- package/src/primitives/checkbox/checkbox.css +1 -2
- package/src/primitives/checkbox/checkbox.json +51 -0
- package/src/primitives/combobox/combobox.css +3 -2
- package/src/primitives/combobox/combobox.d.ts +2 -2
- package/src/primitives/combobox/combobox.d.ts.map +1 -1
- package/src/primitives/combobox/combobox.js +2 -2
- package/src/primitives/combobox/combobox.json +113 -0
- package/src/primitives/combobox/combobox.ts +2 -2
- package/src/primitives/command/command-actions.html +1 -1
- package/src/primitives/command/command.d.ts +4 -3
- package/src/primitives/command/command.d.ts.map +1 -1
- package/src/primitives/command/command.js +7 -6
- package/src/primitives/command/command.json +86 -0
- package/src/primitives/command/command.ts +7 -6
- package/src/primitives/debug/audit-core.d.ts +19 -12
- package/src/primitives/debug/audit-core.d.ts.map +1 -1
- package/src/primitives/debug/audit-core.js +78 -16
- package/src/primitives/debug/audit-core.ts +94 -22
- package/src/primitives/debug/debug.d.ts +6 -4
- package/src/primitives/debug/debug.d.ts.map +1 -1
- package/src/primitives/debug/debug.js +50 -21
- package/src/primitives/debug/debug.json +29 -0
- package/src/primitives/debug/debug.ts +57 -35
- package/src/primitives/dialog/dialog.css +1 -4
- package/src/primitives/dialog/dialog.json +78 -0
- package/src/primitives/drawer/drawer.css +4 -2
- package/src/primitives/drawer/drawer.d.ts.map +1 -1
- package/src/primitives/drawer/drawer.js +76 -4
- package/src/primitives/drawer/drawer.json +98 -0
- package/src/primitives/drawer/drawer.ts +78 -5
- package/src/primitives/fields/fields.css +11 -4
- package/src/primitives/fields/fields.json +92 -0
- package/src/primitives/font/font.css +188 -0
- package/src/primitives/font/font.html +14 -0
- package/src/primitives/font/font.json +39 -0
- package/src/primitives/group/group.json +25 -0
- package/src/primitives/input/input.css +1 -2
- package/src/primitives/input/input.json +56 -0
- package/src/primitives/input-group/input-group-password-group.html +1 -1
- package/src/primitives/input-group/input-group.css +32 -3
- package/src/primitives/input-group/input-group.html +5 -8
- package/src/primitives/input-group/input-group.json +69 -0
- package/src/primitives/kbd/kbd.css +1 -1
- package/src/primitives/kbd/kbd.json +52 -0
- package/src/primitives/layout/layout.json +45 -0
- package/src/primitives/lightbox/lightbox.css +4 -3
- package/src/primitives/lightbox/lightbox.html +2 -2
- package/src/primitives/lightbox/lightbox.js +1 -1
- package/src/primitives/lightbox/lightbox.json +87 -0
- package/src/primitives/lightbox/lightbox.ts +1 -1
- package/src/primitives/link/link.css +28 -0
- package/src/primitives/link/link.html +5 -0
- package/src/primitives/link/link.json +23 -0
- package/src/primitives/menu/menu.d.ts +3 -0
- package/src/primitives/menu/menu.d.ts.map +1 -1
- package/src/primitives/menu/menu.js +10 -25
- package/src/primitives/menu/menu.json +51 -0
- package/src/primitives/menu/menu.ts +10 -27
- package/src/primitives/menubar/menubar.json +23 -0
- package/src/primitives/meter/meter.css +24 -3
- package/src/primitives/meter/meter.json +41 -0
- package/src/primitives/mobile-menu/mobile-menu.html +1 -1
- package/src/primitives/mobile-menu/mobile-menu.json +64 -0
- package/src/primitives/navigation-menu/navigation-menu-featured.html +58 -58
- package/src/primitives/navigation-menu/navigation-menu-megamenu.html +6 -113
- package/src/primitives/navigation-menu/navigation-menu.css +11 -5
- package/src/primitives/navigation-menu/navigation-menu.html +1 -1
- package/src/primitives/navigation-menu/navigation-menu.json +82 -0
- package/src/primitives/otp/otp.css +1 -1
- package/src/primitives/otp/otp.d.ts +3 -3
- package/src/primitives/otp/otp.js +5 -5
- package/src/primitives/otp/otp.json +75 -0
- package/src/primitives/otp/otp.ts +5 -5
- package/src/primitives/password-group/password-group.css +32 -2
- package/src/primitives/password-group/password-group.html +1 -1
- package/src/primitives/password-group/password-group.json +74 -0
- package/src/primitives/popover/popover.css +1 -1
- package/src/primitives/popover/popover.json +64 -0
- package/src/primitives/progress/progress.css +25 -3
- package/src/primitives/progress/progress.json +41 -0
- package/src/primitives/prose/prose.css +341 -0
- package/src/primitives/prose/prose.html +11 -11
- package/src/primitives/prose/prose.json +47 -0
- package/src/primitives/radio/radio.css +1 -1
- package/src/primitives/radio/radio.json +48 -0
- package/src/primitives/reveal/reveal.json +72 -0
- package/src/primitives/scroll-fade/scroll-fade.css +0 -3
- package/src/primitives/scroll-fade/scroll-fade.json +34 -0
- package/src/primitives/select/select.css +2 -2
- package/src/primitives/select/select.json +119 -0
- package/src/primitives/separator/separator.json +34 -0
- package/src/primitives/slider/slider.css +87 -13
- package/src/primitives/slider/slider.json +49 -0
- package/src/primitives/style-guard/style-guard.js +1 -1
- package/src/primitives/style-guard/style-guard.json +22 -0
- package/src/primitives/style-guard/style-guard.ts +2 -2
- package/src/primitives/switch/switch.css +107 -18
- package/src/primitives/switch/switch.json +71 -0
- package/src/primitives/table/table.json +74 -0
- package/src/primitives/tabs/tabs.css +24 -12
- package/src/primitives/tabs/tabs.d.ts +4 -2
- package/src/primitives/tabs/tabs.d.ts.map +1 -1
- package/src/primitives/tabs/tabs.js +14 -24
- package/src/primitives/tabs/tabs.json +94 -0
- package/src/primitives/tabs/tabs.ts +14 -26
- package/src/primitives/textarea/textarea.css +1 -1
- package/src/primitives/textarea/textarea.json +48 -0
- package/src/primitives/toaster/toaster.d.ts.map +1 -1
- package/src/primitives/toaster/toaster.js +4 -4
- package/src/primitives/toaster/toaster.json +101 -0
- package/src/primitives/toaster/toaster.ts +5 -5
- package/src/primitives/toggle/toggle.css +2 -52
- package/src/primitives/toggle/toggle.json +84 -0
- package/src/primitives/toggle-group/toggle-group.css +1 -1
- package/src/primitives/toggle-group/toggle-group.json +41 -0
- package/src/primitives/toolbar/toolbar.json +26 -0
- package/src/primitives/tooltip/tooltip.css +6 -4
- package/src/primitives/tooltip/tooltip.json +85 -0
- 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 +3 -3
- package/src/primitives/utilities/flex-align.html +3 -3
- package/src/primitives/utilities/flex-direction.html +8 -8
- package/src/primitives/utilities/flex-grow.html +3 -3
- package/src/primitives/utilities/flex-reverse.html +8 -8
- package/src/primitives/utilities/gallery.html +19 -19
- package/src/primitives/utilities/gap.html +12 -12
- package/src/primitives/utilities/grid-cols.html +6 -6
- package/src/primitives/utilities/grid-responsive.html +9 -9
- package/src/primitives/utilities/inline-flex.html +2 -2
- package/src/primitives/utilities/margin-auto.html +1 -1
- package/src/primitives/utilities/object-fit.html +3 -3
- package/src/primitives/utilities/order.html +3 -3
- package/src/primitives/utilities/overflow.html +14 -14
- package/src/primitives/utilities/padding-compose.html +3 -3
- package/src/primitives/utilities/padding.html +4 -4
- package/src/primitives/utilities/position.html +1 -1
- package/src/primitives/utilities/responsive-flex.html +4 -4
- package/src/primitives/utilities/responsive-grid.html +9 -9
- package/src/primitives/utilities/size.html +5 -5
- package/src/primitives/utilities/subgrid-col.html +7 -7
- package/src/primitives/utilities/subgrid-row.html +9 -9
- package/src/primitives/utilities/subgrid.html +9 -9
- package/src/primitives/utilities/utilities.json +48 -0
- package/src/primitives/utilities/width.html +5 -5
- package/src/base/gesture.d.ts.map +0 -1
- package/src/base/hotkeys.d.ts.map +0 -1
- package/src/base/typeahead.d.ts.map +0 -1
- /package/src/{base → behaviors}/command-score.d.ts +0 -0
- /package/src/{base → behaviors}/command-score.d.ts.map +0 -0
- /package/src/{base → behaviors}/command-score.js +0 -0
- /package/src/{base → behaviors}/command-score.ts +0 -0
- /package/src/{base → behaviors}/hotkeys.js +0 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "alert-dialog",
|
|
3
|
+
"summary": "alert-dialog.css: Alert dialog ([data-ui~=\"alert-dialog\"] on a [data-ui~=\"dialog\"] <dialog>)",
|
|
4
|
+
"identities": [
|
|
5
|
+
"alert-dialog"
|
|
6
|
+
],
|
|
7
|
+
"tags": [],
|
|
8
|
+
"hooks": {
|
|
9
|
+
"Box Model & Sizing": {
|
|
10
|
+
"--ui-alert-dialog-w": "min(45ch, 100% - var(--space-md) * 2)"
|
|
11
|
+
},
|
|
12
|
+
"Color & Backgrounds": {
|
|
13
|
+
"--ui-alert-dialog-accent": "var(--color-destructive-foreground)"
|
|
14
|
+
},
|
|
15
|
+
"Visual Effects": {
|
|
16
|
+
"--ui-alert-dialog-shadow": "var(--ui-dialog-shadow)"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"attributes": {},
|
|
20
|
+
"slots": {},
|
|
21
|
+
"states": {},
|
|
22
|
+
"requires": [
|
|
23
|
+
"dialog"
|
|
24
|
+
],
|
|
25
|
+
"files": {
|
|
26
|
+
"css": [
|
|
27
|
+
"primitives/alert-dialog/alert-dialog.css"
|
|
28
|
+
],
|
|
29
|
+
"js": [],
|
|
30
|
+
"base": [],
|
|
31
|
+
"examples": [
|
|
32
|
+
"primitives/alert-dialog/alert-dialog.html"
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview `<ui-autocomplete>`: an input that suggests options as you type.
|
|
3
3
|
* @description Light-DOM custom element on the shared typeahead engine
|
|
4
|
-
* (`
|
|
4
|
+
* (`behaviors/typeahead.ts`). The visible input is the form value (free text is
|
|
5
5
|
* allowed) and the anchored `popover="manual"` panel suggests matches ranked
|
|
6
6
|
* by the vendored cmdk scorer. Committing a suggestion (Enter or click) fills
|
|
7
7
|
* the input; without JavaScript the markup degrades to a plain `[data-ui~="input"]`.
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* optional `data-autocomplete-keywords`), `autocomplete-group` / `autocomplete-group-label`,
|
|
17
17
|
* `autocomplete-empty`.
|
|
18
18
|
*/
|
|
19
|
-
import { TypeaheadElement } from "../../
|
|
19
|
+
import { TypeaheadElement } from "../../behaviors/typeahead.ts";
|
|
20
20
|
declare class UiAutocomplete extends TypeaheadElement {
|
|
21
21
|
protected readonly slotPrefix = "autocomplete";
|
|
22
22
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["autocomplete.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["autocomplete.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGhE,cAAM,cAAe,SAAQ,gBAAgB;IAC3C,SAAS,CAAC,QAAQ,CAAC,UAAU,kBAAkB;IAE/C;;;;;OAKG;IACH,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,GAAG,SAAS,GAAG,IAAI,CAQzE;CACF;AAID,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* @fileoverview `<ui-autocomplete>`: an input that suggests options as you type.
|
|
4
4
|
* @description Light-DOM custom element on the shared typeahead engine
|
|
5
|
-
* (`
|
|
5
|
+
* (`behaviors/typeahead.ts`). The visible input is the form value (free text is
|
|
6
6
|
* allowed) and the anchored `popover="manual"` panel suggests matches ranked
|
|
7
7
|
* by the vendored cmdk scorer. Committing a suggestion (Enter or click) fills
|
|
8
8
|
* the input; without JavaScript the markup degrades to a plain `[data-ui~="input"]`.
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* optional `data-autocomplete-keywords`), `autocomplete-group` / `autocomplete-group-label`,
|
|
18
18
|
* `autocomplete-empty`.
|
|
19
19
|
*/
|
|
20
|
-
import { TypeaheadElement } from "../../
|
|
20
|
+
import { TypeaheadElement } from "../../behaviors/typeahead.js";
|
|
21
21
|
import { defineZazzElement } from "../../base/zazz-element.js";
|
|
22
22
|
class UiAutocomplete extends TypeaheadElement {
|
|
23
23
|
slotPrefix = "autocomplete";
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "autocomplete",
|
|
3
|
+
"summary": "autocomplete.css — Autocomplete (ui-autocomplete | [data-ui~=\"autocomplete\"], [data-autocomplete-slot~=\"panel\"])",
|
|
4
|
+
"identities": [
|
|
5
|
+
"autocomplete"
|
|
6
|
+
],
|
|
7
|
+
"tags": [
|
|
8
|
+
"ui-autocomplete"
|
|
9
|
+
],
|
|
10
|
+
"hooks": {
|
|
11
|
+
"Box Model & Sizing": {
|
|
12
|
+
"--ui-autocomplete-panel-max-h": "calc(var(--spacing) * 72)"
|
|
13
|
+
},
|
|
14
|
+
"Visual Effects": {
|
|
15
|
+
"--ui-autocomplete-shadow": "var(--ui-menu-shadow)"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"attributes": {
|
|
19
|
+
"data-autocomplete-filter": [],
|
|
20
|
+
"data-autocomplete-keywords": [],
|
|
21
|
+
"data-autocomplete-min-length": [],
|
|
22
|
+
"data-autocomplete-sort": [],
|
|
23
|
+
"data-autocomplete-value": []
|
|
24
|
+
},
|
|
25
|
+
"slots": {
|
|
26
|
+
"data-autocomplete-slot": [
|
|
27
|
+
"empty",
|
|
28
|
+
"group",
|
|
29
|
+
"group-label",
|
|
30
|
+
"item",
|
|
31
|
+
"list",
|
|
32
|
+
"panel"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"states": {
|
|
36
|
+
"data-autocomplete-state": [
|
|
37
|
+
"highlighted"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"requires": [
|
|
41
|
+
"popover",
|
|
42
|
+
"button",
|
|
43
|
+
"fields",
|
|
44
|
+
"select",
|
|
45
|
+
"input"
|
|
46
|
+
],
|
|
47
|
+
"files": {
|
|
48
|
+
"css": [
|
|
49
|
+
"primitives/autocomplete/autocomplete.css"
|
|
50
|
+
],
|
|
51
|
+
"js": [
|
|
52
|
+
"primitives/autocomplete/autocomplete.js"
|
|
53
|
+
],
|
|
54
|
+
"base": [
|
|
55
|
+
"behaviors/list-navigation.js",
|
|
56
|
+
"behaviors/command-score.js",
|
|
57
|
+
"behaviors/hotkeys.js",
|
|
58
|
+
"behaviors/typeahead.js"
|
|
59
|
+
],
|
|
60
|
+
"examples": [
|
|
61
|
+
"primitives/autocomplete/autocomplete.html",
|
|
62
|
+
"primitives/autocomplete/autocomplete-groups.html"
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* @fileoverview `<ui-autocomplete>`: an input that suggests options as you type.
|
|
5
5
|
* @description Light-DOM custom element on the shared typeahead engine
|
|
6
|
-
* (`
|
|
6
|
+
* (`behaviors/typeahead.ts`). The visible input is the form value (free text is
|
|
7
7
|
* allowed) and the anchored `popover="manual"` panel suggests matches ranked
|
|
8
8
|
* by the vendored cmdk scorer. Committing a suggestion (Enter or click) fills
|
|
9
9
|
* the input; without JavaScript the markup degrades to a plain `[data-ui~="input"]`.
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* `autocomplete-empty`.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
import { TypeaheadElement } from "../../
|
|
22
|
+
import { TypeaheadElement } from "../../behaviors/typeahead.ts";
|
|
23
23
|
import { defineZazzElement } from "../../base/zazz-element.ts";
|
|
24
24
|
|
|
25
25
|
class UiAutocomplete extends TypeaheadElement {
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* avatar.css: Avatar ([data-ui~="avatar"])
|
|
3
|
+
*
|
|
4
|
+
* @layer variables, components
|
|
5
|
+
* @requires _layers.css, _variables.css, _properties.css (--_*-resolved)
|
|
6
|
+
* @uses a one-cell grid: the image and the fallback share the cell with the image on
|
|
7
|
+
* top, so the fallback shows where the markup has no image. CSS can't tell an image
|
|
8
|
+
* that failed to load, so leave the image out when there is no picture.
|
|
9
|
+
* @uses overflow: clip, so the image takes the avatar's corners
|
|
10
|
+
* @uses corner-shape — round by default, so circles stay circles. A concave shape at a
|
|
11
|
+
* full radius empties a circle, and CSS can't read the number in superellipse(), so
|
|
12
|
+
* the hook keeps a convex shape from this list (round, squircle, square,
|
|
13
|
+
* superellipse(1 | 1.3 | 2 | infinity)) and draws anything else round; the check is an
|
|
14
|
+
* if(). Only Chromium and Safari draw corner-shape, and both support if(); where if()
|
|
15
|
+
* is missing the private is invalid and its round fallback draws. The
|
|
16
|
+
* --corner-shape utility still sets any shape.
|
|
17
|
+
* @tokens --ui-avatar-* (@layer variables; hooks are named after the utilities they back)
|
|
18
|
+
*
|
|
19
|
+
* Every utility-backed declaration reads one chain, highest first:
|
|
20
|
+
* var(--_<utility>-resolved, var(--ui-avatar-<utility>))
|
|
21
|
+
* The image takes alt="". Alone, the avatar names the person on the root (role="img" and
|
|
22
|
+
* aria-label) and hides the fallback's initials (aria-hidden="true"); beside a visible
|
|
23
|
+
* name, the whole avatar takes aria-hidden="true", so the name is read once.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
@layer variables {
|
|
27
|
+
:root {
|
|
28
|
+
/* dual-mode: a scale number or a length */
|
|
29
|
+
--ui-avatar-size: calc(var(--spacing) * 10);
|
|
30
|
+
--ui-avatar-radius: var(--radius-full);
|
|
31
|
+
--ui-avatar-corner-shape: round;
|
|
32
|
+
|
|
33
|
+
--ui-avatar-bg: var(--color-background);
|
|
34
|
+
--ui-avatar-border-width: 1px;
|
|
35
|
+
--ui-avatar-border-style: solid;
|
|
36
|
+
--ui-avatar-border-color: var(--color-border);
|
|
37
|
+
|
|
38
|
+
/* the fallback's initials inherit these */
|
|
39
|
+
--ui-avatar-font-size: var(--font-size-sm);
|
|
40
|
+
--ui-avatar-font-weight: var(--font-weight-strong);
|
|
41
|
+
|
|
42
|
+
--ui-avatar-fallback-bg: var(--color-muted);
|
|
43
|
+
--ui-avatar-fallback-text: var(--color-muted-foreground);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* The hook's shape, floored (see the header). Read as var(…, round): WebKit drops a
|
|
48
|
+
registered "*" property read with no fallback in corner-shape. */
|
|
49
|
+
@property --_avatar-shape {
|
|
50
|
+
syntax: "*";
|
|
51
|
+
inherits: false;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@layer ui.components {
|
|
55
|
+
:where([data-ui~="avatar"]) {
|
|
56
|
+
display: inline-grid;
|
|
57
|
+
flex-shrink: 0;
|
|
58
|
+
vertical-align: middle;
|
|
59
|
+
overflow: clip;
|
|
60
|
+
--_size-len: var(--_size-resolved, var(--ui-avatar-size));
|
|
61
|
+
--_size-num: var(--_size-resolved, var(--ui-avatar-size));
|
|
62
|
+
inline-size: calc(var(--_size-len) + var(--_size-num) * var(--spacing));
|
|
63
|
+
block-size: calc(var(--_size-len) + var(--_size-num) * var(--spacing));
|
|
64
|
+
|
|
65
|
+
background-color: var(--_bg-resolved, var(--ui-avatar-bg));
|
|
66
|
+
border-width: var(--_border-width-resolved, var(--ui-avatar-border-width));
|
|
67
|
+
border-style: var(--_border-style-resolved, var(--ui-avatar-border-style));
|
|
68
|
+
border-color: var(--_border-color-resolved, var(--ui-avatar-border-color));
|
|
69
|
+
--_radius-len: var(--_radius-resolved, var(--ui-avatar-radius));
|
|
70
|
+
--_radius-num: var(--_radius-resolved, var(--ui-avatar-radius));
|
|
71
|
+
border-radius: calc(
|
|
72
|
+
var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-coefficient)
|
|
73
|
+
);
|
|
74
|
+
--_avatar-shape: if(
|
|
75
|
+
style(--ui-avatar-corner-shape: round) or style(--ui-avatar-corner-shape: squircle) or
|
|
76
|
+
style(--ui-avatar-corner-shape: square) or style(--ui-avatar-corner-shape: superellipse(1))
|
|
77
|
+
or style(--ui-avatar-corner-shape: superellipse(1.3)) or
|
|
78
|
+
style(--ui-avatar-corner-shape: superellipse(2)) or
|
|
79
|
+
style(--ui-avatar-corner-shape: superellipse(infinity)): var(--ui-avatar-corner-shape);
|
|
80
|
+
else: round
|
|
81
|
+
);
|
|
82
|
+
corner-shape: var(--_corner-shape-resolved, var(--_avatar-shape, round));
|
|
83
|
+
|
|
84
|
+
font-size: var(--_font-size-resolved, var(--ui-avatar-font-size));
|
|
85
|
+
font-weight: var(--_font-weight-resolved, var(--ui-avatar-font-weight));
|
|
86
|
+
line-height: 1;
|
|
87
|
+
user-select: none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Both parts fill the one cell; the image paints over the fallback */
|
|
91
|
+
:where([data-ui~="avatar"]) [data-avatar-slot~="image"] {
|
|
92
|
+
grid-area: 1 / 1;
|
|
93
|
+
z-index: 1;
|
|
94
|
+
inline-size: 100%;
|
|
95
|
+
block-size: 100%;
|
|
96
|
+
object-fit: cover;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
:where([data-ui~="avatar"]) [data-avatar-slot~="fallback"] {
|
|
100
|
+
grid-area: 1 / 1;
|
|
101
|
+
display: grid;
|
|
102
|
+
place-items: center;
|
|
103
|
+
inline-size: 100%;
|
|
104
|
+
block-size: 100%;
|
|
105
|
+
background-color: var(--ui-avatar-fallback-bg);
|
|
106
|
+
color: var(--ui-avatar-fallback-text);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -5,58 +5,22 @@
|
|
|
5
5
|
--gap: 2;
|
|
6
6
|
"
|
|
7
7
|
>
|
|
8
|
-
<
|
|
9
|
-
role="img"
|
|
10
|
-
style="
|
|
11
|
-
--display: grid-pile;
|
|
12
|
-
--size: 11;
|
|
13
|
-
--bg: var(--color-background);
|
|
14
|
-
--border-color: var(--color-border);
|
|
15
|
-
--border-width: 1px;
|
|
16
|
-
--radius: full;
|
|
17
|
-
--overflow: clip;
|
|
18
|
-
"
|
|
19
|
-
>
|
|
8
|
+
<span data-ui="avatar" aria-hidden="true">
|
|
20
9
|
<img
|
|
10
|
+
data-avatar-slot="image"
|
|
21
11
|
width="64"
|
|
22
12
|
height="64"
|
|
23
13
|
loading="lazy"
|
|
24
14
|
src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?auto=format&fit=facearea&facepad=2&w=64&h=64&q=90"
|
|
25
|
-
alt="
|
|
26
|
-
aria-hidden="true"
|
|
27
|
-
style="
|
|
28
|
-
--order: 9999;
|
|
29
|
-
--size: 100%;
|
|
30
|
-
--bg: transparent;
|
|
31
|
-
--object-fit: cover;
|
|
32
|
-
"
|
|
15
|
+
alt=""
|
|
33
16
|
/>
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
--display: flex;
|
|
37
|
-
--items: center;
|
|
38
|
-
--justify: center;
|
|
39
|
-
--order: -9999;
|
|
40
|
-
--size: 100%;
|
|
41
|
-
--font-size: var(--font-size-md);
|
|
42
|
-
--font-weight: strong;
|
|
43
|
-
--leading: var(--leading-md);
|
|
44
|
-
--tracking: var(--tracking-md);
|
|
45
|
-
--text-align: center;
|
|
46
|
-
--text: var(--color-muted-foreground);
|
|
47
|
-
--bg: var(--color-muted);
|
|
48
|
-
"
|
|
49
|
-
>
|
|
50
|
-
<span style="--sr: only">John Doe</span>
|
|
51
|
-
<span aria-hidden="true">JD</span>
|
|
52
|
-
</figcaption>
|
|
53
|
-
</figure>
|
|
17
|
+
<span data-avatar-slot="fallback">JD</span>
|
|
18
|
+
</span>
|
|
54
19
|
<div style="--display: flex-col">
|
|
55
20
|
<span
|
|
56
21
|
style="
|
|
57
22
|
--font-size: var(--font-size-sm);
|
|
58
23
|
--font-weight: strong;
|
|
59
|
-
--leading: 1;
|
|
60
24
|
--leading: var(--leading-sm);
|
|
61
25
|
--tracking: var(--tracking-sm);
|
|
62
26
|
"
|
|
@@ -81,44 +45,14 @@
|
|
|
81
45
|
--gap: 2;
|
|
82
46
|
"
|
|
83
47
|
>
|
|
84
|
-
<
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
--display: grid-pile;
|
|
88
|
-
--size: 11;
|
|
89
|
-
--bg: var(--color-background);
|
|
90
|
-
--border-color: var(--color-border);
|
|
91
|
-
--border-width: 1px;
|
|
92
|
-
--radius: full;
|
|
93
|
-
--overflow: clip;
|
|
94
|
-
"
|
|
95
|
-
>
|
|
96
|
-
<figcaption
|
|
97
|
-
style="
|
|
98
|
-
--display: flex;
|
|
99
|
-
--items: center;
|
|
100
|
-
--justify: center;
|
|
101
|
-
--order: -9999;
|
|
102
|
-
--size: 100%;
|
|
103
|
-
--font-size: var(--font-size-md);
|
|
104
|
-
--font-weight: strong;
|
|
105
|
-
--leading: var(--leading-md);
|
|
106
|
-
--tracking: var(--tracking-md);
|
|
107
|
-
--text-align: center;
|
|
108
|
-
--text: var(--color-muted-foreground);
|
|
109
|
-
--bg: var(--color-muted);
|
|
110
|
-
"
|
|
111
|
-
>
|
|
112
|
-
<span style="--sr: only">John Doe</span>
|
|
113
|
-
<span aria-hidden="true">JD</span>
|
|
114
|
-
</figcaption>
|
|
115
|
-
</figure>
|
|
48
|
+
<span data-ui="avatar" aria-hidden="true">
|
|
49
|
+
<span data-avatar-slot="fallback">JD</span>
|
|
50
|
+
</span>
|
|
116
51
|
<div style="--display: flex-col">
|
|
117
52
|
<span
|
|
118
53
|
style="
|
|
119
54
|
--font-size: var(--font-size-sm);
|
|
120
55
|
--font-weight: strong;
|
|
121
|
-
--leading: 1;
|
|
122
56
|
--leading: var(--leading-sm);
|
|
123
57
|
--tracking: var(--tracking-sm);
|
|
124
58
|
"
|
|
@@ -135,3 +69,15 @@
|
|
|
135
69
|
>
|
|
136
70
|
</div>
|
|
137
71
|
</div>
|
|
72
|
+
|
|
73
|
+
<span data-ui="avatar" role="img" aria-label="John Doe">
|
|
74
|
+
<img
|
|
75
|
+
data-avatar-slot="image"
|
|
76
|
+
width="64"
|
|
77
|
+
height="64"
|
|
78
|
+
loading="lazy"
|
|
79
|
+
src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?auto=format&fit=facearea&facepad=2&w=64&h=64&q=90"
|
|
80
|
+
alt=""
|
|
81
|
+
/>
|
|
82
|
+
<span data-avatar-slot="fallback" aria-hidden="true">JD</span>
|
|
83
|
+
</span>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "avatar",
|
|
3
|
+
"summary": "avatar.css: Avatar ([data-ui~=\"avatar\"])",
|
|
4
|
+
"identities": [
|
|
5
|
+
"avatar"
|
|
6
|
+
],
|
|
7
|
+
"tags": [],
|
|
8
|
+
"hooks": {
|
|
9
|
+
"Box Model & Sizing": {
|
|
10
|
+
"--ui-avatar-size": "calc(var(--spacing) * 10)"
|
|
11
|
+
},
|
|
12
|
+
"Typography": {
|
|
13
|
+
"--ui-avatar-font-size": "var(--font-size-sm)",
|
|
14
|
+
"--ui-avatar-font-weight": "var(--font-weight-strong)"
|
|
15
|
+
},
|
|
16
|
+
"Color & Backgrounds": {
|
|
17
|
+
"--ui-avatar-bg": "var(--color-background)",
|
|
18
|
+
"--ui-avatar-fallback-bg": "var(--color-muted)",
|
|
19
|
+
"--ui-avatar-fallback-text": "var(--color-muted-foreground)"
|
|
20
|
+
},
|
|
21
|
+
"Borders & Outlines": {
|
|
22
|
+
"--ui-avatar-border-color": "var(--color-border)",
|
|
23
|
+
"--ui-avatar-border-style": "solid",
|
|
24
|
+
"--ui-avatar-border-width": "1px",
|
|
25
|
+
"--ui-avatar-corner-shape": "round",
|
|
26
|
+
"--ui-avatar-radius": "var(--radius-full)"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"attributes": {},
|
|
30
|
+
"slots": {
|
|
31
|
+
"data-avatar-slot": [
|
|
32
|
+
"fallback",
|
|
33
|
+
"image"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"states": {},
|
|
37
|
+
"requires": [],
|
|
38
|
+
"files": {
|
|
39
|
+
"css": [
|
|
40
|
+
"primitives/avatar/avatar.css"
|
|
41
|
+
],
|
|
42
|
+
"js": [],
|
|
43
|
+
"base": [],
|
|
44
|
+
"examples": [
|
|
45
|
+
"primitives/avatar/avatar.html"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
*
|
|
19
19
|
* States step one way and active goes further than hover. Unfilled surfaces (the
|
|
20
20
|
* default, outline, ghost) gain the muted role; filled ones fade toward the page;
|
|
21
|
-
*
|
|
22
|
-
* (badge-button-parity.browser.test.ts).
|
|
21
|
+
* the translucent muted and faded roles deepen; status surfaces darken. Button
|
|
22
|
+
* and badge resolve the same in every variant (badge-button-parity.browser.test.ts).
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
@layer variables {
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
--_radius-len: var(--_radius-resolved, var(--_badge-radius, var(--ui-badge-radius)));
|
|
240
240
|
--_radius-num: var(--_radius-resolved, var(--_badge-radius, var(--ui-badge-radius)));
|
|
241
241
|
border-radius: calc(
|
|
242
|
-
var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-
|
|
242
|
+
var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-coefficient)
|
|
243
243
|
);
|
|
244
244
|
corner-shape: var(--_corner-shape-resolved, var(--ui-badge-corner-shape));
|
|
245
245
|
|
|
@@ -405,13 +405,15 @@
|
|
|
405
405
|
|
|
406
406
|
:where([data-ui~="badge"][data-badge-variant="secondary"]) {
|
|
407
407
|
--_badge-bg: var(--color-secondary);
|
|
408
|
+
/* with the default palette, a light fill in light mode and a dark one in dark, so
|
|
409
|
+
it steps the other way from primary: darker in light, lighter in dark */
|
|
408
410
|
--_badge-bg--hover: light-dark(
|
|
409
|
-
oklch(from var(--color-secondary) calc(l
|
|
410
|
-
oklch(from var(--color-secondary) calc(l * 0.
|
|
411
|
+
oklch(from var(--color-secondary) calc(l * 0.95) c h),
|
|
412
|
+
oklch(from var(--color-secondary) calc(l + (1 - l) * 0.1) c h)
|
|
411
413
|
);
|
|
412
414
|
--_badge-bg--active: light-dark(
|
|
413
|
-
oklch(from var(--color-secondary) calc(l
|
|
414
|
-
oklch(from var(--color-secondary) calc(l * 0.
|
|
415
|
+
oklch(from var(--color-secondary) calc(l * 0.9) c h),
|
|
416
|
+
oklch(from var(--color-secondary) calc(l + (1 - l) * 0.2) c h)
|
|
415
417
|
);
|
|
416
418
|
|
|
417
419
|
--_badge-text: var(--color-secondary-foreground);
|
|
@@ -447,11 +449,44 @@
|
|
|
447
449
|
--_badge-shadow: 0 0 transparent;
|
|
448
450
|
}
|
|
449
451
|
|
|
452
|
+
:where([data-ui~="badge"][data-badge-variant="neutral"]) {
|
|
453
|
+
/* a solid near-page surface that steps one neutral shade at a time */
|
|
454
|
+
--_badge-bg: light-dark(var(--color-white), var(--color-neutral-950));
|
|
455
|
+
--_badge-bg--hover: light-dark(var(--color-neutral-50), var(--color-neutral-900));
|
|
456
|
+
--_badge-bg--active: light-dark(var(--color-neutral-100), var(--color-neutral-800));
|
|
457
|
+
|
|
458
|
+
--_badge-text: var(--color-foreground);
|
|
459
|
+
--_badge-text--hover: var(--color-foreground);
|
|
460
|
+
--_badge-text--active: var(--color-foreground);
|
|
461
|
+
|
|
462
|
+
--_badge-border-color: transparent;
|
|
463
|
+
--_badge-border-color--hover: transparent;
|
|
464
|
+
--_badge-border-color--active: transparent;
|
|
465
|
+
|
|
466
|
+
--_badge-shadow: var(--shadow-xs);
|
|
467
|
+
}
|
|
468
|
+
|
|
450
469
|
:where([data-ui~="badge"][data-badge-variant="muted"]) {
|
|
451
|
-
/* the translucent muted role:
|
|
470
|
+
/* the translucent muted role: deepens (more opaque) at hover and active */
|
|
452
471
|
--_badge-bg: var(--color-muted);
|
|
453
|
-
--_badge-bg--hover: oklch(from var(--_badge-bg) l c h / calc(alpha *
|
|
454
|
-
--_badge-bg--active: oklch(from var(--_badge-bg) l c h / calc(alpha *
|
|
472
|
+
--_badge-bg--hover: oklch(from var(--_badge-bg) l c h / calc(alpha * 1.66));
|
|
473
|
+
--_badge-bg--active: oklch(from var(--_badge-bg) l c h / calc(alpha * 2));
|
|
474
|
+
|
|
475
|
+
--_badge-text: var(--color-foreground);
|
|
476
|
+
--_badge-text--hover: var(--color-foreground);
|
|
477
|
+
--_badge-text--active: var(--color-foreground);
|
|
478
|
+
|
|
479
|
+
--_badge-border-color: transparent;
|
|
480
|
+
--_badge-border-color--hover: transparent;
|
|
481
|
+
--_badge-border-color--active: transparent;
|
|
482
|
+
|
|
483
|
+
--_badge-shadow: 0 0 transparent;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
:where([data-ui~="badge"][data-badge-variant="faded"]) {
|
|
487
|
+
--_badge-bg: var(--color-faded);
|
|
488
|
+
--_badge-bg--hover: oklch(from var(--_badge-bg) l c h / calc(alpha * 1.66));
|
|
489
|
+
--_badge-bg--active: oklch(from var(--_badge-bg) l c h / calc(alpha * 2));
|
|
455
490
|
|
|
456
491
|
--_badge-text: var(--color-foreground);
|
|
457
492
|
--_badge-text--hover: var(--color-foreground);
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
>
|
|
9
9
|
<button type="button" data-ui="badge">Category</button>
|
|
10
10
|
<button type="button" data-ui="badge" data-badge-variant="primary">New</button>
|
|
11
|
+
<button type="button" data-ui="badge" data-badge-variant="secondary">New</button>
|
|
12
|
+
<button type="button" data-ui="badge" data-badge-variant="tertiary">New</button>
|
|
13
|
+
<button type="button" data-ui="badge" data-badge-variant="neutral">New</button>
|
|
11
14
|
<button type="button" data-ui="badge" data-badge-variant="muted">Draft</button>
|
|
15
|
+
<button type="button" data-ui="badge" data-badge-variant="faded">New</button>
|
|
12
16
|
<button type="button" data-ui="badge" data-badge-variant="ghost">Inline</button>
|
|
13
17
|
<button type="button" data-ui="badge" data-badge-variant="info">Update</button>
|
|
14
18
|
<button type="button" data-ui="badge" data-badge-variant="success">Paid</button>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "badge",
|
|
3
|
+
"summary": "badge.css: Badge ([data-ui~=\"badge\"])",
|
|
4
|
+
"identities": [
|
|
5
|
+
"badge"
|
|
6
|
+
],
|
|
7
|
+
"tags": [],
|
|
8
|
+
"hooks": {
|
|
9
|
+
"Layout & Positioning": {
|
|
10
|
+
"--ui-badge-gap": "var(--spacing)"
|
|
11
|
+
},
|
|
12
|
+
"Box Model & Sizing": {
|
|
13
|
+
"--ui-badge-h": "calc(var(--spacing) * 5)",
|
|
14
|
+
"--ui-badge-icon-size": "calc(var(--spacing) * 3)",
|
|
15
|
+
"--ui-badge-px": "calc(var(--spacing) * 1.25)",
|
|
16
|
+
"--ui-badge-py": "calc(var(--spacing) * 0.75)"
|
|
17
|
+
},
|
|
18
|
+
"Typography": {
|
|
19
|
+
"--ui-badge-font-family": "var(--font-family-body)",
|
|
20
|
+
"--ui-badge-font-size": "var(--font-size-xs)",
|
|
21
|
+
"--ui-badge-font-weight": "var(--font-weight-strong)",
|
|
22
|
+
"--ui-badge-leading": "1"
|
|
23
|
+
},
|
|
24
|
+
"Color & Backgrounds": {
|
|
25
|
+
"--ui-badge-background-clip": "border-box",
|
|
26
|
+
"--ui-badge-bg": "var(--color-background)",
|
|
27
|
+
"--ui-badge-bg--active": "oklch(from var(--ui-badge-bg--hover) l c h / calc(alpha * 1.5))",
|
|
28
|
+
"--ui-badge-bg--hover": "var(--color-muted)",
|
|
29
|
+
"--ui-badge-text": "var(--color-foreground)",
|
|
30
|
+
"--ui-badge-text--active": "var(--color-foreground)",
|
|
31
|
+
"--ui-badge-text--hover": "var(--color-foreground)"
|
|
32
|
+
},
|
|
33
|
+
"Borders & Outlines": {
|
|
34
|
+
"--ui-badge-border-color": "var(--ui-field-border-color)",
|
|
35
|
+
"--ui-badge-border-color--active": "var(--ui-field-border-color)",
|
|
36
|
+
"--ui-badge-border-color--hover": "var(--ui-field-border-color)",
|
|
37
|
+
"--ui-badge-border-style": "var(--ui-field-border-style)",
|
|
38
|
+
"--ui-badge-border-width": "var(--ui-field-border-width)",
|
|
39
|
+
"--ui-badge-corner-shape": "var(--radius-corner-shape)",
|
|
40
|
+
"--ui-badge-radius": "var(--radius-sm)"
|
|
41
|
+
},
|
|
42
|
+
"Visual Effects": {
|
|
43
|
+
"--ui-badge-ring-color": "var(--ui-field-ring-color)",
|
|
44
|
+
"--ui-badge-shadow": "0 0 transparent"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"attributes": {
|
|
48
|
+
"data-badge-size": [
|
|
49
|
+
"icon"
|
|
50
|
+
],
|
|
51
|
+
"data-badge-variant": [
|
|
52
|
+
"destructive",
|
|
53
|
+
"faded",
|
|
54
|
+
"ghost",
|
|
55
|
+
"info",
|
|
56
|
+
"link",
|
|
57
|
+
"muted",
|
|
58
|
+
"neutral",
|
|
59
|
+
"outline",
|
|
60
|
+
"primary",
|
|
61
|
+
"secondary",
|
|
62
|
+
"success",
|
|
63
|
+
"tertiary",
|
|
64
|
+
"warning"
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"slots": {},
|
|
68
|
+
"states": {},
|
|
69
|
+
"requires": [
|
|
70
|
+
"fields"
|
|
71
|
+
],
|
|
72
|
+
"files": {
|
|
73
|
+
"css": [
|
|
74
|
+
"primitives/badge/badge.css"
|
|
75
|
+
],
|
|
76
|
+
"js": [],
|
|
77
|
+
"base": [],
|
|
78
|
+
"examples": [
|
|
79
|
+
"primitives/badge/badge.html",
|
|
80
|
+
"primitives/badge/badge-icon.html"
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "breadcrumbs",
|
|
3
|
+
"identities": [],
|
|
4
|
+
"tags": [],
|
|
5
|
+
"hooks": {},
|
|
6
|
+
"attributes": {},
|
|
7
|
+
"slots": {},
|
|
8
|
+
"states": {},
|
|
9
|
+
"requires": [
|
|
10
|
+
"button"
|
|
11
|
+
],
|
|
12
|
+
"files": {
|
|
13
|
+
"css": [],
|
|
14
|
+
"js": [],
|
|
15
|
+
"base": [],
|
|
16
|
+
"examples": [
|
|
17
|
+
"primitives/breadcrumbs/breadcrumbs.html"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
}
|