@tryghost/shade 0.1.0-alpha.38 → 0.1.0-alpha.39
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/es/components/patterns/settings-modal-variants.js +3 -0
- package/es/components/patterns/settings-modal-variants.js.map +1 -1
- package/es/components/patterns/settings-modal.js +7 -0
- package/es/components/patterns/settings-modal.js.map +1 -1
- package/package.json +1 -1
- package/types/components/patterns/settings-modal-variants.d.ts +3 -0
- package/types/components/patterns/settings-modal-variants.d.ts.map +1 -1
- package/types/components/patterns/settings-modal.d.ts +11 -2
- package/types/components/patterns/settings-modal.d.ts.map +1 -1
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
2
|
//#region src/components/patterns/settings-modal-variants.ts
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Only for Admin's legacy settings modals. Use `Dialog` from `@tryghost/shade/components` for new modals.
|
|
5
|
+
*/
|
|
3
6
|
var settingsModalVariants = cva("relative z-50 flex max-h-full w-full flex-col justify-between overflow-x-hidden bg-background text-foreground", {
|
|
4
7
|
variants: {
|
|
5
8
|
size: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-modal-variants.js","names":[],"sources":["../../../src/components/patterns/settings-modal-variants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\nconst settingsModalVariants = cva(\n 'relative z-50 flex max-h-full w-full flex-col justify-between overflow-x-hidden bg-background text-foreground',\n {\n variants: {\n size: {\n sm: 'max-w-[480px] rounded-lg',\n md: 'max-w-[720px] rounded-lg',\n lg: 'max-w-[1020px] rounded-lg',\n xl: 'max-w-[1240px] rounded-lg',\n full: 'h-full rounded-lg',\n bleed: 'h-full',\n },\n align: {\n center: 'mx-auto',\n left: 'mr-auto',\n right: 'ml-auto',\n },\n scrolling: {\n true: 'overflow-y-auto',\n false: 'overflow-y-hidden',\n },\n formSheet: {\n true: 'shadow-md',\n false: 'shadow-xl',\n },\n },\n defaultVariants: {\n size: 'md',\n align: 'center',\n scrolling: true,\n formSheet: false,\n },\n },\n);\n\nexport { settingsModalVariants };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"settings-modal-variants.js","names":[],"sources":["../../../src/components/patterns/settings-modal-variants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\n/**\n * @deprecated Only for Admin's legacy settings modals. Use `Dialog` from `@tryghost/shade/components` for new modals.\n */\nconst settingsModalVariants = cva(\n 'relative z-50 flex max-h-full w-full flex-col justify-between overflow-x-hidden bg-background text-foreground',\n {\n variants: {\n size: {\n sm: 'max-w-[480px] rounded-lg',\n md: 'max-w-[720px] rounded-lg',\n lg: 'max-w-[1020px] rounded-lg',\n xl: 'max-w-[1240px] rounded-lg',\n full: 'h-full rounded-lg',\n bleed: 'h-full',\n },\n align: {\n center: 'mx-auto',\n left: 'mr-auto',\n right: 'ml-auto',\n },\n scrolling: {\n true: 'overflow-y-auto',\n false: 'overflow-y-hidden',\n },\n formSheet: {\n true: 'shadow-md',\n false: 'shadow-xl',\n },\n },\n defaultVariants: {\n size: 'md',\n align: 'center',\n scrolling: true,\n formSheet: false,\n },\n },\n);\n\nexport { settingsModalVariants };\n"],"mappings":";;;;;AAKA,IAAM,wBAAwB,IAC5B,iHACA;CACE,UAAU;EACR,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,MAAM;GACN,OAAO;EACT;EACA,OAAO;GACL,QAAQ;GACR,MAAM;GACN,OAAO;EACT;EACA,WAAW;GACT,MAAM;GACN,OAAO;EACT;EACA,WAAW;GACT,MAAM;GACN,OAAO;EACT;CACF;CACA,iBAAiB;EACf,MAAM;EACN,OAAO;EACP,WAAW;EACX,WAAW;CACb;AACF,CACF"}
|
|
@@ -38,6 +38,13 @@ var headerOffsets = {
|
|
|
38
38
|
full: "-inset-x-10",
|
|
39
39
|
bleed: "-inset-x-10"
|
|
40
40
|
};
|
|
41
|
+
/**
|
|
42
|
+
* Consumer-controlled settings modal shell. Admin's legacy full-page settings
|
|
43
|
+
* dialogs still render through it. It is not a real dialog: it doesn't trap
|
|
44
|
+
* focus or announce itself to screen readers.
|
|
45
|
+
*
|
|
46
|
+
* @deprecated Only for Admin's legacy settings modals. Use `Dialog` from `@tryghost/shade/components` for new modals.
|
|
47
|
+
*/
|
|
41
48
|
var SettingsModal = forwardRef(({ "aria-label": ariaLabel, className, size = "md", align = "center", width, height, testId, title, okLabel = "OK", okLoading = false, cancelLabel = "Cancel", footer, footerClassName, header, leftButton, buttonsDisabled, okDisabled, padding = true, onOk, okVariant = "default", onCancel, topRightContent, hideXOnMobile = false, onClose, afterClose, children, backDrop = true, backDropClick = true, stickyFooter = false, stickyHeader = false, scrolling = true, dirty = false, animate = true, formSheet = false, enableCMDS = true, allowBackgroundInteraction = false }, ref) => {
|
|
42
49
|
const { setGlobalDirtyState } = useGlobalDirtyState();
|
|
43
50
|
const { confirm, dialogProps } = useDirtyConfirmation();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-modal.js","names":[],"sources":["../../../src/components/patterns/settings-modal.tsx"],"sourcesContent":["import { X } from 'lucide-react';\nimport React, { forwardRef, useEffect, useState } from 'react';\n\nimport { settingsModalVariants } from '@/components/patterns/settings-modal-variants';\nimport { Button, type ButtonProps } from '@/components/ui/button';\nimport { LoadingIndicator } from '@/components/ui/loading-indicator';\nimport { StickyFooter } from '@/components/ui/sticky-footer';\nimport { Box } from '@/components/primitives/box';\nimport { Inline } from '@/components/primitives/inline';\nimport { Text } from '@/components/primitives/text';\nimport { DirtyConfirmDialog } from '@/components/patterns/dirty-confirm-dialog';\nimport { useDirtyConfirmation } from '@/components/patterns/use-dirty-confirmation';\nimport useGlobalDirtyState from '@/hooks/use-global-dirty-state';\nimport { cn } from '@/lib/utils';\n\n/**\n * Consumer-controlled settings modal shell. Legacy full-page settings dialogs\n * still render through it; new modal flows should use Shade Dialog primitives.\n */\nexport type SettingsModalSize = 'sm' | 'md' | 'lg' | 'xl' | 'full' | 'bleed';\n\nexport interface SettingsModalProps {\n 'aria-label'?: string;\n className?: string;\n size?: SettingsModalSize;\n width?: 'full' | 'toSidebar' | number;\n height?: 'full' | number;\n align?: 'center' | 'left' | 'right';\n testId?: string;\n title?: React.ReactNode;\n okLabel?: string;\n okVariant?: ButtonProps['variant'];\n okLoading?: boolean;\n cancelLabel?: string;\n leftButton?: React.ReactNode;\n buttonsDisabled?: boolean;\n okDisabled?: boolean;\n footer?: boolean | React.ReactNode;\n /** Extra classes on the default footer's button row, e.g. to constrain its width. */\n footerClassName?: string;\n header?: boolean;\n padding?: boolean;\n /** May be async; the modal fires it without awaiting, so the handler owns its own error handling. */\n onOk?: () => void | Promise<void>;\n onCancel?: () => void;\n topRightContent?: 'close' | React.ReactNode;\n hideXOnMobile?: boolean;\n onClose: () => void;\n afterClose?: () => void;\n children?: React.ReactNode;\n backDrop?: boolean;\n backDropClick?: boolean;\n stickyFooter?: boolean;\n stickyHeader?: boolean;\n scrolling?: boolean;\n dirty?: boolean;\n animate?: boolean;\n formSheet?: boolean;\n enableCMDS?: boolean;\n allowBackgroundInteraction?: boolean;\n}\n\nconst MODAL_BACKDROP_CLASSES = 'bg-modal-backdrop backdrop-blur-[3px]';\n\nconst backdropPadding: Record<SettingsModalSize, string> = {\n sm: 'p-4 md:p-[8vmin]',\n md: 'p-4 md:p-[8vmin]',\n lg: 'p-4 md:p-[4vmin]',\n xl: 'p-4 md:p-[3vmin]',\n full: 'p-4 md:p-[3vmin]',\n bleed: '',\n};\n\nconst contentPadding: Record<SettingsModalSize, string> = {\n sm: 'p-8',\n md: 'p-8',\n lg: 'p-7',\n xl: 'p-10',\n full: 'p-10',\n bleed: 'p-10',\n};\n\nconst headerOffsets: Record<SettingsModalSize, string> = {\n sm: '-inset-x-8',\n md: '-inset-x-8',\n lg: '-inset-x-8',\n xl: '-inset-x-10 -top-10',\n full: '-inset-x-10',\n bleed: '-inset-x-10',\n};\n\nconst SettingsModal = forwardRef<HTMLElement, SettingsModalProps>(\n (\n {\n 'aria-label': ariaLabel,\n className,\n size = 'md',\n align = 'center',\n width,\n height,\n testId,\n title,\n okLabel = 'OK',\n okLoading = false,\n cancelLabel = 'Cancel',\n footer,\n footerClassName,\n header,\n leftButton,\n buttonsDisabled,\n okDisabled,\n padding = true,\n onOk,\n okVariant = 'default',\n onCancel,\n topRightContent,\n hideXOnMobile = false,\n onClose,\n afterClose,\n children,\n backDrop = true,\n backDropClick = true,\n stickyFooter = false,\n stickyHeader = false,\n scrolling = true,\n dirty = false,\n animate = true,\n formSheet = false,\n enableCMDS = true,\n allowBackgroundInteraction = false,\n },\n ref,\n ) => {\n const { setGlobalDirtyState } = useGlobalDirtyState();\n const { confirm, dialogProps } = useDirtyConfirmation();\n const [animationFinished, setAnimationFinished] = useState(false);\n useEffect(() => {\n setGlobalDirtyState(dirty);\n }, [dirty, setGlobalDirtyState]);\n\n const removeModal = () => {\n confirm(dirty, () => {\n onClose();\n afterClose?.();\n });\n };\n\n useEffect(() => {\n const handleEscapeKey = (event: KeyboardEvent) => {\n if (event.key !== 'Escape') {\n return;\n }\n\n const activeElement = document.activeElement;\n if (activeElement?.hasAttribute('data-kg-link-input')) {\n return;\n }\n\n setTimeout(() => {\n // Radix layers may handle Escape from a document listener that\n // was registered after this modal. Wait until propagation is\n // complete before deciding whether the modal should close.\n if (event.defaultPrevented) {\n return;\n }\n\n if (activeElement instanceof HTMLElement && document.activeElement === activeElement) {\n activeElement.blur();\n }\n\n if (onCancel) {\n onCancel();\n } else {\n removeModal();\n }\n });\n };\n\n document.addEventListener('keydown', handleEscapeKey);\n return () => document.removeEventListener('keydown', handleEscapeKey);\n });\n\n useEffect(() => {\n const timeout = setTimeout(() => setAnimationFinished(true), 250);\n return () => clearTimeout(timeout);\n }, []);\n\n useEffect(() => {\n if (!onOk || !enableCMDS) {\n return;\n }\n\n const handleCMDS = (event: KeyboardEvent) => {\n if ((event.metaKey || event.ctrlKey) && event.key === 's') {\n event.preventDefault();\n void onOk();\n }\n };\n\n window.addEventListener('keydown', handleCMDS);\n return () => window.removeEventListener('keydown', handleCMDS);\n }, [enableCMDS, onOk]);\n\n const paddingClasses = padding ? contentPadding[size] : 'p-0';\n const modalClasses = cn(\n settingsModalVariants({ size, align, scrolling, formSheet }),\n className,\n animate && !formSheet && !animationFinished && align === 'center' && 'animate-modal-in',\n animate &&\n !formSheet &&\n !animationFinished &&\n align === 'right' &&\n 'animate-modal-in-from-right',\n formSheet && !animationFinished && 'animate-modal-in-reverse',\n width === 'full' && 'w-full',\n width === 'toSidebar' &&\n 'w-full max-w-[calc(100dvw_-_280px)] lg:max-w-full min-[1280px]:max-w-[calc(100dvw_-_320px)]',\n height === 'full' && 'h-full',\n allowBackgroundInteraction && 'pointer-events-auto',\n );\n const backdropClasses = cn(\n 'fixed inset-0 z-[1000] h-[100dvh] w-[100dvw] max-[800px]:pb-20',\n backdropPadding[size],\n allowBackgroundInteraction && 'pointer-events-none',\n );\n const headerClasses = cn(\n paddingClasses,\n 'pb-0',\n headerOffsets[size],\n topRightContent && topRightContent !== 'close' && 'flex items-center justify-between gap-5',\n stickyHeader && 'sticky -top-px z-[300] -mb-4 bg-background pb-4',\n );\n const contentClasses = cn(\n paddingClasses,\n 'py-0',\n (size === 'full' || size === 'bleed' || height === 'full' || typeof height === 'number') &&\n 'grow',\n !scrolling && 'min-h-0',\n footer === false && 'pb-0',\n );\n const footerClasses = cn(\n paddingClasses,\n 'flex w-full items-center justify-between',\n stickyFooter && 'py-6',\n footerClassName,\n );\n const modalStyles: React.CSSProperties = {\n ...(typeof width === 'number' ? { width: '100%', maxWidth: `${width}px` } : {}),\n ...(typeof height === 'number' ? { height: '100%', maxHeight: `${height}px` } : {}),\n };\n\n const handleBackdropClick = (event: React.MouseEvent<HTMLDivElement>) => {\n if (event.target === event.currentTarget && backDropClick) {\n removeModal();\n }\n };\n\n let footerContent: React.ReactNode;\n if (footer) {\n footerContent = footer;\n } else if (footer !== false) {\n footerContent = (\n <Inline className={footerClasses} gap=\"none\" justify=\"between\">\n <Box>{leftButton}</Box>\n <Inline gap=\"md\">\n {cancelLabel && (\n <Button\n data-testid=\"cancel-modal\"\n disabled={buttonsDisabled}\n type=\"button\"\n variant=\"outline\"\n onClick={onCancel || removeModal}\n >\n {cancelLabel}\n </Button>\n )}\n {okLabel && (\n <Button\n data-testid=\"ok-modal\"\n disabled={buttonsDisabled || okDisabled || okLoading}\n type=\"button\"\n variant={okVariant}\n onClick={() => void onOk?.()}\n >\n {okLoading && <LoadingIndicator size=\"sm\" />}\n {okLabel}\n </Button>\n )}\n </Inline>\n </Inline>\n );\n }\n\n if (stickyFooter) {\n footerContent = <StickyFooter height={84}>{footerContent}</StickyFooter>;\n }\n\n const titleContent = title && (\n <Text\n as=\"h3\"\n className=\"in-data-[admin7-design=true]:font-title md:text-2xl\"\n leading=\"heading\"\n size=\"xl\"\n weight=\"bold\"\n >\n {title}\n </Text>\n );\n const headerContent =\n topRightContent && topRightContent !== 'close' ? (\n <Inline as=\"header\" className={headerClasses} gap=\"lg\" justify=\"between\">\n {titleContent}\n {topRightContent}\n </Inline>\n ) : (\n <header className={headerClasses}>\n {titleContent}\n <Box\n className={cn(\n 'absolute top-6 right-6',\n topRightContent !== 'close' && 'md:hidden',\n hideXOnMobile && 'hidden',\n )}\n >\n <Button\n aria-label=\"Close modal\"\n className=\"-m-2 opacity-50 hover:opacity-100\"\n data-testid=\"close-modal\"\n size=\"icon\"\n type=\"button\"\n variant=\"ghost\"\n onClick={removeModal}\n >\n <X />\n </Button>\n </Box>\n </header>\n );\n\n return (\n <>\n <Box className={backdropClasses} id=\"modal-backdrop\" onMouseDown={handleBackdropClick}>\n <Box\n className={cn(\n 'pointer-events-none fixed inset-0 z-0',\n backDrop && !formSheet && MODAL_BACKDROP_CLASSES,\n formSheet && 'bg-form-sheet-backdrop',\n )}\n />\n <section\n ref={ref}\n aria-label={ariaLabel}\n className={modalClasses}\n data-testid={testId}\n style={modalStyles}\n >\n {header !== false && headerContent}\n <Box className={contentClasses}>{children}</Box>\n {footerContent}\n </section>\n </Box>\n <DirtyConfirmDialog {...dialogProps} />\n </>\n );\n },\n);\n\nSettingsModal.displayName = 'SettingsModal';\n\nexport { SettingsModal };\n"],"mappings":";;;;;;;;;;;;;;;AA8DA,IAAM,yBAAyB;AAE/B,IAAM,kBAAqD;CACzD,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,MAAM;CACN,OAAO;AACT;AAEA,IAAM,iBAAoD;CACxD,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,MAAM;CACN,OAAO;AACT;AAEA,IAAM,gBAAmD;CACvD,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,MAAM;CACN,OAAO;AACT;AAEA,IAAM,gBAAgB,YAElB,EACE,cAAc,WACd,WACA,OAAO,MACP,QAAQ,UACR,OACA,QACA,QACA,OACA,UAAU,MACV,YAAY,OACZ,cAAc,UACd,QACA,iBACA,QACA,YACA,iBACA,YACA,UAAU,MACV,MACA,YAAY,WACZ,UACA,iBACA,gBAAgB,OAChB,SACA,YACA,UACA,WAAW,MACX,gBAAgB,MAChB,eAAe,OACf,eAAe,OACf,YAAY,MACZ,QAAQ,OACR,UAAU,MACV,YAAY,OACZ,aAAa,MACb,6BAA6B,SAE/B,QACG;CACH,MAAM,EAAE,wBAAwB,oBAAoB;CACpD,MAAM,EAAE,SAAS,gBAAgB,qBAAqB;CACtD,MAAM,CAAC,mBAAmB,wBAAwB,SAAS,KAAK;CAChE,gBAAgB;EACd,oBAAoB,KAAK;CAC3B,GAAG,CAAC,OAAO,mBAAmB,CAAC;CAE/B,MAAM,oBAAoB;EACxB,QAAQ,aAAa;GACnB,QAAQ;GACR,aAAa;EACf,CAAC;CACH;CAEA,gBAAgB;EACd,MAAM,mBAAmB,UAAyB;GAChD,IAAI,MAAM,QAAQ,UAChB;GAGF,MAAM,gBAAgB,SAAS;GAC/B,IAAI,eAAe,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,WAAW,GACT,0BACA,oBAAoB,WAAW,aAC/B,iBAAiB,QACnB;aAEA,oBAAC,QAAD;IACE,cAAW;IACX,WAAU;IACV,eAAY;IACZ,MAAK;IACL,MAAK;IACL,SAAQ;IACR,SAAS;cAET,oBAAC,GAAD,CAAI,CAAA;GACE,CAAA;EACL,CAAA,CACC;;CAGZ,OACE,qBAAA,YAAA,EAAA,UAAA,CACE,qBAAC,KAAD;EAAK,WAAW;EAAiB,IAAG;EAAiB,aAAa;YAAlE,CACE,oBAAC,KAAD,EACE,WAAW,GACT,yCACA,YAAY,CAAC,aAAa,wBAC1B,aAAa,wBACf,EACD,CAAA,GACD,qBAAC,WAAD;GACO;GACL,cAAY;GACZ,WAAW;GACX,eAAa;GACb,OAAO;aALT;IAOG,WAAW,SAAS;IACrB,oBAAC,KAAD;KAAK,WAAW;KAAiB;IAAc,CAAA;IAC9C;GACM;IACN;KACL,oBAAC,oBAAD,EAAoB,GAAI,YAAc,CAAA,CACtC,EAAA,CAAA;AAEN,CACF;AAEA,cAAc,cAAc"}
|
|
1
|
+
{"version":3,"file":"settings-modal.js","names":[],"sources":["../../../src/components/patterns/settings-modal.tsx"],"sourcesContent":["import { X } from 'lucide-react';\nimport React, { forwardRef, useEffect, useState } from 'react';\n\nimport { settingsModalVariants } from '@/components/patterns/settings-modal-variants';\nimport { Button, type ButtonProps } from '@/components/ui/button';\nimport { LoadingIndicator } from '@/components/ui/loading-indicator';\nimport { StickyFooter } from '@/components/ui/sticky-footer';\nimport { Box } from '@/components/primitives/box';\nimport { Inline } from '@/components/primitives/inline';\nimport { Text } from '@/components/primitives/text';\nimport { DirtyConfirmDialog } from '@/components/patterns/dirty-confirm-dialog';\nimport { useDirtyConfirmation } from '@/components/patterns/use-dirty-confirmation';\nimport useGlobalDirtyState from '@/hooks/use-global-dirty-state';\nimport { cn } from '@/lib/utils';\n\n/**\n * @deprecated Only for Admin's legacy settings modals. Use `Dialog` from `@tryghost/shade/components` for new modals.\n */\nexport type SettingsModalSize = 'sm' | 'md' | 'lg' | 'xl' | 'full' | 'bleed';\n\n/**\n * @deprecated Only for Admin's legacy settings modals. Use `Dialog` from `@tryghost/shade/components` for new modals.\n */\nexport interface SettingsModalProps {\n 'aria-label'?: string;\n className?: string;\n size?: SettingsModalSize;\n width?: 'full' | 'toSidebar' | number;\n height?: 'full' | number;\n align?: 'center' | 'left' | 'right';\n testId?: string;\n title?: React.ReactNode;\n okLabel?: string;\n okVariant?: ButtonProps['variant'];\n okLoading?: boolean;\n cancelLabel?: string;\n leftButton?: React.ReactNode;\n buttonsDisabled?: boolean;\n okDisabled?: boolean;\n footer?: boolean | React.ReactNode;\n /** Extra classes on the default footer's button row, e.g. to constrain its width. */\n footerClassName?: string;\n header?: boolean;\n padding?: boolean;\n /** May be async; the modal fires it without awaiting, so the handler owns its own error handling. */\n onOk?: () => void | Promise<void>;\n onCancel?: () => void;\n topRightContent?: 'close' | React.ReactNode;\n hideXOnMobile?: boolean;\n onClose: () => void;\n afterClose?: () => void;\n children?: React.ReactNode;\n backDrop?: boolean;\n backDropClick?: boolean;\n stickyFooter?: boolean;\n stickyHeader?: boolean;\n scrolling?: boolean;\n dirty?: boolean;\n animate?: boolean;\n formSheet?: boolean;\n enableCMDS?: boolean;\n allowBackgroundInteraction?: boolean;\n}\n\nconst MODAL_BACKDROP_CLASSES = 'bg-modal-backdrop backdrop-blur-[3px]';\n\nconst backdropPadding: Record<SettingsModalSize, string> = {\n sm: 'p-4 md:p-[8vmin]',\n md: 'p-4 md:p-[8vmin]',\n lg: 'p-4 md:p-[4vmin]',\n xl: 'p-4 md:p-[3vmin]',\n full: 'p-4 md:p-[3vmin]',\n bleed: '',\n};\n\nconst contentPadding: Record<SettingsModalSize, string> = {\n sm: 'p-8',\n md: 'p-8',\n lg: 'p-7',\n xl: 'p-10',\n full: 'p-10',\n bleed: 'p-10',\n};\n\nconst headerOffsets: Record<SettingsModalSize, string> = {\n sm: '-inset-x-8',\n md: '-inset-x-8',\n lg: '-inset-x-8',\n xl: '-inset-x-10 -top-10',\n full: '-inset-x-10',\n bleed: '-inset-x-10',\n};\n\n/**\n * Consumer-controlled settings modal shell. Admin's legacy full-page settings\n * dialogs still render through it. It is not a real dialog: it doesn't trap\n * focus or announce itself to screen readers.\n *\n * @deprecated Only for Admin's legacy settings modals. Use `Dialog` from `@tryghost/shade/components` for new modals.\n */\nconst SettingsModal = forwardRef<HTMLElement, SettingsModalProps>(\n (\n {\n 'aria-label': ariaLabel,\n className,\n size = 'md',\n align = 'center',\n width,\n height,\n testId,\n title,\n okLabel = 'OK',\n okLoading = false,\n cancelLabel = 'Cancel',\n footer,\n footerClassName,\n header,\n leftButton,\n buttonsDisabled,\n okDisabled,\n padding = true,\n onOk,\n okVariant = 'default',\n onCancel,\n topRightContent,\n hideXOnMobile = false,\n onClose,\n afterClose,\n children,\n backDrop = true,\n backDropClick = true,\n stickyFooter = false,\n stickyHeader = false,\n scrolling = true,\n dirty = false,\n animate = true,\n formSheet = false,\n enableCMDS = true,\n allowBackgroundInteraction = false,\n },\n ref,\n ) => {\n const { setGlobalDirtyState } = useGlobalDirtyState();\n const { confirm, dialogProps } = useDirtyConfirmation();\n const [animationFinished, setAnimationFinished] = useState(false);\n useEffect(() => {\n setGlobalDirtyState(dirty);\n }, [dirty, setGlobalDirtyState]);\n\n const removeModal = () => {\n confirm(dirty, () => {\n onClose();\n afterClose?.();\n });\n };\n\n useEffect(() => {\n const handleEscapeKey = (event: KeyboardEvent) => {\n if (event.key !== 'Escape') {\n return;\n }\n\n const activeElement = document.activeElement;\n if (activeElement?.hasAttribute('data-kg-link-input')) {\n return;\n }\n\n setTimeout(() => {\n // Radix layers may handle Escape from a document listener that\n // was registered after this modal. Wait until propagation is\n // complete before deciding whether the modal should close.\n if (event.defaultPrevented) {\n return;\n }\n\n if (activeElement instanceof HTMLElement && document.activeElement === activeElement) {\n activeElement.blur();\n }\n\n if (onCancel) {\n onCancel();\n } else {\n removeModal();\n }\n });\n };\n\n document.addEventListener('keydown', handleEscapeKey);\n return () => document.removeEventListener('keydown', handleEscapeKey);\n });\n\n useEffect(() => {\n const timeout = setTimeout(() => setAnimationFinished(true), 250);\n return () => clearTimeout(timeout);\n }, []);\n\n useEffect(() => {\n if (!onOk || !enableCMDS) {\n return;\n }\n\n const handleCMDS = (event: KeyboardEvent) => {\n if ((event.metaKey || event.ctrlKey) && event.key === 's') {\n event.preventDefault();\n void onOk();\n }\n };\n\n window.addEventListener('keydown', handleCMDS);\n return () => window.removeEventListener('keydown', handleCMDS);\n }, [enableCMDS, onOk]);\n\n const paddingClasses = padding ? contentPadding[size] : 'p-0';\n const modalClasses = cn(\n settingsModalVariants({ size, align, scrolling, formSheet }),\n className,\n animate && !formSheet && !animationFinished && align === 'center' && 'animate-modal-in',\n animate &&\n !formSheet &&\n !animationFinished &&\n align === 'right' &&\n 'animate-modal-in-from-right',\n formSheet && !animationFinished && 'animate-modal-in-reverse',\n width === 'full' && 'w-full',\n width === 'toSidebar' &&\n 'w-full max-w-[calc(100dvw_-_280px)] lg:max-w-full min-[1280px]:max-w-[calc(100dvw_-_320px)]',\n height === 'full' && 'h-full',\n allowBackgroundInteraction && 'pointer-events-auto',\n );\n const backdropClasses = cn(\n 'fixed inset-0 z-[1000] h-[100dvh] w-[100dvw] max-[800px]:pb-20',\n backdropPadding[size],\n allowBackgroundInteraction && 'pointer-events-none',\n );\n const headerClasses = cn(\n paddingClasses,\n 'pb-0',\n headerOffsets[size],\n topRightContent && topRightContent !== 'close' && 'flex items-center justify-between gap-5',\n stickyHeader && 'sticky -top-px z-[300] -mb-4 bg-background pb-4',\n );\n const contentClasses = cn(\n paddingClasses,\n 'py-0',\n (size === 'full' || size === 'bleed' || height === 'full' || typeof height === 'number') &&\n 'grow',\n !scrolling && 'min-h-0',\n footer === false && 'pb-0',\n );\n const footerClasses = cn(\n paddingClasses,\n 'flex w-full items-center justify-between',\n stickyFooter && 'py-6',\n footerClassName,\n );\n const modalStyles: React.CSSProperties = {\n ...(typeof width === 'number' ? { width: '100%', maxWidth: `${width}px` } : {}),\n ...(typeof height === 'number' ? { height: '100%', maxHeight: `${height}px` } : {}),\n };\n\n const handleBackdropClick = (event: React.MouseEvent<HTMLDivElement>) => {\n if (event.target === event.currentTarget && backDropClick) {\n removeModal();\n }\n };\n\n let footerContent: React.ReactNode;\n if (footer) {\n footerContent = footer;\n } else if (footer !== false) {\n footerContent = (\n <Inline className={footerClasses} gap=\"none\" justify=\"between\">\n <Box>{leftButton}</Box>\n <Inline gap=\"md\">\n {cancelLabel && (\n <Button\n data-testid=\"cancel-modal\"\n disabled={buttonsDisabled}\n type=\"button\"\n variant=\"outline\"\n onClick={onCancel || removeModal}\n >\n {cancelLabel}\n </Button>\n )}\n {okLabel && (\n <Button\n data-testid=\"ok-modal\"\n disabled={buttonsDisabled || okDisabled || okLoading}\n type=\"button\"\n variant={okVariant}\n onClick={() => void onOk?.()}\n >\n {okLoading && <LoadingIndicator size=\"sm\" />}\n {okLabel}\n </Button>\n )}\n </Inline>\n </Inline>\n );\n }\n\n if (stickyFooter) {\n footerContent = <StickyFooter height={84}>{footerContent}</StickyFooter>;\n }\n\n const titleContent = title && (\n <Text\n as=\"h3\"\n className=\"in-data-[admin7-design=true]:font-title md:text-2xl\"\n leading=\"heading\"\n size=\"xl\"\n weight=\"bold\"\n >\n {title}\n </Text>\n );\n const headerContent =\n topRightContent && topRightContent !== 'close' ? (\n <Inline as=\"header\" className={headerClasses} gap=\"lg\" justify=\"between\">\n {titleContent}\n {topRightContent}\n </Inline>\n ) : (\n <header className={headerClasses}>\n {titleContent}\n <Box\n className={cn(\n 'absolute top-6 right-6',\n topRightContent !== 'close' && 'md:hidden',\n hideXOnMobile && 'hidden',\n )}\n >\n <Button\n aria-label=\"Close modal\"\n className=\"-m-2 opacity-50 hover:opacity-100\"\n data-testid=\"close-modal\"\n size=\"icon\"\n type=\"button\"\n variant=\"ghost\"\n onClick={removeModal}\n >\n <X />\n </Button>\n </Box>\n </header>\n );\n\n return (\n <>\n <Box className={backdropClasses} id=\"modal-backdrop\" onMouseDown={handleBackdropClick}>\n <Box\n className={cn(\n 'pointer-events-none fixed inset-0 z-0',\n backDrop && !formSheet && MODAL_BACKDROP_CLASSES,\n formSheet && 'bg-form-sheet-backdrop',\n )}\n />\n <section\n ref={ref}\n aria-label={ariaLabel}\n className={modalClasses}\n data-testid={testId}\n style={modalStyles}\n >\n {header !== false && headerContent}\n <Box className={contentClasses}>{children}</Box>\n {footerContent}\n </section>\n </Box>\n <DirtyConfirmDialog {...dialogProps} />\n </>\n );\n },\n);\n\nSettingsModal.displayName = 'SettingsModal';\n\nexport { SettingsModal };\n"],"mappings":";;;;;;;;;;;;;;;AAgEA,IAAM,yBAAyB;AAE/B,IAAM,kBAAqD;CACzD,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,MAAM;CACN,OAAO;AACT;AAEA,IAAM,iBAAoD;CACxD,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,MAAM;CACN,OAAO;AACT;AAEA,IAAM,gBAAmD;CACvD,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,MAAM;CACN,OAAO;AACT;;;;;;;;AASA,IAAM,gBAAgB,YAElB,EACE,cAAc,WACd,WACA,OAAO,MACP,QAAQ,UACR,OACA,QACA,QACA,OACA,UAAU,MACV,YAAY,OACZ,cAAc,UACd,QACA,iBACA,QACA,YACA,iBACA,YACA,UAAU,MACV,MACA,YAAY,WACZ,UACA,iBACA,gBAAgB,OAChB,SACA,YACA,UACA,WAAW,MACX,gBAAgB,MAChB,eAAe,OACf,eAAe,OACf,YAAY,MACZ,QAAQ,OACR,UAAU,MACV,YAAY,OACZ,aAAa,MACb,6BAA6B,SAE/B,QACG;CACH,MAAM,EAAE,wBAAwB,oBAAoB;CACpD,MAAM,EAAE,SAAS,gBAAgB,qBAAqB;CACtD,MAAM,CAAC,mBAAmB,wBAAwB,SAAS,KAAK;CAChE,gBAAgB;EACd,oBAAoB,K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;EACV,SAAQ;EACR,MAAK;EACL,QAAO;YAEN;CACG,CAAA;CAER,MAAM,gBACJ,mBAAmB,oBAAoB,UACrC,qBAAC,QAAD;EAAQ,IAAG;EAAS,WAAW;EAAe,KAAI;EAAK,SAAQ;YAA/D,CACG,cACA,eACK;MAER,qBAAC,UAAD;EAAQ,WAAW;YAAnB,CACG,cACD,oBAAC,KAAD;GACE,WAAW,GACT,0BACA,oBAAoB,WAAW,aAC/B,iBAAiB,QACnB;aAEA,oBAAC,QAAD;IACE,cAAW;IACX,WAAU;IACV,eAAY;IACZ,MAAK;IACL,MAAK;IACL,SAAQ;IACR,SAAS;cAET,oBAAC,GAAD,CAAI,CAAA;GACE,CAAA;EACL,CAAA,CACC;;CAGZ,OACE,qBAAA,YAAA,EAAA,UAAA,CACE,qBAAC,KAAD;EAAK,WAAW;EAAiB,IAAG;EAAiB,aAAa;YAAlE,CACE,oBAAC,KAAD,EACE,WAAW,GACT,yCACA,YAAY,CAAC,aAAa,wBAC1B,aAAa,wBACf,EACD,CAAA,GACD,qBAAC,WAAD;GACO;GACL,cAAY;GACZ,WAAW;GACX,eAAa;GACb,OAAO;aALT;IAOG,WAAW,SAAS;IACrB,oBAAC,KAAD;KAAK,WAAW;KAAiB;IAAc,CAAA;IAC9C;GACM;IACN;KACL,oBAAC,oBAAD,EAAoB,GAAI,YAAc,CAAA,CACtC,EAAA,CAAA;AAEN,CACF;AAEA,cAAc,cAAc"}
|
package/package.json
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Only for Admin's legacy settings modals. Use `Dialog` from `@tryghost/shade/components` for new modals.
|
|
3
|
+
*/
|
|
1
4
|
declare const settingsModalVariants: (props?: ({
|
|
2
5
|
size?: "bleed" | "full" | "lg" | "md" | "sm" | "xl" | null | undefined;
|
|
3
6
|
align?: "center" | "left" | "right" | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-modal-variants.d.ts","sourceRoot":"","sources":["../../../src/components/patterns/settings-modal-variants.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,qBAAqB;;;;;8EAiC1B,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"settings-modal-variants.d.ts","sourceRoot":"","sources":["../../../src/components/patterns/settings-modal-variants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,QAAA,MAAM,qBAAqB;;;;;8EAiC1B,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ButtonProps } from '../ui/button.js';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* still render through it; new modal flows should use Shade Dialog primitives.
|
|
4
|
+
* @deprecated Only for Admin's legacy settings modals. Use `Dialog` from `@tryghost/shade/components` for new modals.
|
|
6
5
|
*/
|
|
7
6
|
export type SettingsModalSize = 'sm' | 'md' | 'lg' | 'xl' | 'full' | 'bleed';
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Only for Admin's legacy settings modals. Use `Dialog` from `@tryghost/shade/components` for new modals.
|
|
9
|
+
*/
|
|
8
10
|
export interface SettingsModalProps {
|
|
9
11
|
'aria-label'?: string;
|
|
10
12
|
className?: string;
|
|
@@ -45,6 +47,13 @@ export interface SettingsModalProps {
|
|
|
45
47
|
enableCMDS?: boolean;
|
|
46
48
|
allowBackgroundInteraction?: boolean;
|
|
47
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Consumer-controlled settings modal shell. Admin's legacy full-page settings
|
|
52
|
+
* dialogs still render through it. It is not a real dialog: it doesn't trap
|
|
53
|
+
* focus or announce itself to screen readers.
|
|
54
|
+
*
|
|
55
|
+
* @deprecated Only for Admin's legacy settings modals. Use `Dialog` from `@tryghost/shade/components` for new modals.
|
|
56
|
+
*/
|
|
48
57
|
declare const SettingsModal: React.ForwardRefExoticComponent<SettingsModalProps & React.RefAttributes<HTMLElement>>;
|
|
49
58
|
export { SettingsModal };
|
|
50
59
|
//# sourceMappingURL=settings-modal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-modal.d.ts","sourceRoot":"","sources":["../../../src/components/patterns/settings-modal.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAG/D,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAWlE
|
|
1
|
+
{"version":3,"file":"settings-modal.d.ts","sourceRoot":"","sources":["../../../src/components/patterns/settings-modal.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAG/D,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAWlE;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC;AAE7E;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,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