playbook_ui 13.0.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 (56) 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_file_upload/_file_upload.scss +7 -0
  4. data/app/pb_kits/playbook/pb_file_upload/docs/_description.md +0 -7
  5. data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom.html.erb +7 -0
  6. data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom.md +1 -0
  7. data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_default.html.erb +3 -0
  8. data/app/pb_kits/playbook/pb_file_upload/docs/example.yml +2 -0
  9. data/app/pb_kits/playbook/pb_file_upload/docs/test.html +25 -0
  10. data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +17 -0
  11. data/app/pb_kits/playbook/pb_file_upload/file_upload.rb +34 -0
  12. data/app/pb_kits/playbook/pb_kit/dateTime.ts +105 -67
  13. data/app/pb_kits/playbook/pb_nav/_bold_mixin.scss +16 -14
  14. data/app/pb_kits/playbook/pb_nav/_collapsible_nav.scss +86 -115
  15. data/app/pb_kits/playbook/pb_nav/_collapsible_trail_mixin.scss +16 -0
  16. data/app/pb_kits/playbook/pb_nav/_horizontal_nav.scss +58 -58
  17. data/app/pb_kits/playbook/pb_nav/_item.tsx +242 -138
  18. data/app/pb_kits/playbook/pb_nav/_nav.scss +38 -0
  19. data/app/pb_kits/playbook/pb_nav/_nav.tsx +17 -1
  20. data/app/pb_kits/playbook/pb_nav/_subtle_mixin.scss +9 -11
  21. data/app/pb_kits/playbook/pb_nav/_vertical_nav.scss +50 -59
  22. data/app/pb_kits/playbook/pb_nav/docs/_block_no_title_nav.jsx +1 -1
  23. data/app/pb_kits/playbook/pb_nav/docs/_borderless_nav.jsx +4 -1
  24. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.html.erb +4 -4
  25. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.jsx +4 -10
  26. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.md +1 -1
  27. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_custom.jsx +6 -1
  28. data/app/pb_kits/playbook/pb_nav/docs/{_collapsible_nav_emphasize.jsx → _collapsible_nav_item_spacing.jsx} +18 -17
  29. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_item_spacing.md +1 -0
  30. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_with_all_options.html.erb +23 -0
  31. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_with_all_options.jsx +55 -0
  32. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_with_all_options.md +4 -0
  33. data/app/pb_kits/playbook/pb_nav/docs/_nav_with_font_control.html.erb +6 -0
  34. data/app/pb_kits/playbook/pb_nav/docs/_nav_with_font_control.jsx +46 -0
  35. data/app/pb_kits/playbook/pb_nav/docs/_nav_with_font_control.md +4 -0
  36. data/app/pb_kits/playbook/pb_nav/docs/_nav_with_spacing_control.html.erb +6 -0
  37. data/app/pb_kits/playbook/pb_nav/docs/_nav_with_spacing_control.jsx +47 -0
  38. data/app/pb_kits/playbook/pb_nav/docs/_nav_with_spacing_control.md +1 -0
  39. data/app/pb_kits/playbook/pb_nav/docs/_no_highlight_nav.jsx +4 -1
  40. data/app/pb_kits/playbook/pb_nav/docs/_subtle_nav.jsx +4 -1
  41. data/app/pb_kits/playbook/pb_nav/docs/_subtle_with_icons_nav.jsx +4 -1
  42. data/app/pb_kits/playbook/pb_nav/docs/example.yml +10 -5
  43. data/app/pb_kits/playbook/pb_nav/docs/index.js +4 -1
  44. data/app/pb_kits/playbook/pb_nav/item.html.erb +19 -12
  45. data/app/pb_kits/playbook/pb_nav/item.rb +55 -14
  46. data/app/pb_kits/playbook/pb_nav/nav.html.erb +3 -1
  47. data/app/pb_kits/playbook/pb_nav/navTypes.ts +25 -0
  48. data/app/pb_kits/playbook/pb_passphrase/_passphrase.scss +0 -1
  49. data/app/pb_kits/playbook/pb_select/docs/_select_multiple.md +1 -1
  50. data/app/pb_kits/playbook/pb_time/_time.tsx +1 -1
  51. data/dist/playbook-rails.js +3 -3
  52. data/lib/playbook/version.rb +2 -2
  53. metadata +26 -11
  54. data/app/pb_kits/playbook/pb_nav/_mixins.scss +0 -5
  55. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_emphasize.html.erb +0 -23
  56. 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: 68b8019423c98f0b17cb991be96ff5eaf31f5ec127a81e1079f1d30d89bf2f8a
4
- data.tar.gz: 266d1ba7ec9735ab40b632b590b448742429e780ef5635f92bd9e74b0e0fc6df
3
+ metadata.gz: 29507bd994a736c71238be60bea9b2b269b5f1a40ebabac51280e93f20d493b2
4
+ data.tar.gz: fb81b0db3f2615422f9d827859951373dd50d34b5a94aa06f9bc42324d7942a5
5
5
  SHA512:
6
- metadata.gz: b2a9a36c332c8f6cf8ced66861d01e6bccaf17d6ace709c3c1e3a180f89a145d8d4d98beecf8ba52cbdde6d41129238df73b0c364e9997ae4f225587a6d85c11
7
- data.tar.gz: 4f42ad5ca624705aa6139ebf6b698ede8350fe94dd30fafbce662a433c6a898fd16ee47d22710ca648999c4bbd4ef9457458acc44c9c35f0d22823e84276d2bd
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"
@@ -3,4 +3,11 @@
3
3
  border: 1px #ccc dashed;
4
4
  text-align: center;
5
5
  }
6
+ ::file-selector-button {
7
+ visibility: hidden;
8
+ padding: 0;
9
+ border: none;
10
+ width: 0;
11
+ }
6
12
  }
13
+
@@ -1,7 +0,0 @@
1
- This kit provides a drag and drop interface for file uploads. Currently, the kit leverages [react-dropzone](https://github.com/react-dropzone/react-dropzone).
2
-
3
- ### Props
4
-
5
- `accept: [String]` Use this prop to set the list of valid file types
6
- `customMessage: [String]` Use this prop to set a custom message, replacing the default text
7
- `onFilesAccepted: Function` The callback function, providing the list of dropped files
@@ -0,0 +1,7 @@
1
+ <%= pb_rails("file_upload", props: {id: "import_file"}) do %>
2
+ <input
3
+ id="import_file"
4
+ type="file"
5
+ name="import_file"
6
+ />
7
+ <% end %>
@@ -0,0 +1 @@
1
+ The `id` for the File Upload and the existing input you are choosing to wrap with our Kit with must match each other. This will ensure that the click on the button a.k.a, the underlying label's `for`, triggers the File Upload.
@@ -0,0 +1,3 @@
1
+ <%= pb_rails("file_upload") %>
2
+
3
+
@@ -1,6 +1,8 @@
1
1
  examples:
2
2
 
3
3
  rails:
4
+ - file_upload_default: File Upload
5
+ - file_upload_custom: Custom
4
6
 
5
7
  react:
6
8
  - file_upload_default: Default List of files to upload
@@ -0,0 +1,25 @@
1
+
2
+ <div class="pb_file_upload_kit" id="import_file">
3
+ <div class="pb_form_group_kit cursor_pointer">
4
+ <label for="import_file" class="pb_button_kit_secondary_inline_enabled">Upload File</label>
5
+ <div class="pb_text_input_kit">
6
+ <div class=" text_input_wrapper">
7
+ <input placeholder="custom-placeholder" id="import_file" type="file">
8
+ </div>
9
+ </div>
10
+ </div>
11
+ </div>
12
+
13
+ <h1>not custom</h1>
14
+
15
+ <div class="pb_file_upload_kit" id="test">
16
+ <div class="pb_form_group_kit cursor_pointer">
17
+ <label for="upload-test" class="pb_button_kit_secondary_inline_enabled">Upload File</label>
18
+ <div class="pb_text_input_kit">
19
+ <div class=" text_input_wrapper">
20
+ <input class="text_input cursor_pointer" id="upload-test" type="file" classname="cursor_pointer">
21
+ </div>
22
+ </div>
23
+ </div>
24
+ </div>
25
+
@@ -0,0 +1,17 @@
1
+ <%= content_tag("div",
2
+ aria: object.aria,
3
+ class: object.classname,
4
+ data: object.data,
5
+ id: object.id) do %>
6
+ <%= pb_rails("form_group", props: {cursor: "pointer", full_width: object.full_width}) do %>
7
+ <label for="upload-<%= object.id %>" class="pb_button_kit_secondary_inline_enabled"><%= "#{object.label}" %></label>
8
+ <%= pb_rails("text_input", props: {
9
+ type: "file",
10
+ input_options: {
11
+ id: "upload-#{object.id}",
12
+ classname: "cursor_pointer",
13
+ }.merge(object.input_options)
14
+ }) %>
15
+ <% end %>
16
+ </label>
17
+ <% end %>
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Playbook
4
+ module PbFileUpload
5
+ class FileUpload < Playbook::KitBase
6
+ prop :accept, type: Playbook::Props::String,
7
+ default: ""
8
+
9
+ prop :files, type: Playbook::Props::Array,
10
+ default: []
11
+
12
+ prop :label, type: Playbook::Props::String,
13
+ default: "Upload File"
14
+
15
+ prop :placeholder, type: Playbook::Props::String,
16
+ default: "No file"
17
+
18
+ prop :full_width, type: Playbook::Props::Boolean,
19
+ default: false
20
+
21
+ prop :input_options, type: Playbook::Props::Hash,
22
+ default: {}
23
+
24
+ def classname
25
+ file_upload_class = generate_classname("pb_file_upload_kit")
26
+ file_upload_class + full_width_class
27
+ end
28
+
29
+ def full_width_class
30
+ full_width ? " full_width" : ""
31
+ end
32
+ end
33
+ end
34
+ end
@@ -17,92 +17,97 @@ const formatDate = (newDate: Date | string) => {
17
17
 
18
18
  export const toMinute = (newDate: Date | string, timeZone?: string): string => {
19
19
  const date = formatDate(newDate)
20
+
20
21
  if (timeZone) {
21
- return date.toLocaleTimeString(undefined, { timeZone, hour: "2-digit", minute: "2-digit" }).slice(3, 5);
22
+ return date.toLocaleTimeString("en-US", { timeZone, hour: "2-digit", minute: "2-digit" }).slice(3, 5);
22
23
  } else {
23
- return date.toLocaleTimeString(undefined, { hour: "2-digit", minute: "2-digit" }).slice(3, 5);
24
+ return date.toLocaleTimeString("en-US", { hour: "2-digit", minute: "2-digit" }).slice(3, 5);
24
25
  }
25
26
  }
26
27
 
27
28
  export const toHour = (newDate: Date | string, timeZone?: string): string => {
28
29
  const date = formatDate(newDate)
30
+
29
31
  if (timeZone) {
30
- return date.toLocaleTimeString(undefined, { timeZone, hour: "numeric" }).split(' ')[0];
32
+ return date.toLocaleTimeString("en-US", { timeZone, hour: "numeric" }).split(' ')[0];
31
33
  } else {
32
- return date.toLocaleTimeString(undefined, { hour: "numeric" }).split(' ')[0];
34
+ return date.toLocaleTimeString("en-US", { hour: "numeric" }).split(' ')[0];
33
35
  }
34
36
  }
35
37
 
36
38
  export const toDay = (newDate: Date | string, timeZone?: string): number => {
37
- if (timeZone) {
38
- const date = new Date(formatDate(newDate).toLocaleString(undefined, { timeZone }));
39
- return date.getDate()
40
- } else {
41
- const date = formatDate(newDate)
42
- return date.getDate()
43
- }
39
+ if (timeZone) {
40
+ const date = new Date(formatDate(newDate).toLocaleString("en-US", { timeZone }));
41
+ return date.getDate()
42
+ } else {
43
+ const date = formatDate(newDate)
44
+ return date.getDate()
45
+ }
44
46
  }
45
47
 
46
48
  export const toDayAbbr = (newDate: Date | string): string => {
47
49
  const date = formatDate(newDate)
48
- return ABBR_DAYS[date.getUTCDay()]
50
+ return ABBR_DAYS[date.getDay()]
49
51
  }
50
52
 
51
53
  export const toWeekday = (newDate: Date | string): string => {
52
- const date = formatDate(newDate)
53
- return days[date.getUTCDay()]
54
+ const date = formatDate(newDate)
55
+ return days[date.getDay()]
54
56
  }
55
57
 
56
58
  export const toMonth = (newDate: Date | string, timeZone?: string): string => {
57
- if (timeZone) {
58
- const date = new Date(formatDate(newDate).toLocaleString(undefined, { timeZone }));
59
- return months[date.getUTCMonth()]
60
- } else {
61
- const date = formatDate(newDate)
62
- return months[date.getUTCMonth()]
63
- }
59
+ if (timeZone) {
60
+ const date = new Date(formatDate(newDate).toLocaleString("en-US", { timeZone }));
61
+ return months[date.getMonth()]
62
+ } else {
63
+ const date = formatDate(newDate)
64
+ return months[date.getMonth()]
65
+ }
64
66
  }
65
67
 
66
68
  export const toMonthNum = (newDate: Date | string): number => {
67
69
  const date = formatDate(newDate)
68
- return date.getUTCMonth() +1
70
+ return date.getMonth() + 1
69
71
  }
70
72
 
71
73
  export const toYear = (newDate: Date | string, timeZone?: string): number => {
72
- if (timeZone) {
73
- const date = new Date(newDate.toLocaleString(undefined, { timeZone }));
74
- return date.getUTCFullYear()
75
- } else {
76
- const date = new Date(newDate)
77
- return date.getUTCFullYear()
78
- }
74
+ if (timeZone) {
75
+ const date = new Date(formatDate(newDate).toLocaleString("en-US", { timeZone }));
76
+ return date.getFullYear()
77
+ } else {
78
+ const date = formatDate(newDate)
79
+ return date.getFullYear()
80
+ }
79
81
  }
80
82
 
81
83
  export const toTime = (newDate: Date | string, timeZone?: string): string => {
82
84
  const date = formatDate(newDate)
85
+
83
86
  if (timeZone) {
84
- return date.toLocaleTimeString(undefined, { timeZone, timeStyle: "short" }).split(' ')[0];
87
+ return date.toLocaleTimeString("en-US", { timeZone, timeStyle: "short" }).split(' ')[0];
85
88
  } else {
86
- return date.toLocaleTimeString(undefined, { timeStyle: "short" }).split(' ')[0];
89
+ return date.toLocaleTimeString("en-US", { timeStyle: "short" }).split(' ')[0];
87
90
  }
88
91
  }
89
92
 
90
93
  export const toMeridiem = (newDate: Date | string, timeZone?: string): string => {
91
- const date = formatDate(newDate)
92
- if (timeZone) {
93
- return date.toLocaleString(undefined, { timeZone, hour12: true }).slice(-2).charAt(0).toLocaleLowerCase();
94
- } else {
95
- return date.toLocaleString(undefined, { hour12: true }).slice(-2).charAt(0).toLocaleLowerCase();
96
- }
94
+ const date = formatDate(newDate)
95
+
96
+ if (timeZone) {
97
+ return date.toLocaleString("en-US", { timeZone, hour12: true }).slice(-2).charAt(0).toLocaleLowerCase();
98
+ } else {
99
+ return date.toLocaleString("en-US", { hour12: true }).slice(-2).charAt(0).toLocaleLowerCase();
100
+ }
97
101
  }
98
102
 
99
103
  export const toTimeZone = (newDate: Date | string, timeZone?: string): string => {
100
- const date = formatDate(newDate)
101
- if (timeZone) {
102
- return date.toLocaleString(undefined, { timeZone, timeZoneName: "short" }).split(' ')[3];
103
- } else {
104
- return date.toLocaleString(undefined, { timeZoneName: "short" }).split(' ')[3];
105
- }
104
+ const date = formatDate(newDate)
105
+
106
+ if (timeZone) {
107
+ return date.toLocaleString("en-US", { timeZone, timeZoneName: "short" }).split(' ')[3];
108
+ } else {
109
+ return date.toLocaleString("en-US", { timeZoneName: "short" }).split(' ')[3];
110
+ }
106
111
  }
107
112
 
108
113
  export const toTimeWithMeridiem = (newDate: Date | string, timeZone: string): string => {
@@ -111,33 +116,66 @@ export const toTimeWithMeridiem = (newDate: Date | string, timeZone: string): st
111
116
  }
112
117
 
113
118
  export const toIso = (newDate: Date | string): string => {
114
- const date = formatDate(newDate)
115
- return date.toISOString()
119
+ const date = formatDate(newDate)
120
+ return date.toISOString()
116
121
  }
117
122
 
118
123
  export const fromNow = (newDate: Date | string): string => {
119
- const startDate = formatDate(newDate).getTime()
120
- 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()
121
129
  const elapsedTime = endDate - startDate
122
- let elapsedTimeString = `${Math.round(elapsedTime / (365.25 * 24 * 60 * 60 * 1000))} years ago.`; // 730+ days
123
-
124
- const elapsedTimeData = [
125
- { min: 0, max: 44999, value: "a few seconds ago" }, // 0-44 seconds
126
- { min: 45000, max: 89999, value: "a minute ago" }, // 45-89 seconds
127
- { min: 90000, max: 2649999, value: `${Math.round(elapsedTime / 60000)} minutes ago`}, // 90s-44 minutes
128
- { min: 2650000, max: 7299999, value: "an hour ago" }, // 45-120 minutes
129
- { min: 7300000, max: 75699999, value: `${Math.round(elapsedTime / 3600000)} hours ago`}, // 2-21 hours
130
- { min: 75700000, max: 172899999, value: "a day ago" }, // 22-48 hours
131
- { min: 172900000, max: 2169999999, value: `${Math.round(elapsedTime / 86400000)} days ago`}, // 2-25 days
132
- { min: 2170000000, max: 5184999999, value: "a month ago"}, // 26-60 days
133
- { min: 5185000000, max: 27561699999, value: `${Math.round(elapsedTime / 30.44 * 24 * 60 * 60 * 1000)} months ago`}, // 60-319 days
134
- { min: 27561700000, max: 63072999999, value: "a year ago"}, // 320-730 days
135
- ];
136
-
137
- for (const timeDate of elapsedTimeData) {
138
- if (elapsedTime >= timeDate.min && elapsedTime <= timeDate.max) {
139
- elapsedTimeString = timeDate.value;
140
- 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
141
179
  }
142
180
  }
143
181
 
@@ -149,7 +187,7 @@ export const toCustomFormat = (newDate: Date | string, format = 'month_day'): st
149
187
  if (format == "month_day") {
150
188
  return `${toMonthNum(date)}/${toDay(date)}`
151
189
  } else {
152
- return `${date.toLocaleString(undefined, { month: "short" })} ${toDay(date)}`
190
+ return `${date.toLocaleString("en-US", { month: "short" })} ${toDay(date)}`
153
191
  }
154
192
  }
155
193
 
@@ -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
  }