@okshaun/components 1.0.1 → 2.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 (128) hide show
  1. package/dist/.mcp.json +2 -5
  2. package/dist/icon-metadata.json +5173 -0
  3. package/dist/index.js +17088 -9273
  4. package/dist/index.js.map +1 -1
  5. package/dist/panda.buildinfo.json +693 -0
  6. package/dist/playroom-static.css +187432 -0
  7. package/dist/{preset-BzrKiUEH.js → preset-Coz-VwQR.js} +4051 -3217
  8. package/dist/preset-Coz-VwQR.js.map +1 -0
  9. package/dist/preset.js +1 -1
  10. package/dist/specs/color-palette.json +22 -1
  11. package/dist/specs/patterns.json +0 -16
  12. package/dist/specs/recipes.json +411 -247
  13. package/dist/specs/semantic-tokens.json +330 -115
  14. package/dist/specs/text-styles.json +72 -0
  15. package/dist/specs/tokens.json +237 -27
  16. package/dist/sprite.svg +1 -1
  17. package/dist/sprite.symbol.html +6662 -320
  18. package/dist/styles.css +36938 -5
  19. package/dist/svgs/calendar-lock.svg +1 -0
  20. package/dist/svgs/computer.svg +1 -0
  21. package/dist/svgs/cookie.svg +1 -0
  22. package/dist/svgs/folder-check.svg +1 -0
  23. package/dist/svgs/folder-copy.svg +1 -0
  24. package/dist/svgs/folder-dashed.svg +1 -0
  25. package/dist/svgs/folder-open.svg +1 -0
  26. package/dist/svgs/folder-topic.svg +1 -0
  27. package/dist/svgs/folder.svg +1 -0
  28. package/dist/svgs/mobile.svg +1 -0
  29. package/dist/svgs/numpad.svg +1 -0
  30. package/dist/svgs/phone.svg +1 -0
  31. package/dist/svgs/qr-code.svg +1 -0
  32. package/dist/svgs/sparkle.svg +1 -0
  33. package/dist/svgs/trolley.svg +1 -0
  34. package/dist/types/index.d.ts +834 -347
  35. package/package.json +49 -36
  36. package/src/recipes/avatar.ts +4 -4
  37. package/src/recipes/badge.ts +22 -48
  38. package/src/recipes/box.ts +1 -7
  39. package/src/recipes/breadcrumbs.ts +42 -25
  40. package/src/recipes/button.ts +151 -85
  41. package/src/recipes/card.ts +5 -1
  42. package/src/recipes/checkbox.ts +23 -24
  43. package/src/recipes/checkboxInput.ts +25 -0
  44. package/src/recipes/chip.ts +35 -37
  45. package/src/recipes/code.ts +4 -4
  46. package/src/recipes/datePicker.ts +223 -0
  47. package/src/recipes/divider.ts +38 -31
  48. package/src/recipes/formField.ts +41 -23
  49. package/src/recipes/highlightText.ts +14 -0
  50. package/src/recipes/icon.ts +13 -0
  51. package/src/recipes/list.ts +14 -0
  52. package/src/recipes/listItem.ts +310 -0
  53. package/src/recipes/listItemGroup.ts +62 -0
  54. package/src/recipes/menu.ts +90 -163
  55. package/src/recipes/modal.ts +51 -18
  56. package/src/recipes/radio.ts +29 -20
  57. package/src/recipes/radioInput.ts +25 -0
  58. package/src/recipes/recipes-regular.ts +14 -0
  59. package/src/recipes/{index.ts → recipes-slot.ts} +14 -23
  60. package/src/recipes/select.ts +1 -1
  61. package/src/recipes/spinner.ts +49 -23
  62. package/src/recipes/tag.ts +80 -84
  63. package/src/recipes/text.ts +18 -19
  64. package/src/recipes/textInput.ts +205 -0
  65. package/src/recipes/textarea.ts +65 -138
  66. package/src/recipes/themeSwitcher.ts +3 -3
  67. package/src/recipes/timePicker.ts +199 -0
  68. package/src/recipes/toggle.ts +72 -99
  69. package/src/recipes/toggleInput.ts +26 -0
  70. package/src/recipes/tooltip.ts +52 -343
  71. package/src/styles/index.css +1 -1
  72. package/src/styles/primitives/borders.ts +7 -1
  73. package/src/styles/primitives/colors.ts +51 -0
  74. package/src/styles/primitives/fontSizes.ts +1 -0
  75. package/src/styles/primitives/index.ts +2 -1
  76. package/src/styles/primitives/radii.ts +1 -1
  77. package/src/styles/primitives/shadows.ts +9 -9
  78. package/src/styles/primitives/sizes.ts +1 -0
  79. package/src/styles/primitives/zIndex.ts +17 -0
  80. package/src/styles/semantics/colors.ts +137 -82
  81. package/src/styles/semantics/index.ts +1 -0
  82. package/src/styles/semantics/zIndex.ts +18 -0
  83. package/src/styles/utilities/breakpoints.ts +6 -6
  84. package/src/styles/utilities/index.ts +3 -0
  85. package/src/styles/utilities/textStyles.ts +71 -1
  86. package/src/utils/splitProps.ts +4 -4
  87. package/dist/preset-BzrKiUEH.js.map +0 -1
  88. package/dist/styles/global.css +0 -148
  89. package/dist/styles/recipes/avatar.css +0 -185
  90. package/dist/styles/recipes/badge.css +0 -85
  91. package/dist/styles/recipes/breadcrumbs.css +0 -38
  92. package/dist/styles/recipes/button.css +0 -195
  93. package/dist/styles/recipes/card.css +0 -57
  94. package/dist/styles/recipes/checkbox-input.css +0 -12
  95. package/dist/styles/recipes/checkbox.css +0 -90
  96. package/dist/styles/recipes/chip.css +0 -137
  97. package/dist/styles/recipes/code.css +0 -12
  98. package/dist/styles/recipes/divider.css +0 -43
  99. package/dist/styles/recipes/form-field.css +0 -39
  100. package/dist/styles/recipes/heading.css +0 -40
  101. package/dist/styles/recipes/icon-button.css +0 -181
  102. package/dist/styles/recipes/label.css +0 -14
  103. package/dist/styles/recipes/link.css +0 -49
  104. package/dist/styles/recipes/menu.css +0 -141
  105. package/dist/styles/recipes/modal.css +0 -99
  106. package/dist/styles/recipes/pre.css +0 -16
  107. package/dist/styles/recipes/radio-input.css +0 -7
  108. package/dist/styles/recipes/radio.css +0 -82
  109. package/dist/styles/recipes/select.css +0 -103
  110. package/dist/styles/recipes/spinner.css +0 -36
  111. package/dist/styles/recipes/tag.css +0 -27
  112. package/dist/styles/recipes/text.css +0 -46
  113. package/dist/styles/recipes/textarea.css +0 -91
  114. package/dist/styles/recipes/textinput.css +0 -87
  115. package/dist/styles/recipes/theme-switcher.css +0 -53
  116. package/dist/styles/recipes/toggle-input.css +0 -12
  117. package/dist/styles/recipes/toggle.css +0 -125
  118. package/dist/styles/recipes/tooltip.css +0 -133
  119. package/dist/styles/recipes.css +0 -30
  120. package/dist/styles/reset.css +0 -1
  121. package/dist/styles/tokens.css +0 -1016
  122. package/dist/styles/utilities.css +0 -1694
  123. package/src/recipes/checkboxinput.ts +0 -15
  124. package/src/recipes/radioinput.ts +0 -12
  125. package/src/recipes/textinput.ts +0 -100
  126. package/src/recipes/toggleinput.ts +0 -16
  127. package/src/utils/injectSprite.ts +0 -36
  128. package/src/utils/spriteContent.ts +0 -4
package/package.json CHANGED
@@ -1,23 +1,43 @@
1
1
  {
2
2
  "name": "@okshaun/components",
3
- "version": "1.0.1",
4
- "description": "A comprehensive React component library with Panda CSS theming",
3
+ "version": "2.0.0",
4
+ "description": "okshaun design system",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
8
- "types": "./dist/index.d.ts",
8
+ "types": "./dist/types/index.d.ts",
9
9
  "scripts": {
10
- "prepare": "npx panda codegen",
11
- "dev": "npx panda codegen --watch & vite",
12
- "build": "rm -rf dist && PANDA_STATIC=true npx panda codegen && npx panda cssgen --splitting && npx panda spec && npx panda init-mcp --client claude && vite build",
13
- "lint": "eslint .",
10
+ "prepare": "npx panda && npx simple-git-hooks",
11
+ "dev": "npx panda --watch & vite",
12
+ "build": "rm -rf dist && PANDA_STATIC=true npx panda && npx panda spec && npx panda ship --outfile ./panda.buildinfo.json && vite build",
13
+ "lint": "biome lint .",
14
+ "check": "biome check .",
15
+ "check:write": "biome check . --write",
16
+ "format": "biome format . --write",
17
+ "typecheck": "tsc --noEmit",
18
+ "standards:check": "node tools/validate-standards.mjs",
19
+ "standards:changed": "node tools/validate-standards.mjs --changed",
20
+ "standards:staged": "node tools/validate-standards.mjs --staged",
21
+ "standards:test": "node --test tools/tests/*.test.mjs",
22
+ "validate": "node tools/run-validate.mjs --full --include-typecheck",
23
+ "validate:staged": "node tools/run-validate.mjs --staged --write",
24
+ "validate:full": "node tools/run-validate.mjs --full --report-only --include-typecheck",
14
25
  "preview": "vite preview",
15
26
  "generate-sprite": "node src/utils/generate-sprite.js",
16
- "storybook": "PANDA_STATIC=true storybook dev -p 6006",
17
- "storybook:build": "PANDA_STATIC=true storybook build",
18
- "panda-mcp": "npx panda mcp",
27
+ "storybook": "PANDA_STATIC=true STORYBOOK=true storybook dev -p 6006",
28
+ "storybook:build": "PANDA_STATIC=true STORYBOOK=true storybook build",
29
+ "playroom": "node .playroom/playroom-dev.js",
30
+ "playroom:css": "node .playroom/playroom-dev.js --css-only",
31
+ "playroom:build": "node .playroom/playroom-build.js",
32
+ "panda": "npx panda --watch",
33
+ "panda:mcp": "npx panda mcp",
19
34
  "prepublishOnly": "npm run build",
20
- "format": "prettier --write 'src/**/*.{ts,tsx}'"
35
+ "doctor": "npm run doctor:react && npm run doctor:storybook",
36
+ "doctor:react": "npx -y react-doctor@latest .",
37
+ "doctor:storybook": "npx storybook doctor"
38
+ },
39
+ "simple-git-hooks": {
40
+ "pre-commit": "npm run validate:staged"
21
41
  },
22
42
  "files": [
23
43
  "./dist/",
@@ -54,50 +74,43 @@
54
74
  }
55
75
  },
56
76
  "dependencies": {
57
- "@floating-ui/react": "^0.27.16",
58
- "date-fns": "^4.1.0"
77
+ "@floating-ui/react": "^0.27.16"
59
78
  },
60
79
  "devDependencies": {
61
- "@eslint/js": "^9.17.0",
80
+ "@babel/core": "^7.28.3",
81
+ "@babel/preset-react": "^7.28.5",
82
+ "@babel/preset-typescript": "^7.28.5",
83
+ "@biomejs/biome": "2.0.6",
62
84
  "@fontsource-variable/piazzolla": "^5.2.8",
63
85
  "@fontsource/ibm-plex-mono": "^5.2.7",
64
86
  "@fontsource/ibm-plex-sans": "^5.2.8",
65
87
  "@pandacss/dev": "^1.8.0",
66
- "@storybook/addon-essentials": "^8.6.15",
67
- "@storybook/addon-interactions": "^8.6.15",
68
- "@storybook/addon-themes": "^8.6.15",
69
- "@storybook/blocks": "^8.6.15",
70
- "@storybook/react": "^8.6.15",
71
- "@storybook/react-vite": "^8.6.15",
72
- "@storybook/test": "^8.6.15",
88
+ "@storybook/addon-a11y": "^8.6.17",
89
+ "@storybook/addon-essentials": "^8.6.17",
90
+ "@storybook/addon-interactions": "^8.6.17",
91
+ "@storybook/addon-themes": "^8.6.17",
92
+ "@storybook/blocks": "^8.6.17",
93
+ "@storybook/react": "^8.6.17",
94
+ "@storybook/react-vite": "^8.6.17",
95
+ "@storybook/test": "^8.6.17",
73
96
  "@types/node": "^22.15.30",
74
97
  "@types/react": "19.0.8",
75
98
  "@types/react-dom": "19.0.3",
76
99
  "@vitejs/plugin-react": "^4.3.4",
77
- "eslint": "^9.17.0",
78
- "eslint-config-prettier": "^9.1.0",
79
- "eslint-plugin-react": "^7.37.2",
80
- "eslint-plugin-react-hooks": "^5.0.0",
81
- "eslint-plugin-react-refresh": "^0.4.16",
82
- "eslint-plugin-storybook": "^0.11.2",
100
+ "babel-loader": "^10.0.0",
83
101
  "gh-pages": "^6.2.0",
84
- "globals": "^15.14.0",
102
+ "playroom": "^0.44.0",
85
103
  "postcss": "^8.5.1",
86
- "prettier": "^3.3.3",
87
- "storybook": "^8.6.15",
104
+ "react-doctor": "^0.0.29",
105
+ "simple-git-hooks": "^2.13.1",
106
+ "storybook": "^8.6.17",
88
107
  "svg-sprite": "^2.0.4",
89
108
  "svgo": "^3.0.2",
90
109
  "typescript": "^5.7.3",
91
- "typescript-eslint": "^8.54.0",
92
110
  "vite": "^6.0.5",
93
111
  "vite-plugin-dts": "^4.5.4",
94
112
  "vite-plugin-static-copy": "^3.1.4"
95
113
  },
96
- "eslintConfig": {
97
- "extends": [
98
- "plugin:storybook/recommended"
99
- ]
100
- },
101
114
  "exports": {
102
115
  ".": {
103
116
  "types": "./dist/types/index.d.ts",
@@ -44,11 +44,11 @@ export const avatarRecipe = defineSlotRecipe({
44
44
  position: 'absolute',
45
45
  bottom: '0',
46
46
  right: '0',
47
- borderRadius: 'full',
47
+ borderRadius: '999',
48
48
  borderWidth: '2',
49
49
  borderStyle: 'solid',
50
50
  borderColor: 'bg',
51
- zIndex: 1,
51
+ zIndex: 'raised',
52
52
  },
53
53
  status: {
54
54
  position: 'absolute',
@@ -57,11 +57,11 @@ export const avatarRecipe = defineSlotRecipe({
57
57
  display: 'flex',
58
58
  alignItems: 'center',
59
59
  justifyContent: 'center',
60
- borderRadius: 'full',
60
+ borderRadius: '999',
61
61
  borderWidth: '2',
62
62
  borderStyle: 'solid',
63
63
  borderColor: 'bg',
64
- zIndex: 1,
64
+ zIndex: 'raised',
65
65
  },
66
66
  },
67
67
  variants: {
@@ -17,10 +17,10 @@ export const badgeRecipe = defineSlotRecipe({
17
17
  borderRadius: '999',
18
18
  fontWeight: 'medium',
19
19
  fontFamily: 'sans',
20
- lineHeight: '1',
20
+ lineHeight: 'none',
21
21
  whiteSpace: 'nowrap',
22
22
  userSelect: 'none',
23
- zIndex: '1',
23
+ zIndex: 'raised',
24
24
  },
25
25
  },
26
26
  variants: {
@@ -89,50 +89,50 @@ export const badgeRecipe = defineSlotRecipe({
89
89
  variant: {
90
90
  neutral: {
91
91
  indicator: {
92
- bg: { base: 'neutral.30', _dark: 'darkNeutral.40' },
93
- color: 'text',
92
+ color: { base: 'neutral.110', _dark: 'neutral.0' },
93
+ bg: { base: 'neutral.40', _dark: 'neutral.70' },
94
94
  },
95
95
  },
96
96
  subtle: {
97
97
  indicator: {
98
- bg: 'bg.neutral',
99
- color: 'text',
98
+ color: { base: 'neutral.100', _dark: 'darkNeutral.120' },
99
+ bg: { base: 'neutralA.20', _dark: 'darkNeutralA.20' },
100
100
  },
101
101
  },
102
- inverted: {
102
+ bold: {
103
103
  indicator: {
104
- bg: 'bg.neutral.inverse.bold',
105
- color: 'text.inverse',
104
+ color: { base: 'neutral.0', _dark: 'darkNeutral.10' },
105
+ bg: { base: 'darkNeutral.0', _dark: 'neutral.0' },
106
106
  },
107
107
  },
108
- 'subtle-inverted': {
108
+ inverse: {
109
109
  indicator: {
110
- bg: 'bg.neutral.inverse.subtle',
111
- color: 'text',
110
+ color: { base: 'neutral.110', _dark: 'darkNeutral.120' },
111
+ bg: { base: 'neutral.0', _dark: 'darkNeutral.0' },
112
112
  },
113
113
  },
114
114
  success: {
115
115
  indicator: {
116
- bg: 'bg.success.bold',
117
- color: 'text.inverse',
116
+ color: { base: 'neutral.0', _dark: 'darkNeutral.0' },
117
+ bg: { base: 'green.50', _dark: 'green.40' },
118
118
  },
119
119
  },
120
- danger: {
120
+ warning: {
121
121
  indicator: {
122
- bg: 'bg.danger.bold',
123
- color: 'text.inverse',
122
+ color: { base: 'neutral.100', _dark: 'darkNeutral.10' },
123
+ bg: { base: 'orange.30', _dark: 'orange.30' },
124
124
  },
125
125
  },
126
- warning: {
126
+ danger: {
127
127
  indicator: {
128
- bg: 'bg.warning.bold',
129
- color: 'text.warning.inverse',
128
+ color: { base: 'neutral.0', _dark: 'neutral.0' },
129
+ bg: { base: 'red.50', _dark: 'red.50' },
130
130
  },
131
131
  },
132
132
  info: {
133
133
  indicator: {
134
- bg: 'bg.info.bold',
135
- color: 'text.inverse',
134
+ color: { base: 'neutral.0', _dark: 'darkNeutral.10' },
135
+ bg: { base: 'blue.50', _dark: 'blue.40' },
136
136
  },
137
137
  },
138
138
  },
@@ -146,9 +146,6 @@ export const badgeRecipe = defineSlotRecipe({
146
146
  indicator: {
147
147
  minW: '16',
148
148
  h: 'fit',
149
- // w: '4',
150
- // h: '4',
151
- // p: '3',
152
149
  },
153
150
  },
154
151
  },
@@ -159,9 +156,6 @@ export const badgeRecipe = defineSlotRecipe({
159
156
  indicator: {
160
157
  minW: '20',
161
158
  h: 'fit',
162
- // w: '6',
163
- // h: '6',
164
- // p: '4',
165
159
  },
166
160
  },
167
161
  },
@@ -172,9 +166,6 @@ export const badgeRecipe = defineSlotRecipe({
172
166
  indicator: {
173
167
  minW: '24',
174
168
  h: 'fit',
175
- // w: '8',
176
- // h: '8',
177
- // p: '5',
178
169
  },
179
170
  },
180
171
  },
@@ -183,21 +174,4 @@ export const badgeRecipe = defineSlotRecipe({
183
174
  size: 'md',
184
175
  variant: 'danger',
185
176
  },
186
- // staticCss: [
187
- // {
188
- // size: ['sm', 'md', 'lg'],
189
- // standalone: ['true', 'false'],
190
- // dot: ['true', 'false'],
191
- // variant: [
192
- // 'neutral',
193
- // 'inverted',
194
- // 'subtle',
195
- // 'subtle-inverted',
196
- // 'success',
197
- // 'danger',
198
- // 'warning',
199
- // 'info',
200
- // ],
201
- // },
202
- // ],
203
177
  });
@@ -1,13 +1,7 @@
1
1
  import { defineRecipe } from '@pandacss/dev';
2
2
 
3
- const boxBase = {};
4
-
5
- const boxVariants = {};
6
-
7
3
  export const boxRecipe = defineRecipe({
8
4
  className: 'box',
9
5
  jsx: ['Box'],
10
- base: boxBase,
11
- variants: boxVariants,
12
- defaultVariants: {},
6
+ base: {},
13
7
  });
@@ -1,29 +1,46 @@
1
- import { defineRecipe } from '@pandacss/dev';
1
+ import { defineSlotRecipe } from '@pandacss/dev';
2
2
 
3
- const BreadcrumbsBase = {
4
- display: 'flex',
5
- alignItems: 'center',
6
- '& li': {
7
- display: 'flex',
8
- alignItems: 'center',
9
- },
10
- '& a': {
11
- color: { base: 'gray.60', _dark: 'gray.60' },
12
- _focusVisible: {
13
- color: 'blue.50',
14
- },
15
- },
16
- '& p': {
17
- color: { base: 'gray.90', _dark: 'gray.10' },
18
- },
19
- '& span': {
20
- mx: '6',
21
- color: 'gray.20',
22
- },
23
- };
24
-
25
- export const breadcrumbsRecipe = defineRecipe({
3
+ export const breadcrumbsRecipe = defineSlotRecipe({
26
4
  className: 'breadcrumbs',
27
5
  jsx: ['Breadcrumbs'],
28
- base: BreadcrumbsBase,
6
+ slots: ['wrapper', 'slash', 'linkSegment', 'currentSegment'],
7
+ base: {
8
+ wrapper: {
9
+ display: 'flex',
10
+ gap: '6',
11
+ alignItems: 'center',
12
+ fontFamily: 'mono',
13
+ fontSize: '14',
14
+ '& li': {
15
+ display: 'flex',
16
+ gap: '6',
17
+ alignItems: 'center',
18
+ },
19
+ },
20
+ slash: {
21
+ fontFamily: 'mono',
22
+ fontSize: '14',
23
+ color: 'text.placeholder',
24
+ },
25
+ linkSegment: {
26
+ fontFamily: 'mono',
27
+ fontSize: '14',
28
+ color: 'text.subtlest',
29
+ fontWeight: 'normal',
30
+ whiteSpace: 'nowrap',
31
+ _hover: {
32
+ color: 'link',
33
+ },
34
+ _focusVisible: {
35
+ color: 'blue.50',
36
+ },
37
+ },
38
+ currentSegment: {
39
+ fontFamily: 'mono',
40
+ fontSize: '14',
41
+ color: 'text',
42
+ fontWeight: 'bold',
43
+ whiteSpace: 'nowrap',
44
+ },
45
+ },
29
46
  });