@zayne-labs/ui-react 0.1.5 → 0.2.0

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 (48) hide show
  1. package/dist/esm/chunk-CB2EZJYW.js +31 -0
  2. package/dist/esm/chunk-CB2EZJYW.js.map +1 -0
  3. package/dist/esm/chunk-DL646TEP.js +119 -0
  4. package/dist/esm/chunk-DL646TEP.js.map +1 -0
  5. package/dist/esm/chunk-EFGQDB4D.js +125 -0
  6. package/dist/esm/chunk-EFGQDB4D.js.map +1 -0
  7. package/dist/esm/chunk-FYVREWDP.js +43 -0
  8. package/dist/esm/chunk-FYVREWDP.js.map +1 -0
  9. package/dist/esm/chunk-HKPJTORQ.js +3 -0
  10. package/dist/esm/chunk-HKPJTORQ.js.map +1 -0
  11. package/dist/esm/chunk-PNYEIX7F.js +3 -0
  12. package/dist/esm/chunk-PNYEIX7F.js.map +1 -0
  13. package/dist/esm/chunk-PXYYL2LL.js +45 -0
  14. package/dist/esm/chunk-PXYYL2LL.js.map +1 -0
  15. package/dist/esm/chunk-W4DCQY55.js +33 -0
  16. package/dist/esm/chunk-W4DCQY55.js.map +1 -0
  17. package/dist/esm/chunk-XLI7WVBJ.js +363 -0
  18. package/dist/esm/chunk-XLI7WVBJ.js.map +1 -0
  19. package/dist/esm/chunk-ZKEUZZVP.js +274 -0
  20. package/dist/esm/chunk-ZKEUZZVP.js.map +1 -0
  21. package/dist/esm/common/for/index.d.ts +2 -2
  22. package/dist/esm/common/index.d.ts +9 -0
  23. package/dist/esm/common/index.js +9 -0
  24. package/dist/esm/common/index.js.map +1 -0
  25. package/dist/esm/common/show/index.js +2 -41
  26. package/dist/esm/common/show/index.js.map +1 -1
  27. package/dist/esm/common/switch/index.js +2 -31
  28. package/dist/esm/common/switch/index.js.map +1 -1
  29. package/dist/esm/common/teleport/index.js +1 -28
  30. package/dist/esm/common/teleport/index.js.map +1 -1
  31. package/dist/esm/{for-C3T5FbXd.d.ts → for-TpNYqkYV.d.ts} +1 -1
  32. package/dist/esm/index.d.ts +17 -2
  33. package/dist/esm/index.js +14 -1
  34. package/dist/esm/ui/card/index.js +4 -43
  35. package/dist/esm/ui/card/index.js.map +1 -1
  36. package/dist/esm/ui/carousel/index.d.ts +1 -1
  37. package/dist/esm/ui/carousel/index.js +4 -272
  38. package/dist/esm/ui/carousel/index.js.map +1 -1
  39. package/dist/esm/ui/drag-scroll/index.js +2 -117
  40. package/dist/esm/ui/drag-scroll/index.js.map +1 -1
  41. package/dist/esm/ui/drop-zone/index.js +2 -123
  42. package/dist/esm/ui/drop-zone/index.js.map +1 -1
  43. package/dist/esm/ui/form/index.js +4 -361
  44. package/dist/esm/ui/form/index.js.map +1 -1
  45. package/dist/esm/ui/index.d.ts +12 -0
  46. package/dist/esm/ui/index.js +12 -0
  47. package/dist/esm/ui/index.js.map +1 -0
  48. package/package.json +4 -11
@@ -0,0 +1,274 @@
1
+ import { cnMerge } from './chunk-OHG7GB7O.js';
2
+ import { getElementList } from './chunk-MPOYLILK.js';
3
+ import { __export } from './chunk-PZ5AY32C.js';
4
+ import * as React3 from 'react';
5
+ import { useEffect, useState } from 'react';
6
+ import { useConstant, useAnimationInterval, useCallbackRef } from '@zayne-labs/toolkit-react';
7
+ import { createZustandContext } from '@zayne-labs/toolkit-react/zustand';
8
+ import { create } from 'zustand';
9
+
10
+ var ChevronLeftIcon = (props) => /* @__PURE__ */ React3.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React3.createElement("g", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2" }, /* @__PURE__ */ React3.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React3.createElement("path", { d: "m14 16l-4-4l4-4" })));
11
+ var [Provider, useCarouselStoreContext] = createZustandContext({
12
+ hookName: "useCarouselStore",
13
+ name: "CarouselStoreContext",
14
+ providerName: "CarouselContextProvider"
15
+ });
16
+ var createCarouselStore = (storeValues) => {
17
+ const { images, onSlideBtnClick } = storeValues;
18
+ const useInitCarouselStore = create()((set, get) => ({
19
+ currentSlide: 0,
20
+ images,
21
+ maxSlide: images.length - 1,
22
+ /* eslint-disable perfectionist/sort-objects -- actions should be last */
23
+ actions: {
24
+ /* eslint-enable perfectionist/sort-objects -- actions should be last */
25
+ goToNextSlide: () => {
26
+ const { currentSlide, maxSlide } = get();
27
+ const { goToSlide } = get().actions;
28
+ if (currentSlide === maxSlide) {
29
+ goToSlide(0);
30
+ return;
31
+ }
32
+ goToSlide(currentSlide + 1);
33
+ },
34
+ goToPreviousSlide: () => {
35
+ const { currentSlide, maxSlide } = get();
36
+ const { goToSlide } = get().actions;
37
+ if (currentSlide === 0) {
38
+ goToSlide(maxSlide);
39
+ return;
40
+ }
41
+ goToSlide(currentSlide - 1);
42
+ },
43
+ goToSlide: (newValue) => {
44
+ onSlideBtnClick?.();
45
+ set({ currentSlide: newValue });
46
+ }
47
+ }
48
+ }));
49
+ return useInitCarouselStore;
50
+ };
51
+ var useCarousel = (props) => {
52
+ const { images, onSlideBtnClick } = props;
53
+ const useInitCarouselStore = useConstant(() => createCarouselStore({ images, onSlideBtnClick }));
54
+ useEffect(() => {
55
+ useInitCarouselStore.setState({ images });
56
+ }, [images]);
57
+ return useInitCarouselStore;
58
+ };
59
+ function CarouselContextProvider(props) {
60
+ const { children, images, onSlideBtnClick } = props;
61
+ const useInitCarouselStore = useCarousel({ images, onSlideBtnClick });
62
+ return /* @__PURE__ */ React3.createElement(Provider, { value: useInitCarouselStore }, children);
63
+ }
64
+ var useCarouselOptions = (options = {}) => {
65
+ const { autoSlideInterval = 5e3, hasAutoSlide = false, shouldPauseOnHover = false } = options;
66
+ const { goToNextSlide } = useCarouselStoreContext((state) => state.actions);
67
+ const [isPaused, setIsPaused] = useState(false);
68
+ const shouldAutoSlide = hasAutoSlide && !isPaused;
69
+ useAnimationInterval({
70
+ intervalDuration: shouldAutoSlide ? autoSlideInterval : null,
71
+ onAnimation: goToNextSlide
72
+ });
73
+ const pauseAutoSlide = useCallbackRef(() => shouldPauseOnHover && setIsPaused(true));
74
+ const resumeAutoSlide = useCallbackRef(() => shouldPauseOnHover && setIsPaused(false));
75
+ return { pauseAutoSlide, resumeAutoSlide };
76
+ };
77
+
78
+ // src/components/ui/carousel/carousel.tsx
79
+ function CarouselContent(props) {
80
+ const {
81
+ as: HtmlElement = "article",
82
+ autoSlideInterval,
83
+ children,
84
+ classNames,
85
+ hasAutoSlide,
86
+ shouldPauseOnHover
87
+ } = props;
88
+ const { pauseAutoSlide, resumeAutoSlide } = useCarouselOptions({
89
+ autoSlideInterval,
90
+ hasAutoSlide,
91
+ shouldPauseOnHover
92
+ });
93
+ return /* @__PURE__ */ React3.createElement(
94
+ HtmlElement,
95
+ {
96
+ "data-id": "Carousel",
97
+ className: cnMerge("relative select-none", classNames?.base),
98
+ onMouseEnter: pauseAutoSlide,
99
+ onMouseLeave: resumeAutoSlide
100
+ },
101
+ /* @__PURE__ */ React3.createElement(
102
+ "div",
103
+ {
104
+ "data-id": "Scroll Container",
105
+ className: cnMerge(
106
+ "flex size-full overflow-x-scroll [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
107
+ classNames?.scrollContainer
108
+ )
109
+ },
110
+ children
111
+ )
112
+ );
113
+ }
114
+ function CarouselButton(props) {
115
+ const { classNames, icon, variant } = props;
116
+ const { goToNextSlide, goToPreviousSlide } = useCarouselStoreContext((state) => state.actions);
117
+ return /* @__PURE__ */ React3.createElement(
118
+ "button",
119
+ {
120
+ type: "button",
121
+ className: cnMerge(
122
+ "z-30 flex h-full w-[15%] items-center",
123
+ variant === "prev" ? "justify-start" : "justify-end",
124
+ classNames?.base
125
+ ),
126
+ onClick: variant === "prev" ? goToPreviousSlide : goToNextSlide
127
+ },
128
+ /* @__PURE__ */ React3.createElement("span", { className: cnMerge("transition-transform active:scale-[1.06]", classNames?.iconContainer) }, icon ?? /* @__PURE__ */ React3.createElement(
129
+ ChevronLeftIcon,
130
+ {
131
+ className: cnMerge(variant === "next" && "rotate-180", classNames?.defaultIcon)
132
+ }
133
+ ))
134
+ );
135
+ }
136
+ function CarouselControls(props) {
137
+ const { classNames, icon } = props;
138
+ return /* @__PURE__ */ React3.createElement("div", { className: cnMerge("absolute inset-0 flex justify-between", classNames?.base) }, icon?.iconType ? /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(
139
+ CarouselButton,
140
+ {
141
+ variant: "prev",
142
+ classNames: {
143
+ defaultIcon: classNames?.defaultIcon,
144
+ iconContainer: cnMerge(
145
+ icon.iconType === "nextIcon" && "rotate-180",
146
+ classNames?.iconContainer
147
+ )
148
+ },
149
+ icon: icon.icon
150
+ }
151
+ ), /* @__PURE__ */ React3.createElement(
152
+ CarouselButton,
153
+ {
154
+ variant: "next",
155
+ classNames: {
156
+ defaultIcon: classNames?.defaultIcon,
157
+ iconContainer: cnMerge(
158
+ icon.iconType === "prevIcon" && "rotate-180",
159
+ classNames?.iconContainer
160
+ )
161
+ },
162
+ icon: icon.icon
163
+ }
164
+ )) : /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(
165
+ CarouselButton,
166
+ {
167
+ variant: "prev",
168
+ classNames: {
169
+ defaultIcon: classNames?.defaultIcon,
170
+ iconContainer: classNames?.iconContainer
171
+ },
172
+ icon: icon?.prev
173
+ }
174
+ ), /* @__PURE__ */ React3.createElement(
175
+ CarouselButton,
176
+ {
177
+ variant: "next",
178
+ classNames: {
179
+ defaultIcon: classNames?.defaultIcon,
180
+ iconContainer: classNames?.iconContainer
181
+ },
182
+ icon: icon?.next
183
+ }
184
+ )));
185
+ }
186
+ function CarouselItemWrapper(props) {
187
+ const { children, className, each, render } = props;
188
+ const [ItemList] = getElementList("base");
189
+ const currentSlide = useCarouselStoreContext((state) => state.currentSlide);
190
+ const images = useCarouselStoreContext((state) => each ?? state.images);
191
+ return /* @__PURE__ */ React3.createElement(
192
+ "ul",
193
+ {
194
+ "data-id": "Carousel Image Wrapper",
195
+ className: cnMerge(
196
+ `flex w-full shrink-0 snap-center [transform:translate3d(var(--translate-distance),0,0)]
197
+ [transition:transform_800ms_ease]`,
198
+ className
199
+ ),
200
+ style: {
201
+ "--translate-distance": `-${currentSlide * 100}%`
202
+ }
203
+ },
204
+ typeof render === "function" ? /* @__PURE__ */ React3.createElement(ItemList, { each: images, render }) : /* @__PURE__ */ React3.createElement(ItemList, { each: images }, children)
205
+ );
206
+ }
207
+ function CarouselItem({ children, className, ...restOfProps }) {
208
+ return /* @__PURE__ */ React3.createElement(
209
+ "li",
210
+ {
211
+ className: cnMerge("flex w-full shrink-0 snap-center justify-center", className),
212
+ ...restOfProps
213
+ },
214
+ children
215
+ );
216
+ }
217
+ function CarouselCaption(props) {
218
+ const { as: HtmlElement = "div", children, className } = props;
219
+ return /* @__PURE__ */ React3.createElement(HtmlElement, { "data-id": "Carousel Caption", className: cnMerge("absolute z-10", className) }, children);
220
+ }
221
+ function CarouselIndicatorWrapper(props) {
222
+ const { children, className, each, render } = props;
223
+ const images = useCarouselStoreContext((state) => each ?? state.images);
224
+ const [IndicatorList] = getElementList("base");
225
+ return /* @__PURE__ */ React3.createElement(
226
+ "ul",
227
+ {
228
+ "data-id": "Carousel Indicators",
229
+ className: cnMerge(
230
+ "absolute bottom-10 z-[2] flex w-full items-center justify-center gap-6",
231
+ className
232
+ )
233
+ },
234
+ typeof render === "function" ? /* @__PURE__ */ React3.createElement(IndicatorList, { each: images, render }) : /* @__PURE__ */ React3.createElement(IndicatorList, { each: images }, children)
235
+ );
236
+ }
237
+ function CarouselIndicator(props) {
238
+ const { classNames, currentIndex } = props;
239
+ const {
240
+ actions: { goToSlide },
241
+ currentSlide
242
+ } = useCarouselStoreContext((state) => state);
243
+ return /* @__PURE__ */ React3.createElement("li", { className: cnMerge("inline-flex", classNames?.base) }, /* @__PURE__ */ React3.createElement(
244
+ "button",
245
+ {
246
+ "data-active": currentIndex === currentSlide,
247
+ type: "button",
248
+ onClick: () => goToSlide(currentIndex),
249
+ className: cnMerge(
250
+ "size-[6px] rounded-[50%]",
251
+ classNames?.button,
252
+ currentIndex === currentSlide && ["w-14 rounded-lg", classNames?.activeBtn]
253
+ )
254
+ }
255
+ ));
256
+ }
257
+
258
+ // src/components/ui/carousel/carousel-parts.ts
259
+ var carousel_parts_exports = {};
260
+ __export(carousel_parts_exports, {
261
+ Button: () => CarouselButton,
262
+ Caption: () => CarouselCaption,
263
+ Content: () => CarouselContent,
264
+ Controls: () => CarouselControls,
265
+ Indicator: () => CarouselIndicator,
266
+ IndicatorWrapper: () => CarouselIndicatorWrapper,
267
+ Item: () => CarouselItem,
268
+ ItemWrapper: () => CarouselItemWrapper,
269
+ Root: () => CarouselContextProvider
270
+ });
271
+
272
+ export { CarouselButton, CarouselCaption, CarouselContent, CarouselControls, CarouselIndicator, CarouselIndicatorWrapper, CarouselItem, CarouselItemWrapper, carousel_parts_exports };
273
+ //# sourceMappingURL=chunk-ZKEUZZVP.js.map
274
+ //# sourceMappingURL=chunk-ZKEUZZVP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/icons/ChevronLeftIcon.tsx","../../src/components/ui/carousel/carousel-store-context.tsx","../../src/components/ui/carousel/useCarouselOptions.ts","../../src/components/ui/carousel/carousel.tsx","../../src/components/ui/carousel/carousel-parts.ts"],"names":["React","React2"],"mappings":";;;;;;;;;AAEA,IAAM,kBAAkB,CAAC,KAAA,0CACvB,KAAI,EAAA,EAAA,KAAA,EAAM,8BAA6B,KAAM,EAAA,KAAA,EAAM,MAAO,EAAA,KAAA,EAAM,SAAQ,WAAa,EAAA,GAAG,yBACvFA,MAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAE,MAAK,MAAO,EAAA,MAAA,EAAO,cAAe,EAAA,aAAA,EAAc,SAAQ,cAAe,EAAA,OAAA,EAAQ,aAAY,GAC7F,EAAA,kBAAAA,MAAA,CAA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AAC3E;AAAA,GAEF,CAAA;AAEF;;;AC7OA,IAAA,sBAAA,GAAA;AAAA,QAAA,CAAA,sBAAA,EAAA;AAAA,EAAA,MAAA,EAAA,MAAA,cAAA;AAAA,EAAA,OAAA,EAAA,MAAA,eAAA;AAAA,EAAA,OAAA,EAAA,MAAA,eAAA;AAAA,EAAA,QAAA,EAAA,MAAA,gBAAA;AAAA,EAAA,SAAA,EAAA,MAAA,iBAAA;AAAA,EAAA,gBAAA,EAAA,MAAA,wBAAA;AAAA,EAAA,IAAA,EAAA,MAAA,YAAA;AAAA,EAAA,WAAA,EAAA,MAAA,mBAAA;AAAA,EAAA,IAAA,EAAA,MAAA;AAAA,CAAA,CAAA","file":"chunk-ZKEUZZVP.js","sourcesContent":["import * as React from \"react\";\n\nconst ChevronLeftIcon = (props: React.SVGProps<SVGSVGElement>) => (\n\t<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1em\" height=\"1em\" viewBox=\"0 0 24 24\" {...props}>\n\t\t<g fill=\"none\" stroke=\"currentColor\" strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth=\"2\">\n\t\t\t<circle cx=\"12\" cy=\"12\" r=\"10\" />\n\t\t\t<path d=\"m14 16l-4-4l4-4\" />\n\t\t</g>\n\t</svg>\n);\n\nexport { ChevronLeftIcon };\n","import * as React from \"react\";\n\nimport { useConstant } from \"@zayne-labs/toolkit-react\";\nimport { createZustandContext } from \"@zayne-labs/toolkit-react/zustand\";\nimport type { PrettyOmit } from \"@zayne-labs/toolkit-type-helpers\";\nimport { useEffect } from \"react\";\nimport { create } from \"zustand\";\nimport type { CarouselProviderProps, CarouselStore, ImagesType } from \"./types\";\n\nconst [Provider, useCarouselStoreContext] = createZustandContext<CarouselStore>({\n\thookName: \"useCarouselStore\",\n\tname: \"CarouselStoreContext\",\n\tproviderName: \"CarouselContextProvider\",\n});\n\n// CarouselStore Creation\nconst createCarouselStore = <TImages extends ImagesType>(\n\tstoreValues: PrettyOmit<CarouselProviderProps<TImages>, \"children\">\n) => {\n\tconst { images, onSlideBtnClick } = storeValues;\n\n\tconst useInitCarouselStore = create<CarouselStore<TImages>>()((set, get) => ({\n\t\tcurrentSlide: 0,\n\t\timages,\n\t\tmaxSlide: images.length - 1,\n\n\t\t/* eslint-disable perfectionist/sort-objects -- actions should be last */\n\t\tactions: {\n\t\t\t/* eslint-enable perfectionist/sort-objects -- actions should be last */\n\n\t\t\tgoToNextSlide: () => {\n\t\t\t\tconst { currentSlide, maxSlide } = get();\n\t\t\t\tconst { goToSlide } = get().actions;\n\n\t\t\t\tif (currentSlide === maxSlide) {\n\t\t\t\t\tgoToSlide(0);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tgoToSlide(currentSlide + 1);\n\t\t\t},\n\n\t\t\tgoToPreviousSlide: () => {\n\t\t\t\tconst { currentSlide, maxSlide } = get();\n\t\t\t\tconst { goToSlide } = get().actions;\n\n\t\t\t\tif (currentSlide === 0) {\n\t\t\t\t\tgoToSlide(maxSlide);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tgoToSlide(currentSlide - 1);\n\t\t\t},\n\n\t\t\tgoToSlide: (newValue) => {\n\t\t\t\tonSlideBtnClick?.();\n\n\t\t\t\tset({ currentSlide: newValue });\n\t\t\t},\n\t\t},\n\t}));\n\n\treturn useInitCarouselStore;\n};\n\nconst useCarousel = <TImages extends ImagesType>(\n\tprops: Omit<CarouselProviderProps<TImages>, \"children\">\n) => {\n\tconst { images, onSlideBtnClick } = props;\n\n\tconst useInitCarouselStore = useConstant(() => createCarouselStore({ images, onSlideBtnClick }));\n\n\t// == To set images again when a page is mounted, preventing stale images from previous page\n\tuseEffect(() => {\n\t\tuseInitCarouselStore.setState({ images });\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps -- useInitCarouselStore is stable\n\t}, [images]);\n\n\treturn useInitCarouselStore;\n};\n\n// == Provider Component\nfunction CarouselContextProvider<TImages extends ImagesType>(props: CarouselProviderProps<TImages>) {\n\tconst { children, images, onSlideBtnClick } = props;\n\n\tconst useInitCarouselStore = useCarousel({ images, onSlideBtnClick });\n\n\treturn <Provider value={useInitCarouselStore}>{children}</Provider>;\n}\n\n// eslint-disable-next-line react-refresh/only-export-components -- It's fine\nexport { useCarouselStoreContext, CarouselContextProvider };\n","import { useAnimationInterval, useCallbackRef } from \"@zayne-labs/toolkit-react\";\nimport { useState } from \"react\";\nimport { useCarouselStoreContext } from \"./carousel-store-context\";\n\ntype CarouselOptions = {\n\tautoSlideInterval?: number;\n\thasAutoSlide?: boolean;\n\tshouldPauseOnHover?: boolean;\n};\n\nconst useCarouselOptions = (options: CarouselOptions = {}) => {\n\tconst { autoSlideInterval = 5000, hasAutoSlide = false, shouldPauseOnHover = false } = options;\n\n\tconst { goToNextSlide } = useCarouselStoreContext((state) => state.actions);\n\n\tconst [isPaused, setIsPaused] = useState(false);\n\n\tconst shouldAutoSlide = hasAutoSlide && !isPaused;\n\n\tuseAnimationInterval({\n\t\tintervalDuration: shouldAutoSlide ? autoSlideInterval : null,\n\t\tonAnimation: goToNextSlide,\n\t});\n\n\tconst pauseAutoSlide = useCallbackRef(() => shouldPauseOnHover && setIsPaused(true));\n\n\tconst resumeAutoSlide = useCallbackRef(() => shouldPauseOnHover && setIsPaused(false));\n\n\treturn { pauseAutoSlide, resumeAutoSlide };\n};\n\nexport { useCarouselOptions };\n","\"use client\";\n\nimport * as React from \"react\";\n\nimport { getElementList } from \"@/components/common/for\";\nimport { ChevronLeftIcon } from \"@/components/icons\";\nimport { cnMerge } from \"@/lib/utils/cn\";\nimport type { MyCustomCss, PolymorphicProps } from \"@zayne-labs/toolkit-react/utils\";\nimport { useCarouselStoreContext } from \"./carousel-store-context\";\nimport type {\n\tCarouselButtonsProps,\n\tCarouselContentProps,\n\tCarouselControlProps,\n\tCarouselIndicatorProps,\n\tCarouselWrapperProps,\n\tOtherCarouselProps,\n} from \"./types\";\nimport { useCarouselOptions } from \"./useCarouselOptions\";\n\n// TODO - Add dragging and swiping support\nexport function CarouselContent<TElement extends React.ElementType = \"article\">(\n\tprops: PolymorphicProps<TElement, CarouselContentProps>\n) {\n\tconst {\n\t\tas: HtmlElement = \"article\",\n\t\tautoSlideInterval,\n\t\tchildren,\n\t\tclassNames,\n\t\thasAutoSlide,\n\t\tshouldPauseOnHover,\n\t} = props;\n\n\tconst { pauseAutoSlide, resumeAutoSlide } = useCarouselOptions({\n\t\tautoSlideInterval,\n\t\thasAutoSlide,\n\t\tshouldPauseOnHover,\n\t});\n\n\t// FIXME - Prevent touch swipe on mobile using a cover element or allow swipe but it must update the state appriopriately\n\treturn (\n\t\t<HtmlElement\n\t\t\tdata-id=\"Carousel\"\n\t\t\tclassName={cnMerge(\"relative select-none\", classNames?.base)}\n\t\t\tonMouseEnter={pauseAutoSlide}\n\t\t\tonMouseLeave={resumeAutoSlide}\n\t\t>\n\t\t\t<div\n\t\t\t\tdata-id=\"Scroll Container\"\n\t\t\t\tclassName={cnMerge(\n\t\t\t\t\t\"flex size-full overflow-x-scroll [scrollbar-width:none] [&::-webkit-scrollbar]:hidden\",\n\t\t\t\t\tclassNames?.scrollContainer\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</HtmlElement>\n\t);\n}\n\nexport function CarouselButton(props: CarouselButtonsProps) {\n\tconst { classNames, icon, variant } = props;\n\n\tconst { goToNextSlide, goToPreviousSlide } = useCarouselStoreContext((state) => state.actions);\n\n\treturn (\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\tclassName={cnMerge(\n\t\t\t\t\"z-30 flex h-full w-[15%] items-center\",\n\t\t\t\tvariant === \"prev\" ? \"justify-start\" : \"justify-end\",\n\t\t\t\tclassNames?.base\n\t\t\t)}\n\t\t\tonClick={variant === \"prev\" ? goToPreviousSlide : goToNextSlide}\n\t\t>\n\t\t\t<span className={cnMerge(\"transition-transform active:scale-[1.06]\", classNames?.iconContainer)}>\n\t\t\t\t{icon ?? (\n\t\t\t\t\t<ChevronLeftIcon\n\t\t\t\t\t\tclassName={cnMerge(variant === \"next\" && \"rotate-180\", classNames?.defaultIcon)}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</span>\n\t\t</button>\n\t);\n}\n\nexport function CarouselControls(props: CarouselControlProps) {\n\tconst { classNames, icon } = props;\n\n\treturn (\n\t\t<div className={cnMerge(\"absolute inset-0 flex justify-between\", classNames?.base)}>\n\t\t\t{icon?.iconType ? (\n\t\t\t\t<>\n\t\t\t\t\t<CarouselButton\n\t\t\t\t\t\tvariant=\"prev\"\n\t\t\t\t\t\tclassNames={{\n\t\t\t\t\t\t\tdefaultIcon: classNames?.defaultIcon,\n\t\t\t\t\t\t\ticonContainer: cnMerge(\n\t\t\t\t\t\t\t\ticon.iconType === \"nextIcon\" && \"rotate-180\",\n\t\t\t\t\t\t\t\tclassNames?.iconContainer\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t}}\n\t\t\t\t\t\ticon={icon.icon}\n\t\t\t\t\t/>\n\t\t\t\t\t<CarouselButton\n\t\t\t\t\t\tvariant=\"next\"\n\t\t\t\t\t\tclassNames={{\n\t\t\t\t\t\t\tdefaultIcon: classNames?.defaultIcon,\n\t\t\t\t\t\t\ticonContainer: cnMerge(\n\t\t\t\t\t\t\t\ticon.iconType === \"prevIcon\" && \"rotate-180\",\n\t\t\t\t\t\t\t\tclassNames?.iconContainer\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t}}\n\t\t\t\t\t\ticon={icon.icon}\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<CarouselButton\n\t\t\t\t\t\tvariant=\"prev\"\n\t\t\t\t\t\tclassNames={{\n\t\t\t\t\t\t\tdefaultIcon: classNames?.defaultIcon,\n\t\t\t\t\t\t\ticonContainer: classNames?.iconContainer,\n\t\t\t\t\t\t}}\n\t\t\t\t\t\ticon={icon?.prev}\n\t\t\t\t\t/>\n\t\t\t\t\t<CarouselButton\n\t\t\t\t\t\tvariant=\"next\"\n\t\t\t\t\t\tclassNames={{\n\t\t\t\t\t\t\tdefaultIcon: classNames?.defaultIcon,\n\t\t\t\t\t\t\ticonContainer: classNames?.iconContainer,\n\t\t\t\t\t\t}}\n\t\t\t\t\t\ticon={icon?.next}\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n\nexport function CarouselItemWrapper<TArrayItem>(props: CarouselWrapperProps<TArrayItem>) {\n\tconst { children, className, each, render } = props;\n\n\tconst [ItemList] = getElementList(\"base\");\n\tconst currentSlide = useCarouselStoreContext((state) => state.currentSlide);\n\tconst images = useCarouselStoreContext((state) => each ?? (state.images as TArrayItem[]));\n\n\treturn (\n\t\t<ul\n\t\t\tdata-id=\"Carousel Image Wrapper\"\n\t\t\tclassName={cnMerge(\n\t\t\t\t`flex w-full shrink-0 snap-center [transform:translate3d(var(--translate-distance),0,0)]\n\t\t\t\t[transition:transform_800ms_ease]`,\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\tstyle={\n\t\t\t\t{\n\t\t\t\t\t\"--translate-distance\": `-${currentSlide * 100}%`,\n\t\t\t\t} satisfies MyCustomCss as MyCustomCss\n\t\t\t}\n\t\t>\n\t\t\t{typeof render === \"function\" ? (\n\t\t\t\t<ItemList each={images} render={render} />\n\t\t\t) : (\n\t\t\t\t<ItemList each={images}>{children}</ItemList>\n\t\t\t)}\n\t\t</ul>\n\t);\n}\n\nexport function CarouselItem({ children, className, ...restOfProps }: OtherCarouselProps) {\n\treturn (\n\t\t<li\n\t\t\tclassName={cnMerge(\"flex w-full shrink-0 snap-center justify-center\", className)}\n\t\t\t{...restOfProps}\n\t\t>\n\t\t\t{children}\n\t\t</li>\n\t);\n}\n\nexport function CarouselCaption<TElement extends React.ElementType = \"div\">(\n\tprops: PolymorphicProps<TElement, OtherCarouselProps>\n) {\n\tconst { as: HtmlElement = \"div\", children, className } = props;\n\n\treturn (\n\t\t<HtmlElement data-id=\"Carousel Caption\" className={cnMerge(\"absolute z-10\", className)}>\n\t\t\t{children}\n\t\t</HtmlElement>\n\t);\n}\n\nexport function CarouselIndicatorWrapper<TArrayItem>(props: CarouselWrapperProps<TArrayItem>) {\n\tconst { children, className, each, render } = props;\n\n\tconst images = useCarouselStoreContext((state) => each ?? (state.images as TArrayItem[]));\n\tconst [IndicatorList] = getElementList(\"base\");\n\n\treturn (\n\t\t<ul\n\t\t\tdata-id=\"Carousel Indicators\"\n\t\t\tclassName={cnMerge(\n\t\t\t\t\"absolute bottom-10 z-[2] flex w-full items-center justify-center gap-6\",\n\t\t\t\tclassName\n\t\t\t)}\n\t\t>\n\t\t\t{typeof render === \"function\" ? (\n\t\t\t\t<IndicatorList each={images} render={render} />\n\t\t\t) : (\n\t\t\t\t<IndicatorList each={images}>{children}</IndicatorList>\n\t\t\t)}\n\t\t</ul>\n\t);\n}\n\nexport function CarouselIndicator(props: CarouselIndicatorProps) {\n\tconst { classNames, currentIndex } = props;\n\n\tconst {\n\t\tactions: { goToSlide },\n\t\tcurrentSlide,\n\t} = useCarouselStoreContext((state) => state);\n\n\treturn (\n\t\t<li className={cnMerge(\"inline-flex\", classNames?.base)}>\n\t\t\t<button\n\t\t\t\tdata-active={currentIndex === currentSlide}\n\t\t\t\ttype=\"button\"\n\t\t\t\tonClick={() => goToSlide(currentIndex)}\n\t\t\t\tclassName={cnMerge(\n\t\t\t\t\t\"size-[6px] rounded-[50%]\",\n\t\t\t\t\tclassNames?.button,\n\t\t\t\t\tcurrentIndex === currentSlide && [\"w-14 rounded-lg\", classNames?.activeBtn]\n\t\t\t\t)}\n\t\t\t/>\n\t\t</li>\n\t);\n}\n","export { CarouselContextProvider as Root } from \"./carousel-store-context\";\nexport {\n\tCarouselContent as Content,\n\tCarouselControls as Controls,\n\tCarouselButton as Button,\n\tCarouselItem as Item,\n\tCarouselItemWrapper as ItemWrapper,\n\tCarouselCaption as Caption,\n\tCarouselIndicator as Indicator,\n\tCarouselIndicatorWrapper as IndicatorWrapper,\n} from \"./carousel\";\n"]}
@@ -1,5 +1,5 @@
1
- import { F as ForBase, a as ForList } from '../../for-C3T5FbXd.js';
2
- export { E as EachProp, b as ForRenderProps } from '../../for-C3T5FbXd.js';
1
+ import { a as ForBase, b as ForList } from '../../for-TpNYqkYV.js';
2
+ export { E as EachProp, F as ForRenderProps } from '../../for-TpNYqkYV.js';
3
3
  import 'react';
4
4
  import '@zayne-labs/toolkit-react/utils';
5
5
 
@@ -0,0 +1,9 @@
1
+ export { E as EachProp, a as ForBase, b as ForList, F as ForRenderProps } from '../for-TpNYqkYV.js';
2
+ export { getElementList } from './for/index.js';
3
+ export { Show, ShowContent, ShowFallback, ShowRoot } from './show/index.js';
4
+ export { Slot, Slottable } from './slot/index.js';
5
+ export { Switch, SwitchDefault, SwitchMatch, SwitchRoot } from './switch/index.js';
6
+ export { Teleport } from './teleport/index.js';
7
+ import 'react';
8
+ import '@zayne-labs/toolkit-react/utils';
9
+ import '@zayne-labs/toolkit-type-helpers';
@@ -0,0 +1,9 @@
1
+ import '../chunk-HKPJTORQ.js';
2
+ export { ForBase, ForList, getElementList } from '../chunk-MPOYLILK.js';
3
+ export { show_parts_exports as Show, ShowContent, ShowFallback, ShowRoot } from '../chunk-FYVREWDP.js';
4
+ export { Slot, Slottable } from '../chunk-ENDWJXPF.js';
5
+ export { switch_parts_exports as Switch, SwitchDefault, SwitchMatch, SwitchRoot } from '../chunk-W4DCQY55.js';
6
+ export { Teleport } from '../chunk-CB2EZJYW.js';
7
+ import '../chunk-PZ5AY32C.js';
8
+ //# sourceMappingURL=index.js.map
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -1,43 +1,4 @@
1
- import { __export } from '../../chunk-PZ5AY32C.js';
2
- import 'react';
3
- import { getSlotElement, getOtherChildren } from '@zayne-labs/toolkit-react/utils';
4
- import { AssertionError } from '@zayne-labs/toolkit-type-helpers';
5
-
6
- function ShowRoot({ children, fallback, when }) {
7
- const fallBackSlot = getSlotElement(children, ShowFallback, {
8
- errorMessage: "Only one <Show.Fallback> or <Show.OtherWise> component is allowed",
9
- throwOnMultipleSlotMatch: true
10
- });
11
- const contentSlot = getSlotElement(children, ShowContent, {
12
- errorMessage: "Only one <Show.Content> component is allowed",
13
- throwOnMultipleSlotMatch: true
14
- });
15
- const otherChildren = getOtherChildren(children, [ShowFallback, ShowContent]);
16
- if (fallBackSlot && fallback) {
17
- throw new AssertionError(`
18
- The fallback prop and <Show.Fallback>/<Show.OtherWise> cannot be used at the same time.
19
- `);
20
- }
21
- return when ? contentSlot ?? otherChildren : fallBackSlot ?? fallback;
22
- }
23
- function ShowContent({ children }) {
24
- return children;
25
- }
26
- ShowContent.slot = Symbol.for("content");
27
- function ShowFallback({ children }) {
28
- return children;
29
- }
30
- ShowFallback.slot = Symbol.for("show-fallback");
31
-
32
- // src/components/common/show/show-parts.ts
33
- var show_parts_exports = {};
34
- __export(show_parts_exports, {
35
- Content: () => ShowContent,
36
- Fallback: () => ShowFallback,
37
- OtherWise: () => ShowFallback,
38
- Root: () => ShowRoot
39
- });
40
-
41
- export { show_parts_exports as Show, ShowContent, ShowFallback, ShowRoot };
1
+ export { show_parts_exports as Show, ShowContent, ShowFallback, ShowRoot } from '../../chunk-FYVREWDP.js';
2
+ import '../../chunk-PZ5AY32C.js';
42
3
  //# sourceMappingURL=index.js.map
43
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/common/show/show.tsx","../../../../src/components/common/show/show-parts.ts"],"names":[],"mappings":";;;;;AAaO,SAAS,QAAS,CAAA,EAAE,QAAU,EAAA,QAAA,EAAU,MAAmB,EAAA;AACjE,EAAM,MAAA,YAAA,GAAe,cAAe,CAAA,QAAA,EAAU,YAAc,EAAA;AAAA,IAC3D,YAAc,EAAA,mEAAA;AAAA,IACd,wBAA0B,EAAA;AAAA,GAC1B,CAAA;AAED,EAAM,MAAA,WAAA,GAAc,cAAe,CAAA,QAAA,EAAU,WAAa,EAAA;AAAA,IACzD,YAAc,EAAA,8CAAA;AAAA,IACd,wBAA0B,EAAA;AAAA,GAC1B,CAAA;AAED,EAAA,MAAM,gBAAgB,gBAAiB,CAAA,QAAA,EAAU,CAAC,YAAA,EAAc,WAAW,CAAC,CAAA;AAE5E,EAAA,IAAI,gBAAgB,QAAU,EAAA;AAC7B,IAAA,MAAM,IAAI,cAAe,CAAA;AAAA;AAAA,EAExB,CAAA,CAAA;AAAA;AAGF,EAAO,OAAA,IAAA,GAAQ,WAAe,IAAA,aAAA,GAAkB,YAAgB,IAAA,QAAA;AACjE;AAEO,SAAS,WAAA,CAAY,EAAE,QAAA,EAAyC,EAAA;AACtE,EAAO,OAAA,QAAA;AACR;AACA,WAAY,CAAA,IAAA,GAAO,MAAO,CAAA,GAAA,CAAI,SAAS,CAAA;AAEhC,SAAS,YAAA,CAAa,EAAE,QAAA,EAAyC,EAAA;AACvE,EAAO,OAAA,QAAA;AACR;AACA,YAAa,CAAA,IAAA,GAAO,MAAO,CAAA,GAAA,CAAI,eAAe,CAAA;;;AC3C9C,IAAA,kBAAA,GAAA;AAAA,QAAA,CAAA,kBAAA,EAAA;AAAA,EAAA,OAAA,EAAA,MAAA,WAAA;AAAA,EAAA,QAAA,EAAA,MAAA,YAAA;AAAA,EAAA,SAAA,EAAA,MAAA,YAAA;AAAA,EAAA,IAAA,EAAA,MAAA;AAAA,CAAA,CAAA","file":"index.js","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nimport { getOtherChildren, getSlotElement } from \"@zayne-labs/toolkit-react/utils\";\nimport { AssertionError } from \"@zayne-labs/toolkit-type-helpers\";\n\ntype ShowProps = {\n\tchildren: React.ReactNode;\n\tfallback?: React.ReactNode;\n\twhen: boolean;\n};\n\nexport function ShowRoot({ children, fallback, when }: ShowProps) {\n\tconst fallBackSlot = getSlotElement(children, ShowFallback, {\n\t\terrorMessage: \"Only one <Show.Fallback> or <Show.OtherWise> component is allowed\",\n\t\tthrowOnMultipleSlotMatch: true,\n\t});\n\n\tconst contentSlot = getSlotElement(children, ShowContent, {\n\t\terrorMessage: \"Only one <Show.Content> component is allowed\",\n\t\tthrowOnMultipleSlotMatch: true,\n\t});\n\n\tconst otherChildren = getOtherChildren(children, [ShowFallback, ShowContent]);\n\n\tif (fallBackSlot && fallback) {\n\t\tthrow new AssertionError(`\n\t\t\tThe fallback prop and <Show.Fallback>/<Show.OtherWise> cannot be used at the same time.\n\t\t`);\n\t}\n\n\treturn when ? (contentSlot ?? otherChildren) : (fallBackSlot ?? fallback);\n}\n\nexport function ShowContent({ children }: Pick<ShowProps, \"children\">) {\n\treturn children;\n}\nShowContent.slot = Symbol.for(\"content\");\n\nexport function ShowFallback({ children }: Pick<ShowProps, \"children\">) {\n\treturn children;\n}\nShowFallback.slot = Symbol.for(\"show-fallback\");\n","export {\n\tShowContent as Content,\n\tShowFallback as Fallback,\n\tShowFallback as OtherWise,\n\tShowRoot as Root,\n} from \"./show\";\n"]}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -1,33 +1,4 @@
1
- import { __export } from '../../chunk-PZ5AY32C.js';
2
- import 'react';
3
- import { getSlotElement, getOtherChildren } from '@zayne-labs/toolkit-react/utils';
4
-
5
- function SwitchRoot(props) {
6
- const { children, condition = true } = props;
7
- const defaultCase = getSlotElement(children, SwitchDefault, {
8
- errorMessage: "Only one <Switch.Default> component is allowed",
9
- throwOnMultipleSlotMatch: true
10
- });
11
- const childrenCasesArray = getOtherChildren(children, SwitchDefault);
12
- const matchedCase = childrenCasesArray.find((child) => child.props.when === condition);
13
- return matchedCase ?? defaultCase;
14
- }
15
- function SwitchMatch({ children }) {
16
- return children;
17
- }
18
- function SwitchDefault({ children }) {
19
- return children;
20
- }
21
- SwitchDefault.slot = Symbol.for("switch-default");
22
-
23
- // src/components/common/switch/switch-parts.ts
24
- var switch_parts_exports = {};
25
- __export(switch_parts_exports, {
26
- Default: () => SwitchDefault,
27
- Match: () => SwitchMatch,
28
- Root: () => SwitchRoot
29
- });
30
-
31
- export { switch_parts_exports as Switch, SwitchDefault, SwitchMatch, SwitchRoot };
1
+ export { switch_parts_exports as Switch, SwitchDefault, SwitchMatch, SwitchRoot } from '../../chunk-W4DCQY55.js';
2
+ import '../../chunk-PZ5AY32C.js';
32
3
  //# sourceMappingURL=index.js.map
33
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/common/switch/switch.tsx","../../../../src/components/common/switch/switch-parts.ts"],"names":[],"mappings":";;;;AAkBO,SAAS,WAA8B,KAAgC,EAAA;AAC7E,EAAA,MAAM,EAAE,QAAA,EAAU,SAAY,GAAA,IAAA,EAAS,GAAA,KAAA;AAEvC,EAAM,MAAA,WAAA,GAAc,cAAe,CAAA,QAAA,EAAU,aAAe,EAAA;AAAA,IAC3D,YAAc,EAAA,gDAAA;AAAA,IACd,wBAA0B,EAAA;AAAA,GAC1B,CAAA;AAED,EAAM,MAAA,kBAAA,GAAqB,gBAAiB,CAAA,QAAA,EAAU,aAAa,CAAA;AAEnE,EAAM,MAAA,WAAA,GAAc,mBAAmB,IAAK,CAAA,CAAC,UAAU,KAAM,CAAA,KAAA,CAAM,SAAS,SAAS,CAAA;AAErF,EAAA,OAAO,WAAe,IAAA,WAAA;AACvB;AAEO,SAAS,WAAA,CAAmB,EAAE,QAAA,EAAqC,EAAA;AACzE,EAAO,OAAA,QAAA;AACR;AAEO,SAAS,aAAA,CAAc,EAAE,QAAA,EAAgD,EAAA;AAC/E,EAAO,OAAA,QAAA;AACR;AACA,aAAc,CAAA,IAAA,GAAO,MAAO,CAAA,GAAA,CAAI,gBAAgB,CAAA;;;ACxChD,IAAA,oBAAA,GAAA;AAAA,QAAA,CAAA,oBAAA,EAAA;AAAA,EAAA,OAAA,EAAA,MAAA,aAAA;AAAA,EAAA,KAAA,EAAA,MAAA,WAAA;AAAA,EAAA,IAAA,EAAA,MAAA;AAAA,CAAA,CAAA","file":"index.js","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nimport { getOtherChildren, getSlotElement } from \"@zayne-labs/toolkit-react/utils\";\n\ntype ValidSwitchComponentType = React.ReactElement<SwitchMatchProps>;\n\ntype SwitchProps<TCondition> = {\n\tchildren: ValidSwitchComponentType | ValidSwitchComponentType[];\n\tcondition?: TCondition;\n};\n\ntype SwitchMatchProps<TWhen = boolean> = {\n\tchildren: React.ReactNode;\n\twhen: TWhen;\n};\n\nexport function SwitchRoot<TCondition = true>(props: SwitchProps<TCondition>) {\n\tconst { children, condition = true } = props;\n\n\tconst defaultCase = getSlotElement(children, SwitchDefault, {\n\t\terrorMessage: \"Only one <Switch.Default> component is allowed\",\n\t\tthrowOnMultipleSlotMatch: true,\n\t});\n\n\tconst childrenCasesArray = getOtherChildren(children, SwitchDefault);\n\n\tconst matchedCase = childrenCasesArray.find((child) => child.props.when === condition);\n\n\treturn matchedCase ?? defaultCase;\n}\n\nexport function SwitchMatch<TWhen>({ children }: SwitchMatchProps<TWhen>) {\n\treturn children;\n}\n\nexport function SwitchDefault({ children }: Pick<SwitchMatchProps, \"children\">) {\n\treturn children;\n}\nSwitchDefault.slot = Symbol.for(\"switch-default\");\n","export { SwitchDefault as Default, SwitchMatch as Match, SwitchRoot as Root } from \"./switch\";\n"]}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -1,31 +1,4 @@
1
+ export { Teleport } from '../../chunk-CB2EZJYW.js';
1
2
  import '../../chunk-PZ5AY32C.js';
2
- import { useState } from 'react';
3
- import { useEffectOnce, useMountEffect } from '@zayne-labs/toolkit-react';
4
- import { isString } from '@zayne-labs/toolkit-type-helpers';
5
- import { createPortal } from 'react-dom';
6
-
7
- function Teleport(props) {
8
- const { children, insertPosition, to } = props;
9
- const [reactPortal, setReactPortal] = useState(null);
10
- useEffectOnce(() => {
11
- if (!to || !insertPosition) return;
12
- const destination = isString(to) ? document.querySelector(to) : to;
13
- const tempWrapper = document.createElement("div");
14
- tempWrapper.style.display = "contents";
15
- destination?.insertAdjacentElement(insertPosition, tempWrapper);
16
- setReactPortal(createPortal(children, tempWrapper));
17
- return () => {
18
- tempWrapper.remove();
19
- };
20
- });
21
- useMountEffect(() => {
22
- if (!to || insertPosition) return;
23
- const destination = isString(to) ? document.querySelector(to) : to;
24
- destination && setReactPortal(createPortal(children, destination));
25
- });
26
- return reactPortal;
27
- }
28
-
29
- export { Teleport };
30
3
  //# sourceMappingURL=index.js.map
31
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/common/teleport/teleport.tsx"],"names":[],"mappings":";;;;;;AAeA,SAAS,SAAS,KAAoB,EAAA;AACrC,EAAA,MAAM,EAAE,QAAA,EAAU,cAAgB,EAAA,EAAA,EAAO,GAAA,KAAA;AAEzC,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAAA,GAAI,SAAmC,IAAI,CAAA;AAE7E,EAAA,aAAA,CAAc,MAAM;AACnB,IAAI,IAAA,CAAC,EAAM,IAAA,CAAC,cAAgB,EAAA;AAE5B,IAAA,MAAM,cAAc,QAAS,CAAA,EAAE,IAAI,QAAS,CAAA,aAAA,CAA2B,EAAE,CAAI,GAAA,EAAA;AAE7E,IAAM,MAAA,WAAA,GAAc,QAAS,CAAA,aAAA,CAAc,KAAK,CAAA;AAChD,IAAA,WAAA,CAAY,MAAM,OAAU,GAAA,UAAA;AAE5B,IAAa,WAAA,EAAA,qBAAA,CAAsB,gBAAgB,WAAW,CAAA;AAE9D,IAAe,cAAA,CAAA,YAAA,CAAa,QAAU,EAAA,WAAW,CAAC,CAAA;AAElD,IAAA,OAAO,MAAM;AACZ,MAAA,WAAA,CAAY,MAAO,EAAA;AAAA,KACpB;AAAA,GACA,CAAA;AAED,EAAA,cAAA,CAAe,MAAM;AACpB,IAAI,IAAA,CAAC,MAAM,cAAgB,EAAA;AAE3B,IAAA,MAAM,cAAc,QAAS,CAAA,EAAE,IAAI,QAAS,CAAA,aAAA,CAA2B,EAAE,CAAI,GAAA,EAAA;AAE7E,IAAA,WAAA,IAAe,cAAe,CAAA,YAAA,CAAa,QAAU,EAAA,WAAW,CAAC,CAAA;AAAA,GACjE,CAAA;AAED,EAAO,OAAA,WAAA;AACR","file":"index.js","sourcesContent":["import * as React from \"react\";\n\nimport { useEffectOnce, useMountEffect } from \"@zayne-labs/toolkit-react\";\nimport { type AnyString, isString } from \"@zayne-labs/toolkit-type-helpers\";\nimport { useState } from \"react\";\nimport { createPortal } from \"react-dom\";\n\ntype ValidHtmlTags = keyof HTMLElementTagNameMap;\n\ntype PortalProps = {\n\tchildren: React.ReactNode;\n\tinsertPosition?: InsertPosition;\n\tto?: AnyString | HTMLElement | ValidHtmlTags | null;\n};\n\nfunction Teleport(props: PortalProps) {\n\tconst { children, insertPosition, to } = props;\n\n\tconst [reactPortal, setReactPortal] = useState<React.ReactPortal | null>(null);\n\n\tuseEffectOnce(() => {\n\t\tif (!to || !insertPosition) return;\n\n\t\tconst destination = isString(to) ? document.querySelector<HTMLElement>(to) : to;\n\n\t\tconst tempWrapper = document.createElement(\"div\");\n\t\ttempWrapper.style.display = \"contents\";\n\n\t\tdestination?.insertAdjacentElement(insertPosition, tempWrapper);\n\n\t\tsetReactPortal(createPortal(children, tempWrapper));\n\n\t\treturn () => {\n\t\t\ttempWrapper.remove();\n\t\t};\n\t});\n\n\tuseMountEffect(() => {\n\t\tif (!to || insertPosition) return;\n\n\t\tconst destination = isString(to) ? document.querySelector<HTMLElement>(to) : to;\n\n\t\tdestination && setReactPortal(createPortal(children, destination));\n\t});\n\n\treturn reactPortal;\n}\n\nexport { Teleport };\n"]}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -12,4 +12,4 @@ declare function ForList<TArrayItem, TElement extends react.ElementType = "ul">(
12
12
  className?: string;
13
13
  }>): react.JSX.Element;
14
14
 
15
- export { type EachProp as E, ForBase as F, ForList as a, type ForRenderProps as b };
15
+ export { type EachProp as E, type ForRenderProps as F, ForBase as a, ForList as b };
@@ -1,2 +1,17 @@
1
-
2
- export { }
1
+ export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardRoot, CardTitle } from './ui/card/index.js';
2
+ export { Carousel, CarouselButton, CarouselButtonsProps, CarouselCaption, CarouselContent, CarouselContentProps, CarouselControlProps, CarouselControls, CarouselIndicator, CarouselIndicatorProps, CarouselIndicatorWrapper, CarouselItem, CarouselItemWrapper, CarouselProviderProps, CarouselStore, CarouselStoreApi, CarouselWrapperProps, ImagesType, OtherCarouselProps } from './ui/carousel/index.js';
3
+ export { useDragScroll } from './ui/drag-scroll/index.js';
4
+ export { DropZone, InputProps, RootProps, UseDropZoneProps, useDropZone } from './ui/drop-zone/index.js';
5
+ export { Form, FormController, FormDescription, FormErrorMessage, FormErrorMessagePrimitive, FormInput, FormInputGroup, FormInputLeftItem, FormInputPrimitive, FormInputRightItem, FormItem, FormItemContext, FormLabel, FormRoot, FormTextArea, FormTextAreaPrimitive, useFormItemContext } from './ui/form/index.js';
6
+ export { E as EachProp, a as ForBase, b as ForList, F as ForRenderProps } from './for-TpNYqkYV.js';
7
+ export { getElementList } from './common/for/index.js';
8
+ export { Show, ShowContent, ShowFallback, ShowRoot } from './common/show/index.js';
9
+ export { Slot, Slottable } from './common/slot/index.js';
10
+ export { Switch, SwitchDefault, SwitchMatch, SwitchRoot } from './common/switch/index.js';
11
+ export { Teleport } from './common/teleport/index.js';
12
+ import 'react';
13
+ import '@zayne-labs/toolkit-react/utils';
14
+ import '@zayne-labs/toolkit-type-helpers';
15
+ import 'zustand';
16
+ import '@zayne-labs/toolkit-core';
17
+ import 'react-hook-form';
package/dist/esm/index.js CHANGED
@@ -1,3 +1,16 @@
1
-
1
+ import './chunk-HKPJTORQ.js';
2
+ import './chunk-PNYEIX7F.js';
3
+ export { card_parts_exports as Card, CardContent, CardDescription, CardFooter, CardHeader, CardRoot, CardTitle } from './chunk-PXYYL2LL.js';
4
+ export { carousel_parts_exports as Carousel, CarouselButton, CarouselCaption, CarouselContent, CarouselControls, CarouselIndicator, CarouselIndicatorWrapper, CarouselItem, CarouselItemWrapper } from './chunk-ZKEUZZVP.js';
5
+ export { useDragScroll } from './chunk-DL646TEP.js';
6
+ export { DropZone, useDropZone } from './chunk-EFGQDB4D.js';
7
+ export { form_parts_exports as Form, FormController, FormDescription, FormErrorMessage, FormErrorMessagePrimitive, FormInput, FormInputGroup, FormInputLeftItem, FormInputPrimitive, FormInputRightItem, FormItem, FormItemContext, FormLabel, FormRoot, FormTextArea, FormTextAreaPrimitive, useStrictFormItemContext as useFormItemContext } from './chunk-XLI7WVBJ.js';
8
+ import './chunk-OHG7GB7O.js';
9
+ export { ForBase, ForList, getElementList } from './chunk-MPOYLILK.js';
10
+ export { show_parts_exports as Show, ShowContent, ShowFallback, ShowRoot } from './chunk-FYVREWDP.js';
11
+ export { Slot, Slottable } from './chunk-ENDWJXPF.js';
12
+ export { switch_parts_exports as Switch, SwitchDefault, SwitchMatch, SwitchRoot } from './chunk-W4DCQY55.js';
13
+ export { Teleport } from './chunk-CB2EZJYW.js';
14
+ import './chunk-PZ5AY32C.js';
2
15
  //# sourceMappingURL=index.js.map
3
16
  //# sourceMappingURL=index.js.map
@@ -1,45 +1,6 @@
1
- import { Slot } from '../../chunk-ENDWJXPF.js';
2
- import { cnMerge } from '../../chunk-OHG7GB7O.js';
3
- import { __export } from '../../chunk-PZ5AY32C.js';
4
- import * as React from 'react';
5
-
6
- function CardRoot(props) {
7
- const { as: Element = "article", ...restOfProps } = props;
8
- return /* @__PURE__ */ React.createElement(Element, { ...restOfProps });
9
- }
10
- function CardHeader(props) {
11
- const { as: Element = "header", ...restOfProps } = props;
12
- return /* @__PURE__ */ React.createElement(Element, { ...restOfProps });
13
- }
14
- function CardTitle(props) {
15
- const { as: Element = "h3", className, ...restOfProps } = props;
16
- return /* @__PURE__ */ React.createElement(Element, { className: cnMerge("font-semibold", className), ...restOfProps });
17
- }
18
- function CardDescription(props) {
19
- const { as: Element = "p", className, ...restOfProps } = props;
20
- return /* @__PURE__ */ React.createElement(Element, { className: cnMerge("text-sm text-shadcn-muted-foreground", className), ...restOfProps });
21
- }
22
- function CardContent(props) {
23
- const { as: Element = "div", ...restOfProps } = props;
24
- return /* @__PURE__ */ React.createElement(Element, { ...restOfProps });
25
- }
26
- function CardFooter(props) {
27
- const { as: Element = "footer", asChild, ...restOfProps } = props;
28
- const Component = asChild ? Slot : Element;
29
- return /* @__PURE__ */ React.createElement(Component, { ...restOfProps });
30
- }
31
-
32
- // src/components/ui/card/card-parts.ts
33
- var card_parts_exports = {};
34
- __export(card_parts_exports, {
35
- Content: () => CardContent,
36
- Description: () => CardDescription,
37
- Footer: () => CardFooter,
38
- Header: () => CardHeader,
39
- Root: () => CardRoot,
40
- Title: () => CardTitle
41
- });
42
-
43
- export { card_parts_exports as Card, CardContent, CardDescription, CardFooter, CardHeader, CardRoot, CardTitle };
1
+ export { card_parts_exports as Card, CardContent, CardDescription, CardFooter, CardHeader, CardRoot, CardTitle } from '../../chunk-PXYYL2LL.js';
2
+ import '../../chunk-OHG7GB7O.js';
3
+ import '../../chunk-ENDWJXPF.js';
4
+ import '../../chunk-PZ5AY32C.js';
44
5
  //# sourceMappingURL=index.js.map
45
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/ui/card/card.tsx","../../../../src/components/ui/card/card-parts.ts"],"names":[],"mappings":";;;;;AAMO,SAAS,SACf,KACC,EAAA;AACD,EAAA,MAAM,EAAE,EAAI,EAAA,OAAA,GAAU,SAAW,EAAA,GAAG,aAAgB,GAAA,KAAA;AAEpD,EAAO,uBAAA,KAAA,CAAA,aAAA,CAAC,OAAS,EAAA,EAAA,GAAG,WAAa,EAAA,CAAA;AAClC;AAEO,SAAS,WACf,KACC,EAAA;AACD,EAAA,MAAM,EAAE,EAAI,EAAA,OAAA,GAAU,QAAU,EAAA,GAAG,aAAgB,GAAA,KAAA;AAEnD,EAAO,uBAA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AA,MAAA,EAAA,MAAA,UAAA;AAAA,EAAA,IAAA,EAAA,MAAA,QAAA;AAAA,EAAA,KAAA,EAAA,MAAA;AAAA,CAAA,CAAA","file":"index.js","sourcesContent":["import * as React from \"react\";\n\nimport { Slot } from \"@/components/common/slot\";\nimport { cnMerge } from \"@/lib/utils/cn\";\nimport type { PolymorphicProps } from \"@zayne-labs/toolkit-react/utils\";\n\nexport function CardRoot<TElement extends React.ElementType = \"article\">(\n\tprops: PolymorphicProps<TElement>\n) {\n\tconst { as: Element = \"article\", ...restOfProps } = props;\n\n\treturn <Element {...restOfProps} />;\n}\n\nexport function CardHeader<TElement extends React.ElementType = \"header\">(\n\tprops: PolymorphicProps<TElement>\n) {\n\tconst { as: Element = \"header\", ...restOfProps } = props;\n\n\treturn <Element {...restOfProps} />;\n}\n\nexport function CardTitle<TElement extends React.ElementType = \"h3\">(props: PolymorphicProps<TElement>) {\n\tconst { as: Element = \"h3\", className, ...restOfProps } = props;\n\n\treturn <Element className={cnMerge(\"font-semibold\", className)} {...restOfProps} />;\n}\n\nexport function CardDescription<TElement extends React.ElementType = \"p\">(\n\tprops: PolymorphicProps<TElement>\n) {\n\tconst { as: Element = \"p\", className, ...restOfProps } = props;\n\n\treturn (\n\t\t<Element className={cnMerge(\"text-sm text-shadcn-muted-foreground\", className)} {...restOfProps} />\n\t);\n}\n\nexport function CardContent<TElement extends React.ElementType = \"div\">(\n\tprops: PolymorphicProps<TElement>\n) {\n\tconst { as: Element = \"div\", ...restOfProps } = props;\n\n\treturn <Element {...restOfProps} />;\n}\n\nexport function CardFooter<TElement extends React.ElementType = \"footer\">(\n\tprops: PolymorphicProps<TElement, { asChild?: boolean }>\n) {\n\tconst { as: Element = \"footer\", asChild, ...restOfProps } = props;\n\n\tconst Component = asChild ? Slot : Element;\n\n\treturn <Component {...restOfProps} />;\n}\n","export {\n\tCardContent as Content,\n\tCardDescription as Description,\n\tCardFooter as Footer,\n\tCardHeader as Header,\n\tCardRoot as Root,\n\tCardTitle as Title,\n} from \"./card\";\n"]}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { PolymorphicProps } from '@zayne-labs/toolkit-react/utils';
3
- import { b as ForRenderProps, E as EachProp } from '../../for-C3T5FbXd.js';
3
+ import { F as ForRenderProps, E as EachProp } from '../../for-TpNYqkYV.js';
4
4
  import { Prettify } from '@zayne-labs/toolkit-type-helpers';
5
5
  import { StoreApi } from 'zustand';
6
6