@uniformdev/design-system 19.155.0 → 19.157.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.
- package/dist/esm/index.js +38 -23
- package/dist/index.d.mts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +254 -240
- package/package.json +4 -4
package/dist/esm/index.js
CHANGED
|
@@ -15475,8 +15475,10 @@ var details = css54`
|
|
|
15475
15475
|
}
|
|
15476
15476
|
`;
|
|
15477
15477
|
var detailsContent = css54`
|
|
15478
|
+
position: relative;
|
|
15478
15479
|
animation: ${fadeInRtl} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
15479
15480
|
will-change: height;
|
|
15481
|
+
z-index: 1;
|
|
15480
15482
|
`;
|
|
15481
15483
|
var detailsContentIndented = css54`
|
|
15482
15484
|
margin-left: calc(1.25rem / 2);
|
|
@@ -17518,8 +17520,10 @@ import { useCallback as useCallback8 } from "react";
|
|
|
17518
17520
|
import {
|
|
17519
17521
|
Popover as AriakitPopover,
|
|
17520
17522
|
PopoverDisclosure as PopoverDisclosure2,
|
|
17521
|
-
PopoverProvider
|
|
17523
|
+
PopoverProvider,
|
|
17524
|
+
usePopoverStore
|
|
17522
17525
|
} from "@ariakit/react";
|
|
17526
|
+
import { useEffect as useEffect11 } from "react";
|
|
17523
17527
|
import { Fragment as Fragment13, jsx as jsx94, jsxs as jsxs61 } from "@emotion/react/jsx-runtime";
|
|
17524
17528
|
var Popover3 = ({
|
|
17525
17529
|
iconColor = "action",
|
|
@@ -17532,9 +17536,14 @@ var Popover3 = ({
|
|
|
17532
17536
|
trigger: trigger2,
|
|
17533
17537
|
children,
|
|
17534
17538
|
baseId,
|
|
17539
|
+
onInit,
|
|
17535
17540
|
...otherProps
|
|
17536
17541
|
}) => {
|
|
17537
|
-
|
|
17542
|
+
const popover2 = usePopoverStore({ placement });
|
|
17543
|
+
useEffect11(() => {
|
|
17544
|
+
onInit == null ? void 0 : onInit({ store: popover2 });
|
|
17545
|
+
}, [popover2]);
|
|
17546
|
+
return /* @__PURE__ */ jsxs61(PopoverProvider, { store: popover2, children: [
|
|
17538
17547
|
/* @__PURE__ */ jsx94(
|
|
17539
17548
|
PopoverDisclosure2,
|
|
17540
17549
|
{
|
|
@@ -17707,7 +17716,7 @@ var MediaCard = ({
|
|
|
17707
17716
|
|
|
17708
17717
|
// src/components/Modal/Modal.tsx
|
|
17709
17718
|
import { CgClose as CgClose4 } from "@react-icons/all-files/cg/CgClose";
|
|
17710
|
-
import React20, { useEffect as
|
|
17719
|
+
import React20, { useEffect as useEffect12, useRef as useRef6 } from "react";
|
|
17711
17720
|
|
|
17712
17721
|
// src/components/Modal/Modal.styles.ts
|
|
17713
17722
|
import { css as css76 } from "@emotion/react";
|
|
@@ -17821,7 +17830,7 @@ var Modal = React20.forwardRef(
|
|
|
17821
17830
|
},
|
|
17822
17831
|
shortcut: "escape"
|
|
17823
17832
|
});
|
|
17824
|
-
|
|
17833
|
+
useEffect12(() => {
|
|
17825
17834
|
var _a;
|
|
17826
17835
|
if (!document.contains(dialogRef.current)) {
|
|
17827
17836
|
console.warn(
|
|
@@ -18876,6 +18885,8 @@ var ParameterMultiSelectInner = (props) => {
|
|
|
18876
18885
|
return /* @__PURE__ */ jsx110(
|
|
18877
18886
|
InputComboBox,
|
|
18878
18887
|
{
|
|
18888
|
+
menuPortalTarget: document.body,
|
|
18889
|
+
menuPlacement: "auto",
|
|
18879
18890
|
...props,
|
|
18880
18891
|
isMulti: true,
|
|
18881
18892
|
isClearable: (_a = props.isClearable) != null ? _a : false,
|
|
@@ -18883,6 +18894,10 @@ var ParameterMultiSelectInner = (props) => {
|
|
|
18883
18894
|
"aria-label": label,
|
|
18884
18895
|
classNamePrefix: "parameter-multi-select-combobox",
|
|
18885
18896
|
styles: {
|
|
18897
|
+
menuPortal: (base) => ({
|
|
18898
|
+
...base,
|
|
18899
|
+
zIndex: "var(--z-tooltip)"
|
|
18900
|
+
}),
|
|
18886
18901
|
valueContainer: (base) => ({
|
|
18887
18902
|
...base,
|
|
18888
18903
|
padding: "0 var(--spacing-sm)",
|
|
@@ -19108,7 +19123,7 @@ var getLabelForElement = (type) => {
|
|
|
19108
19123
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
19109
19124
|
import { deepEqual as deepEqual2 } from "fast-equals";
|
|
19110
19125
|
import { ParagraphNode as ParagraphNode2 } from "lexical";
|
|
19111
|
-
import { useEffect as
|
|
19126
|
+
import { useEffect as useEffect17, useRef as useRef8 } from "react";
|
|
19112
19127
|
|
|
19113
19128
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
19114
19129
|
import { CodeNode } from "@lexical/code";
|
|
@@ -19129,10 +19144,10 @@ CustomCodeNode.importDOM = function() {
|
|
|
19129
19144
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
19130
19145
|
import { mergeRegister } from "@lexical/utils";
|
|
19131
19146
|
import { ParagraphNode } from "lexical";
|
|
19132
|
-
import { useEffect as
|
|
19147
|
+
import { useEffect as useEffect13 } from "react";
|
|
19133
19148
|
function DisableStylesPlugin() {
|
|
19134
19149
|
const [editor] = useLexicalComposerContext();
|
|
19135
|
-
|
|
19150
|
+
useEffect13(() => {
|
|
19136
19151
|
return mergeRegister(
|
|
19137
19152
|
// Disable text alignment on paragraph nodes
|
|
19138
19153
|
editor.registerNodeTransform(ParagraphNode, (node) => {
|
|
@@ -19341,7 +19356,7 @@ import {
|
|
|
19341
19356
|
ElementNode as ElementNode2,
|
|
19342
19357
|
FOCUS_COMMAND
|
|
19343
19358
|
} from "lexical";
|
|
19344
|
-
import { useCallback as useCallback9, useEffect as
|
|
19359
|
+
import { useCallback as useCallback9, useEffect as useEffect14, useRef as useRef7, useState as useState14 } from "react";
|
|
19345
19360
|
|
|
19346
19361
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
19347
19362
|
import { $isAtNodeEnd } from "@lexical/selection";
|
|
@@ -19688,13 +19703,13 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
19688
19703
|
const linkPopoverElRef = useRef7(null);
|
|
19689
19704
|
const [isEditorFocused, setIsEditorFocused] = useState14(false);
|
|
19690
19705
|
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = useState14(false);
|
|
19691
|
-
|
|
19706
|
+
useEffect14(() => {
|
|
19692
19707
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
19693
19708
|
setLinkPopoverState(void 0);
|
|
19694
19709
|
return;
|
|
19695
19710
|
}
|
|
19696
19711
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
19697
|
-
|
|
19712
|
+
useEffect14(() => {
|
|
19698
19713
|
if (!editor.hasNodes([LinkNode])) {
|
|
19699
19714
|
throw new Error("LinkNode not registered on editor");
|
|
19700
19715
|
}
|
|
@@ -19795,7 +19810,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
19795
19810
|
}
|
|
19796
19811
|
});
|
|
19797
19812
|
}, [editor]);
|
|
19798
|
-
|
|
19813
|
+
useEffect14(() => {
|
|
19799
19814
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
19800
19815
|
requestAnimationFrame(() => {
|
|
19801
19816
|
editorState.read(() => {
|
|
@@ -19887,7 +19902,7 @@ import {
|
|
|
19887
19902
|
COMMAND_PRIORITY_CRITICAL,
|
|
19888
19903
|
INDENT_CONTENT_COMMAND
|
|
19889
19904
|
} from "lexical";
|
|
19890
|
-
import { useEffect as
|
|
19905
|
+
import { useEffect as useEffect15 } from "react";
|
|
19891
19906
|
import { jsx as jsx113 } from "@emotion/react/jsx-runtime";
|
|
19892
19907
|
function isIndentPermitted(maxDepth) {
|
|
19893
19908
|
const selection = $getSelection2();
|
|
@@ -19911,7 +19926,7 @@ function isIndentPermitted(maxDepth) {
|
|
|
19911
19926
|
}
|
|
19912
19927
|
function ListIndentPlugin({ maxDepth }) {
|
|
19913
19928
|
const [editor] = useLexicalComposerContext3();
|
|
19914
|
-
|
|
19929
|
+
useEffect15(() => {
|
|
19915
19930
|
return editor.registerCommand(
|
|
19916
19931
|
INDENT_CONTENT_COMMAND,
|
|
19917
19932
|
() => !isIndentPermitted(maxDepth),
|
|
@@ -19944,7 +19959,7 @@ import {
|
|
|
19944
19959
|
FORMAT_TEXT_COMMAND,
|
|
19945
19960
|
SELECTION_CHANGE_COMMAND
|
|
19946
19961
|
} from "lexical";
|
|
19947
|
-
import { useCallback as useCallback10, useEffect as
|
|
19962
|
+
import { useCallback as useCallback10, useEffect as useEffect16, useMemo as useMemo4, useState as useState15 } from "react";
|
|
19948
19963
|
import { Fragment as Fragment18, jsx as jsx114, jsxs as jsxs75 } from "@emotion/react/jsx-runtime";
|
|
19949
19964
|
var toolbar = css87`
|
|
19950
19965
|
background: var(--gray-50);
|
|
@@ -20087,7 +20102,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20087
20102
|
setIsLink(false);
|
|
20088
20103
|
}
|
|
20089
20104
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
20090
|
-
|
|
20105
|
+
useEffect16(() => {
|
|
20091
20106
|
return editor.registerCommand(
|
|
20092
20107
|
SELECTION_CHANGE_COMMAND,
|
|
20093
20108
|
(_payload) => {
|
|
@@ -20097,7 +20112,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20097
20112
|
COMMAND_PRIORITY_CRITICAL2
|
|
20098
20113
|
);
|
|
20099
20114
|
}, [editor, updateToolbar]);
|
|
20100
|
-
|
|
20115
|
+
useEffect16(() => {
|
|
20101
20116
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
20102
20117
|
requestAnimationFrame(() => {
|
|
20103
20118
|
editorState.read(() => {
|
|
@@ -20553,12 +20568,12 @@ var RichText = ({
|
|
|
20553
20568
|
}) => {
|
|
20554
20569
|
const editorContainerRef = useRef8(null);
|
|
20555
20570
|
const [editor] = useLexicalComposerContext5();
|
|
20556
|
-
|
|
20571
|
+
useEffect17(() => {
|
|
20557
20572
|
if (onRichTextInit) {
|
|
20558
20573
|
onRichTextInit(editor);
|
|
20559
20574
|
}
|
|
20560
20575
|
}, [editor, onRichTextInit]);
|
|
20561
|
-
|
|
20576
|
+
useEffect17(() => {
|
|
20562
20577
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState }) => {
|
|
20563
20578
|
requestAnimationFrame(() => {
|
|
20564
20579
|
if (!deepEqual2(editorState.toJSON(), prevEditorState.toJSON())) {
|
|
@@ -20570,7 +20585,7 @@ var RichText = ({
|
|
|
20570
20585
|
removeUpdateListener();
|
|
20571
20586
|
};
|
|
20572
20587
|
}, [editor, onChange]);
|
|
20573
|
-
|
|
20588
|
+
useEffect17(() => {
|
|
20574
20589
|
editor.setEditable(!readOnly);
|
|
20575
20590
|
}, [editor, readOnly]);
|
|
20576
20591
|
return /* @__PURE__ */ jsxs76(Fragment19, { children: [
|
|
@@ -20876,7 +20891,7 @@ var ProgressListItem = ({
|
|
|
20876
20891
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
20877
20892
|
import { css as css93 } from "@emotion/react";
|
|
20878
20893
|
import { CgCheck as CgCheck4 } from "@react-icons/all-files/cg/CgCheck";
|
|
20879
|
-
import { useCallback as useCallback11, useEffect as
|
|
20894
|
+
import { useCallback as useCallback11, useEffect as useEffect18, useMemo as useMemo6, useRef as useRef9, useState as useState16 } from "react";
|
|
20880
20895
|
|
|
20881
20896
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
20882
20897
|
import { css as css92 } from "@emotion/react";
|
|
@@ -21090,7 +21105,7 @@ var SegmentedControl = ({
|
|
|
21090
21105
|
const isIconOnly = useMemo6(() => {
|
|
21091
21106
|
return options.every((option) => option && option.icon && !option.label);
|
|
21092
21107
|
}, [options]);
|
|
21093
|
-
|
|
21108
|
+
useEffect18(() => {
|
|
21094
21109
|
const wrapperElement = wrapperRef.current;
|
|
21095
21110
|
const onScroll = () => {
|
|
21096
21111
|
if (!wrapperElement) {
|
|
@@ -21401,7 +21416,7 @@ import {
|
|
|
21401
21416
|
TabProvider as AriakitTabProvider,
|
|
21402
21417
|
useTabStore as useAriakitTabStore
|
|
21403
21418
|
} from "@ariakit/react";
|
|
21404
|
-
import { useCallback as useCallback12, useEffect as
|
|
21419
|
+
import { useCallback as useCallback12, useEffect as useEffect19, useMemo as useMemo7 } from "react";
|
|
21405
21420
|
|
|
21406
21421
|
// src/components/Tabs/Tabs.styles.ts
|
|
21407
21422
|
import { css as css97 } from "@emotion/react";
|
|
@@ -21462,7 +21477,7 @@ var Tabs = ({
|
|
|
21462
21477
|
},
|
|
21463
21478
|
[onSelectedIdChange, useHashForState]
|
|
21464
21479
|
);
|
|
21465
|
-
|
|
21480
|
+
useEffect19(() => {
|
|
21466
21481
|
if (selected && selected !== tab.getState().activeId) {
|
|
21467
21482
|
tab.setSelectedId(selected);
|
|
21468
21483
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -19,7 +19,8 @@ import { CalendarProps as CalendarProps$1, TimeFieldProps, TimeValue } from 'rea
|
|
|
19
19
|
import InternalSelect from 'react-select/dist/declarations/src/Select';
|
|
20
20
|
import { JsonSchema7Type } from 'zod-to-json-schema/src/parseDef';
|
|
21
21
|
import * as _ariakit_react from '@ariakit/react';
|
|
22
|
-
import { MenuProps as MenuProps$2, MenuStoreProps, MenuItemProps as MenuItemProps$1, PopoverProps as PopoverProps$1, PopoverProviderProps, TabStoreState, TabListProps, TabProps, TabPanelProps } from '@ariakit/react';
|
|
22
|
+
import { MenuProps as MenuProps$2, MenuStoreProps, MenuItemProps as MenuItemProps$1, PopoverProps as PopoverProps$1, PopoverProviderProps, PopoverStore, TabStoreState, TabListProps, TabProps, TabPanelProps } from '@ariakit/react';
|
|
23
|
+
export { PopoverStore } from '@ariakit/react';
|
|
23
24
|
import { InitialConfigType } from '@lexical/react/LexicalComposer';
|
|
24
25
|
import { LinkParamValue, RichTextParamConfiguration } from '@uniformdev/canvas';
|
|
25
26
|
export { RichTextBuiltInElement, RichTextBuiltInFormat } from '@uniformdev/canvas';
|
|
@@ -22873,7 +22874,7 @@ type ParameterMenuButtonProps = {
|
|
|
22873
22874
|
declare const ParameterMenuButton: React$1.ForwardRefExoticComponent<ParameterMenuButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
22874
22875
|
|
|
22875
22876
|
type ParameterMultiSelectOption = InputComboBoxOption;
|
|
22876
|
-
type ParameterMultiSelectInnerProps = Pick<InputComboBoxProps<ParameterMultiSelectOption, true>, 'options' | 'defaultValue' | 'onChange' | 'onBlur' | 'isClearable' | 'isDisabled'>;
|
|
22877
|
+
type ParameterMultiSelectInnerProps = Pick<InputComboBoxProps<ParameterMultiSelectOption, true>, 'options' | 'value' | 'defaultValue' | 'onChange' | 'onBlur' | 'isClearable' | 'isDisabled'>;
|
|
22877
22878
|
type ParameterMultiSelectProps = CommonParameterInputProps & ParameterMultiSelectInnerProps & {
|
|
22878
22879
|
disabled?: boolean;
|
|
22879
22880
|
};
|
|
@@ -23141,8 +23142,11 @@ type PopoverProps = PopoverProps$1 & {
|
|
|
23141
23142
|
trigger?: ReactNode;
|
|
23142
23143
|
/** @deprecated */
|
|
23143
23144
|
baseId?: string;
|
|
23145
|
+
onInit?: ({ store }: {
|
|
23146
|
+
store: PopoverStore;
|
|
23147
|
+
}) => void;
|
|
23144
23148
|
};
|
|
23145
|
-
declare const Popover: ({ iconColor, icon, iconSize, buttonText, ariaLabel, placement, testId, trigger, children, baseId, ...otherProps }: PopoverProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
23149
|
+
declare const Popover: ({ iconColor, icon, iconSize, buttonText, ariaLabel, placement, testId, trigger, children, baseId, onInit, ...otherProps }: PopoverProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
23146
23150
|
|
|
23147
23151
|
interface ProgressBarProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
23148
23152
|
current: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -19,7 +19,8 @@ import { CalendarProps as CalendarProps$1, TimeFieldProps, TimeValue } from 'rea
|
|
|
19
19
|
import InternalSelect from 'react-select/dist/declarations/src/Select';
|
|
20
20
|
import { JsonSchema7Type } from 'zod-to-json-schema/src/parseDef';
|
|
21
21
|
import * as _ariakit_react from '@ariakit/react';
|
|
22
|
-
import { MenuProps as MenuProps$2, MenuStoreProps, MenuItemProps as MenuItemProps$1, PopoverProps as PopoverProps$1, PopoverProviderProps, TabStoreState, TabListProps, TabProps, TabPanelProps } from '@ariakit/react';
|
|
22
|
+
import { MenuProps as MenuProps$2, MenuStoreProps, MenuItemProps as MenuItemProps$1, PopoverProps as PopoverProps$1, PopoverProviderProps, PopoverStore, TabStoreState, TabListProps, TabProps, TabPanelProps } from '@ariakit/react';
|
|
23
|
+
export { PopoverStore } from '@ariakit/react';
|
|
23
24
|
import { InitialConfigType } from '@lexical/react/LexicalComposer';
|
|
24
25
|
import { LinkParamValue, RichTextParamConfiguration } from '@uniformdev/canvas';
|
|
25
26
|
export { RichTextBuiltInElement, RichTextBuiltInFormat } from '@uniformdev/canvas';
|
|
@@ -22873,7 +22874,7 @@ type ParameterMenuButtonProps = {
|
|
|
22873
22874
|
declare const ParameterMenuButton: React$1.ForwardRefExoticComponent<ParameterMenuButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
22874
22875
|
|
|
22875
22876
|
type ParameterMultiSelectOption = InputComboBoxOption;
|
|
22876
|
-
type ParameterMultiSelectInnerProps = Pick<InputComboBoxProps<ParameterMultiSelectOption, true>, 'options' | 'defaultValue' | 'onChange' | 'onBlur' | 'isClearable' | 'isDisabled'>;
|
|
22877
|
+
type ParameterMultiSelectInnerProps = Pick<InputComboBoxProps<ParameterMultiSelectOption, true>, 'options' | 'value' | 'defaultValue' | 'onChange' | 'onBlur' | 'isClearable' | 'isDisabled'>;
|
|
22877
22878
|
type ParameterMultiSelectProps = CommonParameterInputProps & ParameterMultiSelectInnerProps & {
|
|
22878
22879
|
disabled?: boolean;
|
|
22879
22880
|
};
|
|
@@ -23141,8 +23142,11 @@ type PopoverProps = PopoverProps$1 & {
|
|
|
23141
23142
|
trigger?: ReactNode;
|
|
23142
23143
|
/** @deprecated */
|
|
23143
23144
|
baseId?: string;
|
|
23145
|
+
onInit?: ({ store }: {
|
|
23146
|
+
store: PopoverStore;
|
|
23147
|
+
}) => void;
|
|
23144
23148
|
};
|
|
23145
|
-
declare const Popover: ({ iconColor, icon, iconSize, buttonText, ariaLabel, placement, testId, trigger, children, baseId, ...otherProps }: PopoverProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
23149
|
+
declare const Popover: ({ iconColor, icon, iconSize, buttonText, ariaLabel, placement, testId, trigger, children, baseId, onInit, ...otherProps }: PopoverProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
23146
23150
|
|
|
23147
23151
|
interface ProgressBarProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
23148
23152
|
current: number;
|