playbook_ui 14.5.0.pre.alpha.PLAY15814066 → 14.5.0.pre.alpha.javascriptassets3926
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_advanced_table/index.js +0 -60
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +9 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb +9 -1
- data/app/pb_kits/playbook/pb_card/_card.tsx +1 -5
- data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +1 -5
- data/app/pb_kits/playbook/pb_flex/_flex.tsx +1 -3
- data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +2 -8
- data/app/pb_kits/playbook/pb_flex/flex_item.html.erb +6 -3
- data/app/pb_kits/playbook/pb_flex/flex_item.rb +2 -7
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +1 -9
- data/app/pb_kits/playbook/pb_form_pill/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_form_pill/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +228 -195
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +0 -3
- data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +0 -2
- data/app/pb_kits/playbook/pb_popover/_popover.tsx +1 -1
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +1 -4
- data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +1 -3
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +1 -3
- data/app/pb_kits/playbook/utilities/globalPropNames.mjs +0 -3
- data/app/pb_kits/playbook/utilities/globalProps.ts +2 -39
- data/dist/chunks/_typeahead-BYw0HEgO.js +22 -0
- data/dist/chunks/{_weekday_stacked-CaNCkN7U.js → _weekday_stacked-DumiyWjh.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/mark.js +1 -0
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/lib/playbook/kit_base.rb +0 -17
- data/lib/playbook/pb_doc_helper.rb +5 -5
- data/lib/playbook/version.rb +1 -1
- metadata +5 -13
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.html.erb +0 -19
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.jsx +0 -27
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.md +0 -1
- data/app/pb_kits/playbook/pb_multi_level_select/context/index.tsx +0 -5
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children.jsx +0 -105
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children.md +0 -1
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children_with_radios.jsx +0 -106
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children_with_radios.md +0 -1
- data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select_options.tsx +0 -149
- data/dist/chunks/_typeahead-D8vYsn7T.js +0 -22
@@ -21,7 +21,7 @@ import classnames from "classnames";
|
|
21
21
|
import { globalProps, GlobalProps } from "../utilities/globalProps";
|
22
22
|
import { uniqueId } from 'lodash';
|
23
23
|
|
24
|
-
type ModifiedGlobalProps = Omit<GlobalProps, 'minWidth'
|
24
|
+
type ModifiedGlobalProps = Omit<GlobalProps, 'minWidth'>
|
25
25
|
|
26
26
|
type PbPopoverProps = {
|
27
27
|
aria?: { [key: string]: string };
|
@@ -136,15 +136,12 @@ const Typeahead = ({
|
|
136
136
|
}
|
137
137
|
}
|
138
138
|
|
139
|
-
const filteredProps: TypeaheadProps = {...props}
|
140
|
-
delete filteredProps.truncate
|
141
|
-
|
142
139
|
const dataProps = buildDataProps(data)
|
143
140
|
const htmlProps = buildHtmlProps(htmlOptions)
|
144
141
|
const classes = classnames(
|
145
142
|
'pb_typeahead_kit react-select',
|
146
143
|
`mb_${marginBottom}`,
|
147
|
-
globalProps(
|
144
|
+
globalProps(props),
|
148
145
|
className
|
149
146
|
)
|
150
147
|
|
@@ -16,7 +16,7 @@ type Props = {
|
|
16
16
|
const MultiValue = (props: Props) => {
|
17
17
|
const { removeProps } = props
|
18
18
|
const { imageUrl, label } = props.data
|
19
|
-
const { dark, multiKit, pillColor
|
19
|
+
const { dark, multiKit, pillColor } = props.selectProps
|
20
20
|
|
21
21
|
const formPillProps = {
|
22
22
|
marginRight: 'xs',
|
@@ -51,7 +51,6 @@ const MultiValue = (props: Props) => {
|
|
51
51
|
name={label}
|
52
52
|
size={multiKit === 'smallPill' ? 'small' : ''}
|
53
53
|
text=''
|
54
|
-
truncate={truncate}
|
55
54
|
{...props}
|
56
55
|
/>
|
57
56
|
}
|
@@ -65,7 +64,6 @@ const MultiValue = (props: Props) => {
|
|
65
64
|
name=''
|
66
65
|
size={multiKit === 'smallPill' ? 'small' : ''}
|
67
66
|
text={label}
|
68
|
-
truncate={truncate}
|
69
67
|
{...props}
|
70
68
|
/>
|
71
69
|
}
|
@@ -65,10 +65,10 @@ module Playbook
|
|
65
65
|
def typeahead_react_options
|
66
66
|
base_options = {
|
67
67
|
className: classname,
|
68
|
+
pillColor: pill_color,
|
68
69
|
dark: dark,
|
69
70
|
defaultValue: default_options,
|
70
71
|
error: error,
|
71
|
-
htmlOptions: html_options,
|
72
72
|
id: id,
|
73
73
|
inline: inline,
|
74
74
|
isMulti: is_multi,
|
@@ -77,10 +77,8 @@ module Playbook
|
|
77
77
|
multiKit: multi_kit,
|
78
78
|
name: name,
|
79
79
|
options: options,
|
80
|
-
pillColor: pill_color,
|
81
80
|
placeholder: placeholder,
|
82
81
|
plusIcon: plus_icon,
|
83
|
-
truncate: truncate,
|
84
82
|
}
|
85
83
|
|
86
84
|
base_options[:getOptionLabel] = get_option_label if get_option_label.present?
|
@@ -170,24 +170,12 @@ type ZIndex = {
|
|
170
170
|
zIndex?: ZIndexType,
|
171
171
|
} | ZIndexResponsiveType
|
172
172
|
|
173
|
-
type Height = {
|
174
|
-
height?: string
|
175
|
-
}
|
176
|
-
|
177
|
-
type MaxHeight = {
|
178
|
-
maxHeight?: string
|
179
|
-
}
|
180
|
-
|
181
|
-
type MinHeight = {
|
182
|
-
minHeight?: string
|
183
|
-
}
|
184
|
-
|
185
173
|
// keep this as the last type definition
|
186
174
|
export type GlobalProps = AlignContent & AlignItems & AlignSelf &
|
187
175
|
BorderRadius & Cursor & Dark & Display & DisplaySizes & Flex & FlexDirection &
|
188
176
|
FlexGrow & FlexShrink & FlexWrap & JustifyContent & JustifySelf &
|
189
177
|
LineHeight & Margin & MinWidth & MaxWidth & NumberSpacing & Order & Overflow & Padding &
|
190
|
-
Position & Shadow & TextAlign & Truncate & VerticalAlign & ZIndex & { hover?: string } & Top & Right & Bottom & Left
|
178
|
+
Position & Shadow & TextAlign & Truncate & VerticalAlign & ZIndex & { hover?: string } & Top & Right & Bottom & Left;
|
191
179
|
|
192
180
|
const getResponsivePropClasses = (prop: {[key: string]: string}, classPrefix: string) => {
|
193
181
|
const keys: string[] = Object.keys(prop)
|
@@ -510,22 +498,7 @@ const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} =
|
|
510
498
|
} else {
|
511
499
|
return verticalAlign ? `vertical_align_${verticalAlign} ` : ''
|
512
500
|
}
|
513
|
-
}
|
514
|
-
|
515
|
-
}
|
516
|
-
|
517
|
-
const PROP_INLINE_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => {[key: string]: any}} = {
|
518
|
-
heightProps: ({ height }: Height) => {
|
519
|
-
return height ? { height } : {};
|
520
|
-
},
|
521
|
-
|
522
|
-
maxHeightProps: ({ maxHeight }: MaxHeight) => {
|
523
|
-
return maxHeight ? { maxHeight } : {};
|
524
|
-
},
|
525
|
-
|
526
|
-
minHeightProps: ({ minHeight }: MinHeight) => {
|
527
|
-
return minHeight ? { minHeight } : {};
|
528
|
-
},
|
501
|
+
}
|
529
502
|
}
|
530
503
|
|
531
504
|
type DefaultProps = {[key: string]: string} | Record<string, unknown>
|
@@ -537,16 +510,6 @@ export const globalProps = (props: GlobalProps, defaultProps: DefaultProps = {})
|
|
537
510
|
}).filter((value) => value?.length > 0).join(" ")
|
538
511
|
}
|
539
512
|
|
540
|
-
// New function for inline styles
|
541
|
-
export const globalInlineProps = (props: GlobalProps): React.CSSProperties => {
|
542
|
-
const styles = Object.keys(PROP_INLINE_CATEGORIES).reduce((acc, key) => {
|
543
|
-
const result = PROP_INLINE_CATEGORIES[key](props);
|
544
|
-
return { ...acc, ...(typeof result === 'object' ? result : {}) }; // Ensure result is an object before spreading
|
545
|
-
}, {});
|
546
|
-
|
547
|
-
return styles; // Return the styles object directly
|
548
|
-
}
|
549
|
-
|
550
513
|
|
551
514
|
export const deprecatedProps = (): void => {
|
552
515
|
// if (process.env.NODE_ENV === 'development') {
|