@histoire/controls 0.2.2 → 0.2.5
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/HstCopyIcon.vue.d.ts +15 -0
- package/dist/components/design-tokens/HstColorShades.story.vue.d.ts +2 -0
- package/dist/components/design-tokens/HstColorShades.vue.d.ts +19 -0
- package/dist/components/design-tokens/HstTokenGrid.story.vue.d.ts +2 -0
- package/dist/components/design-tokens/HstTokenGrid.vue.d.ts +33 -0
- package/dist/components/design-tokens/HstTokenList.story.vue.d.ts +2 -0
- package/dist/components/design-tokens/HstTokenList.vue.d.ts +17 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.es.js +2323 -86
- package/dist/style.css +149 -0
- package/package.json +18 -13
- package/src/components/HstCopyIcon.vue +34 -0
- package/src/components/design-tokens/HstColorShades.story.vue +390 -0
- package/src/components/design-tokens/HstColorShades.vue +87 -0
- package/src/components/design-tokens/HstTokenGrid.story.vue +35 -0
- package/src/components/design-tokens/HstTokenGrid.vue +79 -0
- package/src/components/design-tokens/HstTokenList.story.vue +79 -0
- package/src/components/design-tokens/HstTokenList.vue +58 -0
- package/src/index.ts +4 -0
- package/tsconfig.json +2 -0
package/dist/style.css
CHANGED
|
@@ -266,11 +266,34 @@
|
|
|
266
266
|
z-index:10
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
+
.htw-m-4{
|
|
270
|
+
margin:1rem
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.htw-my-0{
|
|
274
|
+
margin-top:0px;
|
|
275
|
+
margin-bottom:0px
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.htw-my-8{
|
|
279
|
+
margin-top:2rem;
|
|
280
|
+
margin-bottom:2rem
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.htw-mx-4{
|
|
284
|
+
margin-left:1rem;
|
|
285
|
+
margin-right:1rem
|
|
286
|
+
}
|
|
287
|
+
|
|
269
288
|
.-htw-my-1{
|
|
270
289
|
margin-top:-0.25rem;
|
|
271
290
|
margin-bottom:-0.25rem
|
|
272
291
|
}
|
|
273
292
|
|
|
293
|
+
.htw-mb-2{
|
|
294
|
+
margin-bottom:0.5rem
|
|
295
|
+
}
|
|
296
|
+
|
|
274
297
|
.htw-box-border{
|
|
275
298
|
box-sizing:border-box
|
|
276
299
|
}
|
|
@@ -283,14 +306,46 @@
|
|
|
283
306
|
display:flex
|
|
284
307
|
}
|
|
285
308
|
|
|
309
|
+
.htw-grid{
|
|
310
|
+
display:grid
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.htw-hidden{
|
|
314
|
+
display:none
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.htw-h-4{
|
|
318
|
+
height:1rem
|
|
319
|
+
}
|
|
320
|
+
|
|
286
321
|
.htw-h-\[16px\]{
|
|
287
322
|
height:16px
|
|
288
323
|
}
|
|
289
324
|
|
|
325
|
+
.htw-h-\[100px\]{
|
|
326
|
+
height:100px
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.htw-h-16{
|
|
330
|
+
height:4rem
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.htw-h-32{
|
|
334
|
+
height:8rem
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.htw-h-20{
|
|
338
|
+
height:5rem
|
|
339
|
+
}
|
|
340
|
+
|
|
290
341
|
.htw-min-h-\[26px\]{
|
|
291
342
|
min-height:26px
|
|
292
343
|
}
|
|
293
344
|
|
|
345
|
+
.htw-w-4{
|
|
346
|
+
width:1rem
|
|
347
|
+
}
|
|
348
|
+
|
|
294
349
|
.htw-w-28{
|
|
295
350
|
width:7rem
|
|
296
351
|
}
|
|
@@ -299,14 +354,30 @@
|
|
|
299
354
|
width:16px
|
|
300
355
|
}
|
|
301
356
|
|
|
357
|
+
.htw-w-16{
|
|
358
|
+
width:4rem
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.htw-w-32{
|
|
362
|
+
width:8rem
|
|
363
|
+
}
|
|
364
|
+
|
|
302
365
|
.htw-w-full{
|
|
303
366
|
width:100%
|
|
304
367
|
}
|
|
305
368
|
|
|
369
|
+
.htw-flex-none{
|
|
370
|
+
flex:none
|
|
371
|
+
}
|
|
372
|
+
|
|
306
373
|
.htw-shrink-0{
|
|
307
374
|
flex-shrink:0
|
|
308
375
|
}
|
|
309
376
|
|
|
377
|
+
.htw-shrink{
|
|
378
|
+
flex-shrink:1
|
|
379
|
+
}
|
|
380
|
+
|
|
310
381
|
.htw-grow{
|
|
311
382
|
flex-grow:1
|
|
312
383
|
}
|
|
@@ -334,10 +405,22 @@
|
|
|
334
405
|
resize:vertical
|
|
335
406
|
}
|
|
336
407
|
|
|
408
|
+
.htw-grid-cols-\[repeat\(auto-fill\,minmax\(200px\,1fr\)\)\]{
|
|
409
|
+
grid-template-columns:repeat(auto-fill,minmax(200px,1fr))
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.htw-flex-col{
|
|
413
|
+
flex-direction:column
|
|
414
|
+
}
|
|
415
|
+
|
|
337
416
|
.htw-flex-wrap{
|
|
338
417
|
flex-wrap:wrap
|
|
339
418
|
}
|
|
340
419
|
|
|
420
|
+
.htw-items-end{
|
|
421
|
+
align-items:flex-end
|
|
422
|
+
}
|
|
423
|
+
|
|
341
424
|
.htw-items-center{
|
|
342
425
|
align-items:center
|
|
343
426
|
}
|
|
@@ -346,10 +429,24 @@
|
|
|
346
429
|
gap:0.5rem
|
|
347
430
|
}
|
|
348
431
|
|
|
432
|
+
.htw-gap-4{
|
|
433
|
+
gap:1rem
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.htw-gap-1{
|
|
437
|
+
gap:0.25rem
|
|
438
|
+
}
|
|
439
|
+
|
|
349
440
|
.htw-overflow-hidden{
|
|
350
441
|
overflow:hidden
|
|
351
442
|
}
|
|
352
443
|
|
|
444
|
+
.htw-truncate{
|
|
445
|
+
overflow:hidden;
|
|
446
|
+
text-overflow:ellipsis;
|
|
447
|
+
white-space:nowrap
|
|
448
|
+
}
|
|
449
|
+
|
|
353
450
|
.htw-text-ellipsis{
|
|
354
451
|
text-overflow:ellipsis
|
|
355
452
|
}
|
|
@@ -362,6 +459,14 @@
|
|
|
362
459
|
border-radius:0.25rem
|
|
363
460
|
}
|
|
364
461
|
|
|
462
|
+
.htw-rounded{
|
|
463
|
+
border-radius:0.375rem
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.htw-rounded-full{
|
|
467
|
+
border-radius:9999px
|
|
468
|
+
}
|
|
469
|
+
|
|
365
470
|
.htw-border{
|
|
366
471
|
border-width:1px
|
|
367
472
|
}
|
|
@@ -370,6 +475,10 @@
|
|
|
370
475
|
border-width:8px
|
|
371
476
|
}
|
|
372
477
|
|
|
478
|
+
.htw-border-2{
|
|
479
|
+
border-width:2px
|
|
480
|
+
}
|
|
481
|
+
|
|
373
482
|
.htw-border-solid{
|
|
374
483
|
border-style:solid
|
|
375
484
|
}
|
|
@@ -383,6 +492,19 @@
|
|
|
383
492
|
border-color:rgb(0 0 0 / 0.25)
|
|
384
493
|
}
|
|
385
494
|
|
|
495
|
+
.htw-bg-white{
|
|
496
|
+
--tw-bg-opacity:1;
|
|
497
|
+
background-color:rgb(255 255 255 / var(--tw-bg-opacity))
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
.htw-bg-gray-500\/10{
|
|
501
|
+
background-color:rgb(113 113 122 / 0.1)
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
.htw-bg-gray-500\/50{
|
|
505
|
+
background-color:rgb(113 113 122 / 0.5)
|
|
506
|
+
}
|
|
507
|
+
|
|
386
508
|
.htw-bg-transparent{
|
|
387
509
|
background-color:transparent
|
|
388
510
|
}
|
|
@@ -413,6 +535,11 @@
|
|
|
413
535
|
padding-left:0.5rem
|
|
414
536
|
}
|
|
415
537
|
|
|
538
|
+
.htw-text-5xl{
|
|
539
|
+
font-size:3rem;
|
|
540
|
+
line-height:1
|
|
541
|
+
}
|
|
542
|
+
|
|
416
543
|
.htw-text-white{
|
|
417
544
|
--tw-text-opacity:1;
|
|
418
545
|
color:rgb(255 255 255 / var(--tw-text-opacity))
|
|
@@ -422,6 +549,10 @@
|
|
|
422
549
|
color:inherit
|
|
423
550
|
}
|
|
424
551
|
|
|
552
|
+
.htw-opacity-50{
|
|
553
|
+
opacity:0.5
|
|
554
|
+
}
|
|
555
|
+
|
|
425
556
|
.htw-outline-none{
|
|
426
557
|
outline:2px solid transparent;
|
|
427
558
|
outline-offset:2px
|
|
@@ -483,11 +614,24 @@ body {
|
|
|
483
614
|
background-color:rgb(209 250 229 / var(--tw-bg-opacity))
|
|
484
615
|
}
|
|
485
616
|
|
|
617
|
+
.hover\:htw-text-primary-500:hover{
|
|
618
|
+
--tw-text-opacity:1;
|
|
619
|
+
color:rgb(16 185 129 / var(--tw-text-opacity))
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
.hover\:htw-opacity-100:hover{
|
|
623
|
+
opacity:1
|
|
624
|
+
}
|
|
625
|
+
|
|
486
626
|
.focus\:htw-border-primary-500:focus{
|
|
487
627
|
--tw-border-opacity:1;
|
|
488
628
|
border-color:rgb(16 185 129 / var(--tw-border-opacity))
|
|
489
629
|
}
|
|
490
630
|
|
|
631
|
+
.htw-group:hover .group-hover\:htw-block{
|
|
632
|
+
display:block
|
|
633
|
+
}
|
|
634
|
+
|
|
491
635
|
.htw-group:active .group-active\:htw-bg-gray-500\/20{
|
|
492
636
|
background-color:rgb(113 113 122 / 0.2)
|
|
493
637
|
}
|
|
@@ -496,6 +640,11 @@ body {
|
|
|
496
640
|
border-color:rgb(255 255 255 / 0.25)
|
|
497
641
|
}
|
|
498
642
|
|
|
643
|
+
.htw-dark .dark\:htw-bg-black{
|
|
644
|
+
--tw-bg-opacity:1;
|
|
645
|
+
background-color:rgb(0 0 0 / var(--tw-bg-opacity))
|
|
646
|
+
}
|
|
647
|
+
|
|
499
648
|
.htw-dark .dark\:hover\:htw-bg-primary-800:hover{
|
|
500
649
|
--tw-bg-opacity:1;
|
|
501
650
|
background-color:rgb(6 95 70 / var(--tw-bg-opacity))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@histoire/controls",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "Prebuilt controls components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -30,23 +30,28 @@
|
|
|
30
30
|
"*.postcss",
|
|
31
31
|
"*.vue"
|
|
32
32
|
],
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@iconify/vue": "^3.2.1",
|
|
35
|
+
"@vueuse/core": "^8.2.5",
|
|
36
|
+
"floating-vue": "^2.0.0-beta.14"
|
|
37
|
+
},
|
|
33
38
|
"devDependencies": {
|
|
34
39
|
"@peeky/test": "^0.13.5",
|
|
35
|
-
"@types/node": "^17.0.
|
|
40
|
+
"@types/node": "^17.0.23",
|
|
36
41
|
"@vitejs/plugin-vue": "^2.3.1",
|
|
37
|
-
"@vue/test-utils": "^2.0.0-rc.
|
|
38
|
-
"@vueuse/core": "^8.
|
|
39
|
-
"autoprefixer": "^10.4.
|
|
40
|
-
"concurrently": "^7.
|
|
41
|
-
"floating-vue": "^2.0.0-beta.
|
|
42
|
+
"@vue/test-utils": "^2.0.0-rc.19",
|
|
43
|
+
"@vueuse/core": "^8.2.5",
|
|
44
|
+
"autoprefixer": "^10.4.4",
|
|
45
|
+
"concurrently": "^7.1.0",
|
|
46
|
+
"floating-vue": "^2.0.0-beta.14",
|
|
42
47
|
"histoire": "^0.2.2",
|
|
43
|
-
"postcss": "^8.4.
|
|
44
|
-
"postcss-import": "^14.0
|
|
48
|
+
"postcss": "^8.4.12",
|
|
49
|
+
"postcss-import": "^14.1.0",
|
|
45
50
|
"tailwindcss": "^3.0.23",
|
|
46
|
-
"typescript": "^4.
|
|
47
|
-
"vite": "^2.9.
|
|
51
|
+
"typescript": "^4.6.3",
|
|
52
|
+
"vite": "^2.9.1",
|
|
48
53
|
"vue": "^3.2.31",
|
|
49
|
-
"vue-tsc": "^0.33.
|
|
54
|
+
"vue-tsc": "^0.33.9"
|
|
50
55
|
},
|
|
51
56
|
"scripts": {
|
|
52
57
|
"build": "rimraf dist && vite build && pnpm run build:types && pnpm run build:css",
|
|
@@ -54,7 +59,7 @@
|
|
|
54
59
|
"build:types": "vue-tsc --declaration --emitDeclarationOnly",
|
|
55
60
|
"watch": "concurrently \"vite build --watch\" \"pnpm run build:types -- --watch\"",
|
|
56
61
|
"watch:full": "concurrently \"vite build --watch\" \"pnpm run build:css -- --watch\" \"pnpm run build:types -- --watch\"",
|
|
57
|
-
"test:open": "peeky open",
|
|
62
|
+
"test:open": "peeky open --port 5010",
|
|
58
63
|
"test": "peeky run",
|
|
59
64
|
"story:dev": "histoire dev",
|
|
60
65
|
"story:build": "histoire build"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export default {
|
|
3
|
+
name: 'HstCopyIcon',
|
|
4
|
+
}
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import { Icon } from '@iconify/vue'
|
|
9
|
+
import { useClipboard } from '@vueuse/core'
|
|
10
|
+
import { VTooltip as vTooltip } from 'floating-vue'
|
|
11
|
+
|
|
12
|
+
const props = defineProps<{
|
|
13
|
+
content: string
|
|
14
|
+
}>()
|
|
15
|
+
|
|
16
|
+
const { copy, copied } = useClipboard()
|
|
17
|
+
|
|
18
|
+
const action = () => copy(props.content)
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<Icon
|
|
23
|
+
v-tooltip="{
|
|
24
|
+
content: 'Copied!',
|
|
25
|
+
triggers: [],
|
|
26
|
+
shown: copied,
|
|
27
|
+
distance: 12,
|
|
28
|
+
delay: 0,
|
|
29
|
+
}"
|
|
30
|
+
icon="carbon:copy-file"
|
|
31
|
+
class="htw-w-4 htw-h-4 htw-opacity-50 hover:htw-opacity-100 hover:htw-text-primary-500 htw-cursor-pointer"
|
|
32
|
+
@click="action()"
|
|
33
|
+
/>
|
|
34
|
+
</template>
|