@seed-design/css 1.2.3 → 1.2.4
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 +1012 -172
- package/all.layered.css +9070 -0
- package/all.layered.min.css +1 -0
- package/all.min.css +1 -1
- package/base.css +4 -0
- package/base.layered.css +858 -0
- package/base.layered.min.css +1 -0
- package/base.min.css +1 -1
- package/package.json +11 -2
- package/recipes/action-button.css +69 -17
- package/recipes/action-button.layered.css +421 -0
- package/recipes/action-button.layered.mjs +79 -0
- package/recipes/action-chip.layered.css +84 -0
- package/recipes/action-chip.layered.mjs +51 -0
- package/recipes/action-sheet-item.layered.css +38 -0
- package/recipes/action-sheet-item.layered.mjs +29 -0
- package/recipes/action-sheet.layered.css +134 -0
- package/recipes/action-sheet.layered.mjs +60 -0
- package/recipes/app-bar-main.layered.css +165 -0
- package/recipes/app-bar-main.layered.mjs +63 -0
- package/recipes/app-bar.css +8 -0
- package/recipes/app-bar.layered.css +302 -0
- package/recipes/app-bar.layered.mjs +70 -0
- package/recipes/app-screen.layered.css +332 -0
- package/recipes/app-screen.layered.mjs +98 -0
- package/recipes/article.layered.css +12 -0
- package/recipes/article.layered.mjs +22 -0
- package/recipes/aspect-ratio.layered.css +26 -0
- package/recipes/aspect-ratio.layered.mjs +22 -0
- package/recipes/avatar-stack.layered.css +94 -0
- package/recipes/avatar-stack.layered.mjs +50 -0
- package/recipes/avatar.layered.css +222 -0
- package/recipes/avatar.layered.mjs +65 -0
- package/recipes/badge.layered.css +140 -0
- package/recipes/badge.layered.mjs +131 -0
- package/recipes/bottom-sheet-handle.css +9 -2
- package/recipes/bottom-sheet-handle.layered.css +36 -0
- package/recipes/bottom-sheet-handle.layered.mjs +36 -0
- package/recipes/bottom-sheet.css +11 -0
- package/recipes/bottom-sheet.layered.css +224 -0
- package/recipes/bottom-sheet.layered.mjs +75 -0
- package/recipes/callout.css +77 -12
- package/recipes/callout.layered.css +242 -0
- package/recipes/callout.layered.mjs +63 -0
- package/recipes/checkbox-group.layered.css +7 -0
- package/recipes/checkbox-group.layered.mjs +22 -0
- package/recipes/checkbox.layered.css +54 -0
- package/recipes/checkbox.layered.mjs +48 -0
- package/recipes/checkmark.css +61 -13
- package/recipes/checkmark.layered.css +187 -0
- package/recipes/checkmark.layered.mjs +86 -0
- package/recipes/chip-tabs.css +62 -14
- package/recipes/chip-tabs.layered.css +254 -0
- package/recipes/chip-tabs.layered.mjs +75 -0
- package/recipes/chip.css +60 -15
- package/recipes/chip.layered.css +272 -0
- package/recipes/chip.layered.mjs +80 -0
- package/recipes/contextual-floating-button.css +24 -7
- package/recipes/contextual-floating-button.layered.css +130 -0
- package/recipes/contextual-floating-button.layered.mjs +34 -0
- package/recipes/control-chip.layered.css +99 -0
- package/recipes/control-chip.layered.mjs +51 -0
- package/recipes/dialog.layered.css +111 -0
- package/recipes/dialog.layered.mjs +66 -0
- package/recipes/extended-action-sheet-item.layered.css +38 -0
- package/recipes/extended-action-sheet-item.layered.mjs +29 -0
- package/recipes/extended-action-sheet.layered.css +132 -0
- package/recipes/extended-action-sheet.layered.mjs +64 -0
- package/recipes/extended-fab.layered.css +79 -0
- package/recipes/extended-fab.layered.mjs +34 -0
- package/recipes/fab.layered.css +37 -0
- package/recipes/fab.layered.mjs +22 -0
- package/recipes/field-label.layered.css +35 -0
- package/recipes/field-label.layered.mjs +47 -0
- package/recipes/field.layered.css +81 -0
- package/recipes/field.layered.mjs +60 -0
- package/recipes/floating-action-button.css +15 -5
- package/recipes/floating-action-button.layered.css +101 -0
- package/recipes/floating-action-button.layered.mjs +47 -0
- package/recipes/help-bubble.css +8 -0
- package/recipes/help-bubble.layered.css +104 -0
- package/recipes/help-bubble.layered.mjs +60 -0
- package/recipes/identity-placeholder.css +2 -2
- package/recipes/identity-placeholder.d.ts +1 -1
- package/recipes/identity-placeholder.layered.css +22 -0
- package/recipes/identity-placeholder.layered.mjs +43 -0
- package/recipes/identity-placeholder.mjs +2 -1
- package/recipes/image-frame-icon.layered.css +8 -0
- package/recipes/image-frame-icon.layered.mjs +22 -0
- package/recipes/image-frame-indicator.layered.css +18 -0
- package/recipes/image-frame-indicator.layered.mjs +22 -0
- package/recipes/image-frame-reaction-button.css +9 -1
- package/recipes/image-frame-reaction-button.layered.css +43 -0
- package/recipes/image-frame-reaction-button.layered.mjs +22 -0
- package/recipes/image-frame.layered.css +28 -0
- package/recipes/image-frame.layered.mjs +34 -0
- package/recipes/inline-banner.layered.css +161 -0
- package/recipes/inline-banner.layered.mjs +64 -0
- package/recipes/input-button.css +27 -5
- package/recipes/input-button.layered.css +167 -0
- package/recipes/input-button.layered.mjs +64 -0
- package/recipes/link-content.layered.css +48 -0
- package/recipes/link-content.layered.mjs +35 -0
- package/recipes/list-header.layered.css +26 -0
- package/recipes/list-header.layered.mjs +29 -0
- package/recipes/list-item.css +63 -17
- package/recipes/list-item.layered.css +187 -0
- package/recipes/list-item.layered.mjs +59 -0
- package/recipes/manner-temp-badge.layered.css +72 -0
- package/recipes/manner-temp-badge.layered.mjs +37 -0
- package/recipes/manner-temp.layered.css +57 -0
- package/recipes/manner-temp.layered.mjs +37 -0
- package/recipes/menu-sheet-item.css +24 -3
- package/recipes/menu-sheet-item.layered.css +102 -0
- package/recipes/menu-sheet-item.layered.mjs +56 -0
- package/recipes/menu-sheet.css +18 -3
- package/recipes/menu-sheet.layered.css +167 -0
- package/recipes/menu-sheet.layered.mjs +74 -0
- package/recipes/notification-badge-positioner.layered.css +35 -0
- package/recipes/notification-badge-positioner.layered.mjs +51 -0
- package/recipes/notification-badge.layered.css +33 -0
- package/recipes/notification-badge.layered.mjs +29 -0
- package/recipes/page-banner.css +122 -22
- package/recipes/page-banner.layered.css +361 -0
- package/recipes/page-banner.layered.mjs +117 -0
- package/recipes/progress-circle.layered.css +52 -0
- package/recipes/progress-circle.layered.mjs +55 -0
- package/recipes/pull-to-refresh.layered.css +19 -0
- package/recipes/pull-to-refresh.layered.mjs +36 -0
- package/recipes/radio-group.layered.css +7 -0
- package/recipes/radio-group.layered.mjs +22 -0
- package/recipes/radio.layered.css +54 -0
- package/recipes/radio.layered.mjs +48 -0
- package/recipes/radiomark.css +34 -7
- package/recipes/radiomark.layered.css +132 -0
- package/recipes/radiomark.layered.mjs +48 -0
- package/recipes/reaction-button.css +24 -7
- package/recipes/reaction-button.layered.css +124 -0
- package/recipes/reaction-button.layered.mjs +29 -0
- package/recipes/scroll-fog.layered.css +27 -0
- package/recipes/scroll-fog.layered.mjs +28 -0
- package/recipes/segmented-control.css +31 -7
- package/recipes/segmented-control.layered.css +108 -0
- package/recipes/segmented-control.layered.mjs +40 -0
- package/recipes/select-box-group.layered.css +13 -0
- package/recipes/select-box-group.layered.mjs +22 -0
- package/recipes/select-box.css +19 -3
- package/recipes/select-box.layered.css +148 -0
- package/recipes/select-box.layered.mjs +63 -0
- package/recipes/selectBoxCheckmark.css +9 -2
- package/recipes/selectBoxCheckmark.layered.css +42 -0
- package/recipes/selectBoxCheckmark.layered.mjs +36 -0
- package/recipes/skeleton.layered.css +56 -0
- package/recipes/skeleton.layered.mjs +36 -0
- package/recipes/slider-marker.layered.css +54 -0
- package/recipes/slider-marker.layered.mjs +30 -0
- package/recipes/slider-tick.layered.css +25 -0
- package/recipes/slider-tick.layered.mjs +29 -0
- package/recipes/slider.css +25 -1
- package/recipes/slider.layered.css +238 -0
- package/recipes/slider.layered.mjs +68 -0
- package/recipes/snackbar-region.layered.css +18 -0
- package/recipes/snackbar-region.layered.mjs +22 -0
- package/recipes/snackbar.css +20 -1
- package/recipes/snackbar.layered.css +126 -0
- package/recipes/snackbar.layered.mjs +56 -0
- package/recipes/switch.layered.css +62 -0
- package/recipes/switch.layered.mjs +44 -0
- package/recipes/switchmark.css +9 -1
- package/recipes/switchmark.layered.css +100 -0
- package/recipes/switchmark.layered.mjs +49 -0
- package/recipes/tabs.css +9 -0
- package/recipes/tabs.layered.css +211 -0
- package/recipes/tabs.layered.mjs +78 -0
- package/recipes/tag-group-item.layered.css +98 -0
- package/recipes/tag-group-item.layered.mjs +55 -0
- package/recipes/tag-group.layered.css +58 -0
- package/recipes/tag-group.layered.mjs +62 -0
- package/recipes/text-input.css +1 -0
- package/recipes/text-input.layered.css +236 -0
- package/recipes/text-input.layered.mjs +73 -0
- package/recipes/text.layered.css +364 -0
- package/recipes/text.layered.mjs +90 -0
- package/recipes/toggle-button.css +42 -11
- package/recipes/toggle-button.layered.css +183 -0
- package/recipes/toggle-button.layered.mjs +34 -0
- package/vars/color/stroke.d.ts +2 -1
- package/vars/color/stroke.mjs +2 -1
- package/vars/component/identity-placeholder.d.ts +2 -2
- package/vars/component/identity-placeholder.mjs +2 -2
- package/vars/component/image-frame-floater.d.ts +1 -1
- package/vars/component/image-frame.d.ts +11 -17
- package/vars/component/image-frame.mjs +7 -12
- package/vars/component/index.d.ts +1 -0
- package/vars/component/index.mjs +1 -0
- package/vars/component/list-item.d.ts +1 -1
- package/vars/component/list-item.mjs +1 -1
- package/vars/component/segmented-control-indicator.d.ts +24 -0
- package/vars/component/segmented-control-indicator.mjs +24 -0
- package/vars/component/segmented-control-item.d.ts +3 -11
- package/vars/component/segmented-control-item.mjs +3 -11
- package/vars/component/segmented-control.d.ts +0 -8
- package/vars/component/segmented-control.mjs +0 -8
- package/vars/component/slider.d.ts +3 -1
- package/vars/component/slider.mjs +3 -1
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
@layer seed-components {
|
|
2
|
+
.seed-badge__root {
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
text-transform: none;
|
|
5
|
+
text-align: start;
|
|
6
|
+
-webkit-font-smoothing: antialiased;
|
|
7
|
+
-moz-osx-font-smoothing: grayscale;
|
|
8
|
+
align-items: center;
|
|
9
|
+
text-decoration: none;
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.seed-badge__label {
|
|
14
|
+
text-overflow: ellipsis;
|
|
15
|
+
white-space: nowrap;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.seed-badge__root--size_medium {
|
|
20
|
+
max-width: clamp(calc(108px * var(--seed-font-size-limit-min)), 7.5rem, calc(108px * var(--seed-font-size-limit-max)));
|
|
21
|
+
min-height: var(--seed-dimension-x5);
|
|
22
|
+
padding-left: var(--seed-dimension-x1_5);
|
|
23
|
+
padding-right: var(--seed-dimension-x1_5);
|
|
24
|
+
padding-top: var(--seed-dimension-x0_5);
|
|
25
|
+
padding-bottom: var(--seed-dimension-x0_5);
|
|
26
|
+
border-radius: var(--seed-radius-r1);
|
|
27
|
+
font-size: var(--seed-font-size-t1);
|
|
28
|
+
line-height: var(--seed-line-height-t1);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.seed-badge__root--size_large {
|
|
32
|
+
max-width: clamp(calc(120px * var(--seed-font-size-limit-min)), 6.75rem, calc(120px * var(--seed-font-size-limit-max)));
|
|
33
|
+
min-height: var(--seed-dimension-x6);
|
|
34
|
+
padding-left: var(--seed-dimension-x2);
|
|
35
|
+
padding-right: var(--seed-dimension-x2);
|
|
36
|
+
padding-top: var(--seed-dimension-x1);
|
|
37
|
+
padding-bottom: var(--seed-dimension-x1);
|
|
38
|
+
border-radius: var(--seed-radius-r1_5);
|
|
39
|
+
font-size: var(--seed-font-size-t2);
|
|
40
|
+
line-height: var(--seed-line-height-t2);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.seed-badge__root--variant_weak {
|
|
44
|
+
font-weight: var(--seed-font-weight-medium);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.seed-badge__root--variant_solid, .seed-badge__root--variant_outline {
|
|
48
|
+
font-weight: var(--seed-font-weight-bold);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.seed-badge__root--tone_neutral-variant_weak {
|
|
52
|
+
background-color: var(--seed-color-bg-neutral-weak);
|
|
53
|
+
color: var(--seed-color-fg-neutral-muted);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.seed-badge__root--tone_neutral-variant_solid {
|
|
57
|
+
background-color: var(--seed-color-palette-gray-800);
|
|
58
|
+
color: var(--seed-color-fg-neutral-inverted);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.seed-badge__root--tone_neutral-variant_outline {
|
|
62
|
+
box-shadow: inset 0 0 0 1px var(--seed-color-stroke-neutral-muted);
|
|
63
|
+
color: var(--seed-color-fg-neutral-muted);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.seed-badge__root--tone_brand-variant_weak {
|
|
67
|
+
background-color: var(--seed-color-bg-brand-weak);
|
|
68
|
+
color: var(--seed-color-fg-brand-contrast);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.seed-badge__root--tone_brand-variant_solid {
|
|
72
|
+
background-color: var(--seed-color-bg-brand-solid);
|
|
73
|
+
color: var(--seed-color-palette-static-white);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.seed-badge__root--tone_brand-variant_outline {
|
|
77
|
+
box-shadow: inset 0 0 0 1px var(--seed-color-stroke-brand-weak);
|
|
78
|
+
color: var(--seed-color-fg-brand);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.seed-badge__root--tone_informative-variant_weak {
|
|
82
|
+
background-color: var(--seed-color-bg-informative-weak);
|
|
83
|
+
color: var(--seed-color-fg-informative-contrast);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.seed-badge__root--tone_informative-variant_solid {
|
|
87
|
+
background-color: var(--seed-color-bg-informative-solid);
|
|
88
|
+
color: var(--seed-color-palette-static-white);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.seed-badge__root--tone_informative-variant_outline {
|
|
92
|
+
box-shadow: inset 0 0 0 1px var(--seed-color-stroke-informative-weak);
|
|
93
|
+
color: var(--seed-color-fg-informative);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.seed-badge__root--tone_positive-variant_weak {
|
|
97
|
+
background-color: var(--seed-color-bg-positive-weak);
|
|
98
|
+
color: var(--seed-color-fg-positive-contrast);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.seed-badge__root--tone_positive-variant_solid {
|
|
102
|
+
background-color: var(--seed-color-bg-positive-solid);
|
|
103
|
+
color: var(--seed-color-palette-static-white);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.seed-badge__root--tone_positive-variant_outline {
|
|
107
|
+
box-shadow: inset 0 0 0 1px var(--seed-color-stroke-positive-weak);
|
|
108
|
+
color: var(--seed-color-fg-positive);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.seed-badge__root--tone_warning-variant_weak {
|
|
112
|
+
background-color: var(--seed-color-bg-warning-weak);
|
|
113
|
+
color: var(--seed-color-fg-warning-contrast);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.seed-badge__root--tone_warning-variant_solid {
|
|
117
|
+
background-color: var(--seed-color-bg-warning-solid);
|
|
118
|
+
color: var(--seed-color-palette-static-black-alpha-900);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.seed-badge__root--tone_warning-variant_outline {
|
|
122
|
+
box-shadow: inset 0 0 0 1px var(--seed-color-stroke-warning-weak);
|
|
123
|
+
color: var(--seed-color-fg-warning);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.seed-badge__root--tone_critical-variant_weak {
|
|
127
|
+
background-color: var(--seed-color-bg-critical-weak);
|
|
128
|
+
color: var(--seed-color-fg-critical-contrast);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.seed-badge__root--tone_critical-variant_solid {
|
|
132
|
+
background-color: var(--seed-color-bg-critical-solid);
|
|
133
|
+
color: var(--seed-color-palette-static-white);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.seed-badge__root--tone_critical-variant_outline {
|
|
137
|
+
box-shadow: inset 0 0 0 1px var(--seed-color-stroke-critical-weak);
|
|
138
|
+
color: var(--seed-color-fg-critical);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import './badge.layered.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const badgeSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-badge__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"label",
|
|
11
|
+
"seed-badge__label"
|
|
12
|
+
]
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
const defaultVariant = {
|
|
16
|
+
"size": "medium",
|
|
17
|
+
"variant": "solid",
|
|
18
|
+
"tone": "neutral"
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const compoundVariants = [
|
|
22
|
+
{
|
|
23
|
+
"tone": "neutral",
|
|
24
|
+
"variant": "weak"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"tone": "neutral",
|
|
28
|
+
"variant": "solid"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"tone": "neutral",
|
|
32
|
+
"variant": "outline"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"tone": "brand",
|
|
36
|
+
"variant": "weak"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"tone": "brand",
|
|
40
|
+
"variant": "solid"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"tone": "brand",
|
|
44
|
+
"variant": "outline"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"tone": "informative",
|
|
48
|
+
"variant": "weak"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"tone": "informative",
|
|
52
|
+
"variant": "solid"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"tone": "informative",
|
|
56
|
+
"variant": "outline"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"tone": "positive",
|
|
60
|
+
"variant": "weak"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"tone": "positive",
|
|
64
|
+
"variant": "solid"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"tone": "positive",
|
|
68
|
+
"variant": "outline"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"tone": "warning",
|
|
72
|
+
"variant": "weak"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"tone": "warning",
|
|
76
|
+
"variant": "solid"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"tone": "warning",
|
|
80
|
+
"variant": "outline"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"tone": "critical",
|
|
84
|
+
"variant": "weak"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"tone": "critical",
|
|
88
|
+
"variant": "solid"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"tone": "critical",
|
|
92
|
+
"variant": "outline"
|
|
93
|
+
}
|
|
94
|
+
];
|
|
95
|
+
|
|
96
|
+
export const badgeVariantMap = {
|
|
97
|
+
"size": [
|
|
98
|
+
"medium",
|
|
99
|
+
"large"
|
|
100
|
+
],
|
|
101
|
+
"variant": [
|
|
102
|
+
"weak",
|
|
103
|
+
"solid",
|
|
104
|
+
"outline"
|
|
105
|
+
],
|
|
106
|
+
"tone": [
|
|
107
|
+
"neutral",
|
|
108
|
+
"brand",
|
|
109
|
+
"informative",
|
|
110
|
+
"positive",
|
|
111
|
+
"warning",
|
|
112
|
+
"critical"
|
|
113
|
+
]
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export const badgeVariantKeys = Object.keys(badgeVariantMap);
|
|
117
|
+
|
|
118
|
+
export function badge(props) {
|
|
119
|
+
return Object.fromEntries(
|
|
120
|
+
badgeSlotNames.map(([slot, className]) => {
|
|
121
|
+
return [
|
|
122
|
+
slot,
|
|
123
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
124
|
+
];
|
|
125
|
+
}),
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
Object.assign(badge, { splitVariantProps: (props) => splitVariantProps(props, badgeVariantMap) });
|
|
130
|
+
|
|
131
|
+
// @recipe(seed): badge
|
|
@@ -10,8 +10,15 @@
|
|
|
10
10
|
transition: background-color var(--seed-duration-color-transition) var(--seed-timing-function-easing);
|
|
11
11
|
touch-action: pan-y;
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
@media (hover: hover) {
|
|
14
|
+
.seed-bottom-sheet-handle__root:is(:hover, [data-hover]) {
|
|
15
|
+
background-color: var(--seed-color-palette-gray-500);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
@media (hover: none) {
|
|
19
|
+
.seed-bottom-sheet-handle__root:is(:active, [data-active]) {
|
|
20
|
+
background-color: var(--seed-color-palette-gray-500);
|
|
21
|
+
}
|
|
15
22
|
}
|
|
16
23
|
.seed-bottom-sheet-handle__touchArea {
|
|
17
24
|
position: absolute;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@layer seed-components {
|
|
2
|
+
.seed-bottom-sheet-handle__root {
|
|
3
|
+
background-color: var(--seed-color-palette-gray-400);
|
|
4
|
+
width: 36px;
|
|
5
|
+
height: 4px;
|
|
6
|
+
transition: background-color var(--seed-duration-color-transition) var(--seed-timing-function-easing);
|
|
7
|
+
touch-action: pan-y;
|
|
8
|
+
border-radius: 9999px;
|
|
9
|
+
position: absolute;
|
|
10
|
+
top: 6px;
|
|
11
|
+
left: 50%;
|
|
12
|
+
transform: translateX(-50%);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@media (hover: hover) {
|
|
16
|
+
.seed-bottom-sheet-handle__root:is(:hover, [data-hover]) {
|
|
17
|
+
background-color: var(--seed-color-palette-gray-500);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@media (hover: none) {
|
|
22
|
+
.seed-bottom-sheet-handle__root:is(:active, [data-active]) {
|
|
23
|
+
background-color: var(--seed-color-palette-gray-500);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.seed-bottom-sheet-handle__touchArea {
|
|
28
|
+
touch-action: inherit;
|
|
29
|
+
width: 44px;
|
|
30
|
+
height: 44px;
|
|
31
|
+
position: absolute;
|
|
32
|
+
top: 50%;
|
|
33
|
+
left: 50%;
|
|
34
|
+
transform: translate(-50%, -50%);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import './bottom-sheet-handle.layered.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const bottomSheetHandleSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-bottom-sheet-handle__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"touchArea",
|
|
11
|
+
"seed-bottom-sheet-handle__touchArea"
|
|
12
|
+
]
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
const defaultVariant = {};
|
|
16
|
+
|
|
17
|
+
const compoundVariants = [];
|
|
18
|
+
|
|
19
|
+
export const bottomSheetHandleVariantMap = {};
|
|
20
|
+
|
|
21
|
+
export const bottomSheetHandleVariantKeys = Object.keys(bottomSheetHandleVariantMap);
|
|
22
|
+
|
|
23
|
+
export function bottomSheetHandle(props) {
|
|
24
|
+
return Object.fromEntries(
|
|
25
|
+
bottomSheetHandleSlotNames.map(([slot, className]) => {
|
|
26
|
+
return [
|
|
27
|
+
slot,
|
|
28
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
29
|
+
];
|
|
30
|
+
}),
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
Object.assign(bottomSheetHandle, { splitVariantProps: (props) => splitVariantProps(props, bottomSheetHandleVariantMap) });
|
|
35
|
+
|
|
36
|
+
// @recipe(seed): bottom-sheet-handle
|
package/recipes/bottom-sheet.css
CHANGED
|
@@ -134,6 +134,17 @@
|
|
|
134
134
|
right: calc((28px - 44px) / 2);
|
|
135
135
|
bottom: calc((28px - 44px) / 2);
|
|
136
136
|
left: calc((28px - 44px) / 2);
|
|
137
|
+
outline: var(--seed-dimension-x0_5) solid transparent;
|
|
138
|
+
outline-offset: calc(var(--seed-dimension-x0_5) * -1);
|
|
139
|
+
transition: outline-color var(--seed-duration-d3) var(--seed-timing-function-easing);
|
|
140
|
+
}
|
|
141
|
+
.seed-bottom-sheet__closeButton:is(:focus, [data-focus]) {
|
|
142
|
+
outline: none;
|
|
143
|
+
}
|
|
144
|
+
.seed-bottom-sheet__closeButton:is(:focus-visible, [data-focus-visible]):after {
|
|
145
|
+
border-radius: var(--seed-radius-r1);
|
|
146
|
+
outline: var(--seed-dimension-x0_5) solid var(--seed-color-stroke-focus-ring);
|
|
147
|
+
outline-offset: calc(var(--seed-dimension-x0_5) * -1);
|
|
137
148
|
}
|
|
138
149
|
.seed-bottom-sheet__header--headerAlign_left {
|
|
139
150
|
justify-content: flex-start;
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
@layer seed-components {
|
|
2
|
+
.seed-bottom-sheet__positioner {
|
|
3
|
+
overscroll-behavior-y: none;
|
|
4
|
+
--sheet-z-index: 2;
|
|
5
|
+
z-index: calc(var(--sheet-z-index) + var(--layer-index, 0));
|
|
6
|
+
justify-content: center;
|
|
7
|
+
align-items: flex-end;
|
|
8
|
+
display: flex;
|
|
9
|
+
position: fixed;
|
|
10
|
+
inset: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.seed-bottom-sheet__backdrop {
|
|
14
|
+
background: var(--seed-color-bg-overlay);
|
|
15
|
+
z-index: calc(var(--sheet-z-index) + var(--layer-index, 0));
|
|
16
|
+
position: fixed;
|
|
17
|
+
inset: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.seed-bottom-sheet__backdrop[data-snap-points="true"], .seed-bottom-sheet__backdrop:not(:is([data-state="open"], [data-open]))[data-snap-points="true"]:not([data-snap-points-overlay="true"]) {
|
|
21
|
+
opacity: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.seed-bottom-sheet__backdrop:is([data-state="open"], [data-open])[data-snap-points-overlay="true"] {
|
|
25
|
+
opacity: 1;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.seed-bottom-sheet__content {
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
word-break: break-all;
|
|
31
|
+
z-index: calc(var(--sheet-z-index) + var(--layer-index, 0));
|
|
32
|
+
background: var(--seed-color-bg-layer-floating);
|
|
33
|
+
border-top-left-radius: var(--seed-radius-r6);
|
|
34
|
+
border-top-right-radius: var(--seed-radius-r6);
|
|
35
|
+
padding-bottom: var(--seed-safe-area-bottom);
|
|
36
|
+
touch-action: none;
|
|
37
|
+
will-change: transform;
|
|
38
|
+
transition: transform var(--seed-duration-d6) var(--seed-timing-function-enter-expressive);
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
flex: 1;
|
|
41
|
+
display: flex;
|
|
42
|
+
position: relative;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.seed-bottom-sheet__content[data-snap-points="true"] {
|
|
46
|
+
transform: translate3d(0, var(--initial-transform, 100%), 0);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.seed-bottom-sheet__content[data-delayed-snap-points="true"] {
|
|
50
|
+
transform: translate3d(0, var(--snap-point-height, 0), 0);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.seed-bottom-sheet__content:after {
|
|
54
|
+
content: "";
|
|
55
|
+
background: inherit;
|
|
56
|
+
z-index: -1;
|
|
57
|
+
height: 200vh;
|
|
58
|
+
position: absolute;
|
|
59
|
+
top: 100%;
|
|
60
|
+
left: 0;
|
|
61
|
+
right: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.seed-bottom-sheet__header {
|
|
65
|
+
gap: var(--seed-dimension-x2);
|
|
66
|
+
padding-top: var(--seed-dimension-x6);
|
|
67
|
+
padding-bottom: var(--seed-dimension-x4);
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
display: flex;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.seed-bottom-sheet__title {
|
|
73
|
+
color: var(--seed-color-fg-neutral);
|
|
74
|
+
font-size: var(--seed-font-size-t8);
|
|
75
|
+
line-height: var(--seed-line-height-t8);
|
|
76
|
+
font-weight: var(--seed-font-weight-bold);
|
|
77
|
+
word-break: keep-all;
|
|
78
|
+
margin: 0;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.seed-bottom-sheet__description {
|
|
82
|
+
color: var(--seed-color-fg-neutral-muted);
|
|
83
|
+
font-size: var(--seed-font-size-t5);
|
|
84
|
+
line-height: var(--seed-line-height-t5);
|
|
85
|
+
font-weight: var(--seed-font-weight-regular);
|
|
86
|
+
padding-left: var(--seed-dimension-spacing-x-global-gutter);
|
|
87
|
+
padding-right: var(--seed-dimension-spacing-x-global-gutter);
|
|
88
|
+
white-space: pre-wrap;
|
|
89
|
+
margin: 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.seed-bottom-sheet__body {
|
|
93
|
+
--seed-box-padding-x: var(--seed-dimension-spacing-x-global-gutter);
|
|
94
|
+
--seed-box-height: initial;
|
|
95
|
+
--seed-box-min-height: initial;
|
|
96
|
+
--seed-box-max-height: initial;
|
|
97
|
+
--seed-box-justify-content: initial;
|
|
98
|
+
--seed-box-align-items: initial;
|
|
99
|
+
padding-left: var(--seed-box-padding-x);
|
|
100
|
+
padding-right: var(--seed-box-padding-x);
|
|
101
|
+
height: var(--seed-box-height);
|
|
102
|
+
min-height: var(--seed-box-min-height);
|
|
103
|
+
max-height: var(--seed-box-max-height);
|
|
104
|
+
justify-content: var(--seed-box-justify-content);
|
|
105
|
+
align-items: var(--seed-box-align-items);
|
|
106
|
+
flex-direction: column;
|
|
107
|
+
display: flex;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.seed-bottom-sheet__footer {
|
|
111
|
+
padding-left: var(--seed-dimension-spacing-x-global-gutter);
|
|
112
|
+
padding-right: var(--seed-dimension-spacing-x-global-gutter);
|
|
113
|
+
padding-top: var(--seed-dimension-x3);
|
|
114
|
+
padding-bottom: var(--seed-dimension-x4);
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
display: flex;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.seed-bottom-sheet__closeButton {
|
|
120
|
+
top: var(--seed-dimension-x6);
|
|
121
|
+
right: var(--seed-dimension-x4);
|
|
122
|
+
border-radius: var(--seed-radius-full);
|
|
123
|
+
background: var(--seed-color-bg-neutral-weak);
|
|
124
|
+
cursor: pointer;
|
|
125
|
+
--seed-icon-size: 14px;
|
|
126
|
+
--seed-icon-color: var(--seed-color-fg-neutral);
|
|
127
|
+
border: none;
|
|
128
|
+
justify-content: center;
|
|
129
|
+
align-items: center;
|
|
130
|
+
width: 28px;
|
|
131
|
+
height: 28px;
|
|
132
|
+
display: flex;
|
|
133
|
+
position: absolute;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.seed-bottom-sheet__closeButton:after {
|
|
137
|
+
content: "";
|
|
138
|
+
outline: var(--seed-dimension-x0_5) solid transparent;
|
|
139
|
+
outline-offset: calc(var(--seed-dimension-x0_5) * -1);
|
|
140
|
+
transition: outline-color var(--seed-duration-d3) var(--seed-timing-function-easing);
|
|
141
|
+
position: absolute;
|
|
142
|
+
inset: -8px;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.seed-bottom-sheet__closeButton:is(:focus, [data-focus]) {
|
|
146
|
+
outline: none;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.seed-bottom-sheet__closeButton:is(:focus-visible, [data-focus-visible]):after {
|
|
150
|
+
border-radius: var(--seed-radius-r1);
|
|
151
|
+
outline: var(--seed-dimension-x0_5) solid var(--seed-color-stroke-focus-ring);
|
|
152
|
+
outline-offset: calc(var(--seed-dimension-x0_5) * -1);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.seed-bottom-sheet__header--headerAlign_left {
|
|
156
|
+
justify-content: flex-start;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.seed-bottom-sheet__title--headerAlign_left {
|
|
160
|
+
padding-left: var(--seed-dimension-spacing-x-global-gutter);
|
|
161
|
+
padding-right: var(--seed-dimension-spacing-x-global-gutter);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.seed-bottom-sheet__title--headerAlign_left[data-show-close-button] {
|
|
165
|
+
padding-left: var(--seed-dimension-spacing-x-global-gutter);
|
|
166
|
+
padding-right: 56px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.seed-bottom-sheet__header--headerAlign_center {
|
|
170
|
+
text-align: center;
|
|
171
|
+
justify-content: center;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.seed-bottom-sheet__title--headerAlign_center {
|
|
175
|
+
padding-left: var(--seed-dimension-spacing-x-global-gutter);
|
|
176
|
+
padding-right: var(--seed-dimension-spacing-x-global-gutter);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.seed-bottom-sheet__title--headerAlign_center[data-show-close-button] {
|
|
180
|
+
padding-left: 56px;
|
|
181
|
+
padding-right: 56px;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.seed-bottom-sheet__backdrop--skipAnimation_false:is([data-state="open"], [data-open])[data-snap-points="false"]:not([data-animation-done="true"]) {
|
|
185
|
+
animation-name: fade-in;
|
|
186
|
+
animation-duration: var(--seed-duration-d6);
|
|
187
|
+
animation-timing-function: var(--seed-timing-function-enter);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.seed-bottom-sheet__backdrop--skipAnimation_false:not(:is([data-state="open"], [data-open]))[data-snap-points="false"] {
|
|
191
|
+
animation-name: fade-out;
|
|
192
|
+
animation-duration: var(--seed-duration-d4);
|
|
193
|
+
animation-timing-function: var(--seed-timing-function-exit);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.seed-bottom-sheet__backdrop--skipAnimation_false:is([data-state="open"], [data-open])[data-snap-points="true"][data-should-overlay-animate="true"]:not([data-animation-done="true"]) {
|
|
197
|
+
animation-name: fade-in;
|
|
198
|
+
animation-duration: var(--seed-duration-d6);
|
|
199
|
+
animation-timing-function: var(--seed-timing-function-enter);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.seed-bottom-sheet__content--skipAnimation_false {
|
|
203
|
+
animation-duration: var(--seed-duration-d6);
|
|
204
|
+
animation-timing-function: var(--seed-timing-function-enter-expressive);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.seed-bottom-sheet__content--skipAnimation_false:is([data-state="open"], [data-open])[data-snap-points="false"]:not([data-animation-done="true"]) {
|
|
208
|
+
animation-name: drawer-slide-from-bottom;
|
|
209
|
+
animation-duration: var(--seed-duration-d6);
|
|
210
|
+
animation-timing-function: var(--seed-timing-function-enter-expressive);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.seed-bottom-sheet__content--skipAnimation_false:not(:is([data-state="open"], [data-open]))[data-snap-points="false"] {
|
|
214
|
+
animation-name: drawer-slide-to-bottom;
|
|
215
|
+
animation-duration: var(--seed-duration-d4);
|
|
216
|
+
animation-timing-function: var(--seed-timing-function-exit);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.seed-bottom-sheet__content--skipAnimation_false:is([data-state="open"], [data-open])[data-delayed-snap-points="true"]:not([data-animation-done="true"]) {
|
|
220
|
+
animation-name: drawer-slide-from-bottom;
|
|
221
|
+
animation-duration: var(--seed-duration-d6);
|
|
222
|
+
animation-timing-function: var(--seed-timing-function-enter-expressive);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import './bottom-sheet.layered.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const bottomSheetSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"positioner",
|
|
7
|
+
"seed-bottom-sheet__positioner"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"backdrop",
|
|
11
|
+
"seed-bottom-sheet__backdrop"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"content",
|
|
15
|
+
"seed-bottom-sheet__content"
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"header",
|
|
19
|
+
"seed-bottom-sheet__header"
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
"body",
|
|
23
|
+
"seed-bottom-sheet__body"
|
|
24
|
+
],
|
|
25
|
+
[
|
|
26
|
+
"footer",
|
|
27
|
+
"seed-bottom-sheet__footer"
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
"title",
|
|
31
|
+
"seed-bottom-sheet__title"
|
|
32
|
+
],
|
|
33
|
+
[
|
|
34
|
+
"description",
|
|
35
|
+
"seed-bottom-sheet__description"
|
|
36
|
+
],
|
|
37
|
+
[
|
|
38
|
+
"closeButton",
|
|
39
|
+
"seed-bottom-sheet__closeButton"
|
|
40
|
+
]
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
const defaultVariant = {
|
|
44
|
+
"headerAlign": "left",
|
|
45
|
+
"skipAnimation": false
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const compoundVariants = [];
|
|
49
|
+
|
|
50
|
+
export const bottomSheetVariantMap = {
|
|
51
|
+
"headerAlign": [
|
|
52
|
+
"left",
|
|
53
|
+
"center"
|
|
54
|
+
],
|
|
55
|
+
"skipAnimation": [
|
|
56
|
+
false
|
|
57
|
+
]
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const bottomSheetVariantKeys = Object.keys(bottomSheetVariantMap);
|
|
61
|
+
|
|
62
|
+
export function bottomSheet(props) {
|
|
63
|
+
return Object.fromEntries(
|
|
64
|
+
bottomSheetSlotNames.map(([slot, className]) => {
|
|
65
|
+
return [
|
|
66
|
+
slot,
|
|
67
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
68
|
+
];
|
|
69
|
+
}),
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
Object.assign(bottomSheet, { splitVariantProps: (props) => splitVariantProps(props, bottomSheetVariantMap) });
|
|
74
|
+
|
|
75
|
+
// @recipe(seed): bottom-sheet
|