@skeletonlabs/skeleton-react 2.0.0-next.2 → 2.0.0-next.4
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/anatomy/content.d.ts +11 -0
- package/dist/components/accordion/anatomy/content.js +21 -0
- package/dist/components/accordion/anatomy/heading.d.ts +18 -0
- package/dist/components/accordion/anatomy/heading.js +17 -0
- package/dist/components/accordion/anatomy/indicator.d.ts +11 -0
- package/dist/components/accordion/anatomy/indicator.js +21 -0
- package/dist/components/accordion/anatomy/item.d.ts +11 -0
- package/dist/components/accordion/anatomy/item.js +25 -0
- package/dist/components/accordion/anatomy/root-context.d.ts +10 -0
- package/dist/components/accordion/anatomy/root-context.js +12 -0
- package/dist/components/accordion/anatomy/root-provider.d.ts +11 -0
- package/dist/components/accordion/anatomy/root.d.ts +10 -0
- package/dist/components/accordion/anatomy/root.js +24 -0
- package/dist/components/accordion/anatomy/trigger.d.ts +11 -0
- package/dist/components/accordion/anatomy/trigger.js +21 -0
- package/dist/components/accordion/index.js +2 -1
- package/dist/components/accordion/modules/anatomy.d.ts +19 -0
- package/dist/components/accordion/modules/anatomy.js +20 -0
- package/dist/components/accordion/modules/{accordion-item-context.js → item-context.js} +1 -1
- package/dist/components/accordion/modules/root-context.js +7 -0
- package/dist/components/accordion/modules/use-accordion.d.ts +8 -0
- package/dist/components/accordion/modules/use-accordion.js +15 -0
- package/dist/components/avatar/anatomy/fallback.d.ts +10 -0
- package/dist/components/avatar/anatomy/fallback.js +19 -0
- package/dist/components/avatar/anatomy/image.d.ts +10 -0
- package/dist/components/avatar/anatomy/image.js +16 -0
- package/dist/components/avatar/anatomy/root-context.d.ts +10 -0
- package/dist/components/avatar/anatomy/root-context.js +12 -0
- package/dist/components/avatar/anatomy/root-provider.d.ts +11 -0
- package/dist/components/avatar/anatomy/root.d.ts +10 -0
- package/dist/components/avatar/anatomy/root.js +24 -0
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/avatar/modules/anatomy.d.ts +13 -0
- package/dist/components/avatar/modules/anatomy.js +14 -0
- package/dist/components/avatar/modules/root-context.js +7 -0
- package/dist/components/avatar/modules/use-avatar.d.ts +8 -0
- package/dist/components/avatar/modules/use-avatar.js +15 -0
- package/dist/components/progress-linear/anatomy/label.d.ts +10 -0
- package/dist/components/progress-linear/anatomy/label.js +19 -0
- package/dist/components/progress-linear/anatomy/range.d.ts +10 -0
- package/dist/components/progress-linear/anatomy/range.js +16 -0
- package/dist/components/progress-linear/anatomy/root-context.d.ts +10 -0
- package/dist/components/progress-linear/anatomy/root-context.js +12 -0
- package/dist/components/progress-linear/anatomy/root-provider.d.ts +12 -0
- package/dist/components/progress-linear/anatomy/root-provider.js +20 -0
- package/dist/components/progress-linear/anatomy/root.d.ts +10 -0
- package/dist/components/progress-linear/anatomy/root.js +24 -0
- package/dist/components/progress-linear/anatomy/track.d.ts +10 -0
- package/dist/components/progress-linear/anatomy/track.js +19 -0
- package/dist/components/progress-linear/index.js +4 -0
- package/dist/components/progress-linear/modules/anatomy.d.ts +17 -0
- package/dist/components/progress-linear/modules/anatomy.js +18 -0
- package/dist/components/progress-linear/modules/root-context.js +7 -0
- package/dist/components/progress-linear/modules/use-progress-linear.d.ts +8 -0
- package/dist/components/progress-linear/modules/use-progress-linear.js +15 -0
- package/dist/components/rating-group/anatomy/control.d.ts +10 -0
- package/dist/components/rating-group/anatomy/control.js +19 -0
- package/dist/components/rating-group/anatomy/hidden-input.d.ts +10 -0
- package/dist/components/rating-group/anatomy/hidden-input.js +16 -0
- package/dist/components/rating-group/anatomy/item.d.ts +31 -0
- package/dist/components/rating-group/anatomy/item.js +25 -0
- package/dist/components/rating-group/anatomy/label.d.ts +10 -0
- package/dist/components/rating-group/anatomy/label.js +19 -0
- package/dist/components/rating-group/anatomy/root-context.d.ts +10 -0
- package/dist/components/rating-group/anatomy/root-context.js +12 -0
- package/dist/components/rating-group/anatomy/root-provider.d.ts +12 -0
- package/dist/components/rating-group/anatomy/root-provider.js +20 -0
- package/dist/components/rating-group/anatomy/root.d.ts +10 -0
- package/dist/components/rating-group/anatomy/root.js +24 -0
- package/dist/components/rating-group/index.js +2 -1
- package/dist/components/rating-group/modules/anatomy.d.ts +19 -0
- package/dist/components/rating-group/modules/anatomy.js +20 -0
- package/dist/components/rating-group/modules/root-context.js +7 -0
- package/dist/components/rating-group/modules/use-rating-group.d.ts +8 -0
- package/dist/components/rating-group/modules/use-rating-group.js +15 -0
- package/dist/components/switch/anatomy/control.d.ts +10 -0
- package/dist/components/switch/anatomy/control.js +19 -0
- package/dist/components/switch/anatomy/hidden-input.d.ts +10 -0
- package/dist/components/switch/anatomy/hidden-input.js +16 -0
- package/dist/components/switch/anatomy/label.d.ts +10 -0
- package/dist/components/switch/anatomy/label.js +19 -0
- package/dist/components/switch/anatomy/root-context.d.ts +10 -0
- package/dist/components/switch/anatomy/root-context.js +12 -0
- package/dist/components/switch/anatomy/root-provider.d.ts +11 -0
- package/dist/components/switch/anatomy/root.d.ts +10 -0
- package/dist/components/switch/anatomy/root.js +24 -0
- package/dist/components/switch/anatomy/thumb.d.ts +10 -0
- package/dist/components/switch/anatomy/thumb.js +19 -0
- package/dist/components/switch/index.js +4 -0
- package/dist/components/switch/modules/anatomy.d.ts +17 -0
- package/dist/components/switch/modules/anatomy.js +18 -0
- package/dist/components/switch/modules/root-context.js +7 -0
- package/dist/components/switch/modules/use-switch.d.ts +8 -0
- package/dist/components/switch/modules/use-switch.js +15 -0
- package/dist/components/tabs/anatomy/content.d.ts +11 -0
- package/dist/components/tabs/anatomy/content.js +21 -0
- package/dist/components/tabs/anatomy/indicator.d.ts +10 -0
- package/dist/components/tabs/anatomy/indicator.js +16 -0
- package/dist/components/tabs/anatomy/list.d.ts +10 -0
- package/dist/components/tabs/anatomy/list.js +19 -0
- package/dist/components/tabs/anatomy/root-context.d.ts +10 -0
- package/dist/components/tabs/anatomy/root-context.js +12 -0
- package/dist/components/tabs/anatomy/root-provider.d.ts +12 -0
- package/dist/components/tabs/anatomy/root-provider.js +20 -0
- package/dist/components/tabs/anatomy/root.d.ts +10 -0
- package/dist/components/tabs/anatomy/root.js +24 -0
- package/dist/components/tabs/anatomy/trigger.d.ts +11 -0
- package/dist/components/tabs/anatomy/trigger.js +21 -0
- package/dist/components/tabs/index.js +2 -1
- package/dist/components/tabs/modules/anatomy.d.ts +19 -0
- package/dist/components/tabs/modules/anatomy.js +20 -0
- package/dist/components/tabs/modules/root-context.js +7 -0
- package/dist/components/tabs/modules/use-tabs.d.ts +8 -0
- package/dist/components/tabs/modules/use-tabs.js +15 -0
- package/dist/components/toast/anatomy/action-trigger.d.ts +10 -0
- package/dist/components/toast/anatomy/action-trigger.js +19 -0
- package/dist/components/toast/anatomy/close-trigger.d.ts +10 -0
- package/dist/components/toast/anatomy/close-trigger.js +20 -0
- package/dist/components/toast/anatomy/description.d.ts +10 -0
- package/dist/components/toast/anatomy/description.js +19 -0
- package/dist/components/toast/anatomy/group.d.ts +14 -0
- package/dist/components/toast/anatomy/group.js +27 -0
- package/dist/components/toast/anatomy/message.d.ts +10 -0
- package/dist/components/toast/anatomy/message.js +16 -0
- package/dist/components/toast/anatomy/root-context.d.ts +10 -0
- package/dist/components/toast/anatomy/root-context.js +12 -0
- package/dist/components/toast/anatomy/root.d.ts +12 -0
- package/dist/components/toast/anatomy/root.js +57 -0
- package/dist/components/toast/anatomy/title.d.ts +10 -0
- package/dist/components/toast/anatomy/title.js +19 -0
- package/dist/components/toast/index.d.ts +10 -0
- package/dist/components/toast/index.js +4 -0
- package/dist/components/toast/modules/anatomy.d.ts +21 -0
- package/dist/components/toast/modules/anatomy.js +22 -0
- package/dist/components/toast/modules/group-context.js +7 -0
- package/dist/components/toast/modules/root-context.js +7 -0
- package/dist/index.d.ts +60 -36
- package/dist/index.js +16 -5
- package/dist/internal/components/x.js +20 -0
- package/dist/internal/create-context.js +9 -0
- package/dist/internal/html-attributes.d.ts +6 -0
- package/dist/internal/props-with-element.d.ts +4 -5
- package/package.json +15 -15
- package/dist/components/accordion/anatomy/accordion-content.d.ts +0 -9
- package/dist/components/accordion/anatomy/accordion-content.js +0 -24
- package/dist/components/accordion/anatomy/accordion-heading.d.ts +0 -16
- package/dist/components/accordion/anatomy/accordion-heading.js +0 -17
- package/dist/components/accordion/anatomy/accordion-indicator.d.ts +0 -9
- package/dist/components/accordion/anatomy/accordion-indicator.js +0 -21
- package/dist/components/accordion/anatomy/accordion-item-context.d.ts +0 -10
- package/dist/components/accordion/anatomy/accordion-item-context.js +0 -11
- package/dist/components/accordion/anatomy/accordion-item.d.ts +0 -10
- package/dist/components/accordion/anatomy/accordion-item.js +0 -28
- package/dist/components/accordion/anatomy/accordion-root-context.d.ts +0 -10
- package/dist/components/accordion/anatomy/accordion-root-context.js +0 -11
- package/dist/components/accordion/anatomy/accordion-root.d.ts +0 -10
- package/dist/components/accordion/anatomy/accordion-root.js +0 -28
- package/dist/components/accordion/anatomy/accordion-trigger.d.ts +0 -9
- package/dist/components/accordion/anatomy/accordion-trigger.js +0 -21
- package/dist/components/accordion/modules/accordion-anatomy.d.ts +0 -21
- package/dist/components/accordion/modules/accordion-anatomy.js +0 -22
- package/dist/components/accordion/modules/accordion-item-context.d.ts +0 -10
- package/dist/components/accordion/modules/accordion-root-context.d.ts +0 -9
- package/dist/components/accordion/modules/accordion-root-context.js +0 -7
- package/dist/components/avatar/anatomy/avatar-fallback.d.ts +0 -9
- package/dist/components/avatar/anatomy/avatar-fallback.js +0 -22
- package/dist/components/avatar/anatomy/avatar-image.d.ts +0 -9
- package/dist/components/avatar/anatomy/avatar-image.js +0 -19
- package/dist/components/avatar/anatomy/avatar-root-context.d.ts +0 -10
- package/dist/components/avatar/anatomy/avatar-root-context.js +0 -11
- package/dist/components/avatar/anatomy/avatar-root.d.ts +0 -10
- package/dist/components/avatar/anatomy/avatar-root.js +0 -31
- package/dist/components/avatar/modules/avatar-anatomy.d.ts +0 -13
- package/dist/components/avatar/modules/avatar-anatomy.js +0 -14
- package/dist/components/avatar/modules/avatar-root-context.d.ts +0 -9
- package/dist/components/avatar/modules/avatar-root-context.js +0 -7
- package/dist/components/rating-group/anatomy/rating-group-control.d.ts +0 -9
- package/dist/components/rating-group/anatomy/rating-group-control.js +0 -19
- package/dist/components/rating-group/anatomy/rating-group-hidden-input.d.ts +0 -9
- package/dist/components/rating-group/anatomy/rating-group-hidden-input.js +0 -16
- package/dist/components/rating-group/anatomy/rating-group-item-context.d.ts +0 -10
- package/dist/components/rating-group/anatomy/rating-group-item-context.js +0 -11
- package/dist/components/rating-group/anatomy/rating-group-item.d.ts +0 -29
- package/dist/components/rating-group/anatomy/rating-group-item.js +0 -29
- package/dist/components/rating-group/anatomy/rating-group-label.d.ts +0 -9
- package/dist/components/rating-group/anatomy/rating-group-label.js +0 -19
- package/dist/components/rating-group/anatomy/rating-group-root-context.d.ts +0 -10
- package/dist/components/rating-group/anatomy/rating-group-root-context.js +0 -11
- package/dist/components/rating-group/anatomy/rating-group-root.d.ts +0 -10
- package/dist/components/rating-group/anatomy/rating-group-root.js +0 -28
- package/dist/components/rating-group/modules/rating-group-anatomy.d.ts +0 -19
- package/dist/components/rating-group/modules/rating-group-anatomy.js +0 -20
- package/dist/components/rating-group/modules/rating-group-item-context.d.ts +0 -9
- package/dist/components/rating-group/modules/rating-group-item-context.js +0 -7
- package/dist/components/rating-group/modules/rating-group-root-context.d.ts +0 -9
- package/dist/components/rating-group/modules/rating-group-root-context.js +0 -7
- package/dist/components/tabs/anatomy/tabs-content.d.ts +0 -10
- package/dist/components/tabs/anatomy/tabs-content.js +0 -21
- package/dist/components/tabs/anatomy/tabs-indicator.d.ts +0 -9
- package/dist/components/tabs/anatomy/tabs-indicator.js +0 -16
- package/dist/components/tabs/anatomy/tabs-list.d.ts +0 -9
- package/dist/components/tabs/anatomy/tabs-list.js +0 -19
- package/dist/components/tabs/anatomy/tabs-root-context.d.ts +0 -10
- package/dist/components/tabs/anatomy/tabs-root-context.js +0 -11
- package/dist/components/tabs/anatomy/tabs-root.d.ts +0 -10
- package/dist/components/tabs/anatomy/tabs-root.js +0 -28
- package/dist/components/tabs/anatomy/tabs-trigger.d.ts +0 -10
- package/dist/components/tabs/anatomy/tabs-trigger.js +0 -21
- package/dist/components/tabs/modules/tabs-anatomy.d.ts +0 -17
- package/dist/components/tabs/modules/tabs-anatomy.js +0 -18
- package/dist/components/tabs/modules/tabs-root-context.d.ts +0 -9
- package/dist/components/tabs/modules/tabs-root-context.js +0 -7
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HTMLAttributes } from "../../../internal/html-attributes.js";
|
|
2
|
+
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
3
|
+
import * as react82 from "react";
|
|
4
|
+
import { PropsWithChildren } from "react";
|
|
5
|
+
import * as react_jsx_runtime27 from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/accordion/anatomy/content.d.ts
|
|
8
|
+
interface AccordionContentProps extends PropsWithChildren, PropsWithElement<'div'>, HTMLAttributes<'div'> {}
|
|
9
|
+
declare function export_default(props: AccordionContentProps): string | number | bigint | boolean | Iterable<react82.ReactNode> | Promise<string | number | bigint | boolean | react82.ReactPortal | react82.ReactElement<unknown, string | react82.JSXElementConstructor<any>> | Iterable<react82.ReactNode> | null | undefined> | react_jsx_runtime27.JSX.Element | null | undefined;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { AccordionContentProps, export_default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AccordionRootContext } from "../modules/root-context.js";
|
|
2
|
+
import { AccordionItemContext } from "../modules/item-context.js";
|
|
3
|
+
import { mergeProps } from "@zag-js/react";
|
|
4
|
+
import { classesAccordion } from "@skeletonlabs/skeleton-common";
|
|
5
|
+
import { useContext } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/components/accordion/anatomy/content.tsx
|
|
9
|
+
function content_default(props) {
|
|
10
|
+
const accordion = useContext(AccordionRootContext);
|
|
11
|
+
const itemProps = useContext(AccordionItemContext);
|
|
12
|
+
const { element, children,...rest } = props;
|
|
13
|
+
const attributes = mergeProps(accordion.getItemContentProps(itemProps), rest, { className: classesAccordion.content });
|
|
14
|
+
return element ? element(attributes) : /* @__PURE__ */ jsx("div", {
|
|
15
|
+
...attributes,
|
|
16
|
+
children
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { content_default as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HTMLAttributes } from "../../../internal/html-attributes.js";
|
|
2
|
+
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
3
|
+
import * as react72 from "react";
|
|
4
|
+
import { PropsWithChildren } from "react";
|
|
5
|
+
import * as react_jsx_runtime24 from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/accordion/anatomy/heading.d.ts
|
|
8
|
+
interface AccordionHeadingProps extends PropsWithChildren, PropsWithElement<'h3'>, HTMLAttributes<'h3'> {
|
|
9
|
+
/**
|
|
10
|
+
* The level of the heading.
|
|
11
|
+
*
|
|
12
|
+
* @default 3
|
|
13
|
+
*/
|
|
14
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
15
|
+
}
|
|
16
|
+
declare function export_default(props: AccordionHeadingProps): string | number | bigint | boolean | Iterable<react72.ReactNode> | Promise<string | number | bigint | boolean | react72.ReactPortal | react72.ReactElement<unknown, string | react72.JSXElementConstructor<any>> | Iterable<react72.ReactNode> | null | undefined> | react_jsx_runtime24.JSX.Element | null | undefined;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { AccordionHeadingProps, export_default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { mergeProps } from "@zag-js/react";
|
|
2
|
+
import { classesAccordion } from "@skeletonlabs/skeleton-common";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/accordion/anatomy/heading.tsx
|
|
6
|
+
function heading_default(props) {
|
|
7
|
+
const { level = 3, element, children,...rest } = props;
|
|
8
|
+
const Tag = `h${level}`;
|
|
9
|
+
const attributes = mergeProps(rest, { className: classesAccordion.heading });
|
|
10
|
+
return element ? element(attributes) : /* @__PURE__ */ jsx(Tag, {
|
|
11
|
+
...attributes,
|
|
12
|
+
children
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { heading_default as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HTMLAttributes } from "../../../internal/html-attributes.js";
|
|
2
|
+
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
3
|
+
import * as react87 from "react";
|
|
4
|
+
import { PropsWithChildren } from "react";
|
|
5
|
+
import * as react_jsx_runtime28 from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/accordion/anatomy/indicator.d.ts
|
|
8
|
+
interface AccordionIndicatorProps extends PropsWithChildren, PropsWithElement<'div'>, HTMLAttributes<'div'> {}
|
|
9
|
+
declare function export_default(props: AccordionIndicatorProps): string | number | bigint | boolean | Iterable<react87.ReactNode> | Promise<string | number | bigint | boolean | react87.ReactPortal | react87.ReactElement<unknown, string | react87.JSXElementConstructor<any>> | Iterable<react87.ReactNode> | null | undefined> | react_jsx_runtime28.JSX.Element | null | undefined;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { AccordionIndicatorProps, export_default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AccordionRootContext } from "../modules/root-context.js";
|
|
2
|
+
import { AccordionItemContext } from "../modules/item-context.js";
|
|
3
|
+
import { mergeProps } from "@zag-js/react";
|
|
4
|
+
import { classesAccordion } from "@skeletonlabs/skeleton-common";
|
|
5
|
+
import { useContext } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/components/accordion/anatomy/indicator.tsx
|
|
9
|
+
function indicator_default(props) {
|
|
10
|
+
const accordion = useContext(AccordionRootContext);
|
|
11
|
+
const itemProps = useContext(AccordionItemContext);
|
|
12
|
+
const { element, children,...rest } = props;
|
|
13
|
+
const attributes = mergeProps(accordion.getItemIndicatorProps(itemProps), rest, { className: classesAccordion.indicator });
|
|
14
|
+
return element ? element(attributes) : /* @__PURE__ */ jsx("div", {
|
|
15
|
+
...attributes,
|
|
16
|
+
children
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { indicator_default as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HTMLAttributes } from "../../../internal/html-attributes.js";
|
|
2
|
+
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
3
|
+
import { ItemProps } from "@zag-js/accordion";
|
|
4
|
+
import { PropsWithChildren } from "react";
|
|
5
|
+
import * as react_jsx_runtime25 from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/accordion/anatomy/item.d.ts
|
|
8
|
+
interface AccordionItemProps extends ItemProps, PropsWithChildren, PropsWithElement<'div'>, HTMLAttributes<'div'> {}
|
|
9
|
+
declare function export_default(props: AccordionItemProps): react_jsx_runtime25.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { AccordionItemProps, export_default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AccordionRootContext } from "../modules/root-context.js";
|
|
2
|
+
import { AccordionItemContext } from "../modules/item-context.js";
|
|
3
|
+
import { splitItemProps } from "@zag-js/accordion";
|
|
4
|
+
import { mergeProps } from "@zag-js/react";
|
|
5
|
+
import { classesAccordion } from "@skeletonlabs/skeleton-common";
|
|
6
|
+
import { useContext } from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
|
|
9
|
+
//#region src/components/accordion/anatomy/item.tsx
|
|
10
|
+
function item_default(props) {
|
|
11
|
+
const accordion = useContext(AccordionRootContext);
|
|
12
|
+
const [itemProps, componentProps] = splitItemProps(props);
|
|
13
|
+
const { element, children,...rest } = componentProps;
|
|
14
|
+
const attributes = mergeProps(accordion.getItemProps(itemProps), rest, { className: classesAccordion.item });
|
|
15
|
+
return /* @__PURE__ */ jsx(AccordionItemContext.Provider, {
|
|
16
|
+
value: itemProps,
|
|
17
|
+
children: element ? element(attributes) : /* @__PURE__ */ jsx("div", {
|
|
18
|
+
...attributes,
|
|
19
|
+
children
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { item_default as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useAccordion } from "../modules/use-accordion.js";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/accordion/anatomy/root-context.d.ts
|
|
5
|
+
interface AccordionRootContextProps {
|
|
6
|
+
children: (accordion: ReturnType<typeof useAccordion>) => ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare function export_default(props: AccordionRootContextProps): ReactNode;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { AccordionRootContextProps, export_default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AccordionRootContext } from "../modules/root-context.js";
|
|
2
|
+
import { useContext } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/accordion/anatomy/root-context.tsx
|
|
5
|
+
function root_context_default(props) {
|
|
6
|
+
const accordion = useContext(AccordionRootContext);
|
|
7
|
+
const { children } = props;
|
|
8
|
+
return children(accordion);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { root_context_default as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HTMLAttributes } from "../../../internal/html-attributes.js";
|
|
2
|
+
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
3
|
+
import { useAccordion } from "../modules/use-accordion.js";
|
|
4
|
+
import "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/accordion/anatomy/root-provider.d.ts
|
|
7
|
+
interface AccordionRootProviderProps extends PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir' | 'defaultValue'> {
|
|
8
|
+
value: ReturnType<typeof useAccordion>;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { AccordionRootProviderProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes } from "../../../internal/html-attributes.js";
|
|
2
|
+
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
3
|
+
import { Props } from "@zag-js/accordion";
|
|
4
|
+
import * as react_jsx_runtime22 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/accordion/anatomy/root.d.ts
|
|
7
|
+
interface AccordionRootProps extends Omit<Props, 'id'>, PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir' | 'defaultValue'> {}
|
|
8
|
+
declare function export_default(props: AccordionRootProps): react_jsx_runtime22.JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { AccordionRootProps, export_default };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AccordionRootContext } from "../modules/root-context.js";
|
|
2
|
+
import { useAccordion } from "../modules/use-accordion.js";
|
|
3
|
+
import { splitProps } from "@zag-js/accordion";
|
|
4
|
+
import { mergeProps } from "@zag-js/react";
|
|
5
|
+
import { classesAccordion } from "@skeletonlabs/skeleton-common";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/components/accordion/anatomy/root.tsx
|
|
9
|
+
function root_default(props) {
|
|
10
|
+
const [accordionProps, componentProps] = splitProps(props);
|
|
11
|
+
const { element, children,...rest } = componentProps;
|
|
12
|
+
const accordion = useAccordion(accordionProps);
|
|
13
|
+
const attributes = mergeProps(accordion.getRootProps(), rest, { className: classesAccordion.root });
|
|
14
|
+
return /* @__PURE__ */ jsx(AccordionRootContext.Provider, {
|
|
15
|
+
value: accordion,
|
|
16
|
+
children: element ? element(attributes) : /* @__PURE__ */ jsx("div", {
|
|
17
|
+
...attributes,
|
|
18
|
+
children
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { root_default as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HTMLAttributes } from "../../../internal/html-attributes.js";
|
|
2
|
+
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
3
|
+
import * as react77 from "react";
|
|
4
|
+
import { PropsWithChildren } from "react";
|
|
5
|
+
import * as react_jsx_runtime26 from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/accordion/anatomy/trigger.d.ts
|
|
8
|
+
interface AccordionTriggerProps extends PropsWithChildren, PropsWithElement<'button'>, HTMLAttributes<'button'> {}
|
|
9
|
+
declare function export_default(props: AccordionTriggerProps): string | number | bigint | boolean | Iterable<react77.ReactNode> | Promise<string | number | bigint | boolean | react77.ReactPortal | react77.ReactElement<unknown, string | react77.JSXElementConstructor<any>> | Iterable<react77.ReactNode> | null | undefined> | react_jsx_runtime26.JSX.Element | null | undefined;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { AccordionTriggerProps, export_default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AccordionRootContext } from "../modules/root-context.js";
|
|
2
|
+
import { AccordionItemContext } from "../modules/item-context.js";
|
|
3
|
+
import { mergeProps } from "@zag-js/react";
|
|
4
|
+
import { classesAccordion } from "@skeletonlabs/skeleton-common";
|
|
5
|
+
import { useContext } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/components/accordion/anatomy/trigger.tsx
|
|
9
|
+
function trigger_default(props) {
|
|
10
|
+
const accordion = useContext(AccordionRootContext);
|
|
11
|
+
const itemProps = useContext(AccordionItemContext);
|
|
12
|
+
const { element, children,...rest } = props;
|
|
13
|
+
const attributes = mergeProps(accordion.getItemTriggerProps(itemProps), rest, { className: classesAccordion.trigger });
|
|
14
|
+
return element ? element(attributes) : /* @__PURE__ */ jsx("button", {
|
|
15
|
+
...attributes,
|
|
16
|
+
children
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { trigger_default as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { export_default } from "../anatomy/root.js";
|
|
2
|
+
import { export_default as export_default$1 } from "../anatomy/root-context.js";
|
|
3
|
+
import { export_default as export_default$2 } from "../anatomy/item.js";
|
|
4
|
+
import { export_default as export_default$3 } from "../anatomy/heading.js";
|
|
5
|
+
import { export_default as export_default$4 } from "../anatomy/trigger.js";
|
|
6
|
+
import { export_default as export_default$5 } from "../anatomy/indicator.js";
|
|
7
|
+
import { export_default as export_default$6 } from "../anatomy/content.js";
|
|
8
|
+
|
|
9
|
+
//#region src/components/accordion/modules/anatomy.d.ts
|
|
10
|
+
declare const Accordion: typeof export_default & {
|
|
11
|
+
Context: typeof export_default$1;
|
|
12
|
+
Item: typeof export_default$2;
|
|
13
|
+
Heading: typeof export_default$3;
|
|
14
|
+
Trigger: typeof export_default$4;
|
|
15
|
+
Indicator: typeof export_default$5;
|
|
16
|
+
Content: typeof export_default$6;
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { Accordion };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import root_default from "../anatomy/root.js";
|
|
2
|
+
import root_context_default from "../anatomy/root-context.js";
|
|
3
|
+
import item_default from "../anatomy/item.js";
|
|
4
|
+
import heading_default from "../anatomy/heading.js";
|
|
5
|
+
import trigger_default from "../anatomy/trigger.js";
|
|
6
|
+
import indicator_default from "../anatomy/indicator.js";
|
|
7
|
+
import content_default from "../anatomy/content.js";
|
|
8
|
+
|
|
9
|
+
//#region src/components/accordion/modules/anatomy.ts
|
|
10
|
+
const Accordion = Object.assign(root_default, {
|
|
11
|
+
Context: root_context_default,
|
|
12
|
+
Item: item_default,
|
|
13
|
+
Heading: heading_default,
|
|
14
|
+
Trigger: trigger_default,
|
|
15
|
+
Indicator: indicator_default,
|
|
16
|
+
Content: content_default
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { Accordion };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as _zag_js_accordion0 from "@zag-js/accordion";
|
|
2
|
+
import { Props } from "@zag-js/accordion";
|
|
3
|
+
import * as _zag_js_react2 from "@zag-js/react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/accordion/modules/use-accordion.d.ts
|
|
6
|
+
declare function useAccordion(props: Omit<Props, 'id'>): _zag_js_accordion0.Api<_zag_js_react2.PropTypes>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { useAccordion };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { connect, machine } from "@zag-js/accordion";
|
|
2
|
+
import { normalizeProps, useMachine } from "@zag-js/react";
|
|
3
|
+
import { useId } from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/accordion/modules/use-accordion.ts
|
|
6
|
+
function useAccordion(props) {
|
|
7
|
+
const service = useMachine(machine, {
|
|
8
|
+
id: useId(),
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
return connect(service, normalizeProps);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { useAccordion };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes } from "../../../internal/html-attributes.js";
|
|
2
|
+
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
3
|
+
import * as react97 from "react";
|
|
4
|
+
import * as react_jsx_runtime32 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/avatar/anatomy/fallback.d.ts
|
|
7
|
+
interface AvatarFallbackProps extends PropsWithElement<'span'>, HTMLAttributes<'span'> {}
|
|
8
|
+
declare function export_default(props: AvatarFallbackProps): string | number | bigint | boolean | Iterable<react97.ReactNode> | Promise<string | number | bigint | boolean | react97.ReactPortal | react97.ReactElement<unknown, string | react97.JSXElementConstructor<any>> | Iterable<react97.ReactNode> | null | undefined> | react_jsx_runtime32.JSX.Element | null | undefined;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { AvatarFallbackProps, export_default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AvatarRootContext } from "../modules/root-context.js";
|
|
2
|
+
import { mergeProps } from "@zag-js/react";
|
|
3
|
+
import { classesAvatar } from "@skeletonlabs/skeleton-common";
|
|
4
|
+
import { useContext } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/avatar/anatomy/fallback.tsx
|
|
8
|
+
function fallback_default(props) {
|
|
9
|
+
const avatar = useContext(AvatarRootContext);
|
|
10
|
+
const { element, children,...rest } = props;
|
|
11
|
+
const attributes = mergeProps(avatar.getFallbackProps(), rest, { className: classesAvatar.fallback });
|
|
12
|
+
return element ? element(attributes) : /* @__PURE__ */ jsx("span", {
|
|
13
|
+
...attributes,
|
|
14
|
+
children
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { fallback_default as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes } from "../../../internal/html-attributes.js";
|
|
2
|
+
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
3
|
+
import * as react92 from "react";
|
|
4
|
+
import * as react_jsx_runtime31 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/avatar/anatomy/image.d.ts
|
|
7
|
+
interface AvatarImageProps extends PropsWithElement<'img'>, HTMLAttributes<'img', 'children'> {}
|
|
8
|
+
declare function export_default(props: AvatarImageProps): string | number | bigint | boolean | Iterable<react92.ReactNode> | Promise<string | number | bigint | boolean | react92.ReactPortal | react92.ReactElement<unknown, string | react92.JSXElementConstructor<any>> | Iterable<react92.ReactNode> | null | undefined> | react_jsx_runtime31.JSX.Element | null | undefined;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { AvatarImageProps, export_default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AvatarRootContext } from "../modules/root-context.js";
|
|
2
|
+
import { mergeProps } from "@zag-js/react";
|
|
3
|
+
import { classesAvatar } from "@skeletonlabs/skeleton-common";
|
|
4
|
+
import { useContext } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/avatar/anatomy/image.tsx
|
|
8
|
+
function image_default(props) {
|
|
9
|
+
const avatar = useContext(AvatarRootContext);
|
|
10
|
+
const { element,...rest } = props;
|
|
11
|
+
const attributes = mergeProps(avatar.getImageProps(), rest, { className: classesAvatar.image });
|
|
12
|
+
return element ? element(attributes) : /* @__PURE__ */ jsx("img", { ...attributes });
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { image_default as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useAvatar } from "../modules/use-avatar.js";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/avatar/anatomy/root-context.d.ts
|
|
5
|
+
interface AvatarRootContextProps {
|
|
6
|
+
children: (avatar: ReturnType<typeof useAvatar>) => ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare function export_default(props: AvatarRootContextProps): ReactNode;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { AvatarRootContextProps, export_default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AvatarRootContext } from "../modules/root-context.js";
|
|
2
|
+
import { useContext } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/avatar/anatomy/root-context.tsx
|
|
5
|
+
function root_context_default(props) {
|
|
6
|
+
const avatar = useContext(AvatarRootContext);
|
|
7
|
+
const { children } = props;
|
|
8
|
+
return children(avatar);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { root_context_default as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HTMLAttributes } from "../../../internal/html-attributes.js";
|
|
2
|
+
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
3
|
+
import { useAvatar } from "../modules/use-avatar.js";
|
|
4
|
+
import "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/avatar/anatomy/root-provider.d.ts
|
|
7
|
+
interface AvatarRootProviderProps extends PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir'> {
|
|
8
|
+
value: ReturnType<typeof useAvatar>;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { AvatarRootProviderProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes } from "../../../internal/html-attributes.js";
|
|
2
|
+
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
3
|
+
import * as react_jsx_runtime30 from "react/jsx-runtime";
|
|
4
|
+
import { Props } from "@zag-js/avatar";
|
|
5
|
+
|
|
6
|
+
//#region src/components/avatar/anatomy/root.d.ts
|
|
7
|
+
interface AvatarRootProps extends Omit<Props, 'id'>, PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir'> {}
|
|
8
|
+
declare function export_default(props: AvatarRootProps): react_jsx_runtime30.JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { AvatarRootProps, export_default };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AvatarRootContext } from "../modules/root-context.js";
|
|
2
|
+
import { useAvatar } from "../modules/use-avatar.js";
|
|
3
|
+
import { mergeProps } from "@zag-js/react";
|
|
4
|
+
import { classesAvatar } from "@skeletonlabs/skeleton-common";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { splitProps } from "@zag-js/avatar";
|
|
7
|
+
|
|
8
|
+
//#region src/components/avatar/anatomy/root.tsx
|
|
9
|
+
function root_default(props) {
|
|
10
|
+
const [avatarProps, componentProps] = splitProps(props);
|
|
11
|
+
const { element, children,...rest } = componentProps;
|
|
12
|
+
const avatar = useAvatar(avatarProps);
|
|
13
|
+
const attributes = mergeProps(avatar.getRootProps(), rest, { className: classesAvatar.root });
|
|
14
|
+
return /* @__PURE__ */ jsx(AvatarRootContext.Provider, {
|
|
15
|
+
value: avatar,
|
|
16
|
+
children: element ? element(attributes) : /* @__PURE__ */ jsx("div", {
|
|
17
|
+
...attributes,
|
|
18
|
+
children
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { root_default as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { export_default } from "../anatomy/root.js";
|
|
2
|
+
import { export_default as export_default$1 } from "../anatomy/root-context.js";
|
|
3
|
+
import { export_default as export_default$2 } from "../anatomy/image.js";
|
|
4
|
+
import { export_default as export_default$3 } from "../anatomy/fallback.js";
|
|
5
|
+
|
|
6
|
+
//#region src/components/avatar/modules/anatomy.d.ts
|
|
7
|
+
declare const Avatar: typeof export_default & {
|
|
8
|
+
Context: typeof export_default$1;
|
|
9
|
+
Image: typeof export_default$2;
|
|
10
|
+
Fallback: typeof export_default$3;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Avatar };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import root_default from "../anatomy/root.js";
|
|
2
|
+
import root_context_default from "../anatomy/root-context.js";
|
|
3
|
+
import image_default from "../anatomy/image.js";
|
|
4
|
+
import fallback_default from "../anatomy/fallback.js";
|
|
5
|
+
|
|
6
|
+
//#region src/components/avatar/modules/anatomy.ts
|
|
7
|
+
const Avatar = Object.assign(root_default, {
|
|
8
|
+
Context: root_context_default,
|
|
9
|
+
Image: image_default,
|
|
10
|
+
Fallback: fallback_default
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Avatar };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as _zag_js_react4 from "@zag-js/react";
|
|
2
|
+
import * as _zag_js_avatar0 from "@zag-js/avatar";
|
|
3
|
+
import { Props } from "@zag-js/avatar";
|
|
4
|
+
|
|
5
|
+
//#region src/components/avatar/modules/use-avatar.d.ts
|
|
6
|
+
declare function useAvatar(props: Omit<Props, 'id'>): _zag_js_avatar0.Api<_zag_js_react4.PropTypes>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { useAvatar };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { normalizeProps, useMachine } from "@zag-js/react";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { connect, machine } from "@zag-js/avatar";
|
|
4
|
+
|
|
5
|
+
//#region src/components/avatar/modules/use-avatar.ts
|
|
6
|
+
function useAvatar(props) {
|
|
7
|
+
const service = useMachine(machine, {
|
|
8
|
+
id: useId(),
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
return connect(service, normalizeProps);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { useAvatar };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes } from "../../../internal/html-attributes.js";
|
|
2
|
+
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
3
|
+
import * as react4 from "react";
|
|
4
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/progress-linear/anatomy/label.d.ts
|
|
7
|
+
interface ProgressLinearLabelProps extends PropsWithElement<'div'>, HTMLAttributes<'div'> {}
|
|
8
|
+
declare function export_default(props: ProgressLinearLabelProps): string | number | bigint | boolean | Iterable<react4.ReactNode> | Promise<string | number | bigint | boolean | react4.ReactPortal | react4.ReactElement<unknown, string | react4.JSXElementConstructor<any>> | Iterable<react4.ReactNode> | null | undefined> | react_jsx_runtime2.JSX.Element | null | undefined;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { ProgressLinearLabelProps, export_default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ProgressLinearRootContext } from "../modules/root-context.js";
|
|
2
|
+
import { mergeProps } from "@zag-js/react";
|
|
3
|
+
import { classesProgressLinear } from "@skeletonlabs/skeleton-common";
|
|
4
|
+
import { useContext } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/progress-linear/anatomy/label.tsx
|
|
8
|
+
function label_default(props) {
|
|
9
|
+
const progressLinear = useContext(ProgressLinearRootContext);
|
|
10
|
+
const { element, children,...rest } = props;
|
|
11
|
+
const attributes = mergeProps(progressLinear.getLabelProps(), rest, { className: classesProgressLinear.label });
|
|
12
|
+
return element ? element(attributes) : /* @__PURE__ */ jsx("div", {
|
|
13
|
+
...attributes,
|
|
14
|
+
children
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { label_default as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes } from "../../../internal/html-attributes.js";
|
|
2
|
+
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
3
|
+
import * as react9 from "react";
|
|
4
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/progress-linear/anatomy/range.d.ts
|
|
7
|
+
interface ProgressLinearRangeProps extends PropsWithElement<'div'>, HTMLAttributes<'div', 'children'> {}
|
|
8
|
+
declare function export_default(props: ProgressLinearRangeProps): string | number | bigint | boolean | Iterable<react9.ReactNode> | Promise<string | number | bigint | boolean | react9.ReactPortal | react9.ReactElement<unknown, string | react9.JSXElementConstructor<any>> | Iterable<react9.ReactNode> | null | undefined> | react_jsx_runtime3.JSX.Element | null | undefined;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { ProgressLinearRangeProps, export_default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ProgressLinearRootContext } from "../modules/root-context.js";
|
|
2
|
+
import { mergeProps } from "@zag-js/react";
|
|
3
|
+
import { classesProgressLinear } from "@skeletonlabs/skeleton-common";
|
|
4
|
+
import { useContext } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/progress-linear/anatomy/range.tsx
|
|
8
|
+
function range_default(props) {
|
|
9
|
+
const progressLinear = useContext(ProgressLinearRootContext);
|
|
10
|
+
const { element,...rest } = props;
|
|
11
|
+
const attributes = mergeProps(progressLinear.getRangeProps(), rest, { className: classesProgressLinear.range });
|
|
12
|
+
return element ? element(attributes) : /* @__PURE__ */ jsx("div", { ...attributes });
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { range_default as default };
|