baldur 0.1.6 → 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e620053e45888da66925e20f8143ce9d5dcc70eaccec2b536414fe433e346e92
4
- data.tar.gz: 1ec87cf893794467a791cad74f09fad3be0a2750d7962b7d08b07b021aa2518e
3
+ metadata.gz: 633d727781f1701dcac870818b72d1c8df5ea9392cee702502ce5bd45aa1ef8a
4
+ data.tar.gz: aa155789ea73b321dff4cb7d795e5291c7613cbcff8b24142558c8b9cd0e3700
5
5
  SHA512:
6
- metadata.gz: 0e54b8327f9ce5842ab63ca60aaf81c1f14217a70beabf30f372454d75614bf711d25a1b985156eb6bd3573c5c18b565002b8792217b79c57bf9ac93a2272bff
7
- data.tar.gz: 20e13f55afd2a2f20b2c2116986dd023d6ac9d592008549321acb77e0b87b72091ee901f722bf6a43091da0a34f1949dc3e1b7d1f42162e91535bf97ea59adc0
6
+ metadata.gz: 00f499098c0a6cd6bd35aa0819e9978e63648f23d3c7e1b1e57f90c3b6775338beb54fbf956e3e1185666b89362e523e39fadb9403c7722b1d97c4353530a568
7
+ data.tar.gz: e45efa594d08c3271fa53a2b56319d92e97e270c2610595c5ff01ce16b9a8d3e7a6b4ece4da564d82ccb8b5e42f80c0160611dc2ae92a51c7e855be9c94a4113
data/README.md CHANGED
@@ -1,24 +1,29 @@
1
1
  # Baldur
2
2
 
3
- Baldur is a reusable Rails UI engine for apps using the same frontend stack as this repository:
3
+ [![Gem Version](https://badge.fury.io/rb/baldur.svg)](https://badge.fury.io/rb/baldur) [![CI](https://github.com/varunmurkar/baldur/actions/workflows/ci.yml/badge.svg)](https://github.com/varunmurkar/baldur/actions)
4
4
 
5
- - Rails 8
5
+ Batteries-included opinionated Rails UI engine for the importmap, Stimulus, Tailwind stack. Baldur helps Rails teams ship polished UI faster with install generators, reusable ui_* helpers, Tailwind components, and Stimulus wiring for apps using Propshaft, importmap-rails, stimulus-rails, and tailwindcss-rails.
6
+
7
+ ## Supported Stack
8
+
9
+ - **Ruby** `>= 3.3`
10
+ - **Rails** `>= 7.0`
6
11
  - Propshaft
7
12
  - `importmap-rails`
8
13
  - `stimulus-rails`
9
- - `tailwindcss-rails`
14
+ - `tailwindcss-rails` `>= 4.3.0`
10
15
 
11
- ## Install Into Another App
16
+ It ships install generators, ready `ui_*` helpers, Tailwind components, and Stimulus controllers so host teams can skip rebuilding common UI primitives per app.
12
17
 
13
- 1. Add Baldur to the target app `Gemfile`:
18
+ ## Install
14
19
 
15
- Baldur now declares `tailwindcss-rails >= 4.4.0` as a gem dependency, so hosts do not need to add that gem separately unless they want to enforce their own minimum version.
20
+ Add to your `Gemfile`:
16
21
 
17
22
  ```ruby
18
23
  gem "baldur", ">= 0.1.3"
19
24
  ```
20
25
 
21
- 2. Run:
26
+ Run:
22
27
 
23
28
  ```sh
24
29
  bundle install
@@ -26,327 +31,117 @@ bundle exec rails tailwindcss:engines
26
31
  bundle exec rails generate baldur:install
27
32
  ```
28
33
 
29
- 3. Rebuild Tailwind:
34
+ Rebuild Tailwind:
30
35
 
31
36
  ```sh
32
37
  bundle exec rails tailwindcss:build
33
38
  ```
34
39
 
35
- `tailwindcss:engines` creates `app/assets/builds/tailwind/baldur.css` from the engine-owned Tailwind entrypoint. `baldur:install` then imports that generated build into the host Tailwind entrypoint.
36
-
37
- If the host app already runs `tailwindcss:build` or `tailwindcss:watch`, those commands will also create the engine build automatically once the engine entrypoint exists.
38
-
39
- 4. Install optional surfaces as needed:
40
+ Optional surfaces:
40
41
 
41
42
  ```sh
42
43
  bundle exec rails generate baldur:install_panel_secondary
43
44
  bundle exec rails generate baldur:install_google_auth
44
45
  ```
45
46
 
46
- `baldur:install` now includes `Baldur::Optional::AuthPageHelper` in generated `UiHelper`, so `ui_auth_page` is available by default after base install.
47
-
48
- The generators above are still optional and only required when using those specific surfaces.
49
-
50
- Default install behavior keeps Geist loaded through the host `fonts.css` scaffold. If a host app wants a different stack, it should update `fonts.css` and then map the loaded families in `theme.css`.
51
-
52
- ## Security
53
-
54
- - New Baldur releases require MFA for RubyGems owners via gem metadata starting with `0.1.2`.
55
- - Release artifacts should be installed from RubyGems or GitHub releases and can be verified with the published `.sha512` checksum file.
56
- - Report vulnerabilities privately through GitHub Security Advisories.
57
-
58
- To verify a release artifact manually:
59
-
60
- ```sh
61
- sha512sum -c baldur-0.1.3.gem.sha512
62
- ```
63
-
64
- ## Styling Ownership
65
-
66
- Tailwind provides the utility/base layer. Baldur is the source of truth for shared design-system primitives.
67
-
68
- - Import host `fonts.css` before Tailwind so the host controls what font families get loaded.
69
- - Import the generated Baldur Tailwind engine build into the host Tailwind entrypoint.
70
- - Import host `theme.css` after the Baldur build to override only the base palette inputs and font-token mapping.
71
- - Treat host `fonts.css` as the project-specific font loading layer.
72
- - Treat host `theme.css` as the project-specific override layer for palette, font-token mapping, and other brand inputs, not as a place to fork Baldur-owned primitive styles.
73
- - Add host-app styles only for app-specific surfaces after Baldur.
74
- - Do not re-import or override host-local copies of Baldur-owned primitives such as buttons, forms, snackbars, or tables.
75
- - Keep shared elevation semantics in Baldur-owned `--elev-*` tokens. If a host app needs softer or stronger shared shadows, change the Baldur token source instead of swapping raw Tailwind shadow utilities into Baldur-owned primitives.
76
- - Do not keep duplicate copies of Baldur-owned primitives under `app/assets/stylesheets/application/`; leave only app-specific files there.
77
- - Do not keep host copies of Baldur semantic theme files such as `theme/light.css` or `theme/dark.css`.
78
-
79
- ## What The Installer Assumes
80
-
81
- - Tailwind entrypoint exists at `app/assets/tailwind/application.css`
82
- - Host app gets `tailwindcss-rails` through Baldur or its own Gemfile and uses engine builds
83
- - Host app uses importmap Stimulus boot with `app/javascript/controllers`
84
- - Host app gets `app/assets/stylesheets/fonts.css` for font loading and `app/assets/stylesheets/theme.css` for brand and font-token overrides
85
- - Host app can import `app/assets/builds/tailwind/baldur.css` from `app/assets/tailwind/application.css`
86
-
87
- ## Building UI
88
-
89
- Canonical Ruby internals live under `Baldur::*`, but the default DX is `ui_*` helpers through the generated `UiHelper` include.
90
-
91
- Not every `ui_*` helper is part of the base install. Some helpers belong to optional surfaces and require the matching generator. `ui_auth_page` is part of the default install; `ui_panel_secondary` and google-auth helpers are optional.
92
-
93
- Examples:
94
-
95
- ```erb
96
- <%= ui_button(label: "Save", href: "#") %>
97
-
98
- <%= ui_card(title: "Revenue") do %>
99
- <p>Content</p>
100
- <% end %>
101
-
102
- <%= ui_panel_secondary(id: "assistant", title: "Assistant", trigger_label: "Open") do %>
103
- <p>Panel content</p>
104
- <% end %>
105
- ```
106
-
107
- External triggers can open a Baldur panel declaratively:
108
-
109
- ```erb
110
- <button
111
- type="button"
112
- data-open-panel="#assistant"
113
- data-panel-payload="<%= json_escape({ source: "dashboard" }.to_json) %>">
114
- Open assistant
115
- </button>
116
- ```
117
-
118
- `panel-secondary` emits `baldur:panel:opened` and `baldur:panel:closed` on the panel shell and `window`. The event detail includes `id`, `selector`, `trigger`, and parsed `payload`.
119
-
120
- For modals, prefer `ui_modal` directly:
121
-
122
- ```erb
123
- <%= ui_modal(id: "confirm-delete", title: "Delete item") do %>
124
- <p>This action cannot be undone.</p>
125
- <% end %>
126
- ```
127
-
128
- For auth layouts, use `ui_auth_page` (available after `baldur:install`):
129
-
130
- ```erb
131
- <%= ui_auth_page(title: "Sign in", description: nil, brand_path: root_path) do %>
132
- <%= yield %>
133
- <% end %>
134
- ```
135
-
136
- Auth flash messaging can be rendered inside the card by passing `notice:` / `alert:`:
47
+ ## Example
137
48
 
138
- ```erb
139
- <%= ui_auth_page(title: "Sign in", description: nil, brand_path: root_path, notice: notice, alert: alert) do %>
140
- <%= yield %>
141
- <% end %>
142
- ```
143
-
144
- If a host app keeps a shared wrapper partial around `ui_modal`, treat `modal_body:` as the wrapper-local input and let the wrapper pass that content into `ui_modal`. Avoid calling a wrapper with `body:` through `render`, since `body` collides with Rails render options.
145
-
146
- For horizontal primary/secondary CTA groups, prefer `ui_action_row`:
49
+ Render a sidebar with navigation and a main content area:
147
50
 
148
51
  ```erb
149
- <%= ui_action_row(
150
- secondary_button: { label: "Back", variant: :outline, href: settings_path },
151
- primary_button: { label: "Save", variant: :primary, type: :submit }
152
- ) %>
153
- ```
154
-
155
- The action row owns the responsive layout and keeps the primary CTA last on the right.
156
-
157
- Use `ui_alert` for inline status surfaces. Alerts support optional inline actions and opt-in collapsed state:
158
-
159
- ```erb
160
- <%= ui_alert(
161
- variant: :warning,
162
- title: "Data freshness warning",
163
- actions: ui_button(label: "Upload Latest Data", href: new_ecommerce_import_path, variant: :primary, size: :sm),
164
- collapsible: true,
165
- collapse_key: "tenant-#{current_tenant.id}-executive-pulse-stale-data"
166
- ) do %>
167
- <p>Latest available data is 10 days old.</p>
168
- <% end %>
169
- ```
170
-
171
- Collapsed alerts stay inline and can be re-expanded with the built-in `More` summary action.
172
-
173
- ## Tables
174
-
175
- Use the table helpers as a small composition system:
176
-
177
- - `ui_table` is the table atom.
178
- - `ui_table_card` is the card shell for title, controls, table body, and footer.
179
- - `ui_table_footer` owns the `Show [x] items per page` control and the `Showing x-y of z` status line.
180
- - `ui_pagination` is the page-navigation atom and is usually composed through `ui_table_footer`.
181
-
182
- If a table has title, controls, rows, and pagination, render them inside the same `ui_table_card`.
183
-
184
- Use `ui_table` directly for embedded or simple tables:
185
-
186
- ```erb
187
- <%= ui_table(
188
- columns: [
189
- { label: "SKU", key: :sku },
190
- { label: "Status", key: :status },
191
- { label: "Revenue", key: :revenue, header_class: "text-right", cell_class: "text-right" }
192
- ],
193
- rows: [
194
- { sku: "SKU-001", status: "Active", revenue: number_to_currency(12_500) },
195
- { sku: "SKU-002", status: "Draft", revenue: number_to_currency(3_800) }
196
- ],
197
- empty_state: "No SKUs found"
198
- ) %>
199
- ```
200
-
201
- Use `ui_table_card` when the table is a standalone surface:
202
-
203
- ```erb
204
- <% table_controls = capture do %>
205
- <div class="flex items-end gap-3">
206
- <%= ui_menu_select_tag :status,
207
- options: [
208
- { label: "All", value: "all" },
209
- { label: "Active", value: "active" },
210
- { label: "Draft", value: "draft" }
211
- ],
212
- selected: params[:status].presence || "all",
213
- label: "Status" %>
214
- </div>
215
- <% end %>
216
-
217
- <%= ui_table_card(
218
- title: "Products",
219
- description: "Track inventory and performance in one place.",
220
- controls: table_controls,
221
- controls_position: :header,
222
- footer: ui_table_footer(
223
- current_page: @pagination[:current_page],
224
- total_pages: @pagination[:total_pages],
225
- total_count: @pagination[:total_count],
226
- per_page: @pagination[:per_page],
227
- path_builder: ->(page) { products_path(request.query_parameters.merge(page: page, per_page: @pagination[:per_page])) },
228
- rows_per_page_param: "per_page",
229
- rows_per_page_options: [10, 20, 50],
230
- rows_per_page_selected: @pagination[:per_page]
231
- )
232
- ) do %>
233
- <%= ui_table(
234
- sort: { key: params[:sort], direction: params[:direction] },
235
- sort_path_builder: ->(sort_key, direction) { products_path(request.query_parameters.merge(sort: sort_key, direction: direction, page: 1)) },
236
- columns: [
237
- { label: "SKU", key: :sku, sortable: true, sort_key: "sku" },
238
- { label: "Status", key: :status },
239
- {
240
- label: "Revenue",
241
- key: :revenue,
242
- sortable: true,
243
- sort_key: "revenue",
244
- header_class: "text-right",
245
- cell_class: "text-right",
246
- header_tooltip: "Total revenue attributed to the current filter window."
247
- }
248
- ],
249
- rows: @rows,
250
- empty_state: "No products found"
251
- ) %>
52
+ <%= ui_sidebar(
53
+ brand_path: root_path,
54
+ primary_links: [
55
+ { name: "Dashboard", path: root_path, icon: "layout-dashboard", active: current_page?(root_path) }
56
+ ]
57
+ ) do |_sidebar| %>
58
+ <main class="flex-1 p-6">
59
+ <h1>Dashboard</h1>
60
+ </main>
252
61
  <% end %>
253
62
  ```
254
63
 
255
- Use `controls_position: :header` for compact data-view controls that belong in the top-right header zone. Keep the default `:row` placement for wider filter bars. You can also pass `title_meta:` to render subdued inline metadata beside the title, for example `title_meta: "24 rows"`.
64
+ ## Getting Started
256
65
 
257
- Sorting is opt-in: header sort controls render only when a column is marked `sortable: true` and the table receives `sort:` plus `sort_path_builder:`.
66
+ - See [docs/installation.md](docs/installation.md) for install steps.
67
+ - See [docs/sidebar.md](docs/sidebar.md) and [docs/auth.md](docs/auth.md) for common usage patterns.
258
68
 
259
- Use `ui_pagination` directly only when you need bare page navigation without the table-footer composition.
69
+ ## Documentation
260
70
 
261
- ## Marketing Templates
71
+ - [Installation](docs/installation.md)
72
+ - [Styling](docs/styling.md)
73
+ - [Sidebar](docs/sidebar.md)
74
+ - [Auth](docs/auth.md)
75
+ - [Modals and Panels](docs/modals-and-panels.md)
76
+ - [Alerts and Snackbars](docs/alerts-and-snackbars.md)
77
+ - [Tables](docs/tables.md)
78
+ - [Marketing](docs/marketing.md)
79
+ - [Security](docs/security.md)
262
80
 
263
- Keep marketing-page templates separate from app UI primitives. Baldur’s low-level atoms still live under the shared `ui_*` component layer, while full-page marketing surfaces use dedicated `ui_marketing_*` helpers.
264
-
265
- Current canonical marketing helpers:
266
-
267
- - `ui_marketing_top_nav`
268
- - `ui_marketing_hero_section(variant: :solar_system, ...)`
269
- - `ui_marketing_features_section`
270
- - `ui_marketing_testimonials_section(variant: :bento, ...)`
271
- - `ui_marketing_faq_section`
272
- - `ui_marketing_cta_banner`
273
- - `ui_marketing_pricing_tables`
274
- - `ui_marketing_footer`
81
+ ## Security
275
82
 
276
- Use the existing landing and pricing templates as the canonical v1 variants. Future hero or testimonial layouts should be added as new variants, not folded into the existing default markup.
83
+ See [docs/security.md](docs/security.md) for artifact verification, MFA requirements, and vulnerability reporting.
277
84
 
278
- Marketing nav/footer branding comes from `config.marketing_brand` in the Baldur initializer. Hosts can override that deployment-level default per render by passing `brand:` into `ui_marketing_top_nav` or `ui_marketing_footer`. If a future host needs tenant-specific or whitelabel branding, resolve/cache that in the app and pass the resolved values through `brand:` rather than teaching Baldur about tenant lookup.
85
+ ## Available Now
279
86
 
280
- Interactive marketing templates ship with Baldur-owned Stimulus controllers. `baldur:install` now generates `marketing_tabs_controller.js` and `marketing_pricing_controller.js` shims so features tabs and pricing billing toggles do not depend on host-specific controller names.
87
+ - [x] Host app brand theming via `theme.css` and `config.marketing_brand`
88
+ - [x] Reusable auth page shell for sign-in, sign-up, and password reset
89
+ - [x] Core UI helpers, Tailwind components, and Stimulus wiring
281
90
 
282
- `config.marketing_brand` supports `name`, `wordmark`, `logo_src`, `logo_alt`, and optional `href`. Hosts should treat that config as the canonical branding contract instead of relying on helper-method coupling.
91
+ ## Roadmap
283
92
 
284
- Example hero usage:
93
+ ### Installing
94
+ - Harden `baldur:install` so host assumptions are reduced
95
+ - Expand `script/verify_host_install` coverage
96
+ - Add end-to-end install verification in dummy app
285
97
 
286
- ```erb
287
- <%= ui_marketing_hero_section(
288
- variant: :solar_system,
289
- headline: "Turn Every Data Point Into ROI",
290
- body: "Connect fragmented data into one decision engine.",
291
- primary_action: { label: "Book a Demo", variant: :primary, href: dashboard_path },
292
- secondary_action: { label: "See Use Cases", variant: :outline, href: "#use-cases" },
293
- supporting_action: { href: "#", label: "Watch walkthrough", data: { open_modal: "#walkthrough-modal" } },
294
- callouts: [
295
- { label: "Unified decision context" },
296
- { label: "Prioritized recommendations" },
297
- { label: "Impact-aware next actions" }
298
- ],
299
- orbit_sources: [
300
- { name: "Shopify", asset_path: "/landing/source-logos/shopify.svg" },
301
- { name: "HubSpot", asset_path: "/landing/source-logos/hubspot.svg" }
302
- ],
303
- centerpiece_image: { src: "/branding/logo.png", alt: "Acme logo" }
304
- ) %>
305
- ```
98
+ ### Showcase
99
+ - Add a dedicated dummy app for visual smoke checks
100
+ - Add component inventory/showcase page in dummy app
101
+ - Add interaction showcase pages for modal, sidebar, menu select, snackbar, and panel_secondary
102
+ - Add copy-paste examples for core surfaces from the showcase app back into docs
306
103
 
307
- Example features section usage:
104
+ ### Starter Templates
105
+ - Add dedicated password reset templates
106
+ - Add magic link templates
107
+ - Add error/system pages
108
+ - Add starter settings page layout
109
+ - Add starter CRUD index/show/form templates
110
+ - Add starter dashboard shell/page templates
308
111
 
309
- ```erb
310
- <%= ui_marketing_features_section(
311
- title: "What Mimir unlocks for your teams",
312
- description: "Tailored to your business model and decision priorities.",
313
- tabs: [
314
- {
315
- value: "ecommerce",
316
- label: "E-commerce",
317
- selected: true,
318
- panel_title: "E-commerce",
319
- panel_body: "Priority ROI plays for commerce teams.",
320
- cards: [
321
- { title: "Which products should I run campaigns for?", body: "Rank SKUs by incremental margin potential." }
322
- ]
323
- }
324
- ],
325
- cta: { label: "Get a demo tailored for you", variant: :primary, href: dashboard_path }
326
- ) %>
327
- ```
112
+ ### Forms
113
+ - Add Rails form-builder integration for Baldur fields
114
+ - Bind labels, hints, errors, and invalid states automatically
115
+ - Document model-bound form usage
328
116
 
329
- ## Snackbars
117
+ ### Tables and Resource Screens
118
+ - Add a higher-level resource index pattern on top of existing table primitives
119
+ - Support search, filters, row actions, bulk select, and empty states
120
+ - Document recommended resource index composition
330
121
 
331
- Use semantic snackbar tones:
122
+ ### Theming
123
+ - Add a small set of starter theme presets
124
+ - Improve dark-mode/theme controller documentation
125
+ - Document brand-token customization more clearly
332
126
 
333
- - `:success` for green success states
334
- - `:notice` for blue notice/info states
335
- - `:warning` for amber warning states
336
- - `:error` for red error states
127
+ ### Accessibility
128
+ - Audit keyboard and focus behavior across interactive components
129
+ - Add accessibility-focused tests for core surfaces
130
+ - Document a11y guarantees and known gaps
337
131
 
338
- Host apps should map `flash[:notice]` to `:notice` and `flash[:alert]` to `:error` unless they have a stronger semantic signal available.
132
+ ### Internationalization
133
+ - Add I18n-friendly labels/messages for reusable helpers
134
+ - Remove hard-coded helper copy where practical
135
+ - Document translation override points
339
136
 
340
- ## Smoke Check
137
+ ## Contributing
341
138
 
342
- Run this from the host app root after installation:
139
+ Open an issue or PR. Before you start, read [CONTRIBUTING.md](CONTRIBUTING.md) and [docs/security.md](docs/security.md).
343
140
 
344
- ```sh
345
- bundle exec ruby "$(bundle show baldur)/script/verify_host_install"
346
- ```
141
+ ## Changelog
347
142
 
348
- That verifies the host can render core helpers and confirms the Tailwind entrypoint contains the required Baldur imports.
143
+ See [CHANGELOG.md](CHANGELOG.md).
349
144
 
350
- ## Deferred Work
145
+ ## License
351
146
 
352
- See `TODO.md` for work intentionally deferred until the dedicated gem repo exists.
147
+ MIT. See [LICENSE](LICENSE).
data/TODO.md CHANGED
@@ -1,7 +1,50 @@
1
1
  # Baldur TODO
2
2
 
3
- - Improve RubyGems page description for DX
3
+ ## Install and Verification
4
+ - [ ] Harden `baldur:install` so host assumptions are reduced
5
+ - [ ] Audit generated controller shims against all shipped components
6
+ - [ ] Expand `script/verify_host_install` coverage
7
+ - [ ] Add end-to-end install verification in dummy app
4
8
 
5
- - Add a dedicated dummy app in the extracted gem repo for visual smoke checks.
6
- - Add a component inventory/showcase page in that dummy app.
7
- - Add a few interaction-specific showcase pages for modal, sidebar, menu select, snackbar, and `panel_secondary`.
9
+ ## Showcase App and Docs
10
+ - [ ] Add a dedicated dummy app in the extracted gem repo for visual smoke checks
11
+ - [ ] Add a component inventory/showcase page in that dummy app
12
+ - [ ] Add interaction showcase pages for modal, sidebar, menu select, snackbar, and `panel_secondary`
13
+ - [ ] Add copy-paste examples for core surfaces from the showcase app back into docs
14
+
15
+ ## Starter Templates
16
+ - [ ] Add dedicated password reset templates
17
+ - [ ] Add magic link templates
18
+ - [ ] Add error/system pages
19
+ - [ ] Add starter settings page layout
20
+ - [ ] Add starter CRUD index/show/form templates
21
+ - [ ] Add starter dashboard shell/page templates
22
+
23
+ ## Forms
24
+ - [ ] Add Rails form-builder integration for Baldur fields
25
+ - [ ] Bind labels, hints, errors, and invalid states automatically
26
+ - [ ] Document model-bound form usage
27
+
28
+ ## Tables and Resource Screens
29
+ - [ ] Add a higher-level resource index pattern on top of existing table primitives
30
+ - [ ] Support search, filters, row actions, bulk select, and empty states
31
+ - [ ] Document recommended resource index composition
32
+
33
+ ## Theming
34
+ - [ ] Add a small set of starter theme presets
35
+ - [ ] Improve dark-mode/theme controller documentation
36
+ - [ ] Document brand-token customization more clearly
37
+
38
+ ## Accessibility
39
+ - [ ] Audit keyboard and focus behavior across interactive components
40
+ - [ ] Add accessibility-focused tests for core surfaces
41
+ - [ ] Document a11y guarantees and known gaps
42
+
43
+ ## Internationalization
44
+ - [ ] Add I18n-friendly labels/messages for reusable helpers
45
+ - [ ] Remove hard-coded helper copy where practical
46
+ - [ ] Document translation override points
47
+
48
+ ## Contributor and Agent Guidance
49
+ - [ ] Add `.agents/AGENTS.md` with project conventions and reference files for LLM agents
50
+ - [ ] Keep `.agents/AGENTS.md` in sync with actual project conventions
@@ -0,0 +1,23 @@
1
+ import { Controller } from "@hotwired/stimulus";
2
+
3
+ export default class ConfirmationController extends Controller {
4
+ static targets = ["input", "submit", "expectedText"];
5
+ static values = { caseSensitive: { type: Boolean, default: true } };
6
+
7
+ connect() {
8
+ this.validate();
9
+ }
10
+
11
+ validate() {
12
+ if (!this.hasSubmitTarget || !this.hasInputTarget) return;
13
+
14
+ const input = this.inputTarget.value.trim();
15
+ const expected = this.hasExpectedTextTarget ? this.expectedTextTarget.textContent.trim() : "";
16
+
17
+ const matches = this.caseSensitiveValue
18
+ ? input === expected
19
+ : input.toLowerCase() === expected.toLowerCase();
20
+
21
+ this.submitTarget.disabled = !matches;
22
+ }
23
+ }
@@ -0,0 +1,22 @@
1
+ @layer components {
2
+ .auth-page {
3
+ display: flex;
4
+ min-height: 100vh;
5
+ align-items: center;
6
+ justify-content: center;
7
+ padding: var(--space-6);
8
+ background: var(--color-surface-low);
9
+ }
10
+
11
+ .auth-page__container {
12
+ width: 32rem;
13
+ max-width: 100%;
14
+ margin-inline: auto;
15
+ }
16
+
17
+ .auth-page__brand {
18
+ display: flex;
19
+ justify-content: center;
20
+ margin-bottom: var(--space-6);
21
+ }
22
+ }
@@ -0,0 +1,11 @@
1
+ @layer components {
2
+ .confirmation-modal__input-wrapper {
3
+ margin-top: var(--space-4);
4
+ }
5
+
6
+ [data-confirmation] .text-field__control:focus {
7
+ border-color: var(--color-primary);
8
+ outline: none;
9
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 24%, transparent);
10
+ }
11
+ }