playbook_ui 15.1.0.pre.alpha.typeaheadscss11143 → 15.1.0.pre.rc.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.
Files changed (207) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -3
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/RegularTableView.tsx +11 -24
  4. data/app/pb_kits/playbook/pb_advanced_table/Components/VirtualizedTableView.tsx +7 -7
  5. data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableState.ts +2 -0
  6. data/app/pb_kits/playbook/pb_advanced_table/Utilities/RowUtils.ts +2 -7
  7. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +13 -67
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_vertical_border.jsx +2 -2
  9. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +1 -0
  10. data/app/pb_kits/playbook/pb_button/docs/example.yml +0 -2
  11. data/app/pb_kits/playbook/pb_card/_card.scss +4 -12
  12. data/app/pb_kits/playbook/pb_card/_card.tsx +3 -3
  13. data/app/pb_kits/playbook/pb_card/_card_mixin.scss +0 -10
  14. data/app/pb_kits/playbook/pb_card/docs/_card_highlight.html.erb +0 -3
  15. data/app/pb_kits/playbook/pb_card/docs/_card_highlight.jsx +0 -8
  16. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.tsx +0 -2
  17. data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.html.erb +0 -1
  18. data/app/pb_kits/playbook/pb_contact/_contact.tsx +0 -5
  19. data/app/pb_kits/playbook/pb_contact/contact.rb +0 -4
  20. data/app/pb_kits/playbook/pb_contact/contact.test.js +1 -21
  21. data/app/pb_kits/playbook/pb_contact/docs/_contact_default.html.erb +1 -16
  22. data/app/pb_kits/playbook/pb_contact/docs/_contact_default.jsx +0 -15
  23. data/app/pb_kits/playbook/pb_contact/docs/_contact_with_detail.html.erb +0 -6
  24. data/app/pb_kits/playbook/pb_contact/docs/_contact_with_detail.jsx +0 -6
  25. data/app/pb_kits/playbook/pb_date_picker/_date_picker.scss +0 -4
  26. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +4 -6
  27. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +4 -48
  28. data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +7 -5
  29. data/app/pb_kits/playbook/pb_dialog/dialogHelper.js +65 -0
  30. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_stacked_alert.html.erb +16 -16
  31. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_stacked_alert.jsx +1 -2
  32. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_status.html.erb +31 -31
  33. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_status.jsx +3 -4
  34. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +0 -9
  35. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.html.erb +3 -3
  36. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +0 -1
  37. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +0 -11
  38. data/app/pb_kits/playbook/pb_icon_button/_icon_button.tsx +0 -1
  39. data/app/pb_kits/playbook/pb_icon_button/icon_button.html.erb +1 -2
  40. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.tsx +2 -2
  41. data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.scss +21 -15
  42. data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx +5 -6
  43. data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.html.erb +0 -2
  44. data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.rb +3 -11
  45. data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.test.js +8 -9
  46. data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +1 -1
  47. data/app/pb_kits/playbook/pb_loading_inline/loading_inline.rb +1 -1
  48. data/app/pb_kits/playbook/pb_nav/_item.tsx +5 -19
  49. data/app/pb_kits/playbook/pb_nav/_nav.scss +0 -27
  50. data/app/pb_kits/playbook/pb_nav/_nav.test.js +0 -16
  51. data/app/pb_kits/playbook/pb_nav/_nav.tsx +0 -5
  52. data/app/pb_kits/playbook/pb_nav/docs/example.yml +0 -2
  53. data/app/pb_kits/playbook/pb_nav/docs/index.js +1 -2
  54. data/app/pb_kits/playbook/pb_nav/item.html.erb +2 -6
  55. data/app/pb_kits/playbook/pb_nav/nav.rb +1 -6
  56. data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_breached.html.erb +3 -3
  57. data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_common.html.erb +3 -3
  58. data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.html.erb +3 -3
  59. data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_meter_settings.html.erb +3 -3
  60. data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_strength_change.html.erb +3 -3
  61. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb +2 -2
  62. data/app/pb_kits/playbook/pb_section_separator/_section_separator.scss +5 -13
  63. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_children.html.erb +0 -23
  64. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_children.jsx +7 -45
  65. data/app/pb_kits/playbook/pb_section_separator/section_separator.html.erb +1 -4
  66. data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +6 -14
  67. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default.html.erb +4 -8
  68. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default.jsx +0 -5
  69. data/app/pb_kits/playbook/pb_text_input/text_input.html.erb +1 -3
  70. data/app/pb_kits/playbook/pb_text_input/text_input.rb +0 -6
  71. data/app/pb_kits/playbook/pb_timestamp/_timestamp.tsx +8 -24
  72. data/app/pb_kits/playbook/pb_timestamp/docs/_time_stamp_default.md +1 -0
  73. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.html.erb +10 -0
  74. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx +9 -0
  75. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.html.erb +17 -3
  76. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx +15 -0
  77. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.html.erb +2 -0
  78. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.jsx +2 -0
  79. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.html.erb +14 -0
  80. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx +14 -0
  81. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_unstyled.html.erb +4 -0
  82. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_unstyled.jsx +4 -0
  83. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated.jsx +1 -0
  84. data/app/pb_kits/playbook/pb_timestamp/docs/example.yml +6 -18
  85. data/app/pb_kits/playbook/pb_timestamp/docs/index.js +0 -6
  86. data/app/pb_kits/playbook/pb_timestamp/timestamp.rb +7 -29
  87. data/app/pb_kits/playbook/pb_timestamp/timestamp.test.js +4 -69
  88. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +10 -10
  89. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +1 -39
  90. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +0 -2
  91. data/dist/chunks/{_line_graph-B-1uF3pN.js → _line_graph-CnQWoGfx.js} +1 -1
  92. data/dist/chunks/{_typeahead-C8eN5nhR.js → _typeahead-_Pft9jZd.js} +2 -2
  93. data/dist/chunks/_weekday_stacked-D_gm5opl.js +37 -0
  94. data/dist/chunks/{lib-QZuu1ltS.js → lib-CY5ZPzic.js} +1 -1
  95. data/dist/chunks/{pb_form_validation-CleM960_.js → pb_form_validation-D3b0JKHH.js} +1 -1
  96. data/dist/chunks/vendor.js +1 -1
  97. data/dist/menu.yml +2 -16
  98. data/dist/playbook-doc.js +2 -2
  99. data/dist/playbook-rails-react-bindings.js +1 -1
  100. data/dist/playbook-rails.js +1 -1
  101. data/dist/playbook.css +1 -1
  102. data/lib/playbook/engine.rb +1 -0
  103. data/lib/playbook/forms/builder/form_field_builder.rb +2 -37
  104. data/lib/playbook/kit_base.rb +2 -23
  105. data/lib/playbook/version.rb +2 -2
  106. metadata +28 -112
  107. data/app/pb_kits/playbook/pb_button/docs/_button_managed_disabled.html.erb +0 -31
  108. data/app/pb_kits/playbook/pb_button/docs/_button_managed_disabled.md +0 -7
  109. data/app/pb_kits/playbook/pb_button/docs/_button_managed_disabled_helper.html.erb +0 -21
  110. data/app/pb_kits/playbook/pb_button/docs/_button_managed_disabled_helper.md +0 -7
  111. data/app/pb_kits/playbook/pb_button/index.js +0 -99
  112. data/app/pb_kits/playbook/pb_contact/docs/_contact_default.md +0 -5
  113. data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_extendedunderline.html.erb +0 -6
  114. data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_extendedunderline.jsx +0 -39
  115. data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_extendedunderline.md +0 -1
  116. data/app/pb_kits/playbook/pb_pb_bar_graph/_pb_bar_graph.scss +0 -0
  117. data/app/pb_kits/playbook/pb_pb_bar_graph/_pb_bar_graph.tsx +0 -62
  118. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors.html.erb +0 -35
  119. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors.jsx +0 -49
  120. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors_rails.md +0 -1
  121. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors_react.md +0 -2
  122. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_default.html.erb +0 -38
  123. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_default.jsx +0 -51
  124. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_height.html.erb +0 -46
  125. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_height.jsx +0 -62
  126. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_height.md +0 -3
  127. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_horizontal.html.erb +0 -47
  128. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_horizontal.jsx +0 -60
  129. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend.html.erb +0 -25
  130. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend.jsx +0 -36
  131. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_non_clickable.jsx +0 -44
  132. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.html.erb +0 -100
  133. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.jsx +0 -126
  134. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_negative_numbers.html.erb +0 -32
  135. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_negative_numbers.jsx +0 -48
  136. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_secondary_y_axis.html.erb +0 -68
  137. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_secondary_y_axis.jsx +0 -81
  138. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_spline.html.erb +0 -31
  139. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_spline.jsx +0 -42
  140. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_spline.md +0 -2
  141. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_stacked.html.erb +0 -35
  142. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_stacked.jsx +0 -51
  143. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/example.yml +0 -27
  144. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/index.js +0 -11
  145. data/app/pb_kits/playbook/pb_pb_bar_graph/pbBarGraphTheme.ts +0 -106
  146. data/app/pb_kits/playbook/pb_pb_bar_graph/pb_bar_graph.html.erb +0 -1
  147. data/app/pb_kits/playbook/pb_pb_bar_graph/pb_bar_graph.rb +0 -28
  148. data/app/pb_kits/playbook/pb_pb_bar_graph/pbbargraph.test.jsx +0 -31
  149. data/app/pb_kits/playbook/pb_pb_circle_chart/_pb_circle_chart.scss +0 -3
  150. data/app/pb_kits/playbook/pb_pb_circle_chart/_pb_circle_chart.tsx +0 -62
  151. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_block_content.html.erb +0 -31
  152. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_block_content.jsx +0 -81
  153. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_color_overrides.html.erb +0 -25
  154. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_color_overrides.jsx +0 -40
  155. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_color_overrides.md +0 -5
  156. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_custom_tooltip.html.erb +0 -27
  157. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_custom_tooltip.jsx +0 -39
  158. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_custom_tooltip.md +0 -5
  159. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_legend_position.html.erb +0 -93
  160. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_legend_position.jsx +0 -131
  161. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_legend_position.md +0 -14
  162. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_labels.html.erb +0 -42
  163. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_labels.jsx +0 -58
  164. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_legend.html.erb +0 -24
  165. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_legend.jsx +0 -38
  166. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_default.html.erb +0 -22
  167. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_default.jsx +0 -33
  168. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_inner_sizes.html.erb +0 -118
  169. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_inner_sizes.jsx +0 -144
  170. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_live_data.jsx +0 -60
  171. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_rounded.html.erb +0 -24
  172. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_rounded.jsx +0 -42
  173. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_with_title.html.erb +0 -38
  174. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_with_title.jsx +0 -52
  175. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/example.yml +0 -29
  176. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/index.js +0 -11
  177. data/app/pb_kits/playbook/pb_pb_circle_chart/pbCircleChartTheme.ts +0 -88
  178. data/app/pb_kits/playbook/pb_pb_circle_chart/pb_circle_chart.html.erb +0 -1
  179. data/app/pb_kits/playbook/pb_pb_circle_chart/pb_circle_chart.rb +0 -28
  180. data/app/pb_kits/playbook/pb_pb_circle_chart/pb_circle_chart.test.jsx +0 -51
  181. data/app/pb_kits/playbook/pb_section_separator/section_separator.test.js +0 -165
  182. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default.md +0 -1
  183. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.md +0 -1
  184. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.md +0 -1
  185. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.md +0 -5
  186. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_current_year.html.erb +0 -12
  187. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_current_year.jsx +0 -25
  188. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_current_year.md +0 -1
  189. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_date.html.erb +0 -4
  190. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_date.jsx +0 -17
  191. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_date.md +0 -1
  192. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_time.html.erb +0 -18
  193. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_time.jsx +0 -44
  194. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_time.md +0 -1
  195. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.md +0 -1
  196. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated.md +0 -5
  197. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_current_year.html.erb +0 -16
  198. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_current_year.jsx +0 -30
  199. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_current_year.md +0 -1
  200. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_date.html.erb +0 -16
  201. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_date.jsx +0 -30
  202. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_date.md +0 -1
  203. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_time.html.erb +0 -26
  204. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_time.jsx +0 -41
  205. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_time.md +0 -1
  206. data/dist/chunks/_weekday_stacked-1o7KVL87.js +0 -37
  207. data/dist/chunks/componentRegistry-DzmmLR2x.js +0 -1
@@ -2,7 +2,7 @@ import React from 'react'
2
2
  import classnames from 'classnames'
3
3
 
4
4
  import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
5
- import { globalProps, GlobalProps } from '../utilities/globalProps'
5
+ import { globalProps } from '../utilities/globalProps'
6
6
 
7
7
  import Body from '../pb_body/_body'
8
8
  import Caption from '../pb_caption/_caption'
@@ -33,7 +33,8 @@ type IconStatValueProps = {
33
33
  | "yellow"
34
34
  | "orange"
35
35
  | "green"
36
- } & GlobalProps
36
+ | "lighter",
37
+ }
37
38
 
38
39
  const IconStatValue = (props: IconStatValueProps): React.ReactElement => {
39
40
  const {
@@ -49,13 +50,13 @@ const IconStatValue = (props: IconStatValueProps): React.ReactElement => {
49
50
  text = '',
50
51
  unit = '',
51
52
  value = 0,
52
- variant = 'default',
53
+ variant = 'lighter',
53
54
  } = props
54
55
  const ariaProps = buildAriaProps(aria)
55
56
  const dataProps = buildDataProps(data)
56
57
  const htmlProps = buildHtmlProps(htmlOptions)
57
58
  const classes = classnames(
58
- buildCss('pb_icon_stat_value_kit', orientation), globalProps(props),
59
+ buildCss('pb_icon_stat_value_kit', orientation, size, variant), globalProps(props),
59
60
  className
60
61
  )
61
62
  const titleSize = function(size: "sm" | "md" | "lg") {
@@ -100,8 +101,6 @@ const IconStatValue = (props: IconStatValueProps): React.ReactElement => {
100
101
  <IconCircle
101
102
  dark={dark}
102
103
  icon={icon}
103
- marginBottom={orientation == 'vertical' ? 'xs' : undefined}
104
- marginRight={orientation == 'horizontal' ? 'sm' : undefined}
105
104
  size={size}
106
105
  variant={variant}
107
106
  />
@@ -3,8 +3,6 @@
3
3
  <%= pb_rails("icon_circle", props: {
4
4
  dark: object.dark,
5
5
  icon: object.icon,
6
- margin_right: object.icon_margin_right,
7
- margin_bottom: object.icon_margin_bottom,
8
6
  size: object.size,
9
7
  variant: object.variant }) %>
10
8
 
@@ -9,8 +9,8 @@ module Playbook
9
9
  values: %w[sm md lg],
10
10
  default: "sm"
11
11
  prop :variant, type: Playbook::Props::Enum,
12
- values: %w[default royal blue purple teal red yellow green orange],
13
- default: "default"
12
+ values: %w[default royal blue purple teal red yellow green orange lighter],
13
+ default: "lighter"
14
14
 
15
15
  prop :orientation, type: Playbook::Props::Enum,
16
16
  values: %w[vertical horizontal],
@@ -25,7 +25,7 @@ module Playbook
25
25
  prop :value
26
26
 
27
27
  def classname
28
- generate_classname("pb_icon_stat_value_kit", orientation)
28
+ generate_classname("pb_icon_stat_value_kit", orientation, size, variant)
29
29
  end
30
30
 
31
31
  def value_string
@@ -41,14 +41,6 @@ module Playbook
41
41
  3
42
42
  end
43
43
  end
44
-
45
- def icon_margin_right
46
- orientation === "horizontal" && "sm"
47
- end
48
-
49
- def icon_margin_bottom
50
- orientation === "vertical" && "xs"
51
- end
52
44
  end
53
45
  end
54
46
  end
@@ -18,7 +18,7 @@ describe("IconStatValue Kit", () => {
18
18
  )
19
19
 
20
20
  const kit = screen.getByTestId(testId)
21
- expect(kit).toHaveClass("pb_icon_stat_value_kit_horizontal")
21
+ expect(kit).toHaveClass("pb_icon_stat_value_kit_horizontal_sm_lighter")
22
22
  })
23
23
 
24
24
  test("renders icon", () => {
@@ -99,10 +99,9 @@ describe("IconStatValue Kit", () => {
99
99
  value={64.18}
100
100
  />
101
101
  )
102
- const size = sizeProp === "sm" ? "3" : sizeProp === "md" ? "2" : "1"
102
+
103
103
  const kit = screen.getByTestId(testId)
104
- const title = kit.querySelector(".pb_title_kit")
105
- expect(title).toHaveClass(`pb_title_${size}`)
104
+ expect(kit).toHaveClass(`pb_icon_stat_value_kit_horizontal_${sizeProp}_lighter`)
106
105
 
107
106
  cleanup()
108
107
  })
@@ -116,7 +115,8 @@ describe("IconStatValue Kit", () => {
116
115
  "teal",
117
116
  "red",
118
117
  "yellow",
119
- "green"].forEach(
118
+ "green",
119
+ "lighter"].forEach(
120
120
  (colorProp) => {
121
121
  render(
122
122
  <IconStatValue
@@ -128,10 +128,9 @@ describe("IconStatValue Kit", () => {
128
128
  variant={colorProp}
129
129
  />
130
130
  )
131
-
131
+
132
132
  const kit = screen.getByTestId(testId)
133
- const iconCircle = kit.querySelector(`.pb_icon_circle_kit_size_sm_${colorProp}`)
134
- expect(iconCircle).toBeInTheDocument()
133
+ expect(kit).toHaveClass(`pb_icon_stat_value_kit_horizontal_sm_${colorProp}`)
135
134
 
136
135
  cleanup()
137
136
  })
@@ -150,7 +149,7 @@ describe("IconStatValue Kit", () => {
150
149
  )
151
150
 
152
151
  const kit = screen.getByTestId(testId)
153
- expect(kit).toHaveClass("pb_icon_stat_value_kit_vertical")
152
+ expect(kit).toHaveClass("pb_icon_stat_value_kit_vertical_sm_lighter")
154
153
  })
155
154
 
156
155
  })
@@ -56,7 +56,7 @@ const LoadingInline = (props: LoadingInlineProps) => {
56
56
  <Icon
57
57
  aria={{ label: 'loading icon' }}
58
58
  fixedWidth
59
- icon={variant === 'dotted' ? 'spinner' : variant === 'solid' ? 'circle-notch' : undefined}
59
+ icon={variant === 'dotted' ? 'spinner' : variant === 'solid' ? 'spinner-solid' : undefined}
60
60
  pulse
61
61
  />
62
62
  {text}
@@ -20,7 +20,7 @@ module Playbook
20
20
  if variant == "dotted"
21
21
  "spinner"
22
22
  elsif variant == "solid"
23
- "circle-notch"
23
+ "spinner-solid"
24
24
  end
25
25
  end
26
26
  end
@@ -140,8 +140,7 @@ const { filteredPadding, filteredMargin } = filterItemSpacing(itemSpacing);
140
140
  delete filteredProps?.marginLeft;
141
141
 
142
142
 
143
- const isLink = !!link
144
- const Tag = isLink ? "a" : "div"
143
+ const Tag = link ? "a" : "div";
145
144
  const activeClass = active === true ? "active" : "";
146
145
  const highlightedBorderClass = active === true && highlighted_border === false ? "highlighted_border_none" : "";
147
146
  const collapsibleTrailClass = collapsible && collapsibleTrail ? "collapsible_trail" : "";
@@ -201,13 +200,6 @@ const { filteredPadding, filteredMargin } = filterItemSpacing(itemSpacing);
201
200
 
202
201
  const collapsibleClasses = buildCss("collapsible_nav_wrapper", activeClass, highlightedBorderClass, collapsibleTrailClass)
203
202
 
204
- const handleKeyDown = (e: React.KeyboardEvent) => {
205
- if (!isLink && (e.key === "Enter" || e.key === " ")) {
206
- e.preventDefault()
207
- onClick?.()
208
- }
209
- }
210
-
211
203
  return (
212
204
  <>
213
205
  {collapsible ? (
@@ -230,18 +222,15 @@ const { filteredPadding, filteredMargin } = filterItemSpacing(itemSpacing);
230
222
  {...dataProps}
231
223
  {...htmlProps}
232
224
  className={classes}
233
- href={isLink ? link : undefined}
225
+ href={link}
234
226
  id={id}
235
- role={!isLink ? "button" : undefined}
236
- tabIndex={!isLink ? 0 : undefined}
237
- target={isLink ? target : undefined}
227
+ target={target}
238
228
  >
239
229
  {imageUrl && (
240
230
  <div
241
231
  className="pb_nav_list_item_icon_section_collapsible"
242
232
  key={imageUrl}
243
233
  onClick={(e) => handleIconClick(e)}
244
- onKeyDown={!isLink ? handleKeyDown : undefined}
245
234
  >
246
235
  <Image className="pb_nav_img_wrapper"
247
236
  url={imageUrl}
@@ -276,13 +265,10 @@ const { filteredPadding, filteredMargin } = filterItemSpacing(itemSpacing);
276
265
  {...dataProps}
277
266
  {...htmlProps}
278
267
  className={classes}
279
- href={isLink ? link : undefined}
268
+ href={link}
280
269
  id={id}
281
270
  onClick={onClick}
282
- onKeyDown={!isLink ? handleKeyDown : undefined}
283
- role={!isLink ? "button" : undefined}
284
- tabIndex={!isLink ? 0 : undefined}
285
- target={isLink ? target : undefined}
271
+ target={target}
286
272
  >
287
273
  {imageUrl && (
288
274
  <div className="pb_nav_list_item_icon_section"
@@ -48,30 +48,3 @@
48
48
  &:hover { cursor: pointer; }
49
49
  }
50
50
  }
51
-
52
- .pb_nav_extended_underline {
53
- position: relative;
54
-
55
- // Add full-width border using pseudo-element so as not to break the active item border
56
- &::after {
57
- content: '';
58
- position: absolute;
59
- bottom: 0;
60
- left: 0;
61
- right: 0;
62
- height: 3px;
63
- background-color: $border_light;
64
- z-index: 1;
65
- }
66
-
67
- .pb_nav_list_kit_item_active.pb_nav_list_item_link {
68
- position: relative;
69
- z-index: 2;
70
- }
71
-
72
- &.dark {
73
- &::after {
74
- background-color: rgba($white, $opacity_3);
75
- }
76
- }
77
- }
@@ -117,19 +117,3 @@ test('should change variant', () => {
117
117
  const kit = screen.getByTestId(navTestId)
118
118
  expect(kit).toHaveClass('pb_nav_list_subtle_vertical_highlight')
119
119
  })
120
-
121
- test('extendedUnderline should work as expected', () => {
122
- render(
123
- <NavDefault extendedUnderline
124
- orientation="horizontal"
125
- />
126
- )
127
- const kit = screen.getByTestId(navTestId)
128
- expect(kit).toHaveClass('pb_nav_extended_underline')
129
- })
130
-
131
- test('extendedUnderline should not be applied when orientation is vertical', () => {
132
- render(<NavDefault extendedUnderline />)
133
- const kit = screen.getByTestId(navTestId)
134
- expect(kit).not.toHaveClass('pb_nav_extended_underline')
135
- })
@@ -14,7 +14,6 @@ type NavProps = {
14
14
  className?: string | string[],
15
15
  data?: Record<string, unknown>,
16
16
  dark?: boolean,
17
- extendedUnderline?: boolean,
18
17
  highlight?: boolean,
19
18
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
20
19
  id?: string,
@@ -34,7 +33,6 @@ const Nav = (props: NavProps): React.ReactElement => {
34
33
  className,
35
34
  data = {},
36
35
  dark = false,
37
- extendedUnderline = false,
38
36
  highlight = true,
39
37
  htmlOptions = {},
40
38
  id,
@@ -54,9 +52,6 @@ const Nav = (props: NavProps): React.ReactElement => {
54
52
  highlight: highlight,
55
53
  borderless: borderless,
56
54
  }),
57
- // extended underline is only applicable for horizontal normal nav, should not
58
- // affect other variants or orientations
59
- variant === 'normal' && orientation === 'horizontal' && extendedUnderline && 'pb_nav_extended_underline',
60
55
  globalProps(props),
61
56
  className
62
57
  )
@@ -17,7 +17,6 @@ examples:
17
17
  - horizontal_nav: Horizontal Nav
18
18
  - subtle_horizontal_nav: Subtle Horizontal Nav
19
19
  - bold_horizontal_nav: Bold Horizontal Nav
20
- - horizontal_nav_extendedunderline: Horizontal Nav With Extended Underline
21
20
  - block_nav: Block
22
21
  - block_no_title_nav: Without Title
23
22
  - new_tab: Open in a New Tab
@@ -43,7 +42,6 @@ examples:
43
42
  - horizontal_nav: Horizontal Nav
44
43
  - subtle_horizontal_nav: Subtle Horizontal Nav
45
44
  - bold_horizontal_nav: Bold Horizontal Nav
46
- - horizontal_nav_extendedunderline: Horizontal Nav With Extended Underline
47
45
  - block_nav: Block
48
46
  - block_no_title_nav: Without Title
49
47
  - new_tab: Open in a New Tab
@@ -19,5 +19,4 @@ export { default as CollapsibleNavWithAllOptions} from "./_collapsible_nav_with_
19
19
  export { default as NavWithFontControl } from "./_nav_with_font_control.jsx"
20
20
  export { default as NavWithSpacingControl } from "./_nav_with_spacing_control.jsx"
21
21
  export { default as CollapsibleNavItemSpacing } from "./_collapsible_nav_item_spacing.jsx"
22
- export { default as CollapsibleNavNoIcon } from "./_collapsible_nav_no_icon.jsx"
23
- export { default as HorizontalNavExtendedunderline } from './_horizontal_nav_extendedunderline.jsx'
22
+ export { default as CollapsibleNavNoIcon } from "./_collapsible_nav_no_icon.jsx"
@@ -3,9 +3,7 @@
3
3
  <%= pb_rails("collapsible/collapsible_main", props: { name: "default-collapsible-nav", icon: object.collapsible_icons, size: "xs", dark: object.dark, classname:object.margin_classes }) do %>
4
4
  <%= pb_content_tag( object.tag,
5
5
  href: object.link && object.link,
6
- target: object.link && object.target,
7
- onkeydown: !object.link ? "if(event.key==='Enter'||event.key===' '){event.preventDefault(); this.click();}" : nil,
8
- tabindex: object.link ? nil : 0,
6
+ target: object.link && object.target
9
7
  ) do %>
10
8
  <% if object.image_url %>
11
9
  <%= pb_rails("image", props: { url: object.image_url, classname: "pb_nav_img_wrapper_collapsible" }) %>
@@ -25,9 +23,7 @@
25
23
  <% else %>
26
24
  <%= pb_content_tag( object.tag,
27
25
  href: object.link && object.link,
28
- target: object.link && object.target,
29
- onkeydown: !object.link ? "if(event.key==='Enter'||event.key===' '){event.preventDefault(); this.click();}" : nil,
30
- tabindex: object.link ? nil : 0,
26
+ target: object.link && object.target
31
27
  ) do %>
32
28
  <% if object.image_url %>
33
29
  <%= pb_rails("image", props: { url: object.image_url, classname: "pb_nav_img_wrapper" }) %>
@@ -14,10 +14,9 @@ module Playbook
14
14
  prop :highlight, type: Playbook::Props::Boolean, default: true
15
15
  prop :borderless, type: Playbook::Props::Boolean, default: false
16
16
  prop :tabbing, type: Playbook::Props::Boolean, default: false
17
- prop :extended_underline, type: Playbook::Props::Boolean, default: false
18
17
 
19
18
  def classname
20
- generate_classname("pb_nav_list", variant, orientation, highlight_class, borderless_class) + extended_underline_class
19
+ generate_classname("pb_nav_list", variant, orientation, highlight_class, borderless_class)
21
20
  end
22
21
 
23
22
  def data
@@ -35,10 +34,6 @@ module Playbook
35
34
  def borderless_class
36
35
  borderless ? "borderless" : nil
37
36
  end
38
-
39
- def extended_underline_class
40
- variant === "normal" && orientation === "horizontal" && extended_underline ? " pb_nav_extended_underline" : ""
41
- end
42
37
  end
43
38
  end
44
39
  end
@@ -4,8 +4,8 @@
4
4
 
5
5
  <%= pb_rails("caption", props: { size: 'xs', text: "hello", id: "caption_breached" }) %>
6
6
 
7
- <script>
8
- window.addEventListener("load", () => {
7
+ <%= javascript_tag do %>
8
+ window.addEventListener("DOMContentLoaded", () => {
9
9
 
10
10
  // variables for the kits you are targeting
11
11
  const passphrase = document.querySelector(".passphrase_breached").querySelector("input")
@@ -142,4 +142,4 @@
142
142
  });
143
143
 
144
144
  })
145
- </script>
145
+ <% end %>
@@ -10,8 +10,8 @@
10
10
  <%= pb_rails("caption", props: { size: 'xs', text: "hello", id: "caption_common" }) %>
11
11
 
12
12
 
13
- <script>
14
- window.addEventListener("load", () => {
13
+ <%= javascript_tag do %>
14
+ window.addEventListener("DOMContentLoaded", () => {
15
15
 
16
16
  const commonText = document.querySelector("#body_common")
17
17
 
@@ -133,4 +133,4 @@
133
133
  });
134
134
 
135
135
  })
136
- </script>
136
+ <% end %>
@@ -4,8 +4,8 @@
4
4
 
5
5
  <div id="match"> </div>
6
6
 
7
- <script>
8
- window.addEventListener("load", () => {
7
+ <%= javascript_tag do %>
8
+ window.addEventListener("DOMContentLoaded", () => {
9
9
 
10
10
  const useState = (defaultValue) => {
11
11
  let value = defaultValue;
@@ -48,4 +48,4 @@
48
48
 
49
49
  }
50
50
  })
51
- </script>
51
+ <% end %>
@@ -32,8 +32,8 @@
32
32
 
33
33
 
34
34
 
35
- <script>
36
- window.addEventListener("load", () => {
35
+ <%= javascript_tag do %>
36
+ window.addEventListener("DOMContentLoaded", () => {
37
37
 
38
38
 
39
39
  // variables for the passphrase kits you are targeting
@@ -320,4 +320,4 @@
320
320
 
321
321
 
322
322
  })
323
- </script>
323
+ <% end %>
@@ -7,8 +7,8 @@
7
7
  <%= pb_rails("text_input", props: { label: "Passphrase Strength", value: "0", disabled: true, id: "calc_strength_change" }) %>
8
8
 
9
9
 
10
- <script>
11
- window.addEventListener("load", () => {
10
+ <%= javascript_tag do %>
11
+ window.addEventListener("DOMContentLoaded", () => {
12
12
 
13
13
  // variables for the kits you are targeting
14
14
  const passphrase = document.querySelector(".passphrase_change").querySelector("input")
@@ -120,4 +120,4 @@
120
120
  });
121
121
 
122
122
  })
123
- </script>
123
+ <% end %>
@@ -13,8 +13,8 @@
13
13
  <script>
14
14
  document.addEventListener('DOMContentLoaded', () => {
15
15
  function handleButtonClick() {
16
- const editorContainer = [...document.querySelectorAll('[data-pb-react-props]')]
17
- .find(element => element.getAttribute('data-pb-react-props')?.includes('"id":"content-preview-editor"'))
16
+ const editorContainer = [...document.querySelectorAll('[data-react-props]')]
17
+ .find(element => element.getAttribute('data-react-props')?.includes('"id":"content-preview-editor"'))
18
18
 
19
19
  const editorElement = editorContainer?.querySelector('trix-editor')
20
20
  const inputId = editorElement?.getAttribute('input')
@@ -53,13 +53,10 @@ $section_colors_dark: (
53
53
  .pb_section_separator_vertical {
54
54
  margin-left: $space_xs;
55
55
  margin-right: $space_xs;
56
- flex-direction: column;
57
56
  &::before {
58
- flex: 1;
59
- @include section_separator_vertical(false);
57
+ display: none;
60
58
  }
61
59
  &::after {
62
- flex: 1;
63
60
  @include section_separator_vertical(false);
64
61
  }
65
62
  }
@@ -90,7 +87,7 @@ $section_colors_dark: (
90
87
  background: none;
91
88
  }
92
89
  &.pb_section_separator_vertical {
93
- &::before, &::after {
90
+ &::after {
94
91
  border: 1px dashed $color_value;
95
92
  background: none;
96
93
  }
@@ -109,7 +106,7 @@ $section_colors_dark: (
109
106
  }
110
107
 
111
108
  &.pb_section_separator_vertical {
112
- &::before, &::after {
109
+ &::after {
113
110
  @include section_separator_vertical(true);
114
111
  }
115
112
  }
@@ -118,11 +115,6 @@ $section_colors_dark: (
118
115
  &::before, &::after {
119
116
  @include section_separator_dashed(true);
120
117
  }
121
- &.pb_section_separator_vertical {
122
- &::before, &::after {
123
- @include section_separator_dashed(true);
124
- }
125
- }
126
118
  }
127
119
  }
128
120
 
@@ -134,7 +126,7 @@ $section_colors_dark: (
134
126
  }
135
127
 
136
128
  &.pb_section_separator_vertical {
137
- &::before, &::after {
129
+ &::after {
138
130
  @include section_separator_vertical(false);
139
131
  background: $color_value;
140
132
  }
@@ -146,7 +138,7 @@ $section_colors_dark: (
146
138
  background: none;
147
139
  }
148
140
  &.pb_section_separator_vertical {
149
- &::before, &::after {
141
+ &::after {
150
142
  border: 1px dashed $color_value;
151
143
  background: none;
152
144
  }
@@ -11,27 +11,4 @@
11
11
  padding_right: "xs"
12
12
  }) %>
13
13
  <% end %>
14
- <% end %>
15
-
16
- <%= pb_rails("flex", props: { classname: "flex-container", margin_top: "lg", vertical: "stretch" }) do %>
17
- <%= pb_rails("body", props: { classname: "flex-item" }) do %>
18
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua
19
- <% end %>
20
- <%= pb_rails("section_separator", props: { orientation: "vertical" }) do %>
21
- <%= pb_rails("card", props: {
22
- border_radius: "rounded",
23
- justify_content: "center",
24
- padding: "none"
25
- }) do %>
26
- <%= pb_rails("caption", props: {
27
- text: "TODAY",
28
- size: "xs",
29
- padding_left: "xs",
30
- padding_right: "xs"
31
- }) %>
32
- <% end %>
33
- <% end %>
34
- <%= pb_rails("body", props: { classname: "flex-item" }) do %>
35
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua
36
- <% end %>
37
14
  <% end %>
@@ -2,25 +2,8 @@ import React from 'react'
2
2
  import Card from '../../pb_card/_card'
3
3
  import Caption from '../../pb_caption/_caption'
4
4
  import SectionSeparator from '../../pb_section_separator/_section_separator'
5
- import Flex from '../../pb_flex/_flex'
6
- import FlexItem from '../../pb_flex/_flex_item'
7
5
 
8
- const childrenHorizontal = (
9
- <Card
10
- borderRadius="rounded"
11
- justifyContent="center"
12
- padding="none"
13
- >
14
- <Caption
15
- paddingLeft="xs"
16
- paddingRight="xs"
17
- size="xs"
18
- text="TODAY"
19
- />
20
- </Card>
21
- )
22
-
23
- const childrenVertical = (
6
+ const children = (
24
7
  <Card
25
8
  borderRadius="rounded"
26
9
  justifyContent="center"
@@ -37,33 +20,12 @@ const childrenVertical = (
37
20
 
38
21
  const SectionSeparatorChildren = (props) => {
39
22
  return (
40
- <>
41
- <SectionSeparator
42
- {...props}
43
- lineStyle='dashed'
44
- >
45
- {childrenHorizontal}
46
- </SectionSeparator>
47
- <Flex
48
- inline="flex-container"
49
- marginTop="lg"
50
- vertical="stretch"
51
- >
52
- <FlexItem>
53
- {'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua'}
54
- </FlexItem>
55
- <SectionSeparator
56
- orientation="vertical"
57
- {...props}
58
- >
59
- {childrenVertical}
60
- </SectionSeparator>
61
- <FlexItem>
62
- {'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua'}
63
- </FlexItem>
64
- </Flex>
65
- </>
66
-
23
+ <SectionSeparator
24
+ {...props}
25
+ lineStyle='dashed'
26
+ >
27
+ {children}
28
+ </SectionSeparator>
67
29
  )
68
30
  }
69
31
 
@@ -7,10 +7,7 @@
7
7
  <% end %>
8
8
  <% end %>
9
9
  <% if object.orientation === 'vertical' %>
10
- <% if content %>
11
- <%= content %>
12
- <% elsif object.text %>
13
- <span><%= pb_rails("caption", props: { text: object.text }) %></span>
10
+ <%= pb_rails("flex", props: { orientation: "column"}) do %>
14
11
  <% end %>
15
12
  <%end%>
16
13
  <% end %>