@seed-design/lynx-css 0.11.1 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all.css +3626 -1579
- package/all.min.css +1 -1
- package/base.css +16 -2
- package/base.min.css +1 -1
- package/package.json +1 -1
- package/recipes/alert-dialog.css +114 -0
- package/recipes/alert-dialog.d.ts +24 -0
- package/recipes/alert-dialog.mjs +67 -0
- package/recipes/app-bar.css +27 -21
- package/recipes/attachment-input-item.css +276 -0
- package/recipes/attachment-input-item.d.ts +40 -0
- package/recipes/attachment-input-item.mjs +128 -0
- package/recipes/attachment-input-trigger.css +53 -0
- package/recipes/attachment-input-trigger.d.ts +28 -0
- package/recipes/attachment-input-trigger.mjs +60 -0
- package/recipes/attachment-input.css +31 -0
- package/recipes/attachment-input.d.ts +21 -0
- package/recipes/attachment-input.mjs +44 -0
- package/recipes/callout.css +61 -56
- package/recipes/chip-tabs.css +136 -0
- package/recipes/chip-tabs.d.ts +52 -0
- package/recipes/chip-tabs.mjs +147 -0
- package/recipes/contextual-floating-button.css +131 -0
- package/recipes/contextual-floating-button.d.ts +40 -0
- package/recipes/contextual-floating-button.mjs +104 -0
- package/recipes/dialog.css +130 -0
- package/recipes/dialog.d.ts +28 -0
- package/recipes/dialog.mjs +76 -0
- package/recipes/floating-action-button.css +61 -0
- package/recipes/floating-action-button.d.ts +36 -0
- package/recipes/floating-action-button.mjs +67 -0
- package/recipes/help-bubble.css +112 -0
- package/recipes/help-bubble.d.ts +36 -0
- package/recipes/help-bubble.mjs +96 -0
- package/recipes/identity-placeholder.css +11 -0
- package/recipes/identity-placeholder.d.ts +24 -0
- package/recipes/identity-placeholder.mjs +43 -0
- package/recipes/input-button.css +20 -1
- package/recipes/input-button.d.ts +1 -1
- package/recipes/input-button.mjs +10 -1
- package/recipes/list-item.css +8 -9
- package/recipes/list-item.d.ts +4 -0
- package/recipes/list-item.mjs +11 -1
- package/recipes/menu-item.css +16 -2
- package/recipes/menu-item.d.ts +1 -1
- package/recipes/menu-item.mjs +4 -0
- package/recipes/menu-sheet-item.css +26 -15
- package/recipes/menu-sheet-item.d.ts +1 -1
- package/recipes/menu-sheet-item.mjs +4 -0
- package/recipes/menu-sheet.css +18 -13
- package/recipes/page-banner.css +8 -0
- package/recipes/page-banner.d.ts +1 -1
- package/recipes/page-banner.mjs +4 -0
- package/recipes/quantity-picker.css +213 -0
- package/recipes/quantity-picker.d.ts +44 -0
- package/recipes/quantity-picker.mjs +102 -0
- package/recipes/reaction-button.css +7 -12
- package/recipes/reaction-button.mjs +7 -8
- package/recipes/scroll-fog.css +66 -0
- package/recipes/scroll-fog.d.ts +36 -0
- package/recipes/scroll-fog.mjs +78 -0
- package/recipes/select-item.css +105 -0
- package/recipes/select-item.d.ts +36 -0
- package/recipes/select-item.mjs +83 -0
- package/recipes/select-trigger.css +147 -0
- package/recipes/select-trigger.d.ts +44 -0
- package/recipes/select-trigger.mjs +90 -0
- package/recipes/select.css +88 -0
- package/recipes/select.d.ts +32 -0
- package/recipes/select.mjs +81 -0
- package/recipes/skeleton.css +41 -0
- package/recipes/skeleton.d.ts +36 -0
- package/recipes/skeleton.mjs +50 -0
- package/recipes/slider-marker.css +44 -0
- package/recipes/slider-marker.d.ts +30 -0
- package/recipes/slider-marker.mjs +65 -0
- package/recipes/slider-tick.css +14 -0
- package/recipes/slider-tick.d.ts +22 -0
- package/recipes/slider-tick.mjs +29 -0
- package/recipes/slider.css +140 -0
- package/recipes/slider.d.ts +40 -0
- package/recipes/slider.mjs +99 -0
package/recipes/menu-sheet.css
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
bottom: 0;
|
|
9
9
|
left: 0;
|
|
10
10
|
--sheet-z-index: 20;
|
|
11
|
-
z-index: calc(var(--sheet-z-index) + var(--layer-index, 0))
|
|
11
|
+
z-index: calc(var(--sheet-z-index) + var(--layer-index, 0));
|
|
12
12
|
}
|
|
13
13
|
.seed-menu-sheet__backdrop {
|
|
14
14
|
position: fixed;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
left: 0;
|
|
19
19
|
opacity: 0;
|
|
20
20
|
background-color: var(--seed-color-bg-overlay);
|
|
21
|
-
z-index: calc(var(--sheet-z-index) + var(--layer-index, 0))
|
|
21
|
+
z-index: calc(var(--sheet-z-index) + var(--layer-index, 0));
|
|
22
22
|
}
|
|
23
23
|
.seed-menu-sheet__content {
|
|
24
24
|
position: relative;
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
max-width: 480px;
|
|
31
31
|
border-top-left-radius: var(--seed-radius-r5);
|
|
32
32
|
border-top-right-radius: var(--seed-radius-r5);
|
|
33
|
-
transform: translate3d(0, 100%, 0)
|
|
33
|
+
transform: translate3d(0, 100%, 0);
|
|
34
34
|
}
|
|
35
35
|
.seed-menu-sheet__contentInner {
|
|
36
36
|
display: flex;
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
width: 100%;
|
|
39
39
|
padding-top: var(--seed-dimension-x6);
|
|
40
40
|
padding-right: var(--seed-dimension-spacing-x-global-gutter);
|
|
41
|
-
padding-left: var(--seed-dimension-spacing-x-global-gutter)
|
|
41
|
+
padding-left: var(--seed-dimension-spacing-x-global-gutter);
|
|
42
42
|
}
|
|
43
43
|
.seed-menu-sheet__header {
|
|
44
44
|
display: flex;
|
|
@@ -46,59 +46,64 @@
|
|
|
46
46
|
align-items: center;
|
|
47
47
|
text-align: center;
|
|
48
48
|
gap: var(--seed-dimension-x1);
|
|
49
|
-
padding-bottom: var(--seed-dimension-x4)
|
|
49
|
+
padding-bottom: var(--seed-dimension-x4);
|
|
50
50
|
}
|
|
51
51
|
.seed-menu-sheet__title {
|
|
52
52
|
color: var(--seed-color-fg-neutral);
|
|
53
53
|
font-size: var(--seed-font-size-t6);
|
|
54
54
|
line-height: var(--seed-line-height-t6);
|
|
55
55
|
font-weight: var(--seed-font-weight-bold);
|
|
56
|
-
margin: 0
|
|
56
|
+
margin: 0;
|
|
57
57
|
}
|
|
58
58
|
.seed-menu-sheet__description {
|
|
59
59
|
color: var(--seed-color-fg-neutral-muted);
|
|
60
60
|
font-size: var(--seed-font-size-t4);
|
|
61
61
|
line-height: var(--seed-line-height-t4);
|
|
62
62
|
font-weight: var(--seed-font-weight-regular);
|
|
63
|
-
margin: 0
|
|
63
|
+
margin: 0;
|
|
64
64
|
}
|
|
65
65
|
.seed-menu-sheet__list {
|
|
66
66
|
display: flex;
|
|
67
67
|
flex-direction: column;
|
|
68
68
|
align-items: stretch;
|
|
69
|
-
gap: var(--seed-dimension-x2_5)
|
|
69
|
+
gap: var(--seed-dimension-x2_5);
|
|
70
70
|
}
|
|
71
71
|
.seed-menu-sheet__group {
|
|
72
72
|
display: flex;
|
|
73
73
|
flex-direction: column;
|
|
74
74
|
align-items: stretch;
|
|
75
75
|
overflow: hidden;
|
|
76
|
-
border-radius: var(--seed-radius-r4)
|
|
76
|
+
border-radius: var(--seed-radius-r4);
|
|
77
77
|
}
|
|
78
78
|
.seed-menu-sheet__footer {
|
|
79
79
|
display: flex;
|
|
80
80
|
flex-direction: column;
|
|
81
81
|
align-items: stretch;
|
|
82
|
-
padding-top: var(--seed-dimension-x2_5)
|
|
82
|
+
padding-top: var(--seed-dimension-x2_5);
|
|
83
83
|
}
|
|
84
84
|
.seed-menu-sheet__closeButton {
|
|
85
85
|
display: flex;
|
|
86
86
|
align-items: center;
|
|
87
87
|
justify-content: center;
|
|
88
88
|
background-color: var(--seed-color-bg-neutral-weak);
|
|
89
|
+
}
|
|
90
|
+
.seed-menu-sheet__closeButton:active {
|
|
91
|
+
background-color: var(--seed-color-bg-neutral-weak-pressed);
|
|
92
|
+
}
|
|
93
|
+
.seed-menu-sheet__closeButton {
|
|
89
94
|
min-height: 52px;
|
|
90
95
|
padding-top: var(--seed-dimension-x3_5);
|
|
91
96
|
padding-right: var(--seed-dimension-x5);
|
|
92
97
|
padding-bottom: var(--seed-dimension-x3_5);
|
|
93
98
|
padding-left: var(--seed-dimension-x5);
|
|
94
|
-
border-radius: var(--seed-radius-r3)
|
|
99
|
+
border-radius: var(--seed-radius-r3);
|
|
95
100
|
}
|
|
96
101
|
.seed-menu-sheet__closeButtonLabel {
|
|
97
102
|
color: var(--seed-color-fg-neutral);
|
|
98
103
|
font-size: var(--seed-font-size-t5);
|
|
99
104
|
line-height: var(--seed-line-height-t5);
|
|
100
|
-
font-weight: var(--seed-font-weight-medium)
|
|
105
|
+
font-weight: var(--seed-font-weight-medium);
|
|
101
106
|
}
|
|
102
107
|
.seed-menu-sheet__closeButton--closeButtonPressed_true {
|
|
103
|
-
background-color: var(--seed-color-bg-neutral-weak-pressed)
|
|
108
|
+
background-color: var(--seed-color-bg-neutral-weak-pressed);
|
|
104
109
|
}
|
package/recipes/page-banner.css
CHANGED
|
@@ -9,6 +9,14 @@
|
|
|
9
9
|
padding-top: var(--seed-dimension-x2_5);
|
|
10
10
|
padding-bottom: var(--seed-dimension-x2_5);
|
|
11
11
|
}
|
|
12
|
+
.seed-page-banner__scaleContent {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: row;
|
|
15
|
+
align-items: flex-start;
|
|
16
|
+
flex-grow: 1;
|
|
17
|
+
flex-shrink: 1;
|
|
18
|
+
min-width: 0;
|
|
19
|
+
}
|
|
12
20
|
.seed-page-banner__content {
|
|
13
21
|
display: flex;
|
|
14
22
|
flex-direction: row;
|
package/recipes/page-banner.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ declare type PageBannerVariantMap = {
|
|
|
27
27
|
|
|
28
28
|
export declare type PageBannerVariantProps = Partial<PageBannerVariant>;
|
|
29
29
|
|
|
30
|
-
export declare type PageBannerSlotName = "root" | "content" | "body" | "title" | "description" | "button" | "closeButton" | "prefixIcon" | "suffixIcon" | "closeButtonIcon";
|
|
30
|
+
export declare type PageBannerSlotName = "root" | "content" | "scaleContent" | "body" | "title" | "description" | "button" | "closeButton" | "prefixIcon" | "suffixIcon" | "closeButtonIcon";
|
|
31
31
|
|
|
32
32
|
export declare const pageBannerVariantMap: PageBannerVariantMap;
|
|
33
33
|
|
package/recipes/page-banner.mjs
CHANGED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
.seed-quantity-picker__root {
|
|
2
|
+
display: flex;
|
|
3
|
+
width: fit-content;
|
|
4
|
+
align-items: center;
|
|
5
|
+
background-color: var(--seed-color-bg-layer-default);
|
|
6
|
+
box-shadow: inset 0 0 0 1px var(--seed-color-stroke-neutral-weak)
|
|
7
|
+
}
|
|
8
|
+
.seed-quantity-picker__decrementButton {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-shrink: 0;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
border: none;
|
|
14
|
+
padding: 0;
|
|
15
|
+
background-color: var(--seed-color-bg-transparent);
|
|
16
|
+
transition: background-color var(--seed-duration-color-transition) var(--seed-timing-function-easing)
|
|
17
|
+
}
|
|
18
|
+
.seed-quantity-picker__decrementIcon {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
flex-shrink: 0;
|
|
23
|
+
color: var(--seed-color-fg-neutral);
|
|
24
|
+
--track-color: var(--seed-color-palette-gray-500);
|
|
25
|
+
--range-color: var(--seed-color-fg-neutral)
|
|
26
|
+
}
|
|
27
|
+
.seed-quantity-picker__valueDisplay {
|
|
28
|
+
display: grid;
|
|
29
|
+
flex-grow: 1;
|
|
30
|
+
flex-shrink: 0;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
font-weight: var(--seed-font-weight-medium);
|
|
34
|
+
color: var(--seed-color-fg-neutral)
|
|
35
|
+
}
|
|
36
|
+
.seed-quantity-picker__valueDisplayPlaceholder {
|
|
37
|
+
grid-column-start: 1;
|
|
38
|
+
grid-column-end: 2;
|
|
39
|
+
grid-row-start: 1;
|
|
40
|
+
grid-row-end: 2;
|
|
41
|
+
visibility: hidden
|
|
42
|
+
}
|
|
43
|
+
.seed-quantity-picker__valueDisplayText {
|
|
44
|
+
grid-column-start: 1;
|
|
45
|
+
grid-column-end: 2;
|
|
46
|
+
grid-row-start: 1;
|
|
47
|
+
grid-row-end: 2;
|
|
48
|
+
text-align: center
|
|
49
|
+
}
|
|
50
|
+
.seed-quantity-picker__divider {
|
|
51
|
+
flex-shrink: 0;
|
|
52
|
+
background-color: var(--seed-color-stroke-neutral-subtle)
|
|
53
|
+
}
|
|
54
|
+
.seed-quantity-picker__incrementButton {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-shrink: 0;
|
|
57
|
+
align-items: center;
|
|
58
|
+
justify-content: center;
|
|
59
|
+
border: none;
|
|
60
|
+
padding: 0;
|
|
61
|
+
background-color: var(--seed-color-bg-transparent);
|
|
62
|
+
transition: background-color var(--seed-duration-color-transition) var(--seed-timing-function-easing)
|
|
63
|
+
}
|
|
64
|
+
.seed-quantity-picker__incrementIcon {
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
justify-content: center;
|
|
68
|
+
flex-shrink: 0;
|
|
69
|
+
color: var(--seed-color-fg-neutral);
|
|
70
|
+
--track-color: var(--seed-color-palette-gray-500);
|
|
71
|
+
--range-color: var(--seed-color-fg-neutral)
|
|
72
|
+
}
|
|
73
|
+
.seed-quantity-picker__root--layout_fill {
|
|
74
|
+
flex-grow: 1
|
|
75
|
+
}
|
|
76
|
+
.seed-quantity-picker__root--size_small {
|
|
77
|
+
height: var(--seed-dimension-x9);
|
|
78
|
+
border-radius: var(--seed-radius-r2)
|
|
79
|
+
}
|
|
80
|
+
.seed-quantity-picker__decrementButton--size_small {
|
|
81
|
+
width: var(--seed-dimension-x9);
|
|
82
|
+
height: var(--seed-dimension-x9);
|
|
83
|
+
border-radius: var(--seed-radius-r2)
|
|
84
|
+
}
|
|
85
|
+
.seed-quantity-picker__decrementIcon--size_small {
|
|
86
|
+
width: 16px;
|
|
87
|
+
height: 16px;
|
|
88
|
+
--size: 16px;
|
|
89
|
+
--thickness: 2px
|
|
90
|
+
}
|
|
91
|
+
.seed-quantity-picker__valueDisplay--size_small {
|
|
92
|
+
padding-left: var(--seed-dimension-x2);
|
|
93
|
+
padding-right: var(--seed-dimension-x2);
|
|
94
|
+
font-size: var(--seed-font-size-t5);
|
|
95
|
+
line-height: var(--seed-line-height-t5)
|
|
96
|
+
}
|
|
97
|
+
.seed-quantity-picker__divider--size_small {
|
|
98
|
+
width: 1px;
|
|
99
|
+
height: var(--seed-dimension-x4)
|
|
100
|
+
}
|
|
101
|
+
.seed-quantity-picker__incrementButton--size_small {
|
|
102
|
+
width: var(--seed-dimension-x9);
|
|
103
|
+
height: var(--seed-dimension-x9);
|
|
104
|
+
border-radius: var(--seed-radius-r2)
|
|
105
|
+
}
|
|
106
|
+
.seed-quantity-picker__incrementIcon--size_small {
|
|
107
|
+
width: 16px;
|
|
108
|
+
height: 16px;
|
|
109
|
+
--size: 16px;
|
|
110
|
+
--thickness: 2px
|
|
111
|
+
}
|
|
112
|
+
.seed-quantity-picker__root--size_medium {
|
|
113
|
+
height: var(--seed-dimension-x10);
|
|
114
|
+
border-radius: var(--seed-radius-r2)
|
|
115
|
+
}
|
|
116
|
+
.seed-quantity-picker__decrementButton--size_medium {
|
|
117
|
+
width: var(--seed-dimension-x10);
|
|
118
|
+
height: var(--seed-dimension-x10);
|
|
119
|
+
border-radius: var(--seed-radius-r2)
|
|
120
|
+
}
|
|
121
|
+
.seed-quantity-picker__decrementIcon--size_medium {
|
|
122
|
+
width: 18px;
|
|
123
|
+
height: 18px;
|
|
124
|
+
--size: 18px;
|
|
125
|
+
--thickness: 2px
|
|
126
|
+
}
|
|
127
|
+
.seed-quantity-picker__valueDisplay--size_medium {
|
|
128
|
+
padding-left: var(--seed-dimension-x2);
|
|
129
|
+
padding-right: var(--seed-dimension-x2);
|
|
130
|
+
font-size: var(--seed-font-size-t5);
|
|
131
|
+
line-height: var(--seed-line-height-t5)
|
|
132
|
+
}
|
|
133
|
+
.seed-quantity-picker__divider--size_medium {
|
|
134
|
+
width: 1px;
|
|
135
|
+
height: var(--seed-dimension-x4)
|
|
136
|
+
}
|
|
137
|
+
.seed-quantity-picker__incrementButton--size_medium {
|
|
138
|
+
width: var(--seed-dimension-x10);
|
|
139
|
+
height: var(--seed-dimension-x10);
|
|
140
|
+
border-radius: var(--seed-radius-r2)
|
|
141
|
+
}
|
|
142
|
+
.seed-quantity-picker__incrementIcon--size_medium {
|
|
143
|
+
width: 18px;
|
|
144
|
+
height: 18px;
|
|
145
|
+
--size: 18px;
|
|
146
|
+
--thickness: 2px
|
|
147
|
+
}
|
|
148
|
+
.seed-quantity-picker__root--size_large {
|
|
149
|
+
height: var(--seed-dimension-x13);
|
|
150
|
+
border-radius: var(--seed-radius-r3)
|
|
151
|
+
}
|
|
152
|
+
.seed-quantity-picker__decrementButton--size_large {
|
|
153
|
+
width: var(--seed-dimension-x13);
|
|
154
|
+
height: var(--seed-dimension-x13);
|
|
155
|
+
border-radius: var(--seed-radius-r3)
|
|
156
|
+
}
|
|
157
|
+
.seed-quantity-picker__decrementIcon--size_large {
|
|
158
|
+
width: 22px;
|
|
159
|
+
height: 22px;
|
|
160
|
+
--size: 22px;
|
|
161
|
+
--thickness: 2px
|
|
162
|
+
}
|
|
163
|
+
.seed-quantity-picker__valueDisplay--size_large {
|
|
164
|
+
padding-left: var(--seed-dimension-x2);
|
|
165
|
+
padding-right: var(--seed-dimension-x2);
|
|
166
|
+
font-size: var(--seed-font-size-t6);
|
|
167
|
+
line-height: var(--seed-line-height-t6)
|
|
168
|
+
}
|
|
169
|
+
.seed-quantity-picker__divider--size_large {
|
|
170
|
+
width: 1px;
|
|
171
|
+
height: var(--seed-dimension-x4)
|
|
172
|
+
}
|
|
173
|
+
.seed-quantity-picker__incrementButton--size_large {
|
|
174
|
+
width: var(--seed-dimension-x13);
|
|
175
|
+
height: var(--seed-dimension-x13);
|
|
176
|
+
border-radius: var(--seed-radius-r3)
|
|
177
|
+
}
|
|
178
|
+
.seed-quantity-picker__incrementIcon--size_large {
|
|
179
|
+
width: 22px;
|
|
180
|
+
height: 22px;
|
|
181
|
+
--size: 22px;
|
|
182
|
+
--thickness: 2px
|
|
183
|
+
}
|
|
184
|
+
.seed-quantity-picker__root--invalid_true {
|
|
185
|
+
box-shadow: inset 0 0 0 2px var(--seed-color-stroke-critical-solid)
|
|
186
|
+
}
|
|
187
|
+
.seed-quantity-picker__decrementIcon--disabled_true {
|
|
188
|
+
color: var(--seed-color-fg-disabled)
|
|
189
|
+
}
|
|
190
|
+
.seed-quantity-picker__valueDisplay--disabled_true {
|
|
191
|
+
color: var(--seed-color-fg-disabled)
|
|
192
|
+
}
|
|
193
|
+
.seed-quantity-picker__incrementIcon--disabled_true {
|
|
194
|
+
color: var(--seed-color-fg-disabled)
|
|
195
|
+
}
|
|
196
|
+
.seed-quantity-picker__decrementButton--pressed_true {
|
|
197
|
+
background-color: var(--seed-color-bg-transparent-pressed)
|
|
198
|
+
}
|
|
199
|
+
.seed-quantity-picker__incrementButton--pressed_true {
|
|
200
|
+
background-color: var(--seed-color-bg-transparent-pressed)
|
|
201
|
+
}
|
|
202
|
+
.seed-quantity-picker__decrementButton--loading_true {
|
|
203
|
+
background-color: var(--seed-color-bg-transparent-pressed)
|
|
204
|
+
}
|
|
205
|
+
.seed-quantity-picker__incrementButton--loading_true {
|
|
206
|
+
background-color: var(--seed-color-bg-transparent-pressed)
|
|
207
|
+
}
|
|
208
|
+
.seed-quantity-picker__decrementButton--disabled_false-loading_false:active {
|
|
209
|
+
background-color: var(--seed-color-bg-transparent-pressed)
|
|
210
|
+
}
|
|
211
|
+
.seed-quantity-picker__incrementButton--disabled_false-loading_false:active {
|
|
212
|
+
background-color: var(--seed-color-bg-transparent-pressed)
|
|
213
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
declare interface QuantityPickerVariant {
|
|
2
|
+
/**
|
|
3
|
+
* @default "hug"
|
|
4
|
+
*/
|
|
5
|
+
layout: "hug" | "fill";
|
|
6
|
+
/**
|
|
7
|
+
* @default "medium"
|
|
8
|
+
*/
|
|
9
|
+
size: "small" | "medium" | "large";
|
|
10
|
+
/**
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
invalid: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
pressed: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
loading: boolean;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
declare type QuantityPickerVariantMap = {
|
|
29
|
+
[key in keyof QuantityPickerVariant]: Array<QuantityPickerVariant[key]>;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export declare type QuantityPickerVariantProps = Partial<QuantityPickerVariant>;
|
|
33
|
+
|
|
34
|
+
export declare type QuantityPickerSlotName = "root" | "decrementButton" | "decrementIcon" | "valueDisplay" | "valueDisplayPlaceholder" | "valueDisplayText" | "divider" | "incrementButton" | "incrementIcon";
|
|
35
|
+
|
|
36
|
+
export declare const quantityPickerVariantMap: QuantityPickerVariantMap;
|
|
37
|
+
|
|
38
|
+
export declare const quantityPicker: ((
|
|
39
|
+
props?: QuantityPickerVariantProps,
|
|
40
|
+
) => Record<QuantityPickerSlotName, string>) & {
|
|
41
|
+
splitVariantProps: <T extends QuantityPickerVariantProps>(
|
|
42
|
+
props: T,
|
|
43
|
+
) => [QuantityPickerVariantProps, Omit<T, keyof QuantityPickerVariantProps>];
|
|
44
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import './quantity-picker.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
|
+
"layout": "hug",
|
|
45
|
+
"size": "medium",
|
|
46
|
+
"invalid": false,
|
|
47
|
+
"disabled": false,
|
|
48
|
+
"pressed": false,
|
|
49
|
+
"loading": false
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const compoundVariants = [
|
|
53
|
+
{
|
|
54
|
+
"disabled": false,
|
|
55
|
+
"loading": false
|
|
56
|
+
}
|
|
57
|
+
];
|
|
58
|
+
|
|
59
|
+
export const quantityPickerVariantMap = {
|
|
60
|
+
"layout": [
|
|
61
|
+
"hug",
|
|
62
|
+
"fill"
|
|
63
|
+
],
|
|
64
|
+
"size": [
|
|
65
|
+
"small",
|
|
66
|
+
"medium",
|
|
67
|
+
"large"
|
|
68
|
+
],
|
|
69
|
+
"invalid": [
|
|
70
|
+
true,
|
|
71
|
+
false
|
|
72
|
+
],
|
|
73
|
+
"disabled": [
|
|
74
|
+
true,
|
|
75
|
+
false
|
|
76
|
+
],
|
|
77
|
+
"pressed": [
|
|
78
|
+
true,
|
|
79
|
+
false
|
|
80
|
+
],
|
|
81
|
+
"loading": [
|
|
82
|
+
true,
|
|
83
|
+
false
|
|
84
|
+
]
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export const quantityPickerVariantKeys = Object.keys(quantityPickerVariantMap);
|
|
88
|
+
|
|
89
|
+
export function quantityPicker(props) {
|
|
90
|
+
return Object.fromEntries(
|
|
91
|
+
quantityPickerSlotNames.map(([slot, className]) => {
|
|
92
|
+
return [
|
|
93
|
+
slot,
|
|
94
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
95
|
+
];
|
|
96
|
+
}),
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
Object.assign(quantityPicker, { splitVariantProps: (props) => splitVariantProps(props, quantityPickerVariantMap) });
|
|
101
|
+
|
|
102
|
+
// @recipe(seed): quantity-picker
|
|
@@ -7,10 +7,9 @@
|
|
|
7
7
|
flex-shrink: 0;
|
|
8
8
|
background: var(--seed-color-bg-transparent);
|
|
9
9
|
box-shadow: inset 0 0 0 1px var(--seed-color-stroke-neutral-muted);
|
|
10
|
-
transform: scale(1);
|
|
11
10
|
--track-color: var(--seed-color-palette-gray-500);
|
|
12
11
|
--range-color: var(--seed-color-fg-neutral);
|
|
13
|
-
transition: background-color var(--seed-duration-color-transition) var(--seed-timing-function-easing), box-shadow var(--seed-duration-color-transition) var(--seed-timing-function-easing)
|
|
12
|
+
transition: background-color var(--seed-duration-color-transition) var(--seed-timing-function-easing), box-shadow var(--seed-duration-color-transition) var(--seed-timing-function-easing)
|
|
14
13
|
}
|
|
15
14
|
.seed-reaction-button__content {
|
|
16
15
|
display: flex;
|
|
@@ -119,23 +118,19 @@
|
|
|
119
118
|
color: var(--seed-color-fg-disabled)
|
|
120
119
|
}
|
|
121
120
|
.seed-reaction-button__root--loading_true {
|
|
122
|
-
background: var(--seed-color-bg-neutral-weak-pressed)
|
|
123
|
-
transition: box-shadow var(--seed-duration-color-transition) var(--seed-timing-function-easing), transform var(--seed-duration-pressed-scale) var(--seed-timing-function-pressed-scale)
|
|
121
|
+
background: var(--seed-color-bg-neutral-weak-pressed)
|
|
124
122
|
}
|
|
125
123
|
.seed-reaction-button__content--loading_true {
|
|
126
124
|
opacity: 0
|
|
127
125
|
}
|
|
128
|
-
.seed-reaction-button__root--selected_true-pressed_true {
|
|
126
|
+
.seed-reaction-button__root--selected_true-pressed_true-disabled_false-loading_false {
|
|
129
127
|
background: var(--seed-color-bg-transparent-pressed)
|
|
130
128
|
}
|
|
131
|
-
.seed-reaction-button__root--
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
.seed-reaction-button__root--size_small-pressed_true {
|
|
135
|
-
transform: scale(var(--seed-scale-s97))
|
|
129
|
+
.seed-reaction-button__root--selected_false-disabled_false-loading_false:active {
|
|
130
|
+
background: var(--seed-color-bg-transparent-pressed)
|
|
136
131
|
}
|
|
137
|
-
.seed-reaction-button__root--selected_true-
|
|
138
|
-
|
|
132
|
+
.seed-reaction-button__root--selected_true-disabled_false-loading_false:active {
|
|
133
|
+
background: var(--seed-color-bg-transparent-pressed)
|
|
139
134
|
}
|
|
140
135
|
.seed-reaction-button__root--selected_true-loading_true {
|
|
141
136
|
background: var(--seed-color-bg-transparent-pressed);
|
|
@@ -39,19 +39,18 @@ const defaultVariant = {
|
|
|
39
39
|
const compoundVariants = [
|
|
40
40
|
{
|
|
41
41
|
"selected": true,
|
|
42
|
-
"pressed": true
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"size": "xsmall",
|
|
46
|
-
"pressed": true
|
|
42
|
+
"pressed": true,
|
|
43
|
+
"disabled": false,
|
|
44
|
+
"loading": false
|
|
47
45
|
},
|
|
48
46
|
{
|
|
49
|
-
"
|
|
50
|
-
"
|
|
47
|
+
"selected": false,
|
|
48
|
+
"disabled": false,
|
|
49
|
+
"loading": false
|
|
51
50
|
},
|
|
52
51
|
{
|
|
53
52
|
"selected": true,
|
|
54
|
-
"
|
|
53
|
+
"disabled": false,
|
|
55
54
|
"loading": false
|
|
56
55
|
},
|
|
57
56
|
{
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
.seed-scroll-fog__root {}
|
|
2
|
+
.seed-scroll-fog__topMask {
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
mask-image: linear-gradient(#000000ff, #000000ff);
|
|
6
|
+
mask-position: top left;
|
|
7
|
+
mask-repeat: no-repeat;
|
|
8
|
+
mask-size: 100% 100%;
|
|
9
|
+
pointer-events: none
|
|
10
|
+
}
|
|
11
|
+
.seed-scroll-fog__bottomMask {
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 100%;
|
|
14
|
+
mask-image: linear-gradient(#000000ff, #000000ff);
|
|
15
|
+
mask-position: top left;
|
|
16
|
+
mask-repeat: no-repeat;
|
|
17
|
+
mask-size: 100% 100%;
|
|
18
|
+
pointer-events: none
|
|
19
|
+
}
|
|
20
|
+
.seed-scroll-fog__leftMask {
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 100%;
|
|
23
|
+
mask-image: linear-gradient(#000000ff, #000000ff);
|
|
24
|
+
mask-position: top left;
|
|
25
|
+
mask-repeat: no-repeat;
|
|
26
|
+
mask-size: 100% 100%;
|
|
27
|
+
pointer-events: none
|
|
28
|
+
}
|
|
29
|
+
.seed-scroll-fog__rightMask {
|
|
30
|
+
width: 100%;
|
|
31
|
+
height: 100%;
|
|
32
|
+
mask-image: linear-gradient(#000000ff, #000000ff);
|
|
33
|
+
mask-position: top left;
|
|
34
|
+
mask-repeat: no-repeat;
|
|
35
|
+
mask-size: 100% 100%;
|
|
36
|
+
pointer-events: none
|
|
37
|
+
}
|
|
38
|
+
.seed-scroll-fog__verticalScroll {
|
|
39
|
+
width: 100%;
|
|
40
|
+
height: 100%;
|
|
41
|
+
pointer-events: auto
|
|
42
|
+
}
|
|
43
|
+
.seed-scroll-fog__horizontalScroll {
|
|
44
|
+
width: 100%;
|
|
45
|
+
pointer-events: auto
|
|
46
|
+
}
|
|
47
|
+
.seed-scroll-fog__topMask--top_true {
|
|
48
|
+
mask-image: linear-gradient(to bottom, #00000000 0%, #00000003 8%, #00000005 16%, #0000000d 22%, #00000014 29%, #00000021 35%, #0000002e 41%, #00000040 47%, #00000052 53%, #00000066 59%, #0000007a 65%, #00000094 71%, #000000ab 78%, #000000c7 84%, #000000e3 92%, #000000ff 100%), linear-gradient(#000000ff, #000000ff);
|
|
49
|
+
mask-position: top, bottom;
|
|
50
|
+
mask-size: 100% var(--scroll-fog-size-top), 100% calc(100% - var(--scroll-fog-size-top))
|
|
51
|
+
}
|
|
52
|
+
.seed-scroll-fog__bottomMask--bottom_true {
|
|
53
|
+
mask-image: linear-gradient(to top, #00000000 0%, #00000003 8%, #00000005 16%, #0000000d 22%, #00000014 29%, #00000021 35%, #0000002e 41%, #00000040 47%, #00000052 53%, #00000066 59%, #0000007a 65%, #00000094 71%, #000000ab 78%, #000000c7 84%, #000000e3 92%, #000000ff 100%), linear-gradient(#000000ff, #000000ff);
|
|
54
|
+
mask-position: bottom, top;
|
|
55
|
+
mask-size: 100% var(--scroll-fog-size-bottom), 100% calc(100% - var(--scroll-fog-size-bottom))
|
|
56
|
+
}
|
|
57
|
+
.seed-scroll-fog__leftMask--left_true {
|
|
58
|
+
mask-image: linear-gradient(to right, #00000000 0%, #00000003 8%, #00000005 16%, #0000000d 22%, #00000014 29%, #00000021 35%, #0000002e 41%, #00000040 47%, #00000052 53%, #00000066 59%, #0000007a 65%, #00000094 71%, #000000ab 78%, #000000c7 84%, #000000e3 92%, #000000ff 100%), linear-gradient(#000000ff, #000000ff);
|
|
59
|
+
mask-position: left, right;
|
|
60
|
+
mask-size: var(--scroll-fog-size-left) 100%, calc(100% - var(--scroll-fog-size-left)) 100%
|
|
61
|
+
}
|
|
62
|
+
.seed-scroll-fog__rightMask--right_true {
|
|
63
|
+
mask-image: linear-gradient(to left, #00000000 0%, #00000003 8%, #00000005 16%, #0000000d 22%, #00000014 29%, #00000021 35%, #0000002e 41%, #00000040 47%, #00000052 53%, #00000066 59%, #0000007a 65%, #00000094 71%, #000000ab 78%, #000000c7 84%, #000000e3 92%, #000000ff 100%), linear-gradient(#000000ff, #000000ff);
|
|
64
|
+
mask-position: right, left;
|
|
65
|
+
mask-size: var(--scroll-fog-size-right) 100%, calc(100% - var(--scroll-fog-size-right)) 100%
|
|
66
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
declare interface ScrollFogVariant {
|
|
2
|
+
/**
|
|
3
|
+
* @default false
|
|
4
|
+
*/
|
|
5
|
+
top: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* @default false
|
|
8
|
+
*/
|
|
9
|
+
bottom: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
left: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
right: boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare type ScrollFogVariantMap = {
|
|
21
|
+
[key in keyof ScrollFogVariant]: Array<ScrollFogVariant[key]>;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export declare type ScrollFogVariantProps = Partial<ScrollFogVariant>;
|
|
25
|
+
|
|
26
|
+
export declare type ScrollFogSlotName = "root" | "topMask" | "bottomMask" | "leftMask" | "rightMask" | "verticalScroll" | "horizontalScroll";
|
|
27
|
+
|
|
28
|
+
export declare const scrollFogVariantMap: ScrollFogVariantMap;
|
|
29
|
+
|
|
30
|
+
export declare const scrollFog: ((
|
|
31
|
+
props?: ScrollFogVariantProps,
|
|
32
|
+
) => Record<ScrollFogSlotName, string>) & {
|
|
33
|
+
splitVariantProps: <T extends ScrollFogVariantProps>(
|
|
34
|
+
props: T,
|
|
35
|
+
) => [ScrollFogVariantProps, Omit<T, keyof ScrollFogVariantProps>];
|
|
36
|
+
}
|