@sprawlify/react 0.0.5 → 0.0.7

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 (127) hide show
  1. package/dist/{collapsible-C5ZpjCRe.mjs → collapsible-B06GGGE7.mjs} +7 -4
  2. package/dist/{collapsible-D_cXuaRy.cjs → collapsible-D5kle6Bc.cjs} +12 -9
  3. package/dist/collection-BKabYqpE.cjs +229 -0
  4. package/dist/collection-DEsp9z6X.mjs +187 -0
  5. package/dist/components/accordion/index.cjs +19 -24
  6. package/dist/components/accordion/index.d.cts +11 -9
  7. package/dist/components/accordion/index.d.mts +11 -9
  8. package/dist/components/accordion/index.mjs +9 -14
  9. package/dist/components/angle-slider/index.cjs +12 -9
  10. package/dist/components/angle-slider/index.d.cts +13 -11
  11. package/dist/components/angle-slider/index.d.mts +13 -11
  12. package/dist/components/angle-slider/index.mjs +7 -4
  13. package/dist/components/avatar/index.cjs +128 -0
  14. package/dist/components/avatar/index.d.cts +49 -0
  15. package/dist/components/avatar/index.d.mts +49 -0
  16. package/dist/components/avatar/index.mjs +110 -0
  17. package/dist/components/bottom-sheet/index.cjs +213 -0
  18. package/dist/components/bottom-sheet/index.d.cts +80 -0
  19. package/dist/components/bottom-sheet/index.d.mts +81 -0
  20. package/dist/components/bottom-sheet/index.mjs +190 -0
  21. package/dist/components/carousel/index.cjs +263 -0
  22. package/dist/components/carousel/index.d.cts +95 -0
  23. package/dist/components/carousel/index.d.mts +95 -0
  24. package/dist/components/carousel/index.mjs +242 -0
  25. package/dist/components/checkbox/index.cjs +308 -0
  26. package/dist/components/checkbox/index.d.cts +115 -0
  27. package/dist/components/checkbox/index.d.mts +115 -0
  28. package/dist/components/checkbox/index.mjs +289 -0
  29. package/dist/components/client-only/index.cjs +14 -0
  30. package/dist/components/client-only/index.d.cts +8 -0
  31. package/dist/components/client-only/index.d.mts +8 -0
  32. package/dist/components/client-only/index.mjs +13 -0
  33. package/dist/components/clipboard/index.cjs +185 -0
  34. package/dist/components/clipboard/index.d.cts +71 -0
  35. package/dist/components/clipboard/index.d.mts +71 -0
  36. package/dist/components/clipboard/index.mjs +163 -0
  37. package/dist/components/collapsible/index.cjs +6 -3
  38. package/dist/components/collapsible/index.d.cts +10 -8
  39. package/dist/components/collapsible/index.d.mts +10 -8
  40. package/dist/components/collapsible/index.mjs +6 -3
  41. package/dist/components/collection/index.cjs +11 -0
  42. package/dist/components/collection/index.d.cts +2 -0
  43. package/dist/components/collection/index.d.mts +2 -0
  44. package/dist/components/collection/index.mjs +5 -0
  45. package/dist/components/color-picker/index.cjs +613 -0
  46. package/dist/components/color-picker/index.d.cts +181 -0
  47. package/dist/components/color-picker/index.d.mts +182 -0
  48. package/dist/components/color-picker/index.mjs +570 -0
  49. package/dist/components/combobox/index.cjs +416 -0
  50. package/dist/components/combobox/index.d.cts +132 -0
  51. package/dist/components/combobox/index.d.mts +133 -0
  52. package/dist/components/combobox/index.mjs +387 -0
  53. package/dist/components/field/index.cjs +27 -0
  54. package/dist/components/field/index.d.cts +116 -0
  55. package/dist/components/field/index.d.mts +116 -0
  56. package/dist/components/field/index.mjs +9 -0
  57. package/dist/components/fieldset/index.cjs +23 -0
  58. package/dist/components/fieldset/index.d.cts +73 -0
  59. package/dist/components/fieldset/index.d.mts +73 -0
  60. package/dist/components/fieldset/index.mjs +9 -0
  61. package/dist/components/highlight/index.cjs +32 -0
  62. package/dist/components/highlight/index.d.cts +14 -0
  63. package/dist/components/highlight/index.d.mts +14 -0
  64. package/dist/components/highlight/index.mjs +30 -0
  65. package/dist/components/portal/index.cjs +32 -0
  66. package/dist/components/portal/index.d.cts +11 -0
  67. package/dist/components/portal/index.d.mts +11 -0
  68. package/dist/components/portal/index.mjs +31 -0
  69. package/dist/components/presence/index.cjs +11 -0
  70. package/dist/components/presence/index.d.cts +2 -0
  71. package/dist/components/presence/index.d.mts +4 -0
  72. package/dist/components/presence/index.mjs +7 -0
  73. package/dist/components/select/index.cjs +419 -0
  74. package/dist/components/select/index.d.cts +132 -0
  75. package/dist/components/select/index.d.mts +133 -0
  76. package/dist/components/select/index.mjs +384 -0
  77. package/dist/{factory-DbgGeb_e.mjs → core-C0F-4KYH.mjs} +4 -154
  78. package/dist/{factory-CfqPG186.cjs → core-CPLjF6nm.cjs} +0 -198
  79. package/dist/{create-context-DCEySQ7J.cjs → create-context-D6DyFRSf.cjs} +1 -1
  80. package/dist/environment-BXkWNF2O.mjs +46 -0
  81. package/dist/environment-DLPiALpf.cjs +58 -0
  82. package/dist/factory-BbbIuDqa.d.mts +15 -0
  83. package/dist/factory-CDX-oCN5.cjs +81 -0
  84. package/dist/factory-DQlmCPH2.mjs +63 -0
  85. package/dist/factory-DaNWFLLN.d.cts +15 -0
  86. package/dist/field-CGCTFCx2.mjs +322 -0
  87. package/dist/field-CXhpW6zO.cjs +404 -0
  88. package/dist/fieldset-CuSSYZxV.cjs +237 -0
  89. package/dist/fieldset-poJ8RDvB.mjs +184 -0
  90. package/dist/index-BUN9wyVM.d.mts +34 -0
  91. package/dist/index-Dhthtdz_.d.mts +74 -0
  92. package/dist/index-DqRXPiW_.d.cts +34 -0
  93. package/dist/index-DsZldSch.d.cts +74 -0
  94. package/dist/index-DtdZfcpz.d.mts +25 -0
  95. package/dist/index.cjs +14 -11
  96. package/dist/index.d.cts +7 -5
  97. package/dist/index.d.mts +7 -5
  98. package/dist/index.mjs +6 -3
  99. package/dist/normalize-props-sqcs77GC.d.cts +13 -0
  100. package/dist/presence-2A4loEJY.mjs +71 -0
  101. package/dist/presence-BX1tNsGA.cjs +101 -0
  102. package/dist/providers-Bk3ALTxZ.cjs +78 -0
  103. package/dist/providers-CyTYcOU1.mjs +54 -0
  104. package/dist/render-strategy-D3w8btTD.mjs +13 -0
  105. package/dist/render-strategy-k1JmEGnq.cjs +30 -0
  106. package/dist/types-DYWV3uAj.d.cts +5 -0
  107. package/dist/types-FLvjyw__.d.mts +5 -0
  108. package/dist/use-event-BcyNH29h.mjs +19 -0
  109. package/dist/use-event-CGMgV6xB.cjs +25 -0
  110. package/dist/use-safe-layout-effect-BlOhFUAp.mjs +17 -0
  111. package/dist/use-safe-layout-effect-vuYaDIpT.cjs +35 -0
  112. package/dist/utils/index.cjs +2 -2
  113. package/dist/utils/index.d.cts +1 -1
  114. package/dist/utils/index.d.mts +1 -1
  115. package/dist/utils/index.mjs +2 -2
  116. package/package.json +152 -2
  117. package/dist/factory-CNfD9NVO.d.mts +0 -41
  118. package/dist/factory-D5qarvEF.d.cts +0 -29
  119. /package/dist/{chunk-DJTHdtxa.mjs → chunk-DLP0tNsH.mjs} +0 -0
  120. /package/dist/{create-context-DLMHiig4.mjs → create-context-CdjrBhu7.mjs} +0 -0
  121. /package/dist/{create-split-props-DvwGh64U.mjs → create-split-props-BJQdOyld.mjs} +0 -0
  122. /package/dist/{create-split-props-CSaOnJRj.cjs → create-split-props-CSkzaUOy.cjs} +0 -0
  123. /package/dist/{index--Dciu8yd.d.mts → index-BwTxN5vG.d.mts} +0 -0
  124. /package/dist/{index-wpUGMM30.d.cts → index-zOmANnUL.d.cts} +0 -0
  125. /package/dist/{render-strategy-G1aEn-1X.d.cts → render-strategy-CdpAg9jb.d.cts} +0 -0
  126. /package/dist/{render-strategy-D37ixdTi.d.mts → render-strategy-GetMScNK.d.mts} +0 -0
  127. /package/dist/{utils-BQjTDAMH.mjs → utils-DflO0-3U.mjs} +0 -0
@@ -0,0 +1,116 @@
1
+ import { r as PolymorphicProps, t as HTMLProps } from "../../factory-BbbIuDqa.mjs";
2
+ import * as react217 from "react";
3
+ import { ReactNode } from "react";
4
+ import * as _sprawlify_primitives_anatomy2 from "@sprawlify/primitives/anatomy";
5
+
6
+ //#region src/components/field/use-field.d.ts
7
+ interface ElementIds {
8
+ root?: string | undefined;
9
+ control?: string | undefined;
10
+ label?: string | undefined;
11
+ errorText?: string | undefined;
12
+ helperText?: string | undefined;
13
+ }
14
+ interface UseFieldProps {
15
+ id?: string | undefined;
16
+ ids?: ElementIds | undefined;
17
+ required?: boolean | undefined;
18
+ disabled?: boolean | undefined;
19
+ invalid?: boolean | undefined;
20
+ readOnly?: boolean | undefined;
21
+ }
22
+ type UseFieldReturn = ReturnType<typeof useField>;
23
+ declare const useField: (props?: UseFieldProps) => {
24
+ ariaDescribedby: string | undefined;
25
+ ids: {
26
+ root: string;
27
+ control: string;
28
+ label: string;
29
+ errorText: string;
30
+ helperText: string;
31
+ };
32
+ refs: {
33
+ rootRef: react217.RefObject<HTMLDivElement | null>;
34
+ };
35
+ disabled: boolean;
36
+ invalid: boolean;
37
+ readOnly: boolean;
38
+ required: boolean;
39
+ getLabelProps: () => HTMLProps<"label">;
40
+ getRootProps: () => HTMLProps<"div">;
41
+ getInputProps: () => HTMLProps<"input">;
42
+ getTextareaProps: () => HTMLProps<"textarea">;
43
+ getSelectProps: () => HTMLProps<"select">;
44
+ getHelperTextProps: () => HTMLProps<"span">;
45
+ getErrorTextProps: () => HTMLProps<"span">;
46
+ getRequiredIndicatorProps: () => HTMLProps<"span">;
47
+ };
48
+ //#endregion
49
+ //#region src/components/field/use-field-context.d.ts
50
+ interface UseFieldContext extends UseFieldReturn {}
51
+ //#endregion
52
+ //#region src/components/field/field-context.d.ts
53
+ interface FieldContextProps {
54
+ children: (context: UseFieldContext) => ReactNode;
55
+ }
56
+ declare const FieldContext: (props: FieldContextProps) => ReactNode;
57
+ //#endregion
58
+ //#region src/components/field/field-error-text.d.ts
59
+ interface FieldErrorTextBaseProps extends PolymorphicProps {}
60
+ interface FieldErrorTextProps extends HTMLProps<"span">, FieldErrorTextBaseProps {}
61
+ declare const FieldErrorText: react217.ForwardRefExoticComponent<FieldErrorTextProps & react217.RefAttributes<HTMLSpanElement>>;
62
+ //#endregion
63
+ //#region src/components/field/field-helper-text.d.ts
64
+ interface FieldHelperTextBaseProps extends PolymorphicProps {}
65
+ interface FieldHelperTextProps extends HTMLProps<"span">, FieldHelperTextBaseProps {}
66
+ declare const FieldHelperText: react217.ForwardRefExoticComponent<FieldHelperTextProps & react217.RefAttributes<HTMLSpanElement>>;
67
+ //#endregion
68
+ //#region src/components/field/field-input.d.ts
69
+ interface FieldInputBaseProps extends PolymorphicProps {}
70
+ interface FieldInputProps extends HTMLProps<"input">, FieldInputBaseProps {}
71
+ declare const FieldInput: react217.ForwardRefExoticComponent<FieldInputProps & react217.RefAttributes<HTMLInputElement>>;
72
+ //#endregion
73
+ //#region src/components/field/field-label.d.ts
74
+ interface FieldLabelBaseProps extends PolymorphicProps {}
75
+ interface FieldLabelProps extends HTMLProps<"label">, FieldLabelBaseProps {}
76
+ declare const FieldLabel: react217.ForwardRefExoticComponent<FieldLabelProps & react217.RefAttributes<HTMLLabelElement>>;
77
+ //#endregion
78
+ //#region src/components/field/field-required-indicator.d.ts
79
+ interface FieldRequiredIndicatorBaseProps extends PolymorphicProps {
80
+ fallback?: React.ReactNode | undefined;
81
+ }
82
+ interface FieldRequiredIndicatorProps extends HTMLProps<"span">, FieldRequiredIndicatorBaseProps {}
83
+ declare const FieldRequiredIndicator: react217.ForwardRefExoticComponent<FieldRequiredIndicatorProps & react217.RefAttributes<HTMLSpanElement>>;
84
+ //#endregion
85
+ //#region src/components/field/field-root.d.ts
86
+ interface FieldRootBaseProps extends UseFieldProps, PolymorphicProps {}
87
+ interface FieldRootProps extends HTMLProps<"div">, FieldRootBaseProps {}
88
+ declare const FieldRoot: react217.ForwardRefExoticComponent<FieldRootProps & react217.RefAttributes<HTMLDivElement>>;
89
+ //#endregion
90
+ //#region src/components/field/field-root-provider.d.ts
91
+ interface RootProviderProps {
92
+ value: UseFieldReturn;
93
+ }
94
+ interface FieldRootProviderBaseProps extends RootProviderProps, PolymorphicProps {}
95
+ interface FieldRootProviderProps extends HTMLProps<"div">, FieldRootProviderBaseProps {}
96
+ declare const FieldRootProvider: react217.ForwardRefExoticComponent<FieldRootProviderProps & react217.RefAttributes<HTMLDivElement>>;
97
+ //#endregion
98
+ //#region src/components/field/field-select.d.ts
99
+ interface FieldSelectBaseProps extends PolymorphicProps {}
100
+ interface FieldSelectProps extends HTMLProps<"select">, FieldSelectBaseProps {}
101
+ declare const FieldSelect: react217.ForwardRefExoticComponent<FieldSelectProps & react217.RefAttributes<HTMLSelectElement>>;
102
+ //#endregion
103
+ //#region src/components/field/field-textarea.d.ts
104
+ interface FieldTextareaBaseProps extends PolymorphicProps {
105
+ autoresize?: boolean | undefined;
106
+ }
107
+ interface FieldTextareaProps extends HTMLProps<"textarea">, FieldTextareaBaseProps {}
108
+ declare const FieldTextarea: react217.ForwardRefExoticComponent<FieldTextareaProps & react217.RefAttributes<HTMLTextAreaElement>>;
109
+ //#endregion
110
+ //#region src/components/field/field-anatomy.d.ts
111
+ declare const fieldAnatomy: _sprawlify_primitives_anatomy2.AnatomyInstance<"input" | "label" | "select" | "textarea" | "root" | "errorText" | "helperText" | "requiredIndicator">;
112
+ declare namespace field_d_exports {
113
+ export { FieldContext as Context, FieldContextProps as ContextProps, FieldErrorText as ErrorText, FieldErrorTextBaseProps as ErrorTextBaseProps, FieldErrorTextProps as ErrorTextProps, FieldHelperText as HelperText, FieldHelperTextBaseProps as HelperTextBaseProps, FieldHelperTextProps as HelperTextProps, FieldInput as Input, FieldInputBaseProps as InputBaseProps, FieldInputProps as InputProps, FieldLabel as Label, FieldLabelBaseProps as LabelBaseProps, FieldLabelProps as LabelProps, FieldRequiredIndicator as RequiredIndicator, FieldRequiredIndicatorBaseProps as RequiredIndicatorBaseProps, FieldRequiredIndicatorProps as RequiredIndicatorProps, FieldRoot as Root, FieldRootBaseProps as RootBaseProps, FieldRootProps as RootProps, FieldRootProvider as RootProvider, FieldRootProviderBaseProps as RootProviderBaseProps, FieldRootProviderProps as RootProviderProps, FieldSelect as Select, FieldSelectBaseProps as SelectBaseProps, FieldSelectProps as SelectProps, FieldTextarea as Textarea, FieldTextareaBaseProps as TextareaBaseProps, FieldTextareaProps as TextareaProps };
114
+ }
115
+ //#endregion
116
+ export { field_d_exports as Field, FieldContext, type FieldContextProps, FieldErrorText, type FieldErrorTextBaseProps, type FieldErrorTextProps, FieldHelperText, type FieldHelperTextBaseProps, type FieldHelperTextProps, FieldInput, type FieldInputBaseProps, type FieldInputProps, FieldLabel, type FieldLabelBaseProps, type FieldLabelProps, FieldRequiredIndicator, type FieldRequiredIndicatorBaseProps, type FieldRequiredIndicatorProps, FieldRoot, type FieldRootBaseProps, type FieldRootProps, FieldRootProvider, type FieldRootProviderBaseProps, type FieldRootProviderProps, FieldSelect, type FieldSelectBaseProps, type FieldSelectProps, FieldTextarea, type FieldTextareaBaseProps, type FieldTextareaProps, type UseFieldContext, type UseFieldProps, type UseFieldReturn, fieldAnatomy, useField, useFieldContext };
@@ -0,0 +1,9 @@
1
+ import "../../core-C0F-4KYH.mjs";
2
+ import "../../create-context-CdjrBhu7.mjs";
3
+ import "../../environment-BXkWNF2O.mjs";
4
+ import "../../providers-CyTYcOU1.mjs";
5
+ import "../../factory-DQlmCPH2.mjs";
6
+ import "../../use-safe-layout-effect-BlOhFUAp.mjs";
7
+ import { a as FieldRoot, c as FieldRequiredIndicator, d as FieldHelperText, f as FieldErrorText, i as FieldRootProvider, l as FieldLabel, m as useFieldContext, n as FieldTextarea, o as useField, p as FieldContext, r as FieldSelect, s as fieldAnatomy, t as field_exports, u as FieldInput } from "../../field-CGCTFCx2.mjs";
8
+
9
+ export { field_exports as Field, FieldContext, FieldErrorText, FieldHelperText, FieldInput, FieldLabel, FieldRequiredIndicator, FieldRoot, FieldRootProvider, FieldSelect, FieldTextarea, fieldAnatomy, useField, useFieldContext };
@@ -0,0 +1,23 @@
1
+ require('../../core-CPLjF6nm.cjs');
2
+ require('../../create-context-D6DyFRSf.cjs');
3
+ require('../../environment-DLPiALpf.cjs');
4
+ require('../../providers-Bk3ALTxZ.cjs');
5
+ require('../../factory-CDX-oCN5.cjs');
6
+ const require_use_safe_layout_effect = require('../../use-safe-layout-effect-vuYaDIpT.cjs');
7
+ const require_fieldset = require('../../fieldset-CuSSYZxV.cjs');
8
+
9
+ Object.defineProperty(exports, 'Fieldset', {
10
+ enumerable: true,
11
+ get: function () {
12
+ return require_fieldset.fieldset_exports;
13
+ }
14
+ });
15
+ exports.FieldsetContext = require_fieldset.FieldsetContext;
16
+ exports.FieldsetErrorText = require_fieldset.FieldsetErrorText;
17
+ exports.FieldsetHelperText = require_fieldset.FieldsetHelperText;
18
+ exports.FieldsetLegend = require_fieldset.FieldsetLegend;
19
+ exports.FieldsetRoot = require_fieldset.FieldsetRoot;
20
+ exports.FieldsetRootProvider = require_fieldset.FieldsetRootProvider;
21
+ exports.fieldsetAnatomy = require_fieldset.fieldsetAnatomy;
22
+ exports.useFieldset = require_fieldset.useFieldset;
23
+ exports.useFieldsetContext = require_use_safe_layout_effect.useFieldsetContext;
@@ -0,0 +1,73 @@
1
+ import { r as PolymorphicProps, t as HTMLProps } from "../../factory-DaNWFLLN.cjs";
2
+ import * as react148 from "react";
3
+ import { ReactNode } from "react";
4
+ import * as _sprawlify_primitives_anatomy2 from "@sprawlify/primitives/anatomy";
5
+
6
+ //#region src/components/fieldset/use-fieldset.d.ts
7
+ interface UseFieldsetProps {
8
+ id?: string | undefined;
9
+ disabled?: boolean | undefined;
10
+ invalid?: boolean | undefined;
11
+ }
12
+ type UseFieldsetReturn = ReturnType<typeof useFieldset>;
13
+ declare const useFieldset: (props?: UseFieldsetProps) => {
14
+ refs: {
15
+ rootRef: react148.RefObject<HTMLFieldSetElement | null>;
16
+ };
17
+ ids: {
18
+ legend: string;
19
+ errorText: string;
20
+ helperText: string;
21
+ };
22
+ disabled: boolean;
23
+ invalid: boolean;
24
+ getRootProps: () => HTMLProps<"fieldset">;
25
+ getLegendProps: () => HTMLProps<"legend">;
26
+ getHelperTextProps: () => HTMLProps<"span">;
27
+ getErrorTextProps: () => HTMLProps<"span">;
28
+ };
29
+ //#endregion
30
+ //#region src/components/fieldset/use-fieldset-context.d.ts
31
+ interface UseFieldsetContext extends UseFieldsetReturn {}
32
+ //#endregion
33
+ //#region src/components/fieldset/fieldset-context.d.ts
34
+ interface FieldsetContextProps {
35
+ children: (context: UseFieldsetContext) => ReactNode;
36
+ }
37
+ declare const FieldsetContext: (props: FieldsetContextProps) => ReactNode;
38
+ //#endregion
39
+ //#region src/components/fieldset/fieldset-error-text.d.ts
40
+ interface FieldsetErrorTextBaseProps extends PolymorphicProps {}
41
+ interface FieldsetErrorTextProps extends HTMLProps<"span">, FieldsetErrorTextBaseProps {}
42
+ declare const FieldsetErrorText: react148.ForwardRefExoticComponent<FieldsetErrorTextProps & react148.RefAttributes<HTMLSpanElement>>;
43
+ //#endregion
44
+ //#region src/components/fieldset/fieldset-helper-text.d.ts
45
+ interface FieldsetHelperTextBaseProps extends PolymorphicProps {}
46
+ interface FieldsetHelperTextProps extends HTMLProps<"span">, FieldsetHelperTextBaseProps {}
47
+ declare const FieldsetHelperText: react148.ForwardRefExoticComponent<FieldsetHelperTextProps & react148.RefAttributes<HTMLSpanElement>>;
48
+ //#endregion
49
+ //#region src/components/fieldset/fieldset-legend.d.ts
50
+ interface FieldsetLegendBaseProps extends PolymorphicProps {}
51
+ interface FieldsetLegendProps extends HTMLProps<"legend">, FieldsetLegendBaseProps {}
52
+ declare const FieldsetLegend: react148.ForwardRefExoticComponent<FieldsetLegendProps & react148.RefAttributes<HTMLLegendElement>>;
53
+ //#endregion
54
+ //#region src/components/fieldset/fieldset-root.d.ts
55
+ interface FieldsetRootBaseProps extends UseFieldsetProps, PolymorphicProps {}
56
+ interface FieldsetRootProps extends HTMLProps<"fieldset">, FieldsetRootBaseProps {}
57
+ declare const FieldsetRoot: react148.ForwardRefExoticComponent<FieldsetRootProps & react148.RefAttributes<HTMLFieldSetElement>>;
58
+ //#endregion
59
+ //#region src/components/fieldset/fieldset-root-provider.d.ts
60
+ interface RootProviderProps {
61
+ value: UseFieldsetReturn;
62
+ }
63
+ interface FieldsetRootProviderBaseProps extends RootProviderProps, PolymorphicProps {}
64
+ interface FieldsetRootProviderProps extends HTMLProps<"fieldset">, FieldsetRootProviderBaseProps {}
65
+ declare const FieldsetRootProvider: react148.ForwardRefExoticComponent<FieldsetRootProviderProps & react148.RefAttributes<HTMLFieldSetElement>>;
66
+ //#endregion
67
+ //#region src/components/fieldset/fieldset-anatomy.d.ts
68
+ declare const fieldsetAnatomy: _sprawlify_primitives_anatomy2.AnatomyInstance<"legend" | "root" | "errorText" | "helperText">;
69
+ declare namespace fieldset_d_exports {
70
+ export { FieldsetContext as Context, FieldsetContextProps as ContextProps, FieldsetErrorText as ErrorText, FieldsetErrorTextBaseProps as ErrorTextBaseProps, FieldsetErrorTextProps as ErrorTextProps, FieldsetHelperText as HelperText, FieldsetHelperTextBaseProps as HelperTextBaseProps, FieldsetHelperTextProps as HelperTextProps, FieldsetLegend as Legend, FieldsetLegendBaseProps as LegendBaseProps, FieldsetLegendProps as LegendProps, FieldsetRoot as Root, FieldsetRootBaseProps as RootBaseProps, FieldsetRootProps as RootProps, FieldsetRootProvider as RootProvider, FieldsetRootProviderBaseProps as RootProviderBaseProps, FieldsetRootProviderProps as RootProviderProps };
71
+ }
72
+ //#endregion
73
+ export { fieldset_d_exports as Fieldset, FieldsetContext, type FieldsetContextProps, FieldsetErrorText, type FieldsetErrorTextBaseProps, type FieldsetErrorTextProps, FieldsetHelperText, type FieldsetHelperTextBaseProps, type FieldsetHelperTextProps, FieldsetLegend, type FieldsetLegendBaseProps, type FieldsetLegendProps, FieldsetRoot, type FieldsetRootBaseProps, type FieldsetRootProps, FieldsetRootProvider, type FieldsetRootProviderBaseProps, type FieldsetRootProviderProps, type UseFieldsetContext, type UseFieldsetProps, type UseFieldsetReturn, fieldsetAnatomy, useFieldset, useFieldsetContext };
@@ -0,0 +1,73 @@
1
+ import { r as PolymorphicProps, t as HTMLProps } from "../../factory-BbbIuDqa.mjs";
2
+ import * as react255 from "react";
3
+ import { ReactNode } from "react";
4
+ import * as _sprawlify_primitives_anatomy4 from "@sprawlify/primitives/anatomy";
5
+
6
+ //#region src/components/fieldset/use-fieldset.d.ts
7
+ interface UseFieldsetProps {
8
+ id?: string | undefined;
9
+ disabled?: boolean | undefined;
10
+ invalid?: boolean | undefined;
11
+ }
12
+ type UseFieldsetReturn = ReturnType<typeof useFieldset>;
13
+ declare const useFieldset: (props?: UseFieldsetProps) => {
14
+ refs: {
15
+ rootRef: react255.RefObject<HTMLFieldSetElement | null>;
16
+ };
17
+ ids: {
18
+ legend: string;
19
+ errorText: string;
20
+ helperText: string;
21
+ };
22
+ disabled: boolean;
23
+ invalid: boolean;
24
+ getRootProps: () => HTMLProps<"fieldset">;
25
+ getLegendProps: () => HTMLProps<"legend">;
26
+ getHelperTextProps: () => HTMLProps<"span">;
27
+ getErrorTextProps: () => HTMLProps<"span">;
28
+ };
29
+ //#endregion
30
+ //#region src/components/fieldset/use-fieldset-context.d.ts
31
+ interface UseFieldsetContext extends UseFieldsetReturn {}
32
+ //#endregion
33
+ //#region src/components/fieldset/fieldset-context.d.ts
34
+ interface FieldsetContextProps {
35
+ children: (context: UseFieldsetContext) => ReactNode;
36
+ }
37
+ declare const FieldsetContext: (props: FieldsetContextProps) => ReactNode;
38
+ //#endregion
39
+ //#region src/components/fieldset/fieldset-error-text.d.ts
40
+ interface FieldsetErrorTextBaseProps extends PolymorphicProps {}
41
+ interface FieldsetErrorTextProps extends HTMLProps<"span">, FieldsetErrorTextBaseProps {}
42
+ declare const FieldsetErrorText: react255.ForwardRefExoticComponent<FieldsetErrorTextProps & react255.RefAttributes<HTMLSpanElement>>;
43
+ //#endregion
44
+ //#region src/components/fieldset/fieldset-helper-text.d.ts
45
+ interface FieldsetHelperTextBaseProps extends PolymorphicProps {}
46
+ interface FieldsetHelperTextProps extends HTMLProps<"span">, FieldsetHelperTextBaseProps {}
47
+ declare const FieldsetHelperText: react255.ForwardRefExoticComponent<FieldsetHelperTextProps & react255.RefAttributes<HTMLSpanElement>>;
48
+ //#endregion
49
+ //#region src/components/fieldset/fieldset-legend.d.ts
50
+ interface FieldsetLegendBaseProps extends PolymorphicProps {}
51
+ interface FieldsetLegendProps extends HTMLProps<"legend">, FieldsetLegendBaseProps {}
52
+ declare const FieldsetLegend: react255.ForwardRefExoticComponent<FieldsetLegendProps & react255.RefAttributes<HTMLLegendElement>>;
53
+ //#endregion
54
+ //#region src/components/fieldset/fieldset-root.d.ts
55
+ interface FieldsetRootBaseProps extends UseFieldsetProps, PolymorphicProps {}
56
+ interface FieldsetRootProps extends HTMLProps<"fieldset">, FieldsetRootBaseProps {}
57
+ declare const FieldsetRoot: react255.ForwardRefExoticComponent<FieldsetRootProps & react255.RefAttributes<HTMLFieldSetElement>>;
58
+ //#endregion
59
+ //#region src/components/fieldset/fieldset-root-provider.d.ts
60
+ interface RootProviderProps {
61
+ value: UseFieldsetReturn;
62
+ }
63
+ interface FieldsetRootProviderBaseProps extends RootProviderProps, PolymorphicProps {}
64
+ interface FieldsetRootProviderProps extends HTMLProps<"fieldset">, FieldsetRootProviderBaseProps {}
65
+ declare const FieldsetRootProvider: react255.ForwardRefExoticComponent<FieldsetRootProviderProps & react255.RefAttributes<HTMLFieldSetElement>>;
66
+ //#endregion
67
+ //#region src/components/fieldset/fieldset-anatomy.d.ts
68
+ declare const fieldsetAnatomy: _sprawlify_primitives_anatomy4.AnatomyInstance<"legend" | "root" | "errorText" | "helperText">;
69
+ declare namespace fieldset_d_exports {
70
+ export { FieldsetContext as Context, FieldsetContextProps as ContextProps, FieldsetErrorText as ErrorText, FieldsetErrorTextBaseProps as ErrorTextBaseProps, FieldsetErrorTextProps as ErrorTextProps, FieldsetHelperText as HelperText, FieldsetHelperTextBaseProps as HelperTextBaseProps, FieldsetHelperTextProps as HelperTextProps, FieldsetLegend as Legend, FieldsetLegendBaseProps as LegendBaseProps, FieldsetLegendProps as LegendProps, FieldsetRoot as Root, FieldsetRootBaseProps as RootBaseProps, FieldsetRootProps as RootProps, FieldsetRootProvider as RootProvider, FieldsetRootProviderBaseProps as RootProviderBaseProps, FieldsetRootProviderProps as RootProviderProps };
71
+ }
72
+ //#endregion
73
+ export { fieldset_d_exports as Fieldset, FieldsetContext, type FieldsetContextProps, FieldsetErrorText, type FieldsetErrorTextBaseProps, type FieldsetErrorTextProps, FieldsetHelperText, type FieldsetHelperTextBaseProps, type FieldsetHelperTextProps, FieldsetLegend, type FieldsetLegendBaseProps, type FieldsetLegendProps, FieldsetRoot, type FieldsetRootBaseProps, type FieldsetRootProps, FieldsetRootProvider, type FieldsetRootProviderBaseProps, type FieldsetRootProviderProps, type UseFieldsetContext, type UseFieldsetProps, type UseFieldsetReturn, fieldsetAnatomy, useFieldset, useFieldsetContext };
@@ -0,0 +1,9 @@
1
+ import "../../core-C0F-4KYH.mjs";
2
+ import "../../create-context-CdjrBhu7.mjs";
3
+ import "../../environment-BXkWNF2O.mjs";
4
+ import "../../providers-CyTYcOU1.mjs";
5
+ import "../../factory-DQlmCPH2.mjs";
6
+ import { r as useFieldsetContext } from "../../use-safe-layout-effect-BlOhFUAp.mjs";
7
+ import { a as fieldsetAnatomy, c as FieldsetErrorText, i as useFieldset, l as FieldsetContext, n as FieldsetRootProvider, o as FieldsetLegend, r as FieldsetRoot, s as FieldsetHelperText, t as fieldset_exports } from "../../fieldset-poJ8RDvB.mjs";
8
+
9
+ export { fieldset_exports as Fieldset, FieldsetContext, FieldsetErrorText, FieldsetHelperText, FieldsetLegend, FieldsetRoot, FieldsetRootProvider, fieldsetAnatomy, useFieldset, useFieldsetContext };
@@ -0,0 +1,32 @@
1
+ const require_core = require('../../core-CPLjF6nm.cjs');
2
+ const require_create_split_props = require('../../create-split-props-CSkzaUOy.cjs');
3
+ let react = require("react");
4
+ let react_jsx_runtime = require("react/jsx-runtime");
5
+ let __sprawlify_primitives_highlight_word = require("@sprawlify/primitives/highlight-word");
6
+
7
+ //#region src/components/highlight/use-highlight.ts
8
+ const useHighlight = (props) => {
9
+ return (0, react.useMemo)(() => (0, __sprawlify_primitives_highlight_word.highlightWord)(props), [props]);
10
+ };
11
+
12
+ //#endregion
13
+ //#region src/components/highlight/highlight.tsx
14
+ const splitHighlightBaseProps = require_create_split_props.createSplitProps();
15
+ const Highlight = (props) => {
16
+ if (typeof props.text !== "string") throw new Error("[sprawlify/highlight] text must be a string");
17
+ const [highlightProps, localProps] = splitHighlightBaseProps(props, [
18
+ "query",
19
+ "text",
20
+ "ignoreCase",
21
+ "matchAll",
22
+ "exactMatch"
23
+ ]);
24
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children: useHighlight(highlightProps).map(({ text, match }, i) => match ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("mark", {
25
+ ...localProps,
26
+ children: text
27
+ }, i) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children: text }, i)) });
28
+ };
29
+
30
+ //#endregion
31
+ exports.Highlight = Highlight;
32
+ exports.useHighlight = useHighlight;
@@ -0,0 +1,14 @@
1
+ import { t as Assign } from "../../types-DYWV3uAj.cjs";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+ import { HighlightChunk, HighlightWordProps } from "@sprawlify/primitives/highlight-word";
4
+
5
+ //#region src/components/highlight/use-highlight.d.ts
6
+ interface UseHighlightProps extends HighlightWordProps {}
7
+ declare const useHighlight: (props: UseHighlightProps) => HighlightChunk[];
8
+ //#endregion
9
+ //#region src/components/highlight/highlight.d.ts
10
+ interface HighlightBaseProps extends UseHighlightProps {}
11
+ interface HighlightProps extends Assign<React.ComponentProps<"mark">, HighlightBaseProps> {}
12
+ declare const Highlight: (props: HighlightProps) => react_jsx_runtime0.JSX.Element;
13
+ //#endregion
14
+ export { Highlight, type HighlightChunk, type HighlightProps, type UseHighlightProps, useHighlight };
@@ -0,0 +1,14 @@
1
+ import { t as Assign } from "../../types-FLvjyw__.mjs";
2
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
3
+ import { HighlightChunk, HighlightWordProps } from "@sprawlify/primitives/highlight-word";
4
+
5
+ //#region src/components/highlight/use-highlight.d.ts
6
+ interface UseHighlightProps extends HighlightWordProps {}
7
+ declare const useHighlight: (props: UseHighlightProps) => HighlightChunk[];
8
+ //#endregion
9
+ //#region src/components/highlight/highlight.d.ts
10
+ interface HighlightBaseProps extends UseHighlightProps {}
11
+ interface HighlightProps extends Assign<React.ComponentProps<"mark">, HighlightBaseProps> {}
12
+ declare const Highlight: (props: HighlightProps) => react_jsx_runtime2.JSX.Element;
13
+ //#endregion
14
+ export { Highlight, type HighlightChunk, type HighlightProps, type UseHighlightProps, useHighlight };
@@ -0,0 +1,30 @@
1
+ import { t as createSplitProps } from "../../create-split-props-BJQdOyld.mjs";
2
+ import { Fragment, useMemo } from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { highlightWord } from "@sprawlify/primitives/highlight-word";
5
+
6
+ //#region src/components/highlight/use-highlight.ts
7
+ const useHighlight = (props) => {
8
+ return useMemo(() => highlightWord(props), [props]);
9
+ };
10
+
11
+ //#endregion
12
+ //#region src/components/highlight/highlight.tsx
13
+ const splitHighlightBaseProps = createSplitProps();
14
+ const Highlight = (props) => {
15
+ if (typeof props.text !== "string") throw new Error("[sprawlify/highlight] text must be a string");
16
+ const [highlightProps, localProps] = splitHighlightBaseProps(props, [
17
+ "query",
18
+ "text",
19
+ "ignoreCase",
20
+ "matchAll",
21
+ "exactMatch"
22
+ ]);
23
+ return /* @__PURE__ */ jsx(Fragment, { children: useHighlight(highlightProps).map(({ text, match }, i) => match ? /* @__PURE__ */ jsx("mark", {
24
+ ...localProps,
25
+ children: text
26
+ }, i) : /* @__PURE__ */ jsx(Fragment, { children: text }, i)) });
27
+ };
28
+
29
+ //#endregion
30
+ export { Highlight, useHighlight };
@@ -0,0 +1,32 @@
1
+ const require_core = require('../../core-CPLjF6nm.cjs');
2
+ require('../../create-context-D6DyFRSf.cjs');
3
+ const require_environment = require('../../environment-DLPiALpf.cjs');
4
+ require('../../providers-Bk3ALTxZ.cjs');
5
+ let react = require("react");
6
+ let react_dom = require("react-dom");
7
+ let react_jsx_runtime = require("react/jsx-runtime");
8
+ let __sprawlify_primitives_dom_query = require("@sprawlify/primitives/dom-query");
9
+
10
+ //#region src/components/portal/portal.tsx
11
+ const Portal = (props) => {
12
+ const { children, disabled } = props;
13
+ const [container, setContainer] = (0, react.useState)(props.container?.current);
14
+ const isServer = (0, react.useSyncExternalStore)(subscribe, () => false, () => true);
15
+ const { getRootNode } = require_environment.useEnvironmentContext();
16
+ (0, react.useEffect)(() => {
17
+ setContainer(() => props.container?.current);
18
+ }, [props.container]);
19
+ if (isServer || disabled) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children });
20
+ const mountNode = container ?? getPortalNode(getRootNode);
21
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: react.Children.map(children, (child) => (0, react_dom.createPortal)(child, mountNode)) });
22
+ };
23
+ const getPortalNode = (cb) => {
24
+ const node = cb?.();
25
+ const rootNode = node.getRootNode();
26
+ if ((0, __sprawlify_primitives_dom_query.isShadowRoot)(rootNode)) return rootNode;
27
+ return (0, __sprawlify_primitives_dom_query.getDocument)(node).body;
28
+ };
29
+ const subscribe = () => () => {};
30
+
31
+ //#endregion
32
+ exports.Portal = Portal;
@@ -0,0 +1,11 @@
1
+ import { PropsWithChildren, RefObject } from "react";
2
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
3
+
4
+ //#region src/components/portal/portal.d.ts
5
+ interface PortalProps {
6
+ disabled?: boolean | undefined;
7
+ container?: RefObject<HTMLElement | null> | undefined;
8
+ }
9
+ declare const Portal: (props: PropsWithChildren<PortalProps>) => react_jsx_runtime2.JSX.Element;
10
+ //#endregion
11
+ export { Portal, type PortalProps };
@@ -0,0 +1,11 @@
1
+ import { PropsWithChildren, RefObject } from "react";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region src/components/portal/portal.d.ts
5
+ interface PortalProps {
6
+ disabled?: boolean | undefined;
7
+ container?: RefObject<HTMLElement | null> | undefined;
8
+ }
9
+ declare const Portal: (props: PropsWithChildren<PortalProps>) => react_jsx_runtime0.JSX.Element;
10
+ //#endregion
11
+ export { Portal, type PortalProps };
@@ -0,0 +1,31 @@
1
+ import "../../create-context-CdjrBhu7.mjs";
2
+ import { n as useEnvironmentContext } from "../../environment-BXkWNF2O.mjs";
3
+ import "../../providers-CyTYcOU1.mjs";
4
+ import { Children, useEffect, useState, useSyncExternalStore } from "react";
5
+ import { createPortal } from "react-dom";
6
+ import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
7
+ import { getDocument, isShadowRoot } from "@sprawlify/primitives/dom-query";
8
+
9
+ //#region src/components/portal/portal.tsx
10
+ const Portal = (props) => {
11
+ const { children, disabled } = props;
12
+ const [container, setContainer] = useState(props.container?.current);
13
+ const isServer = useSyncExternalStore(subscribe, () => false, () => true);
14
+ const { getRootNode } = useEnvironmentContext();
15
+ useEffect(() => {
16
+ setContainer(() => props.container?.current);
17
+ }, [props.container]);
18
+ if (isServer || disabled) return /* @__PURE__ */ jsx(Fragment$1, { children });
19
+ const mountNode = container ?? getPortalNode(getRootNode);
20
+ return /* @__PURE__ */ jsx(Fragment$1, { children: Children.map(children, (child) => createPortal(child, mountNode)) });
21
+ };
22
+ const getPortalNode = (cb) => {
23
+ const node = cb?.();
24
+ const rootNode = node.getRootNode();
25
+ if (isShadowRoot(rootNode)) return rootNode;
26
+ return getDocument(node).body;
27
+ };
28
+ const subscribe = () => () => {};
29
+
30
+ //#endregion
31
+ export { Portal };
@@ -0,0 +1,11 @@
1
+ require('../../core-CPLjF6nm.cjs');
2
+ require('../../create-context-D6DyFRSf.cjs');
3
+ require('../../factory-CDX-oCN5.cjs');
4
+ const require_presence = require('../../presence-BX1tNsGA.cjs');
5
+ require('../../use-event-CGMgV6xB.cjs');
6
+
7
+ exports.Presence = require_presence.Presence;
8
+ exports.PresenceProvider = require_presence.PresenceProvider;
9
+ exports.splitPresenceProps = require_presence.splitPresenceProps;
10
+ exports.usePresence = require_presence.usePresence;
11
+ exports.usePresenceContext = require_presence.usePresenceContext;
@@ -0,0 +1,2 @@
1
+ import { a as Presence, c as UsePresenceProps, i as splitPresenceProps, l as UsePresenceReturn, n as UsePresenceContext, o as PresenceBaseProps, r as usePresenceContext, s as PresenceProps, t as PresenceProvider, u as usePresence } from "../../index-DqRXPiW_.cjs";
2
+ export { Presence, PresenceBaseProps, PresenceProps, PresenceProvider, UsePresenceContext, UsePresenceProps, UsePresenceReturn, splitPresenceProps, usePresence, usePresenceContext };
@@ -0,0 +1,4 @@
1
+ import "../../factory-BbbIuDqa.mjs";
2
+ import "../../render-strategy-GetMScNK.mjs";
3
+ import { a as Presence, c as UsePresenceProps, i as splitPresenceProps, l as UsePresenceReturn, n as UsePresenceContext, o as PresenceBaseProps, r as usePresenceContext, s as PresenceProps, t as PresenceProvider, u as usePresence } from "../../index-BUN9wyVM.mjs";
4
+ export { Presence, PresenceBaseProps, PresenceProps, PresenceProvider, UsePresenceContext, UsePresenceProps, UsePresenceReturn, splitPresenceProps, usePresence, usePresenceContext };
@@ -0,0 +1,7 @@
1
+ import "../../core-C0F-4KYH.mjs";
2
+ import "../../create-context-CdjrBhu7.mjs";
3
+ import "../../factory-DQlmCPH2.mjs";
4
+ import { a as splitPresenceProps, i as usePresence, n as usePresenceContext, r as Presence, t as PresenceProvider } from "../../presence-2A4loEJY.mjs";
5
+ import "../../use-event-BcyNH29h.mjs";
6
+
7
+ export { Presence, PresenceProvider, splitPresenceProps, usePresence, usePresenceContext };