@crisp-ui-kit/crisp 0.33.0 → 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.
Files changed (105) hide show
  1. package/README.md +33 -1
  2. package/dist/appshell.css +1 -4
  3. package/dist/appshell.layered.css +1 -4
  4. package/dist/authshell.css +4 -19
  5. package/dist/authshell.layered.css +4 -19
  6. package/dist/avatar.css +2 -1
  7. package/dist/avatar.layered.css +2 -1
  8. package/dist/board.css +1 -4
  9. package/dist/board.layered.css +1 -4
  10. package/dist/breadcrumb.css +0 -1
  11. package/dist/breadcrumb.layered.css +0 -1
  12. package/dist/button.css +14 -6
  13. package/dist/button.layered.css +14 -6
  14. package/dist/card.css +2 -1
  15. package/dist/card.layered.css +2 -1
  16. package/dist/checkbox.css +6 -9
  17. package/dist/checkbox.layered.css +6 -9
  18. package/dist/cjs/components/avatar/avatar.recipe.js +38 -19
  19. package/dist/cjs/components/button/button.recipe.js +109 -18
  20. package/dist/cjs/components/switch/switch.recipe.js +48 -18
  21. package/dist/columncalc.css +2 -6
  22. package/dist/columncalc.layered.css +2 -6
  23. package/dist/command.css +9 -11
  24. package/dist/command.layered.css +9 -11
  25. package/dist/datatable.css +9 -19
  26. package/dist/datatable.layered.css +9 -19
  27. package/dist/datepicker.css +15 -80
  28. package/dist/datepicker.layered.css +15 -80
  29. package/dist/datepickerfield.css +3 -18
  30. package/dist/datepickerfield.layered.css +3 -18
  31. package/dist/donutchart.css +1 -2
  32. package/dist/donutchart.layered.css +1 -2
  33. package/dist/entitycard.css +1 -7
  34. package/dist/entitycard.layered.css +1 -7
  35. package/dist/esm/components/avatar/avatar.recipe.js +38 -19
  36. package/dist/esm/components/button/button.recipe.js +109 -18
  37. package/dist/esm/components/switch/switch.recipe.js +48 -18
  38. package/dist/fileupload.css +10 -60
  39. package/dist/fileupload.layered.css +10 -60
  40. package/dist/inbox.css +1 -7
  41. package/dist/inbox.layered.css +1 -7
  42. package/dist/input.css +9 -20
  43. package/dist/input.layered.css +9 -20
  44. package/dist/listpage.css +2 -12
  45. package/dist/listpage.layered.css +2 -12
  46. package/dist/menu.css +3 -19
  47. package/dist/menu.layered.css +3 -19
  48. package/dist/multiselect.css +4 -25
  49. package/dist/multiselect.layered.css +4 -25
  50. package/dist/navitem.css +5 -13
  51. package/dist/navitem.layered.css +5 -13
  52. package/dist/onboarding.css +1 -8
  53. package/dist/onboarding.layered.css +1 -8
  54. package/dist/quantitypicker.css +15 -50
  55. package/dist/quantitypicker.layered.css +15 -50
  56. package/dist/radiogroup.css +1 -6
  57. package/dist/radiogroup.layered.css +1 -6
  58. package/dist/recordpage.css +2 -10
  59. package/dist/recordpage.layered.css +2 -10
  60. package/dist/recordpanel.css +1 -13
  61. package/dist/recordpanel.layered.css +1 -13
  62. package/dist/recordstable.css +2 -11
  63. package/dist/recordstable.layered.css +2 -11
  64. package/dist/resizablepanel.css +4 -15
  65. package/dist/resizablepanel.layered.css +4 -15
  66. package/dist/richtext.css +1 -5
  67. package/dist/richtext.layered.css +1 -5
  68. package/dist/select.css +7 -30
  69. package/dist/select.layered.css +7 -30
  70. package/dist/settingsshell.css +2 -7
  71. package/dist/settingsshell.layered.css +2 -7
  72. package/dist/sidebar.css +23 -28
  73. package/dist/sidebar.layered.css +23 -28
  74. package/dist/slider.css +1 -8
  75. package/dist/slider.layered.css +1 -8
  76. package/dist/statcard.css +1 -2
  77. package/dist/statcard.layered.css +1 -2
  78. package/dist/styles.css +194 -652
  79. package/dist/styles.layered.css +194 -652
  80. package/dist/switch.css +1 -5
  81. package/dist/switch.layered.css +1 -5
  82. package/dist/table.css +2 -1
  83. package/dist/table.layered.css +2 -1
  84. package/dist/tabletoolbar.css +1 -3
  85. package/dist/tabletoolbar.layered.css +1 -3
  86. package/dist/tabs.css +1 -5
  87. package/dist/tabs.layered.css +1 -5
  88. package/dist/tasklist.css +1 -8
  89. package/dist/tasklist.layered.css +1 -8
  90. package/dist/textarea.css +2 -13
  91. package/dist/textarea.layered.css +2 -13
  92. package/dist/tooltip.css +2 -1
  93. package/dist/tooltip.layered.css +2 -1
  94. package/dist/trialbanner.css +2 -11
  95. package/dist/trialbanner.layered.css +2 -11
  96. package/dist/types/components/avatar/avatar.d.ts +30 -30
  97. package/dist/types/components/avatar/avatar.recipe.d.ts +136 -49
  98. package/dist/types/components/button/button.d.ts +30 -30
  99. package/dist/types/components/button/button.recipe.d.ts +193 -45
  100. package/dist/types/components/switch/switch.recipe.d.ts +57 -3
  101. package/dist/viewtoggle.css +3 -9
  102. package/dist/viewtoggle.layered.css +3 -9
  103. package/dist/wheelpicker.css +14 -59
  104. package/dist/wheelpicker.layered.css +14 -59
  105. package/package.json +1 -1
@@ -7,45 +7,45 @@ export type ButtonProps = React.ComponentPropsWithoutRef<"button"> & VariantProp
7
7
  loading?: boolean;
8
8
  };
9
9
  export declare const Button: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & VariantProps<import("../..").RecipeFn<{
10
- intent: {
11
- primary: string;
12
- neutral: string;
13
- danger: string;
14
- ghost: string;
10
+ readonly intent: {
11
+ readonly primary: string;
12
+ readonly neutral: string;
13
+ readonly danger: string;
14
+ readonly ghost: string;
15
15
  };
16
- size: {
17
- sm: string;
18
- md: string;
19
- lg: string;
16
+ readonly size: {
17
+ readonly sm: string;
18
+ readonly md: string;
19
+ readonly lg: string;
20
20
  };
21
- shape: {
22
- text: string;
23
- icon: string;
21
+ readonly shape: {
22
+ readonly text: string;
23
+ readonly icon: string;
24
24
  };
25
- touchTarget: {
26
- true: string;
27
- false: string;
25
+ readonly touchTarget: {
26
+ readonly true: string;
27
+ readonly false: string;
28
28
  };
29
29
  }> & {
30
30
  config: import("../..").RecipeConfig<{
31
- intent: {
32
- primary: string;
33
- neutral: string;
34
- danger: string;
35
- ghost: string;
31
+ readonly intent: {
32
+ readonly primary: string;
33
+ readonly neutral: string;
34
+ readonly danger: string;
35
+ readonly ghost: string;
36
36
  };
37
- size: {
38
- sm: string;
39
- md: string;
40
- lg: string;
37
+ readonly size: {
38
+ readonly sm: string;
39
+ readonly md: string;
40
+ readonly lg: string;
41
41
  };
42
- shape: {
43
- text: string;
44
- icon: string;
42
+ readonly shape: {
43
+ readonly text: string;
44
+ readonly icon: string;
45
45
  };
46
- touchTarget: {
47
- true: string;
48
- false: string;
46
+ readonly touchTarget: {
47
+ readonly true: string;
48
+ readonly false: string;
49
49
  };
50
50
  }>;
51
51
  }> & {
@@ -1,65 +1,213 @@
1
+ declare const spec: {
2
+ readonly name: "button";
3
+ readonly base: {
4
+ readonly display: "inline-flex";
5
+ readonly alignItems: "center";
6
+ readonly justifyContent: "center";
7
+ readonly gap: `var(--${string})`;
8
+ readonly fontFamily: `var(--${string})`;
9
+ readonly fontWeight: `var(--${string})`;
10
+ readonly letterSpacing: "-0.14px";
11
+ readonly lineHeight: "20px";
12
+ readonly whiteSpace: "nowrap";
13
+ readonly border: "none";
14
+ readonly cursor: "pointer";
15
+ readonly transition: "background-color .2s, box-shadow .2s, color .2s";
16
+ };
17
+ readonly parts: [{
18
+ readonly selector: "&:disabled";
19
+ readonly decls: {
20
+ readonly opacity: 0.5;
21
+ readonly cursor: "not-allowed";
22
+ };
23
+ }];
24
+ readonly variants: {
25
+ readonly intent: {
26
+ readonly primary: {
27
+ readonly decls: {
28
+ readonly background: `var(--${string})`;
29
+ readonly color: `var(--${string})`;
30
+ readonly boxShadow: "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)";
31
+ };
32
+ readonly parts: [{
33
+ readonly selector: "&:hover";
34
+ readonly decls: {
35
+ background: `var(--${string})`;
36
+ };
37
+ }, {
38
+ readonly selector: "&:active";
39
+ readonly decls: {
40
+ background: `var(--${string})`;
41
+ };
42
+ }];
43
+ };
44
+ readonly neutral: {
45
+ readonly decls: {
46
+ background: `var(--${string})`;
47
+ color: `var(--${string})`;
48
+ boxShadow: `inset 0 0 0 1px var(--${string}), 0 0 2px rgba(28,40,64,0.18), 0 1px 3px rgba(0,0,0,0.04)`;
49
+ };
50
+ readonly parts: [{
51
+ readonly selector: "&:hover";
52
+ readonly decls: {
53
+ background: `var(--${string})`;
54
+ };
55
+ }];
56
+ };
57
+ readonly danger: {
58
+ readonly decls: {
59
+ readonly background: `var(--${string})`;
60
+ readonly color: `var(--${string})`;
61
+ readonly boxShadow: "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)";
62
+ };
63
+ readonly parts: [{
64
+ readonly selector: "&:hover";
65
+ readonly decls: {
66
+ readonly filter: "brightness(0.96)";
67
+ };
68
+ }, {
69
+ readonly selector: "&:active";
70
+ readonly decls: {
71
+ readonly filter: "brightness(0.92)";
72
+ };
73
+ }];
74
+ };
75
+ readonly ghost: {
76
+ readonly decls: {
77
+ readonly background: "transparent";
78
+ readonly color: `var(--${string})`;
79
+ readonly boxShadow: "none";
80
+ };
81
+ readonly parts: [{
82
+ readonly selector: "&:hover";
83
+ readonly decls: {
84
+ background: `var(--${string})`;
85
+ color: `var(--${string})`;
86
+ };
87
+ }];
88
+ };
89
+ };
90
+ readonly size: {
91
+ readonly sm: {
92
+ readonly height: "24px";
93
+ readonly paddingInline: `var(--${string})`;
94
+ readonly fontSize: `var(--${string})`;
95
+ readonly borderRadius: `var(--${string})`;
96
+ };
97
+ readonly md: {
98
+ readonly height: "28px";
99
+ readonly paddingInline: `var(--${string})`;
100
+ readonly fontSize: `var(--${string})`;
101
+ readonly borderRadius: `var(--${string})`;
102
+ };
103
+ readonly lg: {
104
+ readonly height: "40px";
105
+ readonly paddingInline: "14px";
106
+ readonly fontSize: `var(--${string})`;
107
+ readonly borderRadius: "10px";
108
+ };
109
+ };
110
+ readonly shape: {
111
+ readonly text: {};
112
+ readonly icon: {
113
+ readonly paddingInline: 0;
114
+ readonly aspectRatio: "1 / 1";
115
+ };
116
+ };
117
+ readonly touchTarget: {
118
+ readonly true: {
119
+ readonly decls: {
120
+ readonly position: "relative";
121
+ };
122
+ readonly parts: [{
123
+ readonly slot: "hitArea";
124
+ readonly selector: "&::after";
125
+ readonly decls: {
126
+ readonly content: "\"\"";
127
+ readonly position: "absolute";
128
+ readonly top: "50%";
129
+ readonly left: "50%";
130
+ readonly transform: "translate(-50%, -50%)";
131
+ readonly width: "100%";
132
+ readonly height: "100%";
133
+ readonly minWidth: "44px";
134
+ readonly minHeight: "44px";
135
+ };
136
+ }];
137
+ };
138
+ readonly false: {};
139
+ };
140
+ };
141
+ readonly defaultVariants: {
142
+ readonly intent: "primary";
143
+ readonly size: "md";
144
+ readonly shape: "text";
145
+ readonly touchTarget: false;
146
+ };
147
+ };
1
148
  declare const config: import("../..").RecipeConfig<{
2
- intent: {
3
- primary: string;
4
- neutral: string;
5
- danger: string;
6
- ghost: string;
149
+ readonly intent: {
150
+ readonly primary: string;
151
+ readonly neutral: string;
152
+ readonly danger: string;
153
+ readonly ghost: string;
7
154
  };
8
- size: {
9
- sm: string;
10
- md: string;
11
- lg: string;
155
+ readonly size: {
156
+ readonly sm: string;
157
+ readonly md: string;
158
+ readonly lg: string;
12
159
  };
13
- shape: {
14
- text: string;
15
- icon: string;
160
+ readonly shape: {
161
+ readonly text: string;
162
+ readonly icon: string;
16
163
  };
17
- touchTarget: {
18
- true: string;
19
- false: string;
164
+ readonly touchTarget: {
165
+ readonly true: string;
166
+ readonly false: string;
20
167
  };
21
168
  }>;
22
169
  export declare const buttonRecipe: import("../..").RecipeFn<{
23
- intent: {
24
- primary: string;
25
- neutral: string;
26
- danger: string;
27
- ghost: string;
170
+ readonly intent: {
171
+ readonly primary: string;
172
+ readonly neutral: string;
173
+ readonly danger: string;
174
+ readonly ghost: string;
28
175
  };
29
- size: {
30
- sm: string;
31
- md: string;
32
- lg: string;
176
+ readonly size: {
177
+ readonly sm: string;
178
+ readonly md: string;
179
+ readonly lg: string;
33
180
  };
34
- shape: {
35
- text: string;
36
- icon: string;
181
+ readonly shape: {
182
+ readonly text: string;
183
+ readonly icon: string;
37
184
  };
38
- touchTarget: {
39
- true: string;
40
- false: string;
185
+ readonly touchTarget: {
186
+ readonly true: string;
187
+ readonly false: string;
41
188
  };
42
189
  }> & {
43
190
  config: import("../..").RecipeConfig<{
44
- intent: {
45
- primary: string;
46
- neutral: string;
47
- danger: string;
48
- ghost: string;
191
+ readonly intent: {
192
+ readonly primary: string;
193
+ readonly neutral: string;
194
+ readonly danger: string;
195
+ readonly ghost: string;
49
196
  };
50
- size: {
51
- sm: string;
52
- md: string;
53
- lg: string;
197
+ readonly size: {
198
+ readonly sm: string;
199
+ readonly md: string;
200
+ readonly lg: string;
54
201
  };
55
- shape: {
56
- text: string;
57
- icon: string;
202
+ readonly shape: {
203
+ readonly text: string;
204
+ readonly icon: string;
58
205
  };
59
- touchTarget: {
60
- true: string;
61
- false: string;
206
+ readonly touchTarget: {
207
+ readonly true: string;
208
+ readonly false: string;
62
209
  };
63
210
  }>;
64
211
  };
212
+ export { spec };
65
213
  export default config;
@@ -1,5 +1,59 @@
1
- declare const config: import("../..").RecipeConfig<{}>;
2
- export declare const switchRecipe: import("../..").RecipeFn<{}> & {
3
- config: import("../..").RecipeConfig<{}>;
1
+ declare const spec: {
2
+ readonly name: "switch";
3
+ readonly base: {
4
+ readonly display: "inline-flex";
5
+ readonly alignItems: "center";
6
+ readonly flexShrink: 0;
7
+ readonly width: "24px";
8
+ readonly height: "16px";
9
+ readonly padding: 0;
10
+ readonly margin: 0;
11
+ readonly border: "none";
12
+ readonly borderRadius: `var(--${string})`;
13
+ readonly background: `color-mix(in srgb, var(--${string}) 9%, transparent)`;
14
+ readonly cursor: "pointer";
15
+ readonly transition: "background-color .2s ease";
16
+ readonly WebkitTapHighlightColor: "transparent";
17
+ };
18
+ readonly parts: [{
19
+ readonly slot: "thumb";
20
+ readonly selector: "& .crisp-switch-thumb";
21
+ readonly decls: {
22
+ readonly width: "12px";
23
+ readonly height: "12px";
24
+ readonly margin: "0 2px";
25
+ readonly borderRadius: `var(--${string})`;
26
+ readonly background: "#fff";
27
+ readonly transition: "transform .2s ease";
28
+ };
29
+ }, {
30
+ readonly selector: "&[data-checked]";
31
+ readonly decls: {
32
+ background: `var(--${string})`;
33
+ };
34
+ }, {
35
+ readonly slot: "thumb";
36
+ readonly selector: "&[data-checked] .crisp-switch-thumb";
37
+ readonly decls: {
38
+ readonly transform: "translateX(8px)";
39
+ };
40
+ }, {
41
+ readonly selector: "&:focus-visible";
42
+ readonly decls: {
43
+ readonly outline: `2px solid var(--${string})`;
44
+ readonly outlineOffset: "2px";
45
+ };
46
+ }, {
47
+ readonly selector: "&:disabled";
48
+ readonly decls: {
49
+ readonly opacity: 0.5;
50
+ readonly cursor: "not-allowed";
51
+ };
52
+ }];
4
53
  };
54
+ declare const config: import("../..").RecipeConfig<Record<string, Record<string, string>>>;
55
+ export declare const switchRecipe: import("../..").RecipeFn<Record<string, Record<string, string>>> & {
56
+ config: import("../..").RecipeConfig<Record<string, Record<string, string>>>;
57
+ };
58
+ export { spec };
5
59
  export default config;
@@ -1,14 +1,8 @@
1
1
  .crisp-viewtoggle {
2
- display: inline-flex; align-items: center; gap: 2px; box-sizing: border-box; padding: 2px;
3
- border-radius: var(--crisp-radius-lg); background: color-mix(in srgb, var(--crisp-fg-primary) 5%, transparent);
4
- font-family: var(--crisp-font-sans);
5
-
6
- & .crisp-viewtoggle-tile { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
7
- padding: 0; margin: 0; border: none; border-radius: var(--crisp-radius-md); background: none; color: var(--crisp-fg-muted);
8
- font-family: inherit; cursor: pointer; transition: background-color .12s, color .12s, box-shadow .12s; }
2
+ display: inline-flex; align-items: center; gap: 2px; box-sizing: border-box; padding: 2px; border-radius: var(--crisp-radius-lg); background: color-mix(in srgb, var(--crisp-fg-primary) 5%, transparent); font-family: var(--crisp-font-sans);
3
+ & .crisp-viewtoggle-tile { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; margin: 0; border: none; border-radius: var(--crisp-radius-md); background: none; color: var(--crisp-fg-muted); font-family: inherit; cursor: pointer; transition: background-color .12s, color .12s, box-shadow .12s; }
9
4
  & .crisp-viewtoggle-tile:hover { color: var(--crisp-fg-primary); }
10
- & .crisp-viewtoggle-tile[data-active] { background: var(--crisp-bg-tile-active); color: var(--crisp-fg-primary);
11
- box-shadow: 0 1px 2px -1px var(--crisp-shadow-tile-active); }
5
+ & .crisp-viewtoggle-tile[data-active] { background: var(--crisp-bg-tile-active); color: var(--crisp-fg-primary); box-shadow: 0 1px 2px -1px var(--crisp-shadow-tile-active); }
12
6
  & .crisp-viewtoggle-tile:focus-visible { outline: 2px solid var(--crisp-bg-brand-solid); outline-offset: 1px; }
13
7
  }
14
8
 
@@ -1,15 +1,9 @@
1
1
  @layer crisp-components {
2
2
  .crisp-viewtoggle {
3
- display: inline-flex; align-items: center; gap: 2px; box-sizing: border-box; padding: 2px;
4
- border-radius: var(--crisp-radius-lg); background: color-mix(in srgb, var(--crisp-fg-primary) 5%, transparent);
5
- font-family: var(--crisp-font-sans);
6
-
7
- & .crisp-viewtoggle-tile { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
8
- padding: 0; margin: 0; border: none; border-radius: var(--crisp-radius-md); background: none; color: var(--crisp-fg-muted);
9
- font-family: inherit; cursor: pointer; transition: background-color .12s, color .12s, box-shadow .12s; }
3
+ display: inline-flex; align-items: center; gap: 2px; box-sizing: border-box; padding: 2px; border-radius: var(--crisp-radius-lg); background: color-mix(in srgb, var(--crisp-fg-primary) 5%, transparent); font-family: var(--crisp-font-sans);
4
+ & .crisp-viewtoggle-tile { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; margin: 0; border: none; border-radius: var(--crisp-radius-md); background: none; color: var(--crisp-fg-muted); font-family: inherit; cursor: pointer; transition: background-color .12s, color .12s, box-shadow .12s; }
10
5
  & .crisp-viewtoggle-tile:hover { color: var(--crisp-fg-primary); }
11
- & .crisp-viewtoggle-tile[data-active] { background: var(--crisp-bg-tile-active); color: var(--crisp-fg-primary);
12
- box-shadow: 0 1px 2px -1px var(--crisp-shadow-tile-active); }
6
+ & .crisp-viewtoggle-tile[data-active] { background: var(--crisp-bg-tile-active); color: var(--crisp-fg-primary); box-shadow: 0 1px 2px -1px var(--crisp-shadow-tile-active); }
13
7
  & .crisp-viewtoggle-tile:focus-visible { outline: 2px solid var(--crisp-bg-brand-solid); outline-offset: 1px; }
14
8
  }
15
9
 
@@ -1,68 +1,23 @@
1
1
  .crisp-wheelpicker {
2
-
3
- position: relative; box-sizing: border-box; width: 100%; overflow: hidden;
4
- background: var(--crisp-bg-surface); font-family: var(--crisp-font-sans);
5
-
6
- /* the band the selected row sits in; behind the items, never hit-tested */
7
- & .crisp-wheelpicker-indicator {
8
- position: absolute; z-index: 0; inset-inline: var(--crisp-space-4); top: 50%;
9
- transform: translateY(-50%); border-radius: var(--crisp-radius-md);
10
- background: var(--crisp-bg-neutral-weak); pointer-events: none;
11
- }
12
-
13
- /* fades the rows furthest from the centre, so the column reads as a wheel
14
- rather than a list. 40% of the viewport, capped, top and bottom. */
15
- & .crisp-wheelpicker-fog {
16
- position: relative; z-index: 1; height: 100%; overflow: hidden;
17
- mask-image: linear-gradient(
18
- to bottom,
19
- transparent 0,
20
- #000 var(--crisp-wheelpicker-fog),
21
- #000 calc(100% - var(--crisp-wheelpicker-fog)),
22
- transparent 100%
23
- );
24
- }
2
+ position: relative; box-sizing: border-box; width: 100%; overflow: hidden; background: var(--crisp-bg-surface); font-family: var(--crisp-font-sans); /* the band the selected row sits in; behind the items, never hit-tested */
3
+ & .crisp-wheelpicker-indicator { position: absolute; z-index: 0; inset-inline: var(--crisp-space-4); top: 50%; transform: translateY(-50%); border-radius: var(--crisp-radius-md); background: var(--crisp-bg-neutral-weak); pointer-events: none; }
4
+ /* fades the rows furthest from the centre, so the column reads as a wheel rather than a list. 40% of the viewport, capped, top and bottom. */
5
+ & .crisp-wheelpicker-fog { position: relative; z-index: 1; height: 100%; overflow: hidden; mask-image: linear-gradient( to bottom, transparent 0, #000 var(--crisp-wheelpicker-fog), #000 calc(100% - var(--crisp-wheelpicker-fog)), transparent 100% ); }
25
6
  & .crisp-wheelpicker-columns { display: flex; width: 100%; height: 100%; justify-content: center; }
26
-
27
- & .crisp-wheelpicker-column {
28
- box-sizing: border-box; flex: 0 0 auto; width: max-content; height: 100%;
29
- overflow-x: hidden; overflow-y: auto;
30
- overscroll-behavior-y: contain; overscroll-behavior-x: none;
31
- scroll-snap-type: y mandatory; touch-action: pan-y;
32
- scrollbar-width: none; -ms-overflow-style: none; outline: none;
33
- padding-block: var(--crisp-wheelpicker-offset);
34
- }
7
+ & .crisp-wheelpicker-column { box-sizing: border-box; flex: 0 0 auto; width: max-content; height: 100%; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; overscroll-behavior-x: none; scroll-snap-type: y mandatory; touch-action: pan-y; scrollbar-width: none; -ms-overflow-style: none; outline: none; padding-block: var(--crisp-wheelpicker-offset); }
35
8
  & .crisp-wheelpicker-column::-webkit-scrollbar { display: none; }
36
-
37
- & .crisp-wheelpicker-item {
38
- display: flex; align-items: center; justify-content: center;
39
- scroll-snap-align: center; user-select: none; white-space: nowrap;
40
- padding-inline: var(--crisp-space-4); color: var(--crisp-fg-disabled);
41
- background: none; border: none; font: inherit; cursor: pointer;
42
- }
9
+ & .crisp-wheelpicker-item { display: flex; align-items: center; justify-content: center; scroll-snap-align: center; user-select: none; white-space: nowrap; padding-inline: var(--crisp-space-4); color: var(--crisp-fg-disabled); background: none; border: none; font: inherit; cursor: pointer; }
43
10
  & .crisp-wheelpicker-item[data-selected] { color: var(--crisp-fg-primary); }
44
-
45
- /* the ring is drawn on the SELECTED row, and only for keyboard focus:
46
- a pointer user has just tapped the row they meant and does not need it */
47
- & .crisp-wheelpicker-column:focus-visible .crisp-wheelpicker-item[data-selected] {
48
- outline: 2px solid var(--crisp-stroke-focus-ring); outline-offset: -2px;
49
- border-radius: var(--crisp-radius-md);
50
- }
51
-
11
+ /* the ring is drawn on the SELECTED row, and only for keyboard focus: a pointer user has just tapped the row they meant and does not need it */
12
+ & .crisp-wheelpicker-column:focus-visible .crisp-wheelpicker-item[data-selected] { outline: 2px solid var(--crisp-stroke-focus-ring); outline-offset: -2px; border-radius: var(--crisp-radius-md); }
52
13
  }
53
14
  .crisp-wheelpicker--size_small {
54
-
55
- height: 180px; --crisp-wheelpicker-offset: 72px;
56
- --crisp-wheelpicker-fog: min(40%, 108px);
57
- & .crisp-wheelpicker-indicator { height: 36px; }
58
- & .crisp-wheelpicker-item { height: 36px; min-height: 36px; font-size: 20px; line-height: 27px; }
59
-
15
+ height: 180px; --crisp-wheelpicker-offset: 72px; --crisp-wheelpicker-fog: min(40%, 108px);
16
+ & .crisp-wheelpicker-indicator { height: 36px; }
17
+ & .crisp-wheelpicker-item { height: 36px; min-height: 36px; font-size: 20px; line-height: 27px; }
60
18
  }
61
19
  .crisp-wheelpicker--size_medium {
62
-
63
- height: 220px; --crisp-wheelpicker-offset: 88px;
64
- --crisp-wheelpicker-fog: min(40%, 132px);
65
- & .crisp-wheelpicker-indicator { height: 44px; }
66
- & .crisp-wheelpicker-item { height: 44px; min-height: 44px; font-size: 26px; line-height: 35px; }
67
-
20
+ height: 220px; --crisp-wheelpicker-offset: 88px; --crisp-wheelpicker-fog: min(40%, 132px);
21
+ & .crisp-wheelpicker-indicator { height: 44px; }
22
+ & .crisp-wheelpicker-item { height: 44px; min-height: 44px; font-size: 26px; line-height: 35px; }
68
23
  }
@@ -1,70 +1,25 @@
1
1
  @layer crisp-components {
2
2
  .crisp-wheelpicker {
3
-
4
- position: relative; box-sizing: border-box; width: 100%; overflow: hidden;
5
- background: var(--crisp-bg-surface); font-family: var(--crisp-font-sans);
6
-
7
- /* the band the selected row sits in; behind the items, never hit-tested */
8
- & .crisp-wheelpicker-indicator {
9
- position: absolute; z-index: 0; inset-inline: var(--crisp-space-4); top: 50%;
10
- transform: translateY(-50%); border-radius: var(--crisp-radius-md);
11
- background: var(--crisp-bg-neutral-weak); pointer-events: none;
12
- }
13
-
14
- /* fades the rows furthest from the centre, so the column reads as a wheel
15
- rather than a list. 40% of the viewport, capped, top and bottom. */
16
- & .crisp-wheelpicker-fog {
17
- position: relative; z-index: 1; height: 100%; overflow: hidden;
18
- mask-image: linear-gradient(
19
- to bottom,
20
- transparent 0,
21
- #000 var(--crisp-wheelpicker-fog),
22
- #000 calc(100% - var(--crisp-wheelpicker-fog)),
23
- transparent 100%
24
- );
25
- }
3
+ position: relative; box-sizing: border-box; width: 100%; overflow: hidden; background: var(--crisp-bg-surface); font-family: var(--crisp-font-sans); /* the band the selected row sits in; behind the items, never hit-tested */
4
+ & .crisp-wheelpicker-indicator { position: absolute; z-index: 0; inset-inline: var(--crisp-space-4); top: 50%; transform: translateY(-50%); border-radius: var(--crisp-radius-md); background: var(--crisp-bg-neutral-weak); pointer-events: none; }
5
+ /* fades the rows furthest from the centre, so the column reads as a wheel rather than a list. 40% of the viewport, capped, top and bottom. */
6
+ & .crisp-wheelpicker-fog { position: relative; z-index: 1; height: 100%; overflow: hidden; mask-image: linear-gradient( to bottom, transparent 0, #000 var(--crisp-wheelpicker-fog), #000 calc(100% - var(--crisp-wheelpicker-fog)), transparent 100% ); }
26
7
  & .crisp-wheelpicker-columns { display: flex; width: 100%; height: 100%; justify-content: center; }
27
-
28
- & .crisp-wheelpicker-column {
29
- box-sizing: border-box; flex: 0 0 auto; width: max-content; height: 100%;
30
- overflow-x: hidden; overflow-y: auto;
31
- overscroll-behavior-y: contain; overscroll-behavior-x: none;
32
- scroll-snap-type: y mandatory; touch-action: pan-y;
33
- scrollbar-width: none; -ms-overflow-style: none; outline: none;
34
- padding-block: var(--crisp-wheelpicker-offset);
35
- }
8
+ & .crisp-wheelpicker-column { box-sizing: border-box; flex: 0 0 auto; width: max-content; height: 100%; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; overscroll-behavior-x: none; scroll-snap-type: y mandatory; touch-action: pan-y; scrollbar-width: none; -ms-overflow-style: none; outline: none; padding-block: var(--crisp-wheelpicker-offset); }
36
9
  & .crisp-wheelpicker-column::-webkit-scrollbar { display: none; }
37
-
38
- & .crisp-wheelpicker-item {
39
- display: flex; align-items: center; justify-content: center;
40
- scroll-snap-align: center; user-select: none; white-space: nowrap;
41
- padding-inline: var(--crisp-space-4); color: var(--crisp-fg-disabled);
42
- background: none; border: none; font: inherit; cursor: pointer;
43
- }
10
+ & .crisp-wheelpicker-item { display: flex; align-items: center; justify-content: center; scroll-snap-align: center; user-select: none; white-space: nowrap; padding-inline: var(--crisp-space-4); color: var(--crisp-fg-disabled); background: none; border: none; font: inherit; cursor: pointer; }
44
11
  & .crisp-wheelpicker-item[data-selected] { color: var(--crisp-fg-primary); }
45
-
46
- /* the ring is drawn on the SELECTED row, and only for keyboard focus:
47
- a pointer user has just tapped the row they meant and does not need it */
48
- & .crisp-wheelpicker-column:focus-visible .crisp-wheelpicker-item[data-selected] {
49
- outline: 2px solid var(--crisp-stroke-focus-ring); outline-offset: -2px;
50
- border-radius: var(--crisp-radius-md);
51
- }
52
-
12
+ /* the ring is drawn on the SELECTED row, and only for keyboard focus: a pointer user has just tapped the row they meant and does not need it */
13
+ & .crisp-wheelpicker-column:focus-visible .crisp-wheelpicker-item[data-selected] { outline: 2px solid var(--crisp-stroke-focus-ring); outline-offset: -2px; border-radius: var(--crisp-radius-md); }
53
14
  }
54
15
  .crisp-wheelpicker--size_small {
55
-
56
- height: 180px; --crisp-wheelpicker-offset: 72px;
57
- --crisp-wheelpicker-fog: min(40%, 108px);
58
- & .crisp-wheelpicker-indicator { height: 36px; }
59
- & .crisp-wheelpicker-item { height: 36px; min-height: 36px; font-size: 20px; line-height: 27px; }
60
-
16
+ height: 180px; --crisp-wheelpicker-offset: 72px; --crisp-wheelpicker-fog: min(40%, 108px);
17
+ & .crisp-wheelpicker-indicator { height: 36px; }
18
+ & .crisp-wheelpicker-item { height: 36px; min-height: 36px; font-size: 20px; line-height: 27px; }
61
19
  }
62
20
  .crisp-wheelpicker--size_medium {
63
-
64
- height: 220px; --crisp-wheelpicker-offset: 88px;
65
- --crisp-wheelpicker-fog: min(40%, 132px);
66
- & .crisp-wheelpicker-indicator { height: 44px; }
67
- & .crisp-wheelpicker-item { height: 44px; min-height: 44px; font-size: 26px; line-height: 35px; }
68
-
21
+ height: 220px; --crisp-wheelpicker-offset: 88px; --crisp-wheelpicker-fog: min(40%, 132px);
22
+ & .crisp-wheelpicker-indicator { height: 44px; }
23
+ & .crisp-wheelpicker-item { height: 44px; min-height: 44px; font-size: 26px; line-height: 35px; }
69
24
  }
70
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crisp-ui-kit/crisp",
3
- "version": "0.33.0",
3
+ "version": "0.33.1",
4
4
  "description": "A lean React design system, measured pixel-for-pixel from Attio.",
5
5
  "license": "MIT",
6
6
  "type": "module",