playbook_ui 5.1.0.pre.alpha4 → 5.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/clark.jpg +0 -0
  3. data/app/assets/images/giant.jpg +0 -0
  4. data/app/assets/images/pb-caret.svg +1 -0
  5. data/app/assets/images/pb-check.svg +11 -0
  6. data/app/assets/images/pb.logo.svg +28 -0
  7. data/app/controllers/playbook/application_controller.rb +13 -0
  8. data/app/controllers/playbook/guides_controller.rb +11 -0
  9. data/app/controllers/playbook/pages_controller.rb +79 -0
  10. data/app/controllers/playbook/samples_controller.rb +40 -0
  11. data/app/pb_kits/playbook/config/_kit_example.html.erb +9 -0
  12. data/app/pb_kits/playbook/config/_kit_samples_list.html.erb +3 -0
  13. data/app/pb_kits/playbook/config/_kit_ui.html.erb +40 -0
  14. data/app/pb_kits/playbook/config/_pb_kit_api.html.erb +18 -0
  15. data/app/pb_kits/playbook/data/menu.yml +93 -0
  16. data/app/pb_kits/playbook/index.js +0 -4
  17. data/app/pb_kits/playbook/packs/application.js +55 -0
  18. data/app/pb_kits/playbook/packs/examples.js +174 -0
  19. data/app/pb_kits/playbook/packs/main.scss +12 -0
  20. data/app/pb_kits/playbook/packs/samples.js +19 -0
  21. data/app/pb_kits/playbook/packs/site_styles/_samples.scss +72 -0
  22. data/app/pb_kits/playbook/packs/site_styles/_scaffold.scss +43 -0
  23. data/app/pb_kits/playbook/packs/site_styles/_site-style.scss +135 -0
  24. data/app/pb_kits/playbook/packs/site_styles/docs/_all.scss +9 -0
  25. data/app/pb_kits/playbook/packs/site_styles/docs/_code_snippet.scss +531 -0
  26. data/app/pb_kits/playbook/packs/site_styles/docs/_color_utilities.scss +92 -0
  27. data/app/pb_kits/playbook/packs/site_styles/docs/_flex_examples.scss +15 -0
  28. data/app/pb_kits/playbook/packs/site_styles/docs/_kit_doc.scss +190 -0
  29. data/app/pb_kits/playbook/packs/site_styles/docs/_kits_examples.scss +18 -0
  30. data/app/pb_kits/playbook/packs/site_styles/docs/_markdown.scss +82 -0
  31. data/app/pb_kits/playbook/packs/site_styles/docs/_spacing_tokens.scss +72 -0
  32. data/app/pb_kits/playbook/pb_filter/docs/_description.md +3 -0
  33. data/app/pb_kits/playbook/pb_filter/templates/_default.html.erb +1 -1
  34. data/app/pb_kits/playbook/pb_popover/_popover.html.erb +2 -2
  35. data/app/pb_kits/playbook/pb_popover/_popover.jsx +3 -3
  36. data/app/pb_kits/playbook/pb_popover/_popover.scss +25 -21
  37. data/app/pb_kits/playbook/pb_popover/index.js +6 -1
  38. data/app/pb_kits/playbook/pb_radio/_radio.scss +4 -0
  39. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.html.erb +1 -1
  40. data/app/views/layouts/playbook/_mobile_hamburger.html.erb +2 -0
  41. data/app/views/layouts/playbook/_nav.html.erb +13 -0
  42. data/app/views/layouts/playbook/_sidebar.html.erb +52 -0
  43. data/app/views/layouts/playbook/application.html.slim +22 -0
  44. data/app/views/layouts/playbook/fullscreen.html.slim +10 -0
  45. data/app/views/layouts/playbook/grid.html.slim +10 -0
  46. data/app/views/layouts/playbook/samples.html.erb +18 -0
  47. data/app/views/playbook/guides/create_kit.html.slim +16 -0
  48. data/app/views/playbook/guides/create_kit/_file_naming.html.md +2 -0
  49. data/app/views/playbook/guides/create_kit/_generator.html.md +6 -0
  50. data/app/views/playbook/guides/create_kit/_kit_examples.html.md +2 -0
  51. data/app/views/playbook/guides/create_kit/_kit_rails.html.md +2 -0
  52. data/app/views/playbook/guides/create_kit/_kit_react.html.md +2 -0
  53. data/app/views/playbook/guides/create_kit/_layout.html.md +2 -0
  54. data/app/views/playbook/guides/create_kit/_view_objects.html.md +2 -0
  55. data/app/views/playbook/guides/create_kit/_writing_sass.md +10 -0
  56. data/app/views/playbook/guides/use_nitro.html.slim +6 -0
  57. data/app/views/playbook/guides/use_nitro/_local.html.md +2 -0
  58. data/app/views/playbook/guides/use_nitro/_nitro_components.html.md +2 -0
  59. data/app/views/playbook/guides/use_nitro/_versions.html.md +2 -0
  60. data/app/views/playbook/pages/fullscreen.html.slim +10 -0
  61. data/app/views/playbook/pages/grid.html.slim +2 -0
  62. data/app/views/playbook/pages/home.html.slim +4 -0
  63. data/app/views/playbook/pages/kit_category_show.html.erb +14 -0
  64. data/app/views/playbook/pages/kit_show.html.erb +33 -0
  65. data/app/views/playbook/pages/kits.html.erb +12 -0
  66. data/app/views/playbook/pages/principals/_getting_started.html.md +30 -0
  67. data/app/views/playbook/pages/principles.html.slim +3 -0
  68. data/app/views/playbook/pages/tokens.html.slim +15 -0
  69. data/app/views/playbook/pages/tokens/_pb_doc_spacing.html.slim +17 -0
  70. data/app/views/playbook/pages/utilities.html.slim +116 -0
  71. data/app/views/playbook/pages/utilities/_pb_doc_color.html.slim +15 -0
  72. data/app/views/playbook/samples/dashboards/index.html.erb +81 -0
  73. data/app/views/playbook/samples/dashboards/index.jsx +130 -0
  74. data/app/views/playbook/samples/filter_table/index.html.erb +348 -0
  75. data/app/views/playbook/samples/filter_table/index.jsx +433 -0
  76. data/app/views/playbook/samples/registration/index.html.erb +316 -0
  77. data/app/views/playbook/samples/registration/index.jsx +476 -0
  78. data/app/views/playbook/samples/sample_show.html.erb +36 -0
  79. data/lib/playbook/version.rb +1 -1
  80. data/lib/tasks/pb_release.rake +0 -3
  81. metadata +74 -7
  82. data/app/pb_kits/playbook/tokens/index.scss +0 -12
@@ -0,0 +1,174 @@
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
+ })
@@ -0,0 +1,12 @@
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";
@@ -0,0 +1,19 @@
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 })
@@ -0,0 +1,72 @@
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
+ }
@@ -0,0 +1,43 @@
1
+ @import "../../tokens/fonts";
2
+ @import "../../tokens/typography";
3
+ @import "../../tokens/colors";
4
+ @import "../../utilities/colors";
5
+
6
+ * {
7
+ box-sizing: border-box;
8
+ margin: 0;
9
+ padding: 0;
10
+ &:before,
11
+ &:after {
12
+ box-sizing: border-box;
13
+ }
14
+ }
15
+
16
+ html {
17
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
18
+ height: 100vh;
19
+ }
20
+
21
+ body {
22
+ font-family: $font_family_base;
23
+ font-size: $font_base;
24
+ line-height: 1.5;
25
+ background-color: $bg-light;
26
+ height: 100%;
27
+ letter-spacing: $lspace_normal;
28
+ font-weight: $regular;
29
+ font-style: normal;
30
+ text-rendering: optimizeLegibility;
31
+ -moz-font-feature-settings: "liga" on;
32
+ color: $charcoal;
33
+ margin: 0 !important;
34
+ padding: 0 !important;
35
+ box-sizing: border-box;
36
+ min-height: 100vh;
37
+ padding: 50px; // REMOVE AFTER STYLED
38
+ }
39
+
40
+ a {
41
+ text-decoration: none;
42
+ color: $primary;
43
+ }
@@ -0,0 +1,135 @@
1
+ @import "../../tokens/colors";
2
+ @import "../../tokens/spacing";
3
+ @import "../../tokens/screen_sizes";
4
+ @import "../../tokens/border_radius";
5
+ @import "../../tokens/shadows";
6
+
7
+ $selector: ".pb--page";
8
+
9
+ body {
10
+ overflow-x: hidden;
11
+ }
12
+
13
+ .pb--page {
14
+ &--topNav {
15
+ flex: 0 0;
16
+ border-bottom: 1px solid $border_light;
17
+ padding: 20px 30px;
18
+ background: $white;
19
+ h1 {
20
+ display: flex;
21
+ align-items: center;
22
+ img {
23
+ display: flex;
24
+ }
25
+ }
26
+ }
27
+ &--content {
28
+ min-height: calc(100vh - 89px);
29
+ @include break_at(breakpoint("lg")) {
30
+ grid-template-columns: auto auto !important;
31
+ }
32
+ &--main {
33
+ flex-grow: 1;
34
+ padding: 40px 60px;
35
+ height: calc(100vh - 89px);
36
+ overflow: auto;
37
+ @include break_at(breakpoint("lg")) {
38
+ padding: $space-lg $space-xl;
39
+ }
40
+ }
41
+ }
42
+ &--hamburger, &--checkbox {
43
+ position: absolute;
44
+ right: $space-xl;
45
+ top: 30px;
46
+ display: none;
47
+ font-size: $space-xl;
48
+ width: 30px;
49
+ height: 30px;
50
+ color: $primary;
51
+ cursor: pointer;
52
+ @include break_at(breakpoint("lg")) {
53
+ display: block;
54
+ }
55
+ }
56
+ &--checkbox {
57
+ opacity: 0;
58
+ ~ #{$selector}--sideNav {
59
+ @include break_at(breakpoint("lg")) {
60
+ position: absolute;
61
+ transform-origin: 0% 0%;
62
+ transform: translate(100%, 0);
63
+ transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0);
64
+ border-radius: $border_rad_heavier;
65
+ box-shadow: $shadow_deepest;
66
+ top: 100px;
67
+ right: 0;
68
+ width: auto !important;
69
+ padding: $space-xl;
70
+ z-index: 1000;
71
+ }
72
+ }
73
+ &:checked ~ #{$selector}--sideNav {
74
+ @include break_at(breakpoint("lg")) {
75
+ transform: translate(-10%, 0);
76
+ }
77
+ }
78
+ }
79
+
80
+ &--sideNav {
81
+ height: calc(100vh - 89px);
82
+ overflow: auto;
83
+ .category_section {
84
+ &.active {
85
+ padding: $space_xs 0;
86
+ background: $bg_light;
87
+ }
88
+ .sub_category {
89
+ padding-left: $space_md;
90
+ }
91
+ }
92
+ }
93
+ }
94
+
95
+ // Nav Tabs switch between Rails and React
96
+ .pb--kit-type-nav {
97
+ margin: 20px 0 30px;
98
+ line-height: 34px;
99
+ border-bottom: 2px solid rgba($border_light, 0.6);
100
+
101
+ &.sample {
102
+ margin: 0;
103
+ border-bottom: 2px solid rgba(228, 232, 240, 0.6);
104
+ background: rgb(23, 34, 87) !important;
105
+ }
106
+
107
+ a {
108
+ padding: 0 10px;
109
+ line-height: 34px;
110
+ font-size: 14px;
111
+ font-weight: 400;
112
+ display: inline-block;
113
+ position: relative;
114
+
115
+ &::after {
116
+ content: "";
117
+ width: 100%;
118
+ height: 3px;
119
+ background: transparent;
120
+ position: absolute;
121
+ bottom: -2px;
122
+ left: 0;
123
+ border-radius: 1px;
124
+ transition: all 0.2s ease;
125
+ }
126
+
127
+ &.active {
128
+ font-weight: 600;
129
+
130
+ &::after {
131
+ background: $primary;
132
+ }
133
+ }
134
+ }
135
+ }