playbook_ui 5.2.0 → 5.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb8840e61c52b773111c22632a90f9543ff610609017855691c9cd4e1999315e
4
- data.tar.gz: 4abd95023a74be43d334f19bcd57160edbd76f51a3be26733e0e22463413109c
3
+ metadata.gz: bd87d19dffeb68dba4372b1282cf12fcb1cace3acda84f7119a902fc205e7e1f
4
+ data.tar.gz: e5f41cf298f15483eb5299b27837c83cac6e74e265b446fe6ff819742ff18b48
5
5
  SHA512:
6
- metadata.gz: d2c02a383c9fa07b0892c1ead36815a66cfcf699d5deecee13d109e664affc7e173ddda17b6301f1160cc1cc59c8a01854129f30d14dd12edc16d0c60f032861
7
- data.tar.gz: ce596c4e96e0665b56f4c9a4622ca004600c3c613c87329ed0321ebf315fd16fffd1b6220b74bff7fdb23df9f129e4cf65602af1e7880cf70c06080c678cbd61
6
+ metadata.gz: e7a8e97e476695635a7ca42bbbd831a20b9ff5e48665a7246b723ef2eacdd418864ba2dcec08b602e7fa35362fccf15685e56d91371442a3149ae2eef6d30615
7
+ data.tar.gz: 6d58ee0d87a24bdf4912e774c4f0ea33480be6007ba5ffd8cd6f2145bd4b27bbbf233a5288f691a3635f445944eccd0f4196c098cfd6e24e7396ed0580999ecc
@@ -2,6 +2,7 @@
2
2
  @import "flex_examples";
3
3
  @import "code_snippet";
4
4
  @import "kit_doc";
5
+ @import "bg_light_doc_example";
5
6
 
6
7
  @import "color_utilities";
7
8
  @import "spacing_tokens";
@@ -0,0 +1,7 @@
1
+ @import "../../../tokens/colors";
2
+ @import "../../../tokens/spacing";
3
+
4
+ .bg-light-doc-example {
5
+ background: $bg_light;
6
+ padding: $space_lg;
7
+ }
@@ -1,4 +1,5 @@
1
1
  <%= content_tag(:div,
2
+ aria: object.aria,
2
3
  id: object.id,
3
4
  data: object.data,
4
5
  class: object.classname) do %>
@@ -2,26 +2,37 @@
2
2
 
3
3
  import React from 'react'
4
4
  import classnames from 'classnames'
5
- import { buildCss } from '../utilities/props'
6
5
  import { spacing } from '../utilities/spacing.js'
7
6
 
7
+ import {
8
+ buildAriaProps,
9
+ buildCss,
10
+ buildDataProps,
11
+ } from '../utilities/props'
12
+
8
13
  type BadgeProps = {
14
+ aria?: object,
9
15
  className?: String,
10
16
  dark?: Boolean,
17
+ data?: object,
11
18
  id?: String,
12
- text?: String,
13
- variant?: "success" | "warning" | "error" | "info" | "neutral",
14
19
  rounded?: Boolean,
20
+ text?: String,
21
+ variant?: "error" | "info" | "neutral" | "primary" | "success" | "warning",
15
22
  }
16
23
  const Badge = (props: BadgeProps) => {
17
24
  const {
25
+ aria = {},
18
26
  className,
19
27
  dark = false,
28
+ data = {},
20
29
  id,
30
+ rounded = false,
21
31
  text,
22
32
  variant = 'neutral',
23
- rounded = false,
24
33
  } = props
34
+ const ariaProps = buildAriaProps(aria)
35
+ const dataProps = buildDataProps(data)
25
36
  const css = classnames(
26
37
  className,
27
38
  buildCss('pb_badge_kit', variant, {
@@ -33,6 +44,8 @@ const Badge = (props: BadgeProps) => {
33
44
 
34
45
  return (
35
46
  <div
47
+ {...ariaProps}
48
+ {...dataProps}
36
49
  className={css}
37
50
  id={id}
38
51
  >
@@ -16,6 +16,7 @@ type CardPropTypes = {
16
16
  selected?: Boolean,
17
17
  shadow?: "none" | "deep" | "deeper" | "deepest",
18
18
  dark?: Boolean,
19
+ borderNone?: Boolean,
19
20
  }
20
21
 
21
22
  type CardHeaderProps = {
@@ -62,9 +63,11 @@ const Card = (props: CardPropTypes) => {
62
63
  highlight = {},
63
64
  selected = false,
64
65
  shadow = 'none',
66
+ borderNone = false,
65
67
  } = props
66
68
  const bodyCSS = buildCss('pb_card_body_kit')
67
- const cardCss = buildCss('pb_card_kit', `shadow_${shadow}`, {
69
+ const borderCSS = borderNone == true ? 'border_none' : ''
70
+ const cardCss = buildCss('pb_card_kit', `shadow_${shadow}`, `${borderCSS}`, {
68
71
  dark: dark,
69
72
  selected,
70
73
  deselected: !selected,
@@ -16,6 +16,10 @@
16
16
  }
17
17
  }
18
18
 
19
+ &[class*=_border_none] {
20
+ border-width: 0px;
21
+ }
22
+
19
23
  [class^=pb_card_header_kit] {
20
24
  flex-grow: 0;
21
25
  flex-shrink: 0;
@@ -15,6 +15,8 @@ module Playbook
15
15
  default: {}
16
16
  prop :dark, type: Playbook::Props::Boolean,
17
17
  default: false
18
+ prop :border_none, type: Playbook::Props::Boolean,
19
+ default: false
18
20
 
19
21
  def classname
20
22
  generate_classname("pb_card_kit",
@@ -22,7 +24,8 @@ module Playbook
22
24
  shadow_class,
23
25
  highlight_position_class,
24
26
  highlight_color_class,
25
- dark_class)
27
+ dark_class,
28
+ border_class)
26
29
  end
27
30
 
28
31
  def body_padding
@@ -55,6 +58,10 @@ module Playbook
55
58
  def dark_class
56
59
  dark ? "dark" : nil
57
60
  end
61
+
62
+ def border_class
63
+ border_none == true ? "border_none" : nil
64
+ end
58
65
  end
59
66
  end
60
67
  end
@@ -0,0 +1,7 @@
1
+ <div class="bg-light-doc-example">
2
+
3
+ <%= pb_rails("card", props: { border_none: true }) do %>
4
+ Card content
5
+ <% end %>
6
+
7
+ </div>
@@ -0,0 +1,14 @@
1
+ import React from 'react'
2
+ import Card from '../_card.jsx'
3
+
4
+ const CardBorderNone = () => {
5
+ return (
6
+ <div className="bg-light-doc-example">
7
+
8
+ <Card borderNone>{'Card content'}</Card>
9
+
10
+ </div>
11
+ )
12
+ }
13
+
14
+ export default CardBorderNone
@@ -0,0 +1 @@
1
+ Remove card border <b>only</b> for dashboard cards.
@@ -9,6 +9,7 @@ examples:
9
9
  - card_shadow: Shadow Size
10
10
  - card_content: Content Size
11
11
  - card_separator: Separator Card
12
+ - card_border_none: No Border
12
13
  react:
13
14
  - card_light: Default
14
15
  - card_dark: Dark Cards
@@ -19,3 +20,4 @@ examples:
19
20
  - card_shadow: Shadow Size
20
21
  - card_content: Content Size
21
22
  - card_separator: Separator Card
23
+ - card_border_none: No Border
@@ -7,3 +7,4 @@ export { default as CardShadow } from './_card_shadow.jsx'
7
7
  export { default as CardContent } from './_card_content.jsx'
8
8
  export { default as CardSeparator } from './_card_separator.jsx'
9
9
  export { default as CardDark } from './_card_dark.jsx'
10
+ export { default as CardBorderNone } from './_card_border_none.jsx'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- VERSION = "5.2.0"
4
+ VERSION = "5.3.0"
5
5
  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: 5.2.0
4
+ version: 5.3.0
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: 2020-07-02 00:00:00.000000000 Z
12
+ date: 2020-07-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -411,6 +411,7 @@ files:
411
411
  - app/pb_kits/playbook/packs/site_styles/_scaffold.scss
412
412
  - app/pb_kits/playbook/packs/site_styles/_site-style.scss
413
413
  - app/pb_kits/playbook/packs/site_styles/docs/_all.scss
414
+ - app/pb_kits/playbook/packs/site_styles/docs/_bg_light_doc_example.scss
414
415
  - app/pb_kits/playbook/packs/site_styles/docs/_code_snippet.scss
415
416
  - app/pb_kits/playbook/packs/site_styles/docs/_color_utilities.scss
416
417
  - app/pb_kits/playbook/packs/site_styles/docs/_flex_examples.scss
@@ -543,6 +544,9 @@ files:
543
544
  - app/pb_kits/playbook/pb_card/card_header.rb
544
545
  - app/pb_kits/playbook/pb_card/child_kits/_card_body.html.erb
545
546
  - app/pb_kits/playbook/pb_card/child_kits/_card_header.html.erb
547
+ - app/pb_kits/playbook/pb_card/docs/_card_border_none.html.erb
548
+ - app/pb_kits/playbook/pb_card/docs/_card_border_none.jsx
549
+ - app/pb_kits/playbook/pb_card/docs/_card_border_none.md
546
550
  - app/pb_kits/playbook/pb_card/docs/_card_content.html.erb
547
551
  - app/pb_kits/playbook/pb_card/docs/_card_content.jsx
548
552
  - app/pb_kits/playbook/pb_card/docs/_card_dark.html.erb
@@ -1813,7 +1817,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1813
1817
  - !ruby/object:Gem::Version
1814
1818
  version: '0'
1815
1819
  requirements: []
1816
- rubygems_version: 3.1.2
1820
+ rubyforge_project:
1821
+ rubygems_version: 2.7.3
1817
1822
  signing_key:
1818
1823
  specification_version: 4
1819
1824
  summary: Playbook Design System