@knime/kds-components 10.1.0 → 11.0.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # @knime/kds-components
2
2
 
3
+ ## 11.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - df12b1a: - `useKdsDarkMode`: export the `KdsDarkMode` type for what it returns.
8
+ - `useKdsDarkModeController`:
9
+ - add a composable that applies the stored preference to the page and returns `preferredMode`, `isDarkPreferred`, `isLightPreferred`, `isSystemPreferred`, a writable `isDark`, `isLight`, and `lightDark`.
10
+ - export the `KdsDarkModeController` type for what it returns.
11
+
12
+ BREAKING CHANGES:
13
+
14
+ - `useKdsDarkMode`:
15
+ - make it read-only. It returns `isDark`, `isLight`, and `lightDark`, read from the `color-scheme` of `<html>`, and changes neither the page nor the stored preference.
16
+ - stop returning `preferredMode`, `isDarkPreferred`, `isLightPreferred`, and `isSystemPreferred`. To apply, set, or read the stored preference, call `useKdsDarkModeController()` instead.
17
+
18
+ ### Minor Changes
19
+
20
+ - 880698d: `KdsFileExplorer`: Remove z-index isolation for custom drag preview, which interferes with a
21
+ consumer's own z-index stack. Also allow customizing z-index value
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies
26
+ - @knime/kds-styles@11.0.0
27
+
28
+ ## 10.2.0
29
+
30
+ ### Minor Changes
31
+
32
+ - 6e81ee9: `KdsToggleSwitch`: add the `xsmall` size, with a 10px label, a 20×12px track, and an 8px knob without icon.
33
+
34
+ ### Patch Changes
35
+
36
+ - Updated dependencies [6e81ee9, 2352be0]
37
+ - @knime/kds-styles@10.2.0
38
+ - @knime/utils@2.0.3
39
+
3
40
  ## 10.1.0
4
41
 
5
42
  ### Patch Changes
package/dist/index.css CHANGED
@@ -2478,7 +2478,7 @@ to {
2478
2478
  }
2479
2479
 
2480
2480
  .toggle-switch {
2481
- &[data-v-3f7f0351] {
2481
+ &[data-v-1f2d16a6] {
2482
2482
  --bg-initial: var(--kds-color-background-neutral-bold-initial);
2483
2483
  --bg-hover: var(--kds-color-background-neutral-bold-hover);
2484
2484
  --bg-active: var(--kds-color-background-neutral-bold-active);
@@ -2497,34 +2497,39 @@ to {
2497
2497
  background: none;
2498
2498
  border: none;
2499
2499
  }
2500
- &.small[data-v-3f7f0351] {
2500
+ &.xsmall[data-v-1f2d16a6] {
2501
+ font: var(--kds-font-base-title-xsmall);
2502
+ }
2503
+ &.small[data-v-1f2d16a6] {
2501
2504
  font: var(--kds-font-base-title-small);
2502
2505
  }
2503
- &.medium[data-v-3f7f0351] {
2506
+ &.medium[data-v-1f2d16a6] {
2504
2507
  font: var(--kds-font-base-title-medium);
2505
2508
  }
2506
- &.label-right[data-v-3f7f0351] {
2509
+ &.label-right[data-v-1f2d16a6] {
2507
2510
  flex-direction: row;
2508
2511
  gap: var(--kds-spacing-container-0-37x);
2509
2512
  }
2510
- &.label-top[data-v-3f7f0351] {
2513
+ &.label-top[data-v-1f2d16a6] {
2511
2514
  flex-direction: column-reverse;
2512
2515
  gap: var(--kds-spacing-container-0-12x);
2513
2516
  align-items: flex-start;
2514
2517
  }
2515
- &.small.label-right[data-v-3f7f0351] {
2518
+ &.xsmall.label-right[data-v-1f2d16a6],
2519
+ &.small.label-right[data-v-1f2d16a6] {
2516
2520
  gap: var(--kds-spacing-container-0-37x);
2517
2521
  }
2518
- &.medium.label-right[data-v-3f7f0351] {
2522
+ &.medium.label-right[data-v-1f2d16a6] {
2519
2523
  gap: var(--kds-spacing-container-0-5x);
2520
2524
  }
2521
- &.small.label-top[data-v-3f7f0351] {
2525
+ &.xsmall.label-top[data-v-1f2d16a6],
2526
+ &.small.label-top[data-v-1f2d16a6] {
2522
2527
  gap: var(--kds-spacing-container-0-12x);
2523
2528
  }
2524
- &.medium.label-top[data-v-3f7f0351] {
2529
+ &.medium.label-top[data-v-1f2d16a6] {
2525
2530
  gap: var(--kds-spacing-container-0-25x);
2526
2531
  }
2527
- .control[data-v-3f7f0351] {
2532
+ .control[data-v-1f2d16a6] {
2528
2533
  position: relative;
2529
2534
  display: flex;
2530
2535
  flex-shrink: 0;
@@ -2536,34 +2541,39 @@ to {
2536
2541
  background 0.2s ease,
2537
2542
  border 0.2s ease;
2538
2543
  }
2539
- &.small .control[data-v-3f7f0351] {
2544
+ &.xsmall .control[data-v-1f2d16a6] {
2545
+ width: var(--kds-dimension-component-width-1-25x);
2546
+ height: var(--kds-dimension-component-height-0-75x);
2547
+ padding: var(--kds-spacing-container-0-10x);
2548
+ }
2549
+ &.small .control[data-v-1f2d16a6] {
2540
2550
  width: var(--kds-dimension-component-width-1-75x);
2541
2551
  height: var(--kds-dimension-component-height-1x);
2542
2552
  padding: var(--kds-spacing-container-0-10x);
2543
2553
  }
2544
- &.medium .control[data-v-3f7f0351] {
2554
+ &.medium .control[data-v-1f2d16a6] {
2545
2555
  width: var(--kds-dimension-component-width-2-25x);
2546
2556
  height: var(--kds-dimension-component-height-1-25x);
2547
2557
  padding: var(--kds-spacing-container-0-10x);
2548
2558
  }
2549
- &:focus-visible .control[data-v-3f7f0351] {
2559
+ &:focus-visible .control[data-v-1f2d16a6] {
2550
2560
  outline: var(--kds-border-action-focused);
2551
2561
  outline-offset: var(--kds-spacing-offset-focus);
2552
2562
  }
2553
- &:hover:not(.disabled) .control[data-v-3f7f0351] {
2563
+ &:hover:not(.disabled) .control[data-v-1f2d16a6] {
2554
2564
  background: var(--bg-hover);
2555
2565
  }
2556
- &:active:not(.disabled) .control[data-v-3f7f0351] {
2566
+ &:active:not(.disabled) .control[data-v-1f2d16a6] {
2557
2567
  background: var(--bg-active);
2558
2568
  }
2559
- &.checked[data-v-3f7f0351] {
2569
+ &.checked[data-v-1f2d16a6] {
2560
2570
  --bg-initial: var(--kds-color-background-primary-bold-initial);
2561
2571
  --bg-hover: var(--kds-color-background-primary-bold-hover);
2562
2572
  --bg-active: var(--kds-color-background-primary-bold-active);
2563
2573
  --border: var(--kds-border-action-primary);
2564
2574
  --icon-color: var(--kds-color-toggle-switch-icon-on);
2565
2575
  }
2566
- .knob[data-v-3f7f0351] {
2576
+ .knob[data-v-1f2d16a6] {
2567
2577
  display: flex;
2568
2578
  align-items: center;
2569
2579
  justify-content: center;
@@ -2576,31 +2586,35 @@ to {
2576
2586
  background 0.2s ease;
2577
2587
  }
2578
2588
  @media (prefers-reduced-motion: reduce) {
2579
- .knob[data-v-3f7f0351] {
2589
+ .knob[data-v-1f2d16a6] {
2580
2590
  transition: none;
2581
2591
  }
2582
2592
  }
2583
- &.small .knob[data-v-3f7f0351] {
2593
+ &.xsmall .knob[data-v-1f2d16a6] {
2594
+ width: var(--kds-dimension-component-width-0-5x);
2595
+ height: var(--kds-dimension-component-height-0-5x);
2596
+ }
2597
+ &.small .knob[data-v-1f2d16a6] {
2584
2598
  width: var(--kds-dimension-component-width-0-75x);
2585
2599
  height: var(--kds-dimension-component-height-0-75x);
2586
2600
  }
2587
- &.medium .knob[data-v-3f7f0351] {
2601
+ &.medium .knob[data-v-1f2d16a6] {
2588
2602
  width: var(--kds-dimension-component-width-1x);
2589
2603
  height: var(--kds-dimension-component-height-1x);
2590
2604
  }
2591
- &.checked .knob[data-v-3f7f0351] {
2605
+ &.checked .knob[data-v-1f2d16a6] {
2592
2606
  transform: translateX(100%);
2593
2607
  }
2594
2608
  .content {
2595
- &[data-v-3f7f0351] {
2609
+ &[data-v-1f2d16a6] {
2596
2610
  display: flex;
2597
2611
  flex-direction: column;
2598
2612
  }
2599
- & .label[data-v-3f7f0351] {
2613
+ & .label[data-v-1f2d16a6] {
2600
2614
  color: var(--text-color);
2601
2615
  }
2602
2616
  }
2603
- &.disabled[data-v-3f7f0351] {
2617
+ &.disabled[data-v-1f2d16a6] {
2604
2618
  --bg-initial: var(--kds-color-background-disabled-default);
2605
2619
  --border: var(--kds-border-action-disabled);
2606
2620
  --knob-color: var(--kds-color-toggle-switch-knob-disabled);
@@ -2609,7 +2623,7 @@ to {
2609
2623
 
2610
2624
  cursor: default;
2611
2625
  }
2612
- &.disabled.checked[data-v-3f7f0351] {
2626
+ &.disabled.checked[data-v-1f2d16a6] {
2613
2627
  --bg-initial: var(--kds-color-background-disabled-primary);
2614
2628
  --border: var(--kds-border-action-transparent);
2615
2629
  }
@@ -4445,7 +4459,7 @@ td {
4445
4459
  cursor: pointer;
4446
4460
  }
4447
4461
 
4448
- .file-explorer[data-v-8ba92819] {
4462
+ .file-explorer[data-v-d13e0460] {
4449
4463
  display: flex;
4450
4464
  flex: 1 0 0%;
4451
4465
  flex-direction: column;
@@ -4454,10 +4468,10 @@ td {
4454
4468
  /* needed so that the virtualization container can size the wrapper properly */
4455
4469
  min-height: 0;
4456
4470
  }
4457
- .file-explorer-item[data-v-8ba92819] {
4458
- height: var(--v15cae343);
4471
+ .file-explorer-item[data-v-d13e0460] {
4472
+ height: var(--v2bc72e90);
4459
4473
  }
4460
- thead[data-v-8ba92819] {
4474
+ thead[data-v-d13e0460] {
4461
4475
  /* Hide table head for better readability but keeping it for a11y reasons */
4462
4476
  position: absolute;
4463
4477
 
@@ -4468,7 +4482,7 @@ thead[data-v-8ba92819] {
4468
4482
  overflow: hidden;
4469
4483
  white-space: nowrap; /* added line */
4470
4484
  }
4471
- table[data-v-8ba92819] {
4485
+ table[data-v-d13e0460] {
4472
4486
  height: 100%;
4473
4487
  overflow: hidden auto;
4474
4488
  scrollbar-gutter: stable;
@@ -4479,19 +4493,19 @@ table[data-v-8ba92819] {
4479
4493
  }
4480
4494
  table,
4481
4495
  tbody {
4482
- &[data-v-8ba92819] {
4496
+ &[data-v-d13e0460] {
4483
4497
  width: 100%;
4484
4498
  border-spacing: 0;
4485
4499
  }
4486
- &[data-v-8ba92819]:not(:has(.empty)) {
4500
+ &[data-v-d13e0460]:not(:has(.empty)) {
4487
4501
  display: block;
4488
4502
  }
4489
4503
  }
4490
4504
  table:focus {
4491
- &[data-v-8ba92819] {
4505
+ &[data-v-d13e0460] {
4492
4506
  outline: none;
4493
4507
  }
4494
- &.keyboard-focus[data-v-8ba92819] {
4508
+ &.keyboard-focus[data-v-d13e0460] {
4495
4509
  outline: 2px solid var(--kds-color-focus-outline);
4496
4510
  border-radius: var(--kds-border-radius-container-0-25x);
4497
4511
  }
@@ -4499,13 +4513,13 @@ table:focus {
4499
4513
 
4500
4514
  /*
4501
4515
  * Empty state layout. When the folder is empty there are no virtualized rows,
4502
- * so we drop the CSS-table display and lay the message out with flexbox.
4516
+ * so we drop the CSS-table display and lay the message out with flexbox.
4503
4517
  * This keeps the message at the top with a fixed top spacing, horizontally centered,
4504
4518
  * and lets the bordered box grow to contain it. The previous solution with a `height: 100%`
4505
- * CSS table instead distributed the single short row inconsistently
4519
+ * CSS table instead distributed the single short row inconsistently
4506
4520
  * (Chrome centers it, Firefox keeps it at the top).
4507
4521
  */
4508
- table[data-v-8ba92819]:has(.empty) {
4522
+ table[data-v-d13e0460]:has(.empty) {
4509
4523
  display: flex;
4510
4524
  flex-direction: column;
4511
4525
 
@@ -4513,7 +4527,7 @@ table[data-v-8ba92819]:has(.empty) {
4513
4527
  * message when the surrounding container is only as tall as its content. */
4514
4528
  min-height: var(--kds-dimension-component-height-12-5x);
4515
4529
  }
4516
- tbody[data-v-8ba92819]:has(.empty) {
4530
+ tbody[data-v-d13e0460]:has(.empty) {
4517
4531
  display: flex;
4518
4532
  flex: 1 0 0;
4519
4533
  flex-direction: column;
@@ -4521,15 +4535,15 @@ tbody[data-v-8ba92819]:has(.empty) {
4521
4535
  min-height: max-content;
4522
4536
  padding-top: var(--kds-spacing-container-4x);
4523
4537
  }
4524
- .empty[data-v-8ba92819],
4525
- .empty td[data-v-8ba92819] {
4538
+ .empty[data-v-d13e0460],
4539
+ .empty td[data-v-d13e0460] {
4526
4540
  display: block;
4527
4541
  }
4528
- .custom-preview[data-v-8ba92819] {
4542
+ .custom-preview[data-v-d13e0460] {
4529
4543
  position: fixed;
4530
4544
  top: 0;
4531
4545
  left: 0;
4532
- z-index: 9;
4546
+ z-index: var(--kds-file-explorer-custom-drag-preview-z-index, 9);
4533
4547
  width: 70px;
4534
4548
  height: 70px;
4535
4549
  pointer-events: none;