@knime/kds-components 11.0.0 → 11.1.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 +7 -0
- package/README.md +49 -11
- package/dist/index.js +110 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
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
|
-
|
|
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 {
|
|
27
|
+
<script setup lang="ts">
|
|
28
|
+
import { KdsButton, KdsIcon } from "@knime/kds-components";
|
|
18
29
|
</script>
|
|
19
30
|
|
|
20
31
|
<template>
|
|
21
|
-
|
|
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
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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.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: {
|