@agnos-ui/core-bootstrap 0.8.0-next.0 → 0.8.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 (39) hide show
  1. package/{accordion-Dy6WokG3.js → accordion-fxxgzVzz.js} +1 -1
  2. package/carousel-BR8jjX02.js +86 -0
  3. package/carousel-DxBhqvpX.cjs +85 -0
  4. package/collapse-DgIqRvXl.js +88 -0
  5. package/collapse-klnTiwop.cjs +87 -0
  6. package/components/accordion/index.js +1 -1
  7. package/components/carousel/carousel.d.ts +132 -0
  8. package/components/carousel/index.cjs +12 -0
  9. package/components/carousel/index.d.ts +1 -0
  10. package/components/carousel/index.js +6 -0
  11. package/components/collapse/index.cjs +1 -1
  12. package/components/collapse/index.js +1 -1
  13. package/components/progressbar/index.js +1 -1
  14. package/components/toast/index.cjs +2 -1
  15. package/components/toast/index.js +3 -2
  16. package/components/toast/toast.d.ts +15 -0
  17. package/config.d.ts +5 -0
  18. package/css/agnosui.css +54 -0
  19. package/css/agnosui.css.map +1 -1
  20. package/css/carousel.css +16 -0
  21. package/css/carousel.css.map +1 -0
  22. package/css/slider.css +31 -0
  23. package/css/slider.css.map +1 -1
  24. package/css/toaster.css +9 -0
  25. package/css/toaster.css.map +1 -0
  26. package/index.cjs +13 -2
  27. package/index.d.ts +1 -0
  28. package/index.js +12 -7
  29. package/package.json +4 -2
  30. package/{progressbar-D9S5NLpS.js → progressbar-DcUv6Lh4.js} +1 -1
  31. package/scss/_variables.scss +1 -0
  32. package/scss/agnosui.scss +2 -0
  33. package/scss/carousel.scss +14 -0
  34. package/scss/slider.scss +40 -0
  35. package/scss/toaster.scss +7 -0
  36. package/{toast-BYDfN1cI.cjs → toast-C4gj0rX-.cjs} +12 -0
  37. package/{toast-D-by8Hwt.js → toast-Dggjpjqk.js} +13 -1
  38. package/collapse-CSP8JFq-.cjs +0 -650
  39. package/collapse-DJJ1jB2v.js +0 -651
@@ -1,4 +1,4 @@
1
- import { getAccordionDefaultConfig as getAccordionDefaultConfig$1, createAccordionItem as createAccordionItem$1, factoryCreateAccordion } from "@agnos-ui/core/components/accordion";
1
+ import { factoryCreateAccordion, createAccordionItem as createAccordionItem$1, getAccordionDefaultConfig as getAccordionDefaultConfig$1 } from "@agnos-ui/core/components/accordion";
2
2
  import { c as collapseVerticalTransition } from "./collapse-CVjUhnIz.js";
3
3
  import { extendWidgetProps } from "@agnos-ui/core/services/extendWidget";
4
4
  import { noop } from "@agnos-ui/core/utils/func";
@@ -0,0 +1,86 @@
1
+ import { getCarouselDefaultConfig as getCarouselDefaultConfig$1, createCarousel as createCarousel$1 } from "@agnos-ui/core/components/carousel";
2
+ import { true$ } from "@agnos-ui/core/utils/stores";
3
+ import { readable, computed } from "@amadeus-it-group/tansu";
4
+ import { createAttributesDirective, mergeDirectives } from "@agnos-ui/core/utils/directive";
5
+ import { extendWidgetProps } from "@agnos-ui/core/services/extendWidget";
6
+ import { typeString, typeArray } from "@agnos-ui/core/utils/writables";
7
+ const defaultConfigExtraProps = {
8
+ className: "",
9
+ containerClass: "",
10
+ slideClass: "",
11
+ slidesData: [],
12
+ structure: void 0,
13
+ navigation: void 0,
14
+ slide: void 0,
15
+ ariaLive: "polite"
16
+ };
17
+ const configValidator = {
18
+ className: typeString,
19
+ containerClass: typeString,
20
+ slideClass: void 0,
21
+ slidesData: typeArray,
22
+ structure: void 0,
23
+ navigation: void 0,
24
+ slide: void 0,
25
+ ariaLive: typeString
26
+ };
27
+ const coreOverride = {
28
+ container: ".au-carousel-container"
29
+ };
30
+ function getCarouselDefaultConfig() {
31
+ return { ...getCarouselDefaultConfig$1(), ...defaultConfigExtraProps };
32
+ }
33
+ function createCarousel(config) {
34
+ const widget = extendWidgetProps(createCarousel$1, defaultConfigExtraProps, configValidator, coreOverride)(config);
35
+ return {
36
+ ...widget,
37
+ directives: {
38
+ ...widget.directives,
39
+ root: mergeDirectives(
40
+ widget.directives.root,
41
+ createAttributesDirective(() => ({
42
+ classNames: {
43
+ carousel: true$
44
+ },
45
+ attributes: {
46
+ class: widget.stores.className$
47
+ }
48
+ }))
49
+ ),
50
+ slide: mergeDirectives(
51
+ widget.directives.slide,
52
+ createAttributesDirective((slideData$) => ({
53
+ attributes: {
54
+ class: computed(() => {
55
+ const slideClass = widget.stores.slideClass$();
56
+ if (typeof slideClass === "function") {
57
+ const slideData = slideData$();
58
+ return slideClass({
59
+ id: slideData.id,
60
+ index: slideData.index,
61
+ active: slideData.index === widget.stores.selectedScrollSnap$()
62
+ });
63
+ } else {
64
+ return slideClass;
65
+ }
66
+ })
67
+ }
68
+ }))
69
+ ),
70
+ container: createAttributesDirective(() => ({
71
+ classNames: {
72
+ "au-carousel-container": true$
73
+ },
74
+ attributes: {
75
+ class: widget.stores.containerClass$,
76
+ "aria-atomic": readable("false"),
77
+ "aria-live": widget.stores.ariaLive$
78
+ }
79
+ }))
80
+ }
81
+ };
82
+ }
83
+ export {
84
+ createCarousel as c,
85
+ getCarouselDefaultConfig as g
86
+ };
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ const carousel = require("@agnos-ui/core/components/carousel");
3
+ const stores = require("@agnos-ui/core/utils/stores");
4
+ const tansu = require("@amadeus-it-group/tansu");
5
+ const directive = require("@agnos-ui/core/utils/directive");
6
+ const extendWidget = require("@agnos-ui/core/services/extendWidget");
7
+ const writables = require("@agnos-ui/core/utils/writables");
8
+ const defaultConfigExtraProps = {
9
+ className: "",
10
+ containerClass: "",
11
+ slideClass: "",
12
+ slidesData: [],
13
+ structure: void 0,
14
+ navigation: void 0,
15
+ slide: void 0,
16
+ ariaLive: "polite"
17
+ };
18
+ const configValidator = {
19
+ className: writables.typeString,
20
+ containerClass: writables.typeString,
21
+ slideClass: void 0,
22
+ slidesData: writables.typeArray,
23
+ structure: void 0,
24
+ navigation: void 0,
25
+ slide: void 0,
26
+ ariaLive: writables.typeString
27
+ };
28
+ const coreOverride = {
29
+ container: ".au-carousel-container"
30
+ };
31
+ function getCarouselDefaultConfig() {
32
+ return { ...carousel.getCarouselDefaultConfig(), ...defaultConfigExtraProps };
33
+ }
34
+ function createCarousel(config) {
35
+ const widget = extendWidget.extendWidgetProps(carousel.createCarousel, defaultConfigExtraProps, configValidator, coreOverride)(config);
36
+ return {
37
+ ...widget,
38
+ directives: {
39
+ ...widget.directives,
40
+ root: directive.mergeDirectives(
41
+ widget.directives.root,
42
+ directive.createAttributesDirective(() => ({
43
+ classNames: {
44
+ carousel: stores.true$
45
+ },
46
+ attributes: {
47
+ class: widget.stores.className$
48
+ }
49
+ }))
50
+ ),
51
+ slide: directive.mergeDirectives(
52
+ widget.directives.slide,
53
+ directive.createAttributesDirective((slideData$) => ({
54
+ attributes: {
55
+ class: tansu.computed(() => {
56
+ const slideClass = widget.stores.slideClass$();
57
+ if (typeof slideClass === "function") {
58
+ const slideData = slideData$();
59
+ return slideClass({
60
+ id: slideData.id,
61
+ index: slideData.index,
62
+ active: slideData.index === widget.stores.selectedScrollSnap$()
63
+ });
64
+ } else {
65
+ return slideClass;
66
+ }
67
+ })
68
+ }
69
+ }))
70
+ ),
71
+ container: directive.createAttributesDirective(() => ({
72
+ classNames: {
73
+ "au-carousel-container": stores.true$
74
+ },
75
+ attributes: {
76
+ class: widget.stores.containerClass$,
77
+ "aria-atomic": tansu.readable("false"),
78
+ "aria-live": widget.stores.ariaLive$
79
+ }
80
+ }))
81
+ }
82
+ };
83
+ }
84
+ exports.createCarousel = createCarousel;
85
+ exports.getCarouselDefaultConfig = getCarouselDefaultConfig;
@@ -0,0 +1,88 @@
1
+ import { createTransition } from "@agnos-ui/core/services/transitions/baseTransitions";
2
+ import { writablesForProps, idWithDefault, stateStores, true$ } from "@agnos-ui/core/utils/stores";
3
+ import { createAttributesDirective, mergeDirectives } from "@agnos-ui/core/utils/directive";
4
+ import { typeString, typeBoolean, typeFunction } from "@agnos-ui/core/utils/writables";
5
+ import { a as collapseHorizontalTransition, c as collapseVerticalTransition } from "./collapse-CVjUhnIz.js";
6
+ import { asWritable, computed } from "@amadeus-it-group/tansu";
7
+ import { noop } from "@agnos-ui/core/utils/func";
8
+ const defaultCollapseConfig = {
9
+ visible: true,
10
+ horizontal: false,
11
+ onVisibleChange: noop,
12
+ onShown: noop,
13
+ onHidden: noop,
14
+ animated: true,
15
+ animatedOnInit: false,
16
+ className: "",
17
+ id: ""
18
+ };
19
+ function getCollapseDefaultConfig() {
20
+ return { ...defaultCollapseConfig };
21
+ }
22
+ const commonCollapseConfigValidator = {
23
+ horizontal: typeBoolean,
24
+ onVisibleChange: typeFunction,
25
+ onHidden: typeFunction,
26
+ onShown: typeFunction,
27
+ animatedOnInit: typeBoolean,
28
+ animated: typeBoolean,
29
+ className: typeString,
30
+ visible: typeBoolean,
31
+ id: typeString
32
+ };
33
+ function createCollapse(config) {
34
+ const [
35
+ { animatedOnInit$, animated$, visible$: requestedVisible$, onVisibleChange$, onHidden$, onShown$, horizontal$, id$: _dirtyId$, ...stateProps },
36
+ patch
37
+ ] = writablesForProps(defaultCollapseConfig, config, commonCollapseConfigValidator);
38
+ const id$ = idWithDefault(_dirtyId$);
39
+ const currentTransitionFn$ = asWritable(computed(() => horizontal$() ? collapseHorizontalTransition : collapseVerticalTransition));
40
+ const transition = createTransition({
41
+ props: {
42
+ transition: currentTransitionFn$,
43
+ visible: requestedVisible$,
44
+ animated: animated$,
45
+ animatedOnInit: animatedOnInit$,
46
+ onVisibleChange: onVisibleChange$,
47
+ onHidden: onHidden$,
48
+ onShown: onShown$
49
+ }
50
+ });
51
+ const visible$ = transition.stores.visible$;
52
+ const hidden$ = transition.stores.hidden$;
53
+ return {
54
+ ...stateStores({ ...stateProps, visible$, hidden$, horizontal$ }),
55
+ patch,
56
+ api: {
57
+ open: transition.api.show,
58
+ close: transition.api.hide,
59
+ toggle: transition.api.toggle
60
+ },
61
+ directives: {
62
+ collapseDirective: mergeDirectives(
63
+ transition.directives.directive,
64
+ createAttributesDirective(() => ({
65
+ attributes: {
66
+ id: id$
67
+ },
68
+ classNames: {
69
+ "au-collapse": true$
70
+ }
71
+ }))
72
+ ),
73
+ triggerDirective: createAttributesDirective(() => ({
74
+ attributes: {
75
+ "aria-expanded": computed(() => `${visible$()}`),
76
+ "aria-controls": id$
77
+ },
78
+ events: {
79
+ click: () => transition.api.toggle()
80
+ }
81
+ }))
82
+ }
83
+ };
84
+ }
85
+ export {
86
+ createCollapse as c,
87
+ getCollapseDefaultConfig as g
88
+ };
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ const baseTransitions = require("@agnos-ui/core/services/transitions/baseTransitions");
3
+ const stores = require("@agnos-ui/core/utils/stores");
4
+ const directive = require("@agnos-ui/core/utils/directive");
5
+ const writables = require("@agnos-ui/core/utils/writables");
6
+ const collapse = require("./collapse-sUYbZqEx.cjs");
7
+ const tansu = require("@amadeus-it-group/tansu");
8
+ const func = require("@agnos-ui/core/utils/func");
9
+ const defaultCollapseConfig = {
10
+ visible: true,
11
+ horizontal: false,
12
+ onVisibleChange: func.noop,
13
+ onShown: func.noop,
14
+ onHidden: func.noop,
15
+ animated: true,
16
+ animatedOnInit: false,
17
+ className: "",
18
+ id: ""
19
+ };
20
+ function getCollapseDefaultConfig() {
21
+ return { ...defaultCollapseConfig };
22
+ }
23
+ const commonCollapseConfigValidator = {
24
+ horizontal: writables.typeBoolean,
25
+ onVisibleChange: writables.typeFunction,
26
+ onHidden: writables.typeFunction,
27
+ onShown: writables.typeFunction,
28
+ animatedOnInit: writables.typeBoolean,
29
+ animated: writables.typeBoolean,
30
+ className: writables.typeString,
31
+ visible: writables.typeBoolean,
32
+ id: writables.typeString
33
+ };
34
+ function createCollapse(config) {
35
+ const [
36
+ { animatedOnInit$, animated$, visible$: requestedVisible$, onVisibleChange$, onHidden$, onShown$, horizontal$, id$: _dirtyId$, ...stateProps },
37
+ patch
38
+ ] = stores.writablesForProps(defaultCollapseConfig, config, commonCollapseConfigValidator);
39
+ const id$ = stores.idWithDefault(_dirtyId$);
40
+ const currentTransitionFn$ = tansu.asWritable(tansu.computed(() => horizontal$() ? collapse.collapseHorizontalTransition : collapse.collapseVerticalTransition));
41
+ const transition = baseTransitions.createTransition({
42
+ props: {
43
+ transition: currentTransitionFn$,
44
+ visible: requestedVisible$,
45
+ animated: animated$,
46
+ animatedOnInit: animatedOnInit$,
47
+ onVisibleChange: onVisibleChange$,
48
+ onHidden: onHidden$,
49
+ onShown: onShown$
50
+ }
51
+ });
52
+ const visible$ = transition.stores.visible$;
53
+ const hidden$ = transition.stores.hidden$;
54
+ return {
55
+ ...stores.stateStores({ ...stateProps, visible$, hidden$, horizontal$ }),
56
+ patch,
57
+ api: {
58
+ open: transition.api.show,
59
+ close: transition.api.hide,
60
+ toggle: transition.api.toggle
61
+ },
62
+ directives: {
63
+ collapseDirective: directive.mergeDirectives(
64
+ transition.directives.directive,
65
+ directive.createAttributesDirective(() => ({
66
+ attributes: {
67
+ id: id$
68
+ },
69
+ classNames: {
70
+ "au-collapse": stores.true$
71
+ }
72
+ }))
73
+ ),
74
+ triggerDirective: directive.createAttributesDirective(() => ({
75
+ attributes: {
76
+ "aria-expanded": tansu.computed(() => `${visible$()}`),
77
+ "aria-controls": id$
78
+ },
79
+ events: {
80
+ click: () => transition.api.toggle()
81
+ }
82
+ }))
83
+ }
84
+ };
85
+ }
86
+ exports.createCollapse = createCollapse;
87
+ exports.getCollapseDefaultConfig = getCollapseDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { a, c, g } from "../../accordion-Dy6WokG3.js";
1
+ import { a, c, g } from "../../accordion-fxxgzVzz.js";
2
2
  export * from "@agnos-ui/core/components/accordion";
3
3
  export {
4
4
  a as createAccordion,
@@ -0,0 +1,132 @@
1
+ import type { Directive, PropsConfig, SlotContent, Widget, WidgetSlotContext } from '@agnos-ui/core/types';
2
+ import type { CarouselProps as CoreProps, CarouselState as CoreState, CarouselApi, CarouselDirectives as CoreDirectives } from '@agnos-ui/core/components/carousel';
3
+ export * from '@agnos-ui/core/components/carousel';
4
+ /**
5
+ * Represents the context for a carousel.
6
+ *
7
+ * @template SlideData - The type of data used by each slide in the carousel.
8
+ */
9
+ export type CarouselContext<SlideData extends {
10
+ id: string;
11
+ }> = WidgetSlotContext<CarouselWidget<SlideData>>;
12
+ /**
13
+ * Represents the context for a carousel slide.
14
+ *
15
+ * @template SlideData - The type of data used by each slide in the carousel.
16
+ */
17
+ export type CarouselSlideContext<SlideData extends {
18
+ id: string;
19
+ }> = WidgetSlotContext<CarouselWidget<SlideData>> & SlideData;
20
+ interface CarouselExtraProps<SlideData extends {
21
+ id: string;
22
+ }> {
23
+ /**
24
+ * CSS classes to be applied on the widget main container
25
+ *
26
+ * @defaultValue `''`
27
+ */
28
+ className: string;
29
+ /**
30
+ * Class name to apply to the container of the carousel.
31
+ *
32
+ * @defaultValue `''`
33
+ */
34
+ containerClass: string;
35
+ /**
36
+ * Class name to apply to each slide in the carousel.
37
+ *
38
+ * @defaultValue `''`
39
+ */
40
+ slideClass: string | ((slideContext: {
41
+ id: string;
42
+ index: number;
43
+ active: boolean;
44
+ }) => string);
45
+ /**
46
+ * The data for each slide in the carousel.
47
+ *
48
+ * @defaultValue `[]`
49
+ */
50
+ slidesData: SlideData[];
51
+ /**
52
+ * The structure of the carousel.
53
+ *
54
+ * @defaultValue `undefined`
55
+ */
56
+ structure: SlotContent<CarouselContext<SlideData>>;
57
+ /**
58
+ * The navigation layer of the carousel.
59
+ *
60
+ * @defaultValue `undefined`
61
+ */
62
+ navigation: SlotContent<CarouselContext<SlideData>>;
63
+ /**
64
+ * The content of each slide in the carousel.
65
+ *
66
+ * @defaultValue `undefined`
67
+ */
68
+ slide: SlotContent<CarouselSlideContext<SlideData>>;
69
+ /**
70
+ * The aria-live attribute value for the carousel container.
71
+ *
72
+ * @defaultValue `'polite'`
73
+ */
74
+ ariaLive: string;
75
+ }
76
+ /**
77
+ * Represents the state of a carousel component.
78
+ *
79
+ * @template SlideData - The type of data used by each slide in the carousel.
80
+ */
81
+ export interface CarouselState<SlideData extends {
82
+ id: string;
83
+ }> extends CoreState, CarouselExtraProps<SlideData> {
84
+ }
85
+ /**
86
+ * Interface representing the properties for a carousel component.
87
+ *
88
+ * @template SlideData - The type of data used by each slide in the carousel.
89
+ */
90
+ export interface CarouselProps<SlideData extends {
91
+ id: string;
92
+ }> extends CoreProps, CarouselExtraProps<SlideData> {
93
+ }
94
+ /**
95
+ * Represents the directives for a carousel component.
96
+ */
97
+ export interface CarouselDirectives extends Omit<CoreDirectives, 'slide'> {
98
+ /**
99
+ * A directive to be applied to each slide in the carousel.
100
+ */
101
+ slide: Directive<{
102
+ id: string;
103
+ index: number;
104
+ }>;
105
+ /**
106
+ * A directive to be applied to container of the carousel.
107
+ */
108
+ container: Directive;
109
+ }
110
+ /**
111
+ * Represents a carousel widget with specific properties, state, API, and directives.
112
+ *
113
+ * @template SlideData - The type of the data for each slide.
114
+ */
115
+ export type CarouselWidget<SlideData extends {
116
+ id: string;
117
+ }> = Widget<CarouselProps<SlideData>, CarouselState<SlideData>, CarouselApi, CarouselDirectives>;
118
+ /**
119
+ * Retrieve a shallow copy of the default Carousel config
120
+ * @returns the default Carousel config
121
+ */
122
+ export declare function getCarouselDefaultConfig(): CarouselProps<any>;
123
+ /**
124
+ * Create a Carousel with given config props
125
+ *
126
+ * @template SlideData - The type of the data for each slide.
127
+ * @param config - an optional carousel config
128
+ * @returns a CarouselWidget
129
+ */
130
+ export declare function createCarousel<SlideData extends {
131
+ id: string;
132
+ }>(config?: PropsConfig<CarouselProps<SlideData>>): CarouselWidget<SlideData>;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const carousel = require("../../carousel-DxBhqvpX.cjs");
4
+ const carousel$1 = require("@agnos-ui/core/components/carousel");
5
+ exports.createCarousel = carousel.createCarousel;
6
+ exports.getCarouselDefaultConfig = carousel.getCarouselDefaultConfig;
7
+ Object.keys(carousel$1).forEach((k) => {
8
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
9
+ enumerable: true,
10
+ get: () => carousel$1[k]
11
+ });
12
+ });
@@ -0,0 +1 @@
1
+ export * from './carousel';
@@ -0,0 +1,6 @@
1
+ import { c, g } from "../../carousel-BR8jjX02.js";
2
+ export * from "@agnos-ui/core/components/carousel";
3
+ export {
4
+ c as createCarousel,
5
+ g as getCarouselDefaultConfig
6
+ };
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const collapse = require("../../collapse-CSP8JFq-.cjs");
3
+ const collapse = require("../../collapse-klnTiwop.cjs");
4
4
  exports.createCollapse = collapse.createCollapse;
5
5
  exports.getCollapseDefaultConfig = collapse.getCollapseDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../collapse-DJJ1jB2v.js";
1
+ import { c, g } from "../../collapse-DgIqRvXl.js";
2
2
  export {
3
3
  c as createCollapse,
4
4
  g as getCollapseDefaultConfig
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../progressbar-D9S5NLpS.js";
1
+ import { c, g } from "../../progressbar-DcUv6Lh4.js";
2
2
  export * from "@agnos-ui/core/components/progressbar";
3
3
  export {
4
4
  c as createProgressbar,
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const toast = require("../../toast-BYDfN1cI.cjs");
3
+ const toast = require("../../toast-C4gj0rX-.cjs");
4
4
  const toast$1 = require("@agnos-ui/core/components/toast");
5
5
  exports.createToast = toast.createToast;
6
6
  exports.getToastDefaultConfig = toast.getToastDefaultConfig;
7
+ exports.toastPositions = toast.toastPositions;
7
8
  Object.keys(toast$1).forEach((k) => {
8
9
  if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
9
10
  enumerable: true,
@@ -1,6 +1,7 @@
1
- import { c, g } from "../../toast-D-by8Hwt.js";
1
+ import { c, g, t } from "../../toast-Dggjpjqk.js";
2
2
  export * from "@agnos-ui/core/components/toast";
3
3
  export {
4
4
  c as createToast,
5
- g as getToastDefaultConfig
5
+ g as getToastDefaultConfig,
6
+ t as toastPositions
6
7
  };
@@ -1,6 +1,7 @@
1
1
  import type { ToastDirectives, ToastState as CoreState, ToastProps as CoreProps, ToastApi } from '@agnos-ui/core/components/toast';
2
2
  import type { SlotContent, Widget, WidgetFactory, WidgetSlotContext } from '@agnos-ui/core/types';
3
3
  import type { TransitionFn } from '@agnos-ui/core/services/transitions/baseTransitions';
4
+ import type { ToastPositions } from '@agnos-ui/core/components/toast';
4
5
  export * from '@agnos-ui/core/components/toast';
5
6
  /**
6
7
  * Represents the context for a Toast widget.
@@ -58,3 +59,17 @@ export declare function getToastDefaultConfig(): ToastProps;
58
59
  * @returns an ToastWidget
59
60
  */
60
61
  export declare const createToast: WidgetFactory<ToastWidget>;
62
+ /**
63
+ * A mapping of toast position keys to their corresponding CSS class strings of bootstrap.
64
+ * These classes define the positioning of toast notifications on the screen.
65
+ *
66
+ * The keys represent various positions on the screen, such as top-left, top-center,
67
+ * middle-right, etc., and the values are the CSS classes of bootstrap that apply the respective
68
+ * positioning styles.
69
+ *
70
+ * Example usage:
71
+ * ```typescript
72
+ * const positionClass = toastPositions.topLeft; // "top-0 start-0"
73
+ * ```
74
+ */
75
+ export declare const toastPositions: Record<ToastPositions, string>;
package/config.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { CarouselProps } from './components/carousel';
1
2
  import type { AccordionProps } from './components/accordion';
2
3
  import type { AlertProps } from './components/alert';
3
4
  import type { CollapseProps } from './components/collapse';
@@ -57,4 +58,8 @@ export interface BootstrapWidgetsConfig {
57
58
  * tree widget config
58
59
  */
59
60
  tree: TreeProps;
61
+ /**
62
+ * carousel widget config
63
+ */
64
+ carousel: CarouselProps<any>;
60
65
  }
package/css/agnosui.css CHANGED
@@ -102,6 +102,7 @@
102
102
  --bs-slider-tick-neutral-color: var(--bs-light-emphasis, #666666);
103
103
  --bs-slider-tick-selected-color: var(--bs-primary, #0d6efd);
104
104
  --bs-slider-tick-disabled-color: var(--bs-dark-bg-subtle, #ced4da);
105
+ --bs-slider-tick-fill-color: var(--bs-white, #ffffff);
105
106
  --bs-slider-tick-label-translate-vertical: translateY(75%);
106
107
  --bs-slider-progress-color: var(--bs-primary, #0d6efd);
107
108
  --bs-slider-progress-height: 0.25rem;
@@ -219,6 +220,33 @@
219
220
  }
220
221
  .au-slider .au-slider-tick svg {
221
222
  display: block;
223
+ width: var(--bs-slider-tick-secondary-size);
224
+ height: var(--bs-slider-tick-primary-size);
225
+ fill: none;
226
+ }
227
+ .au-slider .au-slider-tick svg circle {
228
+ cx: 50%;
229
+ cy: 50%;
230
+ fill: var(--bs-slider-tick-fill-color);
231
+ }
232
+ .au-slider .au-slider-tick svg circle.au-slider-tick-outer {
233
+ r: 45%;
234
+ stroke: var(--bs-slider-tick-neutral-color);
235
+ stroke-width: 1.5;
236
+ }
237
+ .au-slider .au-slider-tick svg circle.au-slider-tick-outer.au-slider-tick-disabled {
238
+ stroke: var(--bs-slider-tick-disabled-color);
239
+ }
240
+ .au-slider .au-slider-tick svg circle.au-slider-tick-selected.au-slider-tick-outer {
241
+ fill: var(--bs-slider-tick-selected-color);
242
+ stroke: none;
243
+ r: 50%;
244
+ }
245
+ .au-slider .au-slider-tick svg circle.au-slider-tick-selected.au-slider-tick-outer.au-slider-tick-disabled {
246
+ fill: var(--bs-slider-tick-disabled-color);
247
+ }
248
+ .au-slider .au-slider-tick svg circle.au-slider-tick-selected.au-slider-tick-inner {
249
+ r: 25%;
222
250
  }
223
251
  .au-slider .au-slider-tick-label {
224
252
  position: absolute;
@@ -231,6 +259,9 @@
231
259
  margin-inline-start: var(--bs-slider-label-vertical-margin-inline-start);
232
260
  transform: var(--bs-slider-tick-label-translate-vertical);
233
261
  }
262
+ .au-slider .au-slider-tick-label-now {
263
+ font-weight: var(--bs-slider-label-now-font-weight);
264
+ }
234
265
  .au-slider .au-slider-progress {
235
266
  background-color: var(--bs-slider-progress-color);
236
267
  border-radius: var(--bs-slider-border-radius);
@@ -339,4 +370,27 @@
339
370
  border: 0;
340
371
  }
341
372
 
373
+ .au-carousel {
374
+ overflow: hidden;
375
+ }
376
+
377
+ .au-carousel-container {
378
+ display: flex;
379
+ touch-action: pan-y pinch-zoom;
380
+ }
381
+
382
+ .au-carousel-slide {
383
+ flex: 0 0 100%;
384
+ user-select: none;
385
+ position: relative;
386
+ }
387
+
388
+ .au-toaster {
389
+ display: flex;
390
+ }
391
+
392
+ .au-toaster-container {
393
+ padding: 1rem;
394
+ }
395
+
342
396
  /*# sourceMappingURL=agnosui.css.map */