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
@@ -0,0 +1,125 @@
1
+ @import "../../tokens/border_radius";
2
+ @import "../../tokens/positioning";
3
+ @import "../../pb_caption/caption_mixin";
4
+
5
+ @media only screen and (max-width: $screen-xs-max) {
6
+ [class^=pb_table] {
7
+ &.table-sm.table-responsive-collapse,
8
+ &.table-md.table-responsive-collapse,
9
+ &.table-lg.table-responsive-collapse {
10
+ width: 100%;
11
+ background: none !important;
12
+
13
+ thead {
14
+ tr {
15
+ left: $offscreen;
16
+ position: absolute;
17
+ top: $offscreen;
18
+
19
+ th {
20
+ display: block;
21
+ visibility: visible;
22
+ }
23
+ }
24
+ }
25
+ tbody {
26
+ tr {
27
+ td {
28
+ display: block;
29
+ visibility: visible;
30
+ border-left-width: 1px !important;
31
+ border-right-width: 1px !important;
32
+ border-bottom-width: 0 !important;
33
+ border-color: $border_light !important;
34
+ min-height: 2.2em;
35
+ position: relative;
36
+ text-align:left;
37
+ white-space: normal;
38
+ &:before {
39
+ content: attr(data-title);
40
+ @include caption;
41
+ width: 100% !important;
42
+ white-space: nowrap !important;
43
+ text-overflow: ellipsis !important;
44
+ position: relative !important;
45
+ top: 0 !important;
46
+ left: 0 !important;
47
+ height: 100% !important;
48
+ padding-left: 0 !important;
49
+ display: block !important;
50
+ }
51
+
52
+ &:first-child {
53
+ margin-top: $space_md !important;
54
+ border-top-width: 1px !important;
55
+ border-top-color: $border_light !important;
56
+ border-radius: $border_rad_light $border_rad_light 0 0;
57
+ }
58
+
59
+ &:last-child {
60
+ border-radius: 0 0 $border_rad_light $border_rad_light;
61
+ border-bottom-width: 1px !important;
62
+ }
63
+ }
64
+
65
+ &:first-child {
66
+ td {
67
+ &:first-child {
68
+ margin-top: $space-xs !important;
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
74
+ &.table-card {
75
+ background: none !important;
76
+
77
+ tbody {
78
+ tr {
79
+ td {
80
+ background: $white !important;
81
+ border-left-width: 1px !important;
82
+ border-right-width: 1px !important;
83
+ border-top-width: 1px !important;
84
+ &:after {
85
+ height: 0;
86
+ background-color: transparent;
87
+ }
88
+
89
+ &:first-child {
90
+ border-radius: $border_rad_light $border_rad_light 0 0 !important;
91
+ }
92
+ &:last-child {
93
+ border-radius: 0 0 $border_rad_light $border_rad_light !important;
94
+ }
95
+ }
96
+ }
97
+ }
98
+ }
99
+ @media (hover:hover) {
100
+ &:hover {
101
+ tbody {
102
+ tr {
103
+ box-shadow: 0 0 0 $white !important;
104
+ }
105
+ }
106
+ }
107
+ }
108
+ // reset the first and last to normalize
109
+ @each $name, $value in $cell-pad-list {
110
+ &.#{$name} {
111
+ tbody {
112
+ tr {
113
+ td {
114
+ &:first-child,
115
+ &:last-child {
116
+ padding: $value $cell-gutter !important;
117
+ }
118
+ }
119
+ }
120
+ }
121
+ }
122
+ }
123
+ }
124
+ }
125
+ }
@@ -0,0 +1,125 @@
1
+ @import "../../tokens/border_radius";
2
+ @import "../../tokens/positioning";
3
+ @import "../../pb_caption/caption_mixin";
4
+
5
+ @media only screen and (max-width: $screen-xs-max) {
6
+ [class^=pb_table] {
7
+ &.table-sm.table-collapse-sm,
8
+ &.table-md.table-collapse-sm,
9
+ &.table-lg.table-collapse-sm {
10
+ width: 100%;
11
+ background: none !important;
12
+
13
+ thead {
14
+ tr {
15
+ left: $offscreen;
16
+ position: absolute;
17
+ top: $offscreen;
18
+
19
+ th {
20
+ display: block;
21
+ visibility: visible;
22
+ }
23
+ }
24
+ }
25
+ tbody {
26
+ tr {
27
+ td {
28
+ display: block;
29
+ visibility: visible;
30
+ border-left-width: 1px !important;
31
+ border-right-width: 1px !important;
32
+ border-bottom-width: 0 !important;
33
+ border-color: $border_light !important;
34
+ min-height: 2.2em;
35
+ position: relative;
36
+ text-align:left;
37
+ white-space: normal;
38
+ &:before {
39
+ content: attr(data-title);
40
+ @include caption;
41
+ width: 100% !important;
42
+ white-space: nowrap !important;
43
+ text-overflow: ellipsis !important;
44
+ position: relative !important;
45
+ top: 0 !important;
46
+ left: 0 !important;
47
+ height: 100% !important;
48
+ padding-left: 0 !important;
49
+ display: block !important;
50
+ }
51
+
52
+ &:first-child {
53
+ margin-top: $space_md !important;
54
+ border-top-width: 1px !important;
55
+ border-top-color: $border_light !important;
56
+ border-radius: $border_rad_light $border_rad_light 0 0;
57
+ }
58
+
59
+ &:last-child {
60
+ border-radius: 0 0 $border_rad_light $border_rad_light;
61
+ border-bottom-width: 1px !important;
62
+ }
63
+ }
64
+
65
+ &:first-child {
66
+ td {
67
+ &:first-child {
68
+ margin-top: $space-xs !important;
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
74
+ &.table-card {
75
+ background: none !important;
76
+
77
+ tbody {
78
+ tr {
79
+ td {
80
+ background: $white !important;
81
+ border-left-width: 1px !important;
82
+ border-right-width: 1px !important;
83
+ border-top-width: 1px !important;
84
+ &:after {
85
+ height: 0;
86
+ background-color: transparent;
87
+ }
88
+
89
+ &:first-child {
90
+ border-radius: $border_rad_light $border_rad_light 0 0 !important;
91
+ }
92
+ &:last-child {
93
+ border-radius: 0 0 $border_rad_light $border_rad_light !important;
94
+ }
95
+ }
96
+ }
97
+ }
98
+ }
99
+ @media (hover:hover) {
100
+ &:hover {
101
+ tbody {
102
+ tr {
103
+ box-shadow: 0 0 0 $white !important;
104
+ }
105
+ }
106
+ }
107
+ }
108
+ // reset the first and last to normalize
109
+ @each $name, $value in $cell-pad-list {
110
+ &.#{$name} {
111
+ tbody {
112
+ tr {
113
+ td {
114
+ &:first-child,
115
+ &:last-child {
116
+ padding: $value $cell-gutter !important;
117
+ }
118
+ }
119
+ }
120
+ }
121
+ }
122
+ }
123
+ }
124
+ }
125
+ }
@@ -0,0 +1,17 @@
1
+ [class^=pb_table] {
2
+ &.table-sm,
3
+ &.table-md,
4
+ &.table-lg {
5
+ border-collapse: collapse;
6
+ background-color: unset;
7
+ background: unset;
8
+
9
+ thead {
10
+ tr {
11
+ th {
12
+ text-align: left;
13
+ }
14
+ }
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,24 @@
1
+ @import "../../tokens/colors";
2
+
3
+ $pb_table_row_kit_side_highlight_colors: map-merge(map-merge($status_colors, $product_colors), $category_colors);
4
+
5
+ @mixin pb_table_row_kit_side_highlight($background) {
6
+ box-shadow: inset 4px 0 0 0 $background;
7
+ border-top: 0px;
8
+ }
9
+
10
+ [class^=pb_table] {
11
+ tbody {
12
+ [class^=pb_table_row_kit] {
13
+ @each $color_name, $color_value in $pb_table_row_kit_side_highlight_colors {
14
+ &[class*=_side_highlight_#{$color_name}] {
15
+ td {
16
+ &:first-child {
17
+ @include pb_table_row_kit_side_highlight($color_value);
18
+ }
19
+ }
20
+ }
21
+ }
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,34 @@
1
+ [class^=pb_table] {
2
+ &.single-line {
3
+ width: 100%;
4
+ max-width: 100vw;
5
+ table-layout: fixed;
6
+
7
+ tbody {
8
+ tr {
9
+ td {
10
+ white-space: nowrap;
11
+ text-overflow: ellipsis;
12
+
13
+ & > * {
14
+ &:not(.btn, br) {
15
+ display: inline-block !important;
16
+ }
17
+ }
18
+
19
+ .btn {
20
+ display: block !important;
21
+ }
22
+
23
+ br {
24
+ content:' ' !important;
25
+
26
+ &::after {
27
+ content:' ';
28
+ }
29
+ }
30
+ }
31
+ }
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,23 @@
1
+ @import "../../tokens/colors";
2
+
3
+ [class^="pb_table"] {
4
+ &.sticky-header {
5
+ thead {
6
+ background: $white;
7
+ position: sticky;
8
+ top: 0;
9
+ z-index: 1;
10
+ }
11
+ }
12
+
13
+ &.dark {
14
+ &.sticky-header {
15
+ thead {
16
+ background: $bg_dark;
17
+ position: sticky;
18
+ top: 0;
19
+ z-index: 1;
20
+ }
21
+ }
22
+ }
23
+ }
@@ -0,0 +1,50 @@
1
+ @import "../../tokens/colors";
2
+
3
+ [class^=pb_table] {
4
+ @each $name, $value in $cell-pad-list {
5
+ &.#{$name} {
6
+ width: 100%;
7
+ thead {
8
+ tr {
9
+ th {
10
+ padding: $cell-pad-md $cell-gutter;
11
+
12
+ &:first-child {
13
+ padding-left: $cell-pad-endcap;
14
+ }
15
+ &:last-child {
16
+ padding-right: $cell-pad-endcap;
17
+ }
18
+ }
19
+ }
20
+ }
21
+ tbody {
22
+ tr {
23
+ td {
24
+ border-color: $border_light;
25
+ border-style: solid;
26
+ border-width: 0 0 1px;
27
+ padding: $value $cell-gutter;
28
+
29
+ &:first-child {
30
+ padding-left: $cell-pad-endcap;
31
+ }
32
+ &:last-child {
33
+ padding-right: $cell-pad-endcap;
34
+ }
35
+ }
36
+ }
37
+ }
38
+ &.data_table {
39
+ thead tr th {
40
+ padding-top: $cell-pad-sm;
41
+ padding-bottom: $cell-pad-sm;
42
+ }
43
+ tbody tr td {
44
+ padding-top: $cell-pad-sm;
45
+ padding-bottom: $cell-pad-sm;
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,62 @@
1
+ [class^=pb_table] {
2
+ &.table-sm,
3
+ &.table-md,
4
+ &.table-lg {
5
+ &.table-card {
6
+ border-collapse: separate;
7
+ border-spacing: 0;
8
+ background: $white;
9
+
10
+ thead {
11
+ tr {
12
+ th {
13
+ border-color: $border_light;
14
+ border-style: solid;
15
+ border-width: 1px 0 1px 0;
16
+
17
+ &:first-child {
18
+ border-radius: 4px 0 0 0;
19
+ border-width: 1px 0 1px 1px;
20
+ }
21
+ &:last-child {
22
+ border-radius: 0 4px 0 0;
23
+ border-width: 1px 1px 1px 0;
24
+ }
25
+ }
26
+ }
27
+ }
28
+
29
+ tbody {
30
+ tr {
31
+ td {
32
+ border-color: $border_light;
33
+ border-style: solid;
34
+ border-width: 0 0 1px 0;
35
+
36
+ &:first-child {
37
+ border-width: 0 0 1px 1px;
38
+ }
39
+ &:last-child {
40
+ border-width: 0 1px 1px 0;
41
+ }
42
+ }
43
+
44
+ &:last-child {
45
+ td {
46
+ border-width: 0 0 1px 0;
47
+
48
+ &:first-child {
49
+ border-radius: 0 0 0 4px;
50
+ border-width: 0 0 1px 1px;
51
+ }
52
+ &:last-child {
53
+ border-radius: 0 0 4px 0;
54
+ border-width: 0 1px 1px 0;
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
@@ -0,0 +1,100 @@
1
+ @import "../../tokens/screen_sizes";
2
+
3
+ $table-dark-card-bg: $bg_dark;
4
+
5
+ [class^=pb_table] {
6
+ &.table-sm,
7
+ &.table-md,
8
+ &.table-lg {
9
+ &.table-dark {
10
+ thead {
11
+ tr {
12
+ border-color: $border_dark !important;
13
+
14
+ th {
15
+ border-color: $border_dark !important;
16
+ color: $text_dk_light;
17
+ }
18
+ }
19
+ }
20
+ tbody {
21
+ tr {
22
+ border-color: $border_dark;
23
+ transition: none !important;
24
+
25
+ td {
26
+ border-color: $border_dark !important;
27
+ border-bottom-width: 0 !important;
28
+ color: $white;
29
+
30
+ &:before {
31
+ color: $text_lt_light !important;
32
+ }
33
+ }
34
+ &:first-child {
35
+ td {
36
+ border-top-width: 0 !important;
37
+ }
38
+ }
39
+ }
40
+ }
41
+
42
+ &:not(.no-hover) {
43
+ tbody {
44
+ tr {
45
+ @media (hover:hover) {
46
+ &:hover {
47
+ td {
48
+ border-color: $border_dark !important;
49
+ background: $bg_dark;
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+
57
+ &.table-card {
58
+ background: $table-dark-card-bg !important;
59
+ }
60
+ }
61
+ }
62
+ }
63
+
64
+ @media only screen and (max-width: $screen-xs-max) {
65
+ [class^=pb_table] {
66
+ &.table-sm,
67
+ &.table-md,
68
+ &.table-lg {
69
+ &.table-card {
70
+ &.table-dark {
71
+ background: none !important;
72
+
73
+ tbody {
74
+ tr {
75
+ td {
76
+ background: $table-dark-card-bg !important;
77
+ }
78
+ }
79
+ }
80
+ }
81
+ }
82
+ &.table-dark {
83
+ tbody {
84
+ tr {
85
+ td {
86
+ &:first-child {
87
+ border-top-color: $border_dark !important;
88
+ }
89
+ }
90
+ &:first-child {
91
+ td {
92
+ border-top-width: 1px !important;
93
+ }
94
+ }
95
+ }
96
+ }
97
+ }
98
+ }
99
+ }
100
+ }
@@ -0,0 +1,125 @@
1
+ @import "../../tokens/border_radius";
2
+ @import "../../tokens/positioning";
3
+ @import "../../pb_caption/caption_mixin";
4
+
5
+ @media only screen and (max-width: $screen-lg-min) {
6
+ [class^=pb_table] {
7
+ &.table-sm.table-collapse-md,
8
+ &.table-md.table-collapse-md,
9
+ &.table-lg.table-collapse-md {
10
+ width: 100%;
11
+ background: none !important;
12
+
13
+ thead {
14
+ tr {
15
+ left: $offscreen;
16
+ position: absolute;
17
+ top: $offscreen;
18
+
19
+ th {
20
+ display: block;
21
+ visibility: visible;
22
+ }
23
+ }
24
+ }
25
+ tbody {
26
+ tr {
27
+ td {
28
+ display: block;
29
+ visibility: visible;
30
+ border-left-width: 1px !important;
31
+ border-right-width: 1px !important;
32
+ border-bottom-width: 0 !important;
33
+ border-color: $border_light !important;
34
+ min-height: 2.2em;
35
+ position: relative;
36
+ text-align:left;
37
+ white-space: normal;
38
+ &:before {
39
+ content: attr(data-title);
40
+ @include caption;
41
+ width: 100% !important;
42
+ white-space: nowrap !important;
43
+ text-overflow: ellipsis !important;
44
+ position: relative !important;
45
+ top: 0 !important;
46
+ left: 0 !important;
47
+ height: 100% !important;
48
+ padding-left: 0 !important;
49
+ display: block !important;
50
+ }
51
+
52
+ &:first-child {
53
+ margin-top: $space_md !important;
54
+ border-top-width: 1px !important;
55
+ border-top-color: $border_light !important;
56
+ border-radius: $border_rad_light $border_rad_light 0 0;
57
+ }
58
+
59
+ &:last-child {
60
+ border-radius: 0 0 $border_rad_light $border_rad_light;
61
+ border-bottom-width: 1px !important;
62
+ }
63
+ }
64
+
65
+ &:first-child {
66
+ td {
67
+ &:first-child {
68
+ margin-top: $space-xs !important;
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
74
+ &.table-card {
75
+ background: none !important;
76
+
77
+ tbody {
78
+ tr {
79
+ td {
80
+ background: $white !important;
81
+ border-left-width: 1px !important;
82
+ border-right-width: 1px !important;
83
+ border-top-width: 1px !important;
84
+ &:after {
85
+ height: 0;
86
+ background-color: transparent;
87
+ }
88
+
89
+ &:first-child {
90
+ border-radius: $border_rad_light $border_rad_light 0 0 !important;
91
+ }
92
+ &:last-child {
93
+ border-radius: 0 0 $border_rad_light $border_rad_light !important;
94
+ }
95
+ }
96
+ }
97
+ }
98
+ }
99
+ @media (hover:hover) {
100
+ &:hover {
101
+ tbody {
102
+ tr {
103
+ box-shadow: 0 0 0 $white !important;
104
+ }
105
+ }
106
+ }
107
+ }
108
+ // reset the first and last to normalize
109
+ @each $name, $value in $cell-pad-list {
110
+ &.#{$name} {
111
+ tbody {
112
+ tr {
113
+ td {
114
+ &:first-child,
115
+ &:last-child {
116
+ padding: $value $cell-gutter !important;
117
+ }
118
+ }
119
+ }
120
+ }
121
+ }
122
+ }
123
+ }
124
+ }
125
+ }