playbook_ui 13.1.0 → 13.2.0.pre.alpha.PLAY986dateTimeRounding1150

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.tsx +1 -1
  3. data/app/pb_kits/playbook/pb_kit/dateTime.ts +54 -23
  4. data/app/pb_kits/playbook/pb_nav/_bold_mixin.scss +16 -14
  5. data/app/pb_kits/playbook/pb_nav/_collapsible_nav.scss +86 -115
  6. data/app/pb_kits/playbook/pb_nav/_collapsible_trail_mixin.scss +16 -0
  7. data/app/pb_kits/playbook/pb_nav/_horizontal_nav.scss +58 -58
  8. data/app/pb_kits/playbook/pb_nav/_item.tsx +242 -138
  9. data/app/pb_kits/playbook/pb_nav/_nav.scss +38 -0
  10. data/app/pb_kits/playbook/pb_nav/_nav.tsx +17 -1
  11. data/app/pb_kits/playbook/pb_nav/_subtle_mixin.scss +9 -11
  12. data/app/pb_kits/playbook/pb_nav/_vertical_nav.scss +50 -59
  13. data/app/pb_kits/playbook/pb_nav/docs/_block_no_title_nav.jsx +1 -1
  14. data/app/pb_kits/playbook/pb_nav/docs/_borderless_nav.jsx +4 -1
  15. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.html.erb +4 -4
  16. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.jsx +4 -10
  17. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.md +1 -1
  18. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_custom.jsx +6 -1
  19. data/app/pb_kits/playbook/pb_nav/docs/{_collapsible_nav_emphasize.jsx → _collapsible_nav_item_spacing.jsx} +18 -17
  20. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_item_spacing.md +1 -0
  21. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_with_all_options.html.erb +23 -0
  22. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_with_all_options.jsx +55 -0
  23. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_with_all_options.md +4 -0
  24. data/app/pb_kits/playbook/pb_nav/docs/_nav_with_font_control.html.erb +6 -0
  25. data/app/pb_kits/playbook/pb_nav/docs/_nav_with_font_control.jsx +46 -0
  26. data/app/pb_kits/playbook/pb_nav/docs/_nav_with_font_control.md +4 -0
  27. data/app/pb_kits/playbook/pb_nav/docs/_nav_with_spacing_control.html.erb +6 -0
  28. data/app/pb_kits/playbook/pb_nav/docs/_nav_with_spacing_control.jsx +47 -0
  29. data/app/pb_kits/playbook/pb_nav/docs/_nav_with_spacing_control.md +1 -0
  30. data/app/pb_kits/playbook/pb_nav/docs/_no_highlight_nav.jsx +4 -1
  31. data/app/pb_kits/playbook/pb_nav/docs/_subtle_nav.jsx +4 -1
  32. data/app/pb_kits/playbook/pb_nav/docs/_subtle_with_icons_nav.jsx +4 -1
  33. data/app/pb_kits/playbook/pb_nav/docs/example.yml +10 -5
  34. data/app/pb_kits/playbook/pb_nav/docs/index.js +4 -1
  35. data/app/pb_kits/playbook/pb_nav/item.html.erb +19 -12
  36. data/app/pb_kits/playbook/pb_nav/item.rb +55 -14
  37. data/app/pb_kits/playbook/pb_nav/nav.html.erb +3 -1
  38. data/app/pb_kits/playbook/pb_nav/navTypes.ts +25 -0
  39. data/app/pb_kits/playbook/pb_select/docs/_select_multiple.md +1 -1
  40. data/dist/playbook-rails.js +5 -5
  41. data/lib/playbook/version.rb +2 -2
  42. metadata +20 -11
  43. data/app/pb_kits/playbook/pb_nav/_mixins.scss +0 -5
  44. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_emphasize.html.erb +0 -23
  45. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_emphasize.md +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ebfbb350f5457ca825d0c7991f1e2fff2dd63e1a925523715b154af8f9b3b233
4
- data.tar.gz: 96c352b2239aa01b2b30446b23520322494ca2d72cd62c456b6835f9f1a6656e
3
+ metadata.gz: 29507bd994a736c71238be60bea9b2b269b5f1a40ebabac51280e93f20d493b2
4
+ data.tar.gz: fb81b0db3f2615422f9d827859951373dd50d34b5a94aa06f9bc42324d7942a5
5
5
  SHA512:
6
- metadata.gz: 681a3e6dc4fd90450765d3fd35d34b7dd08b67c67ae79f529b6f18498a8fe986b73360cb06c310eac254307139a2405b51b67d7488ed5983a8cc3daf0130c26f
7
- data.tar.gz: af4a5c732a179ca234c04c2dad6835fb3201687233cc49353f0e73f1cf49ddc408b5570b9846d297d109c2a012b62534ba8f669dba5c6a5f006aeaa5f80a7c44
6
+ metadata.gz: ed2c60ef1307bb8c3ba61cb9d8983a219c6e82568e86ec9e8608ae7efe057094f6307da32f77c4ad5a08d11f9fd5ee5f2b568c1502d3426d2a82416795c846ff
7
+ data.tar.gz: e96648e381e82365ec5b439cdc3166f08c6c33e7cfc71d42a79415f46a5e3c1f696ccda273952633e858c7802a6746ff45a009ac164e5211ab8af18f7646805d
@@ -104,7 +104,7 @@ const CollapsibleMain = ({
104
104
  }
105
105
 
106
106
  return (
107
- <div className={classnames(mainCSS, className, mainSpacing)}>
107
+ <div className={classnames(mainCSS, mainSpacing, className)}>
108
108
  <div onClick={handleCollapsibleClick}>
109
109
  <Flex
110
110
  spacing="between"
@@ -121,30 +121,61 @@ export const toIso = (newDate: Date | string): string => {
121
121
  }
122
122
 
123
123
  export const fromNow = (newDate: Date | string): string => {
124
- const startDate = formatDate(newDate).getTime()
125
- const endDate = new Date().getTime()
124
+ const today = new Date()
125
+ const formattedDate = formatDate(newDate)
126
+
127
+ const startDate = formattedDate.getTime()
128
+ const endDate = today.getTime()
126
129
  const elapsedTime = endDate - startDate
127
- let elapsedTimeString = `${Math.round(elapsedTime / (365.25 * 24 * 60 * 60 * 1000))} years ago`; // 730+ days
128
-
129
- const MILLISECONDS_IN_A_MONTH = 30.44 * 24 * 60 * 60 * 1000
130
-
131
- const elapsedTimeData = [
132
- { min: 0, max: 44999, value: "a few seconds ago" }, // 0-44 seconds
133
- { min: 45000, max: 89999, value: "a minute ago" }, // 45-89 seconds
134
- { min: 90000, max: 2649999, value: `${Math.round(elapsedTime / 60000)} minutes ago`}, // 90s-44 minutes
135
- { min: 2650000, max: 7299999, value: "an hour ago" }, // 45-120 minutes
136
- { min: 7300000, max: 75699999, value: `${Math.round(elapsedTime / 3600000)} hours ago`}, // 2-21 hours
137
- { min: 75700000, max: 172899999, value: "a day ago" }, // 22-48 hours
138
- { min: 172900000, max: 2169999999, value: `${Math.round(elapsedTime / 86400000)} days ago`}, // 2-25 days
139
- { min: 2170000000, max: 5184999999, value: "a month ago"}, // 26-60 days
140
- { min: 5185000000, max: 27561699999, value: `${Math.round(elapsedTime / MILLISECONDS_IN_A_MONTH)} months ago`}, // 60-319 days
141
- { min: 27561700000, max: 63072999999, value: "a year ago"}, // 320-730 days
142
- ];
143
-
144
- for (const timeDate of elapsedTimeData) {
145
- if (elapsedTime >= timeDate.min && elapsedTime <= timeDate.max) {
146
- elapsedTimeString = timeDate.value;
147
- break;
130
+
131
+ // For years/months, don't use elapsedTime due to rounding
132
+ const differenceInYears = today.getFullYear() - formattedDate.getFullYear()
133
+ const differenceInMonths = () => {
134
+ let months = differenceInYears * 12
135
+ months -= formattedDate.getMonth()
136
+ months += today.getMonth()
137
+ return months
138
+ }
139
+
140
+ const FOURTY_FIVE_SECONDS = 45000
141
+ const NINETY_SECONDS = 90000
142
+
143
+ const FOURTY_FIVE_MINUTES = 2670000
144
+ const NINETY_MINUTES = 5400000
145
+
146
+ const TWENTY_TWO_HOURS = 77400000
147
+ const THIRTY_SIX_HOURS = 129600000
148
+
149
+ const TWENTY_SIX_DAYS = 2203200000
150
+ const FOURTY_FIVE_DAYS = 3888000000
151
+
152
+ const TEN_AND_A_HALF_MONTHS = 27560000000
153
+
154
+ const MILLISECONDS_IN_A_MINUTE = 60000
155
+ const MILLISECONDS_IN_A_HOUR = 3600000
156
+ const MILLISECONDS_IN_A_DAY = 86400000
157
+
158
+ let elapsedTimeString = differenceInYears === 1 ? `${differenceInYears} year ago` : `${differenceInYears} years ago` // 320 days to 1+ year: "x year(s) ago"
159
+
160
+ // Inspiration: https://momentjs.com/docs/#/displaying/fromnow/
161
+ const intervals = [
162
+ { min: 0, max: FOURTY_FIVE_SECONDS, value: "a few seconds ago" }, // 0-44.99 seconds
163
+ { min: FOURTY_FIVE_SECONDS, max: NINETY_SECONDS, value: "a minute ago" }, // 45-89.99 seconds
164
+ { min: NINETY_SECONDS, max: FOURTY_FIVE_MINUTES, value: `${Math.round(elapsedTime / MILLISECONDS_IN_A_MINUTE)} minutes ago` }, // 90s-44.49 minutes: "2 minutes ago ... 44 minutes ago"
165
+ { min: FOURTY_FIVE_MINUTES, max: NINETY_MINUTES, value: "an hour ago" }, // 44.5-89.99 minutes
166
+ { min: NINETY_MINUTES, max: TWENTY_TWO_HOURS, value: `${Math.round(elapsedTime / MILLISECONDS_IN_A_HOUR)} hours ago` }, // 90m-21.49 hours: "2 hours ago ... 21 hours ago"
167
+ { min: TWENTY_TWO_HOURS, max: THIRTY_SIX_HOURS, value: "a day ago" }, // 21.5-35.99 hours
168
+ { min: THIRTY_SIX_HOURS, max: TWENTY_SIX_DAYS, value: `${Math.round(elapsedTime / MILLISECONDS_IN_A_DAY)} days ago` }, // 36h-25.49 days: "2 days ago ... 25 days ago"
169
+ { min: TWENTY_SIX_DAYS, max: FOURTY_FIVE_DAYS, value: "a month ago" }, // 25.5-44.99 days
170
+ { min: FOURTY_FIVE_DAYS, max: TEN_AND_A_HALF_MONTHS, value: `${differenceInMonths()} months ago` }, // 45 days to 319 days: "2 months ago ... 10 months ago"
171
+ ]
172
+
173
+ for (const interval of intervals) {
174
+ const { min, max, value } = interval
175
+
176
+ if (elapsedTime >= min && elapsedTime < max) {
177
+ elapsedTimeString = value
178
+ break
148
179
  }
149
180
  }
150
181
 
@@ -1,22 +1,24 @@
1
1
  @mixin bold {
2
2
  @include subtle;
3
3
 
4
- [class*=pb_nav_list_kit_item] {
5
- &[class*=_active] [class*=_link] {
6
- background-color: $primary;
7
- color: $white;
8
- box-shadow: $shadow_deep;
9
- @media (hover:hover) {
10
- &:hover {
11
- background-color: darken($primary, 4%);
12
- [class*=_text],[class*=_icon] {
13
- color: $white;
4
+ [class*=pb_nav_list_kit_item][class*=pb_nav_list_item]{
5
+ &[class*=_link] {
6
+ &[class*=_active] {
7
+ background-color: $primary;
8
+ color: $white;
9
+ box-shadow: $shadow_deep;
10
+ @media (hover:hover) {
11
+ &:hover {
12
+ background-color: darken($primary, 4%);
13
+ [class*=_text],[class*=_icon] {
14
+ color: $white;
15
+ }
14
16
  }
15
17
  }
18
+ [class*=_text],[class*=_icon] {
19
+ font-weight: $bolder;
20
+ }
16
21
  }
17
- [class*=_text],[class*=_icon] {
18
- font-weight: $bolder;
19
- }
20
- }
22
+ }
21
23
  }
22
24
  }
@@ -3,74 +3,43 @@
3
3
  @import "../tokens/border_radius";
4
4
  @import "../tokens/titles";
5
5
  @import "../tokens/typography";
6
- @import "./mixins";
6
+ @import "./collapsible_trail_mixin";
7
7
 
8
- [class^="pb_nav_list"] {
9
- .font_size_small {
10
- .pb_nav_list_item_text,
11
- .pb_nav_list_item_text_collapsible {
12
- font-size: $font_small !important;
13
- }
14
- }
15
-
16
- .font_bolder {
17
- .pb_nav_list_item_text {
18
- @include pb_title_4;
19
- }
20
- .pb_collapsible_main_kit {
21
- .pb_nav_list_item_text_collapsible {
22
- @include pb_title_4;
23
- font-weight: $bolder !important;
24
- }
25
- }
26
- }
27
-
28
- .font_bold {
29
- .pb_nav_list_item_text {
30
- font-weight: $bold;
31
- }
32
- .pb_collapsible_main_kit {
33
- .pb_nav_list_item_text_collapsible {
34
- font-weight: $bold !important;
35
- }
36
- }
37
- }
38
-
39
- .font_regular {
40
- .pb_nav_list_item_text {
41
- font-weight: $regular;
42
- }
43
- .pb_collapsible_main_kit {
44
- .pb_nav_list_item_text_collapsible {
45
- font-weight: $regular !important;
46
- }
47
- }
8
+ [class^="pb_nav_list"][class*="_vertical"] {
9
+ .pb_collapsible_main_kit,
10
+ .pb_collapsible_content_kit,
11
+ .pb_collapsible_kit {
12
+ padding: 0 !important;
48
13
  }
49
14
 
50
15
  //styling for default variant with collapsible
51
16
  &[class*="_normal"] {
52
- [class*="pb_collapsible_nav_item"] {
17
+ .pb_collapsible_kit {
18
+ &[class*="_active"] {
19
+ background-color: unset;
20
+ }
21
+ &[class*="_collapsible_trail"] {
22
+ .pb_collapsible_content_kit {
23
+ &::after {
24
+ left: 0px !important;
25
+ }
26
+ }
27
+ }
53
28
  .pb_collapsible_content_kit {
54
29
  margin-left: $space_lg + 3;
55
30
  }
56
31
  .pb_collapsible_main_kit {
57
32
  border-radius: unset;
33
+ margin: 0;
58
34
  }
59
35
  &[class*="_active"] {
60
36
  .pb_collapsible_main_kit {
61
37
  background-color: $active_light;
62
38
  }
63
- .pb_nav_list_item_link {
64
- border-color: transparent !important;
65
- .pb_nav_list_item_text {
66
- color: unset !important;
67
- font-weight: $regular !important;
68
- }
69
- }
70
39
  }
71
-
72
- &.dark {
73
- border-color: $border_dark;
40
+ }
41
+ &.dark {
42
+ .pb_collapsible_kit {
74
43
  .pb_collapsible_main_kit:hover {
75
44
  .pb_nav_list_item_text_collapsible {
76
45
  color: $white !important;
@@ -91,16 +60,17 @@
91
60
 
92
61
  //styling bold variant to work with collapsible
93
62
  &[class*="_bold"] {
94
- [class*="pb_collapsible_nav_item"] {
63
+ .pb_collapsible_kit {
95
64
  &[class*="_active"] {
65
+ background-color: unset;
96
66
  .pb_collapsible_main_kit {
97
- background-color: $primary !important;
67
+ background-color: $primary;
98
68
  border-radius: $border_rad_heavier;
99
69
  .pb_nav_list_item_text_collapsible,
100
70
  .pb_nav_list_item_icon_collapsible,
101
71
  .icon_wrapper,
102
72
  .pb_icon_kit {
103
- color: $white !important;
73
+ color: $white;
104
74
  }
105
75
  }
106
76
  .pb_nav_list_item_link {
@@ -109,11 +79,28 @@
109
79
  &:hover {
110
80
  background-color: rgba($primary, 0.03) !important;
111
81
  .pb_nav_list_item_text {
112
- color: $primary !important;
82
+ color: $primary;
113
83
  }
114
84
  }
115
85
  .pb_nav_list_item_text {
116
- font-weight: $regular !important;
86
+ font-weight: $regular;
87
+ }
88
+ }
89
+ .icon_wrapper:hover {
90
+ background-color: mix($primary, $card_light, 40%);
91
+ }
92
+ }
93
+ }
94
+ &.dark {
95
+ .pb_collapsible_kit {
96
+ &[class*="_active"] {
97
+ .pb_collapsible_main_kit {
98
+ background-color: $primary;
99
+ }
100
+ .pb_nav_list_item_link {
101
+ &:hover {
102
+ background-color: rgba($white, $opacity_1) !important;
103
+ }
117
104
  }
118
105
  }
119
106
  }
@@ -122,33 +109,30 @@
122
109
 
123
110
  //styling for subtle variant with collapsible
124
111
  &[class*="_subtle"] {
125
- [class*="pb_collapsible_nav_item"] {
112
+ .pb_collapsible_kit {
126
113
  &[class*="_active"] {
114
+ background-color: unset;
127
115
  .pb_collapsible_main_kit {
128
- background-color: $primary !important;
116
+ background-color: $active_light;
129
117
  border-radius: $border_rad_heavier;
130
118
  .pb_nav_list_item_text_collapsible,
131
- .pb_nav_list_item_icon_collapsible,
132
- .icon_wrapper,
133
- .pb_icon_kit {
134
- color: $white !important;
119
+ .pb_nav_list_item_icon_collapsible {
120
+ color: $primary;
135
121
  }
136
122
  }
137
-
138
123
  &:hover {
139
124
  background-color: unset;
140
125
  }
141
- .pb_collapsible_main_kit:hover {
142
- .pb_nav_list_item_text_collapsible {
143
- color: $white !important;
144
- }
145
- }
146
-
147
- .icon_wrapper {
148
- &:hover {
149
- background-color: mix($primary, $card_light, 40%);
150
- .pb_icon_kit {
151
- color: $primary !important;
126
+ }
127
+ }
128
+ &.dark {
129
+ .pb_collapsible_kit {
130
+ &[class*="_active"] {
131
+ .pb_collapsible_main_kit {
132
+ background-color: mix($white, $card_dark, 20%) !important;
133
+ .pb_nav_list_item_text_collapsible,
134
+ svg {
135
+ color: $white !important;
152
136
  }
153
137
  }
154
138
  }
@@ -156,16 +140,20 @@
156
140
  }
157
141
  }
158
142
 
159
- [class*="pb_collapsible_nav_item"] {
160
- .pb_nav_list_kit_item {
161
- margin-right: 0px !important;
143
+ .pb_collapsible_kit {
144
+ [class*="pb_collapsible_nav_item"][class*="pb_nav_list_item_link_collapsible"][class*="pb_nav_list_kit_item"] {
145
+ margin: 0px;
146
+ &[class*="_active"] {
147
+ background-color: unset;
148
+ box-shadow: unset;
149
+ .pb_nav_list_item_text_collapsible {
150
+ color: unset;
151
+ }
152
+ }
162
153
  }
163
154
 
164
- &[class*="_active"] {
165
- background-color: unset !important;
166
- .pb_nav_list_item_link {
167
- color: unset !important;
168
- }
155
+ &[class*="_collapsible_trail"] {
156
+ @include collapsible_trail_class;
169
157
  }
170
158
 
171
159
  .pb_nav_list_item_link_collapsible {
@@ -175,6 +163,7 @@
175
163
  }
176
164
 
177
165
  .pb_collapsible_main_kit {
166
+ margin: $space_xs ($space_sm - 2px);
178
167
  &:focus-visible {
179
168
  box-shadow: 0px 0px 0px 2px $primary_action;
180
169
  border-radius: $border_rad_heavier;
@@ -194,10 +183,9 @@
194
183
  }
195
184
  }
196
185
 
197
- // vertical line on left of collapsible content
186
+ // indention on left of collapsible content
198
187
  .pb_collapsible_content_kit {
199
- margin-left: $space_sm + 2;
200
- border-left: 1px solid transparent;
188
+ margin-left: $space_lg - 2;
201
189
  }
202
190
 
203
191
  .pb_collapsible_main_kit {
@@ -209,21 +197,11 @@
209
197
  background-color: mix($primary, $card_light, 10%);
210
198
  .pb_nav_list_item_text_collapsible,
211
199
  svg {
212
- color: $primary !important;
200
+ color: $primary;
213
201
  }
214
202
  }
215
203
  }
216
204
 
217
- .pb_collapsible_main_kit,
218
- .pb_collapsible_content_kit,
219
- .pb_collapsible_kit {
220
- padding: 0 !important;
221
- }
222
-
223
- &[class*="_collapsible_trail"] {
224
- @include collapsible_trail_class;
225
- }
226
-
227
205
  .icon_wrapper {
228
206
  border-radius: $border_radius_rounded;
229
207
  width: $space_sm + 3;
@@ -236,22 +214,18 @@
236
214
  background-color: mix($primary, $card_light, 40%);
237
215
  }
238
216
  }
239
-
240
- &.dark {
241
- .pb_nav_list_kit_item {
242
- border-color: $border_dark;
243
- .pb_nav_list_item_text {
244
- color: $text_dk_light !important;
245
- }
246
- }
217
+ }
218
+ &.dark {
219
+ .pb_collapsible_kit {
247
220
  &[class*="pb_nav_list_kit_item"] [class*="_link"]:hover {
248
221
  .pb_nav_list_item_text {
249
222
  color: $white !important;
250
223
  }
251
224
  }
252
-
253
- .pb_nav_list_item_text_collapsible {
254
- color: $white !important;
225
+ [class*="pb_collapsible_nav_item"][class*="pb_nav_list_item_link_collapsible"][class*="pb_nav_list_kit_item"] {
226
+ .pb_nav_list_item_text_collapsible {
227
+ color: $white !important;
228
+ }
255
229
  }
256
230
  .pb_nav_list_item_text {
257
231
  color: $text_dk_light;
@@ -274,15 +248,12 @@
274
248
  .icon_wrapper:hover {
275
249
  background-color: mix($white, $card_dark, 40%);
276
250
  }
277
- &[class*="_active"] {
278
- .icon_wrapper:hover {
279
- background-color: mix($primary, $card_light, 40%);
280
- }
281
- }
282
251
 
283
- &[class*="pb_collapsible_nav_item"][class*="_collapsible_trail"] {
252
+ &[class*="_collapsible_trail"] {
284
253
  .pb_collapsible_content_kit {
285
- border-color: $border_dark;
254
+ &::after {
255
+ background-color: $border_dark;
256
+ }
286
257
  }
287
258
  }
288
259
  }
@@ -0,0 +1,16 @@
1
+ @import "../tokens/spacing";
2
+
3
+ @mixin collapsible_trail_class {
4
+ .pb_collapsible_content_kit {
5
+ position: relative;
6
+ &::after {
7
+ content: "";
8
+ position: absolute;
9
+ top: $space_xxs;
10
+ bottom: $space_xxs;
11
+ left: $space_xxs + 1;
12
+ width: $space_xxs - 3;
13
+ background-color: $border_light;
14
+ }
15
+ }
16
+ }
@@ -8,8 +8,8 @@
8
8
 
9
9
  $selector: ".pb_nav_list";
10
10
 
11
- [class^=pb_nav_list][class*=_horizontal] {
12
- ul {
11
+ [class^="pb_nav_list"][class*="_horizontal"] {
12
+ .pb_nav_wrapper {
13
13
  display: flex;
14
14
  align-items: center;
15
15
  padding: 0;
@@ -17,13 +17,13 @@ $selector: ".pb_nav_list";
17
17
  list-style: none;
18
18
  }
19
19
 
20
- [class*=pb_nav_list_kit_item] {
20
+ [class*="pb_nav_list_kit_item"][class*="pb_nav_list_item"] {
21
21
  transition-property: border-color;
22
22
  transition-duration: 0.15s;
23
23
  transition-timing-function: $bezier;
24
24
  padding: 0;
25
25
 
26
- [class*=_link] {
26
+ &[class*="_link"] {
27
27
  text-decoration: none;
28
28
  display: flex;
29
29
  align-items: center;
@@ -36,19 +36,18 @@ $selector: ".pb_nav_list";
36
36
  transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
37
37
  color: $text_lt_default;
38
38
 
39
- [class*=_icon_left] {
39
+ [class*="_icon_left"] {
40
40
  font-size: $font_large;
41
41
  margin-right: $space_sm;
42
42
  color: $text_lt_lighter;
43
43
  }
44
44
 
45
- [class*=_text] {
46
- font-size: $font_base;
47
- font-weight: $bold;
45
+ [class*="_text"] {
48
46
  color: $text_lt_default;
47
+ font-weight: $bold;
49
48
  }
50
49
 
51
- @media (hover:hover) {
50
+ @media (hover: hover) {
52
51
  &:hover {
53
52
  color: $primary;
54
53
  #{$selector}_item_icon,
@@ -57,84 +56,85 @@ $selector: ".pb_nav_list";
57
56
  }
58
57
  }
59
58
  }
60
- }
61
- }
62
-
63
- [class*=_active] {
64
- #{$selector}_item_link {
65
- border-color: $primary;
66
-
67
- [class*=_item_icon] {
68
- color: $text_lt_default;
69
- }
70
-
71
- [class*=_item_text] {
72
- color: $text_lt_default;
73
- font-weight: $bold;
59
+ &[class*="_active"] {
60
+ border-color: $primary;
61
+ [class*="_item_icon"] {
62
+ color: $text_lt_default;
63
+ }
64
+ [class*="_item_text"] {
65
+ color: $text_lt_default;
66
+ font-weight: $bold;
67
+ }
68
+ &:hover {
69
+ #{$selector}_item_icon,
70
+ #{$selector}_item_text {
71
+ color: $primary;
72
+ }
73
+ }
74
74
  }
75
75
  }
76
76
  }
77
77
 
78
78
  // Subtle Variant
79
- &[class*=_subtle] {
79
+ &[class*="_subtle"] {
80
80
  @include subtle;
81
81
  // Horizontal Overrides
82
- [class*=pb_nav_list_kit_item] {
82
+ [class*="pb_nav_list_kit_item"][class*="pb_nav_list_item"] {
83
83
  margin: 0;
84
- [class*=_item_text]{
85
- font-weight: $regular;
86
- }
87
- }
88
- [class*=_active] {
89
- background-color: $active_light;
90
- &[class*=dark] {
91
- background-color: rgba($white, $opacity_1);
84
+ [class*="_item_text"] {
85
+ font-weight: $regular !important;
92
86
  }
93
- [class*=_item_link] {
94
- [class*=_item_text]{
95
- color: $primary;
87
+ &[class*="_active"] {
88
+ background-color: $active_light;
89
+ &[class*="dark"] {
90
+ background-color: rgba($white, $opacity_1);
91
+ [class*="_item_text"] {
92
+ color: $white !important;
93
+ }
94
+ }
95
+ [class*="_item_text"] {
96
+ color: $primary !important;
96
97
  }
97
98
  }
98
99
  }
99
100
  }
100
101
 
101
102
  // Bold Variant
102
- &[class*=_bold] {
103
+ &[class*="_bold"] {
103
104
  @include bold;
104
105
  // Horizontal Overrides
105
- [class*=pb_nav_list_kit_item] {
106
+ [class*="pb_nav_list_kit_item"][class*="pb_nav_list_item"] {
106
107
  margin: 0;
107
- [class*=_item_text]{
108
+ [class*="_item_text"] {
108
109
  font-weight: $regular;
109
110
  }
110
111
  }
111
- [class*=_active] {
112
- [class*=_text] {
113
- color: $white;
112
+ [class*="_active"] {
113
+ [class*="_text"] {
114
+ color: $white !important;
114
115
  }
115
116
  }
116
117
  }
117
118
 
118
- &[class*=dark]{
119
- [class*=pb_nav_list_kit_item]{
120
- [class*=_link]{
121
- border-color: rgba($white, $opacity_3);
122
- }
123
- &[class*=_active] [class*=_link]{
119
+ &[class*="dark"] {
120
+ [class*="pb_nav_list_kit_item"][class*="pb_nav_list_item"] {
121
+ border-color: rgba($white, $opacity_3);
122
+ &[class*="_active"] {
124
123
  border-color: $active_dark;
125
- [class*=_text],[class*=_icon]{
124
+ [class*="_text"],
125
+ [class*="_icon"] {
126
126
  color: $text_dk_default;
127
127
  }
128
128
  }
129
- [class*=_link] {
130
- [class*=_text],[class*=_icon]{
131
- color: $text_dk_lighter;
132
- }
133
- &:hover{
134
- background-color: rgba($white, $opacity_1);
135
- [class*=_icon],[class*=_text] {
136
- color: $white;
137
- }
129
+ [class*="_text"],
130
+ [class*="_icon"] {
131
+ color: $text_dk_lighter;
132
+ }
133
+ &:hover {
134
+ background-color: rgba($white, $opacity_1);
135
+ [class*="_icon"],
136
+ [class*="_text"] {
137
+ color: $white !important;
138
138
  }
139
139
  }
140
140
  }