@okshaun/components 3.0.0 → 4.1.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.
Files changed (69) hide show
  1. package/dist/icon-metadata.json +359 -42
  2. package/dist/index.js +12890 -5844
  3. package/dist/index.js.map +1 -1
  4. package/dist/panda.buildinfo.json +523 -501
  5. package/dist/playroom-static.css +2 -2
  6. package/dist/{preset-BAn5LBiW.js → preset-CLoY9s9i.js} +2031 -2086
  7. package/dist/preset-CLoY9s9i.js.map +1 -0
  8. package/dist/preset.js +1 -1
  9. package/dist/specs/conditions.json +75 -51
  10. package/dist/specs/keyframes.json +22 -0
  11. package/dist/specs/recipes.json +222 -106
  12. package/dist/specs/semantic-tokens.json +194 -86
  13. package/dist/specs/tokens.json +16 -36
  14. package/dist/sprite.svg +1 -1
  15. package/dist/sprite.symbol.html +445 -44
  16. package/dist/styles.css +11441 -13424
  17. package/dist/svgs/cheese.svg +1 -0
  18. package/dist/svgs/collapse-vertical.svg +1 -0
  19. package/dist/svgs/expand-vertical.svg +1 -0
  20. package/dist/svgs/magnet.svg +1 -0
  21. package/dist/svgs/to-date-backward.svg +1 -0
  22. package/dist/svgs/to-date-forward.svg +1 -0
  23. package/dist/types/index.d.ts +2815 -288
  24. package/package.json +4 -2
  25. package/src/recipes/autocomplete.ts +266 -0
  26. package/src/recipes/badge.ts +25 -54
  27. package/src/recipes/button.ts +155 -316
  28. package/src/recipes/calendar.ts +91 -0
  29. package/src/recipes/card.ts +4 -70
  30. package/src/recipes/chip.ts +212 -266
  31. package/src/recipes/dateMenus.ts +40 -0
  32. package/src/recipes/dateTimeMenus.ts +43 -0
  33. package/src/recipes/formField.ts +1 -1
  34. package/src/recipes/kbd.ts +42 -39
  35. package/src/recipes/list.ts +11 -85
  36. package/src/recipes/listDensity.ts +66 -0
  37. package/src/recipes/listItem.ts +27 -166
  38. package/src/recipes/listItemGroup.ts +16 -16
  39. package/src/recipes/menu.ts +17 -3
  40. package/src/recipes/modal.ts +65 -65
  41. package/src/recipes/radio.ts +6 -6
  42. package/src/recipes/recipes-slot.ts +7 -2
  43. package/src/recipes/segmentedFields.ts +192 -0
  44. package/src/recipes/segmentedInputs.ts +109 -0
  45. package/src/recipes/tag.ts +218 -210
  46. package/src/recipes/text.ts +37 -19
  47. package/src/recipes/textInput.ts +103 -155
  48. package/src/recipes/themeSwitcher.ts +3 -3
  49. package/src/recipes/timeMenus.ts +110 -0
  50. package/src/recipes/toggle.ts +3 -1
  51. package/src/styles/primitives/shadows.ts +26 -60
  52. package/src/styles/primitives/zIndex.ts +1 -0
  53. package/src/styles/semantics/colors.ts +84 -37
  54. package/src/styles/semantics/shadows.ts +4 -30
  55. package/src/styles/semantics/zIndex.ts +2 -0
  56. package/src/styles/utilities/conditions.ts +61 -51
  57. package/src/styles/utilities/dropShadows.ts +51 -0
  58. package/src/styles/utilities/filters.ts +22 -7
  59. package/src/styles/utilities/globalStyle.ts +5 -2
  60. package/src/styles/utilities/index.ts +3 -0
  61. package/src/styles/utilities/keyframes.ts +27 -4
  62. package/src/styles/utilities/recipeGlobalStyles.ts +22 -0
  63. package/src/styles/utilities/shadowDefinitions.ts +112 -0
  64. package/src/utils/dsChain.ts +113 -0
  65. package/src/utils/dsComponent.ts +44 -0
  66. package/src/utils/dsPart.ts +41 -0
  67. package/dist/preset-BAn5LBiW.js.map +0 -1
  68. package/src/recipes/datePicker.ts +0 -234
  69. package/src/recipes/timePicker.ts +0 -216
@@ -1,234 +0,0 @@
1
- import { defineSlotRecipe } from '@pandacss/dev';
2
-
3
- const datePickerBase = {
4
- root: {
5
- display: 'inline-flex',
6
- flexDirection: 'column',
7
- position: 'relative',
8
- },
9
- input: {
10
- display: 'inline-flex',
11
- alignItems: 'center',
12
- gap: '2',
13
- width: 'full',
14
- borderWidth: '1',
15
- borderStyle: 'solid',
16
- borderColor: 'border.input',
17
- borderRadius: '4',
18
- outlineWidth: '2',
19
- outlineOffset: '-1',
20
- outlineStyle: 'solid',
21
- outlineColor: 'transparent',
22
- bg: 'bg.input',
23
- color: 'text',
24
- fontFamily: 'mono',
25
- lineHeight: 'default',
26
- cursor: 'text',
27
- userSelect: 'none',
28
- transitionDuration: 'fast',
29
- transitionProperty: 'background, border-color, outline-color',
30
- transitionTimingFunction: 'default',
31
- _focusWithin: {
32
- bg: 'bg.input.pressed',
33
- borderColor: 'border.focused',
34
- outlineColor: 'border.focused',
35
- },
36
- _open: {
37
- bg: 'bg.input.pressed',
38
- borderColor: 'border.focused',
39
- outlineColor: 'border.focused',
40
- },
41
- _disabled: {
42
- bg: 'bg.disabled',
43
- borderColor: 'border.disabled',
44
- color: 'text.disabled',
45
- cursor: 'not-allowed',
46
- pointerEvents: 'none',
47
- },
48
- _error: {
49
- bg: 'bg.danger',
50
- borderColor: 'border.danger',
51
- color: 'text.danger',
52
- _hover: {
53
- bg: 'bg.danger.hovered',
54
- borderColor: 'border.danger',
55
- },
56
- _focusWithin: {
57
- bg: 'bg.danger',
58
- borderColor: 'border.danger',
59
- outlineColor: 'border.danger',
60
- },
61
- _open: {
62
- bg: 'bg.danger',
63
- borderColor: 'border.danger',
64
- outlineColor: 'border.danger',
65
- },
66
- },
67
- _invalid: {
68
- bg: 'bg.danger',
69
- borderColor: 'border.danger',
70
- color: 'text.danger',
71
- _hover: {
72
- bg: 'bg.danger.hovered',
73
- borderColor: 'border.danger',
74
- },
75
- _focusWithin: {
76
- bg: 'bg.danger',
77
- borderColor: 'border.danger',
78
- outlineColor: 'border.danger',
79
- },
80
- _open: {
81
- bg: 'bg.danger',
82
- borderColor: 'border.danger',
83
- outlineColor: 'border.danger',
84
- },
85
- },
86
- },
87
- segment: {
88
- display: 'inline-flex',
89
- alignItems: 'center',
90
- justifyContent: 'center',
91
- outline: 'none',
92
- borderRadius: '{sizes.2}',
93
- cursor: 'default',
94
- userSelect: 'none',
95
- fontFamily: 'mono',
96
- fontVariantsProperty: 'mono',
97
- fontVariantNumeric: 'tabular-nums',
98
- minWidth: '{sizes.24}',
99
- textAlign: 'center',
100
- color: 'text',
101
- _focusVisible: {
102
- bg: 'bg.neutral.hovered',
103
- },
104
- _groupDisabled: {
105
- color: 'text.disabled',
106
- },
107
- _invalid: {
108
- color: 'text.danger',
109
- },
110
- },
111
- separator: {
112
- color: 'text.placeholder',
113
- userSelect: 'none',
114
- display: 'inline-flex',
115
- alignItems: 'center',
116
- },
117
- popover: {
118
- display: 'flex',
119
- flexDirection: 'column',
120
- bg: 'surface.overlay',
121
- borderWidth: '1',
122
- borderStyle: 'solid',
123
- borderColor: 'border',
124
- borderRadius: '8',
125
- boxShadow: 'overlay',
126
- zIndex: '1000',
127
- width: '280',
128
- overflow: 'hidden',
129
- outline: 'none',
130
- },
131
- calendarHeader: {
132
- fontFamily: 'mono',
133
- display: 'flex',
134
- alignItems: 'center',
135
- justifyContent: 'space-between',
136
- px: '8',
137
- py: '8',
138
- borderBottom: 'default',
139
- gap: '4',
140
- },
141
- calendarGrid: {
142
- display: 'grid',
143
- gridTemplateColumns: 'repeat(7, 1fr)',
144
- gap: '2',
145
- px: '8',
146
- py: '4',
147
- pb: '8',
148
- },
149
- weekdayLabel: {
150
- display: 'flex',
151
- alignItems: 'center',
152
- justifyContent: 'center',
153
- userSelect: 'none',
154
- },
155
- day: {
156
- alignItems: 'center',
157
- justifyContent: 'center',
158
- fontFamily: 'mono',
159
- width: '32',
160
- height: '32',
161
- _today: {
162
- fontWeight: 'bold',
163
- color: 'text.selected',
164
- bg: 'bg.selected',
165
- },
166
- _selected: {
167
- bg: 'bg.selected.bold',
168
- color: 'text.inverse',
169
- _hover: {
170
- bg: 'bg.selected.bold.hovered',
171
- },
172
- _today: {
173
- bg: 'bg.selected.bold',
174
- color: 'text.inverse',
175
- },
176
- },
177
- _unavailable: {
178
- color: 'text.disabled',
179
- cursor: 'not-allowed',
180
- pointerEvents: 'none',
181
- _hover: {
182
- bg: 'transparent',
183
- },
184
- },
185
- },
186
- };
187
-
188
- const datePickerVariants = {
189
- size: {
190
- sm: {
191
- input: {
192
- py: '0',
193
- px: '8',
194
- fontSize: '14',
195
- },
196
- },
197
- md: {
198
- input: {
199
- py: '3',
200
- px: '10',
201
- fontSize: '16',
202
- },
203
- },
204
- lg: {
205
- input: {
206
- py: '7',
207
- px: '12',
208
- fontSize: '16',
209
- },
210
- },
211
- },
212
- };
213
-
214
- export const datePickerRecipe = defineSlotRecipe({
215
- className: 'datePicker',
216
- jsx: ['DatePicker', 'DateRangePicker'],
217
- slots: [
218
- 'root',
219
- 'input',
220
- 'segment',
221
- 'separator',
222
- 'popover',
223
- 'calendarHeader',
224
- 'navButton',
225
- 'calendarGrid',
226
- 'weekdayLabel',
227
- 'day',
228
- ],
229
- base: datePickerBase,
230
- variants: datePickerVariants,
231
- defaultVariants: {
232
- size: 'md',
233
- },
234
- });
@@ -1,216 +0,0 @@
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
- _invalid: {
65
- borderColor: 'border.danger',
66
- _hover: {
67
- borderColor: 'border.danger',
68
- },
69
- _focusWithin: {
70
- borderColor: 'border.danger',
71
- outlineColor: 'border.danger',
72
- },
73
- _open: {
74
- borderColor: 'border.danger',
75
- outlineColor: 'border.danger',
76
- },
77
- },
78
- },
79
-
80
- // Individual focusable segment span (HH, MM, AM/PM)
81
- segment: {
82
- display: 'inline-flex',
83
- alignItems: 'center',
84
- justifyContent: 'center',
85
- outline: 'none',
86
- borderRadius: '{sizes.2}',
87
- cursor: 'default',
88
- userSelect: 'none',
89
- fontFamily: 'mono',
90
- fontVariantsProperty: 'mono',
91
- fontVariantNumeric: 'tabular-nums',
92
- minWidth: '{sizes.24}',
93
- textAlign: 'center',
94
- color: 'text',
95
- _focusVisible: {
96
- bg: 'bg.neutral.hovered',
97
- },
98
- _groupDisabled: {
99
- color: 'text.disabled',
100
- },
101
- _invalid: {
102
- color: 'text.danger',
103
- },
104
- },
105
-
106
- // The ":" separator between time segments
107
- separator: {
108
- color: 'text.placeholder',
109
- userSelect: 'none',
110
- display: 'inline-flex',
111
- alignItems: 'center',
112
- },
113
-
114
- // The floating time list container
115
- popover: {
116
- display: 'flex',
117
- flexDirection: 'row',
118
- bg: 'surface.overlay',
119
- borderWidth: '1',
120
- borderStyle: 'solid',
121
- borderColor: 'border',
122
- borderRadius: '8',
123
- boxShadow: 'overlay',
124
- zIndex: '1000',
125
- overflow: 'hidden',
126
- outline: 'none',
127
- w: 'fit',
128
- },
129
-
130
- // A single scrollable column (hours, minutes, or AM/PM)
131
- column: {
132
- display: 'flex',
133
- flexDirection: 'column',
134
- overflowY: 'auto',
135
- flex: 1,
136
- maxHeight: '200',
137
- scrollSnapType: 'y mandatory',
138
- borderRight: 'default',
139
- minW: '56',
140
- textAlign: 'center',
141
- _last: {
142
- borderRight: 'none',
143
- },
144
- // Hide scrollbar visually but keep functionality
145
- '&::-webkit-scrollbar': {
146
- display: 'none',
147
- },
148
- scrollbarWidth: 'none' as const,
149
- msOverflowStyle: 'none',
150
- },
151
-
152
- // Optional column header (e.g. "Hr", "Min")
153
- columnLabel: {
154
- display: 'flex',
155
- alignItems: 'center',
156
- justifyContent: 'center',
157
- py: '4',
158
- px: '8',
159
- fontSize: '11',
160
- fontWeight: 'medium',
161
- color: 'text.subtlest',
162
- textTransform: 'uppercase',
163
- letterSpacing: 'widest',
164
- borderBottom: 'default',
165
- position: 'sticky',
166
- top: '0',
167
- bg: 'surface.overlay',
168
- zIndex: 1,
169
- userSelect: 'none',
170
- },
171
- };
172
-
173
- const timePickerVariants = {
174
- size: {
175
- sm: {
176
- input: {
177
- py: '0',
178
- px: '8',
179
- fontSize: '14',
180
- },
181
- },
182
- md: {
183
- input: {
184
- py: '3',
185
- px: '10',
186
- fontSize: '16',
187
- },
188
- },
189
- lg: {
190
- input: {
191
- py: '7',
192
- px: '12',
193
- fontSize: '16',
194
- },
195
- },
196
- },
197
- };
198
-
199
- export const timePickerRecipe = defineSlotRecipe({
200
- className: 'timePicker',
201
- jsx: ['TimePicker', 'TimeRangePicker'],
202
- slots: [
203
- 'root',
204
- 'input',
205
- 'segment',
206
- 'separator',
207
- 'popover',
208
- 'column',
209
- 'columnLabel',
210
- ],
211
- base: timePickerBase,
212
- variants: timePickerVariants,
213
- defaultVariants: {
214
- size: 'md',
215
- },
216
- });