formatic 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.
Files changed (57) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +5 -0
  3. data/LICENSE.txt +21 -0
  4. data/README.md +32 -0
  5. data/app/assets/javascript/formatic/components/date.ts +54 -0
  6. data/app/assets/javascript/formatic/components/select.ts +109 -0
  7. data/app/assets/javascript/formatic/components/stepper.ts +89 -0
  8. data/app/assets/javascript/formatic/components/textarea.ts +108 -0
  9. data/app/assets/javascript/formatic/components/toggle.ts +81 -0
  10. data/app/assets/javascript/formatic.js +350 -0
  11. data/app/assets/javascript/formatic.js.map +1 -0
  12. data/app/assets/stylesheets/formatic/components/checklist.sass +3 -0
  13. data/app/assets/stylesheets/formatic/components/date.sass +70 -0
  14. data/app/assets/stylesheets/formatic/components/select.sass +24 -0
  15. data/app/assets/stylesheets/formatic/components/stepper.sass +43 -0
  16. data/app/assets/stylesheets/formatic/components/string.sass +13 -0
  17. data/app/assets/stylesheets/formatic/components/textarea.sass +22 -0
  18. data/app/assets/stylesheets/formatic/components/toggle.sass +93 -0
  19. data/app/assets/stylesheets/formatic/components/wrapper.sass +51 -0
  20. data/app/assets/stylesheets/formatic/generics/flip.sass +3 -0
  21. data/app/assets/stylesheets/formatic/index.sass +16 -0
  22. data/app/assets/stylesheets/formatic/package.json +5 -0
  23. data/app/assets/stylesheets/formatic/scopes/form.sass +45 -0
  24. data/app/assets/stylesheets/formatic/settings/_colors.sass +13 -0
  25. data/app/assets/stylesheets/formatic/tools/terminal.sass +3 -0
  26. data/app/assets/stylesheets/formatic/utilities/container.sass +2 -0
  27. data/app/components/formatic/application_component.rb +39 -0
  28. data/app/components/formatic/base.rb +72 -0
  29. data/app/components/formatic/checklist.rb +65 -0
  30. data/app/components/formatic/date.rb +110 -0
  31. data/app/components/formatic/select.rb +49 -0
  32. data/app/components/formatic/stepper.rb +35 -0
  33. data/app/components/formatic/string.rb +57 -0
  34. data/app/components/formatic/textarea.rb +48 -0
  35. data/app/components/formatic/toggle.rb +57 -0
  36. data/app/components/formatic/wrapper.rb +122 -0
  37. data/config/locales/formatic.de.yml +5 -0
  38. data/config/locales/formatic.en.yml +5 -0
  39. data/lib/formatic/choices/countries.rb +14 -0
  40. data/lib/formatic/choices/keys.rb +27 -0
  41. data/lib/formatic/choices/options.rb +39 -0
  42. data/lib/formatic/choices/records.rb +47 -0
  43. data/lib/formatic/choices.rb +62 -0
  44. data/lib/formatic/css.rb +10 -0
  45. data/lib/formatic/engine.rb +40 -0
  46. data/lib/formatic/safe_join.rb +20 -0
  47. data/lib/formatic/templates/date.rb +76 -0
  48. data/lib/formatic/templates/select.rb +35 -0
  49. data/lib/formatic/templates/wrapper.rb +52 -0
  50. data/lib/formatic/version.rb +5 -0
  51. data/lib/formatic/wrappers/alternative_attribute_name.rb +18 -0
  52. data/lib/formatic/wrappers/error_messages.rb +39 -0
  53. data/lib/formatic/wrappers/required.rb +29 -0
  54. data/lib/formatic/wrappers/translate.rb +41 -0
  55. data/lib/formatic/wrappers/validators.rb +39 -0
  56. data/lib/formatic.rb +29 -0
  57. metadata +186 -0
@@ -0,0 +1,350 @@
1
+ var Formatic;
2
+ (function (Formatic) {
3
+ class Date {
4
+ constructor(el) {
5
+ this.el = el;
6
+ this.setupBindings();
7
+ }
8
+ setupBindings() {
9
+ this.shortcutButtons.forEach((el) => {
10
+ el.addEventListener('click', (event) => {
11
+ event.preventDefault();
12
+ const shortcut = event.currentTarget;
13
+ this.dayInput.value = shortcut.dataset.day;
14
+ this.monthInput.value = shortcut.dataset.month;
15
+ this.yearInput.value = shortcut.dataset.year;
16
+ });
17
+ });
18
+ }
19
+ get dayInput() {
20
+ return this.el.querySelector('.js-formatic-date__day');
21
+ }
22
+ get monthInput() {
23
+ return this.el.querySelector('.js-formatic-date__month');
24
+ }
25
+ get yearInput() {
26
+ return this.el.querySelector('.js-formatic-date__year');
27
+ }
28
+ get shortcutButtons() {
29
+ return this.el.querySelectorAll('.js-formatic-date__shortcut');
30
+ }
31
+ }
32
+ Formatic.Date = Date;
33
+ })(Formatic || (Formatic = {}));
34
+ document.addEventListener('DOMContentLoaded', () => {
35
+ document.querySelectorAll('.js-formatic-date').forEach((el) => {
36
+ console.debug('Instantiating Formatic.Date...');
37
+ new Formatic.Date(el);
38
+ });
39
+ });
40
+ var Formatic;
41
+ (function (Formatic) {
42
+ class Select {
43
+ constructor(el) {
44
+ this.el = el;
45
+ this.setupBindings();
46
+ }
47
+ setupBindings() {
48
+ this.autosize();
49
+ this.el.addEventListener('input', (event) => {
50
+ event.preventDefault();
51
+ if (this.autoSubmit)
52
+ this.actionSave();
53
+ });
54
+ }
55
+ actionSave() {
56
+ this.guiWaitingForSave();
57
+ this.debounce(this.actionSaveNow.bind(this))();
58
+ }
59
+ actionSaveNow() {
60
+ console.debug("Saving select...");
61
+ this.el.classList.remove('is-loading');
62
+ this.el.classList.add('is-saved');
63
+ this.save();
64
+ }
65
+ guiWaitingForSave() {
66
+ this.el.classList.add('is-loading');
67
+ this.el.classList.remove('is-saved');
68
+ this.el.classList.remove('is-failed');
69
+ }
70
+ guiSaved() {
71
+ this.el.classList.remove('is-loading');
72
+ this.el.classList.add('is-saved');
73
+ this.el.classList.remove('is-failed');
74
+ }
75
+ guiFailed() {
76
+ this.el.classList.remove('is-loading');
77
+ this.el.classList.remove('is-saved');
78
+ this.el.classList.add('is-failed');
79
+ }
80
+ get autoSubmit() {
81
+ return this.el.classList.contains('is-autosubmit');
82
+ }
83
+ save() {
84
+ const form = this.el.closest('form');
85
+ const data = new FormData(form);
86
+ data.set('_method', 'patch');
87
+ fetch(form.action, { method: 'POST', body: data })
88
+ .then(response => {
89
+ if (response.status == 201) {
90
+ console.debug('Select content saved');
91
+ this.guiSaved();
92
+ }
93
+ else {
94
+ console.debug('Select content not saved');
95
+ this.guiFailed();
96
+ }
97
+ }).catch(err => {
98
+ console.warn(err);
99
+ console.debug('Failed badly to save');
100
+ });
101
+ }
102
+ debounce(fn) {
103
+ return () => {
104
+ clearTimeout(this.timeoutId);
105
+ this.timeoutId = setTimeout(() => fn(), 1000);
106
+ };
107
+ }
108
+ autosize() {
109
+ try {
110
+ autosize(this.el);
111
+ }
112
+ catch (error) {
113
+ console.warn(`Formatic is missing the autosize library`);
114
+ }
115
+ }
116
+ }
117
+ Formatic.Select = Select;
118
+ })(Formatic || (Formatic = {}));
119
+ document.addEventListener('DOMContentLoaded', () => {
120
+ document.querySelectorAll('.js-formatic-select').forEach((el) => {
121
+ console.debug('Instantiating Formatic.Select...');
122
+ new Formatic.Select(el);
123
+ });
124
+ });
125
+ var Formatic;
126
+ (function (Formatic) {
127
+ class Stepper {
128
+ constructor(el) {
129
+ this.el = el;
130
+ this.setupBindings();
131
+ }
132
+ setupBindings() {
133
+ this.incrementButtons.forEach((el) => {
134
+ el.addEventListener('click', (event) => {
135
+ event.preventDefault();
136
+ this.increment();
137
+ });
138
+ });
139
+ this.decrementButtons.forEach((el) => {
140
+ el.addEventListener('click', (event) => {
141
+ event.preventDefault();
142
+ this.decrement();
143
+ });
144
+ });
145
+ this.numberInput.addEventListener('click', (event) => {
146
+ this.numberInput.select();
147
+ });
148
+ }
149
+ increment() {
150
+ if (!this.number && this.number != 0) {
151
+ this.numberInput.value = Math.max(...[0, this.minimum]).toString();
152
+ }
153
+ else if (isNaN(this.number)) {
154
+ return;
155
+ }
156
+ else if (this.number < this.minimum) {
157
+ this.numberInput.value = this.minimum.toString();
158
+ }
159
+ else {
160
+ this.numberInput.value = (this.number + 1).toString();
161
+ }
162
+ }
163
+ decrement() {
164
+ if (!this.number && this.number != 0) {
165
+ this.numberInput.value = Math.max(...[-1, this.minimum]).toString();
166
+ }
167
+ else if (isNaN(this.number)) {
168
+ return;
169
+ }
170
+ else if (this.number <= this.minimum) {
171
+ return;
172
+ }
173
+ else {
174
+ this.numberInput.value = (this.number - 1).toString();
175
+ }
176
+ }
177
+ get minimum() {
178
+ return parseInt(this.numberInput.min);
179
+ }
180
+ get number() {
181
+ return parseInt(this.numberInput.value);
182
+ }
183
+ get incrementButtons() {
184
+ return this.el.querySelectorAll('.js-formatic-stepper__increment');
185
+ }
186
+ get decrementButtons() {
187
+ return this.el.querySelectorAll('.js-formatic-stepper__decrement');
188
+ }
189
+ get numberInput() {
190
+ return this.el.querySelector('.js-formatic-stepper__number');
191
+ }
192
+ }
193
+ Formatic.Stepper = Stepper;
194
+ })(Formatic || (Formatic = {}));
195
+ document.addEventListener('DOMContentLoaded', () => {
196
+ document.querySelectorAll('.js-formatic-stepper').forEach((el) => {
197
+ console.debug('Instantiating Formatic.Stepper...');
198
+ new Formatic.Stepper(el);
199
+ });
200
+ });
201
+ var Formatic;
202
+ (function (Formatic) {
203
+ class Textarea {
204
+ constructor(el) {
205
+ this.el = el;
206
+ this.setupBindings();
207
+ }
208
+ setupBindings() {
209
+ this.autosize();
210
+ this.el.addEventListener('input', (event) => {
211
+ event.preventDefault();
212
+ if (this.autoSubmit)
213
+ this.actionSave();
214
+ });
215
+ }
216
+ actionSave() {
217
+ this.guiWaitingForSave();
218
+ this.debounce(this.actionSaveNow.bind(this))();
219
+ }
220
+ actionSaveNow() {
221
+ console.debug("Saving textarea...");
222
+ this.el.classList.remove('is-loading');
223
+ this.el.classList.add('is-saved');
224
+ this.save();
225
+ }
226
+ guiWaitingForSave() {
227
+ this.el.classList.add('is-loading');
228
+ this.el.classList.remove('is-saved');
229
+ this.el.classList.remove('is-failed');
230
+ }
231
+ guiSaved() {
232
+ this.el.classList.remove('is-loading');
233
+ this.el.classList.add('is-saved');
234
+ this.el.classList.remove('is-failed');
235
+ }
236
+ guiFailed() {
237
+ this.el.classList.remove('is-loading');
238
+ this.el.classList.remove('is-saved');
239
+ this.el.classList.add('is-failed');
240
+ }
241
+ get autoSubmit() {
242
+ return this.el.classList.contains('is-autosubmit');
243
+ }
244
+ save() {
245
+ const form = this.el.closest('form');
246
+ const data = new FormData(form);
247
+ data.set('_method', 'patch');
248
+ fetch(form.action, { method: 'POST', body: data })
249
+ .then(response => {
250
+ if (response.status == 201) {
251
+ console.debug('Textarea content saved');
252
+ this.guiSaved();
253
+ }
254
+ else {
255
+ console.debug('Textarea content not saved');
256
+ this.guiFailed();
257
+ }
258
+ }).catch(err => {
259
+ console.warn(err);
260
+ console.debug('Failed badly to save');
261
+ });
262
+ }
263
+ debounce(fn) {
264
+ return () => {
265
+ clearTimeout(this.timeoutId);
266
+ this.timeoutId = setTimeout(() => fn(), 1000);
267
+ };
268
+ }
269
+ autosize() {
270
+ try {
271
+ autosize(this.el);
272
+ }
273
+ catch (error) {
274
+ console.warn(`Formatic is missing the autosize library`);
275
+ }
276
+ }
277
+ }
278
+ Formatic.Textarea = Textarea;
279
+ document.addEventListener('DOMContentLoaded', () => {
280
+ document.querySelectorAll('.js-formatic-textarea').forEach((el) => {
281
+ console.debug('Instantiating Formatic.Textarea...');
282
+ new Formatic.Textarea(el);
283
+ });
284
+ });
285
+ })(Formatic || (Formatic = {}));
286
+ var Formatic;
287
+ (function (Formatic) {
288
+ class Toggle {
289
+ constructor(el) {
290
+ this.el = el;
291
+ this.setupBindings();
292
+ }
293
+ setupBindings() {
294
+ this.checkbox.addEventListener('click', (event) => {
295
+ event.preventDefault();
296
+ const box = event.target;
297
+ box.checked ? this.activate(box) : this.deactivate(box);
298
+ });
299
+ }
300
+ activate(box) {
301
+ const form = box.closest('form');
302
+ const data = new FormData(form);
303
+ data.set('_method', 'patch');
304
+ fetch(form.action, { method: 'POST', body: data })
305
+ .then(response => {
306
+ if (response.status == 201) {
307
+ console.debug('Activation confirmed');
308
+ box.checked = true;
309
+ }
310
+ else {
311
+ console.debug('Activation not confirmed');
312
+ console.log("Activation denied");
313
+ }
314
+ }).catch(err => {
315
+ console.warn(err);
316
+ console.debug('Failed badly to activate');
317
+ });
318
+ }
319
+ deactivate(box) {
320
+ const form = box.closest('form');
321
+ const data = new FormData(form);
322
+ data.set('_method', 'delete');
323
+ fetch(form.action, { method: 'POST', body: data })
324
+ .then(response => {
325
+ if (response.status == 204) {
326
+ console.debug('Deactivation confirmed');
327
+ box.checked = false;
328
+ }
329
+ else {
330
+ console.debug('Deactivation not confirmed');
331
+ console.log("Deactivation denied");
332
+ }
333
+ }).catch(err => {
334
+ console.warn(err);
335
+ console.debug('Failed badly to deactivate');
336
+ });
337
+ }
338
+ get checkbox() {
339
+ return this.el.querySelector('input[type="checkbox"]');
340
+ }
341
+ }
342
+ Formatic.Toggle = Toggle;
343
+ })(Formatic || (Formatic = {}));
344
+ document.addEventListener('DOMContentLoaded', () => {
345
+ document.querySelectorAll('.js-formatic-toggle').forEach((el) => {
346
+ console.debug('Instantiating Formatic::Toggle...');
347
+ new Formatic.Toggle(el);
348
+ });
349
+ });
350
+ //# sourceMappingURL=formatic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatic.js","sourceRoot":"","sources":["formatic/components/date.ts","formatic/components/select.ts","formatic/components/stepper.ts","formatic/components/textarea.ts","formatic/components/toggle.ts"],"names":[],"mappings":"AAAA,IAAU,QAAQ,CA0CjB;AA1CD,WAAU,QAAQ;IAChB,MAAa,IAAI;QAGf,YAAY,EAAe;YACzB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;YACZ,IAAI,CAAC,aAAa,EAAE,CAAA;QACtB,CAAC;QAEO,aAAa;YACnB,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE;gBAClC,EAAE,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;oBACrC,KAAK,CAAC,cAAc,EAAE,CAAA;oBACtB,MAAM,QAAQ,GAAqB,KAAK,CAAC,aAAa,CAAA;oBAEtD,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAA;oBAC1C,IAAI,CAAC,UAAU,CAAC,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAA;oBAC9C,IAAI,CAAC,SAAS,C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CAAC,MAAM,IAAI,GAAG,EAAE,CAAC;oBAC3B,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAA;oBACvC,GAAG,CAAC,OAAO,GAAG,KAAK,CAAA;gBACrB,CAAC;qBAAM,CAAC;oBACN,OAAO,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAA;oBAC3C,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAA;gBACpC,CAAC;YACH,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;gBACb,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;gBACjB,OAAO,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAA;YAC7C,CAAC,CAAC,CAAA;QACN,CAAC;QAMD,IAAY,QAAQ;YAClB,OAAO,IAAI,CAAC,EAAE,CAAC,aAAa,CAAmB,wBAAwB,CAAC,CAAA;QAC1E,CAAC;KACF;IAnEY,eAAM,SAmElB,CAAA;AACH,CAAC,EArES,QAAQ,KAAR,QAAQ,QAqEjB;AAMD,QAAQ,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,GAAG,EAAE;IACjD,QAAQ,CAAC,gBAAgB,CAAc,qBAAqB,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE;QAC3E,OAAO,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAA;QAClD,IAAI,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;IACzB,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ .c-formatic-checklist
2
+ display: grid
3
+ grid-row-gap: 0.4em
@@ -0,0 +1,70 @@
1
+ @use "sass:color"
2
+ @use "iglu/font-size"
3
+ @use "iglu/spacing"
4
+ @use "formatic/settings/colors"
5
+ @use "formatic/tools/terminal"
6
+
7
+ .c-formatic-date
8
+
9
+ &__inputs
10
+ display: grid
11
+ grid-auto-flow: column
12
+ grid-gap: 0.5em
13
+ +spacing.margin-bottom--small
14
+
15
+ &__select
16
+ .c-formatic-wrapper.is-required &
17
+ border-left-color: colors.$paradise-pink
18
+ border-left-width: 2px
19
+
20
+ &__calendar
21
+ display: flex
22
+ // See https://kevinyank.com/posts/horizontal-scrolling/
23
+ overflow-x: scroll
24
+ overflow-y: hidden
25
+ scrollbar-width: none
26
+ -ms-overflow-style: none
27
+ ::-webkit-scrollbar
28
+ display: none
29
+
30
+ &__flick
31
+ background-color: color.adjust(#000, $lightness: 96%)
32
+ text-align: center
33
+ text-decoration: none
34
+ display: flex
35
+ flex-direction: column
36
+ justify-content: center
37
+ color: colors.$black
38
+ +spacing.margin-right--smaller
39
+ +spacing.padding-tiny
40
+
41
+ &__clear
42
+ +font-size.large
43
+ +spacing.padding-small
44
+
45
+ &__calendar-day-number
46
+ +font-size.default
47
+ +terminal.terminal
48
+
49
+ &__calendar-month
50
+ text-transform: uppercase
51
+ +font-size.smaller
52
+
53
+ &__calendar-year
54
+ opacity: 0.4
55
+ +terminal.terminal
56
+ +font-size.smaller
57
+
58
+ & .is-saturday
59
+ background-color: color.adjust(#000, $lightness: 70%)
60
+
61
+ & .is-sunday
62
+ background-color: color.adjust(#000, $lightness: 50%)
63
+ color: colors.$white
64
+
65
+ & .is-holiday
66
+ color: colors.$paradise-pink
67
+
68
+ & .is-today
69
+ border: 3px solid colors.$black
70
+ font-weight: bold
@@ -0,0 +1,24 @@
1
+ @use "formatic/settings/colors"
2
+
3
+ .c-formatic-select
4
+
5
+ .c-formatic-wrapper.is-required &
6
+ border-left-color: colors.$paradise-pink
7
+ border-left-width: 2px
8
+
9
+ &.is-loading,
10
+ &.is-saved,
11
+ &.is-failed
12
+ background-repeat: no-repeat
13
+ background-size: 24px 33px
14
+
15
+ &.is-loading
16
+ background-image: url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"1024\" height=\"1024\" viewBox=\"0 0 1024 1024\"><path d=\"M512 213.333c147.328 0 251.349 119.339 237.525 289.28 74.453-1.963 189.141 32.043 189.141 158.72 0 82.347-66.987 149.333-149.333 149.333h-554.667c-82.347 0-149.333-66.987-149.333-149.333 0-119.339 105.771-163.541 189.141-158.72-7.125-179.968 94.208-289.28 237.525-289.28zM512 128c-170.923 0-310.059 134.016-319.104 302.592-109.653 19.755-192.896 115.456-192.896 230.741 0 129.579 105.088 234.667 234.667 234.667h554.667c129.579 0 234.667-105.088 234.667-234.667 0-115.285-83.243-210.987-192.896-230.741-9.045-168.576-148.181-302.592-319.104-302.592zM682.667 554.667h-128v170.667h-85.333v-170.667h-128l170.667-170.667 170.667 170.667z\" style=\"fill: rgba(139, 139, 139, 0.243)\"></path></svg>")
17
+
18
+ &.is-saved
19
+ background-size: 24px 33px
20
+ background-image: url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"1024\" height=\"1024\" viewBox=\"0 0 1024 1024\"><path d=\"M512 213.333c147.328 0 251.349 119.339 237.525 289.28 74.453-1.963 189.141 32.043 189.141 158.72 0 82.347-66.987 149.333-149.333 149.333h-554.667c-82.347 0-149.333-66.987-149.333-149.333 0-119.339 105.771-163.541 189.141-158.72-7.125-179.968 94.208-289.28 237.525-289.28zM512 128c-170.923 0-310.059 134.016-319.104 302.592-109.653 19.755-192.896 115.456-192.896 230.741 0 129.579 105.088 234.667 234.667 234.667h554.667c129.579 0 234.667-105.088 234.667-234.667 0-115.285-83.243-210.987-192.896-230.741-9.045-168.576-148.181-302.592-319.104-302.592zM682.667 554.667h-128v170.667h-85.333v-170.667h-128l170.667-170.667 170.667 170.667z\" style=\"fill: rgb(0, 163, 0)\"></path></svg>")
21
+
22
+ &.is-failed
23
+ background-image: url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"1024\" height=\"1024\" viewBox=\"0 0 1024 1024\"><path d=\"M512 213.333c147.328 0 251.349 119.339 237.525 289.28 74.453-1.963 189.141 32.043 189.141 158.72 0 82.347-66.987 149.333-149.333 149.333h-554.667c-82.347 0-149.333-66.987-149.333-149.333 0-119.339 105.771-163.541 189.141-158.72-7.125-179.968 94.208-289.28 237.525-289.28zM512 128c-170.923 0-310.059 134.016-319.104 302.592-109.653 19.755-192.896 115.456-192.896 230.741 0 129.579 105.088 234.667 234.667 234.667h554.667c129.579 0 234.667-105.088 234.667-234.667 0-115.285-83.243-210.987-192.896-230.741-9.045-168.576-148.181-302.592-319.104-302.592zM682.667 554.667h-128v170.667h-85.333v-170.667h-128l170.667-170.667 170.667 170.667z\" style=\"fill: rgb(185, 1, 1)\"></path></svg>")
24
+ background-color: red
@@ -0,0 +1,43 @@
1
+ @use "iglu/font-size"
2
+ @use "iglu/spacing"
3
+ @use "formatic/settings/colors"
4
+
5
+ .c-formatic-stepper
6
+ display: grid
7
+ align-items: stretch
8
+ justify-content: left
9
+ grid-auto-flow: column
10
+
11
+ &__step
12
+ display: inline-block
13
+ border: 1px solid colors.$silver-gray
14
+ vertical-align: middle
15
+ padding-right: 1em
16
+ padding-left: 1em
17
+ padding-top: 0.5em
18
+ padding-bottom: 0.5em
19
+ border-radius: 0.3em
20
+ color: colors.$black
21
+ text-decoration: none
22
+ +font-size.huge
23
+
24
+ &__number
25
+ -webkit-appearance: none
26
+ -moz-appearance: none
27
+ font-family: 'Roboto Condensed'
28
+ width: 7em
29
+ height: 100%
30
+ outline-offset: 0
31
+ color: colors.$black
32
+ text-align: center
33
+ vertical-align: middle
34
+ border: 0
35
+ +font-size.large
36
+ +spacing.margin-bottom--small
37
+
38
+ .c-input.is-required &
39
+ border-left-color: colors.$paradise-pink
40
+ border-left-width: 2px
41
+
42
+ ::placeholder
43
+ color: colors.$silver-gray
@@ -0,0 +1,13 @@
1
+ @use "formatic/settings/colors"
2
+ @use "formatic/tools/terminal"
3
+
4
+ .c-formatic-string
5
+
6
+ &__input
7
+
8
+ &.is-terminal
9
+ +terminal.terminal
10
+
11
+ .c-formatic-wrapper.is-required &
12
+ border-left-color: colors.$paradise-pink
13
+ border-left-width: 2px
@@ -0,0 +1,22 @@
1
+ @use "formatic/settings/colors"
2
+
3
+ .c-formatic-textarea
4
+
5
+ &__input
6
+ background-position: right 0.5rem bottom 0.5rem
7
+ background-repeat: no-repeat
8
+ background-size: 20px 20px
9
+
10
+ &.is-loading
11
+ background-image: url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"1024\" height=\"1024\" viewBox=\"0 0 1024 1024\"><path d=\"M512 213.333c147.328 0 251.349 119.339 237.525 289.28 74.453-1.963 189.141 32.043 189.141 158.72 0 82.347-66.987 149.333-149.333 149.333h-554.667c-82.347 0-149.333-66.987-149.333-149.333 0-119.339 105.771-163.541 189.141-158.72-7.125-179.968 94.208-289.28 237.525-289.28zM512 128c-170.923 0-310.059 134.016-319.104 302.592-109.653 19.755-192.896 115.456-192.896 230.741 0 129.579 105.088 234.667 234.667 234.667h554.667c129.579 0 234.667-105.088 234.667-234.667 0-115.285-83.243-210.987-192.896-230.741-9.045-168.576-148.181-302.592-319.104-302.592zM682.667 554.667h-128v170.667h-85.333v-170.667h-128l170.667-170.667 170.667 170.667z\" style=\"fill: rgba(139, 139, 139, 0.243)\"></path></svg>")
12
+
13
+ &.is-saved
14
+ background-image: url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"1024\" height=\"1024\" viewBox=\"0 0 1024 1024\"><path d=\"M512 213.333c147.328 0 251.349 119.339 237.525 289.28 74.453-1.963 189.141 32.043 189.141 158.72 0 82.347-66.987 149.333-149.333 149.333h-554.667c-82.347 0-149.333-66.987-149.333-149.333 0-119.339 105.771-163.541 189.141-158.72-7.125-179.968 94.208-289.28 237.525-289.28zM512 128c-170.923 0-310.059 134.016-319.104 302.592-109.653 19.755-192.896 115.456-192.896 230.741 0 129.579 105.088 234.667 234.667 234.667h554.667c129.579 0 234.667-105.088 234.667-234.667 0-115.285-83.243-210.987-192.896-230.741-9.045-168.576-148.181-302.592-319.104-302.592zM682.667 554.667h-128v170.667h-85.333v-170.667h-128l170.667-170.667 170.667 170.667z\" style=\"fill: rgb(0, 163, 0)\"></path></svg>")
15
+
16
+ &.is-failed
17
+ background-image: url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"1024\" height=\"1024\" viewBox=\"0 0 1024 1024\"><path d=\"M512 213.333c147.328 0 251.349 119.339 237.525 289.28 74.453-1.963 189.141 32.043 189.141 158.72 0 82.347-66.987 149.333-149.333 149.333h-554.667c-82.347 0-149.333-66.987-149.333-149.333 0-119.339 105.771-163.541 189.141-158.72-7.125-179.968 94.208-289.28 237.525-289.28zM512 128c-170.923 0-310.059 134.016-319.104 302.592-109.653 19.755-192.896 115.456-192.896 230.741 0 129.579 105.088 234.667 234.667 234.667h554.667c129.579 0 234.667-105.088 234.667-234.667 0-115.285-83.243-210.987-192.896-230.741-9.045-168.576-148.181-302.592-319.104-302.592zM682.667 554.667h-128v170.667h-85.333v-170.667h-128l170.667-170.667 170.667 170.667z\" style=\"fill: rgb(185, 1, 1)\"></path></svg>")
18
+ background-color: red
19
+
20
+ .c-formatic-wrapper.is-required &
21
+ border-left-color: colors.$paradise-pink
22
+ border-left-width: 2px
@@ -0,0 +1,93 @@
1
+ @use "iglu/font-size"
2
+ @use "formatic/settings/colors"
3
+
4
+ .c-formatic-toggle
5
+ // Having grid in the wrapper and the <label>
6
+ // makes the caption width 100% (increases the click area)
7
+ display: grid
8
+ +font-size.default
9
+
10
+ label
11
+ display: inline-grid
12
+ // This component may be used as part of the plural `InputTogglesComponent`.
13
+ // There we may have multi-line captions per toggle. This is to align them.
14
+ grid-template-columns: max-content 1fr
15
+ grid-template-areas: 'switch caption' 'status status'
16
+
17
+ small
18
+ opacity: 0.5
19
+ +font-size.small
20
+
21
+ i // Slider
22
+ grid-area: switch
23
+ display: inline-block
24
+ width: 2.8em
25
+ height: 1.5em
26
+ border-radius: 1.5em
27
+ position: relative
28
+ vertical-align: middle
29
+ transition: background 0.25s
30
+ background: colors.$silver-gray
31
+
32
+ &:before // Pin
33
+ display: block
34
+ position: absolute
35
+ content: ""
36
+ top: 0.1em
37
+ left: 0.1em
38
+ width: 1.3em
39
+ height: 1.3em
40
+ border-radius: 50%
41
+ background-color: colors.$white
42
+ transition: left 0.1s
43
+
44
+ // Checkbox
45
+ input
46
+ position: absolute
47
+ visibility: hidden
48
+
49
+ // Active Slider
50
+ &:checked + i
51
+ background-color: colors.$jade-green
52
+
53
+ &.is-alert
54
+ background-color: colors.$paradise-pink
55
+
56
+ // Active Pin
57
+ &:checked + i:before
58
+ left: 1.4em
59
+ background-color: colors.$white
60
+
61
+ // Active Status
62
+ &:not(:checked) ~ .is-active
63
+ display: none
64
+ &:checked ~ .is-active
65
+ display: block
66
+
67
+ // Inactive Status
68
+ &:not(:checked) ~ .is-inactive
69
+ display: block
70
+ &:checked ~ .is-inactive
71
+ display: none
72
+
73
+ // Caption
74
+ span
75
+ grid-area: caption
76
+ margin-left: 0.5em
77
+ position: relative
78
+ top: 2px
79
+
80
+ // Status
81
+ .is-inactive,
82
+ .is-active
83
+ grid-area: status
84
+ margin-top: 0.5em
85
+ color: colors.$granite-gray
86
+ +font-size.smaller
87
+
88
+ // So that CI has a label with content to find and click on
89
+ // See https://www.rubydoc.info/github/jnicklas/capybara/Capybara%2FNode%2FActions:choose
90
+ &__label-caption-dummy
91
+ position: absolute
92
+ margin-left: -9999px
93
+ visibility: hidden