@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,297 @@
|
|
|
1
|
+
import { defineSlotRecipe } from "@pandacss/dev";
|
|
2
|
+
import { anatomy as checkboxAnatomy } from "@ark-ui/anatomy/checkbox";
|
|
3
|
+
|
|
4
|
+
export default defineSlotRecipe({
|
|
5
|
+
className: "checkbox",
|
|
6
|
+
slots: checkboxAnatomy.keys(),
|
|
7
|
+
base: {
|
|
8
|
+
root: {
|
|
9
|
+
/**
|
|
10
|
+
* flex w-fit items-start py-2
|
|
11
|
+
*/
|
|
12
|
+
display: "flex",
|
|
13
|
+
alignItems: "flex-start",
|
|
14
|
+
width: "fit-content",
|
|
15
|
+
py: 2,
|
|
16
|
+
},
|
|
17
|
+
control: {
|
|
18
|
+
/**
|
|
19
|
+
* flex items-center justify-center shrink-0 rounded-[calc(1/8*100%)]
|
|
20
|
+
* has-[input:hover:not(:focus):not([aria-disabled="true"])]:bg-solid-gray-420
|
|
21
|
+
*/
|
|
22
|
+
display: "flex",
|
|
23
|
+
alignItems: "center",
|
|
24
|
+
justifyContent: "center",
|
|
25
|
+
flexShrink: 0,
|
|
26
|
+
rounded: "calc(1 / 8 * 100%)",
|
|
27
|
+
_disabled: {
|
|
28
|
+
bg: "solid-gray.420",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
indicator: {
|
|
32
|
+
/**
|
|
33
|
+
* appearance-none size-3/4 rounded-[calc(2/18*100%)]
|
|
34
|
+
*/
|
|
35
|
+
appearance: "none",
|
|
36
|
+
width: "3/4",
|
|
37
|
+
height: "3/4",
|
|
38
|
+
rounded: "calc(2 / 18 * 100%)",
|
|
39
|
+
borderColor: {
|
|
40
|
+
/**
|
|
41
|
+
* border-solid-gray-600 hover:border-black
|
|
42
|
+
* forced-colors:!border-[ButtonText]
|
|
43
|
+
*/
|
|
44
|
+
base: "solid-gray.600",
|
|
45
|
+
_hover: "black",
|
|
46
|
+
_highContrast: "ButtonText",
|
|
47
|
+
_checked: {
|
|
48
|
+
/**
|
|
49
|
+
* checked:border-blue-900 checked:hover:border-blue-1100
|
|
50
|
+
* forced-colors:checked:!border-[Highlight]
|
|
51
|
+
*/
|
|
52
|
+
base: "keyColor.900",
|
|
53
|
+
_hover: "keyColor.1100",
|
|
54
|
+
_highContrast: "Highlight",
|
|
55
|
+
},
|
|
56
|
+
_indeterminate: {
|
|
57
|
+
/**
|
|
58
|
+
* indeterminate:border-blue-900 indeterminate:hover:border-blue-1100
|
|
59
|
+
* forced-colors:indeterminate:!border-[Highlight]
|
|
60
|
+
*/
|
|
61
|
+
base: "keyColor.900",
|
|
62
|
+
_hover: "keyColor.1100",
|
|
63
|
+
_highContrast: "Highlight",
|
|
64
|
+
},
|
|
65
|
+
_invalid: {
|
|
66
|
+
/**
|
|
67
|
+
* data-[error]:border-error-1 data-[error]:hover:border-red-1000
|
|
68
|
+
*/
|
|
69
|
+
base: "error.1",
|
|
70
|
+
_hover: "red.1000",
|
|
71
|
+
},
|
|
72
|
+
_disabled: {
|
|
73
|
+
/**
|
|
74
|
+
* aria-disabled:!border-solid-gray-300
|
|
75
|
+
* forced-colors:aria-disabled:!border-[GrayText]
|
|
76
|
+
*/
|
|
77
|
+
base: "solid-gray.300",
|
|
78
|
+
_highContrast: "GrayText",
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
bg: {
|
|
82
|
+
/**
|
|
83
|
+
* bg-white
|
|
84
|
+
*/
|
|
85
|
+
base: "white",
|
|
86
|
+
/**
|
|
87
|
+
* checked:bg-blue-900 checked:hover:bg-blue-1100
|
|
88
|
+
* forced-colors:checked:!bg-[Highlight]
|
|
89
|
+
*/
|
|
90
|
+
_checked: {
|
|
91
|
+
base: "keyColor.900",
|
|
92
|
+
_hover: "keyColor.1100",
|
|
93
|
+
_highContrast: "Highlight",
|
|
94
|
+
},
|
|
95
|
+
_indeterminate: {
|
|
96
|
+
/**
|
|
97
|
+
* indeterminate:bg-blue-900 indeterminate:hover:bg-blue-1100
|
|
98
|
+
* forced-colors:indeterminate:!bg-[Highlight]
|
|
99
|
+
*/
|
|
100
|
+
base: "keyColor.900",
|
|
101
|
+
_hover: "keyColor.1100",
|
|
102
|
+
_highContrast: "Highlight",
|
|
103
|
+
},
|
|
104
|
+
/**
|
|
105
|
+
* data-[error]:indeterminate:bg-error-1
|
|
106
|
+
* data-[error]:indeterminate:hover:bg-red-1000
|
|
107
|
+
* data-[error]:checked:bg-error-1 data-[error]:checked:hover:bg-red-1000
|
|
108
|
+
*/
|
|
109
|
+
_invalid: {
|
|
110
|
+
_indeterminate: {
|
|
111
|
+
base: "error.1",
|
|
112
|
+
_hover: "red.1000",
|
|
113
|
+
},
|
|
114
|
+
_checked: {
|
|
115
|
+
base: "error.1",
|
|
116
|
+
_hover: "red.1000",
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
/**
|
|
120
|
+
* aria-disabled:!bg-solid-gray-50
|
|
121
|
+
* aria-disabled:checked:!bg-solid-gray-300
|
|
122
|
+
* aria-disabled:indeterminate:!bg-solid-gray-300
|
|
123
|
+
* forced-colors:aria-disabled:checked:!bg-[GrayText]
|
|
124
|
+
*/
|
|
125
|
+
_disabled: {
|
|
126
|
+
base: "solid-gray.50",
|
|
127
|
+
_checked: "solid-gray.300",
|
|
128
|
+
_indeterminate: "solid-gray.300",
|
|
129
|
+
_highContrast: {
|
|
130
|
+
_checked: "GrayText",
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
/**
|
|
135
|
+
* bg-clip-padding
|
|
136
|
+
*/
|
|
137
|
+
backgroundClip: "padding-box",
|
|
138
|
+
/**
|
|
139
|
+
* before:hidden checked:before:block indeterminate:before:block
|
|
140
|
+
* before:size-3.5
|
|
141
|
+
* before:bg-white
|
|
142
|
+
* forced-colors:before:!bg-[HighlightText]
|
|
143
|
+
* aria-disabled:before:border-solid-gray-50
|
|
144
|
+
*/
|
|
145
|
+
_before: {
|
|
146
|
+
content: '""',
|
|
147
|
+
display: "none",
|
|
148
|
+
width: 3.5,
|
|
149
|
+
height: 3.5,
|
|
150
|
+
bg: { base: "white", _highContrast: "HighlightText" },
|
|
151
|
+
borderColor: { _disabled: "solid-gray.50" },
|
|
152
|
+
},
|
|
153
|
+
/**
|
|
154
|
+
* checked:before:[clip-path:path('M5.6,11.2L12.65,4.15L11.25,2.75L5.6,8.4L2.75,5.55L1.35,6.95L5.6,11.2Z')]
|
|
155
|
+
* indeterminate:before:[clip-path:path('M3.25,7.75H10.75V6.25H3.25V7.75Z')]
|
|
156
|
+
*/
|
|
157
|
+
_checked: {
|
|
158
|
+
_before: {
|
|
159
|
+
display: "block",
|
|
160
|
+
clipPath:
|
|
161
|
+
"path('M5.6,11.2L12.65,4.15L11.25,2.75L5.6,8.4L2.75,5.55L1.35,6.95L5.6,11.2Z')",
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
_indeterminate: {
|
|
165
|
+
_before: {
|
|
166
|
+
display: "block",
|
|
167
|
+
clipPath: "path('M3.25,7.75H10.75V6.25H3.25V7.75Z')",
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
/**
|
|
171
|
+
* focus:outline focus:outline-4 focus:outline-black
|
|
172
|
+
* focus:outline-offset-[calc(2/16*1rem)]
|
|
173
|
+
* focus:ring-[calc(2/16*1rem)] focus:ring-yellow-300
|
|
174
|
+
*/
|
|
175
|
+
_focus: {
|
|
176
|
+
outlineStyle: "solid",
|
|
177
|
+
outlineWidth: "4px",
|
|
178
|
+
outlineColor: "black",
|
|
179
|
+
outlineOffset: "calc(2 / 16 * 1rem)",
|
|
180
|
+
focusRing: "calc(2 / 16 * 1rem)",
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
label: {
|
|
184
|
+
/**
|
|
185
|
+
* text-solid-gray-800
|
|
186
|
+
* data-[size=sm]:pt-px data-[size=sm]:text-dns-16N-130
|
|
187
|
+
* data-[size=md]:pt-1 data-[size=md]:text-dns-16N-130
|
|
188
|
+
* data-[size=lg]:pt-2.5 data-[size=lg]:text-dns-17N-130
|
|
189
|
+
*/
|
|
190
|
+
color: "solid-gray.800",
|
|
191
|
+
},
|
|
192
|
+
group: {},
|
|
193
|
+
},
|
|
194
|
+
variants: {
|
|
195
|
+
size: {
|
|
196
|
+
sm: {
|
|
197
|
+
root: {
|
|
198
|
+
/**
|
|
199
|
+
* data-[size=sm]:gap-1
|
|
200
|
+
*/
|
|
201
|
+
gap: 1,
|
|
202
|
+
},
|
|
203
|
+
control: {
|
|
204
|
+
/**
|
|
205
|
+
* data-[size=sm]:size-6
|
|
206
|
+
*/
|
|
207
|
+
width: 6,
|
|
208
|
+
height: 6,
|
|
209
|
+
},
|
|
210
|
+
indicator: {
|
|
211
|
+
/**
|
|
212
|
+
* data-[size=sm]:border-[calc(2/16*1rem)]
|
|
213
|
+
*/
|
|
214
|
+
borderWidth: "calc(2 / 16 * 1rem)",
|
|
215
|
+
},
|
|
216
|
+
label: {
|
|
217
|
+
/**
|
|
218
|
+
* data-[size=sm]:pt-px data-[size=sm]:text-dns-16N-130
|
|
219
|
+
*/
|
|
220
|
+
pt: "1px",
|
|
221
|
+
textStyle: "dns-16N-130",
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
md: {
|
|
225
|
+
root: {
|
|
226
|
+
/**
|
|
227
|
+
* data-[size=md]:gap-2
|
|
228
|
+
*/
|
|
229
|
+
gap: 2,
|
|
230
|
+
},
|
|
231
|
+
control: {
|
|
232
|
+
/**
|
|
233
|
+
* data-[size=md]:size-8
|
|
234
|
+
*/
|
|
235
|
+
width: 8,
|
|
236
|
+
height: 8,
|
|
237
|
+
},
|
|
238
|
+
indicator: {
|
|
239
|
+
/**
|
|
240
|
+
* data-[size=md]:border-[calc(2/16*1rem)]
|
|
241
|
+
* data-[size=md]:before:origin-top-left
|
|
242
|
+
* data-[size=md]:before:scale-[calc(20/14)]
|
|
243
|
+
*/
|
|
244
|
+
borderWidth: "calc(2 / 16 * 1rem)",
|
|
245
|
+
_before: {
|
|
246
|
+
transformOrigin: "top left",
|
|
247
|
+
scale: "calc(20 / 14)",
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
label: {
|
|
251
|
+
/**
|
|
252
|
+
* data-[size=md]:pt-1 data-[size=md]:text-dns-16N-130
|
|
253
|
+
*/
|
|
254
|
+
pt: 1,
|
|
255
|
+
textStyle: "dns-16N-130",
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
lg: {
|
|
259
|
+
root: {
|
|
260
|
+
/**
|
|
261
|
+
* data-[size=lg]:gap-2
|
|
262
|
+
*/
|
|
263
|
+
gap: 2,
|
|
264
|
+
},
|
|
265
|
+
control: {
|
|
266
|
+
/**
|
|
267
|
+
* data-[size=lg]:size-11
|
|
268
|
+
*/
|
|
269
|
+
width: 11,
|
|
270
|
+
height: 11,
|
|
271
|
+
},
|
|
272
|
+
indicator: {
|
|
273
|
+
/**
|
|
274
|
+
* data-[size=lg]:border-[calc(3/16*1rem)]
|
|
275
|
+
* data-[size=lg]:before:origin-top-left
|
|
276
|
+
* data-[size=lg]:before:scale-[calc(27/14)]
|
|
277
|
+
*/
|
|
278
|
+
borderWidth: "calc(3 / 16 * 1rem)",
|
|
279
|
+
_before: {
|
|
280
|
+
transformOrigin: "top left",
|
|
281
|
+
scale: "calc(27 / 14)",
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
label: {
|
|
285
|
+
/**
|
|
286
|
+
* data-[size=lg]:pt-2.5 data-[size=lg]:text-dns-17N-130
|
|
287
|
+
*/
|
|
288
|
+
pt: 2.5,
|
|
289
|
+
textStyle: "dns-17N-130",
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
},
|
|
294
|
+
defaultVariants: {
|
|
295
|
+
size: "sm",
|
|
296
|
+
},
|
|
297
|
+
});
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* source:
|
|
3
|
+
* https://github.com/digital-go-jp/design-system-example-components/blob/main/src/components/Disclosure/Disclosure.tsx
|
|
4
|
+
*/
|
|
5
|
+
import { defineSlotRecipe } from "@pandacss/dev";
|
|
6
|
+
|
|
7
|
+
export default defineSlotRecipe({
|
|
8
|
+
className: "disclosure",
|
|
9
|
+
slots: ["root", "summary", "icon", "content"],
|
|
10
|
+
base: {
|
|
11
|
+
root: {
|
|
12
|
+
/**
|
|
13
|
+
* group/disclosure
|
|
14
|
+
*/
|
|
15
|
+
},
|
|
16
|
+
summary: {
|
|
17
|
+
/**
|
|
18
|
+
* group/summary
|
|
19
|
+
* [&::-webkit-details-marker]:hidden
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* flex w-fit cursor-default list-none items-start justify-start gap-2
|
|
23
|
+
*/
|
|
24
|
+
display: "flex",
|
|
25
|
+
width: "fit-content",
|
|
26
|
+
cursor: "default",
|
|
27
|
+
listStyle: "none",
|
|
28
|
+
alignItems: "start",
|
|
29
|
+
justifyContent: "start",
|
|
30
|
+
gap: 2,
|
|
31
|
+
/**
|
|
32
|
+
* remove button style
|
|
33
|
+
*/
|
|
34
|
+
textAlign: "start",
|
|
35
|
+
/**
|
|
36
|
+
* hover:underline hover:underline-offset-[calc(3/16*1rem)]
|
|
37
|
+
*/
|
|
38
|
+
_hover: {
|
|
39
|
+
textDecoration: "underline",
|
|
40
|
+
textUnderlineOffset: "calc(3 / 16 * 1rem)",
|
|
41
|
+
},
|
|
42
|
+
/**
|
|
43
|
+
* focus-visible:rounded-4 focus-visible:outline focus-visible:outline-4
|
|
44
|
+
* focus-visible:outline-black focus-visible:outline-offset-[calc(2/16*1rem)]
|
|
45
|
+
* focus-visible:bg-yellow-300
|
|
46
|
+
* focus-visible:ring-[calc(2/16*1rem)] focus-visible:ring-yellow-300
|
|
47
|
+
*/
|
|
48
|
+
_focusVisible: {
|
|
49
|
+
rounded: 4,
|
|
50
|
+
bg: "yellow.300",
|
|
51
|
+
outlineStyle: "solid",
|
|
52
|
+
outlineWidth: "4px",
|
|
53
|
+
outlineColor: "black",
|
|
54
|
+
outlineOffset: "calc(2 / 16 * 1rem)",
|
|
55
|
+
focusRing: "calc(2 / 16 * 1rem)",
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
icon: {
|
|
59
|
+
/**
|
|
60
|
+
* flex-none text-blue-1000 mt-[calc((1lh-24px)/2)]
|
|
61
|
+
* group-open/disclosure:rotate-180
|
|
62
|
+
* forced-colors:text-inherit
|
|
63
|
+
*/
|
|
64
|
+
flex: "none",
|
|
65
|
+
color: { base: "keyColor.1000", _highContrast: "inherit" },
|
|
66
|
+
mt: "calc((1lh - 24px) / 2)",
|
|
67
|
+
/**
|
|
68
|
+
* svg
|
|
69
|
+
*/
|
|
70
|
+
width: "24px",
|
|
71
|
+
height: "24px",
|
|
72
|
+
rounded: "full",
|
|
73
|
+
bg: { base: "white", _groupHover: "currentColor" },
|
|
74
|
+
outlineStyle: "solid",
|
|
75
|
+
outlineWidth: "3px",
|
|
76
|
+
outlineOffset: "-3px",
|
|
77
|
+
transform: {
|
|
78
|
+
base: "rotate(-180deg)",
|
|
79
|
+
"[data-state=open]>&": "rotate(0deg)",
|
|
80
|
+
},
|
|
81
|
+
transition: "transform",
|
|
82
|
+
_before: {
|
|
83
|
+
content: '""',
|
|
84
|
+
bg: { base: "currentColor", _groupHover: "white" },
|
|
85
|
+
width: "full",
|
|
86
|
+
height: "full",
|
|
87
|
+
rounded: "full",
|
|
88
|
+
outlineStyle: "solid",
|
|
89
|
+
outlineWidth: "3px",
|
|
90
|
+
outlineOffset: "-3px",
|
|
91
|
+
display: "block",
|
|
92
|
+
clipPath:
|
|
93
|
+
"path('M12 15.525L16.925 10.625H7.07502L12 15.525ZM12 22.85C10.4834 22.85 9.06677 22.566 7.75027 21.998C6.43394 21.4298 5.28886 20.6588 4.31502 19.685C3.34119 18.7112 2.57019 17.5661 2.00202 16.2498C1.43402 14.9333 1.15002 13.5167 1.15002 12C1.15002 10.4833 1.43402 9.06675 2.00202 7.75025C2.57019 6.43392 3.34119 5.28883 4.31502 4.315C5.28886 3.34117 6.43394 2.57017 7.75027 2.002C9.06677 1.434 10.4834 1.15 12 1.15C13.5167 1.15 14.9333 1.434 16.2498 2.002C17.5661 2.57017 18.7112 3.34117 19.685 4.315C20.6589 5.28883 21.4299 6.43392 21.998 7.75025C22.566 9.06675 22.85 10.4833 22.85 12C22.85 13.5167 22.566 14.9333 21.998 16.2498C21.4299 17.5661 20.6589 18.7112 19.685 19.685C18.7112 20.6588 17.5661 21.4298 16.2498 21.998C14.9333 22.566 13.5167 22.85 12 22.85Z')",
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
content: {},
|
|
97
|
+
},
|
|
98
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* source:
|
|
3
|
+
* https://github.com/digital-go-jp/design-system-example-components/blob/main/src/components/Divider/Divider.tsx
|
|
4
|
+
*/
|
|
5
|
+
import { defineRecipe } from "@pandacss/dev";
|
|
6
|
+
|
|
7
|
+
export default defineRecipe({
|
|
8
|
+
className: "divider",
|
|
9
|
+
description:
|
|
10
|
+
"ディバイダーは、異なるセクション、コンポーネント、またはコンテンツのグループ間に設けられる視覚的な区切りで、HTMLのhr要素に相当します。要素間に明確な区切りを設けることで、読みやすさを向上させる役割を果たします。",
|
|
11
|
+
variants: {
|
|
12
|
+
color: {
|
|
13
|
+
"gray-420": { borderColor: "solid-gray.420" },
|
|
14
|
+
"gray-536": { borderColor: "solid-gray.536" },
|
|
15
|
+
black: { borderColor: "black" },
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
color: "gray-420",
|
|
20
|
+
},
|
|
21
|
+
});
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* source:
|
|
3
|
+
* https://github.com/digital-go-jp/design-system-example-components/blob/main/src/components/Drawer/Drawer.stories.tsx
|
|
4
|
+
* https://github.com/cschroeter/park-ui/blob/main/packages/preset/src/theme/recipes/drawer.ts
|
|
5
|
+
*/
|
|
6
|
+
import { anatomy as dialogAnatomy } from "@ark-ui/anatomy/dialog";
|
|
7
|
+
import { defineSlotRecipe } from "@pandacss/dev";
|
|
8
|
+
|
|
9
|
+
const anatomy = dialogAnatomy.extendWith("header", "body", "footer");
|
|
10
|
+
|
|
11
|
+
export default defineSlotRecipe({
|
|
12
|
+
className: "drawer",
|
|
13
|
+
slots: anatomy.keys(),
|
|
14
|
+
base: {
|
|
15
|
+
backdrop: {
|
|
16
|
+
/**
|
|
17
|
+
* backdrop:bg-opacity-gray-100 forced-colors:backdrop:bg-[#000b]
|
|
18
|
+
*/
|
|
19
|
+
backdropFilter: "blur(4px)",
|
|
20
|
+
background: "gray.100/90",
|
|
21
|
+
height: "100vh",
|
|
22
|
+
position: "fixed",
|
|
23
|
+
top: 0,
|
|
24
|
+
left: 0,
|
|
25
|
+
width: "100vw",
|
|
26
|
+
zIndex: 10,
|
|
27
|
+
// zIndex: "overlay",
|
|
28
|
+
_open: {
|
|
29
|
+
animation: "backdrop-in",
|
|
30
|
+
},
|
|
31
|
+
_closed: {
|
|
32
|
+
animation: "backdrop-out",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
positioner: {
|
|
36
|
+
alignItems: "center",
|
|
37
|
+
display: "flex",
|
|
38
|
+
height: "100dvh",
|
|
39
|
+
justifyContent: "center",
|
|
40
|
+
position: "fixed",
|
|
41
|
+
top: 0,
|
|
42
|
+
/**
|
|
43
|
+
* w-72
|
|
44
|
+
*/
|
|
45
|
+
width: 72,
|
|
46
|
+
zIndex: 1400,
|
|
47
|
+
// zIndex: "modal",
|
|
48
|
+
},
|
|
49
|
+
content: {
|
|
50
|
+
/**
|
|
51
|
+
* m-[unset] max-w-full max-h-[unset] overflow-visible start-auto
|
|
52
|
+
*/
|
|
53
|
+
margin: "unset",
|
|
54
|
+
maxWidth: "full",
|
|
55
|
+
maxHeight: "full",
|
|
56
|
+
overflow: "visible",
|
|
57
|
+
insetInlineStart: "auto",
|
|
58
|
+
width: "full",
|
|
59
|
+
/**
|
|
60
|
+
* bg-white shadow-2 border-l-transparent
|
|
61
|
+
*/
|
|
62
|
+
borderColor: "transparent",
|
|
63
|
+
background: "white",
|
|
64
|
+
boxShadow: 2,
|
|
65
|
+
/**
|
|
66
|
+
* grid grid-rows-[auto_1fr] h-dvh
|
|
67
|
+
*/
|
|
68
|
+
display: "grid",
|
|
69
|
+
gridTemplateRows: "auto 1fr",
|
|
70
|
+
height: "100dvh",
|
|
71
|
+
_hidden: {
|
|
72
|
+
display: "none",
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
header: {
|
|
76
|
+
/**
|
|
77
|
+
* flex justify-end py-4 pl-4 pr-8
|
|
78
|
+
*/
|
|
79
|
+
display: "flex",
|
|
80
|
+
justifyContent: "start",
|
|
81
|
+
py: 4,
|
|
82
|
+
px: 4,
|
|
83
|
+
},
|
|
84
|
+
title: {
|
|
85
|
+
textStyle: "std-20B-150",
|
|
86
|
+
},
|
|
87
|
+
body: {
|
|
88
|
+
/**
|
|
89
|
+
* overflow-auto
|
|
90
|
+
*/
|
|
91
|
+
overflow: "auto",
|
|
92
|
+
px: 4,
|
|
93
|
+
py: 4,
|
|
94
|
+
textStyle: "std-17N-170",
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
variants: {
|
|
98
|
+
placement: {
|
|
99
|
+
right: {
|
|
100
|
+
positioner: {
|
|
101
|
+
right: 0,
|
|
102
|
+
},
|
|
103
|
+
content: {
|
|
104
|
+
/**
|
|
105
|
+
* border-l
|
|
106
|
+
*/
|
|
107
|
+
borderLeftWidth: "1px",
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
left: {
|
|
111
|
+
positioner: {
|
|
112
|
+
left: 0,
|
|
113
|
+
},
|
|
114
|
+
content: {
|
|
115
|
+
/**
|
|
116
|
+
* border-l
|
|
117
|
+
*/
|
|
118
|
+
borderRightWidth: "1px",
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
defaultVariants: {
|
|
124
|
+
placement: "right",
|
|
125
|
+
},
|
|
126
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* source:
|
|
3
|
+
* https://github.com/digital-go-jp/design-system-example-components/blob/main/src/components/ErrorText/ErrorText.tsx
|
|
4
|
+
*/
|
|
5
|
+
import { defineRecipe } from "@pandacss/dev";
|
|
6
|
+
|
|
7
|
+
export default defineRecipe({
|
|
8
|
+
className: "error-text",
|
|
9
|
+
base: {
|
|
10
|
+
/**
|
|
11
|
+
* text-dns-16N-130 text-error-1
|
|
12
|
+
*/
|
|
13
|
+
textStyle: "dns-16N-130",
|
|
14
|
+
color: "error.1",
|
|
15
|
+
},
|
|
16
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* source:
|
|
3
|
+
* https://github.com/digital-go-jp/design-system-example-components/blob/main/src/components/HamburgerMenuButton/HamburgerMenuButton.tsx
|
|
4
|
+
*/
|
|
5
|
+
import { defineRecipe } from "@pandacss/dev";
|
|
6
|
+
|
|
7
|
+
export default defineRecipe({
|
|
8
|
+
className: "hamburger-menu-button",
|
|
9
|
+
base: {
|
|
10
|
+
/**
|
|
11
|
+
* flex w-fit items-center text-oln-16N-100 rounded-4 touch-manipulation
|
|
12
|
+
*/
|
|
13
|
+
display: "flex",
|
|
14
|
+
width: "fit-content",
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
textStyle: "oln-16N-100",
|
|
17
|
+
rounded: 4,
|
|
18
|
+
touchAction: "manipulation",
|
|
19
|
+
/**
|
|
20
|
+
* hover:bg-solid-gray-50 hover:underline hover:underline-offset-[calc(3/16*1rem)]
|
|
21
|
+
*/
|
|
22
|
+
_hover: {
|
|
23
|
+
bg: "solid-gray.50",
|
|
24
|
+
textDecoration: "underline",
|
|
25
|
+
textUnderlineOffset: "calc(3 / 16 * 1rem)",
|
|
26
|
+
},
|
|
27
|
+
/**
|
|
28
|
+
* focus-visible:outline focus-visible:outline-4 focus-visible:outline-black
|
|
29
|
+
* focus-visible:outline-offset-[calc(2/16*1rem)] focus-visible:bg-yellow-300
|
|
30
|
+
* focus-visible:ring-[calc(2/16*1rem)] focus-visible:ring-yellow-300
|
|
31
|
+
*/
|
|
32
|
+
_focusVisible: {
|
|
33
|
+
bg: "yellow.300",
|
|
34
|
+
outlineStyle: "solid",
|
|
35
|
+
outlineWidth: "4px",
|
|
36
|
+
outlineColor: "black",
|
|
37
|
+
outlineOffset: "calc(2 / 16 * 1rem)",
|
|
38
|
+
focusRing: "calc(2 / 16 * 1rem)",
|
|
39
|
+
},
|
|
40
|
+
/**
|
|
41
|
+
* override reset
|
|
42
|
+
*/
|
|
43
|
+
cursor: "pointer",
|
|
44
|
+
},
|
|
45
|
+
});
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import accordion from "./accordion";
|
|
2
|
+
import breadcrumb from "./breadcrumb";
|
|
3
|
+
import button from "./button";
|
|
4
|
+
import checkbox from "./checkbox";
|
|
5
|
+
import disclosure from "./disclosure";
|
|
6
|
+
import digitalGoDivider from "./divider";
|
|
7
|
+
import drawer from "./drawer";
|
|
8
|
+
import errorText from "./error-text";
|
|
9
|
+
import hamburgerMenuButton from "./hamburger-menu-button";
|
|
10
|
+
import input from "./input";
|
|
11
|
+
import inputText from "./input-text";
|
|
12
|
+
import label from "./label";
|
|
13
|
+
import legend from "./legend";
|
|
14
|
+
import link from "./link";
|
|
15
|
+
import list from "./list";
|
|
16
|
+
import menu from "./menu";
|
|
17
|
+
import menuItem from "./menu-item";
|
|
18
|
+
import menuList from "./menu-list";
|
|
19
|
+
import notificationBanner from "./notification-banner";
|
|
20
|
+
import orderedList from "./ordered-list";
|
|
21
|
+
import radio from "./radio";
|
|
22
|
+
import radioGroup from "./radio-group";
|
|
23
|
+
import requirementBadge from "./requirement-badge";
|
|
24
|
+
import resourceList from "./resource-list";
|
|
25
|
+
import select from "./select";
|
|
26
|
+
import selectBox from "./select-box";
|
|
27
|
+
import supportText from "./support-text";
|
|
28
|
+
import table from "./table";
|
|
29
|
+
import tabs from "./tabs";
|
|
30
|
+
import textarea from "./textarea";
|
|
31
|
+
import treeView from "./tree-view";
|
|
32
|
+
import unorderedList from "./unordered-list";
|
|
33
|
+
import utilityLink from "./utility-link";
|
|
34
|
+
|
|
35
|
+
const recipes = {
|
|
36
|
+
accordion,
|
|
37
|
+
breadcrumb,
|
|
38
|
+
button,
|
|
39
|
+
checkbox,
|
|
40
|
+
drawer,
|
|
41
|
+
disclosure,
|
|
42
|
+
digitalGoDivider,
|
|
43
|
+
errorText,
|
|
44
|
+
hamburgerMenuButton,
|
|
45
|
+
input,
|
|
46
|
+
inputText,
|
|
47
|
+
label,
|
|
48
|
+
legend,
|
|
49
|
+
link,
|
|
50
|
+
list,
|
|
51
|
+
menu,
|
|
52
|
+
menuItem,
|
|
53
|
+
menuList,
|
|
54
|
+
notificationBanner,
|
|
55
|
+
orderedList,
|
|
56
|
+
radio,
|
|
57
|
+
radioGroup,
|
|
58
|
+
requirementBadge,
|
|
59
|
+
resourceList,
|
|
60
|
+
select,
|
|
61
|
+
selectBox,
|
|
62
|
+
supportText,
|
|
63
|
+
table,
|
|
64
|
+
tabs,
|
|
65
|
+
textarea,
|
|
66
|
+
treeView,
|
|
67
|
+
unorderedList,
|
|
68
|
+
utilityLink,
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export default recipes;
|