@seed-design/css 0.0.1-rc.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/README.md +1 -0
- package/package.json +42 -0
- package/recipes/action-button.d.ts +32 -0
- package/recipes/action-button.mjs +87 -0
- package/recipes/action-chip.d.ts +28 -0
- package/recipes/action-chip.mjs +60 -0
- package/recipes/action-sheet-item.d.ts +24 -0
- package/recipes/action-sheet-item.mjs +38 -0
- package/recipes/action-sheet.d.ts +21 -0
- package/recipes/action-sheet.mjs +59 -0
- package/recipes/app-bar-main.d.ts +36 -0
- package/recipes/app-bar-main.mjs +61 -0
- package/recipes/app-bar.d.ts +36 -0
- package/recipes/app-bar.mjs +68 -0
- package/recipes/app-screen.d.ts +36 -0
- package/recipes/app-screen.mjs +66 -0
- package/recipes/avatar-stack.d.ts +24 -0
- package/recipes/avatar-stack.mjs +45 -0
- package/recipes/avatar.d.ts +24 -0
- package/recipes/avatar.mjs +55 -0
- package/recipes/badge.d.ts +36 -0
- package/recipes/badge.mjs +126 -0
- package/recipes/bottom-sheet.d.ts +21 -0
- package/recipes/bottom-sheet.mjs +63 -0
- package/recipes/callout.d.ts +24 -0
- package/recipes/callout.mjs +61 -0
- package/recipes/checkbox.d.ts +32 -0
- package/recipes/checkbox.mjs +77 -0
- package/recipes/chip-tabs.d.ts +32 -0
- package/recipes/chip-tabs.mjs +68 -0
- package/recipes/className.mjs +25 -0
- package/recipes/control-chip.d.ts +28 -0
- package/recipes/control-chip.mjs +60 -0
- package/recipes/dialog.d.ts +21 -0
- package/recipes/dialog.mjs +59 -0
- package/recipes/extended-action-sheet-item.d.ts +24 -0
- package/recipes/extended-action-sheet-item.mjs +38 -0
- package/recipes/extended-action-sheet.d.ts +21 -0
- package/recipes/extended-action-sheet.mjs +63 -0
- package/recipes/extended-fab.d.ts +28 -0
- package/recipes/extended-fab.mjs +43 -0
- package/recipes/fab.d.ts +21 -0
- package/recipes/fab.mjs +31 -0
- package/recipes/help-bubble.d.ts +21 -0
- package/recipes/help-bubble.mjs +55 -0
- package/recipes/identity-placeholder.d.ts +24 -0
- package/recipes/identity-placeholder.mjs +41 -0
- package/recipes/inline-banner.d.ts +24 -0
- package/recipes/inline-banner.mjs +63 -0
- package/recipes/link-with-icon.d.ts +24 -0
- package/recipes/link-with-icon.mjs +39 -0
- package/recipes/manner-temp-badge.d.ts +24 -0
- package/recipes/manner-temp-badge.mjs +42 -0
- package/recipes/mergeVariants.mjs +9 -0
- package/recipes/progress-circle.d.ts +28 -0
- package/recipes/progress-circle.mjs +54 -0
- package/recipes/pull-to-refresh.d.ts +21 -0
- package/recipes/pull-to-refresh.mjs +35 -0
- package/recipes/radio.d.ts +24 -0
- package/recipes/radio.mjs +42 -0
- package/recipes/reaction-button.d.ts +24 -0
- package/recipes/reaction-button.mjs +38 -0
- package/recipes/segmented-control.d.ts +21 -0
- package/recipes/segmented-control.mjs +39 -0
- package/recipes/select-box-group.d.ts +21 -0
- package/recipes/select-box-group.mjs +31 -0
- package/recipes/select-box.d.ts +21 -0
- package/recipes/select-box.mjs +59 -0
- package/recipes/skeleton.d.ts +24 -0
- package/recipes/skeleton.mjs +40 -0
- package/recipes/snackbar-region.d.ts +21 -0
- package/recipes/snackbar-region.mjs +31 -0
- package/recipes/snackbar.d.ts +24 -0
- package/recipes/snackbar.mjs +51 -0
- package/recipes/splitVariantProps.mjs +12 -0
- package/recipes/switch.d.ts +24 -0
- package/recipes/switch.mjs +50 -0
- package/recipes/tabs.d.ts +36 -0
- package/recipes/tabs.mjs +81 -0
- package/recipes/text-field.d.ts +24 -0
- package/recipes/text-field.mjs +103 -0
- package/recipes/text.d.ts +28 -0
- package/recipes/text.mjs +64 -0
- package/recipes/toggle-button.d.ts +28 -0
- package/recipes/toggle-button.mjs +43 -0
- package/recipes/visually-hidden.d.ts +21 -0
- package/recipes/visually-hidden.mjs +31 -0
- package/seed.css +5017 -0
- package/seed.min.css +1 -0
- package/vars/color/bg.d.ts +37 -0
- package/vars/color/bg.mjs +37 -0
- package/vars/color/fg.d.ts +16 -0
- package/vars/color/fg.mjs +16 -0
- package/vars/color/index.d.ts +5 -0
- package/vars/color/index.mjs +5 -0
- package/vars/color/manner-temp/index.d.ts +6 -0
- package/vars/color/manner-temp/index.mjs +6 -0
- package/vars/color/manner-temp/l1.d.ts +2 -0
- package/vars/color/manner-temp/l1.mjs +2 -0
- package/vars/color/manner-temp/l2.d.ts +2 -0
- package/vars/color/manner-temp/l2.mjs +2 -0
- package/vars/color/manner-temp/l3.d.ts +2 -0
- package/vars/color/manner-temp/l3.mjs +2 -0
- package/vars/color/manner-temp/l4.d.ts +2 -0
- package/vars/color/manner-temp/l4.mjs +2 -0
- package/vars/color/manner-temp/l5.d.ts +2 -0
- package/vars/color/manner-temp/l5.mjs +2 -0
- package/vars/color/manner-temp/l6.d.ts +2 -0
- package/vars/color/manner-temp/l6.mjs +2 -0
- package/vars/color/palette.d.ts +78 -0
- package/vars/color/palette.mjs +78 -0
- package/vars/color/stroke.d.ts +10 -0
- package/vars/color/stroke.mjs +10 -0
- package/vars/component/action-button.d.ts +491 -0
- package/vars/component/action-button.mjs +491 -0
- package/vars/component/action-chip.d.ts +128 -0
- package/vars/component/action-chip.mjs +128 -0
- package/vars/component/action-sheet-close-button.d.ts +23 -0
- package/vars/component/action-sheet-close-button.mjs +23 -0
- package/vars/component/action-sheet-item.d.ts +36 -0
- package/vars/component/action-sheet-item.mjs +36 -0
- package/vars/component/action-sheet.d.ts +45 -0
- package/vars/component/action-sheet.mjs +45 -0
- package/vars/component/avatar-stack.d.ts +60 -0
- package/vars/component/avatar-stack.mjs +60 -0
- package/vars/component/avatar.d.ts +83 -0
- package/vars/component/avatar.mjs +83 -0
- package/vars/component/badge.d.ts +223 -0
- package/vars/component/badge.mjs +223 -0
- package/vars/component/bottom-sheet.d.ts +61 -0
- package/vars/component/bottom-sheet.mjs +61 -0
- package/vars/component/callout.d.ts +173 -0
- package/vars/component/callout.mjs +173 -0
- package/vars/component/checkbox.d.ts +171 -0
- package/vars/component/checkbox.mjs +171 -0
- package/vars/component/chip-tab.d.ts +98 -0
- package/vars/component/chip-tab.mjs +98 -0
- package/vars/component/chip-tablist.d.ts +23 -0
- package/vars/component/chip-tablist.mjs +23 -0
- package/vars/component/control-chip.d.ts +156 -0
- package/vars/component/control-chip.mjs +156 -0
- package/vars/component/dialog.d.ts +49 -0
- package/vars/component/dialog.mjs +49 -0
- package/vars/component/extended-action-sheet-close-button.d.ts +25 -0
- package/vars/component/extended-action-sheet-close-button.mjs +25 -0
- package/vars/component/extended-action-sheet-item.d.ts +46 -0
- package/vars/component/extended-action-sheet-item.mjs +46 -0
- package/vars/component/extended-action-sheet.d.ts +48 -0
- package/vars/component/extended-action-sheet.mjs +48 -0
- package/vars/component/extended-fab.d.ts +82 -0
- package/vars/component/extended-fab.mjs +82 -0
- package/vars/component/fab.d.ts +21 -0
- package/vars/component/fab.mjs +21 -0
- package/vars/component/help-bubble.d.ts +36 -0
- package/vars/component/help-bubble.mjs +36 -0
- package/vars/component/identity-placeholder.d.ts +12 -0
- package/vars/component/identity-placeholder.mjs +12 -0
- package/vars/component/index.d.ts +40 -0
- package/vars/component/index.mjs +40 -0
- package/vars/component/inline-banner.d.ts +191 -0
- package/vars/component/inline-banner.mjs +191 -0
- package/vars/component/link-with-icon.d.ts +46 -0
- package/vars/component/link-with-icon.mjs +46 -0
- package/vars/component/manner-temp-badge.d.ts +77 -0
- package/vars/component/manner-temp-badge.mjs +77 -0
- package/vars/component/progress-circle.d.ts +67 -0
- package/vars/component/progress-circle.mjs +67 -0
- package/vars/component/radio.d.ts +77 -0
- package/vars/component/radio.mjs +77 -0
- package/vars/component/reaction-button.d.ts +134 -0
- package/vars/component/reaction-button.mjs +134 -0
- package/vars/component/segmented-control-item.d.ts +34 -0
- package/vars/component/segmented-control-item.mjs +34 -0
- package/vars/component/segmented-control.d.ts +18 -0
- package/vars/component/segmented-control.mjs +18 -0
- package/vars/component/select-box.d.ts +92 -0
- package/vars/component/select-box.mjs +92 -0
- package/vars/component/skeleton.d.ts +42 -0
- package/vars/component/skeleton.mjs +42 -0
- package/vars/component/snackbar.d.ts +58 -0
- package/vars/component/snackbar.mjs +58 -0
- package/vars/component/switch.d.ts +65 -0
- package/vars/component/switch.mjs +65 -0
- package/vars/component/tab.d.ts +53 -0
- package/vars/component/tab.mjs +53 -0
- package/vars/component/tablist.d.ts +51 -0
- package/vars/component/tablist.mjs +51 -0
- package/vars/component/text-field.d.ts +295 -0
- package/vars/component/text-field.mjs +295 -0
- package/vars/component/toggle-button.d.ts +205 -0
- package/vars/component/toggle-button.mjs +205 -0
- package/vars/component/top-navigation.d.ts +86 -0
- package/vars/component/top-navigation.mjs +86 -0
- package/vars/component/typography.d.ts +200 -0
- package/vars/component/typography.mjs +200 -0
- package/vars/dimension/index.d.ts +22 -0
- package/vars/dimension/index.mjs +22 -0
- package/vars/dimension/spacing-x.d.ts +2 -0
- package/vars/dimension/spacing-x.mjs +2 -0
- package/vars/dimension/spacing-y.d.ts +2 -0
- package/vars/dimension/spacing-y.mjs +2 -0
- package/vars/duration.d.ts +6 -0
- package/vars/duration.mjs +6 -0
- package/vars/font-size.d.ts +13 -0
- package/vars/font-size.mjs +13 -0
- package/vars/font-weight.d.ts +3 -0
- package/vars/font-weight.mjs +3 -0
- package/vars/gradient.d.ts +1 -0
- package/vars/gradient.mjs +1 -0
- package/vars/index.d.ts +32 -0
- package/vars/index.mjs +1 -0
- package/vars/line-height.d.ts +10 -0
- package/vars/line-height.mjs +10 -0
- package/vars/radius.d.ts +11 -0
- package/vars/radius.mjs +11 -0
- package/vars/timing-function.d.ts +6 -0
- package/vars/timing-function.mjs +6 -0
- package/vars/vars.d.ts +9 -0
- package/vars/vars.mjs +9 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { createClassName } from "./className.mjs";
|
|
2
|
+
import { mergeVariants } from "./mergeVariants.mjs";
|
|
3
|
+
import { splitVariantProps } from "./splitVariantProps.mjs";
|
|
4
|
+
|
|
5
|
+
const appScreenSlotNames = [
|
|
6
|
+
[
|
|
7
|
+
"root",
|
|
8
|
+
"seed-app-screen__root"
|
|
9
|
+
],
|
|
10
|
+
[
|
|
11
|
+
"layer",
|
|
12
|
+
"seed-app-screen__layer"
|
|
13
|
+
],
|
|
14
|
+
[
|
|
15
|
+
"dim",
|
|
16
|
+
"seed-app-screen__dim"
|
|
17
|
+
],
|
|
18
|
+
[
|
|
19
|
+
"edge",
|
|
20
|
+
"seed-app-screen__edge"
|
|
21
|
+
]
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
const defaultVariant = {
|
|
25
|
+
"theme": "cupertino",
|
|
26
|
+
"transitionStyle": "slideFromRightIOS",
|
|
27
|
+
"layerOffsetTop": "appBar",
|
|
28
|
+
"layerOffsetBottom": "none"
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const compoundVariants = [];
|
|
32
|
+
|
|
33
|
+
export const appScreenVariantMap = {
|
|
34
|
+
"theme": [
|
|
35
|
+
"cupertino",
|
|
36
|
+
"android"
|
|
37
|
+
],
|
|
38
|
+
"transitionStyle": [
|
|
39
|
+
"slideFromRightIOS",
|
|
40
|
+
"fadeFromBottomAndroid"
|
|
41
|
+
],
|
|
42
|
+
"layerOffsetTop": [
|
|
43
|
+
"none",
|
|
44
|
+
"safeArea",
|
|
45
|
+
"appBar"
|
|
46
|
+
],
|
|
47
|
+
"layerOffsetBottom": [
|
|
48
|
+
"none",
|
|
49
|
+
"safeArea"
|
|
50
|
+
]
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const appScreenVariantKeys = Object.keys(appScreenVariantMap);
|
|
54
|
+
|
|
55
|
+
export function appScreen(props) {
|
|
56
|
+
return Object.fromEntries(
|
|
57
|
+
appScreenSlotNames.map(([slot, className]) => {
|
|
58
|
+
return [
|
|
59
|
+
slot,
|
|
60
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
61
|
+
];
|
|
62
|
+
}),
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
Object.assign(appScreen, { splitVariantProps: (props) => splitVariantProps(props, appScreenVariantMap) });
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare interface AvatarStackVariant {
|
|
2
|
+
/**
|
|
3
|
+
* @default 48
|
|
4
|
+
*/
|
|
5
|
+
size: "20" | "24" | "36" | "48" | "64";
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare type AvatarStackVariantMap = {
|
|
9
|
+
[key in keyof AvatarStackVariant]: Array<AvatarStackVariant[key]>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export declare type AvatarStackVariantProps = Partial<AvatarStackVariant>;
|
|
13
|
+
|
|
14
|
+
export declare type AvatarStackSlotName = "root" | "item";
|
|
15
|
+
|
|
16
|
+
export declare const avatarStackVariantMap: AvatarStackVariantMap;
|
|
17
|
+
|
|
18
|
+
export declare const avatarStack: ((
|
|
19
|
+
props?: AvatarStackVariantProps,
|
|
20
|
+
) => Record<AvatarStackSlotName, string>) & {
|
|
21
|
+
splitVariantProps: <T extends AvatarStackVariantProps>(
|
|
22
|
+
props: T,
|
|
23
|
+
) => [AvatarStackVariantProps, Omit<T, keyof AvatarStackVariantProps>];
|
|
24
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { createClassName } from "./className.mjs";
|
|
2
|
+
import { mergeVariants } from "./mergeVariants.mjs";
|
|
3
|
+
import { splitVariantProps } from "./splitVariantProps.mjs";
|
|
4
|
+
|
|
5
|
+
const avatarStackSlotNames = [
|
|
6
|
+
[
|
|
7
|
+
"root",
|
|
8
|
+
"seed-avatar-stack__root"
|
|
9
|
+
],
|
|
10
|
+
[
|
|
11
|
+
"item",
|
|
12
|
+
"seed-avatar-stack__item"
|
|
13
|
+
]
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
const defaultVariant = {
|
|
17
|
+
"size": 48
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const compoundVariants = [];
|
|
21
|
+
|
|
22
|
+
export const avatarStackVariantMap = {
|
|
23
|
+
"size": [
|
|
24
|
+
"20",
|
|
25
|
+
"24",
|
|
26
|
+
"36",
|
|
27
|
+
"48",
|
|
28
|
+
"64"
|
|
29
|
+
]
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const avatarStackVariantKeys = Object.keys(avatarStackVariantMap);
|
|
33
|
+
|
|
34
|
+
export function avatarStack(props) {
|
|
35
|
+
return Object.fromEntries(
|
|
36
|
+
avatarStackSlotNames.map(([slot, className]) => {
|
|
37
|
+
return [
|
|
38
|
+
slot,
|
|
39
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
40
|
+
];
|
|
41
|
+
}),
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
Object.assign(avatarStack, { splitVariantProps: (props) => splitVariantProps(props, avatarStackVariantMap) });
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare interface AvatarVariant {
|
|
2
|
+
/**
|
|
3
|
+
* @default 48
|
|
4
|
+
*/
|
|
5
|
+
size: "20" | "24" | "36" | "48" | "64" | "80" | "96";
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare type AvatarVariantMap = {
|
|
9
|
+
[key in keyof AvatarVariant]: Array<AvatarVariant[key]>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export declare type AvatarVariantProps = Partial<AvatarVariant>;
|
|
13
|
+
|
|
14
|
+
export declare type AvatarSlotName = "root" | "image" | "fallback" | "badge";
|
|
15
|
+
|
|
16
|
+
export declare const avatarVariantMap: AvatarVariantMap;
|
|
17
|
+
|
|
18
|
+
export declare const avatar: ((
|
|
19
|
+
props?: AvatarVariantProps,
|
|
20
|
+
) => Record<AvatarSlotName, string>) & {
|
|
21
|
+
splitVariantProps: <T extends AvatarVariantProps>(
|
|
22
|
+
props: T,
|
|
23
|
+
) => [AvatarVariantProps, Omit<T, keyof AvatarVariantProps>];
|
|
24
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { createClassName } from "./className.mjs";
|
|
2
|
+
import { mergeVariants } from "./mergeVariants.mjs";
|
|
3
|
+
import { splitVariantProps } from "./splitVariantProps.mjs";
|
|
4
|
+
|
|
5
|
+
const avatarSlotNames = [
|
|
6
|
+
[
|
|
7
|
+
"root",
|
|
8
|
+
"seed-avatar__root"
|
|
9
|
+
],
|
|
10
|
+
[
|
|
11
|
+
"image",
|
|
12
|
+
"seed-avatar__image"
|
|
13
|
+
],
|
|
14
|
+
[
|
|
15
|
+
"fallback",
|
|
16
|
+
"seed-avatar__fallback"
|
|
17
|
+
],
|
|
18
|
+
[
|
|
19
|
+
"badge",
|
|
20
|
+
"seed-avatar__badge"
|
|
21
|
+
]
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
const defaultVariant = {
|
|
25
|
+
"size": 48
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const compoundVariants = [];
|
|
29
|
+
|
|
30
|
+
export const avatarVariantMap = {
|
|
31
|
+
"size": [
|
|
32
|
+
"20",
|
|
33
|
+
"24",
|
|
34
|
+
"36",
|
|
35
|
+
"48",
|
|
36
|
+
"64",
|
|
37
|
+
"80",
|
|
38
|
+
"96"
|
|
39
|
+
]
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const avatarVariantKeys = Object.keys(avatarVariantMap);
|
|
43
|
+
|
|
44
|
+
export function avatar(props) {
|
|
45
|
+
return Object.fromEntries(
|
|
46
|
+
avatarSlotNames.map(([slot, className]) => {
|
|
47
|
+
return [
|
|
48
|
+
slot,
|
|
49
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
50
|
+
];
|
|
51
|
+
}),
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
Object.assign(avatar, { splitVariantProps: (props) => splitVariantProps(props, avatarVariantMap) });
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
declare interface BadgeVariant {
|
|
2
|
+
/**
|
|
3
|
+
* @default medium
|
|
4
|
+
*/
|
|
5
|
+
size: "medium" | "large";
|
|
6
|
+
/**
|
|
7
|
+
* @default rectangle
|
|
8
|
+
*/
|
|
9
|
+
shape: "rectangle" | "pill";
|
|
10
|
+
/**
|
|
11
|
+
* @default solid
|
|
12
|
+
*/
|
|
13
|
+
variant: "weak" | "solid" | "outline";
|
|
14
|
+
/**
|
|
15
|
+
* @default neutral
|
|
16
|
+
*/
|
|
17
|
+
tone: "neutral" | "brand" | "informative" | "positive" | "critical";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare type BadgeVariantMap = {
|
|
21
|
+
[key in keyof BadgeVariant]: Array<BadgeVariant[key]>;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export declare type BadgeVariantProps = Partial<BadgeVariant>;
|
|
25
|
+
|
|
26
|
+
export declare type BadgeSlotName = "root";
|
|
27
|
+
|
|
28
|
+
export declare const badgeVariantMap: BadgeVariantMap;
|
|
29
|
+
|
|
30
|
+
export declare const badge: ((
|
|
31
|
+
props?: BadgeVariantProps,
|
|
32
|
+
) => Record<BadgeSlotName, string>) & {
|
|
33
|
+
splitVariantProps: <T extends BadgeVariantProps>(
|
|
34
|
+
props: T,
|
|
35
|
+
) => [BadgeVariantProps, Omit<T, keyof BadgeVariantProps>];
|
|
36
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { createClassName } from "./className.mjs";
|
|
2
|
+
import { mergeVariants } from "./mergeVariants.mjs";
|
|
3
|
+
import { splitVariantProps } from "./splitVariantProps.mjs";
|
|
4
|
+
|
|
5
|
+
const badgeSlotNames = [
|
|
6
|
+
[
|
|
7
|
+
"root",
|
|
8
|
+
"seed-badge__root"
|
|
9
|
+
]
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
const defaultVariant = {
|
|
13
|
+
"size": "medium",
|
|
14
|
+
"shape": "rectangle",
|
|
15
|
+
"variant": "solid",
|
|
16
|
+
"tone": "neutral"
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const compoundVariants = [
|
|
20
|
+
{
|
|
21
|
+
"shape": "rectangle",
|
|
22
|
+
"size": "medium"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"shape": "rectangle",
|
|
26
|
+
"size": "large"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"tone": "neutral",
|
|
30
|
+
"variant": "weak"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"tone": "neutral",
|
|
34
|
+
"variant": "solid"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"tone": "neutral",
|
|
38
|
+
"variant": "outline"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"tone": "brand",
|
|
42
|
+
"variant": "weak"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"tone": "brand",
|
|
46
|
+
"variant": "solid"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"tone": "brand",
|
|
50
|
+
"variant": "outline"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"tone": "informative",
|
|
54
|
+
"variant": "weak"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"tone": "informative",
|
|
58
|
+
"variant": "solid"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"tone": "informative",
|
|
62
|
+
"variant": "outline"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"tone": "positive",
|
|
66
|
+
"variant": "weak"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"tone": "positive",
|
|
70
|
+
"variant": "solid"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"tone": "positive",
|
|
74
|
+
"variant": "outline"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"tone": "critical",
|
|
78
|
+
"variant": "weak"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"tone": "critical",
|
|
82
|
+
"variant": "solid"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"tone": "critical",
|
|
86
|
+
"variant": "outline"
|
|
87
|
+
}
|
|
88
|
+
];
|
|
89
|
+
|
|
90
|
+
export const badgeVariantMap = {
|
|
91
|
+
"size": [
|
|
92
|
+
"medium",
|
|
93
|
+
"large"
|
|
94
|
+
],
|
|
95
|
+
"shape": [
|
|
96
|
+
"rectangle",
|
|
97
|
+
"pill"
|
|
98
|
+
],
|
|
99
|
+
"variant": [
|
|
100
|
+
"weak",
|
|
101
|
+
"solid",
|
|
102
|
+
"outline"
|
|
103
|
+
],
|
|
104
|
+
"tone": [
|
|
105
|
+
"neutral",
|
|
106
|
+
"brand",
|
|
107
|
+
"informative",
|
|
108
|
+
"positive",
|
|
109
|
+
"critical"
|
|
110
|
+
]
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export const badgeVariantKeys = Object.keys(badgeVariantMap);
|
|
114
|
+
|
|
115
|
+
export function badge(props) {
|
|
116
|
+
return Object.fromEntries(
|
|
117
|
+
badgeSlotNames.map(([slot, className]) => {
|
|
118
|
+
return [
|
|
119
|
+
slot,
|
|
120
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
121
|
+
];
|
|
122
|
+
}),
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
Object.assign(badge, { splitVariantProps: (props) => splitVariantProps(props, badgeVariantMap) });
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare interface BottomSheetVariant {
|
|
2
|
+
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
declare type BottomSheetVariantMap = {
|
|
6
|
+
[key in keyof BottomSheetVariant]: Array<BottomSheetVariant[key]>;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export declare type BottomSheetVariantProps = Partial<BottomSheetVariant>;
|
|
10
|
+
|
|
11
|
+
export declare type BottomSheetSlotName = "positioner" | "backdrop" | "content" | "header" | "body" | "footer" | "title" | "description" | "closeButton";
|
|
12
|
+
|
|
13
|
+
export declare const bottomSheetVariantMap: BottomSheetVariantMap;
|
|
14
|
+
|
|
15
|
+
export declare const bottomSheet: ((
|
|
16
|
+
props?: BottomSheetVariantProps,
|
|
17
|
+
) => Record<BottomSheetSlotName, string>) & {
|
|
18
|
+
splitVariantProps: <T extends BottomSheetVariantProps>(
|
|
19
|
+
props: T,
|
|
20
|
+
) => [BottomSheetVariantProps, Omit<T, keyof BottomSheetVariantProps>];
|
|
21
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { createClassName } from "./className.mjs";
|
|
2
|
+
import { mergeVariants } from "./mergeVariants.mjs";
|
|
3
|
+
import { splitVariantProps } from "./splitVariantProps.mjs";
|
|
4
|
+
|
|
5
|
+
const bottomSheetSlotNames = [
|
|
6
|
+
[
|
|
7
|
+
"positioner",
|
|
8
|
+
"seed-bottom-sheet__positioner"
|
|
9
|
+
],
|
|
10
|
+
[
|
|
11
|
+
"backdrop",
|
|
12
|
+
"seed-bottom-sheet__backdrop"
|
|
13
|
+
],
|
|
14
|
+
[
|
|
15
|
+
"content",
|
|
16
|
+
"seed-bottom-sheet__content"
|
|
17
|
+
],
|
|
18
|
+
[
|
|
19
|
+
"header",
|
|
20
|
+
"seed-bottom-sheet__header"
|
|
21
|
+
],
|
|
22
|
+
[
|
|
23
|
+
"body",
|
|
24
|
+
"seed-bottom-sheet__body"
|
|
25
|
+
],
|
|
26
|
+
[
|
|
27
|
+
"footer",
|
|
28
|
+
"seed-bottom-sheet__footer"
|
|
29
|
+
],
|
|
30
|
+
[
|
|
31
|
+
"title",
|
|
32
|
+
"seed-bottom-sheet__title"
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
"description",
|
|
36
|
+
"seed-bottom-sheet__description"
|
|
37
|
+
],
|
|
38
|
+
[
|
|
39
|
+
"closeButton",
|
|
40
|
+
"seed-bottom-sheet__closeButton"
|
|
41
|
+
]
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
const defaultVariant = {};
|
|
45
|
+
|
|
46
|
+
const compoundVariants = [];
|
|
47
|
+
|
|
48
|
+
export const bottomSheetVariantMap = {};
|
|
49
|
+
|
|
50
|
+
export const bottomSheetVariantKeys = Object.keys(bottomSheetVariantMap);
|
|
51
|
+
|
|
52
|
+
export function bottomSheet(props) {
|
|
53
|
+
return Object.fromEntries(
|
|
54
|
+
bottomSheetSlotNames.map(([slot, className]) => {
|
|
55
|
+
return [
|
|
56
|
+
slot,
|
|
57
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
58
|
+
];
|
|
59
|
+
}),
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
Object.assign(bottomSheet, { splitVariantProps: (props) => splitVariantProps(props, bottomSheetVariantMap) });
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare interface CalloutVariant {
|
|
2
|
+
/**
|
|
3
|
+
* @default neutral
|
|
4
|
+
*/
|
|
5
|
+
tone: "neutral" | "informative" | "warning" | "critical" | "magic";
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare type CalloutVariantMap = {
|
|
9
|
+
[key in keyof CalloutVariant]: Array<CalloutVariant[key]>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export declare type CalloutVariantProps = Partial<CalloutVariant>;
|
|
13
|
+
|
|
14
|
+
export declare type CalloutSlotName = "root" | "content" | "title" | "description" | "link" | "closeButton";
|
|
15
|
+
|
|
16
|
+
export declare const calloutVariantMap: CalloutVariantMap;
|
|
17
|
+
|
|
18
|
+
export declare const callout: ((
|
|
19
|
+
props?: CalloutVariantProps,
|
|
20
|
+
) => Record<CalloutSlotName, string>) & {
|
|
21
|
+
splitVariantProps: <T extends CalloutVariantProps>(
|
|
22
|
+
props: T,
|
|
23
|
+
) => [CalloutVariantProps, Omit<T, keyof CalloutVariantProps>];
|
|
24
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { createClassName } from "./className.mjs";
|
|
2
|
+
import { mergeVariants } from "./mergeVariants.mjs";
|
|
3
|
+
import { splitVariantProps } from "./splitVariantProps.mjs";
|
|
4
|
+
|
|
5
|
+
const calloutSlotNames = [
|
|
6
|
+
[
|
|
7
|
+
"root",
|
|
8
|
+
"seed-callout__root"
|
|
9
|
+
],
|
|
10
|
+
[
|
|
11
|
+
"content",
|
|
12
|
+
"seed-callout__content"
|
|
13
|
+
],
|
|
14
|
+
[
|
|
15
|
+
"title",
|
|
16
|
+
"seed-callout__title"
|
|
17
|
+
],
|
|
18
|
+
[
|
|
19
|
+
"description",
|
|
20
|
+
"seed-callout__description"
|
|
21
|
+
],
|
|
22
|
+
[
|
|
23
|
+
"link",
|
|
24
|
+
"seed-callout__link"
|
|
25
|
+
],
|
|
26
|
+
[
|
|
27
|
+
"closeButton",
|
|
28
|
+
"seed-callout__closeButton"
|
|
29
|
+
]
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
const defaultVariant = {
|
|
33
|
+
"tone": "neutral"
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const compoundVariants = [];
|
|
37
|
+
|
|
38
|
+
export const calloutVariantMap = {
|
|
39
|
+
"tone": [
|
|
40
|
+
"neutral",
|
|
41
|
+
"informative",
|
|
42
|
+
"warning",
|
|
43
|
+
"critical",
|
|
44
|
+
"magic"
|
|
45
|
+
]
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const calloutVariantKeys = Object.keys(calloutVariantMap);
|
|
49
|
+
|
|
50
|
+
export function callout(props) {
|
|
51
|
+
return Object.fromEntries(
|
|
52
|
+
calloutSlotNames.map(([slot, className]) => {
|
|
53
|
+
return [
|
|
54
|
+
slot,
|
|
55
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
56
|
+
];
|
|
57
|
+
}),
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
Object.assign(callout, { splitVariantProps: (props) => splitVariantProps(props, calloutVariantMap) });
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
declare interface CheckboxVariant {
|
|
2
|
+
/**
|
|
3
|
+
* @default default
|
|
4
|
+
*/
|
|
5
|
+
weight: "default" | "stronger";
|
|
6
|
+
/**
|
|
7
|
+
* @default square
|
|
8
|
+
*/
|
|
9
|
+
variant: "square" | "ghost";
|
|
10
|
+
/**
|
|
11
|
+
* @default medium
|
|
12
|
+
*/
|
|
13
|
+
size: "large" | "medium";
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare type CheckboxVariantMap = {
|
|
17
|
+
[key in keyof CheckboxVariant]: Array<CheckboxVariant[key]>;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export declare type CheckboxVariantProps = Partial<CheckboxVariant>;
|
|
21
|
+
|
|
22
|
+
export declare type CheckboxSlotName = "root" | "control" | "icon" | "label";
|
|
23
|
+
|
|
24
|
+
export declare const checkboxVariantMap: CheckboxVariantMap;
|
|
25
|
+
|
|
26
|
+
export declare const checkbox: ((
|
|
27
|
+
props?: CheckboxVariantProps,
|
|
28
|
+
) => Record<CheckboxSlotName, string>) & {
|
|
29
|
+
splitVariantProps: <T extends CheckboxVariantProps>(
|
|
30
|
+
props: T,
|
|
31
|
+
) => [CheckboxVariantProps, Omit<T, keyof CheckboxVariantProps>];
|
|
32
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { createClassName } from "./className.mjs";
|
|
2
|
+
import { mergeVariants } from "./mergeVariants.mjs";
|
|
3
|
+
import { splitVariantProps } from "./splitVariantProps.mjs";
|
|
4
|
+
|
|
5
|
+
const checkboxSlotNames = [
|
|
6
|
+
[
|
|
7
|
+
"root",
|
|
8
|
+
"seed-checkbox__root"
|
|
9
|
+
],
|
|
10
|
+
[
|
|
11
|
+
"control",
|
|
12
|
+
"seed-checkbox__control"
|
|
13
|
+
],
|
|
14
|
+
[
|
|
15
|
+
"icon",
|
|
16
|
+
"seed-checkbox__icon"
|
|
17
|
+
],
|
|
18
|
+
[
|
|
19
|
+
"label",
|
|
20
|
+
"seed-checkbox__label"
|
|
21
|
+
]
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
const defaultVariant = {
|
|
25
|
+
"size": "medium",
|
|
26
|
+
"variant": "square",
|
|
27
|
+
"weight": "default"
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const compoundVariants = [
|
|
31
|
+
{
|
|
32
|
+
"size": "medium",
|
|
33
|
+
"variant": "ghost"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"size": "large",
|
|
37
|
+
"variant": "ghost"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"size": "medium",
|
|
41
|
+
"variant": "square"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"size": "large",
|
|
45
|
+
"variant": "square"
|
|
46
|
+
}
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
export const checkboxVariantMap = {
|
|
50
|
+
"weight": [
|
|
51
|
+
"default",
|
|
52
|
+
"stronger"
|
|
53
|
+
],
|
|
54
|
+
"variant": [
|
|
55
|
+
"square",
|
|
56
|
+
"ghost"
|
|
57
|
+
],
|
|
58
|
+
"size": [
|
|
59
|
+
"large",
|
|
60
|
+
"medium"
|
|
61
|
+
]
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const checkboxVariantKeys = Object.keys(checkboxVariantMap);
|
|
65
|
+
|
|
66
|
+
export function checkbox(props) {
|
|
67
|
+
return Object.fromEntries(
|
|
68
|
+
checkboxSlotNames.map(([slot, className]) => {
|
|
69
|
+
return [
|
|
70
|
+
slot,
|
|
71
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
72
|
+
];
|
|
73
|
+
}),
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
Object.assign(checkbox, { splitVariantProps: (props) => splitVariantProps(props, checkboxVariantMap) });
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
declare interface ChipTabsVariant {
|
|
2
|
+
/**
|
|
3
|
+
* @default neutralSolid
|
|
4
|
+
*/
|
|
5
|
+
variant: "neutralSolid" | "brandSolid";
|
|
6
|
+
/**
|
|
7
|
+
* @default hug
|
|
8
|
+
*/
|
|
9
|
+
contentLayout: "fill" | "hug";
|
|
10
|
+
/**
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
stickyList: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare type ChipTabsVariantMap = {
|
|
17
|
+
[key in keyof ChipTabsVariant]: Array<ChipTabsVariant[key]>;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export declare type ChipTabsVariantProps = Partial<ChipTabsVariant>;
|
|
21
|
+
|
|
22
|
+
export declare type ChipTabsSlotName = "root" | "list" | "carousel" | "carouselCamera" | "content" | "trigger";
|
|
23
|
+
|
|
24
|
+
export declare const chipTabsVariantMap: ChipTabsVariantMap;
|
|
25
|
+
|
|
26
|
+
export declare const chipTabs: ((
|
|
27
|
+
props?: ChipTabsVariantProps,
|
|
28
|
+
) => Record<ChipTabsSlotName, string>) & {
|
|
29
|
+
splitVariantProps: <T extends ChipTabsVariantProps>(
|
|
30
|
+
props: T,
|
|
31
|
+
) => [ChipTabsVariantProps, Omit<T, keyof ChipTabsVariantProps>];
|
|
32
|
+
}
|