@agnos-ui/react-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.
- package/{accordion-QclyKh8E.cjs → accordion-CKX3QpIN.cjs} +3 -1
- package/{accordion-GX854ooE.js → accordion-CrXiNNLE.js} +4 -2
- package/carousel-B8b91cHo.cjs +72 -0
- package/carousel-CB4uoAm0.js +73 -0
- package/{collapse-UMbDs6Gh.cjs → collapse-BQNW5NFj.cjs} +2 -1
- package/{collapse-BOXBa8_8.js → collapse-DojQXsLN.js} +3 -2
- package/components/accordion/index.cjs +1 -1
- package/components/accordion/index.js +1 -1
- package/components/carousel/carousel.d.ts +39 -0
- package/components/carousel/carousel.gen.d.ts +358 -0
- package/components/carousel/index.cjs +8 -0
- package/components/carousel/index.d.ts +2 -0
- package/components/carousel/index.js +8 -0
- package/components/collapse/index.cjs +1 -1
- package/components/collapse/index.js +1 -1
- package/components/select/index.js +1 -1
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.js +1 -1
- package/components/toast/index.cjs +10 -5
- package/components/toast/index.d.ts +1 -0
- package/components/toast/index.js +7 -2
- package/components/toast/toast.gen.d.ts +85 -0
- package/components/toast/toasterProvider.d.ts +34 -0
- package/config.gen.d.ts +5 -0
- package/generated/types.cjs +7 -0
- package/generated/types.d.ts +1 -1
- package/generated/types.js +1 -0
- package/index.cjs +26 -8
- package/index.d.ts +1 -0
- package/index.js +52 -40
- package/package.json +5 -3
- package/{select-C2jCf6jT.js → select-ClQGKBMF.js} +1 -1
- package/{slider-DyvRcMCK.cjs → slider-CkKKSyai.cjs} +15 -39
- package/{slider-vFEkaZP-.js → slider-ZmbENVpb.js} +16 -40
- package/{toast-BUHjCme7.js → toasterProvider-DO_5lfVp.js} +61 -3
- package/{toast-CkwIDuRg.cjs → toasterProvider-glQ29Go3.cjs} +60 -2
- package/types.d.ts +2 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const slider = require("../../slider-
|
|
3
|
+
const slider = require("../../slider-CkKKSyai.cjs");
|
|
4
4
|
exports.Slider = slider.Slider;
|
|
5
5
|
exports.SliderDefaultSlotHandle = slider.SliderDefaultSlotHandle;
|
|
6
6
|
exports.SliderDefaultSlotStructure = slider.SliderDefaultSlotStructure;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
4
|
-
exports.Toast =
|
|
5
|
-
exports.ToastDefaultSlotStructure =
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
3
|
+
const toasterProvider = require("../../toasterProvider-glQ29Go3.cjs");
|
|
4
|
+
exports.Toast = toasterProvider.Toast;
|
|
5
|
+
exports.ToastDefaultSlotStructure = toasterProvider.ToastDefaultSlotStructure;
|
|
6
|
+
exports.ToasterContainer = toasterProvider.ToasterContainer;
|
|
7
|
+
exports.ToasterProvider = toasterProvider.ToasterProvider;
|
|
8
|
+
exports.createToast = toasterProvider.export_createToast;
|
|
9
|
+
exports.defaultToasterProps = toasterProvider.export_defaultToasterProps;
|
|
10
|
+
exports.getToastDefaultConfig = toasterProvider.export_getToastDefaultConfig;
|
|
11
|
+
exports.toastPositions = toasterProvider.export_toastPositions;
|
|
12
|
+
exports.useToaster = toasterProvider.useToaster;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { a, T, b, e } from "../../
|
|
1
|
+
import { a, T, f, g, b, d, e, c, u } from "../../toasterProvider-DO_5lfVp.js";
|
|
2
2
|
export {
|
|
3
3
|
a as Toast,
|
|
4
4
|
T as ToastDefaultSlotStructure,
|
|
5
|
+
f as ToasterContainer,
|
|
6
|
+
g as ToasterProvider,
|
|
5
7
|
b as createToast,
|
|
6
|
-
|
|
8
|
+
d as defaultToasterProps,
|
|
9
|
+
e as getToastDefaultConfig,
|
|
10
|
+
c as toastPositions,
|
|
11
|
+
u as useToaster
|
|
7
12
|
};
|
|
@@ -188,6 +188,21 @@ export type ToastWidget = Widget<ToastProps, ToastState, ToastApi, ToastDirectiv
|
|
|
188
188
|
*/
|
|
189
189
|
declare const export_createToast: WidgetFactory<ToastWidget>;
|
|
190
190
|
export { export_createToast as createToast };
|
|
191
|
+
/**
|
|
192
|
+
* A mapping of toast position keys to their corresponding CSS class strings of bootstrap.
|
|
193
|
+
* These classes define the positioning of toast notifications on the screen.
|
|
194
|
+
*
|
|
195
|
+
* The keys represent various positions on the screen, such as top-left, top-center,
|
|
196
|
+
* middle-right, etc., and the values are the CSS classes of bootstrap that apply the respective
|
|
197
|
+
* positioning styles.
|
|
198
|
+
*
|
|
199
|
+
* Example usage:
|
|
200
|
+
* ```typescript
|
|
201
|
+
* const positionClass = toastPositions.topLeft; // "top-0 start-0"
|
|
202
|
+
* ```
|
|
203
|
+
*/
|
|
204
|
+
declare const export_toastPositions: Record<ToastPositions, string>;
|
|
205
|
+
export { export_toastPositions as toastPositions };
|
|
191
206
|
/**
|
|
192
207
|
* Represents the API for the toast component.
|
|
193
208
|
*/
|
|
@@ -222,3 +237,73 @@ export interface ToastDirectives {
|
|
|
222
237
|
*/
|
|
223
238
|
closeButtonDirective: Directive;
|
|
224
239
|
}
|
|
240
|
+
/**
|
|
241
|
+
* Represents the possible positions for displaying a toast notification.
|
|
242
|
+
*
|
|
243
|
+
* The positions are defined based on a grid layout with three horizontal
|
|
244
|
+
* alignments (left, center, right) and three vertical alignments (top, middle, bottom).
|
|
245
|
+
*
|
|
246
|
+
* Available positions:
|
|
247
|
+
* - `topLeft`: Top-left corner of the screen.
|
|
248
|
+
* - `topCenter`: Top-center of the screen.
|
|
249
|
+
* - `topRight`: Top-right corner of the screen.
|
|
250
|
+
* - `middleLeft`: Middle-left side of the screen.
|
|
251
|
+
* - `middleCenter`: Center of the screen.
|
|
252
|
+
* - `middleRight`: Middle-right side of the screen.
|
|
253
|
+
* - `bottomLeft`: Bottom-left corner of the screen.
|
|
254
|
+
* - `bottomCenter`: Bottom-center of the screen.
|
|
255
|
+
* - `bottomRight`: Bottom-right corner of the screen.
|
|
256
|
+
*/
|
|
257
|
+
export type ToastPositions = 'topLeft' | 'topCenter' | 'topRight' | 'middleLeft' | 'middleCenter' | 'middleRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
|
|
258
|
+
/**
|
|
259
|
+
* Props of the toaster
|
|
260
|
+
*/
|
|
261
|
+
export interface ToasterProps {
|
|
262
|
+
/** How much time (ms) a toast is displayed; 0 means it won't be removed until a manual action */
|
|
263
|
+
duration: number;
|
|
264
|
+
/** Where to position the toasts */
|
|
265
|
+
position: ToastPositions;
|
|
266
|
+
/** Maximum number of toasts displayed */
|
|
267
|
+
limit?: number;
|
|
268
|
+
/** Pause toast when hover */
|
|
269
|
+
pauseOnHover?: boolean;
|
|
270
|
+
/** Display a dismiss button on each toast. When duration = 0, this is enforced to true */
|
|
271
|
+
dismissible: boolean;
|
|
272
|
+
/** Add a button to close all the toasts at once */
|
|
273
|
+
closeAll?: boolean;
|
|
274
|
+
/** Close all label */
|
|
275
|
+
closeAllLabel?: string;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Toast object
|
|
279
|
+
* @template Props Type of the toast properties.
|
|
280
|
+
*/
|
|
281
|
+
export interface ToasterToast<Props> {
|
|
282
|
+
/** Identifier of the toasts in the toaster */
|
|
283
|
+
id: number;
|
|
284
|
+
/** Properties of the toast */
|
|
285
|
+
props: Props;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Represents a timer used by the toaster service.
|
|
289
|
+
*/
|
|
290
|
+
export interface ToasterTimer {
|
|
291
|
+
/**
|
|
292
|
+
* The timeout identifier returned by `setTimeout`.
|
|
293
|
+
*/
|
|
294
|
+
timeout: ReturnType<typeof setTimeout> | null;
|
|
295
|
+
/**
|
|
296
|
+
* The timestamp when the timer was started.
|
|
297
|
+
*/
|
|
298
|
+
started: number;
|
|
299
|
+
/**
|
|
300
|
+
* The timestamp when the timer was paused (optional).
|
|
301
|
+
*/
|
|
302
|
+
paused?: number;
|
|
303
|
+
/**
|
|
304
|
+
* The duration for which the timer is set (optional). Used internally to compute the remaining time.
|
|
305
|
+
*/
|
|
306
|
+
duration: number;
|
|
307
|
+
}
|
|
308
|
+
declare const export_defaultToasterProps: ToasterProps;
|
|
309
|
+
export { export_defaultToasterProps as defaultToasterProps };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ToasterProps, ToastProps } from './toast.gen';
|
|
2
|
+
import type { PropsWithChildren } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Toaster component that displays a list of toast notifications.
|
|
5
|
+
*
|
|
6
|
+
* This component uses the `useToaster` hook to manage the state of the toasts.
|
|
7
|
+
* It renders a container with a list of toasts and an optional "Close all" button
|
|
8
|
+
* if the `closeAll` option is enabled and there is more than one toast.
|
|
9
|
+
*
|
|
10
|
+
* @returns The rendered Toaster component.
|
|
11
|
+
*/
|
|
12
|
+
export declare function ToasterContainer(): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
/**
|
|
14
|
+
* ToasterProvider component to provide toaster context to its children.
|
|
15
|
+
* @param props - The properties object.
|
|
16
|
+
* @param [props.options] - Optional toaster properties.
|
|
17
|
+
* @param props.children - The children components.
|
|
18
|
+
* @returns The ToasterProvider component.
|
|
19
|
+
*/
|
|
20
|
+
export declare const ToasterProvider: ({ options, children }: PropsWithChildren<{
|
|
21
|
+
options?: ToasterProps;
|
|
22
|
+
}>) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
/**
|
|
24
|
+
* Custom hook to use the toaster context.
|
|
25
|
+
* @returns The toaster context.
|
|
26
|
+
*/
|
|
27
|
+
export declare const useToaster: () => {
|
|
28
|
+
toasts: import("core/dist/components/toast").ToasterToast<Partial<ToastProps>>[];
|
|
29
|
+
options: import("core/dist/components/toast").ToasterProps;
|
|
30
|
+
addToast: (props: Partial<ToastProps>) => number;
|
|
31
|
+
removeToast: (id: number) => void;
|
|
32
|
+
eventsDirective: import("core/dist/types").Directive<number>;
|
|
33
|
+
closeAll: () => void;
|
|
34
|
+
};
|
package/config.gen.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AccordionProps } from './components/accordion';
|
|
2
2
|
import type { AlertProps } from './components/alert';
|
|
3
|
+
import type { CarouselProps } from './components/carousel';
|
|
3
4
|
import type { CollapseProps } from './components/collapse';
|
|
4
5
|
import type { ModalProps } from './components/modal';
|
|
5
6
|
import type { PaginationProps } from './components/pagination';
|
|
@@ -18,6 +19,10 @@ export type WidgetsConfig = {
|
|
|
18
19
|
* the alert widget config
|
|
19
20
|
*/
|
|
20
21
|
alert: AlertProps;
|
|
22
|
+
/**
|
|
23
|
+
* the carousel widget config
|
|
24
|
+
*/
|
|
25
|
+
carousel: CarouselProps<any>;
|
|
21
26
|
/**
|
|
22
27
|
* the collapse widget config
|
|
23
28
|
*/
|
package/generated/types.cjs
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const types = require("@agnos-ui/react-headless/types");
|
|
4
|
+
const types$1 = require("@agnos-ui/core-bootstrap/types");
|
|
4
5
|
Object.keys(types).forEach((k) => {
|
|
5
6
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
6
7
|
enumerable: true,
|
|
7
8
|
get: () => types[k]
|
|
8
9
|
});
|
|
9
10
|
});
|
|
11
|
+
Object.keys(types$1).forEach((k) => {
|
|
12
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: () => types$1[k]
|
|
15
|
+
});
|
|
16
|
+
});
|
package/generated/types.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from './../types';
|
package/generated/types.js
CHANGED
package/index.cjs
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const accordion = require("./accordion-
|
|
3
|
+
const accordion = require("./accordion-CKX3QpIN.cjs");
|
|
4
4
|
const alert = require("./alert-BGVw_vsM.cjs");
|
|
5
|
-
const
|
|
5
|
+
const carousel = require("./carousel-B8b91cHo.cjs");
|
|
6
|
+
const collapse = require("./collapse-BQNW5NFj.cjs");
|
|
6
7
|
const modal = require("./modal-DQLOz7TE.cjs");
|
|
7
8
|
const pagination = require("./pagination-Bq4Hvm1j.cjs");
|
|
8
9
|
const progressbar = require("./progressbar-CnbqCXqH.cjs");
|
|
9
10
|
const rating = require("./rating-BaZTCQi1.cjs");
|
|
10
11
|
const select = require("./select-DHNspXXB.cjs");
|
|
11
|
-
const slider = require("./slider-
|
|
12
|
-
const
|
|
12
|
+
const slider = require("./slider-CkKKSyai.cjs");
|
|
13
|
+
const toasterProvider = require("./toasterProvider-glQ29Go3.cjs");
|
|
13
14
|
const tree = require("./tree-DT261j-0.cjs");
|
|
14
15
|
const types = require("@agnos-ui/react-headless/types");
|
|
16
|
+
const types$1 = require("@agnos-ui/core-bootstrap/types");
|
|
15
17
|
const slot = require("@agnos-ui/react-headless/slot");
|
|
16
18
|
const config = require("@agnos-ui/react-headless/config");
|
|
17
19
|
const generated_config = require("./generated/config.cjs");
|
|
@@ -47,6 +49,11 @@ exports.Alert = alert.Alert;
|
|
|
47
49
|
exports.AlertDefaultSlotStructure = alert.AlertDefaultSlotStructure;
|
|
48
50
|
exports.createAlert = alert.export_createAlert;
|
|
49
51
|
exports.getAlertDefaultConfig = alert.export_getAlertDefaultConfig;
|
|
52
|
+
exports.Carousel = carousel.Carousel;
|
|
53
|
+
exports.CarouselDefaultNavigation = carousel.CarouselDefaultNavigation;
|
|
54
|
+
exports.CarouselDefaultStructure = carousel.CarouselDefaultStructure;
|
|
55
|
+
exports.createCarousel = carousel.export_createCarousel;
|
|
56
|
+
exports.getCarouselDefaultConfig = carousel.export_getCarouselDefaultConfig;
|
|
50
57
|
exports.Collapse = collapse.Collapse;
|
|
51
58
|
exports.createCollapse = collapse.export_createCollapse;
|
|
52
59
|
exports.getCollapseDefaultConfig = collapse.export_getCollapseDefaultConfig;
|
|
@@ -81,10 +88,15 @@ exports.SliderDefaultSlotStructure = slider.SliderDefaultSlotStructure;
|
|
|
81
88
|
exports.SliderDefaultTick = slider.SliderDefaultTick;
|
|
82
89
|
exports.createSlider = slider.export_createSlider;
|
|
83
90
|
exports.getSliderDefaultConfig = slider.export_getSliderDefaultConfig;
|
|
84
|
-
exports.Toast =
|
|
85
|
-
exports.ToastDefaultSlotStructure =
|
|
86
|
-
exports.
|
|
87
|
-
exports.
|
|
91
|
+
exports.Toast = toasterProvider.Toast;
|
|
92
|
+
exports.ToastDefaultSlotStructure = toasterProvider.ToastDefaultSlotStructure;
|
|
93
|
+
exports.ToasterContainer = toasterProvider.ToasterContainer;
|
|
94
|
+
exports.ToasterProvider = toasterProvider.ToasterProvider;
|
|
95
|
+
exports.createToast = toasterProvider.export_createToast;
|
|
96
|
+
exports.defaultToasterProps = toasterProvider.export_defaultToasterProps;
|
|
97
|
+
exports.getToastDefaultConfig = toasterProvider.export_getToastDefaultConfig;
|
|
98
|
+
exports.toastPositions = toasterProvider.export_toastPositions;
|
|
99
|
+
exports.useToaster = toasterProvider.useToaster;
|
|
88
100
|
exports.DefaultTreeSlotItem = tree.DefaultTreeSlotItem;
|
|
89
101
|
exports.DefaultTreeSlotItemContent = tree.DefaultTreeSlotItemContent;
|
|
90
102
|
exports.DefaultTreeSlotItemToggle = tree.DefaultTreeSlotItemToggle;
|
|
@@ -102,6 +114,12 @@ Object.keys(types).forEach((k) => {
|
|
|
102
114
|
get: () => types[k]
|
|
103
115
|
});
|
|
104
116
|
});
|
|
117
|
+
Object.keys(types$1).forEach((k) => {
|
|
118
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
119
|
+
enumerable: true,
|
|
120
|
+
get: () => types$1[k]
|
|
121
|
+
});
|
|
122
|
+
});
|
|
105
123
|
Object.keys(slot).forEach((k) => {
|
|
106
124
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
107
125
|
enumerable: true,
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { b, a, A, d, c, f, e } from "./accordion-
|
|
1
|
+
import { b, a, A, d, c, f, e } from "./accordion-CrXiNNLE.js";
|
|
2
2
|
import { a as a2, A as A2, b as b2, e as e2 } from "./alert-BM4ImSpO.js";
|
|
3
|
-
import { C, a as a3, e as e3 } from "./
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
3
|
+
import { c as c2, C, b as b3, a as a3, e as e3 } from "./carousel-CB4uoAm0.js";
|
|
4
|
+
import { C as C2, a as a4, e as e4 } from "./collapse-DojQXsLN.js";
|
|
5
|
+
import { b as b4, M, a as a5, c as c3, e as e5, f as f2, d as d2, o } from "./modal-apFubipB.js";
|
|
6
|
+
import { N, P, c as c4, a as a6, b as b5, d as d3, e as e6 } from "./pagination-B1Ho_-r4.js";
|
|
7
|
+
import { a as a7, P as P2, b as b6, e as e7 } from "./progressbar-Ck20N_ee.js";
|
|
8
|
+
import { R, a as a8, e as e8 } from "./rating-DziC4Tsh.js";
|
|
9
|
+
import { S, a as a9, e as e9 } from "./select-ClQGKBMF.js";
|
|
10
|
+
import { c as c5, S as S2, b as b7, a as a10, d as d4, e as e10 } from "./slider-ZmbENVpb.js";
|
|
11
|
+
import { a as a11, T, f as f3, g, b as b8, d as d5, e as e11, c as c6, u } from "./toasterProvider-DO_5lfVp.js";
|
|
12
|
+
import { b as b9, a as a12, D, c as c7, T as T2, d as d6, e as e12 } from "./tree-BflF5hyD.js";
|
|
12
13
|
export * from "@agnos-ui/react-headless/types";
|
|
14
|
+
export * from "@agnos-ui/core-bootstrap/types";
|
|
13
15
|
export * from "@agnos-ui/react-headless/slot";
|
|
14
16
|
export * from "@agnos-ui/react-headless/config";
|
|
15
17
|
import { WidgetsConfigContext, WidgetsDefaultConfig, useWidgetContext, useWidgetWithConfig } from "./generated/config.js";
|
|
@@ -40,59 +42,69 @@ export {
|
|
|
40
42
|
A as AccordionItemDefaultSlotStructure,
|
|
41
43
|
a2 as Alert,
|
|
42
44
|
A2 as AlertDefaultSlotStructure,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
c2 as Carousel,
|
|
46
|
+
C as CarouselDefaultNavigation,
|
|
47
|
+
b3 as CarouselDefaultStructure,
|
|
48
|
+
C2 as Collapse,
|
|
49
|
+
b9 as DefaultTreeSlotItem,
|
|
50
|
+
a12 as DefaultTreeSlotItemContent,
|
|
46
51
|
D as DefaultTreeSlotItemToggle,
|
|
47
|
-
|
|
48
|
-
|
|
52
|
+
c7 as DefaultTreeSlotStructure,
|
|
53
|
+
b4 as Modal,
|
|
49
54
|
M as ModalDefaultSlotHeader,
|
|
50
|
-
|
|
55
|
+
a5 as ModalDefaultSlotStructure,
|
|
51
56
|
N as NavButton,
|
|
52
57
|
P as PageItem,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
58
|
+
c4 as Pagination,
|
|
59
|
+
a6 as PaginationDefaultSlotPages,
|
|
60
|
+
b5 as PaginationDefaultSlotStructure,
|
|
61
|
+
a7 as Progressbar,
|
|
57
62
|
P2 as ProgressbarDefaultSlotStructure,
|
|
58
63
|
R as Rating,
|
|
59
64
|
S as Select,
|
|
60
|
-
|
|
65
|
+
c5 as Slider,
|
|
61
66
|
S2 as SliderDefaultSlotHandle,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
67
|
+
b7 as SliderDefaultSlotStructure,
|
|
68
|
+
a10 as SliderDefaultTick,
|
|
69
|
+
a11 as Toast,
|
|
65
70
|
T as ToastDefaultSlotStructure,
|
|
71
|
+
f3 as ToasterContainer,
|
|
72
|
+
g as ToasterProvider,
|
|
66
73
|
T2 as Tree,
|
|
67
74
|
WidgetsConfigContext,
|
|
68
75
|
WidgetsDefaultConfig,
|
|
69
76
|
d as createAccordion,
|
|
70
77
|
c as createAccordionItem,
|
|
71
78
|
b2 as createAlert,
|
|
72
|
-
a3 as
|
|
73
|
-
|
|
79
|
+
a3 as createCarousel,
|
|
80
|
+
a4 as createCollapse,
|
|
81
|
+
c3 as createModal,
|
|
74
82
|
d3 as createPagination,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
83
|
+
b6 as createProgressbar,
|
|
84
|
+
a8 as createRating,
|
|
85
|
+
a9 as createSelect,
|
|
78
86
|
d4 as createSlider,
|
|
79
|
-
|
|
80
|
-
|
|
87
|
+
b8 as createToast,
|
|
88
|
+
d6 as createTree,
|
|
89
|
+
d5 as defaultToasterProps,
|
|
81
90
|
f as factoryCreateAccordion,
|
|
82
91
|
e as getAccordionDefaultConfig,
|
|
83
92
|
e2 as getAlertDefaultConfig,
|
|
84
|
-
e3 as
|
|
85
|
-
e4 as
|
|
86
|
-
e5 as
|
|
87
|
-
e6 as
|
|
88
|
-
e7 as
|
|
89
|
-
e8 as
|
|
90
|
-
e9 as
|
|
91
|
-
e10 as
|
|
92
|
-
e11 as
|
|
93
|
+
e3 as getCarouselDefaultConfig,
|
|
94
|
+
e4 as getCollapseDefaultConfig,
|
|
95
|
+
e5 as getModalDefaultConfig,
|
|
96
|
+
e6 as getPaginationDefaultConfig,
|
|
97
|
+
e7 as getProgressbarDefaultConfig,
|
|
98
|
+
e8 as getRatingDefaultConfig,
|
|
99
|
+
e9 as getSelectDefaultConfig,
|
|
100
|
+
e10 as getSliderDefaultConfig,
|
|
101
|
+
e11 as getToastDefaultConfig,
|
|
102
|
+
e12 as getTreeDefaultConfig,
|
|
93
103
|
f2 as modalCloseButtonClick,
|
|
94
104
|
d2 as modalOutsideClick,
|
|
95
105
|
o as openModal,
|
|
106
|
+
c6 as toastPositions,
|
|
107
|
+
u as useToaster,
|
|
96
108
|
useWidgetContext,
|
|
97
109
|
useWidgetWithConfig
|
|
98
110
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agnos-ui/react-bootstrap",
|
|
3
3
|
"description": "Bootstrap-based component library for React.",
|
|
4
|
-
"version": "0.8.0
|
|
4
|
+
"version": "0.8.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.cjs",
|
|
7
7
|
"module": "./index.js",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@agnos-ui/core-bootstrap": "0.8.0
|
|
53
|
-
"@agnos-ui/react-headless": "0.8.0
|
|
52
|
+
"@agnos-ui/core-bootstrap": "0.8.0",
|
|
53
|
+
"@agnos-ui/react-headless": "0.8.0",
|
|
54
54
|
"clsx": "^2.1.1"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
"accordion",
|
|
74
74
|
"AgnosUI",
|
|
75
75
|
"alert",
|
|
76
|
+
"carousel",
|
|
76
77
|
"collapse",
|
|
77
78
|
"components",
|
|
78
79
|
"modal",
|
|
@@ -81,6 +82,7 @@
|
|
|
81
82
|
"rating",
|
|
82
83
|
"slider",
|
|
83
84
|
"toast",
|
|
85
|
+
"tree",
|
|
84
86
|
"widgets"
|
|
85
87
|
]
|
|
86
88
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Slot } from "@agnos-ui/react-headless/slot";
|
|
3
|
-
import { useDirectives,
|
|
3
|
+
import { useDirectives, useDirective, classDirective } from "@agnos-ui/react-headless/utils/directive";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
import { useWidgetWithConfig } from "./generated/config.js";
|
|
6
6
|
import { getSelectDefaultConfig, createSelect } from "@agnos-ui/core-bootstrap/components/select";
|
|
@@ -2,57 +2,33 @@
|
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
3
|
const slot = require("@agnos-ui/react-headless/slot");
|
|
4
4
|
const directive = require("@agnos-ui/react-headless/utils/directive");
|
|
5
|
+
const clsx = require("clsx");
|
|
5
6
|
const React = require("react");
|
|
6
7
|
const generated_config = require("./generated/config.cjs");
|
|
7
8
|
const slider = require("@agnos-ui/core-bootstrap/components/slider");
|
|
8
9
|
const export_getSliderDefaultConfig = slider.getSliderDefaultConfig;
|
|
9
10
|
const export_createSlider = slider.createSlider;
|
|
10
11
|
const SliderDefaultSlotHandle = (slotContext) => {
|
|
11
|
-
return /* @__PURE__ */ jsxRuntime.jsx("button", { ...directive.useDirective(slotContext.directives.handleDirective, { item: slotContext.item })
|
|
12
|
+
return /* @__PURE__ */ jsxRuntime.jsx("button", { ...directive.useDirective(slotContext.directives.handleDirective, { item: slotContext.item }) });
|
|
12
13
|
};
|
|
13
14
|
const TickLabelDisplay = ({ directive: directive$1, tick }) => {
|
|
14
15
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { ...directive.useDirective(directive$1, { tick }), children: tick.value });
|
|
15
16
|
};
|
|
16
17
|
const SliderDefaultTick = (slotContext) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
17
18
|
slotContext.tick.displayLabel && /* @__PURE__ */ jsxRuntime.jsx(TickLabelDisplay, { directive: slotContext.directives.tickLabelDirective, tick: slotContext.tick }),
|
|
18
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { ...directive.useDirective(slotContext.directives.tickDirective, { tick: slotContext.tick }), children:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
fill: slotContext.state.disabled ? "var(--bs-slider-tick-disabled-color)" : "var(--bs-slider-tick-selected-color)"
|
|
32
|
-
}
|
|
33
|
-
),
|
|
34
|
-
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50%", cy: "50%", r: "25%", fill: "white" })
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
38
|
-
"svg",
|
|
39
|
-
{
|
|
40
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
41
|
-
style: { width: "var(--bs-slider-tick-secondary-size)", height: "var(--bs-slider-tick-primary-size)" },
|
|
42
|
-
fill: "none",
|
|
43
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
44
|
-
"circle",
|
|
45
|
-
{
|
|
46
|
-
cx: "50%",
|
|
47
|
-
cy: "50%",
|
|
48
|
-
r: "45%",
|
|
49
|
-
fill: "white",
|
|
50
|
-
stroke: slotContext.state.disabled ? "var(--bs-slider-tick-disabled-color)" : "var(--bs-slider-tick-neutral-color)",
|
|
51
|
-
strokeWidth: "1.5"
|
|
52
|
-
}
|
|
53
|
-
)
|
|
54
|
-
}
|
|
55
|
-
) })
|
|
19
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { ...directive.useDirective(slotContext.directives.tickDirective, { tick: slotContext.tick }), children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", children: [
|
|
20
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
21
|
+
"circle",
|
|
22
|
+
{
|
|
23
|
+
className: clsx(
|
|
24
|
+
"au-slider-tick-outer",
|
|
25
|
+
{ "au-slider-tick-disabled": slotContext.state.disabled },
|
|
26
|
+
{ "au-slider-tick-selected": slotContext.tick.selected }
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
slotContext.tick.selected && /* @__PURE__ */ jsxRuntime.jsx("circle", { className: "au-slider-tick-inner au-slider-tick-selected" })
|
|
31
|
+
] }) })
|
|
56
32
|
] });
|
|
57
33
|
const ProgressDisplay = ({ directive: directive$1, option }) => {
|
|
58
34
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...directive.useDirective(directive$1, { option }) });
|
|
@@ -1,57 +1,33 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Slot } from "@agnos-ui/react-headless/slot";
|
|
3
3
|
import { useDirective } from "@agnos-ui/react-headless/utils/directive";
|
|
4
|
+
import clsx from "clsx";
|
|
4
5
|
import React__default from "react";
|
|
5
6
|
import { useWidgetWithConfig } from "./generated/config.js";
|
|
6
7
|
import { getSliderDefaultConfig, createSlider } from "@agnos-ui/core-bootstrap/components/slider";
|
|
7
8
|
const export_getSliderDefaultConfig = getSliderDefaultConfig;
|
|
8
9
|
const export_createSlider = createSlider;
|
|
9
10
|
const SliderDefaultSlotHandle = (slotContext) => {
|
|
10
|
-
return /* @__PURE__ */ jsx("button", { ...useDirective(slotContext.directives.handleDirective, { item: slotContext.item })
|
|
11
|
+
return /* @__PURE__ */ jsx("button", { ...useDirective(slotContext.directives.handleDirective, { item: slotContext.item }) });
|
|
11
12
|
};
|
|
12
13
|
const TickLabelDisplay = ({ directive, tick }) => {
|
|
13
14
|
return /* @__PURE__ */ jsx("span", { ...useDirective(directive, { tick }), children: tick.value });
|
|
14
15
|
};
|
|
15
16
|
const SliderDefaultTick = (slotContext) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
16
17
|
slotContext.tick.displayLabel && /* @__PURE__ */ jsx(TickLabelDisplay, { directive: slotContext.directives.tickLabelDirective, tick: slotContext.tick }),
|
|
17
|
-
/* @__PURE__ */ jsx("span", { ...useDirective(slotContext.directives.tickDirective, { tick: slotContext.tick }), children:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
fill: slotContext.state.disabled ? "var(--bs-slider-tick-disabled-color)" : "var(--bs-slider-tick-selected-color)"
|
|
31
|
-
}
|
|
32
|
-
),
|
|
33
|
-
/* @__PURE__ */ jsx("circle", { cx: "50%", cy: "50%", r: "25%", fill: "white" })
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
) : /* @__PURE__ */ jsx(
|
|
37
|
-
"svg",
|
|
38
|
-
{
|
|
39
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
40
|
-
style: { width: "var(--bs-slider-tick-secondary-size)", height: "var(--bs-slider-tick-primary-size)" },
|
|
41
|
-
fill: "none",
|
|
42
|
-
children: /* @__PURE__ */ jsx(
|
|
43
|
-
"circle",
|
|
44
|
-
{
|
|
45
|
-
cx: "50%",
|
|
46
|
-
cy: "50%",
|
|
47
|
-
r: "45%",
|
|
48
|
-
fill: "white",
|
|
49
|
-
stroke: slotContext.state.disabled ? "var(--bs-slider-tick-disabled-color)" : "var(--bs-slider-tick-neutral-color)",
|
|
50
|
-
strokeWidth: "1.5"
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
}
|
|
54
|
-
) })
|
|
18
|
+
/* @__PURE__ */ jsx("span", { ...useDirective(slotContext.directives.tickDirective, { tick: slotContext.tick }), children: /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", children: [
|
|
19
|
+
/* @__PURE__ */ jsx(
|
|
20
|
+
"circle",
|
|
21
|
+
{
|
|
22
|
+
className: clsx(
|
|
23
|
+
"au-slider-tick-outer",
|
|
24
|
+
{ "au-slider-tick-disabled": slotContext.state.disabled },
|
|
25
|
+
{ "au-slider-tick-selected": slotContext.tick.selected }
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
slotContext.tick.selected && /* @__PURE__ */ jsx("circle", { className: "au-slider-tick-inner au-slider-tick-selected" })
|
|
30
|
+
] }) })
|
|
55
31
|
] });
|
|
56
32
|
const ProgressDisplay = ({ directive, option }) => {
|
|
57
33
|
return /* @__PURE__ */ jsx("div", { ...useDirective(directive, { option }) });
|