@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.
Files changed (117) hide show
  1. package/.histoire/dist/__sandbox.html +16 -0
  2. package/.histoire/dist/assets/BaseEmpty.d30f3079.js +11 -0
  3. package/.histoire/dist/assets/HomeView.8e044be6.js +24 -0
  4. package/.histoire/dist/assets/HstCheckbox.story.3d04d85b.js +144 -0
  5. package/.histoire/dist/assets/HstColorShades.story.68cf74d1.js +532 -0
  6. package/.histoire/dist/assets/HstCopyIcon.e40e725e.js +51 -0
  7. package/.histoire/dist/assets/HstNumber.story.1e1964ff.js +160 -0
  8. package/.histoire/dist/assets/HstSelect.story.04860383.js +277 -0
  9. package/.histoire/dist/assets/HstText.story.c915d831.js +137 -0
  10. package/.histoire/dist/assets/HstTextarea.story.802b9c26.js +105 -0
  11. package/.histoire/dist/assets/HstTokenGrid.story.025819d6.js +148 -0
  12. package/.histoire/dist/assets/HstTokenList.story.d3aa6575.js +176 -0
  13. package/.histoire/dist/assets/HstWrapper.246b6982.js +56 -0
  14. package/.histoire/dist/assets/SearchPane.daa2675c.js +426 -0
  15. package/.histoire/dist/assets/StoryView.2f64dad1.js +2260 -0
  16. package/.histoire/dist/assets/bundle-main.784e5bf7.js +1156 -0
  17. package/.histoire/dist/assets/bundle-sandbox.5e153933.js +84 -0
  18. package/.histoire/dist/assets/const.268165fd.js +658 -0
  19. package/.histoire/dist/assets/global-components.6736b2a9.js +5722 -0
  20. package/.histoire/dist/assets/search-docs-data.b9a75539.js +6 -0
  21. package/.histoire/dist/assets/style.04507241.css +2504 -0
  22. package/.histoire/dist/assets/vendor.2833ae3d.js +28970 -0
  23. package/.histoire/dist/index.html +16 -0
  24. package/dist/components/HstCopyIcon.vue.d.ts +3 -12
  25. package/dist/components/HstWrapper.vue.d.ts +4 -27
  26. package/dist/components/button/HstButton.story.vue.d.ts +1 -1
  27. package/dist/components/button/HstButton.vue.d.ts +3 -12
  28. package/dist/components/button/HstButtonGroup.story.vue.d.ts +1 -1
  29. package/dist/components/button/HstButtonGroup.vue.d.ts +7 -16
  30. package/dist/components/checkbox/HstCheckbox.story.vue.d.ts +1 -1
  31. package/dist/components/checkbox/HstCheckbox.vue.d.ts +5 -14
  32. package/dist/components/checkbox/HstCheckboxList.story.vue.d.ts +1 -1
  33. package/dist/components/checkbox/HstCheckboxList.vue.d.ts +7 -16
  34. package/dist/components/checkbox/HstSimpleCheckbox.story.vue.d.ts +1 -1
  35. package/dist/components/checkbox/HstSimpleCheckbox.vue.d.ts +5 -14
  36. package/dist/components/colorselect/HstColorSelect.story.vue.d.ts +1 -1
  37. package/dist/components/colorselect/HstColorSelect.vue.d.ts +5 -14
  38. package/dist/components/design-tokens/HstColorShades.story.vue.d.ts +1 -1
  39. package/dist/components/design-tokens/HstColorShades.vue.d.ts +3 -12
  40. package/dist/components/design-tokens/HstTokenGrid.story.vue.d.ts +1 -1
  41. package/dist/components/design-tokens/HstTokenGrid.vue.d.ts +5 -28
  42. package/dist/components/design-tokens/HstTokenList.story.vue.d.ts +1 -1
  43. package/dist/components/design-tokens/HstTokenList.vue.d.ts +4 -13
  44. package/dist/components/json/HstJson.story.vue.d.ts +1 -1
  45. package/dist/components/json/HstJson.vue.d.ts +5 -14
  46. package/dist/components/number/HstNumber.story.vue.d.ts +1 -1
  47. package/dist/components/number/HstNumber.vue.d.ts +5 -14
  48. package/dist/components/radio/HstRadio.story.vue.d.ts +1 -1
  49. package/dist/components/radio/HstRadio.vue.d.ts +7 -16
  50. package/dist/components/select/CustomSelect.vue.d.ts +7 -16
  51. package/dist/components/select/HstSelect.story.vue.d.ts +1 -1
  52. package/dist/components/select/HstSelect.vue.d.ts +7 -16
  53. package/dist/components/slider/HstSlider.story.vue.d.ts +1 -1
  54. package/dist/components/slider/HstSlider.vue.d.ts +5 -14
  55. package/dist/components/text/HstText.story.vue.d.ts +1 -1
  56. package/dist/components/text/HstText.vue.d.ts +5 -14
  57. package/dist/components/textarea/HstTextarea.story.vue.d.ts +1 -1
  58. package/dist/components/textarea/HstTextarea.vue.d.ts +5 -14
  59. package/dist/index.d.ts +736 -2492
  60. package/dist/index.es.css +1 -0
  61. package/dist/index.es.js +5281 -4823
  62. package/dist/style-standalone.css +74 -66
  63. package/dist/utils.d.ts +1 -1
  64. package/package.json +32 -32
  65. package/src/components/HstCopyIcon.vue +2 -2
  66. package/src/components/HstWrapper.vue +1 -2
  67. package/src/components/button/HstButton.story.vue +1 -1
  68. package/src/components/button/HstButtonGroup.story.vue +2 -2
  69. package/src/components/button/HstButtonGroup.vue +8 -5
  70. package/src/components/checkbox/HstCheckbox.spec.ts +3 -3
  71. package/src/components/checkbox/HstCheckbox.story.vue +1 -1
  72. package/src/components/checkbox/HstCheckbox.vue +2 -2
  73. package/src/components/checkbox/HstCheckboxList.story.vue +1 -1
  74. package/src/components/checkbox/HstCheckboxList.vue +9 -6
  75. package/src/components/checkbox/HstSimpleCheckbox.story.vue +1 -1
  76. package/src/components/checkbox/HstSimpleCheckbox.vue +2 -2
  77. package/src/components/checkbox/__snapshots__/HstCheckbox.spec.ts.snap +4 -0
  78. package/src/components/colorselect/HstColorSelect.vue +1 -4
  79. package/src/components/design-tokens/HstColorShades.story.vue +2 -2
  80. package/src/components/design-tokens/HstColorShades.vue +3 -3
  81. package/src/components/design-tokens/HstTokenGrid.story.vue +6 -6
  82. package/src/components/design-tokens/HstTokenGrid.vue +1 -1
  83. package/src/components/design-tokens/HstTokenList.story.vue +23 -23
  84. package/src/components/json/HstJson.story.vue +1 -1
  85. package/src/components/json/HstJson.vue +21 -18
  86. package/src/components/number/HstNumber.story.vue +1 -1
  87. package/src/components/number/HstNumber.vue +8 -8
  88. package/src/components/radio/HstRadio.story.vue +1 -1
  89. package/src/components/radio/HstRadio.vue +7 -5
  90. package/src/components/select/CustomSelect.vue +10 -8
  91. package/src/components/select/HstSelect.story.vue +1 -1
  92. package/src/components/select/HstSelect.vue +1 -1
  93. package/src/components/slider/HstSlider.vue +4 -4
  94. package/src/components/text/HstText.story.vue +1 -1
  95. package/src/components/textarea/HstTextarea.story.vue +1 -1
  96. package/src/index.ts +8 -8
  97. package/tailwind.config.cjs +1 -1
  98. package/tsconfig.json +26 -25
  99. package/vite.config.ts +9 -9
  100. package/dist/style.css +0 -1
  101. package/histoire-dist/__sandbox.html +0 -15
  102. package/histoire-dist/assets/BaseEmpty.a84c14c8.js +0 -1
  103. package/histoire-dist/assets/HomeView.f524bd4b.js +0 -1
  104. package/histoire-dist/assets/HstCheckbox.story.9f622545.js +0 -1
  105. package/histoire-dist/assets/HstInput.story.945401ce.js +0 -1
  106. package/histoire-dist/assets/SearchModal.76c035f2.js +0 -1
  107. package/histoire-dist/assets/StoryView.e4c41518.js +0 -15
  108. package/histoire-dist/assets/global-components.84d0ab22.js +0 -1
  109. package/histoire-dist/assets/histoire-text-dark.a529813a.svg +0 -89
  110. package/histoire-dist/assets/histoire-text.1d4474b5.svg +0 -89
  111. package/histoire-dist/assets/index.58f51dd0.js +0 -1
  112. package/histoire-dist/assets/preview-settings.a634d101.js +0 -1
  113. package/histoire-dist/assets/sandbox.2c60450a.js +0 -1
  114. package/histoire-dist/assets/style.7657d2ac.css +0 -1
  115. package/histoire-dist/assets/vendor.70a554f6.js +0 -9
  116. package/histoire-dist/index.html +0 -15
  117. /package/{histoire-dist/assets/histoire.8af7bd1f.svg → .histoire/dist/histoire.svg} +0 -0
@@ -175,6 +175,17 @@
175
175
  left:-2px
176
176
  }
177
177
 
178
+ .v-popper--theme-tooltip .v-popper__inner{
179
+ background:rgba(0,0,0,.8);
180
+ color:#fff;
181
+ border-radius:6px;
182
+ padding:7px 12px 6px
183
+ }
184
+
185
+ .v-popper--theme-tooltip .v-popper__arrow-outer{
186
+ border-color:#000c
187
+ }
188
+
178
189
  .v-popper--theme-dropdown .v-popper__inner{
179
190
  background:#fff;
180
191
  color:#000;
@@ -192,17 +203,6 @@
192
203
  border-color:#ddd
193
204
  }
194
205
 
195
- .v-popper--theme-tooltip .v-popper__inner{
196
- background:rgba(0,0,0,.8);
197
- color:#fff;
198
- border-radius:6px;
199
- padding:7px 12px 6px
200
- }
201
-
202
- .v-popper--theme-tooltip .v-popper__arrow-outer{
203
- border-color:#000c
204
- }
205
-
206
206
  *, ::before, ::after{
207
207
  --tw-border-spacing-x:0;
208
208
  --tw-border-spacing-y:0;
@@ -250,7 +250,11 @@
250
250
  --tw-backdrop-invert: ;
251
251
  --tw-backdrop-opacity: ;
252
252
  --tw-backdrop-saturate: ;
253
- --tw-backdrop-sepia:
253
+ --tw-backdrop-sepia: ;
254
+ --tw-contain-size: ;
255
+ --tw-contain-layout: ;
256
+ --tw-contain-paint: ;
257
+ --tw-contain-style:
254
258
  }
255
259
 
256
260
  ::backdrop{
@@ -300,7 +304,11 @@
300
304
  --tw-backdrop-invert: ;
301
305
  --tw-backdrop-opacity: ;
302
306
  --tw-backdrop-saturate: ;
303
- --tw-backdrop-sepia:
307
+ --tw-backdrop-sepia: ;
308
+ --tw-contain-size: ;
309
+ --tw-contain-layout: ;
310
+ --tw-contain-paint: ;
311
+ --tw-contain-style:
304
312
  }
305
313
 
306
314
  .htw-absolute{
@@ -625,27 +633,27 @@
625
633
 
626
634
  .htw-border-gray-850{
627
635
  --tw-border-opacity:1;
628
- border-color:rgb(31 31 33 / var(--tw-border-opacity))
636
+ border-color:rgb(31 31 33 / var(--tw-border-opacity, 1))
629
637
  }
630
638
 
631
639
  .htw-border-primary-500{
632
640
  --tw-border-opacity:1;
633
- border-color:rgb(16 185 129 / var(--tw-border-opacity))
641
+ border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))
634
642
  }
635
643
 
636
644
  .\!htw-bg-primary-500{
637
645
  --tw-bg-opacity:1 !important;
638
- background-color:rgb(16 185 129 / var(--tw-bg-opacity)) !important
646
+ background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1)) !important
639
647
  }
640
648
 
641
649
  .htw-bg-gray-200{
642
650
  --tw-bg-opacity:1;
643
- background-color:rgb(228 228 231 / var(--tw-bg-opacity))
651
+ background-color:rgb(228 228 231 / var(--tw-bg-opacity, 1))
644
652
  }
645
653
 
646
654
  .htw-bg-gray-50{
647
655
  --tw-bg-opacity:1;
648
- background-color:rgb(250 250 250 / var(--tw-bg-opacity))
656
+ background-color:rgb(250 250 250 / var(--tw-bg-opacity, 1))
649
657
  }
650
658
 
651
659
  .htw-bg-gray-500\/10{
@@ -658,22 +666,22 @@
658
666
 
659
667
  .htw-bg-gray-700{
660
668
  --tw-bg-opacity:1;
661
- background-color:rgb(63 63 70 / var(--tw-bg-opacity))
669
+ background-color:rgb(63 63 70 / var(--tw-bg-opacity, 1))
662
670
  }
663
671
 
664
672
  .htw-bg-primary-200{
665
673
  --tw-bg-opacity:1;
666
- background-color:rgb(167 243 208 / var(--tw-bg-opacity))
674
+ background-color:rgb(167 243 208 / var(--tw-bg-opacity, 1))
667
675
  }
668
676
 
669
677
  .htw-bg-primary-500{
670
678
  --tw-bg-opacity:1;
671
- background-color:rgb(16 185 129 / var(--tw-bg-opacity))
679
+ background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))
672
680
  }
673
681
 
674
682
  .htw-bg-primary-800{
675
683
  --tw-bg-opacity:1;
676
- background-color:rgb(6 95 70 / var(--tw-bg-opacity))
684
+ background-color:rgb(6 95 70 / var(--tw-bg-opacity, 1))
677
685
  }
678
686
 
679
687
  .htw-bg-transparent{
@@ -682,7 +690,7 @@
682
690
 
683
691
  .htw-bg-white{
684
692
  --tw-bg-opacity:1;
685
- background-color:rgb(255 255 255 / var(--tw-bg-opacity))
693
+ background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))
686
694
  }
687
695
 
688
696
  .htw-fill-primary-500{
@@ -748,12 +756,12 @@
748
756
 
749
757
  .htw-text-gray-700{
750
758
  --tw-text-opacity:1;
751
- color:rgb(63 63 70 / var(--tw-text-opacity))
759
+ color:rgb(63 63 70 / var(--tw-text-opacity, 1))
752
760
  }
753
761
 
754
762
  .htw-text-gray-900{
755
763
  --tw-text-opacity:1;
756
- color:rgb(24 24 27 / var(--tw-text-opacity))
764
+ color:rgb(24 24 27 / var(--tw-text-opacity, 1))
757
765
  }
758
766
 
759
767
  .htw-text-inherit{
@@ -762,12 +770,12 @@
762
770
 
763
771
  .htw-text-orange-500{
764
772
  --tw-text-opacity:1;
765
- color:rgb(249 115 22 / var(--tw-text-opacity))
773
+ color:rgb(249 115 22 / var(--tw-text-opacity, 1))
766
774
  }
767
775
 
768
776
  .htw-text-white{
769
777
  --tw-text-opacity:1;
770
- color:rgb(255 255 255 / var(--tw-text-opacity))
778
+ color:rgb(255 255 255 / var(--tw-text-opacity, 1))
771
779
  }
772
780
 
773
781
  .htw-opacity-50{
@@ -823,9 +831,9 @@ body {
823
831
  font-size: 1.125rem;
824
832
  }
825
833
 
826
- :is(.htw-dark body){
834
+ body:is(.htw-dark *){
827
835
  --tw-text-opacity:1;
828
- color:rgb(244 244 245 / var(--tw-text-opacity))
836
+ color:rgb(244 244 245 / var(--tw-text-opacity, 1))
829
837
  }
830
838
 
831
839
  @media (min-width: 640px) {
@@ -836,12 +844,12 @@ body {
836
844
 
837
845
  .focus-within\:htw-border-primary-500:focus-within{
838
846
  --tw-border-opacity:1;
839
- border-color:rgb(16 185 129 / var(--tw-border-opacity))
847
+ border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))
840
848
  }
841
849
 
842
850
  .hover\:htw-border-primary-500:hover{
843
851
  --tw-border-opacity:1;
844
- border-color:rgb(16 185 129 / var(--tw-border-opacity))
852
+ border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))
845
853
  }
846
854
 
847
855
  .hover\:htw-bg-gray-500\/20:hover{
@@ -850,22 +858,22 @@ body {
850
858
 
851
859
  .hover\:htw-bg-primary-100:hover{
852
860
  --tw-bg-opacity:1;
853
- background-color:rgb(209 250 229 / var(--tw-bg-opacity))
861
+ background-color:rgb(209 250 229 / var(--tw-bg-opacity, 1))
854
862
  }
855
863
 
856
864
  .hover\:htw-bg-primary-200:hover{
857
865
  --tw-bg-opacity:1;
858
- background-color:rgb(167 243 208 / var(--tw-bg-opacity))
866
+ background-color:rgb(167 243 208 / var(--tw-bg-opacity, 1))
859
867
  }
860
868
 
861
869
  .hover\:htw-bg-primary-600:hover{
862
870
  --tw-bg-opacity:1;
863
- background-color:rgb(5 150 105 / var(--tw-bg-opacity))
871
+ background-color:rgb(5 150 105 / var(--tw-bg-opacity, 1))
864
872
  }
865
873
 
866
874
  .hover\:htw-text-primary-500:hover{
867
875
  --tw-text-opacity:1;
868
- color:rgb(16 185 129 / var(--tw-text-opacity))
876
+ color:rgb(16 185 129 / var(--tw-text-opacity, 1))
869
877
  }
870
878
 
871
879
  .hover\:htw-opacity-100:hover{
@@ -874,88 +882,88 @@ body {
874
882
 
875
883
  .focus\:htw-border-primary-500:focus{
876
884
  --tw-border-opacity:1;
877
- border-color:rgb(16 185 129 / var(--tw-border-opacity))
885
+ border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))
878
886
  }
879
887
 
880
888
  .htw-group:hover .group-hover\:htw-border-primary-500{
881
889
  --tw-border-opacity:1;
882
- border-color:rgb(16 185 129 / var(--tw-border-opacity))
890
+ border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))
883
891
  }
884
892
 
885
893
  .htw-group:active .group-active\:htw-bg-gray-500\/20{
886
894
  background-color:rgb(113 113 122 / 0.2)
887
895
  }
888
896
 
889
- :is(.htw-dark .dark\:htw-border-white\/25){
897
+ .dark\:htw-border-white\/25:is(.htw-dark *){
890
898
  border-color:rgb(255 255 255 / 0.25)
891
899
  }
892
900
 
893
- :is(.htw-dark .dark\:htw-bg-black){
901
+ .dark\:htw-bg-black:is(.htw-dark *){
894
902
  --tw-bg-opacity:1;
895
- background-color:rgb(0 0 0 / var(--tw-bg-opacity))
903
+ background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))
896
904
  }
897
905
 
898
- :is(.htw-dark .dark\:htw-bg-gray-600){
906
+ .dark\:htw-bg-gray-600:is(.htw-dark *){
899
907
  --tw-bg-opacity:1;
900
- background-color:rgb(82 82 91 / var(--tw-bg-opacity))
908
+ background-color:rgb(82 82 91 / var(--tw-bg-opacity, 1))
901
909
  }
902
910
 
903
- :is(.htw-dark .dark\:htw-bg-gray-700){
911
+ .dark\:htw-bg-gray-700:is(.htw-dark *){
904
912
  --tw-bg-opacity:1;
905
- background-color:rgb(63 63 70 / var(--tw-bg-opacity))
913
+ background-color:rgb(63 63 70 / var(--tw-bg-opacity, 1))
906
914
  }
907
915
 
908
- :is(.htw-dark .dark\:htw-bg-gray-750){
916
+ .dark\:htw-bg-gray-750:is(.htw-dark *){
909
917
  --tw-bg-opacity:1;
910
- background-color:rgb(50 50 56 / var(--tw-bg-opacity))
918
+ background-color:rgb(50 50 56 / var(--tw-bg-opacity, 1))
911
919
  }
912
920
 
913
- :is(.htw-dark .dark\:htw-bg-primary-800){
921
+ .dark\:htw-bg-primary-800:is(.htw-dark *){
914
922
  --tw-bg-opacity:1;
915
- background-color:rgb(6 95 70 / var(--tw-bg-opacity))
923
+ background-color:rgb(6 95 70 / var(--tw-bg-opacity, 1))
916
924
  }
917
925
 
918
- :is(.htw-dark .dark\:htw-text-black){
926
+ .dark\:htw-text-black:is(.htw-dark *){
919
927
  --tw-text-opacity:1;
920
- color:rgb(0 0 0 / var(--tw-text-opacity))
928
+ color:rgb(0 0 0 / var(--tw-text-opacity, 1))
921
929
  }
922
930
 
923
- :is(.htw-dark .dark\:htw-text-gray-100){
931
+ .dark\:htw-text-gray-100:is(.htw-dark *){
924
932
  --tw-text-opacity:1;
925
- color:rgb(244 244 245 / var(--tw-text-opacity))
933
+ color:rgb(244 244 245 / var(--tw-text-opacity, 1))
926
934
  }
927
935
 
928
- :is(.htw-dark .dark\:focus-within\:htw-border-primary-500:focus-within){
936
+ .dark\:focus-within\:htw-border-primary-500:focus-within:is(.htw-dark *){
929
937
  --tw-border-opacity:1;
930
- border-color:rgb(16 185 129 / var(--tw-border-opacity))
938
+ border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))
931
939
  }
932
940
 
933
- :is(.htw-dark .dark\:hover\:htw-border-primary-500:hover){
941
+ .dark\:hover\:htw-border-primary-500:hover:is(.htw-dark *){
934
942
  --tw-border-opacity:1;
935
- border-color:rgb(16 185 129 / var(--tw-border-opacity))
943
+ border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))
936
944
  }
937
945
 
938
- :is(.htw-dark .dark\:hover\:htw-bg-primary-700:hover){
946
+ .dark\:hover\:htw-bg-primary-700:hover:is(.htw-dark *){
939
947
  --tw-bg-opacity:1;
940
- background-color:rgb(4 120 87 / var(--tw-bg-opacity))
948
+ background-color:rgb(4 120 87 / var(--tw-bg-opacity, 1))
941
949
  }
942
950
 
943
- :is(.htw-dark .dark\:hover\:htw-bg-primary-800:hover){
951
+ .dark\:hover\:htw-bg-primary-800:hover:is(.htw-dark *){
944
952
  --tw-bg-opacity:1;
945
- background-color:rgb(6 95 70 / var(--tw-bg-opacity))
953
+ background-color:rgb(6 95 70 / var(--tw-bg-opacity, 1))
946
954
  }
947
955
 
948
- :is(.htw-dark .dark\:hover\:htw-bg-primary-900:hover){
956
+ .dark\:hover\:htw-bg-primary-900:hover:is(.htw-dark *){
949
957
  --tw-bg-opacity:1;
950
- background-color:rgb(6 78 59 / var(--tw-bg-opacity))
958
+ background-color:rgb(6 78 59 / var(--tw-bg-opacity, 1))
951
959
  }
952
960
 
953
- :is(.htw-dark .dark\:focus\:htw-border-primary-500:focus){
961
+ .dark\:focus\:htw-border-primary-500:focus:is(.htw-dark *){
954
962
  --tw-border-opacity:1;
955
- border-color:rgb(16 185 129 / var(--tw-border-opacity))
963
+ border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))
956
964
  }
957
965
 
958
- .htw-group:hover :is(.htw-dark .group-hover\:dark\:htw-border-primary-500){
966
+ .htw-group:hover .group-hover\:dark\:htw-border-primary-500:is(.htw-dark *){
959
967
  --tw-border-opacity:1;
960
- border-color:rgb(16 185 129 / var(--tw-border-opacity))
968
+ border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))
961
969
  }
package/dist/utils.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const isDark: import("vue").Ref<boolean>;
1
+ export declare const isDark: import("vue").Ref<boolean, boolean>;
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@histoire/controls",
3
- "version": "0.17.16",
3
+ "type": "module",
4
+ "version": "1.0.0-alpha.1",
4
5
  "description": "Prebuilt controls components",
5
- "license": "MIT",
6
6
  "author": {
7
7
  "name": "Guillaume Chau"
8
8
  },
9
+ "license": "MIT",
9
10
  "repository": {
10
11
  "url": "https://github.com/Akryum/histoire.git",
11
12
  "type": "git",
@@ -14,7 +15,11 @@
14
15
  "publishConfig": {
15
16
  "access": "public"
16
17
  },
17
- "type": "module",
18
+ "sideEffects": [
19
+ "*.css",
20
+ "*.postcss",
21
+ "*.vue"
22
+ ],
18
23
  "exports": {
19
24
  ".": {
20
25
  "types": "./dist/index.d.ts",
@@ -25,40 +30,35 @@
25
30
  "main": "./dist/index.es.js",
26
31
  "module": "./dist/index.es.js",
27
32
  "types": "./dist/index.d.ts",
28
- "sideEffects": [
29
- "*.css",
30
- "*.postcss",
31
- "*.vue"
32
- ],
33
33
  "dependencies": {
34
- "@codemirror/commands": "^6.3.0",
34
+ "@codemirror/commands": "^6.7.1",
35
35
  "@codemirror/lang-json": "^6.0.1",
36
- "@codemirror/language": "^6.9.2",
37
- "@codemirror/lint": "^6.4.2",
38
- "@codemirror/state": "^6.3.1",
36
+ "@codemirror/language": "^6.10.6",
37
+ "@codemirror/lint": "^6.8.4",
38
+ "@codemirror/state": "^6.4.1",
39
39
  "@codemirror/theme-one-dark": "^6.1.2",
40
- "@codemirror/view": "^6.22.0",
41
- "@histoire/shared": "^0.17.16",
42
- "@histoire/vendors": "^0.17.16"
40
+ "@codemirror/view": "^6.35.0",
41
+ "@histoire/shared": "^1.0.0-alpha.1",
42
+ "@histoire/vendors": "^1.0.0-alpha.1"
43
43
  },
44
44
  "devDependencies": {
45
- "@types/node": "^18.11.9",
46
- "@vitejs/plugin-vue": "^4.5.0",
47
- "@vue/runtime-dom": "^3.3.8",
48
- "@vue/test-utils": "^2.4.2",
49
- "@vueuse/core": "^9.13.0",
50
- "autoprefixer": "^10.4.16",
51
- "concurrently": "^7.6.0",
52
- "floating-vue": "2.0.0-beta.19",
53
- "jsdom": "^22.1.0",
54
- "postcss": "^8.4.31",
55
- "postcss-import": "^14.1.0",
56
- "tailwindcss": "^3.3.5",
57
- "typescript": "^4.9.5",
58
- "vite": "^5.0.11",
59
- "vitest": "^0.34.6",
60
- "vue": "^3.3.8",
61
- "vue-tsc": "^1.8.22"
45
+ "@types/node": "^22.10.1",
46
+ "@vitejs/plugin-vue": "^5.2.1",
47
+ "@vue/runtime-dom": "^3.5.13",
48
+ "@vue/test-utils": "^2.4.6",
49
+ "@vueuse/core": "^12.0.0",
50
+ "autoprefixer": "^10.4.20",
51
+ "concurrently": "^9.1.0",
52
+ "floating-vue": "5.2.2",
53
+ "jsdom": "^25.0.1",
54
+ "postcss": "^8.4.49",
55
+ "postcss-import": "^16.1.0",
56
+ "tailwindcss": "^3.4.16",
57
+ "typescript": "5.6.3",
58
+ "vite": "^6.0.5",
59
+ "vitest": "0.34.6",
60
+ "vue": "^3.5.13",
61
+ "vue-tsc": "^2.1.10"
62
62
  },
63
63
  "scripts": {
64
64
  "build": "rimraf dist && pnpm run build:css && vite build && pnpm run build:types",
@@ -5,10 +5,10 @@ export default {
5
5
  </script>
6
6
 
7
7
  <script lang="ts" setup>
8
+ import type { Awaitable } from '@histoire/shared'
8
9
  import { Icon } from '@iconify/vue'
9
10
  import { useClipboard } from '@vueuse/core'
10
11
  import { VTooltip as vTooltip } from 'floating-vue'
11
- import type { Awaitable } from '@histoire/shared'
12
12
 
13
13
  const props = defineProps<{
14
14
  content: string | (() => Awaitable<string>)
@@ -16,7 +16,7 @@ const props = defineProps<{
16
16
 
17
17
  const { copy, copied } = useClipboard()
18
18
 
19
- const action = async () => {
19
+ async function action() {
20
20
  const content = typeof props.content === 'function' ? await props.content() : props.content
21
21
  copy(content)
22
22
  }
@@ -5,8 +5,8 @@ export default {
5
5
  </script>
6
6
 
7
7
  <script lang="ts" setup>
8
- import { withDefaults } from 'vue'
9
8
  import { VTooltip as vTooltip } from 'floating-vue'
9
+ import { withDefaults } from 'vue'
10
10
 
11
11
  withDefaults(defineProps<{
12
12
  title?: string
@@ -15,7 +15,6 @@ withDefaults(defineProps<{
15
15
  title: undefined,
16
16
  tag: 'label',
17
17
  })
18
-
19
18
  </script>
20
19
 
21
20
  <template>
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import HstButton from './HstButton.vue'
3
3
 
4
- const variants: Array<{name: string, bind?: unknown}> = [
4
+ const variants: Array<{ name: string, bind?: unknown }> = [
5
5
  { name: 'Default' },
6
6
  { name: 'Primary', bind: { color: 'primary' } },
7
7
  { name: 'Flat', bind: { color: 'flat' } },
@@ -15,7 +15,7 @@ const objectOptions = Object.keys(options).map(key => ({
15
15
  value: key,
16
16
  }))
17
17
 
18
- function initState () {
18
+ function initState() {
19
19
  return {
20
20
  speed: flatOptions[0],
21
21
  }
@@ -72,7 +72,7 @@ const count = ref('0')
72
72
  <pre>{{ { count } }}</pre>
73
73
  <HstButtonGroup
74
74
  v-model="count"
75
- :options="[{label: 'Low', value: '-25'},{label: 'Regular', value: '0'},{label: 'High', value: '200'}]"
75
+ :options="[{ label: 'Low', value: '-25' }, { label: 'Regular', value: '0' }, { label: 'High', value: '200' }]"
76
76
  />
77
77
  </Variant>
78
78
  </Story>
@@ -5,9 +5,10 @@ export default {
5
5
  </script>
6
6
 
7
7
  <script setup lang="ts">
8
- import { computed, ComputedRef } from 'vue'
8
+ import type { ComputedRef } from 'vue'
9
+ import type { HstControlOption } from '../../types'
10
+ import { computed } from 'vue'
9
11
  import HstWrapper from '../HstWrapper.vue'
10
- import { HstControlOption } from '../../types'
11
12
  import HstButton from './HstButton.vue'
12
13
 
13
14
  const props = defineProps<{
@@ -21,11 +22,13 @@ const formattedOptions: ComputedRef<HstControlOption[]> = computed(() => {
21
22
  return props.options.map((value: string | number | HstControlOption) => {
22
23
  if (typeof value === 'string' || typeof value === 'number') {
23
24
  return { value, label: String(value) }
24
- } else {
25
+ }
26
+ else {
25
27
  return value
26
28
  }
27
29
  })
28
- } else {
30
+ }
31
+ else {
29
32
  return Object.keys(props.options).map((value: string) => ({
30
33
  value,
31
34
  label: props.options[value],
@@ -37,7 +40,7 @@ const emit = defineEmits<{
37
40
  (e: 'update:modelValue', value: string): void
38
41
  }>()
39
42
 
40
- function selectOption (value: string) {
43
+ function selectOption(value: string) {
41
44
  emit('update:modelValue', value)
42
45
  }
43
46
  </script>
@@ -1,8 +1,8 @@
1
1
  import { mount } from '@vue/test-utils'
2
2
  import HstCheckbox from './HstCheckbox.vue'
3
3
 
4
- describe('HstCheckbox', () => {
5
- test('toggle to checked', async () => {
4
+ describe('hstCheckbox', () => {
5
+ it('toggle to checked', async () => {
6
6
  const wrapper = mount(HstCheckbox, {
7
7
  props: {
8
8
  modelValue: false,
@@ -14,7 +14,7 @@ describe('HstCheckbox', () => {
14
14
  expect(wrapper.html()).toMatchSnapshot()
15
15
  })
16
16
 
17
- test('toggle to unchecked', async () => {
17
+ it('toggle to unchecked', async () => {
18
18
  const wrapper = mount(HstCheckbox, {
19
19
  props: {
20
20
  modelValue: true,
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import HstCheckbox from './HstCheckbox.vue'
3
3
 
4
- function initState () {
4
+ function initState() {
5
5
  return {
6
6
  booleanChecked: false,
7
7
  stringChecked: 'false',
@@ -5,9 +5,9 @@ export default {
5
5
  </script>
6
6
 
7
7
  <script lang="ts" setup>
8
+ import { computed } from 'vue'
8
9
  import HstWrapper from '../HstWrapper.vue'
9
10
  import HstSimpleCheckbox from './HstSimpleCheckbox.vue'
10
- import { computed } from 'vue'
11
11
 
12
12
  type Booleanish = boolean | 'true' | 'false'
13
13
 
@@ -20,7 +20,7 @@ const emit = defineEmits({
20
20
  'update:modelValue': (newValue: Booleanish) => true,
21
21
  })
22
22
 
23
- function toggle () {
23
+ function toggle() {
24
24
  if (typeof props.modelValue === 'string') {
25
25
  emit('update:modelValue', props.modelValue === 'false' ? 'true' : 'false')
26
26
  return
@@ -12,7 +12,7 @@ const objectOptions = Object.keys(options).map(key => ({
12
12
  value: key,
13
13
  }))
14
14
 
15
- function initState () {
15
+ function initState() {
16
16
  return {
17
17
  characters: [],
18
18
  }
@@ -5,9 +5,10 @@ export default {
5
5
  </script>
6
6
 
7
7
  <script lang="ts" setup>
8
- import { computed, ComputedRef } from 'vue'
8
+ import type { ComputedRef } from 'vue'
9
+ import type { HstControlOption } from '../../types'
10
+ import { computed } from 'vue'
9
11
  import HstWrapper from '../HstWrapper.vue'
10
- import { HstControlOption } from '../../types'
11
12
  import HstSimpleCheckbox from './HstSimpleCheckbox.vue'
12
13
 
13
14
  const props = defineProps<{
@@ -21,7 +22,8 @@ const formattedOptions: ComputedRef<Record<string, string>> = computed(() => {
21
22
  return Object.fromEntries(props.options.map((value: string | HstControlOption) => {
22
23
  if (typeof value === 'string') {
23
24
  return [value, value]
24
- } else {
25
+ }
26
+ else {
25
27
  return [value.value, value.label]
26
28
  }
27
29
  }))
@@ -33,10 +35,11 @@ const emit = defineEmits<{
33
35
  (e: 'update:modelValue', value: Array<string>): void
34
36
  }>()
35
37
 
36
- function toggleOption (value: string) {
38
+ function toggleOption(value: string) {
37
39
  if (props.modelValue.includes(value)) {
38
40
  emit('update:modelValue', props.modelValue.filter(element => element !== value))
39
- } else {
41
+ }
42
+ else {
40
43
  emit('update:modelValue', [...props.modelValue, value])
41
44
  }
42
45
  }
@@ -52,7 +55,7 @@ function toggleOption (value: string) {
52
55
  >
53
56
  <div class="-htw-my-1">
54
57
  <template
55
- v-for="( label, value ) in formattedOptions"
58
+ v-for="(label, value) in formattedOptions"
56
59
  :key="value"
57
60
  >
58
61
  <label
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import HstSimpleCheckbox from './HstSimpleCheckbox.vue'
3
3
 
4
- function initState () {
4
+ function initState() {
5
5
  return {
6
6
  checked: true,
7
7
  }
@@ -16,7 +16,7 @@ const emit = defineEmits({
16
16
  'update:modelValue': (newValue: boolean) => true,
17
17
  })
18
18
 
19
- function toggle () {
19
+ function toggle() {
20
20
  if (!props.withToggle) {
21
21
  return
22
22
  }
@@ -46,7 +46,7 @@ watch(path, () => {
46
46
  <template>
47
47
  <div
48
48
  class="histoire-simple-checkbox htw-group htw-text-white htw-w-[16px] htw-h-[16px] htw-relative"
49
- :class="{'htw-cursor-pointer': withToggle}"
49
+ :class="{ 'htw-cursor-pointer': withToggle }"
50
50
  @click="toggle"
51
51
  >
52
52
  <div