@seed-design/css 1.1.17 → 1.2.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 +516 -111
- package/all.min.css +1 -1
- package/base.css +23 -0
- package/base.min.css +1 -1
- package/package.json +1 -1
- package/recipes/aspect-ratio.css +26 -0
- package/recipes/aspect-ratio.d.ts +19 -0
- package/recipes/aspect-ratio.mjs +22 -0
- package/recipes/bottom-sheet.css +2 -0
- package/recipes/checkbox-group.css +5 -0
- package/recipes/checkbox-group.d.ts +19 -0
- package/recipes/checkbox-group.mjs +22 -0
- package/recipes/checkmark.css +1 -1
- package/recipes/help-bubble.css +12 -9
- package/recipes/help-bubble.d.ts +1 -1
- package/recipes/help-bubble.mjs +4 -0
- package/recipes/image-frame-icon.css +6 -0
- package/recipes/image-frame-icon.d.ts +19 -0
- package/recipes/image-frame-icon.mjs +22 -0
- package/recipes/image-frame-indicator.css +16 -0
- package/recipes/image-frame-indicator.d.ts +19 -0
- package/recipes/image-frame-indicator.mjs +22 -0
- package/recipes/image-frame-reaction-button.css +29 -0
- package/recipes/image-frame-reaction-button.d.ts +19 -0
- package/recipes/image-frame-reaction-button.mjs +22 -0
- package/recipes/image-frame.css +26 -0
- package/recipes/image-frame.d.ts +26 -0
- package/recipes/image-frame.mjs +34 -0
- package/recipes/input-button.css +18 -3
- package/recipes/menu-sheet-item.css +34 -14
- package/recipes/menu-sheet-item.d.ts +3 -1
- package/recipes/menu-sheet-item.mjs +26 -4
- package/recipes/menu-sheet.css +9 -1
- package/recipes/menu-sheet.d.ts +1 -1
- package/recipes/menu-sheet.mjs +4 -0
- package/recipes/radio-group.css +5 -0
- package/recipes/radio-group.d.ts +19 -0
- package/recipes/radio-group.mjs +22 -0
- package/recipes/radiomark.css +0 -1
- package/recipes/select-box-group.css +8 -3
- package/recipes/select-box.css +88 -18
- package/recipes/select-box.d.ts +5 -2
- package/recipes/select-box.mjs +21 -2
- package/recipes/selectBoxCheckmark.css +31 -0
- package/recipes/selectBoxCheckmark.d.ts +21 -0
- package/recipes/selectBoxCheckmark.mjs +36 -0
- package/recipes/switch.css +3 -3
- package/recipes/{switch-mark.css → switchmark.css} +19 -19
- package/recipes/switchmark.d.ts +28 -0
- package/recipes/{switch-mark.mjs → switchmark.mjs} +10 -10
- package/recipes/tag-group-item.css +60 -31
- package/recipes/tag-group-item.d.ts +3 -1
- package/recipes/tag-group-item.mjs +18 -4
- package/recipes/tag-group.css +29 -5
- package/recipes/tag-group.d.ts +4 -0
- package/recipes/tag-group.mjs +20 -2
- package/recipes/text-input.css +39 -13
- package/vars/component/checkbox-group.d.ts +9 -0
- package/vars/component/checkbox-group.mjs +9 -0
- package/vars/component/help-bubble.d.ts +7 -4
- package/vars/component/help-bubble.mjs +7 -4
- package/vars/component/image-frame-floater.d.ts +10 -0
- package/vars/component/image-frame-floater.mjs +9 -0
- package/vars/component/image-frame-indicator.d.ts +20 -0
- package/vars/component/image-frame-indicator.mjs +18 -0
- package/vars/component/image-frame-reaction-button.d.ts +30 -0
- package/vars/component/image-frame-reaction-button.mjs +21 -0
- package/vars/component/image-frame.d.ts +48 -0
- package/vars/component/image-frame.mjs +31 -0
- package/vars/component/index.d.ts +9 -1
- package/vars/component/index.mjs +9 -1
- package/vars/component/input-button.d.ts +3 -4
- package/vars/component/input-button.mjs +2 -4
- package/vars/component/radio-group.d.ts +9 -0
- package/vars/component/radio-group.mjs +9 -0
- package/vars/component/select-box-checkmark.d.ts +40 -0
- package/vars/component/select-box-checkmark.mjs +40 -0
- package/vars/component/select-box-group.d.ts +10 -0
- package/vars/component/select-box-group.mjs +10 -0
- package/vars/component/select-box.d.ts +80 -21
- package/vars/component/select-box.mjs +75 -21
- package/vars/component/text-input.d.ts +3 -4
- package/vars/component/text-input.mjs +2 -4
- package/recipes/switch-mark.d.ts +0 -28
- /package/vars/component/{switch-mark.d.ts → switchmark.d.ts} +0 -0
- /package/vars/component/{switch-mark.mjs → switchmark.mjs} +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.seed-image-frame {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
.seed-image-frame > img, .seed-image-frame > video {
|
|
5
|
+
object-fit: cover;
|
|
6
|
+
}
|
|
7
|
+
.seed-image-frame--rounded_true {
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
border-radius: var(--seed-radius-r2);
|
|
10
|
+
}
|
|
11
|
+
.seed-image-frame--rounded_true > img, .seed-image-frame--rounded_true > video {
|
|
12
|
+
border-radius: var(--seed-radius-r2);
|
|
13
|
+
}
|
|
14
|
+
.seed-image-frame--rounded_false {}
|
|
15
|
+
.seed-image-frame--stroke_true::after {
|
|
16
|
+
content: '';
|
|
17
|
+
position: absolute;
|
|
18
|
+
top: 0;
|
|
19
|
+
left: 0;
|
|
20
|
+
right: 0;
|
|
21
|
+
bottom: 0;
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
border-radius: inherit;
|
|
24
|
+
box-shadow: inset 0 0 0 1px var(--seed-color-stroke-neutral-subtle);
|
|
25
|
+
}
|
|
26
|
+
.seed-image-frame--stroke_false {}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
declare interface ImageFrameVariant {
|
|
2
|
+
/**
|
|
3
|
+
* @default false
|
|
4
|
+
*/
|
|
5
|
+
rounded: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* @default false
|
|
8
|
+
*/
|
|
9
|
+
stroke: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare type ImageFrameVariantMap = {
|
|
13
|
+
[key in keyof ImageFrameVariant]: Array<ImageFrameVariant[key]>;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export declare type ImageFrameVariantProps = Partial<ImageFrameVariant>;
|
|
17
|
+
|
|
18
|
+
export declare const imageFrameVariantMap: ImageFrameVariantMap;
|
|
19
|
+
|
|
20
|
+
export declare const imageFrame: ((
|
|
21
|
+
props?: ImageFrameVariantProps,
|
|
22
|
+
) => string) & {
|
|
23
|
+
splitVariantProps: <T extends ImageFrameVariantProps>(
|
|
24
|
+
props: T,
|
|
25
|
+
) => [ImageFrameVariantProps, Omit<T, keyof ImageFrameVariantProps>];
|
|
26
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import './image-frame.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const defaultVariant = {
|
|
5
|
+
"rounded": false,
|
|
6
|
+
"stroke": false
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const compoundVariants = [];
|
|
10
|
+
|
|
11
|
+
export const imageFrameVariantMap = {
|
|
12
|
+
"rounded": [
|
|
13
|
+
true,
|
|
14
|
+
false
|
|
15
|
+
],
|
|
16
|
+
"stroke": [
|
|
17
|
+
true,
|
|
18
|
+
false
|
|
19
|
+
]
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const imageFrameVariantKeys = Object.keys(imageFrameVariantMap);
|
|
23
|
+
|
|
24
|
+
export function imageFrame(props) {
|
|
25
|
+
return createClassName(
|
|
26
|
+
"seed-image-frame",
|
|
27
|
+
mergeVariants(defaultVariant, props),
|
|
28
|
+
compoundVariants,
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
Object.assign(imageFrame, { splitVariantProps: (props) => splitVariantProps(props, imageFrameVariantMap) });
|
|
33
|
+
|
|
34
|
+
// @recipe(seed): image-frame
|
package/recipes/input-button.css
CHANGED
|
@@ -23,7 +23,21 @@
|
|
|
23
23
|
border-radius: var(--seed-radius-r3);
|
|
24
24
|
background-color: var(--seed-color-bg-transparent);
|
|
25
25
|
box-shadow: inset 0 0 0 1px var(--seed-color-stroke-neutral-weak);
|
|
26
|
-
transition:
|
|
26
|
+
transition: background-color var(--seed-duration-color-transition) var(--seed-timing-function-easing);
|
|
27
|
+
}
|
|
28
|
+
.seed-input-button__button::after {
|
|
29
|
+
content: "";
|
|
30
|
+
position: absolute;
|
|
31
|
+
top: 0;
|
|
32
|
+
right: 0;
|
|
33
|
+
bottom: 0;
|
|
34
|
+
left: 0;
|
|
35
|
+
border-radius: inherit;
|
|
36
|
+
border-style: solid;
|
|
37
|
+
border-color: transparent;
|
|
38
|
+
border-width: 2px;
|
|
39
|
+
transition: border-color 0.1s var(--seed-timing-function-easing);
|
|
40
|
+
pointer-events: none;
|
|
27
41
|
}
|
|
28
42
|
.seed-input-button__button[data-disabled] {
|
|
29
43
|
cursor: not-allowed;
|
|
@@ -39,8 +53,9 @@
|
|
|
39
53
|
.seed-input-button__button:is(:focus, [data-focus]) {
|
|
40
54
|
outline: none;
|
|
41
55
|
}
|
|
42
|
-
.seed-input-button__button:is(:invalid, [data-invalid]) {
|
|
43
|
-
|
|
56
|
+
.seed-input-button__button:is(:invalid, [data-invalid])::after {
|
|
57
|
+
border-width: 2px;
|
|
58
|
+
border-color: var(--seed-color-stroke-critical-solid);
|
|
44
59
|
}
|
|
45
60
|
.seed-input-button__value {
|
|
46
61
|
font-size: var(--seed-font-size-t5);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.seed-menu-sheet-
|
|
1
|
+
.seed-menu-sheet-item__root {
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
background-color: var(--seed-color-bg-neutral-weak);
|
|
@@ -10,33 +10,53 @@
|
|
|
10
10
|
gap: var(--seed-dimension-x3_5);
|
|
11
11
|
box-shadow: inset 0 calc(-1 * 1px) 0 var(--seed-color-stroke-neutral-muted);
|
|
12
12
|
margin: 0;
|
|
13
|
-
font-size: var(--seed-font-size-t5);
|
|
14
|
-
line-height: var(--seed-line-height-t5);
|
|
15
|
-
font-weight: var(--seed-font-weight-regular);
|
|
16
13
|
border: none;
|
|
17
14
|
font-family: inherit;
|
|
18
15
|
outline: none;
|
|
19
16
|
}
|
|
20
|
-
.seed-menu-sheet-
|
|
17
|
+
.seed-menu-sheet-item__root:is(:active, [data-active]) {
|
|
21
18
|
background-color: var(--seed-color-bg-neutral-weak-pressed);
|
|
22
19
|
}
|
|
23
|
-
.seed-menu-sheet-
|
|
20
|
+
.seed-menu-sheet-item__root:last-child {
|
|
24
21
|
box-shadow: none;
|
|
25
22
|
}
|
|
26
|
-
.seed-menu-sheet-
|
|
23
|
+
.seed-menu-sheet-item__root {
|
|
27
24
|
--seed-prefix-icon-size: 22px;
|
|
28
25
|
}
|
|
29
|
-
.seed-menu-sheet-
|
|
30
|
-
|
|
26
|
+
.seed-menu-sheet-item__content {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
gap: var(--seed-dimension-x0_5);
|
|
30
|
+
}
|
|
31
|
+
.seed-menu-sheet-item__label {
|
|
32
|
+
font-size: var(--seed-font-size-t5);
|
|
33
|
+
line-height: var(--seed-line-height-t5);
|
|
34
|
+
font-weight: var(--seed-font-weight-regular);
|
|
35
|
+
}
|
|
36
|
+
.seed-menu-sheet-item__description {
|
|
37
|
+
font-size: var(--seed-font-size-t3);
|
|
38
|
+
line-height: var(--seed-line-height-t3);
|
|
39
|
+
font-weight: var(--seed-font-weight-medium);
|
|
40
|
+
color: var(--seed-color-fg-neutral-subtle);
|
|
41
|
+
}
|
|
42
|
+
.seed-menu-sheet-item__root--tone_neutral {
|
|
31
43
|
--seed-prefix-icon-color: var(--seed-color-fg-neutral);
|
|
32
44
|
}
|
|
33
|
-
.seed-menu-sheet-
|
|
34
|
-
color: var(--seed-color-fg-
|
|
45
|
+
.seed-menu-sheet-item__label--tone_neutral {
|
|
46
|
+
color: var(--seed-color-fg-neutral);
|
|
47
|
+
}
|
|
48
|
+
.seed-menu-sheet-item__root--tone_critical {
|
|
35
49
|
--seed-prefix-icon-color: var(--seed-color-fg-critical);
|
|
36
50
|
}
|
|
37
|
-
.seed-menu-sheet-
|
|
38
|
-
|
|
51
|
+
.seed-menu-sheet-item__label--tone_critical {
|
|
52
|
+
color: var(--seed-color-fg-critical);
|
|
53
|
+
}
|
|
54
|
+
.seed-menu-sheet-item__content--labelAlign_left {
|
|
55
|
+
text-align: start;
|
|
39
56
|
}
|
|
40
|
-
.seed-menu-sheet-
|
|
57
|
+
.seed-menu-sheet-item__root--labelAlign_center {
|
|
41
58
|
justify-content: center;
|
|
59
|
+
}
|
|
60
|
+
.seed-menu-sheet-item__content--labelAlign_center {
|
|
61
|
+
align-items: center;
|
|
42
62
|
}
|
|
@@ -15,11 +15,13 @@ declare type MenuSheetItemVariantMap = {
|
|
|
15
15
|
|
|
16
16
|
export declare type MenuSheetItemVariantProps = Partial<MenuSheetItemVariant>;
|
|
17
17
|
|
|
18
|
+
export declare type MenuSheetItemSlotName = "root" | "content" | "label" | "description";
|
|
19
|
+
|
|
18
20
|
export declare const menuSheetItemVariantMap: MenuSheetItemVariantMap;
|
|
19
21
|
|
|
20
22
|
export declare const menuSheetItem: ((
|
|
21
23
|
props?: MenuSheetItemVariantProps,
|
|
22
|
-
) => string) & {
|
|
24
|
+
) => Record<MenuSheetItemSlotName, string>) & {
|
|
23
25
|
splitVariantProps: <T extends MenuSheetItemVariantProps>(
|
|
24
26
|
props: T,
|
|
25
27
|
) => [MenuSheetItemVariantProps, Omit<T, keyof MenuSheetItemVariantProps>];
|
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
import './menu-sheet-item.css';
|
|
2
2
|
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
3
|
|
|
4
|
+
const menuSheetItemSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-menu-sheet-item__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"content",
|
|
11
|
+
"seed-menu-sheet-item__content"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"label",
|
|
15
|
+
"seed-menu-sheet-item__label"
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"description",
|
|
19
|
+
"seed-menu-sheet-item__description"
|
|
20
|
+
]
|
|
21
|
+
];
|
|
22
|
+
|
|
4
23
|
const defaultVariant = {
|
|
5
24
|
"tone": "neutral",
|
|
6
25
|
"labelAlign": "left"
|
|
@@ -22,10 +41,13 @@ export const menuSheetItemVariantMap = {
|
|
|
22
41
|
export const menuSheetItemVariantKeys = Object.keys(menuSheetItemVariantMap);
|
|
23
42
|
|
|
24
43
|
export function menuSheetItem(props) {
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
44
|
+
return Object.fromEntries(
|
|
45
|
+
menuSheetItemSlotNames.map(([slot, className]) => {
|
|
46
|
+
return [
|
|
47
|
+
slot,
|
|
48
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
49
|
+
];
|
|
50
|
+
}),
|
|
29
51
|
);
|
|
30
52
|
}
|
|
31
53
|
|
package/recipes/menu-sheet.css
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
padding-left: var(--seed-dimension-spacing-x-global-gutter);
|
|
33
33
|
padding-right: var(--seed-dimension-spacing-x-global-gutter);
|
|
34
34
|
padding-top: var(--seed-dimension-x4);
|
|
35
|
-
padding-bottom: var(--seed-dimension-x4);
|
|
35
|
+
padding-bottom: calc(var(--seed-dimension-x4) + var(--seed-safe-area-bottom));
|
|
36
36
|
border-top-left-radius: var(--seed-radius-r5);
|
|
37
37
|
border-top-right-radius: var(--seed-radius-r5);
|
|
38
38
|
}
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
display: flex;
|
|
41
41
|
flex-direction: column;
|
|
42
42
|
align-items: center;
|
|
43
|
+
text-align: center;
|
|
43
44
|
gap: var(--seed-dimension-x1);
|
|
44
45
|
padding-bottom: var(--seed-dimension-x4);
|
|
45
46
|
}
|
|
@@ -50,6 +51,13 @@
|
|
|
50
51
|
font-weight: var(--seed-font-weight-bold);
|
|
51
52
|
margin: 0;
|
|
52
53
|
}
|
|
54
|
+
.seed-menu-sheet__description {
|
|
55
|
+
color: var(--seed-color-fg-neutral-muted);
|
|
56
|
+
font-size: var(--seed-font-size-t4);
|
|
57
|
+
line-height: var(--seed-line-height-t4);
|
|
58
|
+
font-weight: var(--seed-font-weight-regular);
|
|
59
|
+
margin: 0;
|
|
60
|
+
}
|
|
53
61
|
.seed-menu-sheet__list {
|
|
54
62
|
display: flex;
|
|
55
63
|
flex-direction: column;
|
package/recipes/menu-sheet.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ declare type MenuSheetVariantMap = {
|
|
|
11
11
|
|
|
12
12
|
export declare type MenuSheetVariantProps = Partial<MenuSheetVariant>;
|
|
13
13
|
|
|
14
|
-
export declare type MenuSheetSlotName = "backdrop" | "positioner" | "content" | "header" | "title" | "list" | "group" | "footer" | "closeButton";
|
|
14
|
+
export declare type MenuSheetSlotName = "backdrop" | "positioner" | "content" | "header" | "title" | "description" | "list" | "group" | "footer" | "closeButton";
|
|
15
15
|
|
|
16
16
|
export declare const menuSheetVariantMap: MenuSheetVariantMap;
|
|
17
17
|
|
package/recipes/menu-sheet.mjs
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare interface RadioGroupVariant {
|
|
2
|
+
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
declare type RadioGroupVariantMap = {
|
|
6
|
+
[key in keyof RadioGroupVariant]: Array<RadioGroupVariant[key]>;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export declare type RadioGroupVariantProps = Partial<RadioGroupVariant>;
|
|
10
|
+
|
|
11
|
+
export declare const radioGroupVariantMap: RadioGroupVariantMap;
|
|
12
|
+
|
|
13
|
+
export declare const radioGroup: ((
|
|
14
|
+
props?: RadioGroupVariantProps,
|
|
15
|
+
) => string) & {
|
|
16
|
+
splitVariantProps: <T extends RadioGroupVariantProps>(
|
|
17
|
+
props: T,
|
|
18
|
+
) => [RadioGroupVariantProps, Omit<T, keyof RadioGroupVariantProps>];
|
|
19
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import './radio-group.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
|
package/recipes/radiomark.css
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
.seed-select-box-group {
|
|
2
|
-
display:
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
display: grid;
|
|
3
|
+
width: 100%;
|
|
4
|
+
grid-template-columns: repeat(var(--seed-select-box-group--columns, 1), minmax(0, 1fr));
|
|
5
|
+
row-gap: var(--seed-dimension-spacing-y-component-default);
|
|
6
|
+
column-gap: var(--seed-dimension-x3);
|
|
7
|
+
}
|
|
8
|
+
.seed-select-box-group:not([data-columns='1']) {
|
|
9
|
+
grid-auto-rows: 1fr;
|
|
5
10
|
}
|
package/recipes/select-box.css
CHANGED
|
@@ -1,43 +1,113 @@
|
|
|
1
1
|
.seed-select-box__root {
|
|
2
2
|
cursor: pointer;
|
|
3
|
+
position: relative;
|
|
3
4
|
display: flex;
|
|
4
|
-
|
|
5
|
-
justify-content: space-between;
|
|
6
|
-
gap: var(--seed-dimension-x2_5);
|
|
7
|
-
padding-left: var(--seed-dimension-x4);
|
|
8
|
-
padding-right: var(--seed-dimension-x4);
|
|
9
|
-
padding-top: var(--seed-dimension-x5);
|
|
10
|
-
padding-bottom: var(--seed-dimension-x5);
|
|
5
|
+
flex-direction: column;
|
|
11
6
|
border-radius: var(--seed-radius-r3);
|
|
12
|
-
box-shadow: inset 0 0 0 1px var(--seed-color-stroke-neutral-muted);
|
|
13
7
|
background-color: var(--seed-color-bg-transparent);
|
|
8
|
+
box-shadow: inset 0 0 0 1px var(--seed-color-stroke-neutral-muted);
|
|
14
9
|
transition: background-color var(--seed-duration-color-transition) var(--seed-timing-function-easing);
|
|
10
|
+
overflow: hidden;
|
|
15
11
|
}
|
|
16
|
-
.seed-select-box__root
|
|
12
|
+
.seed-select-box__root::after {
|
|
13
|
+
content: "";
|
|
14
|
+
position: absolute;
|
|
15
|
+
top: 0;
|
|
16
|
+
right: 0;
|
|
17
|
+
bottom: 0;
|
|
18
|
+
left: 0;
|
|
19
|
+
border-radius: inherit;
|
|
20
|
+
border-style: solid;
|
|
21
|
+
border-color: transparent;
|
|
22
|
+
border-width: 2px;
|
|
23
|
+
transition: border-color 0.1s var(--seed-timing-function-easing);
|
|
24
|
+
pointer-events: none;
|
|
25
|
+
}
|
|
26
|
+
.seed-select-box__root:not(:is(:disabled, [disabled], [data-disabled])):is(:active, [data-active]) {
|
|
17
27
|
background-color: var(--seed-color-bg-transparent-pressed);
|
|
18
28
|
}
|
|
19
|
-
.seed-select-box__root:is(:checked, [data-checked]) {
|
|
20
|
-
|
|
21
|
-
|
|
29
|
+
.seed-select-box__root:not(:is(:disabled, [disabled], [data-disabled])):is(:checked, [data-checked])::after {
|
|
30
|
+
border-width: 2px;
|
|
31
|
+
border-color: var(--seed-color-stroke-neutral-contrast);
|
|
32
|
+
}
|
|
33
|
+
.seed-select-box__root:is(:disabled, [disabled], [data-disabled]) {
|
|
34
|
+
cursor: not-allowed;
|
|
35
|
+
box-shadow: inset 0 0 0 1px var(--seed-color-stroke-neutral-muted);
|
|
22
36
|
}
|
|
23
|
-
.seed-select-box__root:is(:
|
|
24
|
-
|
|
37
|
+
.seed-select-box__root:is(:disabled, [disabled], [data-disabled]):is(:checked, [data-checked]) {
|
|
38
|
+
box-shadow: inset 0 0 0 2px var(--seed-color-stroke-neutral-muted);
|
|
39
|
+
}
|
|
40
|
+
.seed-select-box__trigger {
|
|
41
|
+
display: flex;
|
|
42
|
+
justify-content: space-between;
|
|
43
|
+
gap: var(--seed-dimension-x1_5);
|
|
44
|
+
flex-grow: 1;
|
|
25
45
|
}
|
|
26
46
|
.seed-select-box__content {
|
|
47
|
+
display: flex;
|
|
48
|
+
--seed-prefix-icon-size: 22px;
|
|
49
|
+
--seed-prefix-icon-color: var(--seed-color-fg-neutral);
|
|
50
|
+
}
|
|
51
|
+
.seed-select-box__content:is(:disabled, [disabled], [data-disabled]) {
|
|
52
|
+
--seed-prefix-icon-color: var(--seed-color-fg-disabled);
|
|
53
|
+
}
|
|
54
|
+
.seed-select-box__body {
|
|
27
55
|
display: flex;
|
|
28
56
|
flex-direction: column;
|
|
29
|
-
flex-grow: 1;
|
|
30
57
|
gap: var(--seed-dimension-x0_5);
|
|
58
|
+
margin-right: auto;
|
|
31
59
|
}
|
|
32
60
|
.seed-select-box__label {
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
gap: var(--seed-dimension-x1);
|
|
64
|
+
justify-content: flex-start;
|
|
33
65
|
color: var(--seed-color-fg-neutral);
|
|
34
|
-
font-weight: var(--seed-font-weight-bold);
|
|
35
66
|
font-size: var(--seed-font-size-t5);
|
|
36
67
|
line-height: var(--seed-line-height-t5);
|
|
68
|
+
font-weight: var(--seed-font-weight-medium);
|
|
69
|
+
}
|
|
70
|
+
.seed-select-box__label:is(:disabled, [disabled], [data-disabled]) {
|
|
71
|
+
color: var(--seed-color-fg-disabled);
|
|
37
72
|
}
|
|
38
73
|
.seed-select-box__description {
|
|
39
74
|
color: var(--seed-color-fg-neutral-muted);
|
|
75
|
+
font-size: var(--seed-font-size-t3);
|
|
76
|
+
line-height: var(--seed-line-height-t3);
|
|
40
77
|
font-weight: var(--seed-font-weight-regular);
|
|
41
|
-
|
|
42
|
-
|
|
78
|
+
}
|
|
79
|
+
.seed-select-box__description:is(:disabled, [disabled], [data-disabled]) {
|
|
80
|
+
color: var(--seed-color-fg-disabled);
|
|
81
|
+
}
|
|
82
|
+
.seed-select-box__footer[data-collapsible] {
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
height: 0;
|
|
85
|
+
opacity: 0;
|
|
86
|
+
transition: height var(--seed-duration-d6) var(--seed-timing-function-easing), opacity 400ms var(--seed-timing-function-easing);
|
|
87
|
+
}
|
|
88
|
+
.seed-select-box__footer[data-collapsible]:is([data-state="open"], [data-open]) {
|
|
89
|
+
height: var(--collapsible-content-height);
|
|
90
|
+
opacity: 1;
|
|
91
|
+
transition: height 400ms var(--seed-timing-function-easing), opacity var(--seed-duration-d6) var(--seed-timing-function-easing);
|
|
92
|
+
}
|
|
93
|
+
.seed-select-box__trigger--layout_horizontal {
|
|
94
|
+
align-items: center;
|
|
95
|
+
padding-left: var(--seed-dimension-x5);
|
|
96
|
+
padding-right: var(--seed-dimension-x4);
|
|
97
|
+
padding-top: var(--seed-dimension-x4);
|
|
98
|
+
padding-bottom: var(--seed-dimension-x4);
|
|
99
|
+
}
|
|
100
|
+
.seed-select-box__content--layout_horizontal {
|
|
101
|
+
align-items: center;
|
|
102
|
+
gap: var(--seed-dimension-x3);
|
|
103
|
+
}
|
|
104
|
+
.seed-select-box__trigger--layout_vertical {
|
|
105
|
+
padding-left: var(--seed-dimension-x4);
|
|
106
|
+
padding-right: var(--seed-dimension-x4);
|
|
107
|
+
padding-top: var(--seed-dimension-x5);
|
|
108
|
+
padding-bottom: var(--seed-dimension-x5);
|
|
109
|
+
}
|
|
110
|
+
.seed-select-box__content--layout_vertical {
|
|
111
|
+
flex-direction: column;
|
|
112
|
+
gap: var(--seed-dimension-x2_5);
|
|
43
113
|
}
|
package/recipes/select-box.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
declare interface SelectBoxVariant {
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @default "horizontal"
|
|
4
|
+
*/
|
|
5
|
+
layout: "horizontal" | "vertical";
|
|
3
6
|
}
|
|
4
7
|
|
|
5
8
|
declare type SelectBoxVariantMap = {
|
|
@@ -8,7 +11,7 @@ declare type SelectBoxVariantMap = {
|
|
|
8
11
|
|
|
9
12
|
export declare type SelectBoxVariantProps = Partial<SelectBoxVariant>;
|
|
10
13
|
|
|
11
|
-
export declare type SelectBoxSlotName = "root" | "content" | "label" | "description";
|
|
14
|
+
export declare type SelectBoxSlotName = "root" | "trigger" | "content" | "body" | "label" | "description" | "footer";
|
|
12
15
|
|
|
13
16
|
export declare const selectBoxVariantMap: SelectBoxVariantMap;
|
|
14
17
|
|
package/recipes/select-box.mjs
CHANGED
|
@@ -6,10 +6,18 @@ const selectBoxSlotNames = [
|
|
|
6
6
|
"root",
|
|
7
7
|
"seed-select-box__root"
|
|
8
8
|
],
|
|
9
|
+
[
|
|
10
|
+
"trigger",
|
|
11
|
+
"seed-select-box__trigger"
|
|
12
|
+
],
|
|
9
13
|
[
|
|
10
14
|
"content",
|
|
11
15
|
"seed-select-box__content"
|
|
12
16
|
],
|
|
17
|
+
[
|
|
18
|
+
"body",
|
|
19
|
+
"seed-select-box__body"
|
|
20
|
+
],
|
|
13
21
|
[
|
|
14
22
|
"label",
|
|
15
23
|
"seed-select-box__label"
|
|
@@ -17,14 +25,25 @@ const selectBoxSlotNames = [
|
|
|
17
25
|
[
|
|
18
26
|
"description",
|
|
19
27
|
"seed-select-box__description"
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
"footer",
|
|
31
|
+
"seed-select-box__footer"
|
|
20
32
|
]
|
|
21
33
|
];
|
|
22
34
|
|
|
23
|
-
const defaultVariant = {
|
|
35
|
+
const defaultVariant = {
|
|
36
|
+
"layout": "horizontal"
|
|
37
|
+
};
|
|
24
38
|
|
|
25
39
|
const compoundVariants = [];
|
|
26
40
|
|
|
27
|
-
export const selectBoxVariantMap = {
|
|
41
|
+
export const selectBoxVariantMap = {
|
|
42
|
+
"layout": [
|
|
43
|
+
"horizontal",
|
|
44
|
+
"vertical"
|
|
45
|
+
]
|
|
46
|
+
};
|
|
28
47
|
|
|
29
48
|
export const selectBoxVariantKeys = Object.keys(selectBoxVariantMap);
|
|
30
49
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
.seed-selectBoxCheckmark__root {
|
|
2
|
+
position: relative;
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
flex: none;
|
|
5
|
+
width: var(--seed-dimension-x5);
|
|
6
|
+
height: var(--seed-dimension-x5);
|
|
7
|
+
}
|
|
8
|
+
.seed-selectBoxCheckmark__icon {
|
|
9
|
+
display: block;
|
|
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
|
+
width: 15px;
|
|
19
|
+
height: 15px;
|
|
20
|
+
color: var(--seed-color-fg-placeholder);
|
|
21
|
+
transition: color var(--seed-duration-color-transition) var(--seed-timing-function-easing);
|
|
22
|
+
}
|
|
23
|
+
.seed-selectBoxCheckmark__icon:not(:is(:disabled, [disabled], [data-disabled])):is(:active, [data-active]) {
|
|
24
|
+
color: var(--seed-color-fg-neutral-subtle);
|
|
25
|
+
}
|
|
26
|
+
.seed-selectBoxCheckmark__icon:not(:is(:disabled, [disabled], [data-disabled])):is(:checked, [data-checked]) {
|
|
27
|
+
color: var(--seed-color-fg-neutral);
|
|
28
|
+
}
|
|
29
|
+
.seed-selectBoxCheckmark__icon:is(:disabled, [disabled], [data-disabled]) {
|
|
30
|
+
color: var(--seed-color-fg-disabled);
|
|
31
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare interface SelectBoxCheckmarkVariant {
|
|
2
|
+
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
declare type SelectBoxCheckmarkVariantMap = {
|
|
6
|
+
[key in keyof SelectBoxCheckmarkVariant]: Array<SelectBoxCheckmarkVariant[key]>;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export declare type SelectBoxCheckmarkVariantProps = Partial<SelectBoxCheckmarkVariant>;
|
|
10
|
+
|
|
11
|
+
export declare type SelectBoxCheckmarkSlotName = "root" | "icon";
|
|
12
|
+
|
|
13
|
+
export declare const selectBoxCheckmarkVariantMap: SelectBoxCheckmarkVariantMap;
|
|
14
|
+
|
|
15
|
+
export declare const selectBoxCheckmark: ((
|
|
16
|
+
props?: SelectBoxCheckmarkVariantProps,
|
|
17
|
+
) => Record<SelectBoxCheckmarkSlotName, string>) & {
|
|
18
|
+
splitVariantProps: <T extends SelectBoxCheckmarkVariantProps>(
|
|
19
|
+
props: T,
|
|
20
|
+
) => [SelectBoxCheckmarkVariantProps, Omit<T, keyof SelectBoxCheckmarkVariantProps>];
|
|
21
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import './selectBoxCheckmark.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const selectBoxCheckmarkSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-selectBoxCheckmark__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"icon",
|
|
11
|
+
"seed-selectBoxCheckmark__icon"
|
|
12
|
+
]
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
const defaultVariant = {};
|
|
16
|
+
|
|
17
|
+
const compoundVariants = [];
|
|
18
|
+
|
|
19
|
+
export const selectBoxCheckmarkVariantMap = {};
|
|
20
|
+
|
|
21
|
+
export const selectBoxCheckmarkVariantKeys = Object.keys(selectBoxCheckmarkVariantMap);
|
|
22
|
+
|
|
23
|
+
export function selectBoxCheckmark(props) {
|
|
24
|
+
return Object.fromEntries(
|
|
25
|
+
selectBoxCheckmarkSlotNames.map(([slot, className]) => {
|
|
26
|
+
return [
|
|
27
|
+
slot,
|
|
28
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
29
|
+
];
|
|
30
|
+
}),
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
Object.assign(selectBoxCheckmark, { splitVariantProps: (props) => splitVariantProps(props, selectBoxCheckmarkVariantMap) });
|
|
35
|
+
|
|
36
|
+
// @recipe(seed): selectBoxCheckmark
|