@histoire/controls 0.4.6 → 0.5.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/index.es.js +103 -86
- package/dist/style-standalone.css +6 -5
- package/package.json +2 -2
- package/src/components/HstWrapper.vue +5 -2
- package/src/components/checkbox/HstCheckbox.vue +4 -0
- package/src/components/checkbox/__snapshots__/HstCheckbox.test.ts.snap +42 -38
- package/src/components/number/HstNumber.vue +4 -0
- package/src/components/select/HstSelect.vue +4 -0
- package/src/components/text/HstText.vue +4 -0
- package/src/components/textarea/HstTextarea.vue +4 -0
package/dist/index.es.js
CHANGED
|
@@ -29,7 +29,7 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
import { pushScopeId, popScopeId,
|
|
32
|
+
import { defineComponent, pushScopeId, popScopeId, nextTick, openBlock, createBlock, createElementBlock, mergeProps, renderSlot, normalizeProps, guardReactiveProps, withScopeId, resolveComponent, normalizeClass, normalizeStyle, withKeys, createElementVNode, Fragment, createCommentVNode, withCtx, createVNode, ref, createApp, h, toDisplayString, withDirectives, createTextVNode, unref, computed, watch, withModifiers, onUnmounted, isRef, vModelText, renderList, getCurrentScope, onScopeDispose } from "vue";
|
|
33
33
|
function getBasePlacement(placement) {
|
|
34
34
|
return placement.split("-")[0];
|
|
35
35
|
}
|
|
@@ -1495,8 +1495,8 @@ var PrivatePopper = () => defineComponent({
|
|
|
1495
1495
|
return (_a2 = this[PROVIDE_KEY]) == null ? void 0 : _a2.parentPopper;
|
|
1496
1496
|
},
|
|
1497
1497
|
hasPopperShowTriggerHover() {
|
|
1498
|
-
var _a2,
|
|
1499
|
-
return ((_a2 = this.popperTriggers) == null ? void 0 : _a2.includes("hover")) || ((
|
|
1498
|
+
var _a2, _b;
|
|
1499
|
+
return ((_a2 = this.popperTriggers) == null ? void 0 : _a2.includes("hover")) || ((_b = this.popperShowTriggers) == null ? void 0 : _b.includes("hover"));
|
|
1500
1500
|
}
|
|
1501
1501
|
},
|
|
1502
1502
|
watch: __spreadValues2(__spreadValues2({
|
|
@@ -1561,12 +1561,12 @@ var PrivatePopper = () => defineComponent({
|
|
|
1561
1561
|
},
|
|
1562
1562
|
methods: {
|
|
1563
1563
|
show({ event = null, skipDelay = false, force = false } = {}) {
|
|
1564
|
-
var _a2,
|
|
1564
|
+
var _a2, _b;
|
|
1565
1565
|
if (((_a2 = this.parentPopper) == null ? void 0 : _a2.lockedChild) && this.parentPopper.lockedChild !== this)
|
|
1566
1566
|
return;
|
|
1567
1567
|
this.$_pendingHide = false;
|
|
1568
1568
|
if (force || !this.disabled) {
|
|
1569
|
-
if (((
|
|
1569
|
+
if (((_b = this.parentPopper) == null ? void 0 : _b.lockedChild) === this) {
|
|
1570
1570
|
this.parentPopper.lockedChild = null;
|
|
1571
1571
|
}
|
|
1572
1572
|
this.$_scheduleShow(event, skipDelay);
|
|
@@ -2164,6 +2164,29 @@ function lineIntersectsLine(x1, y1, x2, y2, x3, y3, x4, y4) {
|
|
|
2164
2164
|
const uB = ((x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3)) / ((y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1));
|
|
2165
2165
|
return uA >= 0 && uA <= 1 && uB >= 0 && uB <= 1;
|
|
2166
2166
|
}
|
|
2167
|
+
var _export_sfc = (sfc, props) => {
|
|
2168
|
+
const target = sfc.__vccOpts || sfc;
|
|
2169
|
+
for (const [key, val] of props) {
|
|
2170
|
+
target[key] = val;
|
|
2171
|
+
}
|
|
2172
|
+
return target;
|
|
2173
|
+
};
|
|
2174
|
+
const _sfc_main$6$1 = {
|
|
2175
|
+
extends: PrivatePopper()
|
|
2176
|
+
};
|
|
2177
|
+
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2178
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
2179
|
+
ref: "reference",
|
|
2180
|
+
class: "v-popper"
|
|
2181
|
+
}, _ctx.$attrs, {
|
|
2182
|
+
class: {
|
|
2183
|
+
"v-popper--shown": _ctx.slotData.isShown
|
|
2184
|
+
}
|
|
2185
|
+
}), [
|
|
2186
|
+
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(_ctx.slotData)))
|
|
2187
|
+
], 16);
|
|
2188
|
+
}
|
|
2189
|
+
var Popper$1 = /* @__PURE__ */ _export_sfc(_sfc_main$6$1, [["render", _sfc_render$3]]);
|
|
2167
2190
|
function getInternetExplorerVersion() {
|
|
2168
2191
|
var ua = window.navigator.userAgent;
|
|
2169
2192
|
var msie = ua.indexOf("MSIE ");
|
|
@@ -2283,13 +2306,6 @@ var PrivateThemeClass = (prop = "theme") => ({
|
|
|
2283
2306
|
}
|
|
2284
2307
|
}
|
|
2285
2308
|
});
|
|
2286
|
-
var _export_sfc = (sfc, props) => {
|
|
2287
|
-
const target = sfc.__vccOpts || sfc;
|
|
2288
|
-
for (const [key, val] of props) {
|
|
2289
|
-
target[key] = val;
|
|
2290
|
-
}
|
|
2291
|
-
return target;
|
|
2292
|
-
};
|
|
2293
2309
|
const _sfc_main$5$1 = defineComponent({
|
|
2294
2310
|
name: "VPopperContent",
|
|
2295
2311
|
components: {
|
|
@@ -2328,10 +2344,10 @@ const _hoisted_2$1$1 = {
|
|
|
2328
2344
|
class: "v-popper__inner"
|
|
2329
2345
|
};
|
|
2330
2346
|
const _hoisted_3$6 = /* @__PURE__ */ createElementVNode("div", { class: "v-popper__arrow-outer" }, null, -1);
|
|
2331
|
-
const _hoisted_4$
|
|
2347
|
+
const _hoisted_4$5 = /* @__PURE__ */ createElementVNode("div", { class: "v-popper__arrow-inner" }, null, -1);
|
|
2332
2348
|
const _hoisted_5$3 = [
|
|
2333
2349
|
_hoisted_3$6,
|
|
2334
|
-
_hoisted_4$
|
|
2350
|
+
_hoisted_4$5
|
|
2335
2351
|
];
|
|
2336
2352
|
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2337
2353
|
const _component_ResizeObserver = resolveComponent("ResizeObserver");
|
|
@@ -2414,14 +2430,13 @@ var PrivatePopperMethods = {
|
|
|
2414
2430
|
const _sfc_main$4$1 = defineComponent({
|
|
2415
2431
|
name: "VPopperWrapper",
|
|
2416
2432
|
components: {
|
|
2417
|
-
Popper:
|
|
2433
|
+
Popper: Popper$1,
|
|
2418
2434
|
PopperContent: PrivatePopperContent
|
|
2419
2435
|
},
|
|
2420
2436
|
mixins: [
|
|
2421
2437
|
PrivatePopperMethods,
|
|
2422
2438
|
PrivateThemeClass("finalTheme")
|
|
2423
2439
|
],
|
|
2424
|
-
inheritAttrs: false,
|
|
2425
2440
|
props: {
|
|
2426
2441
|
theme: {
|
|
2427
2442
|
type: String,
|
|
@@ -2432,29 +2447,27 @@ const _sfc_main$4$1 = defineComponent({
|
|
|
2432
2447
|
finalTheme() {
|
|
2433
2448
|
var _a2;
|
|
2434
2449
|
return (_a2 = this.theme) != null ? _a2 : this.$options.vPopperTheme;
|
|
2435
|
-
},
|
|
2436
|
-
popperAttrs() {
|
|
2437
|
-
const result = __spreadValues2({}, this.$attrs);
|
|
2438
|
-
delete result.class;
|
|
2439
|
-
delete result.style;
|
|
2440
|
-
return result;
|
|
2441
2450
|
}
|
|
2442
2451
|
},
|
|
2443
2452
|
methods: {
|
|
2444
2453
|
getTargetNodes() {
|
|
2445
|
-
return Array.from(this.$refs.
|
|
2454
|
+
return Array.from(this.$refs.popper.$el.children).filter((node) => node !== this.$refs.popperContent.$el);
|
|
2446
2455
|
}
|
|
2447
2456
|
}
|
|
2448
2457
|
});
|
|
2449
2458
|
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2450
2459
|
const _component_PopperContent = resolveComponent("PopperContent");
|
|
2451
2460
|
const _component_Popper = resolveComponent("Popper");
|
|
2452
|
-
return openBlock(), createBlock(_component_Popper,
|
|
2461
|
+
return openBlock(), createBlock(_component_Popper, {
|
|
2462
|
+
ref: "popper",
|
|
2453
2463
|
theme: _ctx.finalTheme,
|
|
2454
2464
|
"target-nodes": _ctx.getTargetNodes,
|
|
2455
|
-
"reference-node": () => _ctx.$refs.
|
|
2456
|
-
"popper-node": () => _ctx.$refs.popperContent.$el
|
|
2457
|
-
|
|
2465
|
+
"reference-node": () => _ctx.$refs.popper.$el,
|
|
2466
|
+
"popper-node": () => _ctx.$refs.popperContent.$el,
|
|
2467
|
+
class: normalizeClass([
|
|
2468
|
+
_ctx.themeClass
|
|
2469
|
+
])
|
|
2470
|
+
}, {
|
|
2458
2471
|
default: withCtx(({
|
|
2459
2472
|
popperId,
|
|
2460
2473
|
isShown,
|
|
@@ -2466,53 +2479,38 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2466
2479
|
handleResize,
|
|
2467
2480
|
onResize,
|
|
2468
2481
|
classes,
|
|
2469
|
-
result
|
|
2470
|
-
attrs
|
|
2482
|
+
result
|
|
2471
2483
|
}) => [
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
"popper
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
classes,
|
|
2500
|
-
result,
|
|
2501
|
-
onHide: hide,
|
|
2502
|
-
onResize
|
|
2503
|
-
}, {
|
|
2504
|
-
default: withCtx(() => [
|
|
2505
|
-
renderSlot(_ctx.$slots, "popper", {
|
|
2506
|
-
shown: isShown,
|
|
2507
|
-
hide
|
|
2508
|
-
})
|
|
2509
|
-
]),
|
|
2510
|
-
_: 2
|
|
2511
|
-
}, 1032, ["popper-id", "theme", "shown", "mounted", "skip-transition", "auto-hide", "handle-resize", "classes", "result", "onHide", "onResize"])
|
|
2512
|
-
], 16)
|
|
2484
|
+
renderSlot(_ctx.$slots, "default", {
|
|
2485
|
+
shown: isShown,
|
|
2486
|
+
show,
|
|
2487
|
+
hide
|
|
2488
|
+
}),
|
|
2489
|
+
createVNode(_component_PopperContent, {
|
|
2490
|
+
ref: "popperContent",
|
|
2491
|
+
"popper-id": popperId,
|
|
2492
|
+
theme: _ctx.finalTheme,
|
|
2493
|
+
shown: isShown,
|
|
2494
|
+
mounted: shouldMountContent,
|
|
2495
|
+
"skip-transition": skipTransition,
|
|
2496
|
+
"auto-hide": autoHide,
|
|
2497
|
+
"handle-resize": handleResize,
|
|
2498
|
+
classes,
|
|
2499
|
+
result,
|
|
2500
|
+
onHide: hide,
|
|
2501
|
+
onResize
|
|
2502
|
+
}, {
|
|
2503
|
+
default: withCtx(() => [
|
|
2504
|
+
renderSlot(_ctx.$slots, "popper", {
|
|
2505
|
+
shown: isShown,
|
|
2506
|
+
hide
|
|
2507
|
+
})
|
|
2508
|
+
]),
|
|
2509
|
+
_: 2
|
|
2510
|
+
}, 1032, ["popper-id", "theme", "shown", "mounted", "skip-transition", "auto-hide", "handle-resize", "classes", "result", "onHide", "onResize"])
|
|
2513
2511
|
]),
|
|
2514
2512
|
_: 3
|
|
2515
|
-
},
|
|
2513
|
+
}, 8, ["theme", "target-nodes", "reference-node", "popper-node", "class"]);
|
|
2516
2514
|
}
|
|
2517
2515
|
var PrivatePopperWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$4$1, [["render", _sfc_render$1]]);
|
|
2518
2516
|
const _sfc_main$3$1 = defineComponent(__spreadProps2(__spreadValues2({}, PrivatePopperWrapper), {
|
|
@@ -2801,7 +2799,8 @@ const VTooltip = PrivateVTooltip;
|
|
|
2801
2799
|
const Dropdown = _sfc_main$3$1;
|
|
2802
2800
|
const _hoisted_1$7 = { class: "htw-p-2 hover:htw-bg-primary-100 dark:hover:htw-bg-primary-800 htw-flex htw-gap-2 htw-flex-wrap" };
|
|
2803
2801
|
const _hoisted_2$5 = { class: "htw-w-28 htw-whitespace-nowrap htw-text-ellipsis htw-overflow-hidden htw-shrink-0" };
|
|
2804
|
-
const _hoisted_3$5 = { class: "htw-
|
|
2802
|
+
const _hoisted_3$5 = { class: "htw-grow htw-flex htw-items-center htw-gap-1" };
|
|
2803
|
+
const _hoisted_4$4 = { class: "htw-block htw-grow" };
|
|
2805
2804
|
const __default__$a = {
|
|
2806
2805
|
name: "HstWrapper"
|
|
2807
2806
|
};
|
|
@@ -2822,7 +2821,10 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2822
2821
|
}]
|
|
2823
2822
|
]),
|
|
2824
2823
|
createElementVNode("span", _hoisted_3$5, [
|
|
2825
|
-
|
|
2824
|
+
createElementVNode("span", _hoisted_4$4, [
|
|
2825
|
+
renderSlot(_ctx.$slots, "default")
|
|
2826
|
+
]),
|
|
2827
|
+
renderSlot(_ctx.$slots, "actions")
|
|
2826
2828
|
])
|
|
2827
2829
|
]);
|
|
2828
2830
|
};
|
|
@@ -2859,8 +2861,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2859
2861
|
const dashoffset = computed(() => (1 - progress.value) * dasharray.value);
|
|
2860
2862
|
const animationEnabled = ref(false);
|
|
2861
2863
|
watch(path, (value) => {
|
|
2862
|
-
var _a2,
|
|
2863
|
-
dasharray.value = (_c = (
|
|
2864
|
+
var _a2, _b, _c;
|
|
2865
|
+
dasharray.value = (_c = (_b = (_a2 = path.value).getTotalLength) == null ? void 0 : _b.call(_a2)) != null ? _c : 21.21;
|
|
2864
2866
|
});
|
|
2865
2867
|
return (_ctx, _cache) => {
|
|
2866
2868
|
return openBlock(), createBlock(_sfc_main$a, {
|
|
@@ -2874,6 +2876,9 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2874
2876
|
_cache[2] || (_cache[2] = withKeys(withModifiers(($event) => toggle(), ["prevent"]), ["space"]))
|
|
2875
2877
|
]
|
|
2876
2878
|
}, {
|
|
2879
|
+
actions: withCtx(() => [
|
|
2880
|
+
renderSlot(_ctx.$slots, "actions")
|
|
2881
|
+
]),
|
|
2877
2882
|
default: withCtx(() => [
|
|
2878
2883
|
createElementVNode("div", _hoisted_1$6, [
|
|
2879
2884
|
createElementVNode("div", {
|
|
@@ -2899,7 +2904,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2899
2904
|
]))
|
|
2900
2905
|
])
|
|
2901
2906
|
]),
|
|
2902
|
-
_:
|
|
2907
|
+
_: 3
|
|
2903
2908
|
}, 8, ["title"]);
|
|
2904
2909
|
};
|
|
2905
2910
|
}
|
|
@@ -2925,6 +2930,9 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2925
2930
|
style: normalizeStyle(_ctx.$attrs.style),
|
|
2926
2931
|
onClick: _cache[1] || (_cache[1] = ($event) => input.value.focus())
|
|
2927
2932
|
}, {
|
|
2933
|
+
actions: withCtx(() => [
|
|
2934
|
+
renderSlot(_ctx.$slots, "actions")
|
|
2935
|
+
]),
|
|
2928
2936
|
default: withCtx(() => [
|
|
2929
2937
|
createElementVNode("input", mergeProps({
|
|
2930
2938
|
ref_key: "input",
|
|
@@ -2936,7 +2944,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2936
2944
|
onInput: _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", $event.target.value))
|
|
2937
2945
|
}), null, 16, _hoisted_1$5)
|
|
2938
2946
|
]),
|
|
2939
|
-
_:
|
|
2947
|
+
_: 3
|
|
2940
2948
|
}, 8, ["title", "class", "style"]);
|
|
2941
2949
|
};
|
|
2942
2950
|
}
|
|
@@ -3002,6 +3010,9 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3002
3010
|
onClick: focusAndSelect,
|
|
3003
3011
|
onMousedown: onMouseDown
|
|
3004
3012
|
}, {
|
|
3013
|
+
actions: withCtx(() => [
|
|
3014
|
+
renderSlot(_ctx.$slots, "actions")
|
|
3015
|
+
]),
|
|
3005
3016
|
default: withCtx(() => [
|
|
3006
3017
|
withDirectives(createElementVNode("input", mergeProps({
|
|
3007
3018
|
ref_key: "input",
|
|
@@ -3021,7 +3032,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3021
3032
|
]
|
|
3022
3033
|
])
|
|
3023
3034
|
]),
|
|
3024
|
-
_:
|
|
3035
|
+
_: 3
|
|
3025
3036
|
}, 8, ["title", "class", "style"]);
|
|
3026
3037
|
};
|
|
3027
3038
|
}
|
|
@@ -3048,6 +3059,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3048
3059
|
style: normalizeStyle(_ctx.$attrs.style),
|
|
3049
3060
|
onClick: _cache[1] || (_cache[1] = ($event) => input.value.focus())
|
|
3050
3061
|
}, {
|
|
3062
|
+
actions: withCtx(() => [
|
|
3063
|
+
renderSlot(_ctx.$slots, "actions")
|
|
3064
|
+
]),
|
|
3051
3065
|
default: withCtx(() => [
|
|
3052
3066
|
createElementVNode("textarea", mergeProps({
|
|
3053
3067
|
ref_key: "input",
|
|
@@ -3058,7 +3072,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3058
3072
|
onInput: _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", $event.target.value))
|
|
3059
3073
|
}), null, 16, _hoisted_1$4)
|
|
3060
3074
|
]),
|
|
3061
|
-
_:
|
|
3075
|
+
_: 3
|
|
3062
3076
|
}, 8, ["title", "class", "style"]);
|
|
3063
3077
|
};
|
|
3064
3078
|
}
|
|
@@ -3148,7 +3162,7 @@ function mergeIconData(icon, alias) {
|
|
|
3148
3162
|
}
|
|
3149
3163
|
return result;
|
|
3150
3164
|
}
|
|
3151
|
-
function getIconData$1(data, name, full
|
|
3165
|
+
function getIconData$1(data, name, full) {
|
|
3152
3166
|
function getIcon(name2, iteration) {
|
|
3153
3167
|
if (data.icons[name2] !== void 0) {
|
|
3154
3168
|
return Object.assign({}, data.icons[name2]);
|
|
@@ -3990,7 +4004,7 @@ function storeCallback(callback, icons, pendingSources) {
|
|
|
3990
4004
|
});
|
|
3991
4005
|
return abort;
|
|
3992
4006
|
}
|
|
3993
|
-
function listToIcons(list, validate
|
|
4007
|
+
function listToIcons(list, validate, simpleNames2 = false) {
|
|
3994
4008
|
const result = [];
|
|
3995
4009
|
list.forEach((item) => {
|
|
3996
4010
|
const icon = typeof item === "string" ? stringToIcon(item, false, simpleNames2) : item;
|
|
@@ -4889,7 +4903,7 @@ const _hoisted_4$3 = ["onClick"];
|
|
|
4889
4903
|
const __default__$5 = {
|
|
4890
4904
|
name: "CustomSelect"
|
|
4891
4905
|
};
|
|
4892
|
-
const _sfc_main$5 =
|
|
4906
|
+
const _sfc_main$5 = defineComponent(__spreadProps(__spreadValues({}, __default__$5), {
|
|
4893
4907
|
props: {
|
|
4894
4908
|
modelValue: null,
|
|
4895
4909
|
options: null
|
|
@@ -4950,7 +4964,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
4950
4964
|
const __default__$4 = {
|
|
4951
4965
|
name: "HstSelect"
|
|
4952
4966
|
};
|
|
4953
|
-
const _sfc_main$4 =
|
|
4967
|
+
const _sfc_main$4 = defineComponent(__spreadProps(__spreadValues({}, __default__$4), {
|
|
4954
4968
|
props: {
|
|
4955
4969
|
title: null,
|
|
4956
4970
|
modelValue: null,
|
|
@@ -4965,6 +4979,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
4965
4979
|
class: normalizeClass(["htw-cursor-text htw-items-center", _ctx.$attrs.class]),
|
|
4966
4980
|
style: normalizeStyle(_ctx.$attrs.style)
|
|
4967
4981
|
}, {
|
|
4982
|
+
actions: withCtx(() => [
|
|
4983
|
+
renderSlot(_ctx.$slots, "actions")
|
|
4984
|
+
]),
|
|
4968
4985
|
default: withCtx(() => [
|
|
4969
4986
|
createVNode(_sfc_main$5, {
|
|
4970
4987
|
options: __props.options,
|
|
@@ -4972,7 +4989,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
4972
4989
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emits("update:modelValue", $event))
|
|
4973
4990
|
}, null, 8, ["options", "model-value"])
|
|
4974
4991
|
]),
|
|
4975
|
-
_:
|
|
4992
|
+
_: 3
|
|
4976
4993
|
}, 8, ["title", "class", "style"]);
|
|
4977
4994
|
};
|
|
4978
4995
|
}
|
|
@@ -4984,10 +5001,12 @@ function tryOnScopeDispose(fn) {
|
|
|
4984
5001
|
}
|
|
4985
5002
|
return false;
|
|
4986
5003
|
}
|
|
5004
|
+
var _a;
|
|
4987
5005
|
const isClient = typeof window !== "undefined";
|
|
4988
5006
|
const isString = (val) => typeof val === "string";
|
|
4989
5007
|
const noop = () => {
|
|
4990
5008
|
};
|
|
5009
|
+
isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
4991
5010
|
function useTimeoutFn(cb, interval, options = {}) {
|
|
4992
5011
|
const {
|
|
4993
5012
|
immediate = true
|
|
@@ -5105,8 +5124,6 @@ const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !
|
|
|
5105
5124
|
const globalKey = "__vueuse_ssr_handlers__";
|
|
5106
5125
|
_global[globalKey] = _global[globalKey] || {};
|
|
5107
5126
|
_global[globalKey];
|
|
5108
|
-
var _a, _b;
|
|
5109
|
-
isClient && (window == null ? void 0 : window.navigator) && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.platform) && /iP(ad|hone|od)/.test((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.platform);
|
|
5110
5127
|
const __default__$3 = {
|
|
5111
5128
|
name: "HstCopyIcon"
|
|
5112
5129
|
};
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
.v-popper__popper{
|
|
29
29
|
z-index:10000;
|
|
30
30
|
top:0;
|
|
31
|
-
left:0
|
|
31
|
+
left:0;
|
|
32
|
+
outline:none
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
.v-popper__popper.v-popper__popper--hidden{
|
|
@@ -437,14 +438,14 @@
|
|
|
437
438
|
gap:0.5rem
|
|
438
439
|
}
|
|
439
440
|
|
|
440
|
-
.htw-gap-4{
|
|
441
|
-
gap:1rem
|
|
442
|
-
}
|
|
443
|
-
|
|
444
441
|
.htw-gap-1{
|
|
445
442
|
gap:0.25rem
|
|
446
443
|
}
|
|
447
444
|
|
|
445
|
+
.htw-gap-4{
|
|
446
|
+
gap:1rem
|
|
447
|
+
}
|
|
448
|
+
|
|
448
449
|
.htw-overflow-hidden{
|
|
449
450
|
overflow:hidden
|
|
450
451
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@histoire/controls",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Prebuilt controls components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"autoprefixer": "^10.4.4",
|
|
45
45
|
"concurrently": "^7.1.0",
|
|
46
46
|
"floating-vue": "^2.0.0-beta.16",
|
|
47
|
-
"histoire": "0.
|
|
47
|
+
"histoire": "0.5.0",
|
|
48
48
|
"postcss": "^8.4.12",
|
|
49
49
|
"postcss-import": "^14.1.0",
|
|
50
50
|
"tailwindcss": "^3.0.23",
|
|
@@ -24,8 +24,11 @@ const props = defineProps<{
|
|
|
24
24
|
>
|
|
25
25
|
{{ title }}
|
|
26
26
|
</span>
|
|
27
|
-
<span class="htw-
|
|
28
|
-
<
|
|
27
|
+
<span class="htw-grow htw-flex htw-items-center htw-gap-1">
|
|
28
|
+
<span class="htw-block htw-grow">
|
|
29
|
+
<slot />
|
|
30
|
+
</span>
|
|
31
|
+
<slot name="actions" />
|
|
29
32
|
</span>
|
|
30
33
|
</label>
|
|
31
34
|
</template>
|
|
@@ -9,26 +9,28 @@ exports[`HstCheckbox toggle to checked 1`] = `
|
|
|
9
9
|
<span class="htw-w-28 htw-whitespace-nowrap htw-text-ellipsis htw-overflow-hidden htw-shrink-0 v-popper--has-tooltip">
|
|
10
10
|
Label
|
|
11
11
|
</span>
|
|
12
|
-
<span class="htw-
|
|
13
|
-
<
|
|
14
|
-
<div class="htw-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<path
|
|
23
|
-
d="m 4 12 l 5 5 l 10 -10"
|
|
24
|
-
fill="none"
|
|
25
|
-
class="htw-stroke-white htw-stroke-2 htw-duration-200 htw-ease-in-out htw-transition-all"
|
|
26
|
-
stroke-dasharray="21.21"
|
|
27
|
-
stroke-dashoffset="21.21"
|
|
12
|
+
<span class="htw-grow htw-flex htw-items-center htw-gap-1">
|
|
13
|
+
<span class="htw-block htw-grow">
|
|
14
|
+
<div class="htw-text-white htw-w-[16px] htw-h-[16px] htw-relative">
|
|
15
|
+
<div class="htw-border htw-border-solid group-active:htw-bg-gray-500/20 htw-rounded-sm htw-box-border htw-absolute htw-inset-0 htw-transition-border htw-duration-150 htw-ease-out htw-border-black/25 dark:htw-border-white/25 htw-delay-150">
|
|
16
|
+
</div>
|
|
17
|
+
<svg
|
|
18
|
+
width="16"
|
|
19
|
+
height="16"
|
|
20
|
+
viewbox="0 0 24 24"
|
|
21
|
+
class="htw-relative htw-z-10"
|
|
28
22
|
>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
<path
|
|
24
|
+
d="m 4 12 l 5 5 l 10 -10"
|
|
25
|
+
fill="none"
|
|
26
|
+
class="htw-stroke-white htw-stroke-2 htw-duration-200 htw-ease-in-out htw-transition-all"
|
|
27
|
+
stroke-dasharray="21.21"
|
|
28
|
+
stroke-dashoffset="21.21"
|
|
29
|
+
>
|
|
30
|
+
</path>
|
|
31
|
+
</svg>
|
|
32
|
+
</div>
|
|
33
|
+
</span>
|
|
32
34
|
</span>
|
|
33
35
|
</label>
|
|
34
36
|
`;
|
|
@@ -42,26 +44,28 @@ exports[`HstCheckbox toggle to unchecked 1`] = `
|
|
|
42
44
|
<span class="htw-w-28 htw-whitespace-nowrap htw-text-ellipsis htw-overflow-hidden htw-shrink-0 v-popper--has-tooltip">
|
|
43
45
|
Label
|
|
44
46
|
</span>
|
|
45
|
-
<span class="htw-
|
|
46
|
-
<
|
|
47
|
-
<div class="htw-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<path
|
|
56
|
-
d="m 4 12 l 5 5 l 10 -10"
|
|
57
|
-
fill="none"
|
|
58
|
-
class="htw-stroke-white htw-stroke-2 htw-duration-200 htw-ease-in-out htw-transition-all htw-delay-150"
|
|
59
|
-
stroke-dasharray="21.21"
|
|
60
|
-
stroke-dashoffset="0"
|
|
47
|
+
<span class="htw-grow htw-flex htw-items-center htw-gap-1">
|
|
48
|
+
<span class="htw-block htw-grow">
|
|
49
|
+
<div class="htw-text-white htw-w-[16px] htw-h-[16px] htw-relative">
|
|
50
|
+
<div class="htw-border htw-border-solid group-active:htw-bg-gray-500/20 htw-rounded-sm htw-box-border htw-absolute htw-inset-0 htw-transition-border htw-duration-150 htw-ease-out htw-border-primary-500 htw-border-8">
|
|
51
|
+
</div>
|
|
52
|
+
<svg
|
|
53
|
+
width="16"
|
|
54
|
+
height="16"
|
|
55
|
+
viewbox="0 0 24 24"
|
|
56
|
+
class="htw-relative htw-z-10"
|
|
61
57
|
>
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
<path
|
|
59
|
+
d="m 4 12 l 5 5 l 10 -10"
|
|
60
|
+
fill="none"
|
|
61
|
+
class="htw-stroke-white htw-stroke-2 htw-duration-200 htw-ease-in-out htw-transition-all htw-delay-150"
|
|
62
|
+
stroke-dasharray="21.21"
|
|
63
|
+
stroke-dashoffset="0"
|
|
64
|
+
>
|
|
65
|
+
</path>
|
|
66
|
+
</svg>
|
|
67
|
+
</div>
|
|
68
|
+
</span>
|
|
65
69
|
</span>
|
|
66
70
|
</label>
|
|
67
71
|
`;
|
|
@@ -88,5 +88,9 @@ onUnmounted(() => {
|
|
|
88
88
|
}"
|
|
89
89
|
class="htw-text-inherit htw-bg-transparent htw-w-full htw-outline-none htw-pl-2 htw-py-1 -htw-my-1 htw-border htw-border-solid htw-border-black/25 dark:htw-border-white/25 focus:htw-border-primary-500 dark:focus:htw-border-primary-500 htw-rounded-sm htw-cursor-ew-resize"
|
|
90
90
|
>
|
|
91
|
+
|
|
92
|
+
<template #actions>
|
|
93
|
+
<slot name="actions" />
|
|
94
|
+
</template>
|
|
91
95
|
</HstWrapper>
|
|
92
96
|
</template>
|
|
@@ -36,5 +36,9 @@ const input = ref<HTMLInputElement>()
|
|
|
36
36
|
class="htw-text-inherit htw-bg-transparent htw-w-full htw-outline-none htw-px-2 htw-py-1 -htw-my-1 htw-border htw-border-solid htw-border-black/25 dark:htw-border-white/25 focus:htw-border-primary-500 dark:focus:htw-border-primary-500 htw-rounded-sm"
|
|
37
37
|
@input="emit('update:modelValue', ($event.target as HTMLInputElement).value)"
|
|
38
38
|
>
|
|
39
|
+
|
|
40
|
+
<template #actions>
|
|
41
|
+
<slot name="actions" />
|
|
42
|
+
</template>
|
|
39
43
|
</HstWrapper>
|
|
40
44
|
</template>
|
|
@@ -36,5 +36,9 @@ const input = ref<HTMLInputElement>()
|
|
|
36
36
|
class="htw-text-inherit htw-bg-transparent htw-w-full htw-outline-none htw-px-2 htw-py-1 -htw-my-1 htw-border htw-border-solid htw-border-black/25 dark:htw-border-white/25 focus:htw-border-primary-500 dark:focus:htw-border-primary-500 htw-rounded-sm htw-box-border htw-resize-y htw-min-h-[26px]"
|
|
37
37
|
@input="emit('update:modelValue', ($event.target as HTMLInputElement).value)"
|
|
38
38
|
/>
|
|
39
|
+
|
|
40
|
+
<template #actions>
|
|
41
|
+
<slot name="actions" />
|
|
42
|
+
</template>
|
|
39
43
|
</HstWrapper>
|
|
40
44
|
</template>
|