office-ui-fabric-js-rails 1.0.0.0

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.
Files changed (57) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +5 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE +21 -0
  7. data/README.md +76 -0
  8. data/Rakefile +24 -0
  9. data/bin/console +14 -0
  10. data/bin/setup +8 -0
  11. data/bower.json +7 -0
  12. data/lib/office-ui-fabric-js-rails.rb +2 -0
  13. data/lib/office-ui-fabric-js-rails/engine.rb +6 -0
  14. data/lib/office-ui-fabric-js-rails/version.rb +6 -0
  15. data/office-ui-fabric-js-rails.gemspec +36 -0
  16. data/vendor/assets/css/fabric.components.css +6187 -0
  17. data/vendor/assets/css/fabric.components.min.css +6 -0
  18. data/vendor/assets/css/fabric.components.rtl.css +6049 -0
  19. data/vendor/assets/css/fabric.components.rtl.min.css +6 -0
  20. data/vendor/assets/scss/components/Breadcrumb.scss +173 -0
  21. data/vendor/assets/scss/components/Button.scss +285 -0
  22. data/vendor/assets/scss/components/Callout.scss +156 -0
  23. data/vendor/assets/scss/components/CheckBox.scss +171 -0
  24. data/vendor/assets/scss/components/ChoiceFieldGroup.scss +12 -0
  25. data/vendor/assets/scss/components/CommandBar.scss +137 -0
  26. data/vendor/assets/scss/components/CommandButton.scss +292 -0
  27. data/vendor/assets/scss/components/ContextualHost.scss +139 -0
  28. data/vendor/assets/scss/components/ContextualMenu.scss +207 -0
  29. data/vendor/assets/scss/components/DatePicker.scss +526 -0
  30. data/vendor/assets/scss/components/DetailsList.scss +336 -0
  31. data/vendor/assets/scss/components/Dialog.scss +117 -0
  32. data/vendor/assets/scss/components/DialogHost.scss +11 -0
  33. data/vendor/assets/scss/components/Dropdown.scss +239 -0
  34. data/vendor/assets/scss/components/FacePile.scss +103 -0
  35. data/vendor/assets/scss/components/Label.scss +36 -0
  36. data/vendor/assets/scss/components/Link.scss +30 -0
  37. data/vendor/assets/scss/components/List.scss +15 -0
  38. data/vendor/assets/scss/components/ListItem.scss +236 -0
  39. data/vendor/assets/scss/components/MessageBanner.scss +127 -0
  40. data/vendor/assets/scss/components/MessageBar.scss +86 -0
  41. data/vendor/assets/scss/components/OrgChart.scss +45 -0
  42. data/vendor/assets/scss/components/Overlay.scss +33 -0
  43. data/vendor/assets/scss/components/Panel.scss +154 -0
  44. data/vendor/assets/scss/components/PanelHost.scss +14 -0
  45. data/vendor/assets/scss/components/PeoplePicker.scss +454 -0
  46. data/vendor/assets/scss/components/Persona.scss +730 -0
  47. data/vendor/assets/scss/components/PersonaCard.scss +207 -0
  48. data/vendor/assets/scss/components/Pivot.scss +200 -0
  49. data/vendor/assets/scss/components/ProgressIndicator.scss +63 -0
  50. data/vendor/assets/scss/components/RadioButton.scss +193 -0
  51. data/vendor/assets/scss/components/SearchBox.scss +368 -0
  52. data/vendor/assets/scss/components/Spinner.scss +47 -0
  53. data/vendor/assets/scss/components/Table.scss +122 -0
  54. data/vendor/assets/scss/components/TextField.scss +231 -0
  55. data/vendor/assets/scss/components/Toggle.scss +248 -0
  56. data/vendor/assets/scss/fabric.components.scss +1 -0
  57. metadata +184 -0
@@ -0,0 +1,292 @@
1
+ // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information.
2
+
3
+ //
4
+ // Office UI Fabric
5
+ // --------------------------------------------------
6
+ // Button styles
7
+
8
+ $CommandButton-height: 40px;
9
+ $CommandButton-md-height: 44px;
10
+ $CommandButton-padding: 8px;
11
+ $CommandButtonIcon-size: 16px;
12
+ $CommandButtonIcon-md-size: 20px;
13
+
14
+ .ms-CommandButton {
15
+ @include ms-baseFont;
16
+ display: inline-block;
17
+ position: relative;
18
+ vertical-align: top;
19
+
20
+ &.is-hidden {
21
+ display: none;
22
+ }
23
+
24
+ &:disabled,
25
+ &.is-disabled {
26
+ .ms-CommandButton-button {
27
+ cursor: default;
28
+
29
+ &:hover {
30
+ background-color: $ms-color-themeLighterAlt;
31
+ }
32
+
33
+ .ms-CommandButton-label {
34
+ color: $ms-color-neutralTertiary;
35
+ }
36
+
37
+ .ms-CommandButton-icon {
38
+ color: $ms-color-neutralTertiary;
39
+ }
40
+ }
41
+ }
42
+
43
+ .ms-ContextualMenu {
44
+ display: none;
45
+ }
46
+ }
47
+
48
+ //== Mixins: Base button, focus, and icon alignments
49
+ //
50
+ @mixin ms-CommandButton-iconBase {
51
+ position: absolute;
52
+ top: 50%;
53
+ left: 50%;
54
+ transform: translate(-50%, -50%);
55
+ }
56
+
57
+ @mixin ms-CommandBar-focusRectangle {
58
+ top: 3px;
59
+ left: 3px;
60
+ right: 3px;
61
+ bottom: 3px;
62
+ border: 1px solid $ms-color-neutralPrimary;
63
+ position: absolute;
64
+ z-index: 10;
65
+ content: '';
66
+ outline: none;
67
+ }
68
+
69
+ @mixin ms-CommandBarButton-buttonBase {
70
+ @include ms-u-normalize;
71
+ color: $ms-color-neutralPrimary;
72
+ font-size: $ms-font-size-m;
73
+ font-weight: $ms-font-weight-regular;
74
+ // background-color: $ms-color-themeLighterAlt;
75
+ // border: 1px solid $ms-color-themeLighterAlt;
76
+ cursor: pointer;
77
+ display: inline-block;
78
+ height: $CommandButton-height;
79
+ line-height: $CommandButton-height;
80
+ outline: 1px solid transparent;
81
+ padding: 0 $CommandButton-padding;
82
+ position: relative;
83
+ vertical-align: top;
84
+ background: transparent;
85
+
86
+ &:hover {
87
+ background-color: $ms-color-neutralLight;
88
+
89
+ .ms-CommandButton-label {
90
+ color: $ms-color-neutralDark;
91
+ }
92
+ }
93
+
94
+ &:active {
95
+ background-color: $ms-color-neutralLight;
96
+ }
97
+
98
+ &:focus::before {
99
+ @include ms-CommandBar-focusRectangle;
100
+ }
101
+
102
+ &:focus {
103
+ outline: 0;
104
+ }
105
+
106
+ @media only screen and (max-width: $ms-screen-md-max) {
107
+ height: $CommandButton-md-height;
108
+
109
+ .ms-CommandButton-icon {
110
+ font-size: $CommandButtonIcon-md-size;
111
+ }
112
+
113
+ .ms-CommandButton-label {
114
+ line-height: $CommandButton-md-height;
115
+ }
116
+ }
117
+ }
118
+
119
+ .ms-CommandButton-button,
120
+ .ms-CommandButton-splitIcon {
121
+ @include ms-CommandBarButton-buttonBase;
122
+ }
123
+
124
+ .ms-CommandButton-button {
125
+ border: 0;
126
+ margin: 0;
127
+ }
128
+
129
+ // Add space between adjacent command buttons.
130
+ .ms-CommandButton + .ms-CommandButton {
131
+ margin-left: 8px;
132
+
133
+ @media only screen and (max-width: $ms-screen-md-max) {
134
+ margin-left: 4px;
135
+ }
136
+ }
137
+
138
+ .ms-CommandButton-icon {
139
+ display: inline-block;
140
+ margin-right: $CommandButton-padding;
141
+ position: relative;
142
+ font-size: $CommandButtonIcon-size;
143
+ min-width: 16px;
144
+ height: 100%;
145
+
146
+ .ms-Icon {
147
+ @include ms-CommandButton-iconBase;
148
+ }
149
+ }
150
+
151
+ .ms-CommandButton-label {
152
+ font-size: $ms-font-size-m;
153
+ font-weight: $ms-font-weight-regular;
154
+ color: $ms-color-neutralPrimary;
155
+ line-height: $CommandButton-height;
156
+ height: 100%;
157
+ display: inline-block;
158
+ vertical-align: top;
159
+
160
+ &:hover {
161
+ color: $ms-color-neutralDark;
162
+ }
163
+ }
164
+
165
+ .ms-CommandButton-dropdownIcon,
166
+ .ms-CommandButton-splitIcon {
167
+ display: inline-block;
168
+ position: relative;
169
+ color: $ms-color-neutralPrimary;
170
+ font-size: $ms-font-size-s;
171
+ font-weight: $ms-font-weight-semilight;
172
+ min-width: 12px;
173
+ height: 100%;
174
+ vertical-align: top;
175
+ margin-left: 8px;
176
+
177
+ .ms-Icon {
178
+ line-height: normal;
179
+ padding-top: $CommandButton-padding * 2;
180
+ }
181
+
182
+ &:focus::before {
183
+ @include ms-CommandBar-focusRectangle;
184
+ }
185
+
186
+ @media only screen and (max-width: $ms-screen-md-max) {
187
+ display: none;
188
+ }
189
+ }
190
+
191
+ .ms-CommandButton-splitIcon {
192
+ margin-left: -2px;
193
+ width: 27px;
194
+ border: 0;
195
+
196
+ .ms-Icon {
197
+ margin-left: -1px;
198
+ position: relative;
199
+ padding-top: 16px;
200
+
201
+ &::after {
202
+ position: absolute;
203
+ content: ' ';
204
+ width: 1px;
205
+ height: 16px;
206
+ top: 12px;
207
+ left: -8px;
208
+ border-left: 1px solid $ms-color-neutralTertiaryAlt;
209
+ }
210
+ }
211
+ }
212
+
213
+ //= Modifier: No Label modifier
214
+ //
215
+ .ms-CommandButton.ms-CommandButton--noLabel {
216
+ .ms-CommandButton-icon {
217
+ margin-right: 0;
218
+ }
219
+
220
+ .ms-CommandButton-label {
221
+ display: none;
222
+ }
223
+
224
+ .ms-CommandButton-button {
225
+ padding: 0 12px;
226
+ }
227
+ }
228
+
229
+ //= Modifier: Inline modifier
230
+ //
231
+ .ms-CommandButton.ms-CommandButton--inline {
232
+ .ms-CommandButton-button {
233
+ background: none;
234
+ }
235
+ }
236
+
237
+ //= Modifier: Action Button modifier
238
+ //
239
+ .ms-CommandButton.ms-CommandButton--actionButton {
240
+ .ms-CommandButton-button {
241
+ width: 50px;
242
+ height: $CommandButton-height;
243
+ }
244
+
245
+ .ms-CommandButton-icon {
246
+ position: absolute;
247
+ top: 50%;
248
+ left: 50%;
249
+ transform: translate(-50%, -50%);
250
+ width: 16px;
251
+ height: 16px;
252
+ padding-right: 0;
253
+ }
254
+ }
255
+
256
+ @mixin ms-CommandButton-pivotLine {
257
+ content: '';
258
+ height: 2px;
259
+ position: absolute;
260
+ left: 0;
261
+ right: 0;
262
+ background-color: $ms-color-themePrimary;
263
+ bottom: 0;
264
+ z-index: $ms-zIndex-middle;
265
+ }
266
+
267
+ //= Modifier: Pivot Button modifier
268
+ //
269
+ .ms-CommandButton.ms-CommandButton--pivot {
270
+
271
+ &.is-active::before {
272
+ @include ms-CommandButton-pivotLine;
273
+ }
274
+
275
+ &:hover {
276
+ &::before {
277
+ @include ms-CommandButton-pivotLine;
278
+ }
279
+ }
280
+ }
281
+
282
+ .ms-CommandButton.ms-CommandButton--textOnly,
283
+ .ms-CommandButton.ms-CommandButton--pivot {
284
+
285
+ .ms-CommandButton-label {
286
+ display: inline-block;
287
+
288
+ @media only screen and (max-width: $ms-screen-sm-max) {
289
+ font-size: 16px;
290
+ }
291
+ }
292
+ }
@@ -0,0 +1,139 @@
1
+ .ms-ContextualHost {
2
+ @include ms-baseFont;
3
+ z-index: $ms-zIndex-front;
4
+ margin: 16px auto;
5
+ position: relative;
6
+ min-width: 10px;
7
+ display: none;
8
+ background-color: $ms-color-white;
9
+ @include drop-shadow;
10
+
11
+ &.is-positioned {
12
+ position: absolute;
13
+ margin: 0;
14
+ }
15
+
16
+ &.is-open {
17
+ display: inline-block;
18
+ }
19
+ }
20
+
21
+ // Mixin for arrow size and color
22
+ @mixin arrowBorders($ms-color-top, $ms-color-right, $ms-color-bottom, $ms-color-left) {
23
+ border-top: 10px solid $ms-color-top;
24
+ border-right: 10px solid $ms-color-right;
25
+ border-bottom: 10px solid $ms-color-bottom;
26
+ border-left: 10px solid $ms-color-left;
27
+ }
28
+
29
+ .ms-ContextualHost-beak {
30
+ box-shadow: 0 0 15px -5px $ms-color-neutralPrimaryAlt;
31
+ position: absolute;
32
+ width: 28px;
33
+ height: 28px;
34
+ background: $ms-color-white;;
35
+ border: 1px solid $ms-color-neutralLight;
36
+ box-sizing: border-box;
37
+ top: -6px;
38
+ display: none;
39
+ -webkit-transform: rotate(45deg);
40
+ transform: rotate(45deg);
41
+ z-index: $ms-zIndex-back;
42
+ outline: 1px solid transparent;
43
+ }
44
+
45
+ //= Modifier: ContextualHost with left and right arrows
46
+ //
47
+ .ms-ContextualHost.ms-ContextualHost--arrowLeft,
48
+ .ms-ContextualHost.ms-ContextualHost--arrowRight {
49
+ .ms-ContextualHost-beak {
50
+ top: 40px;
51
+ display: none; // Hide left and right arrows on sm screens
52
+ }
53
+ }
54
+
55
+ .ms-ContextualHost.ms-ContextualHost--arrowLeft {
56
+ .ms-ContextualHost-beak {
57
+ left: -10px;
58
+ }
59
+ }
60
+
61
+ .ms-ContextualHost.ms-ContextualHost--arrowRight {
62
+ .ms-ContextualHost-beak {
63
+ right: -10px;
64
+ }
65
+ }
66
+
67
+ .ms-ContextualHost.ms-ContextualHost--arrowTop {
68
+ .ms-ContextualHost-beak {
69
+ top: -10px;
70
+ }
71
+ }
72
+
73
+ .ms-ContextualHost.ms-ContextualHost--arrowBottom {
74
+ .ms-ContextualHost-beak {
75
+ bottom: -10px;
76
+ }
77
+ }
78
+
79
+ // The actual ContextualHost element
80
+ .ms-ContextualHost-main {
81
+ position: relative;
82
+ background-color: $ms-color-white;
83
+ box-sizing: border-box;
84
+ outline: 1px solid transparent;
85
+ z-index: $ms-zIndex-middle;
86
+ min-height: 10px;
87
+ }
88
+
89
+ .ms-ContextualHost-close {
90
+ margin: 0;
91
+ border: 0;
92
+ background: none;
93
+ cursor: pointer;
94
+ position: absolute;
95
+ top: 12px;
96
+ right: 12px;
97
+ padding: 8px;
98
+ width: 32px;
99
+ height: 32px;
100
+ font-size: $ms-font-size-m;
101
+ color: $ms-color-neutralSecondary;
102
+ z-index: $ms-zIndex-front;
103
+ }
104
+
105
+ //= Modifier: Close button ContextualHost
106
+ //
107
+ .ms-ContextualHost.ms-ContextualHost--close {
108
+ .ms-ContextualHost-title {
109
+ margin-right: 20px; // Avoid overlap with close button
110
+ }
111
+ }
112
+
113
+ //= Modifier: Close button ContextualHost
114
+ //
115
+
116
+ .ms-ContextualHost.ms-ContextualHost--primaryArrow {
117
+ .ms-ContextualHost-beak {
118
+ background-color: $ms-color-themePrimary;
119
+ }
120
+ }
121
+
122
+ @media (min-width: $ms-screen-md-min) {
123
+ // Make width larger and remove centering on md+ screens
124
+ .ms-ContextualHost {
125
+ margin: 16px;
126
+
127
+ &.is-positioned {
128
+ margin: 0;
129
+ }
130
+ }
131
+
132
+ // Show arrows right and left
133
+ .ms-ContextualHost.ms-ContextualHost--arrowRight,
134
+ .ms-ContextualHost.ms-ContextualHost--arrowLeft {
135
+ .ms-ContextualHost-beak {
136
+ display: block;
137
+ }
138
+ }
139
+ }
@@ -0,0 +1,207 @@
1
+ // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information.
2
+
3
+ //
4
+ // Office UI Fabric
5
+ // --------------------------------------------------
6
+ // Contextual Menu styles
7
+
8
+ .ms-ContextualMenu {
9
+ @include ms-baseFont;
10
+ @include ms-u-normalize;
11
+ color: $ms-color-neutralPrimary;
12
+ font-size: $ms-font-size-m;
13
+ font-weight: $ms-font-weight-regular;
14
+ display: block;
15
+ min-width: 180px;
16
+ max-width: 220px;
17
+ list-style-type: none;
18
+ position: relative;
19
+ background-color: $ms-color-white;
20
+
21
+ &.is-hidden {
22
+ display: none;
23
+ }
24
+ }
25
+
26
+ .ms-ContextualMenu-item {
27
+ position: relative;
28
+ }
29
+
30
+ .ms-ContextualMenu-link {
31
+ @include ms-u-borderBox;
32
+ text-decoration: none;
33
+ color: $ms-color-neutralPrimary;
34
+ border: 1px solid transparent;
35
+ cursor: pointer;
36
+ display: block;
37
+ height: 36px;
38
+ overflow: hidden;
39
+ line-height: 34px;
40
+ padding: 0 16px 0 25px;
41
+ position: relative;
42
+ text-overflow: ellipsis;
43
+ white-space: nowrap;
44
+
45
+ &:hover,
46
+ &:active,
47
+ &:focus {
48
+ background-color: $ms-color-neutralLighter;
49
+ color: $ms-color-neutralDark;
50
+
51
+ .ms-ContextualMenu-subMenuIcon {
52
+ color: $ms-color-neutralDark;
53
+ }
54
+ }
55
+
56
+ &:focus {
57
+ outline: transparent;
58
+ border: 1px solid $ms-color-neutralSecondary;
59
+ }
60
+
61
+ &.is-selected {
62
+ background-color: $ms-color-neutralQuaternaryAlt;
63
+ color: $ms-color-black;
64
+ font-weight: $ms-font-weight-semibold;
65
+
66
+ ~.ms-ContextualMenu-subMenuIcon {
67
+ color: $ms-color-black;
68
+ }
69
+
70
+ &:hover {
71
+ background-color: $ms-color-neutralQuaternary;
72
+ }
73
+ }
74
+
75
+ &.is-disabled {
76
+ color: $ms-color-neutralTertiary;
77
+ background-color: $ms-color-white;
78
+ pointer-events: none;
79
+
80
+ &:active,
81
+ &:focus {
82
+ border-color: $ms-color-white;
83
+ }
84
+
85
+ .ms-Icon {
86
+ color: $ms-color-neutralTertiary;
87
+ pointer-events: none;
88
+ cursor: default;
89
+ }
90
+ }
91
+ }
92
+
93
+ // Modifier: Menu item Dividers
94
+ .ms-ContextualMenu-item.ms-ContextualMenu-item--divider {
95
+ cursor: default;
96
+ display: block;
97
+ height: 1px;
98
+ background-color: $ms-color-neutralLight;
99
+ position: relative;
100
+ }
101
+
102
+ // Modifier: Menu item Headers
103
+ .ms-ContextualMenu-item.ms-ContextualMenu-item--header {
104
+ color: $ms-color-themePrimary;
105
+ font-size: $ms-font-size-s;
106
+ text-transform: uppercase;
107
+ height: 36px;
108
+ line-height: 36px;
109
+ padding: 0 18px;
110
+ }
111
+
112
+ // Modifier: Contextual menu with submenu
113
+ .ms-ContextualMenu-item.ms-ContextualMenu-item--hasMenu .ms-ContextualMenu {
114
+ position: absolute;
115
+ top: -1px;
116
+ left: 178px; // Move the submenu to the left of the menu item that triggered it
117
+ }
118
+
119
+ // Right chevron.
120
+ // Note: The .ms-ContextualMenu-caretRight class has been deprecated.
121
+ // Please use .ms-ContextualMenu-subMenuIcon.
122
+ .ms-ContextualMenu-subMenuIcon,
123
+ .ms-ContextualMenu-caretRight {
124
+ color: $ms-color-neutralPrimary;
125
+ font-size: 8px;
126
+ font-weight: 600;
127
+ width: 24px;
128
+ height: 36px;
129
+ line-height: 36px;
130
+ position: absolute;
131
+ text-align: center;
132
+ top: 0;
133
+ right: 0;
134
+ z-index: 1;
135
+ pointer-events: none;
136
+ }
137
+
138
+ //== Modifier: Multi-select menu
139
+ //
140
+ .ms-ContextualMenu.ms-ContextualMenu--multiselect {
141
+
142
+ // Align the header with the items
143
+ .ms-ContextualMenu-item.ms-ContextualMenu-item--header {
144
+ padding: 0 16px 0 26px;
145
+ }
146
+
147
+ .ms-ContextualMenu-link {
148
+
149
+ // Multi-select checkmark
150
+ &.is-selected {
151
+ background-color: $ms-color-white;
152
+ font-weight: $ms-font-weight-semibold;
153
+ color: $ms-color-neutralPrimary;
154
+
155
+ // Checkmark
156
+ &::after {
157
+ @include ms-Icon;
158
+ color: $ms-color-neutralPrimary;
159
+ content: '\E73E';
160
+ font-size: $ms-icon-size-xs;
161
+ font-weight: 800;
162
+ height: 36px;
163
+ line-height: 36px;
164
+ position: absolute;
165
+ left: 7px;
166
+ }
167
+
168
+ &:hover,
169
+ &:focus {
170
+ color: $ms-color-neutralDark;
171
+ background-color: $ms-color-neutralLighter;
172
+
173
+ &::after {
174
+ color: $ms-color-neutralDark;
175
+ }
176
+ }
177
+
178
+ &:active {
179
+ color: $ms-color-black;
180
+ background-color: $ms-color-neutralQuaternary;
181
+
182
+ &::after {
183
+ color: $ms-color-black;
184
+ }
185
+ }
186
+ }
187
+ }
188
+ }
189
+
190
+ .ms-ContextualMenu.ms-ContextualMenu--hasIcons,
191
+ .ms-ContextualMenu.ms-ContextualMenu--hasChecks {
192
+ .ms-ContextualMenu-link {
193
+ padding-left: 40px;
194
+ }
195
+
196
+ .ms-Icon {
197
+ position: absolute;
198
+ top: 50%;
199
+ transform: translateY(-50%);
200
+ width: 40px;
201
+ text-align: center;
202
+ }
203
+ }
204
+
205
+ .ms-ContextualMenu.ms-ContextualMenu--hasIcons {
206
+ width: 220px;
207
+ }