@noya-app/noya-designsystem 0.1.95 → 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.
@@ -7,18 +7,18 @@ $ tsup
7
7
  CJS Build start
8
8
  ESM Build start
9
9
  DTS Build start
10
- CJS dist/emojis.js 1.10 KB
11
- CJS dist/index.js 1.44 MB
12
- CJS dist/emojis.js.map 194.00 B
13
- CJS dist/index.js.map 2.81 MB
14
- CJS ⚡️ Build success in 7440ms
15
10
  ESM dist/emojis.mjs 300.00 B
16
11
  ESM dist/chunk-L6E2LZOL.mjs 2.02 KB
17
- ESM dist/index.mjs 1.40 MB
12
+ ESM dist/index.mjs 1.41 MB
18
13
  ESM dist/emojis.mjs.map 157.00 B
19
14
  ESM dist/chunk-L6E2LZOL.mjs.map 71.00 B
20
15
  ESM dist/index.mjs.map 2.81 MB
21
- ESM ⚡️ Build success in 7948ms
16
+ ESM ⚡️ Build success in 2372ms
17
+ CJS dist/emojis.js 1.10 KB
18
+ CJS dist/index.js 1.44 MB
19
+ CJS dist/emojis.js.map 194.00 B
20
+ CJS dist/index.js.map 2.82 MB
21
+ CJS ⚡️ 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 15734ms.
31
+ Done in 4066ms.
32
32
 
33
- DTS ⚡️ Build success in 83968ms
33
+ DTS ⚡️ Build success in 29591ms
34
34
  DTS dist/emojis.d.ts 43.00 B
35
- DTS dist/index.d.ts 131.91 KB
35
+ DTS dist/index.d.ts 132.42 KB
36
36
  DTS dist/emojis.d.mts 43.00 B
37
- DTS dist/index.d.mts 131.91 KB
37
+ DTS dist/index.d.mts 132.42 KB
@@ -0,0 +1 @@
1
+ $ tsc --noEmit
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @noya-app/noya-designsystem
2
2
 
3
+ ## 0.1.97
4
+
5
+ ### Patch Changes
6
+
7
+ - dbe70ef: Update packages
8
+
9
+ ## 0.1.96
10
+
11
+ ### Patch Changes
12
+
13
+ - 6fabd38: Update packages
14
+
3
15
  ## 0.1.95
4
16
 
5
17
  ### Patch Changes
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
- [startWidth, endWidth, size4, isFocused, handleFocusChange, id, randomId]
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("span", { ref: startRef, className: cx(startBaseStyles, startClassName) }, start),
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
  {