@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
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { AccordionRootContext } from "../modules/accordion-root-context.js";
|
|
2
|
-
import { AccordionItemContext } from "../modules/accordion-item-context.js";
|
|
3
|
-
import { useContext } from "react";
|
|
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/accordion-indicator.tsx
|
|
9
|
-
function accordion_indicator_default(props) {
|
|
10
|
-
const rootContext = useContext(AccordionRootContext);
|
|
11
|
-
const itemContext = useContext(AccordionItemContext);
|
|
12
|
-
const { element, children,...restAttributes } = props;
|
|
13
|
-
const attributes = mergeProps(rootContext.api.getItemIndicatorProps(itemContext.itemProps), { className: classesAccordion.indicator }, restAttributes);
|
|
14
|
-
return element ? element({ attributes }) : /* @__PURE__ */ jsx("div", {
|
|
15
|
-
...attributes,
|
|
16
|
-
children
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
//#endregion
|
|
21
|
-
export { accordion_indicator_default as default };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AccordionItemContextType } from "../modules/accordion-item-context.js";
|
|
2
|
-
import { ReactNode } from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/components/accordion/anatomy/accordion-item-context.d.ts
|
|
5
|
-
interface AccordionItemContextProps {
|
|
6
|
-
children: (context: AccordionItemContextType) => ReactNode;
|
|
7
|
-
}
|
|
8
|
-
declare function export_default(props: AccordionItemContextProps): ReactNode;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { AccordionItemContextProps, export_default };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AccordionItemContext } from "../modules/accordion-item-context.js";
|
|
2
|
-
import { useContext } from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/components/accordion/anatomy/accordion-item-context.tsx
|
|
5
|
-
function accordion_item_context_default(props) {
|
|
6
|
-
const itemContext = useContext(AccordionItemContext);
|
|
7
|
-
return props.children(itemContext);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
//#endregion
|
|
11
|
-
export { accordion_item_context_default as default };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
2
|
-
import { ComponentProps, PropsWithChildren } from "react";
|
|
3
|
-
import { ItemProps } from "@zag-js/accordion";
|
|
4
|
-
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
//#region src/components/accordion/anatomy/accordion-item.d.ts
|
|
7
|
-
interface AccordionItemProps extends PropsWithChildren, PropsWithElement, ItemProps, ComponentProps<'div'> {}
|
|
8
|
-
declare function export_default(props: AccordionItemProps): react_jsx_runtime1.JSX.Element;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { AccordionItemProps, export_default };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { AccordionRootContext } from "../modules/accordion-root-context.js";
|
|
2
|
-
import { AccordionItemContext } from "../modules/accordion-item-context.js";
|
|
3
|
-
import { useContext } from "react";
|
|
4
|
-
import { splitItemProps } from "@zag-js/accordion";
|
|
5
|
-
import { mergeProps } from "@zag-js/react";
|
|
6
|
-
import { classesAccordion } from "@skeletonlabs/skeleton-common";
|
|
7
|
-
import { jsx } from "react/jsx-runtime";
|
|
8
|
-
|
|
9
|
-
//#region src/components/accordion/anatomy/accordion-item.tsx
|
|
10
|
-
function accordion_item_default(props) {
|
|
11
|
-
const rootContext = useContext(AccordionRootContext);
|
|
12
|
-
const [itemProps, componentProps] = splitItemProps(props);
|
|
13
|
-
const { element, children,...restAttributes } = componentProps;
|
|
14
|
-
const attributes = mergeProps(rootContext.api.getItemProps(itemProps), { className: classesAccordion.item }, restAttributes);
|
|
15
|
-
return /* @__PURE__ */ jsx(AccordionItemContext.Provider, {
|
|
16
|
-
value: {
|
|
17
|
-
itemProps,
|
|
18
|
-
itemState: rootContext.api.getItemState(itemProps)
|
|
19
|
-
},
|
|
20
|
-
children: element ? element({ attributes }) : /* @__PURE__ */ jsx("div", {
|
|
21
|
-
...attributes,
|
|
22
|
-
children
|
|
23
|
-
})
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
//#endregion
|
|
28
|
-
export { accordion_item_default as default };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AccordionRootContextType } from "../modules/accordion-root-context.js";
|
|
2
|
-
import { ReactNode } from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/components/accordion/anatomy/accordion-root-context.d.ts
|
|
5
|
-
interface AccordionRootContextProps {
|
|
6
|
-
children: (context: AccordionRootContextType) => ReactNode;
|
|
7
|
-
}
|
|
8
|
-
declare function export_default(props: AccordionRootContextProps): ReactNode;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { AccordionRootContextProps, export_default };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AccordionRootContext } from "../modules/accordion-root-context.js";
|
|
2
|
-
import { useContext } from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/components/accordion/anatomy/accordion-root-context.tsx
|
|
5
|
-
function accordion_root_context_default(props) {
|
|
6
|
-
const rootContext = useContext(AccordionRootContext);
|
|
7
|
-
return props.children(rootContext);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
//#endregion
|
|
11
|
-
export { accordion_root_context_default as default };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
2
|
-
import { ComponentProps, PropsWithChildren } from "react";
|
|
3
|
-
import { Props } from "@zag-js/accordion";
|
|
4
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
//#region src/components/accordion/anatomy/accordion-root.d.ts
|
|
7
|
-
interface AccordionRootProps extends PropsWithChildren, PropsWithElement, Omit<Props, 'id'>, Omit<ComponentProps<'div'>, 'id' | 'defaultValue' | 'dir'> {}
|
|
8
|
-
declare function export_default(props: AccordionRootProps): react_jsx_runtime0.JSX.Element;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { AccordionRootProps, export_default };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { AccordionRootContext } from "../modules/accordion-root-context.js";
|
|
2
|
-
import { useId } from "react";
|
|
3
|
-
import { connect, machine, splitProps } from "@zag-js/accordion";
|
|
4
|
-
import { mergeProps, normalizeProps, useMachine } 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/accordion-root.tsx
|
|
9
|
-
function accordion_root_default(props) {
|
|
10
|
-
const [machineProps, componentProps] = splitProps(props);
|
|
11
|
-
const { element, children,...restAttributes } = componentProps;
|
|
12
|
-
const service = useMachine(machine, {
|
|
13
|
-
id: useId(),
|
|
14
|
-
...machineProps
|
|
15
|
-
});
|
|
16
|
-
const api = connect(service, normalizeProps);
|
|
17
|
-
const attributes = mergeProps(api.getRootProps(), { className: classesAccordion.root }, restAttributes);
|
|
18
|
-
return /* @__PURE__ */ jsx(AccordionRootContext.Provider, {
|
|
19
|
-
value: { api },
|
|
20
|
-
children: element ? element({ attributes }) : /* @__PURE__ */ jsx("div", {
|
|
21
|
-
...attributes,
|
|
22
|
-
children
|
|
23
|
-
})
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
//#endregion
|
|
28
|
-
export { accordion_root_default as default };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
2
|
-
import { ComponentProps, PropsWithChildren } from "react";
|
|
3
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region src/components/accordion/anatomy/accordion-trigger.d.ts
|
|
6
|
-
interface AccordionTriggerProps extends PropsWithChildren, PropsWithElement, ComponentProps<'button'> {}
|
|
7
|
-
declare function export_default(props: AccordionTriggerProps): react_jsx_runtime0.JSX.Element | null;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { AccordionTriggerProps, export_default };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { AccordionRootContext } from "../modules/accordion-root-context.js";
|
|
2
|
-
import { AccordionItemContext } from "../modules/accordion-item-context.js";
|
|
3
|
-
import { useContext } from "react";
|
|
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/accordion-trigger.tsx
|
|
9
|
-
function accordion_trigger_default(props) {
|
|
10
|
-
const rootContext = useContext(AccordionRootContext);
|
|
11
|
-
const itemContext = useContext(AccordionItemContext);
|
|
12
|
-
const { element, children,...restAttributes } = props;
|
|
13
|
-
const attributes = mergeProps(rootContext.api.getItemTriggerProps(itemContext.itemProps), { className: classesAccordion.trigger }, restAttributes);
|
|
14
|
-
return element ? element({ attributes }) : /* @__PURE__ */ jsx("button", {
|
|
15
|
-
...attributes,
|
|
16
|
-
children
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
//#endregion
|
|
21
|
-
export { accordion_trigger_default as default };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { export_default } from "../anatomy/accordion-root.js";
|
|
2
|
-
import { export_default as export_default$1 } from "../anatomy/accordion-item.js";
|
|
3
|
-
import { export_default as export_default$2 } from "../anatomy/accordion-heading.js";
|
|
4
|
-
import { export_default as export_default$3 } from "../anatomy/accordion-trigger.js";
|
|
5
|
-
import { export_default as export_default$4 } from "../anatomy/accordion-indicator.js";
|
|
6
|
-
import { export_default as export_default$5 } from "../anatomy/accordion-content.js";
|
|
7
|
-
import { export_default as export_default$6 } from "../anatomy/accordion-root-context.js";
|
|
8
|
-
import { export_default as export_default$7 } from "../anatomy/accordion-item-context.js";
|
|
9
|
-
|
|
10
|
-
//#region src/components/accordion/modules/accordion-anatomy.d.ts
|
|
11
|
-
declare const Accordion: typeof export_default & {
|
|
12
|
-
Context: typeof export_default$6;
|
|
13
|
-
Item: typeof export_default$1;
|
|
14
|
-
ItemContext: typeof export_default$7;
|
|
15
|
-
Heading: typeof export_default$2;
|
|
16
|
-
Trigger: typeof export_default$3;
|
|
17
|
-
Indicator: typeof export_default$4;
|
|
18
|
-
Content: typeof export_default$5;
|
|
19
|
-
};
|
|
20
|
-
//#endregion
|
|
21
|
-
export { Accordion };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import accordion_root_default from "../anatomy/accordion-root.js";
|
|
2
|
-
import accordion_item_default from "../anatomy/accordion-item.js";
|
|
3
|
-
import accordion_heading_default from "../anatomy/accordion-heading.js";
|
|
4
|
-
import accordion_trigger_default from "../anatomy/accordion-trigger.js";
|
|
5
|
-
import accordion_indicator_default from "../anatomy/accordion-indicator.js";
|
|
6
|
-
import accordion_content_default from "../anatomy/accordion-content.js";
|
|
7
|
-
import accordion_root_context_default from "../anatomy/accordion-root-context.js";
|
|
8
|
-
import accordion_item_context_default from "../anatomy/accordion-item-context.js";
|
|
9
|
-
|
|
10
|
-
//#region src/components/accordion/modules/accordion-anatomy.ts
|
|
11
|
-
const Accordion = Object.assign(accordion_root_default, {
|
|
12
|
-
Context: accordion_root_context_default,
|
|
13
|
-
Item: accordion_item_default,
|
|
14
|
-
ItemContext: accordion_item_context_default,
|
|
15
|
-
Heading: accordion_heading_default,
|
|
16
|
-
Trigger: accordion_trigger_default,
|
|
17
|
-
Indicator: accordion_indicator_default,
|
|
18
|
-
Content: accordion_content_default
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
//#endregion
|
|
22
|
-
export { Accordion };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import "react";
|
|
2
|
-
import { ItemProps, ItemState } from "@zag-js/accordion";
|
|
3
|
-
|
|
4
|
-
//#region src/components/accordion/modules/accordion-item-context.d.ts
|
|
5
|
-
interface AccordionItemContextType {
|
|
6
|
-
itemProps: ItemProps;
|
|
7
|
-
itemState: ItemState;
|
|
8
|
-
}
|
|
9
|
-
//#endregion
|
|
10
|
-
export { AccordionItemContextType };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
2
|
-
import { ComponentProps } from "react";
|
|
3
|
-
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region src/components/avatar/anatomy/avatar-fallback.d.ts
|
|
6
|
-
interface AvatarFallbackProps extends PropsWithElement, ComponentProps<'span'> {}
|
|
7
|
-
declare function export_default(props: AvatarFallbackProps): react_jsx_runtime7.JSX.Element | null;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { AvatarFallbackProps, export_default };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { AvatarRootContext } from "../modules/avatar-root-context.js";
|
|
5
|
-
import { useContext } from "react";
|
|
6
|
-
import { mergeProps } from "@zag-js/react";
|
|
7
|
-
import { classesAvatar } from "@skeletonlabs/skeleton-common";
|
|
8
|
-
import { jsx } from "react/jsx-runtime";
|
|
9
|
-
|
|
10
|
-
//#region src/components/avatar/anatomy/avatar-fallback.tsx
|
|
11
|
-
function avatar_fallback_default(props) {
|
|
12
|
-
const rootContext = useContext(AvatarRootContext);
|
|
13
|
-
const { element, children,...restAttributes } = props;
|
|
14
|
-
const attributes = mergeProps(rootContext.api.getFallbackProps(), { className: classesAvatar.fallback }, restAttributes);
|
|
15
|
-
return element ? element({ attributes }) : /* @__PURE__ */ jsx("span", {
|
|
16
|
-
...attributes,
|
|
17
|
-
children
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
//#endregion
|
|
22
|
-
export { avatar_fallback_default as default };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
2
|
-
import { ComponentProps } from "react";
|
|
3
|
-
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region src/components/avatar/anatomy/avatar-image.d.ts
|
|
6
|
-
interface AvatarImageProps extends PropsWithElement, ComponentProps<'img'> {}
|
|
7
|
-
declare function export_default(props: AvatarImageProps): react_jsx_runtime6.JSX.Element | null;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { AvatarImageProps, export_default };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { AvatarRootContext } from "../modules/avatar-root-context.js";
|
|
5
|
-
import { useContext } from "react";
|
|
6
|
-
import { mergeProps } from "@zag-js/react";
|
|
7
|
-
import { classesAvatar } from "@skeletonlabs/skeleton-common";
|
|
8
|
-
import { jsx } from "react/jsx-runtime";
|
|
9
|
-
|
|
10
|
-
//#region src/components/avatar/anatomy/avatar-image.tsx
|
|
11
|
-
function avatar_image_default(props) {
|
|
12
|
-
const rootContext = useContext(AvatarRootContext);
|
|
13
|
-
const { element,...restAttributes } = props;
|
|
14
|
-
const attributes = mergeProps(rootContext.api.getImageProps(), { className: classesAvatar.image }, restAttributes);
|
|
15
|
-
return element ? element({ attributes }) : /* @__PURE__ */ jsx("img", { ...attributes });
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
|
-
export { avatar_image_default as default };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AvatarRootContextType } from "../modules/avatar-root-context.js";
|
|
2
|
-
import { ReactNode } from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/components/avatar/anatomy/avatar-root-context.d.ts
|
|
5
|
-
interface AvatarRootContextProps {
|
|
6
|
-
children: (context: AvatarRootContextType) => ReactNode;
|
|
7
|
-
}
|
|
8
|
-
declare function export_default(props: AvatarRootContextProps): ReactNode;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { AvatarRootContextProps, export_default };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AvatarRootContext } from "../modules/avatar-root-context.js";
|
|
2
|
-
import { useContext } from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/components/avatar/anatomy/avatar-root-context.tsx
|
|
5
|
-
function avatar_root_context_default(props) {
|
|
6
|
-
const rootContext = useContext(AvatarRootContext);
|
|
7
|
-
return props.children(rootContext);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
//#endregion
|
|
11
|
-
export { avatar_root_context_default as default };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
2
|
-
import { ComponentProps } from "react";
|
|
3
|
-
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
4
|
-
import { Props } from "@zag-js/avatar";
|
|
5
|
-
|
|
6
|
-
//#region src/components/avatar/anatomy/avatar-root.d.ts
|
|
7
|
-
interface AvatarRootProps extends PropsWithElement, Omit<Props, 'id'>, Omit<ComponentProps<'div'>, 'id' | 'dir'> {}
|
|
8
|
-
declare function export_default(props: AvatarRootProps): react_jsx_runtime5.JSX.Element;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { AvatarRootProps, export_default };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { AvatarRootContext } from "../modules/avatar-root-context.js";
|
|
5
|
-
import { useId } from "react";
|
|
6
|
-
import { mergeProps, normalizeProps, useMachine } from "@zag-js/react";
|
|
7
|
-
import { classesAvatar } from "@skeletonlabs/skeleton-common";
|
|
8
|
-
import { jsx } from "react/jsx-runtime";
|
|
9
|
-
import { connect, machine, splitProps } from "@zag-js/avatar";
|
|
10
|
-
|
|
11
|
-
//#region src/components/avatar/anatomy/avatar-root.tsx
|
|
12
|
-
function avatar_root_default(props) {
|
|
13
|
-
const [machineProps, componentProps] = splitProps(props);
|
|
14
|
-
const { element, children,...restAttributes } = componentProps;
|
|
15
|
-
const service = useMachine(machine, {
|
|
16
|
-
id: useId(),
|
|
17
|
-
...machineProps
|
|
18
|
-
});
|
|
19
|
-
const api = connect(service, normalizeProps);
|
|
20
|
-
const attributes = mergeProps(api.getRootProps(), { className: classesAvatar.root }, restAttributes);
|
|
21
|
-
return /* @__PURE__ */ jsx(AvatarRootContext.Provider, {
|
|
22
|
-
value: { api },
|
|
23
|
-
children: element ? element({ attributes }) : /* @__PURE__ */ jsx("div", {
|
|
24
|
-
...attributes,
|
|
25
|
-
children
|
|
26
|
-
})
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
//#endregion
|
|
31
|
-
export { avatar_root_default as default };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { export_default } from "../anatomy/avatar-root.js";
|
|
2
|
-
import { export_default as export_default$1 } from "../anatomy/avatar-image.js";
|
|
3
|
-
import { export_default as export_default$2 } from "../anatomy/avatar-fallback.js";
|
|
4
|
-
import { export_default as export_default$3 } from "../anatomy/avatar-root-context.js";
|
|
5
|
-
|
|
6
|
-
//#region src/components/avatar/modules/avatar-anatomy.d.ts
|
|
7
|
-
declare const Avatar: typeof export_default & {
|
|
8
|
-
Context: typeof export_default$3;
|
|
9
|
-
Image: typeof export_default$1;
|
|
10
|
-
Fallback: typeof export_default$2;
|
|
11
|
-
};
|
|
12
|
-
//#endregion
|
|
13
|
-
export { Avatar };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import avatar_root_default from "../anatomy/avatar-root.js";
|
|
2
|
-
import avatar_image_default from "../anatomy/avatar-image.js";
|
|
3
|
-
import avatar_fallback_default from "../anatomy/avatar-fallback.js";
|
|
4
|
-
import avatar_root_context_default from "../anatomy/avatar-root-context.js";
|
|
5
|
-
|
|
6
|
-
//#region src/components/avatar/modules/avatar-anatomy.ts
|
|
7
|
-
const Avatar = Object.assign(avatar_root_default, {
|
|
8
|
-
Context: avatar_root_context_default,
|
|
9
|
-
Image: avatar_image_default,
|
|
10
|
-
Fallback: avatar_fallback_default
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
//#endregion
|
|
14
|
-
export { Avatar };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
2
|
-
import { ComponentProps } from "react";
|
|
3
|
-
import * as react_jsx_runtime15 from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region src/components/rating-group/anatomy/rating-group-control.d.ts
|
|
6
|
-
interface RatingGroupControlProps extends PropsWithElement, Omit<ComponentProps<'div'>, 'id' | 'defaultValue' | 'dir'> {}
|
|
7
|
-
declare function export_default(props: RatingGroupControlProps): react_jsx_runtime15.JSX.Element | null;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { RatingGroupControlProps, export_default };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { RatingGroupRootContext } from "../modules/rating-group-root-context.js";
|
|
2
|
-
import { useContext } from "react";
|
|
3
|
-
import { mergeProps } from "@zag-js/react";
|
|
4
|
-
import { classesRatingGroup } from "@skeletonlabs/skeleton-common";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
|
|
7
|
-
//#region src/components/rating-group/anatomy/rating-group-control.tsx
|
|
8
|
-
function rating_group_control_default(props) {
|
|
9
|
-
const rootContext = useContext(RatingGroupRootContext);
|
|
10
|
-
const { element, children,...restAttributes } = props;
|
|
11
|
-
const attributes = mergeProps(rootContext.api.getControlProps(), { className: classesRatingGroup.control }, restAttributes);
|
|
12
|
-
return element ? element({ attributes }) : /* @__PURE__ */ jsx("div", {
|
|
13
|
-
...attributes,
|
|
14
|
-
children
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
|
-
export { rating_group_control_default as default };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
2
|
-
import { ComponentProps } from "react";
|
|
3
|
-
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region src/components/rating-group/anatomy/rating-group-hidden-input.d.ts
|
|
6
|
-
interface RatingGroupHiddenInputProps extends PropsWithElement, Omit<ComponentProps<'input'>, 'id' | 'defaultValue' | 'dir' | 'children'> {}
|
|
7
|
-
declare function export_default(props: RatingGroupHiddenInputProps): react_jsx_runtime17.JSX.Element | null;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { RatingGroupHiddenInputProps, export_default };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { RatingGroupRootContext } from "../modules/rating-group-root-context.js";
|
|
2
|
-
import { useContext } from "react";
|
|
3
|
-
import { mergeProps } from "@zag-js/react";
|
|
4
|
-
import { classesRatingGroup } from "@skeletonlabs/skeleton-common";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
|
|
7
|
-
//#region src/components/rating-group/anatomy/rating-group-hidden-input.tsx
|
|
8
|
-
function rating_group_hidden_input_default(props) {
|
|
9
|
-
const rootContext = useContext(RatingGroupRootContext);
|
|
10
|
-
const { element,...restAttributes } = props;
|
|
11
|
-
const attributes = mergeProps(rootContext.api.getHiddenInputProps(), { className: classesRatingGroup.hiddenInput }, restAttributes);
|
|
12
|
-
return element ? element({ attributes }) : /* @__PURE__ */ jsx("input", { ...attributes });
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
//#endregion
|
|
16
|
-
export { rating_group_hidden_input_default as default };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { RatingGroupItemContextType } from "../modules/rating-group-item-context.js";
|
|
2
|
-
import { ReactNode } from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/components/rating-group/anatomy/rating-group-item-context.d.ts
|
|
5
|
-
interface RatingGroupItemContextProps {
|
|
6
|
-
children: (context: RatingGroupItemContextType) => ReactNode;
|
|
7
|
-
}
|
|
8
|
-
declare function export_default(props: RatingGroupItemContextProps): ReactNode;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { RatingGroupItemContextProps, export_default };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { RatingGroupItemContext } from "../modules/rating-group-item-context.js";
|
|
2
|
-
import { useContext } from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/components/rating-group/anatomy/rating-group-item-context.tsx
|
|
5
|
-
function rating_group_item_context_default(props) {
|
|
6
|
-
const itemContext = useContext(RatingGroupItemContext);
|
|
7
|
-
return props.children(itemContext);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
//#endregion
|
|
11
|
-
export { rating_group_item_context_default as default };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
2
|
-
import { ComponentProps, ReactNode } from "react";
|
|
3
|
-
import * as react_jsx_runtime16 from "react/jsx-runtime";
|
|
4
|
-
import { ItemProps } from "@zag-js/rating-group";
|
|
5
|
-
|
|
6
|
-
//#region src/components/rating-group/anatomy/rating-group-item.d.ts
|
|
7
|
-
interface RatingGroupItemProps extends PropsWithElement, ItemProps, Omit<ComponentProps<'span'>, 'id' | 'defaultValue' | 'dir'> {
|
|
8
|
-
/**
|
|
9
|
-
* The content to render when the item is in the empty state.
|
|
10
|
-
*
|
|
11
|
-
* @default StarEmpty (SVG)
|
|
12
|
-
*/
|
|
13
|
-
empty?: ReactNode;
|
|
14
|
-
/**
|
|
15
|
-
* The content to render when the item is in the half state.
|
|
16
|
-
*
|
|
17
|
-
* @default StarHalf (SVG)
|
|
18
|
-
*/
|
|
19
|
-
half?: ReactNode;
|
|
20
|
-
/**
|
|
21
|
-
* The content to render when the item is in the full state.
|
|
22
|
-
*
|
|
23
|
-
* @default StarFull (SVG)
|
|
24
|
-
*/
|
|
25
|
-
full?: ReactNode;
|
|
26
|
-
}
|
|
27
|
-
declare function export_default(props: RatingGroupItemProps): react_jsx_runtime16.JSX.Element;
|
|
28
|
-
//#endregion
|
|
29
|
-
export { RatingGroupItemProps, export_default };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { RatingGroupRootContext } from "../modules/rating-group-root-context.js";
|
|
2
|
-
import { RatingGroupItemContext } from "../modules/rating-group-item-context.js";
|
|
3
|
-
import star_empty_default from "../../../internal/components/star-empty.js";
|
|
4
|
-
import star_half_default from "../../../internal/components/star-half.js";
|
|
5
|
-
import star_full_default from "../../../internal/components/star-full.js";
|
|
6
|
-
import { useContext } from "react";
|
|
7
|
-
import { mergeProps } from "@zag-js/react";
|
|
8
|
-
import { classesAccordion } from "@skeletonlabs/skeleton-common";
|
|
9
|
-
import { jsx } from "react/jsx-runtime";
|
|
10
|
-
import { splitItemProps } from "@zag-js/rating-group";
|
|
11
|
-
|
|
12
|
-
//#region src/components/rating-group/anatomy/rating-group-item.tsx
|
|
13
|
-
function rating_group_item_default(props) {
|
|
14
|
-
const rootContext = useContext(RatingGroupRootContext);
|
|
15
|
-
const [itemProps, componentProps] = splitItemProps(props);
|
|
16
|
-
const { element, children, empty = /* @__PURE__ */ jsx(star_empty_default, {}), half = /* @__PURE__ */ jsx(star_half_default, {}), full = /* @__PURE__ */ jsx(star_full_default, {}),...restAttributes } = componentProps;
|
|
17
|
-
const attributes = mergeProps(rootContext.api.getItemProps(itemProps), { className: classesAccordion.item }, restAttributes);
|
|
18
|
-
const itemState = rootContext.api.getItemState(itemProps);
|
|
19
|
-
return /* @__PURE__ */ jsx(RatingGroupItemContext.Provider, {
|
|
20
|
-
value: { itemState },
|
|
21
|
-
children: element ? element({ attributes }) : /* @__PURE__ */ jsx("div", {
|
|
22
|
-
...attributes,
|
|
23
|
-
children: children ? children : !itemState.highlighted ? empty : itemState.half ? half : full
|
|
24
|
-
})
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
//#endregion
|
|
29
|
-
export { rating_group_item_default as default };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { PropsWithElement } from "../../../internal/props-with-element.js";
|
|
2
|
-
import { ComponentProps } from "react";
|
|
3
|
-
import * as react_jsx_runtime14 from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region src/components/rating-group/anatomy/rating-group-label.d.ts
|
|
6
|
-
interface RatingGroupLabelProps extends PropsWithElement, Omit<ComponentProps<'label'>, 'id' | 'defaultValue' | 'dir'> {}
|
|
7
|
-
declare function export_default(props: RatingGroupLabelProps): react_jsx_runtime14.JSX.Element | null;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { RatingGroupLabelProps, export_default };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { RatingGroupRootContext } from "../modules/rating-group-root-context.js";
|
|
2
|
-
import { useContext } from "react";
|
|
3
|
-
import { mergeProps } from "@zag-js/react";
|
|
4
|
-
import { classesRatingGroup } from "@skeletonlabs/skeleton-common";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
|
|
7
|
-
//#region src/components/rating-group/anatomy/rating-group-label.tsx
|
|
8
|
-
function rating_group_label_default(props) {
|
|
9
|
-
const rootContext = useContext(RatingGroupRootContext);
|
|
10
|
-
const { element, children,...restAttributes } = props;
|
|
11
|
-
const attributes = mergeProps(rootContext.api.getLabelProps(), { className: classesRatingGroup.label }, restAttributes);
|
|
12
|
-
return element ? element({ attributes }) : /* @__PURE__ */ jsx("label", {
|
|
13
|
-
...attributes,
|
|
14
|
-
children
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
|
-
export { rating_group_label_default as default };
|