docks_theme_api 1.0.2
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.
- checksums.yaml +15 -0
- data/.babelrc +4 -0
- data/.editorconfig +8 -0
- data/.eslintrc +115 -0
- data/.gitignore +24 -0
- data/.rubocop.yml +20 -0
- data/.travis.yml +16 -0
- data/Gemfile +4 -0
- data/README.md +5 -0
- data/Rakefile +3 -0
- data/assets/images/icons.svg +63 -0
- data/assets/scripts/coffeescript/pattern_library_helpers.coffee +8 -0
- data/assets/scripts/javascript/pattern_library_helpers.js +11 -0
- data/assets/scripts/pattern_library.js +10380 -0
- data/assets/scripts/pattern_library_demo.js +0 -0
- data/assets/styles/less/pattern-library-helpers.less +103 -0
- data/assets/styles/pattern-library-demo.css +1882 -0
- data/assets/styles/pattern-library.css +1882 -0
- data/assets/styles/sass/pattern-library-helpers.sass +90 -0
- data/assets/styles/scss/pattern-library-helpers.scss +99 -0
- data/assets/styles/stylus/pattern-library-helpers.styl +90 -0
- data/assets/templates/erb/demo.erb +26 -0
- data/assets/templates/erb/layouts/demo.erb +17 -0
- data/assets/templates/erb/layouts/pattern.erb +76 -0
- data/assets/templates/erb/partials/sidebar.erb +124 -0
- data/assets/templates/erb/partials/symbols/class.erb +1 -0
- data/assets/templates/erb/partials/symbols/demo.erb +40 -0
- data/assets/templates/erb/partials/symbols/factory.erb +70 -0
- data/assets/templates/erb/partials/symbols/function.erb +103 -0
- data/assets/templates/erb/partials/symbols/mixin.erb +62 -0
- data/assets/templates/erb/partials/symbols/variable.erb +59 -0
- data/assets/templates/erb/pattern.erb +102 -0
- data/assets/templates/haml/demo.haml +14 -0
- data/assets/templates/haml/layouts/demo.haml +6 -0
- data/assets/templates/haml/layouts/pattern.haml +38 -0
- data/assets/templates/haml/partials/sidebar.haml +68 -0
- data/assets/templates/haml/partials/symbols/class.haml +1 -0
- data/assets/templates/haml/partials/symbols/demo.haml +23 -0
- data/assets/templates/haml/partials/symbols/factory.haml +38 -0
- data/assets/templates/haml/partials/symbols/function.haml +54 -0
- data/assets/templates/haml/partials/symbols/mixin.haml +31 -0
- data/assets/templates/haml/partials/symbols/variable.haml +22 -0
- data/assets/templates/haml/pattern.haml +54 -0
- data/assets/templates/slim/demo.slim +24 -0
- data/assets/templates/slim/layouts/demo.slim +5 -0
- data/assets/templates/slim/layouts/pattern.slim +48 -0
- data/assets/templates/slim/partials/sidebar.slim +112 -0
- data/assets/templates/slim/partials/symbols/class.slim +1 -0
- data/assets/templates/slim/partials/symbols/demo.slim +30 -0
- data/assets/templates/slim/partials/symbols/factory.slim +57 -0
- data/assets/templates/slim/partials/symbols/function.slim +81 -0
- data/assets/templates/slim/partials/symbols/mixin.slim +45 -0
- data/assets/templates/slim/partials/symbols/variable.slim +35 -0
- data/assets/templates/slim/pattern.slim +63 -0
- data/docks_config.rb +32 -0
- data/docks_theme_api.gemspec +37 -0
- data/gulpfile.js +88 -0
- data/karma.conf.js +6 -0
- data/lib/docks_theme_api/components/base_component.rb +99 -0
- data/lib/docks_theme_api/components/code_block_component.rb +10 -0
- data/lib/docks_theme_api/components/popover_component.rb +15 -0
- data/lib/docks_theme_api/components/table_component.rb +34 -0
- data/lib/docks_theme_api/components/tablist_component.rb +11 -0
- data/lib/docks_theme_api/components.rb +21 -0
- data/lib/docks_theme_api/helpers/ui_helper.rb +69 -0
- data/lib/docks_theme_api/theme.rb +21 -0
- data/lib/docks_theme_api.rb +1 -0
- data/package.json +60 -0
- data/source/behaviors/filterable/filterable.coffee +353 -0
- data/source/behaviors/filterable/filterable.js +0 -0
- data/source/behaviors/filterable/filterable.scss +34 -0
- data/source/behaviors/filterable/package.json +3 -0
- data/source/behaviors/index.js +0 -0
- data/source/components/avatar/avatar.erb +20 -0
- data/source/components/avatar/avatar.js +142 -0
- data/source/components/avatar/avatar.scss +200 -0
- data/source/components/avatar/avatar_container.erb +13 -0
- data/source/components/avatar/package.json +3 -0
- data/source/components/avatar/spec/avatar_spec.js +81 -0
- data/source/components/badge/badge.scss +158 -0
- data/source/components/button/button.scss +213 -0
- data/source/components/card/card.scss +32 -0
- data/source/components/code_block/code-block.scss +353 -0
- data/source/components/code_block/code_block.erb +95 -0
- data/source/components/code_block/code_block.js +444 -0
- data/source/components/code_block/package.json +3 -0
- data/source/components/code_block/spec/code_block_spec.js +10 -0
- data/source/components/demo/demo.js +244 -0
- data/source/components/demo/demo.scss +90 -0
- data/source/components/demo/package.json +3 -0
- data/source/components/exploded/exploded.erb +25 -0
- data/source/components/exploded/exploded.js +694 -0
- data/source/components/exploded/exploded.scss +166 -0
- data/source/components/exploded/package.json +3 -0
- data/source/components/field/field.js +24 -0
- data/source/components/field/field.scss +101 -0
- data/source/components/field/package.json +3 -0
- data/source/components/header/header.scss +33 -0
- data/source/components/iframe/iframe.erb +12 -0
- data/source/components/iframe/iframe.js +381 -0
- data/source/components/iframe/package.json +3 -0
- data/source/components/index.js +37 -0
- data/source/components/inline_group/inline-group.scss +14 -0
- data/source/components/internal_link/internal_link.js +49 -0
- data/source/components/internal_link/package.json +3 -0
- data/source/components/list/list.scss +230 -0
- data/source/components/modal/modal.coffee +84 -0
- data/source/components/modal/modal.erb +19 -0
- data/source/components/modal/modal.js +0 -0
- data/source/components/modal/modal.scss +57 -0
- data/source/components/modal/package.json +3 -0
- data/source/components/notice/notice.scss +48 -0
- data/source/components/popover/package.json +3 -0
- data/source/components/popover/popover.coffee +562 -0
- data/source/components/popover/popover.erb +21 -0
- data/source/components/popover/popover.js +0 -0
- data/source/components/popover/popover.scss +139 -0
- data/source/components/range/range.scss +78 -0
- data/source/components/resizable/package.json +3 -0
- data/source/components/resizable/resizable.erb +30 -0
- data/source/components/resizable/resizable.js +250 -0
- data/source/components/resizable/resizable.scss +245 -0
- data/source/components/resizable/size_buttons.js +249 -0
- data/source/components/scroll_container/package.json +3 -0
- data/source/components/scroll_container/scroll-container.scss +4 -0
- data/source/components/scroll_container/scroll_container.js +24 -0
- data/source/components/section/section.scss +99 -0
- data/source/components/select/package.json +3 -0
- data/source/components/select/select.erb +21 -0
- data/source/components/select/select.js +35 -0
- data/source/components/select/select.scss +163 -0
- data/source/components/table/package.json +3 -0
- data/source/components/table/table.erb +16 -0
- data/source/components/table/table.js +351 -0
- data/source/components/table/table.scss +236 -0
- data/source/components/tablist/package.json +3 -0
- data/source/components/tablist/tablist.erb +13 -0
- data/source/components/tablist/tablist.js +246 -0
- data/source/components/tablist/tablist.scss +191 -0
- data/source/components/tablist/tablist_panel.erb +14 -0
- data/source/components/tablist/tablist_tab.erb +20 -0
- data/source/components/toggle/package.json +3 -0
- data/source/components/toggle/toggle.erb +11 -0
- data/source/components/toggle/toggle.js +211 -0
- data/source/components/toggle/toggle_container.erb +30 -0
- data/source/components/vertical_spacer/vertical-spacer.scss +3 -0
- data/source/components/vertical_stack/vertical-stack.scss +19 -0
- data/source/components/xray/package.json +3 -0
- data/source/components/xray/xray.erb +50 -0
- data/source/components/xray/xray.js +123 -0
- data/source/components/xray/xray.scss +79 -0
- data/source/foundation/app/app.js +15 -0
- data/source/foundation/app/package.json +3 -0
- data/source/pattern-library-demo.scss +13 -0
- data/source/pattern-library.scss +13 -0
- data/source/pattern_library.js +8 -0
- data/source/pattern_library_demo.js +8 -0
- data/source/structures/index.js +11 -0
- data/source/structures/sidebar/package.json +3 -0
- data/source/structures/sidebar/sidebar.js +69 -0
- data/source/structures/sidebar/sidebar.scss +79 -0
- data/source/utilities/builder/builder.js +138 -0
- data/source/utilities/builder/package.json +3 -0
- data/source/utilities/client/client.js +7 -0
- data/source/utilities/client/package.json +3 -0
- data/source/utilities/colors/colors.scss +112 -0
- data/source/utilities/defaults/defaults.scss +38 -0
- data/source/utilities/dom_cache/dom_cache.js +24 -0
- data/source/utilities/dom_cache/package.json +3 -0
- data/source/utilities/events/events.js +25 -0
- data/source/utilities/events/package.json +3 -0
- data/source/utilities/font_sizes/font-sizes.scss +85 -0
- data/source/utilities/foundation/a11y.scss +10 -0
- data/source/utilities/foundation/base.scss +29 -0
- data/source/utilities/foundation/icon.scss +114 -0
- data/source/utilities/foundation/layout.scss +67 -0
- data/source/utilities/foundation/page.scss +39 -0
- data/source/utilities/foundation/type.scss +208 -0
- data/source/utilities/functions/functions.scss +127 -0
- data/source/utilities/keycodes/keycodes.js +23 -0
- data/source/utilities/keycodes/package.json +3 -0
- data/source/utilities/markup/markup.js +90 -0
- data/source/utilities/markup/package.json +3 -0
- data/source/utilities/media/media.scss +172 -0
- data/source/utilities/mixins/mixins.scss +89 -0
- data/source/utilities/naming_convention/naming_convention.js +3 -0
- data/source/utilities/naming_convention/package.json +3 -0
- data/source/utilities/numbers/numbers.js +14 -0
- data/source/utilities/numbers/package.json +3 -0
- data/source/utilities/painting/package.json +3 -0
- data/source/utilities/painting/painting.js +7 -0
- data/source/utilities/pattern/package.json +3 -0
- data/source/utilities/pattern/pattern.js +50 -0
- data/source/utilities/query_string/package.json +3 -0
- data/source/utilities/query_string/query_string.js +24 -0
- data/source/utilities/template/package.json +3 -0
- data/source/utilities/template/template.js +10 -0
- data/source/utilities/text_range/package.json +3 -0
- data/source/utilities/text_range/text_range.js +30 -0
- data/source/utilities/ui_events/package.json +3 -0
- data/source/utilities/ui_events/ui_events.js +85 -0
- data/source/utilities/variables/variables.scss +18 -0
- data/source/utilities/z_indexes/z-indexes.scss +88 -0
- data/source/vendor/array_includes.js +28 -0
- data/source/vendor/highlight.js +1142 -0
- data/source/vendor/index.js +1 -0
- data/source/vendor/matrix.js +399 -0
- data/source/vendor/query_string.js +66 -0
- data/spec/assets/.eslintrc +9 -0
- data/spec/assets/spec_fixture.js +33 -0
- data/spec/assets/spec_helper.js +19 -0
- data/spec/lib/components/base_component_spec.rb +156 -0
- data/spec/lib/components_spec.rb +30 -0
- data/spec/lib/helpers/ui_helper_spec.rb +62 -0
- data/spec/lib/theme_spec.rb +25 -0
- data/spec/spec_helper.rb +15 -0
- data/tasks/gulp/.eslintrc +6 -0
- data/tasks/gulp/browser_sync.js +8 -0
- data/tasks/gulp/code_quality/scripts.js +10 -0
- data/tasks/gulp/config/index.js +116 -0
- data/tasks/gulp/minify/scripts.js +13 -0
- data/tasks/gulp/minify/styles.js +13 -0
- data/tasks/gulp/pattern_library/index.js +5 -0
- data/tasks/gulp/pattern_library/scripts.js +10 -0
- data/tasks/gulp/pattern_library/styles.js +10 -0
- data/tasks/gulp/scripts.js +8 -0
- data/tasks/gulp/spec/scripts.js +11 -0
- data/tasks/gulp/styles.js +17 -0
- data/tasks/gulp/utilities/babel/relative_require.js +22 -0
- data/tasks/gulp/utilities/babel/spec_helper.js +20 -0
- data/tasks/gulp/utilities/browserify_bundler.js +22 -0
- data/tasks/gulp/utilities/handle_errors.js +13 -0
- data/tasks/gulp/watch.js +9 -0
- data/tasks/rake/rspec.rake +7 -0
- data/tasks/rake/rubocop.rake +8 -0
- data/tasks/rake/templates.rake +50 -0
- metadata +470 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
// ___ ___ ___ ___ _____ ___ _____
|
|
2
|
+
// / /\ /__/| / /\ / /\ / /::\ / /\ / /::\
|
|
3
|
+
// / /:/_ | |:| / /::\ / /::\ / /:/\:\ / /:/_ / /:/\:\
|
|
4
|
+
// / /:/ /\ | |:| / /:/\:\___ ___ / /:/\:\ / /:/ \:\ / /:/ /\ / /:/ \:\
|
|
5
|
+
// / /:/ /:/_ __|__|:| / /:/~/:/__/\ / /\/ /:/ \:\/__/:/ \__\:|/ /:/ /:/_/__/:/ \__\:|
|
|
6
|
+
// /__/:/ /:/ /\/__/::::\___/__/:/ /:/\ \:\ / /:/__/:/ \__\:\ \:\ / /:/__/:/ /:/ /\ \:\ / /:/
|
|
7
|
+
// \ \:\/:/ /:/ ~\~~\::::| \:\/:/ \ \:\ /:/\ \:\ / /:/\ \:\ /:/\ \:\/:/ /:/\ \:\ /:/
|
|
8
|
+
// \ \::/ /:/ |~~|:|~~ \ \::/ \ \:\/:/ \ \:\ /:/ \ \:\/:/ \ \::/ /:/ \ \:\/:/
|
|
9
|
+
// \ \:\/:/ | |:| \ \:\ \ \::/ \ \:\/:/ \ \::/ \ \:\/:/ \ \::/
|
|
10
|
+
// \ \::/ | |:| \ \:\ \__\/ \ \::/ \__\/ \ \::/ \__\/
|
|
11
|
+
// \__\/ |__|/ \__\/ \__\/ \__\/
|
|
12
|
+
|
|
13
|
+
//*
|
|
14
|
+
// @pattern Exploded
|
|
15
|
+
//
|
|
16
|
+
// An exploded view of a given DOM structure that can be freely rotated. It
|
|
17
|
+
// allows the user to see the structure of the component as it is rendered,
|
|
18
|
+
// helping them learn about subcomponents that make up the overall structure.
|
|
19
|
+
//
|
|
20
|
+
// @since 1.0.0
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
//*
|
|
25
|
+
// This is the base component for an explosion. It contains the source markup
|
|
26
|
+
// and the exploded representation, as well as communicates overall states of
|
|
27
|
+
// the component to subcomponents.
|
|
28
|
+
//
|
|
29
|
+
// @helper
|
|
30
|
+
// <%= docks_exploded markup: %Q(
|
|
31
|
+
// <div class="foo" style="padding: 1em;">
|
|
32
|
+
// <div class="foo__bar" style="height: 5em; position: relative;">
|
|
33
|
+
// <div class="foo__bar__baz" style="width: 50%; height: 100%; position: absolute; top: 0; left: 0;"></div>
|
|
34
|
+
// <div class="foo__bar__baz" style="width: 50%; height: 100%; position: absolute; top: 0; left: 50%;"></div>
|
|
35
|
+
// </div>
|
|
36
|
+
// </div>
|
|
37
|
+
// ) %>
|
|
38
|
+
|
|
39
|
+
.exploded {}
|
|
40
|
+
|
|
41
|
+
.exploded--is-being-initialized {
|
|
42
|
+
.exploded__pane {
|
|
43
|
+
transition: transform 0.25s ease;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
.exploded__source,
|
|
50
|
+
.exploded__structure {
|
|
51
|
+
padding: default(spacing) double(default(spacing));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
//*
|
|
57
|
+
// The container for the original source markup for the component. This is
|
|
58
|
+
// kept around so that each pane can be associated to a source DOM node for
|
|
59
|
+
// any consumer of the explosion pane selection to display source structure
|
|
60
|
+
// details.
|
|
61
|
+
|
|
62
|
+
.exploded__source {}
|
|
63
|
+
|
|
64
|
+
//*
|
|
65
|
+
// A container that wraps exactly around the source markup. This extra
|
|
66
|
+
// container (corresponding to the structure's `exploded__structure__content`)
|
|
67
|
+
// is required to simplify absolute positioning calculations for the
|
|
68
|
+
// JavaScript component.
|
|
69
|
+
|
|
70
|
+
.exploded__source__content {}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
//*
|
|
75
|
+
// The container around the exploded representation. This container provides
|
|
76
|
+
// the perspective required to make the component three-dimensional.
|
|
77
|
+
|
|
78
|
+
.exploded__structure {
|
|
79
|
+
position: relative;
|
|
80
|
+
perspective: 2000px;
|
|
81
|
+
transform-style: preserve-3d;
|
|
82
|
+
cursor: pointer;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
//*
|
|
88
|
+
// The container that wraps exactly around the exploded structure. This extra
|
|
89
|
+
// container exists so that `exploded__structure` can provide some padding/
|
|
90
|
+
// horizontal centering of the exploded structure while also providing a
|
|
91
|
+
// simple relative container (this subcomponent) from which to make absolute
|
|
92
|
+
// positioning calculations.
|
|
93
|
+
|
|
94
|
+
.exploded__structure__content {
|
|
95
|
+
position: relative;
|
|
96
|
+
z-index: 0;
|
|
97
|
+
margin: 0 auto;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
//*
|
|
103
|
+
// The container for all controls (range sliders) that can be used to
|
|
104
|
+
// manipulate the component.
|
|
105
|
+
|
|
106
|
+
.exploded__control-container {
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: flex-end;
|
|
109
|
+
margin: 3rem negative(default(spacing)) 0;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
//*
|
|
113
|
+
// A container for a single control that manipulates the component.
|
|
114
|
+
|
|
115
|
+
.exploded__control {
|
|
116
|
+
flex: 1 1 0;
|
|
117
|
+
margin-left: default(spacing);
|
|
118
|
+
|
|
119
|
+
&:first-child {
|
|
120
|
+
margin-left: 0;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
//*
|
|
127
|
+
// A single pane representing a DOM node in the source markup. These panes are
|
|
128
|
+
// absolutely positioned by the JavaScript part of this components and,
|
|
129
|
+
// likewise, are rotated in three-dimensional space as the user drags over the
|
|
130
|
+
// component.
|
|
131
|
+
|
|
132
|
+
.exploded__pane {
|
|
133
|
+
// position
|
|
134
|
+
position: absolute;
|
|
135
|
+
|
|
136
|
+
// box model
|
|
137
|
+
box-sizing: content-box;
|
|
138
|
+
|
|
139
|
+
// backdrop
|
|
140
|
+
@include default(border-radius);
|
|
141
|
+
background-color: rgba(ui-color(gray, darker), 0.6);
|
|
142
|
+
border: 1px solid rgba(ui-color(gray), 0.5);
|
|
143
|
+
|
|
144
|
+
// transition
|
|
145
|
+
transition: background 0.3s ease;
|
|
146
|
+
|
|
147
|
+
&:hover {
|
|
148
|
+
background-color: ui-color(blue);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
//*
|
|
153
|
+
// The JavaScript adds this state to panes that have been clicked/ tapped by
|
|
154
|
+
// the user. The actual representation of the active pane is deferred to other
|
|
155
|
+
// components (this is done by firing an event with a reference to this
|
|
156
|
+
// selected pane).
|
|
157
|
+
//
|
|
158
|
+
// @demo_type none
|
|
159
|
+
// @set_by Exploded.click
|
|
160
|
+
|
|
161
|
+
.exploded__pane--is-selected {
|
|
162
|
+
&, &:hover {
|
|
163
|
+
background: ui-color(blue, dark);
|
|
164
|
+
opacity: 1;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const classes = {
|
|
2
|
+
root: "field",
|
|
3
|
+
input: "field__input",
|
|
4
|
+
label: "label"
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
const states = {
|
|
8
|
+
root: { focused: `${classes.root}--is-focused` },
|
|
9
|
+
label: { focused: `${classes.label}--is-focused` }
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
var Field = {
|
|
13
|
+
init() {
|
|
14
|
+
$(document).on("focusin focusout", `.${classes.input}`, (event) => {
|
|
15
|
+
var method = event.type === "focusin" ? "add" : "remove",
|
|
16
|
+
label = document.querySelector(`[for=${event.target.id}]`);
|
|
17
|
+
|
|
18
|
+
event.target.parentNode.classList[method](states.root.focused);
|
|
19
|
+
label.classList[method](states.label.focused);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default Field;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
.field {
|
|
2
|
+
@include default(border-radius);
|
|
3
|
+
background-color: ui-color(gray, dark);
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
max-width: 100%;
|
|
7
|
+
padding: 0 half(default(spacing));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
$field--switch--size: multiply(1.5, default(spacing));
|
|
11
|
+
|
|
12
|
+
.field--switch {
|
|
13
|
+
padding: 0;
|
|
14
|
+
background-color: transparent;
|
|
15
|
+
position: relative;
|
|
16
|
+
|
|
17
|
+
> .label {
|
|
18
|
+
margin: 0;
|
|
19
|
+
padding-left: multiply(1.5, $field--switch--size);
|
|
20
|
+
position: relative;
|
|
21
|
+
line-height: $field--switch--size;
|
|
22
|
+
color: ui-color(gray, darkest);
|
|
23
|
+
|
|
24
|
+
&:after {
|
|
25
|
+
content: '';
|
|
26
|
+
display: block;
|
|
27
|
+
height: multiply($field--switch--size, 0.7);
|
|
28
|
+
width: multiply(0.3, $field--switch--size);
|
|
29
|
+
position: absolute;
|
|
30
|
+
top: half($field--switch--size);
|
|
31
|
+
left: half($field--switch--size);
|
|
32
|
+
border-bottom: 2px solid ui-color(blue, darker);
|
|
33
|
+
border-right: 2px solid ui-color(blue, darker);
|
|
34
|
+
transform: translate(-50%, -60%) rotate(45deg);
|
|
35
|
+
display: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&:before {
|
|
39
|
+
content: '';
|
|
40
|
+
display: block;
|
|
41
|
+
height: $field--switch--size;
|
|
42
|
+
width: $field--switch--size;
|
|
43
|
+
background: ui-color(gray);
|
|
44
|
+
position: absolute;
|
|
45
|
+
top: 0; left: 0;
|
|
46
|
+
@include default(border-radius);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
> .field__switch:checked + .label:before {
|
|
51
|
+
background: ui-color(blue);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
> .field__switch:checked + .label:after {
|
|
55
|
+
display: block;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
> .field__switch {
|
|
59
|
+
position: absolute;
|
|
60
|
+
top: 0;
|
|
61
|
+
left: 0;
|
|
62
|
+
opacity: 0.1;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
+ .field--switch {
|
|
66
|
+
margin-top: default(spacing);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.field__icon {
|
|
71
|
+
flex: 0 0 auto;
|
|
72
|
+
font-size: 0;
|
|
73
|
+
|
|
74
|
+
> .icon {
|
|
75
|
+
@include icon--recolor(gray, darker);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.field__input {
|
|
80
|
+
flex: 1 1 auto;
|
|
81
|
+
margin: 0;
|
|
82
|
+
padding: 0;
|
|
83
|
+
background: transparent;
|
|
84
|
+
border: none;
|
|
85
|
+
line-height: default(control-size);
|
|
86
|
+
font-size: 1.1rem;
|
|
87
|
+
@include type--default-font-family;
|
|
88
|
+
|
|
89
|
+
&::-webkit-input-placeholder {
|
|
90
|
+
color: rgba(ui-color(gray, darker), 0.5);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&::placeholder {
|
|
94
|
+
color: rgba(ui-color(gray, darker), 0.5);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&:focus {
|
|
98
|
+
outline: none;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//*
|
|
2
|
+
// @pattern Page Header
|
|
3
|
+
// @group Partials
|
|
4
|
+
//
|
|
5
|
+
// A group of headings and other page-level information that appears at the
|
|
6
|
+
// top of a given page or section.
|
|
7
|
+
//
|
|
8
|
+
// @since 1.0.0
|
|
9
|
+
|
|
10
|
+
//*
|
|
11
|
+
// @markup
|
|
12
|
+
// <header class="page-header">
|
|
13
|
+
// <div class="grid grid--vertically-centered">
|
|
14
|
+
// <div class="grid__item">
|
|
15
|
+
// <h1 class="type type--heading type--heading-1">The title</h1>
|
|
16
|
+
// </div>
|
|
17
|
+
//
|
|
18
|
+
// <div class="grid__item grid__item--no-flex">
|
|
19
|
+
// <button class="docks-button docks-button--dark">Action</button>
|
|
20
|
+
// </div>
|
|
21
|
+
// </div>
|
|
22
|
+
// </header>
|
|
23
|
+
|
|
24
|
+
.page-header {
|
|
25
|
+
background-color: ui-color(gray);
|
|
26
|
+
padding: default(spacing);
|
|
27
|
+
padding-bottom: default(spacing);
|
|
28
|
+
min-height: rem(66);
|
|
29
|
+
|
|
30
|
+
.type--heading-1 {
|
|
31
|
+
margin: -0.5em 0;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<%
|
|
2
|
+
iframe.configure do |config|
|
|
3
|
+
config.defaults(id: unique_iframe_id)
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
id = iframe.id
|
|
7
|
+
%>
|
|
8
|
+
|
|
9
|
+
<iframe class="iframe" data-iframe-id="<%= id %>" frameborder="0"></iframe>
|
|
10
|
+
<script class="iframe__content" type="text/iframe-content">
|
|
11
|
+
<%= CGI.escapeHTML(docks_demo(iframe.demo, id: id)) %>
|
|
12
|
+
</script>
|