design-zystem 1.0.380 → 1.0.381
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.js +15 -3
- package/dist/index.mjs +15 -3
- package/dist/ui/index.js +11 -3
- package/dist/ui/index.mjs +11 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2822,6 +2822,14 @@ var Select = ({
|
|
|
2822
2822
|
// src/ui-legacy/Components/Input/Input.tsx
|
|
2823
2823
|
var import_react13 = require("react");
|
|
2824
2824
|
var import_styled_components21 = __toESM(require("styled-components"));
|
|
2825
|
+
|
|
2826
|
+
// src/ui/lib/numberInputWheel.ts
|
|
2827
|
+
var blurNumberInputOnWheel = (onWheel) => (e) => {
|
|
2828
|
+
if (e.currentTarget.type === "number") e.currentTarget.blur();
|
|
2829
|
+
onWheel == null ? void 0 : onWheel(e);
|
|
2830
|
+
};
|
|
2831
|
+
|
|
2832
|
+
// src/ui-legacy/Components/Input/Input.tsx
|
|
2825
2833
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2826
2834
|
var shouldForwardProp8 = (prop) => ![
|
|
2827
2835
|
"width",
|
|
@@ -3059,7 +3067,7 @@ var Input = (0, import_react13.forwardRef)((props, ref) => {
|
|
|
3059
3067
|
]);
|
|
3060
3068
|
const inputName = otherProps == null ? void 0 : otherProps.name;
|
|
3061
3069
|
const { min, max, step } = otherProps || {};
|
|
3062
|
-
const _b = otherProps || {}, { name } = _b, forwardProps = __objRest(_b, ["name"]);
|
|
3070
|
+
const _b = otherProps || {}, { name, onWheel } = _b, forwardProps = __objRest(_b, ["name", "onWheel"]);
|
|
3063
3071
|
const [showPassword, setShowPassword] = (0, import_react13.useState)(false);
|
|
3064
3072
|
const [displayDateValue, setDisplayDateValue] = (0, import_react13.useState)("");
|
|
3065
3073
|
const nativeDateRef = (0, import_react13.useRef)(null);
|
|
@@ -3215,7 +3223,7 @@ var Input = (0, import_react13.forwardRef)((props, ref) => {
|
|
|
3215
3223
|
)
|
|
3216
3224
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3217
3225
|
Component,
|
|
3218
|
-
__spreadValues(__spreadValues(__spreadValues({
|
|
3226
|
+
__spreadProps(__spreadValues(__spreadValues(__spreadValues({
|
|
3219
3227
|
id: inputId,
|
|
3220
3228
|
ref: innerRef,
|
|
3221
3229
|
type: isPassword ? showPassword ? "text" : "password" : type,
|
|
@@ -3227,7 +3235,11 @@ var Input = (0, import_react13.forwardRef)((props, ref) => {
|
|
|
3227
3235
|
disabled,
|
|
3228
3236
|
name: inputName,
|
|
3229
3237
|
style: computedStyle
|
|
3230
|
-
}, noAutofillProps), isPassword ? { autoComplete: "new-password" } : {}), forwardProps)
|
|
3238
|
+
}, noAutofillProps), isPassword ? { autoComplete: "new-password" } : {}), forwardProps), {
|
|
3239
|
+
onWheel: blurNumberInputOnWheel(
|
|
3240
|
+
onWheel
|
|
3241
|
+
)
|
|
3242
|
+
})
|
|
3231
3243
|
),
|
|
3232
3244
|
isPassword && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3233
3245
|
EyeButton,
|
package/dist/index.mjs
CHANGED
|
@@ -2685,6 +2685,14 @@ import {
|
|
|
2685
2685
|
useState as useState8
|
|
2686
2686
|
} from "react";
|
|
2687
2687
|
import styled21 from "styled-components";
|
|
2688
|
+
|
|
2689
|
+
// src/ui/lib/numberInputWheel.ts
|
|
2690
|
+
var blurNumberInputOnWheel = (onWheel) => (e) => {
|
|
2691
|
+
if (e.currentTarget.type === "number") e.currentTarget.blur();
|
|
2692
|
+
onWheel == null ? void 0 : onWheel(e);
|
|
2693
|
+
};
|
|
2694
|
+
|
|
2695
|
+
// src/ui-legacy/Components/Input/Input.tsx
|
|
2688
2696
|
import { Fragment as Fragment3, jsx as jsx25, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2689
2697
|
var shouldForwardProp8 = (prop) => ![
|
|
2690
2698
|
"width",
|
|
@@ -2922,7 +2930,7 @@ var Input = forwardRef3((props, ref) => {
|
|
|
2922
2930
|
]);
|
|
2923
2931
|
const inputName = otherProps == null ? void 0 : otherProps.name;
|
|
2924
2932
|
const { min, max, step } = otherProps || {};
|
|
2925
|
-
const _b = otherProps || {}, { name } = _b, forwardProps = __objRest(_b, ["name"]);
|
|
2933
|
+
const _b = otherProps || {}, { name, onWheel } = _b, forwardProps = __objRest(_b, ["name", "onWheel"]);
|
|
2926
2934
|
const [showPassword, setShowPassword] = useState8(false);
|
|
2927
2935
|
const [displayDateValue, setDisplayDateValue] = useState8("");
|
|
2928
2936
|
const nativeDateRef = useRef6(null);
|
|
@@ -3078,7 +3086,7 @@ var Input = forwardRef3((props, ref) => {
|
|
|
3078
3086
|
)
|
|
3079
3087
|
] }) : /* @__PURE__ */ jsx25(
|
|
3080
3088
|
Component,
|
|
3081
|
-
__spreadValues(__spreadValues(__spreadValues({
|
|
3089
|
+
__spreadProps(__spreadValues(__spreadValues(__spreadValues({
|
|
3082
3090
|
id: inputId,
|
|
3083
3091
|
ref: innerRef,
|
|
3084
3092
|
type: isPassword ? showPassword ? "text" : "password" : type,
|
|
@@ -3090,7 +3098,11 @@ var Input = forwardRef3((props, ref) => {
|
|
|
3090
3098
|
disabled,
|
|
3091
3099
|
name: inputName,
|
|
3092
3100
|
style: computedStyle
|
|
3093
|
-
}, noAutofillProps), isPassword ? { autoComplete: "new-password" } : {}), forwardProps)
|
|
3101
|
+
}, noAutofillProps), isPassword ? { autoComplete: "new-password" } : {}), forwardProps), {
|
|
3102
|
+
onWheel: blurNumberInputOnWheel(
|
|
3103
|
+
onWheel
|
|
3104
|
+
)
|
|
3105
|
+
})
|
|
3094
3106
|
),
|
|
3095
3107
|
isPassword && /* @__PURE__ */ jsx25(
|
|
3096
3108
|
EyeButton,
|
package/dist/ui/index.js
CHANGED
|
@@ -1419,6 +1419,12 @@ var allowAutofill = (autoComplete) => ({
|
|
|
1419
1419
|
"data-form-type": void 0
|
|
1420
1420
|
});
|
|
1421
1421
|
|
|
1422
|
+
// src/ui/lib/numberInputWheel.ts
|
|
1423
|
+
var blurNumberInputOnWheel = (onWheel) => (e) => {
|
|
1424
|
+
if (e.currentTarget.type === "number") e.currentTarget.blur();
|
|
1425
|
+
onWheel == null ? void 0 : onWheel(e);
|
|
1426
|
+
};
|
|
1427
|
+
|
|
1422
1428
|
// src/ui/components/ui/Label.tsx
|
|
1423
1429
|
var RadixLabel = __toESM(require("@radix-ui/react-label"));
|
|
1424
1430
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
@@ -1450,12 +1456,12 @@ var Label = (_a) => {
|
|
|
1450
1456
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1451
1457
|
var Input = (0, import_react11.forwardRef)(
|
|
1452
1458
|
(_a, ref) => {
|
|
1453
|
-
var _b = _a, { label, required, id, className } = _b, props = __objRest(_b, ["label", "required", "id", "className"]);
|
|
1459
|
+
var _b = _a, { label, required, id, className, onWheel } = _b, props = __objRest(_b, ["label", "required", "id", "className", "onWheel"]);
|
|
1454
1460
|
const generatedId = (0, import_react11.useId)();
|
|
1455
1461
|
const inputId = label ? id != null ? id : generatedId : id;
|
|
1456
1462
|
const input = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1457
1463
|
"input",
|
|
1458
|
-
__spreadValues(__spreadProps(__spreadValues({
|
|
1464
|
+
__spreadProps(__spreadValues(__spreadProps(__spreadValues({
|
|
1459
1465
|
ref,
|
|
1460
1466
|
id: inputId,
|
|
1461
1467
|
required
|
|
@@ -1468,7 +1474,9 @@ var Input = (0, import_react11.forwardRef)(
|
|
|
1468
1474
|
"aria-invalid:border-red-900 aria-invalid:focus:border-red-900",
|
|
1469
1475
|
className
|
|
1470
1476
|
)
|
|
1471
|
-
}), props)
|
|
1477
|
+
}), props), {
|
|
1478
|
+
onWheel: blurNumberInputOnWheel(onWheel)
|
|
1479
|
+
})
|
|
1472
1480
|
);
|
|
1473
1481
|
if (!label) return input;
|
|
1474
1482
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Layout, { column: true, gap: 1.5, children: [
|
package/dist/ui/index.mjs
CHANGED
|
@@ -1226,6 +1226,12 @@ var allowAutofill = (autoComplete) => ({
|
|
|
1226
1226
|
"data-form-type": void 0
|
|
1227
1227
|
});
|
|
1228
1228
|
|
|
1229
|
+
// src/ui/lib/numberInputWheel.ts
|
|
1230
|
+
var blurNumberInputOnWheel = (onWheel) => (e) => {
|
|
1231
|
+
if (e.currentTarget.type === "number") e.currentTarget.blur();
|
|
1232
|
+
onWheel == null ? void 0 : onWheel(e);
|
|
1233
|
+
};
|
|
1234
|
+
|
|
1229
1235
|
// src/ui/components/ui/Label.tsx
|
|
1230
1236
|
import * as RadixLabel from "@radix-ui/react-label";
|
|
1231
1237
|
import { jsx as jsx14, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
@@ -1257,12 +1263,12 @@ var Label = (_a) => {
|
|
|
1257
1263
|
import { jsx as jsx15, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1258
1264
|
var Input = forwardRef11(
|
|
1259
1265
|
(_a, ref) => {
|
|
1260
|
-
var _b = _a, { label, required, id, className } = _b, props = __objRest(_b, ["label", "required", "id", "className"]);
|
|
1266
|
+
var _b = _a, { label, required, id, className, onWheel } = _b, props = __objRest(_b, ["label", "required", "id", "className", "onWheel"]);
|
|
1261
1267
|
const generatedId = useId();
|
|
1262
1268
|
const inputId = label ? id != null ? id : generatedId : id;
|
|
1263
1269
|
const input = /* @__PURE__ */ jsx15(
|
|
1264
1270
|
"input",
|
|
1265
|
-
__spreadValues(__spreadProps(__spreadValues({
|
|
1271
|
+
__spreadProps(__spreadValues(__spreadProps(__spreadValues({
|
|
1266
1272
|
ref,
|
|
1267
1273
|
id: inputId,
|
|
1268
1274
|
required
|
|
@@ -1275,7 +1281,9 @@ var Input = forwardRef11(
|
|
|
1275
1281
|
"aria-invalid:border-red-900 aria-invalid:focus:border-red-900",
|
|
1276
1282
|
className
|
|
1277
1283
|
)
|
|
1278
|
-
}), props)
|
|
1284
|
+
}), props), {
|
|
1285
|
+
onWheel: blurNumberInputOnWheel(onWheel)
|
|
1286
|
+
})
|
|
1279
1287
|
);
|
|
1280
1288
|
if (!label) return input;
|
|
1281
1289
|
return /* @__PURE__ */ jsxs4(Layout, { column: true, gap: 1.5, children: [
|