@crisp-ui-kit/crisp 0.32.1 → 0.33.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/README.md +33 -1
- package/dist/appshell.css +1 -4
- package/dist/appshell.layered.css +1 -4
- package/dist/authshell.css +4 -19
- package/dist/authshell.layered.css +4 -19
- package/dist/avatar.css +2 -1
- package/dist/avatar.layered.css +2 -1
- package/dist/board.css +1 -4
- package/dist/board.layered.css +1 -4
- package/dist/breadcrumb.css +0 -1
- package/dist/breadcrumb.layered.css +0 -1
- package/dist/button.css +14 -6
- package/dist/button.layered.css +14 -6
- package/dist/card.css +2 -1
- package/dist/card.layered.css +2 -1
- package/dist/checkbox.css +6 -9
- package/dist/checkbox.layered.css +6 -9
- package/dist/cjs/components/avatar/avatar.recipe.js +38 -19
- package/dist/cjs/components/badge/badge.recipe.js +83 -24
- package/dist/cjs/components/button/button.recipe.js +109 -18
- package/dist/cjs/components/divider/divider.recipe.js +20 -8
- package/dist/cjs/components/progress/progress.recipe.js +50 -10
- package/dist/cjs/components/spinner/spinner.recipe.js +15 -7
- package/dist/cjs/components/switch/switch.recipe.js +48 -18
- package/dist/cjs/core/index.js +4 -1
- package/dist/cjs/core/spec.js +71 -0
- package/dist/columncalc.css +2 -6
- package/dist/columncalc.layered.css +2 -6
- package/dist/command.css +9 -11
- package/dist/command.layered.css +9 -11
- package/dist/datatable.css +9 -19
- package/dist/datatable.layered.css +9 -19
- package/dist/datepicker.css +15 -80
- package/dist/datepicker.layered.css +15 -80
- package/dist/datepickerfield.css +3 -18
- package/dist/datepickerfield.layered.css +3 -18
- package/dist/donutchart.css +1 -2
- package/dist/donutchart.layered.css +1 -2
- package/dist/entitycard.css +1 -7
- package/dist/entitycard.layered.css +1 -7
- package/dist/esm/components/avatar/avatar.recipe.js +38 -19
- package/dist/esm/components/badge/badge.recipe.js +83 -24
- package/dist/esm/components/button/button.recipe.js +109 -18
- package/dist/esm/components/divider/divider.recipe.js +20 -8
- package/dist/esm/components/progress/progress.recipe.js +50 -10
- package/dist/esm/components/spinner/spinner.recipe.js +15 -7
- package/dist/esm/components/switch/switch.recipe.js +48 -18
- package/dist/esm/core/index.js +1 -0
- package/dist/esm/core/spec.js +66 -0
- package/dist/fileupload.css +10 -60
- package/dist/fileupload.layered.css +10 -60
- package/dist/inbox.css +1 -7
- package/dist/inbox.layered.css +1 -7
- package/dist/input.css +9 -20
- package/dist/input.layered.css +9 -20
- package/dist/listpage.css +2 -12
- package/dist/listpage.layered.css +2 -12
- package/dist/menu.css +3 -19
- package/dist/menu.layered.css +3 -19
- package/dist/multiselect.css +4 -25
- package/dist/multiselect.layered.css +4 -25
- package/dist/navitem.css +5 -13
- package/dist/navitem.layered.css +5 -13
- package/dist/onboarding.css +1 -8
- package/dist/onboarding.layered.css +1 -8
- package/dist/quantitypicker.css +15 -50
- package/dist/quantitypicker.layered.css +15 -50
- package/dist/radiogroup.css +1 -6
- package/dist/radiogroup.layered.css +1 -6
- package/dist/recordpage.css +2 -10
- package/dist/recordpage.layered.css +2 -10
- package/dist/recordpanel.css +1 -13
- package/dist/recordpanel.layered.css +1 -13
- package/dist/recordstable.css +2 -11
- package/dist/recordstable.layered.css +2 -11
- package/dist/resizablepanel.css +4 -15
- package/dist/resizablepanel.layered.css +4 -15
- package/dist/richtext.css +1 -5
- package/dist/richtext.layered.css +1 -5
- package/dist/select.css +7 -30
- package/dist/select.layered.css +7 -30
- package/dist/settingsshell.css +2 -7
- package/dist/settingsshell.layered.css +2 -7
- package/dist/sidebar.css +23 -28
- package/dist/sidebar.layered.css +23 -28
- package/dist/slider.css +1 -8
- package/dist/slider.layered.css +1 -8
- package/dist/statcard.css +1 -2
- package/dist/statcard.layered.css +1 -2
- package/dist/styles.css +194 -652
- package/dist/styles.layered.css +194 -652
- package/dist/switch.css +1 -5
- package/dist/switch.layered.css +1 -5
- package/dist/table.css +2 -1
- package/dist/table.layered.css +2 -1
- package/dist/tabletoolbar.css +1 -3
- package/dist/tabletoolbar.layered.css +1 -3
- package/dist/tabs.css +1 -5
- package/dist/tabs.layered.css +1 -5
- package/dist/tasklist.css +1 -8
- package/dist/tasklist.layered.css +1 -8
- package/dist/textarea.css +2 -13
- package/dist/textarea.layered.css +2 -13
- package/dist/tooltip.css +2 -1
- package/dist/tooltip.layered.css +2 -1
- package/dist/trialbanner.css +2 -11
- package/dist/trialbanner.layered.css +2 -11
- package/dist/types/components/avatar/avatar.d.ts +30 -30
- package/dist/types/components/avatar/avatar.recipe.d.ts +136 -49
- package/dist/types/components/badge/badge.d.ts +26 -26
- package/dist/types/components/badge/badge.recipe.d.ts +169 -45
- package/dist/types/components/button/button.d.ts +30 -30
- package/dist/types/components/button/button.recipe.d.ts +193 -45
- package/dist/types/components/divider/divider.recipe.d.ts +26 -2
- package/dist/types/components/progress/progress.recipe.d.ts +49 -2
- package/dist/types/components/spinner/spinner.recipe.d.ts +17 -2
- package/dist/types/components/switch/switch.recipe.d.ts +57 -3
- package/dist/types/core/index.d.ts +1 -0
- package/dist/types/core/spec.d.ts +83 -0
- package/dist/viewtoggle.css +3 -9
- package/dist/viewtoggle.layered.css +3 -9
- package/dist/wheelpicker.css +14 -59
- package/dist/wheelpicker.layered.css +14 -59
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -43,6 +43,10 @@ import "@crisp-ui-kit/crisp/base.css"; // optional app baseline
|
|
|
43
43
|
import "@crisp-ui-kit/crisp/styles.css";
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
+
If your own styles need to beat crisp's, import `@crisp-ui-kit/crisp/styles.layered.css`
|
|
47
|
+
instead of `styles.css`. It is the same CSS wrapped in `@layer crisp-components`, and anything
|
|
48
|
+
you write outside a layer wins over anything inside one regardless of specificity or order.
|
|
49
|
+
|
|
46
50
|
`base.css` is optional: it sets `body`'s font, background, and text color from
|
|
47
51
|
crisp's own tokens (plus box-sizing and `color-scheme`), so a fresh app doesn't
|
|
48
52
|
render Times New Roman on a transparent background. Import it first, before
|
|
@@ -86,11 +90,39 @@ import { contract as c } from "@crisp-ui-kit/crisp";
|
|
|
86
90
|
const styles = { padding: c.space["4"], borderRadius: c.radius.md };
|
|
87
91
|
```
|
|
88
92
|
|
|
89
|
-
### Building your own
|
|
93
|
+
### Building your own component
|
|
90
94
|
|
|
91
95
|
The same primitives the kit is built on are exported (`defineRecipe`, `resolveRecipe`,
|
|
92
96
|
`Primitive`) so you can author components in the same style.
|
|
93
97
|
|
|
98
|
+
For new components, prefer **`defineSpec`**: it takes the same styling as *data* — named slots
|
|
99
|
+
with typed declarations — rather than as a CSS string, and `specToRecipe` compiles it to the
|
|
100
|
+
recipe everything else already understands.
|
|
101
|
+
|
|
102
|
+
```tsx
|
|
103
|
+
import { defineSpec, resolveRecipe, specToRecipe, contract as c } from "@crisp-ui-kit/crisp";
|
|
104
|
+
|
|
105
|
+
const spec = defineSpec({
|
|
106
|
+
name: "callout-lite",
|
|
107
|
+
base: { display: "flex", gap: c.space["2"], borderRadius: c.radius.md },
|
|
108
|
+
parts: [{ slot: "icon", selector: "& .icon", decls: { flexShrink: 0 } }],
|
|
109
|
+
variants: {
|
|
110
|
+
tone: {
|
|
111
|
+
neutral: { background: c.bgRaised, color: c.fgMuted },
|
|
112
|
+
danger: { background: c.bgDanger, color: c.fgOnTone },
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
defaultVariants: { tone: "neutral" },
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
export const calloutLite = resolveRecipe(specToRecipe(spec));
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
The variant keys survive into the type, so `VariantProps<typeof calloutLite>["tone"]` is
|
|
122
|
+
`"neutral" | "danger"` and not `string`. A string recipe can only be rewritten and hoped over;
|
|
123
|
+
a spec can be *read*, which is what lets a non-CSS target refuse a property it cannot express
|
|
124
|
+
instead of silently dropping it. crisp's own primitives are moving to it component by component.
|
|
125
|
+
|
|
94
126
|
## Documentation
|
|
95
127
|
|
|
96
128
|
The docs site renders a live, measured demo for every component. Run it locally:
|
package/dist/appshell.css
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
.crisp-appshell {
|
|
2
|
-
|
|
3
|
-
display: flex; height: 100%; width: 100%; overflow: hidden; background: var(--crisp-bg-surface); font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
2
|
+
display: flex; height: 100%; width: 100%; overflow: hidden; background: var(--crisp-bg-surface); font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
4
3
|
& .crisp-appshell-side { position: relative; flex-shrink: 0; overflow: hidden; }
|
|
5
4
|
& .crisp-appshell-side-inner { height: 100%; }
|
|
6
5
|
& .crisp-appshell-resize { position: absolute; top: 0; inset-inline-end: 0; width: 10px; height: 100%; cursor: col-resize; z-index: 5; touch-action: none; }
|
|
@@ -9,9 +8,7 @@
|
|
|
9
8
|
& .crisp-appshell-main { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
|
|
10
9
|
& .crisp-appshell-expand { position: absolute; top: var(--crisp-space-2); inset-inline-start: var(--crisp-space-2); z-index: 6; display: inline-flex; align-items: center; justify-content: center; width: var(--crisp-size-row); height: var(--crisp-size-row); padding: 0; border: none; border-radius: var(--crisp-radius-md); box-shadow: inset 0 0 0 1px var(--crisp-border-subtle); background: var(--crisp-bg-surface); color: var(--crisp-fg-muted); font-family: inherit; cursor: pointer; transition: background-color .12s; }
|
|
11
10
|
& .crisp-appshell-expand:hover { background: var(--crisp-bg-raised); color: var(--crisp-fg-primary); }
|
|
12
|
-
|
|
13
11
|
[dir="rtl"] & [data-rtl-flip] { transform: scaleX(-1); }
|
|
14
|
-
|
|
15
12
|
}
|
|
16
13
|
|
|
17
14
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
@layer crisp-components {
|
|
2
2
|
.crisp-appshell {
|
|
3
|
-
|
|
4
|
-
display: flex; height: 100%; width: 100%; overflow: hidden; background: var(--crisp-bg-surface); font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
3
|
+
display: flex; height: 100%; width: 100%; overflow: hidden; background: var(--crisp-bg-surface); font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
5
4
|
& .crisp-appshell-side { position: relative; flex-shrink: 0; overflow: hidden; }
|
|
6
5
|
& .crisp-appshell-side-inner { height: 100%; }
|
|
7
6
|
& .crisp-appshell-resize { position: absolute; top: 0; inset-inline-end: 0; width: 10px; height: 100%; cursor: col-resize; z-index: 5; touch-action: none; }
|
|
@@ -10,9 +9,7 @@
|
|
|
10
9
|
& .crisp-appshell-main { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
|
|
11
10
|
& .crisp-appshell-expand { position: absolute; top: var(--crisp-space-2); inset-inline-start: var(--crisp-space-2); z-index: 6; display: inline-flex; align-items: center; justify-content: center; width: var(--crisp-size-row); height: var(--crisp-size-row); padding: 0; border: none; border-radius: var(--crisp-radius-md); box-shadow: inset 0 0 0 1px var(--crisp-border-subtle); background: var(--crisp-bg-surface); color: var(--crisp-fg-muted); font-family: inherit; cursor: pointer; transition: background-color .12s; }
|
|
12
11
|
& .crisp-appshell-expand:hover { background: var(--crisp-bg-raised); color: var(--crisp-fg-primary); }
|
|
13
|
-
|
|
14
12
|
[dir="rtl"] & [data-rtl-flip] { transform: scaleX(-1); }
|
|
15
|
-
|
|
16
13
|
}
|
|
17
14
|
|
|
18
15
|
@media (prefers-reduced-motion: reduce) {
|
package/dist/authshell.css
CHANGED
|
@@ -1,31 +1,18 @@
|
|
|
1
1
|
.crisp-authshell {
|
|
2
|
-
min-height: 100%; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; position: relative;
|
|
3
|
-
background: var(--crisp-bg-surface); font-family: var(--crisp-font-sans); font-size: var(--crisp-text-lg); line-height: 20px; color: var(--crisp-fg-primary);
|
|
4
|
-
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
5
|
-
|
|
2
|
+
min-height: 100%; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; position: relative; background: var(--crisp-bg-surface); font-family: var(--crisp-font-sans); font-size: var(--crisp-text-lg); line-height: 20px; color: var(--crisp-fg-primary); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
6
3
|
& .crisp-authshell-progress { position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: var(--crisp-border-default); }
|
|
7
4
|
& .crisp-authshell-progress-fill { height: 2px; background: var(--crisp-fg-primary); border-radius: 4px; transition: width .2s; }
|
|
8
|
-
|
|
9
5
|
& .crisp-authshell-logo { margin-top: var(--crisp-space-8); height: 24px; display: flex; align-items: center; }
|
|
10
|
-
|
|
11
6
|
& .crisp-authshell-card { margin-top: var(--crisp-space-6); display: flex; height: 692px; border-radius: 20px; border: 1px solid var(--crisp-border-subtle); overflow: hidden; }
|
|
12
|
-
|
|
13
7
|
& .crisp-authshell-pane { flex: 0 0 564px; padding: 72px; display: flex; flex-direction: column; box-sizing: border-box; }
|
|
14
|
-
|
|
15
8
|
& .crisp-authshell-preview { flex: 0 0 564px; padding: 96px 64px; background: var(--crisp-bg-subtle); border-inline-start: 1px solid color-mix(in srgb, var(--crisp-fg-primary) 5%, transparent); position: relative; overflow: hidden; box-sizing: border-box; }
|
|
16
9
|
& .crisp-authshell-preview::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(color-mix(in srgb, var(--crisp-bg-subtle) 0%, transparent) 0%, var(--crisp-bg-subtle) 100%); pointer-events: none; }
|
|
17
|
-
|
|
18
10
|
& .crisp-authshell-body { width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--crisp-space-8); align-items: center; }
|
|
19
|
-
|
|
20
11
|
& .crisp-authshell-title { font-size: 20px; line-height: 24px; font-weight: var(--crisp-weight-semibold); letter-spacing: -0.4px; color: var(--crisp-fg-primary); align-self: stretch; }
|
|
21
|
-
|
|
22
12
|
& .crisp-authshell-form { align-self: stretch; display: flex; flex-direction: column; gap: 28px; }
|
|
23
|
-
|
|
24
13
|
& .crisp-authshell-footer { margin-top: var(--crisp-space-6); display: flex; align-items: center; gap: var(--crisp-space-1); font-size: var(--crisp-text-sm); line-height: 16px; color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); }
|
|
25
14
|
& .crisp-authshell-footer a { color: inherit; font-weight: var(--crisp-weight-medium); text-decoration: underline; }
|
|
26
|
-
|
|
27
|
-
/* Auth-surface control treatment: flatter than the in-app chrome — a plain
|
|
28
|
-
hairline ring instead of elevation.field's soft glow, and a 36px (not
|
|
15
|
+
/* Auth-surface control treatment: flatter than the in-app chrome — a plain hairline ring instead of elevation.field's soft glow, and a 36px (not
|
|
29
16
|
40px) submit. Scoped to .crisp-authshell-body so a consumer keeps using
|
|
30
17
|
crisp's Input / FormField / Button and gets the auth treatment for free. */
|
|
31
18
|
& .crisp-authshell-body .crisp-formfield-label { font-size: var(--crisp-text-sm); line-height: 16px; font-weight: var(--crisp-weight-medium); letter-spacing: -0.12px; color: color-mix(in srgb, var(--crisp-fg-primary) 50%, transparent); padding-inline-start: var(--crisp-space-1); }
|
|
@@ -33,8 +20,7 @@
|
|
|
33
20
|
& .crisp-authshell-body .crisp-input { height: 34px; padding-inline: var(--crisp-space-2-5); border-radius: 10px; background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crisp-fg-primary) 6%, transparent); font-size: var(--crisp-text-lg); font-weight: var(--crisp-weight-medium); letter-spacing: -0.14px; transition: box-shadow .14s, background-color .14s; }
|
|
34
21
|
& .crisp-authshell-body .crisp-input:focus { box-shadow: inset 0 0 0 1px var(--crisp-bg-brand-solid); }
|
|
35
22
|
/* Same three-layer brand shadow as Button's primary intent, but the auth
|
|
36
|
-
button's inset ring is measured at rgba(0,0,0,0.06) — a hairline, not
|
|
37
|
-
the in-app button's rgba(255,255,255,0.07) highlight. */
|
|
23
|
+
button's inset ring is measured at rgba(0,0,0,0.06) — a hairline, not the in-app button's rgba(255,255,255,0.07) highlight. */
|
|
38
24
|
& .crisp-authshell-body .crisp-button { height: 36px; padding-inline: var(--crisp-space-3); border-radius: 10px; }
|
|
39
25
|
& .crisp-authshell-body .crisp-button--intent_primary { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(38,109,240,0.12), 0 3px 6px -2px rgba(38,109,240,0.08); }
|
|
40
26
|
|
|
@@ -43,8 +29,7 @@
|
|
|
43
29
|
that bracket, not a measured value. A CONTAINER query, not a media
|
|
44
30
|
query: the shell is embedded in the docs inside an ~800px column, where
|
|
45
31
|
a viewport query would keep the 1130px card and overflow it. Asking the
|
|
46
|
-
shell's own width is what "there isn't room for the preview" means. */
|
|
47
|
-
container-type: inline-size;
|
|
32
|
+
shell's own width is what "there isn't room for the preview" means. */ container-type: inline-size;
|
|
48
33
|
@container (max-width: 1200px) { & .crisp-authshell-preview { display: none; } }
|
|
49
34
|
}
|
|
50
35
|
|
|
@@ -1,32 +1,19 @@
|
|
|
1
1
|
@layer crisp-components {
|
|
2
2
|
.crisp-authshell {
|
|
3
|
-
min-height: 100%; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; position: relative;
|
|
4
|
-
background: var(--crisp-bg-surface); font-family: var(--crisp-font-sans); font-size: var(--crisp-text-lg); line-height: 20px; color: var(--crisp-fg-primary);
|
|
5
|
-
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
6
|
-
|
|
3
|
+
min-height: 100%; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; position: relative; background: var(--crisp-bg-surface); font-family: var(--crisp-font-sans); font-size: var(--crisp-text-lg); line-height: 20px; color: var(--crisp-fg-primary); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
7
4
|
& .crisp-authshell-progress { position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: var(--crisp-border-default); }
|
|
8
5
|
& .crisp-authshell-progress-fill { height: 2px; background: var(--crisp-fg-primary); border-radius: 4px; transition: width .2s; }
|
|
9
|
-
|
|
10
6
|
& .crisp-authshell-logo { margin-top: var(--crisp-space-8); height: 24px; display: flex; align-items: center; }
|
|
11
|
-
|
|
12
7
|
& .crisp-authshell-card { margin-top: var(--crisp-space-6); display: flex; height: 692px; border-radius: 20px; border: 1px solid var(--crisp-border-subtle); overflow: hidden; }
|
|
13
|
-
|
|
14
8
|
& .crisp-authshell-pane { flex: 0 0 564px; padding: 72px; display: flex; flex-direction: column; box-sizing: border-box; }
|
|
15
|
-
|
|
16
9
|
& .crisp-authshell-preview { flex: 0 0 564px; padding: 96px 64px; background: var(--crisp-bg-subtle); border-inline-start: 1px solid color-mix(in srgb, var(--crisp-fg-primary) 5%, transparent); position: relative; overflow: hidden; box-sizing: border-box; }
|
|
17
10
|
& .crisp-authshell-preview::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(color-mix(in srgb, var(--crisp-bg-subtle) 0%, transparent) 0%, var(--crisp-bg-subtle) 100%); pointer-events: none; }
|
|
18
|
-
|
|
19
11
|
& .crisp-authshell-body { width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--crisp-space-8); align-items: center; }
|
|
20
|
-
|
|
21
12
|
& .crisp-authshell-title { font-size: 20px; line-height: 24px; font-weight: var(--crisp-weight-semibold); letter-spacing: -0.4px; color: var(--crisp-fg-primary); align-self: stretch; }
|
|
22
|
-
|
|
23
13
|
& .crisp-authshell-form { align-self: stretch; display: flex; flex-direction: column; gap: 28px; }
|
|
24
|
-
|
|
25
14
|
& .crisp-authshell-footer { margin-top: var(--crisp-space-6); display: flex; align-items: center; gap: var(--crisp-space-1); font-size: var(--crisp-text-sm); line-height: 16px; color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); }
|
|
26
15
|
& .crisp-authshell-footer a { color: inherit; font-weight: var(--crisp-weight-medium); text-decoration: underline; }
|
|
27
|
-
|
|
28
|
-
/* Auth-surface control treatment: flatter than the in-app chrome — a plain
|
|
29
|
-
hairline ring instead of elevation.field's soft glow, and a 36px (not
|
|
16
|
+
/* Auth-surface control treatment: flatter than the in-app chrome — a plain hairline ring instead of elevation.field's soft glow, and a 36px (not
|
|
30
17
|
40px) submit. Scoped to .crisp-authshell-body so a consumer keeps using
|
|
31
18
|
crisp's Input / FormField / Button and gets the auth treatment for free. */
|
|
32
19
|
& .crisp-authshell-body .crisp-formfield-label { font-size: var(--crisp-text-sm); line-height: 16px; font-weight: var(--crisp-weight-medium); letter-spacing: -0.12px; color: color-mix(in srgb, var(--crisp-fg-primary) 50%, transparent); padding-inline-start: var(--crisp-space-1); }
|
|
@@ -34,8 +21,7 @@
|
|
|
34
21
|
& .crisp-authshell-body .crisp-input { height: 34px; padding-inline: var(--crisp-space-2-5); border-radius: 10px; background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crisp-fg-primary) 6%, transparent); font-size: var(--crisp-text-lg); font-weight: var(--crisp-weight-medium); letter-spacing: -0.14px; transition: box-shadow .14s, background-color .14s; }
|
|
35
22
|
& .crisp-authshell-body .crisp-input:focus { box-shadow: inset 0 0 0 1px var(--crisp-bg-brand-solid); }
|
|
36
23
|
/* Same three-layer brand shadow as Button's primary intent, but the auth
|
|
37
|
-
button's inset ring is measured at rgba(0,0,0,0.06) — a hairline, not
|
|
38
|
-
the in-app button's rgba(255,255,255,0.07) highlight. */
|
|
24
|
+
button's inset ring is measured at rgba(0,0,0,0.06) — a hairline, not the in-app button's rgba(255,255,255,0.07) highlight. */
|
|
39
25
|
& .crisp-authshell-body .crisp-button { height: 36px; padding-inline: var(--crisp-space-3); border-radius: 10px; }
|
|
40
26
|
& .crisp-authshell-body .crisp-button--intent_primary { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(38,109,240,0.12), 0 3px 6px -2px rgba(38,109,240,0.08); }
|
|
41
27
|
|
|
@@ -44,8 +30,7 @@
|
|
|
44
30
|
that bracket, not a measured value. A CONTAINER query, not a media
|
|
45
31
|
query: the shell is embedded in the docs inside an ~800px column, where
|
|
46
32
|
a viewport query would keep the 1130px card and overflow it. Asking the
|
|
47
|
-
shell's own width is what "there isn't room for the preview" means. */
|
|
48
|
-
container-type: inline-size;
|
|
33
|
+
shell's own width is what "there isn't room for the preview" means. */ container-type: inline-size;
|
|
49
34
|
@container (max-width: 1200px) { & .crisp-authshell-preview { display: none; } }
|
|
50
35
|
}
|
|
51
36
|
|
package/dist/avatar.css
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
.crisp-avatar {
|
|
2
|
-
display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-family: var(--crisp-font-sans); font-weight: var(--crisp-weight-semibold); overflow: hidden; user-select: none;
|
|
2
|
+
display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-family: var(--crisp-font-sans); font-weight: var(--crisp-weight-semibold); overflow: hidden; user-select: none;
|
|
3
|
+
& img { width: 100%; height: 100%; object-fit: cover; }
|
|
3
4
|
}
|
|
4
5
|
.crisp-avatar--size_sm {
|
|
5
6
|
height: 16px; width: 16px; font-size: 9px;
|
package/dist/avatar.layered.css
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@layer crisp-components {
|
|
2
2
|
.crisp-avatar {
|
|
3
|
-
display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-family: var(--crisp-font-sans); font-weight: var(--crisp-weight-semibold); overflow: hidden; user-select: none;
|
|
3
|
+
display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-family: var(--crisp-font-sans); font-weight: var(--crisp-weight-semibold); overflow: hidden; user-select: none;
|
|
4
|
+
& img { width: 100%; height: 100%; object-fit: cover; }
|
|
4
5
|
}
|
|
5
6
|
.crisp-avatar--size_sm {
|
|
6
7
|
height: 16px; width: 16px; font-size: 9px;
|
package/dist/board.css
CHANGED
|
@@ -17,10 +17,7 @@
|
|
|
17
17
|
& .crisp-board-card:focus { outline: none; }
|
|
18
18
|
& .crisp-board-card:focus-visible { outline: 2px solid var(--crisp-bg-brand-solid); outline-offset: 1px; }
|
|
19
19
|
/* announced, never drawn */
|
|
20
|
-
& .crisp-board-live {
|
|
21
|
-
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
|
|
22
|
-
overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
|
|
23
|
-
}
|
|
20
|
+
& .crisp-board-live { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
|
|
24
21
|
}
|
|
25
22
|
|
|
26
23
|
@media (prefers-reduced-motion: reduce) {
|
package/dist/board.layered.css
CHANGED
|
@@ -18,10 +18,7 @@
|
|
|
18
18
|
& .crisp-board-card:focus { outline: none; }
|
|
19
19
|
& .crisp-board-card:focus-visible { outline: 2px solid var(--crisp-bg-brand-solid); outline-offset: 1px; }
|
|
20
20
|
/* announced, never drawn */
|
|
21
|
-
& .crisp-board-live {
|
|
22
|
-
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
|
|
23
|
-
overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
|
|
24
|
-
}
|
|
21
|
+
& .crisp-board-live { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
|
|
25
22
|
}
|
|
26
23
|
|
|
27
24
|
@media (prefers-reduced-motion: reduce) {
|
package/dist/breadcrumb.css
CHANGED
|
@@ -7,5 +7,4 @@
|
|
|
7
7
|
& .crisp-breadcrumb-item[aria-current] { color: var(--crisp-fg-primary); font-weight: var(--crisp-weight-medium); }
|
|
8
8
|
& .crisp-breadcrumb-sep { flex-shrink: 0; color: color-mix(in srgb, var(--crisp-fg-primary) 28%, transparent); }
|
|
9
9
|
[dir="rtl"] & [data-rtl-flip] { transform: scaleX(-1); }
|
|
10
|
-
|
|
11
10
|
}
|
|
@@ -8,6 +8,5 @@
|
|
|
8
8
|
& .crisp-breadcrumb-item[aria-current] { color: var(--crisp-fg-primary); font-weight: var(--crisp-weight-medium); }
|
|
9
9
|
& .crisp-breadcrumb-sep { flex-shrink: 0; color: color-mix(in srgb, var(--crisp-fg-primary) 28%, transparent); }
|
|
10
10
|
[dir="rtl"] & [data-rtl-flip] { transform: scaleX(-1); }
|
|
11
|
-
|
|
12
11
|
}
|
|
13
12
|
}
|
package/dist/button.css
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
.crisp-button {
|
|
2
|
-
display: inline-flex; align-items: center; justify-content: center; gap: var(--crisp-space-1-5); font-family: var(--crisp-font-sans); font-weight: var(--crisp-weight-medium); letter-spacing: -0.14px; line-height: 20px; white-space: nowrap; border: none; cursor: pointer; transition: background-color .2s, box-shadow .2s, color .2s;
|
|
2
|
+
display: inline-flex; align-items: center; justify-content: center; gap: var(--crisp-space-1-5); font-family: var(--crisp-font-sans); font-weight: var(--crisp-weight-medium); letter-spacing: -0.14px; line-height: 20px; white-space: nowrap; border: none; cursor: pointer; transition: background-color .2s, box-shadow .2s, color .2s;
|
|
3
|
+
&:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
3
4
|
}
|
|
4
5
|
.crisp-button--intent_primary {
|
|
5
|
-
background: var(--crisp-bg-brand-solid); color: var(--crisp-fg-on-brand); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07), 0 2px 4px -2px rgba(38,109,240,0.12), 0 3px 6px -2px rgba(38,109,240,0.08);
|
|
6
|
+
background: var(--crisp-bg-brand-solid); color: var(--crisp-fg-on-brand); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07), 0 2px 4px -2px rgba(38,109,240,0.12), 0 3px 6px -2px rgba(38,109,240,0.08);
|
|
7
|
+
&:hover { background: var(--crisp-bg-brand-solid-pressed); }
|
|
8
|
+
&:active { background: var(--crisp-bg-brand-solid-pressed); }
|
|
6
9
|
}
|
|
7
10
|
.crisp-button--intent_neutral {
|
|
8
|
-
background: var(--crisp-bg-surface); color: var(--crisp-fg-primary); box-shadow: inset 0 0 0 1px var(--crisp-ring-neutral), 0 0 2px rgba(28,40,64,0.18), 0 1px 3px rgba(0,0,0,0.04);
|
|
11
|
+
background: var(--crisp-bg-surface); color: var(--crisp-fg-primary); box-shadow: inset 0 0 0 1px var(--crisp-ring-neutral), 0 0 2px rgba(28,40,64,0.18), 0 1px 3px rgba(0,0,0,0.04);
|
|
12
|
+
&:hover { background: var(--crisp-bg-raised); }
|
|
9
13
|
}
|
|
10
14
|
.crisp-button--intent_danger {
|
|
11
|
-
background: var(--crisp-bg-danger-solid); color: var(--crisp-fg-on-brand); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07), 0 2px 4px -2px rgba(186,37,37,0.20), 0 3px 6px -2px rgba(186,37,37,0.12);
|
|
15
|
+
background: var(--crisp-bg-danger-solid); color: var(--crisp-fg-on-brand); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07), 0 2px 4px -2px rgba(186,37,37,0.20), 0 3px 6px -2px rgba(186,37,37,0.12);
|
|
16
|
+
&:hover { filter: brightness(0.96); }
|
|
17
|
+
&:active { filter: brightness(0.92); }
|
|
12
18
|
}
|
|
13
19
|
.crisp-button--intent_ghost {
|
|
14
|
-
background: transparent; color: var(--crisp-fg-muted); box-shadow: none;
|
|
20
|
+
background: transparent; color: var(--crisp-fg-muted); box-shadow: none;
|
|
21
|
+
&:hover { background: var(--crisp-bg-raised); color: var(--crisp-fg-primary); }
|
|
15
22
|
}
|
|
16
23
|
.crisp-button--size_sm {
|
|
17
24
|
height: 24px; padding-inline: var(--crisp-space-1-5); font-size: var(--crisp-text-md); border-radius: var(--crisp-radius-md);
|
|
@@ -29,7 +36,8 @@
|
|
|
29
36
|
padding-inline: 0; aspect-ratio: 1 / 1;
|
|
30
37
|
}
|
|
31
38
|
.crisp-button--touchTarget_true {
|
|
32
|
-
position: relative;
|
|
39
|
+
position: relative;
|
|
40
|
+
&::after { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100%; height: 100%; min-width: 44px; min-height: 44px; }
|
|
33
41
|
}
|
|
34
42
|
.crisp-button--touchTarget_false {
|
|
35
43
|
|
package/dist/button.layered.css
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
@layer crisp-components {
|
|
2
2
|
.crisp-button {
|
|
3
|
-
display: inline-flex; align-items: center; justify-content: center; gap: var(--crisp-space-1-5); font-family: var(--crisp-font-sans); font-weight: var(--crisp-weight-medium); letter-spacing: -0.14px; line-height: 20px; white-space: nowrap; border: none; cursor: pointer; transition: background-color .2s, box-shadow .2s, color .2s;
|
|
3
|
+
display: inline-flex; align-items: center; justify-content: center; gap: var(--crisp-space-1-5); font-family: var(--crisp-font-sans); font-weight: var(--crisp-weight-medium); letter-spacing: -0.14px; line-height: 20px; white-space: nowrap; border: none; cursor: pointer; transition: background-color .2s, box-shadow .2s, color .2s;
|
|
4
|
+
&:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
4
5
|
}
|
|
5
6
|
.crisp-button--intent_primary {
|
|
6
|
-
background: var(--crisp-bg-brand-solid); color: var(--crisp-fg-on-brand); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07), 0 2px 4px -2px rgba(38,109,240,0.12), 0 3px 6px -2px rgba(38,109,240,0.08);
|
|
7
|
+
background: var(--crisp-bg-brand-solid); color: var(--crisp-fg-on-brand); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07), 0 2px 4px -2px rgba(38,109,240,0.12), 0 3px 6px -2px rgba(38,109,240,0.08);
|
|
8
|
+
&:hover { background: var(--crisp-bg-brand-solid-pressed); }
|
|
9
|
+
&:active { background: var(--crisp-bg-brand-solid-pressed); }
|
|
7
10
|
}
|
|
8
11
|
.crisp-button--intent_neutral {
|
|
9
|
-
background: var(--crisp-bg-surface); color: var(--crisp-fg-primary); box-shadow: inset 0 0 0 1px var(--crisp-ring-neutral), 0 0 2px rgba(28,40,64,0.18), 0 1px 3px rgba(0,0,0,0.04);
|
|
12
|
+
background: var(--crisp-bg-surface); color: var(--crisp-fg-primary); box-shadow: inset 0 0 0 1px var(--crisp-ring-neutral), 0 0 2px rgba(28,40,64,0.18), 0 1px 3px rgba(0,0,0,0.04);
|
|
13
|
+
&:hover { background: var(--crisp-bg-raised); }
|
|
10
14
|
}
|
|
11
15
|
.crisp-button--intent_danger {
|
|
12
|
-
background: var(--crisp-bg-danger-solid); color: var(--crisp-fg-on-brand); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07), 0 2px 4px -2px rgba(186,37,37,0.20), 0 3px 6px -2px rgba(186,37,37,0.12);
|
|
16
|
+
background: var(--crisp-bg-danger-solid); color: var(--crisp-fg-on-brand); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07), 0 2px 4px -2px rgba(186,37,37,0.20), 0 3px 6px -2px rgba(186,37,37,0.12);
|
|
17
|
+
&:hover { filter: brightness(0.96); }
|
|
18
|
+
&:active { filter: brightness(0.92); }
|
|
13
19
|
}
|
|
14
20
|
.crisp-button--intent_ghost {
|
|
15
|
-
background: transparent; color: var(--crisp-fg-muted); box-shadow: none;
|
|
21
|
+
background: transparent; color: var(--crisp-fg-muted); box-shadow: none;
|
|
22
|
+
&:hover { background: var(--crisp-bg-raised); color: var(--crisp-fg-primary); }
|
|
16
23
|
}
|
|
17
24
|
.crisp-button--size_sm {
|
|
18
25
|
height: 24px; padding-inline: var(--crisp-space-1-5); font-size: var(--crisp-text-md); border-radius: var(--crisp-radius-md);
|
|
@@ -30,7 +37,8 @@
|
|
|
30
37
|
padding-inline: 0; aspect-ratio: 1 / 1;
|
|
31
38
|
}
|
|
32
39
|
.crisp-button--touchTarget_true {
|
|
33
|
-
position: relative;
|
|
40
|
+
position: relative;
|
|
41
|
+
&::after { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100%; height: 100%; min-width: 44px; min-height: 44px; }
|
|
34
42
|
}
|
|
35
43
|
.crisp-button--touchTarget_false {
|
|
36
44
|
|
package/dist/card.css
CHANGED
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
|
|
14
14
|
}
|
|
15
15
|
.crisp-card--interactive_true {
|
|
16
|
-
cursor: pointer; transition: box-shadow 0.12s ease;
|
|
16
|
+
cursor: pointer; transition: box-shadow 0.12s ease;
|
|
17
|
+
&:hover { box-shadow: inset 0 0 0 1px var(--crisp-border-default), 0 1px 2px rgba(0,0,0,0.04), 0 6px 16px -6px rgba(28,40,64,0.12); }
|
|
17
18
|
}
|
|
18
19
|
.crisp-card--interactive_false {
|
|
19
20
|
|
package/dist/card.layered.css
CHANGED
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
}
|
|
16
16
|
.crisp-card--interactive_true {
|
|
17
|
-
cursor: pointer; transition: box-shadow 0.12s ease;
|
|
17
|
+
cursor: pointer; transition: box-shadow 0.12s ease;
|
|
18
|
+
&:hover { box-shadow: inset 0 0 0 1px var(--crisp-border-default), 0 1px 2px rgba(0,0,0,0.04), 0 6px 16px -6px rgba(28,40,64,0.12); }
|
|
18
19
|
}
|
|
19
20
|
.crisp-card--interactive_false {
|
|
20
21
|
|
package/dist/checkbox.css
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
.crisp-checkbox {
|
|
2
|
-
appearance: none; -webkit-appearance: none; box-sizing: border-box; flex-shrink: 0; margin: 0; width: 16px; height: 16px; border: none; border-radius: var(--crisp-radius-sm)
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
&:indeterminate { background-image: linear-gradient(var(--crisp-fg-on-brand), var(--crisp-fg-on-brand)); background-size: 8px 2px; }
|
|
9
|
-
&:focus-visible { outline: 2px solid var(--crisp-bg-brand-solid); outline-offset: 1px; }
|
|
10
|
-
|
|
2
|
+
appearance: none; -webkit-appearance: none; box-sizing: border-box; flex-shrink: 0; margin: 0; width: 16px; height: 16px; border: none; border-radius: var(--crisp-radius-sm) ; background: var(--crisp-bg-surface) ; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crisp-fg-primary) 9%, transparent); cursor: pointer; transition: background-color .12s, box-shadow .12s;
|
|
3
|
+
&:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crisp-fg-primary) 30%, transparent); }
|
|
4
|
+
&:checked, &:indeterminate { background: var(--crisp-bg-brand-solid) center / 10px no-repeat; box-shadow: none; }
|
|
5
|
+
&:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.5 5 9l4.5-5'/%3E%3C/svg%3E"); }
|
|
6
|
+
&:indeterminate { background-image: linear-gradient(var(--crisp-fg-on-brand), var(--crisp-fg-on-brand)); background-size: 8px 2px; }
|
|
7
|
+
&:focus-visible { outline: 2px solid var(--crisp-bg-brand-solid); outline-offset: 1px; }
|
|
11
8
|
}
|
|
12
9
|
|
|
13
10
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
@layer crisp-components {
|
|
2
2
|
.crisp-checkbox {
|
|
3
|
-
appearance: none; -webkit-appearance: none; box-sizing: border-box; flex-shrink: 0; margin: 0; width: 16px; height: 16px; border: none; border-radius: var(--crisp-radius-sm)
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
&:indeterminate { background-image: linear-gradient(var(--crisp-fg-on-brand), var(--crisp-fg-on-brand)); background-size: 8px 2px; }
|
|
10
|
-
&:focus-visible { outline: 2px solid var(--crisp-bg-brand-solid); outline-offset: 1px; }
|
|
11
|
-
|
|
3
|
+
appearance: none; -webkit-appearance: none; box-sizing: border-box; flex-shrink: 0; margin: 0; width: 16px; height: 16px; border: none; border-radius: var(--crisp-radius-sm) ; background: var(--crisp-bg-surface) ; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crisp-fg-primary) 9%, transparent); cursor: pointer; transition: background-color .12s, box-shadow .12s;
|
|
4
|
+
&:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crisp-fg-primary) 30%, transparent); }
|
|
5
|
+
&:checked, &:indeterminate { background: var(--crisp-bg-brand-solid) center / 10px no-repeat; box-shadow: none; }
|
|
6
|
+
&:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.5 5 9l4.5-5'/%3E%3C/svg%3E"); }
|
|
7
|
+
&:indeterminate { background-image: linear-gradient(var(--crisp-fg-on-brand), var(--crisp-fg-on-brand)); background-size: 8px 2px; }
|
|
8
|
+
&:focus-visible { outline: 2px solid var(--crisp-bg-brand-solid); outline-offset: 1px; }
|
|
12
9
|
}
|
|
13
10
|
|
|
14
11
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -1,35 +1,54 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.avatarRecipe = void 0;
|
|
3
|
+
exports.spec = exports.avatarRecipe = void 0;
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
|
-
const
|
|
6
|
+
const spec = (0, core_1.defineSpec)({
|
|
7
7
|
name: "avatar",
|
|
8
|
-
base:
|
|
8
|
+
base: {
|
|
9
|
+
display: "inline-flex",
|
|
10
|
+
alignItems: "center",
|
|
11
|
+
justifyContent: "center",
|
|
12
|
+
flexShrink: 0,
|
|
13
|
+
fontFamily: tokens_1.contract.font.sans,
|
|
14
|
+
fontWeight: tokens_1.contract.weight.semibold,
|
|
15
|
+
overflow: "hidden",
|
|
16
|
+
userSelect: "none",
|
|
17
|
+
},
|
|
18
|
+
parts: [
|
|
19
|
+
{
|
|
20
|
+
slot: "image",
|
|
21
|
+
selector: "& img",
|
|
22
|
+
decls: { width: "100%", height: "100%", objectFit: "cover" },
|
|
23
|
+
},
|
|
24
|
+
],
|
|
9
25
|
variants: {
|
|
10
26
|
size: {
|
|
11
|
-
sm:
|
|
12
|
-
md:
|
|
13
|
-
lg:
|
|
14
|
-
xl:
|
|
27
|
+
sm: { height: "16px", width: "16px", fontSize: "9px" },
|
|
28
|
+
md: { height: "20px", width: "20px", fontSize: "10px" },
|
|
29
|
+
lg: { height: "24px", width: "24px", fontSize: tokens_1.contract.text.sm },
|
|
30
|
+
xl: { height: "32px", width: "32px", fontSize: tokens_1.contract.text.lg },
|
|
15
31
|
},
|
|
16
32
|
shape: {
|
|
17
|
-
circle:
|
|
18
|
-
rounded:
|
|
33
|
+
circle: { borderRadius: tokens_1.contract.radius.full },
|
|
34
|
+
rounded: { borderRadius: "30%" },
|
|
19
35
|
},
|
|
20
36
|
tone: {
|
|
21
|
-
neutral:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
37
|
+
neutral: {
|
|
38
|
+
background: tokens_1.contract.bgRaised,
|
|
39
|
+
color: tokens_1.contract.fgMuted,
|
|
40
|
+
boxShadow: `inset 0 0 0 1px ${tokens_1.contract.borderDefault}`,
|
|
41
|
+
},
|
|
42
|
+
brand: { background: tokens_1.contract.bgBrandSolid, color: "#fff" },
|
|
43
|
+
orange: { background: tokens_1.contract.bgOrange, color: "#fff" },
|
|
44
|
+
cyan: { background: tokens_1.contract.bgCyan, color: "#fff" },
|
|
45
|
+
purple: { background: tokens_1.contract.bgPurple, color: "#fff" },
|
|
46
|
+
green: { background: tokens_1.contract.bgSuccess, color: "#fff" },
|
|
27
47
|
},
|
|
28
48
|
},
|
|
29
49
|
defaultVariants: { size: "md", shape: "circle", tone: "neutral" },
|
|
30
|
-
compoundVariants: [],
|
|
31
|
-
});
|
|
32
|
-
exports.avatarRecipe = Object.assign((0, core_1.resolveRecipe)(config), {
|
|
33
|
-
config,
|
|
34
50
|
});
|
|
51
|
+
exports.spec = spec;
|
|
52
|
+
const config = (0, core_1.specToRecipe)(spec);
|
|
53
|
+
exports.avatarRecipe = Object.assign((0, core_1.resolveRecipe)(config), { config });
|
|
35
54
|
exports.default = config;
|