@ikas/component-cli 0.130.0 → 0.131.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/package.json
CHANGED
|
@@ -92,7 +92,7 @@ src/
|
|
|
92
92
|
│ ├── ProductList/
|
|
93
93
|
│ │ ├── index.tsx # imports from ../../sub-components/...
|
|
94
94
|
│ │ ├── types.ts # auto-generated (CLI-managed)
|
|
95
|
-
│ │ └── styles.css
|
|
95
|
+
│ │ └── styles.css
|
|
96
96
|
│ └── index.ts
|
|
97
97
|
├── sub-components/
|
|
98
98
|
│ ├── ProductCard/
|
|
@@ -109,7 +109,6 @@ src/
|
|
|
109
109
|
- `src/components/` = registered in ikas.config.json. `src/sub-components/` = internal helpers (NOT in ikas.config.json)
|
|
110
110
|
- Sub-components do NOT have `types.ts` — define `Props` inline in `index.tsx`
|
|
111
111
|
- Custom enum types are exported from `src/global-types.ts` (auto-generated). Sub-components can import them: `import type { MyEnum } from "../../global-types";`
|
|
112
|
-
- CSS: use `@import "../../sub-components/ProductCard/styles.css";` in parent styles.css
|
|
113
112
|
- TSX: use `import ProductCard from "../../sub-components/ProductCard";`
|
|
114
113
|
- Sub-components should be wrapped with `observer()` from `@ikas/component-utils`
|
|
115
114
|
- Sub-components can be shared across multiple parent sections
|
|
@@ -96,7 +96,7 @@ src/
|
|
|
96
96
|
│ ├── ProductList/
|
|
97
97
|
│ │ ├── index.tsx # imports from ../../sub-components/...
|
|
98
98
|
│ │ ├── types.ts # auto-generated (CLI-managed)
|
|
99
|
-
│ │ └── styles.css
|
|
99
|
+
│ │ └── styles.css
|
|
100
100
|
│ └── index.ts
|
|
101
101
|
└── sub-components/
|
|
102
102
|
├── ProductCard/
|
|
@@ -111,7 +111,6 @@ src/
|
|
|
111
111
|
|
|
112
112
|
- `src/components/` = registered in ikas.config.json. `src/sub-components/` = internal helpers (NOT in ikas.config.json)
|
|
113
113
|
- Sub-components do NOT have `types.ts` — define `Props` inline in `index.tsx`
|
|
114
|
-
- CSS: use `@import "../../sub-components/ProductCard/styles.css";` in parent styles.css
|
|
115
114
|
- TSX: use `import ProductCard from "../../sub-components/ProductCard";`
|
|
116
115
|
- Sub-components that read MobX stores need `observer()`, others don't
|
|
117
116
|
- Sub-components can be shared across multiple parent sections
|
|
@@ -185,7 +184,6 @@ The `.kombos-icon` base class uses `width: 1em; height: 1em` so icons scale with
|
|
|
185
184
|
|
|
186
185
|
**CRITICAL: Never write custom button styles in components.** All buttons MUST use `src/sub-components/Button`.
|
|
187
186
|
Import: `import Button from "../../sub-components/Button";`
|
|
188
|
-
CSS import: `@import "../../sub-components/Button/styles.css";` in parent styles.css
|
|
189
187
|
|
|
190
188
|
### Variants
|
|
191
189
|
|
|
@@ -226,7 +224,6 @@ When placed in flex containers, add a layout class (e.g. `className="my-section_
|
|
|
226
224
|
|
|
227
225
|
**CRITICAL: Never write custom input styles in components.** All text inputs MUST use `src/sub-components/Input`.
|
|
228
226
|
Import: `import Input from "../../sub-components/Input";`
|
|
229
|
-
CSS import: `@import "../../sub-components/Input/styles.css";` in parent styles.css
|
|
230
227
|
|
|
231
228
|
Input is a pure input field — no label, no helper text. Wrap with `FormItem` for labels and validation messages.
|
|
232
229
|
|
|
@@ -267,7 +264,6 @@ import Input from "../../sub-components/Input";
|
|
|
267
264
|
|
|
268
265
|
Wraps form controls (Input, select, etc.) with a label and helper/error text.
|
|
269
266
|
Import: `import FormItem from "../../sub-components/FormItem";`
|
|
270
|
-
CSS import: `@import "../../sub-components/FormItem/styles.css";` in parent styles.css
|
|
271
267
|
|
|
272
268
|
### Props
|
|
273
269
|
|
|
@@ -69,7 +69,6 @@ These commands update BOTH `ikas.config.json` AND `types.ts` automatically.
|
|
|
69
69
|
**ALWAYS create sub-components in `src/sub-components/` with their own folder containing `index.tsx` and `styles.css`.**
|
|
70
70
|
- `src/components/` = registered in ikas.config.json. `src/sub-components/` = internal helpers (NOT in ikas.config.json)
|
|
71
71
|
- Sub-components do NOT have `types.ts` — define `Props` inline in `index.tsx`
|
|
72
|
-
- CSS: `@import "../../sub-components/ProductCard/styles.css";` in parent styles.css
|
|
73
72
|
- TSX: `import ProductCard from "../../sub-components/ProductCard";`
|
|
74
73
|
- Sub-components that read MobX stores need `observer()`, others don't
|
|
75
74
|
- Sub-components can be shared across multiple parent sections
|