loon-bulma-react 2021.1.35 → 2022.0.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/dist/components/Titles/Titles.d.ts +1 -1
- package/dist/index.js +12 -20
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +12 -20
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
|
@@ -13,7 +13,7 @@ export declare function Title(props: TitleProps): JSX.Element;
|
|
|
13
13
|
*/
|
|
14
14
|
export declare function Subtitle(props: SubtitleProps): JSX.Element;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Combineer een title en een subtitle
|
|
17
17
|
* @param props titleTxt as string, subtitleTxt as string, bulmaSize as number (1-4) en headingSize as number (1-4)
|
|
18
18
|
* De subtitle sizes worden +2 gedaan, dus bij title bulmaSize = 1 en headingSize = 3 (<h3 class="title is-1">)
|
|
19
19
|
* komt een subtitle van (<h6 class="subtitle is-4">)
|
package/dist/index.js
CHANGED
|
@@ -527,9 +527,6 @@ function dataTableReducer(state, action) {
|
|
|
527
527
|
visibleItems: [].concat(state.filteredItems).splice(action.value * state.maxRows, state.maxRows),
|
|
528
528
|
currentPage: action.value
|
|
529
529
|
});
|
|
530
|
-
|
|
531
|
-
default:
|
|
532
|
-
return state;
|
|
533
530
|
}
|
|
534
531
|
}
|
|
535
532
|
|
|
@@ -600,7 +597,7 @@ function DataTable(props) {
|
|
|
600
597
|
});
|
|
601
598
|
if (!sortColumn) return;
|
|
602
599
|
var sorted = [];
|
|
603
|
-
var sortOn = typeof sortColumn.value == 'string' ? sortColumn.value : sortColumn.header;
|
|
600
|
+
var sortOn = typeof sortColumn.value == 'string' ? sortColumn.value : sortColumn.header || undefined;
|
|
604
601
|
|
|
605
602
|
var defaultSort = function defaultSort(a, b) {
|
|
606
603
|
if (!sortOn) {
|
|
@@ -772,15 +769,18 @@ function Footer$1(props) {
|
|
|
772
769
|
}
|
|
773
770
|
|
|
774
771
|
return React__default.createElement("div", {
|
|
775
|
-
className: "datatable-footer pagination is-centered is-small px-6 mb-3"
|
|
772
|
+
className: "datatable-footer pagination is-centered is-small px-6 mb-3",
|
|
773
|
+
role: "pagination"
|
|
776
774
|
}, React__default.createElement(React__default.Fragment, null, React__default.createElement("button", {
|
|
777
775
|
type: "button",
|
|
776
|
+
disabled: props.currentPage == 0,
|
|
778
777
|
className: "pagination-previous",
|
|
779
778
|
onClick: function onClick() {
|
|
780
779
|
return props.onPageChange(props.currentPage != 0 ? props.currentPage - 1 : props.pageCount - 1);
|
|
781
780
|
}
|
|
782
781
|
}, "Vorige"), React__default.createElement("button", {
|
|
783
782
|
type: "button",
|
|
783
|
+
disabled: props.currentPage == props.pageCount - 1,
|
|
784
784
|
className: "pagination-next",
|
|
785
785
|
onClick: function onClick() {
|
|
786
786
|
return props.onPageChange(props.currentPage != props.pageCount - 1 ? props.currentPage + 1 : 0);
|
|
@@ -1485,7 +1485,8 @@ function Title(props) {
|
|
|
1485
1485
|
var hSize = typeof props.headingSize == 'string' ? +props.headingSize.replace('h', '') : props.headingSize;
|
|
1486
1486
|
var heading = props.headingSize ? hSize : bulmaSize;
|
|
1487
1487
|
var classes = "title is-" + bulmaSize;
|
|
1488
|
-
var txt = props.children
|
|
1488
|
+
var txt = props.children || props.txt;
|
|
1489
|
+
if (!txt) throw Error('Title moet children OF txt="..." hebben');
|
|
1489
1490
|
|
|
1490
1491
|
switch (heading) {
|
|
1491
1492
|
case 1:
|
|
@@ -1498,11 +1499,6 @@ function Title(props) {
|
|
|
1498
1499
|
className: classes
|
|
1499
1500
|
}, txt);
|
|
1500
1501
|
|
|
1501
|
-
case 3:
|
|
1502
|
-
return React__default.createElement("h3", {
|
|
1503
|
-
className: classes
|
|
1504
|
-
}, txt);
|
|
1505
|
-
|
|
1506
1502
|
case 4:
|
|
1507
1503
|
return React__default.createElement("h4", {
|
|
1508
1504
|
className: classes
|
|
@@ -1529,7 +1525,8 @@ function Subtitle(props) {
|
|
|
1529
1525
|
var hSize = typeof props.headingSize == 'string' ? +props.headingSize.replace('h', '') : props.headingSize;
|
|
1530
1526
|
var heading = props.headingSize ? hSize : bulmaSize;
|
|
1531
1527
|
var classes = "subtitle is-" + bulmaSize;
|
|
1532
|
-
var txt = props.children
|
|
1528
|
+
var txt = props.children || props.txt;
|
|
1529
|
+
if (!txt) throw Error('Subtitle moet children OF txt="..." hebben.');
|
|
1533
1530
|
|
|
1534
1531
|
switch (heading) {
|
|
1535
1532
|
case 1:
|
|
@@ -1552,11 +1549,6 @@ function Subtitle(props) {
|
|
|
1552
1549
|
className: classes
|
|
1553
1550
|
}, txt);
|
|
1554
1551
|
|
|
1555
|
-
case 5:
|
|
1556
|
-
return React__default.createElement("h5", {
|
|
1557
|
-
className: classes
|
|
1558
|
-
}, txt);
|
|
1559
|
-
|
|
1560
1552
|
case 6:
|
|
1561
1553
|
return React__default.createElement("h6", {
|
|
1562
1554
|
className: classes
|
|
@@ -1571,15 +1563,15 @@ function Subtitle(props) {
|
|
|
1571
1563
|
function TitleWithSubtitle(props) {
|
|
1572
1564
|
var bulmaSize = props.bulmaSize ? +props.bulmaSize : 3;
|
|
1573
1565
|
var hSize = typeof props.headingSize == 'string' ? +props.headingSize.replace('h', '') : props.headingSize;
|
|
1574
|
-
var heading =
|
|
1566
|
+
var heading = hSize || bulmaSize;
|
|
1575
1567
|
return React__default.createElement("div", null, React__default.createElement(Title, {
|
|
1576
1568
|
txt: props.titleTxt,
|
|
1577
1569
|
bulmaSize: bulmaSize,
|
|
1578
1570
|
headingSize: heading
|
|
1579
1571
|
}), React__default.createElement(Subtitle, {
|
|
1580
1572
|
txt: props.subtitleTxt,
|
|
1581
|
-
bulmaSize: bulmaSize +
|
|
1582
|
-
headingSize: heading
|
|
1573
|
+
bulmaSize: bulmaSize + 2,
|
|
1574
|
+
headingSize: heading + 1
|
|
1583
1575
|
}));
|
|
1584
1576
|
}
|
|
1585
1577
|
|