@seed-design/css 2.2.2 → 2.3.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.
Files changed (48) hide show
  1. package/all.css +1274 -198
  2. package/all.layered.css +1274 -198
  3. package/all.layered.min.css +1 -1
  4. package/all.min.css +1 -1
  5. package/package.json +1 -1
  6. package/recipes/content-dialog.css +258 -0
  7. package/recipes/content-dialog.d.ts +24 -0
  8. package/recipes/content-dialog.layered.css +290 -0
  9. package/recipes/content-dialog.layered.mjs +71 -0
  10. package/recipes/content-dialog.mjs +71 -0
  11. package/recipes/quantity-picker.css +230 -0
  12. package/recipes/quantity-picker.d.ts +24 -0
  13. package/recipes/quantity-picker.layered.css +273 -0
  14. package/recipes/quantity-picker.layered.mjs +72 -0
  15. package/recipes/quantity-picker.mjs +72 -0
  16. package/recipes/select-item.css +161 -0
  17. package/recipes/select-item.d.ts +28 -0
  18. package/recipes/select-item.layered.css +191 -0
  19. package/recipes/select-item.layered.mjs +60 -0
  20. package/recipes/select-item.mjs +60 -0
  21. package/recipes/select-trigger.css +208 -0
  22. package/recipes/select-trigger.d.ts +28 -0
  23. package/recipes/select-trigger.layered.css +227 -0
  24. package/recipes/select-trigger.layered.mjs +56 -0
  25. package/recipes/select-trigger.mjs +56 -0
  26. package/recipes/select.css +93 -0
  27. package/recipes/select.d.ts +28 -0
  28. package/recipes/select.layered.css +108 -0
  29. package/recipes/select.layered.mjs +56 -0
  30. package/recipes/select.mjs +56 -0
  31. package/vars/component/alert-dialog.d.ts +52 -0
  32. package/vars/component/alert-dialog.mjs +52 -0
  33. package/vars/component/dialog-close-button.d.ts +24 -0
  34. package/vars/component/dialog-close-button.mjs +24 -0
  35. package/vars/component/dialog.d.ts +50 -11
  36. package/vars/component/dialog.mjs +42 -11
  37. package/vars/component/index.d.ts +7 -0
  38. package/vars/component/index.mjs +7 -0
  39. package/vars/component/quantity-picker-button.d.ts +78 -0
  40. package/vars/component/quantity-picker-button.mjs +78 -0
  41. package/vars/component/quantity-picker.d.ts +80 -0
  42. package/vars/component/quantity-picker.mjs +80 -0
  43. package/vars/component/select-item.d.ts +101 -0
  44. package/vars/component/select-item.mjs +95 -0
  45. package/vars/component/select-trigger.d.ts +127 -0
  46. package/vars/component/select-trigger.mjs +120 -0
  47. package/vars/component/select.d.ts +62 -0
  48. package/vars/component/select.mjs +54 -0
@@ -0,0 +1,71 @@
1
+ import './content-dialog.css';
2
+ import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
3
+
4
+ const contentDialogSlotNames = [
5
+ [
6
+ "positioner",
7
+ "seed-content-dialog__positioner"
8
+ ],
9
+ [
10
+ "backdrop",
11
+ "seed-content-dialog__backdrop"
12
+ ],
13
+ [
14
+ "content",
15
+ "seed-content-dialog__content"
16
+ ],
17
+ [
18
+ "header",
19
+ "seed-content-dialog__header"
20
+ ],
21
+ [
22
+ "body",
23
+ "seed-content-dialog__body"
24
+ ],
25
+ [
26
+ "footer",
27
+ "seed-content-dialog__footer"
28
+ ],
29
+ [
30
+ "title",
31
+ "seed-content-dialog__title"
32
+ ],
33
+ [
34
+ "description",
35
+ "seed-content-dialog__description"
36
+ ],
37
+ [
38
+ "closeButton",
39
+ "seed-content-dialog__closeButton"
40
+ ]
41
+ ];
42
+
43
+ const defaultVariant = {
44
+ "size": "medium"
45
+ };
46
+
47
+ const compoundVariants = [];
48
+
49
+ export const contentDialogVariantMap = {
50
+ "size": [
51
+ "medium",
52
+ "large"
53
+ ]
54
+ };
55
+
56
+ export const contentDialogVariantKeys = Object.keys(contentDialogVariantMap);
57
+
58
+ export function contentDialog(props) {
59
+ return Object.fromEntries(
60
+ contentDialogSlotNames.map(([slot, className]) => {
61
+ return [
62
+ slot,
63
+ createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
64
+ ];
65
+ }),
66
+ );
67
+ }
68
+
69
+ Object.assign(contentDialog, { splitVariantProps: (props) => splitVariantProps(props, contentDialogVariantMap) });
70
+
71
+ // @recipe(seed): content-dialog
@@ -0,0 +1,230 @@
1
+ .seed-quantity-picker__root {
2
+ display: inline-flex;
3
+ width: fit-content;
4
+ align-items: center;
5
+ box-sizing: border-box;
6
+ background-color: var(--seed-color-bg-layer-default);
7
+ box-shadow: inset 0 0 0 1px var(--seed-color-stroke-neutral-weak);
8
+ }
9
+ .seed-quantity-picker__root:is(:invalid, [data-invalid]) {
10
+ box-shadow: inset 0 0 0 2px var(--seed-color-stroke-critical-solid);
11
+ }
12
+ .seed-quantity-picker__decrementButton {
13
+ display: inline-flex;
14
+ flex-shrink: 0;
15
+ align-items: center;
16
+ justify-content: center;
17
+ box-sizing: border-box;
18
+ cursor: pointer;
19
+ border: none;
20
+ padding: 0;
21
+ background-color: var(--seed-color-bg-transparent);
22
+ transition: background-color var(--seed-duration-color-transition) var(--seed-timing-function-easing), outline-color var(--seed-duration-d3) var(--seed-timing-function-easing);
23
+ outline: var(--seed-dimension-x0_5) solid transparent;
24
+ outline-offset: var(--seed-dimension-x0_5);
25
+ }
26
+ .seed-quantity-picker__decrementButton:is(:focus-visible, [data-focus-visible]) {
27
+ outline: var(--seed-dimension-x0_5) solid var(--seed-color-stroke-focus-ring);
28
+ outline-offset: var(--seed-dimension-x0_5);
29
+ }
30
+ @media (hover: hover) and (pointer: fine) {
31
+ .seed-quantity-picker__decrementButton:not(:is(:disabled, [disabled], [data-disabled])):is(:hover, [data-hover]) {
32
+ background-color: var(--seed-color-bg-transparent-pressed);
33
+ }
34
+ }
35
+ @media not all and (hover: hover) and (pointer: fine) {
36
+ .seed-quantity-picker__decrementButton:not(:is(:disabled, [disabled], [data-disabled])):is(:active, [data-active]) {
37
+ background-color: var(--seed-color-bg-transparent-pressed);
38
+ }
39
+ }
40
+ .seed-quantity-picker__decrementButton:is(:disabled, [disabled], [data-disabled]) {
41
+ cursor: not-allowed;
42
+ }
43
+ .seed-quantity-picker__decrementButton[data-loading] {
44
+ background-color: var(--seed-color-bg-transparent-pressed);
45
+ }
46
+ .seed-quantity-picker__decrementIcon {
47
+ flex-shrink: 0;
48
+ color: var(--seed-color-fg-neutral);
49
+ --track-color: var(--seed-color-palette-gray-500);
50
+ --range-color: var(--seed-color-fg-neutral);
51
+ }
52
+ .seed-quantity-picker__decrementIcon:is(:disabled, [disabled], [data-disabled]) {
53
+ color: var(--seed-color-fg-disabled);
54
+ }
55
+ .seed-quantity-picker__valueDisplay {
56
+ display: grid;
57
+ flex-shrink: 0;
58
+ align-items: center;
59
+ justify-content: center;
60
+ box-sizing: border-box;
61
+ font-weight: var(--seed-font-weight-medium);
62
+ color: var(--seed-color-fg-neutral);
63
+ }
64
+ .seed-quantity-picker__valueDisplay:is(:disabled, [disabled], [data-disabled]) {
65
+ color: var(--seed-color-fg-disabled);
66
+ }
67
+ .seed-quantity-picker__valueDisplayPlaceholder {
68
+ grid-column: 1;
69
+ grid-row: 1;
70
+ visibility: hidden;
71
+ font-variant-numeric: tabular-nums;
72
+ }
73
+ .seed-quantity-picker__valueDisplayText {
74
+ grid-column: 1;
75
+ grid-row: 1;
76
+ text-align: center;
77
+ font-variant-numeric: tabular-nums;
78
+ }
79
+ .seed-quantity-picker__divider {
80
+ flex-shrink: 0;
81
+ background-color: var(--seed-color-stroke-neutral-subtle);
82
+ }
83
+ .seed-quantity-picker__incrementButton {
84
+ display: inline-flex;
85
+ flex-shrink: 0;
86
+ align-items: center;
87
+ justify-content: center;
88
+ box-sizing: border-box;
89
+ cursor: pointer;
90
+ border: none;
91
+ padding: 0;
92
+ background-color: var(--seed-color-bg-transparent);
93
+ transition: background-color var(--seed-duration-color-transition) var(--seed-timing-function-easing), outline-color var(--seed-duration-d3) var(--seed-timing-function-easing);
94
+ outline: var(--seed-dimension-x0_5) solid transparent;
95
+ outline-offset: var(--seed-dimension-x0_5);
96
+ }
97
+ .seed-quantity-picker__incrementButton:is(:focus-visible, [data-focus-visible]) {
98
+ outline: var(--seed-dimension-x0_5) solid var(--seed-color-stroke-focus-ring);
99
+ outline-offset: var(--seed-dimension-x0_5);
100
+ }
101
+ @media (hover: hover) and (pointer: fine) {
102
+ .seed-quantity-picker__incrementButton:not(:is(:disabled, [disabled], [data-disabled])):is(:hover, [data-hover]) {
103
+ background-color: var(--seed-color-bg-transparent-pressed);
104
+ }
105
+ }
106
+ @media not all and (hover: hover) and (pointer: fine) {
107
+ .seed-quantity-picker__incrementButton:not(:is(:disabled, [disabled], [data-disabled])):is(:active, [data-active]) {
108
+ background-color: var(--seed-color-bg-transparent-pressed);
109
+ }
110
+ }
111
+ .seed-quantity-picker__incrementButton:is(:disabled, [disabled], [data-disabled]) {
112
+ cursor: not-allowed;
113
+ }
114
+ .seed-quantity-picker__incrementButton[data-loading] {
115
+ background-color: var(--seed-color-bg-transparent-pressed);
116
+ }
117
+ .seed-quantity-picker__incrementIcon {
118
+ flex-shrink: 0;
119
+ color: var(--seed-color-fg-neutral);
120
+ --track-color: var(--seed-color-palette-gray-500);
121
+ --range-color: var(--seed-color-fg-neutral);
122
+ }
123
+ .seed-quantity-picker__incrementIcon:is(:disabled, [disabled], [data-disabled]) {
124
+ color: var(--seed-color-fg-disabled);
125
+ }
126
+ .seed-quantity-picker__root--size_small {
127
+ height: var(--seed-dimension-x9);
128
+ border-radius: var(--seed-radius-r2);
129
+ }
130
+ .seed-quantity-picker__decrementButton--size_small {
131
+ width: var(--seed-dimension-x9);
132
+ height: var(--seed-dimension-x9);
133
+ border-radius: var(--seed-radius-r2);
134
+ }
135
+ .seed-quantity-picker__decrementIcon--size_small {
136
+ width: 16px;
137
+ height: 16px;
138
+ --size: 16px;
139
+ --thickness: 2px;
140
+ }
141
+ .seed-quantity-picker__valueDisplay--size_small {
142
+ padding-inline: var(--seed-dimension-x2);
143
+ font-size: var(--seed-font-size-t5);
144
+ line-height: var(--seed-line-height-t5);
145
+ }
146
+ .seed-quantity-picker__divider--size_small {
147
+ width: 1px;
148
+ height: var(--seed-dimension-x4);
149
+ }
150
+ .seed-quantity-picker__incrementButton--size_small {
151
+ width: var(--seed-dimension-x9);
152
+ height: var(--seed-dimension-x9);
153
+ border-radius: var(--seed-radius-r2);
154
+ }
155
+ .seed-quantity-picker__incrementIcon--size_small {
156
+ width: 16px;
157
+ height: 16px;
158
+ --size: 16px;
159
+ --thickness: 2px;
160
+ }
161
+ .seed-quantity-picker__root--size_medium {
162
+ height: var(--seed-dimension-x10);
163
+ border-radius: var(--seed-radius-r2);
164
+ }
165
+ .seed-quantity-picker__decrementButton--size_medium {
166
+ width: var(--seed-dimension-x10);
167
+ height: var(--seed-dimension-x10);
168
+ border-radius: var(--seed-radius-r2);
169
+ }
170
+ .seed-quantity-picker__decrementIcon--size_medium {
171
+ width: 18px;
172
+ height: 18px;
173
+ --size: 18px;
174
+ --thickness: 2px;
175
+ }
176
+ .seed-quantity-picker__valueDisplay--size_medium {
177
+ padding-inline: var(--seed-dimension-x2);
178
+ font-size: var(--seed-font-size-t5);
179
+ line-height: var(--seed-line-height-t5);
180
+ }
181
+ .seed-quantity-picker__divider--size_medium {
182
+ width: 1px;
183
+ height: var(--seed-dimension-x4);
184
+ }
185
+ .seed-quantity-picker__incrementButton--size_medium {
186
+ width: var(--seed-dimension-x10);
187
+ height: var(--seed-dimension-x10);
188
+ border-radius: var(--seed-radius-r2);
189
+ }
190
+ .seed-quantity-picker__incrementIcon--size_medium {
191
+ width: 18px;
192
+ height: 18px;
193
+ --size: 18px;
194
+ --thickness: 2px;
195
+ }
196
+ .seed-quantity-picker__root--size_large {
197
+ height: var(--seed-dimension-x13);
198
+ border-radius: var(--seed-radius-r3);
199
+ }
200
+ .seed-quantity-picker__decrementButton--size_large {
201
+ width: var(--seed-dimension-x13);
202
+ height: var(--seed-dimension-x13);
203
+ border-radius: var(--seed-radius-r3);
204
+ }
205
+ .seed-quantity-picker__decrementIcon--size_large {
206
+ width: 22px;
207
+ height: 22px;
208
+ --size: 22px;
209
+ --thickness: 2px;
210
+ }
211
+ .seed-quantity-picker__valueDisplay--size_large {
212
+ padding-inline: var(--seed-dimension-x2);
213
+ font-size: var(--seed-font-size-t6);
214
+ line-height: var(--seed-line-height-t6);
215
+ }
216
+ .seed-quantity-picker__divider--size_large {
217
+ width: 1px;
218
+ height: var(--seed-dimension-x4);
219
+ }
220
+ .seed-quantity-picker__incrementButton--size_large {
221
+ width: var(--seed-dimension-x13);
222
+ height: var(--seed-dimension-x13);
223
+ border-radius: var(--seed-radius-r3);
224
+ }
225
+ .seed-quantity-picker__incrementIcon--size_large {
226
+ width: 22px;
227
+ height: 22px;
228
+ --size: 22px;
229
+ --thickness: 2px;
230
+ }
@@ -0,0 +1,24 @@
1
+ declare interface QuantityPickerVariant {
2
+ /**
3
+ * @default "medium"
4
+ */
5
+ size: "small" | "medium" | "large";
6
+ }
7
+
8
+ declare type QuantityPickerVariantMap = {
9
+ [key in keyof QuantityPickerVariant]: Array<QuantityPickerVariant[key]>;
10
+ };
11
+
12
+ export declare type QuantityPickerVariantProps = Partial<QuantityPickerVariant>;
13
+
14
+ export declare type QuantityPickerSlotName = "root" | "decrementButton" | "decrementIcon" | "valueDisplay" | "valueDisplayPlaceholder" | "valueDisplayText" | "divider" | "incrementButton" | "incrementIcon";
15
+
16
+ export declare const quantityPickerVariantMap: QuantityPickerVariantMap;
17
+
18
+ export declare const quantityPicker: ((
19
+ props?: QuantityPickerVariantProps,
20
+ ) => Record<QuantityPickerSlotName, string>) & {
21
+ splitVariantProps: <T extends QuantityPickerVariantProps>(
22
+ props: T,
23
+ ) => [QuantityPickerVariantProps, Omit<T, keyof QuantityPickerVariantProps>];
24
+ }
@@ -0,0 +1,273 @@
1
+ @layer seed-components {
2
+ .seed-quantity-picker__root {
3
+ box-sizing: border-box;
4
+ background-color: var(--seed-color-bg-layer-default);
5
+ width: fit-content;
6
+ box-shadow: inset 0 0 0 1px var(--seed-color-stroke-neutral-weak);
7
+ align-items: center;
8
+ display: inline-flex;
9
+ }
10
+
11
+ .seed-quantity-picker__root:is(:invalid, [data-invalid]) {
12
+ box-shadow: inset 0 0 0 2px var(--seed-color-stroke-critical-solid);
13
+ }
14
+
15
+ .seed-quantity-picker__decrementButton {
16
+ box-sizing: border-box;
17
+ cursor: pointer;
18
+ background-color: var(--seed-color-bg-transparent);
19
+ transition: background-color var(--seed-duration-color-transition) var(--seed-timing-function-easing), outline-color var(--seed-duration-d3) var(--seed-timing-function-easing);
20
+ outline: var(--seed-dimension-x0_5) solid transparent;
21
+ outline-offset: var(--seed-dimension-x0_5);
22
+ border: none;
23
+ flex-shrink: 0;
24
+ justify-content: center;
25
+ align-items: center;
26
+ padding: 0;
27
+ display: inline-flex;
28
+ }
29
+
30
+ .seed-quantity-picker__decrementButton:is(:focus-visible, [data-focus-visible]) {
31
+ outline: var(--seed-dimension-x0_5) solid var(--seed-color-stroke-focus-ring);
32
+ outline-offset: var(--seed-dimension-x0_5);
33
+ }
34
+
35
+ @media (hover: hover) and (pointer: fine) {
36
+ .seed-quantity-picker__decrementButton:not(:is(:disabled, [disabled], [data-disabled])):is(:hover, [data-hover]) {
37
+ background-color: var(--seed-color-bg-transparent-pressed);
38
+ }
39
+ }
40
+
41
+ @media not all and (hover: hover) and (pointer: fine) {
42
+ .seed-quantity-picker__decrementButton:not(:is(:disabled, [disabled], [data-disabled])):is(:active, [data-active]) {
43
+ background-color: var(--seed-color-bg-transparent-pressed);
44
+ }
45
+ }
46
+
47
+ .seed-quantity-picker__decrementButton:is(:disabled, [disabled], [data-disabled]) {
48
+ cursor: not-allowed;
49
+ }
50
+
51
+ .seed-quantity-picker__decrementButton[data-loading] {
52
+ background-color: var(--seed-color-bg-transparent-pressed);
53
+ }
54
+
55
+ .seed-quantity-picker__decrementIcon {
56
+ color: var(--seed-color-fg-neutral);
57
+ --track-color: var(--seed-color-palette-gray-500);
58
+ --range-color: var(--seed-color-fg-neutral);
59
+ flex-shrink: 0;
60
+ }
61
+
62
+ .seed-quantity-picker__decrementIcon:is(:disabled, [disabled], [data-disabled]) {
63
+ color: var(--seed-color-fg-disabled);
64
+ }
65
+
66
+ .seed-quantity-picker__valueDisplay {
67
+ box-sizing: border-box;
68
+ font-weight: var(--seed-font-weight-medium);
69
+ color: var(--seed-color-fg-neutral);
70
+ flex-shrink: 0;
71
+ justify-content: center;
72
+ align-items: center;
73
+ display: grid;
74
+ }
75
+
76
+ .seed-quantity-picker__valueDisplay:is(:disabled, [disabled], [data-disabled]) {
77
+ color: var(--seed-color-fg-disabled);
78
+ }
79
+
80
+ .seed-quantity-picker__valueDisplayPlaceholder {
81
+ visibility: hidden;
82
+ font-variant-numeric: tabular-nums;
83
+ grid-area: 1 / 1;
84
+ }
85
+
86
+ .seed-quantity-picker__valueDisplayText {
87
+ text-align: center;
88
+ font-variant-numeric: tabular-nums;
89
+ grid-area: 1 / 1;
90
+ }
91
+
92
+ .seed-quantity-picker__divider {
93
+ background-color: var(--seed-color-stroke-neutral-subtle);
94
+ flex-shrink: 0;
95
+ }
96
+
97
+ .seed-quantity-picker__incrementButton {
98
+ box-sizing: border-box;
99
+ cursor: pointer;
100
+ background-color: var(--seed-color-bg-transparent);
101
+ transition: background-color var(--seed-duration-color-transition) var(--seed-timing-function-easing), outline-color var(--seed-duration-d3) var(--seed-timing-function-easing);
102
+ outline: var(--seed-dimension-x0_5) solid transparent;
103
+ outline-offset: var(--seed-dimension-x0_5);
104
+ border: none;
105
+ flex-shrink: 0;
106
+ justify-content: center;
107
+ align-items: center;
108
+ padding: 0;
109
+ display: inline-flex;
110
+ }
111
+
112
+ .seed-quantity-picker__incrementButton:is(:focus-visible, [data-focus-visible]) {
113
+ outline: var(--seed-dimension-x0_5) solid var(--seed-color-stroke-focus-ring);
114
+ outline-offset: var(--seed-dimension-x0_5);
115
+ }
116
+
117
+ @media (hover: hover) and (pointer: fine) {
118
+ .seed-quantity-picker__incrementButton:not(:is(:disabled, [disabled], [data-disabled])):is(:hover, [data-hover]) {
119
+ background-color: var(--seed-color-bg-transparent-pressed);
120
+ }
121
+ }
122
+
123
+ @media not all and (hover: hover) and (pointer: fine) {
124
+ .seed-quantity-picker__incrementButton:not(:is(:disabled, [disabled], [data-disabled])):is(:active, [data-active]) {
125
+ background-color: var(--seed-color-bg-transparent-pressed);
126
+ }
127
+ }
128
+
129
+ .seed-quantity-picker__incrementButton:is(:disabled, [disabled], [data-disabled]) {
130
+ cursor: not-allowed;
131
+ }
132
+
133
+ .seed-quantity-picker__incrementButton[data-loading] {
134
+ background-color: var(--seed-color-bg-transparent-pressed);
135
+ }
136
+
137
+ .seed-quantity-picker__incrementIcon {
138
+ color: var(--seed-color-fg-neutral);
139
+ --track-color: var(--seed-color-palette-gray-500);
140
+ --range-color: var(--seed-color-fg-neutral);
141
+ flex-shrink: 0;
142
+ }
143
+
144
+ .seed-quantity-picker__incrementIcon:is(:disabled, [disabled], [data-disabled]) {
145
+ color: var(--seed-color-fg-disabled);
146
+ }
147
+
148
+ .seed-quantity-picker__root--size_small {
149
+ height: var(--seed-dimension-x9);
150
+ border-radius: var(--seed-radius-r2);
151
+ }
152
+
153
+ .seed-quantity-picker__decrementButton--size_small {
154
+ width: var(--seed-dimension-x9);
155
+ height: var(--seed-dimension-x9);
156
+ border-radius: var(--seed-radius-r2);
157
+ }
158
+
159
+ .seed-quantity-picker__decrementIcon--size_small {
160
+ --size: 16px;
161
+ --thickness: 2px;
162
+ width: 16px;
163
+ height: 16px;
164
+ }
165
+
166
+ .seed-quantity-picker__valueDisplay--size_small {
167
+ padding-inline: var(--seed-dimension-x2);
168
+ font-size: var(--seed-font-size-t5);
169
+ line-height: var(--seed-line-height-t5);
170
+ }
171
+
172
+ .seed-quantity-picker__divider--size_small {
173
+ width: 1px;
174
+ height: var(--seed-dimension-x4);
175
+ }
176
+
177
+ .seed-quantity-picker__incrementButton--size_small {
178
+ width: var(--seed-dimension-x9);
179
+ height: var(--seed-dimension-x9);
180
+ border-radius: var(--seed-radius-r2);
181
+ }
182
+
183
+ .seed-quantity-picker__incrementIcon--size_small {
184
+ --size: 16px;
185
+ --thickness: 2px;
186
+ width: 16px;
187
+ height: 16px;
188
+ }
189
+
190
+ .seed-quantity-picker__root--size_medium {
191
+ height: var(--seed-dimension-x10);
192
+ border-radius: var(--seed-radius-r2);
193
+ }
194
+
195
+ .seed-quantity-picker__decrementButton--size_medium {
196
+ width: var(--seed-dimension-x10);
197
+ height: var(--seed-dimension-x10);
198
+ border-radius: var(--seed-radius-r2);
199
+ }
200
+
201
+ .seed-quantity-picker__decrementIcon--size_medium {
202
+ --size: 18px;
203
+ --thickness: 2px;
204
+ width: 18px;
205
+ height: 18px;
206
+ }
207
+
208
+ .seed-quantity-picker__valueDisplay--size_medium {
209
+ padding-inline: var(--seed-dimension-x2);
210
+ font-size: var(--seed-font-size-t5);
211
+ line-height: var(--seed-line-height-t5);
212
+ }
213
+
214
+ .seed-quantity-picker__divider--size_medium {
215
+ width: 1px;
216
+ height: var(--seed-dimension-x4);
217
+ }
218
+
219
+ .seed-quantity-picker__incrementButton--size_medium {
220
+ width: var(--seed-dimension-x10);
221
+ height: var(--seed-dimension-x10);
222
+ border-radius: var(--seed-radius-r2);
223
+ }
224
+
225
+ .seed-quantity-picker__incrementIcon--size_medium {
226
+ --size: 18px;
227
+ --thickness: 2px;
228
+ width: 18px;
229
+ height: 18px;
230
+ }
231
+
232
+ .seed-quantity-picker__root--size_large {
233
+ height: var(--seed-dimension-x13);
234
+ border-radius: var(--seed-radius-r3);
235
+ }
236
+
237
+ .seed-quantity-picker__decrementButton--size_large {
238
+ width: var(--seed-dimension-x13);
239
+ height: var(--seed-dimension-x13);
240
+ border-radius: var(--seed-radius-r3);
241
+ }
242
+
243
+ .seed-quantity-picker__decrementIcon--size_large {
244
+ --size: 22px;
245
+ --thickness: 2px;
246
+ width: 22px;
247
+ height: 22px;
248
+ }
249
+
250
+ .seed-quantity-picker__valueDisplay--size_large {
251
+ padding-inline: var(--seed-dimension-x2);
252
+ font-size: var(--seed-font-size-t6);
253
+ line-height: var(--seed-line-height-t6);
254
+ }
255
+
256
+ .seed-quantity-picker__divider--size_large {
257
+ width: 1px;
258
+ height: var(--seed-dimension-x4);
259
+ }
260
+
261
+ .seed-quantity-picker__incrementButton--size_large {
262
+ width: var(--seed-dimension-x13);
263
+ height: var(--seed-dimension-x13);
264
+ border-radius: var(--seed-radius-r3);
265
+ }
266
+
267
+ .seed-quantity-picker__incrementIcon--size_large {
268
+ --size: 22px;
269
+ --thickness: 2px;
270
+ width: 22px;
271
+ height: 22px;
272
+ }
273
+ }
@@ -0,0 +1,72 @@
1
+ import './quantity-picker.layered.css';
2
+ import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
3
+
4
+ const quantityPickerSlotNames = [
5
+ [
6
+ "root",
7
+ "seed-quantity-picker__root"
8
+ ],
9
+ [
10
+ "decrementButton",
11
+ "seed-quantity-picker__decrementButton"
12
+ ],
13
+ [
14
+ "decrementIcon",
15
+ "seed-quantity-picker__decrementIcon"
16
+ ],
17
+ [
18
+ "valueDisplay",
19
+ "seed-quantity-picker__valueDisplay"
20
+ ],
21
+ [
22
+ "valueDisplayPlaceholder",
23
+ "seed-quantity-picker__valueDisplayPlaceholder"
24
+ ],
25
+ [
26
+ "valueDisplayText",
27
+ "seed-quantity-picker__valueDisplayText"
28
+ ],
29
+ [
30
+ "divider",
31
+ "seed-quantity-picker__divider"
32
+ ],
33
+ [
34
+ "incrementButton",
35
+ "seed-quantity-picker__incrementButton"
36
+ ],
37
+ [
38
+ "incrementIcon",
39
+ "seed-quantity-picker__incrementIcon"
40
+ ]
41
+ ];
42
+
43
+ const defaultVariant = {
44
+ "size": "medium"
45
+ };
46
+
47
+ const compoundVariants = [];
48
+
49
+ export const quantityPickerVariantMap = {
50
+ "size": [
51
+ "small",
52
+ "medium",
53
+ "large"
54
+ ]
55
+ };
56
+
57
+ export const quantityPickerVariantKeys = Object.keys(quantityPickerVariantMap);
58
+
59
+ export function quantityPicker(props) {
60
+ return Object.fromEntries(
61
+ quantityPickerSlotNames.map(([slot, className]) => {
62
+ return [
63
+ slot,
64
+ createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
65
+ ];
66
+ }),
67
+ );
68
+ }
69
+
70
+ Object.assign(quantityPicker, { splitVariantProps: (props) => splitVariantProps(props, quantityPickerVariantMap) });
71
+
72
+ // @recipe(seed): quantity-picker