@konstructio/ui 0.1.2-alpha.70 → 0.1.2-alpha.72

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 (83) hide show
  1. package/dist/{Modal-BGcucTHv.js → Modal-CXRo8f-h.js} +1 -1
  2. package/dist/assets/icons/components/CheckCircleFilled.d.ts +3 -0
  3. package/dist/assets/icons/components/CheckCircleFilled.js +31 -0
  4. package/dist/assets/icons/components/CheckCircleOutline.d.ts +3 -0
  5. package/dist/assets/icons/components/{CheckCircle.js → CheckCircleOutline.js} +8 -8
  6. package/dist/assets/icons/components/CheckboxMarkedCircleOutline.d.ts +3 -0
  7. package/dist/assets/icons/components/CheckboxMarkedCircleOutline.js +26 -0
  8. package/dist/assets/icons/components/InfoCircle.d.ts +3 -0
  9. package/dist/assets/icons/components/InfoCircle.js +31 -0
  10. package/dist/assets/icons/components/WarningTriangle.d.ts +3 -0
  11. package/dist/assets/icons/components/WarningTriangle.js +28 -0
  12. package/dist/assets/icons/components/index.d.ts +5 -1
  13. package/dist/assets/icons/components/index.js +124 -116
  14. package/dist/assets/icons/index.js +124 -116
  15. package/dist/components/Alert/Alert.d.ts +5 -16
  16. package/dist/components/Alert/Alert.js +46 -32
  17. package/dist/components/Alert/Alert.types.d.ts +8 -8
  18. package/dist/components/Alert/Alert.variants.d.ts +11 -2
  19. package/dist/components/Alert/Alert.variants.js +77 -32
  20. package/dist/components/Badge/Badge.variants.d.ts +2 -2
  21. package/dist/components/Button/Button.variants.d.ts +1 -1
  22. package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
  23. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +1 -1
  24. package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +1 -1
  25. package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +1 -1
  26. package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/useDateTimeInputs.d.ts +1 -1
  27. package/dist/components/Filter/Filter.d.ts +2 -2
  28. package/dist/components/Filter/Filter.js +20 -14
  29. package/dist/components/Filter/Filter.types.d.ts +3 -1
  30. package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.d.ts +3 -0
  31. package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +122 -0
  32. package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.types.d.ts +7 -0
  33. package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.d.ts +3 -0
  34. package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.d.ts +14 -0
  35. package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.js +74 -0
  36. package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js +155 -0
  37. package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.types.d.ts +13 -0
  38. package/dist/components/Filter/components/index.d.ts +4 -0
  39. package/dist/components/Filter/components/index.js +8 -4
  40. package/dist/components/LineChart/LineChart.d.ts +17 -0
  41. package/dist/components/LineChart/LineChart.js +154 -0
  42. package/dist/components/LineChart/LineChart.types.d.ts +54 -0
  43. package/dist/components/Modal/Modal.js +1 -1
  44. package/dist/components/Modal/components/Wrapper/Wrapper.js +2 -2
  45. package/dist/components/Modal/components/index.js +1 -1
  46. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +1 -1
  47. package/dist/components/PieChart/PieChart.js +51 -5095
  48. package/dist/components/ProgressBar/ProgressBar.variants.d.ts +1 -1
  49. package/dist/components/RadioCardGroup/RadioCardGroup.variants.d.ts +1 -1
  50. package/dist/components/RadioGroup/RadioGroup.variants.d.ts +1 -1
  51. package/dist/components/Tabs/Tabs.variants.d.ts +1 -1
  52. package/dist/components/Toast/Toast.variants.d.ts +1 -1
  53. package/dist/components/Tooltip/Tooltip.d.ts +4 -9
  54. package/dist/components/Tooltip/Tooltip.js +35 -33
  55. package/dist/components/Tooltip/Tooltip.types.d.ts +22 -11
  56. package/dist/components/Typography/Typography.variants.d.ts +1 -1
  57. package/dist/components/VirtualizedTable/VirtualizedTable.js +61 -59
  58. package/dist/components/VirtualizedTable/VirtualizedTable.types.d.ts +93 -8
  59. package/dist/components/VirtualizedTable/components/Filter/Filter.js +153 -71
  60. package/dist/components/VirtualizedTable/components/Filter/Filter.types.d.ts +7 -8
  61. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +1 -1
  62. package/dist/components/VirtualizedTable/contexts/table.context.d.ts +12 -0
  63. package/dist/components/VirtualizedTable/contexts/table.context.js +9 -0
  64. package/dist/components/VirtualizedTable/contexts/table.provider.js +198 -162
  65. package/dist/components/index.d.ts +2 -1
  66. package/dist/components/index.js +124 -118
  67. package/dist/icons.d.ts +1 -1
  68. package/dist/icons.js +124 -116
  69. package/dist/{index-DPcwqB8q.js → index-B7-5g1Sm.js} +169 -168
  70. package/dist/index-qDQP8rW4.js +7281 -0
  71. package/dist/index.d.ts +1 -1
  72. package/dist/index.js +142 -135
  73. package/dist/package.json +8 -8
  74. package/dist/{proxy-CngVm5qA.js → proxy-0sbyKj-k.js} +732 -728
  75. package/dist/styles.css +1 -1
  76. package/dist/utils/index.d.ts +1 -0
  77. package/dist/utils/index.js +16 -15
  78. package/package.json +8 -8
  79. package/dist/assets/icons/components/CheckCircle.d.ts +0 -3
  80. package/dist/components/Tooltip/Tooltip.variants.d.ts +0 -6
  81. package/dist/components/Tooltip/Tooltip.variants.js +0 -86
  82. package/dist/components/Tooltip/hooks/useTooltip.d.ts +0 -4
  83. package/dist/components/Tooltip/hooks/useTooltip.js +0 -24
@@ -0,0 +1,154 @@
1
+ import { jsxs as R, jsx as s } from "react/jsx-runtime";
2
+ import { C as P, a as _, i as z, p as j, L as x, b as D, P as E, c as F, d as H } from "../../index-qDQP8rW4.js";
3
+ import { useMemo as y } from "react";
4
+ import { Typography as N } from "../Typography/Typography.js";
5
+ import { resolveColor as d, cn as O } from "../../utils/index.js";
6
+ P.register(
7
+ _,
8
+ z,
9
+ j,
10
+ x,
11
+ D,
12
+ E,
13
+ F
14
+ );
15
+ const l = [
16
+ "--color-aurora-500",
17
+ "--color-rose-500",
18
+ "--color-violet-500",
19
+ "--color-emerald-500",
20
+ "--color-sky-500",
21
+ "--color-teal-500",
22
+ "--color-amber-500",
23
+ "--color-fuchsia-500",
24
+ "--color-indigo-500",
25
+ "--color-cyan-500"
26
+ ], A = ({
27
+ title: a,
28
+ titleProps: h,
29
+ labels: p,
30
+ datasets: n,
31
+ yAxisFormatter: t,
32
+ showLegend: u,
33
+ height: C = 300,
34
+ smooth: b = !0,
35
+ axisColor: i = "#9F9FA9",
36
+ gridColor: e = "#45556C",
37
+ showGrid: g = !0,
38
+ lineWidth: m = 2,
39
+ showAxisBorder: c = !1,
40
+ className: k
41
+ }) => {
42
+ const f = u !== void 0 ? u : n.length > 1, L = y(
43
+ () => ({
44
+ labels: p,
45
+ datasets: n.map((o, r) => ({
46
+ label: o.label,
47
+ data: o.data,
48
+ borderColor: o.color ?? d(l[r % l.length]),
49
+ backgroundColor: o.color ?? d(l[r % l.length]),
50
+ borderDash: o.borderDash,
51
+ borderWidth: m,
52
+ pointRadius: 0,
53
+ pointHoverRadius: 4,
54
+ tension: b ? 0.3 : 0,
55
+ fill: !1
56
+ }))
57
+ }),
58
+ [p, n, b, m]
59
+ ), S = y(
60
+ () => ({
61
+ responsive: !0,
62
+ maintainAspectRatio: !1,
63
+ onHover: (o, r) => {
64
+ const v = o.native?.target;
65
+ v && (v.style.cursor = r.length > 0 ? "pointer" : "default");
66
+ },
67
+ interaction: {
68
+ mode: "index",
69
+ intersect: !1
70
+ },
71
+ plugins: {
72
+ legend: {
73
+ display: f,
74
+ position: "top",
75
+ align: "end",
76
+ labels: {
77
+ color: "#9FAFBC",
78
+ font: {
79
+ size: 12,
80
+ weight: 500
81
+ },
82
+ usePointStyle: !0,
83
+ pointStyle: "line",
84
+ boxWidth: 24,
85
+ padding: 16
86
+ }
87
+ },
88
+ tooltip: {
89
+ enabled: !0,
90
+ backgroundColor: d("--color-metal-700"),
91
+ boxPadding: 6,
92
+ callbacks: {
93
+ labelTextColor: (o) => o.dataset.borderColor
94
+ }
95
+ }
96
+ },
97
+ scales: {
98
+ x: {
99
+ grid: {
100
+ color: "transparent"
101
+ },
102
+ ticks: {
103
+ color: i,
104
+ font: {
105
+ size: 12
106
+ }
107
+ },
108
+ border: {
109
+ display: c,
110
+ color: e
111
+ }
112
+ },
113
+ y: {
114
+ grid: {
115
+ color: g ? e : "transparent"
116
+ },
117
+ ticks: {
118
+ color: i,
119
+ font: {
120
+ size: 12
121
+ },
122
+ callback: t ? (o) => t(o) : void 0
123
+ },
124
+ border: {
125
+ display: c,
126
+ color: e
127
+ }
128
+ }
129
+ }
130
+ }),
131
+ [
132
+ f,
133
+ t,
134
+ i,
135
+ e,
136
+ g,
137
+ c
138
+ ]
139
+ );
140
+ return /* @__PURE__ */ R("div", { className: O("w-full", k), children: [
141
+ a && /* @__PURE__ */ s(N, { variant: "subtitle2", className: "mb-6", ...h, children: a }),
142
+ /* @__PURE__ */ s("div", { style: { height: C }, children: /* @__PURE__ */ s(
143
+ H,
144
+ {
145
+ "aria-label": a ?? "Line chart",
146
+ data: L,
147
+ options: S
148
+ }
149
+ ) })
150
+ ] });
151
+ };
152
+ export {
153
+ A as LineChart
154
+ };
@@ -0,0 +1,54 @@
1
+ import { TypographyProps } from '../Typography/Typography.types';
2
+ export interface LineChartDataset {
3
+ /** Dataset label (used in legend) */
4
+ label: string;
5
+ /** Array of numeric values */
6
+ data: number[];
7
+ /** Line/point color (defaults to palette color) */
8
+ color?: string;
9
+ /** Dashed line pattern (e.g. [5, 5]) */
10
+ borderDash?: number[];
11
+ }
12
+ /**
13
+ * Props for the LineChart component.
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * <LineChart
18
+ * title="Disk Usage %"
19
+ * labels={['11:20', '11:25', '11:30']}
20
+ * datasets={[{ label: 'Usage', data: [6, 3, 8, 5] }]}
21
+ * yAxisFormatter={(v) => `${v}%`}
22
+ * />
23
+ * ```
24
+ */
25
+ export interface LineChartProps {
26
+ /** Chart title text */
27
+ title?: string;
28
+ /** Props passed to the Typography component used for the title */
29
+ titleProps?: Partial<Omit<TypographyProps, 'children' | 'ref'>>;
30
+ /** X-axis labels (e.g. time values) */
31
+ labels: string[];
32
+ /** One or more datasets (lines) */
33
+ datasets: LineChartDataset[];
34
+ /** Y-axis tick formatter (e.g. value => `${value}%`) */
35
+ yAxisFormatter?: (value: number) => string;
36
+ /** Show legend (auto-shown when datasets > 1) */
37
+ showLegend?: boolean;
38
+ /** Chart height in px (default: 300) */
39
+ height?: number;
40
+ /** Smooth lines (default: true). Set to false for straight/rigid lines */
41
+ smooth?: boolean;
42
+ /** Color for axis tick labels (default: '#9F9FA9') */
43
+ axisColor?: string;
44
+ /** Color for grid lines (default: '#45556C') */
45
+ gridColor?: string;
46
+ /** Show horizontal grid lines (default: true) */
47
+ showGrid?: boolean;
48
+ /** Line thickness in px (default: 2) */
49
+ lineWidth?: number;
50
+ /** Show axis border lines (default: false) */
51
+ showAxisBorder?: boolean;
52
+ /** Additional className for wrapper */
53
+ className?: string;
54
+ }
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "react-dom";
4
- import { M as d } from "../../Modal-BGcucTHv.js";
4
+ import { M as d } from "../../Modal-CXRo8f-h.js";
5
5
  import "./components/Header/Header.js";
6
6
  import "./components/Body/Body.js";
7
7
  import "./components/Footer/Footer.js";
@@ -2,10 +2,10 @@ import "react/jsx-runtime";
2
2
  import "../../../../index-BKjcReYh.js";
3
3
  import "react";
4
4
  import "../../../../Combination-BtmnusWq.js";
5
- import { W as s } from "../../../../Modal-BGcucTHv.js";
5
+ import { W as s } from "../../../../Modal-CXRo8f-h.js";
6
6
  import "../../../../utils/index.js";
7
7
  import "./Wrapper.variants.js";
8
- import "../../../../proxy-CngVm5qA.js";
8
+ import "../../../../proxy-0sbyKj-k.js";
9
9
  import "../../../../x-Eoa9FJjA.js";
10
10
  export {
11
11
  s as Wrapper
@@ -1,7 +1,7 @@
1
1
  import { Body as e } from "./Body/Body.js";
2
2
  import { Footer as t } from "./Footer/Footer.js";
3
3
  import { Header as m } from "./Header/Header.js";
4
- import { W as a } from "../../../Modal-BGcucTHv.js";
4
+ import { W as a } from "../../../Modal-CXRo8f-h.js";
5
5
  export {
6
6
  e as Body,
7
7
  t as Footer,
@@ -1,5 +1,5 @@
1
1
  import { jsxs as a, jsx as o } from "react/jsx-runtime";
2
- import { P as f, R as u, T as b, C as m } from "../../../../index-DPcwqB8q.js";
2
+ import { P as f, R as u, T as b, C as m } from "../../../../index-B7-5g1Sm.js";
3
3
  import { d as h } from "../../../../debounce-DJveWHr_.js";
4
4
  import { useRef as p, useState as w, useCallback as g, useEffect as i } from "react";
5
5
  const C = ({ text: r, prefix: n }) => {