@knime/kds-components 11.0.0 → 11.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @knime/kds-components
2
2
 
3
+ ## 11.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 7dbad9a: `KdsDescription`: keep empty paragraphs and headings (e.g. produced by `KdsRichTextEditor`) visible as blank lines.
8
+ - 2c0897f: useKdsDarkMode: improve type of lightDark
9
+ - Updated dependencies
10
+ - @knime/kds-styles@11.1.1
11
+
12
+ ## 11.1.0
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [1cbcad8]
17
+ - @knime/kds-styles@11.1.0
18
+
3
19
  ## 11.0.0
4
20
 
5
21
  ### Major Changes
package/README.md CHANGED
@@ -1,27 +1,44 @@
1
1
  # @knime/kds-components
2
2
 
3
- Vue components library for the KNIME Design System.
3
+ Vue 3 components library for the KNIME Design System.
4
+
5
+ This is part of the [KNIME Design System](../../README.md).
4
6
 
5
7
  ## Installation
6
8
 
9
+ `vue` and `@vueuse/core` are peer dependencies. `@knime/kds-styles` provides
10
+ the design tokens every component styles against; it comes along as a
11
+ dependency, but install it directly too so your app can import its CSS:
12
+
7
13
  ```bash
8
- pnpm add @knime/kds-components
14
+ pnpm add @knime/kds-components @knime/kds-styles vue @vueuse/core
9
15
  ```
10
16
 
11
17
  ## Usage
12
18
 
13
- TODO: fill once better examples are available, also explain how to set up using @knime/kds-styles
19
+ Import the CSS variables once in your app entry, then use the components:
20
+
21
+ ```ts
22
+ // main.ts — required once; components render unstyled without it
23
+ import "@knime/kds-styles/kds-variables.css";
24
+ ```
14
25
 
15
26
  ```vue
16
- <script setup>
17
- import { Icon } from "@knime/kds-components";
27
+ <script setup lang="ts">
28
+ import { KdsButton, KdsIcon } from "@knime/kds-components";
18
29
  </script>
19
30
 
20
31
  <template>
21
- <Icon name="checkmark" size="large" />
32
+ <!-- Components are configured through props; slot exposure is kept minimal
33
+ on purpose so usage stays consistent across KNIME applications. -->
34
+ <KdsButton label="Confirm" leading-icon="checkmark" variant="filled" />
35
+ <KdsIcon name="checkmark" />
22
36
  </template>
23
37
  ```
24
38
 
39
+ See the [`@knime/kds-styles` README](../styles/README.md) for the other CSS
40
+ entry points (`index.css`, `fonts.css`) and for enabling dark mode.
41
+
25
42
  ## Using with Vitest, Nuxt, or Vite SSR
26
43
 
27
44
  The published JavaScript imports its CSS as a side effect (e.g.
@@ -49,18 +66,39 @@ export default defineConfig({ ssr: { noExternal: [/@knime\//] } });
49
66
  export default defineNuxtConfig({ build: { transpile: [/@knime\//] } });
50
67
  ```
51
68
 
52
- ## Available Components
69
+ ## Available components
70
+
71
+ The component set changes frequently, so the authoritative, always-current list
72
+ is the **[live Storybook](https://master--68e8c00876b55a4f55c29090.chromatic.com/)**,
73
+ which documents every component's props, events, and slots.
74
+
75
+ Everything re-exported from [`src/index.ts`](src/index.ts) is public API, grouped as:
53
76
 
54
- - **Button**: Basic button component
55
- - **Icon**: Icon component with various KNIME icons
56
- - **DataType**: DataType component rendering a data type icon inside a box
77
+ | Group | Source | Examples |
78
+ | ------------------ | ------------------------------- | --------------------------------------------------------------------- |
79
+ | **Accessories** | `src/components/accessories` | `KdsIcon`, `KdsBadge`, `KdsAvatar`, `KdsDivider`, `KdsLoadingSpinner` |
80
+ | **Buttons** | `src/components/buttons` | `KdsButton`, `KdsMenuButton`, `KdsSplitButton`, `KdsToggleButton` |
81
+ | **Feedback** | `src/components/feedback` | `KdsEmptyState`, `KdsInlineMessage`, `KdsProgressBar` |
82
+ | **Forms** | `src/components/forms` | `KdsCheckbox`, `KdsRadioButton`, `KdsToggleSwitch`, inputs/selects |
83
+ | **Lists** | `src/components/lists` | `KdsMenu`, `KdsContextMenu`, `KdsListContainer` |
84
+ | **Rich text** | `src/components/richText` | `KdsDescription` |
85
+ | **Visualizations** | `src/components/visualizations` | `KdsDonutChart` |
86
+ | **Layouts** | `src/layouts` | cards, explorer, overlays (incl. the `vKdsTooltip` directive), panels |
87
+ | **Utilities** | `src/util` | composables, e.g. `useKdsDarkMode()`, `useKdsIsTruncated()` |
88
+
89
+ To discover components from an AI agent, use the `/frontend:kds-components`
90
+ skill rather than reading the sources.
57
91
 
58
92
  ## Development
59
93
 
60
94
  ### Building
61
95
 
96
+ Run from the monorepo root (this package's build depends on `@knime/kds-styles`
97
+ and `@knime/utils` being built first):
98
+
62
99
  ```bash
63
- pnpm build
100
+ pnpm build # all packages, in dependency order
101
+ pnpm build:components # only this package
64
102
  ```
65
103
 
66
104
  ## License
package/dist/index.css CHANGED
@@ -3815,17 +3815,26 @@ textarea[data-v-ec173ba8]::-webkit-scrollbar {
3815
3815
  }
3816
3816
 
3817
3817
  .description {
3818
- &[data-v-6d2e8d69] {
3818
+ &[data-v-69089f62] {
3819
3819
  font: var(--kds-font-base-body-small);
3820
3820
  color: var(--kds-color-text-and-icon-neutral);
3821
3821
  overflow-wrap: anywhere;
3822
3822
 
3823
3823
  /* stylelint-disable knime/no-deep-nesting */
3824
3824
  }
3825
- &.plain[data-v-6d2e8d69] {
3825
+ &.plain[data-v-69089f62] {
3826
3826
  white-space: pre-line;
3827
3827
  }
3828
- &[data-v-6d2e8d69] {
3828
+ &[data-v-69089f62] {
3829
+ h1,
3830
+ h2,
3831
+ h3,
3832
+ h4,
3833
+ h5,
3834
+ h6,
3835
+ p {
3836
+ min-height: 1lh;
3837
+ }
3829
3838
  p {
3830
3839
  & {
3831
3840
  padding: 0;
@@ -3964,7 +3973,7 @@ a {
3964
3973
  margin-left: var(--kds-spacing-container-0-12x);
3965
3974
  content: "";
3966
3975
  background-color: var(--link-color);
3967
- mask-image: var(--v43d54fac);
3976
+ mask-image: var(--a9aab1a4);
3968
3977
  mask-repeat: no-repeat;
3969
3978
  mask-size: contain;
3970
3979
  }
package/dist/index.js CHANGED
@@ -886,6 +886,62 @@ var color$1 = {
886
886
  }
887
887
  }
888
888
  },
889
+ "neutral-opaque": {
890
+ initial: {
891
+ light: {
892
+ h: 0,
893
+ s: 0,
894
+ l: 99,
895
+ a: 1
896
+ },
897
+ dark: {
898
+ h: 0,
899
+ s: 0,
900
+ l: 22,
901
+ a: 1
902
+ },
903
+ css: {
904
+ value: "light-dark(hsl(0, 0%, 99%), hsl(0, 0%, 22%))",
905
+ variable: "var(--kds-color-background-neutral-opaque-initial)"
906
+ }
907
+ },
908
+ hover: {
909
+ light: {
910
+ h: 0,
911
+ s: 0,
912
+ l: 94.1,
913
+ a: 1
914
+ },
915
+ dark: {
916
+ h: 0,
917
+ s: 0,
918
+ l: 32.2,
919
+ a: 1
920
+ },
921
+ css: {
922
+ value: "light-dark(hsl(0, 0%, 94.1%), hsl(0, 0%, 32.2%))",
923
+ variable: "var(--kds-color-background-neutral-opaque-hover)"
924
+ }
925
+ },
926
+ active: {
927
+ light: {
928
+ h: 0,
929
+ s: 0,
930
+ l: 90.2,
931
+ a: 1
932
+ },
933
+ dark: {
934
+ h: 0,
935
+ s: 0,
936
+ l: 43,
937
+ a: 1
938
+ },
939
+ css: {
940
+ value: "light-dark(hsl(0, 0%, 90.2%), hsl(0, 0%, 43%))",
941
+ variable: "var(--kds-color-background-neutral-opaque-active)"
942
+ }
943
+ }
944
+ },
889
945
  primary: {
890
946
  initial: {
891
947
  light: {
@@ -2313,6 +2369,60 @@ var color$1 = {
2313
2369
  value: "light-dark(hsl(0 0% 10.2% / 0.74), hsl(0 0% 99% / 0.68))",
2314
2370
  variable: "var(--kds-color-border-neutral-bold-active)"
2315
2371
  }
2372
+ },
2373
+ "neutral-opaque-initial": {
2374
+ light: {
2375
+ h: 0,
2376
+ s: 0,
2377
+ l: 64,
2378
+ a: 1
2379
+ },
2380
+ dark: {
2381
+ h: 0,
2382
+ s: 0,
2383
+ l: 64,
2384
+ a: 1
2385
+ },
2386
+ css: {
2387
+ value: "hsl(0, 0%, 64%)",
2388
+ variable: "var(--kds-color-border-neutral-opaque-initial)"
2389
+ }
2390
+ },
2391
+ "neutral-opaque-hover": {
2392
+ light: {
2393
+ h: 0,
2394
+ s: 0,
2395
+ l: 43,
2396
+ a: 1
2397
+ },
2398
+ dark: {
2399
+ h: 0,
2400
+ s: 0,
2401
+ l: 72.5,
2402
+ a: 1
2403
+ },
2404
+ css: {
2405
+ value: "light-dark(hsl(0, 0%, 43%), hsl(0, 0%, 72.5%))",
2406
+ variable: "var(--kds-color-border-neutral-opaque-hover)"
2407
+ }
2408
+ },
2409
+ "neutral-opaque-active": {
2410
+ light: {
2411
+ h: 0,
2412
+ s: 0,
2413
+ l: 32.2,
2414
+ a: 1
2415
+ },
2416
+ dark: {
2417
+ h: 0,
2418
+ s: 0,
2419
+ l: 90.2,
2420
+ a: 1
2421
+ },
2422
+ css: {
2423
+ value: "light-dark(hsl(0, 0%, 32.2%), hsl(0, 0%, 90.2%))",
2424
+ variable: "var(--kds-color-border-neutral-opaque-active)"
2425
+ }
2316
2426
  }
2317
2427
  },
2318
2428
  focus: {
@@ -26905,7 +27015,7 @@ var KdsDescription_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
26905
27015
  }
26906
27016
  },
26907
27017
  setup(__props) {
26908
- useCssVars((_ctx) => ({ "v43d54fac": externalIcon }));
27018
+ useCssVars((_ctx) => ({ "a9aab1a4": externalIcon }));
26909
27019
  const externalIcon = `url("${external_link_default}")`;
26910
27020
  return (_ctx, _cache) => {
26911
27021
  return __props.renderAsHtml ? (openBlock(), createElementBlock("div", mergeProps({ key: 0 }, { ..._ctx.$attrs }, {
@@ -26918,7 +27028,7 @@ var KdsDescription_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
26918
27028
  }, null, 8, _hoisted_2$15));
26919
27029
  };
26920
27030
  }
26921
- }), [["__scopeId", "data-v-6d2e8d69"]]);
27031
+ }), [["__scopeId", "data-v-69089f62"]]);
26922
27032
  //#endregion
26923
27033
  //#region src/components/visualizations/DonutChart/KdsDonutChart.vue?vue&type=script&setup=true&lang.ts
26924
27034
  var _hoisted_1$21 = { class: "donut-container" };