@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.cjs
CHANGED
|
@@ -19213,14 +19213,29 @@ const bottomSheetRecipe = sva({
|
|
|
19213
19213
|
});
|
|
19214
19214
|
const BottomSheetContext = React.createContext({ rounded: 20 });
|
|
19215
19215
|
const BottomSheet = React.forwardRef(
|
|
19216
|
-
({
|
|
19217
|
-
|
|
19216
|
+
({
|
|
19217
|
+
children,
|
|
19218
|
+
snapPercent = { min: 0, max: null },
|
|
19219
|
+
maxSnapPoint,
|
|
19220
|
+
fullHeight,
|
|
19221
|
+
className,
|
|
19222
|
+
rounded = 20,
|
|
19223
|
+
disableDrag,
|
|
19224
|
+
onClose,
|
|
19225
|
+
...props
|
|
19226
|
+
}, ref) => {
|
|
19227
|
+
let snapPercentPoints = null;
|
|
19228
|
+
if (snapPercent.min && snapPercent.max) {
|
|
19229
|
+
snapPercentPoints = [snapPercent.max * window.innerHeight, snapPercent.min * window.innerHeight];
|
|
19230
|
+
}
|
|
19231
|
+
const snapPoints = snapPercentPoints ? snapPercentPoints : maxSnapPoint ? [maxSnapPoint] : void 0;
|
|
19218
19232
|
const styles2 = bottomSheetRecipe({ fullHeight });
|
|
19219
19233
|
return /* @__PURE__ */ jsxRuntime.jsx(BottomSheetContext.Provider, { value: { rounded, onClose }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
19220
19234
|
Sheet,
|
|
19221
19235
|
{
|
|
19222
19236
|
ref,
|
|
19223
19237
|
snapPoints,
|
|
19238
|
+
detent: !snapPercent.max && !maxSnapPoint ? "content-height" : void 0,
|
|
19224
19239
|
initialSnap: 0,
|
|
19225
19240
|
className: cx(styles2.root, className),
|
|
19226
19241
|
onClose,
|
|
@@ -19821,6 +19836,7 @@ const Input = React.forwardRef(
|
|
|
19821
19836
|
endAdornment,
|
|
19822
19837
|
removeBorder,
|
|
19823
19838
|
error,
|
|
19839
|
+
fontSize,
|
|
19824
19840
|
...rest
|
|
19825
19841
|
}, ref) => {
|
|
19826
19842
|
const recipe = inputRecipe({
|
|
@@ -19871,7 +19887,16 @@ const Input = React.forwardRef(
|
|
|
19871
19887
|
startAdornment && /* @__PURE__ */ jsxRuntime.jsx(Box$1, { className: recipe.adornment, children: startAdornment }),
|
|
19872
19888
|
/* @__PURE__ */ jsxRuntime.jsxs(Stack2, { gap: 1, css: { width: "100%" }, children: [
|
|
19873
19889
|
/* @__PURE__ */ jsxRuntime.jsx(Label2, { visible: !!(label && labelPosition === "inside"), children: label }),
|
|
19874
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19890
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19891
|
+
styled.input,
|
|
19892
|
+
{
|
|
19893
|
+
ref: inputRef,
|
|
19894
|
+
disabled,
|
|
19895
|
+
onChange: handleInputChange,
|
|
19896
|
+
style: { ...rest == null ? void 0 : rest.style, fontSize: `${fontSize}px` },
|
|
19897
|
+
...rest
|
|
19898
|
+
}
|
|
19899
|
+
)
|
|
19875
19900
|
] }),
|
|
19876
19901
|
endAdornment && /* @__PURE__ */ jsxRuntime.jsx(Box$1, { className: recipe.adornment, children: endAdornment })
|
|
19877
19902
|
] }),
|