@wisemen/vue-core-components 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AlertCircleIcon-B3d-CXUl.js +24 -0
- package/dist/ArrowDownIcon-BEFV2gBy.js +24 -0
- package/dist/ArrowLeftIcon-BUfGaRGE.js +24 -0
- package/dist/ArrowRightIcon-DCZJpxrp.js +24 -0
- package/dist/ArrowUpIcon-BO_2dPlE.js +24 -0
- package/dist/{CalendarIcon-ov4oOm7t.js → CalendarIcon-D-ESDpv5.js} +1 -1
- package/dist/CheckCircleIcon-CsEUfOQY.js +24 -0
- package/dist/{CheckIcon-DKCCStaL.js → CheckIcon-B9vyutJQ.js} +1 -1
- package/dist/{ChevronLeftDoubleIcon-aG6nY5th.js → ChevronLeftDoubleIcon-BfI5koax.js} +1 -1
- package/dist/{ChevronLeftIcon-DDaRHPWC.js → ChevronLeftIcon-CHlLCOSs.js} +1 -1
- package/dist/{ChevronRightDoubleIcon-4x90Up7e.js → ChevronRightDoubleIcon-CeWN33JQ.js} +1 -1
- package/dist/{ChevronRightIcon-CZU8oyxa.js → ChevronRightIcon-BwpcvIev.js} +1 -1
- package/dist/{CloseIcon-D5_g4SV_.js → CloseIcon-DZsSXl1P.js} +1 -1
- package/dist/{EyeIcon-CrVFkfjP.js → EyeIcon-cR6b22LR.js} +1 -1
- package/dist/{EyeOffIcon-Bvizr3GN.js → EyeOffIcon-DTYD7SQ_.js} +1 -1
- package/dist/InfoCircleIcon-COWXV4q0.js +26 -0
- package/dist/{MinusIcon-Pe6gCl8K.js → MinusIcon-FShUNBG1.js} +1 -1
- package/dist/{PlusIcon-B1aDBCI4.js → PlusIcon-DIGSFATw.js} +1 -1
- package/dist/{SearchIcon-COf6exDf.js → SearchIcon-CpBI2Qr3.js} +1 -1
- package/dist/{SelectIconRight-CxNBaYb7.js → SelectIconRight-BOybCSHX.js} +1 -1
- package/dist/{StarsIcon-C-7HxOG7.js → StarsIcon-ks2XfKLG.js} +1 -1
- package/dist/SwitchVerticalIcon-Djmf8zA3.js +24 -0
- package/dist/{TranslateIcon-B1EUrG0F.js → TranslateIcon-yQgLQSq0.js} +1 -1
- package/dist/class-variant/classVariant.type.d.ts +180 -0
- package/dist/class-variant/customClassVariants.d.ts +25 -0
- package/dist/components/avatar/avatar.context.d.ts +2 -2
- package/dist/components/avatar/avatar.props.d.ts +4 -4
- package/dist/components/avatar/parts/AvatarRoot.d.ts +6 -0
- package/dist/components/button/default-button/button.context.d.ts +2 -2
- package/dist/components/button/default-button/button.props.d.ts +11 -0
- package/dist/components/button/default-button/parts/ButtonRoot.d.ts +7 -1
- package/dist/components/button/icon-button/iconButton.context.d.ts +2 -2
- package/dist/components/button/icon-button/iconButton.props.d.ts +3 -5
- package/dist/components/button/icon-button/parts/IconButtonRoot.d.ts +2 -1
- package/dist/components/button/router-link-button/parts/RouterLinkButtonRoot.d.ts +7 -1
- package/dist/components/button/router-link-button/routerLinkButton.context.d.ts +2 -2
- package/dist/components/button/router-link-button/routerLinkButton.props.d.ts +11 -0
- package/dist/components/button/shared/textButton.props.d.ts +1 -13
- package/dist/components/checkbox/checkbox.context.d.ts +2 -2
- package/dist/components/checkbox/checkbox.props.d.ts +4 -4
- package/dist/components/checkbox/parts/CheckboxRoot.d.ts +7 -3
- package/dist/components/config-provider/ConfigProvider.d.ts +6 -0
- package/dist/components/config-provider/config.context.d.ts +2 -0
- package/dist/components/date-field/dateField.context.d.ts +2 -2
- package/dist/components/date-field/dateField.props.d.ts +5 -10
- package/dist/components/date-field/parts/DateFieldRoot.d.ts +3 -4
- package/dist/components/date-picker/single/datePicker.context.d.ts +2 -2
- package/dist/components/date-picker/single/datePicker.props.d.ts +3 -4
- package/dist/components/date-picker/single/parts/DatePickerRoot.d.ts +1 -1
- package/dist/components/dialog/Dialog.d.ts +1 -3
- package/dist/components/dialog/dialog.context.d.ts +2 -2
- package/dist/components/dialog/dialog.props.d.ts +5 -10
- package/dist/components/dialog/parts/DialogRoot.d.ts +3 -4
- package/dist/components/dropdown-menu/dropdownMenu.context.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdownMenu.props.d.ts +4 -4
- package/dist/components/dropdown-menu/parts/DropdownMenuRoot.d.ts +12 -2
- package/dist/components/form-field/formField.context.d.ts +2 -2
- package/dist/components/form-field/formField.props.d.ts +4 -4
- package/dist/components/form-field/parts/FormFieldRoot.d.ts +9 -2
- package/dist/components/index.d.ts +2 -0
- package/dist/components/internal/ProgressiveBlur.d.ts +2 -0
- package/dist/components/keyboard-key/KeyboardKey.d.ts +4 -2
- package/dist/components/keyboard-key/keyboardKey.props.d.ts +3 -4
- package/dist/components/keyboard-shortcut/KeyboardShortcut.d.ts +2 -3
- package/dist/components/keyboard-shortcut/keyboardShortcut.props.d.ts +6 -7
- package/dist/components/number-field/numberField.context.d.ts +2 -2
- package/dist/components/number-field/numberField.props.d.ts +5 -14
- package/dist/components/number-field/parts/NumberFieldRoot.d.ts +3 -5
- package/dist/components/popover/parts/PopoverRoot.d.ts +3 -4
- package/dist/components/popover/popover.context.d.ts +2 -2
- package/dist/components/popover/popover.props.d.ts +5 -10
- package/dist/components/radio-group-item/parts/RadioGroupItemRoot.d.ts +7 -3
- package/dist/components/radio-group-item/radioGroupItem.context.d.ts +2 -2
- package/dist/components/radio-group-item/radioGroupItem.props.d.ts +4 -4
- package/dist/components/select/select.context.d.ts +2 -2
- package/dist/components/select/select.props.d.ts +5 -14
- package/dist/components/switch/parts/SwitchRoot.d.ts +5 -2
- package/dist/components/switch/switch.context.d.ts +2 -2
- package/dist/components/switch/switch.props.d.ts +6 -7
- package/dist/components/table/Table.d.ts +24 -0
- package/dist/components/table/index.d.ts +7 -0
- package/dist/components/table/parts/Subgrid.d.ts +17 -0
- package/dist/components/table/parts/TableBody.d.ts +2 -0
- package/dist/components/table/parts/TableCell.d.ts +26 -0
- package/dist/components/table/parts/TableCellLayout.d.ts +21 -0
- package/dist/components/table/parts/TableContent.d.ts +17 -0
- package/dist/components/table/parts/TableEmptyOrLoadingState.d.ts +19 -0
- package/dist/components/table/parts/TableHeader.d.ts +2 -0
- package/dist/components/table/parts/TableHeaderCell.d.ts +22 -0
- package/dist/components/table/parts/TableHiddenResultsHint.d.ts +2 -0
- package/dist/components/table/parts/TableInteractiveElement.d.ts +17 -0
- package/dist/components/table/parts/TableRoot.d.ts +20 -0
- package/dist/components/table/parts/TableRow.d.ts +5 -0
- package/dist/components/table/parts/TableRowAction.d.ts +6 -0
- package/dist/components/table/parts/TableScrollContainer.d.ts +21 -0
- package/dist/components/table/table.composable.d.ts +16 -0
- package/dist/components/table/table.context.d.ts +19 -0
- package/dist/components/table/table.emits.d.ts +3 -0
- package/dist/components/table/table.props.d.ts +54 -0
- package/dist/components/table/table.style.d.ts +31 -0
- package/dist/components/table/table.type.d.ts +44 -0
- package/dist/components/tabs/button/ButtonTabs.d.ts +7 -1
- package/dist/components/tabs/router-link/RouterLinkTabs.d.ts +7 -1
- package/dist/components/tabs/shared/parts/TabsRoot.d.ts +7 -1
- package/dist/components/tabs/shared/tabs.context.d.ts +2 -2
- package/dist/components/tabs/shared/tabs.props.d.ts +3 -4
- package/dist/components/text-field/textField.context.d.ts +2 -2
- package/dist/components/text-field/textField.props.d.ts +4 -4
- package/dist/components/textarea/parts/TextareaRoot.d.ts +5 -2
- package/dist/components/textarea/textarea.context.d.ts +2 -2
- package/dist/components/textarea/textarea.props.d.ts +4 -4
- package/dist/components/theme-provider/ThemeProvider.d.ts +1 -1
- package/dist/components/time-field/parts/TimeFieldRoot.d.ts +9 -2
- package/dist/components/time-field/timeField.context.d.ts +2 -2
- package/dist/components/time-field/timeField.props.d.ts +4 -4
- package/dist/components/toast/Toast.d.ts +7 -0
- package/dist/components/toast/ToastContainer.d.ts +2 -0
- package/dist/components/toast/index.d.ts +2 -0
- package/dist/components/toast/parts/ToastActions.d.ts +2 -0
- package/dist/components/toast/parts/ToastCloseButton.d.ts +2 -0
- package/dist/components/toast/parts/ToastDescription.d.ts +2 -0
- package/dist/components/toast/parts/ToastIcon.d.ts +2 -0
- package/dist/components/toast/parts/ToastPreview.d.ts +2 -0
- package/dist/components/toast/parts/ToastRoot.d.ts +27 -0
- package/dist/components/toast/parts/ToastTitle.d.ts +2 -0
- package/dist/components/toast/toast.composable.d.ts +12 -0
- package/dist/components/toast/toast.context.d.ts +12 -0
- package/dist/components/toast/toast.emits.d.ts +3 -0
- package/dist/components/toast/toast.props.d.ts +42 -0
- package/dist/components/toast/toast.style.d.ts +52 -0
- package/dist/components/tooltip/parts/TooltipRoot.d.ts +6 -2
- package/dist/components/tooltip/tooltip.context.d.ts +2 -2
- package/dist/components/tooltip/tooltip.props.d.ts +4 -4
- package/dist/composables/index.d.ts +2 -0
- package/dist/composables/pagination/pagination.composable.d.ts +2 -0
- package/dist/composables/pagination/pagination.type.d.ts +87 -0
- package/dist/composables/pagination/pagination.util.d.ts +2 -0
- package/dist/icons/AlertCircleIcon.d.ts +2 -0
- package/dist/icons/ArrowDownIcon.d.ts +2 -0
- package/dist/icons/ArrowLeftIcon.d.ts +2 -0
- package/dist/icons/ArrowRightIcon.d.ts +2 -0
- package/dist/icons/ArrowUpIcon.d.ts +2 -0
- package/dist/icons/CheckCircleIcon.d.ts +2 -0
- package/dist/icons/InfoCircleIcon.d.ts +2 -0
- package/dist/icons/SwitchVerticalIcon.d.ts +2 -0
- package/dist/icons/icons.d.ts +8 -0
- package/dist/{index-CUZPwdwp.js → index-DzOo1t21.js} +9629 -7420
- package/dist/index.d.ts +3 -1
- package/dist/index.js +139 -130
- package/dist/index.umd +17 -17
- package/dist/style.css +1 -1
- package/dist/utils/paginationParamsBuilder.util.d.ts +48 -0
- package/dist/utils/props.util.d.ts +0 -14
- package/package.json +4 -1
- package/dist/customClassVariants.d.ts +0 -76
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createElementBlock as o, openBlock as t, createElementVNode as r } from "vue";
|
|
2
|
+
import { _ as n } from "./index-DzOo1t21.js";
|
|
3
|
+
const s = {}, l = {
|
|
4
|
+
width: "100%",
|
|
5
|
+
height: "100%",
|
|
6
|
+
viewBox: "0 0 22 22",
|
|
7
|
+
fill: "none",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9
|
+
};
|
|
10
|
+
function c(i, e) {
|
|
11
|
+
return t(), o("svg", l, e[0] || (e[0] = [
|
|
12
|
+
r("path", {
|
|
13
|
+
d: "M11 7V11M11 15H11.01M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z",
|
|
14
|
+
stroke: "currentColor",
|
|
15
|
+
"stroke-width": "2",
|
|
16
|
+
"stroke-linecap": "round",
|
|
17
|
+
"stroke-linejoin": "round"
|
|
18
|
+
}, null, -1)
|
|
19
|
+
]));
|
|
20
|
+
}
|
|
21
|
+
const f = /* @__PURE__ */ n(s, [["render", c]]);
|
|
22
|
+
export {
|
|
23
|
+
f as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createElementBlock as e, openBlock as t, createElementVNode as r } from "vue";
|
|
2
|
+
import { _ as n } from "./index-DzOo1t21.js";
|
|
3
|
+
const s = {}, c = {
|
|
4
|
+
width: "100%",
|
|
5
|
+
height: "100%",
|
|
6
|
+
viewBox: "0 0 24 24",
|
|
7
|
+
fill: "none",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9
|
+
};
|
|
10
|
+
function i(l, o) {
|
|
11
|
+
return t(), e("svg", c, o[0] || (o[0] = [
|
|
12
|
+
r("path", {
|
|
13
|
+
d: "M12 5V19M12 19L19 12M12 19L5 12",
|
|
14
|
+
stroke: "currentColor",
|
|
15
|
+
"stroke-width": "2",
|
|
16
|
+
"stroke-linecap": "round",
|
|
17
|
+
"stroke-linejoin": "round"
|
|
18
|
+
}, null, -1)
|
|
19
|
+
]));
|
|
20
|
+
}
|
|
21
|
+
const _ = /* @__PURE__ */ n(s, [["render", i]]);
|
|
22
|
+
export {
|
|
23
|
+
_ as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createElementBlock as o, openBlock as t, createElementVNode as r } from "vue";
|
|
2
|
+
import { _ as n } from "./index-DzOo1t21.js";
|
|
3
|
+
const s = {}, c = {
|
|
4
|
+
width: "100%",
|
|
5
|
+
height: "100%",
|
|
6
|
+
viewBox: "0 0 24 24",
|
|
7
|
+
fill: "none",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9
|
+
};
|
|
10
|
+
function i(l, e) {
|
|
11
|
+
return t(), o("svg", c, e[0] || (e[0] = [
|
|
12
|
+
r("path", {
|
|
13
|
+
d: "M19 12H5M5 12L12 19M5 12L12 5",
|
|
14
|
+
stroke: "currentColor",
|
|
15
|
+
"stroke-width": "2",
|
|
16
|
+
"stroke-linecap": "round",
|
|
17
|
+
"stroke-linejoin": "round"
|
|
18
|
+
}, null, -1)
|
|
19
|
+
]));
|
|
20
|
+
}
|
|
21
|
+
const _ = /* @__PURE__ */ n(s, [["render", i]]);
|
|
22
|
+
export {
|
|
23
|
+
_ as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createElementBlock as e, openBlock as t, createElementVNode as r } from "vue";
|
|
2
|
+
import { _ as n } from "./index-DzOo1t21.js";
|
|
3
|
+
const s = {}, i = {
|
|
4
|
+
width: "100%",
|
|
5
|
+
height: "100%",
|
|
6
|
+
viewBox: "0 0 24 24",
|
|
7
|
+
fill: "none",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9
|
+
};
|
|
10
|
+
function c(l, o) {
|
|
11
|
+
return t(), e("svg", i, o[0] || (o[0] = [
|
|
12
|
+
r("path", {
|
|
13
|
+
d: "M5 12H19M19 12L12 5M19 12L12 19",
|
|
14
|
+
stroke: "currentColor",
|
|
15
|
+
"stroke-width": "2",
|
|
16
|
+
"stroke-linecap": "round",
|
|
17
|
+
"stroke-linejoin": "round"
|
|
18
|
+
}, null, -1)
|
|
19
|
+
]));
|
|
20
|
+
}
|
|
21
|
+
const f = /* @__PURE__ */ n(s, [["render", c]]);
|
|
22
|
+
export {
|
|
23
|
+
f as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createElementBlock as e, openBlock as t, createElementVNode as r } from "vue";
|
|
2
|
+
import { _ as n } from "./index-DzOo1t21.js";
|
|
3
|
+
const s = {}, c = {
|
|
4
|
+
width: "100%",
|
|
5
|
+
height: "100%",
|
|
6
|
+
viewBox: "0 0 24 24",
|
|
7
|
+
fill: "none",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9
|
+
};
|
|
10
|
+
function i(l, o) {
|
|
11
|
+
return t(), e("svg", c, o[0] || (o[0] = [
|
|
12
|
+
r("path", {
|
|
13
|
+
d: "M12 19V5M12 5L5 12M12 5L19 12",
|
|
14
|
+
stroke: "currentColor",
|
|
15
|
+
"stroke-width": "2",
|
|
16
|
+
"stroke-linecap": "round",
|
|
17
|
+
"stroke-linejoin": "round"
|
|
18
|
+
}, null, -1)
|
|
19
|
+
]));
|
|
20
|
+
}
|
|
21
|
+
const _ = /* @__PURE__ */ n(s, [["render", i]]);
|
|
22
|
+
export {
|
|
23
|
+
_ as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createElementBlock as o, openBlock as t, createElementVNode as r } from "vue";
|
|
2
|
+
import { _ as n } from "./index-DzOo1t21.js";
|
|
3
|
+
const s = {}, c = {
|
|
4
|
+
width: "100%",
|
|
5
|
+
height: "100%",
|
|
6
|
+
viewBox: "0 0 24 24",
|
|
7
|
+
fill: "none",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9
|
+
};
|
|
10
|
+
function i(l, e) {
|
|
11
|
+
return t(), o("svg", c, e[0] || (e[0] = [
|
|
12
|
+
r("path", {
|
|
13
|
+
d: "M7.5 12L10.5 15L16.5 9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",
|
|
14
|
+
stroke: "currentColor",
|
|
15
|
+
"stroke-width": "2",
|
|
16
|
+
"stroke-linecap": "round",
|
|
17
|
+
"stroke-linejoin": "round"
|
|
18
|
+
}, null, -1)
|
|
19
|
+
]));
|
|
20
|
+
}
|
|
21
|
+
const f = /* @__PURE__ */ n(s, [["render", i]]);
|
|
22
|
+
export {
|
|
23
|
+
f as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { createElementBlock as t, openBlock as r, createElementVNode as o } from "vue";
|
|
2
|
+
import { _ as n } from "./index-DzOo1t21.js";
|
|
3
|
+
const c = {}, i = {
|
|
4
|
+
width: "100%",
|
|
5
|
+
height: "100%",
|
|
6
|
+
viewBox: "0 0 16 16",
|
|
7
|
+
fill: "none",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9
|
+
};
|
|
10
|
+
function s(l, e) {
|
|
11
|
+
return r(), t("svg", i, e[0] || (e[0] = [
|
|
12
|
+
o("g", { "clip-path": "url(#clip0_5570_1431)" }, [
|
|
13
|
+
o("path", {
|
|
14
|
+
d: "M7.99967 10.6667V8.00004M7.99967 5.33337H8.00634M14.6663 8.00004C14.6663 11.6819 11.6816 14.6667 7.99967 14.6667C4.31778 14.6667 1.33301 11.6819 1.33301 8.00004C1.33301 4.31814 4.31778 1.33337 7.99967 1.33337C11.6816 1.33337 14.6663 4.31814 14.6663 8.00004Z",
|
|
15
|
+
stroke: "currentColor",
|
|
16
|
+
"stroke-width": "1.3",
|
|
17
|
+
"stroke-linecap": "round",
|
|
18
|
+
"stroke-linejoin": "round"
|
|
19
|
+
})
|
|
20
|
+
], -1)
|
|
21
|
+
]));
|
|
22
|
+
}
|
|
23
|
+
const d = /* @__PURE__ */ n(c, [["render", s]]);
|
|
24
|
+
export {
|
|
25
|
+
d as default
|
|
26
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createElementBlock as t, openBlock as o, createElementVNode as r } from "vue";
|
|
2
|
+
import { _ as n } from "./index-DzOo1t21.js";
|
|
3
|
+
const s = {}, c = {
|
|
4
|
+
width: "100%",
|
|
5
|
+
height: "100%",
|
|
6
|
+
viewBox: "0 0 24 24",
|
|
7
|
+
fill: "none",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9
|
+
};
|
|
10
|
+
function i(l, e) {
|
|
11
|
+
return o(), t("svg", c, e[0] || (e[0] = [
|
|
12
|
+
r("path", {
|
|
13
|
+
d: "M17 4V20M17 20L13 16M17 20L21 16M7 20V4M7 4L3 8M7 4L11 8",
|
|
14
|
+
stroke: "currentColor",
|
|
15
|
+
"stroke-width": "2",
|
|
16
|
+
"stroke-linecap": "round",
|
|
17
|
+
"stroke-linejoin": "round"
|
|
18
|
+
}, null, -1)
|
|
19
|
+
]));
|
|
20
|
+
}
|
|
21
|
+
const a = /* @__PURE__ */ n(s, [["render", i]]);
|
|
22
|
+
export {
|
|
23
|
+
a as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import { createAvatarStyle } from '../components/avatar/avatar.style';
|
|
3
|
+
import { createButtonStyle } from '../components/button/default-button/button.style';
|
|
4
|
+
import { createIconButtonStyle } from '../components/button/icon-button/iconButton.style';
|
|
5
|
+
import { createRouterLinkButtonStyle } from '../components/button/router-link-button/routerLinkButton.style';
|
|
6
|
+
import { createCheckboxStyle } from '../components/checkbox/checkbox.style';
|
|
7
|
+
import { createDateFieldStyle } from '../components/date-field/dateField.style';
|
|
8
|
+
import { createDatePickerStyle } from '../components/date-picker/single/datePicker.style';
|
|
9
|
+
import { createDialogStyle } from '../components/dialog/dialog.style';
|
|
10
|
+
import { createDropdownMenuStyle } from '../components/dropdown-menu/dropdownMenu.style';
|
|
11
|
+
import { createFormFieldStyle } from '../components/form-field/formField.style';
|
|
12
|
+
import { createKeyboardKeyStyle } from '../components/keyboard-key/keyboardKey.style';
|
|
13
|
+
import { createkeyboardShortcutStyle } from '../components/keyboard-shortcut/keyboardShortcut.style';
|
|
14
|
+
import { createNumberFieldStyle } from '../components/number-field/numberField.style';
|
|
15
|
+
import { createPopoverStyle } from '../components/popover/popover.style';
|
|
16
|
+
import { createRadioGroupItemStyle } from '../components/radio-group-item/radioGroupItem.style';
|
|
17
|
+
import { createSelectStyle } from '../components/select/style/select.style';
|
|
18
|
+
import { createSwitchStyle } from '../components/switch/switch.style';
|
|
19
|
+
import { createTableStyle } from '../components/table/table.style';
|
|
20
|
+
import { createTabsStyle } from '../components/tabs/shared/tabs.style';
|
|
21
|
+
import { createTextFieldStyle } from '../components/text-field/textField.style';
|
|
22
|
+
import { createTextareaStyle } from '../components/textarea/textarea.style';
|
|
23
|
+
import { createTimeFieldStyle } from '../components/time-field/timeField.style';
|
|
24
|
+
import { createToastStyle } from '../components/toast/toast.style';
|
|
25
|
+
import { createTooltipStyle } from '../components/tooltip/tooltip.style';
|
|
26
|
+
export interface ComponentMap {
|
|
27
|
+
avatar: {
|
|
28
|
+
style: typeof createAvatarStyle;
|
|
29
|
+
children: {};
|
|
30
|
+
};
|
|
31
|
+
button: {
|
|
32
|
+
style: typeof createButtonStyle;
|
|
33
|
+
children: {};
|
|
34
|
+
};
|
|
35
|
+
checkbox: {
|
|
36
|
+
style: typeof createCheckboxStyle;
|
|
37
|
+
children: {};
|
|
38
|
+
};
|
|
39
|
+
dateField: {
|
|
40
|
+
style: typeof createDateFieldStyle;
|
|
41
|
+
children: {
|
|
42
|
+
datePicker: 'datePicker';
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
datePicker: {
|
|
46
|
+
style: typeof createDatePickerStyle;
|
|
47
|
+
children: {};
|
|
48
|
+
};
|
|
49
|
+
dialog: {
|
|
50
|
+
style: typeof createDialogStyle;
|
|
51
|
+
children: {
|
|
52
|
+
closeButton: 'iconButton';
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
dropdownMenu: {
|
|
56
|
+
style: typeof createDropdownMenuStyle;
|
|
57
|
+
children: {};
|
|
58
|
+
};
|
|
59
|
+
formField: {
|
|
60
|
+
style: typeof createFormFieldStyle;
|
|
61
|
+
children: {};
|
|
62
|
+
};
|
|
63
|
+
iconButton: {
|
|
64
|
+
style: typeof createIconButtonStyle;
|
|
65
|
+
children: {
|
|
66
|
+
avatar: 'avatar';
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
keyboardKey: {
|
|
70
|
+
style: typeof createKeyboardKeyStyle;
|
|
71
|
+
children: {};
|
|
72
|
+
};
|
|
73
|
+
keyboardShortcut: {
|
|
74
|
+
style: typeof createkeyboardShortcutStyle;
|
|
75
|
+
children: {
|
|
76
|
+
keyboardKey: 'keyboardKey';
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
numberField: {
|
|
80
|
+
style: typeof createNumberFieldStyle;
|
|
81
|
+
children: {
|
|
82
|
+
decrement: 'iconButton';
|
|
83
|
+
increment: 'iconButton';
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
popover: {
|
|
87
|
+
style: typeof createPopoverStyle;
|
|
88
|
+
children: {
|
|
89
|
+
closeButton: 'iconButton';
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
radioGroupItem: {
|
|
93
|
+
style: typeof createRadioGroupItemStyle;
|
|
94
|
+
children: {};
|
|
95
|
+
};
|
|
96
|
+
routerLinkButton: {
|
|
97
|
+
style: typeof createRouterLinkButtonStyle;
|
|
98
|
+
children: {};
|
|
99
|
+
};
|
|
100
|
+
select: {
|
|
101
|
+
style: typeof createSelectStyle;
|
|
102
|
+
children: {
|
|
103
|
+
dropdownSearchInput: 'textField';
|
|
104
|
+
popover: 'popover';
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
switch: {
|
|
108
|
+
style: typeof createSwitchStyle;
|
|
109
|
+
children: {};
|
|
110
|
+
};
|
|
111
|
+
table: {
|
|
112
|
+
style: typeof createTableStyle;
|
|
113
|
+
children: {
|
|
114
|
+
headerCellButton: 'button';
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
tabs: {
|
|
118
|
+
style: typeof createTabsStyle;
|
|
119
|
+
children: {};
|
|
120
|
+
};
|
|
121
|
+
textarea: {
|
|
122
|
+
style: typeof createTextareaStyle;
|
|
123
|
+
children: {};
|
|
124
|
+
};
|
|
125
|
+
textField: {
|
|
126
|
+
style: typeof createTextFieldStyle;
|
|
127
|
+
children: {};
|
|
128
|
+
};
|
|
129
|
+
timeField: {
|
|
130
|
+
style: typeof createTimeFieldStyle;
|
|
131
|
+
children: {};
|
|
132
|
+
};
|
|
133
|
+
toast: {
|
|
134
|
+
style: typeof createToastStyle;
|
|
135
|
+
children: {};
|
|
136
|
+
};
|
|
137
|
+
tooltip: {
|
|
138
|
+
style: typeof createTooltipStyle;
|
|
139
|
+
children: {};
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* This is a placeholder for the variants defined by the user.
|
|
144
|
+
*/
|
|
145
|
+
export interface ComponentVariants {
|
|
146
|
+
}
|
|
147
|
+
export type GetComponentSlots<TComponent extends keyof ComponentMap> = ReturnType<ComponentMap[TComponent]['style']>;
|
|
148
|
+
export type GetComponentProps<TComponent extends keyof ComponentMap> = {
|
|
149
|
+
[K in keyof VariantProps<ComponentMap[TComponent]['style']>]: VariantProps<ComponentMap[TComponent]['style']>[K] extends undefined ? null : VariantProps<ComponentMap[TComponent]['style']>[K];
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* Return the predefined values and the custom values defined by the user
|
|
153
|
+
*/
|
|
154
|
+
export type GetComponentProp<TComponent extends keyof ComponentMap, TProp extends keyof GetComponentProps<TComponent>> = (ComponentVariants extends {
|
|
155
|
+
variants: Array<infer TVariant>;
|
|
156
|
+
} ? TVariant extends CustomClassVariant<TComponent, TProp, infer TTargetPropValue> ? TTargetPropValue : never : never) | GetComponentProps<TComponent>[TProp];
|
|
157
|
+
export type ResolvedClassConfig<TComponent extends keyof ComponentMap> = {
|
|
158
|
+
[KSlot in keyof GetComponentSlots<TComponent>]?: string;
|
|
159
|
+
} & {
|
|
160
|
+
[KChild in keyof ComponentMap[TComponent]['children']]?: ResolvedClassConfig<ComponentMap[TComponent]['children'][KChild] extends keyof ComponentMap ? ComponentMap[TComponent]['children'][KChild] : never>;
|
|
161
|
+
};
|
|
162
|
+
export interface CustomizableElement<TComponent extends keyof ComponentMap> {
|
|
163
|
+
/**
|
|
164
|
+
* The class configuration for the component. This allows customizating the default styles
|
|
165
|
+
* by overriding them with custom values.
|
|
166
|
+
*/
|
|
167
|
+
classConfig?: ResolvedClassConfig<TComponent> | null;
|
|
168
|
+
}
|
|
169
|
+
export interface CustomClassVariant<TComponent extends keyof ComponentMap, TTargetProp extends keyof GetComponentProps<TComponent>, TTargetPropNewValue extends string> {
|
|
170
|
+
config: ResolvedClassConfig<TComponent>;
|
|
171
|
+
target?: {
|
|
172
|
+
prop: TTargetProp;
|
|
173
|
+
value: GetComponentProps<TComponent>[TTargetProp] | TTargetPropNewValue;
|
|
174
|
+
};
|
|
175
|
+
theme?: string & {} | 'default';
|
|
176
|
+
component: TComponent;
|
|
177
|
+
}
|
|
178
|
+
export type CustomComponentVariant<TComponent extends keyof ComponentMap> = {
|
|
179
|
+
[KSlot in keyof GetComponentSlots<TComponent>]: string;
|
|
180
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ComponentMap, CustomClassVariant, GetComponentProps, GetComponentSlots } from './classVariant.type';
|
|
2
|
+
export declare const customClassVariants: CustomClassVariant<any, never, string>[];
|
|
3
|
+
/**
|
|
4
|
+
* Define a new or override an existing class variant for a component.
|
|
5
|
+
* @param customClassVariant The class variant to define or override.
|
|
6
|
+
* @returns The defined class variant.
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* defineComponentVariant({
|
|
10
|
+
* config: {
|
|
11
|
+
* root: 'px-2xl',
|
|
12
|
+
* }
|
|
13
|
+
* target: {
|
|
14
|
+
* prop: 'size',
|
|
15
|
+
* value: 'md',
|
|
16
|
+
* },
|
|
17
|
+
* component: 'button',
|
|
18
|
+
* })
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare function defineComponentVariant<TComponent extends keyof ComponentMap, TTargetProp extends keyof GetComponentProps<TComponent>, TTargetPropNewValue extends string>(customClassVariant: CustomClassVariant<TComponent, TTargetProp, TTargetPropNewValue>): CustomClassVariant<TComponent, TTargetProp, TTargetPropNewValue>;
|
|
22
|
+
export declare function getCustomComponentVariant<TComponent extends keyof ComponentMap>(component: TComponent, theme: string, props: GetComponentProps<TComponent>): {
|
|
23
|
+
[KSlot in keyof GetComponentSlots<TComponent>]: string;
|
|
24
|
+
};
|
|
25
|
+
export declare function mergeClasses(...strings: (string | null | undefined)[]): string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ComputedRef } from 'vue';
|
|
2
|
+
import { ResolvedClassConfig } from '../../class-variant/classVariant.type';
|
|
2
3
|
import { AvatarProps } from './avatar.props';
|
|
3
4
|
import { CreateAvatarStyle } from './avatar.style';
|
|
4
|
-
import { ClassConfig } from '../../customClassVariants';
|
|
5
5
|
import { PropsToComputed } from '../../utils/props.util';
|
|
6
6
|
interface AvatarContext extends PropsToComputed<AvatarProps> {
|
|
7
|
-
customClassConfig: ComputedRef<
|
|
7
|
+
customClassConfig: ComputedRef<ResolvedClassConfig<'avatar'>>;
|
|
8
8
|
style: ComputedRef<CreateAvatarStyle>;
|
|
9
9
|
}
|
|
10
10
|
export declare const useProvideAvatarContext: (context: AvatarContext) => AvatarContext, useInjectAvatarContext: <TFallback extends AvatarContext | null = AvatarContext>(fallback?: TFallback | undefined) => TFallback extends null ? AvatarContext | null : AvatarContext;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { CustomizableElement, GetComponentProp } from '../../class-variant/classVariant.type';
|
|
2
|
+
import { TestId } from '../../utils/props.util';
|
|
3
3
|
export interface AvatarProps extends TestId, CustomizableElement<'avatar'> {
|
|
4
4
|
/**
|
|
5
5
|
* The name of the user or entity represented by the avatar.
|
|
@@ -12,7 +12,7 @@ export interface AvatarProps extends TestId, CustomizableElement<'avatar'> {
|
|
|
12
12
|
*/
|
|
13
13
|
src?: string | null;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Defines the visual style of the avatar.
|
|
16
16
|
*/
|
|
17
|
-
variant?:
|
|
17
|
+
variant?: GetComponentProp<'avatar', 'variant'> | null;
|
|
18
18
|
}
|
|
@@ -9,7 +9,13 @@ declare function __VLS_template(): {
|
|
|
9
9
|
};
|
|
10
10
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
11
|
declare const __VLS_component: import('vue').DefineComponent<AvatarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AvatarProps> & Readonly<{}>, {
|
|
12
|
+
variant: null;
|
|
12
13
|
testId: string | null;
|
|
14
|
+
classConfig: {
|
|
15
|
+
fallback?: string | undefined;
|
|
16
|
+
image?: string | undefined;
|
|
17
|
+
root?: string | undefined;
|
|
18
|
+
} | null;
|
|
13
19
|
src: string | null;
|
|
14
20
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
21
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ComputedRef } from 'vue';
|
|
2
|
+
import { ResolvedClassConfig } from '../../../class-variant/classVariant.type';
|
|
2
3
|
import { ButtonProps } from './button.props';
|
|
3
4
|
import { CreateButtonStyle } from './button.style';
|
|
4
|
-
import { ClassConfig } from '../../../customClassVariants';
|
|
5
5
|
import { PropsToComputed } from '../../../utils/props.util';
|
|
6
6
|
interface ButtonContext extends PropsToComputed<ButtonProps> {
|
|
7
|
-
customClassConfig: ComputedRef<
|
|
7
|
+
customClassConfig: ComputedRef<ResolvedClassConfig<'button'>>;
|
|
8
8
|
style: ComputedRef<CreateButtonStyle>;
|
|
9
9
|
}
|
|
10
10
|
export declare const useProvideButtonContext: (context: ButtonContext) => ButtonContext, useInjectButtonContext: <TFallback extends ButtonContext | null = ButtonContext>(fallback?: TFallback | undefined) => TFallback extends null ? ButtonContext | null : ButtonContext;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
import { GetComponentProp } from '../../../class-variant/classVariant.type';
|
|
1
2
|
import { TextButtonProps } from '../shared/textButton.props';
|
|
2
3
|
export interface ButtonProps extends TextButtonProps {
|
|
4
|
+
/**
|
|
5
|
+
* Defines the button’s size.
|
|
6
|
+
* @default 'md'
|
|
7
|
+
*/
|
|
8
|
+
size?: GetComponentProp<'button', 'size'>;
|
|
9
|
+
/**
|
|
10
|
+
* Defines the visual style of the button.
|
|
11
|
+
* @default 'primary'
|
|
12
|
+
*/
|
|
13
|
+
variant?: GetComponentProp<'button', 'variant'>;
|
|
3
14
|
}
|
|
@@ -24,7 +24,13 @@ declare const __VLS_component: import('vue').DefineComponent<ButtonProps, {}, {}
|
|
|
24
24
|
isLoading: boolean;
|
|
25
25
|
testId: string | null;
|
|
26
26
|
isDisabled: boolean;
|
|
27
|
-
classConfig:
|
|
27
|
+
classConfig: {
|
|
28
|
+
root?: string | undefined;
|
|
29
|
+
content?: string | undefined;
|
|
30
|
+
iconLeft?: string | undefined;
|
|
31
|
+
iconRight?: string | undefined;
|
|
32
|
+
loader?: string | undefined;
|
|
33
|
+
} | null;
|
|
28
34
|
type: "button" | "reset" | "submit";
|
|
29
35
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
30
36
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ComputedRef } from 'vue';
|
|
2
|
+
import { ResolvedClassConfig } from '../../../class-variant/classVariant.type';
|
|
2
3
|
import { IconButtonProps } from './iconButton.props';
|
|
3
4
|
import { CreateIconButtonStyle } from './iconButton.style';
|
|
4
|
-
import { ClassConfig } from '../../../customClassVariants';
|
|
5
5
|
import { PropsToComputed } from '../../../utils/props.util';
|
|
6
6
|
interface IconButtonContext extends PropsToComputed<IconButtonProps> {
|
|
7
|
-
customClassConfig: ComputedRef<
|
|
7
|
+
customClassConfig: ComputedRef<ResolvedClassConfig<'iconButton'>>;
|
|
8
8
|
style: ComputedRef<CreateIconButtonStyle>;
|
|
9
9
|
}
|
|
10
10
|
export declare const useProvideIconButtonContext: (context: IconButtonContext) => IconButtonContext, useInjectIconButtonContext: <TFallback extends IconButtonContext | null = IconButtonContext>(fallback?: TFallback | undefined) => TFallback extends null ? IconButtonContext | null : IconButtonContext;
|