ui-thing 0.0.15 → 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/CHANGELOG.md +12 -0
- package/dist/index.js +122 -139
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/comps.ts +30 -30
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.0.16
|
|
4
|
+
|
|
5
|
+
[compare changes](https://github.com/BayBreezy/ui-thing-cli/compare/v0.0.15...v0.0.16)
|
|
6
|
+
|
|
7
|
+
### 🚀 Enhancements
|
|
8
|
+
|
|
9
|
+
- **pin-input:** Replace OTP with pin input ([7287b6f](https://github.com/BayBreezy/ui-thing-cli/commit/7287b6f))
|
|
10
|
+
|
|
11
|
+
### ❤️ Contributors
|
|
12
|
+
|
|
13
|
+
- Behon Baker <behon.baker@yahoo.com>
|
|
14
|
+
|
|
3
15
|
## v0.0.15
|
|
4
16
|
|
|
5
17
|
[compare changes](https://github.com/BayBreezy/ui-thing-cli/compare/v0.0.14...v0.0.15)
|
package/dist/index.js
CHANGED
|
@@ -5354,69 +5354,6 @@ export function useFormField() {\r
|
|
|
5354
5354
|
base: "origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
5355
5355
|
});
|
|
5356
5356
|
</script>
|
|
5357
|
-
`}],utils:[],composables:[],plugins:[]},{name:"One-Time Password",value:"otp",deps:["tailwind-variants","vue3-otp-input"],devDeps:["@vueuse/core","@vueuse/nuxt"],nuxtModules:["@vueuse/nuxt"],files:[{fileName:"OTP.vue",dirPath:"components/UI",fileContent:`<template>
|
|
5358
|
-
<VOtpInput
|
|
5359
|
-
ref="otp"
|
|
5360
|
-
v-model:value="localModel"
|
|
5361
|
-
:input-classes="styles({ separator: Boolean(separator), class: inputClasses })"
|
|
5362
|
-
:separator="separator"
|
|
5363
|
-
:num-inputs="numInputs"
|
|
5364
|
-
:input-type="inputType"
|
|
5365
|
-
:inputmode="inputmode"
|
|
5366
|
-
:should-auto-focus="shouldAutoFocus"
|
|
5367
|
-
:placeholder="placeholder"
|
|
5368
|
-
:is-disabled="disabled"
|
|
5369
|
-
@on-change="emits('change', $event)"
|
|
5370
|
-
@on-complete="emits('complete', $event)"
|
|
5371
|
-
/>
|
|
5372
|
-
</template>
|
|
5373
|
-
|
|
5374
|
-
<script lang="ts" setup>
|
|
5375
|
-
import VOtpInput from "vue3-otp-input";
|
|
5376
|
-
|
|
5377
|
-
const otp = ref<InstanceType<typeof VOtpInput> | null>(null);
|
|
5378
|
-
|
|
5379
|
-
const props = withDefaults(
|
|
5380
|
-
defineProps<{
|
|
5381
|
-
modelValue?: string;
|
|
5382
|
-
numInputs?: number;
|
|
5383
|
-
separator?: string;
|
|
5384
|
-
inputClasses?: any;
|
|
5385
|
-
conditionalClass?: any[];
|
|
5386
|
-
inputType?: "number" | "tel" | "letter-numeric" | "password";
|
|
5387
|
-
inputmode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search";
|
|
5388
|
-
shouldAutoFocus?: boolean;
|
|
5389
|
-
placeholder?: string[];
|
|
5390
|
-
disabled?: boolean;
|
|
5391
|
-
}>(),
|
|
5392
|
-
{
|
|
5393
|
-
numInputs: 4,
|
|
5394
|
-
inputType: "letter-numeric",
|
|
5395
|
-
inputmode: "text",
|
|
5396
|
-
separator: "",
|
|
5397
|
-
}
|
|
5398
|
-
);
|
|
5399
|
-
const emits = defineEmits<{
|
|
5400
|
-
"update:modelValue": [any];
|
|
5401
|
-
change: [any];
|
|
5402
|
-
complete: [any];
|
|
5403
|
-
ready: [any];
|
|
5404
|
-
}>();
|
|
5405
|
-
const localModel = useVModel(props, "modelValue", emits);
|
|
5406
|
-
|
|
5407
|
-
const styles = tv({
|
|
5408
|
-
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",
|
|
5409
|
-
variants: {
|
|
5410
|
-
separator: {
|
|
5411
|
-
true: "mx-2",
|
|
5412
|
-
},
|
|
5413
|
-
},
|
|
5414
|
-
});
|
|
5415
|
-
|
|
5416
|
-
onMounted(() => {
|
|
5417
|
-
emits("ready", otp.value);
|
|
5418
|
-
});
|
|
5419
|
-
</script>
|
|
5420
5357
|
`}],utils:[],composables:[],plugins:[]},{name:"Pagination",value:"pagination",deps:["radix-vue","tailwind-variants"],devDeps:["nuxt-icon"],nuxtModules:["nuxt-icon"],files:[{fileName:"Pagination/Ellipsis.vue",dirPath:"components/UI",fileContent:`<template>
|
|
5421
5358
|
<PaginationEllipsis v-bind="reactiveOmit(props, 'icon')">
|
|
5422
5359
|
<slot>
|
|
@@ -5624,6 +5561,66 @@ export function useFormField() {\r
|
|
|
5624
5561
|
}
|
|
5625
5562
|
>();
|
|
5626
5563
|
</script>
|
|
5564
|
+
`}],utils:[],composables:[],plugins:[]},{name:"Pin Input (OTP)",value:"pin-input",deps:["radix-vue","tailwind-variants"],devDeps:[],nuxtModules:[],files:[{fileName:"PinInput/PinInput.vue",dirPath:"components/UI",fileContent:`<template>\r
|
|
5565
|
+
<PinInputRoot v-bind="forwarded" :class="styles({ class: props.class })">\r
|
|
5566
|
+
<slot>\r
|
|
5567
|
+
<template v-for="(input, k) in inputCount" :key="k">\r
|
|
5568
|
+
<UiPinInputInput :index="k" />\r
|
|
5569
|
+
<template v-if="k < inputCount - 1">\r
|
|
5570
|
+
<span v-if="separator" class="text-muted-foreground">{{ separator }}</span>\r
|
|
5571
|
+
</template>\r
|
|
5572
|
+
</template>\r
|
|
5573
|
+
</slot>\r
|
|
5574
|
+
</PinInputRoot>\r
|
|
5575
|
+
</template>\r
|
|
5576
|
+
\r
|
|
5577
|
+
<script lang="ts" setup>\r
|
|
5578
|
+
import { PinInputRoot, useForwardPropsEmits } from "radix-vue";\r
|
|
5579
|
+
import type { PinInputRootEmits, PinInputRootProps } from "radix-vue";\r
|
|
5580
|
+
\r
|
|
5581
|
+
const props = withDefaults(\r
|
|
5582
|
+
defineProps<\r
|
|
5583
|
+
PinInputRootProps & {\r
|
|
5584
|
+
/** Custom class(es) to apply to the parent element. */\r
|
|
5585
|
+
class?: any;\r
|
|
5586
|
+
/** The number of inputs to render. @default 4 */\r
|
|
5587
|
+
inputCount?: number;\r
|
|
5588
|
+
/** The separator to render between inputs. @default undefined */\r
|
|
5589
|
+
separator?: string;\r
|
|
5590
|
+
}\r
|
|
5591
|
+
>(),\r
|
|
5592
|
+
{\r
|
|
5593
|
+
inputCount: 4,\r
|
|
5594
|
+
}\r
|
|
5595
|
+
);\r
|
|
5596
|
+
\r
|
|
5597
|
+
const emits = defineEmits<PinInputRootEmits>();\r
|
|
5598
|
+
\r
|
|
5599
|
+
const forwarded = useForwardPropsEmits(\r
|
|
5600
|
+
reactiveOmit(props, "class", "inputCount", "separator"),\r
|
|
5601
|
+
emits\r
|
|
5602
|
+
);\r
|
|
5603
|
+
const styles = tv({\r
|
|
5604
|
+
base: "flex items-center gap-2",\r
|
|
5605
|
+
});\r
|
|
5606
|
+
</script>\r
|
|
5607
|
+
`},{fileName:"PinInput/PinInputInput.vue",dirPath:"components/UI",fileContent:`<template>\r
|
|
5608
|
+
<PinInputInput v-bind="reactiveOmit(props, 'class')" :class="styles({ class: props.class })" />\r
|
|
5609
|
+
</template>\r
|
|
5610
|
+
\r
|
|
5611
|
+
<script lang="ts" setup>\r
|
|
5612
|
+
import { PinInputInput } from "radix-vue";\r
|
|
5613
|
+
import type { PinInputInputProps } from "radix-vue";\r
|
|
5614
|
+
\r
|
|
5615
|
+
const props = defineProps<\r
|
|
5616
|
+
PinInputInputProps & {\r
|
|
5617
|
+
class?: any;\r
|
|
5618
|
+
}\r
|
|
5619
|
+
>();\r
|
|
5620
|
+
const styles = tv({\r
|
|
5621
|
+
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
|
|
5622
|
+
});\r
|
|
5623
|
+
</script>\r
|
|
5627
5624
|
`}],utils:[],composables:[],plugins:[]},{name:"Popover",value:"popover",deps:["radix-vue","tailwind-variants"],devDeps:["tailwindcss-animate","nuxt-icon"],nuxtModules:["nuxt-icon"],files:[{fileName:"Popover/Anchor.vue",dirPath:"components/UI",fileContent:`<template>
|
|
5628
5625
|
<PopoverAnchor v-bind="forwarded">
|
|
5629
5626
|
<slot></slot>
|
|
@@ -8697,82 +8694,68 @@ export { toast, useToast };
|
|
|
8697
8694
|
--ms-empty-color: theme("colors.muted.foreground");
|
|
8698
8695
|
}
|
|
8699
8696
|
</style>
|
|
8700
|
-
`}],utils:[],composables:[],plugins:[]},{name:"
|
|
8701
|
-
<div class="w-full"
|
|
8702
|
-
<UiLabel
|
|
8703
|
-
:for="inputId"
|
|
8704
|
-
v-if="label"
|
|
8705
|
-
:class="[disabled && 'text-muted-foreground', errorMessage && 'text-destructive', 'mb-2']"
|
|
8706
|
-
>{{ label }}</UiLabel
|
|
8707
|
-
|
|
8708
|
-
<div class="relative"
|
|
8709
|
-
<
|
|
8710
|
-
|
|
8711
|
-
|
|
8712
|
-
|
|
8713
|
-
|
|
8714
|
-
|
|
8715
|
-
|
|
8716
|
-
|
|
8717
|
-
|
|
8718
|
-
|
|
8719
|
-
|
|
8720
|
-
|
|
8721
|
-
|
|
8722
|
-
|
|
8723
|
-
|
|
8724
|
-
|
|
8725
|
-
|
|
8726
|
-
|
|
8727
|
-
|
|
8728
|
-
|
|
8729
|
-
|
|
8730
|
-
|
|
8731
|
-
|
|
8732
|
-
|
|
8733
|
-
|
|
8734
|
-
|
|
8735
|
-
|
|
8736
|
-
|
|
8737
|
-
|
|
8738
|
-
|
|
8739
|
-
|
|
8740
|
-
|
|
8741
|
-
|
|
8742
|
-
|
|
8743
|
-
|
|
8744
|
-
|
|
8745
|
-
|
|
8746
|
-
|
|
8747
|
-
|
|
8748
|
-
|
|
8749
|
-
|
|
8750
|
-
|
|
8751
|
-
|
|
8752
|
-
|
|
8753
|
-
|
|
8754
|
-
|
|
8755
|
-
|
|
8756
|
-
|
|
8757
|
-
|
|
8758
|
-
|
|
8759
|
-
|
|
8760
|
-
|
|
8761
|
-
|
|
8762
|
-
|
|
8763
|
-
const emits = defineEmits<{
|
|
8764
|
-
change: [any];
|
|
8765
|
-
complete: [any];
|
|
8766
|
-
ready: [any];
|
|
8767
|
-
}>();
|
|
8768
|
-
|
|
8769
|
-
const { errorMessage, value } = useField(() => props.name || inputId, props.rules, {
|
|
8770
|
-
initialValue: props.modelValue,
|
|
8771
|
-
label: props.label,
|
|
8772
|
-
validateOnMount: props.validateOnMount,
|
|
8773
|
-
syncVModel: true,
|
|
8774
|
-
});
|
|
8775
|
-
</script>
|
|
8697
|
+
`}],utils:[],composables:[],plugins:[]},{name:"Vee Pin Input",value:"vee-pin-input",deps:["@vee-validate/nuxt","radix-vue","@morev/vue-transitions","tailwind-variants"],askValidator:!0,devDeps:[],nuxtModules:["@vee-validate/nuxt","@morev/vue-transitions/nuxt"],components:["label","pin-input"],files:[{fileName:"Vee/PinInput.vue",dirPath:"components/UI",fileContent:`<template>\r
|
|
8698
|
+
<div class="w-full">\r
|
|
8699
|
+
<UiLabel\r
|
|
8700
|
+
:for="inputId"\r
|
|
8701
|
+
v-if="label"\r
|
|
8702
|
+
:class="[disabled && 'text-muted-foreground', errorMessage && 'text-destructive', 'mb-2']"\r
|
|
8703
|
+
>{{ label }}</UiLabel\r
|
|
8704
|
+
>\r
|
|
8705
|
+
<div class="relative">\r
|
|
8706
|
+
<UiPinInput\r
|
|
8707
|
+
@complete="emits('complete', $event)"\r
|
|
8708
|
+
:id="inputId"\r
|
|
8709
|
+
v-bind="{\r
|
|
8710
|
+
...$attrs,\r
|
|
8711
|
+
...reactiveOmit(props, 'label', 'hint', 'id', 'rules', 'validateOnMount', 'modelValue'),\r
|
|
8712
|
+
}"\r
|
|
8713
|
+
v-model="value"\r
|
|
8714
|
+
/>\r
|
|
8715
|
+
</div>\r
|
|
8716
|
+
<TransitionSlide group tag="div">\r
|
|
8717
|
+
<p key="hint" class="mt-1.5 text-sm text-muted-foreground" v-if="hint && !errorMessage">\r
|
|
8718
|
+
{{ hint }}\r
|
|
8719
|
+
</p>\r
|
|
8720
|
+
\r
|
|
8721
|
+
<p key="errorMessage" class="mt-1.5 text-sm text-destructive" v-if="errorMessage">\r
|
|
8722
|
+
{{ errorMessage }}\r
|
|
8723
|
+
</p>\r
|
|
8724
|
+
</TransitionSlide>\r
|
|
8725
|
+
</div>\r
|
|
8726
|
+
</template>\r
|
|
8727
|
+
\r
|
|
8728
|
+
<script lang="ts" setup>\r
|
|
8729
|
+
import { useId } from "radix-vue";\r
|
|
8730
|
+
import type { PinInputRootProps } from "radix-vue";\r
|
|
8731
|
+
\r
|
|
8732
|
+
const props = defineProps<\r
|
|
8733
|
+
Omit<PinInputRootProps, "as" | "asChild"> & {\r
|
|
8734
|
+
label?: string;\r
|
|
8735
|
+
hint?: string;\r
|
|
8736
|
+
id?: string;\r
|
|
8737
|
+
rules?: any;\r
|
|
8738
|
+
validateOnMount?: boolean;\r
|
|
8739
|
+
separator?: string;\r
|
|
8740
|
+
inputCount?: number;\r
|
|
8741
|
+
}\r
|
|
8742
|
+
>();\r
|
|
8743
|
+
\r
|
|
8744
|
+
const emits = defineEmits<{\r
|
|
8745
|
+
complete: [value: string[]];\r
|
|
8746
|
+
}>();\r
|
|
8747
|
+
\r
|
|
8748
|
+
defineOptions({ inheritAttrs: false });\r
|
|
8749
|
+
\r
|
|
8750
|
+
const inputId = useId(props.id);\r
|
|
8751
|
+
\r
|
|
8752
|
+
const { errorMessage, value } = useField(() => props.name || inputId, props.rules, {\r
|
|
8753
|
+
initialValue: props.modelValue || [],\r
|
|
8754
|
+
label: props.label,\r
|
|
8755
|
+
validateOnMount: props.validateOnMount,\r
|
|
8756
|
+
syncVModel: true,\r
|
|
8757
|
+
});\r
|
|
8758
|
+
</script>\r
|
|
8776
8759
|
`}],utils:[],composables:[],plugins:[]},{name:"VeeRadioGroup",value:"vee-radio-group",deps:["@vee-validate/nuxt","radix-vue","@morev/vue-transitions","tailwind-variants"],askValidator:!0,devDeps:["nuxt-icon"],nuxtModules:["@vee-validate/nuxt","@morev/vue-transitions/nuxt","nuxt-icon"],components:["radio-group","label"],files:[{fileName:"Vee/RadioGroup.vue",dirPath:"components/UI",fileContent:`<template>
|
|
8777
8760
|
<div :class="styles({ class: props.class })">
|
|
8778
8761
|
<slot name="label" :errorMessage="errorMessage" :value="value">
|