stimulus_plumbers_tailwind 0.4.11 → 0.4.13
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 +19 -0
- data/lib/stimulus_plumbers/tailwind/version.rb +1 -1
- data/lib/stimulus_plumbers/themes/tailwind/button.rb +2 -0
- data/lib/stimulus_plumbers/themes/tailwind/calendar.rb +6 -2
- data/lib/stimulus_plumbers/themes/tailwind/card.rb +19 -5
- data/lib/stimulus_plumbers/themes/tailwind/form/code.rb +26 -10
- data/lib/stimulus_plumbers/themes/tailwind/form/credit_card.rb +26 -12
- data/lib/stimulus_plumbers/themes/tailwind/form.rb +7 -1
- data/lib/stimulus_plumbers/themes/tailwind/icon.rb +2 -0
- data/lib/stimulus_plumbers/themes/tailwind/progress.rb +15 -4
- data/lib/stimulus_plumbers/themes/tailwind/timeline/group.rb +11 -3
- data/lib/stimulus_plumbers/themes/tailwind/timeline.rb +39 -10
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cea38e46d17757f5843396328d94d82ce9ffb80617845022ed77eafc64c48196
|
|
4
|
+
data.tar.gz: 4afa4cc962c6e1a4a2f0dc1e7fa0b208208da750b3fcabdf7b3d22ca4d597aa6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a99f0a42938124dc7b2744a7078da4017ec83ffd0e33642511867c904bd1327e3ae562de82c56c3da8d58931e83172d77064c8e96ab2ade20078a00823cc8999
|
|
7
|
+
data.tar.gz: b9778be8dc6f957ea409bb7a4c155b5d87b5003490b76752966373db5004523de88ba11dc13fd87d92ad0f0ab91b21107e3d3bf968e156ebb9e4aeb976c5a2dc
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
---
|
|
6
|
+
## [0.4.12](https://github.com/ryancyq/stimulus-plumbers/compare/stimulus-plumbers-tailwind/v0.4.11..stimulus-plumbers-tailwind/v0.4.12) - 2026-07-19
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- gitignore entry should only be added if there is no existing rule on generated/builds assets ([#181](https://github.com/ryancyq/stimulus-plumbers/issues/181)) - ([bc44d68](https://github.com/ryancyq/stimulus-plumbers/commit/bc44d68068dced77930a007c097f6b27a511ab20)) - Ryan Chang
|
|
11
|
+
- refactor form inputs + make code/credit card separator configurable ([#182](https://github.com/ryancyq/stimulus-plumbers/issues/182)) - ([bbc0a55](https://github.com/ryancyq/stimulus-plumbers/commit/bbc0a55d5dbcc5cee1459434ce65606cdbfdd0e8)) - Ryan Chang
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
- form submit button with icon support ([#184](https://github.com/ryancyq/stimulus-plumbers/issues/184)) - ([ac3af21](https://github.com/ryancyq/stimulus-plumbers/commit/ac3af216125eedb01bc1bc053dd890e33482cc4b)) - Ryan Chang
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
## [0.4.11](https://github.com/ryancyq/stimulus-plumbers/compare/stimulus-plumbers-tailwind/v0.4.10..stimulus-plumbers-tailwind/v0.4.11) - 2026-07-19
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
- tailwind source being committed with machine path. migrate to generated source file which should be gitignored + import the generated file in css entry point file instead. ([#180](https://github.com/ryancyq/stimulus-plumbers/issues/180)) - ([347e6ed](https://github.com/ryancyq/stimulus-plumbers/commit/347e6edeee92571f4f2fe7e509b5eed8fd0f2893)) - Ryan Chang
|
|
23
|
+
|
|
5
24
|
---
|
|
6
25
|
## [0.4.10](https://github.com/ryancyq/stimulus-plumbers/compare/stimulus-plumbers-tailwind/v0.4.9..stimulus-plumbers-tailwind/v0.4.10) - 2026-07-19
|
|
7
26
|
|
|
@@ -15,6 +15,8 @@ module StimulusPlumbers
|
|
|
15
15
|
inline-flex items-center justify-center gap-(--sp-space-2)
|
|
16
16
|
[&:not(:has(>span))]:aspect-square
|
|
17
17
|
[&:not(:has(>span))]:px-0
|
|
18
|
+
[&:has(>span[data-sp-label-hidden])]:aspect-square
|
|
19
|
+
[&:has(>span[data-sp-label-hidden])]:px-0
|
|
18
20
|
].freeze
|
|
19
21
|
|
|
20
22
|
CARD = %w[
|
|
@@ -95,9 +95,13 @@ module StimulusPlumbers
|
|
|
95
95
|
{ classes: klasses(*DAY, *extra) }
|
|
96
96
|
end
|
|
97
97
|
|
|
98
|
-
def calendar_month_classes(**)
|
|
98
|
+
def calendar_month_classes(**)
|
|
99
|
+
{ classes: klasses(*MONTH) }
|
|
100
|
+
end
|
|
99
101
|
|
|
100
|
-
def calendar_year_classes(**)
|
|
102
|
+
def calendar_year_classes(**)
|
|
103
|
+
{ classes: klasses(*YEAR) }
|
|
104
|
+
end
|
|
101
105
|
|
|
102
106
|
def calendar_quarter_grid_classes
|
|
103
107
|
{ classes: klasses(*QUARTER_GRID) }
|
|
@@ -45,11 +45,25 @@ module StimulusPlumbers
|
|
|
45
45
|
{ classes: klasses(*VARIANTS.fetch(variant, VARIANTS[:tertiary]), *BASE) }
|
|
46
46
|
end
|
|
47
47
|
|
|
48
|
-
def card_header_classes
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
def
|
|
48
|
+
def card_header_classes
|
|
49
|
+
{ classes: klasses(*HEADER) }
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def card_icon_classes
|
|
53
|
+
{ classes: klasses(*ICON) }
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def card_title_classes
|
|
57
|
+
{ classes: klasses(*TITLE) }
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def card_body_classes
|
|
61
|
+
{ classes: klasses(*BODY) }
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def card_action_classes
|
|
65
|
+
{ classes: klasses(*ACTION) }
|
|
66
|
+
end
|
|
53
67
|
end
|
|
54
68
|
end
|
|
55
69
|
end
|
|
@@ -5,14 +5,14 @@ module StimulusPlumbers
|
|
|
5
5
|
module Tailwind
|
|
6
6
|
module Form
|
|
7
7
|
module Code
|
|
8
|
-
|
|
8
|
+
CODE_FIELD = %w[
|
|
9
9
|
relative inline-flex w-fit rounded-(--sp-radius-md)
|
|
10
10
|
focus-within:ring-(length:--sp-focus-ring-width) focus-within:ring-(--sp-focus-ring-color)
|
|
11
11
|
focus-within:ring-offset-(length:--sp-focus-ring-offset)
|
|
12
12
|
].freeze
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
CODE_FIELD_ERROR = %w[focus-within:ring-(--sp-color-error)].freeze
|
|
14
|
+
CODE_CELLS = %w[flex items-center gap-(--sp-space-1)].freeze
|
|
15
|
+
CODE_CELL = %w[
|
|
16
16
|
flex size-10 items-center justify-center rounded-(--sp-radius-md) border
|
|
17
17
|
border-(--sp-color-muted-fg) bg-(--sp-color-bg)
|
|
18
18
|
text-(length:--sp-text-lg) font-medium text-(--sp-color-fg)
|
|
@@ -21,15 +21,31 @@ module StimulusPlumbers
|
|
|
21
21
|
data-[caret]:border-(--sp-color-primary) data-[caret]:ring-1 data-[caret]:ring-(--sp-color-primary)
|
|
22
22
|
data-[group-end]:me-(--sp-space-2)
|
|
23
23
|
].freeze
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
CODE_CELL_ERROR = %w[border-(--sp-color-error) data-[caret]:ring-(--sp-color-error)].freeze
|
|
25
|
+
CODE_SEPARATOR = %w[text-(--sp-color-muted-fg)].freeze
|
|
26
|
+
CODE_OVERLAY = %w[absolute inset-0 size-full cursor-text opacity-0 disabled:cursor-not-allowed].freeze
|
|
26
27
|
|
|
27
28
|
private
|
|
28
29
|
|
|
29
|
-
def form_field_input_code_classes(error: false
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
def form_field_input_code_classes(error: false, **)
|
|
31
|
+
{ classes: klasses(*CODE_FIELD, *(error ? CODE_FIELD_ERROR : [])) }
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def form_field_input_code_cells_classes(**)
|
|
35
|
+
{ classes: klasses(*CODE_CELLS) }
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def form_field_input_code_cell_classes(error: false, **)
|
|
39
|
+
{ classes: klasses(*CODE_CELL, *(error ? CODE_CELL_ERROR : [])) }
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def form_field_input_code_separator_classes(**)
|
|
43
|
+
{ classes: klasses(*CODE_SEPARATOR) }
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def form_field_input_code_overlay_classes(**)
|
|
47
|
+
{ classes: klasses(*CODE_OVERLAY) }
|
|
48
|
+
end
|
|
33
49
|
end
|
|
34
50
|
end
|
|
35
51
|
end
|
|
@@ -5,14 +5,14 @@ module StimulusPlumbers
|
|
|
5
5
|
module Tailwind
|
|
6
6
|
module Form
|
|
7
7
|
module CreditCard
|
|
8
|
-
|
|
8
|
+
CREDIT_CARD_FIELD = %w[
|
|
9
9
|
relative inline-flex w-fit rounded-(--sp-radius-md)
|
|
10
10
|
focus-within:ring-(length:--sp-focus-ring-width) focus-within:ring-(--sp-focus-ring-color)
|
|
11
11
|
focus-within:ring-offset-(length:--sp-focus-ring-offset)
|
|
12
12
|
].freeze
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
CREDIT_CARD_FIELD_ERROR = %w[focus-within:ring-(--sp-color-error)].freeze
|
|
14
|
+
CREDIT_CARD_CELLS = %w[flex items-center gap-(--sp-space-1)].freeze
|
|
15
|
+
CREDIT_CARD_CELL = %w[
|
|
16
16
|
flex h-10 min-w-16 items-center justify-center px-(--sp-space-2)
|
|
17
17
|
rounded-(--sp-radius-md) border
|
|
18
18
|
border-(--sp-color-muted-fg) bg-(--sp-color-bg)
|
|
@@ -21,17 +21,31 @@ module StimulusPlumbers
|
|
|
21
21
|
data-[filled]:border-(--sp-color-fg)
|
|
22
22
|
data-[caret]:border-(--sp-color-primary) data-[caret]:ring-1 data-[caret]:ring-(--sp-color-primary)
|
|
23
23
|
].freeze
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
CREDIT_CARD_CELL_ERROR = %w[border-(--sp-color-error) data-[caret]:ring-(--sp-color-error)].freeze
|
|
25
|
+
CREDIT_CARD_SEPARATOR = %w[text-(--sp-color-muted-fg)].freeze
|
|
26
|
+
CREDIT_CARD_OVERLAY = %w[absolute inset-0 size-full cursor-text opacity-0 disabled:cursor-not-allowed].freeze
|
|
27
27
|
|
|
28
28
|
private
|
|
29
29
|
|
|
30
|
-
def form_field_input_credit_card_classes(error: false
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
def
|
|
30
|
+
def form_field_input_credit_card_classes(error: false, **)
|
|
31
|
+
{ classes: klasses(*CREDIT_CARD_FIELD, *(error ? CREDIT_CARD_FIELD_ERROR : [])) }
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def form_field_input_credit_card_cells_classes(**)
|
|
35
|
+
{ classes: klasses(*CREDIT_CARD_CELLS) }
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def form_field_input_credit_card_cell_classes(error: false, **)
|
|
39
|
+
{ classes: klasses(*CREDIT_CARD_CELL, *(error ? CREDIT_CARD_CELL_ERROR : [])) }
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def form_field_input_credit_card_separator_classes(**)
|
|
43
|
+
{ classes: klasses(*CREDIT_CARD_SEPARATOR) }
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def form_field_input_credit_card_overlay_classes(**)
|
|
47
|
+
{ classes: klasses(*CREDIT_CARD_OVERLAY) }
|
|
48
|
+
end
|
|
35
49
|
end
|
|
36
50
|
end
|
|
37
51
|
end
|
|
@@ -13,7 +13,13 @@ module StimulusPlumbers
|
|
|
13
13
|
{ classes: klasses(*GROUP, layout == :inline ? GROUP_INLINE : "flex-col") }
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
def form_submit_classes(**)
|
|
16
|
+
def form_submit_classes(**)
|
|
17
|
+
{}
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def form_submit_label_classes(hidden: false, **)
|
|
21
|
+
{ classes: klasses(hidden ? "sr-only" : nil) }
|
|
22
|
+
end
|
|
17
23
|
end
|
|
18
24
|
end
|
|
19
25
|
end
|
|
@@ -35,10 +35,21 @@ module StimulusPlumbers
|
|
|
35
35
|
|
|
36
36
|
private
|
|
37
37
|
|
|
38
|
-
def progress_bar_classes
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
def progress_bar_classes
|
|
39
|
+
{ classes: klasses(*BAR) }
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def progress_bar_fill_classes
|
|
43
|
+
{ classes: klasses(*BAR_FILL) }
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def progress_ring_classes
|
|
47
|
+
{ classes: klasses(*RING) }
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def progress_meter_classes
|
|
51
|
+
{ classes: klasses(*METER) }
|
|
52
|
+
end
|
|
42
53
|
end
|
|
43
54
|
end
|
|
44
55
|
end
|
|
@@ -22,9 +22,17 @@ module StimulusPlumbers
|
|
|
22
22
|
|
|
23
23
|
private
|
|
24
24
|
|
|
25
|
-
def timeline_group_classes
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
def timeline_group_classes
|
|
26
|
+
{ classes: klasses(WRAPPER) }
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def timeline_group_section_classes
|
|
30
|
+
{ classes: klasses(SECTION) }
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def timeline_group_section_date_classes
|
|
34
|
+
{ classes: klasses(DATE) }
|
|
35
|
+
end
|
|
28
36
|
|
|
29
37
|
def timeline_group_section_list_classes(orientation: :vertical)
|
|
30
38
|
list = orientation.to_sym == :horizontal ? LIST_HORIZONTAL : LIST_VERTICAL
|
|
@@ -86,16 +86,45 @@ module StimulusPlumbers
|
|
|
86
86
|
{ classes: klasses(base) }
|
|
87
87
|
end
|
|
88
88
|
|
|
89
|
-
def timeline_item_title_classes
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
def
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
def
|
|
98
|
-
|
|
89
|
+
def timeline_item_title_classes
|
|
90
|
+
{ classes: klasses(ITEM_TITLE) }
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
def timeline_item_heading_classes
|
|
94
|
+
{ classes: klasses(ITEM_HEADING) }
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
def timeline_item_trigger_classes
|
|
98
|
+
{ classes: klasses(ITEM_TRIGGER) }
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
def timeline_item_description_classes
|
|
102
|
+
{ classes: klasses(ITEM_DESCRIPTION) }
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
def timeline_item_detail_classes
|
|
106
|
+
{ classes: klasses(ITEM_DETAIL) }
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
def timeline_item_actions_classes
|
|
110
|
+
{ classes: klasses(ITEM_ACTIONS) }
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
def timeline_item_connector_classes
|
|
114
|
+
{ classes: klasses(ITEM_CONNECTOR_HORIZONTAL) }
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
def timeline_item_content_classes
|
|
118
|
+
{ classes: klasses(ITEM_CONTENT_HORIZONTAL) }
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
def timeline_track_line_classes
|
|
122
|
+
{ classes: klasses(TRACK_LINE_VERTICAL) }
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
def timeline_item_indicator_icon_slot_classes
|
|
126
|
+
{ classes: klasses(ITEM_INDICATOR_ICON_SLOT) }
|
|
127
|
+
end
|
|
99
128
|
end
|
|
100
129
|
end
|
|
101
130
|
end
|