@bl33dz/fa814698dcde12f86a37ac31dd3aedf9 1.0.4 → 1.0.6
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/dist/fa814698dcde12f86a37ac31dd3aedf9.css +1 -1
- package/dist/perisai-ui.es.js +1276 -1390
- package/dist/perisai-ui.umd.js +1 -1
- package/package.json +1 -1
- package/src/{global.css → globals.css} +3 -3
- package/src/index.ts +3 -5
- package/src/shadcn/spinner/Spinner.vue +17 -0
- package/src/shadcn/spinner/index.ts +1 -0
- package/src/ui/SelectGroup.vue +4 -14
- package/src/ui/SelectLabel.vue +9 -20
- package/src/ui/SelectSeparator.vue +11 -17
- package/src/ui/button.vue +1 -1
package/package.json
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@source "../src/**/*.{vue,js,ts,jsx,tsx,html}";
|
|
2
|
+
|
|
1
3
|
@custom-variant dark (&:is(.dark *));
|
|
2
4
|
|
|
3
5
|
:root {
|
|
@@ -216,7 +218,7 @@
|
|
|
216
218
|
0 0 0 1px rgba(255, 255, 255, 0.05);
|
|
217
219
|
}
|
|
218
220
|
|
|
219
|
-
@theme
|
|
221
|
+
@theme {
|
|
220
222
|
/* Base Theme Colors */
|
|
221
223
|
--color-background: var(--background);
|
|
222
224
|
--color-foreground: var(--foreground);
|
|
@@ -571,5 +573,3 @@ html {
|
|
|
571
573
|
.switch-thumb {
|
|
572
574
|
background-color: var(--switch-thumb) !important;
|
|
573
575
|
}
|
|
574
|
-
|
|
575
|
-
|
package/src/index.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
// Auto-generated — DO NOT EDIT MANUALLY
|
|
2
2
|
|
|
3
|
-
import './
|
|
3
|
+
import './globals.css'
|
|
4
4
|
|
|
5
5
|
// Default shadcn
|
|
6
6
|
export * from './shadcn/breadcrumb';
|
|
7
|
-
export * from './shadcn/accordion'
|
|
7
|
+
export * from './shadcn/accordion';
|
|
8
|
+
export * from './shadcn/spinner';
|
|
8
9
|
|
|
9
10
|
export { default as InputOTP } from './ui/InputOTP.vue';
|
|
10
11
|
export { default as InputOTPGroup } from './ui/InputOTPGroup.vue';
|
|
@@ -13,9 +14,6 @@ export { default as InputOTPSlot } from './ui/InputOTPSlot.vue';
|
|
|
13
14
|
export { default as PopoverContent } from './ui/PopoverContent.vue';
|
|
14
15
|
export { default as PopoverTrigger } from './ui/PopoverTrigger.vue';
|
|
15
16
|
export { default as SelectContent } from './ui/SelectContent.vue';
|
|
16
|
-
export { default as SelectGroup } from './ui/SelectGroup.vue';
|
|
17
|
-
export { default as SelectItem } from './ui/SelectItem.vue';
|
|
18
|
-
export { default as SelectLabel } from './ui/SelectLabel.vue';
|
|
19
17
|
export { default as SelectSeparator } from './ui/SelectSeparator.vue';
|
|
20
18
|
export { default as SelectTrigger } from './ui/SelectTrigger.vue';
|
|
21
19
|
export { default as SelectValue } from './ui/SelectValue.vue';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { Loader2Icon } from "lucide-vue-next"
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{
|
|
7
|
+
class?: HTMLAttributes["class"]
|
|
8
|
+
}>()
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<Loader2Icon
|
|
13
|
+
role="status"
|
|
14
|
+
aria-label="Loading"
|
|
15
|
+
:class="cn('size-4 animate-spin', props.class)"
|
|
16
|
+
/>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Spinner } from "./Spinner.vue"
|
package/src/ui/SelectGroup.vue
CHANGED
|
@@ -1,22 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
let SelectPrimitiveGroup: any = null;
|
|
4
|
-
try {
|
|
5
|
-
SelectPrimitiveGroup = defineAsyncComponent(() => import('shadcn-vue').then(m => m.SelectGroup));
|
|
6
|
-
} catch (e) {
|
|
7
|
-
SelectPrimitiveGroup = null;
|
|
8
|
-
}
|
|
2
|
+
import { SelectGroup as RekaSelectGroup } from "reka-ui"
|
|
9
3
|
</script>
|
|
4
|
+
|
|
10
5
|
<template>
|
|
11
|
-
<
|
|
12
|
-
v-if="SelectPrimitiveGroup"
|
|
13
|
-
:is="SelectPrimitiveGroup"
|
|
6
|
+
<RekaSelectGroup
|
|
14
7
|
data-slot="select-group"
|
|
15
8
|
v-bind="$attrs"
|
|
16
9
|
>
|
|
17
10
|
<slot />
|
|
18
|
-
</
|
|
19
|
-
<div v-else data-slot="select-group" v-bind="$attrs">
|
|
20
|
-
<slot />
|
|
21
|
-
</div>
|
|
11
|
+
</RekaSelectGroup>
|
|
22
12
|
</template>
|
package/src/ui/SelectLabel.vue
CHANGED
|
@@ -1,27 +1,16 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import {
|
|
3
|
-
import { cn } from
|
|
4
|
-
|
|
5
|
-
try {
|
|
6
|
-
SelectPrimitiveLabel = defineAsyncComponent(() => import('shadcn-vue').then(m => m.SelectLabel));
|
|
7
|
-
} catch (e) {
|
|
8
|
-
SelectPrimitiveLabel = null;
|
|
9
|
-
}
|
|
10
|
-
defineProps({
|
|
11
|
-
class: String,
|
|
12
|
-
});
|
|
1
|
+
<script setup>
|
|
2
|
+
import { SelectLabel } from "reka-ui"
|
|
3
|
+
import { cn } from "./utils"
|
|
4
|
+
const props = defineProps({ class: String })
|
|
13
5
|
</script>
|
|
6
|
+
|
|
14
7
|
<template>
|
|
15
|
-
<
|
|
16
|
-
v-if="SelectPrimitiveLabel"
|
|
17
|
-
:is="SelectPrimitiveLabel"
|
|
8
|
+
<SelectLabel
|
|
18
9
|
data-slot="select-label"
|
|
19
|
-
:class="cn('text-muted-foreground px-2 py-1.5 text-xs',
|
|
10
|
+
:class="cn('text-muted-foreground px-2 py-1.5 text-xs', props.class)"
|
|
20
11
|
v-bind="$attrs"
|
|
21
12
|
>
|
|
22
13
|
<slot />
|
|
23
|
-
</
|
|
24
|
-
<div v-else data-slot="select-label" :class="cn('text-muted-foreground px-2 py-1.5 text-xs', $props.class)" v-bind="$attrs">
|
|
25
|
-
<slot />
|
|
26
|
-
</div>
|
|
14
|
+
</SelectLabel>
|
|
27
15
|
</template>
|
|
16
|
+
|
|
@@ -1,23 +1,17 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import {
|
|
3
|
-
import { cn } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
SelectPrimitiveSeparator = null;
|
|
9
|
-
}
|
|
10
|
-
defineProps({
|
|
11
|
-
class: String,
|
|
12
|
-
});
|
|
1
|
+
<script setup>
|
|
2
|
+
import { SelectSeparator } from "reka-ui"
|
|
3
|
+
import { cn } from "./utils"
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
class: String
|
|
7
|
+
})
|
|
13
8
|
</script>
|
|
9
|
+
|
|
14
10
|
<template>
|
|
15
|
-
<
|
|
16
|
-
v-if="SelectPrimitiveSeparator"
|
|
17
|
-
:is="SelectPrimitiveSeparator"
|
|
11
|
+
<SelectSeparator
|
|
18
12
|
data-slot="select-separator"
|
|
19
|
-
:class="cn('bg-border pointer-events-none -mx-1 my-1 h-px',
|
|
13
|
+
:class="cn('bg-border pointer-events-none -mx-1 my-1 h-px', props.class)"
|
|
20
14
|
v-bind="$attrs"
|
|
21
15
|
/>
|
|
22
|
-
<div v-else data-slot="select-separator" :class="cn('bg-border pointer-events-none -mx-1 my-1 h-px', $props.class)" v-bind="$attrs" />
|
|
23
16
|
</template>
|
|
17
|
+
|
package/src/ui/button.vue
CHANGED
|
@@ -42,7 +42,7 @@ const props = defineProps({
|
|
|
42
42
|
const $attrs = useAttrs();
|
|
43
43
|
const emit = defineEmits(['click']);
|
|
44
44
|
|
|
45
|
-
const baseClass = 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4 shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive';
|
|
45
|
+
const baseClass = 'cursor-pointer inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4 shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive';
|
|
46
46
|
|
|
47
47
|
const variantClass = computed(() => {
|
|
48
48
|
switch (props.variant) {
|