@uniformdev/design-system 19.21.0 → 19.22.1-alpha.8
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 +58 -25
- package/dist/index.d.ts +6 -14
- package/dist/index.js +59 -25
- package/package.json +4 -3
package/dist/esm/index.js
CHANGED
|
@@ -65,6 +65,12 @@ var Theme = ({ disableReset = false }) => {
|
|
|
65
65
|
--primary-action-hover: #1264ff;
|
|
66
66
|
--primary-action-active: #0043c2;
|
|
67
67
|
|
|
68
|
+
/* tertiary action */
|
|
69
|
+
--tertiary-action-default: var(--gray-700);
|
|
70
|
+
--tertiary-action-hover: var(--gray-600);
|
|
71
|
+
--tertiary-action-active: var(--gray-50);
|
|
72
|
+
--tertiary-action-disabled: var(--gray-400);
|
|
73
|
+
|
|
68
74
|
/* accent dark */
|
|
69
75
|
--accent-dark: var(--purple-rain-500);
|
|
70
76
|
--accent-dark-hover: var(--purple-rain-400);
|
|
@@ -431,15 +437,41 @@ var buttonGhostDestructive = css`
|
|
|
431
437
|
${buttonRippleEffect({ hoverColor: "var(--white)", activeColor: "var(--gray-100)" })}
|
|
432
438
|
`;
|
|
433
439
|
var buttonTertiary = css`
|
|
434
|
-
background: var(--
|
|
440
|
+
background: var(--tertiary-action-default);
|
|
435
441
|
color: var(--white);
|
|
436
442
|
|
|
443
|
+
&:hover {
|
|
444
|
+
background: var(--tertiary-action-hover);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
&:disabled {
|
|
448
|
+
background: var(--tertiary-action-disabled);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
&:hover,
|
|
437
452
|
&:disabled {
|
|
438
|
-
background: var(--gray-300);
|
|
439
453
|
color: var(--white);
|
|
440
454
|
}
|
|
441
455
|
|
|
442
|
-
${buttonRippleEffect({ hoverColor: " var(--
|
|
456
|
+
${buttonRippleEffect({ hoverColor: " var(--tertiary-action-default)" })}
|
|
457
|
+
`;
|
|
458
|
+
var buttonTertiaryOutline = css`
|
|
459
|
+
background: transparent;
|
|
460
|
+
box-shadow: 0 0 0 1px var(--tertiary-action-default);
|
|
461
|
+
color: var(--tertiary-action-default);
|
|
462
|
+
|
|
463
|
+
&:hover {
|
|
464
|
+
box-shadow: 0 0 0 1px var(--tertiary-action-hover);
|
|
465
|
+
color: var(--tertiary-action-hover);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
&:disabled {
|
|
469
|
+
background: transparent;
|
|
470
|
+
box-shadow: 0 0 0 1px var(--tertiary-action-disabled);
|
|
471
|
+
color: var(--tertiary-action-disabled);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
${buttonRippleEffect({ hoverColor: "transparent", activeColor: "var(--tertiary-action-active)" })}
|
|
443
475
|
`;
|
|
444
476
|
var buttonGhostUnimportant = css`
|
|
445
477
|
background: transparent;
|
|
@@ -11085,8 +11117,8 @@ var Button = React5.forwardRef(
|
|
|
11085
11117
|
ghostDestructive: buttonGhostDestructive,
|
|
11086
11118
|
unimportant: buttonUnimportant,
|
|
11087
11119
|
ghostUnimportant: buttonGhostUnimportant,
|
|
11088
|
-
|
|
11089
|
-
|
|
11120
|
+
tertiary: buttonTertiary,
|
|
11121
|
+
tertiaryOutline: buttonTertiaryOutline
|
|
11090
11122
|
};
|
|
11091
11123
|
const btnSize = {
|
|
11092
11124
|
zero: "padding: 0",
|
|
@@ -12105,6 +12137,7 @@ var ChipContainer = css35`
|
|
|
12105
12137
|
var ChipText = css35`
|
|
12106
12138
|
align-self: center;
|
|
12107
12139
|
line-height: 1;
|
|
12140
|
+
text-wrap: nowrap;
|
|
12108
12141
|
`;
|
|
12109
12142
|
var ChipIcon = css35`
|
|
12110
12143
|
align-self: center;
|
|
@@ -15482,14 +15515,13 @@ var ParameterImageInner = forwardRef10(
|
|
|
15482
15515
|
const errorText = "The text you provided is not a valid URL";
|
|
15483
15516
|
const updateImageSrc = useCallback3(() => {
|
|
15484
15517
|
const validUrl = new RegExp(
|
|
15485
|
-
|
|
15486
|
-
"i"
|
|
15518
|
+
/^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_.+~#?&/=]*)$/
|
|
15487
15519
|
);
|
|
15488
15520
|
let message = void 0;
|
|
15489
15521
|
try {
|
|
15490
15522
|
if (value !== "") {
|
|
15491
15523
|
const url = String(value).startsWith("//") ? `${location.protocol}${value}` : String(value);
|
|
15492
|
-
if (!
|
|
15524
|
+
if (!validUrl.test(url) || !url.startsWith("https")) {
|
|
15493
15525
|
throw Error(errorText);
|
|
15494
15526
|
}
|
|
15495
15527
|
}
|
|
@@ -15744,11 +15776,8 @@ import { ListPlugin } from "@lexical/react/LexicalListPlugin";
|
|
|
15744
15776
|
import { MarkdownShortcutPlugin } from "@lexical/react/LexicalMarkdownShortcutPlugin";
|
|
15745
15777
|
import { RichTextPlugin } from "@lexical/react/LexicalRichTextPlugin";
|
|
15746
15778
|
import { HeadingNode, QuoteNode } from "@lexical/rich-text";
|
|
15747
|
-
import { deepEqual as deepEqual2 } from "fast-equals";
|
|
15748
|
-
import { ParagraphNode } from "lexical";
|
|
15749
|
-
import { useEffect as useEffect13, useRef as useRef6 } from "react";
|
|
15750
15779
|
|
|
15751
|
-
//
|
|
15780
|
+
// ../richtext/dist/index.mjs
|
|
15752
15781
|
var richTextBuiltInElements = [
|
|
15753
15782
|
{
|
|
15754
15783
|
label: "Heading 1",
|
|
@@ -15779,7 +15808,7 @@ var richTextBuiltInElements = [
|
|
|
15779
15808
|
type: "unorderedList"
|
|
15780
15809
|
},
|
|
15781
15810
|
{
|
|
15782
|
-
label: "
|
|
15811
|
+
label: "Ordered List",
|
|
15783
15812
|
type: "orderedList"
|
|
15784
15813
|
},
|
|
15785
15814
|
{
|
|
@@ -15795,8 +15824,6 @@ var richTextBuiltInElements = [
|
|
|
15795
15824
|
type: "code"
|
|
15796
15825
|
}
|
|
15797
15826
|
];
|
|
15798
|
-
|
|
15799
|
-
// src/components/ParameterInputs/rich-text/builtInFormats.ts
|
|
15800
15827
|
var richTextBuiltInFormats = [
|
|
15801
15828
|
{
|
|
15802
15829
|
label: "Bold",
|
|
@@ -15827,6 +15854,19 @@ var richTextBuiltInFormats = [
|
|
|
15827
15854
|
type: "subscript"
|
|
15828
15855
|
}
|
|
15829
15856
|
];
|
|
15857
|
+
var getLabelForElement = (type) => {
|
|
15858
|
+
var _a;
|
|
15859
|
+
if (type === "paragraph") {
|
|
15860
|
+
return "Normal";
|
|
15861
|
+
}
|
|
15862
|
+
const element = richTextBuiltInElements.find((element2) => element2.type === type);
|
|
15863
|
+
return (_a = element == null ? void 0 : element.label) != null ? _a : type;
|
|
15864
|
+
};
|
|
15865
|
+
|
|
15866
|
+
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
15867
|
+
import { deepEqual as deepEqual2 } from "fast-equals";
|
|
15868
|
+
import { ParagraphNode } from "lexical";
|
|
15869
|
+
import { useEffect as useEffect13, useRef as useRef6 } from "react";
|
|
15830
15870
|
|
|
15831
15871
|
// src/components/ParameterInputs/rich-text/editorStyles.ts
|
|
15832
15872
|
import { css as css71 } from "@emotion/css";
|
|
@@ -16726,14 +16766,6 @@ var RichTextToolbar = ({ config }) => {
|
|
|
16726
16766
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
16727
16767
|
(element) => ["h1", "h2", "h3", "h4", "h5", "h6"].includes(element.type)
|
|
16728
16768
|
);
|
|
16729
|
-
const elementTypeToLabel = (type) => {
|
|
16730
|
-
var _a;
|
|
16731
|
-
if (type === "paragraph") {
|
|
16732
|
-
return "Normal";
|
|
16733
|
-
}
|
|
16734
|
-
const element = richTextBuiltInElements.find((element2) => element2.type === type);
|
|
16735
|
-
return (_a = element == null ? void 0 : element.label) != null ? _a : type;
|
|
16736
|
-
};
|
|
16737
16769
|
const onSelectElement = (type) => {
|
|
16738
16770
|
if (activeElement === type) {
|
|
16739
16771
|
return;
|
|
@@ -16872,7 +16904,7 @@ var RichTextToolbar = ({ config }) => {
|
|
|
16872
16904
|
return [
|
|
16873
16905
|
...enabledTextualElements,
|
|
16874
16906
|
{
|
|
16875
|
-
label:
|
|
16907
|
+
label: getLabelForElement(activeElement),
|
|
16876
16908
|
type: activeElement
|
|
16877
16909
|
}
|
|
16878
16910
|
];
|
|
@@ -16883,7 +16915,7 @@ var RichTextToolbar = ({ config }) => {
|
|
|
16883
16915
|
{
|
|
16884
16916
|
menuLabel: "Elements",
|
|
16885
16917
|
menuTrigger: /* @__PURE__ */ jsxs60("button", { css: toolbarButton, title: "Text formatting", children: [
|
|
16886
|
-
elementsThatShouldBeVisibleInDropdown.some((element) => element.type === activeElement) ?
|
|
16918
|
+
elementsThatShouldBeVisibleInDropdown.some((element) => element.type === activeElement) ? getLabelForElement(activeElement) : getLabelForElement("paragraph"),
|
|
16887
16919
|
" ",
|
|
16888
16920
|
/* @__PURE__ */ jsx92(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
|
|
16889
16921
|
] }),
|
|
@@ -18144,6 +18176,7 @@ export {
|
|
|
18144
18176
|
buttonSecondary,
|
|
18145
18177
|
buttonSecondaryInvert,
|
|
18146
18178
|
buttonTertiary,
|
|
18179
|
+
buttonTertiaryOutline,
|
|
18147
18180
|
buttonUnimportant,
|
|
18148
18181
|
canvasAlertIcon,
|
|
18149
18182
|
cardIcon,
|
package/dist/index.d.ts
CHANGED
|
@@ -15,12 +15,13 @@ import InternalSelect from 'react-select/dist/declarations/src/Select';
|
|
|
15
15
|
import { StateManagerProps } from 'react-select/dist/declarations/src/useStateManager';
|
|
16
16
|
import { JsonSchema7Type } from 'zod-to-json-schema/src/parseDef';
|
|
17
17
|
import { MenuHTMLProps, MenuProps as MenuProps$2, MenuStateReturn } from 'reakit/Menu';
|
|
18
|
-
import {
|
|
18
|
+
import { LinkParamValue, RichTextParamConfiguration } from '@uniformdev/canvas';
|
|
19
19
|
export { RichTextBuiltInElement, RichTextBuiltInFormat } from '@uniformdev/canvas';
|
|
20
20
|
import { Spread, SerializedElementNode, ElementNode, NodeKey, EditorConfig, DOMConversionMap, RangeSelection, SerializedEditorState, LexicalEditor } from 'lexical';
|
|
21
21
|
import { PopoverProps as PopoverProps$1, PopoverInitialState } from 'reakit/Popover';
|
|
22
22
|
import { TabState, TabListProps, TabProps, TabPanelProps } from 'reakit/Tab';
|
|
23
23
|
import { TooltipOptions, TooltipInitialState } from 'reakit/Tooltip';
|
|
24
|
+
export { richTextBuiltInElements, richTextBuiltInFormats } from '@uniformdev/richtext';
|
|
24
25
|
|
|
25
26
|
/** @todo: line 144 onwards will be brought into a title, paragraph, list and link components */
|
|
26
27
|
type ThemeProps = {
|
|
@@ -88,6 +89,7 @@ declare const buttonUnimportant: _emotion_react.SerializedStyles;
|
|
|
88
89
|
declare const buttonGhost: _emotion_react.SerializedStyles;
|
|
89
90
|
declare const buttonGhostDestructive: _emotion_react.SerializedStyles;
|
|
90
91
|
declare const buttonTertiary: _emotion_react.SerializedStyles;
|
|
92
|
+
declare const buttonTertiaryOutline: _emotion_react.SerializedStyles;
|
|
91
93
|
declare const buttonGhostUnimportant: _emotion_react.SerializedStyles;
|
|
92
94
|
|
|
93
95
|
declare const labelText: _emotion_react.SerializedStyles;
|
|
@@ -20245,7 +20247,7 @@ declare const UniformLogo: ({ theme, ...props }: UniformLogoProps & React.SVGAtt
|
|
|
20245
20247
|
declare const UniformLogoLarge: ({ ...props }: React.SVGAttributes<SVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
20246
20248
|
|
|
20247
20249
|
/** Button themes that are available to use with our brand */
|
|
20248
|
-
type ButtonThemeProps$1 = 'primary' | 'secondary' | 'destructive' | 'tertiary' | 'unimportant' | 'ghost' | 'ghostDestructive' | 'primaryInvert' | 'secondaryInvert' | 'ghostUnimportant';
|
|
20250
|
+
type ButtonThemeProps$1 = 'primary' | 'secondary' | 'destructive' | 'tertiary' | 'tertiaryOutline' | 'unimportant' | 'ghost' | 'ghostDestructive' | 'primaryInvert' | 'secondaryInvert' | 'ghostUnimportant';
|
|
20249
20251
|
/** Button sizes that are available to use with our brand */
|
|
20250
20252
|
type ButtonSizeProps = 'zero' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
20251
20253
|
type ButtonProps = ButtonProps$1 & {
|
|
@@ -21026,7 +21028,7 @@ type JsonEditorProps = {
|
|
|
21026
21028
|
declare const JsonEditor: ({ defaultValue, onChange, jsonSchema, height, readOnly }: JsonEditorProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
21027
21029
|
|
|
21028
21030
|
type SpacingProp = '0' | '2xs' | 'xs' | 'sm' | 'base' | 'md' | 'lg' | 'xl' | '2xl';
|
|
21029
|
-
type BackgroundColorProp = 'white' | 'gray-50' | 'gray-100' | 'gray-200' | 'gray-300' | 'gray-400' | 'gray-500' | 'gray-600' | 'gray-700' | 'gray-800' | 'gray-900';
|
|
21031
|
+
type BackgroundColorProp = 'transparent' | 'white' | 'gray-50' | 'gray-100' | 'gray-200' | 'gray-300' | 'gray-400' | 'gray-500' | 'gray-600' | 'gray-700' | 'gray-800' | 'gray-900';
|
|
21030
21032
|
type HtmlTagProps = 'div' | 'section' | 'article' | 'aside' | 'span';
|
|
21031
21033
|
type BorderRadiusProps = 'rounded-sm' | 'rounded-base' | 'rounded-md';
|
|
21032
21034
|
type CommonContainerProps = {
|
|
@@ -21518,16 +21520,6 @@ type ParameterNameAndPublicIdInputProps = {
|
|
|
21518
21520
|
/** @example <ParameterNameAndPublicIdInput /> */
|
|
21519
21521
|
declare const ParameterNameAndPublicIdInput: ({ id, onBlur, autoFocus, onNameChange, onPublicIdChange, nameIdError, publicIdError, readOnly, hasInitialPublicIdField, label, warnOverLength, nameIdField, nameCaption, namePlaceholderText, publicIdFieldName, publicIdCaption, publicIdPlaceholderText, values, }: ParameterNameAndPublicIdInputProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
21520
21522
|
|
|
21521
|
-
declare const richTextBuiltInElements: {
|
|
21522
|
-
label: string;
|
|
21523
|
-
type: RichTextBuiltInElement;
|
|
21524
|
-
}[];
|
|
21525
|
-
|
|
21526
|
-
declare const richTextBuiltInFormats: {
|
|
21527
|
-
label: string;
|
|
21528
|
-
type: RichTextBuiltInFormat;
|
|
21529
|
-
}[];
|
|
21530
|
-
|
|
21531
21523
|
type LinkNodeProps = NonNullable<LinkParamValue>;
|
|
21532
21524
|
type SerializedLinkNode = Spread<{
|
|
21533
21525
|
link: LinkNodeProps;
|
|
@@ -22187,4 +22179,4 @@ type StatusBulletProps = React$1.HTMLAttributes<HTMLSpanElement> & {
|
|
|
22187
22179
|
};
|
|
22188
22180
|
declare const StatusBullet: ({ status, hideText, size, message, ...props }: StatusBulletProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22189
22181
|
|
|
22190
|
-
export { ActionButtonsProps, AddButton, AddButtonProps, AddListButton, AddListButtonProps, AddListButtonThemeProps, AnimationFile, AnimationFileProps, ArrowPositionProps, Badge, BadgeProps, BadgeSizeProps, BadgeThemeProps, BadgeThemeStyleProps, Banner, BannerProps, BannerType, BoxHeightProps, BreakpointSize, BreakpointsMap, Button, ButtonProps, ButtonSizeProps, ButtonThemeProps$1 as ButtonThemeProps, ButtonWithMenu, ButtonWithMenuProps, Callout, CalloutProps, CalloutType, Caption, CaptionProps, Card, CardContainer, CardContainerBgColorProps, CardContainerProps, CardProps, CardTitle, CardTitleProps, CheckboxWithInfo, CheckboxWithInforProps, ChildFunction, Chip, ChipProps, ComboBoxGroupBase, ConnectToDataElementButton, ConnectToDataElementButtonProps, Container, ContainerProps, Counter, CounterProps, CreateTeamIntegrationTile, CreateTeamIntegrationTileProps, DashedBox, DashedBoxProps, Details, DetailsProps, DismissibleChipAction, Drawer, DrawerContextValue, DrawerItem, DrawerProps, DrawerProvider, DrawerRenderer, DrawerRendererItemProps, DrawerRendererProps, EditTeamIntegrationTile, EditTeamIntegrationTileProps, ErrorMessage, ErrorMessageProps, Fieldset, FieldsetProps, Heading, HeadingProps, HexModalBackground, HorizontalRhythm, Icon, IconColor, IconName, IconProps, IconType, IconsProvider, InfoMessage, InfoMessageProps, InlineAlert, InlineAlertProps, Input, InputComboBox, InputComboBoxOption, InputComboBoxProps, InputInlineSelect, InputInlineSelectOption, InputInlineSelectProps, InputKeywordSearch, InputKeywordSearchProps, InputProps, InputSelect, InputSelectProps, InputToggle, InputToggleProps, IntegrationComingSoon, IntegrationComingSoonProps, IntegrationHeaderSection, IntegrationHeaderSectionProps, IntegrationLoadingTile, IntegrationLoadingTileProps, IntegrationModalHeader, IntegrationModalHeaderProps, IntegrationModalIcon, IntegrationModalIconProps, IntegrationTile, IntegrationTileProps, JsonEditor, JsonEditorProps, Label, LabelProps, Legend, LegendProps, LevelProps, LimitsBar, LimitsBarProps, Link, LinkColorProps, LinkList, LinkListProps, LinkManagerWithRefType, LinkNode, LinkProps, LinkWithRef, LoadingCardSkeleton, LoadingIcon, LoadingIconProps, LoadingIndicator, LoadingOverlay, LoadingOverlayProps, Menu, MenuContext, MenuGroup, MenuGroupProps, MenuItem, MenuItemProps, MenuItemSeparator, MenuItemTextThemeProps, MenuProps, PageHeaderSection, PageHeaderSectionProps, Paragraph, ParagraphProps, ParameterDataConnectButtonProps, ParameterDataResource, ParameterDrawerHeader, ParameterDrawerHeaderProps, ParameterGroup, ParameterGroupProps, ParameterImage, ParameterImageInner, ParameterImageProps, ParameterInput, ParameterInputInner, ParameterInputProps, ParameterLabel, ParameterLabelProps, ParameterLink, ParameterLinkInner, ParameterLinkProps, ParameterMenuButton, ParameterMenuButtonProps, ParameterNameAndPublicIdInput, ParameterNameAndPublicIdInputProps, ParameterOverrideMarker, ParameterRichText, ParameterRichTextInner, ParameterRichTextInnerProps, ParameterRichTextProps, ParameterSelect, ParameterSelectInner, ParameterSelectProps, ParameterShell, ParameterShellContext, ParameterShellPlaceholder, ParameterShellProps, ParameterTextarea, ParameterTextareaInner, ParameterTextareaProps, ParameterToggle, ParameterToggleInner, ParameterToggleProps, Popover, PopoverProps, ProgressList, ProgressListItem, ProgressListItemProps, ProgressListProps, RegisterDrawerProps, ResolveIcon, ResolveIconProps, RichTextParamValue, ScrollableItemProps, ScrollableList, ScrollableListContainerProps, ScrollableListInputItem, ScrollableListItem, ScrollableListItemProps, ScrollableListProps, SegmentedControl, SegmentedControlOption, SegmentedControlProps, SerializedLinkNode, ShortcutContext, ShortcutRevealer, Skeleton, SkeletonProps, StatusBullet, StatusBulletProps, StatusTypeProps, SuccessMessage, SuccessMessageProps, Switch, SwitchProps, TabButton, TabButtonGroup, TabButtonProps, TabContent, TabContentProps, Table, TableBody, TableBodyProps, TableCellData, TableCellDataProps, TableCellHead, TableCellHeadProps, TableFoot, TableFootProps, TableHead, TableHeadProps, TableProps, TableRow, TableRowProps, Tabs, TabsProps, TextAlignProps, Textarea, TextareaProps, Theme, ThemeProps, Tile, TileContainer, TileContainerProps, TileProps, TileText, TileTitleProps, Tooltip, TooltipProps, TwoColumnLayout, TwoColumnLayoutProps, UniformBadge, UniformLogo, UniformLogoLarge, UniformLogoProps, UseShortcutOptions, VerticalRhythm, WarningMessage, WarningMessageProps, accessibleHidden, borderTopIcon, breakpoints, button, buttonDestructive, buttonGhost, buttonGhostDestructive, buttonGhostUnimportant, buttonPrimary, buttonPrimaryInvert, buttonRippleEffect, buttonSecondary, buttonSecondaryInvert, buttonTertiary, buttonUnimportant, canvasAlertIcon, cardIcon, cq, customIcons, extractParameterProps, fadeIn, fadeInBottom, fadeInLtr, fadeInRtl, fadeInTop, fadeOutBottom, fullWidthScreenIcon, growSubtle, imageTextIcon, infoFilledIcon, input, inputError, inputSelect, isMacLike, jsonIcon, labelText, loader as loaderAnimationData, macifyShortcut, mq, numberInput, queryStringIcon, rectangleRoundedIcon, replaceUnderscoreInString,
|
|
22182
|
+
export { ActionButtonsProps, AddButton, AddButtonProps, AddListButton, AddListButtonProps, AddListButtonThemeProps, AnimationFile, AnimationFileProps, ArrowPositionProps, Badge, BadgeProps, BadgeSizeProps, BadgeThemeProps, BadgeThemeStyleProps, Banner, BannerProps, BannerType, BoxHeightProps, BreakpointSize, BreakpointsMap, Button, ButtonProps, ButtonSizeProps, ButtonThemeProps$1 as ButtonThemeProps, ButtonWithMenu, ButtonWithMenuProps, Callout, CalloutProps, CalloutType, Caption, CaptionProps, Card, CardContainer, CardContainerBgColorProps, CardContainerProps, CardProps, CardTitle, CardTitleProps, CheckboxWithInfo, CheckboxWithInforProps, ChildFunction, Chip, ChipProps, ComboBoxGroupBase, ConnectToDataElementButton, ConnectToDataElementButtonProps, Container, ContainerProps, Counter, CounterProps, CreateTeamIntegrationTile, CreateTeamIntegrationTileProps, DashedBox, DashedBoxProps, Details, DetailsProps, DismissibleChipAction, Drawer, DrawerContextValue, DrawerItem, DrawerProps, DrawerProvider, DrawerRenderer, DrawerRendererItemProps, DrawerRendererProps, EditTeamIntegrationTile, EditTeamIntegrationTileProps, ErrorMessage, ErrorMessageProps, Fieldset, FieldsetProps, Heading, HeadingProps, HexModalBackground, HorizontalRhythm, Icon, IconColor, IconName, IconProps, IconType, IconsProvider, InfoMessage, InfoMessageProps, InlineAlert, InlineAlertProps, Input, InputComboBox, InputComboBoxOption, InputComboBoxProps, InputInlineSelect, InputInlineSelectOption, InputInlineSelectProps, InputKeywordSearch, InputKeywordSearchProps, InputProps, InputSelect, InputSelectProps, InputToggle, InputToggleProps, IntegrationComingSoon, IntegrationComingSoonProps, IntegrationHeaderSection, IntegrationHeaderSectionProps, IntegrationLoadingTile, IntegrationLoadingTileProps, IntegrationModalHeader, IntegrationModalHeaderProps, IntegrationModalIcon, IntegrationModalIconProps, IntegrationTile, IntegrationTileProps, JsonEditor, JsonEditorProps, Label, LabelProps, Legend, LegendProps, LevelProps, LimitsBar, LimitsBarProps, Link, LinkColorProps, LinkList, LinkListProps, LinkManagerWithRefType, LinkNode, LinkProps, LinkWithRef, LoadingCardSkeleton, LoadingIcon, LoadingIconProps, LoadingIndicator, LoadingOverlay, LoadingOverlayProps, Menu, MenuContext, MenuGroup, MenuGroupProps, MenuItem, MenuItemProps, MenuItemSeparator, MenuItemTextThemeProps, MenuProps, PageHeaderSection, PageHeaderSectionProps, Paragraph, ParagraphProps, ParameterDataConnectButtonProps, ParameterDataResource, ParameterDrawerHeader, ParameterDrawerHeaderProps, ParameterGroup, ParameterGroupProps, ParameterImage, ParameterImageInner, ParameterImageProps, ParameterInput, ParameterInputInner, ParameterInputProps, ParameterLabel, ParameterLabelProps, ParameterLink, ParameterLinkInner, ParameterLinkProps, ParameterMenuButton, ParameterMenuButtonProps, ParameterNameAndPublicIdInput, ParameterNameAndPublicIdInputProps, ParameterOverrideMarker, ParameterRichText, ParameterRichTextInner, ParameterRichTextInnerProps, ParameterRichTextProps, ParameterSelect, ParameterSelectInner, ParameterSelectProps, ParameterShell, ParameterShellContext, ParameterShellPlaceholder, ParameterShellProps, ParameterTextarea, ParameterTextareaInner, ParameterTextareaProps, ParameterToggle, ParameterToggleInner, ParameterToggleProps, Popover, PopoverProps, ProgressList, ProgressListItem, ProgressListItemProps, ProgressListProps, RegisterDrawerProps, ResolveIcon, ResolveIconProps, RichTextParamValue, ScrollableItemProps, ScrollableList, ScrollableListContainerProps, ScrollableListInputItem, ScrollableListItem, ScrollableListItemProps, ScrollableListProps, SegmentedControl, SegmentedControlOption, SegmentedControlProps, SerializedLinkNode, ShortcutContext, ShortcutRevealer, Skeleton, SkeletonProps, StatusBullet, StatusBulletProps, StatusTypeProps, SuccessMessage, SuccessMessageProps, Switch, SwitchProps, TabButton, TabButtonGroup, TabButtonProps, TabContent, TabContentProps, Table, TableBody, TableBodyProps, TableCellData, TableCellDataProps, TableCellHead, TableCellHeadProps, TableFoot, TableFootProps, TableHead, TableHeadProps, TableProps, TableRow, TableRowProps, Tabs, TabsProps, TextAlignProps, Textarea, TextareaProps, Theme, ThemeProps, Tile, TileContainer, TileContainerProps, TileProps, TileText, TileTitleProps, Tooltip, TooltipProps, TwoColumnLayout, TwoColumnLayoutProps, UniformBadge, UniformLogo, UniformLogoLarge, UniformLogoProps, UseShortcutOptions, VerticalRhythm, WarningMessage, WarningMessageProps, accessibleHidden, borderTopIcon, breakpoints, button, buttonDestructive, buttonGhost, buttonGhostDestructive, buttonGhostUnimportant, buttonPrimary, buttonPrimaryInvert, buttonRippleEffect, buttonSecondary, buttonSecondaryInvert, buttonTertiary, buttonTertiaryOutline, buttonUnimportant, canvasAlertIcon, cardIcon, cq, customIcons, extractParameterProps, fadeIn, fadeInBottom, fadeInLtr, fadeInRtl, fadeInTop, fadeOutBottom, fullWidthScreenIcon, growSubtle, imageTextIcon, infoFilledIcon, input, inputError, inputSelect, isMacLike, jsonIcon, labelText, loader as loaderAnimationData, macifyShortcut, mq, numberInput, queryStringIcon, rectangleRoundedIcon, replaceUnderscoreInString, richTextIsValueConsideredEmpty, ripple, scrollbarStyles, settings, settingsIcon, skeletonLoading, slideInTtb, spinner as spinnerAnimationData, structurePanelIcon, supports, textInput, useBreakpoint, useCloseCurrentDrawer, useCurrentDrawerRenderer, useCurrentTab, useDrawer, useIconContext, useMenuContext, useOutsideClick, useParameterShell, useShortcut, warningIcon, yesNoIcon };
|
package/dist/index.js
CHANGED
|
@@ -170,6 +170,7 @@ __export(src_exports, {
|
|
|
170
170
|
buttonSecondary: () => buttonSecondary,
|
|
171
171
|
buttonSecondaryInvert: () => buttonSecondaryInvert,
|
|
172
172
|
buttonTertiary: () => buttonTertiary,
|
|
173
|
+
buttonTertiaryOutline: () => buttonTertiaryOutline,
|
|
173
174
|
buttonUnimportant: () => buttonUnimportant,
|
|
174
175
|
canvasAlertIcon: () => canvasAlertIcon,
|
|
175
176
|
cardIcon: () => cardIcon,
|
|
@@ -294,6 +295,12 @@ var Theme = ({ disableReset = false }) => {
|
|
|
294
295
|
--primary-action-hover: #1264ff;
|
|
295
296
|
--primary-action-active: #0043c2;
|
|
296
297
|
|
|
298
|
+
/* tertiary action */
|
|
299
|
+
--tertiary-action-default: var(--gray-700);
|
|
300
|
+
--tertiary-action-hover: var(--gray-600);
|
|
301
|
+
--tertiary-action-active: var(--gray-50);
|
|
302
|
+
--tertiary-action-disabled: var(--gray-400);
|
|
303
|
+
|
|
297
304
|
/* accent dark */
|
|
298
305
|
--accent-dark: var(--purple-rain-500);
|
|
299
306
|
--accent-dark-hover: var(--purple-rain-400);
|
|
@@ -660,15 +667,41 @@ var buttonGhostDestructive = import_react3.css`
|
|
|
660
667
|
${buttonRippleEffect({ hoverColor: "var(--white)", activeColor: "var(--gray-100)" })}
|
|
661
668
|
`;
|
|
662
669
|
var buttonTertiary = import_react3.css`
|
|
663
|
-
background: var(--
|
|
670
|
+
background: var(--tertiary-action-default);
|
|
664
671
|
color: var(--white);
|
|
665
672
|
|
|
673
|
+
&:hover {
|
|
674
|
+
background: var(--tertiary-action-hover);
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
&:disabled {
|
|
678
|
+
background: var(--tertiary-action-disabled);
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
&:hover,
|
|
666
682
|
&:disabled {
|
|
667
|
-
background: var(--gray-300);
|
|
668
683
|
color: var(--white);
|
|
669
684
|
}
|
|
670
685
|
|
|
671
|
-
${buttonRippleEffect({ hoverColor: " var(--
|
|
686
|
+
${buttonRippleEffect({ hoverColor: " var(--tertiary-action-default)" })}
|
|
687
|
+
`;
|
|
688
|
+
var buttonTertiaryOutline = import_react3.css`
|
|
689
|
+
background: transparent;
|
|
690
|
+
box-shadow: 0 0 0 1px var(--tertiary-action-default);
|
|
691
|
+
color: var(--tertiary-action-default);
|
|
692
|
+
|
|
693
|
+
&:hover {
|
|
694
|
+
box-shadow: 0 0 0 1px var(--tertiary-action-hover);
|
|
695
|
+
color: var(--tertiary-action-hover);
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
&:disabled {
|
|
699
|
+
background: transparent;
|
|
700
|
+
box-shadow: 0 0 0 1px var(--tertiary-action-disabled);
|
|
701
|
+
color: var(--tertiary-action-disabled);
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
${buttonRippleEffect({ hoverColor: "transparent", activeColor: "var(--tertiary-action-active)" })}
|
|
672
705
|
`;
|
|
673
706
|
var buttonGhostUnimportant = import_react3.css`
|
|
674
707
|
background: transparent;
|
|
@@ -11314,8 +11347,8 @@ var Button = React5.forwardRef(
|
|
|
11314
11347
|
ghostDestructive: buttonGhostDestructive,
|
|
11315
11348
|
unimportant: buttonUnimportant,
|
|
11316
11349
|
ghostUnimportant: buttonGhostUnimportant,
|
|
11317
|
-
|
|
11318
|
-
|
|
11350
|
+
tertiary: buttonTertiary,
|
|
11351
|
+
tertiaryOutline: buttonTertiaryOutline
|
|
11319
11352
|
};
|
|
11320
11353
|
const btnSize = {
|
|
11321
11354
|
zero: "padding: 0",
|
|
@@ -12330,6 +12363,7 @@ var ChipContainer = import_react43.css`
|
|
|
12330
12363
|
var ChipText = import_react43.css`
|
|
12331
12364
|
align-self: center;
|
|
12332
12365
|
line-height: 1;
|
|
12366
|
+
text-wrap: nowrap;
|
|
12333
12367
|
`;
|
|
12334
12368
|
var ChipIcon = import_react43.css`
|
|
12335
12369
|
align-self: center;
|
|
@@ -15702,14 +15736,13 @@ var ParameterImageInner = (0, import_react92.forwardRef)(
|
|
|
15702
15736
|
const errorText = "The text you provided is not a valid URL";
|
|
15703
15737
|
const updateImageSrc = (0, import_react92.useCallback)(() => {
|
|
15704
15738
|
const validUrl = new RegExp(
|
|
15705
|
-
|
|
15706
|
-
"i"
|
|
15739
|
+
/^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_.+~#?&/=]*)$/
|
|
15707
15740
|
);
|
|
15708
15741
|
let message = void 0;
|
|
15709
15742
|
try {
|
|
15710
15743
|
if (value !== "") {
|
|
15711
15744
|
const url = String(value).startsWith("//") ? `${location.protocol}${value}` : String(value);
|
|
15712
|
-
if (!
|
|
15745
|
+
if (!validUrl.test(url) || !url.startsWith("https")) {
|
|
15713
15746
|
throw Error(errorText);
|
|
15714
15747
|
}
|
|
15715
15748
|
}
|
|
@@ -15956,11 +15989,8 @@ var import_LexicalListPlugin = require("@lexical/react/LexicalListPlugin");
|
|
|
15956
15989
|
var import_LexicalMarkdownShortcutPlugin = require("@lexical/react/LexicalMarkdownShortcutPlugin");
|
|
15957
15990
|
var import_LexicalRichTextPlugin = require("@lexical/react/LexicalRichTextPlugin");
|
|
15958
15991
|
var import_rich_text2 = require("@lexical/rich-text");
|
|
15959
|
-
var import_fast_equals2 = require("fast-equals");
|
|
15960
|
-
var import_lexical5 = require("lexical");
|
|
15961
|
-
var import_react102 = require("react");
|
|
15962
15992
|
|
|
15963
|
-
//
|
|
15993
|
+
// ../richtext/dist/index.mjs
|
|
15964
15994
|
var richTextBuiltInElements = [
|
|
15965
15995
|
{
|
|
15966
15996
|
label: "Heading 1",
|
|
@@ -15991,7 +16021,7 @@ var richTextBuiltInElements = [
|
|
|
15991
16021
|
type: "unorderedList"
|
|
15992
16022
|
},
|
|
15993
16023
|
{
|
|
15994
|
-
label: "
|
|
16024
|
+
label: "Ordered List",
|
|
15995
16025
|
type: "orderedList"
|
|
15996
16026
|
},
|
|
15997
16027
|
{
|
|
@@ -16007,8 +16037,6 @@ var richTextBuiltInElements = [
|
|
|
16007
16037
|
type: "code"
|
|
16008
16038
|
}
|
|
16009
16039
|
];
|
|
16010
|
-
|
|
16011
|
-
// src/components/ParameterInputs/rich-text/builtInFormats.ts
|
|
16012
16040
|
var richTextBuiltInFormats = [
|
|
16013
16041
|
{
|
|
16014
16042
|
label: "Bold",
|
|
@@ -16039,6 +16067,19 @@ var richTextBuiltInFormats = [
|
|
|
16039
16067
|
type: "subscript"
|
|
16040
16068
|
}
|
|
16041
16069
|
];
|
|
16070
|
+
var getLabelForElement = (type) => {
|
|
16071
|
+
var _a;
|
|
16072
|
+
if (type === "paragraph") {
|
|
16073
|
+
return "Normal";
|
|
16074
|
+
}
|
|
16075
|
+
const element = richTextBuiltInElements.find((element2) => element2.type === type);
|
|
16076
|
+
return (_a = element == null ? void 0 : element.label) != null ? _a : type;
|
|
16077
|
+
};
|
|
16078
|
+
|
|
16079
|
+
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
16080
|
+
var import_fast_equals2 = require("fast-equals");
|
|
16081
|
+
var import_lexical5 = require("lexical");
|
|
16082
|
+
var import_react102 = require("react");
|
|
16042
16083
|
|
|
16043
16084
|
// src/components/ParameterInputs/rich-text/editorStyles.ts
|
|
16044
16085
|
var import_css = require("@emotion/css");
|
|
@@ -16897,14 +16938,6 @@ var RichTextToolbar = ({ config }) => {
|
|
|
16897
16938
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
16898
16939
|
(element) => ["h1", "h2", "h3", "h4", "h5", "h6"].includes(element.type)
|
|
16899
16940
|
);
|
|
16900
|
-
const elementTypeToLabel = (type) => {
|
|
16901
|
-
var _a;
|
|
16902
|
-
if (type === "paragraph") {
|
|
16903
|
-
return "Normal";
|
|
16904
|
-
}
|
|
16905
|
-
const element = richTextBuiltInElements.find((element2) => element2.type === type);
|
|
16906
|
-
return (_a = element == null ? void 0 : element.label) != null ? _a : type;
|
|
16907
|
-
};
|
|
16908
16941
|
const onSelectElement = (type) => {
|
|
16909
16942
|
if (activeElement === type) {
|
|
16910
16943
|
return;
|
|
@@ -17043,7 +17076,7 @@ var RichTextToolbar = ({ config }) => {
|
|
|
17043
17076
|
return [
|
|
17044
17077
|
...enabledTextualElements,
|
|
17045
17078
|
{
|
|
17046
|
-
label:
|
|
17079
|
+
label: getLabelForElement(activeElement),
|
|
17047
17080
|
type: activeElement
|
|
17048
17081
|
}
|
|
17049
17082
|
];
|
|
@@ -17054,7 +17087,7 @@ var RichTextToolbar = ({ config }) => {
|
|
|
17054
17087
|
{
|
|
17055
17088
|
menuLabel: "Elements",
|
|
17056
17089
|
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("button", { css: toolbarButton, title: "Text formatting", children: [
|
|
17057
|
-
elementsThatShouldBeVisibleInDropdown.some((element) => element.type === activeElement) ?
|
|
17090
|
+
elementsThatShouldBeVisibleInDropdown.some((element) => element.type === activeElement) ? getLabelForElement(activeElement) : getLabelForElement("paragraph"),
|
|
17058
17091
|
" ",
|
|
17059
17092
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
|
|
17060
17093
|
] }),
|
|
@@ -18307,6 +18340,7 @@ var StatusBullet = ({
|
|
|
18307
18340
|
buttonSecondary,
|
|
18308
18341
|
buttonSecondaryInvert,
|
|
18309
18342
|
buttonTertiary,
|
|
18343
|
+
buttonTertiaryOutline,
|
|
18310
18344
|
buttonUnimportant,
|
|
18311
18345
|
canvasAlertIcon,
|
|
18312
18346
|
cardIcon,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/design-system",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.22.1-alpha.8+a8f730b12",
|
|
4
4
|
"description": "Uniform design system components",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"@storybook/client-api": "6.5.16",
|
|
24
24
|
"@storybook/react": "6.5.16",
|
|
25
25
|
"@types/react": "18.2.7",
|
|
26
|
-
"@uniformdev/canvas": "^19.
|
|
26
|
+
"@uniformdev/canvas": "^19.22.1-alpha.8+a8f730b12",
|
|
27
|
+
"@uniformdev/richtext": "^19.22.1-alpha.8+a8f730b12",
|
|
27
28
|
"autoprefixer": "10.4.14",
|
|
28
29
|
"hygen": "6.2.11",
|
|
29
30
|
"postcss": "8.4.24",
|
|
@@ -66,5 +67,5 @@
|
|
|
66
67
|
"publishConfig": {
|
|
67
68
|
"access": "public"
|
|
68
69
|
},
|
|
69
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "a8f730b12035a4d7c2e6a704d3777ff12df52ffc"
|
|
70
71
|
}
|