@molecule/app-settings-container-solid 0.0.1-stage → 1.1.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 (2) hide show
  1. package/README.md +264 -4
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,11 +1,271 @@
1
+ <!--
2
+ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
+ Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
+ Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
+ To change this document, edit the module-level JSDoc in src/index.ts.
6
+ Generated: 2026-11-21T12:47:16.199Z
7
+ -->
8
+
1
9
  # @molecule/app-settings-container-solid
2
10
 
3
- Solid layout for Settings pages (sidebar + content + section cards)
11
+ Solid Settings-page scaffold (layout chrome only).
12
+
13
+ Exports:
14
+
15
+ - `SettingsLayout` — two-column [sidebar, content] with an optional `header`
16
+ slot rendered above both.
17
+ - `SettingsSidebar` — controlled side-nav (`items`, `activeId`, `onSelect`,
18
+ optional `footer`); `SettingsSidebarItem` is `{ id, label, icon? }`.
19
+ - `SettingsContent` — stacked wrapper for the right column.
20
+ - `SettingsSection` — Card-wrapped titled section (`title`, `description?`,
21
+ `footer?` action row, `dataMolId?`).
22
+
23
+ It is the Solid counterpart of `@molecule/app-settings-container-react`: the
24
+ same props (React names), the same ClassMap tokens, and the same DOM for the
25
+ same input.
26
+
27
+ > **Auto-generated, AI-first package reference** for the [molecule.dev](https://molecule.dev) ecosystem.
28
+ > It is written to be read by coding agents as much as by people, and is generated from this
29
+ > package's source — edit `src/index.ts` JSDoc, not this file.
30
+
31
+ ## Quick Start
32
+
33
+ ```tsx
34
+ import { createSignal } from 'solid-js'
35
+
36
+ import {
37
+ SettingsContent,
38
+ SettingsLayout,
39
+ SettingsSection,
40
+ SettingsSidebar,
41
+ } from '@molecule/app-settings-container-solid'
42
+
43
+ const NAV = [
44
+ { id: 'profile', label: 'Profile' },
45
+ { id: 'notifications', label: 'Notifications' },
46
+ ]
4
47
 
48
+ export function SettingsPage() {
49
+ const [active, setActive] = createSignal('profile')
50
+ return (
51
+ <SettingsLayout
52
+ header={<h1>Settings</h1>}
53
+ sidebar={<SettingsSidebar items={NAV} activeId={active()} onSelect={setActive} />}
54
+ >
55
+ <SettingsContent>
56
+ <SettingsSection title="Profile" description="Update your display name and avatar.">
57
+ <p>Form fields go here.</p>
58
+ </SettingsSection>
59
+ </SettingsContent>
60
+ </SettingsLayout>
61
+ )
62
+ }
5
63
  ```
6
- npm install @molecule/app-settings-container-solid
64
+
65
+ ## Type
66
+
67
+ `feature`
68
+
69
+ ## Installation
70
+
71
+ ```bash
72
+ npm install @molecule/app-settings-container-solid @molecule/app-solid @molecule/app-ui @molecule/app-ui-solid solid-js
73
+ ```
74
+
75
+ ## API
76
+
77
+ ### Interfaces
78
+
79
+ #### `SettingsLayoutProps`
80
+
81
+ Props accepted by the {@link SettingsLayout} component.
82
+
83
+ ```typescript
84
+ interface SettingsLayoutProps {
85
+ /** Left-side navigation (typically `<SettingsSidebar>`). */
86
+ sidebar?: JSX.Element
87
+ /** Main content area (usually one or more `<SettingsSection>`s). */
88
+ children?: JSX.Element
89
+ /**
90
+ * Optional header (breadcrumb, title, save button) rendered above both
91
+ * columns. NOT sticky — apply your own sticky positioning if needed.
92
+ */
93
+ header?: JSX.Element
94
+ /** Extra classes on the outer wrapper. */
95
+ className?: string
96
+ /** `data-mol-id` for AI-agent selectors. */
97
+ dataMolId?: string
98
+ }
99
+ ```
100
+
101
+ #### `SettingsContentProps`
102
+
103
+ Props accepted by the {@link SettingsContent} component.
104
+
105
+ ```typescript
106
+ interface SettingsContentProps {
107
+ /** Active section content. */
108
+ children?: JSX.Element
109
+ /** Extra classes. */
110
+ className?: string
111
+ }
112
+ ```
113
+
114
+ #### `SettingsSidebarItem`
115
+
116
+ A single navigable item in the settings sidebar.
117
+
118
+ ```typescript
119
+ interface SettingsSidebarItem {
120
+ /** Unique id; the active item is the one whose id equals `activeId`. */
121
+ id: string
122
+ /** Visible label (a JSX value or plain text). */
123
+ label: JSX.Element
124
+ /** Optional leading icon. */
125
+ icon?: JSX.Element
126
+ }
127
+ ```
128
+
129
+ #### `SettingsSidebarProps`
130
+
131
+ Props accepted by the {@link SettingsSidebar} component.
132
+
133
+ ```typescript
134
+ interface SettingsSidebarProps {
135
+ /** Items to render, in order. */
136
+ items: SettingsSidebarItem[]
137
+ /** The id of the active item (controlled — the caller owns it). */
138
+ activeId: string
139
+ /** Called with the clicked item's id. */
140
+ onSelect: (id: string) => void
141
+ /** Optional footer inside the sidebar (sign-out, plan indicator). */
142
+ footer?: JSX.Element
143
+ /**
144
+ * Accessible name for the `<nav>` region. Overrides the translated /
145
+ * `defaultValue` `'Settings'` (prop > `t()` > default).
146
+ */
147
+ ariaLabel?: string
148
+ /** Extra classes. */
149
+ className?: string
150
+ }
151
+ ```
152
+
153
+ #### `SettingsSectionProps`
154
+
155
+ Props accepted by the {@link SettingsSection} component.
156
+
157
+ ```typescript
158
+ interface SettingsSectionProps {
159
+ /** Section heading. */
160
+ title?: JSX.Element
161
+ /** Optional description under the heading. */
162
+ description?: JSX.Element
163
+ /** Section body. */
164
+ children?: JSX.Element
165
+ /** Optional footer row (save button, last-saved indicator). */
166
+ footer?: JSX.Element
167
+ /** Extra classes on the Card. */
168
+ className?: string
169
+ /** `data-mol-id` for AI-agent selectors. */
170
+ dataMolId?: string
171
+ }
7
172
  ```
8
173
 
9
- Part of the [Molecule](https://www.molecule.dev) package fleet. This page carries the manifest summary; the full generated documentation ships with the package's first committed version.
174
+ ### Functions
175
+
176
+ #### `SettingsContent(props)`
177
+
178
+ Wrapper for the right-hand column of `<SettingsLayout>`. Just a
179
+ vertically-stacked container for one or more `<SettingsSection>`s — useful
180
+ as a semantic landmark and for consistent spacing.
181
+
182
+ ```typescript
183
+ function SettingsContent(props: SettingsContentProps): JSX.Element
184
+ ```
185
+
186
+ - `props` — Component props (see {@link SettingsContentProps}).
187
+
188
+ **Returns:** The rendered settings content.
189
+
190
+ #### `SettingsLayout(props)`
191
+
192
+ Two-column Settings page scaffold: sidebar on the left, content on the
193
+ right, optional (non-sticky) header above both.
194
+
195
+ ```typescript
196
+ function SettingsLayout(props: SettingsLayoutProps): JSX.Element
197
+ ```
198
+
199
+ - `props` — Component props (see {@link SettingsLayoutProps}).
200
+
201
+ **Returns:** The rendered settings layout.
202
+
203
+ #### `SettingsSection(props)`
204
+
205
+ One configuration section inside a Settings page — Card-wrapped, with
206
+ title / description header, body slot, and optional footer action row.
207
+
208
+ ```typescript
209
+ function SettingsSection(props: SettingsSectionProps): JSX.Element
210
+ ```
211
+
212
+ - `props` — Component props (see {@link SettingsSectionProps}).
213
+
214
+ **Returns:** The rendered settings section.
215
+
216
+ #### `SettingsSidebar(props)`
217
+
218
+ Vertical side-nav for Settings pages. Controlled — the caller owns
219
+ `activeId`; every item calls `onSelect` with its id.
220
+
221
+ The nav region's accessible name resolves through `t()` with the
222
+ `settingsContainer.aria.settings` key, so it follows the active locale;
223
+ `ariaLabel` overrides it.
224
+
225
+ React keys each row by the item's `id` value, so a re-passed or re-ordered
226
+ array keeps the rendered rows per id. Solid's `For` keys by reference, so
227
+ the rows are keyed through stable per-id records: the record for an id is
228
+ created once and reused, while the row's content reads the CURRENT item for
229
+ that id reactively.
230
+
231
+ ```typescript
232
+ function SettingsSidebar(props: SettingsSidebarProps): JSX.Element
233
+ ```
234
+
235
+ - `props` — Component props (see {@link SettingsSidebarProps}).
236
+
237
+ **Returns:** The rendered settings sidebar.
238
+
239
+ ## Injection Notes
240
+
241
+ ### Requirements
242
+
243
+ Peer dependencies:
244
+
245
+ - `@molecule/app-solid` ^3.5.0
246
+ - `@molecule/app-ui` ^1.0.1
247
+ - `@molecule/app-ui-solid` ^1.1.0
248
+ - `solid-js` ^1.8.0
249
+
250
+ ### Runtime Dependencies
251
+
252
+ - `@molecule/app-solid`
253
+ - `@molecule/app-ui`
254
+ - `@molecule/app-ui-solid`
255
+ - `solid-js`
256
+
257
+ - The `header` slot is rendered above the columns but is NOT sticky —
258
+ apply your own sticky positioning if you need it pinned.
259
+ - The two columns do not collapse responsively — swap the sidebar for a
260
+ drawer on small screens yourself.
261
+ - Requires a bonded ClassMap. Labels are your own JSX values (translate
262
+ upstream); the sidebar nav's `aria-label="Settings"` is hardcoded
263
+ English.
264
+ - Don't confuse with `@molecule/app-settings-panel-solid`: that package is
265
+ the batteries-included panel (prebuilt Account/Auth/Billing/… sections
266
+ wired to molecule APIs). THIS package is empty layout chrome for building
267
+ your own settings pages.
268
+
269
+ ## Translations
10
270
 
11
- License: Apache-2.0
271
+ Translation strings are provided by `@molecule/app-locales-settings-container`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-settings-container-solid",
3
- "version": "0.0.1-stage",
3
+ "version": "1.1.0",
4
4
  "description": "Solid layout for Settings pages (sidebar + content + section cards)",
5
5
  "homepage": "https://www.molecule.dev/packages/app-settings-container-solid",
6
6
  "type": "module",
@@ -51,9 +51,9 @@
51
51
  "@molecule/app-framework-conformance": "0.0.0",
52
52
  "@molecule/app-i18n": "1.2.2",
53
53
  "@molecule/app-icons": "1.0.4",
54
- "@molecule/app-solid": "3.7.2",
55
- "@molecule/app-ui": "1.4.0",
56
- "@molecule/app-ui-solid": "1.1.5",
54
+ "@molecule/app-solid": "3.9.0",
55
+ "@molecule/app-ui": "1.5.0",
56
+ "@molecule/app-ui-solid": "1.2.1",
57
57
  "@types/node": "26.6.5",
58
58
  "jsdom": "30.1.3",
59
59
  "solid-js": "1.9.17",