UNPKG

@lobehub/ui

Version:

Lobe UI is an open-source UI component library for building AIGC web apps

311 lines (257 loc) 6.56 kB
import { createStaticStyles } from "antd-style"; //#region src/base-ui/Modal/style.ts const styles = createStaticStyles(({ css: css$1, cssVar: cssVar$1 }) => ({ backdrop: css$1` position: fixed; z-index: 1000; inset: 0; background: color-mix(in srgb, ${cssVar$1.colorBgContainer} 60%, transparent); transition: opacity 150ms ease-out; &[data-starting-style], &[data-ending-style] { opacity: 0; } `, close: css$1` cursor: pointer; position: absolute; inset-block-start: 12px; inset-inline-end: 12px; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: none; border-radius: ${cssVar$1.borderRadiusSM}; color: ${cssVar$1.colorTextTertiary}; background: transparent; transition: all 150ms ease-out; &:hover { color: ${cssVar$1.colorText}; background: ${cssVar$1.colorFillSecondary}; } &:focus-visible { outline: 2px solid ${cssVar$1.colorPrimaryBorder}; outline-offset: 1px; } `, closeInline: css$1` cursor: pointer; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: none; border-radius: ${cssVar$1.borderRadiusSM}; color: ${cssVar$1.colorTextTertiary}; background: transparent; transition: all 150ms ease-out; &:hover { color: ${cssVar$1.colorText}; background: ${cssVar$1.colorFillSecondary}; } &:focus-visible { outline: 2px solid ${cssVar$1.colorPrimaryBorder}; outline-offset: 1px; } `, content: css$1` overflow: hidden auto; padding-block: 12px; padding-inline: 16px; `, footer: css$1` display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding-block: 12px; padding-inline: 16px; border-block-start: 1px solid ${cssVar$1.colorBorderSecondary}; `, header: css$1` display: flex; align-items: center; justify-content: space-between; padding-block: 12px; padding-inline: 16px; border-block-end: 1px solid ${cssVar$1.colorBorderSecondary}; `, headerDraggable: css$1` cursor: default; user-select: none; `, popup: css$1` pointer-events: none; position: fixed; z-index: 1001; inset: 0; display: flex; align-items: center; justify-content: center; `, popupInner: css$1` pointer-events: auto; position: relative; display: flex; flex-direction: column; box-sizing: border-box; width: calc(100% - 32px); max-width: 520px; max-height: calc(100dvh - 64px); border: 1px solid ${cssVar$1.colorBorderSecondary}; border-radius: 12px; background: ${cssVar$1.colorBgContainer}; box-shadow: ${cssVar$1.boxShadow}; transition: transform 150ms cubic-bezier(0.22, 1, 0.36, 1), opacity 150ms ease-out; &[data-starting-style], &[data-ending-style] { transform: scale(0.96) translateY(4px); opacity: 0; } `, title: css$1` margin: 0; font-size: 16px; font-weight: 600; line-height: 1.5; color: ${cssVar$1.colorText}; `, buttonBase: css$1` cursor: pointer; display: inline-flex; gap: 6px; align-items: center; justify-content: center; height: 36px; padding-block: 0; padding-inline: 16px; border: 1px solid ${cssVar$1.colorBorder}; border-radius: ${cssVar$1.borderRadiusSM}; font-size: 14px; font-weight: 500; line-height: 1; transition: all 150ms ease-out; &:focus-visible { outline: 2px solid ${cssVar$1.colorPrimaryBorder}; outline-offset: 1px; } &:disabled { cursor: not-allowed; opacity: 0.5; } `, cancelButton: css$1` color: ${cssVar$1.colorText}; background: ${cssVar$1.colorBgContainer}; &:hover:not(:disabled) { border-color: ${cssVar$1.colorPrimaryBorder}; color: ${cssVar$1.colorPrimaryText}; } `, loadingSpinner: css$1` @keyframes modal-spin { to { transform: rotate(360deg); } } display: inline-block; width: 14px; height: 14px; border: 2px solid currentcolor; border-block-start-color: transparent; border-radius: 50%; animation: modal-spin 0.6s linear infinite; `, dangerOkButton: css$1` border-color: ${cssVar$1.colorError}; color: #fff; background: ${cssVar$1.colorError}; &:hover:not(:disabled) { border-color: ${cssVar$1.colorErrorHover}; background: ${cssVar$1.colorErrorHover}; } &:active:not(:disabled) { border-color: ${cssVar$1.colorErrorActive}; background: ${cssVar$1.colorErrorActive}; } `, fullscreenPopupInner: css$1` width: 100% !important; max-width: 100% !important; height: 100dvh !important; max-height: 100dvh !important; border: none; border-radius: 0; `, fullscreenToggle: css$1` cursor: pointer; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: none; border-radius: ${cssVar$1.borderRadiusSM}; color: ${cssVar$1.colorTextTertiary}; background: transparent; transition: all 150ms ease-out; &:hover { color: ${cssVar$1.colorText}; background: ${cssVar$1.colorFillSecondary}; } &:focus-visible { outline: 2px solid ${cssVar$1.colorPrimaryBorder}; outline-offset: 1px; } `, headerActions: css$1` display: flex; gap: 4px; align-items: center; margin-inline-end: -4px; `, okButton: css$1` border-color: ${cssVar$1.colorPrimary}; color: #fff; background: ${cssVar$1.colorPrimary}; &:hover:not(:disabled) { border-color: ${cssVar$1.colorPrimaryHover}; background: ${cssVar$1.colorPrimaryHover}; } &:active:not(:disabled) { border-color: ${cssVar$1.colorPrimaryActive}; background: ${cssVar$1.colorPrimaryActive}; } `, denyAnimation: css$1` @keyframes modal-deny { 0% { outline-color: ${cssVar$1.colorPrimary}; outline-offset: 0; } 100% { outline-color: transparent; outline-offset: 4px; } } outline: 2px solid transparent; animation: modal-deny 400ms ease-out; `, viewport: css$1` position: fixed; z-index: 1000; inset: 0; overflow: auto; ` })); //#endregion export { styles }; //# sourceMappingURL=style.mjs.map