@naptics/vue-collection 0.3.2 → 1.0.0-beta.1

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.
Files changed (129) hide show
  1. package/eslint.config.cjs +0 -2
  2. package/package.json +31 -30
  3. package/postcss.config.js +1 -4
  4. package/src/demo/App.css +47 -3
  5. package/src/demo/components/ComponentSection.tsx +1 -1
  6. package/src/demo/views/NavigationView.tsx +1 -1
  7. package/src/demo/views/presentation/TooltipView.tsx +1 -1
  8. package/src/lib/components/NAlert.tsx +3 -3
  9. package/src/lib/components/NBadge.tsx +1 -1
  10. package/src/lib/components/NButton.tsx +6 -4
  11. package/src/lib/components/NCheckbox.tsx +2 -2
  12. package/src/lib/components/NDialog.tsx +2 -2
  13. package/src/lib/components/NDropdown.tsx +11 -9
  14. package/src/lib/components/NDropzone.tsx +4 -4
  15. package/src/lib/components/NIconButton.tsx +2 -2
  16. package/src/lib/components/NInput.tsx +1 -1
  17. package/src/lib/components/NLink.tsx +1 -1
  18. package/src/lib/components/NModal.tsx +4 -4
  19. package/src/lib/components/NPagination.css +4 -2
  20. package/src/lib/components/NPagination.tsx +1 -1
  21. package/src/lib/components/NSearchbar.tsx +1 -1
  22. package/src/lib/components/NSelect.tsx +1 -1
  23. package/src/lib/components/NSuggestionList.tsx +1 -1
  24. package/src/lib/components/NTable.css +2 -0
  25. package/src/lib/components/NTableAction.tsx +1 -1
  26. package/src/lib/components/NTextArea.tsx +1 -1
  27. package/src/lib/components/NTooltip.css +2 -0
  28. package/src/lib/components/NTooltip.tsx +1 -1
  29. package/src/lib/utils/component.tsx +1 -1
  30. package/tsconfig.lib.json +1 -0
  31. package/vite.config.ts +2 -0
  32. package/components/NAlert.d.ts +0 -29
  33. package/components/NAlert.js +0 -84
  34. package/components/NBadge.d.ts +0 -73
  35. package/components/NBadge.js +0 -64
  36. package/components/NBreadcrub.d.ts +0 -69
  37. package/components/NBreadcrub.js +0 -71
  38. package/components/NButton.d.ts +0 -64
  39. package/components/NButton.js +0 -72
  40. package/components/NCheckbox.d.ts +0 -20
  41. package/components/NCheckbox.js +0 -43
  42. package/components/NCheckboxLabel.d.ts +0 -26
  43. package/components/NCheckboxLabel.js +0 -42
  44. package/components/NCrudModal.d.ts +0 -118
  45. package/components/NCrudModal.js +0 -120
  46. package/components/NDialog.d.ts +0 -81
  47. package/components/NDialog.js +0 -161
  48. package/components/NDropdown.d.ts +0 -67
  49. package/components/NDropdown.js +0 -115
  50. package/components/NDropzone.d.ts +0 -61
  51. package/components/NDropzone.js +0 -218
  52. package/components/NForm.d.ts +0 -21
  53. package/components/NForm.js +0 -29
  54. package/components/NFormModal.d.ts +0 -75
  55. package/components/NFormModal.js +0 -59
  56. package/components/NIconButton.d.ts +0 -83
  57. package/components/NIconButton.js +0 -88
  58. package/components/NIconCircle.d.ts +0 -49
  59. package/components/NIconCircle.js +0 -67
  60. package/components/NInput.css +0 -11
  61. package/components/NInput.d.ts +0 -94
  62. package/components/NInput.js +0 -110
  63. package/components/NInputPhone.d.ts +0 -58
  64. package/components/NInputPhone.js +0 -47
  65. package/components/NInputSelect.d.ts +0 -103
  66. package/components/NInputSelect.js +0 -115
  67. package/components/NInputSuggestion.d.ts +0 -79
  68. package/components/NInputSuggestion.js +0 -64
  69. package/components/NLink.d.ts +0 -47
  70. package/components/NLink.js +0 -67
  71. package/components/NList.d.ts +0 -37
  72. package/components/NList.js +0 -40
  73. package/components/NLoadingIndicator.css +0 -46
  74. package/components/NLoadingIndicator.d.ts +0 -29
  75. package/components/NLoadingIndicator.js +0 -54
  76. package/components/NModal.d.ts +0 -133
  77. package/components/NModal.js +0 -232
  78. package/components/NPagination.css +0 -15
  79. package/components/NPagination.d.ts +0 -37
  80. package/components/NPagination.js +0 -105
  81. package/components/NSearchbar.d.ts +0 -39
  82. package/components/NSearchbar.js +0 -64
  83. package/components/NSearchbarList.d.ts +0 -33
  84. package/components/NSearchbarList.js +0 -41
  85. package/components/NSelect.d.ts +0 -82
  86. package/components/NSelect.js +0 -101
  87. package/components/NSuggestionList.d.ts +0 -153
  88. package/components/NSuggestionList.js +0 -160
  89. package/components/NTable.css +0 -3
  90. package/components/NTable.d.ts +0 -97
  91. package/components/NTable.js +0 -128
  92. package/components/NTableAction.d.ts +0 -30
  93. package/components/NTableAction.js +0 -50
  94. package/components/NTextArea.d.ts +0 -96
  95. package/components/NTextArea.js +0 -133
  96. package/components/NTooltip.css +0 -37
  97. package/components/NTooltip.d.ts +0 -152
  98. package/components/NTooltip.js +0 -241
  99. package/components/NValInput.d.ts +0 -159
  100. package/components/NValInput.js +0 -113
  101. package/components/ValidatedForm.d.ts +0 -39
  102. package/components/ValidatedForm.js +0 -35
  103. package/i18n/de/vue-collection.json +0 -58
  104. package/i18n/en/vue-collection.json +0 -58
  105. package/i18n/index.d.ts +0 -40
  106. package/i18n/index.js +0 -31
  107. package/index.d.ts +0 -2
  108. package/index.js +0 -2
  109. package/tailwind.config.js +0 -38
  110. package/utils/breakpoints.d.ts +0 -18
  111. package/utils/breakpoints.js +0 -40
  112. package/utils/component.d.ts +0 -57
  113. package/utils/component.js +0 -79
  114. package/utils/deferred.d.ts +0 -13
  115. package/utils/deferred.js +0 -17
  116. package/utils/identifiable.d.ts +0 -56
  117. package/utils/identifiable.js +0 -81
  118. package/utils/stringMaxLength.d.ts +0 -14
  119. package/utils/stringMaxLength.js +0 -23
  120. package/utils/tailwind.d.ts +0 -4
  121. package/utils/tailwind.js +0 -1
  122. package/utils/utils.d.ts +0 -47
  123. package/utils/utils.js +0 -56
  124. package/utils/vModel.d.ts +0 -182
  125. package/utils/vModel.js +0 -224
  126. package/utils/validation.d.ts +0 -90
  127. package/utils/validation.js +0 -147
  128. package/utils/vue.d.ts +0 -13
  129. package/utils/vue.js +0 -21
@@ -1,64 +0,0 @@
1
- import { mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
2
- import { createComponent } from '../utils/component';
3
- import { Id } from '../utils/identifiable';
4
- import { computed, ref } from 'vue';
5
- import NSuggestionList, { nSuggestionListProps } from './NSuggestionList';
6
- import NValInput, { nValInputProps } from './NValInput';
7
- export const nInputSuggestionProps = {
8
- ...nValInputProps,
9
- /**
10
- * If set to `true` the list is hidden even if there are still matching items in the list.
11
- */
12
- hideList: nSuggestionListProps.hideList,
13
- /**
14
- * @see {@link nSuggestionListProps.maxItems}
15
- */
16
- maxItems: nSuggestionListProps.maxItems,
17
- /**
18
- * The suggestions which are shown to the user for this input.
19
- * The suggestions are filtered based on the user input.
20
- */
21
- suggestions: {
22
- type: Array,
23
- default: () => []
24
- }
25
- };
26
- /**
27
- * `NInputSuggestion` is an input, which shows a list of possible suggestions to the user
28
- * which is filtered while typing. Contrary to {@link NInputSelect} the user is not required to choose any of the suggestions.
29
- */
30
- const Component = createComponent('NInputSuggestion', nInputSuggestionProps, props => {
31
- const suggestionItems = computed(() => props.suggestions.filter(suggestion => suggestion.includes(props.value || '')).map((value, index) => ({
32
- id: index.toString(),
33
- label: value
34
- })));
35
- const select = id => props.onUpdateValue?.(Id.find(suggestionItems.value, id)?.label || '');
36
- const hideList = computed(() => props.hideList || suggestionItems.value.length == 0 || suggestionItems.value.filter(suggestion => suggestion.label !== props.value).length == 0);
37
- const inputRef = ref();
38
- return () => _createVNode(NSuggestionList, {
39
- "items": suggestionItems.value,
40
- "onSelect": id => select(id),
41
- "inputValue": props.value || '',
42
- "hideList": hideList.value,
43
- "maxItems": props.maxItems,
44
- "input": ({
45
- onFocus,
46
- onBlur
47
- }) => _createVNode(NValInput, _mergeProps({
48
- "ref": inputRef
49
- }, props, {
50
- "onFocus": () => {
51
- onFocus();
52
- props.onFocus?.();
53
- },
54
- "onBlur": onBlur,
55
- "disableBlurValidation": true
56
- }), null),
57
- "onRequestInputFocus": () => inputRef.value?.focus(),
58
- "onRealBlur": () => {
59
- props.onBlur?.();
60
- inputRef?.value?.validate();
61
- }
62
- }, null);
63
- });
64
- export { Component as NInputSuggestion, Component as default };
@@ -1,47 +0,0 @@
1
- import type { TWTextSize } from '../utils/tailwind';
2
- import { type PropType } from 'vue';
3
- import { type RouteLocationRaw } from 'vue-router';
4
- export declare const nLinkProps: {
5
- /**
6
- * The text of the link. Can also be set in the default slot.
7
- */
8
- readonly text: StringConstructor;
9
- /**
10
- * The route of the link. If this is set,
11
- * the link becomes a {@link RouterLink} and does not emit the `onClick` event.
12
- */
13
- readonly route: PropType<RouteLocationRaw>;
14
- /**
15
- * The color of the link.
16
- */
17
- readonly color: {
18
- readonly type: StringConstructor;
19
- readonly default: "primary";
20
- };
21
- /**
22
- * The text size, a standard tailwind text-size class.
23
- */
24
- readonly textSize: PropType<TWTextSize>;
25
- /**
26
- * The shade of the link.
27
- */
28
- readonly shade: {
29
- readonly type: NumberConstructor;
30
- readonly default: 500;
31
- };
32
- /**
33
- * If set to `true` the link is disabled and no interaction is possible.
34
- * Note: If the `route` prop is set, the link will still be clickable, because it becomes a {@link RouterLink}.
35
- */
36
- readonly disabled: BooleanConstructor;
37
- /**
38
- * This is called when the link is clicked but only, if the `route` prop is not set.
39
- * If the `route` prop is not set, the link will act as a regular button.
40
- */
41
- readonly onClick: PropType<() => void>;
42
- };
43
- /**
44
- * The `NLink` is a styled text which can be used as a {@link RouterLink} or a regular button.
45
- */
46
- declare const Component: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
47
- export { Component as NLink, Component as default };
@@ -1,67 +0,0 @@
1
- import { createVNode as _createVNode } from "vue";
2
- import { createComponent } from '../utils/component';
3
- import { computed } from 'vue';
4
- import { RouterLink } from 'vue-router';
5
- export const nLinkProps = {
6
- /**
7
- * The text of the link. Can also be set in the default slot.
8
- */
9
- text: String,
10
- /**
11
- * The route of the link. If this is set,
12
- * the link becomes a {@link RouterLink} and does not emit the `onClick` event.
13
- */
14
- route: [Object, String],
15
- /**
16
- * The color of the link.
17
- */
18
- color: {
19
- type: String,
20
- default: 'primary'
21
- },
22
- /**
23
- * The text size, a standard tailwind text-size class.
24
- */
25
- textSize: String,
26
- /**
27
- * The shade of the link.
28
- */
29
- shade: {
30
- type: Number,
31
- default: 500
32
- },
33
- /**
34
- * If set to `true` the link is disabled and no interaction is possible.
35
- * Note: If the `route` prop is set, the link will still be clickable, because it becomes a {@link RouterLink}.
36
- */
37
- disabled: Boolean,
38
- /**
39
- * This is called when the link is clicked but only, if the `route` prop is not set.
40
- * If the `route` prop is not set, the link will act as a regular button.
41
- */
42
- onClick: Function
43
- };
44
- /**
45
- * The `NLink` is a styled text which can be used as a {@link RouterLink} or a regular button.
46
- */
47
- const Component = createComponent('NLink', nLinkProps, (props, {
48
- slots
49
- }) => {
50
- const hoverShade = computed(() => {
51
- const shade = props.shade;
52
- if (shade <= 500) return shade + 100;else return shade - 200;
53
- });
54
- const classes = computed(() => ['font-medium focus:outline-none focus-visible:ring-2 rounded-sm ring-offset-2 hover:underline text-left', `${props.textSize} text-${props.color}-${props.shade} hover:text-${props.color}-${hoverShade.value} focus-visible:ring-${props.color}-${props.shade}`]);
55
- const disabledClasses = computed(() => ['font-medium text-left cursor-not-allowed', `${props.textSize} text-${props.color}-200`]);
56
- return () => props.route ? _createVNode(RouterLink, {
57
- "to": props.route,
58
- "class": classes.value
59
- }, {
60
- default: () => [slots.default?.() || props.text]
61
- }) : _createVNode("button", {
62
- "onClick": props.onClick,
63
- "class": props.disabled ? disabledClasses.value : classes.value,
64
- "disabled": props.disabled
65
- }, [slots.default?.() || props.text]);
66
- });
67
- export { Component as NLink, Component as default };
@@ -1,37 +0,0 @@
1
- import type { PropType } from 'vue';
2
- export type ListItem = {
3
- /**
4
- * The title of the item. Accepts either string or a function returning a JSX element.
5
- */
6
- title: string | (() => JSX.Element);
7
- /**
8
- * The text of the item. Accepts either string or a function returning a JSX element.
9
- */
10
- text?: string | (() => JSX.Element);
11
- };
12
- export declare const nListProps: {
13
- /**
14
- * The items which are displayed in the list.
15
- */
16
- readonly items: {
17
- readonly type: PropType<ListItem[]>;
18
- readonly default: () => never[];
19
- };
20
- /**
21
- * Adds the classes to all title elements (on the left side).
22
- */
23
- readonly titleClass: StringConstructor;
24
- /**
25
- * Adds the classes to all text elements (on the right side).
26
- */
27
- readonly textClass: StringConstructor;
28
- /**
29
- * Adds the classes to each row.
30
- */
31
- readonly rowClass: StringConstructor;
32
- };
33
- /**
34
- * The `NList` displays key-value data in an appealing way.
35
- */
36
- declare const Component: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
37
- export { Component as NList, Component as default };
@@ -1,40 +0,0 @@
1
- import { createVNode as _createVNode, Fragment as _Fragment } from "vue";
2
- import { createComponent } from '../utils/component';
3
- export const nListProps = {
4
- /**
5
- * The items which are displayed in the list.
6
- */
7
- items: {
8
- type: Array,
9
- default: () => []
10
- },
11
- /**
12
- * Adds the classes to all title elements (on the left side).
13
- */
14
- titleClass: String,
15
- /**
16
- * Adds the classes to all text elements (on the right side).
17
- */
18
- textClass: String,
19
- /**
20
- * Adds the classes to each row.
21
- */
22
- rowClass: String
23
- };
24
- /**
25
- * The `NList` displays key-value data in an appealing way.
26
- */
27
- const Component = createComponent('NList', nListProps, props => {
28
- return () => _createVNode("dl", null, [props.items.map((item, index) => _createVNode("div", {
29
- "key": index,
30
- "class": ['py-5 px-4 sm:grid sm:grid-cols-3 sm:gap-4', index % 2 === 1 ? 'bg-white' : 'bg-default-50', props.rowClass]
31
- }, [_createVNode("dt", {
32
- "class": `text-sm font-medium text-default-500 ${props.titleClass}`
33
- }, [buildElement(item.title)]), _createVNode("dd", {
34
- "class": `mt-1 text-sm sm:mt-0 sm:col-span-2 ${props.textClass}`
35
- }, [buildElement(item.text)])]))]);
36
- });
37
- export { Component as NList, Component as default };
38
- function buildElement(element) {
39
- if (typeof element === 'function') return element();else return _createVNode(_Fragment, null, [element]);
40
- }
@@ -1,46 +0,0 @@
1
- .lds-ellipsis {
2
- position: relative;
3
- }
4
-
5
- .lds-ellipsis div {
6
- position: absolute;
7
- border-radius: 50%;
8
- animation-timing-function: cubic-bezier(0, 1, 1, 0);
9
- }
10
-
11
- .lds-ellipsis div:nth-child(1) {
12
- animation: lds-ellipsis1 0.6s infinite;
13
- }
14
- .lds-ellipsis div:nth-child(2) {
15
- animation: lds-ellipsis2 0.6s infinite;
16
- }
17
- .lds-ellipsis div:nth-child(3) {
18
- animation: lds-ellipsis2 0.6s infinite;
19
- }
20
- .lds-ellipsis div:nth-child(4) {
21
- animation: lds-ellipsis3 0.6s infinite;
22
- }
23
- @keyframes lds-ellipsis1 {
24
- 0% {
25
- transform: scale(0);
26
- }
27
- 100% {
28
- transform: scale(1);
29
- }
30
- }
31
- @keyframes lds-ellipsis3 {
32
- 0% {
33
- transform: scale(1);
34
- }
35
- 100% {
36
- transform: scale(0);
37
- }
38
- }
39
- @keyframes lds-ellipsis2 {
40
- 0% {
41
- transform: translate(0, 0);
42
- }
43
- 100% {
44
- transform: translate(var(--n-loading-indicator-gap), 0);
45
- }
46
- }
@@ -1,29 +0,0 @@
1
- import './NLoadingIndicator.css';
2
- export declare const nLoadingIndicator: {
3
- /**
4
- * The color of the loading-indicator.
5
- */
6
- readonly color: {
7
- readonly type: StringConstructor;
8
- readonly default: "primary";
9
- };
10
- /**
11
- * The shade of the loading-indicator.
12
- */
13
- readonly shade: {
14
- readonly type: NumberConstructor;
15
- readonly default: 400;
16
- };
17
- /**
18
- * The height of the loading-indicator in px.
19
- */
20
- readonly size: {
21
- readonly type: NumberConstructor;
22
- readonly default: 10;
23
- };
24
- };
25
- /**
26
- * The `NLoadingIndicator` is a styled loading indicator.
27
- */
28
- declare const Component: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
29
- export { Component as NLoadingIndicator, Component as default };
@@ -1,54 +0,0 @@
1
- import { createVNode as _createVNode } from "vue";
2
- import { createComponent } from '../utils/component';
3
- import { computed, useCssVars } from 'vue';
4
- import './NLoadingIndicator.css';
5
- export const nLoadingIndicator = {
6
- /**
7
- * The color of the loading-indicator.
8
- */
9
- color: {
10
- type: String,
11
- default: 'primary'
12
- },
13
- /**
14
- * The shade of the loading-indicator.
15
- */
16
- shade: {
17
- type: Number,
18
- default: 400
19
- },
20
- /**
21
- * The height of the loading-indicator in px.
22
- */
23
- size: {
24
- type: Number,
25
- default: 10
26
- }
27
- };
28
- /**
29
- * The `NLoadingIndicator` is a styled loading indicator.
30
- */
31
- const Component = createComponent('NLoadingIndicator', nLoadingIndicator, props => {
32
- const gap = computed(() => props.size / 13 * 24);
33
- const totalWidth = computed(() => gap.value * 2 + props.size);
34
- useCssVars(() => ({
35
- 'n-loading-indicator-gap': `${gap.value}px`
36
- }));
37
- return () => _createVNode("div", {
38
- "class": "lds-ellipsis",
39
- "style": `height:${props.size}px;width:${totalWidth.value}px`
40
- }, [_createVNode("div", {
41
- "class": `bg-${props.color}-${props.shade}`,
42
- "style": `height:${props.size}px;width:${props.size}px;left:0px`
43
- }, null), _createVNode("div", {
44
- "class": `bg-${props.color}-${props.shade}`,
45
- "style": `height:${props.size}px;width:${props.size}px;left:0px`
46
- }, null), _createVNode("div", {
47
- "class": `bg-${props.color}-${props.shade}`,
48
- "style": `height:${props.size}px;width:${props.size}px;left:${gap.value}px`
49
- }, null), _createVNode("div", {
50
- "class": `bg-${props.color}-${props.shade}`,
51
- "style": `height:${props.size}px;width:${props.size}px;left:${2 * gap.value}px`
52
- }, null)]);
53
- });
54
- export { Component as NLoadingIndicator, Component as default };
@@ -1,133 +0,0 @@
1
- import type { PropType } from 'vue';
2
- import type { TWMaxWidth } from '../utils/tailwind';
3
- export declare const nModalProps: {
4
- /**
5
- * If set to `true` the header of the modal is hidden.
6
- */
7
- readonly hideHeader: BooleanConstructor;
8
- /**
9
- * If set to `true` the footer of the modal is hidden.
10
- */
11
- readonly hideFooter: BooleanConstructor;
12
- /**
13
- * If set to `true` the X-button in the top right is hidden.
14
- */
15
- readonly hideX: BooleanConstructor;
16
- /**
17
- * The maximum width of the modal. A regular tailwind class.
18
- */
19
- readonly maxWidth: {
20
- readonly type: PropType<TWMaxWidth>;
21
- readonly default: "max-w-md";
22
- };
23
- /**
24
- * The vertical position of the modal. Default is `center`.
25
- */
26
- readonly verticalPosition: {
27
- readonly type: PropType<"start" | "center" | "end">;
28
- readonly default: "center";
29
- };
30
- /**
31
- * The horizontal position of the modal. Default is `center`.
32
- */
33
- readonly horizontalPosition: {
34
- readonly type: PropType<"start" | "center" | "end">;
35
- readonly default: "center";
36
- };
37
- /**
38
- * The title of the modal which is displayed in the header.
39
- */
40
- readonly title: StringConstructor;
41
- /**
42
- * The text of the ok-button.
43
- */
44
- readonly okText: {
45
- readonly type: StringConstructor;
46
- readonly default: string;
47
- };
48
- /**
49
- * The color of the ok-button.
50
- */
51
- readonly okColor: {
52
- readonly type: StringConstructor;
53
- readonly default: "primary";
54
- };
55
- /**
56
- * If set to `true` the modal is closed when `onOk` is called.
57
- */
58
- readonly closeOnOk: {
59
- readonly type: BooleanConstructor;
60
- readonly default: true;
61
- };
62
- /**
63
- * If set to `true` the ok-button is hidden.
64
- */
65
- readonly hideOk: BooleanConstructor;
66
- /**
67
- * If set to `true` the ok-button is disabled.
68
- */
69
- readonly okDisabled: BooleanConstructor;
70
- /**
71
- * The text of the cancel-button.
72
- */
73
- readonly cancelText: {
74
- readonly type: StringConstructor;
75
- readonly default: string;
76
- };
77
- /**
78
- * The color of the cancel-button.
79
- */
80
- readonly cancelColor: {
81
- readonly type: StringConstructor;
82
- readonly default: "default";
83
- };
84
- /**
85
- * If set to `true`, the modal is closed when clicking on the background.
86
- * This will call `onCancel`. Default is `true`.
87
- */
88
- readonly closeOnBackground: {
89
- readonly type: BooleanConstructor;
90
- readonly default: true;
91
- };
92
- /**
93
- * If set to `true` the cancel-button is hidden.
94
- */
95
- readonly hideCancel: BooleanConstructor;
96
- /**
97
- * This is called when the ok-button was clicked.
98
- */
99
- readonly onOk: PropType<() => void>;
100
- /**
101
- * This is called when the cancel-button or X-button was clicked or
102
- * if the modal was closed by clicking on the background.
103
- */
104
- readonly onCancel: PropType<() => void>;
105
- /**
106
- * A slot to replace the whole modal content including all buttons, header and footer.
107
- */
108
- readonly modal: PropType<(props: ModalSlotProps) => JSX.Element>;
109
- /**
110
- * A slot to replace the whole content section, i.e. everything between the header and the footer.
111
- */
112
- readonly content: PropType<(props: ModalSlotProps) => JSX.Element>;
113
- /**
114
- * A slot to replace the whole header section (excluding the x).
115
- */
116
- readonly header: PropType<() => JSX.Element>;
117
- /**
118
- * A slot to replace the whole footer section.
119
- */
120
- readonly footer: PropType<(props: ModalSlotProps) => JSX.Element>;
121
- readonly value: PropType<boolean>;
122
- readonly onUpdateValue: PropType<(newValue: boolean) => void>;
123
- };
124
- export type ModalSlotProps = {
125
- ok: () => void;
126
- cancel: () => void;
127
- };
128
- /**
129
- * The `NModal` is the base component for all modals and dialogs.
130
- * It provides the core mechanics to display a window in front of everything else.
131
- */
132
- declare const Component: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
133
- export { Component as NModal, Component as default };