tera-system-ui 0.0.62 → 0.0.64
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/components/accordion/Accordion.d.ts +26 -0
- package/dist/components/accordion/Accordion.js +7 -0
- package/dist/components/accordion/components/AccordionContent.svelte +24 -0
- package/dist/components/accordion/components/AccordionContent.svelte.d.ts +3 -0
- package/dist/components/accordion/components/AccordionItem.svelte +12 -0
- package/dist/components/accordion/components/AccordionItem.svelte.d.ts +3 -0
- package/dist/components/accordion/components/AccordionTrigger.svelte +29 -0
- package/dist/components/accordion/components/AccordionTrigger.svelte.d.ts +5 -0
- package/dist/components/accordion/index.js +6 -0
- package/dist/components/input/Input.svelte.d.ts +1 -1
- package/dist/components/text-area/TextArea.svelte.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
export declare const styles: import("tailwind-variants").TVReturnType<{}, undefined, "", import("tailwind-variants/dist/config").TVConfig<{}, {}>, {}, undefined, import("tailwind-variants").TVReturnType<{}, undefined, "", import("tailwind-variants/dist/config").TVConfig<{}, {}>, unknown, unknown, undefined>>;
|
|
3
|
+
type AccordionVariants = VariantProps<typeof styles>;
|
|
4
|
+
export interface AccordionProps extends AccordionVariants {
|
|
5
|
+
children?: any;
|
|
6
|
+
class?: string;
|
|
7
|
+
type: 'multiple' | 'single';
|
|
8
|
+
value: string | string[];
|
|
9
|
+
onchange: (value: string | string[]) => void;
|
|
10
|
+
controlledValue?: boolean;
|
|
11
|
+
ref?: HTMLDivElement;
|
|
12
|
+
}
|
|
13
|
+
export interface AccordionItemProps {
|
|
14
|
+
value: string;
|
|
15
|
+
ref?: HTMLDivElement;
|
|
16
|
+
children?: any;
|
|
17
|
+
}
|
|
18
|
+
export interface AccordionTriggerProps {
|
|
19
|
+
children?: any;
|
|
20
|
+
ref?: HTMLButtonElement;
|
|
21
|
+
}
|
|
22
|
+
export interface AccordionContentProps {
|
|
23
|
+
children?: any;
|
|
24
|
+
ref?: HTMLDivElement;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Accordion as AccordionPrimitive, type WithoutChild } from "bits-ui";
|
|
3
|
+
import {cn} from "../../../utils";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithoutChild<AccordionPrimitive.ContentProps> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<AccordionPrimitive.Content
|
|
14
|
+
bind:ref
|
|
15
|
+
class={cn(
|
|
16
|
+
"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm transition-all",
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...restProps}
|
|
20
|
+
>
|
|
21
|
+
<div class="pb-4 pt-0">
|
|
22
|
+
{@render children?.()}
|
|
23
|
+
</div>
|
|
24
|
+
</AccordionPrimitive.Content>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Accordion as AccordionPrimitive } from "bits-ui";
|
|
3
|
+
import {cn} from "../../../utils";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: AccordionPrimitive.ItemProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<AccordionPrimitive.Item bind:ref class={cn("border-b", className)} {...restProps} />
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Accordion as AccordionPrimitive, type WithoutChild } from "bits-ui";
|
|
3
|
+
import { cn } from "../../../utils";
|
|
4
|
+
import {IconChevronDown} from "../../icons";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
level = 3,
|
|
10
|
+
children,
|
|
11
|
+
...restProps
|
|
12
|
+
}: WithoutChild<AccordionPrimitive.TriggerProps> & {
|
|
13
|
+
level?: AccordionPrimitive.HeaderProps["level"];
|
|
14
|
+
} = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<AccordionPrimitive.Header {level} class="flex">
|
|
18
|
+
<AccordionPrimitive.Trigger
|
|
19
|
+
bind:ref
|
|
20
|
+
class={cn(
|
|
21
|
+
"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
|
|
22
|
+
className
|
|
23
|
+
)}
|
|
24
|
+
{...restProps}
|
|
25
|
+
>
|
|
26
|
+
{@render children?.()}
|
|
27
|
+
<IconChevronDown class="size-4 shrink-0 transition-transform duration-200" />
|
|
28
|
+
</AccordionPrimitive.Trigger>
|
|
29
|
+
</AccordionPrimitive.Header>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Accordion as AccordionPrimitive } from "bits-ui";
|
|
2
|
+
declare const AccordionTrigger: import("svelte").Component<Omit<AccordionPrimitive.TriggerProps, "child"> & {
|
|
3
|
+
level?: AccordionPrimitive.HeaderProps["level"];
|
|
4
|
+
}, {}, "ref">;
|
|
5
|
+
export default AccordionTrigger;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Accordion as AccordionPrimitive } from "bits-ui";
|
|
2
|
+
const Accordion = AccordionPrimitive.Root;
|
|
3
|
+
export { Accordion };
|
|
4
|
+
export { default as AccordionItem } from "./components/AccordionItem.svelte";
|
|
5
|
+
export { default as AccordionContent } from "./components/AccordionContent.svelte";
|
|
6
|
+
export { default as AccordionTrigger } from "./components/AccordionTrigger.svelte";
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tera-system-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.64",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"build": "npm run customPrepublish && npm run generate-index && vite build && npm run package && npm run postpublish",
|
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
"@inlang/paraglide-sveltekit": "0.11.5",
|
|
103
103
|
"@tabler/icons-svelte": "^3.22.0",
|
|
104
104
|
"autoprefixer": "^10.4.20",
|
|
105
|
+
"bits-ui": "^1.0.0-next.65",
|
|
105
106
|
"clsx": "^2.1.1",
|
|
106
107
|
"tailwind-variants": "^0.3.0"
|
|
107
108
|
}
|