@agnos-ui/core 0.4.3 → 0.5.0-next.0
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.
- package/README.md +2 -2
- package/{accordion-BnaSamoQ.js → accordion-BGv150k9.js} +10 -13
- package/{accordion-DmPT0O0j.cjs → accordion-Lp-LEbZ2.cjs} +10 -13
- package/{alert-CEFbEgvG.cjs → alert-Bq101evB.cjs} +1 -1
- package/{alert-DdGuK__c.js → alert-DJ2l7bcA.js} +1 -1
- package/{common-CO5b5G_J.js → common-Banw3FYN.js} +15 -14
- package/{common-nxv_hKNE.cjs → common-DvPjK7SS.cjs} +15 -14
- package/components/accordion/accordion.d.ts +35 -8
- package/components/accordion/index.cjs +1 -1
- package/components/accordion/index.js +1 -1
- package/components/alert/alert.d.ts +16 -1
- package/components/alert/common.d.ts +19 -1
- package/components/alert/index.cjs +1 -1
- package/components/alert/index.js +1 -1
- package/components/commonProps.d.ts +3 -0
- package/components/modal/index.cjs +1 -1
- package/components/modal/index.js +1 -1
- package/components/modal/modal.d.ts +3 -135
- package/components/pagination/index.cjs +1 -1
- package/components/pagination/index.js +1 -1
- package/components/pagination/pagination.d.ts +30 -217
- package/components/progressbar/index.cjs +1 -1
- package/components/progressbar/index.js +1 -1
- package/components/progressbar/progressbar.d.ts +13 -3
- package/components/rating/index.cjs +1 -1
- package/components/rating/index.js +1 -1
- package/components/rating/rating.d.ts +26 -115
- package/components/select/index.cjs +1 -1
- package/components/select/index.js +1 -1
- package/components/select/select.d.ts +21 -148
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.js +1 -1
- package/components/slider/slider.d.ts +31 -126
- package/components/toast/index.cjs +1 -1
- package/components/toast/index.js +1 -1
- package/components/toast/toast.d.ts +16 -1
- package/config.d.ts +17 -1
- package/{directive-3-8yr-ZK.js → directive-CKEccryv.js} +11 -5
- package/{directive-j-xRk-h3.cjs → directive-DdlwGFtf.cjs} +11 -5
- package/index.cjs +13 -13
- package/index.js +15 -15
- package/{modal-D4d8sy85.cjs → modal-DDHcrykD.cjs} +10 -21
- package/{modal-CeTI4jxI.js → modal-DP-4I7vf.js} +11 -22
- package/package.json +6 -5
- package/{pagination-B9WFv70F.cjs → pagination-CBysiPUs.cjs} +23 -35
- package/{pagination-BpPHKQsH.js → pagination-DwDRot6q.js} +23 -35
- package/{progressbar-BybOg5FE.js → progressbar-CGmNq0cS.js} +3 -4
- package/{progressbar-DXCMeJvL.cjs → progressbar-DghzCJ6_.cjs} +3 -4
- package/{rating-D6Tv_4Vx.js → rating-Da38uaZz.js} +61 -54
- package/{rating-C2Y95r50.cjs → rating-DlfOuwuX.cjs} +61 -54
- package/{select-jUrt_lSn.js → select-CAEPqdz1.js} +92 -72
- package/{select-BBiF-m3N.cjs → select-LBVhNdrd.cjs} +92 -72
- package/services/extendWidget.d.ts +37 -4
- package/services/floatingUI.cjs +3 -2
- package/services/floatingUI.d.ts +28 -27
- package/services/floatingUI.js +3 -2
- package/services/focustrack.cjs +1 -1
- package/services/focustrack.d.ts +21 -0
- package/services/focustrack.js +1 -1
- package/services/hash.d.ts +2 -1
- package/services/intersection.cjs +1 -1
- package/services/intersection.d.ts +9 -13
- package/services/intersection.js +1 -1
- package/services/matchMedia.cjs +1 -1
- package/services/matchMedia.d.ts +2 -1
- package/services/matchMedia.js +1 -1
- package/services/navManager.cjs +1 -1
- package/services/navManager.d.ts +85 -41
- package/services/navManager.js +1 -1
- package/services/portal.cjs +1 -1
- package/services/portal.d.ts +3 -0
- package/services/portal.js +1 -1
- package/services/resizeObserver.cjs +2 -2
- package/services/resizeObserver.d.ts +2 -6
- package/services/resizeObserver.js +2 -2
- package/services/siblingsInert.cjs +3 -3
- package/services/siblingsInert.d.ts +3 -5
- package/services/siblingsInert.js +3 -3
- package/services/transitions/baseTransitions.cjs +4 -5
- package/services/transitions/baseTransitions.d.ts +21 -4
- package/services/transitions/baseTransitions.js +4 -5
- package/services/transitions/collapse.cjs +1 -1
- package/services/transitions/collapse.d.ts +6 -0
- package/services/transitions/collapse.js +1 -1
- package/services/transitions/cssTransitions.cjs +1 -1
- package/services/transitions/cssTransitions.d.ts +3 -0
- package/services/transitions/cssTransitions.js +1 -1
- package/services/transitions/simpleClassTransition.cjs +1 -1
- package/services/transitions/simpleClassTransition.d.ts +9 -2
- package/services/transitions/simpleClassTransition.js +1 -1
- package/{slider-ByDkbyr1.js → slider-DYrwS7Mv.js} +118 -116
- package/{slider-BdsZpxJr.cjs → slider-DlOAawbZ.cjs} +118 -116
- package/{toast-BzxextBQ.js → toast-CpvsibAI.js} +3 -3
- package/{toast-Dy3ck2cM.cjs → toast-D_uSrRZL.cjs} +3 -3
- package/types.cjs +0 -8
- package/types.d.ts +151 -19
- package/types.js +1 -9
- package/utils/directive.cjs +1 -1
- package/utils/directive.d.ts +81 -32
- package/utils/directive.js +1 -1
- package/utils/internal/checks.d.ts +6 -0
- package/utils/internal/dom.d.ts +5 -5
- package/utils/internal/promise.d.ts +9 -0
- package/utils/internal/sort.d.ts +2 -2
- package/utils/internal/ssrHTMLElement.d.ts +4 -0
- package/utils/stores.cjs +1 -1
- package/utils/stores.d.ts +80 -42
- package/utils/stores.js +1 -1
- package/utils/writables.cjs +2 -1
- package/utils/writables.d.ts +52 -3
- package/utils/writables.js +2 -1
- package/{writables-D46sFgGK.cjs → writables-BPAJvaL_.cjs} +9 -0
- package/{writables-DoU_XYTX.js → writables-DCiBdIBK.js} +11 -2
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@agnos-ui/core)
|
|
4
4
|
|
|
5
|
-
[AgnosUI](https://
|
|
5
|
+
[AgnosUI](https://www.agnosui.dev/latest/) is a framework-agnostic component library with adapters for multiple frameworks, either [Bootstrap](https://getbootstrap.com/)-based or headless:
|
|
6
6
|
|
|
7
7
|
- [Angular bootstrap](https://www.npmjs.com/package/@agnos-ui/angular-bootstrap), [Angular headless](https://www.npmjs.com/package/@agnos-ui/angular-headless)
|
|
8
8
|
- [React bootstrap](https://www.npmjs.com/package/@agnos-ui/react-bootstrap), [React headless](https://www.npmjs.com/package/@agnos-ui/react-headless)
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
|
|
11
11
|
This `@agnos-ui/core` package contains the framework-agnostic common code used by the above framework adapters.
|
|
12
12
|
|
|
13
|
-
Please check [our demo site](https://
|
|
13
|
+
Please check [our demo site](https://www.agnosui.dev/latest/) to see all the available components and how to use them.
|
|
14
14
|
|
|
15
15
|
Unless you want to develop an adapter for a framework, you probably do not need to use `@agnos-ui/core` directly. Please refer to one of the framework-specific packages.
|
|
@@ -2,8 +2,8 @@ import { writablesForProps, stateStores, mergeConfigStores, normalizeConfigStore
|
|
|
2
2
|
import { createTransition } from "./services/transitions/baseTransitions.js";
|
|
3
3
|
import { writable, computed, asWritable, readable } from "@amadeus-it-group/tansu";
|
|
4
4
|
import { n as noop } from "./func-DR0n-ShK.js";
|
|
5
|
-
import { c as typeBoolean, f as typeFunction, e as typeString } from "./writables-
|
|
6
|
-
import { t as generateId,
|
|
5
|
+
import { c as typeBoolean, f as typeFunction, e as typeString } from "./writables-DCiBdIBK.js";
|
|
6
|
+
import { t as generateId, k as mergeDirectives, n as createAttributesDirective, r as registrationArray, d as directiveSubscribe } from "./directive-CKEccryv.js";
|
|
7
7
|
function adjustItemsCloseOthers(items, openItems, oldOpen) {
|
|
8
8
|
let keepOpen;
|
|
9
9
|
if (openItems.length == 2) {
|
|
@@ -133,11 +133,6 @@ function createAccordionItem(config) {
|
|
|
133
133
|
}
|
|
134
134
|
});
|
|
135
135
|
const shouldBeInDOM$ = computed(() => destroyOnHide$() === false || !transition.stores.hidden$());
|
|
136
|
-
const clickAction = () => {
|
|
137
|
-
if (!disabled$()) {
|
|
138
|
-
visible$.update((c) => !c);
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
136
|
const toggleDirective = createAttributesDirective(() => ({
|
|
142
137
|
attributes: {
|
|
143
138
|
id: computed(() => `${id$()}-toggle`),
|
|
@@ -147,9 +142,15 @@ function createAccordionItem(config) {
|
|
|
147
142
|
disabled: disabled$
|
|
148
143
|
},
|
|
149
144
|
classNames: { collapsed: computed(() => !visible$()) },
|
|
150
|
-
events: {
|
|
145
|
+
events: {
|
|
146
|
+
click: () => {
|
|
147
|
+
if (!disabled$()) {
|
|
148
|
+
visible$.update((c) => !c);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
151
152
|
}));
|
|
152
|
-
const transitionDirective =
|
|
153
|
+
const transitionDirective = transition.directives.directive;
|
|
153
154
|
const bodyContainerAttrsDirective = createAttributesDirective(() => ({
|
|
154
155
|
attributes: {
|
|
155
156
|
id: computed(() => `${id$()}-body-container`),
|
|
@@ -170,9 +171,6 @@ function createAccordionItem(config) {
|
|
|
170
171
|
...stateProps
|
|
171
172
|
}),
|
|
172
173
|
patch,
|
|
173
|
-
actions: {
|
|
174
|
-
click: clickAction
|
|
175
|
-
},
|
|
176
174
|
api: {
|
|
177
175
|
initDone: () => {
|
|
178
176
|
initDone$.set(true);
|
|
@@ -237,7 +235,6 @@ function factoryCreateAccordion(itemFactory = createAccordionItem, accordionItem
|
|
|
237
235
|
return {
|
|
238
236
|
...stateStores({ itemWidgets$, className$ }),
|
|
239
237
|
patch,
|
|
240
|
-
actions: {},
|
|
241
238
|
api: {
|
|
242
239
|
expand: (id) => {
|
|
243
240
|
var _a;
|
|
@@ -3,8 +3,8 @@ const utils_stores = require("./utils/stores.cjs");
|
|
|
3
3
|
const services_transitions_baseTransitions = require("./services/transitions/baseTransitions.cjs");
|
|
4
4
|
const tansu = require("@amadeus-it-group/tansu");
|
|
5
5
|
const func = require("./func-Qd3cD9a3.cjs");
|
|
6
|
-
const utils_writables = require("./writables-
|
|
7
|
-
const utils_directive = require("./directive-
|
|
6
|
+
const utils_writables = require("./writables-BPAJvaL_.cjs");
|
|
7
|
+
const utils_directive = require("./directive-DdlwGFtf.cjs");
|
|
8
8
|
function adjustItemsCloseOthers(items, openItems, oldOpen) {
|
|
9
9
|
let keepOpen;
|
|
10
10
|
if (openItems.length == 2) {
|
|
@@ -134,11 +134,6 @@ function createAccordionItem(config) {
|
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
136
|
const shouldBeInDOM$ = tansu.computed(() => destroyOnHide$() === false || !transition.stores.hidden$());
|
|
137
|
-
const clickAction = () => {
|
|
138
|
-
if (!disabled$()) {
|
|
139
|
-
visible$.update((c) => !c);
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
137
|
const toggleDirective = utils_directive.createAttributesDirective(() => ({
|
|
143
138
|
attributes: {
|
|
144
139
|
id: tansu.computed(() => `${id$()}-toggle`),
|
|
@@ -148,9 +143,15 @@ function createAccordionItem(config) {
|
|
|
148
143
|
disabled: disabled$
|
|
149
144
|
},
|
|
150
145
|
classNames: { collapsed: tansu.computed(() => !visible$()) },
|
|
151
|
-
events: {
|
|
146
|
+
events: {
|
|
147
|
+
click: () => {
|
|
148
|
+
if (!disabled$()) {
|
|
149
|
+
visible$.update((c) => !c);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
152
153
|
}));
|
|
153
|
-
const transitionDirective =
|
|
154
|
+
const transitionDirective = transition.directives.directive;
|
|
154
155
|
const bodyContainerAttrsDirective = utils_directive.createAttributesDirective(() => ({
|
|
155
156
|
attributes: {
|
|
156
157
|
id: tansu.computed(() => `${id$()}-body-container`),
|
|
@@ -171,9 +172,6 @@ function createAccordionItem(config) {
|
|
|
171
172
|
...stateProps
|
|
172
173
|
}),
|
|
173
174
|
patch,
|
|
174
|
-
actions: {
|
|
175
|
-
click: clickAction
|
|
176
|
-
},
|
|
177
175
|
api: {
|
|
178
176
|
initDone: () => {
|
|
179
177
|
initDone$.set(true);
|
|
@@ -238,7 +236,6 @@ function factoryCreateAccordion(itemFactory = createAccordionItem, accordionItem
|
|
|
238
236
|
return {
|
|
239
237
|
...utils_stores.stateStores({ itemWidgets$, className$ }),
|
|
240
238
|
patch,
|
|
241
|
-
actions: {},
|
|
242
239
|
api: {
|
|
243
240
|
expand: (id) => {
|
|
244
241
|
var _a;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getCommonAlertDefaultConfig, c as createCommonAlert } from "./common-
|
|
1
|
+
import { g as getCommonAlertDefaultConfig, c as createCommonAlert } from "./common-Banw3FYN.js";
|
|
2
2
|
function getAlertDefaultConfig() {
|
|
3
3
|
return { ...getCommonAlertDefaultConfig() };
|
|
4
4
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { createTransition } from "./services/transitions/baseTransitions.js";
|
|
2
2
|
import { n as noop } from "./func-DR0n-ShK.js";
|
|
3
3
|
import { writablesForProps, stateStores } from "./utils/stores.js";
|
|
4
|
-
import { c as
|
|
5
|
-
import { c as typeBoolean } from "./writables-DoU_XYTX.js";
|
|
4
|
+
import { c as typeBoolean, f as typeFunction, e as typeString } from "./writables-DCiBdIBK.js";
|
|
6
5
|
const defaultCommonAlertConfig = {
|
|
7
6
|
visible: true,
|
|
8
7
|
dismissible: true,
|
|
@@ -20,7 +19,16 @@ function getCommonAlertDefaultConfig() {
|
|
|
20
19
|
return { ...defaultCommonAlertConfig };
|
|
21
20
|
}
|
|
22
21
|
const commonAlertConfigValidator = {
|
|
23
|
-
dismissible: typeBoolean
|
|
22
|
+
dismissible: typeBoolean,
|
|
23
|
+
onVisibleChange: typeFunction,
|
|
24
|
+
onHidden: typeFunction,
|
|
25
|
+
onShown: typeFunction,
|
|
26
|
+
transition: typeFunction,
|
|
27
|
+
animatedOnInit: typeBoolean,
|
|
28
|
+
animated: typeBoolean,
|
|
29
|
+
visible: typeBoolean,
|
|
30
|
+
ariaCloseButtonLabel: typeString,
|
|
31
|
+
className: typeString
|
|
24
32
|
};
|
|
25
33
|
function createCommonAlert(config) {
|
|
26
34
|
const [
|
|
@@ -47,25 +55,18 @@ function createCommonAlert(config) {
|
|
|
47
55
|
onShown: onShown$
|
|
48
56
|
}
|
|
49
57
|
});
|
|
50
|
-
const close = () => {
|
|
51
|
-
patch({ visible: false });
|
|
52
|
-
};
|
|
53
|
-
const open = () => {
|
|
54
|
-
patch({ visible: true });
|
|
55
|
-
};
|
|
56
58
|
const visible$ = transition.stores.visible$;
|
|
57
59
|
const hidden$ = transition.stores.hidden$;
|
|
58
60
|
return {
|
|
59
61
|
...stateStores({ ...stateProps, visible$, hidden$ }),
|
|
60
62
|
patch,
|
|
61
63
|
api: {
|
|
62
|
-
open,
|
|
63
|
-
close
|
|
64
|
+
open: transition.api.show,
|
|
65
|
+
close: transition.api.hide
|
|
64
66
|
},
|
|
65
67
|
directives: {
|
|
66
|
-
transitionDirective:
|
|
67
|
-
}
|
|
68
|
-
actions: {}
|
|
68
|
+
transitionDirective: transition.directives.directive
|
|
69
|
+
}
|
|
69
70
|
};
|
|
70
71
|
}
|
|
71
72
|
export {
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
const services_transitions_baseTransitions = require("./services/transitions/baseTransitions.cjs");
|
|
3
3
|
const func = require("./func-Qd3cD9a3.cjs");
|
|
4
4
|
const utils_stores = require("./utils/stores.cjs");
|
|
5
|
-
const
|
|
6
|
-
const utils_writables = require("./writables-D46sFgGK.cjs");
|
|
5
|
+
const utils_writables = require("./writables-BPAJvaL_.cjs");
|
|
7
6
|
const defaultCommonAlertConfig = {
|
|
8
7
|
visible: true,
|
|
9
8
|
dismissible: true,
|
|
@@ -21,7 +20,16 @@ function getCommonAlertDefaultConfig() {
|
|
|
21
20
|
return { ...defaultCommonAlertConfig };
|
|
22
21
|
}
|
|
23
22
|
const commonAlertConfigValidator = {
|
|
24
|
-
dismissible: utils_writables.typeBoolean
|
|
23
|
+
dismissible: utils_writables.typeBoolean,
|
|
24
|
+
onVisibleChange: utils_writables.typeFunction,
|
|
25
|
+
onHidden: utils_writables.typeFunction,
|
|
26
|
+
onShown: utils_writables.typeFunction,
|
|
27
|
+
transition: utils_writables.typeFunction,
|
|
28
|
+
animatedOnInit: utils_writables.typeBoolean,
|
|
29
|
+
animated: utils_writables.typeBoolean,
|
|
30
|
+
visible: utils_writables.typeBoolean,
|
|
31
|
+
ariaCloseButtonLabel: utils_writables.typeString,
|
|
32
|
+
className: utils_writables.typeString
|
|
25
33
|
};
|
|
26
34
|
function createCommonAlert(config) {
|
|
27
35
|
const [
|
|
@@ -48,25 +56,18 @@ function createCommonAlert(config) {
|
|
|
48
56
|
onShown: onShown$
|
|
49
57
|
}
|
|
50
58
|
});
|
|
51
|
-
const close = () => {
|
|
52
|
-
patch({ visible: false });
|
|
53
|
-
};
|
|
54
|
-
const open = () => {
|
|
55
|
-
patch({ visible: true });
|
|
56
|
-
};
|
|
57
59
|
const visible$ = transition.stores.visible$;
|
|
58
60
|
const hidden$ = transition.stores.hidden$;
|
|
59
61
|
return {
|
|
60
62
|
...utils_stores.stateStores({ ...stateProps, visible$, hidden$ }),
|
|
61
63
|
patch,
|
|
62
64
|
api: {
|
|
63
|
-
open,
|
|
64
|
-
close
|
|
65
|
+
open: transition.api.show,
|
|
66
|
+
close: transition.api.hide
|
|
65
67
|
},
|
|
66
68
|
directives: {
|
|
67
|
-
transitionDirective:
|
|
68
|
-
}
|
|
69
|
-
actions: {}
|
|
69
|
+
transitionDirective: transition.directives.directive
|
|
70
|
+
}
|
|
70
71
|
};
|
|
71
72
|
}
|
|
72
73
|
exports.createCommonAlert = createCommonAlert;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { TransitionFn } from '../../services/transitions/baseTransitions';
|
|
2
2
|
import type { ConfigValidator, Directive, PropsConfig, Widget, WidgetFactory } from '../../types';
|
|
3
3
|
import type { WidgetsCommonPropsAndState } from '../commonProps';
|
|
4
|
+
/**
|
|
5
|
+
* Properties for the Accordion component.
|
|
6
|
+
*/
|
|
4
7
|
export interface AccordionProps extends WidgetsCommonPropsAndState {
|
|
5
8
|
/**
|
|
6
9
|
* If `true`, only one accordion-item at the time can stay open.
|
|
@@ -89,12 +92,18 @@ export interface AccordionProps extends WidgetsCommonPropsAndState {
|
|
|
89
92
|
*/
|
|
90
93
|
itemHeadingTag: string;
|
|
91
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* Represents the state of an Accordion component.
|
|
97
|
+
*/
|
|
92
98
|
export interface AccordionState extends WidgetsCommonPropsAndState {
|
|
93
99
|
/**
|
|
94
100
|
* Array containing all the accordion-items contained in the accordion.
|
|
95
101
|
*/
|
|
96
102
|
itemWidgets: AccordionItemWidget[];
|
|
97
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* Interface representing the API for an accordion component.
|
|
106
|
+
*/
|
|
98
107
|
export interface AccordionApi {
|
|
99
108
|
/**
|
|
100
109
|
* Given the itemId, will expand the corresponding accordion-item.
|
|
@@ -129,19 +138,22 @@ export interface AccordionApi {
|
|
|
129
138
|
*/
|
|
130
139
|
registerItem(itemConfig?: PropsConfig<AccordionItemProps>): AccordionItemWidget;
|
|
131
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* Interface representing the directives used in the Accordion component.
|
|
143
|
+
*/
|
|
132
144
|
export interface AccordionDirectives {
|
|
133
145
|
/**
|
|
134
146
|
* Directive to put on the accordion DOM element
|
|
135
147
|
*/
|
|
136
148
|
accordionDirective: Directive;
|
|
137
149
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
150
|
+
/**
|
|
151
|
+
* Represents an Accordion widget with specific properties, state, API, and directives.
|
|
152
|
+
*/
|
|
153
|
+
export type AccordionWidget = Widget<AccordionProps, AccordionState, AccordionApi, AccordionDirectives>;
|
|
154
|
+
/**
|
|
155
|
+
* Interface representing the API for an accordion item.
|
|
156
|
+
*/
|
|
145
157
|
export interface AccordionItemApi {
|
|
146
158
|
/**
|
|
147
159
|
* It will collapse the accordion-item.
|
|
@@ -160,6 +172,9 @@ export interface AccordionItemApi {
|
|
|
160
172
|
*/
|
|
161
173
|
initDone(): void;
|
|
162
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
* Interface representing the directives used in an accordion item.
|
|
177
|
+
*/
|
|
163
178
|
export interface AccordionItemDirectives {
|
|
164
179
|
/**
|
|
165
180
|
* Directive to use in special cases, if the accordion header does not use a button element to control the collapsing.
|
|
@@ -194,6 +209,9 @@ export interface AccordionItemDirectives {
|
|
|
194
209
|
*/
|
|
195
210
|
itemDirective: Directive;
|
|
196
211
|
}
|
|
212
|
+
/**
|
|
213
|
+
* Interface representing the common properties and state for an accordion item.
|
|
214
|
+
*/
|
|
197
215
|
interface AccordionItemCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
198
216
|
/**
|
|
199
217
|
* If `true`, the accordion-item will be visible (expanded). Otherwise, it will be hidden (collapsed).
|
|
@@ -230,6 +248,9 @@ interface AccordionItemCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
|
230
248
|
*/
|
|
231
249
|
headingTag: string;
|
|
232
250
|
}
|
|
251
|
+
/**
|
|
252
|
+
* Properties for an AccordionItem component.
|
|
253
|
+
*/
|
|
233
254
|
export interface AccordionItemProps extends AccordionItemCommonPropsAndState {
|
|
234
255
|
/**
|
|
235
256
|
* If `true`, accordion-item will be animated.
|
|
@@ -258,6 +279,9 @@ export interface AccordionItemProps extends AccordionItemCommonPropsAndState {
|
|
|
258
279
|
*/
|
|
259
280
|
onVisibleChange: (visible: boolean) => void;
|
|
260
281
|
}
|
|
282
|
+
/**
|
|
283
|
+
* Represents the state of an accordion item.
|
|
284
|
+
*/
|
|
261
285
|
export interface AccordionItemState extends AccordionItemCommonPropsAndState {
|
|
262
286
|
/**
|
|
263
287
|
* If `true` the content of the accordion-item collapse should be in DOM. Its value depends on the
|
|
@@ -265,7 +289,10 @@ export interface AccordionItemState extends AccordionItemCommonPropsAndState {
|
|
|
265
289
|
*/
|
|
266
290
|
shouldBeInDOM: boolean;
|
|
267
291
|
}
|
|
268
|
-
|
|
292
|
+
/**
|
|
293
|
+
* Represents a widget for an accordion item.
|
|
294
|
+
*/
|
|
295
|
+
export type AccordionItemWidget = Widget<AccordionItemProps, AccordionItemState, AccordionItemApi, AccordionItemDirectives>;
|
|
269
296
|
/**
|
|
270
297
|
* Retrieve a shallow copy of the default accordion config
|
|
271
298
|
* @returns the default accordion config
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const accordion = require("../../accordion-
|
|
3
|
+
const accordion = require("../../accordion-Lp-LEbZ2.cjs");
|
|
4
4
|
exports.createAccordion = accordion.createAccordion;
|
|
5
5
|
exports.createAccordionItem = accordion.createAccordionItem;
|
|
6
6
|
exports.factoryCreateAccordion = accordion.factoryCreateAccordion;
|
|
@@ -1,14 +1,29 @@
|
|
|
1
1
|
import type { CommonAlertApi, CommonAlertDirectives, CommonAlertProps, CommonAlertState } from './common';
|
|
2
2
|
import type { Widget, WidgetFactory } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Represents the state of an alert component.
|
|
5
|
+
*/
|
|
3
6
|
export interface AlertState extends CommonAlertState {
|
|
4
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Represents the properties for the alert component.
|
|
10
|
+
*/
|
|
5
11
|
export interface AlertProps extends CommonAlertProps {
|
|
6
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Represents the API for an alert component.
|
|
15
|
+
*/
|
|
7
16
|
export interface AlertApi extends CommonAlertApi {
|
|
8
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Represents the directives for an alert component.
|
|
20
|
+
*/
|
|
9
21
|
export interface AlertDirectives extends CommonAlertDirectives {
|
|
10
22
|
}
|
|
11
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Represents an alert widget with specific properties, state, API, and directives.
|
|
25
|
+
*/
|
|
26
|
+
export type AlertWidget = Widget<AlertProps, AlertState, AlertApi, AlertDirectives>;
|
|
12
27
|
/**
|
|
13
28
|
* Retrieve a shallow copy of the default alert config
|
|
14
29
|
* @returns the default alert config
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { TransitionFn } from '../../services/transitions/baseTransitions';
|
|
2
2
|
import type { WidgetsCommonPropsAndState } from '../commonProps';
|
|
3
3
|
import type { Directive, PropsConfig, Widget } from '../../types';
|
|
4
|
+
/**
|
|
5
|
+
* Interface representing the common properties and state for an alert component.
|
|
6
|
+
*/
|
|
4
7
|
export interface CommonAlertCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
5
8
|
/**
|
|
6
9
|
* If `true`, alert can be dismissed by the user.
|
|
@@ -22,12 +25,18 @@ export interface CommonAlertCommonPropsAndState extends WidgetsCommonPropsAndSta
|
|
|
22
25
|
*/
|
|
23
26
|
ariaCloseButtonLabel: string;
|
|
24
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Represents the state of a common alert component.
|
|
30
|
+
*/
|
|
25
31
|
export interface CommonAlertState extends CommonAlertCommonPropsAndState {
|
|
26
32
|
/**
|
|
27
33
|
* Is `true` when the alert is hidden. Compared to `visible`, this is updated after the transition is executed.
|
|
28
34
|
*/
|
|
29
35
|
hidden: boolean;
|
|
30
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Interface representing the common properties for an alert component.
|
|
39
|
+
*/
|
|
31
40
|
export interface CommonAlertProps extends CommonAlertCommonPropsAndState {
|
|
32
41
|
/**
|
|
33
42
|
* Callback called when the alert visibility changed.
|
|
@@ -86,6 +95,9 @@ export interface CommonAlertProps extends CommonAlertCommonPropsAndState {
|
|
|
86
95
|
*/
|
|
87
96
|
animated: boolean;
|
|
88
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* Interface representing the common API for alert components.
|
|
100
|
+
*/
|
|
89
101
|
export interface CommonAlertApi {
|
|
90
102
|
/**
|
|
91
103
|
* Triggers alert closing programmatically (same as clicking on the close button (×)).
|
|
@@ -96,13 +108,19 @@ export interface CommonAlertApi {
|
|
|
96
108
|
*/
|
|
97
109
|
open(): void;
|
|
98
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* Interface representing common alert directives.
|
|
113
|
+
*/
|
|
99
114
|
export interface CommonAlertDirectives {
|
|
100
115
|
/**
|
|
101
116
|
* the transition directive, piloting what is the visual effect of going from hidden to visible
|
|
102
117
|
*/
|
|
103
118
|
transitionDirective: Directive;
|
|
104
119
|
}
|
|
105
|
-
|
|
120
|
+
/**
|
|
121
|
+
* Represents a common alert widget with specified properties, state, API, and directives.
|
|
122
|
+
*/
|
|
123
|
+
export type CommonAlertWidget = Widget<CommonAlertProps, CommonAlertState, CommonAlertApi, CommonAlertDirectives>;
|
|
106
124
|
/**
|
|
107
125
|
* Retrieve a shallow copy of the default alert config
|
|
108
126
|
* @returns the default alert config
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const alert = require("../../alert-
|
|
3
|
+
const alert = require("../../alert-Bq101evB.cjs");
|
|
4
4
|
exports.createAlert = alert.createAlert;
|
|
5
5
|
exports.getAlertDefaultConfig = alert.getAlertDefaultConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const modal = require("../../modal-
|
|
3
|
+
const modal = require("../../modal-DDHcrykD.cjs");
|
|
4
4
|
exports.createModal = modal.createModal;
|
|
5
5
|
exports.getModalDefaultConfig = modal.getModalDefaultConfig;
|
|
6
6
|
exports.modalCloseButtonClick = modal.modalCloseButtonClick;
|