playbook_ui 12.31.0 → 12.33.0.pre.alpha.revert2650closedialogonoutsideclick977

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/index.js +1 -1
  3. data/app/pb_kits/playbook/pb_background/_background.tsx +10 -1
  4. data/app/pb_kits/playbook/pb_background/background.html.erb +2 -1
  5. data/app/pb_kits/playbook/pb_background/background.rb +4 -2
  6. data/app/pb_kits/playbook/pb_body/_body_mixins.scss +1 -0
  7. data/app/pb_kits/playbook/pb_button/_button_mixins.scss +6 -6
  8. data/app/pb_kits/playbook/pb_button/docs/_button_hover.html.erb +3 -0
  9. data/app/pb_kits/playbook/pb_button/docs/example.yml +1 -0
  10. data/app/pb_kits/playbook/pb_card/_card_mixin.scss +1 -1
  11. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.scss +1 -1
  12. data/app/pb_kits/playbook/pb_date/_date.tsx +7 -8
  13. data/app/pb_kits/playbook/pb_date/docs/_date_alignment.jsx +2 -2
  14. data/app/pb_kits/playbook/pb_date/docs/_date_default.jsx +4 -4
  15. data/app/pb_kits/playbook/pb_date/docs/_date_unstyled.jsx +2 -2
  16. data/app/pb_kits/playbook/pb_date/docs/_date_variants.jsx +5 -5
  17. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +37 -31
  18. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.tsx +45 -31
  19. data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx +5 -3
  20. data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.tsx +24 -21
  21. data/app/pb_kits/playbook/pb_date_time/_date_time.tsx +1 -1
  22. data/app/pb_kits/playbook/pb_date_time/dateTime.test.js +1 -1
  23. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.tsx +2 -2
  24. data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.test.js +1 -1
  25. data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx +6 -8
  26. data/app/pb_kits/playbook/pb_dialog/_dialog.scss +321 -316
  27. data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +12 -9
  28. data/app/pb_kits/playbook/pb_dialog/dialog.html.erb +8 -8
  29. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +28 -19
  30. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_children.html.erb +17 -0
  31. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_children.jsx +33 -0
  32. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_children.md +3 -0
  33. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +2 -0
  34. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/index.js +1 -0
  35. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.html.erb +8 -2
  36. data/app/pb_kits/playbook/pb_icon/_icon.tsx +4 -2
  37. data/app/pb_kits/playbook/pb_icon/docs/_icon_fa_kit.html.erb +1 -0
  38. data/app/pb_kits/playbook/pb_icon/docs/_icon_fa_kit.jsx +21 -0
  39. data/app/pb_kits/playbook/pb_icon/docs/_icon_fa_kit.md +7 -0
  40. data/app/pb_kits/playbook/pb_icon/docs/example.yml +2 -0
  41. data/app/pb_kits/playbook/pb_icon/docs/index.js +1 -0
  42. data/app/pb_kits/playbook/pb_icon/icon.rb +1 -1
  43. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.tsx +14 -4
  44. data/app/pb_kits/playbook/pb_icon_circle/icon_circle.rb +1 -1
  45. data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx +12 -1
  46. data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_color.html.erb +6 -0
  47. data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_color.jsx +9 -0
  48. data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.html.erb +16 -12
  49. data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.rb +2 -2
  50. data/app/pb_kits/playbook/pb_kit/dateTime.ts +139 -67
  51. data/app/pb_kits/playbook/pb_label_value/_label_value.tsx +52 -31
  52. data/app/pb_kits/playbook/pb_map/_map.scss +4 -0
  53. data/app/pb_kits/playbook/pb_message/_message.tsx +24 -24
  54. data/app/pb_kits/playbook/pb_message/docs/_message_hover.html.erb +25 -0
  55. data/app/pb_kits/playbook/pb_message/docs/example.yml +1 -0
  56. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.scss +1 -0
  57. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +12 -1
  58. data/app/pb_kits/playbook/pb_time/_time.tsx +9 -11
  59. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.tsx +46 -49
  60. data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.tsx +4 -6
  61. data/app/pb_kits/playbook/pb_timestamp/_timestamp.tsx +11 -11
  62. data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.tsx +8 -11
  63. data/app/pb_kits/playbook/tokens/_colors.scss +4 -2
  64. data/app/pb_kits/playbook/utilities/_border_radius.scss +11 -1
  65. data/app/pb_kits/playbook/utilities/_hover.scss +1 -1
  66. data/app/pb_kits/playbook/utilities/_line_height.scss +1 -2
  67. data/app/pb_kits/playbook/utilities/_shadow.scss +0 -1
  68. data/app/pb_kits/playbook/utilities/globalProps.ts +2 -2
  69. data/dist/playbook-rails.js +7 -7
  70. data/lib/playbook/border_radius.rb +29 -0
  71. data/lib/playbook/classnames.rb +2 -0
  72. data/lib/playbook/hover.rb +60 -0
  73. data/lib/playbook/kit_base.rb +4 -0
  74. data/lib/playbook/version.rb +2 -2
  75. metadata +17 -8
  76. data/app/pb_kits/playbook/pb_logistic/_logistic.jsx +0 -120
@@ -89,7 +89,7 @@ describe('DateTime Kit', () => {
89
89
  const kit = screen.getByTestId(testId)
90
90
  const text = kit.querySelector('.pb_time_kit_md.ml_sm')
91
91
 
92
- expect(text.textContent).toEqual('2:00p JST')
92
+ expect(text.textContent).toEqual('2:00p GMT+9')
93
93
  })
94
94
  test('renders DatePicker size', () => {
95
95
  render(
@@ -12,8 +12,8 @@ import DateStacked from '../pb_date_stacked/_date_stacked'
12
12
 
13
13
  type DateTimeStackedProps = {
14
14
  id?: string,
15
- date: string,
16
- datetime: string,
15
+ date: Date,
16
+ datetime: Date,
17
17
  dark: boolean,
18
18
  timeZone?: string,
19
19
  }
@@ -34,7 +34,7 @@ test('renders time in default timezone', () => {
34
34
  test('renders time in timezone', () => {
35
35
  props.timeZone = 'Asia/Tokyo'
36
36
  const kit = renderKit(DateTimeStacked, props)
37
- expect(kit).toHaveTextContent(`${monthDayYear}2:00aJST`)
37
+ expect(kit).toHaveTextContent(`${monthDayYear}2:00aGMT+9`)
38
38
  })
39
39
 
40
40
  test('renders time in timezone', () => {
@@ -1,9 +1,9 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
3
 
4
- import DateTime from '../pb_kit/dateTime'
5
4
  import { buildCss, buildDataProps } from '../utilities/props'
6
5
  import { globalProps } from '../utilities/globalProps'
6
+ import DateTime from '../pb_kit/dateTime';
7
7
 
8
8
  import Body from '../pb_body/_body'
9
9
  import Title from '../pb_title/_title'
@@ -13,13 +13,12 @@ type DateYearStackedProps = {
13
13
  className?: string | string[],
14
14
  dark?: boolean,
15
15
  data?: string,
16
- date: string,
16
+ date: Date,
17
17
  id?: string,
18
18
  }
19
19
 
20
20
  const DateYearStacked = (props: DateYearStackedProps) => {
21
21
  const { align = 'left', className, dark = false, date, data={} } = props
22
- const dateTimestamp = new DateTime({ value: date })
23
22
  const css = classnames(
24
23
  buildCss('pb_date_year_stacked', align),
25
24
  globalProps(props),
@@ -29,15 +28,14 @@ const DateYearStacked = (props: DateYearStackedProps) => {
29
28
 
30
29
  return (
31
30
  <div {...dataProps}
32
- className={css}>
31
+ className={css}
32
+ >
33
33
  <Title
34
34
  dark={dark}
35
35
  size={4}
36
- text={`${dateTimestamp.toDay()} ${dateTimestamp
37
- .toMonth()
38
- .toUpperCase()}`}
36
+ text={`${DateTime.toDay(date)} ${DateTime.toMonth(date).toUpperCase()}`}
39
37
  />
40
- <Body color="light">{dateTimestamp.toYear()}</Body>
38
+ <Body color="light">{DateTime.toYear(date)}</Body>
41
39
  </div>
42
40
  )
43
41
  }