ui-thing 0.1.8 → 0.1.10
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 +29 -0
- package/dist/index.js +114 -49
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/comps.ts +48 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.1.10
|
|
4
|
+
|
|
5
|
+
[compare changes](https://github.com/BayBreezy/ui-thing-cli/compare/v0.1.9...v0.1.10)
|
|
6
|
+
|
|
7
|
+
### 🚀 Enhancements
|
|
8
|
+
|
|
9
|
+
- Add currency-input component ([bc0f75b](https://github.com/BayBreezy/ui-thing-cli/commit/bc0f75b))
|
|
10
|
+
|
|
11
|
+
### 🏡 Chore
|
|
12
|
+
|
|
13
|
+
- Bump deps ([6e6dcf6](https://github.com/BayBreezy/ui-thing-cli/commit/6e6dcf6))
|
|
14
|
+
|
|
15
|
+
### ❤️ Contributors
|
|
16
|
+
|
|
17
|
+
- BayBreezy <behon.baker@yahoo.com>
|
|
18
|
+
|
|
19
|
+
## v0.1.9
|
|
20
|
+
|
|
21
|
+
[compare changes](https://github.com/BayBreezy/ui-thing-cli/compare/v0.1.8...v0.1.9)
|
|
22
|
+
|
|
23
|
+
### 🏡 Chore
|
|
24
|
+
|
|
25
|
+
- **form-elements:** Use nuxt's `useId` composable instead of the one from radix-vue ([17a952e](https://github.com/BayBreezy/ui-thing-cli/commit/17a952e))
|
|
26
|
+
- Bump deps ([557e58c](https://github.com/BayBreezy/ui-thing-cli/commit/557e58c))
|
|
27
|
+
|
|
28
|
+
### ❤️ Contributors
|
|
29
|
+
|
|
30
|
+
- Behon Baker <behon.baker@yahoo.com>
|
|
31
|
+
|
|
3
32
|
## v0.1.8
|
|
4
33
|
|
|
5
34
|
[compare changes](https://github.com/BayBreezy/ui-thing-cli/compare/v0.1.7...v0.1.8)
|
package/dist/index.js
CHANGED
|
@@ -2329,6 +2329,39 @@ export const buttonStyles = tv({
|
|
|
2329
2329
|
|
|
2330
2330
|
const props = defineProps<ContextMenuTriggerProps>();
|
|
2331
2331
|
</script>
|
|
2332
|
+
`}],utils:[],composables:[],plugins:[]},{name:"Currency Input",value:"currency-input",deps:["vue-currency-input"],files:[{fileName:"CurrencyInput.vue",dirPath:"components/UI",fileContent:`<template>
|
|
2333
|
+
<input ref="inputRef" type="text" :class="styles({ class: props.class })" v-bind="props" />
|
|
2334
|
+
</template>
|
|
2335
|
+
|
|
2336
|
+
<script lang="ts" setup>
|
|
2337
|
+
import { defu } from "defu";
|
|
2338
|
+
import { useCurrencyInput } from "vue-currency-input";
|
|
2339
|
+
import type { CurrencyInputOptions } from "vue-currency-input";
|
|
2340
|
+
|
|
2341
|
+
const props = defineProps<{
|
|
2342
|
+
class?: any;
|
|
2343
|
+
id?: string;
|
|
2344
|
+
name?: string;
|
|
2345
|
+
placeholder?: string;
|
|
2346
|
+
disabled?: boolean;
|
|
2347
|
+
required?: boolean;
|
|
2348
|
+
modelValue?: any;
|
|
2349
|
+
options?: CurrencyInputOptions;
|
|
2350
|
+
}>();
|
|
2351
|
+
|
|
2352
|
+
const { inputRef } = useCurrencyInput(
|
|
2353
|
+
defu({}, props.options, {
|
|
2354
|
+
currency: "USD",
|
|
2355
|
+
locale: "en-US",
|
|
2356
|
+
hideCurrencySymbolOnFocus: false,
|
|
2357
|
+
hideGroupingSeparatorOnFocus: false,
|
|
2358
|
+
})
|
|
2359
|
+
);
|
|
2360
|
+
|
|
2361
|
+
const styles = tv({
|
|
2362
|
+
base: "h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-[16px] ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground file:hover:cursor-pointer 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",
|
|
2363
|
+
});
|
|
2364
|
+
</script>
|
|
2332
2365
|
`}],utils:[],composables:[],plugins:[]},{name:"DataTables.net",value:"datatable",deps:["datatables.net-buttons-dt","datatables.net-responsive-dt","datatables.net-searchbuilder-dt","datatables.net-select-dt","datatables.net-vue3","jszip"],plugins:[{fileName:"datatables.client.ts",dirPath:"plugins",fileContent:`import DataTablesCore from "datatables.net";
|
|
2333
2366
|
import DataTable from "datatables.net-vue3";
|
|
2334
2367
|
import JSZip from "jszip";
|
|
@@ -3462,7 +3495,7 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
3462
3495
|
const localModel = defineModel<DateValue>();
|
|
3463
3496
|
|
|
3464
3497
|
const styles = tv({
|
|
3465
|
-
base: "
|
|
3498
|
+
base: "h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-[16px] ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground file:hover:cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[disabled]:cursor-not-allowed data-[invalid]:border-destructive data-[disabled]:opacity-50 sm:text-sm",
|
|
3466
3499
|
});
|
|
3467
3500
|
</script>
|
|
3468
3501
|
`}],utils:[],composables:[],plugins:[]},{name:"Datepicker",value:"datepicker",devDeps:["@samk-dev/nuxt-vcalendar"],nuxtModules:["@samk-dev/nuxt-vcalendar"],instructions:["You can customize the datepicker by adding options to your nuxt.config.js file"],files:[{fileName:"Datepicker.vue",dirPath:"components/UI",fileContent:`<template>
|
|
@@ -4702,8 +4735,6 @@ export function useFormField() {
|
|
|
4702
4735
|
</script>
|
|
4703
4736
|
|
|
4704
4737
|
<script lang="ts" setup>
|
|
4705
|
-
import { useId } from "radix-vue";
|
|
4706
|
-
|
|
4707
4738
|
defineOptions({ inheritAttrs: false });
|
|
4708
4739
|
|
|
4709
4740
|
const id = useId();
|
|
@@ -4917,7 +4948,7 @@ export function useFormField() {
|
|
|
4917
4948
|
const localModel = useVModel(props, "modelValue", emits);
|
|
4918
4949
|
|
|
4919
4950
|
const styles = tv({
|
|
4920
|
-
base: "
|
|
4951
|
+
base: "h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-[16px] ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground file:hover:cursor-pointer 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",
|
|
4921
4952
|
});
|
|
4922
4953
|
</script>
|
|
4923
4954
|
`}],utils:[],composables:[],plugins:[]},{name:"Keyboard Key",value:"kbd",files:[{fileName:"Kbd.vue",dirPath:"components/UI",fileContent:`<template>
|
|
@@ -5635,7 +5666,7 @@ export function useFormField() {
|
|
|
5635
5666
|
trailingIcon?: string;
|
|
5636
5667
|
}>();
|
|
5637
5668
|
const styles = tv({
|
|
5638
|
-
base: "
|
|
5669
|
+
base: "h-10 w-full appearance-none rounded-md border border-input bg-background px-3 py-2 pr-10 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",
|
|
5639
5670
|
});
|
|
5640
5671
|
|
|
5641
5672
|
const select = ref<HTMLSelectElement | null>(null);
|
|
@@ -8884,8 +8915,6 @@ export { toast, useToast };
|
|
|
8884
8915
|
</template>
|
|
8885
8916
|
|
|
8886
8917
|
<script lang="ts" setup>
|
|
8887
|
-
import { useId } from "radix-vue";
|
|
8888
|
-
|
|
8889
8918
|
const props = defineProps<{
|
|
8890
8919
|
label?: string;
|
|
8891
8920
|
icon?: string;
|
|
@@ -8906,9 +8935,7 @@ export { toast, useToast };
|
|
|
8906
8935
|
base: "flex gap-3",
|
|
8907
8936
|
});
|
|
8908
8937
|
|
|
8909
|
-
|
|
8910
|
-
|
|
8911
|
-
const inputId = useId(props.id);
|
|
8938
|
+
const inputId = props.id || useId();
|
|
8912
8939
|
|
|
8913
8940
|
const { errorMessage, checked, handleChange } = useField(
|
|
8914
8941
|
() => props.name || inputId,
|
|
@@ -8923,6 +8950,75 @@ export { toast, useToast };
|
|
|
8923
8950
|
}
|
|
8924
8951
|
);
|
|
8925
8952
|
</script>
|
|
8953
|
+
`}],utils:[],composables:[],plugins:[]},{name:"VeeCurrencyInput",value:"vee-currencyinput",deps:["@vee-validate/nuxt","@morev/vue-transitions"],askValidator:!0,nuxtModules:["@vee-validate/nuxt","@morev/vue-transitions/nuxt"],components:["currencyinput","label"],files:[{fileName:"Vee/CurrencyInput.vue",dirPath:"components/UI",fileContent:`<template>
|
|
8954
|
+
<div class="w-full">
|
|
8955
|
+
<UiLabel
|
|
8956
|
+
:for="inputId"
|
|
8957
|
+
v-if="label"
|
|
8958
|
+
:hint="labelHint"
|
|
8959
|
+
:class="[disabled && 'text-muted-foreground', errorMessage && 'text-destructive', 'mb-2']"
|
|
8960
|
+
>{{ label }}</UiLabel
|
|
8961
|
+
>
|
|
8962
|
+
<div class="relative">
|
|
8963
|
+
<slot name="icon">
|
|
8964
|
+
<span v-if="hasIcon" class="absolute inset-y-0 left-3 flex items-center justify-center">
|
|
8965
|
+
<Icon :name="icon" v-if="icon" class="h-4 w-4 text-muted-foreground/70" />
|
|
8966
|
+
</span>
|
|
8967
|
+
</slot>
|
|
8968
|
+
<UiCurrencyInput
|
|
8969
|
+
type="text"
|
|
8970
|
+
v-model="value"
|
|
8971
|
+
:id="inputId"
|
|
8972
|
+
:name="name"
|
|
8973
|
+
:disabled="disabled"
|
|
8974
|
+
v-bind="$attrs"
|
|
8975
|
+
:class="[hasIcon && 'pl-9']"
|
|
8976
|
+
:placeholder="placeholder"
|
|
8977
|
+
:options="options"
|
|
8978
|
+
/>
|
|
8979
|
+
</div>
|
|
8980
|
+
<TransitionSlide group tag="div">
|
|
8981
|
+
<p key="hint" class="mt-1.5 text-sm text-muted-foreground" v-if="hint && !errorMessage">
|
|
8982
|
+
{{ hint }}
|
|
8983
|
+
</p>
|
|
8984
|
+
|
|
8985
|
+
<p key="errorMessage" class="mt-1.5 text-sm text-destructive" v-if="errorMessage">
|
|
8986
|
+
{{ errorMessage }}
|
|
8987
|
+
</p>
|
|
8988
|
+
</TransitionSlide>
|
|
8989
|
+
</div>
|
|
8990
|
+
</template>
|
|
8991
|
+
|
|
8992
|
+
<script lang="ts" setup>
|
|
8993
|
+
import type { CurrencyInputOptions } from "vue-currency-input";
|
|
8994
|
+
|
|
8995
|
+
const props = defineProps<{
|
|
8996
|
+
label?: string;
|
|
8997
|
+
labelHint?: string;
|
|
8998
|
+
icon?: string;
|
|
8999
|
+
hint?: string;
|
|
9000
|
+
disabled?: boolean;
|
|
9001
|
+
modelValue?: string;
|
|
9002
|
+
name?: string;
|
|
9003
|
+
id?: string;
|
|
9004
|
+
rules?: any;
|
|
9005
|
+
validateOnMount?: boolean;
|
|
9006
|
+
type?: string;
|
|
9007
|
+
placeholder?: string;
|
|
9008
|
+
options?: CurrencyInputOptions;
|
|
9009
|
+
}>();
|
|
9010
|
+
|
|
9011
|
+
const inputId = useId();
|
|
9012
|
+
|
|
9013
|
+
const hasIcon = computed(() => Boolean(props.icon) || Boolean(useSlots().icon));
|
|
9014
|
+
|
|
9015
|
+
const { errorMessage, value } = useField(() => props.name || inputId, props.rules, {
|
|
9016
|
+
initialValue: props.modelValue,
|
|
9017
|
+
label: props.label,
|
|
9018
|
+
validateOnMount: props.validateOnMount,
|
|
9019
|
+
syncVModel: true,
|
|
9020
|
+
});
|
|
9021
|
+
</script>
|
|
8926
9022
|
`}],utils:[],composables:[],plugins:[]},{name:"VeeDatepicker",value:"vee-datepicker",deps:["@vee-validate/nuxt","@morev/vue-transitions"],askValidator:!0,nuxtModules:["@vee-validate/nuxt","@morev/vue-transitions/nuxt"],components:["datepicker","label","input"],files:[{fileName:"Vee/Datepicker.vue",dirPath:"components/UI",fileContent:`<template>
|
|
8927
9023
|
<div class="w-full">
|
|
8928
9024
|
<UiLabel
|
|
@@ -8971,8 +9067,6 @@ export { toast, useToast };
|
|
|
8971
9067
|
</template>
|
|
8972
9068
|
|
|
8973
9069
|
<script lang="ts" setup>
|
|
8974
|
-
import { useId } from "radix-vue";
|
|
8975
|
-
|
|
8976
9070
|
const props = withDefaults(
|
|
8977
9071
|
defineProps<{
|
|
8978
9072
|
label?: string;
|
|
@@ -8993,9 +9087,7 @@ export { toast, useToast };
|
|
|
8993
9087
|
}
|
|
8994
9088
|
);
|
|
8995
9089
|
|
|
8996
|
-
|
|
8997
|
-
|
|
8998
|
-
const inputId = useId(props.id);
|
|
9090
|
+
const inputId = props.id || useId();
|
|
8999
9091
|
|
|
9000
9092
|
const hasIcon = computed(() => Boolean(props.icon) || Boolean(useSlots().icon));
|
|
9001
9093
|
|
|
@@ -9048,8 +9140,6 @@ export { toast, useToast };
|
|
|
9048
9140
|
</template>
|
|
9049
9141
|
|
|
9050
9142
|
<script lang="ts" setup>
|
|
9051
|
-
import { useId } from "radix-vue";
|
|
9052
|
-
|
|
9053
9143
|
const props = defineProps<{
|
|
9054
9144
|
label?: string;
|
|
9055
9145
|
icon?: string;
|
|
@@ -9062,14 +9152,12 @@ export { toast, useToast };
|
|
|
9062
9152
|
accept?: string;
|
|
9063
9153
|
}>();
|
|
9064
9154
|
|
|
9065
|
-
defineOptions({ inheritAttrs: false });
|
|
9066
|
-
|
|
9067
9155
|
const emits = defineEmits<{
|
|
9068
9156
|
change: [files?: FileList | File | File[] | null];
|
|
9069
9157
|
blur: [event?: FocusEvent];
|
|
9070
9158
|
}>();
|
|
9071
9159
|
|
|
9072
|
-
const inputId =
|
|
9160
|
+
const inputId = props.id || useId();
|
|
9073
9161
|
|
|
9074
9162
|
const hasIcon = computed(() => Boolean(props.icon) || Boolean(useSlots().icon));
|
|
9075
9163
|
|
|
@@ -9118,8 +9206,6 @@ export { toast, useToast };
|
|
|
9118
9206
|
</template>
|
|
9119
9207
|
|
|
9120
9208
|
<script lang="ts" setup>
|
|
9121
|
-
import { useId } from "radix-vue";
|
|
9122
|
-
|
|
9123
9209
|
const props = defineProps<{
|
|
9124
9210
|
label?: string;
|
|
9125
9211
|
labelHint?: string;
|
|
@@ -9135,9 +9221,7 @@ export { toast, useToast };
|
|
|
9135
9221
|
placeholder?: string;
|
|
9136
9222
|
}>();
|
|
9137
9223
|
|
|
9138
|
-
|
|
9139
|
-
|
|
9140
|
-
const inputId = useId(props.id);
|
|
9224
|
+
const inputId = props.id || useId();
|
|
9141
9225
|
|
|
9142
9226
|
const hasIcon = computed(() => Boolean(props.icon) || Boolean(useSlots().icon));
|
|
9143
9227
|
|
|
@@ -9197,8 +9281,6 @@ export { toast, useToast };
|
|
|
9197
9281
|
|
|
9198
9282
|
import "@vueform/multiselect/themes/default.css";
|
|
9199
9283
|
|
|
9200
|
-
import { useId } from "radix-vue";
|
|
9201
|
-
|
|
9202
9284
|
const multiselect = shallowRef<InstanceType<typeof Multiselect> | null>(null);
|
|
9203
9285
|
|
|
9204
9286
|
interface Props
|
|
@@ -9238,9 +9320,7 @@ export { toast, useToast };
|
|
|
9238
9320
|
"ready",
|
|
9239
9321
|
]);
|
|
9240
9322
|
|
|
9241
|
-
|
|
9242
|
-
|
|
9243
|
-
const inputId = useId(props.id);
|
|
9323
|
+
const inputId = props.id || useId();
|
|
9244
9324
|
|
|
9245
9325
|
const { errorMessage, value } = useField(() => props.name || inputId, props.rules, {
|
|
9246
9326
|
initialValue: props.modelValue,
|
|
@@ -9354,7 +9434,6 @@ export { toast, useToast };
|
|
|
9354
9434
|
</template>
|
|
9355
9435
|
|
|
9356
9436
|
<script lang="ts" setup>
|
|
9357
|
-
import { useId } from "radix-vue";
|
|
9358
9437
|
import type { PinInputRootProps } from "radix-vue";
|
|
9359
9438
|
|
|
9360
9439
|
const props = defineProps<
|
|
@@ -9373,9 +9452,7 @@ export { toast, useToast };
|
|
|
9373
9452
|
complete: [value: string[]];
|
|
9374
9453
|
}>();
|
|
9375
9454
|
|
|
9376
|
-
|
|
9377
|
-
|
|
9378
|
-
const inputId = useId(props.id);
|
|
9455
|
+
const inputId = props.id || useId();
|
|
9379
9456
|
|
|
9380
9457
|
const { errorMessage, value } = useField(() => props.name || inputId, props.rules, {
|
|
9381
9458
|
initialValue: props.modelValue || [],
|
|
@@ -9489,8 +9566,6 @@ export { toast, useToast };
|
|
|
9489
9566
|
</template>
|
|
9490
9567
|
|
|
9491
9568
|
<script lang="ts" setup>
|
|
9492
|
-
import { useId } from "radix-vue";
|
|
9493
|
-
|
|
9494
9569
|
const props = defineProps<{
|
|
9495
9570
|
label?: string;
|
|
9496
9571
|
icon?: string;
|
|
@@ -9504,9 +9579,7 @@ export { toast, useToast };
|
|
|
9504
9579
|
trailingIcon?: string;
|
|
9505
9580
|
}>();
|
|
9506
9581
|
|
|
9507
|
-
|
|
9508
|
-
|
|
9509
|
-
const inputId = useId(props.id);
|
|
9582
|
+
const inputId = props.id || useId();
|
|
9510
9583
|
|
|
9511
9584
|
const hasIcon = computed(() => Boolean(props.icon) || Boolean(useSlots().icon));
|
|
9512
9585
|
|
|
@@ -9555,8 +9628,6 @@ export { toast, useToast };
|
|
|
9555
9628
|
</template>
|
|
9556
9629
|
|
|
9557
9630
|
<script lang="ts" setup>
|
|
9558
|
-
import { useId } from "radix-vue";
|
|
9559
|
-
|
|
9560
9631
|
const props = defineProps<{
|
|
9561
9632
|
label?: string;
|
|
9562
9633
|
icon?: string;
|
|
@@ -9571,9 +9642,7 @@ export { toast, useToast };
|
|
|
9571
9642
|
placeholder?: string;
|
|
9572
9643
|
}>();
|
|
9573
9644
|
|
|
9574
|
-
|
|
9575
|
-
|
|
9576
|
-
const inputId = useId(props.id);
|
|
9645
|
+
const inputId = props.id || useId();
|
|
9577
9646
|
|
|
9578
9647
|
const hasIcon = computed(() => Boolean(props.icon) || Boolean(useSlots().icon));
|
|
9579
9648
|
|
|
@@ -9619,8 +9688,6 @@ export { toast, useToast };
|
|
|
9619
9688
|
</template>
|
|
9620
9689
|
|
|
9621
9690
|
<script lang="ts" setup>
|
|
9622
|
-
import { useId } from "radix-vue";
|
|
9623
|
-
|
|
9624
9691
|
const props = defineProps<{
|
|
9625
9692
|
label?: string;
|
|
9626
9693
|
icon?: string;
|
|
@@ -9634,9 +9701,7 @@ export { toast, useToast };
|
|
|
9634
9701
|
rows?: number;
|
|
9635
9702
|
}>();
|
|
9636
9703
|
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
const inputId = useId(props.id);
|
|
9704
|
+
const inputId = props.id || useId();
|
|
9640
9705
|
|
|
9641
9706
|
const hasIcon = computed(() => Boolean(props.icon) || Boolean(useSlots().icon));
|
|
9642
9707
|
|