ui-thing 0.1.18 → 0.1.19
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 +12 -0
- package/dist/index.js +180 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/comps.ts +54 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ui-thing",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "CLI used to add Nuxt 3 components to a project",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"c12": "^1.10.0",
|
|
45
45
|
"commander": "^12.1.0",
|
|
46
46
|
"defu": "^6.1.4",
|
|
47
|
-
"execa": "^9.
|
|
47
|
+
"execa": "^9.2.0",
|
|
48
48
|
"figlet": "^1.7.0",
|
|
49
49
|
"fs-extra": "^11.2.0",
|
|
50
50
|
"kleur": "^4.1.5",
|
package/src/comps.ts
CHANGED
|
@@ -1148,7 +1148,7 @@ export default [
|
|
|
1148
1148
|
fileName: "Input.vue",
|
|
1149
1149
|
dirPath: "components/UI",
|
|
1150
1150
|
fileContent:
|
|
1151
|
-
'<template>\n <input v-bind="props" v-model="localModel" :class="styles({ class: props.class })"
|
|
1151
|
+
'<template>\n <input v-bind="props" v-model="localModel" :class="styles({ class: props.class })" >\n</template>\n\n<script lang="ts" setup>\n const props = withDefaults(\n defineProps<{\n class?: any;\n id?: string;\n name?: string;\n placeholder?: string;\n disabled?: boolean;\n required?: boolean;\n type?: string;\n modelValue?: any;\n }>(),\n { type: "text" }\n );\n const emits = defineEmits<{\n "update:modelValue": [value: any];\n }>();\n const localModel = useVModel(props, "modelValue", emits);\n\n const styles = tv({\n base: "form-input h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:px-1 file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground file:hover:cursor-pointer focus:border-input focus:ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 sm:text-sm",\n });\n</script>\n',
|
|
1152
1152
|
},
|
|
1153
1153
|
],
|
|
1154
1154
|
utils: [],
|
|
@@ -1492,6 +1492,40 @@ export default [
|
|
|
1492
1492
|
composables: [],
|
|
1493
1493
|
plugins: [],
|
|
1494
1494
|
},
|
|
1495
|
+
{
|
|
1496
|
+
name: "Number Field",
|
|
1497
|
+
value: "number-field",
|
|
1498
|
+
deps: ["@internationalized/number"],
|
|
1499
|
+
files: [
|
|
1500
|
+
{
|
|
1501
|
+
fileName: "NumberField/Decrement.vue",
|
|
1502
|
+
dirPath: "components/UI",
|
|
1503
|
+
fileContent:
|
|
1504
|
+
'<template>\n <NumberFieldDecrement v-bind="forwarded" :class="styles({ class: props.class })">\n <slot>\n <Icon :name="props.icon" />\n </slot>\n </NumberFieldDecrement>\n</template>\n\n<script lang="ts" setup>\n import { NumberFieldDecrement, useForwardProps } from "radix-vue";\n import type { NumberFieldDecrementProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n NumberFieldDecrementProps & {\n class?: any;\n icon?: string;\n }\n >(),\n { icon: "lucide:minus" }\n );\n\n const forwarded = useForwardProps(reactiveOmit(props, "class"));\n\n const styles = tv({\n base: "flex h-full shrink-0 items-center justify-center bg-transparent p-3 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",\n });\n</script>\n',
|
|
1505
|
+
},
|
|
1506
|
+
{
|
|
1507
|
+
fileName: "NumberField/Increment.vue",
|
|
1508
|
+
dirPath: "components/UI",
|
|
1509
|
+
fileContent:
|
|
1510
|
+
'<template>\n <NumberFieldIncrement v-bind="forwarded" :class="styles({ class: props.class })">\n <slot>\n <Icon :name="props.icon" />\n </slot>\n </NumberFieldIncrement>\n</template>\n\n<script lang="ts" setup>\n import { NumberFieldIncrement, useForwardProps } from "radix-vue";\n import type { NumberFieldIncrementProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n NumberFieldIncrementProps & {\n class?: any;\n icon?: string;\n }\n >(),\n { icon: "lucide:plus" }\n );\n\n const forwarded = useForwardProps(reactiveOmit(props, "class"));\n\n const styles = tv({\n base: "flex h-full shrink-0 items-center justify-center bg-transparent p-3 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",\n });\n</script>\n',
|
|
1511
|
+
},
|
|
1512
|
+
{
|
|
1513
|
+
fileName: "NumberField/Input.vue",
|
|
1514
|
+
dirPath: "components/UI",
|
|
1515
|
+
fileContent:
|
|
1516
|
+
'<template>\n <NumberFieldInput v-bind="forwarded" :class="styles({ class: props.class })" />\n</template>\n\n<script lang="ts" setup>\n import { NumberFieldInput, useForwardProps } from "radix-vue";\n import type { NumberFieldInputProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n NumberFieldInputProps & {\n class?: any;\n }\n >(),\n {}\n );\n\n const forwarded = useForwardProps(reactiveOmit(props, "class"));\n\n const styles = tv({\n base: "h-full w-full grow bg-transparent text-center text-base placeholder:text-muted-foreground/80 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 sm:text-sm",\n });\n</script>\n',
|
|
1517
|
+
},
|
|
1518
|
+
{
|
|
1519
|
+
fileName: "NumberField/NumberField.vue",
|
|
1520
|
+
dirPath: "components/UI",
|
|
1521
|
+
fileContent:
|
|
1522
|
+
'<template>\n <NumberFieldRoot\n v-slot="rootSlotProps"\n v-bind="forwarded"\n :class="styles({ class: props.class })"\n >\n <slot v-bind="rootSlotProps">\n <slot name="decrement">\n <UiNumberFieldDecrement />\n </slot>\n <slot name="input">\n <UiNumberFieldInput />\n </slot>\n <slot name="increment">\n <UiNumberFieldIncrement />\n </slot>\n </slot>\n </NumberFieldRoot>\n</template>\n\n<script lang="ts" setup>\n import { NumberFieldRoot, useForwardPropsEmits } from "radix-vue";\n import type { NumberFieldRootEmits, NumberFieldRootProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n NumberFieldRootProps & {\n class?: any;\n }\n >(),\n {}\n );\n\n const emit = defineEmits<NumberFieldRootEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emit);\n\n const styles = tv({\n base: "flex h-10 w-full items-center gap-1 rounded-md border border-input bg-background text-base focus-within:border-input 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 sm:text-sm",\n });\n</script>\n',
|
|
1523
|
+
},
|
|
1524
|
+
],
|
|
1525
|
+
utils: [],
|
|
1526
|
+
composables: [],
|
|
1527
|
+
plugins: [],
|
|
1528
|
+
},
|
|
1495
1529
|
{
|
|
1496
1530
|
name: "Pagination",
|
|
1497
1531
|
value: "pagination",
|
|
@@ -2464,6 +2498,25 @@ export default [
|
|
|
2464
2498
|
composables: [],
|
|
2465
2499
|
plugins: [],
|
|
2466
2500
|
},
|
|
2501
|
+
{
|
|
2502
|
+
name: "VeeNumberField",
|
|
2503
|
+
value: "vee-number-field",
|
|
2504
|
+
deps: ["@vee-validate/nuxt", "@morev/vue-transitions", "@internationalized/number"],
|
|
2505
|
+
askValidator: true,
|
|
2506
|
+
nuxtModules: ["@vee-validate/nuxt", "@morev/vue-transitions/nuxt"],
|
|
2507
|
+
components: ["label", "number-field"],
|
|
2508
|
+
files: [
|
|
2509
|
+
{
|
|
2510
|
+
fileName: "Vee/NumberField.vue",
|
|
2511
|
+
dirPath: "components/UI",
|
|
2512
|
+
fileContent:
|
|
2513
|
+
'<template>\n <div class="w-full">\n <UiLabel\n v-if="label"\n :for="inputId"\n :hint="labelHint"\n :class="[disabled && \'text-muted-foreground\', errorMessage && \'text-destructive\', \'mb-2\']"\n ><span>{{ label }} <span v-if="required" class="text-destructive">*</span></span></UiLabel\n >\n <div class="relative">\n <UiNumberField\n v-bind="($attrs, props)"\n :id="inputId"\n v-model="value"\n :disabled="disabled"\n :required="required"\n :name="name"\n >\n <template v-for="(_, slotName) in $slots" #[slotName]="scope">\n <slot :name="slotName" v-bind="scope" />\n </template>\n </UiNumberField>\n </div>\n <TransitionSlide group tag="div">\n <p v-if="hint && !errorMessage" key="hint" class="mt-1.5 text-sm text-muted-foreground">\n {{ hint }}\n </p>\n\n <p v-if="errorMessage" key="errorMessage" class="mt-1.5 text-sm text-destructive">\n {{ errorMessage }}\n </p>\n </TransitionSlide>\n </div>\n</template>\n\n<script lang="ts" setup>\n import type { NumberFieldRootProps } from "radix-vue";\n\n interface Props extends NumberFieldRootProps {\n label?: string;\n labelHint?: string;\n hint?: string;\n disabled?: boolean;\n name?: string;\n id?: string;\n rules?: any;\n validateOnMount?: boolean;\n required?: boolean;\n }\n const props = defineProps<Props>();\n\n const inputId = computed(() => props.id || useId());\n\n const { errorMessage, value } = useField(() => props.name || inputId.value, props.rules, {\n initialValue: props.modelValue,\n label: props.label,\n validateOnMount: props.validateOnMount,\n syncVModel: true,\n });\n</script>\n',
|
|
2514
|
+
},
|
|
2515
|
+
],
|
|
2516
|
+
utils: [],
|
|
2517
|
+
composables: [],
|
|
2518
|
+
plugins: [],
|
|
2519
|
+
},
|
|
2467
2520
|
{
|
|
2468
2521
|
name: "Vee Pin Input",
|
|
2469
2522
|
value: "vee-pin-input",
|