@agnos-ui/core 0.7.1 → 0.8.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/{accordion-CJxsVQtv.cjs → accordion-DTQj-TQ1.cjs} +16 -18
  2. package/{accordion-D0oG0wQD.js → accordion-OTiJtxDi.js} +12 -14
  3. package/{alert-Bq101evB.cjs → alert-BrVkxOnA.cjs} +1 -1
  4. package/{alert-DJ2l7bcA.js → alert-DH-mO6WX.js} +1 -1
  5. package/{common-Banw3FYN.js → common-Bffx1jJO.js} +3 -4
  6. package/{common-DvPjK7SS.cjs → common-CcQOJ_hf.cjs} +5 -6
  7. package/components/accordion/accordion.d.ts +1 -1
  8. package/components/accordion/index.cjs +1 -1
  9. package/components/accordion/index.js +1 -1
  10. package/components/alert/common.d.ts +1 -1
  11. package/components/alert/index.cjs +1 -1
  12. package/components/alert/index.js +1 -1
  13. package/components/modal/index.cjs +1 -1
  14. package/components/modal/index.js +1 -1
  15. package/components/modal/modal.d.ts +2 -2
  16. package/components/pagination/index.cjs +1 -1
  17. package/components/pagination/index.js +1 -1
  18. package/components/progressbar/index.cjs +1 -1
  19. package/components/progressbar/index.js +1 -1
  20. package/components/rating/index.cjs +1 -1
  21. package/components/rating/index.js +1 -1
  22. package/components/select/index.cjs +1 -1
  23. package/components/select/index.js +1 -1
  24. package/components/slider/index.cjs +1 -1
  25. package/components/slider/index.js +1 -1
  26. package/components/slider/slider.d.ts +64 -0
  27. package/components/toast/index.cjs +1 -1
  28. package/components/toast/index.js +1 -1
  29. package/components/tree/index.cjs +1 -1
  30. package/components/tree/index.js +1 -1
  31. package/config.cjs +3 -3
  32. package/config.js +1 -1
  33. package/{directive-BtOvPrmt.cjs → dom-CuBx1JPZ.cjs} +100 -102
  34. package/{directive-DrDJkTS5.js → dom-gfxqXJpK.js} +99 -101
  35. package/index.cjs +14 -11
  36. package/index.js +15 -12
  37. package/{modal-Qr4sHBFG.js → modal-85Sw8xuV.js} +7 -9
  38. package/{modal-DtzgRa5j.cjs → modal-B7bYoubx.cjs} +12 -14
  39. package/package.json +1 -1
  40. package/{pagination-BigQwc8I.js → pagination-4g3N8ktf.js} +9 -9
  41. package/{pagination-ETXueztI.cjs → pagination-5YARuB3V.cjs} +8 -8
  42. package/{progressbar-arTsTc5c.js → progressbar-BoJsBPH1.js} +4 -4
  43. package/{progressbar-BSgE9udi.cjs → progressbar-BpSrg4HG.cjs} +2 -2
  44. package/{promise-BMJ8qhA8.cjs → promise-CxCD3NYv.cjs} +5 -5
  45. package/{promise-CY2U8bTP.js → promise-XSP94FjG.js} +2 -2
  46. package/{rating-CGv-KO_P.js → rating-B3xktzOf.js} +9 -9
  47. package/{rating-BV6lk1US.cjs → rating-C8tn9xTO.cjs} +9 -9
  48. package/{select-C5DIoZrO.js → select-C-77MJfC.js} +20 -20
  49. package/{select-C6gwSGbr.cjs → select-D1pBz4CM.cjs} +21 -21
  50. package/services/floatingUI.cjs +2 -2
  51. package/services/floatingUI.js +2 -2
  52. package/services/focustrack.cjs +1 -1
  53. package/services/focustrack.js +1 -1
  54. package/services/intersection.cjs +2 -2
  55. package/services/intersection.js +1 -1
  56. package/services/matchMedia.cjs +3 -2
  57. package/services/matchMedia.js +3 -2
  58. package/services/navManager.cjs +1 -1
  59. package/services/navManager.js +1 -1
  60. package/services/portal.cjs +1 -1
  61. package/services/portal.js +1 -1
  62. package/services/resizeObserver.cjs +3 -3
  63. package/services/resizeObserver.js +2 -2
  64. package/services/siblingsInert.cjs +4 -4
  65. package/services/siblingsInert.js +2 -2
  66. package/services/transitions/baseTransitions.cjs +7 -7
  67. package/services/transitions/baseTransitions.js +4 -4
  68. package/services/transitions/collapse.cjs +1 -1
  69. package/services/transitions/collapse.js +1 -1
  70. package/services/transitions/cssTransitions.cjs +4 -4
  71. package/services/transitions/cssTransitions.js +3 -3
  72. package/services/transitions/simpleClassTransition.cjs +1 -1
  73. package/services/transitions/simpleClassTransition.js +1 -1
  74. package/{slider-CkYsilwM.cjs → slider-B2JFXDLt.cjs} +109 -14
  75. package/{slider-DtQrcvim.js → slider-Cs69pziL.js} +111 -16
  76. package/{toast-4f-ZdK1Y.js → toast-4HGIz3Bu.js} +10 -9
  77. package/{toast-Vku2ZxoN.cjs → toast-CaIcB2sD.cjs} +8 -7
  78. package/{tree-DVsZP8ze.js → tree-C_goOyCv.js} +9 -9
  79. package/{tree-BaSMyGyv.cjs → tree-D4t2SOql.cjs} +7 -7
  80. package/utils/directive.cjs +2 -3
  81. package/utils/directive.d.ts +3 -3
  82. package/utils/directive.js +2 -3
  83. package/{func-Qd3cD9a3.cjs → utils/func.cjs} +1 -0
  84. package/{func-DR0n-ShK.js → utils/func.js} +2 -2
  85. package/utils/stores.cjs +13 -3
  86. package/utils/stores.d.ts +9 -0
  87. package/utils/stores.js +12 -2
  88. /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-BMJ8qhA8.cjs");
7
- const func = require("./func-Qd3cD9a3.cjs");
8
- const utils_directive = require("./directive-BtOvPrmt.cjs");
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 = func.noop;
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 = func.noop;
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: async () => {
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: async () => {
51
- },
52
- onBeforeClose: func.noop,
53
- onVisibleChange: func.noop,
54
- onHidden: func.noop,
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: {
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.7.1",
4
+ "version": "0.8.0-next.1",
5
5
  "type": "module",
6
6
  "main": "./index.cjs",
7
7
  "module": "./index.js",
@@ -1,8 +1,8 @@
1
1
  import { computed } from "@amadeus-it-group/tansu";
2
- import { writablesForProps, bindableProp, stateStores } from "./utils/stores.js";
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 { n as noop } from "./func-DR0n-ShK.js";
5
- import { n as createAttributesDirective } from "./directive-DrDJkTS5.js";
2
+ import { writablesForProps, bindableProp, stateStores, true$ } from "./utils/stores.js";
3
+ import { e as typeString, f as typeFunction, c as typeBoolean, a as typeNumber, j as clamp, k as isNumber } from "./writables-DCiBdIBK.js";
4
+ import { noop } from "./utils/func.js";
5
+ import { n as createAttributesDirective } from "./dom-gfxqXJpK.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,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 func = require("./func-Qd3cD9a3.cjs");
6
- const utils_directive = require("./directive-BtOvPrmt.cjs");
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: func.noop,
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,7 +1,7 @@
1
- import { j as clamp, a as typeNumber, e as typeString, f as typeFunction } from "./writables-DCiBdIBK.js";
1
+ import { j as clamp, f as typeFunction, e as typeString, a as typeNumber } 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 "./directive-DrDJkTS5.js";
3
+ import { computed, readable } from "@amadeus-it-group/tansu";
4
+ import { n as createAttributesDirective } from "./dom-gfxqXJpK.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$,
@@ -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("./directive-BtOvPrmt.cjs");
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,6 +1,6 @@
1
1
  "use strict";
2
2
  const tansu = require("@amadeus-it-group/tansu");
3
- const func = require("./func-Qd3cD9a3.cjs");
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 = func.noop;
50
+ unsubscribe = utils_func.noop;
51
51
  };
52
- let storeUnsubscribe = func.noop;
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 === func.noop) {
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 = func.noop;
74
+ unsubscribe = utils_func.noop;
75
75
  };
76
76
  const eventListener = (event2) => {
77
77
  if (event2.target === element) {
@@ -1,5 +1,5 @@
1
- import { computed, derived, readable, equal, writable, asReadable } from "@amadeus-it-group/tansu";
2
- import { n as noop } from "./func-DR0n-ShK.js";
1
+ import { derived, computed, equal, readable, writable, asReadable } from "@amadeus-it-group/tansu";
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,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 "./directive-DrDJkTS5.js";
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 { n as noop } from "./func-DR0n-ShK.js";
6
- import { writablesForProps, bindableProp, stateStores } from "./utils/stores.js";
3
+ import { n as createAttributesDirective } from "./dom-gfxqXJpK.js";
4
+ import { e as typeString, f as typeFunction, c as typeBoolean, a as typeNumber, j as clamp, k as isNumber } from "./writables-DCiBdIBK.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("./directive-BtOvPrmt.cjs");
4
+ const utils_directive = require("./dom-CuBx1JPZ.cjs");
5
5
  const utils_writables = require("./writables-BPAJvaL_.cjs");
6
- const func = require("./func-Qd3cD9a3.cjs");
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: func.noop,
17
- onLeave: func.noop,
18
- onRatingChange: func.noop,
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 "./directive-DrDJkTS5.js";
7
- import { n as noop } from "./func-DR0n-ShK.js";
8
- import { writablesForProps, bindableProp, bindableDerived, stateStores } from "./utils/stores.js";
6
+ import { t as generateId, k as mergeDirectives, n as createAttributesDirective, a as bindDirective } from "./dom-gfxqXJpK.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("./directive-BtOvPrmt.cjs");
8
- const func = require("./func-Qd3cD9a3.cjs");
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: func.noop,
22
- onFilterTextChange: func.noop,
23
- onSelectedChange: func.noop,
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) => {
@@ -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("../directive-BtOvPrmt.cjs");
6
- const promise = require("../promise-BMJ8qhA8.cjs");
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: {},
@@ -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 "../directive-DrDJkTS5.js";
4
- import { p as promiseStoreToValueStore } from "../promise-CY2U8bTP.js";
3
+ import { j as createBrowserStoreDirective, k as mergeDirectives, d as directiveSubscribe } from "../dom-gfxqXJpK.js";
4
+ import { p as promiseStoreToValueStore } from "../promise-XSP94FjG.js";
5
5
  import { writablesForProps, stateStores } from "../utils/stores.js";
6
6
  const defaultConfig = {
7
7
  computePositionOptions: {},
@@ -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("../directive-BtOvPrmt.cjs");
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";
@@ -1,5 +1,5 @@
1
1
  import { readable, computed } from "@amadeus-it-group/tansu";
2
- import { g as createBrowserStoreArrayDirective } from "../directive-DrDJkTS5.js";
2
+ import { g as createBrowserStoreArrayDirective } from "../dom-gfxqXJpK.js";
3
3
  import { BROWSER } from "esm-env";
4
4
  const evtFocusIn = "focusin";
5
5
  const evtFocusOut = "focusout";
@@ -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 func = require("../func-Qd3cD9a3.cjs");
4
+ const utils_func = require("../utils/func.cjs");
5
5
  const utils_stores = require("../utils/stores.cjs");
6
6
  const defaultValues = {
7
7
  elements: [],
@@ -32,7 +32,7 @@ const createIntersection = (config) => {
32
32
  observer.disconnect();
33
33
  };
34
34
  }
35
- return func.noop;
35
+ return utils_func.noop;
36
36
  },
37
37
  /* @__PURE__ */ new Map()
38
38
  );
@@ -1,5 +1,5 @@
1
1
  import { derived, asReadable } from "@amadeus-it-group/tansu";
2
- import { n as noop } from "../func-DR0n-ShK.js";
2
+ import { noop } from "../utils/func.js";
3
3
  import { writablesForProps } from "../utils/stores.js";
4
4
  const defaultValues = {
5
5
  elements: [],
@@ -2,12 +2,13 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const tansu = require("@amadeus-it-group/tansu");
4
4
  const esmEnv = require("esm-env");
5
- const utils_directive = require("../directive-BtOvPrmt.cjs");
5
+ const utils_directive = require("../dom-CuBx1JPZ.cjs");
6
+ const utils_stores = require("../utils/stores.cjs");
6
7
  const createMatchMedia = (query) => esmEnv.BROWSER ? tansu.readable(false, {
7
8
  onUse({ set }) {
8
9
  const mql = window.matchMedia(query.trim());
9
10
  set(mql.matches);
10
11
  return utils_directive.addEvent(mql, "change", (val) => set(val.matches));
11
12
  }
12
- }) : tansu.readable(false);
13
+ }) : utils_stores.false$;
13
14
  exports.createMatchMedia = createMatchMedia;