@histoire/controls 0.6.1 → 0.6.2
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/.histoire/dist/__sandbox.html +1 -1
- package/.histoire/dist/assets/{BaseEmpty.c5f20ec7.js → BaseEmpty.d30f3079.js} +2 -2
- package/.histoire/dist/assets/{HomeView.d306a8d5.js → HomeView.8e044be6.js} +3 -4
- package/.histoire/dist/assets/{HstCheckbox.story.58c054a6.js → HstCheckbox.story.3d04d85b.js} +5 -6
- package/.histoire/dist/assets/{HstColorShades.story.b321a955.js → HstColorShades.story.68cf74d1.js} +9 -10
- package/.histoire/dist/assets/{HstCopyIcon.5a5f1bb8.js → HstCopyIcon.e40e725e.js} +1 -2
- package/.histoire/dist/assets/{HstNumber.story.5a14062c.js → HstNumber.story.1e1964ff.js} +3 -4
- package/.histoire/dist/assets/{HstSelect.story.d546c2ca.js → HstSelect.story.04860383.js} +8 -9
- package/.histoire/dist/assets/{HstText.story.77a76d7e.js → HstText.story.c915d831.js} +3 -4
- package/.histoire/dist/assets/{HstTextarea.story.a6a4d3ba.js → HstTextarea.story.802b9c26.js} +3 -4
- package/.histoire/dist/assets/{HstTokenGrid.story.28a4b8c9.js → HstTokenGrid.story.025819d6.js} +6 -7
- package/.histoire/dist/assets/{HstTokenList.story.efcdd763.js → HstTokenList.story.d3aa6575.js} +9 -10
- package/.histoire/dist/assets/{HstWrapper.a4ee2214.js → HstWrapper.246b6982.js} +3 -4
- package/.histoire/dist/assets/{SearchPane.d4c0545d.js → SearchPane.daa2675c.js} +11 -12
- package/.histoire/dist/assets/{StoryView.6adb630a.js → StoryView.2f64dad1.js} +74 -75
- package/.histoire/dist/assets/{bundle-main.2631970b.js → bundle-main.784e5bf7.js} +34 -35
- package/.histoire/dist/assets/{bundle-sandbox.91b9cf1c.js → bundle-sandbox.5e153933.js} +3 -4
- package/.histoire/dist/assets/{const.560925bb.js → const.268165fd.js} +2 -3
- package/.histoire/dist/assets/{global-components.1c794554.js → global-components.6736b2a9.js} +53 -46
- package/.histoire/dist/assets/{search-docs-data.de2485ce.js → search-docs-data.b9a75539.js} +1 -1
- package/.histoire/dist/assets/{vendor.96c97c65.js → vendor.2833ae3d.js} +7250 -259
- package/.histoire/dist/index.html +2 -2
- package/dist/index.es.js +10 -2
- package/package.json +2 -2
- package/vite.config.ts +8 -2
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { reactive, ref, watch, defineComponent, unref, openBlock, createBlock, withCtx,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { e as clone, o as omit, b as toRawDeep, i as isDark, H as HstCopyIcon, d as applyStateToVariant, h as histoireConfig } from "./global-components.1c794554.js";
|
|
1
|
+
import { A as defineStore, S as reactive, r as ref, w as watch, d as defineComponent, al as useRouter, U as useRoute, i as unref, a as openBlock, j as createBlock, k as withCtx, b as createElementBlock, l as createVNode, am as watchEffect, I as Icon, H as useStorage, R as createTextVNode, c as computed, e as createBaseVNode, C as resolveDynamicComponent, Q as useCssVars, m as createCommentVNode, F as Fragment, J as renderList, p as onMounted, $ as nextTick, t as toDisplayString, an as useResizeObserver, h as normalizeStyle, ao as useTimeoutFn, ap as onClickOutside, L as resolveDirective, M as withDirectives, Z as vModelText, g as withModifiers, P as isRef, v as withKeys, n as normalizeClass, q as resolveComponent, aq as shallowRef, ar as getHighlighter, f as renderSlot, ak as toRefs, x as mergeProps, as as Dropdown, V as pushScopeId, W as popScopeId, T as Transition, _ as h, at as setCDN, au as onBeforeUnmount, K as useEventListener, av as toRaw, o as onUnmounted, aw as createStaticVNode } from "./vendor.2833ae3d.js";
|
|
2
|
+
import { u as useStoryStore, i as isMobile, b as BaseSplitPane, _ as _export_sfc, c as _sfc_main$v, a as useScrollOnActive, B as BaseListItemLink, d as base } from "./bundle-main.784e5bf7.js";
|
|
3
|
+
import { B as BaseEmpty } from "./BaseEmpty.d30f3079.js";
|
|
4
|
+
import { _ as _sfc_main$w, u as unindent, g as generateSourceCode, a as SANDBOX_READY, E as EVENT_SEND, S as STATE_SYNC, P as PREVIEW_SETTINGS_SYNC } from "./const.268165fd.js";
|
|
5
|
+
import { e as clone, o as omit, b as toRawDeep, i as isDark, H as HstCopyIcon, d as applyStateToVariant, h as histoireConfig } from "./global-components.6736b2a9.js";
|
|
7
6
|
const useEventsStore = defineStore("events", () => {
|
|
8
7
|
const storyStore = useStoryStore();
|
|
9
8
|
const events = reactive([]);
|
|
@@ -100,7 +99,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
100
99
|
"bind-icon-color": !active && unref(variant).iconColor
|
|
101
100
|
}])
|
|
102
101
|
}, null, 8, ["icon", "class"]),
|
|
103
|
-
|
|
102
|
+
createBaseVNode("span", _hoisted_1$r, toDisplayString(unref(variant).title), 1)
|
|
104
103
|
];
|
|
105
104
|
}),
|
|
106
105
|
_: 1
|
|
@@ -162,7 +161,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
162
161
|
ref: el,
|
|
163
162
|
class: "htw-cursor-default htw-flex htw-flex-col htw-gap-y-1"
|
|
164
163
|
}, [
|
|
165
|
-
|
|
164
|
+
createBaseVNode("div", _hoisted_1$q, [
|
|
166
165
|
createVNode(_component_RouterLink, {
|
|
167
166
|
to: unref(targetRoute),
|
|
168
167
|
class: normalizeClass(["htw-rounded htw-w-max htw-px-2 htw-py-0.5 htw-min-w-16 htw-cursor-pointer htw-flex htw-items-center htw-gap-1", {
|
|
@@ -180,13 +179,13 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
180
179
|
"bind-icon-color": !unref(isActive) && unref(variant).iconColor
|
|
181
180
|
}])
|
|
182
181
|
}, null, 8, ["icon", "class"]),
|
|
183
|
-
|
|
182
|
+
createBaseVNode("span", null, toDisplayString(unref(variant).title), 1)
|
|
184
183
|
];
|
|
185
184
|
}),
|
|
186
185
|
_: 1
|
|
187
186
|
}, 8, ["to", "class"])
|
|
188
187
|
]),
|
|
189
|
-
|
|
188
|
+
createBaseVNode("div", {
|
|
190
189
|
class: normalizeClass(["htw-border htw-bg-white dark:htw-bg-gray-700 htw-rounded-lg htw-flex-1 htw-p-4", {
|
|
191
190
|
"htw-border-gray-100 dark:htw-border-gray-800": !unref(isActive),
|
|
192
191
|
"htw-border-primary-200 dark:htw-border-primary-900": unref(isActive)
|
|
@@ -194,7 +193,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
194
193
|
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => selectVariant(), ["stop", "prevent"])),
|
|
195
194
|
onKeyup: _cache[1] || (_cache[1] = ($event) => selectVariant())
|
|
196
195
|
}, [
|
|
197
|
-
createVNode(_sfc_main$
|
|
196
|
+
createVNode(_sfc_main$w, {
|
|
198
197
|
variant: unref(variant),
|
|
199
198
|
story: __props.story,
|
|
200
199
|
onReady
|
|
@@ -269,12 +268,12 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
269
268
|
class: "htw-h-full htw-overflow-y-auto",
|
|
270
269
|
onScroll: _cache[0] || (_cache[0] = ($event) => updateMaxCount())
|
|
271
270
|
}, [
|
|
272
|
-
|
|
271
|
+
createBaseVNode("div", {
|
|
273
272
|
style: normalizeStyle({
|
|
274
273
|
minHeight: `${unref(storyStore).currentStory.variants.length / countPerRow.value * (maxItemHeight.value + gap) - gap}px`
|
|
275
274
|
})
|
|
276
275
|
}, [
|
|
277
|
-
|
|
276
|
+
createBaseVNode("div", {
|
|
278
277
|
class: "htw-grid htw-gap-4 htw-m-4",
|
|
279
278
|
style: normalizeStyle({
|
|
280
279
|
gridTemplateColumns: `repeat(auto-fill, ${unref(gridTemplateWidth)})`
|
|
@@ -310,7 +309,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
310
309
|
__props.variant.iconColor ? "bind-icon-color" : "htw-text-gray-500"
|
|
311
310
|
]])
|
|
312
311
|
}, null, 8, ["icon", "class"]),
|
|
313
|
-
|
|
312
|
+
createBaseVNode("span", null, toDisplayString(__props.variant.title), 1)
|
|
314
313
|
]);
|
|
315
314
|
};
|
|
316
315
|
}
|
|
@@ -372,14 +371,14 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
372
371
|
_cache[2] || (_cache[2] = withKeys(withModifiers(($event) => toggle(), ["prevent"]), ["space"]))
|
|
373
372
|
]
|
|
374
373
|
}, [
|
|
375
|
-
|
|
376
|
-
|
|
374
|
+
createBaseVNode("div", _hoisted_1$o, [
|
|
375
|
+
createBaseVNode("div", {
|
|
377
376
|
class: normalizeClass(["htw-border 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", [
|
|
378
377
|
__props.modelValue ? "htw-border-primary-500 htw-border-8" : "htw-border-black/25 dark:htw-border-white/25 htw-delay-150"
|
|
379
378
|
]])
|
|
380
379
|
}, null, 2),
|
|
381
380
|
(openBlock(), createElementBlock("svg", _hoisted_2$k, [
|
|
382
|
-
|
|
381
|
+
createBaseVNode("path", {
|
|
383
382
|
ref_key: "path",
|
|
384
383
|
ref: path,
|
|
385
384
|
d: "m 4 12 l 5 5 l 10 -10",
|
|
@@ -403,7 +402,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
403
402
|
const _hoisted_1$n = { class: "htw-flex htw-flex-col htw-items-stretch" };
|
|
404
403
|
const _hoisted_2$j = /* @__PURE__ */ createTextVNode(" Rotate ");
|
|
405
404
|
const _hoisted_3$c = { class: "htw-flex htw-gap-2 htw-px-4 htw-py-3" };
|
|
406
|
-
const _hoisted_4$9 = /* @__PURE__ */
|
|
405
|
+
const _hoisted_4$9 = /* @__PURE__ */ createBaseVNode("span", { class: "htw-opacity-50" }, "x", -1);
|
|
407
406
|
const _hoisted_5$6 = ["onClick"];
|
|
408
407
|
const _hoisted_6$6 = { class: "htw-ml-auto htw-opacity-70 htw-flex htw-gap-1" };
|
|
409
408
|
const _hoisted_7$3 = { key: 0 };
|
|
@@ -426,7 +425,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
426
425
|
class: "htw-h-full htw-flex-none"
|
|
427
426
|
}, {
|
|
428
427
|
popper: withCtx(({ hide }) => [
|
|
429
|
-
|
|
428
|
+
createBaseVNode("div", _hoisted_1$n, [
|
|
430
429
|
createVNode(_sfc_main$q, {
|
|
431
430
|
modelValue: unref(settings).rotate,
|
|
432
431
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(settings).rotate = $event)
|
|
@@ -436,8 +435,8 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
436
435
|
]),
|
|
437
436
|
_: 1
|
|
438
437
|
}, 8, ["modelValue"]),
|
|
439
|
-
|
|
440
|
-
withDirectives(
|
|
438
|
+
createBaseVNode("div", _hoisted_3$c, [
|
|
439
|
+
withDirectives(createBaseVNode("input", {
|
|
441
440
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(settings).responsiveWidth = $event),
|
|
442
441
|
type: "number",
|
|
443
442
|
class: "htw-bg-transparent htw-border htw-border-gray-200 dark:htw-border-gray-850 htw-rounded htw-w-20 htw-opacity-50 focus:htw-opacity-100 htw-flex-1 htw-min-w-0",
|
|
@@ -453,7 +452,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
453
452
|
[_directive_tooltip, "Responsive width (px)"]
|
|
454
453
|
]),
|
|
455
454
|
_hoisted_4$9,
|
|
456
|
-
withDirectives(
|
|
455
|
+
withDirectives(createBaseVNode("input", {
|
|
457
456
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(settings).responsiveHeight = $event),
|
|
458
457
|
type: "number",
|
|
459
458
|
class: "htw-bg-transparent htw-border htw-border-gray-200 dark:htw-border-gray-850 htw-rounded htw-w-20 htw-opacity-50 focus:htw-opacity-100 htw-flex-1 htw-min-w-0",
|
|
@@ -482,7 +481,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
482
481
|
}
|
|
483
482
|
}, [
|
|
484
483
|
createTextVNode(toDisplayString(preset.label) + " ", 1),
|
|
485
|
-
|
|
484
|
+
createBaseVNode("span", _hoisted_6$6, [
|
|
486
485
|
preset.width ? (openBlock(), createElementBlock("span", _hoisted_7$3, [
|
|
487
486
|
createTextVNode(toDisplayString(preset.width), 1),
|
|
488
487
|
!preset.height ? (openBlock(), createElementBlock("span", _hoisted_8$2, "px")) : createCommentVNode("", true)
|
|
@@ -525,7 +524,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
525
524
|
});
|
|
526
525
|
const _withScopeId$5 = (n) => (pushScopeId("data-v-bde73868"), n = n(), popScopeId(), n);
|
|
527
526
|
const _hoisted_1$m = { class: "htw-cursor-pointer hover:htw-text-primary-500 htw-flex htw-items-center htw-gap-1 htw-h-full htw-px-2 htw-group" };
|
|
528
|
-
const _hoisted_2$i = /* @__PURE__ */ _withScopeId$5(() => /* @__PURE__ */
|
|
527
|
+
const _hoisted_2$i = /* @__PURE__ */ _withScopeId$5(() => /* @__PURE__ */ createBaseVNode("div", { class: "bind-preview-bg htw-w-4 htw-h-4 htw-rounded-full htw-border htw-border-black/50 dark:htw-border-white/50" }, null, -1));
|
|
529
528
|
const _hoisted_3$b = { class: "htw-flex htw-flex-col htw-items-stretch" };
|
|
530
529
|
const _hoisted_4$8 = /* @__PURE__ */ createTextVNode(" Checkerboard ");
|
|
531
530
|
const _hoisted_5$5 = ["onClick"];
|
|
@@ -548,7 +547,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
548
547
|
class: "htw-h-full htw-flex-none"
|
|
549
548
|
}, {
|
|
550
549
|
popper: withCtx(({ hide }) => [
|
|
551
|
-
|
|
550
|
+
createBaseVNode("div", _hoisted_3$b, [
|
|
552
551
|
createVNode(_sfc_main$q, {
|
|
553
552
|
modelValue: unref(settings).checkerboard,
|
|
554
553
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(settings).checkerboard = $event)
|
|
@@ -569,10 +568,10 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
569
568
|
hide();
|
|
570
569
|
}
|
|
571
570
|
}, [
|
|
572
|
-
|
|
571
|
+
createBaseVNode("span", _hoisted_6$5, toDisplayString(option.label), 1),
|
|
573
572
|
option.color !== "$checkerboard" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
574
|
-
|
|
575
|
-
|
|
573
|
+
createBaseVNode("span", _hoisted_7$2, toDisplayString(option.color), 1),
|
|
574
|
+
createBaseVNode("div", {
|
|
576
575
|
class: "htw-w-4 htw-h-4 htw-rounded-full htw-border htw-border-black/20 dark:htw-border-white/20",
|
|
577
576
|
style: normalizeStyle({
|
|
578
577
|
backgroundColor: option.color
|
|
@@ -643,20 +642,20 @@ function _sfc_render$3(_ctx, _cache) {
|
|
|
643
642
|
var HatchedPattern = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$3], ["__scopeId", "data-v-250960ac"]]);
|
|
644
643
|
const _sfc_main$l = {};
|
|
645
644
|
const _hoisted_1$j = { fill: "none" };
|
|
646
|
-
const _hoisted_2$h = /* @__PURE__ */
|
|
645
|
+
const _hoisted_2$h = /* @__PURE__ */ createBaseVNode("pattern", {
|
|
647
646
|
id: "checkerboard",
|
|
648
647
|
width: "64",
|
|
649
648
|
height: "64",
|
|
650
649
|
patternUnits: "userSpaceOnUse"
|
|
651
650
|
}, [
|
|
652
|
-
/* @__PURE__ */
|
|
651
|
+
/* @__PURE__ */ createBaseVNode("rect", {
|
|
653
652
|
x: "0",
|
|
654
653
|
y: "0",
|
|
655
654
|
width: "32",
|
|
656
655
|
height: "32",
|
|
657
656
|
fill: "currentColor"
|
|
658
657
|
}),
|
|
659
|
-
/* @__PURE__ */
|
|
658
|
+
/* @__PURE__ */ createBaseVNode("rect", {
|
|
660
659
|
x: "32",
|
|
661
660
|
y: "32",
|
|
662
661
|
width: "32",
|
|
@@ -664,7 +663,7 @@ const _hoisted_2$h = /* @__PURE__ */ createElementVNode("pattern", {
|
|
|
664
663
|
fill: "currentColor"
|
|
665
664
|
})
|
|
666
665
|
], -1);
|
|
667
|
-
const _hoisted_3$a = /* @__PURE__ */
|
|
666
|
+
const _hoisted_3$a = /* @__PURE__ */ createBaseVNode("rect", {
|
|
668
667
|
x: "0",
|
|
669
668
|
y: "0",
|
|
670
669
|
width: "100%",
|
|
@@ -687,7 +686,7 @@ const _hoisted_2$g = {
|
|
|
687
686
|
};
|
|
688
687
|
const _hoisted_3$9 = { class: "htw-p-4 htw-h-full htw-relative" };
|
|
689
688
|
const _hoisted_4$6 = { class: "htw-w-full htw-h-full htw-border htw-border-gray-100 dark:htw-border-gray-800 htw-rounded-sm htw-relative" };
|
|
690
|
-
const _hoisted_5$4 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */
|
|
689
|
+
const _hoisted_5$4 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createBaseVNode("div", { class: "bind-preview-bg htw-absolute htw-inset-0" }, null, -1));
|
|
691
690
|
const _hoisted_6$4 = /* @__PURE__ */ createStaticVNode('<div class="htw-absolute htw-top-1 htw-left-4 htw-h-2 htw-w-px htw-bg-gray-200 dark:htw-bg-gray-800" data-v-769a585e></div><div class="htw-absolute htw-top-1 htw-right-4 htw-h-2 htw-w-px htw-bg-gray-200 dark:htw-bg-gray-800" data-v-769a585e></div><div class="htw-absolute htw-bottom-1 htw-left-4 htw-h-2 htw-w-px htw-bg-gray-200 dark:htw-bg-gray-800" data-v-769a585e></div><div class="htw-absolute htw-bottom-1 htw-right-4 htw-h-2 htw-w-px htw-bg-gray-200 dark:htw-bg-gray-800" data-v-769a585e></div><div class="htw-absolute htw-left-1 htw-top-4 htw-w-2 htw-h-px htw-bg-gray-200 dark:htw-bg-gray-800" data-v-769a585e></div><div class="htw-absolute htw-left-1 htw-bottom-4 htw-w-2 htw-h-px htw-bg-gray-200 dark:htw-bg-gray-800" data-v-769a585e></div><div class="htw-absolute htw-right-1 htw-top-4 htw-w-2 htw-h-px htw-bg-gray-200 dark:htw-bg-gray-800" data-v-769a585e></div><div class="htw-absolute htw-right-1 htw-bottom-4 htw-w-2 htw-h-px htw-bg-gray-200 dark:htw-bg-gray-800" data-v-769a585e></div>', 8);
|
|
692
691
|
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
693
692
|
name: "StoryResponsivePreview",
|
|
@@ -789,19 +788,19 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
789
788
|
unref(isResponsiveEnabled) ? (openBlock(), createElementBlock("div", _hoisted_2$g, [
|
|
790
789
|
createVNode(HatchedPattern, { class: "htw-w-full htw-h-full htw-text-black/[2%] dark:htw-text-white/[2%]" })
|
|
791
790
|
])) : createCommentVNode("", true),
|
|
792
|
-
|
|
791
|
+
createBaseVNode("div", {
|
|
793
792
|
ref_key: "previewWrapper",
|
|
794
793
|
ref: previewWrapper,
|
|
795
794
|
class: "htw-h-full htw-overflow-auto htw-relative"
|
|
796
795
|
}, [
|
|
797
|
-
|
|
796
|
+
createBaseVNode("div", {
|
|
798
797
|
class: normalizeClass(["htw-h-full htw-p-4 htw-overflow-hidden htw-bg-white dark:htw-bg-gray-700 htw-rounded-lg htw-relative", unref(isResponsiveEnabled) ? {
|
|
799
798
|
"htw-w-fit": !!unref(finalWidth),
|
|
800
799
|
"htw-h-fit": !!unref(finalHeight)
|
|
801
800
|
} : void 0])
|
|
802
801
|
}, [
|
|
803
|
-
|
|
804
|
-
|
|
802
|
+
createBaseVNode("div", _hoisted_3$9, [
|
|
803
|
+
createBaseVNode("div", _hoisted_4$6, [
|
|
805
804
|
_hoisted_5$4,
|
|
806
805
|
unref(settings).checkerboard ? (openBlock(), createBlock(CheckerboardPattern, {
|
|
807
806
|
key: 0,
|
|
@@ -817,7 +816,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
817
816
|
_hoisted_6$4
|
|
818
817
|
]),
|
|
819
818
|
unref(isResponsiveEnabled) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
820
|
-
|
|
819
|
+
createBaseVNode("div", {
|
|
821
820
|
ref_key: "horizontalDragger",
|
|
822
821
|
ref: horizontalDragger,
|
|
823
822
|
class: "htw-absolute htw-w-4 htw-top-0 htw-bottom-4 htw-right-0 hover:htw-bg-primary-100 dark:hover:htw-bg-primary-800 htw-flex htw-items-center htw-justify-center htw-cursor-ew-resize htw-group hover:htw-text-primary-500"
|
|
@@ -827,7 +826,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
827
826
|
class: "htw-w-4 htw-h-4 htw-opacity-20 group-hover:htw-opacity-90"
|
|
828
827
|
})
|
|
829
828
|
], 512),
|
|
830
|
-
|
|
829
|
+
createBaseVNode("div", {
|
|
831
830
|
ref_key: "verticalDragger",
|
|
832
831
|
ref: verticalDragger,
|
|
833
832
|
class: "htw-absolute htw-h-4 htw-left-0 htw-right-4 htw-bottom-0 hover:htw-bg-primary-100 dark:hover:htw-bg-primary-800 htw-flex htw-items-center htw-justify-center htw-cursor-ns-resize htw-group hover:htw-text-primary-500"
|
|
@@ -837,7 +836,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
837
836
|
class: "htw-w-4 htw-h-4 htw-opacity-20 group-hover:htw-opacity-90"
|
|
838
837
|
})
|
|
839
838
|
], 512),
|
|
840
|
-
|
|
839
|
+
createBaseVNode("div", {
|
|
841
840
|
ref_key: "cornerDragger",
|
|
842
841
|
ref: cornerDragger,
|
|
843
842
|
class: "htw-absolute htw-w-4 htw-h-4 htw-right-0 htw-bottom-0 hover:htw-bg-primary-100 dark:hover:htw-bg-primary-800 htw-flex htw-items-center htw-justify-center htw-cursor-nwse-resize htw-group hover:htw-text-primary-500"
|
|
@@ -869,13 +868,13 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
869
868
|
return (_ctx, _cache) => {
|
|
870
869
|
return openBlock(), createBlock(StoryResponsivePreview, { variant: __props.variant }, {
|
|
871
870
|
default: withCtx(({ isResponsiveEnabled, finalWidth, finalHeight }) => [
|
|
872
|
-
|
|
871
|
+
createBaseVNode("div", {
|
|
873
872
|
style: normalizeStyle(isResponsiveEnabled ? {
|
|
874
873
|
width: finalWidth ? `${finalWidth}px` : "100%",
|
|
875
874
|
height: finalHeight ? `${finalHeight}px` : "100%"
|
|
876
875
|
} : { width: "100%", height: "100%" })
|
|
877
876
|
}, [
|
|
878
|
-
(openBlock(), createBlock(_sfc_main$
|
|
877
|
+
(openBlock(), createBlock(_sfc_main$w, {
|
|
879
878
|
key: `${__props.story.id}-${__props.variant.id}`,
|
|
880
879
|
variant: __props.variant,
|
|
881
880
|
story: __props.story,
|
|
@@ -977,7 +976,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
977
976
|
return (_ctx, _cache) => {
|
|
978
977
|
return openBlock(), createBlock(StoryResponsivePreview, { variant: __props.variant }, {
|
|
979
978
|
default: withCtx(({ isResponsiveEnabled, finalWidth, finalHeight, resizing }) => [
|
|
980
|
-
|
|
979
|
+
createBaseVNode("iframe", {
|
|
981
980
|
ref_key: "iframe",
|
|
982
981
|
ref: iframe,
|
|
983
982
|
src: unref(sandboxUrl),
|
|
@@ -1084,7 +1083,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
1084
1083
|
}, null, 8, ["variant", "story"])) : createCommentVNode("", true)
|
|
1085
1084
|
])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1086
1085
|
unref(isMobile) ? (openBlock(), createElementBlock("div", _hoisted_2$e, [
|
|
1087
|
-
|
|
1086
|
+
createBaseVNode("a", {
|
|
1088
1087
|
class: "htw-px-6 htw-h-12 hover:htw-text-primary-500 dark:hover:htw-text-primary-400 htw-cursor-pointer htw-flex htw-gap-2 htw-flex-wrap htw-w-full htw-items-center",
|
|
1089
1088
|
onClick: openMenu
|
|
1090
1089
|
}, [
|
|
@@ -1120,7 +1119,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
1120
1119
|
"default-split": 17
|
|
1121
1120
|
}, {
|
|
1122
1121
|
first: withCtx(() => [
|
|
1123
|
-
|
|
1122
|
+
createBaseVNode("div", _hoisted_5$3, [
|
|
1124
1123
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(storyStore).currentStory.variants, (variant2, index) => {
|
|
1125
1124
|
return openBlock(), createBlock(StoryVariantListItem, {
|
|
1126
1125
|
key: index,
|
|
@@ -1165,10 +1164,10 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
1165
1164
|
});
|
|
1166
1165
|
return (_ctx, _cache) => {
|
|
1167
1166
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
1168
|
-
|
|
1167
|
+
createBaseVNode("div", _hoisted_1$e, [
|
|
1169
1168
|
unref(storyStore).currentStory.layout.type === "grid" ? (openBlock(), createBlock(_sfc_main$s, { key: 0 })) : unref(storyStore).currentStory.layout.type === "single" ? (openBlock(), createBlock(StoryVariantSingle, { key: 1 })) : createCommentVNode("", true)
|
|
1170
1169
|
]),
|
|
1171
|
-
createVNode(_sfc_main$
|
|
1170
|
+
createVNode(_sfc_main$v, {
|
|
1172
1171
|
title: "Select a variant",
|
|
1173
1172
|
opened: isMenuOpened.value,
|
|
1174
1173
|
onClose: closeMenu
|
|
@@ -1216,7 +1215,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
1216
1215
|
return (_ctx, _cache) => {
|
|
1217
1216
|
return openBlock(), createBlock(unref(Dropdown), { "auto-size": "" }, {
|
|
1218
1217
|
popper: withCtx(({ hide }) => [
|
|
1219
|
-
|
|
1218
|
+
createBaseVNode("div", _hoisted_3$7, [
|
|
1220
1219
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(formattedOptions), (label, value) => {
|
|
1221
1220
|
return openBlock(), createElementBlock("div", mergeProps(__spreadProps(__spreadValues({}, _ctx.$attrs), { class: null, style: null }), {
|
|
1222
1221
|
key: label,
|
|
@@ -1236,8 +1235,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
1236
1235
|
])
|
|
1237
1236
|
]),
|
|
1238
1237
|
default: withCtx(() => [
|
|
1239
|
-
|
|
1240
|
-
|
|
1238
|
+
createBaseVNode("div", _hoisted_1$d, [
|
|
1239
|
+
createBaseVNode("div", _hoisted_2$d, [
|
|
1241
1240
|
renderSlot(_ctx.$slots, "default", { label: unref(selectedLabel) }, () => [
|
|
1242
1241
|
createTextVNode(toDisplayString(unref(selectedLabel)), 1)
|
|
1243
1242
|
])
|
|
@@ -1347,7 +1346,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
1347
1346
|
return (_ctx, _cache) => {
|
|
1348
1347
|
const _directive_tooltip = resolveDirective("tooltip");
|
|
1349
1348
|
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
1350
|
-
|
|
1349
|
+
createBaseVNode("div", {
|
|
1351
1350
|
ref_key: "select",
|
|
1352
1351
|
ref: select,
|
|
1353
1352
|
class: "htw-flex-1 htw-min-w-0"
|
|
@@ -1376,7 +1375,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
1376
1375
|
}, null, 8, _hoisted_2$c)), [
|
|
1377
1376
|
[vModelText, unref(presetStates).get(unref(selectedOption)).label]
|
|
1378
1377
|
]) : (openBlock(), createElementBlock("div", _hoisted_3$6, [
|
|
1379
|
-
|
|
1378
|
+
createBaseVNode("span", _hoisted_4$3, toDisplayString(label), 1),
|
|
1380
1379
|
unref(canEdit) ? withDirectives((openBlock(), createBlock(unref(Icon), {
|
|
1381
1380
|
key: 0,
|
|
1382
1381
|
icon: "carbon:edit",
|
|
@@ -1388,8 +1387,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
1388
1387
|
]))
|
|
1389
1388
|
]),
|
|
1390
1389
|
option: withCtx(({ label, value }) => [
|
|
1391
|
-
|
|
1392
|
-
|
|
1390
|
+
createBaseVNode("div", _hoisted_5$2, [
|
|
1391
|
+
createBaseVNode("span", _hoisted_6$2, toDisplayString(label), 1),
|
|
1393
1392
|
value !== DEFAULT_ID ? withDirectives((openBlock(), createBlock(unref(Icon), {
|
|
1394
1393
|
key: 0,
|
|
1395
1394
|
icon: "carbon:trash-can",
|
|
@@ -1525,8 +1524,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
1525
1524
|
}
|
|
1526
1525
|
});
|
|
1527
1526
|
const _hoisted_1$b = { class: "htw-font-mono htw-p-2 htw-flex htw-items-center htw-gap-1" };
|
|
1528
|
-
const _hoisted_2$b = /* @__PURE__ */
|
|
1529
|
-
const _hoisted_3$5 = /* @__PURE__ */
|
|
1527
|
+
const _hoisted_2$b = /* @__PURE__ */ createBaseVNode("span", { class: "htw-opacity-30" }, "<", -1);
|
|
1528
|
+
const _hoisted_3$5 = /* @__PURE__ */ createBaseVNode("span", { class: "htw-opacity-30" }, ">", -1);
|
|
1530
1529
|
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
1531
1530
|
name: "ControlsComponentProps",
|
|
1532
1531
|
props: {
|
|
@@ -1537,14 +1536,14 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
1537
1536
|
return (_ctx, _cache) => {
|
|
1538
1537
|
const _directive_tooltip = resolveDirective("tooltip");
|
|
1539
1538
|
return openBlock(), createElementBlock("div", null, [
|
|
1540
|
-
|
|
1539
|
+
createBaseVNode("div", _hoisted_1$b, [
|
|
1541
1540
|
withDirectives(createVNode(unref(Icon), {
|
|
1542
1541
|
icon: "carbon:flash",
|
|
1543
1542
|
class: "htw-w-4 htw-h-4 htw-text-primary-500 htw-flex-none"
|
|
1544
1543
|
}, null, 512), [
|
|
1545
1544
|
[_directive_tooltip, "Auto-detected props"]
|
|
1546
1545
|
]),
|
|
1547
|
-
|
|
1546
|
+
createBaseVNode("div", null, [
|
|
1548
1547
|
_hoisted_2$b,
|
|
1549
1548
|
createTextVNode(toDisplayString(__props.definition.name), 1),
|
|
1550
1549
|
_hoisted_3$5
|
|
@@ -1567,7 +1566,7 @@ const _hoisted_1$a = {
|
|
|
1567
1566
|
class: "htw-flex htw-flex-col htw-divide-y htw-divide-gray-100 dark:htw-divide-gray-750"
|
|
1568
1567
|
};
|
|
1569
1568
|
const _hoisted_2$a = { class: "htw-h-9 htw-flex-none htw-px-2 htw-flex htw-items-center" };
|
|
1570
|
-
const _hoisted_3$4 = /* @__PURE__ */
|
|
1569
|
+
const _hoisted_3$4 = /* @__PURE__ */ createBaseVNode("span", null, "No controls available for this story", -1);
|
|
1571
1570
|
const _hoisted_4$2 = { key: 2 };
|
|
1572
1571
|
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
1573
1572
|
name: "StoryControls",
|
|
@@ -1585,13 +1584,13 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
1585
1584
|
return (_ctx, _cache) => {
|
|
1586
1585
|
var _a, _b, _c, _d;
|
|
1587
1586
|
return openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
1588
|
-
|
|
1587
|
+
createBaseVNode("div", _hoisted_2$a, [
|
|
1589
1588
|
createVNode(_sfc_main$d, {
|
|
1590
1589
|
story: __props.story,
|
|
1591
1590
|
variant: __props.variant
|
|
1592
1591
|
}, null, 8, ["story", "variant"])
|
|
1593
1592
|
]),
|
|
1594
|
-
__props.variant.slots().controls || __props.story.slots().controls ? (openBlock(), createBlock(_sfc_main$
|
|
1593
|
+
__props.variant.slots().controls || __props.story.slots().controls ? (openBlock(), createBlock(_sfc_main$w, {
|
|
1595
1594
|
key: 0,
|
|
1596
1595
|
"slot-name": "controls",
|
|
1597
1596
|
variant: __props.variant,
|
|
@@ -1696,12 +1695,12 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
1696
1695
|
"data-test-id": "event-item"
|
|
1697
1696
|
}, {
|
|
1698
1697
|
default: withCtx(({ shown }) => [
|
|
1699
|
-
|
|
1698
|
+
createBaseVNode("div", {
|
|
1700
1699
|
class: normalizeClass(["group-hover:htw-bg-primary-100 dark:group-hover:htw-bg-primary-700 htw-cursor-pointer htw-py-2 htw-px-4 htw-flex htw-items-baseline htw-gap-1 htw-leading-normal", [
|
|
1701
1700
|
shown ? "htw-bg-primary-50 dark:htw-bg-primary-600" : "group-odd:htw-bg-gray-100/50 dark:group-odd:htw-bg-gray-750/40"
|
|
1702
1701
|
]])
|
|
1703
1702
|
}, [
|
|
1704
|
-
|
|
1703
|
+
createBaseVNode("span", {
|
|
1705
1704
|
class: normalizeClass({
|
|
1706
1705
|
"htw-text-primary-500": shown
|
|
1707
1706
|
})
|
|
@@ -1710,8 +1709,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
1710
1709
|
], 2)
|
|
1711
1710
|
]),
|
|
1712
1711
|
popper: withCtx(() => [
|
|
1713
|
-
|
|
1714
|
-
|
|
1712
|
+
createBaseVNode("div", _hoisted_2$8, [
|
|
1713
|
+
createBaseVNode("pre", _hoisted_3$3, toDisplayString(__props.event.argument), 1)
|
|
1715
1714
|
])
|
|
1716
1715
|
]),
|
|
1717
1716
|
_: 1
|
|
@@ -1768,8 +1767,8 @@ const _hoisted_2$6 = {
|
|
|
1768
1767
|
key: 0,
|
|
1769
1768
|
class: "htw-h-10 htw-flex-none htw-border-b htw-border-solid htw-border-gray-150 dark:htw-border-gray-850 htw-px-4 htw-flex htw-items-center"
|
|
1770
1769
|
};
|
|
1771
|
-
const _hoisted_3$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */
|
|
1772
|
-
const _hoisted_4$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */
|
|
1770
|
+
const _hoisted_3$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("div", { class: "htw-text-gray-900 dark:htw-text-gray-100" }, " Source ", -1));
|
|
1771
|
+
const _hoisted_4$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("div", { class: "htw-flex-1" }, null, -1));
|
|
1773
1772
|
const _hoisted_5$1 = {
|
|
1774
1773
|
key: 1,
|
|
1775
1774
|
class: "htw-text-red-500 htw-h-full htw-p-2 htw-overflow-auto htw-font-mono htw-text-sm"
|
|
@@ -1853,7 +1852,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1853
1852
|
readonly: "",
|
|
1854
1853
|
"data-test-id": "story-source-code"
|
|
1855
1854
|
}, null, 8, _hoisted_6$1)) : (openBlock(), createElementBlock("div", _hoisted_7$1, [
|
|
1856
|
-
|
|
1855
|
+
createBaseVNode("div", {
|
|
1857
1856
|
class: "__histoire-code htw-p-4 htw-w-fit",
|
|
1858
1857
|
innerHTML: unref(sourceHtml)
|
|
1859
1858
|
}, null, 8, _hoisted_8$1)
|
|
@@ -1885,7 +1884,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1885
1884
|
const _component_router_link = resolveComponent("router-link");
|
|
1886
1885
|
return openBlock(), createBlock(_component_router_link, mergeProps(_ctx.$attrs, { custom: "" }), {
|
|
1887
1886
|
default: withCtx(({ isActive, isExactActive, href, navigate }) => [
|
|
1888
|
-
|
|
1887
|
+
createBaseVNode("a", mergeProps(_ctx.$attrs, {
|
|
1889
1888
|
href,
|
|
1890
1889
|
class: ["htw-px-4 htw-h-full htw-inline-flex htw-items-center hover:htw-bg-primary-50 dark:hover:htw-bg-primary-900 htw-relative htw-text-gray-900 dark:htw-text-gray-100", {
|
|
1891
1890
|
"htw-text-primary-500 dark:htw-text-primary-400": _ctx.matched != null ? _ctx.matched : _ctx.exact && isExactActive || !_ctx.exact && isActive
|
|
@@ -1974,7 +1973,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1974
1973
|
}),
|
|
1975
1974
|
unref(visibleChildrenCount) < children.value.size ? (openBlock(), createBlock(_component_VDropdown, { key: 0 }, {
|
|
1976
1975
|
popper: withCtx(() => [
|
|
1977
|
-
|
|
1976
|
+
createBaseVNode("div", _hoisted_2$4, [
|
|
1978
1977
|
createVNode(ChildrenSlice, { start: unref(visibleChildrenCount) }, {
|
|
1979
1978
|
default: withCtx(() => [
|
|
1980
1979
|
renderSlot(_ctx.$slots, "overflow")
|
|
@@ -1984,7 +1983,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1984
1983
|
])
|
|
1985
1984
|
]),
|
|
1986
1985
|
default: withCtx(() => [
|
|
1987
|
-
|
|
1986
|
+
createBaseVNode("div", _hoisted_1$4, [
|
|
1988
1987
|
createVNode(unref(Icon), {
|
|
1989
1988
|
icon: "carbon:caret-down",
|
|
1990
1989
|
class: "htw-w-4 htw-h-4 htw-opacity-50 group-hover:htw-opacity-100"
|
|
@@ -2019,7 +2018,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2019
2018
|
const _component_router_link = resolveComponent("router-link");
|
|
2020
2019
|
return openBlock(), createBlock(_component_router_link, mergeProps(_ctx.$attrs, { custom: "" }), {
|
|
2021
2020
|
default: withCtx(({ isActive, isExactActive, href, navigate }) => [
|
|
2022
|
-
|
|
2021
|
+
createBaseVNode("a", mergeProps(_ctx.$attrs, {
|
|
2023
2022
|
href,
|
|
2024
2023
|
class: ["htw-px-4 htw-h-10 htw-min-w-[150px] htw-inline-flex htw-items-center hover:htw-bg-primary-50 dark:hover:htw-bg-primary-900 htw-relative htw-text-gray-900 dark:htw-text-gray-100", {
|
|
2025
2024
|
"htw-text-primary-500 dark:htw-text-primary-400": _ctx.matched != null ? _ctx.matched : _ctx.exact && isExactActive || !_ctx.exact && isActive
|
|
@@ -2124,8 +2123,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2124
2123
|
};
|
|
2125
2124
|
}
|
|
2126
2125
|
});
|
|
2127
|
-
const _hoisted_1$1 = /* @__PURE__ */
|
|
2128
|
-
const _hoisted_2$1 = /* @__PURE__ */
|
|
2126
|
+
const _hoisted_1$1 = /* @__PURE__ */ createBaseVNode("span", null, "Select a variant", -1);
|
|
2127
|
+
const _hoisted_2$1 = /* @__PURE__ */ createBaseVNode("span", null, "Loading...", -1);
|
|
2129
2128
|
const _hoisted_3 = { class: "htw-flex htw-flex-col htw-h-full" };
|
|
2130
2129
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
2131
2130
|
name: "StorySidePanel",
|
|
@@ -2161,7 +2160,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2161
2160
|
"data-test-id": "story-side-panel"
|
|
2162
2161
|
}, {
|
|
2163
2162
|
first: withCtx(() => [
|
|
2164
|
-
|
|
2163
|
+
createBaseVNode("div", _hoisted_3, [
|
|
2165
2164
|
createVNode(_sfc_main$2),
|
|
2166
2165
|
(openBlock(), createBlock(resolveDynamicComponent(unref(panelContentComponent)), {
|
|
2167
2166
|
story: unref(storyStore).currentStory,
|