@seed-design/css 1.2.5 → 1.2.6
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 +61 -12
- package/all.layered.css +61 -12
- package/all.layered.min.css +1 -1
- package/all.min.css +1 -1
- package/package.json +2 -2
- package/recipes/content-placeholder.css +24 -0
- package/recipes/content-placeholder.d.ts +24 -0
- package/recipes/content-placeholder.layered.css +27 -0
- package/recipes/content-placeholder.layered.mjs +53 -0
- package/recipes/content-placeholder.mjs +53 -0
- package/recipes/help-bubble.css +1 -0
- package/recipes/help-bubble.layered.css +1 -0
- package/recipes/image-frame-reaction-button.css +23 -8
- package/recipes/image-frame-reaction-button.d.ts +3 -1
- package/recipes/image-frame-reaction-button.layered.css +25 -8
- package/recipes/image-frame-reaction-button.layered.mjs +22 -4
- package/recipes/image-frame-reaction-button.mjs +22 -4
- package/recipes/image-frame.css +13 -11
- package/recipes/image-frame.d.ts +3 -1
- package/recipes/image-frame.layered.css +9 -4
- package/recipes/image-frame.layered.mjs +22 -4
- package/recipes/image-frame.mjs +22 -4
- package/vars/component/content-placeholder.d.ts +28 -0
- package/vars/component/content-placeholder.mjs +27 -0
- package/vars/component/index.d.ts +1 -0
- package/vars/component/index.mjs +1 -0
- package/vars/component/text-input.d.ts +1 -0
- package/vars/component/text-input.mjs +1 -0
- package/recipes/tag-group-tag.css +0 -44
- package/recipes/tag-group-tag.d.ts +0 -30
- package/recipes/tag-group-tag.mjs +0 -41
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seed-design/css",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/daangn/seed-design.git",
|
|
7
7
|
"directory": "packages/css"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
-
"generate": "bun rootage:generate && qvism:generate",
|
|
10
|
+
"generate": "bun rootage:generate && bun qvism:generate",
|
|
11
11
|
"rootage:generate": "bun rootage token-ts ./vars --prefix seed && rootage component-spec ./vars/component --prefix seed",
|
|
12
12
|
"qvism:generate": "bun qvism ./ ./recipes",
|
|
13
13
|
"lint:publish": "bun publint"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.seed-content-placeholder__root {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
position: relative;
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
vertical-align: top;
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
background-color: var(--seed-color-palette-gray-200)
|
|
12
|
+
}
|
|
13
|
+
.seed-content-placeholder__asset {
|
|
14
|
+
display: block;
|
|
15
|
+
height: calc(0.5 * 100%);
|
|
16
|
+
min-width: var(--seed-dimension-x4);
|
|
17
|
+
max-width: 64px;
|
|
18
|
+
width: auto;
|
|
19
|
+
aspect-ratio: 1 / 1;
|
|
20
|
+
color: var(--seed-color-palette-gray-400);
|
|
21
|
+
fill: currentColor;
|
|
22
|
+
stroke: currentColor;
|
|
23
|
+
object-fit: contain
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare interface ContentPlaceholderVariant {
|
|
2
|
+
/**
|
|
3
|
+
* @default "default"
|
|
4
|
+
*/
|
|
5
|
+
type: "default" | "buySell" | "car" | "commerce" | "coupon" | "food" | "group" | "image" | "jobs" | "business" | "post" | "realty";
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare type ContentPlaceholderVariantMap = {
|
|
9
|
+
[key in keyof ContentPlaceholderVariant]: Array<ContentPlaceholderVariant[key]>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export declare type ContentPlaceholderVariantProps = Partial<ContentPlaceholderVariant>;
|
|
13
|
+
|
|
14
|
+
export declare type ContentPlaceholderSlotName = "root" | "asset";
|
|
15
|
+
|
|
16
|
+
export declare const contentPlaceholderVariantMap: ContentPlaceholderVariantMap;
|
|
17
|
+
|
|
18
|
+
export declare const contentPlaceholder: ((
|
|
19
|
+
props?: ContentPlaceholderVariantProps,
|
|
20
|
+
) => Record<ContentPlaceholderSlotName, string>) & {
|
|
21
|
+
splitVariantProps: <T extends ContentPlaceholderVariantProps>(
|
|
22
|
+
props: T,
|
|
23
|
+
) => [ContentPlaceholderVariantProps, Omit<T, keyof ContentPlaceholderVariantProps>];
|
|
24
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@layer seed-components {
|
|
2
|
+
.seed-content-placeholder__root {
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
vertical-align: top;
|
|
5
|
+
background-color: var(--seed-color-palette-gray-200);
|
|
6
|
+
justify-content: center;
|
|
7
|
+
align-items: center;
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
position: relative;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.seed-content-placeholder__asset {
|
|
16
|
+
height: 50%;
|
|
17
|
+
min-width: var(--seed-dimension-x4);
|
|
18
|
+
aspect-ratio: 1;
|
|
19
|
+
width: auto;
|
|
20
|
+
max-width: 64px;
|
|
21
|
+
color: var(--seed-color-palette-gray-400);
|
|
22
|
+
fill: currentColor;
|
|
23
|
+
stroke: currentColor;
|
|
24
|
+
object-fit: contain;
|
|
25
|
+
display: block;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import './content-placeholder.layered.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const contentPlaceholderSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-content-placeholder__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"asset",
|
|
11
|
+
"seed-content-placeholder__asset"
|
|
12
|
+
]
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
const defaultVariant = {
|
|
16
|
+
"type": "default"
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const compoundVariants = [];
|
|
20
|
+
|
|
21
|
+
export const contentPlaceholderVariantMap = {
|
|
22
|
+
"type": [
|
|
23
|
+
"default",
|
|
24
|
+
"buySell",
|
|
25
|
+
"car",
|
|
26
|
+
"commerce",
|
|
27
|
+
"coupon",
|
|
28
|
+
"food",
|
|
29
|
+
"group",
|
|
30
|
+
"image",
|
|
31
|
+
"jobs",
|
|
32
|
+
"business",
|
|
33
|
+
"post",
|
|
34
|
+
"realty"
|
|
35
|
+
]
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const contentPlaceholderVariantKeys = Object.keys(contentPlaceholderVariantMap);
|
|
39
|
+
|
|
40
|
+
export function contentPlaceholder(props) {
|
|
41
|
+
return Object.fromEntries(
|
|
42
|
+
contentPlaceholderSlotNames.map(([slot, className]) => {
|
|
43
|
+
return [
|
|
44
|
+
slot,
|
|
45
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
46
|
+
];
|
|
47
|
+
}),
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
Object.assign(contentPlaceholder, { splitVariantProps: (props) => splitVariantProps(props, contentPlaceholderVariantMap) });
|
|
52
|
+
|
|
53
|
+
// @recipe(seed): content-placeholder
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import './content-placeholder.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const contentPlaceholderSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-content-placeholder__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"asset",
|
|
11
|
+
"seed-content-placeholder__asset"
|
|
12
|
+
]
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
const defaultVariant = {
|
|
16
|
+
"type": "default"
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const compoundVariants = [];
|
|
20
|
+
|
|
21
|
+
export const contentPlaceholderVariantMap = {
|
|
22
|
+
"type": [
|
|
23
|
+
"default",
|
|
24
|
+
"buySell",
|
|
25
|
+
"car",
|
|
26
|
+
"commerce",
|
|
27
|
+
"coupon",
|
|
28
|
+
"food",
|
|
29
|
+
"group",
|
|
30
|
+
"image",
|
|
31
|
+
"jobs",
|
|
32
|
+
"business",
|
|
33
|
+
"post",
|
|
34
|
+
"realty"
|
|
35
|
+
]
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const contentPlaceholderVariantKeys = Object.keys(contentPlaceholderVariantMap);
|
|
39
|
+
|
|
40
|
+
export function contentPlaceholder(props) {
|
|
41
|
+
return Object.fromEntries(
|
|
42
|
+
contentPlaceholderSlotNames.map(([slot, className]) => {
|
|
43
|
+
return [
|
|
44
|
+
slot,
|
|
45
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
46
|
+
];
|
|
47
|
+
}),
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
Object.assign(contentPlaceholder, { splitVariantProps: (props) => splitVariantProps(props, contentPlaceholderVariantMap) });
|
|
52
|
+
|
|
53
|
+
// @recipe(seed): content-placeholder
|
package/recipes/help-bubble.css
CHANGED
|
@@ -77,6 +77,7 @@
|
|
|
77
77
|
margin-left: calc(var(--seed-dimension-x1) - ((38px - var(--seed-dimension-x3_5)) / 2));
|
|
78
78
|
margin-right: calc(-1 * ((38px - var(--seed-dimension-x3_5)) / 2));
|
|
79
79
|
margin-top: calc(-1 * ((38px - var(--seed-dimension-x3_5)) / 2) + var(--seed-dimension-x0_5));
|
|
80
|
+
margin-bottom: calc(-1 * ((38px - var(--seed-dimension-x3_5)) / 2) + var(--seed-dimension-x0_5));
|
|
80
81
|
color: var(--seed-color-fg-neutral-inverted);
|
|
81
82
|
--seed-icon-size: var(--seed-dimension-x3_5);
|
|
82
83
|
--seed-icon-color: var(--seed-color-fg-neutral-inverted);
|
|
@@ -83,6 +83,7 @@
|
|
|
83
83
|
margin-left: calc(var(--seed-dimension-x1) - ((38px - var(--seed-dimension-x3_5)) / 2));
|
|
84
84
|
margin-right: calc(-1 * ((38px - var(--seed-dimension-x3_5)) / 2));
|
|
85
85
|
margin-top: calc(-1 * ((38px - var(--seed-dimension-x3_5)) / 2) + var(--seed-dimension-x0_5));
|
|
86
|
+
margin-bottom: calc(-1 * ((38px - var(--seed-dimension-x3_5)) / 2) + var(--seed-dimension-x0_5));
|
|
86
87
|
color: var(--seed-color-fg-neutral-inverted);
|
|
87
88
|
--seed-icon-size: var(--seed-dimension-x3_5);
|
|
88
89
|
--seed-icon-color: var(--seed-color-fg-neutral-inverted);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.seed-image-frame-reaction-
|
|
1
|
+
.seed-image-frame-reaction-button__root {
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
@@ -10,10 +10,8 @@
|
|
|
10
10
|
width: var(--seed-dimension-x6);
|
|
11
11
|
height: var(--seed-dimension-x6);
|
|
12
12
|
background: transparent;
|
|
13
|
-
--seed-icon-size: var(--seed-dimension-x6);
|
|
14
|
-
--seed-icon-color: var(--seed-color-palette-static-white);
|
|
15
13
|
}
|
|
16
|
-
.seed-image-frame-reaction-
|
|
14
|
+
.seed-image-frame-reaction-button__root::before {
|
|
17
15
|
content: '';
|
|
18
16
|
position: absolute;
|
|
19
17
|
top: calc((var(--seed-dimension-x10) - var(--seed-dimension-x6)) / 2 * -1);
|
|
@@ -24,14 +22,31 @@
|
|
|
24
22
|
outline-offset: calc(var(--seed-dimension-x0_5) * -1);
|
|
25
23
|
transition: outline-color var(--seed-duration-d3) var(--seed-timing-function-easing);
|
|
26
24
|
}
|
|
27
|
-
.seed-image-frame-reaction-
|
|
25
|
+
.seed-image-frame-reaction-button__root:is(:focus, [data-focus]) {
|
|
28
26
|
outline: none;
|
|
29
27
|
}
|
|
30
|
-
.seed-image-frame-reaction-
|
|
28
|
+
.seed-image-frame-reaction-button__root:is(:focus-visible, [data-focus-visible]):before {
|
|
31
29
|
border-radius: var(--seed-radius-r1);
|
|
32
30
|
outline: var(--seed-dimension-x0_5) solid var(--seed-color-stroke-focus-ring);
|
|
33
31
|
outline-offset: calc(var(--seed-dimension-x0_5) * -1);
|
|
34
32
|
}
|
|
35
|
-
.seed-image-frame-reaction-
|
|
36
|
-
|
|
33
|
+
.seed-image-frame-reaction-button__fillIcon {
|
|
34
|
+
position: absolute;
|
|
35
|
+
inset: 0;
|
|
36
|
+
margin: auto;
|
|
37
|
+
width: var(--seed-dimension-x6);
|
|
38
|
+
height: var(--seed-dimension-x6);
|
|
39
|
+
pointer-events: none;
|
|
40
|
+
}
|
|
41
|
+
.seed-image-frame-reaction-button__lineIcon {
|
|
42
|
+
position: absolute;
|
|
43
|
+
inset: 0;
|
|
44
|
+
margin: auto;
|
|
45
|
+
width: var(--seed-dimension-x6);
|
|
46
|
+
height: var(--seed-dimension-x6);
|
|
47
|
+
color: var(--seed-color-palette-static-white);
|
|
48
|
+
pointer-events: none;
|
|
49
|
+
}
|
|
50
|
+
.seed-image-frame-reaction-button__lineIcon:is([aria-pressed=true], [data-pressed]) {
|
|
51
|
+
color: var(--seed-color-bg-transparent);
|
|
37
52
|
}
|
|
@@ -8,11 +8,13 @@ declare type ImageFrameReactionButtonVariantMap = {
|
|
|
8
8
|
|
|
9
9
|
export declare type ImageFrameReactionButtonVariantProps = Partial<ImageFrameReactionButtonVariant>;
|
|
10
10
|
|
|
11
|
+
export declare type ImageFrameReactionButtonSlotName = "root" | "fillIcon" | "lineIcon";
|
|
12
|
+
|
|
11
13
|
export declare const imageFrameReactionButtonVariantMap: ImageFrameReactionButtonVariantMap;
|
|
12
14
|
|
|
13
15
|
export declare const imageFrameReactionButton: ((
|
|
14
16
|
props?: ImageFrameReactionButtonVariantProps,
|
|
15
|
-
) => string) & {
|
|
17
|
+
) => Record<ImageFrameReactionButtonSlotName, string>) & {
|
|
16
18
|
splitVariantProps: <T extends ImageFrameReactionButtonVariantProps>(
|
|
17
19
|
props: T,
|
|
18
20
|
) => [ImageFrameReactionButtonVariantProps, Omit<T, keyof ImageFrameReactionButtonVariantProps>];
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
@layer seed-components {
|
|
2
|
-
.seed-image-frame-reaction-
|
|
2
|
+
.seed-image-frame-reaction-button__root {
|
|
3
3
|
box-sizing: border-box;
|
|
4
4
|
cursor: pointer;
|
|
5
5
|
width: var(--seed-dimension-x6);
|
|
6
6
|
height: var(--seed-dimension-x6);
|
|
7
|
-
--seed-icon-size: var(--seed-dimension-x6);
|
|
8
|
-
--seed-icon-color: var(--seed-color-palette-static-white);
|
|
9
7
|
background: none;
|
|
10
8
|
border: none;
|
|
11
9
|
justify-content: center;
|
|
@@ -15,7 +13,7 @@
|
|
|
15
13
|
position: relative;
|
|
16
14
|
}
|
|
17
15
|
|
|
18
|
-
.seed-image-frame-reaction-
|
|
16
|
+
.seed-image-frame-reaction-button__root:before {
|
|
19
17
|
content: "";
|
|
20
18
|
top: calc((var(--seed-dimension-x10) - var(--seed-dimension-x6)) / 2 * -1);
|
|
21
19
|
right: calc((var(--seed-dimension-x10) - var(--seed-dimension-x6)) / 2 * -1);
|
|
@@ -27,17 +25,36 @@
|
|
|
27
25
|
position: absolute;
|
|
28
26
|
}
|
|
29
27
|
|
|
30
|
-
.seed-image-frame-reaction-
|
|
28
|
+
.seed-image-frame-reaction-button__root:is(:focus, [data-focus]) {
|
|
31
29
|
outline: none;
|
|
32
30
|
}
|
|
33
31
|
|
|
34
|
-
.seed-image-frame-reaction-
|
|
32
|
+
.seed-image-frame-reaction-button__root:is(:focus-visible, [data-focus-visible]):before {
|
|
35
33
|
border-radius: var(--seed-radius-r1);
|
|
36
34
|
outline: var(--seed-dimension-x0_5) solid var(--seed-color-stroke-focus-ring);
|
|
37
35
|
outline-offset: calc(var(--seed-dimension-x0_5) * -1);
|
|
38
36
|
}
|
|
39
37
|
|
|
40
|
-
.seed-image-frame-reaction-
|
|
41
|
-
|
|
38
|
+
.seed-image-frame-reaction-button__fillIcon {
|
|
39
|
+
width: var(--seed-dimension-x6);
|
|
40
|
+
height: var(--seed-dimension-x6);
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
margin: auto;
|
|
43
|
+
position: absolute;
|
|
44
|
+
inset: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.seed-image-frame-reaction-button__lineIcon {
|
|
48
|
+
width: var(--seed-dimension-x6);
|
|
49
|
+
height: var(--seed-dimension-x6);
|
|
50
|
+
color: var(--seed-color-palette-static-white);
|
|
51
|
+
pointer-events: none;
|
|
52
|
+
margin: auto;
|
|
53
|
+
position: absolute;
|
|
54
|
+
inset: 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.seed-image-frame-reaction-button__lineIcon:is([aria-pressed="true"], [data-pressed]) {
|
|
58
|
+
color: var(--seed-color-bg-transparent);
|
|
42
59
|
}
|
|
43
60
|
}
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import './image-frame-reaction-button.layered.css';
|
|
2
2
|
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
3
|
|
|
4
|
+
const imageFrameReactionButtonSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-image-frame-reaction-button__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"fillIcon",
|
|
11
|
+
"seed-image-frame-reaction-button__fillIcon"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"lineIcon",
|
|
15
|
+
"seed-image-frame-reaction-button__lineIcon"
|
|
16
|
+
]
|
|
17
|
+
];
|
|
18
|
+
|
|
4
19
|
const defaultVariant = {};
|
|
5
20
|
|
|
6
21
|
const compoundVariants = [];
|
|
@@ -10,10 +25,13 @@ export const imageFrameReactionButtonVariantMap = {};
|
|
|
10
25
|
export const imageFrameReactionButtonVariantKeys = Object.keys(imageFrameReactionButtonVariantMap);
|
|
11
26
|
|
|
12
27
|
export function imageFrameReactionButton(props) {
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
28
|
+
return Object.fromEntries(
|
|
29
|
+
imageFrameReactionButtonSlotNames.map(([slot, className]) => {
|
|
30
|
+
return [
|
|
31
|
+
slot,
|
|
32
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
33
|
+
];
|
|
34
|
+
}),
|
|
17
35
|
);
|
|
18
36
|
}
|
|
19
37
|
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import './image-frame-reaction-button.css';
|
|
2
2
|
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
3
|
|
|
4
|
+
const imageFrameReactionButtonSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-image-frame-reaction-button__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"fillIcon",
|
|
11
|
+
"seed-image-frame-reaction-button__fillIcon"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"lineIcon",
|
|
15
|
+
"seed-image-frame-reaction-button__lineIcon"
|
|
16
|
+
]
|
|
17
|
+
];
|
|
18
|
+
|
|
4
19
|
const defaultVariant = {};
|
|
5
20
|
|
|
6
21
|
const compoundVariants = [];
|
|
@@ -10,10 +25,13 @@ export const imageFrameReactionButtonVariantMap = {};
|
|
|
10
25
|
export const imageFrameReactionButtonVariantKeys = Object.keys(imageFrameReactionButtonVariantMap);
|
|
11
26
|
|
|
12
27
|
export function imageFrameReactionButton(props) {
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
28
|
+
return Object.fromEntries(
|
|
29
|
+
imageFrameReactionButtonSlotNames.map(([slot, className]) => {
|
|
30
|
+
return [
|
|
31
|
+
slot,
|
|
32
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
33
|
+
];
|
|
34
|
+
}),
|
|
17
35
|
);
|
|
18
36
|
}
|
|
19
37
|
|
package/recipes/image-frame.css
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
.seed-image-
|
|
1
|
+
.seed-image-frame__root {
|
|
2
2
|
position: relative;
|
|
3
3
|
overflow: hidden;
|
|
4
|
-
border-radius: inherit
|
|
4
|
+
border-radius: inherit
|
|
5
5
|
}
|
|
6
|
-
.seed-image-
|
|
6
|
+
.seed-image-frame__content {
|
|
7
7
|
display: block;
|
|
8
8
|
width: 100%;
|
|
9
9
|
height: 100%;
|
|
10
10
|
object-fit: cover;
|
|
11
|
-
border-radius: inherit
|
|
11
|
+
border-radius: inherit
|
|
12
12
|
}
|
|
13
|
-
.seed-image-
|
|
13
|
+
.seed-image-frame__fallback {
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%
|
|
16
|
+
}
|
|
17
|
+
.seed-image-frame__root--stroke_true::after {
|
|
14
18
|
content: '';
|
|
15
19
|
position: absolute;
|
|
16
20
|
top: 0;
|
|
@@ -19,10 +23,8 @@
|
|
|
19
23
|
bottom: 0;
|
|
20
24
|
pointer-events: none;
|
|
21
25
|
border-radius: inherit;
|
|
22
|
-
box-shadow: inset 0 0 0 1px var(--seed-color-stroke-neutral-subtle)
|
|
23
|
-
}
|
|
24
|
-
.seed-image-frame--stroke_false {}
|
|
25
|
-
.seed-image-frame--rounded_true {
|
|
26
|
-
border-radius: var(--seed-radius-r2);
|
|
26
|
+
box-shadow: inset 0 0 0 1px var(--seed-color-stroke-neutral-subtle)
|
|
27
27
|
}
|
|
28
|
-
.seed-image-
|
|
28
|
+
.seed-image-frame__root--rounded_true {
|
|
29
|
+
border-radius: var(--seed-radius-r2)
|
|
30
|
+
}
|
package/recipes/image-frame.d.ts
CHANGED
|
@@ -15,11 +15,13 @@ declare type ImageFrameVariantMap = {
|
|
|
15
15
|
|
|
16
16
|
export declare type ImageFrameVariantProps = Partial<ImageFrameVariant>;
|
|
17
17
|
|
|
18
|
+
export declare type ImageFrameSlotName = "root" | "content" | "fallback";
|
|
19
|
+
|
|
18
20
|
export declare const imageFrameVariantMap: ImageFrameVariantMap;
|
|
19
21
|
|
|
20
22
|
export declare const imageFrame: ((
|
|
21
23
|
props?: ImageFrameVariantProps,
|
|
22
|
-
) => string) & {
|
|
24
|
+
) => Record<ImageFrameSlotName, string>) & {
|
|
23
25
|
splitVariantProps: <T extends ImageFrameVariantProps>(
|
|
24
26
|
props: T,
|
|
25
27
|
) => [ImageFrameVariantProps, Omit<T, keyof ImageFrameVariantProps>];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
@layer seed-components {
|
|
2
|
-
.seed-image-
|
|
2
|
+
.seed-image-frame__root {
|
|
3
3
|
border-radius: inherit;
|
|
4
4
|
position: relative;
|
|
5
5
|
overflow: hidden;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
.seed-image-
|
|
8
|
+
.seed-image-frame__content {
|
|
9
9
|
object-fit: cover;
|
|
10
10
|
border-radius: inherit;
|
|
11
11
|
width: 100%;
|
|
@@ -13,7 +13,12 @@
|
|
|
13
13
|
display: block;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.seed-image-
|
|
16
|
+
.seed-image-frame__fallback {
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.seed-image-frame__root--stroke_true:after {
|
|
17
22
|
content: "";
|
|
18
23
|
pointer-events: none;
|
|
19
24
|
border-radius: inherit;
|
|
@@ -22,7 +27,7 @@
|
|
|
22
27
|
inset: 0;
|
|
23
28
|
}
|
|
24
29
|
|
|
25
|
-
.seed-image-
|
|
30
|
+
.seed-image-frame__root--rounded_true {
|
|
26
31
|
border-radius: var(--seed-radius-r2);
|
|
27
32
|
}
|
|
28
33
|
}
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import './image-frame.layered.css';
|
|
2
2
|
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
3
|
|
|
4
|
+
const imageFrameSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-image-frame__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"content",
|
|
11
|
+
"seed-image-frame__content"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"fallback",
|
|
15
|
+
"seed-image-frame__fallback"
|
|
16
|
+
]
|
|
17
|
+
];
|
|
18
|
+
|
|
4
19
|
const defaultVariant = {
|
|
5
20
|
"stroke": false,
|
|
6
21
|
"rounded": false
|
|
@@ -22,10 +37,13 @@ export const imageFrameVariantMap = {
|
|
|
22
37
|
export const imageFrameVariantKeys = Object.keys(imageFrameVariantMap);
|
|
23
38
|
|
|
24
39
|
export function imageFrame(props) {
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
40
|
+
return Object.fromEntries(
|
|
41
|
+
imageFrameSlotNames.map(([slot, className]) => {
|
|
42
|
+
return [
|
|
43
|
+
slot,
|
|
44
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
45
|
+
];
|
|
46
|
+
}),
|
|
29
47
|
);
|
|
30
48
|
}
|
|
31
49
|
|
package/recipes/image-frame.mjs
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import './image-frame.css';
|
|
2
2
|
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
3
|
|
|
4
|
+
const imageFrameSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-image-frame__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"content",
|
|
11
|
+
"seed-image-frame__content"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"fallback",
|
|
15
|
+
"seed-image-frame__fallback"
|
|
16
|
+
]
|
|
17
|
+
];
|
|
18
|
+
|
|
4
19
|
const defaultVariant = {
|
|
5
20
|
"stroke": false,
|
|
6
21
|
"rounded": false
|
|
@@ -22,10 +37,13 @@ export const imageFrameVariantMap = {
|
|
|
22
37
|
export const imageFrameVariantKeys = Object.keys(imageFrameVariantMap);
|
|
23
38
|
|
|
24
39
|
export function imageFrame(props) {
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
40
|
+
return Object.fromEntries(
|
|
41
|
+
imageFrameSlotNames.map(([slot, className]) => {
|
|
42
|
+
return [
|
|
43
|
+
slot,
|
|
44
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
45
|
+
];
|
|
46
|
+
}),
|
|
29
47
|
);
|
|
30
48
|
}
|
|
31
49
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const vars: {
|
|
2
|
+
"base": {
|
|
3
|
+
"enabled": {
|
|
4
|
+
"root": {
|
|
5
|
+
"color": "var(--seed-color-palette-gray-200)"
|
|
6
|
+
},
|
|
7
|
+
"asset": {
|
|
8
|
+
"minWidth": "var(--seed-dimension-x4)",
|
|
9
|
+
"maxWidth": "64px",
|
|
10
|
+
/** root slot 대한 asset slot의 높이 비율입니다. */
|
|
11
|
+
"heightFraction": "0.5",
|
|
12
|
+
"color": "var(--seed-color-palette-gray-400)"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"typeDefault": {},
|
|
17
|
+
"typeBuySell": {},
|
|
18
|
+
"typeCar": {},
|
|
19
|
+
"typeCommerce": {},
|
|
20
|
+
"typeCoupon": {},
|
|
21
|
+
"typeFood": {},
|
|
22
|
+
"typeGroup": {},
|
|
23
|
+
"typeImage": {},
|
|
24
|
+
"typeJobs": {},
|
|
25
|
+
"typeBusiness": {},
|
|
26
|
+
"typePost": {},
|
|
27
|
+
"typeRealty": {}
|
|
28
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export const vars = {
|
|
2
|
+
"base": {
|
|
3
|
+
"enabled": {
|
|
4
|
+
"root": {
|
|
5
|
+
"color": "var(--seed-color-palette-gray-200)"
|
|
6
|
+
},
|
|
7
|
+
"asset": {
|
|
8
|
+
"minWidth": "var(--seed-dimension-x4)",
|
|
9
|
+
"maxWidth": "64px",
|
|
10
|
+
"heightFraction": "0.5",
|
|
11
|
+
"color": "var(--seed-color-palette-gray-400)"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"typeDefault": {},
|
|
16
|
+
"typeBuySell": {},
|
|
17
|
+
"typeCar": {},
|
|
18
|
+
"typeCommerce": {},
|
|
19
|
+
"typeCoupon": {},
|
|
20
|
+
"typeFood": {},
|
|
21
|
+
"typeGroup": {},
|
|
22
|
+
"typeImage": {},
|
|
23
|
+
"typeJobs": {},
|
|
24
|
+
"typeBusiness": {},
|
|
25
|
+
"typePost": {},
|
|
26
|
+
"typeRealty": {}
|
|
27
|
+
}
|
|
@@ -16,6 +16,7 @@ export { vars as checkmark } from "./checkmark";
|
|
|
16
16
|
export { vars as chipTab } from "./chip-tab";
|
|
17
17
|
export { vars as chipTablist } from "./chip-tablist";
|
|
18
18
|
export { vars as chip } from "./chip";
|
|
19
|
+
export { vars as contentPlaceholder } from "./content-placeholder";
|
|
19
20
|
export { vars as contextualFloatingButton } from "./contextual-floating-button";
|
|
20
21
|
export { vars as controlChip } from "./control-chip";
|
|
21
22
|
export { vars as dialog } from "./dialog";
|