@cieloazul310/digital-go-pandacss-preset 0.0.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/.turbo/turbo-build.log +20 -0
- package/README.md +30 -0
- package/dist/index.d.mts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +3022 -0
- package/dist/index.mjs +2989 -0
- package/eslint.config.mjs +6 -0
- package/package.json +60 -0
- package/src/anatomy.ts +41 -0
- package/src/index.ts +32 -0
- package/src/recipes/accordion.ts +128 -0
- package/src/recipes/breadcrumb.ts +64 -0
- package/src/recipes/button.ts +192 -0
- package/src/recipes/checkbox.ts +297 -0
- package/src/recipes/disclosure.ts +98 -0
- package/src/recipes/divider.ts +21 -0
- package/src/recipes/drawer.ts +126 -0
- package/src/recipes/error-text.ts +16 -0
- package/src/recipes/hamburger-menu-button.ts +45 -0
- package/src/recipes/index.ts +71 -0
- package/src/recipes/input-text.ts +76 -0
- package/src/recipes/input.ts +81 -0
- package/src/recipes/label.ts +32 -0
- package/src/recipes/legend.ts +44 -0
- package/src/recipes/link.ts +66 -0
- package/src/recipes/list.ts +11 -0
- package/src/recipes/menu-item.ts +99 -0
- package/src/recipes/menu-list.ts +67 -0
- package/src/recipes/menu.ts +101 -0
- package/src/recipes/notification-banner.ts +246 -0
- package/src/recipes/ordered-list.ts +23 -0
- package/src/recipes/radio-group.ts +74 -0
- package/src/recipes/radio.ts +227 -0
- package/src/recipes/requirement-badge.ts +29 -0
- package/src/recipes/resource-list.ts +122 -0
- package/src/recipes/select-box.ts +81 -0
- package/src/recipes/select.ts +117 -0
- package/src/recipes/support-text.ts +16 -0
- package/src/recipes/table.ts +146 -0
- package/src/recipes/tabs.ts +90 -0
- package/src/recipes/textarea.ts +63 -0
- package/src/recipes/tree-view.ts +89 -0
- package/src/recipes/unordered-list.ts +19 -0
- package/src/recipes/utility-link.ts +56 -0
- package/tsconfig.json +4 -0
- package/tsup.config.ts +9 -0
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cieloazul310/digital-go-pandacss-preset",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"homepage": "https://github.com/cieloazul310/digital-go-design-system-with-panda",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "cieloazul310",
|
|
8
|
+
"url": "https://cieloazul310.github.io"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/cieloazul310/digital-go-design-system-with-panda.git",
|
|
13
|
+
"directory": "packages/preset"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public",
|
|
17
|
+
"registry": "https://registry.npmjs.org/"
|
|
18
|
+
},
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"main": "./dist/index.js",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"source": "./src/index.ts",
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"import": {
|
|
26
|
+
"types": "./dist/index.d.mts",
|
|
27
|
+
"default": "./dist/index.mjs"
|
|
28
|
+
},
|
|
29
|
+
"require": "./dist/index.js"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "tsup",
|
|
34
|
+
"dev": "npm run build -- --watch",
|
|
35
|
+
"eslint": "eslint src --fix",
|
|
36
|
+
"format": "prettier --parser typescript --write ."
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@cieloazul310/digital-go-pandacss-plugin": "^0.0.0",
|
|
40
|
+
"@cieloazul310/digital-go-pandacss-utils": "^0.0.0"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@ark-ui/anatomy": "^3.5.0",
|
|
44
|
+
"@pandacss/dev": "^0.53.7",
|
|
45
|
+
"@repo/eslint-config": "^0.0.0",
|
|
46
|
+
"@repo/typescript-config": "^0.0.0",
|
|
47
|
+
"eslint": "^9.28.0",
|
|
48
|
+
"tsup": "8.5.0",
|
|
49
|
+
"typescript": "5.8.3"
|
|
50
|
+
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"@ark-ui/anatomy": "^3.0.0"
|
|
53
|
+
},
|
|
54
|
+
"lint-staged": {
|
|
55
|
+
"**/*.{js,mjs,cjs,tsx,ts,tsx}": [
|
|
56
|
+
"eslint --fix",
|
|
57
|
+
"prettier --parser typescript --write"
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
package/src/anatomy.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* https://github.com/chakra-ui/chakra-ui/blob/main/packages/react/src/anatomy.ts
|
|
3
|
+
*/
|
|
4
|
+
import { createAnatomy } from "@ark-ui/react/anatomy";
|
|
5
|
+
|
|
6
|
+
export const breadcrumbAnatomy = createAnatomy("breadcrumb").parts(
|
|
7
|
+
"root",
|
|
8
|
+
"list",
|
|
9
|
+
"item",
|
|
10
|
+
"link",
|
|
11
|
+
"separator",
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
export const menuListAnatomy = createAnatomy("menu-list").parts(
|
|
15
|
+
"root",
|
|
16
|
+
"label",
|
|
17
|
+
"content",
|
|
18
|
+
"item",
|
|
19
|
+
"itemGroup",
|
|
20
|
+
"itemGroupLabel",
|
|
21
|
+
"itemText",
|
|
22
|
+
"itemIndicator",
|
|
23
|
+
"input",
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
export const notificationBannerAnatomy = createAnatomy(
|
|
27
|
+
"notification-banner",
|
|
28
|
+
).parts("root", "icon", "close", "header", "heading", "body");
|
|
29
|
+
|
|
30
|
+
export const resourceListAnatomy = createAnatomy("resource-list").parts(
|
|
31
|
+
"root",
|
|
32
|
+
"contentsContainer",
|
|
33
|
+
"functionButton",
|
|
34
|
+
"frontIcon",
|
|
35
|
+
"form",
|
|
36
|
+
"content",
|
|
37
|
+
"label",
|
|
38
|
+
"title",
|
|
39
|
+
"supportText",
|
|
40
|
+
"subLabel",
|
|
41
|
+
);
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { definePreset, type Preset } from "@pandacss/dev";
|
|
2
|
+
import presetBase from "@cieloazul310/digital-go-pandacss-plugin";
|
|
3
|
+
import {
|
|
4
|
+
createKeyColor,
|
|
5
|
+
type Palette,
|
|
6
|
+
} from "@cieloazul310/digital-go-pandacss-utils";
|
|
7
|
+
import recipes from "./recipes";
|
|
8
|
+
|
|
9
|
+
const base = {
|
|
10
|
+
name: "digital-go-pandacss-preset",
|
|
11
|
+
presets: [presetBase],
|
|
12
|
+
theme: {
|
|
13
|
+
recipes,
|
|
14
|
+
},
|
|
15
|
+
} satisfies Preset;
|
|
16
|
+
|
|
17
|
+
export default definePreset(base);
|
|
18
|
+
|
|
19
|
+
export const createPreset = (keyColor?: Palette) =>
|
|
20
|
+
definePreset({
|
|
21
|
+
...base,
|
|
22
|
+
theme: {
|
|
23
|
+
...base.theme,
|
|
24
|
+
extend: {
|
|
25
|
+
semanticTokens: {
|
|
26
|
+
colors: {
|
|
27
|
+
keyColor: createKeyColor(keyColor ?? "blue"),
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
});
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* source:
|
|
3
|
+
* https://github.com/digital-go-jp/design-system-example-components/blob/main/src/components/Accordion/Accordion.tsx
|
|
4
|
+
*/
|
|
5
|
+
import { defineSlotRecipe } from "@pandacss/dev";
|
|
6
|
+
import { anatomy as accordionAnatomy } from "@ark-ui/anatomy/accordion";
|
|
7
|
+
|
|
8
|
+
export default defineSlotRecipe({
|
|
9
|
+
className: "accordion",
|
|
10
|
+
slots: accordionAnatomy.keys(),
|
|
11
|
+
base: {
|
|
12
|
+
item: {
|
|
13
|
+
/**
|
|
14
|
+
* group/accordion border-b border-solid-gray-420
|
|
15
|
+
[--icon-size:calc(20/16*1rem)] desktop:[--icon-size:calc(32/16*1rem)]
|
|
16
|
+
${className ?? ''}
|
|
17
|
+
*/
|
|
18
|
+
borderBottomWidth: "1px",
|
|
19
|
+
borderBottomColor: "solid-gray.420",
|
|
20
|
+
"--icon-size": {
|
|
21
|
+
base: "calc(20 / 16 * 1rem)",
|
|
22
|
+
md: "calc(32 / 16 * 1rem)",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
itemTrigger: {
|
|
26
|
+
/**
|
|
27
|
+
* group/summary relative block cursor-default
|
|
28
|
+
*/
|
|
29
|
+
position: "relative",
|
|
30
|
+
display: "block",
|
|
31
|
+
/**
|
|
32
|
+
* hover:bg-solid-gray-50
|
|
33
|
+
* focus-visible:bg-yellow-300
|
|
34
|
+
*/
|
|
35
|
+
bg: {
|
|
36
|
+
base: "transparent",
|
|
37
|
+
_hover: "solid-gray.50",
|
|
38
|
+
_focusVisible: { base: "yellow.300", _hover: "yellow.300" },
|
|
39
|
+
},
|
|
40
|
+
/*
|
|
41
|
+
* py-2 pl-[calc(var(--icon-size)+(12/16*1rem))] pr-2
|
|
42
|
+
* desktop:py-3.5 desktop:pl-[calc(var(--icon-size)+(20/16*1rem))] desktop:pr-4
|
|
43
|
+
*/
|
|
44
|
+
py: { base: 2, md: 3.5 },
|
|
45
|
+
pl: {
|
|
46
|
+
base: "calc(var(--icon-size) + (12 / 16 * 1rem))",
|
|
47
|
+
md: "calc(var(--icon-size) + (20 / 16 * 1rem))",
|
|
48
|
+
},
|
|
49
|
+
pr: { base: 2, md: 4 },
|
|
50
|
+
cursor: { _hover: "pointer" },
|
|
51
|
+
/**
|
|
52
|
+
* marker:[content:'']
|
|
53
|
+
[&::-webkit-details-marker]:hidden
|
|
54
|
+
*/
|
|
55
|
+
"&::marker": { content: '""' },
|
|
56
|
+
/**
|
|
57
|
+
* focus-visible:rounded-4 focus-visible:outline focus-visible:outline-4 focus-visible:outline-offset-[calc(2/16*1rem)] focus-visible:outline-black focus-visible:ring-[calc(2/16*1rem)] focus-visible:ring-yellow-300
|
|
58
|
+
*/
|
|
59
|
+
_focusVisible: {
|
|
60
|
+
rounded: 4,
|
|
61
|
+
outlineStyle: "solid",
|
|
62
|
+
outlineWidth: "4px",
|
|
63
|
+
outlineColor: "black",
|
|
64
|
+
outlineOffset: "calc(2 / 16 * 1rem)",
|
|
65
|
+
focusRing: "calc(2 / 16 * 1rem)",
|
|
66
|
+
},
|
|
67
|
+
/**
|
|
68
|
+
* remove button style
|
|
69
|
+
*/
|
|
70
|
+
textAlign: "start",
|
|
71
|
+
width: "full",
|
|
72
|
+
},
|
|
73
|
+
itemIndicator: {
|
|
74
|
+
/**
|
|
75
|
+
* absolute top-2 left-0.5
|
|
76
|
+
* desktop:top-3.5 desktop:left-1.5
|
|
77
|
+
* size-[var(--icon-size)]
|
|
78
|
+
* mt-[calc((1lh-var(--icon-size))/2)]
|
|
79
|
+
*/
|
|
80
|
+
position: "absolute",
|
|
81
|
+
top: { base: 2, md: 3.5 },
|
|
82
|
+
left: { base: 0.5, md: 1.5 },
|
|
83
|
+
width: "var(--icon-size)",
|
|
84
|
+
height: "var(--icon-size)",
|
|
85
|
+
mt: "calc((1lh - var(--icon-size)) / 2)",
|
|
86
|
+
/**
|
|
87
|
+
* inline-flex items-center justify-center
|
|
88
|
+
*/
|
|
89
|
+
display: "inline-flex",
|
|
90
|
+
alignItems: "center",
|
|
91
|
+
justifyContent: "center",
|
|
92
|
+
/**
|
|
93
|
+
* bg-white text-blue-1000
|
|
94
|
+
*/
|
|
95
|
+
bg: "white",
|
|
96
|
+
color: "keyColor.1000",
|
|
97
|
+
/**
|
|
98
|
+
* border border-current rounded-full
|
|
99
|
+
group-hover/summary:outline group-hover/summary:outline-2 group-hover/summary:outline-current
|
|
100
|
+
group-open/accordion:rotate-180
|
|
101
|
+
*/
|
|
102
|
+
borderWidth: "1px",
|
|
103
|
+
borderColor: "currentcolor",
|
|
104
|
+
rounded: "full",
|
|
105
|
+
outlineStyle: "solid",
|
|
106
|
+
outlineWidth: { base: "0px", _groupHover: "2px" },
|
|
107
|
+
transformOrigin: "center",
|
|
108
|
+
transitionDuration: "normal",
|
|
109
|
+
transitionProperty: "transform",
|
|
110
|
+
transitionTimingFunction: "default",
|
|
111
|
+
_open: {
|
|
112
|
+
transform: "rotate(-180deg)",
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
itemContent: {
|
|
116
|
+
/**
|
|
117
|
+
* pl-[calc(var(--icon-size)+(12/16*1rem))] pr-2 py-4
|
|
118
|
+
desktop:pl-[calc(var(--icon-size)+(20/16*1rem))] desktop:pr-4 desktop:py-6
|
|
119
|
+
*/
|
|
120
|
+
pl: {
|
|
121
|
+
base: "calc(var(--icon-size) + (12 / 16 * 1rem))",
|
|
122
|
+
md: "calc(var(--icon-size) + (20 / 16 * 1rem))",
|
|
123
|
+
},
|
|
124
|
+
pr: { base: 2, md: 4 },
|
|
125
|
+
py: { base: 4, md: 6 },
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* source:
|
|
3
|
+
* https://github.com/digital-go-jp/design-system-example-components/blob/main/src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
4
|
+
*/
|
|
5
|
+
import { defineSlotRecipe } from "@pandacss/dev";
|
|
6
|
+
import { breadcrumbAnatomy } from "../anatomy";
|
|
7
|
+
import link from "./link";
|
|
8
|
+
|
|
9
|
+
export default defineSlotRecipe({
|
|
10
|
+
className: "breadcrumb",
|
|
11
|
+
description:
|
|
12
|
+
"パンくずリストは、ウェブサイトの階層内でユーザーの現在の位置を表示します。",
|
|
13
|
+
slots: breadcrumbAnatomy.keys(),
|
|
14
|
+
base: {
|
|
15
|
+
root: {
|
|
16
|
+
/**
|
|
17
|
+
* icon
|
|
18
|
+
*/
|
|
19
|
+
"--icon-size": "16px",
|
|
20
|
+
},
|
|
21
|
+
list: {
|
|
22
|
+
/**
|
|
23
|
+
* inline
|
|
24
|
+
*/
|
|
25
|
+
display: "inline",
|
|
26
|
+
},
|
|
27
|
+
item: {
|
|
28
|
+
/**
|
|
29
|
+
* inline break-words text-oln-16N-100
|
|
30
|
+
*/
|
|
31
|
+
display: "inline",
|
|
32
|
+
overflowWrap: "break-word",
|
|
33
|
+
textStyle: "oln-16N-100",
|
|
34
|
+
},
|
|
35
|
+
link: {
|
|
36
|
+
/**
|
|
37
|
+
* text-blue-1000 text-oln-16N-100 underline underline-offset-[calc(3/16*1rem)]
|
|
38
|
+
* hover:text-blue-900 hover:decoration-[calc(3/16*1rem)]
|
|
39
|
+
* active:text-orange-700 active:decoration-1
|
|
40
|
+
* focus-visible:rounded-4 focus-visible:outline focus-visible:outline-4
|
|
41
|
+
* focus-visible:outline-black focus-visible:outline-offset-[calc(2/16*1rem)]
|
|
42
|
+
* focus-visible:bg-yellow-300 focus-visible:text-blue-1000
|
|
43
|
+
* focus-visible:ring-[calc(2/16*1rem)] focus-visible:ring-yellow-300
|
|
44
|
+
*/
|
|
45
|
+
...link.base,
|
|
46
|
+
/**
|
|
47
|
+
* icon
|
|
48
|
+
*/
|
|
49
|
+
"& svg": {
|
|
50
|
+
display: "inline",
|
|
51
|
+
width: "var(--icon-size)",
|
|
52
|
+
height: "var(--icon-size)",
|
|
53
|
+
mr: 1,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
separator: {
|
|
57
|
+
/**
|
|
58
|
+
* mx-2 inline
|
|
59
|
+
*/
|
|
60
|
+
mx: 2,
|
|
61
|
+
display: "inline",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
});
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* source:
|
|
3
|
+
* https://github.com/digital-go-jp/design-system-example-components/blob/main/src/components/Button/Button.tsx
|
|
4
|
+
*/
|
|
5
|
+
import { defineRecipe } from "@pandacss/dev";
|
|
6
|
+
|
|
7
|
+
export default defineRecipe({
|
|
8
|
+
className: "button",
|
|
9
|
+
description:
|
|
10
|
+
"ボタンは、主にアクション実行またはページ遷移のためのトリガーとして使用します。画面内におけるボタンの重要度に応じて使い分け可能な複数のスタイルがあります。",
|
|
11
|
+
base: {
|
|
12
|
+
/**
|
|
13
|
+
* underline-offset-[calc(3/16*1rem)]
|
|
14
|
+
*/
|
|
15
|
+
textUnderlineOffset: "calc(3 / 16 * 1rem)",
|
|
16
|
+
/**
|
|
17
|
+
* focus-visible:outline focus-visible:outline-4 focus-visible:outline-black
|
|
18
|
+
* focus-visible:outline-offset-[calc(2/16*1rem)]
|
|
19
|
+
* focus-visible:ring-[calc(2/16*1rem)] focus-visible:ring-yellow-300
|
|
20
|
+
*/
|
|
21
|
+
_focusVisible: {
|
|
22
|
+
outlineStyle: "solid",
|
|
23
|
+
outlineWidth: "4px",
|
|
24
|
+
outlineColor: "black",
|
|
25
|
+
outlineOffset: "calc(2 / 16 * 1rem)",
|
|
26
|
+
focusRing: "calc(2 / 16 * 1rem)",
|
|
27
|
+
},
|
|
28
|
+
/**
|
|
29
|
+
* aria-disabled:pointer-events-none aria-disabled:forced-colors:border-[GrayText] aria-disabled:forced-colors:text-[GrayText]
|
|
30
|
+
*/
|
|
31
|
+
_disabled: {
|
|
32
|
+
pointerEvents: "none",
|
|
33
|
+
},
|
|
34
|
+
/**
|
|
35
|
+
* button default
|
|
36
|
+
*/
|
|
37
|
+
display: "inline-flex",
|
|
38
|
+
textAlign: "center",
|
|
39
|
+
alignItems: "center",
|
|
40
|
+
justifyContent: "center",
|
|
41
|
+
cursor: "pointer",
|
|
42
|
+
},
|
|
43
|
+
variants: {
|
|
44
|
+
variant: {
|
|
45
|
+
"solid-fill": {
|
|
46
|
+
/**
|
|
47
|
+
* text-white aria-disabled:text-solid-gray-50
|
|
48
|
+
* bg-blue-900 hover:bg-blue-1000 active:bg-blue-1200 aria-disabled:bg-solid-gray-300
|
|
49
|
+
*/
|
|
50
|
+
bg: {
|
|
51
|
+
base: "keyColor.900",
|
|
52
|
+
_hover: "keyColor.1000",
|
|
53
|
+
_active: "keyColor.1200",
|
|
54
|
+
_disabled: "solid-gray.300",
|
|
55
|
+
},
|
|
56
|
+
color: { base: "white", _disabled: "solid-gray.50" },
|
|
57
|
+
/**
|
|
58
|
+
* border-4 border-double border-transparent
|
|
59
|
+
* hover:underline active:underline
|
|
60
|
+
*/
|
|
61
|
+
borderWidth: "4px",
|
|
62
|
+
borderStyle: "double",
|
|
63
|
+
borderColor: "transparent",
|
|
64
|
+
textDecoration: {
|
|
65
|
+
base: "none",
|
|
66
|
+
_hover: "underline",
|
|
67
|
+
_active: "underline",
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
outline: {
|
|
71
|
+
/**
|
|
72
|
+
* bg-white hover:bg-blue-200 active:bg-blue-300 aria-disabled:bg-white
|
|
73
|
+
* text-blue-900 hover:text-blue-1000 active:text-blue-1200
|
|
74
|
+
* aria-disabled:text-solid-gray-300
|
|
75
|
+
*/
|
|
76
|
+
bg: {
|
|
77
|
+
base: "white",
|
|
78
|
+
_hover: "keyColor.200",
|
|
79
|
+
_active: "keyColor.300",
|
|
80
|
+
_disabled: "white",
|
|
81
|
+
},
|
|
82
|
+
color: {
|
|
83
|
+
base: "keyColor.900",
|
|
84
|
+
_hover: "keyColor.1000",
|
|
85
|
+
_active: "keyColor.1200",
|
|
86
|
+
_disabled: "solid-gray.300",
|
|
87
|
+
},
|
|
88
|
+
/**
|
|
89
|
+
* border border-current hover:underline active:underline
|
|
90
|
+
*/
|
|
91
|
+
borderWidth: "1px",
|
|
92
|
+
borderColor: "currentcolor",
|
|
93
|
+
textDecoration: {
|
|
94
|
+
base: "none",
|
|
95
|
+
_hover: "underline",
|
|
96
|
+
_active: "underline",
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
text: {
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* hover:bg-blue-50 active:bg-blue-100 focus-visible:bg-yellow-300
|
|
103
|
+
* aria-disabled:bg-transparent aria-disabled:focus-visible:bg-yellow-300
|
|
104
|
+
* text-blue-900 hover:text-blue-1000 active:text-blue-1200
|
|
105
|
+
* aria-disabled:text-solid-gray-300
|
|
106
|
+
*/
|
|
107
|
+
bg: {
|
|
108
|
+
base: "transparent",
|
|
109
|
+
_hover: "keyColor.50",
|
|
110
|
+
_active: "keyColor.100",
|
|
111
|
+
_focusVisible: { base: "yellow.300", _hover: "yellow.300" },
|
|
112
|
+
_disabled: "transparent",
|
|
113
|
+
},
|
|
114
|
+
color: {
|
|
115
|
+
base: "keyColor.900",
|
|
116
|
+
_hover: "keyColor.1000",
|
|
117
|
+
_active: "keyColor.1200",
|
|
118
|
+
_disabled: "solid-gray.300",
|
|
119
|
+
},
|
|
120
|
+
/**
|
|
121
|
+
* hover:decoration-[calc(3/16*1rem)] underline
|
|
122
|
+
*/
|
|
123
|
+
textDecoration: "underline",
|
|
124
|
+
textDecorationThickness: { base: "1px", _hover: "calc(3 / 16 * 1rem)" },
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
size: {
|
|
128
|
+
lg: {
|
|
129
|
+
/**
|
|
130
|
+
* lg: 'min-w-[calc(136/16*1rem)] min-h-14 rounded-8 px-4 py-3 text-oln-16B-100'
|
|
131
|
+
*/
|
|
132
|
+
minWidth: "calc(136 / 16 * 1rem)",
|
|
133
|
+
minHeight: 14,
|
|
134
|
+
rounded: 8,
|
|
135
|
+
px: 4,
|
|
136
|
+
py: 3,
|
|
137
|
+
textStyle: "oln-16B-100",
|
|
138
|
+
},
|
|
139
|
+
md: {
|
|
140
|
+
/**
|
|
141
|
+
* md: 'min-w-24 min-h-12 rounded-8 px-4 py-2 text-oln-16B-100',
|
|
142
|
+
*/
|
|
143
|
+
minWidth: 24,
|
|
144
|
+
minHeight: 12,
|
|
145
|
+
textStyle: "oln-16B-100",
|
|
146
|
+
px: 4,
|
|
147
|
+
py: 2,
|
|
148
|
+
rounded: 8,
|
|
149
|
+
},
|
|
150
|
+
sm: {
|
|
151
|
+
/**
|
|
152
|
+
* sm: 'relative min-w-20 min-h-9 rounded-6 px-3 py-0.5 text-oln-16B-100 after:absolute after:inset-x-0 after:-inset-y-full after:m-auto after:h-[44px]',
|
|
153
|
+
*/
|
|
154
|
+
position: "relative",
|
|
155
|
+
minWidth: 20,
|
|
156
|
+
minHeight: 9,
|
|
157
|
+
textStyle: "oln-16B-100",
|
|
158
|
+
py: 0.5,
|
|
159
|
+
rounded: 6,
|
|
160
|
+
_after: {
|
|
161
|
+
position: "absolute",
|
|
162
|
+
insetInline: 0,
|
|
163
|
+
insetBlock: "full",
|
|
164
|
+
m: "auto",
|
|
165
|
+
height: "44px",
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
xs: {
|
|
169
|
+
/**
|
|
170
|
+
* xs: 'relative min-w-18 min-h-7 rounded-4 px-2 py-0.5 text-oln-14B-100 after:absolute after:inset-x-0 after:-inset-y-full after:m-auto after:h-[44px]',
|
|
171
|
+
*/
|
|
172
|
+
minWidth: 18,
|
|
173
|
+
minHeight: 7,
|
|
174
|
+
textStyle: "oln-14B-100",
|
|
175
|
+
px: 2,
|
|
176
|
+
py: 0.5,
|
|
177
|
+
rounded: 4,
|
|
178
|
+
_after: {
|
|
179
|
+
position: "absolute",
|
|
180
|
+
insetInline: 0,
|
|
181
|
+
insetBlock: "full",
|
|
182
|
+
m: "auto",
|
|
183
|
+
height: "44px",
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
defaultVariants: {
|
|
189
|
+
variant: "solid-fill",
|
|
190
|
+
size: "md",
|
|
191
|
+
},
|
|
192
|
+
});
|