diff --git a/packages/vlossom/package.json b/packages/vlossom/package.json index 7f00818cb..1db479e2a 100644 --- a/packages/vlossom/package.json +++ b/packages/vlossom/package.json @@ -44,9 +44,9 @@ "typings": "./dist/index.d.ts", "exports": { ".": { + "types": "./dist/index.d.ts", "import": "./dist/vlossom.es.js", - "require": "./dist/vlossom.umd.js", - "types": "./dist/index.d.ts" + "require": "./dist/vlossom.umd.js" }, "./styles": "./dist/style.css" }, diff --git a/packages/vlossom/src/components/index.ts b/packages/vlossom/src/components/index.ts index ec8e5cd99..a2c90f4a2 100644 --- a/packages/vlossom/src/components/index.ts +++ b/packages/vlossom/src/components/index.ts @@ -59,7 +59,6 @@ export { default as VsLoading } from './vs-loading/VsLoading.vue'; export { default as VsMessage } from './vs-message/VsMessage.vue'; -export { type VsModalStyleSet } from './vs-modal/types'; export { default as VsModal } from './vs-modal/VsModal.vue'; export { type VsNoticeStyleSet } from './vs-notice/types'; diff --git a/packages/vlossom/src/components/vs-confirm/VsConfirm.scss b/packages/vlossom/src/components/vs-confirm/VsConfirm.scss deleted file mode 100644 index 265dc1539..000000000 --- a/packages/vlossom/src/components/vs-confirm/VsConfirm.scss +++ /dev/null @@ -1,27 +0,0 @@ -.vs-confirm-text { - position: relative; - display: flex; - align-items: center; - justify-content: center; - width: 100%; - height: 100%; - flex: 1; - color: var(--vs-font-color); - text-align: center; -} - -.vs-confirm-footer { - align-items: center; - display: flex; - justify-content: center; - padding-bottom: 1rem; - width: 100%; - - .vs-ok-button { - min-width: 9rem; - } - - .vs-cancel-button { - min-width: 9rem; - } -} diff --git a/packages/vlossom/src/components/vs-confirm/VsConfirm.vue b/packages/vlossom/src/components/vs-confirm/VsConfirm.vue deleted file mode 100644 index f604ceaf9..000000000 --- a/packages/vlossom/src/components/vs-confirm/VsConfirm.vue +++ /dev/null @@ -1,89 +0,0 @@ - - - - - diff --git a/packages/vlossom/src/nodes/vs-confirm/types.ts b/packages/vlossom/src/nodes/vs-confirm/types.ts new file mode 100644 index 000000000..1a21b2338 --- /dev/null +++ b/packages/vlossom/src/nodes/vs-confirm/types.ts @@ -0,0 +1,27 @@ +import type { ModalOptions } from '@/declaration'; + +export interface VsCofirmationStyleSet { + backgroundColor?: string; + borderRadius?: string; + boxShadow?: string; + fontColor?: string; + fontSize?: string; + fontWeight?: string | number; + height?: string; + width?: string; + padding?: string; + zIndex?: string | number; + // TODO: add button style object (224926) +} + +export interface ConfirmOptions extends Omit, 'component'> { + okText?: string; + cancelText?: string; +} + +export interface PromptOptions extends ConfirmOptions { + inputType?: string; + inputLabel?: string; + inputMaxLength?: number; + inputPlaceholder?: string; +} diff --git a/packages/vlossom/src/nodes/vs-content-renderer/VsContentRenderer.vue b/packages/vlossom/src/nodes/vs-content-renderer/VsContentRenderer.vue new file mode 100644 index 000000000..bbb0b922e --- /dev/null +++ b/packages/vlossom/src/nodes/vs-content-renderer/VsContentRenderer.vue @@ -0,0 +1,17 @@ + + + diff --git a/packages/vlossom/src/components/vs-modal/VsModal.scss b/packages/vlossom/src/nodes/vs-modal-node/VsModalNode.scss similarity index 82% rename from packages/vlossom/src/components/vs-modal/VsModal.scss rename to packages/vlossom/src/nodes/vs-modal-node/VsModalNode.scss index c4e42fd1b..96227e1ae 100644 --- a/packages/vlossom/src/components/vs-modal/VsModal.scss +++ b/packages/vlossom/src/nodes/vs-modal-node/VsModalNode.scss @@ -1,7 +1,7 @@ @use '@/styles/variables' as *; @use '@/styles/mixin' as *; -.vs-modal { +.vs-modal-node { position: fixed; top: 0; left: 0; @@ -56,9 +56,11 @@ .vs-modal-contents { position: relative; display: flex; + flex-direction: column; + overflow: auto; width: 100%; height: 100%; - padding: var(--vs-modal-padding, 2rem); + padding: var(--vs-modal-padding, 1.8rem 2.4rem); color: var(--vs-modal-fontColor, var(--vs-font-color)); font-size: var(--vs-modal-fontSize, var(--vs-font-size)); font-weight: var(--vs-modal-fontWeight, 400); @@ -76,7 +78,6 @@ .vs-modal-body { position: relative; flex: auto; - overflow: auto; &.hide-scroll { @include hide-scroll; @@ -105,25 +106,25 @@ } @container (min-width: 640px) { - .vs-modal .vs-modal-wrap .vs-modal-contents { - padding: var(--vs-modal-padding, 2.8rem); + .vs-modal-node .vs-modal-wrap .vs-modal-contents { + padding: var(--vs-modal-padding, 2.2rem 2.8rem); } } @container (min-width: 768px) { - .vs-modal .vs-modal-wrap .vs-modal-contents { - padding: var(--vs-modal-padding, 3.6rem); + .vs-modal-node .vs-modal-wrap .vs-modal-contents { + padding: var(--vs-modal-padding, 2.6rem 3.2rem); } } @container (min-width: 1024px) { - .vs-modal .vs-modal-wrap .vs-modal-contents { - padding: var(--vs-modal-padding, 4.8rem); + .vs-modal-node .vs-modal-wrap .vs-modal-contents { + padding: var(--vs-modal-padding, 3rem 3.6rem); } } @container (min-width: 1280px) { - .vs-modal .vs-modal-wrap .vs-modal-contents { - padding: var(--vs-modal-padding, 6rem); + .vs-modal-node .vs-modal-wrap .vs-modal-contents { + padding: var(--vs-modal-padding, 3.6rem 4.8rem); } } diff --git a/packages/vlossom/src/nodes/vs-modal-node/VsModalNode.vue b/packages/vlossom/src/nodes/vs-modal-node/VsModalNode.vue new file mode 100644 index 000000000..207b7657e --- /dev/null +++ b/packages/vlossom/src/nodes/vs-modal-node/VsModalNode.vue @@ -0,0 +1,148 @@ + + + + +