@kalink-ui/seedly 0.1.1 → 0.2.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 (59) hide show
  1. package/.storybook/main.mts +16 -0
  2. package/.storybook/preview.ts +27 -0
  3. package/.storybook/theme/ref.css.ts +63 -0
  4. package/.storybook/theme/sprinkles.css.ts +40 -0
  5. package/.storybook/theme/theme.css.ts +293 -0
  6. package/.turbo/turbo-lint.log +82 -0
  7. package/.turbo/turbo-tsc.log +227 -0
  8. package/CHANGELOG.md +25 -0
  9. package/dist/utils.types.d.mts +9 -0
  10. package/dist/utils.types.d.ts +9 -0
  11. package/dist/utils.types.js +19 -0
  12. package/dist/utils.types.js.map +1 -0
  13. package/dist/utils.types.mjs +1 -0
  14. package/dist/utils.types.mjs.map +1 -0
  15. package/eslint.config.mts +3 -0
  16. package/package.json +14 -17
  17. package/tsconfig.json +14 -0
  18. package/tsup.config.ts +18 -0
  19. package/turbo/generators/config.ts +35 -0
  20. package/turbo/generators/templates/component.hbs +21 -0
  21. package/turbo/generators/templates/export.hbs +5 -0
  22. package/turbo/generators/templates/style.hbs +3 -0
  23. package/vite.config.mts +9 -0
  24. package/src/components/.DS_Store +0 -0
  25. package/src/components/box/box.stories.tsx +0 -29
  26. package/src/components/button/button.stories.tsx +0 -31
  27. package/src/components/center/.DS_Store +0 -0
  28. package/src/components/center/center.stories.tsx +0 -31
  29. package/src/components/cluster/.DS_Store +0 -0
  30. package/src/components/cluster/cluster.stories.tsx +0 -37
  31. package/src/components/cover/.DS_Store +0 -0
  32. package/src/components/cover/cover.stories.tsx +0 -45
  33. package/src/components/frame/.DS_Store +0 -0
  34. package/src/components/frame/frame.stories.tsx +0 -39
  35. package/src/components/grid/.DS_Store +0 -0
  36. package/src/components/grid/grid.stories.tsx +0 -50
  37. package/src/components/layout.mdx +0 -206
  38. package/src/components/sidebar/.DS_Store +0 -0
  39. package/src/components/sidebar/sidebar.stories.tsx +0 -60
  40. package/src/components/stack/.DS_Store +0 -0
  41. package/src/components/stack/stack.stories.tsx +0 -72
  42. package/src/components/switcher/.DS_Store +0 -0
  43. package/src/components/switcher/switcher.stories.tsx +0 -66
  44. package/src/styles/seed/.DS_Store +0 -0
  45. package/src/styles/seed/seed.stories.tsx +0 -52
  46. package/src/styles/styles.mdx +0 -98
  47. package/src/utils/__tests__/extract-sprinkles-props.test.ts +0 -101
  48. package/src/utils/__tests__/is-object.test.ts +0 -24
  49. package/src/utils/__tests__/map-contract-vars.test.ts +0 -34
  50. package/src/utils/arg-types/.DS_Store +0 -0
  51. package/src/utils/arg-types/arg-types-from-recipe.ts +0 -37
  52. package/src/utils/arg-types/arg-types-from-sprinkles.ts +0 -43
  53. package/src/utils/arg-types/common/composable.ts +0 -13
  54. package/src/utils/arg-types/common/index.ts +0 -4
  55. package/src/utils/arg-types/common/polymorphic.ts +0 -14
  56. package/src/utils/arg-types/common/referable.ts +0 -10
  57. package/src/utils/arg-types/common/stylable.ts +0 -14
  58. package/src/utils/arg-types/common-args.ts +0 -26
  59. package/src/utils/arg-types/index.ts +0 -3
@@ -0,0 +1,227 @@
1
+
2
+ 
3
+ > @kalink/ui@0.0.0 tsc /Users/louis/dev/kalink-ui/packages/ui
4
+ > tsc --noEmit
5
+
6
+ src/components/center/center.stories.tsx:1:37 - error TS2307: Cannot find module '@storybook/react' or its corresponding type declarations.
7
+
8
+ 1 import type { Meta, StoryObj } from "@storybook/react";
9
+    ~~~~~~~~~~~~~~~~~~
10
+
11
+ src/components/center/center.stories.tsx:3:36 - error TS2307: Cannot find module '@/storybook/arg-types/arg-types-from-recipe' or its corresponding type declarations.
12
+
13
+ 3 import { argTypesFromRecipe } from "@/storybook/arg-types/arg-types-from-recipe";
14
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
+
16
+ src/components/center/center.stories.tsx:4:40 - error TS2307: Cannot find module '@/storybook/arg-types/common-args' or its corresponding type declarations.
17
+
18
+ 4 import { CommonArgs, commonArgs } from "@/storybook/arg-types/common-args";
19
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20
+
21
+ src/components/cluster/cluster.stories.tsx:1:37 - error TS2307: Cannot find module '@storybook/react' or its corresponding type declarations.
22
+
23
+ 1 import type { Meta, StoryObj } from "@storybook/react";
24
+    ~~~~~~~~~~~~~~~~~~
25
+
26
+ src/components/cluster/cluster.stories.tsx:3:36 - error TS2307: Cannot find module '@/storybook/arg-types/arg-types-from-recipe' or its corresponding type declarations.
27
+
28
+ 3 import { argTypesFromRecipe } from "@/storybook/arg-types/arg-types-from-recipe";
29
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30
+
31
+ src/components/cluster/cluster.stories.tsx:4:40 - error TS2307: Cannot find module '@/storybook/arg-types/common-args' or its corresponding type declarations.
32
+
33
+ 4 import { CommonArgs, commonArgs } from "@/storybook/arg-types/common-args";
34
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35
+
36
+ src/components/cover/cover.stories.tsx:1:37 - error TS2307: Cannot find module '@storybook/react' or its corresponding type declarations.
37
+
38
+ 1 import type { Meta, StoryObj } from "@storybook/react";
39
+    ~~~~~~~~~~~~~~~~~~
40
+
41
+ src/components/cover/cover.stories.tsx:3:36 - error TS2307: Cannot find module '@/storybook/arg-types/arg-types-from-recipe' or its corresponding type declarations.
42
+
43
+ 3 import { argTypesFromRecipe } from "@/storybook/arg-types/arg-types-from-recipe";
44
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45
+
46
+ src/components/cover/cover.stories.tsx:4:40 - error TS2307: Cannot find module '@/storybook/arg-types/common-args' or its corresponding type declarations.
47
+
48
+ 4 import { CommonArgs, commonArgs } from "@/storybook/arg-types/common-args";
49
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50
+
51
+ src/components/frame/frame.stories.tsx:1:37 - error TS2307: Cannot find module '@storybook/react' or its corresponding type declarations.
52
+
53
+ 1 import type { Meta, StoryObj } from "@storybook/react";
54
+    ~~~~~~~~~~~~~~~~~~
55
+
56
+ src/components/frame/frame.stories.tsx:3:36 - error TS2307: Cannot find module '@/storybook/arg-types/arg-types-from-recipe' or its corresponding type declarations.
57
+
58
+ 3 import { argTypesFromRecipe } from "@/storybook/arg-types/arg-types-from-recipe";
59
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60
+
61
+ src/components/frame/frame.stories.tsx:4:40 - error TS2307: Cannot find module '@/storybook/arg-types/common-args' or its corresponding type declarations.
62
+
63
+ 4 import { CommonArgs, commonArgs } from "@/storybook/arg-types/common-args";
64
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65
+
66
+ src/components/grid/grid.stories.tsx:1:37 - error TS2307: Cannot find module '@storybook/react' or its corresponding type declarations.
67
+
68
+ 1 import type { Meta, StoryObj } from "@storybook/react";
69
+    ~~~~~~~~~~~~~~~~~~
70
+
71
+ src/components/grid/grid.stories.tsx:3:36 - error TS2307: Cannot find module '@/storybook/arg-types/arg-types-from-recipe' or its corresponding type declarations.
72
+
73
+ 3 import { argTypesFromRecipe } from "@/storybook/arg-types/arg-types-from-recipe";
74
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
75
+
76
+ src/components/grid/grid.stories.tsx:4:40 - error TS2307: Cannot find module '@/storybook/arg-types/common-args' or its corresponding type declarations.
77
+
78
+ 4 import { CommonArgs, commonArgs } from "@/storybook/arg-types/common-args";
79
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80
+
81
+ src/components/sidebar/sidebar.stories.tsx:1:37 - error TS2307: Cannot find module '@storybook/react' or its corresponding type declarations.
82
+
83
+ 1 import type { Meta, StoryObj } from "@storybook/react";
84
+    ~~~~~~~~~~~~~~~~~~
85
+
86
+ src/components/sidebar/sidebar.stories.tsx:3:36 - error TS2307: Cannot find module '@/storybook/arg-types/arg-types-from-recipe' or its corresponding type declarations.
87
+
88
+ 3 import { argTypesFromRecipe } from "@/storybook/arg-types/arg-types-from-recipe";
89
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
90
+
91
+ src/components/sidebar/sidebar.stories.tsx:4:40 - error TS2307: Cannot find module '@/storybook/arg-types/common-args' or its corresponding type declarations.
92
+
93
+ 4 import { CommonArgs, commonArgs } from "@/storybook/arg-types/common-args";
94
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
95
+
96
+ src/components/sidebar/sidebar.stories.tsx:45:14 - error TS7031: Binding element 'sideWidth' implicitly has an 'any' type.
97
+
98
+ 45 render: ({ sideWidth, contentMinWidth, ...args }) => (
99
+    ~~~~~~~~~
100
+
101
+ src/components/sidebar/sidebar.stories.tsx:45:25 - error TS7031: Binding element 'contentMinWidth' implicitly has an 'any' type.
102
+
103
+ 45 render: ({ sideWidth, contentMinWidth, ...args }) => (
104
+    ~~~~~~~~~~~~~~~
105
+
106
+ src/components/stack/stack.stories.tsx:1:37 - error TS2307: Cannot find module '@storybook/react' or its corresponding type declarations.
107
+
108
+ 1 import type { Meta, StoryObj } from "@storybook/react";
109
+    ~~~~~~~~~~~~~~~~~~
110
+
111
+ src/components/stack/stack.stories.tsx:3:36 - error TS2307: Cannot find module '@/storybook/arg-types/arg-types-from-recipe' or its corresponding type declarations.
112
+
113
+ 3 import { argTypesFromRecipe } from "@/storybook/arg-types/arg-types-from-recipe";
114
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
115
+
116
+ src/components/stack/stack.stories.tsx:4:40 - error TS2307: Cannot find module '@/storybook/arg-types/common-args' or its corresponding type declarations.
117
+
118
+ 4 import { CommonArgs, commonArgs } from "@/storybook/arg-types/common-args";
119
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
120
+
121
+ src/components/switcher/switcher.stories.tsx:1:37 - error TS2307: Cannot find module '@storybook/react' or its corresponding type declarations.
122
+
123
+ 1 import type { Meta, StoryObj } from "@storybook/react";
124
+    ~~~~~~~~~~~~~~~~~~
125
+
126
+ src/components/switcher/switcher.stories.tsx:4:36 - error TS2307: Cannot find module '@/storybook/arg-types/arg-types-from-recipe' or its corresponding type declarations.
127
+
128
+ 4 import { argTypesFromRecipe } from "@/storybook/arg-types/arg-types-from-recipe";
129
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
130
+
131
+ src/components/switcher/switcher.stories.tsx:5:40 - error TS2307: Cannot find module '@/storybook/arg-types/common-args' or its corresponding type declarations.
132
+
133
+ 5 import { CommonArgs, commonArgs } from "@/storybook/arg-types/common-args";
134
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135
+
136
+ src/components/switcher/switcher.stories.tsx:52:14 - error TS7031: Binding element 'childCount' implicitly has an 'any' type.
137
+
138
+ 52 render: ({ childCount, ...args }) => {
139
+    ~~~~~~~~~~
140
+
141
+ src/styles/seed/seed.stories.tsx:2:39 - error TS2307: Cannot find module '@/storybook/arg-types/arg-types-from-sprinkles' or its corresponding type declarations.
142
+
143
+ 2 import { argTypesFromSprinkles } from '@/storybook/arg-types/arg-types-from-sprinkles';
144
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
145
+
146
+ src/styles/seed/seed.stories.tsx:3:40 - error TS2307: Cannot find module '@/storybook/arg-types/common-args' or its corresponding type declarations.
147
+
148
+ 3 import { CommonArgs, commonArgs } from '@/storybook/arg-types/common-args';
149
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
150
+
151
+ src/styles/seed/seed.stories.tsx:7:8 - error TS2307: Cannot find module '@/storybook/styles/sprinkles-mock.css' or its corresponding type declarations.
152
+
153
+ 7 } from '@/storybook/styles/sprinkles-mock.css';
154
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
155
+
156
+ src/styles/seed/seed.stories.tsx:11:37 - error TS2307: Cannot find module '@storybook/react' or its corresponding type declarations.
157
+
158
+ 11 import type { Meta, StoryObj } from '@storybook/react';
159
+    ~~~~~~~~~~~~~~~~~~
160
+
161
+ src/utils/__tests__/extract-sprinkles-props.test.ts:1:32 - error TS2307: Cannot find module '@std/testing/bdd' or its corresponding type declarations.
162
+
163
+ 1 import { describe, test } from "@std/testing/bdd";
164
+    ~~~~~~~~~~~~~~~~~~
165
+
166
+ src/utils/__tests__/extract-sprinkles-props.test.ts:2:21 - error TS2307: Cannot find module '@std/testing/mock' or its corresponding type declarations.
167
+
168
+ 2 import { spy } from "@std/testing/mock";
169
+    ~~~~~~~~~~~~~~~~~~~
170
+
171
+ src/utils/__tests__/extract-sprinkles-props.test.ts:3:24 - error TS2307: Cannot find module '@std/expect' or its corresponding type declarations.
172
+
173
+ 3 import { expect } from "@std/expect";
174
+    ~~~~~~~~~~~~~
175
+
176
+ src/utils/__tests__/extract-sprinkles-props.test.ts:8:8 - error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled.
177
+
178
+ 8 } from "@/utils/extract-sprinkles-props.ts";
179
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
180
+
181
+ src/utils/__tests__/is-object.test.ts:1:26 - error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled.
182
+
183
+ 1 import { isObject } from "@/utils/is-object.ts";
184
+    ~~~~~~~~~~~~~~~~~~~~~~
185
+
186
+ src/utils/__tests__/is-object.test.ts:2:30 - error TS2307: Cannot find module '@std/testing/bdd' or its corresponding type declarations.
187
+
188
+ 2 import { describe, it } from "@std/testing/bdd";
189
+    ~~~~~~~~~~~~~~~~~~
190
+
191
+ src/utils/__tests__/is-object.test.ts:3:24 - error TS2307: Cannot find module '@std/expect' or its corresponding type declarations.
192
+
193
+ 3 import { expect } from "@std/expect";
194
+    ~~~~~~~~~~~~~
195
+
196
+ src/utils/__tests__/map-contract-vars.test.ts:1:33 - error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled.
197
+
198
+ 1 import { mapContractVars } from "@/utils/map-contract-vars.ts";
199
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
200
+
201
+ src/utils/__tests__/map-contract-vars.test.ts:2:32 - error TS2307: Cannot find module '@std/testing/bdd' or its corresponding type declarations.
202
+
203
+ 2 import { describe, test } from "@std/testing/bdd";
204
+    ~~~~~~~~~~~~~~~~~~
205
+
206
+ src/utils/__tests__/map-contract-vars.test.ts:3:24 - error TS2307: Cannot find module '@std/expect' or its corresponding type declarations.
207
+
208
+ 3 import { expect } from "@std/expect";
209
+    ~~~~~~~~~~~~~
210
+
211
+
212
+ Found 41 errors in 12 files.
213
+
214
+ Errors Files
215
+ 3 src/components/center/center.stories.tsx:1
216
+ 3 src/components/cluster/cluster.stories.tsx:1
217
+ 3 src/components/cover/cover.stories.tsx:1
218
+ 3 src/components/frame/frame.stories.tsx:1
219
+ 3 src/components/grid/grid.stories.tsx:1
220
+ 5 src/components/sidebar/sidebar.stories.tsx:1
221
+ 3 src/components/stack/stack.stories.tsx:1
222
+ 4 src/components/switcher/switcher.stories.tsx:1
223
+ 4 src/styles/seed/seed.stories.tsx:2
224
+ 4 src/utils/__tests__/extract-sprinkles-props.test.ts:1
225
+ 3 src/utils/__tests__/is-object.test.ts:1
226
+ 3 src/utils/__tests__/map-contract-vars.test.ts:1
227
+  ELIFECYCLE  Command failed with exit code 1.
package/CHANGELOG.md ADDED
@@ -0,0 +1,25 @@
1
+ # @kalink-ui/seedly
2
+
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Update dependencies and correctly include files in package bundle
8
+
9
+ ## 0.1.2
10
+
11
+ ### Patch Changes
12
+
13
+ - Correctly place the npmignore file so it override the package.json config
14
+
15
+ ## 0.1.1
16
+
17
+ ### Patch Changes
18
+
19
+ - Filter out unwanted files from the package bundle
20
+
21
+ ## 0.1.0
22
+
23
+ ### Minor Changes
24
+
25
+ - Initial publish of @kalink-ui packages
@@ -0,0 +1,9 @@
1
+ import { ElementType, ComponentPropsWithRef } from 'react';
2
+
3
+ type DistributiveOmit<T, TOmitted extends PropertyKey> = T extends any ? Omit<T, TOmitted> : never;
4
+ type UnwrapArray<R> = R extends unknown[] ? UnwrapArray<R[number]> : R;
5
+ type PolymorphicComponentProps<TUse extends ElementType> = {
6
+ use?: TUse;
7
+ } & DistributiveOmit<ComponentPropsWithRef<ElementType extends TUse ? 'div' : TUse>, 'use'>;
8
+
9
+ export type { DistributiveOmit, PolymorphicComponentProps, UnwrapArray };
@@ -0,0 +1,9 @@
1
+ import { ElementType, ComponentPropsWithRef } from 'react';
2
+
3
+ type DistributiveOmit<T, TOmitted extends PropertyKey> = T extends any ? Omit<T, TOmitted> : never;
4
+ type UnwrapArray<R> = R extends unknown[] ? UnwrapArray<R[number]> : R;
5
+ type PolymorphicComponentProps<TUse extends ElementType> = {
6
+ use?: TUse;
7
+ } & DistributiveOmit<ComponentPropsWithRef<ElementType extends TUse ? 'div' : TUse>, 'use'>;
8
+
9
+ export type { DistributiveOmit, PolymorphicComponentProps, UnwrapArray };
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/types/utils.types.ts
17
+ var utils_types_exports = {};
18
+ module.exports = __toCommonJS(utils_types_exports);
19
+ //# sourceMappingURL=utils.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/types/utils.types.ts"],"sourcesContent":["import type { ComponentPropsWithRef, ElementType } from 'react';\n\n/* eslint-disable-next-line @typescript-eslint/no-explicit-any */\nexport type DistributiveOmit<T, TOmitted extends PropertyKey> = T extends any\n ? Omit<T, TOmitted>\n : never;\n\nexport type UnwrapArray<R> = R extends unknown[] ? UnwrapArray<R[number]> : R;\n\nexport type PolymorphicComponentProps<TUse extends ElementType> = {\n use?: TUse;\n} & DistributiveOmit<\n ComponentPropsWithRef<ElementType extends TUse ? 'div' : TUse>,\n 'use'\n>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=utils.types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,3 @@
1
+ import { reactEslintConfig } from '@kalink-ui/eslint-config/react-eslint-config';
2
+
3
+ export default reactEslintConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kalink-ui/seedly",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "sideEffects": false,
5
5
  "license": "MIT",
6
6
  "exports": {
@@ -19,7 +19,7 @@
19
19
  "./utils": "./src/utils/index.ts"
20
20
  },
21
21
  "devDependencies": {
22
- "@chromatic-com/storybook": "^3.2.4",
22
+ "@chromatic-com/storybook": "^3.2.5",
23
23
  "@storybook/addon-docs": "^8.6.4",
24
24
  "@storybook/addon-essentials": "^8.6.4",
25
25
  "@storybook/addon-interactions": "^8.6.4",
@@ -28,28 +28,28 @@
28
28
  "@storybook/react": "^8.6.4",
29
29
  "@storybook/react-vite": "^8.6.4",
30
30
  "@storybook/test": "^8.6.4",
31
- "@turbo/gen": "^2.3.4",
32
- "@types/node": "^22.10.10",
33
- "@types/react": "19.0.8",
34
- "@types/react-dom": "19.0.3",
31
+ "@turbo/gen": "^2.4.4",
32
+ "@types/node": "^22.13.9",
33
+ "@types/react": "19.0.10",
34
+ "@types/react-dom": "19.0.4",
35
35
  "@vanilla-extract/css": "^1.17.1",
36
36
  "@vanilla-extract/css-utils": "^0.1.4",
37
37
  "@vanilla-extract/dynamic": "^2.1.2",
38
38
  "@vanilla-extract/recipes": "^0.5.5",
39
39
  "@vanilla-extract/sprinkles": "^1.6.3",
40
- "@vanilla-extract/vite-plugin": "^5.0.0",
40
+ "@vanilla-extract/vite-plugin": "^5.0.1",
41
41
  "@vitejs/plugin-react": "^4.3.4",
42
42
  "react": "^19.0.0",
43
43
  "react-dom": "^19.0.0",
44
44
  "storybook": "^8.6.4",
45
- "tsup": "^8.3.6",
46
- "type-fest": "^4.33.0",
47
- "typescript": "5.7.3",
48
- "vite": "^6.0.11",
45
+ "tsup": "^8.4.0",
46
+ "type-fest": "^4.37.0",
47
+ "typescript": "5.8.2",
48
+ "vite": "^6.2.1",
49
49
  "vite-tsconfig-paths": "^5.1.4",
50
- "vitest": "^3.0.4",
51
- "@kalink-ui/eslint-config": "0.1.0",
52
- "@kalink-ui/typescript-config": "0.0.0"
50
+ "vitest": "^3.0.8",
51
+ "@kalink-ui/eslint-config": "0.2.0",
52
+ "@kalink-ui/typescript-config": "0.1.0"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "@vanilla-extract/css": "^1.17.1",
@@ -63,9 +63,6 @@
63
63
  "publishConfig": {
64
64
  "access": "public"
65
65
  },
66
- "files": [
67
- "./src/**/*"
68
- ],
69
66
  "dependencies": {
70
67
  "clsx": "^2.1.1"
71
68
  },
package/tsconfig.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "extends": "@kalink-ui/typescript-config/react-library.json",
3
+ "include": ["**/*.ts", "**/*.tsx", "eslint.config.mts", "tsup.config.ts"],
4
+ "exclude": ["node_modules"],
5
+ "compilerOptions": {
6
+ "paths": {
7
+ "@/storybook/*": ["./.storybook/*"],
8
+ "@/utils/*": ["./src/utils/*"],
9
+ "@/types/*": ["./src/types/*"],
10
+ "@/components/*": ["./src/components/*"],
11
+ "@/styles/*": ["./src/styles/*"],
12
+ }
13
+ }
14
+ }
package/tsup.config.ts ADDED
@@ -0,0 +1,18 @@
1
+ import { defineConfig } from 'tsup';
2
+
3
+ export default defineConfig((options) => ({
4
+ // entry: ['src/**/!(*.(style|css|test|spec|stories)).(ts|tsx)'],
5
+ entry: ['src/types/utils.types.ts'],
6
+ format: ['esm', 'cjs'],
7
+ dts: true,
8
+ sourcemap: true,
9
+ external: [
10
+ 'react',
11
+ '@vanilla-extract/css',
12
+ '@vanilla-extract/recipes',
13
+ '@vanilla-extract/sprinkles',
14
+ '@vanilla-extract/css-utils',
15
+ ],
16
+ clean: true,
17
+ ...options,
18
+ }));
@@ -0,0 +1,35 @@
1
+ import type { PlopTypes } from '@turbo/gen';
2
+
3
+ // Learn more about Turborepo Generators at https://turbo.build/repo/docs/core-concepts/monorepos/code-generation
4
+
5
+ export default function generator(plop: PlopTypes.NodePlopAPI): void {
6
+ // A simple generator to add a new React component to the internal UI library
7
+ plop.setGenerator('ui-component', {
8
+ description: 'Adds a new react component',
9
+ prompts: [
10
+ {
11
+ type: 'input',
12
+ name: 'name',
13
+ message: 'What is the name of the component?',
14
+ },
15
+ ],
16
+ actions: [
17
+ {
18
+ type: 'add',
19
+ path: 'src/components/{{kebabCase name}}/{{kebabCase name}}.tsx',
20
+ templateFile: 'templates/component.hbs',
21
+ },
22
+ {
23
+ type: 'add',
24
+ path: 'src/components/{{kebabCase name}}/{{kebabCase name}}.css.ts',
25
+ templateFile: 'templates/style.hbs',
26
+ },
27
+ {
28
+ type: 'append',
29
+ path: 'package.json',
30
+ pattern: /"exports": {(?<insertion>)/g,
31
+ templateFile: 'templates/export.hbs',
32
+ },
33
+ ],
34
+ });
35
+ }
@@ -0,0 +1,21 @@
1
+ import { clsx } from 'clsx';
2
+ import { ReactNode } from 'react';
3
+
4
+ import { {{ camelCase name }} } from './{{ kebabCase name }}.css';
5
+
6
+ type {{ pascalCase name }}Props = {
7
+ children: ReactNode;
8
+ className?: string;
9
+ }
10
+
11
+ export function {{ pascalCase name }}({
12
+ children,
13
+ className,
14
+ }: {{ pascalCase name }}Props) {
15
+ return (
16
+ <div className={clsx({{ camelCase name }}, className)}>
17
+ <h1>{{ pascalCase name }} Component</h1>
18
+ {children}
19
+ </div>
20
+ );
21
+ };
@@ -0,0 +1,5 @@
1
+ "./{{kebabCase name}}": {
2
+ "types": "./src/components/{{kebabCase name}}.tsx",
3
+ "import": "./dist/components/{{kebabCase name}}.mjs",
4
+ "require": "./dist/components/{{kebabCase name}}.js"
5
+ },
@@ -0,0 +1,3 @@
1
+ import { style } from '@vanilla-extract/css';
2
+
3
+ export const {{ camelCase name }} = style({});
@@ -0,0 +1,9 @@
1
+ import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
2
+ import react from '@vitejs/plugin-react';
3
+ import tsconfigPaths from 'vite-tsconfig-paths';
4
+
5
+ import type { UserConfig } from 'vite';
6
+
7
+ export default {
8
+ plugins: [tsconfigPaths(), react(), vanillaExtractPlugin()],
9
+ } satisfies UserConfig;
Binary file
@@ -1,29 +0,0 @@
1
- import { Box, boxRecipe } from '@/components/box';
2
- import { argTypesFromRecipe, CommonArgs, commonArgs } from '@/utils/arg-types';
3
-
4
- import type { Meta, StoryObj } from '@storybook/react';
5
-
6
- const meta = {
7
- title: 'Layout/Box',
8
- component: Box,
9
- tags: ['autodocs'],
10
- args: {
11
- children: 'Box content',
12
- },
13
- argTypes: {
14
- ...argTypesFromRecipe(boxRecipe),
15
-
16
- ...commonArgs([
17
- CommonArgs.COMPOSABLE,
18
- CommonArgs.POLYMORPHIC,
19
- CommonArgs.STYLABLE,
20
- CommonArgs.REFERABLE,
21
- ]),
22
- },
23
- } satisfies Meta<typeof Box>;
24
-
25
- export default meta;
26
-
27
- type Story = StoryObj<typeof Box>;
28
-
29
- export const Default: Story = {};
@@ -1,31 +0,0 @@
1
- import { CommonArgs, commonArgs, argTypesFromRecipe } from '@/utils/arg-types';
2
-
3
- import { Button } from './button';
4
- import { buttonRecipe } from './button.css';
5
-
6
- import type { Meta, StoryObj } from '@storybook/react';
7
-
8
- const meta = {
9
- title: 'Component/Button',
10
- component: Button,
11
- tags: ['autodocs'],
12
- args: {
13
- children: 'Button label',
14
- },
15
- argTypes: {
16
- ...argTypesFromRecipe(buttonRecipe),
17
-
18
- ...commonArgs([
19
- CommonArgs.COMPOSABLE,
20
- CommonArgs.POLYMORPHIC,
21
- CommonArgs.STYLABLE,
22
- CommonArgs.REFERABLE,
23
- ]),
24
- },
25
- } satisfies Meta<typeof Button>;
26
-
27
- export default meta;
28
-
29
- type Story = StoryObj<typeof Button>;
30
-
31
- export const Default: Story = {};
Binary file
@@ -1,31 +0,0 @@
1
- import { argTypesFromRecipe, CommonArgs, commonArgs } from '@/utils/arg-types';
2
-
3
- import { Center } from './center';
4
- import { centerRecipe } from './center.css';
5
-
6
- import type { Meta, StoryObj } from '@storybook/react';
7
-
8
- const meta = {
9
- title: 'Layout/Center',
10
- component: Center,
11
- tags: ['autodocs'],
12
- args: {
13
- children: 'Centered content',
14
- },
15
- argTypes: {
16
- ...argTypesFromRecipe(centerRecipe),
17
-
18
- ...commonArgs([
19
- CommonArgs.COMPOSABLE,
20
- CommonArgs.POLYMORPHIC,
21
- CommonArgs.STYLABLE,
22
- CommonArgs.REFERABLE,
23
- ]),
24
- },
25
- } satisfies Meta<typeof Center>;
26
-
27
- export default meta;
28
-
29
- type Story = StoryObj<typeof Center>;
30
-
31
- export const Default: Story = {};
Binary file
@@ -1,37 +0,0 @@
1
- import { argTypesFromRecipe, CommonArgs, commonArgs } from '@/utils/arg-types';
2
-
3
- import { Cluster } from './cluster';
4
- import { clusterRecipe } from './cluster.css';
5
-
6
- import type { Meta, StoryObj } from '@storybook/react';
7
-
8
- const meta = {
9
- title: 'Layout/Cluster',
10
- component: Cluster,
11
- tags: ['autodocs'],
12
- args: {
13
- children: (
14
- <>
15
- <div>Cluster element one</div>
16
- <div>Cluster element two</div>
17
- <div>Cluster element three</div>
18
- </>
19
- ),
20
- },
21
- argTypes: {
22
- ...argTypesFromRecipe(clusterRecipe),
23
-
24
- ...commonArgs([
25
- CommonArgs.COMPOSABLE,
26
- CommonArgs.POLYMORPHIC,
27
- CommonArgs.STYLABLE,
28
- CommonArgs.REFERABLE,
29
- ]),
30
- },
31
- } satisfies Meta<typeof Cluster>;
32
-
33
- export default meta;
34
-
35
- type Story = StoryObj<typeof Cluster>;
36
-
37
- export const Default: Story = {};
Binary file