playbook_ui 12.22.0 → 12.23.0.pre.alpha.play698responsivespacingglobalprop701
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_filter/Filter/CurrentFilters.tsx +1 -1
- data/app/pb_kits/playbook/pb_filter/filter.html.erb +16 -15
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +87 -83
- data/app/pb_kits/playbook/tokens/_screen_sizes.scss +29 -0
- data/app/pb_kits/playbook/utilities/_spacing.scss +27 -1
- data/app/pb_kits/playbook/utilities/globalProps.ts +61 -16
- data/lib/playbook/spacing.rb +20 -5
- data/lib/playbook/version.rb +2 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b91dd130cd55fd9c676be19f84344322da9a00d41aae523639d3665771e1d83d
|
4
|
+
data.tar.gz: ea17401df5700535fc82dedd94af7af26e1645da49793a3a4ea4bb40964e8243
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6645923822abde8e36493c0bf266431ca51a6c1c86de9b98a1579b3d3ab149c89795398f04952e9aa0615cedbd91fc60037dc1d39811cccb70a3a9442aaf65d8
|
7
|
+
data.tar.gz: 8e7e9400daa0f600b2ca07fe4a19f05098dfc7c9e433c67dee9fbdb436e08485fa780496bda1c91049079575d27ae92e40d0fcf0ee87e372dcf98c73e16ffb5a
|
@@ -9,22 +9,23 @@
|
|
9
9
|
<div class="maskContainer">
|
10
10
|
<div class="filters">
|
11
11
|
<div class="left_gradient"></div>
|
12
|
-
<% object.filters
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
}) %>
|
22
|
-
</div>
|
23
|
-
<% else %>
|
24
|
-
<div class="filter">
|
25
|
-
<%= pb_rails("caption", props: { text: filter[:name]}) %>
|
26
|
-
<%= pb_rails("title", props: { size: 4, tag:"h4", text: filter[:value]}) %>
|
12
|
+
<% if object.filters&.none? { |filter| filter[:name].present? } %>
|
13
|
+
<div>
|
14
|
+
<%= pb_rails("body", props: {
|
15
|
+
color: "light",
|
16
|
+
padding_left: "xs",
|
17
|
+
size: 4,
|
18
|
+
tag:"span",
|
19
|
+
text: "No Filter Selected"
|
20
|
+
}) %>
|
27
21
|
</div>
|
22
|
+
<% end %>
|
23
|
+
<% object.filters&.each do |filter| %>
|
24
|
+
<% if filter[:name].present? %>
|
25
|
+
<div class="filter">
|
26
|
+
<%= pb_rails("caption", props: { text: filter[:name]}) %>
|
27
|
+
<%= pb_rails("title", props: { size: 4, tag:"h4", text: filter[:value]}) %>
|
28
|
+
</div>
|
28
29
|
<% end %>
|
29
30
|
<% end %>
|
30
31
|
<div class="right_gradient"></div>
|
@@ -2,8 +2,7 @@
|
|
2
2
|
@import "../tokens/titles";
|
3
3
|
@import "../tokens/colors";
|
4
4
|
|
5
|
-
|
6
|
-
[class^=pb_text_input_kit] {
|
5
|
+
[class^="pb_text_input_kit"] {
|
7
6
|
margin-bottom: $space_sm;
|
8
7
|
.pb_text_input_kit_label {
|
9
8
|
margin-bottom: $space_xs;
|
@@ -22,8 +21,8 @@
|
|
22
21
|
overflow: hidden;
|
23
22
|
}
|
24
23
|
input:hover,
|
25
|
-
.text_input:hover{
|
26
|
-
background-color: rgba($focus_input_light
|
24
|
+
.text_input:hover {
|
25
|
+
background-color: rgba($focus_input_light, $opacity_5);
|
27
26
|
}
|
28
27
|
input:focus,
|
29
28
|
.text_input:focus,
|
@@ -32,7 +31,7 @@
|
|
32
31
|
@include pb_textarea_focus;
|
33
32
|
@include transition_default;
|
34
33
|
border-color: $primary;
|
35
|
-
background-color: rgba($focus_input_light
|
34
|
+
background-color: rgba($focus_input_light, $opacity_5);
|
36
35
|
}
|
37
36
|
}
|
38
37
|
&.dark {
|
@@ -52,15 +51,16 @@
|
|
52
51
|
.text_input .placeholder {
|
53
52
|
@include pb_body_light_dark;
|
54
53
|
}
|
55
|
-
input,
|
54
|
+
input,
|
55
|
+
.text_input {
|
56
56
|
@include pb_textarea_dark;
|
57
57
|
@include pb_body_dark;
|
58
58
|
overflow: hidden;
|
59
|
-
background-color: rgba($white
|
59
|
+
background-color: rgba($white, $opacity_1);
|
60
60
|
border-color: rgba($white, 0.15);
|
61
61
|
}
|
62
62
|
input:hover,
|
63
|
-
.text_input:hover{
|
63
|
+
.text_input:hover {
|
64
64
|
background-color: rgba($white, 0.15);
|
65
65
|
}
|
66
66
|
input:focus,
|
@@ -73,7 +73,8 @@
|
|
73
73
|
}
|
74
74
|
&.error {
|
75
75
|
.text_input_wrapper {
|
76
|
-
input,
|
76
|
+
input,
|
77
|
+
.text_input {
|
77
78
|
border-color: $error_dark;
|
78
79
|
}
|
79
80
|
}
|
@@ -81,10 +82,11 @@
|
|
81
82
|
}
|
82
83
|
&.error {
|
83
84
|
.text_input_wrapper {
|
84
|
-
[class*=pb_body_kit] {
|
85
|
+
[class*="pb_body_kit"] {
|
85
86
|
margin-top: $space_xs / 2;
|
86
87
|
}
|
87
|
-
input,
|
88
|
+
input,
|
89
|
+
.text_input {
|
88
90
|
border-color: $error;
|
89
91
|
}
|
90
92
|
}
|
@@ -151,90 +153,92 @@
|
|
151
153
|
}
|
152
154
|
}
|
153
155
|
}
|
154
|
-
}
|
155
156
|
|
156
|
-
.text_input_wrapper_add_on {
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
157
|
+
.text_input_wrapper_add_on {
|
158
|
+
& > [class^="pb_text_input_kit"]:not(:last-child) {
|
159
|
+
.text_input_wrapper_add_on input,
|
160
|
+
[class^="pb_text_input_kit"] .text_input_wrapper_add_on .text_input {
|
161
|
+
border-bottom-right-radius: 0;
|
162
|
+
border-top-right-radius: 0;
|
163
|
+
border-right-width: 0;
|
164
|
+
}
|
165
|
+
}
|
166
|
+
.section-separator span {
|
167
|
+
padding: 0;
|
162
168
|
}
|
163
|
-
}
|
164
|
-
.section-separator span {
|
165
|
-
padding: 0;
|
166
|
-
}
|
167
169
|
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
170
|
+
.add-on {
|
171
|
+
&-card {
|
172
|
+
height: 45px;
|
173
|
+
margin: 0;
|
174
|
+
padding: 0 !important;
|
175
|
+
align-items: center;
|
176
|
+
justify-content: center;
|
177
|
+
width: 45px;
|
178
|
+
}
|
179
|
+
&-icon {
|
180
|
+
color: $text_lt_lighter;
|
181
|
+
}
|
182
|
+
&-card-dark {
|
183
|
+
background-color: rgba($white, $opacity_1);
|
184
|
+
border-color: rgba($white, 0.15);
|
185
|
+
}
|
186
|
+
&-left {
|
187
|
+
.text_input {
|
188
|
+
border-top-left-radius: 0;
|
189
|
+
border-bottom-left-radius: 0;
|
190
|
+
}
|
187
191
|
}
|
188
|
-
}
|
189
192
|
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
193
|
+
&-right {
|
194
|
+
.text_input {
|
195
|
+
border-top-right-radius: 0;
|
196
|
+
border-bottom-right-radius: 0;
|
197
|
+
}
|
194
198
|
}
|
195
199
|
}
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
}
|
205
|
-
|
206
|
-
.card-right-aligned {
|
207
|
-
border-top-left-radius: 0;
|
208
|
-
border-bottom-left-radius: 0;
|
209
|
-
}
|
200
|
+
.text_input:focus ~ .add-on-card-dark {
|
201
|
+
background-color: $focus_input_dark;
|
202
|
+
border-width: 0px;
|
203
|
+
}
|
204
|
+
.card-left-aligned {
|
205
|
+
border-top-right-radius: 0;
|
206
|
+
border-bottom-right-radius: 0;
|
207
|
+
}
|
210
208
|
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
border-right: 0;
|
215
|
-
}
|
216
|
-
.text_input {
|
217
|
-
border-left: 0;
|
218
|
-
padding-left: 16px;
|
219
|
-
}
|
209
|
+
.card-right-aligned {
|
210
|
+
border-top-left-radius: 0;
|
211
|
+
border-bottom-left-radius: 0;
|
220
212
|
}
|
221
|
-
|
222
|
-
|
223
|
-
|
213
|
+
|
214
|
+
.border {
|
215
|
+
&_right_off {
|
216
|
+
.card-left-aligned {
|
217
|
+
border-right: 0;
|
218
|
+
}
|
219
|
+
.text_input {
|
220
|
+
border-left: 0;
|
221
|
+
padding-left: 16px;
|
222
|
+
}
|
224
223
|
}
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
224
|
+
&_left_on {
|
225
|
+
.card-right-aligned {
|
226
|
+
border-left: 0;
|
227
|
+
}
|
229
228
|
}
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
229
|
+
&_right_on {
|
230
|
+
.card-left-aligned {
|
231
|
+
border-right: 0;
|
232
|
+
}
|
234
233
|
}
|
235
|
-
|
236
|
-
|
237
|
-
|
234
|
+
&_left_off {
|
235
|
+
.card-right-aligned {
|
236
|
+
border-left: 0;
|
237
|
+
}
|
238
|
+
.text_input {
|
239
|
+
border-right: 0;
|
240
|
+
padding-right: 0;
|
241
|
+
}
|
238
242
|
}
|
239
243
|
}
|
240
244
|
}
|
@@ -38,6 +38,35 @@ $breakpoints_grid: (
|
|
38
38
|
)
|
39
39
|
);
|
40
40
|
|
41
|
+
$breakpoints_max_only: (
|
42
|
+
xl: (
|
43
|
+
max: $screen-xl-max
|
44
|
+
),
|
45
|
+
lg: (
|
46
|
+
max: $screen-lg-max
|
47
|
+
),
|
48
|
+
md: (
|
49
|
+
max: $screen-md-max
|
50
|
+
),
|
51
|
+
sm: (
|
52
|
+
max: $screen-sm-max
|
53
|
+
),
|
54
|
+
xs: (
|
55
|
+
max: $screen-xs-max,
|
56
|
+
)
|
57
|
+
);
|
58
|
+
|
59
|
+
@mixin break_test($min: null, $max: null) {
|
60
|
+
@if not $max {
|
61
|
+
@media screen and (min-width: $min) {
|
62
|
+
@content;
|
63
|
+
}
|
64
|
+
} @else {
|
65
|
+
@media screen and (max-width: $max) {
|
66
|
+
@content;}
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
41
70
|
@function breakpoint($breakpoint_name) {
|
42
71
|
@return map-get($breakpoints, $breakpoint_name);
|
43
72
|
}
|
@@ -7,7 +7,10 @@ $space_classes: (
|
|
7
7
|
md: $space_md,
|
8
8
|
lg: $space_lg,
|
9
9
|
xl: $space_xl,
|
10
|
-
none: 0
|
10
|
+
none: 0,
|
11
|
+
auto: auto,
|
12
|
+
initial: initial,
|
13
|
+
inherit: inherit
|
11
14
|
);
|
12
15
|
|
13
16
|
$positions: (
|
@@ -41,3 +44,26 @@ $positions: (
|
|
41
44
|
}
|
42
45
|
}
|
43
46
|
}
|
47
|
+
|
48
|
+
@each $size, $size_value in $breakpoints_max_only {
|
49
|
+
@each $position_name, $position in $positions {
|
50
|
+
@each $space_name, $space in $space_classes {
|
51
|
+
$min_size: map-get($size_value, "min");
|
52
|
+
$max_size: map-get($size_value, "max");
|
53
|
+
.#{$position_name}_#{$size}_#{$space_name} {
|
54
|
+
@if type-of($position)=="list" {
|
55
|
+
@each $coordinate in $position {
|
56
|
+
@include break_at( $max_size) {
|
57
|
+
#{$coordinate}: #{$space} !important;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
@else {
|
62
|
+
@include break_at( $max_size) {
|
63
|
+
#{$position}: #{$space} !important;
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
@@ -22,7 +22,7 @@ type AlignItems = {
|
|
22
22
|
type AlignSelf = {
|
23
23
|
alignSelf?: Alignment & ("auto" | "stretch" | "baseline")
|
24
24
|
}
|
25
|
-
type AllSizes = None | Sizes
|
25
|
+
type AllSizes = None | Sizes | "auto" | "initial" | "inherit"
|
26
26
|
|
27
27
|
type BorderRadius = {
|
28
28
|
borderRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "rounded",
|
@@ -153,22 +153,67 @@ const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} =
|
|
153
153
|
padding,
|
154
154
|
}: Margin & Padding) => {
|
155
155
|
let css = ''
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
156
|
+
const spacingProps = {
|
157
|
+
marginRight,
|
158
|
+
marginLeft,
|
159
|
+
marginTop,
|
160
|
+
marginBottom,
|
161
|
+
marginX,
|
162
|
+
marginY,
|
163
|
+
margin,
|
164
|
+
paddingRight,
|
165
|
+
paddingLeft,
|
166
|
+
paddingTop,
|
167
|
+
paddingBottom,
|
168
|
+
paddingX,
|
169
|
+
paddingY,
|
170
|
+
padding,
|
171
|
+
};
|
172
|
+
|
173
|
+
function handleObjectValue(properties: Margin | Padding, prefix: string) {
|
174
|
+
let classResult = '';
|
175
|
+
|
176
|
+
Object.entries(properties).forEach(([key, value]) => {
|
177
|
+
classResult += `${prefix}_${key}_${value} `;
|
178
|
+
});
|
179
|
+
|
180
|
+
return classResult;
|
181
|
+
}
|
182
|
+
|
183
|
+
function getPrefix(key: string) {
|
184
|
+
const prefixes: Record<string, string> = {
|
185
|
+
marginRight: 'mr',
|
186
|
+
marginLeft: 'ml',
|
187
|
+
marginTop: 'mt',
|
188
|
+
marginBottom: 'mb',
|
189
|
+
marginX: 'mx',
|
190
|
+
marginY: 'my',
|
191
|
+
margin: 'm',
|
192
|
+
paddingRight: 'pr',
|
193
|
+
paddingLeft: 'pl',
|
194
|
+
paddingTop: 'pt',
|
195
|
+
paddingBottom: 'pb',
|
196
|
+
paddingX: 'px',
|
197
|
+
paddingY: 'py',
|
198
|
+
padding: 'p',
|
199
|
+
};
|
200
|
+
|
201
|
+
return prefixes[key];
|
202
|
+
}
|
203
|
+
|
204
|
+
Object.entries(spacingProps).forEach(([key, value]) => {
|
205
|
+
if (value) {
|
206
|
+
if (typeof value === 'object') {
|
207
|
+
css += handleObjectValue(value, getPrefix(key));
|
208
|
+
} else {
|
209
|
+
const prefix = getPrefix(key);
|
210
|
+
css += `${prefix}_${value} `;
|
211
|
+
}
|
212
|
+
}
|
213
|
+
});
|
214
|
+
return css.trim();
|
171
215
|
},
|
216
|
+
|
172
217
|
darkProps: ({ dark }: Dark) => dark ? 'dark' : '',
|
173
218
|
numberSpacingProps: ({ numberSpacing }: NumberSpacing) => {
|
174
219
|
let css = ''
|
data/lib/playbook/spacing.rb
CHANGED
@@ -50,17 +50,32 @@ module Playbook
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def spacing_values
|
53
|
-
%w[none xxs xs sm md lg xl]
|
53
|
+
%w[none xxs xs sm md lg xl auto initial inherit]
|
54
|
+
end
|
55
|
+
|
56
|
+
def screen_size_values
|
57
|
+
%w[xs sm md lg xl]
|
54
58
|
end
|
55
59
|
|
56
60
|
def spacing_props
|
57
61
|
selected_props = spacing_options.keys.select { |sk| try(sk) }
|
58
62
|
return nil unless selected_props.present?
|
59
63
|
|
60
|
-
selected_props.
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
+
responsive = selected_props.present? && try(selected_props.first).is_a?(::Hash)
|
65
|
+
css = ""
|
66
|
+
selected_props.each do |prop|
|
67
|
+
spacing_value = send(prop)
|
68
|
+
prefix = spacing_options[prop]
|
69
|
+
if responsive
|
70
|
+
spacing_value.each do |key, value|
|
71
|
+
css += "#{prefix}_#{key}_#{value} " if screen_size_values.include?(key.to_s) && spacing_values.include?(value.to_s)
|
72
|
+
end
|
73
|
+
elsif spacing_values.include?(spacing_value)
|
74
|
+
css += "#{prefix}_#{spacing_value} "
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
css.strip unless css.blank?
|
64
79
|
end
|
65
80
|
|
66
81
|
def max_width_props
|
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 12.
|
4
|
+
version: 12.23.0.pre.alpha.play698responsivespacingglobalprop701
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
8
8
|
- Power Devs
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-05-
|
12
|
+
date: 2023-05-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -2491,7 +2491,7 @@ homepage: http://playbook.powerapp.cloud
|
|
2491
2491
|
licenses:
|
2492
2492
|
- ISC
|
2493
2493
|
metadata: {}
|
2494
|
-
post_install_message:
|
2494
|
+
post_install_message:
|
2495
2495
|
rdoc_options: []
|
2496
2496
|
require_paths:
|
2497
2497
|
- lib
|
@@ -2502,12 +2502,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
2502
2502
|
version: '0'
|
2503
2503
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2504
2504
|
requirements:
|
2505
|
-
- - "
|
2505
|
+
- - ">"
|
2506
2506
|
- !ruby/object:Gem::Version
|
2507
|
-
version:
|
2507
|
+
version: 1.3.1
|
2508
2508
|
requirements: []
|
2509
2509
|
rubygems_version: 3.3.7
|
2510
|
-
signing_key:
|
2510
|
+
signing_key:
|
2511
2511
|
specification_version: 4
|
2512
2512
|
summary: Playbook Design System
|
2513
2513
|
test_files: []
|