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,47 @@
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
+ // Spinner styles
7
+
8
+
9
+ .ms-Spinner {
10
+ @include ms-baseFont;
11
+ position: relative;
12
+ height: 20px;
13
+
14
+ &.ms-Spinner--large {
15
+ height: 28px;
16
+
17
+ .ms-Spinner-label {
18
+ left: 34px;
19
+ top: 6px;
20
+ }
21
+ }
22
+ }
23
+
24
+ .ms-Spinner-circle {
25
+ position: absolute;
26
+ border-radius: 100px;
27
+ background-color: $ms-color-themePrimary;
28
+ opacity: 0;
29
+
30
+ @media screen and (-ms-high-contrast: active) {
31
+ background-color: $ms-color-white;
32
+ }
33
+
34
+ @media screen and (-ms-high-contrast: black-on-white) {
35
+ background-color: $ms-color-black;
36
+ }
37
+ }
38
+
39
+ .ms-Spinner-label {
40
+ @include ms-baseFont;
41
+ position: relative;
42
+ font-size: $ms-font-size-s;
43
+ font-weight: $ms-font-weight-regular;
44
+ color: $ms-color-themePrimary;
45
+ left: 28px;
46
+ top: 2px;
47
+ }
@@ -0,0 +1,122 @@
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
+ // Data table styles
7
+
8
+ .ms-Table {
9
+ @include ms-baseFont;
10
+ display: table;
11
+ width: 100%;
12
+ border-collapse: collapse;
13
+ }
14
+
15
+ // makes the table cells not expand with the content, keeping the table cells at a fixed size
16
+ .ms-Table--fixed {
17
+ table-layout: fixed;
18
+ }
19
+
20
+ .ms-Table tr,
21
+ .ms-Table-row {
22
+ display: table-row;
23
+ line-height: 30px;
24
+ font-weight: $ms-font-weight-semilight;
25
+ font-size: $ms-font-size-s;
26
+ color: $ms-color-neutralPrimary;
27
+
28
+ // Rows can be selected.
29
+ &.is-selected {
30
+ background-color: $ms-color-themeLight;
31
+
32
+ // A checkmark in a selected row.
33
+ .ms-Table-rowCheck {
34
+ background-color: $ms-color-themePrimary;
35
+
36
+ // Hide the checkbox.
37
+ &::before {
38
+ display: none;
39
+ }
40
+
41
+ // But show the mark.
42
+ &::after {
43
+ @include ms-Icon--CheckboxComposite;
44
+ color: $ms-color-white;
45
+ }
46
+ }
47
+ }
48
+ }
49
+
50
+ .ms-Table th,
51
+ .ms-Table td,
52
+ .ms-Table-cell {
53
+ display: table-cell;
54
+ padding: 0 10px;
55
+ }
56
+
57
+ // Style the first row as a header.
58
+ .ms-Table thead th,
59
+ .ms-Table-head {
60
+ font-weight: $ms-font-weight-semilight;
61
+ font-size: $ms-font-size-xs;
62
+ color: $ms-color-neutralSecondary;
63
+ }
64
+
65
+ .ms-Table thead,
66
+ .ms-Table-head {
67
+ td,
68
+ th,
69
+ .ms-Table-cell,
70
+ .ms-Table-rowCheck {
71
+ font-weight: normal;
72
+ text-align: left;
73
+ border-bottom: 1px solid $ms-color-neutralLight;
74
+ }
75
+ }
76
+
77
+ // On selectable tables, each row has a checkbox.
78
+ .ms-Table-rowCheck {
79
+ display: table-cell;
80
+ width: 20px;
81
+ position: relative;
82
+ padding: 0;
83
+
84
+ // Empty checkbox.
85
+ &::after {
86
+ @include ms-Icon;
87
+ @include ms-Icon--Checkbox;
88
+ color: $ms-color-neutralTertiary;
89
+ font-size: 12px;
90
+ position: absolute;
91
+ left: 4px;
92
+ top: 1px;
93
+ }
94
+ }
95
+
96
+ // A table with selectable rows
97
+ .ms-Table--selectable {
98
+ tr:hover,
99
+ .ms-Table-row:hover {
100
+ background-color: $ms-color-neutralLighter;
101
+ cursor: pointer;
102
+ outline: 1px solid transparent;
103
+ }
104
+ }
105
+
106
+ // All high contrast styling rules
107
+ @media screen and (-ms-high-contrast: active) {
108
+ .ms-Table-row {
109
+ // Rows can be selected.
110
+ &.is-selected {
111
+ // A checkmark in a selected row.
112
+ .ms-Table-rowCheck {
113
+ background: none;
114
+
115
+ // Show the checkbox.
116
+ &::before {
117
+ display: block;
118
+ }
119
+ }
120
+ }
121
+ }
122
+ }
@@ -0,0 +1,231 @@
1
+ // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information.
2
+
3
+ @import '../Label/Label';
4
+
5
+ //
6
+ // Office UI Fabric
7
+ // --------------------------------------------------
8
+ // Single line (input) and multiline (textarea) form field styles
9
+
10
+ .ms-TextField {
11
+ @include ms-baseFont;
12
+ @include ms-u-normalize;
13
+ color: $ms-color-neutralPrimary;
14
+ font-size: $ms-font-size-m;
15
+ font-weight: $ms-font-weight-regular;
16
+ margin-bottom: 8px;
17
+
18
+ .ms-Label {
19
+ font-size: $ms-font-size-m;
20
+ font-weight: $ms-font-weight-semibold;
21
+ }
22
+ }
23
+
24
+ //= State: A disabled textfield
25
+ .ms-TextField.is-disabled {
26
+ .ms-TextField-field {
27
+ background-color: $ms-color-neutralLighter;
28
+ border-color: $ms-color-neutralLighter;
29
+ pointer-events: none;
30
+ cursor: default;
31
+ }
32
+
33
+ @include input-placeholder {
34
+ color: $ms-color-neutralTertiary;
35
+ }
36
+ }
37
+
38
+ //= State: A required textfield
39
+ .ms-TextField.is-required {
40
+ .ms-Label {
41
+ @include ms-Label-is-required
42
+ }
43
+
44
+ @include input-placeholder {
45
+ @include ms-Label-is-required
46
+ }
47
+ }
48
+
49
+ //= State: An active textfield
50
+ .ms-TextField.is-active {
51
+ border-color: $ms-color-themePrimary;
52
+ }
53
+
54
+ .ms-TextField-field {
55
+ @include ms-u-normalize;
56
+ border: 1px solid $ms-color-neutralTertiaryAlt;
57
+ border-radius: 0;
58
+ font-weight: $ms-font-weight-semilight;
59
+ font-size: $ms-font-size-m;
60
+ color: $ms-color-neutralPrimary;
61
+ height: 32px;
62
+ padding: 6px 12px 7px;
63
+ width: 100%;
64
+ min-width: 180px;
65
+ outline: 0;
66
+ text-overflow: ellipsis;
67
+
68
+ &:hover {
69
+ border-color: $ms-color-neutralSecondaryAlt;
70
+ }
71
+
72
+ &:focus {
73
+ border-color: $ms-color-themePrimary;
74
+ }
75
+
76
+ &:hover,
77
+ &:focus {
78
+ @media screen and (-ms-high-contrast: active) {
79
+ border-color: $ms-color-contrastBlackSelected;
80
+ }
81
+
82
+ @media screen and (-ms-high-contrast: black-on-white) {
83
+ border-color: $ms-color-contrastWhiteSelected;
84
+ }
85
+ }
86
+
87
+ &[disabled] {
88
+ background-color: $ms-color-neutralLighter;
89
+ border-color: $ms-color-neutralLighter;
90
+ pointer-events: none;
91
+ cursor: default;
92
+ }
93
+
94
+ @include input-placeholder {
95
+ color: $ms-color-neutralSecondary;
96
+ }
97
+ }
98
+
99
+ .ms-TextField-description {
100
+ color: $ms-color-neutralSecondaryAlt;
101
+ font-size: $ms-font-size-xs;
102
+ }
103
+
104
+
105
+ //== Modifier: Single line (default), placeholder label
106
+ //
107
+ .ms-TextField.ms-TextField--placeholder {
108
+ position: relative;
109
+ background-color: $ms-color-white;
110
+
111
+ .ms-TextField-field {
112
+ position: relative;
113
+ background-color: transparent;
114
+ z-index: $ms-zIndex-middle;
115
+ }
116
+
117
+ .ms-Label {
118
+ position: absolute;
119
+ font-weight: $ms-font-weight-semilight;
120
+ font-size: $ms-font-size-m;
121
+ color: $ms-color-neutralSecondary;
122
+ padding: 6px 12px 7px;
123
+ pointer-events: none;
124
+ z-index: $ms-zIndex-back;
125
+ }
126
+
127
+ &.is-disabled {
128
+ color: $ms-color-neutralTertiary;
129
+
130
+ .ms-Label {
131
+ @include ms-Label-is-disabled;
132
+ }
133
+ }
134
+ }
135
+
136
+
137
+ //== Modifier: Single line (default), underlined
138
+ //
139
+ .ms-TextField.ms-TextField--underlined {
140
+ border-bottom: 1px solid $ms-color-neutralTertiaryAlt;
141
+ display: table;
142
+ width: 100%;
143
+ min-width: 180px;
144
+
145
+ &:hover {
146
+ border-color: $ms-color-neutralSecondaryAlt;
147
+
148
+ @media screen and (-ms-high-contrast: active) {
149
+ border-color: $ms-color-contrastBlackSelected;
150
+ }
151
+
152
+ @media screen and (-ms-high-contrast: black-on-white) {
153
+ border-color: $ms-color-contrastWhiteSelected;
154
+ }
155
+ }
156
+
157
+ &:active,
158
+ &:focus {
159
+ border-color: $ms-color-themePrimary;
160
+ }
161
+
162
+ .ms-Label {
163
+ font-size: $ms-font-size-m;
164
+ margin-right: 8px;
165
+ display: table-cell;
166
+ vertical-align: top;
167
+ padding-left: 12px;
168
+ padding-top: 9px;
169
+ height: 32px;
170
+ width: 1%;
171
+ white-space: nowrap;
172
+ }
173
+
174
+ .ms-TextField-field {
175
+ border: 0;
176
+ float: left;
177
+ display: table-cell;
178
+ text-align: left;
179
+ padding-top: 8px;
180
+ padding-bottom: 3px;
181
+
182
+ &:active,
183
+ &:focus,
184
+ &:hover {
185
+ outline: 0;
186
+ }
187
+ }
188
+
189
+ &.is-disabled {
190
+ border-bottom-color: $ms-color-neutralLight;
191
+
192
+ .ms-Label {
193
+ @include ms-Label-is-disabled;
194
+ }
195
+
196
+ .ms-TextField-field {
197
+ background-color: transparent;
198
+ color: $ms-color-neutralTertiary;
199
+ }
200
+ }
201
+
202
+ &.is-active {
203
+ border-color: $ms-color-themePrimary;
204
+
205
+ @media screen and (-ms-high-contrast: active) {
206
+ border-color: $ms-color-contrastBlackSelected;
207
+ }
208
+
209
+ @media screen and (-ms-high-contrast: black-on-white) {
210
+ border-color: $ms-color-contrastWhiteSelected;
211
+ }
212
+ }
213
+ }
214
+
215
+
216
+ //== Modifier: Multiline textfield
217
+ //
218
+ .ms-TextField.ms-TextField--multiline {
219
+ .ms-TextField-field {
220
+ @include ms-baseFont;
221
+ color: $ms-color-neutralSecondary;
222
+ font-family: $ms-font-family-base;
223
+ font-size: $ms-font-size-m;
224
+ font-weight: $ms-font-weight-regular;
225
+ line-height: 17px;
226
+ min-height: 60px;
227
+ min-width: 260px;
228
+ padding-top: 6px;
229
+ overflow: auto;
230
+ }
231
+ }
@@ -0,0 +1,248 @@
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
+ // Toggle styles
7
+
8
+
9
+ @import '../Label/Label.scss';
10
+
11
+ // Slider mixin
12
+ @mixin ms-Toggle-slider($direction) {
13
+ // Slider pseudo element
14
+ &::before {
15
+ position: absolute;
16
+ top: 3px;
17
+ width: 10px;
18
+ height: 10px;
19
+ border-radius: 10px;
20
+ content: '';
21
+ #{$direction}: 4px;
22
+ background-color: $ms-color-neutralSecondary;
23
+ outline: 1px solid transparent;
24
+ transition-property: background, left;
25
+ transition-duration: 250ms;
26
+ transition-timing-function: cubic-bezier(.4, 0, .23, 1);
27
+
28
+ @media screen and (-ms-high-contrast: active) {
29
+ border: 2.5px solid $ms-color-white;
30
+ height: 15px;
31
+ outline: 0;
32
+ }
33
+
34
+ @media screen and (-ms-high-contrast: black-on-white) {
35
+ border-color: $ms-color-black;
36
+ }
37
+ }
38
+
39
+ @if $direction == left {
40
+ &::before {
41
+ right: auto;
42
+ }
43
+ }
44
+
45
+ @if $direction == right {
46
+ &::before {
47
+ background-color: $ms-color-white;
48
+ left: 28px;
49
+ }
50
+ }
51
+ }
52
+
53
+ // Toggle
54
+ .ms-Toggle {
55
+ @include ms-baseFont;
56
+ @include ms-font-m;
57
+ @include ms-u-normalize;
58
+ position: relative;
59
+ display: block;
60
+ margin-bottom: 26px;
61
+
62
+ // Action label (on/off) on the right of the toggle
63
+ .ms-Label {
64
+ position: relative;
65
+ top: -2px;
66
+ padding: 0 0 0 50px;
67
+ }
68
+
69
+ // 'Off' state - slider on the left
70
+ & .ms-Toggle-field {
71
+ @include ms-Toggle-slider(left);
72
+
73
+ // Show the off label / hide the on label
74
+ .ms-Label--off {
75
+ display: block;
76
+ }
77
+
78
+ .ms-Label--on {
79
+ display: none;
80
+ }
81
+ }
82
+
83
+ // 'On' state - slider on the right
84
+ & .ms-Toggle-field.is-selected {
85
+ background-color: $ms-color-themePrimary;
86
+ border-color: $ms-color-themePrimary;
87
+
88
+ @include ms-Toggle-slider(right);
89
+
90
+ // Show the on label / hide the off label
91
+ .ms-Label--off {
92
+ display: none;
93
+ }
94
+
95
+ .ms-Label--on {
96
+ display: block;
97
+ }
98
+
99
+ @media screen and (-ms-high-contrast: active) {
100
+ background-color: $ms-color-white;
101
+ }
102
+
103
+ @media screen and (-ms-high-contrast: black-on-white) {
104
+ background-color: $ms-color-black;
105
+ }
106
+ }
107
+
108
+ &:focus,
109
+ &:hover {
110
+ & + .ms-Toggle-field {
111
+ border-color: $ms-color-neutralSecondary;
112
+ }
113
+
114
+ & + .ms-Toggle-field::before {
115
+ background-color: $ms-color-neutralPrimary;
116
+ }
117
+
118
+ &:checked + .ms-Toggle-field {
119
+ background-color: $ms-color-themeDarkAlt;
120
+ border-color: $ms-color-themeDarkAlt;
121
+ }
122
+
123
+ &:checked + .ms-Toggle-field::before {
124
+ background-color: $ms-color-white;
125
+ }
126
+ }
127
+
128
+ &:active {
129
+ &:checked + .ms-Toggle-field {
130
+ background-color: $ms-color-themeDark;
131
+ border-color: $ms-color-themeDark;
132
+ }
133
+ }
134
+
135
+ .ms-Toggle-field {
136
+ &:focus,
137
+ &:hover {
138
+ border-color: $ms-color-neutralPrimary;
139
+ }
140
+
141
+ &.is-selected {
142
+ &:focus,
143
+ &:hover {
144
+ background-color: $ms-color-themeDarkAlt;
145
+ border-color: $ms-color-themeDarkAlt;
146
+ }
147
+ }
148
+
149
+ .ms-Label {
150
+ color: $ms-color-black;
151
+ user-select: none;
152
+ }
153
+
154
+ &:hover {
155
+ .ms-Label {
156
+ color: $ms-color-black;
157
+ }
158
+ }
159
+
160
+ &:active {
161
+ .ms-Label {
162
+ color: $ms-color-neutralPrimary;
163
+ }
164
+ }
165
+ }
166
+
167
+ // Disabled state
168
+ &.is-disabled {
169
+ .ms-Label {
170
+ @include ms-Label-is-disabled;
171
+ }
172
+
173
+ .ms-Toggle-field {
174
+ background-color: $ms-color-white;
175
+ border-color: $ms-color-neutralTertiaryAlt;
176
+ pointer-events: none;
177
+ cursor: default;
178
+
179
+ &::before {
180
+ background-color: $ms-color-neutralTertiaryAlt;
181
+ }
182
+ }
183
+
184
+ .ms-Toggle-field,
185
+ .ms-Toggle-field::before {
186
+ @media screen and (-ms-high-contrast: active) {
187
+ border-color: $ms-color-contrastBlackDisabled;
188
+ }
189
+
190
+ @media screen and (-ms-high-contrast: black-on-white) {
191
+ border-color: $ms-color-contrastWhiteDisabled;
192
+ }
193
+ }
194
+ }
195
+ }
196
+
197
+ // Description text
198
+ .ms-Toggle-description {
199
+ position: relative;
200
+ font-size: $ms-font-size-m;
201
+ vertical-align: top;
202
+ display: block;
203
+ margin-bottom: 8px;
204
+ }
205
+
206
+ // Toggle input field
207
+ .ms-Toggle-field {
208
+ position: relative;
209
+ display: inline-block;
210
+ width: 45px;
211
+ height: 20px;
212
+ box-sizing: border-box;
213
+ border: 2px solid $ms-color-neutralTertiary;
214
+ border-radius: 20px;
215
+ cursor: pointer;
216
+ transition-property: background, left, border-color;
217
+ transition-duration: 250ms;
218
+ transition-timing-function: cubic-bezier(.4, 0, .23, 1);
219
+ outline: 0;
220
+
221
+ &:hover,
222
+ &:focus {
223
+ border-color: $ms-color-neutralSecondary;
224
+ }
225
+ }
226
+
227
+ // On/Off slide states
228
+ .ms-Toggle-input {
229
+ display: none;
230
+ }
231
+
232
+ //== Modifier: Toggle with description text left
233
+ //
234
+ .ms-Toggle.ms-Toggle--textLeft {
235
+ width: 225px;
236
+ margin-bottom: 40px;
237
+
238
+ .ms-Toggle-description {
239
+ display: inline-block;
240
+ max-width: 150px;
241
+ top: -3px;
242
+ margin-bottom: 0;
243
+ }
244
+
245
+ .ms-Toggle-field {
246
+ float: right;
247
+ }
248
+ }