@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
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
.seed-attachment-input-item__root {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: flex;
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 80px;
|
|
6
|
+
border-radius: var(--seed-radius-r3);
|
|
7
|
+
background-color: transparent;
|
|
8
|
+
transform: scale(1);
|
|
9
|
+
transition: transform var(--seed-duration-pressed-scale) var(--seed-timing-function-pressed-scale);
|
|
10
|
+
overflow: visible
|
|
11
|
+
}
|
|
12
|
+
.seed-attachment-input-item__surface {
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: 0;
|
|
15
|
+
right: 0;
|
|
16
|
+
bottom: 0;
|
|
17
|
+
left: 0;
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
gap: var(--seed-dimension-x2_5);
|
|
22
|
+
border-radius: var(--seed-radius-r3);
|
|
23
|
+
background-color: var(--seed-color-bg-transparent);
|
|
24
|
+
pointer-events: auto;
|
|
25
|
+
overflow: hidden
|
|
26
|
+
}
|
|
27
|
+
.seed-attachment-input-item__image {
|
|
28
|
+
width: 100%;
|
|
29
|
+
height: 100%;
|
|
30
|
+
border-radius: var(--seed-radius-r3)
|
|
31
|
+
}
|
|
32
|
+
.seed-attachment-input-item__thumbnail {
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
width: var(--seed-dimension-x12);
|
|
37
|
+
height: var(--seed-dimension-x12);
|
|
38
|
+
background-color: var(--seed-color-bg-neutral-weak);
|
|
39
|
+
border-radius: var(--seed-radius-r2);
|
|
40
|
+
flex-shrink: 0;
|
|
41
|
+
color: var(--seed-color-fg-neutral-subtle)
|
|
42
|
+
}
|
|
43
|
+
.seed-attachment-input-item__thumbnailIcon {
|
|
44
|
+
width: var(--seed-dimension-x6);
|
|
45
|
+
height: var(--seed-dimension-x6);
|
|
46
|
+
flex-shrink: 0;
|
|
47
|
+
color: var(--seed-color-fg-neutral-subtle)
|
|
48
|
+
}
|
|
49
|
+
.seed-attachment-input-item__metadata {
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
width: 100%;
|
|
53
|
+
min-width: 0;
|
|
54
|
+
flex-grow: 1
|
|
55
|
+
}
|
|
56
|
+
.seed-attachment-input-item__name {
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
text-overflow: ellipsis;
|
|
59
|
+
white-space: nowrap;
|
|
60
|
+
word-break: break-all;
|
|
61
|
+
font-size: var(--seed-font-size-t2);
|
|
62
|
+
line-height: var(--seed-line-height-t2);
|
|
63
|
+
font-weight: var(--seed-font-weight-medium);
|
|
64
|
+
color: var(--seed-color-fg-neutral)
|
|
65
|
+
}
|
|
66
|
+
.seed-attachment-input-item__size {
|
|
67
|
+
font-size: var(--seed-font-size-t1);
|
|
68
|
+
line-height: var(--seed-line-height-t1);
|
|
69
|
+
font-weight: var(--seed-font-weight-regular);
|
|
70
|
+
color: var(--seed-color-fg-neutral-subtle)
|
|
71
|
+
}
|
|
72
|
+
.seed-attachment-input-item__backdrop {
|
|
73
|
+
position: absolute;
|
|
74
|
+
top: 0;
|
|
75
|
+
right: 0;
|
|
76
|
+
bottom: 0;
|
|
77
|
+
left: 0;
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
border-radius: var(--seed-radius-r3)
|
|
83
|
+
}
|
|
84
|
+
.seed-attachment-input-item__actionButton {
|
|
85
|
+
width: 100%;
|
|
86
|
+
height: 100%;
|
|
87
|
+
display: flex;
|
|
88
|
+
flex-direction: column;
|
|
89
|
+
align-items: center;
|
|
90
|
+
justify-content: center;
|
|
91
|
+
text-align: center;
|
|
92
|
+
border-width: 0;
|
|
93
|
+
padding: 0;
|
|
94
|
+
background-color: transparent;
|
|
95
|
+
border-radius: var(--seed-radius-r3);
|
|
96
|
+
color: var(--seed-color-fg-neutral-subtle);
|
|
97
|
+
gap: var(--seed-dimension-x1);
|
|
98
|
+
transition: transform var(--seed-duration-pressed-scale) var(--seed-timing-function-pressed-scale)
|
|
99
|
+
}
|
|
100
|
+
.seed-attachment-input-item__actionIcon {
|
|
101
|
+
width: var(--seed-dimension-x6);
|
|
102
|
+
height: var(--seed-dimension-x6);
|
|
103
|
+
flex-shrink: 0;
|
|
104
|
+
color: var(--seed-color-fg-neutral-subtle)
|
|
105
|
+
}
|
|
106
|
+
.seed-attachment-input-item__actionLabel {
|
|
107
|
+
font-size: var(--seed-font-size-t2);
|
|
108
|
+
line-height: var(--seed-line-height-t2);
|
|
109
|
+
font-weight: var(--seed-font-weight-medium);
|
|
110
|
+
color: var(--seed-color-fg-neutral-subtle)
|
|
111
|
+
}
|
|
112
|
+
.seed-attachment-input-item__removeButton {
|
|
113
|
+
position: absolute;
|
|
114
|
+
top: calc(var(--seed-dimension-x1) * -1);
|
|
115
|
+
right: calc(var(--seed-dimension-x1) * -1);
|
|
116
|
+
width: var(--seed-dimension-x5);
|
|
117
|
+
height: var(--seed-dimension-x5);
|
|
118
|
+
display: flex;
|
|
119
|
+
align-items: center;
|
|
120
|
+
justify-content: center;
|
|
121
|
+
border-width: 0;
|
|
122
|
+
padding: 0;
|
|
123
|
+
background-color: var(--seed-color-bg-layer-default);
|
|
124
|
+
border-radius: var(--seed-radius-full);
|
|
125
|
+
box-shadow: inset 0 0 0 1px var(--seed-color-stroke-neutral-weak);
|
|
126
|
+
color: var(--seed-color-fg-neutral);
|
|
127
|
+
transition: background-color var(--seed-duration-color-transition), transform var(--seed-duration-pressed-scale) var(--seed-timing-function-pressed-scale)
|
|
128
|
+
}
|
|
129
|
+
.seed-attachment-input-item__removeIcon {
|
|
130
|
+
width: var(--seed-dimension-x2_5);
|
|
131
|
+
height: var(--seed-dimension-x2_5);
|
|
132
|
+
flex-shrink: 0;
|
|
133
|
+
color: var(--seed-color-fg-neutral)
|
|
134
|
+
}
|
|
135
|
+
.seed-attachment-input-item__badge {}
|
|
136
|
+
.seed-attachment-input-item__badgeLabel {}
|
|
137
|
+
.seed-attachment-input-item__root--type_general {
|
|
138
|
+
width: 160px
|
|
139
|
+
}
|
|
140
|
+
.seed-attachment-input-item__surface--type_general {
|
|
141
|
+
padding-left: var(--seed-dimension-x4);
|
|
142
|
+
padding-right: var(--seed-dimension-x4);
|
|
143
|
+
box-shadow: inset 0 0 0 1px var(--seed-color-stroke-neutral-weak);
|
|
144
|
+
clip-path: path("M0 0 H143.607695 A12 12 0 0 0 160 16.392305 V80 H0 Z")
|
|
145
|
+
}
|
|
146
|
+
.seed-attachment-input-item__thumbnail--type_general {
|
|
147
|
+
color: var(--seed-color-fg-neutral-subtle)
|
|
148
|
+
}
|
|
149
|
+
.seed-attachment-input-item__metadata--type_general {}
|
|
150
|
+
.seed-attachment-input-item__actionButton--type_general {
|
|
151
|
+
color: var(--seed-color-fg-neutral-subtle)
|
|
152
|
+
}
|
|
153
|
+
.seed-attachment-input-item__actionIcon--type_general {
|
|
154
|
+
color: var(--seed-color-fg-neutral-subtle)
|
|
155
|
+
}
|
|
156
|
+
.seed-attachment-input-item__actionLabel--type_general {
|
|
157
|
+
color: var(--seed-color-fg-neutral-subtle)
|
|
158
|
+
}
|
|
159
|
+
.seed-attachment-input-item__root--type_image {
|
|
160
|
+
width: 80px;
|
|
161
|
+
transition: opacity var(--seed-duration-color-transition), transform var(--seed-duration-pressed-scale) var(--seed-timing-function-pressed-scale)
|
|
162
|
+
}
|
|
163
|
+
.seed-attachment-input-item__surface--type_image {
|
|
164
|
+
box-shadow: inset 0 0 0 1px var(--seed-color-stroke-neutral-subtle);
|
|
165
|
+
clip-path: path("M0 0 H63.607695 A12 12 0 0 0 80 16.392305 V80 H0 Z")
|
|
166
|
+
}
|
|
167
|
+
.seed-attachment-input-item__thumbnail--type_image {
|
|
168
|
+
display: none
|
|
169
|
+
}
|
|
170
|
+
.seed-attachment-input-item__metadata--type_image {
|
|
171
|
+
display: none
|
|
172
|
+
}
|
|
173
|
+
.seed-attachment-input-item__badge--type_image {
|
|
174
|
+
position: absolute;
|
|
175
|
+
bottom: 0;
|
|
176
|
+
left: 0;
|
|
177
|
+
right: 0;
|
|
178
|
+
display: flex;
|
|
179
|
+
align-items: center;
|
|
180
|
+
justify-content: center;
|
|
181
|
+
height: var(--seed-dimension-x6);
|
|
182
|
+
padding-left: var(--seed-dimension-x1);
|
|
183
|
+
padding-right: var(--seed-dimension-x1);
|
|
184
|
+
background-color: var(--seed-color-bg-overlay);
|
|
185
|
+
border-radius: 0 0 var(--seed-radius-r3) var(--seed-radius-r3)
|
|
186
|
+
}
|
|
187
|
+
.seed-attachment-input-item__badgeLabel--type_image {
|
|
188
|
+
overflow: hidden;
|
|
189
|
+
text-overflow: ellipsis;
|
|
190
|
+
white-space: nowrap;
|
|
191
|
+
font-size: var(--seed-font-size-t2);
|
|
192
|
+
line-height: var(--seed-line-height-t2);
|
|
193
|
+
font-weight: var(--seed-font-weight-medium);
|
|
194
|
+
color: var(--seed-color-palette-static-white)
|
|
195
|
+
}
|
|
196
|
+
.seed-attachment-input-item__backdrop--type_image {
|
|
197
|
+
background-color: var(--seed-color-bg-overlay)
|
|
198
|
+
}
|
|
199
|
+
.seed-attachment-input-item__actionButton--type_image {
|
|
200
|
+
color: var(--seed-color-palette-static-white)
|
|
201
|
+
}
|
|
202
|
+
.seed-attachment-input-item__actionIcon--type_image {
|
|
203
|
+
color: var(--seed-color-palette-static-white)
|
|
204
|
+
}
|
|
205
|
+
.seed-attachment-input-item__actionLabel--type_image {
|
|
206
|
+
color: var(--seed-color-palette-static-white)
|
|
207
|
+
}
|
|
208
|
+
.seed-attachment-input-item__root--pressed_true {
|
|
209
|
+
transform: scale(var(--seed-scale-s98))
|
|
210
|
+
}
|
|
211
|
+
.seed-attachment-input-item__thumbnail--readOnly_true {
|
|
212
|
+
color: var(--seed-color-fg-disabled)
|
|
213
|
+
}
|
|
214
|
+
.seed-attachment-input-item__thumbnailIcon--readOnly_true {
|
|
215
|
+
color: var(--seed-color-fg-disabled)
|
|
216
|
+
}
|
|
217
|
+
.seed-attachment-input-item__name--readOnly_true {
|
|
218
|
+
color: var(--seed-color-fg-disabled)
|
|
219
|
+
}
|
|
220
|
+
.seed-attachment-input-item__size--readOnly_true {
|
|
221
|
+
color: var(--seed-color-fg-disabled)
|
|
222
|
+
}
|
|
223
|
+
.seed-attachment-input-item__root--dragging_true {
|
|
224
|
+
transform: scale(var(--seed-scale-s98))
|
|
225
|
+
}
|
|
226
|
+
.seed-attachment-input-item__thumbnail--dragging_true {
|
|
227
|
+
color: var(--seed-color-fg-disabled)
|
|
228
|
+
}
|
|
229
|
+
.seed-attachment-input-item__thumbnailIcon--dragging_true {
|
|
230
|
+
color: var(--seed-color-fg-disabled)
|
|
231
|
+
}
|
|
232
|
+
.seed-attachment-input-item__name--dragging_true {
|
|
233
|
+
color: var(--seed-color-fg-disabled)
|
|
234
|
+
}
|
|
235
|
+
.seed-attachment-input-item__size--dragging_true {
|
|
236
|
+
color: var(--seed-color-fg-disabled)
|
|
237
|
+
}
|
|
238
|
+
.seed-attachment-input-item__surface--dragging_true {
|
|
239
|
+
clip-path: inset(0px)
|
|
240
|
+
}
|
|
241
|
+
.seed-attachment-input-item__removeButton--dragging_true {
|
|
242
|
+
display: none
|
|
243
|
+
}
|
|
244
|
+
.seed-attachment-input-item__thumbnail--disabled_true {
|
|
245
|
+
color: var(--seed-color-fg-disabled)
|
|
246
|
+
}
|
|
247
|
+
.seed-attachment-input-item__thumbnailIcon--disabled_true {
|
|
248
|
+
color: var(--seed-color-fg-disabled)
|
|
249
|
+
}
|
|
250
|
+
.seed-attachment-input-item__name--disabled_true {
|
|
251
|
+
color: var(--seed-color-fg-disabled)
|
|
252
|
+
}
|
|
253
|
+
.seed-attachment-input-item__size--disabled_true {
|
|
254
|
+
color: var(--seed-color-fg-disabled)
|
|
255
|
+
}
|
|
256
|
+
.seed-attachment-input-item__actionButton--disabled_true {
|
|
257
|
+
color: var(--seed-color-fg-disabled)
|
|
258
|
+
}
|
|
259
|
+
.seed-attachment-input-item__actionIcon--disabled_true {
|
|
260
|
+
color: var(--seed-color-fg-disabled)
|
|
261
|
+
}
|
|
262
|
+
.seed-attachment-input-item__actionLabel--disabled_true {
|
|
263
|
+
color: var(--seed-color-fg-disabled)
|
|
264
|
+
}
|
|
265
|
+
.seed-attachment-input-item__removeButton--disabled_true {
|
|
266
|
+
color: var(--seed-color-fg-disabled)
|
|
267
|
+
}
|
|
268
|
+
.seed-attachment-input-item__removeIcon--disabled_true {
|
|
269
|
+
color: var(--seed-color-fg-disabled)
|
|
270
|
+
}
|
|
271
|
+
.seed-attachment-input-item__root--type_image-readOnly_true {
|
|
272
|
+
opacity: 0.5
|
|
273
|
+
}
|
|
274
|
+
.seed-attachment-input-item__root--type_image-dragging_true {
|
|
275
|
+
opacity: 0.5
|
|
276
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
declare interface AttachmentInputItemVariant {
|
|
2
|
+
/**
|
|
3
|
+
* @default "general"
|
|
4
|
+
*/
|
|
5
|
+
type: "general" | "image";
|
|
6
|
+
/**
|
|
7
|
+
* @default false
|
|
8
|
+
*/
|
|
9
|
+
pressed: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
readOnly: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
dragging: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare type AttachmentInputItemVariantMap = {
|
|
25
|
+
[key in keyof AttachmentInputItemVariant]: Array<AttachmentInputItemVariant[key]>;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export declare type AttachmentInputItemVariantProps = Partial<AttachmentInputItemVariant>;
|
|
29
|
+
|
|
30
|
+
export declare type AttachmentInputItemSlotName = "root" | "surface" | "image" | "thumbnail" | "thumbnailIcon" | "metadata" | "name" | "size" | "badge" | "badgeLabel" | "backdrop" | "actionButton" | "actionIcon" | "actionLabel" | "removeButton" | "removeIcon";
|
|
31
|
+
|
|
32
|
+
export declare const attachmentInputItemVariantMap: AttachmentInputItemVariantMap;
|
|
33
|
+
|
|
34
|
+
export declare const attachmentInputItem: ((
|
|
35
|
+
props?: AttachmentInputItemVariantProps,
|
|
36
|
+
) => Record<AttachmentInputItemSlotName, string>) & {
|
|
37
|
+
splitVariantProps: <T extends AttachmentInputItemVariantProps>(
|
|
38
|
+
props: T,
|
|
39
|
+
) => [AttachmentInputItemVariantProps, Omit<T, keyof AttachmentInputItemVariantProps>];
|
|
40
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import './attachment-input-item.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const attachmentInputItemSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-attachment-input-item__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"surface",
|
|
11
|
+
"seed-attachment-input-item__surface"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"image",
|
|
15
|
+
"seed-attachment-input-item__image"
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"thumbnail",
|
|
19
|
+
"seed-attachment-input-item__thumbnail"
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
"thumbnailIcon",
|
|
23
|
+
"seed-attachment-input-item__thumbnailIcon"
|
|
24
|
+
],
|
|
25
|
+
[
|
|
26
|
+
"metadata",
|
|
27
|
+
"seed-attachment-input-item__metadata"
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
"name",
|
|
31
|
+
"seed-attachment-input-item__name"
|
|
32
|
+
],
|
|
33
|
+
[
|
|
34
|
+
"size",
|
|
35
|
+
"seed-attachment-input-item__size"
|
|
36
|
+
],
|
|
37
|
+
[
|
|
38
|
+
"badge",
|
|
39
|
+
"seed-attachment-input-item__badge"
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
"badgeLabel",
|
|
43
|
+
"seed-attachment-input-item__badgeLabel"
|
|
44
|
+
],
|
|
45
|
+
[
|
|
46
|
+
"backdrop",
|
|
47
|
+
"seed-attachment-input-item__backdrop"
|
|
48
|
+
],
|
|
49
|
+
[
|
|
50
|
+
"actionButton",
|
|
51
|
+
"seed-attachment-input-item__actionButton"
|
|
52
|
+
],
|
|
53
|
+
[
|
|
54
|
+
"actionIcon",
|
|
55
|
+
"seed-attachment-input-item__actionIcon"
|
|
56
|
+
],
|
|
57
|
+
[
|
|
58
|
+
"actionLabel",
|
|
59
|
+
"seed-attachment-input-item__actionLabel"
|
|
60
|
+
],
|
|
61
|
+
[
|
|
62
|
+
"removeButton",
|
|
63
|
+
"seed-attachment-input-item__removeButton"
|
|
64
|
+
],
|
|
65
|
+
[
|
|
66
|
+
"removeIcon",
|
|
67
|
+
"seed-attachment-input-item__removeIcon"
|
|
68
|
+
]
|
|
69
|
+
];
|
|
70
|
+
|
|
71
|
+
const defaultVariant = {
|
|
72
|
+
"type": "general",
|
|
73
|
+
"pressed": false,
|
|
74
|
+
"readOnly": false,
|
|
75
|
+
"dragging": false,
|
|
76
|
+
"disabled": false
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const compoundVariants = [
|
|
80
|
+
{
|
|
81
|
+
"type": "image",
|
|
82
|
+
"readOnly": true
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"type": "image",
|
|
86
|
+
"dragging": true
|
|
87
|
+
}
|
|
88
|
+
];
|
|
89
|
+
|
|
90
|
+
export const attachmentInputItemVariantMap = {
|
|
91
|
+
"type": [
|
|
92
|
+
"general",
|
|
93
|
+
"image"
|
|
94
|
+
],
|
|
95
|
+
"pressed": [
|
|
96
|
+
true,
|
|
97
|
+
false
|
|
98
|
+
],
|
|
99
|
+
"readOnly": [
|
|
100
|
+
true,
|
|
101
|
+
false
|
|
102
|
+
],
|
|
103
|
+
"dragging": [
|
|
104
|
+
true,
|
|
105
|
+
false
|
|
106
|
+
],
|
|
107
|
+
"disabled": [
|
|
108
|
+
true,
|
|
109
|
+
false
|
|
110
|
+
]
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export const attachmentInputItemVariantKeys = Object.keys(attachmentInputItemVariantMap);
|
|
114
|
+
|
|
115
|
+
export function attachmentInputItem(props) {
|
|
116
|
+
return Object.fromEntries(
|
|
117
|
+
attachmentInputItemSlotNames.map(([slot, className]) => {
|
|
118
|
+
return [
|
|
119
|
+
slot,
|
|
120
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
121
|
+
];
|
|
122
|
+
}),
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
Object.assign(attachmentInputItem, { splitVariantProps: (props) => splitVariantProps(props, attachmentInputItemVariantMap) });
|
|
127
|
+
|
|
128
|
+
// @recipe(seed): attachment-input-item
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
.seed-attachment-input-trigger__root {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
width: 80px;
|
|
7
|
+
height: 80px;
|
|
8
|
+
gap: var(--seed-dimension-x1);
|
|
9
|
+
flex-shrink: 0;
|
|
10
|
+
border-radius: var(--seed-radius-r3);
|
|
11
|
+
box-shadow: inset 0 0 0 1px var(--seed-color-stroke-neutral-weak);
|
|
12
|
+
padding: 0;
|
|
13
|
+
background-color: transparent;
|
|
14
|
+
transition: background-color var(--seed-duration-color-transition), transform var(--seed-duration-pressed-scale) var(--seed-timing-function-pressed-scale)
|
|
15
|
+
}
|
|
16
|
+
.seed-attachment-input-trigger__icon {
|
|
17
|
+
width: var(--seed-dimension-x6);
|
|
18
|
+
height: var(--seed-dimension-x6);
|
|
19
|
+
color: var(--seed-color-fg-neutral-subtle);
|
|
20
|
+
flex-shrink: 0
|
|
21
|
+
}
|
|
22
|
+
.seed-attachment-input-trigger__itemCountArea {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: row;
|
|
25
|
+
align-items: center;
|
|
26
|
+
font-size: var(--seed-font-size-t2);
|
|
27
|
+
line-height: var(--seed-line-height-t2)
|
|
28
|
+
}
|
|
29
|
+
.seed-attachment-input-trigger__itemCount {
|
|
30
|
+
color: var(--seed-color-fg-neutral);
|
|
31
|
+
font-size: var(--seed-font-size-t2);
|
|
32
|
+
line-height: var(--seed-line-height-t2);
|
|
33
|
+
font-weight: var(--seed-font-weight-regular)
|
|
34
|
+
}
|
|
35
|
+
.seed-attachment-input-trigger__maxItemCount {
|
|
36
|
+
color: var(--seed-color-fg-neutral-subtle);
|
|
37
|
+
font-size: var(--seed-font-size-t2);
|
|
38
|
+
line-height: var(--seed-line-height-t2);
|
|
39
|
+
font-weight: var(--seed-font-weight-regular)
|
|
40
|
+
}
|
|
41
|
+
.seed-attachment-input-trigger__root--pressed_true {
|
|
42
|
+
background-color: var(--seed-color-bg-transparent-pressed);
|
|
43
|
+
transform: scale(var(--seed-scale-s98))
|
|
44
|
+
}
|
|
45
|
+
.seed-attachment-input-trigger__icon--disabled_true {
|
|
46
|
+
color: var(--seed-color-fg-disabled)
|
|
47
|
+
}
|
|
48
|
+
.seed-attachment-input-trigger__itemCount--disabled_true {
|
|
49
|
+
color: var(--seed-color-fg-disabled)
|
|
50
|
+
}
|
|
51
|
+
.seed-attachment-input-trigger__maxItemCount--disabled_true {
|
|
52
|
+
color: var(--seed-color-fg-disabled)
|
|
53
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare interface AttachmentInputTriggerVariant {
|
|
2
|
+
/**
|
|
3
|
+
* @default false
|
|
4
|
+
*/
|
|
5
|
+
pressed: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* @default false
|
|
8
|
+
*/
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare type AttachmentInputTriggerVariantMap = {
|
|
13
|
+
[key in keyof AttachmentInputTriggerVariant]: Array<AttachmentInputTriggerVariant[key]>;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export declare type AttachmentInputTriggerVariantProps = Partial<AttachmentInputTriggerVariant>;
|
|
17
|
+
|
|
18
|
+
export declare type AttachmentInputTriggerSlotName = "root" | "icon" | "itemCountArea" | "itemCount" | "maxItemCount";
|
|
19
|
+
|
|
20
|
+
export declare const attachmentInputTriggerVariantMap: AttachmentInputTriggerVariantMap;
|
|
21
|
+
|
|
22
|
+
export declare const attachmentInputTrigger: ((
|
|
23
|
+
props?: AttachmentInputTriggerVariantProps,
|
|
24
|
+
) => Record<AttachmentInputTriggerSlotName, string>) & {
|
|
25
|
+
splitVariantProps: <T extends AttachmentInputTriggerVariantProps>(
|
|
26
|
+
props: T,
|
|
27
|
+
) => [AttachmentInputTriggerVariantProps, Omit<T, keyof AttachmentInputTriggerVariantProps>];
|
|
28
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import './attachment-input-trigger.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const attachmentInputTriggerSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-attachment-input-trigger__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"icon",
|
|
11
|
+
"seed-attachment-input-trigger__icon"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"itemCountArea",
|
|
15
|
+
"seed-attachment-input-trigger__itemCountArea"
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"itemCount",
|
|
19
|
+
"seed-attachment-input-trigger__itemCount"
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
"maxItemCount",
|
|
23
|
+
"seed-attachment-input-trigger__maxItemCount"
|
|
24
|
+
]
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
const defaultVariant = {
|
|
28
|
+
"pressed": false,
|
|
29
|
+
"disabled": false
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const compoundVariants = [];
|
|
33
|
+
|
|
34
|
+
export const attachmentInputTriggerVariantMap = {
|
|
35
|
+
"pressed": [
|
|
36
|
+
true,
|
|
37
|
+
false
|
|
38
|
+
],
|
|
39
|
+
"disabled": [
|
|
40
|
+
true,
|
|
41
|
+
false
|
|
42
|
+
]
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const attachmentInputTriggerVariantKeys = Object.keys(attachmentInputTriggerVariantMap);
|
|
46
|
+
|
|
47
|
+
export function attachmentInputTrigger(props) {
|
|
48
|
+
return Object.fromEntries(
|
|
49
|
+
attachmentInputTriggerSlotNames.map(([slot, className]) => {
|
|
50
|
+
return [
|
|
51
|
+
slot,
|
|
52
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
53
|
+
];
|
|
54
|
+
}),
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
Object.assign(attachmentInputTrigger, { splitVariantProps: (props) => splitVariantProps(props, attachmentInputTriggerVariantMap) });
|
|
59
|
+
|
|
60
|
+
// @recipe(seed): attachment-input-trigger
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
.seed-attachment-input__root {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: var(--seed-dimension-x2);
|
|
5
|
+
position: relative;
|
|
6
|
+
margin-left: calc(var(--seed-attachment-input-extend-x) * -1);
|
|
7
|
+
margin-right: calc(var(--seed-attachment-input-extend-x) * -1)
|
|
8
|
+
}
|
|
9
|
+
.seed-attachment-input__container {
|
|
10
|
+
padding-top: var(--seed-dimension-x1_5);
|
|
11
|
+
margin-top: calc(var(--seed-dimension-x1_5) * -1);
|
|
12
|
+
padding-left: var(--seed-attachment-input-extend-x);
|
|
13
|
+
padding-right: var(--seed-attachment-input-extend-x)
|
|
14
|
+
}
|
|
15
|
+
.seed-attachment-input__containerContent {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: row;
|
|
18
|
+
gap: var(--seed-dimension-x2);
|
|
19
|
+
width: max-content;
|
|
20
|
+
min-width: 100%;
|
|
21
|
+
flex-shrink: 0
|
|
22
|
+
}
|
|
23
|
+
.seed-attachment-input__itemGroup {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: row;
|
|
26
|
+
width: max-content;
|
|
27
|
+
gap: var(--seed-dimension-x2);
|
|
28
|
+
flex-shrink: 0;
|
|
29
|
+
padding: 0;
|
|
30
|
+
margin: 0
|
|
31
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare interface AttachmentInputVariant {
|
|
2
|
+
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
declare type AttachmentInputVariantMap = {
|
|
6
|
+
[key in keyof AttachmentInputVariant]: Array<AttachmentInputVariant[key]>;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export declare type AttachmentInputVariantProps = Partial<AttachmentInputVariant>;
|
|
10
|
+
|
|
11
|
+
export declare type AttachmentInputSlotName = "root" | "container" | "containerContent" | "itemGroup";
|
|
12
|
+
|
|
13
|
+
export declare const attachmentInputVariantMap: AttachmentInputVariantMap;
|
|
14
|
+
|
|
15
|
+
export declare const attachmentInput: ((
|
|
16
|
+
props?: AttachmentInputVariantProps,
|
|
17
|
+
) => Record<AttachmentInputSlotName, string>) & {
|
|
18
|
+
splitVariantProps: <T extends AttachmentInputVariantProps>(
|
|
19
|
+
props: T,
|
|
20
|
+
) => [AttachmentInputVariantProps, Omit<T, keyof AttachmentInputVariantProps>];
|
|
21
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import './attachment-input.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const attachmentInputSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-attachment-input__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"container",
|
|
11
|
+
"seed-attachment-input__container"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"containerContent",
|
|
15
|
+
"seed-attachment-input__containerContent"
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"itemGroup",
|
|
19
|
+
"seed-attachment-input__itemGroup"
|
|
20
|
+
]
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
const defaultVariant = {};
|
|
24
|
+
|
|
25
|
+
const compoundVariants = [];
|
|
26
|
+
|
|
27
|
+
export const attachmentInputVariantMap = {};
|
|
28
|
+
|
|
29
|
+
export const attachmentInputVariantKeys = Object.keys(attachmentInputVariantMap);
|
|
30
|
+
|
|
31
|
+
export function attachmentInput(props) {
|
|
32
|
+
return Object.fromEntries(
|
|
33
|
+
attachmentInputSlotNames.map(([slot, className]) => {
|
|
34
|
+
return [
|
|
35
|
+
slot,
|
|
36
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
37
|
+
];
|
|
38
|
+
}),
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
Object.assign(attachmentInput, { splitVariantProps: (props) => splitVariantProps(props, attachmentInputVariantMap) });
|
|
43
|
+
|
|
44
|
+
// @recipe(seed): attachment-input
|