ui-thing 0.0.14 → 0.0.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-thing",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "description": "CLI used to add Nuxt 3 components to a project",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -48,7 +48,7 @@
48
48
  "defu": "^6.1.3",
49
49
  "execa": "^8.0.1",
50
50
  "figlet": "^1.7.0",
51
- "fs-extra": "^11.1.1",
51
+ "fs-extra": "^11.2.0",
52
52
  "kleur": "^4.1.5",
53
53
  "lodash": "^4.17.21",
54
54
  "nypm": "^0.3.3",
@@ -61,7 +61,7 @@
61
61
  "@types/figlet": "^1.5.8",
62
62
  "@types/fs-extra": "^11.0.4",
63
63
  "@types/lodash": "^4.14.202",
64
- "@types/node": "^20.9.4",
64
+ "@types/node": "^20.10.1",
65
65
  "@types/prompts": "^2.4.9",
66
66
  "@vitest/coverage-v8": "^0.34.6",
67
67
  "magicast": "^0.3.2",
package/src/comps.ts CHANGED
@@ -1330,24 +1330,6 @@ export default [
1330
1330
  composables: [],
1331
1331
  plugins: [],
1332
1332
  },
1333
- {
1334
- name: "One-Time Password",
1335
- value: "otp",
1336
- deps: ["tailwind-variants", "vue3-otp-input"],
1337
- devDeps: ["@vueuse/core", "@vueuse/nuxt"],
1338
- nuxtModules: ["@vueuse/nuxt"],
1339
- files: [
1340
- {
1341
- fileName: "OTP.vue",
1342
- dirPath: "components/UI",
1343
- fileContent:
1344
- '<template>\n <VOtpInput\n ref="otp"\n v-model:value="localModel"\n :input-classes="styles({ separator: Boolean(separator), class: inputClasses })"\n :separator="separator"\n :num-inputs="numInputs"\n :input-type="inputType"\n :inputmode="inputmode"\n :should-auto-focus="shouldAutoFocus"\n :placeholder="placeholder"\n :is-disabled="disabled"\n @on-change="emits(\'change\', $event)"\n @on-complete="emits(\'complete\', $event)"\n />\n</template>\n\n<script lang="ts" setup>\n import VOtpInput from "vue3-otp-input";\n\n const otp = ref<InstanceType<typeof VOtpInput> | null>(null);\n\n const props = withDefaults(\n defineProps<{\n modelValue?: string;\n numInputs?: number;\n separator?: string;\n inputClasses?: any;\n conditionalClass?: any[];\n inputType?: "number" | "tel" | "letter-numeric" | "password";\n inputmode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search";\n shouldAutoFocus?: boolean;\n placeholder?: string[];\n disabled?: boolean;\n }>(),\n {\n numInputs: 4,\n inputType: "letter-numeric",\n inputmode: "text",\n separator: "",\n }\n );\n const emits = defineEmits<{\n "update:modelValue": [any];\n change: [any];\n complete: [any];\n ready: [any];\n }>();\n const localModel = useVModel(props, "modelValue", emits);\n\n const styles = tv({\n base: "mr-3 h-10 w-10 rounded-md border border-input bg-background p-1 text-center text-base font-medium [-moz-appearance:_textfield] selection:bg-primary selection:text-primary-foreground placeholder:text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 sm:text-sm [&::-webkit-inner-spin-button]:m-0 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",\n variants: {\n separator: {\n true: "mx-2",\n },\n },\n });\n\n onMounted(() => {\n emits("ready", otp.value);\n });\n</script>\n',
1345
- },
1346
- ],
1347
- utils: [],
1348
- composables: [],
1349
- plugins: [],
1350
- },
1351
1333
  {
1352
1334
  name: "Pagination",
1353
1335
  value: "pagination",
@@ -1408,6 +1390,30 @@ export default [
1408
1390
  composables: [],
1409
1391
  plugins: [],
1410
1392
  },
1393
+ {
1394
+ name: "Pin Input (OTP)",
1395
+ value: "pin-input",
1396
+ deps: ["radix-vue", "tailwind-variants"],
1397
+ devDeps: [],
1398
+ nuxtModules: [],
1399
+ files: [
1400
+ {
1401
+ fileName: "PinInput/PinInput.vue",
1402
+ dirPath: "components/UI",
1403
+ fileContent:
1404
+ '<template>\r\n <PinInputRoot v-bind="forwarded" :class="styles({ class: props.class })">\r\n <slot>\r\n <template v-for="(input, k) in inputCount" :key="k">\r\n <UiPinInputInput :index="k" />\r\n <template v-if="k < inputCount - 1">\r\n <span v-if="separator" class="text-muted-foreground">{{ separator }}</span>\r\n </template>\r\n </template>\r\n </slot>\r\n </PinInputRoot>\r\n</template>\r\n\r\n<script lang="ts" setup>\r\n import { PinInputRoot, useForwardPropsEmits } from "radix-vue";\r\n import type { PinInputRootEmits, PinInputRootProps } from "radix-vue";\r\n\r\n const props = withDefaults(\r\n defineProps<\r\n PinInputRootProps & {\r\n /** Custom class(es) to apply to the parent element. */\r\n class?: any;\r\n /** The number of inputs to render. @default 4 */\r\n inputCount?: number;\r\n /** The separator to render between inputs. @default undefined */\r\n separator?: string;\r\n }\r\n >(),\r\n {\r\n inputCount: 4,\r\n }\r\n );\r\n\r\n const emits = defineEmits<PinInputRootEmits>();\r\n\r\n const forwarded = useForwardPropsEmits(\r\n reactiveOmit(props, "class", "inputCount", "separator"),\r\n emits\r\n );\r\n const styles = tv({\r\n base: "flex items-center gap-2",\r\n });\r\n</script>\r\n',
1405
+ },
1406
+ {
1407
+ fileName: "PinInput/PinInputInput.vue",
1408
+ dirPath: "components/UI",
1409
+ fileContent:
1410
+ '<template>\r\n <PinInputInput v-bind="reactiveOmit(props, \'class\')" :class="styles({ class: props.class })" />\r\n</template>\r\n\r\n<script lang="ts" setup>\r\n import { PinInputInput } from "radix-vue";\r\n import type { PinInputInputProps } from "radix-vue";\r\n\r\n const props = defineProps<\r\n PinInputInputProps & {\r\n class?: any;\r\n }\r\n >();\r\n const styles = tv({\r\n base: "h-10 w-10 rounded-md border border-input bg-background p-1 text-center text-base font-medium placeholder:text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 sm:text-sm",\r\n });\r\n</script>\r\n',
1411
+ },
1412
+ ],
1413
+ utils: [],
1414
+ composables: [],
1415
+ plugins: [],
1416
+ },
1411
1417
  {
1412
1418
  name: "Popover",
1413
1419
  value: "popover",
@@ -1925,23 +1931,77 @@ export default [
1925
1931
  fileContent:
1926
1932
  '<template>\n <TabsContent v-bind="reactiveOmit(props, \'class\')" :class="styles({ class: props.class })">\n <slot></slot>\n </TabsContent>\n</template>\n\n<script lang="ts" setup>\n import { TabsContent } from "radix-vue";\n import type { TabsContentProps } from "radix-vue";\n\n const props = defineProps<\n TabsContentProps & {\n /** Custom class(es) to add to parent element */\n class?: any;\n }\n >();\n\n const styles = tv({\n base: "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",\n });\n</script>\n',
1927
1933
  },
1934
+ {
1935
+ fileName: "Tabs/Indicator.vue",
1936
+ dirPath: "components/UI",
1937
+ fileContent:
1938
+ '<template>\r\n <ClientOnly>\r\n <TabsIndicator\r\n v-bind="{ ...reactiveOmit(props, \'class\'), ...$attrs }"\r\n :class="styles({ class: props.class })"\r\n >\r\n <slot>\r\n <div class="h-full w-full rounded-md bg-primary"></div>\r\n </slot>\r\n </TabsIndicator>\r\n </ClientOnly>\r\n</template>\r\n\r\n<script lang="ts" setup>\r\n import { TabsIndicator, withDefault } from "radix-vue";\r\n import type { TabsIndicatorProps } from "radix-vue";\r\n\r\n defineOptions({ inheritAttrs: false });\r\n\r\n const props = defineProps<\r\n TabsIndicatorProps & {\r\n /** Custom class(es) to add to parent element */\r\n class?: any;\r\n }\r\n >();\r\n\r\n const styles = tv({\r\n base: "absolute bottom-0 left-0 h-[3px] w-[--radix-tabs-indicator-size] translate-x-[--radix-tabs-indicator-position] rounded-full px-1 transition-[width,transform] duration-300",\r\n });\r\n</script>\r\n',
1939
+ },
1928
1940
  {
1929
1941
  fileName: "Tabs/List.vue",
1930
1942
  dirPath: "components/UI",
1931
1943
  fileContent:
1932
- '<template>\n <TabsList :class="styles({ class: props.class })" v-bind="reactiveOmit(props, \'class\')">\n <slot></slot>\n </TabsList>\n</template>\n\n<script lang="ts" setup>\n import { TabsList } from "radix-vue";\n import type { TabsListProps } from "radix-vue";\n\n const props = defineProps<\n TabsListProps & {\n /** Custom class(es) to add to parent element */\n class?: any;\n }\n >();\n\n const styles = tv({\n base: "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",\n });\n</script>\n',
1944
+ '<template>\n <TabsList :class="styles({ pill, class: props.class })" v-bind="reactiveOmit(props, \'class\')">\n <slot></slot>\n </TabsList>\n</template>\n\n<script lang="ts" setup>\n import { TabsList } from "radix-vue";\n import type { TabsListProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n TabsListProps & {\n /** Custom class(es) to add to parent element */\n class?: any;\n pill?: boolean;\n }\n >(),\n { pill: true }\n );\n\n const styles = tv({\n base: "inline-flex h-10 items-center justify-center rounded-md p-1 text-muted-foreground",\n variants: {\n pill: {\n true: "bg-muted",\n false: "",\n },\n },\n });\n</script>\n',
1933
1945
  },
1934
1946
  {
1935
1947
  fileName: "Tabs/Tabs.vue",
1936
1948
  dirPath: "components/UI",
1937
1949
  fileContent:
1938
- '<template>\n <TabsRoot v-bind="forwarded">\n <slot></slot>\n </TabsRoot>\n</template>\n\n<script lang="ts" setup>\n import { TabsRoot, useForwardPropsEmits } from "radix-vue";\n import type { TabsRootEmits, TabsRootProps } from "radix-vue";\n\n const props = withDefaults(defineProps<TabsRootProps & {}>(), {\n orientation: "horizontal",\n activationMode: "automatic",\n });\n const emits = defineEmits<TabsRootEmits>();\n const forwarded = useForwardPropsEmits(props, emits);\n</script>\n',
1950
+ '<template>\n <TabsRoot v-bind="forwarded">\n <slot></slot>\n </TabsRoot>\n</template>\n\n<script lang="ts" setup>\n import { TabsRoot, useForwardPropsEmits } from "radix-vue";\n import type { TabsRootEmits, TabsRootProps } from "radix-vue";\n\n const props = withDefaults(defineProps<TabsRootProps>(), {\n orientation: "horizontal",\n activationMode: "automatic",\n });\n const emits = defineEmits<TabsRootEmits>();\n const forwarded = useForwardPropsEmits(props, emits);\n</script>\n',
1939
1951
  },
1940
1952
  {
1941
1953
  fileName: "Tabs/Trigger.vue",
1942
1954
  dirPath: "components/UI",
1943
1955
  fileContent:
1944
- '<template>\n <TabsTrigger v-bind="reactiveOmit(props, \'class\')" :class="styles({ class: props.class })">\n <slot></slot>\n </TabsTrigger>\n</template>\n\n<script lang="ts" setup>\n import { TabsTrigger } from "radix-vue";\n import type { TabsTriggerProps } from "radix-vue";\n\n const props = defineProps<\n TabsTriggerProps & {\n /** Custom class(es) to add to parent element */\n class?: any;\n }\n >();\n\n const styles = tv({\n base: "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",\n });\n</script>\n',
1956
+ '<template>\n <TabsTrigger v-bind="reactiveOmit(props, \'class\')" :class="styles({ pill, class: props.class })">\n <slot></slot>\n </TabsTrigger>\n</template>\n\n<script lang="ts" setup>\n import { TabsTrigger } from "radix-vue";\n import type { TabsTriggerProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n TabsTriggerProps & {\n /** Custom class(es) to add to parent element */\n class?: any;\n /** Whether the trigger should be pill-shaped */\n pill?: boolean;\n }\n >(),\n {\n pill: true,\n }\n );\n\n const styles = tv({\n base: "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 ",\n variants: {\n pill: {\n true: "data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",\n false:\n "data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:shadow-none",\n },\n },\n });\n</script>\n',
1957
+ },
1958
+ ],
1959
+ utils: [],
1960
+ composables: [],
1961
+ plugins: [],
1962
+ },
1963
+ {
1964
+ name: "Tags Input",
1965
+ value: "tags-input",
1966
+ deps: ["tailwind-variants", "radix-vue"],
1967
+ devDeps: [],
1968
+ nuxtModules: [],
1969
+ files: [
1970
+ {
1971
+ fileName: "TagsInput/Clear.vue",
1972
+ dirPath: "components/UI",
1973
+ fileContent:
1974
+ '<template>\r\n <TagsInputClear v-bind="props" :class="styles({ class: props.class })">\r\n <slot>\r\n <Icon v-if="icon" :name="icon" class="h-3.5 w-3.5" />\r\n </slot>\r\n </TagsInputClear>\r\n</template>\r\n\r\n<script lang="ts" setup>\r\n import { TagsInputClear } from "radix-vue";\r\n import type { TagsInputClearProps } from "radix-vue";\r\n\r\n const props = withDefaults(defineProps<TagsInputClearProps & { icon?: string; class?: any }>(), {\r\n icon: "lucide:x",\r\n });\r\n const styles = tv({\r\n base: "flex items-center justify-center rounded bg-transparent p-1 opacity-40 transition hover:bg-muted-foreground hover:opacity-100 focus:opacity-100 focus-visible:outline-none",\r\n });\r\n</script>\r\n',
1975
+ },
1976
+ {
1977
+ fileName: "TagsInput/Field.vue",
1978
+ dirPath: "components/UI",
1979
+ fileContent:
1980
+ '<template>\r\n <TagsInputInput v-bind="reactiveOmit(props, \'class\')" :class="styles({ class: props.class })">\r\n <slot></slot>\r\n </TagsInputInput>\r\n</template>\r\n\r\n<script lang="ts" setup>\r\n import { TagsInputInput } from "radix-vue";\r\n import type { TagsInputInputProps } from "radix-vue";\r\n\r\n const props = defineProps<TagsInputInputProps & { class?: any }>();\r\n\r\n const styles = tv({\r\n base: "flex-1 bg-transparent focus:outline-none sm:text-sm",\r\n });\r\n</script>\r\n',
1981
+ },
1982
+ {
1983
+ fileName: "TagsInput/Item.vue",
1984
+ dirPath: "components/UI",
1985
+ fileContent:
1986
+ '<template>\r\n <TagsInputItem\r\n v-bind="reactiveOmit(props, \'class\', \'icon\')"\r\n :class="styles({ class: props.class })"\r\n >\r\n <slot>\r\n <slot name="text">\r\n <UiTagsInputItemText />\r\n </slot>\r\n <slot name="delete">\r\n <UiTagsInputItemDelete :icon="icon" />\r\n </slot>\r\n </slot>\r\n </TagsInputItem>\r\n</template>\r\n\r\n<script lang="ts" setup>\r\n import { TagsInputItem } from "radix-vue";\r\n import type { TagsInputItemProps } from "radix-vue";\r\n\r\n const props = defineProps<TagsInputItemProps & { class?: any; icon?: string }>();\r\n const styles = tv({\r\n base: "inline-flex h-6 shrink-0 items-center gap-1.5 rounded bg-primary pl-2 pr-1 leading-none text-primary-foreground sm:text-sm",\r\n });\r\n</script>\r\n',
1987
+ },
1988
+ {
1989
+ fileName: "TagsInput/ItemDelete.vue",
1990
+ dirPath: "components/UI",
1991
+ fileContent:
1992
+ '<template>\r\n <TagsInputItemDelete\r\n v-bind="reactiveOmit(props, \'icon\', \'class\')"\r\n :class="styles({ class: props.class })"\r\n >\r\n <slot>\r\n <Icon v-if="icon" :name="icon" class="h-3.5 w-3.5" />\r\n </slot>\r\n </TagsInputItemDelete>\r\n</template>\r\n\r\n<script lang="ts" setup>\r\n import { TagsInputItemDelete } from "radix-vue";\r\n import type { TagsInputItemDeleteProps } from "radix-vue";\r\n\r\n const props = withDefaults(\r\n defineProps<TagsInputItemDeleteProps & { icon?: string; class?: any }>(),\r\n {\r\n icon: "lucide:x",\r\n }\r\n );\r\n\r\n const styles = tv({\r\n base: "flex items-center justify-center rounded bg-transparent opacity-40 transition hover:bg-muted-foreground hover:opacity-100 focus:opacity-100 focus-visible:outline-none",\r\n });\r\n</script>\r\n',
1993
+ },
1994
+ {
1995
+ fileName: "TagsInput/ItemText.vue",
1996
+ dirPath: "components/UI",
1997
+ fileContent:
1998
+ '<template>\r\n <TagsInputItemText v-bind="reactiveOmit(props, \'class\')" :class="styles({ class: props.class })">\r\n <slot></slot>\r\n </TagsInputItemText>\r\n</template>\r\n\r\n<script lang="ts" setup>\r\n import { TagsInputItemText } from "radix-vue";\r\n import type { TagsInputItemTextProps } from "radix-vue";\r\n\r\n const props = defineProps<TagsInputItemTextProps & { class?: any }>();\r\n\r\n const styles = tv({\r\n base: "leading-none sm:text-sm",\r\n });\r\n</script>\r\n',
1999
+ },
2000
+ {
2001
+ fileName: "TagsInput/TagsInput.vue",
2002
+ dirPath: "components/UI",
2003
+ fileContent:
2004
+ '<template>\r\n <TagsInputRoot v-bind="forwarded" :class="styles({ class: props.class })">\r\n <slot></slot>\r\n </TagsInputRoot>\r\n</template>\r\n\r\n<script lang="ts" setup>\r\n import { TagsInputRoot, useForwardPropsEmits } from "radix-vue";\r\n import type { TagsInputRootEmits, TagsInputRootProps } from "radix-vue";\r\n\r\n const props = defineProps<TagsInputRootProps & { class?: any }>();\r\n const emits = defineEmits<TagsInputRootEmits>();\r\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);\r\n\r\n const styles = tv({\r\n base: "flex min-h-[40px] w-full flex-wrap items-center gap-2 rounded-md border border-input bg-background px-3 py-2 leading-none transition focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 focus-within:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",\r\n });\r\n</script>\r\n',
1945
2005
  },
1946
2006
  ],
1947
2007
  utils: [],
@@ -2226,25 +2286,19 @@ export default [
2226
2286
  plugins: [],
2227
2287
  },
2228
2288
  {
2229
- name: "VeeOTP",
2230
- value: "vee-otp",
2231
- deps: [
2232
- "@vee-validate/nuxt",
2233
- "radix-vue",
2234
- "@morev/vue-transitions",
2235
- "tailwind-variants",
2236
- "vue3-otp-input",
2237
- ],
2289
+ name: "Vee Pin Input",
2290
+ value: "vee-pin-input",
2291
+ deps: ["@vee-validate/nuxt", "radix-vue", "@morev/vue-transitions", "tailwind-variants"],
2238
2292
  askValidator: true,
2239
2293
  devDeps: [],
2240
2294
  nuxtModules: ["@vee-validate/nuxt", "@morev/vue-transitions/nuxt"],
2241
- components: ["label", "otp"],
2295
+ components: ["label", "pin-input"],
2242
2296
  files: [
2243
2297
  {
2244
- fileName: "Vee/OTP.vue",
2298
+ fileName: "Vee/PinInput.vue",
2245
2299
  dirPath: "components/UI",
2246
2300
  fileContent:
2247
- '<template>\n <div class="w-full">\n <UiLabel\n :for="inputId"\n v-if="label"\n :class="[disabled && \'text-muted-foreground\', errorMessage && \'text-destructive\', \'mb-2\']"\n >{{ label }}</UiLabel\n >\n <div class="relative">\n <UiOtp\n v-model="value"\n v-bind="$attrs"\n :input-classes="inputClasses"\n :separator="separator"\n :num-inputs="numInputs"\n :input-type="inputType"\n :inputmode="inputmode"\n :should-auto-focus="shouldAutoFocus"\n :placeholder="placeholder"\n :is-disabled="disabled"\n @change="emits(\'change\', $event)"\n @complete="emits(\'complete\', $event)"\n @ready="emits(\'ready\', $event)"\n />\n </div>\n <TransitionSlide group tag="div">\n <p key="hint" class="mt-1.5 text-sm text-muted-foreground" v-if="hint && !errorMessage">\n {{ hint }}\n </p>\n\n <p key="errorMessage" class="mt-1.5 text-sm text-destructive" v-if="errorMessage">\n {{ errorMessage }}\n </p>\n </TransitionSlide>\n </div>\n</template>\n\n<script lang="ts" setup>\n import { useId } from "radix-vue";\n\n const props = defineProps<{\n label?: string;\n hint?: string;\n modelValue?: string;\n name?: string;\n id?: string;\n rules?: any;\n validateOnMount?: boolean;\n numInputs?: number;\n separator?: string;\n inputClasses?: any;\n conditionalClass?: any[];\n inputType?: "number" | "tel" | "letter-numeric" | "password";\n inputmode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search";\n shouldAutoFocus?: boolean;\n placeholder?: string[];\n disabled?: boolean;\n }>();\n\n defineOptions({ inheritAttrs: false });\n\n const inputId = useId(props.id);\n\n const emits = defineEmits<{\n change: [any];\n complete: [any];\n ready: [any];\n }>();\n\n const { errorMessage, value } = useField(() => props.name || inputId, props.rules, {\n initialValue: props.modelValue,\n label: props.label,\n validateOnMount: props.validateOnMount,\n syncVModel: true,\n });\n</script>\n',
2301
+ '<template>\r\n <div class="w-full">\r\n <UiLabel\r\n :for="inputId"\r\n v-if="label"\r\n :class="[disabled && \'text-muted-foreground\', errorMessage && \'text-destructive\', \'mb-2\']"\r\n >{{ label }}</UiLabel\r\n >\r\n <div class="relative">\r\n <UiPinInput\r\n @complete="emits(\'complete\', $event)"\r\n :id="inputId"\r\n v-bind="{\r\n ...$attrs,\r\n ...reactiveOmit(props, \'label\', \'hint\', \'id\', \'rules\', \'validateOnMount\', \'modelValue\'),\r\n }"\r\n v-model="value"\r\n />\r\n </div>\r\n <TransitionSlide group tag="div">\r\n <p key="hint" class="mt-1.5 text-sm text-muted-foreground" v-if="hint && !errorMessage">\r\n {{ hint }}\r\n </p>\r\n\r\n <p key="errorMessage" class="mt-1.5 text-sm text-destructive" v-if="errorMessage">\r\n {{ errorMessage }}\r\n </p>\r\n </TransitionSlide>\r\n </div>\r\n</template>\r\n\r\n<script lang="ts" setup>\r\n import { useId } from "radix-vue";\r\n import type { PinInputRootProps } from "radix-vue";\r\n\r\n const props = defineProps<\r\n Omit<PinInputRootProps, "as" | "asChild"> & {\r\n label?: string;\r\n hint?: string;\r\n id?: string;\r\n rules?: any;\r\n validateOnMount?: boolean;\r\n separator?: string;\r\n inputCount?: number;\r\n }\r\n >();\r\n\r\n const emits = defineEmits<{\r\n complete: [value: string[]];\r\n }>();\r\n\r\n defineOptions({ inheritAttrs: false });\r\n\r\n const inputId = useId(props.id);\r\n\r\n const { errorMessage, value } = useField(() => props.name || inputId, props.rules, {\r\n initialValue: props.modelValue || [],\r\n label: props.label,\r\n validateOnMount: props.validateOnMount,\r\n syncVModel: true,\r\n });\r\n</script>\r\n',
2248
2302
  },
2249
2303
  ],
2250
2304
  utils: [],
@@ -2291,6 +2345,26 @@ export default [
2291
2345
  composables: [],
2292
2346
  plugins: [],
2293
2347
  },
2348
+ {
2349
+ name: "VeeTagsInput",
2350
+ value: "vee-tags-input",
2351
+ deps: ["@vee-validate/nuxt", "radix-vue", "@morev/vue-transitions", "tailwind-variants"],
2352
+ askValidator: true,
2353
+ devDeps: ["nuxt-icon"],
2354
+ nuxtModules: ["@vee-validate/nuxt", "@morev/vue-transitions/nuxt", "nuxt-icon"],
2355
+ components: ["tags-input", "label"],
2356
+ files: [
2357
+ {
2358
+ fileName: "Vee/TagsInput.vue",
2359
+ dirPath: "components/UI",
2360
+ fileContent:
2361
+ '<template>\r\n <div class="w-full">\r\n <UILabel\r\n :for="inputId"\r\n v-if="label"\r\n :class="[disabled && \'text-muted-foreground\', errorMessage && \'text-destructive\', \'mb-2\']"\r\n >{{ label }}</UILabel\r\n >\r\n <div class="relative">\r\n <slot name="icon">\r\n <span v-if="hasIcon" class="absolute inset-y-0 left-3 flex items-center justify-center">\r\n <Icon :name="icon" v-if="icon" class="h-4 w-4 text-muted-foreground/70" />\r\n </span>\r\n </slot>\r\n <UiTagsInput\r\n v-model="value"\r\n :name="name"\r\n :disabled="disabled"\r\n v-bind="$attrs"\r\n :class="[hasIcon && \'pl-9\']"\r\n >\r\n <UiTagsInputItem v-for="tag in value" :key="tag" :value="tag" />\r\n <UiTagsInputField :id="inputId" :placeholder="placeholder" />\r\n </UiTagsInput>\r\n </div>\r\n <TransitionSlide group tag="div">\r\n <p key="hint" class="mt-1.5 text-sm text-muted-foreground" v-if="hint && !errorMessage">\r\n {{ hint }}\r\n </p>\r\n\r\n <p key="errorMessage" class="mt-1.5 text-sm text-destructive" v-if="errorMessage">\r\n {{ errorMessage }}\r\n </p>\r\n </TransitionSlide>\r\n </div>\r\n</template>\r\n\r\n<script lang="ts" setup>\r\n import { useId } from "radix-vue";\r\n\r\n const props = defineProps<{\r\n label?: string;\r\n icon?: string;\r\n hint?: string;\r\n disabled?: boolean;\r\n modelValue?: string[];\r\n name?: string;\r\n id?: string;\r\n rules?: any;\r\n validateOnMount?: boolean;\r\n type?: string;\r\n placeholder?: string;\r\n }>();\r\n\r\n defineOptions({ inheritAttrs: false });\r\n\r\n const inputId = useId(props.id);\r\n\r\n const hasIcon = computed(() => Boolean(props.icon) || Boolean(useSlots().icon));\r\n\r\n const { errorMessage, value, handleBlur } = useField(() => props.name || inputId, props.rules, {\r\n initialValue: props.modelValue,\r\n label: props.label,\r\n validateOnMount: props.validateOnMount,\r\n syncVModel: true,\r\n });\r\n</script>\r\n',
2362
+ },
2363
+ ],
2364
+ utils: [],
2365
+ composables: [],
2366
+ plugins: [],
2367
+ },
2294
2368
  {
2295
2369
  name: "VeeTextarea",
2296
2370
  value: "vee-textarea",