@agnos-ui/react-bootstrap 0.7.0 → 0.8.0-next.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/{alert-BWfpiNSz.cjs → alert-BGVw_vsM.cjs} +1 -1
- package/{alert-CWbr08rp.js → alert-BM4ImSpO.js} +1 -1
- package/components/alert/index.cjs +1 -1
- package/components/alert/index.js +1 -1
- package/components/collapse/collapse.gen.d.ts +4 -0
- package/components/modal/index.cjs +1 -1
- package/components/modal/index.js +1 -1
- package/components/pagination/index.cjs +1 -1
- package/components/pagination/index.js +1 -1
- package/components/progressbar/index.cjs +1 -1
- package/components/progressbar/index.js +1 -1
- package/components/select/index.cjs +1 -1
- package/components/select/index.js +1 -1
- package/components/slider/index.cjs +2 -1
- package/components/slider/index.js +5 -4
- package/components/slider/slider.d.ts +9 -1
- package/components/slider/slider.gen.d.ts +107 -9
- package/components/toast/index.cjs +1 -1
- package/components/toast/index.js +1 -1
- package/components/tree/index.cjs +1 -1
- package/components/tree/index.js +1 -1
- package/generated/index.d.ts +1 -0
- package/generated/utils/func.cjs +9 -0
- package/generated/utils/func.d.ts +1 -0
- package/generated/utils/func.js +1 -0
- package/index.cjs +16 -8
- package/index.js +14 -12
- package/{modal-C3hVG-lH.cjs → modal-DQLOz7TE.cjs} +2 -2
- package/{modal-DPKlan_9.js → modal-apFubipB.js} +2 -2
- package/package.json +4 -4
- package/{pagination-AH4hiASa.js → pagination-B1Ho_-r4.js} +4 -4
- package/{pagination-CYTSlunk.cjs → pagination-Bq4Hvm1j.cjs} +4 -4
- package/{progressbar-DKFR5epE.js → progressbar-Ck20N_ee.js} +2 -2
- package/{progressbar-JO1ey9mx.cjs → progressbar-CnbqCXqH.cjs} +2 -2
- package/{select-VhhSuDsJ.js → select-C2jCf6jT.js} +2 -2
- package/{select-D9kVpioc.cjs → select-DHNspXXB.cjs} +2 -2
- package/{slider-D0knY75x.cjs → slider-DyvRcMCK.cjs} +48 -1
- package/{slider-UQlY3PHn.js → slider-vFEkaZP-.js} +51 -4
- package/{toast-CDfXkRkD.js → toast-BUHjCme7.js} +1 -1
- package/{toast-BdNereP2.cjs → toast-CkwIDuRg.cjs} +1 -1
- package/{tree-CrXS0sFt.js → tree-BflF5hyD.js} +2 -2
- package/{tree-CCmlpEPq.cjs → tree-DT261j-0.cjs} +2 -2
|
@@ -18,7 +18,7 @@ const AlertElement = (slotContext) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
18
18
|
...directive.useDirectives(
|
|
19
19
|
[
|
|
20
20
|
directive.classDirective,
|
|
21
|
-
`au-alert alert alert-${slotContext.state.type} ${slotContext.state.className}
|
|
21
|
+
[`au-alert alert alert-${slotContext.state.type} ${slotContext.state.className}`, { "alert-dismissible": slotContext.state.dismissible }]
|
|
22
22
|
],
|
|
23
23
|
slotContext.directives.transitionDirective
|
|
24
24
|
),
|
|
@@ -17,7 +17,7 @@ const AlertElement = (slotContext) => /* @__PURE__ */ jsx(
|
|
|
17
17
|
...useDirectives(
|
|
18
18
|
[
|
|
19
19
|
classDirective,
|
|
20
|
-
`au-alert alert alert-${slotContext.state.type} ${slotContext.state.className}
|
|
20
|
+
[`au-alert alert alert-${slotContext.state.type} ${slotContext.state.className}`, { "alert-dismissible": slotContext.state.dismissible }]
|
|
21
21
|
],
|
|
22
22
|
slotContext.directives.transitionDirective
|
|
23
23
|
),
|
|
@@ -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-BGVw_vsM.cjs");
|
|
4
4
|
exports.Alert = alert.Alert;
|
|
5
5
|
exports.AlertDefaultSlotStructure = alert.AlertDefaultSlotStructure;
|
|
6
6
|
exports.createAlert = alert.export_createAlert;
|
|
@@ -134,6 +134,10 @@ export interface CollapseDirectives {
|
|
|
134
134
|
* Directive to apply the collapse.
|
|
135
135
|
*/
|
|
136
136
|
collapseDirective: Directive;
|
|
137
|
+
/**
|
|
138
|
+
* Directive to apply to a trigger;
|
|
139
|
+
*/
|
|
140
|
+
triggerDirective: Directive;
|
|
137
141
|
}
|
|
138
142
|
/**
|
|
139
143
|
* Represents a widget for handling collapse functionality.
|
|
@@ -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-DQLOz7TE.cjs");
|
|
4
4
|
exports.Modal = modal.Modal;
|
|
5
5
|
exports.ModalDefaultSlotHeader = modal.ModalDefaultSlotHeader;
|
|
6
6
|
exports.ModalDefaultSlotStructure = modal.ModalDefaultSlotStructure;
|
|
@@ -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-Bq4Hvm1j.cjs");
|
|
4
4
|
exports.NavButton = pagination.NavButton;
|
|
5
5
|
exports.PageItem = pagination.PageItem;
|
|
6
6
|
exports.Pagination = pagination.Pagination;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const progressbar = require("../../progressbar-
|
|
3
|
+
const progressbar = require("../../progressbar-CnbqCXqH.cjs");
|
|
4
4
|
exports.Progressbar = progressbar.Progressbar;
|
|
5
5
|
exports.ProgressbarDefaultSlotStructure = progressbar.ProgressbarDefaultSlotStructure;
|
|
6
6
|
exports.createProgressbar = progressbar.export_createProgressbar;
|
|
@@ -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-DHNspXXB.cjs");
|
|
4
4
|
exports.Select = select.Select;
|
|
5
5
|
exports.createSelect = select.export_createSelect;
|
|
6
6
|
exports.getSelectDefaultConfig = select.export_getSelectDefaultConfig;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const slider = require("../../slider-
|
|
3
|
+
const slider = require("../../slider-DyvRcMCK.cjs");
|
|
4
4
|
exports.Slider = slider.Slider;
|
|
5
5
|
exports.SliderDefaultSlotHandle = slider.SliderDefaultSlotHandle;
|
|
6
6
|
exports.SliderDefaultSlotStructure = slider.SliderDefaultSlotStructure;
|
|
7
|
+
exports.SliderDefaultTick = slider.SliderDefaultTick;
|
|
7
8
|
exports.createSlider = slider.export_createSlider;
|
|
8
9
|
exports.getSliderDefaultConfig = slider.export_getSliderDefaultConfig;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c, S, b, a, d, e } from "../../slider-vFEkaZP-.js";
|
|
2
2
|
export {
|
|
3
|
-
|
|
3
|
+
c as Slider,
|
|
4
4
|
S as SliderDefaultSlotHandle,
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
b as SliderDefaultSlotStructure,
|
|
6
|
+
a as SliderDefaultTick,
|
|
7
|
+
d as createSlider,
|
|
7
8
|
e as getSliderDefaultConfig
|
|
8
9
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropsWithChildren } from 'react';
|
|
2
|
-
import type { SliderContext, SliderProps, SliderSlotHandleContext } from './slider.gen';
|
|
2
|
+
import type { SliderContext, SliderProps, SliderSlotHandleContext, SliderSlotTickContext } from './slider.gen';
|
|
3
3
|
/**
|
|
4
4
|
* A functional component that renders a button element with a directive applied to it.
|
|
5
5
|
* The directive is provided through the `slotContext` parameter.
|
|
@@ -8,6 +8,14 @@ import type { SliderContext, SliderProps, SliderSlotHandleContext } from './slid
|
|
|
8
8
|
* @returns A button element with the applied directive.
|
|
9
9
|
*/
|
|
10
10
|
export declare const SliderDefaultSlotHandle: (slotContext: SliderSlotHandleContext) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
/**
|
|
12
|
+
* A functional component that renders a tick element with a directive applied to it.
|
|
13
|
+
* The directive is provided through the `slotContext` parameter.
|
|
14
|
+
*
|
|
15
|
+
* @param slotContext - The context object containing the directives and item for the slider tick.
|
|
16
|
+
* @returns A tick element with the applied directive.
|
|
17
|
+
*/
|
|
18
|
+
export declare const SliderDefaultTick: (slotContext: SliderSlotTickContext) => import("react/jsx-runtime").JSX.Element;
|
|
11
19
|
/**
|
|
12
20
|
* Renders the default slot structure for the Slider component.
|
|
13
21
|
*
|
|
@@ -31,6 +31,15 @@ export interface SliderSlotHandleContext extends SliderContext {
|
|
|
31
31
|
*/
|
|
32
32
|
item: SliderHandle;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Represents the context for a slider tick slot
|
|
36
|
+
*/
|
|
37
|
+
export interface SliderSlotTickContext extends SliderContext {
|
|
38
|
+
/**
|
|
39
|
+
* tick context
|
|
40
|
+
*/
|
|
41
|
+
tick: SliderTick;
|
|
42
|
+
}
|
|
34
43
|
/**
|
|
35
44
|
* Represents the state of a slider component.
|
|
36
45
|
*/
|
|
@@ -75,6 +84,10 @@ export interface SliderState {
|
|
|
75
84
|
* Check if the slider is interactive, meaning it is not disabled or readonly
|
|
76
85
|
*/
|
|
77
86
|
interactive: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Array of ticks to display on the slider component
|
|
89
|
+
*/
|
|
90
|
+
ticks: SliderTick[];
|
|
78
91
|
/**
|
|
79
92
|
* Minimum value that can be assigned to the slider
|
|
80
93
|
*
|
|
@@ -129,6 +142,12 @@ export interface SliderState {
|
|
|
129
142
|
* @defaultValue `true`
|
|
130
143
|
*/
|
|
131
144
|
showMinMaxLabels: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* If `true` the ticks are displayed on the slider
|
|
147
|
+
*
|
|
148
|
+
* @defaultValue `false`
|
|
149
|
+
*/
|
|
150
|
+
showTicks: boolean;
|
|
132
151
|
/**
|
|
133
152
|
* It `true` slider display is inversed
|
|
134
153
|
*
|
|
@@ -158,6 +177,10 @@ export interface SliderState {
|
|
|
158
177
|
* Slot to change the handlers
|
|
159
178
|
*/
|
|
160
179
|
handle: SlotContent<SliderSlotHandleContext>;
|
|
180
|
+
/**
|
|
181
|
+
* Slot to change the ticks
|
|
182
|
+
*/
|
|
183
|
+
tick: SlotContent<SliderSlotTickContext>;
|
|
161
184
|
}
|
|
162
185
|
/**
|
|
163
186
|
* Represents the properties for the Slider component.
|
|
@@ -165,28 +188,35 @@ export interface SliderState {
|
|
|
165
188
|
export interface SliderProps {
|
|
166
189
|
/**
|
|
167
190
|
* Return the value for the 'aria-label' attribute for the handle
|
|
168
|
-
* @param value - value of the handle
|
|
169
191
|
* @param sortedIndex - index of the handle in the sorted list
|
|
170
|
-
* @param index - index of the handle in the original list
|
|
171
192
|
*
|
|
172
193
|
* @defaultValue
|
|
173
194
|
* ```ts
|
|
174
|
-
* (
|
|
195
|
+
* () => 'Value'
|
|
196
|
+
* ```
|
|
197
|
+
*/
|
|
198
|
+
ariaLabel: (sortedIndex: number) => string;
|
|
199
|
+
/**
|
|
200
|
+
* Return the value for the 'aria-labelledBy' attribute for the handle
|
|
201
|
+
* @param sortedIndex - index of the handle in the sorted list
|
|
202
|
+
*
|
|
203
|
+
* @defaultValue
|
|
204
|
+
* ```ts
|
|
205
|
+
* () => ''
|
|
175
206
|
* ```
|
|
176
207
|
*/
|
|
177
|
-
|
|
208
|
+
ariaLabelledBy: (sortedIndex: number) => string;
|
|
178
209
|
/**
|
|
179
210
|
* Return the value for the 'aria-valuetext' attribute for the handle
|
|
180
211
|
* @param value - value of the handle
|
|
181
212
|
* @param sortedIndex - index of the handle in the sorted list
|
|
182
|
-
* @param index - index of the handle in the original list
|
|
183
213
|
*
|
|
184
214
|
* @defaultValue
|
|
185
215
|
* ```ts
|
|
186
|
-
* (value: number) => ''
|
|
216
|
+
* (value: number) => ''
|
|
187
217
|
* ```
|
|
188
218
|
*/
|
|
189
|
-
ariaValueText: (value: number, sortedIndex: number
|
|
219
|
+
ariaValueText: (value: number, sortedIndex: number) => string;
|
|
190
220
|
/**
|
|
191
221
|
* An event emitted when slider values are changed
|
|
192
222
|
*
|
|
@@ -198,6 +228,19 @@ export interface SliderProps {
|
|
|
198
228
|
* ```
|
|
199
229
|
*/
|
|
200
230
|
onValuesChange: (values: number[]) => void;
|
|
231
|
+
/**
|
|
232
|
+
* Unit value between the ticks
|
|
233
|
+
* If value is set to `0` the {@link stepSize} is used to space the ticks
|
|
234
|
+
*
|
|
235
|
+
* @defaultValue `0`
|
|
236
|
+
*/
|
|
237
|
+
tickInterval: number;
|
|
238
|
+
/**
|
|
239
|
+
* If `true` the tick values are displayed on the slider
|
|
240
|
+
*
|
|
241
|
+
* @defaultValue `true`
|
|
242
|
+
*/
|
|
243
|
+
showTickValues: boolean;
|
|
201
244
|
/**
|
|
202
245
|
* Minimum value that can be assigned to the slider
|
|
203
246
|
*
|
|
@@ -252,6 +295,12 @@ export interface SliderProps {
|
|
|
252
295
|
* @defaultValue `true`
|
|
253
296
|
*/
|
|
254
297
|
showMinMaxLabels: boolean;
|
|
298
|
+
/**
|
|
299
|
+
* If `true` the ticks are displayed on the slider
|
|
300
|
+
*
|
|
301
|
+
* @defaultValue `false`
|
|
302
|
+
*/
|
|
303
|
+
showTicks: boolean;
|
|
255
304
|
/**
|
|
256
305
|
* It `true` slider display is inversed
|
|
257
306
|
*
|
|
@@ -281,6 +330,10 @@ export interface SliderProps {
|
|
|
281
330
|
* Slot to change the handlers
|
|
282
331
|
*/
|
|
283
332
|
handle: SlotContent<SliderSlotHandleContext>;
|
|
333
|
+
/**
|
|
334
|
+
* Slot to change the ticks
|
|
335
|
+
*/
|
|
336
|
+
tick: SlotContent<SliderSlotTickContext>;
|
|
284
337
|
}
|
|
285
338
|
/**
|
|
286
339
|
* Represents a slider widget component.
|
|
@@ -354,11 +407,44 @@ export interface SliderHandle {
|
|
|
354
407
|
/**
|
|
355
408
|
* ariaLabel of the handle
|
|
356
409
|
*/
|
|
357
|
-
ariaLabel: string;
|
|
410
|
+
ariaLabel: string | undefined;
|
|
358
411
|
/**
|
|
359
412
|
* ariaValueText of the handle
|
|
360
413
|
*/
|
|
361
|
-
ariaValueText: string;
|
|
414
|
+
ariaValueText: string | undefined;
|
|
415
|
+
/**
|
|
416
|
+
* aria-labelledBy of the handle
|
|
417
|
+
*/
|
|
418
|
+
ariaLabelledBy: string | undefined;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Represents a tick in a slider component.
|
|
422
|
+
*/
|
|
423
|
+
export interface SliderTick {
|
|
424
|
+
/**
|
|
425
|
+
* CSS classes to be applied on the tick
|
|
426
|
+
*/
|
|
427
|
+
className?: string | null;
|
|
428
|
+
/**
|
|
429
|
+
* Visualized optional explanation of the label
|
|
430
|
+
*/
|
|
431
|
+
legend?: string | null;
|
|
432
|
+
/**
|
|
433
|
+
* Position of the tick in percent
|
|
434
|
+
*/
|
|
435
|
+
position: number;
|
|
436
|
+
/**
|
|
437
|
+
* If `true` the tick has selected style
|
|
438
|
+
*/
|
|
439
|
+
selected: boolean;
|
|
440
|
+
/**
|
|
441
|
+
* Value of the tick
|
|
442
|
+
*/
|
|
443
|
+
value: number;
|
|
444
|
+
/**
|
|
445
|
+
* If `true` the tick label is displayed
|
|
446
|
+
*/
|
|
447
|
+
displayLabel: boolean;
|
|
362
448
|
}
|
|
363
449
|
/**
|
|
364
450
|
* Interface representing various directives used in the slider component.
|
|
@@ -410,4 +496,16 @@ export interface SliderDirectives {
|
|
|
410
496
|
handleLabelDisplayDirective: Directive<{
|
|
411
497
|
index: number;
|
|
412
498
|
}>;
|
|
499
|
+
/**
|
|
500
|
+
* Directive to apply to the slider tick
|
|
501
|
+
*/
|
|
502
|
+
tickDirective: Directive<{
|
|
503
|
+
tick: SliderTick;
|
|
504
|
+
}>;
|
|
505
|
+
/**
|
|
506
|
+
* Directive to apply to the slider tick label
|
|
507
|
+
*/
|
|
508
|
+
tickLabelDirective: Directive<{
|
|
509
|
+
tick: SliderTick;
|
|
510
|
+
}>;
|
|
413
511
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const toast = require("../../toast-
|
|
3
|
+
const toast = require("../../toast-CkwIDuRg.cjs");
|
|
4
4
|
exports.Toast = toast.Toast;
|
|
5
5
|
exports.ToastDefaultSlotStructure = toast.ToastDefaultSlotStructure;
|
|
6
6
|
exports.createToast = toast.export_createToast;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const tree = require("../../tree-
|
|
3
|
+
const tree = require("../../tree-DT261j-0.cjs");
|
|
4
4
|
exports.DefaultTreeSlotItem = tree.DefaultTreeSlotItem;
|
|
5
5
|
exports.DefaultTreeSlotItemContent = tree.DefaultTreeSlotItemContent;
|
|
6
6
|
exports.DefaultTreeSlotItemToggle = tree.DefaultTreeSlotItemToggle;
|
package/components/tree/index.js
CHANGED
package/generated/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './utils/stores';
|
|
|
7
7
|
export * from './utils/portal';
|
|
8
8
|
export * from './utils/directive';
|
|
9
9
|
export * from './utils/writables';
|
|
10
|
+
export * from './utils/func';
|
|
10
11
|
export * from './services/siblingsInert';
|
|
11
12
|
export * from './services/resizeObserver';
|
|
12
13
|
export * from './services/portal';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const func = require("@agnos-ui/react-headless/utils/func");
|
|
4
|
+
Object.keys(func).forEach((k) => {
|
|
5
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: () => func[k]
|
|
8
|
+
});
|
|
9
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@agnos-ui/react-headless/utils/func';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@agnos-ui/react-headless/utils/func";
|
package/index.cjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const accordion = require("./accordion-QclyKh8E.cjs");
|
|
4
|
-
const alert = require("./alert-
|
|
4
|
+
const alert = require("./alert-BGVw_vsM.cjs");
|
|
5
5
|
const collapse = require("./collapse-UMbDs6Gh.cjs");
|
|
6
|
-
const modal = require("./modal-
|
|
7
|
-
const pagination = require("./pagination-
|
|
8
|
-
const progressbar = require("./progressbar-
|
|
6
|
+
const modal = require("./modal-DQLOz7TE.cjs");
|
|
7
|
+
const pagination = require("./pagination-Bq4Hvm1j.cjs");
|
|
8
|
+
const progressbar = require("./progressbar-CnbqCXqH.cjs");
|
|
9
9
|
const rating = require("./rating-BaZTCQi1.cjs");
|
|
10
|
-
const select = require("./select-
|
|
11
|
-
const slider = require("./slider-
|
|
12
|
-
const toast = require("./toast-
|
|
13
|
-
const tree = require("./tree-
|
|
10
|
+
const select = require("./select-DHNspXXB.cjs");
|
|
11
|
+
const slider = require("./slider-DyvRcMCK.cjs");
|
|
12
|
+
const toast = require("./toast-CkwIDuRg.cjs");
|
|
13
|
+
const tree = require("./tree-DT261j-0.cjs");
|
|
14
14
|
const types = require("@agnos-ui/react-headless/types");
|
|
15
15
|
const slot = require("@agnos-ui/react-headless/slot");
|
|
16
16
|
const config = require("@agnos-ui/react-headless/config");
|
|
@@ -20,6 +20,7 @@ const stores = require("@agnos-ui/react-headless/utils/stores");
|
|
|
20
20
|
const portal = require("@agnos-ui/react-headless/utils/portal");
|
|
21
21
|
const directive = require("@agnos-ui/react-headless/utils/directive");
|
|
22
22
|
const writables = require("@agnos-ui/react-headless/utils/writables");
|
|
23
|
+
const func = require("@agnos-ui/react-headless/utils/func");
|
|
23
24
|
const siblingsInert = require("@agnos-ui/react-headless/services/siblingsInert");
|
|
24
25
|
const resizeObserver = require("@agnos-ui/react-headless/services/resizeObserver");
|
|
25
26
|
const portal$1 = require("@agnos-ui/react-headless/services/portal");
|
|
@@ -77,6 +78,7 @@ exports.getSelectDefaultConfig = select.export_getSelectDefaultConfig;
|
|
|
77
78
|
exports.Slider = slider.Slider;
|
|
78
79
|
exports.SliderDefaultSlotHandle = slider.SliderDefaultSlotHandle;
|
|
79
80
|
exports.SliderDefaultSlotStructure = slider.SliderDefaultSlotStructure;
|
|
81
|
+
exports.SliderDefaultTick = slider.SliderDefaultTick;
|
|
80
82
|
exports.createSlider = slider.export_createSlider;
|
|
81
83
|
exports.getSliderDefaultConfig = slider.export_getSliderDefaultConfig;
|
|
82
84
|
exports.Toast = toast.Toast;
|
|
@@ -142,6 +144,12 @@ Object.keys(writables).forEach((k) => {
|
|
|
142
144
|
get: () => writables[k]
|
|
143
145
|
});
|
|
144
146
|
});
|
|
147
|
+
Object.keys(func).forEach((k) => {
|
|
148
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
149
|
+
enumerable: true,
|
|
150
|
+
get: () => func[k]
|
|
151
|
+
});
|
|
152
|
+
});
|
|
145
153
|
Object.keys(siblingsInert).forEach((k) => {
|
|
146
154
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
147
155
|
enumerable: true,
|
package/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { b, a, A, d, c, f, e } from "./accordion-GX854ooE.js";
|
|
2
|
-
import { a as a2, A as A2, b as b2, e as e2 } from "./alert-
|
|
2
|
+
import { a as a2, A as A2, b as b2, e as e2 } from "./alert-BM4ImSpO.js";
|
|
3
3
|
import { C, a as a3, e as e3 } from "./collapse-BOXBa8_8.js";
|
|
4
|
-
import { b as b3, M, a as a4, c as c2, e as e4, f as f2, d as d2, o } from "./modal-
|
|
5
|
-
import { N, P, c as c3, a as a5, b as b4, d as d3, e as e5 } from "./pagination-
|
|
6
|
-
import { a as a6, P as P2, b as b5, e as e6 } from "./progressbar-
|
|
4
|
+
import { b as b3, M, a as a4, c as c2, e as e4, f as f2, d as d2, o } from "./modal-apFubipB.js";
|
|
5
|
+
import { N, P, c as c3, a as a5, b as b4, d as d3, e as e5 } from "./pagination-B1Ho_-r4.js";
|
|
6
|
+
import { a as a6, P as P2, b as b5, e as e6 } from "./progressbar-Ck20N_ee.js";
|
|
7
7
|
import { R, a as a7, e as e7 } from "./rating-DziC4Tsh.js";
|
|
8
|
-
import { S, a as a8, e as e8 } from "./select-
|
|
9
|
-
import {
|
|
10
|
-
import { a as a10, T, b as b7, e as e10 } from "./toast-
|
|
11
|
-
import { b as b8, a as a11, D, c as c5, T as T2, d as
|
|
8
|
+
import { S, a as a8, e as e8 } from "./select-C2jCf6jT.js";
|
|
9
|
+
import { c as c4, S as S2, b as b6, a as a9, d as d4, e as e9 } from "./slider-vFEkaZP-.js";
|
|
10
|
+
import { a as a10, T, b as b7, e as e10 } from "./toast-BUHjCme7.js";
|
|
11
|
+
import { b as b8, a as a11, D, c as c5, T as T2, d as d5, e as e11 } from "./tree-BflF5hyD.js";
|
|
12
12
|
export * from "@agnos-ui/react-headless/types";
|
|
13
13
|
export * from "@agnos-ui/react-headless/slot";
|
|
14
14
|
export * from "@agnos-ui/react-headless/config";
|
|
@@ -18,6 +18,7 @@ export * from "@agnos-ui/react-headless/utils/stores";
|
|
|
18
18
|
export * from "@agnos-ui/react-headless/utils/portal";
|
|
19
19
|
export * from "@agnos-ui/react-headless/utils/directive";
|
|
20
20
|
export * from "@agnos-ui/react-headless/utils/writables";
|
|
21
|
+
export * from "@agnos-ui/react-headless/utils/func";
|
|
21
22
|
export * from "@agnos-ui/react-headless/services/siblingsInert";
|
|
22
23
|
export * from "@agnos-ui/react-headless/services/resizeObserver";
|
|
23
24
|
export * from "@agnos-ui/react-headless/services/portal";
|
|
@@ -56,9 +57,10 @@ export {
|
|
|
56
57
|
P2 as ProgressbarDefaultSlotStructure,
|
|
57
58
|
R as Rating,
|
|
58
59
|
S as Select,
|
|
59
|
-
|
|
60
|
+
c4 as Slider,
|
|
60
61
|
S2 as SliderDefaultSlotHandle,
|
|
61
|
-
|
|
62
|
+
b6 as SliderDefaultSlotStructure,
|
|
63
|
+
a9 as SliderDefaultTick,
|
|
62
64
|
a10 as Toast,
|
|
63
65
|
T as ToastDefaultSlotStructure,
|
|
64
66
|
T2 as Tree,
|
|
@@ -73,9 +75,9 @@ export {
|
|
|
73
75
|
b5 as createProgressbar,
|
|
74
76
|
a7 as createRating,
|
|
75
77
|
a8 as createSelect,
|
|
76
|
-
|
|
78
|
+
d4 as createSlider,
|
|
77
79
|
b7 as createToast,
|
|
78
|
-
|
|
80
|
+
d5 as createTree,
|
|
79
81
|
f as factoryCreateAccordion,
|
|
80
82
|
e as getAccordionDefaultConfig,
|
|
81
83
|
e2 as getAlertDefaultConfig,
|
|
@@ -3,7 +3,7 @@ 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
5
|
const portal = require("@agnos-ui/react-headless/utils/portal");
|
|
6
|
-
const
|
|
6
|
+
const clsx = require("clsx");
|
|
7
7
|
const React = require("react");
|
|
8
8
|
const ReactDOM = require("react-dom/client");
|
|
9
9
|
const generated_config = require("./generated/config.cjs");
|
|
@@ -25,7 +25,7 @@ const ModalDefaultSlotStructure = (slotContext) => /* @__PURE__ */ jsxRuntime.js
|
|
|
25
25
|
const BackdropElement = ({ directives }) => /* @__PURE__ */ jsxRuntime.jsx("div", { ...directive.useDirectives([directive.classDirective, "modal-backdrop"], directives.backdropDirective) });
|
|
26
26
|
const ModalElement = (slotContext) => {
|
|
27
27
|
const { fullscreen } = slotContext.state;
|
|
28
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...directive.useDirectives([directive.classDirective, "modal d-block"], slotContext.directives.modalDirective), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
28
|
+
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 }) }) }) });
|
|
29
29
|
};
|
|
30
30
|
function Modal(props) {
|
|
31
31
|
const widgetContext = generated_config.useWidgetWithConfig(export_createModal, props, "modal", {
|
|
@@ -2,7 +2,7 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Slot } from "@agnos-ui/react-headless/slot";
|
|
3
3
|
import { useDirective, useDirectives, classDirective } from "@agnos-ui/react-headless/utils/directive";
|
|
4
4
|
import { Portal } from "@agnos-ui/react-headless/utils/portal";
|
|
5
|
-
import
|
|
5
|
+
import clsx from "clsx";
|
|
6
6
|
import { useImperativeHandle } from "react";
|
|
7
7
|
import ReactDOM from "react-dom/client";
|
|
8
8
|
import { useWidgetWithConfig } from "./generated/config.js";
|
|
@@ -24,7 +24,7 @@ const ModalDefaultSlotStructure = (slotContext) => /* @__PURE__ */ jsxs(Fragment
|
|
|
24
24
|
const BackdropElement = ({ directives }) => /* @__PURE__ */ jsx("div", { ...useDirectives([classDirective, "modal-backdrop"], directives.backdropDirective) });
|
|
25
25
|
const ModalElement = (slotContext) => {
|
|
26
26
|
const { fullscreen } = slotContext.state;
|
|
27
|
-
return /* @__PURE__ */ jsx("div", { ...useDirectives([classDirective, "modal d-block"], slotContext.directives.modalDirective), children: /* @__PURE__ */ jsx("div", { className:
|
|
27
|
+
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 }) }) }) });
|
|
28
28
|
};
|
|
29
29
|
function Modal(props) {
|
|
30
30
|
const widgetContext = useWidgetWithConfig(export_createModal, props, "modal", {
|
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.
|
|
4
|
+
"version": "0.8.0-next.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.cjs",
|
|
7
7
|
"module": "./index.js",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@agnos-ui/core-bootstrap": "0.
|
|
53
|
-
"@agnos-ui/react-headless": "0.
|
|
54
|
-
"
|
|
52
|
+
"@agnos-ui/core-bootstrap": "0.8.0-next.0",
|
|
53
|
+
"@agnos-ui/react-headless": "0.8.0-next.0",
|
|
54
|
+
"clsx": "^2.1.1"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@amadeus-it-group/tansu": "^2.0.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Slot } from "@agnos-ui/react-headless/slot";
|
|
3
|
-
import
|
|
3
|
+
import clsx from "clsx";
|
|
4
4
|
import { useWidgetWithConfig } from "./generated/config.js";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { useImperativeHandle } from "react";
|
|
@@ -8,7 +8,7 @@ import { useDirectives, classDirective } from "@agnos-ui/react-headless/utils/di
|
|
|
8
8
|
import { getPaginationDefaultConfig, createPagination } from "@agnos-ui/core-bootstrap/components/pagination";
|
|
9
9
|
const PageItem = React.forwardRef(
|
|
10
10
|
({ disabled, active, activeLabel, className, children, directive, page }, ref) => {
|
|
11
|
-
return /* @__PURE__ */ jsx("li", { ref, className:
|
|
11
|
+
return /* @__PURE__ */ jsx("li", { ref, className: clsx("page-item", { active, disabled }), children: /* @__PURE__ */ jsxs("a", { ...useDirectives([directive, { page }], [classDirective, ["page-link", className]]), children: [
|
|
12
12
|
children,
|
|
13
13
|
active && activeLabel && /* @__PURE__ */ jsx("span", { className: "visually-hidden", children: activeLabel })
|
|
14
14
|
] }) });
|
|
@@ -16,7 +16,7 @@ const PageItem = React.forwardRef(
|
|
|
16
16
|
);
|
|
17
17
|
PageItem.displayName = "PageItem";
|
|
18
18
|
const NavButton = React.forwardRef(({ disabled, className, children, directive }, ref) => {
|
|
19
|
-
return /* @__PURE__ */ jsx("li", { ref, className:
|
|
19
|
+
return /* @__PURE__ */ jsx("li", { ref, className: clsx("page-item", { disabled }), children: /* @__PURE__ */ jsx("a", { ...useDirectives(directive, [classDirective, ["page-link", className]]), children: /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children }) }) });
|
|
20
20
|
});
|
|
21
21
|
NavButton.displayName = "NavButton";
|
|
22
22
|
const export_getPaginationDefaultConfig = getPaginationDefaultConfig;
|
|
@@ -76,7 +76,7 @@ const PaginationDefaultSlotStructure = (slotContext) => {
|
|
|
76
76
|
);
|
|
77
77
|
}
|
|
78
78
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
79
|
-
/* @__PURE__ */ jsxs("ul", { className:
|
|
79
|
+
/* @__PURE__ */ jsxs("ul", { className: clsx("au-pagination", "pagination", { [`pagination-${state.size}`]: !!state.size }, state.className), children: [
|
|
80
80
|
ItemsBefore,
|
|
81
81
|
/* @__PURE__ */ jsx(Slot, { slotContent: state.pagesDisplay, props: slotContext }),
|
|
82
82
|
ItemsAfter
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
3
|
const slot = require("@agnos-ui/react-headless/slot");
|
|
4
|
-
const
|
|
4
|
+
const clsx = require("clsx");
|
|
5
5
|
const generated_config = require("./generated/config.cjs");
|
|
6
6
|
const React = require("react");
|
|
7
7
|
const directive = require("@agnos-ui/react-headless/utils/directive");
|
|
@@ -25,7 +25,7 @@ function _interopNamespaceDefault(e) {
|
|
|
25
25
|
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
26
26
|
const PageItem = React__namespace.forwardRef(
|
|
27
27
|
({ disabled, active, activeLabel, className, children, directive: directive$1, page }, ref) => {
|
|
28
|
-
return /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className:
|
|
28
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: clsx("page-item", { active, disabled }), children: /* @__PURE__ */ jsxRuntime.jsxs("a", { ...directive.useDirectives([directive$1, { page }], [directive.classDirective, ["page-link", className]]), children: [
|
|
29
29
|
children,
|
|
30
30
|
active && activeLabel && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "visually-hidden", children: activeLabel })
|
|
31
31
|
] }) });
|
|
@@ -33,7 +33,7 @@ const PageItem = React__namespace.forwardRef(
|
|
|
33
33
|
);
|
|
34
34
|
PageItem.displayName = "PageItem";
|
|
35
35
|
const NavButton = React__namespace.forwardRef(({ disabled, className, children, directive: directive$1 }, ref) => {
|
|
36
|
-
return /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className:
|
|
36
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: clsx("page-item", { disabled }), children: /* @__PURE__ */ jsxRuntime.jsx("a", { ...directive.useDirectives(directive$1, [directive.classDirective, ["page-link", className]]), children: /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children }) }) });
|
|
37
37
|
});
|
|
38
38
|
NavButton.displayName = "NavButton";
|
|
39
39
|
const export_getPaginationDefaultConfig = pagination.getPaginationDefaultConfig;
|
|
@@ -93,7 +93,7 @@ const PaginationDefaultSlotStructure = (slotContext) => {
|
|
|
93
93
|
);
|
|
94
94
|
}
|
|
95
95
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
96
|
-
/* @__PURE__ */ jsxRuntime.jsxs("ul", { className:
|
|
96
|
+
/* @__PURE__ */ jsxRuntime.jsxs("ul", { className: clsx("au-pagination", "pagination", { [`pagination-${state.size}`]: !!state.size }, state.className), children: [
|
|
97
97
|
ItemsBefore,
|
|
98
98
|
/* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.pagesDisplay, props: slotContext }),
|
|
99
99
|
ItemsAfter
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx } 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
|
|
4
|
+
import clsx from "clsx";
|
|
5
5
|
import { useWidgetWithConfig } from "./generated/config.js";
|
|
6
6
|
import { getProgressbarDefaultConfig, createProgressbar } from "@agnos-ui/core-bootstrap/components/progressbar";
|
|
7
7
|
const export_getProgressbarDefaultConfig = getProgressbarDefaultConfig;
|
|
8
8
|
const export_createProgressbar = createProgressbar;
|
|
9
9
|
const ProgressbarDefaultSlotStructure = (slotContext) => {
|
|
10
10
|
const { striped, animated, type } = slotContext.state;
|
|
11
|
-
const classes =
|
|
11
|
+
const classes = clsx("progress-bar", { "progress-bar-striped": striped }, { "progress-bar-animated": animated }, { [`text-bg-${type}`]: !!type });
|
|
12
12
|
return /* @__PURE__ */ jsx("div", { className: "progress", style: { height: slotContext.state.height || void 0 }, children: /* @__PURE__ */ jsx("div", { className: classes, style: { width: `${slotContext.state.percentage}%` }, children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.children, props: slotContext }) }) });
|
|
13
13
|
};
|
|
14
14
|
const Progressbar = (props) => {
|
|
@@ -2,14 +2,14 @@
|
|
|
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
|
|
5
|
+
const clsx = require("clsx");
|
|
6
6
|
const generated_config = require("./generated/config.cjs");
|
|
7
7
|
const progressbar = require("@agnos-ui/core-bootstrap/components/progressbar");
|
|
8
8
|
const export_getProgressbarDefaultConfig = progressbar.getProgressbarDefaultConfig;
|
|
9
9
|
const export_createProgressbar = progressbar.createProgressbar;
|
|
10
10
|
const ProgressbarDefaultSlotStructure = (slotContext) => {
|
|
11
11
|
const { striped, animated, type } = slotContext.state;
|
|
12
|
-
const classes =
|
|
12
|
+
const classes = clsx("progress-bar", { "progress-bar-striped": striped }, { "progress-bar-animated": animated }, { [`text-bg-${type}`]: !!type });
|
|
13
13
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "progress", style: { height: slotContext.state.height || void 0 }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, style: { width: `${slotContext.state.percentage}%` }, children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.children, props: slotContext }) }) });
|
|
14
14
|
};
|
|
15
15
|
const Progressbar = (props) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Slot } from "@agnos-ui/react-headless/slot";
|
|
3
3
|
import { useDirectives, classDirective, useDirective } from "@agnos-ui/react-headless/utils/directive";
|
|
4
|
-
import
|
|
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";
|
|
7
7
|
import { useImperativeHandle } from "react";
|
|
@@ -24,7 +24,7 @@ function Badges({ slotContext }) {
|
|
|
24
24
|
return badges.length ? /* @__PURE__ */ jsx(Fragment, { children: badges }) : null;
|
|
25
25
|
}
|
|
26
26
|
function SelectItem({ itemContext, slotContext }) {
|
|
27
|
-
const classname =
|
|
27
|
+
const classname = clsx("dropdown-item", "position-relative", { "text-bg-primary": itemContext === slotContext.state.highlighted });
|
|
28
28
|
return /* @__PURE__ */ jsx("li", { className: classname, ...useDirective(slotContext.directives.itemAttributesDirective, itemContext), children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.itemLabel, props: { ...slotContext, itemContext } }) });
|
|
29
29
|
}
|
|
30
30
|
function Rows({ slotContext }) {
|
|
@@ -2,7 +2,7 @@
|
|
|
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
|
|
5
|
+
const clsx = require("clsx");
|
|
6
6
|
const generated_config = require("./generated/config.cjs");
|
|
7
7
|
const select = require("@agnos-ui/core-bootstrap/components/select");
|
|
8
8
|
const React = require("react");
|
|
@@ -25,7 +25,7 @@ function Badges({ slotContext }) {
|
|
|
25
25
|
return badges.length ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: badges }) : null;
|
|
26
26
|
}
|
|
27
27
|
function SelectItem({ itemContext, slotContext }) {
|
|
28
|
-
const classname =
|
|
28
|
+
const classname = clsx("dropdown-item", "position-relative", { "text-bg-primary": itemContext === slotContext.state.highlighted });
|
|
29
29
|
return /* @__PURE__ */ jsxRuntime.jsx("li", { className: classname, ...directive.useDirective(slotContext.directives.itemAttributesDirective, itemContext), children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.itemLabel, props: { ...slotContext, itemContext } }) });
|
|
30
30
|
}
|
|
31
31
|
function Rows({ slotContext }) {
|
|
@@ -10,6 +10,50 @@ const export_createSlider = slider.createSlider;
|
|
|
10
10
|
const SliderDefaultSlotHandle = (slotContext) => {
|
|
11
11
|
return /* @__PURE__ */ jsxRuntime.jsx("button", { ...directive.useDirective(slotContext.directives.handleDirective, { item: slotContext.item }), children: " " });
|
|
12
12
|
};
|
|
13
|
+
const TickLabelDisplay = ({ directive: directive$1, tick }) => {
|
|
14
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { ...directive.useDirective(directive$1, { tick }), children: tick.value });
|
|
15
|
+
};
|
|
16
|
+
const SliderDefaultTick = (slotContext) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
17
|
+
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: slotContext.tick.selected ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19
|
+
"svg",
|
|
20
|
+
{
|
|
21
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
22
|
+
style: { width: "var(--bs-slider-tick-secondary-size)", height: "var(--bs-slider-tick-primary-size)" },
|
|
23
|
+
fill: "none",
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26
|
+
"circle",
|
|
27
|
+
{
|
|
28
|
+
cx: "50%",
|
|
29
|
+
cy: "50%",
|
|
30
|
+
r: "50%",
|
|
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
|
+
) })
|
|
56
|
+
] });
|
|
13
57
|
const ProgressDisplay = ({ directive: directive$1, option }) => {
|
|
14
58
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...directive.useDirective(directive$1, { option }) });
|
|
15
59
|
};
|
|
@@ -38,6 +82,7 @@ const SliderDefaultSlotStructure = (slotContext) => /* @__PURE__ */ jsxRuntime.j
|
|
|
38
82
|
/* @__PURE__ */ jsxRuntime.jsx("div", { ...directive.useDirective(slotContext.directives.clickableAreaDirective) }),
|
|
39
83
|
slotContext.state.showMinMaxLabels && /* @__PURE__ */ jsxRuntime.jsx(MinMaxLabels, { ...slotContext }),
|
|
40
84
|
slotContext.state.showValueLabels && slotContext.state.combinedLabelDisplay && /* @__PURE__ */ jsxRuntime.jsx(CombinedLabel, { ...slotContext }),
|
|
85
|
+
slotContext.state.ticks.map((tick) => /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.tick, props: { tick, ...slotContext } }, tick.position)),
|
|
41
86
|
slotContext.state.sortedHandles.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
|
|
42
87
|
/* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.handle, props: { item, ...slotContext } }),
|
|
43
88
|
slotContext.state.showValueLabels && !slotContext.state.combinedLabelDisplay && /* @__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 } }) })
|
|
@@ -46,12 +91,14 @@ const SliderDefaultSlotStructure = (slotContext) => /* @__PURE__ */ jsxRuntime.j
|
|
|
46
91
|
function Slider(props) {
|
|
47
92
|
const widgetContext = generated_config.useWidgetWithConfig(export_createSlider, props, "slider", {
|
|
48
93
|
structure: SliderDefaultSlotStructure,
|
|
49
|
-
handle: SliderDefaultSlotHandle
|
|
94
|
+
handle: SliderDefaultSlotHandle,
|
|
95
|
+
tick: SliderDefaultTick
|
|
50
96
|
});
|
|
51
97
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...directive.useDirective(widgetContext.directives.sliderDirective), children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: widgetContext.state.structure, props: widgetContext }) });
|
|
52
98
|
}
|
|
53
99
|
exports.Slider = Slider;
|
|
54
100
|
exports.SliderDefaultSlotHandle = SliderDefaultSlotHandle;
|
|
55
101
|
exports.SliderDefaultSlotStructure = SliderDefaultSlotStructure;
|
|
102
|
+
exports.SliderDefaultTick = SliderDefaultTick;
|
|
56
103
|
exports.export_createSlider = export_createSlider;
|
|
57
104
|
exports.export_getSliderDefaultConfig = export_getSliderDefaultConfig;
|
|
@@ -9,6 +9,50 @@ const export_createSlider = createSlider;
|
|
|
9
9
|
const SliderDefaultSlotHandle = (slotContext) => {
|
|
10
10
|
return /* @__PURE__ */ jsx("button", { ...useDirective(slotContext.directives.handleDirective, { item: slotContext.item }), children: " " });
|
|
11
11
|
};
|
|
12
|
+
const TickLabelDisplay = ({ directive, tick }) => {
|
|
13
|
+
return /* @__PURE__ */ jsx("span", { ...useDirective(directive, { tick }), children: tick.value });
|
|
14
|
+
};
|
|
15
|
+
const SliderDefaultTick = (slotContext) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
16
|
+
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: slotContext.tick.selected ? /* @__PURE__ */ jsxs(
|
|
18
|
+
"svg",
|
|
19
|
+
{
|
|
20
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
21
|
+
style: { width: "var(--bs-slider-tick-secondary-size)", height: "var(--bs-slider-tick-primary-size)" },
|
|
22
|
+
fill: "none",
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ jsx(
|
|
25
|
+
"circle",
|
|
26
|
+
{
|
|
27
|
+
cx: "50%",
|
|
28
|
+
cy: "50%",
|
|
29
|
+
r: "50%",
|
|
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
|
+
) })
|
|
55
|
+
] });
|
|
12
56
|
const ProgressDisplay = ({ directive, option }) => {
|
|
13
57
|
return /* @__PURE__ */ jsx("div", { ...useDirective(directive, { option }) });
|
|
14
58
|
};
|
|
@@ -37,6 +81,7 @@ const SliderDefaultSlotStructure = (slotContext) => /* @__PURE__ */ jsxs(Fragmen
|
|
|
37
81
|
/* @__PURE__ */ jsx("div", { ...useDirective(slotContext.directives.clickableAreaDirective) }),
|
|
38
82
|
slotContext.state.showMinMaxLabels && /* @__PURE__ */ jsx(MinMaxLabels, { ...slotContext }),
|
|
39
83
|
slotContext.state.showValueLabels && slotContext.state.combinedLabelDisplay && /* @__PURE__ */ jsx(CombinedLabel, { ...slotContext }),
|
|
84
|
+
slotContext.state.ticks.map((tick) => /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.tick, props: { tick, ...slotContext } }, tick.position)),
|
|
40
85
|
slotContext.state.sortedHandles.map((item, i) => /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
|
|
41
86
|
/* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.handle, props: { item, ...slotContext } }),
|
|
42
87
|
slotContext.state.showValueLabels && !slotContext.state.combinedLabelDisplay && /* @__PURE__ */ jsx(HandleLabelDisplay, { directive: slotContext.directives.handleLabelDisplayDirective, index: i, children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.label, props: { value: slotContext.state.values[i], ...slotContext } }) })
|
|
@@ -45,14 +90,16 @@ const SliderDefaultSlotStructure = (slotContext) => /* @__PURE__ */ jsxs(Fragmen
|
|
|
45
90
|
function Slider(props) {
|
|
46
91
|
const widgetContext = useWidgetWithConfig(export_createSlider, props, "slider", {
|
|
47
92
|
structure: SliderDefaultSlotStructure,
|
|
48
|
-
handle: SliderDefaultSlotHandle
|
|
93
|
+
handle: SliderDefaultSlotHandle,
|
|
94
|
+
tick: SliderDefaultTick
|
|
49
95
|
});
|
|
50
96
|
return /* @__PURE__ */ jsx("div", { ...useDirective(widgetContext.directives.sliderDirective), children: /* @__PURE__ */ jsx(Slot, { slotContent: widgetContext.state.structure, props: widgetContext }) });
|
|
51
97
|
}
|
|
52
98
|
export {
|
|
53
99
|
SliderDefaultSlotHandle as S,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
100
|
+
SliderDefaultTick as a,
|
|
101
|
+
SliderDefaultSlotStructure as b,
|
|
102
|
+
Slider as c,
|
|
103
|
+
export_createSlider as d,
|
|
57
104
|
export_getSliderDefaultConfig as e
|
|
58
105
|
};
|
|
@@ -21,7 +21,7 @@ const ToastElement = (slotContext) => /* @__PURE__ */ jsx(
|
|
|
21
21
|
"div",
|
|
22
22
|
{
|
|
23
23
|
...useDirectives(
|
|
24
|
-
[classDirective,
|
|
24
|
+
[classDirective, { "toast-dismissible": slotContext.state.dismissible, "d-flex": !slotContext.state.header }],
|
|
25
25
|
slotContext.directives.transitionDirective,
|
|
26
26
|
slotContext.directives.autoHideDirective,
|
|
27
27
|
slotContext.directives.bodyDirective
|
|
@@ -22,7 +22,7 @@ const ToastElement = (slotContext) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
22
22
|
"div",
|
|
23
23
|
{
|
|
24
24
|
...directive.useDirectives(
|
|
25
|
-
[directive.classDirective,
|
|
25
|
+
[directive.classDirective, { "toast-dismissible": slotContext.state.dismissible, "d-flex": !slotContext.state.header }],
|
|
26
26
|
slotContext.directives.transitionDirective,
|
|
27
27
|
slotContext.directives.autoHideDirective,
|
|
28
28
|
slotContext.directives.bodyDirective
|
|
@@ -3,7 +3,7 @@ import { Slot } from "@agnos-ui/react-headless/slot";
|
|
|
3
3
|
import { useDirective } from "@agnos-ui/react-headless/utils/directive";
|
|
4
4
|
import { useWidgetWithConfig } from "./generated/config.js";
|
|
5
5
|
import { getTreeDefaultConfig, createTree } from "@agnos-ui/core-bootstrap/components/tree";
|
|
6
|
-
import
|
|
6
|
+
import clsx from "clsx";
|
|
7
7
|
const export_getTreeDefaultConfig = getTreeDefaultConfig;
|
|
8
8
|
const export_createTree = createTree;
|
|
9
9
|
const ToggleButtonDisplay = ({ directive, item }) => {
|
|
@@ -29,7 +29,7 @@ const DefaultTreeSlotItem = (slotContext) => {
|
|
|
29
29
|
};
|
|
30
30
|
const DefaultTreeSlotStructure = (slotContext) => {
|
|
31
31
|
const { state } = slotContext;
|
|
32
|
-
return /* @__PURE__ */ jsx("ul", { role: "tree", className:
|
|
32
|
+
return /* @__PURE__ */ jsx("ul", { role: "tree", className: clsx("au-tree", state.className), ...useDirective(slotContext.directives.navigationDirective), children: state.normalizedNodes.map((node, index) => /* @__PURE__ */ jsx(Slot, { slotContent: state.item, props: { item: node, ...slotContext } }, node.label + node.level + index)) });
|
|
33
33
|
};
|
|
34
34
|
const defaultConfig = {
|
|
35
35
|
structure: DefaultTreeSlotStructure,
|
|
@@ -4,7 +4,7 @@ const slot = require("@agnos-ui/react-headless/slot");
|
|
|
4
4
|
const directive = require("@agnos-ui/react-headless/utils/directive");
|
|
5
5
|
const generated_config = require("./generated/config.cjs");
|
|
6
6
|
const tree = require("@agnos-ui/core-bootstrap/components/tree");
|
|
7
|
-
const
|
|
7
|
+
const clsx = require("clsx");
|
|
8
8
|
const export_getTreeDefaultConfig = tree.getTreeDefaultConfig;
|
|
9
9
|
const export_createTree = tree.createTree;
|
|
10
10
|
const ToggleButtonDisplay = ({ directive: directive$1, item }) => {
|
|
@@ -30,7 +30,7 @@ const DefaultTreeSlotItem = (slotContext) => {
|
|
|
30
30
|
};
|
|
31
31
|
const DefaultTreeSlotStructure = (slotContext) => {
|
|
32
32
|
const { state } = slotContext;
|
|
33
|
-
return /* @__PURE__ */ jsxRuntime.jsx("ul", { role: "tree", className:
|
|
33
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ul", { role: "tree", className: clsx("au-tree", state.className), ...directive.useDirective(slotContext.directives.navigationDirective), children: state.normalizedNodes.map((node, index) => /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.item, props: { item: node, ...slotContext } }, node.label + node.level + index)) });
|
|
34
34
|
};
|
|
35
35
|
const defaultConfig = {
|
|
36
36
|
structure: DefaultTreeSlotStructure,
|