@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
@@ -2,9 +2,9 @@
2
2
  const utils_stores = require("./utils/stores.cjs");
3
3
  const services_transitions_baseTransitions = require("./services/transitions/baseTransitions.cjs");
4
4
  const tansu = require("@amadeus-it-group/tansu");
5
- const func = require("./func-Qd3cD9a3.cjs");
5
+ const utils_func = require("./utils/func.cjs");
6
6
  const utils_writables = require("./writables-BPAJvaL_.cjs");
7
- const utils_directive = require("./directive-BtOvPrmt.cjs");
7
+ const utils_directive = require("./dom-CuBx1JPZ.cjs");
8
8
  function adjustItemsCloseOthers(items, openItems, oldOpen) {
9
9
  let keepOpen;
10
10
  if (openItems.length == 2) {
@@ -27,13 +27,12 @@ function getItem(items, id) {
27
27
  }
28
28
  const defaultAccordionConfig = {
29
29
  closeOthers: false,
30
- onItemShown: func.noop,
31
- onItemHidden: func.noop,
30
+ onItemShown: utils_func.noop,
31
+ onItemHidden: utils_func.noop,
32
32
  className: "",
33
33
  itemDestroyOnHide: true,
34
34
  itemAnimated: true,
35
- itemTransition: async () => {
36
- },
35
+ itemTransition: utils_func.noop,
37
36
  itemHeadingTag: "",
38
37
  itemClassName: "",
39
38
  itemHeaderClassName: "",
@@ -48,9 +47,9 @@ const defaultItemConfig = {
48
47
  visible: false,
49
48
  animated: defaultAccordionConfig.itemAnimated,
50
49
  transition: defaultAccordionConfig.itemTransition,
51
- onShown: func.noop,
52
- onHidden: func.noop,
53
- onVisibleChange: func.noop,
50
+ onShown: utils_func.noop,
51
+ onHidden: utils_func.noop,
52
+ onVisibleChange: utils_func.noop,
54
53
  className: defaultAccordionConfig.itemClassName,
55
54
  headerClassName: defaultAccordionConfig.itemHeaderClassName,
56
55
  buttonClassName: defaultAccordionConfig.itemButtonClassName,
@@ -115,8 +114,7 @@ function createAccordionItem(config) {
115
114
  patch
116
115
  ] = utils_stores.writablesForProps(defaultItemConfig, config, configItemValidator);
117
116
  const initDone$ = tansu.writable(false);
118
- const _autoId$ = tansu.computed(() => utils_directive.generateId());
119
- const id$ = tansu.computed(() => _dirtyId$() || _autoId$());
117
+ const id$ = utils_stores.idWithDefault(_dirtyId$);
120
118
  const transition = services_transitions_baseTransitions.createTransition({
121
119
  props: {
122
120
  transition: transition$,
@@ -155,7 +153,7 @@ function createAccordionItem(config) {
155
153
  const bodyContainerAttrsDirective = utils_directive.createAttributesDirective(() => ({
156
154
  attributes: {
157
155
  id: tansu.computed(() => `${id$()}-body-container`),
158
- class: bodyContainerClassName$(),
156
+ class: bodyContainerClassName$,
159
157
  "aria-labelledby": tansu.computed(() => `${id$()}-toggle`)
160
158
  }
161
159
  }));
@@ -192,17 +190,17 @@ function createAccordionItem(config) {
192
190
  toggleDirective,
193
191
  utils_directive.createAttributesDirective(() => ({
194
192
  attributes: {
195
- type: "button",
196
- class: buttonClassName$()
193
+ type: tansu.readable("button"),
194
+ class: buttonClassName$
197
195
  }
198
196
  }))
199
197
  ),
200
- headerDirective: utils_directive.createAttributesDirective(() => ({ attributes: { class: headerClassName$() } })),
201
- bodyDirective: utils_directive.createAttributesDirective(() => ({ attributes: { class: bodyClassName$() } })),
198
+ headerDirective: utils_directive.createAttributesDirective(() => ({ attributes: { class: headerClassName$ } })),
199
+ bodyDirective: utils_directive.createAttributesDirective(() => ({ attributes: { class: bodyClassName$ } })),
202
200
  transitionDirective,
203
201
  bodyContainerAttrsDirective,
204
202
  bodyContainerDirective: utils_directive.mergeDirectives(transitionDirective, bodyContainerAttrsDirective),
205
- itemDirective: func.noop
203
+ itemDirective: utils_func.noop
206
204
  }
207
205
  };
208
206
  }
@@ -305,7 +303,7 @@ function factoryCreateAccordion(itemFactory = createAccordionItem, accordionItem
305
303
  directives: {
306
304
  accordionDirective: utils_directive.mergeDirectives(
307
305
  utils_directive.directiveSubscribe(action$),
308
- utils_directive.createAttributesDirective(() => ({ attributes: { class: className$() }, classNames: { "au-accordion": true } }))
306
+ utils_directive.createAttributesDirective(() => ({ attributes: { class: className$ }, classNames: { "au-accordion": utils_stores.true$ } }))
309
307
  )
310
308
  }
311
309
  };
@@ -1,9 +1,9 @@
1
- import { writablesForProps, stateStores, mergeConfigStores, normalizeConfigStores } from "./utils/stores.js";
1
+ import { writablesForProps, idWithDefault, stateStores, mergeConfigStores, normalizeConfigStores, true$ } from "./utils/stores.js";
2
2
  import { createTransition } from "./services/transitions/baseTransitions.js";
3
3
  import { writable, computed, asWritable, readable } from "@amadeus-it-group/tansu";
4
- import { n as noop } from "./func-DR0n-ShK.js";
5
- import { c as typeBoolean, f as typeFunction, e as typeString } from "./writables-DCiBdIBK.js";
6
- import { t as generateId, k as mergeDirectives, n as createAttributesDirective, r as registrationArray, d as directiveSubscribe } from "./directive-DrDJkTS5.js";
4
+ import { noop } from "./utils/func.js";
5
+ import { e as typeString, f as typeFunction, c as typeBoolean } from "./writables-DCiBdIBK.js";
6
+ import { k as mergeDirectives, n as createAttributesDirective, r as registrationArray, d as directiveSubscribe } from "./dom-gfxqXJpK.js";
7
7
  function adjustItemsCloseOthers(items, openItems, oldOpen) {
8
8
  let keepOpen;
9
9
  if (openItems.length == 2) {
@@ -31,8 +31,7 @@ const defaultAccordionConfig = {
31
31
  className: "",
32
32
  itemDestroyOnHide: true,
33
33
  itemAnimated: true,
34
- itemTransition: async () => {
35
- },
34
+ itemTransition: noop,
36
35
  itemHeadingTag: "",
37
36
  itemClassName: "",
38
37
  itemHeaderClassName: "",
@@ -114,8 +113,7 @@ function createAccordionItem(config) {
114
113
  patch
115
114
  ] = writablesForProps(defaultItemConfig, config, configItemValidator);
116
115
  const initDone$ = writable(false);
117
- const _autoId$ = computed(() => generateId());
118
- const id$ = computed(() => _dirtyId$() || _autoId$());
116
+ const id$ = idWithDefault(_dirtyId$);
119
117
  const transition = createTransition({
120
118
  props: {
121
119
  transition: transition$,
@@ -154,7 +152,7 @@ function createAccordionItem(config) {
154
152
  const bodyContainerAttrsDirective = createAttributesDirective(() => ({
155
153
  attributes: {
156
154
  id: computed(() => `${id$()}-body-container`),
157
- class: bodyContainerClassName$(),
155
+ class: bodyContainerClassName$,
158
156
  "aria-labelledby": computed(() => `${id$()}-toggle`)
159
157
  }
160
158
  }));
@@ -191,13 +189,13 @@ function createAccordionItem(config) {
191
189
  toggleDirective,
192
190
  createAttributesDirective(() => ({
193
191
  attributes: {
194
- type: "button",
195
- class: buttonClassName$()
192
+ type: readable("button"),
193
+ class: buttonClassName$
196
194
  }
197
195
  }))
198
196
  ),
199
- headerDirective: createAttributesDirective(() => ({ attributes: { class: headerClassName$() } })),
200
- bodyDirective: createAttributesDirective(() => ({ attributes: { class: bodyClassName$() } })),
197
+ headerDirective: createAttributesDirective(() => ({ attributes: { class: headerClassName$ } })),
198
+ bodyDirective: createAttributesDirective(() => ({ attributes: { class: bodyClassName$ } })),
201
199
  transitionDirective,
202
200
  bodyContainerAttrsDirective,
203
201
  bodyContainerDirective: mergeDirectives(transitionDirective, bodyContainerAttrsDirective),
@@ -304,7 +302,7 @@ function factoryCreateAccordion(itemFactory = createAccordionItem, accordionItem
304
302
  directives: {
305
303
  accordionDirective: mergeDirectives(
306
304
  directiveSubscribe(action$),
307
- createAttributesDirective(() => ({ attributes: { class: className$() }, classNames: { "au-accordion": true } }))
305
+ createAttributesDirective(() => ({ attributes: { class: className$ }, classNames: { "au-accordion": true$ } }))
308
306
  )
309
307
  }
310
308
  };
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const common = require("./common-DvPjK7SS.cjs");
2
+ const common = require("./common-CcQOJ_hf.cjs");
3
3
  function getAlertDefaultConfig() {
4
4
  return { ...common.getCommonAlertDefaultConfig() };
5
5
  }
@@ -1,4 +1,4 @@
1
- import { g as getCommonAlertDefaultConfig, c as createCommonAlert } from "./common-Banw3FYN.js";
1
+ import { c as createCommonAlert, g as getCommonAlertDefaultConfig } from "./common-Bffx1jJO.js";
2
2
  function getAlertDefaultConfig() {
3
3
  return { ...getCommonAlertDefaultConfig() };
4
4
  }
@@ -1,7 +1,7 @@
1
1
  import { createTransition } from "./services/transitions/baseTransitions.js";
2
- import { n as noop } from "./func-DR0n-ShK.js";
2
+ import { noop } from "./utils/func.js";
3
3
  import { writablesForProps, stateStores } from "./utils/stores.js";
4
- import { c as typeBoolean, f as typeFunction, e as typeString } from "./writables-DCiBdIBK.js";
4
+ import { e as typeString, c as typeBoolean, f as typeFunction } from "./writables-DCiBdIBK.js";
5
5
  const defaultCommonAlertConfig = {
6
6
  visible: true,
7
7
  dismissible: true,
@@ -11,8 +11,7 @@ const defaultCommonAlertConfig = {
11
11
  onHidden: noop,
12
12
  animated: true,
13
13
  animatedOnInit: false,
14
- transition: async () => {
15
- },
14
+ transition: noop,
16
15
  className: ""
17
16
  };
18
17
  function getCommonAlertDefaultConfig() {
@@ -1,19 +1,18 @@
1
1
  "use strict";
2
2
  const services_transitions_baseTransitions = require("./services/transitions/baseTransitions.cjs");
3
- const func = require("./func-Qd3cD9a3.cjs");
3
+ const utils_func = require("./utils/func.cjs");
4
4
  const utils_stores = require("./utils/stores.cjs");
5
5
  const utils_writables = require("./writables-BPAJvaL_.cjs");
6
6
  const defaultCommonAlertConfig = {
7
7
  visible: true,
8
8
  dismissible: true,
9
9
  ariaCloseButtonLabel: "Close",
10
- onVisibleChange: func.noop,
11
- onShown: func.noop,
12
- onHidden: func.noop,
10
+ onVisibleChange: utils_func.noop,
11
+ onShown: utils_func.noop,
12
+ onHidden: utils_func.noop,
13
13
  animated: true,
14
14
  animatedOnInit: false,
15
- transition: async () => {
16
- },
15
+ transition: utils_func.noop,
17
16
  className: ""
18
17
  };
19
18
  function getCommonAlertDefaultConfig() {
@@ -50,7 +50,7 @@ export interface AccordionProps extends WidgetsCommonPropsAndState {
50
50
  *
51
51
  * @defaultValue
52
52
  * ```ts
53
- * async () => {}
53
+ * () => {}
54
54
  * ```
55
55
  */
56
56
  itemTransition: TransitionFn;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const accordion = require("../../accordion-CJxsVQtv.cjs");
3
+ const accordion = require("../../accordion-DTQj-TQ1.cjs");
4
4
  exports.createAccordion = accordion.createAccordion;
5
5
  exports.createAccordionItem = accordion.createAccordionItem;
6
6
  exports.factoryCreateAccordion = accordion.factoryCreateAccordion;
@@ -1,4 +1,4 @@
1
- import { a, c, f, g } from "../../accordion-D0oG0wQD.js";
1
+ import { a, c, f, g } from "../../accordion-OTiJtxDi.js";
2
2
  export {
3
3
  a as createAccordion,
4
4
  c as createAccordionItem,
@@ -72,7 +72,7 @@ export interface CommonAlertProps extends CommonAlertCommonPropsAndState {
72
72
  *
73
73
  * @defaultValue
74
74
  * ```ts
75
- * async () => {}
75
+ * () => {}
76
76
  * ```
77
77
  */
78
78
  transition: TransitionFn;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const alert = require("../../alert-Bq101evB.cjs");
3
+ const alert = require("../../alert-BrVkxOnA.cjs");
4
4
  exports.createAlert = alert.createAlert;
5
5
  exports.getAlertDefaultConfig = alert.getAlertDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../alert-DJ2l7bcA.js";
1
+ import { c, g } from "../../alert-DH-mO6WX.js";
2
2
  export {
3
3
  c as createAlert,
4
4
  g as getAlertDefaultConfig
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const modal = require("../../modal-DtzgRa5j.cjs");
3
+ const modal = require("../../modal-B7bYoubx.cjs");
4
4
  exports.createModal = modal.createModal;
5
5
  exports.getModalDefaultConfig = modal.getModalDefaultConfig;
6
6
  exports.modalCloseButtonClick = modal.modalCloseButtonClick;
@@ -1,4 +1,4 @@
1
- import { c, g, a, m } from "../../modal-Qr4sHBFG.js";
1
+ import { c, g, a, m } from "../../modal-85Sw8xuV.js";
2
2
  export {
3
3
  c as createModal,
4
4
  g as getModalDefaultConfig,
@@ -88,7 +88,7 @@ export interface ModalProps extends ModalCommonPropsAndState {
88
88
  *
89
89
  * @defaultValue
90
90
  * ```ts
91
- * async () => {}
91
+ * () => {}
92
92
  * ```
93
93
  */
94
94
  backdropTransition: TransitionFn;
@@ -103,7 +103,7 @@ export interface ModalProps extends ModalCommonPropsAndState {
103
103
  *
104
104
  * @defaultValue
105
105
  * ```ts
106
- * async () => {}
106
+ * () => {}
107
107
  * ```
108
108
  */
109
109
  modalTransition: TransitionFn;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const pagination = require("../../pagination-ETXueztI.cjs");
3
+ const pagination = require("../../pagination-5YARuB3V.cjs");
4
4
  exports.createPagination = pagination.createPagination;
5
5
  exports.getPaginationDefaultConfig = pagination.getPaginationDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../pagination-BigQwc8I.js";
1
+ import { c, g } from "../../pagination-4g3N8ktf.js";
2
2
  export {
3
3
  c as createPagination,
4
4
  g as getPaginationDefaultConfig
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const progressbar = require("../../progressbar-BSgE9udi.cjs");
3
+ const progressbar = require("../../progressbar-BpSrg4HG.cjs");
4
4
  exports.createProgressbar = progressbar.createProgressbar;
5
5
  exports.getProgressbarDefaultConfig = progressbar.getProgressbarDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../progressbar-arTsTc5c.js";
1
+ import { c, g } from "../../progressbar-BoJsBPH1.js";
2
2
  export {
3
3
  c as createProgressbar,
4
4
  g as getProgressbarDefaultConfig
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const rating = require("../../rating-BV6lk1US.cjs");
3
+ const rating = require("../../rating-C8tn9xTO.cjs");
4
4
  exports.createRating = rating.createRating;
5
5
  exports.getRatingDefaultConfig = rating.getRatingDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../rating-CGv-KO_P.js";
1
+ import { c, g } from "../../rating-B3xktzOf.js";
2
2
  export {
3
3
  c as createRating,
4
4
  g as getRatingDefaultConfig
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const select = require("../../select-C6gwSGbr.cjs");
3
+ const select = require("../../select-D1pBz4CM.cjs");
4
4
  exports.createSelect = select.createSelect;
5
5
  exports.getSelectDefaultConfig = select.getSelectDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../select-C5DIoZrO.js";
1
+ import { c, g } from "../../select-C-77MJfC.js";
2
2
  export {
3
3
  c as createSelect,
4
4
  g as getSelectDefaultConfig
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const slider = require("../../slider-CkYsilwM.cjs");
3
+ const slider = require("../../slider-B2JFXDLt.cjs");
4
4
  exports.createSlider = slider.createSlider;
5
5
  exports.getSliderDefaultConfig = slider.getSliderDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../slider-DtQrcvim.js";
1
+ import { c, g } from "../../slider-Cs69pziL.js";
2
2
  export {
3
3
  c as createSlider,
4
4
  g as getSliderDefaultConfig
@@ -71,6 +71,35 @@ export interface SliderHandle {
71
71
  */
72
72
  ariaLabelledBy: string | undefined;
73
73
  }
74
+ /**
75
+ * Represents a tick in a slider component.
76
+ */
77
+ export interface SliderTick {
78
+ /**
79
+ * CSS classes to be applied on the tick
80
+ */
81
+ className?: string | null;
82
+ /**
83
+ * Visualized optional explanation of the label
84
+ */
85
+ legend?: string | null;
86
+ /**
87
+ * Position of the tick in percent
88
+ */
89
+ position: number;
90
+ /**
91
+ * If `true` the tick has selected style
92
+ */
93
+ selected: boolean;
94
+ /**
95
+ * Value of the tick
96
+ */
97
+ value: number;
98
+ /**
99
+ * If `true` the tick label is displayed
100
+ */
101
+ displayLabel: boolean;
102
+ }
74
103
  interface SliderCommonPropsAndState extends WidgetsCommonPropsAndState {
75
104
  /**
76
105
  * Minimum value that can be assigned to the slider
@@ -126,6 +155,12 @@ interface SliderCommonPropsAndState extends WidgetsCommonPropsAndState {
126
155
  * @defaultValue `true`
127
156
  */
128
157
  showMinMaxLabels: boolean;
158
+ /**
159
+ * If `true` the ticks are displayed on the slider
160
+ *
161
+ * @defaultValue `false`
162
+ */
163
+ showTicks: boolean;
129
164
  /**
130
165
  * It `true` slider display is inversed
131
166
  *
@@ -177,6 +212,10 @@ export interface SliderState extends SliderCommonPropsAndState {
177
212
  * Check if the slider is interactive, meaning it is not disabled or readonly
178
213
  */
179
214
  interactive: boolean;
215
+ /**
216
+ * Array of ticks to display on the slider component
217
+ */
218
+ ticks: SliderTick[];
180
219
  }
181
220
  /**
182
221
  * Interface representing the properties for the Slider component.
@@ -224,6 +263,19 @@ export interface SliderProps extends SliderCommonPropsAndState {
224
263
  * ```
225
264
  */
226
265
  onValuesChange: (values: number[]) => void;
266
+ /**
267
+ * Unit value between the ticks
268
+ * If value is set to `0` the {@link stepSize} is used to space the ticks
269
+ *
270
+ * @defaultValue `0`
271
+ */
272
+ tickInterval: number;
273
+ /**
274
+ * If `true` the tick values are displayed on the slider
275
+ *
276
+ * @defaultValue `true`
277
+ */
278
+ showTickValues: boolean;
227
279
  }
228
280
  /**
229
281
  * Interface representing various directives used in the slider component.
@@ -275,6 +327,18 @@ export interface SliderDirectives {
275
327
  handleLabelDisplayDirective: Directive<{
276
328
  index: number;
277
329
  }>;
330
+ /**
331
+ * Directive to apply to the slider tick
332
+ */
333
+ tickDirective: Directive<{
334
+ tick: SliderTick;
335
+ }>;
336
+ /**
337
+ * Directive to apply to the slider tick label
338
+ */
339
+ tickLabelDirective: Directive<{
340
+ tick: SliderTick;
341
+ }>;
278
342
  }
279
343
  /**
280
344
  * Represents a slider widget component.
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const toast = require("../../toast-Vku2ZxoN.cjs");
3
+ const toast = require("../../toast-CaIcB2sD.cjs");
4
4
  exports.createToast = toast.createToast;
5
5
  exports.getToastDefaultConfig = toast.getToastDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../toast-4f-ZdK1Y.js";
1
+ import { c, g } from "../../toast-4HGIz3Bu.js";
2
2
  export {
3
3
  c as createToast,
4
4
  g as getToastDefaultConfig
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const tree = require("../../tree-BaSMyGyv.cjs");
3
+ const tree = require("../../tree-D4t2SOql.cjs");
4
4
  exports.createTree = tree.createTree;
5
5
  exports.getTreeDefaultConfig = tree.getTreeDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../tree-DVsZP8ze.js";
1
+ import { c, g } from "../../tree-C_goOyCv.js";
2
2
  export {
3
3
  c as createTree,
4
4
  g as getTreeDefaultConfig
package/config.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 func = require("./func-Qd3cD9a3.cjs");
4
+ const utils_func = require("./utils/func.cjs");
5
5
  const mergeInto = (destination, source, levels = Infinity) => {
6
6
  if (source !== void 0) {
7
7
  if (typeof source === "object" && source && levels >= 1) {
@@ -19,9 +19,9 @@ const mergeInto = (destination, source, levels = Infinity) => {
19
19
  }
20
20
  return destination;
21
21
  };
22
- const createWidgetsConfig = (parent$, adaptParentConfig = func.identity) => {
22
+ const createWidgetsConfig = (parent$, adaptParentConfig = utils_func.identity) => {
23
23
  const own$ = tansu.writable({});
24
- const adaptedParent$ = adaptParentConfig === func.identity ? parent$ : tansu.computed(() => adaptParentConfig(mergeInto({}, parent$ == null ? void 0 : parent$(), 2)));
24
+ const adaptedParent$ = adaptParentConfig === utils_func.identity ? parent$ : tansu.computed(() => adaptParentConfig(mergeInto({}, parent$ == null ? void 0 : parent$(), 2)));
25
25
  return tansu.asWritable(
26
26
  tansu.computed(() => mergeInto(mergeInto({}, adaptedParent$ == null ? void 0 : adaptedParent$(), 2), own$(), 2)),
27
27
  {
package/config.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { writable, computed, asWritable } from "@amadeus-it-group/tansu";
2
- import { i as identity } from "./func-DR0n-ShK.js";
2
+ import { identity } from "./utils/func.js";
3
3
  const mergeInto = (destination, source, levels = Infinity) => {
4
4
  if (source !== void 0) {
5
5
  if (typeof source === "object" && source && levels >= 1) {