@mirohq/design-system-callout 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.js +4 -4
- package/dist/main.js.map +1 -1
- package/dist/module.js +4 -4
- package/dist/module.js.map +1 -1
- package/package.json +5 -5
package/dist/main.js
CHANGED
@@ -15,8 +15,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
15
15
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
16
16
|
|
17
17
|
const StyledCallout = designSystemStitches.styled(designSystemPrimitive.Primitive.div, {
|
18
|
-
|
19
|
-
rowGap: "$150",
|
18
|
+
gap: "$150",
|
20
19
|
padding: "$200",
|
21
20
|
borderWidth: "$sm",
|
22
21
|
borderStyle: "solid",
|
@@ -24,7 +23,7 @@ const StyledCallout = designSystemStitches.styled(designSystemPrimitive.Primitiv
|
|
24
23
|
display: "grid",
|
25
24
|
justifyContent: "center",
|
26
25
|
gridTemplateColumns: "auto 1fr $8",
|
27
|
-
gridTemplateAreas: "'icon content close'
|
26
|
+
gridTemplateAreas: "'icon content close'",
|
28
27
|
variants: {
|
29
28
|
variant: {
|
30
29
|
information: {
|
@@ -119,7 +118,8 @@ const IconSlot = React__default["default"].forwardRef(({ children, ...restProps
|
|
119
118
|
const Title = React__default["default"].forwardRef((props, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(designSystemTypography.Heading, { ...props, ref: forwardRef, level: 4 }));
|
120
119
|
|
121
120
|
const Actions = designSystemStitches.styled(designSystemPrimitive.Primitive.div, {
|
122
|
-
|
121
|
+
gridColumn: "content",
|
122
|
+
gridRow: -1,
|
123
123
|
display: "flex",
|
124
124
|
gap: "$100"
|
125
125
|
});
|
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 columnGap: '$150',\n rowGap: '$150',\n padding: '$200',\n borderWidth: '$sm',\n borderStyle: 'solid',\n borderRadius: '$75',\n display: 'grid',\n justifyContent: 'center',\n gridTemplateColumns: 'auto 1fr $8',\n gridTemplateAreas: `'icon content close'\n 'icon actions close'`,\n variants: {\n variant: {\n information: {\n backgroundColor: '$background-primary-subtle',\n borderColor: '$border-primary-subtle',\n },\n warning: {\n backgroundColor: '$background-warning-subtle',\n borderColor: '$border-warning-subtle',\n },\n danger: {\n backgroundColor: '$background-danger-subtle',\n borderColor: '$border-danger-subtle',\n },\n success: {\n backgroundColor: '$background-success-subtle',\n borderColor: '$border-success-subtle',\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: 'grid',\n gap: '$25',\n maxWidth: '48em',\n gridArea: 'content',\n gridTemplateRows: 'auto 1fr',\n gridTemplateAreas: `'title'\n 'description'`,\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 gridArea: 'description',\n color: '$text-neutrals-subtle',\n fontSize: '$175',\n lineHeight: '$400',\n})\n\nDescription.displayName = 'Callout.Description'\n","import { createContext, useContext } from 'react'\nimport type { PropsWithChildren } from 'react'\n\nimport type { StyledCalloutProps } from '../callout.styled'\n\ninterface CalloutProps {\n variant?: StyledCalloutProps['variant']\n}\n\ninterface CalloutContextProps extends CalloutProps {}\n\nexport type CalloutProviderProps = CalloutContextProps\n\nconst CalloutContext = createContext<CalloutContextProps>({} as any)\n\nexport const CalloutProvider = ({\n children,\n ...restProps\n}: PropsWithChildren<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: '$icon-primary',\n },\n warning: {\n color: '$icon-warning',\n },\n danger: {\n color: '$icon-danger',\n },\n success: {\n color: '$icon-success',\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 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 { Heading } from '@mirohq/design-system-typography'\nimport type { HeadingProps } from '@mirohq/design-system-typography'\n\nexport interface GroupLabelProps extends Omit<HeadingProps, 'level'> {}\n\nexport const Title = React.forwardRef<\n ElementRef<typeof Heading>,\n GroupLabelProps\n>((props, forwardRef) => <Heading {...props} ref={forwardRef} level={4} />)\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const Actions = styled(Primitive.div, {\n gridArea: 'actions',\n display: 'flex',\n gap: '$100',\n})\n\nActions.displayName = 'Callout.Actions'\n","import { IconButton } from '@mirohq/design-system-icon-button'\nimport type { IconButtonProps } from '@mirohq/design-system-icon-button'\nimport { IconCross } from '@mirohq/design-system-icons'\n\nexport const DismissButton: React.FC<IconButtonProps> = props => (\n <IconButton\n css={{ gridArea: 'close' }}\n variant='ghost'\n size='medium'\n data-testid='dismiss-button'\n {...props}\n >\n <IconCross />\n </IconButton>\n)\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 { DismissButton } from './partials/dismiss-button'\nimport { CalloutProvider } from './hooks/use-callout-context'\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 = (StyledCalloutProps & {\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 ...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 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","React","Heading","IconButton","IconCross","useState","jsxs"],"mappings":";;;;;;;;;;;;;;;;AAIa,MAAA,aAAA,GAAgBA,2BAAO,CAAAC,+BAAA,CAAU,GAAK,EAAA;AAAA,EACjD,SAAW,EAAA,MAAA;AAAA,EACX,MAAQ,EAAA,MAAA;AAAA,EACR,OAAS,EAAA,MAAA;AAAA,EACT,WAAa,EAAA,KAAA;AAAA,EACb,WAAa,EAAA,OAAA;AAAA,EACb,YAAc,EAAA,KAAA;AAAA,EACd,OAAS,EAAA,MAAA;AAAA,EACT,cAAgB,EAAA,QAAA;AAAA,EAChB,mBAAqB,EAAA,aAAA;AAAA,EACrB,iBAAmB,EAAA,gDAAA;AAAA,EAEnB,QAAU,EAAA;AAAA,IACR,OAAS,EAAA;AAAA,MACP,WAAa,EAAA;AAAA,QACX,eAAiB,EAAA,4BAAA;AAAA,QACjB,WAAa,E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AClC,MAAO,OAAA,IAAA,CAAA;AAAA,KACT;AAEA,IAAA,MAAM,kBAAkB,MAAY;AAClC,MAAA,oBAAA,CAAqB,IAAI,CAAA,CAAA;AACzB,MAAA,SAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,EAAA,CAAA;AAAA,KACF,CAAA;AAEA,IACE,uBAAAT,cAAA,CAAC,mBAAgB,OACf,EAAA,QAAA,kBAAAU,eAAA;AAAA,MAAC,aAAA;AAAA,MAAA;AAAA,QACE,GAAG,KAAA;AAAA,QACJ,GAAK,EAAA,UAAA;AAAA,QACL,OAAA;AAAA,QACA,IAAK,EAAA,OAAA;AAAA,QAEJ,QAAA,EAAA;AAAA,UAAA,QAAA;AAAA,UACA,WAAe,IAAA,SAAA,IAAa,IAAQ,IAAA,CAAA,YAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,YAAA,CAAc,UAAS,CAC1D,oBAAAV,cAAA;AAAA,YAAC,aAAA;AAAA,YAAA;AAAA,cACC,YAAY,EAAA,YAAA;AAAA,cACZ,OAAS,EAAA,eAAA;AAAA,aAAA;AAAA,WACX;AAAA,SAAA;AAAA,OAAA;AAAA,KAGN,EAAA,CAAA,CAAA;AAAA,GAEJ;AACF,EAAA;AAUA,OAAA,CAAQ,OAAU,GAAA,OAAA,CAAA;AAClB,OAAA,CAAQ,WAAc,GAAA,WAAA,CAAA;AACtB,OAAA,CAAQ,QAAW,GAAA,QAAA,CAAA;AACnB,OAAA,CAAQ,KAAQ,GAAA,KAAA,CAAA;AAChB,OAAA,CAAQ,OAAU,GAAA,OAAA;;;;"}
|
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 gap: '$150',\n padding: '$200',\n borderWidth: '$sm',\n borderStyle: 'solid',\n borderRadius: '$75',\n display: 'grid',\n justifyContent: 'center',\n gridTemplateColumns: 'auto 1fr $8',\n gridTemplateAreas: `'icon content close'`,\n variants: {\n variant: {\n information: {\n backgroundColor: '$background-primary-subtle',\n borderColor: '$border-primary-subtle',\n },\n warning: {\n backgroundColor: '$background-warning-subtle',\n borderColor: '$border-warning-subtle',\n },\n danger: {\n backgroundColor: '$background-danger-subtle',\n borderColor: '$border-danger-subtle',\n },\n success: {\n backgroundColor: '$background-success-subtle',\n borderColor: '$border-success-subtle',\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: 'grid',\n gap: '$25',\n maxWidth: '48em',\n gridArea: 'content',\n gridTemplateRows: 'auto 1fr',\n gridTemplateAreas: `'title'\n 'description'`,\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 gridArea: 'description',\n color: '$text-neutrals-subtle',\n fontSize: '$175',\n lineHeight: '$400',\n})\n\nDescription.displayName = 'Callout.Description'\n","import { createContext, useContext } from 'react'\nimport type { PropsWithChildren } from 'react'\n\nimport type { StyledCalloutProps } from '../callout.styled'\n\ninterface CalloutProps {\n variant?: StyledCalloutProps['variant']\n}\n\ninterface CalloutContextProps extends CalloutProps {}\n\nexport type CalloutProviderProps = CalloutContextProps\n\nconst CalloutContext = createContext<CalloutContextProps>({} as any)\n\nexport const CalloutProvider = ({\n children,\n ...restProps\n}: PropsWithChildren<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: '$icon-primary',\n },\n warning: {\n color: '$icon-warning',\n },\n danger: {\n color: '$icon-danger',\n },\n success: {\n color: '$icon-success',\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 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 { Heading } from '@mirohq/design-system-typography'\nimport type { HeadingProps } from '@mirohq/design-system-typography'\n\nexport interface GroupLabelProps extends Omit<HeadingProps, 'level'> {}\n\nexport const Title = React.forwardRef<\n ElementRef<typeof Heading>,\n GroupLabelProps\n>((props, forwardRef) => <Heading {...props} ref={forwardRef} level={4} />)\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 { IconButton } from '@mirohq/design-system-icon-button'\nimport type { IconButtonProps } from '@mirohq/design-system-icon-button'\nimport { IconCross } from '@mirohq/design-system-icons'\n\nexport const DismissButton: React.FC<IconButtonProps> = props => (\n <IconButton\n css={{ gridArea: 'close' }}\n variant='ghost'\n size='medium'\n data-testid='dismiss-button'\n {...props}\n >\n <IconCross />\n </IconButton>\n)\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 { DismissButton } from './partials/dismiss-button'\nimport { CalloutProvider } from './hooks/use-callout-context'\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 = (StyledCalloutProps & {\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 ...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 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","React","Heading","IconButton","IconCross","useState","jsxs"],"mappings":";;;;;;;;;;;;;;;;AAIa,MAAA,aAAA,GAAgBA,2BAAO,CAAAC,+BAAA,CAAU,GAAK,EAAA;AAAA,EACjD,GAAK,EAAA,MAAA;AAAA,EACL,OAAS,EAAA,MAAA;AAAA,EACT,WAAa,EAAA,KAAA;AAAA,EACb,WAAa,EAAA,OAAA;AAAA,EACb,YAAc,EAAA,KAAA;AAAA,EACd,OAAS,EAAA,MAAA;AAAA,EACT,cAAgB,EAAA,QAAA;AAAA,EAChB,mBAAqB,EAAA,aAAA;AAAA,EACrB,iBAAmB,EAAA,sBAAA;AAAA,EACnB,QAAU,EAAA;AAAA,IACR,OAAS,EAAA;AAAA,MACP,WAAa,EAAA;AAAA,QACX,eAAiB,EAAA,4BAAA;AAAA,QACjB,WAAa,EAAA,wBAAA;AAAA,OACf;AAAA,MACA,OAAS,EAAA;AAAA,QACP,eAAiB,EAAA,4BAAA;AAAA,QACjB,WAAa,EAAA,wBAAA;AAAA,OACf;AAAA,MACA,MAAQ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IAAI,CAAA,CAAA;AACzB,MAAA,SAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,EAAA,CAAA;AAAA,KACF,CAAA;AAEA,IACE,uBAAAT,cAAA,CAAC,mBAAgB,OACf,EAAA,QAAA,kBAAAU,eAAA;AAAA,MAAC,aAAA;AAAA,MAAA;AAAA,QACE,GAAG,KAAA;AAAA,QACJ,GAAK,EAAA,UAAA;AAAA,QACL,OAAA;AAAA,QACA,IAAK,EAAA,OAAA;AAAA,QAEJ,QAAA,EAAA;AAAA,UAAA,QAAA;AAAA,UACA,WAAe,IAAA,SAAA,IAAa,IAAQ,IAAA,CAAA,YAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,YAAA,CAAc,UAAS,CAC1D,oBAAAV,cAAA;AAAA,YAAC,aAAA;AAAA,YAAA;AAAA,cACC,YAAY,EAAA,YAAA;AAAA,cACZ,OAAS,EAAA,eAAA;AAAA,aAAA;AAAA,WACX;AAAA,SAAA;AAAA,OAAA;AAAA,KAGN,EAAA,CAAA,CAAA;AAAA,GAEJ;AACF,EAAA;AAUA,OAAA,CAAQ,OAAU,GAAA,OAAA,CAAA;AAClB,OAAA,CAAQ,WAAc,GAAA,WAAA,CAAA;AACtB,OAAA,CAAQ,QAAW,GAAA,QAAA,CAAA;AACnB,OAAA,CAAQ,KAAQ,GAAA,KAAA,CAAA;AAChB,OAAA,CAAQ,OAAU,GAAA,OAAA;;;;"}
|
package/dist/module.js
CHANGED
@@ -7,8 +7,7 @@ import { Heading } from '@mirohq/design-system-typography';
|
|
7
7
|
import { IconButton } from '@mirohq/design-system-icon-button';
|
8
8
|
|
9
9
|
const StyledCallout = styled(Primitive.div, {
|
10
|
-
|
11
|
-
rowGap: "$150",
|
10
|
+
gap: "$150",
|
12
11
|
padding: "$200",
|
13
12
|
borderWidth: "$sm",
|
14
13
|
borderStyle: "solid",
|
@@ -16,7 +15,7 @@ const StyledCallout = styled(Primitive.div, {
|
|
16
15
|
display: "grid",
|
17
16
|
justifyContent: "center",
|
18
17
|
gridTemplateColumns: "auto 1fr $8",
|
19
|
-
gridTemplateAreas: "'icon content close'
|
18
|
+
gridTemplateAreas: "'icon content close'",
|
20
19
|
variants: {
|
21
20
|
variant: {
|
22
21
|
information: {
|
@@ -111,7 +110,8 @@ const IconSlot = React.forwardRef(({ children, ...restProps }, forwardRef) => {
|
|
111
110
|
const Title = React.forwardRef((props, forwardRef) => /* @__PURE__ */ jsx(Heading, { ...props, ref: forwardRef, level: 4 }));
|
112
111
|
|
113
112
|
const Actions = styled(Primitive.div, {
|
114
|
-
|
113
|
+
gridColumn: "content",
|
114
|
+
gridRow: -1,
|
115
115
|
display: "flex",
|
116
116
|
gap: "$100"
|
117
117
|
});
|
package/dist/module.js.map
CHANGED
@@ -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 columnGap: '$150',\n rowGap: '$150',\n padding: '$200',\n borderWidth: '$sm',\n borderStyle: 'solid',\n borderRadius: '$75',\n display: 'grid',\n justifyContent: 'center',\n gridTemplateColumns: 'auto 1fr $8',\n gridTemplateAreas: `'icon content close'\n 'icon actions close'`,\n variants: {\n variant: {\n information: {\n backgroundColor: '$background-primary-subtle',\n borderColor: '$border-primary-subtle',\n },\n warning: {\n backgroundColor: '$background-warning-subtle',\n borderColor: '$border-warning-subtle',\n },\n danger: {\n backgroundColor: '$background-danger-subtle',\n borderColor: '$border-danger-subtle',\n },\n success: {\n backgroundColor: '$background-success-subtle',\n borderColor: '$border-success-subtle',\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: 'grid',\n gap: '$25',\n maxWidth: '48em',\n gridArea: 'content',\n gridTemplateRows: 'auto 1fr',\n gridTemplateAreas: `'title'\n 'description'`,\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 gridArea: 'description',\n color: '$text-neutrals-subtle',\n fontSize: '$175',\n lineHeight: '$400',\n})\n\nDescription.displayName = 'Callout.Description'\n","import { createContext, useContext } from 'react'\nimport type { PropsWithChildren } from 'react'\n\nimport type { StyledCalloutProps } from '../callout.styled'\n\ninterface CalloutProps {\n variant?: StyledCalloutProps['variant']\n}\n\ninterface CalloutContextProps extends CalloutProps {}\n\nexport type CalloutProviderProps = CalloutContextProps\n\nconst CalloutContext = createContext<CalloutContextProps>({} as any)\n\nexport const CalloutProvider = ({\n children,\n ...restProps\n}: PropsWithChildren<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: '$icon-primary',\n },\n warning: {\n color: '$icon-warning',\n },\n danger: {\n color: '$icon-danger',\n },\n success: {\n color: '$icon-success',\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 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 { Heading } from '@mirohq/design-system-typography'\nimport type { HeadingProps } from '@mirohq/design-system-typography'\n\nexport interface GroupLabelProps extends Omit<HeadingProps, 'level'> {}\n\nexport const Title = React.forwardRef<\n ElementRef<typeof Heading>,\n GroupLabelProps\n>((props, forwardRef) => <Heading {...props} ref={forwardRef} level={4} />)\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const Actions = styled(Primitive.div, {\n gridArea: 'actions',\n display: 'flex',\n gap: '$100',\n})\n\nActions.displayName = 'Callout.Actions'\n","import { IconButton } from '@mirohq/design-system-icon-button'\nimport type { IconButtonProps } from '@mirohq/design-system-icon-button'\nimport { IconCross } from '@mirohq/design-system-icons'\n\nexport const DismissButton: React.FC<IconButtonProps> = props => (\n <IconButton\n css={{ gridArea: 'close' }}\n variant='ghost'\n size='medium'\n data-testid='dismiss-button'\n {...props}\n >\n <IconCross />\n </IconButton>\n)\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 { DismissButton } from './partials/dismiss-button'\nimport { CalloutProvider } from './hooks/use-callout-context'\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 = (StyledCalloutProps & {\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 ...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 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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AA;AAAA,GAEJ;AACF,EAAA;AAUA,OAAA,CAAQ,OAAU,GAAA,OAAA,CAAA;AAClB,OAAA,CAAQ,WAAc,GAAA,WAAA,CAAA;AACtB,OAAA,CAAQ,QAAW,GAAA,QAAA,CAAA;AACnB,OAAA,CAAQ,KAAQ,GAAA,KAAA,CAAA;AAChB,OAAA,CAAQ,OAAU,GAAA,OAAA;;;;"}
|
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 gap: '$150',\n padding: '$200',\n borderWidth: '$sm',\n borderStyle: 'solid',\n borderRadius: '$75',\n display: 'grid',\n justifyContent: 'center',\n gridTemplateColumns: 'auto 1fr $8',\n gridTemplateAreas: `'icon content close'`,\n variants: {\n variant: {\n information: {\n backgroundColor: '$background-primary-subtle',\n borderColor: '$border-primary-subtle',\n },\n warning: {\n backgroundColor: '$background-warning-subtle',\n borderColor: '$border-warning-subtle',\n },\n danger: {\n backgroundColor: '$background-danger-subtle',\n borderColor: '$border-danger-subtle',\n },\n success: {\n backgroundColor: '$background-success-subtle',\n borderColor: '$border-success-subtle',\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: 'grid',\n gap: '$25',\n maxWidth: '48em',\n gridArea: 'content',\n gridTemplateRows: 'auto 1fr',\n gridTemplateAreas: `'title'\n 'description'`,\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 gridArea: 'description',\n color: '$text-neutrals-subtle',\n fontSize: '$175',\n lineHeight: '$400',\n})\n\nDescription.displayName = 'Callout.Description'\n","import { createContext, useContext } from 'react'\nimport type { PropsWithChildren } from 'react'\n\nimport type { StyledCalloutProps } from '../callout.styled'\n\ninterface CalloutProps {\n variant?: StyledCalloutProps['variant']\n}\n\ninterface CalloutContextProps extends CalloutProps {}\n\nexport type CalloutProviderProps = CalloutContextProps\n\nconst CalloutContext = createContext<CalloutContextProps>({} as any)\n\nexport const CalloutProvider = ({\n children,\n ...restProps\n}: PropsWithChildren<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: '$icon-primary',\n },\n warning: {\n color: '$icon-warning',\n },\n danger: {\n color: '$icon-danger',\n },\n success: {\n color: '$icon-success',\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 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 { Heading } from '@mirohq/design-system-typography'\nimport type { HeadingProps } from '@mirohq/design-system-typography'\n\nexport interface GroupLabelProps extends Omit<HeadingProps, 'level'> {}\n\nexport const Title = React.forwardRef<\n ElementRef<typeof Heading>,\n GroupLabelProps\n>((props, forwardRef) => <Heading {...props} ref={forwardRef} level={4} />)\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 { IconButton } from '@mirohq/design-system-icon-button'\nimport type { IconButtonProps } from '@mirohq/design-system-icon-button'\nimport { IconCross } from '@mirohq/design-system-icons'\n\nexport const DismissButton: React.FC<IconButtonProps> = props => (\n <IconButton\n css={{ gridArea: 'close' }}\n variant='ghost'\n size='medium'\n data-testid='dismiss-button'\n {...props}\n >\n <IconCross />\n </IconButton>\n)\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 { DismissButton } from './partials/dismiss-button'\nimport { CalloutProvider } from './hooks/use-callout-context'\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 = (StyledCalloutProps & {\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 ...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 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":";;;;;;;;AAIa,MAAA,aAAA,GAAgB,MAAO,CAAA,SAAA,CAAU,GAAK,EAAA;AAAA,EACjD,GAAK,EAAA,MAAA;AAAA,EACL,OAAS,EAAA,MAAA;AAAA,EACT,WAAa,EAAA,KAAA;AAAA,EACb,WAAa,EAAA,OAAA;AAAA,EACb,YAAc,EAAA,KAAA;A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ANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@mirohq/design-system-callout",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.2",
|
4
4
|
"description": "",
|
5
5
|
"author": "Miro",
|
6
6
|
"source": "src/index.ts",
|
@@ -26,11 +26,11 @@
|
|
26
26
|
"react": "^16.14 || ^17 || ^18"
|
27
27
|
},
|
28
28
|
"dependencies": {
|
29
|
-
"@mirohq/design-system-
|
29
|
+
"@mirohq/design-system-icons": "^0.58.0",
|
30
30
|
"@mirohq/design-system-primitive": "^1.1.2",
|
31
|
-
"@mirohq/design-system-
|
32
|
-
"@mirohq/design-system-
|
33
|
-
"@mirohq/design-system-
|
31
|
+
"@mirohq/design-system-icon-button": "^3.2.0",
|
32
|
+
"@mirohq/design-system-typography": "^0.6.3",
|
33
|
+
"@mirohq/design-system-stitches": "^2.6.25"
|
34
34
|
},
|
35
35
|
"scripts": {
|
36
36
|
"build": "rollup -c ../../../rollup.config.js",
|