@concretecms/bedrock 1.5.4 → 1.5.6

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.
@@ -138,8 +138,17 @@ ConcreteTree.prototype = {
138
138
  },
139
139
  select: function (select, data) {
140
140
  if (options.chooseNodeInForm) {
141
- const keys = my.getSelectedNodeKeys(data.tree.getRootNode(), ajaxData.treeNodeSelectedIDs)
141
+ let keys = [];
142
+ if (selectMode == 1) {
143
+ keys = [data.node.key]
144
+ my.deselectNodes(data.tree.getRootNode(), data.node)
145
+ } else {
146
+ keys = my.getSelectedNodeKeys(data.tree.getRootNode(), ajaxData.treeNodeSelectedIDs)
147
+ }
148
+ // Call onSelect callback
142
149
  options.onSelect(keys)
150
+ // Update selected nodes for ajax request to avoid hidden nodes to be selected unexpectedly
151
+ ajaxData.treeNodeSelectedIDs = keys
143
152
  }
144
153
  },
145
154
 
@@ -226,11 +235,13 @@ ConcreteTree.prototype = {
226
235
  },
227
236
  collapse: function(event, data) {
228
237
  // loop over child nodes and check if node is still selected. If not remove it from the 'options.ajaxData.selected' array.
229
- data.node.children.forEach(function(nodeChild) {
230
- if (options.ajaxData.selected.includes(parseInt(nodeChild.key)) && !nodeChild.isSelected()) {
231
- options.ajaxData.selected.splice(options.ajaxData.selected.indexOf(nodeChild.key), 1)
232
- }
233
- })
238
+ if (options.ajaxData.selected) {
239
+ data.node.children.forEach(function(nodeChild) {
240
+ if (options.ajaxData.selected.includes(parseInt(nodeChild.key)) && !nodeChild.isSelected()) {
241
+ options.ajaxData.selected.splice(options.ajaxData.selected.indexOf(nodeChild.key), 1)
242
+ }
243
+ })
244
+ }
234
245
  },
235
246
  dnd: {
236
247
  preventRecursiveMoves: true, // Prevent dropping nodes on own descendants,
@@ -338,6 +349,22 @@ ConcreteTree.prototype = {
338
349
  return selected
339
350
  },
340
351
 
352
+ deselectNodes: function (parentNode, selectedNode) {
353
+ var my = this
354
+
355
+ // Walk through all child nodes
356
+ if (parentNode.hasChildren()) {
357
+ parentNode.getChildren().forEach(function (child) {
358
+ // If the node is not the selected node, deselect it
359
+ if (parseInt(child.key) !== parseInt(selectedNode.key)) {
360
+ child.setSelected(false)
361
+ }
362
+ // call the function recursively
363
+ my.deselectNodes(child, selectedNode)
364
+ })
365
+ }
366
+ },
367
+
341
368
  getLoadNodePromise: function (node) {
342
369
  var my = this
343
370
  var ajaxData = my.options.ajaxData != false ? my.options.ajaxData : {}
@@ -25,7 +25,7 @@ hr {
25
25
  font-style: $headings-font-style;
26
26
  font-weight: $headings-font-weight;
27
27
  line-height: $headings-line-height;
28
- color: $headings-color;
28
+ color: var(--#{$prefix}heading-color);
29
29
  }
30
30
 
31
31
  h1 {
@@ -155,6 +155,7 @@ small {
155
155
 
156
156
  mark {
157
157
  padding: $mark-padding;
158
+ color: var(--#{$prefix}highlight-color);
158
159
  background-color: var(--#{$prefix}highlight-bg);
159
160
  }
160
161
 
@@ -179,11 +180,11 @@ sup { top: -.5em; }
179
180
  // Links
180
181
 
181
182
  a {
182
- color: var(--#{$prefix}link-color);
183
+ color: rgba(var(--#{$prefix}link-color-rgb), var(--#{$prefix}link-opacity, 1));
183
184
  text-decoration: $link-decoration;
184
185
 
185
186
  &:hover {
186
- color: var(--#{$prefix}link-hover-color);
187
+ --#{$prefix}link-color-rgb: var(--#{$prefix}link-hover-color-rgb);
187
188
  text-decoration: $link-hover-decoration;
188
189
  }
189
190
  }
@@ -461,15 +462,15 @@ legend {
461
462
  height: auto;
462
463
  }
463
464
 
464
- // 1. Correct the outline style in Safari.
465
- // 2. This overrides the extra rounded corners on search inputs in iOS so that our
465
+ // 1. This overrides the extra rounded corners on search inputs in iOS so that our
466
466
  // `.form-control` class can properly style them. Note that this cannot simply
467
467
  // be added to `.form-control` as it's not specific enough. For details, see
468
468
  // https://github.com/twbs/bootstrap/issues/11586.
469
+ // 2. Correct the outline style in Safari.
469
470
 
470
471
  [type="search"] {
471
- outline-offset: -2px; // 1
472
- -webkit-appearance: textfield; // 2
472
+ -webkit-appearance: textfield; // 1
473
+ outline-offset: -2px; // 2
473
474
  }
474
475
 
475
476
  // 1. A few input types should stay LTR
@@ -22,10 +22,20 @@
22
22
  --#{$prefix}#{$color}-rgb: #{$value};
23
23
  }
24
24
 
25
+ @each $color, $value in $theme-colors-text {
26
+ --#{$prefix}#{$color}-text-emphasis: #{$value};
27
+ }
28
+
29
+ @each $color, $value in $theme-colors-bg-subtle {
30
+ --#{$prefix}#{$color}-bg-subtle: #{$value};
31
+ }
32
+
33
+ @each $color, $value in $theme-colors-border-subtle {
34
+ --#{$prefix}#{$color}-border-subtle: #{$value};
35
+ }
36
+
25
37
  --#{$prefix}white-rgb: #{to-rgb($white)};
26
38
  --#{$prefix}black-rgb: #{to-rgb($black)};
27
- --#{$prefix}body-color-rgb: #{to-rgb($body-color)};
28
- --#{$prefix}body-bg-rgb: #{to-rgb($body-bg)};
29
39
 
30
40
  // Fonts
31
41
 
@@ -40,17 +50,50 @@
40
50
  @if $font-size-root != null {
41
51
  --#{$prefix}root-font-size: #{$font-size-root};
42
52
  }
43
- --#{$prefix}body-font-family: #{$font-family-base};
53
+ --#{$prefix}body-font-family: #{inspect($font-family-base)};
44
54
  @include rfs($font-size-base, --#{$prefix}body-font-size);
45
55
  --#{$prefix}body-font-weight: #{$font-weight-base};
46
56
  --#{$prefix}body-line-height: #{$line-height-base};
47
- --#{$prefix}body-color: #{$body-color};
48
57
  @if $body-text-align != null {
49
58
  --#{$prefix}body-text-align: #{$body-text-align};
50
59
  }
60
+
61
+ --#{$prefix}body-color: #{$body-color};
62
+ --#{$prefix}body-color-rgb: #{to-rgb($body-color)};
51
63
  --#{$prefix}body-bg: #{$body-bg};
64
+ --#{$prefix}body-bg-rgb: #{to-rgb($body-bg)};
65
+
66
+ --#{$prefix}emphasis-color: #{$body-emphasis-color};
67
+ --#{$prefix}emphasis-color-rgb: #{to-rgb($body-emphasis-color)};
68
+
69
+ --#{$prefix}secondary-color: #{$body-secondary-color};
70
+ --#{$prefix}secondary-color-rgb: #{to-rgb($body-secondary-color)};
71
+ --#{$prefix}secondary-bg: #{$body-secondary-bg};
72
+ --#{$prefix}secondary-bg-rgb: #{to-rgb($body-secondary-bg)};
73
+
74
+ --#{$prefix}tertiary-color: #{$body-tertiary-color};
75
+ --#{$prefix}tertiary-color-rgb: #{to-rgb($body-tertiary-color)};
76
+ --#{$prefix}tertiary-bg: #{$body-tertiary-bg};
77
+ --#{$prefix}tertiary-bg-rgb: #{to-rgb($body-tertiary-bg)};
52
78
  // scss-docs-end root-body-variables
53
79
 
80
+ --#{$prefix}heading-color: #{$headings-color};
81
+
82
+ --#{$prefix}link-color: #{$link-color};
83
+ --#{$prefix}link-color-rgb: #{to-rgb($link-color)};
84
+ --#{$prefix}link-decoration: #{$link-decoration};
85
+
86
+ --#{$prefix}link-hover-color: #{$link-hover-color};
87
+ --#{$prefix}link-hover-color-rgb: #{to-rgb($link-hover-color)};
88
+
89
+ @if $link-hover-decoration != null {
90
+ --#{$prefix}link-hover-decoration: #{$link-hover-decoration};
91
+ }
92
+
93
+ --#{$prefix}code-color: #{$code-color};
94
+ --#{$prefix}highlight-color: #{$mark-color};
95
+ --#{$prefix}highlight-bg: #{$mark-bg};
96
+
54
97
  // scss-docs-start root-border-var
55
98
  --#{$prefix}border-width: #{$border-width};
56
99
  --#{$prefix}border-style: #{$border-style};
@@ -61,14 +104,27 @@
61
104
  --#{$prefix}border-radius-sm: #{$border-radius-sm};
62
105
  --#{$prefix}border-radius-lg: #{$border-radius-lg};
63
106
  --#{$prefix}border-radius-xl: #{$border-radius-xl};
64
- --#{$prefix}border-radius-2xl: #{$border-radius-2xl};
107
+ --#{$prefix}border-radius-xxl: #{$border-radius-xxl};
108
+ --#{$prefix}border-radius-2xl: var(--#{$prefix}border-radius-xxl); // Deprecated in v5.3.0 for consistency
65
109
  --#{$prefix}border-radius-pill: #{$border-radius-pill};
66
110
  // scss-docs-end root-border-var
67
111
 
68
- --#{$prefix}link-color: #{$link-color};
69
- --#{$prefix}link-hover-color: #{$link-hover-color};
112
+ --#{$prefix}box-shadow: #{$box-shadow};
113
+ --#{$prefix}box-shadow-sm: #{$box-shadow-sm};
114
+ --#{$prefix}box-shadow-lg: #{$box-shadow-lg};
115
+ --#{$prefix}box-shadow-inset: #{$box-shadow-inset};
70
116
 
71
- --#{$prefix}code-color: #{$code-color};
117
+ // Focus styles
118
+ // scss-docs-start root-focus-variables
119
+ --#{$prefix}focus-ring-width: #{$focus-ring-width};
120
+ --#{$prefix}focus-ring-opacity: #{$focus-ring-opacity};
121
+ --#{$prefix}focus-ring-color: #{$focus-ring-color};
122
+ // scss-docs-end root-focus-variables
72
123
 
73
- --#{$prefix}highlight-bg: #{$mark-bg};
124
+ // scss-docs-start root-form-validation-variables
125
+ --#{$prefix}form-valid-color: #{$form-valid-color};
126
+ --#{$prefix}form-valid-border-color: #{$form-valid-border-color};
127
+ --#{$prefix}form-invalid-color: #{$form-invalid-color};
128
+ --#{$prefix}form-invalid-border-color: #{$form-invalid-border-color};
129
+ // scss-docs-end root-form-validation-variables
74
130
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@concretecms/bedrock",
3
- "version": "1.5.4",
3
+ "version": "1.5.6",
4
4
  "description": "The asset framework and dependencies for Concrete CMS.",
5
5
  "scripts": {
6
6
  "lint": "standardx \"**/*.{js,vue}\" && stylelint assets/**/*.{scss,vue}",