@hunter-industries/hunter-components 0.0.80 → 0.0.82

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.
@@ -1,4 +1,4 @@
1
- import { openBlock, createElementBlock, createElementVNode, createStaticVNode, defineComponent, computed, ref, createBlock, resolveDynamicComponent, normalizeClass, normalizeStyle, createCommentVNode, toRefs, toDisplayString, createVNode, createTextVNode, renderSlot, watchEffect, unref, withDirectives, vShow, withCtx, vModelCheckbox, Fragment, renderList, watch, onBeforeUnmount, mergeProps, onMounted, withModifiers, vModelRadio, pushScopeId, popScopeId, vModelText } from "vue";
1
+ import { openBlock, createElementBlock, createElementVNode, createStaticVNode, defineComponent, toRefs, computed, ref, createBlock, resolveDynamicComponent, mergeProps, createCommentVNode, normalizeClass, normalizeStyle, toDisplayString, renderSlot, unref, createVNode, createTextVNode, watchEffect, withDirectives, vShow, withCtx, vModelCheckbox, Fragment, renderList, watch, onBeforeUnmount, withModifiers, onMounted, vModelRadio, pushScopeId, popScopeId, vModelText } from "vue";
2
2
  const _hoisted_1$1X = {
3
3
  xmlns: "http://www.w3.org/2000/svg",
4
4
  fill: "currentColor",
@@ -1519,7 +1519,7 @@ const _hoisted_3$u = [
1519
1519
  function render$m(_ctx, _cache) {
1520
1520
  return openBlock(), createElementBlock("svg", _hoisted_1$z, [..._hoisted_3$u]);
1521
1521
  }
1522
- const SearchIcon = { render: render$m };
1522
+ const __vite_glob_0_88 = { render: render$m };
1523
1523
  const _hoisted_1$y = {
1524
1524
  xmlns: "http://www.w3.org/2000/svg",
1525
1525
  fill: "currentColor",
@@ -2032,7 +2032,7 @@ const componentFiles = /* @__PURE__ */ Object.assign({
2032
2032
  "./rotate-double-arrow.svg": __vite_glob_0_85,
2033
2033
  "./ruler.svg": __vite_glob_0_86,
2034
2034
  "./scale.svg": __vite_glob_0_87,
2035
- "./search.svg": SearchIcon,
2035
+ "./search.svg": __vite_glob_0_88,
2036
2036
  "./share.svg": __vite_glob_0_89,
2037
2037
  "./square-outline.svg": __vite_glob_0_90,
2038
2038
  "./square.svg": __vite_glob_0_91,
@@ -2177,39 +2177,56 @@ const hunterIconSvgs = Object.fromEntries(
2177
2177
  Object.entries(rawFiles).map(([p, svg]) => [toName(p), svg])
2178
2178
  );
2179
2179
  const icons = hunterIconComponents;
2180
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
2180
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
2181
2181
  __name: "Icon",
2182
2182
  props: {
2183
2183
  name: {},
2184
2184
  className: {},
2185
2185
  width: {},
2186
2186
  height: {},
2187
- size: {}
2187
+ size: {},
2188
+ fill: {},
2189
+ stroke: {},
2190
+ strokeWidth: {},
2191
+ flipIcon: {}
2188
2192
  },
2189
2193
  setup(__props, { expose: __expose }) {
2190
2194
  const props = __props;
2195
+ const { flipIcon } = toRefs(props);
2191
2196
  const iconSizeClass = computed(() => {
2192
2197
  if (props.size) {
2193
2198
  return `hcl-icon_size-${props.size}`;
2194
2199
  }
2195
2200
  });
2201
+ const iconProps = computed(() => {
2202
+ let obj = {};
2203
+ if (props.fill)
2204
+ obj.fill = props.fill || "currentColor";
2205
+ if (props.stroke)
2206
+ obj.stroke = props.stroke;
2207
+ if (props.strokeWidth)
2208
+ obj.strokeWidth = props.strokeWidth;
2209
+ return obj;
2210
+ });
2196
2211
  const hunterIcon = ref();
2197
2212
  const icon = computed(() => icons[props.name]);
2198
- const iconClasses = computed(
2199
- () => Array.isArray(props.className) ? [...props.className] : props.className
2200
- );
2201
- console.log("NAME", props.className);
2213
+ const iconClasses = computed(() => {
2214
+ let classes = [props.className].flat();
2215
+ if (flipIcon.value) {
2216
+ classes.push(`hcl-flip-icon ${flipIcon.value}`);
2217
+ }
2218
+ return classes;
2219
+ });
2202
2220
  __expose({
2203
2221
  hunterIcon
2204
2222
  });
2205
2223
  return (_ctx, _cache) => {
2206
- return icon.value ? (openBlock(), createBlock(resolveDynamicComponent(icon.value), {
2207
- key: 0,
2208
- class: normalizeClass(["hcl-icon", [iconClasses.value, iconSizeClass.value]]),
2209
- style: normalizeStyle({ width: _ctx.width, height: _ctx.height }),
2224
+ return icon.value ? (openBlock(), createBlock(resolveDynamicComponent(icon.value), mergeProps({ key: 0 }, iconProps.value, {
2225
+ class: ["hcl-icon", [iconClasses.value, iconSizeClass.value, {}]],
2226
+ style: { width: _ctx.width, height: _ctx.height },
2210
2227
  ref_key: "hunterIcon",
2211
2228
  ref: hunterIcon
2212
- }, null, 8, ["class", "style"])) : createCommentVNode("", true);
2229
+ }), null, 16, ["class", "style"])) : createCommentVNode("", true);
2213
2230
  };
2214
2231
  }
2215
2232
  });
@@ -2220,7 +2237,7 @@ const _export_sfc = (sfc, props) => {
2220
2237
  }
2221
2238
  return target;
2222
2239
  };
2223
- const Icon = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-e8d96df5"]]);
2240
+ const Icon = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-b1857077"]]);
2224
2241
  const unitRegex = /(ch|em|rem|ex|px|cm|mm|in|pt|pc|vh|vw|vmin|vmax|svh|lvh|dvh|svw|lvw|dvw|%)$/i;
2225
2242
  const keywordOrFuncRegex = /^(auto|min-content|max-content|fit-content\(.+\)|calc\(.+\)|clamp\(.+\)|min\(.+\)|max\(.+\)|var\(--[^)]+\))$/i;
2226
2243
  const convertValueToCssSizeProperty = (value) => {
@@ -2289,7 +2306,7 @@ const validateForm = (inputs) => {
2289
2306
  return { inputs, isValid };
2290
2307
  };
2291
2308
  const _hoisted_1$c = ["id", "aria-disabled", "type"];
2292
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
2309
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
2293
2310
  __name: "Button",
2294
2311
  props: {
2295
2312
  variant: {},
@@ -2313,6 +2330,9 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
2313
2330
  iconWidth: {},
2314
2331
  iconHeight: {},
2315
2332
  iconSize: {},
2333
+ iconFill: {},
2334
+ iconStroke: {},
2335
+ iconStrokeWidth: {},
2316
2336
  style: {},
2317
2337
  status: {},
2318
2338
  useStatusStyles: { type: Boolean },
@@ -2320,7 +2340,9 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
2320
2340
  animatePendingEllipsis: { type: Boolean },
2321
2341
  width: {},
2322
2342
  height: {},
2323
- type: {}
2343
+ type: {},
2344
+ useSlot: { type: Boolean },
2345
+ flipIcon: {}
2324
2346
  },
2325
2347
  setup(__props, { expose: __expose }) {
2326
2348
  const props = __props;
@@ -2359,15 +2381,12 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
2359
2381
  () => convertValueToCssSizeProperty(props.height)
2360
2382
  );
2361
2383
  const buttonClasses = computed(() => {
2362
- const defaultClass = `hunter-button-${props.variant ? props.variant : "primary"}`;
2384
+ const defaultClass = `hunter-button_${props.variant ? props.variant : "primary"}`;
2363
2385
  const statusClass = props.useStatusStyles === true && status.value !== "idle" && !props.disabled ? `hunter-button_${status.value}` : void 0;
2364
2386
  const flipClass = props.icon && iconPosition.value === "left" ? "hunter-button_flip-icon-position" : void 0;
2365
2387
  const ellipsisClass = props.animatePendingEllipsis === true && status.value === "pending" ? "hunter-button_animate-ellipsis" : void 0;
2366
2388
  return [defaultClass, statusClass, flipClass, ellipsisClass].filter(Boolean);
2367
2389
  });
2368
- const customIconClasses = computed(
2369
- () => [iconClass.value].flat().filter(Boolean).join(" ")
2370
- );
2371
2390
  const buttonEl = ref(null);
2372
2391
  const buttonSpan = ref(null);
2373
2392
  __expose({
@@ -2392,34 +2411,41 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
2392
2411
  onMouseover: _cache[0] || (_cache[0] = ($event) => isHovered.value = true),
2393
2412
  onMouseleave: _cache[1] || (_cache[1] = ($event) => isHovered.value = false)
2394
2413
  }, [
2395
- _ctx.variant !== "icon" ? (openBlock(), createElementBlock("span", {
2414
+ _ctx.variant !== "icon" && !_ctx.useSlot ? (openBlock(), createElementBlock("span", {
2396
2415
  key: 0,
2397
2416
  class: "hunter-button__label",
2398
2417
  ref_key: "buttonSpan",
2399
2418
  ref: buttonSpan
2400
2419
  }, toDisplayString(displayText.value), 513)) : createCommentVNode("", true),
2420
+ _ctx.variant !== "icon" && _ctx.useSlot === true ? renderSlot(_ctx.$slots, "default", { key: 1 }, void 0, true) : createCommentVNode("", true),
2401
2421
  _ctx.icon ? (openBlock(), createBlock(Icon, {
2402
- key: 1,
2422
+ key: 2,
2403
2423
  ref_key: "buttonIcon",
2404
2424
  ref: buttonIcon,
2405
2425
  name: _ctx.icon,
2406
2426
  size: _ctx.iconSize || "default",
2407
- class: normalizeClass([{ "hunter-button-icon": _ctx.variant === "icon" }]),
2408
- className: [
2409
- customIconClasses.value,
2427
+ class: normalizeClass([
2428
+ {
2429
+ "hunter-button_icon": _ctx.variant === "icon"
2430
+ },
2410
2431
  isHovered.value === true && _ctx.iconHoverClass ? [_ctx.iconHoverClass].flat().join(" ") : ""
2411
- ],
2432
+ ]),
2433
+ flipIcon: _ctx.flipIcon,
2434
+ className: unref(iconClass),
2412
2435
  width: _ctx.iconWidth,
2413
- height: _ctx.iconHeight
2414
- }, null, 8, ["name", "size", "class", "className", "width", "height"])) : createCommentVNode("", true)
2436
+ height: _ctx.iconHeight,
2437
+ fill: _ctx.iconFill,
2438
+ stroke: _ctx.iconStroke,
2439
+ strokeWidth: _ctx.iconStrokeWidth
2440
+ }, null, 8, ["name", "size", "class", "flipIcon", "className", "width", "height", "fill", "stroke", "strokeWidth"])) : createCommentVNode("", true)
2415
2441
  ], 46, _hoisted_1$c);
2416
2442
  };
2417
2443
  }
2418
2444
  });
2419
- const Button = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-6412df83"]]);
2445
+ const Button = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-d65b8412"]]);
2420
2446
  const _hoisted_1$b = ["id"];
2421
2447
  const _hoisted_2$9 = { key: 0 };
2422
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
2448
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
2423
2449
  __name: "ButtonIcon",
2424
2450
  props: {
2425
2451
  variant: {},
@@ -2459,8 +2485,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
2459
2485
  };
2460
2486
  }
2461
2487
  });
2462
- const ButtonIcon = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-cfb871ee"]]);
2463
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
2488
+ const ButtonIcon = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-cfb871ee"]]);
2489
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
2464
2490
  __name: "ButtonToast",
2465
2491
  props: {
2466
2492
  text: {},
@@ -2496,7 +2522,7 @@ const _hoisted_8 = {
2496
2522
  key: 0,
2497
2523
  class: "hc__card__buttons"
2498
2524
  };
2499
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
2525
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
2500
2526
  __name: "Card",
2501
2527
  props: {
2502
2528
  title: {},
@@ -2593,7 +2619,7 @@ const _hoisted_2$7 = {
2593
2619
  };
2594
2620
  const _hoisted_3$6 = ["src", "alt"];
2595
2621
  const _hoisted_4$5 = { class: "hc__category-card__title" };
2596
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
2622
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2597
2623
  __name: "CategoryCard",
2598
2624
  props: {
2599
2625
  title: {},
@@ -2668,7 +2694,7 @@ const _hoisted_5$2 = {
2668
2694
  key: 0,
2669
2695
  class: "hunter-checkbox-note-span"
2670
2696
  };
2671
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
2697
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2672
2698
  __name: "Checkbox",
2673
2699
  props: {
2674
2700
  label: {},
@@ -2700,9 +2726,9 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2700
2726
  };
2701
2727
  }
2702
2728
  });
2703
- const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-75265500"]]);
2729
+ const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-75265500"]]);
2704
2730
  const _hoisted_1$7 = { class: "text" };
2705
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
2731
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2706
2732
  __name: "Chip",
2707
2733
  props: {
2708
2734
  text: {},
@@ -2731,12 +2757,12 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2731
2757
  };
2732
2758
  }
2733
2759
  });
2734
- const Chip = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-3d21af5d"]]);
2760
+ const Chip = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-3d21af5d"]]);
2735
2761
  const _hoisted_1$6 = ["id", "aria-hidden"];
2736
2762
  const _hoisted_2$5 = { class: "dropdown-wrapper" };
2737
2763
  const _hoisted_3$4 = ["value", "onClick"];
2738
2764
  const _hoisted_4$3 = { class: "hunter-search-input-option-li" };
2739
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
2765
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2740
2766
  __name: "DropdownList",
2741
2767
  props: {
2742
2768
  options: {},
@@ -2801,8 +2827,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2801
2827
  };
2802
2828
  }
2803
2829
  });
2804
- const DropdownList = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-f18bb4ff"]]);
2805
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
2830
+ const DropdownList = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-f18bb4ff"]]);
2831
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2806
2832
  __name: "DropdownListWithFilter",
2807
2833
  props: {
2808
2834
  filterValue: {},
@@ -2860,7 +2886,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2860
2886
  };
2861
2887
  }
2862
2888
  });
2863
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2889
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2864
2890
  __name: "ColorIcon",
2865
2891
  props: {
2866
2892
  color: {},
@@ -2891,11 +2917,11 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2891
2917
  };
2892
2918
  }
2893
2919
  });
2894
- const ColorIcon = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-3e170770"]]);
2920
+ const ColorIcon = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-3e170770"]]);
2895
2921
  const _hoisted_1$5 = ["id", "aria-hidden"];
2896
2922
  const _hoisted_2$4 = { class: "dropdown-wrapper" };
2897
2923
  const _hoisted_3$3 = ["value", "onClick"];
2898
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2924
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2899
2925
  __name: "DropdownListWithColorIcons",
2900
2926
  props: {
2901
2927
  colors: {},
@@ -2950,8 +2976,72 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2950
2976
  };
2951
2977
  }
2952
2978
  });
2953
- const DropdownListWithColorIcons = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-908a37e0"]]);
2954
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2979
+ const DropdownListWithColorIcons = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-908a37e0"]]);
2980
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2981
+ __name: "ButtonDropdown",
2982
+ props: {
2983
+ collapsed: { type: Boolean },
2984
+ variant: {},
2985
+ disabled: { type: Boolean },
2986
+ className: {},
2987
+ iconClass: {},
2988
+ iconHoverClass: {},
2989
+ iconPendingClass: {},
2990
+ iconSuccessClass: {},
2991
+ iconErrorClass: {},
2992
+ id: {},
2993
+ text: {},
2994
+ pendingText: {},
2995
+ successText: {},
2996
+ errorText: {},
2997
+ icon: {},
2998
+ pendingIcon: {},
2999
+ successIcon: {},
3000
+ errorIcon: {},
3001
+ iconPosition: {},
3002
+ iconWidth: {},
3003
+ iconHeight: {},
3004
+ iconSize: {},
3005
+ iconFill: {},
3006
+ iconStroke: {},
3007
+ iconStrokeWidth: {},
3008
+ style: {},
3009
+ status: {},
3010
+ useStatusStyles: { type: Boolean },
3011
+ maintainButtonSize: { type: Boolean },
3012
+ animatePendingEllipsis: { type: Boolean },
3013
+ width: {},
3014
+ height: {},
3015
+ type: {},
3016
+ useSlot: { type: Boolean },
3017
+ flipIcon: {}
3018
+ },
3019
+ setup(__props) {
3020
+ const props = __props;
3021
+ const { collapsed } = toRefs(props);
3022
+ return (_ctx, _cache) => {
3023
+ return openBlock(), createBlock(Button, mergeProps(props, {
3024
+ class: ["hunter-button_dropdown", {
3025
+ disabled: _ctx.disabled
3026
+ }],
3027
+ icon: "caret-down",
3028
+ "icon-class": _ctx.iconClass,
3029
+ "flip-icon": unref(collapsed) === true ? "down" : "up",
3030
+ "icon-fill": _ctx.iconFill || "currentColor",
3031
+ variant: _ctx.variant || "dropdown",
3032
+ "icon-position": "left",
3033
+ text: _ctx.text,
3034
+ useSlot: _ctx.useSlot
3035
+ }), {
3036
+ default: withCtx(() => [
3037
+ _ctx.useSlot ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true)
3038
+ ]),
3039
+ _: 3
3040
+ }, 16, ["class", "icon-class", "flip-icon", "icon-fill", "variant", "text", "useSlot"]);
3041
+ };
3042
+ }
3043
+ });
3044
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2955
3045
  __name: "Dropdown",
2956
3046
  props: {
2957
3047
  placeholderText: {},
@@ -2961,6 +3051,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2961
3051
  className: {},
2962
3052
  disabled: { type: Boolean },
2963
3053
  scrollable: { type: Boolean },
3054
+ buttonVariant: {},
2964
3055
  options: {},
2965
3056
  optionKey: {},
2966
3057
  collapsed: { type: Boolean },
@@ -2984,20 +3075,6 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2984
3075
  const dropdownButtonText = ref(
2985
3076
  props.defaultText || props.placeholderText || props.options[0].name
2986
3077
  );
2987
- const isPlaceholderText = computed(() => {
2988
- return dropdownButtonText.value === props.placeholderText;
2989
- });
2990
- const buttonVariant = computed(() => {
2991
- if ((props == null ? void 0 : props.variant) === "small" && (props == null ? void 0 : props.hasBorder) === true) {
2992
- return "dropdown-small with-border";
2993
- } else if (props.variant === "small") {
2994
- return "dropdown-small";
2995
- } else if (props.hasBorder === true) {
2996
- return "dropdown with-border";
2997
- } else {
2998
- return "dropdown";
2999
- }
3000
- });
3001
3078
  watch(collapsed, (value) => {
3002
3079
  if (value === false) {
3003
3080
  return document.addEventListener("click", handleOutsideClick);
@@ -3048,26 +3125,17 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3048
3125
  ref_key: "dropdownWithButton",
3049
3126
  ref: dropdownWithButton
3050
3127
  }, [
3051
- createVNode(Button, {
3128
+ createVNode(_sfc_main$9, {
3052
3129
  ref_key: "dropdownButton",
3053
3130
  ref: dropdownButton,
3054
- className: [
3055
- isPlaceholderText.value ? "placeholder" : "",
3056
- _ctx.hasBorder ? "has-border" : ""
3057
- ],
3058
3131
  id: buttonId.value,
3059
- onClick: toggleDropdown,
3060
- variant: buttonVariant.value,
3132
+ variant: _ctx.buttonVariant || "dropdown",
3133
+ collapsed: collapsed.value,
3061
3134
  disabled: _ctx.disabled,
3062
- icon: "caret-down",
3063
- iconClass: `h-4 w-4 transition duration-300 ease-in-out ${collapsed.value === true ? "scale-y-100" : "-scale-y-100"}`,
3064
- iconPosition: "right"
3065
- }, {
3066
- default: withCtx(() => [
3067
- createElementVNode("span", null, toDisplayString(dropdownButtonText.value), 1)
3068
- ]),
3069
- _: 1
3070
- }, 8, ["className", "id", "variant", "disabled", "iconClass"]),
3135
+ placeholder: _ctx.placeholderText,
3136
+ text: dropdownButtonText.value.toString(),
3137
+ onClick: withModifiers(toggleDropdown, ["stop"])
3138
+ }, null, 8, ["id", "variant", "collapsed", "disabled", "placeholder", "text"]),
3071
3139
  createElementVNode("div", {
3072
3140
  ref_key: "dropdownListEl",
3073
3141
  ref: dropdownListEl,
@@ -3088,7 +3156,76 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3088
3156
  };
3089
3157
  }
3090
3158
  });
3091
- const Dropdown = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-386131cd"]]);
3159
+ const Dropdown = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-95b0a2d2"]]);
3160
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3161
+ __name: "ButtonDropdownColors",
3162
+ props: {
3163
+ currentColor: {},
3164
+ collapsed: { type: Boolean },
3165
+ variant: {},
3166
+ disabled: { type: Boolean },
3167
+ className: {},
3168
+ iconClass: {},
3169
+ iconHoverClass: {},
3170
+ iconPendingClass: {},
3171
+ iconSuccessClass: {},
3172
+ iconErrorClass: {},
3173
+ id: {},
3174
+ text: {},
3175
+ pendingText: {},
3176
+ successText: {},
3177
+ errorText: {},
3178
+ icon: {},
3179
+ pendingIcon: {},
3180
+ successIcon: {},
3181
+ errorIcon: {},
3182
+ iconPosition: {},
3183
+ iconWidth: {},
3184
+ iconHeight: {},
3185
+ iconSize: {},
3186
+ iconFill: {},
3187
+ iconStroke: {},
3188
+ iconStrokeWidth: {},
3189
+ style: {},
3190
+ status: {},
3191
+ useStatusStyles: { type: Boolean },
3192
+ maintainButtonSize: { type: Boolean },
3193
+ animatePendingEllipsis: { type: Boolean },
3194
+ width: {},
3195
+ height: {},
3196
+ type: {},
3197
+ useSlot: { type: Boolean },
3198
+ flipIcon: {}
3199
+ },
3200
+ setup(__props) {
3201
+ const props = __props;
3202
+ const { collapsed } = toRefs(props);
3203
+ return (_ctx, _cache) => {
3204
+ return openBlock(), createBlock(_sfc_main$9, mergeProps(props, {
3205
+ class: ["hunter-button_dropdown_colors", {
3206
+ disabled: _ctx.disabled
3207
+ }],
3208
+ icon: "caret-down",
3209
+ "icon-class": _ctx.iconClass,
3210
+ "flip-icon": unref(collapsed) === true ? "down" : "up",
3211
+ "icon-fill": _ctx.iconFill || "currentColor",
3212
+ variant: _ctx.variant || "dropdown-with-icon",
3213
+ "icon-position": "left",
3214
+ useSlot: true
3215
+ }), {
3216
+ default: withCtx(() => [
3217
+ createVNode(ColorIcon, {
3218
+ color: _ctx.currentColor,
3219
+ "has-border": true,
3220
+ disabled: _ctx.disabled
3221
+ }, null, 8, ["color", "disabled"])
3222
+ ]),
3223
+ _: 1
3224
+ }, 16, ["class", "icon-class", "flip-icon", "icon-fill", "variant"]);
3225
+ };
3226
+ }
3227
+ });
3228
+ const ButtonDropdownColors = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-0031919c"]]);
3092
3229
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3093
3230
  __name: "DropdownColors",
3094
3231
  props: {
@@ -3117,31 +3254,18 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3117
3254
  const collapsed = ref(true);
3118
3255
  const selectedItem = ref();
3119
3256
  const currentColor = ref(props.placeholderColor || "#ffffff");
3120
- const isPlaceholderColor = computed(() => {
3121
- return currentColor.value === props.placeholderColor;
3122
- });
3123
3257
  const buttonVariant = computed(() => {
3124
- if (props.variant === "small" && props.hasBorder === true) {
3125
- return "dropdown-small with-border";
3126
- } else if (props.variant === "small") {
3127
- return "dropdown-small";
3128
- } else if (props.hasBorder === true) {
3129
- return "dropdown with-border";
3258
+ if (props.variant === "small") {
3259
+ return "dropdown-with-icon-small";
3130
3260
  } else {
3131
- return "dropdown";
3261
+ return "dropdown-with-icon";
3132
3262
  }
3133
3263
  });
3134
3264
  watch(collapsed, (value) => {
3135
3265
  if (value === false) {
3136
- return document.addEventListener(
3137
- "click",
3138
- (e) => handleOutsideClick(e)
3139
- );
3266
+ return document.addEventListener("click", handleOutsideClick);
3140
3267
  } else {
3141
- document.removeEventListener(
3142
- "click",
3143
- (e) => handleOutsideClick(e)
3144
- );
3268
+ return document.removeEventListener("click", handleOutsideClick);
3145
3269
  }
3146
3270
  });
3147
3271
  const toggleDropdown = () => {
@@ -3172,38 +3296,24 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3172
3296
  return collapsed.value;
3173
3297
  };
3174
3298
  onBeforeUnmount(() => {
3175
- return document.removeEventListener(
3176
- "click",
3177
- (e) => handleOutsideClick(e)
3178
- );
3299
+ return document.removeEventListener("click", handleOutsideClick);
3179
3300
  });
3180
3301
  return (_ctx, _cache) => {
3181
3302
  return openBlock(), createElementBlock("div", {
3182
- class: normalizeClass(["hunter-component hunter-color-dropdown-with-button", [_ctx.className, { variant: _ctx.variant, disabled: _ctx.disabled, "has-border": _ctx.hasBorder }]]),
3303
+ class: normalizeClass(["hunter-component hcl-dropdown-with-button_colors", [_ctx.className, { variant: _ctx.variant, disabled: _ctx.disabled, "has-border": _ctx.hasBorder }]]),
3183
3304
  ref_key: "dropdown",
3184
3305
  ref: dropdown
3185
3306
  }, [
3186
- createVNode(Button, {
3307
+ createVNode(ButtonDropdownColors, {
3187
3308
  ref_key: "dropdownButton",
3188
3309
  ref: dropdownButton,
3189
- class: "hunter-dropdown-selection-button",
3190
- className: isPlaceholderColor.value ? "placeholder" : "",
3310
+ "current-color": currentColor.value,
3191
3311
  id: buttonId.value,
3192
3312
  variant: buttonVariant.value,
3193
- onClick: toggleDropdown,
3194
- icon: "caret-down",
3195
- iconClass: `h-4 w-4 transition duration-300 ease-in-out ${collapsed.value === true ? "scale-y-100" : "-scale-y-100"}`,
3196
- iconPosition: "right"
3197
- }, {
3198
- default: withCtx(() => [
3199
- createVNode(ColorIcon, {
3200
- color: currentColor.value,
3201
- "has-border": true,
3202
- disabled: _ctx.disabled
3203
- }, null, 8, ["color", "disabled"])
3204
- ]),
3205
- _: 1
3206
- }, 8, ["className", "id", "variant", "iconClass"]),
3313
+ collapsed: collapsed.value,
3314
+ disabled: _ctx.disabled,
3315
+ onClick: withModifiers(toggleDropdown, ["stop"])
3316
+ }, null, 8, ["current-color", "id", "variant", "collapsed", "disabled"]),
3207
3317
  createElementVNode("div", {
3208
3318
  ref_key: "dropdownListEl",
3209
3319
  ref: dropdownListEl,
@@ -3272,8 +3382,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3272
3382
  };
3273
3383
  }
3274
3384
  });
3275
- const FormInput = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-7e700c34"]]);
3276
- const _withScopeId = (n) => (pushScopeId("data-v-417015dc"), n = n(), popScopeId(), n);
3385
+ const FormInput = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-7719e3d0"]]);
3386
+ const _withScopeId = (n) => (pushScopeId("data-v-478ffe71"), n = n(), popScopeId(), n);
3277
3387
  const _hoisted_1$3 = { class: "unit-selection-container" };
3278
3388
  const _hoisted_2$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", { class: "font-medium" }, "Units", -1));
3279
3389
  const _hoisted_3$1 = { class: "unit-selection" };
@@ -3297,12 +3407,18 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3297
3407
  bypassPendingState: { type: Boolean },
3298
3408
  submitButtonText: {},
3299
3409
  cancelButtonText: {},
3410
+ showCancelButton: { type: Boolean },
3300
3411
  successSubmitButtonDisabled: { type: Boolean }
3301
3412
  },
3302
3413
  emits: ["cancelSubmit", "submitForm"],
3303
3414
  setup(__props, { emit: __emit }) {
3304
3415
  const props = __props;
3305
- const { bypassPendingState, successSubmitButtonDisabled, submitButtonProps } = toRefs(props);
3416
+ const {
3417
+ bypassPendingState,
3418
+ successSubmitButtonDisabled,
3419
+ submitButtonProps,
3420
+ cancelButtonProps
3421
+ } = toRefs(props);
3306
3422
  const status = ref(props.submitStatus);
3307
3423
  const formInputs = ref(props.inputs);
3308
3424
  const unit = ref("en");
@@ -3317,7 +3433,6 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3317
3433
  });
3318
3434
  });
3319
3435
  const handleFormSubmit = (e) => {
3320
- console.log("GOT TO SUBMIT");
3321
3436
  e.preventDefault();
3322
3437
  status.value = "pending";
3323
3438
  const { isValid, inputs } = validateForm(formInputs.value);
@@ -3345,8 +3460,15 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3345
3460
  },
3346
3461
  ...formInputs.value
3347
3462
  ];
3348
- emit("submitForm", data, status.value, isValid);
3463
+ console.log("STAT", status.value, isValid);
3464
+ emit("submitForm", { inputs: data, status: status.value, isValid });
3349
3465
  if (!isValid) {
3466
+ formInputs.value.forEach((input) => {
3467
+ if (input.status !== "error") {
3468
+ input.status = "idle";
3469
+ }
3470
+ return input;
3471
+ });
3350
3472
  setTimeout(() => {
3351
3473
  status.value = "idle";
3352
3474
  }, 2500);
@@ -3465,18 +3587,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3465
3587
  ])
3466
3588
  ]),
3467
3589
  createElementVNode("div", _hoisted_6, [
3468
- _ctx.cancelButtonText ? (openBlock(), createBlock(Button, {
3469
- key: 0,
3590
+ createVNode(Button, mergeProps(unref(cancelButtonProps), {
3470
3591
  variant: "tertiary",
3471
3592
  className: "form-button",
3593
+ text: _ctx.cancelButtonText,
3472
3594
  disabled: status.value === "pending" || status.value === "success",
3473
3595
  onClick: handleCancelFormClick
3474
- }, {
3475
- default: withCtx(() => [
3476
- createTextVNode(toDisplayString(_ctx.cancelButtonText), 1)
3477
- ]),
3478
- _: 1
3479
- }, 8, ["disabled"])) : createCommentVNode("", true),
3596
+ }), null, 16, ["text", "disabled"]),
3480
3597
  createVNode(Button, mergeProps({
3481
3598
  class: ["form-button form-button_submit", {
3482
3599
  "form-button_pointer-events-none": status.value === "success" && unref(successSubmitButtonDisabled) === true
@@ -3491,7 +3608,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3491
3608
  };
3492
3609
  }
3493
3610
  });
3494
- const index = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-417015dc"]]);
3611
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-478ffe71"]]);
3495
3612
  const _hoisted_1$2 = ["href"];
3496
3613
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3497
3614
  __name: "Link",
@@ -3621,7 +3738,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3621
3738
  }, null, 8, ["name"])) : createCommentVNode("", true),
3622
3739
  createElementVNode("h2", null, toDisplayString(_ctx.title), 1)
3623
3740
  ]),
3624
- _ctx.buttonType === "default" && _ctx.buttonText ? (openBlock(), createBlock(_sfc_main$g, {
3741
+ _ctx.buttonType === "default" && _ctx.buttonText ? (openBlock(), createBlock(_sfc_main$i, {
3625
3742
  key: 0,
3626
3743
  text: _ctx.buttonText,
3627
3744
  type: _ctx.type,
@@ -3632,15 +3749,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3632
3749
  key: 1,
3633
3750
  variant: "icon",
3634
3751
  onClick: _cache[1] || (_cache[1] = ($event) => emit("close", informationEl.value)),
3635
- class: "hunter-toast-close-button"
3636
- }, {
3637
- default: withCtx(() => [
3638
- createVNode(Icon, {
3639
- name: "close",
3640
- class: "hunter-close-icon"
3641
- })
3642
- ]),
3643
- _: 1
3752
+ class: "hunter-toast-close-button",
3753
+ icon: "close",
3754
+ "icon-class": "hunter-close-icon"
3644
3755
  })) : createCommentVNode("", true)
3645
3756
  ]),
3646
3757
  createElementVNode("p", {
@@ -3650,7 +3761,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3650
3761
  };
3651
3762
  }
3652
3763
  });
3653
- const Toast = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-7b042845"]]);
3764
+ const Toast = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-12bb1fc1"]]);
3654
3765
  const _hoisted_1 = { class: "hunter-search-input-label" };
3655
3766
  const _hoisted_2 = { class: "hunter-search-input-label-span" };
3656
3767
  const _hoisted_3 = ["placeholder"];
@@ -3669,7 +3780,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3669
3780
  optionKey: {},
3670
3781
  variant: {},
3671
3782
  hideSearchButton: { type: Boolean },
3672
- hideClearButton: { type: Boolean }
3783
+ hideClearButton: { type: Boolean },
3784
+ searchIconFill: {}
3673
3785
  },
3674
3786
  emits: ["search", "clearSearch", "focus"],
3675
3787
  setup(__props, { emit: __emit }) {
@@ -3789,7 +3901,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3789
3901
  class: "hunter-search-input-error transition duration-300 ease-in-out",
3790
3902
  ariaHidden: error.value ? false : true
3791
3903
  }, toDisplayString(error.value), 9, _hoisted_4),
3792
- createVNode(_sfc_main$a, {
3904
+ createVNode(_sfc_main$c, {
3793
3905
  options: _ctx.options,
3794
3906
  "option-key": _ctx.optionKey || "name",
3795
3907
  collapsed: hideDropdown.value,
@@ -3806,44 +3918,38 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3806
3918
  ref: searchButtonEl,
3807
3919
  class: "hunter-search-input-button",
3808
3920
  variant: "icon",
3921
+ "icon-class": "hunter-search-input-icon",
3922
+ icon: "search",
3923
+ "icon-fill": _ctx.searchIconFill || "currentColor",
3809
3924
  onClick: handleSearchClick
3810
- }, {
3811
- default: withCtx(() => [
3812
- createVNode(unref(SearchIcon), { class: "hunter-search-input-icon" })
3813
- ]),
3814
- _: 1
3815
- }, 512)) : createCommentVNode("", true)
3925
+ }, null, 8, ["icon-fill"])) : createCommentVNode("", true)
3816
3926
  ], 4),
3817
3927
  !_ctx.hideClearButton ? (openBlock(), createElementBlock("div", _hoisted_5, [
3818
3928
  createVNode(Button, {
3819
3929
  class: "underline clear-button",
3820
3930
  variant: "link",
3931
+ text: "Clear",
3821
3932
  onClick: handleClearInput
3822
- }, {
3823
- default: withCtx(() => [
3824
- createTextVNode(" Clear ")
3825
- ]),
3826
- _: 1
3827
3933
  })
3828
3934
  ])) : createCommentVNode("", true)
3829
3935
  ], 2);
3830
3936
  };
3831
3937
  }
3832
3938
  });
3833
- const SearchInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6b77c59c"]]);
3939
+ const SearchInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-603385ac"]]);
3834
3940
  export {
3835
3941
  Button as HunterButton,
3836
3942
  ButtonIcon as HunterButtonIcon,
3837
- _sfc_main$g as HunterButtonToast,
3838
- _sfc_main$f as HunterCard,
3839
- _sfc_main$e as HunterCategoryCard,
3943
+ _sfc_main$i as HunterButtonToast,
3944
+ _sfc_main$h as HunterCard,
3945
+ _sfc_main$g as HunterCategoryCard,
3840
3946
  Checkbox as HunterCheckbox,
3841
3947
  Chip as HunterChip,
3842
3948
  Dropdown as HunterDropdown,
3843
3949
  _sfc_main$6 as HunterDropdownColors,
3844
3950
  DropdownList as HunterDropdownList,
3845
3951
  DropdownListWithColorIcons as HunterDropdownListWithColorIcons,
3846
- _sfc_main$a as HunterDropdownListWithFilter,
3952
+ _sfc_main$c as HunterDropdownListWithFilter,
3847
3953
  index as HunterForm,
3848
3954
  FormInput as HunterFormInput,
3849
3955
  Icon as HunterIcon,