ui-thing 0.1.16 → 0.1.17
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/CHANGELOG.md +592 -579
- package/dist/index.js +130 -130
- package/dist/index.js.map +1 -1
- package/package.json +32 -32
- package/src/commands/add.ts +302 -302
- package/src/commands/init.ts +73 -73
- package/src/comps.ts +2564 -2564
- package/src/types.ts +35 -35
- package/src/utils/config.ts +100 -100
- package/src/utils/promptForComponents.ts +20 -20
package/dist/index.js
CHANGED
|
@@ -628,26 +628,26 @@ export const buttonStyles = tv({
|
|
|
628
628
|
|
|
629
629
|
const props = defineProps<AspectRatioProps>();
|
|
630
630
|
</script>
|
|
631
|
-
`}],utils:[],composables:[],plugins:[]},{name:"Autocomplete",value:"autocomplete",devDeps:["@vueuse/core"],files:[{fileName:"Autocomplete/Anchor.vue",dirPath:"components/UI",fileContent:`<template
|
|
632
|
-
<ComboboxAnchor v-bind="props" :class="styles({ class: props.class })"
|
|
633
|
-
<slot
|
|
634
|
-
</ComboboxAnchor
|
|
635
|
-
</template
|
|
636
|
-
|
|
637
|
-
<script lang="ts" setup
|
|
638
|
-
import { ComboboxAnchor } from "radix-vue"
|
|
639
|
-
import type { ComboboxAnchorProps } from "radix-vue"
|
|
640
|
-
|
|
641
|
-
const props = defineProps
|
|
642
|
-
ComboboxAnchorProps & {
|
|
643
|
-
class?: any
|
|
644
|
-
}
|
|
645
|
-
>()
|
|
646
|
-
|
|
647
|
-
const styles = tv({
|
|
648
|
-
base: "flex h-10 w-full items-center rounded-md border border-input bg-background px-3 py-2 ring-offset-background focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2"
|
|
649
|
-
})
|
|
650
|
-
</script
|
|
631
|
+
`}],utils:[],composables:[],plugins:[]},{name:"Autocomplete",value:"autocomplete",devDeps:["@vueuse/core"],files:[{fileName:"Autocomplete/Anchor.vue",dirPath:"components/UI",fileContent:`<template>
|
|
632
|
+
<ComboboxAnchor v-bind="props" :class="styles({ class: props.class })">
|
|
633
|
+
<slot />
|
|
634
|
+
</ComboboxAnchor>
|
|
635
|
+
</template>
|
|
636
|
+
|
|
637
|
+
<script lang="ts" setup>
|
|
638
|
+
import { ComboboxAnchor } from "radix-vue";
|
|
639
|
+
import type { ComboboxAnchorProps } from "radix-vue";
|
|
640
|
+
|
|
641
|
+
const props = defineProps<
|
|
642
|
+
ComboboxAnchorProps & {
|
|
643
|
+
class?: any;
|
|
644
|
+
}
|
|
645
|
+
>();
|
|
646
|
+
|
|
647
|
+
const styles = tv({
|
|
648
|
+
base: "flex h-10 w-full items-center rounded-md border border-input bg-background px-3 py-2 ring-offset-background focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",
|
|
649
|
+
});
|
|
650
|
+
</script>
|
|
651
651
|
`},{fileName:"Autocomplete/Arrow.vue",dirPath:"components/UI",fileContent:`<template>
|
|
652
652
|
<ComboboxArrow v-bind="props" :class="styles({ class: props.class })" />
|
|
653
653
|
</template>
|
|
@@ -666,28 +666,28 @@ export const buttonStyles = tv({
|
|
|
666
666
|
base: "rotate-45 border bg-muted",
|
|
667
667
|
});
|
|
668
668
|
</script>
|
|
669
|
-
`},{fileName:"Autocomplete/Autocomplete.vue",dirPath:"components/UI",fileContent:`<template
|
|
670
|
-
<ComboboxRoot v-bind="forwarded" :class="styles({ class: props.class })"
|
|
671
|
-
<slot
|
|
672
|
-
</ComboboxRoot
|
|
673
|
-
</template
|
|
674
|
-
|
|
675
|
-
<script lang="ts" setup
|
|
676
|
-
import { ComboboxRoot, useForwardPropsEmits } from "radix-vue"
|
|
677
|
-
import type { ComboboxRootEmits, ComboboxRootProps } from "radix-vue"
|
|
678
|
-
|
|
679
|
-
const props = defineProps
|
|
680
|
-
ComboboxRootProps & {
|
|
681
|
-
class?: any
|
|
682
|
-
}
|
|
683
|
-
>()
|
|
684
|
-
|
|
685
|
-
const emits = defineEmits<ComboboxRootEmits>()
|
|
686
|
-
const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits)
|
|
687
|
-
const styles = tv({
|
|
688
|
-
base: "relative"
|
|
689
|
-
})
|
|
690
|
-
</script
|
|
669
|
+
`},{fileName:"Autocomplete/Autocomplete.vue",dirPath:"components/UI",fileContent:`<template>
|
|
670
|
+
<ComboboxRoot v-bind="forwarded" :class="styles({ class: props.class })">
|
|
671
|
+
<slot />
|
|
672
|
+
</ComboboxRoot>
|
|
673
|
+
</template>
|
|
674
|
+
|
|
675
|
+
<script lang="ts" setup>
|
|
676
|
+
import { ComboboxRoot, useForwardPropsEmits } from "radix-vue";
|
|
677
|
+
import type { ComboboxRootEmits, ComboboxRootProps } from "radix-vue";
|
|
678
|
+
|
|
679
|
+
const props = defineProps<
|
|
680
|
+
ComboboxRootProps & {
|
|
681
|
+
class?: any;
|
|
682
|
+
}
|
|
683
|
+
>();
|
|
684
|
+
|
|
685
|
+
const emits = defineEmits<ComboboxRootEmits>();
|
|
686
|
+
const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);
|
|
687
|
+
const styles = tv({
|
|
688
|
+
base: "relative",
|
|
689
|
+
});
|
|
690
|
+
</script>
|
|
691
691
|
`},{fileName:"Autocomplete/Cancel.vue",dirPath:"components/UI",fileContent:`<template>
|
|
692
692
|
<ComboboxCancel v-bind="props">
|
|
693
693
|
<slot />
|
|
@@ -700,43 +700,43 @@ export const buttonStyles = tv({
|
|
|
700
700
|
|
|
701
701
|
const props = defineProps<ComboboxCancelProps>();
|
|
702
702
|
</script>
|
|
703
|
-
`},{fileName:"Autocomplete/Content.vue",dirPath:"components/UI",fileContent:`<template
|
|
704
|
-
<!-- <UiAutocompletePortal>
|
|
705
|
-
<ComboboxContent v-bind="forwarded" :class="styles({ class: props.class })"
|
|
706
|
-
<UiAutocompleteViewport
|
|
707
|
-
<slot
|
|
708
|
-
</UiAutocompleteViewport
|
|
709
|
-
</ComboboxContent
|
|
710
|
-
<!-- </UiAutocompletePortal>
|
|
711
|
-
</template
|
|
712
|
-
|
|
713
|
-
<script lang="ts" setup
|
|
714
|
-
import { ComboboxContent, useForwardPropsEmits } from "radix-vue"
|
|
715
|
-
import type { ComboboxContentEmits, ComboboxContentProps } from "radix-vue"
|
|
716
|
-
|
|
717
|
-
defineOptions({ inheritAttrs: false })
|
|
718
|
-
const props = withDefaults(
|
|
719
|
-
defineProps
|
|
720
|
-
ComboboxContentProps & {
|
|
721
|
-
class?: any
|
|
722
|
-
}
|
|
723
|
-
>()
|
|
724
|
-
{
|
|
725
|
-
position: "popper"
|
|
726
|
-
bodyLock: true
|
|
727
|
-
side: "bottom"
|
|
728
|
-
sideOffset: 8
|
|
729
|
-
class: undefined
|
|
730
|
-
}
|
|
731
|
-
)
|
|
732
|
-
|
|
733
|
-
const emits = defineEmits<ComboboxContentEmits>()
|
|
734
|
-
const forwarded = useForwardPropsEmits(props, emits)
|
|
735
|
-
|
|
736
|
-
const styles = tv({
|
|
737
|
-
base: "z-50 max-h-[300px] w-[var(--radix-popper-anchor-width)] min-w-[8rem] overflow-hidden overflow-y-auto rounded-md border bg-popover p-1 text-accent-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"
|
|
738
|
-
})
|
|
739
|
-
</script
|
|
703
|
+
`},{fileName:"Autocomplete/Content.vue",dirPath:"components/UI",fileContent:`<template>
|
|
704
|
+
<!-- <UiAutocompletePortal> -->
|
|
705
|
+
<ComboboxContent v-bind="forwarded" :class="styles({ class: props.class })">
|
|
706
|
+
<UiAutocompleteViewport>
|
|
707
|
+
<slot />
|
|
708
|
+
</UiAutocompleteViewport>
|
|
709
|
+
</ComboboxContent>
|
|
710
|
+
<!-- </UiAutocompletePortal> -->
|
|
711
|
+
</template>
|
|
712
|
+
|
|
713
|
+
<script lang="ts" setup>
|
|
714
|
+
import { ComboboxContent, useForwardPropsEmits } from "radix-vue";
|
|
715
|
+
import type { ComboboxContentEmits, ComboboxContentProps } from "radix-vue";
|
|
716
|
+
|
|
717
|
+
defineOptions({ inheritAttrs: false });
|
|
718
|
+
const props = withDefaults(
|
|
719
|
+
defineProps<
|
|
720
|
+
ComboboxContentProps & {
|
|
721
|
+
class?: any;
|
|
722
|
+
}
|
|
723
|
+
>(),
|
|
724
|
+
{
|
|
725
|
+
position: "popper",
|
|
726
|
+
bodyLock: true,
|
|
727
|
+
side: "bottom",
|
|
728
|
+
sideOffset: 8,
|
|
729
|
+
class: undefined,
|
|
730
|
+
}
|
|
731
|
+
);
|
|
732
|
+
|
|
733
|
+
const emits = defineEmits<ComboboxContentEmits>();
|
|
734
|
+
const forwarded = useForwardPropsEmits(props, emits);
|
|
735
|
+
|
|
736
|
+
const styles = tv({
|
|
737
|
+
base: "z-50 max-h-[300px] w-[var(--radix-popper-anchor-width)] min-w-[8rem] overflow-hidden overflow-y-auto rounded-md border bg-popover p-1 text-accent-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
738
|
+
});
|
|
739
|
+
</script>
|
|
740
740
|
`},{fileName:"Autocomplete/Empty.vue",dirPath:"components/UI",fileContent:`<template>
|
|
741
741
|
<ComboboxEmpty v-bind="props">
|
|
742
742
|
<slot />
|
|
@@ -761,25 +761,25 @@ export const buttonStyles = tv({
|
|
|
761
761
|
|
|
762
762
|
const props = defineProps<ComboboxGroupProps>();
|
|
763
763
|
</script>
|
|
764
|
-
`},{fileName:"Autocomplete/Input.vue",dirPath:"components/UI",fileContent:`<template
|
|
765
|
-
<ComboboxInput v-bind="props" :class="styles({ class: props.class })"
|
|
766
|
-
</template
|
|
767
|
-
|
|
768
|
-
<script lang="ts" setup
|
|
769
|
-
import { ComboboxInput } from "radix-vue"
|
|
770
|
-
import type { ComboboxInputProps } from "radix-vue"
|
|
771
|
-
|
|
772
|
-
const props = defineProps
|
|
773
|
-
ComboboxInputProps & {
|
|
774
|
-
placeholder?: string
|
|
775
|
-
class?: any
|
|
776
|
-
}
|
|
777
|
-
>()
|
|
778
|
-
|
|
779
|
-
const styles = tv({
|
|
780
|
-
base: "size-full grow rounded-md bg-background placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 sm:text-sm"
|
|
781
|
-
})
|
|
782
|
-
</script
|
|
764
|
+
`},{fileName:"Autocomplete/Input.vue",dirPath:"components/UI",fileContent:`<template>
|
|
765
|
+
<ComboboxInput v-bind="props" :class="styles({ class: props.class })" />
|
|
766
|
+
</template>
|
|
767
|
+
|
|
768
|
+
<script lang="ts" setup>
|
|
769
|
+
import { ComboboxInput } from "radix-vue";
|
|
770
|
+
import type { ComboboxInputProps } from "radix-vue";
|
|
771
|
+
|
|
772
|
+
const props = defineProps<
|
|
773
|
+
ComboboxInputProps & {
|
|
774
|
+
placeholder?: string;
|
|
775
|
+
class?: any;
|
|
776
|
+
}
|
|
777
|
+
>();
|
|
778
|
+
|
|
779
|
+
const styles = tv({
|
|
780
|
+
base: "size-full grow rounded-md bg-background placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 sm:text-sm",
|
|
781
|
+
});
|
|
782
|
+
</script>
|
|
783
783
|
`},{fileName:"Autocomplete/Item.vue",dirPath:"components/UI",fileContent:`<template>
|
|
784
784
|
<ComboboxItem v-bind="forwarded" :class="styles({ class: props.class })">
|
|
785
785
|
<slot name="icon">
|
|
@@ -847,18 +847,18 @@ export const buttonStyles = tv({
|
|
|
847
847
|
base: "px-2 py-1.5 pl-9 text-sm font-medium text-muted-foreground",
|
|
848
848
|
});
|
|
849
849
|
</script>
|
|
850
|
-
`},{fileName:"Autocomplete/Portal.vue",dirPath:"components/UI",fileContent:`<template
|
|
851
|
-
<ComboboxPortal position="popper" v-bind="props"
|
|
852
|
-
<slot
|
|
853
|
-
</ComboboxPortal
|
|
854
|
-
</template
|
|
855
|
-
|
|
856
|
-
<script lang="ts" setup
|
|
857
|
-
import { ComboboxPortal } from "radix-vue"
|
|
858
|
-
import type { ComboboxPortalProps } from "radix-vue"
|
|
859
|
-
|
|
860
|
-
const props = defineProps<ComboboxPortalProps>()
|
|
861
|
-
</script
|
|
850
|
+
`},{fileName:"Autocomplete/Portal.vue",dirPath:"components/UI",fileContent:`<template>
|
|
851
|
+
<ComboboxPortal position="popper" v-bind="props">
|
|
852
|
+
<slot />
|
|
853
|
+
</ComboboxPortal>
|
|
854
|
+
</template>
|
|
855
|
+
|
|
856
|
+
<script lang="ts" setup>
|
|
857
|
+
import { ComboboxPortal } from "radix-vue";
|
|
858
|
+
import type { ComboboxPortalProps } from "radix-vue";
|
|
859
|
+
|
|
860
|
+
const props = defineProps<ComboboxPortalProps>();
|
|
861
|
+
</script>
|
|
862
862
|
`},{fileName:"Autocomplete/Separator.vue",dirPath:"components/UI",fileContent:`<template>
|
|
863
863
|
<ComboboxSeparator v-bind="props">
|
|
864
864
|
<slot />
|
|
@@ -871,26 +871,26 @@ export const buttonStyles = tv({
|
|
|
871
871
|
|
|
872
872
|
const props = defineProps<ComboboxSeparatorProps>();
|
|
873
873
|
</script>
|
|
874
|
-
`},{fileName:"Autocomplete/Trigger.vue",dirPath:"components/UI",fileContent:`<template
|
|
875
|
-
<ComboboxTrigger v-bind="reactiveOmit(props, 'class')" :class="styles({ class: props.class })"
|
|
876
|
-
<slot
|
|
877
|
-
</ComboboxTrigger
|
|
878
|
-
</template
|
|
879
|
-
|
|
880
|
-
<script lang="ts" setup
|
|
881
|
-
import { ComboboxTrigger } from "radix-vue"
|
|
882
|
-
import type { ComboboxTriggerProps } from "radix-vue"
|
|
883
|
-
|
|
884
|
-
const props = defineProps
|
|
885
|
-
ComboboxTriggerProps & {
|
|
886
|
-
class?: any
|
|
887
|
-
}
|
|
888
|
-
>()
|
|
889
|
-
|
|
890
|
-
const styles = tv({
|
|
891
|
-
base: "inline-flex shrink-0 cursor-pointer items-center justify-center"
|
|
892
|
-
})
|
|
893
|
-
</script
|
|
874
|
+
`},{fileName:"Autocomplete/Trigger.vue",dirPath:"components/UI",fileContent:`<template>
|
|
875
|
+
<ComboboxTrigger v-bind="reactiveOmit(props, 'class')" :class="styles({ class: props.class })">
|
|
876
|
+
<slot />
|
|
877
|
+
</ComboboxTrigger>
|
|
878
|
+
</template>
|
|
879
|
+
|
|
880
|
+
<script lang="ts" setup>
|
|
881
|
+
import { ComboboxTrigger } from "radix-vue";
|
|
882
|
+
import type { ComboboxTriggerProps } from "radix-vue";
|
|
883
|
+
|
|
884
|
+
const props = defineProps<
|
|
885
|
+
ComboboxTriggerProps & {
|
|
886
|
+
class?: any;
|
|
887
|
+
}
|
|
888
|
+
>();
|
|
889
|
+
|
|
890
|
+
const styles = tv({
|
|
891
|
+
base: "inline-flex shrink-0 cursor-pointer items-center justify-center",
|
|
892
|
+
});
|
|
893
|
+
</script>
|
|
894
894
|
`},{fileName:"Autocomplete/Viewport.vue",dirPath:"components/UI",fileContent:`<template>
|
|
895
895
|
<ComboboxViewport v-bind="props">
|
|
896
896
|
<slot />
|