@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,10 @@
|
|
|
1
|
+
import { useProgressLinear } from "../modules/use-progress-linear.js";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/progress-linear/anatomy/root-context.d.ts
|
|
5
|
+
interface ProgressLinearRootContextProps {
|
|
6
|
+
children: (progressLinear: ReturnType<typeof useProgressLinear>) => ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare function export_default(props: ProgressLinearRootContextProps): ReactNode;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { ProgressLinearRootContextProps, export_default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ProgressLinearRootContext } from "../modules/root-context.js";
|
|
2
|
+
import { useContext } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/progress-linear/anatomy/root-context.tsx
|
|
5
|
+
function root_context_default(props) {
|
|
6
|
+
const progressLinear = useContext(ProgressLinearRootContext);
|
|
7
|
+
const { children } = props;
|
|
8
|
+
return children(progressLinear);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { root_context_default as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HTMLAttributes } from "../../../internal/html-attributes.js";
|
|
2
|
+
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
3
|
+
import { useProgressLinear } from "../modules/use-progress-linear.js";
|
|
4
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/progress-linear/anatomy/root-provider.d.ts
|
|
7
|
+
interface ProgressLinearRootProviderProps extends PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir' | 'defaultValue'> {
|
|
8
|
+
value: ReturnType<typeof useProgressLinear>;
|
|
9
|
+
}
|
|
10
|
+
declare function export_default(props: ProgressLinearRootProviderProps): react_jsx_runtime0.JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { ProgressLinearRootProviderProps, export_default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ProgressLinearRootContext } from "../modules/root-context.js";
|
|
2
|
+
import { mergeProps } from "@zag-js/react";
|
|
3
|
+
import { classesProgressLinear } from "@skeletonlabs/skeleton-common";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/progress-linear/anatomy/root-provider.tsx
|
|
7
|
+
function root_provider_default(props) {
|
|
8
|
+
const { element, children, value: progressLinear,...rest } = props;
|
|
9
|
+
const attributes = mergeProps(progressLinear.getRootProps(), rest, { className: classesProgressLinear.root });
|
|
10
|
+
return /* @__PURE__ */ jsx(ProgressLinearRootContext.Provider, {
|
|
11
|
+
value: progressLinear,
|
|
12
|
+
children: element ? element(attributes) : /* @__PURE__ */ jsx("div", {
|
|
13
|
+
...attributes,
|
|
14
|
+
children
|
|
15
|
+
})
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { root_provider_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 react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
import { Props } from "@zag-js/progress";
|
|
5
|
+
|
|
6
|
+
//#region src/components/progress-linear/anatomy/root.d.ts
|
|
7
|
+
interface ProgressLinearRootProps extends Omit<Props, 'id'>, PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir' | 'defaultValue'> {}
|
|
8
|
+
declare function export_default(props: ProgressLinearRootProps): react_jsx_runtime0.JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { ProgressLinearRootProps, export_default };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ProgressLinearRootContext } from "../modules/root-context.js";
|
|
2
|
+
import { useProgressLinear } from "../modules/use-progress-linear.js";
|
|
3
|
+
import { mergeProps } from "@zag-js/react";
|
|
4
|
+
import { classesProgressLinear } from "@skeletonlabs/skeleton-common";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { splitProps } from "@zag-js/progress";
|
|
7
|
+
|
|
8
|
+
//#region src/components/progress-linear/anatomy/root.tsx
|
|
9
|
+
function root_default(props) {
|
|
10
|
+
const [progressLinearProps, componentProps] = splitProps(props);
|
|
11
|
+
const { element, children,...rest } = componentProps;
|
|
12
|
+
const progressLinear = useProgressLinear(progressLinearProps);
|
|
13
|
+
const attributes = mergeProps(progressLinear.getRootProps(), rest, { className: classesProgressLinear.root });
|
|
14
|
+
return /* @__PURE__ */ jsx(ProgressLinearRootContext.Provider, {
|
|
15
|
+
value: progressLinear,
|
|
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,10 @@
|
|
|
1
|
+
import { HTMLAttributes } from "../../../internal/html-attributes.js";
|
|
2
|
+
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
3
|
+
import * as react0 from "react";
|
|
4
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/progress-linear/anatomy/track.d.ts
|
|
7
|
+
interface ProgressLinearTrackProps extends PropsWithElement<'div'>, HTMLAttributes<'div'> {}
|
|
8
|
+
declare function export_default(props: ProgressLinearTrackProps): string | number | bigint | boolean | Iterable<react0.ReactNode> | Promise<string | number | bigint | boolean | react0.ReactPortal | react0.ReactElement<unknown, string | react0.JSXElementConstructor<any>> | Iterable<react0.ReactNode> | null | undefined> | react_jsx_runtime1.JSX.Element | null | undefined;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { ProgressLinearTrackProps, 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/track.tsx
|
|
8
|
+
function track_default(props) {
|
|
9
|
+
const progressLinear = useContext(ProgressLinearRootContext);
|
|
10
|
+
const { element, children,...rest } = props;
|
|
11
|
+
const attributes = mergeProps(progressLinear.getTrackProps(), rest, { className: classesProgressLinear.track });
|
|
12
|
+
return element ? element(attributes) : /* @__PURE__ */ jsx("div", {
|
|
13
|
+
...attributes,
|
|
14
|
+
children
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { track_default as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { export_default } from "../anatomy/root.js";
|
|
2
|
+
import { export_default as export_default$1 } from "../anatomy/root-provider.js";
|
|
3
|
+
import { export_default as export_default$2 } from "../anatomy/root-context.js";
|
|
4
|
+
import { export_default as export_default$3 } from "../anatomy/label.js";
|
|
5
|
+
import { export_default as export_default$4 } from "../anatomy/track.js";
|
|
6
|
+
import { export_default as export_default$5 } from "../anatomy/range.js";
|
|
7
|
+
|
|
8
|
+
//#region src/components/progress-linear/modules/anatomy.d.ts
|
|
9
|
+
declare const ProgressLinear: typeof export_default & {
|
|
10
|
+
Provider: typeof export_default$1;
|
|
11
|
+
Context: typeof export_default$2;
|
|
12
|
+
Label: typeof export_default$3;
|
|
13
|
+
Track: typeof export_default$4;
|
|
14
|
+
Range: typeof export_default$5;
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { ProgressLinear };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import root_default from "../anatomy/root.js";
|
|
2
|
+
import root_provider_default from "../anatomy/root-provider.js";
|
|
3
|
+
import root_context_default from "../anatomy/root-context.js";
|
|
4
|
+
import label_default from "../anatomy/label.js";
|
|
5
|
+
import track_default from "../anatomy/track.js";
|
|
6
|
+
import range_default from "../anatomy/range.js";
|
|
7
|
+
|
|
8
|
+
//#region src/components/progress-linear/modules/anatomy.ts
|
|
9
|
+
const ProgressLinear = Object.assign(root_default, {
|
|
10
|
+
Provider: root_provider_default,
|
|
11
|
+
Context: root_context_default,
|
|
12
|
+
Label: label_default,
|
|
13
|
+
Track: track_default,
|
|
14
|
+
Range: range_default
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { ProgressLinear };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as _zag_js_react0 from "@zag-js/react";
|
|
2
|
+
import * as _zag_js_progress0 from "@zag-js/progress";
|
|
3
|
+
import { Props } from "@zag-js/progress";
|
|
4
|
+
|
|
5
|
+
//#region src/components/progress-linear/modules/use-progress-linear.d.ts
|
|
6
|
+
declare function useProgressLinear(props: Omit<Props, 'id'>): _zag_js_progress0.Api<_zag_js_react0.PropTypes>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { useProgressLinear };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { normalizeProps, useMachine } from "@zag-js/react";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { connect, machine } from "@zag-js/progress";
|
|
4
|
+
|
|
5
|
+
//#region src/components/progress-linear/modules/use-progress-linear.ts
|
|
6
|
+
function useProgressLinear(props) {
|
|
7
|
+
const service = useMachine(machine, {
|
|
8
|
+
id: useId(),
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
return connect(service, normalizeProps);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { useProgressLinear };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes } from "../../../internal/html-attributes.js";
|
|
2
|
+
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
3
|
+
import * as react19 from "react";
|
|
4
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/rating-group/anatomy/control.d.ts
|
|
7
|
+
interface RatingGroupControlProps extends PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir'> {}
|
|
8
|
+
declare function export_default(props: RatingGroupControlProps): string | number | bigint | boolean | Iterable<react19.ReactNode> | Promise<string | number | bigint | boolean | react19.ReactPortal | react19.ReactElement<unknown, string | react19.JSXElementConstructor<any>> | Iterable<react19.ReactNode> | null | undefined> | react_jsx_runtime7.JSX.Element | null | undefined;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { RatingGroupControlProps, export_default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { RatingGroupRootContext } from "../modules/root-context.js";
|
|
2
|
+
import { mergeProps } from "@zag-js/react";
|
|
3
|
+
import { classesRatingGroup } from "@skeletonlabs/skeleton-common";
|
|
4
|
+
import { useContext } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/rating-group/anatomy/control.tsx
|
|
8
|
+
function control_default(props) {
|
|
9
|
+
const ratingGroup = useContext(RatingGroupRootContext);
|
|
10
|
+
const { element, children,...rest } = props;
|
|
11
|
+
const attributes = mergeProps(ratingGroup.getControlProps(), rest, { className: classesRatingGroup.control });
|
|
12
|
+
return element ? element(attributes) : /* @__PURE__ */ jsx("div", {
|
|
13
|
+
...attributes,
|
|
14
|
+
children
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { control_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 react24 from "react";
|
|
4
|
+
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/rating-group/anatomy/hidden-input.d.ts
|
|
7
|
+
interface RatingGroupHiddenInputProps extends PropsWithElement<'input'>, HTMLAttributes<'input', 'id' | 'dir' | 'children'> {}
|
|
8
|
+
declare function export_default(props: RatingGroupHiddenInputProps): string | number | bigint | boolean | Iterable<react24.ReactNode> | Promise<string | number | bigint | boolean | react24.ReactPortal | react24.ReactElement<unknown, string | react24.JSXElementConstructor<any>> | Iterable<react24.ReactNode> | null | undefined> | react_jsx_runtime8.JSX.Element | null | undefined;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { RatingGroupHiddenInputProps, export_default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RatingGroupRootContext } from "../modules/root-context.js";
|
|
2
|
+
import { mergeProps } from "@zag-js/react";
|
|
3
|
+
import { classesRatingGroup } from "@skeletonlabs/skeleton-common";
|
|
4
|
+
import { useContext } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/rating-group/anatomy/hidden-input.tsx
|
|
8
|
+
function hidden_input_default(props) {
|
|
9
|
+
const ratingGroup = useContext(RatingGroupRootContext);
|
|
10
|
+
const { element,...rest } = props;
|
|
11
|
+
const attributes = mergeProps(ratingGroup.getHiddenInputProps(), rest, { className: classesRatingGroup.hiddenInput });
|
|
12
|
+
return element ? element(attributes) : /* @__PURE__ */ jsx("input", { ...attributes });
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { hidden_input_default as default };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { HTMLAttributes } from "../../../internal/html-attributes.js";
|
|
2
|
+
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
3
|
+
import * as react59 from "react";
|
|
4
|
+
import { ReactNode } from "react";
|
|
5
|
+
import * as react_jsx_runtime19 from "react/jsx-runtime";
|
|
6
|
+
import { ItemProps } from "@zag-js/rating-group";
|
|
7
|
+
|
|
8
|
+
//#region src/components/rating-group/anatomy/item.d.ts
|
|
9
|
+
interface RatingGroupItemProps extends ItemProps, PropsWithElement<'span'>, HTMLAttributes<'span', 'id' | 'dir'> {
|
|
10
|
+
/**
|
|
11
|
+
* The content to render when the item is in the empty state.
|
|
12
|
+
*
|
|
13
|
+
* @default StarEmpty (SVG)
|
|
14
|
+
*/
|
|
15
|
+
empty?: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* The content to render when the item is in the half state.
|
|
18
|
+
*
|
|
19
|
+
* @default StarHalf (SVG)
|
|
20
|
+
*/
|
|
21
|
+
half?: ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* The content to render when the item is in the full state.
|
|
24
|
+
*
|
|
25
|
+
* @default StarFull (SVG)
|
|
26
|
+
*/
|
|
27
|
+
full?: ReactNode;
|
|
28
|
+
}
|
|
29
|
+
declare function export_default(props: RatingGroupItemProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react59.ReactPortal | react59.ReactElement<unknown, string | react59.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime19.JSX.Element | null | undefined;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { RatingGroupItemProps, export_default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { RatingGroupRootContext } from "../modules/root-context.js";
|
|
2
|
+
import star_empty_default from "../../../internal/components/star-empty.js";
|
|
3
|
+
import star_half_default from "../../../internal/components/star-half.js";
|
|
4
|
+
import star_full_default from "../../../internal/components/star-full.js";
|
|
5
|
+
import { mergeProps } from "@zag-js/react";
|
|
6
|
+
import { classesAccordion } from "@skeletonlabs/skeleton-common";
|
|
7
|
+
import { useContext } from "react";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
import { splitItemProps } from "@zag-js/rating-group";
|
|
10
|
+
|
|
11
|
+
//#region src/components/rating-group/anatomy/item.tsx
|
|
12
|
+
function item_default(props) {
|
|
13
|
+
const ratingGroup = useContext(RatingGroupRootContext);
|
|
14
|
+
const [itemProps, componentProps] = splitItemProps(props);
|
|
15
|
+
const { element, children, empty = /* @__PURE__ */ jsx(star_empty_default, {}), half = /* @__PURE__ */ jsx(star_half_default, {}), full = /* @__PURE__ */ jsx(star_full_default, {}),...rest } = componentProps;
|
|
16
|
+
const itemState = ratingGroup.getItemState(itemProps);
|
|
17
|
+
const attributes = mergeProps(ratingGroup.getItemProps(itemProps), rest, { className: classesAccordion.item });
|
|
18
|
+
return element ? element(attributes) : /* @__PURE__ */ jsx("div", {
|
|
19
|
+
...attributes,
|
|
20
|
+
children: children ? children : !itemState.highlighted ? empty : itemState.half ? half : full
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { item_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 react14 from "react";
|
|
4
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/rating-group/anatomy/label.d.ts
|
|
7
|
+
interface RatingGroupLabelProps extends PropsWithElement<'label'>, HTMLAttributes<'label', 'id' | 'dir'> {}
|
|
8
|
+
declare function export_default(props: RatingGroupLabelProps): string | number | bigint | boolean | Iterable<react14.ReactNode> | Promise<string | number | bigint | boolean | react14.ReactPortal | react14.ReactElement<unknown, string | react14.JSXElementConstructor<any>> | Iterable<react14.ReactNode> | null | undefined> | react_jsx_runtime6.JSX.Element | null | undefined;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { RatingGroupLabelProps, export_default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { RatingGroupRootContext } from "../modules/root-context.js";
|
|
2
|
+
import { mergeProps } from "@zag-js/react";
|
|
3
|
+
import { classesRatingGroup } from "@skeletonlabs/skeleton-common";
|
|
4
|
+
import { useContext } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/rating-group/anatomy/label.tsx
|
|
8
|
+
function label_default(props) {
|
|
9
|
+
const ratingGroup = useContext(RatingGroupRootContext);
|
|
10
|
+
const { element, children,...rest } = props;
|
|
11
|
+
const attributes = mergeProps(ratingGroup.getLabelProps(), rest, { className: classesRatingGroup.label });
|
|
12
|
+
return element ? element(attributes) : /* @__PURE__ */ jsx("label", {
|
|
13
|
+
...attributes,
|
|
14
|
+
children
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { label_default as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useRatingGroup } from "../modules/use-rating-group.js";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/rating-group/anatomy/root-context.d.ts
|
|
5
|
+
interface RatingGroupRootContextProps {
|
|
6
|
+
children: (ratingGroup: ReturnType<typeof useRatingGroup>) => ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare function export_default(props: RatingGroupRootContextProps): ReactNode;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { RatingGroupRootContextProps, export_default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RatingGroupRootContext } from "../modules/root-context.js";
|
|
2
|
+
import { useContext } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/rating-group/anatomy/root-context.tsx
|
|
5
|
+
function root_context_default(props) {
|
|
6
|
+
const ratingGroup = useContext(RatingGroupRootContext);
|
|
7
|
+
const { children } = props;
|
|
8
|
+
return children(ratingGroup);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { root_context_default as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HTMLAttributes } from "../../../internal/html-attributes.js";
|
|
2
|
+
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
3
|
+
import { useRatingGroup } from "../modules/use-rating-group.js";
|
|
4
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/rating-group/anatomy/root-provider.d.ts
|
|
7
|
+
interface RatingGroupRootProviderProps extends PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir' | 'defaultValue'> {
|
|
8
|
+
value: ReturnType<typeof useRatingGroup>;
|
|
9
|
+
}
|
|
10
|
+
declare function export_default(props: RatingGroupRootProviderProps): react_jsx_runtime4.JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { RatingGroupRootProviderProps, export_default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { RatingGroupRootContext } from "../modules/root-context.js";
|
|
2
|
+
import { mergeProps } from "@zag-js/react";
|
|
3
|
+
import { classesRatingGroup } from "@skeletonlabs/skeleton-common";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/rating-group/anatomy/root-provider.tsx
|
|
7
|
+
function root_provider_default(props) {
|
|
8
|
+
const { element, children, value: ratingGroup,...rest } = props;
|
|
9
|
+
const attributes = mergeProps(ratingGroup.getRootProps(), rest, { className: classesRatingGroup.root });
|
|
10
|
+
return /* @__PURE__ */ jsx(RatingGroupRootContext.Provider, {
|
|
11
|
+
value: ratingGroup,
|
|
12
|
+
children: element ? element(attributes) : /* @__PURE__ */ jsx("div", {
|
|
13
|
+
...attributes,
|
|
14
|
+
children
|
|
15
|
+
})
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { root_provider_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 react_jsx_runtime5 from "react/jsx-runtime";
|
|
4
|
+
import { Props } from "@zag-js/rating-group";
|
|
5
|
+
|
|
6
|
+
//#region src/components/rating-group/anatomy/root.d.ts
|
|
7
|
+
interface RatingGroupRootProps extends Omit<Props, 'id'>, PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir' | 'defaultValue'> {}
|
|
8
|
+
declare function export_default(props: RatingGroupRootProps): react_jsx_runtime5.JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { RatingGroupRootProps, export_default };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { RatingGroupRootContext } from "../modules/root-context.js";
|
|
2
|
+
import { useRatingGroup } from "../modules/use-rating-group.js";
|
|
3
|
+
import { mergeProps } from "@zag-js/react";
|
|
4
|
+
import { classesRatingGroup } from "@skeletonlabs/skeleton-common";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { splitProps } from "@zag-js/rating-group";
|
|
7
|
+
|
|
8
|
+
//#region src/components/rating-group/anatomy/root.tsx
|
|
9
|
+
function root_default(props) {
|
|
10
|
+
const [ratingGroupProps, componentProps] = splitProps(props);
|
|
11
|
+
const { element, children,...rest } = componentProps;
|
|
12
|
+
const ratingGroup = useRatingGroup(ratingGroupProps);
|
|
13
|
+
const attributes = mergeProps(ratingGroup.getRootProps(), rest, { className: classesRatingGroup.root });
|
|
14
|
+
return /* @__PURE__ */ jsx(RatingGroupRootContext.Provider, {
|
|
15
|
+
value: ratingGroup,
|
|
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,19 @@
|
|
|
1
|
+
import { export_default } from "../anatomy/root.js";
|
|
2
|
+
import { export_default as export_default$1 } from "../anatomy/root-provider.js";
|
|
3
|
+
import { export_default as export_default$2 } from "../anatomy/root-context.js";
|
|
4
|
+
import { export_default as export_default$3 } from "../anatomy/label.js";
|
|
5
|
+
import { export_default as export_default$4 } from "../anatomy/control.js";
|
|
6
|
+
import { export_default as export_default$5 } from "../anatomy/item.js";
|
|
7
|
+
import { export_default as export_default$6 } from "../anatomy/hidden-input.js";
|
|
8
|
+
|
|
9
|
+
//#region src/components/rating-group/modules/anatomy.d.ts
|
|
10
|
+
declare const RatingGroup: typeof export_default & {
|
|
11
|
+
Provider: typeof export_default$1;
|
|
12
|
+
Context: typeof export_default$2;
|
|
13
|
+
Label: typeof export_default$3;
|
|
14
|
+
Control: typeof export_default$4;
|
|
15
|
+
Item: typeof export_default$5;
|
|
16
|
+
HiddenInput: typeof export_default$6;
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { RatingGroup };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import root_default from "../anatomy/root.js";
|
|
2
|
+
import root_provider_default from "../anatomy/root-provider.js";
|
|
3
|
+
import root_context_default from "../anatomy/root-context.js";
|
|
4
|
+
import label_default from "../anatomy/label.js";
|
|
5
|
+
import control_default from "../anatomy/control.js";
|
|
6
|
+
import item_default from "../anatomy/item.js";
|
|
7
|
+
import hidden_input_default from "../anatomy/hidden-input.js";
|
|
8
|
+
|
|
9
|
+
//#region src/components/rating-group/modules/anatomy.ts
|
|
10
|
+
const RatingGroup = Object.assign(root_default, {
|
|
11
|
+
Provider: root_provider_default,
|
|
12
|
+
Context: root_context_default,
|
|
13
|
+
Label: label_default,
|
|
14
|
+
Control: control_default,
|
|
15
|
+
Item: item_default,
|
|
16
|
+
HiddenInput: hidden_input_default
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { RatingGroup };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as _zag_js_react0 from "@zag-js/react";
|
|
2
|
+
import * as _zag_js_rating_group0 from "@zag-js/rating-group";
|
|
3
|
+
import { Props } from "@zag-js/rating-group";
|
|
4
|
+
|
|
5
|
+
//#region src/components/rating-group/modules/use-rating-group.d.ts
|
|
6
|
+
declare function useRatingGroup(props: Omit<Props, 'id'>): _zag_js_rating_group0.Api<_zag_js_react0.PropTypes>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { useRatingGroup };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { normalizeProps, useMachine } from "@zag-js/react";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { connect, machine } from "@zag-js/rating-group";
|
|
4
|
+
|
|
5
|
+
//#region src/components/rating-group/modules/use-rating-group.ts
|
|
6
|
+
function useRatingGroup(props) {
|
|
7
|
+
const service = useMachine(machine, {
|
|
8
|
+
id: useId(),
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
return connect(service, normalizeProps);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { useRatingGroup };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes } from "../../../internal/html-attributes.js";
|
|
2
|
+
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
3
|
+
import * as react107 from "react";
|
|
4
|
+
import * as react_jsx_runtime34 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/switch/anatomy/control.d.ts
|
|
7
|
+
interface SwitchControlProps extends PropsWithElement<'span'>, HTMLAttributes<'span'> {}
|
|
8
|
+
declare function export_default(props: SwitchControlProps): string | number | bigint | boolean | Iterable<react107.ReactNode> | Promise<string | number | bigint | boolean | react107.ReactPortal | react107.ReactElement<unknown, string | react107.JSXElementConstructor<any>> | Iterable<react107.ReactNode> | null | undefined> | react_jsx_runtime34.JSX.Element | null | undefined;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { SwitchControlProps, export_default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SwitchRootContext } from "../modules/root-context.js";
|
|
2
|
+
import { mergeProps } from "@zag-js/react";
|
|
3
|
+
import { classesSwitch } from "@skeletonlabs/skeleton-common";
|
|
4
|
+
import { useContext } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/switch/anatomy/control.tsx
|
|
8
|
+
function control_default(props) {
|
|
9
|
+
const switch_ = useContext(SwitchRootContext);
|
|
10
|
+
const { element, children,...rest } = props;
|
|
11
|
+
const attributes = mergeProps(switch_.getControlProps(), rest, { className: classesSwitch.control });
|
|
12
|
+
return element ? element(attributes) : /* @__PURE__ */ jsx("span", {
|
|
13
|
+
...attributes,
|
|
14
|
+
children
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { control_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 react102 from "react";
|
|
4
|
+
import * as react_jsx_runtime33 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/switch/anatomy/hidden-input.d.ts
|
|
7
|
+
interface SwitchHiddenInputProps extends PropsWithElement<'input'>, HTMLAttributes<'input', 'children'> {}
|
|
8
|
+
declare function export_default(props: SwitchHiddenInputProps): string | number | bigint | boolean | Iterable<react102.ReactNode> | Promise<string | number | bigint | boolean | react102.ReactPortal | react102.ReactElement<unknown, string | react102.JSXElementConstructor<any>> | Iterable<react102.ReactNode> | null | undefined> | react_jsx_runtime33.JSX.Element | null | undefined;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { SwitchHiddenInputProps, export_default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SwitchRootContext } from "../modules/root-context.js";
|
|
2
|
+
import { mergeProps } from "@zag-js/react";
|
|
3
|
+
import { classesSwitch } from "@skeletonlabs/skeleton-common";
|
|
4
|
+
import { useContext } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/switch/anatomy/hidden-input.tsx
|
|
8
|
+
function hidden_input_default(props) {
|
|
9
|
+
const switch_ = useContext(SwitchRootContext);
|
|
10
|
+
const { element,...rest } = props;
|
|
11
|
+
const attributes = mergeProps(switch_.getHiddenInputProps(), rest, { className: classesSwitch.hiddenInput });
|
|
12
|
+
return element ? element(attributes) : /* @__PURE__ */ jsx("input", { ...attributes });
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { hidden_input_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 react117 from "react";
|
|
4
|
+
import * as react_jsx_runtime36 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/switch/anatomy/label.d.ts
|
|
7
|
+
interface SwitchLabelProps extends PropsWithElement<'span'>, HTMLAttributes<'span'> {}
|
|
8
|
+
declare function export_default(props: SwitchLabelProps): string | number | bigint | boolean | Iterable<react117.ReactNode> | Promise<string | number | bigint | boolean | react117.ReactPortal | react117.ReactElement<unknown, string | react117.JSXElementConstructor<any>> | Iterable<react117.ReactNode> | null | undefined> | react_jsx_runtime36.JSX.Element | null | undefined;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { SwitchLabelProps, export_default };
|