gbs-add-block 2.0.4 → 2.3.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 (129) hide show
  1. package/.gbs/skills/gbs-components/SKILL.md +190 -134
  2. package/.gbs/skills/gbs-components/references/install.md +25 -3
  3. package/.gbs/skills/gbs-components/references/styling.md +246 -201
  4. package/CHANGELOG.md +74 -0
  5. package/README.md +157 -11
  6. package/index.cjs +212 -3
  7. package/package.json +41 -10
  8. package/schema/passport-v1.schema.json +204 -0
  9. package/source/beta-components/accordion/passport.json +259 -0
  10. package/source/beta-components/accordion/styles.css +207 -208
  11. package/source/beta-components/alert/passport.json +250 -0
  12. package/source/beta-components/alert/styles.css +154 -155
  13. package/source/beta-components/avatar/passport.json +294 -0
  14. package/source/beta-components/avatar/styles.css +201 -203
  15. package/source/beta-components/badge/passport.json +332 -0
  16. package/source/beta-components/badge/styles.css +203 -204
  17. package/source/beta-components/breadcrumb/passport.json +243 -0
  18. package/source/beta-components/breadcrumb/styles.css +138 -139
  19. package/source/beta-components/button/passport.json +402 -0
  20. package/source/beta-components/button/passport.manual.json +31 -0
  21. package/source/beta-components/button/styles.css +232 -233
  22. package/source/beta-components/card/passport.json +337 -0
  23. package/source/beta-components/card/styles.css +230 -231
  24. package/source/beta-components/checkbox/passport.json +456 -0
  25. package/source/beta-components/checkbox/styles.css +211 -212
  26. package/source/beta-components/combobox/passport.json +456 -0
  27. package/source/beta-components/combobox/styles.css +419 -417
  28. package/source/beta-components/data-grid/agent/coerce.ts +368 -0
  29. package/source/beta-components/data-grid/agent/contract.ts +410 -0
  30. package/source/beta-components/data-grid/agent/dataset.ts +92 -0
  31. package/source/beta-components/data-grid/agent/engine.ts +470 -0
  32. package/source/beta-components/data-grid/agent/executors.ts +155 -0
  33. package/source/beta-components/data-grid/agent/index.ts +79 -0
  34. package/source/beta-components/data-grid/agent/intent.ts +324 -0
  35. package/source/beta-components/data-grid/agent/operations.ts +335 -0
  36. package/source/beta-components/data-grid/agent/validate.ts +630 -0
  37. package/source/beta-components/data-grid/agent/webmcp.ts +107 -0
  38. package/source/beta-components/data-grid/index.ts +14 -7
  39. package/source/beta-components/data-grid/passport.json +1051 -0
  40. package/source/beta-components/data-grid/passport.manual.json +255 -0
  41. package/source/beta-components/data-grid/react/AskGrid.tsx +164 -0
  42. package/source/beta-components/data-grid/react/DataGrid.tsx +39 -0
  43. package/source/beta-components/data-grid/styles.css +874 -717
  44. package/source/beta-components/date-picker/passport.json +407 -0
  45. package/source/beta-components/date-picker/styles.css +445 -446
  46. package/source/beta-components/dialog/passport.json +344 -0
  47. package/source/beta-components/dialog/styles.css +280 -278
  48. package/source/beta-components/file-uploader/passport.json +518 -0
  49. package/source/beta-components/file-uploader/styles.css +394 -395
  50. package/source/beta-components/input/passport.json +536 -0
  51. package/source/beta-components/input/styles.css +295 -296
  52. package/source/beta-components/menu/passport.json +322 -0
  53. package/source/beta-components/menu/styles.css +224 -222
  54. package/source/beta-components/modal/passport.json +289 -0
  55. package/source/beta-components/modal/styles.css +241 -239
  56. package/source/beta-components/number-input/passport.json +541 -0
  57. package/source/beta-components/number-input/styles.css +230 -231
  58. package/source/beta-components/popover/passport.json +238 -0
  59. package/source/beta-components/popover/styles.css +148 -146
  60. package/source/beta-components/progress/passport.json +270 -0
  61. package/source/beta-components/progress/styles.css +200 -202
  62. package/source/beta-components/radio-group/passport.json +477 -0
  63. package/source/beta-components/radio-group/styles.css +241 -242
  64. package/source/beta-components/shared/core/agent/adapter.ts +65 -0
  65. package/source/beta-components/shared/core/agent/history.ts +120 -0
  66. package/source/beta-components/shared/core/agent/index.ts +46 -0
  67. package/source/beta-components/shared/core/agent/numbers.ts +217 -0
  68. package/source/beta-components/shared/core/agent/schema.ts +180 -0
  69. package/source/beta-components/shared/core/agent/types.ts +169 -0
  70. package/source/beta-components/shared/core/agent/webmcp.ts +328 -0
  71. package/source/beta-components/shared/index.ts +9 -0
  72. package/source/beta-components/shared/react/GramproAIProvider.tsx +50 -0
  73. package/source/beta-components/shared/react/useAskAgent.ts +217 -0
  74. package/source/beta-components/shared/styles.css +79 -0
  75. package/source/beta-components/shared/version.json +4 -4
  76. package/source/beta-components/shared/version.ts +6 -6
  77. package/source/beta-components/skeleton/passport.json +251 -0
  78. package/source/beta-components/skeleton/styles.css +185 -186
  79. package/source/beta-components/spinner/passport.json +245 -0
  80. package/source/beta-components/spinner/styles.css +145 -146
  81. package/source/beta-components/switch/passport.json +421 -0
  82. package/source/beta-components/switch/styles.css +194 -196
  83. package/source/beta-components/tabs/passport.json +315 -0
  84. package/source/beta-components/tabs/styles.css +234 -235
  85. package/source/beta-components/textarea/passport.json +382 -0
  86. package/source/beta-components/textarea/styles.css +158 -159
  87. package/source/beta-components/toaster/passport.json +221 -0
  88. package/source/beta-components/toaster/styles.css +282 -283
  89. package/source/beta-components/tooltip/passport.json +170 -0
  90. package/source/beta-components/tooltip/styles.css +71 -72
  91. package/tools/env.cjs +61 -0
  92. package/tools/passport/cli.cjs +79 -0
  93. package/tools/passport/extract.cjs +493 -0
  94. package/tools/passport/index.cjs +185 -0
  95. package/tools/passport/merge.cjs +131 -0
  96. package/tools/passport/policy.cjs +65 -0
  97. package/tools/passport/validate.cjs +277 -0
  98. package/tools/ts-require.cjs +79 -0
  99. package/source/beta-components/accordion/__tests__/core.test.ts +0 -58
  100. package/source/beta-components/alert/__tests__/core.test.ts +0 -17
  101. package/source/beta-components/avatar/__tests__/core.test.ts +0 -88
  102. package/source/beta-components/badge/__tests__/core.test.ts +0 -46
  103. package/source/beta-components/breadcrumb/__tests__/core.test.ts +0 -58
  104. package/source/beta-components/button/__tests__/core.test.ts +0 -31
  105. package/source/beta-components/card/__tests__/core.test.ts +0 -57
  106. package/source/beta-components/checkbox/__tests__/core.test.ts +0 -40
  107. package/source/beta-components/combobox/__tests__/core.test.ts +0 -134
  108. package/source/beta-components/data-grid/__tests__/core.test.ts +0 -356
  109. package/source/beta-components/data-grid/__tests__/export.test.ts +0 -70
  110. package/source/beta-components/data-grid/__tests__/pdf.test.ts +0 -209
  111. package/source/beta-components/date-picker/__tests__/core.test.ts +0 -273
  112. package/source/beta-components/dialog/__tests__/core.test.ts +0 -86
  113. package/source/beta-components/file-uploader/__tests__/core.test.ts +0 -395
  114. package/source/beta-components/input/__tests__/core.test.ts +0 -75
  115. package/source/beta-components/menu/__tests__/core.test.ts +0 -120
  116. package/source/beta-components/modal/__tests__/core.test.ts +0 -55
  117. package/source/beta-components/number-input/__tests__/core.test.ts +0 -151
  118. package/source/beta-components/progress/__tests__/core.test.ts +0 -56
  119. package/source/beta-components/radio-group/__tests__/core.test.ts +0 -64
  120. package/source/beta-components/shared/__tests__/boundaries.test.ts +0 -95
  121. package/source/beta-components/shared/__tests__/core.test.ts +0 -55
  122. package/source/beta-components/shared/__tests__/position.test.ts +0 -143
  123. package/source/beta-components/skeleton/__tests__/core.test.ts +0 -41
  124. package/source/beta-components/spinner/__tests__/core.test.ts +0 -48
  125. package/source/beta-components/switch/__tests__/core.test.ts +0 -64
  126. package/source/beta-components/tabs/__tests__/core.test.ts +0 -51
  127. package/source/beta-components/textarea/__tests__/core.test.ts +0 -38
  128. package/source/beta-components/toaster/__tests__/core.test.ts +0 -256
  129. package/source/beta-components/tooltip/__tests__/core.test.ts +0 -42
@@ -1,134 +1,190 @@
1
- ---
2
- name: gbs-components
3
- description: Builds UI with the GBS headless component library (gbs-add-block). Use when adding or changing UI in apps that have a component-lib/ folder.
4
- autoAttach: ["src/**/*.tsx", "src/**/*.jsx", "app/**/*.tsx", "components/**/*.tsx"]
5
- ---
6
-
7
- # GBS components (2.0 beta)
8
-
9
- ## Install before you import
10
-
11
- Not an npm dependency — the CLI **copies source into the repo**:
12
-
13
- ```bash
14
- npx gbs-add-block -a Button,Input,Modal --beta
15
- ```
16
-
17
- Writes `component-lib/<folder>/` plus `component-lib/shared/`. Always pass
18
- `--beta`. Import the barrel in your component; each stylesheet goes in the
19
- global CSS **once** (Vite: `src/index.css`), never in a component file:
20
-
21
- ```ts
22
- import { Button } from "component-lib/button";
23
- ```
24
- ```css
25
- @import "../component-lib/button/styles.css";
26
- ```
27
-
28
- Folder = lowercased name, except `data-grid`, `date-picker`, `file-uploader`,
29
- `number-input`, `radio-group`.
30
-
31
- ## Rules most often missed
32
-
33
- 1. **Change handlers are named per component.** `onValueChange`: Input,
34
- OtpInput, Textarea, NumberInput, CheckboxGroup, RadioGroup, Tabs, Accordion,
35
- MenuRadioGroup. `onCheckedChange`: Checkbox, Switch, MenuCheckboxItem.
36
- `onChange`: Select, MultiSelect, DatePicker, DateRangePicker, FileUploader.
37
- `onOpenChange`: Modal, Popover, Menu.
38
- 2. **Never hand-roll `<label>`, hint or error markup.** Fields take `label`,
39
- `description` and `error`; `error` also marks the control invalid and wires
40
- `aria-describedby`. A `<label>` wrapper breaks it.
41
- 3. **Style via `classNames` slots** (`classNames={{ root, label }}`);
42
- `className` hits the root only. Theme globally with `--gbs-*` on `:root`.
43
- 4. **Mount `<Toaster />` and `<DialogHost />` once at the app root**, or
44
- `toast()` and `dialog.confirm()` do nothing.
45
- 5. **All are client components** (`"use client"`); a Next.js Server Component
46
- can render them but not pass function props.
47
- 6. **Compound families throw outside their parent**: Tab/TabList/TabPanel need
48
- Tabs, AccordionItem needs Accordion, MenuItem needs Menu.
49
-
50
- ## Inventory (required props in parens)
51
-
52
- **Forms** — Input, Textarea, NumberInput (locale-aware), OtpInput; Checkbox +
53
- CheckboxGroup; Radio (`value`) + RadioGroup; Switch (applies immediately);
54
- Select and MultiSelect (`options`; searchable, client or server); DatePicker and
55
- DateRangePicker; FileUploader (chunked).
56
-
57
- **Actions** — Button: variants, sizes, icons, auto-loading from a returned
58
- promise; `render` draws a router link.
59
-
60
- **Overlays** — Modal (native `<dialog>`, also drawers); `dialog` + DialogHost
61
- (`await dialog.confirm/alert/prompt`); Popover (`trigger`); Menu (`trigger`) with
62
- MenuItem, MenuCheckboxItem, MenuRadioGroup, MenuRadioItem, MenuGroup,
63
- MenuSeparator, MenuSub; Tooltip (`content`); `toast` + Toaster.
64
-
65
- **Data** — DataGrid (`data`, `columns`) + createColumnHelper: virtualized;
66
- sort, filter, edit, CSV/Excel/PDF export.
67
-
68
- **Display** — Tabs/TabList/Tab (`value`)/TabPanel (`value`); Accordion +
69
- AccordionItem (`value`); Card/CardHeader/CardBody/CardFooter/Stat; Alert; Badge
70
- and Tag; Avatar and AvatarGroup; Progress and CircularProgress (`value={null}`
71
- is indeterminate); Skeleton and Empty; Spinner; Breadcrumb (`items`,
72
- `renderLink`).
73
-
74
- ## Example
75
-
76
- ```tsx
77
- "use client";
78
- import { useState } from "react";
79
- import { Button } from "component-lib/button";
80
- import { Input } from "component-lib/input";
81
- import { Select } from "component-lib/combobox";
82
- import { Modal } from "component-lib/modal";
83
- import { toast } from "component-lib/toaster";
84
-
85
- const ROLES = [{ value: "admin", label: "Admin" }, { value: "dev", label: "Dev" }];
86
-
87
- export function InviteButton() {
88
- const [open, setOpen] = useState(false);
89
- const [email, setEmail] = useState("");
90
- const [role, setRole] = useState<string | null>(null);
91
- const invalid = !!email && !email.includes("@");
92
-
93
- return (
94
- <>
95
- <Button onClick={() => setOpen(true)}>Invite</Button>
96
- <Modal open={open} onOpenChange={setOpen} title="Invite a teammate"
97
- footer={({ close }) => (
98
- <Button disabled={!email || invalid} onClick={async () => {
99
- await invite({ email, role });
100
- toast.success("Invitation sent");
101
- close();
102
- }}>Send</Button>
103
- )}>
104
- <Input label="Email" type="email" value={email} onValueChange={setEmail}
105
- required error={invalid ? "Enter a valid email" : undefined} />
106
- <Select label="Role" options={ROLES} value={role} onChange={setRole} />
107
- </Modal>
108
- </>
109
- );
110
- }
111
- ```
112
-
113
- ## Don't
114
-
115
- - Raw `<button>`, `<input>`, `<select>`, `<table>`, `<dialog>`, or a hand-built
116
- modal/menu/tooltip, when a component exists.
117
- - Deep imports (`.../input/react/Input`); import the barrel. Only `<name>/core`
118
- is also public.
119
- - Editing `component-lib/shared/`; the CLI replaces it on update.
120
- - Invented props: no `asChild`, no `variant` on Input, no `onChange` on Switch.
121
- - `!important` or internal class selectors; set `--gbs-*` or pass `classNames`.
122
- - A Tooltip as a name; icon buttons need `aria-label`.
123
-
124
- ## Details (in `references/`)
125
-
126
- - `install.md` — CLI flags, folders, 1.x vs beta.
127
- - `forms.md` — fields, controlled state, form posting.
128
- - `pickers.md` — Select, MultiSelect, DatePicker, Uploader.
129
- - `overlays.md` — Modal, dialog, Popover, Menu, Tooltip.
130
- - `toaster.md` — `toast()` and `<Toaster />`.
131
- - `data-grid.md` — columns, API, export.
132
- - `data-display.md` — Card, Tabs, Accordion, Badge, Avatar.
133
- - `styling.md` — tokens, layers, slots, `data-*`, dark.
134
- - `accessibility.md` — what is supplied, what you add.
1
+ ---
2
+ name: gbs-components
3
+ description: Builds UI with the GramproKit component library (gbs-add-block). Use when adding or changing UI in apps that have a component-lib/ folder.
4
+ autoAttach: ["src/**/*.tsx", "src/**/*.jsx", "app/**/*.tsx", "components/**/*.tsx"]
5
+ ---
6
+
7
+ # GBS components (2.0 beta)
8
+
9
+ ## Install before you import
10
+
11
+ Not an npm dependency — the CLI **copies source into the repo**:
12
+
13
+ ```bash
14
+ npx gbs-add-block -a Button,Input,Modal --beta
15
+ ```
16
+
17
+ Writes `component-lib/<folder>/` plus `component-lib/shared/`. Always pass
18
+ `--beta`. Import the barrel in your component:
19
+
20
+ ```ts
21
+ import { Button } from "component-lib/button";
22
+ ```
23
+
24
+ Styles are **one line** in the global CSS (Vite: `src/index.css`), never in a
25
+ component file. The CLI generates `component-lib/gbs.css` listing every
26
+ stylesheet you installed, and rewrites it on each install:
27
+
28
+ ```css
29
+ @import "./component-lib/gbs.css";
30
+ ```
31
+
32
+ With **Tailwind v4 only**, import it after the framework and into Tailwind's
33
+ components layer, or utilities stop overriding component rules:
34
+
35
+ ```css
36
+ @import "tailwindcss";
37
+ @import "./component-lib/gbs.css" layer(components);
38
+ ```
39
+
40
+ The installer prints whichever line applies. Component CSS is unlayered, so
41
+ Tailwind v3, Bootstrap and no-framework projects need nothing extra.
42
+
43
+ Folder = lowercased name, except `data-grid`, `date-picker`, `file-uploader`,
44
+ `number-input`, `radio-group`.
45
+
46
+ ## Rules most often missed
47
+
48
+ 1. **Change handlers are named per component.** `onValueChange`: Input,
49
+ OtpInput, Textarea, NumberInput, CheckboxGroup, RadioGroup, Tabs, Accordion,
50
+ MenuRadioGroup. `onCheckedChange`: Checkbox, Switch, MenuCheckboxItem.
51
+ `onChange`: Select, MultiSelect, DatePicker, DateRangePicker, FileUploader.
52
+ `onOpenChange`: Modal, Popover, Menu.
53
+ 2. **Never hand-roll `<label>`, hint or error markup.** Fields take `label`,
54
+ `description` and `error`; `error` also marks the control invalid and wires
55
+ `aria-describedby`. A `<label>` wrapper breaks it.
56
+ 3. **Style via `classNames` slots** (`classNames={{ root, label }}`);
57
+ `className` hits the root only. Theme globally with `--gbs-*` on `:root`.
58
+ 4. **Mount `<Toaster />` and `<DialogHost />` once at the app root**, or
59
+ `toast()` and `dialog.confirm()` do nothing.
60
+ 5. **All are client components** (`"use client"`); a Next.js Server Component
61
+ can render them but not pass function props.
62
+ 6. **Compound families throw outside their parent**: Tab/TabList/TabPanel need
63
+ Tabs, AccordionItem needs Accordion, MenuItem needs Menu.
64
+
65
+ ## Inventory (required props in parens)
66
+
67
+ **Forms** — Input, Textarea, NumberInput (locale-aware), OtpInput; Checkbox +
68
+ CheckboxGroup; Radio (`value`) + RadioGroup; Switch (applies immediately);
69
+ Select and MultiSelect (`options`; searchable, client or server); DatePicker and
70
+ DateRangePicker; FileUploader (chunked).
71
+
72
+ **Actions** — Button: variants, sizes, icons, auto-loading from a returned
73
+ promise; `render` draws a router link.
74
+
75
+ **Overlays** — Modal (native `<dialog>`, also drawers); `dialog` + DialogHost
76
+ (`await dialog.confirm/alert/prompt`); Popover (`trigger`); Menu (`trigger`) with
77
+ MenuItem, MenuCheckboxItem, MenuRadioGroup, MenuRadioItem, MenuGroup,
78
+ MenuSeparator, MenuSub; Tooltip (`content`); `toast` + Toaster.
79
+
80
+ **Data** — DataGrid (`data`, `columns`) + createColumnHelper: virtualized;
81
+ sort, filter, edit, CSV/Excel/PDF export. Optional agent surface: `ai` renders a
82
+ natural-language box, and `registerGridTool` exposes the grid to a browser agent
83
+ over WebMCP (see "Agent surface").
84
+
85
+ **Display** — Tabs/TabList/Tab (`value`)/TabPanel (`value`); Accordion +
86
+ AccordionItem (`value`); Card/CardHeader/CardBody/CardFooter/Stat; Alert; Badge
87
+ and Tag; Avatar and AvatarGroup; Progress and CircularProgress (`value={null}`
88
+ is indeterminate); Skeleton and Empty; Spinner; Breadcrumb (`items`,
89
+ `renderLink`).
90
+
91
+ ## Example
92
+
93
+ ```tsx
94
+ "use client";
95
+ import { useState } from "react";
96
+ import { Button } from "component-lib/button";
97
+ import { Input } from "component-lib/input";
98
+ import { Select } from "component-lib/combobox";
99
+ import { Modal } from "component-lib/modal";
100
+ import { toast } from "component-lib/toaster";
101
+
102
+ const ROLES = [{ value: "admin", label: "Admin" }, { value: "dev", label: "Dev" }];
103
+
104
+ export function InviteButton() {
105
+ const [open, setOpen] = useState(false);
106
+ const [email, setEmail] = useState("");
107
+ const [role, setRole] = useState<string | null>(null);
108
+ const invalid = !!email && !email.includes("@");
109
+
110
+ return (
111
+ <>
112
+ <Button onClick={() => setOpen(true)}>Invite</Button>
113
+ <Modal open={open} onOpenChange={setOpen} title="Invite a teammate"
114
+ footer={({ close }) => (
115
+ <Button disabled={!email || invalid} onClick={async () => {
116
+ await invite({ email, role });
117
+ toast.success("Invitation sent");
118
+ close();
119
+ }}>Send</Button>
120
+ )}>
121
+ <Input label="Email" type="email" value={email} onValueChange={setEmail}
122
+ required error={invalid ? "Enter a valid email" : undefined} />
123
+ <Select label="Role" options={ROLES} value={role} onChange={setRole} />
124
+ </Modal>
125
+ </>
126
+ );
127
+ }
128
+ ```
129
+
130
+ ## Agent surface (DataGrid, optional)
131
+
132
+ Entirely opt-in. Without it, nothing changes and nothing is downloaded.
133
+
134
+ **A person typing.** `ai` renders a box above the grid. It needs a provider
135
+ supplying an adapter; with no provider it renders nothing at all.
136
+
137
+ ```tsx
138
+ import { GramproAIProvider } from "component-lib/shared";
139
+ import { DataGrid } from "component-lib/data-grid";
140
+
141
+ <GramproAIProvider adapter={myAdapter}>
142
+ <DataGrid data={rows} columns={cols} ai semantics={SEMANTICS} />
143
+ </GramproAIProvider>
144
+ ```
145
+
146
+ `adapter` is one function — `(utterance, contract, responseSchema) => envelope`.
147
+ No model is bundled, downloaded or named; the app brings its own, and the key
148
+ belongs on the app's server, never in client JavaScript.
149
+
150
+ **A browser agent.** `registerGridTool(agent)` registers one WebMCP tool,
151
+ `operate_grid`, whose schema is generated from the live grid. Requires no model
152
+ at all.
153
+
154
+ **Both go through the same validator**, which refuses an unknown column, an
155
+ operator the type lacks, a policy-denied column, or an irreversible operation
156
+ with no confirmation — and returns the reason. A producer proposes; it never
157
+ acts. Do not add repair, retries or a second execution path.
158
+
159
+ **Data leaves the page with a remote adapter.** The contract carries real
160
+ values from low-cardinality columns, so the model can map "Kerala" to `region`.
161
+ Mark personal columns `semantics: { email: { pii: true } }` — a PII column is
162
+ denied *and* never summarised — or pass `stats: false` to summarise nothing.
163
+ `policy.denyFilter` does **not** stop a column being described.
164
+
165
+ **`semantics` is where most quality comes from**: per column, give `synonyms`,
166
+ `description`, `unit`, `higherIsBetter`, `pii`. Reach for it before reaching for
167
+ a bigger model.
168
+
169
+ ## Don't
170
+
171
+ - Raw `<button>`, `<input>`, `<select>`, `<table>`, `<dialog>`, or a hand-built
172
+ modal/menu/tooltip, when a component exists.
173
+ - Deep imports (`.../input/react/Input`); import the barrel. Only `<name>/core`
174
+ is also public.
175
+ - Editing `component-lib/shared/`; the CLI replaces it on update.
176
+ - Invented props: no `asChild`, no `variant` on Input, no `onChange` on Switch.
177
+ - `!important` or internal class selectors; set `--gbs-*` or pass `classNames`.
178
+ - A Tooltip as a name; icon buttons need `aria-label`.
179
+
180
+ ## Details (in `references/`)
181
+
182
+ - `install.md` — CLI flags, folders, 1.x vs beta.
183
+ - `forms.md` — fields, controlled state, form posting.
184
+ - `pickers.md` — Select, MultiSelect, DatePicker, Uploader.
185
+ - `overlays.md` — Modal, dialog, Popover, Menu, Tooltip.
186
+ - `toaster.md` — `toast()` and `<Toaster />`.
187
+ - `data-grid.md` — columns, API, export.
188
+ - `data-display.md` — Card, Tabs, Accordion, Badge, Avatar.
189
+ - `styling.md` — tokens, layers, slots, `data-*`, dark.
190
+ - `accessibility.md` — what is supplied, what you add.
@@ -157,12 +157,33 @@ Import the barrel in the component that uses it:
157
157
  import { Input, OtpInput } from "component-lib/input";
158
158
  ```
159
159
 
160
- Put the stylesheet in the project's global CSS, once — never in a component file:
160
+ Put the styles in the project's global CSS, once — never in a component file.
161
+ The CLI writes `component-lib/gbs.css` importing every stylesheet you installed
162
+ and rewrites it on each install, so this one line stays correct as you add
163
+ components:
161
164
 
162
165
  ```css
163
- @import "../component-lib/input/styles.css";
166
+ @import "./component-lib/gbs.css";
164
167
  ```
165
168
 
169
+ With **Tailwind v4 only**, import it after the framework and into Tailwind's
170
+ components layer. Tailwind v4 puts its own utilities in a cascade layer, and an
171
+ unlayered component rule would outrank them:
172
+
173
+ ```css
174
+ @import "tailwindcss";
175
+ @import "./component-lib/gbs.css" layer(components);
176
+ ```
177
+
178
+ Both the order and the `layer()` matter. Imported before the framework, the
179
+ layer registers first and Tailwind's preflight lands after it, stripping the
180
+ component rules. Imported without `layer()`, `className` stops overriding them.
181
+ Tailwind v3, Bootstrap and projects with no framework need neither — the
182
+ installer prints whichever line applies to yours.
183
+
184
+ Individual stylesheets remain importable (`component-lib/input/styles.css`) if
185
+ you would rather curate the list yourself.
186
+
166
187
  Most repos set a path alias. The library's own READMEs are written with
167
188
  `@/components/<folder>`; the DataGrid README uses `component-lib/data-grid`.
168
189
  Both mean the installed folder — follow whatever the host repo already uses.
@@ -173,7 +194,8 @@ Both mean the installed folder — follow whatever the host repo already uses.
173
194
  | --- | --- |
174
195
  | `component-lib/<folder>` | Components, hooks, types, locale defaults. **Use this.** |
175
196
  | `component-lib/<folder>/core` | Framework-free helpers; safe on a server. Documented per component. |
176
- | `component-lib/<folder>/styles.css` | The stylesheet. |
197
+ | `component-lib/gbs.css` | Generated barrel of every installed stylesheet. **Import this.** |
198
+ | `component-lib/<folder>/styles.css` | One component's stylesheet, if you curate the list yourself. |
177
199
  | `component-lib/shared` | Shared helpers, mostly used by the components themselves. |
178
200
 
179
201
  Anything deeper (`component-lib/input/react/Input`) is internal. It will resolve,