@hunter-industries/hunter-components 0.0.102 → 0.0.103
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.
|
@@ -1255,11 +1255,11 @@ const _hoisted_1$Z = {
|
|
|
1255
1255
|
fill: "none"
|
|
1256
1256
|
};
|
|
1257
1257
|
const _hoisted_2$V = /* @__PURE__ */ createStaticVNode('<circle cx="16" cy="16" r="15.625" fill="#fff" opacity=".8"></circle><path fill="#68aee0" d="M18.859 27.5v-23h6.64v23z"></path><path fill="#3A2F26" d="M20.756 27.501v-23h2.846v23z"></path><path fill="#68aee0" d="M20.76 19.91H2.5v-6.64h18.26z"></path><path fill="#3A2F26" d="M20.761 18.012H2.501v-2.846h18.26z"></path>', 5);
|
|
1258
|
-
const _hoisted_7$
|
|
1258
|
+
const _hoisted_7$1 = [
|
|
1259
1259
|
_hoisted_2$V
|
|
1260
1260
|
];
|
|
1261
1261
|
function render$J(_ctx, _cache) {
|
|
1262
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$Z, [..._hoisted_7$
|
|
1262
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$Z, [..._hoisted_7$1]);
|
|
1263
1263
|
}
|
|
1264
1264
|
const __vite_glob_0_75 = { render: render$J };
|
|
1265
1265
|
const _hoisted_1$Y = {
|
|
@@ -2745,8 +2745,8 @@ const _hoisted_3$8 = {
|
|
|
2745
2745
|
const _hoisted_4$7 = ["src", "alt"];
|
|
2746
2746
|
const _hoisted_5$4 = { class: "hc__card__text" };
|
|
2747
2747
|
const _hoisted_6$2 = { class: "hc__card__text__description" };
|
|
2748
|
-
const _hoisted_7
|
|
2749
|
-
const _hoisted_8
|
|
2748
|
+
const _hoisted_7 = { class: "card-description-body-wrapper" };
|
|
2749
|
+
const _hoisted_8 = { class: "description" };
|
|
2750
2750
|
const _hoisted_9 = {
|
|
2751
2751
|
key: 0,
|
|
2752
2752
|
class: "hc__card__buttons float2"
|
|
@@ -2815,8 +2815,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2815
2815
|
createElementVNode("div", {
|
|
2816
2816
|
class: normalizeClass(["hc__card__text__title", "uppercase"])
|
|
2817
2817
|
}, toDisplayString(_ctx.title), 1),
|
|
2818
|
-
createElementVNode("div", _hoisted_7
|
|
2819
|
-
createElementVNode("div", _hoisted_8
|
|
2818
|
+
createElementVNode("div", _hoisted_7, [
|
|
2819
|
+
createElementVNode("div", _hoisted_8, [
|
|
2820
2820
|
!_ctx.hideToggleButton ? (openBlock(), createElementBlock("div", _hoisted_9, [
|
|
2821
2821
|
withDirectives(createVNode(unref(_sfc_main$l), {
|
|
2822
2822
|
variant: "icon-primary",
|
|
@@ -4152,17 +4152,15 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4152
4152
|
}
|
|
4153
4153
|
});
|
|
4154
4154
|
const SearchInput = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-603385ac"]]);
|
|
4155
|
-
const _hoisted_1 = { class: "slider-
|
|
4156
|
-
const _hoisted_2 =
|
|
4157
|
-
const _hoisted_3 = {
|
|
4158
|
-
const _hoisted_4 = {
|
|
4155
|
+
const _hoisted_1 = { class: "slider-with-descriptions" };
|
|
4156
|
+
const _hoisted_2 = ["min", "max"];
|
|
4157
|
+
const _hoisted_3 = {
|
|
4159
4158
|
class: "ticks",
|
|
4160
4159
|
"aria-hidden": "true"
|
|
4161
4160
|
};
|
|
4162
|
-
const
|
|
4163
|
-
const
|
|
4164
|
-
const
|
|
4165
|
-
const _hoisted_8 = {
|
|
4161
|
+
const _hoisted_4 = { class: "text-under-slider" };
|
|
4162
|
+
const _hoisted_5 = { class: "title" };
|
|
4163
|
+
const _hoisted_6 = {
|
|
4166
4164
|
key: 0,
|
|
4167
4165
|
class: "unit-text"
|
|
4168
4166
|
};
|
|
@@ -4179,16 +4177,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4179
4177
|
text: {},
|
|
4180
4178
|
tickEvery: { default: 2 },
|
|
4181
4179
|
showSelection: { type: Boolean, default: true },
|
|
4182
|
-
unit: { default: '"' }
|
|
4180
|
+
unit: { default: '"' },
|
|
4181
|
+
maxCharacterSize: { default: "3ch" },
|
|
4182
|
+
locked: { type: Boolean, default: false }
|
|
4183
4183
|
},
|
|
4184
4184
|
emits: ["change", "input"],
|
|
4185
4185
|
setup(__props, { emit: __emit }) {
|
|
4186
4186
|
useCssVars((_ctx) => ({
|
|
4187
|
-
"
|
|
4188
|
-
"
|
|
4189
|
-
"
|
|
4190
|
-
"
|
|
4187
|
+
"0f62f7dc": unref(primaryColor),
|
|
4188
|
+
"c9ebfe2c": unref(secondaryColor),
|
|
4189
|
+
"660d9970": unref(thumbColor),
|
|
4190
|
+
"875d6908": unref(thumbSize),
|
|
4191
|
+
"6dccefa1": unref(maxCharacterSize)
|
|
4191
4192
|
}));
|
|
4193
|
+
const props = __props;
|
|
4192
4194
|
const {
|
|
4193
4195
|
min,
|
|
4194
4196
|
max,
|
|
@@ -4199,45 +4201,50 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4199
4201
|
thumbSize,
|
|
4200
4202
|
tickEvery,
|
|
4201
4203
|
showSelection,
|
|
4202
|
-
unit
|
|
4203
|
-
|
|
4204
|
+
unit,
|
|
4205
|
+
maxCharacterSize
|
|
4206
|
+
} = props;
|
|
4204
4207
|
const emit = __emit;
|
|
4205
4208
|
const minN = computed(() => Number(min));
|
|
4206
4209
|
const maxN = computed(() => Number(max));
|
|
4207
4210
|
const defN = computed(() => Number(def));
|
|
4208
4211
|
const slider = ref(null);
|
|
4209
4212
|
const sliderValue = ref(defN.value);
|
|
4210
|
-
const tickCount = computed(
|
|
4211
|
-
() => Math.floor(max - min) + 1
|
|
4212
|
-
);
|
|
4213
|
+
const tickCount = computed(() => Math.floor(max - min) + 1);
|
|
4213
4214
|
function calcValue(val) {
|
|
4214
|
-
const el = slider.value;
|
|
4215
|
-
if (!el) return;
|
|
4216
|
-
const hi = Number(el.max || maxN.value);
|
|
4217
|
-
const lo = Number(el.min || minN.value);
|
|
4218
|
-
const pct = (val - lo) / (hi - lo) * 100;
|
|
4219
|
-
el.style.background = `linear-gradient(to right, ${primaryColor} ${pct}%, ${secondaryColor} ${pct}%)`;
|
|
4220
4215
|
emit("input", val);
|
|
4221
4216
|
}
|
|
4217
|
+
const sliderBackground = computed(() => {
|
|
4218
|
+
if (props.locked) return "";
|
|
4219
|
+
const hi = maxN.value;
|
|
4220
|
+
const lo = minN.value;
|
|
4221
|
+
const pct = (sliderValue.value - lo) / (hi - lo) * 100;
|
|
4222
|
+
return `linear-gradient(to right, ${primaryColor} ${pct}%, ${secondaryColor} ${pct}%)`;
|
|
4223
|
+
});
|
|
4222
4224
|
onMounted(() => {
|
|
4223
4225
|
calcValue(sliderValue.value);
|
|
4224
4226
|
});
|
|
4225
4227
|
return (_ctx, _cache) => {
|
|
4226
|
-
return openBlock(), createElementBlock("div",
|
|
4227
|
-
|
|
4228
|
-
|
|
4228
|
+
return openBlock(), createElementBlock("div", {
|
|
4229
|
+
class: normalizeClass(["slider-and-single-unit-container", { "locked": _ctx.locked }])
|
|
4230
|
+
}, [
|
|
4231
|
+
createElementVNode("div", _hoisted_1, [
|
|
4232
|
+
createElementVNode("div", {
|
|
4233
|
+
class: "slider-container",
|
|
4234
|
+
style: normalizeStyle({ "--track-color": sliderBackground.value })
|
|
4235
|
+
}, [
|
|
4229
4236
|
withDirectives(createElementVNode("input", {
|
|
4230
4237
|
type: "range",
|
|
4231
|
-
min,
|
|
4232
|
-
max,
|
|
4238
|
+
min: unref(min),
|
|
4239
|
+
max: unref(max),
|
|
4233
4240
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => sliderValue.value = $event),
|
|
4234
4241
|
class: "slider block w-full",
|
|
4235
4242
|
id: "range",
|
|
4236
4243
|
ref_key: "slider",
|
|
4237
4244
|
ref: slider,
|
|
4238
|
-
onInput: _cache[1] || (_cache[1] = ($event) =>
|
|
4245
|
+
onInput: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("input", sliderValue.value)),
|
|
4239
4246
|
onChange: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("change", sliderValue.value))
|
|
4240
|
-
}, null,
|
|
4247
|
+
}, null, 40, _hoisted_2), [
|
|
4241
4248
|
[
|
|
4242
4249
|
vModelText,
|
|
4243
4250
|
sliderValue.value,
|
|
@@ -4245,34 +4252,36 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4245
4252
|
{ number: true }
|
|
4246
4253
|
]
|
|
4247
4254
|
]),
|
|
4248
|
-
createElementVNode("div",
|
|
4255
|
+
createElementVNode("div", _hoisted_3, [
|
|
4249
4256
|
(openBlock(true), createElementBlock(Fragment, null, renderList(tickCount.value, (i) => {
|
|
4250
4257
|
return openBlock(), createElementBlock("span", {
|
|
4251
4258
|
key: i,
|
|
4252
4259
|
class: normalizeClass(["tick", {
|
|
4253
|
-
hide: (i - 1) % tickEvery !== 0,
|
|
4254
|
-
passed: +min + (i - 1) < +sliderValue.value
|
|
4255
|
-
active: +min + (i - 1) === +sliderValue.value
|
|
4260
|
+
hide: (i - 1) % unref(tickEvery) !== 0,
|
|
4261
|
+
passed: +unref(min) + (i - 1) < +sliderValue.value
|
|
4256
4262
|
}])
|
|
4257
4263
|
}, null, 2);
|
|
4258
4264
|
}), 128))
|
|
4259
4265
|
])
|
|
4260
|
-
]),
|
|
4261
|
-
createElementVNode("div",
|
|
4266
|
+
], 4),
|
|
4267
|
+
createElementVNode("div", _hoisted_4, [
|
|
4262
4268
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.text, (item, _) => {
|
|
4263
|
-
return openBlock(), createElementBlock("div",
|
|
4264
|
-
|
|
4269
|
+
return openBlock(), createElementBlock("div", {
|
|
4270
|
+
key: (item == null ? void 0 : item.title) ?? _,
|
|
4271
|
+
class: "text"
|
|
4272
|
+
}, [
|
|
4273
|
+
createElementVNode("div", _hoisted_5, toDisplayString(item.title), 1),
|
|
4265
4274
|
createElementVNode("div", null, toDisplayString(item == null ? void 0 : item.description), 1)
|
|
4266
4275
|
]);
|
|
4267
|
-
}),
|
|
4276
|
+
}), 128))
|
|
4268
4277
|
])
|
|
4269
4278
|
]),
|
|
4270
|
-
showSelection ? (openBlock(), createElementBlock("div",
|
|
4271
|
-
]);
|
|
4279
|
+
unref(showSelection) ? (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(`${sliderValue.value}${unref(unit)}`), 1)) : createCommentVNode("", true)
|
|
4280
|
+
], 2);
|
|
4272
4281
|
};
|
|
4273
4282
|
}
|
|
4274
4283
|
});
|
|
4275
|
-
const Slider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4284
|
+
const Slider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2eab50c9"]]);
|
|
4276
4285
|
export {
|
|
4277
4286
|
_sfc_main$l as HunterButton,
|
|
4278
4287
|
ButtonIcon as HunterButtonIcon,
|