@uniformdev/design-system 19.78.0 → 19.79.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 +214 -117
- package/dist/index.d.mts +30 -5
- package/dist/index.d.ts +30 -5
- package/dist/index.js +169 -72
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -21300,9 +21300,19 @@ type DetailsProps = React$1.HTMLAttributes<HTMLDetailsElement> & {
|
|
|
21300
21300
|
* @default false
|
|
21301
21301
|
*/
|
|
21302
21302
|
isOpenByDefault?: boolean;
|
|
21303
|
+
/** Makes the content indented, and shows an indent guide line.
|
|
21304
|
+
* @default false
|
|
21305
|
+
* @deprecated this prop is in beta, and might get breaking changes in minor releases.
|
|
21306
|
+
*/
|
|
21307
|
+
isIndented?: boolean;
|
|
21308
|
+
/** Makes the the UI of the summary more compact, by removing the paddings.
|
|
21309
|
+
* @default false
|
|
21310
|
+
* @deprecated this prop is in beta, and might get breaking changes in minor releases.
|
|
21311
|
+
*/
|
|
21312
|
+
isCompact?: boolean;
|
|
21303
21313
|
};
|
|
21304
21314
|
/** @example <Details summary="summary text">child content here</Details>*/
|
|
21305
|
-
declare const Details: ({ summary, children, isOpenByDefault, isOpen, onChange, ...props }: DetailsProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
21315
|
+
declare const Details: ({ summary, children, isOpenByDefault, isOpen, isIndented, isCompact, onChange, ...props }: DetailsProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
21306
21316
|
|
|
21307
21317
|
interface DrawerRendererProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
21308
21318
|
/** The ID of the stack to render. Some drawers need to use the same stack ID to be rendered here */
|
|
@@ -21505,12 +21515,18 @@ type ErrorMessageProps = {
|
|
|
21505
21515
|
/** sets the test id for test automation (optional) */
|
|
21506
21516
|
testId?: string;
|
|
21507
21517
|
className?: string;
|
|
21518
|
+
/**
|
|
21519
|
+
* When set to true, the error message will be truncated instead of wrapped
|
|
21520
|
+
* when it's longer than the available width.
|
|
21521
|
+
* @default false
|
|
21522
|
+
**/
|
|
21523
|
+
truncated?: boolean;
|
|
21508
21524
|
};
|
|
21509
21525
|
/**
|
|
21510
21526
|
* Component that provides error messaging to input fields
|
|
21511
21527
|
* @example <ErrorMessage>something went wrong, please try again</ErrorMessage>
|
|
21512
21528
|
*/
|
|
21513
|
-
declare const ErrorMessage: ({ message, testId, ...otherProps }: ErrorMessageProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element | null;
|
|
21529
|
+
declare const ErrorMessage: ({ message, testId, truncated, ...otherProps }: ErrorMessageProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element | null;
|
|
21514
21530
|
|
|
21515
21531
|
type FieldsetProps = React$1.HTMLAttributes<HTMLFieldSetElement> & {
|
|
21516
21532
|
/** sets the legend value */
|
|
@@ -22219,7 +22235,9 @@ type ModalProps = {
|
|
|
22219
22235
|
width?: string;
|
|
22220
22236
|
/** A valid CSS height */
|
|
22221
22237
|
height?: string;
|
|
22222
|
-
/** The classname to set on the wrapper of the modal
|
|
22238
|
+
/** The classname to set on the wrapper of the modal.
|
|
22239
|
+
* @deprecated the dialog is not rendered inside a wrapper anymore.
|
|
22240
|
+
*/
|
|
22223
22241
|
wrapperClassName?: string;
|
|
22224
22242
|
/** Removes the default padding on the content wrapper */
|
|
22225
22243
|
withoutContentPadding?: boolean;
|
|
@@ -22239,7 +22257,9 @@ declare const Modal: React__default.ForwardRefExoticComponent<{
|
|
|
22239
22257
|
width?: string | undefined;
|
|
22240
22258
|
/** A valid CSS height */
|
|
22241
22259
|
height?: string | undefined;
|
|
22242
|
-
/** The classname to set on the wrapper of the modal
|
|
22260
|
+
/** The classname to set on the wrapper of the modal.
|
|
22261
|
+
* @deprecated the dialog is not rendered inside a wrapper anymore.
|
|
22262
|
+
*/
|
|
22243
22263
|
wrapperClassName?: string | undefined;
|
|
22244
22264
|
/** Removes the default padding on the content wrapper */
|
|
22245
22265
|
withoutContentPadding?: boolean | undefined;
|
|
@@ -22638,13 +22658,18 @@ type ParameterShellOverrideProps = {
|
|
|
22638
22658
|
* @deprecated
|
|
22639
22659
|
*/
|
|
22640
22660
|
onResetOverriddenValue?: () => void;
|
|
22661
|
+
/**
|
|
22662
|
+
* Adjusts the UI to work with parameter groups. At the moment, it just remove the white background.
|
|
22663
|
+
* @default false
|
|
22664
|
+
*/
|
|
22665
|
+
isParameterGroup?: boolean;
|
|
22641
22666
|
};
|
|
22642
22667
|
type ParameterShellProps = React.InputHTMLAttributes<HTMLDivElement> & CommonParameterInputProps & ParameterShellOverrideProps;
|
|
22643
22668
|
/**
|
|
22644
22669
|
* Uniform Parameter shell component
|
|
22645
22670
|
* @example <ParameterShell label="my label" id="my-id"><ParameterInput onChange={() => {}} /></ParameterShell>
|
|
22646
22671
|
*/
|
|
22647
|
-
declare const ParameterShell: ({ label, labelLeadingIcon, labelTrailingIcon, hiddenLabel, id, errorMessage, warningMessage, infoMessage, caption, errorTestId, captionTestId, menuItems, actionItems, hasOverriddenValue, onResetOverriddenValue, title, children, ...props }: ParameterShellProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22672
|
+
declare const ParameterShell: ({ label, labelLeadingIcon, labelTrailingIcon, hiddenLabel, id, errorMessage, warningMessage, infoMessage, caption, errorTestId, captionTestId, menuItems, actionItems, hasOverriddenValue, onResetOverriddenValue, title, children, isParameterGroup, ...props }: ParameterShellProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22648
22673
|
declare const ParameterShellPlaceholder: ({ children }: {
|
|
22649
22674
|
children?: ReactNode;
|
|
22650
22675
|
}) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -21300,9 +21300,19 @@ type DetailsProps = React$1.HTMLAttributes<HTMLDetailsElement> & {
|
|
|
21300
21300
|
* @default false
|
|
21301
21301
|
*/
|
|
21302
21302
|
isOpenByDefault?: boolean;
|
|
21303
|
+
/** Makes the content indented, and shows an indent guide line.
|
|
21304
|
+
* @default false
|
|
21305
|
+
* @deprecated this prop is in beta, and might get breaking changes in minor releases.
|
|
21306
|
+
*/
|
|
21307
|
+
isIndented?: boolean;
|
|
21308
|
+
/** Makes the the UI of the summary more compact, by removing the paddings.
|
|
21309
|
+
* @default false
|
|
21310
|
+
* @deprecated this prop is in beta, and might get breaking changes in minor releases.
|
|
21311
|
+
*/
|
|
21312
|
+
isCompact?: boolean;
|
|
21303
21313
|
};
|
|
21304
21314
|
/** @example <Details summary="summary text">child content here</Details>*/
|
|
21305
|
-
declare const Details: ({ summary, children, isOpenByDefault, isOpen, onChange, ...props }: DetailsProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
21315
|
+
declare const Details: ({ summary, children, isOpenByDefault, isOpen, isIndented, isCompact, onChange, ...props }: DetailsProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
21306
21316
|
|
|
21307
21317
|
interface DrawerRendererProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
21308
21318
|
/** The ID of the stack to render. Some drawers need to use the same stack ID to be rendered here */
|
|
@@ -21505,12 +21515,18 @@ type ErrorMessageProps = {
|
|
|
21505
21515
|
/** sets the test id for test automation (optional) */
|
|
21506
21516
|
testId?: string;
|
|
21507
21517
|
className?: string;
|
|
21518
|
+
/**
|
|
21519
|
+
* When set to true, the error message will be truncated instead of wrapped
|
|
21520
|
+
* when it's longer than the available width.
|
|
21521
|
+
* @default false
|
|
21522
|
+
**/
|
|
21523
|
+
truncated?: boolean;
|
|
21508
21524
|
};
|
|
21509
21525
|
/**
|
|
21510
21526
|
* Component that provides error messaging to input fields
|
|
21511
21527
|
* @example <ErrorMessage>something went wrong, please try again</ErrorMessage>
|
|
21512
21528
|
*/
|
|
21513
|
-
declare const ErrorMessage: ({ message, testId, ...otherProps }: ErrorMessageProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element | null;
|
|
21529
|
+
declare const ErrorMessage: ({ message, testId, truncated, ...otherProps }: ErrorMessageProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element | null;
|
|
21514
21530
|
|
|
21515
21531
|
type FieldsetProps = React$1.HTMLAttributes<HTMLFieldSetElement> & {
|
|
21516
21532
|
/** sets the legend value */
|
|
@@ -22219,7 +22235,9 @@ type ModalProps = {
|
|
|
22219
22235
|
width?: string;
|
|
22220
22236
|
/** A valid CSS height */
|
|
22221
22237
|
height?: string;
|
|
22222
|
-
/** The classname to set on the wrapper of the modal
|
|
22238
|
+
/** The classname to set on the wrapper of the modal.
|
|
22239
|
+
* @deprecated the dialog is not rendered inside a wrapper anymore.
|
|
22240
|
+
*/
|
|
22223
22241
|
wrapperClassName?: string;
|
|
22224
22242
|
/** Removes the default padding on the content wrapper */
|
|
22225
22243
|
withoutContentPadding?: boolean;
|
|
@@ -22239,7 +22257,9 @@ declare const Modal: React__default.ForwardRefExoticComponent<{
|
|
|
22239
22257
|
width?: string | undefined;
|
|
22240
22258
|
/** A valid CSS height */
|
|
22241
22259
|
height?: string | undefined;
|
|
22242
|
-
/** The classname to set on the wrapper of the modal
|
|
22260
|
+
/** The classname to set on the wrapper of the modal.
|
|
22261
|
+
* @deprecated the dialog is not rendered inside a wrapper anymore.
|
|
22262
|
+
*/
|
|
22243
22263
|
wrapperClassName?: string | undefined;
|
|
22244
22264
|
/** Removes the default padding on the content wrapper */
|
|
22245
22265
|
withoutContentPadding?: boolean | undefined;
|
|
@@ -22638,13 +22658,18 @@ type ParameterShellOverrideProps = {
|
|
|
22638
22658
|
* @deprecated
|
|
22639
22659
|
*/
|
|
22640
22660
|
onResetOverriddenValue?: () => void;
|
|
22661
|
+
/**
|
|
22662
|
+
* Adjusts the UI to work with parameter groups. At the moment, it just remove the white background.
|
|
22663
|
+
* @default false
|
|
22664
|
+
*/
|
|
22665
|
+
isParameterGroup?: boolean;
|
|
22641
22666
|
};
|
|
22642
22667
|
type ParameterShellProps = React.InputHTMLAttributes<HTMLDivElement> & CommonParameterInputProps & ParameterShellOverrideProps;
|
|
22643
22668
|
/**
|
|
22644
22669
|
* Uniform Parameter shell component
|
|
22645
22670
|
* @example <ParameterShell label="my label" id="my-id"><ParameterInput onChange={() => {}} /></ParameterShell>
|
|
22646
22671
|
*/
|
|
22647
|
-
declare const ParameterShell: ({ label, labelLeadingIcon, labelTrailingIcon, hiddenLabel, id, errorMessage, warningMessage, infoMessage, caption, errorTestId, captionTestId, menuItems, actionItems, hasOverriddenValue, onResetOverriddenValue, title, children, ...props }: ParameterShellProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22672
|
+
declare const ParameterShell: ({ label, labelLeadingIcon, labelTrailingIcon, hiddenLabel, id, errorMessage, warningMessage, infoMessage, caption, errorTestId, captionTestId, menuItems, actionItems, hasOverriddenValue, onResetOverriddenValue, title, children, isParameterGroup, ...props }: ParameterShellProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22648
22673
|
declare const ParameterShellPlaceholder: ({ children }: {
|
|
22649
22674
|
children?: ReactNode;
|
|
22650
22675
|
}) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -1597,7 +1597,7 @@ var Theme = ({ disableReset = false, disableGlobalReset = false }) => {
|
|
|
1597
1597
|
{
|
|
1598
1598
|
dangerouslySetInnerHTML: {
|
|
1599
1599
|
__html: `
|
|
1600
|
-
:root, :host {
|
|
1600
|
+
:root, :host, ::backdrop {
|
|
1601
1601
|
--brand-primary-1: #438fd5; /* bright blue */
|
|
1602
1602
|
--brand-primary-2: #f4220b; /* red */
|
|
1603
1603
|
--brand-primary-3: #83c6e1; /* slate blue */
|
|
@@ -1703,12 +1703,22 @@ var Theme = ({ disableReset = false, disableGlobalReset = false }) => {
|
|
|
1703
1703
|
/* max text width */
|
|
1704
1704
|
--prose: 65ch;
|
|
1705
1705
|
|
|
1706
|
+
/* elevation */
|
|
1707
|
+
--elevation-0: none;
|
|
1708
|
+
--elevation-100: 0 0 2px 0 rgba(13, 24, 39, 0.08), 0 2px 4px 0 rgba(17, 24, 39, 0.08);
|
|
1709
|
+
--elevation-200: 0 0 2px 0 rgba(17, 24, 39, 0.07), 0 2px 4px 0 rgba(13, 24, 39, 0.07), 0 4px 8px 0 rgba(17, 24, 39, 0.07);
|
|
1710
|
+
--elevation-300: 0 8px 16px 0 rgba(17, 24, 39, 0.06), 0 2px 4px 0 rgba(13, 24, 39, 0.06), 0 4px 8px 0 rgba(17, 24, 39, 0.06);
|
|
1711
|
+
--elevation-400: 0 8px 16px 0 rgba(17, 24, 39, 0.05), 0 16px 24px 0 rgba(13, 24, 39, 0.05), 0 4px 8px 0 rgba(17, 24, 39, 0.05);
|
|
1712
|
+
--elevation-500: 0 8px 16px 0 rgba(17, 24, 39, 0.04), 0 16px 24px 0 rgba(13, 24, 39, 0.04), 0 24px 32px 0 rgba(17, 24, 39, 0.04);
|
|
1713
|
+
--elevation-600: 0 32px 40px 0 rgba(17, 24, 39, 0.03), 0 16px 24px 0 rgba(13, 24, 39, 0.03), 0 24px 32px 0 rgba(17, 24, 39, 0.03);
|
|
1714
|
+
|
|
1715
|
+
/* deprecated in favour of --elevation-* variables */
|
|
1706
1716
|
/* brand shadow styles */
|
|
1707
|
-
--shadow-sm:
|
|
1708
|
-
--shadow-base:
|
|
1709
|
-
|
|
1710
|
-
--shadow-
|
|
1711
|
-
|
|
1717
|
+
--shadow-sm: var(--elevation-100);
|
|
1718
|
+
--shadow-base: var(--elevation-200);
|
|
1719
|
+
--shadow-md: var(--elevation-300);
|
|
1720
|
+
--shadow-xl: var(--elevation-600);
|
|
1721
|
+
/* deprecated in favour of --elevation-* variables */
|
|
1712
1722
|
|
|
1713
1723
|
/* rounder corners */
|
|
1714
1724
|
--rounded-sm: 0.125rem; /* 2px */
|
|
@@ -14783,6 +14793,13 @@ var detailsContent = import_react53.css`
|
|
|
14783
14793
|
animation: ${fadeInRtl} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
14784
14794
|
will-change: height;
|
|
14785
14795
|
`;
|
|
14796
|
+
var detailsContentIndented = import_react53.css`
|
|
14797
|
+
margin-left: calc(1.25rem / 2);
|
|
14798
|
+
border-left: 1px solid var(--gray-300);
|
|
14799
|
+
padding-top: calc(var(--spacing-md) / 2);
|
|
14800
|
+
padding-left: var(--spacing-base);
|
|
14801
|
+
padding-bottom: var(--spacing-sm);
|
|
14802
|
+
`;
|
|
14786
14803
|
var summary = import_react53.css`
|
|
14787
14804
|
align-items: center;
|
|
14788
14805
|
cursor: pointer;
|
|
@@ -14797,6 +14814,9 @@ var summary = import_react53.css`
|
|
|
14797
14814
|
display: none;
|
|
14798
14815
|
}
|
|
14799
14816
|
`;
|
|
14817
|
+
var summaryCompact = import_react53.css`
|
|
14818
|
+
padding: 0;
|
|
14819
|
+
`;
|
|
14800
14820
|
var summaryIcon = import_react53.css`
|
|
14801
14821
|
transition: rotate var(--duration-fast) var(--timing-ease-out);
|
|
14802
14822
|
rotate: -90deg;
|
|
@@ -14812,6 +14832,8 @@ var Details = ({
|
|
|
14812
14832
|
children,
|
|
14813
14833
|
isOpenByDefault = false,
|
|
14814
14834
|
isOpen,
|
|
14835
|
+
isIndented = false,
|
|
14836
|
+
isCompact = false,
|
|
14815
14837
|
onChange,
|
|
14816
14838
|
...props
|
|
14817
14839
|
}) => {
|
|
@@ -14833,7 +14855,7 @@ var Details = ({
|
|
|
14833
14855
|
ref: detailsRef,
|
|
14834
14856
|
...props,
|
|
14835
14857
|
children: [
|
|
14836
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("summary", { "data-testid": "summary", css: summary, children: [
|
|
14858
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("summary", { "data-testid": "summary", css: [summary, isCompact ? summaryCompact : null], children: [
|
|
14837
14859
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
14838
14860
|
Icon,
|
|
14839
14861
|
{
|
|
@@ -14845,7 +14867,14 @@ var Details = ({
|
|
|
14845
14867
|
),
|
|
14846
14868
|
summary2
|
|
14847
14869
|
] }),
|
|
14848
|
-
memoizedIsOpen ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
14870
|
+
memoizedIsOpen ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
14871
|
+
"div",
|
|
14872
|
+
{
|
|
14873
|
+
"data-testid": "details-content",
|
|
14874
|
+
css: [detailsContent, isIndented ? detailsContentIndented : null],
|
|
14875
|
+
children
|
|
14876
|
+
}
|
|
14877
|
+
) : null
|
|
14849
14878
|
]
|
|
14850
14879
|
}
|
|
14851
14880
|
);
|
|
@@ -15103,10 +15132,12 @@ var useCurrentDrawer = () => {
|
|
|
15103
15132
|
};
|
|
15104
15133
|
var Drawer = import_react56.default.forwardRef(
|
|
15105
15134
|
({ minWidth, maxWidth, position, leftAligned, ...drawerProps }, ref) => {
|
|
15135
|
+
var _a;
|
|
15106
15136
|
const { stackId: inheritedStackId } = useCurrentDrawer();
|
|
15107
15137
|
const { drawerTakeoverStackId } = useDrawer();
|
|
15108
15138
|
const drawerRendererProps = { width: drawerProps.width, minWidth, maxWidth, position, leftAligned };
|
|
15109
|
-
|
|
15139
|
+
const resolvedStickyStackIdRef = (0, import_react56.useRef)((_a = drawerTakeoverStackId != null ? drawerTakeoverStackId : drawerProps.stackId) != null ? _a : inheritedStackId);
|
|
15140
|
+
return resolvedStickyStackIdRef.current ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DrawerInner, { ref, ...drawerProps, stackId: resolvedStickyStackIdRef.current }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(DrawerProvider, { children: [
|
|
15110
15141
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DrawerInner, { ref, ...drawerProps }),
|
|
15111
15142
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DrawerRenderer, { stackId: defaultSackId, ...drawerRendererProps })
|
|
15112
15143
|
] });
|
|
@@ -15541,19 +15572,29 @@ var import_MdWarning = require("@react-icons/all-files/md/MdWarning");
|
|
|
15541
15572
|
// src/components/Input/styles/ErrorMessage.styles.ts
|
|
15542
15573
|
init_emotion_jsx_shim();
|
|
15543
15574
|
var import_react65 = require("@emotion/react");
|
|
15544
|
-
var
|
|
15575
|
+
var errorMessageStyles = import_react65.css`
|
|
15545
15576
|
align-items: center;
|
|
15546
15577
|
color: var(--brand-secondary-5);
|
|
15547
15578
|
display: flex;
|
|
15548
15579
|
gap: var(--spacing-sm);
|
|
15549
15580
|
`;
|
|
15581
|
+
var errorMessageTextStyles = import_react65.css`
|
|
15582
|
+
/* We hide the text at width 5rem or below */
|
|
15583
|
+
max-width: max(0px, calc((100% - 5rem) * 9999));
|
|
15584
|
+
overflow: hidden;
|
|
15585
|
+
`;
|
|
15586
|
+
var errorMessageTextTruncatedStyles = import_react65.css`
|
|
15587
|
+
overflow: hidden;
|
|
15588
|
+
text-overflow: ellipsis;
|
|
15589
|
+
white-space: nowrap;
|
|
15590
|
+
`;
|
|
15550
15591
|
|
|
15551
15592
|
// src/components/Input/ErrorMessage.tsx
|
|
15552
15593
|
var import_jsx_runtime51 = require("@emotion/react/jsx-runtime");
|
|
15553
|
-
var ErrorMessage = ({ message, testId, ...otherProps }) => {
|
|
15554
|
-
return message ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { role: "alert", css:
|
|
15594
|
+
var ErrorMessage = ({ message, testId, truncated = false, ...otherProps }) => {
|
|
15595
|
+
return message ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { role: "alert", css: errorMessageStyles, "data-testid": testId, ...otherProps, title: message, children: [
|
|
15555
15596
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Icon, { icon: import_MdWarning.MdWarning, size: "1rem", iconColor: "currentColor" }) }),
|
|
15556
|
-
message
|
|
15597
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { css: [errorMessageTextStyles, truncated ? errorMessageTextTruncatedStyles : null], children: message })
|
|
15557
15598
|
] }) : null;
|
|
15558
15599
|
};
|
|
15559
15600
|
|
|
@@ -16306,6 +16347,15 @@ var imgLoaded = import_react74.css`
|
|
|
16306
16347
|
var brokenImage = import_react74.css`
|
|
16307
16348
|
height: 160px;
|
|
16308
16349
|
`;
|
|
16350
|
+
var brokenImageMessage = import_react74.css`
|
|
16351
|
+
position: absolute;
|
|
16352
|
+
bottom: var(--spacing-xs);
|
|
16353
|
+
left: var(--spacing-xs);
|
|
16354
|
+
width: 100%;
|
|
16355
|
+
justify-content: center;
|
|
16356
|
+
padding-inline: var(--spacing-xs);
|
|
16357
|
+
font-size: var(--fs-sm);
|
|
16358
|
+
`;
|
|
16309
16359
|
var variantFillImageWrapper = import_react74.css`
|
|
16310
16360
|
display: flex;
|
|
16311
16361
|
justify-content: center;
|
|
@@ -16314,6 +16364,7 @@ var variantFillImageWrapper = import_react74.css`
|
|
|
16314
16364
|
`;
|
|
16315
16365
|
var variantFillImageImg = import_react74.css`
|
|
16316
16366
|
height: inherit;
|
|
16367
|
+
width: inherit;
|
|
16317
16368
|
`;
|
|
16318
16369
|
|
|
16319
16370
|
// src/components/Image/ImageBroken.tsx
|
|
@@ -16432,18 +16483,26 @@ function Image({
|
|
|
16432
16483
|
onError: handleErrorEvent
|
|
16433
16484
|
}
|
|
16434
16485
|
) : null,
|
|
16435
|
-
src && loadErrorText ? /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
16436
|
-
|
|
16437
|
-
|
|
16438
|
-
{
|
|
16439
|
-
|
|
16440
|
-
|
|
16441
|
-
height
|
|
16442
|
-
|
|
16443
|
-
|
|
16444
|
-
|
|
16445
|
-
|
|
16446
|
-
|
|
16486
|
+
src && loadErrorText ? /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
16487
|
+
"span",
|
|
16488
|
+
{
|
|
16489
|
+
style: {
|
|
16490
|
+
display: "inline-flex",
|
|
16491
|
+
position: "relative",
|
|
16492
|
+
...variant === "fill-container" ? {} : { width, height }
|
|
16493
|
+
},
|
|
16494
|
+
children: [
|
|
16495
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
16496
|
+
ImageBroken,
|
|
16497
|
+
{
|
|
16498
|
+
css: [brokenImage, img, imgLoaded],
|
|
16499
|
+
"data-testid": "broken-image"
|
|
16500
|
+
}
|
|
16501
|
+
),
|
|
16502
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ErrorMessage, { message: loadErrorText, css: brokenImageMessage, truncated: true })
|
|
16503
|
+
]
|
|
16504
|
+
}
|
|
16505
|
+
) : null
|
|
16447
16506
|
]
|
|
16448
16507
|
}
|
|
16449
16508
|
);
|
|
@@ -17796,9 +17855,11 @@ var cardBase = import_react96.css`
|
|
|
17796
17855
|
min-height: unset;
|
|
17797
17856
|
outline: none;
|
|
17798
17857
|
cursor: pointer;
|
|
17858
|
+
transition: border-color var(--duration-xfast) ease-in-out;
|
|
17799
17859
|
|
|
17800
17860
|
&:hover {
|
|
17801
17861
|
--mediacard-title-color: var(--brand-secondary-1);
|
|
17862
|
+
border-color: var(--primary-action-hover);
|
|
17802
17863
|
}
|
|
17803
17864
|
`;
|
|
17804
17865
|
var coverWrapper = import_react96.css`
|
|
@@ -17875,7 +17936,7 @@ var MediaCard = ({
|
|
|
17875
17936
|
e.stopPropagation();
|
|
17876
17937
|
}, []);
|
|
17877
17938
|
const hasMenuItems = Array.isArray(menuItems) ? menuItems.length > 0 : Boolean(menuItems);
|
|
17878
|
-
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(Card, { css: cardBase, ...cardProps, onClick, children: [
|
|
17939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(Card, { css: cardBase, ...cardProps, onClick, "data-testId": "card-item", children: [
|
|
17879
17940
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("button", { tabIndex: -1, css: coverWrapper, children: cover }),
|
|
17880
17941
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { css: contentWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(HorizontalRhythm, { gap: "sm", justify: "space-between", align: "center", css: { width: "100%" }, children: [
|
|
17881
17942
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(VerticalRhythm, { gap: "0", align: "flex-start", css: { flex: 1, minWidth: 0 }, children: [
|
|
@@ -17907,7 +17968,16 @@ var MediaCard = ({
|
|
|
17907
17968
|
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
17908
17969
|
Menu,
|
|
17909
17970
|
{
|
|
17910
|
-
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
17971
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
17972
|
+
"button",
|
|
17973
|
+
{
|
|
17974
|
+
type: "button",
|
|
17975
|
+
"aria-label": "More options",
|
|
17976
|
+
css: menuButton,
|
|
17977
|
+
"data-testId": "button-more",
|
|
17978
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Icon, { icon: "more-alt", iconColor: "gray", size: 16 })
|
|
17979
|
+
}
|
|
17980
|
+
),
|
|
17911
17981
|
menuLabel: `Menu of ${title2}`,
|
|
17912
17982
|
children: menuItems
|
|
17913
17983
|
}
|
|
@@ -17934,26 +18004,33 @@ var modalWrapperStyles = import_react98.css`
|
|
|
17934
18004
|
justify-content: center;
|
|
17935
18005
|
z-index: var(--z-drawer);
|
|
17936
18006
|
`;
|
|
17937
|
-
var modalBackdropStyles = import_react98.css`
|
|
17938
|
-
position: absolute;
|
|
17939
|
-
inset: 0;
|
|
17940
|
-
background-color: var(--brand-secondary-1);
|
|
17941
|
-
opacity: 0.4;
|
|
17942
|
-
`;
|
|
17943
18007
|
var modalStyles = import_react98.css`
|
|
17944
18008
|
position: relative;
|
|
18009
|
+
max-width: calc(100% - var(--spacing-base) * 2);
|
|
18010
|
+
max-height: calc(100% - var(--spacing-base) * 2);
|
|
18011
|
+
padding: 0;
|
|
18012
|
+
background-color: transparent;
|
|
18013
|
+
z-index: 1;
|
|
18014
|
+
|
|
18015
|
+
&::backdrop {
|
|
18016
|
+
background-color: var(--brand-secondary-1);
|
|
18017
|
+
opacity: 0.4;
|
|
18018
|
+
}
|
|
18019
|
+
`;
|
|
18020
|
+
var modalInnerStyles = import_react98.css`
|
|
18021
|
+
position: relative;
|
|
18022
|
+
width: 100%;
|
|
18023
|
+
height: 100%;
|
|
17945
18024
|
display: flex;
|
|
17946
18025
|
flex-direction: column;
|
|
17947
18026
|
justify-content: stretch;
|
|
17948
|
-
max-width: calc(100% - var(--spacing-base) * 2);
|
|
17949
|
-
max-height: calc(100% - var(--spacing-base) * 2);
|
|
17950
18027
|
gap: var(--spacing-base);
|
|
17951
18028
|
background: var(--gray-50);
|
|
18029
|
+
color: unset;
|
|
18030
|
+
padding: var(--spacing-base);
|
|
18031
|
+
box-shadow: var(--elevation-500);
|
|
17952
18032
|
border-radius: var(--rounded-base);
|
|
17953
18033
|
border: 1px solid var(--gray-300);
|
|
17954
|
-
padding: var(--spacing-base);
|
|
17955
|
-
color: unset;
|
|
17956
|
-
z-index: 1;
|
|
17957
18034
|
`;
|
|
17958
18035
|
var modalHeaderStyles = import_react98.css`
|
|
17959
18036
|
display: flex;
|
|
@@ -17962,6 +18039,9 @@ var modalHeaderStyles = import_react98.css`
|
|
|
17962
18039
|
font-size: var(--fs-md);
|
|
17963
18040
|
line-height: 1.2;
|
|
17964
18041
|
`;
|
|
18042
|
+
var modalHeaderHeaderStyles = import_react98.css`
|
|
18043
|
+
max-width: calc(100% - 3rem);
|
|
18044
|
+
`;
|
|
17965
18045
|
var modalCloseButtonStyles = import_react98.css`
|
|
17966
18046
|
display: block;
|
|
17967
18047
|
padding: 0;
|
|
@@ -17989,47 +18069,63 @@ var Modal = import_react99.default.forwardRef(
|
|
|
17989
18069
|
onRequestClose,
|
|
17990
18070
|
width = defaultModalWidth,
|
|
17991
18071
|
height = defaultModalHeight,
|
|
17992
|
-
wrapperClassName,
|
|
17993
18072
|
withoutContentPadding = false,
|
|
17994
18073
|
buttonGroup,
|
|
17995
18074
|
...modalProps
|
|
17996
18075
|
}, ref) => {
|
|
18076
|
+
const dialogRef = (0, import_react99.useRef)(null);
|
|
17997
18077
|
useShortcut({
|
|
17998
18078
|
handler: onRequestClose,
|
|
17999
18079
|
shortcut: "escape"
|
|
18000
18080
|
});
|
|
18001
|
-
|
|
18002
|
-
|
|
18003
|
-
|
|
18004
|
-
|
|
18005
|
-
|
|
18006
|
-
|
|
18007
|
-
|
|
18008
|
-
|
|
18009
|
-
|
|
18010
|
-
|
|
18011
|
-
|
|
18012
|
-
|
|
18013
|
-
|
|
18014
|
-
|
|
18015
|
-
|
|
18016
|
-
|
|
18017
|
-
|
|
18018
|
-
|
|
18019
|
-
|
|
18020
|
-
|
|
18021
|
-
|
|
18022
|
-
|
|
18023
|
-
|
|
18024
|
-
|
|
18025
|
-
|
|
18026
|
-
|
|
18027
|
-
|
|
18028
|
-
|
|
18029
|
-
|
|
18030
|
-
|
|
18031
|
-
|
|
18032
|
-
|
|
18081
|
+
(0, import_react99.useEffect)(() => {
|
|
18082
|
+
var _a;
|
|
18083
|
+
(_a = dialogRef.current) == null ? void 0 : _a.showModal();
|
|
18084
|
+
return () => {
|
|
18085
|
+
var _a2;
|
|
18086
|
+
return (_a2 = dialogRef.current) == null ? void 0 : _a2.close();
|
|
18087
|
+
};
|
|
18088
|
+
}, []);
|
|
18089
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
18090
|
+
"dialog",
|
|
18091
|
+
{
|
|
18092
|
+
ref: (element) => {
|
|
18093
|
+
dialogRef.current = element;
|
|
18094
|
+
if (!ref) {
|
|
18095
|
+
return;
|
|
18096
|
+
}
|
|
18097
|
+
if (typeof ref === "function") {
|
|
18098
|
+
ref(element);
|
|
18099
|
+
} else {
|
|
18100
|
+
ref.current = element;
|
|
18101
|
+
}
|
|
18102
|
+
},
|
|
18103
|
+
css: modalStyles,
|
|
18104
|
+
style: { width, height: height === "auto" ? "min-content" : height },
|
|
18105
|
+
"data-testid": "side-dialog",
|
|
18106
|
+
onClick: onRequestClose,
|
|
18107
|
+
...modalProps,
|
|
18108
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { css: modalInnerStyles, onClick: (e) => e.stopPropagation(), children: [
|
|
18109
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { css: modalHeaderStyles, children: [
|
|
18110
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { css: modalHeaderHeaderStyles, children: header }),
|
|
18111
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
18112
|
+
Button,
|
|
18113
|
+
{
|
|
18114
|
+
type: "button",
|
|
18115
|
+
onClick: onRequestClose,
|
|
18116
|
+
css: modalCloseButtonStyles,
|
|
18117
|
+
title: "Close dialog",
|
|
18118
|
+
buttonType: "ghost",
|
|
18119
|
+
"data-testid": "close-dialog",
|
|
18120
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Icon, { icon: import_CgClose6.CgClose, iconColor: "gray", size: 24 })
|
|
18121
|
+
}
|
|
18122
|
+
)
|
|
18123
|
+
] }),
|
|
18124
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { css: [modalContentStyles, !withoutContentPadding ? null : { padding: 0 }], children }),
|
|
18125
|
+
buttonGroup ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(HorizontalRhythm, { children: buttonGroup }) : null
|
|
18126
|
+
] })
|
|
18127
|
+
}
|
|
18128
|
+
);
|
|
18033
18129
|
}
|
|
18034
18130
|
);
|
|
18035
18131
|
Modal.displayName = "Modal";
|
|
@@ -18773,6 +18869,7 @@ var ParameterShell = ({
|
|
|
18773
18869
|
onResetOverriddenValue,
|
|
18774
18870
|
title: title2,
|
|
18775
18871
|
children,
|
|
18872
|
+
isParameterGroup = false,
|
|
18776
18873
|
...props
|
|
18777
18874
|
}) => {
|
|
18778
18875
|
const [manualErrorMessage, setManualErrorMessage] = (0, import_react111.useState)(void 0);
|
|
@@ -18816,7 +18913,7 @@ var ParameterShell = ({
|
|
|
18816
18913
|
errorMessage: errorMessaging,
|
|
18817
18914
|
handleManuallySetErrorMessage: (message) => setErrorMessage(message)
|
|
18818
18915
|
},
|
|
18819
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(ParameterShellPlaceholder, { children: [
|
|
18916
|
+
children: isParameterGroup ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { style: { flexGrow: 1 }, children }) : /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(ParameterShellPlaceholder, { children: [
|
|
18820
18917
|
children,
|
|
18821
18918
|
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ParameterOverrideMarker, { onClick: onResetOverriddenValue }) : null
|
|
18822
18919
|
] })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/design-system",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.79.0",
|
|
4
4
|
"description": "Uniform design system components",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"@storybook/react": "6.5.16",
|
|
24
24
|
"@types/react": "18.2.21",
|
|
25
25
|
"@types/react-dom": "18.2.7",
|
|
26
|
-
"@uniformdev/canvas": "^19.
|
|
27
|
-
"@uniformdev/richtext": "^19.
|
|
26
|
+
"@uniformdev/canvas": "^19.79.0",
|
|
27
|
+
"@uniformdev/richtext": "^19.79.0",
|
|
28
28
|
"autoprefixer": "10.4.16",
|
|
29
29
|
"hygen": "6.2.11",
|
|
30
30
|
"postcss": "8.4.31",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "78f5ededbaa1a67d58d808eac23ab64769e14e10"
|
|
71
71
|
}
|