@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
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { defineSlotRecipe } from "@pandacss/dev";
|
|
2
|
+
import { resourceListAnatomy } from "../anatomy";
|
|
3
|
+
|
|
4
|
+
export default defineSlotRecipe({
|
|
5
|
+
className: "resource-list",
|
|
6
|
+
slots: resourceListAnatomy.keys(),
|
|
7
|
+
base: {
|
|
8
|
+
root: {
|
|
9
|
+
display: "flex",
|
|
10
|
+
borderColor: "solid-gray.420",
|
|
11
|
+
bg: {
|
|
12
|
+
"&:has(input:checked)": "keyColor.50",
|
|
13
|
+
_selected: "keyColor.50",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
contentsContainer: {
|
|
17
|
+
display: "flex",
|
|
18
|
+
flexGrow: 1,
|
|
19
|
+
flexDirection: "row",
|
|
20
|
+
alignItems: "center",
|
|
21
|
+
justifyContent: "start",
|
|
22
|
+
gap: { base: 4, md: 6 },
|
|
23
|
+
/**
|
|
24
|
+
* p-4 md:px-6 md:py-4
|
|
25
|
+
*/
|
|
26
|
+
py: 4,
|
|
27
|
+
px: { base: 4, md: 6 },
|
|
28
|
+
bg: { base: "transparent", _hover: "solid-gray.50" },
|
|
29
|
+
_focusVisible: {
|
|
30
|
+
outlineStyle: "solid",
|
|
31
|
+
outlineWidth: "4px",
|
|
32
|
+
outlineColor: "black",
|
|
33
|
+
outlineOffset: "calc(2 / 16 * 1rem)",
|
|
34
|
+
focusRing: "calc(2 / 16 * 1rem)",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
functionButton: {
|
|
38
|
+
p: 4,
|
|
39
|
+
display: "flex",
|
|
40
|
+
alignItems: "center",
|
|
41
|
+
justifyContent: "center",
|
|
42
|
+
},
|
|
43
|
+
frontIcon: {
|
|
44
|
+
// px: 2,
|
|
45
|
+
},
|
|
46
|
+
content: {
|
|
47
|
+
height: "full",
|
|
48
|
+
flexGrow: 1,
|
|
49
|
+
display: "flex",
|
|
50
|
+
flexDirection: "column",
|
|
51
|
+
},
|
|
52
|
+
title: {
|
|
53
|
+
/**
|
|
54
|
+
* mb-4 text-std-20B-150 font-bold group-hover:text-blue-1000 group-hover:decoration-[calc(3/16*1rem)] md:mb-4
|
|
55
|
+
*/
|
|
56
|
+
textStyle: "std-20B-150",
|
|
57
|
+
width: "fit-content",
|
|
58
|
+
},
|
|
59
|
+
label: {
|
|
60
|
+
zIndex: 1,
|
|
61
|
+
width: "fit-content",
|
|
62
|
+
textStyle: "oln-17N-100",
|
|
63
|
+
color: "solid-gray.800",
|
|
64
|
+
},
|
|
65
|
+
supportText: {
|
|
66
|
+
color: "solid-gray.800",
|
|
67
|
+
},
|
|
68
|
+
subLabel: {
|
|
69
|
+
zIndex: 1,
|
|
70
|
+
color: "solid-gray.800",
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
variants: {
|
|
74
|
+
variant: {
|
|
75
|
+
list: {
|
|
76
|
+
root: {
|
|
77
|
+
borderBottomWidth: "1px",
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
frame: {
|
|
81
|
+
root: {
|
|
82
|
+
rounded: 16,
|
|
83
|
+
borderWidth: "1px",
|
|
84
|
+
},
|
|
85
|
+
contentsContainer: {
|
|
86
|
+
borderTopLeftRadius: 16,
|
|
87
|
+
borderBottomLeftRadius: 16,
|
|
88
|
+
_only: {
|
|
89
|
+
borderTopRightRadius: 16,
|
|
90
|
+
borderBottomRightRadius: 16,
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
functionButton: {
|
|
94
|
+
borderTopRightRadius: 16,
|
|
95
|
+
borderBottomRightRadius: 16,
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
asLink: {
|
|
100
|
+
true: {
|
|
101
|
+
contentsContainer: {
|
|
102
|
+
position: "relative",
|
|
103
|
+
},
|
|
104
|
+
title: {
|
|
105
|
+
_before: {
|
|
106
|
+
content: '""',
|
|
107
|
+
position: "absolute",
|
|
108
|
+
top: 0,
|
|
109
|
+
left: 0,
|
|
110
|
+
width: "full",
|
|
111
|
+
height: "full",
|
|
112
|
+
zIndex: 0,
|
|
113
|
+
cursor: "inherit",
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
supportText: {
|
|
117
|
+
textDecoration: { base: "none", _groupHover: "underline" },
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
});
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* source:
|
|
3
|
+
* https://github.com/digital-go-jp/design-system-example-components/blob/main/src/components/Select/Select.tsx
|
|
4
|
+
*/
|
|
5
|
+
import { defineRecipe } from "@pandacss/dev";
|
|
6
|
+
|
|
7
|
+
export default defineRecipe({
|
|
8
|
+
className: "select-box",
|
|
9
|
+
description:
|
|
10
|
+
"セレクトボックスは、複数の選択肢を提供するフォームコントロールです。",
|
|
11
|
+
base: {
|
|
12
|
+
/**
|
|
13
|
+
* w-full pl-4 pr-10 py-[calc(11/16*1rem)]
|
|
14
|
+
* appearance-none rounded-8
|
|
15
|
+
* aria-disabled:pointer-events-none
|
|
16
|
+
*/
|
|
17
|
+
width: "full",
|
|
18
|
+
appearance: "none",
|
|
19
|
+
pl: 4,
|
|
20
|
+
pr: 10,
|
|
21
|
+
py: "calc(11 / 16 * 1rem)",
|
|
22
|
+
rounded: 8,
|
|
23
|
+
pointerEvents: { base: "inherit", _disabled: "none" },
|
|
24
|
+
/**
|
|
25
|
+
* bg-white text-oln-16N-100 text-solid-gray-800
|
|
26
|
+
* aria-disabled:text-solid-gray-420
|
|
27
|
+
* aria-disabled:forced-colors:text-[GrayText]
|
|
28
|
+
*/
|
|
29
|
+
bg: { base: "white", _disabled: "solid-gray.50" },
|
|
30
|
+
color: { base: "solid-gray.800", _disabled: "solid-gray.420" },
|
|
31
|
+
textStyle: "oln-16N-100",
|
|
32
|
+
/**
|
|
33
|
+
* border border-solid-gray-600 hover:border-black
|
|
34
|
+
* aria-disabled:border-solid-gray-300 aria-disabled:bg-solid-gray-50
|
|
35
|
+
* aria-disabled:forced-colors:border-[GrayText]
|
|
36
|
+
*/
|
|
37
|
+
borderWidth: "1px",
|
|
38
|
+
borderColor: {
|
|
39
|
+
base: "solid-gray.900",
|
|
40
|
+
_disabled: "solid-gray.300",
|
|
41
|
+
},
|
|
42
|
+
/**
|
|
43
|
+
* remove button style
|
|
44
|
+
*/
|
|
45
|
+
textAlign: "start",
|
|
46
|
+
/**
|
|
47
|
+
* focus:outline focus:outline-4 focus:outline-black focus:outline-offset-[calc(2/16*1rem)] focus:ring-[calc(2/16*1rem)] focus:ring-yellow-300
|
|
48
|
+
*/
|
|
49
|
+
_focus: {
|
|
50
|
+
outlineStyle: "solid",
|
|
51
|
+
outlineWidth: "4px",
|
|
52
|
+
outlineColor: "black",
|
|
53
|
+
outlineOffset: "calc(2 / 16 * 1rem)",
|
|
54
|
+
focusRing: "calc(2 / 16 * 1rem)",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
variants: {
|
|
58
|
+
size: {
|
|
59
|
+
/**
|
|
60
|
+
* data-[size=sm]:h-10 data-[size=md]:h-12 data-[size=lg]:h-14
|
|
61
|
+
*/
|
|
62
|
+
sm: {
|
|
63
|
+
height: 10,
|
|
64
|
+
},
|
|
65
|
+
md: {
|
|
66
|
+
height: 12,
|
|
67
|
+
},
|
|
68
|
+
lg: {
|
|
69
|
+
height: 14,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
invalid: {
|
|
73
|
+
/**
|
|
74
|
+
* aria-[invalid=true]:border-error-1aria-[invalid=true]:hover:border-red-1000
|
|
75
|
+
*/
|
|
76
|
+
true: {
|
|
77
|
+
borderColor: { base: "error.1", _hover: "red.1000" },
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
});
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* source:
|
|
3
|
+
* https://github.com/digital-go-jp/design-system-example-components/blob/main/src/components/Select/Select.tsx
|
|
4
|
+
*/
|
|
5
|
+
import { defineSlotRecipe } from "@pandacss/dev";
|
|
6
|
+
import { anatomy as selectAnatomy } from "@ark-ui/anatomy/select";
|
|
7
|
+
import label from "./label";
|
|
8
|
+
import selectBox from "./select-box";
|
|
9
|
+
import menu from "./menu";
|
|
10
|
+
|
|
11
|
+
export default defineSlotRecipe({
|
|
12
|
+
className: "select",
|
|
13
|
+
description:
|
|
14
|
+
"セレクトボックスは、複数の選択肢を提供するフォームコントロールです。",
|
|
15
|
+
slots: selectAnatomy.keys(),
|
|
16
|
+
base: {
|
|
17
|
+
root: {
|
|
18
|
+
display: "flex",
|
|
19
|
+
flexDirection: "column",
|
|
20
|
+
gap: 1.5,
|
|
21
|
+
},
|
|
22
|
+
label: {
|
|
23
|
+
...label.base,
|
|
24
|
+
},
|
|
25
|
+
control: {
|
|
26
|
+
/**
|
|
27
|
+
* relative min-w-80 max-w-full
|
|
28
|
+
*/
|
|
29
|
+
position: "relative",
|
|
30
|
+
minWidth: "80px",
|
|
31
|
+
maxWidth: "full",
|
|
32
|
+
},
|
|
33
|
+
trigger: {
|
|
34
|
+
...selectBox.base,
|
|
35
|
+
/**
|
|
36
|
+
* adapt to clearTrigger
|
|
37
|
+
*/
|
|
38
|
+
pr: 20,
|
|
39
|
+
},
|
|
40
|
+
indicator: {
|
|
41
|
+
/**
|
|
42
|
+
* pointer-events-none absolute right-4 top-1/2 -translate-y-1/2
|
|
43
|
+
*/
|
|
44
|
+
pointerEvents: "none",
|
|
45
|
+
position: "absolute",
|
|
46
|
+
top: "50%",
|
|
47
|
+
transform: "translateY(-50%)",
|
|
48
|
+
right: 4,
|
|
49
|
+
/**
|
|
50
|
+
* ${props['aria-disabled'] ? 'text-solid-gray-420 forced-colors:text-[GrayText]' : 'text-solid-gray-900 forced-colors:text-[CanvasText]'}
|
|
51
|
+
*/
|
|
52
|
+
color: {
|
|
53
|
+
base: { base: "solid-gray.900", _highContrast: "CanvasText" },
|
|
54
|
+
_disabled: { base: "solid-gray.420", _highContrast: "GrayText" },
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
clearTrigger: {
|
|
58
|
+
position: "absolute",
|
|
59
|
+
top: "50%",
|
|
60
|
+
right: 12,
|
|
61
|
+
transform: "translateY(-50%)",
|
|
62
|
+
},
|
|
63
|
+
content: {
|
|
64
|
+
...menu.base?.content,
|
|
65
|
+
},
|
|
66
|
+
itemGroupLabel: {
|
|
67
|
+
textStyle: "oln-16N-1",
|
|
68
|
+
fontWeight: "bold",
|
|
69
|
+
py: 3,
|
|
70
|
+
pl: 3,
|
|
71
|
+
pr: 6,
|
|
72
|
+
},
|
|
73
|
+
item: {
|
|
74
|
+
...menu.base?.item,
|
|
75
|
+
},
|
|
76
|
+
itemIndicator: {
|
|
77
|
+
pointerEvents: "none",
|
|
78
|
+
position: "absolute",
|
|
79
|
+
right: 4,
|
|
80
|
+
top: "50%",
|
|
81
|
+
transform: "translateY(-50%)",
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
variants: {
|
|
85
|
+
size: {
|
|
86
|
+
lg: {
|
|
87
|
+
trigger: {
|
|
88
|
+
...selectBox.variants?.size?.lg,
|
|
89
|
+
},
|
|
90
|
+
label: { ...label.variants?.size?.lg },
|
|
91
|
+
},
|
|
92
|
+
md: {
|
|
93
|
+
trigger: {
|
|
94
|
+
...selectBox.variants?.size?.md,
|
|
95
|
+
},
|
|
96
|
+
label: { ...label.variants?.size?.md },
|
|
97
|
+
},
|
|
98
|
+
sm: {
|
|
99
|
+
trigger: {
|
|
100
|
+
...selectBox.variants?.size?.sm,
|
|
101
|
+
},
|
|
102
|
+
label: { ...label.variants?.size?.sm },
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
invalid: {
|
|
106
|
+
true: {
|
|
107
|
+
trigger: {
|
|
108
|
+
...selectBox.variants?.invalid?.true,
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
defaultVariants: {
|
|
114
|
+
size: "lg",
|
|
115
|
+
invalid: false,
|
|
116
|
+
},
|
|
117
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* source:
|
|
3
|
+
* https://github.com/digital-go-jp/design-system-example-components/blob/main/src/components/SupportText/SupportText.tsx
|
|
4
|
+
*/
|
|
5
|
+
import { defineRecipe } from "@pandacss/dev";
|
|
6
|
+
|
|
7
|
+
export default defineRecipe({
|
|
8
|
+
className: "support-text",
|
|
9
|
+
base: {
|
|
10
|
+
/**
|
|
11
|
+
* text-std-16N-170 text-solid-gray-700
|
|
12
|
+
*/
|
|
13
|
+
textStyle: "dns-16N-170",
|
|
14
|
+
color: "solid-gray.700",
|
|
15
|
+
},
|
|
16
|
+
});
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* source:
|
|
3
|
+
* https://github.com/digital-go-jp/design-system-example-components/blob/main/src/components/Table/Table.stories.tsx
|
|
4
|
+
*/
|
|
5
|
+
import { defineSlotRecipe } from "@pandacss/dev";
|
|
6
|
+
|
|
7
|
+
export default defineSlotRecipe({
|
|
8
|
+
className: "table",
|
|
9
|
+
slots: [
|
|
10
|
+
"root",
|
|
11
|
+
"head",
|
|
12
|
+
"body",
|
|
13
|
+
"foot",
|
|
14
|
+
"row",
|
|
15
|
+
"header",
|
|
16
|
+
"cell",
|
|
17
|
+
"colgroup",
|
|
18
|
+
"col",
|
|
19
|
+
"caption",
|
|
20
|
+
],
|
|
21
|
+
base: {
|
|
22
|
+
root: {
|
|
23
|
+
/**
|
|
24
|
+
* w-full text-std-16N-170
|
|
25
|
+
*/
|
|
26
|
+
width: "full",
|
|
27
|
+
},
|
|
28
|
+
head: {
|
|
29
|
+
"& tr": {
|
|
30
|
+
/**
|
|
31
|
+
* border-black bg-solid-gray-50
|
|
32
|
+
*/
|
|
33
|
+
borderColor: "black",
|
|
34
|
+
bg: "solid-gray.50",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
body: {
|
|
38
|
+
"& tr": {
|
|
39
|
+
/**
|
|
40
|
+
* border-solid-gray-420
|
|
41
|
+
*/
|
|
42
|
+
borderColor: "solid-gray.420",
|
|
43
|
+
/**
|
|
44
|
+
* [&:has(input:checked)]:bg-blue-100
|
|
45
|
+
*/
|
|
46
|
+
/*
|
|
47
|
+
"&:has(input:checked)": {
|
|
48
|
+
bg: "keyColor.100",
|
|
49
|
+
},
|
|
50
|
+
*/
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
foot: {},
|
|
54
|
+
row: {
|
|
55
|
+
/**
|
|
56
|
+
* border-b
|
|
57
|
+
*/
|
|
58
|
+
borderBottomWidth: "1px",
|
|
59
|
+
"tbody > &:has(input:checked)": { bg: "keyColor.100" },
|
|
60
|
+
},
|
|
61
|
+
header: {
|
|
62
|
+
/**
|
|
63
|
+
* px-4 text-start align-top
|
|
64
|
+
*/
|
|
65
|
+
px: 4,
|
|
66
|
+
verticalAlign: "top",
|
|
67
|
+
textAlign: "start",
|
|
68
|
+
},
|
|
69
|
+
cell: {
|
|
70
|
+
/**
|
|
71
|
+
* px-4 align-top
|
|
72
|
+
*/
|
|
73
|
+
px: 4,
|
|
74
|
+
verticalAlign: "top",
|
|
75
|
+
},
|
|
76
|
+
caption: {
|
|
77
|
+
mb: 4,
|
|
78
|
+
textStyle: "oln-17B-100",
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
variants: {
|
|
82
|
+
dense: {
|
|
83
|
+
false: {
|
|
84
|
+
root: {
|
|
85
|
+
textStyle: "std-16N-170",
|
|
86
|
+
},
|
|
87
|
+
header: {
|
|
88
|
+
/**
|
|
89
|
+
* py-5
|
|
90
|
+
*/
|
|
91
|
+
py: 5,
|
|
92
|
+
},
|
|
93
|
+
cell: {
|
|
94
|
+
/**
|
|
95
|
+
* py-5
|
|
96
|
+
*/
|
|
97
|
+
py: 5,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
true: {
|
|
101
|
+
root: {
|
|
102
|
+
textStyle: "std-16N-120",
|
|
103
|
+
},
|
|
104
|
+
header: {
|
|
105
|
+
/**
|
|
106
|
+
* py-2.5
|
|
107
|
+
*/
|
|
108
|
+
py: 2.5,
|
|
109
|
+
},
|
|
110
|
+
cell: {
|
|
111
|
+
/**
|
|
112
|
+
* py-2.5
|
|
113
|
+
*/
|
|
114
|
+
py: 2.5,
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
striped: {
|
|
119
|
+
true: {
|
|
120
|
+
body: {
|
|
121
|
+
"& tr": {
|
|
122
|
+
_even: {
|
|
123
|
+
"&:not(:has(input:checked))": { bg: "{colors.keyColor.50}/25" },
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
hovered: {
|
|
130
|
+
true: {
|
|
131
|
+
body: {
|
|
132
|
+
"& tr": {
|
|
133
|
+
_hover: {
|
|
134
|
+
bg: "keyColor.50",
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
defaultVariants: {
|
|
142
|
+
dense: false,
|
|
143
|
+
striped: false,
|
|
144
|
+
hovered: false,
|
|
145
|
+
},
|
|
146
|
+
});
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { defineSlotRecipe } from "@pandacss/dev";
|
|
2
|
+
import { anatomy as tabsAnatomy } from "@ark-ui/anatomy/tabs";
|
|
3
|
+
|
|
4
|
+
export default defineSlotRecipe({
|
|
5
|
+
className: "tabs",
|
|
6
|
+
slots: tabsAnatomy.keys(),
|
|
7
|
+
base: {
|
|
8
|
+
root: {
|
|
9
|
+
p: 1.5,
|
|
10
|
+
mx: -1.5,
|
|
11
|
+
},
|
|
12
|
+
list: {
|
|
13
|
+
/**
|
|
14
|
+
* flex w-full min-w-max items-end whitespace-nowrap
|
|
15
|
+
* border-b border-solid-gray-420
|
|
16
|
+
*/
|
|
17
|
+
display: "flex",
|
|
18
|
+
width: "full",
|
|
19
|
+
alignItems: "end",
|
|
20
|
+
whiteSpace: "nowrap",
|
|
21
|
+
borderBottomWidth: "1px",
|
|
22
|
+
borderColor: "solid-gray.420",
|
|
23
|
+
overflowX: "auto",
|
|
24
|
+
},
|
|
25
|
+
trigger: {
|
|
26
|
+
/**
|
|
27
|
+
* relative z-0 inline-flex gap-2 justify-center items-center
|
|
28
|
+
* text-oln-14B-100 md:text-oln-16B-100
|
|
29
|
+
*/
|
|
30
|
+
position: "relative",
|
|
31
|
+
zIndex: 0,
|
|
32
|
+
display: "inline-flex",
|
|
33
|
+
gap: 2,
|
|
34
|
+
justifyContent: "center",
|
|
35
|
+
alignItems: "center",
|
|
36
|
+
textStyle: { base: "oln-14B-100", md: "oln-16B-100" },
|
|
37
|
+
/**
|
|
38
|
+
* px-4 py-6 group md:px-8 md:py-6
|
|
39
|
+
* hover:bg-solid-gray-50 focus-visible:bg-yellow-300
|
|
40
|
+
* aria-[current=page]:bg-white
|
|
41
|
+
*/
|
|
42
|
+
px: { base: 4, md: 8 },
|
|
43
|
+
py: 6,
|
|
44
|
+
bg: {
|
|
45
|
+
base: "transparent",
|
|
46
|
+
_hover: "solid-gray.50",
|
|
47
|
+
_focusVisible: { base: "yellow.300", _hover: "yellow.300" },
|
|
48
|
+
_selected: {
|
|
49
|
+
base: "white",
|
|
50
|
+
_hover: "white",
|
|
51
|
+
_focusVisible: "yellow.300",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
/**
|
|
55
|
+
* focus-visible:z-10 focus-visible:rounded-4
|
|
56
|
+
* focus-visible:outline focus-visible:outline-4
|
|
57
|
+
* focus-visible:outline-offset-[calc(2/16*1rem)] focus-visible:outline-black
|
|
58
|
+
* focus-visible:ring-[calc(2/16*1rem)] focus-visible:ring-yellow-300
|
|
59
|
+
*/
|
|
60
|
+
_focusVisible: {
|
|
61
|
+
zIndex: 10,
|
|
62
|
+
rounded: 4,
|
|
63
|
+
outlineStyle: "solid",
|
|
64
|
+
outlineWidth: "4px",
|
|
65
|
+
outlineColor: "black",
|
|
66
|
+
outlineOffset: "calc(2 / 16 * 1rem)",
|
|
67
|
+
focusRing: "calc(2 / 16 * 1rem)",
|
|
68
|
+
},
|
|
69
|
+
_selected: {
|
|
70
|
+
/**
|
|
71
|
+
* relative text-blue-900
|
|
72
|
+
* after:absolute after:bottom-0 after:left-0 after:w-full after:border-b-4
|
|
73
|
+
* after:border-current
|
|
74
|
+
* aria-[current=page]:cursor-default
|
|
75
|
+
*/
|
|
76
|
+
color: "keyColor.900",
|
|
77
|
+
cursor: "default",
|
|
78
|
+
_after: {
|
|
79
|
+
content: '""',
|
|
80
|
+
position: "absolute",
|
|
81
|
+
bottom: 0,
|
|
82
|
+
left: 0,
|
|
83
|
+
width: "full",
|
|
84
|
+
borderBottomWidth: "4px",
|
|
85
|
+
borderBlockColor: "currentcolor",
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
});
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* source:
|
|
3
|
+
* https://github.com/digital-go-jp/design-system-example-components/blob/main/src/components/Textarea/Textarea.tsx
|
|
4
|
+
*/
|
|
5
|
+
import { defineRecipe } from "@pandacss/dev";
|
|
6
|
+
|
|
7
|
+
export default defineRecipe({
|
|
8
|
+
className: "textarea",
|
|
9
|
+
description:
|
|
10
|
+
"テキストエリアコンポーネントは、1行以上のテキストを入力する場合に使用します。",
|
|
11
|
+
base: {
|
|
12
|
+
/**
|
|
13
|
+
* rounded-8 max-w-full p-4 aria-disabled:pointer-events-none
|
|
14
|
+
*/
|
|
15
|
+
rounded: 8,
|
|
16
|
+
p: 4,
|
|
17
|
+
/**
|
|
18
|
+
* text-std-16N-170 bg-white text-solid-gray-800
|
|
19
|
+
* aria-disabled:bg-solid-gray-50 aria-disabled:text-solid-gray-420
|
|
20
|
+
* aria-disabled:forced-colors:text-[GrayText]
|
|
21
|
+
*/
|
|
22
|
+
textStyle: "std-16N-170",
|
|
23
|
+
bg: { base: "white", _disabled: "solid-gray.50" },
|
|
24
|
+
color: {
|
|
25
|
+
base: "solid-gray.800",
|
|
26
|
+
_disabled: { base: "solid-gray.420", _highContrast: "GrayText" },
|
|
27
|
+
},
|
|
28
|
+
/**
|
|
29
|
+
* border border-solid-gray-600 hover:border-black
|
|
30
|
+
* aria-disabled:border-solid-gray-300 aria-disabled:forced-colors:border-[GrayText]
|
|
31
|
+
*/
|
|
32
|
+
borderWidth: "1px",
|
|
33
|
+
borderColor: {
|
|
34
|
+
base: "solid-gray.600",
|
|
35
|
+
_hover: "black",
|
|
36
|
+
_disabled: { base: "solid-gray.300", _hover: "GrayText" },
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* focus:outline focus:outline-4 focus:outline-black focus:outline-offset-[calc(2/16*1rem)]
|
|
40
|
+
* focus:ring-[calc(2/16*1rem)] focus:ring-yellow-300
|
|
41
|
+
*/
|
|
42
|
+
_focus: {
|
|
43
|
+
outlineStyle: "solid",
|
|
44
|
+
outlineWidth: "4px",
|
|
45
|
+
outlineColor: "black",
|
|
46
|
+
outlineOffset: "calc(2 / 16 * 1rem)",
|
|
47
|
+
focusRing: "calc(2 / 16 * 1rem)",
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
variants: {
|
|
51
|
+
invalid: {
|
|
52
|
+
true: {
|
|
53
|
+
/**
|
|
54
|
+
* aria-[invalid=true]:border-error-1 aria-[invalid=true]:hover:border-red-1000
|
|
55
|
+
*/
|
|
56
|
+
borderColor: { base: "error.1", _hover: "red.1000" },
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
defaultVariants: {
|
|
61
|
+
invalid: false,
|
|
62
|
+
},
|
|
63
|
+
});
|