playbook_ui 15.0.0.pre.alpha.PLAY1981sectionseparatorverticalchildren10469 → 15.0.0.pre.alpha.PLAY2316advancedtablerightsidedoubleborder10507
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/app/pb_kits/playbook/_playbook.scss +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +4 -2
- data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +6 -4
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +9 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.html.erb +3 -3
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/_pb_bar_graph.scss +0 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/_pb_bar_graph.tsx +62 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors.html.erb +35 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors.jsx +49 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors_rails.md +1 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors_react.md +2 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_default.html.erb +38 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_default.jsx +51 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_height.html.erb +46 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_height.jsx +62 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_height.md +3 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_horizontal.html.erb +47 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_horizontal.jsx +60 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend.html.erb +25 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend.jsx +36 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_non_clickable.jsx +44 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.html.erb +100 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.jsx +126 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_negative_numbers.html.erb +32 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_negative_numbers.jsx +48 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_secondary_y_axis.html.erb +68 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_secondary_y_axis.jsx +81 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_spline.html.erb +31 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_spline.jsx +42 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_spline.md +2 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_stacked.html.erb +35 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_stacked.jsx +51 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/example.yml +27 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/index.js +11 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/pbBarGraphTheme.ts +106 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/pb_bar_graph.html.erb +1 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/pb_bar_graph.rb +28 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/pbbargraph.test.jsx +31 -0
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.scss +5 -13
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_children.html.erb +0 -23
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_children.jsx +7 -45
- data/app/pb_kits/playbook/pb_section_separator/section_separator.html.erb +1 -4
- data/dist/chunks/{_line_graph-B-n_nsLR.js → _line_graph-BBny-YYZ.js} +1 -1
- data/dist/chunks/{_typeahead-CS9PvM1x.js → _typeahead-CeyJ6-GF.js} +2 -2
- data/dist/chunks/{_weekday_stacked-DaFBilv5.js → _weekday_stacked-CUUNTwVc.js} +3 -3
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +9 -1
- data/dist/playbook-doc.js +2 -2
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/forms/builder/form_field_builder.rb +9 -1
- data/lib/playbook/version.rb +1 -1
- metadata +38 -6
- data/app/pb_kits/playbook/pb_section_separator/section_separator.test.js +0 -165
@@ -6,7 +6,7 @@ module Playbook
|
|
6
6
|
class FormFieldBuilder < Module
|
7
7
|
def initialize(method_name, kit_name:)
|
8
8
|
define_method method_name do |name, props: {}, **options, &block|
|
9
|
-
props
|
9
|
+
props = props.dup
|
10
10
|
options = Hash(options)
|
11
11
|
|
12
12
|
options[:skip_default_ids] = false unless options.key?(:skip_default_ids)
|
@@ -21,6 +21,14 @@ module Playbook
|
|
21
21
|
|
22
22
|
input = super(name, **options, &block)
|
23
23
|
|
24
|
+
input_id = input[/\bid="([^"]+)"/, 1] || "#{@object_name}_#{name}"
|
25
|
+
|
26
|
+
if props[:label] == true
|
27
|
+
props[:label] = @template.label(@object_name, name)
|
28
|
+
elsif props[:label].is_a?(String)
|
29
|
+
props[:label] = @template.label_tag(input_id, props[:label])
|
30
|
+
end
|
31
|
+
|
24
32
|
@template.pb_rails(kit_name, props: props) do
|
25
33
|
input
|
26
34
|
end
|
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 15.0.0.pre.alpha.
|
4
|
+
version: 15.0.0.pre.alpha.PLAY2316advancedtablerightsidedoubleborder10507
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-09-
|
12
|
+
date: 2025-09-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -2415,6 +2415,39 @@ files:
|
|
2415
2415
|
- app/pb_kits/playbook/pb_passphrase/passphrase.html.erb
|
2416
2416
|
- app/pb_kits/playbook/pb_passphrase/passphrase.rb
|
2417
2417
|
- app/pb_kits/playbook/pb_passphrase/passphrase.test.jsx
|
2418
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/_pb_bar_graph.scss
|
2419
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/_pb_bar_graph.tsx
|
2420
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors.html.erb
|
2421
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors.jsx
|
2422
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors_rails.md
|
2423
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors_react.md
|
2424
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_default.html.erb
|
2425
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_default.jsx
|
2426
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_height.html.erb
|
2427
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_height.jsx
|
2428
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_height.md
|
2429
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_horizontal.html.erb
|
2430
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_horizontal.jsx
|
2431
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend.html.erb
|
2432
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend.jsx
|
2433
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_non_clickable.jsx
|
2434
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.html.erb
|
2435
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.jsx
|
2436
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_negative_numbers.html.erb
|
2437
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_negative_numbers.jsx
|
2438
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_secondary_y_axis.html.erb
|
2439
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_secondary_y_axis.jsx
|
2440
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_spline.html.erb
|
2441
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_spline.jsx
|
2442
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_spline.md
|
2443
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_stacked.html.erb
|
2444
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_stacked.jsx
|
2445
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/example.yml
|
2446
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/docs/index.js
|
2447
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/pbBarGraphTheme.ts
|
2448
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/pb_bar_graph.html.erb
|
2449
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/pb_bar_graph.rb
|
2450
|
+
- app/pb_kits/playbook/pb_pb_bar_graph/pbbargraph.test.jsx
|
2418
2451
|
- app/pb_kits/playbook/pb_person/_person.scss
|
2419
2452
|
- app/pb_kits/playbook/pb_person/_person.tsx
|
2420
2453
|
- app/pb_kits/playbook/pb_person/docs/_description.md
|
@@ -2705,7 +2738,6 @@ files:
|
|
2705
2738
|
- app/pb_kits/playbook/pb_section_separator/docs/index.js
|
2706
2739
|
- app/pb_kits/playbook/pb_section_separator/section_separator.html.erb
|
2707
2740
|
- app/pb_kits/playbook/pb_section_separator/section_separator.rb
|
2708
|
-
- app/pb_kits/playbook/pb_section_separator/section_separator.test.js
|
2709
2741
|
- app/pb_kits/playbook/pb_select/_select.scss
|
2710
2742
|
- app/pb_kits/playbook/pb_select/_select.tsx
|
2711
2743
|
- app/pb_kits/playbook/pb_select/docs/_description.md
|
@@ -3625,9 +3657,9 @@ files:
|
|
3625
3657
|
- app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
|
3626
3658
|
- app/pb_kits/playbook/utilities/text.ts
|
3627
3659
|
- app/pb_kits/playbook/utilities/validEmojiChecker.ts
|
3628
|
-
- dist/chunks/_line_graph-
|
3629
|
-
- dist/chunks/_typeahead-
|
3630
|
-
- dist/chunks/_weekday_stacked-
|
3660
|
+
- dist/chunks/_line_graph-BBny-YYZ.js
|
3661
|
+
- dist/chunks/_typeahead-CeyJ6-GF.js
|
3662
|
+
- dist/chunks/_weekday_stacked-CUUNTwVc.js
|
3631
3663
|
- dist/chunks/lazysizes-B7xYodB-.js
|
3632
3664
|
- dist/chunks/lib-BTs5acfO.js
|
3633
3665
|
- dist/chunks/pb_form_validation-CKkaQFX3.js
|
@@ -1,165 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import { render, screen } from '../utilities/test-utils'
|
3
|
-
|
4
|
-
import SectionSeparator from './_section_separator'
|
5
|
-
|
6
|
-
const testId = "section-separator-kit"
|
7
|
-
|
8
|
-
describe("Section Separator Kit", () => {
|
9
|
-
test("renders basic section separator with default props", () => {
|
10
|
-
render(
|
11
|
-
<SectionSeparator
|
12
|
-
data={{ testid: testId }}
|
13
|
-
/>
|
14
|
-
)
|
15
|
-
|
16
|
-
const kit = screen.getByTestId(testId)
|
17
|
-
expect(kit).toHaveClass("pb_section_separator_kit pb_section_separator_card pb_section_separator_horizontal pb_section_separator_solid pb_section_separator_color_default")
|
18
|
-
})
|
19
|
-
|
20
|
-
test("renders with text prop", () => {
|
21
|
-
const text = "Section Title"
|
22
|
-
render(
|
23
|
-
<SectionSeparator
|
24
|
-
data={{ testid: testId }}
|
25
|
-
text={text}
|
26
|
-
/>
|
27
|
-
)
|
28
|
-
|
29
|
-
const kit = screen.getByTestId(testId)
|
30
|
-
const textElement = screen.getByText(text)
|
31
|
-
|
32
|
-
expect(kit).toHaveClass("pb_section_separator_kit")
|
33
|
-
expect(textElement).toBeInTheDocument()
|
34
|
-
})
|
35
|
-
|
36
|
-
test("renders with children", () => {
|
37
|
-
const childText = "Custom Content"
|
38
|
-
render(
|
39
|
-
<SectionSeparator
|
40
|
-
data={{ testid: testId }}
|
41
|
-
>
|
42
|
-
<span>{childText}</span>
|
43
|
-
</SectionSeparator>
|
44
|
-
)
|
45
|
-
|
46
|
-
const kit = screen.getByTestId(testId)
|
47
|
-
const childElement = screen.getByText(childText)
|
48
|
-
|
49
|
-
expect(kit).toHaveClass("pb_section_separator_kit")
|
50
|
-
expect(childElement).toBeInTheDocument()
|
51
|
-
})
|
52
|
-
|
53
|
-
test("renders vertical orientation", () => {
|
54
|
-
render(
|
55
|
-
<SectionSeparator
|
56
|
-
data={{ testid: testId }}
|
57
|
-
orientation="vertical"
|
58
|
-
/>
|
59
|
-
)
|
60
|
-
|
61
|
-
const kit = screen.getByTestId(testId)
|
62
|
-
expect(kit).toHaveClass("pb_section_separator_kit pb_section_separator_card pb_section_separator_vertical pb_section_separator_solid pb_section_separator_color_default")
|
63
|
-
})
|
64
|
-
|
65
|
-
test("renders background variant", () => {
|
66
|
-
render(
|
67
|
-
<SectionSeparator
|
68
|
-
data={{ testid: testId }}
|
69
|
-
variant="background"
|
70
|
-
/>
|
71
|
-
)
|
72
|
-
|
73
|
-
const kit = screen.getByTestId(testId)
|
74
|
-
expect(kit).toHaveClass("pb_section_separator_kit pb_section_separator_background pb_section_separator_horizontal pb_section_separator_solid pb_section_separator_color_default")
|
75
|
-
})
|
76
|
-
|
77
|
-
test("renders dashed line style", () => {
|
78
|
-
render(
|
79
|
-
<SectionSeparator
|
80
|
-
data={{ testid: testId }}
|
81
|
-
lineStyle="dashed"
|
82
|
-
/>
|
83
|
-
)
|
84
|
-
|
85
|
-
const kit = screen.getByTestId(testId)
|
86
|
-
expect(kit).toHaveClass("pb_section_separator_kit pb_section_separator_card pb_section_separator_horizontal pb_section_separator_dashed pb_section_separator_color_default")
|
87
|
-
})
|
88
|
-
|
89
|
-
test("renders primary color", () => {
|
90
|
-
render(
|
91
|
-
<SectionSeparator
|
92
|
-
color="primary"
|
93
|
-
data={{ testid: testId }}
|
94
|
-
/>
|
95
|
-
)
|
96
|
-
|
97
|
-
const kit = screen.getByTestId(testId)
|
98
|
-
expect(kit).toHaveClass("pb_section_separator_kit pb_section_separator_card pb_section_separator_horizontal pb_section_separator_solid pb_section_separator_color_primary")
|
99
|
-
})
|
100
|
-
|
101
|
-
test("renders dark mode", () => {
|
102
|
-
render(
|
103
|
-
<SectionSeparator
|
104
|
-
dark
|
105
|
-
data={{ testid: testId }}
|
106
|
-
/>
|
107
|
-
)
|
108
|
-
|
109
|
-
const kit = screen.getByTestId(testId)
|
110
|
-
expect(kit).toHaveClass("pb_section_separator_kit pb_section_separator_card pb_section_separator_horizontal pb_section_separator_solid pb_section_separator_color_default")
|
111
|
-
})
|
112
|
-
|
113
|
-
test("renders with custom className", () => {
|
114
|
-
const customClass = "custom-class"
|
115
|
-
render(
|
116
|
-
<SectionSeparator
|
117
|
-
className={customClass}
|
118
|
-
data={{ testid: testId }}
|
119
|
-
/>
|
120
|
-
)
|
121
|
-
|
122
|
-
const kit = screen.getByTestId(testId)
|
123
|
-
expect(kit).toHaveClass("pb_section_separator_kit pb_section_separator_card pb_section_separator_horizontal pb_section_separator_solid pb_section_separator_color_default custom-class")
|
124
|
-
})
|
125
|
-
|
126
|
-
test("renders vertical with children", () => {
|
127
|
-
const childText = "Vertical Content"
|
128
|
-
render(
|
129
|
-
<SectionSeparator
|
130
|
-
data={{ testid: testId }}
|
131
|
-
orientation="vertical"
|
132
|
-
>
|
133
|
-
<span>{childText}</span>
|
134
|
-
</SectionSeparator>
|
135
|
-
)
|
136
|
-
|
137
|
-
const kit = screen.getByTestId(testId)
|
138
|
-
const childElement = screen.getByText(childText)
|
139
|
-
|
140
|
-
expect(kit).toHaveClass("pb_section_separator_kit pb_section_separator_card pb_section_separator_vertical pb_section_separator_solid pb_section_separator_color_default")
|
141
|
-
expect(childElement).toBeInTheDocument()
|
142
|
-
})
|
143
|
-
|
144
|
-
test("renders all props combined", () => {
|
145
|
-
const text = "Combined Props"
|
146
|
-
render(
|
147
|
-
<SectionSeparator
|
148
|
-
color="primary"
|
149
|
-
dark
|
150
|
-
data={{ testid: testId }}
|
151
|
-
lineStyle="dashed"
|
152
|
-
orientation="vertical"
|
153
|
-
variant="background"
|
154
|
-
>
|
155
|
-
<span>{text}</span>
|
156
|
-
</SectionSeparator>
|
157
|
-
)
|
158
|
-
|
159
|
-
const kit = screen.getByTestId(testId)
|
160
|
-
const childElement = screen.getByText(text)
|
161
|
-
|
162
|
-
expect(kit).toHaveClass("pb_section_separator_kit pb_section_separator_background pb_section_separator_vertical pb_section_separator_dashed pb_section_separator_color_primary")
|
163
|
-
expect(childElement).toBeInTheDocument()
|
164
|
-
})
|
165
|
-
})
|