{"version":3,"file":"NcDialog-mcbLFc8o.cjs","sources":["../../src/components/NcDialog/NcDialog.vue"],"sourcesContent":["\n\n\n### General description\n\nThis component uses the `NcModal` under the hood for allowing users to create generic dialogs.\n\n### Basic example\n```vue\n\n\t
\n\t\tShow dialog\n\t\t\n\t\t
Last response: {{ lastResponse }}
\n\t
\n\n\n```\n\n### Use custom actions and content\nInstead of using the buttons property, you can also inject your custom actions using a named slot.\nYou can also use the default slot to inject custom content.\n\n```vue\n\n\t
\n\t\tShow dialog\n\t\tShow long dialog\n\t\t\n\t\t\t\n\t\t\t\tOk\n\t\t\t\n\t\t\t
This is serious
\n\t\t\n\t\t\n\t\t\t
Lorem ipsum dolor sit amet.
\n\t\t\n\t
\n\n\n```\n\n### Form example\nIt is also possible to use the dialog for small forms.\nThis can be used when asking for a password, a name or similar to have native form validation.\n\nTo make the dialog a form the `is-form` prop needs to be set.\nWhen using the form variant you can also pass buttons with `nativeType` prop to add a native `submit` button.\n\nNote that this is not possible if the dialog contains a navigation!\n\n```vue\n\n\t
\n\t\tShow dialog\n\t\t\n\t\t\t\n\t\t\n\t\t
New name: {{ currentName }}
\n\t
\n\n\n```\n\n### Loading buttons\nSometimes a dialog ends with a request and this request might fail due to server-side-validation.\nIn this case it is often desired to keep the dialog open, this can be done by returning `false` from the button callback,\nto not block this callback should return a `Promise`.\n\nIt is also possible to get the result of the callback from the dialog, as the result is passed as the payload of the `closing` event.\n\nWhile the promise is awaited the button will have a loading state,\nthis means, as long as no custom `icon`-slot is used, a loading icon will be shown.\nPlease note that the **button will not be disabled or accessibility reasons**,\nbecause disabled elements cannot be focused and so the loading state could not be communicated e.g. via screen readers.\n\n```vue\n\n\t