@rkosafo/cai.components 0.0.14 → 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/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/ui/box/Box.svelte +28 -0
- package/dist/ui/box/Box.svelte.d.ts +4 -0
- package/dist/ui/box/index.d.ts +1 -0
- package/dist/ui/box/index.js +1 -0
- package/dist/ui/drawer/theme.js +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export * from './ui/alertDialog/index.js';
|
|
|
23
23
|
export * from './ui/accordion/index.js';
|
|
24
24
|
export * from './ui/tab/index.js';
|
|
25
25
|
export * from './ui/icons/index.js';
|
|
26
|
+
export * from "./ui/box/index.js";
|
|
26
27
|
export * from './forms/input/index.js';
|
|
27
28
|
export * from './forms/label/index.js';
|
|
28
29
|
export * from './forms/datepicker/index.js';
|
package/dist/index.js
CHANGED
|
@@ -24,6 +24,7 @@ export * from './ui/alertDialog/index.js';
|
|
|
24
24
|
export * from './ui/accordion/index.js';
|
|
25
25
|
export * from './ui/tab/index.js';
|
|
26
26
|
export * from './ui/icons/index.js';
|
|
27
|
+
export * from "./ui/box/index.js";
|
|
27
28
|
export * from './forms/input/index.js';
|
|
28
29
|
export * from './forms/label/index.js';
|
|
29
30
|
export * from './forms/datepicker/index.js';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -772,3 +772,11 @@ export interface TabProps {
|
|
|
772
772
|
tabStyle?: TabsVaraints['tabStyle'];
|
|
773
773
|
divider?: boolean;
|
|
774
774
|
}
|
|
775
|
+
export interface BoxProps extends svelteHTML.HTMLAttributes<HTMLDivElement> {
|
|
776
|
+
children: any;
|
|
777
|
+
otherClasses?: string;
|
|
778
|
+
bgWhite?: boolean;
|
|
779
|
+
rounded?: boolean;
|
|
780
|
+
padding?: boolean;
|
|
781
|
+
shadow?: boolean;
|
|
782
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type BoxProps } from '../../index.js';
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
children,
|
|
6
|
+
otherClasses = '',
|
|
7
|
+
bgWhite = false,
|
|
8
|
+
rounded = false,
|
|
9
|
+
padding = false,
|
|
10
|
+
shadow = false,
|
|
11
|
+
...restProps
|
|
12
|
+
}: BoxProps = $props();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<div
|
|
16
|
+
{...restProps}
|
|
17
|
+
class={cn(
|
|
18
|
+
'scrollbar-thumb-blue scrollbar-thumb-rounded scrollbar-track-blue-lighter scrollbar-w-2 scrolling-touch h-full w-full overflow-y-auto ',
|
|
19
|
+
otherClasses
|
|
20
|
+
)}
|
|
21
|
+
class:rounded-[5px]={rounded}
|
|
22
|
+
class:bgWhite
|
|
23
|
+
class:p-6={padding}
|
|
24
|
+
class:shadow-sm={shadow}
|
|
25
|
+
class:shadow-gray-400={shadow}
|
|
26
|
+
>
|
|
27
|
+
{@render children()}
|
|
28
|
+
</div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Box } from './Box.svelte';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Box } from './Box.svelte';
|
package/dist/ui/drawer/theme.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { tv } from 'tailwind-variants';
|
|
2
2
|
export const drawer = tv({
|
|
3
3
|
slots: {
|
|
4
|
-
base: 'z-
|
|
5
|
-
backdrop: 'fixed top-0 start-0 z-
|
|
4
|
+
base: 'z-2200 bg-white dark:bg-gray-800',
|
|
5
|
+
backdrop: 'fixed top-0 start-0 z-2100 w-full h-full',
|
|
6
6
|
header: 'flex items-center justify-between rounded-t-lg shrink-0 text-xl font-semibold text-gray-900 dark:text-white px-4 py-2 border-b',
|
|
7
7
|
close: 'absolute top-3 end-2.5',
|
|
8
8
|
body: 'p-4 md:p-5 space-y-4',
|