@agnos-ui/react-bootstrap 0.10.0-next.2 → 0.10.0-next.4
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-Cps8J5iu.js → accordion-B8wmx48C.js} +4 -4
- package/{accordion-b13N6177.cjs → accordion-DIevxZw0.cjs} +4 -4
- package/{alert-D2bu7Ulu.js → alert-Bd181T16.js} +2 -2
- package/{alert-56ypguOK.cjs → alert-D2l-7XUp.cjs} +2 -2
- package/{collapse-D2gce6s6.js → collapse-BEn1slHx.js} +2 -2
- package/{collapse-Dtanmp3a.cjs → collapse-DhGllWRw.cjs} +2 -2
- package/components/accordion/accordion.d.ts +2 -2
- package/components/accordion/index.cjs +1 -1
- package/components/accordion/index.js +1 -1
- package/components/alert/alert.d.ts +1 -1
- package/components/alert/index.cjs +1 -1
- package/components/alert/index.js +1 -1
- package/components/collapse/collapse.d.ts +1 -1
- package/components/collapse/index.cjs +1 -1
- package/components/collapse/index.js +1 -1
- package/components/drawer/drawer.d.ts +1 -1
- package/components/drawer/drawer.gen.d.ts +39 -21
- package/components/drawer/index.cjs +1 -1
- package/components/drawer/index.js +1 -1
- package/components/modal/index.cjs +1 -1
- package/components/modal/index.js +1 -1
- package/components/modal/modal.d.ts +1 -1
- package/components/pagination/index.cjs +1 -1
- package/components/pagination/index.js +1 -1
- package/components/pagination/pagination.d.ts +1 -1
- package/components/rating/index.cjs +1 -1
- package/components/rating/index.js +1 -1
- package/components/rating/rating.d.ts +2 -1
- package/components/select/index.cjs +1 -1
- package/components/select/index.js +1 -1
- package/components/select/select.d.ts +2 -1
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.js +1 -1
- package/components/toast/index.cjs +1 -1
- package/components/toast/index.js +1 -1
- package/components/toast/toast.d.ts +2 -2
- package/{drawer-iEXzDYco.js → drawer-BvsFOxUr.js} +10 -8
- package/{drawer-D1dVH8iO.cjs → drawer-EEj6XJt5.cjs} +9 -7
- package/generated/index.d.ts +1 -0
- package/generated/services/pointerdownPosition.cjs +9 -0
- package/generated/services/pointerdownPosition.d.ts +1 -0
- package/generated/services/pointerdownPosition.js +1 -0
- package/index.cjs +17 -10
- package/index.js +11 -10
- package/{modal-DSduAQXI.cjs → modal-B21qPCdO.cjs} +2 -2
- package/{modal-CCDHxJ6u.js → modal-B_qm-rX4.js} +2 -2
- package/package.json +3 -3
- package/{pagination-ZxTUf5Pm.cjs → pagination-DHr9ZjIC.cjs} +2 -2
- package/{pagination-60ge4D0q.js → pagination-DxWDUndf.js} +2 -2
- package/{rating-Dt-vNocw.js → rating-BAJQ5zyV.js} +2 -2
- package/{rating-B2erO56i.cjs → rating-uCcBubHZ.cjs} +2 -2
- package/{select-aWj112ds.js → select-DVQJN33M.js} +2 -2
- package/{select-DgXUNQIA.cjs → select-_SDoN__X.cjs} +2 -2
- package/{slider-DhviBEZe.cjs → slider-BGUFmm57.cjs} +1 -1
- package/{slider-CBzyKG2u.js → slider-CzO--VPp.js} +1 -1
- package/{toasterProvider-BU8FKWH6.js → toasterProvider-BcueMHl1.js} +2 -2
- package/{toasterProvider-Dt2XqB9t.cjs → toasterProvider-CWGY-kqw.cjs} +2 -2
|
@@ -18,7 +18,7 @@ const AccordionItemDefaultSlotStructure = (slotContext) => /* @__PURE__ */ jsxs(
|
|
|
18
18
|
/* @__PURE__ */ jsx(Header, { directive: slotContext.directives.headerDirective, headingLevel: slotContext.state.headingLevel, children: /* @__PURE__ */ jsx("button", { ...useDirectives([classDirective, "accordion-button"], slotContext.directives.buttonDirective), children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.header, props: slotContext }) }) }),
|
|
19
19
|
slotContext.state.shouldBeInDOM && /* @__PURE__ */ jsx(ItemContent, { ...slotContext })
|
|
20
20
|
] });
|
|
21
|
-
function AccordionItem(props) {
|
|
21
|
+
function AccordionItem({ ref, ...props }) {
|
|
22
22
|
const { registerItem } = useContext(AccordionDIContext);
|
|
23
23
|
const id = useId();
|
|
24
24
|
const widgetContext = useWidget(registerItem, props, {
|
|
@@ -26,15 +26,15 @@ function AccordionItem(props) {
|
|
|
26
26
|
id
|
|
27
27
|
});
|
|
28
28
|
const { state, api, directives } = widgetContext;
|
|
29
|
-
useImperativeHandle(
|
|
29
|
+
useImperativeHandle(ref, () => api, [api]);
|
|
30
30
|
useEffect(() => {
|
|
31
31
|
api.initDone();
|
|
32
32
|
}, [api]);
|
|
33
33
|
return /* @__PURE__ */ jsx("div", { ...useDirectives([classDirective, `accordion-item ${state.className}`], directives.itemDirective), children: /* @__PURE__ */ jsx(Slot, { slotContent: state.structure, props: widgetContext }) });
|
|
34
34
|
}
|
|
35
|
-
function Accordion(props) {
|
|
35
|
+
function Accordion({ ref, ...props }) {
|
|
36
36
|
const widget = useWidget(export_createAccordion, props);
|
|
37
|
-
useImperativeHandle(
|
|
37
|
+
useImperativeHandle(ref, () => widget.api, [widget.api]);
|
|
38
38
|
return /* @__PURE__ */ jsx(AccordionDIContext, { value: widget.api, children: /* @__PURE__ */ jsx("div", { ...useDirectives([classDirective, "accordion"], widget.directives.accordionDirective), children: props.children }) });
|
|
39
39
|
}
|
|
40
40
|
export {
|
|
@@ -19,7 +19,7 @@ const AccordionItemDefaultSlotStructure = (slotContext) => /* @__PURE__ */ jsxRu
|
|
|
19
19
|
/* @__PURE__ */ jsxRuntime.jsx(Header, { directive: slotContext.directives.headerDirective, headingLevel: slotContext.state.headingLevel, children: /* @__PURE__ */ jsxRuntime.jsx("button", { ...directive.useDirectives([directive.classDirective, "accordion-button"], slotContext.directives.buttonDirective), children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.header, props: slotContext }) }) }),
|
|
20
20
|
slotContext.state.shouldBeInDOM && /* @__PURE__ */ jsxRuntime.jsx(ItemContent, { ...slotContext })
|
|
21
21
|
] });
|
|
22
|
-
function AccordionItem(props) {
|
|
22
|
+
function AccordionItem({ ref, ...props }) {
|
|
23
23
|
const { registerItem } = React.useContext(AccordionDIContext);
|
|
24
24
|
const id = React.useId();
|
|
25
25
|
const widgetContext = generated_config.useWidget(registerItem, props, {
|
|
@@ -27,15 +27,15 @@ function AccordionItem(props) {
|
|
|
27
27
|
id
|
|
28
28
|
});
|
|
29
29
|
const { state, api, directives } = widgetContext;
|
|
30
|
-
React.useImperativeHandle(
|
|
30
|
+
React.useImperativeHandle(ref, () => api, [api]);
|
|
31
31
|
React.useEffect(() => {
|
|
32
32
|
api.initDone();
|
|
33
33
|
}, [api]);
|
|
34
34
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...directive.useDirectives([directive.classDirective, `accordion-item ${state.className}`], directives.itemDirective), children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.structure, props: widgetContext }) });
|
|
35
35
|
}
|
|
36
|
-
function Accordion(props) {
|
|
36
|
+
function Accordion({ ref, ...props }) {
|
|
37
37
|
const widget = generated_config.useWidget(export_createAccordion, props);
|
|
38
|
-
React.useImperativeHandle(
|
|
38
|
+
React.useImperativeHandle(ref, () => widget.api, [widget.api]);
|
|
39
39
|
return /* @__PURE__ */ jsxRuntime.jsx(AccordionDIContext, { value: widget.api, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ...directive.useDirectives([directive.classDirective, "accordion"], widget.directives.accordionDirective), children: props.children }) });
|
|
40
40
|
}
|
|
41
41
|
exports.Accordion = Accordion;
|
|
@@ -24,11 +24,11 @@ const AlertElement = (slotContext) => /* @__PURE__ */ jsx(
|
|
|
24
24
|
children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.structure, props: slotContext })
|
|
25
25
|
}
|
|
26
26
|
);
|
|
27
|
-
function Alert(props) {
|
|
27
|
+
function Alert({ ref, ...props }) {
|
|
28
28
|
const widgetContext = useWidget(export_createAlert, props, {
|
|
29
29
|
structure: AlertDefaultSlotStructure
|
|
30
30
|
});
|
|
31
|
-
useImperativeHandle(
|
|
31
|
+
useImperativeHandle(ref, () => widgetContext.api, [widgetContext.api]);
|
|
32
32
|
return /* @__PURE__ */ jsx(Fragment, { children: !widgetContext.state.hidden && /* @__PURE__ */ jsx(AlertElement, { ...widgetContext }) });
|
|
33
33
|
}
|
|
34
34
|
export {
|
|
@@ -25,11 +25,11 @@ const AlertElement = (slotContext) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
25
25
|
children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.structure, props: slotContext })
|
|
26
26
|
}
|
|
27
27
|
);
|
|
28
|
-
function Alert(props) {
|
|
28
|
+
function Alert({ ref, ...props }) {
|
|
29
29
|
const widgetContext = generated_config.useWidget(export_createAlert, props, {
|
|
30
30
|
structure: AlertDefaultSlotStructure
|
|
31
31
|
});
|
|
32
|
-
React.useImperativeHandle(
|
|
32
|
+
React.useImperativeHandle(ref, () => widgetContext.api, [widgetContext.api]);
|
|
33
33
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: !widgetContext.state.hidden && /* @__PURE__ */ jsxRuntime.jsx(AlertElement, { ...widgetContext }) });
|
|
34
34
|
}
|
|
35
35
|
exports.Alert = Alert;
|
|
@@ -5,10 +5,10 @@ import { getCollapseDefaultConfig, createCollapse } from "@agnos-ui/core-bootstr
|
|
|
5
5
|
import { useDirectives } from "@agnos-ui/react-headless/utils/directive";
|
|
6
6
|
const export_getCollapseDefaultConfig = getCollapseDefaultConfig;
|
|
7
7
|
const export_createCollapse = createCollapse;
|
|
8
|
-
function Collapse(props) {
|
|
8
|
+
function Collapse({ ref, ...props }) {
|
|
9
9
|
const id = useId();
|
|
10
10
|
const { api, directives } = useWidget(export_createCollapse, props, { id });
|
|
11
|
-
useImperativeHandle(
|
|
11
|
+
useImperativeHandle(ref, () => api, [api]);
|
|
12
12
|
return /* @__PURE__ */ jsx("div", { ...useDirectives(directives.collapseDirective), children: props.children });
|
|
13
13
|
}
|
|
14
14
|
export {
|
|
@@ -6,10 +6,10 @@ const collapse = require("@agnos-ui/core-bootstrap/components/collapse");
|
|
|
6
6
|
const directive = require("@agnos-ui/react-headless/utils/directive");
|
|
7
7
|
const export_getCollapseDefaultConfig = collapse.getCollapseDefaultConfig;
|
|
8
8
|
const export_createCollapse = collapse.createCollapse;
|
|
9
|
-
function Collapse(props) {
|
|
9
|
+
function Collapse({ ref, ...props }) {
|
|
10
10
|
const id = React.useId();
|
|
11
11
|
const { api, directives } = generated_config.useWidget(export_createCollapse, props, { id });
|
|
12
|
-
React.useImperativeHandle(
|
|
12
|
+
React.useImperativeHandle(ref, () => api, [api]);
|
|
13
13
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...directive.useDirectives(directives.collapseDirective), children: props.children });
|
|
14
14
|
}
|
|
15
15
|
exports.Collapse = Collapse;
|
|
@@ -26,7 +26,7 @@ export declare const AccordionItemDefaultSlotStructure: (slotContext: AccordionI
|
|
|
26
26
|
* @see {@link useWidget}
|
|
27
27
|
* @see {@link useDirectives}
|
|
28
28
|
*/
|
|
29
|
-
export declare function AccordionItem(props: Partial<AccordionItemProps> & {
|
|
29
|
+
export declare function AccordionItem({ ref, ...props }: Partial<AccordionItemProps> & {
|
|
30
30
|
ref?: Ref<AccordionItemApi>;
|
|
31
31
|
}): import("react/jsx-runtime").JSX.Element;
|
|
32
32
|
/**
|
|
@@ -42,6 +42,6 @@ export declare function AccordionItem(props: Partial<AccordionItemProps> & {
|
|
|
42
42
|
* @returns The rendered Accordion component.
|
|
43
43
|
*
|
|
44
44
|
*/
|
|
45
|
-
export declare function Accordion(props: PropsWithChildren<Partial<AccordionProps>> & {
|
|
45
|
+
export declare function Accordion({ ref, ...props }: PropsWithChildren<Partial<AccordionProps>> & {
|
|
46
46
|
ref?: ForwardedRef<AccordionApi>;
|
|
47
47
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const accordion = require("../../accordion-
|
|
3
|
+
const accordion = require("../../accordion-DIevxZw0.cjs");
|
|
4
4
|
exports.Accordion = accordion.Accordion;
|
|
5
5
|
exports.AccordionItem = accordion.AccordionItem;
|
|
6
6
|
exports.AccordionItemDefaultSlotStructure = accordion.AccordionItemDefaultSlotStructure;
|
|
@@ -18,6 +18,6 @@ export declare const AlertDefaultSlotStructure: (slotContext: AlertContext) => i
|
|
|
18
18
|
*
|
|
19
19
|
* @returns A JSX element that conditionally renders the AlertElement based on the widget's hidden state.
|
|
20
20
|
*/
|
|
21
|
-
export declare function Alert(props: Partial<AlertProps> & {
|
|
21
|
+
export declare function Alert({ ref, ...props }: Partial<AlertProps> & {
|
|
22
22
|
ref?: Ref<AlertApi>;
|
|
23
23
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const alert = require("../../alert-
|
|
3
|
+
const alert = require("../../alert-D2l-7XUp.cjs");
|
|
4
4
|
exports.Alert = alert.Alert;
|
|
5
5
|
exports.AlertDefaultSlotStructure = alert.AlertDefaultSlotStructure;
|
|
6
6
|
exports.createAlert = alert.export_createAlert;
|
|
@@ -12,6 +12,6 @@ import type { CollapseApi, CollapseProps } from './collapse.gen';
|
|
|
12
12
|
*
|
|
13
13
|
* @returns A div element with transition directives applied, containing the child elements.
|
|
14
14
|
*/
|
|
15
|
-
export declare function Collapse(props: PropsWithChildren<Partial<CollapseProps>> & {
|
|
15
|
+
export declare function Collapse({ ref, ...props }: PropsWithChildren<Partial<CollapseProps>> & {
|
|
16
16
|
ref?: Ref<CollapseApi>;
|
|
17
17
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const collapse = require("../../collapse-
|
|
3
|
+
const collapse = require("../../collapse-DhGllWRw.cjs");
|
|
4
4
|
exports.Collapse = collapse.Collapse;
|
|
5
5
|
exports.createCollapse = collapse.export_createCollapse;
|
|
6
6
|
exports.getCollapseDefaultConfig = collapse.export_getCollapseDefaultConfig;
|
|
@@ -17,6 +17,6 @@ export declare const DefaultDrawerSlotStructure: (slotContext: DrawerContext) =>
|
|
|
17
17
|
* The Drawer component uses the {@link useWidget} hook to create a widget context with the provided
|
|
18
18
|
* configuration. It renders the slot content using the `Slot` component.
|
|
19
19
|
*/
|
|
20
|
-
export declare function Drawer(props: Partial<DrawerProps> & {
|
|
20
|
+
export declare function Drawer({ ref, ...props }: Partial<DrawerProps> & {
|
|
21
21
|
ref?: Ref<DrawerApi>;
|
|
22
22
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -59,6 +59,13 @@ export interface DrawerState {
|
|
|
59
59
|
* @defaultValue `false`
|
|
60
60
|
*/
|
|
61
61
|
resizable: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Size of the drawer in pixel once the user start interacting.
|
|
64
|
+
* It corresponds to the height or the width depending on the drawer orientation
|
|
65
|
+
*
|
|
66
|
+
* @defaultValue `null`
|
|
67
|
+
*/
|
|
68
|
+
size: number | null;
|
|
62
69
|
/**
|
|
63
70
|
* Global template for the drawer component
|
|
64
71
|
*/
|
|
@@ -118,18 +125,6 @@ export interface DrawerProps {
|
|
|
118
125
|
* @defaultValue `''`
|
|
119
126
|
*/
|
|
120
127
|
ariaDescribedBy: string;
|
|
121
|
-
/**
|
|
122
|
-
* The width of the drawer in pixels.
|
|
123
|
-
*
|
|
124
|
-
* @defaultValue `200`
|
|
125
|
-
*/
|
|
126
|
-
width: number;
|
|
127
|
-
/**
|
|
128
|
-
* The height of the drawer in pixels.
|
|
129
|
-
*
|
|
130
|
-
* @defaultValue `200`
|
|
131
|
-
*/
|
|
132
|
-
height: number;
|
|
133
128
|
/**
|
|
134
129
|
* If `true` displays the backdrop element and disables the body scrolling, otherwise the body of the document is navigable
|
|
135
130
|
*
|
|
@@ -161,38 +156,54 @@ export interface DrawerProps {
|
|
|
161
156
|
*/
|
|
162
157
|
onShown: () => void;
|
|
163
158
|
/**
|
|
164
|
-
* An event emitted when the width
|
|
159
|
+
* An event emitted when the drawer size changes (width or height depending on the orientation).
|
|
165
160
|
*
|
|
166
|
-
* Event payload is equal to the newly selected width.
|
|
161
|
+
* Event payload is equal to the newly selected width or height.
|
|
167
162
|
*
|
|
168
163
|
* @defaultValue
|
|
169
164
|
* ```ts
|
|
170
165
|
* () => {}
|
|
171
166
|
* ```
|
|
172
167
|
*/
|
|
173
|
-
|
|
168
|
+
onSizeChange: (size: number | null) => void;
|
|
174
169
|
/**
|
|
175
|
-
*
|
|
170
|
+
* Event to be triggered when the visible property changes.
|
|
176
171
|
*
|
|
177
|
-
*
|
|
172
|
+
* @param visible - new value of the visible propery
|
|
178
173
|
*
|
|
179
174
|
* @defaultValue
|
|
180
175
|
* ```ts
|
|
181
176
|
* () => {}
|
|
182
177
|
* ```
|
|
183
178
|
*/
|
|
184
|
-
|
|
179
|
+
onVisibleChange: (visible: boolean) => void;
|
|
185
180
|
/**
|
|
186
|
-
* Event to be triggered when the
|
|
181
|
+
* Event to be triggered when the minimized state changes.
|
|
187
182
|
*
|
|
188
|
-
* @
|
|
183
|
+
* @defaultValue
|
|
184
|
+
* ```ts
|
|
185
|
+
* () => {}
|
|
186
|
+
* ```
|
|
187
|
+
*/
|
|
188
|
+
onMinimizedChange: (isMinimized: boolean) => void;
|
|
189
|
+
/**
|
|
190
|
+
* Event to be triggered when the maximized state changes.
|
|
189
191
|
*
|
|
190
192
|
* @defaultValue
|
|
191
193
|
* ```ts
|
|
192
194
|
* () => {}
|
|
193
195
|
* ```
|
|
194
196
|
*/
|
|
195
|
-
|
|
197
|
+
onMaximizedChange: (isMaximized: boolean) => void;
|
|
198
|
+
/**
|
|
199
|
+
* Event to be triggered when the user starts or stops resizing the drawer.
|
|
200
|
+
*
|
|
201
|
+
* @defaultValue
|
|
202
|
+
* ```ts
|
|
203
|
+
* () => {}
|
|
204
|
+
* ```
|
|
205
|
+
*/
|
|
206
|
+
onResizingChange: (isResizing: boolean) => void;
|
|
196
207
|
/**
|
|
197
208
|
* CSS classes to be applied on the widget main container
|
|
198
209
|
*
|
|
@@ -228,6 +239,13 @@ export interface DrawerProps {
|
|
|
228
239
|
* @defaultValue `false`
|
|
229
240
|
*/
|
|
230
241
|
resizable: boolean;
|
|
242
|
+
/**
|
|
243
|
+
* Size of the drawer in pixel once the user start interacting.
|
|
244
|
+
* It corresponds to the height or the width depending on the drawer orientation
|
|
245
|
+
*
|
|
246
|
+
* @defaultValue `null`
|
|
247
|
+
*/
|
|
248
|
+
size: number | null;
|
|
231
249
|
/**
|
|
232
250
|
* Global template for the drawer component
|
|
233
251
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const drawer = require("../../drawer-
|
|
3
|
+
const drawer = require("../../drawer-EEj6XJt5.cjs");
|
|
4
4
|
exports.DefaultDrawerSlotStructure = drawer.DefaultDrawerSlotStructure;
|
|
5
5
|
exports.Drawer = drawer.Drawer;
|
|
6
6
|
exports.createDrawer = drawer.export_createDrawer;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const modal = require("../../modal-
|
|
3
|
+
const modal = require("../../modal-B21qPCdO.cjs");
|
|
4
4
|
exports.Modal = modal.Modal;
|
|
5
5
|
exports.ModalDefaultSlotHeader = modal.ModalDefaultSlotHeader;
|
|
6
6
|
exports.ModalDefaultSlotStructure = modal.ModalDefaultSlotStructure;
|
|
@@ -26,7 +26,7 @@ export declare const ModalDefaultSlotStructure: <Data>(slotContext: ModalContext
|
|
|
26
26
|
*
|
|
27
27
|
* @returns The rendered Modal component.
|
|
28
28
|
*/
|
|
29
|
-
export declare function Modal<Data>(props: Partial<ModalProps<Data>> & {
|
|
29
|
+
export declare function Modal<Data>({ ref, ...props }: Partial<ModalProps<Data>> & {
|
|
30
30
|
ref?: Ref<ModalApi<Data>>;
|
|
31
31
|
}): import("react/jsx-runtime").JSX.Element;
|
|
32
32
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const pagination = require("../../pagination-
|
|
3
|
+
const pagination = require("../../pagination-DHr9ZjIC.cjs");
|
|
4
4
|
exports.NavButton = pagination.NavButton;
|
|
5
5
|
exports.PageItem = pagination.PageItem;
|
|
6
6
|
exports.Pagination = pagination.Pagination;
|
|
@@ -35,6 +35,6 @@ export declare const PaginationDefaultSlotStructure: (slotContext: PaginationCon
|
|
|
35
35
|
* @param props.ref - Forwarded reference to the PaginationApi.
|
|
36
36
|
* @returns The rendered pagination navigation element.
|
|
37
37
|
*/
|
|
38
|
-
export declare function Pagination(props: Partial<PaginationProps> & {
|
|
38
|
+
export declare function Pagination({ ref, ...props }: Partial<PaginationProps> & {
|
|
39
39
|
ref?: Ref<PaginationApi>;
|
|
40
40
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const rating = require("../../rating-
|
|
3
|
+
const rating = require("../../rating-uCcBubHZ.cjs");
|
|
4
4
|
exports.Rating = rating.Rating;
|
|
5
5
|
exports.createRating = rating.export_createRating;
|
|
6
6
|
exports.getRatingDefaultConfig = rating.export_getRatingDefaultConfig;
|
|
@@ -4,6 +4,7 @@ import type { RatingApi, RatingProps } from './rating.gen';
|
|
|
4
4
|
* Rating component that displays a series of stars based on the provided state.
|
|
5
5
|
*
|
|
6
6
|
* @param props - The properties for the Rating component.
|
|
7
|
+
* @param props.ref - Ref to the Rating API.
|
|
7
8
|
* @returns The rendered Rating component.
|
|
8
9
|
*
|
|
9
10
|
* @remarks
|
|
@@ -11,6 +12,6 @@ import type { RatingApi, RatingProps } from './rating.gen';
|
|
|
11
12
|
* It applies directives to the container and individual stars for styling and behavior.
|
|
12
13
|
*
|
|
13
14
|
*/
|
|
14
|
-
export declare function Rating(props: Partial<RatingProps> & {
|
|
15
|
+
export declare function Rating({ ref, ...props }: Partial<RatingProps> & {
|
|
15
16
|
ref?: Ref<RatingApi>;
|
|
16
17
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const select = require("../../select-
|
|
3
|
+
const select = require("../../select-_SDoN__X.cjs");
|
|
4
4
|
exports.Select = select.Select;
|
|
5
5
|
exports.createSelect = select.export_createSelect;
|
|
6
6
|
exports.getSelectDefaultConfig = select.export_getSelectDefaultConfig;
|
|
@@ -5,12 +5,13 @@ import { type Ref } from 'react';
|
|
|
5
5
|
*
|
|
6
6
|
* @template Item - The type of the items in the selection.
|
|
7
7
|
* @param props - The properties for the Select component.
|
|
8
|
+
* @param props.ref - Ref to the Select API.
|
|
8
9
|
* @returns The rendered Select component.
|
|
9
10
|
*
|
|
10
11
|
* @remarks
|
|
11
12
|
* This component uses a widget context to manage its state and directives. It supports
|
|
12
13
|
* custom badge labels and item labels through the widget configuration.
|
|
13
14
|
*/
|
|
14
|
-
export declare function Select<Item>(props: Partial<SelectProps<Item>> & {
|
|
15
|
+
export declare function Select<Item>({ ref, ...props }: Partial<SelectProps<Item>> & {
|
|
15
16
|
ref?: Ref<SelectApi<Item>>;
|
|
16
17
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -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-BGUFmm57.cjs");
|
|
4
4
|
exports.Slider = slider.Slider;
|
|
5
5
|
exports.SliderDefaultSlotHandle = slider.SliderDefaultSlotHandle;
|
|
6
6
|
exports.SliderDefaultSlotStructure = slider.SliderDefaultSlotStructure;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const toasterProvider = require("../../toasterProvider-
|
|
3
|
+
const toasterProvider = require("../../toasterProvider-CWGY-kqw.cjs");
|
|
4
4
|
exports.Toast = toasterProvider.Toast;
|
|
5
5
|
exports.ToastDefaultSlotStructure = toasterProvider.ToastDefaultSlotStructure;
|
|
6
6
|
exports.ToasterContainer = toasterProvider.ToasterContainer;
|
|
@@ -15,10 +15,10 @@ export declare const ToastDefaultSlotStructure: (slotContext: ToastContext) => i
|
|
|
15
15
|
* to expose the widget's API through the forwarded ref.
|
|
16
16
|
*
|
|
17
17
|
* @param props - Partial properties of `ToastProps` to configure the toast widget.
|
|
18
|
-
* @param props.ref - Ref to
|
|
18
|
+
* @param props.ref - Ref to the Toast API.
|
|
19
19
|
*
|
|
20
20
|
* @returns A JSX element that conditionally renders the `ToastElement` based on the widget's state.
|
|
21
21
|
*/
|
|
22
|
-
export declare function Toast(props: Partial<ToastProps> & {
|
|
22
|
+
export declare function Toast({ ref, ...props }: Partial<ToastProps> & {
|
|
23
23
|
ref?: Ref<ToastApi>;
|
|
24
24
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx, Fragment, jsxs } 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
4
|
import { Portal } from "@agnos-ui/react-headless/utils/portal";
|
|
@@ -8,19 +8,21 @@ import { getDrawerDefaultConfig, createDrawer } from "@agnos-ui/core-bootstrap/c
|
|
|
8
8
|
const export_getDrawerDefaultConfig = getDrawerDefaultConfig;
|
|
9
9
|
const export_createDrawer = createDrawer;
|
|
10
10
|
const BackdropElement = ({ directives }) => /* @__PURE__ */ jsx("div", { ...useDirective(directives.backdropDirective) });
|
|
11
|
-
const DrawerElement = (slotContext) => /* @__PURE__ */
|
|
12
|
-
|
|
13
|
-
/* @__PURE__ */ jsx("div", { className: "au-drawer-header", children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.header, props: slotContext }) }),
|
|
14
|
-
/* @__PURE__ */ jsx("div", { className: "au-drawer-body", children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.children, props: slotContext }) }),
|
|
11
|
+
const DrawerElement = (slotContext) => /* @__PURE__ */ jsxs("div", { ...useDirective(slotContext.directives.drawerDirective), children: [
|
|
12
|
+
/* @__PURE__ */ jsx("div", { ...useDirective(slotContext.directives.containerDirective), children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.structure, props: slotContext }) }),
|
|
15
13
|
slotContext.state.resizable && /* @__PURE__ */ jsx(Splitter, { ...slotContext })
|
|
16
14
|
] });
|
|
17
|
-
const
|
|
15
|
+
const DefaultDrawerSlotStructure = (slotContext) => /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "au-drawer-content", children: [
|
|
16
|
+
/* @__PURE__ */ jsx("div", { className: "au-drawer-header", children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.header, props: slotContext }) }),
|
|
17
|
+
/* @__PURE__ */ jsx("div", { className: "au-drawer-body", children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.children, props: slotContext }) })
|
|
18
|
+
] }) });
|
|
19
|
+
const Splitter = (slotContext) => /* @__PURE__ */ jsx("div", { ...useDirective(slotContext.directives.splitterDirective), tabIndex: 0 });
|
|
18
20
|
const defaultConfig = {
|
|
19
21
|
structure: DefaultDrawerSlotStructure
|
|
20
22
|
};
|
|
21
|
-
function Drawer(props) {
|
|
23
|
+
function Drawer({ ref, ...props }) {
|
|
22
24
|
const widgetContext = useWidget(export_createDrawer, props, { ...defaultConfig });
|
|
23
|
-
useImperativeHandle(
|
|
25
|
+
useImperativeHandle(ref, () => widgetContext.api, [widgetContext.api]);
|
|
24
26
|
return /* @__PURE__ */ jsxs(Portal, { container: widgetContext.state.container, children: [
|
|
25
27
|
!widgetContext.state.backdropHidden && /* @__PURE__ */ jsx(BackdropElement, { ...widgetContext }),
|
|
26
28
|
!widgetContext.state.hidden && /* @__PURE__ */ jsx(DrawerElement, { ...widgetContext })
|
|
@@ -9,19 +9,21 @@ const drawer = require("@agnos-ui/core-bootstrap/components/drawer");
|
|
|
9
9
|
const export_getDrawerDefaultConfig = drawer.getDrawerDefaultConfig;
|
|
10
10
|
const export_createDrawer = drawer.createDrawer;
|
|
11
11
|
const BackdropElement = ({ directives }) => /* @__PURE__ */ jsxRuntime.jsx("div", { ...directive.useDirective(directives.backdropDirective) });
|
|
12
|
-
const DrawerElement = (slotContext) => /* @__PURE__ */ jsxRuntime.
|
|
13
|
-
|
|
14
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "au-drawer-header", children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.header, props: slotContext }) }),
|
|
15
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "au-drawer-body", children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.children, props: slotContext }) }),
|
|
12
|
+
const DrawerElement = (slotContext) => /* @__PURE__ */ jsxRuntime.jsxs("div", { ...directive.useDirective(slotContext.directives.drawerDirective), children: [
|
|
13
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { ...directive.useDirective(slotContext.directives.containerDirective), children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.structure, props: slotContext }) }),
|
|
16
14
|
slotContext.state.resizable && /* @__PURE__ */ jsxRuntime.jsx(Splitter, { ...slotContext })
|
|
17
15
|
] });
|
|
18
|
-
const
|
|
16
|
+
const DefaultDrawerSlotStructure = (slotContext) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "au-drawer-content", children: [
|
|
17
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "au-drawer-header", children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.header, props: slotContext }) }),
|
|
18
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "au-drawer-body", children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.children, props: slotContext }) })
|
|
19
|
+
] }) });
|
|
20
|
+
const Splitter = (slotContext) => /* @__PURE__ */ jsxRuntime.jsx("div", { ...directive.useDirective(slotContext.directives.splitterDirective), tabIndex: 0 });
|
|
19
21
|
const defaultConfig = {
|
|
20
22
|
structure: DefaultDrawerSlotStructure
|
|
21
23
|
};
|
|
22
|
-
function Drawer(props) {
|
|
24
|
+
function Drawer({ ref, ...props }) {
|
|
23
25
|
const widgetContext = generated_config.useWidget(export_createDrawer, props, { ...defaultConfig });
|
|
24
|
-
React.useImperativeHandle(
|
|
26
|
+
React.useImperativeHandle(ref, () => widgetContext.api, [widgetContext.api]);
|
|
25
27
|
return /* @__PURE__ */ jsxRuntime.jsxs(portal.Portal, { container: widgetContext.state.container, children: [
|
|
26
28
|
!widgetContext.state.backdropHidden && /* @__PURE__ */ jsxRuntime.jsx(BackdropElement, { ...widgetContext }),
|
|
27
29
|
!widgetContext.state.hidden && /* @__PURE__ */ jsxRuntime.jsx(DrawerElement, { ...widgetContext })
|
package/generated/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from './utils/func';
|
|
|
11
11
|
export * from './services/siblingsInert';
|
|
12
12
|
export * from './services/resizeObserver';
|
|
13
13
|
export * from './services/portal';
|
|
14
|
+
export * from './services/pointerdownPosition';
|
|
14
15
|
export * from './services/navManager';
|
|
15
16
|
export * from './services/matchMedia';
|
|
16
17
|
export * from './services/intersection';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const pointerdownPosition = require("@agnos-ui/react-headless/services/pointerdownPosition");
|
|
4
|
+
Object.keys(pointerdownPosition).forEach((k) => {
|
|
5
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: () => pointerdownPosition[k]
|
|
8
|
+
});
|
|
9
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@agnos-ui/react-headless/services/pointerdownPosition';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@agnos-ui/react-headless/services/pointerdownPosition";
|
package/index.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const accordion = require("./accordion-
|
|
4
|
-
const alert = require("./alert-
|
|
3
|
+
const accordion = require("./accordion-DIevxZw0.cjs");
|
|
4
|
+
const alert = require("./alert-D2l-7XUp.cjs");
|
|
5
5
|
const carousel = require("./carousel-DyA8lWos.cjs");
|
|
6
|
-
const collapse = require("./collapse-
|
|
7
|
-
const modal = require("./modal-
|
|
8
|
-
const pagination = require("./pagination-
|
|
6
|
+
const collapse = require("./collapse-DhGllWRw.cjs");
|
|
7
|
+
const modal = require("./modal-B21qPCdO.cjs");
|
|
8
|
+
const pagination = require("./pagination-DHr9ZjIC.cjs");
|
|
9
9
|
const progressbar = require("./progressbar-CC5WyAKM.cjs");
|
|
10
|
-
const rating = require("./rating-
|
|
11
|
-
const select = require("./select-
|
|
12
|
-
const slider = require("./slider-
|
|
13
|
-
const toasterProvider = require("./toasterProvider-
|
|
10
|
+
const rating = require("./rating-uCcBubHZ.cjs");
|
|
11
|
+
const select = require("./select-_SDoN__X.cjs");
|
|
12
|
+
const slider = require("./slider-BGUFmm57.cjs");
|
|
13
|
+
const toasterProvider = require("./toasterProvider-CWGY-kqw.cjs");
|
|
14
14
|
const tree = require("./tree--CHag_Wm.cjs");
|
|
15
|
-
const drawer = require("./drawer-
|
|
15
|
+
const drawer = require("./drawer-EEj6XJt5.cjs");
|
|
16
16
|
const types = require("@agnos-ui/react-headless/types");
|
|
17
17
|
const types$1 = require("@agnos-ui/core-bootstrap/types");
|
|
18
18
|
const slot = require("@agnos-ui/react-headless/slot");
|
|
@@ -27,6 +27,7 @@ const func = require("@agnos-ui/react-headless/utils/func");
|
|
|
27
27
|
const siblingsInert = require("@agnos-ui/react-headless/services/siblingsInert");
|
|
28
28
|
const resizeObserver = require("@agnos-ui/react-headless/services/resizeObserver");
|
|
29
29
|
const portal$1 = require("@agnos-ui/react-headless/services/portal");
|
|
30
|
+
const pointerdownPosition = require("@agnos-ui/react-headless/services/pointerdownPosition");
|
|
30
31
|
const navManager = require("@agnos-ui/react-headless/services/navManager");
|
|
31
32
|
const matchMedia = require("@agnos-ui/react-headless/services/matchMedia");
|
|
32
33
|
const intersection = require("@agnos-ui/react-headless/services/intersection");
|
|
@@ -193,6 +194,12 @@ Object.keys(portal$1).forEach((k) => {
|
|
|
193
194
|
get: () => portal$1[k]
|
|
194
195
|
});
|
|
195
196
|
});
|
|
197
|
+
Object.keys(pointerdownPosition).forEach((k) => {
|
|
198
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
199
|
+
enumerable: true,
|
|
200
|
+
get: () => pointerdownPosition[k]
|
|
201
|
+
});
|
|
202
|
+
});
|
|
196
203
|
Object.keys(navManager).forEach((k) => {
|
|
197
204
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
198
205
|
enumerable: true,
|
package/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { b, a, A, d, c, f, e } from "./accordion-
|
|
2
|
-
import { a as a2, A as A2, b as b2, e as e2 } from "./alert-
|
|
1
|
+
import { b, a, A, d, c, f, e } from "./accordion-B8wmx48C.js";
|
|
2
|
+
import { a as a2, A as A2, b as b2, e as e2 } from "./alert-Bd181T16.js";
|
|
3
3
|
import { c as c2, C, b as b3, a as a3, e as e3 } from "./carousel-C6hfiwd2.js";
|
|
4
|
-
import { C as C2, a as a4, e as e4 } from "./collapse-
|
|
5
|
-
import { b as b4, M, a as a5, c as c3, e as e5, f as f2, g, d as d2, o } from "./modal-
|
|
6
|
-
import { N, P, c as c4, a as a6, b as b5, d as d3, e as e6 } from "./pagination-
|
|
4
|
+
import { C as C2, a as a4, e as e4 } from "./collapse-BEn1slHx.js";
|
|
5
|
+
import { b as b4, M, a as a5, c as c3, e as e5, f as f2, g, d as d2, o } from "./modal-B_qm-rX4.js";
|
|
6
|
+
import { N, P, c as c4, a as a6, b as b5, d as d3, e as e6 } from "./pagination-DxWDUndf.js";
|
|
7
7
|
import { a as a7, P as P2, b as b6, e as e7 } from "./progressbar-B1ZwY3G2.js";
|
|
8
|
-
import { R, a as a8, e as e8 } from "./rating-
|
|
9
|
-
import { S, a as a9, e as e9 } from "./select-
|
|
10
|
-
import { c as c5, S as S2, b as b7, a as a10, d as d4, e as e10 } from "./slider-
|
|
11
|
-
import { a as a11, T, f as f3, g as g2, b as b8, d as d5, e as e11, c as c6, u } from "./toasterProvider-
|
|
8
|
+
import { R, a as a8, e as e8 } from "./rating-BAJQ5zyV.js";
|
|
9
|
+
import { S, a as a9, e as e9 } from "./select-DVQJN33M.js";
|
|
10
|
+
import { c as c5, S as S2, b as b7, a as a10, d as d4, e as e10 } from "./slider-CzO--VPp.js";
|
|
11
|
+
import { a as a11, T, f as f3, g as g2, b as b8, d as d5, e as e11, c as c6, u } from "./toasterProvider-BcueMHl1.js";
|
|
12
12
|
import { b as b9, a as a12, D, c as c7, T as T2, d as d6, e as e12 } from "./tree-DTg_JB2R.js";
|
|
13
|
-
import { D as D2, b as b10, a as a13, e as e13 } from "./drawer-
|
|
13
|
+
import { D as D2, b as b10, a as a13, e as e13 } from "./drawer-BvsFOxUr.js";
|
|
14
14
|
export * from "@agnos-ui/react-headless/types";
|
|
15
15
|
export * from "@agnos-ui/core-bootstrap/types";
|
|
16
16
|
export * from "@agnos-ui/react-headless/slot";
|
|
@@ -25,6 +25,7 @@ export * from "@agnos-ui/react-headless/utils/func";
|
|
|
25
25
|
export * from "@agnos-ui/react-headless/services/siblingsInert";
|
|
26
26
|
export * from "@agnos-ui/react-headless/services/resizeObserver";
|
|
27
27
|
export * from "@agnos-ui/react-headless/services/portal";
|
|
28
|
+
export * from "@agnos-ui/react-headless/services/pointerdownPosition";
|
|
28
29
|
export * from "@agnos-ui/react-headless/services/navManager";
|
|
29
30
|
export * from "@agnos-ui/react-headless/services/matchMedia";
|
|
30
31
|
export * from "@agnos-ui/react-headless/services/intersection";
|
|
@@ -28,12 +28,12 @@ const ModalElement = (slotContext) => {
|
|
|
28
28
|
const { fullscreen } = slotContext.state;
|
|
29
29
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...directive.useDirectives([directive.classDirective, "modal d-block"], slotContext.directives.modalDirective), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx("modal-dialog", { "modal-fullscreen": fullscreen }), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "modal-content", children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.structure, props: slotContext }) }) }) });
|
|
30
30
|
};
|
|
31
|
-
function Modal(props) {
|
|
31
|
+
function Modal({ ref, ...props }) {
|
|
32
32
|
const widgetContext = generated_config.useWidget(export_createModal, props, {
|
|
33
33
|
header: ModalDefaultSlotHeader,
|
|
34
34
|
structure: ModalDefaultSlotStructure
|
|
35
35
|
});
|
|
36
|
-
React.useImperativeHandle(
|
|
36
|
+
React.useImperativeHandle(ref, () => widgetContext.api, [widgetContext.api]);
|
|
37
37
|
return /* @__PURE__ */ jsxRuntime.jsxs(portal.Portal, { container: widgetContext.state.container, children: [
|
|
38
38
|
!widgetContext.state.backdropHidden && /* @__PURE__ */ jsxRuntime.jsx(BackdropElement, { ...widgetContext }),
|
|
39
39
|
!widgetContext.state.hidden && /* @__PURE__ */ jsxRuntime.jsx(ModalElement, { ...widgetContext })
|
|
@@ -27,12 +27,12 @@ const ModalElement = (slotContext) => {
|
|
|
27
27
|
const { fullscreen } = slotContext.state;
|
|
28
28
|
return /* @__PURE__ */ jsx("div", { ...useDirectives([classDirective, "modal d-block"], slotContext.directives.modalDirective), children: /* @__PURE__ */ jsx("div", { className: clsx("modal-dialog", { "modal-fullscreen": fullscreen }), children: /* @__PURE__ */ jsx("div", { className: "modal-content", children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.structure, props: slotContext }) }) }) });
|
|
29
29
|
};
|
|
30
|
-
function Modal(props) {
|
|
30
|
+
function Modal({ ref, ...props }) {
|
|
31
31
|
const widgetContext = useWidget(export_createModal, props, {
|
|
32
32
|
header: ModalDefaultSlotHeader,
|
|
33
33
|
structure: ModalDefaultSlotStructure
|
|
34
34
|
});
|
|
35
|
-
useImperativeHandle(
|
|
35
|
+
useImperativeHandle(ref, () => widgetContext.api, [widgetContext.api]);
|
|
36
36
|
return /* @__PURE__ */ jsxs(Portal, { container: widgetContext.state.container, children: [
|
|
37
37
|
!widgetContext.state.backdropHidden && /* @__PURE__ */ jsx(BackdropElement, { ...widgetContext }),
|
|
38
38
|
!widgetContext.state.hidden && /* @__PURE__ */ jsx(ModalElement, { ...widgetContext })
|
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.10.0-next.
|
|
4
|
+
"version": "0.10.0-next.4",
|
|
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.10.0-next.
|
|
53
|
-
"@agnos-ui/react-headless": "0.10.0-next.
|
|
52
|
+
"@agnos-ui/core-bootstrap": "0.10.0-next.4",
|
|
53
|
+
"@agnos-ui/react-headless": "0.10.0-next.4",
|
|
54
54
|
"clsx": "^2.1.1"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
@@ -101,12 +101,12 @@ const PaginationDefaultSlotStructure = (slotContext) => {
|
|
|
101
101
|
/* @__PURE__ */ jsxRuntime.jsx("div", { "aria-live": "polite", className: "visually-hidden", children: `${state.ariaLiveLabelText}` })
|
|
102
102
|
] });
|
|
103
103
|
};
|
|
104
|
-
function Pagination(props) {
|
|
104
|
+
function Pagination({ ref, ...props }) {
|
|
105
105
|
const widgetContext = generated_config.useWidget(export_createPagination, props, {
|
|
106
106
|
pagesDisplay: PaginationDefaultSlotPages,
|
|
107
107
|
structure: PaginationDefaultSlotStructure
|
|
108
108
|
});
|
|
109
|
-
React.useImperativeHandle(
|
|
109
|
+
React.useImperativeHandle(ref, () => widgetContext.api, [widgetContext.api]);
|
|
110
110
|
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": widgetContext.state.ariaLabel, children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: widgetContext.state.structure, props: widgetContext }) });
|
|
111
111
|
}
|
|
112
112
|
exports.NavButton = NavButton;
|
|
@@ -84,12 +84,12 @@ const PaginationDefaultSlotStructure = (slotContext) => {
|
|
|
84
84
|
/* @__PURE__ */ jsx("div", { "aria-live": "polite", className: "visually-hidden", children: `${state.ariaLiveLabelText}` })
|
|
85
85
|
] });
|
|
86
86
|
};
|
|
87
|
-
function Pagination(props) {
|
|
87
|
+
function Pagination({ ref, ...props }) {
|
|
88
88
|
const widgetContext = useWidget(export_createPagination, props, {
|
|
89
89
|
pagesDisplay: PaginationDefaultSlotPages,
|
|
90
90
|
structure: PaginationDefaultSlotStructure
|
|
91
91
|
});
|
|
92
|
-
useImperativeHandle(
|
|
92
|
+
useImperativeHandle(ref, () => widgetContext.api, [widgetContext.api]);
|
|
93
93
|
return /* @__PURE__ */ jsx("nav", { "aria-label": widgetContext.state.ariaLabel, children: /* @__PURE__ */ jsx(Slot, { slotContent: widgetContext.state.structure, props: widgetContext }) });
|
|
94
94
|
}
|
|
95
95
|
export {
|
|
@@ -16,13 +16,13 @@ function Star({ star, state, directive }) {
|
|
|
16
16
|
/* @__PURE__ */ jsx("span", { ...useDirective(directive, { index: star.index }), children: /* @__PURE__ */ jsx(Slot, { slotContent: state.star, props: star }) })
|
|
17
17
|
] }, star.index);
|
|
18
18
|
}
|
|
19
|
-
function Rating(props) {
|
|
19
|
+
function Rating({ ref, ...props }) {
|
|
20
20
|
const {
|
|
21
21
|
state,
|
|
22
22
|
directives: { containerDirective, starDirective },
|
|
23
23
|
api
|
|
24
24
|
} = useWidget(export_createRating, props);
|
|
25
|
-
useImperativeHandle(
|
|
25
|
+
useImperativeHandle(ref, () => api, [api]);
|
|
26
26
|
return /* @__PURE__ */ jsx("div", { ...useDirectives([classDirective, "d-inline-flex"], containerDirective), children: state.stars.map((star) => /* @__PURE__ */ jsx(Star, { star, state, directive: starDirective }, star.index)) });
|
|
27
27
|
}
|
|
28
28
|
export {
|
|
@@ -17,13 +17,13 @@ function Star({ star, state, directive: directive$1 }) {
|
|
|
17
17
|
/* @__PURE__ */ jsxRuntime.jsx("span", { ...directive.useDirective(directive$1, { index: star.index }), children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.star, props: star }) })
|
|
18
18
|
] }, star.index);
|
|
19
19
|
}
|
|
20
|
-
function Rating(props) {
|
|
20
|
+
function Rating({ ref, ...props }) {
|
|
21
21
|
const {
|
|
22
22
|
state,
|
|
23
23
|
directives: { containerDirective, starDirective },
|
|
24
24
|
api
|
|
25
25
|
} = generated_config.useWidget(export_createRating, props);
|
|
26
|
-
React.useImperativeHandle(
|
|
26
|
+
React.useImperativeHandle(ref, () => api, [api]);
|
|
27
27
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...directive.useDirectives([directive.classDirective, "d-inline-flex"], containerDirective), children: state.stars.map((star) => /* @__PURE__ */ jsxRuntime.jsx(Star, { star, state, directive: starDirective }, star.index)) });
|
|
28
28
|
}
|
|
29
29
|
exports.Rating = Rating;
|
|
@@ -35,12 +35,12 @@ function Rows({ slotContext }) {
|
|
|
35
35
|
return /* @__PURE__ */ jsx(SelectItem, { slotContext, itemContext }, itemContext.id);
|
|
36
36
|
}) });
|
|
37
37
|
}
|
|
38
|
-
function Select(props) {
|
|
38
|
+
function Select({ ref, ...props }) {
|
|
39
39
|
const widgetContext = useWidget(export_createSelect, props, {
|
|
40
40
|
badgeLabel: DefaultBadge,
|
|
41
41
|
itemLabel: DefaultItem
|
|
42
42
|
});
|
|
43
|
-
useImperativeHandle(
|
|
43
|
+
useImperativeHandle(ref, () => widgetContext.api, [widgetContext.api]);
|
|
44
44
|
const {
|
|
45
45
|
state: { id, visibleItems, filterText, open, className },
|
|
46
46
|
directives: { hasFocusDirective, referenceDirective, inputContainerDirective, inputDirective }
|
|
@@ -36,12 +36,12 @@ function Rows({ slotContext }) {
|
|
|
36
36
|
return /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { slotContext, itemContext }, itemContext.id);
|
|
37
37
|
}) });
|
|
38
38
|
}
|
|
39
|
-
function Select(props) {
|
|
39
|
+
function Select({ ref, ...props }) {
|
|
40
40
|
const widgetContext = generated_config.useWidget(export_createSelect, props, {
|
|
41
41
|
badgeLabel: DefaultBadge,
|
|
42
42
|
itemLabel: DefaultItem
|
|
43
43
|
});
|
|
44
|
-
React.useImperativeHandle(
|
|
44
|
+
React.useImperativeHandle(ref, () => widgetContext.api, [widgetContext.api]);
|
|
45
45
|
const {
|
|
46
46
|
state: { id, visibleItems, filterText, open, className },
|
|
47
47
|
directives: { hasFocusDirective, referenceDirective, inputContainerDirective, inputDirective }
|
|
@@ -61,7 +61,7 @@ const SliderDefaultSlotStructure = (slotContext) => /* @__PURE__ */ jsxRuntime.j
|
|
|
61
61
|
slotContext.state.ticks.map((tick) => /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.tick, props: { tick, ...slotContext } }, tick.position)),
|
|
62
62
|
slotContext.state.sortedHandles.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
|
|
63
63
|
/* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.handle, props: { item, ...slotContext } }),
|
|
64
|
-
slotContext.state.showValueLabels &&
|
|
64
|
+
slotContext.state.showValueLabels && /* @__PURE__ */ jsxRuntime.jsx(HandleLabelDisplay, { directive: slotContext.directives.handleLabelDisplayDirective, index: i, children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.label, props: { value: slotContext.state.values[i], ...slotContext } }) })
|
|
65
65
|
] }, item.id))
|
|
66
66
|
] });
|
|
67
67
|
function Slider(props) {
|
|
@@ -60,7 +60,7 @@ const SliderDefaultSlotStructure = (slotContext) => /* @__PURE__ */ jsxs(Fragmen
|
|
|
60
60
|
slotContext.state.ticks.map((tick) => /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.tick, props: { tick, ...slotContext } }, tick.position)),
|
|
61
61
|
slotContext.state.sortedHandles.map((item, i) => /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
|
|
62
62
|
/* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.handle, props: { item, ...slotContext } }),
|
|
63
|
-
slotContext.state.showValueLabels &&
|
|
63
|
+
slotContext.state.showValueLabels && /* @__PURE__ */ jsx(HandleLabelDisplay, { directive: slotContext.directives.handleLabelDisplayDirective, index: i, children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.label, props: { value: slotContext.state.values[i], ...slotContext } }) })
|
|
64
64
|
] }, item.id))
|
|
65
65
|
] });
|
|
66
66
|
function Slider(props) {
|
|
@@ -32,12 +32,12 @@ const ToastElement = (slotContext) => /* @__PURE__ */ jsx(
|
|
|
32
32
|
children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.structure, props: slotContext })
|
|
33
33
|
}
|
|
34
34
|
);
|
|
35
|
-
function Toast(props) {
|
|
35
|
+
function Toast({ ref, ...props }) {
|
|
36
36
|
const widgetContext = useWidget(export_createToast, props, {
|
|
37
37
|
structure: ToastDefaultSlotStructure,
|
|
38
38
|
children: props.children
|
|
39
39
|
});
|
|
40
|
-
useImperativeHandle(
|
|
40
|
+
useImperativeHandle(ref, () => widgetContext.api, [widgetContext.api]);
|
|
41
41
|
return /* @__PURE__ */ jsx(Fragment, { children: !widgetContext.state.hidden && /* @__PURE__ */ jsx(ToastElement, { ...widgetContext }) });
|
|
42
42
|
}
|
|
43
43
|
const ToastToaster = ({
|
|
@@ -33,12 +33,12 @@ const ToastElement = (slotContext) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
33
33
|
children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.structure, props: slotContext })
|
|
34
34
|
}
|
|
35
35
|
);
|
|
36
|
-
function Toast(props) {
|
|
36
|
+
function Toast({ ref, ...props }) {
|
|
37
37
|
const widgetContext = generated_config.useWidget(export_createToast, props, {
|
|
38
38
|
structure: ToastDefaultSlotStructure,
|
|
39
39
|
children: props.children
|
|
40
40
|
});
|
|
41
|
-
React.useImperativeHandle(
|
|
41
|
+
React.useImperativeHandle(ref, () => widgetContext.api, [widgetContext.api]);
|
|
42
42
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: !widgetContext.state.hidden && /* @__PURE__ */ jsxRuntime.jsx(ToastElement, { ...widgetContext }) });
|
|
43
43
|
}
|
|
44
44
|
const ToastToaster = ({
|