@bl33dz/fa814698dcde12f86a37ac31dd3aedf9 1.0.14 → 1.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
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.0.14",
6
+ "version": "1.0.16",
7
7
  "main": "dist/perisai-ui.umd.js",
8
8
  "module": "dist/perisai-ui.es.js",
9
9
  "scripts": {
@@ -29,7 +29,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
29
29
  v-bind="forwarded"
30
30
  :class="
31
31
  cn(
32
- 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border shadow-lg duration-200 sm:max-w-lg',
32
+ 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] rounded-lg border shadow-lg duration-200 sm:max-w-lg',
33
33
  props.class,
34
34
  )"
35
35
  >
package/src/ui/button.vue CHANGED
@@ -53,7 +53,7 @@ const variantClass = computed(() => {
53
53
  case 'secondary':
54
54
  return 'bg-secondary text-secondary-foreground hover:bg-secondary/80';
55
55
  case 'ghost':
56
- return 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50';
56
+ return 'hover:bg-accent hover:text-accent-foreground';
57
57
  case 'link':
58
58
  return 'text-primary underline-offset-4 hover:underline';
59
59
  default:
@@ -1,11 +1,9 @@
1
-
2
-
3
1
  <template>
4
2
  <div v-if="label" class="space-y-2">
5
3
  <div class="flex items-center space-x-2">
6
4
  <span class="relative flex items-center">
7
5
  <input
8
- id="with-label"
6
+ :id="computedId"
9
7
  data-slot="checkbox"
10
8
  type="checkbox"
11
9
  :checked="modelValue"
@@ -19,7 +17,7 @@
19
17
  <CheckIcon class="h-3.5 w-3.5" />
20
18
  </span>
21
19
  </span>
22
- <Label htmlFor="with-label">{{ label }}</Label>
20
+ <Label :for="computedId">{{ label }}</Label>
23
21
  </div>
24
22
  <p v-if="validationState === 'success' && validationText" class="text-sm text-green-600 flex items-center gap-1">
25
23
  <CheckIcon class="h-4 w-4" />
@@ -76,9 +74,9 @@ const props = defineProps({
76
74
  const computedId = computed(() => props.id || `checkbox-${Math.random().toString(36).substr(2, 9)}`);
77
75
 
78
76
  const checkboxClass = computed(() => [
79
- 'peer border bg-input-background dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',
80
- props.validationState === 'error' ? 'border-red-500 data-[state=checked]:bg-red-500' : '',
81
- props.validationState === 'success' ? 'border-green-500 data-[state=checked]:bg-green-500' : '',
77
+ 'peer appearance-none border bg-input-background dark:bg-input/30 checked:bg-primary checked:text-primary-foreground dark:checked:bg-primary checked:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',
78
+ props.validationState === 'error' ? 'border-red-500 checked:bg-red-500 checked:border-red-500' : '',
79
+ props.validationState === 'success' ? 'border-green-500 checked:bg-green-500 checked:border-green-500' : '',
82
80
  props.class,
83
81
  ]);
84
82
  </script>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div
3
3
  data-slot="dialog-body"
4
- :class="['p-4 space-y-4', $attrs.class]"
4
+ :class="['px-6 py-5 space-y-6 [&>*+*]:border-t [&>*+*]:border-border [&>*+*]:pt-5', $attrs.class]"
5
5
  v-bind="$attrs"
6
6
  >
7
7
  <slot />
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <DialogContent data-slot="dialog-content" :class="[
3
- 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] rounded-lg border shadow-lg duration-200 sm:max-w-lg',
3
+ 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-100 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] rounded-lg border border-border shadow-lg duration-200 sm:max-w-lg',
4
4
  dialogSizeVariants[size],
5
5
  $attrs.class
6
6
  ]" v-bind="$attrs">
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div
3
3
  data-slot="dialog-footer"
4
- :class="['flex flex-col-reverse gap-2 sm:flex-row sm:justify-end border-t p-2', $attrs.class]"
4
+ :class="['flex flex-col-reverse gap-2 sm:flex-row sm:justify-end border-t border-border px-6 py-4', $attrs.class]"
5
5
  v-bind="$attrs"
6
6
  >
7
7
  <slot />
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div
3
3
  data-slot="dialog-header"
4
- :class="['flex flex-col gap-2 text-center pl-4 py-4 pr-5 sm:text-left border-b', $attrs.class]"
4
+ :class="['flex flex-col gap-2 text-center px-6 py-5 sm:text-left border-b border-border', $attrs.class]"
5
5
  v-bind="$attrs"
6
6
  >
7
7
  <slot />
@@ -8,7 +8,7 @@
8
8
  :id="id"
9
9
  data-slot="textarea"
10
10
  :class="cn(
11
- 'resize-none border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-md border bg-input-background px-3 py-2 text-base transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
11
+ 'resize-none border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-md border bg-input-background text-base transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
12
12
  validationState === 'error' && 'border-red-500 focus:border-red-500 focus:ring-red-500',
13
13
  validationState === 'success' && 'border-green-500 focus:border-green-500 focus:ring-green-500',
14
14
  $attrs.class
@@ -32,7 +32,7 @@
32
32
  v-else
33
33
  data-slot="textarea"
34
34
  :class="cn(
35
- 'resize-none border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-md border bg-input-background px-3 py-2 text-base transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
35
+ 'resize-none border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-md border bg-input-background text-base transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
36
36
  $attrs.class
37
37
  )"
38
38
  v-bind="$attrs"