@histoire/controls 0.17.16 → 1.0.0-alpha.1
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 +16 -0
- package/.histoire/dist/assets/BaseEmpty.d30f3079.js +11 -0
- package/.histoire/dist/assets/HomeView.8e044be6.js +24 -0
- package/.histoire/dist/assets/HstCheckbox.story.3d04d85b.js +144 -0
- package/.histoire/dist/assets/HstColorShades.story.68cf74d1.js +532 -0
- package/.histoire/dist/assets/HstCopyIcon.e40e725e.js +51 -0
- package/.histoire/dist/assets/HstNumber.story.1e1964ff.js +160 -0
- package/.histoire/dist/assets/HstSelect.story.04860383.js +277 -0
- package/.histoire/dist/assets/HstText.story.c915d831.js +137 -0
- package/.histoire/dist/assets/HstTextarea.story.802b9c26.js +105 -0
- package/.histoire/dist/assets/HstTokenGrid.story.025819d6.js +148 -0
- package/.histoire/dist/assets/HstTokenList.story.d3aa6575.js +176 -0
- package/.histoire/dist/assets/HstWrapper.246b6982.js +56 -0
- package/.histoire/dist/assets/SearchPane.daa2675c.js +426 -0
- package/.histoire/dist/assets/StoryView.2f64dad1.js +2260 -0
- package/.histoire/dist/assets/bundle-main.784e5bf7.js +1156 -0
- package/.histoire/dist/assets/bundle-sandbox.5e153933.js +84 -0
- package/.histoire/dist/assets/const.268165fd.js +658 -0
- package/.histoire/dist/assets/global-components.6736b2a9.js +5722 -0
- package/.histoire/dist/assets/search-docs-data.b9a75539.js +6 -0
- package/.histoire/dist/assets/style.04507241.css +2504 -0
- package/.histoire/dist/assets/vendor.2833ae3d.js +28970 -0
- package/.histoire/dist/index.html +16 -0
- package/dist/components/HstCopyIcon.vue.d.ts +3 -12
- package/dist/components/HstWrapper.vue.d.ts +4 -27
- package/dist/components/button/HstButton.story.vue.d.ts +1 -1
- package/dist/components/button/HstButton.vue.d.ts +3 -12
- package/dist/components/button/HstButtonGroup.story.vue.d.ts +1 -1
- package/dist/components/button/HstButtonGroup.vue.d.ts +7 -16
- package/dist/components/checkbox/HstCheckbox.story.vue.d.ts +1 -1
- package/dist/components/checkbox/HstCheckbox.vue.d.ts +5 -14
- package/dist/components/checkbox/HstCheckboxList.story.vue.d.ts +1 -1
- package/dist/components/checkbox/HstCheckboxList.vue.d.ts +7 -16
- package/dist/components/checkbox/HstSimpleCheckbox.story.vue.d.ts +1 -1
- package/dist/components/checkbox/HstSimpleCheckbox.vue.d.ts +5 -14
- package/dist/components/colorselect/HstColorSelect.story.vue.d.ts +1 -1
- package/dist/components/colorselect/HstColorSelect.vue.d.ts +5 -14
- package/dist/components/design-tokens/HstColorShades.story.vue.d.ts +1 -1
- package/dist/components/design-tokens/HstColorShades.vue.d.ts +3 -12
- package/dist/components/design-tokens/HstTokenGrid.story.vue.d.ts +1 -1
- package/dist/components/design-tokens/HstTokenGrid.vue.d.ts +5 -28
- package/dist/components/design-tokens/HstTokenList.story.vue.d.ts +1 -1
- package/dist/components/design-tokens/HstTokenList.vue.d.ts +4 -13
- package/dist/components/json/HstJson.story.vue.d.ts +1 -1
- package/dist/components/json/HstJson.vue.d.ts +5 -14
- package/dist/components/number/HstNumber.story.vue.d.ts +1 -1
- package/dist/components/number/HstNumber.vue.d.ts +5 -14
- package/dist/components/radio/HstRadio.story.vue.d.ts +1 -1
- package/dist/components/radio/HstRadio.vue.d.ts +7 -16
- package/dist/components/select/CustomSelect.vue.d.ts +7 -16
- package/dist/components/select/HstSelect.story.vue.d.ts +1 -1
- package/dist/components/select/HstSelect.vue.d.ts +7 -16
- package/dist/components/slider/HstSlider.story.vue.d.ts +1 -1
- package/dist/components/slider/HstSlider.vue.d.ts +5 -14
- package/dist/components/text/HstText.story.vue.d.ts +1 -1
- package/dist/components/text/HstText.vue.d.ts +5 -14
- package/dist/components/textarea/HstTextarea.story.vue.d.ts +1 -1
- package/dist/components/textarea/HstTextarea.vue.d.ts +5 -14
- package/dist/index.d.ts +736 -2492
- package/dist/index.es.css +1 -0
- package/dist/index.es.js +5281 -4823
- package/dist/style-standalone.css +74 -66
- package/dist/utils.d.ts +1 -1
- package/package.json +32 -32
- package/src/components/HstCopyIcon.vue +2 -2
- package/src/components/HstWrapper.vue +1 -2
- package/src/components/button/HstButton.story.vue +1 -1
- package/src/components/button/HstButtonGroup.story.vue +2 -2
- package/src/components/button/HstButtonGroup.vue +8 -5
- package/src/components/checkbox/HstCheckbox.spec.ts +3 -3
- package/src/components/checkbox/HstCheckbox.story.vue +1 -1
- package/src/components/checkbox/HstCheckbox.vue +2 -2
- package/src/components/checkbox/HstCheckboxList.story.vue +1 -1
- package/src/components/checkbox/HstCheckboxList.vue +9 -6
- package/src/components/checkbox/HstSimpleCheckbox.story.vue +1 -1
- package/src/components/checkbox/HstSimpleCheckbox.vue +2 -2
- package/src/components/checkbox/__snapshots__/HstCheckbox.spec.ts.snap +4 -0
- package/src/components/colorselect/HstColorSelect.vue +1 -4
- package/src/components/design-tokens/HstColorShades.story.vue +2 -2
- package/src/components/design-tokens/HstColorShades.vue +3 -3
- package/src/components/design-tokens/HstTokenGrid.story.vue +6 -6
- package/src/components/design-tokens/HstTokenGrid.vue +1 -1
- package/src/components/design-tokens/HstTokenList.story.vue +23 -23
- package/src/components/json/HstJson.story.vue +1 -1
- package/src/components/json/HstJson.vue +21 -18
- package/src/components/number/HstNumber.story.vue +1 -1
- package/src/components/number/HstNumber.vue +8 -8
- package/src/components/radio/HstRadio.story.vue +1 -1
- package/src/components/radio/HstRadio.vue +7 -5
- package/src/components/select/CustomSelect.vue +10 -8
- package/src/components/select/HstSelect.story.vue +1 -1
- package/src/components/select/HstSelect.vue +1 -1
- package/src/components/slider/HstSlider.vue +4 -4
- package/src/components/text/HstText.story.vue +1 -1
- package/src/components/textarea/HstTextarea.story.vue +1 -1
- package/src/index.ts +8 -8
- package/tailwind.config.cjs +1 -1
- package/tsconfig.json +26 -25
- package/vite.config.ts +9 -9
- package/dist/style.css +0 -1
- 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/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/histoire.8af7bd1f.svg → .histoire/dist/histoire.svg} +0 -0
|
@@ -0,0 +1,148 @@
|
|
|
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 { ax as _export_sfc, d as defineComponent, c as computed, r as ref, a as openBlock, b as createElementBlock, F as Fragment, J as renderList, f as renderSlot, e as createBaseVNode, M as withDirectives, i as unref, ay as VTooltip, 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.2833ae3d.js";
|
|
21
|
+
import { H as HstCopyIcon } from "./HstCopyIcon.e40e725e.js";
|
|
22
|
+
var HstTokenGrid_vue_vue_type_style_index_0_lang = "";
|
|
23
|
+
const _hoisted_1 = ["onMouseenter"];
|
|
24
|
+
const _hoisted_2 = { class: "htw-flex htw-gap-1" };
|
|
25
|
+
const _hoisted_3 = { class: "htw-my-0 htw-truncate htw-shrink" };
|
|
26
|
+
const _hoisted_4 = { class: "htw-flex htw-gap-1" };
|
|
27
|
+
const _hoisted_5 = { class: "htw-my-0 htw-opacity-50 htw-truncate htw-shrink" };
|
|
28
|
+
const __default__ = {
|
|
29
|
+
name: "HstTokenGrid"
|
|
30
|
+
};
|
|
31
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__), {
|
|
32
|
+
props: {
|
|
33
|
+
tokens: { type: Object, required: true },
|
|
34
|
+
colSize: { type: Number, required: false, default: 180 },
|
|
35
|
+
getName: { type: Function, required: false, default: null }
|
|
36
|
+
},
|
|
37
|
+
setup(__props) {
|
|
38
|
+
const props = __props;
|
|
39
|
+
const processedTokens = computed(() => {
|
|
40
|
+
const list = props.tokens;
|
|
41
|
+
const getName = props.getName;
|
|
42
|
+
return Object.entries(list).map(([key, value]) => {
|
|
43
|
+
const name = getName ? getName(key, value) : key;
|
|
44
|
+
return {
|
|
45
|
+
key,
|
|
46
|
+
name,
|
|
47
|
+
value: typeof value === "number" ? value.toString() : value
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
const colSizePx = computed(() => `${props.colSize}px`);
|
|
52
|
+
const hover = ref(null);
|
|
53
|
+
return (_ctx, _cache) => {
|
|
54
|
+
return openBlock(), createElementBlock("div", {
|
|
55
|
+
class: "htw-bind-col-size htw-grid htw-gap-4 htw-m-4",
|
|
56
|
+
style: normalizeStyle({
|
|
57
|
+
"--histoire-col-size": unref(colSizePx)
|
|
58
|
+
})
|
|
59
|
+
}, [
|
|
60
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(processedTokens), (token) => {
|
|
61
|
+
return openBlock(), createElementBlock("div", {
|
|
62
|
+
key: token.key,
|
|
63
|
+
class: "htw-flex htw-flex-col htw-gap-2",
|
|
64
|
+
onMouseenter: ($event) => hover.value = token.key,
|
|
65
|
+
onMouseleave: _cache[0] || (_cache[0] = ($event) => hover.value = null)
|
|
66
|
+
}, [
|
|
67
|
+
renderSlot(_ctx.$slots, "default", { token }),
|
|
68
|
+
createBaseVNode("div", null, [
|
|
69
|
+
createBaseVNode("div", _hoisted_2, [
|
|
70
|
+
withDirectives((openBlock(), createElementBlock("pre", _hoisted_3, [
|
|
71
|
+
createTextVNode(toDisplayString(token.name), 1)
|
|
72
|
+
])), [
|
|
73
|
+
[unref(VTooltip), token.name.length > __props.colSize / 8 ? token.name : ""]
|
|
74
|
+
]),
|
|
75
|
+
hover.value === token.key ? (openBlock(), createBlock(HstCopyIcon, {
|
|
76
|
+
key: 0,
|
|
77
|
+
content: token.name,
|
|
78
|
+
class: "htw-flex-none"
|
|
79
|
+
}, null, 8, ["content"])) : createCommentVNode("v-if", true)
|
|
80
|
+
]),
|
|
81
|
+
createBaseVNode("div", _hoisted_4, [
|
|
82
|
+
withDirectives((openBlock(), createElementBlock("pre", _hoisted_5, [
|
|
83
|
+
createTextVNode(toDisplayString(token.value), 1)
|
|
84
|
+
])), [
|
|
85
|
+
[unref(VTooltip), token.value.length > __props.colSize / 8 ? token.value : ""]
|
|
86
|
+
]),
|
|
87
|
+
hover.value === token.key ? (openBlock(), createBlock(HstCopyIcon, {
|
|
88
|
+
key: 0,
|
|
89
|
+
content: typeof token.value === "string" ? token.value : JSON.stringify(token.value),
|
|
90
|
+
class: "htw-flex-none"
|
|
91
|
+
}, null, 8, ["content"])) : createCommentVNode("v-if", true)
|
|
92
|
+
])
|
|
93
|
+
])
|
|
94
|
+
], 40, _hoisted_1);
|
|
95
|
+
}), 128))
|
|
96
|
+
], 4);
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
}));
|
|
100
|
+
_sfc_main$1.__file = "src/components/design-tokens/HstTokenGrid.vue";
|
|
101
|
+
var HstTokenGrid = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "/Users/akryum/Projects/histoire/packages/histoire-controls/src/components/design-tokens/HstTokenGrid.vue"]]);
|
|
102
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
103
|
+
name: "HstTokenGrid.story",
|
|
104
|
+
setup(__props) {
|
|
105
|
+
const tokens = {
|
|
106
|
+
sm: "filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.05))",
|
|
107
|
+
DEFAULT: "filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06))",
|
|
108
|
+
md: "filter: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06))",
|
|
109
|
+
lg: "filter: drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1))",
|
|
110
|
+
xl: "filter: drop-shadow(0 20px 13px rgb(0 0 0 / 0.03)) drop-shadow(0 8px 5px rgb(0 0 0 / 0.08))",
|
|
111
|
+
"2xl": "filter: drop-shadow(0 25px 25px rgb(0 0 0 / 0.15))",
|
|
112
|
+
none: "filter: drop-shadow(0 0 #0000)"
|
|
113
|
+
};
|
|
114
|
+
return (_ctx, _cache) => {
|
|
115
|
+
const _component_Variant = resolveComponent("Variant");
|
|
116
|
+
const _component_Story = resolveComponent("Story");
|
|
117
|
+
return openBlock(), createBlock(_component_Story, {
|
|
118
|
+
title: "design-tokens/HstTokenGrid",
|
|
119
|
+
"responsive-disabled": ""
|
|
120
|
+
}, {
|
|
121
|
+
default: withCtx(() => [
|
|
122
|
+
createVNode(_component_Variant, { title: "default" }, {
|
|
123
|
+
default: withCtx(() => [
|
|
124
|
+
createVNode(HstTokenGrid, {
|
|
125
|
+
tokens,
|
|
126
|
+
"get-name": (key) => key === "DEFAULT" ? "drop-shadow" : `drop-shadow-${key}`,
|
|
127
|
+
"col-size": 160
|
|
128
|
+
}, {
|
|
129
|
+
default: withCtx(({ token }) => [
|
|
130
|
+
createBaseVNode("div", {
|
|
131
|
+
class: "htw-w-32 htw-h-32 htw-bg-white dark:htw-bg-black htw-rounded htw-mb-2",
|
|
132
|
+
style: normalizeStyle(token.value)
|
|
133
|
+
}, null, 4)
|
|
134
|
+
]),
|
|
135
|
+
_: 1
|
|
136
|
+
}, 8, ["get-name"])
|
|
137
|
+
]),
|
|
138
|
+
_: 1
|
|
139
|
+
})
|
|
140
|
+
]),
|
|
141
|
+
_: 1
|
|
142
|
+
});
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
_sfc_main.__file = "src/components/design-tokens/HstTokenGrid.story.vue";
|
|
147
|
+
var HstTokenGrid_story = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/akryum/Projects/histoire/packages/histoire-controls/src/components/design-tokens/HstTokenGrid.story.vue"]]);
|
|
148
|
+
export { HstTokenGrid_story as default };
|
|
@@ -0,0 +1,176 @@
|
|
|
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 { ax as _export_sfc, d as defineComponent, c as computed, r as ref, a as openBlock, b as createElementBlock, J as renderList, f as renderSlot, e as createBaseVNode, t as toDisplayString, j as createBlock, m as createCommentVNode, i as unref, F as Fragment, q as resolveComponent, k as withCtx, l as createVNode, h as normalizeStyle } from "./vendor.2833ae3d.js";
|
|
21
|
+
import { H as HstCopyIcon } from "./HstCopyIcon.e40e725e.js";
|
|
22
|
+
const _hoisted_1$1 = ["onMouseenter"];
|
|
23
|
+
const _hoisted_2 = { class: "htw-mx-4" };
|
|
24
|
+
const _hoisted_3 = { class: "htw-flex htw-gap-1" };
|
|
25
|
+
const _hoisted_4 = { class: "htw-my-0 htw-truncate htw-shrink" };
|
|
26
|
+
const _hoisted_5 = { class: "htw-flex htw-gap-1" };
|
|
27
|
+
const _hoisted_6 = { class: "htw-my-0 htw-opacity-50 htw-truncate htw-shrink" };
|
|
28
|
+
const __default__ = {
|
|
29
|
+
name: "HstTokenList"
|
|
30
|
+
};
|
|
31
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__), {
|
|
32
|
+
props: {
|
|
33
|
+
tokens: { type: Object, required: true },
|
|
34
|
+
getName: { type: Function, required: false }
|
|
35
|
+
},
|
|
36
|
+
setup(__props) {
|
|
37
|
+
const props = __props;
|
|
38
|
+
const processedTokens = computed(() => {
|
|
39
|
+
const list = props.tokens;
|
|
40
|
+
const getName = props.getName;
|
|
41
|
+
return Object.entries(list).map(([key, value]) => {
|
|
42
|
+
const name = getName ? getName(key, value) : key;
|
|
43
|
+
return {
|
|
44
|
+
key,
|
|
45
|
+
name,
|
|
46
|
+
value: typeof value === "number" ? value.toString() : value
|
|
47
|
+
};
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
const hover = ref(null);
|
|
51
|
+
return (_ctx, _cache) => {
|
|
52
|
+
return openBlock(true), createElementBlock(Fragment, null, renderList(unref(processedTokens), (token) => {
|
|
53
|
+
return openBlock(), createElementBlock("div", {
|
|
54
|
+
key: token.key,
|
|
55
|
+
class: "htw-flex htw-flex-col htw-gap-2 htw-my-8",
|
|
56
|
+
onMouseenter: ($event) => hover.value = token.key,
|
|
57
|
+
onMouseleave: _cache[0] || (_cache[0] = ($event) => hover.value = null)
|
|
58
|
+
}, [
|
|
59
|
+
renderSlot(_ctx.$slots, "default", { token }),
|
|
60
|
+
createBaseVNode("div", _hoisted_2, [
|
|
61
|
+
createBaseVNode("div", _hoisted_3, [
|
|
62
|
+
createBaseVNode("pre", _hoisted_4, toDisplayString(token.name), 1),
|
|
63
|
+
hover.value === token.key ? (openBlock(), createBlock(HstCopyIcon, {
|
|
64
|
+
key: 0,
|
|
65
|
+
content: token.name,
|
|
66
|
+
class: "htw-flex-none"
|
|
67
|
+
}, null, 8, ["content"])) : createCommentVNode("v-if", true)
|
|
68
|
+
]),
|
|
69
|
+
createBaseVNode("div", _hoisted_5, [
|
|
70
|
+
createBaseVNode("pre", _hoisted_6, toDisplayString(token.value), 1),
|
|
71
|
+
hover.value === token.key ? (openBlock(), createBlock(HstCopyIcon, {
|
|
72
|
+
key: 0,
|
|
73
|
+
content: typeof token.value === "string" ? token.value : JSON.stringify(token.value),
|
|
74
|
+
class: "htw-flex-none"
|
|
75
|
+
}, null, 8, ["content"])) : createCommentVNode("v-if", true)
|
|
76
|
+
])
|
|
77
|
+
])
|
|
78
|
+
], 40, _hoisted_1$1);
|
|
79
|
+
}), 128);
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
}));
|
|
83
|
+
_sfc_main$1.__file = "src/components/design-tokens/HstTokenList.vue";
|
|
84
|
+
var HstTokenList = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "/Users/akryum/Projects/histoire/packages/histoire-controls/src/components/design-tokens/HstTokenList.vue"]]);
|
|
85
|
+
const _hoisted_1 = { class: "htw-bg-gray-500/10" };
|
|
86
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
87
|
+
name: "HstTokenList.story",
|
|
88
|
+
setup(__props) {
|
|
89
|
+
const tokens = {
|
|
90
|
+
0: 0,
|
|
91
|
+
1: "0.25rem",
|
|
92
|
+
2: "0.5rem",
|
|
93
|
+
3: "0.75rem",
|
|
94
|
+
4: "1rem",
|
|
95
|
+
5: "1.25rem",
|
|
96
|
+
6: "1.5rem",
|
|
97
|
+
8: "2rem",
|
|
98
|
+
10: "2.5rem",
|
|
99
|
+
12: "3rem",
|
|
100
|
+
16: "4rem",
|
|
101
|
+
20: "5rem",
|
|
102
|
+
24: "6rem",
|
|
103
|
+
32: "8rem",
|
|
104
|
+
40: "10rem",
|
|
105
|
+
48: "12rem",
|
|
106
|
+
56: "14rem",
|
|
107
|
+
64: "16rem",
|
|
108
|
+
auto: "auto",
|
|
109
|
+
px: "1px",
|
|
110
|
+
screen: "100vw",
|
|
111
|
+
"1/2": "50%",
|
|
112
|
+
"1/3": "33.333333%",
|
|
113
|
+
"2/3": "66.666667%",
|
|
114
|
+
"1/4": "25%",
|
|
115
|
+
"2/4": "50%",
|
|
116
|
+
"3/4": "75%",
|
|
117
|
+
"1/5": "20%",
|
|
118
|
+
"2/5": "40%",
|
|
119
|
+
"3/5": "60%",
|
|
120
|
+
"4/5": "80%",
|
|
121
|
+
"1/6": "16.666667%",
|
|
122
|
+
"2/6": "33.333333%",
|
|
123
|
+
"3/6": "50%",
|
|
124
|
+
"4/6": "66.666667%",
|
|
125
|
+
"5/6": "83.333333%",
|
|
126
|
+
"1/12": "8.333333%",
|
|
127
|
+
"2/12": "16.666667%",
|
|
128
|
+
"3/12": "25%",
|
|
129
|
+
"4/12": "33.333333%",
|
|
130
|
+
"5/12": "41.666667%",
|
|
131
|
+
"6/12": "50%",
|
|
132
|
+
"7/12": "58.333333%",
|
|
133
|
+
"8/12": "66.666667%",
|
|
134
|
+
"9/12": "75%",
|
|
135
|
+
"10/12": "83.333333%",
|
|
136
|
+
"11/12": "91.666667%",
|
|
137
|
+
full: "100%"
|
|
138
|
+
};
|
|
139
|
+
return (_ctx, _cache) => {
|
|
140
|
+
const _component_Variant = resolveComponent("Variant");
|
|
141
|
+
const _component_Story = resolveComponent("Story");
|
|
142
|
+
return openBlock(), createBlock(_component_Story, {
|
|
143
|
+
title: "design-tokens/HstTokenList",
|
|
144
|
+
"responsive-disabled": ""
|
|
145
|
+
}, {
|
|
146
|
+
default: withCtx(() => [
|
|
147
|
+
createVNode(_component_Variant, { title: "default" }, {
|
|
148
|
+
default: withCtx(() => [
|
|
149
|
+
createVNode(HstTokenList, {
|
|
150
|
+
tokens,
|
|
151
|
+
"get-name": (key) => `w-${key}`
|
|
152
|
+
}, {
|
|
153
|
+
default: withCtx(({ token }) => [
|
|
154
|
+
createBaseVNode("div", _hoisted_1, [
|
|
155
|
+
createBaseVNode("div", {
|
|
156
|
+
class: "htw-h-20 htw-bg-gray-500/50",
|
|
157
|
+
style: normalizeStyle({
|
|
158
|
+
width: token.value
|
|
159
|
+
})
|
|
160
|
+
}, null, 4)
|
|
161
|
+
])
|
|
162
|
+
]),
|
|
163
|
+
_: 1
|
|
164
|
+
}, 8, ["get-name"])
|
|
165
|
+
]),
|
|
166
|
+
_: 1
|
|
167
|
+
})
|
|
168
|
+
]),
|
|
169
|
+
_: 1
|
|
170
|
+
});
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
_sfc_main.__file = "src/components/design-tokens/HstTokenList.story.vue";
|
|
175
|
+
var HstTokenList_story = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/akryum/Projects/histoire/packages/histoire-controls/src/components/design-tokens/HstTokenList.story.vue"]]);
|
|
176
|
+
export { HstTokenList_story as default };
|
|
@@ -0,0 +1,56 @@
|
|
|
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 { ax as _export_sfc, d as defineComponent, a as openBlock, b as createElementBlock, M as withDirectives, i as unref, ay as VTooltip, R as createTextVNode, t as toDisplayString, e as createBaseVNode, f as renderSlot } from "./vendor.2833ae3d.js";
|
|
21
|
+
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" };
|
|
22
|
+
const _hoisted_2 = { class: "htw-w-28 htw-whitespace-nowrap htw-text-ellipsis htw-overflow-hidden htw-shrink-0" };
|
|
23
|
+
const _hoisted_3 = { class: "htw-grow htw-flex htw-items-center htw-gap-1" };
|
|
24
|
+
const _hoisted_4 = { class: "htw-block htw-grow" };
|
|
25
|
+
const __default__ = {
|
|
26
|
+
name: "HstWrapper"
|
|
27
|
+
};
|
|
28
|
+
const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__), {
|
|
29
|
+
props: {
|
|
30
|
+
title: { type: String, required: false }
|
|
31
|
+
},
|
|
32
|
+
setup(__props) {
|
|
33
|
+
return (_ctx, _cache) => {
|
|
34
|
+
return openBlock(), createElementBlock("label", _hoisted_1, [
|
|
35
|
+
withDirectives((openBlock(), createElementBlock("span", _hoisted_2, [
|
|
36
|
+
createTextVNode(toDisplayString(__props.title), 1)
|
|
37
|
+
])), [
|
|
38
|
+
[unref(VTooltip), {
|
|
39
|
+
content: __props.title,
|
|
40
|
+
placement: "left",
|
|
41
|
+
distance: 12
|
|
42
|
+
}]
|
|
43
|
+
]),
|
|
44
|
+
createBaseVNode("span", _hoisted_3, [
|
|
45
|
+
createBaseVNode("span", _hoisted_4, [
|
|
46
|
+
renderSlot(_ctx.$slots, "default")
|
|
47
|
+
]),
|
|
48
|
+
renderSlot(_ctx.$slots, "actions")
|
|
49
|
+
])
|
|
50
|
+
]);
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}));
|
|
54
|
+
_sfc_main.__file = "src/components/HstWrapper.vue";
|
|
55
|
+
var HstWrapper = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/akryum/Projects/histoire/packages/histoire-controls/src/components/HstWrapper.vue"]]);
|
|
56
|
+
export { HstWrapper as H };
|