@agnos-ui/core-bootstrap 0.8.1 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{carousel-DxBhqvpX.cjs → carousel-C-vSnTTq.cjs} +13 -12
- package/{carousel-BR8jjX02.js → carousel-CY0kDaVK.js} +3 -2
- package/{collapse-klnTiwop.cjs → collapse-BzcOh2fY.cjs} +3 -2
- package/{collapse-DgIqRvXl.js → collapse-UxuEGPrW.js} +3 -2
- package/components/carousel/carousel.d.ts +5 -3
- package/components/carousel/index.cjs +1 -1
- package/components/carousel/index.js +1 -1
- package/components/collapse/collapse.d.ts +2 -2
- package/components/collapse/index.cjs +1 -1
- package/components/collapse/index.js +1 -1
- package/index.cjs +2 -2
- package/index.js +2 -2
- package/package.json +2 -2
|
@@ -5,6 +5,7 @@ const tansu = require("@amadeus-it-group/tansu");
|
|
|
5
5
|
const directive = require("@agnos-ui/core/utils/directive");
|
|
6
6
|
const extendWidget = require("@agnos-ui/core/services/extendWidget");
|
|
7
7
|
const writables = require("@agnos-ui/core/utils/writables");
|
|
8
|
+
const widget = require("@agnos-ui/core/utils/widget");
|
|
8
9
|
const defaultConfigExtraProps = {
|
|
9
10
|
className: "",
|
|
10
11
|
containerClass: "",
|
|
@@ -31,35 +32,35 @@ const coreOverride = {
|
|
|
31
32
|
function getCarouselDefaultConfig() {
|
|
32
33
|
return { ...carousel.getCarouselDefaultConfig(), ...defaultConfigExtraProps };
|
|
33
34
|
}
|
|
34
|
-
|
|
35
|
-
const
|
|
35
|
+
const createCarousel = widget.createWidgetFactory("carousel", (config) => {
|
|
36
|
+
const widget2 = extendWidget.extendWidgetProps(carousel.createCarousel, defaultConfigExtraProps, configValidator, coreOverride)(config);
|
|
36
37
|
return {
|
|
37
|
-
...
|
|
38
|
+
...widget2,
|
|
38
39
|
directives: {
|
|
39
|
-
...
|
|
40
|
+
...widget2.directives,
|
|
40
41
|
root: directive.mergeDirectives(
|
|
41
|
-
|
|
42
|
+
widget2.directives.root,
|
|
42
43
|
directive.createAttributesDirective(() => ({
|
|
43
44
|
classNames: {
|
|
44
45
|
carousel: stores.true$
|
|
45
46
|
},
|
|
46
47
|
attributes: {
|
|
47
|
-
class:
|
|
48
|
+
class: widget2.stores.className$
|
|
48
49
|
}
|
|
49
50
|
}))
|
|
50
51
|
),
|
|
51
52
|
slide: directive.mergeDirectives(
|
|
52
|
-
|
|
53
|
+
widget2.directives.slide,
|
|
53
54
|
directive.createAttributesDirective((slideData$) => ({
|
|
54
55
|
attributes: {
|
|
55
56
|
class: tansu.computed(() => {
|
|
56
|
-
const slideClass =
|
|
57
|
+
const slideClass = widget2.stores.slideClass$();
|
|
57
58
|
if (typeof slideClass === "function") {
|
|
58
59
|
const slideData = slideData$();
|
|
59
60
|
return slideClass({
|
|
60
61
|
id: slideData.id,
|
|
61
62
|
index: slideData.index,
|
|
62
|
-
active: slideData.index ===
|
|
63
|
+
active: slideData.index === widget2.stores.selectedScrollSnap$()
|
|
63
64
|
});
|
|
64
65
|
} else {
|
|
65
66
|
return slideClass;
|
|
@@ -73,13 +74,13 @@ function createCarousel(config) {
|
|
|
73
74
|
"au-carousel-container": stores.true$
|
|
74
75
|
},
|
|
75
76
|
attributes: {
|
|
76
|
-
class:
|
|
77
|
+
class: widget2.stores.containerClass$,
|
|
77
78
|
"aria-atomic": tansu.readable("false"),
|
|
78
|
-
"aria-live":
|
|
79
|
+
"aria-live": widget2.stores.ariaLive$
|
|
79
80
|
}
|
|
80
81
|
}))
|
|
81
82
|
}
|
|
82
83
|
};
|
|
83
|
-
}
|
|
84
|
+
});
|
|
84
85
|
exports.createCarousel = createCarousel;
|
|
85
86
|
exports.getCarouselDefaultConfig = getCarouselDefaultConfig;
|
|
@@ -4,6 +4,7 @@ import { readable, computed } from "@amadeus-it-group/tansu";
|
|
|
4
4
|
import { createAttributesDirective, mergeDirectives } from "@agnos-ui/core/utils/directive";
|
|
5
5
|
import { extendWidgetProps } from "@agnos-ui/core/services/extendWidget";
|
|
6
6
|
import { typeString, typeArray } from "@agnos-ui/core/utils/writables";
|
|
7
|
+
import { createWidgetFactory } from "@agnos-ui/core/utils/widget";
|
|
7
8
|
const defaultConfigExtraProps = {
|
|
8
9
|
className: "",
|
|
9
10
|
containerClass: "",
|
|
@@ -30,7 +31,7 @@ const coreOverride = {
|
|
|
30
31
|
function getCarouselDefaultConfig() {
|
|
31
32
|
return { ...getCarouselDefaultConfig$1(), ...defaultConfigExtraProps };
|
|
32
33
|
}
|
|
33
|
-
|
|
34
|
+
const createCarousel = createWidgetFactory("carousel", (config) => {
|
|
34
35
|
const widget = extendWidgetProps(createCarousel$1, defaultConfigExtraProps, configValidator, coreOverride)(config);
|
|
35
36
|
return {
|
|
36
37
|
...widget,
|
|
@@ -79,7 +80,7 @@ function createCarousel(config) {
|
|
|
79
80
|
}))
|
|
80
81
|
}
|
|
81
82
|
};
|
|
82
|
-
}
|
|
83
|
+
});
|
|
83
84
|
export {
|
|
84
85
|
createCarousel as c,
|
|
85
86
|
getCarouselDefaultConfig as g
|
|
@@ -6,6 +6,7 @@ const writables = require("@agnos-ui/core/utils/writables");
|
|
|
6
6
|
const collapse = require("./collapse-sUYbZqEx.cjs");
|
|
7
7
|
const tansu = require("@amadeus-it-group/tansu");
|
|
8
8
|
const func = require("@agnos-ui/core/utils/func");
|
|
9
|
+
const widget = require("@agnos-ui/core/utils/widget");
|
|
9
10
|
const defaultCollapseConfig = {
|
|
10
11
|
visible: true,
|
|
11
12
|
horizontal: false,
|
|
@@ -31,7 +32,7 @@ const commonCollapseConfigValidator = {
|
|
|
31
32
|
visible: writables.typeBoolean,
|
|
32
33
|
id: writables.typeString
|
|
33
34
|
};
|
|
34
|
-
|
|
35
|
+
const createCollapse = widget.createWidgetFactory("collapse", (config) => {
|
|
35
36
|
const [
|
|
36
37
|
{ animatedOnInit$, animated$, visible$: requestedVisible$, onVisibleChange$, onHidden$, onShown$, horizontal$, id$: _dirtyId$, ...stateProps },
|
|
37
38
|
patch
|
|
@@ -82,6 +83,6 @@ function createCollapse(config) {
|
|
|
82
83
|
}))
|
|
83
84
|
}
|
|
84
85
|
};
|
|
85
|
-
}
|
|
86
|
+
});
|
|
86
87
|
exports.createCollapse = createCollapse;
|
|
87
88
|
exports.getCollapseDefaultConfig = getCollapseDefaultConfig;
|
|
@@ -5,6 +5,7 @@ import { typeString, typeBoolean, typeFunction } from "@agnos-ui/core/utils/writ
|
|
|
5
5
|
import { a as collapseHorizontalTransition, c as collapseVerticalTransition } from "./collapse-CVjUhnIz.js";
|
|
6
6
|
import { asWritable, computed } from "@amadeus-it-group/tansu";
|
|
7
7
|
import { noop } from "@agnos-ui/core/utils/func";
|
|
8
|
+
import { createWidgetFactory } from "@agnos-ui/core/utils/widget";
|
|
8
9
|
const defaultCollapseConfig = {
|
|
9
10
|
visible: true,
|
|
10
11
|
horizontal: false,
|
|
@@ -30,7 +31,7 @@ const commonCollapseConfigValidator = {
|
|
|
30
31
|
visible: typeBoolean,
|
|
31
32
|
id: typeString
|
|
32
33
|
};
|
|
33
|
-
|
|
34
|
+
const createCollapse = createWidgetFactory("collapse", (config) => {
|
|
34
35
|
const [
|
|
35
36
|
{ animatedOnInit$, animated$, visible$: requestedVisible$, onVisibleChange$, onHidden$, onShown$, horizontal$, id$: _dirtyId$, ...stateProps },
|
|
36
37
|
patch
|
|
@@ -81,7 +82,7 @@ function createCollapse(config) {
|
|
|
81
82
|
}))
|
|
82
83
|
}
|
|
83
84
|
};
|
|
84
|
-
}
|
|
85
|
+
});
|
|
85
86
|
export {
|
|
86
87
|
createCollapse as c,
|
|
87
88
|
getCollapseDefaultConfig as g
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Directive, PropsConfig, SlotContent, Widget, WidgetSlotContext } from '@agnos-ui/core/types';
|
|
1
|
+
import type { Directive, PropsConfig, SlotContent, Widget, WidgetFactory, WidgetSlotContext } from '@agnos-ui/core/types';
|
|
2
2
|
import type { CarouselProps as CoreProps, CarouselState as CoreState, CarouselApi, CarouselDirectives as CoreDirectives } from '@agnos-ui/core/components/carousel';
|
|
3
3
|
export * from '@agnos-ui/core/components/carousel';
|
|
4
4
|
/**
|
|
@@ -127,6 +127,8 @@ export declare function getCarouselDefaultConfig(): CarouselProps<any>;
|
|
|
127
127
|
* @param config - an optional carousel config
|
|
128
128
|
* @returns a CarouselWidget
|
|
129
129
|
*/
|
|
130
|
-
export declare
|
|
130
|
+
export declare const createCarousel: WidgetFactory<CarouselWidget<{
|
|
131
131
|
id: string;
|
|
132
|
-
}
|
|
132
|
+
}>, <SlideData extends {
|
|
133
|
+
id: string;
|
|
134
|
+
}>(config?: PropsConfig<CarouselProps<SlideData>>) => CarouselWidget<SlideData>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const carousel = require("../../carousel-
|
|
3
|
+
const carousel = require("../../carousel-C-vSnTTq.cjs");
|
|
4
4
|
const carousel$1 = require("@agnos-ui/core/components/carousel");
|
|
5
5
|
exports.createCarousel = carousel.createCarousel;
|
|
6
6
|
exports.getCarouselDefaultConfig = carousel.getCarouselDefaultConfig;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Directive,
|
|
1
|
+
import type { Directive, Widget, WidgetFactory } from '@agnos-ui/core/types';
|
|
2
2
|
/**
|
|
3
3
|
* Interface representing the common properties and state for a collapse component.
|
|
4
4
|
*/
|
|
@@ -132,4 +132,4 @@ export declare function getCollapseDefaultConfig(): CollapseProps;
|
|
|
132
132
|
* @param config - an optional collapse config
|
|
133
133
|
* @returns an CollapseWidget
|
|
134
134
|
*/
|
|
135
|
-
export declare
|
|
135
|
+
export declare const createCollapse: WidgetFactory<CollapseWidget>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const collapse = require("../../collapse-
|
|
3
|
+
const collapse = require("../../collapse-BzcOh2fY.cjs");
|
|
4
4
|
exports.createCollapse = collapse.createCollapse;
|
|
5
5
|
exports.getCollapseDefaultConfig = collapse.getCollapseDefaultConfig;
|
package/index.cjs
CHANGED
|
@@ -9,9 +9,9 @@ const rating = require("./rating-C5NZjIRx.cjs");
|
|
|
9
9
|
const select = require("./select-AtIM2x7x.cjs");
|
|
10
10
|
const slider = require("./slider-CosrWCnn.cjs");
|
|
11
11
|
const toast = require("./toast-C4gj0rX-.cjs");
|
|
12
|
-
const collapse = require("./collapse-
|
|
12
|
+
const collapse = require("./collapse-BzcOh2fY.cjs");
|
|
13
13
|
const tree = require("./tree-DuY7bsYo.cjs");
|
|
14
|
-
const carousel = require("./carousel-
|
|
14
|
+
const carousel = require("./carousel-C-vSnTTq.cjs");
|
|
15
15
|
const collapse$1 = require("./collapse-sUYbZqEx.cjs");
|
|
16
16
|
const fade = require("./fade-CJ0jXGio.cjs");
|
|
17
17
|
const types = require("./types.cjs");
|
package/index.js
CHANGED
|
@@ -7,9 +7,9 @@ import { c as c6, g as g6 } from "./rating-hovacUx0.js";
|
|
|
7
7
|
import { c as c7, g as g7 } from "./select-CLjBDJ3a.js";
|
|
8
8
|
import { c as c8, g as g8 } from "./slider-Bj081WdM.js";
|
|
9
9
|
import { c as c9, g as g9, t } from "./toast-Dggjpjqk.js";
|
|
10
|
-
import { c as c10, g as g10 } from "./collapse-
|
|
10
|
+
import { c as c10, g as g10 } from "./collapse-UxuEGPrW.js";
|
|
11
11
|
import { c as c11, g as g11 } from "./tree-Be8WJS8u.js";
|
|
12
|
-
import { c as c12, g as g12 } from "./carousel-
|
|
12
|
+
import { c as c12, g as g12 } from "./carousel-CY0kDaVK.js";
|
|
13
13
|
import { a as a2, c as c13 } from "./collapse-CVjUhnIz.js";
|
|
14
14
|
import { f } from "./fade-uOobJKgw.js";
|
|
15
15
|
import { BS_CONTEXTUAL_CLASSES } from "./types.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agnos-ui/core-bootstrap",
|
|
3
3
|
"description": "Styles and component interface extensions necessary to use AgnosUI with Bootstrap.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.9.0",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bootstrap",
|
|
7
7
|
"css",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@agnos-ui/core": "0.
|
|
65
|
+
"@agnos-ui/core": "0.9.0"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"@amadeus-it-group/tansu": "^2.0.0"
|