@crisp-ui-kit/crisp 0.37.0 → 0.39.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/badge.css +5 -5
- package/dist/badge.layered.css +5 -5
- package/dist/cjs/components/badge/badge.recipe.js +11 -5
- package/dist/cjs/components/contextmenu/contextmenu.js +1 -1
- package/dist/cjs/components/contextmenu/contextmenu.recipe.js +22 -10
- package/dist/cjs/components/fileupload/fileupload.js +2 -2
- package/dist/cjs/components/menu/menu.js +1 -1
- package/dist/cjs/components/menu/menu.recipe.js +32 -20
- package/dist/cjs/components/multiselect/multiselect.js +4 -4
- package/dist/cjs/components/multiselect/multiselect.recipe.js +50 -24
- package/dist/cjs/components/popover/popover.js +1 -1
- package/dist/cjs/components/popover/popover.recipe.js +19 -4
- package/dist/cjs/components/select/select.js +3 -3
- package/dist/cjs/components/select/select.recipe.js +42 -16
- package/dist/cjs/core/floating-portal.js +55 -2
- package/dist/cjs/tokens/palette.js +23 -0
- package/dist/cjs/tokens/semantic.js +7 -0
- package/dist/contextmenu.css +11 -9
- package/dist/contextmenu.layered.css +11 -9
- package/dist/esm/components/badge/badge.recipe.js +11 -5
- package/dist/esm/components/contextmenu/contextmenu.js +1 -1
- package/dist/esm/components/contextmenu/contextmenu.recipe.js +22 -10
- package/dist/esm/components/fileupload/fileupload.js +2 -2
- package/dist/esm/components/menu/menu.js +1 -1
- package/dist/esm/components/menu/menu.recipe.js +32 -20
- package/dist/esm/components/multiselect/multiselect.js +4 -4
- package/dist/esm/components/multiselect/multiselect.recipe.js +50 -24
- package/dist/esm/components/popover/popover.js +1 -1
- package/dist/esm/components/popover/popover.recipe.js +19 -4
- package/dist/esm/components/select/select.js +3 -3
- package/dist/esm/components/select/select.recipe.js +42 -16
- package/dist/esm/core/floating-portal.js +22 -2
- package/dist/esm/tokens/palette.js +23 -0
- package/dist/esm/tokens/semantic.js +7 -0
- package/dist/menu.css +34 -19
- package/dist/menu.layered.css +34 -19
- package/dist/multiselect.css +40 -21
- package/dist/multiselect.d.ts +2 -2
- package/dist/multiselect.layered.css +40 -21
- package/dist/native/tokens.d.ts +1 -1
- package/dist/native/tokens.js +24 -4
- package/dist/popover.css +5 -3
- package/dist/popover.layered.css +5 -3
- package/dist/select.css +33 -14
- package/dist/select.d.ts +2 -1
- package/dist/select.layered.css +33 -14
- package/dist/styles.css +138 -71
- package/dist/styles.layered.css +138 -71
- package/dist/tokens.css +10 -0
- package/dist/tokens.json +24 -4
- package/dist/types/components/fileupload/fileupload.d.ts +1 -1
- package/dist/types/components/multiselect/multiselect.d.ts +3 -1
- package/dist/types/components/multiselect/multiselect.recipe.d.ts +18 -3
- package/dist/types/components/select/select.d.ts +4 -1
- package/dist/types/components/select/select.recipe.d.ts +12 -0
- package/dist/types/core/floating-portal.d.ts +17 -3
- package/dist/types/product/sidebar/index.d.ts +1 -1
- package/dist/types/tokens/contract.d.ts +5 -0
- package/dist/types/tokens/palette.d.ts +20 -0
- package/dist/types/tokens/semantic.d.ts +7 -0
- package/package.json +3 -3
package/dist/styles.layered.css
CHANGED
|
@@ -38,6 +38,11 @@
|
|
|
38
38
|
--crisp-bg-purple: #9b69ff;
|
|
39
39
|
--crisp-bg-sidebar: #fbfbfb;
|
|
40
40
|
--crisp-bg-subtle: #fbfbfb;
|
|
41
|
+
--crisp-fg-brand-soft: #2057bd;
|
|
42
|
+
--crisp-fg-success-soft: #186b3d;
|
|
43
|
+
--crisp-fg-warning-soft: #80520d;
|
|
44
|
+
--crisp-fg-danger-soft: #a33539;
|
|
45
|
+
--crisp-fg-neutral-soft: #686870;
|
|
41
46
|
}
|
|
42
47
|
|
|
43
48
|
[data-theme="dark"] {
|
|
@@ -80,6 +85,11 @@
|
|
|
80
85
|
--crisp-bg-purple: #9b69ff;
|
|
81
86
|
--crisp-bg-sidebar: #0e0f10;
|
|
82
87
|
--crisp-bg-subtle: #0e0f10;
|
|
88
|
+
--crisp-fg-brand-soft: #568df3;
|
|
89
|
+
--crisp-fg-success-soft: #2ea968;
|
|
90
|
+
--crisp-fg-warning-soft: #e0982a;
|
|
91
|
+
--crisp-fg-danger-soft: #ff5a5f;
|
|
92
|
+
--crisp-fg-neutral-soft: #9a9aa2;
|
|
83
93
|
}
|
|
84
94
|
|
|
85
95
|
:root {
|
|
@@ -197,19 +207,19 @@
|
|
|
197
207
|
& .crisp-badge-dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: var(--crisp-radius-full); background: currentColor; }
|
|
198
208
|
}
|
|
199
209
|
.crisp-badge--tone_neutral {
|
|
200
|
-
background: var(--crisp-bg-raised); color: var(--crisp-fg-
|
|
210
|
+
background: var(--crisp-bg-raised); color: var(--crisp-fg-neutral-soft); box-shadow: inset 0 0 0 1px var(--crisp-border-default);
|
|
201
211
|
}
|
|
202
212
|
.crisp-badge--tone_brand {
|
|
203
|
-
background: color-mix(in srgb, var(--crisp-bg-brand-solid) 14%, transparent); color: var(--crisp-
|
|
213
|
+
background: color-mix(in srgb, var(--crisp-bg-brand-solid) 14%, transparent); color: var(--crisp-fg-brand-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crisp-bg-brand-solid) 30%, transparent);
|
|
204
214
|
}
|
|
205
215
|
.crisp-badge--tone_success {
|
|
206
|
-
background: color-mix(in srgb, var(--crisp-bg-success) 14%, transparent); color: var(--crisp-
|
|
216
|
+
background: color-mix(in srgb, var(--crisp-bg-success) 14%, transparent); color: var(--crisp-fg-success-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crisp-bg-success) 30%, transparent);
|
|
207
217
|
}
|
|
208
218
|
.crisp-badge--tone_warning {
|
|
209
|
-
background: color-mix(in srgb, var(--crisp-bg-warning) 16%, transparent); color: var(--crisp-
|
|
219
|
+
background: color-mix(in srgb, var(--crisp-bg-warning) 16%, transparent); color: var(--crisp-fg-warning-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crisp-bg-warning) 32%, transparent);
|
|
210
220
|
}
|
|
211
221
|
.crisp-badge--tone_danger {
|
|
212
|
-
background: color-mix(in srgb, var(--crisp-bg-danger) 14%, transparent); color: var(--crisp-
|
|
222
|
+
background: color-mix(in srgb, var(--crisp-bg-danger) 14%, transparent); color: var(--crisp-fg-danger-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crisp-bg-danger) 30%, transparent);
|
|
213
223
|
}
|
|
214
224
|
.crisp-badge--size_small {
|
|
215
225
|
height: 16px; padding-inline: var(--crisp-space-1-5); font-size: var(--crisp-text-xs); border-radius: var(--crisp-radius-sm);
|
|
@@ -449,17 +459,19 @@
|
|
|
449
459
|
}
|
|
450
460
|
}
|
|
451
461
|
|
|
462
|
+
|
|
463
|
+
.crisp-contextmenu-content { font-family: var(--crisp-font-sans); position: fixed; z-index: 70; min-width: 200px; box-sizing: border-box; padding: var(--crisp-space-1); border-radius: var(--crisp-radius-xl); background: var(--crisp-bg-popover); box-shadow: inset 0 0 0 1px var(--crisp-ring-popover), 0 0 0 1px var(--crisp-shadow-popover1), 0 4px 8px -4px var(--crisp-shadow-popover2), 0 4px 12px -2px var(--crisp-shadow-popover3); opacity: 1; transform: none; transition: opacity .08s ease, transform .08s ease; transform-origin: top left; @starting-style { opacity: 0; transform: scale(0.97) translateY(-1px); } }
|
|
464
|
+
.crisp-contextmenu-item { display: flex; align-items: center; gap: var(--crisp-space-2); width: 100%; height: var(--crisp-size-menuRow); box-sizing: border-box; padding: 0 var(--crisp-space-2); margin: 0; border: none; border-radius: var(--crisp-radius-md); background: none; color: var(--crisp-fg-primary); font-family: inherit; font-size: var(--crisp-text-lg); text-align: start; white-space: nowrap; cursor: pointer; }
|
|
465
|
+
.crisp-contextmenu-item svg { flex-shrink: 0; color: var(--crisp-fg-muted); }
|
|
466
|
+
.crisp-contextmenu-item:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 6%, transparent); }
|
|
467
|
+
.crisp-contextmenu-item--danger { color: var(--crisp-bg-danger); }
|
|
468
|
+
.crisp-contextmenu-item--danger svg { color: var(--crisp-bg-danger); }
|
|
469
|
+
.crisp-contextmenu-item--danger:hover { background: color-mix(in srgb, var(--crisp-bg-danger) 10%, transparent); }
|
|
470
|
+
.crisp-contextmenu-shortcut { margin-inline-start: auto; padding-inline-start: var(--crisp-space-3); color: var(--crisp-fg-muted); font-size: var(--crisp-text-sm); }
|
|
471
|
+
.crisp-contextmenu-sep { height: 1px; margin: var(--crisp-space-1) 0; border: none; background: var(--crisp-border-subtle); }
|
|
472
|
+
|
|
452
473
|
.crisp-contextmenu {
|
|
453
474
|
display: contents; font-family: var(--crisp-font-sans);
|
|
454
|
-
& .crisp-contextmenu-content { position: fixed; z-index: 70; min-width: 200px; box-sizing: border-box; padding: var(--crisp-space-1); border-radius: var(--crisp-radius-xl); background: var(--crisp-bg-popover); box-shadow: inset 0 0 0 1px var(--crisp-ring-popover), 0 0 0 1px var(--crisp-shadow-popover1), 0 4px 8px -4px var(--crisp-shadow-popover2), 0 4px 12px -2px var(--crisp-shadow-popover3); opacity: 1; transform: none; transition: opacity .08s ease, transform .08s ease; transform-origin: top left; @starting-style { opacity: 0; transform: scale(0.97) translateY(-1px); } }
|
|
455
|
-
& .crisp-contextmenu-item { display: flex; align-items: center; gap: var(--crisp-space-2); width: 100%; height: var(--crisp-size-menuRow); box-sizing: border-box; padding: 0 var(--crisp-space-2); margin: 0; border: none; border-radius: var(--crisp-radius-md); background: none; color: var(--crisp-fg-primary); font-family: inherit; font-size: var(--crisp-text-lg); text-align: start; white-space: nowrap; cursor: pointer; }
|
|
456
|
-
& .crisp-contextmenu-item svg { flex-shrink: 0; color: var(--crisp-fg-muted); }
|
|
457
|
-
& .crisp-contextmenu-item:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 6%, transparent); }
|
|
458
|
-
& .crisp-contextmenu-item--danger { color: var(--crisp-bg-danger); }
|
|
459
|
-
& .crisp-contextmenu-item--danger svg { color: var(--crisp-bg-danger); }
|
|
460
|
-
& .crisp-contextmenu-item--danger:hover { background: color-mix(in srgb, var(--crisp-bg-danger) 10%, transparent); }
|
|
461
|
-
& .crisp-contextmenu-shortcut { margin-inline-start: auto; padding-inline-start: var(--crisp-space-3); color: var(--crisp-fg-muted); font-size: var(--crisp-text-sm); }
|
|
462
|
-
& .crisp-contextmenu-sep { height: 1px; margin: var(--crisp-space-1) 0; border: none; background: var(--crisp-border-subtle); }
|
|
463
475
|
}
|
|
464
476
|
|
|
465
477
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -972,27 +984,42 @@
|
|
|
972
984
|
& .crisp-linechart-axis-title { margin-top: var(--crisp-space-1); padding-inline-start: var(--crisp-linechart-yaxis-width); text-align: center; font-size: var(--crisp-text-sm); color: var(--crisp-fg-muted); }
|
|
973
985
|
}
|
|
974
986
|
|
|
987
|
+
|
|
988
|
+
.crisp-menu-content {
|
|
989
|
+
font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
990
|
+
position: fixed; z-index: 70; box-sizing: border-box; display: flex; flex-direction: column; gap: var(--crisp-space-px);
|
|
991
|
+
min-width: 200px; max-height: 360px; overflow-y: auto; padding: var(--crisp-space-1);
|
|
992
|
+
border-radius: var(--crisp-radius-xl); background: var(--crisp-bg-popover);
|
|
993
|
+
box-shadow: inset 0 0 0 1px var(--crisp-ring-popover), 0 0 0 1px var(--crisp-shadow-popover1), 0 4px 8px -4px var(--crisp-shadow-popover2), 0 4px 12px -2px var(--crisp-shadow-popover3);
|
|
994
|
+
transform-origin: top left; opacity: 1; transform: none; transition: opacity .08s ease, transform .08s ease;
|
|
995
|
+
}
|
|
996
|
+
.crisp-menu-content[data-align="end"] { transform-origin: top right; }
|
|
997
|
+
.crisp-menu-content[data-up] { transform-origin: bottom left; }
|
|
998
|
+
.crisp-menu-content[data-up][data-align="end"] { transform-origin: bottom right; }
|
|
999
|
+
.crisp-menu-content { @starting-style { opacity: 0; transform: scale(0.97) translateY(-1px); } }
|
|
1000
|
+
|
|
1001
|
+
.crisp-menu-item {
|
|
1002
|
+
box-sizing: border-box; display: flex; align-items: center; gap: var(--crisp-space-1-5); width: 100%; height: var(--crisp-size-menuRow); flex-shrink: 0;
|
|
1003
|
+
margin: 0; padding: 0 var(--crisp-space-2); border: none; background: none; border-radius: var(--crisp-radius-md);
|
|
1004
|
+
font-family: inherit; font-size: var(--crisp-text-lg); color: var(--crisp-fg-primary); text-align: start; cursor: pointer; white-space: nowrap;
|
|
1005
|
+
}
|
|
1006
|
+
.crisp-menu-item svg { flex-shrink: 0; color: var(--crisp-fg-muted); }
|
|
1007
|
+
.crisp-menu-item:focus { outline: none; }
|
|
1008
|
+
.crisp-menu-item:hover:not([data-disabled]), .crisp-menu-item:focus-visible:not([data-disabled]), .crisp-menu-item[data-highlighted]:not([data-disabled]) { background: var(--crisp-bg-raised); }
|
|
1009
|
+
.crisp-menu-item[data-disabled] { opacity: 0.5; cursor: not-allowed; }
|
|
1010
|
+
.crisp-menu-item--danger { color: var(--crisp-bg-danger); }
|
|
1011
|
+
.crisp-menu-item--danger svg { color: var(--crisp-bg-danger); }
|
|
1012
|
+
.crisp-menu-item--danger:hover, .crisp-menu-item--danger:focus-visible, .crisp-menu-item--danger[data-highlighted] { background: color-mix(in srgb, var(--crisp-bg-danger) 10%, transparent); }
|
|
1013
|
+
.crisp-menu-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
1014
|
+
.crisp-menu-item-shortcut { flex-shrink: 0; margin-inline-start: var(--crisp-space-3); font-size: var(--crisp-text-sm); color: var(--crisp-fg-muted); letter-spacing: 0.02em; }
|
|
1015
|
+
.crisp-menu-item-check { flex-shrink: 0; color: var(--crisp-bg-brand-solid); }
|
|
1016
|
+
.crisp-menu-item-check--placeholder { width: 15px; }
|
|
1017
|
+
|
|
1018
|
+
.crisp-menu-sep { height: 1px; flex-shrink: 0; border: none; margin: var(--crisp-space-1) calc(-1 * var(--crisp-space-1)); background: var(--crisp-border-subtle); }
|
|
1019
|
+
.crisp-menu-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); }
|
|
1020
|
+
|
|
975
1021
|
.crisp-menu {
|
|
976
1022
|
position: relative; display: inline-flex; font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
977
|
-
& .crisp-menu-content { position: fixed; z-index: 70; box-sizing: border-box; display: flex; flex-direction: column; gap: var(--crisp-space-px); min-width: 200px; max-height: 360px; overflow-y: auto; padding: var(--crisp-space-1); border-radius: var(--crisp-radius-xl); background: var(--crisp-bg-popover); box-shadow: inset 0 0 0 1px var(--crisp-ring-popover), 0 0 0 1px var(--crisp-shadow-popover1), 0 4px 8px -4px var(--crisp-shadow-popover2), 0 4px 12px -2px var(--crisp-shadow-popover3); transform-origin: top left; opacity: 1; transform: none; transition: opacity .08s ease, transform .08s ease; }
|
|
978
|
-
& .crisp-menu-content[data-align="end"] { transform-origin: top right; }
|
|
979
|
-
& .crisp-menu-content[data-up] { transform-origin: bottom left; }
|
|
980
|
-
& .crisp-menu-content[data-up][data-align="end"] { transform-origin: bottom right; }
|
|
981
|
-
& .crisp-menu-content { @starting-style { opacity: 0; transform: scale(0.97) translateY(-1px); } }
|
|
982
|
-
& .crisp-menu-item { box-sizing: border-box; display: flex; align-items: center; gap: var(--crisp-space-1-5); width: 100%; height: var(--crisp-size-menuRow); flex-shrink: 0; margin: 0; padding: 0 var(--crisp-space-2); border: none; background: none; border-radius: var(--crisp-radius-md); font-family: inherit; font-size: var(--crisp-text-lg); color: var(--crisp-fg-primary); text-align: start; cursor: pointer; white-space: nowrap; }
|
|
983
|
-
& .crisp-menu-item svg { flex-shrink: 0; color: var(--crisp-fg-muted); }
|
|
984
|
-
& .crisp-menu-item:focus { outline: none; }
|
|
985
|
-
& .crisp-menu-item:hover:not([data-disabled]), & .crisp-menu-item:focus-visible:not([data-disabled]), & .crisp-menu-item[data-highlighted]:not([data-disabled]) { background: var(--crisp-bg-raised); }
|
|
986
|
-
& .crisp-menu-item[data-disabled] { opacity: 0.5; cursor: not-allowed; }
|
|
987
|
-
& .crisp-menu-item--danger { color: var(--crisp-bg-danger); }
|
|
988
|
-
& .crisp-menu-item--danger svg { color: var(--crisp-bg-danger); }
|
|
989
|
-
& .crisp-menu-item--danger:hover, & .crisp-menu-item--danger:focus-visible, & .crisp-menu-item--danger[data-highlighted] { background: color-mix(in srgb, var(--crisp-bg-danger) 10%, transparent); }
|
|
990
|
-
& .crisp-menu-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
991
|
-
& .crisp-menu-item-shortcut { flex-shrink: 0; margin-inline-start: var(--crisp-space-3); font-size: var(--crisp-text-sm); color: var(--crisp-fg-muted); letter-spacing: 0.02em; }
|
|
992
|
-
& .crisp-menu-item-check { flex-shrink: 0; color: var(--crisp-bg-brand-solid); }
|
|
993
|
-
& .crisp-menu-item-check--placeholder { width: 15px; }
|
|
994
|
-
& .crisp-menu-sep { height: 1px; flex-shrink: 0; border: none; margin: var(--crisp-space-1) calc(-1 * var(--crisp-space-1)); background: var(--crisp-border-subtle); }
|
|
995
|
-
& .crisp-menu-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); }
|
|
996
1023
|
}
|
|
997
1024
|
|
|
998
1025
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -1003,6 +1030,40 @@
|
|
|
1003
1030
|
}
|
|
1004
1031
|
}
|
|
1005
1032
|
|
|
1033
|
+
|
|
1034
|
+
.crisp-multiselect-listbox {
|
|
1035
|
+
font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
1036
|
+
position: fixed; z-index: 70; box-sizing: border-box; display: flex; flex-direction: column; gap: var(--crisp-space-px);
|
|
1037
|
+
max-height: 300px; overflow-y: auto; padding: var(--crisp-space-1);
|
|
1038
|
+
border-radius: var(--crisp-radius-xl); background: var(--crisp-bg-popover);
|
|
1039
|
+
box-shadow: inset 0 0 0 1px var(--crisp-ring-popover), 0 0 0 1px var(--crisp-shadow-popover1), 0 4px 8px -4px var(--crisp-shadow-popover2), 0 4px 12px -2px var(--crisp-shadow-popover3);
|
|
1040
|
+
transform-origin: top left; opacity: 1; transform: none; transition: opacity .08s ease, transform .08s ease;
|
|
1041
|
+
}
|
|
1042
|
+
.crisp-multiselect-listbox[data-up] { transform-origin: bottom left; }
|
|
1043
|
+
.crisp-multiselect-listbox { @starting-style { opacity: 0; transform: scale(0.97) translateY(-1px); } }
|
|
1044
|
+
.crisp-multiselect-search { display: flex; align-items: center; gap: var(--crisp-space-2); height: 34px; flex-shrink: 0; margin: calc(-1 * var(--crisp-space-1)) calc(-1 * var(--crisp-space-1)) var(--crisp-space-1); padding: 0 var(--crisp-space-2-5); border-bottom: 1px solid var(--crisp-border-subtle); color: var(--crisp-fg-muted); }
|
|
1045
|
+
.crisp-multiselect-search svg { flex-shrink: 0; }
|
|
1046
|
+
.crisp-multiselect-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-primary); }
|
|
1047
|
+
.crisp-multiselect-search input::placeholder { color: var(--crisp-fg-muted); }
|
|
1048
|
+
.crisp-multiselect-option {
|
|
1049
|
+
box-sizing: border-box; display: flex; align-items: center; gap: var(--crisp-space-2); height: var(--crisp-size-menuRow); flex-shrink: 0;
|
|
1050
|
+
padding: 0 var(--crisp-space-2); margin: 0; border: none; background: none; border-radius: var(--crisp-radius-md); font-family: inherit; cursor: pointer; text-align: start;
|
|
1051
|
+
}
|
|
1052
|
+
.crisp-multiselect-option[data-highlighted] { background: var(--crisp-bg-raised); }
|
|
1053
|
+
.crisp-multiselect-option-chip { flex: 0 1 auto; min-width: 0; overflow: hidden; }
|
|
1054
|
+
.crisp-multiselect-check { flex-shrink: 0; margin-inline-start: auto; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: var(--crisp-radius-sm); box-shadow: inset 0 0 0 1.5px var(--crisp-border-default); color: transparent; }
|
|
1055
|
+
.crisp-multiselect-option[aria-selected="true"] .crisp-multiselect-check { background: var(--crisp-bg-brand-solid); box-shadow: none; color: #fff; }
|
|
1056
|
+
.crisp-multiselect-empty { padding: var(--crisp-space-3) var(--crisp-space-2); text-align: center; font-size: var(--crisp-text-md); color: var(--crisp-fg-muted); }
|
|
1057
|
+
|
|
1058
|
+
.crisp-recordstable-tag { display: inline-flex; align-items: center; height: var(--crisp-size-chip); padding: 0 var(--crisp-space-1); border-radius: var(--crisp-radius-chip); font-size: var(--crisp-text-lg); line-height: 20px; font-weight: var(--crisp-weight-medium); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: color-mix(in srgb, var(--crisp-fg-primary) 6%, transparent); color: color-mix(in srgb, var(--crisp-fg-primary) 82%, transparent); }
|
|
1059
|
+
.crisp-recordstable-tag[data-tone="brand"] { background: color-mix(in srgb, var(--crisp-bg-brand-solid) 14%, transparent); color: color-mix(in srgb, var(--crisp-bg-brand-solid) 82%, var(--crisp-fg-primary)); }
|
|
1060
|
+
.crisp-recordstable-tag[data-tone="success"] { background: color-mix(in srgb, var(--crisp-bg-success) 16%, transparent); color: color-mix(in srgb, var(--crisp-bg-success) 78%, var(--crisp-fg-primary)); }
|
|
1061
|
+
.crisp-recordstable-tag[data-tone="warning"] { background: color-mix(in srgb, var(--crisp-bg-warning) 18%, transparent); color: color-mix(in srgb, var(--crisp-bg-warning) 82%, var(--crisp-fg-primary)); }
|
|
1062
|
+
.crisp-recordstable-tag[data-tone="danger"] { background: color-mix(in srgb, var(--crisp-bg-danger) 15%, transparent); color: color-mix(in srgb, var(--crisp-bg-danger) 80%, var(--crisp-fg-primary)); }
|
|
1063
|
+
.crisp-recordstable-tag[data-tone="purple"] { background: color-mix(in srgb, var(--crisp-bg-purple) 16%, transparent); color: color-mix(in srgb, var(--crisp-bg-purple) 80%, var(--crisp-fg-primary)); }
|
|
1064
|
+
.crisp-recordstable-tag[data-tone="cyan"] { background: color-mix(in srgb, var(--crisp-bg-cyan) 18%, transparent); color: color-mix(in srgb, var(--crisp-bg-cyan) 82%, var(--crisp-fg-primary)); }
|
|
1065
|
+
.crisp-recordstable-tag[data-tone="orange"] { background: color-mix(in srgb, var(--crisp-bg-orange) 16%, transparent); color: color-mix(in srgb, var(--crisp-bg-orange) 82%, var(--crisp-fg-primary)); }
|
|
1066
|
+
|
|
1006
1067
|
.crisp-multiselect {
|
|
1007
1068
|
position: relative; display: inline-flex; width: 100%; font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
1008
1069
|
& .crisp-multiselect-trigger { box-sizing: border-box; display: flex; align-items: center; gap: var(--crisp-space-1); width: 100%; min-width: 0; min-height: var(--crisp-size-menuRow); margin: 0; padding: var(--crisp-space-0-5) var(--crisp-space-1-5) var(--crisp-space-0-5) var(--crisp-space-2); border: none; border-radius: var(--crisp-radius-md); background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crisp-fg-primary) 7%, transparent); font-family: inherit; font-size: var(--crisp-text-lg); color: var(--crisp-fg-primary); cursor: pointer; text-align: start; transition: background-color .12s ease, box-shadow .12s ease; }
|
|
@@ -1013,27 +1074,12 @@
|
|
|
1013
1074
|
& .crisp-multiselect-placeholder { color: var(--crisp-fg-muted); }
|
|
1014
1075
|
& .crisp-multiselect-chevron { flex-shrink: 0; color: var(--crisp-fg-muted); transition: transform .15s ease; }
|
|
1015
1076
|
& .crisp-multiselect-trigger[data-open] .crisp-multiselect-chevron { transform: rotate(180deg); }
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
& .crisp-multiselect-search input::placeholder { color: var(--crisp-fg-muted); }
|
|
1023
|
-
& .crisp-multiselect-option { box-sizing: border-box; display: flex; align-items: center; gap: var(--crisp-space-2); height: var(--crisp-size-menuRow); flex-shrink: 0; padding: 0 var(--crisp-space-2); margin: 0; border: none; background: none; border-radius: var(--crisp-radius-md); font-family: inherit; cursor: pointer; text-align: start; }
|
|
1024
|
-
& .crisp-multiselect-option[data-highlighted] { background: var(--crisp-bg-raised); }
|
|
1025
|
-
& .crisp-multiselect-option-chip { flex: 0 1 auto; min-width: 0; overflow: hidden; }
|
|
1026
|
-
& .crisp-multiselect-check { flex-shrink: 0; margin-inline-start: auto; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: var(--crisp-radius-sm); box-shadow: inset 0 0 0 1.5px var(--crisp-border-default); color: transparent; }
|
|
1027
|
-
& .crisp-multiselect-option[aria-selected="true"] .crisp-multiselect-check { background: var(--crisp-bg-brand-solid); box-shadow: none; color: #fff; }
|
|
1028
|
-
& .crisp-multiselect-empty { padding: var(--crisp-space-3) var(--crisp-space-2); text-align: center; font-size: var(--crisp-text-md); color: var(--crisp-fg-muted); }
|
|
1029
|
-
& .crisp-recordstable-tag { display: inline-flex; align-items: center; height: var(--crisp-size-chip); padding: 0 var(--crisp-space-1); border-radius: var(--crisp-radius-chip); font-size: var(--crisp-text-lg); line-height: 20px; font-weight: var(--crisp-weight-medium); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: color-mix(in srgb, var(--crisp-fg-primary) 6%, transparent); color: color-mix(in srgb, var(--crisp-fg-primary) 82%, transparent); }
|
|
1030
|
-
& .crisp-recordstable-tag[data-tone="brand"] { background: color-mix(in srgb, var(--crisp-bg-brand-solid) 14%, transparent); color: color-mix(in srgb, var(--crisp-bg-brand-solid) 82%, var(--crisp-fg-primary)); }
|
|
1031
|
-
& .crisp-recordstable-tag[data-tone="success"] { background: color-mix(in srgb, var(--crisp-bg-success) 16%, transparent); color: color-mix(in srgb, var(--crisp-bg-success) 78%, var(--crisp-fg-primary)); }
|
|
1032
|
-
& .crisp-recordstable-tag[data-tone="warning"] { background: color-mix(in srgb, var(--crisp-bg-warning) 18%, transparent); color: color-mix(in srgb, var(--crisp-bg-warning) 82%, var(--crisp-fg-primary)); }
|
|
1033
|
-
& .crisp-recordstable-tag[data-tone="danger"] { background: color-mix(in srgb, var(--crisp-bg-danger) 15%, transparent); color: color-mix(in srgb, var(--crisp-bg-danger) 80%, var(--crisp-fg-primary)); }
|
|
1034
|
-
& .crisp-recordstable-tag[data-tone="purple"] { background: color-mix(in srgb, var(--crisp-bg-purple) 16%, transparent); color: color-mix(in srgb, var(--crisp-bg-purple) 80%, var(--crisp-fg-primary)); }
|
|
1035
|
-
& .crisp-recordstable-tag[data-tone="cyan"] { background: color-mix(in srgb, var(--crisp-bg-cyan) 18%, transparent); color: color-mix(in srgb, var(--crisp-bg-cyan) 82%, var(--crisp-fg-primary)); }
|
|
1036
|
-
& .crisp-recordstable-tag[data-tone="orange"] { background: color-mix(in srgb, var(--crisp-bg-orange) 16%, transparent); color: color-mix(in srgb, var(--crisp-bg-orange) 82%, var(--crisp-fg-primary)); }
|
|
1077
|
+
}
|
|
1078
|
+
.crisp-multiselect--invalid_true {
|
|
1079
|
+
& .crisp-multiselect-trigger, & .crisp-multiselect-trigger:hover, & .crisp-multiselect-trigger[data-open], & .crisp-multiselect-trigger:focus-visible { box-shadow: inset 0 0 0 1px var(--crisp-bg-danger); }
|
|
1080
|
+
}
|
|
1081
|
+
.crisp-multiselect--invalid_false {
|
|
1082
|
+
|
|
1037
1083
|
}
|
|
1038
1084
|
|
|
1039
1085
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -1044,11 +1090,13 @@
|
|
|
1044
1090
|
}
|
|
1045
1091
|
}
|
|
1046
1092
|
|
|
1093
|
+
|
|
1094
|
+
.crisp-popover-content { font-family: var(--crisp-font-sans); position: fixed; z-index: 70; box-sizing: border-box; min-width: 200px; max-width: min(360px, 92vw); padding: var(--crisp-space-1); border-radius: var(--crisp-radius-xl); background: var(--crisp-bg-popover); color: var(--crisp-fg-primary); box-shadow: inset 0 0 0 1px var(--crisp-ring-popover), 0 0 0 1px var(--crisp-shadow-popover1), 0 4px 8px -4px var(--crisp-shadow-popover2), 0 4px 12px -2px var(--crisp-shadow-popover3); opacity: 1; transform: none; transition: opacity 0.08s ease, transform 0.08s ease; transform-origin: top left; @starting-style { opacity: 0; transform: scale(0.97) translateY(-1px); } }
|
|
1095
|
+
.crisp-popover-content[data-align="end"] { transform-origin: top right; }
|
|
1096
|
+
.crisp-popover-content[data-up] { transform-origin: bottom left; }
|
|
1097
|
+
|
|
1047
1098
|
.crisp-popover {
|
|
1048
1099
|
display: contents; font-family: var(--crisp-font-sans);
|
|
1049
|
-
& .crisp-popover-content { position: fixed; z-index: 70; box-sizing: border-box; min-width: 200px; max-width: min(360px, 92vw); padding: var(--crisp-space-1); border-radius: var(--crisp-radius-xl); background: var(--crisp-bg-popover); color: var(--crisp-fg-primary); box-shadow: inset 0 0 0 1px var(--crisp-ring-popover), 0 0 0 1px var(--crisp-shadow-popover1), 0 4px 8px -4px var(--crisp-shadow-popover2), 0 4px 12px -2px var(--crisp-shadow-popover3); opacity: 1; transform: none; transition: opacity 0.08s ease, transform 0.08s ease; transform-origin: top left; @starting-style { opacity: 0; transform: scale(0.97) translateY(-1px); } }
|
|
1050
|
-
& .crisp-popover-content[data-align="end"] { transform-origin: top right; }
|
|
1051
|
-
& .crisp-popover-content[data-up] { transform-origin: bottom left; }
|
|
1052
1100
|
}
|
|
1053
1101
|
|
|
1054
1102
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -1208,6 +1256,33 @@
|
|
|
1208
1256
|
}
|
|
1209
1257
|
}
|
|
1210
1258
|
|
|
1259
|
+
|
|
1260
|
+
.crisp-select-listbox {
|
|
1261
|
+
font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
1262
|
+
position: fixed; z-index: 70; box-sizing: border-box; display: flex; flex-direction: column; gap: var(--crisp-space-px);
|
|
1263
|
+
max-height: 280px; overflow-y: auto; padding: var(--crisp-space-1);
|
|
1264
|
+
border-radius: var(--crisp-radius-xl); background: var(--crisp-bg-popover);
|
|
1265
|
+
box-shadow: inset 0 0 0 1px var(--crisp-ring-popover), 0 0 0 1px var(--crisp-shadow-popover1), 0 4px 8px -4px var(--crisp-shadow-popover2), 0 4px 12px -2px var(--crisp-shadow-popover3);
|
|
1266
|
+
transform-origin: top left; opacity: 1; transform: none; transition: opacity .08s ease, transform .08s ease;
|
|
1267
|
+
}
|
|
1268
|
+
.crisp-select-listbox[data-up] { transform-origin: bottom; }
|
|
1269
|
+
.crisp-select-listbox { @starting-style { opacity: 0; transform: scale(0.97) translateY(-1px); } }
|
|
1270
|
+
.crisp-select-search { display: flex; align-items: center; gap: var(--crisp-space-2); height: 34px; flex-shrink: 0; margin: calc(-1 * var(--crisp-space-1)) calc(-1 * var(--crisp-space-1)) var(--crisp-space-1); padding: 0 var(--crisp-space-2-5); border-bottom: 1px solid var(--crisp-border-subtle); color: var(--crisp-fg-muted); }
|
|
1271
|
+
.crisp-select-search svg { flex-shrink: 0; }
|
|
1272
|
+
.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-primary); }
|
|
1273
|
+
.crisp-select-search input::placeholder { color: var(--crisp-fg-muted); }
|
|
1274
|
+
.crisp-select-empty { padding: var(--crisp-space-3) var(--crisp-space-2); text-align: center; font-size: var(--crisp-text-md); color: var(--crisp-fg-muted); }
|
|
1275
|
+
.crisp-select-option {
|
|
1276
|
+
box-sizing: border-box; display: flex; align-items: center; gap: var(--crisp-space-2); height: var(--crisp-size-menuRow); flex-shrink: 0;
|
|
1277
|
+
padding: 0 var(--crisp-space-2); margin: 0; border: none; background: none; border-radius: var(--crisp-radius-md);
|
|
1278
|
+
font-family: inherit; font-size: var(--crisp-text-lg); color: var(--crisp-fg-primary); text-align: start; cursor: pointer; white-space: nowrap;
|
|
1279
|
+
}
|
|
1280
|
+
.crisp-select-option[data-highlighted] { background: var(--crisp-bg-raised); }
|
|
1281
|
+
.crisp-select-option[data-disabled] { opacity: 0.5; cursor: not-allowed; }
|
|
1282
|
+
.crisp-select-option-dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: var(--crisp-radius-full); }
|
|
1283
|
+
.crisp-select-option-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
1284
|
+
.crisp-select-option-check { flex-shrink: 0; color: var(--crisp-bg-brand-solid); }
|
|
1285
|
+
|
|
1211
1286
|
.crisp-select {
|
|
1212
1287
|
position: relative; display: inline-flex; font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
1213
1288
|
& .crisp-select-trigger { box-sizing: border-box; display: inline-flex; align-items: center; gap: var(--crisp-space-1-5); height: var(--crisp-size-menuRow); width: 100%; min-width: 0; margin: 0; padding: 0 var(--crisp-space-1-5) 0 var(--crisp-space-2); border: none; border-radius: var(--crisp-radius-md); background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crisp-fg-primary) 7%, transparent); font-family: inherit; font-size: var(--crisp-text-lg); color: var(--crisp-fg-primary); cursor: pointer; transition: background-color .12s ease, box-shadow .12s ease; }
|
|
@@ -1218,20 +1293,6 @@
|
|
|
1218
1293
|
& .crisp-select-placeholder { color: var(--crisp-fg-muted); }
|
|
1219
1294
|
& .crisp-select-chevron { flex-shrink: 0; color: var(--crisp-fg-muted); transition: transform .15s ease; }
|
|
1220
1295
|
& .crisp-select-trigger[data-open] .crisp-select-chevron { transform: rotate(180deg); }
|
|
1221
|
-
& .crisp-select-listbox { position: fixed; z-index: 70; box-sizing: border-box; display: flex; flex-direction: column; gap: var(--crisp-space-px); max-height: 280px; overflow-y: auto; padding: var(--crisp-space-1); border-radius: var(--crisp-radius-xl); background: var(--crisp-bg-popover); box-shadow: inset 0 0 0 1px var(--crisp-ring-popover), 0 0 0 1px var(--crisp-shadow-popover1), 0 4px 8px -4px var(--crisp-shadow-popover2), 0 4px 12px -2px var(--crisp-shadow-popover3); transform-origin: top left; opacity: 1; transform: none; transition: opacity .08s ease, transform .08s ease; }
|
|
1222
|
-
& .crisp-select-listbox[data-up] { transform-origin: bottom; }
|
|
1223
|
-
& .crisp-select-listbox { @starting-style { opacity: 0; transform: scale(0.97) translateY(-1px); } }
|
|
1224
|
-
& .crisp-select-search { display: flex; align-items: center; gap: var(--crisp-space-2); height: 34px; flex-shrink: 0; margin: calc(-1 * var(--crisp-space-1)) calc(-1 * var(--crisp-space-1)) var(--crisp-space-1); padding: 0 var(--crisp-space-2-5); border-bottom: 1px solid var(--crisp-border-subtle); color: var(--crisp-fg-muted); }
|
|
1225
|
-
& .crisp-select-search svg { flex-shrink: 0; }
|
|
1226
|
-
& .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-primary); }
|
|
1227
|
-
& .crisp-select-search input::placeholder { color: var(--crisp-fg-muted); }
|
|
1228
|
-
& .crisp-select-empty { padding: var(--crisp-space-3) var(--crisp-space-2); text-align: center; font-size: var(--crisp-text-md); color: var(--crisp-fg-muted); }
|
|
1229
|
-
& .crisp-select-option { box-sizing: border-box; display: flex; align-items: center; gap: var(--crisp-space-2); height: var(--crisp-size-menuRow); flex-shrink: 0; padding: 0 var(--crisp-space-2); margin: 0; border: none; background: none; border-radius: var(--crisp-radius-md); font-family: inherit; font-size: var(--crisp-text-lg); color: var(--crisp-fg-primary); text-align: start; cursor: pointer; white-space: nowrap; }
|
|
1230
|
-
& .crisp-select-option[data-highlighted] { background: var(--crisp-bg-raised); }
|
|
1231
|
-
& .crisp-select-option[data-disabled] { opacity: 0.5; cursor: not-allowed; }
|
|
1232
|
-
& .crisp-select-option-dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: var(--crisp-radius-full); }
|
|
1233
|
-
& .crisp-select-option-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
1234
|
-
& .crisp-select-option-check { flex-shrink: 0; color: var(--crisp-bg-brand-solid); }
|
|
1235
1296
|
}
|
|
1236
1297
|
.crisp-select--variant_default {
|
|
1237
1298
|
|
|
@@ -1247,6 +1308,12 @@
|
|
|
1247
1308
|
.crisp-select--width_auto {
|
|
1248
1309
|
width: auto;
|
|
1249
1310
|
}
|
|
1311
|
+
.crisp-select--invalid_true {
|
|
1312
|
+
& .crisp-select-trigger, & .crisp-select-trigger:hover, & .crisp-select-trigger[data-open], & .crisp-select-trigger:focus-visible { box-shadow: inset 0 0 0 1px var(--crisp-bg-danger); }
|
|
1313
|
+
}
|
|
1314
|
+
.crisp-select--invalid_false {
|
|
1315
|
+
|
|
1316
|
+
}
|
|
1250
1317
|
|
|
1251
1318
|
@media (prefers-reduced-motion: reduce) {
|
|
1252
1319
|
.crisp-select, .crisp-select * {
|
package/dist/tokens.css
CHANGED
|
@@ -38,6 +38,11 @@
|
|
|
38
38
|
--crisp-bg-purple: #9b69ff;
|
|
39
39
|
--crisp-bg-sidebar: #fbfbfb;
|
|
40
40
|
--crisp-bg-subtle: #fbfbfb;
|
|
41
|
+
--crisp-fg-brand-soft: #2057bd;
|
|
42
|
+
--crisp-fg-success-soft: #186b3d;
|
|
43
|
+
--crisp-fg-warning-soft: #80520d;
|
|
44
|
+
--crisp-fg-danger-soft: #a33539;
|
|
45
|
+
--crisp-fg-neutral-soft: #686870;
|
|
41
46
|
}
|
|
42
47
|
|
|
43
48
|
[data-theme="dark"] {
|
|
@@ -80,6 +85,11 @@
|
|
|
80
85
|
--crisp-bg-purple: #9b69ff;
|
|
81
86
|
--crisp-bg-sidebar: #0e0f10;
|
|
82
87
|
--crisp-bg-subtle: #0e0f10;
|
|
88
|
+
--crisp-fg-brand-soft: #568df3;
|
|
89
|
+
--crisp-fg-success-soft: #2ea968;
|
|
90
|
+
--crisp-fg-warning-soft: #e0982a;
|
|
91
|
+
--crisp-fg-danger-soft: #ff5a5f;
|
|
92
|
+
--crisp-fg-neutral-soft: #9a9aa2;
|
|
83
93
|
}
|
|
84
94
|
|
|
85
95
|
:root {
|
package/dist/tokens.json
CHANGED
|
@@ -39,7 +39,12 @@
|
|
|
39
39
|
"bgCyan": "#00b9eb",
|
|
40
40
|
"bgPurple": "#9b69ff",
|
|
41
41
|
"bgSidebar": "#fbfbfb",
|
|
42
|
-
"bgSubtle": "#fbfbfb"
|
|
42
|
+
"bgSubtle": "#fbfbfb",
|
|
43
|
+
"fgBrandSoft": "#2057bd",
|
|
44
|
+
"fgSuccessSoft": "#186b3d",
|
|
45
|
+
"fgWarningSoft": "#80520d",
|
|
46
|
+
"fgDangerSoft": "#a33539",
|
|
47
|
+
"fgNeutralSoft": "#686870"
|
|
43
48
|
},
|
|
44
49
|
"dark": {
|
|
45
50
|
"bgBrandSolid": "#266df0",
|
|
@@ -80,7 +85,12 @@
|
|
|
80
85
|
"bgCyan": "#00b9eb",
|
|
81
86
|
"bgPurple": "#9b69ff",
|
|
82
87
|
"bgSidebar": "#0e0f10",
|
|
83
|
-
"bgSubtle": "#0e0f10"
|
|
88
|
+
"bgSubtle": "#0e0f10",
|
|
89
|
+
"fgBrandSoft": "#568df3",
|
|
90
|
+
"fgSuccessSoft": "#2ea968",
|
|
91
|
+
"fgWarningSoft": "#e0982a",
|
|
92
|
+
"fgDangerSoft": "#ff5a5f",
|
|
93
|
+
"fgNeutralSoft": "#9a9aa2"
|
|
84
94
|
}
|
|
85
95
|
},
|
|
86
96
|
"palette": {
|
|
@@ -122,7 +132,12 @@
|
|
|
122
132
|
"orange600": "#f97514",
|
|
123
133
|
"cyan600": "#00b9eb",
|
|
124
134
|
"purple600": "#9b69ff",
|
|
125
|
-
"graySidebar": "#fbfbfb"
|
|
135
|
+
"graySidebar": "#fbfbfb",
|
|
136
|
+
"softBrandText": "#2057bd",
|
|
137
|
+
"softSuccessText": "#186b3d",
|
|
138
|
+
"softWarningText": "#80520d",
|
|
139
|
+
"softDangerText": "#a33539",
|
|
140
|
+
"softNeutralText": "#686870"
|
|
126
141
|
},
|
|
127
142
|
"dark": {
|
|
128
143
|
"gray00": "#0a0a0a",
|
|
@@ -162,7 +177,12 @@
|
|
|
162
177
|
"orange600": "#f97514",
|
|
163
178
|
"cyan600": "#00b9eb",
|
|
164
179
|
"purple600": "#9b69ff",
|
|
165
|
-
"graySidebar": "#0e0f10"
|
|
180
|
+
"graySidebar": "#0e0f10",
|
|
181
|
+
"softBrandText": "#568df3",
|
|
182
|
+
"softSuccessText": "#2ea968",
|
|
183
|
+
"softWarningText": "#e0982a",
|
|
184
|
+
"softDangerText": "#ff5a5f",
|
|
185
|
+
"softNeutralText": "#9a9aa2"
|
|
166
186
|
}
|
|
167
187
|
},
|
|
168
188
|
"space": {
|
|
@@ -21,4 +21,4 @@ export type FileUploadProps = UseFileUploadProps & Omit<React.ComponentPropsWith
|
|
|
21
21
|
* is theirs by construction. Controlled or uncontrolled, the same way every
|
|
22
22
|
* other crisp component is.
|
|
23
23
|
*/
|
|
24
|
-
export declare function FileUpload({ className, labels, "aria-label": ariaLabel, accept, disabled: disabledProp, required, invalid: invalidProp, readOnly, maxFiles, maxFileSize, minFileSize, name, validate, preventDocumentDrop, onFileReject, onFileAccept, acceptedFileEntries: acceptedFileEntriesProp, defaultAcceptedFileEntries, onAcceptedFileEntriesChange, ...rest }: FileUploadProps): React.JSX.Element;
|
|
24
|
+
export declare function FileUpload({ className, labels, "aria-label": ariaLabel, id, accept, disabled: disabledProp, required, invalid: invalidProp, readOnly, maxFiles, maxFileSize, minFileSize, name, validate, preventDocumentDrop, onFileReject, onFileAccept, acceptedFileEntries: acceptedFileEntriesProp, defaultAcceptedFileEntries, onAcceptedFileEntriesChange, ...rest }: FileUploadProps): React.JSX.Element;
|
|
@@ -37,6 +37,8 @@ export type MultiSelectProps = Omit<React.ComponentPropsWithoutRef<"div">, "valu
|
|
|
37
37
|
/** Shown when the search matches nothing. */
|
|
38
38
|
emptyLabel?: string;
|
|
39
39
|
disabled?: boolean;
|
|
40
|
+
/** Red ring + `aria-invalid`, matching `Input`'s and `Select`'s. */
|
|
41
|
+
invalid?: boolean;
|
|
40
42
|
className?: string;
|
|
41
43
|
"aria-label"?: string;
|
|
42
44
|
};
|
|
@@ -46,7 +48,7 @@ export type MultiSelectProps = Omit<React.ComponentPropsWithoutRef<"div">, "valu
|
|
|
46
48
|
* popover with a search field over rows of "[chip] … [checkbox]" that toggle on
|
|
47
49
|
* click (the menu stays open). Keyboard: ↑/↓ move, Enter toggles, Esc closes.
|
|
48
50
|
*/
|
|
49
|
-
export declare function MultiSelect({ options, value: valueProp, defaultValue, onValueChange, name, required, id, placeholder, searchable, searchPlaceholder, emptyLabel, disabled, className, "aria-label": ariaLabel, ...rest }: MultiSelectProps): React.JSX.Element;
|
|
51
|
+
export declare function MultiSelect({ options, value: valueProp, defaultValue, onValueChange, name, required, id, placeholder, searchable, searchPlaceholder, emptyLabel, disabled, invalid, className, "aria-label": ariaLabel, ...rest }: MultiSelectProps): React.JSX.Element;
|
|
50
52
|
export declare namespace MultiSelect {
|
|
51
53
|
var displayName: string;
|
|
52
54
|
}
|
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
declare const config: import("../..").RecipeConfig<{
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
declare const config: import("../..").RecipeConfig<{
|
|
2
|
+
invalid: {
|
|
3
|
+
true: string;
|
|
4
|
+
false: string;
|
|
5
|
+
};
|
|
6
|
+
}>;
|
|
7
|
+
export declare const multiselectRecipe: import("../..").RecipeFn<{
|
|
8
|
+
invalid: {
|
|
9
|
+
true: string;
|
|
10
|
+
false: string;
|
|
11
|
+
};
|
|
12
|
+
}> & {
|
|
13
|
+
config: import("../..").RecipeConfig<{
|
|
14
|
+
invalid: {
|
|
15
|
+
true: string;
|
|
16
|
+
false: string;
|
|
17
|
+
};
|
|
18
|
+
}>;
|
|
4
19
|
};
|
|
5
20
|
export default config;
|
|
@@ -42,6 +42,9 @@ export type SelectProps = Omit<React.ComponentPropsWithoutRef<"div">, "value" |
|
|
|
42
42
|
/** Shown when the search matches nothing. */
|
|
43
43
|
emptyLabel?: string;
|
|
44
44
|
disabled?: boolean;
|
|
45
|
+
/** Red ring + `aria-invalid`, matching `Input`'s. Outranks the open/focus
|
|
46
|
+
* ring — a field being corrected stays visibly wrong while it is. */
|
|
47
|
+
invalid?: boolean;
|
|
45
48
|
className?: string;
|
|
46
49
|
"aria-label"?: string;
|
|
47
50
|
id?: string;
|
|
@@ -53,7 +56,7 @@ export type SelectProps = Omit<React.ComponentPropsWithoutRef<"div">, "value" |
|
|
|
53
56
|
* "No results" empty state). Full keyboard model — ↑/↓ move, Enter/Space pick,
|
|
54
57
|
* Esc close, Home/End jump, opens upward when tight. Controlled or uncontrolled.
|
|
55
58
|
*/
|
|
56
|
-
export declare function Select({ options, value, defaultValue, onValueChange, name, required, placeholder, variant, width, searchable, searchPlaceholder, emptyLabel, disabled, className, "aria-label": ariaLabel, id, ...rest }: SelectProps): React.JSX.Element;
|
|
59
|
+
export declare function Select({ options, value, defaultValue, onValueChange, name, required, placeholder, variant, width, searchable, searchPlaceholder, emptyLabel, disabled, invalid, className, "aria-label": ariaLabel, id, ...rest }: SelectProps): React.JSX.Element;
|
|
57
60
|
export declare namespace Select {
|
|
58
61
|
var displayName: string;
|
|
59
62
|
}
|
|
@@ -7,6 +7,10 @@ declare const config: import("../..").RecipeConfig<{
|
|
|
7
7
|
full: string;
|
|
8
8
|
auto: string;
|
|
9
9
|
};
|
|
10
|
+
invalid: {
|
|
11
|
+
true: string;
|
|
12
|
+
false: string;
|
|
13
|
+
};
|
|
10
14
|
}>;
|
|
11
15
|
export declare const selectRecipe: import("../..").RecipeFn<{
|
|
12
16
|
variant: {
|
|
@@ -17,6 +21,10 @@ export declare const selectRecipe: import("../..").RecipeFn<{
|
|
|
17
21
|
full: string;
|
|
18
22
|
auto: string;
|
|
19
23
|
};
|
|
24
|
+
invalid: {
|
|
25
|
+
true: string;
|
|
26
|
+
false: string;
|
|
27
|
+
};
|
|
20
28
|
}> & {
|
|
21
29
|
config: import("../..").RecipeConfig<{
|
|
22
30
|
variant: {
|
|
@@ -27,6 +35,10 @@ export declare const selectRecipe: import("../..").RecipeFn<{
|
|
|
27
35
|
full: string;
|
|
28
36
|
auto: string;
|
|
29
37
|
};
|
|
38
|
+
invalid: {
|
|
39
|
+
true: string;
|
|
40
|
+
false: string;
|
|
41
|
+
};
|
|
30
42
|
}>;
|
|
31
43
|
};
|
|
32
44
|
export default config;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
/**
|
|
3
3
|
* Portals a floating layer (a `position: fixed` listbox/menu/popover
|
|
4
4
|
* content) to `document.body` — exactly what Tooltip already did with a
|
|
@@ -19,7 +19,21 @@ import type * as React from "react";
|
|
|
19
19
|
* starts `false` and is driven only by client interaction — never a prop a
|
|
20
20
|
* fixture sets true at mount (unlike Dialog/Drawer/Command) — so this never
|
|
21
21
|
* touches `document` during SSR, the same safety Tooltip already had.
|
|
22
|
+
*
|
|
23
|
+
* `sourceRef` is the caller's own root — still in its original DOM position,
|
|
24
|
+
* never portaled — used to carry a `data-theme` set on some ancestor of it
|
|
25
|
+
* onto the portaled content (#357). `[data-theme="dark"]` is a normal
|
|
26
|
+
* attribute selector: it needs the themed element to be an actual DOM
|
|
27
|
+
* ancestor, which a consumer that scopes theming below `<html>`/`<body>`
|
|
28
|
+
* (crisp's own visual-test harness does exactly this, per case) no longer
|
|
29
|
+
* is once the content moves to `document.body` — the popover rendered in
|
|
30
|
+
* the PAGE's theme instead of the SUBTREE's. Re-declaring the attribute
|
|
31
|
+
* directly on the portaled root re-establishes it for CSS attribute
|
|
32
|
+
* selectors AND for `var()` resolution, since a custom property set under
|
|
33
|
+
* `[data-theme="dark"] { --crisp-x: ... }` only reaches descendants of an
|
|
34
|
+
* element carrying that attribute.
|
|
22
35
|
*/
|
|
23
|
-
export declare function FloatingPortal({ children, }: {
|
|
24
|
-
children: React.
|
|
36
|
+
export declare function FloatingPortal({ children, sourceRef, }: {
|
|
37
|
+
children: React.ReactElement;
|
|
38
|
+
sourceRef: React.RefObject<HTMLElement | null>;
|
|
25
39
|
}): React.ReactPortal;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ATTIO_SIDEBAR_CHATS_SECTION, ATTIO_SIDEBAR_FOOTER, ATTIO_SIDEBAR_ITEMS, ATTIO_SIDEBAR_LISTS_SECTION, ATTIO_SIDEBAR_RECORDS_SECTION, ATTIO_SIDEBAR_WORKSPACE, Sidebar, type SidebarFooter, type SidebarListsSection, type SidebarNavItem, type SidebarProps, type SidebarRecordItem, type SidebarRecordsSection, type SidebarSection, type SidebarWorkspace, } from "./sidebar";
|
|
1
|
+
export { ATTIO_SIDEBAR_CHATS_SECTION, ATTIO_SIDEBAR_FOOTER, ATTIO_SIDEBAR_ITEMS, ATTIO_SIDEBAR_LISTS_SECTION, ATTIO_SIDEBAR_RECORDS_SECTION, ATTIO_SIDEBAR_WORKSPACE, Sidebar, type SidebarFooter, type SidebarListsSection, type SidebarNavGroup, type SidebarNavGroupItem, type SidebarNavItem, type SidebarProps, type SidebarRecordItem, type SidebarRecordsSection, type SidebarSection, type SidebarWorkspace, } from "./sidebar";
|
|
2
2
|
export { sidebarRecipe } from "./sidebar.recipe";
|
|
@@ -40,6 +40,11 @@ export declare const contract: MapLeafNodes<{
|
|
|
40
40
|
bgPurple: "purple600";
|
|
41
41
|
bgSidebar: "graySidebar";
|
|
42
42
|
bgSubtle: "graySidebar";
|
|
43
|
+
fgBrandSoft: "softBrandText";
|
|
44
|
+
fgSuccessSoft: "softSuccessText";
|
|
45
|
+
fgWarningSoft: "softWarningText";
|
|
46
|
+
fgDangerSoft: "softDangerText";
|
|
47
|
+
fgNeutralSoft: "softNeutralText";
|
|
43
48
|
}, `var(--${string})`> & {
|
|
44
49
|
space: Record<"0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "4" | "5" | "6" | "8" | "px", `var(--${string})`>;
|
|
45
50
|
radius: Record<"2xl" | "chip" | "full" | "lg" | "md" | "sm" | "xl", `var(--${string})`>;
|
|
@@ -151,5 +151,25 @@ export declare const palette: {
|
|
|
151
151
|
readonly light: "#fbfbfb";
|
|
152
152
|
readonly dark: "#0e0f10";
|
|
153
153
|
};
|
|
154
|
+
readonly softBrandText: {
|
|
155
|
+
readonly light: "#2057bd";
|
|
156
|
+
readonly dark: "#568df3";
|
|
157
|
+
};
|
|
158
|
+
readonly softSuccessText: {
|
|
159
|
+
readonly light: "#186b3d";
|
|
160
|
+
readonly dark: "#2ea968";
|
|
161
|
+
};
|
|
162
|
+
readonly softWarningText: {
|
|
163
|
+
readonly light: "#80520d";
|
|
164
|
+
readonly dark: "#e0982a";
|
|
165
|
+
};
|
|
166
|
+
readonly softDangerText: {
|
|
167
|
+
readonly light: "#a33539";
|
|
168
|
+
readonly dark: "#ff5a5f";
|
|
169
|
+
};
|
|
170
|
+
readonly softNeutralText: {
|
|
171
|
+
readonly light: "#686870";
|
|
172
|
+
readonly dark: "#9a9aa2";
|
|
173
|
+
};
|
|
154
174
|
};
|
|
155
175
|
export type PaletteKey = keyof typeof palette;
|
|
@@ -46,5 +46,12 @@ export declare const semantic: {
|
|
|
46
46
|
bgPurple: "purple600";
|
|
47
47
|
bgSidebar: "graySidebar";
|
|
48
48
|
bgSubtle: "graySidebar";
|
|
49
|
+
/** Soft Badge's text colour (#323) — see palette.ts's comment on the
|
|
50
|
+
* soft*Text entries for the Attio measurement this is derived from. */
|
|
51
|
+
fgBrandSoft: "softBrandText";
|
|
52
|
+
fgSuccessSoft: "softSuccessText";
|
|
53
|
+
fgWarningSoft: "softWarningText";
|
|
54
|
+
fgDangerSoft: "softDangerText";
|
|
55
|
+
fgNeutralSoft: "softNeutralText";
|
|
49
56
|
};
|
|
50
57
|
export type Tokens = typeof semantic;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crisp-ui-kit/crisp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.0",
|
|
4
4
|
"description": "A lean React design system, measured pixel-for-pixel from Attio.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -434,8 +434,8 @@
|
|
|
434
434
|
"lynx": "bun build/lynx-lint.mjs",
|
|
435
435
|
"lynx:emit": "bun build/emit-lynx.mjs",
|
|
436
436
|
"ssr": "bun scripts/ssr-check.tsx",
|
|
437
|
-
"visual": "bun scripts/visual-page.tsx && playwright test",
|
|
438
|
-
"visual:baseline": "bun run build && bun scripts/visual-page.tsx && docker run --rm -v \"$PWD\":/w -w /w mcr.microsoft.com/playwright:v1.63.0-noble npx playwright test --update-snapshots",
|
|
437
|
+
"visual": "bun scripts/visual-page.tsx && bun scripts/build-portal-fixture.mjs && playwright test",
|
|
438
|
+
"visual:baseline": "bun run build && bun scripts/visual-page.tsx && bun scripts/build-portal-fixture.mjs && docker run --rm -v \"$PWD\":/w -w /w mcr.microsoft.com/playwright:v1.63.0-noble npx playwright test --update-snapshots",
|
|
439
439
|
"contrast": "bun scripts/contrast-page.tsx",
|
|
440
440
|
"build:esm": "tsc -p tsconfig.esm.json && bun scripts/fix-esm-extensions.mjs",
|
|
441
441
|
"build:cjs": "tsc -p tsconfig.cjs.json && bun scripts/finish-cjs.mjs",
|