playbook_ui 14.3.2.pre.alpha.pbntr523enablekitsforradiofix3809 → 14.3.2.pre.alpha.play1472newicons3773

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/Components/SortIconButton.tsx +23 -4
  3. data/app/pb_kits/playbook/pb_contact/_contact.tsx +17 -5
  4. data/app/pb_kits/playbook/pb_contact/contact.html.erb +14 -6
  5. data/app/pb_kits/playbook/pb_contact/contact.rb +4 -0
  6. data/app/pb_kits/playbook/pb_contact/contact.test.js +1 -1
  7. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +4 -3
  8. data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +1 -1
  9. data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +4 -0
  10. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +6 -3
  11. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.html.erb +1 -1
  12. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_flatpickr_styles.scss +3 -2
  13. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_header_styles.scss +6 -2
  14. data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +23 -245
  15. data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +1 -1
  16. data/app/pb_kits/playbook/pb_form_pill/docs/example.yml +0 -2
  17. data/app/pb_kits/playbook/pb_form_pill/docs/index.js +0 -1
  18. data/app/pb_kits/playbook/pb_form_pill/form_pill.rb +1 -1
  19. data/app/pb_kits/playbook/pb_map/_map_controls.tsx +7 -1
  20. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +1 -5
  21. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +0 -2
  22. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +0 -1
  23. data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.rb +0 -4
  24. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.scss +21 -97
  25. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.test.js +0 -166
  26. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +6 -45
  27. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/example.yml +0 -2
  28. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/index.js +0 -1
  29. data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.html.erb +2 -6
  30. data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.rb +1 -21
  31. data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +10 -2
  32. data/app/pb_kits/playbook/pb_radio/_radio.tsx +33 -92
  33. data/app/pb_kits/playbook/pb_radio/docs/example.yml +0 -2
  34. data/app/pb_kits/playbook/pb_radio/docs/index.js +0 -1
  35. data/app/pb_kits/playbook/pb_radio/radio.html.erb +13 -35
  36. data/app/pb_kits/playbook/pb_radio/radio.rb +1 -3
  37. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarDropdown.tsx +12 -5
  38. data/app/pb_kits/playbook/pb_select/_select.tsx +5 -2
  39. data/app/pb_kits/playbook/pb_select/select.html.erb +1 -1
  40. data/app/pb_kits/playbook/pb_select/select.rb +4 -0
  41. data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +0 -16
  42. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +0 -4
  43. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +18 -26
  44. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -2
  45. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +0 -1
  46. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +0 -4
  47. data/app/pb_kits/playbook/tokens/_colors.scss +0 -2
  48. data/app/pb_kits/playbook/utilities/icons/allicons.tsx +123 -0
  49. data/app/pb_kits/playbook/utilities/icons/angle-down.svg +3 -0
  50. data/app/pb_kits/playbook/utilities/icons/envelope.svg +3 -0
  51. data/dist/chunks/_typeahead-C7opsM-6.js +22 -0
  52. data/dist/chunks/_weekday_stacked-Bhq2bj8p.js +45 -0
  53. data/dist/chunks/lib-ACUFk6Hu.js +29 -0
  54. data/dist/chunks/{pb_form_validation-zV9OpdSt.js → pb_form_validation-CA0nEXlG.js} +1 -1
  55. data/dist/chunks/vendor.js +1 -1
  56. data/dist/playbook-doc.js +1 -1
  57. data/dist/playbook-rails-react-bindings.js +1 -1
  58. data/dist/playbook-rails.js +1 -1
  59. data/dist/playbook.css +1 -1
  60. data/lib/playbook/version.rb +1 -1
  61. metadata +8 -23
  62. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_colors.html.erb +0 -117
  63. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_colors.jsx +0 -227
  64. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_colors.md +0 -1
  65. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color.html.erb +0 -72
  66. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color.jsx +0 -91
  67. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color_rails.md +0 -1
  68. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color_react.md +0 -1
  69. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_bubble.html.erb +0 -73
  70. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_bubble.jsx +0 -86
  71. data/app/pb_kits/playbook/pb_radio/docs/_radio_custom_children.html.erb +0 -48
  72. data/app/pb_kits/playbook/pb_radio/docs/_radio_custom_children.jsx +0 -59
  73. data/app/pb_kits/playbook/pb_radio/docs/_radio_custom_children.md +0 -1
  74. data/app/pb_kits/playbook/pb_radio/index.js +0 -17
  75. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color.html.erb +0 -31
  76. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color.jsx +0 -26
  77. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color_rails.md +0 -1
  78. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color_react.md +0 -1
  79. data/dist/chunks/_typeahead-468tQVei.js +0 -22
  80. data/dist/chunks/_weekday_stacked-CODev76A.js +0 -45
  81. data/dist/chunks/lib-D2U4I1U6.js +0 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 053356ea9f4bf69e1703a14d0d96123f811efa5f5f416408c8d01aca834da920
4
- data.tar.gz: faed3bbad051fb0aff9b57caa8d44441f9bd4d7aa58d063f8e6702cae2619d3c
3
+ metadata.gz: 70d2f1e5fb2d0f8307d13237e623c35d33a265a63224948efc82eed8d6364884
4
+ data.tar.gz: 5069ab02e8b2f8a3b47cf3ae6de5129ef346cf78fcd9cde8471ed73db173945f
5
5
  SHA512:
6
- metadata.gz: 5064a8ff20bf2e88081a35677b4c55389836736db68d5a35e44b165de56824a099d02108222abaf33714b94f769e9ea4cecdda78053983fd3524b08943b17bf3
7
- data.tar.gz: 1b1e694bef55de53662d91dbd687d9e276761f7cc81dd164b67d9948ba571f7a0a2bfe34545cc684bfc3093b831f7f591ae0073183faa14ea830f20a79d67b6c
6
+ metadata.gz: a730f62851ae33e7875ac2a4c6ba6a6961f42a1c52f41f2cd11d7fada31d99761a9262961d016fa74a9dc743ec6cf163a0b01a22597cb4548a59c6ca3ccc5b99
7
+ data.tar.gz: 8323c2c34dcd72ec906d8bbac6b2c167c131d854592a8c2107b5a2f8e5ac9f7cba33e40dedb86b8a29a39d7f50654f851490efaeccbef2c7f0b1eaa78ec603a3
@@ -4,6 +4,7 @@ import { Header } from "@tanstack/react-table"
4
4
  import { GenericObject } from "../../types"
5
5
 
6
6
  import Icon from "../../pb_icon/_icon"
7
+ import { getAllIcons } from "../../utilities/icons/allicons"
7
8
 
8
9
  import { displayIcon } from "../Utilities/IconHelpers"
9
10
 
@@ -11,21 +12,39 @@ type SortIconButtonProps = {
11
12
  header: Header<GenericObject, unknown>
12
13
  sortIcon?: string | string[]
13
14
  }
15
+
14
16
  export const SortIconButton = ({ header, sortIcon }: SortIconButtonProps) => {
15
17
 
18
+ const firstIcon = displayIcon(sortIcon)[0]
19
+ const secondIcon = displayIcon(sortIcon)[1]
20
+ const upIcon = getAllIcons()["arrowUpShortWide"].icon as unknown as { [key: string]: SVGElement }
21
+ const downIcon = getAllIcons()["arrowDownShortWide"].icon as unknown as { [key: string]: SVGElement }
22
+
16
23
  return (
17
24
  <>
18
25
  {header.column.getIsSorted() === "desc" ? (
19
26
  <div className="sort-button-icon"
20
- key={displayIcon(sortIcon)[0]}
27
+ key={firstIcon}
21
28
  >
22
- <Icon icon={displayIcon(sortIcon)[0]} />
29
+ { firstIcon === "arrow-up-short-wide" ? (
30
+ <Icon
31
+ className="svg-inline--fa"
32
+ customIcon={upIcon}
33
+ /> ) : (
34
+ <Icon icon={firstIcon} />
35
+ )}
23
36
  </div>
24
37
  ) : (
25
38
  <div className="sort-button-icon"
26
- key={displayIcon(sortIcon)[1]}
39
+ key={secondIcon}
27
40
  >
28
- <Icon icon={displayIcon(sortIcon)[1]} />
41
+ { secondIcon === "arrow-down-short-wide" ? (
42
+ <Icon
43
+ className="svg-inline--fa"
44
+ customIcon={downIcon}
45
+ /> ) : (
46
+ <Icon icon={secondIcon} />
47
+ )}
29
48
  </div>
30
49
  )}
31
50
  </>
@@ -7,6 +7,7 @@ import { globalProps } from '../utilities/globalProps'
7
7
  import Body from '../pb_body/_body'
8
8
  import Caption from '../pb_caption/_caption'
9
9
  import Icon from '../pb_icon/_icon'
10
+ import { getAllIcons } from "../utilities/icons/allicons"
10
11
 
11
12
  const contactTypeMap: { [key: string]: string } = {
12
13
  'cell': 'mobile',
@@ -18,6 +19,8 @@ const contactTypeMap: { [key: string]: string } = {
18
19
  'wrong-phone': 'phone-slash',
19
20
  }
20
21
 
22
+ const envelopeIcon = getAllIcons()["envelope"].icon as unknown as { [key: string]: SVGElement }
23
+
21
24
  const formatContact = (contactString: string, contactType: string) => {
22
25
  if (contactType === 'email') return contactString
23
26
 
@@ -91,11 +94,20 @@ const Contact = (props: ContactProps): React.ReactElement => {
91
94
  dark={dark}
92
95
  tag="span"
93
96
  >
94
- <Icon
95
- dark={dark}
96
- fixedWidth
97
- icon={contactTypeMap[contactType] || 'phone'}
98
- />
97
+ {contactType === 'email' ? (
98
+ <Icon
99
+ className="svg-inline--fa envelope"
100
+ customIcon={envelopeIcon}
101
+ dark={dark}
102
+ fixedWidth
103
+ />
104
+ ) : (
105
+ <Icon
106
+ dark={dark}
107
+ fixedWidth
108
+ icon={contactTypeMap[contactType] || 'phone'}
109
+ />
110
+ )}
99
111
  {` ${formatContact(contactValue, contactType)} `}
100
112
  {contactDetail && (
101
113
  <Caption
@@ -4,12 +4,20 @@
4
4
  classname: "pb_contact_kit",
5
5
  color: "light",
6
6
  dark: object.dark
7
- }) do %>
8
- <%= pb_rails("icon", props: {
9
- icon: object.contact_icon,
10
- fixed_width: true,
11
- dark: object.dark
12
- }) %>
7
+ }) do %>
8
+ <% if contact_type == "email" %>
9
+ <%= pb_rails("icon", props: {
10
+ custom_icon: Playbook::Engine::root.join(envelope_path),
11
+ fixed_width: true,
12
+ dark: object.dark
13
+ }) %>
14
+ <% else %>
15
+ <%= pb_rails("icon", props: {
16
+ icon: object.contact_icon,
17
+ fixed_width: true,
18
+ dark: object.dark
19
+ }) %>
20
+ <% end %>
13
21
  <%= object.formatted_contact_value if object.contact_value %>
14
22
 
15
23
  <%= pb_rails("caption", props: {
@@ -44,6 +44,10 @@ module Playbook
44
44
  end
45
45
  end
46
46
 
47
+ def envelope_path
48
+ "app/pb_kits/playbook/utilities/icons/envelope.svg"
49
+ end
50
+
47
51
  private
48
52
 
49
53
  def formatted_value
@@ -79,7 +79,7 @@ test('returns correct icon', () => {
79
79
  expect(screen.getByTestId('test-home').querySelector('.pb_icon_kit')).toHaveClass('fa-phone')
80
80
  expect(screen.getByTestId('test-work').querySelector('.pb_icon_kit')).toHaveClass('fa-phone-office')
81
81
  expect(screen.getByTestId('test-work-cell').querySelector('.pb_icon_kit')).toHaveClass('fa-phone-laptop')
82
- expect(screen.getByTestId('test-email').querySelector('.pb_icon_kit')).toHaveClass('fa-envelope')
82
+ expect(screen.getByTestId('test-email').querySelector('.pb_custom_icon')).toHaveClass('envelope')
83
83
  expect(screen.getByTestId('test-wrong-phone').querySelector('.pb_icon_kit')).toHaveClass('fa-phone-slash')
84
84
  expect(screen.getByTestId('test-wrong-type').querySelector('.pb_icon_kit')).toHaveClass('fa-phone')
85
85
  expect(screen.getByTestId('test-extension').querySelector('.pb_icon_kit')).toHaveClass('fa-phone-plus')
@@ -3,6 +3,7 @@ import classnames from 'classnames'
3
3
 
4
4
  import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
5
5
  import { deprecatedProps, globalProps, GlobalProps } from '../utilities/globalProps'
6
+ import { getAllIcons } from "../utilities/icons/allicons"
6
7
 
7
8
  import datePickerHelper from './date_picker_helper'
8
9
  import Icon from '../pb_icon/_icon'
@@ -161,7 +162,7 @@ useEffect(() => {
161
162
  }
162
163
  return base
163
164
  }
164
-
165
+ const angleDown = getAllIcons()["angleDown"].icon as unknown as { [key: string]: SVGElement }
165
166
 
166
167
  return (
167
168
  <div
@@ -231,8 +232,8 @@ useEffect(() => {
231
232
  id={`${pickerId}-angle-down`}
232
233
  >
233
234
  <Icon
234
- className="angle_down_icon"
235
- icon="angle-down"
235
+ className="angle_down_icon svg-inline--fa"
236
+ customIcon={angleDown}
236
237
  />
237
238
  </div>
238
239
  </div>
@@ -61,7 +61,7 @@
61
61
  >
62
62
  <%= pb_rails("icon", props: {
63
63
  classname: "angle_down_icon",
64
- icon: "angle-down"
64
+ custom_icon: Playbook::Engine::root.join(angle_down_path)
65
65
  }) %>
66
66
  </div>
67
67
  <% end %>
@@ -118,6 +118,10 @@ module Playbook
118
118
  class_string += error_class
119
119
  class_string
120
120
  end
121
+
122
+ def angle_down_path
123
+ "app/pb_kits/playbook/utilities/icons/angle-down.svg"
124
+ end
121
125
  end
122
126
  end
123
127
  end
@@ -5,6 +5,9 @@ import monthSelectPlugin from 'flatpickr/dist/plugins/monthSelect'
5
5
  import weekSelect from "flatpickr/dist/plugins/weekSelect/weekSelect"
6
6
  import timeSelectPlugin from './plugins/timeSelect'
7
7
  import quickPickPlugin from './plugins/quickPick'
8
+ import { getAllIcons } from '../utilities/icons/allicons';
9
+
10
+ const angleDown = getAllIcons().angleDown.string
8
11
 
9
12
  const getPositionElement = (element: string | Element) => {
10
13
  return (typeof element === 'string') ? document.querySelectorAll(element)[0] : element
@@ -256,10 +259,10 @@ const datePickerHelper = (config: DatePickerConfig, scrollContainer: string | HT
256
259
  })
257
260
  }
258
261
 
259
- // Adding dropdown icons to year and month selects
260
- dropdown.insertAdjacentHTML('afterend', '<i class="far fa-angle-down year-dropdown-icon" id="test-id"></i>')
262
+ // Adding dropdown icons to year and month select
263
+ dropdown.insertAdjacentHTML('afterend', `<i class="year-dropdown-icon">${angleDown}</i>`)
261
264
  if (picker.monthElements[0].parentElement) {
262
- return picker.monthElements[0].insertAdjacentHTML('afterend', '<i class="far fa-angle-down month-dropdown-icon"></i>')}
265
+ return picker.monthElements[0].insertAdjacentHTML('afterend', `<i class="month-dropdown-icon">${angleDown}</i>`)}
263
266
  // if (picker.weekElements[0].parentElement){
264
267
  // return picker.weekElements[0].insertAdjacentHTML('afterend', '<i class="far fa-angle-down year-dropdown-icon" id="test-id"></i>')
265
268
  // }
@@ -14,4 +14,4 @@
14
14
  }
15
15
  fpInline.config.onChange.push(showAngleDownHandler)
16
16
  })
17
- <% end %>
17
+ <% end %>
@@ -322,7 +322,8 @@
322
322
  background: rgba(0,0,0,0.05);
323
323
  }
324
324
  .flatpickr-current-month .numInputWrapper {
325
- width: 7ch;
325
+ width: 6ch;
326
+ width: 7ch\0;
326
327
  display: inline-block;
327
328
  }
328
329
  .flatpickr-current-month .numInputWrapper span.arrowUp:after {
@@ -773,4 +774,4 @@ span.flatpickr-weekday {
773
774
  -webkit-transform: translate3d(0, 0, 0);
774
775
  transform: translate3d(0, 0, 0);
775
776
  }
776
- }
777
+ }
@@ -76,7 +76,11 @@
76
76
  pointer-events: none;
77
77
  color: $text_lt_light;
78
78
  }
79
-
79
+ .year-dropdown-icon svg, .month-dropdown-icon svg {
80
+ width: 16px;
81
+ margin-top: 6px;
82
+ margin-left: -2px;
83
+ }
80
84
  // Left - Right Arrow Styling
81
85
  .flatpickr-prev-month {
82
86
  display: flex;
@@ -113,4 +117,4 @@
113
117
  }
114
118
  }
115
119
  }
116
- }
120
+ }
@@ -7,7 +7,10 @@
7
7
 
8
8
  $selector: ".pb_form_pill";
9
9
  $pb_form_pill_height: 27px;
10
- $form_pill_colors: map-merge($status_color_text, map-merge($data_colors, $product_colors));
10
+ $form_pill_colors: (
11
+ primary: map-get($status_color_text, "primary"),
12
+ neutral: map-get($status_color_text, "neutral"),
13
+ );
11
14
 
12
15
 
13
16
  [class^=pb_form_pill_kit] {
@@ -33,18 +36,6 @@ $form_pill_colors: map-merge($status_color_text, map-merge($data_colors, $produc
33
36
  color: $text_lt_default;
34
37
  }
35
38
  }
36
- @if ($color_name == "warning") {
37
- background-color: mix($yellow, $card_light, 10%);
38
- .pb_form_pill_icon {
39
- color: $yellow;
40
- }
41
- }
42
- @if ($color_name == "accessories") {
43
- background-color: mix($product_8_background, $card_light, 10%);
44
- .pb_form_pill_icon {
45
- color: $product_8_background;
46
- }
47
- }
48
39
  transition: background-color 0.2s ease;
49
40
  box-shadow: none;
50
41
  @media (hover:hover) {
@@ -54,24 +45,12 @@ $form_pill_colors: map-merge($status_color_text, map-merge($data_colors, $produc
54
45
  background-color: mix($neutral, $card_light, 20%);
55
46
  border: 1px solid $border_light;
56
47
  }
57
- @if ($color_name == "warning") {
58
- background-color: mix($yellow, $card_light, 20%);
59
- }
60
- @if ($color_name == "accessories") {
61
- background-color: mix($product_8_background, $card_light, 20%);
62
- }
63
48
  }
64
49
  &:active {
65
50
  background-color: mix($color_value, $card_light, 30%);
66
51
  @if ($color_name == "neutral") {
67
52
  background-color: mix($neutral, $card_light, 30%);
68
53
  }
69
- @if ($color_name == "warning") {
70
- background-color: mix($yellow, $card_light, 30%);
71
- }
72
- @if ($color_name == "accessories") {
73
- background-color: mix($product_8_background, $card_light, 30%);
74
- }
75
54
  }
76
55
  }
77
56
  #{$selector}_text {
@@ -79,9 +58,6 @@ $form_pill_colors: map-merge($status_color_text, map-merge($data_colors, $produc
79
58
  @if ($color_name == "neutral") {
80
59
  color: $text_lt_default;
81
60
  }
82
- @if ($color_name == "warning") {
83
- color: $yellow;
84
- }
85
61
  padding: 0 $space-xs;
86
62
  }
87
63
  #{$selector}_close {
@@ -100,23 +76,6 @@ $form_pill_colors: map-merge($status_color_text, map-merge($data_colors, $produc
100
76
  background-color: mix($neutral, $card_light, 60%);
101
77
  }
102
78
  }
103
- @if ($color_name == "warning") {
104
- color: $yellow;
105
- }
106
- &:hover {
107
- background-color: mix($color_value, $card_light, 40%);
108
- @if ($color_name == "warning") {
109
- background-color: mix($yellow, $card_light, 40%);
110
- }
111
- }
112
- @if ($color_name == "accessories") {
113
- color: $product_8_background;
114
- }
115
- &:hover {
116
- @if ($color_name == "accessories") {
117
- background-color: mix($product_8_background, $card_light, 40%);
118
- }
119
- }
120
79
  }
121
80
  #{$selector}_tag {
122
81
  color: $color_value;
@@ -124,9 +83,6 @@ $form_pill_colors: map-merge($status_color_text, map-merge($data_colors, $produc
124
83
  @if ($color_name == "neutral") {
125
84
  color: $text_lt_default;
126
85
  }
127
- @if ($color_name == "warning") {
128
- color: $yellow;
129
- }
130
86
  }
131
87
  }
132
88
  }
@@ -176,23 +132,25 @@ $form_pill_colors: map-merge($status_color_text, map-merge($data_colors, $produc
176
132
  }
177
133
  &.dark {
178
134
  @each $color_name, $color_value in $form_pill_colors {
135
+ // In dark mode, the base patterns below are needed for the next tickets for success, warning, error, info.
136
+ // Primary and Neutral are exceptions to the general rule in the handoff
179
137
  &[class*=_#{$color_name}] {
180
- background-color: mix($color_value, $card_dark, 10%);
181
- .pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
182
- color: $color_name;
183
- }
184
- .pb_form_pill_close {
185
- color: $color_name;
186
- &:hover {
187
- background-color: mix($color_value, $card_dark, 40%);
188
- }
189
- }
190
- &:hover {
191
- background-color: mix($color_value, $card_dark, 20%);
192
- }
193
- &:active {
194
- background-color: mix($color_value, $card_dark, 30%);
195
- }
138
+ // background-color: mix($color_value, $card_dark, 10%);
139
+ // .pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
140
+ // color: $color_name;
141
+ // }
142
+ // .pb_form_pill_close {
143
+ // color: $color_name;
144
+ // &:hover {
145
+ // background-color: mix($color_value, $card_dark, 40%);
146
+ // }
147
+ // }
148
+ // &:hover {
149
+ // background-color: mix($color_value, $card_dark, 20%);
150
+ // }
151
+ // &:active {
152
+ // background-color: mix($color_value, $card_dark, 30%);
153
+ // }
196
154
  @if ($color_name == "neutral") {
197
155
  background-color: transparent;
198
156
  border: 1px solid $border_dark;
@@ -227,192 +185,12 @@ $form_pill_colors: map-merge($status_color_text, map-merge($data_colors, $produc
227
185
  }
228
186
  }
229
187
  &:hover {
230
- background-color: mix($active_dark, $card_dark, 20%);
188
+ background-color: mix($active_dark, $card_dark, 20px);
231
189
  }
232
190
  &:active {
233
191
  background-color: mix($active_dark, $card_dark, 30%);
234
192
  }
235
193
  }
236
- @if ($color_name == "data_1") {
237
- background-color: mix($active_dark, $card_dark, 10%);
238
- .pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
239
- color: mix($active_dark, $card_light, 90%);
240
- }
241
- .pb_form_pill_close {
242
- color: mix($active_dark, $card_light, 90%);
243
- &:hover {
244
- background-color: mix($active_dark, $card_dark, 40%);
245
- }
246
- }
247
- &:hover {
248
- background-color: mix($active_dark, $card_dark, 20%);
249
- }
250
- &:active {
251
- background-color: mix($data_1, $card_dark, 30%);
252
- }
253
- }
254
- @if ($color_name == "data_6") {
255
- background-color: mix($data_6, $card_dark, 10%);
256
- .pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
257
- color: $text_dk_light;
258
- }
259
- .pb_form_pill_close {
260
- color: $text_dk_light;
261
- &:hover {
262
- background-color: mix($text_dk_light, $card_dark, 40%);
263
- }
264
- }
265
- &:hover {
266
- background-color: mix($data_6, $card_dark, 20%);
267
- }
268
- &:active {
269
- background-color: mix($data_6, $card_dark, 30%);
270
- }
271
- }
272
- @if ($color_name == "windows") {
273
- background-color: mix($product_1_highlight, $card_dark, 10%);
274
- .pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
275
- color: $product_1_highlight;
276
- }
277
- .pb_form_pill_close {
278
- color: $product_1_highlight;
279
- &:hover {
280
- background-color: mix($product_1_highlight, $card_dark, 40%);
281
- }
282
- }
283
- &:hover {
284
- background-color: mix($product_1_highlight, $card_dark, 20%);
285
- }
286
- &:active {
287
- background-color: mix($product_1_highlight, $card_dark, 30%);
288
- }
289
- }
290
- @if ($color_name == "siding") {
291
- background-color: mix($product_2_highlight, $card_dark, 10%);
292
- .pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
293
- color: $product_2_highlight;
294
- }
295
- .pb_form_pill_close {
296
- color: $product_2_highlight;
297
- &:hover {
298
- background-color: mix($product_2_highlight, $card_dark, 40%);
299
- }
300
- }
301
- &:hover {
302
- background-color: mix($product_2_highlight, $card_dark, 20%);
303
- }
304
- &:active {
305
- background-color: mix($product_2_highlight, $card_dark, 30%);
306
- }
307
- }
308
- @if ($color_name == "roofing") {
309
- background-color: mix($product_5_highlight, $card_dark, 10%);
310
- .pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
311
- color: $product_5_highlight;
312
- }
313
- .pb_form_pill_close {
314
- color: $product_5_highlight;
315
- &:hover {
316
- background-color: mix($product_5_highlight, $card_dark, 40%);
317
- }
318
- }
319
- &:hover {
320
- background-color: mix($product_5_highlight, $card_dark, 20%);
321
- }
322
- &:active {
323
- background-color: mix($product_5_highlight, $card_dark, 30%);
324
- }
325
- }
326
- @if ($color_name == "doors") {
327
- background-color: mix($product_3_highlight, $card_dark, 10%);
328
- .pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
329
- color: $product_3_highlight;
330
- }
331
- .pb_form_pill_close {
332
- color: $product_3_highlight;
333
- &:hover {
334
- background-color: mix($product_3_highlight, $card_dark, 40%);
335
- }
336
- }
337
- &:hover {
338
- background-color: mix($product_3_highlight, $card_dark, 20%);
339
- }
340
- &:active {
341
- background-color: mix($product_3_highlight, $card_dark, 30%);
342
- }
343
- }
344
- @if ($color_name == "gutters") {
345
- background-color: mix($product_6_highlight, $card_dark, 10%);
346
- .pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
347
- color: $product_6_highlight;
348
- }
349
- .pb_form_pill_close {
350
- color: $product_6_highlight;
351
- &:hover {
352
- background-color: mix($product_6_highlight, $card_dark, 40%);
353
- }
354
- }
355
- &:hover {
356
- background-color: mix($product_6_highlight, $card_dark, 20%);
357
- }
358
- &:active {
359
- background-color: mix($product_6_highlight, $card_dark, 30%);
360
- }
361
- }
362
- @if ($color_name == "solar") {
363
- background-color: mix($product_4_highlight, $card_dark, 10%);
364
- .pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
365
- color: $product_4_highlight;
366
- }
367
- .pb_form_pill_close {
368
- color: $product_4_highlight;
369
- &:hover {
370
- background-color: mix($product_4_highlight, $card_dark, 40%);
371
- }
372
- }
373
- &:hover {
374
- background-color: mix($product_4_highlight, $card_dark, 20%);
375
- }
376
- &:active {
377
- background-color: mix($product_4_highlight, $card_dark, 30%);
378
- }
379
- }
380
- @if ($color_name == "insulation") {
381
- background-color: mix($product_7_highlight, $card_dark, 10%);
382
- .pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
383
- color: $product_7_highlight;
384
- }
385
- .pb_form_pill_close {
386
- color: $product_7_highlight;
387
- &:hover {
388
- background-color: mix($product_7_highlight, $card_dark, 40%);
389
- }
390
- }
391
- &:hover {
392
- background-color: mix($product_7_highlight, $card_dark, 20%);
393
- }
394
- &:active {
395
- background-color: mix($product_7_highlight, $card_dark, 30%);
396
- }
397
- }
398
- @if ($color_name == "accessories") {
399
- background-color: mix($product_8_highlight, $card_dark, 10%);
400
- .pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
401
- color: $text_dk_light;
402
- }
403
- .pb_form_pill_close {
404
- color: $text_dk_light;
405
- &:hover {
406
- background-color: mix($product_8_highlight, $card_dark, 40%);
407
- }
408
- }
409
- &:hover {
410
- background-color: mix($product_8_highlight, $card_dark, 20%);
411
- }
412
- &:active {
413
- background-color: mix($product_8_highlight, $card_dark, 30%);
414
- }
415
- }
416
194
  }
417
195
  }
418
196
  }
@@ -17,7 +17,7 @@ type FormPillProps = {
17
17
  avatarUrl?: string,
18
18
  size?: string,
19
19
  textTransform?: 'none' | 'lowercase',
20
- color?: "primary" | "neutral" | "success" | "warning" | "error" | "info" | "data_1" | "data_2" | "data_3" | "data_4" | "data_5" | "data_6" | "data_7" | "data_8" | "windows" | "siding" | "roofing" | "doors" | "gutters" | "solar" | "insulation" | "accessories",
20
+ color?: "primary" | "neutral",
21
21
  data?: {[key: string]: string},
22
22
  tabIndex?: number,
23
23
  icon?: string,
@@ -6,7 +6,6 @@ examples:
6
6
  - form_pill_tag: Form Pill Tag
7
7
  - form_pill_example: Example
8
8
  - form_pill_icon: Form Pill Icon
9
- - form_pill_colors: Form Pill Colors
10
9
 
11
10
  react:
12
11
  - form_pill_user: Form Pill User
@@ -14,4 +13,3 @@ examples:
14
13
  - form_pill_tag: Form Pill Tag
15
14
  - form_pill_example: Example
16
15
  - form_pill_icon: Form Pill Icon
17
- - form_pill_colors: Form Pill Colors
@@ -3,4 +3,3 @@ export { default as FormPillSize } from './_form_pill_size.jsx'
3
3
  export { default as FormPillTag } from './_form_pill_tag.jsx'
4
4
  export { default as FormPillExample } from './_form_pill_example.jsx'
5
5
  export { default as FormPillIcon } from './_form_pill_icon.jsx'
6
- export { default as FormPillColors } from './_form_pill_colors.jsx'
@@ -12,7 +12,7 @@ module Playbook
12
12
  values: %w[none lowercase],
13
13
  default: "none"
14
14
  prop :color, type: Playbook::Props::Enum,
15
- values: %w[primary neutral success warning error info data_1 data_2 data_3 data_4 data_5 data_6 data_7 data_8 windows siding roofing doors gutters solar insulation accessories],
15
+ values: %w[primary neutral],
16
16
  default: "primary"
17
17
  prop :tabindex
18
18
  prop :icon