@sprawlify/solid 0.0.17 → 0.0.19
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/{collapsible-Dp3pmOz6.js → collapsible-ACshHp__.js} +8 -8
- package/dist/{collapsible-oWvTRylz.jsx → collapsible-CKkCMXuJ.jsx} +8 -8
- package/dist/{collection-DOjgejiS.js → collection-CJLbf7-L.js} +2 -2
- package/dist/{collection-gIC58P6c.jsx → collection-DpPs7_vA.jsx} +2 -2
- package/dist/components/accordion/index.d.ts +11 -11
- package/dist/components/accordion/index.js +9 -9
- package/dist/components/accordion/index.jsx +9 -9
- package/dist/components/angle-slider/index.d.ts +13 -13
- package/dist/components/angle-slider/index.js +7 -7
- package/dist/components/angle-slider/index.jsx +7 -7
- package/dist/components/avatar/index.d.ts +8 -8
- package/dist/components/avatar/index.js +7 -7
- package/dist/components/avatar/index.jsx +7 -7
- package/dist/components/bottom-sheet/index.d.ts +13 -13
- package/dist/components/bottom-sheet/index.js +10 -10
- package/dist/components/bottom-sheet/index.jsx +10 -10
- package/dist/components/carousel/index.d.ts +17 -17
- package/dist/components/carousel/index.js +7 -7
- package/dist/components/carousel/index.jsx +7 -7
- package/dist/components/checkbox/index.d.ts +14 -14
- package/dist/components/checkbox/index.js +10 -10
- package/dist/components/checkbox/index.jsx +10 -10
- package/dist/components/clipboard/index.d.ts +11 -11
- package/dist/components/clipboard/index.js +7 -7
- package/dist/components/clipboard/index.jsx +7 -7
- package/dist/components/collapsible/index.d.ts +10 -10
- package/dist/components/collapsible/index.js +7 -7
- package/dist/components/collapsible/index.jsx +7 -7
- package/dist/components/collection/index.d.ts +2 -2
- package/dist/components/collection/index.js +2 -2
- package/dist/components/collection/index.jsx +2 -2
- package/dist/components/color-picker/index.d.ts +36 -36
- package/dist/components/color-picker/index.js +12 -12
- package/dist/components/color-picker/index.jsx +12 -12
- package/dist/components/combobox/index.d.ts +23 -23
- package/dist/components/combobox/index.js +13 -13
- package/dist/components/combobox/index.jsx +13 -13
- package/dist/components/date-picker/index.d.ts +33 -33
- package/dist/components/date-picker/index.js +10 -10
- package/dist/components/date-picker/index.jsx +10 -10
- package/dist/components/dialog/index.d.ts +13 -13
- package/dist/components/dialog/index.js +10 -10
- package/dist/components/dialog/index.jsx +10 -10
- package/dist/components/download-trigger/index.d.ts +2 -2
- package/dist/components/download-trigger/index.js +4 -4
- package/dist/components/download-trigger/index.jsx +4 -4
- package/dist/components/editable/index.d.ts +14 -14
- package/dist/components/editable/index.js +10 -10
- package/dist/components/editable/index.jsx +10 -10
- package/dist/components/field/index.d.ts +15 -15
- package/dist/components/field/index.js +8 -8
- package/dist/components/field/index.jsx +8 -8
- package/dist/components/fieldset/index.d.ts +12 -12
- package/dist/components/fieldset/index.js +7 -7
- package/dist/components/fieldset/index.jsx +7 -7
- package/dist/components/file-upload/index.d.ts +18 -18
- package/dist/components/file-upload/index.js +10 -10
- package/dist/components/file-upload/index.jsx +10 -10
- package/dist/components/floating-panel/index.d.ts +17 -17
- package/dist/components/floating-panel/index.js +10 -10
- package/dist/components/floating-panel/index.jsx +10 -10
- package/dist/components/focus-trap/index.d.ts +4 -4
- package/dist/components/focus-trap/index.js +4 -4
- package/dist/components/focus-trap/index.jsx +4 -4
- package/dist/components/format/index.d.ts +4 -4
- package/dist/components/format/index.js +3 -3
- package/dist/components/format/index.jsx +3 -3
- package/dist/components/frame/index.d.ts +1 -1
- package/dist/components/frame/index.js +3 -3
- package/dist/components/frame/index.jsx +3 -3
- package/dist/components/highlight/index.d.ts +3 -3
- package/dist/components/highlight/index.js +2 -2
- package/dist/components/highlight/index.jsx +2 -2
- package/dist/components/hover-card/index.d.ts +70 -0
- package/dist/components/hover-card/index.js +168 -0
- package/dist/components/hover-card/index.jsx +136 -0
- package/dist/components/image-cropper/index.d.ts +64 -0
- package/dist/components/image-cropper/index.js +151 -0
- package/dist/components/image-cropper/index.jsx +144 -0
- package/dist/components/json-tree-view/index.d.ts +56 -0
- package/dist/components/json-tree-view/index.js +330 -0
- package/dist/components/json-tree-view/index.jsx +204 -0
- package/dist/components/listbox/index.d.ts +114 -0
- package/dist/components/listbox/index.js +261 -0
- package/dist/components/listbox/index.jsx +236 -0
- package/dist/components/marquee/index.d.ts +59 -0
- package/dist/components/marquee/index.js +138 -0
- package/dist/components/marquee/index.jsx +126 -0
- package/dist/components/menu/index.d.ts +161 -0
- package/dist/components/menu/index.js +471 -0
- package/dist/components/menu/index.jsx +392 -0
- package/dist/components/navigation-menu/index.d.ts +90 -0
- package/dist/components/navigation-menu/index.js +304 -0
- package/dist/components/navigation-menu/index.jsx +237 -0
- package/dist/components/number-input/index.d.ts +74 -0
- package/dist/components/number-input/index.js +182 -0
- package/dist/components/number-input/index.jsx +173 -0
- package/dist/components/pagination/index.d.ts +69 -0
- package/dist/components/pagination/index.js +146 -0
- package/dist/components/pagination/index.jsx +139 -0
- package/dist/components/password-input/index.d.ts +66 -0
- package/dist/components/password-input/index.js +159 -0
- package/dist/components/password-input/index.jsx +140 -0
- package/dist/components/pin-input/index.d.ts +59 -0
- package/dist/components/pin-input/index.js +151 -0
- package/dist/components/pin-input/index.jsx +142 -0
- package/dist/components/popover/index.d.ts +95 -0
- package/dist/components/popover/index.js +220 -0
- package/dist/components/popover/index.jsx +188 -0
- package/dist/components/presence/index.d.ts +4 -4
- package/dist/components/presence/index.js +7 -7
- package/dist/components/presence/index.jsx +7 -7
- package/dist/components/progress/index.d.ts +79 -0
- package/dist/components/progress/index.js +163 -0
- package/dist/components/progress/index.jsx +154 -0
- package/dist/components/qr-code/index.d.ts +59 -0
- package/dist/components/qr-code/index.js +124 -0
- package/dist/components/qr-code/index.jsx +117 -0
- package/dist/components/radio-group/index.d.ts +78 -0
- package/dist/components/radio-group/index.js +189 -0
- package/dist/components/radio-group/index.jsx +176 -0
- package/dist/components/rating-group/index.d.ts +68 -0
- package/dist/components/rating-group/index.js +159 -0
- package/dist/components/rating-group/index.jsx +148 -0
- package/dist/components/scroll-area/index.d.ts +63 -0
- package/dist/components/scroll-area/index.js +134 -0
- package/dist/components/scroll-area/index.jsx +124 -0
- package/dist/components/segment-group/index.d.ts +82 -0
- package/dist/components/segment-group/index.js +185 -0
- package/dist/components/segment-group/index.jsx +172 -0
- package/dist/components/select/index.d.ts +22 -22
- package/dist/components/select/index.js +13 -13
- package/dist/components/select/index.jsx +13 -13
- package/dist/components/tree-view/index.d.ts +7 -0
- package/dist/components/tree-view/index.js +11 -0
- package/dist/components/tree-view/index.jsx +11 -0
- package/dist/{factory-OCDy1fEv.jsx → factory-CaQWQo9S.jsx} +1 -1
- package/dist/{factory-Ci1LUSWg.js → factory-Cw0jOohn.js} +1 -1
- package/dist/{factory-C7CCEqYp.d.ts → factory-JAbO6zq9.d.ts} +6 -1
- package/dist/{field-D5bG5XXV.js → field-CF9yh37t.js} +8 -8
- package/dist/{field-DQLYAOgJ.jsx → field-HJX3--SZ.jsx} +8 -8
- package/dist/{fieldset-DT2nCjE0.jsx → fieldset-GRdimTgu.jsx} +8 -8
- package/dist/{fieldset-Def05D5r.js → fieldset-QCHS-iMi.js} +8 -8
- package/dist/index-BGVwqZq5.d.ts +143 -0
- package/dist/index-BIlfNQle.d.ts +41 -0
- package/dist/index-BRkEGZOE.d.ts +41 -0
- package/dist/{index-Bf3vaCUa.d.ts → index-CWs-F296.d.ts} +8 -8
- package/dist/{index-4WaIBGi6.d.ts → index-CXTRMyIJ.d.ts} +1 -1
- package/dist/{index-CsB3A61w.d.ts → index-DD3lUYha.d.ts} +8 -8
- package/dist/index-PYTR4Rcx.d.ts +143 -0
- package/dist/index.d.ts +6 -44
- package/dist/index.js +6 -5
- package/dist/index.jsx +6 -5
- package/dist/{presence-CAkwk5S4.js → presence-DghVNXji.js} +7 -7
- package/dist/{presence-vlL8hWT8.jsx → presence-w97672yk.jsx} +7 -7
- package/dist/{providers-BRmk_hzA.jsx → providers--4jSRiKF.jsx} +2 -2
- package/dist/{providers-D1hKjv0s.js → providers-DU0gn4Pj.js} +2 -2
- package/dist/{render-strategy-BA_kLuwR.jsx → render-strategy-Bv1Mb0YK.jsx} +2 -2
- package/dist/{render-strategy-CqWA1-xU.js → render-strategy-CDrX5Nbw.js} +2 -2
- package/dist/tree-view-DdWaaT-E.js +318 -0
- package/dist/tree-view-Z565ZOf5.jsx +291 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +2 -2
- package/dist/utils/index.jsx +2 -2
- package/package.json +97 -2
- /package/dist/{chunk-Wl6TQfsu.js → chunk-D5dGY5zD.jsx} +0 -0
- /package/dist/{chunk-dNcSV51B.jsx → chunk-Dcpub2IO.js} +0 -0
- /package/dist/{compose-refs-CDTdkuP1.jsx → compose-refs-D9EoLzZW.js} +0 -0
- /package/dist/{compose-refs-DbJoODKO.js → compose-refs-DhhUBbcq.jsx} +0 -0
- /package/dist/{core-CWSDVCoi.jsx → core-7JOW6ue9.jsx} +0 -0
- /package/dist/{core-Cl2xcDm5.js → core-D7Nb-duK.js} +0 -0
- /package/dist/{create-context-BBDU3kF1.js → create-context-BxYEOGb8.js} +0 -0
- /package/dist/{create-context-CpcL7CiV.jsx → create-context-CnA1wNMK.jsx} +0 -0
- /package/dist/{create-split-props-CHlLW_X_.js → create-split-props-CdETNVwB.jsx} +0 -0
- /package/dist/{create-split-props-DrfYep1t.jsx → create-split-props-u4BuKc2i.js} +0 -0
- /package/dist/{index-5DzQGTeT.d.ts → index-BF_h-dhb.d.ts} +0 -0
- /package/dist/{index-BLKwiHM7.d.ts → index-tbMcVIMv.d.ts} +0 -0
- /package/dist/{render-strategy-DfQ78EfE.d.ts → render-strategy-BYpcY4CF.d.ts} +0 -0
- /package/dist/{run-if-fn-Ct4sSuFV.js → run-if-fn-B-2chXMn.js} +0 -0
- /package/dist/{run-if-fn-iVu0r8rO.jsx → run-if-fn-D59uI-12.jsx} +0 -0
- /package/dist/{types-M3kll1K0.d.ts → types-DPhuMU2R.d.ts} +0 -0
- /package/dist/{utils-DK-8VxTv.jsx → utils-CM1Hmr0J.js} +0 -0
- /package/dist/{utils-xOi5tXWN.js → utils-DWEfyavN.jsx} +0 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { t as __export } from "../../chunk-D5dGY5zD.jsx";
|
|
2
|
+
import { i as useMachine, n as normalizeProps, r as mergeProps$1 } from "../../core-7JOW6ue9.jsx";
|
|
3
|
+
import { t as runIfFn } from "../../run-if-fn-D59uI-12.jsx";
|
|
4
|
+
import { t as createContext$1 } from "../../create-context-CnA1wNMK.jsx";
|
|
5
|
+
import { i as useLocaleContext, o as useEnvironmentContext } from "../../providers--4jSRiKF.jsx";
|
|
6
|
+
import { t as sprawlify } from "../../factory-CaQWQo9S.jsx";
|
|
7
|
+
import { t as createSplitProps } from "../../create-split-props-CdETNVwB.jsx";
|
|
8
|
+
import "../../compose-refs-DhhUBbcq.jsx";
|
|
9
|
+
import { u as useFieldsetContext } from "../../fieldset-GRdimTgu.jsx";
|
|
10
|
+
import { createMemo, createUniqueId } from "solid-js";
|
|
11
|
+
import * as radio from "@sprawlify/primitives/machines/radio-group";
|
|
12
|
+
import { anatomy as radioGroupAnatomy } from "@sprawlify/primitives/machines/radio-group";
|
|
13
|
+
|
|
14
|
+
//#region src/components/radio-group/use-radio-group-context.ts
|
|
15
|
+
const [RadioGroupProvider, useRadioGroupContext] = createContext$1({
|
|
16
|
+
hookName: "useRadioGroupContext",
|
|
17
|
+
providerName: "<RadioGroupProvider />"
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/components/radio-group/radio-group-context.tsx
|
|
22
|
+
const RadioGroupContext = (props) => props.children(useRadioGroupContext());
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/components/radio-group/radio-group-indicator.tsx
|
|
26
|
+
const RadioGroupIndicator = (props) => {
|
|
27
|
+
const radioGroup = useRadioGroupContext();
|
|
28
|
+
const mergedProps = mergeProps$1(() => radioGroup().getIndicatorProps(), props);
|
|
29
|
+
return <sprawlify.div {...mergedProps} />;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/components/radio-group/use-radio-group-item-context.ts
|
|
34
|
+
const [RadioGroupItemProvider, useRadioGroupItemContext] = createContext$1({
|
|
35
|
+
hookName: "useRadioGroupItemContext",
|
|
36
|
+
providerName: "<RadioGroupItemProvider />"
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/components/radio-group/use-radio-group-item-props-context.ts
|
|
41
|
+
const [RadioGroupItemPropsProvider, useRadioGroupItemPropsContext] = createContext$1({
|
|
42
|
+
hookName: "useRadioGroupItemPropsContext",
|
|
43
|
+
providerName: "<RadioGroupItemPropsProvider />"
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/components/radio-group/radio-group-item.tsx
|
|
48
|
+
const RadioGroupItem = (props) => {
|
|
49
|
+
const [itemProps, localProps] = createSplitProps()(props, [
|
|
50
|
+
"value",
|
|
51
|
+
"disabled",
|
|
52
|
+
"invalid"
|
|
53
|
+
]);
|
|
54
|
+
const radioGroup = useRadioGroupContext();
|
|
55
|
+
const mergedProps = mergeProps$1(() => radioGroup().getItemProps(itemProps), localProps);
|
|
56
|
+
const itemState = createMemo(() => radioGroup().getItemState(itemProps));
|
|
57
|
+
return <RadioGroupItemPropsProvider value={itemProps}>
|
|
58
|
+
<RadioGroupItemProvider value={itemState}>
|
|
59
|
+
<sprawlify.label {...mergedProps} />
|
|
60
|
+
</RadioGroupItemProvider>
|
|
61
|
+
</RadioGroupItemPropsProvider>;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region src/components/radio-group/radio-group-item-context.tsx
|
|
66
|
+
const RadioGroupItemContext = (props) => props.children(useRadioGroupItemContext());
|
|
67
|
+
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/components/radio-group/radio-group-item-control.tsx
|
|
70
|
+
const RadioGroupItemControl = (props) => {
|
|
71
|
+
const radioGroup = useRadioGroupContext();
|
|
72
|
+
const itemProps = useRadioGroupItemPropsContext();
|
|
73
|
+
const mergedProps = mergeProps$1(() => radioGroup().getItemControlProps(itemProps), props);
|
|
74
|
+
return <sprawlify.div {...mergedProps} />;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/components/radio-group/radio-group-item-hidden-input.tsx
|
|
79
|
+
const RadioGroupItemHiddenInput = (props) => {
|
|
80
|
+
const radioGroup = useRadioGroupContext();
|
|
81
|
+
const itemProps = useRadioGroupItemPropsContext();
|
|
82
|
+
const mergedProps = mergeProps$1(() => radioGroup().getItemHiddenInputProps(itemProps), props);
|
|
83
|
+
return <sprawlify.input {...mergedProps} />;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/components/radio-group/radio-group-item-text.tsx
|
|
88
|
+
const RadioGroupItemText = (props) => {
|
|
89
|
+
const radioGroup = useRadioGroupContext();
|
|
90
|
+
const itemProps = useRadioGroupItemPropsContext();
|
|
91
|
+
const mergedProps = mergeProps$1(() => radioGroup().getItemTextProps(itemProps), props);
|
|
92
|
+
return <sprawlify.span {...mergedProps} />;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region src/components/radio-group/radio-group-label.tsx
|
|
97
|
+
const RadioGroupLabel = (props) => {
|
|
98
|
+
const radioGroup = useRadioGroupContext();
|
|
99
|
+
const mergedProps = mergeProps$1(() => radioGroup().getLabelProps(), props);
|
|
100
|
+
return <sprawlify.label {...mergedProps} />;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region src/components/radio-group/use-radio-group.ts
|
|
105
|
+
const useRadioGroup = (props) => {
|
|
106
|
+
const id = createUniqueId();
|
|
107
|
+
const locale = useLocaleContext();
|
|
108
|
+
const environment = useEnvironmentContext();
|
|
109
|
+
const fieldset = useFieldsetContext();
|
|
110
|
+
const machineProps = createMemo(() => {
|
|
111
|
+
const fieldsetContext = fieldset?.();
|
|
112
|
+
return {
|
|
113
|
+
id,
|
|
114
|
+
ids: { label: fieldsetContext?.ids?.legend },
|
|
115
|
+
dir: locale().dir,
|
|
116
|
+
disabled: fieldsetContext?.disabled,
|
|
117
|
+
invalid: fieldsetContext?.invalid,
|
|
118
|
+
getRootNode: environment().getRootNode,
|
|
119
|
+
...runIfFn(props)
|
|
120
|
+
};
|
|
121
|
+
});
|
|
122
|
+
const service = useMachine(radio.machine, machineProps);
|
|
123
|
+
return createMemo(() => radio.connect(service, normalizeProps));
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
//#endregion
|
|
127
|
+
//#region src/components/radio-group/radio-group-root.tsx
|
|
128
|
+
const RadioGroupRoot = (props) => {
|
|
129
|
+
const [useRadioGroupProps, localProps] = createSplitProps()(props, [
|
|
130
|
+
"defaultValue",
|
|
131
|
+
"disabled",
|
|
132
|
+
"form",
|
|
133
|
+
"id",
|
|
134
|
+
"ids",
|
|
135
|
+
"invalid",
|
|
136
|
+
"name",
|
|
137
|
+
"onValueChange",
|
|
138
|
+
"orientation",
|
|
139
|
+
"readOnly",
|
|
140
|
+
"required",
|
|
141
|
+
"value"
|
|
142
|
+
]);
|
|
143
|
+
const radioGroup = useRadioGroup(useRadioGroupProps);
|
|
144
|
+
const mergedProps = mergeProps$1(() => radioGroup().getRootProps(), localProps);
|
|
145
|
+
return <RadioGroupProvider value={radioGroup}>
|
|
146
|
+
<sprawlify.div {...mergedProps} />
|
|
147
|
+
</RadioGroupProvider>;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
//#endregion
|
|
151
|
+
//#region src/components/radio-group/radio-group-root-provider.tsx
|
|
152
|
+
const RadioGroupRootProvider = (props) => {
|
|
153
|
+
const [{ value: radioGroup }, localProps] = createSplitProps()(props, ["value"]);
|
|
154
|
+
const mergedProps = mergeProps$1(() => radioGroup().getRootProps(), localProps);
|
|
155
|
+
return <RadioGroupProvider value={radioGroup}>
|
|
156
|
+
<sprawlify.div {...mergedProps} />
|
|
157
|
+
</RadioGroupProvider>;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
//#endregion
|
|
161
|
+
//#region src/components/radio-group/radio-group.ts
|
|
162
|
+
var radio_group_exports = /* @__PURE__ */ __export({
|
|
163
|
+
Context: () => RadioGroupContext,
|
|
164
|
+
Indicator: () => RadioGroupIndicator,
|
|
165
|
+
Item: () => RadioGroupItem,
|
|
166
|
+
ItemContext: () => RadioGroupItemContext,
|
|
167
|
+
ItemControl: () => RadioGroupItemControl,
|
|
168
|
+
ItemHiddenInput: () => RadioGroupItemHiddenInput,
|
|
169
|
+
ItemText: () => RadioGroupItemText,
|
|
170
|
+
Label: () => RadioGroupLabel,
|
|
171
|
+
Root: () => RadioGroupRoot,
|
|
172
|
+
RootProvider: () => RadioGroupRootProvider
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
//#endregion
|
|
176
|
+
export { radio_group_exports as RadioGroup, RadioGroupContext, RadioGroupIndicator, RadioGroupItem, RadioGroupItemContext, RadioGroupItemControl, RadioGroupItemHiddenInput, RadioGroupItemText, RadioGroupLabel, RadioGroupRoot, RadioGroupRootProvider, radioGroupAnatomy, useRadioGroup, useRadioGroupContext, useRadioGroupItemContext };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { n as PropTypes } from "../../index-tbMcVIMv.js";
|
|
2
|
+
import { i as Optional, n as MaybeAccessor } from "../../types-DPhuMU2R.js";
|
|
3
|
+
import { r as PolymorphicProps, t as HTMLProps } from "../../factory-JAbO6zq9.js";
|
|
4
|
+
import * as solid_js0 from "solid-js";
|
|
5
|
+
import { Accessor, JSX } from "solid-js";
|
|
6
|
+
import * as ratingGroup from "@sprawlify/primitives/machines/rating-group";
|
|
7
|
+
import { HoverChangeDetails, HoverChangeDetails as RatingGroupHoverChangeDetails, ItemProps, ItemState, ValueChangeDetails, ValueChangeDetails as RatingGroupValueChangeDetails, anatomy as ratingGroupAnatomy } from "@sprawlify/primitives/machines/rating-group";
|
|
8
|
+
|
|
9
|
+
//#region src/components/rating-group/use-rating-group.d.ts
|
|
10
|
+
interface UseRatingGroupProps extends Optional<Omit<ratingGroup.Props, 'dir' | 'getRootNode'>, 'id'> {}
|
|
11
|
+
interface UseRatingGroupReturn extends Accessor<ratingGroup.Api<PropTypes>> {}
|
|
12
|
+
declare const useRatingGroup: (props?: MaybeAccessor<UseRatingGroupProps>) => UseRatingGroupReturn;
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/components/rating-group/use-rating-group-context.d.ts
|
|
15
|
+
interface UseRatingGroupContext extends UseRatingGroupReturn {}
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/components/rating-group/rating-group-context.d.ts
|
|
18
|
+
interface RatingGroupContextProps {
|
|
19
|
+
children: (context: UseRatingGroupContext) => JSX.Element;
|
|
20
|
+
}
|
|
21
|
+
declare const RatingGroupContext: (props: RatingGroupContextProps) => JSX.Element;
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/components/rating-group/rating-group-control.d.ts
|
|
24
|
+
interface RatingGroupControlBaseProps extends PolymorphicProps<'div'> {}
|
|
25
|
+
interface RatingGroupControlProps extends HTMLProps<'div'>, RatingGroupControlBaseProps {}
|
|
26
|
+
declare const RatingGroupControl: (props: RatingGroupControlProps) => solid_js0.JSX.Element;
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/components/rating-group/rating-group-hidden-input.d.ts
|
|
29
|
+
interface RatingGroupHiddenInputBaseProps extends PolymorphicProps<'input'> {}
|
|
30
|
+
interface RatingGroupHiddenInputProps extends HTMLProps<'input'>, RatingGroupHiddenInputBaseProps {}
|
|
31
|
+
declare const RatingGroupHiddenInput: (props: RatingGroupHiddenInputProps) => solid_js0.JSX.Element;
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/components/rating-group/rating-group-item.d.ts
|
|
34
|
+
interface RatingGroupItemBaseProps extends ItemProps, PolymorphicProps<'span'> {}
|
|
35
|
+
interface RatingGroupItemProps extends HTMLProps<'span'>, RatingGroupItemBaseProps {}
|
|
36
|
+
declare const RatingGroupItem: (props: RatingGroupItemProps) => solid_js0.JSX.Element;
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/components/rating-group/use-rating-group-item-context.d.ts
|
|
39
|
+
interface UseRatingGroupItemContext extends Accessor<ItemState> {}
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region src/components/rating-group/rating-group-item-context.d.ts
|
|
42
|
+
interface RatingGroupItemContextProps {
|
|
43
|
+
children: (context: UseRatingGroupItemContext) => JSX.Element;
|
|
44
|
+
}
|
|
45
|
+
declare const RatingGroupItemContext: (props: RatingGroupItemContextProps) => JSX.Element;
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/components/rating-group/rating-group-label.d.ts
|
|
48
|
+
interface RatingGroupLabelBaseProps extends PolymorphicProps<'label'> {}
|
|
49
|
+
interface RatingGroupLabelProps extends HTMLProps<'label'>, RatingGroupLabelBaseProps {}
|
|
50
|
+
declare const RatingGroupLabel: (props: RatingGroupLabelProps) => solid_js0.JSX.Element;
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/components/rating-group/rating-group-root.d.ts
|
|
53
|
+
interface RatingGroupRootBaseProps extends UseRatingGroupProps, PolymorphicProps<'div'> {}
|
|
54
|
+
interface RatingGroupRootProps extends HTMLProps<'div'>, RatingGroupRootBaseProps {}
|
|
55
|
+
declare const RatingGroupRoot: (props: RatingGroupRootProps) => solid_js0.JSX.Element;
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/components/rating-group/rating-group-root-provider.d.ts
|
|
58
|
+
interface RootProviderProps {
|
|
59
|
+
value: UseRatingGroupReturn;
|
|
60
|
+
}
|
|
61
|
+
interface RatingGroupRootProviderBaseProps extends PolymorphicProps<'div'> {}
|
|
62
|
+
interface RatingGroupRootProviderProps extends HTMLProps<'div'>, RootProviderProps, RatingGroupRootProviderBaseProps {}
|
|
63
|
+
declare const RatingGroupRootProvider: (props: RatingGroupRootProviderProps) => solid_js0.JSX.Element;
|
|
64
|
+
declare namespace rating_group_d_exports {
|
|
65
|
+
export { RatingGroupContext as Context, RatingGroupContextProps as ContextProps, RatingGroupControl as Control, RatingGroupControlBaseProps as ControlBaseProps, RatingGroupControlProps as ControlProps, RatingGroupHiddenInput as HiddenInput, RatingGroupHiddenInputBaseProps as HiddenInputBaseProps, RatingGroupHiddenInputProps as HiddenInputProps, HoverChangeDetails, RatingGroupItem as Item, RatingGroupItemBaseProps as ItemBaseProps, RatingGroupItemContext as ItemContext, RatingGroupItemContextProps as ItemContextProps, RatingGroupItemProps as ItemProps, RatingGroupLabel as Label, RatingGroupLabelBaseProps as LabelBaseProps, RatingGroupLabelProps as LabelProps, RatingGroupRoot as Root, RatingGroupRootBaseProps as RootBaseProps, RatingGroupRootProps as RootProps, RatingGroupRootProvider as RootProvider, RatingGroupRootProviderBaseProps as RootProviderBaseProps, RatingGroupRootProviderProps as RootProviderProps, ValueChangeDetails };
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
export { rating_group_d_exports as RatingGroup, RatingGroupContext, type RatingGroupContextProps, RatingGroupControl, type RatingGroupControlBaseProps, type RatingGroupControlProps, RatingGroupHiddenInput, type RatingGroupHiddenInputBaseProps, type RatingGroupHiddenInputProps, type RatingGroupHoverChangeDetails, RatingGroupItem, type RatingGroupItemBaseProps, RatingGroupItemContext, type RatingGroupItemContextProps, type RatingGroupItemProps, RatingGroupLabel, type RatingGroupLabelBaseProps, type RatingGroupLabelProps, RatingGroupRoot, type RatingGroupRootBaseProps, type RatingGroupRootProps, RatingGroupRootProvider, type RatingGroupRootProviderBaseProps, type RatingGroupRootProviderProps, type RatingGroupValueChangeDetails, type UseRatingGroupContext, type UseRatingGroupItemContext, type UseRatingGroupProps, type UseRatingGroupReturn, ratingGroupAnatomy, useRatingGroup, useRatingGroupContext, useRatingGroupItemContext };
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { t as __export } from "../../chunk-Dcpub2IO.js";
|
|
2
|
+
import { i as useMachine, n as normalizeProps, r as mergeProps$2 } from "../../core-D7Nb-duK.js";
|
|
3
|
+
import { t as runIfFn } from "../../run-if-fn-B-2chXMn.js";
|
|
4
|
+
import { t as createContext$1 } from "../../create-context-BxYEOGb8.js";
|
|
5
|
+
import { i as useLocaleContext, o as useEnvironmentContext } from "../../providers-DU0gn4Pj.js";
|
|
6
|
+
import { t as sprawlify } from "../../factory-Cw0jOohn.js";
|
|
7
|
+
import { t as createSplitProps } from "../../create-split-props-u4BuKc2i.js";
|
|
8
|
+
import "../../compose-refs-D9EoLzZW.js";
|
|
9
|
+
import "../../fieldset-QCHS-iMi.js";
|
|
10
|
+
import { m as useFieldContext } from "../../field-CF9yh37t.js";
|
|
11
|
+
import { createMemo, createUniqueId } from "solid-js";
|
|
12
|
+
import { createComponent, mergeProps as mergeProps$1 } from "solid-js/web";
|
|
13
|
+
import * as ratingGroup from "@sprawlify/primitives/machines/rating-group";
|
|
14
|
+
import { anatomy as ratingGroupAnatomy } from "@sprawlify/primitives/machines/rating-group";
|
|
15
|
+
|
|
16
|
+
//#region src/components/rating-group/use-rating-group-context.ts
|
|
17
|
+
const [RatingGroupProvider, useRatingGroupContext] = createContext$1({
|
|
18
|
+
hookName: "useRatingGroupContext",
|
|
19
|
+
providerName: "<RatingGroupProvider />"
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/components/rating-group/rating-group-context.tsx
|
|
24
|
+
const RatingGroupContext = (props) => props.children(useRatingGroupContext());
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/components/rating-group/rating-group-control.tsx
|
|
28
|
+
const RatingGroupControl = (props) => {
|
|
29
|
+
const ratingGroup$1 = useRatingGroupContext();
|
|
30
|
+
const mergedProps = mergeProps$2(() => ratingGroup$1().getControlProps(), props);
|
|
31
|
+
return createComponent(sprawlify.div, mergedProps);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/components/rating-group/rating-group-hidden-input.tsx
|
|
36
|
+
const RatingGroupHiddenInput = (props) => {
|
|
37
|
+
const ratingGroup$1 = useRatingGroupContext();
|
|
38
|
+
const mergedProps = mergeProps$2(() => ratingGroup$1().getHiddenInputProps(), props);
|
|
39
|
+
const field = useFieldContext();
|
|
40
|
+
return createComponent(sprawlify.input, mergeProps$1({ get ["aria-describedby"]() {
|
|
41
|
+
return field?.().ariaDescribedby;
|
|
42
|
+
} }, mergedProps));
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/components/rating-group/use-rating-group-item-context.ts
|
|
47
|
+
const [RatingGroupItemProvider, useRatingGroupItemContext] = createContext$1({
|
|
48
|
+
hookName: "useRatingGroupItemContext",
|
|
49
|
+
providerName: "<RatingGroupItemProvider />"
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/components/rating-group/rating-group-item.tsx
|
|
54
|
+
const RatingGroupItem = (props) => {
|
|
55
|
+
const [itemProps, localProps] = createSplitProps()(props, ["index"]);
|
|
56
|
+
const api = useRatingGroupContext();
|
|
57
|
+
const mergedProps = mergeProps$2(() => api().getItemProps(itemProps), localProps);
|
|
58
|
+
return createComponent(RatingGroupItemProvider, {
|
|
59
|
+
value: createMemo(() => api().getItemState(itemProps)),
|
|
60
|
+
get children() {
|
|
61
|
+
return createComponent(sprawlify.span, mergedProps);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/components/rating-group/rating-group-item-context.tsx
|
|
68
|
+
const RatingGroupItemContext = (props) => props.children(useRatingGroupItemContext());
|
|
69
|
+
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region src/components/rating-group/rating-group-label.tsx
|
|
72
|
+
const RatingGroupLabel = (props) => {
|
|
73
|
+
const api = useRatingGroupContext();
|
|
74
|
+
const mergedProps = mergeProps$2(() => api().getLabelProps(), props);
|
|
75
|
+
return createComponent(sprawlify.label, mergedProps);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/components/rating-group/use-rating-group.ts
|
|
80
|
+
const useRatingGroup = (props) => {
|
|
81
|
+
const id = createUniqueId();
|
|
82
|
+
const locale = useLocaleContext();
|
|
83
|
+
const environment = useEnvironmentContext();
|
|
84
|
+
const field = useFieldContext();
|
|
85
|
+
const machineProps = createMemo(() => ({
|
|
86
|
+
id,
|
|
87
|
+
ids: {
|
|
88
|
+
label: field?.().ids.label,
|
|
89
|
+
hiddenInput: field?.().ids.control
|
|
90
|
+
},
|
|
91
|
+
disabled: field?.().disabled,
|
|
92
|
+
readOnly: field?.().readOnly,
|
|
93
|
+
required: field?.().required,
|
|
94
|
+
dir: locale().dir,
|
|
95
|
+
getRootNode: environment().getRootNode,
|
|
96
|
+
...runIfFn(props)
|
|
97
|
+
}));
|
|
98
|
+
const service = useMachine(ratingGroup.machine, machineProps);
|
|
99
|
+
return createMemo(() => ratingGroup.connect(service, normalizeProps));
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/components/rating-group/rating-group-root.tsx
|
|
104
|
+
const RatingGroupRoot = (props) => {
|
|
105
|
+
const [useRatingProps, localProps] = createSplitProps()(props, [
|
|
106
|
+
"allowHalf",
|
|
107
|
+
"autoFocus",
|
|
108
|
+
"count",
|
|
109
|
+
"defaultValue",
|
|
110
|
+
"disabled",
|
|
111
|
+
"form",
|
|
112
|
+
"id",
|
|
113
|
+
"ids",
|
|
114
|
+
"name",
|
|
115
|
+
"onHoverChange",
|
|
116
|
+
"onValueChange",
|
|
117
|
+
"readOnly",
|
|
118
|
+
"required",
|
|
119
|
+
"translations",
|
|
120
|
+
"value"
|
|
121
|
+
]);
|
|
122
|
+
const api = useRatingGroup(useRatingProps);
|
|
123
|
+
const mergedProps = mergeProps$2(() => api().getRootProps(), localProps);
|
|
124
|
+
return createComponent(RatingGroupProvider, {
|
|
125
|
+
value: api,
|
|
126
|
+
get children() {
|
|
127
|
+
return createComponent(sprawlify.div, mergedProps);
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
//#endregion
|
|
133
|
+
//#region src/components/rating-group/rating-group-root-provider.tsx
|
|
134
|
+
const RatingGroupRootProvider = (props) => {
|
|
135
|
+
const [{ value: ratingGroup$1 }, localProps] = createSplitProps()(props, ["value"]);
|
|
136
|
+
const mergedProps = mergeProps$2(() => ratingGroup$1().getRootProps(), localProps);
|
|
137
|
+
return createComponent(RatingGroupProvider, {
|
|
138
|
+
value: ratingGroup$1,
|
|
139
|
+
get children() {
|
|
140
|
+
return createComponent(sprawlify.div, mergedProps);
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
//#endregion
|
|
146
|
+
//#region src/components/rating-group/rating-group.ts
|
|
147
|
+
var rating_group_exports = /* @__PURE__ */ __export({
|
|
148
|
+
Context: () => RatingGroupContext,
|
|
149
|
+
Control: () => RatingGroupControl,
|
|
150
|
+
HiddenInput: () => RatingGroupHiddenInput,
|
|
151
|
+
Item: () => RatingGroupItem,
|
|
152
|
+
ItemContext: () => RatingGroupItemContext,
|
|
153
|
+
Label: () => RatingGroupLabel,
|
|
154
|
+
Root: () => RatingGroupRoot,
|
|
155
|
+
RootProvider: () => RatingGroupRootProvider
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
//#endregion
|
|
159
|
+
export { rating_group_exports as RatingGroup, RatingGroupContext, RatingGroupControl, RatingGroupHiddenInput, RatingGroupItem, RatingGroupItemContext, RatingGroupLabel, RatingGroupRoot, RatingGroupRootProvider, ratingGroupAnatomy, useRatingGroup, useRatingGroupContext, useRatingGroupItemContext };
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { t as __export } from "../../chunk-D5dGY5zD.jsx";
|
|
2
|
+
import { i as useMachine, n as normalizeProps, r as mergeProps$1 } from "../../core-7JOW6ue9.jsx";
|
|
3
|
+
import { t as runIfFn } from "../../run-if-fn-D59uI-12.jsx";
|
|
4
|
+
import { t as createContext$1 } from "../../create-context-CnA1wNMK.jsx";
|
|
5
|
+
import { i as useLocaleContext, o as useEnvironmentContext } from "../../providers--4jSRiKF.jsx";
|
|
6
|
+
import { t as sprawlify } from "../../factory-CaQWQo9S.jsx";
|
|
7
|
+
import { t as createSplitProps } from "../../create-split-props-CdETNVwB.jsx";
|
|
8
|
+
import "../../compose-refs-DhhUBbcq.jsx";
|
|
9
|
+
import "../../fieldset-GRdimTgu.jsx";
|
|
10
|
+
import { m as useFieldContext } from "../../field-HJX3--SZ.jsx";
|
|
11
|
+
import { createMemo, createUniqueId } from "solid-js";
|
|
12
|
+
import * as ratingGroup from "@sprawlify/primitives/machines/rating-group";
|
|
13
|
+
import { anatomy as ratingGroupAnatomy } from "@sprawlify/primitives/machines/rating-group";
|
|
14
|
+
|
|
15
|
+
//#region src/components/rating-group/use-rating-group-context.ts
|
|
16
|
+
const [RatingGroupProvider, useRatingGroupContext] = createContext$1({
|
|
17
|
+
hookName: "useRatingGroupContext",
|
|
18
|
+
providerName: "<RatingGroupProvider />"
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/components/rating-group/rating-group-context.tsx
|
|
23
|
+
const RatingGroupContext = (props) => props.children(useRatingGroupContext());
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/components/rating-group/rating-group-control.tsx
|
|
27
|
+
const RatingGroupControl = (props) => {
|
|
28
|
+
const ratingGroup$1 = useRatingGroupContext();
|
|
29
|
+
const mergedProps = mergeProps$1(() => ratingGroup$1().getControlProps(), props);
|
|
30
|
+
return <sprawlify.div {...mergedProps} />;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/components/rating-group/rating-group-hidden-input.tsx
|
|
35
|
+
const RatingGroupHiddenInput = (props) => {
|
|
36
|
+
const ratingGroup$1 = useRatingGroupContext();
|
|
37
|
+
const mergedProps = mergeProps$1(() => ratingGroup$1().getHiddenInputProps(), props);
|
|
38
|
+
const field = useFieldContext();
|
|
39
|
+
return <sprawlify.input aria-describedby={field?.().ariaDescribedby} {...mergedProps} />;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/components/rating-group/use-rating-group-item-context.ts
|
|
44
|
+
const [RatingGroupItemProvider, useRatingGroupItemContext] = createContext$1({
|
|
45
|
+
hookName: "useRatingGroupItemContext",
|
|
46
|
+
providerName: "<RatingGroupItemProvider />"
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/components/rating-group/rating-group-item.tsx
|
|
51
|
+
const RatingGroupItem = (props) => {
|
|
52
|
+
const [itemProps, localProps] = createSplitProps()(props, ["index"]);
|
|
53
|
+
const api = useRatingGroupContext();
|
|
54
|
+
const mergedProps = mergeProps$1(() => api().getItemProps(itemProps), localProps);
|
|
55
|
+
const itemState = createMemo(() => api().getItemState(itemProps));
|
|
56
|
+
return <RatingGroupItemProvider value={itemState}>
|
|
57
|
+
<sprawlify.span {...mergedProps} />
|
|
58
|
+
</RatingGroupItemProvider>;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/components/rating-group/rating-group-item-context.tsx
|
|
63
|
+
const RatingGroupItemContext = (props) => props.children(useRatingGroupItemContext());
|
|
64
|
+
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/components/rating-group/rating-group-label.tsx
|
|
67
|
+
const RatingGroupLabel = (props) => {
|
|
68
|
+
const api = useRatingGroupContext();
|
|
69
|
+
const mergedProps = mergeProps$1(() => api().getLabelProps(), props);
|
|
70
|
+
return <sprawlify.label {...mergedProps} />;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/components/rating-group/use-rating-group.ts
|
|
75
|
+
const useRatingGroup = (props) => {
|
|
76
|
+
const id = createUniqueId();
|
|
77
|
+
const locale = useLocaleContext();
|
|
78
|
+
const environment = useEnvironmentContext();
|
|
79
|
+
const field = useFieldContext();
|
|
80
|
+
const machineProps = createMemo(() => ({
|
|
81
|
+
id,
|
|
82
|
+
ids: {
|
|
83
|
+
label: field?.().ids.label,
|
|
84
|
+
hiddenInput: field?.().ids.control
|
|
85
|
+
},
|
|
86
|
+
disabled: field?.().disabled,
|
|
87
|
+
readOnly: field?.().readOnly,
|
|
88
|
+
required: field?.().required,
|
|
89
|
+
dir: locale().dir,
|
|
90
|
+
getRootNode: environment().getRootNode,
|
|
91
|
+
...runIfFn(props)
|
|
92
|
+
}));
|
|
93
|
+
const service = useMachine(ratingGroup.machine, machineProps);
|
|
94
|
+
return createMemo(() => ratingGroup.connect(service, normalizeProps));
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/components/rating-group/rating-group-root.tsx
|
|
99
|
+
const RatingGroupRoot = (props) => {
|
|
100
|
+
const [useRatingProps, localProps] = createSplitProps()(props, [
|
|
101
|
+
"allowHalf",
|
|
102
|
+
"autoFocus",
|
|
103
|
+
"count",
|
|
104
|
+
"defaultValue",
|
|
105
|
+
"disabled",
|
|
106
|
+
"form",
|
|
107
|
+
"id",
|
|
108
|
+
"ids",
|
|
109
|
+
"name",
|
|
110
|
+
"onHoverChange",
|
|
111
|
+
"onValueChange",
|
|
112
|
+
"readOnly",
|
|
113
|
+
"required",
|
|
114
|
+
"translations",
|
|
115
|
+
"value"
|
|
116
|
+
]);
|
|
117
|
+
const api = useRatingGroup(useRatingProps);
|
|
118
|
+
const mergedProps = mergeProps$1(() => api().getRootProps(), localProps);
|
|
119
|
+
return <RatingGroupProvider value={api}>
|
|
120
|
+
<sprawlify.div {...mergedProps} />
|
|
121
|
+
</RatingGroupProvider>;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
//#endregion
|
|
125
|
+
//#region src/components/rating-group/rating-group-root-provider.tsx
|
|
126
|
+
const RatingGroupRootProvider = (props) => {
|
|
127
|
+
const [{ value: ratingGroup$1 }, localProps] = createSplitProps()(props, ["value"]);
|
|
128
|
+
const mergedProps = mergeProps$1(() => ratingGroup$1().getRootProps(), localProps);
|
|
129
|
+
return <RatingGroupProvider value={ratingGroup$1}>
|
|
130
|
+
<sprawlify.div {...mergedProps} />
|
|
131
|
+
</RatingGroupProvider>;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region src/components/rating-group/rating-group.ts
|
|
136
|
+
var rating_group_exports = /* @__PURE__ */ __export({
|
|
137
|
+
Context: () => RatingGroupContext,
|
|
138
|
+
Control: () => RatingGroupControl,
|
|
139
|
+
HiddenInput: () => RatingGroupHiddenInput,
|
|
140
|
+
Item: () => RatingGroupItem,
|
|
141
|
+
ItemContext: () => RatingGroupItemContext,
|
|
142
|
+
Label: () => RatingGroupLabel,
|
|
143
|
+
Root: () => RatingGroupRoot,
|
|
144
|
+
RootProvider: () => RatingGroupRootProvider
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
//#endregion
|
|
148
|
+
export { rating_group_exports as RatingGroup, RatingGroupContext, RatingGroupControl, RatingGroupHiddenInput, RatingGroupItem, RatingGroupItemContext, RatingGroupLabel, RatingGroupRoot, RatingGroupRootProvider, ratingGroupAnatomy, useRatingGroup, useRatingGroupContext, useRatingGroupItemContext };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { n as PropTypes } from "../../index-tbMcVIMv.js";
|
|
2
|
+
import { i as Optional, t as Assign } from "../../types-DPhuMU2R.js";
|
|
3
|
+
import { r as PolymorphicProps, t as HTMLProps } from "../../factory-JAbO6zq9.js";
|
|
4
|
+
import * as solid_js185 from "solid-js";
|
|
5
|
+
import { Accessor, JSX } from "solid-js";
|
|
6
|
+
import * as scrollArea from "@sprawlify/primitives/machines/scroll-area";
|
|
7
|
+
import { ElementIds, ElementIds as ScrollAreaElementIds, ScrollToDetails, ScrollToDetails as ScrollAreaScrollToDetails, ScrollToEdge as ScrollAreaScrollToEdge, ScrollToEdgeDetails, ScrollToEdgeDetails as ScrollAreaScrollToEdgeDetails, ScrollbarProps, ScrollbarState as ScrollAreaScrollbarState, anatomy as scrollAreaAnatomy } from "@sprawlify/primitives/machines/scroll-area";
|
|
8
|
+
|
|
9
|
+
//#region src/components/scroll-area/use-scroll-area.d.ts
|
|
10
|
+
interface UseScrollAreaProps extends Optional<Omit<scrollArea.Props, 'dir' | 'getRootNode'>, 'id'> {}
|
|
11
|
+
interface UseScrollAreaReturn extends Accessor<scrollArea.Api<PropTypes>> {}
|
|
12
|
+
declare const useScrollArea: (props?: UseScrollAreaProps) => UseScrollAreaReturn;
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/components/scroll-area/use-scroll-area-context.d.ts
|
|
15
|
+
interface UseScrollAreaContext extends UseScrollAreaReturn {}
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/components/scroll-area/scroll-area-context.d.ts
|
|
18
|
+
interface ScrollAreaContextProps {
|
|
19
|
+
children: (context: UseScrollAreaContext) => JSX.Element;
|
|
20
|
+
}
|
|
21
|
+
declare function ScrollAreaContext(props: ScrollAreaContextProps): JSX.Element;
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/components/scroll-area/scroll-area-content.d.ts
|
|
24
|
+
interface ScrollAreaContentBaseProps extends PolymorphicProps<'div'> {}
|
|
25
|
+
interface ScrollAreaContentProps extends Assign<HTMLProps<'div'>, ScrollAreaContentBaseProps> {}
|
|
26
|
+
declare const ScrollAreaContent: (props: ScrollAreaContentProps) => solid_js185.JSX.Element;
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/components/scroll-area/scroll-area-corner.d.ts
|
|
29
|
+
interface ScrollAreaCornerBaseProps extends PolymorphicProps<'div'> {}
|
|
30
|
+
interface ScrollAreaCornerProps extends Assign<HTMLProps<'div'>, ScrollAreaCornerBaseProps> {}
|
|
31
|
+
declare const ScrollAreaCorner: (props: ScrollAreaCornerProps) => solid_js185.JSX.Element;
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/components/scroll-area/scroll-area-root.d.ts
|
|
34
|
+
interface ScrollAreaRootBaseProps extends UseScrollAreaProps, PolymorphicProps<'div'> {}
|
|
35
|
+
interface ScrollAreaRootProps extends Assign<HTMLProps<'div'>, ScrollAreaRootBaseProps> {}
|
|
36
|
+
declare const ScrollAreaRoot: (props: ScrollAreaRootProps) => solid_js185.JSX.Element;
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/components/scroll-area/scroll-area-root-provider.d.ts
|
|
39
|
+
interface ScrollAreaRootProviderBaseProps extends PolymorphicProps<'div'> {
|
|
40
|
+
value: UseScrollAreaContext;
|
|
41
|
+
}
|
|
42
|
+
interface ScrollAreaRootProviderProps extends Assign<HTMLProps<'div'>, ScrollAreaRootProviderBaseProps> {}
|
|
43
|
+
declare const ScrollAreaRootProvider: (props: ScrollAreaRootProviderProps) => solid_js185.JSX.Element;
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/components/scroll-area/scroll-area-scrollbar.d.ts
|
|
46
|
+
interface ScrollAreaScrollbarBaseProps extends ScrollbarProps, PolymorphicProps<'div'> {}
|
|
47
|
+
interface ScrollAreaScrollbarProps extends Assign<HTMLProps<'div'>, ScrollAreaScrollbarBaseProps> {}
|
|
48
|
+
declare const ScrollAreaScrollbar: (props: ScrollAreaScrollbarProps) => solid_js185.JSX.Element;
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/components/scroll-area/scroll-area-thumb.d.ts
|
|
51
|
+
interface ScrollAreaThumbBaseProps extends PolymorphicProps<'div'> {}
|
|
52
|
+
interface ScrollAreaThumbProps extends Assign<HTMLProps<'div'>, ScrollAreaThumbBaseProps> {}
|
|
53
|
+
declare const ScrollAreaThumb: (props: ScrollAreaThumbProps) => solid_js185.JSX.Element;
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/components/scroll-area/scroll-area-viewport.d.ts
|
|
56
|
+
interface ScrollAreaViewportBaseProps extends PolymorphicProps<'div'> {}
|
|
57
|
+
interface ScrollAreaViewportProps extends Assign<HTMLProps<'div'>, ScrollAreaViewportBaseProps> {}
|
|
58
|
+
declare const ScrollAreaViewport: (props: ScrollAreaViewportProps) => solid_js185.JSX.Element;
|
|
59
|
+
declare namespace scroll_area_d_exports {
|
|
60
|
+
export { ScrollAreaContent as Content, ScrollAreaContentBaseProps as ContentBaseProps, ScrollAreaContentProps as ContentProps, ScrollAreaContext as Context, ScrollAreaContextProps as ContextProps, ScrollAreaCorner as Corner, ScrollAreaCornerBaseProps as CornerBaseProps, ScrollAreaCornerProps as CornerProps, ElementIds, ScrollAreaRoot as Root, ScrollAreaRootBaseProps as RootBaseProps, ScrollAreaRootProps as RootProps, ScrollAreaRootProvider as RootProvider, ScrollAreaRootProviderBaseProps as RootProviderBaseProps, ScrollAreaRootProviderProps as RootProviderProps, ScrollToDetails, ScrollToEdgeDetails, ScrollAreaScrollbar as Scrollbar, ScrollAreaScrollbarBaseProps as ScrollbarBaseProps, ScrollAreaScrollbarProps as ScrollbarProps, ScrollAreaThumb as Thumb, ScrollAreaThumbBaseProps as ThumbBaseProps, ScrollAreaThumbProps as ThumbProps, ScrollAreaViewport as Viewport, ScrollAreaViewportBaseProps as ViewportBaseProps, ScrollAreaViewportProps as ViewportProps };
|
|
61
|
+
}
|
|
62
|
+
//#endregion
|
|
63
|
+
export { scroll_area_d_exports as ScrollArea, ScrollAreaContent, type ScrollAreaContentBaseProps, type ScrollAreaContentProps, ScrollAreaContext, type ScrollAreaContextProps, ScrollAreaCorner, type ScrollAreaCornerBaseProps, type ScrollAreaCornerProps, type ScrollAreaElementIds, ScrollAreaRoot, type ScrollAreaRootBaseProps, type ScrollAreaRootProps, ScrollAreaRootProvider, type ScrollAreaRootProviderBaseProps, type ScrollAreaRootProviderProps, type ScrollAreaScrollToDetails, type ScrollAreaScrollToEdge, type ScrollAreaScrollToEdgeDetails, ScrollAreaScrollbar, type ScrollAreaScrollbarBaseProps, type ScrollAreaScrollbarProps, type ScrollAreaScrollbarState, ScrollAreaThumb, type ScrollAreaThumbBaseProps, type ScrollAreaThumbProps, ScrollAreaViewport, type ScrollAreaViewportBaseProps, type ScrollAreaViewportProps, type UseScrollAreaContext, type UseScrollAreaProps, type UseScrollAreaReturn, scrollAreaAnatomy, useScrollArea, useScrollAreaContext };
|