playbook_ui 5.2.0.pre.alpha9 → 5.5.0.pre.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -0
  3. data/app/controllers/playbook/application_controller.rb +2 -0
  4. data/app/controllers/playbook/guides_controller.rb +11 -0
  5. data/app/controllers/playbook/pages_controller.rb +79 -0
  6. data/app/controllers/playbook/samples_controller.rb +40 -0
  7. data/app/pb_kits/playbook/_playbook.scss +1 -2
  8. data/app/pb_kits/playbook/data/menu.yml +2 -0
  9. data/app/pb_kits/playbook/index.js +0 -4
  10. data/app/pb_kits/playbook/packs/application.js +55 -0
  11. data/app/pb_kits/playbook/packs/examples.js +174 -0
  12. data/app/pb_kits/playbook/packs/main.scss +12 -0
  13. data/app/pb_kits/playbook/packs/samples.js +21 -0
  14. data/app/pb_kits/playbook/packs/site_styles/_samples.scss +72 -0
  15. data/app/pb_kits/playbook/packs/site_styles/_scaffold.scss +43 -0
  16. data/app/pb_kits/playbook/packs/site_styles/_site-style.scss +135 -0
  17. data/app/pb_kits/playbook/packs/site_styles/docs/_all.scss +10 -0
  18. data/app/pb_kits/playbook/packs/site_styles/docs/_bg_light_doc_example.scss +7 -0
  19. data/app/pb_kits/playbook/packs/site_styles/docs/_code_snippet.scss +531 -0
  20. data/app/pb_kits/playbook/packs/site_styles/docs/_color_utilities.scss +92 -0
  21. data/app/pb_kits/playbook/packs/site_styles/docs/_flex_examples.scss +15 -0
  22. data/app/pb_kits/playbook/packs/site_styles/docs/_kit_doc.scss +190 -0
  23. data/app/pb_kits/playbook/packs/site_styles/docs/_kits_examples.scss +18 -0
  24. data/app/pb_kits/playbook/packs/site_styles/docs/_markdown.scss +82 -0
  25. data/app/pb_kits/playbook/packs/site_styles/docs/_spacing_tokens.scss +72 -0
  26. data/app/pb_kits/playbook/pb_badge/_badge.html.erb +1 -0
  27. data/app/pb_kits/playbook/pb_badge/_badge.jsx +17 -4
  28. data/app/pb_kits/playbook/pb_body/_body.html.erb +1 -0
  29. data/app/pb_kits/playbook/pb_body/_body.jsx +33 -24
  30. data/app/pb_kits/playbook/pb_body/docs/_body_dark.html.erb +1 -1
  31. data/app/pb_kits/playbook/pb_body/docs/_body_dark.jsx +0 -2
  32. data/app/pb_kits/playbook/pb_body/docs/_body_light.html.erb +1 -0
  33. data/app/pb_kits/playbook/pb_body/docs/_body_light.jsx +3 -7
  34. data/app/pb_kits/playbook/pb_caption/_caption.scss +2 -2
  35. data/app/pb_kits/playbook/pb_card/_card.jsx +4 -1
  36. data/app/pb_kits/playbook/pb_card/_card.scss +4 -0
  37. data/app/pb_kits/playbook/pb_card/card.rb +8 -1
  38. data/app/pb_kits/playbook/pb_card/docs/_card_border_none.html.erb +7 -0
  39. data/app/pb_kits/playbook/pb_card/docs/_card_border_none.jsx +14 -0
  40. data/app/pb_kits/playbook/pb_card/docs/_card_border_none.md +1 -0
  41. data/app/pb_kits/playbook/pb_card/docs/example.yml +2 -0
  42. data/app/pb_kits/playbook/pb_card/docs/index.js +1 -0
  43. data/app/pb_kits/playbook/pb_checkbox/_checkbox.html.erb +2 -1
  44. data/app/pb_kits/playbook/pb_checkbox/_checkbox.jsx +18 -5
  45. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_checked.jsx +17 -0
  46. data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +1 -0
  47. data/app/pb_kits/playbook/pb_checkbox/docs/index.js +1 -0
  48. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.html.erb +1 -0
  49. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.jsx +17 -1
  50. data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.html.erb +3 -2
  51. data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.jsx +15 -12
  52. data/app/pb_kits/playbook/pb_filter/docs/_description.md +3 -0
  53. data/app/pb_kits/playbook/pb_filter/templates/_default.html.erb +1 -1
  54. data/app/pb_kits/playbook/pb_highlight/docs/_highlight_default.html.erb +1 -1
  55. data/app/pb_kits/playbook/pb_image/_image.jsx +1 -1
  56. data/app/pb_kits/playbook/pb_layout/_footer.html.erb +6 -0
  57. data/app/pb_kits/playbook/pb_layout/_header.html.erb +6 -0
  58. data/app/pb_kits/playbook/pb_layout/_layout.jsx +33 -1
  59. data/app/pb_kits/playbook/pb_layout/_layout.scss +64 -3
  60. data/app/pb_kits/playbook/pb_layout/docs/_layout_collection_detail.html.erb +19 -0
  61. data/app/pb_kits/playbook/pb_layout/docs/_layout_collection_detail.jsx +54 -0
  62. data/app/pb_kits/playbook/pb_layout/docs/_layout_collection_detail.md +1 -0
  63. data/app/pb_kits/playbook/pb_layout/docs/_layout_content.html.erb +28 -0
  64. data/app/pb_kits/playbook/pb_layout/docs/_layout_content.jsx +42 -0
  65. data/app/pb_kits/playbook/pb_layout/docs/example.yml +6 -0
  66. data/app/pb_kits/playbook/pb_layout/docs/index.js +3 -0
  67. data/app/pb_kits/playbook/pb_layout/footer.rb +19 -0
  68. data/app/pb_kits/playbook/pb_layout/header.rb +19 -0
  69. data/app/pb_kits/playbook/pb_layout/layout.rb +9 -4
  70. data/app/pb_kits/playbook/pb_legend/_legend.html.erb +1 -0
  71. data/app/pb_kits/playbook/pb_legend/_legend.jsx +25 -4
  72. data/app/pb_kits/playbook/pb_nav/_item.jsx +20 -10
  73. data/app/pb_kits/playbook/pb_nav/_vertical_nav.scss +3 -0
  74. data/app/pb_kits/playbook/pb_person_contact/_person_contact.jsx +6 -7
  75. data/app/pb_kits/playbook/pb_person_contact/docs/_person_contact_with_wrong_numbers.jsx +0 -1
  76. data/app/pb_kits/playbook/pb_popover/_popover.html.erb +2 -2
  77. data/app/pb_kits/playbook/pb_popover/_popover.jsx +6 -4
  78. data/app/pb_kits/playbook/pb_popover/_popover.scss +29 -21
  79. data/app/pb_kits/playbook/pb_popover/index.js +6 -1
  80. data/app/pb_kits/playbook/pb_popover/popover.rb +4 -0
  81. data/app/pb_kits/playbook/pb_radio/_radio.scss +4 -0
  82. data/app/pb_kits/playbook/pb_title/_title.jsx +7 -4
  83. data/app/pb_kits/playbook/pb_title/_title.scss +7 -0
  84. data/app/pb_kits/playbook/pb_title/_title_mixin.scss +2 -0
  85. data/app/pb_kits/playbook/pb_title/title.rb +4 -1
  86. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.html.erb +1 -1
  87. data/app/views/layouts/playbook/_mobile_hamburger.html.erb +2 -0
  88. data/app/views/layouts/playbook/_nav.html.erb +13 -0
  89. data/app/views/layouts/playbook/_sidebar.html.erb +52 -0
  90. data/app/views/layouts/playbook/application.html.slim +22 -0
  91. data/app/views/layouts/playbook/fullscreen.html.slim +10 -0
  92. data/app/views/layouts/playbook/grid.html.slim +10 -0
  93. data/app/views/layouts/playbook/samples.html.erb +19 -0
  94. data/app/views/playbook/guides/create_kit.html.slim +16 -0
  95. data/app/views/playbook/guides/create_kit/_file_naming.html.md +2 -0
  96. data/app/views/playbook/guides/create_kit/_generator.html.md +6 -0
  97. data/app/views/playbook/guides/create_kit/_kit_examples.html.md +2 -0
  98. data/app/views/playbook/guides/create_kit/_kit_rails.html.md +2 -0
  99. data/app/views/playbook/guides/create_kit/_kit_react.html.md +2 -0
  100. data/app/views/playbook/guides/create_kit/_layout.html.md +2 -0
  101. data/app/views/playbook/guides/create_kit/_view_objects.html.md +2 -0
  102. data/app/views/playbook/guides/create_kit/_writing_sass.md +10 -0
  103. data/app/views/playbook/guides/use_nitro.html.slim +6 -0
  104. data/app/views/playbook/guides/use_nitro/_local.html.md +2 -0
  105. data/app/views/playbook/guides/use_nitro/_nitro_components.html.md +2 -0
  106. data/app/views/playbook/guides/use_nitro/_versions.html.md +2 -0
  107. data/app/views/playbook/pages/fullscreen.html.slim +10 -0
  108. data/app/views/playbook/pages/grid.html.slim +2 -0
  109. data/app/views/playbook/pages/home.html.slim +4 -0
  110. data/app/views/playbook/pages/kit_category_show.html.erb +14 -0
  111. data/app/views/playbook/pages/kit_show.html.erb +33 -0
  112. data/app/views/playbook/pages/kits.html.erb +12 -0
  113. data/app/views/playbook/pages/principals/_getting_started.html.md +30 -0
  114. data/app/views/playbook/pages/principles.html.slim +3 -0
  115. data/app/views/playbook/pages/tokens.html.slim +15 -0
  116. data/app/views/playbook/pages/tokens/_pb_doc_spacing.html.slim +17 -0
  117. data/app/views/playbook/pages/utilities.html.slim +116 -0
  118. data/app/views/playbook/pages/utilities/_pb_doc_color.html.slim +15 -0
  119. data/app/views/playbook/samples/collection_detail/index.html.erb +169 -0
  120. data/app/views/playbook/samples/collection_detail/index.jsx +372 -0
  121. data/app/views/playbook/samples/dashboards/index.html.erb +81 -0
  122. data/app/views/playbook/samples/dashboards/index.jsx +130 -0
  123. data/app/views/playbook/samples/filter_table/index.html.erb +348 -0
  124. data/app/views/playbook/samples/filter_table/index.jsx +433 -0
  125. data/app/views/playbook/samples/registration/index.html.erb +316 -0
  126. data/app/views/playbook/samples/registration/index.jsx +476 -0
  127. data/app/views/playbook/samples/sample_show.html.erb +36 -0
  128. data/lib/generators/kit/kit_generator.rb +6 -3
  129. data/lib/generators/kit/templates/kit_html.erb.tt +3 -2
  130. data/lib/generators/kit/templates/kit_jsx.erb.tt +38 -10
  131. data/lib/playbook/engine.rb +0 -1
  132. data/lib/playbook/version.rb +1 -1
  133. data/lib/tasks/pb_release.rake +0 -3
  134. metadata +76 -4
  135. data/app/pb_kits/playbook/tokens/index.scss +0 -11
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Playbook
4
+ module PbLayout
5
+ class Header
6
+ include Playbook::Props
7
+
8
+ partial "pb_layout/header"
9
+
10
+ prop :tag, type: Playbook::Props::Enum,
11
+ values: %w[ul li span div],
12
+ default: "div"
13
+
14
+ def classname
15
+ generate_classname("layout_header")
16
+ end
17
+ end
18
+ end
19
+ end
@@ -19,12 +19,13 @@ module Playbook
19
19
  default: "md"
20
20
  prop :transparent, type: Playbook::Props::Boolean, default: false
21
21
  prop :variant, type: Playbook::Props::Enum,
22
- values: %w[light dark gradient],
23
- default: "light"
22
+ values: %w[light dark gradient],
23
+ default: "light"
24
24
  prop :layout, type: Playbook::Props::Enum,
25
- values: %w[sidebar collection kanban],
25
+ values: %w[sidebar collection collection_detail kanban content],
26
26
  default: "sidebar"
27
27
 
28
+
28
29
  prop :responsive, type: Playbook::Props::Boolean, default: false
29
30
 
30
31
  def classname
@@ -33,6 +34,10 @@ module Playbook
33
34
  generate_classname("pb_layout_kit", layout)
34
35
  when "kanban"
35
36
  generate_classname("pb_layout_kit", layout, responsive_class)
37
+ when "collection_detail"
38
+ generate_classname("pb_layout_kit", layout )
39
+ when "content"
40
+ generate_classname("pb_layout_kit", layout)
36
41
  else
37
42
  first_class = generate_classname("pb_layout_kit_sidebar","size_#{size}", position, variant, transparent_class)
38
43
  [first_class, full_class, collapse_class].reject(&:empty?).join(" ")
@@ -58,4 +63,4 @@ module Playbook
58
63
  end
59
64
  end
60
65
  end
61
- end
66
+ end
@@ -1,4 +1,5 @@
1
1
  <%= content_tag(:div, object.text,
2
+ aria: object.aria,
2
3
  id: object.id,
3
4
  data: object.data,
4
5
  class: object.classname) do %>
@@ -2,12 +2,14 @@
2
2
 
3
3
  import React from 'react'
4
4
  import classnames from 'classnames'
5
- import { buildCss } from '../utilities/props'
5
+ import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
6
6
  import { spacing } from '../utilities/spacing.js'
7
7
 
8
8
  import { Body, Title } from '../'
9
9
 
10
10
  type LegendProps = {
11
+ aria?: object,
12
+ className?: String,
11
13
  color?: | "data_1"
12
14
  | "data_2"
13
15
  | "data_3"
@@ -16,20 +18,39 @@ type LegendProps = {
16
18
  | "data_6"
17
19
  | "data_7",
18
20
  dark?: Boolean,
21
+ data?: object,
22
+ id?: String,
19
23
  prefixText?: String,
20
24
  text: String,
21
25
  }
22
26
 
23
27
  const Legend = (props: LegendProps) => {
24
- const { color = 'data_1', dark = false, prefixText, text } = props
28
+ const {
29
+ aria = {},
30
+ className,
31
+ color = 'data_1',
32
+ dark = false,
33
+ data = {},
34
+ id,
35
+ prefixText,
36
+ text,
37
+ } = props
38
+
39
+ const ariaProps = buildAriaProps(aria)
40
+ const dataProps = buildDataProps(data)
25
41
  const darkClass = dark ? 'dark' : 'light'
26
42
  const bodyCSS = classnames(
27
- buildCss('pb_legend_kit', color, darkClass),
43
+ buildCss('pb_legend_kit', color, darkClass), className,
28
44
  spacing(props)
29
45
  )
30
46
 
31
47
  return (
32
- <div className={bodyCSS}>
48
+ <div
49
+ {...ariaProps}
50
+ {...dataProps}
51
+ className={bodyCSS}
52
+ id={id}
53
+ >
33
54
  <Body color={dark ? 'lighter' : 'light'}>
34
55
  <span className="pb_legend_indicator_circle" />
35
56
  <If condition={prefixText}>
@@ -32,21 +32,31 @@ const NavItem = ({
32
32
  onClick={onClick}
33
33
  >
34
34
  <If condition={iconLeft}>
35
- <Icon
36
- className="pb_nav_list_item_icon_left"
37
- fixedWidth
38
- icon={iconLeft}
39
- />
35
+ <div
36
+ className="pb_nav_list_item_icon_section"
37
+ key={iconLeft}
38
+ >
39
+ <Icon
40
+ className="pb_nav_list_item_icon_left"
41
+ fixedWidth
42
+ icon={iconLeft}
43
+ />
44
+ </div>
40
45
  </If>
41
46
  <span className="pb_nav_list_item_text">
42
47
  {text || children}
43
48
  </span>
44
49
  <If condition={iconRight}>
45
- <Icon
46
- className="pb_nav_list_item_icon_right"
47
- fixedWidth
48
- icon={iconRight}
49
- />
50
+ <div
51
+ className="pb_nav_list_item_icon_section"
52
+ key={iconRight}
53
+ >
54
+ <Icon
55
+ className="pb_nav_list_item_icon_right"
56
+ fixedWidth
57
+ icon={iconRight}
58
+ />
59
+ </div>
50
60
  </If>
51
61
  </Tag>
52
62
  </li>
@@ -32,6 +32,7 @@ $selector: ".pb_nav_list";
32
32
  }
33
33
  [class*=_item_text] {
34
34
  color: $primary;
35
+ font-weight: $bold;
35
36
  }
36
37
  }
37
38
  }
@@ -90,6 +91,7 @@ $selector: ".pb_nav_list";
90
91
  text-decoration: none;
91
92
  display: flex;
92
93
  align-items: center;
94
+ border: none;
93
95
  padding: $space_xs ($space_sm - 2px);
94
96
  transition-property: color, background-color;
95
97
  transition-duration: 0.15s;
@@ -106,6 +108,7 @@ $selector: ".pb_nav_list";
106
108
  }
107
109
  [class*=_text] {
108
110
  flex: 1;
111
+ font-weight: $regular;
109
112
  }
110
113
  &:hover {
111
114
  background-color: rgba($primary, 0.03);
@@ -73,23 +73,22 @@ const PersonContact = (props: PersonContactProps) => {
73
73
  contactDetail={contactObject.contactDetail}
74
74
  contactType={contactObject.contactType}
75
75
  contactValue={contactObject.contactValue}
76
- key={`valid-contact-${index}`}
76
+ key={index}
77
77
  />
78
- ))}
78
+ ))}
79
79
  {wrongContacts().map((contactObject, index) => (
80
- <div key={`wrong-contact-caption-wrapper-${index}`}>
80
+ <>
81
81
  <Caption
82
82
  className="wrong_numbers"
83
- key={`wrong-contact-caption-${index}`}
84
83
  text="wrong number"
85
84
  />
86
85
  <Contact
87
86
  contactType={contactObject.contactType}
88
87
  contactValue={contactObject.contactValue}
89
- key={`wrong-contact-${index}`}
88
+ key={index}
90
89
  />
91
- </div>
92
- ))}
90
+ </>
91
+ ))}
93
92
  </div>
94
93
  )
95
94
  }
@@ -5,7 +5,6 @@ const PersonContactWithWrongNumbers = () => {
5
5
  return (
6
6
  <>
7
7
  <PersonContact
8
- key="person-contact-1"
9
8
  contacts={[
10
9
  {
11
10
  contactType: 'email',
@@ -2,8 +2,8 @@
2
2
  id: object.id,
3
3
  data: object.data,
4
4
  class: object.classname) do %>
5
- <div class="popover_tooltip" id="<%= object.tooltip_id %>" role="tooltip" style="<%= object.z_index_helper %>">
6
- <div class="popover_body <%= object.popover_spacing_helper %>" style="<%= object.width_height_helper %>">
5
+ <div class="pb_popover_tooltip" id="<%= object.tooltip_id %>" role="tooltip" style="<%= object.z_index_helper %>">
6
+ <div class="pb_popover_body <%= object.width_height_class_helper %> <%= object.popover_spacing_helper %>" style="<%= object.width_height_helper %>">
7
7
  <%= capture(&object.children) %>
8
8
  </div>
9
9
  </div>
@@ -59,6 +59,7 @@ const Popover = (props: PbPopoverProps) => {
59
59
  } = props
60
60
 
61
61
  const popoverSpacing = spacing(props) ? spacing(props) : 'p_sm'
62
+ const overflowHandling = maxHeight || maxWidth ? 'overflow_handling' : ''
62
63
  const zIndexStyle = zIndex ? { zIndex: zIndex } : {}
63
64
  const widthHeightStyles = () => {
64
65
  return Object.assign(
@@ -90,13 +91,14 @@ const Popover = (props: PbPopoverProps) => {
90
91
  >
91
92
  <div
92
93
  className={classnames(
93
- `${buildCss('popover_tooltip')} show`
94
+ `${buildCss('pb_popover_tooltip')} show`
94
95
  )}
95
96
  >
96
97
  <div
97
98
  className={classnames(
98
- 'popover_body',
99
- popoverSpacing
99
+ 'pb_popover_body',
100
+ popoverSpacing,
101
+ overflowHandling
100
102
  )}
101
103
  style={widthHeightStyles()}
102
104
  >
@@ -128,7 +130,7 @@ export default class PbReactPopover extends React.Component {
128
130
 
129
131
  document.body.addEventListener('click', ({ target }) => {
130
132
  const targetIsPopover =
131
- target.closest('[class^=popover_tooltip]') !== null
133
+ target.closest('[class^=pb_popover_tooltip]') !== null
132
134
  const targetIsReference =
133
135
  target.closest('.pb_popover_reference_wrapper') !== null
134
136
 
@@ -19,34 +19,42 @@
19
19
  to {
20
20
  opacity: 0;
21
21
  }
22
+ .pb_popover_body {
23
+ @include pb_card;
24
+ border: 0;
25
+ box-shadow: $shadow_deeper;
26
+ }
27
+ .overflow_handling {
28
+ overflow: auto;
29
+ }
22
30
  }
23
31
 
24
- [class^="pb_popover_kit"] {
25
- .popover_tooltip {
26
- opacity: 0;
27
- animation-name: fadeOut;
32
+ .pb_popover_tooltip {
33
+ opacity: 0;
34
+ animation-name: fadeOut;
35
+ animation-duration: 150ms;
36
+ animation-timing-function: linear;
37
+ animation-fill-mode: forwards;
38
+ visibility: hidden;
39
+ pointer-events: none;
40
+ &.show {
41
+ animation-name: fadeIn;
28
42
  animation-duration: 150ms;
29
43
  animation-timing-function: linear;
30
44
  animation-fill-mode: forwards;
31
- visibility: hidden;
32
- pointer-events: none;
33
- &.show {
34
- animation-name: fadeIn;
35
- animation-duration: 150ms;
36
- animation-timing-function: linear;
37
- animation-fill-mode: forwards;
38
- visibility: visible;
39
- pointer-events: initial;
40
- z-index: $z_9;
41
- }
42
- }
43
- .popover_body {
44
- @include pb_card;
45
- border: 0;
46
- box-shadow: $shadow_deeper;
47
- overflow: auto;
45
+ visibility: visible;
46
+ pointer-events: initial;
47
+ z-index: $z_9;
48
48
  }
49
49
  }
50
+ .pb_popover_body {
51
+ @include pb_card;
52
+ border: 0;
53
+ box-shadow: $shadow_deeper;
54
+ }
55
+ .overflow_handling {
56
+ overflow: auto;
57
+ }
50
58
 
51
59
 
52
60
  .pb_popover_reference_wrapper {
@@ -8,7 +8,12 @@ export default class PbPopover extends PbEnhancedElement {
8
8
  return '[data-pb-popover-kit]'
9
9
  }
10
10
 
11
+ moveTooltip() {
12
+ document.querySelector('body').appendChild(this.tooltip)
13
+ }
14
+
11
15
  connect() {
16
+ this.moveTooltip()
12
17
  this.popper = createPopper(this.triggerElement, this.tooltip, {
13
18
  placement: this.position,
14
19
  strategy: 'fixed',
@@ -31,7 +36,7 @@ export default class PbPopover extends PbEnhancedElement {
31
36
  }
32
37
 
33
38
  setTimeout(() => {
34
- // this.popper.scheduleUpdate()
39
+ this.popper.update()
35
40
  this.tooltip.classList.toggle('show')
36
41
  }, 0)
37
42
  })
@@ -42,6 +42,10 @@ module Playbook
42
42
  out
43
43
  end
44
44
 
45
+ def width_height_class_helper
46
+ "overflow_handling" if max_height || max_width
47
+ end
48
+
45
49
  def data
46
50
  Hash(values[:data]).merge(
47
51
  pb_popover_kit: true,
@@ -8,6 +8,7 @@
8
8
 
9
9
  .pb_radio_button {
10
10
  width: 22px;
11
+ min-width: 22px;
11
12
  height: 22px;
12
13
  border-radius: 1000px;
13
14
  border: 2px solid $border_light;
@@ -29,6 +30,9 @@
29
30
  }
30
31
  }
31
32
  &[class*=_dark] {
33
+ .pb_radio_button {
34
+ border-color: $border_dark;
35
+ }
32
36
  input:checked ~ .pb_radio_button {
33
37
  border: 6px solid $primary;
34
38
  }
@@ -7,14 +7,15 @@ import { spacing } from '../utilities/spacing.js'
7
7
 
8
8
  type TitleProps = {
9
9
  aria?: object,
10
- className?: String,
11
10
  children?: Array<React.ReactNode> | React.ReactNode,
11
+ className?: String,
12
12
  dark?: Boolean,
13
13
  data?: object,
14
14
  id?: String,
15
15
  size?: 1 | 2 | 3 | 4,
16
16
  tag?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div",
17
17
  text?: String,
18
+ variant?: null | "primary",
18
19
  }
19
20
 
20
21
  const Title = (props: TitleProps) => {
@@ -27,12 +28,14 @@ const Title = (props: TitleProps) => {
27
28
  id,
28
29
  size = 3,
29
30
  tag = 'h3',
30
- text } = props
31
+ text,
32
+ variant = null,
33
+ } = props
31
34
 
32
- const themeStyle = dark === true ? '_dark' : ''
35
+ const themeStyle = dark === true ? 'dark' : ''
33
36
  const ariaProps = buildAriaProps(aria)
34
37
  const dataProps = buildDataProps(data)
35
- const classes = classnames(buildCss('pb_title_kit', size, themeStyle), className, spacing(props))
38
+ const classes = classnames(buildCss('pb_title_kit', size, themeStyle, variant), className, spacing(props))
36
39
  const Tag = `${tag}`
37
40
 
38
41
  return (
@@ -1,4 +1,5 @@
1
1
  @import "title_mixin";
2
+ @import "../tokens/colors";
2
3
 
3
4
  [class^=pb_title_kit]{
4
5
  &[class*=_1] {
@@ -20,4 +21,10 @@
20
21
  &[class*=_dark] {
21
22
  @include pb_title_dark;
22
23
  }
24
+
25
+ @each $color_name, $color_value in $status_colors {
26
+ &[class*=_#{$color_name}] {
27
+ color: map-get($status_color_text, $color_name);
28
+ }
29
+ }
23
30
  }
@@ -36,3 +36,5 @@
36
36
  @mixin pb_title_dark {
37
37
  color: $text_dk_default;
38
38
  }
39
+
40
+