@okshaun/components 0.5.7 → 1.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.
- package/README.md +22 -26
- package/dist/.mcp.json +11 -0
- package/dist/index.d.ts +3 -1191
- package/dist/index.js +1660 -884
- package/dist/index.js.map +1 -1
- package/dist/okshaun-logo-white.svg +11 -0
- package/dist/okshaun-logo.svg +11 -0
- package/dist/preset-KB9Tn8-2.js +8452 -0
- package/dist/preset-KB9Tn8-2.js.map +1 -0
- package/dist/preset.js +3 -6984
- package/dist/preset.js.map +1 -1
- package/dist/specs/animation-styles.json +4 -0
- package/dist/specs/color-palette.json +98 -0
- package/dist/specs/conditions.json +1901 -0
- package/dist/specs/keyframes.json +137 -0
- package/dist/specs/layer-styles.json +23 -0
- package/dist/specs/patterns.json +475 -0
- package/dist/specs/recipes.json +907 -0
- package/dist/specs/semantic-tokens.json +2837 -0
- package/dist/specs/text-styles.json +149 -0
- package/dist/specs/tokens.json +2750 -0
- package/dist/sprite.symbol.html +1 -1
- package/dist/styles/global.css +148 -0
- package/dist/styles/recipes/avatar.css +185 -0
- package/dist/styles/recipes/badge.css +85 -0
- package/dist/styles/recipes/breadcrumbs.css +38 -0
- package/dist/styles/recipes/button.css +195 -0
- package/dist/styles/recipes/card.css +57 -0
- package/dist/styles/recipes/checkbox-input.css +12 -0
- package/dist/styles/recipes/checkbox.css +90 -0
- package/dist/styles/recipes/chip.css +137 -0
- package/dist/styles/recipes/code.css +12 -0
- package/dist/styles/recipes/divider.css +43 -0
- package/dist/styles/recipes/form-field.css +39 -0
- package/dist/styles/recipes/heading.css +40 -0
- package/dist/styles/recipes/icon-button.css +181 -0
- package/dist/styles/recipes/label.css +14 -0
- package/dist/styles/recipes/link.css +49 -0
- package/dist/styles/recipes/menu.css +141 -0
- package/dist/styles/recipes/modal.css +99 -0
- package/dist/styles/recipes/pre.css +16 -0
- package/dist/styles/recipes/radio-input.css +7 -0
- package/dist/styles/recipes/radio.css +82 -0
- package/dist/styles/recipes/select.css +103 -0
- package/dist/styles/recipes/spinner.css +36 -0
- package/dist/styles/recipes/tag.css +27 -0
- package/dist/styles/recipes/text.css +46 -0
- package/dist/styles/recipes/textarea.css +91 -0
- package/dist/styles/recipes/textinput.css +87 -0
- package/dist/styles/recipes/theme-switcher.css +53 -0
- package/dist/styles/recipes/toggle-input.css +12 -0
- package/dist/styles/recipes/toggle.css +125 -0
- package/dist/styles/recipes/tooltip.css +133 -0
- package/dist/styles/recipes.css +30 -0
- package/dist/styles/reset.css +1 -0
- package/dist/styles/tokens.css +1016 -0
- package/dist/styles/utilities.css +1694 -0
- package/dist/styles.css +7 -0
- package/dist/types/index.d.ts +21626 -0
- package/dist/types/preset.d.ts +19 -0
- package/package.json +37 -35
- package/src/recipes/avatar.ts +205 -0
- package/src/recipes/badge.ts +203 -0
- package/src/recipes/box.ts +13 -0
- package/src/recipes/breadcrumbs.ts +29 -0
- package/src/recipes/button.ts +319 -0
- package/src/recipes/card.ts +148 -0
- package/src/recipes/checkbox.ts +87 -0
- package/src/recipes/checkboxinput.ts +15 -0
- package/src/recipes/chip.ts +189 -0
- package/src/recipes/code.ts +35 -0
- package/src/recipes/divider.ts +41 -0
- package/src/recipes/formField.ts +60 -0
- package/src/recipes/index.ts +28 -0
- package/src/recipes/menu.ts +205 -0
- package/src/recipes/modal.ts +120 -0
- package/src/recipes/radio.ts +71 -0
- package/src/recipes/radioinput.ts +12 -0
- package/src/recipes/select.ts +142 -0
- package/src/recipes/spinner.ts +52 -0
- package/src/recipes/tag.ts +262 -0
- package/src/recipes/text.ts +193 -0
- package/src/recipes/textarea.ts +153 -0
- package/src/recipes/textinput.ts +100 -0
- package/src/recipes/themeSwitcher.ts +48 -0
- package/src/recipes/toggle.ts +116 -0
- package/src/recipes/toggleinput.ts +16 -0
- package/src/recipes/tooltip.ts +359 -0
- package/src/styles/index.css +1 -0
- package/src/styles/primitives/animations.ts +16 -0
- package/src/styles/primitives/aspectRatios.ts +22 -0
- package/src/styles/primitives/blurs.ts +25 -0
- package/src/styles/primitives/borderWidths.ts +10 -0
- package/src/styles/primitives/borders.ts +36 -0
- package/src/styles/primitives/colors.ts +228 -0
- package/src/styles/primitives/durations.ts +25 -0
- package/src/styles/primitives/easings.ts +19 -0
- package/src/styles/primitives/fontSizes.ts +16 -0
- package/src/styles/primitives/fontWeights.ts +9 -0
- package/src/styles/primitives/fonts.ts +18 -0
- package/src/styles/primitives/index.ts +46 -0
- package/src/styles/primitives/letterSpacings.ts +22 -0
- package/src/styles/primitives/lineHeights.ts +16 -0
- package/src/styles/primitives/radii.ts +14 -0
- package/src/styles/primitives/shadows.ts +73 -0
- package/src/styles/primitives/sizes.ts +86 -0
- package/src/styles/primitives/spacings.ts +7 -0
- package/src/styles/semantics/colors.ts +774 -0
- package/src/styles/semantics/index.ts +2 -0
- package/src/styles/semantics/shadows.ts +32 -0
- package/src/styles/utilities/breakpoints.ts +8 -0
- package/src/styles/utilities/conditions.ts +140 -0
- package/src/styles/utilities/containerSizes.ts +17 -0
- package/src/styles/utilities/filters.ts +12 -0
- package/src/styles/utilities/globalStyle.ts +93 -0
- package/src/styles/utilities/index.ts +9 -0
- package/src/styles/utilities/keyframes.ts +89 -0
- package/src/styles/utilities/layerStyles.ts +18 -0
- package/src/styles/utilities/textStyles.ts +135 -0
- package/src/styles/utilities/transitions.ts +92 -0
- package/src/utils/injectSprite.ts +36 -0
- package/src/utils/splitProps.ts +19 -0
- package/src/utils/spriteContent.ts +4 -0
- package/dist/panda.buildinfo.json +0 -437
- package/dist/preset.d.ts +0 -5
- package/dist/transitions-D5SjakQu.js +0 -1012
- package/dist/transitions-D5SjakQu.js.map +0 -1
package/README.md
CHANGED
|
@@ -42,10 +42,7 @@ export default defineConfig({
|
|
|
42
42
|
exclude: [],
|
|
43
43
|
|
|
44
44
|
// Use the okshaun preset
|
|
45
|
-
presets: [
|
|
46
|
-
'@pandacss/preset-base',
|
|
47
|
-
okshaunPreset
|
|
48
|
-
],
|
|
45
|
+
presets: [ okshaunPreset ],
|
|
49
46
|
|
|
50
47
|
// Optional: customize the preset
|
|
51
48
|
theme: {
|
|
@@ -57,7 +54,7 @@ export default defineConfig({
|
|
|
57
54
|
},
|
|
58
55
|
|
|
59
56
|
// Configure output
|
|
60
|
-
outdir: 'styled-system',
|
|
57
|
+
outdir: 'src/styled-system',
|
|
61
58
|
jsxFramework: 'react',
|
|
62
59
|
|
|
63
60
|
// Recommended settings
|
|
@@ -96,9 +93,8 @@ import ReactDOM from 'react-dom/client'
|
|
|
96
93
|
import { ThemeProvider } from '@okshaun/components'
|
|
97
94
|
import App from './App'
|
|
98
95
|
|
|
99
|
-
// Import your app styles
|
|
96
|
+
// Import your app styles as the Panda CSS entrypoint
|
|
100
97
|
import './index.css'
|
|
101
|
-
import '../styled-system/styles.css'
|
|
102
98
|
|
|
103
99
|
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
104
100
|
<React.StrictMode>
|
|
@@ -116,9 +112,9 @@ Add Panda CSS generation to your scripts:
|
|
|
116
112
|
```json
|
|
117
113
|
{
|
|
118
114
|
"scripts": {
|
|
119
|
-
"dev": "panda codegen --watch & vite",
|
|
120
|
-
"build": "panda codegen && tsc && vite build",
|
|
121
|
-
"
|
|
115
|
+
"dev": "npx panda codegen --watch & vite",
|
|
116
|
+
"build": "npx panda codegen && tsc && vite build",
|
|
117
|
+
"prepare": "npx panda codegen"
|
|
122
118
|
}
|
|
123
119
|
}
|
|
124
120
|
```
|
|
@@ -132,7 +128,7 @@ Update `tsconfig.json` to include Panda CSS path aliases:
|
|
|
132
128
|
"compilerOptions": {
|
|
133
129
|
"baseUrl": ".",
|
|
134
130
|
"paths": {
|
|
135
|
-
"@styled-system/*": ["./styled-system/*"]
|
|
131
|
+
"@styled-system/*": ["./src/styled-system/*"]
|
|
136
132
|
}
|
|
137
133
|
}
|
|
138
134
|
}
|
|
@@ -151,7 +147,7 @@ export default defineConfig({
|
|
|
151
147
|
plugins: [react()],
|
|
152
148
|
resolve: {
|
|
153
149
|
alias: {
|
|
154
|
-
'@styled-system': resolve(__dirname, './styled-system'),
|
|
150
|
+
'@styled-system': resolve(__dirname, './src/styled-system'),
|
|
155
151
|
},
|
|
156
152
|
},
|
|
157
153
|
})
|
|
@@ -163,7 +159,7 @@ export default defineConfig({
|
|
|
163
159
|
|
|
164
160
|
```typescript
|
|
165
161
|
import { Button, Box, Text, Icon } from '@okshaun/components'
|
|
166
|
-
import { css } from '
|
|
162
|
+
import { css } from '@styled-system/css'
|
|
167
163
|
|
|
168
164
|
function App() {
|
|
169
165
|
return (
|
|
@@ -222,8 +218,8 @@ import { Icon } from '@okshaun/components'
|
|
|
222
218
|
function MyComponent() {
|
|
223
219
|
return (
|
|
224
220
|
<>
|
|
225
|
-
<Icon name="check" size="md" fill="success
|
|
226
|
-
<Icon name="close" size="lg" fill="error
|
|
221
|
+
<Icon name="check" size="md" fill="icon.success" />
|
|
222
|
+
<Icon name="close" size="lg" fill="icon.error" />
|
|
227
223
|
</>
|
|
228
224
|
)
|
|
229
225
|
}
|
|
@@ -253,7 +249,7 @@ function Examples() {
|
|
|
253
249
|
</Button>
|
|
254
250
|
|
|
255
251
|
{/* Button as React Router Link */}
|
|
256
|
-
<Button as={Link} to="/about"
|
|
252
|
+
<Button as={Link} to="/about">
|
|
257
253
|
About Page
|
|
258
254
|
</Button>
|
|
259
255
|
</>
|
|
@@ -312,13 +308,13 @@ export default defineConfig({
|
|
|
312
308
|
The preset provides comprehensive design tokens:
|
|
313
309
|
|
|
314
310
|
```typescript
|
|
315
|
-
import { css } from '
|
|
311
|
+
import { css } from '@styled-system/css'
|
|
316
312
|
|
|
317
313
|
const styles = css({
|
|
318
314
|
// Colors from semantic tokens
|
|
319
|
-
bg: 'surface
|
|
320
|
-
color: 'text
|
|
321
|
-
borderColor: 'border
|
|
315
|
+
bg: 'bg.surface',
|
|
316
|
+
color: 'text',
|
|
317
|
+
borderColor: 'border',
|
|
322
318
|
|
|
323
319
|
// Spacing (0-280 + container sizes)
|
|
324
320
|
p: '4',
|
|
@@ -326,13 +322,13 @@ const styles = css({
|
|
|
326
322
|
gap: '2',
|
|
327
323
|
|
|
328
324
|
// Border radius
|
|
329
|
-
borderRadius: '
|
|
325
|
+
borderRadius: '8',
|
|
330
326
|
|
|
331
327
|
// Shadows
|
|
332
|
-
boxShadow: '
|
|
328
|
+
boxShadow: 'raised',
|
|
333
329
|
|
|
334
330
|
// Typography
|
|
335
|
-
fontSize: '
|
|
331
|
+
fontSize: '14',
|
|
336
332
|
fontWeight: 'medium',
|
|
337
333
|
lineHeight: 'normal'
|
|
338
334
|
})
|
|
@@ -371,7 +367,7 @@ Override the font tokens in your `panda.config.ts`:
|
|
|
371
367
|
|
|
372
368
|
```typescript
|
|
373
369
|
import { defineConfig } from '@pandacss/dev'
|
|
374
|
-
import { okshaunPreset } from '@okshaun/components
|
|
370
|
+
import { okshaunPreset } from '@okshaun/components'
|
|
375
371
|
|
|
376
372
|
export default defineConfig({
|
|
377
373
|
presets: [okshaunPreset],
|
|
@@ -434,7 +430,7 @@ No additional font packages needed!
|
|
|
434
430
|
npm install
|
|
435
431
|
|
|
436
432
|
# Generate Panda CSS
|
|
437
|
-
npm run
|
|
433
|
+
npm run prepare
|
|
438
434
|
|
|
439
435
|
# Start development server
|
|
440
436
|
npm run dev
|
|
@@ -492,7 +488,7 @@ git push origin :refs/tags/v0.3.5
|
|
|
492
488
|
|
|
493
489
|
## Storybook
|
|
494
490
|
|
|
495
|
-
View all components in Storybook: [
|
|
491
|
+
View all components in Storybook: [shaunfox.com/okshaun-components](https://shaunfox.com/okshaun-components)
|
|
496
492
|
|
|
497
493
|
## License
|
|
498
494
|
|