@agnos-ui/react-headless 0.10.0 → 0.11.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/components/toast/toasterProvider.d.ts +2 -2
- package/config.d.ts +2 -2
- package/config.js +2 -2
- package/generated/components/toast/index.cjs +1 -1
- package/generated/components/toast/index.js +1 -1
- package/generated/index.d.ts +2 -3
- package/generated/utils/directive.cjs +8 -8
- package/generated/utils/stores.cjs +7 -7
- package/generated/utils/stores.js +1 -1
- package/generated/utils/widget.cjs +5 -5
- package/generated/utils/widget.js +1 -1
- package/index.cjs +121 -128
- package/index.js +42 -43
- package/package.json +2 -2
- package/slot.d.ts +1 -1
- package/{stores-BWQ6d_4B.js → stores-C6L5Y6c8.js} +1 -1
- package/{toasterProvider-CzmXu8rV.js → toasterProvider-DEJNjnka.js} +4 -5
- package/{toasterProvider-CYgzar_d.cjs → toasterProvider-i0NjXUmM.cjs} +2 -3
- package/utils/portal.d.ts +1 -1
- package/{widget-D80Xk-XZ.js → widget-C4bqOi7x.js} +1 -1
- package/generated/components/select/index.cjs +0 -9
- package/generated/components/select/index.d.ts +0 -1
- package/generated/components/select/index.js +0 -1
|
@@ -11,7 +11,7 @@ export declare const useCreateToaster: <Props extends Partial<ToastProps>>(optio
|
|
|
11
11
|
options: ToasterProps;
|
|
12
12
|
addToast: (props: Props) => number;
|
|
13
13
|
removeToast: (id: number) => void;
|
|
14
|
-
eventsDirective: import("core/
|
|
14
|
+
eventsDirective: import("@agnos-ui/core/types").Directive<number>;
|
|
15
15
|
closeAll: () => void;
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
@@ -23,7 +23,7 @@ export declare const useCreateToaster: <Props extends Partial<ToastProps>>(optio
|
|
|
23
23
|
*/
|
|
24
24
|
export declare const ToasterProvider: <Props extends Partial<ToastProps>>({ options, children }: PropsWithChildren<{
|
|
25
25
|
options?: ToasterProps;
|
|
26
|
-
}>) => import("react
|
|
26
|
+
}>) => import("react").JSX.Element;
|
|
27
27
|
/**
|
|
28
28
|
* Custom hook to use the toaster context.
|
|
29
29
|
* @returns The toaster context.
|
package/config.d.ts
CHANGED
|
@@ -21,6 +21,6 @@ export declare const widgetsConfigFactory: <Config extends Record<string, object
|
|
|
21
21
|
WidgetsConfigContext: import("react").Context<WidgetsConfigStore<Config> | undefined>;
|
|
22
22
|
useWidgetContext: <Props extends object>(widgetName?: string, defaultConfig?: Partial<Props>) => import("@amadeus-it-group/tansu").ReadableSignal<Partial<Props>>;
|
|
23
23
|
useWidget: <W extends Widget>(factory: WidgetFactory<W>, props?: Partial<WidgetProps<W>>, defaultProps?: Partial<WidgetProps<W>>) => import("@agnos-ui/core/types").WidgetSlotContext<W>;
|
|
24
|
-
WidgetsDefaultConfig: ({ children, adaptParentConfig, ...props }: DefaultConfigInput<Config>) => import("react
|
|
24
|
+
WidgetsDefaultConfig: ({ children, adaptParentConfig, ...props }: DefaultConfigInput<Config>) => import("react").JSX.Element;
|
|
25
25
|
};
|
|
26
|
-
export declare const WidgetsConfigContext: import("react").Context<WidgetsConfigStore<WidgetsConfig> | undefined>, WidgetsDefaultConfig: ({ children, adaptParentConfig, ...props }: DefaultConfigInput<WidgetsConfig>) => import("react
|
|
26
|
+
export declare const WidgetsConfigContext: import("react").Context<WidgetsConfigStore<WidgetsConfig> | undefined>, WidgetsDefaultConfig: ({ children, adaptParentConfig, ...props }: DefaultConfigInput<WidgetsConfig>) => import("react").JSX.Element, useWidgetContext: <Props extends object>(widgetName?: string, defaultConfig?: Partial<Props> | undefined) => import("@amadeus-it-group/tansu").ReadableSignal<Partial<Props>>, useWidget: <W extends Widget>(factory: WidgetFactory<W>, props?: Partial<WidgetProps<W>> | undefined, defaultProps?: Partial<WidgetProps<W>> | undefined) => import("@agnos-ui/core/types").WidgetSlotContext<W>;
|
package/config.js
CHANGED
|
@@ -4,8 +4,8 @@ import { createWidgetsConfig } from "@agnos-ui/core/config";
|
|
|
4
4
|
export * from "@agnos-ui/core/config";
|
|
5
5
|
import { computed } from "@amadeus-it-group/tansu";
|
|
6
6
|
import { createContext, useContext, useMemo } from "react";
|
|
7
|
-
import { u as useWidgetWithConfig } from "./widget-
|
|
8
|
-
import { b as usePropsAsStore } from "./stores-
|
|
7
|
+
import { u as useWidgetWithConfig } from "./widget-C4bqOi7x.js";
|
|
8
|
+
import { b as usePropsAsStore } from "./stores-C6L5Y6c8.js";
|
|
9
9
|
const widgetsConfigFactory = (WidgetsConfigContext2 = createContext(void 0)) => {
|
|
10
10
|
const useWidgetContext2 = (widgetName, defaultConfig) => {
|
|
11
11
|
const widgetsConfig = useContext(WidgetsConfigContext2);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const toasterProvider = require("../../../toasterProvider-CYgzar_d.cjs");
|
|
4
3
|
const toast = require("@agnos-ui/core/components/toast");
|
|
4
|
+
const toasterProvider = require("../../../toasterProvider-i0NjXUmM.cjs");
|
|
5
5
|
exports.ToasterProvider = toasterProvider.ToasterProvider;
|
|
6
6
|
exports.useCreateToaster = toasterProvider.useCreateToaster;
|
|
7
7
|
exports.useToaster = toasterProvider.useToaster;
|
package/generated/index.d.ts
CHANGED
|
@@ -14,17 +14,16 @@ export * from './services/transitions/simpleClassTransition';
|
|
|
14
14
|
export * from './services/transitions/cssTransitions';
|
|
15
15
|
export * from './services/transitions/collapse';
|
|
16
16
|
export * from './services/transitions/baseTransitions';
|
|
17
|
-
export * from './types';
|
|
18
|
-
export * from './config';
|
|
19
17
|
export * from './utils/writables';
|
|
20
18
|
export * from './utils/widget';
|
|
21
19
|
export * from './utils/stores';
|
|
22
20
|
export * from './utils/func';
|
|
23
21
|
export * from './utils/directive';
|
|
22
|
+
export * from './types';
|
|
23
|
+
export * from './config';
|
|
24
24
|
export * from './components/tree/index';
|
|
25
25
|
export * from './components/toast/index';
|
|
26
26
|
export * from './components/slider/index';
|
|
27
|
-
export * from './components/select/index';
|
|
28
27
|
export * from './components/rating/index';
|
|
29
28
|
export * from './components/progressbar/index';
|
|
30
29
|
export * from './components/pagination/index';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const directive = require("../../directive-C1WhTndu.cjs");
|
|
4
|
-
const directive
|
|
5
|
-
exports.directiveAttributes = directive.directiveAttributes;
|
|
6
|
-
exports.ssrAttributes = directive.ssrAttributes;
|
|
7
|
-
exports.useDirective = directive.useDirective;
|
|
8
|
-
exports.useDirectives = directive.useDirectives;
|
|
9
|
-
Object.keys(directive
|
|
3
|
+
const directive$1 = require("../../directive-C1WhTndu.cjs");
|
|
4
|
+
const directive = require("@agnos-ui/core/utils/directive");
|
|
5
|
+
exports.directiveAttributes = directive$1.directiveAttributes;
|
|
6
|
+
exports.ssrAttributes = directive$1.ssrAttributes;
|
|
7
|
+
exports.useDirective = directive$1.useDirective;
|
|
8
|
+
exports.useDirectives = directive$1.useDirectives;
|
|
9
|
+
Object.keys(directive).forEach((k) => {
|
|
10
10
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: () => directive
|
|
12
|
+
get: () => directive[k]
|
|
13
13
|
});
|
|
14
14
|
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const stores = require("../../stores-DPOTvwx1.cjs");
|
|
4
|
-
const stores
|
|
5
|
-
exports.useObservable = stores.useObservable;
|
|
6
|
-
exports.useObservablesProxy = stores.useObservablesProxy;
|
|
7
|
-
exports.usePropsAsStore = stores.usePropsAsStore;
|
|
8
|
-
Object.keys(stores
|
|
3
|
+
const stores$1 = require("../../stores-DPOTvwx1.cjs");
|
|
4
|
+
const stores = require("@agnos-ui/core/utils/stores");
|
|
5
|
+
exports.useObservable = stores$1.useObservable;
|
|
6
|
+
exports.useObservablesProxy = stores$1.useObservablesProxy;
|
|
7
|
+
exports.usePropsAsStore = stores$1.usePropsAsStore;
|
|
8
|
+
Object.keys(stores).forEach((k) => {
|
|
9
9
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: () => stores
|
|
11
|
+
get: () => stores[k]
|
|
12
12
|
});
|
|
13
13
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const widget = require("../../widget-ClcZWw9S.cjs");
|
|
4
|
-
const widget
|
|
5
|
-
exports.useWidgetWithConfig = widget.useWidgetWithConfig;
|
|
6
|
-
Object.keys(widget
|
|
3
|
+
const widget$1 = require("../../widget-ClcZWw9S.cjs");
|
|
4
|
+
const widget = require("@agnos-ui/core/utils/widget");
|
|
5
|
+
exports.useWidgetWithConfig = widget$1.useWidgetWithConfig;
|
|
6
|
+
Object.keys(widget).forEach((k) => {
|
|
7
7
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: () => widget
|
|
9
|
+
get: () => widget[k]
|
|
10
10
|
});
|
|
11
11
|
});
|
package/index.cjs
CHANGED
|
@@ -1,279 +1,272 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
3
|
+
const accordion = require("@agnos-ui/core/components/accordion");
|
|
4
|
+
const alert = require("@agnos-ui/core/components/alert");
|
|
5
|
+
const carousel = require("@agnos-ui/core/components/carousel");
|
|
6
|
+
const collapse = require("@agnos-ui/core/components/collapse");
|
|
7
|
+
const drawer = require("@agnos-ui/core/components/drawer");
|
|
8
|
+
const modal = require("@agnos-ui/core/components/modal");
|
|
9
|
+
const pagination = require("@agnos-ui/core/components/pagination");
|
|
10
|
+
const progressbar = require("@agnos-ui/core/components/progressbar");
|
|
11
|
+
const rating = require("@agnos-ui/core/components/rating");
|
|
12
|
+
const slider = require("@agnos-ui/core/components/slider");
|
|
13
|
+
const toast = require("@agnos-ui/core/components/toast");
|
|
14
|
+
const tree = require("@agnos-ui/core/components/tree");
|
|
15
|
+
const config = require("@agnos-ui/core/config");
|
|
14
16
|
const extendWidget = require("@agnos-ui/core/services/extendWidget");
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
17
|
+
const floatingUI = require("@agnos-ui/core/services/floatingUI");
|
|
18
|
+
const focusElement = require("@agnos-ui/core/services/focusElement");
|
|
19
|
+
const focustrack = require("@agnos-ui/core/services/focustrack");
|
|
20
|
+
const hash = require("@agnos-ui/core/services/hash");
|
|
21
|
+
const intersection = require("@agnos-ui/core/services/intersection");
|
|
22
|
+
const matchMedia = require("@agnos-ui/core/services/matchMedia");
|
|
23
|
+
const navManager = require("@agnos-ui/core/services/navManager");
|
|
24
|
+
const pointerdownPosition = require("@agnos-ui/core/services/pointerdownPosition");
|
|
25
|
+
const portal = require("@agnos-ui/core/services/portal");
|
|
26
|
+
const resizeObserver = require("@agnos-ui/core/services/resizeObserver");
|
|
27
|
+
const siblingsInert = require("@agnos-ui/core/services/siblingsInert");
|
|
18
28
|
const baseTransitions = require("@agnos-ui/core/services/transitions/baseTransitions");
|
|
29
|
+
const collapse$1 = require("@agnos-ui/core/services/transitions/collapse");
|
|
30
|
+
const cssTransitions = require("@agnos-ui/core/services/transitions/cssTransitions");
|
|
31
|
+
const simpleClassTransition = require("@agnos-ui/core/services/transitions/simpleClassTransition");
|
|
19
32
|
const types = require("@agnos-ui/core/types");
|
|
20
|
-
const
|
|
21
|
-
const config = require("./config.cjs");
|
|
22
|
-
const writables = require("@agnos-ui/core/utils/writables");
|
|
23
|
-
const widget$1 = require("@agnos-ui/core/utils/widget");
|
|
24
|
-
const widget = require("./widget-ClcZWw9S.cjs");
|
|
25
|
-
const stores$1 = require("@agnos-ui/core/utils/stores");
|
|
26
|
-
const stores = require("./stores-DPOTvwx1.cjs");
|
|
33
|
+
const directive = require("@agnos-ui/core/utils/directive");
|
|
27
34
|
const func = require("@agnos-ui/core/utils/func");
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const toasterProvider = require("./toasterProvider-CYgzar_d.cjs");
|
|
32
|
-
const toast = require("@agnos-ui/core/components/toast");
|
|
33
|
-
const slider = require("@agnos-ui/core/components/slider");
|
|
34
|
-
const select = require("@agnos-ui/core/components/select");
|
|
35
|
-
const rating = require("@agnos-ui/core/components/rating");
|
|
36
|
-
const progressbar = require("@agnos-ui/core/components/progressbar");
|
|
37
|
-
const pagination = require("@agnos-ui/core/components/pagination");
|
|
38
|
-
const modal = require("@agnos-ui/core/components/modal");
|
|
39
|
-
const drawer = require("@agnos-ui/core/components/drawer");
|
|
40
|
-
const collapse$1 = require("@agnos-ui/core/components/collapse");
|
|
41
|
-
const carousel = require("@agnos-ui/core/components/carousel");
|
|
42
|
-
const alert = require("@agnos-ui/core/components/alert");
|
|
43
|
-
const accordion = require("@agnos-ui/core/components/accordion");
|
|
35
|
+
const stores = require("@agnos-ui/core/utils/stores");
|
|
36
|
+
const widget = require("@agnos-ui/core/utils/widget");
|
|
37
|
+
const writables = require("@agnos-ui/core/utils/writables");
|
|
44
38
|
const portal$1 = require("./portal-B0Q5KLrA.cjs");
|
|
45
39
|
const slot = require("./slot.cjs");
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
exports.
|
|
52
|
-
exports.
|
|
53
|
-
exports.useObservablesProxy = stores.useObservablesProxy;
|
|
54
|
-
exports.usePropsAsStore = stores.usePropsAsStore;
|
|
55
|
-
exports.directiveAttributes = directive.directiveAttributes;
|
|
56
|
-
exports.ssrAttributes = directive.ssrAttributes;
|
|
57
|
-
exports.useDirective = directive.useDirective;
|
|
58
|
-
exports.useDirectives = directive.useDirectives;
|
|
40
|
+
const toasterProvider = require("./toasterProvider-i0NjXUmM.cjs");
|
|
41
|
+
const config$1 = require("./config.cjs");
|
|
42
|
+
const directive$1 = require("./directive-C1WhTndu.cjs");
|
|
43
|
+
const stores$1 = require("./stores-DPOTvwx1.cjs");
|
|
44
|
+
const widget$1 = require("./widget-ClcZWw9S.cjs");
|
|
45
|
+
exports.Portal = portal$1.Portal;
|
|
46
|
+
exports.Slot = slot.Slot;
|
|
59
47
|
exports.ToasterProvider = toasterProvider.ToasterProvider;
|
|
60
48
|
exports.useCreateToaster = toasterProvider.useCreateToaster;
|
|
61
49
|
exports.useToaster = toasterProvider.useToaster;
|
|
62
|
-
exports.
|
|
63
|
-
exports.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
50
|
+
exports.WidgetsConfigContext = config$1.WidgetsConfigContext;
|
|
51
|
+
exports.WidgetsDefaultConfig = config$1.WidgetsDefaultConfig;
|
|
52
|
+
exports.useWidget = config$1.useWidget;
|
|
53
|
+
exports.useWidgetContext = config$1.useWidgetContext;
|
|
54
|
+
exports.widgetsConfigFactory = config$1.widgetsConfigFactory;
|
|
55
|
+
exports.directiveAttributes = directive$1.directiveAttributes;
|
|
56
|
+
exports.ssrAttributes = directive$1.ssrAttributes;
|
|
57
|
+
exports.useDirective = directive$1.useDirective;
|
|
58
|
+
exports.useDirectives = directive$1.useDirectives;
|
|
59
|
+
exports.useObservable = stores$1.useObservable;
|
|
60
|
+
exports.useObservablesProxy = stores$1.useObservablesProxy;
|
|
61
|
+
exports.usePropsAsStore = stores$1.usePropsAsStore;
|
|
62
|
+
exports.useWidgetWithConfig = widget$1.useWidgetWithConfig;
|
|
63
|
+
Object.keys(accordion).forEach((k) => {
|
|
71
64
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
72
65
|
enumerable: true,
|
|
73
|
-
get: () =>
|
|
66
|
+
get: () => accordion[k]
|
|
74
67
|
});
|
|
75
68
|
});
|
|
76
|
-
Object.keys(
|
|
69
|
+
Object.keys(alert).forEach((k) => {
|
|
77
70
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
78
71
|
enumerable: true,
|
|
79
|
-
get: () =>
|
|
72
|
+
get: () => alert[k]
|
|
80
73
|
});
|
|
81
74
|
});
|
|
82
|
-
Object.keys(
|
|
75
|
+
Object.keys(carousel).forEach((k) => {
|
|
83
76
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
84
77
|
enumerable: true,
|
|
85
|
-
get: () =>
|
|
78
|
+
get: () => carousel[k]
|
|
86
79
|
});
|
|
87
80
|
});
|
|
88
|
-
Object.keys(
|
|
81
|
+
Object.keys(collapse).forEach((k) => {
|
|
89
82
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
90
83
|
enumerable: true,
|
|
91
|
-
get: () =>
|
|
84
|
+
get: () => collapse[k]
|
|
92
85
|
});
|
|
93
86
|
});
|
|
94
|
-
Object.keys(
|
|
87
|
+
Object.keys(drawer).forEach((k) => {
|
|
95
88
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
96
89
|
enumerable: true,
|
|
97
|
-
get: () =>
|
|
90
|
+
get: () => drawer[k]
|
|
98
91
|
});
|
|
99
92
|
});
|
|
100
|
-
Object.keys(
|
|
93
|
+
Object.keys(modal).forEach((k) => {
|
|
101
94
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
102
95
|
enumerable: true,
|
|
103
|
-
get: () =>
|
|
96
|
+
get: () => modal[k]
|
|
104
97
|
});
|
|
105
98
|
});
|
|
106
|
-
Object.keys(
|
|
99
|
+
Object.keys(pagination).forEach((k) => {
|
|
107
100
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
108
101
|
enumerable: true,
|
|
109
|
-
get: () =>
|
|
102
|
+
get: () => pagination[k]
|
|
110
103
|
});
|
|
111
104
|
});
|
|
112
|
-
Object.keys(
|
|
105
|
+
Object.keys(progressbar).forEach((k) => {
|
|
113
106
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
114
107
|
enumerable: true,
|
|
115
|
-
get: () =>
|
|
108
|
+
get: () => progressbar[k]
|
|
116
109
|
});
|
|
117
110
|
});
|
|
118
|
-
Object.keys(
|
|
111
|
+
Object.keys(rating).forEach((k) => {
|
|
119
112
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
120
113
|
enumerable: true,
|
|
121
|
-
get: () =>
|
|
114
|
+
get: () => rating[k]
|
|
122
115
|
});
|
|
123
116
|
});
|
|
124
|
-
Object.keys(
|
|
117
|
+
Object.keys(slider).forEach((k) => {
|
|
125
118
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
126
119
|
enumerable: true,
|
|
127
|
-
get: () =>
|
|
120
|
+
get: () => slider[k]
|
|
128
121
|
});
|
|
129
122
|
});
|
|
130
|
-
Object.keys(
|
|
123
|
+
Object.keys(toast).forEach((k) => {
|
|
131
124
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
132
125
|
enumerable: true,
|
|
133
|
-
get: () =>
|
|
126
|
+
get: () => toast[k]
|
|
134
127
|
});
|
|
135
128
|
});
|
|
136
|
-
Object.keys(
|
|
129
|
+
Object.keys(tree).forEach((k) => {
|
|
137
130
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
138
131
|
enumerable: true,
|
|
139
|
-
get: () =>
|
|
132
|
+
get: () => tree[k]
|
|
140
133
|
});
|
|
141
134
|
});
|
|
142
|
-
Object.keys(
|
|
135
|
+
Object.keys(config).forEach((k) => {
|
|
143
136
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
144
137
|
enumerable: true,
|
|
145
|
-
get: () =>
|
|
138
|
+
get: () => config[k]
|
|
146
139
|
});
|
|
147
140
|
});
|
|
148
|
-
Object.keys(
|
|
141
|
+
Object.keys(extendWidget).forEach((k) => {
|
|
149
142
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
150
143
|
enumerable: true,
|
|
151
|
-
get: () =>
|
|
144
|
+
get: () => extendWidget[k]
|
|
152
145
|
});
|
|
153
146
|
});
|
|
154
|
-
Object.keys(
|
|
147
|
+
Object.keys(floatingUI).forEach((k) => {
|
|
155
148
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
156
149
|
enumerable: true,
|
|
157
|
-
get: () =>
|
|
150
|
+
get: () => floatingUI[k]
|
|
158
151
|
});
|
|
159
152
|
});
|
|
160
|
-
Object.keys(
|
|
153
|
+
Object.keys(focusElement).forEach((k) => {
|
|
161
154
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
162
155
|
enumerable: true,
|
|
163
|
-
get: () =>
|
|
156
|
+
get: () => focusElement[k]
|
|
164
157
|
});
|
|
165
158
|
});
|
|
166
|
-
Object.keys(
|
|
159
|
+
Object.keys(focustrack).forEach((k) => {
|
|
167
160
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
168
161
|
enumerable: true,
|
|
169
|
-
get: () =>
|
|
162
|
+
get: () => focustrack[k]
|
|
170
163
|
});
|
|
171
164
|
});
|
|
172
|
-
Object.keys(
|
|
165
|
+
Object.keys(hash).forEach((k) => {
|
|
173
166
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
174
167
|
enumerable: true,
|
|
175
|
-
get: () =>
|
|
168
|
+
get: () => hash[k]
|
|
176
169
|
});
|
|
177
170
|
});
|
|
178
|
-
Object.keys(
|
|
171
|
+
Object.keys(intersection).forEach((k) => {
|
|
179
172
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
180
173
|
enumerable: true,
|
|
181
|
-
get: () =>
|
|
174
|
+
get: () => intersection[k]
|
|
182
175
|
});
|
|
183
176
|
});
|
|
184
|
-
Object.keys(
|
|
177
|
+
Object.keys(matchMedia).forEach((k) => {
|
|
185
178
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
186
179
|
enumerable: true,
|
|
187
|
-
get: () =>
|
|
180
|
+
get: () => matchMedia[k]
|
|
188
181
|
});
|
|
189
182
|
});
|
|
190
|
-
Object.keys(
|
|
183
|
+
Object.keys(navManager).forEach((k) => {
|
|
191
184
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
192
185
|
enumerable: true,
|
|
193
|
-
get: () =>
|
|
186
|
+
get: () => navManager[k]
|
|
194
187
|
});
|
|
195
188
|
});
|
|
196
|
-
Object.keys(
|
|
189
|
+
Object.keys(pointerdownPosition).forEach((k) => {
|
|
197
190
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
198
191
|
enumerable: true,
|
|
199
|
-
get: () =>
|
|
192
|
+
get: () => pointerdownPosition[k]
|
|
200
193
|
});
|
|
201
194
|
});
|
|
202
|
-
Object.keys(
|
|
195
|
+
Object.keys(portal).forEach((k) => {
|
|
203
196
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
204
197
|
enumerable: true,
|
|
205
|
-
get: () =>
|
|
198
|
+
get: () => portal[k]
|
|
206
199
|
});
|
|
207
200
|
});
|
|
208
|
-
Object.keys(
|
|
201
|
+
Object.keys(resizeObserver).forEach((k) => {
|
|
209
202
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
210
203
|
enumerable: true,
|
|
211
|
-
get: () =>
|
|
204
|
+
get: () => resizeObserver[k]
|
|
212
205
|
});
|
|
213
206
|
});
|
|
214
|
-
Object.keys(
|
|
207
|
+
Object.keys(siblingsInert).forEach((k) => {
|
|
215
208
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
216
209
|
enumerable: true,
|
|
217
|
-
get: () =>
|
|
210
|
+
get: () => siblingsInert[k]
|
|
218
211
|
});
|
|
219
212
|
});
|
|
220
|
-
Object.keys(
|
|
213
|
+
Object.keys(baseTransitions).forEach((k) => {
|
|
221
214
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
222
215
|
enumerable: true,
|
|
223
|
-
get: () =>
|
|
216
|
+
get: () => baseTransitions[k]
|
|
224
217
|
});
|
|
225
218
|
});
|
|
226
|
-
Object.keys(
|
|
219
|
+
Object.keys(collapse$1).forEach((k) => {
|
|
227
220
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
228
221
|
enumerable: true,
|
|
229
|
-
get: () =>
|
|
222
|
+
get: () => collapse$1[k]
|
|
230
223
|
});
|
|
231
224
|
});
|
|
232
|
-
Object.keys(
|
|
225
|
+
Object.keys(cssTransitions).forEach((k) => {
|
|
233
226
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
234
227
|
enumerable: true,
|
|
235
|
-
get: () =>
|
|
228
|
+
get: () => cssTransitions[k]
|
|
236
229
|
});
|
|
237
230
|
});
|
|
238
|
-
Object.keys(
|
|
231
|
+
Object.keys(simpleClassTransition).forEach((k) => {
|
|
239
232
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
240
233
|
enumerable: true,
|
|
241
|
-
get: () =>
|
|
234
|
+
get: () => simpleClassTransition[k]
|
|
242
235
|
});
|
|
243
236
|
});
|
|
244
|
-
Object.keys(
|
|
237
|
+
Object.keys(types).forEach((k) => {
|
|
245
238
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
246
239
|
enumerable: true,
|
|
247
|
-
get: () =>
|
|
240
|
+
get: () => types[k]
|
|
248
241
|
});
|
|
249
242
|
});
|
|
250
|
-
Object.keys(
|
|
243
|
+
Object.keys(directive).forEach((k) => {
|
|
251
244
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
252
245
|
enumerable: true,
|
|
253
|
-
get: () =>
|
|
246
|
+
get: () => directive[k]
|
|
254
247
|
});
|
|
255
248
|
});
|
|
256
|
-
Object.keys(
|
|
249
|
+
Object.keys(func).forEach((k) => {
|
|
257
250
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
258
251
|
enumerable: true,
|
|
259
|
-
get: () =>
|
|
252
|
+
get: () => func[k]
|
|
260
253
|
});
|
|
261
254
|
});
|
|
262
|
-
Object.keys(
|
|
255
|
+
Object.keys(stores).forEach((k) => {
|
|
263
256
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
264
257
|
enumerable: true,
|
|
265
|
-
get: () =>
|
|
258
|
+
get: () => stores[k]
|
|
266
259
|
});
|
|
267
260
|
});
|
|
268
|
-
Object.keys(
|
|
261
|
+
Object.keys(widget).forEach((k) => {
|
|
269
262
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
270
263
|
enumerable: true,
|
|
271
|
-
get: () =>
|
|
264
|
+
get: () => widget[k]
|
|
272
265
|
});
|
|
273
266
|
});
|
|
274
|
-
Object.keys(
|
|
267
|
+
Object.keys(writables).forEach((k) => {
|
|
275
268
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
276
269
|
enumerable: true,
|
|
277
|
-
get: () =>
|
|
270
|
+
get: () => writables[k]
|
|
278
271
|
});
|
|
279
272
|
});
|
package/index.js
CHANGED
|
@@ -1,46 +1,45 @@
|
|
|
1
|
-
export * from "@agnos-ui/core/
|
|
2
|
-
export * from "@agnos-ui/core/
|
|
3
|
-
export * from "@agnos-ui/core/
|
|
4
|
-
export * from "@agnos-ui/core/
|
|
5
|
-
export * from "@agnos-ui/core/
|
|
6
|
-
export * from "@agnos-ui/core/
|
|
7
|
-
export * from "@agnos-ui/core/
|
|
8
|
-
export * from "@agnos-ui/core/
|
|
9
|
-
export * from "@agnos-ui/core/
|
|
10
|
-
export * from "@agnos-ui/core/
|
|
11
|
-
export * from "@agnos-ui/core/
|
|
1
|
+
export * from "@agnos-ui/core/components/accordion";
|
|
2
|
+
export * from "@agnos-ui/core/components/alert";
|
|
3
|
+
export * from "@agnos-ui/core/components/carousel";
|
|
4
|
+
export * from "@agnos-ui/core/components/collapse";
|
|
5
|
+
export * from "@agnos-ui/core/components/drawer";
|
|
6
|
+
export * from "@agnos-ui/core/components/modal";
|
|
7
|
+
export * from "@agnos-ui/core/components/pagination";
|
|
8
|
+
export * from "@agnos-ui/core/components/progressbar";
|
|
9
|
+
export * from "@agnos-ui/core/components/rating";
|
|
10
|
+
export * from "@agnos-ui/core/components/slider";
|
|
11
|
+
export * from "@agnos-ui/core/components/toast";
|
|
12
|
+
export * from "@agnos-ui/core/components/tree";
|
|
13
|
+
export * from "@agnos-ui/core/config";
|
|
12
14
|
export * from "@agnos-ui/core/services/extendWidget";
|
|
13
|
-
export * from "@agnos-ui/core/services/
|
|
14
|
-
export * from "@agnos-ui/core/services/
|
|
15
|
-
export * from "@agnos-ui/core/services/
|
|
15
|
+
export * from "@agnos-ui/core/services/floatingUI";
|
|
16
|
+
export * from "@agnos-ui/core/services/focusElement";
|
|
17
|
+
export * from "@agnos-ui/core/services/focustrack";
|
|
18
|
+
export * from "@agnos-ui/core/services/hash";
|
|
19
|
+
export * from "@agnos-ui/core/services/intersection";
|
|
20
|
+
export * from "@agnos-ui/core/services/matchMedia";
|
|
21
|
+
export * from "@agnos-ui/core/services/navManager";
|
|
22
|
+
export * from "@agnos-ui/core/services/pointerdownPosition";
|
|
23
|
+
export * from "@agnos-ui/core/services/portal";
|
|
24
|
+
export * from "@agnos-ui/core/services/resizeObserver";
|
|
25
|
+
export * from "@agnos-ui/core/services/siblingsInert";
|
|
16
26
|
export * from "@agnos-ui/core/services/transitions/baseTransitions";
|
|
27
|
+
export * from "@agnos-ui/core/services/transitions/collapse";
|
|
28
|
+
export * from "@agnos-ui/core/services/transitions/cssTransitions";
|
|
29
|
+
export * from "@agnos-ui/core/services/transitions/simpleClassTransition";
|
|
17
30
|
export * from "@agnos-ui/core/types";
|
|
18
|
-
export * from "@agnos-ui/core/config";
|
|
19
|
-
import { WidgetsConfigContext, WidgetsDefaultConfig, useWidget, useWidgetContext, widgetsConfigFactory } from "./config.js";
|
|
20
|
-
export * from "@agnos-ui/core/utils/writables";
|
|
21
|
-
export * from "@agnos-ui/core/utils/widget";
|
|
22
|
-
import { u } from "./widget-D80Xk-XZ.js";
|
|
23
|
-
export * from "@agnos-ui/core/utils/stores";
|
|
24
|
-
import { u as u2, a, b } from "./stores-BWQ6d_4B.js";
|
|
25
|
-
export * from "@agnos-ui/core/utils/func";
|
|
26
31
|
export * from "@agnos-ui/core/utils/directive";
|
|
27
|
-
|
|
28
|
-
export * from "@agnos-ui/core/
|
|
29
|
-
|
|
30
|
-
export * from "@agnos-ui/core/
|
|
31
|
-
export * from "@agnos-ui/core/components/slider";
|
|
32
|
-
export * from "@agnos-ui/core/components/select";
|
|
33
|
-
export * from "@agnos-ui/core/components/rating";
|
|
34
|
-
export * from "@agnos-ui/core/components/progressbar";
|
|
35
|
-
export * from "@agnos-ui/core/components/pagination";
|
|
36
|
-
export * from "@agnos-ui/core/components/modal";
|
|
37
|
-
export * from "@agnos-ui/core/components/drawer";
|
|
38
|
-
export * from "@agnos-ui/core/components/collapse";
|
|
39
|
-
export * from "@agnos-ui/core/components/carousel";
|
|
40
|
-
export * from "@agnos-ui/core/components/alert";
|
|
41
|
-
export * from "@agnos-ui/core/components/accordion";
|
|
32
|
+
export * from "@agnos-ui/core/utils/func";
|
|
33
|
+
export * from "@agnos-ui/core/utils/stores";
|
|
34
|
+
export * from "@agnos-ui/core/utils/widget";
|
|
35
|
+
export * from "@agnos-ui/core/utils/writables";
|
|
42
36
|
import { P } from "./portal-CX8X69NK.js";
|
|
43
37
|
import { Slot } from "./slot.js";
|
|
38
|
+
import { T, u, a } from "./toasterProvider-DEJNjnka.js";
|
|
39
|
+
import { WidgetsConfigContext, WidgetsDefaultConfig, useWidget, useWidgetContext, widgetsConfigFactory } from "./config.js";
|
|
40
|
+
import { d, s, u as u2, a as a2 } from "./directive-Ds3K8r_f.js";
|
|
41
|
+
import { u as u3, a as a3, b } from "./stores-C6L5Y6c8.js";
|
|
42
|
+
import { u as u4 } from "./widget-C4bqOi7x.js";
|
|
44
43
|
export {
|
|
45
44
|
P as Portal,
|
|
46
45
|
Slot,
|
|
@@ -49,15 +48,15 @@ export {
|
|
|
49
48
|
WidgetsDefaultConfig,
|
|
50
49
|
d as directiveAttributes,
|
|
51
50
|
s as ssrAttributes,
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
u as useCreateToaster,
|
|
52
|
+
u2 as useDirective,
|
|
54
53
|
a2 as useDirectives,
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
u3 as useObservable,
|
|
55
|
+
a3 as useObservablesProxy,
|
|
57
56
|
b as usePropsAsStore,
|
|
58
|
-
|
|
57
|
+
a as useToaster,
|
|
59
58
|
useWidget,
|
|
60
59
|
useWidgetContext,
|
|
61
|
-
|
|
60
|
+
u4 as useWidgetWithConfig,
|
|
62
61
|
widgetsConfigFactory
|
|
63
62
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agnos-ui/react-headless",
|
|
3
3
|
"description": "Headless component library for React.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.11.0-next.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.cjs",
|
|
7
7
|
"module": "./index.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@agnos-ui/core": "0.
|
|
52
|
+
"@agnos-ui/core": "0.11.0-next.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"@amadeus-it-group/tansu": "^2.0.0",
|
package/slot.d.ts
CHANGED
|
@@ -12,4 +12,4 @@ import type { SlotContent } from './types';
|
|
|
12
12
|
export declare const Slot: <Props extends object>({ slotContent: SlotContent, props }: {
|
|
13
13
|
slotContent: SlotContent<Props>;
|
|
14
14
|
props: Props;
|
|
15
|
-
}) => import("react
|
|
15
|
+
}) => import("react").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { findChangedProperties } from "@agnos-ui/core/utils/stores";
|
|
2
2
|
import { writable, asReadable, computed } from "@amadeus-it-group/tansu";
|
|
3
|
-
import {
|
|
3
|
+
import { useRef, useMemo, useState, useEffect } from "react";
|
|
4
4
|
let queue;
|
|
5
5
|
const processQueue = () => {
|
|
6
6
|
if (queue) {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Toaster } from "@agnos-ui/core/components/toast";
|
|
3
3
|
import { findChangedProperties } from "@agnos-ui/core/utils/stores";
|
|
4
|
-
import { useMemo, useRef,
|
|
5
|
-
import { u as useObservable } from "./stores-
|
|
6
|
-
const useCreateToaster = (options) => {
|
|
4
|
+
import { useMemo, useRef, useEffect, useCallback, useContext, createContext } from "react";
|
|
5
|
+
import { u as useObservable } from "./stores-C6L5Y6c8.js";
|
|
6
|
+
const useCreateToaster = (options = {}) => {
|
|
7
7
|
const toaster = useMemo(() => new Toaster(options), []);
|
|
8
|
-
options = options ?? {};
|
|
9
8
|
const previousOptions = useRef(options);
|
|
10
|
-
|
|
9
|
+
useEffect(() => {
|
|
11
10
|
const changedOptions = findChangedProperties(previousOptions.current, options);
|
|
12
11
|
previousOptions.current = options;
|
|
13
12
|
if (changedOptions) {
|
|
@@ -4,11 +4,10 @@ const toast = require("@agnos-ui/core/components/toast");
|
|
|
4
4
|
const stores = require("@agnos-ui/core/utils/stores");
|
|
5
5
|
const react = require("react");
|
|
6
6
|
const stores$1 = require("./stores-DPOTvwx1.cjs");
|
|
7
|
-
const useCreateToaster = (options) => {
|
|
7
|
+
const useCreateToaster = (options = {}) => {
|
|
8
8
|
const toaster = react.useMemo(() => new toast.Toaster(options), []);
|
|
9
|
-
options = options ?? {};
|
|
10
9
|
const previousOptions = react.useRef(options);
|
|
11
|
-
react.
|
|
10
|
+
react.useEffect(() => {
|
|
12
11
|
const changedOptions = stores.findChangedProperties(previousOptions.current, options);
|
|
13
12
|
previousOptions.current = options;
|
|
14
13
|
if (changedOptions) {
|
package/utils/portal.d.ts
CHANGED
|
@@ -9,4 +9,4 @@ import type { PropsWithChildren } from 'react';
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const Portal: ({ children, container }: PropsWithChildren<{
|
|
11
11
|
container: Element | DocumentFragment | null | undefined;
|
|
12
|
-
}>) => import("react
|
|
12
|
+
}>) => import("react").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { findChangedProperties } from "@agnos-ui/core/utils/stores";
|
|
2
2
|
import { useMemo, useRef } from "react";
|
|
3
|
-
import { a as useObservablesProxy } from "./stores-
|
|
3
|
+
import { a as useObservablesProxy } from "./stores-C6L5Y6c8.js";
|
|
4
4
|
import "@agnos-ui/core/utils/widget";
|
|
5
5
|
function useWidgetWithConfig(factory, props = {}, propsConfig) {
|
|
6
6
|
const coreWidget = useMemo(() => factory({ ...propsConfig, props: { ...propsConfig?.props, ...props } }), []);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const select = require("@agnos-ui/core/components/select");
|
|
4
|
-
Object.keys(select).forEach((k) => {
|
|
5
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: () => select[k]
|
|
8
|
-
});
|
|
9
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@agnos-ui/core/components/select';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@agnos-ui/core/components/select";
|