@seed-design/css 0.2.0 → 0.2.3
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 +333 -214
- package/all.min.css +1 -1
- package/package.json +1 -1
- package/recipes/action-button.d.ts +3 -3
- package/recipes/action-chip.d.ts +2 -2
- package/recipes/action-sheet-item.d.ts +1 -1
- package/recipes/app-bar-main.d.ts +4 -4
- package/recipes/app-bar.d.ts +3 -3
- package/recipes/app-screen.d.ts +4 -4
- package/recipes/avatar.d.ts +1 -1
- package/recipes/badge.d.ts +3 -3
- package/recipes/bottom-sheet.d.ts +1 -1
- package/recipes/callout.d.ts +1 -1
- package/recipes/checkbox.css +5 -112
- package/recipes/checkbox.d.ts +3 -7
- package/recipes/checkbox.mjs +1 -31
- package/recipes/checkmark.css +105 -0
- package/recipes/checkmark.d.ts +28 -0
- package/recipes/checkmark.mjs +65 -0
- package/recipes/chip-tabs.css +42 -10
- package/recipes/chip-tabs.d.ts +7 -3
- package/recipes/chip-tabs.mjs +6 -0
- package/recipes/chip.css +33 -33
- package/recipes/chip.d.ts +3 -3
- package/recipes/contextual-floating-button.d.ts +2 -2
- package/recipes/control-chip.d.ts +2 -2
- package/recipes/extended-action-sheet-item.d.ts +1 -1
- package/recipes/extended-fab.d.ts +2 -2
- package/recipes/identity-placeholder.d.ts +1 -1
- package/recipes/inline-banner.d.ts +1 -1
- package/recipes/link-content.d.ts +2 -2
- package/recipes/list-item.css +102 -0
- package/recipes/list-item.d.ts +24 -0
- package/recipes/list-item.mjs +59 -0
- package/recipes/manner-temp-badge.d.ts +1 -1
- package/recipes/manner-temp.d.ts +1 -1
- package/recipes/menu-sheet-item.d.ts +2 -2
- package/recipes/notification-badge-positioner.d.ts +2 -2
- package/recipes/notification-badge.d.ts +1 -1
- package/recipes/page-banner.d.ts +2 -2
- package/recipes/progress-circle.d.ts +1 -1
- package/recipes/radio.css +29 -50
- package/recipes/radio.d.ts +6 -2
- package/recipes/radio.mjs +8 -3
- package/recipes/radiomark.css +68 -0
- package/recipes/radiomark.d.ts +24 -0
- package/recipes/radiomark.mjs +43 -0
- package/recipes/reaction-button.d.ts +1 -1
- package/recipes/select-box.css +0 -68
- package/recipes/select-box.d.ts +1 -1
- package/recipes/select-box.mjs +0 -16
- package/recipes/skeleton.d.ts +1 -1
- package/recipes/snackbar.d.ts +1 -1
- package/recipes/tabs.d.ts +3 -3
- package/recipes/text-field.css +8 -9
- package/recipes/text-field.d.ts +1 -1
- package/recipes/text.d.ts +3 -3
- package/recipes/toggle-button.d.ts +2 -2
- package/vars/component/checkbox.d.ts +5 -123
- package/vars/component/checkbox.mjs +5 -123
- package/vars/component/checkmark.d.ts +121 -0
- package/vars/component/checkmark.mjs +121 -0
- package/vars/component/chip-tab.d.ts +70 -10
- package/vars/component/chip-tab.mjs +70 -10
- package/vars/component/chip-tablist.d.ts +10 -2
- package/vars/component/chip-tablist.mjs +10 -2
- package/vars/component/chip.d.ts +0 -91
- package/vars/component/chip.mjs +0 -91
- package/vars/component/index.d.ts +3 -0
- package/vars/component/index.mjs +3 -0
- package/vars/component/list-item.d.ts +72 -0
- package/vars/component/list-item.mjs +72 -0
- package/vars/component/radio.d.ts +28 -52
- package/vars/component/radio.mjs +28 -52
- package/vars/component/radiomark.d.ts +77 -0
- package/vars/component/radiomark.mjs +77 -0
- package/vars/component/select-box.d.ts +0 -47
- package/vars/component/select-box.mjs +0 -47
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
declare interface ActionButtonVariant {
|
|
2
2
|
/**
|
|
3
|
-
* @default brandSolid
|
|
3
|
+
* @default "brandSolid"
|
|
4
4
|
*/
|
|
5
5
|
variant: "brandSolid" | "neutralSolid" | "neutralWeak" | "criticalSolid" | "brandOutline" | "neutralOutline" | "ghost";
|
|
6
6
|
/**
|
|
7
|
-
* @default medium
|
|
7
|
+
* @default "medium"
|
|
8
8
|
*/
|
|
9
9
|
size: "xsmall" | "small" | "medium" | "large";
|
|
10
10
|
/**
|
|
11
|
-
* @default withText
|
|
11
|
+
* @default "withText"
|
|
12
12
|
*/
|
|
13
13
|
layout: "withText" | "iconOnly";
|
|
14
14
|
}
|
package/recipes/action-chip.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
declare interface AppBarMainVariant {
|
|
2
2
|
/**
|
|
3
|
-
* @default titleOnly
|
|
3
|
+
* @default "titleOnly"
|
|
4
4
|
*/
|
|
5
5
|
layout: "titleOnly" | "withSubtitle";
|
|
6
6
|
/**
|
|
7
|
-
* @default cupertino
|
|
7
|
+
* @default "cupertino"
|
|
8
8
|
*/
|
|
9
9
|
theme: "cupertino" | "android";
|
|
10
10
|
/**
|
|
11
|
-
* @default slideFromRightIOS
|
|
11
|
+
* @default "slideFromRightIOS"
|
|
12
12
|
*/
|
|
13
13
|
transitionStyle: "slideFromRightIOS" | "fadeFromBottomAndroid";
|
|
14
14
|
/**
|
|
15
|
-
* @default layer
|
|
15
|
+
* @default "layer"
|
|
16
16
|
*/
|
|
17
17
|
tone: "layer" | "transparent";
|
|
18
18
|
}
|
package/recipes/app-bar.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
declare interface AppBarVariant {
|
|
2
2
|
/**
|
|
3
|
-
* @default cupertino
|
|
3
|
+
* @default "cupertino"
|
|
4
4
|
*/
|
|
5
5
|
theme: "cupertino" | "android";
|
|
6
6
|
/**
|
|
7
|
-
* @default slideFromRightIOS
|
|
7
|
+
* @default "slideFromRightIOS"
|
|
8
8
|
*/
|
|
9
9
|
transitionStyle: "slideFromRightIOS" | "fadeFromBottomAndroid";
|
|
10
10
|
/**
|
|
11
|
-
* @default layer
|
|
11
|
+
* @default "layer"
|
|
12
12
|
*/
|
|
13
13
|
tone: "layer" | "transparent";
|
|
14
14
|
/**
|
package/recipes/app-screen.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
declare interface AppScreenVariant {
|
|
2
2
|
/**
|
|
3
|
-
* @default cupertino
|
|
3
|
+
* @default "cupertino"
|
|
4
4
|
*/
|
|
5
5
|
theme: "cupertino" | "android";
|
|
6
6
|
/**
|
|
7
|
-
* @default slideFromRightIOS
|
|
7
|
+
* @default "slideFromRightIOS"
|
|
8
8
|
*/
|
|
9
9
|
transitionStyle: "slideFromRightIOS" | "fadeFromBottomAndroid";
|
|
10
10
|
/**
|
|
11
|
-
* @default appBar
|
|
11
|
+
* @default "appBar"
|
|
12
12
|
*/
|
|
13
13
|
layerOffsetTop: "none" | "safeArea" | "appBar";
|
|
14
14
|
/**
|
|
15
|
-
* @default none
|
|
15
|
+
* @default "none"
|
|
16
16
|
*/
|
|
17
17
|
layerOffsetBottom: "none" | "safeArea";
|
|
18
18
|
}
|
package/recipes/avatar.d.ts
CHANGED
package/recipes/badge.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
declare interface BadgeVariant {
|
|
2
2
|
/**
|
|
3
|
-
* @default medium
|
|
3
|
+
* @default "medium"
|
|
4
4
|
*/
|
|
5
5
|
size: "medium" | "large";
|
|
6
6
|
/**
|
|
7
|
-
* @default solid
|
|
7
|
+
* @default "solid"
|
|
8
8
|
*/
|
|
9
9
|
variant: "weak" | "solid" | "outline";
|
|
10
10
|
/**
|
|
11
|
-
* @default neutral
|
|
11
|
+
* @default "neutral"
|
|
12
12
|
*/
|
|
13
13
|
tone: "neutral" | "brand" | "informative" | "positive" | "warning" | "critical";
|
|
14
14
|
}
|
package/recipes/callout.d.ts
CHANGED
package/recipes/checkbox.css
CHANGED
|
@@ -11,107 +11,21 @@
|
|
|
11
11
|
.seed-checkbox__root:is(:disabled, [disabled], [data-disabled]) {
|
|
12
12
|
cursor: not-allowed;
|
|
13
13
|
}
|
|
14
|
-
.seed-checkbox__control {
|
|
15
|
-
position: relative;
|
|
16
|
-
box-sizing: border-box;
|
|
17
|
-
flex-shrink: 0;
|
|
18
|
-
}
|
|
19
|
-
.seed-checkbox__icon {
|
|
20
|
-
display: none;
|
|
21
|
-
content: "";
|
|
22
|
-
position: absolute;
|
|
23
|
-
margin: auto;
|
|
24
|
-
left: 0;
|
|
25
|
-
right: 0;
|
|
26
|
-
top: 0;
|
|
27
|
-
bottom: 0;
|
|
28
|
-
text-align: center;
|
|
29
|
-
overflow: initial;
|
|
30
|
-
}
|
|
31
14
|
.seed-checkbox__label {
|
|
32
15
|
color: var(--seed-color-fg-neutral);
|
|
33
16
|
}
|
|
17
|
+
.seed-checkbox__label:is(:disabled, [disabled], [data-disabled]) {
|
|
18
|
+
color: var(--seed-color-fg-disabled);
|
|
19
|
+
}
|
|
34
20
|
.seed-checkbox__label--weight_default {
|
|
35
21
|
font-weight: var(--seed-font-weight-regular);
|
|
36
22
|
}
|
|
37
23
|
.seed-checkbox__label--weight_stronger {
|
|
38
24
|
font-weight: var(--seed-font-weight-bold);
|
|
39
25
|
}
|
|
40
|
-
.seed-checkbox__control--variant_square {
|
|
41
|
-
border-width: 1px;
|
|
42
|
-
border-style: solid;
|
|
43
|
-
border-color: var(--seed-color-stroke-neutral-weak);
|
|
44
|
-
}
|
|
45
|
-
.seed-checkbox__control--variant_square:is(:checked, :indeterminate, [data-checked], [data-indeterminate]) {
|
|
46
|
-
background: var(--seed-color-bg-brand-solid);
|
|
47
|
-
border-width: 0;
|
|
48
|
-
}
|
|
49
|
-
.seed-checkbox__control--variant_square:is(:active, [data-active]) {
|
|
50
|
-
background: var(--seed-color-bg-layer-default-pressed);
|
|
51
|
-
}
|
|
52
|
-
.seed-checkbox__control--variant_square:is(:active, [data-active]):is(:checked, :indeterminate, [data-checked], [data-indeterminate]) {
|
|
53
|
-
background: var(--seed-color-bg-brand-solid-pressed);
|
|
54
|
-
}
|
|
55
|
-
.seed-checkbox__control--variant_square:is(:disabled, [disabled], [data-disabled]) {
|
|
56
|
-
background: var(--seed-color-bg-disabled);
|
|
57
|
-
border-color: var(--seed-color-stroke-neutral-muted);
|
|
58
|
-
}
|
|
59
|
-
.seed-checkbox__control--variant_square:is(:disabled, [disabled], [data-disabled]):is(:active, [data-active]) {
|
|
60
|
-
background: var(--seed-color-bg-disabled);
|
|
61
|
-
}
|
|
62
|
-
.seed-checkbox__icon--variant_square:is(:checked, :indeterminate, [data-checked], [data-indeterminate]) {
|
|
63
|
-
display: block;
|
|
64
|
-
color: var(--seed-color-palette-static-white);
|
|
65
|
-
}
|
|
66
|
-
.seed-checkbox__icon--variant_square:is(:disabled, [disabled], [data-disabled]):is(:checked, :indeterminate, [data-checked], [data-indeterminate]) {
|
|
67
|
-
display: block;
|
|
68
|
-
color: var(--seed-color-fg-disabled);
|
|
69
|
-
}
|
|
70
|
-
.seed-checkbox__label--variant_square:is(:disabled, [disabled], [data-disabled]) {
|
|
71
|
-
color: var(--seed-color-fg-disabled);
|
|
72
|
-
}
|
|
73
|
-
.seed-checkbox__control--variant_ghost {
|
|
74
|
-
background: none;
|
|
75
|
-
}
|
|
76
|
-
.seed-checkbox__control--variant_ghost:is(:checked, :indeterminate, [data-checked], [data-indeterminate]) {
|
|
77
|
-
background: none;
|
|
78
|
-
}
|
|
79
|
-
.seed-checkbox__control--variant_ghost:is(:active, [data-active]) {
|
|
80
|
-
background: var(--seed-color-bg-layer-default-pressed);
|
|
81
|
-
}
|
|
82
|
-
.seed-checkbox__control--variant_ghost:is(:active, [data-active]):is(:checked, :indeterminate, [data-checked], [data-indeterminate]) {
|
|
83
|
-
background: var(--seed-color-palette-carrot-200);
|
|
84
|
-
}
|
|
85
|
-
.seed-checkbox__control--variant_ghost:is(:disabled, [disabled], [data-disabled]):is(:checked, :indeterminate, [data-checked], [data-indeterminate]) {
|
|
86
|
-
background: none;
|
|
87
|
-
}
|
|
88
|
-
.seed-checkbox__control--variant_ghost:is(:disabled, [disabled], [data-disabled]):is(:active, [data-active]) {
|
|
89
|
-
background: none;
|
|
90
|
-
}
|
|
91
|
-
.seed-checkbox__icon--variant_ghost {
|
|
92
|
-
display: block;
|
|
93
|
-
color: var(--seed-color-fg-placeholder);
|
|
94
|
-
}
|
|
95
|
-
.seed-checkbox__icon--variant_ghost:is(:checked, :indeterminate, [data-checked], [data-indeterminate]) {
|
|
96
|
-
color: var(--seed-color-fg-brand);
|
|
97
|
-
}
|
|
98
|
-
.seed-checkbox__icon--variant_ghost:is(:disabled, [disabled], [data-disabled]):is(:checked, :indeterminate, [data-checked], [data-indeterminate]) {
|
|
99
|
-
color: var(--seed-color-fg-disabled);
|
|
100
|
-
}
|
|
101
|
-
.seed-checkbox__icon--variant_ghost:is(:disabled, [disabled], [data-disabled]) {
|
|
102
|
-
color: var(--seed-color-fg-disabled);
|
|
103
|
-
}
|
|
104
|
-
.seed-checkbox__label--variant_ghost:is(:disabled, [disabled], [data-disabled]) {
|
|
105
|
-
color: var(--seed-color-fg-disabled);
|
|
106
|
-
}
|
|
107
26
|
.seed-checkbox__root--size_large {
|
|
108
27
|
min-height: var(--seed-dimension-x9);
|
|
109
|
-
|
|
110
|
-
.seed-checkbox__control--size_large {
|
|
111
|
-
border-radius: var(--seed-radius-r1);
|
|
112
|
-
width: var(--seed-dimension-x6);
|
|
113
|
-
height: var(--seed-dimension-x6);
|
|
114
|
-
margin: calc((var(--seed-dimension-x9) - var(--seed-dimension-x6)) / 2) 0;
|
|
28
|
+
--checkmark-margin-top: calc((var(--seed-dimension-x9) - var(--seed-dimension-x6)) / 2);
|
|
115
29
|
}
|
|
116
30
|
.seed-checkbox__label--size_large {
|
|
117
31
|
font-size: var(--seed-font-size-t5);
|
|
@@ -120,31 +34,10 @@
|
|
|
120
34
|
}
|
|
121
35
|
.seed-checkbox__root--size_medium {
|
|
122
36
|
min-height: var(--seed-dimension-x8);
|
|
123
|
-
|
|
124
|
-
.seed-checkbox__control--size_medium {
|
|
125
|
-
border-radius: var(--seed-radius-r1);
|
|
126
|
-
width: var(--seed-dimension-x5);
|
|
127
|
-
height: var(--seed-dimension-x5);
|
|
128
|
-
margin: calc((var(--seed-dimension-x8) - var(--seed-dimension-x5)) / 2) 0;
|
|
37
|
+
--checkmark-margin-top: calc((var(--seed-dimension-x8) - var(--seed-dimension-x5)) / 2);
|
|
129
38
|
}
|
|
130
39
|
.seed-checkbox__label--size_medium {
|
|
131
40
|
font-size: var(--seed-font-size-t4);
|
|
132
41
|
line-height: var(--seed-line-height-t4);
|
|
133
42
|
margin-block-start: calc(16px - 0.59375rem);
|
|
134
|
-
}
|
|
135
|
-
.seed-checkbox__icon--size_medium-variant_ghost {
|
|
136
|
-
width: 14px;
|
|
137
|
-
height: 14px;
|
|
138
|
-
}
|
|
139
|
-
.seed-checkbox__icon--size_large-variant_ghost {
|
|
140
|
-
width: 18px;
|
|
141
|
-
height: 18px;
|
|
142
|
-
}
|
|
143
|
-
.seed-checkbox__icon--size_medium-variant_square {
|
|
144
|
-
width: 12px;
|
|
145
|
-
height: 12px;
|
|
146
|
-
}
|
|
147
|
-
.seed-checkbox__icon--size_large-variant_square {
|
|
148
|
-
width: 14px;
|
|
149
|
-
height: 14px;
|
|
150
43
|
}
|
package/recipes/checkbox.d.ts
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
declare interface CheckboxVariant {
|
|
2
2
|
/**
|
|
3
|
-
* @default default
|
|
3
|
+
* @default "default"
|
|
4
4
|
*/
|
|
5
5
|
weight: "default" | "stronger";
|
|
6
6
|
/**
|
|
7
|
-
* @default
|
|
8
|
-
*/
|
|
9
|
-
variant: "square" | "ghost";
|
|
10
|
-
/**
|
|
11
|
-
* @default medium
|
|
7
|
+
* @default "medium"
|
|
12
8
|
*/
|
|
13
9
|
size: "large" | "medium";
|
|
14
10
|
}
|
|
@@ -19,7 +15,7 @@ declare type CheckboxVariantMap = {
|
|
|
19
15
|
|
|
20
16
|
export declare type CheckboxVariantProps = Partial<CheckboxVariant>;
|
|
21
17
|
|
|
22
|
-
export declare type CheckboxSlotName = "root" | "
|
|
18
|
+
export declare type CheckboxSlotName = "root" | "label";
|
|
23
19
|
|
|
24
20
|
export declare const checkboxVariantMap: CheckboxVariantMap;
|
|
25
21
|
|
package/recipes/checkbox.mjs
CHANGED
|
@@ -6,14 +6,6 @@ const checkboxSlotNames = [
|
|
|
6
6
|
"root",
|
|
7
7
|
"seed-checkbox__root"
|
|
8
8
|
],
|
|
9
|
-
[
|
|
10
|
-
"control",
|
|
11
|
-
"seed-checkbox__control"
|
|
12
|
-
],
|
|
13
|
-
[
|
|
14
|
-
"icon",
|
|
15
|
-
"seed-checkbox__icon"
|
|
16
|
-
],
|
|
17
9
|
[
|
|
18
10
|
"label",
|
|
19
11
|
"seed-checkbox__label"
|
|
@@ -22,38 +14,16 @@ const checkboxSlotNames = [
|
|
|
22
14
|
|
|
23
15
|
const defaultVariant = {
|
|
24
16
|
"size": "medium",
|
|
25
|
-
"variant": "square",
|
|
26
17
|
"weight": "default"
|
|
27
18
|
};
|
|
28
19
|
|
|
29
|
-
const compoundVariants = [
|
|
30
|
-
{
|
|
31
|
-
"size": "medium",
|
|
32
|
-
"variant": "ghost"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"size": "large",
|
|
36
|
-
"variant": "ghost"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"size": "medium",
|
|
40
|
-
"variant": "square"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"size": "large",
|
|
44
|
-
"variant": "square"
|
|
45
|
-
}
|
|
46
|
-
];
|
|
20
|
+
const compoundVariants = [];
|
|
47
21
|
|
|
48
22
|
export const checkboxVariantMap = {
|
|
49
23
|
"weight": [
|
|
50
24
|
"default",
|
|
51
25
|
"stronger"
|
|
52
26
|
],
|
|
53
|
-
"variant": [
|
|
54
|
-
"square",
|
|
55
|
-
"ghost"
|
|
56
|
-
],
|
|
57
27
|
"size": [
|
|
58
28
|
"large",
|
|
59
29
|
"medium"
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
.seed-checkmark__root {
|
|
2
|
+
position: relative;
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
flex-shrink: 0;
|
|
5
|
+
margin-top: var(--checkmark-margin-top, 0);
|
|
6
|
+
}
|
|
7
|
+
.seed-checkmark__icon {
|
|
8
|
+
display: none;
|
|
9
|
+
content: "";
|
|
10
|
+
position: absolute;
|
|
11
|
+
margin: auto;
|
|
12
|
+
left: 0;
|
|
13
|
+
right: 0;
|
|
14
|
+
top: 0;
|
|
15
|
+
bottom: 0;
|
|
16
|
+
text-align: center;
|
|
17
|
+
overflow: initial;
|
|
18
|
+
}
|
|
19
|
+
.seed-checkmark__root--variant_square {
|
|
20
|
+
border-width: 1px;
|
|
21
|
+
border-style: solid;
|
|
22
|
+
border-color: var(--seed-color-stroke-neutral-weak);
|
|
23
|
+
}
|
|
24
|
+
.seed-checkmark__root--variant_square:is(:checked, :indeterminate, [data-checked], [data-indeterminate]) {
|
|
25
|
+
background: var(--seed-color-bg-brand-solid);
|
|
26
|
+
border-width: 0;
|
|
27
|
+
}
|
|
28
|
+
.seed-checkmark__root--variant_square:is(:active, [data-active]) {
|
|
29
|
+
background: var(--seed-color-bg-layer-default-pressed);
|
|
30
|
+
}
|
|
31
|
+
.seed-checkmark__root--variant_square:is(:active, [data-active]):is(:checked, :indeterminate, [data-checked], [data-indeterminate]) {
|
|
32
|
+
background: var(--seed-color-bg-brand-solid-pressed);
|
|
33
|
+
}
|
|
34
|
+
.seed-checkmark__root--variant_square:is(:disabled, [disabled], [data-disabled]) {
|
|
35
|
+
background: var(--seed-color-bg-disabled);
|
|
36
|
+
border-color: var(--seed-color-stroke-neutral-muted);
|
|
37
|
+
}
|
|
38
|
+
.seed-checkmark__root--variant_square:is(:disabled, [disabled], [data-disabled]):is(:active, [data-active]) {
|
|
39
|
+
background: var(--seed-color-bg-disabled);
|
|
40
|
+
}
|
|
41
|
+
.seed-checkmark__icon--variant_square:is(:checked, :indeterminate, [data-checked], [data-indeterminate]) {
|
|
42
|
+
display: block;
|
|
43
|
+
color: var(--seed-color-palette-static-white);
|
|
44
|
+
}
|
|
45
|
+
.seed-checkmark__icon--variant_square:is(:disabled, [disabled], [data-disabled]):is(:checked, :indeterminate, [data-checked], [data-indeterminate]) {
|
|
46
|
+
display: block;
|
|
47
|
+
color: var(--seed-color-fg-disabled);
|
|
48
|
+
}
|
|
49
|
+
.seed-checkmark__root--variant_ghost {
|
|
50
|
+
background: none;
|
|
51
|
+
}
|
|
52
|
+
.seed-checkmark__root--variant_ghost:is(:checked, :indeterminate, [data-checked], [data-indeterminate]) {
|
|
53
|
+
background: none;
|
|
54
|
+
}
|
|
55
|
+
.seed-checkmark__root--variant_ghost:is(:active, [data-active]) {
|
|
56
|
+
background: var(--seed-color-bg-layer-default-pressed);
|
|
57
|
+
}
|
|
58
|
+
.seed-checkmark__root--variant_ghost:is(:active, [data-active]):is(:checked, :indeterminate, [data-checked], [data-indeterminate]) {
|
|
59
|
+
background: var(--seed-color-palette-carrot-200);
|
|
60
|
+
}
|
|
61
|
+
.seed-checkmark__root--variant_ghost:is(:disabled, [disabled], [data-disabled]):is(:checked, :indeterminate, [data-checked], [data-indeterminate]) {
|
|
62
|
+
background: none;
|
|
63
|
+
}
|
|
64
|
+
.seed-checkmark__root--variant_ghost:is(:disabled, [disabled], [data-disabled]):is(:active, [data-active]) {
|
|
65
|
+
background: none;
|
|
66
|
+
}
|
|
67
|
+
.seed-checkmark__icon--variant_ghost {
|
|
68
|
+
display: block;
|
|
69
|
+
color: var(--seed-color-fg-placeholder);
|
|
70
|
+
}
|
|
71
|
+
.seed-checkmark__icon--variant_ghost:is(:checked, :indeterminate, [data-checked], [data-indeterminate]) {
|
|
72
|
+
color: var(--seed-color-fg-brand);
|
|
73
|
+
}
|
|
74
|
+
.seed-checkmark__icon--variant_ghost:is(:disabled, [disabled], [data-disabled]):is(:checked, :indeterminate, [data-checked], [data-indeterminate]) {
|
|
75
|
+
color: var(--seed-color-fg-disabled);
|
|
76
|
+
}
|
|
77
|
+
.seed-checkmark__icon--variant_ghost:is(:disabled, [disabled], [data-disabled]) {
|
|
78
|
+
color: var(--seed-color-fg-disabled);
|
|
79
|
+
}
|
|
80
|
+
.seed-checkmark__root--size_large {
|
|
81
|
+
border-radius: var(--seed-radius-r1);
|
|
82
|
+
width: var(--seed-dimension-x6);
|
|
83
|
+
height: var(--seed-dimension-x6);
|
|
84
|
+
}
|
|
85
|
+
.seed-checkmark__root--size_medium {
|
|
86
|
+
border-radius: var(--seed-radius-r1);
|
|
87
|
+
width: var(--seed-dimension-x5);
|
|
88
|
+
height: var(--seed-dimension-x5);
|
|
89
|
+
}
|
|
90
|
+
.seed-checkmark__icon--size_medium-variant_ghost {
|
|
91
|
+
width: 14px;
|
|
92
|
+
height: 14px;
|
|
93
|
+
}
|
|
94
|
+
.seed-checkmark__icon--size_large-variant_ghost {
|
|
95
|
+
width: 18px;
|
|
96
|
+
height: 18px;
|
|
97
|
+
}
|
|
98
|
+
.seed-checkmark__icon--size_medium-variant_square {
|
|
99
|
+
width: 12px;
|
|
100
|
+
height: 12px;
|
|
101
|
+
}
|
|
102
|
+
.seed-checkmark__icon--size_large-variant_square {
|
|
103
|
+
width: 14px;
|
|
104
|
+
height: 14px;
|
|
105
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare interface CheckmarkVariant {
|
|
2
|
+
/**
|
|
3
|
+
* @default "square"
|
|
4
|
+
*/
|
|
5
|
+
variant: "square" | "ghost";
|
|
6
|
+
/**
|
|
7
|
+
* @default "medium"
|
|
8
|
+
*/
|
|
9
|
+
size: "large" | "medium";
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare type CheckmarkVariantMap = {
|
|
13
|
+
[key in keyof CheckmarkVariant]: Array<CheckmarkVariant[key]>;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export declare type CheckmarkVariantProps = Partial<CheckmarkVariant>;
|
|
17
|
+
|
|
18
|
+
export declare type CheckmarkSlotName = "root" | "icon";
|
|
19
|
+
|
|
20
|
+
export declare const checkmarkVariantMap: CheckmarkVariantMap;
|
|
21
|
+
|
|
22
|
+
export declare const checkmark: ((
|
|
23
|
+
props?: CheckmarkVariantProps,
|
|
24
|
+
) => Record<CheckmarkSlotName, string>) & {
|
|
25
|
+
splitVariantProps: <T extends CheckmarkVariantProps>(
|
|
26
|
+
props: T,
|
|
27
|
+
) => [CheckmarkVariantProps, Omit<T, keyof CheckmarkVariantProps>];
|
|
28
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import './checkmark.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const checkmarkSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-checkmark__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"icon",
|
|
11
|
+
"seed-checkmark__icon"
|
|
12
|
+
]
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
const defaultVariant = {
|
|
16
|
+
"size": "medium",
|
|
17
|
+
"variant": "square"
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const compoundVariants = [
|
|
21
|
+
{
|
|
22
|
+
"size": "medium",
|
|
23
|
+
"variant": "ghost"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"size": "large",
|
|
27
|
+
"variant": "ghost"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"size": "medium",
|
|
31
|
+
"variant": "square"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"size": "large",
|
|
35
|
+
"variant": "square"
|
|
36
|
+
}
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
export const checkmarkVariantMap = {
|
|
40
|
+
"variant": [
|
|
41
|
+
"square",
|
|
42
|
+
"ghost"
|
|
43
|
+
],
|
|
44
|
+
"size": [
|
|
45
|
+
"large",
|
|
46
|
+
"medium"
|
|
47
|
+
]
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const checkmarkVariantKeys = Object.keys(checkmarkVariantMap);
|
|
51
|
+
|
|
52
|
+
export function checkmark(props) {
|
|
53
|
+
return Object.fromEntries(
|
|
54
|
+
checkmarkSlotNames.map(([slot, className]) => {
|
|
55
|
+
return [
|
|
56
|
+
slot,
|
|
57
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
58
|
+
];
|
|
59
|
+
}),
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
Object.assign(checkmark, { splitVariantProps: (props) => splitVariantProps(props, checkmarkVariantMap) });
|
|
64
|
+
|
|
65
|
+
// @recipe(seed): checkmark
|
package/recipes/chip-tabs.css
CHANGED
|
@@ -46,18 +46,31 @@
|
|
|
46
46
|
white-space: nowrap;
|
|
47
47
|
font-family: inherit;
|
|
48
48
|
border-radius: var(--seed-radius-full);
|
|
49
|
-
padding: var(--seed-dimension-x2)
|
|
49
|
+
padding-top: var(--seed-dimension-x2);
|
|
50
|
+
padding-bottom: var(--seed-dimension-x2);
|
|
51
|
+
font-weight: var(--seed-font-weight-medium);
|
|
52
|
+
}
|
|
53
|
+
.seed-chip-tabs__list--size_medium {
|
|
54
|
+
gap: 8px;
|
|
55
|
+
}
|
|
56
|
+
.seed-chip-tabs__trigger--size_medium {
|
|
50
57
|
min-height: 36px;
|
|
51
58
|
font-size: var(--seed-font-size-t4);
|
|
52
|
-
|
|
59
|
+
padding-left: var(--seed-dimension-x3_5);
|
|
60
|
+
padding-right: var(--seed-dimension-x3_5);
|
|
53
61
|
}
|
|
54
|
-
.seed-chip-tabs__list--
|
|
55
|
-
gap:
|
|
62
|
+
.seed-chip-tabs__list--size_large {
|
|
63
|
+
gap: 8px;
|
|
64
|
+
}
|
|
65
|
+
.seed-chip-tabs__trigger--size_large {
|
|
66
|
+
min-height: 40px;
|
|
67
|
+
font-size: var(--seed-font-size-t4);
|
|
68
|
+
padding-left: var(--seed-dimension-x4);
|
|
69
|
+
padding-right: var(--seed-dimension-x4);
|
|
56
70
|
}
|
|
57
71
|
.seed-chip-tabs__trigger--variant_neutralSolid {
|
|
58
|
-
background-color:
|
|
72
|
+
background-color: var(--seed-color-bg-neutral-weak);
|
|
59
73
|
color: var(--seed-color-fg-neutral);
|
|
60
|
-
font-weight: var(--seed-font-weight-bold);
|
|
61
74
|
}
|
|
62
75
|
.seed-chip-tabs__trigger--variant_neutralSolid:is(:selected, [data-selected]) {
|
|
63
76
|
background-color: var(--seed-color-bg-neutral-inverted);
|
|
@@ -77,18 +90,37 @@
|
|
|
77
90
|
background-color: var(--seed-color-bg-disabled);
|
|
78
91
|
color: var(--seed-color-fg-disabled);
|
|
79
92
|
}
|
|
80
|
-
.seed-chip-
|
|
81
|
-
|
|
93
|
+
.seed-chip-tabs__trigger--variant_neutralOutline {
|
|
94
|
+
background-color: transparent;
|
|
95
|
+
border: 1px solid var(--seed-color-stroke-neutral-muted);
|
|
96
|
+
color: var(--seed-color-fg-neutral);
|
|
97
|
+
}
|
|
98
|
+
.seed-chip-tabs__trigger--variant_neutralOutline:is(:selected, [data-selected]) {
|
|
99
|
+
background-color: var(--seed-color-bg-neutral-inverted);
|
|
100
|
+
border-color: transparent;
|
|
101
|
+
color: var(--seed-color-fg-neutral-inverted);
|
|
102
|
+
}
|
|
103
|
+
.seed-chip-tabs__trigger--variant_neutralOutline:is(:active, [data-active]) {
|
|
104
|
+
background-color: var(--seed-color-bg-layer-default-pressed);
|
|
105
|
+
}
|
|
106
|
+
.seed-chip-tabs__trigger--variant_neutralOutline:is(:selected, [data-selected]):is(:active, [data-active]) {
|
|
107
|
+
background-color: var(--seed-color-bg-neutral-inverted-pressed);
|
|
108
|
+
}
|
|
109
|
+
.seed-chip-tabs__trigger--variant_neutralOutline:is(:disabled, [disabled], [data-disabled]) {
|
|
110
|
+
cursor: not-allowed;
|
|
111
|
+
color: var(--seed-color-fg-disabled);
|
|
112
|
+
}
|
|
113
|
+
.seed-chip-tabs__trigger--variant_neutralOutline:is(:disabled, [disabled], [data-disabled]):is(:selected, [data-selected]) {
|
|
114
|
+
background-color: var(--seed-color-bg-disabled);
|
|
115
|
+
color: var(--seed-color-fg-disabled);
|
|
82
116
|
}
|
|
83
117
|
.seed-chip-tabs__trigger--variant_brandSolid {
|
|
84
118
|
background-color: var(--seed-color-bg-neutral-weak);
|
|
85
119
|
color: var(--seed-color-fg-neutral-muted);
|
|
86
|
-
font-weight: var(--seed-font-weight-medium);
|
|
87
120
|
}
|
|
88
121
|
.seed-chip-tabs__trigger--variant_brandSolid:is(:selected, [data-selected]) {
|
|
89
122
|
background-color: var(--seed-color-bg-brand-solid);
|
|
90
123
|
color: var(--seed-color-palette-static-white);
|
|
91
|
-
font-weight: var(--seed-font-weight-bold);
|
|
92
124
|
}
|
|
93
125
|
.seed-chip-tabs__trigger--variant_brandSolid:is(:active, [data-active]) {
|
|
94
126
|
background-color: var(--seed-color-bg-neutral-weak-pressed);
|