playbook_ui 14.25.0.pre.alpha.PLAY2423circleiconbuttonaria9795 → 14.25.0.pre.alpha.testingcss9700

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 (39) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.tsx +0 -2
  3. data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.html.erb +0 -1
  4. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +0 -19
  5. data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +0 -1
  6. data/app/pb_kits/playbook/pb_flex/_flex.tsx +6 -9
  7. data/app/pb_kits/playbook/pb_flex/docs/_flex_gap.html.erb +1 -12
  8. data/app/pb_kits/playbook/pb_flex/docs/_flex_gap.jsx +1 -26
  9. data/app/pb_kits/playbook/pb_flex/docs/_flex_gap.md +9 -0
  10. data/app/pb_kits/playbook/pb_flex/flex.rb +12 -6
  11. data/app/pb_kits/playbook/pb_icon/_icon.scss +0 -4
  12. data/app/pb_kits/playbook/pb_text_input/text_input.rb +0 -15
  13. data/app/pb_kits/playbook/utilities/_gap.scss +24 -12
  14. data/app/pb_kits/playbook/utilities/globalPropNames.mjs +0 -2
  15. data/app/pb_kits/playbook/utilities/globalProps.ts +4 -28
  16. data/dist/chunks/_line_graph-DPTwfQR-.js +544 -0
  17. data/dist/chunks/_typeahead-CEqlHw0H.js +30978 -0
  18. data/dist/chunks/_weekday_stacked-D3dG14OB.js +20894 -0
  19. data/dist/chunks/lazysizes-BUUj27EF.js +611 -0
  20. data/dist/chunks/lib-CIetbXpr.js +9609 -0
  21. data/dist/chunks/pb_form_validation-D_g9rOE9.js +60 -0
  22. data/dist/chunks/vendor.js +11 -1
  23. data/dist/playbook-doc.js +67243 -3
  24. data/dist/playbook-rails-react-bindings.js +112 -1
  25. data/dist/playbook-rails.js +2464 -1
  26. data/dist/playbook.css +92354 -2
  27. data/dist/reset.css +89 -1
  28. data/lib/playbook/classnames.rb +0 -2
  29. data/lib/playbook/spacing.rb +1 -53
  30. data/lib/playbook/version.rb +1 -1
  31. metadata +9 -10
  32. data/app/pb_kits/playbook/pb_flex/docs/_flex_gap_rails.md +0 -11
  33. data/app/pb_kits/playbook/pb_flex/docs/_flex_gap_react.md +0 -11
  34. data/dist/chunks/_line_graph-Db1_xmFW.js +0 -1
  35. data/dist/chunks/_typeahead-B2TOA1GJ.js +0 -6
  36. data/dist/chunks/_weekday_stacked-BMEnbTOP.js +0 -37
  37. data/dist/chunks/lazysizes-B7xYodB-.js +0 -1
  38. data/dist/chunks/lib-CY5ZPzic.js +0 -29
  39. data/dist/chunks/pb_form_validation-D3b0JKHH.js +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9355364fc7d7da3af430a70752283ef769ea8820831ee742e7c1650023bdbd0a
4
- data.tar.gz: babde4d1c487fc45cb11d5780212301660d3cbbd52ddbd4e22d3003428e37990
3
+ metadata.gz: 5a1eeaf2f62d7b4fd094d05bede8f832f9021bf561d33cd0ac02fcd03e8e700f
4
+ data.tar.gz: 251d98bd7c327124c0e179dbcfc37f10d65728418a0b6c6a5bee775cdce5b3ab
5
5
  SHA512:
6
- metadata.gz: 4115e49f7072943c52ca39124bba001d89e801a5f9801854fae2ad8e5107edd0539ad0f2e087bd8aad143c929715d6f7ad55a9eb927dc3438430e4aa30ddbcc9
7
- data.tar.gz: 0eabc0ebf3a1ca3889d12059102dceb5367d5ae8a112f40d3ec34984de53074b5d592b5fb5a695cca33e68d96ae7f8dbd966513aa7c19579998490298b189d01
6
+ metadata.gz: e7d20ec1e7dccd4947ed03b7f50e74809c4e8c18a30fc9fb075c4ede04c6053d86cbc7397fa443fdfb6abdfa62b8ad5a77d65a607fe8b4f9d5bb97dcde98bac3
7
+ data.tar.gz: d2ad121581858362b9250eb43eafb4d30e38b066bb46de721a6a1a6be3746279a2fb5d7f05fa2025cd764c30c938e00700841d74e602a4ea8981bee79e2df297
@@ -65,7 +65,6 @@ const CircleIconButton = (props: CircleIconButtonProps): React.ReactElement => {
65
65
  id={id}
66
66
  >
67
67
  <Button
68
- aria={aria}
69
68
  dark={dark}
70
69
  disabled={disabled}
71
70
  htmlType={type}
@@ -79,7 +78,6 @@ const CircleIconButton = (props: CircleIconButtonProps): React.ReactElement => {
79
78
  >
80
79
  <Icon
81
80
  fixedWidth
82
- htmlOptions={{'aria-hidden': true}}
83
81
  icon={icon}
84
82
  />
85
83
  </Button>
@@ -1,6 +1,5 @@
1
1
  <%= pb_content_tag do %>
2
2
  <%= pb_rails("button", props: {
3
- aria: object.aria,
4
3
  type: object.type,
5
4
  loading: object.loading,
6
5
  link: object.link,
@@ -4,7 +4,6 @@ import classnames from 'classnames'
4
4
  import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
5
5
  import { deprecatedProps, globalProps, GlobalProps } from '../utilities/globalProps'
6
6
  import { getAllIcons } from "../utilities/icons/allicons"
7
- import { camelToSnakeCase } from '../utilities/text'
8
7
 
9
8
  import datePickerHelper from './date_picker_helper'
10
9
  import Icon from '../pb_icon/_icon'
@@ -115,20 +114,6 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
115
114
  const inputAriaProps = buildAriaProps(inputAria)
116
115
  const inputDataProps = buildDataProps(inputData)
117
116
 
118
- // Convert cursor prop to CSS-style format to apply to input tag below
119
- const getCursorStyle = (cursor?: string): string => {
120
- // If input is disabled, always use 'not-allowed'
121
- if (disableInput) return 'not-allowed'
122
-
123
- // If cursor prop is provided, convert it to styling format
124
- if (cursor) {
125
- return camelToSnakeCase(cursor).replace(/_/g, '-')
126
- }
127
-
128
- // Default to 'pointer'
129
- return 'pointer'
130
- }
131
-
132
117
  useEffect(() => {
133
118
  datePickerHelper({
134
119
  allowInput,
@@ -164,7 +149,6 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
164
149
  required: false,
165
150
  }, scrollContainer)
166
151
  }, initializeOnce ? [] : undefined)
167
-
168
152
  const filteredProps = {...props}
169
153
  if (filteredProps.marginBottom === undefined) {
170
154
  filteredProps.marginBottom = "sm"
@@ -179,7 +163,6 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
179
163
  error ? 'error' : null,
180
164
  className
181
165
  )
182
-
183
166
  const iconWrapperClass = () => {
184
167
  let base = 'cal_icon_wrapper'
185
168
  if (dark) {
@@ -193,7 +176,6 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
193
176
  }
194
177
  return base
195
178
  }
196
-
197
179
  const angleDown = getAllIcons()["angleDown"].icon as unknown as { [key: string]: SVGElement }
198
180
 
199
181
  return (
@@ -224,7 +206,6 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
224
206
  name={name}
225
207
  onChange={inputOnChange}
226
208
  placeholder={placeholder}
227
- style={{ cursor: getCursorStyle(filteredProps.cursor) }}
228
209
  value={inputValue}
229
210
  />
230
211
 
@@ -10,7 +10,6 @@
10
10
  <%= pb_rails("text_input", props: {
11
11
  aria: object.input_aria,
12
12
  autocomplete: false,
13
- cursor: object.cursor,
14
13
  dark: object.dark,
15
14
  data: object.input_data,
16
15
  disabled: object.disable_input,
@@ -4,9 +4,6 @@ import { buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
4
4
  import { GlobalProps, globalProps, globalInlineProps } from '../utilities/globalProps'
5
5
  import { GenericObject, Sizes } from '../types'
6
6
 
7
- type SizeType = Sizes | "none"
8
- type SizeResponsiveType = { [key: string]: SizeType }
9
-
10
7
  type FlexProps = {
11
8
  children: React.ReactChild[] | React.ReactNode,
12
9
  className?: string,
@@ -21,9 +18,9 @@ type FlexProps = {
21
18
  reverse?: boolean,
22
19
  vertical?: "top" | "center" | "bottom" | "stretch" | "baseline" | "none",
23
20
  align?: "start" | "center" | "end" | "stretch" | "baseline" | "none",
24
- gap?: SizeType | SizeResponsiveType,
25
- rowGap?: SizeType | SizeResponsiveType,
26
- columnGap?: SizeType | SizeResponsiveType,
21
+ gap?: Sizes | "none",
22
+ rowGap?: Sizes| "none",
23
+ columnGap?: Sizes| "none",
27
24
  wrap?: boolean,
28
25
  alignSelf?: "start" | "end" | "center" | "stretch" | "none"
29
26
  } & GlobalProps
@@ -56,9 +53,9 @@ const Flex = (props: FlexProps): React.ReactElement => {
56
53
  const alignClass = align !== 'none' ? `align_items_${align}` : `align_items_${vertical}`
57
54
  const inlineClass = inline === true ? 'inline' : ''
58
55
  const spacingClass = spacing !== undefined ? `spacing_${spacing}` : ''
59
- const gapClass = (gap !== 'none' && typeof gap === 'object') ? `gap_${gap}` : ''
60
- const rowGapClass = (rowGap !== 'none' && typeof rowGap === 'object') ? `rowGap_${rowGap}` : ''
61
- const columnGapClass = (columnGap !== 'none' && typeof columnGap === 'object') ? `columnGap_${columnGap}` : ''
56
+ const gapClass = gap !== 'none' ? `gap_${gap}` : ''
57
+ const rowGapClass = rowGap !== 'none' ? `rowGap_${rowGap}` : ''
58
+ const columnGapClass = columnGap !== 'none' ? `columnGap_${columnGap}` : ''
62
59
  const wrapClass = wrap === true ? 'wrap' : ''
63
60
  const reverseClass = reverse === true ? 'reverse' : ''
64
61
  const alignSelfClass = alignSelf !== 'none' ? `align_self_${alignSelf}` : ''
@@ -1,4 +1,4 @@
1
- <%= pb_rails("title", props: {size: 4, text: "Gap"}) %>
1
+ <%= pb_rails("title", props: {size: 4, text: "Row"}) %>
2
2
  <br/>
3
3
  <div class="flex-doc-example">
4
4
  <%= pb_rails("flex", props:{ gap: "xxs", wrap:true}) do %>
@@ -31,14 +31,3 @@
31
31
  <%= pb_rails("flex/flex_item") do %>4<% end %>
32
32
  <% end %>
33
33
  </div>
34
-
35
- <br/><br/>
36
- <%= pb_rails("title", props: {size: 4, text: "Responsive"}) %>
37
- <br/>
38
- <div class="flex-doc-example">
39
- <%= pb_rails("flex", props: { gap: { xs: "none", sm: "sm", md: "md", lg: "lg", xl: "xl" }, wrap: true }) do %>
40
- <% 40.times do |i| %>
41
- <%= pb_rails("flex/flex_item") do %> <%=i%> <% end %>
42
- <% end %>
43
- <% end %>
44
- </div>
@@ -1,7 +1,6 @@
1
1
  import React from 'react'
2
2
  import Flex from '../../pb_flex/_flex'
3
3
  import FlexItem from '../../pb_flex/_flex_item'
4
- import Title from '../../pb_title/_title'
5
4
 
6
5
  const FlexGap = (props) => {
7
6
  const count = () => {
@@ -14,8 +13,6 @@ const FlexGap = (props) => {
14
13
 
15
14
  return (
16
15
  <>
17
- <Title size={4}>Gap</Title>
18
- <br />
19
16
  <div className="flex-doc-example">
20
17
  <Flex
21
18
  gap="xxs"
@@ -30,10 +27,8 @@ const FlexGap = (props) => {
30
27
  </Flex>
31
28
  </div>
32
29
 
33
- <br /><br />
34
-
35
- <Title size={4}>Column Gap</Title>
36
30
  <br />
31
+
37
32
  <div className="flex-doc-example">
38
33
  <Flex
39
34
  columnGap="lg"
@@ -53,9 +48,6 @@ const FlexGap = (props) => {
53
48
  </FlexItem>
54
49
  </Flex>
55
50
  </div>
56
- <br /><br />
57
-
58
- <Title size={4}>Row Gap</Title>
59
51
  <br />
60
52
  <div className="flex-doc-example">
61
53
  <Flex
@@ -77,23 +69,6 @@ const FlexGap = (props) => {
77
69
  </FlexItem>
78
70
  </Flex>
79
71
  </div>
80
-
81
- <br /><br />
82
- <Title size={4}>Responsive</Title>
83
- <br />
84
- <div className="flex-doc-example">
85
- <Flex
86
- gap={{ xs: "none", sm: "sm", md: "md", lg: "lg", xl: "xl" }}
87
- wrap
88
- {...props}
89
- >
90
- {count().map((v, key) => (
91
- <FlexItem key={key}>
92
- {v}
93
- </FlexItem>
94
- ))}
95
- </Flex>
96
- </div>
97
72
  </>
98
73
  )
99
74
  }
@@ -0,0 +1,9 @@
1
+ ##### Prop
2
+
3
+ * `gap` | `row_gap` | `rowGap` | `column_gap` | `columnGap` | **Type**: String | **Values**: xxs | xs | sm | md | lg | xl | none
4
+
5
+ - Setting the gap prop sets the row_gap || rowGap and the column_gap || columnGap props to the same size and creates equal space within a flex container.
6
+
7
+ - Setting the row_gap || rowGap prop creates space between rows in a flex container.
8
+
9
+ - Setting the column_gap || columnGap prop creates space between columns in a flex container.
@@ -24,11 +24,17 @@ module Playbook
24
24
  default: "none",
25
25
  deprecated: true
26
26
 
27
- prop :gap
27
+ prop :gap, type: Playbook::Props::Enum,
28
+ values: %w[xxs xs sm md lg xl none],
29
+ default: "none"
28
30
 
29
- prop :row_gap
31
+ prop :row_gap, type: Playbook::Props::Enum,
32
+ values: %w[xxs xs sm md lg xl none],
33
+ default: "none"
30
34
 
31
- prop :column_gap
35
+ prop :column_gap, type: Playbook::Props::Enum,
36
+ values: %w[xxs xs sm md lg xl none],
37
+ default: "none"
32
38
 
33
39
  prop :reverse, type: Playbook::Props::Boolean,
34
40
  default: false
@@ -127,7 +133,7 @@ module Playbook
127
133
  end
128
134
 
129
135
  def gap_class
130
- if gap == "none" || gap.nil? || gap.is_a?(Hash)
136
+ if gap == "none"
131
137
  nil
132
138
  else
133
139
  "gap_#{gap}"
@@ -135,7 +141,7 @@ module Playbook
135
141
  end
136
142
 
137
143
  def row_gap_class
138
- if row_gap == "none" || row_gap.nil? || row_gap.is_a?(Hash)
144
+ if row_gap == "none"
139
145
  nil
140
146
  else
141
147
  "rowGap_#{row_gap}"
@@ -143,7 +149,7 @@ module Playbook
143
149
  end
144
150
 
145
151
  def column_gap_class
146
- if column_gap == "none" || column_gap.nil? || column_gap.is_a?(Hash)
152
+ if column_gap == "none"
147
153
  nil
148
154
  else
149
155
  "columnGap_#{column_gap}"
@@ -242,8 +242,4 @@ svg {
242
242
  animation: fa-spin 1s infinite linear;
243
243
  }
244
244
  }
245
-
246
- &.dark {
247
- color: white;
248
- }
249
245
  }
@@ -77,7 +77,6 @@ module Playbook
77
77
  name: mask.present? ? "" : name,
78
78
  pattern: validation_pattern || mask_pattern,
79
79
  placeholder: placeholder,
80
- style: "cursor: #{cursor_style}",
81
80
  required: required,
82
81
  type: type,
83
82
  value: value,
@@ -85,20 +84,6 @@ module Playbook
85
84
  }.merge(input_options)
86
85
  end
87
86
 
88
- def cursor_style
89
- # If input is disabled, always use 'not-allowed'
90
- return "not-allowed" if disabled
91
-
92
- # If cursor prop is provided, convert it to kebab-case
93
- if cursor.present?
94
- # Convert camelCase (ex. notAllowed) to kebab-case (ex. not-allowed)
95
- cursor.to_s.gsub(/([a-z\d])([A-Z])/, '\1-\2').downcase
96
- else
97
- # Default to 'pointer'
98
- "pointer"
99
- end
100
- end
101
-
102
87
  def validation_message
103
88
  validation[:message] || ""
104
89
  end
@@ -1,17 +1,29 @@
1
1
  @import "spacing";
2
2
 
3
- $gap_values: (
4
- none: 0,
5
- xxs: $space_xxs,
6
- xs: $space_xs,
7
- sm: $space_sm,
8
- md: $space_md,
9
- lg: $space_lg,
10
- xl: $space_xl,
11
- );
3
+ .gap_none {
4
+ gap: 0;
5
+ }
12
6
 
13
- @include global_props_responsive_css($gap_values, 'gap', 'gap');
7
+ .gap_xxs {
8
+ gap: $space_xxs;
9
+ }
14
10
 
15
- @include global_props_responsive_css($gap_values, 'column_gap', 'column-gap');
11
+ .gap_xs {
12
+ gap: $space_xs;
13
+ }
16
14
 
17
- @include global_props_responsive_css($gap_values, 'row_gap', 'row-gap');
15
+ .gap_sm {
16
+ gap: $space_sm;
17
+ }
18
+
19
+ .gap_md {
20
+ gap: $space_md;
21
+ }
22
+
23
+ .gap_lg {
24
+ gap: $space_lg;
25
+ }
26
+
27
+ .gap_xl {
28
+ gap: $space_xl;
29
+ }
@@ -27,8 +27,6 @@ export default [
27
27
  "overflow",
28
28
  "order",
29
29
  "numberSpacing",
30
- "rowGap",
31
- "columnGap",
32
30
  "gap",
33
31
  "maxWidth",
34
32
  "minWidth",
@@ -112,14 +112,6 @@ type Gap = {
112
112
  gap?: string,
113
113
  }
114
114
 
115
- type ColumnGap = {
116
- columnGap?: string,
117
- }
118
-
119
- type RowGap = {
120
- rowGap?: string,
121
- }
122
-
123
115
  type NumberSpacing = {
124
116
  numberSpacing?: "tabular",
125
117
  }
@@ -208,7 +200,7 @@ type MinHeight = {
208
200
  export type GlobalProps = AlignContent & AlignItems & AlignSelf &
209
201
  BorderRadius & Cursor & Dark & Display & DisplaySizes & Flex & FlexDirection &
210
202
  FlexGrow & FlexShrink & FlexWrap & JustifyContent & JustifySelf &
211
- LineHeight & Margin & Width & MinWidth & MaxWidth & Gap & ColumnGap & RowGap & NumberSpacing & Order & Overflow & Padding &
203
+ LineHeight & Margin & Width & MinWidth & MaxWidth & Gap & NumberSpacing & Order & Overflow & Padding &
212
204
  Position & Shadow & TextAlign & Truncate & VerticalAlign & ZIndex & { hover?: string } & Top & Right & Bottom & Left & Height & MaxHeight & MinHeight;
213
205
 
214
206
  const getResponsivePropClasses = (prop: {[key: string]: string}, classPrefix: string) => {
@@ -385,25 +377,9 @@ const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} =
385
377
  return css.trimEnd()
386
378
  },
387
379
  gapProps: ({ gap }: Gap) => {
388
- if (typeof gap === 'object') {
389
- return getResponsivePropClasses(gap, 'gap')
390
- } else {
391
- return gap ? `gap_${gap}` : ''
392
- }
393
- },
394
- columnGapProps: ({ columnGap }: ColumnGap) => {
395
- if (typeof columnGap === 'object') {
396
- return getResponsivePropClasses(columnGap, 'column_gap')
397
- } else {
398
- return columnGap ? `column_gap_${columnGap}` : ''
399
- }
400
- },
401
- rowGapProps: ({ rowGap }: RowGap) => {
402
- if (typeof rowGap === 'object') {
403
- return getResponsivePropClasses(rowGap, 'row_gap')
404
- } else {
405
- return rowGap ? `row_gap_${rowGap}` : ''
406
- }
380
+ let css = ''
381
+ css += gap ? `gap_${gap} ` : ''
382
+ return css.trimEnd()
407
383
  },
408
384
  minHeightProps: ({ minHeight }: MinHeight) => {
409
385
  const heightValues = ["auto", "xs", "sm", "md", "lg", "xl", "xxl", "xxxl"]