playbook_ui 14.1.0.pre.alpha.PA1477timestampkit3536 → 14.1.0.pre.alpha.PBNTR417addcolorsupdatedefaultcolor3608

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) 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/_advanced_table.scss +3 -3
  4. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +1 -1
  5. data/app/pb_kits/playbook/pb_badge/_badge.scss +9 -0
  6. data/app/pb_kits/playbook/pb_badge/_badge.tsx +8 -3
  7. data/app/pb_kits/playbook/pb_badge/badge.rb +1 -1
  8. data/app/pb_kits/playbook/pb_badge/badge.test.js +17 -11
  9. data/app/pb_kits/playbook/pb_badge/docs/_badge_notification.html.erb +13 -0
  10. data/app/pb_kits/playbook/pb_badge/docs/_badge_notification.jsx +31 -12
  11. data/app/pb_kits/playbook/pb_button/_button.tsx +4 -1
  12. data/app/pb_kits/playbook/pb_button/button.html.erb +1 -1
  13. data/app/pb_kits/playbook/pb_button/button.rb +4 -0
  14. data/app/pb_kits/playbook/pb_date_time/dateTime.test.js +2 -2
  15. data/app/pb_kits/playbook/pb_dialog/_close_icon.tsx +5 -1
  16. data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +3 -1
  17. data/app/pb_kits/playbook/pb_dialog/dialog.test.jsx +20 -1
  18. data/app/pb_kits/playbook/pb_dialog/dialog_header.html.erb +1 -1
  19. data/app/pb_kits/playbook/pb_dialog/dialog_header.rb +4 -0
  20. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx +1 -5
  21. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.jsx +46 -0
  22. data/app/pb_kits/playbook/pb_dialog/docs/example.yml +1 -0
  23. data/app/pb_kits/playbook/pb_dialog/docs/index.js +1 -0
  24. data/app/pb_kits/playbook/pb_filter/filter.rb +1 -1
  25. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -0
  26. data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +287 -47
  27. data/app/pb_kits/playbook/pb_form_pill/_form_pill.test.jsx +5 -5
  28. data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +8 -4
  29. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_colors.html.erb +117 -0
  30. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_colors.jsx +227 -0
  31. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_colors.md +1 -0
  32. data/app/pb_kits/playbook/pb_form_pill/docs/example.yml +4 -2
  33. data/app/pb_kits/playbook/pb_form_pill/docs/index.js +1 -0
  34. data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +4 -4
  35. data/app/pb_kits/playbook/pb_form_pill/form_pill.rb +6 -2
  36. data/app/pb_kits/playbook/pb_gantt_chart/_gantt_chart.scss +3 -0
  37. data/app/pb_kits/playbook/pb_gantt_chart/_gantt_chart.tsx +72 -0
  38. data/app/pb_kits/playbook/pb_gantt_chart/docs/_gantt_chart_default.jsx +53 -0
  39. data/app/pb_kits/playbook/pb_gantt_chart/docs/example.yml +7 -0
  40. data/app/pb_kits/playbook/pb_gantt_chart/docs/index.js +1 -0
  41. data/app/pb_kits/playbook/pb_gantt_chart/gantt_chart.test.jsx +19 -0
  42. data/app/pb_kits/playbook/pb_icon/_icon.tsx +1 -1
  43. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +5 -3
  44. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color.html.erb +72 -0
  45. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color.jsx +91 -0
  46. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color_rails.md +1 -0
  47. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color_react.md +1 -0
  48. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +2 -0
  49. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +1 -0
  50. data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.rb +4 -0
  51. data/app/pb_kits/playbook/pb_pagination/_pagination.scss +49 -13
  52. data/app/pb_kits/playbook/pb_pagination/_pagination.tsx +164 -0
  53. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default.jsx +19 -0
  54. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default_react.md +1 -0
  55. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change.jsx +62 -0
  56. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change_react.md +1 -0
  57. data/app/pb_kits/playbook/pb_pagination/docs/data.js +23 -0
  58. data/app/pb_kits/playbook/pb_pagination/docs/example.yml +3 -1
  59. data/app/pb_kits/playbook/pb_pagination/docs/index.js +2 -0
  60. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +0 -7
  61. data/app/pb_kits/playbook/pb_popover/_popover.tsx +10 -5
  62. data/app/pb_kits/playbook/pb_rich_text_editor/_previewer_mixin.scss +132 -0
  63. data/app/pb_kits/playbook/pb_rich_text_editor/_tiptap_styles.scss +50 -76
  64. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_preview.jsx +73 -0
  65. data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +1 -0
  66. data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +2 -1
  67. data/app/pb_kits/playbook/pb_star_rating/index.js +78 -41
  68. data/app/pb_kits/playbook/pb_star_rating/star_rating.html.erb +4 -2
  69. data/app/pb_kits/playbook/pb_star_rating/star_rating.rb +17 -0
  70. data/app/pb_kits/playbook/pb_star_rating/subcomponents/_star_rating_display.tsx +0 -2
  71. data/app/pb_kits/playbook/pb_star_rating/subcomponents/_star_rating_interactive.tsx +0 -1
  72. data/app/pb_kits/playbook/pb_time/_time.tsx +12 -8
  73. data/app/pb_kits/playbook/pb_time/time.html.erb +3 -3
  74. data/app/pb_kits/playbook/pb_time/time.rb +4 -0
  75. data/app/pb_kits/playbook/pb_timestamp/timestamp.rb +2 -37
  76. data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +18 -2
  77. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +4 -0
  78. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +26 -18
  79. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color.html.erb +31 -0
  80. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color.jsx +26 -0
  81. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color_rails.md +1 -0
  82. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color_react.md +1 -0
  83. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
  84. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
  85. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +4 -0
  86. data/app/pb_kits/playbook/tokens/_colors.scss +2 -0
  87. data/app/pb_kits/playbook/tokens/_container.scss +21 -0
  88. data/app/pb_kits/playbook/utilities/_min_width.scss +45 -0
  89. data/app/pb_kits/playbook/utilities/globalPropNames.mjs +1 -0
  90. data/app/pb_kits/playbook/utilities/globalProps.ts +20 -3
  91. data/app/pb_kits/playbook/utilities/icons/allicons.tsx +59 -0
  92. data/app/pb_kits/playbook/utilities/icons/clock.svg +9 -0
  93. data/app/pb_kits/playbook/utilities/icons/spinner.svg +3 -0
  94. data/app/pb_kits/playbook/utilities/icons/times.svg +3 -0
  95. data/dist/chunks/_typeahead-BbHBDL7C.js +22 -0
  96. data/dist/chunks/_weekday_stacked-DEfI42pf.js +45 -0
  97. data/dist/chunks/lazysizes-B7xYodB-.js +1 -0
  98. data/dist/chunks/{lib-BE0Z3F7x.js → lib-u02fp5X7.js} +2 -2
  99. data/dist/chunks/{pb_form_validation-TzZQ0Flx.js → pb_form_validation-iGj5wwU2.js} +1 -1
  100. data/dist/chunks/vendor.js +1 -1
  101. data/dist/menu.yml +4 -0
  102. data/dist/playbook-doc.js +1 -1
  103. data/dist/playbook-rails-react-bindings.js +1 -1
  104. data/dist/playbook-rails.js +1 -1
  105. data/dist/playbook.css +1 -1
  106. data/lib/playbook/classnames.rb +1 -0
  107. data/lib/playbook/spacing.rb +31 -2
  108. data/lib/playbook/version.rb +1 -1
  109. metadata +43 -10
  110. data/dist/chunks/_typeahead-D-4y9pbv.js +0 -22
  111. data/dist/chunks/_weekday_stacked-Cax4nrUa.js +0 -45
  112. data/dist/chunks/lazysizes-DHz07jlL.js +0 -1
  113. /data/app/pb_kits/playbook/pb_pagination/docs/{_pagination_default.md → _pagination_default_rails.md} +0 -0
@@ -63,7 +63,7 @@ test('typeahead with pills', () => {
63
63
  )
64
64
 
65
65
  const kit = screen.getByTestId('pills-test')
66
- const pill = kit.querySelector(".pb_form_pill_kit_primary")
66
+ const pill = kit.querySelector(".pb_form_pill_kit_neutral")
67
67
  expect(pill).toBeInTheDocument()
68
68
  })
69
69
 
@@ -89,7 +89,7 @@ test('typeahead multi select with badges and small pills', () => {
89
89
  )
90
90
 
91
91
  const kit = screen.getByTestId('small-pill-test')
92
- const badge = kit.querySelector(".pb_form_pill_kit_primary.mr_xs.small")
92
+ const badge = kit.querySelector(".pb_form_pill_kit_neutral.mr_xs.small")
93
93
  expect(badge).toBeInTheDocument()
94
94
  })
95
95
 
@@ -107,4 +107,20 @@ test('should pass className prop', () => {
107
107
 
108
108
  const kit = screen.getByTestId('typeahead-test')
109
109
  expect(kit).toHaveClass(className)
110
+ })
111
+
112
+ test('typeahead with colored pills', () => {
113
+ render(
114
+ <Typeahead
115
+ color="primary"
116
+ data={{ testid: 'pills-color-test' }}
117
+ defaultValue={[options[0]]}
118
+ isMulti
119
+ options={options}
120
+ />
121
+ )
122
+
123
+ const kit = screen.getByTestId('pills-color-test')
124
+ const pill = kit.querySelector(".pb_form_pill_kit_primary")
125
+ expect(pill).toBeInTheDocument()
110
126
  })
@@ -45,12 +45,14 @@ type TypeaheadProps = {
45
45
  getOptionLabel?: string | (() => any),
46
46
  getOptionValue?: string | (() => any),
47
47
  name?: string,
48
+ color?: "primary" | "neutral" | "success" | "warning" | "error" | "info" | "data_1" | "data_2" | "data_3" | "data_4" | "data_5" | "data_6" | "data_7" | "data_8" | "windows" | "siding" | "roofing" | "doors" | "gutters" | "solar" | "insulation" | "accessories",
48
49
  } & GlobalProps
49
50
 
50
51
  export type SelectValueType = {
51
52
  label: string,
52
53
  value: string,
53
54
  imageUrl?: string,
55
+ pillColor?: string,
54
56
  }
55
57
 
56
58
  type TagOnChangeValues = {
@@ -76,6 +78,7 @@ const Typeahead = ({
76
78
  htmlOptions = {},
77
79
  id,
78
80
  loadOptions = noop,
81
+ color,
79
82
  ...props
80
83
  }: TypeaheadProps) => {
81
84
  const selectProps = {
@@ -105,6 +108,7 @@ const Typeahead = ({
105
108
  onCreateOption: null as null,
106
109
  plusIcon: false,
107
110
  onMultiValueClick: (_option: SelectValueType): any => undefined,
111
+ pillColor: color,
108
112
  ...props,
109
113
  }
110
114
 
@@ -8,6 +8,7 @@ import { SelectValueType } from '../_typeahead'
8
8
  type Props = {
9
9
  data: SelectValueType,
10
10
  multiValueTemplate: any,
11
+ pillColor?: "neutral" | "primary" | "neutral" | "success" | "warning" | "error",
11
12
  removeProps: any,
12
13
  selectProps: any,
13
14
  }
@@ -15,48 +16,55 @@ type Props = {
15
16
  const MultiValue = (props: Props) => {
16
17
  const { removeProps } = props
17
18
  const { imageUrl, label } = props.data
18
- const { multiKit } = props.selectProps
19
+ const { dark, multiKit, pillColor } = props.selectProps
19
20
 
20
21
  const formPillProps = {
21
22
  marginRight: 'xs',
22
23
  name: label,
23
24
  avatarUrl: '',
25
+ dark,
24
26
  }
25
27
 
26
28
  if (typeof imageUrl === 'string') formPillProps.avatarUrl = imageUrl
27
29
 
28
30
  return (
29
31
  <components.MultiValueContainer
30
- className="text_input_multivalue_container"
31
- {...props}
32
+ className="text_input_multivalue_container"
33
+ {...props}
32
34
  >
33
35
  {multiKit === 'badge' &&
34
36
  <Badge
35
- closeProps={removeProps}
36
- removeIcon
37
- text={label}
38
- variant="primary"
37
+ closeProps={removeProps}
38
+ removeIcon
39
+ text={label}
40
+ variant="primary"
39
41
  />
40
42
  }
41
43
 
42
44
  {multiKit !== 'badge' && imageUrl &&
43
45
  <FormPill
44
- avatarUrl={imageUrl}
45
- closeProps={removeProps}
46
- marginRight="xs"
47
- name={label}
48
- size={multiKit === 'smallPill' ? 'small' : ''}
49
- text=''
46
+ avatarUrl={imageUrl}
47
+ closeProps={removeProps}
48
+ color={pillColor}
49
+ dark={dark}
50
+ marginRight="xs"
51
+ name={label}
52
+ size={multiKit === 'smallPill' ? 'small' : ''}
53
+ text=''
54
+ {...props}
50
55
  />
51
56
  }
52
57
 
53
58
  {multiKit !== 'badge' && !imageUrl &&
54
59
  <FormPill
55
- closeProps={removeProps}
56
- marginRight="xs"
57
- name=''
58
- size={multiKit === 'smallPill' ? 'small' : ''}
59
- text={label}
60
+ closeProps={removeProps}
61
+ color={pillColor}
62
+ dark={dark}
63
+ marginRight="xs"
64
+ name=''
65
+ size={multiKit === 'smallPill' ? 'small' : ''}
66
+ text={label}
67
+ {...props}
60
68
  />
61
69
  }
62
70
  </components.MultiValueContainer>
@@ -0,0 +1,31 @@
1
+ <%
2
+ options = [
3
+ { label: 'Windows', value: '#FFA500' },
4
+ { label: 'Siding', value: '#FF0000' },
5
+ { label: 'Doors', value: '#00FF00' },
6
+ { label: 'Roofs', value: '#0000FF' },
7
+ ]
8
+ %>
9
+
10
+ <%= pb_rails("typeahead", props: { id: "typeahead-pills-example1", color: "primary", default_options: [options.first], options: options, label: "Colors", name: :foo, pills: true }) %>
11
+
12
+ <%= pb_rails("button", props: {id: "clear-pills", text: "Clear All Options", variant: "secondary"}) %>
13
+
14
+ <!-- This section is an example of the available JavaScript event hooks -->
15
+ <%= javascript_tag defer: "defer" do %>
16
+ document.addEventListener("pb-typeahead-kit-typeahead-pills-example1-result-option-select", function(event) {
17
+ console.log('Option selected')
18
+ console.dir(event.detail)
19
+ })
20
+ document.addEventListener("pb-typeahead-kit-typeahead-pills-example1-result-option-remove", function(event) {
21
+ console.log('Option removed')
22
+ console.dir(event.detail)
23
+ })
24
+ document.addEventListener("pb-typeahead-kit-typeahead-pills-example1-result-clear", function() {
25
+ console.log('All options cleared')
26
+ })
27
+
28
+ document.querySelector('#clear-pills').addEventListener('click', function() {
29
+ document.dispatchEvent(new CustomEvent('pb-typeahead-kit-typeahead-pills-example1:clear'))
30
+ })
31
+ <% end %>
@@ -0,0 +1,26 @@
1
+ import React from 'react'
2
+ import { Typeahead } from 'playbook-ui'
3
+
4
+ const options = [
5
+ { label: 'Windows', value: '#FFA500' },
6
+ { label: 'Siding', value: '#FF0000' },
7
+ { label: 'Doors', value: '#00FF00' },
8
+ { label: 'Roofs', value: '#0000FF' },
9
+ ]
10
+
11
+ const TypeaheadWithPills = (props) => {
12
+ return (
13
+ <>
14
+ <Typeahead
15
+ color="primary"
16
+ isMulti
17
+ label="Colors"
18
+ options={options}
19
+ placeholder=""
20
+ {...props}
21
+ />
22
+ </>
23
+ )
24
+ }
25
+
26
+ export default TypeaheadWithPills
@@ -0,0 +1 @@
1
+ Change the form pill color by passing the optional `color` prop. Product, Data, and Status colors are available options. Check them out <a href="playbook.powerapp.cloud/kits/form_pill#form-pill-colors" target="_blank">here</a> in the Form Pill colors example.
@@ -0,0 +1 @@
1
+ Change the form pill color by passing the optional `color` prop. Product, Data, and Status colors are available options. Check them out <a href="playbook.powerapp.cloud/kits/form_pill/react#form-pill-colors" target="_blank">here</a> in the Form Pill colors example.
@@ -9,6 +9,7 @@ examples:
9
9
  - typeahead_inline: Inline
10
10
  - typeahead_multi_kit: Multi Kit Options
11
11
  - typeahead_error_state: Error State
12
+ - typeahead_with_pills_color: With Pills (Custom Color)
12
13
 
13
14
  react:
14
15
  - typeahead_default: Default
@@ -23,3 +24,4 @@ examples:
23
24
  - typeahead_async_createable: Createable (+ Async Data)
24
25
  - typeahead_error_state: Error State
25
26
  - typeahead_custom_menu_list: Custom MenuList
27
+ - typeahead_with_pills_color: With Pills (Custom Color)
@@ -10,3 +10,4 @@ export { default as TypeaheadCreateable } from './_typeahead_createable.jsx'
10
10
  export { default as TypeaheadAsyncCreateable } from './_typeahead_async_createable.jsx'
11
11
  export { default as TypeaheadErrorState } from './_typeahead_error_state.jsx'
12
12
  export { default as TypeaheadCustomMenuList } from './_typeahead_custom_menu_list.jsx'
13
+ export { default as TypeaheadWithPillsColor } from './_typeahead_with_pills_color.jsx'
@@ -34,6 +34,9 @@ module Playbook
34
34
  prop :search_term_minimum_length, default: 3
35
35
  prop :search_debounce_timeout, default: 250
36
36
  prop :value
37
+ prop :color, type: Playbook::Props::Enum,
38
+ values: %w[primary neutral success warning error info data_1 data_2 data_3 data_4 data_5 data_6 data_7 data_8 windows siding roofing doors gutters solar insulation accessories],
39
+ default: "neutral"
37
40
 
38
41
  def classname
39
42
  generate_classname("pb_typeahead_kit")
@@ -58,6 +61,7 @@ module Playbook
58
61
  def typeahead_react_options
59
62
  base_options = {
60
63
  className: classname,
64
+ color: color,
61
65
  dark: dark,
62
66
  defaultValue: default_options,
63
67
  error: error,
@@ -259,6 +259,7 @@ $solar: $product_4_background !default; // deprecated
259
259
  $roofing: $product_5_background !default; // deprecated
260
260
  $gutters: $product_6_background !default; // deprecated
261
261
  $insulation: $product_7_background !default; // deprecated
262
+ $accessories: $product_8_background !default; // added specifically for form_pill product map
262
263
  $product_colors: (
263
264
  windows: $windows,
264
265
  siding: $siding,
@@ -267,6 +268,7 @@ $product_colors: (
267
268
  roofing: $roofing,
268
269
  gutters: $gutters,
269
270
  insulation: $insulation,
271
+ accessories: $accessories,
270
272
  product_1_background: $product_1_background,
271
273
  product_1_highlight: $product_1_highlight,
272
274
  product_2_background: $product_2_background,
@@ -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
+ }
@@ -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>