matchbox_rails 0.1.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.
- checksums.yaml +7 -0
- data/.gitignore +15 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +65 -0
- data/Rakefile +6 -0
- data/app/assets/stylesheets/matchbox.scss +563 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/matchbox_rails/engine.rb +4 -0
- data/lib/matchbox_rails/version.rb +3 -0
- data/lib/matchbox_rails.rb +7 -0
- data/matchbox_rails.gemspec +32 -0
- metadata +102 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2bc543f8c05d2f7c158ec1204e446641f911a7524ddeb2046bf739f65aa73b07
|
4
|
+
data.tar.gz: '03939922c8f0e27d9e1fb253a303dca73c9f5060ef7190fc50cb3538d136979a'
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fb3259fc325319fa1cacf531f039acdee2cd72edd22af6ac97e2ffe1b9c52916163488b6d0f77f57907bddebf0bd1a08b6046d696f30135ba215aa448f29b486
|
7
|
+
data.tar.gz: 5ff5a3d0464a096a35a45f0c7451c5fa5fddf74fdf83f5680a4dc1a94f9d9e006c2e6f7b9483dea9aa746f5638c474fde20deca4da5c02eead84b40e6aeb4c83
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2022 AM
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
# Matchbox for Rails
|
2
|
+
Matchbox design tokens for Rails applications.
|
3
|
+
|
4
|
+
This gem is based on: [matchbox](https://github.com/SparkPost/matchbox)
|
5
|
+
Matchbox is an open source design system and React component library, built for
|
6
|
+
[SparkPost's UI](https://github.com/SparkPost/2web2ui)
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Add this line to your application's Gemfile:
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
gem 'matchbox_rails'
|
14
|
+
```
|
15
|
+
|
16
|
+
And then execute:
|
17
|
+
|
18
|
+
$ bundle
|
19
|
+
|
20
|
+
Or install it yourself as:
|
21
|
+
|
22
|
+
$ gem install matchbox_rails
|
23
|
+
|
24
|
+
## Usage
|
25
|
+
|
26
|
+
After installing the gem you can add this line to your application.scss file:
|
27
|
+
|
28
|
+
```scss
|
29
|
+
@import "matchbox";
|
30
|
+
```
|
31
|
+
|
32
|
+
Now you can use the design tokens of Matchbox as SCSS variables.
|
33
|
+
|
34
|
+
```scss
|
35
|
+
.my-element {
|
36
|
+
background: color(blue, 700);
|
37
|
+
box-shadow: box-shadow(400);
|
38
|
+
}
|
39
|
+
```
|
40
|
+
|
41
|
+
## Development
|
42
|
+
|
43
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests.
|
44
|
+
|
45
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
46
|
+
|
47
|
+
If you want to use the gem in development as part of your Rails application locally you can add it to your gemfile:
|
48
|
+
|
49
|
+
`gem 'matchbox_rails', path: '/yourpath/matchbox_rails'`
|
50
|
+
|
51
|
+
## Publish
|
52
|
+
|
53
|
+
To publish a new version of this gem you need to be part of the TFE Engineering Team.
|
54
|
+
|
55
|
+
First build the gem `gem build matchbox_rails.gemspec`
|
56
|
+
|
57
|
+
Then use ``
|
58
|
+
|
59
|
+
## Contributing
|
60
|
+
|
61
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/sparkpost/matchbox_rails.
|
62
|
+
|
63
|
+
## License
|
64
|
+
|
65
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1,563 @@
|
|
1
|
+
/**
|
2
|
+
* Do not edit directly
|
3
|
+
*/
|
4
|
+
|
5
|
+
$border-radius-0: 0 !default;
|
6
|
+
$border-radius-100: 1px !default;
|
7
|
+
$border-radius-200: 2px !default;
|
8
|
+
$border-radius-pill: 9999em !default;
|
9
|
+
$border-radius-circle: 50% !default;
|
10
|
+
$border-width-0: 0 !default;
|
11
|
+
$border-width-100: 1px !default;
|
12
|
+
$border-width-200: 2px !default;
|
13
|
+
$color-brand-orange: #fa6423 !default;
|
14
|
+
$color-brand-gray: #55555a !default;
|
15
|
+
$color-brand-blue: #37aadc !default;
|
16
|
+
$color-yellow-100: #fffadb !default;
|
17
|
+
$color-yellow-200: #fff4b5 !default;
|
18
|
+
$color-yellow-300: #ffe75c !default;
|
19
|
+
$color-yellow-400: #ffda00 !default;
|
20
|
+
$color-yellow-500: #e3ad0b !default;
|
21
|
+
$color-yellow-600: #b58c12 !default;
|
22
|
+
$color-yellow-700: #876a2f !default;
|
23
|
+
$color-yellow-800: #614d27 !default;
|
24
|
+
$color-yellow-900: #523e21 !default;
|
25
|
+
$color-yellow-1000: #3d3121 !default;
|
26
|
+
$color-green-100: #e8fff7 !default;
|
27
|
+
$color-green-200: #d6fff1 !default;
|
28
|
+
$color-green-300: #b5f5e0 !default;
|
29
|
+
$color-green-400: #8debcb !default;
|
30
|
+
$color-green-500: #52d9ac !default;
|
31
|
+
$color-green-600: #28bd8b !default;
|
32
|
+
$color-green-700: #009f6a !default;
|
33
|
+
$color-green-800: #067852 !default;
|
34
|
+
$color-green-900: #1b5441 !default;
|
35
|
+
$color-green-1000: #233b33 !default;
|
36
|
+
$color-teal-100: #e3ffff !default;
|
37
|
+
$color-teal-200: #ccffff !default;
|
38
|
+
$color-teal-300: #96feff !default;
|
39
|
+
$color-teal-400: #6ef4f5 !default;
|
40
|
+
$color-teal-500: #37e4e6 !default;
|
41
|
+
$color-teal-600: #13bebf !default;
|
42
|
+
$color-teal-700: #199091 !default;
|
43
|
+
$color-teal-800: #226363 !default;
|
44
|
+
$color-teal-900: #274c4d !default;
|
45
|
+
$color-teal-1000: #223a3b !default;
|
46
|
+
$color-blue-100: #f2f8ff !default;
|
47
|
+
$color-blue-200: #e8f3ff !default;
|
48
|
+
$color-blue-300: #cce3ff !default;
|
49
|
+
$color-blue-400: #abd2ff !default;
|
50
|
+
$color-blue-500: #78b6ff !default;
|
51
|
+
$color-blue-600: #429bff !default;
|
52
|
+
$color-blue-700: #1273e6 !default;
|
53
|
+
$color-blue-800: #0060cc !default;
|
54
|
+
$color-blue-900: #1a497d !default;
|
55
|
+
$color-blue-1000: #203752 !default;
|
56
|
+
$color-purple-100: #f9f5ff !default;
|
57
|
+
$color-purple-200: #f3ebff !default;
|
58
|
+
$color-purple-300: #e5d4ff !default;
|
59
|
+
$color-purple-400: #d7bdff !default;
|
60
|
+
$color-purple-500: #bd91ff !default;
|
61
|
+
$color-purple-600: #a469ff !default;
|
62
|
+
$color-purple-700: #8c40ff !default;
|
63
|
+
$color-purple-800: #7122e3 !default;
|
64
|
+
$color-purple-900: #4c2e87 !default;
|
65
|
+
$color-purple-1000: #352e4a !default;
|
66
|
+
$color-magenta-100: #fff2f8 !default;
|
67
|
+
$color-magenta-200: #ffe8f2 !default;
|
68
|
+
$color-magenta-300: #ffcce3 !default;
|
69
|
+
$color-magenta-400: #ffb0d3 !default;
|
70
|
+
$color-magenta-500: #ff7db7 !default;
|
71
|
+
$color-magenta-600: #f0549a !default;
|
72
|
+
$color-magenta-700: #d1347a !default;
|
73
|
+
$color-magenta-800: #992659 !default;
|
74
|
+
$color-magenta-900: #782449 !default;
|
75
|
+
$color-magenta-1000: #522338 !default;
|
76
|
+
$color-red-100: #fff2f3 !default;
|
77
|
+
$color-red-200: #ffebec !default;
|
78
|
+
$color-red-300: #ffcfd1 !default;
|
79
|
+
$color-red-400: #ffb5b9 !default;
|
80
|
+
$color-red-500: #ff858b !default;
|
81
|
+
$color-red-600: #ff5760 !default;
|
82
|
+
$color-red-700: #d9363e !default;
|
83
|
+
$color-red-800: #a12b2b !default;
|
84
|
+
$color-red-900: #80252a !default;
|
85
|
+
$color-red-1000: #5c2121 !default;
|
86
|
+
$color-gray-100: #f5f8fa !default;
|
87
|
+
$color-gray-200: #ebf0f5 !default;
|
88
|
+
$color-gray-300: #d9e0e6 !default;
|
89
|
+
$color-gray-400: #c5ced6 !default;
|
90
|
+
$color-gray-500: #a2adb8 !default;
|
91
|
+
$color-gray-600: #818e9a !default;
|
92
|
+
$color-gray-700: #626f7a !default;
|
93
|
+
$color-gray-800: #46525c !default;
|
94
|
+
$color-gray-900: #39444d !default;
|
95
|
+
$color-gray-1000: #2c353d !default;
|
96
|
+
$color-white: #ffffff !default;
|
97
|
+
$box-shadow-0: none !default;
|
98
|
+
$box-shadow-100: 0px 1px 2px rgba(44, 53, 61, 0.2) !default;
|
99
|
+
$box-shadow-200: 0px 2px 4px rgba(44, 53, 61, 0.2) !default;
|
100
|
+
$box-shadow-300: 0px 4px 8px rgba(44, 53, 61, 0.2) !default;
|
101
|
+
$box-shadow-400: 0px 8px 16px rgba(44, 53, 61, 0.2) !default;
|
102
|
+
$z-index-auto: auto !default;
|
103
|
+
$z-index-below: -1 !default;
|
104
|
+
$z-index-default: 1 !default;
|
105
|
+
$z-index-above: 10 !default;
|
106
|
+
$z-index-overlay: 1000 !default;
|
107
|
+
$font-family-sans: "Calibre", -apple-system, BlinkMacSystemFont, "San Francisco",
|
108
|
+
"Segoe UI", Roboto, Helvetica, sans-serif !default;
|
109
|
+
$font-family-monospace: "SFMono-Regular", Monaco, Consolas, "Lucida Console",
|
110
|
+
monospace !default;
|
111
|
+
$line-height-100: 1rem !default;
|
112
|
+
$line-height-200: 1.25rem !default;
|
113
|
+
$line-height-300: 1.5rem !default;
|
114
|
+
$line-height-400: 1.75rem !default;
|
115
|
+
$line-height-500: 2rem !default;
|
116
|
+
$line-height-600: 2.5rem !default;
|
117
|
+
$line-height-700: 3.5rem !default;
|
118
|
+
$line-height-800: 4.25rem !default;
|
119
|
+
$font-size-50: 0.75rem !default;
|
120
|
+
$font-size-100: 0.875rem !default;
|
121
|
+
$font-size-200: 1rem !default;
|
122
|
+
$font-size-300: 1.125rem !default;
|
123
|
+
$font-size-400: 1.25rem !default;
|
124
|
+
$font-size-500: 1.5rem !default;
|
125
|
+
$font-size-600: 2rem !default;
|
126
|
+
$font-size-700: 2.75rem !default;
|
127
|
+
$font-size-800: 3.5rem !default;
|
128
|
+
$font-size-root: 16px !default;
|
129
|
+
$font-weight-light: 300 !default;
|
130
|
+
$font-weight-normal: 400 !default;
|
131
|
+
$font-weight-medium: 500 !default;
|
132
|
+
$font-weight-semibold: 600 !default;
|
133
|
+
$media-query-xs: 448px !default;
|
134
|
+
$media-query-sm: 720px !default;
|
135
|
+
$media-query-md: 960px !default;
|
136
|
+
$media-query-lg: 1200px !default;
|
137
|
+
$media-query-xl: 1440px !default;
|
138
|
+
$motion-duration-fast: 0.15s !default;
|
139
|
+
$motion-duration-medium: 0.3s !default;
|
140
|
+
$motion-duration-slow: 0.7s !default;
|
141
|
+
$motion-ease-in: cubic-bezier(0.35, 0, 0.7, 0.2) !default;
|
142
|
+
$motion-ease-out: cubic-bezier(0, 0, 0.3, 1) !default;
|
143
|
+
$motion-ease-in-out: cubic-bezier(0.4, 0, 0.3, 1) !default;
|
144
|
+
$sizing-0: 0rem !default;
|
145
|
+
$sizing-100: 0.25rem !default;
|
146
|
+
$sizing-200: 0.5rem !default;
|
147
|
+
$sizing-300: 0.75rem !default;
|
148
|
+
$sizing-400: 1rem !default;
|
149
|
+
$sizing-450: 1.25rem !default;
|
150
|
+
$sizing-500: 1.5rem !default;
|
151
|
+
$sizing-550: 1.75rem !default;
|
152
|
+
$sizing-600: 2rem !default;
|
153
|
+
$sizing-650: 2.5rem !default;
|
154
|
+
$sizing-700: 3rem !default;
|
155
|
+
$sizing-750: 3.5rem !default;
|
156
|
+
$sizing-800: 4rem !default;
|
157
|
+
$sizing-850: 6rem !default;
|
158
|
+
$sizing-900: 10rem !default;
|
159
|
+
$sizing-1000: 20rem !default;
|
160
|
+
$sizing-1100: 28rem !default;
|
161
|
+
$sizing-1150: 35rem !default;
|
162
|
+
$sizing-1200: 45rem !default;
|
163
|
+
$sizing-1300: 60rem !default;
|
164
|
+
$sizing-1350: 66rem !default;
|
165
|
+
$sizing-1400: 75rem !default;
|
166
|
+
$sizing-1500: 90rem !default;
|
167
|
+
$spacing-0: 0rem !default;
|
168
|
+
$spacing-100: 0.25rem !default;
|
169
|
+
$spacing-200: 0.5rem !default;
|
170
|
+
$spacing-300: 0.75rem !default;
|
171
|
+
$spacing-400: 1rem !default;
|
172
|
+
$spacing-450: 1.25rem !default;
|
173
|
+
$spacing-500: 1.5rem !default;
|
174
|
+
$spacing-550: 1.75rem !default;
|
175
|
+
$spacing-600: 2rem !default;
|
176
|
+
$spacing-650: 2.5rem !default;
|
177
|
+
$spacing-700: 3rem !default;
|
178
|
+
$spacing-750: 3.5rem !default;
|
179
|
+
$spacing-800: 4rem !default;
|
180
|
+
$spacing-850: 6rem !default;
|
181
|
+
$spacing-900: 10rem !default;
|
182
|
+
|
183
|
+
$matchbox-tokens: (
|
184
|
+
"border-radius": (
|
185
|
+
"0": $border-radius-0,
|
186
|
+
"100": $border-radius-100,
|
187
|
+
"200": $border-radius-200,
|
188
|
+
"pill": $border-radius-pill,
|
189
|
+
"circle": $border-radius-circle
|
190
|
+
),
|
191
|
+
"border-width": (
|
192
|
+
"0": $border-width-0,
|
193
|
+
"100": $border-width-100,
|
194
|
+
"200": $border-width-200
|
195
|
+
),
|
196
|
+
"color": (
|
197
|
+
"brand": (
|
198
|
+
"orange": $color-brand-orange,
|
199
|
+
"gray": $color-brand-gray,
|
200
|
+
"blue": $color-brand-blue
|
201
|
+
),
|
202
|
+
"yellow": (
|
203
|
+
"100": $color-yellow-100,
|
204
|
+
"200": $color-yellow-200,
|
205
|
+
"300": $color-yellow-300,
|
206
|
+
"400": $color-yellow-400,
|
207
|
+
"500": $color-yellow-500,
|
208
|
+
"600": $color-yellow-600,
|
209
|
+
"700": $color-yellow-700,
|
210
|
+
"800": $color-yellow-800,
|
211
|
+
"900": $color-yellow-900,
|
212
|
+
"1000": $color-yellow-1000
|
213
|
+
),
|
214
|
+
"green": (
|
215
|
+
"100": $color-green-100,
|
216
|
+
"200": $color-green-200,
|
217
|
+
"300": $color-green-300,
|
218
|
+
"400": $color-green-400,
|
219
|
+
"500": $color-green-500,
|
220
|
+
"600": $color-green-600,
|
221
|
+
"700": $color-green-700,
|
222
|
+
"800": $color-green-800,
|
223
|
+
"900": $color-green-900,
|
224
|
+
"1000": $color-green-1000
|
225
|
+
),
|
226
|
+
"teal": (
|
227
|
+
"100": $color-teal-100,
|
228
|
+
"200": $color-teal-200,
|
229
|
+
"300": $color-teal-300,
|
230
|
+
"400": $color-teal-400,
|
231
|
+
"500": $color-teal-500,
|
232
|
+
"600": $color-teal-600,
|
233
|
+
"700": $color-teal-700,
|
234
|
+
"800": $color-teal-800,
|
235
|
+
"900": $color-teal-900,
|
236
|
+
"1000": $color-teal-1000
|
237
|
+
),
|
238
|
+
"blue": (
|
239
|
+
"100": $color-blue-100,
|
240
|
+
"200": $color-blue-200,
|
241
|
+
"300": $color-blue-300,
|
242
|
+
"400": $color-blue-400,
|
243
|
+
"500": $color-blue-500,
|
244
|
+
"600": $color-blue-600,
|
245
|
+
"700": $color-blue-700,
|
246
|
+
"800": $color-blue-800,
|
247
|
+
"900": $color-blue-900,
|
248
|
+
"1000": $color-blue-1000
|
249
|
+
),
|
250
|
+
"purple": (
|
251
|
+
"100": $color-purple-100,
|
252
|
+
"200": $color-purple-200,
|
253
|
+
"300": $color-purple-300,
|
254
|
+
"400": $color-purple-400,
|
255
|
+
"500": $color-purple-500,
|
256
|
+
"600": $color-purple-600,
|
257
|
+
"700": $color-purple-700,
|
258
|
+
"800": $color-purple-800,
|
259
|
+
"900": $color-purple-900,
|
260
|
+
"1000": $color-purple-1000
|
261
|
+
),
|
262
|
+
"magenta": (
|
263
|
+
"100": $color-magenta-100,
|
264
|
+
"200": $color-magenta-200,
|
265
|
+
"300": $color-magenta-300,
|
266
|
+
"400": $color-magenta-400,
|
267
|
+
"500": $color-magenta-500,
|
268
|
+
"600": $color-magenta-600,
|
269
|
+
"700": $color-magenta-700,
|
270
|
+
"800": $color-magenta-800,
|
271
|
+
"900": $color-magenta-900,
|
272
|
+
"1000": $color-magenta-1000
|
273
|
+
),
|
274
|
+
"red": (
|
275
|
+
"100": $color-red-100,
|
276
|
+
"200": $color-red-200,
|
277
|
+
"300": $color-red-300,
|
278
|
+
"400": $color-red-400,
|
279
|
+
"500": $color-red-500,
|
280
|
+
"600": $color-red-600,
|
281
|
+
"700": $color-red-700,
|
282
|
+
"800": $color-red-800,
|
283
|
+
"900": $color-red-900,
|
284
|
+
"1000": $color-red-1000
|
285
|
+
),
|
286
|
+
"gray": (
|
287
|
+
"100": $color-gray-100,
|
288
|
+
"200": $color-gray-200,
|
289
|
+
"300": $color-gray-300,
|
290
|
+
"400": $color-gray-400,
|
291
|
+
"500": $color-gray-500,
|
292
|
+
"600": $color-gray-600,
|
293
|
+
"700": $color-gray-700,
|
294
|
+
"800": $color-gray-800,
|
295
|
+
"900": $color-gray-900,
|
296
|
+
"1000": $color-gray-1000
|
297
|
+
),
|
298
|
+
"white": $color-white
|
299
|
+
),
|
300
|
+
"box-shadow": (
|
301
|
+
"0": $box-shadow-0,
|
302
|
+
"100": $box-shadow-100,
|
303
|
+
"200": $box-shadow-200,
|
304
|
+
"300": $box-shadow-300,
|
305
|
+
"400": $box-shadow-400
|
306
|
+
),
|
307
|
+
"z-index": (
|
308
|
+
"auto": $z-index-auto,
|
309
|
+
"below": $z-index-below,
|
310
|
+
"default": $z-index-default,
|
311
|
+
"above": $z-index-above,
|
312
|
+
"overlay": $z-index-overlay
|
313
|
+
),
|
314
|
+
"font-family": (
|
315
|
+
"sans": $font-family-sans,
|
316
|
+
"monospace": $font-family-monospace
|
317
|
+
),
|
318
|
+
"line-height": (
|
319
|
+
"100": $line-height-100,
|
320
|
+
"200": $line-height-200,
|
321
|
+
"300": $line-height-300,
|
322
|
+
"400": $line-height-400,
|
323
|
+
"500": $line-height-500,
|
324
|
+
"600": $line-height-600,
|
325
|
+
"700": $line-height-700,
|
326
|
+
"800": $line-height-800
|
327
|
+
),
|
328
|
+
"font-size": (
|
329
|
+
"50": $font-size-50,
|
330
|
+
"100": $font-size-100,
|
331
|
+
"200": $font-size-200,
|
332
|
+
"300": $font-size-300,
|
333
|
+
"400": $font-size-400,
|
334
|
+
"500": $font-size-500,
|
335
|
+
"600": $font-size-600,
|
336
|
+
"700": $font-size-700,
|
337
|
+
"800": $font-size-800,
|
338
|
+
"root": $font-size-root
|
339
|
+
),
|
340
|
+
"font-weight": (
|
341
|
+
"light": $font-weight-light,
|
342
|
+
"normal": $font-weight-normal,
|
343
|
+
"medium": $font-weight-medium,
|
344
|
+
"semibold": $font-weight-semibold
|
345
|
+
),
|
346
|
+
"media-query": (
|
347
|
+
"xs": $media-query-xs,
|
348
|
+
"sm": $media-query-sm,
|
349
|
+
"md": $media-query-md,
|
350
|
+
"lg": $media-query-lg,
|
351
|
+
"xl": $media-query-xl
|
352
|
+
),
|
353
|
+
"motion-duration": (
|
354
|
+
"fast": $motion-duration-fast,
|
355
|
+
"medium": $motion-duration-medium,
|
356
|
+
"slow": $motion-duration-slow
|
357
|
+
),
|
358
|
+
"motion-ease": (
|
359
|
+
"in": $motion-ease-in,
|
360
|
+
"out": $motion-ease-out,
|
361
|
+
"in-out": $motion-ease-in-out
|
362
|
+
),
|
363
|
+
"sizing": (
|
364
|
+
"0": $sizing-0,
|
365
|
+
"100": $sizing-100,
|
366
|
+
"200": $sizing-200,
|
367
|
+
"300": $sizing-300,
|
368
|
+
"400": $sizing-400,
|
369
|
+
"450": $sizing-450,
|
370
|
+
"500": $sizing-500,
|
371
|
+
"550": $sizing-550,
|
372
|
+
"600": $sizing-600,
|
373
|
+
"650": $sizing-650,
|
374
|
+
"700": $sizing-700,
|
375
|
+
"750": $sizing-750,
|
376
|
+
"800": $sizing-800,
|
377
|
+
"850": $sizing-850,
|
378
|
+
"900": $sizing-900,
|
379
|
+
"1000": $sizing-1000,
|
380
|
+
"1100": $sizing-1100,
|
381
|
+
"1150": $sizing-1150,
|
382
|
+
"1200": $sizing-1200,
|
383
|
+
"1300": $sizing-1300,
|
384
|
+
"1350": $sizing-1350,
|
385
|
+
"1400": $sizing-1400,
|
386
|
+
"1500": $sizing-1500
|
387
|
+
),
|
388
|
+
"spacing": (
|
389
|
+
"0": $spacing-0,
|
390
|
+
"100": $spacing-100,
|
391
|
+
"200": $spacing-200,
|
392
|
+
"300": $spacing-300,
|
393
|
+
"400": $spacing-400,
|
394
|
+
"450": $spacing-450,
|
395
|
+
"500": $spacing-500,
|
396
|
+
"550": $spacing-550,
|
397
|
+
"600": $spacing-600,
|
398
|
+
"650": $spacing-650,
|
399
|
+
"700": $spacing-700,
|
400
|
+
"750": $spacing-750,
|
401
|
+
"800": $spacing-800,
|
402
|
+
"850": $spacing-850,
|
403
|
+
"900": $spacing-900
|
404
|
+
)
|
405
|
+
);
|
406
|
+
|
407
|
+
$DEFAULT_FONT_SIZE: $font-size-root;
|
408
|
+
$DEFAULT_FONT_SIZE_UNITLESS: 16;
|
409
|
+
|
410
|
+
@function rem($n) {
|
411
|
+
$result: 0rem + $n / $DEFAULT_FONT_SIZE_UNITLESS;
|
412
|
+
@return $result;
|
413
|
+
}
|
414
|
+
|
415
|
+
@function em($n) {
|
416
|
+
$result: 0em + $n / $DEFAULT_FONT_SIZE_UNITLESS;
|
417
|
+
@return $result;
|
418
|
+
}
|
419
|
+
|
420
|
+
@function border-radius($variant) {
|
421
|
+
$parent-map: map-get($matchbox-tokens, "border-radius");
|
422
|
+
|
423
|
+
@if map-has-key($parent-map, "#{$variant}") {
|
424
|
+
@return map-get($parent-map, "#{$variant}");
|
425
|
+
}
|
426
|
+
|
427
|
+
@error 'border-radius '#{$variant}' not found.';
|
428
|
+
}
|
429
|
+
|
430
|
+
@function border-width($variant) {
|
431
|
+
$parent-map: map-get($matchbox-tokens, "border-width");
|
432
|
+
|
433
|
+
@if map-has-key($parent-map, "#{$variant}") {
|
434
|
+
@return map-get($parent-map, "#{$variant}");
|
435
|
+
}
|
436
|
+
|
437
|
+
@error 'border-width '#{$variant}' not found.';
|
438
|
+
}
|
439
|
+
|
440
|
+
@function color($palette, $variant: 400) {
|
441
|
+
$color-map: map-get($matchbox-tokens, "color");
|
442
|
+
|
443
|
+
@if $palette == white {
|
444
|
+
@return map-get($color-map, "white");
|
445
|
+
}
|
446
|
+
|
447
|
+
@if map-has-key($color-map, "#{$palette}") {
|
448
|
+
$palette-map: map-get($color-map, "#{$palette}");
|
449
|
+
@return map-get($palette-map, "#{$variant}");
|
450
|
+
}
|
451
|
+
|
452
|
+
@error 'color' #{$palette} - #{$variant}' not found.';
|
453
|
+
}
|
454
|
+
|
455
|
+
@function box-shadow($variant) {
|
456
|
+
$parent-map: map-get($matchbox-tokens, "box-shadow");
|
457
|
+
|
458
|
+
@if map-has-key($parent-map, "#{$variant}") {
|
459
|
+
@return map-get($parent-map, "#{$variant}");
|
460
|
+
}
|
461
|
+
|
462
|
+
@error 'box-shadow '#{$variant}' not found.';
|
463
|
+
}
|
464
|
+
|
465
|
+
@function z-index($variant) {
|
466
|
+
$parent-map: map-get($matchbox-tokens, "z-index");
|
467
|
+
|
468
|
+
@if map-has-key($parent-map, "#{$variant}") {
|
469
|
+
@return map-get($parent-map, "#{$variant}");
|
470
|
+
}
|
471
|
+
|
472
|
+
@error 'z-index '#{$variant}' not found.';
|
473
|
+
}
|
474
|
+
|
475
|
+
@function font-family($variant) {
|
476
|
+
$parent-map: map-get($matchbox-tokens, "font-family");
|
477
|
+
|
478
|
+
@if map-has-key($parent-map, "#{$variant}") {
|
479
|
+
@return map-get($parent-map, "#{$variant}");
|
480
|
+
}
|
481
|
+
|
482
|
+
@error 'font-family '#{$variant}' not found.';
|
483
|
+
}
|
484
|
+
|
485
|
+
@function line-height($variant) {
|
486
|
+
$parent-map: map-get($matchbox-tokens, "line-height");
|
487
|
+
|
488
|
+
@if map-has-key($parent-map, "#{$variant}") {
|
489
|
+
@return map-get($parent-map, "#{$variant}");
|
490
|
+
}
|
491
|
+
|
492
|
+
@error 'line-height '#{$variant}' not found.';
|
493
|
+
}
|
494
|
+
|
495
|
+
@function font-size($variant) {
|
496
|
+
$parent-map: map-get($matchbox-tokens, "font-size");
|
497
|
+
|
498
|
+
@if map-has-key($parent-map, "#{$variant}") {
|
499
|
+
@return map-get($parent-map, "#{$variant}");
|
500
|
+
}
|
501
|
+
|
502
|
+
@error 'font-size '#{$variant}' not found.';
|
503
|
+
}
|
504
|
+
|
505
|
+
@function font-weight($variant) {
|
506
|
+
$parent-map: map-get($matchbox-tokens, "font-weight");
|
507
|
+
|
508
|
+
@if map-has-key($parent-map, "#{$variant}") {
|
509
|
+
@return map-get($parent-map, "#{$variant}");
|
510
|
+
}
|
511
|
+
|
512
|
+
@error 'font-weight '#{$variant}' not found.';
|
513
|
+
}
|
514
|
+
|
515
|
+
@function media-query($variant) {
|
516
|
+
$parent-map: map-get($matchbox-tokens, "media-query");
|
517
|
+
|
518
|
+
@if map-has-key($parent-map, "#{$variant}") {
|
519
|
+
@return map-get($parent-map, "#{$variant}");
|
520
|
+
}
|
521
|
+
|
522
|
+
@error 'media-query '#{$variant}' not found.';
|
523
|
+
}
|
524
|
+
|
525
|
+
@function motion-duration($variant) {
|
526
|
+
$parent-map: map-get($matchbox-tokens, "motion-duration");
|
527
|
+
|
528
|
+
@if map-has-key($parent-map, "#{$variant}") {
|
529
|
+
@return map-get($parent-map, "#{$variant}");
|
530
|
+
}
|
531
|
+
|
532
|
+
@error 'motion-duration '#{$variant}' not found.';
|
533
|
+
}
|
534
|
+
|
535
|
+
@function motion-ease($variant) {
|
536
|
+
$parent-map: map-get($matchbox-tokens, "motion-ease");
|
537
|
+
|
538
|
+
@if map-has-key($parent-map, "#{$variant}") {
|
539
|
+
@return map-get($parent-map, "#{$variant}");
|
540
|
+
}
|
541
|
+
|
542
|
+
@error 'motion-ease '#{$variant}' not found.';
|
543
|
+
}
|
544
|
+
|
545
|
+
@function sizing($variant) {
|
546
|
+
$parent-map: map-get($matchbox-tokens, "sizing");
|
547
|
+
|
548
|
+
@if map-has-key($parent-map, "#{$variant}") {
|
549
|
+
@return map-get($parent-map, "#{$variant}");
|
550
|
+
}
|
551
|
+
|
552
|
+
@error 'sizing '#{$variant}' not found.';
|
553
|
+
}
|
554
|
+
|
555
|
+
@function spacing($variant) {
|
556
|
+
$parent-map: map-get($matchbox-tokens, "spacing");
|
557
|
+
|
558
|
+
@if map-has-key($parent-map, "#{$variant}") {
|
559
|
+
@return map-get($parent-map, "#{$variant}");
|
560
|
+
}
|
561
|
+
|
562
|
+
@error 'spacing '#{$variant}' not found.';
|
563
|
+
}
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "matchbox_rails"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "matchbox_rails/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "matchbox_rails"
|
8
|
+
spec.version = MatchboxRails::VERSION
|
9
|
+
spec.authors = ["Taxi For Email Engineering Team"]
|
10
|
+
spec.email = ["product@taxiforemail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Matchbox design tokens for Rails applications.}
|
13
|
+
spec.description = %q{Matchbox is the design system created by SparkPost.
|
14
|
+
A design system is a collection of reusable components, digital assets, guidelines, patterns,
|
15
|
+
and philosophies that follow clearly defined standards to manage design at scale.}
|
16
|
+
spec.homepage = "https://github.com/SparkPost/matchbox_rails"
|
17
|
+
spec.license = "MIT"
|
18
|
+
|
19
|
+
# Specify which files should be added to the gem when it is released.
|
20
|
+
#The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
21
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
22
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
23
|
+
end
|
24
|
+
|
25
|
+
spec.bindir = "exe"
|
26
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
27
|
+
spec.require_paths = ["lib"]
|
28
|
+
|
29
|
+
spec.add_development_dependency "bundler", "~> 2.2.33"
|
30
|
+
spec.add_development_dependency "rake", "~> 12.3.3"
|
31
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
32
|
+
end
|
metadata
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: matchbox_rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Taxi For Email Engineering Team
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-01-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.2.33
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.2.33
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 12.3.3
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 12.3.3
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
description: |-
|
56
|
+
Matchbox is the design system created by SparkPost.
|
57
|
+
A design system is a collection of reusable components, digital assets, guidelines, patterns,
|
58
|
+
and philosophies that follow clearly defined standards to manage design at scale.
|
59
|
+
email:
|
60
|
+
- product@taxiforemail.com
|
61
|
+
executables: []
|
62
|
+
extensions: []
|
63
|
+
extra_rdoc_files: []
|
64
|
+
files:
|
65
|
+
- ".gitignore"
|
66
|
+
- ".rspec"
|
67
|
+
- ".travis.yml"
|
68
|
+
- Gemfile
|
69
|
+
- LICENSE.txt
|
70
|
+
- README.md
|
71
|
+
- Rakefile
|
72
|
+
- app/assets/stylesheets/matchbox.scss
|
73
|
+
- bin/console
|
74
|
+
- bin/setup
|
75
|
+
- lib/matchbox_rails.rb
|
76
|
+
- lib/matchbox_rails/engine.rb
|
77
|
+
- lib/matchbox_rails/version.rb
|
78
|
+
- matchbox_rails.gemspec
|
79
|
+
homepage: https://github.com/SparkPost/matchbox_rails
|
80
|
+
licenses:
|
81
|
+
- MIT
|
82
|
+
metadata: {}
|
83
|
+
post_install_message:
|
84
|
+
rdoc_options: []
|
85
|
+
require_paths:
|
86
|
+
- lib
|
87
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
requirements: []
|
98
|
+
rubygems_version: 3.0.9
|
99
|
+
signing_key:
|
100
|
+
specification_version: 4
|
101
|
+
summary: Matchbox design tokens for Rails applications.
|
102
|
+
test_files: []
|