playbook_ui 11.20.0.pre.alpha.focus1 → 11.20.0.pre.alpha.passthrough1

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: dd5b6e17a1e5ff8a0149e8d809b67ebd4c1bd6ade257db72ed9fe4716c7f0488
4
- data.tar.gz: 4f6b2edf940d88f2113516a34e7288c18e68bde88cb367a49e3407c8e5d506a9
3
+ metadata.gz: c0a373f8f9816ad4f827295f7861d7eb09a895860d1f9214e15cce8b250719e4
4
+ data.tar.gz: 66d3fe725f2b20d4f848707cc08be5e5efb1753efe4ff2f6fe3da5778af6adf3
5
5
  SHA512:
6
- metadata.gz: 7400acc711d9fa10b999850ed8c02282b3e6f9dcee98745dec7df79bdb7e57842d3751cae96b9d248ac08bf807daa035af6b429b3ea93c4d7157f6bf0e156392
7
- data.tar.gz: f54bc46b74b4f15ad295303b73413b8f2e7e17adc078420b2b21970f470770ee2dcdc9203d58fec00fb28e826f8e7f0a4065c28f8e798efd60d3d582250e7e7e
6
+ metadata.gz: da9d63bdd58257e7ec57560934076227af38918805cf0b81a2faa2084595ba6d55edc4dfc363601fa877bf9d7d28ef0762a6b32b1519bb77def36bdae5044378
7
+ data.tar.gz: 9a868a827e05f6b702172a1f3c0e7299bbd92da128ef7e122832cace0468f1fd673b81f7fc11f77728c4459f4baef420f078101b749e953a8011c3c10c3e868c
@@ -56,6 +56,7 @@
56
56
  @import 'pb_multiple_users_stacked/multiple_users_stacked';
57
57
  @import 'pb_nav/nav';
58
58
  @import 'pb_online_status/online_status';
59
+ @import 'pb_paginate/paginate';
59
60
  @import 'pb_passphrase/passphrase';
60
61
  @import 'pb_person/person';
61
62
  @import 'pb_person_contact/person_contact';
@@ -104,3 +104,4 @@ kits:
104
104
  - title_detail
105
105
  - user_badge
106
106
  - walkthrough
107
+ - paginate
@@ -29,6 +29,11 @@ $pb_button_sizes: (
29
29
  }
30
30
  &[class*=_link] {
31
31
  @include pb_button_link;
32
+ @media (hover:hover) {
33
+ &:hover {
34
+ color: $text_lt_default;
35
+ }
36
+ }
32
37
  }
33
38
 
34
39
  // Disabled =================
@@ -5,7 +5,6 @@
5
5
  @import "../tokens/spacing";
6
6
  @import "../tokens/transition";
7
7
  @import "../tokens/typography";
8
- @import "../tokens/accessibility";
9
8
 
10
9
  $pb_button_size: 40px;
11
10
  $pb_button_v_padding: 7px;
@@ -63,12 +62,11 @@ $pb_button_border_width: 0px;
63
62
  margin-left: $space_xs;
64
63
  }
65
64
 
66
- &:hover {
65
+ &:hover, &:focus {
67
66
  outline: none;
67
+
68
68
  }
69
69
 
70
- @include focus;
71
-
72
70
  &:active {
73
71
  outline: none;
74
72
  border-width: $pb_button_border_width;
@@ -88,10 +86,6 @@ $pb_button_border_width: 0px;
88
86
  &:hover {
89
87
  @include pb_button_hover;
90
88
  }
91
- &:active {
92
- transition: none;
93
- @include pb_button_variant($primary_action);
94
- }
95
89
  }
96
90
  }
97
91
 
@@ -103,10 +97,6 @@ $pb_button_border_width: 0px;
103
97
  &:hover {
104
98
  @include pb_button_hover(rgba($primary_action, $opacity_3));
105
99
  }
106
- &:active {
107
- transition: none;
108
- @include pb_button_variant(rgba($primary_action, 0.05), $primary_action);
109
- }
110
100
  }
111
101
  }
112
102
 
@@ -117,11 +107,6 @@ $pb_button_border_width: 0px;
117
107
  @media (hover:hover) {
118
108
  &:hover {
119
109
  @include pb_button_hover($transparent);
120
- color: $text_lt_default;
121
- }
122
- &:active {
123
- transition: none;
124
- @include pb_button_variant($transparent, $primary_action);
125
110
  }
126
111
  }
127
112
  }
@@ -131,9 +116,6 @@ $pb_button_border_width: 0px;
131
116
  $disabled_color: rgba($charcoal, $opacity_5);
132
117
  @include pb_button_variant(rgba($slate, $opacity_4), $disabled_color);
133
118
  pointer-events: none;
134
- &:focus {
135
- outline: none;
136
- }
137
119
  }
138
120
 
139
121
  // Block =======================
@@ -163,10 +145,6 @@ $pb_button_border_width: 0px;
163
145
  &:hover {
164
146
  @include pb_button_hover($bg: darken($primary_action, $pb_button_hover_darken));
165
147
  }
166
- &:active {
167
- transition: none;
168
- @include pb_button_variant($primary_action);
169
- }
170
148
  }
171
149
  }
172
150
 
@@ -178,10 +156,6 @@ $pb_button_border_width: 0px;
178
156
  &:hover {
179
157
  @include pb_button_hover(rgba($primary_action, $opacity_2));
180
158
  }
181
- &:active {
182
- transition: none;
183
- @include pb_button_variant(rgba($white, 0.2), $white);
184
- }
185
159
  }
186
160
  }
187
161
 
@@ -192,11 +166,6 @@ $pb_button_border_width: 0px;
192
166
  @media (hover:hover) {
193
167
  &:hover {
194
168
  @include pb_button_hover($transparent);
195
- color: rgba($white, $opacity_6)
196
- }
197
- &:active {
198
- transition: none;
199
- @include pb_button_variant($transparent, $white);
200
169
  }
201
170
  }
202
171
  }
@@ -1,2 +1,2 @@
1
- <%= pb_rails("button", props: { icon: "plus", text: "Icon on Left", margin_right: "lg" }) %>
2
- <%= pb_rails("button", props: { icon: "chevron-right", icon_right: true, text: "Icon on Right", margin_right: "lg" }) %>
1
+ <%= pb_rails("button", props: { icon: "plus", text: "Icon on Left" }) %>
2
+ <%= pb_rails("button", props: { icon: "chevron-right", icon_right: true, text: "Icon on Right" }) %>
@@ -6,7 +6,6 @@ const ButtonIconOptions = (props) => (
6
6
  <Button
7
7
  fixedWidth
8
8
  icon='plus'
9
- marginRight='lg'
10
9
  text="Icon on Left"
11
10
  {...props}
12
11
  />
@@ -15,7 +14,6 @@ const ButtonIconOptions = (props) => (
15
14
  fixedWidth
16
15
  icon='chevron-right'
17
16
  iconRight
18
- marginRight='lg'
19
17
  text="Icon on Right"
20
18
  {...props}
21
19
  />
@@ -1,3 +1,3 @@
1
- <%= pb_rails("button", props: { text: "A Tag Button", aria: { label: "Link to Google" }, tag: "a", link: "http://google.com", margin_right: "lg" }) %>
2
- <%= pb_rails("button", props: { text: "Open in new Window", aria: { label: "Link to Google in new window" }, new_window: true, link: "http://google.com",margin_right: "lg" }) %>
3
- <%= pb_rails("button", props: { text: "A Tag Button Disabled", aria: { label: "Disabled link to Google" }, disabled: true, link: "http://google.com",margin_right: "lg" }) %>
1
+ <%= pb_rails("button", props: { text: "A Tag Button", aria: { label: "Link to Google" }, tag: "a", link: "http://google.com" }) %>
2
+ <%= pb_rails("button", props: { text: "Open in new Window", aria: { label: "Link to Google in new window" }, new_window: true, link: "http://google.com" }) %>
3
+ <%= pb_rails("button", props: { text: "A Tag Button Disabled", aria: { label: "Disabled link to Google" }, disabled: true, link: "http://google.com" }) %>
@@ -6,7 +6,6 @@ const ButtonLink = (props) => (
6
6
  <Button
7
7
  aria={{ label: 'Link to Google' }}
8
8
  link="https://google.com"
9
- marginRight='lg'
10
9
  text="A Tag Button"
11
10
  {...props}
12
11
  />
@@ -14,7 +13,6 @@ const ButtonLink = (props) => (
14
13
  <Button
15
14
  aria={{ label: 'Link to Google in new window' }}
16
15
  link="https://google.com"
17
- marginRight='lg'
18
16
  newWindow
19
17
  text="Open in New Window"
20
18
  {...props}
@@ -24,7 +22,6 @@ const ButtonLink = (props) => (
24
22
  aria={{ label: 'Disabled link to Google' }}
25
23
  disabled
26
24
  link="https://google.com"
27
- marginRight='lg'
28
25
  text="A Tag Button Disabled"
29
26
  {...props}
30
27
  />
@@ -1,3 +1,3 @@
1
- <%= pb_rails("button", props: { aria: { label: "Loading" }, text: "Button Primary", loading: true, margin_right: "lg" }) %>
2
- <%= pb_rails("button", props: { aria: { label: "Loading" }, text: "Button Primary", variant: "secondary", loading: true, margin_right: "lg" }) %>
3
- <%= pb_rails("button", props: { aria: { label: "Loading" }, text: "Button Primary", variant: "link", loading: true, margin_right: "lg" }) %>
1
+ <%= pb_rails("button", props: { aria: { label: "Loading" }, text: "Button Primary", loading: true }) %>
2
+ <%= pb_rails("button", props: { aria: { label: "Loading" }, text: "Button Primary", variant: "secondary", loading: true }) %>
3
+ <%= pb_rails("button", props: { aria: { label: "Loading" }, text: "Button Primary", variant: "link", loading: true }) %>
@@ -6,7 +6,6 @@ const ButtonLoading = (props) => (
6
6
  <Button
7
7
  aria={{ label: 'Loading' }}
8
8
  loading
9
- marginRight='lg'
10
9
  text="Button Primary"
11
10
  {...props}
12
11
  />
@@ -14,7 +13,6 @@ const ButtonLoading = (props) => (
14
13
  <Button
15
14
  aria={{ label: 'Loading' }}
16
15
  loading
17
- marginRight='lg'
18
16
  text="Button Secondary"
19
17
  variant="secondary"
20
18
  {...props}
@@ -23,7 +21,6 @@ const ButtonLoading = (props) => (
23
21
  <Button
24
22
  aria={{ label: 'Loading' }}
25
23
  loading
26
- marginRight='lg'
27
24
  text="A Tag Button Disabled"
28
25
  variant="link"
29
26
  {...props}
@@ -1,3 +1,3 @@
1
- <%= pb_rails("button", props: { text: "Button sm size", size: "sm", margin_right: "lg" }) %>
2
- <%= pb_rails("button", props: { text: "Button md size", size: "md", margin_right: "lg" }) %>
3
- <%= pb_rails("button", props: { text: "Button lg size", size: "lg", margin_right: "lg" }) %>
1
+ <%= pb_rails("button", props: { text: "Button sm size", size: "sm" }) %>
2
+ <%= pb_rails("button", props: { text: "Button md size", size: "md" }) %>
3
+ <%= pb_rails("button", props: { text: "Button lg size", size: "lg" }) %>
@@ -4,21 +4,18 @@ import { Button } from '../../'
4
4
  const ButtonSize = (props) => (
5
5
  <div>
6
6
  <Button
7
- marginRight='lg'
8
7
  size="sm"
9
8
  text="Button sm size"
10
9
  {...props}
11
10
  />
12
11
  {' '}
13
12
  <Button
14
- marginRight='lg'
15
13
  size="md"
16
14
  text="Button md size"
17
15
  {...props}
18
16
  />
19
17
  {' '}
20
18
  <Button
21
- marginRight='lg'
22
19
  size="lg"
23
20
  text="Button lg size"
24
21
  {...props}
@@ -0,0 +1,69 @@
1
+ @import "../tokens/colors";
2
+ @import "../tokens/typography";
3
+ @import "../tokens/border_radius";
4
+ @import "../tokens/shadows";
5
+
6
+ .pb_pagination {
7
+ display: inline-block;
8
+ border-radius: $border_rad_light;
9
+ border: 1px solid $border_light;
10
+ background-color: $white;
11
+ padding: 3px 0px 3.6px 0px;
12
+ margin: 10px 0;
13
+ li {
14
+ display: inline;
15
+ > a, li > span {
16
+ padding: 7px 13px;
17
+ text-decoration: none;
18
+ margin-left: -1px;
19
+ border: 0 !important;
20
+ }}
21
+ li:first-child > a, li:first-child > span {
22
+ padding: 7px 13px;
23
+ margin-left: .5px;
24
+ border-right: 1px solid $border_light !important;
25
+ z-index: 2;
26
+ }
27
+ li:last-child > a, li:last-child > span {
28
+ padding: 7px 13px;
29
+ margin-right: .5px;
30
+ border-left: 1px solid $border_light !important;
31
+ z-index: 2;
32
+ }
33
+ a {
34
+ color: $text_lt_default !important;
35
+ font-size: $text_small;
36
+ font-weight: $regular;
37
+ border: none;
38
+
39
+ &:hover {
40
+ background-color: $active_light;
41
+ color: $primary !important;
42
+ border-radius: $border_rad_light;
43
+ }
44
+
45
+ &:focus {
46
+ outline: 1px solid $primary !important;
47
+ border-radius: $border_rad_light;
48
+ outline-offset: -1px;
49
+ }
50
+ }
51
+ .active > span {
52
+ background-color: $primary !important;
53
+ border-radius: $border_rad_light;
54
+ color: #fff;
55
+ padding: 7px 13px;
56
+ border: 0 !important;
57
+ text-decoration: none;
58
+ font-weight: $bold;
59
+ font-size: $text_small;
60
+
61
+ &:hover {
62
+ box-shadow: $shadow_deeper;
63
+ }
64
+ }
65
+ .disabled > span {
66
+ padding: 7px 10px;
67
+ font-size: $text_small;
68
+ }
69
+ }
@@ -0,0 +1,19 @@
1
+ <%= pb_rails("title", props: { size: 4, text: "Default will_paginate"}) %>
2
+ <%= will_paginate @users %>
3
+ <%= pb_rails("body") do %>
4
+ You need to add: <code> require 'will_paginate'</code> in your app to use.
5
+ <% end %>
6
+ <br><br>
7
+
8
+ <%= pb_rails("title", props: { size: 4, text: "Playbook Renderer"}) %>
9
+ <%= will_paginate @users, renderer: Playbook::Pagination::Rails %>
10
+ <%= pb_rails("body") do %>
11
+ You need to also add: <code>require "playbook/pagination_renderer"</code> in your app to use.
12
+ <% end %>
13
+ <br><br>
14
+
15
+ <%= pb_rails("title", props: { size: 4, text: "Playbook Kit (Passthrough)"}) %>
16
+ <%= pb_rails("paginate", props: { strategy: "will_paginate", model: @users, view: self }) %>
17
+ <%= pb_rails("body") do %>
18
+ Same...You need to also add: <code>require "playbook/pagination_renderer"</code> in your app to use.
19
+ <% end %>
@@ -0,0 +1,6 @@
1
+ examples:
2
+
3
+ rails:
4
+ - paginate_default: Default
5
+
6
+
@@ -0,0 +1,5 @@
1
+ <%= will_paginate object.model, renderer: Playbook::Pagination::Rails %>
2
+
3
+ <%# Couldn't get this working %>
4
+ <%# Need a Rails Dev to look %>
5
+ <%# <%= eval(object.strategy) object.model, renderer: Playbook::Pagination::Rails %>
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Playbook
4
+ module PbPaginate
5
+ class Paginate < ::Playbook::KitBase
6
+ prop :strategy # Need to add protection
7
+ prop :model # Need to add protection
8
+ prop :view # Need to add protection
9
+
10
+ def classname
11
+ generate_classname("pb_paginate")
12
+ end
13
+
14
+ def url_for(options = nil)
15
+ view.url_for(options)
16
+ end
17
+ end
18
+ end
19
+ end
@@ -94,13 +94,11 @@ $hover_colors: (
94
94
  );
95
95
 
96
96
  /* Focus colors -----------------------*/
97
- $focus_color: $primary;
98
97
  $focus_input_light: rgba($active_light, $opacity_5);
99
98
  $focus_input_dark: rgba(#144075, $opacity_5);
100
99
  $focus_input_colors: (
101
100
  focus_input_light: $focus_input_light,
102
- focus_input_dark: $focus_input_dark,
103
- focus_color: $focus_color
101
+ focus_input_dark: $focus_input_dark
104
102
  );
105
103
 
106
104
  /* Border colors ----------------------*/
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "will_paginate/view_helpers/action_view"
4
+
5
+ module Playbook
6
+ module Pagination
7
+ class Rails < WillPaginate::ActionView::LinkRenderer
8
+ def container_attributes
9
+ { class: "pb_pagination" }
10
+ end
11
+
12
+ def page_number(page)
13
+ if page == current_page
14
+ tag("li", tag("span", page), class: "active")
15
+ else
16
+ tag("li", link(page, page, rel: rel_value(page)))
17
+ end
18
+ end
19
+
20
+ def previous_or_next_page(page, text, classname)
21
+ if page
22
+ tag("li", link(text, page), class: classname)
23
+ else
24
+ tag("li", tag("span", text), class: "%s disabled")
25
+ end
26
+ end
27
+
28
+ def gap; end
29
+
30
+ def previous_page
31
+ num = @collection.current_page > 1 && @collection.current_page - 1
32
+ previous_or_next_page(num, "<i class='far fa-chevron-left fa-xs'></i>", "prev")
33
+ end
34
+
35
+ def next_page
36
+ num = @collection.current_page < @collection.total_pages && @collection.current_page + 1
37
+ previous_or_next_page(num, "<i class='far fa-chevron-right fa-xs'></i>", "next")
38
+ end
39
+ end
40
+ end
41
+ end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "11.20.0"
5
- VERSION = "11.20.0.pre.alpha.focus1"
5
+ VERSION = "11.20.0.pre.alpha.passthrough1"
6
6
  end
data/lib/playbook.rb CHANGED
@@ -12,6 +12,8 @@ require "playbook/pb_doc_helper"
12
12
  require "playbook/kit_base"
13
13
  require "playbook/kit_resolver"
14
14
  require "playbook/markdown"
15
+ # require "playbook/pagination_renderer"
16
+ # REMOVED TO MAKE THIS AN OPTIONAL INCLUDE FOR CLIENTS
15
17
 
16
18
  module Playbook
17
19
  ROOT_PATH = Pathname.new(File.join(__dir__, ".."))
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: 11.20.0.pre.alpha.focus1
4
+ version: 11.20.0.pre.alpha.passthrough1
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: 2023-01-25 00:00:00.000000000 Z
12
+ date: 2023-01-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -269,6 +269,20 @@ dependencies:
269
269
  - - '='
270
270
  - !ruby/object:Gem::Version
271
271
  version: 1.2018.9
272
+ - !ruby/object:Gem::Dependency
273
+ name: will_paginate
274
+ requirement: !ruby/object:Gem::Requirement
275
+ requirements:
276
+ - - '='
277
+ - !ruby/object:Gem::Version
278
+ version: 3.3.1
279
+ type: :development
280
+ prerelease: false
281
+ version_requirements: !ruby/object:Gem::Requirement
282
+ requirements:
283
+ - - '='
284
+ - !ruby/object:Gem::Version
285
+ version: 3.3.1
272
286
  description: Playbook Design System. Built for Nitro, but powering all.
273
287
  email:
274
288
  - nitroux@powerhrg.com
@@ -1467,6 +1481,11 @@ files:
1467
1481
  - app/pb_kits/playbook/pb_online_status/docs/index.js
1468
1482
  - app/pb_kits/playbook/pb_online_status/online_status.html.erb
1469
1483
  - app/pb_kits/playbook/pb_online_status/online_status.rb
1484
+ - app/pb_kits/playbook/pb_paginate/_paginate.scss
1485
+ - app/pb_kits/playbook/pb_paginate/docs/_paginate_default.html.erb
1486
+ - app/pb_kits/playbook/pb_paginate/docs/example.yml
1487
+ - app/pb_kits/playbook/pb_paginate/paginate.html.erb
1488
+ - app/pb_kits/playbook/pb_paginate/paginate.rb
1470
1489
  - app/pb_kits/playbook/pb_passphrase/_passphrase.jsx
1471
1490
  - app/pb_kits/playbook/pb_passphrase/_passphrase.scss
1472
1491
  - app/pb_kits/playbook/pb_passphrase/docs/_passphrase_breached.html.erb
@@ -2235,7 +2254,6 @@ files:
2235
2254
  - app/pb_kits/playbook/playbook-doc.js
2236
2255
  - app/pb_kits/playbook/playbook-rails-react-bindings.js
2237
2256
  - app/pb_kits/playbook/playbook-rails.js
2238
- - app/pb_kits/playbook/tokens/_accessibility.scss
2239
2257
  - app/pb_kits/playbook/tokens/_animation-curves.scss
2240
2258
  - app/pb_kits/playbook/tokens/_border_radius.scss
2241
2259
  - app/pb_kits/playbook/tokens/_colors.scss
@@ -2333,6 +2351,7 @@ files:
2333
2351
  - lib/playbook/markdown/template_handler.rb
2334
2352
  - lib/playbook/number_spacing.rb
2335
2353
  - lib/playbook/order.rb
2354
+ - lib/playbook/pagination_renderer.rb
2336
2355
  - lib/playbook/pb_doc_helper.rb
2337
2356
  - lib/playbook/pb_forms_helper.rb
2338
2357
  - lib/playbook/pb_kit_helper.rb
@@ -1,6 +0,0 @@
1
- @mixin focus {
2
- &:focus-visible {
3
- outline: $focus_color solid 2px;
4
- outline-offset: 2px;
5
- }
6
- }