@okshaun/components 2.0.2 → 4.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.
Files changed (78) hide show
  1. package/dist/icon-metadata.json +385 -41
  2. package/dist/index.js +13414 -5259
  3. package/dist/index.js.map +1 -1
  4. package/dist/panda.buildinfo.json +1245 -263
  5. package/dist/{preset-DAmO4B54.js → preset-BOFHjPdQ.js} +2265 -1727
  6. package/dist/preset-BOFHjPdQ.js.map +1 -0
  7. package/dist/preset.js +1 -1
  8. package/dist/specs/conditions.json +75 -51
  9. package/dist/specs/keyframes.json +33 -0
  10. package/dist/specs/recipes.json +359 -103
  11. package/dist/specs/semantic-tokens.json +152 -44
  12. package/dist/specs/tokens.json +21 -36
  13. package/dist/sprite.svg +1 -1
  14. package/dist/sprite.symbol.html +499 -43
  15. package/dist/styles.css +18229 -7568
  16. package/dist/svgs/barcode-off.svg +1 -0
  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/spinner.svg +1 -0
  22. package/dist/svgs/to-date-backward.svg +1 -0
  23. package/dist/svgs/to-date-forward.svg +1 -0
  24. package/dist/types/index.d.ts +2804 -296
  25. package/package.json +4 -2
  26. package/src/recipes/autocomplete.ts +266 -0
  27. package/src/recipes/avatar.ts +1 -1
  28. package/src/recipes/badge.ts +31 -43
  29. package/src/recipes/breakpointIndicator.ts +11 -0
  30. package/src/recipes/button.ts +172 -223
  31. package/src/recipes/calendar.ts +91 -0
  32. package/src/recipes/card.ts +4 -70
  33. package/src/recipes/chip.ts +213 -142
  34. package/src/recipes/dateMenus.ts +40 -0
  35. package/src/recipes/dateTimeMenus.ts +43 -0
  36. package/src/recipes/icon.ts +25 -6
  37. package/src/recipes/kbd.ts +56 -0
  38. package/src/recipes/list.ts +17 -1
  39. package/src/recipes/listDensity.ts +66 -0
  40. package/src/recipes/listItem.ts +29 -161
  41. package/src/recipes/listItemGroup.ts +17 -39
  42. package/src/recipes/menu.ts +17 -3
  43. package/src/recipes/modal.ts +70 -39
  44. package/src/recipes/radio.ts +6 -6
  45. package/src/recipes/recipes-regular.ts +2 -0
  46. package/src/recipes/recipes-slot.ts +8 -2
  47. package/src/recipes/segmentedFields.ts +192 -0
  48. package/src/recipes/segmentedInputs.ts +109 -0
  49. package/src/recipes/select.ts +8 -1
  50. package/src/recipes/skeleton.ts +72 -0
  51. package/src/recipes/spinner.ts +27 -24
  52. package/src/recipes/tag.ts +218 -210
  53. package/src/recipes/text.ts +37 -19
  54. package/src/recipes/textInput.ts +106 -117
  55. package/src/recipes/themeSwitcher.ts +3 -3
  56. package/src/recipes/timeMenus.ts +110 -0
  57. package/src/recipes/toggle.ts +3 -1
  58. package/src/styles/primitives/animations.ts +3 -0
  59. package/src/styles/primitives/shadows.ts +26 -60
  60. package/src/styles/primitives/zIndex.ts +1 -0
  61. package/src/styles/semantics/colors.ts +43 -0
  62. package/src/styles/semantics/shadows.ts +4 -30
  63. package/src/styles/semantics/zIndex.ts +2 -0
  64. package/src/styles/utilities/conditions.ts +61 -51
  65. package/src/styles/utilities/dropShadows.ts +51 -0
  66. package/src/styles/utilities/filters.ts +22 -7
  67. package/src/styles/utilities/globalStyle.ts +5 -2
  68. package/src/styles/utilities/index.ts +3 -0
  69. package/src/styles/utilities/keyframes.ts +31 -4
  70. package/src/styles/utilities/recipeGlobalStyles.ts +22 -0
  71. package/src/styles/utilities/shadowDefinitions.ts +112 -0
  72. package/src/utils/dsChain.ts +113 -0
  73. package/src/utils/dsComponent.ts +44 -0
  74. package/src/utils/dsPart.ts +41 -0
  75. package/src/utils/mergeAriaDescribedBy.ts +7 -0
  76. package/dist/preset-DAmO4B54.js.map +0 -1
  77. package/src/recipes/datePicker.ts +0 -212
  78. package/src/recipes/timePicker.ts +0 -199
@@ -1,212 +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
- },
68
- segment: {
69
- display: 'inline-flex',
70
- alignItems: 'center',
71
- justifyContent: 'center',
72
- outline: 'none',
73
- borderRadius: '{sizes.2}',
74
- cursor: 'default',
75
- userSelect: 'none',
76
- fontFamily: 'mono',
77
- fontVariantsProperty: 'mono',
78
- fontVariantNumeric: 'tabular-nums',
79
- minWidth: '{sizes.24}',
80
- textAlign: 'center',
81
- color: 'text',
82
- _focusVisible: {
83
- bg: 'bg.neutral.hovered',
84
- },
85
- _groupDisabled: {
86
- color: 'text.disabled',
87
- },
88
- },
89
- separator: {
90
- color: 'text.placeholder',
91
- userSelect: 'none',
92
- display: 'inline-flex',
93
- alignItems: 'center',
94
- },
95
- popover: {
96
- display: 'flex',
97
- flexDirection: 'column',
98
- bg: 'surface.overlay',
99
- borderWidth: '1',
100
- borderStyle: 'solid',
101
- borderColor: 'border',
102
- borderRadius: '8',
103
- boxShadow: 'overlay',
104
- zIndex: '1000',
105
- width: '280',
106
- overflow: 'hidden',
107
- outline: 'none',
108
- },
109
- calendarHeader: {
110
- fontFamily: 'mono',
111
- display: 'flex',
112
- alignItems: 'center',
113
- justifyContent: 'space-between',
114
- px: '8',
115
- py: '8',
116
- borderBottom: 'default',
117
- gap: '4',
118
- },
119
- calendarGrid: {
120
- display: 'grid',
121
- gridTemplateColumns: 'repeat(7, 1fr)',
122
- gap: '2',
123
- px: '8',
124
- py: '4',
125
- pb: '8',
126
- },
127
- weekdayLabel: {
128
- display: 'flex',
129
- alignItems: 'center',
130
- justifyContent: 'center',
131
- userSelect: 'none',
132
- },
133
- day: {
134
- alignItems: 'center',
135
- justifyContent: 'center',
136
- fontFamily: 'mono',
137
- width: '32',
138
- height: '32',
139
- _today: {
140
- fontWeight: 'bold',
141
- color: 'text.selected',
142
- bg: 'bg.selected',
143
- },
144
- _selected: {
145
- bg: 'bg.selected.bold',
146
- color: 'text.inverse',
147
- _hover: {
148
- bg: 'bg.selected.bold.hovered',
149
- },
150
- _today: {
151
- bg: 'bg.selected.bold',
152
- color: 'text.inverse',
153
- },
154
- },
155
- _unavailable: {
156
- color: 'text.disabled',
157
- cursor: 'not-allowed',
158
- pointerEvents: 'none',
159
- _hover: {
160
- bg: 'transparent',
161
- },
162
- },
163
- },
164
- };
165
-
166
- const datePickerVariants = {
167
- size: {
168
- sm: {
169
- input: {
170
- py: '0',
171
- px: '8',
172
- fontSize: '14',
173
- },
174
- },
175
- md: {
176
- input: {
177
- py: '3',
178
- px: '10',
179
- fontSize: '16',
180
- },
181
- },
182
- lg: {
183
- input: {
184
- py: '7',
185
- px: '12',
186
- fontSize: '16',
187
- },
188
- },
189
- },
190
- };
191
-
192
- export const datePickerRecipe = defineSlotRecipe({
193
- className: 'datePicker',
194
- jsx: ['DatePicker', 'DateRangePicker'],
195
- slots: [
196
- 'root',
197
- 'input',
198
- 'segment',
199
- 'separator',
200
- 'popover',
201
- 'calendarHeader',
202
- 'navButton',
203
- 'calendarGrid',
204
- 'weekdayLabel',
205
- 'day',
206
- ],
207
- base: datePickerBase,
208
- variants: datePickerVariants,
209
- defaultVariants: {
210
- size: 'md',
211
- },
212
- });
@@ -1,199 +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
- },
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
- });