@histoire/controls 0.5.4 → 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.8aa4bc3b.js → BaseEmpty.d30f3079.js} +2 -2
- package/.histoire/dist/assets/{HomeView.271c9c7c.js → HomeView.8e044be6.js} +2 -2
- package/.histoire/dist/assets/{HstCheckbox.story.cad3e2eb.js → HstCheckbox.story.3d04d85b.js} +4 -4
- package/.histoire/dist/assets/{HstColorShades.story.2a2cbbd2.js → HstColorShades.story.68cf74d1.js} +4 -4
- package/.histoire/dist/assets/{HstCopyIcon.74d90656.js → HstCopyIcon.e40e725e.js} +2 -2
- package/.histoire/dist/assets/{HstNumber.story.526bb256.js → HstNumber.story.1e1964ff.js} +4 -4
- package/.histoire/dist/assets/{HstSelect.story.69610f25.js → HstSelect.story.04860383.js} +5 -5
- package/.histoire/dist/assets/{HstText.story.b799feba.js → HstText.story.c915d831.js} +4 -4
- package/.histoire/dist/assets/{HstTextarea.story.267a7424.js → HstTextarea.story.802b9c26.js} +4 -4
- package/.histoire/dist/assets/{HstTokenGrid.story.6a513124.js → HstTokenGrid.story.025819d6.js} +4 -4
- package/.histoire/dist/assets/{HstTokenList.story.77c128e2.js → HstTokenList.story.d3aa6575.js} +4 -4
- package/.histoire/dist/assets/{HstWrapper.db38d03c.js → HstWrapper.246b6982.js} +2 -2
- package/.histoire/dist/assets/{SearchPane.825d58dc.js → SearchPane.daa2675c.js} +6 -6
- package/.histoire/dist/assets/{StoryView.868eb853.js → StoryView.2f64dad1.js} +6 -6
- package/.histoire/dist/assets/{bundle-main.91102366.js → bundle-main.784e5bf7.js} +5 -5
- package/.histoire/dist/assets/{bundle-sandbox.f9a78013.js → bundle-sandbox.5e153933.js} +3 -3
- package/.histoire/dist/assets/{const.117f9cf7.js → const.268165fd.js} +2 -3
- package/.histoire/dist/assets/{global-components.dcf6d1cd.js → global-components.6736b2a9.js} +24 -16
- package/.histoire/dist/assets/{search-docs-data.c53e1db7.js → search-docs-data.b9a75539.js} +1 -1
- package/.histoire/dist/assets/{vendor.b04725bf.js → vendor.2833ae3d.js} +29 -21
- 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
- package/histoire-dist/__sandbox.html +0 -15
- package/histoire-dist/assets/BaseEmpty.a84c14c8.js +0 -1
- package/histoire-dist/assets/HomeView.f524bd4b.js +0 -1
- package/histoire-dist/assets/HstCheckbox.story.9f622545.js +0 -1
- package/histoire-dist/assets/HstInput.story.945401ce.js +0 -1
- package/histoire-dist/assets/SearchModal.76c035f2.js +0 -1
- package/histoire-dist/assets/StoryView.e4c41518.js +0 -15
- package/histoire-dist/assets/global-components.84d0ab22.js +0 -1
- package/histoire-dist/assets/histoire-text-dark.a529813a.svg +0 -89
- package/histoire-dist/assets/histoire-text.1d4474b5.svg +0 -89
- package/histoire-dist/assets/histoire.8af7bd1f.svg +0 -51
- package/histoire-dist/assets/index.58f51dd0.js +0 -1
- package/histoire-dist/assets/preview-settings.a634d101.js +0 -1
- package/histoire-dist/assets/sandbox.2c60450a.js +0 -1
- package/histoire-dist/assets/style.7657d2ac.css +0 -1
- package/histoire-dist/assets/vendor.70a554f6.js +0 -9
- package/histoire-dist/index.html +0 -15
package/.histoire/dist/assets/{global-components.dcf6d1cd.js → global-components.6736b2a9.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as defineAsyncComponent, X as useDark, Y as useToggle, P as isRef, i as unref, d as defineComponent, V as pushScopeId, W as popScopeId, a as openBlock, b as createElementBlock, M as withDirectives, R as createTextVNode, t as toDisplayString, e as createBaseVNode, f as renderSlot, r as ref, c as computed, w as watch, j as createBlock, k as withCtx, n as normalizeClass, v as withKeys, g as withModifiers, x as mergeProps, h as normalizeStyle, o as onUnmounted, Z as vModelText, _ as h, J as renderList, F as Fragment, l as createVNode, m as createCommentVNode, $ as nextTick, a0 as normalizeProps, a1 as guardReactiveProps, a2 as withScopeId, q as resolveComponent, a3 as getCurrentScope, a4 as onScopeDispose, D as createApp, a5 as useAttrs, a6 as getCurrentInstance, a7 as inject, a8 as provide, a9 as markRaw } from "./vendor.
|
|
1
|
+
import { N as defineAsyncComponent, X as useDark, Y as useToggle, P as isRef, i as unref, d as defineComponent, V as pushScopeId, W as popScopeId, a as openBlock, b as createElementBlock, M as withDirectives, R as createTextVNode, t as toDisplayString, e as createBaseVNode, f as renderSlot, r as ref, c as computed, w as watch, j as createBlock, k as withCtx, n as normalizeClass, v as withKeys, g as withModifiers, x as mergeProps, h as normalizeStyle, o as onUnmounted, Z as vModelText, _ as h, J as renderList, F as Fragment, l as createVNode, m as createCommentVNode, $ as nextTick, a0 as normalizeProps, a1 as guardReactiveProps, a2 as withScopeId, q as resolveComponent, a3 as getCurrentScope, a4 as onScopeDispose, D as createApp, a5 as useAttrs, a6 as getCurrentInstance, a7 as inject, a8 as provide, a9 as markRaw } from "./vendor.2833ae3d.js";
|
|
2
2
|
const scriptRel = "modulepreload";
|
|
3
3
|
const seen = {};
|
|
4
4
|
const base = "/";
|
|
@@ -32,15 +32,15 @@ const __vitePreload = function preload(baseModule, deps) {
|
|
|
32
32
|
}
|
|
33
33
|
})).then(() => baseModule());
|
|
34
34
|
};
|
|
35
|
-
const Comp0 = defineAsyncComponent(() => __vitePreload(() => import("./HstCheckbox.story.
|
|
36
|
-
const Comp1 = defineAsyncComponent(() => __vitePreload(() => import("./HstColorShades.story.
|
|
37
|
-
const Comp2 = defineAsyncComponent(() => __vitePreload(() => import("./HstTokenGrid.story.
|
|
38
|
-
const Comp3 = defineAsyncComponent(() => __vitePreload(() => import("./HstTokenList.story.
|
|
39
|
-
const Comp4 = defineAsyncComponent(() => __vitePreload(() => import("./HstNumber.story.
|
|
40
|
-
const Comp5 = defineAsyncComponent(() => __vitePreload(() => import("./HstSelect.story.
|
|
41
|
-
const Comp6 = defineAsyncComponent(() => __vitePreload(() => import("./
|
|
42
|
-
const Comp7 = defineAsyncComponent(() => __vitePreload(() => import("./
|
|
43
|
-
const Comp8 = defineAsyncComponent(() => __vitePreload(() => import("./vendor.
|
|
35
|
+
const Comp0 = defineAsyncComponent(() => __vitePreload(() => import("./HstCheckbox.story.3d04d85b.js"), true ? ["assets/HstCheckbox.story.3d04d85b.js","assets/vendor.2833ae3d.js","assets/HstWrapper.246b6982.js"] : void 0));
|
|
36
|
+
const Comp1 = defineAsyncComponent(() => __vitePreload(() => import("./HstColorShades.story.68cf74d1.js"), true ? ["assets/HstColorShades.story.68cf74d1.js","assets/vendor.2833ae3d.js","assets/HstCopyIcon.e40e725e.js"] : void 0));
|
|
37
|
+
const Comp2 = defineAsyncComponent(() => __vitePreload(() => import("./HstTokenGrid.story.025819d6.js"), true ? ["assets/HstTokenGrid.story.025819d6.js","assets/vendor.2833ae3d.js","assets/HstCopyIcon.e40e725e.js"] : void 0));
|
|
38
|
+
const Comp3 = defineAsyncComponent(() => __vitePreload(() => import("./HstTokenList.story.d3aa6575.js"), true ? ["assets/HstTokenList.story.d3aa6575.js","assets/vendor.2833ae3d.js","assets/HstCopyIcon.e40e725e.js"] : void 0));
|
|
39
|
+
const Comp4 = defineAsyncComponent(() => __vitePreload(() => import("./HstNumber.story.1e1964ff.js"), true ? ["assets/HstNumber.story.1e1964ff.js","assets/vendor.2833ae3d.js","assets/HstWrapper.246b6982.js"] : void 0));
|
|
40
|
+
const Comp5 = defineAsyncComponent(() => __vitePreload(() => import("./HstSelect.story.04860383.js"), true ? ["assets/HstSelect.story.04860383.js","assets/vendor.2833ae3d.js","assets/HstWrapper.246b6982.js"] : void 0));
|
|
41
|
+
const Comp6 = defineAsyncComponent(() => __vitePreload(() => import("./HstTextarea.story.802b9c26.js"), true ? ["assets/HstTextarea.story.802b9c26.js","assets/vendor.2833ae3d.js","assets/HstWrapper.246b6982.js"] : void 0));
|
|
42
|
+
const Comp7 = defineAsyncComponent(() => __vitePreload(() => import("./HstText.story.c915d831.js"), true ? ["assets/HstText.story.c915d831.js","assets/vendor.2833ae3d.js","assets/HstWrapper.246b6982.js"] : void 0));
|
|
43
|
+
const Comp8 = defineAsyncComponent(() => __vitePreload(() => import("./vendor.2833ae3d.js").then(function(n) {
|
|
44
44
|
return n.aA;
|
|
45
45
|
}), true ? [] : void 0));
|
|
46
46
|
let files = [
|
|
@@ -50,11 +50,11 @@ let files = [
|
|
|
50
50
|
{ "id": "src-components-design-tokens-hsttokenlist-story-vue", "path": ["design-tokens", "HstTokenList"], "story": { "id": "src-components-design-tokens-hsttokenlist-story-vue", "title": "HstTokenList", "group": null, "layout": { "type": "single", "iframe": true }, "icon": null, "iconColor": null, "docsOnly": false, "variants": [{ "id": "src-components-design-tokens-hsttokenlist-story-vue-0", "title": "default", "icon": null, "iconColor": null }] }, "framework": "vue3", "index": 3, component: Comp3 },
|
|
51
51
|
{ "id": "src-components-number-hstnumber-story-vue", "path": ["HstNumber"], "story": { "id": "src-components-number-hstnumber-story-vue", "title": "HstNumber", "group": null, "layout": { "type": "single", "iframe": true }, "icon": null, "iconColor": null, "docsOnly": false, "variants": [{ "id": "src-components-number-hstnumber-story-vue-0", "title": "default", "icon": null, "iconColor": null }] }, "framework": "vue3", "index": 4, component: Comp4 },
|
|
52
52
|
{ "id": "src-components-select-hstselect-story-vue", "path": ["HstSelect"], "story": { "id": "src-components-select-hstselect-story-vue", "title": "HstSelect", "group": null, "layout": { "type": "grid", "width": "100%" }, "icon": null, "iconColor": null, "docsOnly": false, "variants": [{ "id": "src-components-select-hstselect-story-vue-0", "title": "default", "icon": null, "iconColor": null }, { "id": "src-components-select-hstselect-story-vue-1", "title": "no-label", "icon": null, "iconColor": null }, { "id": "src-components-select-hstselect-story-vue-2", "title": "options-as-object", "icon": null, "iconColor": null }, { "id": "src-components-select-hstselect-story-vue-3", "title": "options-as-array-of-objects", "icon": null, "iconColor": null }, { "id": "src-components-select-hstselect-story-vue-4", "title": "options-as-array-of-strings", "icon": null, "iconColor": null }] }, "framework": "vue3", "index": 5, component: Comp5 },
|
|
53
|
-
{ "id": "src-components-
|
|
54
|
-
{ "id": "src-components-
|
|
53
|
+
{ "id": "src-components-textarea-hsttextarea-story-vue", "path": ["HstTextarea"], "story": { "id": "src-components-textarea-hsttextarea-story-vue", "title": "HstTextarea", "group": null, "layout": { "type": "single", "iframe": true }, "icon": null, "iconColor": null, "docsOnly": false, "variants": [{ "id": "src-components-textarea-hsttextarea-story-vue-0", "title": "default", "icon": null, "iconColor": null }] }, "framework": "vue3", "index": 6, component: Comp6 },
|
|
54
|
+
{ "id": "src-components-text-hsttext-story-vue", "path": ["HstText"], "story": { "id": "src-components-text-hsttext-story-vue", "title": "HstText", "group": null, "layout": { "type": "grid", "width": "100%" }, "icon": null, "iconColor": null, "docsOnly": false, "variants": [{ "id": "src-components-text-hsttext-story-vue-0", "title": "default", "icon": null, "iconColor": null }, { "id": "src-components-text-hsttext-story-vue-1", "title": "no-label", "icon": null, "iconColor": null }] }, "framework": "vue3", "index": 7, component: Comp7 },
|
|
55
55
|
{ "id": "tailwind", "path": ["Tailwind"], "story": { "id": "tailwind", "title": "Tailwind", "group": "design-system", "layout": { "type": "single", "iframe": false }, "icon": "mdi:tailwind", "iconColor": null, "docsOnly": false, "variants": [{ "id": "background-color", "title": "Background Color", "icon": "carbon:color-palette", "iconColor": null }, { "id": "text-color", "title": "Text Color", "icon": "carbon:text-color", "iconColor": null }, { "id": "border-color", "title": "Border Color", "icon": "carbon:color-palette", "iconColor": null }, { "id": "padding", "title": "Padding", "icon": "carbon:area", "iconColor": null }, { "id": "margin", "title": "Margin", "icon": "carbon:area", "iconColor": null }, { "id": "font-size", "title": "Font Size", "icon": "carbon:text-font", "iconColor": null }, { "id": "font-weight", "title": "Font Weight", "icon": "carbon:text-font", "iconColor": null }, { "id": "font-family", "title": "Font Family", "icon": "carbon:text-font", "iconColor": null }, { "id": "letter-spacing", "title": "Letter Spacing", "icon": "carbon:text-font", "iconColor": null }, { "id": "line-height", "title": "Line Height", "icon": "carbon:text-font", "iconColor": null }, { "id": "drop-shadow", "title": "Drop Shadow", "icon": "carbon:shape-except", "iconColor": null }, { "id": "border-radius", "title": "Border Radius", "icon": "carbon:condition-wait-point", "iconColor": null }, { "id": "border-width", "title": "Border Width", "icon": "carbon:checkbox", "iconColor": null }, { "id": "width", "title": "Width", "icon": "carbon:pan-horizontal", "iconColor": null }, { "id": "height", "title": "Height", "icon": "carbon:pan-vertical", "iconColor": null }, { "id": "full-config", "title": "Full Config", "icon": "carbon:code", "iconColor": null }] }, "framework": "vue3", "index": 8, component: Comp8 }
|
|
56
56
|
];
|
|
57
|
-
let tree = [{ "group": true, "id": "design-system", "title": "Design System", "children": [{ "title": "Tailwind", "index": 8 }] }, { "title": "design-tokens", "children": [{ "title": "HstColorShades", "index": 1 }, { "title": "HstTokenGrid", "index": 2 }, { "title": "HstTokenList", "index": 3 }] }, { "title": "HstCheckbox", "index": 0 }, { "title": "HstNumber", "index": 4 }, { "title": "HstSelect", "index": 5 }, { "title": "HstText", "index":
|
|
57
|
+
let tree = [{ "group": true, "id": "design-system", "title": "Design System", "children": [{ "title": "Tailwind", "index": 8 }] }, { "title": "design-tokens", "children": [{ "title": "HstColorShades", "index": 1 }, { "title": "HstTokenGrid", "index": 2 }, { "title": "HstTokenList", "index": 3 }] }, { "title": "HstCheckbox", "index": 0 }, { "title": "HstNumber", "index": 4 }, { "title": "HstSelect", "index": 5 }, { "title": "HstText", "index": 7 }, { "title": "HstTextarea", "index": 6 }];
|
|
58
58
|
const isDark = useDark({ valueDark: "htw-dark" });
|
|
59
59
|
const toggleDark = useToggle(isDark);
|
|
60
60
|
const isObject = (val) => val !== null && typeof val === "object";
|
|
@@ -107,7 +107,7 @@ function applyStateToVariant(variant, state) {
|
|
|
107
107
|
variant.state = state;
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
const config$2 = { "plugins": [{ "name": "tailwind-tokens" }], "outDir": "/
|
|
110
|
+
const config$2 = { "plugins": [{ "name": "tailwind-tokens" }], "outDir": "/Users/akryum/Projects/histoire/packages/histoire-controls/.histoire/dist", "storyMatch": ["**/*.story.vue"], "storyIgnored": ["**/node_modules/**", "**/dist/**"], "tree": { "file": "title", "order": "asc", "groups": [{ "id": "design-system", "title": "Design System" }] }, "theme": { "title": "Histoire controls", "colors": { "primary": { "50": "#ecfdf5", "100": "#d1fae5", "200": "#a7f3d0", "300": "#6ee7b7", "400": "#34d399", "500": "#10b981", "600": "#059669", "700": "#047857", "800": "#065f46", "900": "#064e3b" }, "gray": { "50": "#fafafa", "100": "#f4f4f5", "200": "#e4e4e7", "300": "#d4d4d8", "400": "#a1a1aa", "500": "#71717a", "600": "#52525b", "700": "#3f3f46", "750": "#323238", "800": "#27272a", "850": "#1f1f21", "900": "#18181b", "950": "#101012" } }, "favicon": "/histoire.svg" }, "responsivePresets": [{ "label": "Mobile (Small)", "width": 320, "height": 560 }, { "label": "Mobile (Medium)", "width": 360, "height": 640 }, { "label": "Mobile (Large)", "width": 414, "height": 896 }, { "label": "Tablet", "width": 768, "height": 1024 }, { "label": "Laptop (Small)", "width": 1024, "height": null }, { "label": "Laptop (Large)", "width": 1366, "height": null }, { "label": "Desktop", "width": 1920, "height": null }, { "label": "4K", "width": 3840, "height": null }], "backgroundPresets": [{ "label": "Transparent", "color": "transparent" }, { "label": "White", "color": "#fff" }, { "label": "Light gray", "color": "#aaa" }, { "label": "Dark gray", "color": "#333" }, { "label": "Black", "color": "#000" }], "sandboxDarkClass": "dark", "setupFile": "/src/histoire-setup.ts" };
|
|
111
111
|
const logos = {};
|
|
112
112
|
const histoireConfig = config$2;
|
|
113
113
|
const customLogos = logos;
|
|
@@ -3274,7 +3274,7 @@ function mergeIconData(icon, alias) {
|
|
|
3274
3274
|
}
|
|
3275
3275
|
return result;
|
|
3276
3276
|
}
|
|
3277
|
-
function getIconData$1(data, name, full) {
|
|
3277
|
+
function getIconData$1(data, name, full = false) {
|
|
3278
3278
|
function getIcon(name2, iteration) {
|
|
3279
3279
|
if (data.icons[name2] !== void 0) {
|
|
3280
3280
|
return Object.assign({}, data.icons[name2]);
|
|
@@ -4116,7 +4116,7 @@ function storeCallback(callback, icons, pendingSources) {
|
|
|
4116
4116
|
});
|
|
4117
4117
|
return abort;
|
|
4118
4118
|
}
|
|
4119
|
-
function listToIcons(list, validate, simpleNames2 = false) {
|
|
4119
|
+
function listToIcons(list, validate = true, simpleNames2 = false) {
|
|
4120
4120
|
const result = [];
|
|
4121
4121
|
list.forEach((item) => {
|
|
4122
4122
|
const icon = typeof item === "string" ? stringToIcon(item, false, simpleNames2) : item;
|
|
@@ -5233,6 +5233,14 @@ const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !
|
|
|
5233
5233
|
const globalKey = "__vueuse_ssr_handlers__";
|
|
5234
5234
|
_global[globalKey] = _global[globalKey] || {};
|
|
5235
5235
|
_global[globalKey];
|
|
5236
|
+
var SwipeDirection;
|
|
5237
|
+
(function(SwipeDirection2) {
|
|
5238
|
+
SwipeDirection2["UP"] = "UP";
|
|
5239
|
+
SwipeDirection2["RIGHT"] = "RIGHT";
|
|
5240
|
+
SwipeDirection2["DOWN"] = "DOWN";
|
|
5241
|
+
SwipeDirection2["LEFT"] = "LEFT";
|
|
5242
|
+
SwipeDirection2["NONE"] = "NONE";
|
|
5243
|
+
})(SwipeDirection || (SwipeDirection = {}));
|
|
5236
5244
|
const __default__$3 = {
|
|
5237
5245
|
name: "HstCopyIcon"
|
|
5238
5246
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a9 as markRaw } from "./vendor.
|
|
1
|
+
import { a9 as markRaw } from "./vendor.2833ae3d.js";
|
|
2
2
|
let searchData$1 = { "index": { "reg": "{}", "text.cfg": '{"doc":0,"opt":1}', "text.map": "[{},{},{},{},{},{},{},{},{}]", "text.ctx": "[{}]" }, "idMap": {} };
|
|
3
3
|
const searchData = markRaw(searchData$1);
|
|
4
4
|
function onUpdate(cb) {
|
|
@@ -3344,7 +3344,7 @@ function applyOptions(instance) {
|
|
|
3344
3344
|
if (directives2)
|
|
3345
3345
|
instance.directives = directives2;
|
|
3346
3346
|
}
|
|
3347
|
-
function resolveInjections(injectOptions, ctx, checkDuplicateProperties, unwrapRef = false) {
|
|
3347
|
+
function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP, unwrapRef = false) {
|
|
3348
3348
|
if (isArray(injectOptions)) {
|
|
3349
3349
|
injectOptions = normalizeInject(injectOptions);
|
|
3350
3350
|
}
|
|
@@ -5400,7 +5400,7 @@ function createStaticVNode(content, numberOfNodes) {
|
|
|
5400
5400
|
vnode.staticCount = numberOfNodes;
|
|
5401
5401
|
return vnode;
|
|
5402
5402
|
}
|
|
5403
|
-
function createCommentVNode(text, asBlock) {
|
|
5403
|
+
function createCommentVNode(text = "", asBlock = false) {
|
|
5404
5404
|
return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text);
|
|
5405
5405
|
}
|
|
5406
5406
|
function normalizeVNode(child) {
|
|
@@ -6411,7 +6411,7 @@ const DOMTransitionPropsValidators = {
|
|
|
6411
6411
|
leaveToClass: String
|
|
6412
6412
|
};
|
|
6413
6413
|
Transition.props = /* @__PURE__ */ extend({}, BaseTransition.props, DOMTransitionPropsValidators);
|
|
6414
|
-
const callHook = (hook, args) => {
|
|
6414
|
+
const callHook = (hook, args = []) => {
|
|
6415
6415
|
if (isArray(hook)) {
|
|
6416
6416
|
hook.forEach((h2) => h2(...args));
|
|
6417
6417
|
} else if (hook) {
|
|
@@ -11427,7 +11427,7 @@ function pausableFilter(extendFilter = bypassFilter) {
|
|
|
11427
11427
|
function useDebounceFn(fn, ms = 200, options = {}) {
|
|
11428
11428
|
return createFilterWrapper(debounceFilter(ms, options), fn);
|
|
11429
11429
|
}
|
|
11430
|
-
function refDebounced(value, ms, options = {}) {
|
|
11430
|
+
function refDebounced(value, ms = 200, options = {}) {
|
|
11431
11431
|
if (ms <= 0)
|
|
11432
11432
|
return value;
|
|
11433
11433
|
const debounced = ref(value.value);
|
|
@@ -11565,7 +11565,7 @@ var __objRest$1$1 = (source, exclude) => {
|
|
|
11565
11565
|
}
|
|
11566
11566
|
return target;
|
|
11567
11567
|
};
|
|
11568
|
-
function watchPausable(source, cb, options) {
|
|
11568
|
+
function watchPausable(source, cb, options = {}) {
|
|
11569
11569
|
const _a2 = options, {
|
|
11570
11570
|
eventFilter: filter
|
|
11571
11571
|
} = _a2, watchOptions = __objRest$1$1(_a2, [
|
|
@@ -11937,7 +11937,7 @@ var __spreadValues$e = (a2, b2) => {
|
|
|
11937
11937
|
return a2;
|
|
11938
11938
|
};
|
|
11939
11939
|
var __spreadProps$7 = (a2, b2) => __defProps$7(a2, __getOwnPropDescs$7(b2));
|
|
11940
|
-
function useDark(options) {
|
|
11940
|
+
function useDark(options = {}) {
|
|
11941
11941
|
const {
|
|
11942
11942
|
valueDark = "dark",
|
|
11943
11943
|
valueLight = "",
|
|
@@ -12012,7 +12012,7 @@ function useResizeObserver(target, callback, options = {}) {
|
|
|
12012
12012
|
stop
|
|
12013
12013
|
};
|
|
12014
12014
|
}
|
|
12015
|
-
function useFocus(target, options) {
|
|
12015
|
+
function useFocus(target, options = {}) {
|
|
12016
12016
|
const { initialValue = false } = options;
|
|
12017
12017
|
const activeElement = useActiveElement(options);
|
|
12018
12018
|
const targetElement = computed(() => unrefElement(target));
|
|
@@ -12048,7 +12048,7 @@ var __objRest$1 = (source, exclude) => {
|
|
|
12048
12048
|
}
|
|
12049
12049
|
return target;
|
|
12050
12050
|
};
|
|
12051
|
-
function useMutationObserver(target, callback, options) {
|
|
12051
|
+
function useMutationObserver(target, callback, options = {}) {
|
|
12052
12052
|
const _a2 = options, { window: window2 = defaultWindow } = _a2, mutationOptions = __objRest$1(_a2, ["window"]);
|
|
12053
12053
|
let observer;
|
|
12054
12054
|
const isSupported2 = window2 && "MutationObserver" in window2;
|
|
@@ -12075,6 +12075,14 @@ function useMutationObserver(target, callback, options) {
|
|
|
12075
12075
|
stop
|
|
12076
12076
|
};
|
|
12077
12077
|
}
|
|
12078
|
+
var SwipeDirection;
|
|
12079
|
+
(function(SwipeDirection2) {
|
|
12080
|
+
SwipeDirection2["UP"] = "UP";
|
|
12081
|
+
SwipeDirection2["RIGHT"] = "RIGHT";
|
|
12082
|
+
SwipeDirection2["DOWN"] = "DOWN";
|
|
12083
|
+
SwipeDirection2["LEFT"] = "LEFT";
|
|
12084
|
+
SwipeDirection2["NONE"] = "NONE";
|
|
12085
|
+
})(SwipeDirection || (SwipeDirection = {}));
|
|
12078
12086
|
function useTitle(newTitle = null, options = {}) {
|
|
12079
12087
|
var _a2, _b;
|
|
12080
12088
|
const {
|
|
@@ -12180,7 +12188,7 @@ function mergeIconData(icon, alias) {
|
|
|
12180
12188
|
}
|
|
12181
12189
|
return result;
|
|
12182
12190
|
}
|
|
12183
|
-
function getIconData$1(data, name, full) {
|
|
12191
|
+
function getIconData$1(data, name, full = false) {
|
|
12184
12192
|
function getIcon(name2, iteration) {
|
|
12185
12193
|
if (data.icons[name2] !== void 0) {
|
|
12186
12194
|
return Object.assign({}, data.icons[name2]);
|
|
@@ -13022,7 +13030,7 @@ function storeCallback(callback, icons, pendingSources) {
|
|
|
13022
13030
|
});
|
|
13023
13031
|
return abort;
|
|
13024
13032
|
}
|
|
13025
|
-
function listToIcons(list, validate, simpleNames2 = false) {
|
|
13033
|
+
function listToIcons(list, validate = true, simpleNames2 = false) {
|
|
13026
13034
|
const result = [];
|
|
13027
13035
|
list.forEach((item) => {
|
|
13028
13036
|
const icon = typeof item === "string" ? stringToIcon(item, false, simpleNames2) : item;
|
|
@@ -23482,7 +23490,7 @@ const _sfc_main = {
|
|
|
23482
23490
|
};
|
|
23483
23491
|
}
|
|
23484
23492
|
};
|
|
23485
|
-
var Tailwind_story = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9e4c73b2"], ["__file", "/
|
|
23493
|
+
var Tailwind_story = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9e4c73b2"], ["__file", "/Users/akryum/Projects/histoire/packages/histoire-controls/node_modules/.histoire/plugins/tailwind-tokens/Tailwind.story.vue"]]);
|
|
23486
23494
|
var Tailwind_story$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
23487
23495
|
__proto__: null,
|
|
23488
23496
|
"default": Tailwind_story
|
|
@@ -23659,18 +23667,18 @@ var main$1 = { exports: {} };
|
|
|
23659
23667
|
var i, o = {};
|
|
23660
23668
|
for (i in r2)
|
|
23661
23669
|
r2.hasOwnProperty(i) && (o[i] = r2[i]);
|
|
23662
|
-
var a2,
|
|
23670
|
+
var a2, u2 = false, l = "";
|
|
23663
23671
|
function p2(t5) {
|
|
23664
23672
|
return r2.locateFile ? r2.locateFile(t5, l) : l + t5;
|
|
23665
23673
|
}
|
|
23666
23674
|
a2 = function(t5) {
|
|
23667
23675
|
var n5;
|
|
23668
23676
|
return typeof readbuffer == "function" ? new Uint8Array(readbuffer(t5)) : (v2(typeof (n5 = read(t5, "binary")) == "object"), n5);
|
|
23669
|
-
}, typeof scriptArgs != "undefined" ?
|
|
23677
|
+
}, typeof scriptArgs != "undefined" ? scriptArgs : arguments !== void 0 && arguments, typeof onig_print != "undefined" && (typeof console == "undefined" && (console = {}), console.log = onig_print, console.warn = console.error = typeof printErr != "undefined" ? printErr : onig_print);
|
|
23670
23678
|
var h2 = r2.print || console.log.bind(console), d2 = r2.printErr || console.warn.bind(console);
|
|
23671
23679
|
for (i in o)
|
|
23672
23680
|
o.hasOwnProperty(i) && (r2[i] = o[i]);
|
|
23673
|
-
o = null, r2.arguments &&
|
|
23681
|
+
o = null, r2.arguments && r2.arguments, r2.thisProgram && r2.thisProgram, r2.quit && r2.quit;
|
|
23674
23682
|
var g, _;
|
|
23675
23683
|
r2.wasmBinary && (g = r2.wasmBinary), r2.noExitRuntime, typeof WebAssembly != "object" && z("no native wasm support detected");
|
|
23676
23684
|
var y = false;
|
|
@@ -23686,17 +23694,17 @@ var main$1 = { exports: {} };
|
|
|
23686
23694
|
for (var o2 = ""; n5 < i2; ) {
|
|
23687
23695
|
var a3 = t5[n5++];
|
|
23688
23696
|
if (128 & a3) {
|
|
23689
|
-
var
|
|
23697
|
+
var f = 63 & t5[n5++];
|
|
23690
23698
|
if ((224 & a3) != 192) {
|
|
23691
23699
|
var s = 63 & t5[n5++];
|
|
23692
|
-
if ((a3 = (240 & a3) == 224 ? (15 & a3) << 12 |
|
|
23700
|
+
if ((a3 = (240 & a3) == 224 ? (15 & a3) << 12 | f << 6 | s : (7 & a3) << 18 | f << 12 | s << 6 | 63 & t5[n5++]) < 65536)
|
|
23693
23701
|
o2 += String.fromCharCode(a3);
|
|
23694
23702
|
else {
|
|
23695
23703
|
var u3 = a3 - 65536;
|
|
23696
23704
|
o2 += String.fromCharCode(55296 | u3 >> 10, 56320 | 1023 & u3);
|
|
23697
23705
|
}
|
|
23698
23706
|
} else
|
|
23699
|
-
o2 += String.fromCharCode((31 & a3) << 6 |
|
|
23707
|
+
o2 += String.fromCharCode((31 & a3) << 6 | f);
|
|
23700
23708
|
} else
|
|
23701
23709
|
o2 += String.fromCharCode(a3);
|
|
23702
23710
|
}
|
|
@@ -23862,9 +23870,9 @@ var main$1 = { exports: {} };
|
|
|
23862
23870
|
} };
|
|
23863
23871
|
function ot(t5, n5, e3, r3) {
|
|
23864
23872
|
for (var i2 = 0, o2 = 0; o2 < e3; o2++) {
|
|
23865
|
-
for (var a3 = A[n5 + 8 * o2 >> 2],
|
|
23873
|
+
for (var a3 = A[n5 + 8 * o2 >> 2], f = A[n5 + (8 * o2 + 4) >> 2], s = 0; s < f; s++)
|
|
23866
23874
|
it.printChar(t5, S2[a3 + s]);
|
|
23867
|
-
i2 +=
|
|
23875
|
+
i2 += f;
|
|
23868
23876
|
}
|
|
23869
23877
|
return A[r3 >> 2] = i2, 0;
|
|
23870
23878
|
}
|
|
@@ -23877,7 +23885,7 @@ var main$1 = { exports: {} };
|
|
|
23877
23885
|
function e3() {
|
|
23878
23886
|
ft || (ft = true, r2.calledRun = true, y || (D2(), W2(), n4(r2), r2.onRuntimeInitialized && r2.onRuntimeInitialized(), C2()));
|
|
23879
23887
|
}
|
|
23880
|
-
|
|
23888
|
+
B > 0 || (I2(), B > 0 || (r2.setStatus ? (r2.setStatus("Running..."), setTimeout(function() {
|
|
23881
23889
|
setTimeout(function() {
|
|
23882
23890
|
r2.setStatus("");
|
|
23883
23891
|
}, 1), e3();
|
|
@@ -27824,7 +27832,7 @@ function explainThemeScope(theme, scope, parentScopes) {
|
|
|
27824
27832
|
}
|
|
27825
27833
|
return result;
|
|
27826
27834
|
}
|
|
27827
|
-
function renderToHtml(lines, options) {
|
|
27835
|
+
function renderToHtml(lines, options = {}) {
|
|
27828
27836
|
var _a2;
|
|
27829
27837
|
const bg = options.bg || "#fff";
|
|
27830
27838
|
const optionsByLineNumber = groupBy((_a2 = options.lineOptions) !== null && _a2 !== void 0 ? _a2 : [], (option) => option.line);
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
<meta name="description" content="">
|
|
8
8
|
<link rel="stylesheet" href="/assets/style.04507241.css">
|
|
9
9
|
<link rel="icon" type="image/svg+xml" href="/histoire.svg"/>
|
|
10
|
-
<link rel="preload" href="/assets/vendor.
|
|
10
|
+
<link rel="preload" href="/assets/vendor.2833ae3d.js" as="script" crossOrigin="anonymous"><link rel="prefetch" href="/assets/global-components.6736b2a9.js" as="script" crossOrigin="anonymous"><link rel="prefetch" href="/assets/StoryView.2f64dad1.js" as="script" crossOrigin="anonymous">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
|
13
13
|
<div id="app"></div>
|
|
14
|
-
<script type="module" src="/assets/bundle-main.
|
|
14
|
+
<script type="module" src="/assets/bundle-main.784e5bf7.js"></script>
|
|
15
15
|
</body>
|
|
16
16
|
</html>
|
package/dist/index.es.js
CHANGED
|
@@ -3162,7 +3162,7 @@ function mergeIconData(icon, alias) {
|
|
|
3162
3162
|
}
|
|
3163
3163
|
return result;
|
|
3164
3164
|
}
|
|
3165
|
-
function getIconData$1(data, name, full) {
|
|
3165
|
+
function getIconData$1(data, name, full = false) {
|
|
3166
3166
|
function getIcon(name2, iteration) {
|
|
3167
3167
|
if (data.icons[name2] !== void 0) {
|
|
3168
3168
|
return Object.assign({}, data.icons[name2]);
|
|
@@ -4004,7 +4004,7 @@ function storeCallback(callback, icons, pendingSources) {
|
|
|
4004
4004
|
});
|
|
4005
4005
|
return abort;
|
|
4006
4006
|
}
|
|
4007
|
-
function listToIcons(list, validate, simpleNames2 = false) {
|
|
4007
|
+
function listToIcons(list, validate = true, simpleNames2 = false) {
|
|
4008
4008
|
const result = [];
|
|
4009
4009
|
list.forEach((item) => {
|
|
4010
4010
|
const icon = typeof item === "string" ? stringToIcon(item, false, simpleNames2) : item;
|
|
@@ -5124,6 +5124,14 @@ const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !
|
|
|
5124
5124
|
const globalKey = "__vueuse_ssr_handlers__";
|
|
5125
5125
|
_global[globalKey] = _global[globalKey] || {};
|
|
5126
5126
|
_global[globalKey];
|
|
5127
|
+
var SwipeDirection;
|
|
5128
|
+
(function(SwipeDirection2) {
|
|
5129
|
+
SwipeDirection2["UP"] = "UP";
|
|
5130
|
+
SwipeDirection2["RIGHT"] = "RIGHT";
|
|
5131
|
+
SwipeDirection2["DOWN"] = "DOWN";
|
|
5132
|
+
SwipeDirection2["LEFT"] = "LEFT";
|
|
5133
|
+
SwipeDirection2["NONE"] = "NONE";
|
|
5134
|
+
})(SwipeDirection || (SwipeDirection = {}));
|
|
5127
5135
|
const __default__$3 = {
|
|
5128
5136
|
name: "HstCopyIcon"
|
|
5129
5137
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@histoire/controls",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.2",
|
|
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.6.2",
|
|
48
48
|
"postcss": "^8.4.12",
|
|
49
49
|
"postcss-import": "^14.1.0",
|
|
50
50
|
"tailwindcss": "^3.0.23",
|
package/vite.config.ts
CHANGED
|
@@ -30,8 +30,14 @@ export default defineConfig({
|
|
|
30
30
|
histoire: {
|
|
31
31
|
setupFile: '/src/histoire-setup.ts',
|
|
32
32
|
vite: (config) => {
|
|
33
|
-
config.
|
|
34
|
-
|
|
33
|
+
config.plugins = [{
|
|
34
|
+
name: 'my-vite-config',
|
|
35
|
+
enforce: 'post',
|
|
36
|
+
config (config) {
|
|
37
|
+
config.build.lib = false
|
|
38
|
+
config.build.rollupOptions.external = []
|
|
39
|
+
},
|
|
40
|
+
}]
|
|
35
41
|
},
|
|
36
42
|
theme: {
|
|
37
43
|
title: 'Histoire controls',
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<title>Histoire</title>
|
|
5
|
-
<meta charset="utf-8">
|
|
6
|
-
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
7
|
-
<meta name="description" content="">
|
|
8
|
-
<link rel="stylesheet" href="/assets/style.7657d2ac.css">
|
|
9
|
-
|
|
10
|
-
</head>
|
|
11
|
-
<body>
|
|
12
|
-
<div id="app"></div>
|
|
13
|
-
<script type="module" src="/assets/sandbox.2c60450a.js"></script>
|
|
14
|
-
</body>
|
|
15
|
-
</html>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as s}from"./index.58f51dd0.js";import{o as r,g as o,b as c}from"./vendor.70a554f6.js";const t={},a={class:"htw-flex htw-flex-col htw-items-center htw-justify-center htw-space-y-4 htw-py-12 htw-h-full htw-text-center htw-text-gray-400 htw-text-lg"};function n(e,l){return r(),o("div",a,[c(e.$slots,"default")])}t.__file="../histoire/dist/client/app/components/base/BaseEmpty.vue";var f=s(t,[["render",n]]);export{f as B};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as o,c as a}from"./global-components.84d0ab22.js";import{d as r,f as c,o as i,g as n,a as h,u as l}from"./vendor.70a554f6.js";var f="/assets/histoire.8af7bd1f.svg";const m={class:"htw-flex htw-items-center htw-justify-center htw-h-full"},u=["src"],p=r({setup(_){const s=c(()=>{var e,t;return((t=(e=o.theme)==null?void 0:e.logo)==null?void 0:t.square)?a.square:f});return(e,t)=>(i(),n("div",m,[h("img",{src:l(s),alt:"Logo",class:"htw-w-64 htw-h-64 htw-opacity-25"},null,8,u)]))}});p.__file="../histoire/dist/client/app/components/HomeView.vue";export{p as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var L=Object.defineProperty,N=Object.defineProperties;var z=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var E=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable;var b=(t,e,o)=>e in t?L(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,y=(t,e)=>{for(var o in e||(e={}))E.call(e,o)&&b(t,o,e[o]);if(k)for(var o of k(e))K.call(e,o)&&b(t,o,e[o]);return t},V=(t,e)=>N(t,z(e));import{d as S,p as u,f as x,q as T,o as p,g,a as i,n as C,u as q,b as M,e as $,y as B,c as Z,w as h,h as w,Z as U,r as H}from"./vendor.70a554f6.js";const j={class:"htw-text-white htw-w-[16px] htw-h-[16px] htw-relative"},A={width:"16",height:"16",viewBox:"0 0 24 24",class:"htw-relative htw-z-10"},D=["stroke-dasharray","stroke-dashoffset"],F={name:"HstCheckbox"},m=S(V(y({},F),{props:{modelValue:{type:Boolean,default:!1}},emits:{"update:modelValue":t=>!0},setup(t,{emit:e}){const o=t;function c(){e("update:modelValue",!o.modelValue),f.value=!0}const r=u(),l=u(0),s=x(()=>o.modelValue?1:0),n=x(()=>(1-s.value)*l.value),f=u(!1);return T(r,v=>{var a,d,_;l.value=(_=(d=(a=r.value).getTotalLength)==null?void 0:d.call(a))!=null?_:21.21}),(v,a)=>(p(),g("div",{role:"checkbox",tabindex:"0",class:"htw-flex htw-items-center htw-gap-2 htw-select-none htw-px-4 htw-py-3 htw-cursor-pointer hover:htw-bg-primary-100 dark:hover:htw-bg-primary-700",onClick:a[0]||(a[0]=d=>c()),onKeydown:[a[1]||(a[1]=$(B(d=>c(),["prevent"]),["enter"])),a[2]||(a[2]=$(B(d=>c(),["prevent"]),["space"]))]},[i("div",j,[i("div",{class:C(["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",[t.modelValue?"htw-border-primary-500 htw-border-8":"htw-border-gray-300 dark:htw-border-gray-500 htw-delay-150"]])},null,2),(p(),g("svg",A,[i("path",{ref_key:"path",ref:r,d:"m 4 12 l 5 5 l 10 -10",fill:"none",class:C(["htw-stroke-white htw-stroke-2 htw-duration-200 htw-ease-in-out",[f.value?"htw-transition-all":"htw-transition-none",{"htw-delay-150":t.modelValue}]]),"stroke-dasharray":l.value,"stroke-dashoffset":q(n)},null,10,D)]))]),M(v.$slots,"default")],32))}}));m.__file="src/components/checkbox/HstCheckbox.vue";const G=U(" Label "),I=U(" Label "),J=S({setup(t){function e(){return{checked:!1}}return(o,c)=>{const r=H("Variant"),l=H("Story");return p(),Z(l,{title:"HstCheckbox"},{default:h(()=>[w(r,{title:"playground","init-state":e},{default:h(({state:s})=>[w(m,{modelValue:s.checked,"onUpdate:modelValue":n=>s.checked=n},{default:h(()=>[G]),_:2},1032,["modelValue","onUpdate:modelValue"])]),controls:h(({state:s})=>[w(m,{modelValue:s.checked,"onUpdate:modelValue":n=>s.checked=n},{default:h(()=>[I]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1})}}});J.__file="src/components/checkbox/HstCheckbox.story.vue";export{J as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var x=Object.defineProperty,b=Object.defineProperties;var v=Object.getOwnPropertyDescriptors;var h=Object.getOwnPropertySymbols;var g=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var f=(o,e,t)=>e in o?x(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,m=(o,e)=>{for(var t in e||(e={}))g.call(e,t)&&f(o,t,e[t]);if(h)for(var t of h(e))k.call(e,t)&&f(o,t,e[t]);return o},i=(o,e)=>b(o,v(e));import{d as y,p as $,o as c,g as V,b as U,v as C,a as S,m as I,n as N,z as B,c as H,w as a,h as u,Z as _,r as w}from"./vendor.70a554f6.js";const z={key:0,class:"htw-text-sm htw-px-2 htw-cursor-text"},L=["value"],E={name:"HstInput",inheritAttrs:!1},d=y(i(m({},E),{props:{modelValue:{type:[String,Number],default:""}},emits:{"update:modelValue":o=>!0},setup(o,{emit:e}){const t=$();return(s,r)=>(c(),V("div",{class:N(["htw-p-2 hover:htw-bg-primary-100 dark:hover:htw-bg-primary-700 htw-cursor-text",s.$attrs.class]),style:B(s.$attrs.style),onClick:r[1]||(r[1]=p=>t.value.focus())},[s.$slots.default?(c(),V("label",z,[U(s.$slots,"default")])):C("v-if",!0),S("input",I({ref_key:"input",ref:t},i(m({},s.$attrs),{style:null,class:null}),{value:o.modelValue,class:"htw-text-inherit htw-bg-transparent htw-w-full htw-outline-none htw-px-2 htw-py-0 htw-border htw-border-gray-300 dark:htw-border-gray-500 focus:htw-border-primary-500 dark:focus:htw-border-primary-500 htw-rounded-sm",onInput:r[0]||(r[0]=p=>e("update:modelValue",p.target.value))}),null,16,L)],6))}}));d.__file="src/components/input/HstInput.vue";const A=_(" Label "),P=_(" Label "),T=_(" Label "),Z=y({setup(o){function e(){return{text:""}}return(t,s)=>{const r=w("Variant"),p=w("Story");return c(),H(p,{title:"HstInput"},{default:a(()=>[u(r,{title:"playground","init-state":e},{default:a(({state:l})=>[u(d,{modelValue:l.text,"onUpdate:modelValue":n=>l.text=n},{default:a(()=>[A]),_:2},1032,["modelValue","onUpdate:modelValue"])]),controls:a(({state:l})=>[u(d,{modelValue:l.text,"onUpdate:modelValue":n=>l.text=n},{default:a(()=>[P]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:1}),u(r,{title:"no-label","init-state":e},{default:a(({state:l})=>[u(d,{modelValue:l.text,"onUpdate:modelValue":n=>l.text=n,placeholder:"Enter some text..."},null,8,["modelValue","onUpdate:modelValue"])]),controls:a(({state:l})=>[u(d,{modelValue:l.text,"onUpdate:modelValue":n=>l.text=n},{default:a(()=>[T]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1})}}});Z.__file="src/components/input/HstInput.story.vue";export{Z as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as q,i as T,p as x,q as S,Y as j,o as r,g as u,h as B,w as K,u as w,I as V,n as z,a as i,Z as R,t as $,F as _,s as D,c as L,v as N,_ as A,f as O,C as M,$ as U,e as I,a0 as Y}from"./vendor.70a554f6.js";import{o as Z,B as G,_ as H,u as J}from"./index.58f51dd0.js";import{B as Q}from"./BaseEmpty.a84c14c8.js";import"./global-components.84d0ab22.js";const W={class:"htw-flex-1"},X={class:"htw-flex"},tt={class:"htw-ml-auto htw-opacity-40"},et={key:0,class:"htw-flex htw-items-center htw-gap-0.5 htw-opacity-60"},E=q({props:{result:{type:Object,required:!0},selected:{type:Boolean,default:!1}},emits:{close:()=>!0},setup(s,{emit:b}){const v=s;T(h=>({"60f23e5c":s.result.iconColor}));const d=x();S(()=>v.selected,h=>{h&&d.value.scrollIntoView()});const f=j();Z(["enter"],()=>{!v.selected||(f.push(v.result.route),b("close"))});const p={story:"carbon:cube",variant:"carbon:cube"},c={story:"Story",variant:"Variant"};return(h,y)=>(r(),u("div",{ref_key:"el",ref:d},[B(G,{to:s.result.route,"is-active":s.selected,class:"htw-px-6 htw-py-4 htw-gap-4",onNavigate:y[0]||(y[0]=m=>h.$emit("close"))},{default:K(()=>{var m,n;return[B(w(V),{icon:(m=s.result.icon)!=null?m:p[s.result.kind],class:z(["htw-w-5 htw-h-5",[s.selected?[]:[s.result.iconColor?"bind-icon-color":{"htw-text-primary-500":s.result.kind==="story","htw-text-gray-500":s.result.kind==="variant"}]]])},null,8,["icon","class"]),i("div",W,[i("div",X,[R($(s.result.title)+" ",1),i("span",tt,$(c[s.result.kind]),1)]),((n=s.result.path)==null?void 0:n.length)?(r(),u("div",et,[(r(!0),u(_,null,D(s.result.path,(a,g)=>(r(),u("div",{key:g,class:"htw-flex htw-items-center htw-gap-0.5"},[g>0?(r(),L(w(V),{key:0,icon:"carbon:chevron-right",class:"htw-w-4 htw-h-4 htw-mt-0.5 htw-opacity-50"})):N("v-if",!0),i("span",null,$(a),1)]))),128))])):N("v-if",!0)])]}),_:1},8,["to","is-active"])],512))}});E.__file="../histoire/dist/client/app/components/search/SearchItem.vue";var st=H(E,[["__scopeId","data-v-a2fcf75c"]]);const ot={class:"htw-fixed htw-inset-0 htw-bg-white/80 dark:htw-bg-gray-700/80"},at={class:"htw-bg-white dark:htw-bg-gray-700 md:htw-mt-16 md:htw-mx-auto htw-w-screen htw-max-w-[512px] htw-shadow-xl htw-border htw-border-gray-200 dark:htw-border-gray-850 htw-rounded-lg htw-relative htw-divide-y htw-divide-gray-200 dark:htw-divide-gray-850"},rt=R(" No results "),nt={key:1,class:"htw-max-h-[400px] htw-overflow-y-auto htw-rounded-b-lg"},lt=q({props:{shown:{type:Boolean,default:!1}},emits:{close:()=>!0},setup(s,{emit:b}){const v=s;function d(){b("close")}const f=x(),{focused:p}=A({target:f,initialValue:!0});S(()=>v.shown,o=>{o&&requestAnimationFrame(()=>{p.value=!0,f.value.select()})});const c=x(""),h=J();function y(o,t){return{kind:"story",rank:t,id:o.id,title:o.title,route:{name:"story",params:{storyId:o.id}},path:o.file.path.slice(0,-1),icon:o.icon,iconColor:o.iconColor}}function m(o,t,e){var l;return{kind:"variant",rank:e,id:t.id,title:t.title,route:{name:"story",params:{storyId:o.id},query:{variantId:t.id}},path:[...(l=o.file.path)!=null?l:[],o.title],icon:t.icon,iconColor:t.iconColor}}const n=O(()=>{const o=[];if(c.value){const t=c.value.toLowerCase();for(const e of h.stories){const l=e.title.toLowerCase().includes(t);let C=!1;(l||(C=e.file.path.some(k=>k.toLowerCase().includes(t))))&&o.push(y(e,l?1:4));for(const k of e.variants){const F=k.title.toLowerCase().includes(t);(l||C||F)&&o.push(m(e,k,F?2:l?3:5))}}}return o.sort((t,e)=>t.rank-e.rank)}),a=x(0);S(n,()=>{a.value=0});function g(){a.value++,a.value>n.value.length-1&&(a.value=0)}function P(){a.value--,a.value<0&&(a.value=n.value.length-1)}return(o,t)=>M((r(),u("div",ot,[i("div",{class:"htw-absolute htw-inset-0",onClick:t[0]||(t[0]=e=>d())}),i("div",at,[i("div",{class:"htw-flex htw-items-center htw-gap-4 htw-pl-6 htw-border htw-border-transparent focus-visible:htw-border-primary-500",onClick:t[5]||(t[5]=e=>p.value=!0)},[B(w(V),{icon:"carbon:search",class:"flex-none htw-w-5 htw-h-5"}),M(i("input",{ref_key:"input",ref:f,"onUpdate:modelValue":t[1]||(t[1]=e=>c.value=e),placeholder:"Search for stories, variants...",class:"htw-bg-transparent htw-w-full htw-flex-1 htw-pl-0 htw-pr-6 htw-py-4 htw-outline-none",onKeydown:[t[2]||(t[2]=I(e=>g(),["down"])),t[3]||(t[3]=I(e=>P(),["up"])),t[4]||(t[4]=I(e=>d(),["escape"]))]},null,544),[[Y,c.value]])]),c.value&&!w(n).length?(r(),L(Q,{key:0},{default:K(()=>[rt]),_:1})):w(n).length?(r(),u("div",nt,[(r(!0),u(_,null,D(w(n),(e,l)=>(r(),L(st,{key:`${e.kind}-${e.id}`,result:e,selected:l===a.value,onClose:t[6]||(t[6]=C=>d())},null,8,["result","selected"]))),128))])):N("v-if",!0)])],512)),[[U,s.shown]])}});lt.__file="../histoire/dist/client/app/components/search/SearchModal.vue";export{lt as default};
|