@nation-a/ui 0.16.0 → 0.16.2
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/index.cjs +28 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +28 -3
- package/dist/index.js.map +1 -1
- package/dist/types/components/BottomSheet/BottomSheet.stories.d.ts +2 -0
- package/dist/types/components/BottomSheet/index.d.ts +3 -2
- package/dist/types/components/Input/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19195,14 +19195,29 @@ const bottomSheetRecipe = sva({
|
|
|
19195
19195
|
});
|
|
19196
19196
|
const BottomSheetContext = createContext$1({ rounded: 20 });
|
|
19197
19197
|
const BottomSheet = forwardRef(
|
|
19198
|
-
({
|
|
19199
|
-
|
|
19198
|
+
({
|
|
19199
|
+
children,
|
|
19200
|
+
snapPercent = { min: 0, max: null },
|
|
19201
|
+
maxSnapPoint,
|
|
19202
|
+
fullHeight,
|
|
19203
|
+
className,
|
|
19204
|
+
rounded = 20,
|
|
19205
|
+
disableDrag,
|
|
19206
|
+
onClose,
|
|
19207
|
+
...props
|
|
19208
|
+
}, ref) => {
|
|
19209
|
+
let snapPercentPoints = null;
|
|
19210
|
+
if (snapPercent.min && snapPercent.max) {
|
|
19211
|
+
snapPercentPoints = [snapPercent.max * window.innerHeight, snapPercent.min * window.innerHeight];
|
|
19212
|
+
}
|
|
19213
|
+
const snapPoints = snapPercentPoints ? snapPercentPoints : maxSnapPoint ? [maxSnapPoint] : void 0;
|
|
19200
19214
|
const styles2 = bottomSheetRecipe({ fullHeight });
|
|
19201
19215
|
return /* @__PURE__ */ jsx(BottomSheetContext.Provider, { value: { rounded, onClose }, children: /* @__PURE__ */ jsx(
|
|
19202
19216
|
Sheet,
|
|
19203
19217
|
{
|
|
19204
19218
|
ref,
|
|
19205
19219
|
snapPoints,
|
|
19220
|
+
detent: !snapPercent.max && !maxSnapPoint ? "content-height" : void 0,
|
|
19206
19221
|
initialSnap: 0,
|
|
19207
19222
|
className: cx(styles2.root, className),
|
|
19208
19223
|
onClose,
|
|
@@ -19803,6 +19818,7 @@ const Input = forwardRef(
|
|
|
19803
19818
|
endAdornment,
|
|
19804
19819
|
removeBorder,
|
|
19805
19820
|
error,
|
|
19821
|
+
fontSize,
|
|
19806
19822
|
...rest
|
|
19807
19823
|
}, ref) => {
|
|
19808
19824
|
const recipe = inputRecipe({
|
|
@@ -19853,7 +19869,16 @@ const Input = forwardRef(
|
|
|
19853
19869
|
startAdornment && /* @__PURE__ */ jsx(Box$1, { className: recipe.adornment, children: startAdornment }),
|
|
19854
19870
|
/* @__PURE__ */ jsxs(Stack2, { gap: 1, css: { width: "100%" }, children: [
|
|
19855
19871
|
/* @__PURE__ */ jsx(Label2, { visible: !!(label && labelPosition === "inside"), children: label }),
|
|
19856
|
-
/* @__PURE__ */ jsx(
|
|
19872
|
+
/* @__PURE__ */ jsx(
|
|
19873
|
+
styled.input,
|
|
19874
|
+
{
|
|
19875
|
+
ref: inputRef,
|
|
19876
|
+
disabled,
|
|
19877
|
+
onChange: handleInputChange,
|
|
19878
|
+
style: { ...rest == null ? void 0 : rest.style, fontSize: `${fontSize}px` },
|
|
19879
|
+
...rest
|
|
19880
|
+
}
|
|
19881
|
+
)
|
|
19857
19882
|
] }),
|
|
19858
19883
|
endAdornment && /* @__PURE__ */ jsx(Box$1, { className: recipe.adornment, children: endAdornment })
|
|
19859
19884
|
] }),
|