@silexlabs/silex 3.5.1-7 → 3.5.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.
@@ -12,23 +12,39 @@
12
12
  }
13
13
  h2 {
14
14
  font-size: 18px;
15
- background: $lighterPrimaryColor;
15
+ background: var(--silex-bg-lighter);
16
16
  border-radius: 8px 8px 0 0;
17
17
  padding: 8px;
18
18
  margin: 0;
19
19
  font-weight: normal;
20
20
  }
21
+
21
22
  h3 {
22
23
  margin: 10px 0;
23
24
  font-size: 18px;
24
25
  font-weight: normal;
25
26
  }
26
- //Better contrast than grapesjs default for select menu et input
27
- select, input {
28
- background-color: $darkerPrimaryColor;
27
+
28
+ // Better contrast than grapesjs default for select menu and input
29
+ select,
30
+ input {
31
+ background-color: var(--silex-input-bg);
29
32
  }
30
- .gjs-color-warn, .gjs-sm-sector .gjs-sm-field input, .gjs-clm-tags .gjs-sm-field input, .gjs-sm-sector .gjs-clm-field input, .gjs-clm-tags .gjs-clm-field input, .gjs-sm-sector .gjs-sm-field select, .gjs-clm-tags .gjs-sm-field select, .gjs-sm-sector .gjs-clm-field select, .gjs-clm-tags .gjs-clm-field select {
31
- color: $secondaryColor;
33
+ select.gjs-input-unit {
34
+ height: 100%;
35
+ background-color: transparent;
36
+ }
37
+
38
+ .gjs-color-warn,
39
+ .gjs-sm-sector .gjs-sm-field input,
40
+ .gjs-clm-tags .gjs-sm-field input,
41
+ .gjs-sm-sector .gjs-clm-field input,
42
+ .gjs-clm-tags .gjs-clm-field input,
43
+ .gjs-sm-sector .gjs-sm-field select,
44
+ .gjs-clm-tags .gjs-sm-field select,
45
+ .gjs-sm-sector .gjs-clm-field select,
46
+ .gjs-clm-tags .gjs-clm-field select {
47
+ color: var(--silex-text-primary);
32
48
  }
33
49
  }
34
50
 
@@ -70,21 +86,30 @@
70
86
  pointer-events: auto;
71
87
  overflow: hidden; /* settings scroll is on .settings-body */
72
88
  display: flex;
73
- flex-direction: column;
89
+
90
+ background-color: rgba(0, 0, 0, 0.7);
91
+ backdrop-filter: blur(4px);
92
+
93
+ .silex-bar .silex-list {
94
+ display: flex; // This list is tabs
95
+ }
74
96
 
75
97
  .settings-content {
76
- flex: 1;
77
98
  display: flex;
78
99
  flex-direction: column;
79
100
  background-color: var(--primaryColor);
80
- overflow: hidden;
101
+ overflow: auto;
102
+ width: 920px;
103
+ max-width: 100%;
104
+ max-height: 100%;
105
+ margin: auto;
81
106
  }
82
107
  .settings-header {
83
108
  display: flex;
84
109
  align-items: center;
85
110
  justify-content: space-between;
86
111
  padding: 16px 20px;
87
- border-bottom: 1px solid var(--gjs-border-color, #ddd);
112
+ border-bottom: 1px solid var(--silex-border-color-strong);
88
113
  }
89
114
  .settings-header h3 {
90
115
  margin: 0;
@@ -114,36 +139,26 @@
114
139
  flex-direction: column;
115
140
  }
116
141
  .settings-body .silex-sidebar-dialog {
117
- flex: 1;
118
- }
119
- footer {
120
- position: fixed;
121
- z-index: 10;
122
- bottom: 0;
123
- left: 0;
124
- width: 100%;
125
- padding: 20px 0;
142
+ flex-direction: column;
126
143
  }
127
144
  form.silex-form {
128
- padding-bottom: 100px; // leave space for fixed footer
129
145
  textarea {
130
146
  min-height: 250px;
131
147
  }
132
148
  }
133
149
  .silex-form__element {
134
150
  padding: 10px 5px;
135
- border: 1px solid $lighterPrimaryColor;
136
151
  margin: 10px 0;
137
152
  width: 98%;
138
153
  }
154
+
139
155
  footer {
140
- position: fixed;
141
156
  z-index: 10;
142
157
  bottom: 0;
143
158
  left: 0;
144
159
  width: 100%;
145
160
  padding: 20px 0;
146
- background-color: $primaryColor;
161
+ background-color: var(--silex-bg-main);
147
162
  &>*:last-child {
148
163
  margin-right: 30px;
149
164
  }
@@ -169,23 +184,23 @@ input.silex-button[type="button"],
169
184
  input.silex-button[type="submit"] {
170
185
  cursor: pointer;
171
186
  font-family: inherit;
172
- color: #fff;
187
+ color: var(--silex-text-inverse);
173
188
  display: inline-flex;
174
189
  align-items: center;
175
190
  justify-content: center;
176
- border: 1px solid #e9ebeb;
177
- border-bottom-color: #e1e3e3;
191
+ border: 1px solid var(--silex-border-color);
178
192
  border-radius: 4px;
179
- box-shadow: 0 2px 4px 0 rgba(14, 30, 37, .12);
180
- background-color: $lighterPrimaryColor;
181
- border-color: transparent;
193
+ box-shadow: var(--silex-shadow-sm);
194
+ background-color: var(--silex-button-bg);
182
195
  padding: 5px;
196
+
183
197
  &:focus {
184
198
  outline: none;
185
- box-shadow: 0 0 0 2px $tertiaryColor;
199
+ box-shadow: 0 0 0 2px var(--silex-focus-outline);
186
200
  }
201
+
187
202
  &:hover {
188
- background-color: $darkerPrimaryColor;
203
+ background-color: var(--silex-button-hover-bg);
189
204
  }
190
205
  }
191
206
 
@@ -196,11 +211,11 @@ input.silex-button[type="submit"] {
196
211
  }
197
212
 
198
213
  .silex-button.silex-button--primary {
199
- background-color: $lighterPrimaryColor;
214
+ background-color: var(--silex-button-bg);
200
215
  }
201
216
 
202
217
  .silex-button.silex-button--secondary {
203
- background-color: $primaryColor;
218
+ background-color: var(--silex-bg-main);
204
219
  }
205
220
 
206
221
  .silex-button--size {
@@ -224,11 +239,12 @@ input.silex-button[type="submit"] {
224
239
  .silex-sidebar-dialog,
225
240
  .silex-bar {
226
241
  display: flex;
242
+ align-items: start;
227
243
  &>* {
228
244
  margin: 5px;
229
245
  }
230
246
  main {
231
- width: 93%;
247
+ width: 99%;
232
248
  }
233
249
  }
234
250
 
@@ -237,24 +253,26 @@ ul.silex-list {
237
253
  list-style: none;
238
254
  margin: 0;
239
255
  padding: 0;
240
- //background-color: #575757;
241
- &>li {
256
+
257
+ & > li {
242
258
  padding: 5px;
243
- border-bottom: 1px solid $lighterPrimaryColor;
244
- //background-color: #444;
259
+ border-bottom: 1px solid var(--silex-border-color-strong);
245
260
  margin: 5px;
246
261
  }
262
+
247
263
  fieldset {
248
- border-color: $lighterPrimaryColor;
264
+ border-color: var(--silex-border-color-strong);
249
265
  }
250
- h4 { // badge-like
266
+
267
+ h4 {
268
+ // badge-like
251
269
  display: inline-block;
252
270
  padding: 5px;
253
271
  padding-bottom: 2px;
254
272
  margin: 10px 5px;
255
273
  font-weight: normal;
256
- color: #3d3d3d;
257
- background-color: #c4c4c4;
274
+ color: var(--silex-badge-text);
275
+ background-color: var(--silex-badge-bg);
258
276
  }
259
277
  .silex-list__item__body {
260
278
  display: flex;
@@ -272,36 +290,48 @@ ul.silex-list {
272
290
 
273
291
  ol.silex-list--menu,
274
292
  ul.silex-list--menu {
275
- &>li {
293
+ & > li {
276
294
  padding: 15px;
277
295
  margin: 0;
278
296
  border: 1px solid transparent;
279
- border-bottom-color: $lighterPrimaryColor;
297
+ border-bottom-color: var(--silex-border-color-strong);
280
298
  text-align: center;
281
299
  cursor: pointer;
300
+
301
+ &:first-child {
302
+ border-top-color: var(--silex-border-color-strong);
303
+ }
304
+
305
+ &:hover {
306
+ color: var(--silex-accent-primary);
307
+ background-color: var(--silex-hover-bg);
308
+ }
282
309
  }
283
- &>li:first-child {
284
- border-top-color: $lighterPrimaryColor;
285
- }
286
- .active,
287
- &>li:hover {
288
- color: $tertiaryColor;
289
- background-color: $darkerPrimaryColor;
310
+
311
+ .active {
312
+ color: var(--silex-accent-primary);
313
+ background-color: var(--silex-hover-bg);
290
314
  }
291
315
  }
292
316
 
293
317
  form.silex-form {
294
318
  display: flex;
295
319
  flex-direction: column;
320
+
296
321
  footer {
297
322
  text-align: right;
298
- border-top: 1px solid $lighterPrimaryColor;
323
+ border-top: 1px solid var(--silex-border-color-strong);
299
324
  padding: 20px 0 10px;
300
325
  margin: 20px 0 0;
301
326
  }
302
- button, input, optgroup, select, textarea {
303
- background-color: $darkerPrimaryColor;
304
- color: $secondaryColor;
327
+
328
+ button,
329
+ input,
330
+ optgroup,
331
+ select,
332
+ textarea {
333
+ background-color: var(--silex-input-bg);
334
+ color: var(--silex-text-primary);
305
335
  padding: 5px;
306
336
  border: none;
307
337
  }
@@ -315,7 +345,4 @@ form.silex-form {
315
345
  display: inline-flex;
316
346
  flex-direction: column;
317
347
  }
318
- .silex-form__group.col2 {
319
- column-count: 2;
320
- }
321
348
  }
@@ -0,0 +1,93 @@
1
+ /**
2
+ * THEME-BASE.SCSS
3
+ * Base theming system for Silex
4
+ *
5
+ * Philosophy:
6
+ * - Leverage GrapesJS variables as much as possible
7
+ * - Only introduce new variables when truly necessary
8
+ * - Provide semantic tokens for Silex-specific UI elements
9
+ * - Keep it minimal and maintainable
10
+ */
11
+
12
+ @use "variables" as silex-vars;
13
+
14
+ :root {
15
+ // ============================================================
16
+ // 1. OVERRIDE GRAPESJS VARIABLES (Primary theme colors)
17
+ // ============================================================
18
+ // These are set by Silex and override GrapesJS defaults
19
+
20
+ --gjs-primary-color: #{silex-vars.$primaryColor};
21
+ --gjs-secondary-color: #{silex-vars.$secondaryColor};
22
+ --gjs-tertiary-color: #{silex-vars.$tertiaryColor};
23
+ --gjs-quaternary-color: #{silex-vars.$quaternaryColor};
24
+
25
+ // Computed variations for Silex UI
26
+ --gjs-primary-darker: #{silex-vars.$darkerPrimaryColor};
27
+ --gjs-primary-lighter: #{silex-vars.$lighterPrimaryColor};
28
+
29
+ // ============================================================
30
+ // 2. SILEX-SPECIFIC SEMANTIC TOKENS
31
+ // ============================================================
32
+ // These provide semantic meaning for Silex UI components
33
+ // They map to GrapesJS variables where possible
34
+
35
+ // Backgrounds
36
+ --silex-bg-main: var(--gjs-primary-color);
37
+ --silex-bg-darker: var(--gjs-primary-darker);
38
+ --silex-bg-lighter: var(--gjs-primary-lighter);
39
+ --silex-bg-surface: var(--gjs-primary-color);
40
+
41
+ // Text colors
42
+ --silex-text-primary: var(--gjs-secondary-color);
43
+ --silex-text-secondary: var(--gjs-font-color);
44
+ --silex-text-inverse: #ffffff;
45
+
46
+ // Borders
47
+ --silex-border-color: var(--gjs-light-border);
48
+ --silex-border-color-strong: var(--gjs-primary-lighter);
49
+
50
+ // Shadows
51
+ --silex-shadow-color: rgba(0, 0, 0, 0.2);
52
+ --silex-shadow-sm: 0 0 5px var(--silex-shadow-color);
53
+ --silex-shadow-md: 0 0 10px var(--silex-shadow-color);
54
+ --silex-shadow-lg: 0 0 15px var(--silex-shadow-color);
55
+
56
+ // Interactive states
57
+ --silex-hover-bg: var(--gjs-primary-darker);
58
+ --silex-active-bg: var(--gjs-primary-lighter);
59
+ --silex-focus-outline: var(--gjs-tertiary-color);
60
+
61
+ // Accents
62
+ --silex-accent-primary: var(--gjs-tertiary-color);
63
+ --silex-accent-secondary: var(--gjs-quaternary-color);
64
+
65
+ // Status colors (use GrapesJS semantic colors)
66
+ --silex-status-info: var(--gjs-color-blue);
67
+ --silex-status-success: var(--gjs-color-green);
68
+ --silex-status-warning: var(--gjs-color-yellow);
69
+ --silex-status-error: var(--gjs-color-red);
70
+
71
+ // UI Specific
72
+ --silex-button-bg: var(--gjs-primary-lighter);
73
+ --silex-button-hover-bg: var(--gjs-primary-darker);
74
+ --silex-input-bg: var(--gjs-primary-darker);
75
+ --silex-badge-bg: #c4c4c4;
76
+ --silex-badge-text: #3d3d3d;
77
+
78
+ // Dimensions (from Silex)
79
+ --silex-top-bar-height: #{silex-vars.$topBarHeight};
80
+ --silex-project-bar-width: #{silex-vars.$projectBarWidth};
81
+ --silex-footer-height: #{silex-vars.$footerHeight};
82
+
83
+ // Transitions
84
+ --silex-transition-fast: #{silex-vars.$transitionSpeedMedium};
85
+ --silex-transition-medium: #{silex-vars.$transitionSpeedSlow};
86
+
87
+ // Font
88
+ --silex-font-family: #{silex-vars.$fontFamily};
89
+
90
+ // Z-indexes
91
+ --silex-z-dialog: #{silex-vars.$z-dialog-inline};
92
+ --silex-z-loader: #{silex-vars.$z-loader};
93
+ }
@@ -0,0 +1,265 @@
1
+ /**
2
+ * THEME-MODERN.SCSS
3
+ * Modern Dark Theme 2025 for Silex
4
+ *
5
+ * Design Philosophy:
6
+ * - Minimalisme structuré
7
+ * - Beaucoup d'espace visuel
8
+ * - Ombres très douces, jamais fortes
9
+ * - Pas de gradients visibles
10
+ * - Micro-interactions 150–200ms
11
+ * - Haute lisibilité
12
+ * - Harmonie avec les IDE modernes (VS Code, etc.)
13
+ *
14
+ * Palette (Solid & Modern):
15
+ * - Global background: #111111
16
+ * - Surfaces: #1A1A1A, #1D1D1D
17
+ * - Borders: #262626
18
+ * - Primary text: #E5E5E5
19
+ * - Secondary text: #A8A8A8
20
+ * - Accent: #8873FE (purple moderne)
21
+ */
22
+
23
+ @use "variables" as silex-vars;
24
+
25
+ :root {
26
+ // ============================================================
27
+ // BASE COLORS - Modern Dark 2025
28
+ // ============================================================
29
+
30
+ // Main backgrounds
31
+ --primaryColor: #1A1A1A;
32
+ --gjs-primary-color: #1A1A1A !important;
33
+
34
+ // Text colors
35
+ --secondaryColor: #E5E5E5;
36
+ --gjs-secondary-color: #E5E5E5 !important;
37
+ --gjs-font-color: #E5E5E5 !important;
38
+ --gjs-font-color-active: #FFFFFF !important;
39
+
40
+ // Accent colors
41
+ --tertiaryColor: #8873FE;
42
+ --gjs-tertiary-color: #8873FE !important;
43
+ --quaternaryColor: #7461E3;
44
+ --gjs-quaternary-color: #7461E3 !important;
45
+
46
+ // Variations
47
+ --darkerPrimaryColor: #111111;
48
+ --lighterPrimaryColor: #1D1D1D;
49
+ --gjs-primary-darker: #111111;
50
+ --gjs-primary-lighter: #1D1D1D;
51
+
52
+ // GrapesJS system colors
53
+ --gjs-main-color: #1A1A1A;
54
+ --gjs-main-dark-color: rgba(0, 0, 0, 0.3);
55
+ --gjs-secondary-dark-color: rgba(0, 0, 0, 0.15);
56
+ --gjs-main-light-color: rgba(255, 255, 255, 0.08);
57
+ --gjs-secondary-light-color: rgba(255, 255, 255, 0.5);
58
+ --gjs-soft-light-color: rgba(255, 255, 255, 0.02);
59
+
60
+ // Status colors (solid, modern, accessible)
61
+ --gjs-color-blue: #6B8AFF;
62
+ --gjs-color-green: #5FD68F;
63
+ --gjs-color-yellow: #FFA94D;
64
+ --gjs-color-red: #FF6B6B;
65
+
66
+ // Utility colors
67
+ --gjs-color-highlight: #8873FE;
68
+ --gjs-color-warn: #FFA94D;
69
+
70
+ // ============================================================
71
+ // SILEX SEMANTIC TOKENS - Modern Theme
72
+ // ============================================================
73
+
74
+ // Backgrounds
75
+ --silex-bg-main: #1A1A1A;
76
+ --silex-bg-darker: #111111;
77
+ --silex-bg-lighter: #1D1D1D;
78
+ --silex-bg-surface: #1A1A1A;
79
+
80
+ // Text colors
81
+ --silex-text-primary: #E5E5E5;
82
+ --silex-text-secondary: #A8A8A8;
83
+ --silex-text-inverse: #FFFFFF;
84
+
85
+ // Borders (subtle, modern)
86
+ --silex-border-color: rgba(255, 255, 255, 0.08);
87
+ --silex-border-color-strong: #262626;
88
+ --gjs-light-border: rgba(255, 255, 255, 0.08);
89
+
90
+ // Shadows (très douces)
91
+ --silex-shadow-color: rgba(0, 0, 0, 0.4);
92
+ --silex-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
93
+ --silex-shadow-md: 0 2px 8px rgba(0, 0, 0, 0.4);
94
+ --silex-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.5);
95
+
96
+ // Interactive states (micro-interactions)
97
+ --silex-hover-bg: #222222;
98
+ --silex-active-bg: #252525;
99
+ --silex-focus-outline: #8873FE;
100
+
101
+ // Accents
102
+ --silex-accent-primary: #8873FE;
103
+ --silex-accent-secondary: #7461E3;
104
+
105
+ // Status colors
106
+ --silex-status-info: #6B8AFF;
107
+ --silex-status-success: #5FD68F;
108
+ --silex-status-warning: #FFA94D;
109
+ --silex-status-error: #FF6B6B;
110
+
111
+ // UI Components
112
+ --silex-button-bg: #252525;
113
+ --silex-button-hover-bg: #2D2D2D;
114
+ --silex-input-bg: #141414;
115
+ --silex-badge-bg: #2D2D2D;
116
+ --silex-badge-text: #E5E5E5;
117
+
118
+ // Transitions (150-200ms pour micro-interactions)
119
+ --silex-transition-fast: 0.15s;
120
+ --silex-transition-medium: 0.2s;
121
+ --gjs-animation-duration: 0.18s;
122
+
123
+ // ============================================================
124
+ // REFINEMENTS - Polish & Details
125
+ // ============================================================
126
+
127
+ // Scrollbars
128
+ --gjs-scrollbar-track: #1A1A1A;
129
+ --gjs-scrollbar-thumb: rgba(255, 255, 255, 0.15);
130
+
131
+ // Borders & Dividers
132
+ --gjs-border-color: #262626;
133
+
134
+ // Arrow & Decorations
135
+ --gjs-arrow-color: rgba(255, 255, 255, 0.5);
136
+ --gjs-dark-text-shadow: rgba(0, 0, 0, 0.4);
137
+ }
138
+
139
+ // ============================================================
140
+ // GLOBAL REFINEMENTS
141
+ // ============================================================
142
+
143
+ // Smooth scrollbars everywhere
144
+ .gjs-editor-cont {
145
+ ::-webkit-scrollbar {
146
+ width: 10px;
147
+ height: 10px;
148
+ }
149
+
150
+ ::-webkit-scrollbar-track {
151
+ background: var(--gjs-scrollbar-track);
152
+ }
153
+
154
+ ::-webkit-scrollbar-thumb {
155
+ background: var(--gjs-scrollbar-thumb);
156
+ border-radius: 5px;
157
+
158
+ &:hover {
159
+ background: rgba(255, 255, 255, 0.25);
160
+ }
161
+ }
162
+ }
163
+
164
+ // Smooth transitions on interactive elements
165
+ button,
166
+ .gjs-pn-btn,
167
+ .silex-button,
168
+ input,
169
+ select,
170
+ .gjs-block,
171
+ .gjs-layer {
172
+ transition: all var(--silex-transition-fast) ease;
173
+ }
174
+
175
+ // Modern focus states
176
+ *:focus-visible {
177
+ outline: 2px solid var(--silex-focus-outline);
178
+ outline-offset: 2px;
179
+ border-radius: 2px;
180
+ }
181
+
182
+ // Refined selection highlight
183
+ ::selection {
184
+ background-color: rgba(136, 115, 254, 0.3);
185
+ color: #FFFFFF;
186
+ }
187
+
188
+ // ============================================================
189
+ // COMPONENT-SPECIFIC REFINEMENTS
190
+ // ============================================================
191
+
192
+ // Modern buttons with subtle elevation
193
+ .gjs-pn-btn,
194
+ .silex-button {
195
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
196
+
197
+ &:hover {
198
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
199
+ }
200
+
201
+ &:active {
202
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
203
+ }
204
+ }
205
+
206
+ // Refined panels
207
+ .gjs-pn-panel,
208
+ .silex-dialog-inline {
209
+ backdrop-filter: blur(10px);
210
+ }
211
+
212
+ // Modern input fields
213
+ input[type="text"],
214
+ input[type="number"],
215
+ select,
216
+ textarea {
217
+ border: 1px solid var(--silex-border-color-strong);
218
+ border-radius: 4px;
219
+
220
+ &:hover {
221
+ border-color: var(--gjs-secondary-light-color);
222
+ }
223
+
224
+ &:focus {
225
+ border-color: var(--silex-accent-primary);
226
+ box-shadow: 0 0 0 3px rgba(136, 115, 254, 0.15);
227
+ }
228
+ }
229
+
230
+ // Subtle separators
231
+ .gjs-pn-panel,
232
+ .project-bar__panel-header,
233
+ .settings-header {
234
+ border-bottom-color: var(--silex-border-color-strong);
235
+ }
236
+
237
+ // Modern blocks with hover effect
238
+ .gjs-block {
239
+ border: 1px solid var(--silex-border-color);
240
+ border-radius: 6px;
241
+ background: var(--silex-bg-lighter);
242
+
243
+ &:hover {
244
+ border-color: var(--silex-accent-primary);
245
+ background: var(--silex-hover-bg);
246
+ }
247
+ }
248
+
249
+ // Refined layers
250
+ .gjs-layer {
251
+ &.gjs-selected {
252
+ background-color: var(--silex-active-bg);
253
+ border-left: 2px solid var(--silex-accent-primary);
254
+ }
255
+
256
+ &:hover {
257
+ background-color: var(--silex-hover-bg);
258
+ }
259
+ }
260
+
261
+ // Modern toolbar in canvas
262
+ .gjs-toolbar {
263
+ border-radius: 4px;
264
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
265
+ }
@@ -9,6 +9,6 @@
9
9
  padding: 0 10px;
10
10
  line-height: 1;
11
11
  min-width: 100px;
12
- border: 1px solid $lighterPrimaryColor;
13
- background-color: $darkerPrimaryColor;
12
+ border: 1px solid var(--silex-border-color-strong);
13
+ background-color: var(--silex-bg-darker);
14
14
  }