@concretecms/bedrock 1.5.6 → 1.6.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 (31) hide show
  1. package/.idea/vcs.xml +1 -1
  2. package/assets/cms/components/form/ConcreteFileDirectoryInput.vue +13 -5
  3. package/assets/cms/js/dark-mode.js +10 -0
  4. package/assets/cms/js/panels.js +23 -2
  5. package/assets/cms/js/toolbar.js +25 -3
  6. package/assets/cms/js/tree.js +1 -1
  7. package/assets/cms/scss/_forms.scss +20 -0
  8. package/assets/cms/scss/_help.scss +10 -0
  9. package/assets/cms/scss/_intelligent-search.scss +13 -5
  10. package/assets/cms/scss/_item-select-list.scss +1 -1
  11. package/assets/cms/scss/_select-combo-box.scss +11 -0
  12. package/assets/cms/scss/_sitemap.scss +32 -0
  13. package/assets/cms/scss/_tables.scss +49 -0
  14. package/assets/cms/scss/_toolbar.scss +62 -2
  15. package/assets/cms/scss/_transitions.scss +2 -0
  16. package/assets/cms/scss/_variables.scss +7 -2
  17. package/assets/cms/scss/bootstrap/_root-modified.scss +56 -0
  18. package/assets/cms/scss/jquery-ui/_theme.scss +7 -7
  19. package/assets/cms/scss/mixins/_item-select-list-hover.scss +2 -2
  20. package/assets/cms/scss/panels/_shared.scss +60 -6
  21. package/assets/cms/scss/panels/add/_blocks.scss +7 -0
  22. package/assets/cms/scss/panels/pages/_attributes.scss +23 -2
  23. package/assets/cms/scss/panels/pages/_design.scss +10 -0
  24. package/assets/cms/scss/panels/pages/_mobile-preview.scss +9 -1
  25. package/assets/cms/scss/panels/pages/_versions.scss +11 -0
  26. package/assets/desktop/scss/frontend/_frontend.scss +4 -0
  27. package/assets/desktop/scss/frontend/_waiting-for-me.scss +28 -3
  28. package/package.json +1 -1
  29. package/.idea/codeStyles/Project.xml +0 -48
  30. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  31. package/.idea/inspectionProfiles/Project_Default.xml +0 -7
package/.idea/vcs.xml CHANGED
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <project version="4">
3
3
  <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
4
+ <mapping directory="" vcs="Git" />
5
5
  </component>
6
6
  </project>
@@ -2,16 +2,18 @@
2
2
  <div>
3
3
  <div class="ccm-directory-selector-container">
4
4
  <div class="form-group">
5
- <label class="form-label" :for="directorySelectInputId" v-if="inputLabel">{{inputLabel}}</label>
5
+ <label class="form-label" :for="directorySelectInputId" v-if="inputLabel">{{ inputLabel }}</label>
6
6
  <div v-if="showAddDirectoryButton" class="input-group">
7
- <input :id="directorySelectInputId" :name="inputName" v-model="selectedDirectoryID" ref="directoryInput" :disabled="disabled" />
7
+ <input :id="directorySelectInputId" :name="inputName" v-model="selectedDirectoryID"
8
+ ref="directoryInput" :disabled="disabled"/>
8
9
  <button type="button"
9
10
  :class="{'btn': true, 'btn-secondary': true, 'ccm-create-new-directory-button': true, 'disabled': disabled === true}"
10
11
  @click="toggleDirectoryInput" :disabled="disabled">
11
12
  {{ i18n.createNewFolder }}
12
13
  </button>
13
14
  </div>
14
- <input v-else :id="directorySelectInputId" :name="inputName" v-model="selectedDirectoryID" ref="directoryInput" :disabled="disabled" />
15
+ <input v-else :id="directorySelectInputId" :name="inputName" v-model="selectedDirectoryID"
16
+ ref="directoryInput" :disabled="disabled"/>
15
17
  </div>
16
18
  </div>
17
19
  <div v-if="showAddDirectoryButton" v-show="showAddDirectoryInput" class="ccm-new-directory-name-container">
@@ -113,6 +115,7 @@ export default {
113
115
  this.selectedDirectoryID = this.directoryId
114
116
  }
115
117
 
118
+ var my = this
116
119
  this.selectMenu = new TomSelect(this.$refs.directoryInput, {
117
120
  maxOptions: 200,
118
121
  maxItems: 1,
@@ -122,15 +125,20 @@ export default {
122
125
  searchField: 'directoryName',
123
126
  render: {
124
127
  option: function (data, escape) {
125
- return `<div class="level-${data.directoryLevel}"><i class="fa fa-folder"></i> ${data.directoryName}</div>`
128
+ return `<div class="level-${data.directoryLevel}"><i class="fa fa-folder"></i> ${my.sanitizeDirectoryName(data.directoryName)} </div>`
126
129
  },
127
130
  item: function (item, escape) {
128
- return `<div class="level-${item.directoryLevel}"><i class="fa fa-folder"></i> ${item.directoryName}</div>`
131
+ return `<div class="level-${item.directoryLevel}"><i class="fa fa-folder"></i> ${my.sanitizeDirectoryName(item.directoryName)} </div>`
129
132
  }
130
133
  }
131
134
  })
132
135
  },
133
136
  methods: {
137
+ sanitizeDirectoryName(directoryName) {
138
+ const div = document.createElement('div')
139
+ div.textContent = directoryName
140
+ return div.innerHTML
141
+ },
134
142
  createDirectory() {
135
143
  const me = this
136
144
  if (!me.showAddDirectoryInput || me.disabled) {
@@ -0,0 +1,10 @@
1
+ export function isDarkMode() {
2
+ const $toolbarWrapper = $('#ccm-toolbar').parent()
3
+ if ($toolbarWrapper.attr('data-bs-theme') === 'dark') {
4
+ return true
5
+ } else if ($toolbarWrapper.attr('data-bs-theme-select') === 'auto') {
6
+ const scheme = global.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
7
+ return scheme === 'dark'
8
+ }
9
+ return false
10
+ }
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable no-new, no-unused-vars, camelcase, eqeqeq */
2
2
  /* global _, ccmi18n, Concrete, ConcreteEvent, CCM_CID, bootstrap */
3
3
 
4
+ import { isDarkMode } from './dark-mode'
4
5
  var html = $('html')
5
6
  var baseClasses = $('div.ccm-page').attr('class')
6
7
 
@@ -267,7 +268,7 @@ function ConcretePanel(options) {
267
268
  var $detail = $('<div />', {
268
269
  id: detailID,
269
270
  class: 'ccm-panel-detail'
270
- }).appendTo(document.body)
271
+ }).appendTo(ConcretePanelManager.getPanelPortal())
271
272
 
272
273
  var $content = $('<div />', {
273
274
  class: 'ccm-ui ccm-panel-detail-content'
@@ -565,7 +566,7 @@ var ConcretePanelManager = (function () {
565
566
  $('<div />', {
566
567
  id: panel.getDOMID(),
567
568
  class: 'ccm-panel ' + panel.getPositionClass()
568
- }).appendTo($(document.body))
569
+ }).appendTo(ConcretePanelManager.getPanelPortal())
569
570
 
570
571
  $('<div />', {
571
572
  class: 'ccm-panel-content-wrapper ccm-ui'
@@ -579,6 +580,26 @@ var ConcretePanelManager = (function () {
579
580
  return panels[i]
580
581
  }
581
582
  }
583
+ },
584
+
585
+ getPanelPortal: function () {
586
+ const $panelPortal = $('#ccm-panel-portal')
587
+ if ($panelPortal.length === 0) {
588
+ const $panelPortalOuter = $('<div />')
589
+ if (isDarkMode()) {
590
+ $panelPortalOuter.attr('data-bs-theme', 'dark')
591
+ } else {
592
+ $panelPortalOuter.attr('data-bs-theme', 'light')
593
+ }
594
+ const $panelPortal = $('<div />')
595
+ .attr('id', 'ccm-panel-portal')
596
+ .attr('class', 'ccm-ui')
597
+ $panelPortal.prependTo($panelPortalOuter)
598
+ $panelPortalOuter.prependTo(document.body)
599
+ return $('#ccm-panel-portal') // I think we need to do this due to a jQuery cache?
600
+ } else {
601
+ return $panelPortal
602
+ }
582
603
  }
583
604
 
584
605
  }
@@ -2,7 +2,9 @@
2
2
  /* global CCM_DISPATCHER_FILENAME, ConcreteModal, ConcreteEvent, ConcreteHelpGuideManager, ConcretePanelManager, bootstrap */
3
3
 
4
4
  /* Basic toolbar class */
5
- ;(function(global, $) {
5
+ import { isDarkMode } from './dark-mode'
6
+
7
+ ;(function(global, $, isDarkMode) {
6
8
  'use strict'
7
9
 
8
10
  var $toolbar = $('#ccm-toolbar')
@@ -79,7 +81,19 @@
79
81
 
80
82
  function setupTooltips() {
81
83
  if ($('#ccm-tooltip-holder').length == 0) {
82
- $('<div />').attr('id', 'ccm-tooltip-holder').attr('class', 'ccm-ui').prependTo(document.body)
84
+ // we need the holder and holder inner because dark mode requires that .ccm-ui come INSIDE
85
+ // data-bs-theme.
86
+ const $tooltipHolder = $('<div />')
87
+ if (isDarkMode()) {
88
+ $tooltipHolder.attr('data-bs-theme', 'dark')
89
+ } else {
90
+ $tooltipHolder.attr('data-bs-theme', 'light')
91
+ }
92
+ const $tooltipHolderInner = $('<div />')
93
+ .attr('id', 'ccm-tooltip-holder')
94
+ .attr('class', 'ccm-ui')
95
+ $tooltipHolderInner.prependTo($tooltipHolder)
96
+ $tooltipHolder.prependTo(document.body)
83
97
  }
84
98
 
85
99
  const tooltipTriggerList = [].slice.call(document.querySelectorAll('.launch-tooltip'))
@@ -149,6 +163,13 @@
149
163
  })
150
164
  }
151
165
 
166
+ function setupAutoDarkMode() {
167
+ if ($('#ccm-toolbar').parent().attr('data-bs-theme-select') === 'auto') {
168
+ const scheme = global.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
169
+ $('#ccm-toolbar').parent().attr('data-bs-theme', scheme)
170
+ }
171
+ }
172
+
152
173
  function setupIntelligentSearch() {
153
174
  $searchInput.bind('keydown.ccm-intelligent-search', function(e) {
154
175
  // jshint -W107
@@ -341,6 +362,7 @@
341
362
  if ($toolbar.length > 0) {
342
363
  $toolbar.find('.dialog-launch').dialog()
343
364
 
365
+ setupAutoDarkMode()
344
366
  setupIntelligentSearch()
345
367
  setupPanels()
346
368
  setupTooltips()
@@ -375,4 +397,4 @@
375
397
  }
376
398
  }
377
399
  }
378
- })(window, jQuery); // eslint-disable-line semi
400
+ })(window, jQuery, isDarkMode); // eslint-disable-line semi
@@ -138,7 +138,7 @@ ConcreteTree.prototype = {
138
138
  },
139
139
  select: function (select, data) {
140
140
  if (options.chooseNodeInForm) {
141
- let keys = [];
141
+ let keys = []
142
142
  if (selectMode == 1) {
143
143
  keys = [data.node.key]
144
144
  my.deselectNodes(data.tree.getRootNode(), data.node)
@@ -10,6 +10,26 @@
10
10
  margin-bottom: $form-group-margin-bottom;
11
11
  }
12
12
 
13
+ .form-label {
14
+ color: $gray-700;
15
+ }
16
+ }
17
+
18
+ @include color-mode(dark) {
19
+ .ccm-ui {
20
+ .form-control,
21
+ .form-select {
22
+ color: $light-blue;
23
+
24
+ &:focus {
25
+ color: $light-blue;
26
+ }
27
+ }
28
+
29
+ .form-label {
30
+ color: $gray-300;
31
+ }
32
+ }
13
33
  }
14
34
 
15
35
  .form-control {
@@ -137,6 +137,7 @@ div#ccm-toolbar {
137
137
 
138
138
  .help-block {
139
139
  background-color: $light-blue;
140
+ border-radius: 2px;
140
141
  color: $gray-700;
141
142
  display: block;
142
143
  font-style: italic;
@@ -145,6 +146,15 @@ div#ccm-toolbar {
145
146
  }
146
147
  }
147
148
 
149
+ @include color-mode(dark) {
150
+ .ccm-ui {
151
+ .help-block {
152
+ background-color: $dark-blue;
153
+ color: $gray-200;
154
+ }
155
+ }
156
+ }
157
+
148
158
  .ccm-help-media {
149
159
  display: flex;
150
160
  margin-top: 0.5rem;
@@ -1,11 +1,12 @@
1
1
  /* stylelint-disable property-no-vendor-prefix, at-rule-no-vendor-prefix, selector-max-id */
2
2
  div#ccm-intelligent-search-results {
3
3
  background-color: #fff;
4
- border-bottom: 1px solid #ccc;
4
+ border-bottom: 1px solid;
5
5
  border-bottom-left-radius: 4px;
6
6
  border-bottom-right-radius: 4px;
7
- border-left: 1px solid #ccc;
8
- border-right: 1px solid #ccc;
7
+ border-color: #ccc;
8
+ border-left: 1px solid;
9
+ border-right: 1px solid;
9
10
  display: none;
10
11
  padding: 0 0 0 40px;
11
12
  position: fixed;
@@ -143,12 +144,12 @@ div#ccm-intelligent-search-results {
143
144
  }
144
145
 
145
146
  a:hover {
146
- color: #369;
147
+ color: #09f;
147
148
  text-decoration: none;
148
149
  }
149
150
 
150
151
  a.ccm-intelligent-search-result-selected {
151
- color: #369;
152
+ color: #09f;
152
153
  }
153
154
  }
154
155
  }
@@ -189,3 +190,10 @@ div#ccm-intelligent-search-results {
189
190
  transform: translateX(1.5em);
190
191
  }
191
192
  }
193
+
194
+ @include color-mode(dark) {
195
+ div#ccm-intelligent-search-results {
196
+ background-color: $gray-900;
197
+ border-color: $gray-800;
198
+ }
199
+ }
@@ -14,7 +14,7 @@ ul.item-select-list > li > a,
14
14
  ul.item-select-list > li > span {
15
15
  background-repeat: no-repeat;
16
16
  border: 1px solid transparent;
17
- color: $body-color;
17
+ color: var(--bs-body-color);
18
18
  display: block;
19
19
  padding: 8px;
20
20
  text-decoration: none;
@@ -5,6 +5,17 @@
5
5
  */
6
6
  @import '~tom-select/src/scss/tom-select.bootstrap5';
7
7
 
8
+ /*
9
+ * Reset color to better support dark mode
10
+ */
11
+ .ccm-ui {
12
+ .ts-dropdown,
13
+ .ts-control,
14
+ .ts-control input {
15
+ color: inherit;
16
+ }
17
+ }
18
+
8
19
  /**
9
20
  * Customize TomSelect drop shadow. Wish we could do this with some variables but the box shadow is not
10
21
  * exposed as a variable
@@ -1,3 +1,5 @@
1
+ /* stylelint-disable selector-max-compound-selectors */
2
+
1
3
  .ccm-ui {
2
4
  #fancytree-drop-marker {
3
5
  &.fancytree-drop-over {
@@ -214,3 +216,33 @@
214
216
  }
215
217
  }
216
218
  }
219
+
220
+ @include color-mode(dark) {
221
+ .ccm-ui {
222
+ .ccm-sitemap-tree {
223
+ ul.ui-fancytree {
224
+ li[role=treeitem] {
225
+ span.fancytree-expander,
226
+ span.icon-folder,
227
+ span.icon-home,
228
+ span.icon-page {
229
+ filter: invert(1);
230
+ }
231
+
232
+ span.fancytree-active {
233
+ span.fancytree-expander,
234
+ span.icon-folder,
235
+ span.icon-home,
236
+ span.icon-page {
237
+ filter: none;
238
+ }
239
+ }
240
+
241
+ span.fancytree-title {
242
+ color: $sitemap-normal-item-text-color-dark;
243
+ }
244
+ }
245
+ }
246
+ }
247
+ }
248
+ }
@@ -9,6 +9,7 @@ div.ccm-ui {
9
9
  thead {
10
10
  th {
11
11
  border-bottom-width: 1px;
12
+ color: $gray-500;
12
13
  font-size: 0.75rem;
13
14
 
14
15
  > a {
@@ -154,3 +155,51 @@ div.ccm-ui {
154
155
  }
155
156
  }
156
157
  }
158
+
159
+ @include color-mode(dark) {
160
+ .ccm-ui {
161
+ .ccm-search-results-table {
162
+ thead {
163
+ th {
164
+ > a {
165
+ color: $gray-300;
166
+
167
+ &:hover {
168
+ color: white;
169
+ }
170
+ }
171
+
172
+ &.ccm-results-list-active-sort-asc,
173
+ &.ccm-results-list-active-sort-desc {
174
+ a {
175
+ &:hover {
176
+ color: white;
177
+ }
178
+ }
179
+ }
180
+ }
181
+ }
182
+
183
+ .ccm-search-results-em,
184
+ .ccm-search-results-name {
185
+ color: $gray-200;
186
+ }
187
+
188
+ tr.ccm-search-results-hoverable:hover,
189
+ tr.ccm-menu-item-active,
190
+ tr.ccm-parent-menu-item-active,
191
+ tr.ccm-search-select-hover,
192
+ tr.ccm-parent-menu-item-hover,
193
+ tr.ccm-search-select-selected {
194
+ td {
195
+ background-color: $gray-700;
196
+ color: $gray-100;
197
+
198
+ &.ccm-search-results-name {
199
+ color: $gray-100;
200
+ }
201
+ }
202
+ }
203
+ }
204
+ }
205
+ }
@@ -7,10 +7,11 @@ div#ccm-toolbar {
7
7
  position: fixed;
8
8
  top: 0;
9
9
  width: 100%;
10
+ z-index: $index-level-main-bar; /* over the top of the highlighter, which is 1000 */
11
+
10
12
  @media only screen and (max-width: 768px) {
11
13
  width: 100vw;
12
14
  }
13
- z-index: $index-level-main-bar; /* over the top of the highlighter, which is 1000 */
14
15
 
15
16
  .ccm-toolbar-accessibility-title {
16
17
  display: none;
@@ -59,11 +60,11 @@ div#ccm-toolbar {
59
60
  border-right: 1px solid $gray-200;
60
61
  box-sizing: border-box;
61
62
  color: $gray-600;
62
-
63
63
  display: flex;
64
64
  height: 47px;
65
65
  position: relative;
66
66
  text-decoration: none;
67
+ transition: $transition-base;
67
68
  width: 58px;
68
69
 
69
70
  i,
@@ -154,6 +155,7 @@ div#ccm-toolbar {
154
155
  img {
155
156
  height: 24px;
156
157
  }
158
+
157
159
  }
158
160
  }
159
161
 
@@ -302,6 +304,64 @@ div#ccm-toolbar {
302
304
 
303
305
  }
304
306
 
307
+ @include color-mode(dark) {
308
+ div#ccm-toolbar {
309
+ background-color: $gray-800;
310
+ border-bottom: 1px solid $gray-700;
311
+
312
+ > ul {
313
+ > li {
314
+ > a {
315
+ border-right: 1px solid $gray-700;
316
+ color: $gray-200;
317
+
318
+ svg {
319
+ fill: $gray-200;
320
+ }
321
+
322
+ &:hover {
323
+ background-color: $gray-900;
324
+ color: $gray-200;
325
+ }
326
+ }
327
+ }
328
+
329
+ li.ccm-logo {
330
+ span {
331
+ border-right: 1px solid $gray-700;
332
+ }
333
+ }
334
+
335
+ li.ccm-toolbar-search {
336
+ background-color: black;
337
+ border-left: 1px solid $gray-700;
338
+ color: $gray-200;
339
+
340
+ input {
341
+ background-color: black;
342
+ border-right: 1px solid $gray-700;
343
+ color: $gray-200;
344
+ }
345
+
346
+ svg {
347
+ fill: $gray-200;
348
+ }
349
+ }
350
+
351
+ li.ccm-toolbar-last-left-child {
352
+ border-right: 1px solid $gray-700;
353
+ }
354
+ }
355
+
356
+ ul {
357
+ li {
358
+ div.ccm-menu-item-site-list-container {
359
+ border-right: 1px solid $gray-700;
360
+ }
361
+ }
362
+ }
363
+ }
364
+ }
305
365
 
306
366
  /* Disabling the toolbar */
307
367
  div#ccm-toolbar-disabled {
@@ -1,3 +1,5 @@
1
+ $transition-base: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
2
+
1
3
  /**
2
4
  * Transitions used by our components.
3
5
  */
@@ -68,7 +68,6 @@ $input-padding-y: 0.5rem;
68
68
  $label-margin-bottom: 0.4rem;
69
69
  $input-box-shadow: inset 0 0;
70
70
  $custom-select-box-shadow: inset 0 0;
71
- $form-label-color: $gray-700;
72
71
  $form-label-font-weight: 600;
73
72
 
74
73
  /* cards */
@@ -157,7 +156,7 @@ $link-decoration: none;
157
156
  /* panels */
158
157
  $panel-background-color: #fafbfc;
159
158
  $panel-background-color-accent: #e7e8eb;
160
- $panel-menu-item-color: $gray-600;
159
+ $panel-menu-item-color: $gray-700;
161
160
  $panel-menu-item-hover-bg-color: #d2eafa;
162
161
  $panel-menu-item-hover-color: #222;
163
162
  $panel-menu-item-parent-item-active-font-weight: 600;
@@ -166,6 +165,11 @@ $panel-menu-item-active-bg-color: $blue;
166
165
  $panel-menu-item-active-color: white;
167
166
  $panel-menu-item-active-font-weight: 600;
168
167
  $panel-menu-item-transition: all 0.1s ease-in;
168
+ $panel-background-color-dark: #040300;
169
+ $panel-menu-item-color-dark: $gray-400;
170
+ $panel-menu-item-hover-bg-color-dark: #424f5b;
171
+ $panel-menu-item-hover-color-dark: #bbb;
172
+ $panel-background-color-accent-dark: #1c1c1c;
169
173
 
170
174
  /* colors */
171
175
  $table-row-highlight-bg: #d2eafa;
@@ -344,6 +348,7 @@ $sitemap-container-background-color: transparent;
344
348
  $sitemap-normal-item-border-color: transparent;
345
349
  $sitemap-normal-item-background-color: transparent;
346
350
  $sitemap-normal-item-text-color: $dark;
351
+ $sitemap-normal-item-text-color-dark: $gray-200;
347
352
  $sitemap-active-item-border-color: transparent;
348
353
  $sitemap-active-item-background-color: $blue;
349
354
  $sitemap-active-item-text-color: #fff;
@@ -128,3 +128,59 @@
128
128
  --#{$prefix}form-invalid-border-color: #{$form-invalid-border-color};
129
129
  // scss-docs-end root-form-validation-variables
130
130
  }
131
+
132
+ [data-bs-theme='dark'] {
133
+ .ccm-ui {
134
+ color-scheme: dark;
135
+ // scss-docs-start root-dark-mode-vars
136
+ --#{$prefix}body-color: #{$body-color-dark};
137
+ --#{$prefix}body-color-rgb: #{to-rgb($body-color-dark)};
138
+ --#{$prefix}body-bg: #{$body-bg-dark};
139
+ --#{$prefix}body-bg-rgb: #{to-rgb($body-bg-dark)};
140
+
141
+ --#{$prefix}emphasis-color: #{$body-emphasis-color-dark};
142
+ --#{$prefix}emphasis-color-rgb: #{to-rgb($body-emphasis-color-dark)};
143
+
144
+ --#{$prefix}secondary-color: #{$body-secondary-color-dark};
145
+ --#{$prefix}secondary-color-rgb: #{to-rgb($body-secondary-color-dark)};
146
+ --#{$prefix}secondary-bg: #{$body-secondary-bg-dark};
147
+ --#{$prefix}secondary-bg-rgb: #{to-rgb($body-secondary-bg-dark)};
148
+
149
+ --#{$prefix}tertiary-color: #{$body-tertiary-color-dark};
150
+ --#{$prefix}tertiary-color-rgb: #{to-rgb($body-tertiary-color-dark)};
151
+ --#{$prefix}tertiary-bg: #{$body-tertiary-bg-dark};
152
+ --#{$prefix}tertiary-bg-rgb: #{to-rgb($body-tertiary-bg-dark)};
153
+
154
+ @each $color, $value in $theme-colors-text-dark {
155
+ --#{$prefix}#{$color}-text-emphasis: #{$value};
156
+ }
157
+
158
+ @each $color, $value in $theme-colors-bg-subtle-dark {
159
+ --#{$prefix}#{$color}-bg-subtle: #{$value};
160
+ }
161
+
162
+ @each $color, $value in $theme-colors-border-subtle-dark {
163
+ --#{$prefix}#{$color}-border-subtle: #{$value};
164
+ }
165
+
166
+ --#{$prefix}heading-color: #{$headings-color-dark};
167
+
168
+ --#{$prefix}link-color: #{$link-color-dark};
169
+ --#{$prefix}link-hover-color: #{$link-hover-color-dark};
170
+ --#{$prefix}link-color-rgb: #{to-rgb($link-color-dark)};
171
+ --#{$prefix}link-hover-color-rgb: #{to-rgb($link-hover-color-dark)};
172
+
173
+ --#{$prefix}code-color: #{$code-color-dark};
174
+ --#{$prefix}highlight-color: #{$mark-color-dark};
175
+ --#{$prefix}highlight-bg: #{$mark-bg-dark};
176
+
177
+ --#{$prefix}border-color: #{$border-color-dark};
178
+ --#{$prefix}border-color-translucent: #{$border-color-translucent-dark};
179
+
180
+ --#{$prefix}form-valid-color: #{$form-valid-color-dark};
181
+ --#{$prefix}form-valid-border-color: #{$form-valid-border-color-dark};
182
+ --#{$prefix}form-invalid-color: #{$form-invalid-color-dark};
183
+ --#{$prefix}form-invalid-border-color: #{$form-invalid-border-color-dark};
184
+ // scss-docs-end root-dark-mode-vars
185
+ }
186
+ }
@@ -33,28 +33,28 @@
33
33
  }
34
34
 
35
35
  .ui-widget.ui-widget-content {
36
- border: 1px solid #c5c5c5/*{borderColorDefault}*/;
36
+ border: 1px solid var(--bs-secondary-bg);
37
37
  }
38
38
 
39
39
  .ui-widget-content {
40
- background: #fff;
41
- border: 1px solid #ddd;
42
- color: #333;
40
+ background: var(--bs-body-bg);
41
+ border: 1px solid var(--bs-secondary-bg);
42
+ color: var(--bs-body-color);
43
43
  }
44
44
 
45
45
  .ui-widget-content a {
46
- color: #333;
46
+ color: var(--bs-body-color);
47
47
  }
48
48
 
49
49
  .ui-widget-header {
50
50
  background: #e9e9e9/*{bgColorHeader}*/ /*{bgImgUrlHeader}*/ /*{bgHeaderXPos}*/ /*{bgHeaderYPos}*/ /*{bgHeaderRepeat}*/;
51
51
  border: 1px solid #ddd;
52
- color: #333;
52
+ color: var(--bs-body-color);
53
53
  font-weight: bold;
54
54
  }
55
55
 
56
56
  .ui-widget-header a {
57
- color: #333;
57
+ color: var(--bs-body-color);
58
58
  }
59
59
 
60
60
  /* Interaction states
@@ -1,7 +1,7 @@
1
1
  @mixin item-select-list-hover() {
2
- background-color: #e7e7e7;
2
+ background-color: var(--bs-secondary-bg);
3
3
  border-radius: 4px;
4
- color: $body-color;
4
+ color: var(--bs-body-color);
5
5
  text-decoration: none;
6
6
  transition: background-color 0.1s linear;
7
7
  }
@@ -19,7 +19,9 @@ div.ccm-panel {
19
19
  user-select: none;
20
20
  width: 320px;
21
21
  z-index: $index-level-panel; // has to come above the detail actions wrapper
22
- /* overflow: hidden; */ /* This causes problems with floating palettes inside the panels. So let's only apply this during transitions */
22
+ /* overflow: hidden; */
23
+ /* This causes problems with floating palettes inside the panels. So let's only apply this during transitions */
24
+
23
25
  div.ccm-panel-close {
24
26
  position: absolute;
25
27
  right: 17px;
@@ -28,6 +30,12 @@ div.ccm-panel {
28
30
  }
29
31
  }
30
32
 
33
+ @include color-mode(dark) {
34
+ div.ccm-panel {
35
+ background-color: $panel-background-color-dark;
36
+ }
37
+ }
38
+
31
39
  div#ccm-panel-overlay {
32
40
  background: transparent;
33
41
  display: none;
@@ -44,6 +52,12 @@ div#ccm-panel-overlay.ccm-panel-translucent {
44
52
  background-color: rgba(255, 255, 255, 0.7);
45
53
  }
46
54
 
55
+ @include color-mode(dark) {
56
+ div#ccm-panel-overlay.ccm-panel-translucent {
57
+ background-color: rgba(33, 33, 33, 0.7);
58
+ }
59
+ }
60
+
47
61
  html.ccm-panel-ready {
48
62
  div.ccm-page {
49
63
  transition: transform cubic-bezier(0.19, 1, 0.22, 1) 0.5s;
@@ -235,10 +249,10 @@ div.ccm-panel-content {
235
249
  text-decoration: none;
236
250
  transition: $panel-menu-item-transition;
237
251
 
252
+
238
253
  &:hover {
239
254
  background-color: $panel-menu-item-hover-bg-color;
240
255
  color: $panel-menu-item-hover-color;
241
-
242
256
  }
243
257
 
244
258
  &.ccm-panel-menu-parent-item-active {
@@ -248,7 +262,7 @@ div.ccm-panel-content {
248
262
 
249
263
  &.ccm-panel-menu-item-active {
250
264
  background-color: $panel-menu-item-active-bg-color;
251
- color: $panel-menu-item-active-color;
265
+ color: $panel-menu-item-active-color !important;
252
266
  font-weight: $panel-menu-item-active-font-weight;
253
267
 
254
268
  &:hover {
@@ -280,6 +294,24 @@ div.ccm-panel-content {
280
294
  }
281
295
  }
282
296
 
297
+ @include color-mode(dark) {
298
+ div.ccm-panel-content {
299
+ ul.nav,
300
+ menu {
301
+ li {
302
+ a {
303
+ color: $panel-menu-item-color-dark;
304
+ }
305
+
306
+ a:hover {
307
+ background-color: $panel-menu-item-hover-bg-color-dark;
308
+ color: $panel-menu-item-hover-color-dark;
309
+ }
310
+ }
311
+ }
312
+ }
313
+ }
314
+
283
315
  div.ccm-panel-content-inner {
284
316
  padding: 20px 40px 40px;
285
317
  }
@@ -312,7 +344,7 @@ div.ccm-panel-header-accordion {
312
344
  list-style-type: none;
313
345
  }
314
346
 
315
- li>a,
347
+ li > a,
316
348
  span {
317
349
  cursor: pointer;
318
350
  display: block;
@@ -350,6 +382,7 @@ div.ccm-panel-header-accordion {
350
382
  #ccm-panel-add-blocktypes-list.ccm-no-pointer-events a.ccm-panel-add-block-draggable-block-type-dragger {
351
383
  pointer-events: none;
352
384
  }
385
+
353
386
  /**
354
387
  * Panel search input
355
388
  * Used by both block and container add panel (left hand menu)
@@ -390,7 +423,7 @@ div.ccm-panel-header-accordion {
390
423
  width: 24px;
391
424
  z-index: 1;
392
425
 
393
- >i {
426
+ > i {
394
427
  color: $gray-100;
395
428
  line-height: 16px;
396
429
  position: absolute;
@@ -435,7 +468,7 @@ html.ccm-panel-right div.ccm-panel-detail {
435
468
  }
436
469
 
437
470
  div.ccm-panel-detail-content {
438
- background-color: white;
471
+ background-color: var(--bs-body-bg);
439
472
  min-height: 100%;
440
473
  min-width: 100%;
441
474
  padding: 40px 40px 80px;
@@ -462,6 +495,7 @@ iframe.ccm-page-preview-frame {
462
495
  top: 0;
463
496
  width: 100%;
464
497
  }
498
+
465
499
  /**
466
500
  * Panel Detail Fade
467
501
  */
@@ -572,6 +606,19 @@ div.ccm-panel-content {
572
606
  }
573
607
  }
574
608
 
609
+ @include color-mode(dark) {
610
+ header {
611
+ a {
612
+ color: $gray-400;
613
+
614
+ svg {
615
+ fill: $gray-400;
616
+ }
617
+ }
618
+ }
619
+ }
620
+
621
+
575
622
  /**
576
623
  * Forms and button actions
577
624
  */
@@ -585,6 +632,13 @@ div.ccm-panel-detail-form-actions {
585
632
  width: 100%;
586
633
  }
587
634
 
635
+ @include color-mode(dark) {
636
+ div.ccm-panel-detail-form-actions {
637
+ background-color: $gray-900;
638
+ border-top: 1px solid $gray-700;
639
+ }
640
+ }
641
+
588
642
  /**
589
643
  * Panel icons
590
644
  */
@@ -139,3 +139,10 @@ a.ccm-panel-add-block-draggable-block-type.ccm-stacked-list {
139
139
  }
140
140
 
141
141
  }
142
+
143
+ @include color-mode(dark) {
144
+ a.ccm-panel-add-block-draggable-block-type,
145
+ a.ccm-panel-add-container-item {
146
+ color: $light;
147
+ }
148
+ }
@@ -160,8 +160,8 @@
160
160
 
161
161
  // Selectable attributes
162
162
  &[data-attribute-key-id] {
163
- background-color: #f9f9f9; // ~ $panel-background-color
164
- border: 2px solid #e8e8e8;
163
+ background-color: $panel-background-color;
164
+ border: 2px solid darken($panel-background-color, 0.2);
165
165
  padding: 12px 45px 15px 48px;
166
166
 
167
167
  [data-remove-attribute-key] {
@@ -175,3 +175,24 @@
175
175
  }
176
176
  }
177
177
  }
178
+
179
+ @include color-mode(dark) {
180
+ #ccm-detail-page-attributes {
181
+ &[data-attribute-key-id] {
182
+ background-color: $panel-background-color-dark;
183
+ border: 2px solid lighten($panel-background-color-dark, 0.3);
184
+ }
185
+ }
186
+
187
+ #ccm-menu-page-attributes {
188
+ .ccm-menu-page-attributes-set {
189
+ a[data-attribute-key] {
190
+ color: $panel-menu-item-color-dark;
191
+
192
+ &:hover {
193
+ background-color: $panel-menu-item-hover-bg-color-dark;
194
+ }
195
+ }
196
+ }
197
+ }
198
+ }
@@ -18,6 +18,16 @@
18
18
  }
19
19
  }
20
20
 
21
+ @include color-mode(dark) {
22
+ #ccm-panel-page-design {
23
+ .ccm-panel-content-inner {
24
+ .ccm-panel-page-design-title {
25
+ color: $gray-400;
26
+ }
27
+ }
28
+ }
29
+ }
30
+
21
31
  .ccm-panel-page-design-page-group {
22
32
  padding: 25px 10px 10px 34px;
23
33
 
@@ -1,6 +1,6 @@
1
1
  #ccm-panel-detail-mobile-preview {
2
2
  > .ccm-panel-detail-content {
3
- background: rgba(255, 255, 255, 0.4);
3
+ background: $gray-500;
4
4
  text-align: center;
5
5
 
6
6
  > .ccm-device-preview {
@@ -140,3 +140,11 @@ div.ccm-menu-device-set {
140
140
  }
141
141
 
142
142
  }
143
+
144
+ @include color-mode(dark) {
145
+ #ccm-panel-detail-mobile-preview {
146
+ > .ccm-panel-detail-content {
147
+ background: $gray-600;
148
+ }
149
+ }
150
+ }
@@ -82,6 +82,17 @@ section#ccm-panel-page-versions {
82
82
  }
83
83
  }
84
84
 
85
+ @include color-mode(dark) {
86
+ section#ccm-panel-page-versions {
87
+ table {
88
+ th,
89
+ td {
90
+ background-color: $panel-background-color-accent-dark;
91
+ }
92
+ }
93
+ }
94
+ }
95
+
85
96
  div#ccm-panel-detail-page-versions {
86
97
  div.ccm-panel-detail-content {
87
98
  height: 100%;
@@ -1 +1,5 @@
1
+ $color-mode-type: data;
2
+
3
+ @import 'bootstrap/scss/mixins/color-mode';
4
+ @import '../../../../assets/cms/scss/variables';
1
5
  @import 'waiting-for-me';
@@ -1,3 +1,4 @@
1
+
1
2
  div.ccm-block-desktop-waiting-for-me {
2
3
  i.ccm-block-desktop-waiting-for-me-loader {
3
4
  display: none;
@@ -76,7 +77,7 @@ div.ccm-block-desktop-waiting-for-me {
76
77
  top: 20px;
77
78
 
78
79
  .btn {
79
- border-color: #c6c6c6;
80
+ border-color: $gray-300;
80
81
  border-radius: 50%;
81
82
  box-shadow: none;
82
83
  display: block;
@@ -90,12 +91,16 @@ div.ccm-block-desktop-waiting-for-me {
90
91
  transition: none;
91
92
  width: 40px !important;
92
93
 
94
+ &:hover {
95
+ background-color: transparent !important;
96
+ }
97
+
93
98
  &.btn-close {
94
- border: 1px solid #c6c6c6; // This needs to be explicit because .btn-close has strong styling otherwise
99
+ border: 1px solid $gray-300; // This needs to be explicit because .btn-close has strong styling otherwise
95
100
  }
96
101
 
97
102
  i {
98
- color: #ccc;
103
+ color: $gray-300;
99
104
  }
100
105
 
101
106
  &:active {
@@ -114,3 +119,23 @@ div.ccm-block-desktop-waiting-for-me {
114
119
  }
115
120
 
116
121
  }
122
+
123
+ @include color-mode(dark) {
124
+ div.ccm-block-desktop-waiting-for-me {
125
+ border: 1px solid $gray-700;
126
+
127
+ div.ccm-block-desktop-waiting-for-me-item {
128
+ div.ccm-block-desktop-waiting-for-me-menu {
129
+ .btn {
130
+ &.btn-close {
131
+ border: 1px solid $gray-700;
132
+ }
133
+
134
+ i {
135
+ color: 1px solid $gray-700;
136
+ }
137
+ }
138
+ }
139
+ }
140
+ }
141
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@concretecms/bedrock",
3
- "version": "1.5.6",
3
+ "version": "1.6.0",
4
4
  "description": "The asset framework and dependencies for Concrete CMS.",
5
5
  "scripts": {
6
6
  "lint": "standardx \"**/*.{js,vue}\" && stylelint assets/**/*.{scss,vue}",
@@ -1,48 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <code_scheme name="Project" version="173">
3
- <PHPCodeStyleSettings>
4
- <option name="BLANK_LINES_BETWEEN_IMPORTS" value="1" />
5
- <option name="LOWER_CASE_BOOLEAN_CONST" value="true" />
6
- <option name="LOWER_CASE_NULL_CONST" value="true" />
7
- <option name="ELSE_IF_STYLE" value="COMBINE" />
8
- <option name="KEEP_RPAREN_AND_LBRACE_ON_ONE_LINE" value="true" />
9
- <option name="BLANK_LINES_AFTER_OPENING_TAG" value="1" />
10
- <option name="KEEP_BLANK_LINES_AFTER_LBRACE" value="0" />
11
- <option name="NEW_LINE_AFTER_PHP_OPENING_TAG" value="true" />
12
- </PHPCodeStyleSettings>
13
- <codeStyleSettings language="JavaScript">
14
- <option name="INDENT_CASE_FROM_SWITCH" value="false" />
15
- <option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
16
- <option name="ALIGN_MULTILINE_FOR" value="false" />
17
- </codeStyleSettings>
18
- <codeStyleSettings language="PHP">
19
- <option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
20
- <option name="BLANK_LINES_AFTER_PACKAGE" value="1" />
21
- <option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
22
- <option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
23
- <option name="ALIGN_MULTILINE_EXTENDS_LIST" value="true" />
24
- <option name="CALL_PARAMETERS_WRAP" value="5" />
25
- <option name="CALL_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
26
- <option name="CALL_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
27
- <option name="METHOD_PARAMETERS_WRAP" value="5" />
28
- <option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
29
- <option name="METHOD_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
30
- <option name="EXTENDS_LIST_WRAP" value="5" />
31
- <option name="FOR_STATEMENT_LPAREN_ON_NEXT_LINE" value="true" />
32
- <option name="FOR_STATEMENT_RPAREN_ON_NEXT_LINE" value="true" />
33
- <option name="ARRAY_INITIALIZER_WRAP" value="5" />
34
- <option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
35
- <option name="ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE" value="true" />
36
- <option name="IF_BRACE_FORCE" value="3" />
37
- <option name="DOWHILE_BRACE_FORCE" value="3" />
38
- <option name="WHILE_BRACE_FORCE" value="3" />
39
- <option name="FOR_BRACE_FORCE" value="3" />
40
- </codeStyleSettings>
41
- <codeStyleSettings language="Vue">
42
- <indentOptions>
43
- <option name="INDENT_SIZE" value="4" />
44
- <option name="TAB_SIZE" value="4" />
45
- </indentOptions>
46
- </codeStyleSettings>
47
- </code_scheme>
48
- </component>
@@ -1,5 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <state>
3
- <option name="USE_PER_PROJECT_SETTINGS" value="true" />
4
- </state>
5
- </component>
@@ -1,7 +0,0 @@
1
- <component name="InspectionProjectProfileManager">
2
- <profile version="1.0">
3
- <option name="myName" value="Project Default" />
4
- <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5
- <inspection_tool class="Stylelint" enabled="true" level="ERROR" enabled_by_default="true" />
6
- </profile>
7
- </component>