playbook_ui 12.1.0 → 12.3.0.pre.alpha.patchtest1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +3 -0
  3. data/app/pb_kits/playbook/data/menu.yml +1 -0
  4. data/app/pb_kits/playbook/index.js +3 -2
  5. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +10 -10
  6. data/app/pb_kits/playbook/pb_button/_button.scss +0 -5
  7. data/app/pb_kits/playbook/pb_button/_button.tsx +4 -0
  8. data/app/pb_kits/playbook/pb_button/_button_mixins.scss +39 -4
  9. data/app/pb_kits/playbook/pb_button/button.rb +2 -0
  10. data/app/pb_kits/playbook/pb_button/docs/_button_accessibility.jsx +1 -0
  11. data/app/pb_kits/playbook/pb_button/docs/_button_block_content.jsx +1 -0
  12. data/app/pb_kits/playbook/pb_button/docs/_button_default.jsx +4 -0
  13. data/app/pb_kits/playbook/pb_button/docs/_button_form.jsx +1 -0
  14. data/app/pb_kits/playbook/pb_button/docs/_button_full_width.jsx +1 -0
  15. data/app/pb_kits/playbook/pb_button/docs/_button_icon_options.html.erb +2 -2
  16. data/app/pb_kits/playbook/pb_button/docs/_button_icon_options.jsx +4 -0
  17. data/app/pb_kits/playbook/pb_button/docs/_button_link.html.erb +3 -3
  18. data/app/pb_kits/playbook/pb_button/docs/_button_link.jsx +6 -0
  19. data/app/pb_kits/playbook/pb_button/docs/_button_loading.html.erb +3 -3
  20. data/app/pb_kits/playbook/pb_button/docs/_button_loading.jsx +6 -0
  21. data/app/pb_kits/playbook/pb_button/docs/_button_options.jsx +1 -0
  22. data/app/pb_kits/playbook/pb_button/docs/_button_size.html.erb +3 -3
  23. data/app/pb_kits/playbook/pb_button/docs/_button_size.jsx +6 -0
  24. data/app/pb_kits/playbook/pb_checkbox/_checkbox.scss +26 -19
  25. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.scss +24 -0
  26. data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +2 -0
  27. data/app/pb_kits/playbook/pb_form_group/_form_group.scss +10 -2
  28. data/app/pb_kits/playbook/pb_map/_map.scss +8 -0
  29. data/app/pb_kits/playbook/pb_map/_map.tsx +40 -0
  30. data/app/pb_kits/playbook/pb_map/docs/_map_default.jsx +52 -0
  31. data/app/pb_kits/playbook/pb_map/docs/_map_default.md +13 -0
  32. data/app/pb_kits/playbook/pb_map/docs/_map_with_plugin.jsx +64 -0
  33. data/app/pb_kits/playbook/pb_map/docs/_map_with_plugin.md +8 -0
  34. data/app/pb_kits/playbook/pb_map/docs/example.yml +7 -0
  35. data/app/pb_kits/playbook/pb_map/docs/index.js +2 -0
  36. data/app/pb_kits/playbook/pb_map/map.test.jsx +17 -0
  37. data/app/pb_kits/playbook/pb_progress_simple/{_progress_simple.jsx → _progress_simple.tsx} +7 -5
  38. data/app/pb_kits/playbook/pb_progress_simple/progress_simple.test.js +120 -0
  39. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +4 -9
  40. data/app/pb_kits/playbook/pb_stat_change/_stat_change.tsx +66 -0
  41. data/app/pb_kits/playbook/pb_stat_change/stat_change.test.js +41 -0
  42. data/app/pb_kits/playbook/pb_stat_value/{_stat_value.jsx → _stat_value.tsx} +4 -6
  43. data/app/pb_kits/playbook/pb_stat_value/docs/_stat_value_unit.jsx +1 -1
  44. data/app/pb_kits/playbook/pb_stat_value/stat_value.test.js +27 -0
  45. data/app/pb_kits/playbook/pb_time_stacked/{_time_stacked.jsx → _time_stacked.tsx} +3 -5
  46. data/app/pb_kits/playbook/pb_time_stacked/docs/_time_stacked_default.jsx +1 -1
  47. data/app/pb_kits/playbook/pb_time_stacked/docs/index.js +1 -1
  48. data/app/pb_kits/playbook/pb_timestamp/{_timestamp.jsx → _timestamp.tsx} +5 -7
  49. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx +1 -1
  50. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx +1 -1
  51. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.jsx +1 -1
  52. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx +1 -1
  53. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated.jsx +1 -1
  54. data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +36 -28
  55. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default_react.jsx +1 -0
  56. data/app/pb_kits/playbook/pb_tooltip/tooltip.test.jsx +14 -0
  57. data/app/pb_kits/playbook/pb_typeahead/_typeahead.jsx +11 -2
  58. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +0 -2
  59. data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +95 -0
  60. data/app/pb_kits/playbook/pb_typeahead/components/ClearIndicator.jsx +1 -1
  61. data/app/pb_kits/playbook/pb_typeahead/components/Control.jsx +1 -0
  62. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_error_state.html.erb +19 -0
  63. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_error_state.jsx +39 -0
  64. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_error_state.md +1 -0
  65. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
  66. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
  67. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +3 -0
  68. data/app/pb_kits/playbook/playbook-doc.js +2 -0
  69. data/app/pb_kits/playbook/tokens/_colors.scss +6 -2
  70. data/app/pb_kits/playbook/utilities/_focus.scss +12 -0
  71. data/lib/playbook/version.rb +2 -2
  72. metadata +26 -9
  73. data/app/pb_kits/playbook/pb_stat_change/_stat_change.jsx +0 -63
@@ -1,63 +0,0 @@
1
- /* @flow */
2
-
3
- import React from 'react'
4
- import classnames from 'classnames'
5
-
6
- import { buildCss } from '../utilities/props'
7
- import { globalProps } from '../utilities/globalProps'
8
-
9
- import Body from '../pb_body/_body'
10
- import Icon from '../pb_icon/_icon'
11
-
12
- const statusMap = {
13
- increase: 'positive',
14
- decrease: 'negative',
15
- }
16
-
17
- const iconMap = {
18
- increase: 'arrow-up',
19
- decrease: 'arrow-down',
20
- }
21
-
22
- type StatChangeProps = {
23
- change?: "increase" | "decrease" | "neutral",
24
- className?: string,
25
- icon?: string,
26
- id?: string,
27
- value?: string | number,
28
- }
29
-
30
- const StatChange = (props: StatChangeProps) => {
31
- const { change = 'neutral', className, icon, id, value } = props
32
- const status = statusMap[change] || 'neutral'
33
- let returnedIcon = iconMap[change]
34
- if (icon) {
35
- returnedIcon = icon
36
- }
37
-
38
- return (
39
- <If condition={value}>
40
- <div
41
- className={classnames(
42
- buildCss('pb_stat_change_kit', status),
43
- globalProps(props),
44
- className
45
- )}
46
- id={id}
47
- >
48
- <Body status={status}>
49
- <If condition={returnedIcon}>
50
- <Icon
51
- fixed_width
52
- icon={returnedIcon}
53
- />
54
- {' '}
55
- </If>
56
- {`${value}%`}
57
- </Body>
58
- </div>
59
- </If>
60
- )
61
- }
62
-
63
- export default StatChange