@uniformdev/design-system 19.38.3-alpha.70 → 19.39.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 CHANGED
@@ -13120,9 +13120,9 @@ var useCurrentDrawer = () => {
13120
13120
  return useContext5(CurrentDrawerContext);
13121
13121
  };
13122
13122
  var Drawer = React13.forwardRef(
13123
- ({ width, minWidth, maxWidth, position, leftAligned, ...drawerProps }, ref) => {
13123
+ ({ minWidth, maxWidth, position, leftAligned, ...drawerProps }, ref) => {
13124
13124
  const { stackId: inheritedStackId } = useCurrentDrawer();
13125
- const drawerRendererProps = { width, minWidth, maxWidth, position, leftAligned };
13125
+ const drawerRendererProps = { width: drawerProps.width, minWidth, maxWidth, position, leftAligned };
13126
13126
  return drawerProps.stackId ? /* @__PURE__ */ jsx44(DrawerInner, { ref, ...drawerProps }) : inheritedStackId ? /* @__PURE__ */ jsx44(DrawerInner, { ref, ...drawerProps, stackId: inheritedStackId }) : /* @__PURE__ */ jsxs26(DrawerProvider, { children: [
13127
13127
  /* @__PURE__ */ jsx44(DrawerInner, { ref, ...drawerProps }),
13128
13128
  /* @__PURE__ */ jsx44(DrawerRenderer, { stackId: defaultSackId, ...drawerRendererProps })
@@ -13139,6 +13139,7 @@ var DrawerInner = ({
13139
13139
  instanceKey,
13140
13140
  onRequestClose,
13141
13141
  leftAligned,
13142
+ width,
13142
13143
  testId = "side-dialog"
13143
13144
  }) => {
13144
13145
  const { registerDrawer, unregisterDrawer, providerId } = useDrawer();
@@ -13147,6 +13148,7 @@ var DrawerInner = ({
13147
13148
  useEffect5(() => {
13148
13149
  registerDrawer({
13149
13150
  drawer: {
13151
+ width,
13150
13152
  id,
13151
13153
  stackId,
13152
13154
  onRequestClose,
@@ -13250,8 +13252,13 @@ var DrawerContent2 = ({ children, buttonGroup, noPadding = false, ...props }) =>
13250
13252
  };
13251
13253
 
13252
13254
  // src/components/Drawer/DrawerRenderer.tsx
13253
- import { useEffect as useEffect6 } from "react";
13255
+ import { useEffect as useEffect6, useMemo as useMemo2 } from "react";
13254
13256
  import { Fragment as Fragment6, jsx as jsx46, jsxs as jsxs28 } from "@emotion/react/jsx-runtime";
13257
+ var drawerWidth = {
13258
+ narrow: "29rem",
13259
+ medium: "43rem",
13260
+ wide: "57rem"
13261
+ };
13255
13262
  var maxLayeringInPx = 64;
13256
13263
  var idealDistanceBetweenLayersInPx = 16;
13257
13264
  var DrawerRenderer = ({
@@ -13261,15 +13268,11 @@ var DrawerRenderer = ({
13261
13268
  minWidth = "0",
13262
13269
  maxWidth = "100%",
13263
13270
  leftAligned = false,
13271
+ withoutFluidWidth = false,
13264
13272
  ...otherProps
13265
13273
  }) => {
13266
13274
  const { drawersRegistry, providerId } = useDrawer();
13267
13275
  const drawersToRender = drawersRegistry.filter(({ stackId: sId }) => sId === stackId);
13268
- const drawerWidth = {
13269
- narrow: "29rem",
13270
- medium: "43rem",
13271
- wide: "57rem"
13272
- };
13273
13276
  useEffect6(() => {
13274
13277
  drawersToRender.forEach(({ isFirstRender, onFirstRender }) => {
13275
13278
  if (isFirstRender) {
@@ -13277,6 +13280,17 @@ var DrawerRenderer = ({
13277
13280
  }
13278
13281
  });
13279
13282
  }, [drawersToRender]);
13283
+ const unionWidth = useMemo2(() => {
13284
+ var _a;
13285
+ const rendererWidth = (_a = drawerWidth[width]) != null ? _a : width;
13286
+ if (withoutFluidWidth) {
13287
+ return rendererWidth;
13288
+ }
13289
+ const drawerWidths = [rendererWidth, ...drawersToRender.map(({ width: width2 }) => width2)].filter(
13290
+ (v) => typeof v === "string"
13291
+ );
13292
+ return `max(${drawerWidths.join()})`;
13293
+ }, [drawersToRender, width, withoutFluidWidth]);
13280
13294
  if (drawersToRender.length === 0) {
13281
13295
  return null;
13282
13296
  }
@@ -13289,29 +13303,26 @@ var DrawerRenderer = ({
13289
13303
  position === "sticky" ? { height: "100%", marginTop: "-100%" } : void 0
13290
13304
  ],
13291
13305
  ...otherProps,
13292
- children: drawersToRender.map(({ id, stackId: stackId2, onRequestClose }, index) => {
13293
- var _a;
13294
- return /* @__PURE__ */ jsx46(
13295
- DrawerWrapper,
13296
- {
13297
- index,
13298
- totalDrawers: drawersToRender.length,
13299
- width: (_a = drawerWidth[width]) != null ? _a : width,
13300
- minWidth,
13301
- maxWidth,
13302
- onOverlayClick: onRequestClose,
13303
- leftAligned,
13304
- children: /* @__PURE__ */ jsx46(
13305
- "div",
13306
- {
13307
- ...getDrawerAttributes({ providerId, stackId: stackId2, id }),
13308
- style: { width: "100%", height: "100%" }
13309
- }
13310
- )
13311
- },
13312
- `${stackId2}-${id}`
13313
- );
13314
- })
13306
+ children: drawersToRender.map(({ id, stackId: stackId2, onRequestClose }, index) => /* @__PURE__ */ jsx46(
13307
+ DrawerWrapper,
13308
+ {
13309
+ index,
13310
+ totalDrawers: drawersToRender.length,
13311
+ width: unionWidth,
13312
+ minWidth,
13313
+ maxWidth,
13314
+ onOverlayClick: onRequestClose,
13315
+ leftAligned,
13316
+ children: /* @__PURE__ */ jsx46(
13317
+ "div",
13318
+ {
13319
+ ...getDrawerAttributes({ providerId, stackId: stackId2, id }),
13320
+ style: { width: "100%", height: "100%" }
13321
+ }
13322
+ )
13323
+ },
13324
+ `${stackId2}-${id}`
13325
+ ))
13315
13326
  }
13316
13327
  );
13317
13328
  };
@@ -16042,6 +16053,7 @@ var emptyParameterShell = css74`
16042
16053
  flex-grow: 1;
16043
16054
  padding: var(--spacing-xs);
16044
16055
  position: relative;
16056
+ max-width: 100%;
16045
16057
  `;
16046
16058
  var emptyParameterShellText = css74`
16047
16059
  background: var(--brand-secondary-6);
@@ -17338,7 +17350,7 @@ import {
17338
17350
  FORMAT_TEXT_COMMAND,
17339
17351
  SELECTION_CHANGE_COMMAND
17340
17352
  } from "lexical";
17341
- import { useCallback as useCallback5, useEffect as useEffect13, useMemo as useMemo2, useState as useState11 } from "react";
17353
+ import { useCallback as useCallback5, useEffect as useEffect13, useMemo as useMemo3, useState as useState11 } from "react";
17342
17354
  import { Fragment as Fragment15, jsx as jsx98, jsxs as jsxs66 } from "@emotion/react/jsx-runtime";
17343
17355
  var toolbar = css78`
17344
17356
  background: var(--gray-50);
@@ -17631,26 +17643,26 @@ var RichTextToolbar = ({ config, customControls }) => {
17631
17643
  var RichTextToolbar_default = RichTextToolbar;
17632
17644
  var useRichTextToolbarState = ({ config }) => {
17633
17645
  var _a;
17634
- const enabledBuiltInFormats = useMemo2(() => {
17646
+ const enabledBuiltInFormats = useMemo3(() => {
17635
17647
  return richTextBuiltInFormats.filter((format) => {
17636
17648
  var _a2, _b;
17637
17649
  return (_b = (_a2 = config == null ? void 0 : config.formatting) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(format.type);
17638
17650
  });
17639
17651
  }, [config]);
17640
- const enabledBuiltInElements = useMemo2(() => {
17652
+ const enabledBuiltInElements = useMemo3(() => {
17641
17653
  return richTextBuiltInElements.filter((element) => {
17642
17654
  var _a2, _b;
17643
17655
  return (_b = (_a2 = config == null ? void 0 : config.elements) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(element.type);
17644
17656
  });
17645
17657
  }, [config]);
17646
- const enabledBuiltInFormatsWithIcon = useMemo2(() => {
17658
+ const enabledBuiltInFormatsWithIcon = useMemo3(() => {
17647
17659
  return enabledBuiltInFormats.filter((format) => FORMATS_WITH_ICON.has(format.type));
17648
17660
  }, [enabledBuiltInFormats]);
17649
17661
  const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
17650
17662
  (format) => !FORMATS_WITH_ICON.has(format.type)
17651
17663
  );
17652
17664
  const [activeFormats, setActiveFormats] = useState11([]);
17653
- const visibleFormatsWithIcon = useMemo2(() => {
17665
+ const visibleFormatsWithIcon = useMemo3(() => {
17654
17666
  const visibleFormats = /* @__PURE__ */ new Set();
17655
17667
  activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
17656
17668
  visibleFormats.add(type);
@@ -17660,7 +17672,7 @@ var useRichTextToolbarState = ({ config }) => {
17660
17672
  });
17661
17673
  return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
17662
17674
  }, [activeFormats, enabledBuiltInFormatsWithIcon]);
17663
- const visibleFormatsWithoutIcon = useMemo2(() => {
17675
+ const visibleFormatsWithoutIcon = useMemo3(() => {
17664
17676
  const visibleFormats = /* @__PURE__ */ new Set();
17665
17677
  activeFormats.filter((type) => !FORMATS_WITH_ICON.has(type)).forEach((type) => {
17666
17678
  visibleFormats.add(type);
@@ -17674,7 +17686,7 @@ var useRichTextToolbarState = ({ config }) => {
17674
17686
  const enabledTextualElements = enabledBuiltInElements.filter(
17675
17687
  (element) => TEXTUAL_ELEMENTS.includes(element.type)
17676
17688
  );
17677
- const visibleTextualElements = useMemo2(() => {
17689
+ const visibleTextualElements = useMemo3(() => {
17678
17690
  if (!TEXTUAL_ELEMENTS.includes(activeElement)) {
17679
17691
  return enabledTextualElements;
17680
17692
  }
@@ -17686,23 +17698,23 @@ var useRichTextToolbarState = ({ config }) => {
17686
17698
  );
17687
17699
  }, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
17688
17700
  const [isLink, setIsLink] = useState11(false);
17689
- const linkElementVisible = useMemo2(() => {
17701
+ const linkElementVisible = useMemo3(() => {
17690
17702
  return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
17691
17703
  }, [isLink, enabledBuiltInElements]);
17692
- const visibleLists = useMemo2(() => {
17704
+ const visibleLists = useMemo3(() => {
17693
17705
  return new Set(
17694
17706
  ["orderedList", "unorderedList"].filter(
17695
17707
  (type) => enabledBuiltInElements.some((element) => element.type === type) || activeElement === type
17696
17708
  )
17697
17709
  );
17698
17710
  }, [activeElement, enabledBuiltInElements]);
17699
- const quoteElementVisible = useMemo2(() => {
17711
+ const quoteElementVisible = useMemo3(() => {
17700
17712
  return enabledBuiltInElements.some((element) => element.type === "quote") || activeElement === "quote";
17701
17713
  }, [activeElement, enabledBuiltInElements]);
17702
- const codeElementVisible = useMemo2(() => {
17714
+ const codeElementVisible = useMemo3(() => {
17703
17715
  return enabledBuiltInElements.some((element) => element.type === "code") || activeElement === "code";
17704
17716
  }, [activeElement, enabledBuiltInElements]);
17705
- const visibleElementsWithIcons = useMemo2(() => {
17717
+ const visibleElementsWithIcons = useMemo3(() => {
17706
17718
  const visibleElements = /* @__PURE__ */ new Set();
17707
17719
  if (linkElementVisible) {
17708
17720
  visibleElements.add("link");
@@ -18095,7 +18107,7 @@ var Popover2 = ({
18095
18107
 
18096
18108
  // src/components/ProgressList/ProgressList.tsx
18097
18109
  import { css as css81 } from "@emotion/react";
18098
- import { useMemo as useMemo3 } from "react";
18110
+ import { useMemo as useMemo4 } from "react";
18099
18111
  import { CgCheckO as CgCheckO2, CgRadioCheck, CgRecord } from "react-icons/cg";
18100
18112
 
18101
18113
  // src/components/ProgressList/styles/ProgressList.styles.ts
@@ -18115,7 +18127,7 @@ var progressListItemStyles = css80`
18115
18127
  // src/components/ProgressList/ProgressList.tsx
18116
18128
  import { jsx as jsx104, jsxs as jsxs71 } from "@emotion/react/jsx-runtime";
18117
18129
  var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
18118
- const itemsWithStatus = useMemo3(() => {
18130
+ const itemsWithStatus = useMemo4(() => {
18119
18131
  const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
18120
18132
  return items.map((item, index) => {
18121
18133
  let status = "queued";
@@ -18148,7 +18160,7 @@ var ProgressListItem = ({
18148
18160
  errorLevel = "danger",
18149
18161
  autoEllipsis = false
18150
18162
  }) => {
18151
- const Icon2 = useMemo3(() => {
18163
+ const Icon2 = useMemo4(() => {
18152
18164
  if (error) {
18153
18165
  return warningIcon;
18154
18166
  }
@@ -18159,7 +18171,7 @@ var ProgressListItem = ({
18159
18171
  };
18160
18172
  return iconPerStatus[status];
18161
18173
  }, [status, error]);
18162
- const statusStyles = useMemo3(() => {
18174
+ const statusStyles = useMemo4(() => {
18163
18175
  if (error) {
18164
18176
  return errorLevel === "caution" ? css81`
18165
18177
  color: rgb(161, 98, 7);
@@ -18197,7 +18209,7 @@ var ProgressListItem = ({
18197
18209
 
18198
18210
  // src/components/SegmentedControl/SegmentedControl.tsx
18199
18211
  import { css as css83 } from "@emotion/react";
18200
- import { useCallback as useCallback6, useMemo as useMemo4 } from "react";
18212
+ import { useCallback as useCallback6, useMemo as useMemo5 } from "react";
18201
18213
  import { CgCheck as CgCheck4 } from "react-icons/cg";
18202
18214
 
18203
18215
  // src/components/SegmentedControl/SegmentedControl.styles.ts
@@ -18342,7 +18354,7 @@ var SegmentedControl = ({
18342
18354
  },
18343
18355
  [options, onChange]
18344
18356
  );
18345
- const sizeStyles = useMemo4(() => {
18357
+ const sizeStyles = useMemo5(() => {
18346
18358
  const map = {
18347
18359
  sm: css83({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
18348
18360
  md: css83({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
@@ -18350,7 +18362,7 @@ var SegmentedControl = ({
18350
18362
  };
18351
18363
  return map[size];
18352
18364
  }, [size]);
18353
- const isIconOnly = useMemo4(() => {
18365
+ const isIconOnly = useMemo5(() => {
18354
18366
  return options.every((option) => option.icon && !option.label);
18355
18367
  }, [options]);
18356
18368
  return /* @__PURE__ */ jsx105(
@@ -18617,7 +18629,7 @@ var TableCellData = React24.forwardRef(
18617
18629
  );
18618
18630
 
18619
18631
  // src/components/Tabs/Tabs.tsx
18620
- import { createContext as createContext6, useContext as useContext7, useEffect as useEffect15, useMemo as useMemo5 } from "react";
18632
+ import { createContext as createContext6, useContext as useContext7, useEffect as useEffect15, useMemo as useMemo6 } from "react";
18621
18633
  import {
18622
18634
  Tab as ReakitTab,
18623
18635
  TabList as ReakitTabList,
@@ -18661,7 +18673,7 @@ var useCurrentTab = () => {
18661
18673
  return context;
18662
18674
  };
18663
18675
  var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...props }) => {
18664
- const selected = useMemo5(() => {
18676
+ const selected = useMemo6(() => {
18665
18677
  if (selectedId)
18666
18678
  return selectedId;
18667
18679
  return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
package/dist/index.d.mts CHANGED
@@ -20527,6 +20527,60 @@ type DetailsProps = React$1.HTMLAttributes<HTMLDetailsElement> & {
20527
20527
  /** @example <Details summary="summary text">child content here</Details>*/
20528
20528
  declare const Details: ({ summary, children, isOpenByDefault, isOpen, onChange, ...props }: DetailsProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
20529
20529
 
20530
+ interface DrawerRendererProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, 'children'> {
20531
+ /** The ID of the stack to render. Some drawers need to use the same stack ID to be rendered here */
20532
+ stackId: string;
20533
+ /** The width of the drawers. In any CSS length unit (px, rem, %, et al). Can't use CSS functions (e.g. calc())
20534
+ * @default 'medium'
20535
+ */
20536
+ width?: 'narrow' | 'medium' | 'wide' | (string & NonNullable<unknown>);
20537
+ /** The minimum width of the drawers. In any CSS length unit (px, rem, %, et al)
20538
+ * @default '0'
20539
+ */
20540
+ minWidth?: string;
20541
+ /** The maximum width of the drawers. In any CSS length unit (px, rem, %, et al)
20542
+ * @default '100%'
20543
+ */
20544
+ maxWidth?: string;
20545
+ /** Sets the css position value
20546
+ * @default 'absolute'
20547
+ */
20548
+ position?: 'absolute' | 'fixed' | 'sticky';
20549
+ /** Opens the drawer from left to right
20550
+ * @default false
20551
+ */
20552
+ leftAligned?: boolean;
20553
+ /**
20554
+ * If a drawer in the stack has a specific `width` prop, and its value is larger than the width of the current stack,
20555
+ * the width of the stack will be automatically adjusted to accommodate for that.
20556
+ * Set this prop to `true` to disable this behavior.
20557
+ * @default false
20558
+ */
20559
+ withoutFluidWidth?: boolean;
20560
+ }
20561
+ /**
20562
+ * Renders a stack of drawers in a different location than their original position in the component tree. Uses React Portal under the hood.
20563
+ * @example <DrawerProvider><Drawer id="my-drawer" stackId="my-stack" header="Title">Hello</Drawer><DrawerRenderer stackId="my-stack"/></DrawerProvider>
20564
+ */
20565
+ declare const DrawerRenderer: ({ stackId, position, width, minWidth, maxWidth, leftAligned, withoutFluidWidth, ...otherProps }: DrawerRendererProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element | null;
20566
+ interface DrawerRendererItemProps extends React__default.HTMLAttributes<HTMLDivElement> {
20567
+ index: number;
20568
+ totalDrawers: number;
20569
+ width: DrawerRendererProps['width'];
20570
+ minWidth: Required<DrawerRendererProps['minWidth']>;
20571
+ maxWidth: Required<DrawerRendererProps['maxWidth']>;
20572
+ leftAligned: Required<DrawerRendererProps['leftAligned']>;
20573
+ onOverlayClick?: () => void;
20574
+ }
20575
+ declare const getDrawerAttributes: ({ providerId, stackId, id, }: {
20576
+ providerId: string;
20577
+ stackId?: string | undefined;
20578
+ id: string;
20579
+ }) => {
20580
+ 'data-drawer-id': string;
20581
+ 'data-testid': string;
20582
+ };
20583
+
20530
20584
  interface DrawerItem {
20531
20585
  /** An ID for the drawer. It should be unique in the stack where it's rendered */
20532
20586
  id: string;
@@ -20538,6 +20592,12 @@ interface DrawerItem {
20538
20592
  stackId?: string;
20539
20593
  /** Just like React.Key, changing this value indicates that the drawer has changed and we need to close the current instance and open a new one */
20540
20594
  instanceKey?: string;
20595
+ /**
20596
+ * The desired width of the drawer.
20597
+ * This value is ignored if the drawer is part of a DrawerRenderer with `withoutFluidWidth`.
20598
+ * If not set, the drawer will use the width of its renderer.
20599
+ */
20600
+ width?: DrawerRendererProps['width'];
20541
20601
  /** Called when the close button is clicked, the Escape button is pressed, or when the drawer's overlay is clicked */
20542
20602
  onRequestClose?: () => void;
20543
20603
  /** Test ID for test automation **/
@@ -20568,12 +20628,12 @@ declare const DrawerProvider: ({ children }: React__default.PropsWithChildren) =
20568
20628
  declare const useDrawer: () => DrawerContextValue;
20569
20629
  declare const useCloseCurrentDrawer: () => (() => void) | undefined;
20570
20630
 
20571
- interface DrawerProps extends DrawerItem {
20631
+ type DrawerProps = DrawerItem & Omit<DrawerRendererProps, 'stackId'> & {
20572
20632
  header?: React__default.ReactNode;
20573
20633
  children?: React__default.ReactNode;
20574
20634
  bgColor?: 'var(--gray-50)' | 'var(--white)';
20575
20635
  leftAligned?: DrawerRendererProps['leftAligned'];
20576
- }
20636
+ };
20577
20637
  declare const CurrentDrawerContext: React__default.Context<{
20578
20638
  id?: string | undefined;
20579
20639
  stackId?: string | undefined;
@@ -20588,7 +20648,12 @@ declare const useCurrentDrawer: () => {
20588
20648
  * A drawer component that opens from the right side of is parent. The component is used in combination with DrawerProvider and DrawerRenderer
20589
20649
  * @example <Drawer id="my-drawer" header="Title">Hello</Drawer>
20590
20650
  */
20591
- declare const Drawer: React__default.ForwardRefExoticComponent<DrawerProps & Omit<DrawerRendererProps, "stackId"> & React__default.RefAttributes<HTMLDivElement>>;
20651
+ declare const Drawer: React__default.ForwardRefExoticComponent<DrawerItem & Omit<DrawerRendererProps, "stackId"> & {
20652
+ header?: React__default.ReactNode;
20653
+ children?: React__default.ReactNode;
20654
+ bgColor?: "var(--white)" | "var(--gray-50)" | undefined;
20655
+ leftAligned?: DrawerRendererProps['leftAligned'];
20656
+ } & React__default.RefAttributes<HTMLDivElement>>;
20592
20657
 
20593
20658
  type DrawerContentProps = {
20594
20659
  children: ReactNode;
@@ -20597,53 +20662,6 @@ type DrawerContentProps = {
20597
20662
  } & HTMLAttributes<HTMLDivElement>;
20598
20663
  declare const DrawerContent: ({ children, buttonGroup, noPadding, ...props }: DrawerContentProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
20599
20664
 
20600
- interface DrawerRendererProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, 'children'> {
20601
- /** The ID of the stack to render. Some drawers need to use the same stack ID to be rendered here */
20602
- stackId: string;
20603
- /** The width of the drawers. In any CSS length unit (px, rem, %, et al). Can't use CSS functions (e.g. calc())
20604
- * @default 'medium'
20605
- */
20606
- width?: string | 'narrow' | 'medium' | 'wide';
20607
- /** The minimum width of the drawers. In any CSS length unit (px, rem, %, et al)
20608
- * @default '0'
20609
- */
20610
- minWidth?: string;
20611
- /** The maximum width of the drawers. In any CSS length unit (px, rem, %, et al)
20612
- * @default '100%'
20613
- */
20614
- maxWidth?: string;
20615
- /** Sets the css position value
20616
- * @default 'absolute'
20617
- */
20618
- position?: 'absolute' | 'fixed' | 'sticky';
20619
- /** Opens the drawer from left to right
20620
- * @default false
20621
- */
20622
- leftAligned?: boolean;
20623
- }
20624
- /**
20625
- * Renders a stack of drawers in a different location than their original position in the component tree. Uses React Portal under the hood.
20626
- * @example <DrawerProvider><Drawer id="my-drawer" stackId="my-stack" header="Title">Hello</Drawer><DrawerRenderer stackId="my-stack"/></DrawerProvider>
20627
- */
20628
- declare const DrawerRenderer: ({ stackId, position, width, minWidth, maxWidth, leftAligned, ...otherProps }: DrawerRendererProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element | null;
20629
- interface DrawerRendererItemProps extends React__default.HTMLAttributes<HTMLDivElement> {
20630
- index: number;
20631
- totalDrawers: number;
20632
- width: DrawerRendererProps['width'];
20633
- minWidth: Required<DrawerRendererProps['minWidth']>;
20634
- maxWidth: Required<DrawerRendererProps['maxWidth']>;
20635
- leftAligned: Required<DrawerRendererProps['leftAligned']>;
20636
- onOverlayClick?: () => void;
20637
- }
20638
- declare const getDrawerAttributes: ({ providerId, stackId, id, }: {
20639
- providerId: string;
20640
- stackId?: string | undefined;
20641
- id: string;
20642
- }) => {
20643
- 'data-drawer-id': string;
20644
- 'data-testid': string;
20645
- };
20646
-
20647
20665
  declare const iconNames: readonly ["add-r", "add", "airplane", "alarm", "album", "align-bottom", "align-center", "align-left", "align-middle", "align-right", "align-top", "anchor", "apple-watch", "arrange-back", "arrange-front", "arrow-align-h", "arrow-align-v", "arrow-bottom-left-o", "arrow-bottom-left-r", "arrow-bottom-left", "arrow-bottom-right-o", "arrow-bottom-right-r", "arrow-bottom-right", "arrow-down-o", "arrow-down-r", "arrow-down", "arrow-left-o", "arrow-left-r", "arrow-left", "arrow-long-down-c", "arrow-long-down-e", "arrow-long-down-l", "arrow-long-down-r", "arrow-long-down", "arrow-long-left-c", "arrow-long-left-e", "arrow-long-left-l", "arrow-long-left-r", "arrow-long-left", "arrow-long-right-c", "arrow-long-right-e", "arrow-long-right-l", "arrow-long-right-r", "arrow-long-right", "arrow-long-up-c", "arrow-long-up-e", "arrow-long-up-l", "arrow-long-up-r", "arrow-long-up", "arrow-right-o", "arrow-right-r", "arrow-right", "arrow-top-left-o", "arrow-top-left-r", "arrow-top-left", "arrow-top-right-o", "arrow-top-right-r", "arrow-top-right", "arrow-up-o", "arrow-up-r", "arrow-up", "arrows-breake-h", "arrows-breake-v", "arrows-exchange-alt-v", "arrows-exchange-alt", "arrows-exchange-v", "arrows-exchange", "arrows-expand-down-left", "arrows-expand-down-right", "arrows-expand-left-alt", "arrows-expand-left", "arrows-expand-right-alt", "arrows-expand-right", "arrows-expand-up-left", "arrows-expand-up-right", "arrows-h-alt", "arrows-h", "arrows-merge-alt-h", "arrows-merge-alt-v", "arrows-scroll-h", "arrows-scroll-v", "arrows-shrink-h", "arrows-shrink-v", "arrows-v-alt", "arrows-v", "assign", "asterisk", "attachment", "attribution", "awards", "backspace", "band-aid", "battery-empty", "battery-full", "battery", "bee", "bell", "bitbucket", "block", "board", "bolt", "bookmark", "border-all", "border-bottom", "border-left", "border-right", "border-style-dashed", "border-style-dotted", "border-style-solid", "border-top", "bot", "bowl", "box", "boy", "briefcase", "browse", "browser", "brush", "bulb", "c-plus-plus", "calculator", "calendar-dates", "calendar-due", "calendar-next", "calendar-today", "calendar-two", "calendar", "calibrate", "camera", "cap", "captions", "card-clubs", "card-diamonds", "card-hearts", "card-spades", "carousel", "cast", "chart", "check-o", "check-r", "check", "chevron-double-down-o", "chevron-double-down-r", "chevron-double-down", "chevron-double-left-o", "chevron-double-left-r", "chevron-double-left", "chevron-double-right-o", "chevron-double-right-r", "chevron-double-right", "chevron-double-up-o", "chevron-double-up-r", "chevron-double-up", "chevron-down-o", "chevron-down-r", "chevron-down", "chevron-left-o", "chevron-left-r", "chevron-left", "chevron-right-o", "chevron-right-r", "chevron-right", "chevron-up-o", "chevron-up-r", "chevron-up", "clapper-board", "clear-formatting", "clipboard", "close-o", "close-r", "close", "cloud", "code-slash", "code", "coffee", "collage", "color-bucket", "color-picker", "comment", "community", "components", "compress-left", "compress-right", "compress-v", "compress", "controller", "copy", "copyright", "corner-double-down-left", "corner-double-down-right", "corner-double-left-down", "corner-double-left-up", "corner-double-right-down", "corner-double-right-up", "corner-double-up-left", "corner-double-up-right", "corner-down-left", "corner-down-right", "corner-left-down", "corner-left-up", "corner-right-down", "corner-right-up", "corner-up-left", "corner-up-right", "credit-card", "crop", "cross", "crown", "danger", "dark-mode", "data", "database", "debug", "desktop", "details-less", "details-more", "dialpad", "dice-1", "dice-2", "dice-3", "dice-4", "dice-5", "dice-6", "disc", "display-flex", "display-fullwidth", "display-grid", "display-spacing", "distribute-horizontal", "distribute-vertical", "dock-bottom", "dock-left", "dock-right", "dock-window", "dollar", "drive", "drop-invert", "drop-opacity", "drop", "duplicate", "edit-black-point", "edit-contrast", "edit-exposure", "edit-fade", "edit-flip-h", "edit-flip-v", "edit-highlight", "edit-markup", "edit-mask", "edit-noise", "edit-shadows", "edit-straight", "edit-unmask", "eject", "enter", "erase", "ereader", "ericsson", "ethernet", "euro", "expand", "export", "extension-add", "extension-alt", "extension-remove", "extension", "external", "eye-alt", "eye", "feed", "file-add", "file-document", "file-remove", "file", "film", "filters", "flag-alt", "flag", "folder-add", "folder-remove", "folder", "font-height", "font-spacing", "format-bold", "format-center", "format-color", "format-code", "format-heading", "format-indent-decrease", "format-indent-increase", "format-italic", "format-justify", "format-left", "format-line-height", "format-right", "format-separator", "format-slash", "format-strike", "format-subscript", "format-superscript", "format-text", "format-underline", "format-uppercase", "games", "gender-female", "gender-male", "ghost-character", "gift", "girl", "git-branch", "git-commit", "git-fork", "git-pull", "glass-alt", "glass", "globe-alt", "globe", "gym", "hashtag", "headset", "heart", "home-alt", "home-screen", "home", "icecream", "image", "import", "inbox", "infinity", "info", "inpicture", "insert-after-o", "insert-after-r", "insert-after", "insert-before-o", "insert-before-r", "insert-before", "insights", "internal", "key", "keyboard", "keyhole", "laptop", "layout-grid-small", "layout-grid", "layout-list", "layout-list-numbered", "layout-pin", "link", "list-tree", "list", "live-photo", "loadbar-alt", "loadbar-doc", "loadbar-sound", "loadbar", "lock-unlock", "lock", "log-in", "log-off", "log-out", "loupe", "magnet", "mail-forward", "mail-open", "mail-reply", "mail", "math-divide", "math-equal", "math-minus", "math-percent", "math-plus", "maximize-alt", "maximize", "media-live", "media-podcast", "menu-boxed", "menu-cake", "menu-cheese", "menu-grid-o", "menu-grid-r", "menu-hotdog", "menu-left-alt", "menu-left", "menu-motion", "menu-oreos", "menu-right-alt", "menu-right", "menu-round", "menu", "merge-horizontal", "merge-vertical", "mic", "mini-player", "minimize-alt", "minimize", "modem", "moon", "more-alt", "more-o", "more-r", "more-vertical-alt", "more-vertical-o", "more-vertical-r", "more-vertical", "more", "mouse", "move-down", "move-left", "move-right", "move-task", "move-up", "music-note", "music-speaker", "music", "nametag", "notes", "notifications", "options", "organisation", "password", "path-back", "path-crop", "path-divide", "path-exclude", "path-front", "path-intersect", "path-outline", "path-trim", "path-unite", "pen", "pentagon-bottom-left", "pentagon-bottom-right", "pentagon-down", "pentagon-left", "pentagon-right", "pentagon-top-left", "pentagon-top-right", "pentagon-up", "performance", "phone", "photoscan", "piano", "pill", "pin-alt", "pin-bottom", "pin-top", "pin", "play-backwards", "play-button-o", "play-button-r", "play-button", "play-forwards", "play-list-add", "play-list-check", "play-list-remove", "play-list-search", "play-list", "play-pause-o", "play-pause-r", "play-pause", "play-stop-o", "play-stop-r", "play-stop", "play-track-next-o", "play-track-next-r", "play-track-next", "play-track-prev-o", "play-track-prev-r", "play-track-prev", "plug", "polaroid", "poll", "presentation", "printer", "profile", "pull-clear", "push-chevron-down-o", "push-chevron-down-r", "push-chevron-down", "push-chevron-left-o", "push-chevron-left-r", "push-chevron-left", "push-chevron-right-o", "push-chevron-right-r", "push-chevron-right", "push-chevron-up-o", "push-chevron-up-r", "push-chevron-up", "push-down", "push-left", "push-right", "push-up", "qr", "quote-o", "quote", "radio-check", "radio-checked", "ratio", "read", "readme", "record", "redo", "remote", "remove-r", "remove", "rename", "reorder", "repeat", "ring", "row-first", "row-last", "ruler", "sand-clock", "scan", "screen-mirror", "screen-shot", "screen-wide", "screen", "scroll-h", "scroll-v", "search-found", "search-loading", "search", "select-o", "select-r", "select", "server", "shape-circle", "shape-half-circle", "shape-hexagon", "shape-rhombus", "shape-square", "shape-triangle", "shape-zigzag", "share", "shield", "shopping-bag", "shopping-cart", "shortcut", "sidebar-open", "sidebar-right", "sidebar", "signal", "size", "sleep", "smart-home-boiler", "smart-home-cooker", "smart-home-heat", "smart-home-light", "smart-home-refrigerator", "smart-home-wash-machine", "smartphone-chip", "smartphone-ram", "smartphone-shake", "smartphone", "smile-mouth-open", "smile-neutral", "smile-no-mouth", "smile-none", "smile-sad", "smile-upside", "smile", "software-download", "software-upload", "sort-az", "sort-za", "space-between-v", "space-between", "spinner-alt", "spinner-two-alt", "spinner-two", "spinner", "stack", "stopwatch", "stories", "style", "sun", "support", "swap-vertical", "swap", "sweden", "swiss", "sync", "tab", "tag", "tap-double", "tap-single", "template", "tennis", "terminal", "terrain", "thermometer", "thermostat", "tikcode", "time", "timelapse", "timer", "today", "toggle-off", "toggle-on", "toggle-square-off", "toggle-square", "toolbar-bottom", "toolbar-left", "toolbar-right", "toolbar-top", "toolbox", "touchpad", "track", "transcript", "trash-empty", "trash", "tree", "trees", "trending-down", "trending", "trophy", "tv", "ui-kit", "umbrella", "unavailable", "unblock", "undo", "unsplash", "usb-c", "usb", "user-add", "user-list", "user-remove", "user", "view-cols", "view-comfortable", "view-day", "view-grid", "view-list", "view-month", "view-split", "vinyl", "voicemail-o", "voicemail-r", "voicemail", "volume", "webcam", "website", "work-alt", "yinyang", "zoom-in", "zoom-out", "rectangle-rounded", "card", "image-text", "border-top", "full-width-screen", "text-input", "number-input", "canvas-alert", "warning", "settings", "query-string", "json", "yes-no", "diamond-outline", "diamond-fill"];
20648
20666
  /** A list of available icon names that can be used with the Uniform brand */
20649
20667
  type IconName = (typeof iconNames)[number];
package/dist/index.d.ts CHANGED
@@ -20527,6 +20527,60 @@ type DetailsProps = React$1.HTMLAttributes<HTMLDetailsElement> & {
20527
20527
  /** @example <Details summary="summary text">child content here</Details>*/
20528
20528
  declare const Details: ({ summary, children, isOpenByDefault, isOpen, onChange, ...props }: DetailsProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
20529
20529
 
20530
+ interface DrawerRendererProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, 'children'> {
20531
+ /** The ID of the stack to render. Some drawers need to use the same stack ID to be rendered here */
20532
+ stackId: string;
20533
+ /** The width of the drawers. In any CSS length unit (px, rem, %, et al). Can't use CSS functions (e.g. calc())
20534
+ * @default 'medium'
20535
+ */
20536
+ width?: 'narrow' | 'medium' | 'wide' | (string & NonNullable<unknown>);
20537
+ /** The minimum width of the drawers. In any CSS length unit (px, rem, %, et al)
20538
+ * @default '0'
20539
+ */
20540
+ minWidth?: string;
20541
+ /** The maximum width of the drawers. In any CSS length unit (px, rem, %, et al)
20542
+ * @default '100%'
20543
+ */
20544
+ maxWidth?: string;
20545
+ /** Sets the css position value
20546
+ * @default 'absolute'
20547
+ */
20548
+ position?: 'absolute' | 'fixed' | 'sticky';
20549
+ /** Opens the drawer from left to right
20550
+ * @default false
20551
+ */
20552
+ leftAligned?: boolean;
20553
+ /**
20554
+ * If a drawer in the stack has a specific `width` prop, and its value is larger than the width of the current stack,
20555
+ * the width of the stack will be automatically adjusted to accommodate for that.
20556
+ * Set this prop to `true` to disable this behavior.
20557
+ * @default false
20558
+ */
20559
+ withoutFluidWidth?: boolean;
20560
+ }
20561
+ /**
20562
+ * Renders a stack of drawers in a different location than their original position in the component tree. Uses React Portal under the hood.
20563
+ * @example <DrawerProvider><Drawer id="my-drawer" stackId="my-stack" header="Title">Hello</Drawer><DrawerRenderer stackId="my-stack"/></DrawerProvider>
20564
+ */
20565
+ declare const DrawerRenderer: ({ stackId, position, width, minWidth, maxWidth, leftAligned, withoutFluidWidth, ...otherProps }: DrawerRendererProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element | null;
20566
+ interface DrawerRendererItemProps extends React__default.HTMLAttributes<HTMLDivElement> {
20567
+ index: number;
20568
+ totalDrawers: number;
20569
+ width: DrawerRendererProps['width'];
20570
+ minWidth: Required<DrawerRendererProps['minWidth']>;
20571
+ maxWidth: Required<DrawerRendererProps['maxWidth']>;
20572
+ leftAligned: Required<DrawerRendererProps['leftAligned']>;
20573
+ onOverlayClick?: () => void;
20574
+ }
20575
+ declare const getDrawerAttributes: ({ providerId, stackId, id, }: {
20576
+ providerId: string;
20577
+ stackId?: string | undefined;
20578
+ id: string;
20579
+ }) => {
20580
+ 'data-drawer-id': string;
20581
+ 'data-testid': string;
20582
+ };
20583
+
20530
20584
  interface DrawerItem {
20531
20585
  /** An ID for the drawer. It should be unique in the stack where it's rendered */
20532
20586
  id: string;
@@ -20538,6 +20592,12 @@ interface DrawerItem {
20538
20592
  stackId?: string;
20539
20593
  /** Just like React.Key, changing this value indicates that the drawer has changed and we need to close the current instance and open a new one */
20540
20594
  instanceKey?: string;
20595
+ /**
20596
+ * The desired width of the drawer.
20597
+ * This value is ignored if the drawer is part of a DrawerRenderer with `withoutFluidWidth`.
20598
+ * If not set, the drawer will use the width of its renderer.
20599
+ */
20600
+ width?: DrawerRendererProps['width'];
20541
20601
  /** Called when the close button is clicked, the Escape button is pressed, or when the drawer's overlay is clicked */
20542
20602
  onRequestClose?: () => void;
20543
20603
  /** Test ID for test automation **/
@@ -20568,12 +20628,12 @@ declare const DrawerProvider: ({ children }: React__default.PropsWithChildren) =
20568
20628
  declare const useDrawer: () => DrawerContextValue;
20569
20629
  declare const useCloseCurrentDrawer: () => (() => void) | undefined;
20570
20630
 
20571
- interface DrawerProps extends DrawerItem {
20631
+ type DrawerProps = DrawerItem & Omit<DrawerRendererProps, 'stackId'> & {
20572
20632
  header?: React__default.ReactNode;
20573
20633
  children?: React__default.ReactNode;
20574
20634
  bgColor?: 'var(--gray-50)' | 'var(--white)';
20575
20635
  leftAligned?: DrawerRendererProps['leftAligned'];
20576
- }
20636
+ };
20577
20637
  declare const CurrentDrawerContext: React__default.Context<{
20578
20638
  id?: string | undefined;
20579
20639
  stackId?: string | undefined;
@@ -20588,7 +20648,12 @@ declare const useCurrentDrawer: () => {
20588
20648
  * A drawer component that opens from the right side of is parent. The component is used in combination with DrawerProvider and DrawerRenderer
20589
20649
  * @example <Drawer id="my-drawer" header="Title">Hello</Drawer>
20590
20650
  */
20591
- declare const Drawer: React__default.ForwardRefExoticComponent<DrawerProps & Omit<DrawerRendererProps, "stackId"> & React__default.RefAttributes<HTMLDivElement>>;
20651
+ declare const Drawer: React__default.ForwardRefExoticComponent<DrawerItem & Omit<DrawerRendererProps, "stackId"> & {
20652
+ header?: React__default.ReactNode;
20653
+ children?: React__default.ReactNode;
20654
+ bgColor?: "var(--white)" | "var(--gray-50)" | undefined;
20655
+ leftAligned?: DrawerRendererProps['leftAligned'];
20656
+ } & React__default.RefAttributes<HTMLDivElement>>;
20592
20657
 
20593
20658
  type DrawerContentProps = {
20594
20659
  children: ReactNode;
@@ -20597,53 +20662,6 @@ type DrawerContentProps = {
20597
20662
  } & HTMLAttributes<HTMLDivElement>;
20598
20663
  declare const DrawerContent: ({ children, buttonGroup, noPadding, ...props }: DrawerContentProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
20599
20664
 
20600
- interface DrawerRendererProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, 'children'> {
20601
- /** The ID of the stack to render. Some drawers need to use the same stack ID to be rendered here */
20602
- stackId: string;
20603
- /** The width of the drawers. In any CSS length unit (px, rem, %, et al). Can't use CSS functions (e.g. calc())
20604
- * @default 'medium'
20605
- */
20606
- width?: string | 'narrow' | 'medium' | 'wide';
20607
- /** The minimum width of the drawers. In any CSS length unit (px, rem, %, et al)
20608
- * @default '0'
20609
- */
20610
- minWidth?: string;
20611
- /** The maximum width of the drawers. In any CSS length unit (px, rem, %, et al)
20612
- * @default '100%'
20613
- */
20614
- maxWidth?: string;
20615
- /** Sets the css position value
20616
- * @default 'absolute'
20617
- */
20618
- position?: 'absolute' | 'fixed' | 'sticky';
20619
- /** Opens the drawer from left to right
20620
- * @default false
20621
- */
20622
- leftAligned?: boolean;
20623
- }
20624
- /**
20625
- * Renders a stack of drawers in a different location than their original position in the component tree. Uses React Portal under the hood.
20626
- * @example <DrawerProvider><Drawer id="my-drawer" stackId="my-stack" header="Title">Hello</Drawer><DrawerRenderer stackId="my-stack"/></DrawerProvider>
20627
- */
20628
- declare const DrawerRenderer: ({ stackId, position, width, minWidth, maxWidth, leftAligned, ...otherProps }: DrawerRendererProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element | null;
20629
- interface DrawerRendererItemProps extends React__default.HTMLAttributes<HTMLDivElement> {
20630
- index: number;
20631
- totalDrawers: number;
20632
- width: DrawerRendererProps['width'];
20633
- minWidth: Required<DrawerRendererProps['minWidth']>;
20634
- maxWidth: Required<DrawerRendererProps['maxWidth']>;
20635
- leftAligned: Required<DrawerRendererProps['leftAligned']>;
20636
- onOverlayClick?: () => void;
20637
- }
20638
- declare const getDrawerAttributes: ({ providerId, stackId, id, }: {
20639
- providerId: string;
20640
- stackId?: string | undefined;
20641
- id: string;
20642
- }) => {
20643
- 'data-drawer-id': string;
20644
- 'data-testid': string;
20645
- };
20646
-
20647
20665
  declare const iconNames: readonly ["add-r", "add", "airplane", "alarm", "album", "align-bottom", "align-center", "align-left", "align-middle", "align-right", "align-top", "anchor", "apple-watch", "arrange-back", "arrange-front", "arrow-align-h", "arrow-align-v", "arrow-bottom-left-o", "arrow-bottom-left-r", "arrow-bottom-left", "arrow-bottom-right-o", "arrow-bottom-right-r", "arrow-bottom-right", "arrow-down-o", "arrow-down-r", "arrow-down", "arrow-left-o", "arrow-left-r", "arrow-left", "arrow-long-down-c", "arrow-long-down-e", "arrow-long-down-l", "arrow-long-down-r", "arrow-long-down", "arrow-long-left-c", "arrow-long-left-e", "arrow-long-left-l", "arrow-long-left-r", "arrow-long-left", "arrow-long-right-c", "arrow-long-right-e", "arrow-long-right-l", "arrow-long-right-r", "arrow-long-right", "arrow-long-up-c", "arrow-long-up-e", "arrow-long-up-l", "arrow-long-up-r", "arrow-long-up", "arrow-right-o", "arrow-right-r", "arrow-right", "arrow-top-left-o", "arrow-top-left-r", "arrow-top-left", "arrow-top-right-o", "arrow-top-right-r", "arrow-top-right", "arrow-up-o", "arrow-up-r", "arrow-up", "arrows-breake-h", "arrows-breake-v", "arrows-exchange-alt-v", "arrows-exchange-alt", "arrows-exchange-v", "arrows-exchange", "arrows-expand-down-left", "arrows-expand-down-right", "arrows-expand-left-alt", "arrows-expand-left", "arrows-expand-right-alt", "arrows-expand-right", "arrows-expand-up-left", "arrows-expand-up-right", "arrows-h-alt", "arrows-h", "arrows-merge-alt-h", "arrows-merge-alt-v", "arrows-scroll-h", "arrows-scroll-v", "arrows-shrink-h", "arrows-shrink-v", "arrows-v-alt", "arrows-v", "assign", "asterisk", "attachment", "attribution", "awards", "backspace", "band-aid", "battery-empty", "battery-full", "battery", "bee", "bell", "bitbucket", "block", "board", "bolt", "bookmark", "border-all", "border-bottom", "border-left", "border-right", "border-style-dashed", "border-style-dotted", "border-style-solid", "border-top", "bot", "bowl", "box", "boy", "briefcase", "browse", "browser", "brush", "bulb", "c-plus-plus", "calculator", "calendar-dates", "calendar-due", "calendar-next", "calendar-today", "calendar-two", "calendar", "calibrate", "camera", "cap", "captions", "card-clubs", "card-diamonds", "card-hearts", "card-spades", "carousel", "cast", "chart", "check-o", "check-r", "check", "chevron-double-down-o", "chevron-double-down-r", "chevron-double-down", "chevron-double-left-o", "chevron-double-left-r", "chevron-double-left", "chevron-double-right-o", "chevron-double-right-r", "chevron-double-right", "chevron-double-up-o", "chevron-double-up-r", "chevron-double-up", "chevron-down-o", "chevron-down-r", "chevron-down", "chevron-left-o", "chevron-left-r", "chevron-left", "chevron-right-o", "chevron-right-r", "chevron-right", "chevron-up-o", "chevron-up-r", "chevron-up", "clapper-board", "clear-formatting", "clipboard", "close-o", "close-r", "close", "cloud", "code-slash", "code", "coffee", "collage", "color-bucket", "color-picker", "comment", "community", "components", "compress-left", "compress-right", "compress-v", "compress", "controller", "copy", "copyright", "corner-double-down-left", "corner-double-down-right", "corner-double-left-down", "corner-double-left-up", "corner-double-right-down", "corner-double-right-up", "corner-double-up-left", "corner-double-up-right", "corner-down-left", "corner-down-right", "corner-left-down", "corner-left-up", "corner-right-down", "corner-right-up", "corner-up-left", "corner-up-right", "credit-card", "crop", "cross", "crown", "danger", "dark-mode", "data", "database", "debug", "desktop", "details-less", "details-more", "dialpad", "dice-1", "dice-2", "dice-3", "dice-4", "dice-5", "dice-6", "disc", "display-flex", "display-fullwidth", "display-grid", "display-spacing", "distribute-horizontal", "distribute-vertical", "dock-bottom", "dock-left", "dock-right", "dock-window", "dollar", "drive", "drop-invert", "drop-opacity", "drop", "duplicate", "edit-black-point", "edit-contrast", "edit-exposure", "edit-fade", "edit-flip-h", "edit-flip-v", "edit-highlight", "edit-markup", "edit-mask", "edit-noise", "edit-shadows", "edit-straight", "edit-unmask", "eject", "enter", "erase", "ereader", "ericsson", "ethernet", "euro", "expand", "export", "extension-add", "extension-alt", "extension-remove", "extension", "external", "eye-alt", "eye", "feed", "file-add", "file-document", "file-remove", "file", "film", "filters", "flag-alt", "flag", "folder-add", "folder-remove", "folder", "font-height", "font-spacing", "format-bold", "format-center", "format-color", "format-code", "format-heading", "format-indent-decrease", "format-indent-increase", "format-italic", "format-justify", "format-left", "format-line-height", "format-right", "format-separator", "format-slash", "format-strike", "format-subscript", "format-superscript", "format-text", "format-underline", "format-uppercase", "games", "gender-female", "gender-male", "ghost-character", "gift", "girl", "git-branch", "git-commit", "git-fork", "git-pull", "glass-alt", "glass", "globe-alt", "globe", "gym", "hashtag", "headset", "heart", "home-alt", "home-screen", "home", "icecream", "image", "import", "inbox", "infinity", "info", "inpicture", "insert-after-o", "insert-after-r", "insert-after", "insert-before-o", "insert-before-r", "insert-before", "insights", "internal", "key", "keyboard", "keyhole", "laptop", "layout-grid-small", "layout-grid", "layout-list", "layout-list-numbered", "layout-pin", "link", "list-tree", "list", "live-photo", "loadbar-alt", "loadbar-doc", "loadbar-sound", "loadbar", "lock-unlock", "lock", "log-in", "log-off", "log-out", "loupe", "magnet", "mail-forward", "mail-open", "mail-reply", "mail", "math-divide", "math-equal", "math-minus", "math-percent", "math-plus", "maximize-alt", "maximize", "media-live", "media-podcast", "menu-boxed", "menu-cake", "menu-cheese", "menu-grid-o", "menu-grid-r", "menu-hotdog", "menu-left-alt", "menu-left", "menu-motion", "menu-oreos", "menu-right-alt", "menu-right", "menu-round", "menu", "merge-horizontal", "merge-vertical", "mic", "mini-player", "minimize-alt", "minimize", "modem", "moon", "more-alt", "more-o", "more-r", "more-vertical-alt", "more-vertical-o", "more-vertical-r", "more-vertical", "more", "mouse", "move-down", "move-left", "move-right", "move-task", "move-up", "music-note", "music-speaker", "music", "nametag", "notes", "notifications", "options", "organisation", "password", "path-back", "path-crop", "path-divide", "path-exclude", "path-front", "path-intersect", "path-outline", "path-trim", "path-unite", "pen", "pentagon-bottom-left", "pentagon-bottom-right", "pentagon-down", "pentagon-left", "pentagon-right", "pentagon-top-left", "pentagon-top-right", "pentagon-up", "performance", "phone", "photoscan", "piano", "pill", "pin-alt", "pin-bottom", "pin-top", "pin", "play-backwards", "play-button-o", "play-button-r", "play-button", "play-forwards", "play-list-add", "play-list-check", "play-list-remove", "play-list-search", "play-list", "play-pause-o", "play-pause-r", "play-pause", "play-stop-o", "play-stop-r", "play-stop", "play-track-next-o", "play-track-next-r", "play-track-next", "play-track-prev-o", "play-track-prev-r", "play-track-prev", "plug", "polaroid", "poll", "presentation", "printer", "profile", "pull-clear", "push-chevron-down-o", "push-chevron-down-r", "push-chevron-down", "push-chevron-left-o", "push-chevron-left-r", "push-chevron-left", "push-chevron-right-o", "push-chevron-right-r", "push-chevron-right", "push-chevron-up-o", "push-chevron-up-r", "push-chevron-up", "push-down", "push-left", "push-right", "push-up", "qr", "quote-o", "quote", "radio-check", "radio-checked", "ratio", "read", "readme", "record", "redo", "remote", "remove-r", "remove", "rename", "reorder", "repeat", "ring", "row-first", "row-last", "ruler", "sand-clock", "scan", "screen-mirror", "screen-shot", "screen-wide", "screen", "scroll-h", "scroll-v", "search-found", "search-loading", "search", "select-o", "select-r", "select", "server", "shape-circle", "shape-half-circle", "shape-hexagon", "shape-rhombus", "shape-square", "shape-triangle", "shape-zigzag", "share", "shield", "shopping-bag", "shopping-cart", "shortcut", "sidebar-open", "sidebar-right", "sidebar", "signal", "size", "sleep", "smart-home-boiler", "smart-home-cooker", "smart-home-heat", "smart-home-light", "smart-home-refrigerator", "smart-home-wash-machine", "smartphone-chip", "smartphone-ram", "smartphone-shake", "smartphone", "smile-mouth-open", "smile-neutral", "smile-no-mouth", "smile-none", "smile-sad", "smile-upside", "smile", "software-download", "software-upload", "sort-az", "sort-za", "space-between-v", "space-between", "spinner-alt", "spinner-two-alt", "spinner-two", "spinner", "stack", "stopwatch", "stories", "style", "sun", "support", "swap-vertical", "swap", "sweden", "swiss", "sync", "tab", "tag", "tap-double", "tap-single", "template", "tennis", "terminal", "terrain", "thermometer", "thermostat", "tikcode", "time", "timelapse", "timer", "today", "toggle-off", "toggle-on", "toggle-square-off", "toggle-square", "toolbar-bottom", "toolbar-left", "toolbar-right", "toolbar-top", "toolbox", "touchpad", "track", "transcript", "trash-empty", "trash", "tree", "trees", "trending-down", "trending", "trophy", "tv", "ui-kit", "umbrella", "unavailable", "unblock", "undo", "unsplash", "usb-c", "usb", "user-add", "user-list", "user-remove", "user", "view-cols", "view-comfortable", "view-day", "view-grid", "view-list", "view-month", "view-split", "vinyl", "voicemail-o", "voicemail-r", "voicemail", "volume", "webcam", "website", "work-alt", "yinyang", "zoom-in", "zoom-out", "rectangle-rounded", "card", "image-text", "border-top", "full-width-screen", "text-input", "number-input", "canvas-alert", "warning", "settings", "query-string", "json", "yes-no", "diamond-outline", "diamond-fill"];
20648
20666
  /** A list of available icon names that can be used with the Uniform brand */
20649
20667
  type IconName = (typeof iconNames)[number];
package/dist/index.js CHANGED
@@ -13353,9 +13353,9 @@ var useCurrentDrawer = () => {
13353
13353
  return (0, import_react54.useContext)(CurrentDrawerContext);
13354
13354
  };
13355
13355
  var Drawer = import_react54.default.forwardRef(
13356
- ({ width, minWidth, maxWidth, position, leftAligned, ...drawerProps }, ref) => {
13356
+ ({ minWidth, maxWidth, position, leftAligned, ...drawerProps }, ref) => {
13357
13357
  const { stackId: inheritedStackId } = useCurrentDrawer();
13358
- const drawerRendererProps = { width, minWidth, maxWidth, position, leftAligned };
13358
+ const drawerRendererProps = { width: drawerProps.width, minWidth, maxWidth, position, leftAligned };
13359
13359
  return drawerProps.stackId ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DrawerInner, { ref, ...drawerProps }) : inheritedStackId ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DrawerInner, { ref, ...drawerProps, stackId: inheritedStackId }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(DrawerProvider, { children: [
13360
13360
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DrawerInner, { ref, ...drawerProps }),
13361
13361
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DrawerRenderer, { stackId: defaultSackId, ...drawerRendererProps })
@@ -13372,6 +13372,7 @@ var DrawerInner = ({
13372
13372
  instanceKey,
13373
13373
  onRequestClose,
13374
13374
  leftAligned,
13375
+ width,
13375
13376
  testId = "side-dialog"
13376
13377
  }) => {
13377
13378
  const { registerDrawer, unregisterDrawer, providerId } = useDrawer();
@@ -13380,6 +13381,7 @@ var DrawerInner = ({
13380
13381
  (0, import_react54.useEffect)(() => {
13381
13382
  registerDrawer({
13382
13383
  drawer: {
13384
+ width,
13383
13385
  id,
13384
13386
  stackId,
13385
13387
  onRequestClose,
@@ -13485,6 +13487,11 @@ var DrawerContent2 = ({ children, buttonGroup, noPadding = false, ...props }) =>
13485
13487
  // src/components/Drawer/DrawerRenderer.tsx
13486
13488
  var import_react56 = require("react");
13487
13489
  var import_jsx_runtime46 = require("@emotion/react/jsx-runtime");
13490
+ var drawerWidth = {
13491
+ narrow: "29rem",
13492
+ medium: "43rem",
13493
+ wide: "57rem"
13494
+ };
13488
13495
  var maxLayeringInPx = 64;
13489
13496
  var idealDistanceBetweenLayersInPx = 16;
13490
13497
  var DrawerRenderer = ({
@@ -13494,15 +13501,11 @@ var DrawerRenderer = ({
13494
13501
  minWidth = "0",
13495
13502
  maxWidth = "100%",
13496
13503
  leftAligned = false,
13504
+ withoutFluidWidth = false,
13497
13505
  ...otherProps
13498
13506
  }) => {
13499
13507
  const { drawersRegistry, providerId } = useDrawer();
13500
13508
  const drawersToRender = drawersRegistry.filter(({ stackId: sId }) => sId === stackId);
13501
- const drawerWidth = {
13502
- narrow: "29rem",
13503
- medium: "43rem",
13504
- wide: "57rem"
13505
- };
13506
13509
  (0, import_react56.useEffect)(() => {
13507
13510
  drawersToRender.forEach(({ isFirstRender, onFirstRender }) => {
13508
13511
  if (isFirstRender) {
@@ -13510,6 +13513,17 @@ var DrawerRenderer = ({
13510
13513
  }
13511
13514
  });
13512
13515
  }, [drawersToRender]);
13516
+ const unionWidth = (0, import_react56.useMemo)(() => {
13517
+ var _a;
13518
+ const rendererWidth = (_a = drawerWidth[width]) != null ? _a : width;
13519
+ if (withoutFluidWidth) {
13520
+ return rendererWidth;
13521
+ }
13522
+ const drawerWidths = [rendererWidth, ...drawersToRender.map(({ width: width2 }) => width2)].filter(
13523
+ (v) => typeof v === "string"
13524
+ );
13525
+ return `max(${drawerWidths.join()})`;
13526
+ }, [drawersToRender, width, withoutFluidWidth]);
13513
13527
  if (drawersToRender.length === 0) {
13514
13528
  return null;
13515
13529
  }
@@ -13522,29 +13536,26 @@ var DrawerRenderer = ({
13522
13536
  position === "sticky" ? { height: "100%", marginTop: "-100%" } : void 0
13523
13537
  ],
13524
13538
  ...otherProps,
13525
- children: drawersToRender.map(({ id, stackId: stackId2, onRequestClose }, index) => {
13526
- var _a;
13527
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13528
- DrawerWrapper,
13529
- {
13530
- index,
13531
- totalDrawers: drawersToRender.length,
13532
- width: (_a = drawerWidth[width]) != null ? _a : width,
13533
- minWidth,
13534
- maxWidth,
13535
- onOverlayClick: onRequestClose,
13536
- leftAligned,
13537
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13538
- "div",
13539
- {
13540
- ...getDrawerAttributes({ providerId, stackId: stackId2, id }),
13541
- style: { width: "100%", height: "100%" }
13542
- }
13543
- )
13544
- },
13545
- `${stackId2}-${id}`
13546
- );
13547
- })
13539
+ children: drawersToRender.map(({ id, stackId: stackId2, onRequestClose }, index) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13540
+ DrawerWrapper,
13541
+ {
13542
+ index,
13543
+ totalDrawers: drawersToRender.length,
13544
+ width: unionWidth,
13545
+ minWidth,
13546
+ maxWidth,
13547
+ onOverlayClick: onRequestClose,
13548
+ leftAligned,
13549
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13550
+ "div",
13551
+ {
13552
+ ...getDrawerAttributes({ providerId, stackId: stackId2, id }),
13553
+ style: { width: "100%", height: "100%" }
13554
+ }
13555
+ )
13556
+ },
13557
+ `${stackId2}-${id}`
13558
+ ))
13548
13559
  }
13549
13560
  );
13550
13561
  };
@@ -16275,6 +16286,7 @@ var emptyParameterShell = import_react98.css`
16275
16286
  flex-grow: 1;
16276
16287
  padding: var(--spacing-xs);
16277
16288
  position: relative;
16289
+ max-width: 100%;
16278
16290
  `;
16279
16291
  var emptyParameterShellText = import_react98.css`
16280
16292
  background: var(--brand-secondary-6);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/design-system",
3
- "version": "19.38.3-alpha.70+55e5a8fe1",
3
+ "version": "19.39.0",
4
4
  "description": "Uniform design system components",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -24,8 +24,8 @@
24
24
  "@storybook/react": "6.5.16",
25
25
  "@types/react": "18.2.18",
26
26
  "@types/react-dom": "18.2.7",
27
- "@uniformdev/canvas": "^19.38.3-alpha.70+55e5a8fe1",
28
- "@uniformdev/richtext": "^19.38.3-alpha.70+55e5a8fe1",
27
+ "@uniformdev/canvas": "^19.39.0",
28
+ "@uniformdev/richtext": "^19.39.0",
29
29
  "autoprefixer": "10.4.14",
30
30
  "hygen": "6.2.11",
31
31
  "postcss": "8.4.27",
@@ -68,5 +68,5 @@
68
68
  "publishConfig": {
69
69
  "access": "public"
70
70
  },
71
- "gitHead": "55e5a8fe1d80971a93ea31d3a50cec72e71be70a"
71
+ "gitHead": "63b0b9b3d9b8f155fad931e9e5ca56d4bda5223a"
72
72
  }