@seed-design/lynx-css 0.9.3 → 0.10.0
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 +872 -89
- package/all.min.css +1 -1
- package/base.css +2 -0
- package/base.min.css +1 -1
- package/package.json +1 -1
- package/recipes/manner-temp-badge.css +78 -0
- package/recipes/manner-temp-badge.d.ts +24 -0
- package/recipes/manner-temp-badge.mjs +51 -0
- package/recipes/manner-temp.css +52 -0
- package/recipes/manner-temp.d.ts +24 -0
- package/recipes/manner-temp.mjs +55 -0
- package/recipes/notification-badge-positioner.css +29 -0
- package/recipes/notification-badge-positioner.d.ts +26 -0
- package/recipes/notification-badge-positioner.mjs +51 -0
- package/recipes/notification-badge.css +33 -0
- package/recipes/notification-badge.d.ts +27 -0
- package/recipes/notification-badge.mjs +43 -0
- package/recipes/page-banner.css +357 -0
- package/recipes/page-banner.d.ts +36 -0
- package/recipes/page-banner.mjs +194 -0
- package/recipes/segmented-control.css +91 -0
- package/recipes/segmented-control.d.ts +36 -0
- package/recipes/segmented-control.mjs +75 -0
- package/recipes/select-box-checkmark.css +33 -0
- package/recipes/select-box-checkmark.d.ts +32 -0
- package/recipes/select-box-checkmark.mjs +63 -0
- package/recipes/select-box-group.css +10 -0
- package/recipes/select-box-group.d.ts +22 -0
- package/recipes/select-box-group.mjs +29 -0
- package/recipes/select-box.css +145 -0
- package/recipes/select-box.d.ts +40 -0
- package/recipes/select-box.mjs +108 -0
- package/vars/component/callout.d.ts +6 -2
- package/vars/component/callout.mjs +6 -2
- package/vars/component/image-frame-reaction-button.d.ts +26 -2
- package/vars/component/image-frame-reaction-button.mjs +26 -2
- package/vars/component/page-banner.d.ts +6 -2
- package/vars/component/page-banner.mjs +6 -2
- package/vars/component/scroll-fog.d.ts +69 -2
- package/vars/component/scroll-fog.mjs +69 -2
- package/vars/component/skeleton.d.ts +6 -2
- package/vars/component/skeleton.mjs +6 -2
- package/vars/component/top-navigation.d.ts +13 -1
- package/vars/component/top-navigation.mjs +13 -1
- package/vars/gradient.d.ts +2 -0
- package/vars/gradient.mjs +1 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
declare interface SegmentedControlVariant {
|
|
2
|
+
/**
|
|
3
|
+
* @default false
|
|
4
|
+
*/
|
|
5
|
+
selected: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* @default false
|
|
8
|
+
*/
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
pressed: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* @default true
|
|
16
|
+
*/
|
|
17
|
+
hasSelection: boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare type SegmentedControlVariantMap = {
|
|
21
|
+
[key in keyof SegmentedControlVariant]: Array<SegmentedControlVariant[key]>;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export declare type SegmentedControlVariantProps = Partial<SegmentedControlVariant>;
|
|
25
|
+
|
|
26
|
+
export declare type SegmentedControlSlotName = "root" | "indicator" | "item" | "itemBackground" | "label";
|
|
27
|
+
|
|
28
|
+
export declare const segmentedControlVariantMap: SegmentedControlVariantMap;
|
|
29
|
+
|
|
30
|
+
export declare const segmentedControl: ((
|
|
31
|
+
props?: SegmentedControlVariantProps,
|
|
32
|
+
) => Record<SegmentedControlSlotName, string>) & {
|
|
33
|
+
splitVariantProps: <T extends SegmentedControlVariantProps>(
|
|
34
|
+
props: T,
|
|
35
|
+
) => [SegmentedControlVariantProps, Omit<T, keyof SegmentedControlVariantProps>];
|
|
36
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import './segmented-control.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const segmentedControlSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-segmented-control__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"indicator",
|
|
11
|
+
"seed-segmented-control__indicator"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"item",
|
|
15
|
+
"seed-segmented-control__item"
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"itemBackground",
|
|
19
|
+
"seed-segmented-control__itemBackground"
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
"label",
|
|
23
|
+
"seed-segmented-control__label"
|
|
24
|
+
]
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
const defaultVariant = {
|
|
28
|
+
"selected": false,
|
|
29
|
+
"disabled": false,
|
|
30
|
+
"pressed": false,
|
|
31
|
+
"hasSelection": true
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const compoundVariants = [
|
|
35
|
+
{
|
|
36
|
+
"selected": true,
|
|
37
|
+
"disabled": true
|
|
38
|
+
}
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
export const segmentedControlVariantMap = {
|
|
42
|
+
"selected": [
|
|
43
|
+
true,
|
|
44
|
+
false
|
|
45
|
+
],
|
|
46
|
+
"disabled": [
|
|
47
|
+
true,
|
|
48
|
+
false
|
|
49
|
+
],
|
|
50
|
+
"pressed": [
|
|
51
|
+
true,
|
|
52
|
+
false
|
|
53
|
+
],
|
|
54
|
+
"hasSelection": [
|
|
55
|
+
true,
|
|
56
|
+
false
|
|
57
|
+
]
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const segmentedControlVariantKeys = Object.keys(segmentedControlVariantMap);
|
|
61
|
+
|
|
62
|
+
export function segmentedControl(props) {
|
|
63
|
+
return Object.fromEntries(
|
|
64
|
+
segmentedControlSlotNames.map(([slot, className]) => {
|
|
65
|
+
return [
|
|
66
|
+
slot,
|
|
67
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
68
|
+
];
|
|
69
|
+
}),
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
Object.assign(segmentedControl, { splitVariantProps: (props) => splitVariantProps(props, segmentedControlVariantMap) });
|
|
74
|
+
|
|
75
|
+
// @recipe(seed): segmented-control
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.seed-select-box-checkmark__root {
|
|
2
|
+
position: relative;
|
|
3
|
+
flex-shrink: 0;
|
|
4
|
+
width: var(--seed-dimension-x5);
|
|
5
|
+
height: var(--seed-dimension-x5)
|
|
6
|
+
}
|
|
7
|
+
.seed-select-box-checkmark__icon {
|
|
8
|
+
display: flex;
|
|
9
|
+
position: absolute;
|
|
10
|
+
top: 0;
|
|
11
|
+
right: 0;
|
|
12
|
+
bottom: 0;
|
|
13
|
+
left: 0;
|
|
14
|
+
width: 15px;
|
|
15
|
+
height: 15px;
|
|
16
|
+
margin: auto;
|
|
17
|
+
color: var(--seed-color-fg-placeholder)
|
|
18
|
+
}
|
|
19
|
+
.seed-select-box-checkmark__icon--selected_true {
|
|
20
|
+
color: var(--seed-color-fg-neutral)
|
|
21
|
+
}
|
|
22
|
+
.seed-select-box-checkmark__icon--pressed_true {
|
|
23
|
+
color: var(--seed-color-fg-neutral-subtle)
|
|
24
|
+
}
|
|
25
|
+
.seed-select-box-checkmark__icon--disabled_true {
|
|
26
|
+
color: var(--seed-color-fg-disabled)
|
|
27
|
+
}
|
|
28
|
+
.seed-select-box-checkmark__icon--selected_true-pressed_true-disabled_false {
|
|
29
|
+
color: var(--seed-color-fg-neutral)
|
|
30
|
+
}
|
|
31
|
+
.seed-select-box-checkmark__icon--selected_true-disabled_true {
|
|
32
|
+
color: var(--seed-color-fg-disabled)
|
|
33
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
declare interface SelectBoxCheckmarkVariant {
|
|
2
|
+
/**
|
|
3
|
+
* @default false
|
|
4
|
+
*/
|
|
5
|
+
selected: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* @default false
|
|
8
|
+
*/
|
|
9
|
+
pressed: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare type SelectBoxCheckmarkVariantMap = {
|
|
17
|
+
[key in keyof SelectBoxCheckmarkVariant]: Array<SelectBoxCheckmarkVariant[key]>;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export declare type SelectBoxCheckmarkVariantProps = Partial<SelectBoxCheckmarkVariant>;
|
|
21
|
+
|
|
22
|
+
export declare type SelectBoxCheckmarkSlotName = "root" | "icon";
|
|
23
|
+
|
|
24
|
+
export declare const selectBoxCheckmarkVariantMap: SelectBoxCheckmarkVariantMap;
|
|
25
|
+
|
|
26
|
+
export declare const selectBoxCheckmark: ((
|
|
27
|
+
props?: SelectBoxCheckmarkVariantProps,
|
|
28
|
+
) => Record<SelectBoxCheckmarkSlotName, string>) & {
|
|
29
|
+
splitVariantProps: <T extends SelectBoxCheckmarkVariantProps>(
|
|
30
|
+
props: T,
|
|
31
|
+
) => [SelectBoxCheckmarkVariantProps, Omit<T, keyof SelectBoxCheckmarkVariantProps>];
|
|
32
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import './select-box-checkmark.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const selectBoxCheckmarkSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-select-box-checkmark__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"icon",
|
|
11
|
+
"seed-select-box-checkmark__icon"
|
|
12
|
+
]
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
const defaultVariant = {
|
|
16
|
+
"selected": false,
|
|
17
|
+
"pressed": false,
|
|
18
|
+
"disabled": false
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const compoundVariants = [
|
|
22
|
+
{
|
|
23
|
+
"selected": true,
|
|
24
|
+
"pressed": true,
|
|
25
|
+
"disabled": false
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"selected": true,
|
|
29
|
+
"disabled": true
|
|
30
|
+
}
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
export const selectBoxCheckmarkVariantMap = {
|
|
34
|
+
"selected": [
|
|
35
|
+
true,
|
|
36
|
+
false
|
|
37
|
+
],
|
|
38
|
+
"pressed": [
|
|
39
|
+
true,
|
|
40
|
+
false
|
|
41
|
+
],
|
|
42
|
+
"disabled": [
|
|
43
|
+
true,
|
|
44
|
+
false
|
|
45
|
+
]
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const selectBoxCheckmarkVariantKeys = Object.keys(selectBoxCheckmarkVariantMap);
|
|
49
|
+
|
|
50
|
+
export function selectBoxCheckmark(props) {
|
|
51
|
+
return Object.fromEntries(
|
|
52
|
+
selectBoxCheckmarkSlotNames.map(([slot, className]) => {
|
|
53
|
+
return [
|
|
54
|
+
slot,
|
|
55
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
56
|
+
];
|
|
57
|
+
}),
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
Object.assign(selectBoxCheckmark, { splitVariantProps: (props) => splitVariantProps(props, selectBoxCheckmarkVariantMap) });
|
|
62
|
+
|
|
63
|
+
// @recipe(seed): select-box-checkmark
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
.seed-select-box-group {
|
|
2
|
+
display: grid;
|
|
3
|
+
width: 100%;
|
|
4
|
+
row-gap: var(--seed-dimension-spacing-y-component-default);
|
|
5
|
+
column-gap: var(--seed-dimension-x3)
|
|
6
|
+
}
|
|
7
|
+
.seed-select-box-group--multiColumn_true {
|
|
8
|
+
grid-auto-rows: 1fr
|
|
9
|
+
}
|
|
10
|
+
.seed-select-box-group--multiColumn_false {}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare interface SelectBoxGroupVariant {
|
|
2
|
+
/**
|
|
3
|
+
* @default false
|
|
4
|
+
*/
|
|
5
|
+
multiColumn: boolean;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare type SelectBoxGroupVariantMap = {
|
|
9
|
+
[key in keyof SelectBoxGroupVariant]: Array<SelectBoxGroupVariant[key]>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export declare type SelectBoxGroupVariantProps = Partial<SelectBoxGroupVariant>;
|
|
13
|
+
|
|
14
|
+
export declare const selectBoxGroupVariantMap: SelectBoxGroupVariantMap;
|
|
15
|
+
|
|
16
|
+
export declare const selectBoxGroup: ((
|
|
17
|
+
props?: SelectBoxGroupVariantProps,
|
|
18
|
+
) => string) & {
|
|
19
|
+
splitVariantProps: <T extends SelectBoxGroupVariantProps>(
|
|
20
|
+
props: T,
|
|
21
|
+
) => [SelectBoxGroupVariantProps, Omit<T, keyof SelectBoxGroupVariantProps>];
|
|
22
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import './select-box-group.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const defaultVariant = {
|
|
5
|
+
"multiColumn": false
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const compoundVariants = [];
|
|
9
|
+
|
|
10
|
+
export const selectBoxGroupVariantMap = {
|
|
11
|
+
"multiColumn": [
|
|
12
|
+
true,
|
|
13
|
+
false
|
|
14
|
+
]
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const selectBoxGroupVariantKeys = Object.keys(selectBoxGroupVariantMap);
|
|
18
|
+
|
|
19
|
+
export function selectBoxGroup(props) {
|
|
20
|
+
return createClassName(
|
|
21
|
+
"seed-select-box-group",
|
|
22
|
+
mergeVariants(defaultVariant, props),
|
|
23
|
+
compoundVariants,
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
Object.assign(selectBoxGroup, { splitVariantProps: (props) => splitVariantProps(props, selectBoxGroupVariantMap) });
|
|
28
|
+
|
|
29
|
+
// @recipe(seed): select-box-group
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
.seed-select-box__interactionRoot {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
align-items: stretch;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
min-height: 0;
|
|
8
|
+
gap: 0
|
|
9
|
+
}
|
|
10
|
+
.seed-select-box__root {
|
|
11
|
+
position: relative;
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
align-items: stretch;
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
border-radius: var(--seed-radius-r3);
|
|
18
|
+
background-color: var(--seed-color-bg-transparent);
|
|
19
|
+
box-shadow: inset 0 0 0 1px var(--seed-color-stroke-neutral-weak);
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
transition: background-color var(--seed-duration-color-transition) var(--seed-timing-function-easing)
|
|
22
|
+
}
|
|
23
|
+
.seed-select-box__selectedStroke {
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: 0;
|
|
26
|
+
right: 0;
|
|
27
|
+
bottom: 0;
|
|
28
|
+
left: 0;
|
|
29
|
+
border-style: solid;
|
|
30
|
+
border-width: 2px;
|
|
31
|
+
border-color: transparent;
|
|
32
|
+
border-radius: var(--seed-radius-r3);
|
|
33
|
+
transition: border-color 0.1s var(--seed-timing-function-easing)
|
|
34
|
+
}
|
|
35
|
+
.seed-select-box__trigger {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: row;
|
|
38
|
+
justify-content: space-between;
|
|
39
|
+
width: 100%;
|
|
40
|
+
gap: var(--seed-dimension-x1_5);
|
|
41
|
+
flex-grow: 1
|
|
42
|
+
}
|
|
43
|
+
.seed-select-box__content {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: row;
|
|
46
|
+
min-width: 0
|
|
47
|
+
}
|
|
48
|
+
.seed-select-box__prefixIcon {
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: row;
|
|
51
|
+
align-items: center;
|
|
52
|
+
flex-shrink: 0;
|
|
53
|
+
width: 22px;
|
|
54
|
+
height: 22px;
|
|
55
|
+
color: var(--seed-color-fg-neutral)
|
|
56
|
+
}
|
|
57
|
+
.seed-select-box__body {
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
min-width: 0;
|
|
61
|
+
gap: var(--seed-dimension-x0_5);
|
|
62
|
+
margin-right: auto
|
|
63
|
+
}
|
|
64
|
+
.seed-select-box__label {
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: row;
|
|
67
|
+
align-items: center;
|
|
68
|
+
justify-content: flex-start;
|
|
69
|
+
gap: var(--seed-dimension-x1);
|
|
70
|
+
color: var(--seed-color-fg-neutral);
|
|
71
|
+
font-size: var(--seed-font-size-t5);
|
|
72
|
+
line-height: var(--seed-line-height-t5);
|
|
73
|
+
font-weight: var(--seed-font-weight-medium)
|
|
74
|
+
}
|
|
75
|
+
.seed-select-box__description {
|
|
76
|
+
color: var(--seed-color-fg-neutral-muted);
|
|
77
|
+
font-size: var(--seed-font-size-t3);
|
|
78
|
+
line-height: var(--seed-line-height-t3);
|
|
79
|
+
font-weight: var(--seed-font-weight-regular)
|
|
80
|
+
}
|
|
81
|
+
.seed-select-box__footer {
|
|
82
|
+
display: flex;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
width: 100%;
|
|
85
|
+
height: 0;
|
|
86
|
+
opacity: 0;
|
|
87
|
+
overflow: hidden;
|
|
88
|
+
transition: height var(--seed-duration-d6) var(--seed-timing-function-easing), opacity 400ms var(--seed-timing-function-easing)
|
|
89
|
+
}
|
|
90
|
+
.seed-select-box__footerInner {
|
|
91
|
+
display: flex;
|
|
92
|
+
flex-direction: column;
|
|
93
|
+
flex-shrink: 0;
|
|
94
|
+
width: 100%;
|
|
95
|
+
height: max-content
|
|
96
|
+
}
|
|
97
|
+
.seed-select-box__trigger--layout_horizontal {
|
|
98
|
+
align-items: center;
|
|
99
|
+
padding-left: var(--seed-dimension-x5);
|
|
100
|
+
padding-right: var(--seed-dimension-x4);
|
|
101
|
+
padding-top: var(--seed-dimension-x4);
|
|
102
|
+
padding-bottom: var(--seed-dimension-x4)
|
|
103
|
+
}
|
|
104
|
+
.seed-select-box__content--layout_horizontal {
|
|
105
|
+
align-items: center;
|
|
106
|
+
gap: var(--seed-dimension-x3)
|
|
107
|
+
}
|
|
108
|
+
.seed-select-box__trigger--layout_vertical {
|
|
109
|
+
padding-left: var(--seed-dimension-x4);
|
|
110
|
+
padding-right: var(--seed-dimension-x4);
|
|
111
|
+
padding-top: var(--seed-dimension-x5);
|
|
112
|
+
padding-bottom: var(--seed-dimension-x5)
|
|
113
|
+
}
|
|
114
|
+
.seed-select-box__content--layout_vertical {
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
gap: var(--seed-dimension-x2_5)
|
|
117
|
+
}
|
|
118
|
+
.seed-select-box__selectedStroke--selected_true {
|
|
119
|
+
border-color: var(--seed-color-stroke-neutral-contrast)
|
|
120
|
+
}
|
|
121
|
+
.seed-select-box__root--pressed_true {
|
|
122
|
+
background-color: var(--seed-color-bg-transparent-pressed)
|
|
123
|
+
}
|
|
124
|
+
.seed-select-box__root--disabled_true {
|
|
125
|
+
box-shadow: inset 0 0 0 1px var(--seed-color-stroke-neutral-weak)
|
|
126
|
+
}
|
|
127
|
+
.seed-select-box__prefixIcon--disabled_true {
|
|
128
|
+
color: var(--seed-color-fg-disabled)
|
|
129
|
+
}
|
|
130
|
+
.seed-select-box__label--disabled_true {
|
|
131
|
+
color: var(--seed-color-fg-disabled)
|
|
132
|
+
}
|
|
133
|
+
.seed-select-box__description--disabled_true {
|
|
134
|
+
color: var(--seed-color-fg-disabled)
|
|
135
|
+
}
|
|
136
|
+
.seed-select-box__footer--footerOpen_true {
|
|
137
|
+
opacity: 1;
|
|
138
|
+
transition: height 400ms var(--seed-timing-function-easing), opacity var(--seed-duration-d6) var(--seed-timing-function-easing)
|
|
139
|
+
}
|
|
140
|
+
.seed-select-box__selectedStroke--selected_true-disabled_true {
|
|
141
|
+
border-color: var(--seed-color-stroke-neutral-weak)
|
|
142
|
+
}
|
|
143
|
+
.seed-select-box__root--pressed_true-disabled_true {
|
|
144
|
+
background-color: var(--seed-color-bg-transparent)
|
|
145
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
declare interface SelectBoxVariant {
|
|
2
|
+
/**
|
|
3
|
+
* @default "horizontal"
|
|
4
|
+
*/
|
|
5
|
+
layout: "horizontal" | "vertical";
|
|
6
|
+
/**
|
|
7
|
+
* @default false
|
|
8
|
+
*/
|
|
9
|
+
selected: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
pressed: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
footerOpen: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare type SelectBoxVariantMap = {
|
|
25
|
+
[key in keyof SelectBoxVariant]: Array<SelectBoxVariant[key]>;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export declare type SelectBoxVariantProps = Partial<SelectBoxVariant>;
|
|
29
|
+
|
|
30
|
+
export declare type SelectBoxSlotName = "interactionRoot" | "root" | "selectedStroke" | "trigger" | "content" | "prefixIcon" | "body" | "label" | "description" | "footer" | "footerInner";
|
|
31
|
+
|
|
32
|
+
export declare const selectBoxVariantMap: SelectBoxVariantMap;
|
|
33
|
+
|
|
34
|
+
export declare const selectBox: ((
|
|
35
|
+
props?: SelectBoxVariantProps,
|
|
36
|
+
) => Record<SelectBoxSlotName, string>) & {
|
|
37
|
+
splitVariantProps: <T extends SelectBoxVariantProps>(
|
|
38
|
+
props: T,
|
|
39
|
+
) => [SelectBoxVariantProps, Omit<T, keyof SelectBoxVariantProps>];
|
|
40
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import './select-box.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const selectBoxSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"interactionRoot",
|
|
7
|
+
"seed-select-box__interactionRoot"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"root",
|
|
11
|
+
"seed-select-box__root"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"selectedStroke",
|
|
15
|
+
"seed-select-box__selectedStroke"
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"trigger",
|
|
19
|
+
"seed-select-box__trigger"
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
"content",
|
|
23
|
+
"seed-select-box__content"
|
|
24
|
+
],
|
|
25
|
+
[
|
|
26
|
+
"prefixIcon",
|
|
27
|
+
"seed-select-box__prefixIcon"
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
"body",
|
|
31
|
+
"seed-select-box__body"
|
|
32
|
+
],
|
|
33
|
+
[
|
|
34
|
+
"label",
|
|
35
|
+
"seed-select-box__label"
|
|
36
|
+
],
|
|
37
|
+
[
|
|
38
|
+
"description",
|
|
39
|
+
"seed-select-box__description"
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
"footer",
|
|
43
|
+
"seed-select-box__footer"
|
|
44
|
+
],
|
|
45
|
+
[
|
|
46
|
+
"footerInner",
|
|
47
|
+
"seed-select-box__footerInner"
|
|
48
|
+
]
|
|
49
|
+
];
|
|
50
|
+
|
|
51
|
+
const defaultVariant = {
|
|
52
|
+
"layout": "horizontal",
|
|
53
|
+
"selected": false,
|
|
54
|
+
"pressed": false,
|
|
55
|
+
"disabled": false,
|
|
56
|
+
"footerOpen": false
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const compoundVariants = [
|
|
60
|
+
{
|
|
61
|
+
"selected": true,
|
|
62
|
+
"disabled": true
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"pressed": true,
|
|
66
|
+
"disabled": true
|
|
67
|
+
}
|
|
68
|
+
];
|
|
69
|
+
|
|
70
|
+
export const selectBoxVariantMap = {
|
|
71
|
+
"layout": [
|
|
72
|
+
"horizontal",
|
|
73
|
+
"vertical"
|
|
74
|
+
],
|
|
75
|
+
"selected": [
|
|
76
|
+
true,
|
|
77
|
+
false
|
|
78
|
+
],
|
|
79
|
+
"pressed": [
|
|
80
|
+
true,
|
|
81
|
+
false
|
|
82
|
+
],
|
|
83
|
+
"disabled": [
|
|
84
|
+
true,
|
|
85
|
+
false
|
|
86
|
+
],
|
|
87
|
+
"footerOpen": [
|
|
88
|
+
true,
|
|
89
|
+
false
|
|
90
|
+
]
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export const selectBoxVariantKeys = Object.keys(selectBoxVariantMap);
|
|
94
|
+
|
|
95
|
+
export function selectBox(props) {
|
|
96
|
+
return Object.fromEntries(
|
|
97
|
+
selectBoxSlotNames.map(([slot, className]) => {
|
|
98
|
+
return [
|
|
99
|
+
slot,
|
|
100
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
101
|
+
];
|
|
102
|
+
}),
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
Object.assign(selectBox, { splitVariantProps: (props) => splitVariantProps(props, selectBoxVariantMap) });
|
|
107
|
+
|
|
108
|
+
// @recipe(seed): select-box
|
|
@@ -199,7 +199,9 @@ export declare const vars: {
|
|
|
199
199
|
"toneMagic": {
|
|
200
200
|
"enabled": {
|
|
201
201
|
"root": {
|
|
202
|
-
"gradient":
|
|
202
|
+
"gradient": {
|
|
203
|
+
"serialized": "var(--seed-gradient-glow-magic)"
|
|
204
|
+
}
|
|
203
205
|
},
|
|
204
206
|
/** 아이콘은 Fill 타입 사용을 권장합니다. */
|
|
205
207
|
"prefixIcon": {
|
|
@@ -221,7 +223,9 @@ export declare const vars: {
|
|
|
221
223
|
},
|
|
222
224
|
"pressed": {
|
|
223
225
|
"root": {
|
|
224
|
-
"gradient":
|
|
226
|
+
"gradient": {
|
|
227
|
+
"serialized": "var(--seed-gradient-glow-magic-pressed)"
|
|
228
|
+
}
|
|
225
229
|
}
|
|
226
230
|
}
|
|
227
231
|
}
|
|
@@ -169,7 +169,9 @@ export const vars = {
|
|
|
169
169
|
"toneMagic": {
|
|
170
170
|
"enabled": {
|
|
171
171
|
"root": {
|
|
172
|
-
"gradient":
|
|
172
|
+
"gradient": {
|
|
173
|
+
"serialized": "var(--seed-gradient-glow-magic)"
|
|
174
|
+
}
|
|
173
175
|
},
|
|
174
176
|
"prefixIcon": {
|
|
175
177
|
"color": "var(--seed-color-fg-neutral)"
|
|
@@ -189,7 +191,9 @@ export const vars = {
|
|
|
189
191
|
},
|
|
190
192
|
"pressed": {
|
|
191
193
|
"root": {
|
|
192
|
-
"gradient":
|
|
194
|
+
"gradient": {
|
|
195
|
+
"serialized": "var(--seed-gradient-glow-magic-pressed)"
|
|
196
|
+
}
|
|
193
197
|
}
|
|
194
198
|
}
|
|
195
199
|
}
|
|
@@ -10,7 +10,19 @@ export declare const vars: {
|
|
|
10
10
|
},
|
|
11
11
|
/** lineIcon 아래에 내려가는 하트 아이콘입니다. */
|
|
12
12
|
"fillIcon": {
|
|
13
|
-
"gradient":
|
|
13
|
+
"gradient": {
|
|
14
|
+
"serialized": "var(--seed-color-palette-static-black-alpha-600) 0%, var(--seed-color-palette-static-black-alpha-600) 100%",
|
|
15
|
+
"stops": [
|
|
16
|
+
{
|
|
17
|
+
"color": "var(--seed-color-palette-static-black-alpha-600)",
|
|
18
|
+
"position": 0
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"color": "var(--seed-color-palette-static-black-alpha-600)",
|
|
22
|
+
"position": 1
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
14
26
|
/** 보이는 버튼 크기입니다. */
|
|
15
27
|
"size": "var(--seed-dimension-x6)",
|
|
16
28
|
"shadow": "0px 2px 4px 0px #00000026"
|
|
@@ -25,7 +37,19 @@ export declare const vars: {
|
|
|
25
37
|
"selected": {
|
|
26
38
|
/** lineIcon 아래에 내려가는 하트 아이콘입니다. */
|
|
27
39
|
"fillIcon": {
|
|
28
|
-
"gradient":
|
|
40
|
+
"gradient": {
|
|
41
|
+
"serialized": "#FF9A56 0%, #FF6600 100%",
|
|
42
|
+
"stops": [
|
|
43
|
+
{
|
|
44
|
+
"color": "#FF9A56",
|
|
45
|
+
"position": 0
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"color": "#FF6600",
|
|
49
|
+
"position": 1
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
29
53
|
},
|
|
30
54
|
/** fillIcon 위로 올라가는 하트 아이콘입니다. */
|
|
31
55
|
"lineIcon": {
|