kanto-ds 1.2.0 → 1.3.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/README.md +21 -3
- package/dist/chunks/index-fzPIgxe2.js +74 -0
- package/dist/chunks/index-fzPIgxe2.js.map +1 -0
- package/dist/chunks/kt-element-mdd5cXZX.js +52 -0
- package/dist/chunks/kt-element-mdd5cXZX.js.map +1 -0
- package/dist/components/core/kt-avatar/kt-avatar.js +8 -7
- package/dist/components/core/kt-avatar/kt-avatar.js.map +1 -1
- package/dist/components/core/kt-badge/kt-badge.js +7 -6
- package/dist/components/core/kt-badge/kt-badge.js.map +1 -1
- package/dist/components/core/kt-button/kt-button.js +1 -1
- package/dist/components/core/kt-card/kt-card.js +1 -1
- package/dist/components/core/kt-code/kt-code.js +31 -30
- package/dist/components/core/kt-code/kt-code.js.map +1 -1
- package/dist/components/core/kt-icon/kt-icon.js +1 -1
- package/dist/components/core/kt-kbd/kt-kbd.js +1 -1
- package/dist/components/core/kt-split-button/kt-split-button.d.ts +2 -2
- package/dist/components/core/kt-split-button/kt-split-button.js +27 -26
- package/dist/components/core/kt-split-button/kt-split-button.js.map +1 -1
- package/dist/components/data/kt-chart/kt-chart.d.ts +2 -2
- package/dist/components/data/kt-chart/kt-chart.js +205 -204
- package/dist/components/data/kt-chart/kt-chart.js.map +1 -1
- package/dist/components/data/kt-meter/kt-meter.js +1 -1
- package/dist/components/data/kt-pagination/kt-pagination.d.ts +1 -1
- package/dist/components/data/kt-pagination/kt-pagination.js +29 -28
- package/dist/components/data/kt-pagination/kt-pagination.js.map +1 -1
- package/dist/components/data/kt-stat/kt-stat.js +1 -1
- package/dist/components/data/kt-table/kt-table.d.ts +2 -2
- package/dist/components/data/kt-table/kt-table.js +30 -29
- package/dist/components/data/kt-table/kt-table.js.map +1 -1
- package/dist/components/data/kt-timeline/kt-timeline.js +1 -1
- package/dist/components/feedback/kt-alert/kt-alert.js +17 -16
- package/dist/components/feedback/kt-alert/kt-alert.js.map +1 -1
- package/dist/components/feedback/kt-empty-state/kt-empty-state.js +1 -1
- package/dist/components/feedback/kt-progress-bar/kt-progress-bar.js +1 -1
- package/dist/components/feedback/kt-skeleton/kt-skeleton.js +1 -1
- package/dist/components/feedback/kt-toast/kt-toast.js +25 -19
- package/dist/components/feedback/kt-toast/kt-toast.js.map +1 -1
- package/dist/components/feedback/kt-toast-container/kt-toast-container.js +1 -1
- package/dist/components/feedback/kt-tooltip/kt-tooltip.js +1 -1
- package/dist/components/forms/kt-drag-drop/kt-drag-drop.d.ts +2 -2
- package/dist/components/forms/kt-drag-drop/kt-drag-drop.js +60 -57
- package/dist/components/forms/kt-drag-drop/kt-drag-drop.js.map +1 -1
- package/dist/components/forms/kt-form/kt-form.js +1 -1
- package/dist/components/forms/kt-input/kt-input.js +56 -55
- package/dist/components/forms/kt-input/kt-input.js.map +1 -1
- package/dist/components/forms/kt-input-menu/kt-input-menu.d.ts +1 -1
- package/dist/components/forms/kt-input-menu/kt-input-menu.js +57 -56
- package/dist/components/forms/kt-input-menu/kt-input-menu.js.map +1 -1
- package/dist/components/forms/kt-label-input/kt-label-input.js +1 -1
- package/dist/components/forms/kt-select/kt-select.d.ts +2 -2
- package/dist/components/forms/kt-select/kt-select.js +62 -61
- package/dist/components/forms/kt-select/kt-select.js.map +1 -1
- package/dist/components/forms/kt-textarea/kt-textarea.js +9 -8
- package/dist/components/forms/kt-textarea/kt-textarea.js.map +1 -1
- package/dist/components/forms/kt-toggle/kt-toggle.js +1 -1
- package/dist/components/navigation/kt-breadcrumb/kt-breadcrumb.d.ts +1 -1
- package/dist/components/navigation/kt-breadcrumb/kt-breadcrumb.js +6 -5
- package/dist/components/navigation/kt-breadcrumb/kt-breadcrumb.js.map +1 -1
- package/dist/components/navigation/kt-header/kt-header.js +11 -10
- package/dist/components/navigation/kt-header/kt-header.js.map +1 -1
- package/dist/components/navigation/kt-page-header/kt-page-header.js +1 -1
- package/dist/components/navigation/kt-segmented-control/kt-segmented-control.js +44 -43
- package/dist/components/navigation/kt-segmented-control/kt-segmented-control.js.map +1 -1
- package/dist/components/navigation/kt-sub-menu-navigation/kt-sub-menu-navigation.d.ts +1 -1
- package/dist/components/navigation/kt-sub-menu-navigation/kt-sub-menu-navigation.js +6 -5
- package/dist/components/navigation/kt-sub-menu-navigation/kt-sub-menu-navigation.js.map +1 -1
- package/dist/components/navigation/kt-tabs/kt-tabs.js +1 -1
- package/dist/components/navigation/kt-toggle-button/kt-toggle-button.js +1 -1
- package/dist/components/navigation/kt-toggle-button-group/kt-toggle-button-group.js +1 -1
- package/dist/components/overlays/kt-collapsible/kt-collapsible.js +1 -1
- package/dist/components/overlays/kt-confirm-dialog/kt-confirm-dialog.d.ts +3 -3
- package/dist/components/overlays/kt-confirm-dialog/kt-confirm-dialog.js +30 -27
- package/dist/components/overlays/kt-confirm-dialog/kt-confirm-dialog.js.map +1 -1
- package/dist/components/overlays/kt-dropdown/kt-dropdown.d.ts +1 -1
- package/dist/components/overlays/kt-dropdown/kt-dropdown.js +8 -7
- package/dist/components/overlays/kt-dropdown/kt-dropdown.js.map +1 -1
- package/dist/components/overlays/kt-modal/kt-modal.js +5 -4
- package/dist/components/overlays/kt-modal/kt-modal.js.map +1 -1
- package/dist/components/overlays/kt-side-panel/kt-side-panel.d.ts +1 -1
- package/dist/components/overlays/kt-side-panel/kt-side-panel.js +24 -23
- package/dist/components/overlays/kt-side-panel/kt-side-panel.js.map +1 -1
- package/dist/custom-elements.json +76 -76
- package/dist/index.d.ts +1 -0
- package/dist/index.js +24 -19
- package/dist/index.js.map +1 -1
- package/dist/internal/kt-element.d.ts +6 -1
- package/dist/internal/strings.d.ts +93 -0
- package/dist/strings/index.d.ts +11 -0
- package/dist/strings/index.js +8 -0
- package/dist/strings/index.js.map +1 -0
- package/dist/tokens/base.css +53 -0
- package/dist/web-types.json +39 -39
- package/package.json +11 -3
- package/dist/chunks/kt-element-B_jjQDhg.js +0 -38
- package/dist/chunks/kt-element-B_jjQDhg.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -80,4 +80,5 @@ export type { KtOption } from './internal/listbox.js';
|
|
|
80
80
|
export type { KtCountry } from './internal/countries.js';
|
|
81
81
|
export { getIcon, registerIcon, registerIcons, registeredIcons } from './icons/registry.js';
|
|
82
82
|
export type { IconNode } from './icons/registry.js';
|
|
83
|
+
export { defaultStrings, resetStrings, setStrings, strings as getStrings, type KtStrings, } from './internal/strings.js';
|
|
83
84
|
export { KtElement, defineElement } from './internal/kt-element.js';
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { KtAvatar as
|
|
1
|
+
import { KtAvatar as o } from "./components/core/kt-avatar/kt-avatar.js";
|
|
2
2
|
import { KtBadge as m } from "./components/core/kt-badge/kt-badge.js";
|
|
3
3
|
import { KtButton as f } from "./components/core/kt-button/kt-button.js";
|
|
4
4
|
import { KtSplitButton as K } from "./components/core/kt-split-button/kt-split-button.js";
|
|
5
5
|
import { KtCard as n } from "./components/core/kt-card/kt-card.js";
|
|
6
6
|
import { KtCode as g } from "./components/core/kt-code/kt-code.js";
|
|
7
|
-
import { KtIcon as
|
|
7
|
+
import { KtIcon as l } from "./components/core/kt-icon/kt-icon.js";
|
|
8
8
|
import { KtKbd as u } from "./components/core/kt-kbd/kt-kbd.js";
|
|
9
|
-
import { KtDragDrop as
|
|
10
|
-
import { KtForm as
|
|
9
|
+
import { KtDragDrop as T } from "./components/forms/kt-drag-drop/kt-drag-drop.js";
|
|
10
|
+
import { KtForm as b } from "./components/forms/kt-form/kt-form.js";
|
|
11
11
|
import { KtInput as B } from "./components/forms/kt-input/kt-input.js";
|
|
12
12
|
import { KtInputMenu as D } from "./components/forms/kt-input-menu/kt-input-menu.js";
|
|
13
13
|
import { KtLabelInput as P } from "./components/forms/kt-label-input/kt-label-input.js";
|
|
@@ -25,16 +25,16 @@ import { KtToggleButtonGroup as W } from "./components/navigation/kt-toggle-butt
|
|
|
25
25
|
import { KtAlert as Y } from "./components/feedback/kt-alert/kt-alert.js";
|
|
26
26
|
import { KtEmptyState as _ } from "./components/feedback/kt-empty-state/kt-empty-state.js";
|
|
27
27
|
import { KtProgressBar as tt } from "./components/feedback/kt-progress-bar/kt-progress-bar.js";
|
|
28
|
-
import { KtSkeleton as
|
|
28
|
+
import { KtSkeleton as ot } from "./components/feedback/kt-skeleton/kt-skeleton.js";
|
|
29
29
|
import { KtToast as mt } from "./components/feedback/kt-toast/kt-toast.js";
|
|
30
30
|
import { KtToastContainer as ft } from "./components/feedback/kt-toast-container/kt-toast-container.js";
|
|
31
31
|
import { t as Kt } from "./chunks/toaster-PmdKSV5x.js";
|
|
32
32
|
import { KtTooltip as nt } from "./components/feedback/kt-tooltip/kt-tooltip.js";
|
|
33
33
|
import { KtCollapsible as gt } from "./components/overlays/kt-collapsible/kt-collapsible.js";
|
|
34
|
-
import { KtConfirmDialog as
|
|
34
|
+
import { KtConfirmDialog as lt } from "./components/overlays/kt-confirm-dialog/kt-confirm-dialog.js";
|
|
35
35
|
import { KtDropdown as ut } from "./components/overlays/kt-dropdown/kt-dropdown.js";
|
|
36
|
-
import { KtModal as
|
|
37
|
-
import { KtSidePanel as
|
|
36
|
+
import { KtModal as Tt } from "./components/overlays/kt-modal/kt-modal.js";
|
|
37
|
+
import { KtSidePanel as bt } from "./components/overlays/kt-side-panel/kt-side-panel.js";
|
|
38
38
|
import { KtChart as Bt } from "./components/data/kt-chart/kt-chart.js";
|
|
39
39
|
import { KtMeter as Dt } from "./components/data/kt-meter/kt-meter.js";
|
|
40
40
|
import { KtPagination as Pt } from "./components/data/kt-pagination/kt-pagination.js";
|
|
@@ -42,10 +42,11 @@ import { KtStat as vt } from "./components/data/kt-stat/kt-stat.js";
|
|
|
42
42
|
import { KtTable as Ht } from "./components/data/kt-table/kt-table.js";
|
|
43
43
|
import { KtTimeline as kt, KtTimelineItem as wt } from "./components/data/kt-timeline/kt-timeline.js";
|
|
44
44
|
import { g as Ft, r as Gt, a as Lt, b as Nt } from "./chunks/defaults-DKzFsNbv.js";
|
|
45
|
-
import {
|
|
45
|
+
import { d as qt, s as zt, r as Jt, a as Ot } from "./chunks/index-fzPIgxe2.js";
|
|
46
|
+
import { K as Rt, d as Ut } from "./chunks/kt-element-mdd5cXZX.js";
|
|
46
47
|
export {
|
|
47
48
|
Y as KtAlert,
|
|
48
|
-
|
|
49
|
+
o as KtAvatar,
|
|
49
50
|
m as KtBadge,
|
|
50
51
|
y as KtBreadcrumb,
|
|
51
52
|
f as KtButton,
|
|
@@ -53,27 +54,27 @@ export {
|
|
|
53
54
|
Bt as KtChart,
|
|
54
55
|
g as KtCode,
|
|
55
56
|
gt as KtCollapsible,
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
lt as KtConfirmDialog,
|
|
58
|
+
T as KtDragDrop,
|
|
58
59
|
ut as KtDropdown,
|
|
59
|
-
|
|
60
|
+
Rt as KtElement,
|
|
60
61
|
_ as KtEmptyState,
|
|
61
|
-
|
|
62
|
+
b as KtForm,
|
|
62
63
|
Q as KtHeader,
|
|
63
|
-
|
|
64
|
+
l as KtIcon,
|
|
64
65
|
B as KtInput,
|
|
65
66
|
D as KtInputMenu,
|
|
66
67
|
u as KtKbd,
|
|
67
68
|
P as KtLabelInput,
|
|
68
69
|
Dt as KtMeter,
|
|
69
|
-
|
|
70
|
+
Tt as KtModal,
|
|
70
71
|
G as KtPageHeader,
|
|
71
72
|
Pt as KtPagination,
|
|
72
73
|
tt as KtProgressBar,
|
|
73
74
|
N as KtSegmentedControl,
|
|
74
75
|
v as KtSelect,
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
bt as KtSidePanel,
|
|
77
|
+
ot as KtSkeleton,
|
|
77
78
|
K as KtSplitButton,
|
|
78
79
|
vt as KtStat,
|
|
79
80
|
q as KtSubMenuNavigation,
|
|
@@ -88,11 +89,15 @@ export {
|
|
|
88
89
|
U as KtToggleButton,
|
|
89
90
|
W as KtToggleButtonGroup,
|
|
90
91
|
nt as KtTooltip,
|
|
91
|
-
|
|
92
|
+
qt as defaultStrings,
|
|
93
|
+
Ut as defineElement,
|
|
92
94
|
Ft as getIcon,
|
|
95
|
+
zt as getStrings,
|
|
93
96
|
Gt as registerIcon,
|
|
94
97
|
Lt as registerIcons,
|
|
95
98
|
Nt as registeredIcons,
|
|
99
|
+
Jt as resetStrings,
|
|
100
|
+
Ot as setStrings,
|
|
96
101
|
Kt as toaster
|
|
97
102
|
};
|
|
98
103
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement, type CSSResultGroup } from 'lit';
|
|
1
|
+
import { LitElement, type CSSResultGroup, type PropertyValues } from 'lit';
|
|
2
2
|
/**
|
|
3
3
|
* Base class for every Kanto element.
|
|
4
4
|
*
|
|
@@ -10,6 +10,11 @@ import { LitElement, type CSSResultGroup } from 'lit';
|
|
|
10
10
|
*/
|
|
11
11
|
export declare class KtElement extends LitElement {
|
|
12
12
|
static styles: CSSResultGroup;
|
|
13
|
+
private unsubscribeStrings;
|
|
14
|
+
connectedCallback(): void;
|
|
15
|
+
disconnectedCallback(): void;
|
|
16
|
+
/** True when this update was triggered by `setStrings`. */
|
|
17
|
+
protected stringsChanged(changed: PropertyValues): boolean;
|
|
13
18
|
}
|
|
14
19
|
/**
|
|
15
20
|
* Registers a custom element, tolerating a repeat call.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every piece of copy the elements write themselves — empty states, button
|
|
3
|
+
* labels, validation messages, and the accessible names a screen reader
|
|
4
|
+
* announces but nobody sees.
|
|
5
|
+
*
|
|
6
|
+
* English by default. An application in another language replaces them once,
|
|
7
|
+
* at start-up, and every element follows:
|
|
8
|
+
*
|
|
9
|
+
* import { setStrings } from 'kanto-ds/strings';
|
|
10
|
+
*
|
|
11
|
+
* setStrings({
|
|
12
|
+
* clear: 'Effacer',
|
|
13
|
+
* pageOf: (page, total) => `Page ${page} sur ${total}`,
|
|
14
|
+
* });
|
|
15
|
+
*
|
|
16
|
+
* Anything left out keeps its English default. A string an element also takes
|
|
17
|
+
* as a property — `emptyText`, `placeholder`, `confirmLabel` — still wins when
|
|
18
|
+
* it is set, so one screen can say something different from the rest.
|
|
19
|
+
*
|
|
20
|
+
* Copy that carries a value is a function, not a template with placeholders:
|
|
21
|
+
* the translation owns the word order, and "Remove {name}" does not survive
|
|
22
|
+
* languages that put the object first.
|
|
23
|
+
*/
|
|
24
|
+
export interface KtStrings {
|
|
25
|
+
/** Clear button in fields. */
|
|
26
|
+
clear: string;
|
|
27
|
+
/** Close button on toasts, alerts' dismiss button. */
|
|
28
|
+
close: string;
|
|
29
|
+
dismiss: string;
|
|
30
|
+
/** Copy button on `kt-code`, and its state once copied. */
|
|
31
|
+
copy: string;
|
|
32
|
+
copied: string;
|
|
33
|
+
copyCode: string;
|
|
34
|
+
/** The countdown bar on a toast that closes itself. */
|
|
35
|
+
timeRemaining: string;
|
|
36
|
+
/** Remove button on a badge or a dropped file. */
|
|
37
|
+
remove: (name: string) => string;
|
|
38
|
+
noOptions: string;
|
|
39
|
+
noResults: string;
|
|
40
|
+
noActions: string;
|
|
41
|
+
noData: string;
|
|
42
|
+
loading: string;
|
|
43
|
+
/** `kt-select` with nothing chosen. */
|
|
44
|
+
select: string;
|
|
45
|
+
openList: string;
|
|
46
|
+
closeList: string;
|
|
47
|
+
showPassword: string;
|
|
48
|
+
hidePassword: string;
|
|
49
|
+
searchCountry: string;
|
|
50
|
+
noCountry: string;
|
|
51
|
+
countryCode: (country: string | undefined) => string;
|
|
52
|
+
dragAndDrop: string;
|
|
53
|
+
browseFiles: string;
|
|
54
|
+
recommendedSize: (size: string) => string;
|
|
55
|
+
selectedFiles: string;
|
|
56
|
+
required: string;
|
|
57
|
+
selectOption: string;
|
|
58
|
+
selectFile: string;
|
|
59
|
+
openMenu: string;
|
|
60
|
+
closeMenu: string;
|
|
61
|
+
breadcrumb: string;
|
|
62
|
+
secondaryNavigation: string;
|
|
63
|
+
pagination: string;
|
|
64
|
+
previous: string;
|
|
65
|
+
next: string;
|
|
66
|
+
pageOf: (page: number, total: number) => string;
|
|
67
|
+
moreActions: string;
|
|
68
|
+
selectRow: string;
|
|
69
|
+
selectAll: string;
|
|
70
|
+
total: string;
|
|
71
|
+
/** Column headers of the data table every chart renders for assistive tech. */
|
|
72
|
+
chartSeries: string;
|
|
73
|
+
chartPoint: string;
|
|
74
|
+
chartSlice: string;
|
|
75
|
+
chartShare: string;
|
|
76
|
+
confirmHeading: string;
|
|
77
|
+
confirm: string;
|
|
78
|
+
cancel: string;
|
|
79
|
+
details: string;
|
|
80
|
+
avatar: string;
|
|
81
|
+
}
|
|
82
|
+
export declare const defaultStrings: Readonly<KtStrings>;
|
|
83
|
+
/** The strings in effect. Elements read them at render time. */
|
|
84
|
+
export declare function strings(): Readonly<KtStrings>;
|
|
85
|
+
/**
|
|
86
|
+
* Replaces some or all of the strings, and re-renders every connected element
|
|
87
|
+
* so the change shows at once — switching language at runtime works.
|
|
88
|
+
*/
|
|
89
|
+
export declare function setStrings(overrides: Partial<KtStrings>): void;
|
|
90
|
+
/** Back to the English defaults. */
|
|
91
|
+
export declare function resetStrings(): void;
|
|
92
|
+
/** Calls `listener` after every `setStrings`. Returns the unsubscribe function. */
|
|
93
|
+
export declare function onStringsChange(listener: () => void): () => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The copy Kanto's elements write themselves, and the way to translate it.
|
|
3
|
+
*
|
|
4
|
+
* import { setStrings } from 'kanto-ds/strings';
|
|
5
|
+
*
|
|
6
|
+
* setStrings({ clear: 'Effacer', noData: 'Aucune donnée' });
|
|
7
|
+
*
|
|
8
|
+
* A light entry point: it loads no element, so it can run before any of them.
|
|
9
|
+
* The same functions are exported from `kanto-ds`.
|
|
10
|
+
*/
|
|
11
|
+
export { defaultStrings, resetStrings, setStrings, strings as getStrings, type KtStrings, } from '#internal/strings';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/tokens/base.css
CHANGED
|
@@ -77,3 +77,56 @@ pre {
|
|
|
77
77
|
outline: var(--outline-width) solid var(--color-primary-base);
|
|
78
78
|
outline-offset: 2px;
|
|
79
79
|
}
|
|
80
|
+
|
|
81
|
+
/* Before its definition loads, a custom element is an unknown inline element:
|
|
82
|
+
its slotted text and icons show raw, unstyled, then jump into place. Hidden
|
|
83
|
+
instead — `visibility`, not `display`, so the page keeps its layout and does
|
|
84
|
+
not shift twice. Scoped to Kanto's own tags, never to every :not(:defined)
|
|
85
|
+
element on the page. */
|
|
86
|
+
:is(
|
|
87
|
+
kt-alert,
|
|
88
|
+
kt-avatar,
|
|
89
|
+
kt-badge,
|
|
90
|
+
kt-breadcrumb,
|
|
91
|
+
kt-button,
|
|
92
|
+
kt-card,
|
|
93
|
+
kt-chart,
|
|
94
|
+
kt-code,
|
|
95
|
+
kt-collapsible,
|
|
96
|
+
kt-confirm-dialog,
|
|
97
|
+
kt-drag-drop,
|
|
98
|
+
kt-dropdown,
|
|
99
|
+
kt-empty-state,
|
|
100
|
+
kt-form,
|
|
101
|
+
kt-header,
|
|
102
|
+
kt-icon,
|
|
103
|
+
kt-input,
|
|
104
|
+
kt-input-menu,
|
|
105
|
+
kt-kbd,
|
|
106
|
+
kt-label-input,
|
|
107
|
+
kt-meter,
|
|
108
|
+
kt-modal,
|
|
109
|
+
kt-page-header,
|
|
110
|
+
kt-pagination,
|
|
111
|
+
kt-progress-bar,
|
|
112
|
+
kt-segmented-control,
|
|
113
|
+
kt-select,
|
|
114
|
+
kt-side-panel,
|
|
115
|
+
kt-skeleton,
|
|
116
|
+
kt-split-button,
|
|
117
|
+
kt-stat,
|
|
118
|
+
kt-sub-menu-navigation,
|
|
119
|
+
kt-table,
|
|
120
|
+
kt-tabs,
|
|
121
|
+
kt-textarea,
|
|
122
|
+
kt-timeline,
|
|
123
|
+
kt-timeline-item,
|
|
124
|
+
kt-toast,
|
|
125
|
+
kt-toast-container,
|
|
126
|
+
kt-toggle,
|
|
127
|
+
kt-toggle-button,
|
|
128
|
+
kt-toggle-button-group,
|
|
129
|
+
kt-tooltip
|
|
130
|
+
):not(:defined) {
|
|
131
|
+
visibility: hidden;
|
|
132
|
+
}
|
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "kanto-ds",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.3.0",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -587,7 +587,7 @@
|
|
|
587
587
|
{
|
|
588
588
|
"name": "menu-label",
|
|
589
589
|
"description": "Accessible name of the caret, which has no text of its own.",
|
|
590
|
-
"value": { "type": "string", "default": "
|
|
590
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
591
591
|
},
|
|
592
592
|
{
|
|
593
593
|
"name": "preferred-placement",
|
|
@@ -596,7 +596,7 @@
|
|
|
596
596
|
},
|
|
597
597
|
{
|
|
598
598
|
"name": "empty-text",
|
|
599
|
-
"value": { "type": "string", "default": "
|
|
599
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
600
600
|
}
|
|
601
601
|
],
|
|
602
602
|
"slots": [
|
|
@@ -636,14 +636,14 @@
|
|
|
636
636
|
{
|
|
637
637
|
"name": "menuLabel",
|
|
638
638
|
"description": "Accessible name of the caret, which has no text of its own.",
|
|
639
|
-
"type": "string"
|
|
639
|
+
"type": "string | undefined"
|
|
640
640
|
},
|
|
641
641
|
{
|
|
642
642
|
"name": "preferredPlacement",
|
|
643
643
|
"description": "Where to put the menu when there is room on both sides.",
|
|
644
644
|
"type": "KtDropdownPlacement"
|
|
645
645
|
},
|
|
646
|
-
{ "name": "emptyText", "type": "string" },
|
|
646
|
+
{ "name": "emptyText", "type": "string | undefined" },
|
|
647
647
|
{
|
|
648
648
|
"name": "isOpen",
|
|
649
649
|
"description": "Whether the menu is showing.",
|
|
@@ -716,12 +716,12 @@
|
|
|
716
716
|
{
|
|
717
717
|
"name": "center-label",
|
|
718
718
|
"description": "Names the total in the middle of a doughnut.",
|
|
719
|
-
"value": { "type": "string", "default": "
|
|
719
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
720
720
|
},
|
|
721
721
|
{
|
|
722
722
|
"name": "total-label",
|
|
723
723
|
"description": "Names the sum in a stacked chart's tooltip and table.",
|
|
724
|
-
"value": { "type": "string", "default": "
|
|
724
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
725
725
|
},
|
|
726
726
|
{
|
|
727
727
|
"name": "label",
|
|
@@ -802,12 +802,12 @@
|
|
|
802
802
|
{
|
|
803
803
|
"name": "centerLabel",
|
|
804
804
|
"description": "Names the total in the middle of a doughnut.",
|
|
805
|
-
"type": "string"
|
|
805
|
+
"type": "string | undefined"
|
|
806
806
|
},
|
|
807
807
|
{
|
|
808
808
|
"name": "totalLabel",
|
|
809
809
|
"description": "Names the sum in a stacked chart's tooltip and table.",
|
|
810
|
-
"type": "string"
|
|
810
|
+
"type": "string | undefined"
|
|
811
811
|
},
|
|
812
812
|
{
|
|
813
813
|
"name": "label",
|
|
@@ -918,7 +918,7 @@
|
|
|
918
918
|
},
|
|
919
919
|
{
|
|
920
920
|
"name": "label",
|
|
921
|
-
"value": { "type": "string", "default": "
|
|
921
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
922
922
|
}
|
|
923
923
|
],
|
|
924
924
|
"events": [
|
|
@@ -935,7 +935,7 @@
|
|
|
935
935
|
"type": "number"
|
|
936
936
|
},
|
|
937
937
|
{ "name": "totalPages", "type": "number" },
|
|
938
|
-
{ "name": "label", "type": "string" }
|
|
938
|
+
{ "name": "label", "type": "string | undefined" }
|
|
939
939
|
],
|
|
940
940
|
"events": [
|
|
941
941
|
{
|
|
@@ -1067,11 +1067,11 @@
|
|
|
1067
1067
|
},
|
|
1068
1068
|
{
|
|
1069
1069
|
"name": "empty-text",
|
|
1070
|
-
"value": { "type": "string", "default": "
|
|
1070
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
1071
1071
|
},
|
|
1072
1072
|
{
|
|
1073
1073
|
"name": "loading-text",
|
|
1074
|
-
"value": { "type": "string", "default": "
|
|
1074
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
1075
1075
|
},
|
|
1076
1076
|
{
|
|
1077
1077
|
"name": "label",
|
|
@@ -1122,8 +1122,8 @@
|
|
|
1122
1122
|
"description": "Renders a cell. Return `undefined` to fall back to the raw value.",
|
|
1123
1123
|
"type": "KtCellRenderer | undefined"
|
|
1124
1124
|
},
|
|
1125
|
-
{ "name": "emptyText", "type": "string" },
|
|
1126
|
-
{ "name": "loadingText", "type": "string" },
|
|
1125
|
+
{ "name": "emptyText", "type": "string | undefined" },
|
|
1126
|
+
{ "name": "loadingText", "type": "string | undefined" },
|
|
1127
1127
|
{
|
|
1128
1128
|
"name": "label",
|
|
1129
1129
|
"description": "Accessible name for the table.",
|
|
@@ -1656,12 +1656,12 @@
|
|
|
1656
1656
|
{
|
|
1657
1657
|
"name": "heading",
|
|
1658
1658
|
"description": "The prompt above the browse link.\n\nNamed `heading`, not `title`: an element already has a `title`, and\nreusing it would put the prompt in a native tooltip on the whole zone.",
|
|
1659
|
-
"value": { "type": "string", "default": "
|
|
1659
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
1660
1660
|
},
|
|
1661
1661
|
{
|
|
1662
1662
|
"name": "link-text",
|
|
1663
1663
|
"description": "The clickable-looking part of the prompt.",
|
|
1664
|
-
"value": { "type": "string", "default": "
|
|
1664
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
1665
1665
|
},
|
|
1666
1666
|
{
|
|
1667
1667
|
"name": "recommended-size",
|
|
@@ -1711,12 +1711,12 @@
|
|
|
1711
1711
|
{
|
|
1712
1712
|
"name": "heading",
|
|
1713
1713
|
"description": "The prompt above the browse link.\n\nNamed `heading`, not `title`: an element already has a `title`, and\nreusing it would put the prompt in a native tooltip on the whole zone.",
|
|
1714
|
-
"type": "string"
|
|
1714
|
+
"type": "string | undefined"
|
|
1715
1715
|
},
|
|
1716
1716
|
{
|
|
1717
1717
|
"name": "linkText",
|
|
1718
1718
|
"description": "The clickable-looking part of the prompt.",
|
|
1719
|
-
"type": "string"
|
|
1719
|
+
"type": "string | undefined"
|
|
1720
1720
|
},
|
|
1721
1721
|
{
|
|
1722
1722
|
"name": "recommendedSize",
|
|
@@ -2007,7 +2007,7 @@
|
|
|
2007
2007
|
{ "name": "label", "value": { "type": "string", "default": "''" } },
|
|
2008
2008
|
{
|
|
2009
2009
|
"name": "empty-text",
|
|
2010
|
-
"value": { "type": "string", "default": "
|
|
2010
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
2011
2011
|
}
|
|
2012
2012
|
],
|
|
2013
2013
|
"events": [
|
|
@@ -2030,7 +2030,7 @@
|
|
|
2030
2030
|
{ "name": "required", "type": "boolean" },
|
|
2031
2031
|
{ "name": "error", "type": "string" },
|
|
2032
2032
|
{ "name": "label", "type": "string" },
|
|
2033
|
-
{ "name": "emptyText", "type": "string" },
|
|
2033
|
+
{ "name": "emptyText", "type": "string | undefined" },
|
|
2034
2034
|
{ "name": "selectedOption", "type": "KtOption | undefined" }
|
|
2035
2035
|
],
|
|
2036
2036
|
"events": [
|
|
@@ -2093,7 +2093,7 @@
|
|
|
2093
2093
|
},
|
|
2094
2094
|
{
|
|
2095
2095
|
"name": "placeholder",
|
|
2096
|
-
"value": { "type": "string", "default": "
|
|
2096
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
2097
2097
|
},
|
|
2098
2098
|
{ "name": "name", "value": { "type": "string", "default": "''" } },
|
|
2099
2099
|
{
|
|
@@ -2126,7 +2126,7 @@
|
|
|
2126
2126
|
{
|
|
2127
2127
|
"name": "empty-text",
|
|
2128
2128
|
"description": "Shown when `options` is empty.",
|
|
2129
|
-
"value": { "type": "string", "default": "
|
|
2129
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
2130
2130
|
}
|
|
2131
2131
|
],
|
|
2132
2132
|
"events": [
|
|
@@ -2147,7 +2147,7 @@
|
|
|
2147
2147
|
"description": "The selected option's id, or `null`.",
|
|
2148
2148
|
"type": "string | number | null"
|
|
2149
2149
|
},
|
|
2150
|
-
{ "name": "placeholder", "type": "string" },
|
|
2150
|
+
{ "name": "placeholder", "type": "string | undefined" },
|
|
2151
2151
|
{ "name": "name", "type": "string" },
|
|
2152
2152
|
{ "name": "size", "type": "KtSelectSize" },
|
|
2153
2153
|
{ "name": "disabled", "type": "boolean" },
|
|
@@ -2170,7 +2170,7 @@
|
|
|
2170
2170
|
{
|
|
2171
2171
|
"name": "emptyText",
|
|
2172
2172
|
"description": "Shown when `options` is empty.",
|
|
2173
|
-
"type": "string"
|
|
2173
|
+
"type": "string | undefined"
|
|
2174
2174
|
},
|
|
2175
2175
|
{
|
|
2176
2176
|
"name": "selectedOption",
|
|
@@ -2349,7 +2349,7 @@
|
|
|
2349
2349
|
{
|
|
2350
2350
|
"name": "label",
|
|
2351
2351
|
"description": "Accessible name for the navigation landmark.",
|
|
2352
|
-
"value": { "type": "string", "default": "
|
|
2352
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
2353
2353
|
}
|
|
2354
2354
|
],
|
|
2355
2355
|
"events": [
|
|
@@ -2368,7 +2368,7 @@
|
|
|
2368
2368
|
{
|
|
2369
2369
|
"name": "label",
|
|
2370
2370
|
"description": "Accessible name for the navigation landmark.",
|
|
2371
|
-
"type": "string"
|
|
2371
|
+
"type": "string | undefined"
|
|
2372
2372
|
}
|
|
2373
2373
|
],
|
|
2374
2374
|
"events": [
|
|
@@ -2590,7 +2590,7 @@
|
|
|
2590
2590
|
},
|
|
2591
2591
|
{
|
|
2592
2592
|
"name": "label",
|
|
2593
|
-
"value": { "type": "string", "default": "
|
|
2593
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
2594
2594
|
},
|
|
2595
2595
|
{
|
|
2596
2596
|
"name": "flush",
|
|
@@ -2621,7 +2621,7 @@
|
|
|
2621
2621
|
"description": "The href of the current page. Marks the matching link active.",
|
|
2622
2622
|
"type": "string"
|
|
2623
2623
|
},
|
|
2624
|
-
{ "name": "label", "type": "string" },
|
|
2624
|
+
{ "name": "label", "type": "string | undefined" },
|
|
2625
2625
|
{
|
|
2626
2626
|
"name": "flush",
|
|
2627
2627
|
"description": "Drops the card background, for a sidebar that owns its own surface.",
|
|
@@ -2907,7 +2907,7 @@
|
|
|
2907
2907
|
},
|
|
2908
2908
|
{
|
|
2909
2909
|
"name": "heading",
|
|
2910
|
-
"value": { "type": "string", "default": "
|
|
2910
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
2911
2911
|
},
|
|
2912
2912
|
{
|
|
2913
2913
|
"name": "message",
|
|
@@ -2915,11 +2915,11 @@
|
|
|
2915
2915
|
},
|
|
2916
2916
|
{
|
|
2917
2917
|
"name": "confirm-label",
|
|
2918
|
-
"value": { "type": "string", "default": "
|
|
2918
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
2919
2919
|
},
|
|
2920
2920
|
{
|
|
2921
2921
|
"name": "cancel-label",
|
|
2922
|
-
"value": { "type": "string", "default": "
|
|
2922
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
2923
2923
|
},
|
|
2924
2924
|
{
|
|
2925
2925
|
"name": "variant",
|
|
@@ -2946,10 +2946,10 @@
|
|
|
2946
2946
|
"js": {
|
|
2947
2947
|
"properties": [
|
|
2948
2948
|
{ "name": "open", "type": "boolean" },
|
|
2949
|
-
{ "name": "heading", "type": "string" },
|
|
2949
|
+
{ "name": "heading", "type": "string | undefined" },
|
|
2950
2950
|
{ "name": "message", "type": "string" },
|
|
2951
|
-
{ "name": "confirmLabel", "type": "string" },
|
|
2952
|
-
{ "name": "cancelLabel", "type": "string" },
|
|
2951
|
+
{ "name": "confirmLabel", "type": "string | undefined" },
|
|
2952
|
+
{ "name": "cancelLabel", "type": "string | undefined" },
|
|
2953
2953
|
{
|
|
2954
2954
|
"name": "variant",
|
|
2955
2955
|
"description": "`danger` gives the confirm button the solid red treatment.",
|
|
@@ -2994,7 +2994,7 @@
|
|
|
2994
2994
|
},
|
|
2995
2995
|
{
|
|
2996
2996
|
"name": "empty-text",
|
|
2997
|
-
"value": { "type": "string", "default": "
|
|
2997
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
2998
2998
|
}
|
|
2999
2999
|
],
|
|
3000
3000
|
"slots": [
|
|
@@ -3035,7 +3035,7 @@
|
|
|
3035
3035
|
"type": "KtDropdownAlign"
|
|
3036
3036
|
},
|
|
3037
3037
|
{ "name": "disabled", "type": "boolean" },
|
|
3038
|
-
{ "name": "emptyText", "type": "string" },
|
|
3038
|
+
{ "name": "emptyText", "type": "string | undefined" },
|
|
3039
3039
|
{
|
|
3040
3040
|
"name": "isOpen",
|
|
3041
3041
|
"description": "Whether the panel is showing.",
|
|
@@ -3135,7 +3135,7 @@
|
|
|
3135
3135
|
{
|
|
3136
3136
|
"name": "eyebrow",
|
|
3137
3137
|
"description": "Small uppercase label above the heading — \"Details\", \"Editing\".",
|
|
3138
|
-
"value": { "type": "string", "default": "
|
|
3138
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
3139
3139
|
},
|
|
3140
3140
|
{
|
|
3141
3141
|
"name": "heading",
|
|
@@ -3163,7 +3163,7 @@
|
|
|
3163
3163
|
{
|
|
3164
3164
|
"name": "eyebrow",
|
|
3165
3165
|
"description": "Small uppercase label above the heading — \"Details\", \"Editing\".",
|
|
3166
|
-
"type": "string"
|
|
3166
|
+
"type": "string | undefined"
|
|
3167
3167
|
},
|
|
3168
3168
|
{ "name": "heading", "type": "string" },
|
|
3169
3169
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kanto-ds",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Framework-agnostic design system for data-dense product interfaces.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design-system",
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
"dark-theme"
|
|
12
12
|
],
|
|
13
13
|
"homepage": "https://kanto.arnaudmichel.fr",
|
|
14
|
-
"bugs":
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/MrArnaudMichel/kanto/issues"
|
|
16
|
+
},
|
|
15
17
|
"repository": {
|
|
16
18
|
"type": "git",
|
|
17
19
|
"url": "git+https://github.com/MrArnaudMichel/kanto.git"
|
|
@@ -51,6 +53,10 @@
|
|
|
51
53
|
"types": "./dist/icons/index.d.ts",
|
|
52
54
|
"default": "./dist/icons/index.js"
|
|
53
55
|
},
|
|
56
|
+
"./strings": {
|
|
57
|
+
"types": "./dist/strings/index.d.ts",
|
|
58
|
+
"default": "./dist/strings/index.js"
|
|
59
|
+
},
|
|
54
60
|
"./react": {
|
|
55
61
|
"types": "./dist/react/index.d.ts",
|
|
56
62
|
"default": "./dist/react/index.js"
|
|
@@ -264,7 +270,8 @@
|
|
|
264
270
|
"format:check": "prettier --check .",
|
|
265
271
|
"clean": "node -e \"fs.rmSync(dist,{recursive:true,force:true})\"",
|
|
266
272
|
"check:exports": "node scripts/check-exports.js",
|
|
267
|
-
"
|
|
273
|
+
"check:size": "node scripts/check-size.js",
|
|
274
|
+
"verify": "npm run format:check && npm run lint && npm run typecheck && npm run test && npm run build && npm run check:exports && npm run check:size && npm run build:demo",
|
|
268
275
|
"release": "node scripts/release.js",
|
|
269
276
|
"release:dry": "node scripts/release.js --dry-run",
|
|
270
277
|
"prepublishOnly": "npm run verify"
|
|
@@ -300,6 +307,7 @@
|
|
|
300
307
|
"axe-core": "^4.13.0",
|
|
301
308
|
"custom-element-jet-brains-integration": "^1.8.0",
|
|
302
309
|
"custom-element-vs-code-integration": "^1.5.0",
|
|
310
|
+
"esbuild": "^0.28.2",
|
|
303
311
|
"eslint": "^10.10.0",
|
|
304
312
|
"eslint-config-prettier": "^10.1.8",
|
|
305
313
|
"eslint-plugin-lit": "^2.3.1",
|