lostcoords-ui 0.5.0 → 0.7.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 (70) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +111 -49
  3. data/app/assets/tailwind/lostcoords/ui/card.css +5 -2
  4. data/app/assets/tailwind/lostcoords/ui/{disclosure.css → collapsible.css} +1 -1
  5. data/app/assets/tailwind/lostcoords/ui/components/code-block.css +5 -0
  6. data/app/assets/tailwind/lostcoords/ui/components/collapsible.css +5 -0
  7. data/app/assets/tailwind/lostcoords/ui/components/dialog.css +9 -0
  8. data/app/assets/tailwind/lostcoords/ui/components/emoji-picker.css +5 -0
  9. data/app/assets/tailwind/lostcoords/ui/components/menu.css +5 -0
  10. data/app/assets/tailwind/lostcoords/ui/components/prose.css +3 -0
  11. data/app/assets/tailwind/lostcoords/ui/components/table.css +3 -0
  12. data/app/assets/tailwind/lostcoords/ui/components/toast.css +5 -0
  13. data/app/assets/tailwind/lostcoords/ui/components/tooltip.css +4 -0
  14. data/app/assets/tailwind/lostcoords/ui/components.css +12 -25
  15. data/app/assets/tailwind/lostcoords/ui/core.css +21 -0
  16. data/app/assets/tailwind/lostcoords/ui/emoji-picker.css +45 -47
  17. data/app/assets/tailwind/lostcoords/ui/popover.css +0 -52
  18. data/app/assets/tailwind/lostcoords/ui/{reading.css → prose.css} +6 -0
  19. data/app/assets/tailwind/lostcoords/ui/sheet.css +3 -64
  20. data/app/assets/tailwind/lostcoords/ui/theme.css +16 -1
  21. data/app/assets/tailwind/lostcoords/ui/toast.css +23 -0
  22. data/app/assets/tailwind/lostcoords/ui/tooltip.css +12 -11
  23. data/app/assets/tailwind/lostcoords/ui/typography.css +1 -7
  24. data/app/helpers/lostcoords/ui/badge_helper.rb +2 -2
  25. data/app/helpers/lostcoords/ui/button_helper.rb +12 -6
  26. data/app/helpers/lostcoords/ui/choice_helper.rb +11 -7
  27. data/app/helpers/lostcoords/ui/collapsible_helper.rb +9 -0
  28. data/app/helpers/lostcoords/ui/dialog_helper.rb +10 -5
  29. data/app/helpers/lostcoords/ui/emoji_picker_helper.rb +6 -0
  30. data/app/helpers/lostcoords/ui/feedback_helper.rb +2 -2
  31. data/app/helpers/lostcoords/ui/form_helper.rb +4 -3
  32. data/app/helpers/lostcoords/ui/glass_helper.rb +1 -1
  33. data/app/helpers/lostcoords/ui/menu_helper.rb +37 -2
  34. data/app/helpers/lostcoords/ui/navigation_helper.rb +17 -4
  35. data/app/helpers/lostcoords/ui/render_attributes_helper.rb +17 -1
  36. data/app/helpers/lostcoords/ui/sheet_helper.rb +4 -0
  37. data/app/helpers/lostcoords/ui/structures_helper.rb +7 -95
  38. data/app/helpers/lostcoords/ui/toast_helper.rb +22 -0
  39. data/app/helpers/lostcoords/ui/{overlay_helper.rb → tooltip_helper.rb} +3 -3
  40. data/app/helpers/lostcoords/ui/typography_helper.rb +30 -0
  41. data/app/javascript/lostcoords/ui/controllers/lc_collapsible_controller.js +1 -1
  42. data/app/javascript/lostcoords/ui/controllers/lc_emoji_picker_controller.js +34 -6
  43. data/app/javascript/lostcoords/ui/controllers/lc_kbd_controller.js +12 -0
  44. data/app/javascript/lostcoords/ui/controllers/lc_menu_controller.js +23 -1
  45. data/app/javascript/lostcoords/ui/controllers/lc_selection_controller.js +8 -16
  46. data/app/javascript/lostcoords/ui/controllers/lc_sheet_controller.js +15 -3
  47. data/app/javascript/lostcoords/ui/controllers/lc_shortcut_controller.js +45 -0
  48. data/app/javascript/lostcoords/ui/controllers/lc_tabs_controller.js +18 -15
  49. data/app/javascript/lostcoords/ui/controllers/lc_toast_region_controller.js +62 -0
  50. data/app/javascript/lostcoords/ui/controllers/lc_tooltip_controller.js +46 -6
  51. data/app/javascript/lostcoords/ui/helpers/catalog_picker.js +72 -20
  52. data/app/javascript/lostcoords/ui/helpers/dismiss_stack.js +23 -0
  53. data/app/javascript/lostcoords/ui/helpers/floating_panel.js +6 -7
  54. data/app/javascript/lostcoords/ui/helpers/menu_keys.js +19 -18
  55. data/app/javascript/lostcoords/ui/helpers/roving_focus.js +175 -0
  56. data/app/javascript/lostcoords/ui/helpers/shortcuts.js +162 -0
  57. data/app/javascript/lostcoords/ui/helpers/top_layer.js +48 -10
  58. data/app/javascript/lostcoords/ui/index.js +6 -0
  59. data/app/views/lostcoords/ui/components/_emoji_picker.html.erb +27 -27
  60. data/app/views/lostcoords/ui/components/_emoji_picker_grid.html.erb +3 -3
  61. data/app/views/lostcoords/ui/components/_lc_code_block.html.erb +1 -1
  62. data/lib/lostcoords/ui/action_view.rb +1 -0
  63. data/lib/lostcoords/ui/builders.rb +2 -2
  64. data/lib/lostcoords/ui/form_builder.rb +55 -10
  65. data/lib/lostcoords/ui/stylesheets.rb +25 -0
  66. data/lib/lostcoords/ui/version.rb +1 -1
  67. data/lib/tasks/lostcoords_ui.rake +11 -0
  68. metadata +23 -6
  69. data/config/helper_renames.json +0 -111
  70. data/script/migrate_helpers.rb +0 -136
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 98c4a5462076698b306ba4013842be9e482462b4b1d83a4ecec663eca464b1b8
4
- data.tar.gz: efd40dc35a5ddac809f39cc56aafb6abb6cae280a5ce72285337563a67083335
3
+ metadata.gz: 471fb41889b06f5e2adebcead43c299a7da5930df990e1c021c16276d35b80a9
4
+ data.tar.gz: 5daa36f87b519492932c134a51756b6ad84767057f1c49157e5e8a1dc23d7e20
5
5
  SHA512:
6
- metadata.gz: 0c96d71f3a3cf83594571f5e32e3380319533dbaa08f217c1eb483e2a1379f2d7646f9ccad5751eadbfe01171aa86aef943df4ae27888a9741fc4e6d93ac32f0
7
- data.tar.gz: a3858d8250702539a339c13a7ce6641e43cab5e777bc50a10c9037428f3fd435a9fe2b2ff4b473b60f91dd35f4f78c140c1066518a693f91b2f3007736f60ae5
6
+ metadata.gz: a596e626cb38bb949e96a6ed087e0566ff5a874dbf8d5c6d23e1e631579a22e2b5f3f9eaa85afd370856d2639ce39393746c3b45954c38d149a1b558755442b4
7
+ data.tar.gz: 3cb8ebe401d0ffbf1cc2626cd9f98a4ec002e6715fcb189cd6329e5cddc3879ecd0149c21cdba1ffa747dd745bad31e0c49f7d11e90a707ac2f784f4f30fc38c
data/README.md CHANGED
@@ -21,7 +21,7 @@ its gem version, so publishing a library update does not upgrade consumers.
21
21
  ## Install
22
22
 
23
23
  ```ruby
24
- gem "lostcoords-ui", "~> 0.5.0"
24
+ gem "lostcoords-ui", "~> 0.7.0"
25
25
  ```
26
26
 
27
27
  The engine adds its rendering helpers to host views, its JavaScript to the asset paths and its pins to
@@ -57,6 +57,26 @@ It does not set body styles, heading defaults, global inline-code styles or docu
57
57
  Map the library's tokens to your app's theme and keep your Tailwind theme declarations after the import.
58
58
  The full `ui.css` entry includes those document defaults and remains the Rails default.
59
59
 
60
+ Tailwind always ships component rules, used or not, and generates every utility the scanned helpers
61
+ mention. For a smaller build, import `core.css` and the opt-in components you render instead of
62
+ everything. Each entry carries the rules and scans the sources of its own component only. In Rails,
63
+ every Tailwind build writes stable paths for them next to the engine's own import:
64
+
65
+ ```css
66
+ /* app/assets/tailwind/application.css, instead of ../builds/tailwind/lostcoords_ui.css */
67
+ @import "../builds/tailwind/lostcoords_ui/base.css";
68
+ @import "../builds/tailwind/lostcoords_ui/core.css";
69
+ @import "../builds/tailwind/lostcoords_ui/components/dialog.css";
70
+ @import "../builds/tailwind/lostcoords_ui/components/menu.css";
71
+ ```
72
+
73
+ Outside Rails, import the same files from `app/assets/tailwind/lostcoords/ui/` in the gem.
74
+ `base.css` holds the document defaults that `ui.css` adds; skip it when the host owns its base styles.
75
+ `core.css` holds the tokens, buttons, badges, avatars, cards, alerts, form controls, choices,
76
+ toggles, layout, typography and navigation. The opt-in entries are `dialog` (with the phone sheet),
77
+ `menu` (menus and popovers), `toast`, `tooltip`, `collapsible`, `code-block`,
78
+ `emoji-picker`, `table` and `prose`. A component whose entry is missing renders unstyled.
79
+
60
80
  Start one Stimulus application in the host, then register the controllers you use:
61
81
 
62
82
  ```javascript
@@ -68,7 +88,10 @@ registerControllers(application, { only: ["lc-copy", "lc-collapsible"] })
68
88
  ```
69
89
 
70
90
  Resolve `lostcoords/ui/*` to the gem's `app/javascript/lostcoords/ui/*` and `@hotwired/stimulus` to
71
- the host's installed package. Build configuration belongs to the host. The entry does not start
91
+ the host's installed package. `registerControllers` imports every controller, so a bundle carries
92
+ them all; to bundle only some, import them directly:
93
+ `import Dialog from "lostcoords/ui/controllers/lc_dialog_controller"` and
94
+ `application.register("lc-dialog", Dialog)`. Build configuration belongs to the host. The entry does not start
72
95
  Stimulus or register anything on import. Omit `only` to register all library controllers. Register
73
96
  defaults before application overrides. Repeated calls on the same application preserve later
74
97
  overrides; unknown controller identifiers raise before registration.
@@ -153,9 +176,20 @@ container pads with `px-gutter`.
153
176
  ### Importmap
154
177
 
155
178
  The engine pins its modules under `lostcoords/ui/*`. Controllers are also pinned under the host's
156
- `controllers/*` key with an `lc_` prefix, so `eagerLoadControllersFrom("controllers", application)`
157
- registers them as `lc-dialog`, `lc-menu`, `lc-copy` and so on. A host file with the same name, such as
158
- `app/javascript/controllers/lc_dialog_controller.js`, replaces the gem's.
179
+ `controllers/*` key with an `lc_` prefix, so Rails' controller loading registers them as `lc-dialog`,
180
+ `lc-menu`, `lc-copy` and so on. Load them lazily, so a page downloads only the controllers it uses,
181
+ the first time their `data-controller` appears:
182
+
183
+ ```javascript
184
+ // app/javascript/controllers/index.js
185
+ import { lazyLoadControllersFrom } from "@hotwired/stimulus-loading"
186
+ import { application } from "controllers/application"
187
+
188
+ lazyLoadControllersFrom("controllers", application)
189
+ ```
190
+
191
+ `eagerLoadControllersFrom` also works and downloads all of them on every page. A host file with the
192
+ same name, such as `app/javascript/controllers/lc_dialog_controller.js`, replaces the gem's.
159
193
 
160
194
  ## Components
161
195
 
@@ -199,7 +233,7 @@ Wrap wide tables in an app-owned horizontal scroll region with an accessible nam
199
233
  Use `lc_table_class` when an existing table renderer owns the markup.
200
234
 
201
235
  Cards share one API: `lc_card(padding: :md)`, with `:sm` and `:none` for tighter or custom spacing. Padding sizes set `--lc-inset`, so content inside follows the card.
202
- Inputs keep their `--input` fill inside cards; set `--lc-field-bg` to change it in one context. Cards provide avatar cutouts, a page-colored background for choice tiles, and a validation border when they contain errors.
236
+ Inputs keep their `--input` fill inside cards; set `--lc-field-bg` to change it in one context. Cards provide avatar cutouts and a validation border when they contain errors. Fills that are muted on the page switch so they stay visible on the card: choice tiles, alerts, neutral badges and skeletons take the page background (`--lc-tile-bg`), and toggle group and tab tracks take the accent fill (`--lc-track-bg`). Set either variable to apply the same context to your own muted surface.
203
237
  Add `class: "@container"` when a card owns its width and its children use container queries.
204
238
  Use `--lc-card-bg`, `--lc-card-border`, `--lc-card-radius` and `--lc-card-shadow` for local appearance overrides.
205
239
 
@@ -208,7 +242,7 @@ Use `--lc-card-bg`, `--lc-card-border`, `--lc-card-radius` and `--lc-card-shadow
208
242
  Badge, icon badge, Alert and Toast share `neutral`, `primary`, `success`, `warning` and `destructive` tones.
209
243
 
210
244
  `lc_toggle` renders a pressed button. Use `lc_toggle_group` with `lc_toggle_group_item` for mutually exclusive
211
- choices and a native submitted value. Navigation uses `lc_button_link_to` and `aria-current`, so links keep their native behavior.
245
+ choices and a native submitted value; it is a radiogroup of radio buttons to assistive technology. Navigation uses `lc_button_link_to` and `aria-current`, so links keep their native behavior.
212
246
  `lc_collapsible` expands content through a native `<details>` element. `lc_alert` renders persistent inline feedback;
213
247
  `lc_toast` adds timed dismissal.
214
248
 
@@ -284,8 +318,9 @@ to omit it. `lc_choice_group` groups them in a fieldset with a legend, hint and
284
318
  ```
285
319
 
286
320
  Tabs follow the ARIA tabs pattern with arrow key, Home and End navigation, and dispatch
287
- `lc-tabs:change`. Tooltips show on hover and keyboard focus, Escape hides them, and they describe
288
- their trigger; keep essential information visible. Description lists stack on phones and use two
321
+ `lc-tabs:change`. `orientation: :vertical` stacks the tabs beside their panels and moves with Arrow Up
322
+ and Down; `activation: :manual` moves focus with the arrows and selects with Enter or Space. Tooltips show on hover and keyboard focus, Escape hides them, and they describe
323
+ their trigger, in the top layer; keep essential information visible. Description lists stack on phones and use two
289
324
  columns from `sm`.
290
325
 
291
326
  ```erb
@@ -317,37 +352,68 @@ header and the documentation layout.
317
352
  to choose mobile height stops; the default is `"fit"`. Icon buttons, avatar groups, motion and mobile dialogs
318
353
  appear with their parent component examples.
319
354
 
320
- ### Upgrade to 0.5
321
-
322
- 0.5 renames the theme to shadcn colors and moves every library name under the `lc-` prefix. Preview
323
- the changes with `ruby script/migrate_0_5.rb path/to/app`, then add `--write`. The script handles:
324
-
325
- | 0.4 | 0.5 |
326
- | --- | --- |
327
- | `--surface`, `bg-surface` | `--muted`, `bg-muted`; use `bg-card` for card-like surfaces |
328
- | `--surface-hover` | `--accent` (hover) or `--secondary` (buttons) |
329
- | `--muted`, `text-muted` | `--muted-foreground`, `text-muted-foreground` |
330
- | `--on-primary` | `--primary-foreground` |
331
- | `--danger`, `tone: :danger` | `--destructive`, `tone: :destructive` |
332
- | `--f-body`, `font-body` | `--font-sans`, `font-sans` |
333
- | `--control-bg` | `--input` |
334
- | `--shadow`, `--scrim`, `--glass-*`, `--ui-*`, `--card-*`, `--button-*` | `--lc-` prefixed |
335
- | `ui-*`, `glass`, `squircle`, `press`, `avatar` classes | `lc-*` |
336
- | Stimulus `modal`, `row-menu`, `disclosure`, `sheet`, `toast`, `ui-copy` … | `lc-dialog`, `lc-menu`, `lc-collapsible`, `lc-sheet`, `lc-toast`, `lc-copy` … |
337
- | `size: :base` | `size: :md` |
338
- | `lc_heading size: :page / :section / :card` | `size: :title / :heading / :subheading` |
339
-
340
- Review these by hand:
341
-
342
- - Card `padding: :default` and `:compact` are now `:md` and `:sm`.
343
- - `--lc-heading-*`, `--lc-text-*` and `--lc-space-*` overrides become the `--text-*` and `--spacing-*` theme
344
- tokens, or `--lc-density` and `--lc-inset`.
345
- - Controls are 40px by default instead of 48px.
346
- - `lc_sheet_row_class`, `lc_sheet_chip_class`, `lc_sheet_datetime_input_class`, `lc_sheet_text_input_class`,
347
- `lc_dropdown_trigger_class`, `lc_dialog_surface_class` and the `pill-3d` utility are removed.
348
- - JavaScript imports from `helpers/*` move to `lostcoords/ui/helpers/*`.
349
-
350
- The 0.4 README covers older migrations.
355
+ ### Keyboard
356
+
357
+ Every interactive component works from the keyboard without extra code:
358
+
359
+ | Component | Keys |
360
+ |---|---|
361
+ | Menu | Arrow Down or Up on the button opens on the first or last item. Arrows move and wrap, Home and End jump, a letter jumps to the next item that starts with it, Enter or Space activates, Escape closes and returns focus. |
362
+ | Tabs | Arrows along the tab list's orientation, Home and End. Automatic tabs select on focus; manual tabs on Enter or Space. |
363
+ | Toggle group | One Tab stop. All four arrows move and select, wrapping, as native radios do; Left and Right follow the text direction. |
364
+ | Emoji picker | Arrow Down from the search enters the grid, arrows move through it by row, Arrow Up from the top row returns to the search, and Enter in the search picks the best match. The grid is one Tab stop. |
365
+ | Dialogs, sheets, popovers, menus, tooltips | Escape closes the topmost one and returns focus to what opened it; an open tooltip closes before the menu or dialog around it. Escape in a search field with text clears it first. |
366
+
367
+ Page-wide shortcuts focus a field or press a button. Merge `lc_shortcut_data` into the element's data and
368
+ show the keys with `lc_kbd`:
369
+
370
+ ```erb
371
+ <%= lc_input type: :search, name: "q", aria: { label: "Search" }, data: lc_shortcut_data("mod+k") %>
372
+ <%= lc_button data: lc_shortcut_data("n", action: "projects#new") do %>
373
+ New project <%= lc_kbd "n", aria: { hidden: true } %>
374
+ <% end %>
375
+ ```
376
+
377
+ Keys are joined with `+`: `mod` is ⌘ on Apple platforms and Ctrl elsewhere, and `ctrl`, `alt`, `shift`
378
+ and `meta` name the others. Separate alternatives with spaces. The element announces its keys through
379
+ `aria-keyshortcuts`. Shortcuts without `mod`, `ctrl` or `alt` don't fire while typing in a field, only
380
+ shortcuts inside an open modal dialog respond, and when two visible elements share keys the first wins
381
+ and the console warns. `lc_kbd` renders the Ctrl form and switches to Apple symbols once JavaScript runs.
382
+
383
+ Custom widgets can use the same navigation: `navigate(event, items, { orientation, wrap, typeahead })`
384
+ from `lostcoords/ui/helpers/roving_focus` handles vertical, horizontal and grid layouts, right-to-left
385
+ text, Home and End, and typeahead; `rove(items, current)` keeps a single Tab stop.
386
+
387
+ ### Layers
388
+
389
+ Overlays never need a z-index. Dialogs and sheets open as modal `<dialog>` elements; menus,
390
+ popovers, pickers and tooltips move into the browser's top layer while they are open; toasts go in
391
+ `lc_toast_region`, which does the same. The top layer paints above every z-index, `overflow` clip
392
+ and stacking context on the page, so a sticky header, a `transform` or a glass `backdrop-filter`
393
+ can't cover them. A modal dialog makes the rest of the page inert, so while one is open the toast
394
+ region moves inside it and back when it closes. The region is the live region that announces its
395
+ toasts; destructive toasts are alerts. Where the Popover API is missing overlays stay in place,
396
+ ordered by `--lc-z-popover`, `--lc-z-overlay` and `--lc-z-toast`.
397
+
398
+ ```erb
399
+ <%# In the layout, once %>
400
+ <%= lc_toast_region id: "toasts" do %>
401
+ <% flash.each do |type, message| %><%= lc_toast message, tone: type == "alert" ? :destructive : :success %><% end %>
402
+ <% end %>
403
+
404
+ <%# From a controller or job %>
405
+ <%= turbo_stream.append "toasts" do %><%= lc_toast "Project saved." %><% end %>
406
+ ```
407
+
408
+ While a modal dialog or sheet is open the page behind it can't scroll: the body is pinned with
409
+ `position: fixed` and marked `data-modal-scroll-lock="true"`, so `window.scrollY` reads 0 until it
410
+ closes. Scroll-driven chrome, such as a header that fills in once the page scrolls, should keep its
411
+ state while that attribute is set; the body's `--lc-scroll-lock-y` holds the real offset.
412
+
413
+ Two in-page layers remain: `z-sticky` keeps app chrome such as a sticky header above content, and
414
+ `z-raised` lifts an element over its neighbours. Put `isolate` on the main content area, so any z-index
415
+ inside it stays below the chrome. Tailwind drops a `z-*` class it can't resolve without a warning, so
416
+ use these two names, a number or `z-(--a-defined-variable)`.
351
417
 
352
418
  ## Copy feedback and motion
353
419
 
@@ -524,6 +590,8 @@ Generated by `bin/rails lostcoords:ui:builders`; `bin/lint` checks this list aga
524
590
  - `lc_tw(*classes)` (TailwindHelper)
525
591
  - `lc_heading_class(size: :heading, trim: false, extra: nil)` (TypographyHelper)
526
592
  - `lc_text_class(size: :body, tone: :default, trim: false, extra: nil)` (TypographyHelper)
593
+ - `lc_kbd_class(extra: nil)` (TypographyHelper)
594
+ - `lc_shortcut_data(keys, data = {})` (TypographyHelper)
527
595
  <!-- /builders -->
528
596
 
529
597
  ## Blocks
@@ -551,15 +619,9 @@ bin/rails server # the dummy app in test/dummy
551
619
  bin/rails tailwindcss:build
552
620
  bin/test
553
621
  bin/lint
554
- ```
555
-
556
- The helper migration tool updates Ruby calls, ERB code, and Ruby/ERB Markdown examples to the `lc_`
557
- namespace. Run it in a consumer checkout to preview changes, then add `--write` to apply them.
558
- Review dynamic method names stored in strings separately.
559
-
560
- ```sh
561
- ruby "$(bundle show lostcoords-ui)/script/migrate_helpers.rb" .
562
- ruby "$(bundle show lostcoords-ui)/script/migrate_helpers.rb" . --write
622
+ npx playwright install chromium # once
623
+ bin/browser-test # every suite in test/browser, headless, against its own docs server
624
+ bin/browser-test sheets # one suite; BASE_URL=https://ui.localhost reuses a running server
563
625
  ```
564
626
 
565
627
  The icon catalog and its MIT license live in `vendor/heroicons`. Regenerate them from the pinned
@@ -2,10 +2,13 @@
2
2
  /* Padding comes from --lc-inset, so a card that sets --lc-inset passes the
3
3
  same rhythm to everything inside it. */
4
4
 
5
- /* Inputs keep their --input fill on cards. Choice tiles, which use the muted
6
- fill on the page, switch to the page background so they stand out. */
5
+ /* Inputs keep their --input fill on cards. Fills that are muted on the page
6
+ (choice tiles, alerts, neutral badges, skeletons) switch to the page
7
+ background, and toggle group tracks to the accent fill, so they stay
8
+ visible on the muted card. */
7
9
  .lc-card {
8
10
  --lc-tile-bg: var(--background);
11
+ --lc-track-bg: var(--accent);
9
12
  --lc-avatar-cutout: var(--lc-card-bg, var(--card));
10
13
  background: var(--lc-card-bg, var(--card));
11
14
  color: var(--card-foreground);
@@ -1,4 +1,4 @@
1
- /* Removing [open] hides the content at once, so disclosure_controller holds the
1
+ /* Removing [open] hides the content at once, so lc-collapsible holds the
2
2
  panel open under [data-closing] for the exit, then closes it. Transitioning
3
3
  content-visibility makes WebKit keep the panel hidden for part of the opening. */
4
4
  @layer components {
@@ -0,0 +1,5 @@
1
+ /* lc_code_block. Its copy button ships in core. */
2
+ @import "../code-block.css";
3
+ @source "../../../../../helpers/lostcoords/ui/code_block_helper.rb";
4
+ @source "../../../../../views/lostcoords/ui/components/_lc_code_block.html.erb";
5
+ @source "../../../../../javascript/lostcoords/ui/controllers/lc_code_block_controller.js";
@@ -0,0 +1,5 @@
1
+ /* lc_collapsible. */
2
+ @import "../collapsible.css";
3
+ @source "../../../../../helpers/lostcoords/ui/collapsible_helper.rb";
4
+ @source "../../../../../views/lostcoords/ui/components/_lc_collapsible.html.erb";
5
+ @source "../../../../../javascript/lostcoords/ui/controllers/lc_collapsible_controller.js";
@@ -0,0 +1,9 @@
1
+ /* lc_dialog, with the phone sheet (lc_sheet_data) and confirm dialogs. */
2
+ @import "../sheet.css";
3
+ @import "../dialog.css";
4
+ @source "../../../../../helpers/lostcoords/ui/dialog_helper.rb";
5
+ @source "../../../../../helpers/lostcoords/ui/sheet_helper.rb";
6
+ @source "../../../../../views/lostcoords/ui/components/_lc_dialog.html.erb";
7
+ @source "../../../../../javascript/lostcoords/ui/controllers/lc_dialog_controller.js";
8
+ @source "../../../../../javascript/lostcoords/ui/controllers/lc_sheet_controller.js";
9
+ @source "../../../../../javascript/lostcoords/ui/controllers/lc_confirm_dialog_controller.js";
@@ -0,0 +1,5 @@
1
+ /* lc_emoji_picker. */
2
+ @import "../emoji-picker.css";
3
+ @source "../../../../../helpers/lostcoords/ui/emoji_picker_helper.rb";
4
+ @source "../../../../../views/lostcoords/ui/components/_emoji_picker*.html.erb";
5
+ @source "../../../../../javascript/lostcoords/ui/controllers/lc_emoji_picker_controller.js";
@@ -0,0 +1,5 @@
1
+ /* lc_menu, lc_menu_option and lc_popover. */
2
+ @source "../../../../../helpers/lostcoords/ui/menu_helper.rb";
3
+ @source "../../../../../views/lostcoords/ui/components/_lc_floating_panel.html.erb";
4
+ @source "../../../../../javascript/lostcoords/ui/controllers/lc_menu_controller.js";
5
+ @source "../../../../../javascript/lostcoords/ui/controllers/lc_popover_controller.js";
@@ -0,0 +1,3 @@
1
+ /* lc_prose, long-form reading content. */
2
+ @import "../prose.css";
3
+ @source "../../../../../helpers/lostcoords/ui/reading_helper.rb";
@@ -0,0 +1,3 @@
1
+ /* lc_table. */
2
+ @import "../table.css";
3
+ @source "../../../../../helpers/lostcoords/ui/table_helper.rb";
@@ -0,0 +1,5 @@
1
+ /* lc_toast and lc_toast_region. */
2
+ @import "../toast.css";
3
+ @source "../../../../../helpers/lostcoords/ui/toast_helper.rb";
4
+ @source "../../../../../javascript/lostcoords/ui/controllers/lc_toast_controller.js";
5
+ @source "../../../../../javascript/lostcoords/ui/controllers/lc_toast_region_controller.js";
@@ -0,0 +1,4 @@
1
+ /* lc_tooltip. */
2
+ @import "../tooltip.css";
3
+ @source "../../../../../helpers/lostcoords/ui/tooltip_helper.rb";
4
+ @source "../../../../../javascript/lostcoords/ui/controllers/lc_tooltip_controller.js";
@@ -1,25 +1,12 @@
1
- @import "./theme.css";
2
- @source "../../../../helpers/**/*.rb";
3
- @source "../../../../javascript/**/*.js";
4
- @source "../../../../views/**/*.erb";
5
- @source "../../../../../lib/lostcoords/ui/parts.rb";
6
-
7
- @import "./glass.css";
8
- @import "./copy-button.css";
9
- @import "./code-block.css";
10
- @import "./disclosure.css";
11
- @import "./emoji-picker.css";
12
- @import "./popover.css";
13
- @import "./sheet.css";
14
- @import "./card.css";
15
- @import "./dialog.css";
16
- @import "./avatar.css";
17
- @import "./squircle.css";
18
- @import "./utilities.css";
19
- @import "./typography.css";
20
- @import "./layout.css";
21
- @import "./reading.css";
22
- @import "./field.css";
23
- @import "./table.css";
24
- @import "./choice.css";
25
- @import "./tooltip.css";
1
+ /* Every component. For a smaller build import ./core.css and the files in
2
+ ./components/ you use instead. */
3
+ @import "./core.css";
4
+ @import "./components/dialog.css";
5
+ @import "./components/menu.css";
6
+ @import "./components/toast.css";
7
+ @import "./components/tooltip.css";
8
+ @import "./components/collapsible.css";
9
+ @import "./components/code-block.css";
10
+ @import "./components/emoji-picker.css";
11
+ @import "./components/table.css";
12
+ @import "./components/prose.css";
@@ -0,0 +1,21 @@
1
+ /* Tokens, foundations and the components almost every app uses: buttons,
2
+ badges, avatars, cards, alerts, form controls, choices, toggles, copy buttons,
3
+ layout, typography and navigation. Add the opt-in components in ./components/ that
4
+ you render, or import ../components.css for everything. */
5
+ @import "./theme.css";
6
+ @source "../../../../helpers/lostcoords/ui/{badge,button,card,choice,copy_button,description_list,feedback,form,glass,icon,layout,navigation,primitives,render_attributes,structures,tailwind,translation,typography}_helper.rb";
7
+ @source "../../../../javascript/lostcoords/ui/helpers/*.js";
8
+ @source "../../../../javascript/lostcoords/ui/controllers/lc_{copy,kbd,selection,shortcut,tabs,toggle}_controller.js";
9
+ @source "../../../../../lib/lostcoords/ui/parts.rb";
10
+
11
+ @import "./glass.css";
12
+ @import "./popover.css";
13
+ @import "./card.css";
14
+ @import "./avatar.css";
15
+ @import "./squircle.css";
16
+ @import "./utilities.css";
17
+ @import "./typography.css";
18
+ @import "./layout.css";
19
+ @import "./field.css";
20
+ @import "./choice.css";
21
+ @import "./copy-button.css";