{"version":3,"file":"dialog.mjs","sources":["../../../../../../packages/components/dialog/src/dialog.ts"],"sourcesContent":["import { UPDATE_MODEL_EVENT } from '@vuesax-alpha/constants'\nimport { useColorProp } from '@vuesax-alpha/hooks'\nimport { buildProps, definePropType, isBoolean } from '@vuesax-alpha/utils'\nimport type { EmitFn } from '@vuesax-alpha/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Dialog from './dialog.vue'\n\ntype DoneFn = (cancel?: boolean) => void\nexport type DialogBeforeCloseFn = (done: DoneFn) => void\n\nexport const dialogProps = buildProps({\n  /**\n   * @description visibility of Dialog\n   */\n  modelValue: {\n    type: Boolean,\n    default: false,\n  },\n  /**\n   * @description Component color - Accept Vuesax's color, Hex, rgb\n   */\n  color: { ...useColorProp, default: 'primary' },\n\n  overlayBlur: {\n    default: false,\n    type: Boolean,\n  },\n  /**\n   * @description\n   */\n  beforeClose: {\n    type: definePropType<DialogBeforeCloseFn>(Function),\n  },\n  /**\n   * @description Add a loading animation to the dialog.\n   */\n  loading: {\n    default: false,\n    type: Boolean,\n  },\n\n  /**\n   * @description Makes the dialog the size of the window.\n   */\n  fullScreen: {\n    default: false,\n    type: Boolean,\n  },\n\n  /**\n   * @description Remove the close button from the dialog.\n   */\n  notClose: {\n    default: false,\n    type: Boolean,\n  },\n\n  /**\n   * @description It makes the dialog cannot be closed by clicking outside or by pressing the esc key.\n   */\n  preventClose: {\n    default: false,\n    type: Boolean,\n  },\n\n  /**\n   * @description Eliminates the padding of the base elements of the dialog.\n   */\n  notPadding: {\n    default: false,\n    type: Boolean,\n  },\n\n  /**\n   * @description When the dialog is opened, the page scroll is deleted.\n   */\n  lockScroll: {\n    default: false,\n    type: Boolean,\n  },\n\n  /**\n   * @enum `square` | `rounded`\n   * @default 'rounded'\n   */\n  shape: {\n    type: String,\n    values: ['square', 'rounded'] as const,\n    default: 'rounded',\n  },\n\n  /**\n   * @description It makes the dialog have an automatic width to its content.\n   */\n  autoWidth: {\n    default: false,\n    type: Boolean,\n  },\n\n  /**\n   * @description Makes the content a maximum high and gives the possibility to overflow the content add scroll.\n   */\n  scroll: {\n    default: false,\n    type: Boolean,\n  },\n\n  /**\n   * @description By default the header centers the elements, with this property the centering is eliminated.\n   */\n  notCenter: {\n    default: false,\n    type: Boolean,\n  },\n\n  /**\n   * @description Determine the width of the dialog.\n   */\n  width: {\n    default: null,\n    type: String,\n  },\n\n  /**\n   * @deprecated\n   */\n  overflowHidden: Boolean,\n  /**\n   * @deprecated\n   */\n  blur: Boolean,\n} as const)\n\nexport const dialogEmits = {\n  /**\n   * @description triggers when the Dialog opens\n   */\n  open: () => true,\n  /**\n   * @description triggers when the Dialog opening animation ends\n   */\n  opened: () => true,\n  /**\n   * @description triggers when the Dialog closes\n   */\n  close: () => true,\n  /**\n   * @description triggers when the Dialog closing animation ends\n   */\n  closed: () => true,\n  [UPDATE_MODEL_EVENT]: (value: boolean) => isBoolean(value),\n}\n\nexport type DialogEmits = typeof dialogEmits\nexport type DialogEmitFn = EmitFn<DialogEmits>\n\nexport type DialogProps = ExtractPropTypes<typeof dialogProps>\nexport type DialogInstance = InstanceType<typeof Dialog>\n"],"names":[],"mappings":";;;;;;;;AAWO,MAAM,cAAc,UAAW,CAAA;AAAA,EAIpC,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AAAA,EAIA,KAAO,EAAA,EAAE,GAAG,YAAA,EAAc,SAAS,SAAU,EAAA;AAAA,EAE7C,WAAa,EAAA;AAAA,IACX,OAAS,EAAA,KAAA;AAAA,IACT,IAAM,EAAA,OAAA;AAAA,GACR;AAAA,EAIA,WAAa,EAAA;AAAA,IACX,IAAA,EAAM,eAAoC,QAAQ,CAAA;AAAA,GACpD;AAAA,EAIA,OAAS,EAAA;AAAA,IACP,OAAS,EAAA,KAAA;AAAA,IACT,IAAM,EAAA,OAAA;AAAA,GACR;AAAA,EAKA,UAAY,EAAA;AAAA,IACV,OAAS,EAAA,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