@crisp-ui-kit/crisp 0.56.0 → 0.57.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/dist/callout.css +6 -0
- package/dist/callout.d.ts +2 -2
- package/dist/callout.layered.css +6 -0
- package/dist/cjs/components/callout/callout.js +2 -2
- package/dist/cjs/components/callout/callout.recipe.js +15 -2
- package/dist/cjs/components/input/input.recipe.js +6 -0
- package/dist/cjs/components/menu/menu.js +2 -2
- package/dist/cjs/components/menu/menu.recipe.js +8 -0
- package/dist/cjs/components/multiselect/multiselect.js +23 -10
- package/dist/cjs/components/multiselect/multiselect.recipe.js +95 -65
- package/dist/cjs/components/select/listbox-keyboard.js +7 -1
- package/dist/cjs/components/select/select.js +24 -11
- package/dist/cjs/components/select/select.recipe.js +150 -78
- package/dist/cjs/components/tabletoolbar/tabletoolbar.js +3 -3
- package/dist/cjs/components/tabletoolbar/tabletoolbar.recipe.js +26 -1
- package/dist/cjs/components/tabs/tabs.js +63 -4
- package/dist/cjs/components/tabs/tabs.recipe.js +13 -0
- package/dist/cjs/components/textlink/textlink.js +2 -2
- package/dist/cjs/components/textlink/textlink.recipe.js +18 -0
- package/dist/cjs/product/recordpage/recordpage.js +17 -4
- package/dist/cjs/tokens/elevation.js +7 -0
- package/dist/cjs/tokens/palette.js +41 -0
- package/dist/cjs/tokens/scale.js +8 -0
- package/dist/cjs/tokens/semantic.js +18 -0
- package/dist/esm/components/callout/callout.js +2 -2
- package/dist/esm/components/callout/callout.recipe.js +15 -2
- package/dist/esm/components/input/input.recipe.js +6 -0
- package/dist/esm/components/menu/menu.js +2 -2
- package/dist/esm/components/menu/menu.recipe.js +8 -0
- package/dist/esm/components/multiselect/multiselect.js +23 -10
- package/dist/esm/components/multiselect/multiselect.recipe.js +95 -65
- package/dist/esm/components/select/listbox-keyboard.js +7 -1
- package/dist/esm/components/select/select.js +24 -11
- package/dist/esm/components/select/select.recipe.js +150 -78
- package/dist/esm/components/tabletoolbar/tabletoolbar.js +3 -3
- package/dist/esm/components/tabletoolbar/tabletoolbar.recipe.js +26 -1
- package/dist/esm/components/tabs/tabs.js +63 -4
- package/dist/esm/components/tabs/tabs.recipe.js +13 -0
- package/dist/esm/components/textlink/textlink.js +2 -2
- package/dist/esm/components/textlink/textlink.recipe.js +18 -0
- package/dist/esm/product/recordpage/recordpage.js +18 -5
- package/dist/esm/tokens/elevation.js +7 -0
- package/dist/esm/tokens/palette.js +41 -0
- package/dist/esm/tokens/scale.js +8 -0
- package/dist/esm/tokens/semantic.js +18 -0
- package/dist/input.css +4 -0
- package/dist/input.d.ts +2 -2
- package/dist/input.layered.css +4 -0
- package/dist/menu.css +8 -0
- package/dist/menu.layered.css +8 -0
- package/dist/multiselect.css +53 -29
- package/dist/multiselect.d.ts +3 -1
- package/dist/multiselect.layered.css +53 -29
- package/dist/native/tokens.d.ts +1 -1
- package/dist/native/tokens.js +49 -6
- package/dist/select.css +80 -42
- package/dist/select.d.ts +3 -2
- package/dist/select.layered.css +80 -42
- package/dist/styles.css +199 -72
- package/dist/styles.layered.css +199 -72
- package/dist/tabletoolbar.css +8 -1
- package/dist/tabletoolbar.layered.css +8 -1
- package/dist/tabs.css +6 -0
- package/dist/tabs.layered.css +6 -0
- package/dist/textlink.css +9 -0
- package/dist/textlink.d.ts +2 -1
- package/dist/textlink.layered.css +9 -0
- package/dist/tokens.css +25 -0
- package/dist/tokens.json +49 -6
- package/dist/types/components/callout/callout.d.ts +9 -1
- package/dist/types/components/callout/callout.recipe.d.ts +12 -2
- package/dist/types/components/input/input.d.ts +2 -0
- package/dist/types/components/input/input.recipe.d.ts +3 -0
- package/dist/types/components/menu/menu.d.ts +7 -1
- package/dist/types/components/multiselect/multiselect.d.ts +24 -6
- package/dist/types/components/multiselect/multiselect.recipe.d.ts +24 -0
- package/dist/types/components/select/listbox-keyboard.d.ts +10 -1
- package/dist/types/components/select/select.d.ts +28 -6
- package/dist/types/components/select/select.recipe.d.ts +22 -10
- package/dist/types/components/tabletoolbar/tabletoolbar.d.ts +14 -0
- package/dist/types/components/tabs/tabs.d.ts +9 -1
- package/dist/types/components/textlink/textlink.d.ts +8 -1
- package/dist/types/components/textlink/textlink.recipe.d.ts +10 -0
- package/dist/types/product/recordpage/recordpage.d.ts +25 -1
- package/dist/types/tokens/contract.d.ts +13 -3
- package/dist/types/tokens/elevation.d.ts +7 -0
- package/dist/types/tokens/palette.d.ts +36 -0
- package/dist/types/tokens/scale.d.ts +5 -0
- package/dist/types/tokens/semantic.d.ts +18 -0
- package/package.json +1 -1
package/dist/select.css
CHANGED
|
@@ -1,57 +1,68 @@
|
|
|
1
1
|
|
|
2
2
|
/* pointer-events: auto (#375): a modal Dialog sets pointer-events: none
|
|
3
|
-
on document.body while open
|
|
4
|
-
|
|
5
|
-
inherited the lock, so every option was unclickable, hit-testing
|
|
6
|
-
right through to whatever real element sat behind it. */
|
|
3
|
+
on document.body while open, and the portaled listbox is outside its
|
|
4
|
+
knowledge -- it inherited the lock without this. */
|
|
7
5
|
.crisp-select-listbox {
|
|
8
6
|
font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
9
|
-
position: fixed; z-index: 70; pointer-events: auto; box-sizing: border-box; display: flex; flex-direction: column; gap: var(--crisp-space-
|
|
10
|
-
max-height:
|
|
11
|
-
border-radius: var(--crisp-radius-
|
|
12
|
-
box-shadow:
|
|
13
|
-
transform-origin: top left; opacity: 1; transform: none;
|
|
7
|
+
position: fixed; z-index: 70; pointer-events: auto; box-sizing: border-box; display: flex; flex-direction: column; gap: var(--crisp-space-2);
|
|
8
|
+
max-height: 480px; overflow-y: auto; padding: var(--crisp-space-2);
|
|
9
|
+
border-radius: var(--crisp-radius-3xl); background: var(--crisp-bg-select-listbox);
|
|
10
|
+
box-shadow: 0 4px 16px var(--crisp-shadow-select);
|
|
11
|
+
transform-origin: top left; opacity: 1; transform: none;
|
|
12
|
+
transition: opacity .15s cubic-bezier(0,0,.15,1), transform .15s cubic-bezier(0,0,.15,1);
|
|
14
13
|
}
|
|
15
|
-
.crisp-select-listbox[data-up] { transform-origin: bottom; }
|
|
16
|
-
.crisp-select-listbox { @starting-style { opacity: 0; transform: scale(0.
|
|
17
|
-
.crisp-select-search { display: flex; align-items: center; gap: var(--crisp-space-2); height: 34px; flex-shrink: 0; margin: calc(-1 * var(--crisp-space-
|
|
14
|
+
.crisp-select-listbox[data-up] { transform-origin: bottom left; }
|
|
15
|
+
.crisp-select-listbox { @starting-style { opacity: 0; transform: scale(0.95); } }
|
|
16
|
+
.crisp-select-search { display: flex; align-items: center; gap: var(--crisp-space-2); height: 34px; flex-shrink: 0; margin: calc(-1 * var(--crisp-space-2)) calc(-1 * var(--crisp-space-2)) var(--crisp-space-2); padding: 0 var(--crisp-space-2-5); border-bottom: 1px solid var(--crisp-border-subtle); color: var(--crisp-fg-neutral-muted); }
|
|
18
17
|
.crisp-select-search svg { flex-shrink: 0; }
|
|
19
|
-
.crisp-select-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-family: inherit; font-size: var(--crisp-text-lg); color: var(--crisp-fg-
|
|
20
|
-
.crisp-select-search input::placeholder { color: var(--crisp-fg-
|
|
21
|
-
.crisp-select-empty { padding: var(--crisp-space-3) var(--crisp-space-
|
|
22
|
-
/*
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
.crisp-select-label { padding: var(--crisp-space-1-5) var(--crisp-space-2) var(--crisp-space-0-5); font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-muted); }
|
|
18
|
+
.crisp-select-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-family: inherit; font-size: var(--crisp-text-lg); color: var(--crisp-fg-select-neutral); }
|
|
19
|
+
.crisp-select-search input::placeholder { color: var(--crisp-fg-select-placeholder); }
|
|
20
|
+
.crisp-select-empty { padding: var(--crisp-space-3) var(--crisp-space-4); text-align: center; font-size: var(--crisp-text-md); color: var(--crisp-fg-neutral-subtle); }
|
|
21
|
+
/* select.yaml's groupLabel -- font-size/line-height/weight are the same
|
|
22
|
+
across sizes, only paddingY differs (medium 8px, large 10px). */
|
|
23
|
+
.crisp-select-label { padding: var(--crisp-space-2) var(--crisp-space-4) 0; font-size: var(--crisp-text-md); line-height: 18px; font-weight: var(--crisp-weight-regular); color: var(--crisp-fg-neutral-subtle); }
|
|
26
24
|
.crisp-select-option {
|
|
27
|
-
box-sizing: border-box; display: flex; align-items: center;
|
|
28
|
-
padding:
|
|
29
|
-
font-family: inherit;
|
|
25
|
+
box-sizing: border-box; display: flex; align-items: center; flex-shrink: 0;
|
|
26
|
+
padding: var(--crisp-space-2-5) var(--crisp-space-4); margin-inline: 0; border: none; background: none; border-radius: var(--crisp-radius-xl);
|
|
27
|
+
font-family: inherit; color: var(--crisp-fg-select-neutral); text-align: start; cursor: pointer; white-space: nowrap;
|
|
28
|
+
transition: background-color .15s cubic-bezier(.35,0,.35,1), margin-inline .15s cubic-bezier(.35,0,.35,1);
|
|
30
29
|
}
|
|
30
|
+
/* Keyboard/hover highlight keeps crisp's own visible neutral fill --
|
|
31
|
+
seed's spec has no "highlighted" state at all (only pressed/selected/
|
|
32
|
+
disabled), and its actual pressed tint (below) is a ~3% black hint,
|
|
33
|
+
too faint to serve as a keyboard-navigation indicator. */
|
|
31
34
|
.crisp-select-option[data-highlighted] { background: var(--crisp-bg-raised); }
|
|
32
|
-
.crisp-select-option[data-disabled] {
|
|
33
|
-
.crisp-select-option-
|
|
35
|
+
.crisp-select-option:active:not([data-disabled]) { background: var(--crisp-bg-select-pressed); margin-inline: var(--crisp-space-2); }
|
|
36
|
+
.crisp-select-option[data-disabled] { cursor: not-allowed; }
|
|
37
|
+
.crisp-select-option[data-disabled] .crisp-select-option-label,
|
|
38
|
+
.crisp-select-option[data-disabled] .crisp-select-option-description,
|
|
39
|
+
.crisp-select-option[data-disabled] .crisp-select-option-check { color: var(--crisp-fg-disabled); }
|
|
40
|
+
.crisp-select-option-dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: var(--crisp-radius-full); margin-inline-end: var(--crisp-space-2); }
|
|
41
|
+
.crisp-select-option-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--crisp-space-0-5); }
|
|
34
42
|
.crisp-select-option-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
35
|
-
.crisp-select-option-
|
|
43
|
+
.crisp-select-option-description { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--crisp-fg-neutral-subtle); }
|
|
44
|
+
.crisp-select-option-check { flex-shrink: 0; color: var(--crisp-fg-select-neutral); margin-inline-start: var(--crisp-space-2); }
|
|
36
45
|
|
|
37
46
|
.crisp-select {
|
|
38
47
|
position: relative; display: inline-flex; font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
39
|
-
& .crisp-select-trigger { box-sizing: border-box; display: inline-flex; align-items: center;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
& .crisp-select-
|
|
44
|
-
& .crisp-select-
|
|
45
|
-
& .crisp-select-
|
|
46
|
-
& .crisp-select-trigger
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
.crisp-select--
|
|
52
|
-
|
|
53
|
-
& .crisp-select-
|
|
54
|
-
|
|
48
|
+
& .crisp-select-trigger { box-sizing: border-box; display: inline-flex; align-items: center; width: 100%; min-width: 0; margin: 0; border: 1px solid var(--crisp-stroke-select-trigger); background: transparent; cursor: pointer; font-family: inherit; color: var(--crisp-fg-select-neutral); transition: background-color .15s cubic-bezier(.35,0,.35,1), border-color .1s cubic-bezier(.35,0,.35,1), border-width .1s cubic-bezier(.35,0,.35,1); }
|
|
49
|
+
/* seed defines no hover state for this trigger -- only pressed, invalid, disabled and readonly. The scale-down is scoped to the CONTENT (seed's scaleScope: content), not the button itself, so the border
|
|
50
|
+
never moves. */
|
|
51
|
+
/* Only the value scales, not the chevron: the chevron's own transform is its open/close rotation, and a scale would fight it for one shared CSS property when both are true at once (pressing while open). */
|
|
52
|
+
& .crisp-select-trigger:active:not(:disabled):not([aria-readonly="true"]) { background: var(--crisp-bg-select-pressed); }
|
|
53
|
+
& .crisp-select-trigger:active:not(:disabled):not([aria-readonly="true"]) .crisp-select-value { transform: scale(0.98); }
|
|
54
|
+
& .crisp-select-trigger:focus-visible { outline: 2px solid var(--crisp-stroke-focus-ring); outline-offset: -2px; }
|
|
55
|
+
& .crisp-select-trigger:disabled { background: var(--crisp-bg-select-disabled); cursor: not-allowed; }
|
|
56
|
+
& .crisp-select-trigger:disabled .crisp-select-value, & .crisp-select-trigger:disabled .crisp-select-placeholder, & .crisp-select-trigger:disabled .crisp-select-chevron { color: var(--crisp-fg-disabled); }
|
|
57
|
+
/* readonly: same fill as disabled, but the value/placeholder text stays normal ink -- it reads as "answered and locked", not "answered and
|
|
58
|
+
greyed out" (select-trigger.yaml's readonly state only overrides
|
|
59
|
+
root.color; value/placeholder keep their enabled colours). */
|
|
60
|
+
& .crisp-select-trigger[aria-readonly="true"] { background: var(--crisp-bg-select-disabled); cursor: default; }
|
|
61
|
+
& .crisp-select-value { flex: 1; min-width: 0; display: inline-flex; align-items: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; transition: transform .15s cubic-bezier(0,0,.15,1); }
|
|
62
|
+
& .crisp-select-placeholder { color: var(--crisp-fg-select-placeholder); }
|
|
63
|
+
/* closeRotateDuration/closeRotateTimingFunction: 100ms, seed's "easing" curve. Overridden to 150ms on open (openRotateDuration) below -- same curve both ways, only the duration differs. */
|
|
64
|
+
& .crisp-select-chevron { flex-shrink: 0; color: var(--crisp-fg-neutral-muted); transition: transform .1s cubic-bezier(.35,0,.35,1); }
|
|
65
|
+
& .crisp-select-trigger[data-open] .crisp-select-chevron { transform: rotate(180deg); transition-duration: .15s; }
|
|
55
66
|
}
|
|
56
67
|
.crisp-select--width_full {
|
|
57
68
|
width: 100%;
|
|
@@ -59,12 +70,39 @@
|
|
|
59
70
|
.crisp-select--width_auto {
|
|
60
71
|
width: auto;
|
|
61
72
|
}
|
|
73
|
+
.crisp-select--size_medium {
|
|
74
|
+
& .crisp-select-trigger { height: var(--crisp-size-selectTriggerMd); border-radius: var(--crisp-radius-md); gap: var(--crisp-space-2); padding-inline: var(--crisp-space-3-5); }
|
|
75
|
+
& .crisp-select-value, & .crisp-select-placeholder { font-size: var(--crisp-text-lg); line-height: 19px; }
|
|
76
|
+
& .crisp-select-chevron { width: var(--crisp-size-icon); height: var(--crisp-size-icon); }
|
|
77
|
+
.crisp-select-option { gap: var(--crisp-space-2); }
|
|
78
|
+
.crisp-select-option-label { font-size: var(--crisp-text-lg); line-height: 19px; }
|
|
79
|
+
.crisp-select-option-description { font-size: var(--crisp-text-sm); line-height: 16px; }
|
|
80
|
+
.crisp-select-option-check { width: var(--crisp-space-3); height: var(--crisp-space-3); }
|
|
81
|
+
.crisp-select-label { padding-top: var(--crisp-space-2); }
|
|
82
|
+
}
|
|
83
|
+
.crisp-select--size_large {
|
|
84
|
+
& .crisp-select-trigger { height: var(--crisp-size-selectTriggerLg); border-radius: var(--crisp-radius-xl); gap: var(--crisp-space-2-5); padding-inline: var(--crisp-space-4); }
|
|
85
|
+
& .crisp-select-value, & .crisp-select-placeholder { font-size: var(--crisp-text-xl); line-height: 22px; }
|
|
86
|
+
& .crisp-select-chevron { width: var(--crisp-size-selectIconLg); height: var(--crisp-size-selectIconLg); }
|
|
87
|
+
.crisp-select-option { gap: var(--crisp-space-3); }
|
|
88
|
+
.crisp-select-option-label { font-size: var(--crisp-text-xl); line-height: 22px; }
|
|
89
|
+
.crisp-select-option-description { font-size: var(--crisp-text-md); line-height: 18px; }
|
|
90
|
+
.crisp-select-option-check { width: var(--crisp-space-3-5); height: var(--crisp-space-3-5); }
|
|
91
|
+
.crisp-select-label { padding-top: var(--crisp-space-2-5); }
|
|
92
|
+
}
|
|
62
93
|
.crisp-select--invalid_true {
|
|
63
|
-
& .crisp-select-trigger
|
|
94
|
+
& .crisp-select-trigger { border-width: 2px; border-color: var(--crisp-stroke-select-invalid); }
|
|
64
95
|
}
|
|
65
96
|
.crisp-select--invalid_false {
|
|
66
97
|
|
|
67
98
|
}
|
|
99
|
+
.crisp-select--variant_default {
|
|
100
|
+
|
|
101
|
+
}
|
|
102
|
+
.crisp-select--variant_ghost {
|
|
103
|
+
& .crisp-select-trigger { height: 100%; border-color: transparent; }
|
|
104
|
+
& .crisp-select-trigger:hover:not(:disabled) { background: var(--crisp-bg-select-pressed); }
|
|
105
|
+
}
|
|
68
106
|
|
|
69
107
|
@media (prefers-reduced-motion: reduce) {
|
|
70
108
|
.crisp-select, .crisp-select * {
|
package/dist/select.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { RecipeFn } from "../core/types";
|
|
2
2
|
|
|
3
3
|
export interface SelectVariants {
|
|
4
|
-
variant?: "default" | "ghost";
|
|
5
4
|
width?: "full" | "auto";
|
|
5
|
+
size?: "medium" | "large";
|
|
6
6
|
invalid?: boolean;
|
|
7
|
+
variant?: "default" | "ghost";
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
export declare const selectRecipe: RecipeFn<{
|
|
10
|
+
export declare const selectRecipe: RecipeFn<{ width: { full: string; auto: string }; size: { medium: string; large: string }; invalid: { true: string; false: string }; variant: { default: string; ghost: string } }>;
|
package/dist/select.layered.css
CHANGED
|
@@ -1,58 +1,69 @@
|
|
|
1
1
|
@layer crisp-components {
|
|
2
2
|
|
|
3
3
|
/* pointer-events: auto (#375): a modal Dialog sets pointer-events: none
|
|
4
|
-
on document.body while open
|
|
5
|
-
|
|
6
|
-
inherited the lock, so every option was unclickable, hit-testing
|
|
7
|
-
right through to whatever real element sat behind it. */
|
|
4
|
+
on document.body while open, and the portaled listbox is outside its
|
|
5
|
+
knowledge -- it inherited the lock without this. */
|
|
8
6
|
.crisp-select-listbox {
|
|
9
7
|
font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
10
|
-
position: fixed; z-index: 70; pointer-events: auto; box-sizing: border-box; display: flex; flex-direction: column; gap: var(--crisp-space-
|
|
11
|
-
max-height:
|
|
12
|
-
border-radius: var(--crisp-radius-
|
|
13
|
-
box-shadow:
|
|
14
|
-
transform-origin: top left; opacity: 1; transform: none;
|
|
8
|
+
position: fixed; z-index: 70; pointer-events: auto; box-sizing: border-box; display: flex; flex-direction: column; gap: var(--crisp-space-2);
|
|
9
|
+
max-height: 480px; overflow-y: auto; padding: var(--crisp-space-2);
|
|
10
|
+
border-radius: var(--crisp-radius-3xl); background: var(--crisp-bg-select-listbox);
|
|
11
|
+
box-shadow: 0 4px 16px var(--crisp-shadow-select);
|
|
12
|
+
transform-origin: top left; opacity: 1; transform: none;
|
|
13
|
+
transition: opacity .15s cubic-bezier(0,0,.15,1), transform .15s cubic-bezier(0,0,.15,1);
|
|
15
14
|
}
|
|
16
|
-
.crisp-select-listbox[data-up] { transform-origin: bottom; }
|
|
17
|
-
.crisp-select-listbox { @starting-style { opacity: 0; transform: scale(0.
|
|
18
|
-
.crisp-select-search { display: flex; align-items: center; gap: var(--crisp-space-2); height: 34px; flex-shrink: 0; margin: calc(-1 * var(--crisp-space-
|
|
15
|
+
.crisp-select-listbox[data-up] { transform-origin: bottom left; }
|
|
16
|
+
.crisp-select-listbox { @starting-style { opacity: 0; transform: scale(0.95); } }
|
|
17
|
+
.crisp-select-search { display: flex; align-items: center; gap: var(--crisp-space-2); height: 34px; flex-shrink: 0; margin: calc(-1 * var(--crisp-space-2)) calc(-1 * var(--crisp-space-2)) var(--crisp-space-2); padding: 0 var(--crisp-space-2-5); border-bottom: 1px solid var(--crisp-border-subtle); color: var(--crisp-fg-neutral-muted); }
|
|
19
18
|
.crisp-select-search svg { flex-shrink: 0; }
|
|
20
|
-
.crisp-select-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-family: inherit; font-size: var(--crisp-text-lg); color: var(--crisp-fg-
|
|
21
|
-
.crisp-select-search input::placeholder { color: var(--crisp-fg-
|
|
22
|
-
.crisp-select-empty { padding: var(--crisp-space-3) var(--crisp-space-
|
|
23
|
-
/*
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
.crisp-select-label { padding: var(--crisp-space-1-5) var(--crisp-space-2) var(--crisp-space-0-5); font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-muted); }
|
|
19
|
+
.crisp-select-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-family: inherit; font-size: var(--crisp-text-lg); color: var(--crisp-fg-select-neutral); }
|
|
20
|
+
.crisp-select-search input::placeholder { color: var(--crisp-fg-select-placeholder); }
|
|
21
|
+
.crisp-select-empty { padding: var(--crisp-space-3) var(--crisp-space-4); text-align: center; font-size: var(--crisp-text-md); color: var(--crisp-fg-neutral-subtle); }
|
|
22
|
+
/* select.yaml's groupLabel -- font-size/line-height/weight are the same
|
|
23
|
+
across sizes, only paddingY differs (medium 8px, large 10px). */
|
|
24
|
+
.crisp-select-label { padding: var(--crisp-space-2) var(--crisp-space-4) 0; font-size: var(--crisp-text-md); line-height: 18px; font-weight: var(--crisp-weight-regular); color: var(--crisp-fg-neutral-subtle); }
|
|
27
25
|
.crisp-select-option {
|
|
28
|
-
box-sizing: border-box; display: flex; align-items: center;
|
|
29
|
-
padding:
|
|
30
|
-
font-family: inherit;
|
|
26
|
+
box-sizing: border-box; display: flex; align-items: center; flex-shrink: 0;
|
|
27
|
+
padding: var(--crisp-space-2-5) var(--crisp-space-4); margin-inline: 0; border: none; background: none; border-radius: var(--crisp-radius-xl);
|
|
28
|
+
font-family: inherit; color: var(--crisp-fg-select-neutral); text-align: start; cursor: pointer; white-space: nowrap;
|
|
29
|
+
transition: background-color .15s cubic-bezier(.35,0,.35,1), margin-inline .15s cubic-bezier(.35,0,.35,1);
|
|
31
30
|
}
|
|
31
|
+
/* Keyboard/hover highlight keeps crisp's own visible neutral fill --
|
|
32
|
+
seed's spec has no "highlighted" state at all (only pressed/selected/
|
|
33
|
+
disabled), and its actual pressed tint (below) is a ~3% black hint,
|
|
34
|
+
too faint to serve as a keyboard-navigation indicator. */
|
|
32
35
|
.crisp-select-option[data-highlighted] { background: var(--crisp-bg-raised); }
|
|
33
|
-
.crisp-select-option[data-disabled] {
|
|
34
|
-
.crisp-select-option-
|
|
36
|
+
.crisp-select-option:active:not([data-disabled]) { background: var(--crisp-bg-select-pressed); margin-inline: var(--crisp-space-2); }
|
|
37
|
+
.crisp-select-option[data-disabled] { cursor: not-allowed; }
|
|
38
|
+
.crisp-select-option[data-disabled] .crisp-select-option-label,
|
|
39
|
+
.crisp-select-option[data-disabled] .crisp-select-option-description,
|
|
40
|
+
.crisp-select-option[data-disabled] .crisp-select-option-check { color: var(--crisp-fg-disabled); }
|
|
41
|
+
.crisp-select-option-dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: var(--crisp-radius-full); margin-inline-end: var(--crisp-space-2); }
|
|
42
|
+
.crisp-select-option-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--crisp-space-0-5); }
|
|
35
43
|
.crisp-select-option-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
36
|
-
.crisp-select-option-
|
|
44
|
+
.crisp-select-option-description { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--crisp-fg-neutral-subtle); }
|
|
45
|
+
.crisp-select-option-check { flex-shrink: 0; color: var(--crisp-fg-select-neutral); margin-inline-start: var(--crisp-space-2); }
|
|
37
46
|
|
|
38
47
|
.crisp-select {
|
|
39
48
|
position: relative; display: inline-flex; font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
40
|
-
& .crisp-select-trigger { box-sizing: border-box; display: inline-flex; align-items: center;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
& .crisp-select-
|
|
45
|
-
& .crisp-select-
|
|
46
|
-
& .crisp-select-
|
|
47
|
-
& .crisp-select-trigger
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
.crisp-select--
|
|
53
|
-
|
|
54
|
-
& .crisp-select-
|
|
55
|
-
|
|
49
|
+
& .crisp-select-trigger { box-sizing: border-box; display: inline-flex; align-items: center; width: 100%; min-width: 0; margin: 0; border: 1px solid var(--crisp-stroke-select-trigger); background: transparent; cursor: pointer; font-family: inherit; color: var(--crisp-fg-select-neutral); transition: background-color .15s cubic-bezier(.35,0,.35,1), border-color .1s cubic-bezier(.35,0,.35,1), border-width .1s cubic-bezier(.35,0,.35,1); }
|
|
50
|
+
/* seed defines no hover state for this trigger -- only pressed, invalid, disabled and readonly. The scale-down is scoped to the CONTENT (seed's scaleScope: content), not the button itself, so the border
|
|
51
|
+
never moves. */
|
|
52
|
+
/* Only the value scales, not the chevron: the chevron's own transform is its open/close rotation, and a scale would fight it for one shared CSS property when both are true at once (pressing while open). */
|
|
53
|
+
& .crisp-select-trigger:active:not(:disabled):not([aria-readonly="true"]) { background: var(--crisp-bg-select-pressed); }
|
|
54
|
+
& .crisp-select-trigger:active:not(:disabled):not([aria-readonly="true"]) .crisp-select-value { transform: scale(0.98); }
|
|
55
|
+
& .crisp-select-trigger:focus-visible { outline: 2px solid var(--crisp-stroke-focus-ring); outline-offset: -2px; }
|
|
56
|
+
& .crisp-select-trigger:disabled { background: var(--crisp-bg-select-disabled); cursor: not-allowed; }
|
|
57
|
+
& .crisp-select-trigger:disabled .crisp-select-value, & .crisp-select-trigger:disabled .crisp-select-placeholder, & .crisp-select-trigger:disabled .crisp-select-chevron { color: var(--crisp-fg-disabled); }
|
|
58
|
+
/* readonly: same fill as disabled, but the value/placeholder text stays normal ink -- it reads as "answered and locked", not "answered and
|
|
59
|
+
greyed out" (select-trigger.yaml's readonly state only overrides
|
|
60
|
+
root.color; value/placeholder keep their enabled colours). */
|
|
61
|
+
& .crisp-select-trigger[aria-readonly="true"] { background: var(--crisp-bg-select-disabled); cursor: default; }
|
|
62
|
+
& .crisp-select-value { flex: 1; min-width: 0; display: inline-flex; align-items: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; transition: transform .15s cubic-bezier(0,0,.15,1); }
|
|
63
|
+
& .crisp-select-placeholder { color: var(--crisp-fg-select-placeholder); }
|
|
64
|
+
/* closeRotateDuration/closeRotateTimingFunction: 100ms, seed's "easing" curve. Overridden to 150ms on open (openRotateDuration) below -- same curve both ways, only the duration differs. */
|
|
65
|
+
& .crisp-select-chevron { flex-shrink: 0; color: var(--crisp-fg-neutral-muted); transition: transform .1s cubic-bezier(.35,0,.35,1); }
|
|
66
|
+
& .crisp-select-trigger[data-open] .crisp-select-chevron { transform: rotate(180deg); transition-duration: .15s; }
|
|
56
67
|
}
|
|
57
68
|
.crisp-select--width_full {
|
|
58
69
|
width: 100%;
|
|
@@ -60,12 +71,39 @@
|
|
|
60
71
|
.crisp-select--width_auto {
|
|
61
72
|
width: auto;
|
|
62
73
|
}
|
|
74
|
+
.crisp-select--size_medium {
|
|
75
|
+
& .crisp-select-trigger { height: var(--crisp-size-selectTriggerMd); border-radius: var(--crisp-radius-md); gap: var(--crisp-space-2); padding-inline: var(--crisp-space-3-5); }
|
|
76
|
+
& .crisp-select-value, & .crisp-select-placeholder { font-size: var(--crisp-text-lg); line-height: 19px; }
|
|
77
|
+
& .crisp-select-chevron { width: var(--crisp-size-icon); height: var(--crisp-size-icon); }
|
|
78
|
+
.crisp-select-option { gap: var(--crisp-space-2); }
|
|
79
|
+
.crisp-select-option-label { font-size: var(--crisp-text-lg); line-height: 19px; }
|
|
80
|
+
.crisp-select-option-description { font-size: var(--crisp-text-sm); line-height: 16px; }
|
|
81
|
+
.crisp-select-option-check { width: var(--crisp-space-3); height: var(--crisp-space-3); }
|
|
82
|
+
.crisp-select-label { padding-top: var(--crisp-space-2); }
|
|
83
|
+
}
|
|
84
|
+
.crisp-select--size_large {
|
|
85
|
+
& .crisp-select-trigger { height: var(--crisp-size-selectTriggerLg); border-radius: var(--crisp-radius-xl); gap: var(--crisp-space-2-5); padding-inline: var(--crisp-space-4); }
|
|
86
|
+
& .crisp-select-value, & .crisp-select-placeholder { font-size: var(--crisp-text-xl); line-height: 22px; }
|
|
87
|
+
& .crisp-select-chevron { width: var(--crisp-size-selectIconLg); height: var(--crisp-size-selectIconLg); }
|
|
88
|
+
.crisp-select-option { gap: var(--crisp-space-3); }
|
|
89
|
+
.crisp-select-option-label { font-size: var(--crisp-text-xl); line-height: 22px; }
|
|
90
|
+
.crisp-select-option-description { font-size: var(--crisp-text-md); line-height: 18px; }
|
|
91
|
+
.crisp-select-option-check { width: var(--crisp-space-3-5); height: var(--crisp-space-3-5); }
|
|
92
|
+
.crisp-select-label { padding-top: var(--crisp-space-2-5); }
|
|
93
|
+
}
|
|
63
94
|
.crisp-select--invalid_true {
|
|
64
|
-
& .crisp-select-trigger
|
|
95
|
+
& .crisp-select-trigger { border-width: 2px; border-color: var(--crisp-stroke-select-invalid); }
|
|
65
96
|
}
|
|
66
97
|
.crisp-select--invalid_false {
|
|
67
98
|
|
|
68
99
|
}
|
|
100
|
+
.crisp-select--variant_default {
|
|
101
|
+
|
|
102
|
+
}
|
|
103
|
+
.crisp-select--variant_ghost {
|
|
104
|
+
& .crisp-select-trigger { height: 100%; border-color: transparent; }
|
|
105
|
+
& .crisp-select-trigger:hover:not(:disabled) { background: var(--crisp-bg-select-pressed); }
|
|
106
|
+
}
|
|
69
107
|
|
|
70
108
|
@media (prefers-reduced-motion: reduce) {
|
|
71
109
|
.crisp-select, .crisp-select * {
|