@agnos-ui/core 0.7.0 → 0.8.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/{accordion-Lp-LEbZ2.cjs → accordion-DTQj-TQ1.cjs} +16 -18
- package/{accordion-BGv150k9.js → accordion-hVi2XRk-.js} +12 -14
- package/{alert-DJ2l7bcA.js → alert-BSixS_cz.js} +1 -1
- package/{alert-Bq101evB.cjs → alert-BrVkxOnA.cjs} +1 -1
- package/{common-DvPjK7SS.cjs → common-CcQOJ_hf.cjs} +5 -6
- package/{common-Banw3FYN.js → common-CuZAeECD.js} +2 -3
- package/components/accordion/accordion.d.ts +1 -1
- package/components/accordion/index.cjs +1 -1
- package/components/accordion/index.js +1 -1
- package/components/alert/common.d.ts +1 -1
- package/components/alert/index.cjs +1 -1
- package/components/alert/index.js +1 -1
- package/components/modal/index.cjs +1 -1
- package/components/modal/index.js +1 -1
- package/components/modal/modal.d.ts +2 -2
- package/components/pagination/index.cjs +1 -1
- package/components/pagination/index.js +1 -1
- package/components/progressbar/index.cjs +1 -1
- package/components/progressbar/index.js +1 -1
- package/components/rating/index.cjs +1 -1
- package/components/rating/index.js +1 -1
- package/components/select/index.cjs +1 -1
- package/components/select/index.js +1 -1
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.js +1 -1
- package/components/slider/slider.d.ts +84 -9
- package/components/toast/index.cjs +1 -1
- package/components/toast/index.js +1 -1
- package/components/tree/index.cjs +1 -1
- package/components/tree/index.js +1 -1
- package/config.cjs +3 -3
- package/config.js +1 -1
- package/{directive-CKEccryv.js → dom-BB9jLllr.js} +115 -102
- package/{directive-DdlwGFtf.cjs → dom-CuBx1JPZ.cjs} +116 -103
- package/index.cjs +14 -11
- package/index.js +15 -12
- package/{modal-DDHcrykD.cjs → modal-B7bYoubx.cjs} +12 -14
- package/{modal-DP-4I7vf.js → modal-BQcw6bnM.js} +6 -8
- package/package.json +4 -1
- package/{pagination-CBysiPUs.cjs → pagination-5YARuB3V.cjs} +8 -8
- package/{pagination-DwDRot6q.js → pagination-BwaZEokc.js} +8 -8
- package/{progressbar-DghzCJ6_.cjs → progressbar-BpSrg4HG.cjs} +2 -2
- package/{progressbar-CGmNq0cS.js → progressbar-b_kXzGPc.js} +3 -3
- package/{promise-CY2U8bTP.js → promise-CBh_HbSK.js} +1 -1
- package/{promise-BMJ8qhA8.cjs → promise-CxCD3NYv.cjs} +5 -5
- package/{rating-Da38uaZz.js → rating-B1JLZgIR.js} +8 -8
- package/{rating-DlfOuwuX.cjs → rating-C8tn9xTO.cjs} +9 -9
- package/{select-CAEPqdz1.js → select-Bb2RAVs0.js} +20 -20
- package/{select-LBVhNdrd.cjs → select-D1pBz4CM.cjs} +21 -21
- package/services/floatingUI.cjs +2 -2
- package/services/floatingUI.js +2 -2
- package/services/focustrack.cjs +1 -1
- package/services/focustrack.js +1 -1
- package/services/intersection.cjs +2 -2
- package/services/intersection.js +1 -1
- package/services/matchMedia.cjs +3 -2
- package/services/matchMedia.js +3 -2
- package/services/navManager.cjs +1 -1
- package/services/navManager.js +1 -1
- package/services/portal.cjs +1 -1
- package/services/portal.js +1 -1
- package/services/resizeObserver.cjs +3 -3
- package/services/resizeObserver.js +2 -2
- package/services/siblingsInert.cjs +4 -4
- package/services/siblingsInert.js +2 -2
- package/services/transitions/baseTransitions.cjs +7 -7
- package/services/transitions/baseTransitions.js +3 -3
- package/services/transitions/collapse.cjs +1 -1
- package/services/transitions/collapse.js +1 -1
- package/services/transitions/cssTransitions.cjs +4 -4
- package/services/transitions/cssTransitions.js +3 -3
- package/services/transitions/simpleClassTransition.cjs +1 -1
- package/services/transitions/simpleClassTransition.js +1 -1
- package/{slider-1OSwok7u.cjs → slider-B2JFXDLt.cjs} +125 -24
- package/{slider-6LI4-f5s.js → slider-C-BSdQ0b.js} +126 -25
- package/{toast-CpvsibAI.js → toast-Bw2QSzBX.js} +9 -8
- package/{toast-D_uSrRZL.cjs → toast-CaIcB2sD.cjs} +8 -7
- package/{tree-Bb5KFqXp.cjs → tree-D4t2SOql.cjs} +7 -7
- package/{tree-B2Mr8b31.js → tree-DWv0zwFJ.js} +8 -8
- package/utils/directive.cjs +2 -3
- package/utils/directive.d.ts +7 -5
- package/utils/directive.js +2 -3
- package/{func-Qd3cD9a3.cjs → utils/func.cjs} +1 -0
- package/{func-DR0n-ShK.js → utils/func.js} +2 -2
- package/utils/stores.cjs +13 -3
- package/utils/stores.d.ts +9 -0
- package/utils/stores.js +12 -2
- /package/utils/{internal/func.d.ts → func.d.ts} +0 -0
|
@@ -3,9 +3,9 @@ const tansu = require("@amadeus-it-group/tansu");
|
|
|
3
3
|
const utils_writables = require("./writables-BPAJvaL_.cjs");
|
|
4
4
|
const utils_stores = require("./utils/stores.cjs");
|
|
5
5
|
const services_transitions_baseTransitions = require("./services/transitions/baseTransitions.cjs");
|
|
6
|
-
const promise = require("./promise-
|
|
7
|
-
const
|
|
8
|
-
const utils_directive = require("./
|
|
6
|
+
const promise = require("./promise-CxCD3NYv.cjs");
|
|
7
|
+
const utils_func = require("./utils/func.cjs");
|
|
8
|
+
const utils_directive = require("./dom-CuBx1JPZ.cjs");
|
|
9
9
|
const services_portal = require("./services/portal.cjs");
|
|
10
10
|
const services_siblingsInert = require("./services/siblingsInert.cjs");
|
|
11
11
|
const internalRemoveScrollbars = () => {
|
|
@@ -25,14 +25,14 @@ const internalRemoveScrollbars = () => {
|
|
|
25
25
|
bodyStyle.overflow = overflow;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
-
let internalRevert =
|
|
28
|
+
let internalRevert = utils_func.noop;
|
|
29
29
|
const removeScrollbars = () => {
|
|
30
30
|
internalRevert();
|
|
31
31
|
internalRevert = internalRemoveScrollbars();
|
|
32
32
|
};
|
|
33
33
|
const revertScrollbars = () => {
|
|
34
34
|
internalRevert();
|
|
35
|
-
internalRevert =
|
|
35
|
+
internalRevert = utils_func.noop;
|
|
36
36
|
};
|
|
37
37
|
const modalOutsideClick = Symbol();
|
|
38
38
|
const modalCloseButtonClick = Symbol();
|
|
@@ -41,18 +41,16 @@ const defaultConfig = {
|
|
|
41
41
|
ariaCloseButtonLabel: "Close",
|
|
42
42
|
backdrop: true,
|
|
43
43
|
backdropClass: "",
|
|
44
|
-
backdropTransition:
|
|
45
|
-
},
|
|
44
|
+
backdropTransition: utils_func.noop,
|
|
46
45
|
closeButton: true,
|
|
47
46
|
closeOnOutsideClick: true,
|
|
48
47
|
container: typeof window !== "undefined" ? document.body : null,
|
|
49
48
|
className: "",
|
|
50
|
-
modalTransition:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
onShown: func.noop,
|
|
49
|
+
modalTransition: utils_func.noop,
|
|
50
|
+
onBeforeClose: utils_func.noop,
|
|
51
|
+
onVisibleChange: utils_func.noop,
|
|
52
|
+
onHidden: utils_func.noop,
|
|
53
|
+
onShown: utils_func.noop,
|
|
56
54
|
visible: false
|
|
57
55
|
};
|
|
58
56
|
const configValidator = {
|
|
@@ -175,7 +173,7 @@ function createModal(config$) {
|
|
|
175
173
|
});
|
|
176
174
|
const closeButtonDirective = utils_directive.createAttributesDirective(() => ({
|
|
177
175
|
attributes: {
|
|
178
|
-
type: "button",
|
|
176
|
+
type: tansu.readable("button"),
|
|
179
177
|
"aria-label": ariaCloseButtonLabel$
|
|
180
178
|
},
|
|
181
179
|
events: {
|
|
@@ -2,9 +2,9 @@ import { computed, readable } from "@amadeus-it-group/tansu";
|
|
|
2
2
|
import { c as typeBoolean, e as typeString, f as typeFunction, g as typeHTMLElementOrNull } from "./writables-DCiBdIBK.js";
|
|
3
3
|
import { writablesForProps, stateStores } from "./utils/stores.js";
|
|
4
4
|
import { createTransition } from "./services/transitions/baseTransitions.js";
|
|
5
|
-
import { d as promiseFromStore } from "./promise-
|
|
6
|
-
import {
|
|
7
|
-
import { r as registrationArray, a as bindDirective, k as mergeDirectives, d as directiveSubscribe, b as browserDirective, n as createAttributesDirective } from "./
|
|
5
|
+
import { d as promiseFromStore } from "./promise-CBh_HbSK.js";
|
|
6
|
+
import { noop } from "./utils/func.js";
|
|
7
|
+
import { r as registrationArray, a as bindDirective, k as mergeDirectives, d as directiveSubscribe, b as browserDirective, n as createAttributesDirective } from "./dom-BB9jLllr.js";
|
|
8
8
|
import { portal } from "./services/portal.js";
|
|
9
9
|
import { siblingsInert } from "./services/siblingsInert.js";
|
|
10
10
|
const internalRemoveScrollbars = () => {
|
|
@@ -40,14 +40,12 @@ const defaultConfig = {
|
|
|
40
40
|
ariaCloseButtonLabel: "Close",
|
|
41
41
|
backdrop: true,
|
|
42
42
|
backdropClass: "",
|
|
43
|
-
backdropTransition:
|
|
44
|
-
},
|
|
43
|
+
backdropTransition: noop,
|
|
45
44
|
closeButton: true,
|
|
46
45
|
closeOnOutsideClick: true,
|
|
47
46
|
container: typeof window !== "undefined" ? document.body : null,
|
|
48
47
|
className: "",
|
|
49
|
-
modalTransition:
|
|
50
|
-
},
|
|
48
|
+
modalTransition: noop,
|
|
51
49
|
onBeforeClose: noop,
|
|
52
50
|
onVisibleChange: noop,
|
|
53
51
|
onHidden: noop,
|
|
@@ -174,7 +172,7 @@ function createModal(config$) {
|
|
|
174
172
|
});
|
|
175
173
|
const closeButtonDirective = createAttributesDirective(() => ({
|
|
176
174
|
attributes: {
|
|
177
|
-
type: "button",
|
|
175
|
+
type: readable("button"),
|
|
178
176
|
"aria-label": ariaCloseButtonLabel$
|
|
179
177
|
},
|
|
180
178
|
events: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agnos-ui/core",
|
|
3
3
|
"description": "Framework-agnostic headless component library.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.8.0-next.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.cjs",
|
|
7
7
|
"module": "./index.js",
|
|
@@ -43,6 +43,9 @@
|
|
|
43
43
|
"default": "./utils/*.js"
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"clsx": "^2.1.1"
|
|
48
|
+
},
|
|
46
49
|
"peerDependencies": {
|
|
47
50
|
"@amadeus-it-group/tansu": "^2.0.0",
|
|
48
51
|
"@floating-ui/dom": "^1.6.12",
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
const tansu = require("@amadeus-it-group/tansu");
|
|
3
3
|
const utils_stores = require("./utils/stores.cjs");
|
|
4
4
|
const utils_writables = require("./writables-BPAJvaL_.cjs");
|
|
5
|
-
const
|
|
6
|
-
const utils_directive = require("./
|
|
5
|
+
const utils_func = require("./utils/func.cjs");
|
|
6
|
+
const utils_directive = require("./dom-CuBx1JPZ.cjs");
|
|
7
7
|
const PAGE_LINK_DEFAULT = "#";
|
|
8
8
|
const defaultConfig = {
|
|
9
9
|
page: 1,
|
|
@@ -12,7 +12,7 @@ const defaultConfig = {
|
|
|
12
12
|
disabled: false,
|
|
13
13
|
directionLinks: true,
|
|
14
14
|
boundaryLinks: false,
|
|
15
|
-
onPageChange:
|
|
15
|
+
onPageChange: utils_func.noop,
|
|
16
16
|
pagesFactory: (_page, pageCount) => {
|
|
17
17
|
const pages = [];
|
|
18
18
|
for (let i = 1; i <= pageCount; i++) {
|
|
@@ -183,7 +183,7 @@ function createPagination(config) {
|
|
|
183
183
|
"aria-disabled": tansu.computed(() => disabled$() ? "true" : void 0)
|
|
184
184
|
},
|
|
185
185
|
classNames: {
|
|
186
|
-
"au-page": true
|
|
186
|
+
"au-page": utils_stores.true$
|
|
187
187
|
}
|
|
188
188
|
})),
|
|
189
189
|
pageFirst: utils_directive.createAttributesDirective(() => ({
|
|
@@ -197,7 +197,7 @@ function createPagination(config) {
|
|
|
197
197
|
"aria-disabled": tansu.computed(() => previousDisabled$() ? "true" : void 0)
|
|
198
198
|
},
|
|
199
199
|
classNames: {
|
|
200
|
-
"au-first": true
|
|
200
|
+
"au-first": utils_stores.true$
|
|
201
201
|
}
|
|
202
202
|
})),
|
|
203
203
|
pagePrev: utils_directive.createAttributesDirective(() => ({
|
|
@@ -211,7 +211,7 @@ function createPagination(config) {
|
|
|
211
211
|
"aria-disabled": tansu.computed(() => previousDisabled$() ? "true" : void 0)
|
|
212
212
|
},
|
|
213
213
|
classNames: {
|
|
214
|
-
"au-previous": true
|
|
214
|
+
"au-previous": utils_stores.true$
|
|
215
215
|
}
|
|
216
216
|
})),
|
|
217
217
|
pageNext: utils_directive.createAttributesDirective(() => ({
|
|
@@ -225,7 +225,7 @@ function createPagination(config) {
|
|
|
225
225
|
"aria-disabled": tansu.computed(() => nextDisabled$() ? "true" : void 0)
|
|
226
226
|
},
|
|
227
227
|
classNames: {
|
|
228
|
-
"au-next": true
|
|
228
|
+
"au-next": utils_stores.true$
|
|
229
229
|
}
|
|
230
230
|
})),
|
|
231
231
|
pageLast: utils_directive.createAttributesDirective(() => ({
|
|
@@ -239,7 +239,7 @@ function createPagination(config) {
|
|
|
239
239
|
"aria-disabled": tansu.computed(() => nextDisabled$() ? "true" : void 0)
|
|
240
240
|
},
|
|
241
241
|
classNames: {
|
|
242
|
-
"au-last": true
|
|
242
|
+
"au-last": utils_stores.true$
|
|
243
243
|
}
|
|
244
244
|
}))
|
|
245
245
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { computed } from "@amadeus-it-group/tansu";
|
|
2
|
-
import { writablesForProps, bindableProp, stateStores } from "./utils/stores.js";
|
|
2
|
+
import { writablesForProps, bindableProp, stateStores, true$ } from "./utils/stores.js";
|
|
3
3
|
import { j as clamp, a as typeNumber, c as typeBoolean, f as typeFunction, e as typeString, k as isNumber } from "./writables-DCiBdIBK.js";
|
|
4
|
-
import {
|
|
5
|
-
import { n as createAttributesDirective } from "./
|
|
4
|
+
import { noop } from "./utils/func.js";
|
|
5
|
+
import { n as createAttributesDirective } from "./dom-BB9jLllr.js";
|
|
6
6
|
const PAGE_LINK_DEFAULT = "#";
|
|
7
7
|
const defaultConfig = {
|
|
8
8
|
page: 1,
|
|
@@ -182,7 +182,7 @@ function createPagination(config) {
|
|
|
182
182
|
"aria-disabled": computed(() => disabled$() ? "true" : void 0)
|
|
183
183
|
},
|
|
184
184
|
classNames: {
|
|
185
|
-
"au-page": true
|
|
185
|
+
"au-page": true$
|
|
186
186
|
}
|
|
187
187
|
})),
|
|
188
188
|
pageFirst: createAttributesDirective(() => ({
|
|
@@ -196,7 +196,7 @@ function createPagination(config) {
|
|
|
196
196
|
"aria-disabled": computed(() => previousDisabled$() ? "true" : void 0)
|
|
197
197
|
},
|
|
198
198
|
classNames: {
|
|
199
|
-
"au-first": true
|
|
199
|
+
"au-first": true$
|
|
200
200
|
}
|
|
201
201
|
})),
|
|
202
202
|
pagePrev: createAttributesDirective(() => ({
|
|
@@ -210,7 +210,7 @@ function createPagination(config) {
|
|
|
210
210
|
"aria-disabled": computed(() => previousDisabled$() ? "true" : void 0)
|
|
211
211
|
},
|
|
212
212
|
classNames: {
|
|
213
|
-
"au-previous": true
|
|
213
|
+
"au-previous": true$
|
|
214
214
|
}
|
|
215
215
|
})),
|
|
216
216
|
pageNext: createAttributesDirective(() => ({
|
|
@@ -224,7 +224,7 @@ function createPagination(config) {
|
|
|
224
224
|
"aria-disabled": computed(() => nextDisabled$() ? "true" : void 0)
|
|
225
225
|
},
|
|
226
226
|
classNames: {
|
|
227
|
-
"au-next": true
|
|
227
|
+
"au-next": true$
|
|
228
228
|
}
|
|
229
229
|
})),
|
|
230
230
|
pageLast: createAttributesDirective(() => ({
|
|
@@ -238,7 +238,7 @@ function createPagination(config) {
|
|
|
238
238
|
"aria-disabled": computed(() => nextDisabled$() ? "true" : void 0)
|
|
239
239
|
},
|
|
240
240
|
classNames: {
|
|
241
|
-
"au-last": true
|
|
241
|
+
"au-last": true$
|
|
242
242
|
}
|
|
243
243
|
}))
|
|
244
244
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const utils_writables = require("./writables-BPAJvaL_.cjs");
|
|
3
3
|
const utils_stores = require("./utils/stores.cjs");
|
|
4
4
|
const tansu = require("@amadeus-it-group/tansu");
|
|
5
|
-
const utils_directive = require("./
|
|
5
|
+
const utils_directive = require("./dom-CuBx1JPZ.cjs");
|
|
6
6
|
const defaultConfig = {
|
|
7
7
|
min: 0,
|
|
8
8
|
max: 100,
|
|
@@ -67,7 +67,7 @@ function createProgressbar(config) {
|
|
|
67
67
|
directives: {
|
|
68
68
|
ariaDirective: utils_directive.createAttributesDirective(() => ({
|
|
69
69
|
attributes: {
|
|
70
|
-
role: "progressbar",
|
|
70
|
+
role: tansu.readable("progressbar"),
|
|
71
71
|
"aria-label": ariaLabel$,
|
|
72
72
|
"aria-valuenow": value$,
|
|
73
73
|
"aria-valuemin": min$,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as clamp, a as typeNumber, e as typeString, f as typeFunction } from "./writables-DCiBdIBK.js";
|
|
2
2
|
import { writablesForProps, stateStores } from "./utils/stores.js";
|
|
3
|
-
import { computed } from "@amadeus-it-group/tansu";
|
|
4
|
-
import { n as createAttributesDirective } from "./
|
|
3
|
+
import { computed, readable } from "@amadeus-it-group/tansu";
|
|
4
|
+
import { n as createAttributesDirective } from "./dom-BB9jLllr.js";
|
|
5
5
|
const defaultConfig = {
|
|
6
6
|
min: 0,
|
|
7
7
|
max: 100,
|
|
@@ -66,7 +66,7 @@ function createProgressbar(config) {
|
|
|
66
66
|
directives: {
|
|
67
67
|
ariaDirective: createAttributesDirective(() => ({
|
|
68
68
|
attributes: {
|
|
69
|
-
role: "progressbar",
|
|
69
|
+
role: readable("progressbar"),
|
|
70
70
|
"aria-label": ariaLabel$,
|
|
71
71
|
"aria-valuenow": value$,
|
|
72
72
|
"aria-valuemin": min$,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, derived, readable, equal, writable, asReadable } from "@amadeus-it-group/tansu";
|
|
2
|
-
import {
|
|
2
|
+
import { noop } from "./utils/func.js";
|
|
3
3
|
const promisePending = { status: "pending" };
|
|
4
4
|
const isThenable = (value) => {
|
|
5
5
|
const type = typeof value;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const tansu = require("@amadeus-it-group/tansu");
|
|
3
|
-
const
|
|
3
|
+
const utils_func = require("./utils/func.cjs");
|
|
4
4
|
const promisePending = { status: "pending" };
|
|
5
5
|
const isThenable = (value) => {
|
|
6
6
|
const type = typeof value;
|
|
@@ -47,16 +47,16 @@ const promiseFromStore = (store, condition = truthyValue) => {
|
|
|
47
47
|
const promise = new Promise((r) => resolve = r);
|
|
48
48
|
let unsubscribe = () => {
|
|
49
49
|
storeUnsubscribe();
|
|
50
|
-
unsubscribe =
|
|
50
|
+
unsubscribe = utils_func.noop;
|
|
51
51
|
};
|
|
52
|
-
let storeUnsubscribe =
|
|
52
|
+
let storeUnsubscribe = utils_func.noop;
|
|
53
53
|
storeUnsubscribe = store.subscribe((value) => {
|
|
54
54
|
if (condition(value)) {
|
|
55
55
|
resolve(value);
|
|
56
56
|
unsubscribe();
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
|
-
if (unsubscribe ===
|
|
59
|
+
if (unsubscribe === utils_func.noop) {
|
|
60
60
|
storeUnsubscribe();
|
|
61
61
|
}
|
|
62
62
|
return {
|
|
@@ -71,7 +71,7 @@ const promiseFromEvent = (element, event) => {
|
|
|
71
71
|
const promise = new Promise((r) => resolve = r);
|
|
72
72
|
let unsubscribe = () => {
|
|
73
73
|
element.removeEventListener(event, eventListener);
|
|
74
|
-
unsubscribe =
|
|
74
|
+
unsubscribe = utils_func.noop;
|
|
75
75
|
};
|
|
76
76
|
const eventListener = (event2) => {
|
|
77
77
|
if (event2.target === element) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { computed, writable } from "@amadeus-it-group/tansu";
|
|
1
|
+
import { computed, writable, readable } from "@amadeus-it-group/tansu";
|
|
2
2
|
import { INVALID_VALUE } from "./types.js";
|
|
3
|
-
import { n as createAttributesDirective } from "./
|
|
3
|
+
import { n as createAttributesDirective } from "./dom-BB9jLllr.js";
|
|
4
4
|
import { j as clamp, a as typeNumber, k as isNumber, c as typeBoolean, f as typeFunction, e as typeString } from "./writables-DCiBdIBK.js";
|
|
5
|
-
import {
|
|
6
|
-
import { writablesForProps, bindableProp, stateStores } from "./utils/stores.js";
|
|
5
|
+
import { noop } from "./utils/func.js";
|
|
6
|
+
import { writablesForProps, bindableProp, stateStores, true$ } from "./utils/stores.js";
|
|
7
7
|
const defaultConfig = {
|
|
8
8
|
rating: 0,
|
|
9
9
|
tabindex: 0,
|
|
@@ -116,9 +116,9 @@ function createRating(config) {
|
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
118
|
attributes: {
|
|
119
|
-
role: "slider",
|
|
119
|
+
role: readable("slider"),
|
|
120
120
|
class: className$,
|
|
121
|
-
"aria-valuemin": 0,
|
|
121
|
+
"aria-valuemin": readable(0),
|
|
122
122
|
tabindex: tabindex$,
|
|
123
123
|
"aria-valuemax": maxRating$,
|
|
124
124
|
"aria-valuenow": visibleRating$,
|
|
@@ -129,7 +129,7 @@ function createRating(config) {
|
|
|
129
129
|
"aria-labelledby": computed(() => ariaLabelledBy$() || void 0)
|
|
130
130
|
},
|
|
131
131
|
classNames: {
|
|
132
|
-
"au-rating": true
|
|
132
|
+
"au-rating": true$
|
|
133
133
|
}
|
|
134
134
|
})),
|
|
135
135
|
starDirective: createAttributesDirective((starContext$) => {
|
|
@@ -153,7 +153,7 @@ function createRating(config) {
|
|
|
153
153
|
cursor: computed(() => interactive$() ? "pointer" : "default")
|
|
154
154
|
},
|
|
155
155
|
classNames: {
|
|
156
|
-
"au-rating-star": true
|
|
156
|
+
"au-rating-star": true$
|
|
157
157
|
}
|
|
158
158
|
};
|
|
159
159
|
})
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const tansu = require("@amadeus-it-group/tansu");
|
|
3
3
|
const types = require("./types.cjs");
|
|
4
|
-
const utils_directive = require("./
|
|
4
|
+
const utils_directive = require("./dom-CuBx1JPZ.cjs");
|
|
5
5
|
const utils_writables = require("./writables-BPAJvaL_.cjs");
|
|
6
|
-
const
|
|
6
|
+
const utils_func = require("./utils/func.cjs");
|
|
7
7
|
const utils_stores = require("./utils/stores.cjs");
|
|
8
8
|
const defaultConfig = {
|
|
9
9
|
rating: 0,
|
|
@@ -13,9 +13,9 @@ const defaultConfig = {
|
|
|
13
13
|
readonly: false,
|
|
14
14
|
resettable: true,
|
|
15
15
|
ariaValueTextFn: (rating, maxRating) => `${rating} out of ${maxRating}`,
|
|
16
|
-
onHover:
|
|
17
|
-
onLeave:
|
|
18
|
-
onRatingChange:
|
|
16
|
+
onHover: utils_func.noop,
|
|
17
|
+
onLeave: utils_func.noop,
|
|
18
|
+
onRatingChange: utils_func.noop,
|
|
19
19
|
className: "",
|
|
20
20
|
ariaLabel: "Rating",
|
|
21
21
|
ariaLabelledBy: ""
|
|
@@ -117,9 +117,9 @@ function createRating(config) {
|
|
|
117
117
|
}
|
|
118
118
|
},
|
|
119
119
|
attributes: {
|
|
120
|
-
role: "slider",
|
|
120
|
+
role: tansu.readable("slider"),
|
|
121
121
|
class: className$,
|
|
122
|
-
"aria-valuemin": 0,
|
|
122
|
+
"aria-valuemin": tansu.readable(0),
|
|
123
123
|
tabindex: tabindex$,
|
|
124
124
|
"aria-valuemax": maxRating$,
|
|
125
125
|
"aria-valuenow": visibleRating$,
|
|
@@ -130,7 +130,7 @@ function createRating(config) {
|
|
|
130
130
|
"aria-labelledby": tansu.computed(() => ariaLabelledBy$() || void 0)
|
|
131
131
|
},
|
|
132
132
|
classNames: {
|
|
133
|
-
"au-rating": true
|
|
133
|
+
"au-rating": utils_stores.true$
|
|
134
134
|
}
|
|
135
135
|
})),
|
|
136
136
|
starDirective: utils_directive.createAttributesDirective((starContext$) => {
|
|
@@ -154,7 +154,7 @@ function createRating(config) {
|
|
|
154
154
|
cursor: tansu.computed(() => interactive$() ? "pointer" : "default")
|
|
155
155
|
},
|
|
156
156
|
classNames: {
|
|
157
|
-
"au-rating-star": true
|
|
157
|
+
"au-rating-star": utils_stores.true$
|
|
158
158
|
}
|
|
159
159
|
};
|
|
160
160
|
})
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { computed, writable, asWritable, batch } from "@amadeus-it-group/tansu";
|
|
1
|
+
import { computed, writable, asWritable, readable, batch } from "@amadeus-it-group/tansu";
|
|
2
2
|
import { offset, autoPlacement, size } from "@floating-ui/dom";
|
|
3
3
|
import { createFloatingUI } from "./services/floatingUI.js";
|
|
4
4
|
import { createHasFocus } from "./services/focustrack.js";
|
|
5
5
|
import { createNavManager } from "./services/navManager.js";
|
|
6
|
-
import { t as generateId, k as mergeDirectives, a as bindDirective, n as createAttributesDirective } from "./
|
|
7
|
-
import {
|
|
8
|
-
import { writablesForProps, bindableProp, bindableDerived, stateStores } from "./utils/stores.js";
|
|
6
|
+
import { t as generateId, k as mergeDirectives, a as bindDirective, n as createAttributesDirective } from "./dom-BB9jLllr.js";
|
|
7
|
+
import { noop } from "./utils/func.js";
|
|
8
|
+
import { writablesForProps, bindableProp, bindableDerived, stateStores, true$ } from "./utils/stores.js";
|
|
9
9
|
const defaultConfig = {
|
|
10
10
|
id: void 0,
|
|
11
11
|
ariaLabel: "Select",
|
|
@@ -152,19 +152,19 @@ function createSelect(config) {
|
|
|
152
152
|
};
|
|
153
153
|
const inputContainerAttributesDirective = createAttributesDirective(() => ({
|
|
154
154
|
attributes: {
|
|
155
|
-
role: "combobox",
|
|
156
|
-
"aria-haspopup": "listbox",
|
|
155
|
+
role: readable("combobox"),
|
|
156
|
+
"aria-haspopup": readable("listbox"),
|
|
157
157
|
"aria-expanded": computed(() => `${open$()}`),
|
|
158
158
|
"aria-controls": computed(() => `${id$()}-menu`)
|
|
159
159
|
}
|
|
160
160
|
}));
|
|
161
161
|
const badgeAttributesDirective = createAttributesDirective((itemContext$) => ({
|
|
162
162
|
attributes: {
|
|
163
|
-
tabindex: -1,
|
|
163
|
+
tabindex: readable(-1),
|
|
164
164
|
class: badgeClassName$
|
|
165
165
|
},
|
|
166
166
|
classNames: {
|
|
167
|
-
"au-select-badge": true
|
|
167
|
+
"au-select-badge": true$
|
|
168
168
|
},
|
|
169
169
|
events: {
|
|
170
170
|
keydown: (event) => {
|
|
@@ -185,7 +185,7 @@ function createSelect(config) {
|
|
|
185
185
|
}));
|
|
186
186
|
const menuAttributesDirective = createAttributesDirective(() => ({
|
|
187
187
|
attributes: {
|
|
188
|
-
role: "listbox",
|
|
188
|
+
role: readable("listbox"),
|
|
189
189
|
id: computed(() => `${id$()}-menu`),
|
|
190
190
|
"data-popper-placement": placement$,
|
|
191
191
|
class: menuClassName$
|
|
@@ -196,12 +196,12 @@ function createSelect(config) {
|
|
|
196
196
|
}));
|
|
197
197
|
const itemAttributesDirective = createAttributesDirective((itemContext$) => ({
|
|
198
198
|
attributes: {
|
|
199
|
-
role: "option",
|
|
199
|
+
role: readable("option"),
|
|
200
200
|
"aria-selected": computed(() => `${itemContext$().selected}`),
|
|
201
|
-
style: "cursor: pointer"
|
|
201
|
+
style: readable("cursor: pointer")
|
|
202
202
|
},
|
|
203
203
|
classNames: {
|
|
204
|
-
"au-select-item": true
|
|
204
|
+
"au-select-item": true$,
|
|
205
205
|
selected: computed(() => itemContext$().selected)
|
|
206
206
|
},
|
|
207
207
|
events: {
|
|
@@ -210,16 +210,16 @@ function createSelect(config) {
|
|
|
210
210
|
}));
|
|
211
211
|
const inputDirective = createAttributesDirective(() => ({
|
|
212
212
|
attributes: {
|
|
213
|
-
id: id
|
|
214
|
-
type: "text",
|
|
215
|
-
"aria-label": ariaLabel
|
|
216
|
-
"aria-autocomplete": "list",
|
|
217
|
-
autocorrect: "off",
|
|
218
|
-
autocapitalize: "none",
|
|
219
|
-
autocomplete: "off"
|
|
213
|
+
id: id$,
|
|
214
|
+
type: readable("text"),
|
|
215
|
+
"aria-label": ariaLabel$,
|
|
216
|
+
"aria-autocomplete": readable("list"),
|
|
217
|
+
autocorrect: readable("off"),
|
|
218
|
+
autocapitalize: readable("none"),
|
|
219
|
+
autocomplete: readable("off")
|
|
220
220
|
},
|
|
221
221
|
classNames: {
|
|
222
|
-
"au-select-input": true
|
|
222
|
+
"au-select-input": true$
|
|
223
223
|
},
|
|
224
224
|
events: {
|
|
225
225
|
input: (event) => {
|
|
@@ -4,8 +4,8 @@ const dom = require("@floating-ui/dom");
|
|
|
4
4
|
const services_floatingUI = require("./services/floatingUI.cjs");
|
|
5
5
|
const services_focustrack = require("./services/focustrack.cjs");
|
|
6
6
|
const services_navManager = require("./services/navManager.cjs");
|
|
7
|
-
const utils_directive = require("./
|
|
8
|
-
const
|
|
7
|
+
const utils_directive = require("./dom-CuBx1JPZ.cjs");
|
|
8
|
+
const utils_func = require("./utils/func.cjs");
|
|
9
9
|
const utils_stores = require("./utils/stores.cjs");
|
|
10
10
|
const defaultConfig = {
|
|
11
11
|
id: void 0,
|
|
@@ -18,9 +18,9 @@ const defaultConfig = {
|
|
|
18
18
|
selected: [],
|
|
19
19
|
navSelector: (node) => node.querySelectorAll(".au-select-badge,input"),
|
|
20
20
|
itemIdFn: (item) => "" + item,
|
|
21
|
-
onOpenChange:
|
|
22
|
-
onFilterTextChange:
|
|
23
|
-
onSelectedChange:
|
|
21
|
+
onOpenChange: utils_func.noop,
|
|
22
|
+
onFilterTextChange: utils_func.noop,
|
|
23
|
+
onSelectedChange: utils_func.noop,
|
|
24
24
|
allowedPlacements: ["bottom-start", "top-start", "bottom-end", "top-end"],
|
|
25
25
|
className: "",
|
|
26
26
|
menuClassName: "",
|
|
@@ -153,19 +153,19 @@ function createSelect(config) {
|
|
|
153
153
|
};
|
|
154
154
|
const inputContainerAttributesDirective = utils_directive.createAttributesDirective(() => ({
|
|
155
155
|
attributes: {
|
|
156
|
-
role: "combobox",
|
|
157
|
-
"aria-haspopup": "listbox",
|
|
156
|
+
role: tansu.readable("combobox"),
|
|
157
|
+
"aria-haspopup": tansu.readable("listbox"),
|
|
158
158
|
"aria-expanded": tansu.computed(() => `${open$()}`),
|
|
159
159
|
"aria-controls": tansu.computed(() => `${id$()}-menu`)
|
|
160
160
|
}
|
|
161
161
|
}));
|
|
162
162
|
const badgeAttributesDirective = utils_directive.createAttributesDirective((itemContext$) => ({
|
|
163
163
|
attributes: {
|
|
164
|
-
tabindex: -1,
|
|
164
|
+
tabindex: tansu.readable(-1),
|
|
165
165
|
class: badgeClassName$
|
|
166
166
|
},
|
|
167
167
|
classNames: {
|
|
168
|
-
"au-select-badge": true
|
|
168
|
+
"au-select-badge": utils_stores.true$
|
|
169
169
|
},
|
|
170
170
|
events: {
|
|
171
171
|
keydown: (event) => {
|
|
@@ -186,7 +186,7 @@ function createSelect(config) {
|
|
|
186
186
|
}));
|
|
187
187
|
const menuAttributesDirective = utils_directive.createAttributesDirective(() => ({
|
|
188
188
|
attributes: {
|
|
189
|
-
role: "listbox",
|
|
189
|
+
role: tansu.readable("listbox"),
|
|
190
190
|
id: tansu.computed(() => `${id$()}-menu`),
|
|
191
191
|
"data-popper-placement": placement$,
|
|
192
192
|
class: menuClassName$
|
|
@@ -197,12 +197,12 @@ function createSelect(config) {
|
|
|
197
197
|
}));
|
|
198
198
|
const itemAttributesDirective = utils_directive.createAttributesDirective((itemContext$) => ({
|
|
199
199
|
attributes: {
|
|
200
|
-
role: "option",
|
|
200
|
+
role: tansu.readable("option"),
|
|
201
201
|
"aria-selected": tansu.computed(() => `${itemContext$().selected}`),
|
|
202
|
-
style: "cursor: pointer"
|
|
202
|
+
style: tansu.readable("cursor: pointer")
|
|
203
203
|
},
|
|
204
204
|
classNames: {
|
|
205
|
-
"au-select-item": true
|
|
205
|
+
"au-select-item": utils_stores.true$,
|
|
206
206
|
selected: tansu.computed(() => itemContext$().selected)
|
|
207
207
|
},
|
|
208
208
|
events: {
|
|
@@ -211,16 +211,16 @@ function createSelect(config) {
|
|
|
211
211
|
}));
|
|
212
212
|
const inputDirective = utils_directive.createAttributesDirective(() => ({
|
|
213
213
|
attributes: {
|
|
214
|
-
id: id
|
|
215
|
-
type: "text",
|
|
216
|
-
"aria-label": ariaLabel
|
|
217
|
-
"aria-autocomplete": "list",
|
|
218
|
-
autocorrect: "off",
|
|
219
|
-
autocapitalize: "none",
|
|
220
|
-
autocomplete: "off"
|
|
214
|
+
id: id$,
|
|
215
|
+
type: tansu.readable("text"),
|
|
216
|
+
"aria-label": ariaLabel$,
|
|
217
|
+
"aria-autocomplete": tansu.readable("list"),
|
|
218
|
+
autocorrect: tansu.readable("off"),
|
|
219
|
+
autocapitalize: tansu.readable("none"),
|
|
220
|
+
autocomplete: tansu.readable("off")
|
|
221
221
|
},
|
|
222
222
|
classNames: {
|
|
223
|
-
"au-select-input": true
|
|
223
|
+
"au-select-input": utils_stores.true$
|
|
224
224
|
},
|
|
225
225
|
events: {
|
|
226
226
|
input: (event) => {
|
package/services/floatingUI.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const tansu = require("@amadeus-it-group/tansu");
|
|
4
4
|
const dom = require("@floating-ui/dom");
|
|
5
|
-
const utils_directive = require("../
|
|
6
|
-
const promise = require("../promise-
|
|
5
|
+
const utils_directive = require("../dom-CuBx1JPZ.cjs");
|
|
6
|
+
const promise = require("../promise-CxCD3NYv.cjs");
|
|
7
7
|
const utils_stores = require("../utils/stores.cjs");
|
|
8
8
|
const defaultConfig = {
|
|
9
9
|
computePositionOptions: {},
|
package/services/floatingUI.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed, derived } from "@amadeus-it-group/tansu";
|
|
2
2
|
import { arrow, autoUpdate, computePosition } from "@floating-ui/dom";
|
|
3
|
-
import { j as createBrowserStoreDirective, k as mergeDirectives, d as directiveSubscribe } from "../
|
|
4
|
-
import { p as promiseStoreToValueStore } from "../promise-
|
|
3
|
+
import { j as createBrowserStoreDirective, k as mergeDirectives, d as directiveSubscribe } from "../dom-BB9jLllr.js";
|
|
4
|
+
import { p as promiseStoreToValueStore } from "../promise-CBh_HbSK.js";
|
|
5
5
|
import { writablesForProps, stateStores } from "../utils/stores.js";
|
|
6
6
|
const defaultConfig = {
|
|
7
7
|
computePositionOptions: {},
|
package/services/focustrack.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const tansu = require("@amadeus-it-group/tansu");
|
|
4
|
-
const utils_directive = require("../
|
|
4
|
+
const utils_directive = require("../dom-CuBx1JPZ.cjs");
|
|
5
5
|
const esmEnv = require("esm-env");
|
|
6
6
|
const evtFocusIn = "focusin";
|
|
7
7
|
const evtFocusOut = "focusout";
|
package/services/focustrack.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { readable, computed } from "@amadeus-it-group/tansu";
|
|
2
|
-
import { g as createBrowserStoreArrayDirective } from "../
|
|
2
|
+
import { g as createBrowserStoreArrayDirective } from "../dom-BB9jLllr.js";
|
|
3
3
|
import { BROWSER } from "esm-env";
|
|
4
4
|
const evtFocusIn = "focusin";
|
|
5
5
|
const evtFocusOut = "focusout";
|