@histoire/controls 0.9.4 → 0.10.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/package.json +2 -2
- package/.histoire/dist/__sandbox.html +0 -16
- package/.histoire/dist/assets/BaseEmpty.c5ebb434.js +0 -11
- package/.histoire/dist/assets/HomeView.2d2d0dfe.js +0 -24
- package/.histoire/dist/assets/HstCheckbox.story.ccd10161.js +0 -151
- package/.histoire/dist/assets/HstColorShades.story.d71deb80.js +0 -540
- package/.histoire/dist/assets/HstCopyIcon.ef403c78.js +0 -55
- package/.histoire/dist/assets/HstNumber.story.1e0e7b71.js +0 -165
- package/.histoire/dist/assets/HstSelect.story.8a2b4741.js +0 -290
- package/.histoire/dist/assets/HstSlider.story.4155f6ba.js +0 -153
- package/.histoire/dist/assets/HstText.story.43417ceb.js +0 -143
- package/.histoire/dist/assets/HstTextarea.story.3e39b89e.js +0 -111
- package/.histoire/dist/assets/HstTokenGrid.story.e2f237c4.js +0 -156
- package/.histoire/dist/assets/HstTokenList.story.bc7b0288.js +0 -184
- package/.histoire/dist/assets/HstWrapper.fee42109.js +0 -61
- package/.histoire/dist/assets/SearchPane.37a81ba7.js +0 -426
- package/.histoire/dist/assets/StoryView.2c1f1961.js +0 -2262
- package/.histoire/dist/assets/bundle-main.c70a2b14.js +0 -1156
- package/.histoire/dist/assets/bundle-sandbox.f56c0808.js +0 -84
- package/.histoire/dist/assets/const.36730b48.js +0 -717
- package/.histoire/dist/assets/global-components.d165b38c.js +0 -5806
- package/.histoire/dist/assets/search-docs-data.2e7ad186.js +0 -6
- package/.histoire/dist/assets/style.dc851298.css +0 -2574
- package/.histoire/dist/assets/vendor.31c91490.js +0 -28973
- package/.histoire/dist/histoire.svg +0 -51
- package/.histoire/dist/index.html +0 -16
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { d as defineComponent, r as ref, ax as _export_sfc, a as openBlock, j as createBlock, k as withCtx, f as renderSlot, e as createBaseVNode, x as mergeProps, n as normalizeClass, h as normalizeStyle, q as resolveComponent, l as createVNode } from "./vendor.31c91490.js";
|
|
21
|
-
import { H as HstWrapper } from "./HstWrapper.fee42109.js";
|
|
22
|
-
const __default__ = {
|
|
23
|
-
name: "HstText"
|
|
24
|
-
};
|
|
25
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__), {
|
|
26
|
-
props: {
|
|
27
|
-
title: { type: String, required: false },
|
|
28
|
-
modelValue: { type: String, required: true }
|
|
29
|
-
},
|
|
30
|
-
emits: {
|
|
31
|
-
"update:modelValue": (newValue) => true
|
|
32
|
-
},
|
|
33
|
-
setup(__props, { expose, emit }) {
|
|
34
|
-
expose();
|
|
35
|
-
const props = __props;
|
|
36
|
-
const input = ref();
|
|
37
|
-
const __returned__ = { props, emit, input, HstWrapper };
|
|
38
|
-
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
39
|
-
return __returned__;
|
|
40
|
-
}
|
|
41
|
-
}));
|
|
42
|
-
const _hoisted_1 = ["value"];
|
|
43
|
-
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
44
|
-
return openBlock(), createBlock($setup["HstWrapper"], {
|
|
45
|
-
title: $props.title,
|
|
46
|
-
class: normalizeClass(["htw-cursor-text htw-items-center", _ctx.$attrs.class]),
|
|
47
|
-
style: normalizeStyle(_ctx.$attrs.style),
|
|
48
|
-
onClick: _cache[1] || (_cache[1] = ($event) => $setup.input.focus())
|
|
49
|
-
}, {
|
|
50
|
-
actions: withCtx(() => [
|
|
51
|
-
renderSlot(_ctx.$slots, "actions")
|
|
52
|
-
]),
|
|
53
|
-
default: withCtx(() => [
|
|
54
|
-
createBaseVNode("input", mergeProps({ ref: "input" }, __spreadProps(__spreadValues({}, _ctx.$attrs), { class: null, style: null }), {
|
|
55
|
-
type: "text",
|
|
56
|
-
value: $props.modelValue,
|
|
57
|
-
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",
|
|
58
|
-
onInput: _cache[0] || (_cache[0] = ($event) => $setup.emit("update:modelValue", $event.target.value))
|
|
59
|
-
}), null, 16, _hoisted_1)
|
|
60
|
-
]),
|
|
61
|
-
_: 3
|
|
62
|
-
}, 8, ["title", "class", "style"]);
|
|
63
|
-
}
|
|
64
|
-
_sfc_main$1.__file = "src/components/text/HstText.vue";
|
|
65
|
-
var HstText = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "/home/akryum/Projects/histoire/packages/histoire-controls/src/components/text/HstText.vue"]]);
|
|
66
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
67
|
-
name: "HstText.story",
|
|
68
|
-
setup(__props, { expose }) {
|
|
69
|
-
expose();
|
|
70
|
-
function initState() {
|
|
71
|
-
return {
|
|
72
|
-
label: "My really long label",
|
|
73
|
-
text: ""
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
const __returned__ = { initState, HstText };
|
|
77
|
-
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
78
|
-
return __returned__;
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
82
|
-
const _component_Variant = resolveComponent("Variant");
|
|
83
|
-
const _component_Story = resolveComponent("Story");
|
|
84
|
-
return openBlock(), createBlock(_component_Story, {
|
|
85
|
-
title: "HstText",
|
|
86
|
-
layout: {
|
|
87
|
-
type: "grid",
|
|
88
|
-
width: "100%"
|
|
89
|
-
}
|
|
90
|
-
}, {
|
|
91
|
-
default: withCtx(() => [
|
|
92
|
-
createVNode(_component_Variant, {
|
|
93
|
-
title: "default",
|
|
94
|
-
"init-state": $setup.initState
|
|
95
|
-
}, {
|
|
96
|
-
default: withCtx(({ state }) => [
|
|
97
|
-
createVNode($setup["HstText"], {
|
|
98
|
-
modelValue: state.text,
|
|
99
|
-
"onUpdate:modelValue": ($event) => state.text = $event,
|
|
100
|
-
title: state.label
|
|
101
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "title"])
|
|
102
|
-
]),
|
|
103
|
-
controls: withCtx(({ state }) => [
|
|
104
|
-
createVNode($setup["HstText"], {
|
|
105
|
-
modelValue: state.label,
|
|
106
|
-
"onUpdate:modelValue": ($event) => state.label = $event,
|
|
107
|
-
title: "Label"
|
|
108
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
109
|
-
createVNode($setup["HstText"], {
|
|
110
|
-
modelValue: state.text,
|
|
111
|
-
"onUpdate:modelValue": ($event) => state.text = $event,
|
|
112
|
-
title: "Text"
|
|
113
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
114
|
-
]),
|
|
115
|
-
_: 1
|
|
116
|
-
}),
|
|
117
|
-
createVNode(_component_Variant, {
|
|
118
|
-
title: "no-label",
|
|
119
|
-
"init-state": $setup.initState
|
|
120
|
-
}, {
|
|
121
|
-
default: withCtx(({ state }) => [
|
|
122
|
-
createVNode($setup["HstText"], {
|
|
123
|
-
modelValue: state.text,
|
|
124
|
-
"onUpdate:modelValue": ($event) => state.text = $event,
|
|
125
|
-
placeholder: "Enter some text..."
|
|
126
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
127
|
-
]),
|
|
128
|
-
controls: withCtx(({ state }) => [
|
|
129
|
-
createVNode($setup["HstText"], {
|
|
130
|
-
modelValue: state.text,
|
|
131
|
-
"onUpdate:modelValue": ($event) => state.text = $event,
|
|
132
|
-
title: "Text"
|
|
133
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
134
|
-
]),
|
|
135
|
-
_: 1
|
|
136
|
-
})
|
|
137
|
-
]),
|
|
138
|
-
_: 1
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
_sfc_main.__file = "src/components/text/HstText.story.vue";
|
|
142
|
-
var HstText_story = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/akryum/Projects/histoire/packages/histoire-controls/src/components/text/HstText.story.vue"]]);
|
|
143
|
-
export { HstText_story as default };
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { d as defineComponent, r as ref, ax as _export_sfc, a as openBlock, j as createBlock, k as withCtx, f as renderSlot, e as createBaseVNode, x as mergeProps, n as normalizeClass, h as normalizeStyle, q as resolveComponent, l as createVNode } from "./vendor.31c91490.js";
|
|
21
|
-
import { H as HstWrapper } from "./HstWrapper.fee42109.js";
|
|
22
|
-
const __default__ = {
|
|
23
|
-
name: "HstTextarea",
|
|
24
|
-
inheritAttrs: false
|
|
25
|
-
};
|
|
26
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__), {
|
|
27
|
-
props: {
|
|
28
|
-
title: { type: String, required: false },
|
|
29
|
-
modelValue: { type: String, required: true }
|
|
30
|
-
},
|
|
31
|
-
emits: {
|
|
32
|
-
"update:modelValue": (newValue) => true
|
|
33
|
-
},
|
|
34
|
-
setup(__props, { expose, emit }) {
|
|
35
|
-
expose();
|
|
36
|
-
const props = __props;
|
|
37
|
-
const input = ref();
|
|
38
|
-
const __returned__ = { props, emit, input, HstWrapper };
|
|
39
|
-
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
40
|
-
return __returned__;
|
|
41
|
-
}
|
|
42
|
-
}));
|
|
43
|
-
const _hoisted_1 = ["value"];
|
|
44
|
-
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
45
|
-
return openBlock(), createBlock($setup["HstWrapper"], {
|
|
46
|
-
title: $props.title,
|
|
47
|
-
class: normalizeClass(["htw-cursor-text", _ctx.$attrs.class]),
|
|
48
|
-
style: normalizeStyle(_ctx.$attrs.style),
|
|
49
|
-
onClick: _cache[1] || (_cache[1] = ($event) => $setup.input.focus())
|
|
50
|
-
}, {
|
|
51
|
-
actions: withCtx(() => [
|
|
52
|
-
renderSlot(_ctx.$slots, "actions")
|
|
53
|
-
]),
|
|
54
|
-
default: withCtx(() => [
|
|
55
|
-
createBaseVNode("textarea", mergeProps({ ref: "input" }, __spreadProps(__spreadValues({}, _ctx.$attrs), { class: null, style: null }), {
|
|
56
|
-
value: $props.modelValue,
|
|
57
|
-
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]",
|
|
58
|
-
onInput: _cache[0] || (_cache[0] = ($event) => $setup.emit("update:modelValue", $event.target.value))
|
|
59
|
-
}), null, 16, _hoisted_1)
|
|
60
|
-
]),
|
|
61
|
-
_: 3
|
|
62
|
-
}, 8, ["title", "class", "style"]);
|
|
63
|
-
}
|
|
64
|
-
_sfc_main$1.__file = "src/components/textarea/HstTextarea.vue";
|
|
65
|
-
var HstTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "/home/akryum/Projects/histoire/packages/histoire-controls/src/components/textarea/HstTextarea.vue"]]);
|
|
66
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
67
|
-
name: "HstTextarea.story",
|
|
68
|
-
setup(__props, { expose }) {
|
|
69
|
-
expose();
|
|
70
|
-
function initState() {
|
|
71
|
-
return {
|
|
72
|
-
text: ""
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
const __returned__ = { initState, HstTextarea };
|
|
76
|
-
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
77
|
-
return __returned__;
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
81
|
-
const _component_Variant = resolveComponent("Variant");
|
|
82
|
-
const _component_Story = resolveComponent("Story");
|
|
83
|
-
return openBlock(), createBlock(_component_Story, { title: "HstTextarea" }, {
|
|
84
|
-
default: withCtx(() => [
|
|
85
|
-
createVNode(_component_Variant, {
|
|
86
|
-
title: "default",
|
|
87
|
-
"init-state": $setup.initState
|
|
88
|
-
}, {
|
|
89
|
-
default: withCtx(({ state }) => [
|
|
90
|
-
createVNode($setup["HstTextarea"], {
|
|
91
|
-
modelValue: state.text,
|
|
92
|
-
"onUpdate:modelValue": ($event) => state.text = $event,
|
|
93
|
-
title: "Textarea"
|
|
94
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
95
|
-
]),
|
|
96
|
-
controls: withCtx(({ state }) => [
|
|
97
|
-
createVNode($setup["HstTextarea"], {
|
|
98
|
-
modelValue: state.text,
|
|
99
|
-
"onUpdate:modelValue": ($event) => state.text = $event,
|
|
100
|
-
title: "Text"
|
|
101
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
102
|
-
]),
|
|
103
|
-
_: 1
|
|
104
|
-
})
|
|
105
|
-
]),
|
|
106
|
-
_: 1
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
_sfc_main.__file = "src/components/textarea/HstTextarea.story.vue";
|
|
110
|
-
var HstTextarea_story = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/akryum/Projects/histoire/packages/histoire-controls/src/components/textarea/HstTextarea.story.vue"]]);
|
|
111
|
-
export { HstTextarea_story as default };
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { d as defineComponent, c as computed, r as ref, ax as _export_sfc, ay as VTooltip, a as openBlock, b as createElementBlock, F as Fragment, J as renderList, f as renderSlot, e as createBaseVNode, M as withDirectives, R as createTextVNode, t as toDisplayString, j as createBlock, m as createCommentVNode, h as normalizeStyle, q as resolveComponent, k as withCtx, l as createVNode } from "./vendor.31c91490.js";
|
|
21
|
-
import { H as HstCopyIcon } from "./HstCopyIcon.ef403c78.js";
|
|
22
|
-
var HstTokenGrid_vue_vue_type_style_index_0_lang = "";
|
|
23
|
-
const __default__ = {
|
|
24
|
-
name: "HstTokenGrid"
|
|
25
|
-
};
|
|
26
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__), {
|
|
27
|
-
props: {
|
|
28
|
-
tokens: { type: Object, required: true },
|
|
29
|
-
colSize: { type: Number, required: false, default: 180 },
|
|
30
|
-
getName: { type: Function, required: false, default: null }
|
|
31
|
-
},
|
|
32
|
-
setup(__props, { expose }) {
|
|
33
|
-
expose();
|
|
34
|
-
const props = __props;
|
|
35
|
-
const processedTokens = computed(() => {
|
|
36
|
-
const list = props.tokens;
|
|
37
|
-
const getName = props.getName;
|
|
38
|
-
return Object.entries(list).map(([key, value]) => {
|
|
39
|
-
const name = getName ? getName(key, value) : key;
|
|
40
|
-
return {
|
|
41
|
-
key,
|
|
42
|
-
name,
|
|
43
|
-
value: typeof value === "number" ? value.toString() : value
|
|
44
|
-
};
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
const colSizePx = computed(() => `${props.colSize}px`);
|
|
48
|
-
const hover = ref(null);
|
|
49
|
-
const __returned__ = { props, processedTokens, colSizePx, hover, vTooltip: VTooltip, HstCopyIcon };
|
|
50
|
-
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
51
|
-
return __returned__;
|
|
52
|
-
}
|
|
53
|
-
}));
|
|
54
|
-
const _hoisted_1 = ["onMouseenter"];
|
|
55
|
-
const _hoisted_2 = { class: "htw-flex htw-gap-1" };
|
|
56
|
-
const _hoisted_3 = { class: "htw-my-0 htw-truncate htw-shrink" };
|
|
57
|
-
const _hoisted_4 = { class: "htw-flex htw-gap-1" };
|
|
58
|
-
const _hoisted_5 = { class: "htw-my-0 htw-opacity-50 htw-truncate htw-shrink" };
|
|
59
|
-
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
60
|
-
return openBlock(), createElementBlock("div", {
|
|
61
|
-
class: "htw-bind-col-size htw-grid htw-gap-4 htw-m-4",
|
|
62
|
-
style: normalizeStyle({
|
|
63
|
-
"--histoire-col-size": $setup.colSizePx
|
|
64
|
-
})
|
|
65
|
-
}, [
|
|
66
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList($setup.processedTokens, (token) => {
|
|
67
|
-
return openBlock(), createElementBlock("div", {
|
|
68
|
-
key: token.key,
|
|
69
|
-
class: "htw-flex htw-flex-col htw-gap-2",
|
|
70
|
-
onMouseenter: ($event) => $setup.hover = token.key,
|
|
71
|
-
onMouseleave: _cache[0] || (_cache[0] = ($event) => $setup.hover = null)
|
|
72
|
-
}, [
|
|
73
|
-
renderSlot(_ctx.$slots, "default", { token }),
|
|
74
|
-
createBaseVNode("div", null, [
|
|
75
|
-
createBaseVNode("div", _hoisted_2, [
|
|
76
|
-
withDirectives((openBlock(), createElementBlock("pre", _hoisted_3, [
|
|
77
|
-
createTextVNode(toDisplayString(token.name), 1)
|
|
78
|
-
])), [
|
|
79
|
-
[$setup["vTooltip"], token.name.length > $props.colSize / 8 ? token.name : ""]
|
|
80
|
-
]),
|
|
81
|
-
$setup.hover === token.key ? (openBlock(), createBlock($setup["HstCopyIcon"], {
|
|
82
|
-
key: 0,
|
|
83
|
-
content: token.name,
|
|
84
|
-
class: "htw-flex-none"
|
|
85
|
-
}, null, 8, ["content"])) : createCommentVNode("v-if", true)
|
|
86
|
-
]),
|
|
87
|
-
createBaseVNode("div", _hoisted_4, [
|
|
88
|
-
withDirectives((openBlock(), createElementBlock("pre", _hoisted_5, [
|
|
89
|
-
createTextVNode(toDisplayString(token.value), 1)
|
|
90
|
-
])), [
|
|
91
|
-
[$setup["vTooltip"], token.value.length > $props.colSize / 8 ? token.value : ""]
|
|
92
|
-
]),
|
|
93
|
-
$setup.hover === token.key ? (openBlock(), createBlock($setup["HstCopyIcon"], {
|
|
94
|
-
key: 0,
|
|
95
|
-
content: typeof token.value === "string" ? token.value : JSON.stringify(token.value),
|
|
96
|
-
class: "htw-flex-none"
|
|
97
|
-
}, null, 8, ["content"])) : createCommentVNode("v-if", true)
|
|
98
|
-
])
|
|
99
|
-
])
|
|
100
|
-
], 40, _hoisted_1);
|
|
101
|
-
}), 128))
|
|
102
|
-
], 4);
|
|
103
|
-
}
|
|
104
|
-
_sfc_main$1.__file = "src/components/design-tokens/HstTokenGrid.vue";
|
|
105
|
-
var HstTokenGrid = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "/home/akryum/Projects/histoire/packages/histoire-controls/src/components/design-tokens/HstTokenGrid.vue"]]);
|
|
106
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
107
|
-
name: "HstTokenGrid.story",
|
|
108
|
-
setup(__props, { expose }) {
|
|
109
|
-
expose();
|
|
110
|
-
const tokens = {
|
|
111
|
-
sm: "filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.05))",
|
|
112
|
-
DEFAULT: "filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06))",
|
|
113
|
-
md: "filter: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06))",
|
|
114
|
-
lg: "filter: drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1))",
|
|
115
|
-
xl: "filter: drop-shadow(0 20px 13px rgb(0 0 0 / 0.03)) drop-shadow(0 8px 5px rgb(0 0 0 / 0.08))",
|
|
116
|
-
"2xl": "filter: drop-shadow(0 25px 25px rgb(0 0 0 / 0.15))",
|
|
117
|
-
none: "filter: drop-shadow(0 0 #0000)"
|
|
118
|
-
};
|
|
119
|
-
const __returned__ = { tokens, HstTokenGrid };
|
|
120
|
-
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
121
|
-
return __returned__;
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
125
|
-
const _component_Variant = resolveComponent("Variant");
|
|
126
|
-
const _component_Story = resolveComponent("Story");
|
|
127
|
-
return openBlock(), createBlock(_component_Story, {
|
|
128
|
-
title: "design-tokens/HstTokenGrid",
|
|
129
|
-
"responsive-disabled": ""
|
|
130
|
-
}, {
|
|
131
|
-
default: withCtx(() => [
|
|
132
|
-
createVNode(_component_Variant, { title: "default" }, {
|
|
133
|
-
default: withCtx(() => [
|
|
134
|
-
createVNode($setup["HstTokenGrid"], {
|
|
135
|
-
tokens: $setup.tokens,
|
|
136
|
-
"get-name": (key) => key === "DEFAULT" ? "drop-shadow" : `drop-shadow-${key}`,
|
|
137
|
-
"col-size": 160
|
|
138
|
-
}, {
|
|
139
|
-
default: withCtx(({ token }) => [
|
|
140
|
-
createBaseVNode("div", {
|
|
141
|
-
class: "htw-w-32 htw-h-32 htw-bg-white dark:htw-bg-black htw-rounded htw-mb-2",
|
|
142
|
-
style: normalizeStyle(token.value)
|
|
143
|
-
}, null, 4)
|
|
144
|
-
]),
|
|
145
|
-
_: 1
|
|
146
|
-
}, 8, ["get-name"])
|
|
147
|
-
]),
|
|
148
|
-
_: 1
|
|
149
|
-
})
|
|
150
|
-
]),
|
|
151
|
-
_: 1
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
_sfc_main.__file = "src/components/design-tokens/HstTokenGrid.story.vue";
|
|
155
|
-
var HstTokenGrid_story = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/akryum/Projects/histoire/packages/histoire-controls/src/components/design-tokens/HstTokenGrid.story.vue"]]);
|
|
156
|
-
export { HstTokenGrid_story as default };
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { d as defineComponent, c as computed, r as ref, ax as _export_sfc, a as openBlock, b as createElementBlock, J as renderList, f as renderSlot, e as createBaseVNode, t as toDisplayString, j as createBlock, m as createCommentVNode, F as Fragment, q as resolveComponent, k as withCtx, l as createVNode, h as normalizeStyle } from "./vendor.31c91490.js";
|
|
21
|
-
import { H as HstCopyIcon } from "./HstCopyIcon.ef403c78.js";
|
|
22
|
-
const __default__ = {
|
|
23
|
-
name: "HstTokenList"
|
|
24
|
-
};
|
|
25
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__), {
|
|
26
|
-
props: {
|
|
27
|
-
tokens: { type: Object, required: true },
|
|
28
|
-
getName: { type: Function, required: false }
|
|
29
|
-
},
|
|
30
|
-
setup(__props, { expose }) {
|
|
31
|
-
expose();
|
|
32
|
-
const props = __props;
|
|
33
|
-
const processedTokens = computed(() => {
|
|
34
|
-
const list = props.tokens;
|
|
35
|
-
const getName = props.getName;
|
|
36
|
-
return Object.entries(list).map(([key, value]) => {
|
|
37
|
-
const name = getName ? getName(key, value) : key;
|
|
38
|
-
return {
|
|
39
|
-
key,
|
|
40
|
-
name,
|
|
41
|
-
value: typeof value === "number" ? value.toString() : value
|
|
42
|
-
};
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
const hover = ref(null);
|
|
46
|
-
const __returned__ = { props, processedTokens, hover, HstCopyIcon };
|
|
47
|
-
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
48
|
-
return __returned__;
|
|
49
|
-
}
|
|
50
|
-
}));
|
|
51
|
-
const _hoisted_1$1 = ["onMouseenter"];
|
|
52
|
-
const _hoisted_2 = { class: "htw-mx-4" };
|
|
53
|
-
const _hoisted_3 = { class: "htw-flex htw-gap-1" };
|
|
54
|
-
const _hoisted_4 = { class: "htw-my-0 htw-truncate htw-shrink" };
|
|
55
|
-
const _hoisted_5 = { class: "htw-flex htw-gap-1" };
|
|
56
|
-
const _hoisted_6 = { class: "htw-my-0 htw-opacity-50 htw-truncate htw-shrink" };
|
|
57
|
-
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
58
|
-
return openBlock(true), createElementBlock(Fragment, null, renderList($setup.processedTokens, (token) => {
|
|
59
|
-
return openBlock(), createElementBlock("div", {
|
|
60
|
-
key: token.key,
|
|
61
|
-
class: "htw-flex htw-flex-col htw-gap-2 htw-my-8",
|
|
62
|
-
onMouseenter: ($event) => $setup.hover = token.key,
|
|
63
|
-
onMouseleave: _cache[0] || (_cache[0] = ($event) => $setup.hover = null)
|
|
64
|
-
}, [
|
|
65
|
-
renderSlot(_ctx.$slots, "default", { token }),
|
|
66
|
-
createBaseVNode("div", _hoisted_2, [
|
|
67
|
-
createBaseVNode("div", _hoisted_3, [
|
|
68
|
-
createBaseVNode("pre", _hoisted_4, toDisplayString(token.name), 1),
|
|
69
|
-
$setup.hover === token.key ? (openBlock(), createBlock($setup["HstCopyIcon"], {
|
|
70
|
-
key: 0,
|
|
71
|
-
content: token.name,
|
|
72
|
-
class: "htw-flex-none"
|
|
73
|
-
}, null, 8, ["content"])) : createCommentVNode("v-if", true)
|
|
74
|
-
]),
|
|
75
|
-
createBaseVNode("div", _hoisted_5, [
|
|
76
|
-
createBaseVNode("pre", _hoisted_6, toDisplayString(token.value), 1),
|
|
77
|
-
$setup.hover === token.key ? (openBlock(), createBlock($setup["HstCopyIcon"], {
|
|
78
|
-
key: 0,
|
|
79
|
-
content: typeof token.value === "string" ? token.value : JSON.stringify(token.value),
|
|
80
|
-
class: "htw-flex-none"
|
|
81
|
-
}, null, 8, ["content"])) : createCommentVNode("v-if", true)
|
|
82
|
-
])
|
|
83
|
-
])
|
|
84
|
-
], 40, _hoisted_1$1);
|
|
85
|
-
}), 128);
|
|
86
|
-
}
|
|
87
|
-
_sfc_main$1.__file = "src/components/design-tokens/HstTokenList.vue";
|
|
88
|
-
var HstTokenList = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "/home/akryum/Projects/histoire/packages/histoire-controls/src/components/design-tokens/HstTokenList.vue"]]);
|
|
89
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
90
|
-
name: "HstTokenList.story",
|
|
91
|
-
setup(__props, { expose }) {
|
|
92
|
-
expose();
|
|
93
|
-
const tokens = {
|
|
94
|
-
0: 0,
|
|
95
|
-
1: "0.25rem",
|
|
96
|
-
2: "0.5rem",
|
|
97
|
-
3: "0.75rem",
|
|
98
|
-
4: "1rem",
|
|
99
|
-
5: "1.25rem",
|
|
100
|
-
6: "1.5rem",
|
|
101
|
-
8: "2rem",
|
|
102
|
-
10: "2.5rem",
|
|
103
|
-
12: "3rem",
|
|
104
|
-
16: "4rem",
|
|
105
|
-
20: "5rem",
|
|
106
|
-
24: "6rem",
|
|
107
|
-
32: "8rem",
|
|
108
|
-
40: "10rem",
|
|
109
|
-
48: "12rem",
|
|
110
|
-
56: "14rem",
|
|
111
|
-
64: "16rem",
|
|
112
|
-
auto: "auto",
|
|
113
|
-
px: "1px",
|
|
114
|
-
screen: "100vw",
|
|
115
|
-
"1/2": "50%",
|
|
116
|
-
"1/3": "33.333333%",
|
|
117
|
-
"2/3": "66.666667%",
|
|
118
|
-
"1/4": "25%",
|
|
119
|
-
"2/4": "50%",
|
|
120
|
-
"3/4": "75%",
|
|
121
|
-
"1/5": "20%",
|
|
122
|
-
"2/5": "40%",
|
|
123
|
-
"3/5": "60%",
|
|
124
|
-
"4/5": "80%",
|
|
125
|
-
"1/6": "16.666667%",
|
|
126
|
-
"2/6": "33.333333%",
|
|
127
|
-
"3/6": "50%",
|
|
128
|
-
"4/6": "66.666667%",
|
|
129
|
-
"5/6": "83.333333%",
|
|
130
|
-
"1/12": "8.333333%",
|
|
131
|
-
"2/12": "16.666667%",
|
|
132
|
-
"3/12": "25%",
|
|
133
|
-
"4/12": "33.333333%",
|
|
134
|
-
"5/12": "41.666667%",
|
|
135
|
-
"6/12": "50%",
|
|
136
|
-
"7/12": "58.333333%",
|
|
137
|
-
"8/12": "66.666667%",
|
|
138
|
-
"9/12": "75%",
|
|
139
|
-
"10/12": "83.333333%",
|
|
140
|
-
"11/12": "91.666667%",
|
|
141
|
-
full: "100%"
|
|
142
|
-
};
|
|
143
|
-
const __returned__ = { tokens, HstTokenList };
|
|
144
|
-
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
145
|
-
return __returned__;
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
const _hoisted_1 = { class: "htw-bg-gray-500/10" };
|
|
149
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
150
|
-
const _component_Variant = resolveComponent("Variant");
|
|
151
|
-
const _component_Story = resolveComponent("Story");
|
|
152
|
-
return openBlock(), createBlock(_component_Story, {
|
|
153
|
-
title: "design-tokens/HstTokenList",
|
|
154
|
-
"responsive-disabled": ""
|
|
155
|
-
}, {
|
|
156
|
-
default: withCtx(() => [
|
|
157
|
-
createVNode(_component_Variant, { title: "default" }, {
|
|
158
|
-
default: withCtx(() => [
|
|
159
|
-
createVNode($setup["HstTokenList"], {
|
|
160
|
-
tokens: $setup.tokens,
|
|
161
|
-
"get-name": (key) => `w-${key}`
|
|
162
|
-
}, {
|
|
163
|
-
default: withCtx(({ token }) => [
|
|
164
|
-
createBaseVNode("div", _hoisted_1, [
|
|
165
|
-
createBaseVNode("div", {
|
|
166
|
-
class: "htw-h-20 htw-bg-gray-500/50",
|
|
167
|
-
style: normalizeStyle({
|
|
168
|
-
width: token.value
|
|
169
|
-
})
|
|
170
|
-
}, null, 4)
|
|
171
|
-
])
|
|
172
|
-
]),
|
|
173
|
-
_: 1
|
|
174
|
-
}, 8, ["get-name"])
|
|
175
|
-
]),
|
|
176
|
-
_: 1
|
|
177
|
-
})
|
|
178
|
-
]),
|
|
179
|
-
_: 1
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
_sfc_main.__file = "src/components/design-tokens/HstTokenList.story.vue";
|
|
183
|
-
var HstTokenList_story = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/akryum/Projects/histoire/packages/histoire-controls/src/components/design-tokens/HstTokenList.story.vue"]]);
|
|
184
|
-
export { HstTokenList_story as default };
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { d as defineComponent, ax as _export_sfc, ay as VTooltip, a as openBlock, b as createElementBlock, M as withDirectives, R as createTextVNode, t as toDisplayString, e as createBaseVNode, f as renderSlot } from "./vendor.31c91490.js";
|
|
21
|
-
const __default__ = {
|
|
22
|
-
name: "HstWrapper"
|
|
23
|
-
};
|
|
24
|
-
const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__), {
|
|
25
|
-
props: {
|
|
26
|
-
title: { type: String, required: false }
|
|
27
|
-
},
|
|
28
|
-
setup(__props, { expose }) {
|
|
29
|
-
expose();
|
|
30
|
-
const props = __props;
|
|
31
|
-
const __returned__ = { props, vTooltip: VTooltip };
|
|
32
|
-
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
33
|
-
return __returned__;
|
|
34
|
-
}
|
|
35
|
-
}));
|
|
36
|
-
const _hoisted_1 = { class: "htw-p-2 hover:htw-bg-primary-100 dark:hover:htw-bg-primary-800 htw-flex htw-gap-2 htw-flex-wrap" };
|
|
37
|
-
const _hoisted_2 = { class: "htw-w-28 htw-whitespace-nowrap htw-text-ellipsis htw-overflow-hidden htw-shrink-0" };
|
|
38
|
-
const _hoisted_3 = { class: "htw-grow htw-flex htw-items-center htw-gap-1" };
|
|
39
|
-
const _hoisted_4 = { class: "htw-block htw-grow" };
|
|
40
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
41
|
-
return openBlock(), createElementBlock("label", _hoisted_1, [
|
|
42
|
-
withDirectives((openBlock(), createElementBlock("span", _hoisted_2, [
|
|
43
|
-
createTextVNode(toDisplayString($props.title), 1)
|
|
44
|
-
])), [
|
|
45
|
-
[$setup["vTooltip"], {
|
|
46
|
-
content: $props.title,
|
|
47
|
-
placement: "left",
|
|
48
|
-
distance: 12
|
|
49
|
-
}]
|
|
50
|
-
]),
|
|
51
|
-
createBaseVNode("span", _hoisted_3, [
|
|
52
|
-
createBaseVNode("span", _hoisted_4, [
|
|
53
|
-
renderSlot(_ctx.$slots, "default")
|
|
54
|
-
]),
|
|
55
|
-
renderSlot(_ctx.$slots, "actions")
|
|
56
|
-
])
|
|
57
|
-
]);
|
|
58
|
-
}
|
|
59
|
-
_sfc_main.__file = "src/components/HstWrapper.vue";
|
|
60
|
-
var HstWrapper = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/akryum/Projects/histoire/packages/histoire-controls/src/components/HstWrapper.vue"]]);
|
|
61
|
-
export { HstWrapper as H };
|