@hunter-industries/hunter-components 0.0.82 → 0.0.85
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 +70 -37
- package/dist/hunter-components.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/Button/Button.vue.d.ts +6 -2
- package/dist/types/components/Button/Button.vue.d.ts.map +1 -1
- package/dist/types/components/Card/Card.vue.d.ts.map +1 -1
- 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/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types/ui.d.ts +5 -1
- package/dist/types/types/ui.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2188,7 +2188,8 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2188
2188
|
fill: {},
|
|
2189
2189
|
stroke: {},
|
|
2190
2190
|
strokeWidth: {},
|
|
2191
|
-
flipIcon: {}
|
|
2191
|
+
flipIcon: {},
|
|
2192
|
+
aspectSquare: { type: Boolean }
|
|
2192
2193
|
},
|
|
2193
2194
|
setup(__props, { expose: __expose }) {
|
|
2194
2195
|
const props = __props;
|
|
@@ -2222,7 +2223,11 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2222
2223
|
});
|
|
2223
2224
|
return (_ctx, _cache) => {
|
|
2224
2225
|
return icon.value ? (openBlock(), createBlock(resolveDynamicComponent(icon.value), mergeProps({ key: 0 }, iconProps.value, {
|
|
2225
|
-
class: ["hcl-icon", [
|
|
2226
|
+
class: ["hcl-icon", [
|
|
2227
|
+
iconClasses.value,
|
|
2228
|
+
iconSizeClass.value,
|
|
2229
|
+
{ "hcl-aspect-square": _ctx.aspectSquare === true }
|
|
2230
|
+
]],
|
|
2226
2231
|
style: { width: _ctx.width, height: _ctx.height },
|
|
2227
2232
|
ref_key: "hunterIcon",
|
|
2228
2233
|
ref: hunterIcon
|
|
@@ -2237,7 +2242,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
2237
2242
|
}
|
|
2238
2243
|
return target;
|
|
2239
2244
|
};
|
|
2240
|
-
const Icon = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-
|
|
2245
|
+
const Icon = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-0196d45f"]]);
|
|
2241
2246
|
const unitRegex = /(ch|em|rem|ex|px|cm|mm|in|pt|pc|vh|vw|vmin|vmax|svh|lvh|dvh|svw|lvw|dvw|%)$/i;
|
|
2242
2247
|
const keywordOrFuncRegex = /^(auto|min-content|max-content|fit-content\(.+\)|calc\(.+\)|clamp\(.+\)|min\(.+\)|max\(.+\)|var\(--[^)]+\))$/i;
|
|
2243
2248
|
const convertValueToCssSizeProperty = (value) => {
|
|
@@ -2342,11 +2347,13 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2342
2347
|
height: {},
|
|
2343
2348
|
type: {},
|
|
2344
2349
|
useSlot: { type: Boolean },
|
|
2345
|
-
flipIcon: {}
|
|
2350
|
+
flipIcon: {},
|
|
2351
|
+
iconButtonShape: {},
|
|
2352
|
+
hasShadow: { type: Boolean }
|
|
2346
2353
|
},
|
|
2347
2354
|
setup(__props, { expose: __expose }) {
|
|
2348
2355
|
const props = __props;
|
|
2349
|
-
const { iconClass, status, iconPosition } = toRefs(props);
|
|
2356
|
+
const { iconClass, status, iconPosition, iconSize } = toRefs(props);
|
|
2350
2357
|
const buttonIcon = ref();
|
|
2351
2358
|
const isHovered = ref(false);
|
|
2352
2359
|
const baseLabel = computed(() => {
|
|
@@ -2380,12 +2387,31 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2380
2387
|
const buttonHeight = computed(
|
|
2381
2388
|
() => convertValueToCssSizeProperty(props.height)
|
|
2382
2389
|
);
|
|
2390
|
+
const isIconButton = computed(() => {
|
|
2391
|
+
var _a;
|
|
2392
|
+
return (_a = props.variant) == null ? void 0 : _a.includes("icon");
|
|
2393
|
+
});
|
|
2394
|
+
const buttonVariant = computed(() => {
|
|
2395
|
+
const v = props.variant;
|
|
2396
|
+
if (isIconButton.value === true && v) {
|
|
2397
|
+
return v.split("-")[1] || "icon_default";
|
|
2398
|
+
}
|
|
2399
|
+
return v || "primary";
|
|
2400
|
+
});
|
|
2383
2401
|
const buttonClasses = computed(() => {
|
|
2384
|
-
const defaultClass = `hunter-button_${
|
|
2402
|
+
const defaultClass = buttonVariant.value && `hunter-button_${buttonVariant.value}`;
|
|
2385
2403
|
const statusClass = props.useStatusStyles === true && status.value !== "idle" && !props.disabled ? `hunter-button_${status.value}` : void 0;
|
|
2386
2404
|
const flipClass = props.icon && iconPosition.value === "left" ? "hunter-button_flip-icon-position" : void 0;
|
|
2387
2405
|
const ellipsisClass = props.animatePendingEllipsis === true && status.value === "pending" ? "hunter-button_animate-ellipsis" : void 0;
|
|
2388
|
-
|
|
2406
|
+
const iconSizeClass = isIconButton.value === true ? `hcl-icon-size_${(iconSize == null ? void 0 : iconSize.value) || "default"}` : void 0;
|
|
2407
|
+
const classes = [
|
|
2408
|
+
defaultClass,
|
|
2409
|
+
statusClass,
|
|
2410
|
+
flipClass,
|
|
2411
|
+
ellipsisClass,
|
|
2412
|
+
iconSizeClass
|
|
2413
|
+
].filter(Boolean);
|
|
2414
|
+
return classes;
|
|
2389
2415
|
});
|
|
2390
2416
|
const buttonEl = ref(null);
|
|
2391
2417
|
const buttonSpan = ref(null);
|
|
@@ -2399,7 +2425,16 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2399
2425
|
return openBlock(), createElementBlock("button", {
|
|
2400
2426
|
ref_key: "buttonEl",
|
|
2401
2427
|
ref: buttonEl,
|
|
2402
|
-
class: normalizeClass(["hunter-component hunter-button", [
|
|
2428
|
+
class: normalizeClass(["hunter-component hunter-button", [
|
|
2429
|
+
_ctx.className,
|
|
2430
|
+
...buttonClasses.value,
|
|
2431
|
+
{
|
|
2432
|
+
disabled: _ctx.disabled,
|
|
2433
|
+
"hunter-button_icon_circle": _ctx.iconButtonShape === "circle",
|
|
2434
|
+
"with-shadow": _ctx.hasShadow,
|
|
2435
|
+
"hunter-button_icon": isIconButton.value
|
|
2436
|
+
}
|
|
2437
|
+
]]),
|
|
2403
2438
|
style: normalizeStyle({
|
|
2404
2439
|
width: buttonWidth.value,
|
|
2405
2440
|
height: buttonHeight.value,
|
|
@@ -2411,25 +2446,22 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2411
2446
|
onMouseover: _cache[0] || (_cache[0] = ($event) => isHovered.value = true),
|
|
2412
2447
|
onMouseleave: _cache[1] || (_cache[1] = ($event) => isHovered.value = false)
|
|
2413
2448
|
}, [
|
|
2414
|
-
|
|
2449
|
+
!isIconButton.value && !_ctx.useSlot ? (openBlock(), createElementBlock("span", {
|
|
2415
2450
|
key: 0,
|
|
2416
2451
|
class: "hunter-button__label",
|
|
2417
2452
|
ref_key: "buttonSpan",
|
|
2418
2453
|
ref: buttonSpan
|
|
2419
2454
|
}, toDisplayString(displayText.value), 513)) : createCommentVNode("", true),
|
|
2420
|
-
|
|
2455
|
+
!isIconButton.value && _ctx.useSlot === true ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("", true),
|
|
2421
2456
|
_ctx.icon ? (openBlock(), createBlock(Icon, {
|
|
2422
2457
|
key: 2,
|
|
2423
2458
|
ref_key: "buttonIcon",
|
|
2424
2459
|
ref: buttonIcon,
|
|
2425
2460
|
name: _ctx.icon,
|
|
2426
|
-
size:
|
|
2427
|
-
class: normalizeClass([
|
|
2428
|
-
{
|
|
2429
|
-
"hunter-button_icon": _ctx.variant === "icon"
|
|
2430
|
-
},
|
|
2461
|
+
size: unref(iconSize) || "default",
|
|
2462
|
+
class: normalizeClass(["hunter-button__icon", [
|
|
2431
2463
|
isHovered.value === true && _ctx.iconHoverClass ? [_ctx.iconHoverClass].flat().join(" ") : ""
|
|
2432
|
-
]),
|
|
2464
|
+
]]),
|
|
2433
2465
|
flipIcon: _ctx.flipIcon,
|
|
2434
2466
|
className: unref(iconClass),
|
|
2435
2467
|
width: _ctx.iconWidth,
|
|
@@ -2442,7 +2474,6 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2442
2474
|
};
|
|
2443
2475
|
}
|
|
2444
2476
|
});
|
|
2445
|
-
const Button = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-d65b8412"]]);
|
|
2446
2477
|
const _hoisted_1$b = ["id"];
|
|
2447
2478
|
const _hoisted_2$9 = { key: 0 };
|
|
2448
2479
|
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
@@ -2558,7 +2589,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
2558
2589
|
var _a;
|
|
2559
2590
|
return openBlock(), createElementBlock("div", {
|
|
2560
2591
|
class: normalizeClass(["hunter-component hc__card", {
|
|
2561
|
-
|
|
2592
|
+
horizontal: _ctx.variant === "horizontal",
|
|
2562
2593
|
"selected-card": isActive.value === true
|
|
2563
2594
|
}]),
|
|
2564
2595
|
id: cardId.value
|
|
@@ -2589,19 +2620,18 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
2589
2620
|
createElementVNode("div", _hoisted_7, toDisplayString(_ctx.description), 1)
|
|
2590
2621
|
]),
|
|
2591
2622
|
!_ctx.hideToggleButton ? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
2592
|
-
withDirectives(createVNode(unref(
|
|
2593
|
-
variant: "icon",
|
|
2623
|
+
withDirectives(createVNode(unref(_sfc_main$k), {
|
|
2624
|
+
variant: "icon-primary",
|
|
2625
|
+
"icon-button-shape": "circle",
|
|
2594
2626
|
icon: "add",
|
|
2595
|
-
class: "hc__card__buttons__button_add",
|
|
2596
2627
|
onClick: handleSetActive
|
|
2597
2628
|
}, null, 512), [
|
|
2598
2629
|
[vShow, !isActive.value]
|
|
2599
2630
|
]),
|
|
2600
|
-
withDirectives(createVNode(unref(
|
|
2601
|
-
variant: "icon",
|
|
2631
|
+
withDirectives(createVNode(unref(_sfc_main$k), {
|
|
2632
|
+
variant: "icon-primary",
|
|
2633
|
+
"icon-button-shape": "circle",
|
|
2602
2634
|
icon: "delete",
|
|
2603
|
-
class: "hc__card__buttons__button_delete",
|
|
2604
|
-
iconClass: "delete-button-icon",
|
|
2605
2635
|
onClick: handleSetActive
|
|
2606
2636
|
}, null, 512), [
|
|
2607
2637
|
[vShow, isActive.value]
|
|
@@ -3014,13 +3044,15 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3014
3044
|
height: {},
|
|
3015
3045
|
type: {},
|
|
3016
3046
|
useSlot: { type: Boolean },
|
|
3017
|
-
flipIcon: {}
|
|
3047
|
+
flipIcon: {},
|
|
3048
|
+
iconButtonShape: {},
|
|
3049
|
+
hasShadow: { type: Boolean }
|
|
3018
3050
|
},
|
|
3019
3051
|
setup(__props) {
|
|
3020
3052
|
const props = __props;
|
|
3021
3053
|
const { collapsed } = toRefs(props);
|
|
3022
3054
|
return (_ctx, _cache) => {
|
|
3023
|
-
return openBlock(), createBlock(
|
|
3055
|
+
return openBlock(), createBlock(_sfc_main$k, mergeProps(props, {
|
|
3024
3056
|
class: ["hunter-button_dropdown", {
|
|
3025
3057
|
disabled: _ctx.disabled
|
|
3026
3058
|
}],
|
|
@@ -3195,7 +3227,9 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3195
3227
|
height: {},
|
|
3196
3228
|
type: {},
|
|
3197
3229
|
useSlot: { type: Boolean },
|
|
3198
|
-
flipIcon: {}
|
|
3230
|
+
flipIcon: {},
|
|
3231
|
+
iconButtonShape: {},
|
|
3232
|
+
hasShadow: { type: Boolean }
|
|
3199
3233
|
},
|
|
3200
3234
|
setup(__props) {
|
|
3201
3235
|
const props = __props;
|
|
@@ -3383,7 +3417,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3383
3417
|
}
|
|
3384
3418
|
});
|
|
3385
3419
|
const FormInput = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-7719e3d0"]]);
|
|
3386
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
3420
|
+
const _withScopeId = (n) => (pushScopeId("data-v-d49ef131"), n = n(), popScopeId(), n);
|
|
3387
3421
|
const _hoisted_1$3 = { class: "unit-selection-container" };
|
|
3388
3422
|
const _hoisted_2$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", { class: "font-medium" }, "Units", -1));
|
|
3389
3423
|
const _hoisted_3$1 = { class: "unit-selection" };
|
|
@@ -3460,7 +3494,6 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3460
3494
|
},
|
|
3461
3495
|
...formInputs.value
|
|
3462
3496
|
];
|
|
3463
|
-
console.log("STAT", status.value, isValid);
|
|
3464
3497
|
emit("submitForm", { inputs: data, status: status.value, isValid });
|
|
3465
3498
|
if (!isValid) {
|
|
3466
3499
|
formInputs.value.forEach((input) => {
|
|
@@ -3587,14 +3620,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3587
3620
|
])
|
|
3588
3621
|
]),
|
|
3589
3622
|
createElementVNode("div", _hoisted_6, [
|
|
3590
|
-
createVNode(
|
|
3623
|
+
createVNode(_sfc_main$k, mergeProps(unref(cancelButtonProps), {
|
|
3591
3624
|
variant: "tertiary",
|
|
3592
3625
|
className: "form-button",
|
|
3593
3626
|
text: _ctx.cancelButtonText,
|
|
3594
3627
|
disabled: status.value === "pending" || status.value === "success",
|
|
3595
3628
|
onClick: handleCancelFormClick
|
|
3596
3629
|
}), null, 16, ["text", "disabled"]),
|
|
3597
|
-
createVNode(
|
|
3630
|
+
createVNode(_sfc_main$k, mergeProps({
|
|
3598
3631
|
class: ["form-button form-button_submit", {
|
|
3599
3632
|
"form-button_pointer-events-none": status.value === "success" && unref(successSubmitButtonDisabled) === true
|
|
3600
3633
|
}]
|
|
@@ -3608,7 +3641,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3608
3641
|
};
|
|
3609
3642
|
}
|
|
3610
3643
|
});
|
|
3611
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
3644
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-d49ef131"]]);
|
|
3612
3645
|
const _hoisted_1$2 = ["href"];
|
|
3613
3646
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
3614
3647
|
__name: "Link",
|
|
@@ -3745,7 +3778,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3745
3778
|
variant: _ctx.variant === "light" ? "light" : "dark",
|
|
3746
3779
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("button-click", informationEl.value))
|
|
3747
3780
|
}, null, 8, ["text", "type", "variant"])) : createCommentVNode("", true),
|
|
3748
|
-
_ctx.buttonType === "close" ? (openBlock(), createBlock(
|
|
3781
|
+
_ctx.buttonType === "close" ? (openBlock(), createBlock(_sfc_main$k, {
|
|
3749
3782
|
key: 1,
|
|
3750
3783
|
variant: "icon",
|
|
3751
3784
|
onClick: _cache[1] || (_cache[1] = ($event) => emit("close", informationEl.value)),
|
|
@@ -3912,7 +3945,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3912
3945
|
class: "hunter-search-input-dropdown",
|
|
3913
3946
|
onSelectOption: _cache[3] || (_cache[3] = (value) => handleSelectedOption(value))
|
|
3914
3947
|
}, null, 8, ["options", "option-key", "collapsed", "filter-value"]),
|
|
3915
|
-
!_ctx.hideSearchButton ? (openBlock(), createBlock(
|
|
3948
|
+
!_ctx.hideSearchButton ? (openBlock(), createBlock(_sfc_main$k, {
|
|
3916
3949
|
key: 0,
|
|
3917
3950
|
ref_key: "searchButtonEl",
|
|
3918
3951
|
ref: searchButtonEl,
|
|
@@ -3925,7 +3958,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3925
3958
|
}, null, 8, ["icon-fill"])) : createCommentVNode("", true)
|
|
3926
3959
|
], 4),
|
|
3927
3960
|
!_ctx.hideClearButton ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
3928
|
-
createVNode(
|
|
3961
|
+
createVNode(_sfc_main$k, {
|
|
3929
3962
|
class: "underline clear-button",
|
|
3930
3963
|
variant: "link",
|
|
3931
3964
|
text: "Clear",
|
|
@@ -3938,7 +3971,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3938
3971
|
});
|
|
3939
3972
|
const SearchInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-603385ac"]]);
|
|
3940
3973
|
export {
|
|
3941
|
-
|
|
3974
|
+
_sfc_main$k as HunterButton,
|
|
3942
3975
|
ButtonIcon as HunterButtonIcon,
|
|
3943
3976
|
_sfc_main$i as HunterButtonToast,
|
|
3944
3977
|
_sfc_main$h as HunterCard,
|