@konstructio/ui 0.0.2 → 0.0.3
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/{AlertDialogTrigger-BIbxXexQ.js → AlertDialogTrigger-lenvKoGF.js} +4 -4
- package/dist/Modal-Bg9UG35z.js +909 -0
- package/dist/{chevron-up-Cmu1oXfj.js → chevron-up-CvquEaNg.js} +1 -1
- package/dist/clsx-OuTLNxxd.js +16 -0
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/AlertDialog.variants.d.ts +1 -1
- package/dist/components/AlertDialog/AlertDialog.variants.js +4 -5
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.variants.d.ts +2 -2
- package/dist/components/Autocomplete/Autocomplete.variants.js +8 -8
- package/dist/components/Autocomplete/components/List.types.d.ts +3 -3
- package/dist/components/Autocomplete/components/List.variants.d.ts +4 -4
- package/dist/components/Autocomplete/components/List.variants.js +13 -13
- package/dist/components/Autocomplete/hooks/useAutocomplete.d.ts +4 -4
- package/dist/components/Autocomplete/hooks/useNavigationList.d.ts +4 -4
- package/dist/components/Breadcrumb/Breadcrumb.js +57 -412
- package/dist/components/Breadcrumb/Breadcrumb.variants.d.ts +3 -3
- package/dist/components/Breadcrumb/Breadcrumb.variants.js +12 -12
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/Button/Button.js +23 -21
- package/dist/components/Button/Button.variants.d.ts +2 -1
- package/dist/components/Button/Button.variants.js +122 -23
- package/dist/components/Checkbox/Checkbox.js +4 -4
- package/dist/components/Checkbox/Checkbox.variants.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.variants.js +7 -16
- package/dist/components/Dropdown/Dropdown.js +5 -5
- package/dist/components/Dropdown/Dropdown.types.d.ts +1 -0
- package/dist/components/Dropdown/Dropdown.variants.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.variants.js +5 -9
- package/dist/components/Dropdown/components/List/List.d.ts +2 -2
- package/dist/components/Dropdown/components/List/List.types.d.ts +3 -3
- package/dist/components/Dropdown/components/List/List.variants.d.ts +1 -1
- package/dist/components/Dropdown/components/List/List.variants.js +3 -3
- package/dist/components/Dropdown/components/ListItem/ListItem.variants.d.ts +1 -1
- package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +3 -3
- package/dist/components/Dropdown/components/Wrapper.d.ts +2 -2
- package/dist/components/Dropdown/components/Wrapper.js +1 -1
- package/dist/components/Dropdown/contexts/dropdown.provider.d.ts +4 -1
- package/dist/components/Dropdown/contexts/dropdown.provider.js +19 -8
- package/dist/components/Dropdown/hooks/useDropdown.d.ts +4 -4
- package/dist/components/Dropdown/hooks/useNavigationList.d.ts +4 -4
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/Input.variants.d.ts +1 -1
- package/dist/components/Input/Input.variants.js +3 -3
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +1 -1
- package/dist/components/Modal/components/Header/Header.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +4 -3
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.d.ts +2 -2
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +10 -10
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/Modal/hooks/useModal.d.ts +1 -1
- package/dist/components/NumberInput/NumberInput.js +96 -87
- package/dist/components/NumberInput/NumberInput.variants.d.ts +3 -3
- package/dist/components/NumberInput/NumberInput.variants.js +14 -21
- package/dist/components/ProgressBar/ProgressBar.variants.d.ts +2 -2
- package/dist/components/ProgressBar/ProgressBar.variants.js +7 -12
- package/dist/components/Radio/Radio.variants.d.ts +1 -1
- package/dist/components/Radio/Radio.variants.js +4 -7
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Range/Range.variants.d.ts +4 -4
- package/dist/components/Range/Range.variants.js +18 -18
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Slider/Slider.variants.d.ts +3 -3
- package/dist/components/Slider/Slider.variants.js +12 -12
- package/dist/components/Switch/Switch.js +2 -2
- package/dist/components/Switch/Switch.variants.d.ts +2 -2
- package/dist/components/Switch/Switch.variants.js +6 -6
- package/dist/components/Tag/Tag.variants.js +1 -1
- package/dist/components/TagSelect/TagSelect.js +1 -1
- package/dist/components/TagSelect/TagSelect.variants.d.ts +3 -3
- package/dist/components/TagSelect/TagSelect.variants.js +11 -14
- package/dist/components/TagSelect/hooks/useTagSelect.d.ts +1 -1
- package/dist/components/TextArea/TextArea.variants.d.ts +1 -1
- package/dist/components/TextArea/TextArea.variants.js +5 -5
- package/dist/components/Toast/Toast.js +104 -101
- package/dist/components/Toast/Toast.variants.d.ts +3 -3
- package/dist/components/Toast/Toast.variants.js +12 -12
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Tooltip/Tooltip.variants.d.ts +2 -2
- package/dist/components/Tooltip/Tooltip.variants.js +9 -9
- package/dist/components/Tooltip/hooks/useTooltip.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/contexts/theme.context.d.ts +1 -1
- package/dist/contexts/theme.hook.js +3 -6
- package/dist/contexts/theme.provider.d.ts +2 -3
- package/dist/contexts/theme.provider.js +4 -1
- package/dist/index-BBjak_0p.js +47 -0
- package/dist/index-BNmRGtA6.js +34 -0
- package/dist/{index-DFbnnPzA.js → index-Ci9Yg4G1.js} +5 -5
- package/dist/{index-B_GWswUP.js → index-D4Q2rMby.js} +1 -1
- package/dist/{index-DQMInta3.js → index-D68N8v8R.js} +214 -209
- package/dist/index-DoOsnuB6.js +72 -0
- package/dist/{index-2K8qjK4R.js → index-O3j1K921.js} +36 -37
- package/dist/index-OOfdXoxx.js +423 -0
- package/dist/index-ffjBR8Av.js +32 -0
- package/dist/index.js +1 -1
- package/dist/package.json +38 -38
- package/dist/plugins/konstruct.js +61 -50
- package/dist/plugins/utils/colors.d.ts +127 -10
- package/dist/plugins/utils/colors.js +210 -510
- package/dist/styles.css +1 -1
- package/dist/useBreadcrumb-tyxjV-a1.js +1398 -0
- package/dist/utils/index.js +150 -162
- package/dist/x-CRBgmX1Q.js +62 -0
- package/package.json +38 -38
- package/dist/Modal-CO0_SnXD.js +0 -909
- package/dist/index-2hJuj4UN.js +0 -19069
- package/dist/index-4qm4jAkj.js +0 -92
- package/dist/index-BJ7FQg17.js +0 -35
- package/dist/index-BqM_XclQ.js +0 -94
- package/dist/index-BwYCDOHZ.js +0 -44
- package/dist/index-CCavb-1K.js +0 -57
- package/dist/useBreadcrumb-BSMnc4Fu.js +0 -341
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function a(r) {
|
|
2
|
+
var f, n, t = "";
|
|
3
|
+
if (typeof r == "string" || typeof r == "number") t += r;
|
|
4
|
+
else if (typeof r == "object") if (Array.isArray(r)) {
|
|
5
|
+
var o = r.length;
|
|
6
|
+
for (f = 0; f < o; f++) r[f] && (n = a(r[f])) && (t && (t += " "), t += n);
|
|
7
|
+
} else for (n in r) r[n] && (t && (t += " "), t += n);
|
|
8
|
+
return t;
|
|
9
|
+
}
|
|
10
|
+
function i() {
|
|
11
|
+
for (var r, f, n = 0, t = "", o = arguments.length; n < o; n++) (r = arguments[n]) && (f = a(r)) && (t && (t += " "), t += f);
|
|
12
|
+
return t;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
i as c
|
|
16
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { R as h, A as f, P as x, O as g, C as u, T as C, D as b, a as y, b as O } from "../../AlertDialogTrigger-
|
|
2
|
+
import { R as h, A as f, P as x, O as g, C as u, T as C, D as b, a as y, b as O } from "../../AlertDialogTrigger-lenvKoGF.js";
|
|
3
3
|
import "../../contexts/theme.context.js";
|
|
4
4
|
import { useTheme as A } from "../../contexts/theme.hook.js";
|
|
5
5
|
import "react";
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { c as t } from "../../index-
|
|
2
|
-
const
|
|
1
|
+
import { c as t } from "../../index-BNmRGtA6.js";
|
|
2
|
+
const e = t([], {
|
|
3
3
|
variants: {
|
|
4
4
|
theme: {
|
|
5
5
|
colony: "",
|
|
6
|
-
kubefirst: ""
|
|
7
|
-
konstruct: ""
|
|
6
|
+
kubefirst: ""
|
|
8
7
|
}
|
|
9
8
|
},
|
|
10
9
|
defaultVariants: {
|
|
@@ -12,5 +11,5 @@ const r = t([], {
|
|
|
12
11
|
}
|
|
13
12
|
});
|
|
14
13
|
export {
|
|
15
|
-
|
|
14
|
+
e as buttonAlertDialogVariants
|
|
16
15
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import { A as a } from "../../../AlertDialogTrigger-
|
|
2
|
+
import { A as a } from "../../../AlertDialogTrigger-lenvKoGF.js";
|
|
3
3
|
import "../../../contexts/theme.context.js";
|
|
4
4
|
import "../../../contexts/theme.hook.js";
|
|
5
5
|
import "react";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const autocompleteVariants: (props?: ({
|
|
2
2
|
variant?: "default" | null | undefined;
|
|
3
|
-
theme?: "kubefirst" | "
|
|
3
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
4
4
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
5
|
export declare const labelVariants: (props?: ({
|
|
6
6
|
variant?: "default" | null | undefined;
|
|
7
|
-
theme?: "kubefirst" | "
|
|
7
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
8
8
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
const r =
|
|
1
|
+
import { c as e } from "../../index-BNmRGtA6.js";
|
|
2
|
+
const r = e(
|
|
3
3
|
[
|
|
4
4
|
"flex",
|
|
5
5
|
"w-full",
|
|
@@ -26,9 +26,9 @@ const r = t(
|
|
|
26
26
|
default: ""
|
|
27
27
|
},
|
|
28
28
|
theme: {
|
|
29
|
-
kubefirst: ["focus:ring-kubefirst-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
kubefirst: ["focus:ring-kubefirst-primary"],
|
|
30
|
+
colony: ["focus:focus:ring-red-400"],
|
|
31
|
+
civo: ""
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
defaultVariants: {
|
|
@@ -36,7 +36,7 @@ const r = t(
|
|
|
36
36
|
variant: "default"
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
), a =
|
|
39
|
+
), a = e(
|
|
40
40
|
["pl-1", "mb-2", "text-base", "cursor-pointer"],
|
|
41
41
|
{
|
|
42
42
|
variants: {
|
|
@@ -45,8 +45,8 @@ const r = t(
|
|
|
45
45
|
},
|
|
46
46
|
theme: {
|
|
47
47
|
kubefirst: "",
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
colony: "",
|
|
49
|
+
civo: ""
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
defaultVariants: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ReactNode, RefObject } from 'react';
|
|
1
|
+
import { ComponentRef, ReactNode, RefObject } from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import { Option } from '../Autocomplete.types';
|
|
4
4
|
import { autocompleteVariants } from '../Autocomplete.variants';
|
|
5
5
|
export interface Props extends VariantProps<typeof autocompleteVariants> {
|
|
6
6
|
className?: string;
|
|
7
|
-
inputRef: RefObject<
|
|
8
|
-
wrapperRef: RefObject<
|
|
7
|
+
inputRef: RefObject<ComponentRef<'input'> | null>;
|
|
8
|
+
wrapperRef: RefObject<ComponentRef<'div'> | null>;
|
|
9
9
|
options: Option[];
|
|
10
10
|
placeholder: string | ReactNode;
|
|
11
11
|
placeholderClassName?: string;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export declare const listVariants: (props?: ({
|
|
2
2
|
variant?: "default" | null | undefined;
|
|
3
|
-
theme?: "kubefirst" | "
|
|
3
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
4
4
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
5
|
export declare const emptyListVariants: (props?: ({
|
|
6
6
|
variant?: "default" | null | undefined;
|
|
7
|
-
theme?: "kubefirst" | "
|
|
7
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
8
8
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
9
|
export declare const listItemVariants: (props?: ({
|
|
10
10
|
variant?: "default" | null | undefined;
|
|
11
|
-
theme?: "kubefirst" | "
|
|
11
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
12
12
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
13
13
|
export declare const buttonVariants: (props?: ({
|
|
14
14
|
variant?: "default" | null | undefined;
|
|
15
|
-
theme?: "kubefirst" | "
|
|
15
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
16
16
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as t } from "../../../index-
|
|
1
|
+
import { c as t } from "../../../index-BNmRGtA6.js";
|
|
2
2
|
const a = t(["max-h-[250px]", "overflow-y-auto"], {
|
|
3
3
|
variants: {
|
|
4
4
|
variant: {
|
|
@@ -6,8 +6,8 @@ const a = t(["max-h-[250px]", "overflow-y-auto"], {
|
|
|
6
6
|
},
|
|
7
7
|
theme: {
|
|
8
8
|
kubefirst: "",
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
colony: "",
|
|
10
|
+
civo: ""
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
defaultVariants: {
|
|
@@ -23,8 +23,8 @@ const a = t(["max-h-[250px]", "overflow-y-auto"], {
|
|
|
23
23
|
},
|
|
24
24
|
theme: {
|
|
25
25
|
kubefirst: "",
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
colony: "",
|
|
27
|
+
civo: ""
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
defaultVariants: {
|
|
@@ -32,22 +32,22 @@ const a = t(["max-h-[250px]", "overflow-y-auto"], {
|
|
|
32
32
|
theme: "kubefirst"
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
),
|
|
35
|
+
), i = t(["focus-visible:outline-none"], {
|
|
36
36
|
variants: {
|
|
37
37
|
variant: {
|
|
38
38
|
default: ""
|
|
39
39
|
},
|
|
40
40
|
theme: {
|
|
41
41
|
kubefirst: ["focus:bg-purple-100", "hover:bg-purple-100"],
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
colony: ["focus:bg-red-100", "hover:bg-red-100"],
|
|
43
|
+
civo: ""
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
defaultVariants: {
|
|
47
47
|
variant: "default",
|
|
48
48
|
theme: "kubefirst"
|
|
49
49
|
}
|
|
50
|
-
}),
|
|
50
|
+
}), o = t(
|
|
51
51
|
[
|
|
52
52
|
"cursor-pointer",
|
|
53
53
|
"focus-visible:outline-none",
|
|
@@ -63,8 +63,8 @@ const a = t(["max-h-[250px]", "overflow-y-auto"], {
|
|
|
63
63
|
},
|
|
64
64
|
theme: {
|
|
65
65
|
kubefirst: ["focus:bg-purple-100", "hover:bg-purple-100"],
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
colony: ["focus:bg-red-100", "hover:bg-red-100"],
|
|
67
|
+
civo: ""
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
defaultVariants: {
|
|
@@ -74,8 +74,8 @@ const a = t(["max-h-[250px]", "overflow-y-auto"], {
|
|
|
74
74
|
}
|
|
75
75
|
);
|
|
76
76
|
export {
|
|
77
|
-
|
|
77
|
+
o as buttonVariants,
|
|
78
78
|
r as emptyListVariants,
|
|
79
|
-
|
|
79
|
+
i as listItemVariants,
|
|
80
80
|
a as listVariants
|
|
81
81
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ChangeEvent, RefObject } from 'react';
|
|
1
|
+
import { ChangeEvent, ComponentRef, RefObject } from 'react';
|
|
2
2
|
import { Option } from '../Autocomplete.types';
|
|
3
3
|
type UseAutocompleteProps = {
|
|
4
4
|
options: Option[];
|
|
5
|
-
inputRef: RefObject<
|
|
6
|
-
wrapperRef: RefObject<
|
|
5
|
+
inputRef: RefObject<ComponentRef<'input'> | null>;
|
|
6
|
+
wrapperRef: RefObject<ComponentRef<'div'> | null>;
|
|
7
7
|
onChange(value: string): void;
|
|
8
8
|
};
|
|
9
9
|
export declare const useAutocomplete: ({ options, inputRef, wrapperRef, onChange, }: UseAutocompleteProps) => {
|
|
10
|
-
inputRef: RefObject<HTMLInputElement>;
|
|
10
|
+
inputRef: RefObject<HTMLInputElement | null>;
|
|
11
11
|
newOptions: Option[];
|
|
12
12
|
showOptions: boolean;
|
|
13
13
|
value: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
1
|
+
import { ComponentRef, RefObject } from 'react';
|
|
2
2
|
import { Option } from '../Autocomplete.types';
|
|
3
3
|
type UseNavigationListProps = {
|
|
4
|
-
ulRef: RefObject<
|
|
5
|
-
inputRef: RefObject<
|
|
6
|
-
wrapperRef: RefObject<
|
|
4
|
+
ulRef: RefObject<ComponentRef<'ul'> | null>;
|
|
5
|
+
inputRef: RefObject<ComponentRef<'input'> | null>;
|
|
6
|
+
wrapperRef: RefObject<ComponentRef<'div'> | null>;
|
|
7
7
|
options: Option[];
|
|
8
8
|
};
|
|
9
9
|
export declare const useNavigationUlList: ({ ulRef, inputRef, wrapperRef, options, }: UseNavigationListProps) => void;
|