playbook_ui 15.8.0.pre.rc.0 → 16.0.0.pre.alpha.HFH3979Applydepwarningfixtoplaybook13635
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/_playbook.scss +0 -4
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +13 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_custom.jsx +56 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_custom.md +10 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_custom_rails.html.erb +64 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_custom_rails.md +10 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +6 -1
- data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +121 -0
- data/app/pb_kits/playbook/pb_dropdown/quickpick/index.ts +85 -9
- data/app/pb_kits/playbook/pb_dropdown/quickpick_helper.rb +83 -2
- data/app/pb_kits/playbook/pb_icon/icon.rb +6 -1
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +7 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options.md +1 -1
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_disabled.html.erb +135 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_disabled.jsx +147 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_disabled.md +1 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.test.jsx +402 -27
- data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select_options.tsx +1 -0
- data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_with_tooltip.html.erb +30 -0
- data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_with_tooltip.jsx +1 -1
- data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_with_tooltip.md +1 -1
- data/app/pb_kits/playbook/pb_multiple_users/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_multiple_users/multiple_users.html.erb +51 -7
- data/app/pb_kits/playbook/pb_multiple_users/multiple_users.rb +1 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_description.md +6 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_description.md +6 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/pb_circle_chart.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_description.md +6 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/pb_gauge_chart.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_description.md +6 -1
- data/app/pb_kits/playbook/pb_pb_line_graph/pb_line_graph.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_radio/_radio.scss +8 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/Toolbar.tsx +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +8 -3
- data/app/pb_kits/playbook/pb_rich_text_editor/_tiptap_styles.scss +53 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_height.jsx +71 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_height.md +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_min_height.jsx +71 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_min_height.md +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +3 -1
- data/app/pb_kits/playbook/pb_table/docs/_sections.yml +68 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/alignContent.test.js +37 -50
- data/app/pb_kits/playbook/utilities/test/globalProps/alignItems.test.js +38 -50
- data/app/pb_kits/playbook/utilities/test/globalProps/alignSelf.test.js +37 -50
- data/app/pb_kits/playbook/utilities/test/globalProps/borderRadius.test.js +33 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/bottom.test.js +60 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/cursor.test.js +42 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/dark.test.js +33 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/display.test.js +37 -51
- data/app/pb_kits/playbook/utilities/test/globalProps/flex.test.js +44 -76
- data/app/pb_kits/playbook/utilities/test/globalProps/flexDirection.test.js +37 -50
- data/app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js +35 -48
- data/app/pb_kits/playbook/utilities/test/globalProps/flexShrink.test.js +35 -48
- data/app/pb_kits/playbook/utilities/test/globalProps/flexWrap.test.js +37 -50
- data/app/pb_kits/playbook/utilities/test/globalProps/gap.test.js +87 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/globalPropsTestHelper.js +373 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/height.test.js +68 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/htmlOptions.test.js +510 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/justifyContent.test.js +37 -50
- data/app/pb_kits/playbook/utilities/test/globalProps/justifySelf.test.js +37 -50
- data/app/pb_kits/playbook/utilities/test/globalProps/left.test.js +60 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/lineHeight.test.js +33 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/margin.test.js +95 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/numberSpacing.test.js +33 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/order.test.js +36 -48
- data/app/pb_kits/playbook/utilities/test/globalProps/overflow.test.js +68 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/padding.test.js +95 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/position.test.js +33 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/right.test.js +60 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/shadow.test.js +33 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/textAlign.test.js +41 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/top.test.js +60 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js +30 -18
- data/app/pb_kits/playbook/utilities/test/globalProps/verticalAlign.test.js +40 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/width.test.js +66 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/zIndex.test.js +50 -0
- data/dist/chunks/_pb_line_graph-hxi01lk7.js +1 -0
- data/dist/chunks/_typeahead-BgLnlhzP.js +1 -0
- data/dist/chunks/componentRegistry-DzmmLR2x.js +1 -0
- data/dist/chunks/globalProps-DgYwLYNx.js +6 -0
- data/dist/chunks/lib-NLxTo8OB.js +29 -0
- data/dist/chunks/vendor.js +4 -4
- data/dist/menu.yml +0 -29
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +2 -2
- metadata +42 -147
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.scss +0 -6
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +0 -196
- data/app/pb_kits/playbook/pb_bar_graph/barGraph.test.js +0 -31
- data/app/pb_kits/playbook/pb_bar_graph/barGraphSettings.js +0 -32
- data/app/pb_kits/playbook/pb_bar_graph/barGraphTheme.ts +0 -106
- data/app/pb_kits/playbook/pb_bar_graph/bar_graph.html.erb +0 -1
- data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +0 -98
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.html.erb +0 -26
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.jsx +0 -55
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.md +0 -2
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.html.erb +0 -42
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.md +0 -2
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.html.erb +0 -26
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.jsx +0 -55
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.html.erb +0 -26
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.jsx +0 -69
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.md +0 -3
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.html.erb +0 -58
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.jsx +0 -64
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.html.erb +0 -14
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.jsx +0 -40
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.html.erb +0 -15
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.jsx +0 -48
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.html.erb +0 -62
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.jsx +0 -136
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.md +0 -17
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.html.erb +0 -23
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.jsx +0 -52
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.html.erb +0 -26
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx +0 -86
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md +0 -3
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.html.erb +0 -20
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.jsx +0 -46
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.md +0 -2
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.html.erb +0 -22
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.jsx +0 -55
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.md +0 -1
- data/app/pb_kits/playbook/pb_bar_graph/docs/_description.md +0 -1
- data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +0 -28
- data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +0 -11
- data/app/pb_kits/playbook/pb_circle_chart/ChartsTypes.ts +0 -2
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.scss +0 -16
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +0 -228
- data/app/pb_kits/playbook/pb_circle_chart/circleChart.test.js +0 -45
- data/app/pb_kits/playbook/pb_circle_chart/circleChartTheme.ts +0 -88
- data/app/pb_kits/playbook/pb_circle_chart/circle_chart.html.erb +0 -10
- data/app/pb_kits/playbook/pb_circle_chart/circle_chart.rb +0 -99
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.html.erb +0 -26
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +0 -88
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.html.erb +0 -20
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +0 -44
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors_rails.md +0 -2
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors_react.md +0 -2
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.html.erb +0 -20
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.jsx +0 -43
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.md +0 -5
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.html.erb +0 -19
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +0 -38
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.html.erb +0 -136
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.jsx +0 -152
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.html.erb +0 -86
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.jsx +0 -142
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.md +0 -14
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +0 -63
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.html.erb +0 -22
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +0 -45
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.html.erb +0 -37
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.jsx +0 -61
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.html.erb +0 -22
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.jsx +0 -41
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.html.erb +0 -38
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.jsx +0 -55
- data/app/pb_kits/playbook/pb_circle_chart/docs/_description.md +0 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +0 -26
- data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +0 -11
- data/app/pb_kits/playbook/pb_dashboard/commonSettings.js +0 -104
- data/app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts +0 -16
- data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +0 -174
- data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +0 -173
- data/app/pb_kits/playbook/pb_dashboard/themeTypes.ts +0 -20
- data/app/pb_kits/playbook/pb_gauge/_gauge.scss +0 -49
- data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +0 -215
- data/app/pb_kits/playbook/pb_gauge/docs/_description.md +0 -1
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors.html.erb +0 -12
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors.jsx +0 -36
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors_rails.md +0 -2
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors_react.md +0 -2
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.html.erb +0 -32
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.jsx +0 -146
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex_rails.md +0 -1
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex_react.md +0 -1
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.html.erb +0 -11
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.jsx +0 -30
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.html.erb +0 -12
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.jsx +0 -36
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.html.erb +0 -14
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.jsx +0 -49
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.html.erb +0 -15
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.jsx +0 -62
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_live_data.jsx +0 -76
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.html.erb +0 -15
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.jsx +0 -54
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.md +0 -1
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.html.erb +0 -27
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.jsx +0 -80
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.md +0 -2
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.html.erb +0 -14
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.jsx +0 -38
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.html.erb +0 -29
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.jsx +0 -72
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units_react.md +0 -1
- data/app/pb_kits/playbook/pb_gauge/docs/example.yml +0 -27
- data/app/pb_kits/playbook/pb_gauge/docs/index.js +0 -11
- data/app/pb_kits/playbook/pb_gauge/gauge.html.erb +0 -2
- data/app/pb_kits/playbook/pb_gauge/gauge.rb +0 -56
- data/app/pb_kits/playbook/pb_gauge/gauge.test.js +0 -35
- data/app/pb_kits/playbook/pb_gauge/gaugeTheme.ts +0 -91
- data/app/pb_kits/playbook/pb_line_graph/_line_graph.scss +0 -3
- data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +0 -166
- data/app/pb_kits/playbook/pb_line_graph/docs/_description.md +0 -1
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors.html.erb +0 -26
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors.jsx +0 -56
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors_rails.md +0 -2
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors_react.md +0 -3
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.html.erb +0 -26
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.jsx +0 -52
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.html.erb +0 -26
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.jsx +0 -70
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.md +0 -3
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.html.erb +0 -15
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.jsx +0 -43
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_nonclickable.html.erb +0 -16
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_nonclickable.jsx +0 -49
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.html.erb +0 -62
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.jsx +0 -129
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.md +0 -14
- data/app/pb_kits/playbook/pb_line_graph/docs/example.yml +0 -18
- data/app/pb_kits/playbook/pb_line_graph/docs/index.js +0 -6
- data/app/pb_kits/playbook/pb_line_graph/lineGraph.test.js +0 -52
- data/app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js +0 -30
- data/app/pb_kits/playbook/pb_line_graph/lineGraphTheme.ts +0 -125
- data/app/pb_kits/playbook/pb_line_graph/line_graph.html.erb +0 -1
- data/app/pb_kits/playbook/pb_line_graph/line_graph.rb +0 -93
- data/dist/chunks/_typeahead-CSCNg6cp.js +0 -6
- data/dist/chunks/lib-DxCgrqqG.js +0 -29
|
@@ -4,7 +4,7 @@ import Flex from "../../pb_flex/_flex";
|
|
|
4
4
|
import FlexItem from "../../pb_flex/_flex_item";
|
|
5
5
|
import SectionSeparator from "../../pb_section_separator/_section_separator";
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import EditorButton from "./EditorButton";
|
|
8
8
|
import ToolbarDropdown from "./ToolbarDropdown";
|
|
9
9
|
import ToolbarNodes from "./ToolbarNodes";
|
|
10
10
|
import { ToolbarTypes } from "./EditorTypes";
|
|
@@ -44,6 +44,8 @@ type RichTextEditorProps = {
|
|
|
44
44
|
name?: string,
|
|
45
45
|
onChange: (html: string, text: string) => void,
|
|
46
46
|
placeholder?: string,
|
|
47
|
+
inputHeight?: "sm" | "md" | "lg",
|
|
48
|
+
inputMinHeight?: "sm" | "md" | "lg",
|
|
47
49
|
simple?: boolean,
|
|
48
50
|
sticky?: boolean,
|
|
49
51
|
template: string,
|
|
@@ -68,6 +70,8 @@ const RichTextEditor = (props: RichTextEditorProps): React.ReactElement => {
|
|
|
68
70
|
name,
|
|
69
71
|
onChange = noop,
|
|
70
72
|
placeholder,
|
|
73
|
+
inputHeight,
|
|
74
|
+
inputMinHeight,
|
|
71
75
|
simple = false,
|
|
72
76
|
sticky = false,
|
|
73
77
|
template = '',
|
|
@@ -214,9 +218,10 @@ const RichTextEditor = (props: RichTextEditorProps): React.ReactElement => {
|
|
|
214
218
|
{
|
|
215
219
|
advancedEditor ? (
|
|
216
220
|
<div
|
|
217
|
-
className={classnames(
|
|
218
|
-
|
|
219
|
-
|
|
221
|
+
className={classnames(
|
|
222
|
+
"pb_rich_text_editor_advanced_container",
|
|
223
|
+
{ [`input_height_${inputHeight}`]: !!inputHeight,[`input_min_height_${inputMinHeight}`]: !!inputMinHeight ,["toolbar-active"]: shouldShowToolbar }
|
|
224
|
+
)}
|
|
220
225
|
>
|
|
221
226
|
{shouldShowToolbar && (
|
|
222
227
|
<EditorToolbar editor={advancedEditor}
|
|
@@ -205,6 +205,59 @@
|
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
+
|
|
209
|
+
.pb_rich_text_editor_advanced_container.input_height_sm {
|
|
210
|
+
div {
|
|
211
|
+
.tiptap.ProseMirror {
|
|
212
|
+
height: 131px;
|
|
213
|
+
overflow: auto;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.pb_rich_text_editor_advanced_container.input_height_md {
|
|
219
|
+
div {
|
|
220
|
+
.tiptap.ProseMirror {
|
|
221
|
+
height: 180px;
|
|
222
|
+
overflow: auto;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.pb_rich_text_editor_advanced_container.input_height_lg {
|
|
228
|
+
div {
|
|
229
|
+
.tiptap.ProseMirror {
|
|
230
|
+
height: 230px;
|
|
231
|
+
overflow: auto;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.pb_rich_text_editor_advanced_container.input_min_height_sm {
|
|
237
|
+
div {
|
|
238
|
+
.tiptap.ProseMirror {
|
|
239
|
+
min-height: 131px;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.pb_rich_text_editor_advanced_container.input_min_height_md {
|
|
245
|
+
div {
|
|
246
|
+
.tiptap.ProseMirror {
|
|
247
|
+
min-height: 180px;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.pb_rich_text_editor_advanced_container.input_min_height_lg {
|
|
253
|
+
div {
|
|
254
|
+
.tiptap.ProseMirror {
|
|
255
|
+
min-height: 230px;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
|
|
208
261
|
.tiptap-content {
|
|
209
262
|
@include preview_tiptap_first_child;
|
|
210
263
|
a {
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import RichTextEditor from '../_rich_text_editor'
|
|
3
|
+
import { useEditor, EditorContent } from "@tiptap/react"
|
|
4
|
+
import StarterKit from "@tiptap/starter-kit"
|
|
5
|
+
import Link from '@tiptap/extension-link'
|
|
6
|
+
import { Caption } from "playbook-ui"
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
const RichTextEditorAdvancedHeight = (props) => {
|
|
10
|
+
|
|
11
|
+
const editor = useEditor({
|
|
12
|
+
extensions: [
|
|
13
|
+
StarterKit,
|
|
14
|
+
Link
|
|
15
|
+
],
|
|
16
|
+
content: "Add your text here. You can format your text, add links, quotes, and bullets."
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const editor2 = useEditor({
|
|
20
|
+
extensions: [
|
|
21
|
+
StarterKit,
|
|
22
|
+
Link
|
|
23
|
+
],
|
|
24
|
+
content: "Add your text here. You can format your text, add links, quotes, and bullets."
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
const editor3 = useEditor({
|
|
28
|
+
extensions: [
|
|
29
|
+
StarterKit,
|
|
30
|
+
Link
|
|
31
|
+
],
|
|
32
|
+
content: "Add your text here. You can format your text, add links, quotes, and bullets."
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<div>
|
|
37
|
+
<Caption>sm</Caption>
|
|
38
|
+
<RichTextEditor
|
|
39
|
+
advancedEditor={editor}
|
|
40
|
+
inputHeight="sm"
|
|
41
|
+
{...props}
|
|
42
|
+
>
|
|
43
|
+
<EditorContent editor={editor} />
|
|
44
|
+
</RichTextEditor>
|
|
45
|
+
|
|
46
|
+
<br />
|
|
47
|
+
|
|
48
|
+
<Caption>md</Caption>
|
|
49
|
+
<RichTextEditor
|
|
50
|
+
advancedEditor={editor2}
|
|
51
|
+
inputHeight="md"
|
|
52
|
+
{...props}
|
|
53
|
+
>
|
|
54
|
+
<EditorContent editor={editor2} />
|
|
55
|
+
</RichTextEditor>
|
|
56
|
+
|
|
57
|
+
<br />
|
|
58
|
+
|
|
59
|
+
<Caption>lg</Caption>
|
|
60
|
+
<RichTextEditor
|
|
61
|
+
advancedEditor={editor3}
|
|
62
|
+
inputHeight="lg"
|
|
63
|
+
{...props}
|
|
64
|
+
>
|
|
65
|
+
<EditorContent editor={editor3} />
|
|
66
|
+
</RichTextEditor>
|
|
67
|
+
</div>
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export default RichTextEditorAdvancedHeight
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Use the `inputHeight` prop to keep the text area a specific height. If the text exceeds the text area, it will automatically add a scrollbar to maintain the fixed height.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import RichTextEditor from '../_rich_text_editor'
|
|
3
|
+
import { useEditor, EditorContent } from "@tiptap/react"
|
|
4
|
+
import StarterKit from "@tiptap/starter-kit"
|
|
5
|
+
import Link from '@tiptap/extension-link'
|
|
6
|
+
import { Caption } from "playbook-ui"
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
const RichTextEditorAdvancedMinHeight = (props) => {
|
|
10
|
+
|
|
11
|
+
const editor1 = useEditor({
|
|
12
|
+
extensions: [
|
|
13
|
+
StarterKit,
|
|
14
|
+
Link
|
|
15
|
+
],
|
|
16
|
+
content: "Add your text here. You can format your text, add links, quotes, and bullets."
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const editor2 = useEditor({
|
|
20
|
+
extensions: [
|
|
21
|
+
StarterKit,
|
|
22
|
+
Link
|
|
23
|
+
],
|
|
24
|
+
content: "Add your text here. You can format your text, add links, quotes, and bullets."
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
const editor3 = useEditor({
|
|
28
|
+
extensions: [
|
|
29
|
+
StarterKit,
|
|
30
|
+
Link
|
|
31
|
+
],
|
|
32
|
+
content: "Add your text here. You can format your text, add links, quotes, and bullets."
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<div>
|
|
37
|
+
<Caption>sm</Caption>
|
|
38
|
+
<RichTextEditor
|
|
39
|
+
advancedEditor={editor1}
|
|
40
|
+
inputMinHeight="sm"
|
|
41
|
+
{...props}
|
|
42
|
+
>
|
|
43
|
+
<EditorContent editor={editor1} />
|
|
44
|
+
</RichTextEditor>
|
|
45
|
+
|
|
46
|
+
<br />
|
|
47
|
+
|
|
48
|
+
<Caption>md</Caption>
|
|
49
|
+
<RichTextEditor
|
|
50
|
+
advancedEditor={editor2}
|
|
51
|
+
inputMinHeight="md"
|
|
52
|
+
{...props}
|
|
53
|
+
>
|
|
54
|
+
<EditorContent editor={editor2} />
|
|
55
|
+
</RichTextEditor>
|
|
56
|
+
|
|
57
|
+
<br />
|
|
58
|
+
|
|
59
|
+
<Caption>lg</Caption>
|
|
60
|
+
<RichTextEditor
|
|
61
|
+
advancedEditor={editor3}
|
|
62
|
+
inputMinHeight="lg"
|
|
63
|
+
{...props}
|
|
64
|
+
>
|
|
65
|
+
<EditorContent editor={editor3} />
|
|
66
|
+
</RichTextEditor>
|
|
67
|
+
</div>
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export default RichTextEditorAdvancedMinHeight
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Use the inputMinHeight prop to render the text area with a minimum height. If the text exceeds the text area, the text area will grow to accommodate it.
|
|
@@ -29,5 +29,7 @@ examples:
|
|
|
29
29
|
# - rich_text_editor_toolbar_bottom: Toolbar Bottom
|
|
30
30
|
- rich_text_editor_inline: Inline
|
|
31
31
|
- rich_text_editor_advanced_inline: Advanced (Inline)
|
|
32
|
+
- rich_text_editor_advanced_height: Advanced Height
|
|
33
|
+
- rich_text_editor_advanced_min_height: Advanced Min Height
|
|
32
34
|
- rich_text_editor_preview: Preview
|
|
33
35
|
- rich_text_editor_advanced_preview: Advanced Preview
|
|
@@ -16,4 +16,6 @@ export { default as RichTextEditorAdvancedFocus } from './_rich_text_editor_adva
|
|
|
16
16
|
export { default as RichTextEditorAdvancedTemplates } from './_rich_text_editor_advanced_templates.jsx'
|
|
17
17
|
export { default as RichTextEditorAdvancedAttributes } from './_rich_text_editor_advanced_attributes.jsx'
|
|
18
18
|
export { default as RichTextEditorAdvancedSticky } from './_rich_text_editor_advanced_sticky.jsx'
|
|
19
|
-
export { default as RichTextEditorAdvancedInline } from './_rich_text_editor_advanced_inline.jsx'
|
|
19
|
+
export { default as RichTextEditorAdvancedInline } from './_rich_text_editor_advanced_inline.jsx'
|
|
20
|
+
export { default as RichTextEditorAdvancedHeight } from './_rich_text_editor_advanced_height.jsx'
|
|
21
|
+
export { default as RichTextEditorAdvancedMinHeight } from './_rich_text_editor_advanced_min_height.jsx'
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
sections:
|
|
2
|
+
- title: "Size & Density"
|
|
3
|
+
examples:
|
|
4
|
+
- table_sm
|
|
5
|
+
- table_md
|
|
6
|
+
- table_lg
|
|
7
|
+
- table_multiline
|
|
8
|
+
- table_single_line
|
|
9
|
+
- table_outer_padding
|
|
10
|
+
|
|
11
|
+
- title: "Layout & Structure"
|
|
12
|
+
examples:
|
|
13
|
+
- table_responsive_table
|
|
14
|
+
- table_with_subcomponents
|
|
15
|
+
- table_with_subcomponents_as_divs
|
|
16
|
+
- table_with_background_kit
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
- title: "Sticky & Positional Behaviors"
|
|
20
|
+
examples:
|
|
21
|
+
- table_sticky
|
|
22
|
+
- table_sticky_left_columns
|
|
23
|
+
- table_sticky_right_columns
|
|
24
|
+
- table_sticky_columns
|
|
25
|
+
- table_alignment_row
|
|
26
|
+
- table_alignment_column
|
|
27
|
+
- table_alignment_shift_row
|
|
28
|
+
- table_alignment_shift_data
|
|
29
|
+
- table_side_highlight
|
|
30
|
+
- table_container
|
|
31
|
+
|
|
32
|
+
- title: "Collapsible & Nested Behaviors"
|
|
33
|
+
examples:
|
|
34
|
+
- table_with_collapsible
|
|
35
|
+
- table_with_dynamic_collapsible
|
|
36
|
+
- table_with_collapsible_with_custom_click
|
|
37
|
+
- table_with_collapsible_with_custom_content
|
|
38
|
+
- table_with_collapsible_with_nested_rows
|
|
39
|
+
- table_with_collapsible_with_nested_table
|
|
40
|
+
|
|
41
|
+
- title: "Data Presentation"
|
|
42
|
+
examples:
|
|
43
|
+
- table_data_table
|
|
44
|
+
- table_vertical_border
|
|
45
|
+
- table_striped
|
|
46
|
+
|
|
47
|
+
- title: "Header Variants"
|
|
48
|
+
examples:
|
|
49
|
+
- table_header
|
|
50
|
+
- table_with_header_style_borderless
|
|
51
|
+
- table_with_header_style_floating
|
|
52
|
+
|
|
53
|
+
- title: "Interactive Tables"
|
|
54
|
+
examples:
|
|
55
|
+
- table_with_clickable_rows
|
|
56
|
+
- table_with_selectable_rows
|
|
57
|
+
- table_with_filter_variant
|
|
58
|
+
- table_with_filter_variant_with_pagination
|
|
59
|
+
- table_disable_hover
|
|
60
|
+
|
|
61
|
+
- title: "Table Actions"
|
|
62
|
+
examples:
|
|
63
|
+
- table_one_action
|
|
64
|
+
- table_two_actions
|
|
65
|
+
- table_two_plus_actions
|
|
66
|
+
- table_action_middle
|
|
67
|
+
- table_icon_buttons
|
|
68
|
+
|
|
@@ -1,55 +1,42 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { render, screen } from '../../test-utils'
|
|
3
|
-
|
|
4
|
-
import Body from '../../../pb_body/_body'
|
|
1
|
+
import { testGlobalProp, testGlobalPropResponsiveWithDefault, testGlobalPropAbsence, testGlobalPropInvalidValues } from './globalPropsTestHelper'
|
|
5
2
|
import { camelToSnakeCase } from '../../../utilities/text'
|
|
6
|
-
import
|
|
3
|
+
import Body from '../../../pb_body/_body'
|
|
4
|
+
import Button from '../../../pb_button/_button'
|
|
5
|
+
import Card from '../../../pb_card/_card'
|
|
6
|
+
import Title from '../../../pb_title/_title'
|
|
7
|
+
import Flex from '../../../pb_flex/_flex'
|
|
8
|
+
import Link from '../../../pb_link/_link'
|
|
9
|
+
import Badge from '../../../pb_badge/_badge'
|
|
7
10
|
|
|
8
|
-
|
|
11
|
+
// Note: TextInput excluded - alignContent is a flexbox property that doesn't apply to form inputs
|
|
12
|
+
testGlobalProp(
|
|
13
|
+
'alignContent',
|
|
14
|
+
['start', 'center', 'end', 'spaceBetween', 'spaceAround', 'spaceEvenly'],
|
|
15
|
+
(v) => `align_content_${camelToSnakeCase(v)}`,
|
|
16
|
+
(size, v) => `align_content_${size}_${camelToSnakeCase(v)}`,
|
|
17
|
+
[Body, Button, Card, Title, Flex, Link, Badge]
|
|
18
|
+
)
|
|
9
19
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
alignContent={`${propValues[x]}`}
|
|
17
|
-
data={{ testid: testId }}
|
|
18
|
-
text="Hi"
|
|
19
|
-
/>
|
|
20
|
-
)
|
|
21
|
-
const kit = screen.getByTestId(testId)
|
|
22
|
-
expect(kit).toHaveClass(`align_content_${camelToSnakeCase(propValues[x])}`)
|
|
20
|
+
testGlobalPropResponsiveWithDefault(
|
|
21
|
+
'alignContent',
|
|
22
|
+
{ default: "spaceAround", xs: "center", sm: "spaceAround", md: "center" },
|
|
23
|
+
(v) => `align_content_${camelToSnakeCase(v)}`,
|
|
24
|
+
(size, v) => `align_content_${size}_${camelToSnakeCase(v)}`
|
|
25
|
+
)
|
|
23
26
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
text="Hi"
|
|
31
|
-
/>
|
|
32
|
-
)
|
|
33
|
-
const kit = screen.getByTestId(testId)
|
|
34
|
-
expect(kit).toHaveClass(`align_content_${size}_${camelToSnakeCase(propValues[x])}`)
|
|
35
|
-
})
|
|
36
|
-
}
|
|
37
|
-
})
|
|
27
|
+
testGlobalPropAbsence(
|
|
28
|
+
'alignContent',
|
|
29
|
+
['align_content_start', 'align_content_center', 'align_content_end', 'align_content_space_between', 'align_content_space_around', 'align_content_space_evenly'],
|
|
30
|
+
undefined,
|
|
31
|
+
{ skipNull: true }
|
|
32
|
+
)
|
|
38
33
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const kit = screen.getByTestId(testId)
|
|
49
|
-
// Should have base class for default value
|
|
50
|
-
expect(kit).toHaveClass(`align_content_space_around`)
|
|
51
|
-
// Should have responsive classes for screen sizes
|
|
52
|
-
expect(kit).toHaveClass(`align_content_xs_center`)
|
|
53
|
-
expect(kit).toHaveClass(`align_content_sm_space_around`)
|
|
54
|
-
expect(kit).toHaveClass(`align_content_md_center`)
|
|
55
|
-
})
|
|
34
|
+
// NOTE: Currently using skipKnownIssues: true because globalProps.ts generates classes for invalid values
|
|
35
|
+
// NOTE: Using allowRenderingErrors: true because invalid types (like numbers) cause rendering errors with camelToSnakeCase
|
|
36
|
+
testGlobalPropInvalidValues(
|
|
37
|
+
'alignContent',
|
|
38
|
+
['invalid', 'bad_value', 'not_an_align_value', 'special-chars!@#'],
|
|
39
|
+
['align_content_invalid', 'align_content_bad_value', 'align_content_not_an_align_value', 'align_content_special-chars!@#'],
|
|
40
|
+
undefined,
|
|
41
|
+
{ skipKnownIssues: true, allowRenderingErrors: true }
|
|
42
|
+
)
|
|
@@ -1,54 +1,42 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { render, screen } from '../../test-utils'
|
|
3
|
-
|
|
4
|
-
import Body from '../../../pb_body/_body'
|
|
1
|
+
import { testGlobalProp, testGlobalPropResponsiveWithDefault, testGlobalPropAbsence, testGlobalPropInvalidValues } from './globalPropsTestHelper'
|
|
5
2
|
import { camelToSnakeCase } from '../../../utilities/text'
|
|
6
|
-
import
|
|
3
|
+
import Body from '../../../pb_body/_body'
|
|
4
|
+
import Button from '../../../pb_button/_button'
|
|
5
|
+
import Card from '../../../pb_card/_card'
|
|
6
|
+
import Title from '../../../pb_title/_title'
|
|
7
|
+
import Flex from '../../../pb_flex/_flex'
|
|
8
|
+
import Link from '../../../pb_link/_link'
|
|
9
|
+
import Badge from '../../../pb_badge/_badge'
|
|
10
|
+
|
|
11
|
+
// Note: TextInput excluded - alignItems is a flexbox property that doesn't apply to form inputs
|
|
12
|
+
testGlobalProp(
|
|
13
|
+
'alignItems',
|
|
14
|
+
['start', 'center', 'end', 'baseline', 'stretch', 'flexStart', 'flexEnd'],
|
|
15
|
+
(v) => `align_items_${camelToSnakeCase(v)}`,
|
|
16
|
+
(size, v) => `align_items_${size}_${camelToSnakeCase(v)}`,
|
|
17
|
+
[Body, Button, Card, Title, Flex, Link, Badge]
|
|
18
|
+
)
|
|
7
19
|
|
|
8
|
-
|
|
20
|
+
testGlobalPropResponsiveWithDefault(
|
|
21
|
+
'alignItems',
|
|
22
|
+
{ default: 'end', xs: 'center', sm: 'end', md: 'center' },
|
|
23
|
+
(v) => `align_items_${camelToSnakeCase(v)}`,
|
|
24
|
+
(size, v) => `align_items_${size}_${camelToSnakeCase(v)}`
|
|
25
|
+
)
|
|
9
26
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
alignItems={`${propValues[x]}`}
|
|
17
|
-
data={{ testid: testId }}
|
|
18
|
-
text="Hi"
|
|
19
|
-
/>
|
|
20
|
-
)
|
|
21
|
-
const kit = screen.getByTestId(testId)
|
|
22
|
-
expect(kit).toHaveClass(`align_items_${camelToSnakeCase(propValues[x])}`)
|
|
23
|
-
SCREEN_SIZES.forEach((size) => {
|
|
24
|
-
const testId = `${testSubject}-${propValues[x]}-${size}`
|
|
25
|
-
render(
|
|
26
|
-
<Body
|
|
27
|
-
alignItems={{ [size]: propValues[x] }}
|
|
28
|
-
data={{ testid: testId }}
|
|
29
|
-
text="Hi"
|
|
30
|
-
/>
|
|
31
|
-
)
|
|
32
|
-
const kit = screen.getByTestId(testId)
|
|
33
|
-
expect(kit).toHaveClass(`align_items_${size}_${camelToSnakeCase(propValues[x])}`)
|
|
34
|
-
})
|
|
35
|
-
}
|
|
36
|
-
})
|
|
27
|
+
testGlobalPropAbsence(
|
|
28
|
+
'alignItems',
|
|
29
|
+
['align_items_start', 'align_items_center', 'align_items_end', 'align_items_baseline', 'align_items_stretch', 'align_items_flex_start', 'align_items_flex_end'],
|
|
30
|
+
undefined,
|
|
31
|
+
{ skipNull: true }
|
|
32
|
+
)
|
|
37
33
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const kit = screen.getByTestId(testId)
|
|
48
|
-
// Should have base class for default value
|
|
49
|
-
expect(kit).toHaveClass(`align_items_end`)
|
|
50
|
-
// Should have responsive classes for screen sizes
|
|
51
|
-
expect(kit).toHaveClass(`align_items_xs_center`)
|
|
52
|
-
expect(kit).toHaveClass(`align_items_sm_end`)
|
|
53
|
-
expect(kit).toHaveClass(`align_items_md_center`)
|
|
54
|
-
})
|
|
34
|
+
// NOTE: Currently using skipKnownIssues: true because globalProps.ts generates classes for invalid values
|
|
35
|
+
// NOTE: Using allowRenderingErrors: true because invalid types (like numbers) cause rendering errors with camelToSnakeCase
|
|
36
|
+
testGlobalPropInvalidValues(
|
|
37
|
+
'alignItems',
|
|
38
|
+
['invalid', 'bad_value', 'not_an_align_value', 'special-chars!@#'],
|
|
39
|
+
['align_items_invalid', 'align_items_bad_value', 'align_items_not_an_align_value', 'align_items_special-chars!@#'],
|
|
40
|
+
undefined,
|
|
41
|
+
{ skipKnownIssues: true, allowRenderingErrors: true }
|
|
42
|
+
)
|
|
@@ -1,55 +1,42 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { render, screen } from '../../test-utils'
|
|
3
|
-
|
|
4
|
-
import Body from '../../../pb_body/_body'
|
|
1
|
+
import { testGlobalProp, testGlobalPropResponsiveWithDefault, testGlobalPropAbsence, testGlobalPropInvalidValues } from './globalPropsTestHelper'
|
|
5
2
|
import { camelToSnakeCase } from '../../../utilities/text'
|
|
6
|
-
import
|
|
3
|
+
import Body from '../../../pb_body/_body'
|
|
4
|
+
import Button from '../../../pb_button/_button'
|
|
5
|
+
import Card from '../../../pb_card/_card'
|
|
6
|
+
import Title from '../../../pb_title/_title'
|
|
7
|
+
import Flex from '../../../pb_flex/_flex'
|
|
8
|
+
import Link from '../../../pb_link/_link'
|
|
9
|
+
import Badge from '../../../pb_badge/_badge'
|
|
7
10
|
|
|
8
|
-
|
|
11
|
+
// Note: TextInput excluded - alignSelf is a flexbox property that doesn't apply to form inputs
|
|
12
|
+
testGlobalProp(
|
|
13
|
+
'alignSelf',
|
|
14
|
+
['start', 'center', 'end', 'stretch', 'baseline', 'auto'],
|
|
15
|
+
(v) => `align_self_${camelToSnakeCase(v)}`,
|
|
16
|
+
(size, v) => `align_self_${size}_${camelToSnakeCase(v)}`,
|
|
17
|
+
[Body, Button, Card, Title, Flex, Link, Badge]
|
|
18
|
+
)
|
|
9
19
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
alignSelf={`${propValues[x]}`}
|
|
17
|
-
data={{ testid: testId }}
|
|
18
|
-
text="Hi"
|
|
19
|
-
/>
|
|
20
|
-
)
|
|
21
|
-
const kit = screen.getByTestId(testId)
|
|
22
|
-
expect(kit).toHaveClass(`align_self_${camelToSnakeCase(propValues[x])}`)
|
|
20
|
+
testGlobalPropResponsiveWithDefault(
|
|
21
|
+
'alignSelf',
|
|
22
|
+
{ default: 'end', xs: 'center', sm: 'end', md: 'center' },
|
|
23
|
+
(v) => `align_self_${camelToSnakeCase(v)}`,
|
|
24
|
+
(size, v) => `align_self_${size}_${camelToSnakeCase(v)}`
|
|
25
|
+
)
|
|
23
26
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
text="Hi"
|
|
31
|
-
/>
|
|
32
|
-
)
|
|
33
|
-
const kit = screen.getByTestId(testId)
|
|
34
|
-
expect(kit).toHaveClass(`align_self_${size}_${camelToSnakeCase(propValues[x])}`)
|
|
35
|
-
})
|
|
36
|
-
}
|
|
37
|
-
})
|
|
27
|
+
testGlobalPropAbsence(
|
|
28
|
+
'alignSelf',
|
|
29
|
+
['align_self_start', 'align_self_center', 'align_self_end', 'align_self_stretch', 'align_self_baseline', 'align_self_auto'],
|
|
30
|
+
undefined,
|
|
31
|
+
{ skipNull: true }
|
|
32
|
+
)
|
|
38
33
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const kit = screen.getByTestId(testId)
|
|
49
|
-
// Should have base class for default value
|
|
50
|
-
expect(kit).toHaveClass(`align_self_end`)
|
|
51
|
-
// Should have responsive classes for screen sizes
|
|
52
|
-
expect(kit).toHaveClass(`align_self_xs_center`)
|
|
53
|
-
expect(kit).toHaveClass(`align_self_sm_end`)
|
|
54
|
-
expect(kit).toHaveClass(`align_self_md_center`)
|
|
55
|
-
})
|
|
34
|
+
// NOTE: Currently using skipKnownIssues: true because globalProps.ts generates classes for invalid values
|
|
35
|
+
// NOTE: Using allowRenderingErrors: true because invalid types (like numbers) cause rendering errors with camelToSnakeCase
|
|
36
|
+
testGlobalPropInvalidValues(
|
|
37
|
+
'alignSelf',
|
|
38
|
+
['invalid', 'bad_value', 'not_an_align_value', 'special-chars!@#'],
|
|
39
|
+
['align_self_invalid', 'align_self_bad_value', 'align_self_not_an_align_value', 'align_self_special-chars!@#'],
|
|
40
|
+
undefined,
|
|
41
|
+
{ skipKnownIssues: true, allowRenderingErrors: true }
|
|
42
|
+
)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { testGlobalProp, testGlobalPropAbsence, testGlobalPropInvalidValues } from './globalPropsTestHelper'
|
|
2
|
+
import Body from '../../../pb_body/_body'
|
|
3
|
+
import Button from '../../../pb_button/_button'
|
|
4
|
+
import Card from '../../../pb_card/_card'
|
|
5
|
+
import Title from '../../../pb_title/_title'
|
|
6
|
+
import Flex from '../../../pb_flex/_flex'
|
|
7
|
+
import Link from '../../../pb_link/_link'
|
|
8
|
+
import Badge from '../../../pb_badge/_badge'
|
|
9
|
+
|
|
10
|
+
// NOTE: TextInput excluded - borderRadius is not a valid prop for input elements
|
|
11
|
+
testGlobalProp(
|
|
12
|
+
'borderRadius',
|
|
13
|
+
['none', 'xs', 'sm', 'md', 'lg', 'xl', 'rounded'],
|
|
14
|
+
(v) => `border_radius_${v}`,
|
|
15
|
+
null,
|
|
16
|
+
[Body, Button, Card, Title, Flex, Link, Badge]
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
testGlobalPropAbsence(
|
|
20
|
+
'borderRadius',
|
|
21
|
+
['border_radius_none', 'border_radius_xs', 'border_radius_sm', 'border_radius_md', 'border_radius_lg', 'border_radius_xl', 'border_radius_rounded'],
|
|
22
|
+
undefined,
|
|
23
|
+
{ skipNull: true }
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
// NOTE: Currently using skipKnownIssues: true because globalProps.ts generates classes for invalid values
|
|
27
|
+
testGlobalPropInvalidValues(
|
|
28
|
+
'borderRadius',
|
|
29
|
+
['invalid', 'bad_value', 'not_a_radius', 'special-chars!@#'],
|
|
30
|
+
['border_radius_invalid', 'border_radius_bad_value', 'border_radius_not_a_radius', 'border_radius_special-chars!@#'],
|
|
31
|
+
undefined,
|
|
32
|
+
{ skipKnownIssues: true }
|
|
33
|
+
)
|