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 +4 -4
- data/README.md +87 -292
- data/TODO.md +47 -4
- data/app/assets/javascripts/baldur/controllers/confirmation_controller.js +23 -0
- data/app/assets/stylesheets/baldur/application/components/auth-page.css +22 -0
- data/app/assets/stylesheets/baldur/application/components/confirmation.css +11 -0
- data/app/assets/stylesheets/baldur/application/components/sidebar.css +234 -0
- data/app/assets/stylesheets/baldur.css +2 -0
- data/app/helpers/baldur/ui_helper.rb +26 -0
- data/app/helpers/baldur/ui_helper_sidebar.rb +104 -0
- data/app/views/baldur/components/_confirmation_modal.html.erb +99 -0
- data/app/views/baldur/components/_modal_host.html.erb +10 -0
- data/app/views/baldur/components/_sidebar.html.erb +158 -0
- data/app/views/baldur/optional/_auth_page.html.erb +3 -3
- data/baldur.gemspec +4 -4
- data/lib/baldur/version.rb +1 -1
- data/lib/generators/baldur/install/install_generator.rb +2 -0
- data/test/confirmation_modal_helper_test.rb +241 -0
- data/test/install_generator_test.rb +1 -0
- data/test/sidebar_helper_test.rb +69 -0
- data/test/test_helper.rb +2 -1
- data/test/tmp/install_generator/app/javascript/controllers/confirmation_controller.js +1 -0
- data/test/tmp/install_generator/app/javascript/controllers/mobile_sidebar_controller.js +1 -0
- metadata +21 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 633d727781f1701dcac870818b72d1c8df5ea9392cee702502ce5bd45aa1ef8a
|
|
4
|
+
data.tar.gz: aa155789ea73b321dff4cb7d795e5291c7613cbcff8b24142558c8b9cd0e3700
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 00f499098c0a6cd6bd35aa0819e9978e63648f23d3c7e1b1e57f90c3b6775338beb54fbf956e3e1185666b89362e523e39fadb9403c7722b1d97c4353530a568
|
|
7
|
+
data.tar.gz: e45efa594d08c3271fa53a2b56319d92e97e270c2610595c5ff01ce16b9a8d3e7a6b4ece4da564d82ccb8b5e42f80c0160611dc2ae92a51c7e855be9c94a4113
|
data/README.md
CHANGED
|
@@ -1,24 +1,29 @@
|
|
|
1
1
|
# Baldur
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://badge.fury.io/rb/baldur) [](https://github.com/varunmurkar/baldur/actions)
|
|
4
4
|
|
|
5
|
-
- Rails
|
|
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
|
-
|
|
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
|
-
|
|
18
|
+
## Install
|
|
14
19
|
|
|
15
|
-
|
|
20
|
+
Add to your `Gemfile`:
|
|
16
21
|
|
|
17
22
|
```ruby
|
|
18
23
|
gem "baldur", ">= 0.1.3"
|
|
19
24
|
```
|
|
20
25
|
|
|
21
|
-
|
|
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
|
-
|
|
34
|
+
Rebuild Tailwind:
|
|
30
35
|
|
|
31
36
|
```sh
|
|
32
37
|
bundle exec rails tailwindcss:build
|
|
33
38
|
```
|
|
34
39
|
|
|
35
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
<%=
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
)
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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
|
-
|
|
64
|
+
## Getting Started
|
|
256
65
|
|
|
257
|
-
|
|
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
|
-
|
|
69
|
+
## Documentation
|
|
260
70
|
|
|
261
|
-
|
|
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
|
-
|
|
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
|
-
|
|
83
|
+
See [docs/security.md](docs/security.md) for artifact verification, MFA requirements, and vulnerability reporting.
|
|
277
84
|
|
|
278
|
-
|
|
85
|
+
## Available Now
|
|
279
86
|
|
|
280
|
-
|
|
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
|
-
|
|
91
|
+
## Roadmap
|
|
283
92
|
|
|
284
|
-
|
|
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
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
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
|
-
|
|
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
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
334
|
-
-
|
|
335
|
-
-
|
|
336
|
-
-
|
|
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
|
-
|
|
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
|
-
##
|
|
137
|
+
## Contributing
|
|
341
138
|
|
|
342
|
-
|
|
139
|
+
Open an issue or PR. Before you start, read [CONTRIBUTING.md](CONTRIBUTING.md) and [docs/security.md](docs/security.md).
|
|
343
140
|
|
|
344
|
-
|
|
345
|
-
bundle exec ruby "$(bundle show baldur)/script/verify_host_install"
|
|
346
|
-
```
|
|
141
|
+
## Changelog
|
|
347
142
|
|
|
348
|
-
|
|
143
|
+
See [CHANGELOG.md](CHANGELOG.md).
|
|
349
144
|
|
|
350
|
-
##
|
|
145
|
+
## License
|
|
351
146
|
|
|
352
|
-
|
|
147
|
+
MIT. See [LICENSE](LICENSE).
|
data/TODO.md
CHANGED
|
@@ -1,7 +1,50 @@
|
|
|
1
1
|
# Baldur TODO
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
6
|
-
- Add a
|
|
7
|
-
- Add a
|
|
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
|
+
}
|