@skeletonlabs/skeleton-react 4.0.2 → 4.1.1

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.
Files changed (92) hide show
  1. package/dist/components/accordion/anatomy/item-content.d.ts +2 -2
  2. package/dist/components/accordion/anatomy/item-indicator.d.ts +2 -2
  3. package/dist/components/accordion/anatomy/item-trigger.d.ts +2 -2
  4. package/dist/components/accordion/anatomy/item.d.ts +2 -2
  5. package/dist/components/accordion/anatomy/root.d.ts +2 -2
  6. package/dist/components/app-bar/anatomy/headline.d.ts +2 -2
  7. package/dist/components/app-bar/anatomy/lead.d.ts +2 -2
  8. package/dist/components/app-bar/anatomy/root.d.ts +2 -2
  9. package/dist/components/app-bar/anatomy/toolbar.d.ts +2 -2
  10. package/dist/components/app-bar/anatomy/trail.d.ts +2 -2
  11. package/dist/components/avatar/anatomy/fallback.d.ts +2 -2
  12. package/dist/components/avatar/anatomy/image.d.ts +2 -2
  13. package/dist/components/avatar/anatomy/root-provider.d.ts +2 -2
  14. package/dist/components/avatar/anatomy/root.d.ts +2 -2
  15. package/dist/components/collapsible/anatomy/indicator.d.ts +2 -2
  16. package/dist/components/collapsible/anatomy/root-provider.d.ts +2 -2
  17. package/dist/components/collapsible/anatomy/root.d.ts +2 -2
  18. package/dist/components/collapsible/anatomy/trigger.d.ts +2 -2
  19. package/dist/components/date-picker/anatomy/root-provider.d.ts +2 -2
  20. package/dist/components/date-picker/anatomy/table-cell-trigger.d.ts +2 -2
  21. package/dist/components/date-picker/anatomy/table-cell.d.ts +2 -2
  22. package/dist/components/date-picker/anatomy/table-head.d.ts +2 -2
  23. package/dist/components/date-picker/anatomy/table-header.d.ts +2 -2
  24. package/dist/components/date-picker/anatomy/view.d.ts +1 -1
  25. package/dist/components/dialog/anatomy/backdrop.d.ts +2 -2
  26. package/dist/components/dialog/anatomy/close-trigger.d.ts +2 -2
  27. package/dist/components/dialog/anatomy/content.d.ts +2 -2
  28. package/dist/components/dialog/anatomy/description.d.ts +2 -2
  29. package/dist/components/dialog/anatomy/positioner.d.ts +2 -2
  30. package/dist/components/dialog/anatomy/root-provider.d.ts +2 -2
  31. package/dist/components/dialog/anatomy/title.d.ts +2 -2
  32. package/dist/components/dialog/anatomy/trigger.d.ts +2 -2
  33. package/dist/components/file-upload/anatomy/dropzone.d.ts +2 -2
  34. package/dist/components/file-upload/anatomy/hidden-input.d.ts +2 -2
  35. package/dist/components/file-upload/anatomy/item-delete-trigger.d.ts +2 -2
  36. package/dist/components/file-upload/anatomy/item-group.d.ts +2 -2
  37. package/dist/components/file-upload/anatomy/item-name.d.ts +2 -2
  38. package/dist/components/file-upload/anatomy/item-size-text.d.ts +2 -2
  39. package/dist/components/file-upload/anatomy/item.d.ts +2 -2
  40. package/dist/components/file-upload/anatomy/label.d.ts +2 -2
  41. package/dist/components/file-upload/anatomy/root-provider.d.ts +2 -2
  42. package/dist/components/file-upload/anatomy/root.d.ts +2 -2
  43. package/dist/components/file-upload/anatomy/trigger.d.ts +2 -2
  44. package/dist/components/listbox/anatomy/content.d.ts +2 -2
  45. package/dist/components/listbox/anatomy/input.d.ts +2 -2
  46. package/dist/components/listbox/anatomy/item-group-label.d.ts +2 -2
  47. package/dist/components/listbox/anatomy/item-group.d.ts +2 -2
  48. package/dist/components/listbox/anatomy/item-indicator.d.ts +2 -2
  49. package/dist/components/listbox/anatomy/item-text.d.ts +2 -2
  50. package/dist/components/listbox/anatomy/label.d.ts +2 -2
  51. package/dist/components/listbox/anatomy/root.d.ts +2 -2
  52. package/dist/components/slider/anatomy/control.d.ts +2 -2
  53. package/dist/components/slider/anatomy/marker-group.d.ts +2 -2
  54. package/dist/components/slider/anatomy/marker.d.ts +2 -2
  55. package/dist/components/slider/anatomy/track.d.ts +2 -2
  56. package/dist/components/slider/anatomy/value-text.d.ts +2 -2
  57. package/dist/components/switch/anatomy/hidden-input.d.ts +2 -2
  58. package/dist/components/switch/anatomy/label.d.ts +2 -2
  59. package/dist/components/toggle-group/anatomy/item.d.ts +11 -0
  60. package/dist/components/toggle-group/anatomy/item.js +22 -0
  61. package/dist/components/toggle-group/anatomy/root-context.d.ts +11 -0
  62. package/dist/components/toggle-group/anatomy/root-context.js +13 -0
  63. package/dist/components/toggle-group/anatomy/root-provider.d.ts +13 -0
  64. package/dist/components/toggle-group/anatomy/root-provider.js +21 -0
  65. package/dist/components/toggle-group/anatomy/root.d.ts +11 -0
  66. package/dist/components/toggle-group/anatomy/root.js +25 -0
  67. package/dist/components/toggle-group/modules/anatomy.d.ts +14 -0
  68. package/dist/components/toggle-group/modules/anatomy.js +15 -0
  69. package/dist/components/toggle-group/modules/provider.d.ts +8 -0
  70. package/dist/components/toggle-group/modules/provider.js +15 -0
  71. package/dist/components/toggle-group/modules/root-context.js +8 -0
  72. package/dist/components/tooltip/anatomy/arrow-tip.d.ts +2 -2
  73. package/dist/components/tooltip/anatomy/arrow.d.ts +2 -2
  74. package/dist/components/tooltip/anatomy/content.d.ts +2 -2
  75. package/dist/components/tooltip/anatomy/positioner.d.ts +2 -2
  76. package/dist/components/tooltip/anatomy/root-provider.d.ts +2 -2
  77. package/dist/components/tooltip/anatomy/root.d.ts +2 -2
  78. package/dist/components/tooltip/anatomy/trigger.d.ts +2 -2
  79. package/dist/components/tree-view/anatomy/branch-content.d.ts +2 -2
  80. package/dist/components/tree-view/anatomy/branch-control.d.ts +2 -2
  81. package/dist/components/tree-view/anatomy/branch-indent-guide.d.ts +2 -2
  82. package/dist/components/tree-view/anatomy/branch-indicator.d.ts +2 -2
  83. package/dist/components/tree-view/anatomy/branch-text.d.ts +2 -2
  84. package/dist/components/tree-view/anatomy/branch.d.ts +2 -2
  85. package/dist/components/tree-view/anatomy/item.d.ts +2 -2
  86. package/dist/components/tree-view/anatomy/node-provider.d.ts +2 -2
  87. package/dist/components/tree-view/anatomy/root-provider.d.ts +2 -2
  88. package/dist/components/tree-view/anatomy/root.d.ts +2 -2
  89. package/dist/components/tree-view/anatomy/tree.d.ts +2 -2
  90. package/dist/index.d.ts +7 -1
  91. package/dist/index.js +3 -1
  92. package/package.json +28 -27
@@ -1,11 +1,11 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react_jsx_runtime16 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime17 from "react/jsx-runtime";
4
4
  import { Props } from "@zag-js/file-upload";
5
5
 
6
6
  //#region src/components/file-upload/anatomy/root.d.ts
7
7
  interface FileUploadRootProps extends Omit<Props, 'id'>, PropsWithElement<'div'>, Omit<HTMLAttributes<'div'>, 'id' | 'dir'> {}
8
- declare function Root(props: FileUploadRootProps): react_jsx_runtime16.JSX.Element;
8
+ declare function Root(props: FileUploadRootProps): react_jsx_runtime17.JSX.Element;
9
9
  //#endregion
10
10
  export { FileUploadRootProps, Root };
11
11
  //# sourceMappingURL=root.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react53 from "react";
3
+ import * as react55 from "react";
4
4
 
5
5
  //#region src/components/file-upload/anatomy/trigger.d.ts
6
6
  interface FileUploadTriggerProps extends PropsWithElement<'button'>, HTMLAttributes<'button'> {}
7
- declare function Trigger(props: FileUploadTriggerProps): react53.JSX.Element;
7
+ declare function Trigger(props: FileUploadTriggerProps): react55.JSX.Element;
8
8
  //#endregion
9
9
  export { FileUploadTriggerProps, Trigger };
10
10
  //# sourceMappingURL=trigger.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react59 from "react";
3
+ import * as react61 from "react";
4
4
 
5
5
  //#region src/components/listbox/anatomy/content.d.ts
6
6
  interface ListboxContentProps extends PropsWithElement<'ul'>, HTMLAttributes<'ul'> {}
7
- declare function Content(props: ListboxContentProps): react59.JSX.Element;
7
+ declare function Content(props: ListboxContentProps): react61.JSX.Element;
8
8
  //#endregion
9
9
  export { Content, ListboxContentProps };
10
10
  //# sourceMappingURL=content.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react58 from "react";
3
+ import * as react57 from "react";
4
4
 
5
5
  //#region src/components/listbox/anatomy/input.d.ts
6
6
  interface ListboxInputProps extends PropsWithElement<'input'>, Omit<HTMLAttributes<'input'>, 'children'> {}
7
- declare function Input(props: ListboxInputProps): react58.JSX.Element;
7
+ declare function Input(props: ListboxInputProps): react57.JSX.Element;
8
8
  //#endregion
9
9
  export { Input, ListboxInputProps };
10
10
  //# sourceMappingURL=input.d.ts.map
@@ -1,11 +1,11 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react57 from "react";
3
+ import * as react56 from "react";
4
4
  import { ItemGroupLabelProps } from "@zag-js/listbox";
5
5
 
6
6
  //#region src/components/listbox/anatomy/item-group-label.d.ts
7
7
  interface ListboxItemGroupLabelProps extends Omit<ItemGroupLabelProps, 'htmlFor'>, PropsWithElement<'div'>, HTMLAttributes<'div'> {}
8
- declare function ItemGroupLabel(props: ListboxItemGroupLabelProps): react57.JSX.Element;
8
+ declare function ItemGroupLabel(props: ListboxItemGroupLabelProps): react56.JSX.Element;
9
9
  //#endregion
10
10
  export { ItemGroupLabel, ListboxItemGroupLabelProps };
11
11
  //# sourceMappingURL=item-group-label.d.ts.map
@@ -1,11 +1,11 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react_jsx_runtime19 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime20 from "react/jsx-runtime";
4
4
  import { ItemGroupProps } from "@zag-js/listbox";
5
5
 
6
6
  //#region src/components/listbox/anatomy/item-group.d.ts
7
7
  interface ListboxItemGroupProps extends Omit<ItemGroupProps, 'id'>, PropsWithElement<'div'>, Omit<HTMLAttributes<'div'>, 'id'> {}
8
- declare function ItemGroup(props: ListboxItemGroupProps): react_jsx_runtime19.JSX.Element;
8
+ declare function ItemGroup(props: ListboxItemGroupProps): react_jsx_runtime20.JSX.Element;
9
9
  //#endregion
10
10
  export { ItemGroup, ListboxItemGroupProps };
11
11
  //# sourceMappingURL=item-group.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react56 from "react";
3
+ import * as react58 from "react";
4
4
 
5
5
  //#region src/components/listbox/anatomy/item-indicator.d.ts
6
6
  interface ListboxItemIndicatorProps extends PropsWithElement<'span'>, HTMLAttributes<'span'> {}
7
- declare function ItemIndicator(props: ListboxItemIndicatorProps): react56.JSX.Element;
7
+ declare function ItemIndicator(props: ListboxItemIndicatorProps): react58.JSX.Element;
8
8
  //#endregion
9
9
  export { ItemIndicator, ListboxItemIndicatorProps };
10
10
  //# sourceMappingURL=item-indicator.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react60 from "react";
3
+ import * as react59 from "react";
4
4
 
5
5
  //#region src/components/listbox/anatomy/item-text.d.ts
6
6
  interface ListboxItemTextProps extends PropsWithElement<'span'>, HTMLAttributes<'span'> {}
7
- declare function ItemText(props: ListboxItemTextProps): react60.JSX.Element;
7
+ declare function ItemText(props: ListboxItemTextProps): react59.JSX.Element;
8
8
  //#endregion
9
9
  export { ItemText, ListboxItemTextProps };
10
10
  //# sourceMappingURL=item-text.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react61 from "react";
3
+ import * as react60 from "react";
4
4
 
5
5
  //#region src/components/listbox/anatomy/label.d.ts
6
6
  interface ListboxLabelProps extends PropsWithElement<'label'>, HTMLAttributes<'label'> {}
7
- declare function Label(props: ListboxLabelProps): react61.JSX.Element;
7
+ declare function Label(props: ListboxLabelProps): react60.JSX.Element;
8
8
  //#endregion
9
9
  export { Label, ListboxLabelProps };
10
10
  //# sourceMappingURL=label.d.ts.map
@@ -1,11 +1,11 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react_jsx_runtime20 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime19 from "react/jsx-runtime";
4
4
  import { Props } from "@zag-js/listbox";
5
5
 
6
6
  //#region src/components/listbox/anatomy/root.d.ts
7
7
  interface ListboxRootProps extends Omit<Props, 'id'>, PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir' | 'defaultValue' | 'onSelect'> {}
8
- declare function Root(props: ListboxRootProps): react_jsx_runtime20.JSX.Element;
8
+ declare function Root(props: ListboxRootProps): react_jsx_runtime19.JSX.Element;
9
9
  //#endregion
10
10
  export { ListboxRootProps, Root };
11
11
  //# sourceMappingURL=root.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react101 from "react";
3
+ import * as react102 from "react";
4
4
 
5
5
  //#region src/components/slider/anatomy/control.d.ts
6
6
  interface SliderControlProps extends PropsWithElement<'div'>, HTMLAttributes<'div'> {}
7
- declare function Control(props: SliderControlProps): react101.JSX.Element;
7
+ declare function Control(props: SliderControlProps): react102.JSX.Element;
8
8
  //#endregion
9
9
  export { Control, SliderControlProps };
10
10
  //# sourceMappingURL=control.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react102 from "react";
3
+ import * as react103 from "react";
4
4
 
5
5
  //#region src/components/slider/anatomy/marker-group.d.ts
6
6
  interface SliderMarkerGroupProps extends PropsWithElement<'div'>, HTMLAttributes<'div'> {}
7
- declare function MarkerGroup(props: SliderMarkerGroupProps): react102.JSX.Element;
7
+ declare function MarkerGroup(props: SliderMarkerGroupProps): react103.JSX.Element;
8
8
  //#endregion
9
9
  export { MarkerGroup, SliderMarkerGroupProps };
10
10
  //# sourceMappingURL=marker-group.d.ts.map
@@ -1,11 +1,11 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react97 from "react";
3
+ import * as react96 from "react";
4
4
  import { MarkerProps } from "@zag-js/slider";
5
5
 
6
6
  //#region src/components/slider/anatomy/marker.d.ts
7
7
  interface SliderMarkerProps extends MarkerProps, PropsWithElement<'div'>, HTMLAttributes<'div'> {}
8
- declare function Marker(props: SliderMarkerProps): react97.JSX.Element;
8
+ declare function Marker(props: SliderMarkerProps): react96.JSX.Element;
9
9
  //#endregion
10
10
  export { Marker, SliderMarkerProps };
11
11
  //# sourceMappingURL=marker.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react96 from "react";
3
+ import * as react97 from "react";
4
4
 
5
5
  //#region src/components/slider/anatomy/track.d.ts
6
6
  interface SliderTrackProps extends PropsWithElement<'div'>, HTMLAttributes<'div'> {}
7
- declare function Track(props: SliderTrackProps): react96.JSX.Element;
7
+ declare function Track(props: SliderTrackProps): react97.JSX.Element;
8
8
  //#endregion
9
9
  export { SliderTrackProps, Track };
10
10
  //# sourceMappingURL=track.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react103 from "react";
3
+ import * as react101 from "react";
4
4
 
5
5
  //#region src/components/slider/anatomy/value-text.d.ts
6
6
  interface SliderValueTextProps extends PropsWithElement<'output'>, HTMLAttributes<'output'> {}
7
- declare function ValueText(props: SliderValueTextProps): react103.JSX.Element;
7
+ declare function ValueText(props: SliderValueTextProps): react101.JSX.Element;
8
8
  //#endregion
9
9
  export { SliderValueTextProps, ValueText };
10
10
  //# sourceMappingURL=value-text.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react106 from "react";
3
+ import * as react105 from "react";
4
4
 
5
5
  //#region src/components/switch/anatomy/hidden-input.d.ts
6
6
  interface SwitchHiddenInputProps extends PropsWithElement<'input'>, HTMLAttributes<'input', 'children'> {}
7
- declare function HiddenInput(props: SwitchHiddenInputProps): react106.JSX.Element;
7
+ declare function HiddenInput(props: SwitchHiddenInputProps): react105.JSX.Element;
8
8
  //#endregion
9
9
  export { HiddenInput, SwitchHiddenInputProps };
10
10
  //# sourceMappingURL=hidden-input.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react105 from "react";
3
+ import * as react106 from "react";
4
4
 
5
5
  //#region src/components/switch/anatomy/label.d.ts
6
6
  interface SwitchLabelProps extends PropsWithElement<'span'>, HTMLAttributes<'span'> {}
7
- declare function Label(props: SwitchLabelProps): react105.JSX.Element;
7
+ declare function Label(props: SwitchLabelProps): react106.JSX.Element;
8
8
  //#endregion
9
9
  export { Label, SwitchLabelProps };
10
10
  //# sourceMappingURL=label.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
+ import { PropsWithElement } from "../../../internal/props-with-element.js";
3
+ import * as react126 from "react";
4
+ import { ItemProps } from "@zag-js/toggle-group";
5
+
6
+ //#region src/components/toggle-group/anatomy/item.d.ts
7
+ interface ToggleGroupItemProps extends ItemProps, PropsWithElement<'button'>, HTMLAttributes<'button', 'value' | 'disabled'> {}
8
+ declare function Item(props: ToggleGroupItemProps): react126.JSX.Element;
9
+ //#endregion
10
+ export { Item, ToggleGroupItemProps };
11
+ //# sourceMappingURL=item.d.ts.map
@@ -0,0 +1,22 @@
1
+ import { RootContext } from "../modules/root-context.js";
2
+ import { use } from "react";
3
+ import { mergeProps } from "@zag-js/react";
4
+ import { classesToggleGroup } from "@skeletonlabs/skeleton-common";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { splitItemProps } from "@zag-js/toggle-group";
7
+
8
+ //#region src/components/toggle-group/anatomy/item.tsx
9
+ function Item(props) {
10
+ const toggleGroup = use(RootContext);
11
+ const [itemProps, componentProps] = splitItemProps(props);
12
+ const { element, children,...rest } = componentProps;
13
+ const attributes = mergeProps(toggleGroup.getItemProps(itemProps), { className: classesToggleGroup.item }, rest);
14
+ return element ? element(attributes) : /* @__PURE__ */ jsx("button", {
15
+ ...attributes,
16
+ children
17
+ });
18
+ }
19
+
20
+ //#endregion
21
+ export { Item as default };
22
+ //# sourceMappingURL=item.js.map
@@ -0,0 +1,11 @@
1
+ import { useToggleGroup } from "../modules/provider.js";
2
+ import { ReactNode } from "react";
3
+
4
+ //#region src/components/toggle-group/anatomy/root-context.d.ts
5
+ interface ToggleGroupRootContextProps {
6
+ children: (togglegroup: ReturnType<typeof useToggleGroup>) => ReactNode;
7
+ }
8
+ declare function RootContext(props: ToggleGroupRootContextProps): ReactNode;
9
+ //#endregion
10
+ export { RootContext, ToggleGroupRootContextProps };
11
+ //# sourceMappingURL=root-context.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { RootContext } from "../modules/root-context.js";
2
+ import { use } from "react";
3
+
4
+ //#region src/components/toggle-group/anatomy/root-context.tsx
5
+ function RootContext$1(props) {
6
+ const toggleGroup = use(RootContext);
7
+ const { children } = props;
8
+ return children(toggleGroup);
9
+ }
10
+
11
+ //#endregion
12
+ export { RootContext$1 as default };
13
+ //# sourceMappingURL=root-context.js.map
@@ -0,0 +1,13 @@
1
+ import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
+ import { PropsWithElement } from "../../../internal/props-with-element.js";
3
+ import { useToggleGroup } from "../modules/provider.js";
4
+ import * as react_jsx_runtime49 from "react/jsx-runtime";
5
+
6
+ //#region src/components/toggle-group/anatomy/root-provider.d.ts
7
+ interface ToggleGroupRootProviderProps extends PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir'> {
8
+ value: ReturnType<typeof useToggleGroup>;
9
+ }
10
+ declare function ToggleGroupRootProvider(props: ToggleGroupRootProviderProps): react_jsx_runtime49.JSX.Element;
11
+ //#endregion
12
+ export { ToggleGroupRootProvider, ToggleGroupRootProviderProps };
13
+ //# sourceMappingURL=root-provider.d.ts.map
@@ -0,0 +1,21 @@
1
+ import { RootContext } from "../modules/root-context.js";
2
+ import { mergeProps } from "@zag-js/react";
3
+ import { classesToggleGroup } from "@skeletonlabs/skeleton-common";
4
+ import { jsx } from "react/jsx-runtime";
5
+
6
+ //#region src/components/toggle-group/anatomy/root-provider.tsx
7
+ function ToggleGroupRootProvider(props) {
8
+ const { element, children, value: toggleGroup,...rest } = props;
9
+ const attributes = mergeProps(toggleGroup.getRootProps(), { className: classesToggleGroup.root }, rest);
10
+ return /* @__PURE__ */ jsx(RootContext.Provider, {
11
+ value: toggleGroup,
12
+ children: element ? element(attributes) : /* @__PURE__ */ jsx("div", {
13
+ ...attributes,
14
+ children
15
+ })
16
+ });
17
+ }
18
+
19
+ //#endregion
20
+ export { ToggleGroupRootProvider as default };
21
+ //# sourceMappingURL=root-provider.js.map
@@ -0,0 +1,11 @@
1
+ import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
+ import { PropsWithElement } from "../../../internal/props-with-element.js";
3
+ import * as react_jsx_runtime48 from "react/jsx-runtime";
4
+ import { Props } from "@zag-js/toggle-group";
5
+
6
+ //#region src/components/toggle-group/anatomy/root.d.ts
7
+ interface ToggleGroupRootProps extends Omit<Props, 'id'>, PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir' | 'defaultValue'> {}
8
+ declare function ToggleGroupRoot(props: ToggleGroupRootProps): react_jsx_runtime48.JSX.Element;
9
+ //#endregion
10
+ export { ToggleGroupRoot, ToggleGroupRootProps };
11
+ //# sourceMappingURL=root.d.ts.map
@@ -0,0 +1,25 @@
1
+ import { RootContext } from "../modules/root-context.js";
2
+ import { useToggleGroup } from "../modules/provider.js";
3
+ import { mergeProps } from "@zag-js/react";
4
+ import { classesToggleGroup } from "@skeletonlabs/skeleton-common";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { splitProps } from "@zag-js/toggle-group";
7
+
8
+ //#region src/components/toggle-group/anatomy/root.tsx
9
+ function ToggleGroupRoot(props) {
10
+ const [toggleGroupProps, componentProps] = splitProps(props);
11
+ const { element, children,...rest } = componentProps;
12
+ const toggleGroup = useToggleGroup(toggleGroupProps);
13
+ const attributes = mergeProps(toggleGroup.getRootProps(), { className: classesToggleGroup.root }, rest);
14
+ return /* @__PURE__ */ jsx(RootContext.Provider, {
15
+ value: toggleGroup,
16
+ children: element ? element(attributes) : /* @__PURE__ */ jsx("div", {
17
+ ...attributes,
18
+ children
19
+ })
20
+ });
21
+ }
22
+
23
+ //#endregion
24
+ export { ToggleGroupRoot as default };
25
+ //# sourceMappingURL=root.js.map
@@ -0,0 +1,14 @@
1
+ import { Item } from "../anatomy/item.js";
2
+ import { ToggleGroupRoot } from "../anatomy/root.js";
3
+ import { RootContext } from "../anatomy/root-context.js";
4
+ import { ToggleGroupRootProvider } from "../anatomy/root-provider.js";
5
+
6
+ //#region src/components/toggle-group/modules/anatomy.d.ts
7
+ declare const ToggleGroup: typeof ToggleGroupRoot & {
8
+ Provider: typeof ToggleGroupRootProvider;
9
+ Context: typeof RootContext;
10
+ Item: typeof Item;
11
+ };
12
+ //#endregion
13
+ export { ToggleGroup };
14
+ //# sourceMappingURL=anatomy.d.ts.map
@@ -0,0 +1,15 @@
1
+ import Item from "../anatomy/item.js";
2
+ import ToggleGroupRoot from "../anatomy/root.js";
3
+ import RootContext from "../anatomy/root-context.js";
4
+ import ToggleGroupRootProvider from "../anatomy/root-provider.js";
5
+
6
+ //#region src/components/toggle-group/modules/anatomy.ts
7
+ const ToggleGroup = Object.assign(ToggleGroupRoot, {
8
+ Provider: ToggleGroupRootProvider,
9
+ Context: RootContext,
10
+ Item
11
+ });
12
+
13
+ //#endregion
14
+ export { ToggleGroup };
15
+ //# sourceMappingURL=anatomy.js.map
@@ -0,0 +1,8 @@
1
+ import { PropTypes } from "@zag-js/react";
2
+ import { Api, Props } from "@zag-js/toggle-group";
3
+
4
+ //#region src/components/toggle-group/modules/provider.d.ts
5
+ declare function useToggleGroup(props?: Omit<Props, 'id'>): Api<PropTypes>;
6
+ //#endregion
7
+ export { useToggleGroup };
8
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1,15 @@
1
+ import { useId } from "react";
2
+ import { normalizeProps, useMachine } from "@zag-js/react";
3
+ import { connect, machine } from "@zag-js/toggle-group";
4
+
5
+ //#region src/components/toggle-group/modules/provider.ts
6
+ function useToggleGroup(props = {}) {
7
+ return connect(useMachine(machine, {
8
+ id: useId(),
9
+ ...props
10
+ }), normalizeProps);
11
+ }
12
+
13
+ //#endregion
14
+ export { useToggleGroup };
15
+ //# sourceMappingURL=provider.js.map
@@ -0,0 +1,8 @@
1
+ import { createContext } from "../../../internal/create-context.js";
2
+
3
+ //#region src/components/toggle-group/modules/root-context.ts
4
+ const RootContext = createContext();
5
+
6
+ //#endregion
7
+ export { RootContext };
8
+ //# sourceMappingURL=root-context.js.map
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react127 from "react";
3
+ import * as react128 from "react";
4
4
 
5
5
  //#region src/components/tooltip/anatomy/arrow-tip.d.ts
6
6
  interface TooltipArrowTipProps extends PropsWithElement<'div'>, HTMLAttributes<'div'> {}
7
- declare function ArrowTip(props: TooltipArrowTipProps): react127.JSX.Element;
7
+ declare function ArrowTip(props: TooltipArrowTipProps): react128.JSX.Element;
8
8
  //#endregion
9
9
  export { ArrowTip, TooltipArrowTipProps };
10
10
  //# sourceMappingURL=arrow-tip.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react126 from "react";
3
+ import * as react127 from "react";
4
4
 
5
5
  //#region src/components/tooltip/anatomy/arrow.d.ts
6
6
  interface TooltipArrowProps extends PropsWithElement<'div'>, HTMLAttributes<'div'> {}
7
- declare function Arrow(props: TooltipArrowProps): react126.JSX.Element;
7
+ declare function Arrow(props: TooltipArrowProps): react127.JSX.Element;
8
8
  //#endregion
9
9
  export { Arrow, TooltipArrowProps };
10
10
  //# sourceMappingURL=arrow.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react128 from "react";
3
+ import * as react129 from "react";
4
4
 
5
5
  //#region src/components/tooltip/anatomy/content.d.ts
6
6
  interface TooltipContentProps extends PropsWithElement<'div'>, HTMLAttributes<'div'> {}
7
- declare function Content(props: TooltipContentProps): react128.JSX.Element;
7
+ declare function Content(props: TooltipContentProps): react129.JSX.Element;
8
8
  //#endregion
9
9
  export { Content, TooltipContentProps };
10
10
  //# sourceMappingURL=content.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react_jsx_runtime48 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime50 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/components/tooltip/anatomy/positioner.d.ts
6
6
  interface TooltipPositionerProps extends PropsWithElement<'div'>, HTMLAttributes<'div'> {}
7
- declare function Positioner(props: TooltipPositionerProps): react_jsx_runtime48.JSX.Element;
7
+ declare function Positioner(props: TooltipPositionerProps): react_jsx_runtime50.JSX.Element;
8
8
  //#endregion
9
9
  export { Positioner, TooltipPositionerProps };
10
10
  //# sourceMappingURL=positioner.d.ts.map
@@ -1,12 +1,12 @@
1
1
  import { useTooltip } from "../modules/provider.js";
2
2
  import { PropsWithChildren } from "react";
3
- import * as react_jsx_runtime50 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime52 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/components/tooltip/anatomy/root-provider.d.ts
6
6
  interface TooltipRootProviderProps extends PropsWithChildren {
7
7
  value: ReturnType<typeof useTooltip>;
8
8
  }
9
- declare function RootProvider(props: TooltipRootProviderProps): react_jsx_runtime50.JSX.Element;
9
+ declare function RootProvider(props: TooltipRootProviderProps): react_jsx_runtime52.JSX.Element;
10
10
  //#endregion
11
11
  export { RootProvider, TooltipRootProviderProps };
12
12
  //# sourceMappingURL=root-provider.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import { PropsWithChildren } from "react";
2
- import * as react_jsx_runtime49 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime51 from "react/jsx-runtime";
3
3
  import { Props } from "@zag-js/tooltip";
4
4
 
5
5
  //#region src/components/tooltip/anatomy/root.d.ts
6
6
  interface TooltipRootProps extends PropsWithChildren, Omit<Props, 'id'> {}
7
- declare function Root(props: TooltipRootProps): react_jsx_runtime49.JSX.Element;
7
+ declare function Root(props: TooltipRootProps): react_jsx_runtime51.JSX.Element;
8
8
  //#endregion
9
9
  export { Root, TooltipRootProps };
10
10
  //# sourceMappingURL=root.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react129 from "react";
3
+ import * as react130 from "react";
4
4
 
5
5
  //#region src/components/tooltip/anatomy/trigger.d.ts
6
6
  interface TooltipTriggerProps extends PropsWithElement<'button'>, HTMLAttributes<'button'> {}
7
- declare function Trigger(props: TooltipTriggerProps): react129.JSX.Element;
7
+ declare function Trigger(props: TooltipTriggerProps): react130.JSX.Element;
8
8
  //#endregion
9
9
  export { TooltipTriggerProps, Trigger };
10
10
  //# sourceMappingURL=trigger.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react136 from "react";
3
+ import * as react137 from "react";
4
4
 
5
5
  //#region src/components/tree-view/anatomy/branch-content.d.ts
6
6
  interface TreeViewBranchContentProps extends PropsWithElement<'div'>, HTMLAttributes<'div'> {}
7
- declare function BranchContent(props: TreeViewBranchContentProps): react136.JSX.Element;
7
+ declare function BranchContent(props: TreeViewBranchContentProps): react137.JSX.Element;
8
8
  //#endregion
9
9
  export { BranchContent, TreeViewBranchContentProps };
10
10
  //# sourceMappingURL=branch-content.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react133 from "react";
3
+ import * as react134 from "react";
4
4
 
5
5
  //#region src/components/tree-view/anatomy/branch-control.d.ts
6
6
  interface TreeViewBranchControlProps extends PropsWithElement<'div'>, HTMLAttributes<'div'> {}
7
- declare function BranchControl(props: TreeViewBranchControlProps): react133.JSX.Element;
7
+ declare function BranchControl(props: TreeViewBranchControlProps): react134.JSX.Element;
8
8
  //#endregion
9
9
  export { BranchControl, TreeViewBranchControlProps };
10
10
  //# sourceMappingURL=branch-control.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react137 from "react";
3
+ import * as react138 from "react";
4
4
 
5
5
  //#region src/components/tree-view/anatomy/branch-indent-guide.d.ts
6
6
  interface TreeViewBranchIndentGuideProps extends PropsWithElement<'div'>, HTMLAttributes<'div'> {}
7
- declare function BranchIndentGuide(props: TreeViewBranchIndentGuideProps): react137.JSX.Element;
7
+ declare function BranchIndentGuide(props: TreeViewBranchIndentGuideProps): react138.JSX.Element;
8
8
  //#endregion
9
9
  export { BranchIndentGuide, TreeViewBranchIndentGuideProps };
10
10
  //# sourceMappingURL=branch-indent-guide.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from "../../../internal/html-attributes.js";
2
2
  import { PropsWithElement } from "../../../internal/props-with-element.js";
3
- import * as react135 from "react";
3
+ import * as react136 from "react";
4
4
 
5
5
  //#region src/components/tree-view/anatomy/branch-indicator.d.ts
6
6
  interface TreeViewBranchIndicatorProps extends PropsWithElement<'span'>, HTMLAttributes<'span'> {}
7
- declare function BranchIndicator(props: TreeViewBranchIndicatorProps): react135.JSX.Element;
7
+ declare function BranchIndicator(props: TreeViewBranchIndicatorProps): react136.JSX.Element;
8
8
  //#endregion
9
9
  export { BranchIndicator, TreeViewBranchIndicatorProps };
10
10
  //# sourceMappingURL=branch-indicator.d.ts.map