@jongh/ui 1.6.5

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 (267) hide show
  1. package/.storybook/index.css +1 -0
  2. package/.storybook/main.ts +40 -0
  3. package/.storybook/preview.ts +16 -0
  4. package/.storybook/vitest.setup.ts +9 -0
  5. package/.turbo/turbo-build.log +79 -0
  6. package/CHANGELOG.md +54 -0
  7. package/chromatic.config.json +6 -0
  8. package/eslint.config.mjs +14 -0
  9. package/index.html +13 -0
  10. package/package.json +58 -0
  11. package/panda.config.ts +13 -0
  12. package/postcss.config.cjs +3 -0
  13. package/preset.ts +134 -0
  14. package/src/component/accordion/ui/index.tsx +80 -0
  15. package/src/component/accordion/ui/recipe.ts +65 -0
  16. package/src/component/avatar/ui/index.tsx +47 -0
  17. package/src/component/avatar/ui/recipe.ts +30 -0
  18. package/src/component/button/ui/index.tsx +29 -0
  19. package/src/component/button/ui/recipe.ts +102 -0
  20. package/src/component/chip/ui/index.tsx +30 -0
  21. package/src/component/chip/ui/recipe.ts +112 -0
  22. package/src/component/dialog/ui/index.tsx +73 -0
  23. package/src/component/dialog/ui/recipe.ts +92 -0
  24. package/src/component/select/ui/index.tsx +128 -0
  25. package/src/component/select/ui/recipe.ts +142 -0
  26. package/src/component/slider/ui/index.tsx +61 -0
  27. package/src/component/slider/ui/recipe.ts +52 -0
  28. package/src/component/tabs/ui/index.tsx +61 -0
  29. package/src/component/tabs/ui/recipe.ts +59 -0
  30. package/src/hooks/createContext.tsx +34 -0
  31. package/src/hooks/useComposedRefs.ts +20 -0
  32. package/src/hooks/useControllableState.ts +87 -0
  33. package/src/hooks/useKeyboardEvent.ts +58 -0
  34. package/src/stories/accordion.stories.tsx +63 -0
  35. package/src/stories/avatar.stories.tsx +33 -0
  36. package/src/stories/button.stories.tsx +53 -0
  37. package/src/stories/chip.stories.tsx +69 -0
  38. package/src/stories/dialog.stories.tsx +134 -0
  39. package/src/stories/select.stories.tsx +35 -0
  40. package/src/stories/slider.stories.tsx +31 -0
  41. package/src/stories/tabs.stories.tsx +63 -0
  42. package/src/test/accordion.test.tsx +66 -0
  43. package/src/test/tabs.test.tsx +30 -0
  44. package/src/types/index.ts +1 -0
  45. package/src/utils/createStyleContext.tsx +108 -0
  46. package/src/utils/defineSafe.ts +46 -0
  47. package/src/utils/getObjectKeys.ts +20 -0
  48. package/src/vite-env.d.ts +1 -0
  49. package/storybook-static/assets/Color-F6OSRLHC-CrKta8Qx.js +1 -0
  50. package/storybook-static/assets/DocsRenderer-CFRXHY34-Crd9Mepd.js +586 -0
  51. package/storybook-static/assets/_commonjsHelpers-Cpj98o6Y.js +1 -0
  52. package/storybook-static/assets/accordion.stories-0Om0AnMm.js +50 -0
  53. package/storybook-static/assets/avatar.stories-DMDsrSks.js +16 -0
  54. package/storybook-static/assets/axe-Dzet_oDA.js +30 -0
  55. package/storybook-static/assets/button.stories-CuVC-3x-.js +40 -0
  56. package/storybook-static/assets/chip.stories-FBIp8XNi.js +48 -0
  57. package/storybook-static/assets/chunk-XP5HYGXS-D5tuasO7.js +1 -0
  58. package/storybook-static/assets/createLucideIcon-DmXe7Z8R.js +21 -0
  59. package/storybook-static/assets/dialog.stories-3WsEvXt4.js +106 -0
  60. package/storybook-static/assets/entry-preview-Bkgdgq1b.js +10 -0
  61. package/storybook-static/assets/entry-preview-docs-zLz1Es7d.js +46 -0
  62. package/storybook-static/assets/iframe-LPPPXabV.js +199 -0
  63. package/storybook-static/assets/index-Bklpsb39.js +1 -0
  64. package/storybook-static/assets/index-BrlJLjep.js +24 -0
  65. package/storybook-static/assets/index-C2tRLqin.js +41 -0
  66. package/storybook-static/assets/index-CBft-ReK.js +8 -0
  67. package/storybook-static/assets/index-CSbWd7UJ.js +1 -0
  68. package/storybook-static/assets/index-ClcD9ViR.js +9 -0
  69. package/storybook-static/assets/index-Cu4lwwaE.js +1 -0
  70. package/storybook-static/assets/index-Cvkemp2J.js +1 -0
  71. package/storybook-static/assets/index-D59aU5s_.js +240 -0
  72. package/storybook-static/assets/index-DNo8LKN3.js +1 -0
  73. package/storybook-static/assets/index-DUy19JZU.js +1 -0
  74. package/storybook-static/assets/index-D_35mznO.js +1 -0
  75. package/storybook-static/assets/index-DrFu-skq.js +6 -0
  76. package/storybook-static/assets/index-DvbTp2M2.js +1 -0
  77. package/storybook-static/assets/index-rtmQni2k.js +1 -0
  78. package/storybook-static/assets/jsx-runtime-BYYWji4R.js +9 -0
  79. package/storybook-static/assets/matchers-57EZJSQE-oeXCqs4p.js +14 -0
  80. package/storybook-static/assets/preview-1l6V4UsQ.js +1 -0
  81. package/storybook-static/assets/preview-B3PTUHS7.js +1 -0
  82. package/storybook-static/assets/preview-BBWR9nbA.js +1 -0
  83. package/storybook-static/assets/preview-BCV5r-Ja.js +1 -0
  84. package/storybook-static/assets/preview-BWzBA1C2.js +396 -0
  85. package/storybook-static/assets/preview-Bb56VplF.js +2 -0
  86. package/storybook-static/assets/preview-Bl8rsKRy.js +1 -0
  87. package/storybook-static/assets/preview-Bm-a94Ct.js +2 -0
  88. package/storybook-static/assets/preview-Br-h4d84.js +1 -0
  89. package/storybook-static/assets/preview-D77C14du.js +34 -0
  90. package/storybook-static/assets/preview-DC8N7cZb.css +1 -0
  91. package/storybook-static/assets/preview-DGUiP6tS.js +7 -0
  92. package/storybook-static/assets/react-18-BPs3tMGP.js +1 -0
  93. package/storybook-static/assets/select.stories-AN8Hb81Z.js +20 -0
  94. package/storybook-static/assets/slider.stories-CxOczq0y.js +12 -0
  95. package/storybook-static/assets/tabs.stories-BbTU4QU3.js +28 -0
  96. package/storybook-static/favicon.svg +1 -0
  97. package/storybook-static/iframe.html +666 -0
  98. package/storybook-static/index.html +193 -0
  99. package/storybook-static/index.json +1 -0
  100. package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
  101. package/storybook-static/nunito-sans-bold.woff2 +0 -0
  102. package/storybook-static/nunito-sans-italic.woff2 +0 -0
  103. package/storybook-static/nunito-sans-regular.woff2 +0 -0
  104. package/storybook-static/project.json +1 -0
  105. package/storybook-static/sb-addons/a11y-12/manager-bundle.js +3 -0
  106. package/storybook-static/sb-addons/a11y-12/manager-bundle.js.LEGAL.txt +0 -0
  107. package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js +331 -0
  108. package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js.LEGAL.txt +51 -0
  109. package/storybook-static/sb-addons/controls-11/manager-bundle.js +391 -0
  110. package/storybook-static/sb-addons/controls-11/manager-bundle.js.LEGAL.txt +0 -0
  111. package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js +3 -0
  112. package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js.LEGAL.txt +0 -0
  113. package/storybook-static/sb-addons/essentials-backgrounds-5/manager-bundle.js +12 -0
  114. package/storybook-static/sb-addons/essentials-backgrounds-5/manager-bundle.js.LEGAL.txt +0 -0
  115. package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +391 -0
  116. package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js.LEGAL.txt +0 -0
  117. package/storybook-static/sb-addons/essentials-docs-4/manager-bundle.js +230 -0
  118. package/storybook-static/sb-addons/essentials-docs-4/manager-bundle.js.LEGAL.txt +0 -0
  119. package/storybook-static/sb-addons/essentials-measure-8/manager-bundle.js +3 -0
  120. package/storybook-static/sb-addons/essentials-measure-8/manager-bundle.js.LEGAL.txt +0 -0
  121. package/storybook-static/sb-addons/essentials-outline-9/manager-bundle.js +3 -0
  122. package/storybook-static/sb-addons/essentials-outline-9/manager-bundle.js.LEGAL.txt +0 -0
  123. package/storybook-static/sb-addons/essentials-toolbars-7/manager-bundle.js +3 -0
  124. package/storybook-static/sb-addons/essentials-toolbars-7/manager-bundle.js.LEGAL.txt +0 -0
  125. package/storybook-static/sb-addons/essentials-viewport-6/manager-bundle.js +3 -0
  126. package/storybook-static/sb-addons/essentials-viewport-6/manager-bundle.js.LEGAL.txt +0 -0
  127. package/storybook-static/sb-addons/links-1/manager-bundle.js +3 -0
  128. package/storybook-static/sb-addons/links-1/manager-bundle.js.LEGAL.txt +0 -0
  129. package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +3 -0
  130. package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js.LEGAL.txt +0 -0
  131. package/storybook-static/sb-addons/storybook-experimental-addon-test-13/manager-bundle.js +211 -0
  132. package/storybook-static/sb-addons/storybook-experimental-addon-test-13/manager-bundle.js.LEGAL.txt +0 -0
  133. package/storybook-static/sb-common-assets/favicon.svg +1 -0
  134. package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  135. package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  136. package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  137. package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  138. package/storybook-static/sb-manager/globals-module-info.js +1037 -0
  139. package/storybook-static/sb-manager/globals-runtime.js +40857 -0
  140. package/storybook-static/sb-manager/globals.js +48 -0
  141. package/storybook-static/sb-manager/runtime.js +11963 -0
  142. package/styled-system/css/conditions.mjs +36 -0
  143. package/styled-system/css/css.d.ts +22 -0
  144. package/styled-system/css/css.mjs +45 -0
  145. package/styled-system/css/cva.d.ts +6 -0
  146. package/styled-system/css/cva.mjs +87 -0
  147. package/styled-system/css/cx.d.ts +5 -0
  148. package/styled-system/css/cx.mjs +15 -0
  149. package/styled-system/css/index.d.ts +5 -0
  150. package/styled-system/css/index.mjs +4 -0
  151. package/styled-system/css/sva.d.ts +4 -0
  152. package/styled-system/css/sva.mjs +41 -0
  153. package/styled-system/helpers.mjs +336 -0
  154. package/styled-system/jsx/aspect-ratio.d.ts +10 -0
  155. package/styled-system/jsx/aspect-ratio.mjs +14 -0
  156. package/styled-system/jsx/bleed.d.ts +10 -0
  157. package/styled-system/jsx/bleed.mjs +14 -0
  158. package/styled-system/jsx/box.d.ts +10 -0
  159. package/styled-system/jsx/box.mjs +14 -0
  160. package/styled-system/jsx/center.d.ts +10 -0
  161. package/styled-system/jsx/center.mjs +14 -0
  162. package/styled-system/jsx/circle.d.ts +10 -0
  163. package/styled-system/jsx/circle.mjs +14 -0
  164. package/styled-system/jsx/container.d.ts +10 -0
  165. package/styled-system/jsx/container.mjs +14 -0
  166. package/styled-system/jsx/cq.d.ts +10 -0
  167. package/styled-system/jsx/cq.mjs +14 -0
  168. package/styled-system/jsx/divider.d.ts +10 -0
  169. package/styled-system/jsx/divider.mjs +14 -0
  170. package/styled-system/jsx/factory-helper.mjs +22 -0
  171. package/styled-system/jsx/factory.d.ts +3 -0
  172. package/styled-system/jsx/factory.mjs +80 -0
  173. package/styled-system/jsx/flex.d.ts +10 -0
  174. package/styled-system/jsx/flex.mjs +14 -0
  175. package/styled-system/jsx/float.d.ts +10 -0
  176. package/styled-system/jsx/float.mjs +14 -0
  177. package/styled-system/jsx/grid-item.d.ts +10 -0
  178. package/styled-system/jsx/grid-item.mjs +14 -0
  179. package/styled-system/jsx/grid.d.ts +10 -0
  180. package/styled-system/jsx/grid.mjs +14 -0
  181. package/styled-system/jsx/hstack.d.ts +10 -0
  182. package/styled-system/jsx/hstack.mjs +14 -0
  183. package/styled-system/jsx/index.d.ts +24 -0
  184. package/styled-system/jsx/index.mjs +22 -0
  185. package/styled-system/jsx/is-valid-prop.d.ts +11 -0
  186. package/styled-system/jsx/is-valid-prop.mjs +17 -0
  187. package/styled-system/jsx/link-overlay.d.ts +10 -0
  188. package/styled-system/jsx/link-overlay.mjs +14 -0
  189. package/styled-system/jsx/spacer.d.ts +10 -0
  190. package/styled-system/jsx/spacer.mjs +14 -0
  191. package/styled-system/jsx/square.d.ts +10 -0
  192. package/styled-system/jsx/square.mjs +14 -0
  193. package/styled-system/jsx/stack.d.ts +10 -0
  194. package/styled-system/jsx/stack.mjs +14 -0
  195. package/styled-system/jsx/visually-hidden.d.ts +10 -0
  196. package/styled-system/jsx/visually-hidden.mjs +14 -0
  197. package/styled-system/jsx/vstack.d.ts +10 -0
  198. package/styled-system/jsx/vstack.mjs +14 -0
  199. package/styled-system/jsx/wrap.d.ts +10 -0
  200. package/styled-system/jsx/wrap.mjs +14 -0
  201. package/styled-system/patterns/aspect-ratio.d.ts +21 -0
  202. package/styled-system/patterns/aspect-ratio.mjs +38 -0
  203. package/styled-system/patterns/bleed.d.ts +22 -0
  204. package/styled-system/patterns/bleed.mjs +24 -0
  205. package/styled-system/patterns/box.d.ts +21 -0
  206. package/styled-system/patterns/box.mjs +15 -0
  207. package/styled-system/patterns/center.d.ts +21 -0
  208. package/styled-system/patterns/center.mjs +21 -0
  209. package/styled-system/patterns/circle.d.ts +21 -0
  210. package/styled-system/patterns/circle.mjs +25 -0
  211. package/styled-system/patterns/container.d.ts +21 -0
  212. package/styled-system/patterns/container.mjs +21 -0
  213. package/styled-system/patterns/cq.d.ts +22 -0
  214. package/styled-system/patterns/cq.mjs +21 -0
  215. package/styled-system/patterns/divider.d.ts +23 -0
  216. package/styled-system/patterns/divider.mjs +25 -0
  217. package/styled-system/patterns/flex.d.ts +27 -0
  218. package/styled-system/patterns/flex.mjs +26 -0
  219. package/styled-system/patterns/float.d.ts +24 -0
  220. package/styled-system/patterns/float.mjs +52 -0
  221. package/styled-system/patterns/grid-item.d.ts +26 -0
  222. package/styled-system/patterns/grid-item.mjs +25 -0
  223. package/styled-system/patterns/grid.d.ts +25 -0
  224. package/styled-system/patterns/grid.mjs +27 -0
  225. package/styled-system/patterns/hstack.d.ts +22 -0
  226. package/styled-system/patterns/hstack.mjs +24 -0
  227. package/styled-system/patterns/index.d.ts +21 -0
  228. package/styled-system/patterns/index.mjs +20 -0
  229. package/styled-system/patterns/link-overlay.d.ts +21 -0
  230. package/styled-system/patterns/link-overlay.mjs +24 -0
  231. package/styled-system/patterns/spacer.d.ts +21 -0
  232. package/styled-system/patterns/spacer.mjs +21 -0
  233. package/styled-system/patterns/square.d.ts +21 -0
  234. package/styled-system/patterns/square.mjs +24 -0
  235. package/styled-system/patterns/stack.d.ts +24 -0
  236. package/styled-system/patterns/stack.mjs +24 -0
  237. package/styled-system/patterns/visually-hidden.d.ts +21 -0
  238. package/styled-system/patterns/visually-hidden.mjs +18 -0
  239. package/styled-system/patterns/vstack.d.ts +22 -0
  240. package/styled-system/patterns/vstack.mjs +24 -0
  241. package/styled-system/patterns/wrap.d.ts +25 -0
  242. package/styled-system/patterns/wrap.mjs +25 -0
  243. package/styled-system/tokens/index.d.ts +9 -0
  244. package/styled-system/tokens/index.mjs +1992 -0
  245. package/styled-system/tokens/tokens.d.ts +60 -0
  246. package/styled-system/types/composition.d.ts +164 -0
  247. package/styled-system/types/conditions.d.ts +274 -0
  248. package/styled-system/types/csstype.d.ts +21298 -0
  249. package/styled-system/types/global.d.ts +20 -0
  250. package/styled-system/types/index.d.ts +8 -0
  251. package/styled-system/types/jsx.d.ts +52 -0
  252. package/styled-system/types/parts.d.ts +8 -0
  253. package/styled-system/types/pattern.d.ts +78 -0
  254. package/styled-system/types/prop-type.d.ts +235 -0
  255. package/styled-system/types/recipe.d.ts +181 -0
  256. package/styled-system/types/selectors.d.ts +59 -0
  257. package/styled-system/types/static-css.d.ts +56 -0
  258. package/styled-system/types/style-props.d.ts +7468 -0
  259. package/styled-system/types/system-types.d.ts +109 -0
  260. package/tsconfig.json +13 -0
  261. package/turbo/generators/config.cjs +7 -0
  262. package/turbo/generators/stories.cjs +23 -0
  263. package/turbo/generators/templates/stories.tsx.hbs +16 -0
  264. package/turbo/generators/templates/ui.tsx.hbs +8 -0
  265. package/turbo/generators/ui.cjs +19 -0
  266. package/vite.config.ts +7 -0
  267. package/vitest.config.ts +45 -0
@@ -0,0 +1 @@
1
+ @layer reset, base, tokens, recipes, utilities;
@@ -0,0 +1,40 @@
1
+ import { dirname, join } from "path"
2
+ import type { StorybookConfig } from "@storybook/react-vite"
3
+ import { mergeConfig } from "vite"
4
+ import tsconfigPaths from "vite-tsconfig-paths"
5
+
6
+ const config: StorybookConfig = {
7
+ stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
8
+ addons: [
9
+ getAbsolutePath("@storybook/addon-links"),
10
+ getAbsolutePath("@storybook/addon-essentials"),
11
+ getAbsolutePath("@chromatic-com/storybook"),
12
+ getAbsolutePath("@storybook/addon-controls"),
13
+ getAbsolutePath("@storybook/addon-a11y"),
14
+ getAbsolutePath("@storybook/experimental-addon-test"),
15
+ ],
16
+ framework: {
17
+ name: getAbsolutePath("@storybook/react-vite"),
18
+ options: {},
19
+ },
20
+ typescript: {
21
+ reactDocgen: "react-docgen-typescript",
22
+ reactDocgenTypescriptOptions: {
23
+ shouldExtractLiteralValuesFromEnum: true,
24
+ // 👇 Default prop filter, which excludes props from node_modules
25
+ shouldRemoveUndefinedFromOptional: true,
26
+ propFilter: (prop) =>
27
+ prop.parent ? !/node_modules/.test(prop.parent.fileName) : true,
28
+ },
29
+ },
30
+ async viteFinal(config) {
31
+ return mergeConfig(config, {
32
+ plugins: [tsconfigPaths({ root: "./" })],
33
+ })
34
+ },
35
+ }
36
+ export default config
37
+
38
+ function getAbsolutePath(value: string): any {
39
+ return dirname(require.resolve(join(value, "package.json")))
40
+ }
@@ -0,0 +1,16 @@
1
+ import type { Preview } from "@storybook/react"
2
+ import "./index.css"
3
+
4
+ const preview: Preview = {
5
+ parameters: {
6
+ controls: {
7
+ matchers: {
8
+ color: /(background|color)$/i,
9
+ date: /Date$/i,
10
+ },
11
+ },
12
+ layout: "centered",
13
+ },
14
+ }
15
+
16
+ export default preview
@@ -0,0 +1,9 @@
1
+ import { beforeAll } from "vitest"
2
+ import { setProjectAnnotations } from "@storybook/react"
3
+ import * as projectAnnotations from "./preview"
4
+
5
+ // This is an important step to apply the right configuration when testing your stories.
6
+ // More info at: https://storybook.js.org/docs/api/portable-stories/portable-stories-vitest#setprojectannotations
7
+ const project = setProjectAnnotations([projectAnnotations])
8
+
9
+ beforeAll(project.beforeAll)
@@ -0,0 +1,79 @@
1
+
2
+ > @jongh/ui@1.6.5 build /home/runner/work/j-design-system/j-design-system/packages/ui
3
+ > storybook build
4
+
5
+ @storybook/core v8.5.6
6
+ 
7
+ info => Cleaning outputDir: storybook-static
8
+ The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
9
+ info => Loading presets
10
+ info => Building manager..
11
+ WARN unable to find package.json for radix-ui
12
+ info => Manager built (242 ms)
13
+ info => Building preview..
14
+ WARN No story files found for the specified pattern: src/**/*.mdx
15
+ info Using tsconfig paths for react-docgen
16
+ vite v5.4.14 building for production...
17
+ transforming...
18
+ 🐼 info [hrtime] Extracted in (88.18ms)
19
+ ../../node_modules/.pnpm/@storybook+core@8.5.6_prettier@3.5.2/node_modules/@storybook/core/dist/preview/runtime.js (3212:15): Use of eval in "../../node_modules/.pnpm/@storybook+core@8.5.6_prettier@3.5.2/node_modules/@storybook/core/dist/preview/runtime.js" is strongly discouraged as it poses security risks and may cause issues with minification.
20
+ ../../node_modules/.pnpm/@storybook+core@8.5.6_prettier@3.5.2/node_modules/@storybook/core/dist/preview/runtime.js (3214:16): Use of eval in "../../node_modules/.pnpm/@storybook+core@8.5.6_prettier@3.5.2/node_modules/@storybook/core/dist/preview/runtime.js" is strongly discouraged as it poses security risks and may cause issues with minification.
21
+ ✓ 1839 modules transformed.
22
+ rendering chunks...
23
+ computing gzip size...
24
+ storybook-static/iframe.html  17.75 kB │ gzip: 5.00 kB
25
+ storybook-static/assets/preview-DC8N7cZb.css  44.77 kB │ gzip: 9.65 kB
26
+ storybook-static/assets/preview-BCV5r-Ja.js  0.13 kB │ gzip: 0.13 kB
27
+ storybook-static/assets/preview-Bl8rsKRy.js  0.17 kB │ gzip: 0.16 kB
28
+ storybook-static/assets/preview-Br-h4d84.js  0.17 kB │ gzip: 0.15 kB
29
+ storybook-static/assets/index-DNo8LKN3.js  0.23 kB │ gzip: 0.21 kB
30
+ storybook-static/assets/_commonjsHelpers-Cpj98o6Y.js  0.24 kB │ gzip: 0.18 kB
31
+ storybook-static/assets/index-DUy19JZU.js  0.46 kB │ gzip: 0.30 kB
32
+ storybook-static/assets/index-Cvkemp2J.js  0.63 kB │ gzip: 0.40 kB
33
+ storybook-static/assets/preview-B3PTUHS7.js  0.64 kB │ gzip: 0.44 kB
34
+ storybook-static/assets/preview-DGUiP6tS.js  0.71 kB │ gzip: 0.50 kB
35
+ storybook-static/assets/chunk-XP5HYGXS-D5tuasO7.js  0.72 kB │ gzip: 0.40 kB
36
+ storybook-static/assets/index-DrFu-skq.js  0.77 kB │ gzip: 0.47 kB
37
+ storybook-static/assets/index-rtmQni2k.js  0.79 kB │ gzip: 0.45 kB
38
+ storybook-static/assets/preview-Bm-a94Ct.js  0.84 kB │ gzip: 0.54 kB
39
+ storybook-static/assets/react-18-BPs3tMGP.js  0.84 kB │ gzip: 0.49 kB
40
+ storybook-static/assets/jsx-runtime-BYYWji4R.js  0.92 kB │ gzip: 0.58 kB
41
+ storybook-static/assets/index-Bklpsb39.js  1.36 kB │ gzip: 0.67 kB
42
+ storybook-static/assets/createLucideIcon-DmXe7Z8R.js  1.58 kB │ gzip: 0.66 kB
43
+ storybook-static/assets/preview-Bb56VplF.js  2.12 kB │ gzip: 1.17 kB
44
+ storybook-static/assets/index-CSbWd7UJ.js  2.15 kB │ gzip: 0.94 kB
45
+ storybook-static/assets/index-Cu4lwwaE.js  2.58 kB │ gzip: 1.26 kB
46
+ storybook-static/assets/index-D_35mznO.js  2.83 kB │ gzip: 1.29 kB
47
+ storybook-static/assets/preview-1l6V4UsQ.js  3.50 kB │ gzip: 1.69 kB
48
+ storybook-static/assets/avatar.stories-DMDsrSks.js  3.85 kB │ gzip: 1.53 kB
49
+ storybook-static/assets/button.stories-CuVC-3x-.js  4.09 kB │ gzip: 1.43 kB
50
+ storybook-static/assets/chip.stories-FBIp8XNi.js  4.82 kB │ gzip: 1.84 kB
51
+ storybook-static/assets/preview-D77C14du.js  5.03 kB │ gzip: 1.86 kB
52
+ storybook-static/assets/index-ClcD9ViR.js  7.18 kB │ gzip: 2.92 kB
53
+ storybook-static/assets/preview-BWzBA1C2.js  7.62 kB │ gzip: 1.56 kB
54
+ storybook-static/assets/preview-BBWR9nbA.js  8.12 kB │ gzip: 3.10 kB
55
+ storybook-static/assets/tabs.stories-BbTU4QU3.js  9.68 kB │ gzip: 3.44 kB
56
+ storybook-static/assets/slider.stories-CxOczq0y.js  10.35 kB │ gzip: 3.97 kB
57
+ storybook-static/assets/accordion.stories-0Om0AnMm.js  10.82 kB │ gzip: 3.56 kB
58
+ storybook-static/assets/index-DvbTp2M2.js  17.33 kB │ gzip: 6.88 kB
59
+ storybook-static/assets/index-C2tRLqin.js  20.57 kB │ gzip: 7.38 kB
60
+ storybook-static/assets/Color-F6OSRLHC-CrKta8Qx.js  29.40 kB │ gzip: 11.08 kB
61
+ storybook-static/assets/matchers-57EZJSQE-oeXCqs4p.js  29.72 kB │ gzip: 10.28 kB
62
+ storybook-static/assets/entry-preview-Bkgdgq1b.js  41.76 kB │ gzip: 14.06 kB
63
+ storybook-static/assets/dialog.stories-3WsEvXt4.js  44.57 kB │ gzip: 11.86 kB
64
+ storybook-static/assets/select.stories-AN8Hb81Z.js  50.87 kB │ gzip: 17.65 kB
65
+ storybook-static/assets/index-CBft-ReK.js  53.73 kB │ gzip: 15.56 kB
66
+ storybook-static/assets/index-BrlJLjep.js 134.00 kB │ gzip: 43.17 kB
67
+ storybook-static/assets/iframe-LPPPXabV.js 193.17 kB │ gzip: 66.90 kB
68
+ storybook-static/assets/entry-preview-docs-zLz1Es7d.js 244.61 kB │ gzip: 73.41 kB
69
+ 
70
+ (!) Some chunks are larger than 500 kB after minification. Consider:
71
+ storybook-static/assets/axe-Dzet_oDA.js 572.30 kB │ gzip: 157.93 kB
72
+ storybook-static/assets/index-D59aU5s_.js 661.29 kB │ gzip: 156.45 kB
73
+ storybook-static/assets/DocsRenderer-CFRXHY34-Crd9Mepd.js 868.48 kB │ gzip: 272.24 kB
74
+ ✓ built in 13.18s
75
+ - Using dynamic import() to code-split the application
76
+ info => Preview built (16 s)
77
+ - Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
78
+ info => Output directory: /home/runner/work/j-design-system/j-design-system/packages/ui/storybook-static
79
+ - Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
package/CHANGELOG.md ADDED
@@ -0,0 +1,54 @@
1
+ # @jongh/ui
2
+
3
+ ## 1.6.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [2b064ae]
8
+ - panda-animation@0.1.0
9
+
10
+ ## 1.6.4
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [7b2feec]
15
+ - panda-animation@0.0.2
16
+
17
+ ## 1.6.3
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies [412a4ca]
22
+ - @jongh/panda-preset@1.4.0
23
+
24
+ ## 1.6.2
25
+
26
+ ### Patch Changes
27
+
28
+ - Updated dependencies [cb4aefa]
29
+ - @jongh/panda-preset@1.3.0
30
+
31
+ ## 1.6.1
32
+
33
+ ### Patch Changes
34
+
35
+ - Updated dependencies [fc499b8]
36
+ - @jongh/panda-preset@1.2.0
37
+
38
+ ## 1.6.0
39
+
40
+ ### Minor Changes
41
+
42
+ - a27c196: add fadeIn keyframes in preset
43
+
44
+ ### Patch Changes
45
+
46
+ - Updated dependencies [a27c196]
47
+ - @jongh/panda-preset@1.1.0
48
+
49
+ ## 1.5.22
50
+
51
+ ### Patch Changes
52
+
53
+ - Updated dependencies
54
+ - @jongh/panda-preset@1.0.0
@@ -0,0 +1,6 @@
1
+ {
2
+ "onlyChanged": true,
3
+ "projectId": "Project:6683c8acf34b923f7227be4a",
4
+ "storybookBaseDir": "packages/ui",
5
+ "zip": true
6
+ }
@@ -0,0 +1,14 @@
1
+ import { config } from "@jongh/eslint/react-internal"
2
+
3
+ /** @type {import("eslint").Linter.Config} */
4
+ export default [
5
+ ...config,
6
+ {
7
+ rules: {
8
+ "react/display-name": "off",
9
+ },
10
+ },
11
+ {
12
+ ignores: ["styled-system/*", ".storybook/*", "postcss.config.*"],
13
+ },
14
+ ]
package/index.html ADDED
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Vite + React + TS</title>
8
+ </head>
9
+ <body>
10
+ <div id="root"></div>
11
+ <script type="module" src="/src/main.tsx"></script>
12
+ </body>
13
+ </html>
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@jongh/ui",
3
+ "version": "1.6.5",
4
+ "description": "Headless UI components for React",
5
+ "type": "module",
6
+ "dependencies": {
7
+ "@floating-ui/react-dom": "^2.1.2",
8
+ "@vitejs/plugin-react": "^4.3.1",
9
+ "framer-motion": "^11.3.19",
10
+ "lucide-react": "^0.475.0",
11
+ "radix-ui": "^1.1.2",
12
+ "react": "^18.2.0",
13
+ "react-dom": "^18.2.0",
14
+ "panda-animation": "0.1.0"
15
+ },
16
+ "devDependencies": {
17
+ "@chromatic-com/storybook": "^3.2.4",
18
+ "@pandacss/studio": "^0.46.0",
19
+ "@storybook/addon-a11y": "^8.5.3",
20
+ "@storybook/addon-controls": "^8.5.3",
21
+ "@storybook/addon-docs": "^8.5.3",
22
+ "@storybook/addon-essentials": "^8.5.3",
23
+ "@storybook/addon-links": "^8.5.3",
24
+ "@storybook/addon-onboarding": "^8.5.3",
25
+ "@storybook/addon-themes": "^8.5.3",
26
+ "@storybook/blocks": "^8.5.3",
27
+ "@storybook/experimental-addon-test": "^8.5.3",
28
+ "@storybook/preview-api": "^8.5.3",
29
+ "@storybook/react": "^8.5.3",
30
+ "@storybook/react-vite": "^8.5.3",
31
+ "@storybook/test": "^8.5.3",
32
+ "@testing-library/react": "^16.0.1",
33
+ "@testing-library/user-event": "^14.5.2",
34
+ "@types/react": "^18.3.3",
35
+ "@types/react-dom": "^18.3.0",
36
+ "axe-playwright": "^2.0.1",
37
+ "chromatic": "^11.5.4",
38
+ "playwright": "^1.48.2",
39
+ "storybook": "^8.5.3",
40
+ "vite": "^5.4.10",
41
+ "vite-bundle-visualizer": "^1.2.1",
42
+ "vite-plugin-dts": "^3.9.1",
43
+ "vite-tsconfig-paths": "^5.1.4",
44
+ "@jongh/eslint": "0.0.0",
45
+ "@jongh/tsconfig": "0.0.0"
46
+ },
47
+ "keywords": [],
48
+ "author": "",
49
+ "license": "ISC",
50
+ "scripts": {
51
+ "lint": "eslint --max-warnings 0 --no-warn-ignored --fix",
52
+ "test": "vitest run",
53
+ "test-storybook": "vitest",
54
+ "storybook": "storybook dev -p 6006",
55
+ "build": "storybook build",
56
+ "check-type": "tsc --noEmit"
57
+ }
58
+ }
@@ -0,0 +1,13 @@
1
+ import { defineConfig } from "@pandacss/dev"
2
+ import { preset } from "panda-animation"
3
+
4
+ import { defaultPreset } from "./preset"
5
+ export default defineConfig({
6
+ preflight: true,
7
+ presets: [preset(), "@pandacss/preset-panda", defaultPreset],
8
+ jsxFramework: "react",
9
+ include: ["./src/**/*.{js,jsx,ts,tsx}", "./src/stories/*.{js,jsx,ts,tsx}"],
10
+ outdir: "styled-system",
11
+ strictPropertyValues: true,
12
+ strictTokens: true,
13
+ })
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ plugins: [require("@pandacss/dev/postcss")()],
3
+ }
package/preset.ts ADDED
@@ -0,0 +1,134 @@
1
+ import {
2
+ defineGlobalStyles,
3
+ definePreset,
4
+ defineSemanticTokens,
5
+ defineTokens,
6
+ } from "@pandacss/dev"
7
+
8
+ const globalCss = defineGlobalStyles({
9
+ "html, body": {
10
+ w: "full",
11
+ h: "full",
12
+ },
13
+ })
14
+
15
+ const radii = defineTokens.radii({
16
+ radius: { value: "0.5rem" },
17
+ })
18
+
19
+ export const semanticColors = defineSemanticTokens.colors({
20
+ background: {
21
+ value: { base: "hsl(0 0% 100%)", _dark: "hsl(222.2 84% 4.9%)" },
22
+ },
23
+ foreground: {
24
+ value: { base: "hsl(222.2 84% 4.9%)", _dark: "hsl(210 40% 98%)" },
25
+ },
26
+ card: {
27
+ DEFAULT: {
28
+ value: { base: "hsl(0 0% 100%)", _dark: "hsl(222.2 84% 4.9%)" },
29
+ },
30
+ foreground: {
31
+ value: { base: "hsl(222.2 84% 4.9%)", _dark: "hsl(210 40% 98%)" },
32
+ },
33
+ },
34
+ popover: {
35
+ DEFAULT: {
36
+ value: { base: "hsl(0 0% 100%)", _dark: "hsl(222.2 84% 4.9%)" },
37
+ },
38
+ foreground: {
39
+ value: { base: "hsl(222.2 84% 4.9%)", _dark: "hsl(210 40% 98%)" },
40
+ },
41
+ },
42
+ primary: {
43
+ DEFAULT: {
44
+ value: { base: "hsl(222.2 47.4% 11.2%)", _dark: "hsl(210 40% 98%)" },
45
+ },
46
+ foreground: {
47
+ value: { base: "hsl(210 40% 98%)", _dark: "hsl(222.2 47.4% 11.2%)" },
48
+ },
49
+ },
50
+ secondary: {
51
+ DEFAULT: {
52
+ value: { base: "hsl(210 40% 96.1%)", _dark: "hsl(217.2 32.6% 17.5%)" },
53
+ },
54
+ foreground: {
55
+ value: { base: "hsl(222.2 47.4% 11.2%)", _dark: "hsl(210 40% 98%)" },
56
+ },
57
+ },
58
+ muted: {
59
+ DEFAULT: {
60
+ value: { base: "hsl(210 40% 96.1%)", _dark: "hsl(217.2 32.6% 17.5%)" },
61
+ },
62
+ foreground: {
63
+ value: {
64
+ base: "hsl(215.4 16.3% 46.9%)",
65
+ _dark: "hsl(215 20.2% 65.1%)",
66
+ },
67
+ },
68
+ },
69
+ accent: {
70
+ DEFAULT: {
71
+ value: { base: "hsl(210 40% 96.1%)", _dark: "hsl(217.2 32.6% 17.5%)" },
72
+ },
73
+ foreground: {
74
+ value: { base: "hsl(222.2 47.4% 11.2%)", _dark: "hsl(210 40% 98%)" },
75
+ },
76
+ },
77
+ destructive: {
78
+ DEFAULT: {
79
+ value: { base: "hsl(0 84.2% 60.2%)", _dark: "hsl(0 62.8% 30.6%)" },
80
+ },
81
+ foreground: {
82
+ value: { base: "hsl(210 40% 98%)", _dark: "hsl(210 40% 98%)" },
83
+ },
84
+ },
85
+ border: {
86
+ value: {
87
+ base: "hsl(214.3 31.8% 91.4%)",
88
+ _dark: "hsl(217.2 32.6% 17.5%)",
89
+ },
90
+ },
91
+ input: {
92
+ value: {
93
+ base: "hsl(214.3 31.8% 91.4%)",
94
+ _dark: "hsl(217.2 32.6% 17.5%)",
95
+ },
96
+ },
97
+ ring: {
98
+ value: { base: "hsl(222.2 84% 4.9%)", _dark: "hsl(212.7 26.8% 83.9%)" },
99
+ },
100
+ })
101
+
102
+ const borders = defineSemanticTokens.borders({
103
+ base: { value: "1px solid {colors.border}" },
104
+ input: { value: "1px solid {colors.input}" },
105
+ primary: { value: "1px solid {colors.primary}" },
106
+ destructive: { value: "1px solid {colors.destructive}" },
107
+ })
108
+
109
+ export const radius = defineSemanticTokens.radii({
110
+ xl: { value: `calc({radii.radius} + 4px)` },
111
+ lg: { value: `{radii.radius}` },
112
+ md: { value: `calc({radii.radius} - 2px)` },
113
+ sm: { value: "calc({radii.radius} - 4px)" },
114
+ })
115
+
116
+ export const defaultPreset = definePreset({
117
+ name: "default",
118
+ globalCss,
119
+ theme: {
120
+ extend: {
121
+ tokens: {
122
+ radii,
123
+ },
124
+ semanticTokens: {
125
+ colors: semanticColors,
126
+ radii: radius,
127
+ borders: borders,
128
+ },
129
+ },
130
+ },
131
+ staticCss: {
132
+ recipes: "*",
133
+ },
134
+ })
@@ -0,0 +1,80 @@
1
+ import { css, cx } from "@styled-system/css"
2
+ import { Accordion as AccordionPrimitive } from "radix-ui"
3
+ import { type ComponentPropsWithoutRef, ElementRef, forwardRef } from "react"
4
+
5
+ import { recipe } from "./recipe"
6
+
7
+ export const Root = forwardRef<
8
+ ElementRef<typeof AccordionPrimitive.Root>,
9
+ ComponentPropsWithoutRef<typeof AccordionPrimitive.Root>
10
+ >(({ className, ...props }, ref) => {
11
+ const styles = recipe.raw()
12
+
13
+ return (
14
+ <AccordionPrimitive.Root
15
+ ref={ref}
16
+ className={cx(css(styles.root), className)}
17
+ {...props}
18
+ />
19
+ )
20
+ })
21
+
22
+ export const Header = forwardRef<
23
+ ElementRef<typeof AccordionPrimitive.Header>,
24
+ ComponentPropsWithoutRef<typeof AccordionPrimitive.Header>
25
+ >(({ className, ...props }, ref) => {
26
+ const styles = recipe.raw()
27
+
28
+ return (
29
+ <AccordionPrimitive.Header
30
+ ref={ref}
31
+ className={cx(css(styles.header), className)}
32
+ {...props}
33
+ />
34
+ )
35
+ })
36
+
37
+ export const Item = forwardRef<
38
+ ElementRef<typeof AccordionPrimitive.Item>,
39
+ ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
40
+ >(({ className, ...props }, ref) => {
41
+ const styles = recipe.raw()
42
+
43
+ return (
44
+ <AccordionPrimitive.Item
45
+ ref={ref}
46
+ className={cx(css(styles.item), className)}
47
+ {...props}
48
+ />
49
+ )
50
+ })
51
+
52
+ export const Trigger = forwardRef<
53
+ ElementRef<typeof AccordionPrimitive.Trigger>,
54
+ ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
55
+ >(({ className, ...props }, ref) => {
56
+ const styles = recipe.raw()
57
+
58
+ return (
59
+ <AccordionPrimitive.Trigger
60
+ ref={ref}
61
+ className={cx(css(styles.trigger), className)}
62
+ {...props}
63
+ />
64
+ )
65
+ })
66
+
67
+ export const Content = forwardRef<
68
+ ElementRef<typeof AccordionPrimitive.Content>,
69
+ ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
70
+ >(({ className, ...props }, ref) => {
71
+ const styles = recipe.raw()
72
+
73
+ return (
74
+ <AccordionPrimitive.Content
75
+ ref={ref}
76
+ className={cx(css(styles.content), className)}
77
+ {...props}
78
+ />
79
+ )
80
+ })
@@ -0,0 +1,65 @@
1
+ import { sva } from "@styled-system/css"
2
+
3
+ export const recipe = sva({
4
+ slots: ["root", "item", "header", "trigger", "content"],
5
+ base: {
6
+ item: {
7
+ borderBottom: "base",
8
+ },
9
+ header: {
10
+ display: "flex",
11
+ },
12
+ trigger: {
13
+ display: "flex",
14
+ flex: "1",
15
+ alignItems: "center",
16
+ justifyContent: "space-between",
17
+ py: "4",
18
+ fontWeight: "medium",
19
+ transition: "all",
20
+ cursor: "pointer",
21
+ _hover: {
22
+ textDecoration: "underline",
23
+ },
24
+
25
+ "& > svg": {
26
+ h: "4",
27
+ w: "4",
28
+ flexShrink: "0",
29
+ transition: "transform",
30
+ transitionDuration: "normal",
31
+ },
32
+
33
+ "&[data-state=open] > svg": {
34
+ transform: "rotate(180deg)",
35
+ },
36
+ },
37
+ content: {
38
+ overflow: "hidden",
39
+ textStyle: "sm",
40
+ transition: "all",
41
+
42
+ "&[data-state=closed]": {
43
+ animationName: "accordion-up_radix",
44
+ animationDuration: "normal",
45
+ },
46
+
47
+ "&[data-state=open]": {
48
+ animationName: "accordion-down_radix",
49
+ animationDuration: "normal",
50
+ },
51
+ },
52
+ },
53
+ variants: {
54
+ variant: {
55
+ sm: {
56
+ trigger: {
57
+ color: "amber.700",
58
+ },
59
+ content: {
60
+ color: "pink.300",
61
+ },
62
+ },
63
+ },
64
+ },
65
+ })
@@ -0,0 +1,47 @@
1
+ import { css, cx } from "@styled-system/css"
2
+ import { Avatar as AvatarPrimitive } from "radix-ui"
3
+ import { type ComponentPropsWithoutRef, ElementRef, forwardRef } from "react"
4
+
5
+ import { recipe } from "./recipe"
6
+
7
+ export const Root = forwardRef<
8
+ ElementRef<typeof AvatarPrimitive.Root>,
9
+ ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
10
+ >(({ className, ...props }, ref) => {
11
+ const styles = recipe.raw()
12
+ return (
13
+ <AvatarPrimitive.Root
14
+ ref={ref}
15
+ className={cx(css(styles.root), className)}
16
+ {...props}
17
+ />
18
+ )
19
+ })
20
+
21
+ export const Image = forwardRef<
22
+ ElementRef<typeof AvatarPrimitive.Image>,
23
+ ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
24
+ >(({ className, ...props }, ref) => {
25
+ const styles = recipe.raw()
26
+ return (
27
+ <AvatarPrimitive.Image
28
+ ref={ref}
29
+ className={cx(css(styles.image), className)}
30
+ {...props}
31
+ />
32
+ )
33
+ })
34
+
35
+ export const Fallback = forwardRef<
36
+ ElementRef<typeof AvatarPrimitive.Fallback>,
37
+ ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
38
+ >(({ className, ...props }, ref) => {
39
+ const styles = recipe.raw()
40
+ return (
41
+ <AvatarPrimitive.Fallback
42
+ ref={ref}
43
+ className={cx(css(styles.fallback), className)}
44
+ {...props}
45
+ />
46
+ )
47
+ })