playbook_ui 5.1.0 → 5.2.0.pre.alpha6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/playbook/application_controller.rb +0 -2
  3. data/app/pb_kits/playbook/index.js +4 -0
  4. data/app/pb_kits/playbook/pb_filter/templates/_default.html.erb +1 -1
  5. data/app/pb_kits/playbook/pb_person_contact/_person_contact.jsx +7 -6
  6. data/app/pb_kits/playbook/pb_person_contact/docs/_person_contact_with_wrong_numbers.jsx +1 -0
  7. data/app/pb_kits/playbook/pb_popover/_popover.html.erb +2 -2
  8. data/app/pb_kits/playbook/pb_popover/_popover.jsx +3 -3
  9. data/app/pb_kits/playbook/pb_popover/_popover.scss +21 -25
  10. data/app/pb_kits/playbook/pb_popover/index.js +1 -6
  11. data/app/pb_kits/playbook/pb_radio/_radio.scss +0 -4
  12. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.html.erb +1 -1
  13. data/app/pb_kits/playbook/tokens/index.scss +11 -0
  14. data/lib/playbook/engine.rb +1 -0
  15. data/lib/playbook/version.rb +1 -1
  16. data/lib/tasks/pb_release.rake +3 -0
  17. metadata +7 -68
  18. data/app/assets/images/clark.jpg +0 -0
  19. data/app/assets/images/giant.jpg +0 -0
  20. data/app/assets/images/pb-caret.svg +0 -1
  21. data/app/assets/images/pb-check.svg +0 -11
  22. data/app/assets/images/pb.logo.svg +0 -28
  23. data/app/controllers/playbook/guides_controller.rb +0 -11
  24. data/app/controllers/playbook/pages_controller.rb +0 -79
  25. data/app/controllers/playbook/samples_controller.rb +0 -40
  26. data/app/pb_kits/playbook/packs/application.js +0 -55
  27. data/app/pb_kits/playbook/packs/examples.js +0 -174
  28. data/app/pb_kits/playbook/packs/main.scss +0 -12
  29. data/app/pb_kits/playbook/packs/samples.js +0 -19
  30. data/app/pb_kits/playbook/packs/site_styles/_samples.scss +0 -72
  31. data/app/pb_kits/playbook/packs/site_styles/_scaffold.scss +0 -43
  32. data/app/pb_kits/playbook/packs/site_styles/_site-style.scss +0 -135
  33. data/app/pb_kits/playbook/packs/site_styles/docs/_all.scss +0 -9
  34. data/app/pb_kits/playbook/packs/site_styles/docs/_code_snippet.scss +0 -531
  35. data/app/pb_kits/playbook/packs/site_styles/docs/_color_utilities.scss +0 -92
  36. data/app/pb_kits/playbook/packs/site_styles/docs/_flex_examples.scss +0 -15
  37. data/app/pb_kits/playbook/packs/site_styles/docs/_kit_doc.scss +0 -190
  38. data/app/pb_kits/playbook/packs/site_styles/docs/_kits_examples.scss +0 -18
  39. data/app/pb_kits/playbook/packs/site_styles/docs/_markdown.scss +0 -82
  40. data/app/pb_kits/playbook/packs/site_styles/docs/_spacing_tokens.scss +0 -72
  41. data/app/pb_kits/playbook/pb_filter/docs/_description.md +0 -3
  42. data/app/views/layouts/playbook/_mobile_hamburger.html.erb +0 -2
  43. data/app/views/layouts/playbook/_nav.html.erb +0 -13
  44. data/app/views/layouts/playbook/_sidebar.html.erb +0 -52
  45. data/app/views/layouts/playbook/application.html.slim +0 -22
  46. data/app/views/layouts/playbook/fullscreen.html.slim +0 -10
  47. data/app/views/layouts/playbook/grid.html.slim +0 -10
  48. data/app/views/layouts/playbook/samples.html.erb +0 -18
  49. data/app/views/playbook/guides/create_kit.html.slim +0 -16
  50. data/app/views/playbook/guides/create_kit/_file_naming.html.md +0 -2
  51. data/app/views/playbook/guides/create_kit/_generator.html.md +0 -6
  52. data/app/views/playbook/guides/create_kit/_kit_examples.html.md +0 -2
  53. data/app/views/playbook/guides/create_kit/_kit_rails.html.md +0 -2
  54. data/app/views/playbook/guides/create_kit/_kit_react.html.md +0 -2
  55. data/app/views/playbook/guides/create_kit/_layout.html.md +0 -2
  56. data/app/views/playbook/guides/create_kit/_view_objects.html.md +0 -2
  57. data/app/views/playbook/guides/create_kit/_writing_sass.md +0 -10
  58. data/app/views/playbook/guides/use_nitro.html.slim +0 -6
  59. data/app/views/playbook/guides/use_nitro/_local.html.md +0 -2
  60. data/app/views/playbook/guides/use_nitro/_nitro_components.html.md +0 -2
  61. data/app/views/playbook/guides/use_nitro/_versions.html.md +0 -2
  62. data/app/views/playbook/pages/fullscreen.html.slim +0 -10
  63. data/app/views/playbook/pages/grid.html.slim +0 -2
  64. data/app/views/playbook/pages/home.html.slim +0 -4
  65. data/app/views/playbook/pages/kit_category_show.html.erb +0 -14
  66. data/app/views/playbook/pages/kit_show.html.erb +0 -33
  67. data/app/views/playbook/pages/kits.html.erb +0 -12
  68. data/app/views/playbook/pages/principals/_getting_started.html.md +0 -30
  69. data/app/views/playbook/pages/principles.html.slim +0 -3
  70. data/app/views/playbook/pages/tokens.html.slim +0 -15
  71. data/app/views/playbook/pages/tokens/_pb_doc_spacing.html.slim +0 -17
  72. data/app/views/playbook/pages/utilities.html.slim +0 -116
  73. data/app/views/playbook/pages/utilities/_pb_doc_color.html.slim +0 -15
  74. data/app/views/playbook/samples/dashboards/index.html.erb +0 -81
  75. data/app/views/playbook/samples/dashboards/index.jsx +0 -130
  76. data/app/views/playbook/samples/filter_table/index.html.erb +0 -348
  77. data/app/views/playbook/samples/filter_table/index.jsx +0 -433
  78. data/app/views/playbook/samples/registration/index.html.erb +0 -316
  79. data/app/views/playbook/samples/registration/index.jsx +0 -476
  80. data/app/views/playbook/samples/sample_show.html.erb +0 -36
@@ -1,79 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_dependency "playbook/application_controller"
4
- require "yaml"
5
-
6
- module Playbook
7
- class PagesController < ApplicationController
8
- before_action :set_kit, only: %i[kit_show_rails kit_show_react]
9
- before_action :ensure_kit_type_exists, only: %i[kit_show_rails kit_show_react]
10
- before_action :set_category, only: %i[kit_category_show_rails kit_category_show_react]
11
-
12
- def home; end
13
-
14
- def utilities; end
15
-
16
- def tokens; end
17
-
18
- def kits
19
- params[:type] ||= "react"
20
- @type = params[:type]
21
- end
22
-
23
- def principles; end
24
-
25
- def grid
26
- render layout: "layouts/playbook/grid"
27
- end
28
-
29
- def kit_show_rails
30
- render template: "playbook/pages/kit_show"
31
- end
32
-
33
- def kit_show_react
34
- render template: "playbook/pages/kit_show"
35
- end
36
-
37
- def kit_category_show_rails
38
- params[:type] ||= "rails"
39
- @type = params[:type]
40
- render template: "playbook/pages/kit_category_show"
41
- end
42
-
43
- def kit_category_show_react
44
- render template: "playbook/pages/kit_category_show"
45
- end
46
-
47
- private
48
-
49
- def set_category
50
- categories = MENU["kits"].map { |link| link.first.first if link.is_a?(Hash) }.compact
51
- @category = params[:name]
52
- if categories.flatten.include?(@category)
53
- @category_kits = MENU["kits"].map { |link| link.first.last if link.is_a?(Hash) && link.first.first == @category }.compact.flatten
54
- @kits = params[:name]
55
- else
56
- redirect_to root_path, flash: { error: "That kit does not exist" }
57
- end
58
- end
59
-
60
- def set_kit
61
- menu = MENU["kits"].map { |link| link.is_a?(Hash) ? link.first.last : link }
62
- if menu.flatten.include?(params[:name])
63
- @kit = params[:name]
64
- else
65
- redirect_to root_path, flash: { error: "That kit does not exist" }
66
- end
67
- end
68
-
69
- def ensure_kit_type_exists
70
- # TODO: unsure why we cannot simply use the helpers that are included in ApplicationController - fix this
71
- is_rails_kit = action_name == "kit_show_rails"
72
- files = is_rails_kit ? File.join("**", "*.erb") : File.join("**", "*.jsx")
73
- kit_files = Dir.glob(files, base: "#{Playbook::Engine.root}/app/pb_kits/playbook/pb_#{@kit}/docs").present?
74
- if !kit_files.present?
75
- redirect_to action: is_rails_kit ? "kit_show_react" : "kit_show_rails"
76
- end
77
- end
78
- end
79
- end
@@ -1,40 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_dependency "playbook/application_controller"
4
- require "yaml"
5
-
6
- module Playbook
7
- class SamplesController < ApplicationController
8
- before_action :set_sample, only: %i[sample_show_rails sample_show_react]
9
-
10
- layout "playbook/samples"
11
-
12
- def samples
13
- params[:type] ||= "rails"
14
- @type = params[:type]
15
- end
16
-
17
- def sample_show_rails
18
- params[:type] ||= "rails"
19
- @type = params[:type]
20
- render template: "playbook/samples/sample_show"
21
- end
22
-
23
- def sample_show_react
24
- params[:type] ||= "react"
25
- @type = params[:type]
26
- render template: "playbook/samples/sample_show"
27
- end
28
-
29
- private
30
-
31
- def set_sample
32
- menu = MENU["samples"].map { |link| link.is_a?(Hash) ? link.first.last : link }
33
- if menu.flatten.include?(params[:name])
34
- @sample = params[:name]
35
- else
36
- redirect_to root_path, flash: { error: "That kit does not exist" }
37
- end
38
- end
39
- end
40
- end
@@ -1,55 +0,0 @@
1
- import '../../../../fonts/fontawesome-min.js'
2
- import '../../../../fonts/regular-min.js'
3
- import './main.scss'
4
- import '../vendor.js'
5
-
6
- // Move to separate file
7
- window.$(document).on('click', '[data-toggle]', function(e) {
8
- e.preventDefault()
9
-
10
- var kitContainer = window.$(this).closest('.pb--doc')
11
- var toggleTarget = window.$(this).data('toggle')
12
-
13
- window
14
- .$(kitContainer)
15
- .find('[data-action="toggle"]')
16
- .hide()
17
- window
18
- .$(kitContainer)
19
- .find('[data-togglable="' + toggleTarget + '"]')
20
- .show()
21
- })
22
-
23
- window.$(document).ready(() => {
24
- $('.compress').hide()
25
-
26
- window.$(document).on('click', '.toggle-button', (e) => {
27
- e.preventDefault()
28
- $('.pb--codeCopy').toggleClass('close')
29
- })
30
-
31
- $('.expand').click(() => {
32
- $('.sample-nav').hide()
33
- $('.compress').show()
34
- })
35
-
36
- $('.compress').click(() => {
37
- $('.sample-nav').show()
38
- $('.compress').hide()
39
- })
40
-
41
- const setClipboard = (value) => {
42
- var tempInput = document.createElement('textarea')
43
- tempInput.style = 'position: absolute; left: -1000px; top: -1000px'
44
- tempInput.value = value
45
- document.body.appendChild(tempInput)
46
- tempInput.select()
47
- document.execCommand('copy')
48
- document.body.removeChild(tempInput)
49
- }
50
-
51
- $('.copy-clipboard').click(() => {
52
- var copyText = document.querySelector('.hiddenCodeforCopy').textContent
53
- setClipboard(copyText)
54
- })
55
- })
@@ -1,174 +0,0 @@
1
- // ===========================================
2
- // Generated file from kit generator.
3
- //
4
- // KIT EXAMPLES
5
- // ===========================================
6
-
7
- import WebpackerReact from 'webpacker-react'
8
-
9
- //
10
- // ===========================================
11
- // ===========================================
12
- // Generated file from kit generator.
13
- // KIT EXAMPLES
14
-
15
- import '../pb_form/pb_form_validation'
16
- import * as Avatar from 'pb_avatar/docs'
17
- import * as AvatarActionButton from 'pb_avatar_action_button/docs'
18
- import * as Badge from 'pb_badge/docs'
19
- import * as BarGraph from 'pb_bar_graph/docs'
20
- import * as Body from 'pb_body/docs'
21
- import * as Button from 'pb_button/docs'
22
- import * as Caption from 'pb_caption/docs'
23
- import * as Card from 'pb_card/docs'
24
- import * as Checkbox from 'pb_checkbox/docs'
25
- import * as CircleIconButton from 'pb_circle_icon_button/docs'
26
- import * as Contact from 'pb_contact/docs'
27
- import * as Currency from 'pb_currency/docs'
28
- import * as DashboardValue from 'pb_dashboard_value/docs'
29
- import * as Date from 'pb_date/docs'
30
- import * as DateRangeInline from 'pb_date_range_inline/docs'
31
- import * as DateRangeStacked from 'pb_date_range_stacked/docs'
32
- import * as DateStacked from 'pb_date_stacked/docs'
33
- import * as DateTimeStacked from 'pb_date_time_stacked/docs'
34
- import * as DateYearStacked from 'pb_date_year_stacked/docs'
35
- import * as DistributionBar from 'pb_distribution_bar/docs'
36
- import * as FileUpload from 'pb_file_upload/docs'
37
- import * as Filter from 'pb_filter/docs'
38
- import * as FixedConfirmationToast from 'pb_fixed_confirmation_toast/docs'
39
- import * as Flex from 'pb_flex/docs'
40
- import * as FormPill from 'pb_form_pill/docs'
41
- import * as Hashtag from 'pb_hashtag/docs'
42
- import * as Highlight from 'pb_highlight/docs'
43
- import * as HomeAddressStreet from 'pb_home_address_street/docs'
44
- import * as Icon from 'pb_icon/docs'
45
- import * as IconCircle from 'pb_icon_circle/docs'
46
- import * as IconValue from 'pb_icon_value/docs'
47
- import * as Image from 'pb_image/docs'
48
- import * as Installer from 'pb_installer/docs'
49
- import * as LabelPill from 'pb_label_pill/docs'
50
- import * as LabelValue from 'pb_label_value/docs'
51
- import * as Layout from 'pb_layout/docs'
52
- import * as Legend from 'pb_legend/docs'
53
- import * as LineGraph from 'pb_line_graph/docs'
54
- import * as List from 'pb_list/docs'
55
- import * as LoadingInline from 'pb_loading_inline/docs'
56
- import * as Logistic from 'pb_logistic/docs'
57
- import * as Message from 'pb_message/docs'
58
- import * as MultipleUsers from 'pb_multiple_users/docs'
59
- import * as MultipleUsersStacked from 'pb_multiple_users_stacked/docs'
60
- import * as Nav from 'pb_nav/docs'
61
- import * as OnlineStatus from 'pb_online_status/docs'
62
- import * as PbReactPopover from 'pb_popover/docs'
63
- import * as Person from 'pb_person/docs'
64
- import * as PersonContact from 'pb_person_contact/docs'
65
- import * as Pill from 'pb_pill/docs'
66
- import * as ProgressPills from 'pb_progress_pills/docs'
67
- import * as ProgressSimple from 'pb_progress_simple/docs'
68
- import * as ProgressStep from 'pb_progress_step/docs'
69
- import * as Radio from 'pb_radio/docs'
70
- import * as SectionSeparator from 'pb_section_separator/docs'
71
- import * as Select from 'pb_select/docs'
72
- import * as SelectableCard from 'pb_selectable_card/docs'
73
- import * as SelectableCardIcon from 'pb_selectable_card_icon/docs'
74
- import * as SelectableIcon from 'pb_selectable_icon/docs'
75
- import * as Source from 'pb_source/docs'
76
- import * as StarRating from 'pb_star_rating/docs'
77
- import * as StatChange from 'pb_stat_change/docs'
78
- import * as StatValue from 'pb_stat_value/docs'
79
- import * as Table from 'pb_table/docs'
80
- import * as Textarea from 'pb_textarea/docs'
81
- import * as TextInput from 'pb_text_input/docs'
82
- import * as Time from 'pb_time/docs'
83
- import * as Timeline from 'pb_timeline/docs'
84
- import * as TimeStacked from 'pb_time_stacked/docs'
85
- import * as Timestamp from 'pb_timestamp/docs'
86
- import * as TimeRangeInline from 'pb_time_range_inline/docs'
87
- import * as Title from 'pb_title/docs'
88
- import * as TitleCount from 'pb_title_count/docs'
89
- import * as TitleDetail from 'pb_title_detail/docs'
90
- import * as Toggle from 'pb_toggle/docs'
91
- import * as User from 'pb_user/docs'
92
- import * as UserBadge from 'pb_user_badge/docs'
93
- import * as WeekdayStacked from 'pb_weekday_stacked/docs'
94
-
95
- WebpackerReact.setup({
96
- ...Avatar,
97
- ...AvatarActionButton,
98
- ...Badge,
99
- ...BarGraph,
100
- ...Body,
101
- ...Button,
102
- ...Caption,
103
- ...Card,
104
- ...Checkbox,
105
- ...CircleIconButton,
106
- ...Contact,
107
- ...Currency,
108
- ...DashboardValue,
109
- ...Date,
110
- ...DateRangeInline,
111
- ...DateRangeStacked,
112
- ...DateStacked,
113
- ...DateTimeStacked,
114
- ...DateYearStacked,
115
- ...DistributionBar,
116
- ...FileUpload,
117
- ...Filter,
118
- ...FixedConfirmationToast,
119
- ...Flex,
120
- ...FormPill,
121
- ...Hashtag,
122
- ...Highlight,
123
- ...HomeAddressStreet,
124
- ...Icon,
125
- ...IconCircle,
126
- ...IconValue,
127
- ...Image,
128
- ...Installer,
129
- ...LabelPill,
130
- ...LabelValue,
131
- ...Layout,
132
- ...Legend,
133
- ...LineGraph,
134
- ...List,
135
- ...LoadingInline,
136
- ...Logistic,
137
- ...Message,
138
- ...MultipleUsers,
139
- ...MultipleUsersStacked,
140
- ...Nav,
141
- ...OnlineStatus,
142
- ...PbReactPopover,
143
- ...Person,
144
- ...PersonContact,
145
- ...Pill,
146
- ...ProgressPills,
147
- ...ProgressSimple,
148
- ...ProgressStep,
149
- ...Radio,
150
- ...SectionSeparator,
151
- ...Select,
152
- ...SelectableCard,
153
- ...SelectableIcon,
154
- ...SelectableCardIcon,
155
- ...Source,
156
- ...StarRating,
157
- ...StatChange,
158
- ...StatValue,
159
- ...Table,
160
- ...Textarea,
161
- ...TextInput,
162
- ...Time,
163
- ...Timeline,
164
- ...TimeStacked,
165
- ...Timestamp,
166
- ...TimeRangeInline,
167
- ...Title,
168
- ...TitleCount,
169
- ...TitleDetail,
170
- ...Toggle,
171
- ...User,
172
- ...UserBadge,
173
- ...WeekdayStacked,
174
- })
@@ -1,12 +0,0 @@
1
- // SCAFFOLD
2
- @import "site_styles/scaffold";
3
-
4
- // KITS
5
- @import "../playbook";
6
-
7
- // APP STYLES
8
- @import "site_styles/site-style";
9
- @import "site_styles/docs/all";
10
-
11
- // FULL PAGE EXAMPLE STYLES
12
- @import "site_styles/samples";
@@ -1,19 +0,0 @@
1
- // ===========================================
2
- // Generated file from kit generator.
3
- //
4
- // ===========================================
5
-
6
- import WebpackerReact from 'webpacker-react'
7
-
8
- //
9
- // ===========================================
10
- // ===========================================
11
- // Generated file from kit generator.
12
-
13
- import Dashboards from '../../../views/playbook/samples/dashboards/index.jsx'
14
- import FilterTable from '../../../views/playbook/samples/filter_table/index.jsx'
15
- import Registration from '../../../views/playbook/samples/registration/index.jsx'
16
-
17
- WebpackerReact.setup({ Dashboards })
18
- WebpackerReact.setup({ FilterTable })
19
- WebpackerReact.setup({ Registration })
@@ -1,72 +0,0 @@
1
- .sample-layout {
2
- overflow-y: hidden;
3
- .sample {
4
- padding-left: 50px;
5
- border-bottom: 0px;
6
- }
7
- .code-controls {
8
- .pb_nav_list_item_text {
9
- color: white !important;
10
- }
11
- .pb_nav_list_kit_item {
12
- .pb_nav_list_item_link {
13
- border-color: transparent !important;
14
- }
15
- }
16
- }
17
-
18
- .sample-nav {
19
- padding: 0 25px;
20
- background: #172257;
21
- display: flex;
22
- width: 100%;
23
- flex-basis: 200px;
24
-
25
- }
26
-
27
- .sample-actions {
28
- display: flex;
29
- align-items: center;
30
- justify-content: center;
31
-
32
- &-right {
33
- margin-left: auto;
34
- order: 2;
35
- display: flex;
36
- align-items: center;
37
- justify-content: center;
38
- .items {
39
- padding: 5px;
40
- }
41
- }
42
- }
43
- .pb--doc {
44
- margin-bottom: 0px;
45
- }
46
- .pb--codeCopy {
47
- border: 0px;
48
- position: fixed;
49
- width: 100%;
50
- height: calc(50vh - 45px);
51
- bottom: 0;
52
- left: 0;
53
- transition: all .4s;
54
- border-radius: 0 0 6px 6px;
55
- }
56
-
57
- .pb--codeCopy.close {
58
- top: 100%;
59
- height: 0px;
60
- transition: all .4s;
61
- }
62
- .compress {
63
- position: absolute;
64
- top: 15px;
65
- right: 30px;
66
- display: none;
67
- z-index: 4;
68
- }
69
- .hiddenCodeforCopy {
70
- display: none;
71
- }
72
- }