@zayne-labs/ui-react 0.9.18 → 0.9.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/esm/{carousel-Dznupnx8.js → carousel-Dvp-qURP.js} +2 -2
- package/dist/esm/{carousel-Dznupnx8.js.map → carousel-Dvp-qURP.js.map} +1 -1
- package/dist/esm/components/common/await/index.d.ts +5 -5
- package/dist/esm/components/common/await/index.js +1 -1
- package/dist/esm/components/common/error-boundary/index.d.ts +1 -1
- package/dist/esm/components/common/for/index.d.ts +1 -1
- package/dist/esm/components/common/index.d.ts +10 -10
- package/dist/esm/components/common/index.js +3 -3
- package/dist/esm/components/common/show/index.d.ts +1 -1
- package/dist/esm/components/common/show/index.js +2 -2
- package/dist/esm/components/common/slot/index.d.ts +1 -1
- package/dist/esm/components/common/suspense-with-boundary/index.d.ts +2 -2
- package/dist/esm/components/common/switch/index.d.ts +1 -1
- package/dist/esm/components/common/switch/index.js +2 -2
- package/dist/esm/components/common/teleport/index.d.ts +1 -1
- package/dist/esm/components/ui/card/index.d.ts +1 -1
- package/dist/esm/components/ui/carousel/index.d.ts +1 -1
- package/dist/esm/components/ui/carousel/index.js +4 -4
- package/dist/esm/components/ui/drag-scroll/index.d.ts +1 -1
- package/dist/esm/components/ui/drop-zone/index.d.ts +2 -2
- package/dist/esm/components/ui/drop-zone/index.js +4 -4
- package/dist/esm/components/ui/form/index.d.ts +1 -1
- package/dist/esm/components/ui/form/index.js +2 -2
- package/dist/esm/components/ui/index.d.ts +6 -6
- package/dist/esm/components/ui/index.js +6 -6
- package/dist/esm/{drop-zone-_YK9C3Xj.js → drop-zone-Beip1k4x.js} +2 -2
- package/dist/esm/{drop-zone-_YK9C3Xj.js.map → drop-zone-Beip1k4x.js.map} +1 -1
- package/dist/esm/{form-DytCfL6R.js → form-CUlTG3KI.js} +2 -2
- package/dist/esm/{form-DytCfL6R.js.map → form-CUlTG3KI.js.map} +1 -1
- package/dist/esm/{getSlot-BIcGgBwN.js → getSlot-D1_uG-Ym.js} +2 -2
- package/dist/esm/{getSlot-BIcGgBwN.js.map → getSlot-D1_uG-Ym.js.map} +1 -1
- package/dist/esm/{getSlotMap-DA_uhXqU.d.ts → getSlotMap-DZlQN8--.d.ts} +2 -3
- package/dist/esm/{index-DnaUCh8d.d.ts → index-B3N6YbN8.d.ts} +2 -3
- package/dist/esm/{index-BuSQsDCX.d.ts → index-BMcv7ELE.d.ts} +2 -5
- package/dist/esm/{index-ASoFjmZ6.d.ts → index-BilTdK_M.d.ts} +7 -10
- package/dist/esm/{index-BSJ30pGj.d.ts → index-BsjcsNQh.d.ts} +4 -5
- package/dist/esm/{index-1UCPJf7B.d.ts → index-BwnMUHzm.d.ts} +2 -5
- package/dist/esm/{index-CqlM1M0j.d.ts → index-CFNg1R-m.d.ts} +5 -6
- package/dist/esm/{index-C0XZoIZD.d.ts → index-CGI7EVlK.d.ts} +2 -5
- package/dist/esm/{index-DQ1yFGd2.d.ts → index-CIM4YPg5.d.ts} +4 -6
- package/dist/esm/{index-BhpBx8dH.d.ts → index-CNE9Cime.d.ts} +2 -4
- package/dist/esm/{index-BC0r1cBF.d.ts → index-DT8F8QKc.d.ts} +4 -7
- package/dist/esm/{index-D-j2Cn1J.d.ts → index-DeBZiR6B.d.ts} +1 -2
- package/dist/esm/{index--1COprHP.d.ts → index-UX3DaMVe.d.ts} +2 -5
- package/dist/esm/{index-TBkPiipk.d.ts → index-YFi-sIuR.d.ts} +5 -9
- package/dist/esm/{index-CTZr4PTO.d.ts → index-gT9tVHv1.d.ts} +2 -3
- package/dist/esm/lib/utils/index.d.ts +2 -2
- package/dist/esm/lib/utils/index.js +1 -1
- package/dist/esm/{show-BgYrfIxJ.js → show-DNPzdLi-.js} +2 -2
- package/dist/esm/{show-BgYrfIxJ.js.map → show-DNPzdLi-.js.map} +1 -1
- package/dist/esm/{switch-PF5xTJfr.js → switch-B2gKl94R.js} +2 -2
- package/dist/esm/{switch-PF5xTJfr.js.map → switch-B2gKl94R.js.map} +1 -1
- package/dist/style.css +1 -1
- package/package.json +10 -10
|
@@ -18,7 +18,6 @@ type DragScrollResult<TElement extends HTMLElement, TItemElement extends HTMLEle
|
|
|
18
18
|
getRootProps: (rootProps?: RootProps<TElement>) => RootProps<TElement>;
|
|
19
19
|
};
|
|
20
20
|
declare const useDragScroll: <TElement extends HTMLElement, TItemElement extends HTMLElement = HTMLElement>(props?: DragScrollProps<TElement, TItemElement>) => DragScrollResult<TElement, TItemElement>;
|
|
21
|
-
|
|
22
21
|
//#endregion
|
|
23
|
-
export { useDragScroll
|
|
24
|
-
//# sourceMappingURL=index-
|
|
22
|
+
export { useDragScroll };
|
|
23
|
+
//# sourceMappingURL=index-gT9tVHv1.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { GetSlotComponentProps, GetSlotMapResult, createSlotComponent
|
|
2
|
-
import { FunctionalComponent, getMultipleSlots, getRegularChildren, getSingleSlot, matchesAnySlotComponent, matchesSlotComponent } from "../../index-
|
|
1
|
+
import { GetSlotComponentProps, GetSlotMapResult, createSlotComponent, getSlotMap, slotComponentSymbol, withSlotNameAndSymbol } from "../../getSlotMap-DZlQN8--.js";
|
|
2
|
+
import { FunctionalComponent, getMultipleSlots, getRegularChildren, getSingleSlot, matchesAnySlotComponent, matchesSlotComponent } from "../../index-DeBZiR6B.js";
|
|
3
3
|
export { FunctionalComponent, GetSlotComponentProps, GetSlotMapResult, createSlotComponent, getMultipleSlots, getRegularChildren, getSingleSlot, getSlotMap, matchesAnySlotComponent, matchesSlotComponent, slotComponentSymbol, withSlotNameAndSymbol };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createSlotComponent, getSlotMap, slotComponentSymbol, withSlotNameAndSymbol } from "../../utils-D4YNWj2X.js";
|
|
2
|
-
import { getMultipleSlots
|
|
2
|
+
import { getMultipleSlots, getRegularChildren, getSingleSlot, matchesAnySlotComponent, matchesSlotComponent } from "../../getSlot-D1_uG-Ym.js";
|
|
3
3
|
|
|
4
4
|
export { createSlotComponent, getMultipleSlots, getRegularChildren, getSingleSlot, getSlotMap, matchesAnySlotComponent, matchesSlotComponent, slotComponentSymbol, withSlotNameAndSymbol };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __export } from "./chunk-Cl8Af3a2.js";
|
|
2
|
-
import { getMultipleSlots
|
|
2
|
+
import { getMultipleSlots } from "./getSlot-D1_uG-Ym.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { assert, isFunction } from "@zayne-labs/toolkit-type-helpers";
|
|
5
5
|
|
|
@@ -38,4 +38,4 @@ __export(show_parts_exports, {
|
|
|
38
38
|
|
|
39
39
|
//#endregion
|
|
40
40
|
export { ShowContent, ShowFallback, ShowRoot, show_parts_exports };
|
|
41
|
-
//# sourceMappingURL=show-
|
|
41
|
+
//# sourceMappingURL=show-DNPzdLi-.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"show-
|
|
1
|
+
{"version":3,"file":"show-DNPzdLi-.js","names":["props: ShowProps<TWhen>"],"sources":["../../src/components/common/show/show.tsx","../../src/components/common/show/show-parts.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nimport { getMultipleSlots } from \"@/lib/utils/getSlot\";\nimport { assert, isFunction } from \"@zayne-labs/toolkit-type-helpers\";\n\ntype ShowProps<TWhen> = {\n\tchildren: React.ReactNode | ((value: TWhen) => React.ReactNode);\n\tfallback?: React.ReactNode;\n\twhen: false | TWhen | null | undefined;\n};\n\nexport function ShowRoot<TWhen>(props: ShowProps<TWhen>) {\n\tconst { children, fallback = null, when } = props;\n\n\tconst resolvedChildren = isFunction(children) ? children(when as TWhen) : children;\n\n\tconst {\n\t\tregularChildren,\n\t\tslots: [contentSlot, fallBackSlot],\n\t} = getMultipleSlots(resolvedChildren, [ShowContent, ShowFallback], {\n\t\terrorMessage: [\n\t\t\t\"Only one <Show.Content> component is allowed\",\n\t\t\t\"Only one <Show.Fallback> or <Show.OtherWise> component is allowed\",\n\t\t],\n\t\tthrowOnMultipleSlotMatch: true,\n\t});\n\n\tif (!when) {\n\t\tassert(\n\t\t\t!(fallBackSlot && fallback),\n\t\t\t\"The fallback prop and <Show.Fallback> cannot be used at the same time.\"\n\t\t);\n\n\t\treturn fallBackSlot ?? fallback;\n\t}\n\n\treturn contentSlot ?? regularChildren;\n}\n\nexport function ShowContent({ children }: { children: React.ReactNode }) {\n\treturn children;\n}\nShowContent.slotSymbol = Symbol(\"show-content\");\n\nexport function ShowFallback({ children }: { children: React.ReactNode }) {\n\treturn children;\n}\nShowFallback.slotSymbol = Symbol(\"show-fallback\");\n","export {\n\tShowContent as Content,\n\tShowFallback as Fallback,\n\tShowFallback as Otherwise,\n\tShowRoot as Root,\n} from \"./show\";\n"],"mappings":";;;;;;AAaA,SAAgB,SAAgBA,OAAyB;CACxD,MAAM,EAAE,UAAU,WAAW,MAAM,MAAM,GAAG;CAE5C,MAAM,mBAAmB,WAAW,SAAS,GAAG,SAAS,KAAc,GAAG;CAE1E,MAAM,EACL,iBACA,OAAO,CAAC,aAAa,aAAa,EAClC,GAAG,iBAAiB,kBAAkB,CAAC,aAAa,YAAa,GAAE;EACnE,cAAc,CACb,gDACA,mEACA;EACD,0BAA0B;CAC1B,EAAC;AAEF,MAAK,MAAM;AACV,WACG,gBAAgB,WAClB,yEACA;AAED,SAAO,gBAAgB;CACvB;AAED,QAAO,eAAe;AACtB;AAED,SAAgB,YAAY,EAAE,UAAyC,EAAE;AACxE,QAAO;AACP;AACD,YAAY,aAAa,OAAO,eAAe;AAE/C,SAAgB,aAAa,EAAE,UAAyC,EAAE;AACzE,QAAO;AACP;AACD,aAAa,aAAa,OAAO,gBAAgB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __export } from "./chunk-Cl8Af3a2.js";
|
|
2
|
-
import { getRegularChildren
|
|
2
|
+
import { getRegularChildren, getSingleSlot } from "./getSlot-D1_uG-Ym.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { isFunction } from "@zayne-labs/toolkit-type-helpers";
|
|
5
5
|
|
|
@@ -39,4 +39,4 @@ __export(switch_parts_exports, {
|
|
|
39
39
|
|
|
40
40
|
//#endregion
|
|
41
41
|
export { SwitchDefault, SwitchMatch, SwitchRoot, switch_parts_exports };
|
|
42
|
-
//# sourceMappingURL=switch-
|
|
42
|
+
//# sourceMappingURL=switch-B2gKl94R.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch-
|
|
1
|
+
{"version":3,"file":"switch-B2gKl94R.js","names":["props: SwitchProps","props: SwitchMatchProps<TWhen>"],"sources":["../../src/components/common/switch/switch.tsx","../../src/components/common/switch/switch-parts.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nimport { getRegularChildren, getSingleSlot } from \"@/lib/utils/getSlot\";\nimport { isFunction } from \"@zayne-labs/toolkit-type-helpers\";\n\ntype ValidSwitchComponentType = React.ReactElement<SwitchMatchProps<unknown>>;\n\ntype SwitchProps = {\n\tchildren: ValidSwitchComponentType | ValidSwitchComponentType[];\n\tvalue?: unknown;\n};\n\nconst defaultValueSymbol = Symbol(\"default-value\");\n\nexport function SwitchRoot(props: SwitchProps) {\n\tconst { children, value = defaultValueSymbol } = props;\n\n\tconst defaultCase = getSingleSlot(children, SwitchDefault, {\n\t\terrorMessage: \"Only one <Switch.Default> component is allowed\",\n\t\tthrowOnMultipleSlotMatch: true,\n\t});\n\n\tconst childrenCasesArray = getRegularChildren(children, SwitchDefault) as ValidSwitchComponentType[];\n\n\tconst matchedCase = childrenCasesArray.find((child) => {\n\t\t// == If value is defaultValueSymbol, match the cases in order like switch(true)\n\t\tif (value === defaultValueSymbol) {\n\t\t\treturn Boolean(child.props.when);\n\t\t}\n\n\t\t// == Otherwise, match the cases like switch(value)\n\t\treturn child.props.when === value;\n\t});\n\n\treturn matchedCase ?? defaultCase;\n}\n\ntype SwitchMatchProps<TWhen> = {\n\tchildren: React.ReactNode | ((value: TWhen) => React.ReactNode);\n\twhen: false | TWhen | null | undefined;\n};\n\nexport function SwitchMatch<TWhen>(props: SwitchMatchProps<TWhen>) {\n\tconst { children, when } = props;\n\n\tconst resolvedChildren = isFunction(children) ? children(when as TWhen) : children;\n\n\treturn resolvedChildren;\n}\n\nexport function SwitchDefault({ children }: { children: React.ReactNode }) {\n\treturn children;\n}\nSwitchDefault.slotSymbol = Symbol(\"switch-default\");\n","export { SwitchDefault as Default, SwitchMatch as Match, SwitchRoot as Root } from \"./switch\";\n"],"mappings":";;;;;;AAcA,MAAM,qBAAqB,OAAO,gBAAgB;AAElD,SAAgB,WAAWA,OAAoB;CAC9C,MAAM,EAAE,UAAU,QAAQ,oBAAoB,GAAG;CAEjD,MAAM,cAAc,cAAc,UAAU,eAAe;EAC1D,cAAc;EACd,0BAA0B;CAC1B,EAAC;CAEF,MAAM,qBAAqB,mBAAmB,UAAU,cAAc;CAEtE,MAAM,cAAc,mBAAmB,KAAK,CAAC,UAAU;AAEtD,MAAI,UAAU,mBACb,QAAO,QAAQ,MAAM,MAAM,KAAK;AAIjC,SAAO,MAAM,MAAM,SAAS;CAC5B,EAAC;AAEF,QAAO,eAAe;AACtB;AAOD,SAAgB,YAAmBC,OAAgC;CAClE,MAAM,EAAE,UAAU,MAAM,GAAG;CAE3B,MAAM,mBAAmB,WAAW,SAAS,GAAG,SAAS,KAAc,GAAG;AAE1E,QAAO;AACP;AAED,SAAgB,cAAc,EAAE,UAAyC,EAAE;AAC1E,QAAO;AACP;AACD,cAAc,aAAa,OAAO,iBAAiB"}
|
package/dist/style.css
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zayne-labs/ui-react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.19",
|
|
5
5
|
"description": "A composable UI/UI-utilities components library. ",
|
|
6
6
|
"author": "Ryan Zayne",
|
|
7
7
|
"license": "MIT",
|
|
@@ -52,18 +52,18 @@
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@zayne-labs/toolkit-core": "0.9.
|
|
56
|
-
"@zayne-labs/toolkit-react": "0.9.
|
|
57
|
-
"@zayne-labs/toolkit-type-helpers": "0.9.
|
|
55
|
+
"@zayne-labs/toolkit-core": "0.9.48",
|
|
56
|
+
"@zayne-labs/toolkit-react": "0.9.48",
|
|
57
|
+
"@zayne-labs/toolkit-type-helpers": "0.9.48"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@arethetypeswrong/cli": "0.18.1",
|
|
61
61
|
"@size-limit/esbuild-why": "11.2.0",
|
|
62
62
|
"@size-limit/preset-small-lib": "11.2.0",
|
|
63
|
-
"@tailwindcss/cli": "^4.1.
|
|
63
|
+
"@tailwindcss/cli": "^4.1.8",
|
|
64
64
|
"@total-typescript/ts-reset": "0.6.1",
|
|
65
|
-
"@types/react": "19.1.
|
|
66
|
-
"@types/react-dom": "19.1.
|
|
65
|
+
"@types/react": "19.1.6",
|
|
66
|
+
"@types/react-dom": "19.1.6",
|
|
67
67
|
"@zayne-labs/tsconfig": "0.9.1",
|
|
68
68
|
"concurrently": "9.1.2",
|
|
69
69
|
"cross-env": "7.0.3",
|
|
@@ -71,11 +71,11 @@
|
|
|
71
71
|
"publish": "^0.6.0",
|
|
72
72
|
"react": "19.1.0",
|
|
73
73
|
"react-dom": "19.1.0",
|
|
74
|
-
"react-hook-form": "7.
|
|
74
|
+
"react-hook-form": "7.57.0",
|
|
75
75
|
"size-limit": "11.2.0",
|
|
76
76
|
"tailwind-merge": "3.3.0",
|
|
77
|
-
"tailwindcss": "^4.1.
|
|
78
|
-
"tsdown": "^0.12.
|
|
77
|
+
"tailwindcss": "^4.1.8",
|
|
78
|
+
"tsdown": "^0.12.7",
|
|
79
79
|
"tsup": "^8.5.0",
|
|
80
80
|
"typescript": "5.8.3",
|
|
81
81
|
"zustand": "5.0.5"
|