playbook_ui 14.13.0.pre.rc.3 → 14.13.0.pre.rc.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d64d67618bafa499af5ac3ee3449510e503efd7420c8e01b2acdfcacecda5e6
4
- data.tar.gz: 3c403bf46ca43672f668681d0860bd4f98ca41a56dfe9ad1144f765f9df2e7b9
3
+ metadata.gz: 510e6e5a3c04b41a8eb59a938d67af48bb1ffc0745516a176b25d1556f833ee7
4
+ data.tar.gz: 0b2227ca2daf749b6bcff336b3a009f7d5f2aecb7280c3fc6ce36e9336d37c80
5
5
  SHA512:
6
- metadata.gz: 60b6253119d429777fa4ef6a2b9c511beead4f67a6ab6cb64b8548fbf6219f69025a302fdf9268382092b5cd324e8fe02ee298c6133b43b13de32188fc64b15c
7
- data.tar.gz: 6bf5e3ded826dbe15bc6ddf770105ac7a37314ac5caef84ee01f6bc4cd1bdbb1fdf1a5d9020307dc01013e13cc1fcb1caa80f1ecaf7d8dfc0d80a1ba579f4ae2
6
+ metadata.gz: 83e0f4f06a29fee219e7d09d64ff1f5607e0e6a561acc486ce9058e64474c1bc2dbe904e40045c94bd1442fe7dc10162c26fe272d9220d8663c3dadc371de20e
7
+ data.tar.gz: 684025bff16fd11aaaa0a632e44e7cf867183b64af7bdcac4ea4f35f5376f63cfbaa458a5ae6e552525fe79e972e6db7d562d3aa3986a3c2ad7a154e03e45801
@@ -89,7 +89,6 @@
89
89
  }
90
90
  }
91
91
 
92
-
93
92
  .table-header-cells-active:first-child {
94
93
  color: $primary !important;
95
94
  }
@@ -179,7 +178,7 @@
179
178
  }
180
179
 
181
180
  // Responsive Styles
182
- @media only screen and (max-width: $screen-xl-min) {
181
+ @media only screen and (max-width: $screen-xl-min) {
183
182
  &[class*="advanced-table-responsive-scroll"] {
184
183
  border-radius: 4px;
185
184
  box-shadow: 1px 0 0 0px $border_light,
@@ -215,7 +214,7 @@
215
214
  .bg-white td:first-child {
216
215
  background-color: $white;
217
216
  }
218
-
217
+
219
218
  }
220
219
  }
221
220
  @media only screen and (min-width: $screen-xl-min) {
@@ -306,4 +305,4 @@
306
305
  }
307
306
  }
308
307
  }
309
- }
308
+ }
@@ -133,15 +133,18 @@ export default class PbAdvancedTable extends PbEnhancedElement {
133
133
  if (!elements.length) return;
134
134
 
135
135
  const isVisible = elements[0].classList.contains("is-visible");
136
- if (isVisible) {
137
- this.hideElement(elements);
138
- this.displayDownArrow();
139
- } else {
140
- this.showElement(elements);
141
- this.displayUpArrow();
136
+
137
+ isVisible ? this.hideElement(elements) : this.showElement(elements);
138
+ isVisible ? this.displayDownArrow() : this.displayUpArrow();
139
+
140
+ const row = this.element.closest("tr");
141
+ if (row) {
142
+ row.classList.toggle("bg-silver", !isVisible);
143
+ row.classList.toggle("bg-white", isVisible);
142
144
  }
143
145
  }
144
146
 
147
+
145
148
  displayDownArrow() {
146
149
  this.element.querySelector(DOWN_ARROW_SELECTOR).style.display =
147
150
  "inline-block";
@@ -14,10 +14,13 @@
14
14
  <div style="padding-left: <%= depth * 1.25 %>em">
15
15
  <%= pb_rails("flex", props:{align: "center", column_gap: "xs"}) do %>
16
16
  <% if index.zero? && object.row[:children].present? %>
17
- <button id="<%= "#{object.id}_#{object.row.object_id}" %>" class="gray-icon expand-toggle-icon" data-advanced-table="true" >
18
- <%= pb_rails("icon", props: { id: "advanced-table_open_icon", icon: "circle-play", cursor: "pointer" }) %>
19
- <%= pb_rails("icon", props: { id: "advanced-table_close_icon", display: "none", icon: "circle-play", cursor: "pointer", rotation: 90 }) %>
20
- </button>
17
+ <button
18
+ id="<%= "#{object.id}_#{object.row.object_id}" %>"
19
+ class="gray-icon expand-toggle-icon"
20
+ data-advanced-table="true">
21
+ <%= pb_rails("icon", props: { id: "advanced-table_open_icon", icon: "circle-play", cursor: "pointer" }) %>
22
+ <%= pb_rails("icon", props: { id: "advanced-table_close_icon", display: "none", icon: "circle-play", cursor: "pointer", rotation: 90 }) %>
23
+ </button>
21
24
  <% end %>
22
25
  <%= pb_rails("flex/flex_item", props:{padding_left: index.zero? && object.row[:children].present? ? "none" : "xs"}) do %>
23
26
  <% if column[:custom_renderer].present? %>
@@ -42,4 +45,4 @@
42
45
  <% end %>
43
46
  <% end %>
44
47
  <% end %>
45
- <% end %>
48
+ <% end %>
@@ -65,7 +65,7 @@ module Playbook
65
65
  end
66
66
 
67
67
  def tag
68
- link ? "a" : "button"
68
+ link && !disabled ? "a" : "button"
69
69
  end
70
70
 
71
71
  def valid_emoji(icon)
@@ -14,6 +14,7 @@ type PbDateProps = {
14
14
  alignment?: "left" | "center" | "right";
15
15
  aria?: { [key: string]: string };
16
16
  className?: string;
17
+ dark?: boolean;
17
18
  data?: { [key: string]: string };
18
19
  htmlOptions?: { [key: string]: string | number | boolean | (() => void) };
19
20
  id?: string;
@@ -29,6 +30,7 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
29
30
  aria = {},
30
31
  alignment = "left",
31
32
  className,
33
+ dark = false,
32
34
  data = {},
33
35
  htmlOptions = {},
34
36
  id,
@@ -56,7 +58,7 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
56
58
  );
57
59
 
58
60
  return (
59
- <div
61
+ <div
60
62
  {...ariaProps}
61
63
  {...dataProps}
62
64
  {...htmlProps}
@@ -93,7 +95,9 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
93
95
  </>
94
96
  : size == "md" || size == "lg"
95
97
  ? (
96
- <Title size={4}
98
+ <Title
99
+ dark={dark}
100
+ size={4}
97
101
  tag="h4"
98
102
  >
99
103
  {showIcon && (
@@ -127,6 +131,7 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
127
131
  <>
128
132
  {showIcon && (
129
133
  <Caption className="pb_icon_kit_container"
134
+ dark={dark}
130
135
  tag="span"
131
136
  >
132
137
  <Icon fixedWidth
@@ -138,15 +143,20 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
138
143
 
139
144
  {showDayOfWeek && (
140
145
  <>
141
- <Caption tag="div">{weekday}</Caption>
146
+ <Caption dark={dark}
147
+ tag="div">
148
+ {weekday}
149
+ </Caption>
142
150
  <Caption color="light"
151
+ dark={dark}
143
152
  tag="div"
144
153
  text=" • "
145
154
  />
146
155
  </>
147
156
  )}
148
157
 
149
- <Caption tag="span">
158
+ <Caption dark={dark}
159
+ tag="span">
150
160
  {month} {day}
151
161
  {currentYear != year && <>{`, ${year}`}</>}
152
162
  </Caption>
@@ -18,7 +18,7 @@ const DateDefault = (props) => {
18
18
  value={"2012-08-03"}
19
19
  {...props}
20
20
  />
21
- <Caption>{"(Hyphenated Date)"}</Caption>
21
+ <Caption {...props}>{"(Hyphenated Date)"}</Caption>
22
22
  </div>
23
23
 
24
24
  <br />
@@ -56,6 +56,7 @@ const DateDefault = (props) => {
56
56
  <Title
57
57
  size={4}
58
58
  text={"(Hyphenated Date)"}
59
+ {...props}
59
60
  />
60
61
  </div>
61
62
 
@@ -4,7 +4,8 @@ import { Caption, Date as FormattedDate, Title } from 'playbook-ui'
4
4
  const DateUnstyled = (props) => {
5
5
  return (
6
6
  <>
7
- <Caption size="xs"
7
+ <Caption {...props}
8
+ size="xs"
8
9
  text="Basic unstyled example"
9
10
  />
10
11
  <FormattedDate
@@ -15,10 +16,14 @@ const DateUnstyled = (props) => {
15
16
 
16
17
  <br />
17
18
 
18
- <Caption size="xs"
19
+ <Caption {...props}
20
+
21
+ size="xs"
19
22
  text="Example with wrapping typography kit"
20
23
  />
21
- <Title size={1}>
24
+ <Title {...props}
25
+ size={1}
26
+ >
22
27
  <FormattedDate
23
28
  unstyled
24
29
  value={new Date('25 Dec 1995')}
@@ -28,10 +33,13 @@ const DateUnstyled = (props) => {
28
33
 
29
34
  <br />
30
35
 
31
- <Caption size="xs"
36
+ <Caption {...props}
37
+ size="xs"
32
38
  text="Example with icon + subcaption"
33
39
  />
34
- <Caption size="xs">
40
+ <Caption {...props}
41
+ size="xs"
42
+ >
35
43
  <FormattedDate
36
44
  showDayOfWeek
37
45
  showIcon