@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,117 @@
|
|
|
1
|
+
import './page-banner.layered.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const pageBannerSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-page-banner__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"content",
|
|
11
|
+
"seed-page-banner__content"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"body",
|
|
15
|
+
"seed-page-banner__body"
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"title",
|
|
19
|
+
"seed-page-banner__title"
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
"description",
|
|
23
|
+
"seed-page-banner__description"
|
|
24
|
+
],
|
|
25
|
+
[
|
|
26
|
+
"button",
|
|
27
|
+
"seed-page-banner__button"
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
"closeButton",
|
|
31
|
+
"seed-page-banner__closeButton"
|
|
32
|
+
]
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
const defaultVariant = {
|
|
36
|
+
"tone": "neutral",
|
|
37
|
+
"variant": "weak"
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const compoundVariants = [
|
|
41
|
+
{
|
|
42
|
+
"tone": "neutral",
|
|
43
|
+
"variant": "weak"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"tone": "neutral",
|
|
47
|
+
"variant": "solid"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"tone": "informative",
|
|
51
|
+
"variant": "weak"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"tone": "informative",
|
|
55
|
+
"variant": "solid"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"tone": "positive",
|
|
59
|
+
"variant": "weak"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"tone": "positive",
|
|
63
|
+
"variant": "solid"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"tone": "warning",
|
|
67
|
+
"variant": "weak"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"tone": "warning",
|
|
71
|
+
"variant": "solid"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"tone": "critical",
|
|
75
|
+
"variant": "weak"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"tone": "critical",
|
|
79
|
+
"variant": "solid"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"tone": "magic",
|
|
83
|
+
"variant": "weak"
|
|
84
|
+
}
|
|
85
|
+
];
|
|
86
|
+
|
|
87
|
+
export const pageBannerVariantMap = {
|
|
88
|
+
"variant": [
|
|
89
|
+
"weak",
|
|
90
|
+
"solid"
|
|
91
|
+
],
|
|
92
|
+
"tone": [
|
|
93
|
+
"neutral",
|
|
94
|
+
"informative",
|
|
95
|
+
"positive",
|
|
96
|
+
"warning",
|
|
97
|
+
"critical",
|
|
98
|
+
"magic"
|
|
99
|
+
]
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export const pageBannerVariantKeys = Object.keys(pageBannerVariantMap);
|
|
103
|
+
|
|
104
|
+
export function pageBanner(props) {
|
|
105
|
+
return Object.fromEntries(
|
|
106
|
+
pageBannerSlotNames.map(([slot, className]) => {
|
|
107
|
+
return [
|
|
108
|
+
slot,
|
|
109
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
110
|
+
];
|
|
111
|
+
}),
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
Object.assign(pageBanner, { splitVariantProps: (props) => splitVariantProps(props, pageBannerVariantMap) });
|
|
116
|
+
|
|
117
|
+
// @recipe(seed): page-banner
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
@layer seed-components {
|
|
2
|
+
.seed-progress-circle__root {
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
position: relative;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.seed-progress-circle__root[data-progress-state="indeterminate"] {
|
|
9
|
+
animation: 1.2s cubic-bezier(.35, .25, .65, .75) infinite rotate;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.seed-progress-circle__track {
|
|
13
|
+
stroke: var(--track-color);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.seed-progress-circle__range {
|
|
17
|
+
stroke: var(--range-color);
|
|
18
|
+
stroke-linecap: round;
|
|
19
|
+
transition-property: stroke-dasharray;
|
|
20
|
+
transition-duration: .3s;
|
|
21
|
+
transition-timing-function: cubic-bezier(0, 0, .15, 1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.seed-progress-circle__range[data-progress-state="indeterminate"] {
|
|
25
|
+
animation: 1.2s cubic-bezier(.35, 0, .65, 1) infinite progress-circle-head, 1.2s cubic-bezier(.35, 0, .65, .6) infinite progress-circle-tail;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.seed-progress-circle__root--tone_neutral {
|
|
29
|
+
--track-color: var(--seed-color-palette-gray-200);
|
|
30
|
+
--range-color: var(--seed-color-palette-gray-500);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.seed-progress-circle__root--tone_brand {
|
|
34
|
+
--track-color: var(--seed-color-palette-carrot-200);
|
|
35
|
+
--range-color: var(--seed-color-bg-brand-solid);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.seed-progress-circle__root--tone_staticWhite {
|
|
39
|
+
--track-color: var(--seed-color-palette-static-white-alpha-300);
|
|
40
|
+
--range-color: var(--seed-color-palette-static-white);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.seed-progress-circle__root--size_24 {
|
|
44
|
+
--size: var(--seed-dimension-x6);
|
|
45
|
+
--thickness: 3px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.seed-progress-circle__root--size_40 {
|
|
49
|
+
--size: var(--seed-dimension-x10);
|
|
50
|
+
--thickness: 5px;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import './progress-circle.layered.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const progressCircleSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-progress-circle__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"track",
|
|
11
|
+
"seed-progress-circle__track"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"range",
|
|
15
|
+
"seed-progress-circle__range"
|
|
16
|
+
]
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
const defaultVariant = {
|
|
20
|
+
"tone": "neutral",
|
|
21
|
+
"size": 40
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const compoundVariants = [];
|
|
25
|
+
|
|
26
|
+
export const progressCircleVariantMap = {
|
|
27
|
+
"tone": [
|
|
28
|
+
"neutral",
|
|
29
|
+
"brand",
|
|
30
|
+
"staticWhite",
|
|
31
|
+
"inherit"
|
|
32
|
+
],
|
|
33
|
+
"size": [
|
|
34
|
+
"24",
|
|
35
|
+
"40",
|
|
36
|
+
"inherit"
|
|
37
|
+
]
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export const progressCircleVariantKeys = Object.keys(progressCircleVariantMap);
|
|
41
|
+
|
|
42
|
+
export function progressCircle(props) {
|
|
43
|
+
return Object.fromEntries(
|
|
44
|
+
progressCircleSlotNames.map(([slot, className]) => {
|
|
45
|
+
return [
|
|
46
|
+
slot,
|
|
47
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
48
|
+
];
|
|
49
|
+
}),
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
Object.assign(progressCircle, { splitVariantProps: (props) => splitVariantProps(props, progressCircleVariantMap) });
|
|
54
|
+
|
|
55
|
+
// @recipe(seed): progress-circle
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@layer seed-components {
|
|
2
|
+
.seed-pull-to-refresh__root {
|
|
3
|
+
--ptr-size: 44px;
|
|
4
|
+
--ptr-transition-duration: var(--seed-duration-d6);
|
|
5
|
+
height: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.seed-pull-to-refresh__indicator {
|
|
9
|
+
transform: translateY(min(calc(var(--ptr-displacement, 0) - var(--ptr-size)), 0px));
|
|
10
|
+
transition: transform var(--seed-duration-d6);
|
|
11
|
+
justify-content: center;
|
|
12
|
+
align-items: center;
|
|
13
|
+
display: flex;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.seed-pull-to-refresh__indicator[data-ptr-dragging] {
|
|
17
|
+
transition: none;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import './pull-to-refresh.layered.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const pullToRefreshSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-pull-to-refresh__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"indicator",
|
|
11
|
+
"seed-pull-to-refresh__indicator"
|
|
12
|
+
]
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
const defaultVariant = {};
|
|
16
|
+
|
|
17
|
+
const compoundVariants = [];
|
|
18
|
+
|
|
19
|
+
export const pullToRefreshVariantMap = {};
|
|
20
|
+
|
|
21
|
+
export const pullToRefreshVariantKeys = Object.keys(pullToRefreshVariantMap);
|
|
22
|
+
|
|
23
|
+
export function pullToRefresh(props) {
|
|
24
|
+
return Object.fromEntries(
|
|
25
|
+
pullToRefreshSlotNames.map(([slot, className]) => {
|
|
26
|
+
return [
|
|
27
|
+
slot,
|
|
28
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
29
|
+
];
|
|
30
|
+
}),
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
Object.assign(pullToRefresh, { splitVariantProps: (props) => splitVariantProps(props, pullToRefreshVariantMap) });
|
|
35
|
+
|
|
36
|
+
// @recipe(seed): pull-to-refresh
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import './radio-group.layered.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const defaultVariant = {};
|
|
5
|
+
|
|
6
|
+
const compoundVariants = [];
|
|
7
|
+
|
|
8
|
+
export const radioGroupVariantMap = {};
|
|
9
|
+
|
|
10
|
+
export const radioGroupVariantKeys = Object.keys(radioGroupVariantMap);
|
|
11
|
+
|
|
12
|
+
export function radioGroup(props) {
|
|
13
|
+
return createClassName(
|
|
14
|
+
"seed-radio-group",
|
|
15
|
+
mergeVariants(defaultVariant, props),
|
|
16
|
+
compoundVariants,
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
Object.assign(radioGroup, { splitVariantProps: (props) => splitVariantProps(props, radioGroupVariantMap) });
|
|
21
|
+
|
|
22
|
+
// @recipe(seed): radio-group
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
@layer seed-components {
|
|
2
|
+
.seed-radio__root {
|
|
3
|
+
vertical-align: top;
|
|
4
|
+
isolation: isolate;
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
align-items: flex-start;
|
|
7
|
+
gap: var(--seed-dimension-x2);
|
|
8
|
+
max-width: 100%;
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
position: relative;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.seed-radio__root:is(:disabled, [disabled], [data-disabled]) {
|
|
14
|
+
cursor: not-allowed;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.seed-radio__label {
|
|
18
|
+
color: var(--seed-color-fg-neutral);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.seed-radio__label:is(:disabled, [disabled], [data-disabled]) {
|
|
22
|
+
color: var(--seed-color-fg-disabled);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.seed-radio__label--weight_regular {
|
|
26
|
+
font-weight: var(--seed-font-weight-regular);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.seed-radio__label--weight_bold {
|
|
30
|
+
font-weight: var(--seed-font-weight-bold);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.seed-radio__root--size_large {
|
|
34
|
+
min-height: var(--seed-dimension-x9);
|
|
35
|
+
--radiomark-margin-top: calc((var(--seed-dimension-x9) - var(--seed-dimension-x6)) / 2);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.seed-radio__label--size_large {
|
|
39
|
+
font-size: var(--seed-font-size-t5);
|
|
40
|
+
line-height: var(--seed-line-height-t5);
|
|
41
|
+
margin-top: calc(var(--seed-dimension-x9) / 2 - var(--seed-line-height-t5) / 2);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.seed-radio__root--size_medium {
|
|
45
|
+
min-height: var(--seed-dimension-x8);
|
|
46
|
+
--radiomark-margin-top: calc((var(--seed-dimension-x8) - var(--seed-dimension-x5)) / 2);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.seed-radio__label--size_medium {
|
|
50
|
+
font-size: var(--seed-font-size-t4);
|
|
51
|
+
line-height: var(--seed-line-height-t4);
|
|
52
|
+
margin-top: calc(var(--seed-dimension-x8) / 2 - var(--seed-line-height-t4) / 2);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import './radio.layered.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const radioSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-radio__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"label",
|
|
11
|
+
"seed-radio__label"
|
|
12
|
+
]
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
const defaultVariant = {
|
|
16
|
+
"size": "medium",
|
|
17
|
+
"weight": "regular"
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const compoundVariants = [];
|
|
21
|
+
|
|
22
|
+
export const radioVariantMap = {
|
|
23
|
+
"weight": [
|
|
24
|
+
"regular",
|
|
25
|
+
"bold"
|
|
26
|
+
],
|
|
27
|
+
"size": [
|
|
28
|
+
"large",
|
|
29
|
+
"medium"
|
|
30
|
+
]
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const radioVariantKeys = Object.keys(radioVariantMap);
|
|
34
|
+
|
|
35
|
+
export function radio(props) {
|
|
36
|
+
return Object.fromEntries(
|
|
37
|
+
radioSlotNames.map(([slot, className]) => {
|
|
38
|
+
return [
|
|
39
|
+
slot,
|
|
40
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
41
|
+
];
|
|
42
|
+
}),
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
Object.assign(radio, { splitVariantProps: (props) => splitVariantProps(props, radioVariantMap) });
|
|
47
|
+
|
|
48
|
+
// @recipe(seed): radio
|
package/recipes/radiomark.css
CHANGED
|
@@ -10,10 +10,19 @@
|
|
|
10
10
|
border-color: var(--seed-color-stroke-neutral-weak);
|
|
11
11
|
border-radius: var(--seed-radius-full);
|
|
12
12
|
margin-top: var(--radiomark-margin-top, 0);
|
|
13
|
-
transition: background-color var(--seed-duration-color-transition) var(--seed-timing-function-easing);
|
|
13
|
+
transition: background-color var(--seed-duration-color-transition) var(--seed-timing-function-easing), outline-color var(--seed-duration-d3) var(--seed-timing-function-easing);
|
|
14
|
+
outline: var(--seed-focus-ring, var(--seed-dimension-x0_5) solid transparent);
|
|
15
|
+
outline-offset: var(--seed-dimension-x0_5);
|
|
14
16
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
@media (hover: hover) {
|
|
18
|
+
.seed-radiomark__root:not(:is(:disabled, [disabled], [data-disabled])):is(:hover, [data-hover]) {
|
|
19
|
+
background-color: var(--seed-color-bg-transparent-pressed);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
@media (hover: none) {
|
|
23
|
+
.seed-radiomark__root:not(:is(:disabled, [disabled], [data-disabled])):is(:active, [data-active]) {
|
|
24
|
+
background-color: var(--seed-color-bg-transparent-pressed);
|
|
25
|
+
}
|
|
17
26
|
}
|
|
18
27
|
.seed-radiomark__root:is(:checked, [data-checked]) {
|
|
19
28
|
border-width: 0px;
|
|
@@ -26,6 +35,10 @@
|
|
|
26
35
|
border-width: 1px;
|
|
27
36
|
border-color: var(--seed-color-palette-gray-300);
|
|
28
37
|
}
|
|
38
|
+
.seed-radiomark__root:is(:focus-visible, [data-focus-visible]) {
|
|
39
|
+
outline: var(--seed-focus-ring, var(--seed-dimension-x0_5) solid var(--seed-color-stroke-focus-ring));
|
|
40
|
+
outline-offset: var(--seed-dimension-x0_5);
|
|
41
|
+
}
|
|
29
42
|
.seed-radiomark__icon {
|
|
30
43
|
display: none;
|
|
31
44
|
border-radius: var(--seed-radius-full);
|
|
@@ -39,8 +52,15 @@
|
|
|
39
52
|
.seed-radiomark__root--tone_neutral:is(:checked, [data-checked]) {
|
|
40
53
|
background-color: var(--seed-color-bg-neutral-inverted);
|
|
41
54
|
}
|
|
42
|
-
|
|
43
|
-
|
|
55
|
+
@media (hover: hover) {
|
|
56
|
+
.seed-radiomark__root--tone_neutral:not(:is(:disabled, [disabled], [data-disabled])):is(:checked, [data-checked]):is(:hover, [data-hover]) {
|
|
57
|
+
background-color: var(--seed-color-bg-neutral-inverted-pressed);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
@media (hover: none) {
|
|
61
|
+
.seed-radiomark__root--tone_neutral:not(:is(:disabled, [disabled], [data-disabled])):is(:checked, [data-checked]):is(:active, [data-active]) {
|
|
62
|
+
background-color: var(--seed-color-bg-neutral-inverted-pressed);
|
|
63
|
+
}
|
|
44
64
|
}
|
|
45
65
|
.seed-radiomark__icon--tone_neutral:is(:checked, [data-checked]) {
|
|
46
66
|
color: var(--seed-color-fg-neutral-inverted);
|
|
@@ -48,8 +68,15 @@
|
|
|
48
68
|
.seed-radiomark__root--tone_brand:is(:checked, [data-checked]) {
|
|
49
69
|
background-color: var(--seed-color-bg-brand-solid);
|
|
50
70
|
}
|
|
51
|
-
|
|
52
|
-
|
|
71
|
+
@media (hover: hover) {
|
|
72
|
+
.seed-radiomark__root--tone_brand:not(:is(:disabled, [disabled], [data-disabled])):is(:checked, [data-checked]):is(:hover, [data-hover]) {
|
|
73
|
+
background-color: var(--seed-color-bg-brand-solid-pressed);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
@media (hover: none) {
|
|
77
|
+
.seed-radiomark__root--tone_brand:not(:is(:disabled, [disabled], [data-disabled])):is(:checked, [data-checked]):is(:active, [data-active]) {
|
|
78
|
+
background-color: var(--seed-color-bg-brand-solid-pressed);
|
|
79
|
+
}
|
|
53
80
|
}
|
|
54
81
|
.seed-radiomark__icon--tone_brand:is(:checked, [data-checked]) {
|
|
55
82
|
color: var(--seed-color-palette-static-white);
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
@layer seed-components {
|
|
2
|
+
.seed-radiomark__root {
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
border-style: solid;
|
|
5
|
+
border-width: 1px;
|
|
6
|
+
border-color: var(--seed-color-stroke-neutral-weak);
|
|
7
|
+
border-radius: var(--seed-radius-full);
|
|
8
|
+
margin-top: var(--radiomark-margin-top, 0);
|
|
9
|
+
transition: background-color var(--seed-duration-color-transition) var(--seed-timing-function-easing), outline-color var(--seed-duration-d3) var(--seed-timing-function-easing);
|
|
10
|
+
outline: var(--seed-focus-ring, var(--seed-dimension-x0_5) solid transparent);
|
|
11
|
+
outline-offset: var(--seed-dimension-x0_5);
|
|
12
|
+
flex: none;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
align-items: center;
|
|
15
|
+
display: flex;
|
|
16
|
+
position: relative;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@media (hover: hover) {
|
|
20
|
+
.seed-radiomark__root:not(:is(:disabled, [disabled], [data-disabled])):is(:hover, [data-hover]) {
|
|
21
|
+
background-color: var(--seed-color-bg-transparent-pressed);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@media (hover: none) {
|
|
26
|
+
.seed-radiomark__root:not(:is(:disabled, [disabled], [data-disabled])):is(:active, [data-active]) {
|
|
27
|
+
background-color: var(--seed-color-bg-transparent-pressed);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.seed-radiomark__root:is(:checked, [data-checked]) {
|
|
32
|
+
border-width: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.seed-radiomark__root:is(:disabled, [disabled], [data-disabled]) {
|
|
36
|
+
background-color: var(--seed-color-palette-gray-300);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.seed-radiomark__root:is(:disabled, [disabled], [data-disabled]):is(:checked, [data-checked]) {
|
|
40
|
+
background-color: var(--seed-color-bg-transparent);
|
|
41
|
+
border-width: 1px;
|
|
42
|
+
border-color: var(--seed-color-palette-gray-300);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.seed-radiomark__root:is(:focus-visible, [data-focus-visible]) {
|
|
46
|
+
outline: var(--seed-focus-ring, var(--seed-dimension-x0_5) solid var(--seed-color-stroke-focus-ring));
|
|
47
|
+
outline-offset: var(--seed-dimension-x0_5);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.seed-radiomark__icon {
|
|
51
|
+
border-radius: var(--seed-radius-full);
|
|
52
|
+
display: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.seed-radiomark__icon:is(:checked, [data-checked]) {
|
|
56
|
+
display: block;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.seed-radiomark__icon:is(:disabled, [disabled], [data-disabled]):is(:checked, [data-checked]) {
|
|
60
|
+
color: var(--seed-color-palette-gray-300);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.seed-radiomark__root--tone_neutral:is(:checked, [data-checked]) {
|
|
64
|
+
background-color: var(--seed-color-bg-neutral-inverted);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@media (hover: hover) {
|
|
68
|
+
.seed-radiomark__root--tone_neutral:not(:is(:disabled, [disabled], [data-disabled])):is(:checked, [data-checked]):is(:hover, [data-hover]) {
|
|
69
|
+
background-color: var(--seed-color-bg-neutral-inverted-pressed);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@media (hover: none) {
|
|
74
|
+
.seed-radiomark__root--tone_neutral:not(:is(:disabled, [disabled], [data-disabled])):is(:checked, [data-checked]):is(:active, [data-active]) {
|
|
75
|
+
background-color: var(--seed-color-bg-neutral-inverted-pressed);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.seed-radiomark__icon--tone_neutral:is(:checked, [data-checked]) {
|
|
80
|
+
color: var(--seed-color-fg-neutral-inverted);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.seed-radiomark__root--tone_brand:is(:checked, [data-checked]) {
|
|
84
|
+
background-color: var(--seed-color-bg-brand-solid);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@media (hover: hover) {
|
|
88
|
+
.seed-radiomark__root--tone_brand:not(:is(:disabled, [disabled], [data-disabled])):is(:checked, [data-checked]):is(:hover, [data-hover]) {
|
|
89
|
+
background-color: var(--seed-color-bg-brand-solid-pressed);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@media (hover: none) {
|
|
94
|
+
.seed-radiomark__root--tone_brand:not(:is(:disabled, [disabled], [data-disabled])):is(:checked, [data-checked]):is(:active, [data-active]) {
|
|
95
|
+
background-color: var(--seed-color-bg-brand-solid-pressed);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.seed-radiomark__icon--tone_brand:is(:checked, [data-checked]) {
|
|
100
|
+
color: var(--seed-color-palette-static-white);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.seed-radiomark__root--size_large {
|
|
104
|
+
width: var(--seed-dimension-x6);
|
|
105
|
+
height: var(--seed-dimension-x6);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.seed-radiomark__icon--size_large {
|
|
109
|
+
width: var(--seed-dimension-x2_5);
|
|
110
|
+
height: var(--seed-dimension-x2_5);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.seed-radiomark__icon--size_large:is(:disabled, [disabled], [data-disabled]) {
|
|
114
|
+
width: var(--seed-dimension-x3);
|
|
115
|
+
height: var(--seed-dimension-x3);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.seed-radiomark__root--size_medium {
|
|
119
|
+
width: var(--seed-dimension-x5);
|
|
120
|
+
height: var(--seed-dimension-x5);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.seed-radiomark__icon--size_medium {
|
|
124
|
+
width: var(--seed-dimension-x2);
|
|
125
|
+
height: var(--seed-dimension-x2);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.seed-radiomark__icon--size_medium:is(:disabled, [disabled], [data-disabled]) {
|
|
129
|
+
width: var(--seed-dimension-x2_5);
|
|
130
|
+
height: var(--seed-dimension-x2_5);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import './radiomark.layered.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const radiomarkSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-radiomark__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"icon",
|
|
11
|
+
"seed-radiomark__icon"
|
|
12
|
+
]
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
const defaultVariant = {
|
|
16
|
+
"tone": "brand",
|
|
17
|
+
"size": "medium"
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const compoundVariants = [];
|
|
21
|
+
|
|
22
|
+
export const radiomarkVariantMap = {
|
|
23
|
+
"tone": [
|
|
24
|
+
"neutral",
|
|
25
|
+
"brand"
|
|
26
|
+
],
|
|
27
|
+
"size": [
|
|
28
|
+
"large",
|
|
29
|
+
"medium"
|
|
30
|
+
]
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const radiomarkVariantKeys = Object.keys(radiomarkVariantMap);
|
|
34
|
+
|
|
35
|
+
export function radiomark(props) {
|
|
36
|
+
return Object.fromEntries(
|
|
37
|
+
radiomarkSlotNames.map(([slot, className]) => {
|
|
38
|
+
return [
|
|
39
|
+
slot,
|
|
40
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
41
|
+
];
|
|
42
|
+
}),
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
Object.assign(radiomark, { splitVariantProps: (props) => splitVariantProps(props, radiomarkVariantMap) });
|
|
47
|
+
|
|
48
|
+
// @recipe(seed): radiomark
|