@agnos-ui/core 0.7.1 → 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.
Files changed (88) hide show
  1. package/{accordion-CJxsVQtv.cjs → accordion-DTQj-TQ1.cjs} +16 -18
  2. package/{accordion-D0oG0wQD.js → accordion-hVi2XRk-.js} +12 -14
  3. package/{alert-DJ2l7bcA.js → alert-BSixS_cz.js} +1 -1
  4. package/{alert-Bq101evB.cjs → alert-BrVkxOnA.cjs} +1 -1
  5. package/{common-DvPjK7SS.cjs → common-CcQOJ_hf.cjs} +5 -6
  6. package/{common-Banw3FYN.js → common-CuZAeECD.js} +2 -3
  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-DrDJkTS5.js → dom-BB9jLllr.js} +99 -101
  34. package/{directive-BtOvPrmt.cjs → dom-CuBx1JPZ.cjs} +100 -102
  35. package/index.cjs +14 -11
  36. package/index.js +15 -12
  37. package/{modal-DtzgRa5j.cjs → modal-B7bYoubx.cjs} +12 -14
  38. package/{modal-Qr4sHBFG.js → modal-BQcw6bnM.js} +6 -8
  39. package/package.json +1 -1
  40. package/{pagination-ETXueztI.cjs → pagination-5YARuB3V.cjs} +8 -8
  41. package/{pagination-BigQwc8I.js → pagination-BwaZEokc.js} +8 -8
  42. package/{progressbar-BSgE9udi.cjs → progressbar-BpSrg4HG.cjs} +2 -2
  43. package/{progressbar-arTsTc5c.js → progressbar-b_kXzGPc.js} +3 -3
  44. package/{promise-CY2U8bTP.js → promise-CBh_HbSK.js} +1 -1
  45. package/{promise-BMJ8qhA8.cjs → promise-CxCD3NYv.cjs} +5 -5
  46. package/{rating-CGv-KO_P.js → rating-B1JLZgIR.js} +8 -8
  47. package/{rating-BV6lk1US.cjs → rating-C8tn9xTO.cjs} +9 -9
  48. package/{select-C5DIoZrO.js → select-Bb2RAVs0.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 +3 -3
  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-C-BSdQ0b.js} +110 -15
  76. package/{toast-4f-ZdK1Y.js → toast-Bw2QSzBX.js} +9 -8
  77. package/{toast-Vku2ZxoN.cjs → toast-CaIcB2sD.cjs} +8 -7
  78. package/{tree-BaSMyGyv.cjs → tree-D4t2SOql.cjs} +7 -7
  79. package/{tree-DVsZP8ze.js → tree-DWv0zwFJ.js} +8 -8
  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
@@ -1,15 +1,15 @@
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");
5
- const func = require("../func-Qd3cD9a3.cjs");
4
+ const utils_directive = require("../dom-CuBx1JPZ.cjs");
5
+ const utils_func = require("../utils/func.cjs");
6
6
  const createResizeObserver = () => {
7
7
  const { element$, directive } = utils_directive.createBrowserStoreDirective();
8
8
  const observedElement$ = tansu.derived(
9
9
  element$,
10
10
  (element, set) => {
11
11
  if (element === null) {
12
- return func.noop;
12
+ return utils_func.noop;
13
13
  }
14
14
  const observer = new ResizeObserver((entries) => {
15
15
  set(entries[0]);
@@ -1,6 +1,6 @@
1
1
  import { derived } from "@amadeus-it-group/tansu";
2
- import { j as createBrowserStoreDirective } from "../directive-DrDJkTS5.js";
3
- import { n as noop } from "../func-DR0n-ShK.js";
2
+ import { j as createBrowserStoreDirective } from "../dom-BB9jLllr.js";
3
+ import { noop } from "../utils/func.js";
4
4
  const createResizeObserver = () => {
5
5
  const { element$, directive } = createBrowserStoreDirective();
6
6
  const observedElement$ = derived(
@@ -1,8 +1,8 @@
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");
5
- const utils_directive = require("../directive-BtOvPrmt.cjs");
4
+ const utils_func = require("../utils/func.cjs");
5
+ const utils_directive = require("../dom-CuBx1JPZ.cjs");
6
6
  const internalSetSiblingsInert = (element) => {
7
7
  const inertValues = /* @__PURE__ */ new Map();
8
8
  const recursiveHelper = (element2) => {
@@ -22,10 +22,10 @@ const internalSetSiblingsInert = (element) => {
22
22
  element2.toggleAttribute("inert", value);
23
23
  });
24
24
  };
25
- let internalRevert = func.noop;
25
+ let internalRevert = utils_func.noop;
26
26
  const setSiblingsInert = (element) => {
27
27
  internalRevert();
28
- internalRevert = element ? internalSetSiblingsInert(element) : func.noop;
28
+ internalRevert = element ? internalSetSiblingsInert(element) : utils_func.noop;
29
29
  };
30
30
  const { directive: storeArrayDirective, elements$ } = utils_directive.createBrowserStoreArrayDirective();
31
31
  const lastElement$ = tansu.computed(
@@ -1,6 +1,6 @@
1
1
  import { computed } from "@amadeus-it-group/tansu";
2
- import { n as noop } from "../func-DR0n-ShK.js";
3
- import { g as createBrowserStoreArrayDirective, k as mergeDirectives, d as directiveSubscribe } from "../directive-DrDJkTS5.js";
2
+ import { noop } from "../utils/func.js";
3
+ import { g as createBrowserStoreArrayDirective, k as mergeDirectives, d as directiveSubscribe } from "../dom-BB9jLllr.js";
4
4
  const internalSetSiblingsInert = (element) => {
5
5
  const inertValues = /* @__PURE__ */ new Map();
6
6
  const recursiveHelper = (element2) => {
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const tansu = require("@amadeus-it-group/tansu");
4
4
  const utils_writables = require("../../writables-BPAJvaL_.cjs");
5
- const promise = require("../../promise-BMJ8qhA8.cjs");
6
- const func = require("../../func-Qd3cD9a3.cjs");
5
+ const promise = require("../../promise-CxCD3NYv.cjs");
6
+ const utils_func = require("../../utils/func.cjs");
7
7
  const utils_stores = require("../../utils/stores.cjs");
8
- const utils_directive = require("../../directive-BtOvPrmt.cjs");
9
- const neverEndingPromise = new Promise(func.noop);
8
+ const utils_directive = require("../../dom-CuBx1JPZ.cjs");
9
+ const neverEndingPromise = new Promise(utils_func.noop);
10
10
  const noAnimation = (element, direction) => {
11
11
  element.style.display = direction === "show" ? "" : "none";
12
12
  };
@@ -16,9 +16,9 @@ const defaultValues = {
16
16
  initDone: null,
17
17
  visible: true,
18
18
  transition: noAnimation,
19
- onShown: func.noop,
20
- onHidden: func.noop,
21
- onVisibleChange: func.noop
19
+ onShown: utils_func.noop,
20
+ onHidden: utils_func.noop,
21
+ onVisibleChange: utils_func.noop
22
22
  };
23
23
  const configValidator = {
24
24
  animated: utils_writables.typeBoolean,
@@ -1,9 +1,9 @@
1
1
  import { computed, writable, derived, batch } from "@amadeus-it-group/tansu";
2
2
  import { c as typeBoolean, f as typeFunction, d as typeBooleanOrNull } from "../../writables-DCiBdIBK.js";
3
- import { c as promiseWithResolve } from "../../promise-CY2U8bTP.js";
4
- import { n as noop } from "../../func-DR0n-ShK.js";
3
+ import { c as promiseWithResolve } from "../../promise-CBh_HbSK.js";
4
+ import { noop } from "../../utils/func.js";
5
5
  import { writablesForProps, bindableDerived, stateStores } from "../../utils/stores.js";
6
- import { h as createStoreDirective, k as mergeDirectives, d as directiveSubscribe } from "../../directive-DrDJkTS5.js";
6
+ import { h as createStoreDirective, k as mergeDirectives, d as directiveSubscribe } from "../../dom-BB9jLllr.js";
7
7
  const neverEndingPromise = new Promise(noop);
8
8
  const noAnimation = (element, direction) => {
9
9
  element.style.display = direction === "show" ? "" : "none";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const utils_directive = require("../../directive-BtOvPrmt.cjs");
3
+ const utils_directive = require("../../dom-CuBx1JPZ.cjs");
4
4
  const services_transitions_cssTransitions = require("./cssTransitions.cjs");
5
5
  const createCollapseTransition = ({
6
6
  dimension = "height",
@@ -1,4 +1,4 @@
1
- import { i as isBrowserHTMLElement, v as removeClasses, w as addClasses, x as reflow } from "../../directive-DrDJkTS5.js";
1
+ import { i as isBrowserHTMLElement, v as removeClasses, w as addClasses, x as reflow } from "../../dom-BB9jLllr.js";
2
2
  import { createCSSTransition } from "./cssTransitions.js";
3
3
  const createCollapseTransition = ({
4
4
  dimension = "height",
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const utils_directive = require("../../directive-BtOvPrmt.cjs");
4
- const func = require("../../func-Qd3cD9a3.cjs");
5
- const promise = require("../../promise-BMJ8qhA8.cjs");
3
+ const utils_directive = require("../../dom-CuBx1JPZ.cjs");
4
+ const utils_func = require("../../utils/func.cjs");
5
+ const promise = require("../../promise-CxCD3NYv.cjs");
6
6
  function hasTransition(element) {
7
7
  return window.getComputedStyle(element).transitionProperty !== "none";
8
8
  }
@@ -13,7 +13,7 @@ function getTransitionDurationMs(element) {
13
13
  return (transitionDelaySec + transitionDurationSec) * 1e3;
14
14
  }
15
15
  const createCSSTransition = (start) => async (element, direction, animated, signal, context) => {
16
- const endFn = start(element, direction, animated, context) ?? func.noop;
16
+ const endFn = start(element, direction, animated, context) ?? utils_func.noop;
17
17
  if (utils_directive.isBrowserHTMLElement(element) && animated && hasTransition(element)) {
18
18
  const abort = promise.promiseFromEvent(signal, "abort");
19
19
  const transitionEnd = promise.promiseFromEvent(element, "transitionend");
@@ -1,6 +1,6 @@
1
- import { i as isBrowserHTMLElement } from "../../directive-DrDJkTS5.js";
2
- import { n as noop } from "../../func-DR0n-ShK.js";
3
- import { a as promiseFromEvent, b as promiseFromTimeout } from "../../promise-CY2U8bTP.js";
1
+ import { i as isBrowserHTMLElement } from "../../dom-BB9jLllr.js";
2
+ import { noop } from "../../utils/func.js";
3
+ import { a as promiseFromEvent, b as promiseFromTimeout } from "../../promise-CBh_HbSK.js";
4
4
  function hasTransition(element) {
5
5
  return window.getComputedStyle(element).transitionProperty !== "none";
6
6
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const services_transitions_cssTransitions = require("./cssTransitions.cjs");
4
- const utils_directive = require("../../directive-BtOvPrmt.cjs");
4
+ const utils_directive = require("../../dom-CuBx1JPZ.cjs");
5
5
  const createSimpleClassTransition = (config) => {
6
6
  const { animationPendingClasses, animationPendingShowClasses, animationPendingHideClasses, showClasses, hideClasses } = config;
7
7
  return services_transitions_cssTransitions.createCSSTransition((element, direction, animated, context) => {
@@ -1,5 +1,5 @@
1
1
  import { createCSSTransition } from "./cssTransitions.js";
2
- import { v as removeClasses, w as addClasses, x as reflow } from "../../directive-DrDJkTS5.js";
2
+ import { v as removeClasses, w as addClasses, x as reflow } from "../../dom-BB9jLllr.js";
3
3
  const createSimpleClassTransition = (config) => {
4
4
  const { animationPendingClasses, animationPendingShowClasses, animationPendingHideClasses, showClasses, hideClasses } = config;
5
5
  return createCSSTransition((element, direction, animated, context) => {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const tansu = require("@amadeus-it-group/tansu");
3
- const utils_directive = require("./directive-BtOvPrmt.cjs");
4
- const func = require("./func-Qd3cD9a3.cjs");
3
+ const utils_directive = require("./dom-CuBx1JPZ.cjs");
4
+ const utils_func = require("./utils/func.cjs");
5
5
  const utils_stores = require("./utils/stores.cjs");
6
6
  const utils_writables = require("./writables-BPAJvaL_.cjs");
7
7
  const services_resizeObserver = require("./services/resizeObserver.cjs");
@@ -27,10 +27,13 @@ const defaultSliderConfig = {
27
27
  ariaLabel: () => "Value",
28
28
  ariaLabelledBy: () => "",
29
29
  ariaValueText: () => "",
30
- onValuesChange: func.noop,
30
+ onValuesChange: utils_func.noop,
31
31
  values: [0],
32
32
  showValueLabels: true,
33
33
  showMinMaxLabels: true,
34
+ showTicks: false,
35
+ showTickValues: true,
36
+ tickInterval: 0,
34
37
  rtl: false
35
38
  };
36
39
  function getSliderDefaultConfig() {
@@ -50,6 +53,9 @@ const configValidator = {
50
53
  values: utils_writables.typeArray,
51
54
  showValueLabels: utils_writables.typeBoolean,
52
55
  showMinMaxLabels: utils_writables.typeBoolean,
56
+ showTicks: utils_writables.typeBoolean,
57
+ showTickValues: utils_writables.typeBoolean,
58
+ tickInterval: utils_writables.typeNumberInRangeFactory(0, Infinity, { strict: true }),
53
59
  rtl: utils_writables.typeBoolean,
54
60
  className: utils_writables.typeString
55
61
  };
@@ -100,6 +106,9 @@ function createSlider(config) {
100
106
  onValuesChange$,
101
107
  showValueLabels$,
102
108
  showMinMaxLabels$,
109
+ showTicks$,
110
+ showTickValues$,
111
+ tickInterval$,
103
112
  ...stateProps
104
113
  },
105
114
  patch
@@ -195,8 +204,9 @@ function createSlider(config) {
195
204
  const sortedValuesPercent$ = tansu.computed(() => [...valuesPercent$()].sort((a, b) => a - b));
196
205
  const minLabelWidth$ = tansu.computed(() => minLabelDomRect$().width / sliderDomRectSize$() * 100);
197
206
  const maxLabelWidth$ = tansu.computed(() => maxLabelDomRect$().width / sliderDomRectSize$() * 100);
207
+ const adjustedShowValueLabels$ = tansu.computed(() => showValueLabels$() && (!showTicks$() || !showTickValues$()));
198
208
  const minValueLabelDisplay$ = tansu.computed(() => {
199
- if (!showMinMaxLabels$()) {
209
+ if (!showMinMaxLabels$() || showTicks$() && showTickValues$()) {
200
210
  return false;
201
211
  } else if (!showValueLabels$()) {
202
212
  return true;
@@ -205,7 +215,7 @@ function createSlider(config) {
205
215
  return rtl$() ? !valuesPercent$().some((percent2) => 100 - percent2 > 100 - minLabelWidth - 1) : !valuesPercent$().some((percent2) => percent2 < minLabelWidth + 1);
206
216
  });
207
217
  const maxValueLabelDisplay$ = tansu.computed(() => {
208
- if (!showMinMaxLabels$()) {
218
+ if (!showMinMaxLabels$() || showTicks$() && showTickValues$()) {
209
219
  return false;
210
220
  } else if (!showValueLabels$()) {
211
221
  return true;
@@ -265,9 +275,48 @@ function createSlider(config) {
265
275
  }).slice(0, sortedValuesPercent.length - 1);
266
276
  }
267
277
  });
268
- const percentCompute = (value) => {
278
+ const computeTicks$ = tansu.computed(() => {
279
+ if (!showTicks$()) {
280
+ return [];
281
+ }
282
+ const vertical = vertical$();
269
283
  const min = min$();
270
- return (value - min) * 100 / (max$() - min);
284
+ const max = max$();
285
+ const rtl = rtl$();
286
+ const showTickValues = showTickValues$();
287
+ const tickInterval = tickInterval$() || stepSize$();
288
+ const tickArray = [];
289
+ const intStepSize = _intStepSize$();
290
+ const decimalPrecision = _decimalPrecision$();
291
+ const positionCompute = (position) => {
292
+ return !!rtl !== !!vertical ? 100 - position : position;
293
+ };
294
+ for (let step = min; step < max; step += tickInterval) {
295
+ const cleanValue = computeCleanValue(step, min, max, intStepSize, decimalPrecision);
296
+ const stepPercent = percentCompute(cleanValue);
297
+ tickArray.push({ position: positionCompute(stepPercent), selected: false, value: cleanValue, displayLabel: showTickValues });
298
+ }
299
+ tickArray.push({ position: positionCompute(100), selected: false, value: max, displayLabel: showTickValues });
300
+ return tickArray;
301
+ });
302
+ const ticks$ = tansu.computed(() => {
303
+ const sortedValues = sortedValues$();
304
+ const isTickSelected = (value) => {
305
+ const isMultiHandle = sortedValues.length > 1;
306
+ const currentMax = isMultiHandle ? sortedValues[sortedValues.length - 1] : sortedValues[0];
307
+ const currentMin = isMultiHandle ? sortedValues[0] : 0;
308
+ return value <= currentMax && value >= currentMin;
309
+ };
310
+ return computeTicks$().map((tick) => {
311
+ return {
312
+ ...tick,
313
+ selected: isTickSelected(tick.value)
314
+ };
315
+ });
316
+ });
317
+ const percentCompute = (value) => {
318
+ const min = min$(), max = max$();
319
+ return (value - min) * 100 / (max - min);
271
320
  };
272
321
  const getClosestSliderHandle = (clickedPercent) => {
273
322
  const values = values$();
@@ -304,7 +353,7 @@ function createSlider(config) {
304
353
  class: stateProps.className$
305
354
  },
306
355
  classNames: {
307
- "au-slider": true,
356
+ "au-slider": utils_stores.true$,
308
357
  "au-slider-vertical": vertical$,
309
358
  "au-slider-horizontal": horizontal$,
310
359
  disabled: disabled$
@@ -318,6 +367,9 @@ function createSlider(config) {
318
367
  "au-slider-label-min": horizontal$,
319
368
  "au-slider-rtl": rtl$,
320
369
  invisible: tansu.computed(() => !minValueLabelDisplay$())
370
+ },
371
+ attributes: {
372
+ "aria-hidden": tansu.readable("true")
321
373
  }
322
374
  }));
323
375
  const maxLabelDirective = utils_directive.createAttributesDirective(() => ({
@@ -328,6 +380,9 @@ function createSlider(config) {
328
380
  "au-slider-label-max": horizontal$,
329
381
  "au-slider-rtl": rtl$,
330
382
  invisible: tansu.computed(() => !maxValueLabelDisplay$())
383
+ },
384
+ attributes: {
385
+ "aria-hidden": tansu.readable("true")
331
386
  }
332
387
  }));
333
388
  const handleEventsDirective = utils_directive.createAttributesDirective((handleContext$) => ({
@@ -400,7 +455,6 @@ function createSlider(config) {
400
455
  }
401
456
  },
402
457
  touchstart: (event) => {
403
- event.preventDefault();
404
458
  const handleDrag = (e) => {
405
459
  e.preventDefault();
406
460
  const newCoord = vertical$() ? e.touches[0].clientY : e.touches[0].clientX;
@@ -450,9 +504,11 @@ function createSlider(config) {
450
504
  combinedLabelPositionTop$,
451
505
  progressDisplayOptions$,
452
506
  handleDisplayOptions$,
453
- showValueLabels$,
507
+ showValueLabels$: adjustedShowValueLabels$,
454
508
  showMinMaxLabels$,
509
+ showTicks$,
455
510
  rtl$,
511
+ ticks$,
456
512
  ...stateProps
457
513
  }),
458
514
  patch,
@@ -469,7 +525,7 @@ function createSlider(config) {
469
525
  height: tansu.computed(() => percent(progressContext$().option.height))
470
526
  },
471
527
  classNames: {
472
- "au-slider-progress": true
528
+ "au-slider-progress": utils_stores.true$
473
529
  }
474
530
  })),
475
531
  clickableAreaDirective: utils_directive.createAttributesDirective(() => ({
@@ -480,7 +536,8 @@ function createSlider(config) {
480
536
  },
481
537
  classNames: {
482
538
  "au-slider-clickable-area": horizontal$,
483
- "au-slider-clickable-area-vertical": vertical$
539
+ "au-slider-clickable-area-vertical": vertical$,
540
+ "au-slider-clickable-area-with-ticks": tansu.computed(() => showTicks$() && tickInterval$() === 0)
484
541
  }
485
542
  })),
486
543
  handleEventsDirective,
@@ -488,7 +545,7 @@ function createSlider(config) {
488
545
  handleEventsDirective,
489
546
  utils_directive.createAttributesDirective((handleContext$) => ({
490
547
  attributes: {
491
- role: "slider",
548
+ role: tansu.readable("slider"),
492
549
  "aria-valuemin": min$,
493
550
  "aria-valuemax": max$,
494
551
  "aria-valuenow": tansu.computed(() => handleContext$().item.value),
@@ -505,7 +562,7 @@ function createSlider(config) {
505
562
  top: tansu.computed(() => percent(handleDisplayOptions$()[handleContext$().item.id].top))
506
563
  },
507
564
  classNames: {
508
- "au-slider-handle": true,
565
+ "au-slider-handle": utils_stores.true$,
509
566
  "au-slider-handle-vertical": vertical$,
510
567
  "au-slider-handle-horizontal": horizontal$
511
568
  }
@@ -523,6 +580,9 @@ function createSlider(config) {
523
580
  styles: {
524
581
  left: tansu.computed(() => percent(combinedLabelPositionLeft$())),
525
582
  top: tansu.computed(() => percent(combinedLabelPositionTop$()))
583
+ },
584
+ attributes: {
585
+ "aria-hidden": tansu.readable("true")
526
586
  }
527
587
  })),
528
588
  handleLabelDisplayDirective: utils_directive.createAttributesDirective((labelDisplayContext$) => ({
@@ -535,6 +595,41 @@ function createSlider(config) {
535
595
  styles: {
536
596
  left: tansu.computed(() => percent(handleDisplayOptions$()[labelDisplayContext$().index].left)),
537
597
  top: tansu.computed(() => percent(handleDisplayOptions$()[labelDisplayContext$().index].top))
598
+ },
599
+ attributes: {
600
+ "aria-hidden": tansu.readable("true")
601
+ }
602
+ })),
603
+ tickDirective: utils_directive.createAttributesDirective((tickContext$) => ({
604
+ classNames: {
605
+ "au-slider-tick": utils_stores.true$,
606
+ "au-slider-tick-horizontal": horizontal$,
607
+ "au-slider-tick-vertical": vertical$
608
+ },
609
+ styles: {
610
+ left: tansu.computed(() => vertical$() ? null : percent(tickContext$().tick.position)),
611
+ top: tansu.computed(() => vertical$() ? percent(tickContext$().tick.position) : null)
612
+ },
613
+ events: {
614
+ click: (event) => {
615
+ adjustCoordinate(vertical$() ? event.clientY : event.clientX);
616
+ }
617
+ },
618
+ attributes: {
619
+ "aria-hidden": tansu.readable("true")
620
+ }
621
+ })),
622
+ tickLabelDirective: utils_directive.createAttributesDirective((tickContext$) => ({
623
+ classNames: {
624
+ "au-slider-tick-label": utils_stores.true$,
625
+ "au-slider-tick-label-vertical": vertical$
626
+ },
627
+ styles: {
628
+ left: tansu.computed(() => vertical$() ? null : percent(tickContext$().tick.position)),
629
+ top: tansu.computed(() => vertical$() ? percent(tickContext$().tick.position) : null)
630
+ },
631
+ attributes: {
632
+ "aria-hidden": tansu.readable("true")
538
633
  }
539
634
  }))
540
635
  }