playbook_ui 10.22.0 → 10.23.0.pre.cachetest

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -1
  3. data/app/pb_kits/playbook/index.js +3 -0
  4. data/app/pb_kits/playbook/pb_avatar/{_avatar.tsx → _avatar.jsx} +14 -13
  5. data/app/pb_kits/playbook/pb_avatar/_avatar.scss +2 -2
  6. data/app/pb_kits/playbook/pb_avatar/avatar.rb +1 -1
  7. data/app/pb_kits/playbook/pb_avatar/avatar.test.js +1 -1
  8. data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.jsx +1 -1
  9. data/app/pb_kits/playbook/pb_background/_background.jsx +3 -8
  10. data/app/pb_kits/playbook/pb_background/_background.scss +8 -24
  11. data/app/pb_kits/playbook/pb_background/background.rb +6 -6
  12. data/app/pb_kits/playbook/pb_background/docs/_background_image.html.erb +2 -50
  13. data/app/pb_kits/playbook/pb_background/docs/_background_image.jsx +28 -71
  14. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.jsx +1 -5
  15. data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +0 -1
  16. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.jsx +1 -1
  17. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.jsx +1 -1
  18. data/app/pb_kits/playbook/pb_button/_button.jsx +4 -8
  19. data/app/pb_kits/playbook/pb_button/_button.scss +1 -18
  20. data/app/pb_kits/playbook/pb_button/button.rb +3 -13
  21. data/app/pb_kits/playbook/pb_button/button.test.js +0 -13
  22. data/app/pb_kits/playbook/pb_button/docs/_button_accessibility.html.erb +1 -1
  23. data/app/pb_kits/playbook/pb_button/docs/example.yml +0 -4
  24. data/app/pb_kits/playbook/pb_button/docs/index.js +0 -2
  25. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx +1 -1
  26. data/app/pb_kits/playbook/pb_caption/_caption.jsx +1 -1
  27. data/app/pb_kits/playbook/pb_card/_card.jsx +1 -1
  28. data/app/pb_kits/playbook/pb_card/card.html.erb +1 -1
  29. data/app/pb_kits/playbook/pb_card/card.rb +0 -88
  30. data/app/pb_kits/playbook/pb_card/card_body.rb +1 -1
  31. data/app/pb_kits/playbook/pb_checkbox/_checkbox.jsx +1 -1
  32. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.jsx +0 -3
  33. data/app/pb_kits/playbook/pb_circle_chart/circle_chart.rb +0 -1
  34. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.jsx +1 -1
  35. data/app/pb_kits/playbook/pb_collapsible/_collapsible.jsx +1 -1
  36. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleContent.jsx +1 -1
  37. data/app/pb_kits/playbook/pb_currency/_currency.jsx +3 -24
  38. data/app/pb_kits/playbook/pb_currency/currency.rb +3 -12
  39. data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.html.erb +1 -1
  40. data/app/pb_kits/playbook/pb_currency/docs/example.yml +0 -2
  41. data/app/pb_kits/playbook/pb_currency/docs/index.js +0 -1
  42. data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.jsx +1 -1
  43. data/app/pb_kits/playbook/pb_dialog/_dialog.jsx +1 -1
  44. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_body.jsx +1 -1
  45. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.jsx +1 -1
  46. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_header.jsx +1 -1
  47. data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.jsx +1 -1
  48. data/app/pb_kits/playbook/pb_file_upload/_file_upload.jsx +10 -17
  49. data/app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx +1 -1
  50. data/app/pb_kits/playbook/pb_flex/_flex.jsx +1 -1
  51. data/app/pb_kits/playbook/pb_flex/_flex_item.jsx +1 -1
  52. data/app/pb_kits/playbook/pb_flex/docs/_flex_align.jsx +1 -1
  53. data/app/pb_kits/playbook/pb_flex/flex_item.rb +24 -2
  54. data/app/pb_kits/playbook/pb_form_group/_form_group.jsx +1 -1
  55. data/app/pb_kits/playbook/pb_form_pill/_form_pill.jsx +2 -2
  56. data/app/pb_kits/playbook/pb_gauge/_gauge.jsx +0 -3
  57. data/app/pb_kits/playbook/pb_gauge/gauge.rb +0 -1
  58. data/app/pb_kits/playbook/pb_highlight/_highlight.jsx +1 -1
  59. data/app/pb_kits/playbook/pb_icon/_icon.jsx +1 -1
  60. data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.jsx +1 -1
  61. data/app/pb_kits/playbook/pb_image/{_image.tsx → _image.jsx} +15 -11
  62. data/app/pb_kits/playbook/pb_image/_image.scss +3 -3
  63. data/app/pb_kits/playbook/pb_image/image.rb +1 -1
  64. data/app/pb_kits/playbook/pb_image/image.test.js +1 -1
  65. data/app/pb_kits/playbook/pb_label_pill/_label_pill.jsx +1 -1
  66. data/app/pb_kits/playbook/pb_layout/_layout.jsx +1 -1
  67. data/app/pb_kits/playbook/pb_line_graph/_line_graph.jsx +1 -5
  68. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.jsx +0 -1
  69. data/app/pb_kits/playbook/pb_line_graph/line_graph.rb +0 -1
  70. data/app/pb_kits/playbook/pb_list/_list.jsx +1 -1
  71. data/app/pb_kits/playbook/pb_list/_list_item.jsx +1 -1
  72. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.jsx +1 -1
  73. data/app/pb_kits/playbook/pb_online_status/{_online_status.tsx → _online_status.jsx} +6 -4
  74. data/app/pb_kits/playbook/pb_passphrase/_passphrase.jsx +1 -2
  75. data/app/pb_kits/playbook/pb_pill/_pill.jsx +1 -1
  76. data/app/pb_kits/playbook/pb_popover/_popover.jsx +5 -3
  77. data/app/pb_kits/playbook/pb_popover/docs/_popover_close.html.erb +7 -7
  78. data/app/pb_kits/playbook/pb_popover/index.js +9 -4
  79. data/app/pb_kits/playbook/pb_popover/popover.html.erb +1 -1
  80. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.jsx +1 -1
  81. data/app/pb_kits/playbook/pb_progress_step/_progress_step.jsx +1 -1
  82. data/app/pb_kits/playbook/pb_radio/_radio.jsx +1 -1
  83. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.jsx +0 -5
  84. data/app/pb_kits/playbook/pb_table/_table.jsx +1 -1
  85. data/app/pb_kits/playbook/pb_table/_table_row.jsx +1 -1
  86. data/app/pb_kits/playbook/pb_text_input/_text_input.jsx +1 -4
  87. data/app/pb_kits/playbook/pb_text_input/_text_input.scss +1 -1
  88. data/app/pb_kits/playbook/pb_text_input/text_input.test.js +0 -14
  89. data/app/pb_kits/playbook/pb_textarea/_textarea.jsx +0 -1
  90. data/app/pb_kits/playbook/pb_time/_time.jsx +1 -1
  91. data/app/pb_kits/playbook/pb_title/_title.jsx +1 -1
  92. data/app/pb_kits/playbook/pb_toggle/_toggle.jsx +1 -1
  93. data/app/pb_kits/playbook/pb_typeahead/_typeahead.jsx +1 -1
  94. data/app/pb_kits/playbook/pb_user_badge/_user_badge.jsx +1 -1
  95. data/app/pb_kits/playbook/pb_walkthrough/_walkthrough.jsx +1 -1
  96. data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.jsx +1 -1
  97. data/app/pb_kits/playbook/plugins/pb_chart.js +4 -8
  98. data/app/pb_kits/playbook/types.js +4 -0
  99. data/app/pb_kits/playbook/utilities/globalProps.js +3 -81
  100. data/app/pb_kits/playbook/utilities/{props.ts → props.js} +7 -9
  101. data/lib/playbook/classnames.rb +0 -11
  102. data/lib/playbook/kit_base.rb +0 -22
  103. data/lib/playbook/version.rb +2 -2
  104. metadata +9 -43
  105. data/app/pb_kits/playbook/pb_background/docs/_background_image.md +0 -1
  106. data/app/pb_kits/playbook/pb_button/docs/_button_form.html.erb +0 -1
  107. data/app/pb_kits/playbook/pb_button/docs/_button_form.jsx +0 -14
  108. data/app/pb_kits/playbook/pb_button/docs/_button_size.html.erb +0 -3
  109. data/app/pb_kits/playbook/pb_button/docs/_button_size.jsx +0 -26
  110. data/app/pb_kits/playbook/pb_button/docs/_button_size.md +0 -1
  111. data/app/pb_kits/playbook/pb_currency/currency.test.js +0 -35
  112. data/app/pb_kits/playbook/pb_currency/docs/_currency_abbreviated.html.erb +0 -27
  113. data/app/pb_kits/playbook/pb_currency/docs/_currency_abbreviated.jsx +0 -44
  114. data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.js +0 -215
  115. data/app/pb_kits/playbook/pb_file_upload/fileupload.test.js +0 -40
  116. data/app/pb_kits/playbook/utilities/_align_content.scss +0 -29
  117. data/app/pb_kits/playbook/utilities/_align_items.scss +0 -35
  118. data/app/pb_kits/playbook/utilities/_align_self.scss +0 -29
  119. data/app/pb_kits/playbook/utilities/_flex.scss +0 -15
  120. data/app/pb_kits/playbook/utilities/_flex_direction.scss +0 -19
  121. data/app/pb_kits/playbook/utilities/_flex_grow.scss +0 -9
  122. data/app/pb_kits/playbook/utilities/_flex_shrink.scss +0 -9
  123. data/app/pb_kits/playbook/utilities/_flex_wrap.scss +0 -14
  124. data/app/pb_kits/playbook/utilities/_flexbox.scss +0 -11
  125. data/app/pb_kits/playbook/utilities/_justify_content.scss +0 -23
  126. data/app/pb_kits/playbook/utilities/_justify_self.scss +0 -19
  127. data/app/pb_kits/playbook/utilities/_order.scss +0 -55
  128. data/app/pb_kits/playbook/utilities/globalProps.ts +0 -156
  129. data/lib/playbook/align_content.rb +0 -29
  130. data/lib/playbook/align_items.rb +0 -29
  131. data/lib/playbook/align_self.rb +0 -29
  132. data/lib/playbook/flex.rb +0 -29
  133. data/lib/playbook/flex_direction.rb +0 -29
  134. data/lib/playbook/flex_grow.rb +0 -29
  135. data/lib/playbook/flex_shrink.rb +0 -29
  136. data/lib/playbook/flex_wrap.rb +0 -29
  137. data/lib/playbook/justify_content.rb +0 -29
  138. data/lib/playbook/justify_self.rb +0 -29
  139. data/lib/playbook/order.rb +0 -29
@@ -1,215 +0,0 @@
1
- import colors from '../tokens/exports/_colors.scss'
2
- import typography from '../tokens/exports/_typography.scss'
3
-
4
- import Highcharts from 'highcharts'
5
-
6
- const highchartsDarkTheme = {
7
- lang: {
8
- thousandsSep: ',',
9
- },
10
- colors: [
11
- colors.data_1,
12
- colors.data_2,
13
- colors.data_3,
14
- colors.data_4,
15
- colors.data_5,
16
- colors.data_6,
17
- colors.data_7,
18
- ],
19
- chart: {
20
- borderWidth: 0,
21
- borderRadius: 0,
22
- plotBackgroundColor: null,
23
- plotShadow: false,
24
- plotBorderWidth: 0,
25
- },
26
- title: {
27
- style: {
28
- color: colors.text_dk_default,
29
- fontFamily: typography.font_family_base,
30
- fontWeight: typography.regular,
31
- fontSize: typography.heading_3,
32
- },
33
- },
34
- subtitle: {
35
- style: {
36
- fontFamily: typography.font_family_base,
37
- color: colors.text_dk_light,
38
- fontWeight: typography.regular,
39
- fontSize: typography.text_base,
40
- },
41
- },
42
- xAxis: {
43
- gridLineWidth: 0,
44
- lineColor: colors.border_dark,
45
- tickColor: colors.border_dark,
46
- labels: {
47
- style: {
48
- fontFamily: typography.font_family_base,
49
- color: colors.text_dk_lighter,
50
- fontWeight: typography.bold,
51
- fontSize: typography.text_smaller,
52
- },
53
- },
54
- title: {
55
- style: {
56
- color: colors.text_dk_default,
57
- fontFamily: typography.font_family_base,
58
- fontWeight: typography.regular,
59
- fontSize: typography.heading_4,
60
- },
61
- },
62
- },
63
- yAxis: {
64
- alternateGridColor: null,
65
- minorTickInterval: null,
66
- gridLineColor: colors.border_dark,
67
- minorGridLineColor: colors.border_dark,
68
- lineWidth: 0,
69
- tickWidth: 0,
70
- labels: {
71
- style: {
72
- fontFamily: typography.font_family_base,
73
- color: colors.text_dk_lighter,
74
- fontWeight: typography.bold,
75
- fontSize: typography.text_smaller,
76
- },
77
- },
78
- title: {
79
- style: {
80
- fontFamily: typography.font_family_base,
81
- color: colors.text_dk_lighter,
82
- fontWeight: typography.bold,
83
- fontSize: typography.text_smaller,
84
- },
85
- },
86
- },
87
- legend: {
88
- layout: 'horizontal',
89
- align: 'center',
90
- verticalAlign: 'bottom',
91
- itemStyle: {
92
- fontFamily: typography.font_family_base,
93
- color: colors.text_dk_light,
94
- fontWeight: typography.regular,
95
- fontSize: typography.text_smaller,
96
- },
97
- itemHoverStyle: {
98
- color: colors.text_dk_default,
99
- },
100
- itemHiddenStyle: {
101
- color: colors.text_dk_lighter,
102
- },
103
- },
104
- labels: {
105
- style: {
106
- color: colors.primary,
107
- },
108
- },
109
- tooltip: {
110
- backgroundColor: {
111
- linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
112
- stops: [
113
- [0, colors.card_light],
114
- [1, colors.card_light],
115
- ],
116
- },
117
- shadow: false,
118
- borderWidth: 0,
119
- borderRadius: 10,
120
- style: {
121
- fontFamily: typography.font_family_base,
122
- color: colors.text_lt_default,
123
- fontWeight: typography.regular,
124
- fontSize: typography.text_smaller,
125
- },
126
- },
127
- // specific to gauge
128
- // unfilled gauge color
129
- pane: {
130
- background: {
131
- borderColor: colors.border_dark,
132
- },
133
- },
134
-
135
- plotOptions: {
136
- series: {
137
- type: 'area',
138
- nullColor: colors.text_dk_lighter,
139
- fillColor: {
140
- linearGradient: {
141
- x1: 0,
142
- y1: 0,
143
- x2: 0,
144
- y2: 1,
145
- },
146
- stops: [
147
- [0, Highcharts.getOptions().colors[0]],
148
- [1, 'white'],
149
- ],
150
- },
151
- threshold: null,
152
- },
153
-
154
- // GAUGE STYLES
155
- solidgauge: {
156
- borderColor: colors.primary,
157
- borderWidth: 20,
158
- radius: 90,
159
- innerRadius: '90%',
160
- dataLabels: {
161
- borderWidth: 0,
162
- color: colors.text_dk_default,
163
- enabled: true,
164
- style: {
165
- fontFamily: typography.font_family_base,
166
- fontWeight: typography.regular,
167
- fontSize: typography.heading_2,
168
- },
169
- y: -26,
170
- },
171
- },
172
-
173
- // PIE STYLES
174
- pie: {
175
- colors: [
176
- colors.data_1,
177
- colors.data_2,
178
- colors.data_3,
179
- colors.data_4,
180
- colors.data_5,
181
- colors.data_6,
182
- colors.data_7,
183
- ],
184
- dataLabels: {
185
- style: {
186
- fontFamily: typography.font_family_base,
187
- fontSize: typography.text_smaller,
188
- color: colors.text_dk_light,
189
- fontWeight: typography.regular,
190
- },
191
- },
192
- },
193
-
194
- // LINE CHART STYLES
195
- line: {
196
- dataLabels: {
197
- color: colors.text_dk_light,
198
- },
199
- marker: {
200
- lineColor: colors.border_dark,
201
- },
202
- area: {
203
- shadow: false,
204
- states: {
205
- hover: {
206
- lineWidth: 1,
207
- },
208
- },
209
- threshold: null,
210
- },
211
- },
212
- },
213
- }
214
-
215
- export { highchartsDarkTheme }
@@ -1,40 +0,0 @@
1
- import React from 'react'
2
- import { render, screen } from '../utilities/test-utils'
3
-
4
- import FileUpload from './_file_upload'
5
-
6
- const testid = 'fileupload-test'
7
-
8
- test('returns namespaced class name', () => {
9
- render(
10
- <FileUpload
11
- data={{ testid: testid }}
12
- />
13
- )
14
-
15
- const kit = screen.getByTestId(testid)
16
- expect(kit).toHaveClass('pb_file_upload_kit')
17
- })
18
-
19
- test('shows default drag text', () => {
20
- render(
21
- <FileUpload
22
- data={{ testid: testid }}
23
- />
24
- )
25
-
26
- const kit = screen.getByTestId(testid)
27
- expect(kit).toHaveTextContent('Choose a file or drag it here')
28
- })
29
-
30
- test('shows type-specific drag text', () => {
31
- render(
32
- <FileUpload
33
- accept={['image/svg+xml']}
34
- data={{ testid: testid }}
35
- />
36
- )
37
-
38
- const kit = screen.getByTestId(testid)
39
- expect(kit).toHaveTextContent('Choose a file or drag it here. The accepted file types are: svg+xml')
40
- })
@@ -1,29 +0,0 @@
1
- .align_content_start {
2
- display: flex;
3
- align-content: start !important;
4
- }
5
-
6
- .align_content_end {
7
- display: flex;
8
- align-content: end !important;
9
- }
10
-
11
- .align_content_center {
12
- display: flex;
13
- align-content: center !important;
14
- }
15
-
16
- .align_content_space_between {
17
- display: flex;
18
- align-content: space-between !important;
19
- }
20
-
21
- .align_content_space_around {
22
- display: flex;
23
- align-content: space-around !important;
24
- }
25
-
26
- .align_content_space_evenly {
27
- display: flex;
28
- align-content: space-evenly !important;
29
- }
@@ -1,35 +0,0 @@
1
- .align_items_flex_start {
2
- display: flex;
3
- align-items: flex-start !important;
4
- }
5
-
6
- .align_items_flex_end {
7
- display: flex;
8
- align-items: flex-end !important;
9
- }
10
-
11
- .align_items_start {
12
- display: flex;
13
- align-items: start !important;
14
- }
15
-
16
- .align_items_end {
17
- display: flex;
18
- align-items: end !important;
19
- }
20
-
21
-
22
- .align_items_center {
23
- display: flex;
24
- align-items: center !important;
25
- }
26
-
27
- .align_items_baseline {
28
- display: flex;
29
- align-items: baseline !important;
30
- }
31
-
32
- .align_items_stretch {
33
- display: flex;
34
- align-items: stretch !important;
35
- }
@@ -1,29 +0,0 @@
1
- .align_self_start {
2
- display: flex;
3
- align-self: start !important;
4
- }
5
-
6
- .align_self_end {
7
- display: flex;
8
- align-self: end !important;
9
- }
10
-
11
- .align_self_auto {
12
- display: flex;
13
- align-self: auto !important;
14
- }
15
-
16
- .align_self_center {
17
- display: flex;
18
- align-self: center !important;
19
- }
20
-
21
- .align_self_stretch {
22
- display: flex;
23
- align-self: stretch !important;
24
- }
25
-
26
- .align_self_baseline {
27
- display: flex;
28
- align-self: baseline !important;
29
- }
@@ -1,15 +0,0 @@
1
- .flex_auto {
2
- flex: auto !important;
3
- }
4
-
5
- .flex_initial {
6
- flex: initial !important;
7
- }
8
-
9
- .flex_none {
10
- flex: none !important;
11
- }
12
-
13
- .flex_1 {
14
- flex: 1 !important;
15
- }
@@ -1,19 +0,0 @@
1
- .flex_direction_row {
2
- display: flex;
3
- flex-direction: row !important;
4
- }
5
-
6
- .flex_direction_column {
7
- display: flex;
8
- flex-direction: column !important;
9
- }
10
-
11
- .flex_direction_row_reverse {
12
- display: flex;
13
- flex-direction: row-reverse !important;
14
- }
15
-
16
- .flex_direction_column_reverse {
17
- display: flex;
18
- flex-direction: column-reverse !important;
19
- }
@@ -1,9 +0,0 @@
1
- .flex_grow_1 {
2
- display: flex;
3
- flex-grow: 1 !important;
4
- }
5
-
6
- .flex_grow_0 {
7
- display: flex;
8
- flex-grow: 0 !important;
9
- }
@@ -1,9 +0,0 @@
1
- .flex_shrink_1 {
2
- display: flex;
3
- flex-shrink: 1 !important;
4
- }
5
-
6
- .flex_shrink_0 {
7
- display: flex;
8
- flex-shrink: 0 !important;
9
- }
@@ -1,14 +0,0 @@
1
- .flex_wrap_wrap {
2
- display: flex;
3
- flex-wrap: wrap !important;
4
- }
5
-
6
- .flex_wrap_nowrap {
7
- display: flex;
8
- flex-wrap: nowrap !important;
9
- }
10
-
11
- .flex_wrap_wrap_reverse {
12
- display: flex;
13
- flex-wrap: wrap-reverse !important;
14
- }
@@ -1,11 +0,0 @@
1
- @import './utilities/flex_direction';
2
- @import './utilities/justify_content';
3
- @import './utilities/flex_wrap';
4
- @import './utilities/justify_self';
5
- @import './utilities/align_items';
6
- @import './utilities/align_content';
7
- @import './utilities/align_self';
8
- @import './utilities/flex';
9
- @import './utilities/flex_grow';
10
- @import './utilities/flex_shrink';
11
- @import './utilities/order';
@@ -1,23 +0,0 @@
1
- .justify_content_start {
2
- justify-content: start !important;
3
- }
4
-
5
- .justify_content_end {
6
- justify-content: end !important;
7
- }
8
-
9
- .justify_content_center {
10
- justify-content: center !important;
11
- }
12
-
13
- .justify_content_space_between {
14
- justify-content: space-between !important;
15
- }
16
-
17
- .justify_content_space_around {
18
- justify-content: space-around !important;
19
- }
20
-
21
- .justify_content_space_evenly {
22
- justify-content: space-evenly !important;
23
- }
@@ -1,19 +0,0 @@
1
- .justify_self_auto {
2
- justify-self: auto !important;
3
- }
4
-
5
- .justify_self_start {
6
- justify-self: start !important;
7
- }
8
-
9
- .justify_self_end {
10
- justify-self: end !important;
11
- }
12
-
13
- .justify_self_center {
14
- justify-self: center !important;
15
- }
16
-
17
- .justify_self_stretch {
18
- justify-self: stretch !important;
19
- }
@@ -1,55 +0,0 @@
1
- .order_1 {
2
- order: 1 !important;
3
- }
4
-
5
- .order_2 {
6
- order: 2 !important;
7
- }
8
-
9
- .order_3 {
10
- order: 3 !important;
11
- }
12
-
13
- .order_4 {
14
- order: 4 !important;
15
- }
16
-
17
- .order_5 {
18
- order: 5 !important;
19
- }
20
-
21
- .order_6 {
22
- order: 6 !important;
23
- }
24
-
25
- .order_7 {
26
- order: 7 !important;
27
- }
28
-
29
- .order_8 {
30
- order: 8 !important;
31
- }
32
-
33
- .order_9 {
34
- order: 9 !important;
35
- }
36
-
37
- .order_10 {
38
- order: 10 !important;
39
- }
40
-
41
- .order_11 {
42
- order: 11 !important;
43
- }
44
-
45
- .order_12 {
46
- order: 12 !important;
47
- }
48
-
49
- .order_none {
50
- order: none !important;
51
- }
52
-
53
- .order_first {
54
- order: -1 !important;
55
- }
@@ -1,156 +0,0 @@
1
- type Sizes = "xs" | "sm" | "md" | "lg" | "xl"
2
- type None = "none"
3
-
4
- type AllSizes = None & Sizes
5
-
6
- type Margin = {
7
- marginRight?: AllSizes,
8
- marginLeft?: AllSizes,
9
- marginTop?: AllSizes,
10
- marginBottom?: AllSizes,
11
- marginX?: AllSizes,
12
- marginY?: AllSizes,
13
- margin?: AllSizes,
14
- }
15
-
16
- type Padding = {
17
- paddingRight?: AllSizes,
18
- paddingLeft?: AllSizes,
19
- paddingTop?: AllSizes,
20
- paddingBottom?: AllSizes,
21
- paddingX?: AllSizes,
22
- paddingY?: AllSizes,
23
- padding?: AllSizes,
24
- }
25
-
26
- type Dark = {
27
- dark?: boolean,
28
- }
29
-
30
- type NumberSpacing = {
31
- numberSpacing?: "tabular",
32
- }
33
-
34
- type MaxWidth = {
35
- maxWidth?: Sizes,
36
- }
37
-
38
- type ZIndex = {
39
- zIndex?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10,
40
- }
41
-
42
- type Shadow = {
43
- shadow?: "none" | "deep" | "deeper" | "deepest",
44
- }
45
-
46
- type LineHeight = {
47
- lineHeight?: "loosest" | "looser" | "loose" | "normal" | "tight" | "tighter" | "tightest",
48
- }
49
-
50
- type Display = {
51
- display?: "block" | "flex" | "hidden" | "inline_block" | "inline" | "inline_flex",
52
- }
53
-
54
- type Cursor = {
55
- cursor?: "pointer",
56
- }
57
-
58
- type BorderRadius = {
59
- borderRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "rounded",
60
- }
61
-
62
- export type GlobalProps = BorderRadius & Cursor & Dark & Display & LineHeight & Margin & MaxWidth & NumberSpacing & Padding & Shadow & ZIndex
63
-
64
- // Prop categories
65
- const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} = {
66
- spacingProps: ({
67
- marginRight,
68
- marginLeft,
69
- marginTop,
70
- marginBottom,
71
- marginX,
72
- marginY,
73
- margin,
74
- paddingRight,
75
- paddingLeft,
76
- paddingTop,
77
- paddingBottom,
78
- paddingX,
79
- paddingY,
80
- padding,
81
- }: Margin & Padding) => {
82
- let css = ''
83
- css += marginRight ? `mr_${marginRight} ` : ''
84
- css += marginLeft ? `ml_${marginLeft} ` : ''
85
- css += marginTop ? `mt_${marginTop} ` : ''
86
- css += marginBottom ? `mb_${marginBottom} ` : ''
87
- css += marginX ? `mx_${marginX} ` : ''
88
- css += marginY ? `my_${marginY} ` : ''
89
- css += margin ? `m_${margin} ` : ''
90
- css += paddingRight ? `pr_${paddingRight} ` : ''
91
- css += paddingLeft ? `pl_${paddingLeft} ` : ''
92
- css += paddingTop ? `pt_${paddingTop} ` : ''
93
- css += paddingBottom ? `pb_${paddingBottom} ` : ''
94
- css += paddingX ? `px_${paddingX} ` : ''
95
- css += paddingY ? `py_${paddingY} ` : ''
96
- css += padding ? `p_${padding} ` : ''
97
- return css
98
- },
99
- darkProps: ({ dark }: Dark) => {
100
- let css = ''
101
- css += dark ? 'dark' : ''
102
- return css
103
- },
104
- numberSpacingProps: ({ numberSpacing }: NumberSpacing) => {
105
- let css = ''
106
- css += numberSpacing ? `ns_${numberSpacing} ` : ''
107
- return css
108
- },
109
- maxWidthProps: ({ maxWidth }: MaxWidth) => {
110
- let css = ''
111
- css += maxWidth ? `max_width_${maxWidth } ` : ''
112
- return css
113
- },
114
- zIndexProps: ({ zIndex }: ZIndex) => {
115
- let css = ''
116
- css += zIndex ? `z_index_${zIndex } ` : ''
117
- return css
118
- },
119
- shadowProps: ({ shadow }: Shadow) => {
120
- let css = ''
121
- css += shadow ? `shadow_${shadow} ` : ''
122
- return css
123
- },
124
- lineHeightProps: ({ lineHeight }: LineHeight) => {
125
- let css = ''
126
- css += lineHeight ? `line_height_${lineHeight} ` : ''
127
- return css
128
- },
129
- displayProps: ({ display }: Display) => {
130
- let css = ''
131
- css += display ? `display_${display} ` : ''
132
- return css
133
- },
134
- cursorProps: ({ cursor }: Cursor) => {
135
- let css = ''
136
- css += cursor ? `cursor_${cursor} ` : ''
137
- return css
138
- }
139
- }
140
-
141
- // All Exported as a single function
142
- export const globalProps = (props: GlobalProps, defaultProps: {[key: string]: string} | {} = {}): string => {
143
- const allProps = { ...props, ...defaultProps }
144
- return Object.keys(PROP_CATEGORIES).map((key) => {
145
- return PROP_CATEGORIES[key](allProps)
146
- }).join("")
147
- }
148
-
149
- export const deprecatedProps = (kit: string, props: string[] = []): void => {
150
- if (process.env.NODE_ENV === 'development') {
151
- /* eslint no-console: ["error", { allow: ["warn", "error"] }] */
152
- props.forEach((prop) => {
153
- console.warn(`${kit} Kit: The prop '${prop}' is deprecated and will be removed in a future release!`)
154
- })
155
- }
156
- }