@mintplayer/react-bootstrap 19.29.0 → 19.31.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/README.md +12 -11
- package/accordion/index.mjs +48 -46
- package/card/index.mjs +90 -76
- package/card/src/BsCard.d.ts +1 -1
- package/card/src/BsCardBody.d.ts +1 -1
- package/card/src/BsCardFooter.d.ts +1 -1
- package/card/src/BsCardLink.d.ts +1 -1
- package/card/src/BsCardSubtitle.d.ts +2 -2
- package/card/src/BsCardText.d.ts +1 -1
- package/card/src/BsCardTitle.d.ts +1 -1
- package/carousel/index.mjs +26 -25
- package/checkbox/index.mjs +1 -1
- package/chunks/BsCheckbox-BZkPJ13E.mjs +66 -0
- package/chunks/{BsDatatable.generated-am6uNreO.mjs → BsDatatable.generated-DqNW60JA.mjs} +54 -52
- package/chunks/{BsDatetimePicker.generated-B4WBEiCo.mjs → BsDatetimePicker.generated-CxaiRt79.mjs} +32 -31
- package/chunks/BsRadio-Bw_MhAOq.mjs +57 -0
- package/datatable/index.mjs +1 -1
- package/datatable/src/generated/BsDatatable.generated.d.ts +4 -2
- package/datepicker/index.mjs +28 -27
- package/datetime-picker/index.mjs +1 -1
- package/dropdown-menu/index.mjs +43 -38
- package/file-manager/index.mjs +21 -20
- package/input-group/index.mjs +17 -15
- package/machine/index.mjs +48 -39
- package/machine/src/index.d.ts +1 -0
- package/machine/src/mark-links.d.ts +8 -0
- package/nav/index.mjs +85 -0
- package/nav/src/generated/BsNav.generated.d.ts +15 -0
- package/nav/src/generated/BsNavItem.generated.d.ts +6 -0
- package/nav/src/generated/index.d.ts +2 -0
- package/nav/src/generated/nav-item.view.generated.d.ts +14 -0
- package/nav/src/generated/nav.view.generated.d.ts +14 -0
- package/nav/src/index.d.ts +1 -0
- package/nav/src/nav-item.react.d.ts +4 -0
- package/navbar/index.mjs +87 -77
- package/navbar/src/navbar-item.react.d.ts +4 -0
- package/otp-input/index.mjs +24 -23
- package/package.json +10 -2
- package/pagination/index.mjs +37 -27
- package/phone-input/index.mjs +26 -25
- package/query-builder/index.mjs +30 -28
- package/radio/index.mjs +1 -1
- package/radio-group/index.mjs +1 -1
- package/scheduler/index.mjs +42 -41
- package/select/index.mjs +27 -26
- package/signature-pad/index.mjs +23 -22
- package/spinner/index.mjs +50 -0
- package/spinner/src/generated/BsSpinner.generated.d.ts +11 -0
- package/spinner/src/generated/index.d.ts +1 -0
- package/spinner/src/generated/spinner.view.generated.d.ts +15 -0
- package/spinner/src/index.d.ts +1 -0
- package/tab-control/index.mjs +56 -54
- package/timepicker/index.mjs +42 -41
- package/toggle-button/index.mjs +1 -1
- package/typeahead/index.mjs +90 -87
- package/chunks/BsCheckbox-BWU2Hrhf.mjs +0 -57
- package/chunks/BsRadio-D1C6Aqjv.mjs +0 -48
|
@@ -4,12 +4,14 @@ import * as a from "react";
|
|
|
4
4
|
import { forwardRef as o, useImperativeHandle as ee, useRef as s } from "react";
|
|
5
5
|
import { installLightStyles as c } from "@mintplayer/ui-core/scoped-styles";
|
|
6
6
|
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
7
|
-
import {
|
|
7
|
+
import { bootstrapForms as f } from "@mintplayer/ui-core/bootstrap/forms";
|
|
8
|
+
import { datatableCore as te, datatableScopedStyles as p } from "@mintplayer/ui-core/datatable";
|
|
9
|
+
import { bootstrapPagination as m } from "@mintplayer/ui-core/bootstrap/pagination";
|
|
8
10
|
//#region libs/mintplayer-react-bootstrap/datatable/src/generated/datatable.view.generated.tsx
|
|
9
|
-
function
|
|
11
|
+
function h(e, t) {
|
|
10
12
|
return typeof e == "function" ? e(t) : e;
|
|
11
13
|
}
|
|
12
|
-
function
|
|
14
|
+
function ne({ view: i, slots: o = {}, children: ee, className: s, attrs: c, rootRef: f }) {
|
|
13
15
|
return /* @__PURE__ */ u(l, { children: /* @__PURE__ */ d("div", {
|
|
14
16
|
"data-mps": "datatable",
|
|
15
17
|
...n(i.root),
|
|
@@ -72,7 +74,7 @@ function te({ view: i, slots: o = {}, children: ee, className: s, attrs: c, root
|
|
|
72
74
|
children: [/* @__PURE__ */ u("span", {
|
|
73
75
|
"data-mps": "datatable",
|
|
74
76
|
...n(t.text),
|
|
75
|
-
children: o.header === void 0 ? /* @__PURE__ */ u(l, { children: t.label }) :
|
|
77
|
+
children: o.header === void 0 ? /* @__PURE__ */ u(l, { children: t.label }) : h(o.header, { column: t.column })
|
|
76
78
|
}), t.sortIndex ? /* @__PURE__ */ u(l, { children: /* @__PURE__ */ u("span", {
|
|
77
79
|
"data-mps": "datatable",
|
|
78
80
|
...n(t.sortIndex),
|
|
@@ -84,7 +86,7 @@ function te({ view: i, slots: o = {}, children: ee, className: s, attrs: c, root
|
|
|
84
86
|
children: [/* @__PURE__ */ u("span", {
|
|
85
87
|
"data-mps": "datatable",
|
|
86
88
|
...n(t.text),
|
|
87
|
-
children: o.header === void 0 ? /* @__PURE__ */ u(l, { children: t.label }) :
|
|
89
|
+
children: o.header === void 0 ? /* @__PURE__ */ u(l, { children: t.label }) : h(o.header, { column: t.column })
|
|
88
90
|
}), t.sortIndex ? /* @__PURE__ */ u(l, { children: /* @__PURE__ */ u("span", {
|
|
89
91
|
"data-mps": "datatable",
|
|
90
92
|
...n(t.sortIndex),
|
|
@@ -96,7 +98,7 @@ function te({ view: i, slots: o = {}, children: ee, className: s, attrs: c, root
|
|
|
96
98
|
children: /* @__PURE__ */ u("span", {
|
|
97
99
|
"data-mps": "datatable",
|
|
98
100
|
...n(t.text),
|
|
99
|
-
children: o.header === void 0 ? /* @__PURE__ */ u(l, { children: t.label }) :
|
|
101
|
+
children: o.header === void 0 ? /* @__PURE__ */ u(l, { children: t.label }) : h(o.header, { column: t.column })
|
|
100
102
|
})
|
|
101
103
|
}) }), t.resize ? /* @__PURE__ */ u(l, { children: /* @__PURE__ */ u("span", {
|
|
102
104
|
"data-mps": "datatable",
|
|
@@ -140,7 +142,7 @@ function te({ view: i, slots: o = {}, children: ee, className: s, attrs: c, root
|
|
|
140
142
|
children: e.open && e.open.custom ? /* @__PURE__ */ u(l, { children: /* @__PURE__ */ u("div", {
|
|
141
143
|
"data-mps": "datatable",
|
|
142
144
|
...n(e.open.body),
|
|
143
|
-
children: o.filter === void 0 ? null :
|
|
145
|
+
children: o.filter === void 0 ? null : h(o.filter, {
|
|
144
146
|
column: e.open.column,
|
|
145
147
|
ctx: e.open.ctx
|
|
146
148
|
})
|
|
@@ -282,12 +284,12 @@ function te({ view: i, slots: o = {}, children: ee, className: s, attrs: c, root
|
|
|
282
284
|
}) }) : /* @__PURE__ */ u(l, { children: o.row === void 0 ? /* @__PURE__ */ u(l, { children: t.cells.map((e, r) => /* @__PURE__ */ u(a.Fragment, { children: /* @__PURE__ */ u("td", {
|
|
283
285
|
"data-mps": "datatable",
|
|
284
286
|
...n(e.td),
|
|
285
|
-
children: o.cell === void 0 ? /* @__PURE__ */ u(l, { children: e.text }) :
|
|
287
|
+
children: o.cell === void 0 ? /* @__PURE__ */ u(l, { children: e.text }) : h(o.cell, {
|
|
286
288
|
row: t.row,
|
|
287
289
|
column: e.column,
|
|
288
290
|
rowIndex: t.rowIndex
|
|
289
291
|
})
|
|
290
|
-
}) }, e.key)) }) :
|
|
292
|
+
}) }, e.key)) }) : h(o.row, {
|
|
291
293
|
row: t.row,
|
|
292
294
|
rowIndex: t.rowIndex,
|
|
293
295
|
ctx: t.ctx
|
|
@@ -388,15 +390,15 @@ function te({ view: i, slots: o = {}, children: ee, className: s, attrs: c, root
|
|
|
388
390
|
}
|
|
389
391
|
//#endregion
|
|
390
392
|
//#region libs/mintplayer-react-bootstrap/datatable/src/generated/BsDatatable.generated.tsx
|
|
391
|
-
var
|
|
393
|
+
var g = [], _ = [], v = [], y = [
|
|
392
394
|
10,
|
|
393
395
|
20,
|
|
394
396
|
50
|
|
395
|
-
],
|
|
396
|
-
c("datatable", p);
|
|
397
|
+
], b = [], x = [], S = [], C = {}, w = o(function({ columns: e = g, data: t = _, fetch: n = null, caption: r = null, labels: a = null, inputLabel: o = null, sortColumns: l = v, page: d = 1, perPage: h = 20, perPageOptions: w = y, pagination: T = !1, autoSort: E = !0, selectionMode: D = "none", selectedIds: O = b, cutIds: k = x, focusedRowKey: A = null, rowLabel: j = null, rowKey: M = null, tree: N = !1, idKey: P = null, childCountKey: F = null, treeIndent: I = 1.25, expandedIds: L = S, selectionStrategy: R = "flat", loading: z = !1, emptyMessage: B = "No data", virtualScroll: V = !1, itemSize: H = 40, virtualBuffer: U = 10, fill: re = !1, resizableColumns: W = !0, hrefFor: G = null, distincts: K = null, filters: q = C, fetchParams: J = null, stateKey: Y = null, onSortColumnsChange: X, onPageChange: ie, onPerPageChange: ae, onSelectedIdsChange: oe, onExpandedIdsChange: se, onRowClick: ce, onRowDblClick: le, onRowContextMenu: ue, onSelectionChanged: de, onRowExpand: fe, onRowCollapse: pe, onLoadError: me, onPageLoad: he, onFiltersChange: Z, header: ge, cell: _e, row: ve, filter: ye, className: be, children: xe, ...Q }, Se) {
|
|
398
|
+
c(f.key, f.css, { order: f.order }), c(m.key, m.css, { order: m.order }), c("datatable", p);
|
|
397
399
|
let $ = s(null);
|
|
398
|
-
ee(
|
|
399
|
-
let
|
|
400
|
+
ee(Se, () => $.current);
|
|
401
|
+
let Ce = i(te, {
|
|
400
402
|
columns: e,
|
|
401
403
|
data: t,
|
|
402
404
|
fetch: n,
|
|
@@ -405,55 +407,55 @@ var ne = [], h = [], g = [], _ = [
|
|
|
405
407
|
inputLabel: o,
|
|
406
408
|
sortColumns: l,
|
|
407
409
|
page: d,
|
|
408
|
-
perPage:
|
|
409
|
-
perPageOptions:
|
|
410
|
-
pagination:
|
|
411
|
-
autoSort:
|
|
412
|
-
selectionMode:
|
|
413
|
-
selectedIds:
|
|
414
|
-
cutIds:
|
|
415
|
-
focusedRowKey:
|
|
416
|
-
rowLabel:
|
|
417
|
-
rowKey:
|
|
418
|
-
tree:
|
|
419
|
-
idKey:
|
|
420
|
-
childCountKey:
|
|
421
|
-
treeIndent:
|
|
422
|
-
expandedIds:
|
|
423
|
-
selectionStrategy:
|
|
424
|
-
loading:
|
|
425
|
-
emptyMessage:
|
|
426
|
-
virtualScroll:
|
|
427
|
-
itemSize:
|
|
428
|
-
virtualBuffer:
|
|
429
|
-
fill:
|
|
430
|
-
resizableColumns:
|
|
431
|
-
hrefFor:
|
|
432
|
-
distincts:
|
|
433
|
-
filters:
|
|
434
|
-
fetchParams:
|
|
435
|
-
stateKey:
|
|
410
|
+
perPage: h,
|
|
411
|
+
perPageOptions: w,
|
|
412
|
+
pagination: T,
|
|
413
|
+
autoSort: E,
|
|
414
|
+
selectionMode: D,
|
|
415
|
+
selectedIds: O,
|
|
416
|
+
cutIds: k,
|
|
417
|
+
focusedRowKey: A,
|
|
418
|
+
rowLabel: j,
|
|
419
|
+
rowKey: M,
|
|
420
|
+
tree: N,
|
|
421
|
+
idKey: P,
|
|
422
|
+
childCountKey: F,
|
|
423
|
+
treeIndent: I,
|
|
424
|
+
expandedIds: L,
|
|
425
|
+
selectionStrategy: R,
|
|
426
|
+
loading: z,
|
|
427
|
+
emptyMessage: B,
|
|
428
|
+
virtualScroll: V,
|
|
429
|
+
itemSize: H,
|
|
430
|
+
virtualBuffer: U,
|
|
431
|
+
fill: re,
|
|
432
|
+
resizableColumns: W,
|
|
433
|
+
hrefFor: G,
|
|
434
|
+
distincts: K,
|
|
435
|
+
filters: q,
|
|
436
|
+
fetchParams: J,
|
|
437
|
+
stateKey: Y
|
|
436
438
|
}, {
|
|
437
439
|
idPrefix: "bs-datatable",
|
|
438
440
|
label: Q["aria-label"],
|
|
439
441
|
rootRef: $,
|
|
440
442
|
emit: (e, t) => {
|
|
441
|
-
e === "sortColumnsChange" &&
|
|
443
|
+
e === "sortColumnsChange" && X?.(t), e === "pageChange" && ie?.(t), e === "perPageChange" && ae?.(t), e === "selectedIdsChange" && oe?.(t), e === "expandedIdsChange" && se?.(t), e === "rowClick" && ce?.(t), e === "rowDblClick" && le?.(t), e === "rowContextMenu" && ue?.(t), e === "selectionChanged" && de?.(t), e === "rowExpand" && fe?.(t), e === "rowCollapse" && pe?.(t), e === "loadError" && me?.(t), e === "pageLoad" && he?.(t), e === "filtersChange" && Z?.(t);
|
|
442
444
|
}
|
|
443
445
|
});
|
|
444
|
-
return /* @__PURE__ */ u(
|
|
445
|
-
...
|
|
446
|
+
return /* @__PURE__ */ u(ne, {
|
|
447
|
+
...Ce.props,
|
|
446
448
|
slots: {
|
|
447
|
-
header:
|
|
448
|
-
cell:
|
|
449
|
-
row:
|
|
450
|
-
filter:
|
|
449
|
+
header: ge,
|
|
450
|
+
cell: _e,
|
|
451
|
+
row: ve,
|
|
452
|
+
filter: ye
|
|
451
453
|
},
|
|
452
|
-
className:
|
|
454
|
+
className: be,
|
|
453
455
|
attrs: Q,
|
|
454
456
|
rootRef: $,
|
|
455
|
-
children:
|
|
457
|
+
children: xe
|
|
456
458
|
});
|
|
457
459
|
});
|
|
458
460
|
//#endregion
|
|
459
|
-
export {
|
|
461
|
+
export { w as t };
|
package/chunks/{BsDatetimePicker.generated-B4WBEiCo.mjs → BsDatetimePicker.generated-CxaiRt79.mjs}
RENAMED
|
@@ -4,9 +4,10 @@ import * as r from "react";
|
|
|
4
4
|
import { forwardRef as i, useImperativeHandle as a, useRef as o } from "react";
|
|
5
5
|
import { installLightStyles as s } from "@mintplayer/ui-core/scoped-styles";
|
|
6
6
|
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
7
|
-
import {
|
|
7
|
+
import { bootstrapForms as d } from "@mintplayer/ui-core/bootstrap/forms";
|
|
8
|
+
import { datetimePickerCore as f, datetimePickerScopedStyles as p } from "@mintplayer/ui-core/datetime-picker";
|
|
8
9
|
//#region libs/mintplayer-react-bootstrap/datetime-picker/src/generated/datetime-picker.view.generated.tsx
|
|
9
|
-
function
|
|
10
|
+
function m({ view: n, slots: i = {}, children: a, className: o, attrs: s, rootRef: d }) {
|
|
10
11
|
return /* @__PURE__ */ l(c, { children: /* @__PURE__ */ u("div", {
|
|
11
12
|
"data-mps": "datetime-picker",
|
|
12
13
|
...e(n.root),
|
|
@@ -159,48 +160,48 @@ function p({ view: n, slots: i = {}, children: a, className: o, attrs: s, rootRe
|
|
|
159
160
|
}
|
|
160
161
|
//#endregion
|
|
161
162
|
//#region libs/mintplayer-react-bootstrap/datetime-picker/src/generated/BsDatetimePicker.generated.tsx
|
|
162
|
-
var
|
|
163
|
+
var h = {
|
|
163
164
|
hour: 0,
|
|
164
165
|
minute: 0
|
|
165
|
-
},
|
|
166
|
-
s("datetime-picker",
|
|
167
|
-
let
|
|
168
|
-
a(
|
|
169
|
-
let
|
|
166
|
+
}, g = i(function({ value: e = null, min: t = null, max: r = null, disableDateFn: i = null, firstDayOfWeek: c = 1, locale: u = null, hour12: g = "auto", step: _ = 15, defaultTime: v = h, placeholder: y = null, showClear: b = !1, disabled: x = !1, required: S = !1, invalid: C = !1, errorText: w = null, inputLabel: T = null, name: E = null, labels: D = null, calendarLabels: O = null, onValueChange: k, onOpenChange: A, className: j, children: M, ...N }, P) {
|
|
167
|
+
s(d.key, d.css, { order: d.order }), s("datetime-picker", p);
|
|
168
|
+
let F = o(null);
|
|
169
|
+
a(P, () => F.current);
|
|
170
|
+
let I = n(f, {
|
|
170
171
|
value: e,
|
|
171
172
|
min: t,
|
|
172
173
|
max: r,
|
|
173
174
|
disableDateFn: i,
|
|
174
175
|
firstDayOfWeek: c,
|
|
175
176
|
locale: u,
|
|
176
|
-
hour12:
|
|
177
|
-
step:
|
|
178
|
-
defaultTime:
|
|
179
|
-
placeholder:
|
|
180
|
-
showClear:
|
|
181
|
-
disabled:
|
|
182
|
-
required:
|
|
183
|
-
invalid:
|
|
184
|
-
errorText:
|
|
185
|
-
inputLabel:
|
|
186
|
-
name:
|
|
187
|
-
labels:
|
|
188
|
-
calendarLabels:
|
|
177
|
+
hour12: g,
|
|
178
|
+
step: _,
|
|
179
|
+
defaultTime: v,
|
|
180
|
+
placeholder: y,
|
|
181
|
+
showClear: b,
|
|
182
|
+
disabled: x,
|
|
183
|
+
required: S,
|
|
184
|
+
invalid: C,
|
|
185
|
+
errorText: w,
|
|
186
|
+
inputLabel: T,
|
|
187
|
+
name: E,
|
|
188
|
+
labels: D,
|
|
189
|
+
calendarLabels: O
|
|
189
190
|
}, {
|
|
190
191
|
idPrefix: "bs-datetime-picker",
|
|
191
|
-
label:
|
|
192
|
-
rootRef:
|
|
192
|
+
label: N["aria-label"],
|
|
193
|
+
rootRef: F,
|
|
193
194
|
emit: (e, t) => {
|
|
194
|
-
e === "valueChange" &&
|
|
195
|
+
e === "valueChange" && k?.(t), e === "openChange" && A?.(t);
|
|
195
196
|
}
|
|
196
197
|
});
|
|
197
|
-
return /* @__PURE__ */ l(
|
|
198
|
-
...
|
|
199
|
-
className:
|
|
200
|
-
attrs:
|
|
201
|
-
rootRef:
|
|
202
|
-
children:
|
|
198
|
+
return /* @__PURE__ */ l(m, {
|
|
199
|
+
...I.props,
|
|
200
|
+
className: j,
|
|
201
|
+
attrs: N,
|
|
202
|
+
rootRef: F,
|
|
203
|
+
children: M
|
|
203
204
|
});
|
|
204
205
|
});
|
|
205
206
|
//#endregion
|
|
206
|
-
export {
|
|
207
|
+
export { g as t };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { r as e } from "./react-props-C2O2_2V2.mjs";
|
|
2
|
+
import { installBootstrap as t } from "@mintplayer/ui-core/bootstrap";
|
|
3
|
+
import { createContext as n, forwardRef as r, useContext as i, useId as a, useState as o } from "react";
|
|
4
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
5
|
+
import { bootstrapForms as u } from "@mintplayer/ui-core/bootstrap/forms";
|
|
6
|
+
import { connectRadio as d, radioClasses as f } from "@mintplayer/ui-core/radio";
|
|
7
|
+
//#region libs/mintplayer-react-bootstrap/radio/src/BsRadio.tsx
|
|
8
|
+
var p = n(null), m = r(function(n, r) {
|
|
9
|
+
let { type: m = "radio", color: h = "secondary", value: g, checked: _, defaultChecked: v, name: y, disabled: b, required: x, invalid: S = !1, errorText: C, onCheckedChange: w, onChange: T, className: E, children: D, id: O, "aria-describedby": k, ...A } = n, j = i(p), M = `bs-radio-${a().replace(/[^a-zA-Z0-9_-]/g, "")}`, [N, P] = o(!!v), F = (j && j.value !== void 0 ? j.value !== null && j.value === g : void 0) ?? _ ?? (j ? void 0 : N), I = {
|
|
10
|
+
type: m,
|
|
11
|
+
checked: !!F,
|
|
12
|
+
disabled: !!b || !!j?.disabled,
|
|
13
|
+
required: !!x || !!j?.required,
|
|
14
|
+
invalid: S,
|
|
15
|
+
name: j?.name ?? y ?? null,
|
|
16
|
+
value: g ?? null,
|
|
17
|
+
errorText: C ?? null
|
|
18
|
+
}, L = d(I, M, k);
|
|
19
|
+
t(u);
|
|
20
|
+
let R = f(m, h, S), z = O ?? String(L.input.id), B = F === void 0 ? { defaultChecked: j?.defaultValue != null && j.defaultValue === g } : { checked: F }, V = /* @__PURE__ */ c("input", {
|
|
21
|
+
ref: r,
|
|
22
|
+
"data-mps": "radio",
|
|
23
|
+
className: [R.input, E].filter(Boolean).join(" "),
|
|
24
|
+
...e(L.input),
|
|
25
|
+
...A,
|
|
26
|
+
id: z,
|
|
27
|
+
type: "radio",
|
|
28
|
+
...B,
|
|
29
|
+
onChange: (e) => {
|
|
30
|
+
T?.(e), j && g !== void 0 && j.select(g), !j && _ === void 0 && P(e.target.checked), w?.(e.target.checked);
|
|
31
|
+
}
|
|
32
|
+
}), H = L.feedback && /* @__PURE__ */ c("div", {
|
|
33
|
+
"data-mps": "radio",
|
|
34
|
+
...e(L.feedback.attrs),
|
|
35
|
+
children: L.feedback.text
|
|
36
|
+
});
|
|
37
|
+
return R.root === null ? /* @__PURE__ */ l(s, { children: [
|
|
38
|
+
V,
|
|
39
|
+
/* @__PURE__ */ c("label", {
|
|
40
|
+
"data-mps": "radio",
|
|
41
|
+
className: R.label,
|
|
42
|
+
htmlFor: z,
|
|
43
|
+
children: D
|
|
44
|
+
}),
|
|
45
|
+
H
|
|
46
|
+
] }) : /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ l("label", {
|
|
47
|
+
"data-mps": "radio",
|
|
48
|
+
className: R.root,
|
|
49
|
+
children: [V, /* @__PURE__ */ c("span", {
|
|
50
|
+
"data-mps": "radio",
|
|
51
|
+
className: R.label,
|
|
52
|
+
children: D
|
|
53
|
+
})]
|
|
54
|
+
}), H] });
|
|
55
|
+
});
|
|
56
|
+
//#endregion
|
|
57
|
+
export { p as n, m as t };
|
package/datatable/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as e } from "../chunks/BsDatatable.generated-
|
|
1
|
+
import { t as e } from "../chunks/BsDatatable.generated-DqNW60JA.mjs";
|
|
2
2
|
import { DEFAULT_DATATABLE_LABELS as t, cellText as n, computeNextSort as r, sortRows as i } from "@mintplayer/ui-core/datatable";
|
|
3
3
|
export { e as BsDatatable, t as DEFAULT_DATATABLE_LABELS, n as cellText, r as computeNextSort, i as sortRows };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DatatableFilters, DatatableInputs, DatatableLoadErrorDetail, RowEventDetail, SelectionChangeEventDetail, SortColumn, TreeRowExpandDetail } from '@mintplayer/ui-core/datatable';
|
|
1
|
+
import { DatatableFilters, DatatableInputs, DatatableLoadErrorDetail, DatatablePageLoadDetail, RowEventDetail, SelectionChangeEventDetail, SortColumn, TreeRowExpandDetail } from '@mintplayer/ui-core/datatable';
|
|
2
2
|
import { DatatableTemplateProps } from './datatable.view.generated';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
export interface BsDatatableProps extends Omit<React.HTMLAttributes<HTMLElementTagNameMap['div']>, 'columns' | 'data' | 'fetch' | 'caption' | 'labels' | 'inputLabel' | 'sortColumns' | 'page' | 'perPage' | 'perPageOptions' | 'pagination' | 'autoSort' | 'selectionMode' | 'selectedIds' | 'cutIds' | 'focusedRowKey' | 'rowLabel' | 'rowKey' | 'tree' | 'idKey' | 'childCountKey' | 'treeIndent' | 'expandedIds' | 'selectionStrategy' | 'loading' | 'emptyMessage' | 'virtualScroll' | 'itemSize' | 'virtualBuffer' | 'fill' | 'resizableColumns' | 'hrefFor' | 'distincts' | 'filters' | 'fetchParams' | 'stateKey' | 'onSortColumnsChange' | 'onPageChange' | 'onPerPageChange' | 'onSelectedIdsChange' | 'onExpandedIdsChange' | 'onRowClick' | 'onRowDblClick' | 'onRowContextMenu' | 'onSelectionChanged' | 'onRowExpand' | 'onRowCollapse' | 'onLoadError' | 'onFiltersChange' | 'header' | 'cell' | 'row' | 'filter'> {
|
|
4
|
+
export interface BsDatatableProps extends Omit<React.HTMLAttributes<HTMLElementTagNameMap['div']>, 'columns' | 'data' | 'fetch' | 'caption' | 'labels' | 'inputLabel' | 'sortColumns' | 'page' | 'perPage' | 'perPageOptions' | 'pagination' | 'autoSort' | 'selectionMode' | 'selectedIds' | 'cutIds' | 'focusedRowKey' | 'rowLabel' | 'rowKey' | 'tree' | 'idKey' | 'childCountKey' | 'treeIndent' | 'expandedIds' | 'selectionStrategy' | 'loading' | 'emptyMessage' | 'virtualScroll' | 'itemSize' | 'virtualBuffer' | 'fill' | 'resizableColumns' | 'hrefFor' | 'distincts' | 'filters' | 'fetchParams' | 'stateKey' | 'onSortColumnsChange' | 'onPageChange' | 'onPerPageChange' | 'onSelectedIdsChange' | 'onExpandedIdsChange' | 'onRowClick' | 'onRowDblClick' | 'onRowContextMenu' | 'onSelectionChanged' | 'onRowExpand' | 'onRowCollapse' | 'onLoadError' | 'onPageLoad' | 'onFiltersChange' | 'header' | 'cell' | 'row' | 'filter'> {
|
|
5
5
|
columns?: DatatableInputs['columns'];
|
|
6
6
|
data?: DatatableInputs['data'];
|
|
7
7
|
fetch?: DatatableInputs['fetch'];
|
|
@@ -62,6 +62,8 @@ export interface BsDatatableProps extends Omit<React.HTMLAttributes<HTMLElementT
|
|
|
62
62
|
onRowCollapse?: (detail: TreeRowExpandDetail) => void;
|
|
63
63
|
/** A `fetch` call rejected. */
|
|
64
64
|
onLoadError?: (detail: DatatableLoadErrorDetail) => void;
|
|
65
|
+
/** A response the table applied, or the page 1 it was seeded with on the server (`seeded: true`, `fetch` not called); carries the response `extra`. */
|
|
66
|
+
onPageLoad?: (detail: DatatablePageLoadDetail) => void;
|
|
65
67
|
/** The column filters, after the user changed them; `fetch` (or the consumer, over `data`) applies them. */
|
|
66
68
|
onFiltersChange?: (detail: DatatableFilters) => void;
|
|
67
69
|
header?: NonNullable<DatatableTemplateProps['slots']>['header'];
|
package/datepicker/index.mjs
CHANGED
|
@@ -4,9 +4,10 @@ import * as r from "react";
|
|
|
4
4
|
import { forwardRef as i, useImperativeHandle as a, useRef as o } from "react";
|
|
5
5
|
import { installLightStyles as s } from "@mintplayer/ui-core/scoped-styles";
|
|
6
6
|
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
7
|
-
import {
|
|
7
|
+
import { bootstrapForms as d } from "@mintplayer/ui-core/bootstrap/forms";
|
|
8
|
+
import { datepickerCore as f, datepickerScopedStyles as p } from "@mintplayer/ui-core/datepicker";
|
|
8
9
|
//#region libs/mintplayer-react-bootstrap/datepicker/src/generated/datepicker.view.generated.tsx
|
|
9
|
-
function
|
|
10
|
+
function m({ view: n, slots: i = {}, children: a, className: o, attrs: s, rootRef: d }) {
|
|
10
11
|
return /* @__PURE__ */ l(c, { children: /* @__PURE__ */ u("div", {
|
|
11
12
|
"data-mps": "datepicker",
|
|
12
13
|
...e(n.root),
|
|
@@ -109,42 +110,42 @@ function p({ view: n, slots: i = {}, children: a, className: o, attrs: s, rootRe
|
|
|
109
110
|
}
|
|
110
111
|
//#endregion
|
|
111
112
|
//#region libs/mintplayer-react-bootstrap/datepicker/src/generated/BsDatepicker.generated.tsx
|
|
112
|
-
var
|
|
113
|
-
s("datepicker",
|
|
114
|
-
let
|
|
115
|
-
a(
|
|
116
|
-
let
|
|
113
|
+
var h = i(function({ selectedDate: e = null, currentMonth: t = null, min: r = null, max: i = null, disableDateFn: c = null, firstDayOfWeek: u = 1, locale: h = null, disabled: g = !1, placeholder: _ = null, required: v = !1, invalid: y = !1, errorText: b = null, inputLabel: x = null, name: S = null, labels: C = null, calendarLabels: w = null, onSelectedDateChange: T, onCurrentMonthChange: E, onOpenChange: D, className: O, children: k, ...A }, j) {
|
|
114
|
+
s(d.key, d.css, { order: d.order }), s("datepicker", p);
|
|
115
|
+
let M = o(null);
|
|
116
|
+
a(j, () => M.current);
|
|
117
|
+
let N = n(f, {
|
|
117
118
|
selectedDate: e,
|
|
118
119
|
currentMonth: t,
|
|
119
120
|
min: r,
|
|
120
121
|
max: i,
|
|
121
122
|
disableDateFn: c,
|
|
122
123
|
firstDayOfWeek: u,
|
|
123
|
-
locale:
|
|
124
|
-
disabled:
|
|
125
|
-
placeholder:
|
|
126
|
-
required:
|
|
127
|
-
invalid:
|
|
128
|
-
errorText:
|
|
129
|
-
inputLabel:
|
|
130
|
-
name:
|
|
131
|
-
labels:
|
|
132
|
-
calendarLabels:
|
|
124
|
+
locale: h,
|
|
125
|
+
disabled: g,
|
|
126
|
+
placeholder: _,
|
|
127
|
+
required: v,
|
|
128
|
+
invalid: y,
|
|
129
|
+
errorText: b,
|
|
130
|
+
inputLabel: x,
|
|
131
|
+
name: S,
|
|
132
|
+
labels: C,
|
|
133
|
+
calendarLabels: w
|
|
133
134
|
}, {
|
|
134
135
|
idPrefix: "bs-datepicker",
|
|
135
|
-
label:
|
|
136
|
-
rootRef:
|
|
136
|
+
label: A["aria-label"],
|
|
137
|
+
rootRef: M,
|
|
137
138
|
emit: (e, t) => {
|
|
138
|
-
e === "selectedDateChange" &&
|
|
139
|
+
e === "selectedDateChange" && T?.(t), e === "currentMonthChange" && E?.(t), e === "openChange" && D?.(t);
|
|
139
140
|
}
|
|
140
141
|
});
|
|
141
|
-
return /* @__PURE__ */ l(
|
|
142
|
-
...
|
|
143
|
-
className:
|
|
144
|
-
attrs:
|
|
145
|
-
rootRef:
|
|
146
|
-
children:
|
|
142
|
+
return /* @__PURE__ */ l(m, {
|
|
143
|
+
...N.props,
|
|
144
|
+
className: O,
|
|
145
|
+
attrs: A,
|
|
146
|
+
rootRef: M,
|
|
147
|
+
children: k
|
|
147
148
|
});
|
|
148
149
|
});
|
|
149
150
|
//#endregion
|
|
150
|
-
export {
|
|
151
|
+
export { h as BsDatepicker };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as BsDatetimePicker } from "../chunks/BsDatetimePicker.generated-
|
|
1
|
+
export { t as BsDatetimePicker } from "../chunks/BsDatetimePicker.generated-CxaiRt79.mjs";
|
package/dropdown-menu/index.mjs
CHANGED
|
@@ -1,67 +1,72 @@
|
|
|
1
1
|
import { r as e } from "../chunks/react-props-C2O2_2V2.mjs";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { installBootstrap as t } from "@mintplayer/ui-core/bootstrap";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { forwardRef as r, useEffect as i, useImperativeHandle as a, useRef as o, useState as s } from "react";
|
|
5
|
+
import { installLightStyles as c } from "@mintplayer/ui-core/scoped-styles";
|
|
6
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
7
|
+
import { bootstrapDropdown as u } from "@mintplayer/ui-core/bootstrap/dropdown";
|
|
8
|
+
import { DROPDOWN_MENU_SCOPE as d, attachDropdownMenu as f, connectDropdownMenu as p, dropdownMenuScopedStyles as m } from "@mintplayer/ui-core/dropdown-menu";
|
|
7
9
|
//#region libs/mintplayer-react-bootstrap/dropdown-menu/src/BsDropdownMenu.tsx
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
let
|
|
11
|
-
|
|
12
|
-
let [
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
let e =
|
|
16
|
-
if (e) return
|
|
10
|
+
var h = r(function({ maxHeight: n, onSelect: r, className: h, style: g, children: _, ...v }, y) {
|
|
11
|
+
t(u), c(d, m);
|
|
12
|
+
let b = o(null);
|
|
13
|
+
a(y, () => b.current);
|
|
14
|
+
let [x, S] = s(!1), C = o(r);
|
|
15
|
+
C.current = r, i(() => {
|
|
16
|
+
S(!0);
|
|
17
|
+
let e = b.current;
|
|
18
|
+
if (e) return f(e, { onSelect: (e) => C.current?.(e) });
|
|
17
19
|
}, []);
|
|
18
|
-
let { class:
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
ref:
|
|
21
|
-
"data-mps":
|
|
22
|
-
...e(
|
|
23
|
-
...
|
|
24
|
-
style:
|
|
25
|
-
...
|
|
26
|
-
"--mp-dropdown-max-height": `${
|
|
20
|
+
let { class: w, ...T } = p({ hydrated: x });
|
|
21
|
+
return /* @__PURE__ */ l("ul", {
|
|
22
|
+
ref: b,
|
|
23
|
+
"data-mps": d,
|
|
24
|
+
...e(T),
|
|
25
|
+
...v,
|
|
26
|
+
style: n === void 0 ? g : {
|
|
27
|
+
...g,
|
|
28
|
+
"--mp-dropdown-max-height": `${n}px`
|
|
27
29
|
},
|
|
28
|
-
className: [String(
|
|
29
|
-
children:
|
|
30
|
+
className: [String(w), h].filter(Boolean).join(" "),
|
|
31
|
+
children: _
|
|
30
32
|
});
|
|
31
|
-
}),
|
|
32
|
-
let
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
}), g = n.forwardRef(function({ active: e, disabled: t, value: r, className: i, children: a, ...o }, s) {
|
|
34
|
+
let c = n.useRef(null);
|
|
35
|
+
n.useImperativeHandle(s, () => c.current), n.useEffect(() => {
|
|
36
|
+
c.current && (c.current.dropdownValue = r);
|
|
35
37
|
}, [r]);
|
|
36
38
|
let u = [
|
|
37
39
|
"dropdown-item",
|
|
38
40
|
e ? "active" : "",
|
|
39
|
-
|
|
41
|
+
t ? "disabled" : "",
|
|
40
42
|
i ?? ""
|
|
41
43
|
].filter(Boolean).join(" ");
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
-
ref:
|
|
44
|
+
return /* @__PURE__ */ l("li", {
|
|
45
|
+
ref: c,
|
|
44
46
|
className: u,
|
|
45
|
-
"
|
|
47
|
+
"data-mps": d,
|
|
48
|
+
"aria-disabled": t ? !0 : void 0,
|
|
46
49
|
...o,
|
|
47
50
|
children: a
|
|
48
51
|
});
|
|
49
|
-
}),
|
|
52
|
+
}), _ = n.forwardRef(function({ className: e, ...t }, n) {
|
|
50
53
|
let r = ["dropdown-divider", e ?? ""].filter(Boolean).join(" ");
|
|
51
|
-
return /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ l("li", {
|
|
52
55
|
ref: n,
|
|
53
56
|
role: "separator",
|
|
54
57
|
className: r,
|
|
58
|
+
"data-mps": d,
|
|
55
59
|
...t
|
|
56
60
|
});
|
|
57
|
-
}),
|
|
61
|
+
}), v = n.forwardRef(function({ className: e, children: t, ...n }, r) {
|
|
58
62
|
let i = ["dropdown-header", e ?? ""].filter(Boolean).join(" ");
|
|
59
|
-
return /* @__PURE__ */
|
|
63
|
+
return /* @__PURE__ */ l("li", {
|
|
60
64
|
ref: r,
|
|
61
65
|
className: i,
|
|
66
|
+
"data-mps": d,
|
|
62
67
|
...n,
|
|
63
68
|
children: t
|
|
64
69
|
});
|
|
65
70
|
});
|
|
66
71
|
//#endregion
|
|
67
|
-
export {
|
|
72
|
+
export { _ as BsDropdownDivider, v as BsDropdownHeader, g as BsDropdownItem, h as BsDropdownMenu };
|