playbook_ui 14.25.0.pre.alpha.testingcss9713 → 14.25.0.pre.alpha.testingcss9751

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 (169) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_avatar/avatar.test.js +1 -1
  3. data/app/pb_kits/playbook/pb_badge/_badge.scss +120 -12
  4. data/app/pb_kits/playbook/pb_body/_body.scss +108 -35
  5. data/app/pb_kits/playbook/pb_body/_body_mixins.scss +1 -1
  6. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.scss +16 -29
  7. data/app/pb_kits/playbook/pb_button/_button.scss +39 -31
  8. data/app/pb_kits/playbook/pb_button/_button.tsx +12 -12
  9. data/app/pb_kits/playbook/pb_button/_button_mixins.scss +2 -2
  10. data/app/pb_kits/playbook/pb_button/button.rb +11 -18
  11. data/app/pb_kits/playbook/pb_button/button.test.js +3 -3
  12. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.scss +82 -73
  13. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar_dark.scss +32 -33
  14. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar_mixins.scss +1 -1
  15. data/app/pb_kits/playbook/pb_button_toolbar/button_toolbar.test.js +2 -2
  16. data/app/pb_kits/playbook/pb_caption/_caption.scss +100 -17
  17. data/app/pb_kits/playbook/pb_caption/_caption_mixin.scss +1 -8
  18. data/app/pb_kits/playbook/pb_checkbox/_checkbox.scss +11 -2
  19. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.scss +6 -6
  20. data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.test.js +1 -1
  21. data/app/pb_kits/playbook/pb_collapsible/_collapsible.scss +1 -1
  22. data/app/pb_kits/playbook/pb_copy_button/copy_button.test.jsx +19 -19
  23. data/app/pb_kits/playbook/pb_currency/_currency.scss +118 -33
  24. data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.scss +16 -6
  25. data/app/pb_kits/playbook/pb_date/_date.scss +14 -16
  26. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_inline_styles.scss +10 -10
  27. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.scss +25 -19
  28. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.tsx +1 -1
  29. data/app/pb_kits/playbook/pb_date_range_stacked/date_range_stacked.test.js +2 -2
  30. data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.scss +66 -26
  31. data/app/pb_kits/playbook/pb_date_stacked/date_stacked.test.js +2 -2
  32. data/app/pb_kits/playbook/pb_date_time/_date_time.scss +5 -12
  33. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.scss +2 -3
  34. data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.scss +17 -14
  35. data/app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.test.js +1 -1
  36. data/app/pb_kits/playbook/pb_detail/_detail.scss +86 -21
  37. data/app/pb_kits/playbook/pb_dialog/_dialog.scss +463 -65
  38. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.html.erb +16 -2
  39. data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.scss +10 -7
  40. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +2 -2
  41. data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +6 -6
  42. data/app/pb_kits/playbook/pb_empty_state/_empty_state.scss +4 -4
  43. data/app/pb_kits/playbook/pb_file_upload/_file_upload.scss +20 -9
  44. data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +1 -1
  45. data/app/pb_kits/playbook/pb_filter/_filter.scss +3 -3
  46. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss +65 -29
  47. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +1 -2
  48. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.test.js +1 -1
  49. data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +1 -1
  50. data/app/pb_kits/playbook/pb_form_group/_error_state_mixin.scss +1 -1
  51. data/app/pb_kits/playbook/pb_form_group/_form_group.scss +48 -48
  52. data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +381 -344
  53. data/app/pb_kits/playbook/pb_form_pill/_form_pill.test.jsx +4 -4
  54. data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +8 -7
  55. data/app/pb_kits/playbook/pb_form_pill/form_pill.rb +9 -2
  56. data/app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js +2 -2
  57. data/app/pb_kits/playbook/pb_icon_button/_icon_button.scss +4 -4
  58. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.scss +40 -39
  59. data/app/pb_kits/playbook/pb_icon_circle/icon_circle.rb +1 -1
  60. data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.scss +15 -15
  61. data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.test.js +1 -1
  62. data/app/pb_kits/playbook/pb_icon_value/_icon_value.scss +16 -15
  63. data/app/pb_kits/playbook/pb_image/_image.scss +41 -36
  64. data/app/pb_kits/playbook/pb_label_value/_label_value.scss +3 -2
  65. data/app/pb_kits/playbook/pb_label_value/label_value.test.js +2 -2
  66. data/app/pb_kits/playbook/pb_legend/_legend.scss +66 -16
  67. data/app/pb_kits/playbook/pb_legend/legend.test.js +1 -1
  68. data/app/pb_kits/playbook/pb_lightbox/lightbox.scss +4 -4
  69. data/app/pb_kits/playbook/pb_lightbox/lightbox.test.jsx +1 -1
  70. data/app/pb_kits/playbook/pb_link/_link.scss +113 -19
  71. data/app/pb_kits/playbook/pb_list/_list.scss +9 -9
  72. data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.scss +13 -11
  73. data/app/pb_kits/playbook/pb_map/_map.scss +1 -1
  74. data/app/pb_kits/playbook/pb_map/docs/_map_default.jsx +1 -1
  75. data/app/pb_kits/playbook/pb_map/docs/_map_with_custom_button.jsx +1 -1
  76. data/app/pb_kits/playbook/pb_map/docs/_map_with_plugin.jsx +1 -1
  77. data/app/pb_kits/playbook/pb_message/_message.scss +20 -15
  78. data/app/pb_kits/playbook/pb_message/_message.tsx +1 -0
  79. data/app/pb_kits/playbook/pb_message/_message_mixins.scss +5 -12
  80. data/app/pb_kits/playbook/pb_message/message.html.erb +1 -1
  81. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.scss +4 -1
  82. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss +16 -15
  83. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.scss +10 -10
  84. data/app/pb_kits/playbook/pb_nav/_bold_mixin.scss +9 -9
  85. data/app/pb_kits/playbook/pb_nav/_collapsible_nav.scss +1 -1
  86. data/app/pb_kits/playbook/pb_online_status/_online_status.scss +19 -15
  87. data/app/pb_kits/playbook/pb_online_status/_online_status.tsx +1 -1
  88. data/app/pb_kits/playbook/pb_online_status/online_status.rb +5 -4
  89. data/app/pb_kits/playbook/pb_online_status/online_status.test.js +2 -2
  90. data/app/pb_kits/playbook/pb_overlay/_overlay.scss +1 -1
  91. data/app/pb_kits/playbook/pb_overlay/overlay.rb +1 -1
  92. data/app/pb_kits/playbook/pb_passphrase/_passphrase.scss +5 -2
  93. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +1 -1
  94. data/app/pb_kits/playbook/pb_pill/_pill.scss +23 -21
  95. data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.scss +12 -10
  96. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.scss +106 -31
  97. data/app/pb_kits/playbook/pb_progress_step/_progress_step.scss +37 -37
  98. data/app/pb_kits/playbook/pb_radio/_radio.scss +71 -52
  99. data/app/pb_kits/playbook/pb_radio/_radio.tsx +1 -1
  100. data/app/pb_kits/playbook/pb_radio/docs/_radio_react_hook.jsx +0 -3
  101. data/app/pb_kits/playbook/pb_section_separator/_section_separator.scss +80 -69
  102. data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +9 -1
  103. data/app/pb_kits/playbook/pb_section_separator/_section_separator_mixin.scss +1 -1
  104. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.jsx +3 -1
  105. data/app/pb_kits/playbook/pb_section_separator/section_separator.rb +7 -1
  106. data/app/pb_kits/playbook/pb_select/_select.scss +2 -2
  107. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +6 -2
  108. data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.scss +13 -4
  109. data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.scss +39 -29
  110. data/app/pb_kits/playbook/pb_selectable_list/_item.tsx +2 -0
  111. data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.scss +8 -11
  112. data/app/pb_kits/playbook/pb_selectable_list/selectable_list.test.js +24 -25
  113. data/app/pb_kits/playbook/pb_selectable_list/selectable_list_item.html.erb +2 -2
  114. data/app/pb_kits/playbook/pb_source/_source.scss +5 -5
  115. data/app/pb_kits/playbook/pb_star_rating/star_rating.test.js +1 -1
  116. data/app/pb_kits/playbook/pb_stat_value/_stat_value.scss +1 -1
  117. data/app/pb_kits/playbook/pb_table/styles/_alignment.scss +1 -1
  118. data/app/pb_kits/playbook/pb_table/styles/_content.scss +1 -1
  119. data/app/pb_kits/playbook/pb_table/styles/_desktop_collapse.scss +1 -1
  120. data/app/pb_kits/playbook/pb_table/styles/_headers.scss +1 -1
  121. data/app/pb_kits/playbook/pb_table/styles/_hover.scss +1 -1
  122. data/app/pb_kits/playbook/pb_table/styles/_mobile.scss +1 -1
  123. data/app/pb_kits/playbook/pb_table/styles/_mobile_collapse.scss +1 -1
  124. data/app/pb_kits/playbook/pb_table/styles/_outer_padding.scss +1 -1
  125. data/app/pb_kits/playbook/pb_table/styles/_reset.scss +1 -1
  126. data/app/pb_kits/playbook/pb_table/styles/_scroll.scss +12 -12
  127. data/app/pb_kits/playbook/pb_table/styles/_side_highlight.scss +2 -2
  128. data/app/pb_kits/playbook/pb_table/styles/_single-line.scss +1 -1
  129. data/app/pb_kits/playbook/pb_table/styles/_striped.scss +1 -1
  130. data/app/pb_kits/playbook/pb_table/styles/_structure.scss +1 -1
  131. data/app/pb_kits/playbook/pb_table/styles/_table-card.scss +1 -1
  132. data/app/pb_kits/playbook/pb_table/styles/_table-dark.scss +2 -2
  133. data/app/pb_kits/playbook/pb_table/styles/_table_header.scss +4 -4
  134. data/app/pb_kits/playbook/pb_table/styles/_tablet_collapse.scss +1 -1
  135. data/app/pb_kits/playbook/pb_table/styles/_vertical_border.scss +1 -1
  136. data/app/pb_kits/playbook/pb_text_input/_text_input.scss +4 -4
  137. data/app/pb_kits/playbook/pb_textarea/_textarea.scss +5 -5
  138. data/app/pb_kits/playbook/pb_time/_time.scss +43 -16
  139. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.scss +14 -14
  140. data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.scss +5 -8
  141. data/app/pb_kits/playbook/pb_timeline/_timeline.scss +41 -41
  142. data/app/pb_kits/playbook/pb_timestamp/_timestamp.scss +4 -4
  143. data/app/pb_kits/playbook/pb_title/_title.scss +41 -38
  144. data/app/pb_kits/playbook/pb_title/_title.tsx +17 -8
  145. data/app/pb_kits/playbook/pb_title/_title_mixin.scss +2 -2
  146. data/app/pb_kits/playbook/pb_title/title.rb +20 -10
  147. data/app/pb_kits/playbook/pb_title/title.test.js +4 -4
  148. data/app/pb_kits/playbook/pb_title_count/_title_count.scss +19 -8
  149. data/app/pb_kits/playbook/pb_title_detail/_title_detail.scss +10 -11
  150. data/app/pb_kits/playbook/pb_toggle/_toggle.scss +1 -1
  151. data/app/pb_kits/playbook/pb_tooltip/_tooltip.scss +1 -1
  152. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +10 -10
  153. data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +3 -3
  154. data/app/pb_kits/playbook/pb_user/_user.scss +13 -13
  155. data/app/pb_kits/playbook/pb_user/user.test.js +1 -1
  156. data/app/pb_kits/playbook/pb_user_badge/_user_badge.scss +23 -8
  157. data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.scss +10 -10
  158. data/app/pb_kits/playbook/pb_weekday_stacked/weekday_stacked.test.jsx +3 -3
  159. data/dist/chunks/{_line_graph-0Y0wuiB9.js → _line_graph-Dv_ODxW3.js} +1 -1
  160. data/dist/chunks/_typeahead-CD5RAaaP.js +6 -0
  161. data/dist/chunks/{_weekday_stacked-Dblcf2V8.js → _weekday_stacked-Bv6tOPKC.js} +2 -2
  162. data/dist/chunks/vendor.js +1 -1
  163. data/dist/playbook-doc.js +2 -2
  164. data/dist/playbook-rails-react-bindings.js +1 -1
  165. data/dist/playbook-rails.js +1 -1
  166. data/dist/playbook.css +1 -1
  167. data/lib/playbook/version.rb +1 -1
  168. metadata +5 -5
  169. data/dist/chunks/_typeahead-B2gV75O0.js +0 -6
@@ -13,7 +13,7 @@ test('should render classname', () => {
13
13
  )
14
14
 
15
15
  const kit = screen.getByTestId(testId)
16
- expect(kit).toHaveClass('pb_form_pill_kit_primary none')
16
+ expect(kit).toHaveClass('pb_form_pill_kit pb_form_pill_primary pb_form_pill_none')
17
17
  });
18
18
 
19
19
  test('displays text content', () => {
@@ -37,7 +37,7 @@ test('displays color variant', () => {
37
37
  />
38
38
  )
39
39
  const kit = screen.getByTestId(testId)
40
- expect(kit).toHaveClass(`pb_form_pill_kit_neutral none`)
40
+ expect(kit).toHaveClass(`pb_form_pill_kit pb_form_pill_neutral pb_form_pill_none`)
41
41
  });
42
42
 
43
43
  test('displays size variant', () => {
@@ -49,7 +49,7 @@ test('displays size variant', () => {
49
49
  />
50
50
  )
51
51
  const kit = screen.getByTestId('formpill')
52
- expect(kit).toHaveClass(`pb_form_pill_kit_primary small none`)
52
+ expect(kit).toHaveClass(`pb_form_pill_kit pb_form_pill_small pb_form_pill_primary pb_form_pill_none`)
53
53
  });
54
54
 
55
55
  test('displays icon', () => {
@@ -60,5 +60,5 @@ test('displays icon', () => {
60
60
  />
61
61
  )
62
62
  const kit = screen.getByTestId('formpill')
63
- expect(kit).toHaveClass(`pb_form_pill_kit_primary_icon none`)
63
+ expect(kit).toHaveClass(`pb_form_pill_kit_icon pb_form_pill_primary pb_form_pill_none`)
64
64
  });
@@ -48,7 +48,7 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
48
48
  icon = "",
49
49
  } = props
50
50
 
51
- const iconClass = icon ? "_icon" : ""
51
+ const iconClass = icon ? "icon" : ""
52
52
  const closeIconSize = size === "small" ? "xs" : "sm"
53
53
  const wrappedClass = wrapped ? "wrapped" : ""
54
54
 
@@ -56,12 +56,13 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
56
56
  delete filteredProps.truncate
57
57
 
58
58
  const css = classnames(
59
- `pb_form_pill_kit_${color}${iconClass}`,
60
- globalProps(filteredProps),
61
- wrappedClass,
62
- className,
63
- size === 'small' ? 'small' : null,
64
- textTransform,
59
+ icon ? 'pb_form_pill_kit_icon' : 'pb_form_pill_kit',
60
+ wrapped ? 'pb_form_pill_wrapped' : null,
61
+ size === 'small' ? 'pb_form_pill_small' : null,
62
+ `pb_form_pill_${color}`,
63
+ `pb_form_pill_${textTransform}`,
64
+ globalProps(filteredProps),
65
+ className,
65
66
  )
66
67
 
67
68
  const dataProps = buildDataProps(data)
@@ -20,7 +20,14 @@ module Playbook
20
20
  default: false
21
21
 
22
22
  def classname
23
- generate_classname("pb_form_pill_kit", color, icon_class, name, text, text_transform, wrapped_class)
23
+ classes = []
24
+ classes << (icon ? "pb_form_pill_kit_icon" : "pb_form_pill_kit")
25
+ classes << "pb_form_pill_wrapped" if wrapped
26
+ classes << "pb_form_pill_small" if size == "small"
27
+ classes << "pb_form_pill_#{color}"
28
+ classes << "pb_form_pill_#{text_transform}"
29
+ classes.join(" ")
30
+ generate_classname(classes.join(" "), separator: " ")
24
31
  end
25
32
 
26
33
  def display_text
@@ -32,7 +39,7 @@ module Playbook
32
39
  end
33
40
 
34
41
  def icon_class
35
- icon ? "icon" : nil
42
+ icon ? "icon" : ""
36
43
  end
37
44
 
38
45
  def close_icon_size
@@ -38,14 +38,14 @@ function HomeAdressStreetTest(props) {
38
38
 
39
39
  test("emphasize street by not setting a prop", () => {
40
40
  const { container } = render(<HomeAdressStreetTest />);
41
- expect(container.getElementsByClassName("pb_title_kit_size_4 pb_home_address_street_address")[0]).toHaveTextContent(address);
41
+ expect(container.querySelector(".pb_title_kit.pb_title_4.pb_home_address_street_address")).toHaveTextContent(address);
42
42
 
43
43
  cleanup()
44
44
  });
45
45
 
46
46
  test("emphasize city", () => {
47
47
  const { container } = render(<HomeAdressStreetTest emphasis="city" />);
48
- expect(container.getElementsByClassName("pb_title_kit_size_4 pb_home_address_street_address")[0]).toHaveTextContent(city);
48
+ expect(container.querySelector(".pb_title_kit.pb_title_4.pb_home_address_street_address")).toHaveTextContent(city);
49
49
 
50
50
  cleanup()
51
51
  });
@@ -15,7 +15,7 @@ $icon_colors: (
15
15
  height: fit-content;
16
16
 
17
17
  &:hover {
18
- [class*="pb_button_kit"] {
18
+ .pb_button_kit {
19
19
  background-color: $bg_light;
20
20
  }
21
21
  .icon_button_icon {
@@ -24,7 +24,7 @@ $icon_colors: (
24
24
  }
25
25
 
26
26
  &:active {
27
- [class*="pb_button_kit"] {
27
+ .pb_button_kit {
28
28
  background-color: $bg_light;
29
29
  }
30
30
  .icon_button_icon {
@@ -33,7 +33,7 @@ $icon_colors: (
33
33
  }
34
34
 
35
35
  &:hover:active {
36
- [class*="pb_button_kit"] {
36
+ .pb_button_kit {
37
37
  background-color: $bg_light;
38
38
  }
39
39
  .icon_button_icon {
@@ -46,7 +46,7 @@ $icon_colors: (
46
46
  border-radius: 8px;
47
47
  }
48
48
 
49
- [class*="pb_button_kit"] {
49
+ .pb_button_kit {
50
50
  min-height: 0;
51
51
  background: none;
52
52
  position: relative;
@@ -14,55 +14,56 @@ $pb_icon_circle_sizes: (
14
14
  "xl": 100px,
15
15
  );
16
16
 
17
- .pb_icon_circle_kit {
18
- display: flex;
19
- justify-content: center;
20
- align-items: center;
21
- object-fit: cover;
22
- overflow: hidden;
23
- position: relative;
24
- // font-family set to sans-serif ONLY for emojis.
25
- //Needed to fix misalignment issue caused by Proxima font
26
- .icon_circle_emoji {
27
- font-family: monospace;
28
- }
29
-
30
- i,
31
- svg {
32
- &.pb_icon_kit {
33
- width: 100%;
34
- height: 100%;
35
- display: block;
36
- text-align: center;
37
- text-transform: uppercase;
17
+ // All icon circle variations with complete styling
18
+ @each $size_name, $size_value in $pb_icon_circle_sizes {
19
+ @each $color_name, $color_value in $colors {
20
+ .pb_icon_circle_kit_size_#{$size_name}_#{$color_name} {
21
+ // Base styles
22
+ display: flex;
23
+ justify-content: center;
24
+ align-items: center;
25
+ object-fit: cover;
26
+ overflow: hidden;
38
27
  position: relative;
39
- z-index: 0;
40
- }
41
- }
42
-
43
- @each $name, $size in $pb_icon_circle_sizes {
44
- &[class*=_size_#{$name}] {
45
- width: $size;
46
- height: $size;
47
- border-radius: $size/2;
28
+
29
+ // Size-specific styles
30
+ width: $size_value;
31
+ height: $size_value;
32
+ border-radius: $size_value/2;
48
33
  background: $silver;
49
34
  color: $text_lt_light;
50
- font-size: if($name == "xxs", $size - 6px, $size * 0.38);
51
- line-height: $size;
35
+ font-size: if($size_name == "xxs", $size_value - 6px, $size_value * 0.38);
36
+ line-height: $size_value;
52
37
  flex-shrink: 0;
53
38
  flex-grow: 0;
54
- flex-basis: $size;
55
- }
56
- }
57
-
58
- @each $color_name, $color_value in $colors {
59
- &[class*=_#{"" + $color_name}] {
39
+ flex-basis: $size_value;
40
+
41
+ // Color/variant-specific styles
60
42
  color: $color_value;
61
43
  background: rgba(mix($bg_dark, $color_value, 10%), $opacity_1);
44
+
45
+ // font-family set to sans-serif ONLY for emojis.
46
+ // Needed to fix misalignment issue caused by Proxima font
47
+ .icon_circle_emoji {
48
+ font-family: monospace;
49
+ }
50
+
51
+ i,
52
+ svg {
53
+ &[class^=pb_icon_kit] {
54
+ width: 100%;
55
+ height: 100%;
56
+ display: block;
57
+ text-align: center;
58
+ text-transform: uppercase;
59
+ position: relative;
60
+ z-index: 0;
61
+ }
62
+ }
63
+
62
64
  &.dark {
63
65
  background: rgba(mix($bg_dark, $color_value, 10%), $opacity_2);
64
66
  }
65
67
  }
66
68
  }
67
69
  }
68
-
@@ -11,7 +11,7 @@ module Playbook
11
11
  default: "md"
12
12
  prop :variant, type: Playbook::Props::Enum,
13
13
  values: %w[default royal blue orange purple teal red yellow green orange lighter],
14
- default: "lighter"
14
+ default: "default"
15
15
 
16
16
  def classname
17
17
  generate_classname("pb_icon_circle_kit", "size_#{size}", variant)
@@ -3,50 +3,50 @@
3
3
  @import "../tokens/spacing";
4
4
  @import "../pb_icon_circle/icon_circle";
5
5
 
6
- .pb_icon_stat_value_kit{
6
+ [class^=pb_icon_stat_value_kit]{
7
7
  display: flex;
8
8
  align-items: baseline;
9
9
 
10
- &._vertical {
10
+ &[class*=_vertical] {
11
11
  flex-direction: column;
12
12
 
13
- &._center {
13
+ &[class*=_center] {
14
14
  align-items: center;
15
15
 
16
- .pb_title,
17
- .pb_body,
18
- .pb_caption {
16
+ [class^=pb_title],
17
+ [class^=pb_body],
18
+ [class^=pb_caption] {
19
19
  text-align: center;
20
20
  }
21
21
  }
22
22
 
23
- &._right {
23
+ &[class*=_right] {
24
24
  align-items: flex-end;
25
25
 
26
- .pb_title,
27
- .pb_body,
28
- .pb_caption {
26
+ [class^=pb_title],
27
+ [class^=pb_body],
28
+ [class^=pb_caption] {
29
29
  text-align: right;
30
30
  }
31
31
  }
32
32
 
33
- .pb_icon_circle {
33
+ [class^=pb_icon_circle] {
34
34
  margin-bottom: $space-xs;
35
35
  }
36
36
  }
37
37
 
38
- &._horizontal {
38
+ &[class*=_horizontal] {
39
39
  align-items: center;
40
40
 
41
- &._center {
41
+ &[class*=_center] {
42
42
  justify-content: center;
43
43
  }
44
44
 
45
- &._right {
45
+ &[class*=_right] {
46
46
  justify-content: flex-end;
47
47
  }
48
48
 
49
- .pb_icon_circle {
49
+ [class^=pb_icon_circle] {
50
50
  margin-right: $space-sm;
51
51
  }
52
52
  }
@@ -81,7 +81,7 @@ describe("IconStatValue Kit", () => {
81
81
  )
82
82
 
83
83
  const kit = screen.getByTestId(testId)
84
- const value = kit.querySelector(".pb_title_kit_size_3")
84
+ const value = kit.querySelector(".pb_title_kit.pb_title_3")
85
85
  expect(value.textContent).toEqual("64.18")
86
86
  })
87
87
 
@@ -3,33 +3,34 @@
3
3
  @import "../pb_icon/icon";
4
4
  @import "../pb_body/body";
5
5
 
6
- .pb_icon_value_kit {
6
+ .pb_icon_value_kit_left,
7
+ .pb_icon_value_kit_center,
8
+ .pb_icon_value_kit_right {
7
9
  display: flex;
8
10
  align-items: center;
9
11
 
10
- .pb_body_kit {
12
+ .pb_body_kit_light {
11
13
  font-size: $font-small !important;
12
14
  display: inline-flex;
13
15
  justify-content: flex-start;
14
16
  align-items: center;
15
17
 
16
- .pb_icon_kit {
18
+ svg {
17
19
  font-size: $font-large !important;
18
20
  margin-right: $space-xs !important;
19
21
  flex-shrink: 0;
20
22
  }
21
- &.dark {
22
-
23
- }
24
23
  }
24
+ }
25
25
 
26
- &._left {
27
- justify-content: flex-start;
28
- }
29
- &._center {
30
- justify-content: center;
31
- }
32
- &._right {
33
- justify-content: flex-end;
34
- }
26
+ .pb_icon_value_kit_left {
27
+ justify-content: flex-start;
28
+ }
29
+
30
+ .pb_icon_value_kit_center {
31
+ justify-content: center;
35
32
  }
33
+
34
+ .pb_icon_value_kit_right {
35
+ justify-content: flex-end;
36
+ }
@@ -9,50 +9,55 @@ $image-sizes: (
9
9
  "xl": 140px,
10
10
  );
11
11
 
12
- .pb_image_kit {
12
+ .pb_image_kit,
13
+ .pb_image_kit_size_xs,
14
+ .pb_image_kit_size_sm,
15
+ .pb_image_kit_size_md,
16
+ .pb_image_kit_size_lg,
17
+ .pb_image_kit_size_xl {
13
18
  position: relative;
14
19
  object-fit: cover;
15
20
 
16
- @each $name, $size in $image-sizes {
17
- &[class*=size_#{$name}] {
18
- width: $size;
19
- height: $size;
20
- object-fit: cover;
21
- position: relative;
22
- flex-shrink: 0;
23
- flex-grow: 0;
24
- flex-basis: $size;
25
- }
26
-
27
- &[class*= rounded] {
28
- border-radius: $border-rad-heaviest;
29
- }
21
+ &.rounded {
22
+ border-radius: $border-rad-heaviest;
23
+ }
30
24
 
31
- &.fade {
32
- opacity: 0;
33
- &.lazyloaded {
34
- opacity: 1;
35
- transition: opacity 300ms ease-in;
36
- }
25
+ &.fade {
26
+ opacity: 0;
27
+ &.lazyloaded {
28
+ opacity: 1;
29
+ transition: opacity 300ms ease-in;
37
30
  }
31
+ }
38
32
 
39
- &.blur {
40
- filter: blur(5px);
41
- &.lazyloaded {
42
- -webkit-filter: blur(0);
43
- filter: blur(0);
44
- transition: filter 300ms ease-in;
45
- }
33
+ &.blur {
34
+ filter: blur(5px);
35
+ &.lazyloaded {
36
+ -webkit-filter: blur(0);
37
+ filter: blur(0);
38
+ transition: filter 300ms ease-in;
46
39
  }
40
+ }
47
41
 
48
- &.scale {
49
- opacity: 0;
50
- transform: scale(0.9);
51
- &.lazyloaded {
52
- opacity: 1;
53
- transform: scale(1);
54
- transition: 700ms ease-in;
55
- }
42
+ &.scale {
43
+ opacity: 0;
44
+ transform: scale(0.9);
45
+ &.lazyloaded {
46
+ opacity: 1;
47
+ transform: scale(1);
48
+ transition: 700ms ease-in;
56
49
  }
57
50
  }
58
51
  }
52
+
53
+ @each $name, $size in $image-sizes {
54
+ .pb_image_kit_size_#{$name} {
55
+ width: $size;
56
+ height: $size;
57
+ object-fit: cover;
58
+ position: relative;
59
+ flex-shrink: 0;
60
+ flex-grow: 0;
61
+ flex-basis: $size;
62
+ }
63
+ }
@@ -1,7 +1,8 @@
1
1
  @import "../tokens/spacing";
2
2
 
3
- .pb_label_value_kit {
4
- .pb_caption_kit {
3
+ .pb_label_value_kit,
4
+ .pb_label_value_kit_details {
5
+ .pb_caption_kit_md {
5
6
  margin-bottom: $space-xs/1.5;
6
7
  }
7
8
  }
@@ -71,7 +71,7 @@ describe("LabelValue Kit", () => {
71
71
  />
72
72
  )
73
73
  const kit = screen.getByTestId(testId)
74
- const text = kit.querySelector(".pb_title_kit_size_4")
74
+ const text = kit.querySelector(".pb_title_kit.pb_title_4")
75
75
  expect(text.textContent).toEqual("JD Installations LLC")
76
76
  })
77
77
 
@@ -103,7 +103,7 @@ describe("LabelValue Kit", () => {
103
103
  />
104
104
  )
105
105
  const kit = screen.getByTestId(testId)
106
- const activeProp = kit.querySelector(".pb_title_kit_size_4_link")
106
+ const activeProp = kit.querySelector(".pb_title_kit.pb_title_4.pb_title_link")
107
107
  expect(activeProp).toBeInTheDocument()
108
108
  })
109
109
  })
@@ -9,26 +9,76 @@
9
9
  background: $color;
10
10
  }
11
11
 
12
- @mixin indicator-colors($colors-list) {
13
- @each $name, $color in $colors-list {
14
- &[class*=#{$name}] {
15
- .pb_legend_indicator_circle {
16
- @include pb_button($color);
17
- }
12
+ // Base class for custom colors (no color suffix)
13
+ .pb_legend_kit {
14
+ .pb_legend_indicator_circle_custom {
15
+ display: inline-block;
16
+ width: 10px;
17
+ height: 10px;
18
+ border-radius: 5px;
19
+ }
20
+ }
21
+
22
+ // Data colors
23
+ @each $name, $color in $data_colors {
24
+ .pb_legend_kit_#{$name} {
25
+ .pb_legend_indicator_circle {
26
+ @include pb_button($color);
27
+ }
28
+
29
+ .pb_legend_indicator_circle_custom {
30
+ display: inline-block;
31
+ width: 10px;
32
+ height: 10px;
33
+ border-radius: 5px;
18
34
  }
19
35
  }
20
36
  }
21
37
 
22
- .pb_legend_kit {
23
- @include indicator-colors($data_colors);
24
- @include indicator-colors($status_colors);
25
- @include indicator-colors($product_colors);
26
- @include indicator-colors($category_colors);
38
+ // Status colors
39
+ @each $name, $color in $status_colors {
40
+ .pb_legend_kit_#{$name} {
41
+ .pb_legend_indicator_circle {
42
+ @include pb_button($color);
43
+ }
44
+
45
+ .pb_legend_indicator_circle_custom {
46
+ display: inline-block;
47
+ width: 10px;
48
+ height: 10px;
49
+ border-radius: 5px;
50
+ }
51
+ }
52
+ }
27
53
 
28
- .pb_legend_indicator_circle_custom {
29
- display: inline-block;
30
- width: 10px;
31
- height: 10px;
32
- border-radius: 5px;
54
+ // Product colors
55
+ @each $name, $color in $product_colors {
56
+ .pb_legend_kit_#{$name} {
57
+ .pb_legend_indicator_circle {
58
+ @include pb_button($color);
59
+ }
60
+
61
+ .pb_legend_indicator_circle_custom {
62
+ display: inline-block;
63
+ width: 10px;
64
+ height: 10px;
65
+ border-radius: 5px;
66
+ }
33
67
  }
34
68
  }
69
+
70
+ // Category colors
71
+ @each $name, $color in $category_colors {
72
+ .pb_legend_kit_#{$name} {
73
+ .pb_legend_indicator_circle {
74
+ @include pb_button($color);
75
+ }
76
+
77
+ .pb_legend_indicator_circle_custom {
78
+ display: inline-block;
79
+ width: 10px;
80
+ height: 10px;
81
+ border-radius: 5px;
82
+ }
83
+ }
84
+ }
@@ -39,7 +39,7 @@ test('prefixText prop renders', () => {
39
39
  )
40
40
 
41
41
  const kit = screen.getByTestId('primary-test')
42
- const prefix = kit.querySelector(".pb_title_kit_size_4")
42
+ const prefix = kit.querySelector(".pb_title_kit.pb_title_4")
43
43
  expect(prefix).toBeInTheDocument()
44
44
  })
45
45
 
@@ -66,18 +66,18 @@ $lightbox-z-index-floor: $z_10 !default;
66
66
  width: 100%;
67
67
  z-index: $lightbox-z-index-floor + 1;
68
68
 
69
- [class^="react-transform-wrapper"] {
69
+ .react-transform-wrapper {
70
70
  flex-shrink: 0;
71
71
  width: 100%;
72
72
  height: 100%;
73
73
  }
74
74
 
75
- [class^="react-transform-content"] {
75
+ .react-transform-content {
76
76
  width: 100%;
77
77
  height: 100%;
78
78
  }
79
79
 
80
- [class^="react-transform-component"] {
80
+ .react-transform-component {
81
81
  width: 100%;
82
82
  height: 100%;
83
83
  img {
@@ -164,4 +164,4 @@ $lightbox-z-index-floor: $z_10 !default;
164
164
  align-items: center;
165
165
  background-color: white;
166
166
  box-shadow: 0 0 6px white;
167
- }
167
+ }
@@ -113,7 +113,7 @@ test('Closes on close button', async () => {
113
113
  )
114
114
 
115
115
  const kit = screen.getByTestId(testId)
116
- const closeIcon = kit.getElementsByClassName('pb_button_kit_link_inline_enabled')[0]
116
+ const closeIcon = kit.querySelector('.pb_button_kit.pb_button_link.pb_button_inline.pb_button_enabled')
117
117
 
118
118
  fireEvent(
119
119
  closeIcon,