playbook_ui 13.14.0 → 13.15.0.pre.alpha.PLAY10851907
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/_playbook.scss +1 -0
- data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +5 -5
- data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.tsx +3 -3
- data/app/pb_kits/playbook/pb_background/_background.tsx +9 -9
- data/app/pb_kits/playbook/pb_badge/_badge.tsx +2 -2
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +3 -3
- data/app/pb_kits/playbook/pb_body/_body.scss +0 -5
- data/app/pb_kits/playbook/pb_body/_body.tsx +5 -9
- data/app/pb_kits/playbook/pb_body/_body_mixins.scss +0 -20
- data/app/pb_kits/playbook/pb_body/body.rb +1 -8
- data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.tsx +3 -4
- data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.tsx +3 -3
- data/app/pb_kits/playbook/pb_button/_button.tsx +40 -37
- data/app/pb_kits/playbook/pb_button/docs/_button_props_swift.md +11 -0
- data/app/pb_kits/playbook/pb_button/docs/_button_reaction_swift.md +26 -0
- data/app/pb_kits/playbook/pb_button/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.tsx +3 -3
- data/app/pb_kits/playbook/pb_caption/_caption.tsx +1 -1
- data/app/pb_kits/playbook/pb_card/_card.tsx +2 -2
- data/app/pb_kits/playbook/pb_card/docs/_card_background.jsx +5 -4
- data/app/pb_kits/playbook/pb_checkbox/_checkbox.tsx +3 -3
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +9 -9
- data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.tsx +1 -1
- data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +5 -7
- data/app/pb_kits/playbook/pb_collapsible/_helper_functions.ts +2 -2
- data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleContent.tsx +5 -4
- data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.tsx +16 -12
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_colors_swift.md +27 -0
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_default_swift.md +22 -0
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_props_table.md +8 -0
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_sizes_swift.md +26 -0
- data/app/pb_kits/playbook/pb_collapsible/docs/example.yml +6 -0
- data/app/pb_kits/playbook/pb_contact/_contact.tsx +3 -3
- data/app/pb_kits/playbook/pb_currency/_currency.tsx +2 -2
- data/app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts +1 -1
- data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +4 -55
- data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +5 -56
- data/app/pb_kits/playbook/pb_dashboard/themeTypes.ts +20 -16
- data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.tsx +1 -1
- data/app/pb_kits/playbook/pb_date/_date.tsx +7 -7
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +1 -1
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.tsx +2 -2
- data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx +2 -2
- data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.tsx +8 -8
- data/app/pb_kits/playbook/pb_date_time/_date_time.tsx +2 -2
- data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.tsx +1 -1
- data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx +2 -2
- data/app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.test.js +6 -3
- data/app/pb_kits/playbook/pb_detail/_detail.scss +2 -2
- data/app/pb_kits/playbook/pb_detail/_detail.tsx +5 -5
- data/app/pb_kits/playbook/pb_detail/detail.rb +1 -1
- data/app/pb_kits/playbook/pb_detail/detail.test.jsx +2 -2
- data/app/pb_kits/playbook/pb_dialog/_close_icon.tsx +2 -2
- data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +42 -34
- data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_body.tsx +1 -1
- data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx +4 -5
- data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_header.tsx +4 -4
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_default_swift.md +11 -0
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_full_height.jsx +8 -4
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_full_height_placement.jsx +8 -4
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_props_table.md +13 -0
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_scrollable.jsx +4 -2
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_sizes_swift.md +18 -0
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_status.jsx +1 -1
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_status_swift.md +14 -0
- data/app/pb_kits/playbook/pb_dialog/docs/example.yml +7 -0
- data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.tsx +5 -5
- data/app/pb_kits/playbook/pb_file_upload/_file_upload.tsx +1 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +1 -1
- data/app/pb_kits/playbook/pb_flex/_flex.tsx +1 -1
- data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +1 -1
- data/app/pb_kits/playbook/pb_form_group/_form_group.tsx +1 -1
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +1 -1
- data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +1 -1
- data/app/pb_kits/playbook/pb_hashtag/_hashtag.tsx +1 -1
- data/app/pb_kits/playbook/pb_highlight/_highlight.tsx +1 -1
- data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +1 -1
- data/app/pb_kits/playbook/pb_icon/_icon.tsx +1 -1
- data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.tsx +1 -1
- data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx +1 -1
- data/app/pb_kits/playbook/pb_icon_value/_icon_value.tsx +1 -1
- data/app/pb_kits/playbook/pb_image/_image.tsx +1 -1
- data/app/pb_kits/playbook/pb_label_pill/_label_pill.tsx +1 -1
- data/app/pb_kits/playbook/pb_label_value/_label_value.tsx +1 -1
- data/app/pb_kits/playbook/pb_layout/_layout.tsx +1 -1
- data/app/pb_kits/playbook/pb_legend/_legend.tsx +1 -1
- data/app/pb_kits/playbook/pb_lightbox/Header/_lightbox_header.tsx +1 -1
- data/app/pb_kits/playbook/pb_lightbox/_lightbox.tsx +1 -1
- data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +1 -1
- data/app/pb_kits/playbook/pb_list/_list.tsx +1 -1
- data/app/pb_kits/playbook/pb_list/_list_item.tsx +1 -1
- data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +1 -1
- data/app/pb_kits/playbook/pb_map/_map.tsx +1 -1
- data/app/pb_kits/playbook/pb_message/_message.tsx +1 -1
- data/app/pb_kits/playbook/pb_message/_message_mention.tsx +1 -1
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +1 -1
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx +1 -1
- data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +1 -1
- data/app/pb_kits/playbook/pb_nav/_item.tsx +1 -1
- data/app/pb_kits/playbook/pb_nav/_nav.tsx +1 -1
- data/app/pb_kits/playbook/pb_nav/docs/_nav_horizontal_bold_swift.md +17 -0
- data/app/pb_kits/playbook/pb_nav/docs/_nav_horizontal_default_swift.md +17 -0
- data/app/pb_kits/playbook/pb_nav/docs/_nav_horizontal_subtle_no_highlight_swift.md +18 -0
- data/app/pb_kits/playbook/pb_nav/docs/_nav_horizontal_subtle_swift.md +18 -0
- data/app/pb_kits/playbook/pb_nav/docs/_nav_props_swift.md +11 -0
- data/app/pb_kits/playbook/pb_nav/docs/_nav_vertical_bold_swift.md +18 -0
- data/app/pb_kits/playbook/pb_nav/docs/_nav_vertical_default_swift.md +18 -0
- data/app/pb_kits/playbook/pb_nav/docs/_nav_vertical_subtle_no_highlight_swift.md +19 -0
- data/app/pb_kits/playbook/pb_nav/docs/_nav_vertical_subtle_swift.md +17 -0
- data/app/pb_kits/playbook/pb_nav/docs/example.yml +17 -0
- data/app/pb_kits/playbook/pb_online_status/_online_status.tsx +1 -1
- data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +52 -51
- data/app/pb_kits/playbook/pb_person/_person.tsx +1 -1
- data/app/pb_kits/playbook/pb_person/docs/_person_default_swift.md +8 -0
- data/app/pb_kits/playbook/pb_person/docs/_person_props_swift.md +5 -0
- data/app/pb_kits/playbook/pb_person/docs/example.yml +4 -0
- data/app/pb_kits/playbook/pb_person_contact/_person_contact.tsx +21 -20
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +5 -4
- data/app/pb_kits/playbook/pb_pill/_pill.tsx +1 -1
- data/app/pb_kits/playbook/pb_popover/_popover.tsx +7 -5
- data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.tsx +21 -21
- data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.tsx +5 -5
- data/app/pb_kits/playbook/pb_progress_step/_progress_step.tsx +1 -1
- data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.tsx +1 -1
- data/app/pb_kits/playbook/pb_radio/_radio.tsx +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/EditorButton.tsx +19 -17
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/EditorTypes.ts +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/MoreExtensionsDropdown.tsx +23 -21
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/Toolbar.tsx +18 -10
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarDropdown.tsx +46 -23
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx +8 -8
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarNodes.tsx +7 -7
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +18 -16
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +10 -8
- data/app/pb_kits/playbook/pb_select/_select.tsx +2 -2
- data/app/pb_kits/playbook/pb_select/docs/_select_default_swift.md +15 -0
- data/app/pb_kits/playbook/pb_select/docs/_select_error_swift.md +18 -0
- data/app/pb_kits/playbook/pb_select/docs/_select_props_table.md +8 -0
- data/app/pb_kits/playbook/pb_select/docs/example.yml +5 -0
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.tsx +1 -1
- data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.tsx +26 -25
- data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.tsx +28 -27
- data/app/pb_kits/playbook/pb_selectable_list/_item.tsx +1 -1
- data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.tsx +3 -2
- data/app/pb_kits/playbook/pb_source/_source.tsx +16 -16
- data/app/pb_kits/playbook/pb_star_rating/_star_rating.tsx +1 -1
- data/app/pb_kits/playbook/pb_stat_change/_stat_change.tsx +1 -1
- data/app/pb_kits/playbook/pb_stat_value/_stat_value.tsx +1 -1
- data/app/pb_kits/playbook/pb_table/_table.tsx +1 -1
- data/app/pb_kits/playbook/pb_table/_table_row.tsx +1 -1
- data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +1 -1
- data/app/pb_kits/playbook/pb_textarea/_textarea.tsx +1 -1
- data/app/pb_kits/playbook/pb_time/_time.tsx +1 -1
- data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.tsx +1 -1
- data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.tsx +1 -1
- data/app/pb_kits/playbook/pb_timeline/_item.tsx +1 -1
- data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +1 -1
- data/app/pb_kits/playbook/pb_timestamp/_timestamp.tsx +1 -1
- data/app/pb_kits/playbook/pb_title/_title.scss +0 -5
- data/app/pb_kits/playbook/pb_title/_title.tsx +2 -5
- data/app/pb_kits/playbook/pb_title/_title_mixin.scss +0 -19
- data/app/pb_kits/playbook/pb_title/title.rb +2 -9
- data/app/pb_kits/playbook/pb_title_count/_title_count.tsx +1 -1
- data/app/pb_kits/playbook/pb_title_detail/_title_detail.tsx +1 -1
- data/app/pb_kits/playbook/pb_toggle/_toggle.tsx +1 -1
- data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +1 -1
- data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.tsx +1 -1
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +1 -1
- data/app/pb_kits/playbook/pb_user/_user.tsx +1 -1
- data/app/pb_kits/playbook/pb_user/docs/_user_horizontal_swift.md +37 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_props_table.md +10 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_size_swift.md +35 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_text_only_swift.md +27 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_vertical_size_swift.md +35 -0
- data/app/pb_kits/playbook/pb_user/docs/example.yml +7 -0
- data/app/pb_kits/playbook/pb_user_badge/_user_badge.tsx +1 -1
- data/app/pb_kits/playbook/pb_walkthrough/_walkthrough.tsx +1 -1
- data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.tsx +1 -1
- data/app/pb_kits/playbook/tokens/exports/exports.d.ts +1 -0
- data/app/pb_kits/playbook/utilities/_truncate.scss +20 -0
- data/app/pb_kits/playbook/utilities/globalProps.ts +13 -2
- data/app/pb_kits/playbook/utilities/props.ts +2 -2
- data/app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js +21 -0
- data/dist/playbook-rails.js +4 -4
- data/lib/playbook/classnames.rb +1 -0
- data/lib/playbook/kit_base.rb +2 -0
- data/lib/playbook/truncate.rb +29 -0
- data/lib/playbook/version.rb +2 -2
- metadata +39 -7
@@ -9,7 +9,7 @@ import { buildHtmlProps } from '../utilities/props'
|
|
9
9
|
|
10
10
|
type FormPillProps = {
|
11
11
|
className?: string,
|
12
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
12
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
13
13
|
id?: string,
|
14
14
|
text: string,
|
15
15
|
name?: string,
|
@@ -22,7 +22,7 @@ type GaugeProps = {
|
|
22
22
|
disableAnimation?: boolean;
|
23
23
|
fullCircle?: boolean;
|
24
24
|
height?: string;
|
25
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
25
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
26
26
|
id?: string;
|
27
27
|
max?: number;
|
28
28
|
min?: number;
|
@@ -14,7 +14,7 @@ type HashtagProps = {
|
|
14
14
|
className?: string,
|
15
15
|
dark?: boolean,
|
16
16
|
data?: string,
|
17
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
17
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
18
18
|
id?: string,
|
19
19
|
newWindow?: boolean,
|
20
20
|
rel?: string,
|
@@ -8,7 +8,7 @@ import { buildHtmlProps } from '../utilities/props'
|
|
8
8
|
type HighlightProps = {
|
9
9
|
className?: string,
|
10
10
|
data?: {[key: string]: string},
|
11
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
11
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
12
12
|
id?: string,
|
13
13
|
children?: React.ReactChild[] | React.ReactChild | string,
|
14
14
|
text?: string,
|
@@ -18,7 +18,7 @@ type HomeAddressStreetProps = {
|
|
18
18
|
data?: { [key: string]: string },
|
19
19
|
dark?: boolean,
|
20
20
|
emphasis: "street" | "city",
|
21
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
21
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
22
22
|
homeId: string,
|
23
23
|
houseStyle: string,
|
24
24
|
homeUrl: string,
|
@@ -28,7 +28,7 @@ type IconProps = {
|
|
28
28
|
fixedWidth?: boolean,
|
29
29
|
flip?: "horizontal" | "vertical" | "both" | "none",
|
30
30
|
icon: string,
|
31
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
31
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
32
32
|
id?: string,
|
33
33
|
inverse?: boolean,
|
34
34
|
listItem?: boolean,
|
@@ -13,7 +13,7 @@ type IconCircleProps = {
|
|
13
13
|
dark?: boolean,
|
14
14
|
data?: {[key:string]: string},
|
15
15
|
icon: string,
|
16
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
16
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
17
17
|
id?: string,
|
18
18
|
size?: "base" | "xs" | "sm" | "md" | "lg" | "xl",
|
19
19
|
variant?: | "default"
|
@@ -16,7 +16,7 @@ type IconStatValueProps = {
|
|
16
16
|
data?: object,
|
17
17
|
dark?: boolean,
|
18
18
|
icon: string,
|
19
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
19
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
20
20
|
id?: string,
|
21
21
|
orientation?: "vertical" | "horizontal",
|
22
22
|
size?: "sm" | "md" | "lg",
|
@@ -14,7 +14,7 @@ type IconValueProps = {
|
|
14
14
|
dark?: boolean,
|
15
15
|
data?: object,
|
16
16
|
icon: string,
|
17
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
17
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
18
18
|
id?: string,
|
19
19
|
text: string,
|
20
20
|
}
|
@@ -8,7 +8,7 @@ type ImageType = {
|
|
8
8
|
aria?: {[key: string]: string},
|
9
9
|
className?: string,
|
10
10
|
data?: {[key: string]: string},
|
11
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
11
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
12
12
|
id?: string,
|
13
13
|
onError?: () => void,
|
14
14
|
size?: "xs" | "sm" | "md" | "lg" | "xl",
|
@@ -11,7 +11,7 @@ type LabelPillProps = {
|
|
11
11
|
aria?: {[key: string]:string},
|
12
12
|
className?: string,
|
13
13
|
data?: {[key: string]:string},
|
14
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
14
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
15
15
|
id?: string,
|
16
16
|
label?: string,
|
17
17
|
pillValue?: string,
|
@@ -17,7 +17,7 @@ type LabelValueProps = {
|
|
17
17
|
dark?: boolean;
|
18
18
|
data?: object;
|
19
19
|
date?: Date;
|
20
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
20
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
21
21
|
id?: string;
|
22
22
|
label: string;
|
23
23
|
value?: string;
|
@@ -12,7 +12,7 @@ type LayoutPropTypes = {
|
|
12
12
|
dark?: boolean,
|
13
13
|
data?: object,
|
14
14
|
full?: boolean,
|
15
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
15
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
16
16
|
position?: "left" | "right",
|
17
17
|
responsive?: boolean,
|
18
18
|
size?: "xs" | "sm" | "md" | "base" | "lg" | "xl",
|
@@ -13,7 +13,7 @@ type LegendProps = {
|
|
13
13
|
color?: string,
|
14
14
|
dark?: boolean,
|
15
15
|
data?: object,
|
16
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
16
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
17
17
|
id?: string,
|
18
18
|
prefixText?: string,
|
19
19
|
text: string,
|
@@ -24,7 +24,7 @@ type LightboxHeaderProps = {
|
|
24
24
|
className?: string;
|
25
25
|
closeable?: boolean;
|
26
26
|
data?: { [key: string]: string | number };
|
27
|
-
htmlOptions?: { [key: string]: string | number | boolean |
|
27
|
+
htmlOptions?: { [key: string]: string | number | boolean | (() => void) };
|
28
28
|
icon?: string;
|
29
29
|
id?: string;
|
30
30
|
onClickRight?: () => void;
|
@@ -15,7 +15,7 @@ type LightboxType = {
|
|
15
15
|
currentPhotoIndex?: number,
|
16
16
|
data?: {[key: string]: string | number},
|
17
17
|
description?: string | any,
|
18
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
18
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
19
19
|
id?: string,
|
20
20
|
photos: [],
|
21
21
|
initialPhoto?: number,
|
@@ -22,7 +22,7 @@ type LineGraphProps = {
|
|
22
22
|
data: number[];
|
23
23
|
}[];
|
24
24
|
gradient?: boolean;
|
25
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
25
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
26
26
|
id: string;
|
27
27
|
pointStart: number;
|
28
28
|
subTitle?: string;
|
@@ -10,7 +10,7 @@ type ListProps = {
|
|
10
10
|
children: React.ReactNode[] | React.ReactNode;
|
11
11
|
dark?: boolean;
|
12
12
|
data?: object;
|
13
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
13
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
14
14
|
id?: string;
|
15
15
|
layout?: "" | "left" | "right";
|
16
16
|
ordered?: boolean;
|
@@ -8,7 +8,7 @@ type ListItemProps = {
|
|
8
8
|
children: React.ReactNode[] | React.ReactNode,
|
9
9
|
className?: string,
|
10
10
|
data?: object,
|
11
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
11
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
12
12
|
id?: string,
|
13
13
|
tabIndex?: number,
|
14
14
|
}
|
@@ -12,7 +12,7 @@ type LoadingInlineProps = {
|
|
12
12
|
aria?: { [key: string]: string },
|
13
13
|
className?: string,
|
14
14
|
data?: { [key: string]: string },
|
15
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
15
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
16
16
|
id?: string,
|
17
17
|
}
|
18
18
|
|
@@ -10,7 +10,7 @@ type MapProps = {
|
|
10
10
|
children?: React.ReactChild[] | React.ReactNode,
|
11
11
|
className?: string,
|
12
12
|
data?: { [key: string]: string },
|
13
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
13
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
14
14
|
id?: string,
|
15
15
|
zoomBtns?: boolean,
|
16
16
|
flyTo?: boolean,
|
@@ -21,7 +21,7 @@ type MessageProps = {
|
|
21
21
|
children?: React.ReactChild[] | React.ReactChild,
|
22
22
|
className?: string,
|
23
23
|
data?: object,
|
24
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
24
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
25
25
|
id?: string,
|
26
26
|
label?: string,
|
27
27
|
message: string,
|
@@ -8,7 +8,7 @@ type MessageMentionProps = {
|
|
8
8
|
children?: React.ReactChild[] | React.ReactChild,
|
9
9
|
className?: string,
|
10
10
|
data?: object,
|
11
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
11
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
12
12
|
id?: string,
|
13
13
|
variant: 'user' | 'self',
|
14
14
|
}
|
@@ -24,7 +24,7 @@ type MultiLevelSelectProps = {
|
|
24
24
|
aria?: { [key: string]: string }
|
25
25
|
className?: string
|
26
26
|
data?: { [key: string]: string }
|
27
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
27
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
28
28
|
id?: string
|
29
29
|
inputDisplay?: "pills" | "none"
|
30
30
|
inputName?: string
|
@@ -13,7 +13,7 @@ type MultipleUsersProps = {
|
|
13
13
|
className?: string,
|
14
14
|
dark?: boolean,
|
15
15
|
data?: { [key: string]: string },
|
16
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
16
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
17
17
|
id?: string,
|
18
18
|
maxDisplayedUsers?: number,
|
19
19
|
reverse?: boolean,
|
@@ -12,7 +12,7 @@ type MultipleUsersStackedProps = {
|
|
12
12
|
className?: string,
|
13
13
|
dark?: boolean,
|
14
14
|
data?: { [key: string]: string },
|
15
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
15
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
16
16
|
id?: string,
|
17
17
|
users: Array<{ [key: string]: string }>,
|
18
18
|
}
|
@@ -21,7 +21,7 @@ type NavItemProps = {
|
|
21
21
|
data?: object;
|
22
22
|
dark?: boolean;
|
23
23
|
fontSize?: "normal" | "small";
|
24
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
24
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
25
25
|
iconLeft?: string;
|
26
26
|
iconRight?: string | string[];
|
27
27
|
onIconRightClick?: () => void;
|
@@ -15,7 +15,7 @@ type NavProps = {
|
|
15
15
|
data?: object,
|
16
16
|
dark?: boolean,
|
17
17
|
highlight?: boolean,
|
18
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
18
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
19
19
|
id?: string,
|
20
20
|
onClick?: React.MouseEventHandler<HTMLElement>,
|
21
21
|
orientation?: "vertical" | "horizontal",
|
@@ -0,0 +1,17 @@
|
|
1
|
+
![nav-horizontal-bold](https://github.com/powerhome/playbook/assets/54749071/f55f31c5-dbf9-40e2-9f08-6a075c7cb56b)
|
2
|
+
|
3
|
+
```swift
|
4
|
+
@State private var selectedHBold: Int = 1
|
5
|
+
|
6
|
+
PBNav(
|
7
|
+
selected: $selectedHBold,
|
8
|
+
variant: .bold,
|
9
|
+
orientation: .horizontal,
|
10
|
+
borders: false
|
11
|
+
) {
|
12
|
+
PBNavItem("Photos")
|
13
|
+
PBNavItem("Music")
|
14
|
+
PBNavItem("Video")
|
15
|
+
PBNavItem("Files")
|
16
|
+
}
|
17
|
+
```
|
@@ -0,0 +1,17 @@
|
|
1
|
+
![nav-horizontal-default](https://github.com/powerhome/playbook/assets/54749071/8731ad83-322f-43f8-8459-76bc425ba30f)
|
2
|
+
|
3
|
+
```swift
|
4
|
+
@State private var selectedHDefault: Int = 1
|
5
|
+
|
6
|
+
PBNav(
|
7
|
+
selected: $selectedHDefault,
|
8
|
+
variant: .normal,
|
9
|
+
orientation: .horizontal
|
10
|
+
) {
|
11
|
+
PBNavItem("Photos")
|
12
|
+
PBNavItem("Music")
|
13
|
+
PBNavItem("Video")
|
14
|
+
PBNavItem("Files")
|
15
|
+
}
|
16
|
+
|
17
|
+
```
|
@@ -0,0 +1,18 @@
|
|
1
|
+
![nav-horizontal-subtle-no-highlight](https://github.com/powerhome/playbook/assets/54749071/ee79fb55-8d5b-46b0-89aa-a310bf48dd19)
|
2
|
+
|
3
|
+
```swift
|
4
|
+
@State private var selectedHSubtleNoHighlight: Int = 1
|
5
|
+
|
6
|
+
PBNav(
|
7
|
+
selected: $selectedHSubtleNoHighlight,
|
8
|
+
variant: .subtle,
|
9
|
+
orientation: .horizontal,
|
10
|
+
borders: false,
|
11
|
+
highlight: false
|
12
|
+
) {
|
13
|
+
PBNavItem("Photos")
|
14
|
+
PBNavItem("Music")
|
15
|
+
PBNavItem("Video")
|
16
|
+
PBNavItem("Files")
|
17
|
+
}
|
18
|
+
```
|
@@ -0,0 +1,18 @@
|
|
1
|
+
![nav-horizontal-subtle](https://github.com/powerhome/playbook/assets/54749071/e595cf20-f145-4e47-bb9a-d8dcdc217af7)
|
2
|
+
|
3
|
+
```swift
|
4
|
+
@State private var selectedHSubtle: Int = 1
|
5
|
+
|
6
|
+
PBNav(
|
7
|
+
selected: $selectedHSubtle,
|
8
|
+
variant: .subtle,
|
9
|
+
orientation: .horizontal,
|
10
|
+
borders: false
|
11
|
+
) {
|
12
|
+
PBNavItem("Photos")
|
13
|
+
PBNavItem("Music")
|
14
|
+
PBNavItem("Video")
|
15
|
+
PBNavItem("Files")
|
16
|
+
}
|
17
|
+
|
18
|
+
```
|
@@ -0,0 +1,11 @@
|
|
1
|
+
### Props
|
2
|
+
| Name | Type | Description | Default | Values |
|
3
|
+
| --- | ----------- | --------- | --------- | --------- |
|
4
|
+
| **selected** | `Int` | Sets selected to current index | `0` | |
|
5
|
+
| **currentHover** | `Int?` | Sets the current hover state to the current index| | |
|
6
|
+
| **variant** | `Variant` | Sets variant for nav | `.normal` | `normal` `subtle` `bold` |
|
7
|
+
| **orientation** | `Orientation` | Changes the orientation of nav | `.vertical` | `horizontal` `verticle` |
|
8
|
+
| **title** | `String?` | Sets title of nav | | |
|
9
|
+
| **borders** | `Bool` | Boolean value for whether nav items have a border or not | `true` | `true` `false` |
|
10
|
+
| **highlight** | `Bool` | Boolean value for adding a highlight to nav | `true` | `true` `false` |
|
11
|
+
| **views** | `[AnyView]` | An Array of AnyView | | |
|
@@ -0,0 +1,18 @@
|
|
1
|
+
![nav-vertical-bold](https://github.com/powerhome/playbook/assets/54749071/4d9ea3b7-c2e8-4703-80e3-54e4cee8dbfc)
|
2
|
+
|
3
|
+
```swift
|
4
|
+
@State private var selectedVBold: Int = 1
|
5
|
+
|
6
|
+
PBNav(
|
7
|
+
selected: $selectedVBold,
|
8
|
+
variant: .bold,
|
9
|
+
orientation: .vertical,
|
10
|
+
borders: false
|
11
|
+
) {
|
12
|
+
PBNavItem("Photos")
|
13
|
+
PBNavItem("Music")
|
14
|
+
PBNavItem("Video")
|
15
|
+
PBNavItem("Files")
|
16
|
+
}
|
17
|
+
|
18
|
+
```
|
@@ -0,0 +1,18 @@
|
|
1
|
+
![nav-vertical-default](https://github.com/powerhome/playbook/assets/54749071/ddbf0c77-4d98-483e-9f12-561ac169e6a9)
|
2
|
+
|
3
|
+
```swift
|
4
|
+
@State private var selectedVDefault: Int = 1
|
5
|
+
|
6
|
+
PBNav(
|
7
|
+
selected: $selectedVDefault,
|
8
|
+
variant: .normal,
|
9
|
+
orientation: .vertical,
|
10
|
+
title: "Menu"
|
11
|
+
) {
|
12
|
+
PBNavItem("Photos")
|
13
|
+
PBNavItem("Music")
|
14
|
+
PBNavItem("Video")
|
15
|
+
PBNavItem("Files")
|
16
|
+
}
|
17
|
+
|
18
|
+
```
|
@@ -0,0 +1,19 @@
|
|
1
|
+
![nav-vertical-subtle_no-highlight](https://github.com/powerhome/playbook/assets/54749071/3f6d5773-6aa4-4ea1-a0b2-948e4325a311)
|
2
|
+
|
3
|
+
```swift
|
4
|
+
@State private var selectedVSubtleNoHighlight: Int = 1
|
5
|
+
|
6
|
+
PBNav(
|
7
|
+
selected: $selectedVSubtleNoHighlight,
|
8
|
+
variant: .subtle,
|
9
|
+
orientation: .vertical,
|
10
|
+
borders: false,
|
11
|
+
highlight: false
|
12
|
+
) {
|
13
|
+
PBNavItem("Photos")
|
14
|
+
PBNavItem("Music")
|
15
|
+
PBNavItem("Video")
|
16
|
+
PBNavItem("Files")
|
17
|
+
}
|
18
|
+
|
19
|
+
```
|
@@ -0,0 +1,17 @@
|
|
1
|
+
![nav-vertical-subtle](https://github.com/powerhome/playbook/assets/54749071/06a30a15-661a-4779-a674-7b4e6cded472)
|
2
|
+
|
3
|
+
```swift
|
4
|
+
@State private var selectedVSubtle: Int = 1
|
5
|
+
|
6
|
+
PBNav(
|
7
|
+
selected: $selectedVSubtle,
|
8
|
+
variant: .subtle,
|
9
|
+
orientation: .vertical,
|
10
|
+
borders: false
|
11
|
+
) {
|
12
|
+
PBNavItem("Photos")
|
13
|
+
PBNavItem("Music")
|
14
|
+
PBNavItem("Video")
|
15
|
+
PBNavItem("Files")
|
16
|
+
}
|
17
|
+
```
|
@@ -42,3 +42,20 @@ examples:
|
|
42
42
|
- block_nav: Block
|
43
43
|
- block_no_title_nav: Without Title
|
44
44
|
- new_tab: Open in a New Tab
|
45
|
+
|
46
|
+
swift:
|
47
|
+
- nav_vertical_default_swift: Vertical Default
|
48
|
+
- nav_vertical_subtle_swift: Vertical Subtle
|
49
|
+
- nav_vertical_subtle_no_highlight_swift: Vertical Subtle No Highlight
|
50
|
+
- nav_vertical_bold_swift: Vertical Bold
|
51
|
+
- nav_horizontal_default_swift: Horizontal Default
|
52
|
+
- nav_horizontal_subtle_swift: Horizontal Subtle
|
53
|
+
- nav_horizontal_subtle_no_highlight_swift: Horizontal Subtle No Highlight
|
54
|
+
- nav_horizontal_bold_swift: Horizontal Bold
|
55
|
+
- nav_props_swift: ""
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
@@ -8,7 +8,7 @@ type OnlineStatusProps = {
|
|
8
8
|
aria?: {[key: string]: string},
|
9
9
|
className?: string,
|
10
10
|
data?: {[key: string]: string | number},
|
11
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
11
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
12
12
|
id?: string,
|
13
13
|
status?: "online" | "offline" | "away",
|
14
14
|
} & GlobalProps
|