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
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
import { globalBaseStyles } from '~/styles/utilities';
|
|
4
|
+
|
|
5
|
+
const segmentedFieldsBase = {
|
|
6
|
+
container: {
|
|
7
|
+
...globalBaseStyles,
|
|
8
|
+
'--input-py': 'token(sizes.3)',
|
|
9
|
+
'--input-px': 'token(sizes.10)',
|
|
10
|
+
'--slot-size': 'token(sizes.20)',
|
|
11
|
+
'--slot-px': 'token(sizes.6)',
|
|
12
|
+
position: 'relative',
|
|
13
|
+
display: 'flex',
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
width: 'full',
|
|
16
|
+
py: 'var(--input-py)',
|
|
17
|
+
px: 'var(--input-px)',
|
|
18
|
+
bg: 'bg.input',
|
|
19
|
+
borderWidth: '1',
|
|
20
|
+
borderStyle: 'solid',
|
|
21
|
+
borderColor: 'border.input',
|
|
22
|
+
borderRadius: '4',
|
|
23
|
+
outlineWidth: '2',
|
|
24
|
+
outlineOffset: '-1',
|
|
25
|
+
outlineStyle: 'solid',
|
|
26
|
+
outlineColor: 'transparent',
|
|
27
|
+
transitionDuration: 'fast',
|
|
28
|
+
transitionProperty: 'background, border-color, outline-color',
|
|
29
|
+
transitionTimingFunction: 'default',
|
|
30
|
+
'&:focus-within:not(:has(button:focus))': {
|
|
31
|
+
bg: 'bg.input.pressed',
|
|
32
|
+
borderColor: 'border.focused',
|
|
33
|
+
outlineColor: 'border.focused',
|
|
34
|
+
},
|
|
35
|
+
_open: {
|
|
36
|
+
bg: 'bg.input.pressed',
|
|
37
|
+
borderColor: 'border.focused',
|
|
38
|
+
outlineColor: 'border.focused',
|
|
39
|
+
},
|
|
40
|
+
_disabled: {
|
|
41
|
+
bg: 'bg.disabled',
|
|
42
|
+
borderColor: 'border.disabled',
|
|
43
|
+
cursor: 'not-allowed',
|
|
44
|
+
pointerEvents: 'none',
|
|
45
|
+
},
|
|
46
|
+
_error: {
|
|
47
|
+
borderColor: 'border.danger',
|
|
48
|
+
'&:focus-within:not(:has(button:focus))': {
|
|
49
|
+
borderColor: 'border.danger',
|
|
50
|
+
outlineColor: 'border.danger',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
_invalid: {
|
|
54
|
+
borderColor: 'border.danger',
|
|
55
|
+
'&:focus-within:not(:has(button:focus))': {
|
|
56
|
+
borderColor: 'border.danger',
|
|
57
|
+
outlineColor: 'border.danger',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
slot: {
|
|
62
|
+
display: 'inline-flex',
|
|
63
|
+
alignItems: 'center',
|
|
64
|
+
transitionDuration: 'fast',
|
|
65
|
+
transitionProperty: 'all',
|
|
66
|
+
transitionTimingFunction: 'default',
|
|
67
|
+
flex: '0 0 var(--slot-size)',
|
|
68
|
+
px: 'var(--slot-px)',
|
|
69
|
+
fill: 'icon.decorative',
|
|
70
|
+
pointerEvents: 'none',
|
|
71
|
+
zIndex: 1,
|
|
72
|
+
},
|
|
73
|
+
buttonSlot: {
|
|
74
|
+
display: 'inline-flex',
|
|
75
|
+
alignItems: 'center',
|
|
76
|
+
flex: '0 0 var(--slot-size)',
|
|
77
|
+
px: '0',
|
|
78
|
+
zIndex: 1,
|
|
79
|
+
m: '-1',
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
const segmentedFieldsVariants = {
|
|
84
|
+
size: {
|
|
85
|
+
sm: {
|
|
86
|
+
container: {
|
|
87
|
+
'--input-py': 'token(sizes.0)',
|
|
88
|
+
'--input-px': 'token(sizes.8)',
|
|
89
|
+
'--slot-size': 'token(sizes.16)',
|
|
90
|
+
'--slot-px': 'token(sizes.4)',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
md: {
|
|
94
|
+
container: {
|
|
95
|
+
'--input-py': 'token(sizes.3)',
|
|
96
|
+
'--input-px': 'token(sizes.10)',
|
|
97
|
+
'--slot-size': 'token(sizes.20)',
|
|
98
|
+
'--slot-px': 'token(sizes.6)',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
lg: {
|
|
102
|
+
container: {
|
|
103
|
+
'--input-py': 'token(sizes.7)',
|
|
104
|
+
'--input-px': 'token(sizes.12)',
|
|
105
|
+
'--slot-size': 'token(sizes.24)',
|
|
106
|
+
'--slot-px': 'token(sizes.8)',
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
xl: {
|
|
110
|
+
container: {
|
|
111
|
+
'--input-py': 'token(sizes.9)',
|
|
112
|
+
'--input-px': 'token(sizes.16)',
|
|
113
|
+
'--slot-size': 'token(sizes.28)',
|
|
114
|
+
'--slot-px': 'token(sizes.10)',
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
field: {
|
|
119
|
+
date: {
|
|
120
|
+
container: {
|
|
121
|
+
minW: '128',
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
time: {
|
|
125
|
+
container: {
|
|
126
|
+
minW: '104',
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
dateTime: {
|
|
130
|
+
container: {
|
|
131
|
+
minW: '216',
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
range: {
|
|
136
|
+
date: {
|
|
137
|
+
container: {
|
|
138
|
+
minW: '248',
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
time: {
|
|
142
|
+
container: {
|
|
143
|
+
minW: '200',
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
before: {
|
|
148
|
+
true: {
|
|
149
|
+
container: {
|
|
150
|
+
ps: '0',
|
|
151
|
+
},
|
|
152
|
+
buttonSlot: {
|
|
153
|
+
'& button': {
|
|
154
|
+
borderTopRightRadius: '0',
|
|
155
|
+
borderBottomRightRadius: '0',
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
after: {
|
|
161
|
+
true: {
|
|
162
|
+
container: {
|
|
163
|
+
pe: '0',
|
|
164
|
+
},
|
|
165
|
+
buttonSlot: {
|
|
166
|
+
'& button': {
|
|
167
|
+
borderTopLeftRadius: '0',
|
|
168
|
+
borderBottomLeftRadius: '0',
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
// validate-ignore: recipe-jsx-name-matches-component — shared chrome for the segmented date/time field family
|
|
176
|
+
export const segmentedFieldsRecipe = defineSlotRecipe({
|
|
177
|
+
className: 'segmentedFields',
|
|
178
|
+
jsx: [
|
|
179
|
+
'SegmentedFields',
|
|
180
|
+
'DateInput',
|
|
181
|
+
'DateRangeInput',
|
|
182
|
+
'TimeInput',
|
|
183
|
+
'TimeRangeInput',
|
|
184
|
+
'DateTimeInput',
|
|
185
|
+
],
|
|
186
|
+
slots: ['container', 'slot', 'buttonSlot'],
|
|
187
|
+
base: segmentedFieldsBase,
|
|
188
|
+
variants: segmentedFieldsVariants,
|
|
189
|
+
defaultVariants: {
|
|
190
|
+
size: 'md',
|
|
191
|
+
},
|
|
192
|
+
});
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
import { globalBaseStyles } from '~/styles/utilities';
|
|
4
|
+
|
|
5
|
+
// Shared low-level styling for segmented input guts (MM/DD/YYYY, HH:MM AM/PM,
|
|
6
|
+
// account-style part numbers, phone-like segments, etc). Higher-level input
|
|
7
|
+
// wrappers own border, background, padding, validation, and open/focus state.
|
|
8
|
+
const segmentedInputsBase = {
|
|
9
|
+
root: {
|
|
10
|
+
...globalBaseStyles,
|
|
11
|
+
display: 'inline-flex',
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
gap: '0',
|
|
14
|
+
width: 'fit',
|
|
15
|
+
color: 'text',
|
|
16
|
+
fontFamily: 'mono',
|
|
17
|
+
lineHeight: 'default',
|
|
18
|
+
cursor: 'text',
|
|
19
|
+
userSelect: 'none',
|
|
20
|
+
flexGrow: '0',
|
|
21
|
+
flexShrink: '0',
|
|
22
|
+
flexBasis: 'fit',
|
|
23
|
+
minW: '0',
|
|
24
|
+
_disabled: {
|
|
25
|
+
color: 'text.disabled',
|
|
26
|
+
cursor: 'not-allowed',
|
|
27
|
+
pointerEvents: 'none',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
// Individual focusable segment span (MM, DD, YYYY, HH, AM/PM, ...)
|
|
32
|
+
segment: {
|
|
33
|
+
display: 'inline-flex',
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
justifyContent: 'center',
|
|
36
|
+
outline: 'none',
|
|
37
|
+
borderRadius: '2',
|
|
38
|
+
cursor: 'default',
|
|
39
|
+
userSelect: 'none',
|
|
40
|
+
fontFamily: 'mono',
|
|
41
|
+
fontVariantsProperty: 'mono',
|
|
42
|
+
fontVariantNumeric: 'tabular-nums',
|
|
43
|
+
textAlign: 'center',
|
|
44
|
+
color: 'text',
|
|
45
|
+
_focus: {
|
|
46
|
+
bg: 'bg.accent.gold.subtlest/75',
|
|
47
|
+
},
|
|
48
|
+
_groupDisabled: {
|
|
49
|
+
color: 'text.disabled',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
// The "/" or ":" or " " literal between segments. `minWidth: '0.75em'`
|
|
54
|
+
// is a deliberate floor, not decoration — the " " separators (minute/AM-PM,
|
|
55
|
+
// and the gap between a DateTimeInput's date/time halves) render at 0
|
|
56
|
+
// layout width in the Recursive Variable font at this size/axis regardless
|
|
57
|
+
// of `whiteSpace: 'pre'` (confirmed: real space character, zero measured
|
|
58
|
+
// width) — a font-rendering quirk, not a whitespace-collapsing bug. The
|
|
59
|
+
// floor keeps the visual gap independent of what the glyph itself measures.
|
|
60
|
+
separator: {
|
|
61
|
+
color: 'text.placeholder',
|
|
62
|
+
textAlign: 'center',
|
|
63
|
+
userSelect: 'none',
|
|
64
|
+
whiteSpace: 'pre',
|
|
65
|
+
minWidth: '0.75em',
|
|
66
|
+
display: 'inline-flex',
|
|
67
|
+
alignItems: 'center',
|
|
68
|
+
justifyContent: 'center',
|
|
69
|
+
'&[data-gap=none]': {
|
|
70
|
+
minWidth: '0',
|
|
71
|
+
px: '0',
|
|
72
|
+
},
|
|
73
|
+
'&[data-gap=tight]': {
|
|
74
|
+
minWidth: '0.5em',
|
|
75
|
+
px: '1',
|
|
76
|
+
},
|
|
77
|
+
'&[data-gap=normal]': {
|
|
78
|
+
minWidth: '0.75em',
|
|
79
|
+
px: '1',
|
|
80
|
+
},
|
|
81
|
+
'&[data-gap=loose]': {
|
|
82
|
+
minWidth: '1.25em',
|
|
83
|
+
px: '2',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const segmentedInputsVariants = {
|
|
89
|
+
size: {
|
|
90
|
+
sm: { root: { fontSize: '14' } },
|
|
91
|
+
md: { root: { fontSize: '16' } },
|
|
92
|
+
lg: { root: { fontSize: '16' } },
|
|
93
|
+
xl: { root: { fontSize: '20' } },
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export const segmentedInputsRecipe = defineSlotRecipe({
|
|
98
|
+
className: 'segmentedInputs',
|
|
99
|
+
jsx: ['SegmentedInputs', 'SegmentedInput', 'SegmentedDate', 'SegmentedTime'],
|
|
100
|
+
slots: ['root', 'segment', 'separator'],
|
|
101
|
+
base: segmentedInputsBase,
|
|
102
|
+
variants: segmentedInputsVariants,
|
|
103
|
+
defaultVariants: {
|
|
104
|
+
size: 'md',
|
|
105
|
+
},
|
|
106
|
+
});
|
package/src/recipes/text.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { defineRecipe } from '@pandacss/dev';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from '../styles/
|
|
7
|
-
import { globalBaseStyles } from '../styles/utilities';
|
|
8
|
-
import { fontVariants } from '../styles/utilities';
|
|
3
|
+
import { fontSizes as fontSizeTokens } from '../styles/primitives/fontSizes';
|
|
4
|
+
import { fontWeights as fontWeightTokens } from '../styles/primitives/fontWeights';
|
|
5
|
+
import { fontVariants } from '../styles/utilities/fontVariants';
|
|
6
|
+
import { globalBaseStyles } from '../styles/utilities/recipeGlobalStyles';
|
|
9
7
|
|
|
10
8
|
const textBase = {
|
|
11
9
|
...globalBaseStyles,
|
|
@@ -65,6 +63,18 @@ const textVariants = {
|
|
|
65
63
|
underline: {
|
|
66
64
|
true: {
|
|
67
65
|
textDecoration: 'underline',
|
|
66
|
+
textDecorationThickness: '[0.0625em]',
|
|
67
|
+
textUnderlineOffset: '[0.15625em]',
|
|
68
|
+
textDecorationSkipInk: 'all',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
dashedUnderline: {
|
|
72
|
+
true: {
|
|
73
|
+
textDecoration: 'underline',
|
|
74
|
+
textDecorationStyle: 'dashed',
|
|
75
|
+
textDecorationThickness: '[0.0625em]',
|
|
76
|
+
textUnderlineOffset: '[0.15625em]',
|
|
77
|
+
textDecorationSkipInk: 'all',
|
|
68
78
|
},
|
|
69
79
|
},
|
|
70
80
|
truncate: {
|
|
@@ -116,38 +126,32 @@ const linkBase = {
|
|
|
116
126
|
fontWeight: 'medium',
|
|
117
127
|
gap: '1',
|
|
118
128
|
color: 'link',
|
|
119
|
-
textDecoration: '
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
outlineOffset: '1',
|
|
128
|
-
width: 'fit-content',
|
|
129
|
-
cursor: 'pointer',
|
|
129
|
+
textDecoration: 'underline',
|
|
130
|
+
textDecorationThickness: '[0.0625em]',
|
|
131
|
+
textUnderlineOffset: '[0.15625em]',
|
|
132
|
+
textDecorationSkipInk: 'all',
|
|
133
|
+
textDecorationColor: '[color-mix(in srgb, currentColor 30%, transparent)]',
|
|
134
|
+
transition: 'all',
|
|
135
|
+
transitionDuration: 'fast',
|
|
136
|
+
bg: 'none',
|
|
130
137
|
_hover: {
|
|
131
|
-
color: 'link',
|
|
132
|
-
|
|
138
|
+
color: 'link.pressed',
|
|
139
|
+
textDecorationColor: 'current',
|
|
140
|
+
textDecorationThickness: '[0.125em]',
|
|
133
141
|
},
|
|
134
142
|
_focusVisible: {
|
|
135
143
|
borderRadius: '4',
|
|
136
144
|
outlineColor: 'border.focused',
|
|
137
145
|
},
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
const linkVariants = {
|
|
141
|
-
...textVariants,
|
|
142
146
|
_disabled: {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
pointerEvents: 'none',
|
|
147
|
-
},
|
|
147
|
+
cursor: 'not-allowed',
|
|
148
|
+
opacity: 0.4,
|
|
149
|
+
pointerEvents: 'none',
|
|
148
150
|
},
|
|
149
151
|
};
|
|
150
152
|
|
|
153
|
+
const linkVariants = { ...textVariants };
|
|
154
|
+
|
|
151
155
|
const labelBase = {
|
|
152
156
|
fontSize: '16',
|
|
153
157
|
fontWeight: 'normal',
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
// Content-only slots for TimeMenu/TimeRangeMenu's scrollable HR/MIN[/AM-PM]
|
|
4
|
+
// column picker — the popover chrome itself (bg/radius/shadow) comes from
|
|
5
|
+
// `<Menu>`, not from a slot here, so it isn't duplicated. Reused directly by
|
|
6
|
+
// DateTimeMenu for its own time columns (see `dateTimeMenus.ts`) so the
|
|
7
|
+
// column look only lives in one place. Structure/sizing preserves the
|
|
8
|
+
// established picker column treatment (maxHeight, border separators instead
|
|
9
|
+
// of a standalone divider element, hidden scrollbar).
|
|
10
|
+
const timeMenusBase = {
|
|
11
|
+
// Row of columns (HR | MIN | AM-PM), doubled with its own divider for range.
|
|
12
|
+
// minH: '0' overrides the flexbox default of min-height:auto on a flex
|
|
13
|
+
// item, which otherwise floors this box at its content's natural height
|
|
14
|
+
// and defeats stretching it down to match a shorter sibling (DateTimeMenu's
|
|
15
|
+
// Calendar) — see the `column` slot below for the full explanation.
|
|
16
|
+
columns: {
|
|
17
|
+
display: 'flex',
|
|
18
|
+
alignItems: 'stretch',
|
|
19
|
+
minH: '0',
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
// A single scrollable HR/MIN/AM-PM column. `maxHeight` (not `h: 'full'`)
|
|
23
|
+
// matters here — Menu's own internal wrapper chain (levelsViewport >
|
|
24
|
+
// levelsTrack > level > list) doesn't propagate a concrete height down to
|
|
25
|
+
// this element, so `h: 'full'` resolves to "as tall as my content" and
|
|
26
|
+
// `overflowY: auto` never actually engages; an explicit cap makes the
|
|
27
|
+
// column bound itself regardless of what any ancestor does. `200` keeps
|
|
28
|
+
// the existing picker column cap exactly.
|
|
29
|
+
column: {
|
|
30
|
+
display: 'flex',
|
|
31
|
+
flexDirection: 'column',
|
|
32
|
+
flex: '1',
|
|
33
|
+
minW: '56',
|
|
34
|
+
// minH: '0' is the load-bearing part, not maxHeight — a flex item's
|
|
35
|
+
// default min-height:auto floors it at its content's natural height no
|
|
36
|
+
// matter what cross-axis stretch or maxHeight say, which silently
|
|
37
|
+
// defeats overflowY:auto (nothing to scroll if the box just grows to
|
|
38
|
+
// fit everything). Zeroing it lets maxHeight (standalone) or the
|
|
39
|
+
// stretch variant's parent-driven height (DateTimeMenu) actually apply.
|
|
40
|
+
minH: '0',
|
|
41
|
+
maxHeight: '200',
|
|
42
|
+
overflowY: 'auto',
|
|
43
|
+
textAlign: 'center',
|
|
44
|
+
borderRightWidth: '1',
|
|
45
|
+
borderRightStyle: 'solid',
|
|
46
|
+
borderColor: 'border',
|
|
47
|
+
_last: {
|
|
48
|
+
borderRight: 'none',
|
|
49
|
+
},
|
|
50
|
+
// Hide the scrollbar visually but keep it functional — matches legacy.
|
|
51
|
+
'&::-webkit-scrollbar': {
|
|
52
|
+
display: 'none',
|
|
53
|
+
},
|
|
54
|
+
scrollbarWidth: 'none',
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
// "HR" / "MIN" / "AM/PM" column label.
|
|
58
|
+
columnHeader: {
|
|
59
|
+
position: 'sticky',
|
|
60
|
+
top: '0',
|
|
61
|
+
textAlign: 'center',
|
|
62
|
+
fontSize: '12',
|
|
63
|
+
fontWeight: 'semibold',
|
|
64
|
+
color: 'text.subtlest',
|
|
65
|
+
bg: 'surface',
|
|
66
|
+
py: '4',
|
|
67
|
+
borderBottomWidth: '1',
|
|
68
|
+
borderBottomStyle: 'solid',
|
|
69
|
+
borderColor: 'border',
|
|
70
|
+
zIndex: '1',
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
// Right-aligned Cancel/Apply pair — TimeRangeMenu only (TimeMenu commits
|
|
74
|
+
// immediately per value, same as DateMenu's non-range case).
|
|
75
|
+
footer: {
|
|
76
|
+
display: 'flex',
|
|
77
|
+
justifyContent: 'flex-end',
|
|
78
|
+
alignItems: 'center',
|
|
79
|
+
gap: '8',
|
|
80
|
+
borderTopWidth: '1',
|
|
81
|
+
borderTopStyle: 'solid',
|
|
82
|
+
borderColor: 'border',
|
|
83
|
+
px: '16',
|
|
84
|
+
py: '8',
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const timeMenusVariants = {
|
|
89
|
+
// DateTimeMenu pairs the columns with a Calendar sibling inside a
|
|
90
|
+
// stretch-aligned flex row, so the columns can size to match the
|
|
91
|
+
// Calendar's real rendered height instead of the standalone 200px cap —
|
|
92
|
+
// without this, the columns clip well short of the taller Calendar next to
|
|
93
|
+
// them. TimeMenu/TimeRangeMenu have no such sibling to stretch against, so
|
|
94
|
+
// they keep the fixed cap as their own default.
|
|
95
|
+
stretch: {
|
|
96
|
+
true: {
|
|
97
|
+
column: {
|
|
98
|
+
maxHeight: 'none',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export const timeMenusRecipe = defineSlotRecipe({
|
|
105
|
+
className: 'timeMenus',
|
|
106
|
+
jsx: ['TimeMenus', 'TimeMenu', 'TimeRangeMenu'],
|
|
107
|
+
slots: ['columns', 'column', 'columnHeader', 'footer'],
|
|
108
|
+
base: timeMenusBase,
|
|
109
|
+
variants: timeMenusVariants,
|
|
110
|
+
});
|
|
@@ -129,6 +129,17 @@ export const colors = defineSemanticTokens.colors({
|
|
|
129
129
|
value: { base: '{colors.green.70}', _dark: '{colors.green.20}' },
|
|
130
130
|
},
|
|
131
131
|
},
|
|
132
|
+
subtle: {
|
|
133
|
+
DEFAULT: {
|
|
134
|
+
value: { base: '{colors.green.5}', _dark: '{colors.green.80}' },
|
|
135
|
+
},
|
|
136
|
+
hovered: {
|
|
137
|
+
value: { base: '{colors.green.10}', _dark: '{colors.green.70}' },
|
|
138
|
+
},
|
|
139
|
+
pressed: {
|
|
140
|
+
value: { base: '{colors.green.20}', _dark: '{colors.green.90}' },
|
|
141
|
+
},
|
|
142
|
+
},
|
|
132
143
|
},
|
|
133
144
|
warning: {
|
|
134
145
|
DEFAULT: {
|
|
@@ -151,6 +162,17 @@ export const colors = defineSemanticTokens.colors({
|
|
|
151
162
|
value: { base: '{colors.orange.70}', _dark: '{colors.orange.50}' },
|
|
152
163
|
},
|
|
153
164
|
},
|
|
165
|
+
subtle: {
|
|
166
|
+
DEFAULT: {
|
|
167
|
+
value: { base: '{colors.orange.5}', _dark: '{colors.orange.80}' },
|
|
168
|
+
},
|
|
169
|
+
hovered: {
|
|
170
|
+
value: { base: '{colors.orange.10}', _dark: '{colors.orange.70}' },
|
|
171
|
+
},
|
|
172
|
+
pressed: {
|
|
173
|
+
value: { base: '{colors.orange.20}', _dark: '{colors.orange.90}' },
|
|
174
|
+
},
|
|
175
|
+
},
|
|
154
176
|
},
|
|
155
177
|
danger: {
|
|
156
178
|
DEFAULT: {
|
|
@@ -169,6 +191,17 @@ export const colors = defineSemanticTokens.colors({
|
|
|
169
191
|
value: { base: '{colors.red.60}', _dark: '{colors.red.50}' },
|
|
170
192
|
},
|
|
171
193
|
},
|
|
194
|
+
subtle: {
|
|
195
|
+
DEFAULT: {
|
|
196
|
+
value: { base: '{colors.red.5}', _dark: '{colors.red.80}' },
|
|
197
|
+
},
|
|
198
|
+
hovered: {
|
|
199
|
+
value: { base: '{colors.red.10}', _dark: '{colors.red.70}' },
|
|
200
|
+
},
|
|
201
|
+
pressed: {
|
|
202
|
+
value: { base: '{colors.red.20}', _dark: '{colors.red.90}' },
|
|
203
|
+
},
|
|
204
|
+
},
|
|
172
205
|
},
|
|
173
206
|
info: {
|
|
174
207
|
DEFAULT: {
|
|
@@ -191,6 +224,17 @@ export const colors = defineSemanticTokens.colors({
|
|
|
191
224
|
value: { base: '{colors.blue.70}', _dark: '{colors.blue.20}' },
|
|
192
225
|
},
|
|
193
226
|
},
|
|
227
|
+
subtle: {
|
|
228
|
+
DEFAULT: {
|
|
229
|
+
value: { base: '{colors.blue.5}', _dark: '{colors.blue.80}' },
|
|
230
|
+
},
|
|
231
|
+
hovered: {
|
|
232
|
+
value: { base: '{colors.blue.10}', _dark: '{colors.blue.70}' },
|
|
233
|
+
},
|
|
234
|
+
pressed: {
|
|
235
|
+
value: { base: '{colors.blue.20}', _dark: '{colors.blue.90}' },
|
|
236
|
+
},
|
|
237
|
+
},
|
|
194
238
|
},
|
|
195
239
|
cta: {
|
|
196
240
|
DEFAULT: {
|
|
@@ -6,6 +6,7 @@ import { defineSemanticTokens } from '@pandacss/dev';
|
|
|
6
6
|
* elevated → shadows.elevated (menus, dropdowns)
|
|
7
7
|
* overlay → shadows.overlay / surface.overlay (modal backdrop)
|
|
8
8
|
* modal → (modal container, above backdrop)
|
|
9
|
+
* modalFloating → (floating content inside a modal)
|
|
9
10
|
* tooltip → (always on top)
|
|
10
11
|
*/
|
|
11
12
|
export const zIndex = defineSemanticTokens.zIndex({
|
|
@@ -14,5 +15,6 @@ export const zIndex = defineSemanticTokens.zIndex({
|
|
|
14
15
|
elevated: { value: '{zIndex.1000}' },
|
|
15
16
|
overlay: { value: '{zIndex.1100}' },
|
|
16
17
|
modal: { value: '{zIndex.1101}' },
|
|
18
|
+
modalFloating: { value: '{zIndex.1102}' },
|
|
17
19
|
tooltip: { value: '{zIndex.1200}' },
|
|
18
20
|
});
|
|
@@ -21,6 +21,7 @@ export const conditions = {
|
|
|
21
21
|
collapsed:
|
|
22
22
|
'&:is([aria-collapsed=true], [data-collapsed=true], [data-state="collapsed"])',
|
|
23
23
|
highlighted: '&[data-highlighted=true]',
|
|
24
|
+
new: '&[data-new=true]',
|
|
24
25
|
complete: '&[data-complete=true]',
|
|
25
26
|
incomplete: '&[data-incomplete=true]',
|
|
26
27
|
dragging: '&[data-dragging=true]',
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineUtility } from '@pandacss/dev';
|
|
2
2
|
|
|
3
|
-
import { durations
|
|
3
|
+
import { durations } from '../primitives/durations';
|
|
4
|
+
import { easings } from '../primitives/easings';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Transition property tokens for use with strictTokens.
|