kanto-ds 1.4.0 → 1.5.2

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.
Files changed (130) hide show
  1. package/README.md +10 -10
  2. package/dist/chunks/{defaults-BwgjMcww.js → defaults-CFrjqae2.js} +22 -21
  3. package/dist/chunks/{defaults-BwgjMcww.js.map → defaults-CFrjqae2.js.map} +1 -1
  4. package/dist/chunks/events-r51msXNf.js +22 -0
  5. package/dist/chunks/{events-Bjl5Zmmq.js.map → events-r51msXNf.js.map} +1 -1
  6. package/dist/chunks/floating-B7_Dahpn.js +54 -0
  7. package/dist/chunks/floating-B7_Dahpn.js.map +1 -0
  8. package/dist/chunks/{form-control-CxjBTt1c.js → form-control-B74_EHtG.js} +7 -7
  9. package/dist/chunks/form-control-B74_EHtG.js.map +1 -0
  10. package/dist/chunks/{index-DSSLJirw.js → index-STEEvEP7.js} +24 -12
  11. package/dist/chunks/index-STEEvEP7.js.map +1 -0
  12. package/dist/chunks/kt-calendar-B_hFdD9V.js +640 -0
  13. package/dist/chunks/kt-calendar-B_hFdD9V.js.map +1 -0
  14. package/dist/chunks/{kt-element-E-tfJpGQ.js → kt-element-Djx2JcGl.js} +2 -2
  15. package/dist/chunks/{kt-element-E-tfJpGQ.js.map → kt-element-Djx2JcGl.js.map} +1 -1
  16. package/dist/chunks/{listbox-Sm3nvsC6.js → listbox-llcUu_V-.js} +18 -14
  17. package/dist/chunks/{listbox-Sm3nvsC6.js.map → listbox-llcUu_V-.js.map} +1 -1
  18. package/dist/chunks/locale-C5xLkGx5.js +14 -0
  19. package/dist/chunks/locale-C5xLkGx5.js.map +1 -0
  20. package/dist/chunks/position-Cx_ZH5zh.js +39 -0
  21. package/dist/chunks/position-Cx_ZH5zh.js.map +1 -0
  22. package/dist/components/core/kt-avatar/kt-avatar.js +2 -2
  23. package/dist/components/core/kt-badge/kt-badge.js +3 -3
  24. package/dist/components/core/kt-button/kt-button.js +1 -1
  25. package/dist/components/core/kt-card/kt-card.js +2 -2
  26. package/dist/components/core/kt-code/kt-code.js +3 -3
  27. package/dist/components/core/kt-icon/kt-icon.js +2 -2
  28. package/dist/components/core/kt-kbd/kt-kbd.js +1 -1
  29. package/dist/components/core/kt-split-button/kt-split-button.js +4 -4
  30. package/dist/components/data/kt-chart/kt-chart.js +3 -3
  31. package/dist/components/data/kt-meter/kt-meter.js +1 -1
  32. package/dist/components/data/kt-pagination/kt-pagination.js +3 -3
  33. package/dist/components/data/kt-stat/kt-stat.js +1 -1
  34. package/dist/components/data/kt-table/kt-table.d.ts +53 -3
  35. package/dist/components/data/kt-table/kt-table.js +286 -131
  36. package/dist/components/data/kt-table/kt-table.js.map +1 -1
  37. package/dist/components/data/kt-table/window.d.ts +19 -0
  38. package/dist/components/data/kt-timeline/kt-timeline.js +1 -1
  39. package/dist/components/feedback/kt-alert/kt-alert.js +3 -3
  40. package/dist/components/feedback/kt-empty-state/kt-empty-state.js +1 -1
  41. package/dist/components/feedback/kt-progress-bar/kt-progress-bar.js +10 -10
  42. package/dist/components/feedback/kt-progress-bar/kt-progress-bar.js.map +1 -1
  43. package/dist/components/feedback/kt-skeleton/kt-skeleton.js +1 -1
  44. package/dist/components/feedback/kt-toast/kt-toast.js +58 -42
  45. package/dist/components/feedback/kt-toast/kt-toast.js.map +1 -1
  46. package/dist/components/feedback/kt-toast-container/kt-toast-container.js +1 -1
  47. package/dist/components/feedback/kt-tooltip/kt-tooltip.d.ts +20 -0
  48. package/dist/components/feedback/kt-tooltip/kt-tooltip.js +95 -51
  49. package/dist/components/feedback/kt-tooltip/kt-tooltip.js.map +1 -1
  50. package/dist/components/forms/kt-calendar/kt-calendar.d.ts +96 -0
  51. package/dist/components/forms/kt-calendar/kt-calendar.js +13 -0
  52. package/dist/components/forms/kt-calendar/kt-calendar.js.map +1 -0
  53. package/dist/components/forms/kt-checkbox/kt-checkbox.d.ts +9 -0
  54. package/dist/components/forms/kt-checkbox/kt-checkbox.js +34 -20
  55. package/dist/components/forms/kt-checkbox/kt-checkbox.js.map +1 -1
  56. package/dist/components/forms/kt-date-picker/kt-date-picker.d.ts +105 -0
  57. package/dist/components/forms/kt-date-picker/kt-date-picker.js +382 -0
  58. package/dist/components/forms/kt-date-picker/kt-date-picker.js.map +1 -0
  59. package/dist/components/forms/kt-drag-drop/kt-drag-drop.d.ts +9 -0
  60. package/dist/components/forms/kt-drag-drop/kt-drag-drop.js +36 -22
  61. package/dist/components/forms/kt-drag-drop/kt-drag-drop.js.map +1 -1
  62. package/dist/components/forms/kt-form/kt-form.js +2 -2
  63. package/dist/components/forms/kt-input/kt-input.d.ts +37 -1
  64. package/dist/components/forms/kt-input/kt-input.js +380 -194
  65. package/dist/components/forms/kt-input/kt-input.js.map +1 -1
  66. package/dist/components/forms/kt-input-menu/kt-input-menu.d.ts +13 -0
  67. package/dist/components/forms/kt-input-menu/kt-input-menu.js +73 -42
  68. package/dist/components/forms/kt-input-menu/kt-input-menu.js.map +1 -1
  69. package/dist/components/forms/kt-label-input/kt-label-input.js +1 -1
  70. package/dist/components/forms/kt-radio-group/kt-radio-group.d.ts +9 -0
  71. package/dist/components/forms/kt-radio-group/kt-radio-group.js +67 -53
  72. package/dist/components/forms/kt-radio-group/kt-radio-group.js.map +1 -1
  73. package/dist/components/forms/kt-select/kt-select.d.ts +13 -0
  74. package/dist/components/forms/kt-select/kt-select.js +87 -56
  75. package/dist/components/forms/kt-select/kt-select.js.map +1 -1
  76. package/dist/components/forms/kt-textarea/kt-textarea.d.ts +9 -0
  77. package/dist/components/forms/kt-textarea/kt-textarea.js +28 -14
  78. package/dist/components/forms/kt-textarea/kt-textarea.js.map +1 -1
  79. package/dist/components/forms/kt-toggle/kt-toggle.d.ts +9 -0
  80. package/dist/components/forms/kt-toggle/kt-toggle.js +43 -29
  81. package/dist/components/forms/kt-toggle/kt-toggle.js.map +1 -1
  82. package/dist/components/navigation/kt-breadcrumb/kt-breadcrumb.js +3 -3
  83. package/dist/components/navigation/kt-header/kt-header.js +3 -3
  84. package/dist/components/navigation/kt-page-header/kt-page-header.js +1 -1
  85. package/dist/components/navigation/kt-segmented-control/kt-segmented-control.d.ts +9 -0
  86. package/dist/components/navigation/kt-segmented-control/kt-segmented-control.js +40 -22
  87. package/dist/components/navigation/kt-segmented-control/kt-segmented-control.js.map +1 -1
  88. package/dist/components/navigation/kt-sub-menu-navigation/kt-sub-menu-navigation.js +3 -3
  89. package/dist/components/navigation/kt-tabs/kt-tabs.js +2 -2
  90. package/dist/components/navigation/kt-toggle-button/kt-toggle-button.js +2 -2
  91. package/dist/components/navigation/kt-toggle-button-group/kt-toggle-button-group.js +3 -3
  92. package/dist/components/overlays/kt-collapsible/kt-collapsible.js +2 -2
  93. package/dist/components/overlays/kt-confirm-dialog/kt-confirm-dialog.js +3 -3
  94. package/dist/components/overlays/kt-dropdown/kt-dropdown.d.ts +7 -5
  95. package/dist/components/overlays/kt-dropdown/kt-dropdown.js +67 -57
  96. package/dist/components/overlays/kt-dropdown/kt-dropdown.js.map +1 -1
  97. package/dist/components/overlays/kt-modal/kt-modal.js +3 -3
  98. package/dist/components/overlays/kt-side-panel/kt-side-panel.js +3 -3
  99. package/dist/custom-elements.json +2110 -124
  100. package/dist/icons/defaults.d.ts +1 -0
  101. package/dist/icons/index.js +1 -1
  102. package/dist/index.d.ts +4 -0
  103. package/dist/index.js +91 -87
  104. package/dist/index.js.map +1 -1
  105. package/dist/internal/countries.d.ts +24 -9
  106. package/dist/internal/date.d.ts +53 -0
  107. package/dist/internal/events.d.ts +5 -0
  108. package/dist/internal/floating.d.ts +48 -0
  109. package/dist/internal/form-control.d.ts +5 -1
  110. package/dist/internal/locale.d.ts +15 -0
  111. package/dist/internal/position.d.ts +27 -0
  112. package/dist/internal/strings.d.ts +15 -0
  113. package/dist/react/index.d.ts +12 -0
  114. package/dist/react/index.js +180 -166
  115. package/dist/react/index.js.map +1 -1
  116. package/dist/react/jsx.d.ts +11 -1
  117. package/dist/strings/index.js +1 -1
  118. package/dist/tokens/base.css +2 -0
  119. package/dist/tokens/responsive.css +1 -0
  120. package/dist/tokens/spacing.css +1 -0
  121. package/dist/vscode.css-custom-data.json +8 -0
  122. package/dist/vscode.html-custom-data.json +138 -11
  123. package/dist/vue/index.d.ts +4 -0
  124. package/dist/vue/index.js +9 -7
  125. package/dist/vue/index.js.map +1 -1
  126. package/dist/web-types.json +292 -14
  127. package/package.json +10 -1
  128. package/dist/chunks/events-Bjl5Zmmq.js +0 -18
  129. package/dist/chunks/form-control-CxjBTt1c.js.map +0 -1
  130. package/dist/chunks/index-DSSLJirw.js.map +0 -1
@@ -2,6 +2,7 @@
2
2
  export declare const defaultIcons: {
3
3
  ArrowDown: import("lucide").IconNode;
4
4
  ArrowUp: import("lucide").IconNode;
5
+ Calendar: import("lucide").IconNode;
5
6
  Check: import("lucide").IconNode;
6
7
  ChevronDown: import("lucide").IconNode;
7
8
  ChevronLeft: import("lucide").IconNode;
@@ -1,4 +1,4 @@
1
- import { d as a, g as r, r as o, a as t, b as c, t as g } from "../chunks/defaults-BwgjMcww.js";
1
+ import { d as a, g as r, r as o, a as t, b as c, t as g } from "../chunks/defaults-CFrjqae2.js";
2
2
  export {
3
3
  a as defaultIcons,
4
4
  r as getIcon,
package/dist/index.d.ts CHANGED
@@ -21,6 +21,10 @@ export { KtIcon } from './components/core/kt-icon/kt-icon.js';
21
21
  export { KtKbd } from './components/core/kt-kbd/kt-kbd.js';
22
22
  export { KtCheckbox } from './components/forms/kt-checkbox/kt-checkbox.js';
23
23
  export type { KtCheckboxSize } from './components/forms/kt-checkbox/kt-checkbox.js';
24
+ export { KtCalendar } from './components/forms/kt-calendar/kt-calendar.js';
25
+ export type { KtCalendarView } from './components/forms/kt-calendar/kt-calendar.js';
26
+ export { KtDatePicker } from './components/forms/kt-date-picker/kt-date-picker.js';
27
+ export type { KtDatePickerSize } from './components/forms/kt-date-picker/kt-date-picker.js';
24
28
  export { KtDragDrop } from './components/forms/kt-drag-drop/kt-drag-drop.js';
25
29
  export { KtForm } from './components/forms/kt-form/kt-form.js';
26
30
  export { KtInput } from './components/forms/kt-input/kt-input.js';
package/dist/index.js CHANGED
@@ -7,102 +7,106 @@ import { KtCode as i } from "./components/core/kt-code/kt-code.js";
7
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
9
  import { KtCheckbox as T } from "./components/forms/kt-checkbox/kt-checkbox.js";
10
- import { KtDragDrop as I } from "./components/forms/kt-drag-drop/kt-drag-drop.js";
11
- import { KtForm as C } from "./components/forms/kt-form/kt-form.js";
12
- import { KtInput as D } from "./components/forms/kt-input/kt-input.js";
13
- import { KtInputMenu as P } from "./components/forms/kt-input-menu/kt-input-menu.js";
14
- import { KtLabelInput as h } from "./components/forms/kt-label-input/kt-label-input.js";
15
- import { KtRadio as v, KtRadioGroup as A } from "./components/forms/kt-radio-group/kt-radio-group.js";
16
- import { KtSelect as H } from "./components/forms/kt-select/kt-select.js";
17
- import { KtTextarea as w } from "./components/forms/kt-textarea/kt-textarea.js";
18
- import { KtToggle as F } from "./components/forms/kt-toggle/kt-toggle.js";
19
- import { KtBreadcrumb as N } from "./components/navigation/kt-breadcrumb/kt-breadcrumb.js";
20
- import { KtPageHeader as q } from "./components/navigation/kt-page-header/kt-page-header.js";
21
- import { KtSegmentedControl as J } from "./components/navigation/kt-segmented-control/kt-segmented-control.js";
22
- import { KtSubMenuNavigation as Q } from "./components/navigation/kt-sub-menu-navigation/kt-sub-menu-navigation.js";
23
- import { KtTabs as V } from "./components/navigation/kt-tabs/kt-tabs.js";
24
- import { KtHeader as X } from "./components/navigation/kt-header/kt-header.js";
25
- import { KtToggleButton as Z } from "./components/navigation/kt-toggle-button/kt-toggle-button.js";
26
- import { KtToggleButtonGroup as $ } from "./components/navigation/kt-toggle-button-group/kt-toggle-button-group.js";
27
- import { KtAlert as ot } from "./components/feedback/kt-alert/kt-alert.js";
28
- import { KtEmptyState as et } from "./components/feedback/kt-empty-state/kt-empty-state.js";
29
- import { KtProgressBar as mt } from "./components/feedback/kt-progress-bar/kt-progress-bar.js";
30
- import { KtSkeleton as xt } from "./components/feedback/kt-skeleton/kt-skeleton.js";
31
- import { KtToast as at } from "./components/feedback/kt-toast/kt-toast.js";
32
- import { KtToastContainer as st } from "./components/feedback/kt-toast-container/kt-toast-container.js";
33
- import { t as gt } from "./chunks/toaster-PmdKSV5x.js";
34
- import { KtTooltip as dt } from "./components/feedback/kt-tooltip/kt-tooltip.js";
35
- import { KtCollapsible as St } from "./components/overlays/kt-collapsible/kt-collapsible.js";
36
- import { KtConfirmDialog as bt } from "./components/overlays/kt-confirm-dialog/kt-confirm-dialog.js";
37
- import { KtDropdown as ct } from "./components/overlays/kt-dropdown/kt-dropdown.js";
38
- import { KtModal as Bt } from "./components/overlays/kt-modal/kt-modal.js";
39
- import { KtSidePanel as Mt } from "./components/overlays/kt-side-panel/kt-side-panel.js";
40
- import { KtChart as Et } from "./components/data/kt-chart/kt-chart.js";
41
- import { KtMeter as kt } from "./components/data/kt-meter/kt-meter.js";
42
- import { KtPagination as At } from "./components/data/kt-pagination/kt-pagination.js";
43
- import { KtStat as Ht } from "./components/data/kt-stat/kt-stat.js";
44
- import { KtTable as wt } from "./components/data/kt-table/kt-table.js";
45
- import { KtTimeline as Ft, KtTimelineItem as Lt } from "./components/data/kt-timeline/kt-timeline.js";
46
- import { g as jt, r as qt, a as zt, b as Jt } from "./chunks/defaults-BwgjMcww.js";
47
- import { d as Qt, s as Ut, r as Vt, a as Wt } from "./chunks/index-DSSLJirw.js";
48
- import { K as Yt, d as Zt } from "./chunks/kt-element-E-tfJpGQ.js";
10
+ import { K as c } from "./chunks/kt-calendar-B_hFdD9V.js";
11
+ import { KtDatePicker as I } from "./components/forms/kt-date-picker/kt-date-picker.js";
12
+ import { KtDragDrop as D } from "./components/forms/kt-drag-drop/kt-drag-drop.js";
13
+ import { KtForm as M } from "./components/forms/kt-form/kt-form.js";
14
+ import { KtInput as E } from "./components/forms/kt-input/kt-input.js";
15
+ import { KtInputMenu as v } from "./components/forms/kt-input-menu/kt-input-menu.js";
16
+ import { KtLabelInput as G } from "./components/forms/kt-label-input/kt-label-input.js";
17
+ import { KtRadio as R, KtRadioGroup as w } from "./components/forms/kt-radio-group/kt-radio-group.js";
18
+ import { KtSelect as F } from "./components/forms/kt-select/kt-select.js";
19
+ import { KtTextarea as N } from "./components/forms/kt-textarea/kt-textarea.js";
20
+ import { KtToggle as q } from "./components/forms/kt-toggle/kt-toggle.js";
21
+ import { KtBreadcrumb as J } from "./components/navigation/kt-breadcrumb/kt-breadcrumb.js";
22
+ import { KtPageHeader as Q } from "./components/navigation/kt-page-header/kt-page-header.js";
23
+ import { KtSegmentedControl as V } from "./components/navigation/kt-segmented-control/kt-segmented-control.js";
24
+ import { KtSubMenuNavigation as X } from "./components/navigation/kt-sub-menu-navigation/kt-sub-menu-navigation.js";
25
+ import { KtTabs as Z } from "./components/navigation/kt-tabs/kt-tabs.js";
26
+ import { KtHeader as $ } from "./components/navigation/kt-header/kt-header.js";
27
+ import { KtToggleButton as ot } from "./components/navigation/kt-toggle-button/kt-toggle-button.js";
28
+ import { KtToggleButtonGroup as et } from "./components/navigation/kt-toggle-button-group/kt-toggle-button-group.js";
29
+ import { KtAlert as mt } from "./components/feedback/kt-alert/kt-alert.js";
30
+ import { KtEmptyState as xt } from "./components/feedback/kt-empty-state/kt-empty-state.js";
31
+ import { KtProgressBar as at } from "./components/feedback/kt-progress-bar/kt-progress-bar.js";
32
+ import { KtSkeleton as st } from "./components/feedback/kt-skeleton/kt-skeleton.js";
33
+ import { KtToast as gt } from "./components/feedback/kt-toast/kt-toast.js";
34
+ import { KtToastContainer as dt } from "./components/feedback/kt-toast-container/kt-toast-container.js";
35
+ import { t as St } from "./chunks/toaster-PmdKSV5x.js";
36
+ import { KtTooltip as bt } from "./components/feedback/kt-tooltip/kt-tooltip.js";
37
+ import { KtCollapsible as Ct } from "./components/overlays/kt-collapsible/kt-collapsible.js";
38
+ import { KtConfirmDialog as Bt } from "./components/overlays/kt-confirm-dialog/kt-confirm-dialog.js";
39
+ import { KtDropdown as Pt } from "./components/overlays/kt-dropdown/kt-dropdown.js";
40
+ import { KtModal as kt } from "./components/overlays/kt-modal/kt-modal.js";
41
+ import { KtSidePanel as ht } from "./components/overlays/kt-side-panel/kt-side-panel.js";
42
+ import { KtChart as At } from "./components/data/kt-chart/kt-chart.js";
43
+ import { KtMeter as Ht } from "./components/data/kt-meter/kt-meter.js";
44
+ import { KtPagination as wt } from "./components/data/kt-pagination/kt-pagination.js";
45
+ import { KtStat as Ft } from "./components/data/kt-stat/kt-stat.js";
46
+ import { KtTable as Nt } from "./components/data/kt-table/kt-table.js";
47
+ import { KtTimeline as qt, KtTimelineItem as zt } from "./components/data/kt-timeline/kt-timeline.js";
48
+ import { g as Ot, r as Qt, a as Ut, b as Vt } from "./chunks/defaults-CFrjqae2.js";
49
+ import { d as Xt, s as Yt, r as Zt, a as _t } from "./chunks/index-STEEvEP7.js";
50
+ import { K as to, d as oo } from "./chunks/kt-element-Djx2JcGl.js";
49
51
  export {
50
- ot as KtAlert,
52
+ mt as KtAlert,
51
53
  r as KtAvatar,
52
54
  p as KtBadge,
53
- N as KtBreadcrumb,
55
+ J as KtBreadcrumb,
54
56
  f as KtButton,
57
+ c as KtCalendar,
55
58
  n as KtCard,
56
- Et as KtChart,
59
+ At as KtChart,
57
60
  T as KtCheckbox,
58
61
  i as KtCode,
59
- St as KtCollapsible,
60
- bt as KtConfirmDialog,
61
- I as KtDragDrop,
62
- ct as KtDropdown,
63
- Yt as KtElement,
64
- et as KtEmptyState,
65
- C as KtForm,
66
- X as KtHeader,
62
+ Ct as KtCollapsible,
63
+ Bt as KtConfirmDialog,
64
+ I as KtDatePicker,
65
+ D as KtDragDrop,
66
+ Pt as KtDropdown,
67
+ to as KtElement,
68
+ xt as KtEmptyState,
69
+ M as KtForm,
70
+ $ as KtHeader,
67
71
  l as KtIcon,
68
- D as KtInput,
69
- P as KtInputMenu,
72
+ E as KtInput,
73
+ v as KtInputMenu,
70
74
  u as KtKbd,
71
- h as KtLabelInput,
72
- kt as KtMeter,
73
- Bt as KtModal,
74
- q as KtPageHeader,
75
- At as KtPagination,
76
- mt as KtProgressBar,
77
- v as KtRadio,
78
- A as KtRadioGroup,
79
- J as KtSegmentedControl,
80
- H as KtSelect,
81
- Mt as KtSidePanel,
82
- xt as KtSkeleton,
75
+ G as KtLabelInput,
76
+ Ht as KtMeter,
77
+ kt as KtModal,
78
+ Q as KtPageHeader,
79
+ wt as KtPagination,
80
+ at as KtProgressBar,
81
+ R as KtRadio,
82
+ w as KtRadioGroup,
83
+ V as KtSegmentedControl,
84
+ F as KtSelect,
85
+ ht as KtSidePanel,
86
+ st as KtSkeleton,
83
87
  K as KtSplitButton,
84
- Ht as KtStat,
85
- Q as KtSubMenuNavigation,
86
- wt as KtTable,
87
- V as KtTabs,
88
- w as KtTextarea,
89
- Ft as KtTimeline,
90
- Lt as KtTimelineItem,
91
- at as KtToast,
92
- st as KtToastContainer,
93
- F as KtToggle,
94
- Z as KtToggleButton,
95
- $ as KtToggleButtonGroup,
96
- dt as KtTooltip,
97
- Qt as defaultStrings,
98
- Zt as defineElement,
99
- jt as getIcon,
100
- Ut as getStrings,
101
- qt as registerIcon,
102
- zt as registerIcons,
103
- Jt as registeredIcons,
104
- Vt as resetStrings,
105
- Wt as setStrings,
106
- gt as toaster
88
+ Ft as KtStat,
89
+ X as KtSubMenuNavigation,
90
+ Nt as KtTable,
91
+ Z as KtTabs,
92
+ N as KtTextarea,
93
+ qt as KtTimeline,
94
+ zt as KtTimelineItem,
95
+ gt as KtToast,
96
+ dt as KtToastContainer,
97
+ q as KtToggle,
98
+ ot as KtToggleButton,
99
+ et as KtToggleButtonGroup,
100
+ bt as KtTooltip,
101
+ Xt as defaultStrings,
102
+ oo as defineElement,
103
+ Ot as getIcon,
104
+ Yt as getStrings,
105
+ Qt as registerIcon,
106
+ Ut as registerIcons,
107
+ Vt as registeredIcons,
108
+ Zt as resetStrings,
109
+ _t as setStrings,
110
+ St as toaster
107
111
  };
108
112
  //# 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,9 +1,9 @@
1
1
  /**
2
2
  * Country data for the phone mode of `<kt-input>`.
3
3
  *
4
- * Deliberately a short list rather than all 195: an exhaustive picker is a
5
- * worse experience than a handful of entries and a search box. Applications
6
- * that need more pass their own list to the element.
4
+ * Most of the planet by population rather than all 195 — the panel has a
5
+ * search box, and the long tail of microstates mostly adds scrolling.
6
+ * Applications that need a different set pass their own list to the element.
7
7
  */
8
8
  export interface KtCountry {
9
9
  /** ISO 3166-1 alpha-2, lowercase. */
@@ -11,8 +11,18 @@ export interface KtCountry {
11
11
  readonly name: string;
12
12
  /** International dialling code, without the leading `+`. */
13
13
  readonly dialCode: string;
14
- /** Placeholder showing the local format. */
14
+ /**
15
+ * A national number as it is written without the trunk prefix, used as the
16
+ * placeholder. Its digit groups are also how a typed number is grouped.
17
+ */
15
18
  readonly format: string;
19
+ /**
20
+ * What a number starts with when dialled from inside the country — the `0`
21
+ * of `06 12 34 56 78` — and never after the dial code. Absent where no such
22
+ * prefix exists, or where it can also begin a number: an Italian landline
23
+ * keeps its 0 after +39.
24
+ */
25
+ readonly trunkPrefix?: string;
16
26
  }
17
27
  export declare const DEFAULT_COUNTRIES: readonly KtCountry[];
18
28
  /**
@@ -26,12 +36,17 @@ export declare function flagEmoji(id: string): string;
26
36
  /** Keeps only the digits — what gets stored and submitted. */
27
37
  export declare function digitsOnly(value: string): string;
28
38
  /**
29
- * Groups digits for display, per country.
30
- *
31
- * North American numbers read as `123 456 7890`, French ones as
32
- * `6 12 34 56 78` — a single leading digit, then pairs. Everything else falls
33
- * back to groups of three.
39
+ * Groups digits for display, the way the country's `format` groups them:
40
+ * `1 23 45 67 89` makes `6 12 34 56 78`. Digits past the format go in one
41
+ * last group rather than being dropped, and a country with no format falls
42
+ * back to threes.
34
43
  */
35
44
  export declare function formatNationalNumber(digits: string, country: KtCountry | undefined): string;
45
+ /**
46
+ * The trunk prefix a number was typed with, if any. Someone used to dialling
47
+ * `06 12 34 56 78` types the 0 after +33 too, and the result is not a number
48
+ * that exists.
49
+ */
50
+ export declare function leadingTrunkPrefix(digits: string, country: KtCountry | undefined): string | undefined;
36
51
  /** Filters by name, dial code or country code — whatever the user types. */
37
52
  export declare function searchCountries(countries: readonly KtCountry[], query: string): readonly KtCountry[];
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Calendar dates without a time or a time zone.
3
+ *
4
+ * A date picker deals in days, and `Date` deals in instants: "2026-03-29" at
5
+ * local midnight does not exist in some zones on DST night, and a day computed
6
+ * in UTC is off by one for half the planet. So dates here are plain
7
+ * `{ year, month, day }` values (month 1–12), serialised as ISO `YYYY-MM-DD`.
8
+ * `Date` is only built — at noon, clear of any DST gap — to hand to `Intl`
9
+ * for formatting.
10
+ */
11
+ export interface PlainDate {
12
+ readonly year: number;
13
+ readonly month: number;
14
+ readonly day: number;
15
+ }
16
+ export declare function daysInMonth(year: number, month: number): number;
17
+ /** `2026-09-25` → date, or `null` when malformed or impossible (Feb 30). */
18
+ export declare function parseDate(value: string | null | undefined): PlainDate | null;
19
+ export declare function formatDate(date: PlainDate): string;
20
+ /** An ISO 8601 interval, `start/end`. Either half may be missing or malformed. */
21
+ export declare function parseRange(value: string | null | undefined): {
22
+ start: PlainDate | null;
23
+ end: PlainDate | null;
24
+ };
25
+ export declare function formatRange(start: PlainDate, end: PlainDate): string;
26
+ /** Negative, zero or positive, like a sort comparator. */
27
+ export declare function compareDates(a: PlainDate, b: PlainDate): number;
28
+ export declare function isSameDay(a: PlainDate | null, b: PlainDate | null): boolean;
29
+ /** Whether `date` falls between `a` and `b`, inclusive, in either order. */
30
+ export declare function isBetween(date: PlainDate, a: PlainDate, b: PlainDate): boolean;
31
+ /** Day arithmetic in UTC, where every day is 24 hours long. */
32
+ export declare function addDays(date: PlainDate, days: number): PlainDate;
33
+ /** Month arithmetic that clamps: 31 January + 1 month is 28 or 29 February. */
34
+ export declare function addMonths(date: PlainDate, months: number): PlainDate;
35
+ /** 1 = Monday … 7 = Sunday, as ISO 8601 and `Intl.Locale#weekInfo` count them. */
36
+ export declare function isoWeekday(date: PlainDate): number;
37
+ /** The first day of the week containing `date`, weeks starting on `firstDay`. */
38
+ export declare function startOfWeek(date: PlainDate, firstDay: number): PlainDate;
39
+ /**
40
+ * The six weeks a month view shows — always six, so the calendar keeps its
41
+ * height from one month to the next instead of jumping under the pointer.
42
+ */
43
+ export declare function monthGrid(year: number, month: number, firstDay: number): PlainDate[][];
44
+ export declare function today(): PlainDate;
45
+ /** A `Date` for `Intl` to format: local noon, clear of any DST transition. */
46
+ export declare function toLocalDate(date: PlainDate): Date;
47
+ /**
48
+ * The first day of the week in `locale` — Monday in most of the world,
49
+ * Sunday in the US, Saturday in parts of the Middle East. Read from
50
+ * `Intl.Locale#getWeekInfo` (or the older `weekInfo` getter) where the
51
+ * browser has it, Monday otherwise.
52
+ */
53
+ export declare function firstDayOfWeek(locale: string): number;
@@ -12,3 +12,8 @@ export declare function emit<T>(host: HTMLElement, name: string, detail?: T): Cu
12
12
  * across a shadow root.
13
13
  */
14
14
  export declare function uniqueId(prefix: string): string;
15
+ /**
16
+ * Adds a listener when `on`, removes it otherwise — for the document-wide
17
+ * listeners an open popup needs and a closed one should not pay for.
18
+ */
19
+ export declare function toggleListener(on: boolean, target: EventTarget, type: string, listener: EventListener, options?: AddEventListenerOptions): void;
@@ -0,0 +1,48 @@
1
+ import { type ReactiveController, type ReactiveControllerHost } from 'lit';
2
+ import { type Align, type Side } from './position.js';
3
+ /**
4
+ * A panel that opens from a trigger — a select's list, a date picker's
5
+ * calendar, a menu — drawn in the top layer and placed from the trigger.
6
+ *
7
+ * A panel positioned inside its element was cut off by any ancestor with
8
+ * `overflow: hidden`: a table cell, a side panel, an app's scrolling main
9
+ * area. In the top layer, nothing clips it. It opens on the side asked for, or
10
+ * the other one when that has no room, and follows the trigger as the page
11
+ * scrolls.
12
+ */
13
+ export interface FloatingOptions {
14
+ /** The panel, which carries `popover="manual"` and the `floating` class. */
15
+ readonly panel: () => HTMLElement | null | undefined;
16
+ /** What the panel opens from. */
17
+ readonly anchor: () => Element | null | undefined;
18
+ /** The side it prefers. */
19
+ readonly side?: () => Side;
20
+ /** Which edge of the anchor it lines up with; its start by default. */
21
+ readonly align?: () => Align;
22
+ /** Sizes the panel to the anchor's width — a list under its field. */
23
+ readonly matchWidth?: boolean;
24
+ /** Told the side it opened on, for the direction of its entrance. */
25
+ readonly onPlace?: (side: Side) => void;
26
+ }
27
+ /**
28
+ * The panel's own styles. Closed, it keeps the display and the hidden,
29
+ * animatable state its element gives it, so it can fade out after it leaves
30
+ * the top layer: `display` here only undoes the popover's `display: none`, and
31
+ * a panel's own `display` still wins.
32
+ */
33
+ export declare const floatingStyles: import("lit").CSSResult;
34
+ export declare class FloatingController implements ReactiveController {
35
+ private readonly options;
36
+ private open;
37
+ private frame;
38
+ constructor(host: ReactiveControllerHost, options: FloatingOptions);
39
+ /**
40
+ * Call from the host's `updated()` with whether the panel is open. While it
41
+ * is, every update re-places it: its content — a filtered list — can change
42
+ * its size.
43
+ */
44
+ sync(open: boolean): void;
45
+ hostDisconnected(): void;
46
+ private follow;
47
+ private place;
48
+ }
@@ -21,8 +21,12 @@ export declare function attachFormInternals(host: HTMLElement): UsableInternals
21
21
  *
22
22
  * A `FormData` submits each of its entries as they are named in it — which is
23
23
  * how one control contributes several files under one name.
24
+ *
25
+ * `state` is what `formStateRestoreCallback` receives back when the browser
26
+ * restores the page, for a control whose submitted value alone cannot rebuild
27
+ * it. Without one, the browser hands back `value`.
24
28
  */
25
- export declare function setFormValue(internals: UsableInternals | null, value: string | FormData | null): void;
29
+ export declare function setFormValue(internals: UsableInternals | null, value: string | FormData | null, state?: string): void;
26
30
  /**
27
31
  * Mirrors a control's validity onto the host element.
28
32
  *
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The locale an element formats and sorts in: its own `locale` when set, else
3
+ * the page's `<html lang>`, else the browser's language.
4
+ *
5
+ * The page's language comes before the browser's because it is what the text
6
+ * around the element is written in — a French page read on an English browser
7
+ * should still file "Élodie" the French way.
8
+ */
9
+ export declare function resolveLocale(own: string): string;
10
+ /**
11
+ * A date format for `locale` and `options`, made once and reused. Building an
12
+ * `Intl.DateTimeFormat` is slow next to using one, and a calendar formats
13
+ * every day it shows on every render — a hundred of them for two arrow keys.
14
+ */
15
+ export declare function dateFormat(locale: string, options: Intl.DateTimeFormatOptions): Intl.DateTimeFormat;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Placing a floating box — a tooltip bubble — beside the element it belongs
3
+ * to, in viewport coordinates, so it can be drawn with `position: fixed` in
4
+ * the top layer where no ancestor's `overflow` can clip it.
5
+ */
6
+ export type Side = 'top' | 'bottom' | 'left' | 'right';
7
+ /** Along its side: centred on the anchor, or flush with its start or end — a menu. */
8
+ export type Align = 'center' | 'start' | 'end';
9
+ export interface Box {
10
+ readonly width: number;
11
+ readonly height: number;
12
+ }
13
+ export interface Anchor extends Box {
14
+ readonly left: number;
15
+ readonly top: number;
16
+ }
17
+ /**
18
+ * Where to draw `box` on the `side` asked for, or on the opposite side when
19
+ * the one asked for would run off the screen and the other would not. Along
20
+ * its side, the box is centred on the anchor or flush with its start or end, then
21
+ * slid back inside the screen.
22
+ */
23
+ export declare function placeFloating(anchor: Anchor, box: Box, viewport: Box, side: Side, align?: Align): {
24
+ x: number;
25
+ y: number;
26
+ placement: Side;
27
+ };
@@ -53,11 +53,26 @@ export interface KtStrings {
53
53
  browseFiles: string;
54
54
  recommendedSize: (size: string) => string;
55
55
  selectedFiles: string;
56
+ /** `kt-date-picker` with nothing chosen, and its calendar's name. */
57
+ selectDate: string;
58
+ selectPeriod: string;
59
+ previousMonth: string;
60
+ nextMonth: string;
61
+ previousYear: string;
62
+ nextYear: string;
63
+ previousYears: string;
64
+ nextYears: string;
65
+ /** The calendar header's month and year buttons, which open those views. */
66
+ chooseMonth: string;
67
+ chooseYear: string;
56
68
  required: string;
57
69
  selectOption: string;
58
70
  selectFile: string;
59
71
  /** A required checkbox left unchecked. */
60
72
  checkRequired: string;
73
+ dateRequired: string;
74
+ /** A phone number typed with the prefix only dialled from inside the country. */
75
+ phoneTrunkPrefix: (prefix: string) => string;
61
76
  openMenu: string;
62
77
  closeMenu: string;
63
78
  breadcrumb: string;
@@ -8,6 +8,8 @@ import { KtCode as KtCodeElement } from '../components/core/kt-code/kt-code.js';
8
8
  import { KtIcon as KtIconElement } from '../components/core/kt-icon/kt-icon.js';
9
9
  import { KtKbd as KtKbdElement } from '../components/core/kt-kbd/kt-kbd.js';
10
10
  import { KtCheckbox as KtCheckboxElement } from '../components/forms/kt-checkbox/kt-checkbox.js';
11
+ import { KtCalendar as KtCalendarElement } from '../components/forms/kt-calendar/kt-calendar.js';
12
+ import { KtDatePicker as KtDatePickerElement } from '../components/forms/kt-date-picker/kt-date-picker.js';
11
13
  import { KtDragDrop as KtDragDropElement } from '../components/forms/kt-drag-drop/kt-drag-drop.js';
12
14
  import { KtForm as KtFormElement } from '../components/forms/kt-form/kt-form.js';
13
15
  import { KtInput as KtInputElement } from '../components/forms/kt-input/kt-input.js';
@@ -96,6 +98,16 @@ export declare const KtToggle: import("@lit/react").ReactWebComponent<KtToggleEl
96
98
  checked: boolean;
97
99
  }>;
98
100
  }>;
101
+ export declare const KtCalendar: import("@lit/react").ReactWebComponent<KtCalendarElement, {
102
+ onKtChange: Kt<{
103
+ value: string;
104
+ }>;
105
+ }>;
106
+ export declare const KtDatePicker: import("@lit/react").ReactWebComponent<KtDatePickerElement, {
107
+ onKtChange: Kt<{
108
+ value: string | null;
109
+ }>;
110
+ }>;
99
111
  export declare const KtCheckbox: import("@lit/react").ReactWebComponent<KtCheckboxElement, {
100
112
  onKtChange: Kt<{
101
113
  checked: boolean;