@mirohq/design-system-callout 1.4.37-reactdismissablelayer.0 → 1.5.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.
package/dist/main.js CHANGED
@@ -4,17 +4,22 @@ var jsxRuntime = require('react/jsx-runtime');
4
4
  var React = require('react');
5
5
  var designSystemPrimitive = require('@mirohq/design-system-primitive');
6
6
  var designSystemStitches = require('@mirohq/design-system-stitches');
7
+ var designSystemButton = require('@mirohq/design-system-button');
8
+ var designSystemUtils = require('@mirohq/design-system-utils');
7
9
  var designSystemIcons = require('@mirohq/design-system-icons');
8
10
  var designSystemTypography = require('@mirohq/design-system-typography');
9
11
  var designSystemIconButton = require('@mirohq/design-system-icon-button');
10
12
 
11
13
  const StyledCallout = designSystemStitches.styled(designSystemPrimitive.Primitive.div, {
12
14
  position: "relative",
13
- gap: "$150",
15
+ // Row gap only: a column gap would indent content by 12px next to the empty
16
+ // icon track when no IconSlot is rendered. The icon-to-content spacing
17
+ // lives on StyledIconSlot instead.
18
+ rowGap: "$150",
14
19
  padding: "$200",
15
20
  borderWidth: "$sm",
16
21
  borderStyle: "solid",
17
- borderRadius: "$75",
22
+ borderRadius: "$notification",
18
23
  display: "grid",
19
24
  justifyContent: "center",
20
25
  gridTemplateColumns: "auto 1fr",
@@ -49,7 +54,7 @@ const StyledCallout = designSystemStitches.styled(designSystemPrimitive.Primitiv
49
54
  },
50
55
  dismissible: {
51
56
  true: {
52
- padding: "$200 $400 $200 $200"
57
+ padding: "$200 $500 $200 $200"
53
58
  },
54
59
  false: {
55
60
  gridTemplateColumns: "auto 1fr",
@@ -59,6 +64,87 @@ const StyledCallout = designSystemStitches.styled(designSystemPrimitive.Primitiv
59
64
  }
60
65
  });
61
66
 
67
+ const CalloutContext = React.createContext({});
68
+ const CalloutProvider = ({
69
+ children,
70
+ ...restProps
71
+ }) => /* @__PURE__ */ jsxRuntime.jsx(
72
+ CalloutContext.Provider,
73
+ {
74
+ value: {
75
+ ...restProps
76
+ },
77
+ children
78
+ }
79
+ );
80
+ const useCalloutContext = () => React.useContext(CalloutContext);
81
+
82
+ const PRIMARY_ACTION_COLORS = {
83
+ information: {
84
+ background: "$button-background-info",
85
+ backgroundHover: "$button-background-info-hover",
86
+ backgroundPressed: "$button-background-info-pressed",
87
+ text: "$text-on-static-dark"
88
+ },
89
+ warning: {
90
+ background: "$button-background-warning",
91
+ backgroundHover: "$button-background-warning-hover",
92
+ backgroundPressed: "$button-background-warning-pressed",
93
+ text: "$text-on-static-dark"
94
+ },
95
+ danger: {
96
+ background: "$button-background-danger",
97
+ backgroundHover: "$button-background-danger-hover",
98
+ backgroundPressed: "$button-background-danger-pressed",
99
+ text: "$button-text-on-danger"
100
+ }
101
+ };
102
+ const primaryActionColorVariants = designSystemUtils.mapKeysToVariants(
103
+ PRIMARY_ACTION_COLORS,
104
+ (key) => {
105
+ const colors = PRIMARY_ACTION_COLORS[key];
106
+ if (colors == null) {
107
+ return {};
108
+ }
109
+ return {
110
+ backgroundColor: colors.background,
111
+ color: colors.text,
112
+ "&:hover, &[data-hovered]": {
113
+ backgroundColor: colors.backgroundHover,
114
+ color: colors.text
115
+ },
116
+ "&:active, &[data-pressed]": {
117
+ backgroundColor: colors.backgroundPressed,
118
+ color: colors.text
119
+ }
120
+ };
121
+ }
122
+ );
123
+
124
+ const StyledAction = designSystemStitches.styled(designSystemButton.Button, {
125
+ variants: {
126
+ color: primaryActionColorVariants
127
+ }
128
+ });
129
+ const Action = React.forwardRef(
130
+ ({ variant = "primary", size = "medium", ...props }, forwardRef) => {
131
+ const { variant: calloutVariant } = useCalloutContext();
132
+ const isPrimary = variant === "primary";
133
+ const color = isPrimary && typeof calloutVariant === "string" && calloutVariant in primaryActionColorVariants ? calloutVariant : void 0;
134
+ return /* @__PURE__ */ jsxRuntime.jsx(
135
+ StyledAction,
136
+ {
137
+ ...props,
138
+ ref: forwardRef,
139
+ size,
140
+ variant: isPrimary ? "primary" : "ghost",
141
+ color
142
+ }
143
+ );
144
+ }
145
+ );
146
+ Action.displayName = "Callout.Action";
147
+
62
148
  const Content = designSystemStitches.styled(designSystemPrimitive.Primitive.div, {
63
149
  display: "flex",
64
150
  flexDirection: "column",
@@ -76,22 +162,8 @@ const Description = designSystemStitches.styled(designSystemPrimitive.Primitive.
76
162
  });
77
163
  Description.displayName = "Callout.Description";
78
164
 
79
- const CalloutContext = React.createContext({});
80
- const CalloutProvider = ({
81
- children,
82
- ...restProps
83
- }) => /* @__PURE__ */ jsxRuntime.jsx(
84
- CalloutContext.Provider,
85
- {
86
- value: {
87
- ...restProps
88
- },
89
- children
90
- }
91
- );
92
- const useCalloutContext = () => React.useContext(CalloutContext);
93
-
94
165
  const StyledIconSlot = designSystemStitches.styled(designSystemPrimitive.Primitive.div, {
166
+ marginRight: "$150",
95
167
  variants: {
96
168
  variant: {
97
169
  information: {
@@ -131,7 +203,15 @@ const IconSlot = React.forwardRef(({ children, ...restProps }, forwardRef) => {
131
203
  return /* @__PURE__ */ jsxRuntime.jsx(StyledIconSlot, { ...restProps, ref: forwardRef, variant, children: formattedChildren });
132
204
  });
133
205
 
134
- const StyledTitle = designSystemStitches.styled(designSystemTypography.Heading, { lineHeight: "$300" });
206
+ const TagSlot = designSystemStitches.styled(designSystemPrimitive.Primitive.div, {
207
+ display: "flex",
208
+ alignItems: "center",
209
+ gap: "$50",
210
+ marginBottom: "calc($space$100 - $space$25)"
211
+ });
212
+ TagSlot.displayName = "Callout.TagSlot";
213
+
214
+ const StyledTitle = designSystemStitches.styled(designSystemTypography.Heading, { lineHeight: "$300", color: "inherit" });
135
215
  const Title = React.forwardRef(
136
216
  ({ level = 4, ...props }, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(StyledTitle, { ...props, ref: forwardRef, level, styledAs: "h4" })
137
217
  );
@@ -147,8 +227,8 @@ Actions.displayName = "Callout.Actions";
147
227
 
148
228
  const StyledDismissButton = designSystemStitches.styled(designSystemIconButton.IconButton, {
149
229
  position: "absolute",
150
- right: "$50",
151
- top: "$50"
230
+ right: "$100",
231
+ top: "$100"
152
232
  });
153
233
  const DismissButton = (props) => /* @__PURE__ */ jsxRuntime.jsx(
154
234
  StyledDismissButton,
@@ -205,9 +285,11 @@ const Callout = React.forwardRef(
205
285
  ) });
206
286
  }
207
287
  );
288
+ Callout.Action = Action;
208
289
  Callout.Content = Content;
209
290
  Callout.Description = Description;
210
291
  Callout.IconSlot = IconSlot;
292
+ Callout.TagSlot = TagSlot;
211
293
  Callout.Title = Title;
212
294
  Callout.Actions = Actions;
213
295
 
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sources":["../src/callout.styled.tsx","../src/partials/content.tsx","../src/partials/description.tsx","../src/hooks/use-callout-context.tsx","../src/partials/icon-slot.styled.ts","../src/partials/icon-slot.tsx","../src/partials/title.tsx","../src/partials/actions.tsx","../src/partials/dismiss-button.tsx","../src/callout.tsx"],"sourcesContent":["import type { ComponentPropsWithRef } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const StyledCallout = styled(Primitive.div, {\n position: 'relative',\n gap: '$150',\n padding: '$200',\n borderWidth: '$sm',\n borderStyle: 'solid',\n borderRadius: '$75',\n display: 'grid',\n justifyContent: 'center',\n gridTemplateColumns: 'auto 1fr',\n gridTemplateAreas: `'icon content'`,\n variants: {\n variant: {\n information: {\n backgroundColor: '$status-background-info',\n borderColor: '$status-border-info',\n color: '$status-text-on-info',\n },\n warning: {\n backgroundColor: '$status-background-warning',\n borderColor: '$status-border-warning',\n color: '$status-text-on-warning',\n },\n danger: {\n backgroundColor: '$status-background-error',\n borderColor: '$status-border-error',\n color: '$status-text-on-error',\n },\n success: {\n backgroundColor: '$status-background-success',\n borderColor: '$status-border-success',\n color: '$status-text-on-success',\n },\n neutral: {\n backgroundColor: '$background-surface',\n borderColor: '$border-default',\n color: '$text-default',\n },\n },\n dismissible: {\n true: {\n padding: '$200 $400 $200 $200',\n },\n false: {\n gridTemplateColumns: 'auto 1fr',\n gridTemplateAreas: `'icon content'`,\n },\n },\n },\n})\n\nexport type StyledCalloutProps = ComponentPropsWithRef<typeof StyledCallout>\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const Content = styled(Primitive.div, {\n display: 'flex',\n flexDirection: 'column',\n gap: '$25',\n maxWidth: '48em',\n gridArea: 'content',\n})\n\nContent.displayName = 'Callout.Content'\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const Description = styled(Primitive.div, {\n color: 'inherit',\n fontSize: '$175',\n lineHeight: '$400',\n marginTop: '$25',\n})\n\nDescription.displayName = 'Callout.Description'\n","import { createContext, useContext } from 'react'\n\nimport type { StyledCalloutProps } from '../callout.styled'\n\ninterface CalloutProps {\n variant?: StyledCalloutProps['variant']\n}\n\ninterface CalloutContextProps extends CalloutProps {}\n\nexport interface CalloutProviderProps extends CalloutContextProps {\n children: React.ReactNode\n}\n\nconst CalloutContext = createContext<CalloutContextProps>({} as any)\n\nexport const CalloutProvider = ({\n children,\n ...restProps\n}: CalloutProviderProps): JSX.Element => (\n <CalloutContext.Provider\n value={{\n ...restProps,\n }}\n >\n {children}\n </CalloutContext.Provider>\n)\n\nexport const useCalloutContext = (): CalloutContextProps =>\n useContext(CalloutContext)\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const StyledIconSlot = styled(Primitive.div, {\n variants: {\n variant: {\n information: {\n color: '$status-icon-on-info',\n },\n warning: {\n color: '$status-icon-on-warning',\n },\n danger: {\n color: '$status-icon-on-error',\n },\n success: {\n color: '$status-icon-on-success',\n },\n neutral: {\n color: '$icon-default',\n },\n },\n },\n})\n","import React from 'react'\nimport type { ElementRef, ComponentPropsWithRef } from 'react'\nimport {\n IconCheckMark,\n IconExclamationPointCircle,\n IconInformationMarkCircle,\n} from '@mirohq/design-system-icons'\n\nimport { useCalloutContext } from '../hooks/use-callout-context'\nimport { StyledIconSlot } from './icon-slot.styled'\n\nexport type StyledIconSlotProps = ComponentPropsWithRef<typeof StyledIconSlot>\n\nexport interface IconSlotProps extends StyledIconSlotProps {\n /**\n * The icon.\n */\n children?: React.ReactNode\n}\n\nconst iconVariant = {\n success: <IconCheckMark />,\n warning: <IconExclamationPointCircle />,\n danger: <IconExclamationPointCircle />,\n information: <IconInformationMarkCircle />,\n neutral: <IconInformationMarkCircle />,\n default: <IconCheckMark />,\n}\n\nexport const IconSlot = React.forwardRef<\n ElementRef<typeof StyledIconSlot>,\n IconSlotProps\n>(({ children, ...restProps }, forwardRef) => {\n const { variant } = useCalloutContext()\n\n let formattedChildren = children\n if (React.Children.count(children) < 1) {\n formattedChildren =\n iconVariant[variant as keyof typeof iconVariant] ?? iconVariant.default\n }\n\n return (\n <StyledIconSlot {...restProps} ref={forwardRef} variant={variant}>\n {formattedChildren}\n </StyledIconSlot>\n )\n})\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Heading } from '@mirohq/design-system-typography'\nimport type { HeadingProps } from '@mirohq/design-system-typography'\n\nconst StyledTitle = styled(Heading, { lineHeight: '$300' })\n\nexport interface TitleProps extends Omit<HeadingProps, 'level' | 'styledAs'> {\n level?: HeadingProps['level']\n}\n\nexport const Title = React.forwardRef<ElementRef<typeof Heading>, TitleProps>(\n ({ level = 4, ...props }, forwardRef) => (\n <StyledTitle {...props} ref={forwardRef} level={level} styledAs='h4' />\n )\n)\n\nTitle.displayName = 'Callout.Title'\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const Actions = styled(Primitive.div, {\n gridColumn: 'content',\n gridRow: -1,\n display: 'flex',\n gap: '$100',\n})\n\nActions.displayName = 'Callout.Actions'\n","import { styled } from '@mirohq/design-system-stitches'\nimport { IconButton } from '@mirohq/design-system-icon-button'\nimport type { IconButtonProps } from '@mirohq/design-system-icon-button'\nimport { IconCross } from '@mirohq/design-system-icons'\n\nconst StyledDismissButton = styled(IconButton, {\n position: 'absolute',\n right: '$50',\n top: '$50',\n})\n\nexport const DismissButton = (props: IconButtonProps): React.ReactNode => (\n <StyledDismissButton\n variant='ghost'\n size='medium'\n data-testid='dismiss-button'\n {...props}\n >\n <IconCross />\n </StyledDismissButton>\n)\n\nDismissButton.displayName = 'Callout.DismissButton'\n","import React, { useState } from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\n\nimport { StyledCallout } from './callout.styled'\nimport type { StyledCalloutProps } from './callout.styled'\nimport { Content } from './partials/content'\nimport { Description } from './partials/description'\nimport { IconSlot } from './partials/icon-slot'\nimport { Title } from './partials/title'\nimport { Actions } from './partials/actions'\nimport { CalloutProvider } from './hooks/use-callout-context'\nimport { DismissButton } from './partials/dismiss-button'\n\ninterface DismissibleProps {\n /**\n * Whether or not the component is dismissed (hidden)\n */\n dismissed?: boolean\n\n /**\n * Callback invoked once dismiss button is clicked\n */\n onDismiss?: () => void\n\n /**\n * aria-label for the dismiss button\n */\n dismissLabel: string\n}\n\nexport type CalloutProps = (Omit<StyledCalloutProps, 'dismissible'> & {\n /**\n * Change the component style.\n */\n variant: StyledCalloutProps['variant']\n\n /**\n * Whether or not the component should display dismiss button\n * @default true\n */\n dismissible?: boolean\n}) &\n (\n | DismissibleProps // uncontrolled\n | Required<DismissibleProps> // controlled\n | ({ dismissible?: false } & { [K in keyof DismissibleProps]?: never })\n )\n\nexport const Callout = React.forwardRef<\n ElementRef<typeof StyledCallout>,\n CalloutProps\n>(\n (\n {\n dismissed,\n dismissible = true,\n onDismiss,\n dismissLabel,\n children,\n variant,\n role,\n ...props\n },\n forwardRef\n ) => {\n const [internalDismissed, setInternalDismissed] = useState<boolean>(\n dismissed ?? false\n )\n\n if (dismissed ?? internalDismissed) {\n return null\n }\n\n const handleDismissed = (): void => {\n setInternalDismissed(true)\n onDismiss?.()\n }\n\n return (\n <CalloutProvider variant={variant}>\n <StyledCallout\n {...props}\n ref={forwardRef}\n variant={variant}\n dismissible={dismissible}\n role={role ?? 'alert'}\n >\n {children}\n {dismissible && onDismiss != null && dismissLabel?.length > 0 && (\n <DismissButton\n aria-label={dismissLabel}\n onPress={handleDismissed}\n />\n )}\n </StyledCallout>\n </CalloutProvider>\n )\n }\n) as ForwardRefExoticComponent<CalloutProps> & Partials\n\nexport interface Partials {\n Content: typeof Content\n Description: typeof Description\n IconSlot: typeof IconSlot\n Title: typeof Title\n Actions: typeof Actions\n}\n\nCallout.Content = Content\nCallout.Description = Description\nCallout.IconSlot = IconSlot\nCallout.Title = Title\nCallout.Actions = Actions\n"],"names":["styled","Primitive","createContext","jsx","useContext","IconCheckMark","IconExclamationPointCircle","IconInformationMarkCircle","Heading","IconButton","IconCross","useState","jsxs"],"mappings":";;;;;;;;;;AAIO,MAAM,aAAA,GAAgBA,2BAAA,CAAOC,+BAAA,CAAU,GAAA,EAAK;AAAA,EACjD,QAAA,EAAU,UAAA;AAAA,EACV,GAAA,EAAK,MAAA;AAAA,EACL,OAAA,EAAS,MAAA;AAAA,EACT,WAAA,EAAa,KAAA;AAAA,EACb,WAAA,EAAa,OAAA;AAAA,EACb,YAAA,EAAc,KAAA;AAAA,EACd,OAAA,EAAS,MAAA;AAAA,EACT,cAAA,EAAgB,QAAA;AAAA,EAChB,mBAAA,EAAqB,UAAA;AAAA,EACrB,iBAAA,EAAmB,gBAAA;AAAA,EACnB,QAAA,EAAU;AAAA,IACR,OAAA,EAAS;AAAA,MACP,WAAA,EAAa;AAAA,QACX,eAAA,EAAiB,yBAAA;AAAA,QACjB,WAAA,EAAa,qBAAA;AAAA,QACb,KAAA,EAAO;AAAA,OACT;AAAA,MACA,OAAA,EAAS;AAAA,QACP,eAAA,EAAiB,4BAAA;AAAA,QACjB,WAAA,EAAa,wBAAA;AAAA,QACb,KAAA,EAAO;AAAA,OACT;AAAA,MACA,MAAA,EAAQ;AAAA,QACN,eAAA,EAAiB,0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AAQ,QAAA,GAAW,QAAA;AACnB,OAAA,CAAQ,KAAA,GAAQ,KAAA;AAChB,OAAA,CAAQ,OAAA,GAAU,OAAA;;;;"}
1
+ {"version":3,"file":"main.js","sources":["../src/callout.styled.tsx","../src/hooks/use-callout-context.tsx","../src/callout.colors.ts","../src/partials/action.tsx","../src/partials/content.tsx","../src/partials/description.tsx","../src/partials/icon-slot.styled.ts","../src/partials/icon-slot.tsx","../src/partials/tag-slot.tsx","../src/partials/title.tsx","../src/partials/actions.tsx","../src/partials/dismiss-button.tsx","../src/callout.tsx"],"sourcesContent":["import type { ComponentPropsWithRef } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const StyledCallout = styled(Primitive.div, {\n position: 'relative',\n // Row gap only: a column gap would indent content by 12px next to the empty\n // icon track when no IconSlot is rendered. The icon-to-content spacing\n // lives on StyledIconSlot instead.\n rowGap: '$150',\n padding: '$200',\n borderWidth: '$sm',\n borderStyle: 'solid',\n borderRadius: '$notification',\n display: 'grid',\n justifyContent: 'center',\n gridTemplateColumns: 'auto 1fr',\n gridTemplateAreas: `'icon content'`,\n variants: {\n variant: {\n information: {\n backgroundColor: '$status-background-info',\n borderColor: '$status-border-info',\n color: '$status-text-on-info',\n },\n warning: {\n backgroundColor: '$status-background-warning',\n borderColor: '$status-border-warning',\n color: '$status-text-on-warning',\n },\n danger: {\n backgroundColor: '$status-background-error',\n borderColor: '$status-border-error',\n color: '$status-text-on-error',\n },\n success: {\n backgroundColor: '$status-background-success',\n borderColor: '$status-border-success',\n color: '$status-text-on-success',\n },\n neutral: {\n backgroundColor: '$background-surface',\n borderColor: '$border-default',\n color: '$text-default',\n },\n },\n dismissible: {\n true: {\n padding: '$200 $500 $200 $200',\n },\n false: {\n gridTemplateColumns: 'auto 1fr',\n gridTemplateAreas: `'icon content'`,\n },\n },\n },\n})\n\nexport type StyledCalloutProps = ComponentPropsWithRef<typeof StyledCallout>\n\n// Plain string union of the styled `variant` variants, mirroring BannerVariant:\n// `Extract<…, string>` drops the stitches responsive-object form.\nexport type CalloutVariant = Extract<StyledCalloutProps['variant'], string>\n","import { createContext, useContext } from 'react'\n\nimport type { StyledCalloutProps } from '../callout.styled'\n\ninterface CalloutProps {\n variant?: StyledCalloutProps['variant']\n}\n\ninterface CalloutContextProps extends CalloutProps {}\n\nexport interface CalloutProviderProps extends CalloutContextProps {\n children: React.ReactNode\n}\n\nconst CalloutContext = createContext<CalloutContextProps>({} as any)\n\nexport const CalloutProvider = ({\n children,\n ...restProps\n}: CalloutProviderProps): JSX.Element => (\n <CalloutContext.Provider\n value={{\n ...restProps,\n }}\n >\n {children}\n </CalloutContext.Provider>\n)\n\nexport const useCalloutContext = (): CalloutContextProps =>\n useContext(CalloutContext)\n","import { mapKeysToVariants } from '@mirohq/design-system-utils'\n\nimport type { CalloutVariant } from './callout.styled'\n\ninterface ActionColorSet {\n background: string\n backgroundHover: string\n backgroundPressed: string\n text: string\n}\n\n// Per-variant overrides agreed with the MDS team: Button-level status variants\n// are deferred until after the C26 token cleanup (NOTI-5461), so the colors\n// live here instead of in MDS Button.\nconst PRIMARY_ACTION_COLORS: Partial<Record<CalloutVariant, ActionColorSet>> = {\n information: {\n background: '$button-background-info',\n backgroundHover: '$button-background-info-hover',\n backgroundPressed: '$button-background-info-pressed',\n text: '$text-on-static-dark',\n },\n warning: {\n background: '$button-background-warning',\n backgroundHover: '$button-background-warning-hover',\n backgroundPressed: '$button-background-warning-pressed',\n text: '$text-on-static-dark',\n },\n danger: {\n background: '$button-background-danger',\n backgroundHover: '$button-background-danger-hover',\n backgroundPressed: '$button-background-danger-pressed',\n text: '$button-text-on-danger',\n },\n}\n\nexport const primaryActionColorVariants = mapKeysToVariants(\n PRIMARY_ACTION_COLORS,\n key => {\n const colors = PRIMARY_ACTION_COLORS[key]\n if (colors == null) {\n return {}\n }\n\n return {\n backgroundColor: colors.background,\n color: colors.text,\n '&:hover, &[data-hovered]': {\n backgroundColor: colors.backgroundHover,\n color: colors.text,\n },\n '&:active, &[data-pressed]': {\n backgroundColor: colors.backgroundPressed,\n color: colors.text,\n },\n }\n }\n)\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { Button } from '@mirohq/design-system-button'\nimport type { ButtonProps } from '@mirohq/design-system-button'\nimport { styled } from '@mirohq/design-system-stitches'\n\nimport { useCalloutContext } from '../hooks/use-callout-context'\nimport { primaryActionColorVariants } from '../callout.colors'\n\nconst StyledAction = styled(Button, {\n variants: {\n color: primaryActionColorVariants,\n },\n})\n\nexport interface ActionProps extends Omit<ButtonProps, 'variant'> {\n /**\n * Visual prominence of the action.\n * @default 'primary'\n */\n variant?: 'primary' | 'secondary'\n}\n\nexport const Action = React.forwardRef<ElementRef<typeof Button>, ActionProps>(\n ({ variant = 'primary', size = 'medium', ...props }, forwardRef) => {\n const { variant: calloutVariant } = useCalloutContext()\n const isPrimary = variant === 'primary'\n const color =\n isPrimary &&\n typeof calloutVariant === 'string' &&\n calloutVariant in primaryActionColorVariants\n ? (calloutVariant as keyof typeof primaryActionColorVariants)\n : undefined\n\n return (\n <StyledAction\n {...props}\n ref={forwardRef}\n size={size}\n variant={isPrimary ? 'primary' : 'ghost'}\n color={color}\n />\n )\n }\n)\n\nAction.displayName = 'Callout.Action'\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const Content = styled(Primitive.div, {\n display: 'flex',\n flexDirection: 'column',\n gap: '$25',\n maxWidth: '48em',\n gridArea: 'content',\n})\n\nContent.displayName = 'Callout.Content'\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const Description = styled(Primitive.div, {\n color: 'inherit',\n fontSize: '$175',\n lineHeight: '$400',\n marginTop: '$25',\n})\n\nDescription.displayName = 'Callout.Description'\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const StyledIconSlot = styled(Primitive.div, {\n marginRight: '$150',\n variants: {\n variant: {\n information: {\n color: '$status-icon-on-info',\n },\n warning: {\n color: '$status-icon-on-warning',\n },\n danger: {\n color: '$status-icon-on-error',\n },\n success: {\n color: '$status-icon-on-success',\n },\n neutral: {\n color: '$icon-default',\n },\n },\n },\n})\n","import React from 'react'\nimport type { ElementRef, ComponentPropsWithRef } from 'react'\nimport {\n IconCheckMark,\n IconExclamationPointCircle,\n IconInformationMarkCircle,\n} from '@mirohq/design-system-icons'\n\nimport { useCalloutContext } from '../hooks/use-callout-context'\nimport { StyledIconSlot } from './icon-slot.styled'\n\nexport type StyledIconSlotProps = ComponentPropsWithRef<typeof StyledIconSlot>\n\nexport interface IconSlotProps extends StyledIconSlotProps {\n /**\n * The icon.\n */\n children?: React.ReactNode\n}\n\nconst iconVariant = {\n success: <IconCheckMark />,\n warning: <IconExclamationPointCircle />,\n danger: <IconExclamationPointCircle />,\n information: <IconInformationMarkCircle />,\n neutral: <IconInformationMarkCircle />,\n default: <IconCheckMark />,\n}\n\nexport const IconSlot = React.forwardRef<\n ElementRef<typeof StyledIconSlot>,\n IconSlotProps\n>(({ children, ...restProps }, forwardRef) => {\n const { variant } = useCalloutContext()\n\n let formattedChildren = children\n if (React.Children.count(children) < 1) {\n formattedChildren =\n iconVariant[variant as keyof typeof iconVariant] ?? iconVariant.default\n }\n\n return (\n <StyledIconSlot {...restProps} ref={forwardRef} variant={variant}>\n {formattedChildren}\n </StyledIconSlot>\n )\n})\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\n// 6px margin + the 2px Content column gap = 8px between tag and title, per\n// design. There is no 6px space token, hence the calc.\nexport const TagSlot = styled(Primitive.div, {\n display: 'flex',\n alignItems: 'center',\n gap: '$50',\n marginBottom: 'calc($space$100 - $space$25)',\n})\n\nTagSlot.displayName = 'Callout.TagSlot'\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Heading } from '@mirohq/design-system-typography'\nimport type { HeadingProps } from '@mirohq/design-system-typography'\n\nconst StyledTitle = styled(Heading, { lineHeight: '$300', color: 'inherit' })\n\nexport interface TitleProps extends Omit<HeadingProps, 'level' | 'styledAs'> {\n level?: HeadingProps['level']\n}\n\nexport const Title = React.forwardRef<ElementRef<typeof Heading>, TitleProps>(\n ({ level = 4, ...props }, forwardRef) => (\n <StyledTitle {...props} ref={forwardRef} level={level} styledAs='h4' />\n )\n)\n\nTitle.displayName = 'Callout.Title'\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const Actions = styled(Primitive.div, {\n gridColumn: 'content',\n gridRow: -1,\n display: 'flex',\n gap: '$100',\n})\n\nActions.displayName = 'Callout.Actions'\n","import { styled } from '@mirohq/design-system-stitches'\nimport { IconButton } from '@mirohq/design-system-icon-button'\nimport type { IconButtonProps } from '@mirohq/design-system-icon-button'\nimport { IconCross } from '@mirohq/design-system-icons'\n\nconst StyledDismissButton = styled(IconButton, {\n position: 'absolute',\n right: '$100',\n top: '$100',\n})\n\nexport const DismissButton = (props: IconButtonProps): React.ReactNode => (\n <StyledDismissButton\n variant='ghost'\n size='medium'\n data-testid='dismiss-button'\n {...props}\n >\n <IconCross />\n </StyledDismissButton>\n)\n\nDismissButton.displayName = 'Callout.DismissButton'\n","import React, { useState } from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\n\nimport { StyledCallout } from './callout.styled'\nimport type { StyledCalloutProps } from './callout.styled'\nimport { Action } from './partials/action'\nimport { Content } from './partials/content'\nimport { Description } from './partials/description'\nimport { IconSlot } from './partials/icon-slot'\nimport { TagSlot } from './partials/tag-slot'\nimport { Title } from './partials/title'\nimport { Actions } from './partials/actions'\nimport { CalloutProvider } from './hooks/use-callout-context'\nimport { DismissButton } from './partials/dismiss-button'\n\ninterface DismissibleProps {\n /**\n * Whether or not the component is dismissed (hidden)\n */\n dismissed?: boolean\n\n /**\n * Callback invoked once dismiss button is clicked\n */\n onDismiss?: () => void\n\n /**\n * aria-label for the dismiss button\n */\n dismissLabel: string\n}\n\nexport type CalloutProps = (Omit<StyledCalloutProps, 'dismissible'> & {\n /**\n * Change the component style.\n */\n variant: StyledCalloutProps['variant']\n\n /**\n * Whether or not the component should display dismiss button\n * @default true\n */\n dismissible?: boolean\n}) &\n (\n | DismissibleProps // uncontrolled\n | Required<DismissibleProps> // controlled\n | ({ dismissible?: false } & { [K in keyof DismissibleProps]?: never })\n )\n\nexport const Callout = React.forwardRef<\n ElementRef<typeof StyledCallout>,\n CalloutProps\n>(\n (\n {\n dismissed,\n dismissible = true,\n onDismiss,\n dismissLabel,\n children,\n variant,\n role,\n ...props\n },\n forwardRef\n ) => {\n const [internalDismissed, setInternalDismissed] = useState<boolean>(\n dismissed ?? false\n )\n\n if (dismissed ?? internalDismissed) {\n return null\n }\n\n const handleDismissed = (): void => {\n setInternalDismissed(true)\n onDismiss?.()\n }\n\n return (\n <CalloutProvider variant={variant}>\n <StyledCallout\n {...props}\n ref={forwardRef}\n variant={variant}\n dismissible={dismissible}\n role={role ?? 'alert'}\n >\n {children}\n {dismissible && onDismiss != null && dismissLabel?.length > 0 && (\n <DismissButton\n aria-label={dismissLabel}\n onPress={handleDismissed}\n />\n )}\n </StyledCallout>\n </CalloutProvider>\n )\n }\n) as ForwardRefExoticComponent<CalloutProps> & Partials\n\nexport interface Partials {\n Action: typeof Action\n Content: typeof Content\n Description: typeof Description\n IconSlot: typeof IconSlot\n TagSlot: typeof TagSlot\n Title: typeof Title\n Actions: typeof Actions\n}\n\nCallout.Action = Action\nCallout.Content = Content\nCallout.Description = Description\nCallout.IconSlot = IconSlot\nCallout.TagSlot = TagSlot\nCallout.Title = Title\nCallout.Actions = Actions\n"],"names":["styled","Primitive","createContext","jsx","useContext","mapKeysToVariants","Button","IconCheckMark","IconExclamationPointCircle","IconInformationMarkCircle","Heading","IconButton","IconCross","useState","jsxs"],"mappings":";;;;;;;;;;;;AAIO,MAAM,aAAA,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GAAA,MAAA,GAAA,YAAA,CAAc,UAAS,CAAA,oBAC1DX,cAAA;AAAA,YAAC,aAAA;AAAA,YAAA;AAAA,cACC,YAAA,EAAY,YAAA;AAAA,cACZ,OAAA,EAAS;AAAA;AAAA;AACX;AAAA;AAAA,KAEJ,EACF,CAAA;AAAA,EAEJ;AACF;AAYA,OAAA,CAAQ,MAAA,GAAS,MAAA;AACjB,OAAA,CAAQ,OAAA,GAAU,OAAA;AAClB,OAAA,CAAQ,WAAA,GAAc,WAAA;AACtB,OAAA,CAAQ,QAAA,GAAW,QAAA;AACnB,OAAA,CAAQ,OAAA,GAAU,OAAA;AAClB,OAAA,CAAQ,KAAA,GAAQ,KAAA;AAChB,OAAA,CAAQ,OAAA,GAAU,OAAA;;;;"}
package/dist/module.js CHANGED
@@ -2,17 +2,22 @@ import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import React, { createContext, useContext, useState } from 'react';
3
3
  import { Primitive } from '@mirohq/design-system-primitive';
4
4
  import { styled } from '@mirohq/design-system-stitches';
5
+ import { Button } from '@mirohq/design-system-button';
6
+ import { mapKeysToVariants } from '@mirohq/design-system-utils';
5
7
  import { IconCheckMark, IconInformationMarkCircle, IconExclamationPointCircle, IconCross } from '@mirohq/design-system-icons';
6
8
  import { Heading } from '@mirohq/design-system-typography';
7
9
  import { IconButton } from '@mirohq/design-system-icon-button';
8
10
 
9
11
  const StyledCallout = styled(Primitive.div, {
10
12
  position: "relative",
11
- gap: "$150",
13
+ // Row gap only: a column gap would indent content by 12px next to the empty
14
+ // icon track when no IconSlot is rendered. The icon-to-content spacing
15
+ // lives on StyledIconSlot instead.
16
+ rowGap: "$150",
12
17
  padding: "$200",
13
18
  borderWidth: "$sm",
14
19
  borderStyle: "solid",
15
- borderRadius: "$75",
20
+ borderRadius: "$notification",
16
21
  display: "grid",
17
22
  justifyContent: "center",
18
23
  gridTemplateColumns: "auto 1fr",
@@ -47,7 +52,7 @@ const StyledCallout = styled(Primitive.div, {
47
52
  },
48
53
  dismissible: {
49
54
  true: {
50
- padding: "$200 $400 $200 $200"
55
+ padding: "$200 $500 $200 $200"
51
56
  },
52
57
  false: {
53
58
  gridTemplateColumns: "auto 1fr",
@@ -57,6 +62,87 @@ const StyledCallout = styled(Primitive.div, {
57
62
  }
58
63
  });
59
64
 
65
+ const CalloutContext = createContext({});
66
+ const CalloutProvider = ({
67
+ children,
68
+ ...restProps
69
+ }) => /* @__PURE__ */ jsx(
70
+ CalloutContext.Provider,
71
+ {
72
+ value: {
73
+ ...restProps
74
+ },
75
+ children
76
+ }
77
+ );
78
+ const useCalloutContext = () => useContext(CalloutContext);
79
+
80
+ const PRIMARY_ACTION_COLORS = {
81
+ information: {
82
+ background: "$button-background-info",
83
+ backgroundHover: "$button-background-info-hover",
84
+ backgroundPressed: "$button-background-info-pressed",
85
+ text: "$text-on-static-dark"
86
+ },
87
+ warning: {
88
+ background: "$button-background-warning",
89
+ backgroundHover: "$button-background-warning-hover",
90
+ backgroundPressed: "$button-background-warning-pressed",
91
+ text: "$text-on-static-dark"
92
+ },
93
+ danger: {
94
+ background: "$button-background-danger",
95
+ backgroundHover: "$button-background-danger-hover",
96
+ backgroundPressed: "$button-background-danger-pressed",
97
+ text: "$button-text-on-danger"
98
+ }
99
+ };
100
+ const primaryActionColorVariants = mapKeysToVariants(
101
+ PRIMARY_ACTION_COLORS,
102
+ (key) => {
103
+ const colors = PRIMARY_ACTION_COLORS[key];
104
+ if (colors == null) {
105
+ return {};
106
+ }
107
+ return {
108
+ backgroundColor: colors.background,
109
+ color: colors.text,
110
+ "&:hover, &[data-hovered]": {
111
+ backgroundColor: colors.backgroundHover,
112
+ color: colors.text
113
+ },
114
+ "&:active, &[data-pressed]": {
115
+ backgroundColor: colors.backgroundPressed,
116
+ color: colors.text
117
+ }
118
+ };
119
+ }
120
+ );
121
+
122
+ const StyledAction = styled(Button, {
123
+ variants: {
124
+ color: primaryActionColorVariants
125
+ }
126
+ });
127
+ const Action = React.forwardRef(
128
+ ({ variant = "primary", size = "medium", ...props }, forwardRef) => {
129
+ const { variant: calloutVariant } = useCalloutContext();
130
+ const isPrimary = variant === "primary";
131
+ const color = isPrimary && typeof calloutVariant === "string" && calloutVariant in primaryActionColorVariants ? calloutVariant : void 0;
132
+ return /* @__PURE__ */ jsx(
133
+ StyledAction,
134
+ {
135
+ ...props,
136
+ ref: forwardRef,
137
+ size,
138
+ variant: isPrimary ? "primary" : "ghost",
139
+ color
140
+ }
141
+ );
142
+ }
143
+ );
144
+ Action.displayName = "Callout.Action";
145
+
60
146
  const Content = styled(Primitive.div, {
61
147
  display: "flex",
62
148
  flexDirection: "column",
@@ -74,22 +160,8 @@ const Description = styled(Primitive.div, {
74
160
  });
75
161
  Description.displayName = "Callout.Description";
76
162
 
77
- const CalloutContext = createContext({});
78
- const CalloutProvider = ({
79
- children,
80
- ...restProps
81
- }) => /* @__PURE__ */ jsx(
82
- CalloutContext.Provider,
83
- {
84
- value: {
85
- ...restProps
86
- },
87
- children
88
- }
89
- );
90
- const useCalloutContext = () => useContext(CalloutContext);
91
-
92
163
  const StyledIconSlot = styled(Primitive.div, {
164
+ marginRight: "$150",
93
165
  variants: {
94
166
  variant: {
95
167
  information: {
@@ -129,7 +201,15 @@ const IconSlot = React.forwardRef(({ children, ...restProps }, forwardRef) => {
129
201
  return /* @__PURE__ */ jsx(StyledIconSlot, { ...restProps, ref: forwardRef, variant, children: formattedChildren });
130
202
  });
131
203
 
132
- const StyledTitle = styled(Heading, { lineHeight: "$300" });
204
+ const TagSlot = styled(Primitive.div, {
205
+ display: "flex",
206
+ alignItems: "center",
207
+ gap: "$50",
208
+ marginBottom: "calc($space$100 - $space$25)"
209
+ });
210
+ TagSlot.displayName = "Callout.TagSlot";
211
+
212
+ const StyledTitle = styled(Heading, { lineHeight: "$300", color: "inherit" });
133
213
  const Title = React.forwardRef(
134
214
  ({ level = 4, ...props }, forwardRef) => /* @__PURE__ */ jsx(StyledTitle, { ...props, ref: forwardRef, level, styledAs: "h4" })
135
215
  );
@@ -145,8 +225,8 @@ Actions.displayName = "Callout.Actions";
145
225
 
146
226
  const StyledDismissButton = styled(IconButton, {
147
227
  position: "absolute",
148
- right: "$50",
149
- top: "$50"
228
+ right: "$100",
229
+ top: "$100"
150
230
  });
151
231
  const DismissButton = (props) => /* @__PURE__ */ jsx(
152
232
  StyledDismissButton,
@@ -203,9 +283,11 @@ const Callout = React.forwardRef(
203
283
  ) });
204
284
  }
205
285
  );
286
+ Callout.Action = Action;
206
287
  Callout.Content = Content;
207
288
  Callout.Description = Description;
208
289
  Callout.IconSlot = IconSlot;
290
+ Callout.TagSlot = TagSlot;
209
291
  Callout.Title = Title;
210
292
  Callout.Actions = Actions;
211
293
 
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","sources":["../src/callout.styled.tsx","../src/partials/content.tsx","../src/partials/description.tsx","../src/hooks/use-callout-context.tsx","../src/partials/icon-slot.styled.ts","../src/partials/icon-slot.tsx","../src/partials/title.tsx","../src/partials/actions.tsx","../src/partials/dismiss-button.tsx","../src/callout.tsx"],"sourcesContent":["import type { ComponentPropsWithRef } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const StyledCallout = styled(Primitive.div, {\n position: 'relative',\n gap: '$150',\n padding: '$200',\n borderWidth: '$sm',\n borderStyle: 'solid',\n borderRadius: '$75',\n display: 'grid',\n justifyContent: 'center',\n gridTemplateColumns: 'auto 1fr',\n gridTemplateAreas: `'icon content'`,\n variants: {\n variant: {\n information: {\n backgroundColor: '$status-background-info',\n borderColor: '$status-border-info',\n color: '$status-text-on-info',\n },\n warning: {\n backgroundColor: '$status-background-warning',\n borderColor: '$status-border-warning',\n color: '$status-text-on-warning',\n },\n danger: {\n backgroundColor: '$status-background-error',\n borderColor: '$status-border-error',\n color: '$status-text-on-error',\n },\n success: {\n backgroundColor: '$status-background-success',\n borderColor: '$status-border-success',\n color: '$status-text-on-success',\n },\n neutral: {\n backgroundColor: '$background-surface',\n borderColor: '$border-default',\n color: '$text-default',\n },\n },\n dismissible: {\n true: {\n padding: '$200 $400 $200 $200',\n },\n false: {\n gridTemplateColumns: 'auto 1fr',\n gridTemplateAreas: `'icon content'`,\n },\n },\n },\n})\n\nexport type StyledCalloutProps = ComponentPropsWithRef<typeof StyledCallout>\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const Content = styled(Primitive.div, {\n display: 'flex',\n flexDirection: 'column',\n gap: '$25',\n maxWidth: '48em',\n gridArea: 'content',\n})\n\nContent.displayName = 'Callout.Content'\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const Description = styled(Primitive.div, {\n color: 'inherit',\n fontSize: '$175',\n lineHeight: '$400',\n marginTop: '$25',\n})\n\nDescription.displayName = 'Callout.Description'\n","import { createContext, useContext } from 'react'\n\nimport type { StyledCalloutProps } from '../callout.styled'\n\ninterface CalloutProps {\n variant?: StyledCalloutProps['variant']\n}\n\ninterface CalloutContextProps extends CalloutProps {}\n\nexport interface CalloutProviderProps extends CalloutContextProps {\n children: React.ReactNode\n}\n\nconst CalloutContext = createContext<CalloutContextProps>({} as any)\n\nexport const CalloutProvider = ({\n children,\n ...restProps\n}: CalloutProviderProps): JSX.Element => (\n <CalloutContext.Provider\n value={{\n ...restProps,\n }}\n >\n {children}\n </CalloutContext.Provider>\n)\n\nexport const useCalloutContext = (): CalloutContextProps =>\n useContext(CalloutContext)\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const StyledIconSlot = styled(Primitive.div, {\n variants: {\n variant: {\n information: {\n color: '$status-icon-on-info',\n },\n warning: {\n color: '$status-icon-on-warning',\n },\n danger: {\n color: '$status-icon-on-error',\n },\n success: {\n color: '$status-icon-on-success',\n },\n neutral: {\n color: '$icon-default',\n },\n },\n },\n})\n","import React from 'react'\nimport type { ElementRef, ComponentPropsWithRef } from 'react'\nimport {\n IconCheckMark,\n IconExclamationPointCircle,\n IconInformationMarkCircle,\n} from '@mirohq/design-system-icons'\n\nimport { useCalloutContext } from '../hooks/use-callout-context'\nimport { StyledIconSlot } from './icon-slot.styled'\n\nexport type StyledIconSlotProps = ComponentPropsWithRef<typeof StyledIconSlot>\n\nexport interface IconSlotProps extends StyledIconSlotProps {\n /**\n * The icon.\n */\n children?: React.ReactNode\n}\n\nconst iconVariant = {\n success: <IconCheckMark />,\n warning: <IconExclamationPointCircle />,\n danger: <IconExclamationPointCircle />,\n information: <IconInformationMarkCircle />,\n neutral: <IconInformationMarkCircle />,\n default: <IconCheckMark />,\n}\n\nexport const IconSlot = React.forwardRef<\n ElementRef<typeof StyledIconSlot>,\n IconSlotProps\n>(({ children, ...restProps }, forwardRef) => {\n const { variant } = useCalloutContext()\n\n let formattedChildren = children\n if (React.Children.count(children) < 1) {\n formattedChildren =\n iconVariant[variant as keyof typeof iconVariant] ?? iconVariant.default\n }\n\n return (\n <StyledIconSlot {...restProps} ref={forwardRef} variant={variant}>\n {formattedChildren}\n </StyledIconSlot>\n )\n})\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Heading } from '@mirohq/design-system-typography'\nimport type { HeadingProps } from '@mirohq/design-system-typography'\n\nconst StyledTitle = styled(Heading, { lineHeight: '$300' })\n\nexport interface TitleProps extends Omit<HeadingProps, 'level' | 'styledAs'> {\n level?: HeadingProps['level']\n}\n\nexport const Title = React.forwardRef<ElementRef<typeof Heading>, TitleProps>(\n ({ level = 4, ...props }, forwardRef) => (\n <StyledTitle {...props} ref={forwardRef} level={level} styledAs='h4' />\n )\n)\n\nTitle.displayName = 'Callout.Title'\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const Actions = styled(Primitive.div, {\n gridColumn: 'content',\n gridRow: -1,\n display: 'flex',\n gap: '$100',\n})\n\nActions.displayName = 'Callout.Actions'\n","import { styled } from '@mirohq/design-system-stitches'\nimport { IconButton } from '@mirohq/design-system-icon-button'\nimport type { IconButtonProps } from '@mirohq/design-system-icon-button'\nimport { IconCross } from '@mirohq/design-system-icons'\n\nconst StyledDismissButton = styled(IconButton, {\n position: 'absolute',\n right: '$50',\n top: '$50',\n})\n\nexport const DismissButton = (props: IconButtonProps): React.ReactNode => (\n <StyledDismissButton\n variant='ghost'\n size='medium'\n data-testid='dismiss-button'\n {...props}\n >\n <IconCross />\n </StyledDismissButton>\n)\n\nDismissButton.displayName = 'Callout.DismissButton'\n","import React, { useState } from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\n\nimport { StyledCallout } from './callout.styled'\nimport type { StyledCalloutProps } from './callout.styled'\nimport { Content } from './partials/content'\nimport { Description } from './partials/description'\nimport { IconSlot } from './partials/icon-slot'\nimport { Title } from './partials/title'\nimport { Actions } from './partials/actions'\nimport { CalloutProvider } from './hooks/use-callout-context'\nimport { DismissButton } from './partials/dismiss-button'\n\ninterface DismissibleProps {\n /**\n * Whether or not the component is dismissed (hidden)\n */\n dismissed?: boolean\n\n /**\n * Callback invoked once dismiss button is clicked\n */\n onDismiss?: () => void\n\n /**\n * aria-label for the dismiss button\n */\n dismissLabel: string\n}\n\nexport type CalloutProps = (Omit<StyledCalloutProps, 'dismissible'> & {\n /**\n * Change the component style.\n */\n variant: StyledCalloutProps['variant']\n\n /**\n * Whether or not the component should display dismiss button\n * @default true\n */\n dismissible?: boolean\n}) &\n (\n | DismissibleProps // uncontrolled\n | Required<DismissibleProps> // controlled\n | ({ dismissible?: false } & { [K in keyof DismissibleProps]?: never })\n )\n\nexport const Callout = React.forwardRef<\n ElementRef<typeof StyledCallout>,\n CalloutProps\n>(\n (\n {\n dismissed,\n dismissible = true,\n onDismiss,\n dismissLabel,\n children,\n variant,\n role,\n ...props\n },\n forwardRef\n ) => {\n const [internalDismissed, setInternalDismissed] = useState<boolean>(\n dismissed ?? false\n )\n\n if (dismissed ?? internalDismissed) {\n return null\n }\n\n const handleDismissed = (): void => {\n setInternalDismissed(true)\n onDismiss?.()\n }\n\n return (\n <CalloutProvider variant={variant}>\n <StyledCallout\n {...props}\n ref={forwardRef}\n variant={variant}\n dismissible={dismissible}\n role={role ?? 'alert'}\n >\n {children}\n {dismissible && onDismiss != null && dismissLabel?.length > 0 && (\n <DismissButton\n aria-label={dismissLabel}\n onPress={handleDismissed}\n />\n )}\n </StyledCallout>\n </CalloutProvider>\n )\n }\n) as ForwardRefExoticComponent<CalloutProps> & Partials\n\nexport interface Partials {\n Content: typeof Content\n Description: typeof Description\n IconSlot: typeof IconSlot\n Title: typeof Title\n Actions: typeof Actions\n}\n\nCallout.Content = Content\nCallout.Description = Description\nCallout.IconSlot = IconSlot\nCallout.Title = Title\nCallout.Actions = Actions\n"],"names":[],"mappings":";;;;;;;;AAIO,MAAM,aAAA,GAAgB,MAAA,CAAO,SAAA,CAAU,GAAA,EAAK;AAAA,EACjD,QAAA,EAAU,UAAA;AAAA,EACV,GAAA,EAAK,MAAA;AAAA,EACL,OAAA,EAAS,MAAA;AAAA,EACT,WAAA,EAAa,KAAA;AAAA,EACb,WAAA,EAAa,OAAA;AAAA,EACb,YAAA,EAAc,KAAA;AAAA,EACd,OAAA,EAAS,MAAA;AAAA,EACT,cAAA,EAAgB,QAAA;AAAA,EAChB,mBAAA,EAAqB,UAAA;AAAA,EACrB,iBAAA,EAAmB,gBAAA;AAAA,EACnB,QAAA,EAAU;AAAA,IACR,OAAA,EAAS;AAAA,MACP,WAAA,EAAa;AAAA,QACX,eAAA,EAAiB,yBAAA;AAAA,QACjB,WAAA,EAAa,qBAAA;AAAA,QACb,KAAA,EAAO;AAAA,OACT;AAAA,MACA,OAAA,EAAS;AAAA,QACP,eAAA,EAAiB,4BAAA;AAAA,QACjB,WAAA,EAAa,wBAAA;AAAA,QACb,KAAA,EAAO;AAAA,OACT;AAAA,MACA,MAAA,EAAQ;AAAA,QACN,eAAA,EAAiB,0BAAA;AAAA,QACjB,WAAA,EA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,OAAA,GAAU,OAAA;;;;"}
1
+ {"version":3,"file":"module.js","sources":["../src/callout.styled.tsx","../src/hooks/use-callout-context.tsx","../src/callout.colors.ts","../src/partials/action.tsx","../src/partials/content.tsx","../src/partials/description.tsx","../src/partials/icon-slot.styled.ts","../src/partials/icon-slot.tsx","../src/partials/tag-slot.tsx","../src/partials/title.tsx","../src/partials/actions.tsx","../src/partials/dismiss-button.tsx","../src/callout.tsx"],"sourcesContent":["import type { ComponentPropsWithRef } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const StyledCallout = styled(Primitive.div, {\n position: 'relative',\n // Row gap only: a column gap would indent content by 12px next to the empty\n // icon track when no IconSlot is rendered. The icon-to-content spacing\n // lives on StyledIconSlot instead.\n rowGap: '$150',\n padding: '$200',\n borderWidth: '$sm',\n borderStyle: 'solid',\n borderRadius: '$notification',\n display: 'grid',\n justifyContent: 'center',\n gridTemplateColumns: 'auto 1fr',\n gridTemplateAreas: `'icon content'`,\n variants: {\n variant: {\n information: {\n backgroundColor: '$status-background-info',\n borderColor: '$status-border-info',\n color: '$status-text-on-info',\n },\n warning: {\n backgroundColor: '$status-background-warning',\n borderColor: '$status-border-warning',\n color: '$status-text-on-warning',\n },\n danger: {\n backgroundColor: '$status-background-error',\n borderColor: '$status-border-error',\n color: '$status-text-on-error',\n },\n success: {\n backgroundColor: '$status-background-success',\n borderColor: '$status-border-success',\n color: '$status-text-on-success',\n },\n neutral: {\n backgroundColor: '$background-surface',\n borderColor: '$border-default',\n color: '$text-default',\n },\n },\n dismissible: {\n true: {\n padding: '$200 $500 $200 $200',\n },\n false: {\n gridTemplateColumns: 'auto 1fr',\n gridTemplateAreas: `'icon content'`,\n },\n },\n },\n})\n\nexport type StyledCalloutProps = ComponentPropsWithRef<typeof StyledCallout>\n\n// Plain string union of the styled `variant` variants, mirroring BannerVariant:\n// `Extract<…, string>` drops the stitches responsive-object form.\nexport type CalloutVariant = Extract<StyledCalloutProps['variant'], string>\n","import { createContext, useContext } from 'react'\n\nimport type { StyledCalloutProps } from '../callout.styled'\n\ninterface CalloutProps {\n variant?: StyledCalloutProps['variant']\n}\n\ninterface CalloutContextProps extends CalloutProps {}\n\nexport interface CalloutProviderProps extends CalloutContextProps {\n children: React.ReactNode\n}\n\nconst CalloutContext = createContext<CalloutContextProps>({} as any)\n\nexport const CalloutProvider = ({\n children,\n ...restProps\n}: CalloutProviderProps): JSX.Element => (\n <CalloutContext.Provider\n value={{\n ...restProps,\n }}\n >\n {children}\n </CalloutContext.Provider>\n)\n\nexport const useCalloutContext = (): CalloutContextProps =>\n useContext(CalloutContext)\n","import { mapKeysToVariants } from '@mirohq/design-system-utils'\n\nimport type { CalloutVariant } from './callout.styled'\n\ninterface ActionColorSet {\n background: string\n backgroundHover: string\n backgroundPressed: string\n text: string\n}\n\n// Per-variant overrides agreed with the MDS team: Button-level status variants\n// are deferred until after the C26 token cleanup (NOTI-5461), so the colors\n// live here instead of in MDS Button.\nconst PRIMARY_ACTION_COLORS: Partial<Record<CalloutVariant, ActionColorSet>> = {\n information: {\n background: '$button-background-info',\n backgroundHover: '$button-background-info-hover',\n backgroundPressed: '$button-background-info-pressed',\n text: '$text-on-static-dark',\n },\n warning: {\n background: '$button-background-warning',\n backgroundHover: '$button-background-warning-hover',\n backgroundPressed: '$button-background-warning-pressed',\n text: '$text-on-static-dark',\n },\n danger: {\n background: '$button-background-danger',\n backgroundHover: '$button-background-danger-hover',\n backgroundPressed: '$button-background-danger-pressed',\n text: '$button-text-on-danger',\n },\n}\n\nexport const primaryActionColorVariants = mapKeysToVariants(\n PRIMARY_ACTION_COLORS,\n key => {\n const colors = PRIMARY_ACTION_COLORS[key]\n if (colors == null) {\n return {}\n }\n\n return {\n backgroundColor: colors.background,\n color: colors.text,\n '&:hover, &[data-hovered]': {\n backgroundColor: colors.backgroundHover,\n color: colors.text,\n },\n '&:active, &[data-pressed]': {\n backgroundColor: colors.backgroundPressed,\n color: colors.text,\n },\n }\n }\n)\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { Button } from '@mirohq/design-system-button'\nimport type { ButtonProps } from '@mirohq/design-system-button'\nimport { styled } from '@mirohq/design-system-stitches'\n\nimport { useCalloutContext } from '../hooks/use-callout-context'\nimport { primaryActionColorVariants } from '../callout.colors'\n\nconst StyledAction = styled(Button, {\n variants: {\n color: primaryActionColorVariants,\n },\n})\n\nexport interface ActionProps extends Omit<ButtonProps, 'variant'> {\n /**\n * Visual prominence of the action.\n * @default 'primary'\n */\n variant?: 'primary' | 'secondary'\n}\n\nexport const Action = React.forwardRef<ElementRef<typeof Button>, ActionProps>(\n ({ variant = 'primary', size = 'medium', ...props }, forwardRef) => {\n const { variant: calloutVariant } = useCalloutContext()\n const isPrimary = variant === 'primary'\n const color =\n isPrimary &&\n typeof calloutVariant === 'string' &&\n calloutVariant in primaryActionColorVariants\n ? (calloutVariant as keyof typeof primaryActionColorVariants)\n : undefined\n\n return (\n <StyledAction\n {...props}\n ref={forwardRef}\n size={size}\n variant={isPrimary ? 'primary' : 'ghost'}\n color={color}\n />\n )\n }\n)\n\nAction.displayName = 'Callout.Action'\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const Content = styled(Primitive.div, {\n display: 'flex',\n flexDirection: 'column',\n gap: '$25',\n maxWidth: '48em',\n gridArea: 'content',\n})\n\nContent.displayName = 'Callout.Content'\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const Description = styled(Primitive.div, {\n color: 'inherit',\n fontSize: '$175',\n lineHeight: '$400',\n marginTop: '$25',\n})\n\nDescription.displayName = 'Callout.Description'\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const StyledIconSlot = styled(Primitive.div, {\n marginRight: '$150',\n variants: {\n variant: {\n information: {\n color: '$status-icon-on-info',\n },\n warning: {\n color: '$status-icon-on-warning',\n },\n danger: {\n color: '$status-icon-on-error',\n },\n success: {\n color: '$status-icon-on-success',\n },\n neutral: {\n color: '$icon-default',\n },\n },\n },\n})\n","import React from 'react'\nimport type { ElementRef, ComponentPropsWithRef } from 'react'\nimport {\n IconCheckMark,\n IconExclamationPointCircle,\n IconInformationMarkCircle,\n} from '@mirohq/design-system-icons'\n\nimport { useCalloutContext } from '../hooks/use-callout-context'\nimport { StyledIconSlot } from './icon-slot.styled'\n\nexport type StyledIconSlotProps = ComponentPropsWithRef<typeof StyledIconSlot>\n\nexport interface IconSlotProps extends StyledIconSlotProps {\n /**\n * The icon.\n */\n children?: React.ReactNode\n}\n\nconst iconVariant = {\n success: <IconCheckMark />,\n warning: <IconExclamationPointCircle />,\n danger: <IconExclamationPointCircle />,\n information: <IconInformationMarkCircle />,\n neutral: <IconInformationMarkCircle />,\n default: <IconCheckMark />,\n}\n\nexport const IconSlot = React.forwardRef<\n ElementRef<typeof StyledIconSlot>,\n IconSlotProps\n>(({ children, ...restProps }, forwardRef) => {\n const { variant } = useCalloutContext()\n\n let formattedChildren = children\n if (React.Children.count(children) < 1) {\n formattedChildren =\n iconVariant[variant as keyof typeof iconVariant] ?? iconVariant.default\n }\n\n return (\n <StyledIconSlot {...restProps} ref={forwardRef} variant={variant}>\n {formattedChildren}\n </StyledIconSlot>\n )\n})\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\n// 6px margin + the 2px Content column gap = 8px between tag and title, per\n// design. There is no 6px space token, hence the calc.\nexport const TagSlot = styled(Primitive.div, {\n display: 'flex',\n alignItems: 'center',\n gap: '$50',\n marginBottom: 'calc($space$100 - $space$25)',\n})\n\nTagSlot.displayName = 'Callout.TagSlot'\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Heading } from '@mirohq/design-system-typography'\nimport type { HeadingProps } from '@mirohq/design-system-typography'\n\nconst StyledTitle = styled(Heading, { lineHeight: '$300', color: 'inherit' })\n\nexport interface TitleProps extends Omit<HeadingProps, 'level' | 'styledAs'> {\n level?: HeadingProps['level']\n}\n\nexport const Title = React.forwardRef<ElementRef<typeof Heading>, TitleProps>(\n ({ level = 4, ...props }, forwardRef) => (\n <StyledTitle {...props} ref={forwardRef} level={level} styledAs='h4' />\n )\n)\n\nTitle.displayName = 'Callout.Title'\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const Actions = styled(Primitive.div, {\n gridColumn: 'content',\n gridRow: -1,\n display: 'flex',\n gap: '$100',\n})\n\nActions.displayName = 'Callout.Actions'\n","import { styled } from '@mirohq/design-system-stitches'\nimport { IconButton } from '@mirohq/design-system-icon-button'\nimport type { IconButtonProps } from '@mirohq/design-system-icon-button'\nimport { IconCross } from '@mirohq/design-system-icons'\n\nconst StyledDismissButton = styled(IconButton, {\n position: 'absolute',\n right: '$100',\n top: '$100',\n})\n\nexport const DismissButton = (props: IconButtonProps): React.ReactNode => (\n <StyledDismissButton\n variant='ghost'\n size='medium'\n data-testid='dismiss-button'\n {...props}\n >\n <IconCross />\n </StyledDismissButton>\n)\n\nDismissButton.displayName = 'Callout.DismissButton'\n","import React, { useState } from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\n\nimport { StyledCallout } from './callout.styled'\nimport type { StyledCalloutProps } from './callout.styled'\nimport { Action } from './partials/action'\nimport { Content } from './partials/content'\nimport { Description } from './partials/description'\nimport { IconSlot } from './partials/icon-slot'\nimport { TagSlot } from './partials/tag-slot'\nimport { Title } from './partials/title'\nimport { Actions } from './partials/actions'\nimport { CalloutProvider } from './hooks/use-callout-context'\nimport { DismissButton } from './partials/dismiss-button'\n\ninterface DismissibleProps {\n /**\n * Whether or not the component is dismissed (hidden)\n */\n dismissed?: boolean\n\n /**\n * Callback invoked once dismiss button is clicked\n */\n onDismiss?: () => void\n\n /**\n * aria-label for the dismiss button\n */\n dismissLabel: string\n}\n\nexport type CalloutProps = (Omit<StyledCalloutProps, 'dismissible'> & {\n /**\n * Change the component style.\n */\n variant: StyledCalloutProps['variant']\n\n /**\n * Whether or not the component should display dismiss button\n * @default true\n */\n dismissible?: boolean\n}) &\n (\n | DismissibleProps // uncontrolled\n | Required<DismissibleProps> // controlled\n | ({ dismissible?: false } & { [K in keyof DismissibleProps]?: never })\n )\n\nexport const Callout = React.forwardRef<\n ElementRef<typeof StyledCallout>,\n CalloutProps\n>(\n (\n {\n dismissed,\n dismissible = true,\n onDismiss,\n dismissLabel,\n children,\n variant,\n role,\n ...props\n },\n forwardRef\n ) => {\n const [internalDismissed, setInternalDismissed] = useState<boolean>(\n dismissed ?? false\n )\n\n if (dismissed ?? internalDismissed) {\n return null\n }\n\n const handleDismissed = (): void => {\n setInternalDismissed(true)\n onDismiss?.()\n }\n\n return (\n <CalloutProvider variant={variant}>\n <StyledCallout\n {...props}\n ref={forwardRef}\n variant={variant}\n dismissible={dismissible}\n role={role ?? 'alert'}\n >\n {children}\n {dismissible && onDismiss != null && dismissLabel?.length > 0 && (\n <DismissButton\n aria-label={dismissLabel}\n onPress={handleDismissed}\n />\n )}\n </StyledCallout>\n </CalloutProvider>\n )\n }\n) as ForwardRefExoticComponent<CalloutProps> & Partials\n\nexport interface Partials {\n Action: typeof Action\n Content: typeof Content\n Description: typeof Description\n IconSlot: typeof IconSlot\n TagSlot: typeof TagSlot\n Title: typeof Title\n Actions: typeof Actions\n}\n\nCallout.Action = Action\nCallout.Content = Content\nCallout.Description = Description\nCallout.IconSlot = IconSlot\nCallout.TagSlot = TagSlot\nCallout.Title = Title\nCallout.Actions = Actions\n"],"names":[],"mappings":";;;;;;;;;;AAIO,MAAM,aAAA,GAAgB,MAAA,CAAO,SAAA,CAAU,GAAA,EAAK;AAAA,EACjD,QAAA,EAAU,UAAA;AAAA;AAAA;AAAA;AAAA,EAIV,MAAA,EAAQ,MAAA;AAAA,EACR,OAAA,EAAS,MAAA;AAAA,EACT,WAAA,EAAa,KAAA;AAAA,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CAAQ,OAAA,GAAU,OAAA;AAClB,OAAA,CAAQ,WAAA,GAAc,WAAA;AACtB,OAAA,CAAQ,QAAA,GAAW,QAAA;AACnB,OAAA,CAAQ,OAAA,GAAU,OAAA;AAClB,OAAA,CAAQ,KAAA,GAAQ,KAAA;AAChB,OAAA,CAAQ,OAAA,GAAU,OAAA;;;;"}
package/dist/types.d.ts CHANGED
@@ -2,6 +2,7 @@ import * as react from 'react';
2
2
  import react__default, { ComponentPropsWithRef, ForwardRefExoticComponent } from 'react';
3
3
  import * as _mirohq_design_system_stitches from '@mirohq/design-system-stitches';
4
4
  import * as _mirohq_design_system_primitive from '@mirohq/design-system-primitive';
5
+ import { ButtonProps } from '@mirohq/design-system-button';
5
6
  import { HeadingProps } from '@mirohq/design-system-typography';
6
7
 
7
8
  /* Utilities */
@@ -32,6 +33,16 @@ declare const StyledCallout: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_d
32
33
  dismissible?: boolean | "true" | "false" | undefined;
33
34
  }, {}>;
34
35
  type StyledCalloutProps = ComponentPropsWithRef<typeof StyledCallout>;
36
+ type CalloutVariant = Extract<StyledCalloutProps['variant'], string>;
37
+
38
+ interface ActionProps extends Omit<ButtonProps, 'variant'> {
39
+ /**
40
+ * Visual prominence of the action.
41
+ * @default 'primary'
42
+ */
43
+ variant?: 'primary' | 'secondary';
44
+ }
45
+ declare const Action: react__default.ForwardRefExoticComponent<Omit<ActionProps, "ref"> & react__default.RefAttributes<HTMLButtonElement>>;
35
46
 
36
47
  declare const Content: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>>, never> & TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>, {}, {}>;
37
48
 
@@ -52,6 +63,8 @@ interface IconSlotProps extends StyledIconSlotProps {
52
63
  }
53
64
  declare const IconSlot: react__default.ForwardRefExoticComponent<Omit<IconSlotProps, "ref"> & react__default.RefAttributes<HTMLDivElement>>;
54
65
 
66
+ declare const TagSlot: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>>, never> & TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>, {}, {}>;
67
+
55
68
  interface TitleProps extends Omit<HeadingProps, 'level' | 'styledAs'> {
56
69
  level?: HeadingProps['level'];
57
70
  }
@@ -90,12 +103,14 @@ type CalloutProps = (Omit<StyledCalloutProps, 'dismissible'> & {
90
103
  }));
91
104
  declare const Callout: ForwardRefExoticComponent<CalloutProps> & Partials;
92
105
  interface Partials {
106
+ Action: typeof Action;
93
107
  Content: typeof Content;
94
108
  Description: typeof Description;
95
109
  IconSlot: typeof IconSlot;
110
+ TagSlot: typeof TagSlot;
96
111
  Title: typeof Title;
97
112
  Actions: typeof Actions;
98
113
  }
99
114
 
100
115
  export { Callout };
101
- export type { CalloutProps };
116
+ export type { ActionProps as CalloutActionProps, CalloutProps, CalloutVariant };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirohq/design-system-callout",
3
- "version": "1.4.37-reactdismissablelayer.0",
3
+ "version": "1.5.1",
4
4
  "description": "",
5
5
  "author": "Miro",
6
6
  "source": "src/index.ts",
@@ -26,11 +26,13 @@
26
26
  "react": "^16.14 || ^17 || ^18 || ^19"
27
27
  },
28
28
  "dependencies": {
29
- "@mirohq/design-system-icon-button": "^4.2.40-reactdismissablelayer.0",
30
- "@mirohq/design-system-icons": "^1.45.1-reactdismissablelayer.0",
31
- "@mirohq/design-system-primitive": "^2.2.2-reactdismissablelayer.0",
29
+ "@mirohq/design-system-button": "^5.3.14",
30
+ "@mirohq/design-system-icon-button": "^4.2.39",
31
+ "@mirohq/design-system-icons": "^1.45.0",
32
32
  "@mirohq/design-system-stitches": "^3.3.32",
33
- "@mirohq/design-system-typography": "^1.3.35-reactdismissablelayer.0"
33
+ "@mirohq/design-system-primitive": "^2.2.1",
34
+ "@mirohq/design-system-typography": "^1.3.34",
35
+ "@mirohq/design-system-utils": "^1.3.0"
34
36
  },
35
37
  "scripts": {
36
38
  "build": "rollup -c ../../../rollup.config.js",