@ditojs/admin 2.6.3 → 2.6.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ditojs/admin",
3
- "version": "2.6.3",
3
+ "version": "2.6.4",
4
4
  "type": "module",
5
5
  "description": "Dito.js Admin is a schema based admin interface for Dito.js Server, featuring auto-generated views and forms and built with Vue.js",
6
6
  "repository": "https://github.com/ditojs/dito/tree/master/packages/admin",
@@ -83,7 +83,7 @@
83
83
  "vite": "^4.3.4"
84
84
  },
85
85
  "types": "types",
86
- "gitHead": "b231e1ff2a5152e9f8cf6742b115ae2892e2abb9",
86
+ "gitHead": "a454a0b0c8c4f674abdec235b535c59fa7abd18c",
87
87
  "scripts": {
88
88
  "build": "vite build",
89
89
  "watch": "yarn build --mode 'development' --watch",
@@ -167,13 +167,9 @@ export default DitoComponent.component('DitoContainer', {
167
167
 
168
168
  containerStyle() {
169
169
  return {
170
- flex: `${
171
- this.flexGrow ? 1 : 0
172
- } ${
173
- this.flexShrink ? 1 : 0
174
- } ${
175
- this.flexBasis
176
- }`
170
+ '--grow': this.flexGrow ? 1 : 0,
171
+ '--shrink': this.flexShrink ? 1 : 0,
172
+ '--basis': this.flexBasis
177
173
  }
178
174
  },
179
175
 
@@ -202,8 +198,13 @@ export default DitoComponent.component('DitoContainer', {
202
198
  @import '../styles/_imports';
203
199
 
204
200
  .dito-container {
201
+ --grow: 0;
202
+ --shrink: 1;
203
+ --basis: auto;
204
+
205
205
  position: relative;
206
206
  display: flex;
207
+ flex: var(--grow) var(--shrink) var(--basis);
207
208
  flex-flow: column;
208
209
  align-items: flex-start;
209
210
  // Needed for better vertical alignment:
@@ -215,9 +216,19 @@ export default DitoComponent.component('DitoContainer', {
215
216
  // percentages in flex-basis to work.
216
217
  padding: $form-spacing $form-spacing-half;
217
218
 
219
+ .dito-page & {
220
+ @container (width < #{$content-width}) {
221
+ flex-grow: 1;
222
+ }
223
+ }
224
+
218
225
  .dito-sidebar & {
219
- @container (width < #{$sidebar-max-width - 2 * $content-padding}) {
220
- flex-grow: 1 !important;
226
+ @container (width < #{$sidebar-max-width}) {
227
+ flex-grow: 1;
228
+ }
229
+
230
+ @container (width < #{calc($sidebar-max-width / 2)}) {
231
+ flex-basis: calc(var(--basis) * 2);
221
232
  }
222
233
  }
223
234
 
@@ -228,6 +228,8 @@ export default DitoComponent.component('DitoPane', {
228
228
  @import '../styles/_imports';
229
229
 
230
230
  .dito-pane {
231
+ $self: &;
232
+
231
233
  display: flex;
232
234
  position: relative;
233
235
  flex-flow: row wrap;
@@ -246,13 +248,20 @@ export default DitoComponent.component('DitoPane', {
246
248
  margin: 0;
247
249
  }
248
250
 
249
- .dito-scroll > &:not(&--single) {
250
- // Root-level panes inside scroll views need to move the negative margin
251
- // used to remove the padding added by `.dito-container` inside
252
- // `.dito-pane` to the padding:
253
- padding: ($content-padding - $form-spacing)
254
- ($content-padding - $form-spacing-half);
255
- margin: 0;
251
+ .dito-scroll > & {
252
+ &,
253
+ .dito-container {
254
+ min-width: min-content;
255
+ }
256
+
257
+ &:not(#{$self}--single) {
258
+ // Root-level panes inside scroll views need to move the negative margin
259
+ // used to remove the padding added by `.dito-container` inside
260
+ // `.dito-pane` to the padding:
261
+ padding: ($content-padding - $form-spacing)
262
+ ($content-padding - $form-spacing-half);
263
+ margin: 0;
264
+ }
256
265
  }
257
266
 
258
267
  &.dito-pane-main {
@@ -47,7 +47,5 @@ export default DitoComponent.component('DitoPanels', {
47
47
  .dito-panels {
48
48
  padding: $content-padding;
49
49
  padding-left: $form-spacing;
50
- // For the `@container` rule in `.dito-container` to work:
51
- container-type: inline-size;
52
50
  }
53
51
  </style>
@@ -477,6 +477,8 @@ function addRoutes(router, routes) {
477
477
  flex: 1 1 var(--max-content-width);
478
478
  background: $content-color-background;
479
479
  max-width: calc(var(--max-content-width) + 2 * #{$content-padding});
480
+ // For the `@container` rule in `.dito-container` to work:
481
+ container-type: inline-size;
480
482
 
481
483
  &--wide {
482
484
  --max-content-width: #{$content-width-wide};
@@ -18,5 +18,7 @@ export default DitoComponent.component('DitoSidebar', {})
18
18
  flex: 0 4 $sidebar-max-width;
19
19
  max-width: $sidebar-max-width;
20
20
  min-width: $sidebar-min-width;
21
+ // For the `@container` rule in `.dito-container` to work:
22
+ container-type: inline-size;
21
23
  }
22
24
  </style>
@@ -95,8 +95,6 @@ export default DitoTypeComponent.register(
95
95
 
96
96
  &__text {
97
97
  @include ellipsis;
98
-
99
- height: calc(1em * var(--line-height));
100
98
  }
101
99
  }
102
100
  </style>
@@ -343,6 +343,7 @@ $tag-line-height: 1em;
343
343
  &__input {
344
344
  font-size: inherit;
345
345
  line-height: inherit;
346
+ white-space: nowrap;
346
347
  min-height: 0;
347
348
  margin: 0 0 1px 0;
348
349
  // Sadly, vue-select sets style="padding: ...;" in addition to using
@@ -360,8 +361,6 @@ $tag-line-height: 1em;
360
361
  }
361
362
 
362
363
  &__placeholder {
363
- white-space: nowrap;
364
-
365
364
  &::after {
366
365
  // Enforce actual line-height for positioning.
367
366
  content: '\200b';
@@ -118,6 +118,7 @@ export default DitoTypeComponent.register('object', {
118
118
  margin: 0;
119
119
  padding: $form-spacing;
120
120
  box-sizing: border-box;
121
+ min-width: min-content;
121
122
 
122
123
  .dito-object-content {
123
124
  flex: 0 1 100%;
@@ -4,7 +4,7 @@
4
4
  //- on whether they handle single or multiple uploads, render the upload
5
5
  //- component invisibly at the root, and delegate the click events to it from
6
6
  //- the buttons rendered further below. Luckily this works surprisingly well.
7
- VueUpload.dito-upload-input(
7
+ VueUpload.dito-upload__input(
8
8
  ref="upload"
9
9
  v-model="uploads"
10
10
  :inputId="dataPath"
@@ -71,8 +71,8 @@
71
71
  :thumbnail="thumbnails"
72
72
  :thumbnailUrl="thumbnailUrls[index]"
73
73
  )
74
- td {{ formatFileSize(file.size) }}
75
- td
74
+ td.dito-upload__size {{ formatFileSize(file.size) }}
75
+ td.dito-upload__status
76
76
  template(
77
77
  v-if="file.upload"
78
78
  )
@@ -476,13 +476,18 @@ function asFiles(value) {
476
476
  }
477
477
  }
478
478
 
479
- .dito-upload-input {
479
+ &__size,
480
+ &__status {
481
+ white-space: nowrap;
482
+ }
483
+
484
+ &__input {
480
485
  // See `onClickUpload()` method for details.
481
486
  position: absolute;
482
487
  pointer-events: none;
483
488
  }
484
489
 
485
- .dito-upload-footer {
490
+ &__footer {
486
491
  display: flex;
487
492
  justify-content: flex-end;
488
493
  align-items: center;