playbook_ui 14.8.0.pre.alpha.PLAY1680newwidthprop4661 → 14.8.0.pre.alpha.PLAY16254545

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -2
  3. data/app/pb_kits/playbook/pb_checkbox/checkbox.html.erb +2 -2
  4. data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +4 -0
  5. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb +7 -84
  6. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +0 -1
  7. data/app/pb_kits/playbook/pb_dropdown/dropdown_container.html.erb +1 -0
  8. data/app/pb_kits/playbook/pb_dropdown/dropdown_container.rb +4 -0
  9. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +2 -2
  10. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb +1 -1
  11. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +12 -63
  12. data/app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.html.erb +1 -2
  13. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb +0 -47
  14. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.jsx +0 -59
  15. data/app/pb_kits/playbook/pb_typeahead/index.ts +3 -29
  16. data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +2 -5
  17. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +0 -4
  18. data/app/pb_kits/playbook/utilities/_max_width.scss +9 -29
  19. data/app/pb_kits/playbook/utilities/_min_width.scss +2 -6
  20. data/app/pb_kits/playbook/utilities/globalPropNames.mjs +1 -1
  21. data/app/pb_kits/playbook/utilities/globalProps.ts +4 -37
  22. data/dist/chunks/{_typeahead-Bg7nPSBj.js → _typeahead-D0PihN_3.js} +2 -2
  23. data/dist/chunks/{_weekday_stacked-9V0rzCNn.js → _weekday_stacked-uMIX8f-A.js} +1 -1
  24. data/dist/chunks/{lib-SyD3buPZ.js → lib-BC6ESsxG.js} +1 -1
  25. data/dist/chunks/{pb_form_validation-Dt8UJgrJ.js → pb_form_validation-B_Z9rEbg.js} +1 -1
  26. data/dist/chunks/vendor.js +1 -1
  27. data/dist/menu.yml +0 -321
  28. data/dist/playbook-doc.js +1 -1
  29. data/dist/playbook-rails-react-bindings.js +1 -1
  30. data/dist/playbook-rails.js +1 -1
  31. data/dist/playbook.css +1 -1
  32. data/lib/playbook/classnames.rb +0 -4
  33. data/lib/playbook/forms/builder/typeahead_field.rb +0 -13
  34. data/lib/playbook/kit_base.rb +1 -16
  35. data/lib/playbook/spacing.rb +0 -21
  36. data/lib/playbook/version.rb +1 -1
  37. metadata +6 -13
  38. data/app/pb_kits/playbook/tokens/_height.scss +0 -19
  39. data/app/pb_kits/playbook/tokens/exports/_height.module.scss +0 -37
  40. data/app/pb_kits/playbook/utilities/_height.scss +0 -33
  41. data/app/pb_kits/playbook/utilities/_width.scss +0 -45
  42. data/lib/playbook/height.rb +0 -29
  43. data/lib/playbook/max_height.rb +0 -29
  44. data/lib/playbook/min_height.rb +0 -29
@@ -13,7 +13,6 @@ module Playbook
13
13
  prop(:classname),
14
14
  spacing_props,
15
15
  dark_props,
16
- width_props,
17
16
  min_width_props,
18
17
  max_width_props,
19
18
  z_index_props,
@@ -44,9 +43,6 @@ module Playbook
44
43
  right_props,
45
44
  bottom_props,
46
45
  vertical_align_props,
47
- height_props,
48
- min_height_props,
49
- max_height_props,
50
46
  ].compact.join(" ")
51
47
  end
52
48
 
@@ -5,19 +5,6 @@ module Playbook
5
5
  class Builder
6
6
  def typeahead(name, _options = {}, _html_options = {}, props: {})
7
7
  props[:name] = name
8
-
9
- input_id = "#{name}_input"
10
- props[:input_options] ||= {}
11
- props[:input_options][:id] ||= input_id
12
-
13
- props[:label] = @template.label(@object_name, name, for: props[:input_options][:id]) if props[:label] == true
14
-
15
- if props[:validation]
16
- validation_message = props[:validation][:message]
17
- props[:input_options][:data] ||= {}
18
- props[:input_options][:data][:validation_message] = validation_message
19
- end
20
-
21
8
  @template.pb_rails("typeahead", props: props)
22
9
  end
23
10
  end
@@ -30,9 +30,6 @@ require "playbook/top"
30
30
  require "playbook/right"
31
31
  require "playbook/bottom"
32
32
  require "playbook/vertical_align"
33
- require "playbook/height"
34
- require "playbook/min_height"
35
- require "playbook/max_height"
36
33
 
37
34
  module Playbook
38
35
  include ActionView::Helpers
@@ -70,9 +67,6 @@ module Playbook
70
67
  include Playbook::Right
71
68
  include Playbook::Bottom
72
69
  include Playbook::VerticalAlign
73
- include Playbook::Height
74
- include Playbook::MinHeight
75
- include Playbook::MaxHeight
76
70
 
77
71
  prop :id
78
72
  prop :data, type: Playbook::Props::HashProp, default: {}
@@ -172,17 +166,8 @@ module Playbook
172
166
  end
173
167
 
174
168
  def dynamic_inline_props
175
- styles = global_inline_props.map { |key, value| "#{key.to_s.gsub('_', '-')}: #{value}" if inline_validator(key, value) }.compact
169
+ styles = global_inline_props.map { |key, value| "#{key.to_s.gsub('_', '-')}: #{value}" if value.present? }.compact
176
170
  styles.join("; ").presence
177
171
  end
178
-
179
- def inline_validator(key, value)
180
- return false if value.nil?
181
- return false if height_values.include?(value) && key == :height
182
- return false if min_height_values.include?(value) && key == :min_height
183
- return false if max_height_values.include?(value) && key == :max_height
184
-
185
- true
186
- end
187
172
  end
188
173
  end
@@ -12,7 +12,6 @@ module Playbook
12
12
  base.prop :margin_y
13
13
  base.prop :max_width
14
14
  base.prop :min_width
15
- base.prop :width
16
15
  base.prop :padding
17
16
  base.prop :padding_bottom
18
17
  base.prop :padding_left
@@ -34,12 +33,6 @@ module Playbook
34
33
  }
35
34
  end
36
35
 
37
- def width_options
38
- {
39
- width: "w",
40
- }
41
- end
42
-
43
36
  def max_width_values
44
37
  %w[0% xs sm md lg xl xxl 0 none 100%]
45
38
  end
@@ -48,10 +41,6 @@ module Playbook
48
41
  %w[0% xs sm md lg xl xxl 0 none 100%]
49
42
  end
50
43
 
51
- def width_values
52
- %w[0% xs sm md lg xl xxl 0 none 100%]
53
- end
54
-
55
44
  def spacing_options
56
45
  {
57
46
  margin: "m",
@@ -136,15 +125,5 @@ module Playbook
136
125
  "max_width_#{filter_classname(width_value)}" if max_width_values.include? width_value
137
126
  end.compact.join(" ")
138
127
  end
139
-
140
- def width_props
141
- selected_w_props = width_options.keys.select { |sk| try(sk) }
142
- return nil unless selected_w_props.present?
143
-
144
- selected_w_props.map do |k|
145
- width_value = send(k)
146
- "width_#{filter_classname(width_value)}" if width_values.include? width_value
147
- end.compact.join(" ")
148
- end
149
128
  end
150
129
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "14.8.0"
5
- VERSION = "14.8.0.pre.alpha.PLAY1680newwidthprop4661"
5
+ VERSION = "14.8.0.pre.alpha.PLAY16254545"
6
6
  end
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: 14.8.0.pre.alpha.PLAY1680newwidthprop4661
4
+ version: 14.8.0.pre.alpha.PLAY16254545
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: 2024-11-26 00:00:00.000000000 Z
12
+ date: 2024-11-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -3087,7 +3087,6 @@ files:
3087
3087
  - app/pb_kits/playbook/tokens/_colors.scss
3088
3088
  - app/pb_kits/playbook/tokens/_container.scss
3089
3089
  - app/pb_kits/playbook/tokens/_display.scss
3090
- - app/pb_kits/playbook/tokens/_height.scss
3091
3090
  - app/pb_kits/playbook/tokens/_line_height.scss
3092
3091
  - app/pb_kits/playbook/tokens/_opacity.scss
3093
3092
  - app/pb_kits/playbook/tokens/_overflow.scss
@@ -3103,7 +3102,6 @@ files:
3103
3102
  - app/pb_kits/playbook/tokens/_vertical_align.scss
3104
3103
  - app/pb_kits/playbook/tokens/exports/_border_radius.module.scss
3105
3104
  - app/pb_kits/playbook/tokens/exports/_colors.module.scss
3106
- - app/pb_kits/playbook/tokens/exports/_height.module.scss
3107
3105
  - app/pb_kits/playbook/tokens/exports/_line_height.module.scss
3108
3106
  - app/pb_kits/playbook/tokens/exports/_opacity.module.scss
3109
3107
  - app/pb_kits/playbook/tokens/exports/_positioning.module.scss
@@ -3121,7 +3119,6 @@ files:
3121
3119
  - app/pb_kits/playbook/utilities/_display.scss
3122
3120
  - app/pb_kits/playbook/utilities/_flexbox.scss
3123
3121
  - app/pb_kits/playbook/utilities/_focus.scss
3124
- - app/pb_kits/playbook/utilities/_height.scss
3125
3122
  - app/pb_kits/playbook/utilities/_hover.scss
3126
3123
  - app/pb_kits/playbook/utilities/_line_height.scss
3127
3124
  - app/pb_kits/playbook/utilities/_max_width.scss
@@ -3135,7 +3132,6 @@ files:
3135
3132
  - app/pb_kits/playbook/utilities/_text_align.scss
3136
3133
  - app/pb_kits/playbook/utilities/_truncate.scss
3137
3134
  - app/pb_kits/playbook/utilities/_vertical_align.scss
3138
- - app/pb_kits/playbook/utilities/_width.scss
3139
3135
  - app/pb_kits/playbook/utilities/flexbox_global_props/_align_content.scss
3140
3136
  - app/pb_kits/playbook/utilities/flexbox_global_props/_align_items.scss
3141
3137
  - app/pb_kits/playbook/utilities/flexbox_global_props/_align_self.scss
@@ -3174,11 +3170,11 @@ files:
3174
3170
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3175
3171
  - app/pb_kits/playbook/utilities/text.ts
3176
3172
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3177
- - dist/chunks/_typeahead-Bg7nPSBj.js
3178
- - dist/chunks/_weekday_stacked-9V0rzCNn.js
3173
+ - dist/chunks/_typeahead-D0PihN_3.js
3174
+ - dist/chunks/_weekday_stacked-uMIX8f-A.js
3179
3175
  - dist/chunks/lazysizes-B7xYodB-.js
3180
- - dist/chunks/lib-SyD3buPZ.js
3181
- - dist/chunks/pb_form_validation-Dt8UJgrJ.js
3176
+ - dist/chunks/lib-BC6ESsxG.js
3177
+ - dist/chunks/pb_form_validation-B_Z9rEbg.js
3182
3178
  - dist/chunks/vendor.js
3183
3179
  - dist/menu.yml
3184
3180
  - dist/playbook-doc.js
@@ -3215,7 +3211,6 @@ files:
3215
3211
  - lib/playbook/forms/builder/select_field.rb
3216
3212
  - lib/playbook/forms/builder/star_rating_field.rb
3217
3213
  - lib/playbook/forms/builder/typeahead_field.rb
3218
- - lib/playbook/height.rb
3219
3214
  - lib/playbook/hover.rb
3220
3215
  - lib/playbook/justify_content.rb
3221
3216
  - lib/playbook/justify_self.rb
@@ -3223,8 +3218,6 @@ files:
3223
3218
  - lib/playbook/kit_resolver.rb
3224
3219
  - lib/playbook/left.rb
3225
3220
  - lib/playbook/line_height.rb
3226
- - lib/playbook/max_height.rb
3227
- - lib/playbook/min_height.rb
3228
3221
  - lib/playbook/number_spacing.rb
3229
3222
  - lib/playbook/order.rb
3230
3223
  - lib/playbook/overflow.rb
@@ -1,19 +0,0 @@
1
-
2
- $height_auto: auto !default;
3
- $height_xs: 320px !default;
4
- $height_sm: 480px !default;
5
- $height_md: 768px !default;
6
- $height_lg: 1024px !default;
7
- $height_xl: 1280px !default;
8
- $height_2xl: 1440px !default;
9
- $height_3xl: 1920px !default;
10
- $heights: (
11
- height_auto: $height_auto,
12
- height_xs: $height_xs,
13
- height_sm: $height_sm,
14
- height_md: $height_md,
15
- height_lg: $height_lg,
16
- height_xl: $height_xl,
17
- height_xxl: $height_2xl,
18
- height_xxxl: $height_3xl
19
- );
@@ -1,37 +0,0 @@
1
- @import "../height";
2
-
3
- :export {
4
- @mixin export_height($height_list) {
5
- @each $name, $value in $height_list {
6
- .#{$name} {
7
- height: $value;
8
- }
9
- }
10
- }
11
-
12
- @include export_height($heights);
13
- }
14
-
15
- :export {
16
- @mixin export_max_height($height_list) {
17
- @each $name, $value in $height_list {
18
- .max_#{$name} {
19
- max-height: $value;
20
- }
21
- }
22
- }
23
-
24
- @include export_max_height($heights);
25
- }
26
-
27
- :export {
28
- @mixin export_min_height($height_list) {
29
- @each $name, $value in $height_list {
30
- .min_#{$name} {
31
- min-height: $value;
32
- }
33
- }
34
- }
35
-
36
- @include export_min_height($heights);
37
- }
@@ -1,33 +0,0 @@
1
- @import "../tokens/exports/height.module";
2
-
3
- @mixin export_height($height_list) {
4
- @each $name, $value in $height_list {
5
- .#{$name} {
6
- height: $value;
7
- }
8
- }
9
- }
10
-
11
- @mixin export_max_height($height_list) {
12
- @each $name, $value in $height_list {
13
- .max_#{$name} {
14
- max-height: $value;
15
- }
16
- }
17
- }
18
-
19
- @mixin export_min_height($height_list) {
20
- @each $name, $value in $height_list {
21
- .min_#{$name} {
22
- min-height: $value;
23
- }
24
- }
25
- }
26
-
27
- @include export_height($heights);
28
- @include export_max_height($heights);
29
- @include export_min_height($heights);
30
-
31
- .height-resize {
32
- resize: vertical;
33
- }
@@ -1,45 +0,0 @@
1
- @import "../tokens/container";
2
-
3
- .width_none {
4
- width: none;
5
- }
6
-
7
- .width_0 {
8
- width: map-get($containers, 'none');
9
- }
10
-
11
- .width_0_percent {
12
- width: map-get($containers, 'none');
13
- }
14
-
15
- .width_xxs {
16
- width: $container_xxs;
17
- }
18
-
19
- .width_xs {
20
- width: $container_xs;
21
- }
22
-
23
- .width_sm {
24
- width: $container_sm;
25
- }
26
-
27
- .width_md {
28
- width: $container_md;
29
- }
30
-
31
- .width_lg {
32
- width: $container_lg;
33
- }
34
-
35
- .width_xl {
36
- width: $container_xl;
37
- }
38
-
39
- .width_xxl {
40
- width: $container_xxl;
41
- }
42
-
43
- .width_100_percent {
44
- width: $container_100;
45
- }
@@ -1,29 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Playbook
4
- module Height
5
- def self.included(base)
6
- base.prop :height
7
- end
8
-
9
- def height_props
10
- selected_props = height_options.keys.select { |sk| try(sk) }
11
- return nil unless selected_props.present?
12
-
13
- selected_props.map do |k|
14
- height_value = send(k)
15
- "height_#{height_value}" if height_values.include? height_value.to_s
16
- end.compact.join(" ")
17
- end
18
-
19
- def height_options
20
- {
21
- height: "height",
22
- }
23
- end
24
-
25
- def height_values
26
- %w[auto xs sm md lg xl xxl xxxl]
27
- end
28
- end
29
- end
@@ -1,29 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Playbook
4
- module MaxHeight
5
- def self.included(base)
6
- base.prop :max_height
7
- end
8
-
9
- def max_height_props
10
- selected_props = max_height_options.keys.select { |sk| try(sk) }
11
- return nil unless selected_props.present?
12
-
13
- selected_props.map do |k|
14
- max_height_value = send(k)
15
- "max_height_#{max_height_value}" if max_height_values.include? max_height_value.to_s
16
- end.compact.join(" ")
17
- end
18
-
19
- def max_height_options
20
- {
21
- max_height: "max_height",
22
- }
23
- end
24
-
25
- def max_height_values
26
- %w[auto xs sm md lg xl xxl xxxl]
27
- end
28
- end
29
- end
@@ -1,29 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Playbook
4
- module MinHeight
5
- def self.included(base)
6
- base.prop :min_height
7
- end
8
-
9
- def min_height_props
10
- selected_props = min_height_options.keys.select { |sk| try(sk) }
11
- return nil unless selected_props.present?
12
-
13
- selected_props.map do |k|
14
- min_height_value = send(k)
15
- "min_height_#{min_height_value}" if min_height_values.include? min_height_value.to_s
16
- end.compact.join(" ")
17
- end
18
-
19
- def min_height_options
20
- {
21
- min_height: "min_height",
22
- }
23
- end
24
-
25
- def min_height_values
26
- %w[auto xs sm md lg xl xxl xxxl]
27
- end
28
- end
29
- end