playbook_ui 14.25.0.pre.alpha.play1986inlineloadingsolidvariant9963 → 14.25.0.pre.alpha.testingcss9700
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +0 -19
- data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +0 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_props_swift.md +2 -3
- data/app/pb_kits/playbook/pb_flex/_flex.tsx +6 -9
- data/app/pb_kits/playbook/pb_flex/docs/_flex_gap.html.erb +1 -12
- data/app/pb_kits/playbook/pb_flex/docs/_flex_gap.jsx +1 -26
- data/app/pb_kits/playbook/pb_flex/docs/_flex_gap.md +9 -0
- data/app/pb_kits/playbook/pb_flex/flex.rb +12 -6
- data/app/pb_kits/playbook/pb_icon/_icon.scss +0 -4
- data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +1 -3
- data/app/pb_kits/playbook/pb_loading_inline/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_loading_inline/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_loading_inline/loading_inline.html.erb +1 -1
- data/app/pb_kits/playbook/pb_loading_inline/loading_inline.rb +0 -11
- data/app/pb_kits/playbook/pb_text_input/text_input.rb +0 -15
- data/app/pb_kits/playbook/pb_user/docs/_user_props_table.md +7 -14
- data/app/pb_kits/playbook/utilities/_gap.scss +24 -12
- data/app/pb_kits/playbook/utilities/globalPropNames.mjs +0 -2
- data/app/pb_kits/playbook/utilities/globalProps.ts +4 -28
- data/dist/chunks/_line_graph-DPTwfQR-.js +544 -0
- data/dist/chunks/_typeahead-CEqlHw0H.js +30978 -0
- data/dist/chunks/_weekday_stacked-D3dG14OB.js +20894 -0
- data/dist/chunks/lazysizes-BUUj27EF.js +611 -0
- data/dist/chunks/lib-CIetbXpr.js +9609 -0
- data/dist/chunks/pb_form_validation-D_g9rOE9.js +60 -0
- data/dist/chunks/vendor.js +11 -1
- data/dist/playbook-doc.js +67243 -3
- data/dist/playbook-rails-react-bindings.js +112 -1
- data/dist/playbook-rails.js +2464 -1
- data/dist/playbook.css +92354 -2
- data/dist/reset.css +89 -1
- data/lib/playbook/classnames.rb +0 -2
- data/lib/playbook/spacing.rb +1 -53
- data/lib/playbook/version.rb +1 -1
- metadata +9 -13
- data/app/pb_kits/playbook/pb_date/date.test.js +0 -506
- data/app/pb_kits/playbook/pb_flex/docs/_flex_gap_rails.md +0 -11
- data/app/pb_kits/playbook/pb_flex/docs/_flex_gap_react.md +0 -11
- data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_variant.html.erb +0 -5
- data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_variant.jsx +0 -24
- data/dist/chunks/_line_graph-CiVc-Cod.js +0 -1
- data/dist/chunks/_typeahead-BQnvz-Ks.js +0 -6
- data/dist/chunks/_weekday_stacked-BkvHv3ZO.js +0 -37
- data/dist/chunks/lazysizes-B7xYodB-.js +0 -1
- data/dist/chunks/lib-CY5ZPzic.js +0 -29
- data/dist/chunks/pb_form_validation-D3b0JKHH.js +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a1eeaf2f62d7b4fd094d05bede8f832f9021bf561d33cd0ac02fcd03e8e700f
|
4
|
+
data.tar.gz: 251d98bd7c327124c0e179dbcfc37f10d65728418a0b6c6a5bee775cdce5b3ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7d20ec1e7dccd4947ed03b7f50e74809c4e8c18a30fc9fb075c4ede04c6053d86cbc7397fa443fdfb6abdfa62b8ad5a77d65a607fe8b4f9d5bb97dcde98bac3
|
7
|
+
data.tar.gz: d2ad121581858362b9250eb43eafb4d30e38b066bb46de721a6a1a6be3746279a2fb5d7f05fa2025cd764c30c938e00700841d74e602a4ea8981bee79e2df297
|
@@ -4,7 +4,6 @@ import classnames from 'classnames'
|
|
4
4
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
5
5
|
import { deprecatedProps, globalProps, GlobalProps } from '../utilities/globalProps'
|
6
6
|
import { getAllIcons } from "../utilities/icons/allicons"
|
7
|
-
import { camelToSnakeCase } from '../utilities/text'
|
8
7
|
|
9
8
|
import datePickerHelper from './date_picker_helper'
|
10
9
|
import Icon from '../pb_icon/_icon'
|
@@ -115,20 +114,6 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
|
|
115
114
|
const inputAriaProps = buildAriaProps(inputAria)
|
116
115
|
const inputDataProps = buildDataProps(inputData)
|
117
116
|
|
118
|
-
// Convert cursor prop to CSS-style format to apply to input tag below
|
119
|
-
const getCursorStyle = (cursor?: string): string => {
|
120
|
-
// If input is disabled, always use 'not-allowed'
|
121
|
-
if (disableInput) return 'not-allowed'
|
122
|
-
|
123
|
-
// If cursor prop is provided, convert it to styling format
|
124
|
-
if (cursor) {
|
125
|
-
return camelToSnakeCase(cursor).replace(/_/g, '-')
|
126
|
-
}
|
127
|
-
|
128
|
-
// Default to 'pointer'
|
129
|
-
return 'pointer'
|
130
|
-
}
|
131
|
-
|
132
117
|
useEffect(() => {
|
133
118
|
datePickerHelper({
|
134
119
|
allowInput,
|
@@ -164,7 +149,6 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
|
|
164
149
|
required: false,
|
165
150
|
}, scrollContainer)
|
166
151
|
}, initializeOnce ? [] : undefined)
|
167
|
-
|
168
152
|
const filteredProps = {...props}
|
169
153
|
if (filteredProps.marginBottom === undefined) {
|
170
154
|
filteredProps.marginBottom = "sm"
|
@@ -179,7 +163,6 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
|
|
179
163
|
error ? 'error' : null,
|
180
164
|
className
|
181
165
|
)
|
182
|
-
|
183
166
|
const iconWrapperClass = () => {
|
184
167
|
let base = 'cal_icon_wrapper'
|
185
168
|
if (dark) {
|
@@ -193,7 +176,6 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
|
|
193
176
|
}
|
194
177
|
return base
|
195
178
|
}
|
196
|
-
|
197
179
|
const angleDown = getAllIcons()["angleDown"].icon as unknown as { [key: string]: SVGElement }
|
198
180
|
|
199
181
|
return (
|
@@ -224,7 +206,6 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
|
|
224
206
|
name={name}
|
225
207
|
onChange={inputOnChange}
|
226
208
|
placeholder={placeholder}
|
227
|
-
style={{ cursor: getCursorStyle(filteredProps.cursor) }}
|
228
209
|
value={inputValue}
|
229
210
|
/>
|
230
211
|
|
data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_props_swift.md
CHANGED
@@ -2,8 +2,7 @@
|
|
2
2
|
| Name | Type | Description | Default | Values |
|
3
3
|
| --- | ----------- | --------- | --------- | --------- |
|
4
4
|
| **text** | `String` |`Value for the toast message` | `nil` | |
|
5
|
-
| **
|
6
|
-
|
7
|
-
| **variant** | `Variant` | `Determines the type pf toast message being displayed` | `.custom()` | `error` `success` `neutral` `custom()` |
|
5
|
+
| **variant** | `Variant` | `Determines the type pf toast message being displayed` | `.custom()` | `error`, `success`,
|
6
|
+
`neutral`, `custom()` |
|
8
7
|
| **actionView** | `dismissAction` | Dismisses the toast message | `.default` | `default` `custom()` `withTimer()` |
|
9
8
|
| **dismissAction** | `(() -> Void)` | `Triggers the dismiss action` | | |
|
@@ -4,9 +4,6 @@ import { buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
|
4
4
|
import { GlobalProps, globalProps, globalInlineProps } from '../utilities/globalProps'
|
5
5
|
import { GenericObject, Sizes } from '../types'
|
6
6
|
|
7
|
-
type SizeType = Sizes | "none"
|
8
|
-
type SizeResponsiveType = { [key: string]: SizeType }
|
9
|
-
|
10
7
|
type FlexProps = {
|
11
8
|
children: React.ReactChild[] | React.ReactNode,
|
12
9
|
className?: string,
|
@@ -21,9 +18,9 @@ type FlexProps = {
|
|
21
18
|
reverse?: boolean,
|
22
19
|
vertical?: "top" | "center" | "bottom" | "stretch" | "baseline" | "none",
|
23
20
|
align?: "start" | "center" | "end" | "stretch" | "baseline" | "none",
|
24
|
-
gap?:
|
25
|
-
rowGap?:
|
26
|
-
columnGap?:
|
21
|
+
gap?: Sizes | "none",
|
22
|
+
rowGap?: Sizes| "none",
|
23
|
+
columnGap?: Sizes| "none",
|
27
24
|
wrap?: boolean,
|
28
25
|
alignSelf?: "start" | "end" | "center" | "stretch" | "none"
|
29
26
|
} & GlobalProps
|
@@ -56,9 +53,9 @@ const Flex = (props: FlexProps): React.ReactElement => {
|
|
56
53
|
const alignClass = align !== 'none' ? `align_items_${align}` : `align_items_${vertical}`
|
57
54
|
const inlineClass = inline === true ? 'inline' : ''
|
58
55
|
const spacingClass = spacing !== undefined ? `spacing_${spacing}` : ''
|
59
|
-
const gapClass =
|
60
|
-
const rowGapClass =
|
61
|
-
const columnGapClass =
|
56
|
+
const gapClass = gap !== 'none' ? `gap_${gap}` : ''
|
57
|
+
const rowGapClass = rowGap !== 'none' ? `rowGap_${rowGap}` : ''
|
58
|
+
const columnGapClass = columnGap !== 'none' ? `columnGap_${columnGap}` : ''
|
62
59
|
const wrapClass = wrap === true ? 'wrap' : ''
|
63
60
|
const reverseClass = reverse === true ? 'reverse' : ''
|
64
61
|
const alignSelfClass = alignSelf !== 'none' ? `align_self_${alignSelf}` : ''
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= pb_rails("title", props: {size: 4, text: "
|
1
|
+
<%= pb_rails("title", props: {size: 4, text: "Row"}) %>
|
2
2
|
<br/>
|
3
3
|
<div class="flex-doc-example">
|
4
4
|
<%= pb_rails("flex", props:{ gap: "xxs", wrap:true}) do %>
|
@@ -31,14 +31,3 @@
|
|
31
31
|
<%= pb_rails("flex/flex_item") do %>4<% end %>
|
32
32
|
<% end %>
|
33
33
|
</div>
|
34
|
-
|
35
|
-
<br/><br/>
|
36
|
-
<%= pb_rails("title", props: {size: 4, text: "Responsive"}) %>
|
37
|
-
<br/>
|
38
|
-
<div class="flex-doc-example">
|
39
|
-
<%= pb_rails("flex", props: { gap: { xs: "none", sm: "sm", md: "md", lg: "lg", xl: "xl" }, wrap: true }) do %>
|
40
|
-
<% 40.times do |i| %>
|
41
|
-
<%= pb_rails("flex/flex_item") do %> <%=i%> <% end %>
|
42
|
-
<% end %>
|
43
|
-
<% end %>
|
44
|
-
</div>
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import Flex from '../../pb_flex/_flex'
|
3
3
|
import FlexItem from '../../pb_flex/_flex_item'
|
4
|
-
import Title from '../../pb_title/_title'
|
5
4
|
|
6
5
|
const FlexGap = (props) => {
|
7
6
|
const count = () => {
|
@@ -14,8 +13,6 @@ const FlexGap = (props) => {
|
|
14
13
|
|
15
14
|
return (
|
16
15
|
<>
|
17
|
-
<Title size={4}>Gap</Title>
|
18
|
-
<br />
|
19
16
|
<div className="flex-doc-example">
|
20
17
|
<Flex
|
21
18
|
gap="xxs"
|
@@ -30,10 +27,8 @@ const FlexGap = (props) => {
|
|
30
27
|
</Flex>
|
31
28
|
</div>
|
32
29
|
|
33
|
-
<br /><br />
|
34
|
-
|
35
|
-
<Title size={4}>Column Gap</Title>
|
36
30
|
<br />
|
31
|
+
|
37
32
|
<div className="flex-doc-example">
|
38
33
|
<Flex
|
39
34
|
columnGap="lg"
|
@@ -53,9 +48,6 @@ const FlexGap = (props) => {
|
|
53
48
|
</FlexItem>
|
54
49
|
</Flex>
|
55
50
|
</div>
|
56
|
-
<br /><br />
|
57
|
-
|
58
|
-
<Title size={4}>Row Gap</Title>
|
59
51
|
<br />
|
60
52
|
<div className="flex-doc-example">
|
61
53
|
<Flex
|
@@ -77,23 +69,6 @@ const FlexGap = (props) => {
|
|
77
69
|
</FlexItem>
|
78
70
|
</Flex>
|
79
71
|
</div>
|
80
|
-
|
81
|
-
<br /><br />
|
82
|
-
<Title size={4}>Responsive</Title>
|
83
|
-
<br />
|
84
|
-
<div className="flex-doc-example">
|
85
|
-
<Flex
|
86
|
-
gap={{ xs: "none", sm: "sm", md: "md", lg: "lg", xl: "xl" }}
|
87
|
-
wrap
|
88
|
-
{...props}
|
89
|
-
>
|
90
|
-
{count().map((v, key) => (
|
91
|
-
<FlexItem key={key}>
|
92
|
-
{v}
|
93
|
-
</FlexItem>
|
94
|
-
))}
|
95
|
-
</Flex>
|
96
|
-
</div>
|
97
72
|
</>
|
98
73
|
)
|
99
74
|
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
##### Prop
|
2
|
+
|
3
|
+
* `gap` | `row_gap` | `rowGap` | `column_gap` | `columnGap` | **Type**: String | **Values**: xxs | xs | sm | md | lg | xl | none
|
4
|
+
|
5
|
+
- Setting the gap prop sets the row_gap || rowGap and the column_gap || columnGap props to the same size and creates equal space within a flex container.
|
6
|
+
|
7
|
+
- Setting the row_gap || rowGap prop creates space between rows in a flex container.
|
8
|
+
|
9
|
+
- Setting the column_gap || columnGap prop creates space between columns in a flex container.
|
@@ -24,11 +24,17 @@ module Playbook
|
|
24
24
|
default: "none",
|
25
25
|
deprecated: true
|
26
26
|
|
27
|
-
prop :gap
|
27
|
+
prop :gap, type: Playbook::Props::Enum,
|
28
|
+
values: %w[xxs xs sm md lg xl none],
|
29
|
+
default: "none"
|
28
30
|
|
29
|
-
prop :row_gap
|
31
|
+
prop :row_gap, type: Playbook::Props::Enum,
|
32
|
+
values: %w[xxs xs sm md lg xl none],
|
33
|
+
default: "none"
|
30
34
|
|
31
|
-
prop :column_gap
|
35
|
+
prop :column_gap, type: Playbook::Props::Enum,
|
36
|
+
values: %w[xxs xs sm md lg xl none],
|
37
|
+
default: "none"
|
32
38
|
|
33
39
|
prop :reverse, type: Playbook::Props::Boolean,
|
34
40
|
default: false
|
@@ -127,7 +133,7 @@ module Playbook
|
|
127
133
|
end
|
128
134
|
|
129
135
|
def gap_class
|
130
|
-
if gap == "none"
|
136
|
+
if gap == "none"
|
131
137
|
nil
|
132
138
|
else
|
133
139
|
"gap_#{gap}"
|
@@ -135,7 +141,7 @@ module Playbook
|
|
135
141
|
end
|
136
142
|
|
137
143
|
def row_gap_class
|
138
|
-
if row_gap == "none"
|
144
|
+
if row_gap == "none"
|
139
145
|
nil
|
140
146
|
else
|
141
147
|
"rowGap_#{row_gap}"
|
@@ -143,7 +149,7 @@ module Playbook
|
|
143
149
|
end
|
144
150
|
|
145
151
|
def column_gap_class
|
146
|
-
if column_gap == "none"
|
152
|
+
if column_gap == "none"
|
147
153
|
nil
|
148
154
|
else
|
149
155
|
"columnGap_#{column_gap}"
|
@@ -16,7 +16,6 @@ type LoadingInlineProps = {
|
|
16
16
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
17
17
|
id?: string,
|
18
18
|
text?: string,
|
19
|
-
variant?: "dotted" | "solid" ,
|
20
19
|
}
|
21
20
|
|
22
21
|
const LoadingInline = (props: LoadingInlineProps) => {
|
@@ -29,7 +28,6 @@ const LoadingInline = (props: LoadingInlineProps) => {
|
|
29
28
|
htmlOptions = {},
|
30
29
|
id,
|
31
30
|
text = ' Loading',
|
32
|
-
variant = 'dotted',
|
33
31
|
} = props
|
34
32
|
|
35
33
|
const ariaProps = buildAriaProps(aria)
|
@@ -56,7 +54,7 @@ const LoadingInline = (props: LoadingInlineProps) => {
|
|
56
54
|
<Icon
|
57
55
|
aria={{ label: 'loading icon' }}
|
58
56
|
fixedWidth
|
59
|
-
icon=
|
57
|
+
icon="spinner"
|
60
58
|
pulse
|
61
59
|
/>
|
62
60
|
{text}
|
@@ -3,11 +3,9 @@ examples:
|
|
3
3
|
rails:
|
4
4
|
- loading_inline_default: Default
|
5
5
|
- loading_inline_custom: Custom Text
|
6
|
-
- loading_inline_variant: Variant
|
7
6
|
|
8
7
|
|
9
8
|
|
10
9
|
react:
|
11
10
|
- loading_inline_default: Default
|
12
11
|
- loading_inline_custom: Custom Text
|
13
|
-
- loading_inline_variant: Variant
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%= pb_content_tag do %>
|
2
2
|
|
3
3
|
<%= pb_rails("body", props: { color: "light", dark: object.dark }) do %>
|
4
|
-
<%= pb_rails("icon", props: { aria: { label: "loading icon" }, fixed_width: true, icon:
|
4
|
+
<%= pb_rails("icon", props: { aria: { label: "loading icon" }, fixed_width: true, icon: "spinner", pulse: true }) %> <%= object.text %>
|
5
5
|
<% end %>
|
6
6
|
<% end %>
|
@@ -8,21 +8,10 @@ module Playbook
|
|
8
8
|
default: "left"
|
9
9
|
prop :dark, type: Playbook::Props::Boolean, default: false
|
10
10
|
prop :text, type: Playbook::Props::String, default: "Loading"
|
11
|
-
prop :variant, type: Playbook::Props::Enum,
|
12
|
-
values: %w[dotted solid],
|
13
|
-
default: "dotted"
|
14
11
|
|
15
12
|
def classname
|
16
13
|
generate_classname("pb_loading_inline_kit", align)
|
17
14
|
end
|
18
|
-
|
19
|
-
def spinner_icon
|
20
|
-
if variant == "dotted"
|
21
|
-
"spinner"
|
22
|
-
elsif variant == "solid"
|
23
|
-
"spinner-solid"
|
24
|
-
end
|
25
|
-
end
|
26
15
|
end
|
27
16
|
end
|
28
17
|
end
|
@@ -77,7 +77,6 @@ module Playbook
|
|
77
77
|
name: mask.present? ? "" : name,
|
78
78
|
pattern: validation_pattern || mask_pattern,
|
79
79
|
placeholder: placeholder,
|
80
|
-
style: "cursor: #{cursor_style}",
|
81
80
|
required: required,
|
82
81
|
type: type,
|
83
82
|
value: value,
|
@@ -85,20 +84,6 @@ module Playbook
|
|
85
84
|
}.merge(input_options)
|
86
85
|
end
|
87
86
|
|
88
|
-
def cursor_style
|
89
|
-
# If input is disabled, always use 'not-allowed'
|
90
|
-
return "not-allowed" if disabled
|
91
|
-
|
92
|
-
# If cursor prop is provided, convert it to kebab-case
|
93
|
-
if cursor.present?
|
94
|
-
# Convert camelCase (ex. notAllowed) to kebab-case (ex. not-allowed)
|
95
|
-
cursor.to_s.gsub(/([a-z\d])([A-Z])/, '\1-\2').downcase
|
96
|
-
else
|
97
|
-
# Default to 'pointer'
|
98
|
-
"pointer"
|
99
|
-
end
|
100
|
-
end
|
101
|
-
|
102
87
|
def validation_message
|
103
88
|
validation[:message] || ""
|
104
89
|
end
|
@@ -1,18 +1,11 @@
|
|
1
1
|
### Props
|
2
2
|
| Name | Type | Description | Default | Values |
|
3
3
|
| --- | ----------- | --------- | --------- | --------- |
|
4
|
-
| **name** | `String` | Sets the User's name |
|
5
|
-
| **nameFont** | `Typography` | Font styling for the user's name | `.init(font: .title4, variant: .bold)` | |
|
6
|
-
| **image** | `Image?` | Sets image for the avatar | `nil` | |
|
7
|
-
| **orientation** | `Orientation` | Changes the orientation of the User | `.horizontal` | `.horizontal` `.vertical` |
|
8
|
-
| **size** | `Size` | Changes the size of the User | `.medium` | `.xxSmall` `.xSmall` `.small` `.medium` `.large` `.xLarge` |
|
9
|
-
| **territory** | `String?` | Adds the User's territory | `nil` | |
|
10
|
-
| **title** | `String?` | Adds a title | `nil` | |
|
11
|
-
| **subtitle** | `AnyView?` | Adds a subtitle view | `nil` | |
|
12
|
-
| **status** | `PBOnlineStatus.Status?` | An indicator for the current status of the user | `nil` | `.online` `.away` `.offline` |
|
4
|
+
| **name** | `String` | Sets the User's name | | |
|
13
5
|
| **displayAvatar** | `Bool` | Displays the User's avatar | `true` | `true` `false` |
|
14
|
-
| **
|
15
|
-
| **
|
16
|
-
| **
|
17
|
-
| **
|
18
|
-
|
6
|
+
| **image** | `Image` | Sets image for the avatar | | |
|
7
|
+
| **orientation** | `Orientation` | Changes the orientation of the User | `.horizontal` | `.horizontal` `.verticle` |
|
8
|
+
| **size** | `UserAvatarSize` | Changes the size of the User | `.medium` | `.small` `.medium` `.large` |
|
9
|
+
| **territory** | `String` | Adds the User's territory | | |
|
10
|
+
| **title** | `String` | Adds a title | | |
|
11
|
+
| **status** | `PBAvatar.PresenceStatus?` | An idicator for the current status of the user | `.none` | `.online` `.away` `.offline` |
|
@@ -1,17 +1,29 @@
|
|
1
1
|
@import "spacing";
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
xs: $space_xs,
|
7
|
-
sm: $space_sm,
|
8
|
-
md: $space_md,
|
9
|
-
lg: $space_lg,
|
10
|
-
xl: $space_xl,
|
11
|
-
);
|
3
|
+
.gap_none {
|
4
|
+
gap: 0;
|
5
|
+
}
|
12
6
|
|
13
|
-
|
7
|
+
.gap_xxs {
|
8
|
+
gap: $space_xxs;
|
9
|
+
}
|
14
10
|
|
15
|
-
|
11
|
+
.gap_xs {
|
12
|
+
gap: $space_xs;
|
13
|
+
}
|
16
14
|
|
17
|
-
|
15
|
+
.gap_sm {
|
16
|
+
gap: $space_sm;
|
17
|
+
}
|
18
|
+
|
19
|
+
.gap_md {
|
20
|
+
gap: $space_md;
|
21
|
+
}
|
22
|
+
|
23
|
+
.gap_lg {
|
24
|
+
gap: $space_lg;
|
25
|
+
}
|
26
|
+
|
27
|
+
.gap_xl {
|
28
|
+
gap: $space_xl;
|
29
|
+
}
|
@@ -112,14 +112,6 @@ type Gap = {
|
|
112
112
|
gap?: string,
|
113
113
|
}
|
114
114
|
|
115
|
-
type ColumnGap = {
|
116
|
-
columnGap?: string,
|
117
|
-
}
|
118
|
-
|
119
|
-
type RowGap = {
|
120
|
-
rowGap?: string,
|
121
|
-
}
|
122
|
-
|
123
115
|
type NumberSpacing = {
|
124
116
|
numberSpacing?: "tabular",
|
125
117
|
}
|
@@ -208,7 +200,7 @@ type MinHeight = {
|
|
208
200
|
export type GlobalProps = AlignContent & AlignItems & AlignSelf &
|
209
201
|
BorderRadius & Cursor & Dark & Display & DisplaySizes & Flex & FlexDirection &
|
210
202
|
FlexGrow & FlexShrink & FlexWrap & JustifyContent & JustifySelf &
|
211
|
-
LineHeight & Margin & Width & MinWidth & MaxWidth & Gap &
|
203
|
+
LineHeight & Margin & Width & MinWidth & MaxWidth & Gap & NumberSpacing & Order & Overflow & Padding &
|
212
204
|
Position & Shadow & TextAlign & Truncate & VerticalAlign & ZIndex & { hover?: string } & Top & Right & Bottom & Left & Height & MaxHeight & MinHeight;
|
213
205
|
|
214
206
|
const getResponsivePropClasses = (prop: {[key: string]: string}, classPrefix: string) => {
|
@@ -385,25 +377,9 @@ const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} =
|
|
385
377
|
return css.trimEnd()
|
386
378
|
},
|
387
379
|
gapProps: ({ gap }: Gap) => {
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
return gap ? `gap_${gap}` : ''
|
392
|
-
}
|
393
|
-
},
|
394
|
-
columnGapProps: ({ columnGap }: ColumnGap) => {
|
395
|
-
if (typeof columnGap === 'object') {
|
396
|
-
return getResponsivePropClasses(columnGap, 'column_gap')
|
397
|
-
} else {
|
398
|
-
return columnGap ? `column_gap_${columnGap}` : ''
|
399
|
-
}
|
400
|
-
},
|
401
|
-
rowGapProps: ({ rowGap }: RowGap) => {
|
402
|
-
if (typeof rowGap === 'object') {
|
403
|
-
return getResponsivePropClasses(rowGap, 'row_gap')
|
404
|
-
} else {
|
405
|
-
return rowGap ? `row_gap_${rowGap}` : ''
|
406
|
-
}
|
380
|
+
let css = ''
|
381
|
+
css += gap ? `gap_${gap} ` : ''
|
382
|
+
return css.trimEnd()
|
407
383
|
},
|
408
384
|
minHeightProps: ({ minHeight }: MinHeight) => {
|
409
385
|
const heightValues = ["auto", "xs", "sm", "md", "lg", "xl", "xxl", "xxxl"]
|