@gobolt/genesis 0.10.0 → 0.10.1

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.
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import { DrawerProps } from 'antd';
2
3
  import { ButtonProps } from '../Button';
3
4
  type BottomDrawerAction = {
4
5
  label: string;
@@ -15,11 +16,17 @@ export interface BottomDrawerProps {
15
16
  label?: ReactNode;
16
17
  /** Right-aligned action buttons (e.g. Cancel + Confirm). */
17
18
  actions?: BottomDrawerAction[];
19
+ /**
20
+ * Where to mount the drawer. By default it portals to `document.body` (full
21
+ * viewport width). Pass a positioned container (a node getter) or `false` to
22
+ * render it inside a `position: relative` parent, scoped to that parent's width.
23
+ */
24
+ getContainer?: DrawerProps["getContainer"];
18
25
  }
19
26
  /**
20
27
  * A slim slide-up drawer for user confirmation: a description on the left and
21
28
  * actions on the right. Shares SidePanel's slide-up + overlay behavior, but the
22
29
  * contents are intentionally trimmed to a single action row.
23
30
  */
24
- declare const BottomDrawer: ({ open, onClose, type, height, label, actions, }: BottomDrawerProps) => import("react/jsx-runtime").JSX.Element;
31
+ declare const BottomDrawer: ({ open, onClose, type, height, label, actions, getContainer, }: BottomDrawerProps) => import("react/jsx-runtime").JSX.Element;
25
32
  export default BottomDrawer;
@@ -5,3 +5,4 @@ export default meta;
5
5
  type Story = StoryObj<typeof BottomDrawer>;
6
6
  export declare const UnsavedChanges: Story;
7
7
  export declare const FloatType: Story;
8
+ export declare const Contained: Story;
package/dist/index.cjs CHANGED
@@ -87894,7 +87894,8 @@ const BottomDrawer = ({
87894
87894
  type: type4 = "full",
87895
87895
  height = 88,
87896
87896
  label,
87897
- actions = []
87897
+ actions = [],
87898
+ getContainer: getContainer2
87898
87899
  }) => {
87899
87900
  const theme = styled.useTheme();
87900
87901
  const spacing = {
@@ -87903,6 +87904,7 @@ const BottomDrawer = ({
87903
87904
  };
87904
87905
  const textColor = theme?.colors?.onsurface?.active?.textColor || "#3E3E3E";
87905
87906
  const isFloat = type4 === "float";
87907
+ const isContained = getContainer2 !== void 0;
87906
87908
  const floatOffset = 24;
87907
87909
  const border = "1px solid var(--interactive-utility-border, #CBCBCB)";
87908
87910
  const sharedStyles = {
@@ -87936,6 +87938,8 @@ const BottomDrawer = ({
87936
87938
  open,
87937
87939
  $type: type4,
87938
87940
  styles: drawerStyles,
87941
+ getContainer: getContainer2,
87942
+ rootStyle: isContained ? { position: "absolute" } : void 0,
87939
87943
  children: /* @__PURE__ */ jsxRuntime.jsxs(
87940
87944
  Tile,
87941
87945
  {
package/dist/index.js CHANGED
@@ -87876,7 +87876,8 @@ const BottomDrawer = ({
87876
87876
  type: type4 = "full",
87877
87877
  height = 88,
87878
87878
  label,
87879
- actions = []
87879
+ actions = [],
87880
+ getContainer: getContainer2
87880
87881
  }) => {
87881
87882
  const theme = useTheme$1();
87882
87883
  const spacing = {
@@ -87885,6 +87886,7 @@ const BottomDrawer = ({
87885
87886
  };
87886
87887
  const textColor = theme?.colors?.onsurface?.active?.textColor || "#3E3E3E";
87887
87888
  const isFloat = type4 === "float";
87889
+ const isContained = getContainer2 !== void 0;
87888
87890
  const floatOffset = 24;
87889
87891
  const border = "1px solid var(--interactive-utility-border, #CBCBCB)";
87890
87892
  const sharedStyles = {
@@ -87918,6 +87920,8 @@ const BottomDrawer = ({
87918
87920
  open,
87919
87921
  $type: type4,
87920
87922
  styles: drawerStyles,
87923
+ getContainer: getContainer2,
87924
+ rootStyle: isContained ? { position: "absolute" } : void 0,
87921
87925
  children: /* @__PURE__ */ jsxs(
87922
87926
  Tile,
87923
87927
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobolt/genesis",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "genesis design system",
5
5
  "author": "gobolt",
6
6
  "license": "MIT",