cetec-design-system 2.2.2-next.0 → 2.3.7
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/{cetec-preset-CcvrY8wh.js → cetec-preset-CZJA5UR0.js} +1696 -1331
- package/dist/cetec-preset-CZJA5UR0.js.map +1 -0
- package/dist/index.js +12655 -9360
- package/dist/index.js.map +1 -1
- package/dist/panda.buildinfo.json +461 -365
- package/dist/playroom-static.css +68887 -180258
- package/dist/preset.js +1 -1
- package/dist/specs/recipes.json +126 -25
- package/dist/styles.css +1315 -642
- package/dist/types/index.d.ts +3001 -273
- package/dist/types/preset.d.ts +15 -0
- package/package.json +6 -1
- package/src/recipes/autocomplete.ts +266 -0
- package/src/recipes/calendar.ts +92 -0
- package/src/recipes/chip.ts +6 -0
- package/src/recipes/dateMenus.ts +40 -0
- package/src/recipes/dateTimeMenus.ts +43 -0
- package/src/recipes/menu.ts +13 -1
- package/src/recipes/modal.ts +1 -1
- package/src/recipes/recipes-slot.ts +7 -2
- package/src/recipes/segmentedFields.ts +192 -0
- package/src/recipes/segmentedInputs.ts +106 -0
- package/src/recipes/text.ts +32 -28
- package/src/recipes/timeMenus.ts +110 -0
- package/src/styles/primitives/zIndex.ts +1 -0
- package/src/styles/semantics/colors.ts +44 -0
- package/src/styles/semantics/zIndex.ts +2 -0
- package/src/styles/utilities/conditions.ts +1 -0
- package/src/styles/utilities/transitions.ts +2 -1
- package/src/utils/dsChain.ts +113 -0
- package/src/utils/dsComponent.ts +44 -0
- package/src/utils/dsPart.ts +41 -0
- package/src/utils/splitProps.ts +15 -0
- package/dist/cetec-preset-CcvrY8wh.js.map +0 -1
- package/src/recipes/datePicker.ts +0 -230
- package/src/recipes/timePicker.ts +0 -206
package/dist/types/preset.d.ts
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import { Preset } from '@pandacss/dev';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Panda CSS preset containing Cetec tokens, semantic tokens, recipes,
|
|
5
|
+
* utilities, patterns, global CSS, and conditions.
|
|
6
|
+
*
|
|
7
|
+
* Add this preset to a Panda configuration to generate styles that match the
|
|
8
|
+
* design system. It extends Panda's base preset while replacing its
|
|
9
|
+
* `dropShadow` utility and omitting the base `box` and `divider` patterns.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { cetecPreset } from 'cetec-design-system';
|
|
14
|
+
*
|
|
15
|
+
* export default defineConfig({ presets: [cetecPreset] });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
3
18
|
export declare const cetecPreset: Preset;
|
|
4
19
|
|
|
5
20
|
export { }
|
package/package.json
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cetec-design-system",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.7",
|
|
4
4
|
"description": "Cetec-ERP Design System",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/types/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"prepare": "npx panda codegen && npx simple-git-hooks",
|
|
10
|
+
"predev": "npm run check:jsdoc",
|
|
10
11
|
"dev": "npx panda --watch & vite",
|
|
11
12
|
"build": "rm -rf dist && PANDA_STATIC=true npx panda && npx panda spec && npx panda ship --outfile ./panda.buildinfo.json && vite build",
|
|
12
13
|
"lint": "eslint .",
|
|
13
14
|
"lint:fix": "eslint . --fix",
|
|
14
15
|
"lint:staged": "lint-staged",
|
|
16
|
+
"check:jsdoc": "node tools/check-public-jsdoc.mjs --warn",
|
|
17
|
+
"check:jsdoc:strict": "node tools/check-public-jsdoc.mjs",
|
|
15
18
|
"typecheck": "tsc --noEmit",
|
|
16
19
|
"validate": "npm run lint && npm run typecheck",
|
|
17
20
|
"validate:full": "npm run validate && npm run build",
|
|
@@ -47,6 +50,7 @@
|
|
|
47
50
|
"peerDependencies": {
|
|
48
51
|
"@fontsource-variable/recursive": "^5.1.1",
|
|
49
52
|
"@fontsource-variable/ruda": "^5.1.1",
|
|
53
|
+
"@tanstack/react-form": "^1.0.0",
|
|
50
54
|
"react": "19.0.0",
|
|
51
55
|
"react-dom": "19.0.0"
|
|
52
56
|
},
|
|
@@ -67,6 +71,7 @@
|
|
|
67
71
|
"@storybook/react": "^8.6.17",
|
|
68
72
|
"@storybook/react-vite": "^8.6.17",
|
|
69
73
|
"@storybook/test": "^8.6.17",
|
|
74
|
+
"@tanstack/react-form": "^1.33.5",
|
|
70
75
|
"@types/node": "^22.15.30",
|
|
71
76
|
"@types/react": "19.0.8",
|
|
72
77
|
"@types/react-dom": "19.0.3",
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
import { globalBaseStyles } from '~/styles/utilities';
|
|
4
|
+
|
|
5
|
+
const validationStyles = {
|
|
6
|
+
danger: {
|
|
7
|
+
borderColor: 'border.danger',
|
|
8
|
+
outlineColor: 'border.danger',
|
|
9
|
+
},
|
|
10
|
+
success: {
|
|
11
|
+
borderColor: 'border.success',
|
|
12
|
+
outlineColor: 'border.success',
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const autocompleteBase = {
|
|
17
|
+
root: {
|
|
18
|
+
...globalBaseStyles,
|
|
19
|
+
'--control-py': 'token(sizes.3)',
|
|
20
|
+
'--control-px': 'token(sizes.10)',
|
|
21
|
+
'--control-fs': 'token(sizes.16)',
|
|
22
|
+
'--control-min-height': 'token(sizes.32)',
|
|
23
|
+
'--value-gap': 'token(sizes.4)',
|
|
24
|
+
'--input-min-width': 'token(sizes.80)',
|
|
25
|
+
'--loading-size': 'token(sizes.20)',
|
|
26
|
+
position: 'relative',
|
|
27
|
+
display: 'inline-flex',
|
|
28
|
+
flexDirection: 'column',
|
|
29
|
+
width: 'full',
|
|
30
|
+
minWidth: '0',
|
|
31
|
+
maxWidth: 'full',
|
|
32
|
+
fontFamily: 'body',
|
|
33
|
+
lineHeight: 'default',
|
|
34
|
+
_disabled: {
|
|
35
|
+
opacity: 0.4,
|
|
36
|
+
cursor: 'not-allowed',
|
|
37
|
+
},
|
|
38
|
+
_groupDisabled: {
|
|
39
|
+
opacity: 1,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
control: {
|
|
43
|
+
position: 'relative',
|
|
44
|
+
display: 'flex',
|
|
45
|
+
alignItems: 'center',
|
|
46
|
+
width: 'full',
|
|
47
|
+
minWidth: '0',
|
|
48
|
+
minHeight: 'var(--control-min-height)',
|
|
49
|
+
py: 'var(--control-py)',
|
|
50
|
+
ps: 'var(--control-px)',
|
|
51
|
+
pe: 'var(--control-px)',
|
|
52
|
+
bg: 'surface',
|
|
53
|
+
color: 'text',
|
|
54
|
+
borderWidth: '1',
|
|
55
|
+
borderStyle: 'solid',
|
|
56
|
+
borderColor: 'border.input',
|
|
57
|
+
borderRadius: '4',
|
|
58
|
+
outlineWidth: '1',
|
|
59
|
+
outlineStyle: 'solid',
|
|
60
|
+
outlineColor: 'transparent',
|
|
61
|
+
cursor: 'text',
|
|
62
|
+
transitionDuration: 'fast',
|
|
63
|
+
transitionProperty: 'background, border-color, outline-color',
|
|
64
|
+
transitionTimingFunction: 'default',
|
|
65
|
+
_focusWithin: {
|
|
66
|
+
borderColor: 'border.focused',
|
|
67
|
+
outlineColor: 'border.focused',
|
|
68
|
+
},
|
|
69
|
+
_open: {
|
|
70
|
+
borderColor: 'border.focused',
|
|
71
|
+
outlineColor: 'border.focused',
|
|
72
|
+
},
|
|
73
|
+
_error: validationStyles.danger,
|
|
74
|
+
_invalid: validationStyles.danger,
|
|
75
|
+
_valid: validationStyles.success,
|
|
76
|
+
_disabled: {
|
|
77
|
+
bg: 'bg.disabled',
|
|
78
|
+
borderColor: 'border.disabled',
|
|
79
|
+
color: 'text.disabled',
|
|
80
|
+
cursor: 'not-allowed',
|
|
81
|
+
pointerEvents: 'none',
|
|
82
|
+
_focusWithin: {
|
|
83
|
+
borderColor: 'border.disabled',
|
|
84
|
+
outlineColor: 'transparent',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
valueContainer: {
|
|
89
|
+
display: 'flex',
|
|
90
|
+
alignItems: 'center',
|
|
91
|
+
alignContent: 'center',
|
|
92
|
+
flex: '1',
|
|
93
|
+
flexWrap: 'wrap',
|
|
94
|
+
minWidth: '0',
|
|
95
|
+
gap: 'var(--value-gap)',
|
|
96
|
+
},
|
|
97
|
+
input: {
|
|
98
|
+
flexGrow: '1',
|
|
99
|
+
flexShrink: '0',
|
|
100
|
+
flexBasis: 'var(--input-min-width)',
|
|
101
|
+
minWidth: 'var(--input-min-width)',
|
|
102
|
+
maxWidth: 'full',
|
|
103
|
+
p: '0',
|
|
104
|
+
marginBlock: '-3',
|
|
105
|
+
bg: 'transparent',
|
|
106
|
+
color: 'text',
|
|
107
|
+
fontFamily: 'body',
|
|
108
|
+
fontSize: 'var(--control-fs)',
|
|
109
|
+
lineHeight: 'default',
|
|
110
|
+
border: 'none',
|
|
111
|
+
outline: 'none',
|
|
112
|
+
_placeholder: {
|
|
113
|
+
color: 'text.placeholder',
|
|
114
|
+
},
|
|
115
|
+
_disabled: {
|
|
116
|
+
color: 'text.disabled',
|
|
117
|
+
cursor: 'not-allowed',
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
token: {
|
|
121
|
+
minWidth: '0',
|
|
122
|
+
maxWidth: 'full',
|
|
123
|
+
flex: '0 1 auto',
|
|
124
|
+
_new: {
|
|
125
|
+
bg: 'transparent',
|
|
126
|
+
outlineWidth: '1',
|
|
127
|
+
outlineStyle: 'dashed',
|
|
128
|
+
outlineColor: 'border.warning',
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
overflowIndicator: {
|
|
132
|
+
display: 'inline-flex',
|
|
133
|
+
alignItems: 'center',
|
|
134
|
+
flexShrink: '0',
|
|
135
|
+
minHeight: 'var(--loading-size)',
|
|
136
|
+
px: '6',
|
|
137
|
+
bg: 'bg.neutral',
|
|
138
|
+
color: 'text.subtle',
|
|
139
|
+
borderRadius: '999',
|
|
140
|
+
fontSize: '14',
|
|
141
|
+
fontWeight: 'medium',
|
|
142
|
+
lineHeight: 'default',
|
|
143
|
+
whiteSpace: 'nowrap',
|
|
144
|
+
},
|
|
145
|
+
loadingIndicator: {
|
|
146
|
+
display: 'inline-flex',
|
|
147
|
+
alignItems: 'center',
|
|
148
|
+
alignSelf: 'center',
|
|
149
|
+
flexShrink: '0',
|
|
150
|
+
ms: 'var(--control-py)',
|
|
151
|
+
width: 'var(--loading-size)',
|
|
152
|
+
height: 'var(--loading-size)',
|
|
153
|
+
_icon: {
|
|
154
|
+
width: 'var(--loading-size)',
|
|
155
|
+
height: 'var(--loading-size)',
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
listbox: {
|
|
159
|
+
...globalBaseStyles,
|
|
160
|
+
width: 'full',
|
|
161
|
+
maxHeight: '192',
|
|
162
|
+
overflowY: 'auto',
|
|
163
|
+
bg: 'surface',
|
|
164
|
+
borderRadius: '4',
|
|
165
|
+
boxShadow: 'overlay',
|
|
166
|
+
outline: 'none',
|
|
167
|
+
},
|
|
168
|
+
status: {
|
|
169
|
+
display: 'flex',
|
|
170
|
+
alignItems: 'center',
|
|
171
|
+
width: 'full',
|
|
172
|
+
minHeight: '40',
|
|
173
|
+
px: '12',
|
|
174
|
+
py: '8',
|
|
175
|
+
color: 'text.subtle',
|
|
176
|
+
fontSize: '14',
|
|
177
|
+
lineHeight: 'default',
|
|
178
|
+
},
|
|
179
|
+
liveRegion: {
|
|
180
|
+
srOnly: true,
|
|
181
|
+
},
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
const autocompleteVariants = {
|
|
185
|
+
layer: {
|
|
186
|
+
elevated: {
|
|
187
|
+
listbox: {
|
|
188
|
+
zIndex: 'elevated',
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
modalFloating: {
|
|
192
|
+
listbox: {
|
|
193
|
+
zIndex: 'modalFloating',
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
size: {
|
|
198
|
+
sm: {
|
|
199
|
+
root: {
|
|
200
|
+
'--control-py': 'token(sizes.0)',
|
|
201
|
+
'--control-px': 'token(sizes.8)',
|
|
202
|
+
'--control-fs': 'token(sizes.14)',
|
|
203
|
+
'--control-min-height': 'token(sizes.24)',
|
|
204
|
+
'--value-gap': 'token(sizes.3)',
|
|
205
|
+
'--input-min-width': 'token(sizes.64)',
|
|
206
|
+
'--loading-size': 'token(sizes.16)',
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
md: {
|
|
210
|
+
root: {
|
|
211
|
+
'--control-py': 'token(sizes.3)',
|
|
212
|
+
'--control-px': 'token(sizes.10)',
|
|
213
|
+
'--control-fs': 'token(sizes.16)',
|
|
214
|
+
'--control-min-height': 'token(sizes.32)',
|
|
215
|
+
'--value-gap': 'token(sizes.4)',
|
|
216
|
+
'--input-min-width': 'token(sizes.80)',
|
|
217
|
+
'--loading-size': 'token(sizes.20)',
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
lg: {
|
|
221
|
+
root: {
|
|
222
|
+
'--control-py': 'token(sizes.7)',
|
|
223
|
+
'--control-px': 'token(sizes.12)',
|
|
224
|
+
'--control-fs': 'token(sizes.16)',
|
|
225
|
+
'--control-min-height': 'token(sizes.40)',
|
|
226
|
+
'--value-gap': 'token(sizes.5)',
|
|
227
|
+
'--input-min-width': 'token(sizes.96)',
|
|
228
|
+
'--loading-size': 'token(sizes.20)',
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
xl: {
|
|
232
|
+
root: {
|
|
233
|
+
'--control-py': 'token(sizes.9)',
|
|
234
|
+
'--control-px': 'token(sizes.16)',
|
|
235
|
+
'--control-fs': 'token(sizes.20)',
|
|
236
|
+
'--control-min-height': 'token(sizes.48)',
|
|
237
|
+
'--value-gap': 'token(sizes.6)',
|
|
238
|
+
'--input-min-width': 'token(sizes.112)',
|
|
239
|
+
'--loading-size': 'token(sizes.24)',
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
export const autocompleteRecipe = defineSlotRecipe({
|
|
246
|
+
className: 'autocomplete',
|
|
247
|
+
jsx: ['Autocomplete'],
|
|
248
|
+
slots: [
|
|
249
|
+
'root',
|
|
250
|
+
'control',
|
|
251
|
+
'valueContainer',
|
|
252
|
+
'input',
|
|
253
|
+
'token',
|
|
254
|
+
'overflowIndicator',
|
|
255
|
+
'loadingIndicator',
|
|
256
|
+
'listbox',
|
|
257
|
+
'status',
|
|
258
|
+
'liveRegion',
|
|
259
|
+
],
|
|
260
|
+
base: autocompleteBase,
|
|
261
|
+
variants: autocompleteVariants,
|
|
262
|
+
defaultVariants: {
|
|
263
|
+
size: 'md',
|
|
264
|
+
layer: 'elevated',
|
|
265
|
+
},
|
|
266
|
+
});
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
import { globalBaseStyles } from '~/styles/utilities';
|
|
4
|
+
|
|
5
|
+
export const calendarRecipe = defineSlotRecipe({
|
|
6
|
+
className: 'calendar',
|
|
7
|
+
jsx: ['Calendar'],
|
|
8
|
+
slots: ['root', 'header', 'grid', 'weekdayLabel', 'day', 'monthYearGrid'],
|
|
9
|
+
base: {
|
|
10
|
+
root: {
|
|
11
|
+
...globalBaseStyles,
|
|
12
|
+
display: 'flex',
|
|
13
|
+
flexDirection: 'column',
|
|
14
|
+
alignItems: 'flex-start',
|
|
15
|
+
bg: 'surface',
|
|
16
|
+
width: '278',
|
|
17
|
+
},
|
|
18
|
+
header: {
|
|
19
|
+
display: 'flex',
|
|
20
|
+
alignItems: 'center',
|
|
21
|
+
justifyContent: 'space-between',
|
|
22
|
+
gap: '4',
|
|
23
|
+
width: 'full',
|
|
24
|
+
p: '8',
|
|
25
|
+
borderBottom: 'default',
|
|
26
|
+
fontFamily: 'mono',
|
|
27
|
+
fontVariantsProperty: 'mono',
|
|
28
|
+
},
|
|
29
|
+
grid: {
|
|
30
|
+
display: 'grid',
|
|
31
|
+
gridTemplateColumns: 'repeat(7, minmax(0, 1fr))',
|
|
32
|
+
gap: '4',
|
|
33
|
+
width: 'fit',
|
|
34
|
+
p: '8',
|
|
35
|
+
mx: 'auto',
|
|
36
|
+
},
|
|
37
|
+
weekdayLabel: {
|
|
38
|
+
display: 'flex',
|
|
39
|
+
alignItems: 'center',
|
|
40
|
+
justifyContent: 'center',
|
|
41
|
+
userSelect: 'none',
|
|
42
|
+
},
|
|
43
|
+
day: {
|
|
44
|
+
position: 'relative',
|
|
45
|
+
alignItems: 'center',
|
|
46
|
+
justifyContent: 'center',
|
|
47
|
+
fontFamily: 'mono',
|
|
48
|
+
width: '32',
|
|
49
|
+
height: '32',
|
|
50
|
+
minWidth: '32',
|
|
51
|
+
_today: {
|
|
52
|
+
outline: '1px solid {colors.border.focused}',
|
|
53
|
+
outlineOffset: '1',
|
|
54
|
+
},
|
|
55
|
+
_unavailable: {
|
|
56
|
+
color: 'text.disabled',
|
|
57
|
+
cursor: 'not-allowed',
|
|
58
|
+
pointerEvents: 'none',
|
|
59
|
+
_hover: {
|
|
60
|
+
bg: 'transparent',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
monthYearGrid: {
|
|
65
|
+
display: 'grid',
|
|
66
|
+
gridTemplateColumns: 'repeat(3, minmax(0, 1fr))',
|
|
67
|
+
gap: '4',
|
|
68
|
+
width: 'full',
|
|
69
|
+
p: '8',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
variants: {
|
|
73
|
+
type: {
|
|
74
|
+
days: {},
|
|
75
|
+
months: {
|
|
76
|
+
day: {
|
|
77
|
+
width: 'auto',
|
|
78
|
+
px: '8',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
years: {
|
|
82
|
+
day: {
|
|
83
|
+
width: 'auto',
|
|
84
|
+
px: '8',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
defaultVariants: {
|
|
90
|
+
type: 'days',
|
|
91
|
+
},
|
|
92
|
+
});
|
package/src/recipes/chip.ts
CHANGED
|
@@ -134,6 +134,7 @@ export const chipRecipe = defineSlotRecipe({
|
|
|
134
134
|
position: 'relative',
|
|
135
135
|
display: 'inline-flex',
|
|
136
136
|
alignItems: 'center',
|
|
137
|
+
justifyContent: 'center',
|
|
137
138
|
minW: '0',
|
|
138
139
|
flexShrink: '0',
|
|
139
140
|
bg: 'transparent',
|
|
@@ -147,6 +148,11 @@ export const chipRecipe = defineSlotRecipe({
|
|
|
147
148
|
...buttonStyles,
|
|
148
149
|
w: 'calc(var(--slot-size) + (var(--slot-px) * 2))',
|
|
149
150
|
h: 'calc(var(--slot-size) + (var(--slot-px) * 2))',
|
|
151
|
+
_icon: {
|
|
152
|
+
fill: 'icon.decorative',
|
|
153
|
+
width: 'var(--slot-size)',
|
|
154
|
+
height: 'var(--slot-size)',
|
|
155
|
+
},
|
|
150
156
|
},
|
|
151
157
|
slot: {
|
|
152
158
|
display: 'inline-flex',
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
// Content-only slots shared by DateMenu (single Calendar) and DateRangeMenu
|
|
4
|
+
// (two Calendars + a middle divider + a Cancel/Apply footer for the pending
|
|
5
|
+
// selection). The popover chrome itself (bg/radius/shadow) comes from
|
|
6
|
+
// `<Menu>`, not from a slot here, so it isn't duplicated.
|
|
7
|
+
const dateMenusBase = {
|
|
8
|
+
// Row wrapper for DateRangeMenu's two Calendar instances.
|
|
9
|
+
calendars: {
|
|
10
|
+
display: 'flex',
|
|
11
|
+
alignItems: 'stretch',
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
// Vertical rule between the two calendars.
|
|
15
|
+
calendarsDivider: {
|
|
16
|
+
width: '1',
|
|
17
|
+
alignSelf: 'stretch',
|
|
18
|
+
bg: 'border',
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
// Right-aligned Cancel/Apply pair for the pending range selection.
|
|
22
|
+
footer: {
|
|
23
|
+
display: 'flex',
|
|
24
|
+
justifyContent: 'flex-end',
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
gap: '8',
|
|
27
|
+
borderTopWidth: '1',
|
|
28
|
+
borderTopStyle: 'solid',
|
|
29
|
+
borderColor: 'border',
|
|
30
|
+
px: '16',
|
|
31
|
+
py: '8',
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const dateMenusRecipe = defineSlotRecipe({
|
|
36
|
+
className: 'dateMenus',
|
|
37
|
+
jsx: ['DateMenus', 'DateMenu', 'DateRangeMenu'],
|
|
38
|
+
slots: ['calendars', 'calendarsDivider', 'footer'],
|
|
39
|
+
base: dateMenusBase,
|
|
40
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
// Content-only slots for DateTimeMenu: a single Calendar + a 4px divider +
|
|
4
|
+
// the same scrollable time columns TimeMenu/TimeRangeMenu use (imported
|
|
5
|
+
// directly from `timeMenus` in the component — the column look lives in one
|
|
6
|
+
// place). The popover chrome itself (bg/radius/shadow) comes from `<Menu>`,
|
|
7
|
+
// not from a slot here. One fixed layout, not range-variant, per the Figma spec.
|
|
8
|
+
const dateTimeMenusBase = {
|
|
9
|
+
// Row holding the Calendar + divider + time columns, above the footer.
|
|
10
|
+
content: {
|
|
11
|
+
display: 'flex',
|
|
12
|
+
alignItems: 'stretch',
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
// 4px-wide vertical divider between the Calendar and the time columns.
|
|
16
|
+
divider: {
|
|
17
|
+
width: '4',
|
|
18
|
+
alignSelf: 'stretch',
|
|
19
|
+
bg: 'border',
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
// Right-aligned Cancel/Apply pair — always present per the Figma spec,
|
|
23
|
+
// even though DateTimeMenu isn't itself a range variant.
|
|
24
|
+
footer: {
|
|
25
|
+
display: 'flex',
|
|
26
|
+
justifyContent: 'flex-end',
|
|
27
|
+
alignItems: 'center',
|
|
28
|
+
w: 'full',
|
|
29
|
+
gap: '8',
|
|
30
|
+
borderTopWidth: '1',
|
|
31
|
+
borderTopStyle: 'solid',
|
|
32
|
+
borderColor: 'border',
|
|
33
|
+
px: '16',
|
|
34
|
+
py: '8',
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const dateTimeMenusRecipe = defineSlotRecipe({
|
|
39
|
+
className: 'dateTimeMenus',
|
|
40
|
+
jsx: ['DateTimeMenus', 'DateTimeMenu'],
|
|
41
|
+
slots: ['content', 'divider', 'footer'],
|
|
42
|
+
base: dateTimeMenusBase,
|
|
43
|
+
});
|
package/src/recipes/menu.ts
CHANGED
|
@@ -10,7 +10,6 @@ const menuBase = {
|
|
|
10
10
|
borderRadius: '4',
|
|
11
11
|
boxShadow: 'overlay',
|
|
12
12
|
overflow: 'hidden',
|
|
13
|
-
zIndex: '100',
|
|
14
13
|
transitionProperty: 'width, height',
|
|
15
14
|
transitionDuration: 'normal',
|
|
16
15
|
transitionTimingFunction: 'default',
|
|
@@ -72,6 +71,18 @@ const menuBase = {
|
|
|
72
71
|
};
|
|
73
72
|
|
|
74
73
|
const menuVariants = {
|
|
74
|
+
layer: {
|
|
75
|
+
elevated: {
|
|
76
|
+
wrapper: {
|
|
77
|
+
zIndex: 'elevated',
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
modalFloating: {
|
|
81
|
+
wrapper: {
|
|
82
|
+
zIndex: 'modalFloating',
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
75
86
|
density: {
|
|
76
87
|
compact: {
|
|
77
88
|
backHeader: {
|
|
@@ -131,5 +142,6 @@ export const menuRecipe = defineSlotRecipe({
|
|
|
131
142
|
variants: menuVariants,
|
|
132
143
|
defaultVariants: {
|
|
133
144
|
density: 'compact',
|
|
145
|
+
layer: 'elevated',
|
|
134
146
|
},
|
|
135
147
|
});
|
package/src/recipes/modal.ts
CHANGED
|
@@ -164,7 +164,7 @@ const modalVariants = {
|
|
|
164
164
|
|
|
165
165
|
export const modalRecipe = defineSlotRecipe({
|
|
166
166
|
className: 'modal',
|
|
167
|
-
jsx: ['
|
|
167
|
+
jsx: ['ModalWrapper', 'ModalHeader', 'ModalBody', 'ModalFooter', 'Modal'],
|
|
168
168
|
slots: [
|
|
169
169
|
'positionWrapper',
|
|
170
170
|
'overlay',
|
|
@@ -11,8 +11,13 @@ export { chipRecipe } from './chip';
|
|
|
11
11
|
export { listItemRecipe } from './listItem';
|
|
12
12
|
export { listItemGroupRecipe } from './listItemGroup';
|
|
13
13
|
export { modalRecipe } from './modal';
|
|
14
|
-
export { datePickerRecipe } from './datePicker';
|
|
15
|
-
export { timePickerRecipe } from './timePicker';
|
|
16
14
|
export { breadcrumbsRecipe } from './breadcrumbs';
|
|
17
15
|
export { selectRecipe } from './select';
|
|
18
16
|
export { kbdRecipe } from './kbd';
|
|
17
|
+
export { autocompleteRecipe } from './autocomplete';
|
|
18
|
+
export { segmentedInputsRecipe } from './segmentedInputs';
|
|
19
|
+
export { segmentedFieldsRecipe } from './segmentedFields';
|
|
20
|
+
export { calendarRecipe } from './calendar';
|
|
21
|
+
export { dateMenusRecipe } from './dateMenus';
|
|
22
|
+
export { timeMenusRecipe } from './timeMenus';
|
|
23
|
+
export { dateTimeMenusRecipe } from './dateTimeMenus';
|