@agnos-ui/core 0.4.0-next.1 → 0.4.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/{alert-C-V64Qcs.cjs → alert-CEFbEgvG.cjs} +1 -1
- package/{alert-8ilqhLst.js → alert-DdGuK__c.js} +1 -1
- package/{common-BCEqowKw.js → common-CO5b5G_J.js} +1 -3
- package/{common-Kb96q7i4.cjs → common-nxv_hKNE.cjs} +0 -2
- package/components/accordion/accordion.d.ts +35 -1
- package/components/alert/common.d.ts +31 -3
- package/components/alert/index.cjs +1 -6
- package/components/alert/index.d.ts +0 -1
- package/components/alert/index.js +3 -8
- package/components/commonProps.d.ts +2 -0
- package/components/modal/modal.d.ts +101 -2
- package/components/pagination/pagination.d.ts +114 -47
- package/components/progressbar/progressbar.d.ts +15 -4
- package/components/rating/rating.d.ts +74 -1
- package/components/select/index.cjs +1 -2
- package/components/select/index.js +1 -2
- package/components/select/select.d.ts +103 -3
- package/components/slider/slider.d.ts +72 -1
- package/components/toast/index.cjs +1 -1
- package/components/toast/index.js +1 -1
- package/components/toast/toast.d.ts +7 -2
- package/index.cjs +5 -9
- package/index.d.ts +1 -1
- package/index.js +37 -41
- package/package.json +1 -1
- package/{select-CBlGWfZY.cjs → select-BBiF-m3N.cjs} +0 -1
- package/{select-BS0mh7Qk.js → select-jUrt_lSn.js} +0 -1
- package/services/extendWidget.d.ts +1 -1
- package/services/navManager.d.ts +8 -8
- package/{toast-DN0HwUbs.js → toast-BzxextBQ.js} +1 -1
- package/{toast-DR8b0zpm.cjs → toast-Dy3ck2cM.cjs} +1 -1
- package/types.d.ts +1 -1
- package/utils/stores.d.ts +3 -3
package/index.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { INVALID_VALUE, toSlotContextWidget } from "./types.js";
|
|
2
2
|
import { a, c, f, g } from "./accordion-BnaSamoQ.js";
|
|
3
|
-
import { c as c2,
|
|
4
|
-
import { c as c3, g as g3 } from "./
|
|
5
|
-
import { c as c4, g as g4
|
|
6
|
-
import { c as c5, g as g5 } from "./
|
|
7
|
-
import { c as c6, g as g6 } from "./
|
|
8
|
-
import { c as c7, g as g7 } from "./
|
|
9
|
-
import { c as c8,
|
|
10
|
-
import { c as c9, g as g9 } from "./
|
|
11
|
-
import { c as c10, g as g10 } from "./toast-DN0HwUbs.js";
|
|
3
|
+
import { c as c2, g as g2 } from "./alert-DdGuK__c.js";
|
|
4
|
+
import { c as c3, g as g3, a as a2, m } from "./modal-CeTI4jxI.js";
|
|
5
|
+
import { c as c4, g as g4 } from "./pagination-BpPHKQsH.js";
|
|
6
|
+
import { c as c5, g as g5 } from "./progressbar-BybOg5FE.js";
|
|
7
|
+
import { c as c6, g as g6 } from "./rating-D6Tv_4Vx.js";
|
|
8
|
+
import { c as c7, g as g7 } from "./select-jUrt_lSn.js";
|
|
9
|
+
import { c as c8, g as g8 } from "./slider-ByDkbyr1.js";
|
|
10
|
+
import { c as c9, g as g9 } from "./toast-BzxextBQ.js";
|
|
12
11
|
import { createWidgetsConfig, mergeInto } from "./config.js";
|
|
13
12
|
import { extendWidgetProps } from "./services/extendWidget.js";
|
|
14
13
|
import { createFloatingUI } from "./services/floatingUI.js";
|
|
@@ -19,71 +18,68 @@ import { createNavManager, getKeyName, isInternalInputNavigation } from "./servi
|
|
|
19
18
|
import { portal } from "./services/portal.js";
|
|
20
19
|
import { createResizeObserver } from "./services/resizeObserver.js";
|
|
21
20
|
import { sliblingsInert } from "./services/siblingsInert.js";
|
|
21
|
+
import { hash$ } from "./services/hash.js";
|
|
22
22
|
import { createTransition, noAnimation } from "./services/transitions/baseTransitions.js";
|
|
23
23
|
import { createCSSTransition, getTransitionDurationMs, hasTransition } from "./services/transitions/cssTransitions.js";
|
|
24
24
|
import { createSimpleClassTransition } from "./services/transitions/simpleClassTransition.js";
|
|
25
|
-
import { o, a as
|
|
25
|
+
import { o, a as a3, c as c10, b, p, n, g as g10, j, f as f2, h, q, d, e, i, m as m2, k, l, r, s } from "./directive-3-8yr-ZK.js";
|
|
26
26
|
import { bindableDerived, bindableProp, createPatch, findChangedProperties, isStore, mergeConfigStores, normalizeConfigStores, stateStores, toReadableStore, toWritableStore, writableWithDefault, writablesForProps, writablesWithDefault } from "./utils/stores.js";
|
|
27
|
-
import { t, h as h2, c as
|
|
27
|
+
import { t, h as h2, c as c11, d as d2, f as f3, g as g11, a as a4, b as b2, e as e2 } from "./writables-DoU_XYTX.js";
|
|
28
28
|
export {
|
|
29
29
|
INVALID_VALUE,
|
|
30
30
|
activeElement$,
|
|
31
31
|
o as attributesData,
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
a3 as bindDirective,
|
|
33
|
+
c10 as bindDirectiveNoArg,
|
|
34
34
|
bindableDerived,
|
|
35
35
|
bindableProp,
|
|
36
36
|
b as browserDirective,
|
|
37
37
|
p as classDirective,
|
|
38
|
-
c2 as commonAlertConfigValidator,
|
|
39
38
|
a as createAccordion,
|
|
40
39
|
c as createAccordionItem,
|
|
41
|
-
|
|
40
|
+
c2 as createAlert,
|
|
42
41
|
n as createAttributesDirective,
|
|
43
|
-
|
|
42
|
+
g10 as createBrowserStoreArrayDirective,
|
|
44
43
|
j as createBrowserStoreDirective,
|
|
45
44
|
createCSSTransition,
|
|
46
|
-
a2 as createCommonAlert,
|
|
47
45
|
createFloatingUI,
|
|
48
46
|
createHasFocus,
|
|
49
47
|
createIntersection,
|
|
50
48
|
createMatchMedia,
|
|
51
|
-
|
|
49
|
+
c3 as createModal,
|
|
52
50
|
createNavManager,
|
|
53
|
-
|
|
51
|
+
c4 as createPagination,
|
|
54
52
|
createPatch,
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
c5 as createProgressbar,
|
|
54
|
+
c6 as createRating,
|
|
57
55
|
createResizeObserver,
|
|
58
|
-
|
|
56
|
+
c7 as createSelect,
|
|
59
57
|
createSimpleClassTransition,
|
|
60
|
-
|
|
58
|
+
c8 as createSlider,
|
|
61
59
|
f2 as createStoreArrayDirective,
|
|
62
60
|
h as createStoreDirective,
|
|
63
|
-
|
|
61
|
+
c9 as createToast,
|
|
64
62
|
createTransition,
|
|
65
63
|
createWidgetsConfig,
|
|
66
|
-
d as defaultCommonAlertConfig,
|
|
67
|
-
d2 as defaultConfig,
|
|
68
64
|
q as directiveAttributes,
|
|
69
|
-
|
|
65
|
+
d as directiveSubscribe,
|
|
70
66
|
e as directiveUpdate,
|
|
71
67
|
extendWidgetProps,
|
|
72
68
|
f as factoryCreateAccordion,
|
|
73
69
|
findChangedProperties,
|
|
74
70
|
g as getAccordionDefaultConfig,
|
|
75
|
-
|
|
76
|
-
g2 as getCommonAlertDefaultConfig,
|
|
71
|
+
g2 as getAlertDefaultConfig,
|
|
77
72
|
getKeyName,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
73
|
+
g3 as getModalDefaultConfig,
|
|
74
|
+
g4 as getPaginationDefaultConfig,
|
|
75
|
+
g5 as getProgressbarDefaultConfig,
|
|
76
|
+
g6 as getRatingDefaultConfig,
|
|
77
|
+
g7 as getSelectDefaultConfig,
|
|
78
|
+
g8 as getSliderDefaultConfig,
|
|
79
|
+
g9 as getToastDefaultConfig,
|
|
85
80
|
getTransitionDurationMs,
|
|
86
81
|
hasTransition,
|
|
82
|
+
hash$,
|
|
87
83
|
i as isBrowserHTMLElement,
|
|
88
84
|
isInternalInputNavigation,
|
|
89
85
|
isStore,
|
|
@@ -91,7 +87,7 @@ export {
|
|
|
91
87
|
mergeConfigStores,
|
|
92
88
|
k as mergeDirectives,
|
|
93
89
|
mergeInto,
|
|
94
|
-
|
|
90
|
+
a2 as modalCloseButtonClick,
|
|
95
91
|
m as modalOutsideClick,
|
|
96
92
|
l as multiDirective,
|
|
97
93
|
noAnimation,
|
|
@@ -106,11 +102,11 @@ export {
|
|
|
106
102
|
toSlotContextWidget,
|
|
107
103
|
toWritableStore,
|
|
108
104
|
h2 as typeArray,
|
|
109
|
-
|
|
110
|
-
|
|
105
|
+
c11 as typeBoolean,
|
|
106
|
+
d2 as typeBooleanOrNull,
|
|
111
107
|
f3 as typeFunction,
|
|
112
|
-
|
|
113
|
-
|
|
108
|
+
g11 as typeHTMLElementOrNull,
|
|
109
|
+
a4 as typeNumber,
|
|
114
110
|
b2 as typeNumberInRangeFactory,
|
|
115
111
|
e2 as typeString,
|
|
116
112
|
writableWithDefault,
|
package/package.json
CHANGED
|
@@ -25,4 +25,4 @@ export type ExtendWidgetAdaptSlotWidgetProps<Props, ExtraProps extends object, E
|
|
|
25
25
|
* @param overrideDefaults - object overriding some default props of the widget to extend
|
|
26
26
|
* @returns widget factory with the extra props
|
|
27
27
|
*/
|
|
28
|
-
export declare const extendWidgetProps: <W extends Widget
|
|
28
|
+
export declare const extendWidgetProps: <W extends Widget, ExtraProps extends object, ExtraDirectives extends object = object>(factory: WidgetFactory<W>, extraPropsDefaults: ExtraProps, extraPropsConfig?: ConfigValidator<ExtraProps>, overrideDefaults?: Partial<WidgetState<W>>) => WidgetFactory<ExtendWidgetProps<W, ExtraProps, ExtraDirectives>>;
|
package/services/navManager.d.ts
CHANGED
|
@@ -64,8 +64,8 @@ export interface NavManagerItemConfig<T = any> {
|
|
|
64
64
|
export declare const createNavManager: () => {
|
|
65
65
|
elementsInDomOrder$: import("@amadeus-it-group/tansu").ReadableSignal<HTMLElement[]>;
|
|
66
66
|
directive: <T = any>(node: import("..").SSRHTMLElement, args: NavManagerItemConfig<T>) => void | {
|
|
67
|
-
update?: (
|
|
68
|
-
destroy?: (
|
|
67
|
+
update?: (args: NavManagerItemConfig<T>) => void;
|
|
68
|
+
destroy?: () => void;
|
|
69
69
|
};
|
|
70
70
|
focusIndex: (index: number, moveDirection?: -1 | 0 | 1) => HTMLElement | null;
|
|
71
71
|
focusPrevious: ({ event, referenceElement, }?: {
|
|
@@ -80,21 +80,21 @@ export declare const createNavManager: () => {
|
|
|
80
80
|
event?: Event;
|
|
81
81
|
}) => HTMLElement | null;
|
|
82
82
|
focusFirstLeft: (args_0?: {
|
|
83
|
-
event?: Event
|
|
83
|
+
event?: Event;
|
|
84
84
|
} | undefined) => HTMLElement | null;
|
|
85
85
|
focusFirstRight: (args_0?: {
|
|
86
|
-
event?: Event
|
|
86
|
+
event?: Event;
|
|
87
87
|
} | undefined) => HTMLElement | null;
|
|
88
88
|
focusLast: ({ event }?: {
|
|
89
89
|
event?: Event;
|
|
90
90
|
}) => HTMLElement | null;
|
|
91
91
|
focusLeft: (args_0?: {
|
|
92
|
-
event?: Event
|
|
93
|
-
referenceElement?: HTMLElement | null
|
|
92
|
+
event?: Event;
|
|
93
|
+
referenceElement?: HTMLElement | null;
|
|
94
94
|
} | undefined) => HTMLElement | null;
|
|
95
95
|
focusRight: (args_0?: {
|
|
96
|
-
event?: Event
|
|
97
|
-
referenceElement?: HTMLElement | null
|
|
96
|
+
event?: Event;
|
|
97
|
+
referenceElement?: HTMLElement | null;
|
|
98
98
|
} | undefined) => HTMLElement | null;
|
|
99
99
|
refreshElements: (now?: boolean) => void;
|
|
100
100
|
};
|
|
@@ -2,7 +2,7 @@ import { computed } from "@amadeus-it-group/tansu";
|
|
|
2
2
|
import { extendWidgetProps } from "./services/extendWidget.js";
|
|
3
3
|
import { d as directiveSubscribe, n as createAttributesDirective } from "./directive-3-8yr-ZK.js";
|
|
4
4
|
import { c as typeBoolean, b as typeNumberInRangeFactory } from "./writables-DoU_XYTX.js";
|
|
5
|
-
import { g as getCommonAlertDefaultConfig,
|
|
5
|
+
import { g as getCommonAlertDefaultConfig, c as createCommonAlert } from "./common-CO5b5G_J.js";
|
|
6
6
|
const toastDefaultConfig = {
|
|
7
7
|
autoHide: true,
|
|
8
8
|
delay: 5e3
|
|
@@ -3,7 +3,7 @@ const tansu = require("@amadeus-it-group/tansu");
|
|
|
3
3
|
const services_extendWidget = require("./services/extendWidget.cjs");
|
|
4
4
|
const utils_directive = require("./directive-j-xRk-h3.cjs");
|
|
5
5
|
const utils_writables = require("./writables-D46sFgGK.cjs");
|
|
6
|
-
const common = require("./common-
|
|
6
|
+
const common = require("./common-nxv_hKNE.cjs");
|
|
7
7
|
const toastDefaultConfig = {
|
|
8
8
|
autoHide: true,
|
|
9
9
|
delay: 5e3
|
package/types.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ export interface WidgetSlotContext<W extends Widget> {
|
|
|
63
63
|
* @param w - the widget
|
|
64
64
|
* @returns the slot context
|
|
65
65
|
*/
|
|
66
|
-
export declare const toSlotContextWidget: <W extends Widget
|
|
66
|
+
export declare const toSlotContextWidget: <W extends Widget>(w: W) => ContextWidget<W>;
|
|
67
67
|
export type WidgetState<T extends {
|
|
68
68
|
state$: SubscribableStore<any>;
|
|
69
69
|
}> = T extends {
|
package/utils/stores.d.ts
CHANGED
|
@@ -144,7 +144,7 @@ export declare const writablesWithDefault: <T extends object>(defConfig: T, prop
|
|
|
144
144
|
* const [{propA$, propB$}, patch] = writablesForProps(defConfig, config, validation);
|
|
145
145
|
* ```
|
|
146
146
|
*/
|
|
147
|
-
export declare const writablesForProps: <T extends object>(defConfig: T, propsConfig?: PropsConfig<T>, options?: { [K in keyof T]?: WritableWithDefaultOptions<T[K]
|
|
147
|
+
export declare const writablesForProps: <T extends object>(defConfig: T, propsConfig?: PropsConfig<T>, options?: { [K in keyof T]?: WritableWithDefaultOptions<T[K]>; }) => [ToWritableSignal<T>, ReturnType<typeof createPatch<T>>];
|
|
148
148
|
/**
|
|
149
149
|
* Using input stores, this function builds an object containing the stores as readable and a global state.
|
|
150
150
|
*
|
|
@@ -153,7 +153,7 @@ export declare const writablesForProps: <T extends object>(defConfig: T, propsCo
|
|
|
153
153
|
*/
|
|
154
154
|
export declare const stateStores: <A extends object>(inputStores: { [K in keyof A as `${K & string}$`]: ReadableSignal<any>; }) => {
|
|
155
155
|
state$: ReadableSignal<A>;
|
|
156
|
-
stores: { [
|
|
156
|
+
stores: { [K in keyof A as `${K & string}$`]: ReadableSignal<A[K]>; };
|
|
157
157
|
};
|
|
158
158
|
/**
|
|
159
159
|
* Creates a derived store that binds to multiple stores and triggers a callback when the value changes for any reason.
|
|
@@ -163,7 +163,7 @@ export declare const stateStores: <A extends object>(inputStores: { [K in keyof
|
|
|
163
163
|
* @param equal - A function to determine if two values are equal. Used to compare the ajusted value with the current one.
|
|
164
164
|
* @returns The derived store that reflects the combined state of the input stores.
|
|
165
165
|
*/
|
|
166
|
-
export declare const bindableDerived: <T, U extends [WritableSignal<T
|
|
166
|
+
export declare const bindableDerived: <T, U extends [WritableSignal<T>, ...StoreInput<any>[]]>(onChange$: ReadableSignal<(value: T) => void>, stores: U, adjustValue?: (arg: StoresInputValues<U>) => T, equal?: (currentValue: T, newValue: T) => boolean) => WritableSignal<T, T>;
|
|
167
167
|
/**
|
|
168
168
|
* Creates a computed store that contains the adjusted value of the given store and that triggers a callback when the value changes from the set or update
|
|
169
169
|
* method of the returned writable store.
|