@okshaun/components 1.0.1 → 2.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/dist/.mcp.json +2 -5
- package/dist/icon-metadata.json +5173 -0
- package/dist/index.js +17088 -9273
- package/dist/index.js.map +1 -1
- package/dist/panda.buildinfo.json +693 -0
- package/dist/playroom-static.css +187432 -0
- package/dist/{preset-BzrKiUEH.js → preset-Coz-VwQR.js} +4051 -3217
- package/dist/preset-Coz-VwQR.js.map +1 -0
- package/dist/preset.js +1 -1
- package/dist/specs/color-palette.json +22 -1
- package/dist/specs/patterns.json +0 -16
- package/dist/specs/recipes.json +411 -247
- package/dist/specs/semantic-tokens.json +330 -115
- package/dist/specs/text-styles.json +72 -0
- package/dist/specs/tokens.json +237 -27
- package/dist/sprite.svg +1 -1
- package/dist/sprite.symbol.html +6662 -320
- package/dist/styles.css +36938 -5
- package/dist/svgs/calendar-lock.svg +1 -0
- package/dist/svgs/computer.svg +1 -0
- package/dist/svgs/cookie.svg +1 -0
- package/dist/svgs/folder-check.svg +1 -0
- package/dist/svgs/folder-copy.svg +1 -0
- package/dist/svgs/folder-dashed.svg +1 -0
- package/dist/svgs/folder-open.svg +1 -0
- package/dist/svgs/folder-topic.svg +1 -0
- package/dist/svgs/folder.svg +1 -0
- package/dist/svgs/mobile.svg +1 -0
- package/dist/svgs/numpad.svg +1 -0
- package/dist/svgs/phone.svg +1 -0
- package/dist/svgs/qr-code.svg +1 -0
- package/dist/svgs/sparkle.svg +1 -0
- package/dist/svgs/trolley.svg +1 -0
- package/dist/types/index.d.ts +834 -347
- package/package.json +49 -36
- package/src/recipes/avatar.ts +4 -4
- package/src/recipes/badge.ts +22 -48
- package/src/recipes/box.ts +1 -7
- package/src/recipes/breadcrumbs.ts +42 -25
- package/src/recipes/button.ts +151 -85
- package/src/recipes/card.ts +5 -1
- package/src/recipes/checkbox.ts +23 -24
- package/src/recipes/checkboxInput.ts +25 -0
- package/src/recipes/chip.ts +35 -37
- package/src/recipes/code.ts +4 -4
- package/src/recipes/datePicker.ts +223 -0
- package/src/recipes/divider.ts +38 -31
- package/src/recipes/formField.ts +41 -23
- package/src/recipes/highlightText.ts +14 -0
- package/src/recipes/icon.ts +13 -0
- package/src/recipes/list.ts +14 -0
- package/src/recipes/listItem.ts +310 -0
- package/src/recipes/listItemGroup.ts +62 -0
- package/src/recipes/menu.ts +90 -163
- package/src/recipes/modal.ts +51 -18
- package/src/recipes/radio.ts +29 -20
- package/src/recipes/radioInput.ts +25 -0
- package/src/recipes/recipes-regular.ts +14 -0
- package/src/recipes/{index.ts → recipes-slot.ts} +14 -23
- package/src/recipes/select.ts +1 -1
- package/src/recipes/spinner.ts +49 -23
- package/src/recipes/tag.ts +80 -84
- package/src/recipes/text.ts +18 -19
- package/src/recipes/textInput.ts +205 -0
- package/src/recipes/textarea.ts +65 -138
- package/src/recipes/themeSwitcher.ts +3 -3
- package/src/recipes/timePicker.ts +199 -0
- package/src/recipes/toggle.ts +72 -99
- package/src/recipes/toggleInput.ts +26 -0
- package/src/recipes/tooltip.ts +52 -343
- package/src/styles/index.css +1 -1
- package/src/styles/primitives/borders.ts +7 -1
- package/src/styles/primitives/colors.ts +51 -0
- package/src/styles/primitives/fontSizes.ts +1 -0
- package/src/styles/primitives/index.ts +2 -1
- package/src/styles/primitives/radii.ts +1 -1
- package/src/styles/primitives/shadows.ts +9 -9
- package/src/styles/primitives/sizes.ts +1 -0
- package/src/styles/primitives/zIndex.ts +17 -0
- package/src/styles/semantics/colors.ts +137 -82
- package/src/styles/semantics/index.ts +1 -0
- package/src/styles/semantics/zIndex.ts +18 -0
- package/src/styles/utilities/breakpoints.ts +6 -6
- package/src/styles/utilities/index.ts +3 -0
- package/src/styles/utilities/textStyles.ts +71 -1
- package/src/utils/splitProps.ts +4 -4
- package/dist/preset-BzrKiUEH.js.map +0 -1
- package/dist/styles/global.css +0 -148
- package/dist/styles/recipes/avatar.css +0 -185
- package/dist/styles/recipes/badge.css +0 -85
- package/dist/styles/recipes/breadcrumbs.css +0 -38
- package/dist/styles/recipes/button.css +0 -195
- package/dist/styles/recipes/card.css +0 -57
- package/dist/styles/recipes/checkbox-input.css +0 -12
- package/dist/styles/recipes/checkbox.css +0 -90
- package/dist/styles/recipes/chip.css +0 -137
- package/dist/styles/recipes/code.css +0 -12
- package/dist/styles/recipes/divider.css +0 -43
- package/dist/styles/recipes/form-field.css +0 -39
- package/dist/styles/recipes/heading.css +0 -40
- package/dist/styles/recipes/icon-button.css +0 -181
- package/dist/styles/recipes/label.css +0 -14
- package/dist/styles/recipes/link.css +0 -49
- package/dist/styles/recipes/menu.css +0 -141
- package/dist/styles/recipes/modal.css +0 -99
- package/dist/styles/recipes/pre.css +0 -16
- package/dist/styles/recipes/radio-input.css +0 -7
- package/dist/styles/recipes/radio.css +0 -82
- package/dist/styles/recipes/select.css +0 -103
- package/dist/styles/recipes/spinner.css +0 -36
- package/dist/styles/recipes/tag.css +0 -27
- package/dist/styles/recipes/text.css +0 -46
- package/dist/styles/recipes/textarea.css +0 -91
- package/dist/styles/recipes/textinput.css +0 -87
- package/dist/styles/recipes/theme-switcher.css +0 -53
- package/dist/styles/recipes/toggle-input.css +0 -12
- package/dist/styles/recipes/toggle.css +0 -125
- package/dist/styles/recipes/tooltip.css +0 -133
- package/dist/styles/recipes.css +0 -30
- package/dist/styles/reset.css +0 -1
- package/dist/styles/tokens.css +0 -1016
- package/dist/styles/utilities.css +0 -1694
- package/src/recipes/checkboxinput.ts +0 -15
- package/src/recipes/radioinput.ts +0 -12
- package/src/recipes/textinput.ts +0 -100
- package/src/recipes/toggleinput.ts +0 -16
- package/src/utils/injectSprite.ts +0 -36
- package/src/utils/spriteContent.ts +0 -4
package/src/recipes/textarea.ts
CHANGED
|
@@ -1,153 +1,80 @@
|
|
|
1
1
|
import { defineRecipe } from '@pandacss/dev';
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
export const textareaRecipe = defineRecipe({
|
|
4
|
+
className: 'textarea',
|
|
5
|
+
jsx: ['Textarea'],
|
|
6
|
+
base: {
|
|
7
|
+
fontSize: '[100%]',
|
|
8
|
+
position: 'relative',
|
|
9
|
+
width: 'full',
|
|
10
|
+
bg: 'surface',
|
|
11
|
+
color: 'text',
|
|
12
|
+
borderWidth: '1',
|
|
13
|
+
borderStyle: 'solid',
|
|
14
|
+
borderColor: 'border.input',
|
|
15
|
+
borderRadius: '4',
|
|
16
|
+
lineHeight: 'tight',
|
|
17
|
+
fontFamily: 'body',
|
|
18
|
+
outlineWidth: '1',
|
|
19
|
+
outlineStyle: 'solid',
|
|
20
|
+
outlineColor: 'transparent',
|
|
21
|
+
resize: 'both',
|
|
22
|
+
_placeholder: {
|
|
23
|
+
color: 'text.placeholder',
|
|
16
24
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
fontSize: '16',
|
|
21
|
-
minHeight: '80',
|
|
25
|
+
_focus: {
|
|
26
|
+
outlineColor: 'border.focused',
|
|
27
|
+
borderColor: 'border.focused',
|
|
22
28
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
_error: {
|
|
30
|
+
display: 'inline-grid',
|
|
31
|
+
borderColor: 'border.danger',
|
|
32
|
+
_focus: {
|
|
33
|
+
borderColor: 'border.danger',
|
|
34
|
+
outlineColor: 'border.danger',
|
|
35
|
+
},
|
|
28
36
|
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
false: {
|
|
32
|
-
width: 'full',
|
|
37
|
+
_disabled: {
|
|
38
|
+
opacity: '[0.4]',
|
|
33
39
|
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
fieldSizing: 'content',
|
|
40
|
+
_groupDisabled: {
|
|
41
|
+
opacity: '[1]', // let FormField handle disabled state opacity
|
|
37
42
|
},
|
|
38
43
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
// // },
|
|
66
|
-
// // _focus: {
|
|
67
|
-
// // borderColor: { base: 'gray.90', _dark: 'gray.10' },
|
|
68
|
-
// // },
|
|
69
|
-
// },
|
|
70
|
-
// },
|
|
71
|
-
// },
|
|
72
|
-
// internalLabel: {
|
|
73
|
-
// false: {},
|
|
74
|
-
// true: {
|
|
75
|
-
// // _focusWithin: {
|
|
76
|
-
// // outlineWidth: 1,
|
|
77
|
-
// // outlineStyle: 'solid',
|
|
78
|
-
// // outlineColor: { base: 'gray.90', _dark: 'gray.10' },
|
|
79
|
-
// // // outlineOffset: 2,
|
|
80
|
-
// // ml: '-4',
|
|
81
|
-
// // },
|
|
82
|
-
// },
|
|
83
|
-
// },
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
const textareaBase = {
|
|
87
|
-
display: 'inline-grid',
|
|
88
|
-
position: 'relative',
|
|
89
|
-
width: 'full',
|
|
90
|
-
verticalAlign: 'top',
|
|
91
|
-
borderWidth: '1',
|
|
92
|
-
borderStyle: 'solid',
|
|
93
|
-
borderColor: 'border.input',
|
|
94
|
-
borderRadius: '4',
|
|
95
|
-
outlineWidth: '2',
|
|
96
|
-
outlineOffset: '-1',
|
|
97
|
-
outlineStyle: 'solid',
|
|
98
|
-
outlineColor: 'transparent',
|
|
99
|
-
lineHeight: 'default',
|
|
100
|
-
fontFamily: 'body',
|
|
101
|
-
bg: 'bg.input',
|
|
102
|
-
color: 'text',
|
|
103
|
-
transitionDuration: 'fast',
|
|
104
|
-
transitionProperty: 'background, border-color, color, outline-color',
|
|
105
|
-
transitionTimingFunction: 'default',
|
|
106
|
-
_placeholder: {
|
|
107
|
-
color: 'text.placeholder',
|
|
108
|
-
},
|
|
109
|
-
// _hover: {
|
|
110
|
-
// bg: 'bg.input.hovered',
|
|
111
|
-
// },
|
|
112
|
-
_focus: {
|
|
113
|
-
bg: 'bg.input.pressed',
|
|
114
|
-
borderColor: 'border.focused',
|
|
115
|
-
outlineColor: 'border.focused',
|
|
116
|
-
},
|
|
117
|
-
_disabled: {
|
|
118
|
-
bg: 'bg.disabled',
|
|
119
|
-
borderColor: 'border.disabled',
|
|
120
|
-
color: 'text.disabled',
|
|
121
|
-
},
|
|
122
|
-
_error: {
|
|
123
|
-
display: 'inline-grid',
|
|
124
|
-
bg: 'bg.danger',
|
|
125
|
-
borderColor: 'border.danger',
|
|
126
|
-
color: 'text.danger',
|
|
127
|
-
_placeholder: {
|
|
128
|
-
color: 'text.danger/60',
|
|
44
|
+
variants: {
|
|
45
|
+
size: {
|
|
46
|
+
sm: {
|
|
47
|
+
py: '0',
|
|
48
|
+
px: '8',
|
|
49
|
+
minHeight: '48',
|
|
50
|
+
fontSize: '14',
|
|
51
|
+
},
|
|
52
|
+
md: {
|
|
53
|
+
py: '3',
|
|
54
|
+
px: '10',
|
|
55
|
+
fontSize: '16',
|
|
56
|
+
minHeight: '64',
|
|
57
|
+
},
|
|
58
|
+
lg: {
|
|
59
|
+
py: '7',
|
|
60
|
+
px: '12',
|
|
61
|
+
fontSize: '16',
|
|
62
|
+
minHeight: '80',
|
|
63
|
+
},
|
|
64
|
+
xl: {
|
|
65
|
+
py: '9',
|
|
66
|
+
px: '16',
|
|
67
|
+
fontSize: '20',
|
|
68
|
+
minHeight: '96',
|
|
69
|
+
},
|
|
129
70
|
},
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
_focus: {
|
|
135
|
-
bg: 'bg.danger',
|
|
136
|
-
borderColor: 'border.danger',
|
|
137
|
-
outlineColor: 'border.danger',
|
|
71
|
+
autoSize: {
|
|
72
|
+
true: {
|
|
73
|
+
fieldSizing: 'content',
|
|
74
|
+
},
|
|
138
75
|
},
|
|
139
76
|
},
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
export const textareaRecipe = defineRecipe({
|
|
143
|
-
className: 'textarea',
|
|
144
|
-
jsx: ['Textarea'],
|
|
145
|
-
base: textareaBase,
|
|
146
|
-
variants: textareaVariants,
|
|
147
77
|
defaultVariants: {
|
|
148
78
|
size: 'md',
|
|
149
|
-
// stacked: true,
|
|
150
|
-
// internalLabel: false,
|
|
151
|
-
// autoGrow: false,
|
|
152
79
|
},
|
|
153
80
|
});
|
|
@@ -19,14 +19,14 @@ export const themeSwitcherRecipe = defineRecipe({
|
|
|
19
19
|
height: '14',
|
|
20
20
|
minWidth: '14',
|
|
21
21
|
minHeight: '14',
|
|
22
|
-
flexShrink: 0,
|
|
22
|
+
flexShrink: '[0]',
|
|
23
23
|
aspectRatio: 'square',
|
|
24
24
|
transition: 'all',
|
|
25
25
|
'&:before': {
|
|
26
26
|
content: '""',
|
|
27
27
|
position: 'absolute',
|
|
28
28
|
inset: '0',
|
|
29
|
-
opacity:
|
|
29
|
+
opacity: 'revert-layer',
|
|
30
30
|
display: 'block',
|
|
31
31
|
borderRadius: '100',
|
|
32
32
|
bg: 'bg.neutral.inverse.bold',
|
|
@@ -41,7 +41,7 @@ export const themeSwitcherRecipe = defineRecipe({
|
|
|
41
41
|
'&:before': {
|
|
42
42
|
inset: '-8',
|
|
43
43
|
bg: 'bg.neutral.inverse.bold',
|
|
44
|
-
opacity: 0.25,
|
|
44
|
+
opacity: '[0.25]',
|
|
45
45
|
},
|
|
46
46
|
},
|
|
47
47
|
},
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
const timePickerBase = {
|
|
4
|
+
root: {
|
|
5
|
+
display: 'inline-flex',
|
|
6
|
+
flexDirection: 'column',
|
|
7
|
+
position: 'relative',
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
// The segmented input container — visually identical to textinput
|
|
11
|
+
input: {
|
|
12
|
+
display: 'inline-flex',
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
gap: '2',
|
|
15
|
+
width: 'full',
|
|
16
|
+
borderWidth: '1',
|
|
17
|
+
borderStyle: 'solid',
|
|
18
|
+
borderColor: 'border.input',
|
|
19
|
+
borderRadius: '4',
|
|
20
|
+
outlineWidth: '2',
|
|
21
|
+
outlineOffset: '-1',
|
|
22
|
+
outlineStyle: 'solid',
|
|
23
|
+
outlineColor: 'transparent',
|
|
24
|
+
bg: 'bg.input',
|
|
25
|
+
color: 'text',
|
|
26
|
+
fontFamily: 'mono',
|
|
27
|
+
lineHeight: 'default',
|
|
28
|
+
cursor: 'text',
|
|
29
|
+
userSelect: 'none',
|
|
30
|
+
transitionDuration: 'fast',
|
|
31
|
+
transitionProperty: 'background, border-color, outline-color',
|
|
32
|
+
transitionTimingFunction: 'default',
|
|
33
|
+
_focusWithin: {
|
|
34
|
+
bg: 'bg.input.pressed',
|
|
35
|
+
borderColor: 'border.focused',
|
|
36
|
+
outlineColor: 'border.focused',
|
|
37
|
+
},
|
|
38
|
+
_open: {
|
|
39
|
+
bg: 'bg.input.pressed',
|
|
40
|
+
borderColor: 'border.focused',
|
|
41
|
+
outlineColor: 'border.focused',
|
|
42
|
+
},
|
|
43
|
+
_disabled: {
|
|
44
|
+
bg: 'bg.disabled',
|
|
45
|
+
borderColor: 'border.disabled',
|
|
46
|
+
color: 'text.disabled',
|
|
47
|
+
cursor: 'not-allowed',
|
|
48
|
+
pointerEvents: 'none',
|
|
49
|
+
},
|
|
50
|
+
_error: {
|
|
51
|
+
borderColor: 'border.danger',
|
|
52
|
+
_hover: {
|
|
53
|
+
borderColor: 'border.danger',
|
|
54
|
+
},
|
|
55
|
+
_focusWithin: {
|
|
56
|
+
borderColor: 'border.danger',
|
|
57
|
+
outlineColor: 'border.danger',
|
|
58
|
+
},
|
|
59
|
+
_open: {
|
|
60
|
+
borderColor: 'border.danger',
|
|
61
|
+
outlineColor: 'border.danger',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
// Individual focusable segment span (HH, MM, AM/PM)
|
|
67
|
+
segment: {
|
|
68
|
+
display: 'inline-flex',
|
|
69
|
+
alignItems: 'center',
|
|
70
|
+
justifyContent: 'center',
|
|
71
|
+
outline: 'none',
|
|
72
|
+
borderRadius: '{sizes.2}',
|
|
73
|
+
cursor: 'default',
|
|
74
|
+
userSelect: 'none',
|
|
75
|
+
fontFamily: 'mono',
|
|
76
|
+
fontVariantsProperty: 'mono',
|
|
77
|
+
fontVariantNumeric: 'tabular-nums',
|
|
78
|
+
minWidth: '{sizes.24}',
|
|
79
|
+
textAlign: 'center',
|
|
80
|
+
color: 'text',
|
|
81
|
+
_focusVisible: {
|
|
82
|
+
bg: 'bg.neutral.hovered',
|
|
83
|
+
},
|
|
84
|
+
_groupDisabled: {
|
|
85
|
+
color: 'text.disabled',
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
// The ":" separator between time segments
|
|
90
|
+
separator: {
|
|
91
|
+
color: 'text.placeholder',
|
|
92
|
+
userSelect: 'none',
|
|
93
|
+
display: 'inline-flex',
|
|
94
|
+
alignItems: 'center',
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
// The floating time list container
|
|
98
|
+
popover: {
|
|
99
|
+
display: 'flex',
|
|
100
|
+
flexDirection: 'row',
|
|
101
|
+
bg: 'surface.overlay',
|
|
102
|
+
borderWidth: '1',
|
|
103
|
+
borderStyle: 'solid',
|
|
104
|
+
borderColor: 'border',
|
|
105
|
+
borderRadius: '8',
|
|
106
|
+
boxShadow: 'overlay',
|
|
107
|
+
zIndex: '1000',
|
|
108
|
+
overflow: 'hidden',
|
|
109
|
+
outline: 'none',
|
|
110
|
+
w: 'fit',
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
// A single scrollable column (hours, minutes, or AM/PM)
|
|
114
|
+
column: {
|
|
115
|
+
display: 'flex',
|
|
116
|
+
flexDirection: 'column',
|
|
117
|
+
overflowY: 'auto',
|
|
118
|
+
flex: 1,
|
|
119
|
+
maxHeight: '200',
|
|
120
|
+
scrollSnapType: 'y mandatory',
|
|
121
|
+
borderRight: 'default',
|
|
122
|
+
minW: '56',
|
|
123
|
+
textAlign: 'center',
|
|
124
|
+
_last: {
|
|
125
|
+
borderRight: 'none',
|
|
126
|
+
},
|
|
127
|
+
// Hide scrollbar visually but keep functionality
|
|
128
|
+
'&::-webkit-scrollbar': {
|
|
129
|
+
display: 'none',
|
|
130
|
+
},
|
|
131
|
+
scrollbarWidth: 'none' as const,
|
|
132
|
+
msOverflowStyle: 'none',
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
// Optional column header (e.g. "Hr", "Min")
|
|
136
|
+
columnLabel: {
|
|
137
|
+
display: 'flex',
|
|
138
|
+
alignItems: 'center',
|
|
139
|
+
justifyContent: 'center',
|
|
140
|
+
py: '4',
|
|
141
|
+
px: '8',
|
|
142
|
+
fontSize: '11',
|
|
143
|
+
fontWeight: 'medium',
|
|
144
|
+
color: 'text.subtlest',
|
|
145
|
+
textTransform: 'uppercase',
|
|
146
|
+
letterSpacing: 'widest',
|
|
147
|
+
borderBottom: 'default',
|
|
148
|
+
position: 'sticky',
|
|
149
|
+
top: '0',
|
|
150
|
+
bg: 'surface.overlay',
|
|
151
|
+
zIndex: 1,
|
|
152
|
+
userSelect: 'none',
|
|
153
|
+
},
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
const timePickerVariants = {
|
|
157
|
+
size: {
|
|
158
|
+
sm: {
|
|
159
|
+
input: {
|
|
160
|
+
py: '0',
|
|
161
|
+
px: '8',
|
|
162
|
+
fontSize: '14',
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
md: {
|
|
166
|
+
input: {
|
|
167
|
+
py: '3',
|
|
168
|
+
px: '10',
|
|
169
|
+
fontSize: '16',
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
lg: {
|
|
173
|
+
input: {
|
|
174
|
+
py: '7',
|
|
175
|
+
px: '12',
|
|
176
|
+
fontSize: '16',
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
export const timePickerRecipe = defineSlotRecipe({
|
|
183
|
+
className: 'timePicker',
|
|
184
|
+
jsx: ['TimePicker', 'TimeRangePicker'],
|
|
185
|
+
slots: [
|
|
186
|
+
'root',
|
|
187
|
+
'input',
|
|
188
|
+
'segment',
|
|
189
|
+
'separator',
|
|
190
|
+
'popover',
|
|
191
|
+
'column',
|
|
192
|
+
'columnLabel',
|
|
193
|
+
],
|
|
194
|
+
base: timePickerBase,
|
|
195
|
+
variants: timePickerVariants,
|
|
196
|
+
defaultVariants: {
|
|
197
|
+
size: 'md',
|
|
198
|
+
},
|
|
199
|
+
});
|
package/src/recipes/toggle.ts
CHANGED
|
@@ -1,116 +1,89 @@
|
|
|
1
1
|
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
export const toggleRecipe = defineSlotRecipe({
|
|
4
|
+
className: 'toggle',
|
|
5
|
+
jsx: ['Toggle'],
|
|
6
|
+
slots: ['container', 'input', 'indicator'],
|
|
7
|
+
base: {
|
|
8
|
+
container: {
|
|
9
|
+
position: 'relative',
|
|
10
|
+
w: '32',
|
|
11
|
+
h: '20',
|
|
12
|
+
my: '2',
|
|
13
|
+
rounded: '20',
|
|
14
|
+
bg: 'surface',
|
|
15
|
+
cursor: 'pointer',
|
|
16
|
+
transitionProperty: 'border-color, background-color',
|
|
17
|
+
transitionDuration: 'default',
|
|
18
|
+
transitionTimingFunction: 'ease-in-out',
|
|
19
|
+
borderWidth: '2',
|
|
20
|
+
borderStyle: 'solid',
|
|
21
|
+
borderColor: 'icon.decorative.subtle',
|
|
22
|
+
'&:has(input:checked)': {
|
|
23
|
+
bg: 'bg.neutral.inverse',
|
|
24
|
+
borderColor: 'transparent',
|
|
25
|
+
},
|
|
26
|
+
_error: {
|
|
27
|
+
borderColor: 'border.danger',
|
|
28
|
+
},
|
|
29
|
+
'&:has(:focus-visible)': {
|
|
30
|
+
appearance: 'none',
|
|
31
|
+
opacity: '[1]',
|
|
32
|
+
outlineColor: 'border.focused',
|
|
33
|
+
outlineOffset: '1',
|
|
34
|
+
outlineWidth: '2',
|
|
35
|
+
outlineStyle: 'solid',
|
|
36
|
+
rounded: '20',
|
|
37
|
+
w: '32',
|
|
38
|
+
h: '20',
|
|
39
|
+
},
|
|
14
40
|
},
|
|
15
|
-
},
|
|
16
41
|
|
|
17
|
-
|
|
18
|
-
position: 'absolute',
|
|
19
|
-
w: '40',
|
|
20
|
-
h: '24',
|
|
21
|
-
rounded: '24',
|
|
22
|
-
bg: 'surface',
|
|
23
|
-
transitionProperty: 'border-color, background-color',
|
|
24
|
-
transitionDuration: '200ms',
|
|
25
|
-
transitionTimingFunction: 'ease-in-out',
|
|
26
|
-
borderWidth: '2',
|
|
27
|
-
borderStyle: 'solid',
|
|
28
|
-
borderColor: 'border',
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
input: {
|
|
32
|
-
position: 'absolute',
|
|
33
|
-
opacity: 0,
|
|
34
|
-
w: '40',
|
|
35
|
-
h: '24',
|
|
36
|
-
rounded: '24',
|
|
37
|
-
m: 0,
|
|
38
|
-
p: 0,
|
|
39
|
-
border: 'none',
|
|
40
|
-
zIndex: 0,
|
|
41
|
-
cursor: 'inherit',
|
|
42
|
-
|
|
43
|
-
"& ~ [name='circle']": {
|
|
44
|
-
display: 'inline-grid',
|
|
42
|
+
input: {
|
|
45
43
|
position: 'absolute',
|
|
46
|
-
opacity:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
opacity: '[0]',
|
|
45
|
+
w: '32',
|
|
46
|
+
h: '20',
|
|
47
|
+
m: '-2',
|
|
48
|
+
p: '0',
|
|
49
|
+
border: 'none',
|
|
50
|
+
zIndex: 'base',
|
|
51
|
+
cursor: 'inherit',
|
|
52
52
|
},
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
display: '
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
indicator: {
|
|
55
|
+
display: 'none',
|
|
56
|
+
w: '20',
|
|
57
|
+
h: '20',
|
|
58
|
+
m: '-2',
|
|
59
59
|
transitionProperty: 'transform, opacity',
|
|
60
60
|
transitionDuration: '200ms',
|
|
61
61
|
transitionTimingFunction: 'ease-in-out',
|
|
62
|
-
},
|
|
63
62
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
"&:is([name='circle'])": {
|
|
64
|
+
display: 'inline-grid',
|
|
65
|
+
position: 'absolute',
|
|
66
|
+
opacity: '[1]',
|
|
67
|
+
fill: 'icon.decorative.subtle',
|
|
68
|
+
transform: '[translateX(0)]',
|
|
69
|
+
'input:checked ~ &': {
|
|
70
|
+
opacity: '[0]',
|
|
71
|
+
transform: '[translateX(8px)]',
|
|
72
|
+
},
|
|
68
73
|
},
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
74
|
+
|
|
75
|
+
"&:is([name='circle-check'])": {
|
|
76
|
+
display: 'inline-grid',
|
|
77
|
+
position: 'absolute',
|
|
78
|
+
opacity: 'inherit',
|
|
79
|
+
transform: '[translateX(0)]',
|
|
72
80
|
fill: 'icon.inverse',
|
|
81
|
+
'input:checked ~ &': {
|
|
82
|
+
opacity: '[1]',
|
|
83
|
+
transform: '[translateX(12px)]',
|
|
84
|
+
fill: 'icon.inverse',
|
|
85
|
+
},
|
|
73
86
|
},
|
|
74
|
-
"& ~ [name='toggle-bg']": {
|
|
75
|
-
bg: 'bg.neutral.inverse',
|
|
76
|
-
borderColor: 'bg.neutral.inverse',
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
_error: {
|
|
80
|
-
"& ~ [name='toggle-bg']": {
|
|
81
|
-
borderColor: 'error.default',
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
_focusVisible: {
|
|
86
|
-
appearance: 'none',
|
|
87
|
-
opacity: 1,
|
|
88
|
-
outlineColor: { base: 'gray.80', _dark: 'gray.10' },
|
|
89
|
-
outlineOffset: 1,
|
|
90
|
-
outlineWidth: 2,
|
|
91
|
-
outlineStyle: 'solid',
|
|
92
|
-
rounded: '24',
|
|
93
|
-
w: '40',
|
|
94
|
-
h: '24',
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
indicator: {
|
|
99
|
-
display: 'none',
|
|
100
|
-
w: '24',
|
|
101
|
-
h: '24',
|
|
102
|
-
transitionProperty: 'border-color, background-color',
|
|
103
|
-
transitionDuration: '200ms',
|
|
104
|
-
transitionTimingFunction: 'ease-in-out',
|
|
105
|
-
"&:is([name='circle'])": {
|
|
106
|
-
fill: { base: 'gray.20', _dark: 'gray.40' },
|
|
107
87
|
},
|
|
108
88
|
},
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
export const toggleRecipe = defineSlotRecipe({
|
|
112
|
-
className: 'toggle',
|
|
113
|
-
jsx: ['toggle'],
|
|
114
|
-
slots: ['container', 'input', 'indicator', 'background'],
|
|
115
|
-
base: toggleBase,
|
|
116
89
|
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
const toggleInputBase = {
|
|
4
|
+
display: 'grid',
|
|
5
|
+
gridTemplateColumns: '{sizes.32} auto',
|
|
6
|
+
gap: '6',
|
|
7
|
+
userSelect: 'none',
|
|
8
|
+
'&.cetec-label': {
|
|
9
|
+
fontSize: '{sizes.16}',
|
|
10
|
+
lineHeight: 'default',
|
|
11
|
+
},
|
|
12
|
+
_disabled: {
|
|
13
|
+
opacity: '40%',
|
|
14
|
+
cursor: 'not-allowed',
|
|
15
|
+
},
|
|
16
|
+
_groupDisabled: {
|
|
17
|
+
opacity: 1, // let FormField handle disabled state opacity
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const toggleInputRecipe = defineRecipe({
|
|
22
|
+
className: 'toggleInput',
|
|
23
|
+
jsx: ['ToggleInput', 'Toggleinput'],
|
|
24
|
+
base: toggleInputBase,
|
|
25
|
+
variants: {},
|
|
26
|
+
});
|