pulse_view_components 0.3.0 → 0.4.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/CHANGELOG.md +98 -1
- data/README.md +26 -0
- data/app/assets/builds/js/pulse_view_components.js +3 -3
- data/app/assets/builds/js/pulse_view_components.js.map +1 -1
- data/app/assets/builds/pulse_view_components.css +2 -1
- data/app/assets/stylesheets/pulse_view_components/application.tailwind.css +44 -4
- data/app/assets/stylesheets/pulse_view_components/tokens.primitives.css +68 -0
- data/app/assets/stylesheets/pulse_view_components/tokens.system.css +95 -0
- data/app/components/pulse/action_list/divider.rb +13 -4
- data/app/components/pulse/action_list/form_wrapper.rb +2 -0
- data/app/components/pulse/action_list/heading.html.slim +7 -0
- data/app/components/pulse/action_list/heading.rb +2 -0
- data/app/components/pulse/action_list/item.html.slim +6 -6
- data/app/components/pulse/action_list/item.rb +11 -9
- data/app/components/pulse/action_list.css +109 -82
- data/app/components/pulse/action_list.html.slim +11 -0
- data/app/components/pulse/action_list.rb +5 -0
- data/app/components/pulse/badge.rb +20 -16
- data/app/components/pulse/base_component.rb +25 -1
- data/app/components/pulse/blank_slate.rb +4 -2
- data/app/components/pulse/border_box/header.rb +5 -3
- data/app/components/pulse/border_box.rb +21 -17
- data/app/components/pulse/box.rb +2 -0
- data/app/components/pulse/breadcrumb_item.rb +3 -1
- data/app/components/pulse/breadcrumbs.html.slim +2 -2
- data/app/components/pulse/breadcrumbs.rb +2 -0
- data/app/components/pulse/button.rb +28 -25
- data/app/components/pulse/component.rb +2 -1
- data/app/components/pulse/conditional_wrapper.rb +2 -0
- data/app/components/pulse/content.rb +2 -0
- data/app/components/pulse/counter.css +3 -3
- data/app/components/pulse/counter.rb +4 -0
- data/app/components/pulse/flash.rb +10 -6
- data/app/components/pulse/forms/error_explanation.html.slim +3 -3
- data/app/components/pulse/forms/error_explanation.rb +30 -13
- data/app/components/pulse/forms/error_explanation.yml +4 -0
- data/app/components/pulse/icon.rb +2 -0
- data/app/components/pulse/label.rb +5 -3
- data/app/components/pulse/layout.css +53 -52
- data/app/components/pulse/layout.rb +14 -6
- data/app/components/pulse/link.rb +10 -8
- data/app/components/pulse/modal.html.slim +20 -20
- data/app/components/pulse/modal.rb +10 -8
- data/app/components/pulse/modal_controller.js +3 -3
- data/app/components/pulse/nav_link.html.slim +7 -7
- data/app/components/pulse/nav_link.rb +4 -2
- data/app/components/pulse/nav_list/heading.rb +3 -1
- data/app/components/pulse/nav_list/item.html.slim +8 -0
- data/app/components/pulse/nav_list/item.rb +2 -2
- data/app/components/pulse/nav_list.rb +5 -0
- data/app/components/pulse/popover.html.slim +1 -1
- data/app/components/pulse/popover.rb +65 -26
- data/app/components/pulse/progress_bar.html.slim +2 -2
- data/app/components/pulse/progress_bar.rb +5 -3
- data/app/components/pulse/table/cell.html.slim +2 -2
- data/app/components/pulse/table/cell.rb +14 -10
- data/app/components/pulse/table/column.rb +2 -0
- data/app/components/pulse/table.html.slim +3 -3
- data/app/components/pulse/table.rb +19 -16
- data/app/components/pulse/text.rb +26 -24
- data/app/components/pulse/toast.html.slim +8 -8
- data/app/components/pulse/toast.rb +25 -23
- data/app/lib/pulse/status.rb +48 -0
- data/lib/pulse/view_components/version.rb +1 -1
- data/previews/foundations/colors_preview/palettes.html.slim +12 -0
- data/previews/foundations/colors_preview/semantic.html.slim +16 -0
- data/previews/foundations/colors_preview.rb +55 -0
- data/previews/pulse/action_list_preview.rb +77 -0
- data/previews/pulse/border_box_preview.rb +1 -1
- data/previews/pulse/counter_preview.rb +1 -1
- data/previews/pulse/flash_preview.rb +1 -1
- data/previews/pulse/forms/error_explanation_preview.rb +49 -0
- data/previews/pulse/layout_preview.rb +5 -5
- data/previews/pulse/nav_list_preview.rb +1 -1
- data/previews/pulse/popover_preview.rb +48 -22
- data/previews/pulse/progress_bar_preview.rb +1 -1
- data/previews/pulse/table_preview.rb +6 -6
- metadata +17 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 530103078a17819fd121c56f0f1753961b743f7d4ef4b0653cca2bbf7ef020ff
|
|
4
|
+
data.tar.gz: 81a3ed7c6961b7d145b598c0d43629f0ec24ee1c17b36e3716c229e4da486489
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f3437819dad0dc62ed0e2dd8b8e32e82a9186a34073c53676cb17ca083fb5c61b7ef94d73b1d018cfbe60aad51cf88276aaa70604b32bce3a4beb6c65c681ac4
|
|
7
|
+
data.tar.gz: 2eb8bb6dd412dada3ded50503bef18025358376c75df3a8837bcd001a7f8c54ebb4cd97f916f75f678152a082795532a8ac705f8e56dde13c2f3922b5e46ae8a
|
data/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,102 @@ While the major version is `0`, a minor bump may carry a breaking change.
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [0.4.0] - 2026-10-19
|
|
12
|
+
|
|
13
|
+
Upgrades to Tailwind CSS 4. This is a breaking change for apps that pass
|
|
14
|
+
classes through `classes:`, because the prefix is now written as a leading
|
|
15
|
+
variant (`pulse:bg-primary` rather than `pulse-bg-primary`). See Changed.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- Components declare a status of `:alpha`, `:beta`, `:stable` or
|
|
20
|
+
`:deprecated`, read with `Pulse::Thing.status`. `ActionList`, `NavList` and
|
|
21
|
+
`Counter` are alpha. `BorderBox`, `Flash` and `Layout` are beta. See the
|
|
22
|
+
README for what each level means.
|
|
23
|
+
- An `ActionList` Lookbook preview.
|
|
24
|
+
- A `neutral` semantic color, backed by a new `gray` palette token that copies
|
|
25
|
+
Tailwind 4's gray.
|
|
26
|
+
- A Foundations > Colors Lookbook page that shows the semantic colors and the
|
|
27
|
+
palettes behind them.
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- `ActionList::Divider` with `scheme: :filled` draws its top and bottom
|
|
32
|
+
borders again. It used class names that Tailwind 4 does not generate.
|
|
33
|
+
- `ActionList`, `ActionList::Heading` and every `NavList` group raised on
|
|
34
|
+
render because they had no template.
|
|
35
|
+
- `NavList` items with sub-items raised, and their sub-items never rendered.
|
|
36
|
+
- `BorderBox` rendered a `system_arguments_denylist` HTML attribute.
|
|
37
|
+
`BaseComponent` now consumes the denylist and raises outside production when
|
|
38
|
+
a denied argument is passed, so `BorderBox.new(pt: 2)` now raises. In
|
|
39
|
+
production, or with `PULSE_WARNINGS_DISABLED`, it drops the denied argument
|
|
40
|
+
from the output instead.
|
|
41
|
+
- `Forms::ErrorExplanation` rendered "Header" as its heading unless the app
|
|
42
|
+
defined `errors.template.header`. It now ships a default heading and still
|
|
43
|
+
prefers the app's translation. In a locale with no app translation it
|
|
44
|
+
shows the English heading instead of raising.
|
|
45
|
+
- `Forms::ErrorExplanation` counted every error in its heading but listed only
|
|
46
|
+
one per attribute, so two errors on `title` read "2 errors" above one item.
|
|
47
|
+
The heading now counts the listed errors.
|
|
48
|
+
- Several components used `text-gray`, which Tailwind never defined, so their
|
|
49
|
+
text inherited its colour. They now use neutral-700: `Badge` (`invited`,
|
|
50
|
+
`active` and `disabled` schemes), the secondary `Button`, the `Modal` title
|
|
51
|
+
and close button, inactive `NavLink`s, `Table` headers, cells and
|
|
52
|
+
pagination, and the link in an error `Toast`.
|
|
53
|
+
- The `Table` body and `Text` `caption1` and `caption2` used the undefined
|
|
54
|
+
`leading-extra-snug` and `leading-extra-tight`, so no line height applied.
|
|
55
|
+
They now use `leading-snug` and `leading-tight`.
|
|
56
|
+
|
|
57
|
+
### Changed
|
|
58
|
+
|
|
59
|
+
- Components use `neutral-*` color classes instead of `gray-*`. The colors
|
|
60
|
+
are unchanged. The build no longer includes Tailwind's `gray` utilities, so
|
|
61
|
+
a `pulse:*-gray-*` class passed in through `classes:` now has no styles.
|
|
62
|
+
Use `pulse:*-neutral-*` instead.
|
|
63
|
+
- **Breaking:** upgraded to Tailwind CSS 4. The class prefix is now written as
|
|
64
|
+
a leading variant, so `pulse-bg-primary` becomes `pulse:bg-primary` and
|
|
65
|
+
`hover:pulse-text-white` becomes `pulse:hover:text-white`. Classes passed to
|
|
66
|
+
components through `classes:` must use the new form.
|
|
67
|
+
- `Forms::ErrorExplanation` now inherits from `Pulse::Component`. It merges
|
|
68
|
+
`classes:` with `tailwind_merge` and rejects a `tag:` argument.
|
|
69
|
+
- The primary `Button` green shifted. Tailwind 4 redefined its palette in
|
|
70
|
+
oklch, so `green-700` moved from `#15803d` to about `#008236`. The blue-700
|
|
71
|
+
focus outline shifted the same way.
|
|
72
|
+
- The `error` and `danger` reds shifted slightly. Every shade of the
|
|
73
|
+
`amaranth` palette they map to changed, for example 700 moved from `#ee2d5b`
|
|
74
|
+
to `#ee2d4b`.
|
|
75
|
+
- Some utilities were renamed by Tailwind 4 (`outline-none` is now
|
|
76
|
+
`outline-hidden`, `start-0` is now `inset-s-0`).
|
|
77
|
+
- CSS custom properties from the theme are now emitted with the prefix, for
|
|
78
|
+
example `--pulse-color-primary`.
|
|
79
|
+
- `tailwind_merge` dependency raised to `~> 1.5`, which understands Tailwind 4
|
|
80
|
+
class syntax.
|
|
81
|
+
- The Tailwind config moved from `tailwind.config.js` into the stylesheet as
|
|
82
|
+
CSS-first configuration.
|
|
83
|
+
|
|
84
|
+
### Removed
|
|
85
|
+
|
|
86
|
+
- `@tailwindcss/aspect-ratio` and `@tailwindcss/typography`, which no component
|
|
87
|
+
used. `aspect-*` utilities are built into Tailwind 4.
|
|
88
|
+
- The unused `peer-unchecked` variant. Tailwind 4's `peer-not-checked` covers
|
|
89
|
+
it.
|
|
90
|
+
- `postcss.config.js`, `postcss` and `autoprefixer`. The Tailwind 4 CLI does
|
|
91
|
+
not read the PostCSS config.
|
|
92
|
+
- Utilities named after the raw palettes, such as `pulse-bg-coral-red-500`.
|
|
93
|
+
The palettes are now `--palette-*` theme variables outside the colour
|
|
94
|
+
namespace. Use the semantic names (`primary`, `secondary`, `tertiary`,
|
|
95
|
+
`success`, `danger`, `error`, `neutral`) instead.
|
|
96
|
+
|
|
97
|
+
### Internal
|
|
98
|
+
|
|
99
|
+
- Development Node moved to 22, since Tailwind 4 needs Node 20 or later.
|
|
100
|
+
- `chokidar` is now a direct dev dependency. `esbuild.config.mjs` imports it,
|
|
101
|
+
and it previously arrived only through Tailwind 3.
|
|
102
|
+
- Design tokens split into `tokens.primitives.css` (palettes) and
|
|
103
|
+
`tokens.system.css` (semantic colours).
|
|
104
|
+
- Development `view_component` moved to 4.16, along with other development gem
|
|
105
|
+
updates.
|
|
106
|
+
|
|
11
107
|
## [0.3.0] - 2026-08-28
|
|
12
108
|
|
|
13
109
|
No breaking changes. The component API, the gemspec constraints and the
|
|
@@ -80,7 +176,8 @@ No breaking changes. The component API, the gemspec constraints and the
|
|
|
80
176
|
|
|
81
177
|
- Initial release.
|
|
82
178
|
|
|
83
|
-
[Unreleased]: https://github.com/100yrs/pulse_view_components/compare/v0.
|
|
179
|
+
[Unreleased]: https://github.com/100yrs/pulse_view_components/compare/v0.4.0...HEAD
|
|
180
|
+
[0.4.0]: https://github.com/100yrs/pulse_view_components/compare/v0.3.0...v0.4.0
|
|
84
181
|
[0.3.0]: https://github.com/100yrs/pulse_view_components/compare/v0.2.1...v0.3.0
|
|
85
182
|
[0.2.1]: https://github.com/100yrs/pulse_view_components/compare/v0.2.0...v0.2.1
|
|
86
183
|
[0.2.0]: https://github.com/100yrs/pulse_view_components/compare/v0.1.1...v0.2.0
|
data/README.md
CHANGED
|
@@ -14,6 +14,32 @@ Render Pulse ViewComponents:
|
|
|
14
14
|
<%= render(Pulse::Badge.new(scheme: :primary)) { 'Primary' } %>
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
+
## Component status
|
|
18
|
+
|
|
19
|
+
Each component declares how complete it is. Check it with
|
|
20
|
+
`Pulse::ActionList.status`. Lookbook shows the status after the name of any
|
|
21
|
+
component that is not stable.
|
|
22
|
+
|
|
23
|
+
| Status | Meaning |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| `stable` | Complete and safe to use. |
|
|
26
|
+
| `beta` | Core usage works. Some documented options are not implemented. |
|
|
27
|
+
| `alpha` | Incomplete. Features may be broken, unstyled or missing, and the API may change without notice. |
|
|
28
|
+
| `deprecated` | Scheduled for removal. |
|
|
29
|
+
|
|
30
|
+
Components that are not stable:
|
|
31
|
+
|
|
32
|
+
| Component | Status | Gaps |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| `ActionList` | alpha | Select variants, trailing actions, tooltips, avatar items and the `:inset` scheme do not work. |
|
|
35
|
+
| `NavList` | alpha | Avatar items raise. Sub-items cannot be collapsed. The show-more item has no JavaScript. |
|
|
36
|
+
| `Counter` | alpha | Renders unstyled. |
|
|
37
|
+
| `BorderBox` | beta | `padding:` and row `scheme:` have no effect. |
|
|
38
|
+
| `Flash` | beta | `dismissible: true` raises. `full: true` has no effect. |
|
|
39
|
+
| `Layout` | beta | Main `width:` options other than `:full` have no effect. |
|
|
40
|
+
|
|
41
|
+
The comment above each `status` call in the source lists what is missing.
|
|
42
|
+
|
|
17
43
|
## Dependencies
|
|
18
44
|
|
|
19
45
|
- [Stimulus](https://stimulus.hotwired.dev/)
|
|
@@ -9441,20 +9441,20 @@
|
|
|
9441
9441
|
this.lastFocusedElement = document.activeElement;
|
|
9442
9442
|
enter(this.wrapperTarget);
|
|
9443
9443
|
enter(this.bodyTarget);
|
|
9444
|
-
document.body.classList.add("pulse
|
|
9444
|
+
document.body.classList.add("pulse:overflow-hidden");
|
|
9445
9445
|
}
|
|
9446
9446
|
close(e) {
|
|
9447
9447
|
leave(this.wrapperTarget);
|
|
9448
9448
|
leave(this.bodyTarget).then(() => {
|
|
9449
9449
|
this.element.remove();
|
|
9450
9450
|
});
|
|
9451
|
-
document.body.classList.remove("pulse
|
|
9451
|
+
document.body.classList.remove("pulse:overflow-hidden");
|
|
9452
9452
|
if (this.lastFocusedElement) this.lastFocusedElement.focus();
|
|
9453
9453
|
this.element.closest("turbo-frame").src = void 0;
|
|
9454
9454
|
}
|
|
9455
9455
|
autoClose(e) {
|
|
9456
9456
|
this.element.remove();
|
|
9457
|
-
document.body.classList.remove("pulse
|
|
9457
|
+
document.body.classList.remove("pulse:overflow-hidden");
|
|
9458
9458
|
}
|
|
9459
9459
|
handleSubmit = (e) => {
|
|
9460
9460
|
if (e.detail.success) {
|