@noya-app/noya-designsystem 0.1.96 → 0.1.97
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/.turbo/turbo-build.log +11 -11
- package/CHANGELOG.md +6 -0
- package/dist/index.d.mts +11 -3
- package/dist/index.d.ts +11 -3
- package/dist/index.js +26 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/InputField.tsx +42 -5
package/.turbo/turbo-build.log
CHANGED
|
@@ -7,18 +7,18 @@ $ tsup
|
|
|
7
7
|
[34mCJS[39m Build start
|
|
8
8
|
[34mESM[39m Build start
|
|
9
9
|
[34mDTS[39m Build start
|
|
10
|
-
[32mCJS[39m [1mdist/emojis.js [22m[32m1.10 KB[39m
|
|
11
|
-
[32mCJS[39m [1mdist/index.js [22m[32m1.44 MB[39m
|
|
12
|
-
[32mCJS[39m [1mdist/emojis.js.map [22m[32m194.00 B[39m
|
|
13
|
-
[32mCJS[39m [1mdist/index.js.map [22m[32m2.81 MB[39m
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in 8808ms
|
|
15
10
|
[32mESM[39m [1mdist/emojis.mjs [22m[32m300.00 B[39m
|
|
16
11
|
[32mESM[39m [1mdist/chunk-L6E2LZOL.mjs [22m[32m2.02 KB[39m
|
|
17
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m1.
|
|
12
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m1.41 MB[39m
|
|
18
13
|
[32mESM[39m [1mdist/emojis.mjs.map [22m[32m157.00 B[39m
|
|
19
14
|
[32mESM[39m [1mdist/chunk-L6E2LZOL.mjs.map [22m[32m71.00 B[39m
|
|
20
15
|
[32mESM[39m [1mdist/index.mjs.map [22m[32m2.81 MB[39m
|
|
21
|
-
[32mESM[39m ⚡️ Build success in
|
|
16
|
+
[32mESM[39m ⚡️ Build success in 2372ms
|
|
17
|
+
[32mCJS[39m [1mdist/emojis.js [22m[32m1.10 KB[39m
|
|
18
|
+
[32mCJS[39m [1mdist/index.js [22m[32m1.44 MB[39m
|
|
19
|
+
[32mCJS[39m [1mdist/emojis.js.map [22m[32m194.00 B[39m
|
|
20
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m2.82 MB[39m
|
|
21
|
+
[32mCJS[39m ⚡️ Build success in 2372ms
|
|
22
22
|
Browserslist: caniuse-lite is outdated. Please run:
|
|
23
23
|
npx update-browserslist-db@latest
|
|
24
24
|
Why you should do it regularly: https://github.com/browserslist/update-db#readme
|
|
@@ -28,10 +28,10 @@ Browserslist: browsers data (caniuse-lite) is 16 months old. Please run:
|
|
|
28
28
|
|
|
29
29
|
Rebuilding...
|
|
30
30
|
|
|
31
|
-
Done in
|
|
31
|
+
Done in 4066ms.
|
|
32
32
|
|
|
33
|
-
[32mDTS[39m ⚡️ Build success in
|
|
33
|
+
[32mDTS[39m ⚡️ Build success in 29591ms
|
|
34
34
|
[32mDTS[39m [1mdist/emojis.d.ts [22m[32m43.00 B[39m
|
|
35
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
35
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m132.42 KB[39m
|
|
36
36
|
[32mDTS[39m [1mdist/emojis.d.mts [22m[32m43.00 B[39m
|
|
37
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[
|
|
37
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m132.42 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1370,11 +1370,15 @@ type InputFieldContextValue = {
|
|
|
1370
1370
|
startRef: ForwardedRef<HTMLSpanElement>;
|
|
1371
1371
|
endRef: ForwardedRef<HTMLSpanElement>;
|
|
1372
1372
|
endWidth?: number;
|
|
1373
|
-
} & Pick<InputFieldRootProps, "endWidth" | "startWidth" | "size" | "id">;
|
|
1373
|
+
} & Pick<InputFieldRootProps, "endWidth" | "startWidth" | "startInset" | "size" | "id">;
|
|
1374
1374
|
declare const useInputFieldContext: () => InputFieldContextValue;
|
|
1375
|
-
declare const getFieldSpacing: ({ endWidth, startWidth, variant, }: {
|
|
1375
|
+
declare const getFieldSpacing: ({ endWidth, startWidth, startInset, variant, }: {
|
|
1376
1376
|
endWidth?: number;
|
|
1377
1377
|
startWidth?: number;
|
|
1378
|
+
/** Custom left offset (px) of the start slot; when set, the input's left
|
|
1379
|
+
* padding is derived from it (inset + start width + 5px gap, matching the
|
|
1380
|
+
* inspector's 21px-swatch-at-3px reference geometry). */
|
|
1381
|
+
startInset?: number;
|
|
1378
1382
|
variant?: InputFieldVariant;
|
|
1379
1383
|
}) => {
|
|
1380
1384
|
paddingLeft: string;
|
|
@@ -1419,6 +1423,10 @@ interface InputFieldRootProps {
|
|
|
1419
1423
|
label?: ReactNode;
|
|
1420
1424
|
width?: number;
|
|
1421
1425
|
startWidth?: number;
|
|
1426
|
+
/** Left offset (px) of the start slot, replacing the default 6px — e.g. 3
|
|
1427
|
+
* for the inspector's swatch-in-field geometry. Also tightens the input's
|
|
1428
|
+
* derived left padding (see getFieldSpacing). */
|
|
1429
|
+
startInset?: number;
|
|
1422
1430
|
endWidth?: number;
|
|
1423
1431
|
/** @default medium */
|
|
1424
1432
|
size?: InputSize;
|
|
@@ -1434,7 +1442,7 @@ interface InputFieldRootProps {
|
|
|
1434
1442
|
style?: React__default.CSSProperties;
|
|
1435
1443
|
className?: string;
|
|
1436
1444
|
}
|
|
1437
|
-
declare function InputFieldRoot({ id, children, width, sideOffset, startWidth: startWidthProp, endWidth: endWidthProp, size, renderPopoverContent, onFocusChange, style, className, start, end, startClassName, endClassName, label: labelProp, }: InputFieldRootProps): React__default.JSX.Element;
|
|
1445
|
+
declare function InputFieldRoot({ id, children, width, sideOffset, startWidth: startWidthProp, startInset, endWidth: endWidthProp, size, renderPopoverContent, onFocusChange, style, className, start, end, startClassName, endClassName, label: labelProp, }: InputFieldRootProps): React__default.JSX.Element;
|
|
1438
1446
|
type InputFieldProps = InputFieldRootProps & InputFieldInputProps;
|
|
1439
1447
|
declare const InputField: React__default.ForwardRefExoticComponent<InputFieldProps & React__default.RefAttributes<HTMLInputElement>> & {
|
|
1440
1448
|
readonly Root: React__default.MemoExoticComponent<typeof InputFieldRoot>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1370,11 +1370,15 @@ type InputFieldContextValue = {
|
|
|
1370
1370
|
startRef: ForwardedRef<HTMLSpanElement>;
|
|
1371
1371
|
endRef: ForwardedRef<HTMLSpanElement>;
|
|
1372
1372
|
endWidth?: number;
|
|
1373
|
-
} & Pick<InputFieldRootProps, "endWidth" | "startWidth" | "size" | "id">;
|
|
1373
|
+
} & Pick<InputFieldRootProps, "endWidth" | "startWidth" | "startInset" | "size" | "id">;
|
|
1374
1374
|
declare const useInputFieldContext: () => InputFieldContextValue;
|
|
1375
|
-
declare const getFieldSpacing: ({ endWidth, startWidth, variant, }: {
|
|
1375
|
+
declare const getFieldSpacing: ({ endWidth, startWidth, startInset, variant, }: {
|
|
1376
1376
|
endWidth?: number;
|
|
1377
1377
|
startWidth?: number;
|
|
1378
|
+
/** Custom left offset (px) of the start slot; when set, the input's left
|
|
1379
|
+
* padding is derived from it (inset + start width + 5px gap, matching the
|
|
1380
|
+
* inspector's 21px-swatch-at-3px reference geometry). */
|
|
1381
|
+
startInset?: number;
|
|
1378
1382
|
variant?: InputFieldVariant;
|
|
1379
1383
|
}) => {
|
|
1380
1384
|
paddingLeft: string;
|
|
@@ -1419,6 +1423,10 @@ interface InputFieldRootProps {
|
|
|
1419
1423
|
label?: ReactNode;
|
|
1420
1424
|
width?: number;
|
|
1421
1425
|
startWidth?: number;
|
|
1426
|
+
/** Left offset (px) of the start slot, replacing the default 6px — e.g. 3
|
|
1427
|
+
* for the inspector's swatch-in-field geometry. Also tightens the input's
|
|
1428
|
+
* derived left padding (see getFieldSpacing). */
|
|
1429
|
+
startInset?: number;
|
|
1422
1430
|
endWidth?: number;
|
|
1423
1431
|
/** @default medium */
|
|
1424
1432
|
size?: InputSize;
|
|
@@ -1434,7 +1442,7 @@ interface InputFieldRootProps {
|
|
|
1434
1442
|
style?: React__default.CSSProperties;
|
|
1435
1443
|
className?: string;
|
|
1436
1444
|
}
|
|
1437
|
-
declare function InputFieldRoot({ id, children, width, sideOffset, startWidth: startWidthProp, endWidth: endWidthProp, size, renderPopoverContent, onFocusChange, style, className, start, end, startClassName, endClassName, label: labelProp, }: InputFieldRootProps): React__default.JSX.Element;
|
|
1445
|
+
declare function InputFieldRoot({ id, children, width, sideOffset, startWidth: startWidthProp, startInset, endWidth: endWidthProp, size, renderPopoverContent, onFocusChange, style, className, start, end, startClassName, endClassName, label: labelProp, }: InputFieldRootProps): React__default.JSX.Element;
|
|
1438
1446
|
type InputFieldProps = InputFieldRootProps & InputFieldInputProps;
|
|
1439
1447
|
declare const InputField: React__default.ForwardRefExoticComponent<InputFieldProps & React__default.RefAttributes<HTMLInputElement>> & {
|
|
1440
1448
|
readonly Root: React__default.MemoExoticComponent<typeof InputFieldRoot>;
|
package/dist/index.js
CHANGED
|
@@ -21953,9 +21953,10 @@ var noop6 = () => {
|
|
|
21953
21953
|
var getFieldSpacing = ({
|
|
21954
21954
|
endWidth = 0,
|
|
21955
21955
|
startWidth = 0,
|
|
21956
|
+
startInset,
|
|
21956
21957
|
variant
|
|
21957
21958
|
}) => ({
|
|
21958
|
-
paddingLeft: `${variant === "bare" ? startWidth : startWidth ? startWidth + 12 : 8}px`,
|
|
21959
|
+
paddingLeft: `${variant === "bare" ? startWidth : startInset !== void 0 && startWidth ? startInset + startWidth + 5 : startWidth ? startWidth + 12 : 8}px`,
|
|
21959
21960
|
paddingRight: `${variant === "bare" ? endWidth : endWidth ? endWidth + 12 : 8}px`
|
|
21960
21961
|
});
|
|
21961
21962
|
var InputFieldDropdownMenu = memoGeneric(function InputFieldDropdownMenu2({ id, items, onSelect, children }) {
|
|
@@ -22046,7 +22047,7 @@ var InputElement = (0, import_react34.forwardRef)(
|
|
|
22046
22047
|
attachInputRef = true,
|
|
22047
22048
|
...props
|
|
22048
22049
|
}, forwardedRef) => {
|
|
22049
|
-
const { endWidth, inputRef, size: size4, id, startWidth } = useInputFieldContext();
|
|
22050
|
+
const { endWidth, inputRef, size: size4, id, startWidth, startInset } = useInputFieldContext();
|
|
22050
22051
|
const ref = useMergeRefs(
|
|
22051
22052
|
attachInputRef ? inputRef : null,
|
|
22052
22053
|
forwardedRef
|
|
@@ -22054,7 +22055,8 @@ var InputElement = (0, import_react34.forwardRef)(
|
|
|
22054
22055
|
const spacingStyles = getFieldSpacing({
|
|
22055
22056
|
endWidth,
|
|
22056
22057
|
variant: $variant,
|
|
22057
|
-
startWidth
|
|
22058
|
+
startWidth,
|
|
22059
|
+
startInset
|
|
22058
22060
|
});
|
|
22059
22061
|
const inputClassName = cx(
|
|
22060
22062
|
"n-flex n-w-0 n-flex-1 n-relative n-border-0 n-outline-none n-min-w-0 n-self-stretch n-rounded n-bg-input-background focus:n-ring-2 focus:n-ring-primary placeholder:n-text-text-disabled n-transition-[box-shadow]",
|
|
@@ -22236,6 +22238,7 @@ function InputFieldRoot({
|
|
|
22236
22238
|
width,
|
|
22237
22239
|
sideOffset = 3,
|
|
22238
22240
|
startWidth: startWidthProp,
|
|
22241
|
+
startInset,
|
|
22239
22242
|
endWidth: endWidthProp,
|
|
22240
22243
|
size: size4 = "medium",
|
|
22241
22244
|
renderPopoverContent,
|
|
@@ -22273,6 +22276,7 @@ function InputFieldRoot({
|
|
|
22273
22276
|
const contextValue = (0, import_react34.useMemo)(
|
|
22274
22277
|
() => ({
|
|
22275
22278
|
startWidth,
|
|
22279
|
+
startInset,
|
|
22276
22280
|
endWidth,
|
|
22277
22281
|
inputRef,
|
|
22278
22282
|
startRef,
|
|
@@ -22282,7 +22286,16 @@ function InputFieldRoot({
|
|
|
22282
22286
|
onFocusChange: handleFocusChange,
|
|
22283
22287
|
id: id ?? randomId
|
|
22284
22288
|
}),
|
|
22285
|
-
[
|
|
22289
|
+
[
|
|
22290
|
+
startWidth,
|
|
22291
|
+
startInset,
|
|
22292
|
+
endWidth,
|
|
22293
|
+
size4,
|
|
22294
|
+
isFocused,
|
|
22295
|
+
handleFocusChange,
|
|
22296
|
+
id,
|
|
22297
|
+
randomId
|
|
22298
|
+
]
|
|
22286
22299
|
);
|
|
22287
22300
|
const insetLabel = (0, import_react34.useMemo)(
|
|
22288
22301
|
() => /* @__PURE__ */ import_react34.default.createElement(Label, { htmlFor: id, className: "!n-text-text-disabled" }, labelProp ?? label),
|
|
@@ -22297,7 +22310,15 @@ function InputFieldRoot({
|
|
|
22297
22310
|
className
|
|
22298
22311
|
},
|
|
22299
22312
|
children,
|
|
22300
|
-
start && /* @__PURE__ */ import_react34.default.createElement(
|
|
22313
|
+
start && /* @__PURE__ */ import_react34.default.createElement(
|
|
22314
|
+
"span",
|
|
22315
|
+
{
|
|
22316
|
+
ref: startRef,
|
|
22317
|
+
className: cx(startBaseStyles, startClassName),
|
|
22318
|
+
style: startInset !== void 0 ? { left: startInset } : void 0
|
|
22319
|
+
},
|
|
22320
|
+
start
|
|
22321
|
+
),
|
|
22301
22322
|
(end || label) && /* @__PURE__ */ import_react34.default.createElement(
|
|
22302
22323
|
"span",
|
|
22303
22324
|
{
|