playbook_ui 13.21.0.pre.alpha.PBNTR243globalpositioningpropinset2504 → 13.21.0.pre.alpha.PLAY12582474
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_date_picker/_date_picker.scss +2 -1
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +0 -3
- data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +1 -2
- data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +1 -2
- data/app/pb_kits/playbook/pb_date_picker/date_picker.test.js +1 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_date_picker/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_input_styles.scss +2 -1
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +1 -0
- data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +1 -5
- data/app/pb_kits/playbook/pb_text_input/text_input.rb +1 -2
- data/app/pb_kits/playbook/pb_text_input/text_input.test.js +1 -1
- data/app/pb_kits/playbook/utilities/_positioning.scss +10 -23
- data/app/pb_kits/playbook/utilities/globalProps.ts +9 -52
- data/dist/playbook-rails.js +2 -2
- data/lib/playbook/bottom.rb +3 -6
- data/lib/playbook/left.rb +3 -6
- data/lib/playbook/right.rb +3 -6
- data/lib/playbook/top.rb +3 -6
- data/lib/playbook/version.rb +1 -1
- metadata +12 -14
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_margin_bottom.html.erb +0 -7
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_margin_bottom.jsx +0 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1cac7b0753d888ee1b718932bbbb638ebad8f37d7e3b30dfb683dd0a575cbcad
|
4
|
+
data.tar.gz: d9e47ec1c043e9358f3618c0510484ebfce1d346743377228ca016336072dd3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f07bcb349a1e387b6497cbc75fdc31fb39ee33c259515670723642d7484d8da526f20f6484c5beda1086e7d8aa36ecc0b25f0e1b6aa3e021095571949a839e07
|
7
|
+
data.tar.gz: b6c92cff8163105411b1d21bb9b065b725f775af4fea9f760ba945a04437e0f00da16b80cf346a37f5e681da3884f97c30cfa373621ab7409c277704daf2016a
|
@@ -135,9 +135,6 @@ useEffect(() => {
|
|
135
135
|
}, scrollContainer)
|
136
136
|
})
|
137
137
|
const filteredProps = {...props}
|
138
|
-
if (filteredProps.marginBottom === undefined) {
|
139
|
-
filteredProps.marginBottom = "sm"
|
140
|
-
}
|
141
138
|
delete filteredProps?.position
|
142
139
|
|
143
140
|
const classes = classnames(
|
@@ -17,7 +17,6 @@
|
|
17
17
|
error: object.error,
|
18
18
|
id: object.picker_id,
|
19
19
|
label: object.hide_label ? nil : object.label,
|
20
|
-
margin_bottom: "none",
|
21
20
|
name: object.name,
|
22
21
|
placeholder: object.placeholder,
|
23
22
|
required: object.required,
|
@@ -82,4 +81,4 @@
|
|
82
81
|
}
|
83
82
|
})
|
84
83
|
<% end %>
|
85
|
-
<% end %>
|
84
|
+
<% end %>
|
@@ -75,8 +75,7 @@ module Playbook
|
|
75
75
|
default: [1900, 2100]
|
76
76
|
|
77
77
|
def classname
|
78
|
-
|
79
|
-
generate_classname("pb_date_picker_kit") + default_margin_bottom
|
78
|
+
generate_classname("pb_date_picker_kit")
|
80
79
|
end
|
81
80
|
|
82
81
|
def date_picker_config
|
@@ -20,7 +20,6 @@ examples:
|
|
20
20
|
- date_picker_hooks: Hooks
|
21
21
|
- date_picker_year_range: Year Range
|
22
22
|
- date_picker_anti_patterns: Anti-Patterns
|
23
|
-
- date_picker_margin_bottom: Margin Bottom
|
24
23
|
- date_picker_inline: Inline
|
25
24
|
- date_picker_month_and_year: Month & Year Only
|
26
25
|
- date_picker_week: Week
|
@@ -49,7 +48,6 @@ examples:
|
|
49
48
|
- date_picker_flatpickr_methods: Flatpickr Methods
|
50
49
|
- date_picker_hooks: Hooks
|
51
50
|
- date_picker_year_range: Year Range
|
52
|
-
- date_picker_margin_bottom: Margin Bottom
|
53
51
|
- date_picker_inline: Inline
|
54
52
|
- date_picker_month_and_year: Month & Year Only
|
55
53
|
- date_picker_week: Week
|
@@ -19,7 +19,6 @@ export { default as DatePickerWeek } from './_date_picker_week.jsx'
|
|
19
19
|
export { default as DatePickerPositions } from './_date_picker_positions.jsx'
|
20
20
|
export { default as DatePickerPositionsElement } from './_date_picker_positions_element.jsx'
|
21
21
|
export { default as DatePickerAllowInput } from './_date_picker_allow_input'
|
22
|
-
export { default as DatePickerMarginBottom} from './_date_picker_margin_bottom'
|
23
22
|
export { default as DatePickerQuickPickReact } from './_date_picker_quick_pick_react'
|
24
23
|
export { default as DatePickerQuickPickRangeLimit } from './_date_picker_quick_pick_range_limit'
|
25
24
|
export { default as DatePickerOnClose } from './_date_picker_on_close.jsx'
|
@@ -60,10 +60,6 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
|
|
60
60
|
const ariaProps = buildAriaProps(aria)
|
61
61
|
const dataProps = buildDataProps(data)
|
62
62
|
const htmlProps = buildHtmlProps(htmlOptions)
|
63
|
-
const filteredProps = {...props}
|
64
|
-
if (filteredProps.marginBottom === undefined) {
|
65
|
-
filteredProps.marginBottom = "sm"
|
66
|
-
}
|
67
63
|
|
68
64
|
const { alignment, border, icon } = addOn
|
69
65
|
const addOnAlignment = alignment === 'left' ? 'left' : 'right'
|
@@ -78,7 +74,7 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
|
|
78
74
|
'pb_text_input_kit',
|
79
75
|
inline ? 'inline' : "",
|
80
76
|
error ? 'error' : "",
|
81
|
-
globalProps(
|
77
|
+
globalProps(props),
|
82
78
|
className,
|
83
79
|
])
|
84
80
|
const addOnIcon = (
|
@@ -26,8 +26,7 @@ module Playbook
|
|
26
26
|
nested_kit: Playbook::PbTextInput::AddOn
|
27
27
|
|
28
28
|
def classname
|
29
|
-
|
30
|
-
generate_classname("pb_text_input_kit") + default_margin_bottom + error_class + inline_class
|
29
|
+
generate_classname("pb_text_input_kit") + error_class + inline_class
|
31
30
|
end
|
32
31
|
|
33
32
|
def input_tag
|
@@ -88,31 +88,18 @@ $space_classes: (
|
|
88
88
|
|
89
89
|
$positions: "top", "right", "bottom", "left";
|
90
90
|
|
91
|
-
|
92
|
-
@mixin position-property($position, $space_name, $space, $is_inset: false) {
|
93
|
-
@if $space_name == "0" {
|
94
|
-
#{$position}: 0 !important;
|
95
|
-
}
|
96
|
-
@else if $space_name == "auto" or $space_name == "initial" or $space_name == "inherit" {
|
97
|
-
#{$position}: #{$space} !important;
|
98
|
-
}
|
99
|
-
@else {
|
100
|
-
@if $is_inset {
|
101
|
-
#{$position}: #{$space} !important;
|
102
|
-
} @else {
|
103
|
-
#{$position}: #{-$space} !important;
|
104
|
-
}
|
105
|
-
}
|
106
|
-
}
|
107
|
-
|
108
91
|
@each $position in $positions {
|
109
92
|
@each $space_name, $space in $space_classes {
|
110
|
-
$
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
93
|
+
.#{$position}_#{$space_name} {
|
94
|
+
@if $space_name == "0" {
|
95
|
+
#{$position}: 0 !important;
|
96
|
+
}
|
97
|
+
@else if $space_name == "auto" or $space_name == "initial" or $space_name == "inherit" {
|
98
|
+
#{$position}: #{$space} !important;
|
99
|
+
}
|
100
|
+
@else {
|
101
|
+
#{$position}: #{-$space} !important;
|
102
|
+
}
|
116
103
|
}
|
117
104
|
}
|
118
105
|
}
|
@@ -119,19 +119,19 @@ type Position = {
|
|
119
119
|
}
|
120
120
|
|
121
121
|
type Top = {
|
122
|
-
top?: Sizes
|
122
|
+
top?: Sizes,
|
123
123
|
}
|
124
124
|
|
125
125
|
type Right = {
|
126
|
-
right?: Sizes
|
126
|
+
right?: Sizes,
|
127
127
|
}
|
128
128
|
|
129
129
|
type Bottom = {
|
130
|
-
bottom?: Sizes
|
130
|
+
bottom?: Sizes,
|
131
131
|
}
|
132
132
|
|
133
133
|
type Left = {
|
134
|
-
left?: Sizes
|
134
|
+
left?: Sizes,
|
135
135
|
}
|
136
136
|
|
137
137
|
type Shadow = {
|
@@ -441,54 +441,11 @@ const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} =
|
|
441
441
|
return css
|
442
442
|
},
|
443
443
|
|
444
|
-
topProps: ({ top }) => {
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
css += `top_${top.value}_inset`;
|
450
|
-
} else if (typeof top === 'object' && !top.inset) {
|
451
|
-
css += `top_${top.value}`;
|
452
|
-
}
|
453
|
-
return css;
|
454
|
-
},
|
455
|
-
|
456
|
-
rightProps: ({ right }) => {
|
457
|
-
let css = "";
|
458
|
-
if (typeof right === 'string') {
|
459
|
-
css += `right_${right}`;
|
460
|
-
} else if (typeof right === 'object' && right.inset) {
|
461
|
-
css += `right_${right.value}_inset`;
|
462
|
-
} else if (typeof right === 'object' && !right.inset) {
|
463
|
-
css += `right_${right.value}`;
|
464
|
-
}
|
465
|
-
return css;
|
466
|
-
},
|
467
|
-
|
468
|
-
bottomProps: ({ bottom }) => {
|
469
|
-
let css = "";
|
470
|
-
if (typeof bottom === 'string') {
|
471
|
-
css += `bottom_${bottom}`;
|
472
|
-
} else if (typeof bottom === 'object' && bottom.inset) {
|
473
|
-
css += `bottom_${bottom.value}_inset`;
|
474
|
-
} else if (typeof bottom === 'object' && !bottom.inset) {
|
475
|
-
css += `bottom_${bottom.value}`;
|
476
|
-
}
|
477
|
-
return css;
|
478
|
-
},
|
479
|
-
|
480
|
-
leftProps: ({ left }) => {
|
481
|
-
let css = "";
|
482
|
-
if (typeof left === 'string') {
|
483
|
-
css += `left_${left}`;
|
484
|
-
} else if (typeof left === 'object' && left.inset) {
|
485
|
-
css += `left_${left.value}_inset`;
|
486
|
-
}else if (typeof left === 'object' && !left.inset) {
|
487
|
-
css += `left_${left.value}`;
|
488
|
-
}
|
489
|
-
return css;
|
490
|
-
},
|
491
|
-
|
444
|
+
topProps: ({ top }: Top) => top ? `top_${top}` : '',
|
445
|
+
rightProps: ({ right }: Right) => right ? `right_${right}` : '',
|
446
|
+
bottomProps: ({ bottom }: Bottom) => bottom ? `bottom_${bottom}` : '',
|
447
|
+
leftProps: ({ left }: Left) => left ? `left_${left}` : '',
|
448
|
+
|
492
449
|
textAlignProps: ({ textAlign }: TextAlign) => {
|
493
450
|
if (typeof textAlign === 'object') {
|
494
451
|
return getResponsivePropClasses(textAlign, 'text_align')
|