@knime/kds-components 0.9.0 → 0.9.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.
package/dist/index.css CHANGED
@@ -1390,7 +1390,7 @@ body:has(dialog.modal[open]) {
1390
1390
  }
1391
1391
 
1392
1392
  .kds-modal {
1393
- &[data-v-c95b809a] {
1393
+ &[data-v-d8ed98e7] {
1394
1394
  /* rule is broken it complains about local variables for no reason */
1395
1395
  /* stylelint-disable csstools/value-no-unknown-custom-properties */
1396
1396
  --modal-full-size: 95%;
@@ -1402,7 +1402,7 @@ body:has(dialog.modal[open]) {
1402
1402
  height: var(--modal-height);
1403
1403
  max-height: var(--modal-full-size);
1404
1404
  padding: 0;
1405
- overflow: var(--v085a353b);
1405
+ overflow: var(--v1ee8fa3c);
1406
1406
  font: var(--kds-font-base-body-small);
1407
1407
  color: var(--kds-color-text-and-icon-neutral);
1408
1408
  background-color: var(--kds-color-surface-default);
@@ -1419,55 +1419,55 @@ body:has(dialog.modal[open]) {
1419
1419
 
1420
1420
  /* hide if its not open */
1421
1421
  }
1422
- &.width-small[data-v-c95b809a] {
1422
+ &.width-small[data-v-d8ed98e7] {
1423
1423
  --modal-width: var(--kds-dimension-component-width-25x);
1424
1424
  --modal-animation-time: 100ms;
1425
1425
  --modal-scale-base: 0.85;
1426
1426
  }
1427
- &.width-medium[data-v-c95b809a] {
1427
+ &.width-medium[data-v-d8ed98e7] {
1428
1428
  --modal-width: var(--kds-dimension-component-width-32x);
1429
1429
  --modal-animation-time: 140ms;
1430
1430
  --modal-scale-base: 0.88;
1431
1431
  }
1432
- &.width-large[data-v-c95b809a] {
1432
+ &.width-large[data-v-d8ed98e7] {
1433
1433
  --modal-width: var(--kds-dimension-component-width-45x);
1434
1434
  --modal-animation-time: 210ms;
1435
1435
  --modal-scale-base: 0.88;
1436
1436
  }
1437
- &.width-xlarge[data-v-c95b809a] {
1437
+ &.width-xlarge[data-v-d8ed98e7] {
1438
1438
  --modal-width: var(--kds-dimension-component-width-61x);
1439
1439
  --modal-animation-time: 300ms;
1440
1440
  --modal-scale-base: 0.88;
1441
1441
  }
1442
- &.width-full[data-v-c95b809a] {
1442
+ &.width-full[data-v-d8ed98e7] {
1443
1443
  --modal-width: var(--modal-full-size);
1444
1444
  --modal-animation-time: 350ms;
1445
1445
  --modal-scale-base: 0.92;
1446
1446
  }
1447
- &.height-full[data-v-c95b809a] {
1447
+ &.height-full[data-v-d8ed98e7] {
1448
1448
  --modal-height: var(--modal-full-size);
1449
1449
  }
1450
- &.height-auto[data-v-c95b809a] {
1450
+ &.height-auto[data-v-d8ed98e7] {
1451
1451
  --modal-height: fit-content;
1452
1452
  }
1453
- &[data-v-c95b809a]:not([open]) {
1453
+ &[data-v-d8ed98e7]:not([open]) {
1454
1454
  display: none;
1455
1455
  }
1456
- &[data-v-c95b809a]:focus-visible,
1457
- &[data-v-c95b809a]:focus {
1456
+ &[data-v-d8ed98e7]:focus-visible,
1457
+ &[data-v-d8ed98e7]:focus {
1458
1458
  outline: none;
1459
1459
  }
1460
- &[data-v-c95b809a]::backdrop {
1460
+ &[data-v-d8ed98e7]::backdrop {
1461
1461
  background: var(--kds-color-blanket-default);
1462
1462
  opacity: 0;
1463
1463
  transition: var(--modal-animation-time) allow-discrete;
1464
1464
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
1465
1465
  transition-property: display, opacity, overlay;
1466
1466
  }
1467
- &[open][data-v-c95b809a]::backdrop {
1467
+ &[open][data-v-d8ed98e7]::backdrop {
1468
1468
  opacity: 1;
1469
1469
  }
1470
- &[open][data-v-c95b809a] {
1470
+ &[open][data-v-d8ed98e7] {
1471
1471
  opacity: 1;
1472
1472
  transform: scale(1);
1473
1473
  }
@@ -1476,18 +1476,18 @@ body:has(dialog.modal[open]) {
1476
1476
  /** Animation starting styles */
1477
1477
  @starting-style {
1478
1478
  .kds-modal {
1479
- &[data-v-c95b809a] {
1479
+ &[data-v-d8ed98e7] {
1480
1480
  opacity: 1;
1481
1481
  transform: scale(1);
1482
1482
  }
1483
- &[open][data-v-c95b809a] {
1483
+ &[open][data-v-d8ed98e7] {
1484
1484
  opacity: 0;
1485
1485
  transform: scale(var(--modal-scale-base));
1486
1486
  }
1487
- &[data-v-c95b809a]::backdrop {
1487
+ &[data-v-d8ed98e7]::backdrop {
1488
1488
  opacity: 1;
1489
1489
  }
1490
- &[open][data-v-c95b809a]::backdrop {
1490
+ &[open][data-v-d8ed98e7]::backdrop {
1491
1491
  opacity: 0;
1492
1492
  }
1493
1493
  }
package/dist/index.js CHANGED
@@ -3154,6 +3154,22 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3154
3154
 
3155
3155
  const KdsVariableToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-64296d74"]]);
3156
3156
 
3157
+ const createUnwrappedPromise = () => {
3158
+ let resolve = () => {
3159
+ };
3160
+ let reject = () => {
3161
+ };
3162
+ const promise = new Promise((res, rej) => {
3163
+ resolve = res;
3164
+ reject = rej;
3165
+ });
3166
+ return { resolve, reject, promise };
3167
+ };
3168
+
3169
+ function sleep(ms) {
3170
+ return new Promise((resolve) => setTimeout(resolve, ms));
3171
+ }
3172
+
3157
3173
  const kdsModalClosedBy = {
3158
3174
  ANY: "any",
3159
3175
  CLOSEREQUEST: "closerequest",
@@ -3263,7 +3279,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3263
3279
  emits: ["close", "closed"],
3264
3280
  setup(__props, { emit: __emit }) {
3265
3281
  useCssVars((_ctx) => ({
3266
- "v085a353b": _ctx.overflow
3282
+ "v1ee8fa3c": _ctx.overflow
3267
3283
  }));
3268
3284
  const props = __props;
3269
3285
  const emit = __emit;
@@ -3285,17 +3301,22 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3285
3301
  );
3286
3302
  const renderDialog = ref(props.active);
3287
3303
  const removeDialog = () => {
3304
+ if (!renderDialog.value) {
3305
+ return;
3306
+ }
3288
3307
  renderDialog.value = false;
3289
3308
  emit("closed");
3290
3309
  };
3291
3310
  watch(
3292
3311
  () => props.active,
3293
- (value, lastValue) => {
3312
+ async (value, lastValue) => {
3294
3313
  if (value === false && lastValue === true) {
3295
3314
  if (dialog.value) {
3296
3315
  Promise.all(
3297
3316
  dialog.value.getAnimations({ subtree: true }).map((animation) => animation.finished)
3298
3317
  ).then(removeDialog);
3318
+ await sleep(350);
3319
+ removeDialog();
3299
3320
  } else {
3300
3321
  removeDialog();
3301
3322
  }
@@ -3345,19 +3366,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3345
3366
  }
3346
3367
  });
3347
3368
 
3348
- const KdsModal = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-c95b809a"]]);
3349
-
3350
- const createUnwrappedPromise = () => {
3351
- let resolve = () => {
3352
- };
3353
- let reject = () => {
3354
- };
3355
- const promise = new Promise((res, rej) => {
3356
- resolve = res;
3357
- reject = rej;
3358
- });
3359
- return { resolve, reject, promise };
3360
- };
3369
+ const KdsModal = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-d8ed98e7"]]);
3361
3370
 
3362
3371
  const defaultCancelButton = {
3363
3372
  type: "cancel",