@okshaun/components 0.5.8 → 1.0.1

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 (129) hide show
  1. package/README.md +22 -26
  2. package/dist/.mcp.json +11 -0
  3. package/dist/index.d.ts +3 -1268
  4. package/dist/index.js +1231 -957
  5. package/dist/index.js.map +1 -1
  6. package/dist/okshaun-logo-white.svg +11 -0
  7. package/dist/okshaun-logo.svg +11 -0
  8. package/dist/preset-BzrKiUEH.js +8452 -0
  9. package/dist/preset-BzrKiUEH.js.map +1 -0
  10. package/dist/preset.js +3 -7234
  11. package/dist/preset.js.map +1 -1
  12. package/dist/specs/animation-styles.json +4 -0
  13. package/dist/specs/color-palette.json +98 -0
  14. package/dist/specs/conditions.json +1901 -0
  15. package/dist/specs/keyframes.json +137 -0
  16. package/dist/specs/layer-styles.json +23 -0
  17. package/dist/specs/patterns.json +475 -0
  18. package/dist/specs/recipes.json +907 -0
  19. package/dist/specs/semantic-tokens.json +2837 -0
  20. package/dist/specs/text-styles.json +149 -0
  21. package/dist/specs/tokens.json +2750 -0
  22. package/dist/sprite.svg +1 -1
  23. package/dist/sprite.symbol.html +14 -14
  24. package/dist/styles/global.css +148 -0
  25. package/dist/styles/recipes/avatar.css +185 -0
  26. package/dist/styles/recipes/badge.css +85 -0
  27. package/dist/styles/recipes/breadcrumbs.css +38 -0
  28. package/dist/styles/recipes/button.css +195 -0
  29. package/dist/styles/recipes/card.css +57 -0
  30. package/dist/styles/recipes/checkbox-input.css +12 -0
  31. package/dist/styles/recipes/checkbox.css +90 -0
  32. package/dist/styles/recipes/chip.css +137 -0
  33. package/dist/styles/recipes/code.css +12 -0
  34. package/dist/styles/recipes/divider.css +43 -0
  35. package/dist/styles/recipes/form-field.css +39 -0
  36. package/dist/styles/recipes/heading.css +40 -0
  37. package/dist/styles/recipes/icon-button.css +181 -0
  38. package/dist/styles/recipes/label.css +14 -0
  39. package/dist/styles/recipes/link.css +49 -0
  40. package/dist/styles/recipes/menu.css +141 -0
  41. package/dist/styles/recipes/modal.css +99 -0
  42. package/dist/styles/recipes/pre.css +16 -0
  43. package/dist/styles/recipes/radio-input.css +7 -0
  44. package/dist/styles/recipes/radio.css +82 -0
  45. package/dist/styles/recipes/select.css +103 -0
  46. package/dist/styles/recipes/spinner.css +36 -0
  47. package/dist/styles/recipes/tag.css +27 -0
  48. package/dist/styles/recipes/text.css +46 -0
  49. package/dist/styles/recipes/textarea.css +91 -0
  50. package/dist/styles/recipes/textinput.css +87 -0
  51. package/dist/styles/recipes/theme-switcher.css +53 -0
  52. package/dist/styles/recipes/toggle-input.css +12 -0
  53. package/dist/styles/recipes/toggle.css +125 -0
  54. package/dist/styles/recipes/tooltip.css +133 -0
  55. package/dist/styles/recipes.css +30 -0
  56. package/dist/styles/reset.css +1 -0
  57. package/dist/styles/tokens.css +1016 -0
  58. package/dist/styles/utilities.css +1694 -0
  59. package/dist/styles.css +7 -0
  60. package/dist/svgs/building.svg +1 -0
  61. package/dist/types/index.d.ts +21626 -0
  62. package/dist/types/preset.d.ts +19 -0
  63. package/package.json +37 -35
  64. package/src/recipes/avatar.ts +205 -0
  65. package/src/recipes/badge.ts +203 -0
  66. package/src/recipes/box.ts +13 -0
  67. package/src/recipes/breadcrumbs.ts +29 -0
  68. package/src/recipes/button.ts +319 -0
  69. package/src/recipes/card.ts +148 -0
  70. package/src/recipes/checkbox.ts +87 -0
  71. package/src/recipes/checkboxinput.ts +15 -0
  72. package/src/recipes/chip.ts +189 -0
  73. package/src/recipes/code.ts +35 -0
  74. package/src/recipes/divider.ts +41 -0
  75. package/src/recipes/formField.ts +60 -0
  76. package/src/recipes/index.ts +28 -0
  77. package/src/recipes/menu.ts +205 -0
  78. package/src/recipes/modal.ts +120 -0
  79. package/src/recipes/radio.ts +71 -0
  80. package/src/recipes/radioinput.ts +12 -0
  81. package/src/recipes/select.ts +142 -0
  82. package/src/recipes/spinner.ts +52 -0
  83. package/src/recipes/tag.ts +262 -0
  84. package/src/recipes/text.ts +193 -0
  85. package/src/recipes/textarea.ts +153 -0
  86. package/src/recipes/textinput.ts +100 -0
  87. package/src/recipes/themeSwitcher.ts +48 -0
  88. package/src/recipes/toggle.ts +116 -0
  89. package/src/recipes/toggleinput.ts +16 -0
  90. package/src/recipes/tooltip.ts +359 -0
  91. package/src/styles/index.css +1 -0
  92. package/src/styles/primitives/animations.ts +16 -0
  93. package/src/styles/primitives/aspectRatios.ts +22 -0
  94. package/src/styles/primitives/blurs.ts +25 -0
  95. package/src/styles/primitives/borderWidths.ts +10 -0
  96. package/src/styles/primitives/borders.ts +36 -0
  97. package/src/styles/primitives/colors.ts +228 -0
  98. package/src/styles/primitives/durations.ts +25 -0
  99. package/src/styles/primitives/easings.ts +19 -0
  100. package/src/styles/primitives/fontSizes.ts +16 -0
  101. package/src/styles/primitives/fontWeights.ts +9 -0
  102. package/src/styles/primitives/fonts.ts +18 -0
  103. package/src/styles/primitives/index.ts +46 -0
  104. package/src/styles/primitives/letterSpacings.ts +22 -0
  105. package/src/styles/primitives/lineHeights.ts +16 -0
  106. package/src/styles/primitives/radii.ts +14 -0
  107. package/src/styles/primitives/shadows.ts +73 -0
  108. package/src/styles/primitives/sizes.ts +86 -0
  109. package/src/styles/primitives/spacings.ts +7 -0
  110. package/src/styles/semantics/colors.ts +774 -0
  111. package/src/styles/semantics/index.ts +2 -0
  112. package/src/styles/semantics/shadows.ts +32 -0
  113. package/src/styles/utilities/breakpoints.ts +8 -0
  114. package/src/styles/utilities/conditions.ts +140 -0
  115. package/src/styles/utilities/containerSizes.ts +17 -0
  116. package/src/styles/utilities/filters.ts +12 -0
  117. package/src/styles/utilities/globalStyle.ts +93 -0
  118. package/src/styles/utilities/index.ts +9 -0
  119. package/src/styles/utilities/keyframes.ts +89 -0
  120. package/src/styles/utilities/layerStyles.ts +18 -0
  121. package/src/styles/utilities/textStyles.ts +135 -0
  122. package/src/styles/utilities/transitions.ts +92 -0
  123. package/src/utils/injectSprite.ts +36 -0
  124. package/src/utils/splitProps.ts +19 -0
  125. package/src/utils/spriteContent.ts +4 -0
  126. package/dist/panda.buildinfo.json +0 -448
  127. package/dist/preset.d.ts +0 -5
  128. package/dist/transitions-DUgH88VW.js +0 -1041
  129. package/dist/transitions-DUgH88VW.js.map +0 -1
@@ -0,0 +1,71 @@
1
+ import { defineSlotRecipe } from '@pandacss/dev';
2
+
3
+ export const radioRecipe = defineSlotRecipe({
4
+ className: 'radio',
5
+ jsx: ['Radio'],
6
+ slots: ['container', 'input', 'indicator'],
7
+ base: {
8
+ container: {
9
+ position: 'relative',
10
+ display: 'inline-grid',
11
+ gridTemplateColumns: 'auto 1fr',
12
+ gap: 4,
13
+ alignItems: 'start',
14
+ cursor: 'pointer',
15
+ userSelect: 'none',
16
+ },
17
+ input: {
18
+ position: 'absolute',
19
+ opacity: 0,
20
+ width: 'full',
21
+ height: 'full',
22
+ margin: '0',
23
+ padding: '0',
24
+ zIndex: 1,
25
+ cursor: 'inherit',
26
+ "& ~ [name='radio']": {
27
+ display: 'inline-grid',
28
+ },
29
+ _checked: {
30
+ "& ~ [name='radio-checked']": {
31
+ display: 'inline-grid',
32
+ fill: { base: 'gray.90', _dark: 'gray.10' },
33
+ },
34
+ "& ~ [name='radio']": {
35
+ display: 'none',
36
+ },
37
+ },
38
+ _disabled: {
39
+ '& ~ svg': {
40
+ opacity: 0.4,
41
+ pointerEvents: 'none',
42
+ cursor: 'none',
43
+ },
44
+ display: 'inline-grid',
45
+ },
46
+ _error: {
47
+ display: 'inline-grid',
48
+ '& ~ svg': {
49
+ fill: 'red.50',
50
+ },
51
+ },
52
+ _focusVisible: {
53
+ "& ~ [name='radio-focus']": {
54
+ display: 'inline-grid',
55
+ position: 'absolute',
56
+ fill: { base: 'gray.90', _dark: 'gray.1' },
57
+ },
58
+ },
59
+ },
60
+ indicator: {
61
+ placeContent: 'center',
62
+ display: 'none',
63
+ width: 24,
64
+ height: 24,
65
+ "&:is([name='radio'])": {
66
+ display: 'inline-grid',
67
+ fill: 'gray.20',
68
+ },
69
+ },
70
+ },
71
+ });
@@ -0,0 +1,12 @@
1
+ import { defineRecipe } from '@pandacss/dev';
2
+
3
+ const radioInputBase = {
4
+ display: 'flex',
5
+ };
6
+
7
+ export const radioInputRecipe = defineRecipe({
8
+ className: 'radio-input',
9
+ jsx: ['RadioInput'],
10
+ base: radioInputBase,
11
+ variants: {},
12
+ });
@@ -0,0 +1,142 @@
1
+ import { defineSlotRecipe } from '@pandacss/dev';
2
+
3
+ const selectBase = {
4
+ // The trigger button container
5
+ trigger: {
6
+ display: 'flex',
7
+ alignItems: 'center',
8
+ justifyContent: 'space-between',
9
+ gap: '8',
10
+ width: 'full',
11
+ borderWidth: '1',
12
+ borderStyle: 'solid',
13
+ borderColor: 'border.input',
14
+ borderRadius: '4',
15
+ bg: 'bg.input',
16
+ color: 'text',
17
+ fontFamily: 'body',
18
+ cursor: 'pointer',
19
+ outline: 'none',
20
+ transitionDuration: 'fast',
21
+ transitionProperty: 'background, border-color, color, outline-color',
22
+ transitionTimingFunction: 'default',
23
+ _hover: {
24
+ bg: 'bg.input.hovered',
25
+ },
26
+ _focus: {
27
+ borderColor: 'border.focused',
28
+ outlineWidth: '2',
29
+ outlineOffset: '-1',
30
+ outlineStyle: 'solid',
31
+ outlineColor: 'border.focused',
32
+ },
33
+ _disabled: {
34
+ bg: 'bg.disabled',
35
+ borderColor: 'border.disabled',
36
+ color: 'text.disabled',
37
+ cursor: 'not-allowed',
38
+ opacity: 0.5,
39
+ },
40
+ _error: {
41
+ bg: 'bg.danger',
42
+ borderColor: 'border.danger',
43
+ _hover: {
44
+ bg: 'bg.danger.hovered',
45
+ },
46
+ _focus: {
47
+ borderColor: 'border.danger',
48
+ outlineColor: 'border.danger',
49
+ },
50
+ },
51
+ },
52
+
53
+ // The value/placeholder text display
54
+ value: {
55
+ flex: 1,
56
+ textAlign: 'left',
57
+ truncate: true,
58
+ color: 'text',
59
+ _placeholder: {
60
+ color: 'text.subtlest',
61
+ },
62
+ },
63
+
64
+ // Placeholder styling (when no value selected)
65
+ placeholder: {
66
+ color: 'text.subtlest',
67
+ },
68
+
69
+ // The chevron/arrow icon
70
+ icon: {
71
+ display: 'flex',
72
+ alignItems: 'center',
73
+ flexShrink: 0,
74
+ color: 'icon.decorative',
75
+ transitionDuration: 'normal',
76
+ transitionProperty: 'transform',
77
+ transitionTimingFunction: 'default',
78
+ '&[data-open="true"]': {
79
+ transform: 'rotate(180deg)',
80
+ },
81
+ },
82
+ };
83
+
84
+ const selectVariants = {
85
+ size: {
86
+ md: {
87
+ trigger: {
88
+ py: '3',
89
+ px: '12',
90
+ fontSize: '16',
91
+ },
92
+ icon: {
93
+ w: '24',
94
+ h: '24',
95
+ },
96
+ },
97
+ xl: {
98
+ trigger: {
99
+ py: '9',
100
+ px: '16',
101
+ fontSize: '20',
102
+ },
103
+ icon: {
104
+ w: '28',
105
+ h: '28',
106
+ },
107
+ },
108
+ lg: {
109
+ trigger: {
110
+ py: '7',
111
+ px: '14',
112
+ fontSize: '16',
113
+ },
114
+ icon: {
115
+ w: '24',
116
+ h: '24',
117
+ },
118
+ },
119
+ sm: {
120
+ trigger: {
121
+ py: '1',
122
+ px: '8',
123
+ fontSize: '14',
124
+ },
125
+ icon: {
126
+ w: '22',
127
+ h: '22',
128
+ },
129
+ },
130
+ },
131
+ };
132
+
133
+ export const selectRecipe = defineSlotRecipe({
134
+ className: 'select',
135
+ jsx: ['Select', 'SelectTrigger'],
136
+ slots: ['trigger', 'value', 'placeholder', 'icon'],
137
+ base: selectBase,
138
+ variants: selectVariants,
139
+ defaultVariants: {
140
+ size: 'md',
141
+ },
142
+ });
@@ -0,0 +1,52 @@
1
+ import { defineRecipe } from '@pandacss/dev';
2
+
3
+ const spinnerBase = {
4
+ aspectRatio: 'square',
5
+ rounded: '100',
6
+ borderWidth: '3',
7
+ borderStyle: 'solid',
8
+ borderColor: 'transparent',
9
+ borderTopColor: 'icon',
10
+ borderBottomColor: 'icon',
11
+ animation: 'spin',
12
+ isolation: 'isolate',
13
+ };
14
+
15
+ const spinnerVariants = {
16
+ size: {
17
+ xs: {
18
+ height: '16',
19
+ minHeight: '16',
20
+ borderWidth: '2',
21
+ },
22
+ sm: {
23
+ height: '20',
24
+ minHeight: '20',
25
+ borderWidth: '2',
26
+ },
27
+ md: {
28
+ height: '24',
29
+ minHeight: '24',
30
+ },
31
+ lg: {
32
+ height: '32',
33
+ minHeight: '32',
34
+ },
35
+ },
36
+ inverse: {
37
+ true: {
38
+ borderTopColor: 'icon.inverse',
39
+ borderBottomColor: 'icon.inverse',
40
+ },
41
+ },
42
+ };
43
+
44
+ export const spinnerRecipe = defineRecipe({
45
+ className: 'spinner',
46
+ jsx: ['Spinner'],
47
+ base: spinnerBase,
48
+ variants: spinnerVariants,
49
+ defaultVariants: {
50
+ size: 'md',
51
+ },
52
+ });
@@ -0,0 +1,262 @@
1
+ import { defineRecipe } from '@pandacss/dev';
2
+
3
+ const tagBase = {
4
+ display: 'flex',
5
+ py: '0',
6
+ borderRadius: '2',
7
+ gap: '1',
8
+ h: '20',
9
+ px: '4',
10
+ fontFamily: 'sans',
11
+ fontSize: '14',
12
+ fontWeight: '500',
13
+ whiteSpace: 'nowrap',
14
+ width: 'fit-content',
15
+ // lineHeight: 'none',
16
+ };
17
+
18
+ const tagVariant = {
19
+ appearance: {
20
+ default: {},
21
+ bold: {},
22
+ },
23
+ hue: {
24
+ gray: {},
25
+ red: {},
26
+ orange: {},
27
+ yellow: {},
28
+ lime: {},
29
+ green: {},
30
+ teal: {},
31
+ blue: {},
32
+ indigo: {},
33
+ purple: {},
34
+ magenta: {},
35
+ tan: {},
36
+ },
37
+ iconPosition: {
38
+ left: {
39
+ flexDirection: 'row',
40
+ gap: '1',
41
+ pl: '1',
42
+ },
43
+ right: {
44
+ flexDirection: 'row-reverse',
45
+ gap: '1',
46
+ pr: '1',
47
+ },
48
+ },
49
+ hasIcon: {
50
+ true: {},
51
+ false: {
52
+ px: 4,
53
+ },
54
+ },
55
+ };
56
+
57
+ export const tagRecipe = defineRecipe({
58
+ className: 'tag',
59
+ jsx: ['Tag'],
60
+ base: tagBase,
61
+ variants: tagVariant,
62
+ defaultVariants: {
63
+ appearance: 'default',
64
+ hue: 'gray',
65
+ iconPosition: 'left',
66
+ hasIcon: false,
67
+ },
68
+ compoundVariants: [
69
+ {
70
+ hue: 'gray',
71
+ appearance: 'default',
72
+ css: {
73
+ color: 'text.subtle',
74
+ bg: 'bg.neutral',
75
+ },
76
+ },
77
+ {
78
+ hue: 'gray',
79
+ appearance: 'bold',
80
+ css: {
81
+ color: 'text.inverse',
82
+ bg: 'bg.neutral.boldest',
83
+ },
84
+ },
85
+ {
86
+ hue: 'red',
87
+ appearance: 'default',
88
+ css: {
89
+ color: { base: 'red.70', _dark: 'red.20' },
90
+ bg: { base: 'red.20', _dark: 'red.100' },
91
+ },
92
+ },
93
+ {
94
+ hue: 'red',
95
+ appearance: 'bold',
96
+ css: {
97
+ color: { base: 'red.10', _dark: 'red.100' },
98
+ bg: { base: 'red.60', _dark: 'red.40' },
99
+ },
100
+ },
101
+ {
102
+ hue: 'orange',
103
+ appearance: 'default',
104
+ css: {
105
+ color: { base: 'orange.70', _dark: 'orange.20' },
106
+ bg: { base: 'orange.20', _dark: 'orange.100' },
107
+ },
108
+ },
109
+ {
110
+ hue: 'orange',
111
+ appearance: 'bold',
112
+ css: {
113
+ color: { base: 'orange.10', _dark: 'orange.100' },
114
+ bg: { base: 'orange.60', _dark: 'orange.50' },
115
+ },
116
+ },
117
+ {
118
+ hue: 'yellow',
119
+ appearance: 'default',
120
+ css: {
121
+ color: { base: 'yellow.80', _dark: 'yellow.50' },
122
+ bg: { base: 'yellow.20', _dark: 'yellow.90' },
123
+ },
124
+ },
125
+ {
126
+ hue: 'yellow',
127
+ appearance: 'bold',
128
+ css: {
129
+ color: { base: 'yellow.100', _dark: 'yellow.100' },
130
+ bg: { base: 'yellow.40', _dark: 'yellow.60' },
131
+ },
132
+ },
133
+ {
134
+ hue: 'lime',
135
+ appearance: 'default',
136
+ css: {
137
+ color: { base: 'lime.70', _dark: 'lime.20' },
138
+ bg: { base: 'lime.20', _dark: 'lime.90' },
139
+ },
140
+ },
141
+ {
142
+ hue: 'lime',
143
+ appearance: 'bold',
144
+ css: {
145
+ color: { base: 'lime.10', _dark: 'lime.100' },
146
+ bg: { base: 'lime.60', _dark: 'lime.40' },
147
+ },
148
+ },
149
+ {
150
+ hue: 'green',
151
+ appearance: 'default',
152
+ css: {
153
+ color: { base: 'green.70', _dark: 'green.20' },
154
+ bg: { base: 'green.20', _dark: 'green.90' },
155
+ },
156
+ },
157
+ {
158
+ hue: 'green',
159
+ appearance: 'bold',
160
+ css: {
161
+ color: { base: 'gray.10', _dark: 'green.100' },
162
+ bg: { base: 'green.70', _dark: 'green.40' },
163
+ },
164
+ },
165
+ {
166
+ hue: 'teal',
167
+ appearance: 'default',
168
+ css: {
169
+ color: { base: 'teal.80', _dark: 'teal.20' },
170
+ bg: { base: 'teal.20', _dark: 'teal.90' },
171
+ },
172
+ },
173
+ {
174
+ hue: 'teal',
175
+ appearance: 'bold',
176
+ css: {
177
+ color: { base: 'teal.10', _dark: 'teal.100' },
178
+ bg: { base: 'teal.60', _dark: 'teal.50' },
179
+ },
180
+ },
181
+ {
182
+ hue: 'blue',
183
+ appearance: 'default',
184
+ css: {
185
+ color: { base: 'blue.70', _dark: 'blue.20' },
186
+ bg: { base: 'blue.20', _dark: 'blue.90' },
187
+ },
188
+ },
189
+ {
190
+ hue: 'blue',
191
+ appearance: 'bold',
192
+ css: {
193
+ color: { base: 'blue.10', _dark: 'blue.10' },
194
+ bg: { base: 'blue.50', _dark: 'blue.70' },
195
+ },
196
+ },
197
+ {
198
+ hue: 'indigo',
199
+ appearance: 'default',
200
+ css: {
201
+ color: { base: 'indigo.70', _dark: 'indigo.20' },
202
+ bg: { base: 'indigo.20', _dark: 'indigo.90' },
203
+ },
204
+ },
205
+ {
206
+ hue: 'indigo',
207
+ appearance: 'bold',
208
+ css: {
209
+ color: { base: 'indigo.10', _dark: 'indigo.10' },
210
+ bg: { base: 'indigo.60', _dark: 'indigo.70' },
211
+ },
212
+ },
213
+ {
214
+ hue: 'purple',
215
+ appearance: 'default',
216
+ css: {
217
+ color: { base: 'purple.70', _dark: 'purple.20' },
218
+ bg: { base: 'purple.20', _dark: 'purple.90' },
219
+ },
220
+ },
221
+ {
222
+ hue: 'purple',
223
+ appearance: 'bold',
224
+ css: {
225
+ color: { base: 'purple.10', _dark: 'purple.10' },
226
+ bg: { base: 'purple.60', _dark: 'purple.80' },
227
+ },
228
+ },
229
+ {
230
+ hue: 'magenta',
231
+ appearance: 'default',
232
+ css: {
233
+ color: { base: 'magenta.80', _dark: 'magenta.20' },
234
+ bg: { base: 'magenta.20', _dark: 'magenta.90' },
235
+ },
236
+ },
237
+ {
238
+ hue: 'magenta',
239
+ appearance: 'bold',
240
+ css: {
241
+ color: { base: 'magenta.10', _dark: 'magenta.10' },
242
+ bg: { base: 'magenta.70', _dark: 'magenta.70' },
243
+ },
244
+ },
245
+ {
246
+ hue: 'tan',
247
+ appearance: 'default',
248
+ css: {
249
+ color: { base: 'tan.70', _dark: 'tan.20' },
250
+ bg: { base: 'tan.20', _dark: 'tan.80' },
251
+ },
252
+ },
253
+ {
254
+ hue: 'tan',
255
+ appearance: 'bold',
256
+ css: {
257
+ color: { base: 'gray.10', _dark: 'tan.90' },
258
+ bg: { base: 'tan.60', _dark: 'tan.40' },
259
+ },
260
+ },
261
+ ],
262
+ });