@hunter-industries/hunter-components 0.0.98 → 0.0.100
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/hunter-components.js +22 -39
- package/dist/hunter-components.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/dist/types/App.vue.d.ts.map +1 -1
- package/dist/types/assets/icons/index.d.ts.map +1 -1
- package/dist/types/components/Button/Button.vue.d.ts +40 -38
- package/dist/types/components/Button/Button.vue.d.ts.map +1 -1
- package/dist/types/components/Button/ButtonIcon.vue.d.ts +12 -9
- package/dist/types/components/Button/ButtonIcon.vue.d.ts.map +1 -1
- package/dist/types/components/Button/ButtonToast.vue.d.ts.map +1 -1
- package/dist/types/components/Card/Card.vue.d.ts.map +1 -1
- package/dist/types/components/Card/CategoryCard.vue.d.ts.map +1 -1
- package/dist/types/components/Chip/Chip.vue.d.ts +2 -2
- package/dist/types/components/Chip/Chip.vue.d.ts.map +1 -1
- package/dist/types/components/ColorIcon/ColorIcon.vue.d.ts.map +1 -1
- package/dist/types/components/Dropdown/Button/ButtonDropdown.vue.d.ts +14 -11
- package/dist/types/components/Dropdown/Button/ButtonDropdown.vue.d.ts.map +1 -1
- package/dist/types/components/Dropdown/Button/ButtonDropdownColors.vue.d.ts.map +1 -1
- package/dist/types/components/Dropdown/Dropdown.vue.d.ts.map +1 -1
- package/dist/types/components/Dropdown/DropdownColors.vue.d.ts.map +1 -1
- package/dist/types/components/Dropdown/DropdownList/DropdownList.vue.d.ts +5 -6
- package/dist/types/components/Dropdown/DropdownList/DropdownList.vue.d.ts.map +1 -1
- package/dist/types/components/Dropdown/DropdownList/DropdownListCheckboxes.vue.d.ts.map +1 -1
- package/dist/types/components/Dropdown/DropdownList/DropdownListWithColorIcons.vue.d.ts.map +1 -1
- package/dist/types/components/Dropdown/DropdownList/DropdownListWithFilter.vue.d.ts.map +1 -1
- package/dist/types/components/Form/FormInput.vue.d.ts.map +1 -1
- package/dist/types/components/Form/index.vue.d.ts +2 -2
- package/dist/types/components/Form/index.vue.d.ts.map +1 -1
- package/dist/types/components/Icon/Icon.vue.d.ts.map +1 -1
- package/dist/types/components/Image/ImageWithPlaceholder.vue.d.ts.map +1 -1
- package/dist/types/components/Input/Checkbox/Checkbox.vue.d.ts.map +1 -1
- package/dist/types/components/Link/Link.vue.d.ts +11 -8
- package/dist/types/components/Link/Link.vue.d.ts.map +1 -1
- package/dist/types/components/Navigation/NavigationLinks.vue.d.ts +11 -8
- package/dist/types/components/Navigation/NavigationLinks.vue.d.ts.map +1 -1
- package/dist/types/components/SearchInput/SearchInput.vue.d.ts.map +1 -1
- package/dist/types/components/Slider/Slider.vue.d.ts +4 -4
- package/dist/types/components/Slider/Slider.vue.d.ts.map +1 -1
- package/dist/types/components/Toast/Toast.vue.d.ts.map +1 -1
- package/dist/types/utils/convertValueToCssSizeProperty.d.ts.map +1 -1
- package/dist/types/utils/filterByString.d.ts.map +1 -1
- package/dist/types/utils/validateForm.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createElementBlock, openBlock, createElementVNode, createStaticVNode, defineComponent, toRefs, computed, ref, createBlock, createCommentVNode, resolveDynamicComponent, mergeProps, normalizeStyle, normalizeClass, renderSlot, toDisplayString, unref, createVNode, createTextVNode, watchEffect, withDirectives, vShow, withCtx, vModelCheckbox, Fragment, renderList, watch, onBeforeUnmount, withModifiers, onMounted, vModelRadio, pushScopeId, popScopeId, vModelText, useCssVars } from "vue";
|
|
2
2
|
const _hoisted_1$21 = {
|
|
3
3
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4
4
|
fill: "currentColor",
|
|
@@ -2281,17 +2281,13 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2281
2281
|
});
|
|
2282
2282
|
const iconProps = computed(() => {
|
|
2283
2283
|
const obj = {};
|
|
2284
|
-
if (props.fill)
|
|
2285
|
-
|
|
2286
|
-
if (props.
|
|
2287
|
-
obj.stroke = props.stroke;
|
|
2288
|
-
if (props.strokeWidth)
|
|
2289
|
-
obj.strokeWidth = props.strokeWidth.toString();
|
|
2284
|
+
if (props.fill) obj.fill = props.fill || "currentColor";
|
|
2285
|
+
if (props.stroke) obj.stroke = props.stroke;
|
|
2286
|
+
if (props.strokeWidth) obj.strokeWidth = props.strokeWidth.toString();
|
|
2290
2287
|
return obj;
|
|
2291
2288
|
});
|
|
2292
2289
|
const appendPxIfNeeded = (value) => {
|
|
2293
|
-
if (value == null)
|
|
2294
|
-
return void 0;
|
|
2290
|
+
if (value == null) return void 0;
|
|
2295
2291
|
const str = String(value);
|
|
2296
2292
|
return /\d+(px|em|rem|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/i.test(str) ? str : `${str}px`;
|
|
2297
2293
|
};
|
|
@@ -2301,8 +2297,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2301
2297
|
const icon = computed(() => icons[props.name]);
|
|
2302
2298
|
const iconClasses = computed(() => {
|
|
2303
2299
|
const classes = [props.className].flat();
|
|
2304
|
-
if (flipIcon.value)
|
|
2305
|
-
classes.push(`hcl-flip-icon ${flipIcon.value}`);
|
|
2300
|
+
if (flipIcon.value) classes.push(`hcl-flip-icon ${flipIcon.value}`);
|
|
2306
2301
|
return classes;
|
|
2307
2302
|
});
|
|
2308
2303
|
__expose({ hunterIcon });
|
|
@@ -2332,18 +2327,15 @@ const unitRegex = /(ch|em|rem|ex|px|cm|mm|in|pt|pc|vh|vw|vmin|vmax|svh|lvh|dvh|s
|
|
|
2332
2327
|
const keywordOrFuncRegex = /^(auto|min-content|max-content|fit-content\(.+\)|calc\(.+\)|clamp\(.+\)|min\(.+\)|max\(.+\)|var\(--[^)]+\))$/i;
|
|
2333
2328
|
const convertValueToCssSizeProperty = (value) => {
|
|
2334
2329
|
const w = value;
|
|
2335
|
-
if (w == null || w === "")
|
|
2336
|
-
return void 0;
|
|
2330
|
+
if (w == null || w === "") return void 0;
|
|
2337
2331
|
if (typeof w === "number" && Number.isFinite(w)) {
|
|
2338
2332
|
return `${w}px`;
|
|
2339
2333
|
}
|
|
2340
2334
|
if (typeof w === "string") {
|
|
2341
2335
|
const s = w.trim();
|
|
2342
|
-
if (keywordOrFuncRegex.test(s) || unitRegex.test(s))
|
|
2343
|
-
return s;
|
|
2336
|
+
if (keywordOrFuncRegex.test(s) || unitRegex.test(s)) return s;
|
|
2344
2337
|
const n = Number(s);
|
|
2345
|
-
if (Number.isFinite(n))
|
|
2346
|
-
return `${n}px`;
|
|
2338
|
+
if (Number.isFinite(n)) return `${n}px`;
|
|
2347
2339
|
}
|
|
2348
2340
|
return void 0;
|
|
2349
2341
|
};
|
|
@@ -2353,15 +2345,13 @@ const filterValuesContain = ({
|
|
|
2353
2345
|
key,
|
|
2354
2346
|
max
|
|
2355
2347
|
}) => {
|
|
2356
|
-
if (!query)
|
|
2357
|
-
return;
|
|
2348
|
+
if (!query) return;
|
|
2358
2349
|
query = query == null ? void 0 : query.toLowerCase();
|
|
2359
2350
|
let count = 0;
|
|
2360
2351
|
return options.filter((match) => {
|
|
2361
2352
|
const matchValue = match[key].toLowerCase();
|
|
2362
2353
|
if (matchValue.includes(query)) {
|
|
2363
|
-
if (!max)
|
|
2364
|
-
return match;
|
|
2354
|
+
if (!max) return match;
|
|
2365
2355
|
else if (max && count <= max - 1) {
|
|
2366
2356
|
count++;
|
|
2367
2357
|
return match;
|
|
@@ -2772,8 +2762,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
2772
2762
|
return isActive.value;
|
|
2773
2763
|
});
|
|
2774
2764
|
const handleSetActive = () => {
|
|
2775
|
-
if (props.keepActive === true)
|
|
2776
|
-
return;
|
|
2765
|
+
if (props.keepActive === true) return;
|
|
2777
2766
|
isActive.value = !isActive.value;
|
|
2778
2767
|
emit("updateIsActive", isActive.value, cardId.value);
|
|
2779
2768
|
};
|
|
@@ -2911,8 +2900,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
2911
2900
|
);
|
|
2912
2901
|
const resolvedMaxHeight = computed(() => props.listMaxHeight ?? 244);
|
|
2913
2902
|
const scrollStyle = computed(() => {
|
|
2914
|
-
if (!isScrollable.value)
|
|
2915
|
-
return void 0;
|
|
2903
|
+
if (!isScrollable.value) return void 0;
|
|
2916
2904
|
return {
|
|
2917
2905
|
maxHeight: `${resolvedMaxHeight.value}px`,
|
|
2918
2906
|
overflowY: "auto"
|
|
@@ -2997,8 +2985,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
2997
2985
|
if (visibleOptions.value.length === 0) {
|
|
2998
2986
|
isCollapsed.value = true;
|
|
2999
2987
|
return isCollapsed.value;
|
|
3000
|
-
} else
|
|
3001
|
-
isCollapsed.value = false;
|
|
2988
|
+
} else isCollapsed.value = false;
|
|
3002
2989
|
return;
|
|
3003
2990
|
} else {
|
|
3004
2991
|
isCollapsed.value = true;
|
|
@@ -3761,8 +3748,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3761
3748
|
);
|
|
3762
3749
|
const currentRoute = computed(() => props.activeLink);
|
|
3763
3750
|
onMounted(() => {
|
|
3764
|
-
if (!nuxtLinkContainer.value)
|
|
3765
|
-
return;
|
|
3751
|
+
if (!nuxtLinkContainer.value) return;
|
|
3766
3752
|
nuxtLinks.value = nuxtLinkContainer == null ? void 0 : nuxtLinkContainer.value.querySelectorAll("a");
|
|
3767
3753
|
nuxtLinks.value.forEach((el) => {
|
|
3768
3754
|
var _a;
|
|
@@ -3771,8 +3757,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3771
3757
|
});
|
|
3772
3758
|
});
|
|
3773
3759
|
watch(currentRoute, () => {
|
|
3774
|
-
if (!nuxtLinkContainer.value)
|
|
3775
|
-
return;
|
|
3760
|
+
if (!nuxtLinkContainer.value) return;
|
|
3776
3761
|
nuxtLinks.value && nuxtLinks.value.forEach((el) => {
|
|
3777
3762
|
var _a;
|
|
3778
3763
|
const { pathname } = new URL(el.href);
|
|
@@ -4072,10 +4057,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4072
4057
|
emits: ["change", "input"],
|
|
4073
4058
|
setup(__props, { emit: __emit }) {
|
|
4074
4059
|
useCssVars((_ctx) => ({
|
|
4075
|
-
"
|
|
4076
|
-
"
|
|
4077
|
-
"
|
|
4078
|
-
"
|
|
4060
|
+
"44700673": primaryColor,
|
|
4061
|
+
"7de4747e": secondaryColor,
|
|
4062
|
+
"3b5208c2": thumbColor,
|
|
4063
|
+
"a704c776": thumbSize
|
|
4079
4064
|
}));
|
|
4080
4065
|
const {
|
|
4081
4066
|
min,
|
|
@@ -4098,8 +4083,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4098
4083
|
);
|
|
4099
4084
|
function calcValue(val) {
|
|
4100
4085
|
const el = slider.value;
|
|
4101
|
-
if (!el)
|
|
4102
|
-
return;
|
|
4086
|
+
if (!el) return;
|
|
4103
4087
|
const hi = Number(el.max || maxN.value);
|
|
4104
4088
|
const lo = Number(el.min || minN.value);
|
|
4105
4089
|
const pct = (val - lo) / (hi - lo) * 100;
|
|
@@ -4107,7 +4091,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4107
4091
|
emit("input", val);
|
|
4108
4092
|
}
|
|
4109
4093
|
onMounted(() => {
|
|
4110
|
-
console.log("initial value", sliderValue.value);
|
|
4111
4094
|
calcValue(sliderValue.value);
|
|
4112
4095
|
});
|
|
4113
4096
|
return (_ctx, _cache) => {
|
|
@@ -4157,7 +4140,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4157
4140
|
};
|
|
4158
4141
|
}
|
|
4159
4142
|
});
|
|
4160
|
-
const Slider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4143
|
+
const Slider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-baa0db3c"]]);
|
|
4161
4144
|
export {
|
|
4162
4145
|
_sfc_main$l as HunterButton,
|
|
4163
4146
|
ButtonIcon as HunterButtonIcon,
|