playbook_ui 12.19.0.pre.alpha.movemarkdown639 → 12.20.0.pre.alpha.movemarkdown668

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleContent.tsx +38 -0
  3. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.tsx +94 -0
  4. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_calendar_input_icon.scss +33 -0
  5. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_day_styles.scss +78 -0
  6. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_flatpickr_styles.scss +775 -0
  7. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_header_styles.scss +116 -0
  8. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_inline_styles.scss +173 -0
  9. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_input_styles.scss +68 -0
  10. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_month_and_year_styles.scss +127 -0
  11. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_overrides.scss +47 -0
  12. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_time_selection_styles.scss +64 -0
  13. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_week_styles.scss +127 -0
  14. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_body.tsx +25 -0
  15. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx +56 -0
  16. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_header.tsx +68 -0
  17. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.scss +1 -2
  18. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +22 -7
  19. data/app/pb_kits/playbook/pb_multi_level_select/helper_functions.ts +32 -5
  20. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +9 -4
  21. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.tsx +5 -3
  22. data/app/pb_kits/playbook/pb_selectable_card/selectable_card.html.erb +2 -1
  23. data/app/pb_kits/playbook/pb_table/styles/_alignment.scss +32 -0
  24. data/app/pb_kits/playbook/pb_table/styles/_all.scss +19 -0
  25. data/app/pb_kits/playbook/pb_table/styles/_content.scss +13 -0
  26. data/app/pb_kits/playbook/pb_table/styles/_desktop_collapse.scss +125 -0
  27. data/app/pb_kits/playbook/pb_table/styles/_headers.scss +16 -0
  28. data/app/pb_kits/playbook/pb_table/styles/_hover.scss +74 -0
  29. data/app/pb_kits/playbook/pb_table/styles/_mobile.scss +125 -0
  30. data/app/pb_kits/playbook/pb_table/styles/_mobile_collapse.scss +125 -0
  31. data/app/pb_kits/playbook/pb_table/styles/_reset.scss +17 -0
  32. data/app/pb_kits/playbook/pb_table/styles/_side_highlight.scss +24 -0
  33. data/app/pb_kits/playbook/pb_table/styles/_single-line.scss +34 -0
  34. data/app/pb_kits/playbook/pb_table/styles/_sticky_header.scss +23 -0
  35. data/app/pb_kits/playbook/pb_table/styles/_structure.scss +50 -0
  36. data/app/pb_kits/playbook/pb_table/styles/_table-card.scss +62 -0
  37. data/app/pb_kits/playbook/pb_table/styles/_table-dark.scss +100 -0
  38. data/app/pb_kits/playbook/pb_table/styles/_tablet_collapse.scss +125 -0
  39. data/app/pb_kits/playbook/pb_table/styles/_variables.scss +26 -0
  40. data/app/pb_kits/playbook/pb_table/styles/_vertical_border.scss +16 -0
  41. data/app/pb_kits/playbook/pb_typeahead/{_typeahead.jsx → _typeahead.tsx} +24 -12
  42. data/app/pb_kits/playbook/pb_typeahead/components/ClearIndicator.tsx +18 -0
  43. data/app/pb_kits/playbook/pb_typeahead/components/Control.tsx +28 -0
  44. data/app/pb_kits/playbook/pb_typeahead/components/IndicatorsContainer.tsx +11 -0
  45. data/app/pb_kits/playbook/pb_typeahead/components/MenuList.tsx +10 -0
  46. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +66 -0
  47. data/app/pb_kits/playbook/pb_typeahead/components/Option.tsx +37 -0
  48. data/app/pb_kits/playbook/pb_typeahead/components/Placeholder.tsx +26 -0
  49. data/app/pb_kits/playbook/pb_typeahead/components/ValueContainer.tsx +11 -0
  50. data/app/pb_kits/playbook/pb_typeahead/{index.js → index.ts} +37 -29
  51. data/app/pb_kits/playbook/pb_typeahead/types.d.ts +2 -0
  52. data/app/pb_kits/playbook/pb_user/_user.tsx +1 -1
  53. data/app/pb_kits/playbook/utilities/_positioning.scss +14 -0
  54. data/app/pb_kits/playbook/utilities/globalProps.ts +16 -4
  55. data/dist/playbook-rails.js +4 -4
  56. data/lib/playbook/version.rb +2 -2
  57. data/lib/playbook/z_index.rb +20 -7
  58. metadata +46 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9440dc4e4d3220da34c38ede6cc204bca36c1e06f244f631917019763ea3582e
4
- data.tar.gz: ab31b1f4778d5bf93cc4f30cbacdcb113e0b8a811338491c5317f4daa9025dd2
3
+ metadata.gz: 2df0f0270c3034cc3c34d508319933af0f3bd1961b9ec81b08bf52411381097c
4
+ data.tar.gz: 4f8fb1eea4a45848114ae267ba2f102359af6f03006543a82798e70007e18c50
5
5
  SHA512:
6
- metadata.gz: 655ed32310d438cd3e907c6ca30c99d81dd6cb0de6cf2745affc9f24dd8f6022fc04b35ccf36cb35ed3646bd580df858306166b7d01761c7f6a8408532537de9
7
- data.tar.gz: 968ffb4c12469e2fac7238cb1da69ffa62150d5ac7b0b73c144b9e85e2ad2f04f8938283e6c3c9677a2bb8e2107c99b650e299e04c07aaeed736b003af727795
6
+ metadata.gz: a392fbed9531d8af1023d645e5b1e5d6c74eff0baaade11e615d0381cb43af31584109c5d9d997daa816ae990786957f2620a3e016bc4335a98c727c5e11e7c7
7
+ data.tar.gz: 3f7b89e018d6535577e9c460947c8278f2a3cc16e34ae5cb99ed6965b24fbeb3026e8db0bc98a80fa86521dfac57bebe735805bcea2b7bad6d5ea77fdd1119e4
@@ -0,0 +1,38 @@
1
+ import classnames from 'classnames'
2
+ import React, { useContext } from 'react'
3
+ import AnimateHeight from 'react-animate-height'
4
+ import { buildCss } from '../../utilities/props'
5
+ import { globalProps } from '../../utilities/globalProps'
6
+
7
+ import CollapsibleContext from '../context'
8
+
9
+ export type CollapsibleContentProps = {
10
+ children?: React.ReactNode[] | React.ReactNode | string,
11
+ className?: string,
12
+ padding?: string,
13
+ }
14
+
15
+ const CollapsibleContent = ({
16
+ children,
17
+ className,
18
+ padding = 'md',
19
+ ...props
20
+ }: CollapsibleContentProps) => {
21
+ const context: {[key: string]: boolean | string} = useContext(CollapsibleContext)
22
+ const contentCSS = buildCss('pb_collapsible_content_kit')
23
+ const contentSpacing = globalProps(props, { padding })
24
+
25
+ return (
26
+ <AnimateHeight
27
+ duration={400}
28
+ height={context.collapsed ? 0 : 'auto'}
29
+ id="bottom-section"
30
+ >
31
+ <div className={classnames(contentCSS, className, contentSpacing)}>
32
+ {children}
33
+ </div>
34
+ </AnimateHeight>
35
+ )
36
+ }
37
+
38
+ export default CollapsibleContent
@@ -0,0 +1,94 @@
1
+ /* eslint-disable react/no-multi-comp */
2
+
3
+ import classnames from 'classnames'
4
+ import React, { useContext } from 'react'
5
+ import { buildCss } from '../../utilities/props'
6
+ import { globalProps } from '../../utilities/globalProps'
7
+
8
+ import Flex from '../../pb_flex/_flex'
9
+ import FlexItem from '../../pb_flex/_flex_item'
10
+ import CollapsibleContext from '../context'
11
+
12
+
13
+ type colorMap = {
14
+ default: string,
15
+ light: string,
16
+ lighter: string,
17
+ link: string,
18
+ error: string,
19
+ success: string
20
+ }
21
+
22
+ const colorMap = {
23
+ default: "#242B42",
24
+ light: "#687887",
25
+ lighter: "#C1CDD6",
26
+ link: "#0056CF",
27
+ error: "#FF2229",
28
+ success: "#00CA74",
29
+ }
30
+
31
+ type CollapsibleMainProps = {
32
+ children: React.ReactNode[] | React.ReactNode,
33
+ className?: string,
34
+ padding?: string,
35
+ cursor?: string,
36
+
37
+ }
38
+ type IconColors = "default" | "light" | "lighter" | "link" | "error" | "success"
39
+
40
+ type IconProps = {
41
+ collapsed: boolean | (()=> void)
42
+ iconColor?: IconColors
43
+ iconSize?: string | (() => void)
44
+ }
45
+
46
+ const Icon = ({ collapsed, iconSize, iconColor }: IconProps) => {
47
+ const direction = collapsed ? 'down' : 'up'
48
+ const size = iconSize
49
+ const color = colorMap[iconColor]
50
+
51
+ return (
52
+ <div
53
+ className="icon_wrapper"
54
+ key={direction}
55
+ style={{ verticalAlign: 'middle', color: color }}
56
+ >
57
+ <i className={`far fa-chevron-${direction} fa-fw ${size && `fa-${size}`}`} />
58
+ </div>
59
+ )
60
+ }
61
+
62
+ const CollapsibleMain = ({
63
+ children,
64
+ className,
65
+ cursor = 'pointer',
66
+ padding = 'md',
67
+ ...props
68
+ }: CollapsibleMainProps): React.ReactElement=> {
69
+ const context: {[key: string]: IconColors | (() => void)} | boolean = useContext(CollapsibleContext)
70
+ const mainCSS = buildCss('pb_collapsible_main_kit')
71
+ const mainSpacing = globalProps(props, { cursor, padding })
72
+
73
+ return (
74
+ <div className={classnames(mainCSS, className, mainSpacing)}>
75
+ <div onClick={context.collapse as (() => void)}>
76
+ <Flex
77
+ spacing="between"
78
+ vertical="center"
79
+ >
80
+ <FlexItem>{children}</FlexItem>
81
+ <FlexItem>
82
+ <Icon
83
+ collapsed={context.collapsed as () => void}
84
+ iconColor={context.iconColor as IconColors}
85
+ iconSize={context.iconSize}
86
+ />
87
+ </FlexItem>
88
+ </Flex>
89
+ </div>
90
+ </div>
91
+ )
92
+ }
93
+
94
+ export default CollapsibleMain
@@ -0,0 +1,33 @@
1
+ // Calendar Icon Styles
2
+ .cal_icon_wrapper {
3
+ pointer-events: none;
4
+ position: absolute;
5
+ top: $space_md + 2;
6
+ right: 0;
7
+ border-left: 1px solid $border_light;
8
+ width: $space_xl + $space_xs;
9
+ height: $space_xl + 5;
10
+ display: flex;
11
+ flex-direction: column;
12
+ justify-content: center;
13
+ padding-left: $space_sm - 1;
14
+ color: $text_lt_light;
15
+ @media (hover: hover) {
16
+ &:hover {
17
+ cursor: pointer;
18
+ }
19
+ }
20
+ &.dark {
21
+ color: $white;
22
+ border-color: $border_dark;
23
+ }
24
+ &.no_label_shift {
25
+ top: 0;
26
+ }
27
+ &.error {
28
+ border-left-color: $error;
29
+ }
30
+ }
31
+ .cal_icon {
32
+ width: $space_sm;
33
+ }
@@ -0,0 +1,78 @@
1
+ // Day and Range Styles
2
+ .flatpickr-day {
3
+ user-select: none;
4
+ @media (hover: hover) {
5
+ &:hover {
6
+ transition-duration: $transition_short;
7
+ transition-timing-function: $easeIn;
8
+ background-color: #F6FAFF;
9
+ border-color: #F6FAFF;
10
+ box-shadow: $shadow_deep;
11
+ }
12
+ }
13
+ }
14
+ .flatpickr-day.today {
15
+ border: none;
16
+ font-weight: $bold;
17
+ color: $charcoal;
18
+ &.selected {
19
+ color: $text_dk_default;
20
+ }
21
+ }
22
+ .flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange {
23
+ border-radius: $space_xl + 10;
24
+ background-color: $primary;
25
+ border-color: $primary;
26
+ box-shadow: $shadow_deep;
27
+ font-weight: $bold;
28
+ }
29
+ .flatpickr-day.startRange {
30
+ box-shadow: $space_sm + 1 0 0 #F7FBFF
31
+ }
32
+ .flatpickr-day.endRange {
33
+ box-shadow: -$space_sm 0 0 #F7FBFF
34
+ }
35
+ .flatpickr-day.inRange {
36
+ background-color: #F7FBFF;
37
+ border-color: transparent;
38
+ box-shadow: -$space_xs + 4 0 0 #F7FBFF, $space_xs - 3 0 0 #F7FBFF;
39
+ }
40
+ /*
41
+ Plugin author didn't consider providing a class context, so
42
+ instead we have to use the id! ¯\_(ツ)_/¯
43
+ */
44
+ #cal-week-date-picker {
45
+ .flatpickr-day.inRange:not(.selected) {
46
+ &:nth-of-type(1),
47
+ &:nth-of-type(7n+1) {
48
+ border-radius: 30px 0 0 30px;
49
+ }
50
+ &:nth-of-type(7n) {
51
+ border-radius: 0 30px 30px 0;
52
+ }
53
+ }
54
+ .flatpickr-day.inRange {
55
+ &.selected {
56
+ background-color: $primary;
57
+ box-shadow: none;
58
+ color: #ffffff;
59
+ }
60
+ }
61
+ .flatpickr-day.selected:hover {
62
+ transition: none;
63
+ }
64
+ }
65
+ .flatpickr-innerContainer {
66
+ overflow: visible;
67
+ }
68
+ .flatpickr-days {
69
+ overflow: visible;
70
+ }
71
+ // Weekday Styling
72
+ div.flatpickr-weekdays {
73
+ margin-top: $space_xs;
74
+ }
75
+ span.flatpickr-weekday {
76
+ @include caption;
77
+ user-select: none;
78
+ }