playbook_ui 16.0.0.pre.alpha.HFH3979Applydepwarningfixtoplaybook13635 → 16.0.0.pre.alpha.PLAY2668multipleuserstooltiprails13556

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.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_icon/icon.rb +1 -6
  3. data/lib/playbook/version.rb +1 -1
  4. metadata +2 -24
  5. data/app/pb_kits/playbook/pb_table/docs/_sections.yml +0 -68
  6. data/app/pb_kits/playbook/utilities/test/globalProps/borderRadius.test.js +0 -33
  7. data/app/pb_kits/playbook/utilities/test/globalProps/bottom.test.js +0 -60
  8. data/app/pb_kits/playbook/utilities/test/globalProps/cursor.test.js +0 -42
  9. data/app/pb_kits/playbook/utilities/test/globalProps/dark.test.js +0 -33
  10. data/app/pb_kits/playbook/utilities/test/globalProps/gap.test.js +0 -87
  11. data/app/pb_kits/playbook/utilities/test/globalProps/height.test.js +0 -68
  12. data/app/pb_kits/playbook/utilities/test/globalProps/htmlOptions.test.js +0 -510
  13. data/app/pb_kits/playbook/utilities/test/globalProps/left.test.js +0 -60
  14. data/app/pb_kits/playbook/utilities/test/globalProps/lineHeight.test.js +0 -33
  15. data/app/pb_kits/playbook/utilities/test/globalProps/margin.test.js +0 -95
  16. data/app/pb_kits/playbook/utilities/test/globalProps/numberSpacing.test.js +0 -33
  17. data/app/pb_kits/playbook/utilities/test/globalProps/overflow.test.js +0 -68
  18. data/app/pb_kits/playbook/utilities/test/globalProps/padding.test.js +0 -95
  19. data/app/pb_kits/playbook/utilities/test/globalProps/position.test.js +0 -33
  20. data/app/pb_kits/playbook/utilities/test/globalProps/right.test.js +0 -60
  21. data/app/pb_kits/playbook/utilities/test/globalProps/shadow.test.js +0 -33
  22. data/app/pb_kits/playbook/utilities/test/globalProps/textAlign.test.js +0 -41
  23. data/app/pb_kits/playbook/utilities/test/globalProps/top.test.js +0 -60
  24. data/app/pb_kits/playbook/utilities/test/globalProps/verticalAlign.test.js +0 -40
  25. data/app/pb_kits/playbook/utilities/test/globalProps/width.test.js +0 -66
  26. data/app/pb_kits/playbook/utilities/test/globalProps/zIndex.test.js +0 -50
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b690719fa4d4334c4b2b1c30e06975689af68001aa38c02d55d1547b2ca5a1fe
4
- data.tar.gz: 9f43a322971fa20fd29238bf46abbfed87892cdc6abdbf1b9a6a6dc854655f1a
3
+ metadata.gz: d1da81b6d114d52abee6e17253134d3b749f6f6d6f07f2840161e390841f5862
4
+ data.tar.gz: 310a63b443f95e203b0df3a7e86e77df1f2c39747bc5d900cb5989585317ffa5
5
5
  SHA512:
6
- metadata.gz: 03654cd8e50ee0f7b1042b1cc0ffbe78e2e1715c2639d242bc96c9d3d87ef7b3ac3a8432fab751d3d0b66265a7e555fd4a04de97916d7476f961a74d1a2b70d8
7
- data.tar.gz: 8fbbe38c1d20247a55123492cd8a701da80ac965a364a8235e1d129f35fa68a06f9b66cf422d818509544321ad7ef811360fbea445963ce0317e8d8463e5ba8b
6
+ metadata.gz: 48f07c1c7681baae8d05db757a0633476cc891838cbd34d8a1befcbaa1b9740313611bfb4ac6a42e16508bbec0bc3b584e93c10f6500d4c305f1bb4dc16b2e4b
7
+ data.tar.gz: 7bce0e9f5cb09ef11ef65d74dd3ccedb21b317ac4c62d34d364b0568dc1bdf1cb770f7d156caaf436858e76a988cb90207f6446cf9863a4308c5ec0b2f3d514e
@@ -109,18 +109,13 @@ module Playbook
109
109
 
110
110
  svg["class"] = %w[pb_custom_icon svg-inline--fa].concat([object.custom_icon_classname]).join(" ")
111
111
  svg["id"] = object.id
112
+ svg["data"] = object.data
112
113
  svg["height"] = "auto"
113
114
  svg["width"] = "auto"
114
115
  svg["tabindex"] = object.tabindex
115
116
  fill_color = object.color || "currentColor"
116
117
  doc.at_css("path")["fill"] = fill_color
117
118
 
118
- if object.data.present?
119
- object.data.each do |key, value|
120
- svg["data-#{key}"] = value
121
- end
122
- end
123
-
124
119
  if object.aria.present?
125
120
  object.aria.each do |key, value|
126
121
  k = key.to_s
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "16.0.0"
5
- VERSION = "16.0.0.pre.alpha.HFH3979Applydepwarningfixtoplaybook13635"
5
+ VERSION = "16.0.0.pre.alpha.PLAY2668multipleuserstooltiprails13556"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.0.0.pre.alpha.HFH3979Applydepwarningfixtoplaybook13635
4
+ version: 16.0.0.pre.alpha.PLAY2668multipleuserstooltiprails13556
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2026-01-20 00:00:00.000000000 Z
12
+ date: 2026-01-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -3031,7 +3031,6 @@ files:
3031
3031
  - app/pb_kits/playbook/pb_table/_table.scss
3032
3032
  - app/pb_kits/playbook/pb_table/_table.tsx
3033
3033
  - app/pb_kits/playbook/pb_table/docs/_description.md
3034
- - app/pb_kits/playbook/pb_table/docs/_sections.yml
3035
3034
  - app/pb_kits/playbook/pb_table/docs/_table_action_middle.html.erb
3036
3035
  - app/pb_kits/playbook/pb_table/docs/_table_action_middle.jsx
3037
3036
  - app/pb_kits/playbook/pb_table/docs/_table_action_middle.md
@@ -3805,39 +3804,18 @@ files:
3805
3804
  - app/pb_kits/playbook/utilities/test/globalProps/alignContent.test.js
3806
3805
  - app/pb_kits/playbook/utilities/test/globalProps/alignItems.test.js
3807
3806
  - app/pb_kits/playbook/utilities/test/globalProps/alignSelf.test.js
3808
- - app/pb_kits/playbook/utilities/test/globalProps/borderRadius.test.js
3809
- - app/pb_kits/playbook/utilities/test/globalProps/bottom.test.js
3810
- - app/pb_kits/playbook/utilities/test/globalProps/cursor.test.js
3811
- - app/pb_kits/playbook/utilities/test/globalProps/dark.test.js
3812
3807
  - app/pb_kits/playbook/utilities/test/globalProps/display.test.js
3813
3808
  - app/pb_kits/playbook/utilities/test/globalProps/flex.test.js
3814
3809
  - app/pb_kits/playbook/utilities/test/globalProps/flexDirection.test.js
3815
3810
  - app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js
3816
3811
  - app/pb_kits/playbook/utilities/test/globalProps/flexShrink.test.js
3817
3812
  - app/pb_kits/playbook/utilities/test/globalProps/flexWrap.test.js
3818
- - app/pb_kits/playbook/utilities/test/globalProps/gap.test.js
3819
3813
  - app/pb_kits/playbook/utilities/test/globalProps/globalPropsTestHelper.js
3820
- - app/pb_kits/playbook/utilities/test/globalProps/height.test.js
3821
3814
  - app/pb_kits/playbook/utilities/test/globalProps/hover.test.js
3822
- - app/pb_kits/playbook/utilities/test/globalProps/htmlOptions.test.js
3823
3815
  - app/pb_kits/playbook/utilities/test/globalProps/justifyContent.test.js
3824
3816
  - app/pb_kits/playbook/utilities/test/globalProps/justifySelf.test.js
3825
- - app/pb_kits/playbook/utilities/test/globalProps/left.test.js
3826
- - app/pb_kits/playbook/utilities/test/globalProps/lineHeight.test.js
3827
- - app/pb_kits/playbook/utilities/test/globalProps/margin.test.js
3828
- - app/pb_kits/playbook/utilities/test/globalProps/numberSpacing.test.js
3829
3817
  - app/pb_kits/playbook/utilities/test/globalProps/order.test.js
3830
- - app/pb_kits/playbook/utilities/test/globalProps/overflow.test.js
3831
- - app/pb_kits/playbook/utilities/test/globalProps/padding.test.js
3832
- - app/pb_kits/playbook/utilities/test/globalProps/position.test.js
3833
- - app/pb_kits/playbook/utilities/test/globalProps/right.test.js
3834
- - app/pb_kits/playbook/utilities/test/globalProps/shadow.test.js
3835
- - app/pb_kits/playbook/utilities/test/globalProps/textAlign.test.js
3836
- - app/pb_kits/playbook/utilities/test/globalProps/top.test.js
3837
3818
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3838
- - app/pb_kits/playbook/utilities/test/globalProps/verticalAlign.test.js
3839
- - app/pb_kits/playbook/utilities/test/globalProps/width.test.js
3840
- - app/pb_kits/playbook/utilities/test/globalProps/zIndex.test.js
3841
3819
  - app/pb_kits/playbook/utilities/text.ts
3842
3820
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3843
3821
  - dist/chunks/_pb_line_graph-hxi01lk7.js
@@ -1,68 +0,0 @@
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,33 +0,0 @@
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
- )
@@ -1,60 +0,0 @@
1
- import React from 'react'
2
- import { testGlobalProp, testGlobalPropAbsence, testGlobalPropInvalidValues } from './globalPropsTestHelper'
3
- import { render, screen } from '../../test-utils'
4
- import Body from '../../../pb_body/_body'
5
- import Button from '../../../pb_button/_button'
6
- import Card from '../../../pb_card/_card'
7
- import Title from '../../../pb_title/_title'
8
- import Flex from '../../../pb_flex/_flex'
9
- import Link from '../../../pb_link/_link'
10
- import Badge from '../../../pb_badge/_badge'
11
-
12
- const validSizes = ['xs', 'sm', 'md', 'lg', 'xl']
13
-
14
- // NOTE: TextInput excluded - positioning props are not valid for input elements
15
- // Test bottom prop with string values
16
- testGlobalProp(
17
- 'bottom',
18
- validSizes,
19
- (v) => `bottom_${v}`,
20
- null,
21
- [Body, Button, Card, Title, Flex, Link, Badge]
22
- )
23
-
24
- // Test bottom prop with object values (inset) - tested separately due to object value complexity
25
- test('Global Props: bottom returns proper class name with object values (inset)', () => {
26
- const testCases = [
27
- { value: { value: 'md', inset: true }, expected: 'bottom_md_inset' },
28
- { value: { value: 'lg', inset: false }, expected: 'bottom_lg' },
29
- { value: { value: 'sm', inset: true }, expected: 'bottom_sm_inset' }
30
- ]
31
-
32
- testCases.forEach(({ value, expected }) => {
33
- const testId = `body-bottom-object-${value.value}-${value.inset}`
34
- render(
35
- <Body
36
- bottom={value}
37
- data={{ testid: testId }}
38
- text="Hi"
39
- />
40
- )
41
- const kit = screen.getByTestId(testId)
42
- expect(kit).toHaveClass(expected)
43
- })
44
- })
45
-
46
- testGlobalPropAbsence(
47
- 'bottom',
48
- ['bottom_xs', 'bottom_sm', 'bottom_md', 'bottom_lg', 'bottom_xl'],
49
- undefined,
50
- { skipNull: true }
51
- )
52
-
53
- // NOTE: Currently using skipKnownIssues: true because globalProps.ts generates classes for invalid values
54
- testGlobalPropInvalidValues(
55
- 'bottom',
56
- ['invalid', 'bad_value', 'not_a_size', 'special-chars!@#'],
57
- ['bottom_invalid', 'bottom_bad_value', 'bottom_not_a_size', 'bottom_special-chars!@#'],
58
- undefined,
59
- { skipKnownIssues: true }
60
- )
@@ -1,42 +0,0 @@
1
- import { testGlobalProp, testGlobalPropAbsence, testGlobalPropInvalidValues } from './globalPropsTestHelper'
2
- import { camelToSnakeCase } from '../../../utilities/text'
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 TextInput from '../../../pb_text_input/_text_input'
8
- import Flex from '../../../pb_flex/_flex'
9
- import Link from '../../../pb_link/_link'
10
- import Badge from '../../../pb_badge/_badge'
11
-
12
- const validValues = [
13
- 'auto', 'default', 'none', 'contextMenu', 'help', 'pointer', 'progress', 'wait', 'cell',
14
- 'crosshair', 'text', 'verticalText', 'alias', 'copy', 'move', 'noDrop', 'notAllowed', 'grab',
15
- 'grabbing', 'eResize', 'nResize', 'neResize', 'nwResize', 'sResize', 'seResize', 'swResize', 'wResize',
16
- 'ewResize', 'nsResize', 'neswResize', 'nwseResize', 'colResize', 'rowResize', 'allScroll', 'zoomIn', 'zoomOut'
17
- ]
18
-
19
- testGlobalProp(
20
- 'cursor',
21
- validValues,
22
- (v) => `cursor_${camelToSnakeCase(v)}`,
23
- null,
24
- [Body, Button, Card, Title, TextInput, Flex, Link, Badge]
25
- )
26
-
27
- testGlobalPropAbsence(
28
- 'cursor',
29
- ['cursor_auto', 'cursor_pointer', 'cursor_default', 'cursor_none'],
30
- undefined,
31
- { skipNull: true }
32
- )
33
-
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
- 'cursor',
38
- ['invalid', 'bad_value', 'not_a_cursor', 'special-chars!@#'],
39
- ['cursor_invalid', 'cursor_bad_value', 'cursor_not_a_cursor', 'cursor_special-chars!@#'],
40
- undefined,
41
- { skipKnownIssues: true, allowRenderingErrors: true }
42
- )
@@ -1,33 +0,0 @@
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 TextInput from '../../../pb_text_input/_text_input'
7
- import Flex from '../../../pb_flex/_flex'
8
- import Link from '../../../pb_link/_link'
9
- import Badge from '../../../pb_badge/_badge'
10
-
11
- testGlobalProp(
12
- 'dark',
13
- [true],
14
- () => 'dark',
15
- null,
16
- [Body, Button, Card, Title, TextInput, Flex, Link, Badge]
17
- )
18
-
19
- testGlobalPropAbsence(
20
- 'dark',
21
- ['dark'],
22
- undefined,
23
- { skipNull: true }
24
- )
25
-
26
- // NOTE: Currently using skipKnownIssues: true because globalProps.ts generates classes for invalid values
27
- testGlobalPropInvalidValues(
28
- 'dark',
29
- ['invalid', 'bad_value', 123, 'true', 'false'],
30
- ['dark_invalid', 'dark_bad_value', 'dark_123', 'dark_true', 'dark_false'],
31
- undefined,
32
- { skipKnownIssues: true }
33
- )
@@ -1,87 +0,0 @@
1
- import { testGlobalProp, testGlobalPropResponsiveWithDefault, 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 - gap properties are not valid props for input elements
11
- // Test gap prop
12
- testGlobalProp(
13
- 'gap',
14
- ['xs', 'sm', 'md', 'lg', 'xl'],
15
- (v) => `gap_${v}`,
16
- (size, v) => `gap_${size}_${v}`,
17
- [Body, Button, Card, Title, Flex, Link, Badge]
18
- )
19
-
20
- testGlobalPropResponsiveWithDefault(
21
- 'gap',
22
- { default: 'md', xs: 'xs', sm: 'md', md: 'lg' },
23
- (v) => `gap_${v}`,
24
- (size, v) => `gap_${size}_${v}`
25
- )
26
-
27
- testGlobalPropAbsence(
28
- 'gap',
29
- ['gap_xs', 'gap_sm', 'gap_md', 'gap_lg', 'gap_xl'],
30
- undefined,
31
- { skipNull: true }
32
- )
33
-
34
- // Test columnGap prop
35
- testGlobalProp(
36
- 'columnGap',
37
- ['xs', 'sm', 'md', 'lg', 'xl'],
38
- (v) => `column_gap_${v}`,
39
- (size, v) => `column_gap_${size}_${v}`,
40
- [Body, Button, Card, Title, Flex, Link, Badge]
41
- )
42
-
43
- testGlobalPropResponsiveWithDefault(
44
- 'columnGap',
45
- { default: 'md', xs: 'xs', sm: 'md', md: 'lg' },
46
- (v) => `column_gap_${v}`,
47
- (size, v) => `column_gap_${size}_${v}`
48
- )
49
-
50
- testGlobalPropAbsence(
51
- 'columnGap',
52
- ['column_gap_xs', 'column_gap_sm', 'column_gap_md', 'column_gap_lg', 'column_gap_xl'],
53
- undefined,
54
- { skipNull: true }
55
- )
56
-
57
- // Test rowGap prop
58
- testGlobalProp(
59
- 'rowGap',
60
- ['xs', 'sm', 'md', 'lg', 'xl'],
61
- (v) => `row_gap_${v}`,
62
- (size, v) => `row_gap_${size}_${v}`,
63
- [Body, Button, Card, Title, Flex, Link, Badge]
64
- )
65
-
66
- testGlobalPropResponsiveWithDefault(
67
- 'rowGap',
68
- { default: 'md', xs: 'xs', sm: 'md', md: 'lg' },
69
- (v) => `row_gap_${v}`,
70
- (size, v) => `row_gap_${size}_${v}`
71
- )
72
-
73
- testGlobalPropAbsence(
74
- 'rowGap',
75
- ['row_gap_xs', 'row_gap_sm', 'row_gap_md', 'row_gap_lg', 'row_gap_xl'],
76
- undefined,
77
- { skipNull: true }
78
- )
79
-
80
- // NOTE: Currently using skipKnownIssues: true because globalProps.ts generates classes for invalid values
81
- testGlobalPropInvalidValues(
82
- 'gap',
83
- ['invalid', 'bad_value', 'not_a_size', 'special-chars!@#'],
84
- ['gap_invalid', 'gap_bad_value', 'gap_not_a_size', 'gap_special-chars!@#'],
85
- undefined,
86
- { skipKnownIssues: true }
87
- )
@@ -1,68 +0,0 @@
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
- const validHeightValues = ['auto', 'xs', 'sm', 'md', 'lg', 'xl', 'xxl', 'xxxl']
11
-
12
- // NOTE: TextInput excluded - height properties are not valid props for input elements
13
- // Test height prop
14
- testGlobalProp(
15
- 'height',
16
- validHeightValues,
17
- (v) => `height_${v}`,
18
- null,
19
- [Body, Button, Card, Title, Flex, Link, Badge]
20
- )
21
-
22
- testGlobalPropAbsence(
23
- 'height',
24
- ['height_auto', 'height_xs', 'height_sm', 'height_md', 'height_lg', 'height_xl', 'height_xxl', 'height_xxxl'],
25
- undefined,
26
- { skipNull: true }
27
- )
28
-
29
- // Test minHeight prop
30
- testGlobalProp(
31
- 'minHeight',
32
- validHeightValues,
33
- (v) => `min_height_${v}`,
34
- null,
35
- [Body, Button, Card, Title, Flex, Link, Badge]
36
- )
37
-
38
- testGlobalPropAbsence(
39
- 'minHeight',
40
- ['min_height_auto', 'min_height_xs', 'min_height_sm', 'min_height_md', 'min_height_lg', 'min_height_xl', 'min_height_xxl', 'min_height_xxxl'],
41
- undefined,
42
- { skipNull: true }
43
- )
44
-
45
- // Test maxHeight prop
46
- testGlobalProp(
47
- 'maxHeight',
48
- validHeightValues,
49
- (v) => `max_height_${v}`,
50
- null,
51
- [Body, Button, Card, Title, Flex, Link, Badge]
52
- )
53
-
54
- testGlobalPropAbsence(
55
- 'maxHeight',
56
- ['max_height_auto', 'max_height_xs', 'max_height_sm', 'max_height_md', 'max_height_lg', 'max_height_xl', 'max_height_xxl', 'max_height_xxxl'],
57
- undefined,
58
- { skipNull: true }
59
- )
60
-
61
- // NOTE: Currently using skipKnownIssues: true because globalProps.ts generates classes for invalid values
62
- testGlobalPropInvalidValues(
63
- 'height',
64
- ['invalid', 'bad_value', 'not_a_height', 'special-chars!@#', '100px', '50%'],
65
- ['height_invalid', 'height_bad_value', 'height_not_a_height', 'height_special-chars!@#', 'height_100px', 'height_50_percent'],
66
- undefined,
67
- { skipKnownIssues: true }
68
- )