@histoire/controls 0.7.8 → 0.8.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/dist/components/radio/HstRadio.story.vue.d.ts +2 -0
- package/dist/components/radio/HstRadio.vue.d.ts +24 -0
- package/dist/components/select/CustomSelect.vue.d.ts +3 -6
- package/dist/components/select/HstSelect.vue.d.ts +3 -4
- package/dist/index.d.ts +324 -2
- package/dist/index.es.js +498 -5133
- package/dist/style-standalone.css +31 -0
- package/dist/types.d.ts +4 -0
- package/package.json +4 -6
- package/peeky.config.ts +21 -0
- package/src/components/HstWrapper.vue +1 -1
- package/src/components/checkbox/HstCheckbox.vue +3 -1
- package/src/components/radio/HstRadio.story.vue +47 -0
- package/src/components/radio/HstRadio.vue +107 -0
- package/src/components/select/CustomSelect.vue +3 -7
- package/src/components/select/HstSelect.vue +4 -8
- package/src/components/slider/HstSlider.vue +1 -1
- package/src/components/text/HstText.vue +1 -1
- package/src/components/textarea/HstTextarea.vue +1 -1
- package/src/index.ts +15 -11
- package/src/types.ts +4 -0
- package/tsconfig.json +10 -0
- package/vite.config.ts +12 -9
- 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
- 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
|
@@ -299,6 +299,10 @@
|
|
|
299
299
|
margin-bottom:0.5rem
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
+
.htw-mr-2{
|
|
303
|
+
margin-right:0.5rem
|
|
304
|
+
}
|
|
305
|
+
|
|
302
306
|
.htw-ml-auto{
|
|
303
307
|
margin-left:auto
|
|
304
308
|
}
|
|
@@ -319,6 +323,10 @@
|
|
|
319
323
|
display:grid
|
|
320
324
|
}
|
|
321
325
|
|
|
326
|
+
.htw-hidden{
|
|
327
|
+
display:none
|
|
328
|
+
}
|
|
329
|
+
|
|
322
330
|
.htw-h-4{
|
|
323
331
|
height:1rem
|
|
324
332
|
}
|
|
@@ -407,6 +415,12 @@
|
|
|
407
415
|
flex-grow:1
|
|
408
416
|
}
|
|
409
417
|
|
|
418
|
+
.htw-scale-0{
|
|
419
|
+
--tw-scale-x:0;
|
|
420
|
+
--tw-scale-y:0;
|
|
421
|
+
transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))
|
|
422
|
+
}
|
|
423
|
+
|
|
410
424
|
.htw-cursor-pointer{
|
|
411
425
|
cursor:pointer
|
|
412
426
|
}
|
|
@@ -569,6 +583,14 @@
|
|
|
569
583
|
background-color:rgb(16 185 129 / var(--tw-bg-opacity)) !important
|
|
570
584
|
}
|
|
571
585
|
|
|
586
|
+
.htw-fill-primary-500{
|
|
587
|
+
fill:#10b981
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
.htw-fill-transparent{
|
|
591
|
+
fill:transparent
|
|
592
|
+
}
|
|
593
|
+
|
|
572
594
|
.htw-stroke-white{
|
|
573
595
|
stroke:#fff
|
|
574
596
|
}
|
|
@@ -672,6 +694,10 @@
|
|
|
672
694
|
transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)
|
|
673
695
|
}
|
|
674
696
|
|
|
697
|
+
.htw-will-change-transform{
|
|
698
|
+
will-change:transform
|
|
699
|
+
}
|
|
700
|
+
|
|
675
701
|
body {
|
|
676
702
|
font-size: 1.125rem;
|
|
677
703
|
}
|
|
@@ -711,6 +737,11 @@ body {
|
|
|
711
737
|
border-color:rgb(16 185 129 / var(--tw-border-opacity))
|
|
712
738
|
}
|
|
713
739
|
|
|
740
|
+
.htw-group:hover .group-hover\:htw-border-primary-500{
|
|
741
|
+
--tw-border-opacity:1;
|
|
742
|
+
border-color:rgb(16 185 129 / var(--tw-border-opacity))
|
|
743
|
+
}
|
|
744
|
+
|
|
714
745
|
.htw-group:active .group-active\:htw-bg-gray-500\/20{
|
|
715
746
|
background-color:rgb(113 113 122 / 0.2)
|
|
716
747
|
}
|
package/dist/types.d.ts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@histoire/controls",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Prebuilt controls components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -31,9 +31,7 @@
|
|
|
31
31
|
"*.vue"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@
|
|
35
|
-
"@vueuse/core": "^8.2.5",
|
|
36
|
-
"floating-vue": "^2.0.0-beta.16"
|
|
34
|
+
"@histoire/vendors": "^0.8.1"
|
|
37
35
|
},
|
|
38
36
|
"devDependencies": {
|
|
39
37
|
"@peeky/test": "^0.13.5",
|
|
@@ -44,11 +42,11 @@
|
|
|
44
42
|
"autoprefixer": "^10.4.4",
|
|
45
43
|
"concurrently": "^7.1.0",
|
|
46
44
|
"floating-vue": "^2.0.0-beta.16",
|
|
47
|
-
"histoire": "0.
|
|
45
|
+
"histoire": "0.8.1",
|
|
48
46
|
"postcss": "^8.4.12",
|
|
49
47
|
"postcss-import": "^14.1.0",
|
|
50
48
|
"tailwindcss": "^3.0.23",
|
|
51
|
-
"typescript": "^4.
|
|
49
|
+
"typescript": "^4.7.4",
|
|
52
50
|
"vite": "^2.9.1",
|
|
53
51
|
"vue": "^3.2.31",
|
|
54
52
|
"vue-tsc": "^0.35.2"
|
package/peeky.config.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineConfig } from '@peeky/test'
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
runtimeEnv: 'dom',
|
|
5
|
+
previewSetupFiles: [
|
|
6
|
+
'src/peeky-preview.ts',
|
|
7
|
+
],
|
|
8
|
+
vite: {
|
|
9
|
+
resolve: {
|
|
10
|
+
alias: {
|
|
11
|
+
'floating-vue': 'floating-vue',
|
|
12
|
+
'@iconify/vue': '@iconify/vue',
|
|
13
|
+
pinia: 'pinia',
|
|
14
|
+
'scroll-into-view-if-needed': 'scroll-into-view-if-needed',
|
|
15
|
+
'vue-router': 'vue-router',
|
|
16
|
+
'@vueuse/core': '@vueuse/core',
|
|
17
|
+
vue: 'vue',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
})
|
|
@@ -28,9 +28,11 @@ const path = ref<SVGPathElement>()
|
|
|
28
28
|
const dasharray = ref(0)
|
|
29
29
|
const progress = computed(() => props.modelValue ? 1 : 0)
|
|
30
30
|
const dashoffset = computed(() => (1 - progress.value) * dasharray.value)
|
|
31
|
+
|
|
32
|
+
// animationEnabled prevents the animation from triggering on mounted
|
|
31
33
|
const animationEnabled = ref(false)
|
|
32
34
|
|
|
33
|
-
watch(path,
|
|
35
|
+
watch(path, () => {
|
|
34
36
|
dasharray.value = path.value.getTotalLength?.() ?? 21.21
|
|
35
37
|
})
|
|
36
38
|
</script>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import HstRadio from './HstRadio.vue'
|
|
3
|
+
|
|
4
|
+
const options = {
|
|
5
|
+
'crash-bandicoot': 'Crash Bandicoot',
|
|
6
|
+
'the-last-of-us': 'The Last of Us',
|
|
7
|
+
'ghost-of-tsushima': 'Ghost of Tsushima',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const flatOptions = Object.keys(options)
|
|
11
|
+
|
|
12
|
+
const objectOptions = Object.keys(options).map(key => ({
|
|
13
|
+
label: options[key],
|
|
14
|
+
value: key,
|
|
15
|
+
}))
|
|
16
|
+
|
|
17
|
+
function initState () {
|
|
18
|
+
return {
|
|
19
|
+
character: flatOptions[0],
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<Story title="HstRadio">
|
|
26
|
+
<Variant
|
|
27
|
+
title="playground"
|
|
28
|
+
:init-state="initState"
|
|
29
|
+
>
|
|
30
|
+
<template #default="{ state }">
|
|
31
|
+
<HstRadio
|
|
32
|
+
v-model="state.character"
|
|
33
|
+
title="Label"
|
|
34
|
+
:options="objectOptions"
|
|
35
|
+
/>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<template #controls="{ state }">
|
|
39
|
+
<HstRadio
|
|
40
|
+
v-model="state.character"
|
|
41
|
+
title="Label"
|
|
42
|
+
:options="objectOptions"
|
|
43
|
+
/>
|
|
44
|
+
</template>
|
|
45
|
+
</Variant>
|
|
46
|
+
</Story>
|
|
47
|
+
</template>
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export default {
|
|
3
|
+
name: 'HstRadio',
|
|
4
|
+
}
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import { computed, ComputedRef, ref } from 'vue'
|
|
9
|
+
import HstWrapper from '../HstWrapper.vue'
|
|
10
|
+
import { HstControlOption } from '../../types'
|
|
11
|
+
|
|
12
|
+
const props = defineProps<{
|
|
13
|
+
title?: string
|
|
14
|
+
modelValue: string
|
|
15
|
+
options: HstControlOption[]
|
|
16
|
+
}>()
|
|
17
|
+
|
|
18
|
+
const formattedOptions: ComputedRef<Record<string, string>> = computed(() => {
|
|
19
|
+
if (Array.isArray(props.options)) {
|
|
20
|
+
return Object.fromEntries(props.options.map((value: string | HstControlOption) => {
|
|
21
|
+
if (typeof value === 'string') {
|
|
22
|
+
return [value, value]
|
|
23
|
+
} else {
|
|
24
|
+
return [value.value, value.label]
|
|
25
|
+
}
|
|
26
|
+
}))
|
|
27
|
+
}
|
|
28
|
+
return props.options
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
const emit = defineEmits<{
|
|
32
|
+
(e: 'update:modelValue', value: string): void
|
|
33
|
+
}>()
|
|
34
|
+
|
|
35
|
+
function selectOption (value: string) {
|
|
36
|
+
emit('update:modelValue', value)
|
|
37
|
+
animationEnabled.value = true
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// animationEnabled prevents the animation from triggering on mounted
|
|
41
|
+
const animationEnabled = ref(false)
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<template>
|
|
45
|
+
<HstWrapper
|
|
46
|
+
role="group"
|
|
47
|
+
:title="title"
|
|
48
|
+
class="htw-cursor-text"
|
|
49
|
+
:class="$attrs.class"
|
|
50
|
+
:style="$attrs.style"
|
|
51
|
+
>
|
|
52
|
+
<div class="-htw-my-1">
|
|
53
|
+
<template
|
|
54
|
+
v-for="( label, value ) in formattedOptions"
|
|
55
|
+
:key="value"
|
|
56
|
+
>
|
|
57
|
+
<input
|
|
58
|
+
:id="`${value}-radio`"
|
|
59
|
+
type="radio"
|
|
60
|
+
:name="`${value}-radio`"
|
|
61
|
+
:value="value"
|
|
62
|
+
:checked="value === modelValue"
|
|
63
|
+
class="htw-hidden"
|
|
64
|
+
@change="selectOption(value)"
|
|
65
|
+
>
|
|
66
|
+
<label
|
|
67
|
+
tabindex="0"
|
|
68
|
+
:for="`${value}-radio`"
|
|
69
|
+
class="htw-cursor-pointer htw-flex htw-items-center htw-relative htw-py-1 htw-group"
|
|
70
|
+
@keydown.enter.prevent="selectOption(value)"
|
|
71
|
+
@keydown.space.prevent="selectOption(value)"
|
|
72
|
+
>
|
|
73
|
+
<svg
|
|
74
|
+
width="16"
|
|
75
|
+
height="16"
|
|
76
|
+
viewBox="-12 -12 24 24"
|
|
77
|
+
class="htw-relative htw-z-10 htw-border htw-border-solid htw-text-inherit htw-rounded-full htw-box-border htw-inset-0 htw-transition-border htw-duration-150 htw-ease-out htw-mr-2 group-hover:htw-border-primary-500"
|
|
78
|
+
:class="[
|
|
79
|
+
modelValue === value
|
|
80
|
+
? 'htw-border-primary-500'
|
|
81
|
+
: 'htw-border-black/25 dark:htw-border-white/25',
|
|
82
|
+
]"
|
|
83
|
+
>
|
|
84
|
+
<circle
|
|
85
|
+
r="7"
|
|
86
|
+
class="htw-will-change-transform"
|
|
87
|
+
:class="[
|
|
88
|
+
animationEnabled ? 'htw-transition-all' : 'htw-transition-none',
|
|
89
|
+
{
|
|
90
|
+
'htw-delay-150': modelValue === value,
|
|
91
|
+
},
|
|
92
|
+
modelValue === value
|
|
93
|
+
? 'htw-fill-primary-500'
|
|
94
|
+
: 'htw-fill-transparent htw-scale-0',
|
|
95
|
+
]"
|
|
96
|
+
/>
|
|
97
|
+
</svg>
|
|
98
|
+
{{ label }}
|
|
99
|
+
</label>
|
|
100
|
+
</template>
|
|
101
|
+
</div>
|
|
102
|
+
|
|
103
|
+
<template #actions>
|
|
104
|
+
<slot name="actions" />
|
|
105
|
+
</template>
|
|
106
|
+
</HstWrapper>
|
|
107
|
+
</template>
|
|
@@ -8,15 +8,11 @@ export default {
|
|
|
8
8
|
import { Dropdown as VDropdown } from 'floating-vue'
|
|
9
9
|
import { computed, ComputedRef } from 'vue'
|
|
10
10
|
import { Icon } from '@iconify/vue'
|
|
11
|
-
|
|
12
|
-
export interface SelectOption {
|
|
13
|
-
label: string
|
|
14
|
-
value: string
|
|
15
|
-
}
|
|
11
|
+
import { HstControlOption } from '../../types'
|
|
16
12
|
|
|
17
13
|
const props = defineProps<{
|
|
18
14
|
modelValue: string
|
|
19
|
-
options: Record<string, string> | string[] |
|
|
15
|
+
options: Record<string, string> | string[] | HstControlOption[]
|
|
20
16
|
}>()
|
|
21
17
|
|
|
22
18
|
const emits = defineEmits<{
|
|
@@ -25,7 +21,7 @@ const emits = defineEmits<{
|
|
|
25
21
|
|
|
26
22
|
const formattedOptions: ComputedRef<Record<string, string>> = computed(() => {
|
|
27
23
|
if (Array.isArray(props.options)) {
|
|
28
|
-
return Object.fromEntries(props.options.map((value: string |
|
|
24
|
+
return Object.fromEntries(props.options.map((value: string | HstControlOption) => {
|
|
29
25
|
if (typeof value === 'string') {
|
|
30
26
|
return [value, value]
|
|
31
27
|
} else {
|
|
@@ -2,26 +2,22 @@
|
|
|
2
2
|
export default {
|
|
3
3
|
name: 'HstSelect',
|
|
4
4
|
}
|
|
5
|
-
|
|
6
|
-
export type { SelectOption as HstSelectOption } from './CustomSelect.vue'
|
|
7
5
|
</script>
|
|
8
6
|
|
|
9
7
|
<script lang="ts" setup>
|
|
10
|
-
import { ref } from 'vue'
|
|
11
8
|
import HstWrapper from '../HstWrapper.vue'
|
|
12
|
-
import CustomSelect
|
|
9
|
+
import CustomSelect from './CustomSelect.vue'
|
|
10
|
+
import { HstControlOption } from '../../types'
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
defineProps<{
|
|
15
13
|
title?: string
|
|
16
14
|
modelValue: string
|
|
17
|
-
options: Record<string, string> | string[] |
|
|
15
|
+
options: Record<string, string> | string[] | HstControlOption[]
|
|
18
16
|
}>()
|
|
19
17
|
|
|
20
18
|
const emits = defineEmits<{
|
|
21
19
|
(e: 'update:modelValue', value: string): void
|
|
22
20
|
}>()
|
|
23
|
-
|
|
24
|
-
const select = ref<HTMLInputElement>()
|
|
25
21
|
</script>
|
|
26
22
|
|
|
27
23
|
<template>
|
|
@@ -64,7 +64,7 @@ const tooltipStyle = computed<CSSProperties>(() => {
|
|
|
64
64
|
v-model.number="numberModel"
|
|
65
65
|
class="htw-range-input htw-appearance-none htw-border-0 htw-bg-transparent htw-cursor-pointer htw-relative htw-w-full htw-m-0 htw-text-gray-700"
|
|
66
66
|
type="range"
|
|
67
|
-
v-bind="{ ...$attrs, class: null, style: null }"
|
|
67
|
+
v-bind="{ ...$attrs, class: null, style: null, min, max }"
|
|
68
68
|
@mouseover="showTooltip = true"
|
|
69
69
|
@mouseleave="showTooltip = false"
|
|
70
70
|
>
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { App } from 'vue'
|
|
2
1
|
import HstCheckboxVue from './components/checkbox/HstCheckbox.vue'
|
|
3
2
|
import HstTextVue from './components/text/HstText.vue'
|
|
4
3
|
import HstNumberVue from './components/number/HstNumber.vue'
|
|
@@ -9,25 +8,30 @@ import HstColorShadesVue from './components/design-tokens/HstColorShades.vue'
|
|
|
9
8
|
import HstTokenListVue from './components/design-tokens/HstTokenList.vue'
|
|
10
9
|
import HstTokenGridVue from './components/design-tokens/HstTokenGrid.vue'
|
|
11
10
|
import HstCopyIconVue from './components/HstCopyIcon.vue'
|
|
11
|
+
import HstRadioVue from './components/radio/HstRadio.vue'
|
|
12
12
|
|
|
13
13
|
export const HstCheckbox = HstCheckboxVue
|
|
14
14
|
export const HstText = HstTextVue
|
|
15
15
|
export const HstNumber = HstNumberVue
|
|
16
16
|
export const HstSlider = HstSliderVue
|
|
17
17
|
export const HstTextarea = HstTextareaVue
|
|
18
|
+
export const HstSelect = HstSelectVue
|
|
18
19
|
export const HstColorShades = HstColorShadesVue
|
|
19
20
|
export const HstTokenList = HstTokenListVue
|
|
20
21
|
export const HstTokenGrid = HstTokenGridVue
|
|
21
22
|
export const HstCopyIcon = HstCopyIconVue
|
|
23
|
+
export const HstRadio = HstRadioVue
|
|
22
24
|
|
|
23
|
-
export
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
export const components = {
|
|
26
|
+
HstCheckbox,
|
|
27
|
+
HstText,
|
|
28
|
+
HstNumber,
|
|
29
|
+
HstSlider,
|
|
30
|
+
HstTextarea,
|
|
31
|
+
HstSelect,
|
|
32
|
+
HstColorShades,
|
|
33
|
+
HstTokenList,
|
|
34
|
+
HstTokenGrid,
|
|
35
|
+
HstCopyIcon,
|
|
36
|
+
HstRadio,
|
|
33
37
|
}
|
package/src/types.ts
ADDED
package/tsconfig.json
CHANGED
|
@@ -29,6 +29,16 @@
|
|
|
29
29
|
"strictFunctionTypes": true,
|
|
30
30
|
// Volar
|
|
31
31
|
"jsx": "preserve",
|
|
32
|
+
// Alias
|
|
33
|
+
"paths": {
|
|
34
|
+
"floating-vue": ["./node_modules/@histoire/vendors/dist/client/floating-vue"],
|
|
35
|
+
"@iconify/vue": ["./node_modules/@histoire/vendors/dist/client/iconify"],
|
|
36
|
+
"pinia": ["./node_modules/@histoire/vendors/dist/client/pinia"],
|
|
37
|
+
"scroll-into-view-if-needed": ["./node_modules/@histoire/vendors/dist/client/scroll"],
|
|
38
|
+
"vue-router": ["./node_modules/@histoire/vendors/dist/client/vue-router"],
|
|
39
|
+
"@vueuse/core": ["./node_modules/@histoire/vendors/dist/client/vue-use"],
|
|
40
|
+
"vue": ["./node_modules/@histoire/vendors/dist/client/vue"]
|
|
41
|
+
}
|
|
32
42
|
},
|
|
33
43
|
"include": [
|
|
34
44
|
"src"
|
package/vite.config.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="@peeky/test"/>
|
|
2
1
|
/// <reference types="histoire"/>
|
|
3
2
|
|
|
4
3
|
import { defineConfig } from 'vite'
|
|
@@ -9,6 +8,18 @@ export default defineConfig({
|
|
|
9
8
|
vue(),
|
|
10
9
|
],
|
|
11
10
|
|
|
11
|
+
resolve: {
|
|
12
|
+
alias: {
|
|
13
|
+
'floating-vue': '@histoire/vendors/dist/client/floating-vue.js',
|
|
14
|
+
'@iconify/vue': '@histoire/vendors/dist/client/iconify.js',
|
|
15
|
+
pinia: '@histoire/vendors/dist/client/pinia.js',
|
|
16
|
+
'scroll-into-view-if-needed': '@histoire/vendors/dist/client/scroll.js',
|
|
17
|
+
'vue-router': '@histoire/vendors/dist/client/vue-router.js',
|
|
18
|
+
'@vueuse/core': '@histoire/vendors/dist/client/vue-use.js',
|
|
19
|
+
vue: '@histoire/vendors/dist/client/vue.js',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
|
|
12
23
|
build: {
|
|
13
24
|
emptyOutDir: false,
|
|
14
25
|
|
|
@@ -23,7 +34,6 @@ export default defineConfig({
|
|
|
23
34
|
rollupOptions: {
|
|
24
35
|
external: [
|
|
25
36
|
/@histoire/,
|
|
26
|
-
'vue',
|
|
27
37
|
],
|
|
28
38
|
},
|
|
29
39
|
},
|
|
@@ -45,11 +55,4 @@ export default defineConfig({
|
|
|
45
55
|
favicon: '/histoire.svg',
|
|
46
56
|
},
|
|
47
57
|
},
|
|
48
|
-
|
|
49
|
-
test: {
|
|
50
|
-
runtimeEnv: 'dom',
|
|
51
|
-
previewSetupFiles: [
|
|
52
|
-
'src/peeky-preview.ts',
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
58
|
})
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<title>Histoire controls</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.dc851298.css">
|
|
9
|
-
<link rel="icon" type="image/svg+xml" href="/histoire.svg"/>
|
|
10
|
-
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
<div id="app"></div>
|
|
14
|
-
<script type="module" src="/assets/bundle-sandbox.f56c0808.js"></script>
|
|
15
|
-
</body>
|
|
16
|
-
</html>
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { a as openBlock, b as createElementBlock, f as renderSlot } from "./vendor.31c91490.js";
|
|
2
|
-
import { _ as _export_sfc } from "./bundle-main.c70a2b14.js";
|
|
3
|
-
const _sfc_main = {};
|
|
4
|
-
const _hoisted_1 = { class: "htw-base-empty 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" };
|
|
5
|
-
function _sfc_render(_ctx, _cache) {
|
|
6
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
7
|
-
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
8
|
-
]);
|
|
9
|
-
}
|
|
10
|
-
var BaseEmpty = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-552cc113"]]);
|
|
11
|
-
export { BaseEmpty as B };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { d as defineComponent, c as computed, a as openBlock, b as createElementBlock, e as createBaseVNode, i as unref } from "./vendor.31c91490.js";
|
|
2
|
-
import { h as histoireConfig, c as customLogos } from "./global-components.d165b38c.js";
|
|
3
|
-
var HistoireLogo = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgoKPHN2ZwogICB3aWR0aD0iNTEyIgogICBoZWlnaHQ9IjUxMiIKICAgdmlld0JveD0iMCAwIDUxMiA1MTIiCiAgIHZlcnNpb249IjEuMSIKICAgaWQ9InN2ZzUiCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGRlZnMKICAgICBpZD0iZGVmczIiIC8+CiAgPGcKICAgICBpZD0ibGF5ZXIxIj4KICAgIDxyZWN0CiAgICAgICBzdHlsZT0ib3BhY2l0eTowLjU7ZmlsbDojMzRkMzk5O2ZpbGwtb3BhY2l0eToxO3N0cm9rZS13aWR0aDoxLjAwMzc1IgogICAgICAgaWQ9InJlY3QxMzcyIgogICAgICAgd2lkdGg9IjMxNC4zMDkyMyIKICAgICAgIGhlaWdodD0iNDA2LjYwOTAxIgogICAgICAgeD0iLTI2LjU2NTA2MyIKICAgICAgIHk9IjEzNC43NTA3OSIKICAgICAgIHRyYW5zZm9ybT0icm90YXRlKC0yMy44MjEyNjIpIgogICAgICAgcnk9IjgiIC8+CiAgICA8cmVjdAogICAgICAgc3R5bGU9ImZpbGw6IzM0ZDM5OTtmaWxsLW9wYWNpdHk6MTtzdHJva2Utd2lkdGg6MS4wMDM3NSIKICAgICAgIGlkPSJyZWN0ODUwIgogICAgICAgd2lkdGg9IjMxNC4zMDkyMyIKICAgICAgIGhlaWdodD0iNDA2LjYwOTAxIgogICAgICAgeD0iNzcuNTcxODM4IgogICAgICAgeT0iNzIuODA4NzA4IgogICAgICAgcnk9IjgiCiAgICAgICB0cmFuc2Zvcm09InJvdGF0ZSgtNC41NzQ0NTM0KSIgLz4KICA8L2c+CiAgPGcKICAgICBpZD0ibGF5ZXIzIj4KICAgIDxwYXRoCiAgICAgICBpZD0icGF0aDE2NTctMyIKICAgICAgIHN0eWxlPSJkaXNwbGF5OmlubGluZTtmaWxsOiNiNGZhZTI7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOiNiNGZhZTI7c3Ryb2tlLXdpZHRoOjguMzQ5MjM7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgIGQ9Ik0gMzU5LjM4OTQ3LDM1NS45NTEzNCAzMjAuNzI5MzUsMTc2LjUyOTQyIDIzOC4zNDYxMywyMzguOTQxMTggWiBNIDI3My42NDEyNCwyNzMuMDY2MDggMTUyLjU5Nzg4LDE1Ni4wNTU5MSAxOTEuMjU4MDQsMzM1LjQ3Nzg2IFoiIC8+CiAgPC9nPgogIDxnCiAgICAgaWQ9ImxheWVyMiIKICAgICBzdHlsZT0iZGlzcGxheTpub25lIj4KICAgIDxwYXRoCiAgICAgICBpZD0icGF0aDE2NTciCiAgICAgICBzdHlsZT0iZmlsbDojYjRmYWUyO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTojYjRmYWUyO3N0cm9rZS13aWR0aDo4O3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiCiAgICAgICBkPSJtIDI5NiwxMDMuOTgyNDIgLTEzNS41MzEyNSwxNzcuOTY2OCBoIDg4LjcwMTE3IHogTSAyNjIuODMwMDgsMjMwLjA1MDc4IDIxNiw0MDguMDE3NTggMzUxLjUzMTI1LDIzMC4wNTA3OCBaIgogICAgICAgdHJhbnNmb3JtPSJyb3RhdGUoLTQuMTU2NTUzLDI1NiwyNTYuMDA2OTEpIiAvPgogIDwvZz4KPC9zdmc+Cg==";
|
|
4
|
-
const _hoisted_1 = { class: "htw-flex htw-items-center htw-justify-center htw-h-full" };
|
|
5
|
-
const _hoisted_2 = ["src"];
|
|
6
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
-
name: "HomeView",
|
|
8
|
-
setup(__props) {
|
|
9
|
-
const logoUrl = computed(() => {
|
|
10
|
-
var _a, _b;
|
|
11
|
-
return ((_b = (_a = histoireConfig.theme) == null ? void 0 : _a.logo) == null ? void 0 : _b.square) ? customLogos.square : HistoireLogo;
|
|
12
|
-
});
|
|
13
|
-
return (_ctx, _cache) => {
|
|
14
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
15
|
-
createBaseVNode("img", {
|
|
16
|
-
src: unref(logoUrl),
|
|
17
|
-
alt: "Logo",
|
|
18
|
-
class: "htw-w-64 htw-h-64 htw-opacity-25"
|
|
19
|
-
}, null, 8, _hoisted_2)
|
|
20
|
-
]);
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
export { _sfc_main as default };
|