playbook_ui 14.9.0.pre.alpha.play1742globalheightfixes4766 → 14.9.0.pre.rc.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -2
  3. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +17 -61
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.html.erb +1 -1
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.html.erb +1 -1
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -3
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +0 -2
  8. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +1 -3
  9. data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +0 -15
  10. data/app/pb_kits/playbook/pb_background/_background.tsx +2 -8
  11. data/app/pb_kits/playbook/pb_button/_button.scss +0 -6
  12. data/app/pb_kits/playbook/pb_button/_button.tsx +3 -1
  13. data/app/pb_kits/playbook/pb_button/_button_mixins.scss +0 -15
  14. data/app/pb_kits/playbook/pb_button/button.rb +1 -1
  15. data/app/pb_kits/playbook/pb_button/docs/_button_default.html.erb +0 -1
  16. data/app/pb_kits/playbook/pb_button/docs/_button_default.jsx +0 -8
  17. data/app/pb_kits/playbook/pb_button/docs/_button_default.md +1 -1
  18. data/app/pb_kits/playbook/pb_checkbox/checkbox.html.erb +2 -2
  19. data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +4 -0
  20. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb +7 -84
  21. data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +1 -3
  22. data/app/pb_kits/playbook/pb_currency/_currency.tsx +3 -7
  23. data/app/pb_kits/playbook/pb_currency/currency.html.erb +2 -2
  24. data/app/pb_kits/playbook/pb_currency/currency.rb +1 -17
  25. data/app/pb_kits/playbook/pb_currency/currency.test.js +3 -40
  26. data/app/pb_kits/playbook/pb_currency/docs/example.yml +0 -2
  27. data/app/pb_kits/playbook/pb_currency/docs/index.js +0 -1
  28. data/app/pb_kits/playbook/pb_drawer/_drawer.scss +0 -1
  29. data/app/pb_kits/playbook/pb_drawer/_drawer.tsx +45 -159
  30. data/app/pb_kits/playbook/pb_drawer/docs/example.yml +1 -1
  31. data/app/pb_kits/playbook/pb_drawer/docs/index.js +0 -1
  32. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +0 -1
  33. data/app/pb_kits/playbook/pb_dropdown/dropdown_container.html.erb +1 -0
  34. data/app/pb_kits/playbook/pb_dropdown/dropdown_container.rb +4 -0
  35. data/app/pb_kits/playbook/pb_dropdown/utilities/subComponentHelper.tsx +2 -13
  36. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +2 -2
  37. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb +1 -1
  38. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +12 -63
  39. data/app/pb_kits/playbook/pb_image/_image.tsx +1 -3
  40. data/app/pb_kits/playbook/pb_layout/_layout.tsx +14 -36
  41. data/app/pb_kits/playbook/pb_overlay/_overlay.tsx +1 -3
  42. data/app/pb_kits/playbook/pb_pagination/_pagination.tsx +2 -2
  43. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.tsx +3 -5
  44. data/app/pb_kits/playbook/pb_progress_simple/progress_simple.html.erb +2 -3
  45. data/app/pb_kits/playbook/pb_progress_simple/progress_simple.rb +0 -5
  46. data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +1 -3
  47. data/app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.html.erb +1 -2
  48. data/app/pb_kits/playbook/pb_table/_table.tsx +25 -109
  49. data/app/pb_kits/playbook/pb_table/docs/index.js +0 -1
  50. data/app/pb_kits/playbook/pb_table/styles/_all.scss +0 -2
  51. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb +0 -47
  52. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.jsx +0 -59
  53. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +0 -3
  54. data/app/pb_kits/playbook/pb_typeahead/index.ts +3 -29
  55. data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +2 -5
  56. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +0 -4
  57. data/app/pb_kits/playbook/utilities/_max_width.scss +9 -29
  58. data/app/pb_kits/playbook/utilities/_min_width.scss +2 -6
  59. data/app/pb_kits/playbook/utilities/globalPropNames.mjs +1 -1
  60. data/app/pb_kits/playbook/utilities/globalProps.ts +4 -37
  61. data/dist/chunks/_typeahead-D0PihN_3.js +22 -0
  62. data/dist/chunks/_weekday_stacked-uMIX8f-A.js +45 -0
  63. data/dist/chunks/{lib-SyD3buPZ.js → lib-BC6ESsxG.js} +1 -1
  64. data/dist/chunks/{pb_form_validation-Dt8UJgrJ.js → pb_form_validation-B_Z9rEbg.js} +1 -1
  65. data/dist/chunks/vendor.js +1 -1
  66. data/dist/menu.yml +0 -321
  67. data/dist/playbook-doc.js +1 -1
  68. data/dist/playbook-rails-react-bindings.js +1 -1
  69. data/dist/playbook-rails.js +1 -1
  70. data/dist/playbook.css +1 -1
  71. data/lib/playbook/classnames.rb +0 -4
  72. data/lib/playbook/forms/builder/typeahead_field.rb +0 -13
  73. data/lib/playbook/kit_base.rb +1 -16
  74. data/lib/playbook/spacing.rb +0 -21
  75. data/lib/playbook/version.rb +2 -2
  76. metadata +6 -28
  77. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell_rails.html.erb +0 -53
  78. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell_rails.md +0 -5
  79. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +0 -50
  80. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.md +0 -1
  81. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx +0 -57
  82. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.md +0 -5
  83. data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_pagination_mock_data.json +0 -5600
  84. data/app/pb_kits/playbook/pb_currency/docs/_currency_negative.html.erb +0 -4
  85. data/app/pb_kits/playbook/pb_currency/docs/_currency_negative.jsx +0 -16
  86. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.jsx +0 -31
  87. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.md +0 -6
  88. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.jsx +0 -87
  89. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_react.md +0 -2
  90. data/app/pb_kits/playbook/pb_table/styles/_scroll.scss +0 -4
  91. data/app/pb_kits/playbook/pb_table/styles/_sticky_columns.scss +0 -18
  92. data/app/pb_kits/playbook/tokens/_height.scss +0 -19
  93. data/app/pb_kits/playbook/tokens/exports/_height.module.scss +0 -37
  94. data/app/pb_kits/playbook/utilities/_height.scss +0 -33
  95. data/app/pb_kits/playbook/utilities/_width.scss +0 -45
  96. data/dist/chunks/_typeahead-B8fkIeXA.js +0 -22
  97. data/dist/chunks/_weekday_stacked-DjRTXEi-.js +0 -45
  98. data/lib/playbook/height.rb +0 -29
  99. data/lib/playbook/max_height.rb +0 -29
  100. data/lib/playbook/min_height.rb +0 -29
@@ -2,7 +2,7 @@ import React from 'react'
2
2
  import classnames from 'classnames'
3
3
  import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
4
4
 
5
- import { GlobalProps, globalProps, globalInlineProps } from '../utilities/globalProps'
5
+ import { globalProps } from '../utilities/globalProps'
6
6
 
7
7
  type LayoutPropTypes = {
8
8
  aria?: {[key: string]: string},
@@ -19,42 +19,39 @@ type LayoutPropTypes = {
19
19
  variant?: "light" | "dark" | "gradient",
20
20
  transparent?: boolean,
21
21
  layout?: "sidebar" | "collection" | "kanban" | "content" | "masonry",
22
- } & GlobalProps
22
+ }
23
23
 
24
24
  type LayoutSideProps = {
25
25
  children: React.ReactNode[] | React.ReactNode,
26
26
  className?: string,
27
- } & GlobalProps
27
+ }
28
28
 
29
29
  type LayoutBodyProps = {
30
30
  children: React.ReactNode[] | React.ReactNode,
31
31
  className?: string,
32
- } & GlobalProps
32
+ }
33
33
 
34
34
  type LayoutItemProps = {
35
35
  children: React.ReactNode[] | React.ReactNode,
36
36
  className?: string,
37
37
  size?: "sm" | "md" | "lg"
38
- } & GlobalProps
38
+ }
39
39
 
40
40
  type LayoutHeaderProps = {
41
41
  children: React.ReactNode[] | React.ReactNode,
42
42
  className?: string,
43
- } & GlobalProps
43
+ }
44
44
 
45
45
  type LayoutFooterProps = {
46
46
  children: React.ReactNode[] | React.ReactNode,
47
47
  className?: string,
48
- } & GlobalProps
48
+ }
49
49
 
50
+ // Side component
50
51
  const Side = (props: LayoutSideProps) => {
51
52
  const { children, className } = props
52
- const dynamicInlineProps = globalInlineProps(props)
53
53
  return (
54
- <div
55
- className={classnames('layout_sidebar', globalProps(props), className)}
56
- style={dynamicInlineProps}
57
- >
54
+ <div className={classnames('layout_sidebar', globalProps(props), className)}>
58
55
  {children}
59
56
  </div>
60
57
  )
@@ -63,12 +60,8 @@ const Side = (props: LayoutSideProps) => {
63
60
  // Body component
64
61
  const Body = (props: LayoutBodyProps) => {
65
62
  const { children, className } = props
66
- const dynamicInlineProps = globalInlineProps(props)
67
63
  return (
68
- <div
69
- className={classnames('layout_body', globalProps(props), className)}
70
- style={dynamicInlineProps}
71
- >
64
+ <div className={classnames('layout_body', globalProps(props), className)}>
72
65
  {children}
73
66
  </div>
74
67
  )
@@ -78,12 +71,8 @@ const Body = (props: LayoutBodyProps) => {
78
71
  const Item = (props: LayoutItemProps) => {
79
72
  const { children, className, size = 'sm' } = props
80
73
  const sizeClass = `size_${size}`
81
- const dynamicInlineProps = globalInlineProps(props)
82
74
  return (
83
- <div
84
- className={classnames('layout_item', sizeClass, globalProps(props), className)}
85
- style={dynamicInlineProps}
86
- >
75
+ <div className={classnames('layout_item', sizeClass, globalProps(props), className)}>
87
76
  {children}
88
77
  </div>
89
78
  )
@@ -92,12 +81,8 @@ const Item = (props: LayoutItemProps) => {
92
81
  // Header component
93
82
  const Header = (props: LayoutHeaderProps) => {
94
83
  const { children, className } = props
95
- const dynamicInlineProps = globalInlineProps(props)
96
84
  return (
97
- <div
98
- className={classnames('layout_header', globalProps(props), className)}
99
- style={dynamicInlineProps}
100
- >
85
+ <div className={classnames('layout_header', globalProps(props), className)}>
101
86
  {children}
102
87
  </div>
103
88
  )
@@ -106,12 +91,8 @@ const Header = (props: LayoutHeaderProps) => {
106
91
  // Footer component
107
92
  const Footer = (props: LayoutFooterProps) => {
108
93
  const { children, className } = props
109
- const dynamicInlineProps = globalInlineProps(props)
110
94
  return (
111
- <div
112
- className={classnames('layout_footer', globalProps(props), className)}
113
- style={dynamicInlineProps}
114
- >
95
+ <div className={classnames('layout_footer', globalProps(props), className)}>
115
96
  {children}
116
97
  </div>
117
98
  )
@@ -178,8 +159,6 @@ const Layout = (props: LayoutPropTypes) => {
178
159
  const filteredProps = {...props}
179
160
  delete filteredProps?.position
180
161
 
181
- const dynamicInlineProps = globalInlineProps(props)
182
-
183
162
  return (
184
163
  <div
185
164
  {...ariaProps}
@@ -192,8 +171,7 @@ const Layout = (props: LayoutPropTypes) => {
192
171
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
193
172
  //@ts-ignore
194
173
  globalProps(filteredProps)
195
- )}
196
- style={dynamicInlineProps}
174
+ )}
197
175
  >
198
176
  {subComponentTags('Side')}
199
177
  {nonSideChildren}
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
3
  import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
4
- import { globalProps, globalInlineProps } from '../utilities/globalProps'
4
+ import { globalProps } from '../utilities/globalProps'
5
5
  import OverlayPercentage from './subcomponents/_overlay_percentage'
6
6
  import OverlayToken from './subcomponents/_overlay_token'
7
7
 
@@ -39,7 +39,6 @@ const Overlay = (props: OverlayProps) => {
39
39
  const dataProps = buildDataProps(data)
40
40
  const classes = classnames(buildCss('pb_overlay'), globalProps(props), className)
41
41
  const htmlProps = buildHtmlProps(htmlOptions)
42
- const dynamicInlineProps = globalInlineProps(props)
43
42
 
44
43
  const getPosition = () => {
45
44
  return Object.keys(layout)[0]
@@ -58,7 +57,6 @@ const Overlay = (props: OverlayProps) => {
58
57
  {...htmlProps}
59
58
  className={classes}
60
59
  id={id}
61
- style={dynamicInlineProps}
62
60
  >
63
61
  {isSizePercentage ?
64
62
  OverlayPercentage({
@@ -1,6 +1,6 @@
1
1
  import React, { useState } from "react";
2
2
  import classnames from 'classnames'
3
- import { GlobalProps, globalProps } from '../utilities/globalProps'
3
+ import { globalProps } from '../utilities/globalProps'
4
4
  import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
5
5
  import Icon from '../pb_icon/_icon';
6
6
 
@@ -14,7 +14,7 @@ type PaginationProps = {
14
14
  onChange?: (pageNumber: number) => void;
15
15
  range?: number;
16
16
  total?: number;
17
- } & GlobalProps;
17
+ };
18
18
 
19
19
  const Pagination = ( props: PaginationProps) => {
20
20
  const {
@@ -1,9 +1,7 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
3
  import { buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
4
- import { globalProps, GlobalProps } from '../utilities/globalProps'
5
-
6
- type ModifiedGlobalProps = Omit<GlobalProps, 'width'>
4
+ import { globalProps } from '../utilities/globalProps'
7
5
 
8
6
  type ProgressSimpleProps = {
9
7
  align?: "left" | "center" | "right",
@@ -18,7 +16,7 @@ type ProgressSimpleProps = {
18
16
  value: number,
19
17
  variant?: "default" | "positive" | "negative" | "warning",
20
18
  width: string,
21
- } & ModifiedGlobalProps
19
+ }
22
20
 
23
21
  const ProgressSimple = (props: ProgressSimpleProps): React.ReactElement => {
24
22
  const {
@@ -58,7 +56,7 @@ const ProgressSimple = (props: ProgressSimpleProps): React.ReactElement => {
58
56
  )
59
57
 
60
58
  return (
61
- <div
59
+ <div
62
60
  {...dataProps}
63
61
  {...htmlProps}
64
62
  className={wrapperClass}
@@ -1,10 +1,9 @@
1
- <%= content_tag(:div,
2
- class: object.wrapper_classname,
3
- style: object.style) do %>
1
+ <%= content_tag(:div, class: object.wrapper_classname) do %>
4
2
  <%= content_tag(:div,
5
3
  id: object.id,
6
4
  data: object.data_values,
7
5
  class: object.classname,
6
+ style: object.style,
8
7
  **combined_html_options) do %>
9
8
  <%= content_tag(:div, "",
10
9
  class: "progress_simple_value",
@@ -21,11 +21,6 @@ module Playbook
21
21
  values: %w[default positive negative warning],
22
22
  default: "default"
23
23
 
24
- # Explicitly defining the width prop here so the local prop takes precedence over global width prop
25
- def width
26
- prop(:width)
27
- end
28
-
29
24
  def number_value
30
25
  validate_required_progress_props
31
26
 
@@ -2,7 +2,7 @@ import React from 'react'
2
2
  import classnames from 'classnames'
3
3
 
4
4
  import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
5
- import { globalProps, globalInlineProps } from '../utilities/globalProps'
5
+ import { globalProps } from '../utilities/globalProps'
6
6
 
7
7
  import Caption from '../pb_caption/_caption'
8
8
 
@@ -38,7 +38,6 @@ const SectionSeparator = (props: SectionSeparatorProps): React.ReactElement => {
38
38
  const dataProps = buildDataProps(data)
39
39
  const htmlProps = buildHtmlProps(htmlOptions)
40
40
  const classes = classnames(buildCss('pb_section_separator_kit', variant, orientation, lineStyle === "dashed" ? lineStyle : ""), globalProps(props), className)
41
- const dynamicInlineProps = globalInlineProps(props)
42
41
 
43
42
  return (
44
43
 
@@ -48,7 +47,6 @@ const SectionSeparator = (props: SectionSeparatorProps): React.ReactElement => {
48
47
  {...htmlProps}
49
48
  className={classes}
50
49
  id={id}
51
- style={dynamicInlineProps}
52
50
  >
53
51
  {
54
52
  children && children ||
@@ -6,7 +6,6 @@
6
6
  value: "selected_with_icon",
7
7
  checked: true,
8
8
  icon: true,
9
-
10
9
  }) do %>
11
10
  Selected, with icon
12
11
  <% end %>
@@ -37,4 +36,4 @@
37
36
  Disabled
38
37
  <% end %>
39
38
 
40
- </div>
39
+ </div>
@@ -1,14 +1,14 @@
1
1
  import React, { useEffect } from 'react'
2
2
  import classnames from 'classnames'
3
3
  import { buildAriaProps, buildDataProps, buildHtmlProps } from '../utilities/props'
4
- import { globalProps, GlobalProps, globalInlineProps } from '../utilities/globalProps'
4
+ import { globalProps, GlobalProps } from '../utilities/globalProps'
5
5
  import PbTable from '.'
6
6
  import {
7
- TableHead,
8
- TableHeader,
9
- TableBody,
10
- TableRow,
11
- TableCell,
7
+ TableHead,
8
+ TableHeader,
9
+ TableBody,
10
+ TableRow,
11
+ TableCell,
12
12
  } from "./subcomponents";
13
13
 
14
14
  type TableProps = {
@@ -28,7 +28,6 @@ type TableProps = {
28
28
  singleLine?: boolean,
29
29
  size?: "sm" | "md" | "lg",
30
30
  sticky?: boolean,
31
- stickyLeftcolumn?: string[],
32
31
  striped?: boolean,
33
32
  tag?: "table" | "div",
34
33
  verticalBorder?: boolean,
@@ -52,7 +51,6 @@ const Table = (props: TableProps): React.ReactElement => {
52
51
  singleLine = false,
53
52
  size = 'sm',
54
53
  sticky = false,
55
- stickyLeftcolumn = [],
56
54
  striped = false,
57
55
  tag = 'table',
58
56
  verticalBorder = false,
@@ -66,7 +64,6 @@ const Table = (props: TableProps): React.ReactElement => {
66
64
  const spaceCssName = outerPadding !== 'none' ? 'space_' : ''
67
65
  const outerPaddingCss = outerPadding ? `outer_padding_${spaceCssName}${outerPadding}` : ''
68
66
  const isTableTag = tag === 'table'
69
- const dynamicInlineProps = globalInlineProps(props)
70
67
 
71
68
  const classNames = classnames(
72
69
  'pb_table',
@@ -79,7 +76,6 @@ const Table = (props: TableProps): React.ReactElement => {
79
76
  'single-line': singleLine,
80
77
  'no-hover': disableHover,
81
78
  'sticky-header': sticky,
82
- 'sticky-left-column': stickyLeftcolumn,
83
79
  'striped': striped,
84
80
  [outerPaddingCss]: outerPadding !== '',
85
81
  },
@@ -89,56 +85,6 @@ const Table = (props: TableProps): React.ReactElement => {
89
85
  className
90
86
  )
91
87
 
92
- useEffect(() => {
93
- const handleStickyColumns = () => {
94
- let accumulatedWidth = 0;
95
-
96
- stickyLeftcolumn.forEach((colId, index) => {
97
- const isLastColumn = index === stickyLeftcolumn.length - 1;
98
- const header = document.querySelector(`th[id="${colId}"]`);
99
- const cells = document.querySelectorAll(`td[id="${colId}"]`);
100
-
101
- if (header) {
102
- header.classList.add('sticky');
103
- (header as HTMLElement).style.left = `${accumulatedWidth}px`;
104
-
105
- if (!isLastColumn) {
106
- header.classList.add('with-border');
107
- header.classList.remove('sticky-shadow');
108
- } else {
109
- header.classList.remove('with-border');
110
- header.classList.add('sticky-shadow');
111
- }
112
-
113
- accumulatedWidth += (header as HTMLElement).offsetWidth;
114
- }
115
-
116
- cells.forEach((cell) => {
117
- cell.classList.add('sticky');
118
- (cell as HTMLElement).style.left = `${accumulatedWidth - (header as HTMLElement).offsetWidth}px`;
119
-
120
- if (!isLastColumn) {
121
- cell.classList.add('with-border');
122
- cell.classList.remove('sticky-shadow');
123
- } else {
124
- cell.classList.remove('with-border');
125
- cell.classList.add('sticky-shadow');
126
- }
127
- });
128
- });
129
- };
130
-
131
- setTimeout(() => {
132
- handleStickyColumns();
133
- }, 10);
134
-
135
- window.addEventListener('resize', handleStickyColumns);
136
-
137
- return () => {
138
- window.removeEventListener('resize', handleStickyColumns);
139
- };
140
- }, [stickyLeftcolumn]);
141
-
142
88
  useEffect(() => {
143
89
  const instance = new PbTable()
144
90
  instance.connect()
@@ -146,56 +92,26 @@ const Table = (props: TableProps): React.ReactElement => {
146
92
 
147
93
  return (
148
94
  <>
149
- {responsive === 'scroll' ? (
150
- <div className='table-responsive-scroll'>
151
- {isTableTag ? (
152
- <table
153
- {...ariaProps}
154
- {...dataProps}
155
- {...htmlProps}
156
- className={classNames}
157
- id={id}
158
- style={dynamicInlineProps}
159
- >
160
- {children}
161
- </table>
162
- ) : (
163
- <div
164
- {...ariaProps}
165
- {...dataProps}
166
- {...htmlProps}
167
- className={classNames}
168
- id={id}
169
- style={dynamicInlineProps}
170
- >
171
- {children}
172
- </div>
173
- )}
174
- </div>
95
+ {isTableTag ? (
96
+ <table
97
+ {...ariaProps}
98
+ {...dataProps}
99
+ {...htmlProps}
100
+ className={classNames}
101
+ id={id}
102
+ >
103
+ {children}
104
+ </table>
175
105
  ) : (
176
- isTableTag ? (
177
- <table
178
- {...ariaProps}
179
- {...dataProps}
180
- {...htmlProps}
181
- className={classNames}
182
- id={id}
183
- style={dynamicInlineProps}
184
- >
185
- {children}
186
- </table>
187
- ) : (
188
- <div
189
- {...ariaProps}
190
- {...dataProps}
191
- {...htmlProps}
192
- className={classNames}
193
- id={id}
194
- style={dynamicInlineProps}
195
- >
196
- {children}
197
- </div>
198
- )
106
+ <div
107
+ {...ariaProps}
108
+ {...dataProps}
109
+ {...htmlProps}
110
+ className={classNames}
111
+ id={id}
112
+ >
113
+ {children}
114
+ </div>
199
115
  )}
200
116
  </>
201
117
  )
@@ -25,4 +25,3 @@ export { default as TableDiv } from './_table_div.jsx'
25
25
  export { default as TableWithSubcomponents } from './_table_with_subcomponents.jsx'
26
26
  export { default as TableWithSubcomponentsAsDivs } from './_table_with_subcomponents_as_divs.jsx'
27
27
  export { default as TableOuterPadding } from './_table_outer_padding.jsx'
28
- export { default as TableStickyLeftColumns } from './_table_sticky_left_columns.jsx'
@@ -20,5 +20,3 @@
20
20
  @import "table_header";
21
21
  @import "striped";
22
22
  @import "outer_padding";
23
- @import "sticky_columns";
24
- @import "scroll";
@@ -41,50 +41,3 @@
41
41
  }) %>
42
42
  <% end %>
43
43
  <% end %>
44
-
45
- <br /><br /><br />
46
-
47
- <%= pb_rails("timeline", props: {orientation: "vertical", show_date: true}) do %>
48
- <%= pb_rails("timeline/item") do |item| %>
49
-
50
- <% item.label do %>
51
- <%= pb_rails("timeline/label") do %>
52
- <%= pb_rails("title", props: { text: "Any Kit", size: 4 }) %>
53
- <% end %>
54
- <% end %>
55
-
56
- <% item.step do %>
57
- <%= pb_rails("timeline/step", props: { icon: 'user', icon_color: 'royal' }) %>
58
- <% end %>
59
-
60
- <% item.detail do %>
61
- <%= pb_rails("title_detail", props: {
62
- title: "Jackson Heights",
63
- detail: "37-27 74th Street"
64
- }) %>
65
- <% end %>
66
- <% end %>
67
-
68
- <%= pb_rails("timeline/item", props: {icon: "map-marker-alt", icon_color: "purple", date: Date.today+1, line_style: "dotted" }) do |item| %>
69
- <%= pb_rails("title_detail", props: {
70
- title: "Society Hill",
71
- detail: "72 E St Astoria"
72
- }) %>
73
- <% end %>
74
-
75
- <%= pb_rails("timeline/item") do |item| %>
76
-
77
- <% item.step do %>
78
- <%= pb_rails("timeline/step") do %>
79
- <%= pb_rails("pill", props: { text: "3" , variant: "success" }) %>
80
- <% end %>
81
- <% end %>
82
-
83
- <% item.detail do %>
84
- <%= pb_rails("title_detail", props: {
85
- title: "Greenpoint",
86
- detail: "81 Gate St Brooklyn"
87
- }) %>
88
- <% end %>
89
- <% end %>
90
- <% end %>
@@ -62,65 +62,6 @@ const TimelineWithChildren = (props) => (
62
62
  </Timeline.Detail>
63
63
  </Timeline.Item>
64
64
  </Timeline>
65
-
66
- <br />
67
- <br />
68
- <br />
69
-
70
- <Timeline orientation="vertical"
71
- showDate
72
- {...props}
73
- >
74
- <Timeline.Item lineStyle="solid"
75
- {...props}
76
- >
77
- <Timeline.Label>
78
- <Title size={4}
79
- text='Any Kit'
80
- />
81
- </Timeline.Label>
82
- <Timeline.Step icon="user"
83
- iconColor="royal"
84
- />
85
- <Timeline.Detail>
86
- <TitleDetail detail="37-27 74th Street"
87
- title="Jackson Heights"
88
- {...props}
89
- />
90
- </Timeline.Detail>
91
- </Timeline.Item>
92
-
93
- <Timeline.Item lineStyle="dotted"
94
- {...props}
95
- >
96
- <Timeline.Label date={new Date(new Date().setDate(new Date().getDate() + 1))} />
97
- <Timeline.Step icon="map-marker-alt"
98
- iconColor="purple"
99
- />
100
- <Timeline.Detail>
101
- <TitleDetail detail="72 E St Astoria"
102
- title="Society Hill"
103
- {...props}
104
- />
105
- </Timeline.Detail>
106
- </Timeline.Item>
107
-
108
- <Timeline.Item lineStyle="solid"
109
- {...props}
110
- >
111
- <Timeline.Step>
112
- <Pill text="3"
113
- variant="success"
114
- />
115
- </Timeline.Step>
116
- <Timeline.Detail>
117
- <TitleDetail detail="81 Gate St Brooklyn"
118
- title="Greenpoint"
119
- {...props}
120
- />
121
- </Timeline.Detail>
122
- </Timeline.Item>
123
- </Timeline>
124
65
  </div>
125
66
  )
126
67
 
@@ -2,7 +2,6 @@
2
2
  @import "../tokens/border_radius";
3
3
  @import "../tokens/spacing";
4
4
  @import "../tokens/shadows";
5
- @import "../tokens/positioning";
6
5
 
7
6
  [class^=pb_typeahead_kit] {
8
7
  .typeahead-kit-select__option {
@@ -100,7 +99,6 @@
100
99
  .typeahead-kit-select__menu {
101
100
  background-color: $bg_dark;
102
101
  color: $white;
103
- z-index: $z_1;
104
102
  }
105
103
  .typeahead-kit-select__option:hover {
106
104
  background-color: $active_dark;
@@ -184,7 +182,6 @@
184
182
  }
185
183
 
186
184
  .typeahead-kit-select__menu {
187
- z-index: $z_1;
188
185
  .typeahead-kit-select__menu-list {
189
186
  padding: 0;
190
187
  }
@@ -4,12 +4,11 @@ import { debounce } from 'lodash'
4
4
  export default class PbTypeahead extends PbEnhancedElement {
5
5
  _searchInput: HTMLInputElement
6
6
  _resultsElement: HTMLElement
7
- _debouncedSearch: () => void
7
+ _debouncedSearch: Function
8
8
  _resultsLoadingIndicator: HTMLElement
9
9
  _resultOptionTemplate: HTMLElement
10
10
  _resultsOptionCache: Map<string, Array<DocumentFragment>>
11
11
  _searchContext: string
12
- _validSelection: boolean
13
12
 
14
13
  static get selector() {
15
14
  return '[data-pb-typeahead-kit]'
@@ -87,9 +86,6 @@ export default class PbTypeahead extends PbEnhancedElement {
87
86
  const resultOption = (event.target as Element).closest('[data-result-option-item]')
88
87
  if (!resultOption) return
89
88
 
90
- this._validSelection = true
91
- this.removeValidationError()
92
-
93
89
  this.resultsCacheClear()
94
90
  this.searchInputClear()
95
91
  this.clearResults()
@@ -97,28 +93,6 @@ export default class PbTypeahead extends PbEnhancedElement {
97
93
  this.element.dispatchEvent(new CustomEvent('pb-typeahead-kit-result-option-selected', { bubbles: true, detail: { selected: resultOption, typeahead: this } }))
98
94
  }
99
95
 
100
- removeValidationError() {
101
- const inputWrapper = this.searchInput.closest('.text_input_wrapper')
102
- if (inputWrapper) {
103
- const errorMessage = inputWrapper.querySelector('.pb_body_kit_negative') as HTMLElement
104
- if (errorMessage) {
105
- errorMessage.style.display = 'none'
106
- }
107
- this.searchInput.classList.remove('error')
108
- }
109
- }
110
-
111
- showValidationError() {
112
- const inputWrapper = this.searchInput.closest('.text_input_wrapper')
113
- if (inputWrapper) {
114
- const errorMessage = inputWrapper.querySelector('.pb_body_kit_negative') as HTMLElement
115
- if (errorMessage) {
116
- errorMessage.style.display = 'block'
117
- }
118
- this.searchInput.classList.add('error')
119
- }
120
- }
121
-
122
96
  clearResults() {
123
97
  this.resultsElement.innerHTML = ''
124
98
  }
@@ -227,8 +201,8 @@ export default class PbTypeahead extends PbEnhancedElement {
227
201
  }
228
202
 
229
203
  toggleResultsLoadingIndicator(visible: boolean) {
230
- let visibilityProperty = '0'
204
+ var visibilityProperty = '0'
231
205
  if (visible) visibilityProperty = '1'
232
206
  this.resultsLoadingIndicator.style.opacity = visibilityProperty
233
207
  }
234
- }
208
+ }