alchemy-chimera 0.5.3 → 1.0.1

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 (128) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/assets/scripts/chimera/chimera.js +13 -288
  3. package/assets/stylesheets/chimera/chimera.scss +273 -0
  4. package/bootstrap.js +6 -302
  5. package/config/routes.js +53 -5
  6. package/controller/00-chimera_controller.js +16 -0
  7. package/controller/chimera_editor_controller.js +161 -615
  8. package/controller/chimera_static_controller.js +102 -9
  9. package/lib/chimera_config.js +107 -163
  10. package/model/model.js +1 -1
  11. package/package.json +8 -12
  12. package/view/chimera/dashboard.hwk +8 -0
  13. package/view/chimera/editor/index.hwk +20 -0
  14. package/view/chimera/sidebar.hwk +4 -0
  15. package/view/chimera/widgets.hwk +8 -0
  16. package/view/layouts/chimera_base.hwk +15 -0
  17. package/view/layouts/chimera_basics.hwk +15 -0
  18. package/view/layouts/chimera_body.hwk +24 -0
  19. package/assets/scripts/chimera/assoc_field.js +0 -311
  20. package/assets/scripts/chimera/boolean_field.js +0 -53
  21. package/assets/scripts/chimera/chimera_field.js +0 -617
  22. package/assets/scripts/chimera/chimera_field_wrapper.js +0 -557
  23. package/assets/scripts/chimera/date_field.js +0 -170
  24. package/assets/scripts/chimera/geopoint_field.js +0 -147
  25. package/assets/scripts/chimera/medium-button.js +0 -6
  26. package/assets/scripts/chimera/object_field.js +0 -51
  27. package/assets/scripts/chimera/page-editor.js +0 -3
  28. package/assets/scripts/chimera/password_field.js +0 -54
  29. package/assets/scripts/chimera/schema_field.js +0 -300
  30. package/assets/scripts/chimera/text_field.js +0 -119
  31. package/assets/scripts/rome/rome.js +0 -4978
  32. package/assets/scripts/vex/vex.dialog.js +0 -151
  33. package/assets/scripts/vex/vex.js +0 -193
  34. package/assets/stylesheets/chimera/chimera.less +0 -1075
  35. package/assets/stylesheets/chimera_old/chimera.less +0 -351
  36. package/assets/stylesheets/chimera_old/core.less +0 -315
  37. package/assets/stylesheets/chimera_old/font.less +0 -38
  38. package/assets/stylesheets/chimera_old/mixins.less +0 -35
  39. package/assets/stylesheets/chimera_old/page-editor.less +0 -23
  40. package/assets/stylesheets/rome/rome.less +0 -130
  41. package/assets/stylesheets/vex/vex-theme-bottom-right-corner.less +0 -613
  42. package/assets/stylesheets/vex/vex.default.less +0 -501
  43. package/assets/stylesheets/vex/vex.flat.less +0 -443
  44. package/assets/stylesheets/vex/vex.less +0 -320
  45. package/controller/chimera_page_controller.js +0 -14
  46. package/controller/chimera_settings_controller.js +0 -129
  47. package/controller/tasks_chimera_controller.js +0 -106
  48. package/helper/chimera_helper.js +0 -202
  49. package/lib/chimera_action_fields.js +0 -292
  50. package/lib/chimera_field/belongsto_chimera_field.js +0 -155
  51. package/lib/chimera_field/boolean_chimera_field.js +0 -19
  52. package/lib/chimera_field/date_chimera_field.js +0 -20
  53. package/lib/chimera_field/datetime_chimera_field.js +0 -20
  54. package/lib/chimera_field/enum_chimera_field.js +0 -131
  55. package/lib/chimera_field/geopoint_chimera_field.js +0 -20
  56. package/lib/chimera_field/habtm_chimera_field.js +0 -55
  57. package/lib/chimera_field/hasoneparent_chimera_field.js +0 -18
  58. package/lib/chimera_field/html_chimera_field.js +0 -20
  59. package/lib/chimera_field/object_chimera_field.js +0 -18
  60. package/lib/chimera_field/password_chimera_field.js +0 -18
  61. package/lib/chimera_field/schema_chimera_field.js +0 -149
  62. package/lib/chimera_field/text_chimera_field.js +0 -20
  63. package/lib/chimera_field/time_chimera_field.js +0 -18
  64. package/lib/chimera_field.js +0 -208
  65. package/model/setting_model.js +0 -51
  66. package/public/chimera/codedor.svg +0 -28
  67. package/view/chimera/dashboard.ejs +0 -5
  68. package/view/chimera/editor/add.ejs +0 -32
  69. package/view/chimera/editor/edit.ejs +0 -33
  70. package/view/chimera/editor/index.ejs +0 -87
  71. package/view/chimera/editor/remove.ejs +0 -23
  72. package/view/chimera/editor/view.ejs +0 -54
  73. package/view/chimera/elements/editor_actions.ejs +0 -4
  74. package/view/chimera/elements/empty +0 -0
  75. package/view/chimera/field_wrappers/_entries.ejs +0 -91
  76. package/view/chimera/field_wrappers/_wrapper.ejs +0 -78
  77. package/view/chimera/field_wrappers/date_edit.ejs +0 -23
  78. package/view/chimera/field_wrappers/date_list.ejs +0 -3
  79. package/view/chimera/field_wrappers/date_view.ejs +0 -16
  80. package/view/chimera/field_wrappers/default_edit.ejs +0 -22
  81. package/view/chimera/field_wrappers/default_list.ejs +0 -3
  82. package/view/chimera/field_wrappers/default_peek.ejs +0 -3
  83. package/view/chimera/field_wrappers/default_view.ejs +0 -14
  84. package/view/chimera/field_wrappers/geopoint_edit.ejs +0 -25
  85. package/view/chimera/field_wrappers/geopoint_list.ejs +0 -5
  86. package/view/chimera/field_wrappers/geopoint_view.ejs +0 -18
  87. package/view/chimera/field_wrappers/schema_edit.ejs +0 -19
  88. package/view/chimera/field_wrappers/text_edit.ejs +0 -22
  89. package/view/chimera/field_wrappers/text_list.ejs +0 -1
  90. package/view/chimera/fields/belongsto_edit.ejs +0 -4
  91. package/view/chimera/fields/belongsto_list.ejs +0 -1
  92. package/view/chimera/fields/belongsto_peek.ejs +0 -1
  93. package/view/chimera/fields/boolean_edit.ejs +0 -17
  94. package/view/chimera/fields/boolean_list.ejs +0 -3
  95. package/view/chimera/fields/boolean_view.ejs +0 -3
  96. package/view/chimera/fields/date_edit.ejs +0 -14
  97. package/view/chimera/fields/date_list.ejs +0 -9
  98. package/view/chimera/fields/date_peek.ejs +0 -9
  99. package/view/chimera/fields/date_view.ejs +0 -9
  100. package/view/chimera/fields/datetime_edit.ejs +0 -24
  101. package/view/chimera/fields/datetime_list.ejs +0 -9
  102. package/view/chimera/fields/datetime_view.ejs +0 -10
  103. package/view/chimera/fields/default_edit.ejs +0 -10
  104. package/view/chimera/fields/default_list.ejs +0 -15
  105. package/view/chimera/fields/default_view.ejs +0 -1
  106. package/view/chimera/fields/enum_edit.ejs +0 -10
  107. package/view/chimera/fields/geopoint_edit.ejs +0 -10
  108. package/view/chimera/fields/geopoint_list.ejs +0 -9
  109. package/view/chimera/fields/geopoint_view.ejs +0 -9
  110. package/view/chimera/fields/habtm_edit.ejs +0 -5
  111. package/view/chimera/fields/hasoneparent_edit.ejs +0 -6
  112. package/view/chimera/fields/hasoneparent_list.ejs +0 -1
  113. package/view/chimera/fields/object_edit.ejs +0 -8
  114. package/view/chimera/fields/password_edit.ejs +0 -11
  115. package/view/chimera/fields/schema_edit.ejs +0 -14
  116. package/view/chimera/fields/text_edit.ejs +0 -5
  117. package/view/chimera/fields/text_list.ejs +0 -9
  118. package/view/chimera/fields/text_view.ejs +0 -3
  119. package/view/chimera/fields/time_edit.ejs +0 -15
  120. package/view/chimera/fields/time_list.ejs +0 -9
  121. package/view/chimera/fields/time_view.ejs +0 -9
  122. package/view/chimera/page/edit.ejs +0 -18
  123. package/view/chimera/page_editor.ejs +0 -5
  124. package/view/chimera/sidebar.ejs +0 -40
  125. package/view/chimera/tasks/index.ejs +0 -114
  126. package/view/layouts/chimera.ejs +0 -12
  127. package/view/layouts/chimera_base.ejs +0 -11
  128. package/view/layouts/chimera_body.ejs +0 -43
package/CHANGELOG.md CHANGED
@@ -1,3 +1,36 @@
1
+ ## 1.0.1 (2022-01-28)
2
+
3
+ * Allow setting a simple menu sidebar in the config
4
+ * Add simple notification after adding/saving
5
+ * Add page & window titles
6
+ * Improve edit buttons
7
+
8
+ ## 1.0.0 (2021-09-12)
9
+
10
+ * Use widgets to create the interface
11
+ * Release preview version of 1.0.0
12
+
13
+ ## 0.6.0 (2020-07-21)
14
+
15
+ * Make compatible with Alchemy v1.1.0
16
+ * If no field title is found, use the name instead
17
+ * Fix "empty" still showing html content on client renders
18
+ * Use `display_field_select` model property when querying for related data
19
+ * Also use `display_field_select` when querying for the actionValue
20
+ * Do not html-encode string input values, hawkejs will do that
21
+ * Use `display_field_select` property when editing a record & in habtm requests
22
+ * Fix client-side renders of schema fields
23
+ * If a change is made to a translatable field, send it entirely to the server, not just the changed prefix
24
+ * Use ckeditor 4.13 from now on + fix pasting styled text
25
+ * Go back to index page when clicking on save&close and nothing has changed
26
+ * The chimera editor now queries the document before saving, this fixed subschema saves
27
+ * Add checkbox toggle-switch stylings + some small ui fixes
28
+ * Use Tail datetime picker
29
+ * Use `export` field group for exports + use formatted action values
30
+ * Get model title from the `title` property of the class
31
+ * Allow setting a default page size in the plugin config or on the model
32
+ * Make sure to translate `BelongsTo#actionValue()` responses
33
+
1
34
  ## 0.5.3 (2018-12-06)
2
35
 
3
36
  * Allow using classic (iframe) mode in ckeditor Text field
@@ -1,294 +1,19 @@
1
- hawkejs.scene.on({type: 'set', entry: 'chimera/field_wrappers/_wrapper'}, function applyField(element, variables) {
1
+ hawkejs.scene.after({
2
+ type : 'set',
3
+ name : 'page-notification',
4
+ }, function onNotification(element, variables, block) {
2
5
 
3
- // Ignore nested wrappers
4
- if (element.classList.contains('chimeraField-is-nested')) {
5
- return;
6
- }
7
-
8
- hawkejs.require(['chimera/chimera_field_wrapper', 'chimera/chimera_field'], function loaded(err) {
9
-
10
- var options;
11
-
12
- if (err) {
13
- throw err;
14
- }
15
-
16
- // Create the wrap options
17
- options = {
18
- variables: variables,
19
- container: element,
20
- viewname: variables.data.field.viewname
21
- };
22
-
23
- new ChimeraFieldWrapper(options);
24
- });
25
- });
26
-
27
- hawkejs.scene.on({type: 'rendered'}, function rendered(variables, renderData) {
28
-
29
- var key;
30
-
31
- Object.each(variables.__newFlashes, function eachFlash(flash) {
32
- chimeraFlash(flash);
33
- });
34
- });
6
+ let notification = element.querySelector('.notification');
35
7
 
36
- hawkejs.scene.on({type: 'set', name: 'chimera-cage', template: 'chimera/editor/view'}, applySave);
37
- hawkejs.scene.on({type: 'set', name: 'chimera-cage', template: 'chimera/editor/edit'}, applySave);
38
- hawkejs.scene.on({type: 'set', name: 'chimera-cage', template: 'chimera/editor/add'}, applySave);
39
-
40
- /**
41
- * Apply save functionality when clicking on the "save" button
42
- */
43
- function applySave(el, variables) {
44
-
45
- var preventDuplicate,
46
- variables,
47
- isDraft,
48
- $editor,
49
- $save_close,
50
- $saves,
51
- $save;
52
-
53
- isDraft = this.filter.template === 'chimera/editor/add';
54
-
55
- $editor = $('.chimera-editor', el).first();
56
- $save = $('.action-save', $editor);
57
- $save_close = $('.action-saveClose', $editor);
58
- $saves = $('.action-save, .action-saveClose', $editor);
59
-
60
- if (variables.__chimeraReadOnly) {
61
- $save.remove();
62
- $save_close.remove();
8
+ if (!notification) {
63
9
  return;
64
10
  }
65
11
 
66
- $saves.click(function onClick(e) {
67
-
68
- var $fieldwrappers,
69
- containers,
70
- $this = $(this),
71
- data,
72
- obj;
73
-
74
- e.preventDefault();
75
-
76
- if (preventDuplicate === true) {
77
- //return chimeraFlash('Save ignored:<br>Save already in progress');
78
- }
79
-
80
- // Get all the non-nested containers
81
- containers = $editor[0].querySelectorAll('.chimeraField-container:not(.chimeraField-is-nested)');
82
-
83
- data = {};
84
- obj = {
85
- create: isDraft,
86
- data: data
87
- };
88
-
89
- if (isDraft) {
90
- // Set the initial passed-along-by-server values first
91
- Object.each(variables.groups, function eachGroup(group, name) {
92
- group[0].fields.forEach(function eachField(entry) {
93
- return doFieldEntry(entry);
94
- });
95
- });
96
-
97
- function doFieldEntry(entry, base_path) {
98
-
99
- var subgroup,
100
- subentry,
101
- subpath,
102
- path,
103
- i,
104
- j;
105
-
106
- if (base_path) {
107
- path = base_path;
108
- }
109
-
110
- if (!path) {
111
- path = '';
112
- } else {
113
- path += '.';
114
- }
115
-
116
- path += entry.field.path;
117
-
118
- if (entry.field.fieldType.type_name == 'schema') {
119
-
120
- if (entry.field.fieldType.isArray) {
121
- for (i = 0; i < entry.value.length; i++) {
122
- subgroup = entry.value[i];
123
- subpath = base_path += '.' + i;
124
-
125
- subgroup.fields.forEach(function eachSubField(entry) {
126
- return doFieldEntry(entry, subpath);
127
- });
128
- }
129
- } else if (entry.value) {
130
-
131
- subgroup = entry.value[0];
132
-
133
- subgroup.fields.forEach(function eachSubField(entry) {
134
- return doFieldEntry(entry, base_path);
135
- });
136
- }
137
- } else if (entry.value != null) {
138
- Object.setPath(data, path, entry.value);
139
- }
140
- }
141
- }
142
-
143
- containers.forEach(function eachFieldContainer(container) {
144
-
145
- var instance = container.CFWrapper,
146
- sub_data;
147
-
148
- if (!instance) {
149
- console.log('Found no instance on', container);
150
- return;
151
- }
152
-
153
- // Skip nested wrappers,
154
- // this could mess up the data
155
- if (instance.nested_in) {
156
- return;
157
- }
158
-
159
- sub_data = instance.getData(true);
160
-
161
- Object.merge(data, sub_data);
162
- });
163
-
164
- if (Object.isEmpty(obj.data)) {
165
- return chimeraFlash('Save ignored:<br>No modifications were made');
166
- }
167
-
168
- var editurl = document.location.href;
169
-
170
- var save_options = {
171
- post : obj,
172
- history : false
173
- };
174
-
175
- if (isDraft) {
176
- save_options.history = true;
177
- }
178
-
179
- hawkejs.scene.openUrl($this.attr('href'), save_options, function saved(err, result) {
180
-
181
- if (err != null && result != null) {
182
- preventDuplicate = false;
183
- chimeraFlash('Something went wrong: ' + result);
184
- }
185
-
186
- // @todo: go to the correct url
187
- //hawkejs.scene.reload(editurl);
188
- });
189
-
190
- preventDuplicate = true;
191
- });
192
- }
193
-
194
- hawkejs.scene.on({type: 'set', template: 'chimera/sidebar'}, sidebarCollapse);
195
-
196
- function sidebarCollapse(el) {
197
-
198
- var childclass = '',
199
- $active = $(el.querySelectorAll('.sideNav .active')),
200
- $section = $('.section'),
201
- $links = $('a', el);
202
-
203
- // Open active section
204
- toggleMenu($active.parent().parent().prev());
205
-
206
- $links.click(function(e) {
207
- var $this = $(this);
208
-
209
- if ($this.hasClass('section')) {
210
- return;
211
- }
212
-
213
- $links.removeClass('active');
214
- $this.addClass('active');
215
- });
216
-
217
- // Open clicked section
218
- $section.on('click', function onMenuParentClick(e){
219
- e.preventDefault();
220
- toggleMenu($(this));
221
- });
222
-
223
- // Handle opening/closing of sections
224
- function toggleMenu(section){
225
- childclass = '.'+section.data('childclass');
226
-
227
- if(section.attr('data-after') == '\u25B6'){
228
- section.attr('data-after', '\u25BC');
229
- } else {
230
- section.attr('data-after', '\u25B6');
231
- }
232
-
233
- $(childclass).toggleClass('hidden');
234
- }
235
- }
236
-
237
- hawkejs.scene.on({type: 'set', template: 'chimera/editor/remove'}, removeRecord);
238
-
239
- function removeRecord(el) {
240
-
241
- var url;
242
-
243
- $('.remove-btn').on('click', function(e){
244
- e.preventDefault();
245
- url = $(this).attr('href');
246
-
247
- hawkejs.scene.openUrl(url, {post: {sure: 'yes'}}, function(result) {
248
-
249
- });
250
- });
251
-
252
- }
253
-
254
- function chimeraFlash(flash) {
255
-
256
- var chimera_options,
257
- className,
258
- element,
259
- obj;
260
-
261
- if (typeof vex == 'undefined') {
262
- console.log('"vex" not found, flash:', flash);
263
- return;
264
- }
265
-
266
- chimera_options = hawkejs.scene.exposed.chimera_options || {};
267
-
268
- if (typeof flash == 'string') {
269
- flash = {
270
- message: flash
271
- }
272
- }
273
-
274
- if (flash.className) {
275
- className = ' ' + flash.className;
276
- } else {
277
- className = '';
278
- }
279
-
280
- obj = {
281
- className: 'vex-theme-bottom-right-corner vex-chimera-flash' + className,
282
- message: flash.message
283
- };
284
-
285
- element = vex.dialog.alert(obj);
286
-
287
- setTimeout(function closeVexFlash() {
288
- vex.close(element.data('id'))
289
- }, flash.timeout || chimera_options.notification_timeout || 2500);
290
- }
12
+ setTimeout(() => {
13
+ notification.classList.add('removing');
291
14
 
292
- // $(document).ready(function() {
293
- // vex.defaultOptions.className = 'vex-theme-flat-attack';
294
- // });
15
+ setTimeout(() => {
16
+ notification.remove();
17
+ }, 2500);
18
+ }, 4 * 1000);
19
+ });
@@ -0,0 +1,273 @@
1
+ @import "reset.scss";
2
+ @import "fonts/roboto.scss";
3
+
4
+ body {
5
+ font-family: 'Roboto', sans-serif;
6
+ }
7
+
8
+ .chimera-wrapper {
9
+ --sidebar-bg-color: #4a4e58;
10
+ --text-color: #475466;
11
+ --main-bg-color: #ebedf0;
12
+ --main-border-color: #dadee0;
13
+ --button-bg-color: #F4F5F9;
14
+ --button-bg-hover-color: #e7e9f2;
15
+ --button-text-color: #3699FF;
16
+
17
+ --notification-bg-color: #4a4e58;
18
+ --notification-text-color: #f4f5f9;
19
+ --notification-border-color: #dadee0;
20
+
21
+ --color-title: #475466;
22
+ --color-box-border: #DADEE0;
23
+ --color-active: #3699FF;
24
+ --color-text: #475466;
25
+ --color-input-border: #CCD7E6;
26
+
27
+ display: flex;
28
+ min-height: 100vh;
29
+ width: 100%;
30
+ color: var(--text-color);
31
+ }
32
+
33
+ .btn {
34
+ background-color: var(--button-bg-color);
35
+ text-decoration: none;
36
+ color: var(--button-text-color);
37
+ line-height: 2rem;
38
+ min-width: 10rem;
39
+ text-align: center;
40
+ border-radius: 2px;
41
+ font-weight: 500;
42
+ cursor: pointer;
43
+ border: 1px solid;
44
+
45
+ &:hover {
46
+ background-color: var(--button-bg-hover-color);
47
+ }
48
+ }
49
+
50
+ .chimera-sidebar {
51
+ background-color: var(--sidebar-bg-color);
52
+ flex: 0 0 14rem;
53
+ display: flex;
54
+ flex-flow: column;
55
+ }
56
+
57
+ .chimera-content {
58
+ background-color: var(--main-bg-color);
59
+ flex: 1 0;
60
+ display: flex;
61
+ flex-flow: column;
62
+
63
+ .chimera-page-header {
64
+ border-color: var(--main-border-color);
65
+ border-style: solid;
66
+ border-width: 0 0 1px;
67
+ background-color: white;
68
+ }
69
+ }
70
+
71
+ .chimera-page-header {
72
+ height: 4rem;
73
+ display: flex;
74
+ padding: 0.8rem;
75
+ justify-content: space-between;
76
+
77
+ > * {
78
+ display: flex;
79
+ align-self: center;
80
+ }
81
+
82
+ .page-title {
83
+ font-size: 1.1rem;
84
+ font-weight: bold;
85
+ }
86
+
87
+ .page-actions {
88
+
89
+ }
90
+ }
91
+
92
+ .chimera-main {
93
+ flex: 1;
94
+ padding: 0.5rem;
95
+ }
96
+
97
+ .main-widgets {
98
+ height: 100%;
99
+ }
100
+
101
+ .chimera-editor-widgets {
102
+ padding: 1rem;
103
+
104
+ alchemy-widget[type="alchemy_field"] {
105
+ margin-bottom: 1rem;
106
+ }
107
+
108
+ .form-field-info label,
109
+ .form-field-info alchemy-label {
110
+ display: block;
111
+ font-size: 1.2rem;
112
+ }
113
+ }
114
+
115
+ alchemy-widgets-navigation {
116
+ --border-color: #333333;
117
+
118
+ ul {
119
+ padding-left: 0;
120
+
121
+ li {
122
+ list-style: none;
123
+ border-bottom: 1px solid var(--border-color);
124
+ }
125
+
126
+ li:first-of-type {
127
+ border-top: 1px solid var(--border-color);
128
+ }
129
+ }
130
+
131
+ alchemy-widget[type="link"] {
132
+ width: 100%;
133
+ height: 3rem;
134
+ display: flex;
135
+
136
+ a {
137
+ width: 100%;
138
+ align-self: stretch;
139
+ display: flex;
140
+ align-items: center;
141
+ padding-left: 1rem;
142
+ text-decoration: none;
143
+ color: white;
144
+
145
+ &:hover,
146
+ &.active-link {
147
+ background-color: rgba(190, 190, 190, 0.5);
148
+ }
149
+ }
150
+ }
151
+ }
152
+
153
+ .chimera-main[data-he-template="chimera/widgets"] {
154
+ padding: 1rem;
155
+ }
156
+
157
+ .chimera-input-field {
158
+ padding: 0px 12px;
159
+ border: 1px solid var(--color-input-border);
160
+ color: var(--text-color);
161
+ -webkit-appearance: none;
162
+ height: 2rem;
163
+ }
164
+
165
+ .page-notification {
166
+ .notification {
167
+ border: 1px solid var(--notification-border-color);
168
+ background: var(--notification-bg-color);
169
+ color: var(--notification-text-color);
170
+ border-radius: 5px;
171
+ padding: 0.5rem 0.8rem;
172
+ }
173
+ }
174
+
175
+ .removing {
176
+ transition: opacity 2s;
177
+ opacity: 0;
178
+ }
179
+
180
+ alchemy-table .aft-column-filters input {
181
+ @extend .chimera-input-field;
182
+ width: 100%;
183
+ }
184
+
185
+ alchemy-field {
186
+ border: 1px solid var(--color-box-border);
187
+ background-color: white;
188
+ border-radius: 4px;
189
+
190
+ alchemy-label {
191
+ padding-left: 1rem;
192
+ line-height: 3rem;
193
+ font-size: 16px;
194
+ font-weight: 500;
195
+ color: var(--color-title);
196
+ border-bottom: 1px solid var(--color-box-border);
197
+ }
198
+
199
+ alchemy-field-translatable {
200
+ .prefix-buttons {
201
+ width: 100%;
202
+ border-bottom: 1px solid var(--color-box-border);
203
+ display: flex;
204
+
205
+ button {
206
+ flex: 1;
207
+ font-size: 16px;
208
+ font-weight: 500;
209
+ color: var(--button-text-color);
210
+ letter-spacing: 0px;
211
+ background: transparent;
212
+ border: none;
213
+ cursor: pointer;
214
+
215
+ height: 3rem;
216
+ display: flex;
217
+ flex-flow: column;
218
+ justify-content: center;
219
+ align-items: center;
220
+
221
+ &.active {
222
+ box-shadow: inset 0 -2px var(--color-active);
223
+ }
224
+
225
+ &:hover {
226
+ background-color: var(--button-bg-hover-color);
227
+ }
228
+ }
229
+ }
230
+ }
231
+
232
+ .field {
233
+ display: flex;
234
+ padding: 1rem;
235
+
236
+ > * {
237
+ flex: 1;
238
+ }
239
+
240
+ > alchemy-widget {
241
+ border: 1px solid var(--color-input-border);
242
+ padding: 0 12px;
243
+ }
244
+ }
245
+
246
+ .field input[type="text"],
247
+ .field input[type="number"],
248
+ .field input[type="color"] {
249
+ @extend .chimera-input-field;
250
+ height: 3rem;
251
+ }
252
+
253
+ .field input[type="color"] {
254
+ background-color: transparent;
255
+ border: none;
256
+ padding: 0;
257
+ }
258
+ }
259
+
260
+ .aft-actions {
261
+ a {
262
+ color: var(--button-text-color);
263
+ background-color: var(--button-bg-color);
264
+ padding: 0.5rem;
265
+ border-radius: 6px;
266
+ margin: 0.2rem;
267
+ display: inline-block;
268
+
269
+ &:hover {
270
+ background-color: var(--button-bg-hover-color);
271
+ }
272
+ }
273
+ }