@parallelworks/ui 0.48.0 → 0.49.0

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,6 +7,8 @@ export interface OneTimeCodeInputProps extends Omit<OTPField.Root.Props, 'classN
7
7
  size?: FieldBoxSize | undefined;
8
8
  'aria-invalid'?: boolean | undefined;
9
9
  'aria-required'?: boolean | undefined;
10
+ /** Focuses the first box on mount, for a page or dialog whose only task is entering the code. */
11
+ autoFocus?: boolean | undefined;
10
12
  /** On the row of boxes: its margin or gap. */
11
13
  className?: string | undefined;
12
14
  }
@@ -20,4 +22,4 @@ export interface OneTimeCodeInputProps extends Omit<OTPField.Root.Props, 'classN
20
22
  * Name it with a Field or a `<label>` for its `id`, which is the first box's, or with
21
23
  * `aria-label`.
22
24
  */
23
- export declare function OneTimeCodeInput({ length, size, className, 'aria-label': ariaLabel, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, ...rootProps }: OneTimeCodeInputProps): import("react").JSX.Element;
25
+ export declare function OneTimeCodeInput({ length, size, className, 'aria-label': ariaLabel, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, autoFocus, ...rootProps }: OneTimeCodeInputProps): import("react").JSX.Element;
@@ -15,7 +15,7 @@ import { OTPField } from "@base-ui/react/otp-field";
15
15
  * Name it with a Field or a `<label>` for its `id`, which is the first box's, or with
16
16
  * `aria-label`.
17
17
  */
18
- function OneTimeCodeInput({ length = 6, size = "md", className, "aria-label": ariaLabel, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, ...rootProps }) {
18
+ function OneTimeCodeInput({ length = 6, size = "md", className, "aria-label": ariaLabel, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, autoFocus, ...rootProps }) {
19
19
  const t = useStrings().oneTimeCode;
20
20
  const labelId = useId();
21
21
  return /* @__PURE__ */ jsxs(OTPField.Root, {
@@ -31,6 +31,7 @@ function OneTimeCodeInput({ length = 6, size = "md", className, "aria-label": ar
31
31
  ...index > 0 ? { "aria-label": t.character(index + 1, length) } : ariaLabel ? { "aria-labelledby": labelId } : {},
32
32
  ...ariaInvalid && { "aria-invalid": true },
33
33
  ...ariaRequired && { "aria-required": true },
34
+ autoFocus: autoFocus && index === 0,
34
35
  className: cx(fieldBox({ size }), "px-0 text-center font-mono tabular-nums", size === "sm" ? "w-7" : "w-9 text-base")
35
36
  }, index))]
36
37
  });
@@ -2,12 +2,12 @@
2
2
  var monacoEnvironment = { getWorker(_moduleId, label) {
3
3
  if (label === "json") return new Worker(new URL(
4
4
  /* @vite-ignore */
5
- new URL("../assets/json.worker-Dqgjpq9F.js", import.meta.url).href,
5
+ new URL("../assets/json.worker-BKkHJbNB.js", import.meta.url).href,
6
6
  "" + import.meta.url
7
7
  ), { type: "module" });
8
8
  return new Worker(new URL(
9
9
  /* @vite-ignore */
10
- new URL("../assets/editor.worker-DfmPPyOL.js", import.meta.url).href,
10
+ new URL("../assets/editor.worker-Cc3TfJ_-.js", import.meta.url).href,
11
11
  "" + import.meta.url
12
12
  ), { type: "module" });
13
13
  } };
@@ -27,7 +27,7 @@ function setupMonacoWorkers() {
27
27
  function createYamlWorker() {
28
28
  return new Worker(new URL(
29
29
  /* @vite-ignore */
30
- new URL("../assets/yaml.worker-DLx0whrM.js", import.meta.url).href,
30
+ new URL("../assets/yaml.worker-k9AdOqzf.js", import.meta.url).href,
31
31
  "" + import.meta.url
32
32
  ), { type: "module" });
33
33
  }
@@ -699,7 +699,7 @@ function FileExplorer({ storages, onRefresh, refreshKey, onOpenFile, showUserHie
699
699
  }) : /* @__PURE__ */ jsx("button", {
700
700
  type: "button",
701
701
  onClick: () => handleSelectTreeItem(node.path, node),
702
- className: "max-w-[16rem] shrink-0 cursor-pointer truncate text-(--theme-muted-text-color) transition-colors hover:text-(--theme-app)",
702
+ className: "max-w-[16rem] cursor-pointer truncate text-(--theme-muted-text-color) transition-colors hover:text-(--theme-app)",
703
703
  children: label
704
704
  })]
705
705
  }, node.path);
@@ -1017,7 +1017,7 @@ function FileExplorer({ storages, onRefresh, refreshKey, onOpenFile, showUserHie
1017
1017
  })]
1018
1018
  }) : !selectedNode ? /* @__PURE__ */ jsx(NoFileSelectedPreview, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
1019
1019
  /* @__PURE__ */ jsxs("div", {
1020
- className: "flex items-center justify-between gap-3 px-4 h-12 shrink-0 border-b theme-border",
1020
+ className: "@container flex items-center justify-between gap-3 px-4 h-12 shrink-0 border-b theme-border",
1021
1021
  children: [renderBreadcrumb(), /* @__PURE__ */ jsxs("div", {
1022
1022
  className: "flex shrink-0 items-center gap-2",
1023
1023
  children: [
@@ -1064,7 +1064,7 @@ function FileExplorer({ storages, onRefresh, refreshKey, onOpenFile, showUserHie
1064
1064
  disabled: selectedNode.type === "file" || !selectedNode.storageId,
1065
1065
  onClick: () => setCreateFolderTarget(selectedNode),
1066
1066
  children: /* @__PURE__ */ jsx("span", {
1067
- className: "hidden md:inline",
1067
+ className: "hidden @4xl:inline",
1068
1068
  children: t.createFolder.action
1069
1069
  })
1070
1070
  }),
@@ -1078,7 +1078,7 @@ function FileExplorer({ storages, onRefresh, refreshKey, onOpenFile, showUserHie
1078
1078
  children: [
1079
1079
  /* @__PURE__ */ jsx(UploadIcon, {}),
1080
1080
  /* @__PURE__ */ jsx("span", {
1081
- className: "hidden md:inline",
1081
+ className: "hidden @4xl:inline",
1082
1082
  children: t.chrome.upload
1083
1083
  }),
1084
1084
  /* @__PURE__ */ jsx(ChevronDownIcon, {})
@@ -1104,7 +1104,7 @@ function FileExplorer({ storages, onRefresh, refreshKey, onOpenFile, showUserHie
1104
1104
  children: [
1105
1105
  /* @__PURE__ */ jsx(DownloadIcon, {}),
1106
1106
  /* @__PURE__ */ jsx("span", {
1107
- className: "hidden md:inline",
1107
+ className: "hidden @4xl:inline",
1108
1108
  children: common.download
1109
1109
  }),
1110
1110
  /* @__PURE__ */ jsx(ChevronDownIcon, {})
@@ -1140,7 +1140,7 @@ function FileExplorer({ storages, onRefresh, refreshKey, onOpenFile, showUserHie
1140
1140
  disabled: !selectedNode.storageId,
1141
1141
  onClick: () => setAccessDrawerOpen(true),
1142
1142
  children: /* @__PURE__ */ jsx("span", {
1143
- className: "hidden md:inline",
1143
+ className: "hidden @4xl:inline",
1144
1144
  children: t.chrome.manageAccess
1145
1145
  })
1146
1146
  }),
@@ -1152,7 +1152,7 @@ function FileExplorer({ storages, onRefresh, refreshKey, onOpenFile, showUserHie
1152
1152
  disabled: checkedItems.size === 0 && selectedNode.type !== "file" || !selectedNode.storageId,
1153
1153
  onClick: onDeleteClick,
1154
1154
  children: /* @__PURE__ */ jsx("span", {
1155
- className: "hidden md:inline",
1155
+ className: "hidden @4xl:inline",
1156
1156
  children: common.delete
1157
1157
  })
1158
1158
  })