playbook_ui 14.0.0 → 14.1.0.pre.alpha.PA1477timestampkit3601

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +2 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +5 -2
  4. data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableBody.tsx +24 -20
  5. data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableHeader.tsx +17 -12
  6. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +89 -4
  7. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +5 -1
  8. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +1 -1
  9. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +30 -0
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.jsx +67 -0
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.md +1 -0
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -0
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +2 -1
  14. data/app/pb_kits/playbook/pb_avatar/_avatar.scss +0 -30
  15. data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +19 -1
  16. data/app/pb_kits/playbook/pb_avatar/avatar.rb +44 -1
  17. data/app/pb_kits/playbook/pb_avatar/avatar.test.js +17 -0
  18. data/app/pb_kits/playbook/pb_badge/_badge.scss +9 -0
  19. data/app/pb_kits/playbook/pb_badge/_badge.tsx +8 -3
  20. data/app/pb_kits/playbook/pb_badge/badge.rb +1 -1
  21. data/app/pb_kits/playbook/pb_badge/badge.test.js +17 -11
  22. data/app/pb_kits/playbook/pb_badge/docs/_badge_notification.html.erb +13 -0
  23. data/app/pb_kits/playbook/pb_badge/docs/_badge_notification.jsx +31 -12
  24. data/app/pb_kits/playbook/pb_button/_button.tsx +4 -1
  25. data/app/pb_kits/playbook/pb_button/button.html.erb +1 -1
  26. data/app/pb_kits/playbook/pb_button/button.rb +4 -0
  27. data/app/pb_kits/playbook/pb_date_picker/docs/_description.md +3 -1
  28. data/app/pb_kits/playbook/pb_date_time/dateTime.test.js +2 -2
  29. data/app/pb_kits/playbook/pb_dialog/_close_icon.tsx +5 -1
  30. data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +3 -1
  31. data/app/pb_kits/playbook/pb_dialog/dialog.test.jsx +20 -1
  32. data/app/pb_kits/playbook/pb_dialog/dialog_header.html.erb +1 -1
  33. data/app/pb_kits/playbook/pb_dialog/dialog_header.rb +4 -0
  34. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx +1 -5
  35. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.jsx +46 -0
  36. data/app/pb_kits/playbook/pb_dialog/docs/example.yml +1 -0
  37. data/app/pb_kits/playbook/pb_dialog/docs/index.js +1 -0
  38. data/app/pb_kits/playbook/pb_filter/filter.rb +1 -1
  39. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss +1 -1
  40. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -0
  41. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -0
  42. data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +43 -25
  43. data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +6 -2
  44. data/app/pb_kits/playbook/pb_form_pill/docs/example.yml +2 -2
  45. data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +4 -4
  46. data/app/pb_kits/playbook/pb_form_pill/form_pill.rb +4 -0
  47. data/app/pb_kits/playbook/pb_gantt_chart/_gantt_chart.scss +3 -0
  48. data/app/pb_kits/playbook/pb_gantt_chart/_gantt_chart.tsx +72 -0
  49. data/app/pb_kits/playbook/pb_gantt_chart/docs/_gantt_chart_default.jsx +53 -0
  50. data/app/pb_kits/playbook/pb_gantt_chart/docs/example.yml +7 -0
  51. data/app/pb_kits/playbook/pb_gantt_chart/docs/index.js +1 -0
  52. data/app/pb_kits/playbook/pb_gantt_chart/gantt_chart.test.jsx +19 -0
  53. data/app/pb_kits/playbook/pb_icon/_icon.tsx +4 -1
  54. data/app/pb_kits/playbook/pb_icon/icon.rb +2 -0
  55. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.tsx +2 -1
  56. data/app/pb_kits/playbook/pb_icon_circle/icon_circle.rb +2 -2
  57. data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.scss +0 -11
  58. data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx +3 -2
  59. data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_color.html.erb +1 -0
  60. data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.rb +2 -2
  61. data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.test.js +5 -4
  62. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +0 -2
  63. data/app/pb_kits/playbook/pb_nav/_horizontal_nav.scss +1 -1
  64. data/app/pb_kits/playbook/pb_online_status/_online_status.scss +52 -5
  65. data/app/pb_kits/playbook/pb_online_status/_online_status.tsx +6 -1
  66. data/app/pb_kits/playbook/pb_online_status/docs/_online_status_no_border.html.erb +1 -0
  67. data/app/pb_kits/playbook/pb_online_status/docs/_online_status_no_border.jsx +14 -0
  68. data/app/pb_kits/playbook/pb_online_status/docs/_online_status_size.html.erb +3 -0
  69. data/app/pb_kits/playbook/pb_online_status/docs/_online_status_size.jsx +25 -0
  70. data/app/pb_kits/playbook/pb_online_status/docs/example.yml +6 -2
  71. data/app/pb_kits/playbook/pb_online_status/docs/index.js +2 -0
  72. data/app/pb_kits/playbook/pb_online_status/online_status.rb +11 -1
  73. data/app/pb_kits/playbook/pb_online_status/online_status.test.js +31 -0
  74. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_toggle.html.erb +61 -0
  75. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_toggle.jsx +70 -0
  76. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_toggle.md +1 -0
  77. data/app/pb_kits/playbook/pb_overlay/docs/example.yml +4 -2
  78. data/app/pb_kits/playbook/pb_overlay/docs/index.js +1 -0
  79. data/app/pb_kits/playbook/pb_pagination/_pagination.scss +49 -13
  80. data/app/pb_kits/playbook/pb_pagination/_pagination.tsx +164 -0
  81. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default.jsx +19 -0
  82. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default_react.md +1 -0
  83. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change.jsx +62 -0
  84. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change_react.md +1 -0
  85. data/app/pb_kits/playbook/pb_pagination/docs/data.js +23 -0
  86. data/app/pb_kits/playbook/pb_pagination/docs/example.yml +3 -1
  87. data/app/pb_kits/playbook/pb_pagination/docs/index.js +2 -0
  88. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +0 -7
  89. data/app/pb_kits/playbook/pb_popover/_popover.tsx +10 -5
  90. data/app/pb_kits/playbook/pb_rich_text_editor/_previewer_mixin.scss +132 -0
  91. data/app/pb_kits/playbook/pb_rich_text_editor/_tiptap_styles.scss +50 -76
  92. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_preview.jsx +73 -0
  93. data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +1 -0
  94. data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +2 -1
  95. data/app/pb_kits/playbook/pb_star_rating/_star_rating.scss +83 -6
  96. data/app/pb_kits/playbook/pb_star_rating/docs/example.yml +3 -1
  97. data/app/pb_kits/playbook/pb_star_rating/index.js +128 -22
  98. data/app/pb_kits/playbook/pb_star_rating/star_rating.html.erb +5 -3
  99. data/app/pb_kits/playbook/pb_star_rating/star_rating.rb +19 -2
  100. data/app/pb_kits/playbook/pb_star_rating/stars/utils.tsx +5 -1
  101. data/app/pb_kits/playbook/pb_star_rating/subcomponents/_star_rating_display.tsx +0 -2
  102. data/app/pb_kits/playbook/pb_star_rating/subcomponents/_star_rating_interactive.tsx +50 -22
  103. data/app/pb_kits/playbook/pb_table/_table.tsx +1 -1
  104. data/app/pb_kits/playbook/pb_table/index.ts +4 -4
  105. data/app/pb_kits/playbook/pb_table/subcomponents/_table_body.tsx +1 -1
  106. data/app/pb_kits/playbook/pb_table/subcomponents/_table_cell.tsx +1 -1
  107. data/app/pb_kits/playbook/pb_table/subcomponents/_table_head.tsx +1 -1
  108. data/app/pb_kits/playbook/pb_table/subcomponents/_table_header.tsx +1 -1
  109. data/app/pb_kits/playbook/pb_table/subcomponents/_table_row.tsx +1 -1
  110. data/app/pb_kits/playbook/pb_table/table.test.js +2 -0
  111. data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +1 -1
  112. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default.jsx +1 -1
  113. data/app/pb_kits/playbook/pb_textarea/_textarea.tsx +45 -27
  114. data/app/pb_kits/playbook/pb_textarea/index.ts +3 -3
  115. data/app/pb_kits/playbook/pb_time/_time.tsx +15 -11
  116. data/app/pb_kits/playbook/pb_time/time.html.erb +3 -3
  117. data/app/pb_kits/playbook/pb_time/time.rb +4 -0
  118. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.tsx +1 -1
  119. data/app/pb_kits/playbook/pb_timeline/_item.tsx +1 -1
  120. data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +1 -1
  121. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.html.erb +2 -2
  122. data/app/pb_kits/playbook/pb_timestamp/timestamp.rb +46 -2
  123. data/app/pb_kits/playbook/pb_title_detail/_title_detail.tsx +10 -10
  124. data/app/pb_kits/playbook/pb_toggle/_toggle.tsx +1 -1
  125. data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +2 -2
  126. data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.tsx +1 -2
  127. data/app/pb_kits/playbook/pb_treemap_chart/treemapChart.test.js +2 -0
  128. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +2 -2
  129. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.html.erb +1 -1
  130. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +1 -0
  131. data/app/pb_kits/playbook/pb_user/_user.tsx +1 -1
  132. data/app/pb_kits/playbook/pb_user_badge/_user_badge.tsx +6 -6
  133. data/app/pb_kits/playbook/pb_user_badge/badges/million-dollar.tsx +236 -235
  134. data/app/pb_kits/playbook/pb_user_badge/badges/veteran.tsx +1 -1
  135. data/app/pb_kits/playbook/pb_walkthrough/_walkthrough.tsx +68 -63
  136. data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.tsx +1 -1
  137. data/app/pb_kits/playbook/tokens/_container.scss +21 -0
  138. data/app/pb_kits/playbook/utilities/_min_width.scss +45 -0
  139. data/app/pb_kits/playbook/utilities/_positioning.scss +26 -15
  140. data/app/pb_kits/playbook/utilities/globalPropNames.mjs +1 -0
  141. data/app/pb_kits/playbook/utilities/globalProps.ts +20 -3
  142. data/app/pb_kits/playbook/utilities/icons/allicons.tsx +59 -0
  143. data/app/pb_kits/playbook/utilities/icons/clock.svg +9 -0
  144. data/app/pb_kits/playbook/utilities/icons/spinner.svg +3 -0
  145. data/app/pb_kits/playbook/utilities/icons/times.svg +3 -0
  146. data/dist/chunks/_typeahead-Cq7RLPBA.js +22 -0
  147. data/dist/chunks/_weekday_stacked-Cykj5kLZ.js +45 -0
  148. data/dist/chunks/{lib-Bf_E03gc.js → lib-DErGXNy3.js} +2 -2
  149. data/dist/chunks/{pb_form_validation-D0dhqeN2.js → pb_form_validation-BC6kh7Hu.js} +1 -1
  150. data/dist/chunks/vendor.js +1 -1
  151. data/dist/menu.yml +4 -0
  152. data/dist/playbook-doc.js +1 -1
  153. data/dist/playbook-rails-react-bindings.js +1 -1
  154. data/dist/playbook-rails.js +1 -1
  155. data/dist/playbook.css +1 -1
  156. data/lib/playbook/classnames.rb +1 -0
  157. data/lib/playbook/spacing.rb +31 -2
  158. data/lib/playbook/version.rb +2 -2
  159. metadata +44 -13
  160. data/app/pb_kits/playbook/pb_online_status/_online_status_mixins.scss +0 -32
  161. data/dist/chunks/_typeahead-COUJ88EA.js +0 -22
  162. data/dist/chunks/_weekday_stacked-BAkwel5p.js +0 -45
  163. /data/app/pb_kits/playbook/pb_pagination/docs/{_pagination_default.md → _pagination_default_rails.md} +0 -0
@@ -1,3 +1,5 @@
1
+ /* eslint-disable react/no-multi-comp */
2
+
1
3
  import React from 'react'
2
4
  import classnames from 'classnames'
3
5
  import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
@@ -24,7 +26,7 @@ type WalkthroughProps = {
24
26
  disableOverlay?: boolean,
25
27
  disableOverlayClose?: boolean,
26
28
  disableScrolling?: boolean,
27
- floaterProps?: object,
29
+ floaterProps?: Record<string, unknown>,
28
30
  hideBackButton?: boolean,
29
31
  hideCloseButton?: boolean,
30
32
  showProgress?: boolean,
@@ -58,89 +60,92 @@ type TooltipProps = {
58
60
  disableBeacon?: boolean,
59
61
  },
60
62
  skip?: boolean,
61
- backProps?: object,
62
- closeProps?: object,
63
- primaryProps?: object,
64
- skipProps?: object,
65
- tooltipProps?: object,
63
+ backProps?: Record<string, unknown>,
64
+ closeProps?: Record<string, unknown>,
65
+ primaryProps?: Record<string, unknown>,
66
+ skipProps?: Record<string, unknown>,
67
+ tooltipProps?: Record<string, unknown>,
66
68
  }
67
69
 
70
+ // eslint-disable-next-line react/display-name
68
71
  const Tooltip = React.forwardRef((props: TooltipProps) => (
69
- <div
72
+ <div
70
73
  className="pb_card_kit_border_none p_none"
71
74
  {...props.tooltipProps}
75
+ >
76
+ {props.step.title && <div>
77
+ <Flex
78
+ align="center"
79
+ justify="between"
80
+ padding="xs"
72
81
  >
73
- {props.step.title && <div>
74
- <Flex
75
- align="center"
76
- justify="between"
77
- padding="xs"
78
- >
79
- <Title
82
+ <Title
80
83
  paddingLeft="xs"
81
84
  size={4}
82
- >
83
- {props.step.title}
84
- </Title>
85
- {props.skip && (<Button
85
+ >
86
+ {props.step.title}
87
+ </Title>
88
+ {props.skip && (
89
+ <Button
86
90
  {...props.skipProps}
87
91
  id="skip"
88
92
  text="Skip Tour"
89
93
  variant="link"
90
- />)}
91
- <Button
94
+ />
95
+ )}
96
+ <Button
92
97
  {...props.skipProps}
93
98
  id="skip"
94
99
  text="Skip Tour"
95
100
  variant="link"
96
- />
97
- </Flex>
98
- <SectionSeparator />
99
- </div>}
101
+ />
102
+ </Flex>
103
+ <SectionSeparator />
104
+ </div>}
100
105
 
101
- <Flex padding="sm">{props.step.content}</Flex>
102
- <SectionSeparator />
103
- <Flex
106
+ <Flex padding="sm">{props.step.content}</Flex>
107
+ <SectionSeparator />
108
+ <Flex
104
109
  justify={props.index == 0 ? 'end' : 'between'}
105
110
  padding="xs"
106
- >
111
+ >
107
112
 
108
- {props.index > 0 && (
109
- <Button
113
+ {props.index > 0 && (
114
+ <Button
110
115
  {...props.backProps}
111
116
  id="back"
112
117
  text="Back"
113
- />
114
- )}
118
+ />
119
+ )}
115
120
 
116
- {props.continuous && !props.isLastStep &&
117
- <Button
121
+ {props.continuous && !props.isLastStep &&
122
+ <Button
118
123
  {...props.primaryProps}
119
124
  id="next"
120
125
  text="Next"
121
- />
122
- }
126
+ />
127
+ }
123
128
 
124
- {!props.continuous &&
125
- <Button
129
+ {!props.continuous &&
130
+ <Button
126
131
  {...props.closeProps}
127
132
  id="close"
128
133
  text="Close"
129
- />
130
- }
134
+ />
135
+ }
131
136
 
132
- {!((props.continuous && !props.isLastStep) || (!props.continuous)) &&
133
- <Button
137
+ {!((props.continuous && !props.isLastStep) || (!props.continuous)) &&
138
+ <Button
134
139
  {...props.closeProps}
135
140
  id="close"
136
141
  text="Close"
137
- />
138
- }
139
- </Flex>
140
- </div>
142
+ />
143
+ }
144
+ </Flex>
145
+ </div>
141
146
  )) as unknown as React.ForwardRefRenderFunction<HTMLDivElement, TooltipRenderProps>
142
147
 
143
- const Walkthrough = (props: WalkthroughProps) => {
148
+ const Walkthrough = (props: WalkthroughProps): React.ReactElement => {
144
149
  const {
145
150
  aria = {},
146
151
  callback,
@@ -170,24 +175,24 @@ const Walkthrough = (props: WalkthroughProps) => {
170
175
 
171
176
  return (
172
177
  <div
173
- {...ariaProps}
174
- {...dataProps}
175
- {...htmlProps}
176
- className={classes}
177
- id={id}
178
+ {...ariaProps}
179
+ {...dataProps}
180
+ {...htmlProps}
181
+ className={classes}
182
+ id={id}
178
183
  >
179
184
  <Joyride
180
- callback={callback}
181
- continuous={continuous}
182
- disableOverlay={disableOverlay}
183
- disableScrolling
184
- floaterProps={floaterProps}
185
- run={run}
186
- showSkipButton={showSkipButton}
187
- steps={steps}
188
- styles={styles}
189
- tooltipComponent={Tooltip}
190
- {...props}
185
+ callback={callback}
186
+ continuous={continuous}
187
+ disableOverlay={disableOverlay}
188
+ disableScrolling
189
+ floaterProps={floaterProps}
190
+ run={run}
191
+ showSkipButton={showSkipButton}
192
+ steps={steps}
193
+ styles={styles}
194
+ tooltipComponent={Tooltip}
195
+ {...props}
191
196
  />
192
197
  </div>
193
198
 
@@ -38,7 +38,7 @@ const getFormattedDate = (value: Date, variant: "day_only" | "month_day" | "expa
38
38
  }
39
39
  }
40
40
 
41
- const WeekdayStacked = (props: WeekdayStackedProps) => {
41
+ const WeekdayStacked = (props: WeekdayStackedProps): React.ReactElement => {
42
42
  const {
43
43
  align = 'left',
44
44
  aria = {},
@@ -0,0 +1,21 @@
1
+ $container_0: 0% !default;
2
+ $container_xxs: 320px !default;
3
+ $container_xs: 360px !default;
4
+ $container_sm: 540px !default;
5
+ $container_md: 720px !default;
6
+ $container_lg: 960px !default;
7
+ $container_xl: 1140px !default;
8
+ $container_xxl: 1320px !default;
9
+ $container_100: 100% !default;
10
+ $containers: (
11
+ container_0: $container_0,
12
+ container_xxs: $container_xxs,
13
+ container_xs: $container_xs,
14
+ container_sm: $container_sm,
15
+ container_md: $container_md,
16
+ container_lg: $container_lg,
17
+ container_xl: $container_xl,
18
+ container_xxl: $container_xxl,
19
+ container_100: $container_100,
20
+ none: 0,
21
+ );
@@ -0,0 +1,45 @@
1
+ @import "../tokens/container";
2
+
3
+ .min_width_0 {
4
+ min-width: map-get($containers, 'none');
5
+ }
6
+
7
+ .min_with_0_percent {
8
+ min-width: $container_0;
9
+ }
10
+
11
+ .min_width_xxs {
12
+ min-width: $container_xxs;
13
+ }
14
+
15
+ .min_width_xs {
16
+ min-width: $container_xs;
17
+ }
18
+
19
+ .min_width_sm {
20
+ min-width: $container_sm;
21
+ }
22
+
23
+ .min_width_md {
24
+ min-width: $container_md;
25
+ }
26
+
27
+ .min_width_lg {
28
+ min-width: $container_lg;
29
+ }
30
+
31
+ .min_width_xl {
32
+ min-width: $container_xl;
33
+ }
34
+
35
+ .min_width_xxl {
36
+ min-width: $container_xxl;
37
+ }
38
+
39
+ .min_width_100_percent {
40
+ min-width: $container_100;
41
+ }
42
+
43
+ .minwidth-resize {
44
+ resize: horizontal;
45
+ }
@@ -19,55 +19,66 @@
19
19
  }
20
20
 
21
21
  .z_index_1 {
22
- z-index: 100;
22
+ z-index: $z_1 !important;
23
23
  }
24
24
 
25
25
  .z_index_2 {
26
- z-index: 200;
26
+ z-index: $z_2 !important;
27
27
  }
28
28
 
29
29
  .z_index_3 {
30
- z-index: 300;
30
+ z-index: $z_3 !important;
31
31
  }
32
32
 
33
33
  .z_index_4 {
34
- z-index: 400;
34
+ z-index: $z_4 !important;
35
35
  }
36
36
 
37
37
  .z_index_5 {
38
- z-index: 500;
38
+ z-index: $z_5 !important;
39
39
  }
40
40
 
41
41
  .z_index_6 {
42
- z-index: 600;
42
+ z-index: $z_6 !important;
43
43
  }
44
44
 
45
45
  .z_index_7 {
46
- z-index: 700;
46
+ z-index: $z_7 !important;
47
47
  }
48
48
 
49
49
  .z_index_8 {
50
- z-index: 800;
50
+ z-index: $z_8 !important;
51
51
  }
52
52
 
53
53
  .z_index_9 {
54
- z-index: 900;
54
+ z-index: $z_9 !important;
55
55
  }
56
56
 
57
57
  .z_index_10 {
58
- z-index: 1000;
59
- }
60
-
61
- $zIndex_values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;
58
+ z-index: $z_10 !important;
59
+ }
60
+
61
+ $zIndex_values: (
62
+ 1: $z_1,
63
+ 2: $z_2,
64
+ 3: $z_3,
65
+ 4: $z_4,
66
+ 5: $z_5,
67
+ 6: $z_6,
68
+ 7: $z_7,
69
+ 8: $z_8,
70
+ 9: $z_9,
71
+ 10: $z_10
72
+ );
62
73
 
63
74
  @each $size, $size_value in $breakpoints_grid {
64
- @each $zIndex_value in $zIndex_values {
75
+ @each $zIndex_value, $zIndex_variable in $zIndex_values {
65
76
  $min_size: map-get($size_value, "min");
66
77
  $max_size: map-get($size_value, "max");
67
78
 
68
79
  .z_index_#{$size}_#{$zIndex_value} {
69
80
  @include break_on($min_size, $max_size) {
70
- z-index: #{$zIndex_value * 100} !important;
81
+ z-index: $zIndex_variable !important;
71
82
  }
72
83
  }
73
84
  }
@@ -25,6 +25,7 @@ export default [
25
25
  "order",
26
26
  "numberSpacing",
27
27
  "maxWidth",
28
+ "minWidth",
28
29
  "marginRight",
29
30
  "marginLeft",
30
31
  "marginTop",
@@ -94,6 +94,10 @@ type MaxWidth = {
94
94
  maxWidth?: Sizes,
95
95
  }
96
96
 
97
+ type MinWidth = {
98
+ minWidth?: Sizes,
99
+ }
100
+
97
101
  type NumberSpacing = {
98
102
  numberSpacing?: "tabular",
99
103
  }
@@ -170,7 +174,7 @@ type ZIndex = {
170
174
  export type GlobalProps = AlignContent & AlignItems & AlignSelf &
171
175
  BorderRadius & Cursor & Dark & Display & DisplaySizes & Flex & FlexDirection &
172
176
  FlexGrow & FlexShrink & FlexWrap & JustifyContent & JustifySelf &
173
- LineHeight & Margin & MaxWidth & NumberSpacing & Order & Overflow & Padding &
177
+ LineHeight & Margin & MinWidth & MaxWidth & NumberSpacing & Order & Overflow & Padding &
174
178
  Position & Shadow & TextAlign & Truncate & VerticalAlign & ZIndex & { hover?: string } & Top & Right & Bottom & Left;
175
179
 
176
180
  const getResponsivePropClasses = (prop: {[key: string]: string}, classPrefix: string) => {
@@ -194,6 +198,14 @@ const getPositioningPropsClasses = (position: string, value: Sizes | {value: str
194
198
  return css;
195
199
  };
196
200
 
201
+ const filterClassName = (value: string): string => {
202
+ if (value.includes("%")) {
203
+ return value.replace("%", "_percent");
204
+ } else {
205
+ return value;
206
+ }
207
+ };
208
+
197
209
  // Prop categories
198
210
  const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} = {
199
211
 
@@ -320,10 +332,15 @@ const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} =
320
332
  css += numberSpacing ? `ns_${numberSpacing} ` : ''
321
333
  return css
322
334
  },
335
+ minWidthProps: ({ minWidth }: MinWidth) => {
336
+ let css = ''
337
+ css += minWidth ? `min_width_${filterClassName(minWidth)} ` : ''
338
+ return css.trimEnd()
339
+ },
323
340
  maxWidthProps: ({ maxWidth }: MaxWidth) => {
324
341
  let css = ''
325
- css += maxWidth ? `max_width_${maxWidth } ` : ''
326
- return css
342
+ css += maxWidth ? `max_width_${filterClassName(maxWidth)} ` : ''
343
+ return css.trimEnd()
327
344
  },
328
345
  zIndexProps: (zIndex: ZIndex) => {
329
346
  let css = ''
@@ -0,0 +1,59 @@
1
+ import React from "react";
2
+
3
+ const spinner = (
4
+ <svg
5
+ fill="none"
6
+ height="25"
7
+ viewBox="0 0 31 25"
8
+ width="31"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ >
11
+ <path d="M17.4043 1.85547C17.4043 2.69922 16.7012 3.35547 15.9043 3.35547C15.0605 3.35547 14.4043 2.69922 14.4043 1.85547C14.4043 1.05859 15.0605 0.355469 15.9043 0.355469C16.7012 0.355469 17.4043 1.05859 17.4043 1.85547ZM17.4043 22.8555C17.4043 23.6992 16.7012 24.3555 15.9043 24.3555C15.0605 24.3555 14.4043 23.6992 14.4043 22.8555C14.4043 22.0586 15.0605 21.3555 15.9043 21.3555C16.7012 21.3555 17.4043 22.0586 17.4043 22.8555ZM24.9043 12.3555C24.9043 11.5586 25.5605 10.8555 26.4043 10.8555C27.2012 10.8555 27.9043 11.5586 27.9043 12.3555C27.9043 13.1992 27.2012 13.8555 26.4043 13.8555C25.5605 13.8555 24.9043 13.1992 24.9043 12.3555ZM5.4043 13.8555C4.56055 13.8555 3.9043 13.1992 3.9043 12.3555C3.9043 11.5586 4.56055 10.8555 5.4043 10.8555C6.20117 10.8555 6.9043 11.5586 6.9043 12.3555C6.9043 13.1992 6.20117 13.8555 5.4043 13.8555ZM7.41992 20.8398C6.81055 20.2773 6.81055 19.3398 7.41992 18.7305C7.98242 18.168 8.91992 18.168 9.5293 18.7305C10.0918 19.3398 10.0918 20.2773 9.5293 20.8398C8.91992 21.4492 7.98242 21.4492 7.41992 20.8398ZM22.2324 20.8398C21.8574 20.5117 21.6699 19.9023 21.8105 19.3867C21.9512 18.8711 22.373 18.4492 22.8887 18.3086C23.4043 18.168 24.0137 18.3555 24.3887 18.7305C24.7637 19.1055 24.9512 19.668 24.8105 20.2305C24.6699 20.7461 24.248 21.168 23.7324 21.3086C23.1699 21.4492 22.6074 21.2617 22.2324 20.8398ZM7.41992 3.87109C7.98242 3.30859 8.91992 3.30859 9.5293 3.87109C10.0918 4.48047 10.0918 5.41797 9.5293 6.02734C8.91992 6.58984 7.98242 6.58984 7.41992 6.02734C6.81055 5.41797 6.81055 4.48047 7.41992 3.87109Z"
12
+ fill="#242B42"
13
+ />
14
+ </svg>
15
+ )
16
+
17
+ const clock = (
18
+ <svg
19
+ fill="none"
20
+ height="25"
21
+ viewBox="0 0 31 25"
22
+ width="31"
23
+ xmlns="http://www.w3.org/2000/svg"
24
+ >
25
+ <path d="M25.1221 12C25.1221 8.53125 23.2471 5.34375 20.2471 3.5625C17.2002 1.82812 13.4971 1.82812 10.4971 3.5625C7.4502 5.34375 5.62207 8.53125 5.62207 12C5.62207 15.5156 7.4502 18.7031 10.4971 20.4844C13.4971 22.2188 17.2002 22.2188 20.2471 20.4844C23.2471 18.7031 25.1221 15.5156 25.1221 12ZM3.37207 12C3.37207 7.73438 5.62207 3.79688 9.37207 1.64062C13.0752 -0.515625 17.6221 -0.515625 21.3721 1.64062C25.0752 3.79688 27.3721 7.73438 27.3721 12C27.3721 16.3125 25.0752 20.25 21.3721 22.4062C17.6221 24.5625 13.0752 24.5625 9.37207 22.4062C5.62207 20.25 3.37207 16.3125 3.37207 12ZM14.2471 5.625C14.2471 5.01562 14.7158 4.5 15.3721 4.5C15.9814 4.5 16.4971 5.01562 16.4971 5.625V11.4375L20.4814 14.0625C20.9971 14.4375 21.1377 15.1406 20.8096 15.6562C20.4346 16.1719 19.7314 16.3125 19.2158 15.9375L14.7158 12.9375C14.4346 12.75 14.2471 12.375 14.2471 12V5.625Z"
26
+ fill="#242B42"
27
+ />
28
+ </svg>
29
+ )
30
+
31
+ const times = (
32
+ <svg
33
+ fill="none"
34
+ height="25"
35
+ viewBox="0 0 31 25"
36
+ width="31"
37
+ xmlns="http://www.w3.org/2000/svg"
38
+ >
39
+ <path
40
+ d="M23.0762 6.77734L17.4512 12.4023L23.0293 17.9805C23.498 18.4023 23.498 19.1055 23.0293 19.5273C22.6074 19.9961 21.9043 19.9961 21.4824 19.5273L15.8574 13.9492L10.2793 19.5273C9.85742 19.9961 9.1543 19.9961 8.73242 19.5273C8.26367 19.1055 8.26367 18.4023 8.73242 17.9336L14.3105 12.3555L8.73242 6.77734C8.26367 6.35547 8.26367 5.65234 8.73242 5.18359C9.1543 4.76172 9.85742 4.76172 10.3262 5.18359L15.9043 10.8086L21.4824 5.23047C21.9043 4.76172 22.6074 4.76172 23.0762 5.23047C23.498 5.65234 23.498 6.35547 23.0762 6.77734Z"
41
+ fill="#242B42"
42
+ />
43
+ </svg>
44
+ )
45
+
46
+ export const getAllIcons = () => {
47
+
48
+ return {
49
+ clock: {
50
+ icon: clock
51
+ },
52
+ spinner: {
53
+ icon: spinner
54
+ },
55
+ times: {
56
+ icon: times
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,9 @@
1
+ <svg
2
+ fill="none"
3
+ height="25"
4
+ viewBox="0 0 31 25"
5
+ width="31"
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ >
8
+ <path d="M25.1221 12C25.1221 8.53125 23.2471 5.34375 20.2471 3.5625C17.2002 1.82812 13.4971 1.82812 10.4971 3.5625C7.4502 5.34375 5.62207 8.53125 5.62207 12C5.62207 15.5156 7.4502 18.7031 10.4971 20.4844C13.4971 22.2188 17.2002 22.2188 20.2471 20.4844C23.2471 18.7031 25.1221 15.5156 25.1221 12ZM3.37207 12C3.37207 7.73438 5.62207 3.79688 9.37207 1.64062C13.0752 -0.515625 17.6221 -0.515625 21.3721 1.64062C25.0752 3.79688 27.3721 7.73438 27.3721 12C27.3721 16.3125 25.0752 20.25 21.3721 22.4062C17.6221 24.5625 13.0752 24.5625 9.37207 22.4062C5.62207 20.25 3.37207 16.3125 3.37207 12ZM14.2471 5.625C14.2471 5.01562 14.7158 4.5 15.3721 4.5C15.9814 4.5 16.4971 5.01562 16.4971 5.625V11.4375L20.4814 14.0625C20.9971 14.4375 21.1377 15.1406 20.8096 15.6562C20.4346 16.1719 19.7314 16.3125 19.2158 15.9375L14.7158 12.9375C14.4346 12.75 14.2471 12.375 14.2471 12V5.625Z" fill="#242B42" />
9
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="31" height="25" viewBox="0 0 31 25" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M17.4043 1.85547C17.4043 2.69922 16.7012 3.35547 15.9043 3.35547C15.0605 3.35547 14.4043 2.69922 14.4043 1.85547C14.4043 1.05859 15.0605 0.355469 15.9043 0.355469C16.7012 0.355469 17.4043 1.05859 17.4043 1.85547ZM17.4043 22.8555C17.4043 23.6992 16.7012 24.3555 15.9043 24.3555C15.0605 24.3555 14.4043 23.6992 14.4043 22.8555C14.4043 22.0586 15.0605 21.3555 15.9043 21.3555C16.7012 21.3555 17.4043 22.0586 17.4043 22.8555ZM24.9043 12.3555C24.9043 11.5586 25.5605 10.8555 26.4043 10.8555C27.2012 10.8555 27.9043 11.5586 27.9043 12.3555C27.9043 13.1992 27.2012 13.8555 26.4043 13.8555C25.5605 13.8555 24.9043 13.1992 24.9043 12.3555ZM5.4043 13.8555C4.56055 13.8555 3.9043 13.1992 3.9043 12.3555C3.9043 11.5586 4.56055 10.8555 5.4043 10.8555C6.20117 10.8555 6.9043 11.5586 6.9043 12.3555C6.9043 13.1992 6.20117 13.8555 5.4043 13.8555ZM7.41992 20.8398C6.81055 20.2773 6.81055 19.3398 7.41992 18.7305C7.98242 18.168 8.91992 18.168 9.5293 18.7305C10.0918 19.3398 10.0918 20.2773 9.5293 20.8398C8.91992 21.4492 7.98242 21.4492 7.41992 20.8398ZM22.2324 20.8398C21.8574 20.5117 21.6699 19.9023 21.8105 19.3867C21.9512 18.8711 22.373 18.4492 22.8887 18.3086C23.4043 18.168 24.0137 18.3555 24.3887 18.7305C24.7637 19.1055 24.9512 19.668 24.8105 20.2305C24.6699 20.7461 24.248 21.168 23.7324 21.3086C23.1699 21.4492 22.6074 21.2617 22.2324 20.8398ZM7.41992 3.87109C7.98242 3.30859 8.91992 3.30859 9.5293 3.87109C10.0918 4.48047 10.0918 5.41797 9.5293 6.02734C8.91992 6.58984 7.98242 6.58984 7.41992 6.02734C6.81055 5.41797 6.81055 4.48047 7.41992 3.87109Z" fill="#242B42"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="31" height="25" viewBox="0 0 31 25" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M23.0762 6.77734L17.4512 12.4023L23.0293 17.9805C23.498 18.4023 23.498 19.1055 23.0293 19.5273C22.6074 19.9961 21.9043 19.9961 21.4824 19.5273L15.8574 13.9492L10.2793 19.5273C9.85742 19.9961 9.1543 19.9961 8.73242 19.5273C8.26367 19.1055 8.26367 18.4023 8.73242 17.9336L14.3105 12.3555L8.73242 6.77734C8.26367 6.35547 8.26367 5.65234 8.73242 5.18359C9.1543 4.76172 9.85742 4.76172 10.3262 5.18359L15.9043 10.8086L21.4824 5.23047C21.9043 4.76172 22.6074 4.76172 23.0762 5.23047C23.498 5.65234 23.498 6.35547 23.0762 6.77734Z" fill="#242B42"/>
3
+ </svg>