@nurix/ui-component-library 1.1.7-stage.138 → 1.1.7-stage.139
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 +16 -6
- package/dist/index.mjs +23 -13
- package/dist/styles.css +3 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15259,13 +15259,17 @@ function CompoundFilterSelect({
|
|
|
15259
15259
|
const { theme } = useTheme();
|
|
15260
15260
|
const themeClass = theme === "dark" ? "dark" : "light";
|
|
15261
15261
|
const [open, setOpen] = React40.useState(false);
|
|
15262
|
-
const
|
|
15263
|
-
|
|
15264
|
-
|
|
15265
|
-
return typeof document !== "undefined" ? (_a5 = document.querySelector(".lego-land")) != null ? _a5 : void 0 : void 0;
|
|
15266
|
-
},
|
|
15267
|
-
[]
|
|
15262
|
+
const sentinelRef = React40.useRef(null);
|
|
15263
|
+
const [container, setContainer] = React40.useState(
|
|
15264
|
+
void 0
|
|
15268
15265
|
);
|
|
15266
|
+
React40.useEffect(() => {
|
|
15267
|
+
var _a5, _b5;
|
|
15268
|
+
const el = (_a5 = sentinelRef.current) == null ? void 0 : _a5.closest(".lego-land");
|
|
15269
|
+
setContainer(
|
|
15270
|
+
el != null ? el : typeof document !== "undefined" ? (_b5 = document.querySelector(".lego-land")) != null ? _b5 : void 0 : void 0
|
|
15271
|
+
);
|
|
15272
|
+
}, []);
|
|
15269
15273
|
const selectedOption = options.find((opt) => opt.value === value);
|
|
15270
15274
|
const effectiveLeadingIcon = leadingIcon != null ? leadingIcon : selectedOption == null ? void 0 : selectedOption.icon;
|
|
15271
15275
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
@@ -15284,6 +15288,7 @@ function CompoundFilterSelect({
|
|
|
15284
15288
|
),
|
|
15285
15289
|
...props,
|
|
15286
15290
|
children: [
|
|
15291
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { ref: sentinelRef, style: { display: "contents" }, "aria-hidden": "true" }),
|
|
15287
15292
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(DropdownMenuPrimitive4.Root, { open, onOpenChange: setOpen, children: [
|
|
15288
15293
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DropdownMenuPrimitive4.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
15289
15294
|
"button",
|
|
@@ -15332,12 +15337,17 @@ function CompoundFilterSelect({
|
|
|
15332
15337
|
className: cn(
|
|
15333
15338
|
"bg-token-white flex flex-col gap-1 p-1 rounded-[12px] shadow-sm min-w-[160px]",
|
|
15334
15339
|
"relative z-50 font-sans outline-none",
|
|
15340
|
+
// Cap height + scroll: with many options (e.g. a country
|
|
15341
|
+
// code list) the menu would otherwise overflow the viewport
|
|
15342
|
+
// and be impossible to reach the bottom items.
|
|
15343
|
+
"max-h-[var(--radix-dropdown-menu-content-available-height,300px)] overflow-y-auto",
|
|
15335
15344
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
15336
15345
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
|
|
15337
15346
|
),
|
|
15338
15347
|
side: "bottom",
|
|
15339
15348
|
align: "start",
|
|
15340
15349
|
sideOffset: 6,
|
|
15350
|
+
collisionPadding: 8,
|
|
15341
15351
|
children: options.map((opt) => {
|
|
15342
15352
|
const isSelected = opt.value === value;
|
|
15343
15353
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
package/dist/index.mjs
CHANGED
|
@@ -15154,13 +15154,17 @@ function CompoundFilterSelect({
|
|
|
15154
15154
|
const { theme } = useTheme();
|
|
15155
15155
|
const themeClass = theme === "dark" ? "dark" : "light";
|
|
15156
15156
|
const [open, setOpen] = React40.useState(false);
|
|
15157
|
-
const
|
|
15158
|
-
|
|
15159
|
-
|
|
15160
|
-
return typeof document !== "undefined" ? (_a5 = document.querySelector(".lego-land")) != null ? _a5 : void 0 : void 0;
|
|
15161
|
-
},
|
|
15162
|
-
[]
|
|
15157
|
+
const sentinelRef = React40.useRef(null);
|
|
15158
|
+
const [container, setContainer] = React40.useState(
|
|
15159
|
+
void 0
|
|
15163
15160
|
);
|
|
15161
|
+
React40.useEffect(() => {
|
|
15162
|
+
var _a5, _b5;
|
|
15163
|
+
const el = (_a5 = sentinelRef.current) == null ? void 0 : _a5.closest(".lego-land");
|
|
15164
|
+
setContainer(
|
|
15165
|
+
el != null ? el : typeof document !== "undefined" ? (_b5 = document.querySelector(".lego-land")) != null ? _b5 : void 0 : void 0
|
|
15166
|
+
);
|
|
15167
|
+
}, []);
|
|
15164
15168
|
const selectedOption = options.find((opt) => opt.value === value);
|
|
15165
15169
|
const effectiveLeadingIcon = leadingIcon != null ? leadingIcon : selectedOption == null ? void 0 : selectedOption.icon;
|
|
15166
15170
|
return /* @__PURE__ */ jsxs27(
|
|
@@ -15179,6 +15183,7 @@ function CompoundFilterSelect({
|
|
|
15179
15183
|
),
|
|
15180
15184
|
...props,
|
|
15181
15185
|
children: [
|
|
15186
|
+
/* @__PURE__ */ jsx36("span", { ref: sentinelRef, style: { display: "contents" }, "aria-hidden": "true" }),
|
|
15182
15187
|
/* @__PURE__ */ jsxs27(DropdownMenuPrimitive4.Root, { open, onOpenChange: setOpen, children: [
|
|
15183
15188
|
/* @__PURE__ */ jsx36(DropdownMenuPrimitive4.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs27(
|
|
15184
15189
|
"button",
|
|
@@ -15227,12 +15232,17 @@ function CompoundFilterSelect({
|
|
|
15227
15232
|
className: cn(
|
|
15228
15233
|
"bg-token-white flex flex-col gap-1 p-1 rounded-[12px] shadow-sm min-w-[160px]",
|
|
15229
15234
|
"relative z-50 font-sans outline-none",
|
|
15235
|
+
// Cap height + scroll: with many options (e.g. a country
|
|
15236
|
+
// code list) the menu would otherwise overflow the viewport
|
|
15237
|
+
// and be impossible to reach the bottom items.
|
|
15238
|
+
"max-h-[var(--radix-dropdown-menu-content-available-height,300px)] overflow-y-auto",
|
|
15230
15239
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
15231
15240
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
|
|
15232
15241
|
),
|
|
15233
15242
|
side: "bottom",
|
|
15234
15243
|
align: "start",
|
|
15235
15244
|
sideOffset: 6,
|
|
15245
|
+
collisionPadding: 8,
|
|
15236
15246
|
children: options.map((opt) => {
|
|
15237
15247
|
const isSelected = opt.value === value;
|
|
15238
15248
|
return /* @__PURE__ */ jsxs27(
|
|
@@ -16167,7 +16177,7 @@ var MONACO_OPTIONS_DIALOG = {
|
|
|
16167
16177
|
|
|
16168
16178
|
// src/json-editor/useJsonEditor.tsx
|
|
16169
16179
|
var import_ajv = __toESM(require_ajv());
|
|
16170
|
-
import { useCallback as useCallback12, useEffect as
|
|
16180
|
+
import { useCallback as useCallback12, useEffect as useEffect14, useId, useRef as useRef10, useState as useState19 } from "react";
|
|
16171
16181
|
|
|
16172
16182
|
// src/json-editor/useJsonEditorErrorStore.ts
|
|
16173
16183
|
var state = {
|
|
@@ -16223,16 +16233,16 @@ function useJsonEditor({
|
|
|
16223
16233
|
const editorKey = useId();
|
|
16224
16234
|
const registerError = useJsonEditorErrorStore((s) => s.registerError);
|
|
16225
16235
|
const clearError = useJsonEditorErrorStore((s) => s.clearError);
|
|
16226
|
-
const editorRef =
|
|
16227
|
-
const monacoRef =
|
|
16228
|
-
const expandedEditorRef =
|
|
16236
|
+
const editorRef = useRef10(null);
|
|
16237
|
+
const monacoRef = useRef10(null);
|
|
16238
|
+
const expandedEditorRef = useRef10(null);
|
|
16229
16239
|
const [errors, setErrors] = useState19([]);
|
|
16230
16240
|
const [copied, setCopied] = useState19(false);
|
|
16231
16241
|
const [monacoReady, setMonacoReady] = useState19(false);
|
|
16232
16242
|
const resolvedNodeId = nodeId != null ? nodeId : `_unbound_${editorKey}`;
|
|
16233
|
-
const resolvedNodeIdRef =
|
|
16243
|
+
const resolvedNodeIdRef = useRef10(resolvedNodeId);
|
|
16234
16244
|
resolvedNodeIdRef.current = resolvedNodeId;
|
|
16235
|
-
|
|
16245
|
+
useEffect14(
|
|
16236
16246
|
() => () => {
|
|
16237
16247
|
clearError(resolvedNodeIdRef.current, editorKey);
|
|
16238
16248
|
},
|
|
@@ -16357,7 +16367,7 @@ function useJsonEditor({
|
|
|
16357
16367
|
},
|
|
16358
16368
|
[normalizeInput, onChange, validateJson]
|
|
16359
16369
|
);
|
|
16360
|
-
|
|
16370
|
+
useEffect14(() => {
|
|
16361
16371
|
const normalized = normalizeInput(value);
|
|
16362
16372
|
if (normalized !== value) onChange(normalized);
|
|
16363
16373
|
validateJson(normalized);
|
package/dist/styles.css
CHANGED
|
@@ -646,6 +646,9 @@
|
|
|
646
646
|
.lego-land .max-h-\[507px\] {
|
|
647
647
|
max-height: 507px;
|
|
648
648
|
}
|
|
649
|
+
.lego-land .max-h-\[var\(--radix-dropdown-menu-content-available-height\,300px\)\] {
|
|
650
|
+
max-height: var(--radix-dropdown-menu-content-available-height,300px);
|
|
651
|
+
}
|
|
649
652
|
.lego-land .min-h-0 {
|
|
650
653
|
min-height: calc(var(--spacing) * 0);
|
|
651
654
|
}
|