@konstructio/ui 0.1.2-alpha.74 → 0.1.2-alpha.76
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/dist/{Modal-CXRo8f-h.js → Modal-BTOXCb0Y.js} +1 -1
- package/dist/assets/icons/components/Home2.d.ts +3 -0
- package/dist/assets/icons/components/Home2.js +28 -0
- package/dist/assets/icons/components/Upload.d.ts +3 -0
- package/dist/assets/icons/components/Upload.js +28 -0
- package/dist/assets/icons/components/index.d.ts +2 -0
- package/dist/assets/icons/components/index.js +70 -66
- package/dist/assets/icons/index.js +70 -66
- package/dist/components/Alert/Alert.d.ts +2 -2
- package/dist/components/Alert/Alert.types.d.ts +3 -1
- package/dist/components/AlertDialog/AlertDialog.d.ts +2 -2
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +5 -3
- package/dist/components/AlertDialog/components/AlertDialogTrigger.d.ts +2 -2
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +4 -2
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.d.ts +2 -2
- package/dist/components/Autocomplete/Autocomplete.types.d.ts +3 -1
- package/dist/components/Badge/Badge.d.ts +2 -2
- package/dist/components/Badge/Badge.types.d.ts +3 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +2 -2
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +3 -1
- package/dist/components/Breadcrumb/components/Item/Item.d.ts +2 -2
- package/dist/components/Breadcrumb/components/Item/Item.types.d.ts +3 -1
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Button/Button.types.d.ts +3 -1
- package/dist/components/Button/Button.variants.js +4 -5
- package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +1 -1
- package/dist/components/Card/Card.d.ts +2 -2
- package/dist/components/Card/Card.types.d.ts +3 -1
- package/dist/components/Checkbox/Checkbox.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.types.d.ts +3 -1
- package/dist/components/Command/Command.d.ts +2 -2
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/Command.types.d.ts +3 -1
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +1 -1
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Counter/Counter.d.ts +2 -2
- package/dist/components/Counter/Counter.types.d.ts +3 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +2 -2
- package/dist/components/DateRangePicker/DateRangePicker.types.d.ts +3 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +1 -1
- package/dist/components/Datepicker/DatePicker.d.ts +2 -2
- package/dist/components/Datepicker/DatePicker.types.d.ts +3 -1
- package/dist/components/Filter/Filter.js +24 -22
- package/dist/components/Filter/Filter.types.d.ts +13 -3
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.d.ts +3 -1
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +57 -41
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +75 -49
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.types.d.ts +2 -0
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +38 -37
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +31 -30
- package/dist/components/Filter/components/ResetButton/ResetButton.types.d.ts +1 -1
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +64 -47
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.types.d.ts +2 -0
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.js +35 -34
- package/dist/components/Filter/contexts/filter.context.d.ts +4 -0
- package/dist/components/Filter/contexts/filter.context.js +7 -0
- package/dist/components/Filter/contexts/filter.hook.d.ts +2 -0
- package/dist/components/Filter/contexts/filter.hook.js +11 -0
- package/dist/components/Filter/contexts/filter.provider.d.ts +5 -0
- package/dist/components/Filter/contexts/filter.provider.js +6 -0
- package/dist/components/Filter/contexts/index.d.ts +3 -0
- package/dist/components/Filter/contexts/index.js +8 -0
- package/dist/components/ImageUpload/ImageUpload.d.ts +2 -2
- package/dist/components/ImageUpload/ImageUpload.types.d.ts +3 -1
- package/dist/components/Input/Input.d.ts +2 -2
- package/dist/components/Input/Input.types.d.ts +3 -1
- package/dist/components/LineChart/LineChart.d.ts +2 -2
- package/dist/components/LineChart/LineChart.js +55 -52
- package/dist/components/LineChart/LineChart.types.d.ts +6 -2
- package/dist/components/Loading/Loading.d.ts +2 -2
- package/dist/components/Loading/Loading.types.d.ts +3 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +2 -2
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.d.ts +2 -2
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.types.d.ts +3 -1
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +394 -353
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +2 -2
- package/dist/components/ProgressBar/ProgressBar.types.d.ts +3 -1
- package/dist/components/Radio/Radio.d.ts +2 -2
- package/dist/components/Radio/Radio.types.d.ts +3 -1
- package/dist/components/RadioCard/RadioCard.d.ts +2 -2
- package/dist/components/RadioCard/RadioCard.types.d.ts +5 -3
- package/dist/components/RadioCardGroup/RadioCardGroup.d.ts +2 -2
- package/dist/components/RadioCardGroup/RadioCardGroup.types.d.ts +4 -2
- package/dist/components/RadioGroup/RadioGroup.d.ts +2 -2
- package/dist/components/RadioGroup/RadioGroup.types.d.ts +4 -2
- package/dist/components/Range/Range.d.ts +2 -2
- package/dist/components/Range/Range.types.d.ts +3 -1
- package/dist/components/Select/Select.d.ts +2 -2
- package/dist/components/Select/Select.types.d.ts +4 -1
- package/dist/components/Select/Select.variants.js +1 -1
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.types.d.ts +1 -1
- package/dist/components/Select/components/List/List.js +64 -61
- package/dist/components/Select/components/List/List.types.d.ts +2 -1
- package/dist/components/Select/components/Wrapper.js +46 -44
- package/dist/components/Select/constants/index.d.ts +1 -0
- package/dist/components/Select/constants/index.js +3 -1
- package/dist/components/Select/constants/list.d.ts +1 -0
- package/dist/components/Select/constants/list.js +4 -0
- package/dist/components/Sidebar/Sidebar.d.ts +1 -1
- package/dist/components/Sidebar/Sidebar.types.d.ts +3 -1
- package/dist/components/Sidebar/components/Footer/Footer.d.ts +2 -2
- package/dist/components/Sidebar/components/Footer/Footer.types.d.ts +3 -1
- package/dist/components/Sidebar/components/Logo/Logo.d.ts +2 -2
- package/dist/components/Sidebar/components/Logo/Logo.types.d.ts +3 -1
- package/dist/components/Sidebar/components/Navigation/Navigation.d.ts +2 -2
- package/dist/components/Sidebar/components/Navigation/Navigation.types.d.ts +7 -5
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.d.ts +2 -2
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.d.ts +3 -1
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.d.ts +2 -2
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.d.ts +3 -1
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.d.ts +2 -2
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.d.ts +3 -1
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.d.ts +2 -2
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +1 -5
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.d.ts +3 -1
- package/dist/components/Sidebar/components/index.d.ts +7 -7
- package/dist/components/Slider/Slider.d.ts +2 -2
- package/dist/components/Slider/Slider.types.d.ts +3 -1
- package/dist/components/Spinner/Spinner.d.ts +2 -2
- package/dist/components/Spinner/Spinner.types.d.ts +4 -2
- package/dist/components/Stepper/Stepper.d.ts +2 -2
- package/dist/components/Stepper/Stepper.types.d.ts +3 -1
- package/dist/components/Switch/Switch.d.ts +2 -2
- package/dist/components/Switch/Switch.types.d.ts +3 -1
- package/dist/components/Table/Table.types.d.ts +3 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/components/Tabs/Tabs.types.d.ts +3 -1
- package/dist/components/Tag/Tag.d.ts +2 -2
- package/dist/components/Tag/Tag.types.d.ts +3 -1
- package/dist/components/TagSelect/TagSelect.d.ts +2 -2
- package/dist/components/TagSelect/TagSelect.js +3 -1
- package/dist/components/TagSelect/TagSelect.types.d.ts +4 -2
- package/dist/components/TagSelect/components/Item/Item.types.d.ts +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/components/TagSelect/contexts/TagSelect.types.d.ts +1 -1
- package/dist/components/TextArea/TextArea.d.ts +2 -2
- package/dist/components/TextArea/TextArea.types.d.ts +3 -1
- package/dist/components/TimePicker/TimePicker.d.ts +2 -2
- package/dist/components/TimePicker/TimePicker.types.d.ts +3 -1
- package/dist/components/TimePicker/components/HoursList/HoursList.types.d.ts +1 -1
- package/dist/components/TimePicker/components/MeridianList/MeridianList.types.d.ts +1 -1
- package/dist/components/TimePicker/components/MinutesList/MinutesList.types.d.ts +1 -1
- package/dist/components/TimePicker/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/components/TimePicker/components/WrapperList/WrapperList.types.d.ts +1 -1
- package/dist/components/Toast/Toast.d.ts +2 -2
- package/dist/components/Toast/Toast.js +191 -184
- package/dist/components/Toast/Toast.types.d.ts +3 -1
- package/dist/components/Toast/Toast.variants.js +6 -12
- package/dist/components/Tooltip/Tooltip.d.ts +2 -2
- package/dist/components/Tooltip/Tooltip.js +20 -20
- package/dist/components/Tooltip/Tooltip.types.d.ts +3 -1
- package/dist/components/Typography/Typography.d.ts +2 -2
- package/dist/components/Typography/Typography.types.d.ts +3 -1
- package/dist/components/VirtualizedTable/VirtualizedTable.js +57 -55
- package/dist/components/VirtualizedTable/VirtualizedTable.types.d.ts +3 -1
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +55 -54
- package/dist/components/VirtualizedTable/components/Filter/Filter.types.d.ts +1 -0
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.d.ts +1 -1
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +55 -26
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.types.d.ts +4 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- package/dist/icons.d.ts +1 -1
- package/dist/icons.js +70 -66
- package/dist/index-BvEpLnOv.js +144 -0
- package/dist/{index-Dd_ZmIqU.js → index-C7zAY3xv.js} +1 -1
- package/dist/{index-Dfq4O3b4.js → index-CrCTywU1.js} +1 -1
- package/dist/{index-9a-FL_6D.js → index-DWyM654o.js} +41 -42
- package/dist/{index-B7-5g1Sm.js → index-mPinF0Ho.js} +407 -401
- package/dist/index.js +1 -1
- package/dist/package.json +10 -10
- package/dist/proxy-BvdTb_6B.js +4974 -0
- package/dist/styles.css +1 -1
- package/package.json +10 -10
- package/dist/index-CESXsoMn.js +0 -14
- package/dist/index-URQGEGX7.js +0 -136
- package/dist/proxy-0sbyKj-k.js +0 -4946
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsxs as o, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Typography as
|
|
2
|
+
import { forwardRef as re, useId as ne, useRef as w, useMemo as le, useImperativeHandle as se, useEffect as oe } from "react";
|
|
3
|
+
import { Typography as ce } from "../../Typography/Typography.js";
|
|
4
4
|
import { cn as n } from "../../../utils/index.js";
|
|
5
|
-
import { labelVariants as
|
|
6
|
-
import { useSelect as
|
|
7
|
-
import { List as
|
|
8
|
-
import { c as
|
|
9
|
-
import { LoaderIcon as
|
|
10
|
-
import { C as
|
|
11
|
-
import { useSelectContext as
|
|
12
|
-
const
|
|
5
|
+
import { labelVariants as ie, inputVariants as me, selectVariants as pe } from "../Select.variants.js";
|
|
6
|
+
import { useSelect as ue } from "../hooks/useSelect.js";
|
|
7
|
+
import { List as fe } from "./List/List.js";
|
|
8
|
+
import { c as de } from "../../../createLucideIcon-CP-mMPfa.js";
|
|
9
|
+
import { LoaderIcon as xe } from "../../../assets/icons/components/Loader.js";
|
|
10
|
+
import { C as he } from "../../../chevron-up-IlDPxR7j.js";
|
|
11
|
+
import { useSelectContext as ve } from "../contexts/select.hook.js";
|
|
12
|
+
const Ne = [
|
|
13
13
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
14
14
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
15
|
-
],
|
|
15
|
+
], Ce = de("search", Ne), Re = re(
|
|
16
16
|
({
|
|
17
17
|
additionalOptions: z,
|
|
18
18
|
className: O,
|
|
@@ -38,47 +38,48 @@ const ve = [
|
|
|
38
38
|
searchable: k = !1,
|
|
39
39
|
showSearchIcon: C,
|
|
40
40
|
theme: U,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
visibleItems: q,
|
|
42
|
+
wrapperClassName: A,
|
|
43
|
+
onFetchMoreOptions: B,
|
|
44
|
+
onBlur: D,
|
|
45
|
+
onSearchChange: G,
|
|
45
46
|
...y
|
|
46
|
-
},
|
|
47
|
-
const I =
|
|
47
|
+
}, J) => {
|
|
48
|
+
const I = ne(), c = w(null), j = w(null), K = w(0), {
|
|
48
49
|
isOpen: i,
|
|
49
50
|
options: l,
|
|
50
|
-
searchTerm:
|
|
51
|
+
searchTerm: Q,
|
|
51
52
|
value: s,
|
|
52
|
-
setCanFilter:
|
|
53
|
-
setSearchTerm:
|
|
53
|
+
setCanFilter: X,
|
|
54
|
+
setSearchTerm: Y,
|
|
54
55
|
setValue: m,
|
|
55
|
-
toggleOpen:
|
|
56
|
-
} =
|
|
56
|
+
toggleOpen: Z
|
|
57
|
+
} = ve(), e = le(() => l.find(({ value: a }) => a === s), [l, s]), { wrapperRef: ee, wrapperInputRef: L, handleOpen: V } = ue({
|
|
57
58
|
ulRef: j,
|
|
58
59
|
inputRef: c,
|
|
59
60
|
disabled: t,
|
|
60
61
|
internalValue: e,
|
|
61
|
-
onBlur:
|
|
62
|
+
onBlur: D
|
|
62
63
|
}), p = d ? `${I}-${d}` : I;
|
|
63
|
-
|
|
64
|
+
se(J, () => c.current, [c]), oe(() => {
|
|
64
65
|
if (x && !s) {
|
|
65
66
|
const a = l && l.find((u) => u.value === x);
|
|
66
67
|
a && m(a.value);
|
|
67
68
|
}
|
|
68
69
|
}, [x, l, m, s]);
|
|
69
|
-
const
|
|
70
|
+
const te = (a) => {
|
|
70
71
|
const u = a.target.value;
|
|
71
|
-
|
|
72
|
+
X(!0), m(""), Y(u ?? ""), G?.(u);
|
|
72
73
|
const b = l.find(
|
|
73
|
-
(
|
|
74
|
+
(ae) => ae.value.toLocaleLowerCase() === u.toLocaleLowerCase()
|
|
74
75
|
);
|
|
75
76
|
m(b ? b.value : e?.value ?? "");
|
|
76
77
|
};
|
|
77
78
|
return /* @__PURE__ */ o(
|
|
78
79
|
"div",
|
|
79
80
|
{
|
|
80
|
-
ref:
|
|
81
|
-
className: n("flex flex-col gap-2 w-full relative",
|
|
81
|
+
ref: ee,
|
|
82
|
+
className: n("flex flex-col gap-2 w-full relative", A),
|
|
82
83
|
"data-theme": U,
|
|
83
84
|
children: [
|
|
84
85
|
v ? /* @__PURE__ */ o(
|
|
@@ -93,7 +94,7 @@ const ve = [
|
|
|
93
94
|
"label",
|
|
94
95
|
{
|
|
95
96
|
id: p,
|
|
96
|
-
className: n(
|
|
97
|
+
className: n(ie({ className: M })),
|
|
97
98
|
htmlFor: p,
|
|
98
99
|
onClick: () => !t && V(),
|
|
99
100
|
children: [
|
|
@@ -112,18 +113,18 @@ const ve = [
|
|
|
112
113
|
ref: L,
|
|
113
114
|
id: p,
|
|
114
115
|
className: n(
|
|
115
|
-
|
|
116
|
+
pe({ className: O, hasError: !!f, disabled: t })
|
|
116
117
|
),
|
|
117
118
|
role: "combobox",
|
|
118
|
-
onClick: () => !t &&
|
|
119
|
+
onClick: () => !t && Z(!i),
|
|
119
120
|
"aria-expanded": i,
|
|
120
|
-
tabIndex:
|
|
121
|
+
tabIndex: K.current,
|
|
121
122
|
"aria-labelledby": p,
|
|
122
123
|
children: [
|
|
123
124
|
/* @__PURE__ */ o("div", { className: "flex gap-2.5 items-center flex-1", children: [
|
|
124
125
|
e?.leftIcon && !C && /* @__PURE__ */ r("span", { className: "w-4 h-4 flex justify-center items-center dark:text-metal-50", children: e.leftIcon }),
|
|
125
126
|
C && /* @__PURE__ */ r(
|
|
126
|
-
|
|
127
|
+
Ce,
|
|
127
128
|
{
|
|
128
129
|
className: n(
|
|
129
130
|
"w-4",
|
|
@@ -141,10 +142,10 @@ const ve = [
|
|
|
141
142
|
"input",
|
|
142
143
|
{
|
|
143
144
|
type: "text",
|
|
144
|
-
value: i ?
|
|
145
|
-
onChange:
|
|
145
|
+
value: i ? Q : e?.label ?? s ?? "",
|
|
146
|
+
onChange: te,
|
|
146
147
|
placeholder: N,
|
|
147
|
-
className: n(
|
|
148
|
+
className: n(me({ className: S }), {
|
|
148
149
|
"text-red-700 placeholder:text-red-700": !!f
|
|
149
150
|
}),
|
|
150
151
|
onClick: (a) => {
|
|
@@ -160,7 +161,7 @@ const ve = [
|
|
|
160
161
|
...y
|
|
161
162
|
}
|
|
162
163
|
) : /* @__PURE__ */ o(
|
|
163
|
-
|
|
164
|
+
ce,
|
|
164
165
|
{
|
|
165
166
|
variant: "body2",
|
|
166
167
|
className: n(
|
|
@@ -182,13 +183,13 @@ const ve = [
|
|
|
182
183
|
)
|
|
183
184
|
] }),
|
|
184
185
|
g ? /* @__PURE__ */ r(
|
|
185
|
-
|
|
186
|
+
xe,
|
|
186
187
|
{
|
|
187
188
|
size: 16,
|
|
188
189
|
className: "text-metal-400 animate-spin select-none"
|
|
189
190
|
}
|
|
190
191
|
) : !C && /* @__PURE__ */ r(
|
|
191
|
-
|
|
192
|
+
he,
|
|
192
193
|
{
|
|
193
194
|
"data-state": i ? "open" : "closed",
|
|
194
195
|
className: n(
|
|
@@ -219,7 +220,7 @@ const ve = [
|
|
|
219
220
|
}
|
|
220
221
|
),
|
|
221
222
|
i && /* @__PURE__ */ r(
|
|
222
|
-
|
|
223
|
+
fe,
|
|
223
224
|
{
|
|
224
225
|
ref: j,
|
|
225
226
|
additionalOptions: z,
|
|
@@ -234,8 +235,9 @@ const ve = [
|
|
|
234
235
|
searchable: k,
|
|
235
236
|
listItemSecondRowClassName: H,
|
|
236
237
|
isInfiniteScrollEnabled: T,
|
|
237
|
-
onFetchMoreOptions:
|
|
238
|
-
noOptionsText: P
|
|
238
|
+
onFetchMoreOptions: B,
|
|
239
|
+
noOptionsText: P,
|
|
240
|
+
visibleItems: q
|
|
239
241
|
}
|
|
240
242
|
)
|
|
241
243
|
]
|
|
@@ -244,5 +246,5 @@ const ve = [
|
|
|
244
246
|
}
|
|
245
247
|
);
|
|
246
248
|
export {
|
|
247
|
-
|
|
249
|
+
Re as Wrapper
|
|
248
250
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ITEM_HEIGHT_PX = 40;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { Footer, Logo, Navigation, NavigationGroup, NavigationOption, NavigationSeparator } from './components';
|
|
3
|
-
import { SidebarChildrenProps, SidebarProps } from './Sidebar.types';
|
|
3
|
+
import { SidebarChildrenProps, Props as SidebarProps } from './Sidebar.types';
|
|
4
4
|
/**
|
|
5
5
|
* A compound component for building application sidebars.
|
|
6
6
|
* Includes sub-components for logo, navigation, groups, options, and footer.
|
|
@@ -27,7 +27,7 @@ import { FooterProps, LogoProps, NavigationGroupProps, NavigationOptionProps, Na
|
|
|
27
27
|
* </Sidebar>
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
-
export interface
|
|
30
|
+
export interface Props extends VariantProps<typeof wrapperSiderbarVariants>, PropsWithChildren {
|
|
31
31
|
/** Whether the sidebar can be resized by dragging */
|
|
32
32
|
canResize?: boolean;
|
|
33
33
|
/** Additional CSS classes for the divider */
|
|
@@ -41,6 +41,8 @@ export interface SidebarProps extends VariantProps<typeof wrapperSiderbarVariant
|
|
|
41
41
|
/** Additional CSS classes for the wrapper */
|
|
42
42
|
wrapperClassName?: string;
|
|
43
43
|
}
|
|
44
|
+
/** @deprecated Use Props instead */
|
|
45
|
+
export type SidebarProps = Props;
|
|
44
46
|
/**
|
|
45
47
|
* Sidebar compound component type with sub-components.
|
|
46
48
|
*/
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
3
|
import { footerVariants } from './Footer.variants';
|
|
4
|
-
export interface
|
|
4
|
+
export interface Props extends PropsWithChildren, VariantProps<typeof footerVariants> {
|
|
5
5
|
className?: string;
|
|
6
6
|
}
|
|
7
|
+
/** @deprecated Use Props instead */
|
|
8
|
+
export type FooterProps = Props;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
3
|
import { logoVariants } from './Logo.variants';
|
|
4
|
-
export interface
|
|
4
|
+
export interface Props extends PropsWithChildren, VariantProps<typeof logoVariants> {
|
|
5
5
|
className?: string;
|
|
6
6
|
}
|
|
7
|
+
/** @deprecated Use Props instead */
|
|
8
|
+
export type LogoProps = Props;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { NavigationChildrenProps,
|
|
3
|
-
declare const Navigation: FC<
|
|
2
|
+
import { NavigationChildrenProps, Props } from './Navigation.types';
|
|
3
|
+
declare const Navigation: FC<Props> & NavigationChildrenProps;
|
|
4
4
|
export { Navigation };
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import { FC, PropsWithChildren } from 'react';
|
|
3
|
-
import { NavigationGroupProps } from '../NavigationGroup/NavigationGroup.types';
|
|
4
|
-
import { NavigationOptionProps } from '../NavigationOption/NavigationOption.types';
|
|
5
|
-
import { NavigationSeparatorProps } from '../NavigationSeparator/NavigationSeparator.types';
|
|
6
|
-
import { NavigationTitleProps } from '../NavigationTitle/NavigationTitle.types';
|
|
3
|
+
import { Props as NavigationGroupProps } from '../NavigationGroup/NavigationGroup.types';
|
|
4
|
+
import { Props as NavigationOptionProps } from '../NavigationOption/NavigationOption.types';
|
|
5
|
+
import { Props as NavigationSeparatorProps } from '../NavigationSeparator/NavigationSeparator.types';
|
|
6
|
+
import { Props as NavigationTitleProps } from '../NavigationTitle/NavigationTitle.types';
|
|
7
7
|
import { navigationVariants } from './Navigation.variants';
|
|
8
|
-
export interface
|
|
8
|
+
export interface Props extends PropsWithChildren, VariantProps<typeof navigationVariants> {
|
|
9
9
|
className?: string;
|
|
10
10
|
}
|
|
11
|
+
/** @deprecated Use Props instead */
|
|
12
|
+
export type NavigationProps = Props;
|
|
11
13
|
export type NavigationChildrenProps = {
|
|
12
14
|
NavigationGroup: FC<NavigationGroupProps>;
|
|
13
15
|
NavigationOption: FC<NavigationOptionProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
declare const NavigationGroup: FC<
|
|
2
|
+
import { Props } from './NavigationGroup.types';
|
|
3
|
+
declare const NavigationGroup: FC<Props>;
|
|
4
4
|
export { NavigationGroup };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import { HtmlHTMLAttributes, PropsWithChildren } from 'react';
|
|
3
3
|
import { navigationGroupsVariants } from './NavigationGroup.variants';
|
|
4
|
-
export interface
|
|
4
|
+
export interface Props extends PropsWithChildren, VariantProps<typeof navigationGroupsVariants>, Pick<HtmlHTMLAttributes<HTMLDivElement>, 'className' | 'style'> {
|
|
5
5
|
title?: string;
|
|
6
6
|
titleClassName?: string;
|
|
7
7
|
isVisible?: boolean;
|
|
8
8
|
}
|
|
9
|
+
/** @deprecated Use Props instead */
|
|
10
|
+
export type NavigationGroupProps = Props;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
declare const NavigationOption: FC<
|
|
2
|
+
import { Props } from './NavigationOption.types';
|
|
3
|
+
declare const NavigationOption: FC<Props>;
|
|
4
4
|
export { NavigationOption };
|
|
@@ -6,7 +6,7 @@ type NavigationOption = VariantProps<typeof navigationOptionVariants> & {
|
|
|
6
6
|
isVisible?: boolean;
|
|
7
7
|
isActive?: boolean;
|
|
8
8
|
};
|
|
9
|
-
export type
|
|
9
|
+
export type Props = NavigationOption & ({
|
|
10
10
|
role: 'button';
|
|
11
11
|
children: ReactNode;
|
|
12
12
|
onClick: VoidFunction;
|
|
@@ -14,4 +14,6 @@ export type NavigationOptionProps = NavigationOption & ({
|
|
|
14
14
|
role?: never;
|
|
15
15
|
children: ReactNode;
|
|
16
16
|
});
|
|
17
|
+
/** @deprecated Use Props instead */
|
|
18
|
+
export type NavigationOptionProps = Props;
|
|
17
19
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
declare const NavigationSeparator: FC<
|
|
2
|
+
import { Props } from './NavigationSeparator.types';
|
|
3
|
+
declare const NavigationSeparator: FC<Props>;
|
|
4
4
|
export { NavigationSeparator };
|
package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import { HTMLAttributes } from 'react';
|
|
3
3
|
import { navigationSeparatorVariant } from './NavigationSeparator.variants';
|
|
4
|
-
export interface
|
|
4
|
+
export interface Props extends Pick<HTMLAttributes<HTMLDivElement>, 'className' | 'style'>, VariantProps<typeof navigationSeparatorVariant> {
|
|
5
5
|
}
|
|
6
|
+
/** @deprecated Use Props instead */
|
|
7
|
+
export type NavigationSeparatorProps = Props;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
declare const NavigationTitle: FC<
|
|
2
|
+
import { Props } from './NavigationTitle.types';
|
|
3
|
+
declare const NavigationTitle: FC<Props>;
|
|
4
4
|
export { NavigationTitle };
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { cn as n } from "../../../../utils/index.js";
|
|
3
3
|
import { navigationTitleVariants as o } from "./NavigationTitle.variants.js";
|
|
4
|
-
const e = ({
|
|
5
|
-
title: i,
|
|
6
|
-
className: t,
|
|
7
|
-
isVisible: r = !0
|
|
8
|
-
}) => r ? /* @__PURE__ */ a("h2", { className: n(o({ className: t })), children: i }) : null;
|
|
4
|
+
const e = ({ title: i, className: t, isVisible: r = !0 }) => r ? /* @__PURE__ */ a("h2", { className: n(o({ className: t })), children: i }) : null;
|
|
9
5
|
e.displayName = "KonstructSidebarNavigationTitle";
|
|
10
6
|
export {
|
|
11
7
|
e as NavigationTitle
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import { HtmlHTMLAttributes } from 'react';
|
|
3
3
|
import { navigationTitleVariants } from './NavigationTitle.variants';
|
|
4
|
-
export interface
|
|
4
|
+
export interface Props extends VariantProps<typeof navigationTitleVariants>, Pick<HtmlHTMLAttributes<HTMLHeadingElement>, 'className'> {
|
|
5
5
|
title: string;
|
|
6
6
|
className?: string;
|
|
7
7
|
isVisible?: boolean;
|
|
8
8
|
}
|
|
9
|
+
/** @deprecated Use Props instead */
|
|
10
|
+
export type NavigationTitleProps = Props;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export * from './Footer/Footer';
|
|
2
|
-
export type
|
|
2
|
+
export type { FooterProps } from './Footer/Footer.types';
|
|
3
3
|
export * from './Logo/Logo';
|
|
4
|
-
export type
|
|
4
|
+
export type { LogoProps } from './Logo/Logo.types';
|
|
5
5
|
export * from './Navigation/Navigation';
|
|
6
|
-
export type
|
|
6
|
+
export type { NavigationProps, NavigationChildrenProps, } from './Navigation/Navigation.types';
|
|
7
7
|
export * from './NavigationGroup/NavigationGroup';
|
|
8
|
-
export type
|
|
8
|
+
export type { NavigationGroupProps } from './NavigationGroup/NavigationGroup.types';
|
|
9
9
|
export * from './NavigationOption/NavigationOption';
|
|
10
|
-
export type
|
|
10
|
+
export type { NavigationOptionProps } from './NavigationOption/NavigationOption.types';
|
|
11
11
|
export * from './NavigationSeparator/NavigationSeparator';
|
|
12
|
-
export type
|
|
12
|
+
export type { NavigationSeparatorProps } from './NavigationSeparator/NavigationSeparator.types';
|
|
13
13
|
export * from './NavigationTitle/NavigationTitle';
|
|
14
|
-
export type
|
|
14
|
+
export type { NavigationTitleProps } from './NavigationTitle/NavigationTitle.types';
|
|
15
15
|
export * from './Wrapper/Wrapper';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Props } from './Slider.types';
|
|
3
3
|
/**
|
|
4
4
|
* A single-thumb slider component for selecting a value.
|
|
5
5
|
* Built on Radix UI Slider for accessibility.
|
|
@@ -18,4 +18,4 @@ import { SliderProps } from './Slider.types';
|
|
|
18
18
|
*
|
|
19
19
|
* @see {@link https://konstructio.github.io/konstruct-ui/?path=/docs/components-slider--docs Storybook}
|
|
20
20
|
*/
|
|
21
|
-
export declare const Slider: FC<
|
|
21
|
+
export declare const Slider: FC<Props>;
|
|
@@ -18,7 +18,7 @@ import { sliderVariants } from './Slider.variants';
|
|
|
18
18
|
* />
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
export interface
|
|
21
|
+
export interface Props extends VariantProps<typeof sliderVariants> {
|
|
22
22
|
/** Additional CSS classes */
|
|
23
23
|
className?: string;
|
|
24
24
|
/** Initial value as single-element array */
|
|
@@ -40,3 +40,5 @@ export interface SliderProps extends VariantProps<typeof sliderVariants> {
|
|
|
40
40
|
/** Theme override for this component */
|
|
41
41
|
theme?: Theme;
|
|
42
42
|
}
|
|
43
|
+
/** @deprecated Use Props instead */
|
|
44
|
+
export type SliderProps = Props;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
-
import { TypographyProps } from '../Typography/Typography.types';
|
|
3
|
+
import { Props as TypographyProps } from '../Typography/Typography.types';
|
|
4
4
|
import { Theme } from '../../domain/theme';
|
|
5
5
|
import { spinnerVariants } from './Spinner.variants';
|
|
6
|
-
export type
|
|
6
|
+
export type Props = HTMLAttributes<HTMLDivElement> & VariantProps<typeof spinnerVariants> & {
|
|
7
7
|
spinnerClassName?: string;
|
|
8
8
|
textClassName?: string;
|
|
9
9
|
textVariant?: TypographyProps['variant'];
|
|
@@ -11,3 +11,5 @@ export type SpinnerProps = HTMLAttributes<HTMLDivElement> & VariantProps<typeof
|
|
|
11
11
|
srLabel?: string;
|
|
12
12
|
theme?: Theme;
|
|
13
13
|
};
|
|
14
|
+
/** @deprecated Use Props instead */
|
|
15
|
+
export type SpinnerProps = Props;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Props } from './Stepper.types';
|
|
3
3
|
/**
|
|
4
4
|
* A stepper component for displaying multi-step processes.
|
|
5
5
|
* Supports vertical and horizontal orientations with various step states.
|
|
@@ -48,4 +48,4 @@ import { StepperProps } from './Stepper.types';
|
|
|
48
48
|
*
|
|
49
49
|
* @see {@link https://konstructio.github.io/konstruct-ui/?path=/docs/components-stepper--docs Storybook}
|
|
50
50
|
*/
|
|
51
|
-
export declare const Stepper: FC<
|
|
51
|
+
export declare const Stepper: FC<Props>;
|
|
@@ -47,7 +47,7 @@ export type StepperIcons = {
|
|
|
47
47
|
/** Custom icon for error status */
|
|
48
48
|
error?: ReactNode;
|
|
49
49
|
};
|
|
50
|
-
export type
|
|
50
|
+
export type Props = VariantProps<typeof stepperVariants> & {
|
|
51
51
|
/** Additional CSS classes for the wrapper */
|
|
52
52
|
className?: string;
|
|
53
53
|
/** Custom class names for each element */
|
|
@@ -71,3 +71,5 @@ export type StepperProps = VariantProps<typeof stepperVariants> & {
|
|
|
71
71
|
/** Callback when a step is clicked */
|
|
72
72
|
onStepClick?: (step: Step, index: number) => void;
|
|
73
73
|
};
|
|
74
|
+
/** @deprecated Use Props instead */
|
|
75
|
+
export type StepperProps = Props;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Props } from './Switch.types';
|
|
3
3
|
/**
|
|
4
4
|
* A toggle switch component built on Radix UI primitives.
|
|
5
5
|
* Supports horizontal and vertical layouts with label and helper text.
|
|
@@ -26,4 +26,4 @@ import { SwitchProps } from './Switch.types';
|
|
|
26
26
|
*
|
|
27
27
|
* @see {@link https://konstructio.github.io/konstruct-ui/?path=/docs/components-switch--docs Storybook}
|
|
28
28
|
*/
|
|
29
|
-
export declare const Switch: FC<
|
|
29
|
+
export declare const Switch: FC<Props>;
|
|
@@ -11,7 +11,7 @@ import { switchVariants } from './Switch.variants';
|
|
|
11
11
|
* <Switch label="Feature" helperText="Enable experimental features" alignment="vertical" />
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
|
-
export interface
|
|
14
|
+
export interface Props extends VariantProps<typeof switchVariants> {
|
|
15
15
|
/** Layout direction: horizontal (default) or vertical */
|
|
16
16
|
alignment?: 'horizontal' | 'vertical';
|
|
17
17
|
/** Additional CSS classes */
|
|
@@ -41,3 +41,5 @@ export interface SwitchProps extends VariantProps<typeof switchVariants> {
|
|
|
41
41
|
/** Callback when checked state changes */
|
|
42
42
|
onChange?: (e: boolean) => void;
|
|
43
43
|
}
|
|
44
|
+
/** @deprecated Use Props instead */
|
|
45
|
+
export type SwitchProps = Props;
|
|
@@ -23,10 +23,12 @@ import { bodyVariants, headVariants, rowVariants, tableVariants } from './Table.
|
|
|
23
23
|
* </Table>
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
|
-
export interface
|
|
26
|
+
export interface Props extends React.HTMLAttributes<HTMLTableElement>, PropsWithChildren, VariantProps<typeof tableVariants> {
|
|
27
27
|
/** Theme override for this component */
|
|
28
28
|
theme?: Theme;
|
|
29
29
|
}
|
|
30
|
+
/** @deprecated Use Props instead */
|
|
31
|
+
export type TableProps = Props;
|
|
30
32
|
/**
|
|
31
33
|
* Props for Table.Row component.
|
|
32
34
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { ListProps, TabsProps, TriggerProps } from './Tabs.types';
|
|
2
|
+
import { ListProps, Props as TabsProps, TriggerProps } from './Tabs.types';
|
|
3
3
|
import { Content, List, Trigger } from './components';
|
|
4
4
|
import * as ReactTabs from '@radix-ui/react-tabs';
|
|
5
5
|
/**
|
|
@@ -18,10 +18,12 @@ import * as ReactTabs from '@radix-ui/react-tabs';
|
|
|
18
18
|
* </Tabs>
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
export interface
|
|
21
|
+
export interface Props extends ReactTabs.TabsProps, PropsWithChildren {
|
|
22
22
|
/** Theme override for this component */
|
|
23
23
|
theme?: Theme;
|
|
24
24
|
}
|
|
25
|
+
/** @deprecated Use Props instead */
|
|
26
|
+
export type TabsProps = Props;
|
|
25
27
|
/**
|
|
26
28
|
* Props for Tabs.Trigger component.
|
|
27
29
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Props } from './Tag.types';
|
|
3
3
|
/**
|
|
4
4
|
* A small label component for categorization, status display, or filtering.
|
|
5
5
|
* Supports multiple color variants and optional icons.
|
|
@@ -13,4 +13,4 @@ import { TagProps } from './Tag.types';
|
|
|
13
13
|
*
|
|
14
14
|
* @see {@link https://konstructio.github.io/konstruct-ui/?path=/docs/components-tag--docs Storybook}
|
|
15
15
|
*/
|
|
16
|
-
export declare const Tag: FC<
|
|
16
|
+
export declare const Tag: FC<Props>;
|
|
@@ -13,7 +13,7 @@ import { ReactNode } from 'react';
|
|
|
13
13
|
* />
|
|
14
14
|
* ```
|
|
15
15
|
*/
|
|
16
|
-
export type
|
|
16
|
+
export type Props = {
|
|
17
17
|
/** Color variant for the tag */
|
|
18
18
|
color?: 'gray' | 'gray-800' | 'cyan' | 'gold' | 'green' | 'light blue' | 'lime' | 'pink' | 'purple' | 'emerald' | 'fuscia' | 'indigo' | 'light-orange' | 'dark-sky-blue' | 'mistery';
|
|
19
19
|
/** Unique identifier for the tag */
|
|
@@ -31,3 +31,5 @@ export type TagProps = {
|
|
|
31
31
|
/** Whether the tag is in a selected state */
|
|
32
32
|
isSelected?: boolean;
|
|
33
33
|
};
|
|
34
|
+
/** @deprecated Use Props instead */
|
|
35
|
+
export type TagProps = Props;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Props } from './TagSelect.types';
|
|
3
3
|
/**
|
|
4
4
|
* An input component for selecting from a list of tag options.
|
|
5
5
|
* Supports single and multi-selection modes.
|
|
@@ -20,4 +20,4 @@ import { TagSelectProps } from './TagSelect.types';
|
|
|
20
20
|
*
|
|
21
21
|
* @see {@link https://konstructio.github.io/konstruct-ui/?path=/docs/components-tagselect--docs Storybook}
|
|
22
22
|
*/
|
|
23
|
-
export declare const TagSelect: FC<
|
|
23
|
+
export declare const TagSelect: FC<Props>;
|