@banyan_cloud/roots 1.0.33 → 1.0.35
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/cjs/index.js +2336 -1499
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +2334 -1500
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +2334 -1500
- package/package.json +5 -4
package/dist/cjs/index.js
CHANGED
|
@@ -1407,7 +1407,8 @@ var getSpacedDisplayName = function getSpacedDisplayName(string) {
|
|
|
1407
1407
|
});
|
|
1408
1408
|
};
|
|
1409
1409
|
var doubleDigitted = function doubleDigitted(number) {
|
|
1410
|
-
|
|
1410
|
+
var _number$toString$slic;
|
|
1411
|
+
return number === null || number === void 0 ? void 0 : (_number$toString$slic = number.toString().slice(-2)) === null || _number$toString$slic === void 0 ? void 0 : _number$toString$slic.padStart(2, '0');
|
|
1411
1412
|
};
|
|
1412
1413
|
var getJSDateFromEpoch = function getJSDateFromEpoch(epoch) {
|
|
1413
1414
|
var date = new Date(0);
|
|
@@ -1544,13 +1545,23 @@ var getDayInfo = function getDayInfo(date) {
|
|
|
1544
1545
|
var dateAsNumber = date.getDate();
|
|
1545
1546
|
var day = DAYS[date.getDay()];
|
|
1546
1547
|
var dayAsNumber = date.getDay();
|
|
1548
|
+
var hoursIn12 = date.getHours();
|
|
1549
|
+
var hours = (date.getHours() + 11) % 12 + 1;
|
|
1550
|
+
var minutes = date.getMinutes();
|
|
1551
|
+
var seconds = date.getSeconds();
|
|
1552
|
+
var meridian = hours >= 12 ? 'PM' : 'AM';
|
|
1547
1553
|
return {
|
|
1548
1554
|
month: month,
|
|
1549
1555
|
monthAsNumber: monthAsNumber,
|
|
1550
1556
|
year: year,
|
|
1551
1557
|
dateAsNumber: dateAsNumber,
|
|
1552
1558
|
day: day,
|
|
1553
|
-
dayAsNumber: dayAsNumber
|
|
1559
|
+
dayAsNumber: dayAsNumber,
|
|
1560
|
+
hoursIn12: hoursIn12,
|
|
1561
|
+
hours: hours,
|
|
1562
|
+
minutes: minutes,
|
|
1563
|
+
seconds: seconds,
|
|
1564
|
+
meridian: meridian
|
|
1554
1565
|
};
|
|
1555
1566
|
};
|
|
1556
1567
|
var getDatesInAMonth = function getDatesInAMonth(_ref) {
|
|
@@ -1580,9 +1591,9 @@ var getCSSVariableValue = function getCSSVariableValue(variable) {
|
|
|
1580
1591
|
|
|
1581
1592
|
var e$1=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e$1.indexOf(i);-1===u&&(u=e$1.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
1582
1593
|
|
|
1583
|
-
var css$
|
|
1594
|
+
var css$V = ".BaseCell_module_root__81e07d2d {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding: 0.5rem;\n gap: 0.5rem;\n flex: none;\n height: 3rem;\n background: var(--white);\n max-width: 100%;\n max-height: 100%;\n}\n.BaseCell_module_root__81e07d2d > [data-elem*=component] {\n display: inline-block;\n max-height: 100%;\n}\n.BaseCell_module_root__81e07d2d.BaseCell_module_sm__81e07d2d {\n width: 9.063rem;\n}\n.BaseCell_module_root__81e07d2d.BaseCell_module_md__81e07d2d {\n width: 15.625rem;\n}\n.BaseCell_module_root__81e07d2d.BaseCell_module_lg__81e07d2d {\n width: 21.875rem;\n}\n.BaseCell_module_root__81e07d2d.BaseCell_module_auto__81e07d2d {\n width: auto;\n}\n.BaseCell_module_root__81e07d2d.BaseCell_module_borderRadiusDefault__81e07d2d {\n border-radius: 0.25rem;\n}\n.BaseCell_module_root__81e07d2d.BaseCell_module_borderRadiusRound__81e07d2d {\n border-radius: 50%;\n}\n.BaseCell_module_root__81e07d2d.BaseCell_module_borderRadiusEllipse__81e07d2d {\n border-radius: 1.563rem;\n}\n.BaseCell_module_root__81e07d2d.BaseCell_module_flexible__81e07d2d {\n flex-grow: 1;\n flex-shrink: 1;\n min-width: 3rem;\n}\n.BaseCell_module_root__81e07d2d.BaseCell_module_flexible__81e07d2d.BaseCell_module_sm__81e07d2d {\n min-width: 9.063rem;\n}\n.BaseCell_module_root__81e07d2d.BaseCell_module_flexible__81e07d2d.BaseCell_module_md__81e07d2d {\n min-width: 15.625rem;\n}\n.BaseCell_module_root__81e07d2d.BaseCell_module_flexible__81e07d2d.BaseCell_module_lg__81e07d2d {\n min-width: 21.875rem;\n}";
|
|
1584
1595
|
var modules_3af9b74c = {"root":"BaseCell_module_root__81e07d2d","sm":"BaseCell_module_sm__81e07d2d","md":"BaseCell_module_md__81e07d2d","lg":"BaseCell_module_lg__81e07d2d","auto":"BaseCell_module_auto__81e07d2d","border-radius-default":"BaseCell_module_borderRadiusDefault__81e07d2d","border-radius-round":"BaseCell_module_borderRadiusRound__81e07d2d","border-radius-ellipse":"BaseCell_module_borderRadiusEllipse__81e07d2d","flexible":"BaseCell_module_flexible__81e07d2d"};
|
|
1585
|
-
n(css$
|
|
1596
|
+
n(css$V,{});
|
|
1586
1597
|
|
|
1587
1598
|
var BaseCell = /*#__PURE__*/React.forwardRef(function BaseCell(props, ref) {
|
|
1588
1599
|
var className = props.className,
|
|
@@ -1662,9 +1673,9 @@ var defaultProps$1 = {
|
|
|
1662
1673
|
attrs: {}
|
|
1663
1674
|
};
|
|
1664
1675
|
|
|
1665
|
-
var css$
|
|
1676
|
+
var css$U = "button.BaseButton_module_root__39a3f3ec[data-elem=base-cell] {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n display: inline-flex;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n border: none;\n background: none;\n padding: 0.5rem 0.75rem;\n}\nbutton.BaseButton_module_root__39a3f3ec[data-elem=base-cell]:focus {\n outline: 1px solid var(--highlight);\n}\nbutton.BaseButton_module_root__39a3f3ec[data-elem=base-cell]:active {\n outline: none;\n}\nbutton.BaseButton_module_root__39a3f3ec[data-elem=base-cell]:disabled {\n cursor: not-allowed;\n}\nbutton.BaseButton_module_root__39a3f3ec[data-elem=base-cell].BaseButton_module_contained__39a3f3ec {\n background: var(--black);\n color: var(--white);\n}\nbutton.BaseButton_module_root__39a3f3ec[data-elem=base-cell].BaseButton_module_outlined__39a3f3ec {\n color: var(--black);\n border: 1px solid var(--black);\n}\nbutton.BaseButton_module_root__39a3f3ec[data-elem=base-cell].BaseButton_module_text__39a3f3ec {\n color: var(--black);\n}\nbutton.BaseButton_module_root__39a3f3ec[data-elem=base-cell] [data-elem*=component] {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n}\nbutton.BaseButton_module_root__39a3f3ec[data-elem=base-cell] [data-elem=component2] {\n min-width: 0;\n}\nbutton.BaseButton_module_root__39a3f3ec[data-elem=base-cell] [data-elem=title] {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}";
|
|
1666
1677
|
var modules_ab72627b = {"root":"BaseButton_module_root__39a3f3ec","contained":"BaseButton_module_contained__39a3f3ec","outlined":"BaseButton_module_outlined__39a3f3ec","text":"BaseButton_module_text__39a3f3ec"};
|
|
1667
|
-
n(css$
|
|
1678
|
+
n(css$U,{});
|
|
1668
1679
|
|
|
1669
1680
|
var BaseButton = /*#__PURE__*/React.forwardRef(function BaseButton(props, ref) {
|
|
1670
1681
|
var className = props.className,
|
|
@@ -1723,9 +1734,9 @@ BaseButton.defaultProps = _objectSpread2(_objectSpread2({}, BaseCell.defaultProp
|
|
|
1723
1734
|
variant: 'contained'
|
|
1724
1735
|
});
|
|
1725
1736
|
|
|
1726
|
-
var css$
|
|
1737
|
+
var css$T = ".Button_module_root__0be1a26c[data-elem=base-cell] {\n cursor: pointer;\n}\n.Button_module_root__0be1a26c[data-elem=base-cell] [data-elem=component2] [data-elem=title] {\n font-weight: 500;\n font-size: 0.875rem;\n}\n.Button_module_root__0be1a26c[data-elem=base-cell].Button_module_primary__0be1a26c.Button_module_contained__0be1a26c {\n background-color: var(--highlight);\n color: var(--white);\n}\n.Button_module_root__0be1a26c[data-elem=base-cell].Button_module_primary__0be1a26c.Button_module_outlined__0be1a26c {\n background-color: transparent;\n border-color: var(--highlight);\n}\n.Button_module_root__0be1a26c[data-elem=base-cell].Button_module_primary__0be1a26c.Button_module_outlined__0be1a26c, .Button_module_root__0be1a26c[data-elem=base-cell].Button_module_primary__0be1a26c.Button_module_text__0be1a26c {\n color: var(--highlight);\n}\n.Button_module_root__0be1a26c[data-elem=base-cell].Button_module_success__0be1a26c.Button_module_contained__0be1a26c {\n background-color: var(--success);\n color: var(--white);\n}\n.Button_module_root__0be1a26c[data-elem=base-cell].Button_module_success__0be1a26c.Button_module_outlined__0be1a26c {\n background-color: transparent;\n border-color: var(--success);\n}\n.Button_module_root__0be1a26c[data-elem=base-cell].Button_module_success__0be1a26c.Button_module_outlined__0be1a26c, .Button_module_root__0be1a26c[data-elem=base-cell].Button_module_success__0be1a26c.Button_module_text__0be1a26c {\n color: var(--success);\n}\n.Button_module_root__0be1a26c[data-elem=base-cell].Button_module_danger__0be1a26c.Button_module_contained__0be1a26c {\n background-color: var(--error);\n color: var(--white);\n}\n.Button_module_root__0be1a26c[data-elem=base-cell].Button_module_danger__0be1a26c.Button_module_outlined__0be1a26c {\n background-color: transparent;\n border-color: var(--error);\n}\n.Button_module_root__0be1a26c[data-elem=base-cell].Button_module_danger__0be1a26c.Button_module_outlined__0be1a26c, .Button_module_root__0be1a26c[data-elem=base-cell].Button_module_danger__0be1a26c.Button_module_text__0be1a26c {\n color: var(--error);\n}\n.Button_module_root__0be1a26c[data-elem=base-cell].Button_module_warning__0be1a26c.Button_module_contained__0be1a26c {\n background-color: var(--warning);\n color: var(--white);\n}\n.Button_module_root__0be1a26c[data-elem=base-cell].Button_module_warning__0be1a26c.Button_module_outlined__0be1a26c {\n background-color: transparent;\n border-color: var(--warning);\n}\n.Button_module_root__0be1a26c[data-elem=base-cell].Button_module_warning__0be1a26c.Button_module_outlined__0be1a26c, .Button_module_root__0be1a26c[data-elem=base-cell].Button_module_warning__0be1a26c.Button_module_text__0be1a26c {\n color: var(--warning);\n}\n.Button_module_root__0be1a26c[data-elem=base-cell]:disabled.Button_module_primary__0be1a26c.Button_module_contained__0be1a26c, .Button_module_root__0be1a26c[data-elem=base-cell]:disabled.Button_module_success__0be1a26c.Button_module_contained__0be1a26c, .Button_module_root__0be1a26c[data-elem=base-cell]:disabled.Button_module_danger__0be1a26c.Button_module_contained__0be1a26c, .Button_module_root__0be1a26c[data-elem=base-cell]:disabled.Button_module_warning__0be1a26c.Button_module_contained__0be1a26c {\n background-color: var(--grey4);\n color: var(--grey);\n}\n.Button_module_root__0be1a26c[data-elem=base-cell]:disabled.Button_module_primary__0be1a26c.Button_module_outlined__0be1a26c, .Button_module_root__0be1a26c[data-elem=base-cell]:disabled.Button_module_success__0be1a26c.Button_module_outlined__0be1a26c, .Button_module_root__0be1a26c[data-elem=base-cell]:disabled.Button_module_danger__0be1a26c.Button_module_outlined__0be1a26c, .Button_module_root__0be1a26c[data-elem=base-cell]:disabled.Button_module_warning__0be1a26c.Button_module_outlined__0be1a26c {\n background-color: transparent;\n border-color: var(--grey);\n}\n.Button_module_root__0be1a26c[data-elem=base-cell]:disabled.Button_module_primary__0be1a26c.Button_module_outlined__0be1a26c, .Button_module_root__0be1a26c[data-elem=base-cell]:disabled.Button_module_primary__0be1a26c.Button_module_text__0be1a26c, .Button_module_root__0be1a26c[data-elem=base-cell]:disabled.Button_module_success__0be1a26c.Button_module_outlined__0be1a26c, .Button_module_root__0be1a26c[data-elem=base-cell]:disabled.Button_module_success__0be1a26c.Button_module_text__0be1a26c, .Button_module_root__0be1a26c[data-elem=base-cell]:disabled.Button_module_danger__0be1a26c.Button_module_outlined__0be1a26c, .Button_module_root__0be1a26c[data-elem=base-cell]:disabled.Button_module_danger__0be1a26c.Button_module_text__0be1a26c, .Button_module_root__0be1a26c[data-elem=base-cell]:disabled.Button_module_warning__0be1a26c.Button_module_outlined__0be1a26c, .Button_module_root__0be1a26c[data-elem=base-cell]:disabled.Button_module_warning__0be1a26c.Button_module_text__0be1a26c {\n color: var(--grey);\n}";
|
|
1727
1738
|
var modules_b0070f27 = {"root":"Button_module_root__0be1a26c","primary":"Button_module_primary__0be1a26c","contained":"Button_module_contained__0be1a26c","outlined":"Button_module_outlined__0be1a26c","text":"Button_module_text__0be1a26c","success":"Button_module_success__0be1a26c","danger":"Button_module_danger__0be1a26c","warning":"Button_module_warning__0be1a26c"};
|
|
1728
|
-
n(css$
|
|
1739
|
+
n(css$T,{});
|
|
1729
1740
|
|
|
1730
1741
|
var Button = /*#__PURE__*/React.forwardRef(function Button(props, ref) {
|
|
1731
1742
|
var className = props.className,
|
|
@@ -1769,9 +1780,9 @@ Button.defaultProps = _objectSpread2(_objectSpread2({}, BaseButton.defaultProps)
|
|
|
1769
1780
|
radius: 'default'
|
|
1770
1781
|
});
|
|
1771
1782
|
|
|
1772
|
-
var css$
|
|
1783
|
+
var css$S = ".Chip_module_root__0aa07630[data-elem=base-cell] {\n position: relative;\n}\n.Chip_module_root__0aa07630[data-elem=base-cell] [data-elem=component2] [data-elem=title] {\n font-weight: 500;\n font-size: 0.875rem;\n}\n.Chip_module_root__0aa07630[data-elem=base-cell].Chip_module_sm__0aa07630 {\n height: 2rem;\n padding: 0.188rem 0.5rem;\n}\n.Chip_module_root__0aa07630[data-elem=base-cell].Chip_module_md__0aa07630 {\n height: 2.25rem;\n padding: 0.563rem 1rem;\n}\n.Chip_module_root__0aa07630[data-elem=base-cell].Chip_module_status__0aa07630.Chip_module_success__0aa07630 {\n background-color: var(--success-bg);\n color: var(--success);\n}\n.Chip_module_root__0aa07630[data-elem=base-cell].Chip_module_status__0aa07630.Chip_module_info__0aa07630 {\n background-color: var(--info-bg);\n color: var(--info);\n}\n.Chip_module_root__0aa07630[data-elem=base-cell].Chip_module_status__0aa07630.Chip_module_danger__0aa07630 {\n background-color: var(--error-bg);\n color: var(--error);\n}\n.Chip_module_root__0aa07630[data-elem=base-cell].Chip_module_status__0aa07630.Chip_module_warning__0aa07630 {\n background-color: var(--warning-bg);\n color: var(--warning);\n}\n.Chip_module_root__0aa07630[data-elem=base-cell].Chip_module_status__0aa07630.Chip_module_default__0aa07630 {\n background-color: var(--grey5);\n color: var(--grey);\n}\n.Chip_module_root__0aa07630[data-elem=base-cell].Chip_module_status__0aa07630:hover {\n box-shadow: -2px -2px 4px rgba(166, 166, 166, 0.25), 2px 2px 4px rgba(166, 166, 166, 0.24);\n}\n.Chip_module_root__0aa07630[data-elem=base-cell].Chip_module_input__0aa07630 {\n border-width: 1px;\n border-style: solid;\n}\n.Chip_module_root__0aa07630[data-elem=base-cell].Chip_module_input__0aa07630.Chip_module_success__0aa07630 {\n background-color: var(--success-bg);\n color: var(--success);\n border-color: var(--success-outline);\n}\n.Chip_module_root__0aa07630[data-elem=base-cell].Chip_module_input__0aa07630.Chip_module_success__0aa07630:hover {\n background-color: var(--success-outline);\n}\n.Chip_module_root__0aa07630[data-elem=base-cell].Chip_module_input__0aa07630.Chip_module_info__0aa07630 {\n background-color: var(--info-bg);\n color: var(--info);\n border-color: var(--info-outline);\n}\n.Chip_module_root__0aa07630[data-elem=base-cell].Chip_module_input__0aa07630.Chip_module_info__0aa07630:hover {\n background-color: var(--info-outline);\n}\n.Chip_module_root__0aa07630[data-elem=base-cell].Chip_module_input__0aa07630.Chip_module_danger__0aa07630 {\n background-color: var(--error-bg);\n color: var(--error);\n border-color: var(--error-outline);\n}\n.Chip_module_root__0aa07630[data-elem=base-cell].Chip_module_input__0aa07630.Chip_module_danger__0aa07630:hover {\n background-color: var(--error-outline);\n}\n.Chip_module_root__0aa07630[data-elem=base-cell].Chip_module_input__0aa07630.Chip_module_warning__0aa07630 {\n background-color: var(--warning-bg);\n color: var(--warning);\n border-color: var(--warning-outline);\n}\n.Chip_module_root__0aa07630[data-elem=base-cell].Chip_module_input__0aa07630.Chip_module_warning__0aa07630:hover {\n background-color: var(--warning-outline);\n}\n.Chip_module_root__0aa07630[data-elem=base-cell].Chip_module_input__0aa07630.Chip_module_default__0aa07630 {\n background-color: var(--grey8);\n color: var(--grey);\n border-color: var(--grey6);\n}\n.Chip_module_root__0aa07630[data-elem=base-cell].Chip_module_input__0aa07630.Chip_module_default__0aa07630:hover {\n background-color: var(--grey6);\n}\n.Chip_module_root__0aa07630[data-elem=base-cell]:disabled.Chip_module_status__0aa07630, .Chip_module_root__0aa07630[data-elem=base-cell]:disabled.Chip_module_input__0aa07630 {\n filter: grayscale(1);\n border-color: var(--grey4);\n background-color: var(--grey5);\n color: var(--grey2);\n}\n.Chip_module_root__0aa07630[data-elem=base-cell]:disabled.Chip_module_status__0aa07630 [data-elem=component1],\n.Chip_module_root__0aa07630[data-elem=base-cell]:disabled.Chip_module_status__0aa07630 [data-elem=component3], .Chip_module_root__0aa07630[data-elem=base-cell]:disabled.Chip_module_input__0aa07630 [data-elem=component1],\n.Chip_module_root__0aa07630[data-elem=base-cell]:disabled.Chip_module_input__0aa07630 [data-elem=component3] {\n opacity: 0.5;\n}\n.Chip_module_root__0aa07630[data-elem=base-cell]:disabled.Chip_module_status__0aa07630:hover, .Chip_module_root__0aa07630[data-elem=base-cell]:disabled.Chip_module_input__0aa07630:hover {\n box-shadow: none;\n background-color: var(--grey5);\n}";
|
|
1773
1784
|
var modules_31aa5fd7 = {"root":"Chip_module_root__0aa07630","sm":"Chip_module_sm__0aa07630","md":"Chip_module_md__0aa07630","status":"Chip_module_status__0aa07630","success":"Chip_module_success__0aa07630","info":"Chip_module_info__0aa07630","danger":"Chip_module_danger__0aa07630","warning":"Chip_module_warning__0aa07630","default":"Chip_module_default__0aa07630","input":"Chip_module_input__0aa07630"};
|
|
1774
|
-
n(css$
|
|
1785
|
+
n(css$S,{});
|
|
1775
1786
|
|
|
1776
1787
|
var Chip = function Chip(props) {
|
|
1777
1788
|
var className = props.className,
|
|
@@ -2142,9 +2153,9 @@ Server.defaultProps = {
|
|
|
2142
2153
|
className: ''
|
|
2143
2154
|
};
|
|
2144
2155
|
|
|
2145
|
-
var css$
|
|
2156
|
+
var css$R = ".Arrow_module_right__19f08663 {\n transform: rotate(0deg);\n}\n\n.Arrow_module_left__19f08663 {\n transform: rotate(180deg);\n}\n\n.Arrow_module_bottom__19f08663 {\n transform: rotate(90deg);\n}\n\n.Arrow_module_top__19f08663 {\n transform: rotate(270deg);\n}";
|
|
2146
2157
|
var modules_e313d483 = {"right":"Arrow_module_right__19f08663","left":"Arrow_module_left__19f08663","bottom":"Arrow_module_bottom__19f08663","top":"Arrow_module_top__19f08663"};
|
|
2147
|
-
n(css$
|
|
2158
|
+
n(css$R,{});
|
|
2148
2159
|
|
|
2149
2160
|
var Arrow$1 = function Arrow(props) {
|
|
2150
2161
|
var className = props.className,
|
|
@@ -2164,9 +2175,9 @@ Arrow$1.defaultProps = {
|
|
|
2164
2175
|
position: 'right'
|
|
2165
2176
|
};
|
|
2166
2177
|
|
|
2167
|
-
var css$
|
|
2178
|
+
var css$Q = ".Chevron_module_left__8b1808eb {\n transform: rotate(0deg);\n}\n\n.Chevron_module_bottom__8b1808eb {\n transform: rotate(90deg);\n}\n\n.Chevron_module_right__8b1808eb {\n transform: rotate(180deg);\n}\n\n.Chevron_module_top__8b1808eb {\n transform: rotate(270deg);\n}";
|
|
2168
2179
|
var modules_bf5b0b74 = {"left":"Chevron_module_left__8b1808eb","bottom":"Chevron_module_bottom__8b1808eb","right":"Chevron_module_right__8b1808eb","top":"Chevron_module_top__8b1808eb"};
|
|
2169
|
-
n(css$
|
|
2180
|
+
n(css$Q,{});
|
|
2170
2181
|
|
|
2171
2182
|
var Chevron = function Chevron(props) {
|
|
2172
2183
|
var className = props.className,
|
|
@@ -2325,24 +2336,16 @@ MagnifyingGlass.defaultProps = {
|
|
|
2325
2336
|
|
|
2326
2337
|
var Columns$1 = function Columns(props) {
|
|
2327
2338
|
var className = props.className;
|
|
2328
|
-
return /*#__PURE__*/jsxRuntime.
|
|
2339
|
+
return /*#__PURE__*/jsxRuntime.jsx("svg", {
|
|
2329
2340
|
className: className,
|
|
2330
|
-
|
|
2331
|
-
|
|
2341
|
+
width: "14",
|
|
2342
|
+
height: "15",
|
|
2343
|
+
viewBox: "0 0 14 15",
|
|
2344
|
+
fill: "#2A2A2A",
|
|
2332
2345
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2333
|
-
children:
|
|
2334
|
-
d: "
|
|
2335
|
-
|
|
2336
|
-
strokeWidth: "1.91877",
|
|
2337
|
-
strokeLinecap: "round",
|
|
2338
|
-
strokeLinejoin: "round"
|
|
2339
|
-
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
2340
|
-
d: "M20.2955 21.0107V4.98934C20.2955 4.54693 19.9413 4.18828 19.5044 4.18828H15.549C15.1121 4.18828 14.758 4.54693 14.758 4.98934V21.0107C14.758 21.4531 15.1121 21.8117 15.549 21.8117H19.5044C19.9413 21.8117 20.2955 21.4531 20.2955 21.0107Z",
|
|
2341
|
-
stroke: "#333333",
|
|
2342
|
-
strokeWidth: "1.91877",
|
|
2343
|
-
strokeLinecap: "round",
|
|
2344
|
-
strokeLinejoin: "round"
|
|
2345
|
-
})]
|
|
2346
|
+
children: /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
2347
|
+
d: "M12.25 1.17167H1.75002C1.59531 1.17167 1.44694 1.23313 1.33754 1.34252C1.22815 1.45192 1.16669 1.60029 1.16669 1.755V12.255C1.16669 12.4097 1.22815 12.5581 1.33754 12.6675C1.44694 12.7769 1.59531 12.8383 1.75002 12.8383H12.25C12.4047 12.8383 12.5531 12.7769 12.6625 12.6675C12.7719 12.5581 12.8334 12.4097 12.8334 12.255V1.755C12.8334 1.60029 12.7719 1.45192 12.6625 1.34252C12.5531 1.23313 12.4047 1.17167 12.25 1.17167ZM6.41669 11.6717H2.33335V2.33833H6.41669V11.6717ZM11.6667 11.6717H7.58335V2.33833H11.6667V11.6717Z"
|
|
2348
|
+
})
|
|
2346
2349
|
});
|
|
2347
2350
|
};
|
|
2348
2351
|
Columns$1.defaultProps = {
|
|
@@ -2461,9 +2464,55 @@ Reset.defaultProps = {
|
|
|
2461
2464
|
className: ''
|
|
2462
2465
|
};
|
|
2463
2466
|
|
|
2464
|
-
var
|
|
2467
|
+
var Settings = function Settings(props) {
|
|
2468
|
+
var className = props.className;
|
|
2469
|
+
return /*#__PURE__*/jsxRuntime.jsx("svg", {
|
|
2470
|
+
className: className,
|
|
2471
|
+
width: "14",
|
|
2472
|
+
height: "15",
|
|
2473
|
+
viewBox: "0 0 14 15",
|
|
2474
|
+
fill: "#2A2A2A",
|
|
2475
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2476
|
+
children: /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
2477
|
+
d: "M11.6084 7.38999C11.5148 7.28354 11.4633 7.14669 11.4633 7.00499C11.4633 6.8633 11.5148 6.72645 11.6084 6.61999L12.355 5.77999C12.4373 5.68822 12.4884 5.57274 12.501 5.45012C12.5135 5.32751 12.487 5.20406 12.425 5.09749L11.2584 3.07916C11.197 2.97272 11.1037 2.88834 10.9916 2.83806C10.8795 2.78778 10.7545 2.77417 10.6342 2.79916L9.53752 3.02083C9.39798 3.04966 9.25271 3.02642 9.12912 2.95549C9.00554 2.88457 8.91219 2.77086 8.86669 2.63583L8.51085 1.56833C8.47172 1.45247 8.39716 1.35183 8.29772 1.28065C8.19828 1.20947 8.07898 1.17135 7.95669 1.17166H5.62335C5.49615 1.16502 5.37027 1.2002 5.26493 1.27183C5.1596 1.34345 5.08061 1.44759 5.04002 1.56833L4.71335 2.63583C4.66786 2.77086 4.5745 2.88457 4.45092 2.95549C4.32734 3.02642 4.18206 3.04966 4.04252 3.02083L2.91669 2.79916C2.80268 2.78305 2.68645 2.80104 2.58264 2.85087C2.47883 2.90069 2.3921 2.98013 2.33335 3.07916L1.16669 5.09749C1.1032 5.20287 1.07465 5.32563 1.08513 5.44821C1.0956 5.57079 1.14457 5.68692 1.22502 5.77999L1.96585 6.61999C2.05937 6.72645 2.11095 6.8633 2.11095 7.00499C2.11095 7.14669 2.05937 7.28354 1.96585 7.38999L1.22502 8.22999C1.14457 8.32307 1.0956 8.4392 1.08513 8.56178C1.07465 8.68436 1.1032 8.80712 1.16669 8.91249L2.33335 10.9308C2.39466 11.0373 2.48801 11.1216 2.60008 11.1719C2.71216 11.2222 2.83725 11.2358 2.95752 11.2108L4.05419 10.9892C4.19373 10.9603 4.339 10.9836 4.46259 11.0545C4.58617 11.1254 4.67952 11.2391 4.72502 11.3742L5.08085 12.4417C5.12144 12.5624 5.20044 12.6665 5.30577 12.7382C5.4111 12.8098 5.53698 12.845 5.66419 12.8383H7.99752C8.11981 12.8386 8.23911 12.8005 8.33855 12.7293C8.438 12.6582 8.51255 12.5575 8.55169 12.4417L8.90752 11.3742C8.95302 11.2391 9.04637 11.1254 9.16996 11.0545C9.29354 10.9836 9.43881 10.9603 9.57835 10.9892L10.675 11.2108C10.7953 11.2358 10.9204 11.2222 11.0325 11.1719C11.1445 11.1216 11.2379 11.0373 11.2992 10.9308L12.4659 8.91249C12.5278 8.80593 12.5544 8.68248 12.5418 8.55986C12.5292 8.43725 12.4781 8.32177 12.3959 8.22999L11.6084 7.38999ZM10.7392 8.17166L11.2059 8.69666L10.4592 9.99166L9.77085 9.85166C9.35073 9.76578 8.91369 9.83715 8.5427 10.0522C8.17172 10.2673 7.89261 10.6111 7.75835 11.0183L7.53669 11.6717H6.04335L5.83335 11.0067C5.6991 10.5994 5.41999 10.2556 5.04901 10.0405C4.67802 9.82548 4.24098 9.75412 3.82085 9.83999L3.13252 9.97999L2.37419 8.69083L2.84085 8.16583C3.12783 7.84498 3.28648 7.42962 3.28648 6.99916C3.28648 6.5687 3.12783 6.15334 2.84085 5.83249L2.37419 5.30749L3.12085 4.02416L3.80919 4.16416C4.22932 4.25004 4.66635 4.17867 5.03734 3.96361C5.40833 3.74855 5.68744 3.40475 5.82169 2.99749L6.04335 2.33833H7.53669L7.75835 3.00333C7.89261 3.41059 8.17172 3.75438 8.5427 3.96944C8.91369 4.18451 9.35073 4.25587 9.77085 4.16999L10.4592 4.02999L11.2059 5.32499L10.7392 5.84999C10.4554 6.1701 10.2988 6.58306 10.2988 7.01083C10.2988 7.4386 10.4554 7.85155 10.7392 8.17166ZM6.79002 4.67166C6.32853 4.67166 5.87741 4.80851 5.49369 5.0649C5.10998 5.32129 4.81091 5.68571 4.6343 6.11207C4.4577 6.53843 4.41149 7.00758 4.50152 7.46021C4.59155 7.91283 4.81378 8.32859 5.14011 8.65491C5.46643 8.98123 5.88219 9.20346 6.33481 9.29349C6.78743 9.38353 7.25659 9.33732 7.68295 9.16071C8.10931 8.98411 8.47373 8.68504 8.73012 8.30132C8.98651 7.91761 9.12335 7.46648 9.12335 7.00499C9.12335 6.38616 8.87752 5.79266 8.43994 5.35508C8.00235 4.91749 7.40886 4.67166 6.79002 4.67166ZM6.79002 8.17166C6.55928 8.17166 6.33371 8.10324 6.14186 7.97504C5.95 7.84685 5.80046 7.66464 5.71216 7.45146C5.62386 7.23828 5.60076 7.0037 5.64577 6.77739C5.69079 6.55108 5.8019 6.3432 5.96506 6.18004C6.12822 6.01688 6.3361 5.90576 6.56242 5.86074C6.78873 5.81573 7.0233 5.83883 7.23649 5.92713C7.44967 6.01544 7.63187 6.16497 7.76007 6.35683C7.88826 6.54869 7.95669 6.77425 7.95669 7.00499C7.95669 7.31441 7.83377 7.61116 7.61498 7.82995C7.39619 8.04874 7.09944 8.17166 6.79002 8.17166Z"
|
|
2478
|
+
})
|
|
2479
|
+
});
|
|
2480
|
+
};
|
|
2481
|
+
|
|
2482
|
+
var Trash = function Trash(props) {
|
|
2483
|
+
var className = props.className;
|
|
2484
|
+
return /*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
2485
|
+
className: className,
|
|
2486
|
+
width: "14",
|
|
2487
|
+
height: "15",
|
|
2488
|
+
viewBox: "0 0 14 15",
|
|
2489
|
+
fill: "none",
|
|
2490
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2491
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("g", {
|
|
2492
|
+
clipPath: "url(#clip0_3863_19293)",
|
|
2493
|
+
children: /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
2494
|
+
d: "M1.75 3.50499H2.91667M2.91667 3.50499H12.25M2.91667 3.50499V11.6717C2.91667 11.9811 3.03958 12.2778 3.25838 12.4966C3.47717 12.7154 3.77391 12.8383 4.08333 12.8383H9.91667C10.2261 12.8383 10.5228 12.7154 10.7416 12.4966C10.9604 12.2778 11.0833 11.9811 11.0833 11.6717V3.50499H2.91667ZM4.66667 3.50499V2.33833C4.66667 2.02891 4.78958 1.73216 5.00838 1.51337C5.22717 1.29458 5.52391 1.17166 5.83333 1.17166H8.16667C8.47609 1.17166 8.77283 1.29458 8.99162 1.51337C9.21042 1.73216 9.33333 2.02891 9.33333 2.33833V3.50499M5.83333 6.42166V9.92166M8.16667 6.42166V9.92166",
|
|
2495
|
+
stroke: "#FF626A",
|
|
2496
|
+
strokeLinecap: "round",
|
|
2497
|
+
strokeLinejoin: "round"
|
|
2498
|
+
})
|
|
2499
|
+
}), /*#__PURE__*/jsxRuntime.jsx("defs", {
|
|
2500
|
+
children: /*#__PURE__*/jsxRuntime.jsx("clipPath", {
|
|
2501
|
+
id: "clip0_3863_19293",
|
|
2502
|
+
children: /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
2503
|
+
width: "14",
|
|
2504
|
+
height: "14",
|
|
2505
|
+
fill: "white",
|
|
2506
|
+
transform: "translate(0 0.00500488)"
|
|
2507
|
+
})
|
|
2508
|
+
})
|
|
2509
|
+
})]
|
|
2510
|
+
});
|
|
2511
|
+
};
|
|
2512
|
+
|
|
2513
|
+
var css$P = ".Accordion_module_root__a63f6f55 {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n width: 100%;\n}\n.Accordion_module_root__a63f6f55 > .Accordion_module_header__a63f6f55[data-elem=base-cell] {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n gap: 0.5rem;\n padding: 0.5rem 1rem;\n cursor: pointer;\n}\n.Accordion_module_root__a63f6f55 > .Accordion_module_header__a63f6f55[data-elem=base-cell] > [data-elem=component1] {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n}\n.Accordion_module_root__a63f6f55 > .Accordion_module_header__a63f6f55[data-elem=base-cell] > [data-elem=component1] .Accordion_module_icon__a63f6f55 {\n transform: rotate(-90deg);\n width: 1rem;\n height: 1rem;\n}\n.Accordion_module_root__a63f6f55 > .Accordion_module_header__a63f6f55[data-elem=base-cell] .Accordion_module_title__a63f6f55 {\n flex: 1 1 auto;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.Accordion_module_root__a63f6f55 > .Accordion_module_header__a63f6f55[data-elem=base-cell]:hover {\n background: var(--background);\n}\n.Accordion_module_root__a63f6f55 > .Accordion_module_header__a63f6f55[data-elem=base-cell]:hover .Accordion_module_icon__a63f6f55,\n.Accordion_module_root__a63f6f55 > .Accordion_module_header__a63f6f55[data-elem=base-cell]:hover .Accordion_module_title__a63f6f55 {\n color: var(--highlight);\n fill: var(--highlight);\n}\n.Accordion_module_root__a63f6f55 > .Accordion_module_body__a63f6f55 {\n display: none;\n padding: 0.5rem 2.5rem;\n}\n.Accordion_module_root__a63f6f55.Accordion_module_open__a63f6f55 > .Accordion_module_header__a63f6f55[data-elem=base-cell] [data-elem=component1] .Accordion_module_icon__a63f6f55 {\n transform: none;\n}\n.Accordion_module_root__a63f6f55.Accordion_module_open__a63f6f55 > .Accordion_module_body__a63f6f55 {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n}\n.Accordion_module_root__a63f6f55.Accordion_module_open__a63f6f55 > .Accordion_module_body__a63f6f55 > button[data-elem=base-cell] {\n width: -webkit-fit-content;\n width: -moz-fit-content;\n width: fit-content;\n align-self: flex-end;\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-items: center;\n}\n.Accordion_module_root__a63f6f55.Accordion_module_open__a63f6f55 > .Accordion_module_body__a63f6f55 > button[data-elem=base-cell] .Accordion_module_expand__a63f6f55 {\n height: 1.5rem;\n width: 1.5rem;\n}";
|
|
2465
2514
|
var modules_8207625f = {"root":"Accordion_module_root__a63f6f55","header":"Accordion_module_header__a63f6f55","icon":"Accordion_module_icon__a63f6f55","title":"Accordion_module_title__a63f6f55","body":"Accordion_module_body__a63f6f55","open":"Accordion_module_open__a63f6f55","expand":"Accordion_module_expand__a63f6f55"};
|
|
2466
|
-
n(css$
|
|
2515
|
+
n(css$P,{});
|
|
2467
2516
|
|
|
2468
2517
|
var Accordion = function Accordion(props) {
|
|
2469
2518
|
var defaultOpen = props.defaultOpen,
|
|
@@ -2544,9 +2593,9 @@ Accordion.defaultProps = {
|
|
|
2544
2593
|
onExpand: null
|
|
2545
2594
|
};
|
|
2546
2595
|
|
|
2547
|
-
var css$
|
|
2596
|
+
var css$O = ".Alert_module_root__b5fc9a1d {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: flex-start;\n position: fixed;\n padding: 0.938rem;\n width: 500px;\n}\n.Alert_module_root__b5fc9a1d.Alert_module_positionBottomCenter__b5fc9a1d {\n left: 50%;\n bottom: 1rem;\n transform: translate(-50%, 0);\n}\n.Alert_module_root__b5fc9a1d.Alert_module_positionTopRight__b5fc9a1d {\n right: 1rem;\n top: 1rem;\n}\n.Alert_module_root__b5fc9a1d .Alert_module_left__b5fc9a1d {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: flex-start;\n}\n.Alert_module_root__b5fc9a1d .Alert_module_left__b5fc9a1d .Alert_module_icons__b5fc9a1d {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n padding: 0.313rem 0.938rem 0rem 0rem;\n height: auto;\n}\n.Alert_module_root__b5fc9a1d .Alert_module_left__b5fc9a1d .Alert_module_icons__b5fc9a1d .Alert_module_icon__b5fc9a1d {\n width: 1.25rem;\n height: 1.25rem;\n}\n.Alert_module_root__b5fc9a1d .Alert_module_left__b5fc9a1d .Alert_module_content__b5fc9a1d {\n padding: 0.188rem 0.938rem 0rem 0rem;\n}\n.Alert_module_root__b5fc9a1d .Alert_module_left__b5fc9a1d .Alert_module_content__b5fc9a1d .Alert_module_title__b5fc9a1d {\n font-size: 0.875rem;\n font-weight: 600;\n padding-right: 2px;\n}\n.Alert_module_root__b5fc9a1d .Alert_module_left__b5fc9a1d .Alert_module_content__b5fc9a1d .Alert_module_description__b5fc9a1d {\n word-wrap: break-word;\n height: auto;\n font-size: 0.875rem;\n font-weight: 400;\n margin-bottom: 0.5rem;\n}\n.Alert_module_root__b5fc9a1d .Alert_module_actions__b5fc9a1d {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: flex-start;\n gap: 5px;\n}\n.Alert_module_root__b5fc9a1d .Alert_module_actions__b5fc9a1d .Alert_module_button__b5fc9a1d {\n padding: 0.313rem 1rem;\n font-weight: 400;\n}\n.Alert_module_root__b5fc9a1d .Alert_module_actions__b5fc9a1d .Alert_module_close__b5fc9a1d {\n padding-top: 0.313rem;\n}\n.Alert_module_root__b5fc9a1d .Alert_module_actions__b5fc9a1d .Alert_module_close__b5fc9a1d .Alert_module_icon__b5fc9a1d {\n width: 1.25rem;\n height: 1.25rem;\n fill: var(--black);\n}\n.Alert_module_root__b5fc9a1d.Alert_module_borderDefault__b5fc9a1d {\n border-width: 0.063rem;\n}\n.Alert_module_root__b5fc9a1d.Alert_module_borderThickLeft__b5fc9a1d {\n border-width: 0.063rem 0.063rem 0.063rem 0.25rem;\n}\n.Alert_module_root__b5fc9a1d.Alert_module_borderNone__b5fc9a1d {\n border-width: 0rem 0rem 0rem 0.25rem;\n}\n.Alert_module_root__b5fc9a1d.Alert_module_info__b5fc9a1d {\n border-style: solid;\n border-color: var(--info);\n background-color: #edf5ff;\n}\n.Alert_module_root__b5fc9a1d.Alert_module_info__b5fc9a1d .Alert_module_icon__b5fc9a1d {\n fill: var(--info);\n}\n.Alert_module_root__b5fc9a1d.Alert_module_success__b5fc9a1d {\n border-style: solid;\n border-color: var(--success);\n background-color: var(--success-bg);\n}\n.Alert_module_root__b5fc9a1d.Alert_module_success__b5fc9a1d .Alert_module_icon__b5fc9a1d {\n fill: var(--success);\n}\n.Alert_module_root__b5fc9a1d.Alert_module_danger__b5fc9a1d {\n border-style: solid;\n border-color: var(--error);\n background-color: var(--error-bg);\n}\n.Alert_module_root__b5fc9a1d.Alert_module_danger__b5fc9a1d .Alert_module_icon__b5fc9a1d {\n fill: var(--error);\n}\n.Alert_module_root__b5fc9a1d.Alert_module_warning__b5fc9a1d {\n border-style: solid;\n border-color: var(--warning);\n background-color: var(--warning-bg);\n}\n.Alert_module_root__b5fc9a1d.Alert_module_warning__b5fc9a1d .Alert_module_icon__b5fc9a1d {\n fill: var(--warning);\n}\n.Alert_module_root__b5fc9a1d.Alert_module_shadow__b5fc9a1d {\n box-shadow: 0.125rem 0.5rem 1rem rgba(60, 60, 60, 0.12);\n}";
|
|
2548
2597
|
var modules_3a764ea3 = {"root":"Alert_module_root__b5fc9a1d","position-bottom-center":"Alert_module_positionBottomCenter__b5fc9a1d","position-top-right":"Alert_module_positionTopRight__b5fc9a1d","left":"Alert_module_left__b5fc9a1d","icons":"Alert_module_icons__b5fc9a1d","icon":"Alert_module_icon__b5fc9a1d","content":"Alert_module_content__b5fc9a1d","title":"Alert_module_title__b5fc9a1d","description":"Alert_module_description__b5fc9a1d","actions":"Alert_module_actions__b5fc9a1d","button":"Alert_module_button__b5fc9a1d","close":"Alert_module_close__b5fc9a1d","border-default":"Alert_module_borderDefault__b5fc9a1d","border-thick-left":"Alert_module_borderThickLeft__b5fc9a1d","border-none":"Alert_module_borderNone__b5fc9a1d","info":"Alert_module_info__b5fc9a1d","success":"Alert_module_success__b5fc9a1d","danger":"Alert_module_danger__b5fc9a1d","warning":"Alert_module_warning__b5fc9a1d","shadow":"Alert_module_shadow__b5fc9a1d"};
|
|
2549
|
-
n(css$
|
|
2598
|
+
n(css$O,{});
|
|
2550
2599
|
|
|
2551
2600
|
function getSide(placement) {
|
|
2552
2601
|
return placement.split('-')[0];
|
|
@@ -2836,6 +2885,79 @@ function within(min$1, value, max$1) {
|
|
|
2836
2885
|
return max$3(min$1, min$3(value, max$1));
|
|
2837
2886
|
}
|
|
2838
2887
|
|
|
2888
|
+
/**
|
|
2889
|
+
* Positions an inner element of the floating element such that it is centered
|
|
2890
|
+
* to the reference element.
|
|
2891
|
+
* @see https://floating-ui.com/docs/arrow
|
|
2892
|
+
*/
|
|
2893
|
+
const arrow$1 = options => ({
|
|
2894
|
+
name: 'arrow',
|
|
2895
|
+
options,
|
|
2896
|
+
|
|
2897
|
+
async fn(middlewareArguments) {
|
|
2898
|
+
// Since `element` is required, we don't Partial<> the type
|
|
2899
|
+
const {
|
|
2900
|
+
element,
|
|
2901
|
+
padding = 0
|
|
2902
|
+
} = options != null ? options : {};
|
|
2903
|
+
const {
|
|
2904
|
+
x,
|
|
2905
|
+
y,
|
|
2906
|
+
placement,
|
|
2907
|
+
rects,
|
|
2908
|
+
platform
|
|
2909
|
+
} = middlewareArguments;
|
|
2910
|
+
|
|
2911
|
+
if (element == null) {
|
|
2912
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2913
|
+
console.warn('Floating UI: No `element` was passed to the `arrow` middleware.');
|
|
2914
|
+
}
|
|
2915
|
+
|
|
2916
|
+
return {};
|
|
2917
|
+
}
|
|
2918
|
+
|
|
2919
|
+
const paddingObject = getSideObjectFromPadding(padding);
|
|
2920
|
+
const coords = {
|
|
2921
|
+
x,
|
|
2922
|
+
y
|
|
2923
|
+
};
|
|
2924
|
+
const axis = getMainAxisFromPlacement(placement);
|
|
2925
|
+
const alignment = getAlignment(placement);
|
|
2926
|
+
const length = getLengthFromAxis(axis);
|
|
2927
|
+
const arrowDimensions = await platform.getDimensions(element);
|
|
2928
|
+
const minProp = axis === 'y' ? 'top' : 'left';
|
|
2929
|
+
const maxProp = axis === 'y' ? 'bottom' : 'right';
|
|
2930
|
+
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
|
|
2931
|
+
const startDiff = coords[axis] - rects.reference[axis];
|
|
2932
|
+
const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
|
|
2933
|
+
let clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
|
|
2934
|
+
|
|
2935
|
+
if (clientSize === 0) {
|
|
2936
|
+
clientSize = rects.floating[length];
|
|
2937
|
+
}
|
|
2938
|
+
|
|
2939
|
+
const centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the floating element if the center
|
|
2940
|
+
// point is outside the floating element's bounds
|
|
2941
|
+
|
|
2942
|
+
const min = paddingObject[minProp];
|
|
2943
|
+
const max = clientSize - arrowDimensions[length] - paddingObject[maxProp];
|
|
2944
|
+
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
2945
|
+
const offset = within(min, center, max); // Make sure that arrow points at the reference
|
|
2946
|
+
|
|
2947
|
+
const alignmentPadding = alignment === 'start' ? paddingObject[minProp] : paddingObject[maxProp];
|
|
2948
|
+
const shouldAddOffset = alignmentPadding > 0 && center !== offset && rects.reference[length] <= rects.floating[length];
|
|
2949
|
+
const alignmentOffset = shouldAddOffset ? center < min ? min - center : max - center : 0;
|
|
2950
|
+
return {
|
|
2951
|
+
[axis]: coords[axis] - alignmentOffset,
|
|
2952
|
+
data: {
|
|
2953
|
+
[axis]: offset,
|
|
2954
|
+
centerOffset: center - offset
|
|
2955
|
+
}
|
|
2956
|
+
};
|
|
2957
|
+
}
|
|
2958
|
+
|
|
2959
|
+
});
|
|
2960
|
+
|
|
2839
2961
|
const hash$1 = {
|
|
2840
2962
|
left: 'right',
|
|
2841
2963
|
right: 'left',
|
|
@@ -4024,6 +4146,50 @@ function useFloating$1(_temp) {
|
|
|
4024
4146
|
}), [data, update, refs, setReference, setFloating]);
|
|
4025
4147
|
}
|
|
4026
4148
|
|
|
4149
|
+
/**
|
|
4150
|
+
* Positions an inner element of the floating element such that it is centered
|
|
4151
|
+
* to the reference element.
|
|
4152
|
+
* This wraps the core `arrow` middleware to allow React refs as the element.
|
|
4153
|
+
* @see https://floating-ui.com/docs/arrow
|
|
4154
|
+
*/
|
|
4155
|
+
|
|
4156
|
+
const arrow = options => {
|
|
4157
|
+
const {
|
|
4158
|
+
element,
|
|
4159
|
+
padding
|
|
4160
|
+
} = options;
|
|
4161
|
+
|
|
4162
|
+
function isRef(value) {
|
|
4163
|
+
return Object.prototype.hasOwnProperty.call(value, 'current');
|
|
4164
|
+
}
|
|
4165
|
+
|
|
4166
|
+
return {
|
|
4167
|
+
name: 'arrow',
|
|
4168
|
+
options,
|
|
4169
|
+
|
|
4170
|
+
fn(args) {
|
|
4171
|
+
if (isRef(element)) {
|
|
4172
|
+
if (element.current != null) {
|
|
4173
|
+
return arrow$1({
|
|
4174
|
+
element: element.current,
|
|
4175
|
+
padding
|
|
4176
|
+
}).fn(args);
|
|
4177
|
+
}
|
|
4178
|
+
|
|
4179
|
+
return {};
|
|
4180
|
+
} else if (element) {
|
|
4181
|
+
return arrow$1({
|
|
4182
|
+
element,
|
|
4183
|
+
padding
|
|
4184
|
+
}).fn(args);
|
|
4185
|
+
}
|
|
4186
|
+
|
|
4187
|
+
return {};
|
|
4188
|
+
}
|
|
4189
|
+
|
|
4190
|
+
};
|
|
4191
|
+
};
|
|
4192
|
+
|
|
4027
4193
|
var getDefaultParent = function (originalTarget) {
|
|
4028
4194
|
if (typeof document === 'undefined') {
|
|
4029
4195
|
return null;
|
|
@@ -4895,6 +5061,313 @@ function usePrevious(value) {
|
|
|
4895
5061
|
return ref.current;
|
|
4896
5062
|
}
|
|
4897
5063
|
|
|
5064
|
+
function getDelay(value, prop, pointerType) {
|
|
5065
|
+
if (pointerType && pointerType !== 'mouse') {
|
|
5066
|
+
return 0;
|
|
5067
|
+
}
|
|
5068
|
+
|
|
5069
|
+
if (typeof value === 'number') {
|
|
5070
|
+
return value;
|
|
5071
|
+
}
|
|
5072
|
+
|
|
5073
|
+
return value == null ? void 0 : value[prop];
|
|
5074
|
+
}
|
|
5075
|
+
|
|
5076
|
+
/**
|
|
5077
|
+
* Adds hover event listeners that change the open state, like CSS :hover.
|
|
5078
|
+
* @see https://floating-ui.com/docs/useHover
|
|
5079
|
+
*/
|
|
5080
|
+
const useHover = function (context, _temp) {
|
|
5081
|
+
let {
|
|
5082
|
+
enabled = true,
|
|
5083
|
+
delay = 0,
|
|
5084
|
+
handleClose = null,
|
|
5085
|
+
mouseOnly = false,
|
|
5086
|
+
restMs = 0,
|
|
5087
|
+
move = true
|
|
5088
|
+
} = _temp === void 0 ? {} : _temp;
|
|
5089
|
+
const {
|
|
5090
|
+
open,
|
|
5091
|
+
onOpenChange,
|
|
5092
|
+
dataRef,
|
|
5093
|
+
events,
|
|
5094
|
+
refs,
|
|
5095
|
+
_
|
|
5096
|
+
} = context;
|
|
5097
|
+
const tree = useFloatingTree();
|
|
5098
|
+
const parentId = useFloatingParentNodeId();
|
|
5099
|
+
const handleCloseRef = useLatestRef(handleClose);
|
|
5100
|
+
const delayRef = useLatestRef(delay);
|
|
5101
|
+
const previousOpen = usePrevious(open);
|
|
5102
|
+
const pointerTypeRef = React__namespace.useRef();
|
|
5103
|
+
const timeoutRef = React__namespace.useRef();
|
|
5104
|
+
const handlerRef = React__namespace.useRef();
|
|
5105
|
+
const restTimeoutRef = React__namespace.useRef();
|
|
5106
|
+
const blockMouseMoveRef = React__namespace.useRef(true);
|
|
5107
|
+
const performedPointerEventsMutationRef = React__namespace.useRef(false);
|
|
5108
|
+
const isHoverOpen = React__namespace.useCallback(() => {
|
|
5109
|
+
var _dataRef$current$open;
|
|
5110
|
+
|
|
5111
|
+
const type = (_dataRef$current$open = dataRef.current.openEvent) == null ? void 0 : _dataRef$current$open.type;
|
|
5112
|
+
return (type == null ? void 0 : type.includes('mouse')) && type !== 'mousedown';
|
|
5113
|
+
}, [dataRef]);
|
|
5114
|
+
React__namespace.useEffect(() => {
|
|
5115
|
+
if (!enabled) {
|
|
5116
|
+
return;
|
|
5117
|
+
}
|
|
5118
|
+
|
|
5119
|
+
function onDismiss() {
|
|
5120
|
+
clearTimeout(timeoutRef.current);
|
|
5121
|
+
clearTimeout(restTimeoutRef.current);
|
|
5122
|
+
blockMouseMoveRef.current = true;
|
|
5123
|
+
}
|
|
5124
|
+
|
|
5125
|
+
events.on('dismiss', onDismiss);
|
|
5126
|
+
return () => {
|
|
5127
|
+
events.off('dismiss', onDismiss);
|
|
5128
|
+
};
|
|
5129
|
+
}, [enabled, events, refs]);
|
|
5130
|
+
React__namespace.useEffect(() => {
|
|
5131
|
+
if (!enabled || !handleCloseRef.current) {
|
|
5132
|
+
return;
|
|
5133
|
+
}
|
|
5134
|
+
|
|
5135
|
+
function onLeave() {
|
|
5136
|
+
if (isHoverOpen()) {
|
|
5137
|
+
onOpenChange(false);
|
|
5138
|
+
}
|
|
5139
|
+
}
|
|
5140
|
+
|
|
5141
|
+
const html = getDocument(refs.floating.current).documentElement;
|
|
5142
|
+
html.addEventListener('mouseleave', onLeave);
|
|
5143
|
+
return () => {
|
|
5144
|
+
html.removeEventListener('mouseleave', onLeave);
|
|
5145
|
+
};
|
|
5146
|
+
}, [refs, onOpenChange, enabled, handleCloseRef, dataRef, isHoverOpen]);
|
|
5147
|
+
const closeWithDelay = React__namespace.useCallback(function (runElseBranch) {
|
|
5148
|
+
if (runElseBranch === void 0) {
|
|
5149
|
+
runElseBranch = true;
|
|
5150
|
+
}
|
|
5151
|
+
|
|
5152
|
+
const closeDelay = getDelay(delayRef.current, 'close', pointerTypeRef.current);
|
|
5153
|
+
|
|
5154
|
+
if (closeDelay && !handlerRef.current) {
|
|
5155
|
+
clearTimeout(timeoutRef.current);
|
|
5156
|
+
timeoutRef.current = setTimeout(() => onOpenChange(false), closeDelay);
|
|
5157
|
+
} else if (runElseBranch) {
|
|
5158
|
+
clearTimeout(timeoutRef.current);
|
|
5159
|
+
onOpenChange(false);
|
|
5160
|
+
}
|
|
5161
|
+
}, [delayRef, onOpenChange]);
|
|
5162
|
+
const cleanupPointerMoveHandler = React__namespace.useCallback(() => {
|
|
5163
|
+
if (handlerRef.current) {
|
|
5164
|
+
getDocument(refs.floating.current).removeEventListener('pointermove', handlerRef.current);
|
|
5165
|
+
handlerRef.current = undefined;
|
|
5166
|
+
}
|
|
5167
|
+
}, [refs]);
|
|
5168
|
+
const clearPointerEvents = React__namespace.useCallback(() => {
|
|
5169
|
+
getDocument(refs.floating.current).body.style.pointerEvents = '';
|
|
5170
|
+
performedPointerEventsMutationRef.current = false;
|
|
5171
|
+
}, [refs]); // Registering the mouse events on the reference directly to bypass React's
|
|
5172
|
+
// delegation system. If the cursor was on a disabled element and then entered
|
|
5173
|
+
// the reference (no gap), `mouseenter` doesn't fire in the delegation system.
|
|
5174
|
+
|
|
5175
|
+
React__namespace.useEffect(() => {
|
|
5176
|
+
if (!enabled) {
|
|
5177
|
+
return;
|
|
5178
|
+
}
|
|
5179
|
+
|
|
5180
|
+
function isClickLikeOpenEvent() {
|
|
5181
|
+
return dataRef.current.openEvent ? ['click', 'mousedown'].includes(dataRef.current.openEvent.type) : false;
|
|
5182
|
+
}
|
|
5183
|
+
|
|
5184
|
+
function onMouseEnter(event) {
|
|
5185
|
+
clearTimeout(timeoutRef.current);
|
|
5186
|
+
blockMouseMoveRef.current = false;
|
|
5187
|
+
|
|
5188
|
+
if (mouseOnly && pointerTypeRef.current !== 'mouse' || restMs > 0 && getDelay(delayRef.current, 'open') === 0) {
|
|
5189
|
+
return;
|
|
5190
|
+
}
|
|
5191
|
+
|
|
5192
|
+
dataRef.current.openEvent = event;
|
|
5193
|
+
const openDelay = getDelay(delayRef.current, 'open', pointerTypeRef.current);
|
|
5194
|
+
|
|
5195
|
+
if (openDelay) {
|
|
5196
|
+
timeoutRef.current = setTimeout(() => {
|
|
5197
|
+
onOpenChange(true);
|
|
5198
|
+
}, openDelay);
|
|
5199
|
+
} else {
|
|
5200
|
+
onOpenChange(true);
|
|
5201
|
+
}
|
|
5202
|
+
}
|
|
5203
|
+
|
|
5204
|
+
function onMouseLeave(event) {
|
|
5205
|
+
if (isClickLikeOpenEvent()) {
|
|
5206
|
+
return;
|
|
5207
|
+
}
|
|
5208
|
+
|
|
5209
|
+
const doc = getDocument(refs.floating.current);
|
|
5210
|
+
clearTimeout(restTimeoutRef.current);
|
|
5211
|
+
|
|
5212
|
+
if (handleCloseRef.current) {
|
|
5213
|
+
clearTimeout(timeoutRef.current);
|
|
5214
|
+
handlerRef.current && doc.removeEventListener('pointermove', handlerRef.current);
|
|
5215
|
+
handlerRef.current = handleCloseRef.current({ ...context,
|
|
5216
|
+
tree,
|
|
5217
|
+
x: event.clientX,
|
|
5218
|
+
y: event.clientY,
|
|
5219
|
+
|
|
5220
|
+
onClose() {
|
|
5221
|
+
clearPointerEvents();
|
|
5222
|
+
cleanupPointerMoveHandler();
|
|
5223
|
+
closeWithDelay();
|
|
5224
|
+
}
|
|
5225
|
+
|
|
5226
|
+
});
|
|
5227
|
+
doc.addEventListener('pointermove', handlerRef.current);
|
|
5228
|
+
return;
|
|
5229
|
+
}
|
|
5230
|
+
|
|
5231
|
+
closeWithDelay();
|
|
5232
|
+
} // Ensure the floating element closes after scrolling even if the pointer
|
|
5233
|
+
// did not move.
|
|
5234
|
+
// https://github.com/floating-ui/floating-ui/discussions/1692
|
|
5235
|
+
|
|
5236
|
+
|
|
5237
|
+
function onScrollMouseLeave(event) {
|
|
5238
|
+
if (isClickLikeOpenEvent()) {
|
|
5239
|
+
return;
|
|
5240
|
+
}
|
|
5241
|
+
|
|
5242
|
+
handleCloseRef.current == null ? void 0 : handleCloseRef.current({ ...context,
|
|
5243
|
+
tree,
|
|
5244
|
+
x: event.clientX,
|
|
5245
|
+
y: event.clientY,
|
|
5246
|
+
leave: true,
|
|
5247
|
+
|
|
5248
|
+
onClose() {
|
|
5249
|
+
clearPointerEvents();
|
|
5250
|
+
cleanupPointerMoveHandler();
|
|
5251
|
+
closeWithDelay();
|
|
5252
|
+
}
|
|
5253
|
+
|
|
5254
|
+
})(event);
|
|
5255
|
+
}
|
|
5256
|
+
|
|
5257
|
+
const floating = refs.floating.current;
|
|
5258
|
+
const reference = refs.domReference.current;
|
|
5259
|
+
|
|
5260
|
+
if (isElement(reference)) {
|
|
5261
|
+
open && reference.addEventListener('mouseleave', onScrollMouseLeave);
|
|
5262
|
+
floating == null ? void 0 : floating.addEventListener('mouseleave', onScrollMouseLeave);
|
|
5263
|
+
move && reference.addEventListener('mousemove', onMouseEnter, {
|
|
5264
|
+
once: true
|
|
5265
|
+
});
|
|
5266
|
+
reference.addEventListener('mouseenter', onMouseEnter);
|
|
5267
|
+
reference.addEventListener('mouseleave', onMouseLeave);
|
|
5268
|
+
return () => {
|
|
5269
|
+
open && reference.removeEventListener('mouseleave', onScrollMouseLeave);
|
|
5270
|
+
floating == null ? void 0 : floating.removeEventListener('mouseleave', onScrollMouseLeave);
|
|
5271
|
+
move && reference.removeEventListener('mousemove', onMouseEnter);
|
|
5272
|
+
reference.removeEventListener('mouseenter', onMouseEnter);
|
|
5273
|
+
reference.removeEventListener('mouseleave', onMouseLeave);
|
|
5274
|
+
};
|
|
5275
|
+
}
|
|
5276
|
+
}, [// Ensure the effect is re-run when the reference changes.
|
|
5277
|
+
// https://github.com/floating-ui/floating-ui/issues/1833
|
|
5278
|
+
_.domReference, enabled, context, mouseOnly, restMs, move, closeWithDelay, cleanupPointerMoveHandler, clearPointerEvents, onOpenChange, open, tree, refs, delayRef, handleCloseRef, dataRef]); // Block pointer-events of every element other than the reference and floating
|
|
5279
|
+
// while the floating element is open and has a `handleClose` handler. Also
|
|
5280
|
+
// handles nested floating elements.
|
|
5281
|
+
// https://github.com/floating-ui/floating-ui/issues/1722
|
|
5282
|
+
|
|
5283
|
+
index(() => {
|
|
5284
|
+
if (!enabled) {
|
|
5285
|
+
return;
|
|
5286
|
+
}
|
|
5287
|
+
|
|
5288
|
+
if (open && handleCloseRef.current && handleCloseRef.current.__options.blockPointerEvents && isHoverOpen()) {
|
|
5289
|
+
getDocument(refs.floating.current).body.style.pointerEvents = 'none';
|
|
5290
|
+
performedPointerEventsMutationRef.current = true;
|
|
5291
|
+
const reference = refs.domReference.current;
|
|
5292
|
+
const floating = refs.floating.current;
|
|
5293
|
+
|
|
5294
|
+
if (isElement(reference) && floating) {
|
|
5295
|
+
var _tree$nodesRef$curren, _tree$nodesRef$curren2;
|
|
5296
|
+
|
|
5297
|
+
const parentFloating = tree == null ? void 0 : (_tree$nodesRef$curren = tree.nodesRef.current.find(node => node.id === parentId)) == null ? void 0 : (_tree$nodesRef$curren2 = _tree$nodesRef$curren.context) == null ? void 0 : _tree$nodesRef$curren2.refs.floating.current;
|
|
5298
|
+
|
|
5299
|
+
if (parentFloating) {
|
|
5300
|
+
parentFloating.style.pointerEvents = '';
|
|
5301
|
+
}
|
|
5302
|
+
|
|
5303
|
+
reference.style.pointerEvents = 'auto';
|
|
5304
|
+
floating.style.pointerEvents = 'auto';
|
|
5305
|
+
return () => {
|
|
5306
|
+
reference.style.pointerEvents = '';
|
|
5307
|
+
floating.style.pointerEvents = '';
|
|
5308
|
+
};
|
|
5309
|
+
}
|
|
5310
|
+
}
|
|
5311
|
+
}, [enabled, open, parentId, refs, tree, handleCloseRef, dataRef, isHoverOpen]);
|
|
5312
|
+
index(() => {
|
|
5313
|
+
if (previousOpen && !open) {
|
|
5314
|
+
pointerTypeRef.current = undefined;
|
|
5315
|
+
cleanupPointerMoveHandler();
|
|
5316
|
+
clearPointerEvents();
|
|
5317
|
+
}
|
|
5318
|
+
});
|
|
5319
|
+
React__namespace.useEffect(() => {
|
|
5320
|
+
return () => {
|
|
5321
|
+
cleanupPointerMoveHandler();
|
|
5322
|
+
clearTimeout(timeoutRef.current);
|
|
5323
|
+
clearTimeout(restTimeoutRef.current);
|
|
5324
|
+
|
|
5325
|
+
if (performedPointerEventsMutationRef.current) {
|
|
5326
|
+
clearPointerEvents();
|
|
5327
|
+
}
|
|
5328
|
+
};
|
|
5329
|
+
}, [enabled, cleanupPointerMoveHandler, clearPointerEvents]);
|
|
5330
|
+
|
|
5331
|
+
if (!enabled) {
|
|
5332
|
+
return {};
|
|
5333
|
+
}
|
|
5334
|
+
|
|
5335
|
+
function setPointerRef(event) {
|
|
5336
|
+
pointerTypeRef.current = event.pointerType;
|
|
5337
|
+
}
|
|
5338
|
+
|
|
5339
|
+
return {
|
|
5340
|
+
reference: {
|
|
5341
|
+
onPointerDown: setPointerRef,
|
|
5342
|
+
onPointerEnter: setPointerRef,
|
|
5343
|
+
|
|
5344
|
+
onMouseMove() {
|
|
5345
|
+
if (open || restMs === 0) {
|
|
5346
|
+
return;
|
|
5347
|
+
}
|
|
5348
|
+
|
|
5349
|
+
clearTimeout(restTimeoutRef.current);
|
|
5350
|
+
restTimeoutRef.current = setTimeout(() => {
|
|
5351
|
+
if (!blockMouseMoveRef.current) {
|
|
5352
|
+
onOpenChange(true);
|
|
5353
|
+
}
|
|
5354
|
+
}, restMs);
|
|
5355
|
+
}
|
|
5356
|
+
|
|
5357
|
+
},
|
|
5358
|
+
floating: {
|
|
5359
|
+
onMouseEnter() {
|
|
5360
|
+
clearTimeout(timeoutRef.current);
|
|
5361
|
+
},
|
|
5362
|
+
|
|
5363
|
+
onMouseLeave() {
|
|
5364
|
+
closeWithDelay(false);
|
|
5365
|
+
}
|
|
5366
|
+
|
|
5367
|
+
}
|
|
5368
|
+
};
|
|
5369
|
+
};
|
|
5370
|
+
|
|
4898
5371
|
/**
|
|
4899
5372
|
* Adds relevant screen reader props for a given element `role`.
|
|
4900
5373
|
* @see https://floating-ui.com/docs/useRole
|
|
@@ -5259,6 +5732,123 @@ const useDismiss = function (_ref, _temp) {
|
|
|
5259
5732
|
};
|
|
5260
5733
|
};
|
|
5261
5734
|
|
|
5735
|
+
/**
|
|
5736
|
+
* Adds focus event listeners that change the open state, like CSS :focus.
|
|
5737
|
+
* @see https://floating-ui.com/docs/useFocus
|
|
5738
|
+
*/
|
|
5739
|
+
const useFocus = function (_ref, _temp) {
|
|
5740
|
+
let {
|
|
5741
|
+
open,
|
|
5742
|
+
onOpenChange,
|
|
5743
|
+
dataRef,
|
|
5744
|
+
refs,
|
|
5745
|
+
events
|
|
5746
|
+
} = _ref;
|
|
5747
|
+
let {
|
|
5748
|
+
enabled = true,
|
|
5749
|
+
keyboardOnly = true
|
|
5750
|
+
} = _temp === void 0 ? {} : _temp;
|
|
5751
|
+
const pointerTypeRef = React__namespace.useRef('');
|
|
5752
|
+
const blockFocusRef = React__namespace.useRef(false);
|
|
5753
|
+
const timeoutRef = React__namespace.useRef();
|
|
5754
|
+
React__namespace.useEffect(() => {
|
|
5755
|
+
var _doc$defaultView;
|
|
5756
|
+
|
|
5757
|
+
if (!enabled) {
|
|
5758
|
+
return;
|
|
5759
|
+
}
|
|
5760
|
+
|
|
5761
|
+
const doc = getDocument(refs.floating.current);
|
|
5762
|
+
const win = (_doc$defaultView = doc.defaultView) != null ? _doc$defaultView : window;
|
|
5763
|
+
|
|
5764
|
+
function onBlur() {
|
|
5765
|
+
if (!open && isHTMLElement(refs.domReference.current)) {
|
|
5766
|
+
refs.domReference.current.blur();
|
|
5767
|
+
}
|
|
5768
|
+
}
|
|
5769
|
+
|
|
5770
|
+
win.addEventListener('blur', onBlur);
|
|
5771
|
+
return () => {
|
|
5772
|
+
win.removeEventListener('blur', onBlur);
|
|
5773
|
+
};
|
|
5774
|
+
}, [refs, open, enabled]);
|
|
5775
|
+
React__namespace.useEffect(() => {
|
|
5776
|
+
if (!enabled) {
|
|
5777
|
+
return;
|
|
5778
|
+
}
|
|
5779
|
+
|
|
5780
|
+
function onDismiss() {
|
|
5781
|
+
blockFocusRef.current = true;
|
|
5782
|
+
}
|
|
5783
|
+
|
|
5784
|
+
events.on('dismiss', onDismiss);
|
|
5785
|
+
return () => {
|
|
5786
|
+
events.off('dismiss', onDismiss);
|
|
5787
|
+
};
|
|
5788
|
+
}, [events, enabled]);
|
|
5789
|
+
React__namespace.useEffect(() => {
|
|
5790
|
+
return () => {
|
|
5791
|
+
clearTimeout(timeoutRef.current);
|
|
5792
|
+
};
|
|
5793
|
+
}, []);
|
|
5794
|
+
|
|
5795
|
+
if (!enabled) {
|
|
5796
|
+
return {};
|
|
5797
|
+
}
|
|
5798
|
+
|
|
5799
|
+
return {
|
|
5800
|
+
reference: {
|
|
5801
|
+
onPointerDown(_ref2) {
|
|
5802
|
+
let {
|
|
5803
|
+
pointerType
|
|
5804
|
+
} = _ref2;
|
|
5805
|
+
pointerTypeRef.current = pointerType;
|
|
5806
|
+
blockFocusRef.current = !!(pointerType && keyboardOnly);
|
|
5807
|
+
},
|
|
5808
|
+
|
|
5809
|
+
onPointerLeave() {
|
|
5810
|
+
blockFocusRef.current = false;
|
|
5811
|
+
},
|
|
5812
|
+
|
|
5813
|
+
onFocus(event) {
|
|
5814
|
+
var _dataRef$current$open, _refs$domReference$cu, _dataRef$current$open2;
|
|
5815
|
+
|
|
5816
|
+
if (blockFocusRef.current) {
|
|
5817
|
+
return;
|
|
5818
|
+
} // Dismiss with click should ignore the subsequent `focus` trigger, but
|
|
5819
|
+
// only if the click originated inside the reference element.
|
|
5820
|
+
|
|
5821
|
+
|
|
5822
|
+
if (event.type === 'focus' && ((_dataRef$current$open = dataRef.current.openEvent) == null ? void 0 : _dataRef$current$open.type) === 'mousedown' && (_refs$domReference$cu = refs.domReference.current) != null && _refs$domReference$cu.contains((_dataRef$current$open2 = dataRef.current.openEvent) == null ? void 0 : _dataRef$current$open2.target)) {
|
|
5823
|
+
return;
|
|
5824
|
+
}
|
|
5825
|
+
|
|
5826
|
+
dataRef.current.openEvent = event.nativeEvent;
|
|
5827
|
+
onOpenChange(true);
|
|
5828
|
+
},
|
|
5829
|
+
|
|
5830
|
+
onBlur(event) {
|
|
5831
|
+
const target = event.relatedTarget; // Wait for the window blur listener to fire.
|
|
5832
|
+
|
|
5833
|
+
timeoutRef.current = setTimeout(() => {
|
|
5834
|
+
var _refs$floating$curren, _refs$domReference$cu2;
|
|
5835
|
+
|
|
5836
|
+
// When focusing the reference element (e.g. regular click), then
|
|
5837
|
+
// clicking into the floating element, prevent it from hiding.
|
|
5838
|
+
// Note: it must be focusable, e.g. `tabindex="-1"`.
|
|
5839
|
+
if ((_refs$floating$curren = refs.floating.current) != null && _refs$floating$curren.contains(target) || (_refs$domReference$cu2 = refs.domReference.current) != null && _refs$domReference$cu2.contains(target)) {
|
|
5840
|
+
return;
|
|
5841
|
+
}
|
|
5842
|
+
|
|
5843
|
+
blockFocusRef.current = false;
|
|
5844
|
+
onOpenChange(false);
|
|
5845
|
+
});
|
|
5846
|
+
}
|
|
5847
|
+
|
|
5848
|
+
}
|
|
5849
|
+
};
|
|
5850
|
+
};
|
|
5851
|
+
|
|
5262
5852
|
const ARROW_UP = 'ArrowUp';
|
|
5263
5853
|
const ARROW_DOWN = 'ArrowDown';
|
|
5264
5854
|
const ARROW_LEFT = 'ArrowLeft';
|
|
@@ -5843,9 +6433,9 @@ const useListNavigation = function (_ref, _temp2) {
|
|
|
5843
6433
|
};
|
|
5844
6434
|
};
|
|
5845
6435
|
|
|
5846
|
-
var css$
|
|
6436
|
+
var css$N = ".Popper_module_backdrop__0c794282 {\n position: fixed;\n z-index: 100;\n inset: 0;\n background: rgba(0, 0, 0, 0.4);\n}\n.Popper_module_backdrop__0c794282.Popper_module_transparent__0c794282 {\n background: none;\n}\n.Popper_module_backdrop__0c794282.Popper_module_hideBackdrop__0c794282 {\n position: static !important;\n}";
|
|
5847
6437
|
var modules_fe46b225 = {"backdrop":"Popper_module_backdrop__0c794282","transparent":"Popper_module_transparent__0c794282","hide-backdrop":"Popper_module_hideBackdrop__0c794282"};
|
|
5848
|
-
n(css$
|
|
6438
|
+
n(css$N,{});
|
|
5849
6439
|
|
|
5850
6440
|
var Popper = function Popper(props) {
|
|
5851
6441
|
var open = props.open,
|
|
@@ -11707,9 +12297,9 @@ process.env.NODE_ENV !== "production" ? Link.propTypes
|
|
|
11707
12297
|
} : void 0;
|
|
11708
12298
|
var Link$1 = Link;
|
|
11709
12299
|
|
|
11710
|
-
var css$
|
|
12300
|
+
var css$M = ".Breadcrumbs_module_container__7d7f9279 {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n width: auto;\n}\n.Breadcrumbs_module_container__7d7f9279 .Breadcrumbs_module_seperator__7d7f9279 {\n width: 1.5rem;\n height: 1.5rem;\n stroke: var(--grey2);\n}\n.Breadcrumbs_module_container__7d7f9279 .Breadcrumbs_module_breadcrumbItem__7d7f9279 {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n font-weight: 600;\n font-size: 0.875rem;\n color: var(--grey2);\n}\n.Breadcrumbs_module_container__7d7f9279 .Breadcrumbs_module_breadcrumbItem__7d7f9279.Breadcrumbs_module_active__7d7f9279 {\n color: var(--black);\n}";
|
|
11711
12301
|
var modules_651f50a9 = {"container":"Breadcrumbs_module_container__7d7f9279","seperator":"Breadcrumbs_module_seperator__7d7f9279","breadcrumb-item":"Breadcrumbs_module_breadcrumbItem__7d7f9279","active":"Breadcrumbs_module_active__7d7f9279"};
|
|
11712
|
-
n(css$
|
|
12302
|
+
n(css$M,{});
|
|
11713
12303
|
|
|
11714
12304
|
var BreadCrumbs = function BreadCrumbs(props) {
|
|
11715
12305
|
var crumbs = props.crumbs,
|
|
@@ -13950,7 +14540,7 @@ var languageLoaders = {
|
|
|
13950
14540
|
return Promise.resolve().then(function () { return cssExtras; });
|
|
13951
14541
|
}),
|
|
13952
14542
|
css: createLanguageAsyncLoader("css", function () {
|
|
13953
|
-
return Promise.resolve().then(function () { return css$
|
|
14543
|
+
return Promise.resolve().then(function () { return css$L; });
|
|
13954
14544
|
}),
|
|
13955
14545
|
d: createLanguageAsyncLoader("d", function () {
|
|
13956
14546
|
return Promise.resolve().then(function () { return d; });
|
|
@@ -21233,10 +21823,10 @@ var markup$2 = /*#__PURE__*/_mergeNamespaces({
|
|
|
21233
21823
|
default: markup_1
|
|
21234
21824
|
}, [markup_1]);
|
|
21235
21825
|
|
|
21236
|
-
var css_1 = css$
|
|
21237
|
-
css$
|
|
21238
|
-
css$
|
|
21239
|
-
function css$
|
|
21826
|
+
var css_1 = css$K;
|
|
21827
|
+
css$K.displayName = 'css';
|
|
21828
|
+
css$K.aliases = [];
|
|
21829
|
+
function css$K(Prism) {
|
|
21240
21830
|
(function(Prism) {
|
|
21241
21831
|
var string = /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;
|
|
21242
21832
|
Prism.languages.css = {
|
|
@@ -21296,7 +21886,7 @@ function css$J(Prism) {
|
|
|
21296
21886
|
})(Prism);
|
|
21297
21887
|
}
|
|
21298
21888
|
|
|
21299
|
-
var css$
|
|
21889
|
+
var css$L = /*#__PURE__*/_mergeNamespaces({
|
|
21300
21890
|
__proto__: null,
|
|
21301
21891
|
default: css_1
|
|
21302
21892
|
}, [css_1]);
|
|
@@ -21462,7 +22052,7 @@ var h = hastscript.exports;
|
|
|
21462
22052
|
var decode$1 = parseEntities_1;
|
|
21463
22053
|
var Prism = prismCore.exports;
|
|
21464
22054
|
var markup = markup_1;
|
|
21465
|
-
var css$
|
|
22055
|
+
var css$J = css_1;
|
|
21466
22056
|
var clike = clike_1;
|
|
21467
22057
|
var js = javascript_1;
|
|
21468
22058
|
|
|
@@ -21490,7 +22080,7 @@ refract.listLanguages = listLanguages;
|
|
|
21490
22080
|
|
|
21491
22081
|
// Register bundled grammars.
|
|
21492
22082
|
register$1(markup);
|
|
21493
|
-
register$1(css$
|
|
22083
|
+
register$1(css$J);
|
|
21494
22084
|
register$1(clike);
|
|
21495
22085
|
register$1(js);
|
|
21496
22086
|
|
|
@@ -32532,9 +33122,9 @@ var dracula = {
|
|
|
32532
33122
|
numberColor: "#bd93f9"
|
|
32533
33123
|
};
|
|
32534
33124
|
|
|
32535
|
-
var css$
|
|
33125
|
+
var css$I = ".CodeSnippet_module_root__cea57b34 {\n padding: 0.5rem, 1rem;\n position: relative;\n}\n.CodeSnippet_module_root__cea57b34 .CodeSnippet_module_copy__cea57b34 {\n position: absolute;\n right: 1rem;\n top: 0.5rem;\n cursor: pointer;\n}\n.CodeSnippet_module_root__cea57b34 .CodeSnippet_module_copy__cea57b34 .CodeSnippet_module_icon__cea57b34 {\n width: 1.5rem;\n height: 1.5rem;\n}\n.CodeSnippet_module_root__cea57b34 .CodeSnippet_module_copy__cea57b34 .CodeSnippet_module_icon__cea57b34.CodeSnippet_module_dark__cea57b34 {\n fill: var(--white);\n}\n.CodeSnippet_module_root__cea57b34 .CodeSnippet_module_copy__cea57b34 .CodeSnippet_module_icon__cea57b34.CodeSnippet_module_light__cea57b34 {\n fill: var(--black);\n}\n.CodeSnippet_module_root__cea57b34 .CodeSnippet_module_copy__cea57b34 .CodeSnippet_module_notCopied__cea57b34 {\n display: none;\n}\n.CodeSnippet_module_root__cea57b34 .CodeSnippet_module_copy__cea57b34 .CodeSnippet_module_copied__cea57b34 {\n position: absolute;\n right: 1.375rem;\n top: 2.188rem;\n padding: 0.5rem;\n border-radius: 0.25rem;\n background-color: var(--highlight);\n color: var(--grey10);\n}";
|
|
32536
33126
|
var modules_c548043f = {"root":"CodeSnippet_module_root__cea57b34","copy":"CodeSnippet_module_copy__cea57b34","icon":"CodeSnippet_module_icon__cea57b34","dark":"CodeSnippet_module_dark__cea57b34","light":"CodeSnippet_module_light__cea57b34","notCopied":"CodeSnippet_module_notCopied__cea57b34","copied":"CodeSnippet_module_copied__cea57b34"};
|
|
32537
|
-
n(css$
|
|
33127
|
+
n(css$I,{});
|
|
32538
33128
|
|
|
32539
33129
|
var CodeSnippet = function CodeSnippet(props) {
|
|
32540
33130
|
var copy = props.copy,
|
|
@@ -33418,9 +34008,9 @@ function sub$1(date, duration) {
|
|
|
33418
34008
|
return finalDate;
|
|
33419
34009
|
}
|
|
33420
34010
|
|
|
33421
|
-
var css$
|
|
34011
|
+
var css$H = ".Header_module_container__26bf5a9c {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding: 0rem 1.5625rem;\n}\n.Header_module_container__26bf5a9c .Header_module_title__26bf5a9c {\n font-weight: 400;\n font-size: 0.8rem;\n color: var(--black);\n}\n.Header_module_container__26bf5a9c .Header_module_icon__26bf5a9c {\n width: 1.5rem;\n height: 1.5rem;\n stroke: #181818;\n cursor: pointer;\n}";
|
|
33422
34012
|
var modules_cf337dc1 = {"container":"Header_module_container__26bf5a9c","title":"Header_module_title__26bf5a9c","icon":"Header_module_icon__26bf5a9c"};
|
|
33423
|
-
n(css$
|
|
34013
|
+
n(css$H,{});
|
|
33424
34014
|
|
|
33425
34015
|
var Header = function Header(props) {
|
|
33426
34016
|
var selectedMonth = props.selectedMonth,
|
|
@@ -33452,17 +34042,17 @@ var Header = function Header(props) {
|
|
|
33452
34042
|
});
|
|
33453
34043
|
};
|
|
33454
34044
|
|
|
33455
|
-
var css$
|
|
34045
|
+
var css$G = ".Calender_module_root__5221cce4 {\n padding: 1rem 0rem;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}";
|
|
33456
34046
|
var modules_3722b5cd = {"root":"Calender_module_root__5221cce4"};
|
|
33457
|
-
n(css$
|
|
34047
|
+
n(css$G,{});
|
|
33458
34048
|
|
|
33459
|
-
var css$
|
|
34049
|
+
var css$F = ".Body_module_root__85b1b679 {\n padding: 0.5rem 0.5rem;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: stretch;\n}";
|
|
33460
34050
|
var modules_e6b80d99 = {"root":"Body_module_root__85b1b679"};
|
|
33461
|
-
n(css$
|
|
34051
|
+
n(css$F,{});
|
|
33462
34052
|
|
|
33463
|
-
var css$
|
|
34053
|
+
var css$E = ".Dates_module_dates__e3e1fc43 {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n align-items: center;\n flex-wrap: wrap;\n}\n.Dates_module_dates__e3e1fc43 div {\n flex-basis: 14.28%;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n margin-bottom: 0.25rem;\n cursor: pointer;\n align-self: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.Dates_module_dates__e3e1fc43 div .Dates_module_date__e3e1fc43 {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n text-align: center;\n vertical-align: middle;\n border-radius: 1.5rem;\n height: 2.5rem;\n width: 2.5rem;\n font-weight: 400;\n font-size: 0.875rem;\n color: var(--black);\n}\n.Dates_module_dates__e3e1fc43 div .Dates_module_selected__e3e1fc43 {\n background-color: var(--highlight);\n color: var(--white);\n}\n.Dates_module_dates__e3e1fc43 div .Dates_module_unSelected__e3e1fc43 {\n background-color: var(--white);\n border-color: var(--highlight);\n border-width: 0.125rem;\n border-style: solid;\n color: var(--black);\n}\n.Dates_module_dates__e3e1fc43 div .Dates_module_disabled__e3e1fc43 {\n border-radius: 1.5rem;\n color: var(--grey2);\n}\n.Dates_module_dates__e3e1fc43 div .Dates_module_diffMonth__e3e1fc43 {\n opacity: 0.6;\n}\n.Dates_module_dates__e3e1fc43 div:hover .Dates_module_date__e3e1fc43 {\n background: var(--background);\n color: var(--highlight);\n box-shadow: -2px -2px 4px rgba(166, 166, 166, 0.25), 2px 2px 4px rgba(166, 166, 166, 0.24);\n}\n.Dates_module_dates__e3e1fc43 div:hover .Dates_module_selected__e3e1fc43 {\n background-color: var(--highlight);\n color: var(--white);\n}\n.Dates_module_dates__e3e1fc43 div:hover .Dates_module_disabled__e3e1fc43 {\n background: transparent;\n box-shadow: none;\n border-radius: 1.5rem;\n color: var(--grey2);\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_minInRange__e3e1fc43 {\n background-color: var(--highlight);\n border-radius: 1.5rem 0rem 0rem 1.5rem;\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_minInRange__e3e1fc43 .Dates_module_date__e3e1fc43 {\n color: var(--white);\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_minInRange__e3e1fc43:hover .Dates_module_date__e3e1fc43 {\n background: var(--highlight);\n color: var(--white);\n box-shadow: -2px -2px 4px rgba(166, 166, 166, 0.25), 2px 2px 4px rgba(166, 166, 166, 0.24);\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_maxInRange__e3e1fc43 {\n background-color: var(--highlight);\n border-radius: 0rem 1.5rem 1.5rem 0rem;\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_maxInRange__e3e1fc43 .Dates_module_date__e3e1fc43 {\n color: var(--white);\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_maxInRange__e3e1fc43:hover .Dates_module_date__e3e1fc43 {\n background: var(--highlight);\n color: var(--white);\n box-shadow: -2px -2px 4px rgba(166, 166, 166, 0.25), 2px 2px 4px rgba(166, 166, 166, 0.24);\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_midInRange__e3e1fc43 {\n background: var(--background);\n border-radius: 0rem;\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_midInRange__e3e1fc43 .Dates_module_date__e3e1fc43 {\n color: var(--highlight);\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_firstHovered__e3e1fc43 {\n background: var(--background);\n border-radius: 0rem 1.5rem 1.5rem 0rem;\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_firstHovered__e3e1fc43 .Dates_module_date__e3e1fc43 {\n color: var(--highlight);\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_lastHovered__e3e1fc43 {\n background: var(--background);\n border-radius: 1.5rem 0rem 0rem 1.5rem;\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_lastHovered__e3e1fc43 .Dates_module_date__e3e1fc43 {\n color: var(--highlight);\n}";
|
|
33464
34054
|
var modules_b02dadcc = {"dates":"Dates_module_dates__e3e1fc43","date":"Dates_module_date__e3e1fc43","selected":"Dates_module_selected__e3e1fc43","unSelected":"Dates_module_unSelected__e3e1fc43","disabled":"Dates_module_disabled__e3e1fc43","diffMonth":"Dates_module_diffMonth__e3e1fc43","minInRange":"Dates_module_minInRange__e3e1fc43","maxInRange":"Dates_module_maxInRange__e3e1fc43","midInRange":"Dates_module_midInRange__e3e1fc43","first-hovered":"Dates_module_firstHovered__e3e1fc43","last-hovered":"Dates_module_lastHovered__e3e1fc43"};
|
|
33465
|
-
n(css$
|
|
34055
|
+
n(css$E,{});
|
|
33466
34056
|
|
|
33467
34057
|
var getDatesOfLastWeekOfLastMonth = function getDatesOfLastWeekOfLastMonth(_ref) {
|
|
33468
34058
|
var monthAsNumber = _ref.monthAsNumber,
|
|
@@ -33711,9 +34301,9 @@ var Dates = function Dates(props) {
|
|
|
33711
34301
|
});
|
|
33712
34302
|
};
|
|
33713
34303
|
|
|
33714
|
-
var css$
|
|
34304
|
+
var css$D = ".Days_module_days__0d7923fd {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n text-align: center;\n}\n.Days_module_days__0d7923fd span {\n padding: 0.75rem 0.5rem;\n font-weight: 500;\n font-size: 0.875rem;\n color: black;\n flex-basis: 14.28%;\n}";
|
|
33715
34305
|
var modules_82c45006 = {"days":"Days_module_days__0d7923fd"};
|
|
33716
|
-
n(css$
|
|
34306
|
+
n(css$D,{});
|
|
33717
34307
|
|
|
33718
34308
|
var Days = function Days() {
|
|
33719
34309
|
var daysInWeek = DAYS;
|
|
@@ -33734,341 +34324,335 @@ var Body = function Body(props) {
|
|
|
33734
34324
|
});
|
|
33735
34325
|
};
|
|
33736
34326
|
|
|
33737
|
-
var css$
|
|
33738
|
-
var
|
|
33739
|
-
n(css$
|
|
34327
|
+
var css$C = ".TextField_module_root__9cc1db47 {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n gap: 0.5rem;\n}\n.TextField_module_root__9cc1db47 label {\n width: 100%;\n max-width: 100%;\n font-weight: 400;\n font-size: 0.75rem;\n line-height: 1.125rem;\n letter-spacing: 0.32px;\n color: var(--grey);\n height: 100%;\n}\n.TextField_module_root__9cc1db47 label .TextField_module_inputWrapper__9cc1db47 {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n gap: 0.5rem;\n padding: 0rem 0.5rem;\n max-width: 100%;\n width: 100%;\n border-color: var(--grey4);\n border-style: solid;\n border-radius: 0.25rem;\n height: 100%;\n}\n.TextField_module_root__9cc1db47 label .TextField_module_inputWrapper__9cc1db47 .TextField_module_icon__9cc1db47 {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n}\n.TextField_module_root__9cc1db47 label .TextField_module_inputWrapper__9cc1db47 > [data-elem*=component] {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n}\n.TextField_module_root__9cc1db47 label .TextField_module_inputWrapper__9cc1db47 > [data-elem=component2] {\n flex: 1;\n}\n.TextField_module_root__9cc1db47 label .TextField_module_inputWrapper__9cc1db47 > [data-elem=component2] .TextField_module_input__9cc1db47 {\n -moz-appearance: textfield;\n flex: 1;\n background-color: transparent;\n border: none;\n font-weight: 400;\n font-size: 0.875rem;\n line-height: 1.125rem;\n letter-spacing: 0.16px;\n color: var(--black);\n width: 100%;\n}\n.TextField_module_root__9cc1db47 label .TextField_module_inputWrapper__9cc1db47 > [data-elem=component2] .TextField_module_input__9cc1db47::-webkit-outer-spin-button, .TextField_module_root__9cc1db47 label .TextField_module_inputWrapper__9cc1db47 > [data-elem=component2] .TextField_module_input__9cc1db47::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n.TextField_module_root__9cc1db47 label .TextField_module_inputWrapper__9cc1db47 > [data-elem=component2] .TextField_module_input__9cc1db47:focus {\n outline: none;\n}\n.TextField_module_root__9cc1db47 label .TextField_module_inputWrapper__9cc1db47 > [data-elem=component2] .TextField_module_input__9cc1db47:disabled {\n background: var(--grey9);\n color: var(--grey3);\n}\n.TextField_module_root__9cc1db47 label .TextField_module_inputWrapper__9cc1db47 > [data-elem=component2] .TextField_module_input__9cc1db47.TextField_module_sm__9cc1db47 {\n padding: 0.5rem 0rem;\n}\n.TextField_module_root__9cc1db47 label .TextField_module_inputWrapper__9cc1db47 > [data-elem=component2] .TextField_module_input__9cc1db47.TextField_module_md__9cc1db47 {\n padding: 0.688rem 0rem;\n}\n.TextField_module_root__9cc1db47 label .TextField_module_inputWrapper__9cc1db47 > [data-elem=component2] .TextField_module_input__9cc1db47.TextField_module_lg__9cc1db47 {\n padding: 1rem 0rem;\n}\n.TextField_module_root__9cc1db47 label .TextField_module_inputWrapper__9cc1db47.TextField_module_typeTextarea__9cc1db47 {\n padding: 0;\n}\n.TextField_module_root__9cc1db47 label .TextField_module_inputWrapper__9cc1db47.TextField_module_typeTextarea__9cc1db47 > [data-elem=component2] .TextField_module_input__9cc1db47 {\n resize: vertical;\n}\n.TextField_module_root__9cc1db47 label .TextField_module_inputWrapper__9cc1db47.TextField_module_typeTextarea__9cc1db47 > [data-elem=component2] .TextField_module_input__9cc1db47.TextField_module_md__9cc1db47 {\n padding: 0.313rem 0.75rem;\n}\n.TextField_module_root__9cc1db47 label .TextField_module_inputWrapper__9cc1db47.TextField_module_typeTextarea__9cc1db47 > [data-elem=component2] .TextField_module_input__9cc1db47.TextField_module_lg__9cc1db47 {\n padding: 0.5rem 1rem;\n font-size: 1rem;\n}\n.TextField_module_root__9cc1db47 label .TextField_module_inputWrapper__9cc1db47:focus-within {\n border: 0.063rem solid var(--info);\n}\n.TextField_module_root__9cc1db47 label .TextField_module_inputWrapper__9cc1db47:focus-within.TextField_module_feedbackError__9cc1db47 {\n border-color: var(--error);\n}\n.TextField_module_root__9cc1db47 label .TextField_module_inputWrapper__9cc1db47.TextField_module_borderDefault__9cc1db47 {\n border-width: 0.063rem;\n}\n.TextField_module_root__9cc1db47 label .TextField_module_inputWrapper__9cc1db47.TextField_module_borderBottom__9cc1db47 {\n border-width: 0rem 0rem 0.063rem 0rem;\n}\n.TextField_module_root__9cc1db47 label .TextField_module_inputWrapper__9cc1db47.TextField_module_borderNone__9cc1db47 {\n border-width: 0rem;\n}\n.TextField_module_root__9cc1db47 .TextField_module_bottom__9cc1db47 {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: flex-start;\n min-height: 2rem;\n width: 100%;\n gap: 1rem;\n color: var(--grey3);\n font-size: 0.75rem;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.TextField_module_root__9cc1db47 .TextField_module_bottom__9cc1db47 .TextField_module_feedback__9cc1db47 {\n flex: 1;\n margin-right: auto;\n}\n.TextField_module_root__9cc1db47 .TextField_module_bottom__9cc1db47 .TextField_module_feedback__9cc1db47.TextField_module_feedbackError__9cc1db47 {\n color: var(--error);\n fill: var(--error);\n}\n.TextField_module_root__9cc1db47 .TextField_module_bottom__9cc1db47 .TextField_module_feedback__9cc1db47.TextField_module_feedbackSuccess__9cc1db47 {\n color: var(--success);\n fill: var(--success);\n}\n.TextField_module_root__9cc1db47 .TextField_module_bottom__9cc1db47 .TextField_module_count__9cc1db47 {\n text-align: right;\n margin-left: auto;\n}\n.TextField_module_root__9cc1db47 .TextField_module_bottom__9cc1db47 .TextField_module_count__9cc1db47.TextField_module_exceeded__9cc1db47 {\n color: var(--error);\n}";
|
|
34328
|
+
var modules_c1d23762 = {"root":"TextField_module_root__9cc1db47","input-wrapper":"TextField_module_inputWrapper__9cc1db47","icon":"TextField_module_icon__9cc1db47","input":"TextField_module_input__9cc1db47","sm":"TextField_module_sm__9cc1db47","md":"TextField_module_md__9cc1db47","lg":"TextField_module_lg__9cc1db47","type-textarea":"TextField_module_typeTextarea__9cc1db47","feedback-error":"TextField_module_feedbackError__9cc1db47","border-default":"TextField_module_borderDefault__9cc1db47","border-bottom":"TextField_module_borderBottom__9cc1db47","border-none":"TextField_module_borderNone__9cc1db47","bottom":"TextField_module_bottom__9cc1db47","feedback":"TextField_module_feedback__9cc1db47","feedback-success":"TextField_module_feedbackSuccess__9cc1db47","count":"TextField_module_count__9cc1db47","exceeded":"TextField_module_exceeded__9cc1db47"};
|
|
34329
|
+
n(css$C,{});
|
|
33740
34330
|
|
|
33741
|
-
var
|
|
33742
|
-
var
|
|
33743
|
-
|
|
33744
|
-
|
|
33745
|
-
|
|
33746
|
-
|
|
33747
|
-
|
|
33748
|
-
|
|
33749
|
-
|
|
33750
|
-
|
|
33751
|
-
|
|
33752
|
-
|
|
33753
|
-
|
|
33754
|
-
|
|
33755
|
-
|
|
33756
|
-
|
|
33757
|
-
|
|
33758
|
-
|
|
33759
|
-
|
|
33760
|
-
|
|
33761
|
-
|
|
33762
|
-
|
|
33763
|
-
|
|
33764
|
-
|
|
33765
|
-
|
|
33766
|
-
months: 1
|
|
33767
|
-
})
|
|
33768
|
-
}];
|
|
34331
|
+
var TextField = /*#__PURE__*/React.forwardRef(function TextField(props, inputRef) {
|
|
34332
|
+
var _inputValue$length;
|
|
34333
|
+
var id = props.id,
|
|
34334
|
+
name = props.name,
|
|
34335
|
+
label = props.label,
|
|
34336
|
+
placeholder = props.placeholder,
|
|
34337
|
+
type = props.type,
|
|
34338
|
+
value = props.value,
|
|
34339
|
+
defaultValue = props.defaultValue,
|
|
34340
|
+
onBlur = props.onBlur,
|
|
34341
|
+
onChange = props.onChange,
|
|
34342
|
+
size = props.size,
|
|
34343
|
+
border = props.border,
|
|
34344
|
+
LeftComponent = props.LeftComponent,
|
|
34345
|
+
RightComponent = props.RightComponent,
|
|
34346
|
+
className = props.className,
|
|
34347
|
+
disabled = props.disabled,
|
|
34348
|
+
inputProps = props.inputProps,
|
|
34349
|
+
feedback = props.feedback,
|
|
34350
|
+
count = props.count,
|
|
34351
|
+
feedbackAndCount = props.feedbackAndCount,
|
|
34352
|
+
maxLength = props.maxLength,
|
|
34353
|
+
onKeyDown = props.onKeyDown;
|
|
34354
|
+
var _useRef = React.useRef(value !== undefined),
|
|
34355
|
+
isControlled = _useRef.current;
|
|
33769
34356
|
|
|
33770
|
-
|
|
33771
|
-
var
|
|
33772
|
-
|
|
33773
|
-
|
|
34357
|
+
// for uncontrolled input
|
|
34358
|
+
var _useState = React.useState(defaultValue),
|
|
34359
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
34360
|
+
uncontrolledValue = _useState2[0],
|
|
34361
|
+
setUncontrolledValue = _useState2[1];
|
|
34362
|
+
var handleChange = function handleChange(event) {
|
|
34363
|
+
var _inputHelper = inputHelper(event),
|
|
34364
|
+
fieldValue = _inputHelper.fieldValue;
|
|
34365
|
+
if (isControlled) {
|
|
34366
|
+
onChange(event, fieldValue);
|
|
34367
|
+
} else {
|
|
34368
|
+
setUncontrolledValue(fieldValue);
|
|
34369
|
+
}
|
|
34370
|
+
};
|
|
34371
|
+
var inputValue = isControlled ? value !== null && value !== void 0 ? value : '' : uncontrolledValue;
|
|
34372
|
+
var Input = /*#__PURE__*/React.createElement(type === 'textarea' ? 'textarea' : 'input', _objectSpread2(_objectSpread2({
|
|
34373
|
+
id: id,
|
|
34374
|
+
name: name,
|
|
34375
|
+
disabled: disabled,
|
|
34376
|
+
type: type,
|
|
34377
|
+
defaultValue: defaultValue,
|
|
34378
|
+
placeholder: placeholder
|
|
34379
|
+
}, maxLength !== null && {
|
|
34380
|
+
maxLength: maxLength
|
|
34381
|
+
}), {}, {
|
|
34382
|
+
onBlur: onBlur,
|
|
34383
|
+
onKeyDown: onKeyDown,
|
|
34384
|
+
'data-elem': 'input',
|
|
34385
|
+
ref: inputRef,
|
|
34386
|
+
value: inputValue,
|
|
34387
|
+
onChange: handleChange,
|
|
34388
|
+
className: classes(modules_c1d23762[size], modules_c1d23762.input)
|
|
34389
|
+
}, inputProps));
|
|
33774
34390
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
33775
|
-
className:
|
|
33776
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
33777
|
-
|
|
33778
|
-
|
|
33779
|
-
|
|
33780
|
-
|
|
33781
|
-
|
|
33782
|
-
|
|
33783
|
-
|
|
33784
|
-
|
|
33785
|
-
|
|
34391
|
+
className: classes(modules_c1d23762.root, className),
|
|
34392
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("label", {
|
|
34393
|
+
children: [label, /*#__PURE__*/jsxRuntime.jsx(BaseCell, {
|
|
34394
|
+
className: classes(modules_c1d23762['input-wrapper'], modules_c1d23762["border-".concat(border)], modules_c1d23762["type-".concat(type)], feedback != null ? modules_c1d23762["feedback-".concat(feedback === null || feedback === void 0 ? void 0 : feedback.type)] : ''),
|
|
34395
|
+
component1: LeftComponent && /*#__PURE__*/jsxRuntime.jsx(LeftComponent, {}),
|
|
34396
|
+
component2: Input,
|
|
34397
|
+
component3: RightComponent && /*#__PURE__*/jsxRuntime.jsx(RightComponent, {})
|
|
34398
|
+
})]
|
|
34399
|
+
}), feedbackAndCount && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
34400
|
+
className: modules_c1d23762.bottom,
|
|
34401
|
+
children: [feedback != null && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
34402
|
+
"data-elem": "feedback",
|
|
34403
|
+
className: classes(modules_c1d23762.feedback, modules_c1d23762["feedback-".concat(feedback.type)]),
|
|
34404
|
+
children: feedback.text
|
|
34405
|
+
}), (count === null || count === void 0 ? void 0 : count.limit) != null && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
34406
|
+
"data-elem": "count",
|
|
34407
|
+
className: classes(modules_c1d23762.count, (inputValue === null || inputValue === void 0 ? void 0 : inputValue.length) > count.limit ? modules_c1d23762.exceeded : ''),
|
|
34408
|
+
children: [(_inputValue$length = inputValue.length) !== null && _inputValue$length !== void 0 ? _inputValue$length : 0, "/", count.limit]
|
|
33786
34409
|
})]
|
|
33787
34410
|
})]
|
|
33788
34411
|
});
|
|
34412
|
+
});
|
|
34413
|
+
TextField.propTypes = {
|
|
34414
|
+
id: propTypes$1.exports.string,
|
|
34415
|
+
name: propTypes$1.exports.string,
|
|
34416
|
+
disabled: propTypes$1.exports.bool,
|
|
34417
|
+
label: propTypes$1.exports.oneOfType([propTypes$1.exports.string, propTypes$1.exports.number]),
|
|
34418
|
+
placeholder: propTypes$1.exports.oneOfType([propTypes$1.exports.string, propTypes$1.exports.number]),
|
|
34419
|
+
type: propTypes$1.exports.oneOf(['text', 'email', 'password', 'number', 'textarea']),
|
|
34420
|
+
value: propTypes$1.exports.oneOfType([propTypes$1.exports.string, propTypes$1.exports.number]),
|
|
34421
|
+
defaultValue: propTypes$1.exports.string,
|
|
34422
|
+
onChange: propTypes$1.exports.func,
|
|
34423
|
+
size: propTypes$1.exports.oneOf(['sm', 'md', 'lg']),
|
|
34424
|
+
border: propTypes$1.exports.oneOf(['default', 'bottom', 'none']),
|
|
34425
|
+
LeftComponent: propTypes$1.exports.node,
|
|
34426
|
+
RightComponent: propTypes$1.exports.node,
|
|
34427
|
+
// eslint-disable-next-line react/forbid-prop-types
|
|
34428
|
+
inputProps: propTypes$1.exports.object,
|
|
34429
|
+
count: propTypes$1.exports.shape({
|
|
34430
|
+
limit: propTypes$1.exports.number
|
|
34431
|
+
}),
|
|
34432
|
+
feedback: propTypes$1.exports.shape({
|
|
34433
|
+
text: propTypes$1.exports.node,
|
|
34434
|
+
type: propTypes$1.exports.oneOf(['error', 'success', 'default'])
|
|
34435
|
+
}),
|
|
34436
|
+
feedbackAndCount: propTypes$1.exports.bool,
|
|
34437
|
+
maxLength: propTypes$1.exports.number,
|
|
34438
|
+
onKeyDown: propTypes$1.exports.func
|
|
33789
34439
|
};
|
|
33790
|
-
|
|
33791
|
-
|
|
33792
|
-
|
|
33793
|
-
|
|
33794
|
-
|
|
33795
|
-
|
|
33796
|
-
|
|
33797
|
-
|
|
33798
|
-
|
|
33799
|
-
|
|
33800
|
-
|
|
33801
|
-
|
|
33802
|
-
|
|
33803
|
-
|
|
33804
|
-
|
|
33805
|
-
|
|
33806
|
-
|
|
33807
|
-
|
|
33808
|
-
|
|
33809
|
-
|
|
33810
|
-
goToDate(getUnixTime(new Date()));
|
|
33811
|
-
};
|
|
33812
|
-
var clearRangeSelection = function clearRangeSelection() {
|
|
33813
|
-
setSelectedRange({});
|
|
33814
|
-
};
|
|
33815
|
-
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
33816
|
-
className: modules_b490bd5d.root,
|
|
33817
|
-
children: [datesSelected && (dates === null || dates === void 0 ? void 0 : dates.length) === 2 ? /*#__PURE__*/jsxRuntime.jsx(SelectedDateView, {
|
|
33818
|
-
range: true,
|
|
33819
|
-
value: "".concat(selectedRange.dates[0], " - ").concat(selectedRange.dates[1]),
|
|
33820
|
-
icon: function icon() {
|
|
33821
|
-
return /*#__PURE__*/jsxRuntime.jsx(Cross$1, {
|
|
33822
|
-
className: modules_b490bd5d.cross
|
|
33823
|
-
});
|
|
33824
|
-
},
|
|
33825
|
-
action: clearRangeSelection
|
|
33826
|
-
}) : datesSelected && /*#__PURE__*/jsxRuntime.jsx(SelectedDateView, {
|
|
33827
|
-
value: "".concat(doubleDigitted(date), " ").concat(monthInShort, " ").concat(year),
|
|
33828
|
-
icon: function icon() {
|
|
33829
|
-
return /*#__PURE__*/jsxRuntime.jsx(Reset, {});
|
|
33830
|
-
},
|
|
33831
|
-
action: resetDate
|
|
33832
|
-
}), range && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
33833
|
-
className: modules_b490bd5d['date-ranges'],
|
|
33834
|
-
children: dateRanges.map(function (_ref) {
|
|
33835
|
-
var _selectedRange$unix;
|
|
33836
|
-
var dateRange = _ref.dateRange,
|
|
33837
|
-
title = _ref.title;
|
|
33838
|
-
var selectedFixedDateRange = dateRange.unix.toString() === ((_selectedRange$unix = selectedRange.unix) === null || _selectedRange$unix === void 0 ? void 0 : _selectedRange$unix.toString());
|
|
33839
|
-
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
33840
|
-
className: classes(modules_b490bd5d['date-range'], selectedFixedDateRange ? modules_b490bd5d.selected : ''),
|
|
33841
|
-
onClick: function onClick() {
|
|
33842
|
-
selectFixedDateRange(dateRange);
|
|
33843
|
-
},
|
|
33844
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(HalfShade, {}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
33845
|
-
children: title
|
|
33846
|
-
})]
|
|
33847
|
-
}, title);
|
|
33848
|
-
})
|
|
33849
|
-
}), datesSelected && /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
33850
|
-
onClick: onApply,
|
|
33851
|
-
title: "Apply",
|
|
33852
|
-
className: modules_b490bd5d.apply
|
|
33853
|
-
})]
|
|
33854
|
-
});
|
|
34440
|
+
TextField.defaultProps = {
|
|
34441
|
+
id: null,
|
|
34442
|
+
name: null,
|
|
34443
|
+
disabled: false,
|
|
34444
|
+
label: '',
|
|
34445
|
+
placeholder: '',
|
|
34446
|
+
type: 'text',
|
|
34447
|
+
value: undefined,
|
|
34448
|
+
defaultValue: '',
|
|
34449
|
+
onChange: function onChange() {},
|
|
34450
|
+
size: 'md',
|
|
34451
|
+
border: 'default',
|
|
34452
|
+
LeftComponent: null,
|
|
34453
|
+
RightComponent: null,
|
|
34454
|
+
inputProps: {},
|
|
34455
|
+
count: null,
|
|
34456
|
+
feedback: null,
|
|
34457
|
+
feedbackAndCount: false,
|
|
34458
|
+
maxLength: null,
|
|
34459
|
+
onKeyDown: function onKeyDown() {}
|
|
33855
34460
|
};
|
|
33856
34461
|
|
|
33857
|
-
var
|
|
33858
|
-
|
|
33859
|
-
|
|
33860
|
-
|
|
33861
|
-
|
|
33862
|
-
|
|
33863
|
-
|
|
33864
|
-
|
|
33865
|
-
|
|
33866
|
-
|
|
33867
|
-
|
|
33868
|
-
|
|
33869
|
-
|
|
33870
|
-
|
|
33871
|
-
|
|
33872
|
-
|
|
33873
|
-
|
|
33874
|
-
|
|
33875
|
-
|
|
33876
|
-
dayAsNumber: dayAsNumber
|
|
33877
|
-
}),
|
|
34462
|
+
var css$B = ":root {\n --white: #ffffff;\n --black: #000000;\n --dark-grey: #333333;\n --dark-grey-o-85: rgba(51, 51, 51, 0.85);\n --grey: #737373;\n --grey1: #888888;\n --grey2: #a6a6a6;\n --grey3: #bbbbbb;\n --grey4: #c4c4c4;\n --grey5: #dddddd;\n --grey6: #e8e8e8;\n --grey7: #eeeeee;\n --grey8: #f2f2f2;\n --grey9: #eff0f0;\n --grey10: #f7f7f7;\n --highlight: #0f62fe;\n --dark-blue: #001833;\n --background: #d0e2ff;\n --banyan-blue: #00037c;\n --banyan-orange: #ff892a;\n --banyan-pink: #ff1597;\n --banyan-gradient: linear-gradient(\n \t84.71deg,\n \tvar(--banyan-pink) 0.48%,\n \tvar(--banyan-orange) 99.57%\n );\n --error: #da1e28;\n --error-bg: #fff1f1;\n --error-outline: rgba(218, 30, 40, 0.08);\n --success: #24a148;\n --success-bg: #defbe6;\n --success-outline: rgba(36, 161, 72, 0.08);\n --warning: #f1c21b;\n --warning-bg: #fff8e1;\n --warning-outline: rgba(203, 160, 6, 0.08);\n --info: #0043ce;\n --info-bg: #edf5ff;\n --info-outline: #2864db98;\n}\n\n.CheckBox_module_root__d1bdcb36 {\n cursor: pointer;\n gap: 10px;\n}\n.CheckBox_module_root__d1bdcb36.CheckBox_module_positionLeft__d1bdcb36 {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n}\n.CheckBox_module_root__d1bdcb36.CheckBox_module_positionRight__d1bdcb36 {\n display: flex;\n flex-direction: row-reverse;\n justify-content: flex-end;\n align-items: center;\n}\n.CheckBox_module_root__d1bdcb36 input[type=checkbox] {\n opacity: 0;\n z-index: 1;\n position: absolute;\n width: 1px;\n height: 1px;\n}\n.CheckBox_module_root__d1bdcb36.CheckBox_module_disabled__d1bdcb36 {\n cursor: default;\n}\n.CheckBox_module_root__d1bdcb36 .CheckBox_module_icon__d1bdcb36 {\n display: inline-block;\n}\n.CheckBox_module_root__d1bdcb36 .CheckBox_module_icon__d1bdcb36.CheckBox_module_iconSm__d1bdcb36 {\n width: 1rem;\n height: 1rem;\n}\n.CheckBox_module_root__d1bdcb36 .CheckBox_module_icon__d1bdcb36.CheckBox_module_iconMd__d1bdcb36 {\n width: 1.25rem;\n height: 1.25rem;\n}\n.CheckBox_module_root__d1bdcb36 .CheckBox_module_icon__d1bdcb36.CheckBox_module_iconLg__d1bdcb36 {\n width: 1.5rem;\n height: 2rem;\n}\n.CheckBox_module_root__d1bdcb36 [data-elem=label] {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}";
|
|
34463
|
+
var modules_066398a2 = {"white":"var(--white)","black":"var(--black)","dark-grey":"var(--dark-grey)","dark-grey-o-85":"var(--dark-grey-o-85)","grey":"var(--grey)","grey1":"var(--grey1)","grey2":"var(--grey2)","grey3":"var(--grey3)","grey4":"var(--grey4)","grey5":"var(--grey5)","grey6":"var(--grey6)","grey7":"var(--grey7)","grey8":"var(--grey8)","grey9":"var(--grey9)","grey10":"var(--grey10)","highlight":"var(--highlight)","dark-blue":"var(--dark-blue)","background":"var(--background)","banyan-blue":"var(--banyan-blue)","banyan-orange":"var(--banyan-orange)","banyan-pink":"var(--banyan-pink)","banyan-gradient":"var(--banyan-gradient)","error":"var(--error)","error-bg":"var(--error-bg)","error-outline":"var(--error-outline)","success":"var(--success)","success-bg":"var(--success-bg)","success-outline":"var(--success-outline)","warning":"var(--warning)","warning-bg":"var(--warning-bg)","warning-outline":"var(--warning-outline)","info":"var(--info)","info-bg":"var(--info-bg)","info-outline":"var(--info-outline)","root":"CheckBox_module_root__d1bdcb36","position-left":"CheckBox_module_positionLeft__d1bdcb36","position-right":"CheckBox_module_positionRight__d1bdcb36","disabled":"CheckBox_module_disabled__d1bdcb36","icon":"CheckBox_module_icon__d1bdcb36","icon-sm":"CheckBox_module_iconSm__d1bdcb36","icon-md":"CheckBox_module_iconMd__d1bdcb36","icon-lg":"CheckBox_module_iconLg__d1bdcb36"};
|
|
34464
|
+
n(css$B,{});
|
|
34465
|
+
|
|
34466
|
+
var Checkbox = function Checkbox(props) {
|
|
34467
|
+
// eslint-disable-next-line object-curly-newline
|
|
34468
|
+
var label = props.label,
|
|
34469
|
+
onChange = props.onChange,
|
|
34470
|
+
defaultChecked = props.defaultChecked,
|
|
34471
|
+
checked = props.checked,
|
|
34472
|
+
position = props.position,
|
|
34473
|
+
size = props.size,
|
|
34474
|
+
className = props.className,
|
|
34475
|
+
disabled = props.disabled;
|
|
34476
|
+
var _useRef = React.useRef(checked !== undefined),
|
|
34477
|
+
isControlled = _useRef.current;
|
|
34478
|
+
|
|
34479
|
+
// for uncontrolled input
|
|
34480
|
+
var _useState = React.useState(defaultChecked),
|
|
33878
34481
|
_useState2 = _slicedToArray(_useState, 2),
|
|
33879
|
-
|
|
33880
|
-
|
|
33881
|
-
|
|
33882
|
-
|
|
33883
|
-
|
|
33884
|
-
|
|
33885
|
-
|
|
33886
|
-
|
|
33887
|
-
|
|
33888
|
-
monthAsNumber: selectedDayInfo.monthAsNumber,
|
|
33889
|
-
year: selectedDayInfo.year,
|
|
33890
|
-
dayAsNumber: selectedDayInfo.dayAsNumber
|
|
33891
|
-
};
|
|
33892
|
-
setSelectedMonth({
|
|
33893
|
-
month: selectedDayInfo.month,
|
|
33894
|
-
monthAsNumber: selectedDayInfo.monthAsNumber,
|
|
33895
|
-
year: selectedDayInfo.year
|
|
33896
|
-
});
|
|
33897
|
-
setSelectedDate(_objectSpread2(_objectSpread2({}, selectedDate), {}, {
|
|
33898
|
-
month: selectedDateMonth.month,
|
|
33899
|
-
year: selectedDateMonth.year,
|
|
33900
|
-
date: dateAsNumber,
|
|
33901
|
-
unix: getUnixTime(_date.setHours(23, 59, 59, 59))
|
|
33902
|
-
}));
|
|
33903
|
-
return;
|
|
33904
|
-
}
|
|
33905
|
-
var date = new Date();
|
|
33906
|
-
if (!range && !isBefore(date, disableDatesBefore)) {
|
|
33907
|
-
var _dateAsNumber = date.getDate();
|
|
33908
|
-
setSelectedDate(_objectSpread2(_objectSpread2({}, selectedDate), {}, {
|
|
33909
|
-
month: selectedMonth.month,
|
|
33910
|
-
year: selectedMonth.year,
|
|
33911
|
-
date: _dateAsNumber,
|
|
33912
|
-
unix: getUnixTime(date.setHours(23, 59, 59, 59))
|
|
33913
|
-
}));
|
|
33914
|
-
}
|
|
33915
|
-
}, []);
|
|
33916
|
-
var goToDate = function goToDate(unix) {
|
|
33917
|
-
var dayInfo = getDayInfo(new Date(unix * 1000));
|
|
33918
|
-
setSelectedMonth({
|
|
33919
|
-
month: dayInfo.month,
|
|
33920
|
-
monthAsNumber: dayInfo.monthAsNumber,
|
|
33921
|
-
year: dayInfo.year
|
|
33922
|
-
});
|
|
33923
|
-
setSelectedDate(_objectSpread2(_objectSpread2({}, selectedDate), {}, {
|
|
33924
|
-
month: dayInfo.month,
|
|
33925
|
-
year: dayInfo.year,
|
|
33926
|
-
date: dayInfo.dateAsNumber,
|
|
33927
|
-
unix: getUnixTime(new Date(unix * 1000).setHours(23, 59, 59, 59))
|
|
33928
|
-
}));
|
|
33929
|
-
};
|
|
33930
|
-
var onMonthChange = function onMonthChange(switchSide) {
|
|
33931
|
-
if (switchSide === 'prev') {
|
|
33932
|
-
if (selectedMonth.monthAsNumber === 0) {
|
|
33933
|
-
var _previousMonth = FULL_MONTHS[11];
|
|
33934
|
-
setSelectedMonth({
|
|
33935
|
-
month: _previousMonth,
|
|
33936
|
-
monthAsNumber: 11,
|
|
33937
|
-
year: selectedMonth.year - 1
|
|
33938
|
-
});
|
|
33939
|
-
return;
|
|
33940
|
-
}
|
|
33941
|
-
var previousMonthNumber = selectedMonth.monthAsNumber - 1;
|
|
33942
|
-
var previousMonth = FULL_MONTHS[previousMonthNumber];
|
|
33943
|
-
setSelectedMonth({
|
|
33944
|
-
month: previousMonth,
|
|
33945
|
-
monthAsNumber: previousMonthNumber,
|
|
33946
|
-
year: selectedMonth.year
|
|
33947
|
-
});
|
|
33948
|
-
return;
|
|
33949
|
-
}
|
|
33950
|
-
if (switchSide === 'next') {
|
|
33951
|
-
if (selectedMonth.monthAsNumber === 11) {
|
|
33952
|
-
var _nextMonth = FULL_MONTHS[0];
|
|
33953
|
-
setSelectedMonth({
|
|
33954
|
-
month: _nextMonth,
|
|
33955
|
-
monthAsNumber: 0,
|
|
33956
|
-
year: selectedMonth.year + 1
|
|
33957
|
-
});
|
|
33958
|
-
return;
|
|
33959
|
-
}
|
|
33960
|
-
var nextMonthNumber = selectedMonth.monthAsNumber + 1;
|
|
33961
|
-
var nextMonth = FULL_MONTHS[nextMonthNumber];
|
|
33962
|
-
setSelectedMonth({
|
|
33963
|
-
month: nextMonth,
|
|
33964
|
-
monthAsNumber: nextMonthNumber,
|
|
33965
|
-
year: selectedMonth.year
|
|
33966
|
-
});
|
|
34482
|
+
uncontrolledChecked = _useState2[0],
|
|
34483
|
+
setUncontrolledChecked = _useState2[1];
|
|
34484
|
+
var handleChange = function handleChange(event) {
|
|
34485
|
+
var _inputHelper = inputHelper(event),
|
|
34486
|
+
fieldValue = _inputHelper.fieldValue;
|
|
34487
|
+
if (isControlled) {
|
|
34488
|
+
onChange(event, fieldValue);
|
|
34489
|
+
} else {
|
|
34490
|
+
setUncontrolledChecked(fieldValue);
|
|
33967
34491
|
}
|
|
33968
34492
|
};
|
|
33969
|
-
|
|
33970
|
-
|
|
33971
|
-
|
|
33972
|
-
|
|
33973
|
-
|
|
33974
|
-
|
|
33975
|
-
|
|
33976
|
-
|
|
33977
|
-
|
|
33978
|
-
|
|
33979
|
-
|
|
33980
|
-
|
|
33981
|
-
|
|
33982
|
-
|
|
33983
|
-
})
|
|
33984
|
-
|
|
33985
|
-
|
|
33986
|
-
|
|
33987
|
-
|
|
33988
|
-
|
|
33989
|
-
onApply: onApply,
|
|
33990
|
-
goToDate: goToDate
|
|
34493
|
+
var isChecked = isControlled ? checked : uncontrolledChecked;
|
|
34494
|
+
return /*#__PURE__*/jsxRuntime.jsxs("label", {
|
|
34495
|
+
className: classes(modules_066398a2.root, modules_066398a2["position-".concat(position)], className, disabled ? modules_066398a2.disabled : ''),
|
|
34496
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("input", _objectSpread2(_objectSpread2({
|
|
34497
|
+
disabled: disabled,
|
|
34498
|
+
type: "checkbox",
|
|
34499
|
+
defaultChecked: defaultChecked
|
|
34500
|
+
}, isControlled ? {
|
|
34501
|
+
checked: checked
|
|
34502
|
+
} : {}), {}, {
|
|
34503
|
+
onChange: handleChange
|
|
34504
|
+
})), isChecked ? /*#__PURE__*/jsxRuntime.jsx(CheckboxIcon.Checked, {
|
|
34505
|
+
"data-elem": "icon",
|
|
34506
|
+
className: classes(modules_066398a2["icon-".concat(size)], modules_066398a2.icon)
|
|
34507
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(CheckboxIcon.UnChecked, {
|
|
34508
|
+
"data-elem": "icon",
|
|
34509
|
+
className: classes(modules_066398a2["icon-".concat(size)], modules_066398a2.icon)
|
|
34510
|
+
}), label && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
34511
|
+
"data-elem": "label",
|
|
34512
|
+
children: label
|
|
33991
34513
|
})]
|
|
33992
34514
|
});
|
|
33993
34515
|
};
|
|
34516
|
+
Checkbox.propTypes = {
|
|
34517
|
+
disabled: propTypes$1.exports.bool,
|
|
34518
|
+
label: propTypes$1.exports.string,
|
|
34519
|
+
defaultChecked: propTypes$1.exports.bool,
|
|
34520
|
+
checked: propTypes$1.exports.bool,
|
|
34521
|
+
position: propTypes$1.exports.oneOf(['left', 'right']),
|
|
34522
|
+
size: propTypes$1.exports.oneOf(['sm', 'md', 'lg']),
|
|
34523
|
+
onChange: propTypes$1.exports.func
|
|
34524
|
+
};
|
|
34525
|
+
Checkbox.defaultProps = {
|
|
34526
|
+
disabled: false,
|
|
34527
|
+
label: null,
|
|
34528
|
+
defaultChecked: false,
|
|
34529
|
+
checked: undefined,
|
|
34530
|
+
position: 'right',
|
|
34531
|
+
size: 'sm',
|
|
34532
|
+
onChange: function onChange() {}
|
|
34533
|
+
};
|
|
33994
34534
|
|
|
33995
|
-
var css$A = "
|
|
33996
|
-
var
|
|
34535
|
+
var css$A = ":root {\n --white: #ffffff;\n --black: #000000;\n --dark-grey: #333333;\n --dark-grey-o-85: rgba(51, 51, 51, 0.85);\n --grey: #737373;\n --grey1: #888888;\n --grey2: #a6a6a6;\n --grey3: #bbbbbb;\n --grey4: #c4c4c4;\n --grey5: #dddddd;\n --grey6: #e8e8e8;\n --grey7: #eeeeee;\n --grey8: #f2f2f2;\n --grey9: #eff0f0;\n --grey10: #f7f7f7;\n --highlight: #0f62fe;\n --dark-blue: #001833;\n --background: #d0e2ff;\n --banyan-blue: #00037c;\n --banyan-orange: #ff892a;\n --banyan-pink: #ff1597;\n --banyan-gradient: linear-gradient(\n \t84.71deg,\n \tvar(--banyan-pink) 0.48%,\n \tvar(--banyan-orange) 99.57%\n );\n --error: #da1e28;\n --error-bg: #fff1f1;\n --error-outline: rgba(218, 30, 40, 0.08);\n --success: #24a148;\n --success-bg: #defbe6;\n --success-outline: rgba(36, 161, 72, 0.08);\n --warning: #f1c21b;\n --warning-bg: #fff8e1;\n --warning-outline: rgba(203, 160, 6, 0.08);\n --info: #0043ce;\n --info-bg: #edf5ff;\n --info-outline: #2864db98;\n}\n\n.Radio_module_root__dc9ececa {\n cursor: pointer;\n gap: 10px;\n}\n.Radio_module_root__dc9ececa.Radio_module_positionLeft__dc9ececa {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n}\n.Radio_module_root__dc9ececa.Radio_module_positionRight__dc9ececa {\n display: flex;\n flex-direction: row-reverse;\n justify-content: flex-end;\n align-items: center;\n}\n.Radio_module_root__dc9ececa.Radio_module_disabled__dc9ececa {\n cursor: default;\n}\n.Radio_module_root__dc9ececa input[type=radio] {\n opacity: 0;\n z-index: 1;\n position: absolute;\n width: 1px;\n height: 1px;\n}\n.Radio_module_root__dc9ececa .Radio_module_icon__dc9ececa {\n display: inline-block;\n}\n.Radio_module_root__dc9ececa .Radio_module_icon__dc9ececa.Radio_module_iconSm__dc9ececa {\n width: 1rem;\n height: 1rem;\n}\n.Radio_module_root__dc9ececa .Radio_module_icon__dc9ececa.Radio_module_iconMd__dc9ececa {\n width: 1.25rem;\n height: 1.25rem;\n}\n.Radio_module_root__dc9ececa .Radio_module_icon__dc9ececa.Radio_module_iconLg__dc9ececa {\n width: 1.5rem;\n height: 2rem;\n}\n.Radio_module_root__dc9ececa [data-elem=label] {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}";
|
|
34536
|
+
var modules_3705961f = {"white":"var(--white)","black":"var(--black)","dark-grey":"var(--dark-grey)","dark-grey-o-85":"var(--dark-grey-o-85)","grey":"var(--grey)","grey1":"var(--grey1)","grey2":"var(--grey2)","grey3":"var(--grey3)","grey4":"var(--grey4)","grey5":"var(--grey5)","grey6":"var(--grey6)","grey7":"var(--grey7)","grey8":"var(--grey8)","grey9":"var(--grey9)","grey10":"var(--grey10)","highlight":"var(--highlight)","dark-blue":"var(--dark-blue)","background":"var(--background)","banyan-blue":"var(--banyan-blue)","banyan-orange":"var(--banyan-orange)","banyan-pink":"var(--banyan-pink)","banyan-gradient":"var(--banyan-gradient)","error":"var(--error)","error-bg":"var(--error-bg)","error-outline":"var(--error-outline)","success":"var(--success)","success-bg":"var(--success-bg)","success-outline":"var(--success-outline)","warning":"var(--warning)","warning-bg":"var(--warning-bg)","warning-outline":"var(--warning-outline)","info":"var(--info)","info-bg":"var(--info-bg)","info-outline":"var(--info-outline)","root":"Radio_module_root__dc9ececa","position-left":"Radio_module_positionLeft__dc9ececa","position-right":"Radio_module_positionRight__dc9ececa","disabled":"Radio_module_disabled__dc9ececa","icon":"Radio_module_icon__dc9ececa","icon-sm":"Radio_module_iconSm__dc9ececa","icon-md":"Radio_module_iconMd__dc9ececa","icon-lg":"Radio_module_iconLg__dc9ececa"};
|
|
33997
34537
|
n(css$A,{});
|
|
33998
34538
|
|
|
33999
|
-
var
|
|
34000
|
-
|
|
34001
|
-
|
|
34002
|
-
|
|
34003
|
-
|
|
34004
|
-
|
|
34005
|
-
|
|
34006
|
-
|
|
34007
|
-
|
|
34008
|
-
|
|
34009
|
-
|
|
34010
|
-
|
|
34011
|
-
|
|
34012
|
-
|
|
34013
|
-
|
|
34014
|
-
|
|
34015
|
-
|
|
34016
|
-
|
|
34017
|
-
|
|
34018
|
-
|
|
34019
|
-
|
|
34539
|
+
var Radio = function Radio(props) {
|
|
34540
|
+
// eslint-disable-next-line object-curly-newline
|
|
34541
|
+
var label = props.label,
|
|
34542
|
+
checked = props.checked,
|
|
34543
|
+
defaultChecked = props.defaultChecked,
|
|
34544
|
+
onChange = props.onChange,
|
|
34545
|
+
position = props.position,
|
|
34546
|
+
size = props.size,
|
|
34547
|
+
className = props.className,
|
|
34548
|
+
disabled = props.disabled;
|
|
34549
|
+
var _useRef = React.useRef(checked !== undefined),
|
|
34550
|
+
isControlled = _useRef.current;
|
|
34551
|
+
|
|
34552
|
+
// for uncontrolled input
|
|
34553
|
+
var _useState = React.useState(defaultChecked),
|
|
34554
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
34555
|
+
uncontrolledChecked = _useState2[0],
|
|
34556
|
+
setUncontrolledChecked = _useState2[1];
|
|
34557
|
+
var handleChange = function handleChange(event) {
|
|
34558
|
+
var _inputHelper = inputHelper(event),
|
|
34559
|
+
fieldValue = _inputHelper.fieldValue;
|
|
34560
|
+
if (isControlled) {
|
|
34561
|
+
onChange(event, fieldValue);
|
|
34562
|
+
} else {
|
|
34563
|
+
setUncontrolledChecked(fieldValue);
|
|
34564
|
+
}
|
|
34565
|
+
};
|
|
34566
|
+
var isChecked = isControlled ? checked : uncontrolledChecked;
|
|
34567
|
+
return /*#__PURE__*/jsxRuntime.jsxs("label", {
|
|
34568
|
+
className: classes(modules_3705961f.root, modules_3705961f["position-".concat(position)], className, disabled ? modules_3705961f.disabled : ''),
|
|
34569
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("input", {
|
|
34570
|
+
disabled: disabled,
|
|
34571
|
+
type: "radio",
|
|
34572
|
+
checked: isChecked,
|
|
34573
|
+
onChange: handleChange
|
|
34574
|
+
}), isChecked ? /*#__PURE__*/jsxRuntime.jsx(RadioIcon.Checked, {
|
|
34575
|
+
"data-elem": "icon",
|
|
34576
|
+
className: classes(modules_3705961f["icon-".concat(size)], modules_3705961f.icon)
|
|
34577
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(RadioIcon.UnChecked, {
|
|
34578
|
+
"data-elem": "icon",
|
|
34579
|
+
className: classes(modules_3705961f["icon-".concat(size)], modules_3705961f.icon)
|
|
34580
|
+
}), label && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
34581
|
+
"data-elem": "label",
|
|
34582
|
+
children: label
|
|
34583
|
+
})]
|
|
34584
|
+
});
|
|
34585
|
+
};
|
|
34586
|
+
Radio.propTypes = {
|
|
34587
|
+
disabled: propTypes$1.exports.bool,
|
|
34588
|
+
label: propTypes$1.exports.string,
|
|
34589
|
+
checked: propTypes$1.exports.bool,
|
|
34590
|
+
defaultChecked: propTypes$1.exports.bool,
|
|
34591
|
+
position: propTypes$1.exports.oneOf(['left', 'right']),
|
|
34592
|
+
size: propTypes$1.exports.oneOf(['sm', 'md', 'lg']),
|
|
34593
|
+
onChange: propTypes$1.exports.func
|
|
34594
|
+
};
|
|
34595
|
+
Radio.defaultProps = {
|
|
34596
|
+
disabled: false,
|
|
34597
|
+
label: null,
|
|
34598
|
+
checked: undefined,
|
|
34599
|
+
defaultChecked: false,
|
|
34600
|
+
position: 'left',
|
|
34601
|
+
size: 'sm',
|
|
34602
|
+
onChange: function onChange() {}
|
|
34020
34603
|
};
|
|
34021
34604
|
|
|
34022
|
-
var
|
|
34023
|
-
|
|
34024
|
-
|
|
34025
|
-
|
|
34026
|
-
|
|
34027
|
-
|
|
34028
|
-
|
|
34605
|
+
var css$z = ".Dropdown_module_root__1ad8038e {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 0.5rem;\n position: relative;\n width: -webkit-fit-content;\n width: -moz-fit-content;\n width: fit-content;\n max-width: 100%;\n}\n.Dropdown_module_root__1ad8038e .Dropdown_module_label__1ad8038e {\n font-size: 0.75rem;\n color: var(--grey);\n width: auto;\n}\n.Dropdown_module_root__1ad8038e .Dropdown_module_header__1ad8038e {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n max-width: 100%;\n position: relative;\n}\n.Dropdown_module_root__1ad8038e .Dropdown_module_header__1ad8038e .Dropdown_module_input__1ad8038e {\n position: absolute;\n opacity: 0;\n width: 1px;\n height: 1px;\n}\n.Dropdown_module_root__1ad8038e .Dropdown_module_header__1ad8038e .Dropdown_module_input__1ad8038e:focus + .Dropdown_module_select__1ad8038e {\n border-color: var(--highlight);\n}\n.Dropdown_module_root__1ad8038e .Dropdown_module_header__1ad8038e .Dropdown_module_input__1ad8038e:focus + .Dropdown_module_select__1ad8038e.Dropdown_module_feedbackError__1ad8038e {\n border-color: var(--error);\n}\n.Dropdown_module_root__1ad8038e .Dropdown_module_header__1ad8038e .Dropdown_module_select__1ad8038e {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n width: 25rem;\n max-width: 100%;\n gap: 0.5rem;\n background: var(--white);\n outline: none;\n border: 1px solid var(--grey5);\n border-radius: 0.25rem;\n padding: 0.75rem 0.75rem 0.75rem 1rem;\n cursor: pointer;\n}\n.Dropdown_module_root__1ad8038e .Dropdown_module_header__1ad8038e .Dropdown_module_select__1ad8038e .Dropdown_module_placeholder__1ad8038e {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: var(--black);\n}\n.Dropdown_module_root__1ad8038e .Dropdown_module_header__1ad8038e .Dropdown_module_select__1ad8038e .Dropdown_module_icon__1ad8038e {\n width: 1.5rem;\n height: 1.5rem;\n}\n.Dropdown_module_root__1ad8038e .Dropdown_module_header__1ad8038e .Dropdown_module_select__1ad8038e.Dropdown_module_feedbackError__1ad8038e {\n border-color: var(--error);\n}\n.Dropdown_module_root__1ad8038e.Dropdown_module_open__1ad8038e .Dropdown_module_header__1ad8038e {\n border-color: var(--highlight);\n}\n.Dropdown_module_root__1ad8038e.Dropdown_module_disabled__1ad8038e .Dropdown_module_select__1ad8038e {\n background: var(--grey10);\n cursor: not-allowed;\n}\n.Dropdown_module_root__1ad8038e .Dropdown_module_bottom__1ad8038e {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: flex-start;\n min-height: 2rem;\n width: 100%;\n gap: 1rem;\n color: var(--grey3);\n font-size: 0.75rem;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.Dropdown_module_root__1ad8038e .Dropdown_module_bottom__1ad8038e .Dropdown_module_feedback__1ad8038e {\n flex: 1;\n margin-right: auto;\n}\n.Dropdown_module_root__1ad8038e .Dropdown_module_bottom__1ad8038e .Dropdown_module_feedback__1ad8038e.Dropdown_module_feedbackError__1ad8038e {\n color: var(--error);\n fill: var(--error);\n}\n.Dropdown_module_root__1ad8038e .Dropdown_module_bottom__1ad8038e .Dropdown_module_feedback__1ad8038e.Dropdown_module_feedbackSuccess__1ad8038e {\n color: var(--success);\n fill: var(--success);\n}\n.Dropdown_module_root__1ad8038e .Dropdown_module_bottom__1ad8038e .Dropdown_module_count__1ad8038e {\n text-align: right;\n margin-left: auto;\n}\n.Dropdown_module_root__1ad8038e .Dropdown_module_bottom__1ad8038e .Dropdown_module_count__1ad8038e.Dropdown_module_exceeded__1ad8038e {\n color: var(--error);\n}\n\n.Dropdown_module_body__1ad8038e {\n display: none;\n position: absolute;\n top: calc(100% + 0.5rem);\n background: var(--white);\n width: auto;\n border: 0.063rem solid var(--grey5);\n box-shadow: 0rem 0.5rem 1.25rem rgba(24, 24, 24, 0.08);\n border-radius: 0.25rem;\n padding: 1rem;\n overflow-y: auto;\n min-height: 4rem;\n outline: none;\n}\n.Dropdown_module_body__1ad8038e .Dropdown_module_multiOptions__1ad8038e {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 0.5rem;\n list-style: none;\n}\n.Dropdown_module_body__1ad8038e .Dropdown_module_multiApply__1ad8038e {\n margin-top: 0.5rem;\n}\n.Dropdown_module_body__1ad8038e.Dropdown_module_open__1ad8038e {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n}";
|
|
34606
|
+
var modules_1b90f5ea = {"root":"Dropdown_module_root__1ad8038e","label":"Dropdown_module_label__1ad8038e","header":"Dropdown_module_header__1ad8038e","input":"Dropdown_module_input__1ad8038e","select":"Dropdown_module_select__1ad8038e","feedback-error":"Dropdown_module_feedbackError__1ad8038e","placeholder":"Dropdown_module_placeholder__1ad8038e","icon":"Dropdown_module_icon__1ad8038e","open":"Dropdown_module_open__1ad8038e","disabled":"Dropdown_module_disabled__1ad8038e","bottom":"Dropdown_module_bottom__1ad8038e","feedback":"Dropdown_module_feedback__1ad8038e","feedback-success":"Dropdown_module_feedbackSuccess__1ad8038e","count":"Dropdown_module_count__1ad8038e","exceeded":"Dropdown_module_exceeded__1ad8038e","body":"Dropdown_module_body__1ad8038e","multi-options":"Dropdown_module_multiOptions__1ad8038e","multi-apply":"Dropdown_module_multiApply__1ad8038e"};
|
|
34607
|
+
n(css$z,{});
|
|
34608
|
+
|
|
34609
|
+
var Dropdown = /*#__PURE__*/React.forwardRef(function Dropdown(props, inputRef) {
|
|
34610
|
+
var _selectedOptions$map, _ref2, _selectedOptions$;
|
|
34611
|
+
// eslint-disable-next-line object-curly-newline
|
|
34612
|
+
var className = props.className,
|
|
34613
|
+
popperClassName = props.popperClassName,
|
|
34029
34614
|
value = props.value,
|
|
34615
|
+
onChange = props.onChange,
|
|
34616
|
+
onBlur = props.onBlur,
|
|
34617
|
+
children = props.children,
|
|
34618
|
+
label = props.label,
|
|
34619
|
+
placeholder = props.placeholder,
|
|
34620
|
+
multi = props.multi,
|
|
34030
34621
|
disabled = props.disabled,
|
|
34031
|
-
|
|
34032
|
-
|
|
34033
|
-
|
|
34034
|
-
|
|
34622
|
+
id = props.id,
|
|
34623
|
+
name = props.name,
|
|
34624
|
+
feedback = props.feedback,
|
|
34625
|
+
formatter = props.formatter;
|
|
34035
34626
|
var _useState = React.useState(false),
|
|
34036
34627
|
_useState2 = _slicedToArray(_useState, 2),
|
|
34037
34628
|
open = _useState2[0],
|
|
34038
34629
|
setOpen = _useState2[1];
|
|
34039
|
-
var _useState3 = React.useState(
|
|
34040
|
-
return {
|
|
34041
|
-
dates: [],
|
|
34042
|
-
unix: []
|
|
34043
|
-
};
|
|
34044
|
-
}),
|
|
34630
|
+
var _useState3 = React.useState(null),
|
|
34045
34631
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
34046
|
-
|
|
34047
|
-
|
|
34048
|
-
var _useState5 = React.useState(
|
|
34049
|
-
return '';
|
|
34050
|
-
}),
|
|
34632
|
+
activeIndex = _useState4[0],
|
|
34633
|
+
setActiveIndex = _useState4[1];
|
|
34634
|
+
var _useState5 = React.useState(0),
|
|
34051
34635
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
34052
|
-
|
|
34053
|
-
|
|
34054
|
-
var
|
|
34055
|
-
|
|
34056
|
-
|
|
34636
|
+
selectedIndex = _useState6[0],
|
|
34637
|
+
setSelectedIndex = _useState6[1];
|
|
34638
|
+
var listItemsRef = React.useRef([]);
|
|
34639
|
+
var multiOptionsRef = React.useRef(null);
|
|
34640
|
+
var isControlled = value !== undefined;
|
|
34641
|
+
|
|
34642
|
+
// for uncontrolled input
|
|
34643
|
+
var _useState7 = React.useState(value),
|
|
34057
34644
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
34058
|
-
|
|
34059
|
-
|
|
34060
|
-
var datePickerRef = React.useRef();
|
|
34061
|
-
var sDate = fromUnixTime(value);
|
|
34062
|
-
var displayValue = '';
|
|
34063
|
-
if (!range && value) {
|
|
34064
|
-
var _sDate$getMonth$toStr;
|
|
34065
|
-
displayValue = " ".concat(sDate.getDate(), " ").concat(MONTHS[(_sDate$getMonth$toStr = sDate.getMonth().toString()) === null || _sDate$getMonth$toStr === void 0 ? void 0 : _sDate$getMonth$toStr.substring(0, 3)], " ").concat(sDate.getFullYear());
|
|
34066
|
-
}
|
|
34645
|
+
uncontrolledValue = _useState8[0],
|
|
34646
|
+
setUncontrolledValue = _useState8[1];
|
|
34067
34647
|
var _useFloating = useFloating({
|
|
34068
34648
|
open: open,
|
|
34069
34649
|
onOpenChange: setOpen,
|
|
34070
34650
|
whileElementsMounted: autoUpdate,
|
|
34071
|
-
middleware: [
|
|
34651
|
+
middleware: [offset(5), flip({
|
|
34652
|
+
padding: 8
|
|
34653
|
+
}), shift({
|
|
34654
|
+
padding: 8
|
|
34655
|
+
}), size({
|
|
34072
34656
|
apply: function apply(_ref) {
|
|
34073
34657
|
var rects = _ref.rects,
|
|
34074
34658
|
availableHeight = _ref.availableHeight,
|
|
@@ -34080,10 +34664,6 @@ var DatePicker = function DatePicker(props) {
|
|
|
34080
34664
|
});
|
|
34081
34665
|
},
|
|
34082
34666
|
padding: 8
|
|
34083
|
-
}), offset(5), flip({
|
|
34084
|
-
padding: 8
|
|
34085
|
-
}), shift({
|
|
34086
|
-
padding: 8
|
|
34087
34667
|
})]
|
|
34088
34668
|
}),
|
|
34089
34669
|
x = _useFloating.x,
|
|
@@ -34092,677 +34672,950 @@ var DatePicker = function DatePicker(props) {
|
|
|
34092
34672
|
floating = _useFloating.floating,
|
|
34093
34673
|
strategy = _useFloating.strategy,
|
|
34094
34674
|
context = _useFloating.context;
|
|
34095
|
-
useOutsideClickListener(floating, function () {
|
|
34096
|
-
return setOpen(false);
|
|
34097
|
-
});
|
|
34098
34675
|
var _useInteractions = useInteractions([useClick(context, {
|
|
34099
34676
|
enabled: !disabled
|
|
34677
|
+
}), useRole(context, {
|
|
34678
|
+
role: 'listbox'
|
|
34679
|
+
}), useListNavigation(context, {
|
|
34680
|
+
listRef: listItemsRef,
|
|
34681
|
+
activeIndex: activeIndex,
|
|
34682
|
+
selectedIndex: selectedIndex,
|
|
34683
|
+
onNavigate: setActiveIndex
|
|
34100
34684
|
}), useDismiss(context)]),
|
|
34101
34685
|
getReferenceProps = _useInteractions.getReferenceProps,
|
|
34102
|
-
getFloatingProps = _useInteractions.getFloatingProps
|
|
34103
|
-
|
|
34104
|
-
|
|
34105
|
-
|
|
34106
|
-
|
|
34107
|
-
|
|
34108
|
-
})) {
|
|
34109
|
-
setError('Invalid range of dates');
|
|
34110
|
-
setOpen(false);
|
|
34686
|
+
getFloatingProps = _useInteractions.getFloatingProps,
|
|
34687
|
+
getItemProps = _useInteractions.getItemProps;
|
|
34688
|
+
var onSelect = function onSelect(child, selected) {
|
|
34689
|
+
return function (event) {
|
|
34690
|
+
var _itemValue$toString;
|
|
34691
|
+
if (event.currentTarget.getAttribute('data-elem') !== 'dropdown-item') {
|
|
34111
34692
|
return;
|
|
34112
34693
|
}
|
|
34113
|
-
|
|
34114
|
-
|
|
34115
|
-
|
|
34694
|
+
var itemValue = child.props.value;
|
|
34695
|
+
var itemValueString = itemValue === null || itemValue === void 0 ? void 0 : (_itemValue$toString = itemValue.toString) === null || _itemValue$toString === void 0 ? void 0 : _itemValue$toString.call(itemValue);
|
|
34696
|
+
var index = event.currentTarget.getAttribute('data-index');
|
|
34697
|
+
|
|
34698
|
+
// to support form libraries which require name and value on the event
|
|
34699
|
+
var nativeEvent = event.nativeEvent || event;
|
|
34700
|
+
var clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);
|
|
34701
|
+
Object.defineProperty(clonedEvent, 'target', {
|
|
34702
|
+
writable: true,
|
|
34703
|
+
value: {
|
|
34704
|
+
value: itemValueString,
|
|
34705
|
+
name: name
|
|
34706
|
+
}
|
|
34707
|
+
});
|
|
34708
|
+
|
|
34709
|
+
// if (elem === 'dropdown-item') {
|
|
34710
|
+
setSelectedIndex(parseInt(index, 10));
|
|
34711
|
+
if (multi) {
|
|
34712
|
+
// eslint-disable-next-line no-lonely-if
|
|
34713
|
+
if (selected === true) {
|
|
34714
|
+
setUncontrolledValue(uncontrolledValue.filter(function (val) {
|
|
34715
|
+
return val !== itemValueString;
|
|
34716
|
+
}));
|
|
34717
|
+
} else {
|
|
34718
|
+
setUncontrolledValue([].concat(_toConsumableArray(uncontrolledValue !== null && uncontrolledValue !== void 0 ? uncontrolledValue : []), [itemValueString]));
|
|
34719
|
+
}
|
|
34720
|
+
setActiveIndex(parseInt(index, 10));
|
|
34721
|
+
} else {
|
|
34722
|
+
if (isControlled) {
|
|
34723
|
+
onChange(clonedEvent, itemValueString.toString());
|
|
34724
|
+
} else {
|
|
34725
|
+
setUncontrolledValue(itemValueString.toString());
|
|
34726
|
+
}
|
|
34727
|
+
setActiveIndex(null);
|
|
34728
|
+
setOpen(false);
|
|
34729
|
+
}
|
|
34730
|
+
// }
|
|
34731
|
+
};
|
|
34732
|
+
};
|
|
34733
|
+
|
|
34734
|
+
var onNavigate = function onNavigate(child, selected) {
|
|
34735
|
+
return function (event) {
|
|
34736
|
+
var selectKey = [' ', 'Spacebar', 'Enter'].includes(event.key);
|
|
34737
|
+
if (selectKey) {
|
|
34738
|
+
event.stopPropagation();
|
|
34739
|
+
onSelect(child, selected)(event);
|
|
34740
|
+
}
|
|
34741
|
+
};
|
|
34742
|
+
};
|
|
34743
|
+
React.useImperativeHandle(inputRef, function () {
|
|
34744
|
+
return {
|
|
34745
|
+
value: function value() {
|
|
34746
|
+
var _inputRef$current$val, _inputRef$current$val2, _inputRef$current$val3, _inputValue$;
|
|
34747
|
+
var inputValue = (_inputRef$current$val = (_inputRef$current$val2 = inputRef.current.value) === null || _inputRef$current$val2 === void 0 ? void 0 : (_inputRef$current$val3 = _inputRef$current$val2.split) === null || _inputRef$current$val3 === void 0 ? void 0 : _inputRef$current$val3.call(_inputRef$current$val2, ', ')) !== null && _inputRef$current$val !== void 0 ? _inputRef$current$val : [];
|
|
34748
|
+
if (multi) {
|
|
34749
|
+
return inputRef;
|
|
34750
|
+
}
|
|
34751
|
+
return (_inputValue$ = inputValue === null || inputValue === void 0 ? void 0 : inputValue[0]) !== null && _inputValue$ !== void 0 ? _inputValue$ : null;
|
|
34752
|
+
}
|
|
34753
|
+
};
|
|
34754
|
+
}, []);
|
|
34755
|
+
var childrenArray = React.Children.toArray(children);
|
|
34756
|
+
var selectedOptions = React.useMemo(function () {
|
|
34757
|
+
var inputValue = uncontrolledValue;
|
|
34758
|
+
if (isControlled && !multi) {
|
|
34759
|
+
inputValue = value;
|
|
34760
|
+
}
|
|
34761
|
+
var options = [];
|
|
34762
|
+
if (inputValue != null && inputValue !== '') {
|
|
34763
|
+
childrenArray === null || childrenArray === void 0 ? void 0 : childrenArray.forEach(function (child) {
|
|
34764
|
+
var _inputValue$indexOf, _inputValue, _inputValue$indexOf2, _child$props, _child$props$value, _child$props$value$to, _inputValue2, _child$props2, _child$props2$value, _child$props2$value$t;
|
|
34765
|
+
if (multi && ((_inputValue$indexOf = (_inputValue = inputValue) === null || _inputValue === void 0 ? void 0 : (_inputValue$indexOf2 = _inputValue.indexOf) === null || _inputValue$indexOf2 === void 0 ? void 0 : _inputValue$indexOf2.call(_inputValue, child === null || child === void 0 ? void 0 : (_child$props = child.props) === null || _child$props === void 0 ? void 0 : (_child$props$value = _child$props.value) === null || _child$props$value === void 0 ? void 0 : (_child$props$value$to = _child$props$value.toString) === null || _child$props$value$to === void 0 ? void 0 : _child$props$value$to.call(_child$props$value))) !== null && _inputValue$indexOf !== void 0 ? _inputValue$indexOf : -1) !== -1 || !multi && ((_inputValue2 = inputValue) === null || _inputValue2 === void 0 ? void 0 : _inputValue2.toString()) === (child === null || child === void 0 ? void 0 : (_child$props2 = child.props) === null || _child$props2 === void 0 ? void 0 : (_child$props2$value = _child$props2.value) === null || _child$props2$value === void 0 ? void 0 : (_child$props2$value$t = _child$props2$value.toString) === null || _child$props2$value$t === void 0 ? void 0 : _child$props2$value$t.call(_child$props2$value))) {
|
|
34766
|
+
var _child$props3, _child$props4, _child$props4$value, _child$props4$value$t;
|
|
34767
|
+
options.push({
|
|
34768
|
+
title: child === null || child === void 0 ? void 0 : (_child$props3 = child.props) === null || _child$props3 === void 0 ? void 0 : _child$props3.title,
|
|
34769
|
+
value: child === null || child === void 0 ? void 0 : (_child$props4 = child.props) === null || _child$props4 === void 0 ? void 0 : (_child$props4$value = _child$props4.value) === null || _child$props4$value === void 0 ? void 0 : (_child$props4$value$t = _child$props4$value.toString) === null || _child$props4$value$t === void 0 ? void 0 : _child$props4$value$t.call(_child$props4$value)
|
|
34770
|
+
});
|
|
34771
|
+
}
|
|
34772
|
+
});
|
|
34773
|
+
}
|
|
34774
|
+
return options;
|
|
34775
|
+
}, [value, uncontrolledValue, multi]);
|
|
34776
|
+
var items = childrenArray.map(function (child, index) {
|
|
34777
|
+
var _child$props6;
|
|
34778
|
+
var selected = false;
|
|
34779
|
+
if (selectedOptions.findIndex(function (option) {
|
|
34780
|
+
var _child$props5, _child$props5$value, _child$props5$value$t;
|
|
34781
|
+
return option.value === (child === null || child === void 0 ? void 0 : (_child$props5 = child.props) === null || _child$props5 === void 0 ? void 0 : (_child$props5$value = _child$props5.value) === null || _child$props5$value === void 0 ? void 0 : (_child$props5$value$t = _child$props5$value.toString) === null || _child$props5$value$t === void 0 ? void 0 : _child$props5$value$t.call(_child$props5$value));
|
|
34782
|
+
}) !== -1) {
|
|
34783
|
+
selected = true;
|
|
34784
|
+
}
|
|
34785
|
+
return /*#__PURE__*/React.cloneElement(child, _objectSpread2({}, getItemProps({
|
|
34786
|
+
key: child === null || child === void 0 ? void 0 : (_child$props6 = child.props) === null || _child$props6 === void 0 ? void 0 : _child$props6.value,
|
|
34787
|
+
onKeyDown: onNavigate(child, selected),
|
|
34788
|
+
onClick: onSelect(child, selected),
|
|
34789
|
+
onMouseEnter: function onMouseEnter() {
|
|
34790
|
+
setActiveIndex(index);
|
|
34791
|
+
},
|
|
34792
|
+
dataAttrs: {
|
|
34793
|
+
'data-index': index
|
|
34794
|
+
},
|
|
34795
|
+
selected: selected,
|
|
34796
|
+
tabIndex: activeIndex === index ? 0 : -1,
|
|
34797
|
+
ref: function ref(node) {
|
|
34798
|
+
listItemsRef.current[index] = node;
|
|
34799
|
+
}
|
|
34800
|
+
})));
|
|
34801
|
+
});
|
|
34802
|
+
var _useState9 = React.useState(false),
|
|
34803
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
34804
|
+
pointer = _useState10[0],
|
|
34805
|
+
setPointer = _useState10[1];
|
|
34806
|
+
if (!open && pointer) {
|
|
34807
|
+
setPointer(false);
|
|
34808
|
+
}
|
|
34809
|
+
React.useLayoutEffect(function () {
|
|
34810
|
+
if (open && activeIndex != null && !pointer) {
|
|
34811
|
+
requestAnimationFrame(function () {
|
|
34812
|
+
var _listItemsRef$current;
|
|
34813
|
+
(_listItemsRef$current = listItemsRef.current[activeIndex]) === null || _listItemsRef$current === void 0 ? void 0 : _listItemsRef$current.scrollIntoView({
|
|
34814
|
+
block: 'nearest'
|
|
34815
|
+
});
|
|
34816
|
+
});
|
|
34817
|
+
}
|
|
34818
|
+
}, [open, activeIndex, pointer]);
|
|
34819
|
+
React.useEffect(function () {
|
|
34820
|
+
if (multi) {
|
|
34821
|
+
setUncontrolledValue(value);
|
|
34822
|
+
}
|
|
34823
|
+
}, [open, multi, value]);
|
|
34824
|
+
var onSelectAll = function onSelectAll(event, selected) {
|
|
34825
|
+
// to support form libraries which require name and value on the event
|
|
34826
|
+
var nativeEvent = event.nativeEvent || event;
|
|
34827
|
+
var clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);
|
|
34828
|
+
var itemValue = [];
|
|
34829
|
+
if (selected) {
|
|
34830
|
+
itemValue = childrenArray.map(function (child) {
|
|
34831
|
+
var _child$props7, _child$props7$value, _child$props7$value$t;
|
|
34832
|
+
return child === null || child === void 0 ? void 0 : (_child$props7 = child.props) === null || _child$props7 === void 0 ? void 0 : (_child$props7$value = _child$props7.value) === null || _child$props7$value === void 0 ? void 0 : (_child$props7$value$t = _child$props7$value.toString) === null || _child$props7$value$t === void 0 ? void 0 : _child$props7$value$t.call(_child$props7$value);
|
|
34833
|
+
});
|
|
34834
|
+
}
|
|
34835
|
+
Object.defineProperty(clonedEvent, 'target', {
|
|
34836
|
+
writable: true,
|
|
34837
|
+
value: {
|
|
34838
|
+
value: itemValue,
|
|
34839
|
+
name: name
|
|
34840
|
+
}
|
|
34841
|
+
});
|
|
34842
|
+
|
|
34843
|
+
// eslint-disable-next-line no-lonely-if
|
|
34844
|
+
if (selected === true) {
|
|
34845
|
+
setUncontrolledValue(itemValue);
|
|
34116
34846
|
} else {
|
|
34117
|
-
|
|
34118
|
-
setOpen(false);
|
|
34847
|
+
setUncontrolledValue(itemValue);
|
|
34119
34848
|
}
|
|
34849
|
+
setActiveIndex(0);
|
|
34120
34850
|
};
|
|
34121
|
-
var
|
|
34122
|
-
|
|
34123
|
-
|
|
34124
|
-
|
|
34125
|
-
|
|
34126
|
-
|
|
34127
|
-
|
|
34128
|
-
|
|
34129
|
-
|
|
34130
|
-
|
|
34131
|
-
|
|
34132
|
-
value: value
|
|
34851
|
+
var onApply = function onApply(event) {
|
|
34852
|
+
var nativeEvent = event.nativeEvent || event;
|
|
34853
|
+
var clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);
|
|
34854
|
+
Object.defineProperty(clonedEvent, 'target', {
|
|
34855
|
+
writable: true,
|
|
34856
|
+
value: {
|
|
34857
|
+
value: uncontrolledValue,
|
|
34858
|
+
name: name
|
|
34859
|
+
}
|
|
34860
|
+
});
|
|
34861
|
+
onChange(event, uncontrolledValue);
|
|
34133
34862
|
};
|
|
34134
34863
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
34135
|
-
className: classes(
|
|
34136
|
-
|
|
34137
|
-
|
|
34138
|
-
className:
|
|
34139
|
-
children:
|
|
34864
|
+
className: classes(className, modules_1b90f5ea.root, open ? modules_1b90f5ea.open : '', disabled ? modules_1b90f5ea.disabled : ''),
|
|
34865
|
+
children: [label && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
34866
|
+
"data-elem": "label",
|
|
34867
|
+
className: modules_1b90f5ea.label,
|
|
34868
|
+
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
34869
|
+
children: label
|
|
34870
|
+
})
|
|
34140
34871
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread2(_objectSpread2({
|
|
34141
34872
|
"data-elem": "header",
|
|
34142
|
-
|
|
34143
|
-
|
|
34873
|
+
className: modules_1b90f5ea.header,
|
|
34874
|
+
ref: reference
|
|
34144
34875
|
}, getReferenceProps()), {}, {
|
|
34145
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
34146
|
-
|
|
34147
|
-
|
|
34148
|
-
|
|
34149
|
-
|
|
34150
|
-
|
|
34151
|
-
|
|
34152
|
-
className: classes(modules_5b831cd1.value, modules_5b831cd1[theme]),
|
|
34153
|
-
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
34154
|
-
children: displayValue
|
|
34155
|
-
})
|
|
34156
|
-
})]
|
|
34157
|
-
}), /*#__PURE__*/jsxRuntime.jsx("input", {
|
|
34158
|
-
className: modules_5b831cd1.input,
|
|
34159
|
-
value: displayValue
|
|
34160
|
-
}), value ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
34161
|
-
onClick: function onClick(event) {
|
|
34162
|
-
event.stopPropagation();
|
|
34163
|
-
onClear();
|
|
34164
|
-
},
|
|
34165
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Cross$1, {
|
|
34166
|
-
className: classes(modules_5b831cd1.icon, modules_5b831cd1[theme])
|
|
34167
|
-
})
|
|
34168
|
-
}) : /*#__PURE__*/jsxRuntime.jsx(Chevron, {
|
|
34169
|
-
className: classes(modules_5b831cd1.icon, modules_5b831cd1[theme]),
|
|
34170
|
-
position: open ? 'bottom' : 'top'
|
|
34171
|
-
})]
|
|
34172
|
-
})), error && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
34173
|
-
className: modules_5b831cd1['error-text'],
|
|
34174
|
-
children: error
|
|
34175
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Popper, {
|
|
34176
|
-
open: open,
|
|
34177
|
-
wrapperid: "datePicker-popper",
|
|
34178
|
-
children: open && /*#__PURE__*/jsxRuntime.jsx("div", _objectSpread2(_objectSpread2({}, getFloatingProps({
|
|
34179
|
-
role: 'group',
|
|
34180
|
-
ref: floating,
|
|
34876
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("input", {
|
|
34877
|
+
id: id,
|
|
34878
|
+
name: name,
|
|
34879
|
+
ref: inputRef,
|
|
34880
|
+
disabled: disabled,
|
|
34881
|
+
tabIndex: 0,
|
|
34882
|
+
className: modules_1b90f5ea.input,
|
|
34181
34883
|
onKeyDown: function onKeyDown(event) {
|
|
34182
|
-
|
|
34183
|
-
|
|
34884
|
+
var validKey = [' ', 'Spacebar', 'Enter'].includes(event.key);
|
|
34885
|
+
if (validKey) {
|
|
34886
|
+
setOpen(true);
|
|
34184
34887
|
}
|
|
34185
34888
|
},
|
|
34186
|
-
|
|
34187
|
-
|
|
34188
|
-
|
|
34189
|
-
|
|
34190
|
-
|
|
34191
|
-
|
|
34192
|
-
|
|
34193
|
-
|
|
34194
|
-
|
|
34195
|
-
|
|
34196
|
-
|
|
34197
|
-
|
|
34198
|
-
|
|
34199
|
-
|
|
34200
|
-
|
|
34201
|
-
|
|
34202
|
-
|
|
34203
|
-
|
|
34204
|
-
|
|
34205
|
-
|
|
34206
|
-
|
|
34207
|
-
|
|
34208
|
-
|
|
34209
|
-
|
|
34210
|
-
|
|
34211
|
-
|
|
34212
|
-
|
|
34213
|
-
|
|
34214
|
-
|
|
34215
|
-
|
|
34216
|
-
|
|
34217
|
-
|
|
34218
|
-
|
|
34219
|
-
|
|
34220
|
-
|
|
34221
|
-
|
|
34222
|
-
|
|
34223
|
-
|
|
34224
|
-
|
|
34225
|
-
|
|
34226
|
-
|
|
34227
|
-
|
|
34228
|
-
|
|
34229
|
-
|
|
34230
|
-
|
|
34231
|
-
|
|
34232
|
-
|
|
34233
|
-
|
|
34234
|
-
|
|
34235
|
-
|
|
34236
|
-
|
|
34237
|
-
|
|
34238
|
-
|
|
34239
|
-
|
|
34240
|
-
|
|
34241
|
-
|
|
34242
|
-
|
|
34243
|
-
|
|
34244
|
-
|
|
34245
|
-
|
|
34246
|
-
|
|
34247
|
-
|
|
34248
|
-
|
|
34249
|
-
|
|
34250
|
-
|
|
34251
|
-
|
|
34252
|
-
|
|
34253
|
-
|
|
34254
|
-
|
|
34255
|
-
|
|
34256
|
-
|
|
34257
|
-
|
|
34258
|
-
|
|
34259
|
-
|
|
34260
|
-
|
|
34261
|
-
|
|
34262
|
-
|
|
34263
|
-
|
|
34264
|
-
|
|
34265
|
-
className: classes(modules_6d03d164.root, open ? modules_6d03d164.open : ''),
|
|
34266
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(BaseCell, {
|
|
34267
|
-
flexible: true,
|
|
34268
|
-
size: "auto",
|
|
34269
|
-
className: modules_6d03d164.header,
|
|
34270
|
-
component1: iconPlacement === 'left' && icon,
|
|
34271
|
-
component2: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
34272
|
-
className: modules_6d03d164.title,
|
|
34273
|
-
flexible: true,
|
|
34274
|
-
size: "auto",
|
|
34275
|
-
variant: "text",
|
|
34276
|
-
color: "default",
|
|
34277
|
-
onClick: function onClick(event) {
|
|
34278
|
-
var detail = event.detail;
|
|
34279
|
-
|
|
34280
|
-
// single click
|
|
34281
|
-
if (detail === 1) {
|
|
34282
|
-
_onClick === null || _onClick === void 0 ? void 0 : _onClick(open);
|
|
34283
|
-
// double click
|
|
34284
|
-
} else if (detail === 2) {
|
|
34285
|
-
setOpen(function (prevState) {
|
|
34286
|
-
var newState = !prevState;
|
|
34287
|
-
onDoubleClick === null || onDoubleClick === void 0 ? void 0 : onDoubleClick(newState);
|
|
34288
|
-
return newState;
|
|
34289
|
-
});
|
|
34290
|
-
}
|
|
34291
|
-
},
|
|
34292
|
-
leftComponent: function leftComponent() {
|
|
34293
|
-
return title;
|
|
34294
|
-
}
|
|
34295
|
-
}),
|
|
34296
|
-
component3: iconPlacement === 'right' && icon
|
|
34297
|
-
}), /*#__PURE__*/jsxRuntime.jsx(BaseCell, {
|
|
34298
|
-
size: "auto",
|
|
34299
|
-
className: modules_6d03d164.body,
|
|
34300
|
-
component1: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
34301
|
-
className: modules_6d03d164.tail
|
|
34302
|
-
}),
|
|
34303
|
-
component2: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
34304
|
-
className: modules_6d03d164.children,
|
|
34305
|
-
children: children
|
|
34889
|
+
onBlur: onBlur,
|
|
34890
|
+
value: selectedOptions === null || selectedOptions === void 0 ? void 0 : (_selectedOptions$map = selectedOptions.map(function (option) {
|
|
34891
|
+
return option === null || option === void 0 ? void 0 : option.value;
|
|
34892
|
+
})) === null || _selectedOptions$map === void 0 ? void 0 : _selectedOptions$map.join(', ')
|
|
34893
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
34894
|
+
"data-elem": "select",
|
|
34895
|
+
role: "button",
|
|
34896
|
+
className: classes(modules_1b90f5ea.select, feedback != null ? modules_1b90f5ea["feedback-".concat(feedback === null || feedback === void 0 ? void 0 : feedback.type)] : ''),
|
|
34897
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
34898
|
+
"data-elem": "placeholder",
|
|
34899
|
+
className: modules_1b90f5ea.placeholder,
|
|
34900
|
+
children: (_ref2 = (selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.length) > 1 ? formatter(selectedOptions.length) : selectedOptions === null || selectedOptions === void 0 ? void 0 : (_selectedOptions$ = selectedOptions[0]) === null || _selectedOptions$ === void 0 ? void 0 : _selectedOptions$.title) !== null && _ref2 !== void 0 ? _ref2 : placeholder
|
|
34901
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Caret, {
|
|
34902
|
+
"data-elem": "icon",
|
|
34903
|
+
className: classes(modules_1b90f5ea.icon, modules_1b90f5ea['drop-icon'])
|
|
34904
|
+
})]
|
|
34905
|
+
})]
|
|
34906
|
+
})), /*#__PURE__*/jsxRuntime.jsx(Popper, {
|
|
34907
|
+
open: open,
|
|
34908
|
+
wrapperId: "dropdown-popper",
|
|
34909
|
+
children: open && /*#__PURE__*/jsxRuntime.jsx(FloatingFocusManager, {
|
|
34910
|
+
context: context,
|
|
34911
|
+
initialFocus: -1,
|
|
34912
|
+
modal: false,
|
|
34913
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("ul", _objectSpread2(_objectSpread2({}, getFloatingProps({
|
|
34914
|
+
'data-elem': 'body',
|
|
34915
|
+
role: 'group',
|
|
34916
|
+
ref: floating,
|
|
34917
|
+
onKeyDown: function onKeyDown(event) {
|
|
34918
|
+
setPointer(false);
|
|
34919
|
+
if (event.key === 'Tab' && !multi) {
|
|
34920
|
+
setOpen(false);
|
|
34921
|
+
}
|
|
34922
|
+
},
|
|
34923
|
+
onPointerMove: function onPointerMove() {
|
|
34924
|
+
setPointer(true);
|
|
34925
|
+
},
|
|
34926
|
+
style: {
|
|
34927
|
+
position: strategy,
|
|
34928
|
+
top: y !== null && y !== void 0 ? y : 0,
|
|
34929
|
+
left: x !== null && x !== void 0 ? x : 0
|
|
34930
|
+
},
|
|
34931
|
+
className: classes(modules_1b90f5ea.body, popperClassName, open ? modules_1b90f5ea.open : '')
|
|
34932
|
+
})), {}, {
|
|
34933
|
+
children: [multi && /*#__PURE__*/jsxRuntime.jsxs("li", {
|
|
34934
|
+
ref: multiOptionsRef,
|
|
34935
|
+
className: modules_1b90f5ea['multi-options'],
|
|
34936
|
+
tabIndex: -1,
|
|
34937
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Checkbox, {
|
|
34938
|
+
label: "Select All",
|
|
34939
|
+
position: "left",
|
|
34940
|
+
checked: selectedOptions.length === childrenArray.length,
|
|
34941
|
+
onChange: onSelectAll
|
|
34942
|
+
}), ' ', /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
34943
|
+
blurOnClick: false,
|
|
34944
|
+
variant: "text",
|
|
34945
|
+
title: "Clear",
|
|
34946
|
+
size: "auto",
|
|
34947
|
+
color: "danger",
|
|
34948
|
+
onClick: function onClick(event) {
|
|
34949
|
+
var _multiOptionsRef$curr;
|
|
34950
|
+
multiOptionsRef === null || multiOptionsRef === void 0 ? void 0 : (_multiOptionsRef$curr = multiOptionsRef.current) === null || _multiOptionsRef$curr === void 0 ? void 0 : _multiOptionsRef$curr.focus();
|
|
34951
|
+
onSelectAll(event, false);
|
|
34952
|
+
}
|
|
34953
|
+
})]
|
|
34954
|
+
}), items, multi && /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
34955
|
+
className: modules_1b90f5ea['multi-apply'],
|
|
34956
|
+
title: "Apply",
|
|
34957
|
+
size: "auto",
|
|
34958
|
+
onClick: onApply
|
|
34959
|
+
})]
|
|
34960
|
+
}))
|
|
34961
|
+
})
|
|
34962
|
+
}), feedback != null && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
34963
|
+
className: modules_1b90f5ea.bottom,
|
|
34964
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
34965
|
+
"data-elem": "feedback",
|
|
34966
|
+
className: classes(modules_1b90f5ea.feedback, modules_1b90f5ea["feedback-".concat(feedback.type)]),
|
|
34967
|
+
children: feedback.text
|
|
34306
34968
|
})
|
|
34307
34969
|
})]
|
|
34308
34970
|
});
|
|
34971
|
+
});
|
|
34972
|
+
Dropdown.propTypes = {
|
|
34973
|
+
popperClassName: propTypes$1.exports.string,
|
|
34974
|
+
className: propTypes$1.exports.string,
|
|
34975
|
+
disabled: propTypes$1.exports.bool,
|
|
34976
|
+
label: propTypes$1.exports.string,
|
|
34977
|
+
value: propTypes$1.exports.oneOfType([propTypes$1.exports.string, propTypes$1.exports.arrayOf(propTypes$1.exports.string)]),
|
|
34978
|
+
placeholder: propTypes$1.exports.string,
|
|
34979
|
+
// search: PropTypes.bool,
|
|
34980
|
+
// max: PropTypes.number,
|
|
34981
|
+
multi: propTypes$1.exports.bool,
|
|
34982
|
+
onChange: propTypes$1.exports.func,
|
|
34983
|
+
onBlur: propTypes$1.exports.func,
|
|
34984
|
+
feedback: propTypes$1.exports.shape({
|
|
34985
|
+
text: propTypes$1.exports.node,
|
|
34986
|
+
type: propTypes$1.exports.oneOf(['error', 'success', 'default'])
|
|
34987
|
+
}),
|
|
34988
|
+
formatter: propTypes$1.exports.func
|
|
34309
34989
|
};
|
|
34310
|
-
|
|
34311
|
-
|
|
34312
|
-
|
|
34313
|
-
|
|
34314
|
-
|
|
34315
|
-
|
|
34316
|
-
|
|
34317
|
-
|
|
34318
|
-
|
|
34319
|
-
|
|
34320
|
-
|
|
34990
|
+
Dropdown.defaultProps = {
|
|
34991
|
+
popperClassName: '',
|
|
34992
|
+
className: '',
|
|
34993
|
+
disabled: false,
|
|
34994
|
+
label: null,
|
|
34995
|
+
value: undefined,
|
|
34996
|
+
placeholder: 'Select an option',
|
|
34997
|
+
// search: false,
|
|
34998
|
+
// max: null,
|
|
34999
|
+
multi: false,
|
|
35000
|
+
onChange: null,
|
|
35001
|
+
onBlur: null,
|
|
35002
|
+
feedback: null,
|
|
35003
|
+
formatter: function formatter(totalSelected) {
|
|
35004
|
+
return "".concat(totalSelected, " options selected");
|
|
35005
|
+
}
|
|
34321
35006
|
};
|
|
34322
35007
|
|
|
34323
|
-
var css$y = ".
|
|
34324
|
-
var
|
|
35008
|
+
var css$y = ".DropdownItem_module_root__61492174 {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n gap: 0.75rem;\n width: 100%;\n padding: 0.75rem 1rem;\n border-radius: 0.25rem;\n cursor: pointer;\n color: var(--grey);\n outline: none;\n}\n.DropdownItem_module_root__61492174 > .DropdownItem_module_input__61492174 {\n cursor: pointer;\n}\n.DropdownItem_module_root__61492174:focus {\n background: var(--grey6);\n}\n.DropdownItem_module_root__61492174.DropdownItem_module_selected__61492174 {\n background: var(--info-bg);\n}";
|
|
35009
|
+
var modules_bf949acd = {"root":"DropdownItem_module_root__61492174","input":"DropdownItem_module_input__61492174","selected":"DropdownItem_module_selected__61492174"};
|
|
34325
35010
|
n(css$y,{});
|
|
34326
35011
|
|
|
34327
|
-
var
|
|
34328
|
-
|
|
34329
|
-
var
|
|
34330
|
-
|
|
34331
|
-
|
|
34332
|
-
|
|
34333
|
-
|
|
34334
|
-
|
|
35012
|
+
var DropdownItem = /*#__PURE__*/React.forwardRef(function DropdownItem(props, ref) {
|
|
35013
|
+
// eslint-disable-next-line object-curly-newline
|
|
35014
|
+
var title = props.title,
|
|
35015
|
+
value = props.value,
|
|
35016
|
+
variant = props.variant,
|
|
35017
|
+
selected = props.selected,
|
|
35018
|
+
onKeyDown = props.onKeyDown,
|
|
35019
|
+
onMouseEnter = props.onMouseEnter,
|
|
35020
|
+
onClick = props.onClick,
|
|
35021
|
+
dataAttrs = props.dataAttrs,
|
|
35022
|
+
className = props.className,
|
|
35023
|
+
tabIndex = props.tabIndex;
|
|
35024
|
+
var action = null;
|
|
35025
|
+
switch (variant) {
|
|
35026
|
+
case 'checkbox':
|
|
35027
|
+
action = /*#__PURE__*/jsxRuntime.jsx(Checkbox, {
|
|
35028
|
+
className: modules_bf949acd.input,
|
|
35029
|
+
checked: selected,
|
|
35030
|
+
disabled: true
|
|
35031
|
+
});
|
|
35032
|
+
break;
|
|
35033
|
+
case 'radio':
|
|
35034
|
+
action = /*#__PURE__*/jsxRuntime.jsx(Radio, {
|
|
35035
|
+
className: modules_bf949acd.input,
|
|
35036
|
+
checked: selected,
|
|
35037
|
+
disabled: true
|
|
35038
|
+
});
|
|
34335
35039
|
break;
|
|
34336
35040
|
}
|
|
34337
|
-
return /*#__PURE__*/jsxRuntime.jsxs("
|
|
34338
|
-
|
|
34339
|
-
|
|
34340
|
-
|
|
34341
|
-
|
|
34342
|
-
|
|
34343
|
-
|
|
34344
|
-
|
|
34345
|
-
|
|
34346
|
-
|
|
34347
|
-
|
|
34348
|
-
|
|
34349
|
-
|
|
34350
|
-
|
|
34351
|
-
|
|
34352
|
-
|
|
34353
|
-
onItemClick = props.onItemClick,
|
|
34354
|
-
onItemDoubleClick = props.onItemDoubleClick,
|
|
34355
|
-
minWidth = props.minWidth,
|
|
34356
|
-
maxWidth = props.maxWidth,
|
|
34357
|
-
borderSize = props.borderSize,
|
|
34358
|
-
resizable = props.resizable,
|
|
34359
|
-
setItemProps = props.setItemProps,
|
|
34360
|
-
title = props.title;
|
|
34361
|
-
var browserRef = React.useRef(null);
|
|
34362
|
-
useResize({
|
|
34363
|
-
ref: browserRef,
|
|
34364
|
-
styles: {
|
|
34365
|
-
minWidth: minWidth,
|
|
34366
|
-
maxWidth: maxWidth !== null && maxWidth !== void 0 ? maxWidth : document.documentElement.getBoundingClientRect().width,
|
|
34367
|
-
borderSize: borderSize
|
|
34368
|
-
},
|
|
34369
|
-
enabled: resizable
|
|
34370
|
-
});
|
|
34371
|
-
var handleItemClick = function handleItemClick(item, pathString) {
|
|
34372
|
-
return function (open) {
|
|
34373
|
-
onItemClick(item, pathString, open);
|
|
34374
|
-
};
|
|
34375
|
-
};
|
|
34376
|
-
var handleItemDoubleClick = function handleItemDoubleClick(item, pathString) {
|
|
34377
|
-
return function (open) {
|
|
34378
|
-
onItemDoubleClick(item, pathString, open);
|
|
34379
|
-
};
|
|
34380
|
-
};
|
|
34381
|
-
var renderTree = function renderTree(data) {
|
|
34382
|
-
var _data$list$map, _data$list, _data$list$map2;
|
|
34383
|
-
var pathString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
34384
|
-
if (data == null) {
|
|
34385
|
-
return null;
|
|
34386
|
-
}
|
|
34387
|
-
var hasChildren = (data === null || data === void 0 ? void 0 : data.list) === true || Array.isArray(data === null || data === void 0 ? void 0 : data.list);
|
|
34388
|
-
return /*#__PURE__*/jsxRuntime.jsx(HierarchyItem, _objectSpread2(_objectSpread2({
|
|
34389
|
-
title: /*#__PURE__*/jsxRuntime.jsx(Title, {
|
|
34390
|
-
item: data
|
|
34391
|
-
}),
|
|
34392
|
-
iconPlacement: hasChildren ? 'left' : 'none',
|
|
34393
|
-
onClick: handleItemClick(data, pathString),
|
|
34394
|
-
onDoubleClick: handleItemDoubleClick(data, pathString)
|
|
34395
|
-
}, setItemProps(data, pathString)), {}, {
|
|
34396
|
-
children: hasChildren && ((_data$list$map = (_data$list = data.list) === null || _data$list === void 0 ? void 0 : (_data$list$map2 = _data$list.map) === null || _data$list$map2 === void 0 ? void 0 : _data$list$map2.call(_data$list, function (item, idx) {
|
|
34397
|
-
return renderTree(item, "".concat(pathString).concat(pathString.length > 0 ? '.' : '', "list[").concat(idx, "]"));
|
|
34398
|
-
})) !== null && _data$list$map !== void 0 ? _data$list$map : [])
|
|
34399
|
-
}));
|
|
34400
|
-
};
|
|
34401
|
-
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
34402
|
-
ref: browserRef,
|
|
34403
|
-
className: classes(modules_5e29d515.root, className, resizable ? modules_5e29d515.resizable : ''),
|
|
34404
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
34405
|
-
className: modules_5e29d515.header,
|
|
34406
|
-
"data-elem": "header",
|
|
35041
|
+
return /*#__PURE__*/jsxRuntime.jsxs("li", _objectSpread2(_objectSpread2({
|
|
35042
|
+
ref: ref,
|
|
35043
|
+
className: classes(className, modules_bf949acd.root, selected ? modules_bf949acd.selected : ''),
|
|
35044
|
+
"data-elem": "dropdown-item",
|
|
35045
|
+
"data-variant": variant,
|
|
35046
|
+
"data-value": value,
|
|
35047
|
+
"data-selected": selected,
|
|
35048
|
+
onClick: onClick,
|
|
35049
|
+
onMouseEnter: onMouseEnter
|
|
35050
|
+
}, _objectSpread2({}, dataAttrs)), {}, {
|
|
35051
|
+
tabIndex: tabIndex,
|
|
35052
|
+
role: "option",
|
|
35053
|
+
"aria-selected": selected,
|
|
35054
|
+
onKeyDown: onKeyDown,
|
|
35055
|
+
children: [action, /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
35056
|
+
"data-elem": "title",
|
|
34407
35057
|
children: title
|
|
34408
|
-
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
34409
|
-
className: modules_5e29d515.body,
|
|
34410
|
-
"data-elem": "body",
|
|
34411
|
-
children: renderTree(metadata)
|
|
34412
35058
|
})]
|
|
34413
|
-
});
|
|
34414
|
-
};
|
|
34415
|
-
|
|
35059
|
+
}));
|
|
35060
|
+
});
|
|
35061
|
+
DropdownItem.propTypes = {
|
|
34416
35062
|
className: propTypes$1.exports.string,
|
|
34417
|
-
|
|
34418
|
-
|
|
34419
|
-
|
|
34420
|
-
|
|
34421
|
-
|
|
34422
|
-
}),
|
|
34423
|
-
onItemClick: propTypes$1.exports.func,
|
|
34424
|
-
onItemDoubleClick: propTypes$1.exports.func,
|
|
34425
|
-
borderSize: propTypes$1.exports.number,
|
|
34426
|
-
minWidth: propTypes$1.exports.number,
|
|
34427
|
-
maxWidth: propTypes$1.exports.number,
|
|
34428
|
-
resizable: propTypes$1.exports.bool,
|
|
34429
|
-
setItemProps: propTypes$1.exports.func,
|
|
34430
|
-
title: propTypes$1.exports.string
|
|
35063
|
+
title: propTypes$1.exports.node,
|
|
35064
|
+
variant: propTypes$1.exports.oneOf(['default', 'checkbox', 'radio']),
|
|
35065
|
+
selected: propTypes$1.exports.bool,
|
|
35066
|
+
// eslint-disable-next-line react/forbid-prop-types
|
|
35067
|
+
dataAttrs: propTypes$1.exports.object
|
|
34431
35068
|
};
|
|
34432
|
-
|
|
35069
|
+
DropdownItem.defaultProps = {
|
|
34433
35070
|
className: '',
|
|
34434
|
-
|
|
34435
|
-
|
|
34436
|
-
|
|
34437
|
-
|
|
34438
|
-
minWidth: 220,
|
|
34439
|
-
maxWidth: null,
|
|
34440
|
-
resizable: false,
|
|
34441
|
-
setItemProps: function setItemProps() {
|
|
34442
|
-
return {};
|
|
34443
|
-
},
|
|
34444
|
-
title: 'Browser'
|
|
35071
|
+
title: '',
|
|
35072
|
+
variant: 'default',
|
|
35073
|
+
dataAttrs: {},
|
|
35074
|
+
selected: false
|
|
34445
35075
|
};
|
|
34446
35076
|
|
|
34447
|
-
var css$x = ".
|
|
34448
|
-
var
|
|
35077
|
+
var css$x = ".TimePicker_module_root__2dd24d9e {\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n border-top: 1px solid var(--grey5);\n border-bottom: 1px solid var(--grey5);\n}\n.TimePicker_module_root__2dd24d9e .TimePicker_module_input__2dd24d9e {\n width: 5.125rem;\n}\n.TimePicker_module_root__2dd24d9e .TimePicker_module_input__2dd24d9e > label [data-elem=base-cell] {\n border: none;\n}\n.TimePicker_module_root__2dd24d9e .TimePicker_module_input__2dd24d9e > label [data-elem=base-cell] [data-elem=component2] {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n}\n.TimePicker_module_root__2dd24d9e .TimePicker_module_input__2dd24d9e > label [data-elem=base-cell] [data-elem=component2] > input[data-elem=input] {\n padding: 1rem 0rem;\n text-align: center;\n font-weight: 600;\n font-size: 1.25rem;\n line-height: 1.5rem;\n color: var(--dark-grey);\n}\n.TimePicker_module_root__2dd24d9e .TimePicker_module_colon__2dd24d9e {\n font-weight: 500;\n font-size: 1.25rem;\n line-height: 1.5rem;\n color: var(--dark-grey);\n}\n.TimePicker_module_root__2dd24d9e .TimePicker_module_separator__2dd24d9e {\n width: 0.0625rem;\n height: 1.5625rem;\n background-color: var(--grey5);\n}";
|
|
35078
|
+
var modules_98a80317 = {"root":"TimePicker_module_root__2dd24d9e","input":"TimePicker_module_input__2dd24d9e","colon":"TimePicker_module_colon__2dd24d9e","separator":"TimePicker_module_separator__2dd24d9e"};
|
|
34449
35079
|
n(css$x,{});
|
|
34450
35080
|
|
|
34451
|
-
var
|
|
34452
|
-
var
|
|
34453
|
-
|
|
34454
|
-
|
|
34455
|
-
|
|
34456
|
-
|
|
34457
|
-
|
|
34458
|
-
|
|
34459
|
-
|
|
34460
|
-
|
|
34461
|
-
|
|
34462
|
-
|
|
34463
|
-
|
|
34464
|
-
|
|
34465
|
-
|
|
34466
|
-
|
|
34467
|
-
|
|
34468
|
-
|
|
34469
|
-
|
|
34470
|
-
|
|
34471
|
-
|
|
34472
|
-
|
|
34473
|
-
isControlled = _useRef.current;
|
|
35081
|
+
var isValidUnit = function isValidUnit(_ref) {
|
|
35082
|
+
var type = _ref.type,
|
|
35083
|
+
value = _ref.value;
|
|
35084
|
+
if (type === 'hours') {
|
|
35085
|
+
if (value >= 0 && value < 13) {
|
|
35086
|
+
return true;
|
|
35087
|
+
}
|
|
35088
|
+
}
|
|
35089
|
+
if (value >= 0 && value < 60) {
|
|
35090
|
+
return true;
|
|
35091
|
+
}
|
|
35092
|
+
return false;
|
|
35093
|
+
};
|
|
35094
|
+
var isValidMeridian = function isValidMeridian(meridian) {
|
|
35095
|
+
if (meridian === 'AM' || meridian === 'PM' || meridian === 'A' || meridian === 'P') {
|
|
35096
|
+
return true;
|
|
35097
|
+
}
|
|
35098
|
+
return false;
|
|
35099
|
+
};
|
|
35100
|
+
var focusInput = function focusInput(ref) {
|
|
35101
|
+
return ref === null || ref === void 0 ? void 0 : ref.current.focus();
|
|
35102
|
+
};
|
|
34474
35103
|
|
|
34475
|
-
|
|
34476
|
-
var
|
|
35104
|
+
var TimePicker = function TimePicker(props) {
|
|
35105
|
+
var className = props.className;
|
|
35106
|
+
var today = getDayInfo(new Date());
|
|
35107
|
+
var refs = {
|
|
35108
|
+
hours: React.useRef(),
|
|
35109
|
+
minutes: React.useRef(),
|
|
35110
|
+
seconds: React.useRef(),
|
|
35111
|
+
meridian: React.useRef()
|
|
35112
|
+
};
|
|
35113
|
+
var _useState = React.useState({
|
|
35114
|
+
hours: doubleDigitted(today.hours),
|
|
35115
|
+
minutes: doubleDigitted(today.minutes),
|
|
35116
|
+
seconds: doubleDigitted(today.seconds),
|
|
35117
|
+
meridian: today.meridian
|
|
35118
|
+
}),
|
|
34477
35119
|
_useState2 = _slicedToArray(_useState, 2),
|
|
34478
|
-
|
|
34479
|
-
|
|
34480
|
-
var
|
|
34481
|
-
|
|
34482
|
-
|
|
34483
|
-
|
|
34484
|
-
|
|
34485
|
-
|
|
34486
|
-
|
|
35120
|
+
timePickerValue = _useState2[0],
|
|
35121
|
+
setTimePickerValue = _useState2[1];
|
|
35122
|
+
var hours = timePickerValue.hours,
|
|
35123
|
+
minutes = timePickerValue.minutes,
|
|
35124
|
+
seconds = timePickerValue.seconds,
|
|
35125
|
+
meridian = timePickerValue.meridian;
|
|
35126
|
+
React.useEffect(function () {
|
|
35127
|
+
if (props.value) {
|
|
35128
|
+
setTimePickerValue(props.value);
|
|
35129
|
+
}
|
|
35130
|
+
}, []);
|
|
35131
|
+
React.useEffect(function () {
|
|
35132
|
+
props.onChange(timePickerValue);
|
|
35133
|
+
}, [timePickerValue]);
|
|
35134
|
+
var _onChange = function onChange(id, value, nextInput, focus) {
|
|
35135
|
+
if (value.length <= 2) {
|
|
35136
|
+
setTimePickerValue(_objectSpread2(_objectSpread2({}, timePickerValue), {}, _defineProperty$1({}, id, value)));
|
|
35137
|
+
if (focus && value && value.length === 2) {
|
|
35138
|
+
focusInput(nextInput);
|
|
35139
|
+
}
|
|
35140
|
+
}
|
|
35141
|
+
};
|
|
35142
|
+
var onBlur = function onBlur(event) {
|
|
35143
|
+
var target = event.target;
|
|
35144
|
+
var id = target.id,
|
|
35145
|
+
value = target.value;
|
|
35146
|
+
if (id !== 'meridian' && !Number(value) > 0) {
|
|
35147
|
+
setTimePickerValue(_objectSpread2(_objectSpread2({}, timePickerValue), {}, _defineProperty$1({}, id, '01')));
|
|
35148
|
+
return;
|
|
35149
|
+
}
|
|
35150
|
+
if (id === 'meridian' && !['AM', 'PM'].includes(value)) {
|
|
35151
|
+
setTimePickerValue(_objectSpread2(_objectSpread2({}, timePickerValue), {}, _defineProperty$1({}, id, 'AM')));
|
|
35152
|
+
return;
|
|
35153
|
+
}
|
|
35154
|
+
setTimePickerValue(_objectSpread2(_objectSpread2({}, timePickerValue), {}, _defineProperty$1({}, id, doubleDigitted(value))));
|
|
35155
|
+
};
|
|
35156
|
+
var _onKeyDown = function onKeyDown(event) {
|
|
35157
|
+
var keyCode = event.keyCode,
|
|
35158
|
+
target = event.target;
|
|
35159
|
+
var id = target.id,
|
|
35160
|
+
value = target.value;
|
|
35161
|
+
if (id === 'meridian' && keyCode === 40 || keyCode === 38) {
|
|
35162
|
+
setTimePickerValue(_objectSpread2(_objectSpread2({}, timePickerValue), {}, _defineProperty$1({}, id, value === 'PM' ? 'AM' : 'PM')));
|
|
34487
35163
|
}
|
|
34488
35164
|
};
|
|
34489
|
-
var inputValue = isControlled ? value !== null && value !== void 0 ? value : '' : uncontrolledValue;
|
|
34490
|
-
var Input = /*#__PURE__*/React.createElement(type === 'textarea' ? 'textarea' : 'input', _objectSpread2({
|
|
34491
|
-
id: id,
|
|
34492
|
-
name: name,
|
|
34493
|
-
disabled: disabled,
|
|
34494
|
-
type: type,
|
|
34495
|
-
defaultValue: defaultValue,
|
|
34496
|
-
placeholder: placeholder,
|
|
34497
|
-
onBlur: onBlur,
|
|
34498
|
-
'data-elem': 'input',
|
|
34499
|
-
ref: inputRef,
|
|
34500
|
-
value: inputValue,
|
|
34501
|
-
onChange: handleChange,
|
|
34502
|
-
className: classes(modules_c1d23762[size], modules_c1d23762.input)
|
|
34503
|
-
}, inputProps));
|
|
34504
35165
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
34505
|
-
className: classes(
|
|
34506
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
34507
|
-
|
|
34508
|
-
|
|
34509
|
-
|
|
34510
|
-
|
|
34511
|
-
|
|
34512
|
-
|
|
34513
|
-
|
|
34514
|
-
|
|
34515
|
-
|
|
34516
|
-
|
|
34517
|
-
|
|
34518
|
-
|
|
34519
|
-
|
|
34520
|
-
|
|
34521
|
-
|
|
34522
|
-
|
|
34523
|
-
|
|
35166
|
+
className: classes(modules_98a80317.root, className),
|
|
35167
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(TextField, {
|
|
35168
|
+
className: modules_98a80317.input,
|
|
35169
|
+
placeholder: "00",
|
|
35170
|
+
value: hours,
|
|
35171
|
+
ref: refs.hours,
|
|
35172
|
+
type: "number",
|
|
35173
|
+
onBlur: onBlur,
|
|
35174
|
+
id: "hours",
|
|
35175
|
+
onChange: function onChange(event) {
|
|
35176
|
+
var target = event.target,
|
|
35177
|
+
nativeEvent = event.nativeEvent;
|
|
35178
|
+
var id = target.id,
|
|
35179
|
+
value = target.value;
|
|
35180
|
+
if (isValidUnit({
|
|
35181
|
+
type: 'hours',
|
|
35182
|
+
value: value
|
|
35183
|
+
})) {
|
|
35184
|
+
_onChange(id, value, refs.minutes, nativeEvent.data);
|
|
35185
|
+
}
|
|
35186
|
+
}
|
|
35187
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
35188
|
+
className: modules_98a80317.colon,
|
|
35189
|
+
children: ":"
|
|
35190
|
+
}), /*#__PURE__*/jsxRuntime.jsx(TextField, {
|
|
35191
|
+
className: modules_98a80317.input,
|
|
35192
|
+
placeholder: "00",
|
|
35193
|
+
value: minutes,
|
|
35194
|
+
id: "minutes",
|
|
35195
|
+
onBlur: onBlur,
|
|
35196
|
+
ref: refs.minutes,
|
|
35197
|
+
type: "number",
|
|
35198
|
+
onChange: function onChange(event) {
|
|
35199
|
+
var target = event.target,
|
|
35200
|
+
nativeEvent = event.nativeEvent;
|
|
35201
|
+
var id = target.id,
|
|
35202
|
+
value = target.value;
|
|
35203
|
+
if (isValidUnit({
|
|
35204
|
+
type: 'minutes',
|
|
35205
|
+
value: value
|
|
35206
|
+
})) {
|
|
35207
|
+
_onChange(id, value, refs.seconds, nativeEvent.data);
|
|
35208
|
+
}
|
|
35209
|
+
}
|
|
35210
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
35211
|
+
className: modules_98a80317.colon,
|
|
35212
|
+
children: ":"
|
|
35213
|
+
}), /*#__PURE__*/jsxRuntime.jsx(TextField, {
|
|
35214
|
+
className: modules_98a80317.input,
|
|
35215
|
+
placeholder: "00",
|
|
35216
|
+
type: "number",
|
|
35217
|
+
value: seconds,
|
|
35218
|
+
ref: refs.seconds,
|
|
35219
|
+
onBlur: onBlur,
|
|
35220
|
+
id: "seconds",
|
|
35221
|
+
onChange: function onChange(event) {
|
|
35222
|
+
var target = event.target,
|
|
35223
|
+
nativeEvent = event.nativeEvent;
|
|
35224
|
+
var id = target.id,
|
|
35225
|
+
value = target.value;
|
|
35226
|
+
if (isValidUnit({
|
|
35227
|
+
type: 'seconds',
|
|
35228
|
+
value: value
|
|
35229
|
+
})) {
|
|
35230
|
+
_onChange(id, value, refs.meridian, nativeEvent.data);
|
|
35231
|
+
}
|
|
35232
|
+
}
|
|
35233
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
35234
|
+
className: modules_98a80317.separator,
|
|
35235
|
+
children: "|"
|
|
35236
|
+
}), /*#__PURE__*/jsxRuntime.jsx(TextField, {
|
|
35237
|
+
className: modules_98a80317.input,
|
|
35238
|
+
placeholder: "--",
|
|
35239
|
+
value: meridian,
|
|
35240
|
+
onBlur: onBlur,
|
|
35241
|
+
ref: refs.meridian,
|
|
35242
|
+
id: "meridian",
|
|
35243
|
+
onKeyDown: function onKeyDown(e) {
|
|
35244
|
+
_onKeyDown(e);
|
|
35245
|
+
},
|
|
35246
|
+
onChange: function onChange(event) {
|
|
35247
|
+
var target = event.target;
|
|
35248
|
+
var id = target.id,
|
|
35249
|
+
value = target.value;
|
|
35250
|
+
if (!value || isValidMeridian(value.toUpperCase())) {
|
|
35251
|
+
_onChange(id, value.toUpperCase());
|
|
35252
|
+
}
|
|
35253
|
+
}
|
|
34524
35254
|
})]
|
|
34525
35255
|
});
|
|
34526
|
-
}
|
|
34527
|
-
|
|
34528
|
-
|
|
34529
|
-
name: propTypes$1.exports.string,
|
|
34530
|
-
disabled: propTypes$1.exports.bool,
|
|
34531
|
-
label: propTypes$1.exports.oneOfType([propTypes$1.exports.string, propTypes$1.exports.number]),
|
|
34532
|
-
placeholder: propTypes$1.exports.oneOfType([propTypes$1.exports.string, propTypes$1.exports.number]),
|
|
34533
|
-
type: propTypes$1.exports.oneOf(['text', 'email', 'password', 'number', 'textarea']),
|
|
34534
|
-
value: propTypes$1.exports.oneOfType([propTypes$1.exports.string, propTypes$1.exports.number]),
|
|
34535
|
-
defaultValue: propTypes$1.exports.string,
|
|
35256
|
+
};
|
|
35257
|
+
TimePicker.propTypes = {
|
|
35258
|
+
className: propTypes$1.exports.string,
|
|
34536
35259
|
onChange: propTypes$1.exports.func,
|
|
34537
|
-
|
|
34538
|
-
|
|
34539
|
-
|
|
34540
|
-
|
|
34541
|
-
|
|
34542
|
-
|
|
34543
|
-
count: propTypes$1.exports.shape({
|
|
34544
|
-
limit: propTypes$1.exports.number
|
|
34545
|
-
}),
|
|
34546
|
-
feedback: propTypes$1.exports.shape({
|
|
34547
|
-
text: propTypes$1.exports.node,
|
|
34548
|
-
type: propTypes$1.exports.oneOf(['error', 'success', 'default'])
|
|
34549
|
-
}),
|
|
34550
|
-
feedbackAndCount: propTypes$1.exports.bool
|
|
35260
|
+
value: propTypes$1.exports.shape({
|
|
35261
|
+
hours: propTypes$1.exports.string,
|
|
35262
|
+
minutes: propTypes$1.exports.string,
|
|
35263
|
+
seconds: propTypes$1.exports.string,
|
|
35264
|
+
meridian: propTypes$1.exports.string
|
|
35265
|
+
})
|
|
34551
35266
|
};
|
|
34552
|
-
|
|
34553
|
-
|
|
34554
|
-
name: null,
|
|
34555
|
-
disabled: false,
|
|
34556
|
-
label: '',
|
|
34557
|
-
placeholder: '',
|
|
34558
|
-
type: 'text',
|
|
34559
|
-
value: undefined,
|
|
34560
|
-
defaultValue: '',
|
|
35267
|
+
TimePicker.defaultProps = {
|
|
35268
|
+
className: '',
|
|
34561
35269
|
onChange: function onChange() {},
|
|
34562
|
-
|
|
34563
|
-
border: 'default',
|
|
34564
|
-
LeftComponent: null,
|
|
34565
|
-
RightComponent: null,
|
|
34566
|
-
inputProps: {},
|
|
34567
|
-
count: null,
|
|
34568
|
-
feedback: null,
|
|
34569
|
-
feedbackAndCount: false
|
|
35270
|
+
value: null
|
|
34570
35271
|
};
|
|
34571
35272
|
|
|
34572
|
-
var css$w = "
|
|
34573
|
-
var
|
|
35273
|
+
var css$w = ".Footer_module_root__0e6d72de {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: stretch;\n margin-inline: 1rem;\n}\n.Footer_module_root__0e6d72de .Footer_module_apply__0e6d72de {\n margin-top: 0.5rem;\n width: 100%;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.Footer_module_root__0e6d72de .Footer_module_timePicker__0e6d72de {\n margin-bottom: 1.25rem;\n}\n\n.Footer_module_selectedDate__0e6d72de {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n gap: 1.125rem;\n background: var(--white);\n border: 0.0625rem solid var(--grey4);\n border-radius: 0.25rem;\n}\n.Footer_module_selectedDate__0e6d72de .Footer_module_date__0e6d72de {\n font-weight: 500;\n font-size: 0.875rem;\n line-height: 1.3125rem;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n}\n.Footer_module_selectedDate__0e6d72de .Footer_module_date__0e6d72de .Footer_module_cross__0e6d72de {\n width: 1.5rem;\n height: 1.5rem;\n}\n.Footer_module_selectedDate__0e6d72de .Footer_module_date__0e6d72de .Footer_module_value__0e6d72de {\n font-weight: 400;\n padding-right: 0.7rem;\n border-right: 1px var(--grey3) solid;\n}\n\n.Footer_module_dateRanges__0e6d72de {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: stretch;\n margin-top: 0.5rem;\n}\n.Footer_module_dateRanges__0e6d72de .Footer_module_dateRange__0e6d72de {\n display: flex;\n align-items: center;\n padding: 0.875rem 1rem;\n gap: 1.125rem;\n cursor: pointer;\n}\n.Footer_module_dateRanges__0e6d72de .Footer_module_dateRange__0e6d72de:hover {\n background-color: var(--background);\n}\n.Footer_module_dateRanges__0e6d72de .Footer_module_dateRange__0e6d72de span {\n font-weight: 400;\n font-size: 0.875rem;\n line-height: 1.3125rem;\n color: var(--black);\n}\n.Footer_module_dateRanges__0e6d72de .Footer_module_selected__0e6d72de {\n background-color: var(--background);\n}";
|
|
35274
|
+
var modules_b490bd5d = {"root":"Footer_module_root__0e6d72de","apply":"Footer_module_apply__0e6d72de","time-picker":"Footer_module_timePicker__0e6d72de","selected-date":"Footer_module_selectedDate__0e6d72de","date":"Footer_module_date__0e6d72de","cross":"Footer_module_cross__0e6d72de","value":"Footer_module_value__0e6d72de","date-ranges":"Footer_module_dateRanges__0e6d72de","date-range":"Footer_module_dateRange__0e6d72de","selected":"Footer_module_selected__0e6d72de"};
|
|
34574
35275
|
n(css$w,{});
|
|
34575
35276
|
|
|
34576
|
-
var
|
|
34577
|
-
|
|
34578
|
-
|
|
34579
|
-
|
|
34580
|
-
|
|
34581
|
-
|
|
34582
|
-
|
|
34583
|
-
|
|
34584
|
-
|
|
34585
|
-
|
|
34586
|
-
|
|
34587
|
-
|
|
35277
|
+
var getDateAndUnixRange = function getDateAndUnixRange(duration) {
|
|
35278
|
+
var startingDate = sub$1(new Date(), duration);
|
|
35279
|
+
startingDate.setHours(0, 0, 0, 0);
|
|
35280
|
+
var endingDate = new Date();
|
|
35281
|
+
endingDate.setHours(0, 0, 0, 0);
|
|
35282
|
+
var dates = ["".concat(startingDate.getDate(), " ").concat(MONTHS[startingDate.getMonth()].substring(0, 3), " ").concat(startingDate.getFullYear()), "".concat(endingDate.getDate(), " ").concat(MONTHS[endingDate.getMonth()].substring(0, 3), " ").concat(endingDate.getFullYear())];
|
|
35283
|
+
var unix = [getUnixTime(startingDate), getUnixTime(endingDate)];
|
|
35284
|
+
return {
|
|
35285
|
+
dates: dates,
|
|
35286
|
+
unix: unix
|
|
35287
|
+
};
|
|
35288
|
+
};
|
|
35289
|
+
var dateRanges = [{
|
|
35290
|
+
title: '7 Days',
|
|
35291
|
+
dateRange: getDateAndUnixRange({
|
|
35292
|
+
days: 7
|
|
35293
|
+
})
|
|
35294
|
+
}, {
|
|
35295
|
+
title: '15 Days',
|
|
35296
|
+
dateRange: getDateAndUnixRange({
|
|
35297
|
+
days: 15
|
|
35298
|
+
})
|
|
35299
|
+
}, {
|
|
35300
|
+
title: '1 Month',
|
|
35301
|
+
dateRange: getDateAndUnixRange({
|
|
35302
|
+
months: 1
|
|
35303
|
+
})
|
|
35304
|
+
}];
|
|
34588
35305
|
|
|
34589
|
-
|
|
34590
|
-
var
|
|
35306
|
+
var SelectedDateView = function SelectedDateView(props) {
|
|
35307
|
+
var value = props.value,
|
|
35308
|
+
action = props.action,
|
|
35309
|
+
Icon = props.icon;
|
|
35310
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
35311
|
+
className: modules_b490bd5d['selected-date'],
|
|
35312
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Calender$1, {}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
35313
|
+
className: modules_b490bd5d.date,
|
|
35314
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
35315
|
+
className: classes(modules_b490bd5d.value),
|
|
35316
|
+
children: value
|
|
35317
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
35318
|
+
size: "auto",
|
|
35319
|
+
variant: "text",
|
|
35320
|
+
onClick: action,
|
|
35321
|
+
leftComponent: Icon
|
|
35322
|
+
})]
|
|
35323
|
+
})]
|
|
35324
|
+
});
|
|
35325
|
+
};
|
|
35326
|
+
var Footer = function Footer(props) {
|
|
35327
|
+
var _props$selectedDate = props.selectedDate,
|
|
35328
|
+
selectedDate = _props$selectedDate === void 0 ? {} : _props$selectedDate,
|
|
35329
|
+
_props$selectedRange = props.selectedRange,
|
|
35330
|
+
selectedRange = _props$selectedRange === void 0 ? {} : _props$selectedRange,
|
|
35331
|
+
setSelectedDate = props.setSelectedDate,
|
|
35332
|
+
setSelectedRange = props.setSelectedRange,
|
|
35333
|
+
range = props.range,
|
|
35334
|
+
goToDate = props.goToDate,
|
|
35335
|
+
onApply = props.onApply;
|
|
35336
|
+
var date = selectedDate.date,
|
|
35337
|
+
month = selectedDate.month,
|
|
35338
|
+
year = selectedDate.year;
|
|
35339
|
+
var _selectedRange$dates = selectedRange.dates,
|
|
35340
|
+
dates = _selectedRange$dates === void 0 ? [] : _selectedRange$dates;
|
|
35341
|
+
var monthInShort = month === null || month === void 0 ? void 0 : month.substr(0, 3);
|
|
35342
|
+
var datesSelected = date || dates.length === 2;
|
|
35343
|
+
var selectFixedDateRange = function selectFixedDateRange(dateRange) {
|
|
35344
|
+
setSelectedRange(dateRange);
|
|
35345
|
+
};
|
|
35346
|
+
var resetDate = function resetDate() {
|
|
35347
|
+
goToDate(getUnixTime(new Date()));
|
|
35348
|
+
};
|
|
35349
|
+
var clearRangeSelection = function clearRangeSelection() {
|
|
35350
|
+
setSelectedRange({});
|
|
35351
|
+
};
|
|
35352
|
+
var onTimeChange = function onTimeChange(time) {
|
|
35353
|
+
var monthNumber = fromUnixTime(selectedDate.unix).getMonth();
|
|
35354
|
+
var unix = getUnixTime(new Date(selectedDate.year, monthNumber, selectedDate.date, time.hours, time.minutes, time.seconds));
|
|
35355
|
+
setSelectedDate(_objectSpread2(_objectSpread2({}, selectedDate), {}, {
|
|
35356
|
+
unix: unix
|
|
35357
|
+
}));
|
|
35358
|
+
};
|
|
35359
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
35360
|
+
className: modules_b490bd5d.root,
|
|
35361
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(TimePicker, {
|
|
35362
|
+
onChange: onTimeChange,
|
|
35363
|
+
className: modules_b490bd5d['time-picker']
|
|
35364
|
+
}), datesSelected && (dates === null || dates === void 0 ? void 0 : dates.length) === 2 ? /*#__PURE__*/jsxRuntime.jsx(SelectedDateView, {
|
|
35365
|
+
range: true,
|
|
35366
|
+
value: "".concat(selectedRange.dates[0], " - ").concat(selectedRange.dates[1]),
|
|
35367
|
+
icon: function icon() {
|
|
35368
|
+
return /*#__PURE__*/jsxRuntime.jsx(Cross$1, {
|
|
35369
|
+
className: modules_b490bd5d.cross
|
|
35370
|
+
});
|
|
35371
|
+
},
|
|
35372
|
+
action: clearRangeSelection
|
|
35373
|
+
}) : datesSelected && /*#__PURE__*/jsxRuntime.jsx(SelectedDateView, {
|
|
35374
|
+
value: "".concat(doubleDigitted(date), " ").concat(monthInShort, " ").concat(year),
|
|
35375
|
+
icon: function icon() {
|
|
35376
|
+
return /*#__PURE__*/jsxRuntime.jsx(Reset, {});
|
|
35377
|
+
},
|
|
35378
|
+
action: resetDate
|
|
35379
|
+
}), range && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
35380
|
+
className: modules_b490bd5d['date-ranges'],
|
|
35381
|
+
children: dateRanges.map(function (_ref) {
|
|
35382
|
+
var _selectedRange$unix;
|
|
35383
|
+
var dateRange = _ref.dateRange,
|
|
35384
|
+
title = _ref.title;
|
|
35385
|
+
var selectedFixedDateRange = dateRange.unix.toString() === ((_selectedRange$unix = selectedRange.unix) === null || _selectedRange$unix === void 0 ? void 0 : _selectedRange$unix.toString());
|
|
35386
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
35387
|
+
className: classes(modules_b490bd5d['date-range'], selectedFixedDateRange ? modules_b490bd5d.selected : ''),
|
|
35388
|
+
onClick: function onClick() {
|
|
35389
|
+
selectFixedDateRange(dateRange);
|
|
35390
|
+
},
|
|
35391
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(HalfShade, {}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
35392
|
+
children: title
|
|
35393
|
+
})]
|
|
35394
|
+
}, title);
|
|
35395
|
+
})
|
|
35396
|
+
}), datesSelected && /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
35397
|
+
onClick: onApply,
|
|
35398
|
+
title: "Apply",
|
|
35399
|
+
className: modules_b490bd5d.apply
|
|
35400
|
+
})]
|
|
35401
|
+
});
|
|
35402
|
+
};
|
|
35403
|
+
|
|
35404
|
+
var Calender = function Calender(props) {
|
|
35405
|
+
var range = props.range,
|
|
35406
|
+
selectedDate = props.selectedDate,
|
|
35407
|
+
setSelectedDate = props.setSelectedDate,
|
|
35408
|
+
selectedRange = props.selectedRange,
|
|
35409
|
+
setSelectedRange = props.setSelectedRange,
|
|
35410
|
+
onApply = props.onApply,
|
|
35411
|
+
disabledDates = props.disabledDates,
|
|
35412
|
+
disableDatesBefore = props.disableDatesBefore,
|
|
35413
|
+
value = props.value;
|
|
35414
|
+
var _getDayInfo = getDayInfo(new Date()),
|
|
35415
|
+
month = _getDayInfo.month,
|
|
35416
|
+
year = _getDayInfo.year,
|
|
35417
|
+
monthAsNumber = _getDayInfo.monthAsNumber,
|
|
35418
|
+
dayAsNumber = _getDayInfo.dayAsNumber;
|
|
35419
|
+
var _useState = React.useState({
|
|
35420
|
+
month: month,
|
|
35421
|
+
monthAsNumber: monthAsNumber,
|
|
35422
|
+
year: year,
|
|
35423
|
+
dayAsNumber: dayAsNumber
|
|
35424
|
+
}),
|
|
34591
35425
|
_useState2 = _slicedToArray(_useState, 2),
|
|
34592
|
-
|
|
34593
|
-
|
|
34594
|
-
|
|
34595
|
-
|
|
34596
|
-
|
|
34597
|
-
|
|
34598
|
-
|
|
34599
|
-
|
|
34600
|
-
|
|
35426
|
+
selectedMonth = _useState2[0],
|
|
35427
|
+
setSelectedMonth = _useState2[1];
|
|
35428
|
+
React.useEffect(function () {
|
|
35429
|
+
if (value) {
|
|
35430
|
+
var _date = fromUnixTime(value);
|
|
35431
|
+
var dateAsNumber = _date.getDate();
|
|
35432
|
+
var selectedDayInfo = getDayInfo(_date);
|
|
35433
|
+
var selectedDateMonth = {
|
|
35434
|
+
month: selectedDayInfo.month,
|
|
35435
|
+
monthAsNumber: selectedDayInfo.monthAsNumber,
|
|
35436
|
+
year: selectedDayInfo.year,
|
|
35437
|
+
dayAsNumber: selectedDayInfo.dayAsNumber
|
|
35438
|
+
};
|
|
35439
|
+
setSelectedMonth({
|
|
35440
|
+
month: selectedDayInfo.month,
|
|
35441
|
+
monthAsNumber: selectedDayInfo.monthAsNumber,
|
|
35442
|
+
year: selectedDayInfo.year
|
|
35443
|
+
});
|
|
35444
|
+
setSelectedDate(_objectSpread2(_objectSpread2({}, selectedDate), {}, {
|
|
35445
|
+
month: selectedDateMonth.month,
|
|
35446
|
+
year: selectedDateMonth.year,
|
|
35447
|
+
date: dateAsNumber,
|
|
35448
|
+
unix: getUnixTime(_date.setHours(23, 59, 59, 59))
|
|
35449
|
+
}));
|
|
35450
|
+
return;
|
|
35451
|
+
}
|
|
35452
|
+
var date = new Date();
|
|
35453
|
+
if (!range && !isBefore(date, disableDatesBefore)) {
|
|
35454
|
+
var _dateAsNumber = date.getDate();
|
|
35455
|
+
setSelectedDate(_objectSpread2(_objectSpread2({}, selectedDate), {}, {
|
|
35456
|
+
month: selectedMonth.month,
|
|
35457
|
+
year: selectedMonth.year,
|
|
35458
|
+
date: _dateAsNumber,
|
|
35459
|
+
unix: getUnixTime(date.setHours(23, 59, 59, 59))
|
|
35460
|
+
}));
|
|
34601
35461
|
}
|
|
35462
|
+
}, []);
|
|
35463
|
+
var goToDate = function goToDate(unix) {
|
|
35464
|
+
var dayInfo = getDayInfo(new Date(unix * 1000));
|
|
35465
|
+
setSelectedMonth({
|
|
35466
|
+
month: dayInfo.month,
|
|
35467
|
+
monthAsNumber: dayInfo.monthAsNumber,
|
|
35468
|
+
year: dayInfo.year
|
|
35469
|
+
});
|
|
35470
|
+
setSelectedDate(_objectSpread2(_objectSpread2({}, selectedDate), {}, {
|
|
35471
|
+
month: dayInfo.month,
|
|
35472
|
+
year: dayInfo.year,
|
|
35473
|
+
date: dayInfo.dateAsNumber,
|
|
35474
|
+
unix: getUnixTime(new Date(unix * 1000).setHours(23, 59, 59, 59))
|
|
35475
|
+
}));
|
|
34602
35476
|
};
|
|
34603
|
-
var
|
|
34604
|
-
|
|
34605
|
-
|
|
34606
|
-
|
|
34607
|
-
|
|
34608
|
-
|
|
34609
|
-
|
|
34610
|
-
|
|
34611
|
-
|
|
34612
|
-
|
|
34613
|
-
|
|
34614
|
-
|
|
34615
|
-
|
|
34616
|
-
|
|
34617
|
-
|
|
34618
|
-
|
|
34619
|
-
|
|
34620
|
-
|
|
34621
|
-
|
|
34622
|
-
|
|
35477
|
+
var onMonthChange = function onMonthChange(switchSide) {
|
|
35478
|
+
if (switchSide === 'prev') {
|
|
35479
|
+
if (selectedMonth.monthAsNumber === 0) {
|
|
35480
|
+
var _previousMonth = FULL_MONTHS[11];
|
|
35481
|
+
setSelectedMonth({
|
|
35482
|
+
month: _previousMonth,
|
|
35483
|
+
monthAsNumber: 11,
|
|
35484
|
+
year: selectedMonth.year - 1
|
|
35485
|
+
});
|
|
35486
|
+
return;
|
|
35487
|
+
}
|
|
35488
|
+
var previousMonthNumber = selectedMonth.monthAsNumber - 1;
|
|
35489
|
+
var previousMonth = FULL_MONTHS[previousMonthNumber];
|
|
35490
|
+
setSelectedMonth({
|
|
35491
|
+
month: previousMonth,
|
|
35492
|
+
monthAsNumber: previousMonthNumber,
|
|
35493
|
+
year: selectedMonth.year
|
|
35494
|
+
});
|
|
35495
|
+
return;
|
|
35496
|
+
}
|
|
35497
|
+
if (switchSide === 'next') {
|
|
35498
|
+
if (selectedMonth.monthAsNumber === 11) {
|
|
35499
|
+
var _nextMonth = FULL_MONTHS[0];
|
|
35500
|
+
setSelectedMonth({
|
|
35501
|
+
month: _nextMonth,
|
|
35502
|
+
monthAsNumber: 0,
|
|
35503
|
+
year: selectedMonth.year + 1
|
|
35504
|
+
});
|
|
35505
|
+
return;
|
|
35506
|
+
}
|
|
35507
|
+
var nextMonthNumber = selectedMonth.monthAsNumber + 1;
|
|
35508
|
+
var nextMonth = FULL_MONTHS[nextMonthNumber];
|
|
35509
|
+
setSelectedMonth({
|
|
35510
|
+
month: nextMonth,
|
|
35511
|
+
monthAsNumber: nextMonthNumber,
|
|
35512
|
+
year: selectedMonth.year
|
|
35513
|
+
});
|
|
35514
|
+
}
|
|
35515
|
+
};
|
|
35516
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
35517
|
+
className: modules_3722b5cd.root,
|
|
35518
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Header, {
|
|
35519
|
+
selectedMonth: selectedMonth,
|
|
35520
|
+
onMonthChange: onMonthChange
|
|
35521
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Body, {
|
|
35522
|
+
selectedMonth: selectedMonth,
|
|
35523
|
+
range: range,
|
|
35524
|
+
selectedDate: selectedDate,
|
|
35525
|
+
setSelectedDate: setSelectedDate,
|
|
35526
|
+
selectedRange: selectedRange,
|
|
35527
|
+
setSelectedRange: setSelectedRange,
|
|
35528
|
+
disabledDates: disabledDates,
|
|
35529
|
+
disableDatesBefore: disableDatesBefore
|
|
35530
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Footer, {
|
|
35531
|
+
range: range,
|
|
35532
|
+
selectedDate: selectedDate,
|
|
35533
|
+
setSelectedDate: setSelectedDate,
|
|
35534
|
+
selectedRange: selectedRange,
|
|
35535
|
+
setSelectedRange: setSelectedRange,
|
|
35536
|
+
onApply: onApply,
|
|
35537
|
+
goToDate: goToDate
|
|
34623
35538
|
})]
|
|
34624
35539
|
});
|
|
34625
35540
|
};
|
|
34626
|
-
Checkbox.propTypes = {
|
|
34627
|
-
disabled: propTypes$1.exports.bool,
|
|
34628
|
-
label: propTypes$1.exports.string,
|
|
34629
|
-
defaultChecked: propTypes$1.exports.bool,
|
|
34630
|
-
checked: propTypes$1.exports.bool,
|
|
34631
|
-
position: propTypes$1.exports.oneOf(['left', 'right']),
|
|
34632
|
-
size: propTypes$1.exports.oneOf(['sm', 'md', 'lg']),
|
|
34633
|
-
onChange: propTypes$1.exports.func
|
|
34634
|
-
};
|
|
34635
|
-
Checkbox.defaultProps = {
|
|
34636
|
-
disabled: false,
|
|
34637
|
-
label: null,
|
|
34638
|
-
defaultChecked: false,
|
|
34639
|
-
checked: undefined,
|
|
34640
|
-
position: 'right',
|
|
34641
|
-
size: 'sm',
|
|
34642
|
-
onChange: function onChange() {}
|
|
34643
|
-
};
|
|
34644
35541
|
|
|
34645
|
-
var css$v = "
|
|
34646
|
-
var
|
|
35542
|
+
var css$v = ".DatePicker_module_root__eb13bcdd {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n gap: 0.5rem;\n max-width: 100%;\n overflow: visible;\n}\n.DatePicker_module_root__eb13bcdd .DatePicker_module_label__eb13bcdd {\n font-weight: 400;\n font-size: 0.75rem;\n}\n.DatePicker_module_root__eb13bcdd .DatePicker_module_label__eb13bcdd.DatePicker_module_light__eb13bcdd {\n color: var(--black);\n}\n.DatePicker_module_root__eb13bcdd .DatePicker_module_label__eb13bcdd.DatePicker_module_dark__eb13bcdd {\n color: var(--white);\n}\n.DatePicker_module_root__eb13bcdd .DatePicker_module_container__eb13bcdd {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n position: relative;\n background: transparent;\n border: 0.0625rem solid #d9d9d9;\n border-radius: 0.25rem;\n width: auto;\n border: 0.0625rem solid var(--grey5);\n padding: 0.75rem 1rem;\n cursor: pointer;\n}\n.DatePicker_module_root__eb13bcdd .DatePicker_module_container__eb13bcdd > div {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n font-size: 0px;\n letter-spacing: 0px;\n word-spacing: 0px;\n}\n.DatePicker_module_root__eb13bcdd .DatePicker_module_container__eb13bcdd .DatePicker_module_placeholder__eb13bcdd {\n font-weight: 400;\n font-size: 1rem;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n margin-left: 0.9375rem;\n color: var(--grey1);\n}\n.DatePicker_module_root__eb13bcdd .DatePicker_module_container__eb13bcdd .DatePicker_module_value__eb13bcdd {\n font-weight: 400;\n font-size: 1rem;\n margin-left: 0.9375rem;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n}\n.DatePicker_module_root__eb13bcdd .DatePicker_module_container__eb13bcdd .DatePicker_module_value__eb13bcdd.DatePicker_module_light__eb13bcdd {\n color: var(--black);\n}\n.DatePicker_module_root__eb13bcdd .DatePicker_module_container__eb13bcdd .DatePicker_module_value__eb13bcdd.DatePicker_module_dark__eb13bcdd {\n color: var(--white);\n}\n.DatePicker_module_root__eb13bcdd .DatePicker_module_container__eb13bcdd .DatePicker_module_value__eb13bcdd span {\n max-width: 150px;\n display: inline-block;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n font-weight: 500;\n}\n.DatePicker_module_root__eb13bcdd .DatePicker_module_container__eb13bcdd .DatePicker_module_input__eb13bcdd {\n display: none;\n}\n.DatePicker_module_root__eb13bcdd .DatePicker_module_container__eb13bcdd .DatePicker_module_icon__eb13bcdd {\n width: 1.25rem;\n height: 1.25rem;\n}\n.DatePicker_module_root__eb13bcdd .DatePicker_module_container__eb13bcdd .DatePicker_module_icon__eb13bcdd.DatePicker_module_light__eb13bcdd > path {\n fill: var(--dark-grey);\n}\n.DatePicker_module_root__eb13bcdd .DatePicker_module_container__eb13bcdd .DatePicker_module_icon__eb13bcdd.DatePicker_module_dark__eb13bcdd > path {\n fill: var(--white);\n}\n.DatePicker_module_root__eb13bcdd .DatePicker_module_container__eb13bcdd .DatePicker_module_down__eb13bcdd {\n transform: rotate(270deg);\n}\n.DatePicker_module_root__eb13bcdd .DatePicker_module_container__eb13bcdd .DatePicker_module_up__eb13bcdd {\n transform: rotate(90deg);\n}\n.DatePicker_module_root__eb13bcdd .DatePicker_module_disabled__eb13bcdd {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n position: relative;\n background: var(--grey10);\n border: 0.0625rem solid #d9d9d9;\n border-radius: 0.25rem;\n border: 0.0625rem solid var(--grey5);\n padding: 0.75rem 1rem;\n cursor: pointer;\n}\n.DatePicker_module_root__eb13bcdd .DatePicker_module_disabled__eb13bcdd .DatePicker_module_downArrow__eb13bcdd {\n transform: rotate(270deg);\n fill: var(--grey3);\n}\n.DatePicker_module_root__eb13bcdd .DatePicker_module_disabled__eb13bcdd .DatePicker_module_placeholder__eb13bcdd {\n font-weight: 400;\n font-size: 1rem;\n color: var(--grey3);\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.DatePicker_module_root__eb13bcdd.DatePicker_module_open__eb13bcdd {\n border-color: var(--highlight);\n}\n.DatePicker_module_root__eb13bcdd .DatePicker_module_error__eb13bcdd {\n border: 0.0938rem solid var(--error);\n}\n.DatePicker_module_root__eb13bcdd .DatePicker_module_errorText__eb13bcdd {\n font-weight: 400;\n font-size: 0.75rem;\n line-height: 0.9375rem;\n color: var(--error);\n}\n\n.DatePicker_module_popper__eb13bcdd {\n display: none;\n background: var(--white);\n border: 0.0625rem solid #d9d9d9;\n box-shadow: -2px -2px 4px rgba(166, 166, 166, 0.25), 2px 2px 4px rgba(166, 166, 166, 0.24);\n border-radius: 0.25rem;\n overflow: auto;\n}\n.DatePicker_module_popper__eb13bcdd.DatePicker_module_open__eb13bcdd {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n position: absolute;\n}";
|
|
35543
|
+
var modules_5b831cd1 = {"root":"DatePicker_module_root__eb13bcdd","label":"DatePicker_module_label__eb13bcdd","light":"DatePicker_module_light__eb13bcdd","dark":"DatePicker_module_dark__eb13bcdd","container":"DatePicker_module_container__eb13bcdd","placeholder":"DatePicker_module_placeholder__eb13bcdd","value":"DatePicker_module_value__eb13bcdd","input":"DatePicker_module_input__eb13bcdd","icon":"DatePicker_module_icon__eb13bcdd","down":"DatePicker_module_down__eb13bcdd","up":"DatePicker_module_up__eb13bcdd","disabled":"DatePicker_module_disabled__eb13bcdd","down-arrow":"DatePicker_module_downArrow__eb13bcdd","open":"DatePicker_module_open__eb13bcdd","error":"DatePicker_module_error__eb13bcdd","error-text":"DatePicker_module_errorText__eb13bcdd","popper":"DatePicker_module_popper__eb13bcdd"};
|
|
34647
35544
|
n(css$v,{});
|
|
34648
35545
|
|
|
34649
|
-
var
|
|
34650
|
-
|
|
34651
|
-
|
|
34652
|
-
|
|
34653
|
-
|
|
34654
|
-
|
|
34655
|
-
|
|
34656
|
-
|
|
34657
|
-
|
|
34658
|
-
|
|
34659
|
-
|
|
34660
|
-
|
|
34661
|
-
|
|
34662
|
-
|
|
34663
|
-
|
|
34664
|
-
|
|
34665
|
-
|
|
34666
|
-
|
|
34667
|
-
|
|
34668
|
-
|
|
34669
|
-
|
|
34670
|
-
if (isControlled) {
|
|
34671
|
-
onChange(event, fieldValue);
|
|
34672
|
-
} else {
|
|
34673
|
-
setUncontrolledChecked(fieldValue);
|
|
34674
|
-
}
|
|
34675
|
-
};
|
|
34676
|
-
var isChecked = isControlled ? checked : uncontrolledChecked;
|
|
34677
|
-
return /*#__PURE__*/jsxRuntime.jsxs("label", {
|
|
34678
|
-
className: classes(modules_3705961f.root, modules_3705961f["position-".concat(position)], className, disabled ? modules_3705961f.disabled : ''),
|
|
34679
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("input", {
|
|
34680
|
-
disabled: disabled,
|
|
34681
|
-
type: "radio",
|
|
34682
|
-
checked: isChecked,
|
|
34683
|
-
onChange: handleChange
|
|
34684
|
-
}), isChecked ? /*#__PURE__*/jsxRuntime.jsx(RadioIcon.Checked, {
|
|
34685
|
-
"data-elem": "icon",
|
|
34686
|
-
className: classes(modules_3705961f["icon-".concat(size)], modules_3705961f.icon)
|
|
34687
|
-
}) : /*#__PURE__*/jsxRuntime.jsx(RadioIcon.UnChecked, {
|
|
34688
|
-
"data-elem": "icon",
|
|
34689
|
-
className: classes(modules_3705961f["icon-".concat(size)], modules_3705961f.icon)
|
|
34690
|
-
}), label && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
34691
|
-
"data-elem": "label",
|
|
34692
|
-
children: label
|
|
34693
|
-
})]
|
|
34694
|
-
});
|
|
34695
|
-
};
|
|
34696
|
-
Radio.propTypes = {
|
|
34697
|
-
disabled: propTypes$1.exports.bool,
|
|
34698
|
-
label: propTypes$1.exports.string,
|
|
34699
|
-
checked: propTypes$1.exports.bool,
|
|
34700
|
-
defaultChecked: propTypes$1.exports.bool,
|
|
34701
|
-
position: propTypes$1.exports.oneOf(['left', 'right']),
|
|
34702
|
-
size: propTypes$1.exports.oneOf(['sm', 'md', 'lg']),
|
|
34703
|
-
onChange: propTypes$1.exports.func
|
|
34704
|
-
};
|
|
34705
|
-
Radio.defaultProps = {
|
|
34706
|
-
disabled: false,
|
|
34707
|
-
label: null,
|
|
34708
|
-
checked: undefined,
|
|
34709
|
-
defaultChecked: false,
|
|
34710
|
-
position: 'left',
|
|
34711
|
-
size: 'sm',
|
|
34712
|
-
onChange: function onChange() {}
|
|
35546
|
+
var isMaxRangeExceeded = function isMaxRangeExceeded(_ref) {
|
|
35547
|
+
var maxRange = _ref.maxRange,
|
|
35548
|
+
selectedRange = _ref.selectedRange;
|
|
35549
|
+
if (maxRange === null) {
|
|
35550
|
+
return false;
|
|
35551
|
+
}
|
|
35552
|
+
var value = maxRange.value,
|
|
35553
|
+
type = maxRange.type;
|
|
35554
|
+
var unix = selectedRange.unix;
|
|
35555
|
+
var _unix = _slicedToArray(unix, 2),
|
|
35556
|
+
firstDateInRange = _unix[0],
|
|
35557
|
+
secondDateInRange = _unix[1];
|
|
35558
|
+
var diffInMonth = differenceInMonths(fromUnixTime(secondDateInRange), fromUnixTime(firstDateInRange));
|
|
35559
|
+
var diffInDays = differenceInDays(fromUnixTime(secondDateInRange), fromUnixTime(firstDateInRange));
|
|
35560
|
+
if (type === 'months') {
|
|
35561
|
+
return diffInMonth <= value && diffInDays < value * 30;
|
|
35562
|
+
}
|
|
35563
|
+
if (type === 'days') {
|
|
35564
|
+
return diffInDays <= value;
|
|
35565
|
+
}
|
|
35566
|
+
return false;
|
|
34713
35567
|
};
|
|
34714
35568
|
|
|
34715
|
-
var
|
|
34716
|
-
var
|
|
34717
|
-
n(css$u,{});
|
|
34718
|
-
|
|
34719
|
-
var Dropdown = /*#__PURE__*/React.forwardRef(function Dropdown(props, inputRef) {
|
|
34720
|
-
var _selectedOptions$map, _ref2, _selectedOptions$;
|
|
34721
|
-
// eslint-disable-next-line object-curly-newline
|
|
34722
|
-
var className = props.className,
|
|
34723
|
-
popperClassName = props.popperClassName,
|
|
34724
|
-
value = props.value,
|
|
34725
|
-
onChange = props.onChange,
|
|
34726
|
-
onBlur = props.onBlur,
|
|
34727
|
-
children = props.children,
|
|
35569
|
+
var DatePicker = function DatePicker(props) {
|
|
35570
|
+
var placeholder = props.placeholder,
|
|
34728
35571
|
label = props.label,
|
|
34729
|
-
|
|
34730
|
-
|
|
35572
|
+
range = props.range,
|
|
35573
|
+
onApply = props.onApply,
|
|
35574
|
+
disabledDates = props.disabledDates,
|
|
35575
|
+
maxRange = props.maxRange,
|
|
35576
|
+
value = props.value,
|
|
34731
35577
|
disabled = props.disabled,
|
|
34732
|
-
|
|
34733
|
-
|
|
34734
|
-
|
|
34735
|
-
|
|
35578
|
+
className = props.className,
|
|
35579
|
+
disableDatesBefore = props.disableDatesBefore,
|
|
35580
|
+
theme = props.theme,
|
|
35581
|
+
onClear = props.onClear;
|
|
34736
35582
|
var _useState = React.useState(false),
|
|
34737
35583
|
_useState2 = _slicedToArray(_useState, 2),
|
|
34738
35584
|
open = _useState2[0],
|
|
34739
35585
|
setOpen = _useState2[1];
|
|
34740
|
-
var _useState3 = React.useState(
|
|
35586
|
+
var _useState3 = React.useState(function () {
|
|
35587
|
+
return {
|
|
35588
|
+
dates: [],
|
|
35589
|
+
unix: []
|
|
35590
|
+
};
|
|
35591
|
+
}),
|
|
34741
35592
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
34742
|
-
|
|
34743
|
-
|
|
34744
|
-
var _useState5 = React.useState(
|
|
35593
|
+
selectedRange = _useState4[0],
|
|
35594
|
+
setSelectedRange = _useState4[1];
|
|
35595
|
+
var _useState5 = React.useState(function () {
|
|
35596
|
+
return '';
|
|
35597
|
+
}),
|
|
34745
35598
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
34746
|
-
|
|
34747
|
-
|
|
34748
|
-
var
|
|
34749
|
-
|
|
34750
|
-
|
|
34751
|
-
|
|
34752
|
-
// for uncontrolled input
|
|
34753
|
-
var _useState7 = React.useState(value),
|
|
35599
|
+
selectedDate = _useState6[0],
|
|
35600
|
+
setSelectedDate = _useState6[1];
|
|
35601
|
+
var _useState7 = React.useState(function () {
|
|
35602
|
+
return '';
|
|
35603
|
+
}),
|
|
34754
35604
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
34755
|
-
|
|
34756
|
-
|
|
35605
|
+
error = _useState8[0],
|
|
35606
|
+
setError = _useState8[1];
|
|
35607
|
+
var datePickerRef = React.useRef();
|
|
35608
|
+
var sDate = fromUnixTime(value);
|
|
35609
|
+
var displayValue = '';
|
|
35610
|
+
if (!range && value) {
|
|
35611
|
+
var _sDate$getMonth$toStr;
|
|
35612
|
+
displayValue = " ".concat(sDate.getDate(), " ").concat(MONTHS[(_sDate$getMonth$toStr = sDate.getMonth().toString()) === null || _sDate$getMonth$toStr === void 0 ? void 0 : _sDate$getMonth$toStr.substring(0, 3)], " ").concat(sDate.getFullYear());
|
|
35613
|
+
}
|
|
34757
35614
|
var _useFloating = useFloating({
|
|
34758
35615
|
open: open,
|
|
34759
35616
|
onOpenChange: setOpen,
|
|
34760
35617
|
whileElementsMounted: autoUpdate,
|
|
34761
|
-
middleware: [
|
|
34762
|
-
padding: 8
|
|
34763
|
-
}), shift({
|
|
34764
|
-
padding: 8
|
|
34765
|
-
}), size({
|
|
35618
|
+
middleware: [size({
|
|
34766
35619
|
apply: function apply(_ref) {
|
|
34767
35620
|
var rects = _ref.rects,
|
|
34768
35621
|
availableHeight = _ref.availableHeight,
|
|
@@ -34774,6 +35627,10 @@ var Dropdown = /*#__PURE__*/React.forwardRef(function Dropdown(props, inputRef)
|
|
|
34774
35627
|
});
|
|
34775
35628
|
},
|
|
34776
35629
|
padding: 8
|
|
35630
|
+
}), offset(5), flip({
|
|
35631
|
+
padding: 8
|
|
35632
|
+
}), shift({
|
|
35633
|
+
padding: 8
|
|
34777
35634
|
})]
|
|
34778
35635
|
}),
|
|
34779
35636
|
x = _useFloating.x,
|
|
@@ -34782,406 +35639,356 @@ var Dropdown = /*#__PURE__*/React.forwardRef(function Dropdown(props, inputRef)
|
|
|
34782
35639
|
floating = _useFloating.floating,
|
|
34783
35640
|
strategy = _useFloating.strategy,
|
|
34784
35641
|
context = _useFloating.context;
|
|
35642
|
+
useOutsideClickListener(floating, function () {
|
|
35643
|
+
return setOpen(false);
|
|
35644
|
+
});
|
|
34785
35645
|
var _useInteractions = useInteractions([useClick(context, {
|
|
34786
35646
|
enabled: !disabled
|
|
34787
|
-
}), useRole(context, {
|
|
34788
|
-
role: 'listbox'
|
|
34789
|
-
}), useListNavigation(context, {
|
|
34790
|
-
listRef: listItemsRef,
|
|
34791
|
-
activeIndex: activeIndex,
|
|
34792
|
-
selectedIndex: selectedIndex,
|
|
34793
|
-
onNavigate: setActiveIndex
|
|
34794
35647
|
}), useDismiss(context)]),
|
|
34795
35648
|
getReferenceProps = _useInteractions.getReferenceProps,
|
|
34796
|
-
getFloatingProps = _useInteractions.getFloatingProps
|
|
34797
|
-
|
|
34798
|
-
|
|
34799
|
-
|
|
34800
|
-
|
|
34801
|
-
|
|
34802
|
-
|
|
34803
|
-
|
|
34804
|
-
var itemValue = child.props.value;
|
|
34805
|
-
var itemValueString = itemValue === null || itemValue === void 0 ? void 0 : (_itemValue$toString = itemValue.toString) === null || _itemValue$toString === void 0 ? void 0 : _itemValue$toString.call(itemValue);
|
|
34806
|
-
var index = event.currentTarget.getAttribute('data-index');
|
|
34807
|
-
|
|
34808
|
-
// to support form libraries which require name and value on the event
|
|
34809
|
-
var nativeEvent = event.nativeEvent || event;
|
|
34810
|
-
var clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);
|
|
34811
|
-
Object.defineProperty(clonedEvent, 'target', {
|
|
34812
|
-
writable: true,
|
|
34813
|
-
value: {
|
|
34814
|
-
value: itemValueString,
|
|
34815
|
-
name: name
|
|
34816
|
-
}
|
|
34817
|
-
});
|
|
34818
|
-
|
|
34819
|
-
// if (elem === 'dropdown-item') {
|
|
34820
|
-
setSelectedIndex(parseInt(index, 10));
|
|
34821
|
-
if (multi) {
|
|
34822
|
-
// eslint-disable-next-line no-lonely-if
|
|
34823
|
-
if (selected === true) {
|
|
34824
|
-
setUncontrolledValue(uncontrolledValue.filter(function (val) {
|
|
34825
|
-
return val !== itemValueString;
|
|
34826
|
-
}));
|
|
34827
|
-
} else {
|
|
34828
|
-
setUncontrolledValue([].concat(_toConsumableArray(uncontrolledValue !== null && uncontrolledValue !== void 0 ? uncontrolledValue : []), [itemValueString]));
|
|
34829
|
-
}
|
|
34830
|
-
setActiveIndex(parseInt(index, 10));
|
|
34831
|
-
} else {
|
|
34832
|
-
if (isControlled) {
|
|
34833
|
-
onChange(clonedEvent, itemValueString.toString());
|
|
34834
|
-
} else {
|
|
34835
|
-
setUncontrolledValue(itemValueString.toString());
|
|
34836
|
-
}
|
|
34837
|
-
setActiveIndex(null);
|
|
35649
|
+
getFloatingProps = _useInteractions.getFloatingProps;
|
|
35650
|
+
var apply = function apply() {
|
|
35651
|
+
if (selectedRange.dates.length === 2) {
|
|
35652
|
+
if (!isMaxRangeExceeded({
|
|
35653
|
+
maxRange: maxRange,
|
|
35654
|
+
selectedRange: selectedRange
|
|
35655
|
+
})) {
|
|
35656
|
+
setError('Invalid range of dates');
|
|
34838
35657
|
setOpen(false);
|
|
35658
|
+
return;
|
|
34839
35659
|
}
|
|
34840
|
-
|
|
34841
|
-
|
|
35660
|
+
setError('');
|
|
35661
|
+
onApply(selectedRange.unix);
|
|
35662
|
+
setOpen(false);
|
|
35663
|
+
} else {
|
|
35664
|
+
onApply(selectedDate.unix);
|
|
35665
|
+
setOpen(false);
|
|
35666
|
+
}
|
|
34842
35667
|
};
|
|
34843
|
-
|
|
34844
|
-
|
|
34845
|
-
|
|
34846
|
-
|
|
34847
|
-
|
|
34848
|
-
|
|
34849
|
-
|
|
34850
|
-
|
|
34851
|
-
}
|
|
35668
|
+
var calenderProps = {
|
|
35669
|
+
selectedDate: selectedDate,
|
|
35670
|
+
setSelectedDate: setSelectedDate,
|
|
35671
|
+
selectedRange: selectedRange,
|
|
35672
|
+
setSelectedRange: setSelectedRange,
|
|
35673
|
+
range: range,
|
|
35674
|
+
onApply: function onApply() {
|
|
35675
|
+
apply();
|
|
35676
|
+
},
|
|
35677
|
+
disabledDates: disabledDates,
|
|
35678
|
+
disableDatesBefore: disableDatesBefore,
|
|
35679
|
+
value: value
|
|
34852
35680
|
};
|
|
34853
|
-
|
|
34854
|
-
|
|
34855
|
-
|
|
34856
|
-
|
|
34857
|
-
|
|
34858
|
-
|
|
34859
|
-
|
|
34860
|
-
|
|
34861
|
-
|
|
34862
|
-
|
|
34863
|
-
}
|
|
34864
|
-
|
|
34865
|
-
|
|
34866
|
-
|
|
34867
|
-
|
|
34868
|
-
|
|
34869
|
-
|
|
34870
|
-
|
|
34871
|
-
|
|
34872
|
-
|
|
34873
|
-
|
|
34874
|
-
|
|
34875
|
-
|
|
34876
|
-
|
|
34877
|
-
|
|
34878
|
-
|
|
34879
|
-
|
|
34880
|
-
|
|
35681
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
35682
|
+
className: classes(modules_5b831cd1.root, className),
|
|
35683
|
+
ref: datePickerRef,
|
|
35684
|
+
children: [label && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
35685
|
+
className: classes(modules_5b831cd1.label, modules_5b831cd1[theme]),
|
|
35686
|
+
children: label
|
|
35687
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread2(_objectSpread2({
|
|
35688
|
+
"data-elem": "header",
|
|
35689
|
+
ref: reference,
|
|
35690
|
+
className: classes(modules_5b831cd1.container, disabled ? modules_5b831cd1.disabled : '', open ? modules_5b831cd1.open : '', error ? modules_5b831cd1.error : '', modules_5b831cd1[theme])
|
|
35691
|
+
}, getReferenceProps()), {}, {
|
|
35692
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
35693
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Calender$1, {
|
|
35694
|
+
className: classes(modules_5b831cd1.icon, modules_5b831cd1[theme])
|
|
35695
|
+
}), !displayValue && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
35696
|
+
className: classes(modules_5b831cd1.placeholder, modules_5b831cd1[theme]),
|
|
35697
|
+
children: placeholder
|
|
35698
|
+
}), displayValue && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
35699
|
+
className: classes(modules_5b831cd1.value, modules_5b831cd1[theme]),
|
|
35700
|
+
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
35701
|
+
children: displayValue
|
|
35702
|
+
})
|
|
35703
|
+
})]
|
|
35704
|
+
}), /*#__PURE__*/jsxRuntime.jsx("input", {
|
|
35705
|
+
className: modules_5b831cd1.input,
|
|
35706
|
+
value: displayValue
|
|
35707
|
+
}), value ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
35708
|
+
onClick: function onClick(event) {
|
|
35709
|
+
event.stopPropagation();
|
|
35710
|
+
onClear();
|
|
35711
|
+
},
|
|
35712
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Cross$1, {
|
|
35713
|
+
className: classes(modules_5b831cd1.icon, modules_5b831cd1[theme])
|
|
35714
|
+
})
|
|
35715
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(Chevron, {
|
|
35716
|
+
className: classes(modules_5b831cd1.icon, modules_5b831cd1[theme]),
|
|
35717
|
+
position: open ? 'bottom' : 'top'
|
|
35718
|
+
})]
|
|
35719
|
+
})), error && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
35720
|
+
className: modules_5b831cd1['error-text'],
|
|
35721
|
+
children: error
|
|
35722
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Popper, {
|
|
35723
|
+
open: open,
|
|
35724
|
+
wrapperid: "datePicker-popper",
|
|
35725
|
+
children: open && /*#__PURE__*/jsxRuntime.jsx("div", _objectSpread2(_objectSpread2({}, getFloatingProps({
|
|
35726
|
+
role: 'group',
|
|
35727
|
+
ref: floating,
|
|
35728
|
+
onKeyDown: function onKeyDown(event) {
|
|
35729
|
+
if (event.key === 'Tab') {
|
|
35730
|
+
setOpen(false);
|
|
35731
|
+
}
|
|
35732
|
+
},
|
|
35733
|
+
style: {
|
|
35734
|
+
position: strategy,
|
|
35735
|
+
top: y !== null && y !== void 0 ? y : 0,
|
|
35736
|
+
left: x !== null && x !== void 0 ? x : 0
|
|
34881
35737
|
}
|
|
34882
|
-
})
|
|
34883
|
-
|
|
34884
|
-
|
|
34885
|
-
|
|
34886
|
-
|
|
34887
|
-
var _child$props6;
|
|
34888
|
-
var selected = false;
|
|
34889
|
-
if (selectedOptions.findIndex(function (option) {
|
|
34890
|
-
var _child$props5, _child$props5$value, _child$props5$value$t;
|
|
34891
|
-
return option.value === (child === null || child === void 0 ? void 0 : (_child$props5 = child.props) === null || _child$props5 === void 0 ? void 0 : (_child$props5$value = _child$props5.value) === null || _child$props5$value === void 0 ? void 0 : (_child$props5$value$t = _child$props5$value.toString) === null || _child$props5$value$t === void 0 ? void 0 : _child$props5$value$t.call(_child$props5$value));
|
|
34892
|
-
}) !== -1) {
|
|
34893
|
-
selected = true;
|
|
34894
|
-
}
|
|
34895
|
-
return /*#__PURE__*/React.cloneElement(child, _objectSpread2({}, getItemProps({
|
|
34896
|
-
key: child === null || child === void 0 ? void 0 : (_child$props6 = child.props) === null || _child$props6 === void 0 ? void 0 : _child$props6.value,
|
|
34897
|
-
onKeyDown: onNavigate(child, selected),
|
|
34898
|
-
onClick: onSelect(child, selected),
|
|
34899
|
-
onMouseEnter: function onMouseEnter() {
|
|
34900
|
-
setActiveIndex(index);
|
|
34901
|
-
},
|
|
34902
|
-
dataAttrs: {
|
|
34903
|
-
'data-index': index
|
|
34904
|
-
},
|
|
34905
|
-
selected: selected,
|
|
34906
|
-
tabIndex: activeIndex === index ? 0 : -1,
|
|
34907
|
-
ref: function ref(node) {
|
|
34908
|
-
listItemsRef.current[index] = node;
|
|
34909
|
-
}
|
|
34910
|
-
})));
|
|
35738
|
+
})), {}, {
|
|
35739
|
+
className: classes(modules_5b831cd1.popper, open ? modules_5b831cd1.open : ''),
|
|
35740
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Calender, _objectSpread2({}, calenderProps))
|
|
35741
|
+
}))
|
|
35742
|
+
})]
|
|
34911
35743
|
});
|
|
34912
|
-
|
|
34913
|
-
|
|
34914
|
-
|
|
34915
|
-
|
|
34916
|
-
|
|
34917
|
-
|
|
34918
|
-
|
|
34919
|
-
|
|
34920
|
-
|
|
34921
|
-
|
|
34922
|
-
|
|
34923
|
-
|
|
34924
|
-
|
|
34925
|
-
|
|
35744
|
+
};
|
|
35745
|
+
DatePicker.propTypes = {
|
|
35746
|
+
placeholder: propTypes$1.exports.string,
|
|
35747
|
+
label: propTypes$1.exports.string,
|
|
35748
|
+
range: propTypes$1.exports.bool,
|
|
35749
|
+
onApply: propTypes$1.exports.func,
|
|
35750
|
+
onClear: propTypes$1.exports.func,
|
|
35751
|
+
value: propTypes$1.exports.string,
|
|
35752
|
+
disabled: propTypes$1.exports.bool,
|
|
35753
|
+
disabledDates: propTypes$1.exports.arrayOf(propTypes$1.exports.string),
|
|
35754
|
+
maxRange: propTypes$1.exports.shape({
|
|
35755
|
+
value: propTypes$1.exports.number,
|
|
35756
|
+
type: propTypes$1.exports.string
|
|
35757
|
+
}),
|
|
35758
|
+
className: propTypes$1.exports.string,
|
|
35759
|
+
disableDatesBefore: propTypes$1.exports.arrayOf(propTypes$1.exports.string),
|
|
35760
|
+
theme: propTypes$1.exports.string
|
|
35761
|
+
};
|
|
35762
|
+
DatePicker.defaultProps = {
|
|
35763
|
+
placeholder: '',
|
|
35764
|
+
label: '',
|
|
35765
|
+
range: false,
|
|
35766
|
+
onApply: null,
|
|
35767
|
+
disabled: false,
|
|
35768
|
+
disabledDates: [],
|
|
35769
|
+
maxRange: null,
|
|
35770
|
+
value: '',
|
|
35771
|
+
className: '',
|
|
35772
|
+
disableDatesBefore: [],
|
|
35773
|
+
theme: 'dark',
|
|
35774
|
+
onClear: function onClear() {}
|
|
35775
|
+
};
|
|
35776
|
+
|
|
35777
|
+
var css$u = ".HierarchyItem_module_root__c993ecd0 {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n flex: 1;\n}\n.HierarchyItem_module_root__c993ecd0 .HierarchyItem_module_header__c993ecd0 {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n gap: 0.25rem;\n min-height: 2rem;\n height: auto;\n padding: 0rem 0.5rem;\n cursor: pointer;\n}\n.HierarchyItem_module_root__c993ecd0 .HierarchyItem_module_header__c993ecd0 > [data-elem=component1], .HierarchyItem_module_root__c993ecd0 .HierarchyItem_module_header__c993ecd0 > [data-elem=component3] {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n}\n.HierarchyItem_module_root__c993ecd0 .HierarchyItem_module_header__c993ecd0 > [data-elem=component1] .HierarchyItem_module_expand__c993ecd0, .HierarchyItem_module_root__c993ecd0 .HierarchyItem_module_header__c993ecd0 > [data-elem=component3] .HierarchyItem_module_expand__c993ecd0 {\n padding: 0;\n height: auto;\n width: 1rem;\n height: 1rem;\n}\n.HierarchyItem_module_root__c993ecd0 .HierarchyItem_module_header__c993ecd0 > [data-elem=component1] .HierarchyItem_module_expand__c993ecd0 .HierarchyItem_module_icon__c993ecd0, .HierarchyItem_module_root__c993ecd0 .HierarchyItem_module_header__c993ecd0 > [data-elem=component3] .HierarchyItem_module_expand__c993ecd0 .HierarchyItem_module_icon__c993ecd0 {\n transform: rotate(-90deg);\n width: 1rem;\n height: 1rem;\n}\n.HierarchyItem_module_root__c993ecd0 .HierarchyItem_module_header__c993ecd0 > [data-elem=component2] {\n flex: 1 1 auto;\n}\n.HierarchyItem_module_root__c993ecd0 .HierarchyItem_module_header__c993ecd0 > [data-elem=component2] .HierarchyItem_module_title__c993ecd0 {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n width: 100%;\n height: auto;\n padding: 0.25rem 0rem;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.HierarchyItem_module_root__c993ecd0 .HierarchyItem_module_header__c993ecd0:hover {\n background: var(--background);\n}\n.HierarchyItem_module_root__c993ecd0 .HierarchyItem_module_header__c993ecd0:hover .HierarchyItem_module_icon__c993ecd0,\n.HierarchyItem_module_root__c993ecd0 .HierarchyItem_module_header__c993ecd0:hover .HierarchyItem_module_title__c993ecd0,\n.HierarchyItem_module_root__c993ecd0 .HierarchyItem_module_header__c993ecd0:hover .HierarchyItem_module_title__c993ecd0 svg {\n color: var(--highlight);\n fill: var(--highlight);\n}\n.HierarchyItem_module_root__c993ecd0 .HierarchyItem_module_body__c993ecd0 {\n display: none;\n flex: 1 0 auto;\n padding: 0px 0rem 0px 0.25rem;\n}\n.HierarchyItem_module_root__c993ecd0 .HierarchyItem_module_body__c993ecd0 > [data-elem=component1] {\n flex: 0 0 1.6rem;\n}\n.HierarchyItem_module_root__c993ecd0 .HierarchyItem_module_body__c993ecd0 > [data-elem=component1] .HierarchyItem_module_tail__c993ecd0 {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n width: 1.6rem;\n height: 100%;\n}\n.HierarchyItem_module_root__c993ecd0 .HierarchyItem_module_body__c993ecd0 > [data-elem=component1] .HierarchyItem_module_tail__c993ecd0::after {\n content: \"\";\n display: block;\n margin: auto;\n width: 1px;\n flex: 1;\n background: var(--grey1);\n}\n.HierarchyItem_module_root__c993ecd0 .HierarchyItem_module_body__c993ecd0 > [data-elem=component2] {\n flex: 1 0 auto;\n}\n.HierarchyItem_module_root__c993ecd0 .HierarchyItem_module_body__c993ecd0 > [data-elem=component2] .HierarchyItem_module_children__c993ecd0 {\n flex: 1 0 auto;\n}\n.HierarchyItem_module_root__c993ecd0.HierarchyItem_module_open__c993ecd0 > .HierarchyItem_module_header__c993ecd0 .HierarchyItem_module_expand__c993ecd0 .HierarchyItem_module_icon__c993ecd0 {\n transform: none;\n}\n.HierarchyItem_module_root__c993ecd0.HierarchyItem_module_open__c993ecd0 > .HierarchyItem_module_body__c993ecd0 {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: stretch;\n gap: 0.25rem;\n height: auto;\n}";
|
|
35778
|
+
var modules_6d03d164 = {"root":"HierarchyItem_module_root__c993ecd0","header":"HierarchyItem_module_header__c993ecd0","expand":"HierarchyItem_module_expand__c993ecd0","icon":"HierarchyItem_module_icon__c993ecd0","title":"HierarchyItem_module_title__c993ecd0","body":"HierarchyItem_module_body__c993ecd0","tail":"HierarchyItem_module_tail__c993ecd0","children":"HierarchyItem_module_children__c993ecd0","open":"HierarchyItem_module_open__c993ecd0"};
|
|
35779
|
+
n(css$u,{});
|
|
35780
|
+
|
|
35781
|
+
var HierarchyItem = function HierarchyItem(props) {
|
|
35782
|
+
var defaultOpen = props.defaultOpen,
|
|
35783
|
+
iconPlacement = props.iconPlacement,
|
|
35784
|
+
title = props.title,
|
|
35785
|
+
children = props.children,
|
|
35786
|
+
_onClick = props.onClick,
|
|
35787
|
+
onDoubleClick = props.onDoubleClick;
|
|
35788
|
+
var _useState = React.useState(defaultOpen),
|
|
35789
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
35790
|
+
open = _useState2[0],
|
|
35791
|
+
setOpen = _useState2[1];
|
|
35792
|
+
var icon = /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
35793
|
+
className: modules_6d03d164.expand,
|
|
35794
|
+
size: "auto",
|
|
35795
|
+
variant: "text",
|
|
35796
|
+
color: "default",
|
|
35797
|
+
onClick: function onClick() {
|
|
35798
|
+
setOpen(function (prevState) {
|
|
35799
|
+
var newState = !prevState;
|
|
35800
|
+
_onClick === null || _onClick === void 0 ? void 0 : _onClick(newState);
|
|
35801
|
+
onDoubleClick === null || onDoubleClick === void 0 ? void 0 : onDoubleClick(newState);
|
|
35802
|
+
return newState;
|
|
34926
35803
|
});
|
|
34927
|
-
}
|
|
34928
|
-
|
|
34929
|
-
|
|
34930
|
-
|
|
34931
|
-
setUncontrolledValue(value);
|
|
34932
|
-
}
|
|
34933
|
-
}, [open, multi, value]);
|
|
34934
|
-
var onSelectAll = function onSelectAll(event, selected) {
|
|
34935
|
-
// to support form libraries which require name and value on the event
|
|
34936
|
-
var nativeEvent = event.nativeEvent || event;
|
|
34937
|
-
var clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);
|
|
34938
|
-
var itemValue = [];
|
|
34939
|
-
if (selected) {
|
|
34940
|
-
itemValue = childrenArray.map(function (child) {
|
|
34941
|
-
var _child$props7, _child$props7$value, _child$props7$value$t;
|
|
34942
|
-
return child === null || child === void 0 ? void 0 : (_child$props7 = child.props) === null || _child$props7 === void 0 ? void 0 : (_child$props7$value = _child$props7.value) === null || _child$props7$value === void 0 ? void 0 : (_child$props7$value$t = _child$props7$value.toString) === null || _child$props7$value$t === void 0 ? void 0 : _child$props7$value$t.call(_child$props7$value);
|
|
35804
|
+
},
|
|
35805
|
+
leftComponent: function leftComponent() {
|
|
35806
|
+
return /*#__PURE__*/jsxRuntime.jsx(Caret, {
|
|
35807
|
+
className: modules_6d03d164.icon
|
|
34943
35808
|
});
|
|
34944
35809
|
}
|
|
34945
|
-
|
|
34946
|
-
writable: true,
|
|
34947
|
-
value: {
|
|
34948
|
-
value: itemValue,
|
|
34949
|
-
name: name
|
|
34950
|
-
}
|
|
34951
|
-
});
|
|
34952
|
-
|
|
34953
|
-
// eslint-disable-next-line no-lonely-if
|
|
34954
|
-
if (selected === true) {
|
|
34955
|
-
setUncontrolledValue(itemValue);
|
|
34956
|
-
} else {
|
|
34957
|
-
setUncontrolledValue(itemValue);
|
|
34958
|
-
}
|
|
34959
|
-
setActiveIndex(0);
|
|
34960
|
-
};
|
|
34961
|
-
var onApply = function onApply(event) {
|
|
34962
|
-
var nativeEvent = event.nativeEvent || event;
|
|
34963
|
-
var clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);
|
|
34964
|
-
Object.defineProperty(clonedEvent, 'target', {
|
|
34965
|
-
writable: true,
|
|
34966
|
-
value: {
|
|
34967
|
-
value: uncontrolledValue,
|
|
34968
|
-
name: name
|
|
34969
|
-
}
|
|
34970
|
-
});
|
|
34971
|
-
onChange(event, uncontrolledValue);
|
|
34972
|
-
};
|
|
35810
|
+
});
|
|
34973
35811
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
34974
|
-
className: classes(
|
|
34975
|
-
children: [
|
|
34976
|
-
|
|
34977
|
-
|
|
34978
|
-
|
|
34979
|
-
|
|
34980
|
-
|
|
34981
|
-
|
|
34982
|
-
|
|
34983
|
-
|
|
34984
|
-
|
|
34985
|
-
|
|
34986
|
-
|
|
34987
|
-
|
|
34988
|
-
|
|
34989
|
-
|
|
34990
|
-
|
|
34991
|
-
|
|
34992
|
-
|
|
34993
|
-
|
|
34994
|
-
|
|
34995
|
-
|
|
34996
|
-
|
|
35812
|
+
className: classes(modules_6d03d164.root, open ? modules_6d03d164.open : ''),
|
|
35813
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(BaseCell, {
|
|
35814
|
+
flexible: true,
|
|
35815
|
+
size: "auto",
|
|
35816
|
+
className: modules_6d03d164.header,
|
|
35817
|
+
component1: iconPlacement === 'left' && icon,
|
|
35818
|
+
component2: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
35819
|
+
className: modules_6d03d164.title,
|
|
35820
|
+
flexible: true,
|
|
35821
|
+
size: "auto",
|
|
35822
|
+
variant: "text",
|
|
35823
|
+
color: "default",
|
|
35824
|
+
onClick: function onClick(event) {
|
|
35825
|
+
var detail = event.detail;
|
|
35826
|
+
|
|
35827
|
+
// single click
|
|
35828
|
+
if (detail === 1) {
|
|
35829
|
+
_onClick === null || _onClick === void 0 ? void 0 : _onClick(open);
|
|
35830
|
+
// double click
|
|
35831
|
+
} else if (detail === 2) {
|
|
35832
|
+
setOpen(function (prevState) {
|
|
35833
|
+
var newState = !prevState;
|
|
35834
|
+
onDoubleClick === null || onDoubleClick === void 0 ? void 0 : onDoubleClick(newState);
|
|
35835
|
+
return newState;
|
|
35836
|
+
});
|
|
34997
35837
|
}
|
|
34998
35838
|
},
|
|
34999
|
-
|
|
35000
|
-
|
|
35001
|
-
|
|
35002
|
-
|
|
35003
|
-
|
|
35004
|
-
|
|
35005
|
-
|
|
35006
|
-
|
|
35007
|
-
|
|
35008
|
-
|
|
35009
|
-
|
|
35010
|
-
|
|
35011
|
-
|
|
35012
|
-
|
|
35013
|
-
className: classes(modules_1b90f5ea.icon, modules_1b90f5ea['drop-icon'])
|
|
35014
|
-
})]
|
|
35015
|
-
})]
|
|
35016
|
-
})), /*#__PURE__*/jsxRuntime.jsx(Popper, {
|
|
35017
|
-
open: open,
|
|
35018
|
-
wrapperId: "dropdown-popper",
|
|
35019
|
-
children: open && /*#__PURE__*/jsxRuntime.jsx(FloatingFocusManager, {
|
|
35020
|
-
context: context,
|
|
35021
|
-
initialFocus: -1,
|
|
35022
|
-
modal: false,
|
|
35023
|
-
children: /*#__PURE__*/jsxRuntime.jsxs("ul", _objectSpread2(_objectSpread2({}, getFloatingProps({
|
|
35024
|
-
'data-elem': 'body',
|
|
35025
|
-
role: 'group',
|
|
35026
|
-
ref: floating,
|
|
35027
|
-
onKeyDown: function onKeyDown(event) {
|
|
35028
|
-
setPointer(false);
|
|
35029
|
-
if (event.key === 'Tab' && !multi) {
|
|
35030
|
-
setOpen(false);
|
|
35031
|
-
}
|
|
35032
|
-
},
|
|
35033
|
-
onPointerMove: function onPointerMove() {
|
|
35034
|
-
setPointer(true);
|
|
35035
|
-
},
|
|
35036
|
-
style: {
|
|
35037
|
-
position: strategy,
|
|
35038
|
-
top: y !== null && y !== void 0 ? y : 0,
|
|
35039
|
-
left: x !== null && x !== void 0 ? x : 0
|
|
35040
|
-
},
|
|
35041
|
-
className: classes(modules_1b90f5ea.body, popperClassName, open ? modules_1b90f5ea.open : '')
|
|
35042
|
-
})), {}, {
|
|
35043
|
-
children: [multi && /*#__PURE__*/jsxRuntime.jsxs("li", {
|
|
35044
|
-
ref: multiOptionsRef,
|
|
35045
|
-
className: modules_1b90f5ea['multi-options'],
|
|
35046
|
-
tabIndex: -1,
|
|
35047
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Checkbox, {
|
|
35048
|
-
label: "Select All",
|
|
35049
|
-
position: "left",
|
|
35050
|
-
checked: selectedOptions.length === childrenArray.length,
|
|
35051
|
-
onChange: onSelectAll
|
|
35052
|
-
}), ' ', /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
35053
|
-
blurOnClick: false,
|
|
35054
|
-
variant: "text",
|
|
35055
|
-
title: "Clear",
|
|
35056
|
-
size: "auto",
|
|
35057
|
-
color: "danger",
|
|
35058
|
-
onClick: function onClick(event) {
|
|
35059
|
-
var _multiOptionsRef$curr;
|
|
35060
|
-
multiOptionsRef === null || multiOptionsRef === void 0 ? void 0 : (_multiOptionsRef$curr = multiOptionsRef.current) === null || _multiOptionsRef$curr === void 0 ? void 0 : _multiOptionsRef$curr.focus();
|
|
35061
|
-
onSelectAll(event, false);
|
|
35062
|
-
}
|
|
35063
|
-
})]
|
|
35064
|
-
}), items, multi && /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
35065
|
-
className: modules_1b90f5ea['multi-apply'],
|
|
35066
|
-
title: "Apply",
|
|
35067
|
-
size: "auto",
|
|
35068
|
-
onClick: onApply
|
|
35069
|
-
})]
|
|
35070
|
-
}))
|
|
35071
|
-
})
|
|
35072
|
-
}), feedback != null && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
35073
|
-
className: modules_1b90f5ea.bottom,
|
|
35074
|
-
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
35075
|
-
"data-elem": "feedback",
|
|
35076
|
-
className: classes(modules_1b90f5ea.feedback, modules_1b90f5ea["feedback-".concat(feedback.type)]),
|
|
35077
|
-
children: feedback.text
|
|
35839
|
+
leftComponent: function leftComponent() {
|
|
35840
|
+
return title;
|
|
35841
|
+
}
|
|
35842
|
+
}),
|
|
35843
|
+
component3: iconPlacement === 'right' && icon
|
|
35844
|
+
}), /*#__PURE__*/jsxRuntime.jsx(BaseCell, {
|
|
35845
|
+
size: "auto",
|
|
35846
|
+
className: modules_6d03d164.body,
|
|
35847
|
+
component1: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
35848
|
+
className: modules_6d03d164.tail
|
|
35849
|
+
}),
|
|
35850
|
+
component2: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
35851
|
+
className: modules_6d03d164.children,
|
|
35852
|
+
children: children
|
|
35078
35853
|
})
|
|
35079
35854
|
})]
|
|
35080
35855
|
});
|
|
35081
|
-
});
|
|
35082
|
-
Dropdown.propTypes = {
|
|
35083
|
-
popperClassName: propTypes$1.exports.string,
|
|
35084
|
-
className: propTypes$1.exports.string,
|
|
35085
|
-
disabled: propTypes$1.exports.bool,
|
|
35086
|
-
label: propTypes$1.exports.string,
|
|
35087
|
-
value: propTypes$1.exports.oneOfType([propTypes$1.exports.string, propTypes$1.exports.arrayOf(propTypes$1.exports.string)]),
|
|
35088
|
-
placeholder: propTypes$1.exports.string,
|
|
35089
|
-
// search: PropTypes.bool,
|
|
35090
|
-
// max: PropTypes.number,
|
|
35091
|
-
multi: propTypes$1.exports.bool,
|
|
35092
|
-
onChange: propTypes$1.exports.func,
|
|
35093
|
-
onBlur: propTypes$1.exports.func,
|
|
35094
|
-
feedback: propTypes$1.exports.shape({
|
|
35095
|
-
text: propTypes$1.exports.node,
|
|
35096
|
-
type: propTypes$1.exports.oneOf(['error', 'success', 'default'])
|
|
35097
|
-
}),
|
|
35098
|
-
formatter: propTypes$1.exports.func
|
|
35099
35856
|
};
|
|
35100
|
-
|
|
35101
|
-
|
|
35102
|
-
|
|
35103
|
-
|
|
35104
|
-
|
|
35105
|
-
|
|
35106
|
-
|
|
35107
|
-
|
|
35108
|
-
|
|
35109
|
-
|
|
35110
|
-
|
|
35111
|
-
onBlur: null,
|
|
35112
|
-
feedback: null,
|
|
35113
|
-
formatter: function formatter(totalSelected) {
|
|
35114
|
-
return "".concat(totalSelected, " options selected");
|
|
35115
|
-
}
|
|
35857
|
+
HierarchyItem.propTypes = {
|
|
35858
|
+
iconPlacement: propTypes$1.exports.oneOf(['left', 'right', 'none']),
|
|
35859
|
+
title: propTypes$1.exports.node,
|
|
35860
|
+
defaultOpen: propTypes$1.exports.bool,
|
|
35861
|
+
onClick: propTypes$1.exports.func
|
|
35862
|
+
};
|
|
35863
|
+
HierarchyItem.defaultProps = {
|
|
35864
|
+
iconPlacement: 'left',
|
|
35865
|
+
title: null,
|
|
35866
|
+
defaultOpen: false,
|
|
35867
|
+
onClick: function onClick() {}
|
|
35116
35868
|
};
|
|
35117
35869
|
|
|
35118
|
-
var css$t = ".
|
|
35119
|
-
var
|
|
35870
|
+
var css$t = ".HierarchyBrowser_module_root__649d3da2 {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n width: 20rem;\n position: relative;\n}\n.HierarchyBrowser_module_root__649d3da2 .HierarchyBrowser_module_header__649d3da2 {\n padding: 0.5rem;\n background: var(--dark-grey);\n color: var(--white);\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.HierarchyBrowser_module_root__649d3da2 .HierarchyBrowser_module_body__649d3da2 {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n overflow: auto;\n}\n.HierarchyBrowser_module_root__649d3da2 .HierarchyBrowser_module_item__649d3da2 {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n gap: 0.25rem;\n}\n.HierarchyBrowser_module_root__649d3da2 .HierarchyBrowser_module_item__649d3da2 .HierarchyBrowser_module_itemIcon__649d3da2 {\n width: 1rem;\n}\n.HierarchyBrowser_module_root__649d3da2::after {\n position: absolute;\n right: 0;\n content: \"\";\n width: 1px;\n height: 100%;\n background: var(--grey4);\n}\n.HierarchyBrowser_module_root__649d3da2.HierarchyBrowser_module_resizable__649d3da2:hover::after {\n width: 3px;\n cursor: col-resize;\n}";
|
|
35871
|
+
var modules_5e29d515 = {"root":"HierarchyBrowser_module_root__649d3da2","header":"HierarchyBrowser_module_header__649d3da2","body":"HierarchyBrowser_module_body__649d3da2","item":"HierarchyBrowser_module_item__649d3da2","item-icon":"HierarchyBrowser_module_itemIcon__649d3da2","resizable":"HierarchyBrowser_module_resizable__649d3da2"};
|
|
35120
35872
|
n(css$t,{});
|
|
35121
35873
|
|
|
35122
|
-
var
|
|
35123
|
-
|
|
35124
|
-
var
|
|
35125
|
-
|
|
35126
|
-
|
|
35127
|
-
|
|
35128
|
-
|
|
35129
|
-
|
|
35130
|
-
onClick = props.onClick,
|
|
35131
|
-
dataAttrs = props.dataAttrs,
|
|
35132
|
-
className = props.className,
|
|
35133
|
-
tabIndex = props.tabIndex;
|
|
35134
|
-
var action = null;
|
|
35135
|
-
switch (variant) {
|
|
35136
|
-
case 'checkbox':
|
|
35137
|
-
action = /*#__PURE__*/jsxRuntime.jsx(Checkbox, {
|
|
35138
|
-
className: modules_bf949acd.input,
|
|
35139
|
-
checked: selected,
|
|
35140
|
-
disabled: true
|
|
35141
|
-
});
|
|
35142
|
-
break;
|
|
35143
|
-
case 'radio':
|
|
35144
|
-
action = /*#__PURE__*/jsxRuntime.jsx(Radio, {
|
|
35145
|
-
className: modules_bf949acd.input,
|
|
35146
|
-
checked: selected,
|
|
35147
|
-
disabled: true
|
|
35148
|
-
});
|
|
35874
|
+
var Title = function Title(props) {
|
|
35875
|
+
var item = props.item;
|
|
35876
|
+
var Icon = null;
|
|
35877
|
+
switch (item.id) {
|
|
35878
|
+
case 'database':
|
|
35879
|
+
case 'schema':
|
|
35880
|
+
case 'object':
|
|
35881
|
+
Icon = Server;
|
|
35149
35882
|
break;
|
|
35150
35883
|
}
|
|
35151
|
-
return /*#__PURE__*/jsxRuntime.jsxs("
|
|
35152
|
-
|
|
35153
|
-
|
|
35154
|
-
|
|
35155
|
-
"
|
|
35156
|
-
|
|
35157
|
-
|
|
35158
|
-
|
|
35159
|
-
|
|
35160
|
-
|
|
35161
|
-
|
|
35162
|
-
|
|
35163
|
-
|
|
35164
|
-
|
|
35165
|
-
|
|
35166
|
-
|
|
35884
|
+
return /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
35885
|
+
className: modules_5e29d515.item,
|
|
35886
|
+
children: [Icon && /*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
35887
|
+
className: modules_5e29d515['item-icon']
|
|
35888
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
35889
|
+
className: modules_5e29d515['item-title'],
|
|
35890
|
+
children: item === null || item === void 0 ? void 0 : item.title
|
|
35891
|
+
}), (item === null || item === void 0 ? void 0 : item.count) && /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
35892
|
+
className: modules_5e29d515['item-count'],
|
|
35893
|
+
children: ["(", item === null || item === void 0 ? void 0 : item.count, ")"]
|
|
35894
|
+
})]
|
|
35895
|
+
});
|
|
35896
|
+
};
|
|
35897
|
+
var HierarchyBrowser = function HierarchyBrowser(props) {
|
|
35898
|
+
var className = props.className,
|
|
35899
|
+
metadata = props.metadata,
|
|
35900
|
+
onItemClick = props.onItemClick,
|
|
35901
|
+
onItemDoubleClick = props.onItemDoubleClick,
|
|
35902
|
+
minWidth = props.minWidth,
|
|
35903
|
+
maxWidth = props.maxWidth,
|
|
35904
|
+
borderSize = props.borderSize,
|
|
35905
|
+
resizable = props.resizable,
|
|
35906
|
+
setItemProps = props.setItemProps,
|
|
35907
|
+
title = props.title;
|
|
35908
|
+
var browserRef = React.useRef(null);
|
|
35909
|
+
useResize({
|
|
35910
|
+
ref: browserRef,
|
|
35911
|
+
styles: {
|
|
35912
|
+
minWidth: minWidth,
|
|
35913
|
+
maxWidth: maxWidth !== null && maxWidth !== void 0 ? maxWidth : document.documentElement.getBoundingClientRect().width,
|
|
35914
|
+
borderSize: borderSize
|
|
35915
|
+
},
|
|
35916
|
+
enabled: resizable
|
|
35917
|
+
});
|
|
35918
|
+
var handleItemClick = function handleItemClick(item, pathString) {
|
|
35919
|
+
return function (open) {
|
|
35920
|
+
onItemClick(item, pathString, open);
|
|
35921
|
+
};
|
|
35922
|
+
};
|
|
35923
|
+
var handleItemDoubleClick = function handleItemDoubleClick(item, pathString) {
|
|
35924
|
+
return function (open) {
|
|
35925
|
+
onItemDoubleClick(item, pathString, open);
|
|
35926
|
+
};
|
|
35927
|
+
};
|
|
35928
|
+
var renderTree = function renderTree(data) {
|
|
35929
|
+
var _data$list$map, _data$list, _data$list$map2;
|
|
35930
|
+
var pathString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
35931
|
+
if (data == null) {
|
|
35932
|
+
return null;
|
|
35933
|
+
}
|
|
35934
|
+
var hasChildren = (data === null || data === void 0 ? void 0 : data.list) === true || Array.isArray(data === null || data === void 0 ? void 0 : data.list);
|
|
35935
|
+
return /*#__PURE__*/jsxRuntime.jsx(HierarchyItem, _objectSpread2(_objectSpread2({
|
|
35936
|
+
title: /*#__PURE__*/jsxRuntime.jsx(Title, {
|
|
35937
|
+
item: data
|
|
35938
|
+
}),
|
|
35939
|
+
iconPlacement: hasChildren ? 'left' : 'none',
|
|
35940
|
+
onClick: handleItemClick(data, pathString),
|
|
35941
|
+
onDoubleClick: handleItemDoubleClick(data, pathString)
|
|
35942
|
+
}, setItemProps(data, pathString)), {}, {
|
|
35943
|
+
children: hasChildren && ((_data$list$map = (_data$list = data.list) === null || _data$list === void 0 ? void 0 : (_data$list$map2 = _data$list.map) === null || _data$list$map2 === void 0 ? void 0 : _data$list$map2.call(_data$list, function (item, idx) {
|
|
35944
|
+
return renderTree(item, "".concat(pathString).concat(pathString.length > 0 ? '.' : '', "list[").concat(idx, "]"));
|
|
35945
|
+
})) !== null && _data$list$map !== void 0 ? _data$list$map : [])
|
|
35946
|
+
}));
|
|
35947
|
+
};
|
|
35948
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
35949
|
+
ref: browserRef,
|
|
35950
|
+
className: classes(modules_5e29d515.root, className, resizable ? modules_5e29d515.resizable : ''),
|
|
35951
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
35952
|
+
className: modules_5e29d515.header,
|
|
35953
|
+
"data-elem": "header",
|
|
35167
35954
|
children: title
|
|
35955
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
35956
|
+
className: modules_5e29d515.body,
|
|
35957
|
+
"data-elem": "body",
|
|
35958
|
+
children: renderTree(metadata)
|
|
35168
35959
|
})]
|
|
35169
|
-
})
|
|
35170
|
-
}
|
|
35171
|
-
|
|
35960
|
+
});
|
|
35961
|
+
};
|
|
35962
|
+
HierarchyBrowser.propTypes = {
|
|
35172
35963
|
className: propTypes$1.exports.string,
|
|
35173
|
-
|
|
35174
|
-
|
|
35175
|
-
|
|
35176
|
-
|
|
35177
|
-
|
|
35964
|
+
metadata: propTypes$1.exports.objectOf({
|
|
35965
|
+
title: propTypes$1.exports.string,
|
|
35966
|
+
id: propTypes$1.exports.string,
|
|
35967
|
+
count: propTypes$1.exports.number,
|
|
35968
|
+
list: propTypes$1.exports.array
|
|
35969
|
+
}),
|
|
35970
|
+
onItemClick: propTypes$1.exports.func,
|
|
35971
|
+
onItemDoubleClick: propTypes$1.exports.func,
|
|
35972
|
+
borderSize: propTypes$1.exports.number,
|
|
35973
|
+
minWidth: propTypes$1.exports.number,
|
|
35974
|
+
maxWidth: propTypes$1.exports.number,
|
|
35975
|
+
resizable: propTypes$1.exports.bool,
|
|
35976
|
+
setItemProps: propTypes$1.exports.func,
|
|
35977
|
+
title: propTypes$1.exports.string
|
|
35178
35978
|
};
|
|
35179
|
-
|
|
35979
|
+
HierarchyBrowser.defaultProps = {
|
|
35180
35980
|
className: '',
|
|
35181
|
-
|
|
35182
|
-
|
|
35183
|
-
|
|
35184
|
-
|
|
35981
|
+
metadata: {},
|
|
35982
|
+
onItemClick: function onItemClick() {},
|
|
35983
|
+
onItemDoubleClick: function onItemDoubleClick() {},
|
|
35984
|
+
borderSize: 4,
|
|
35985
|
+
minWidth: 220,
|
|
35986
|
+
maxWidth: null,
|
|
35987
|
+
resizable: false,
|
|
35988
|
+
setItemProps: function setItemProps() {
|
|
35989
|
+
return {};
|
|
35990
|
+
},
|
|
35991
|
+
title: 'Browser'
|
|
35185
35992
|
};
|
|
35186
35993
|
|
|
35187
35994
|
var css$s = ".BaseModal_module_root__2dd7477e {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n top: 50%;\n left: 50%;\n right: auto;\n bottom: auto;\n transform: translate(-50%, -50%);\n max-height: 100%;\n width: 50%;\n position: fixed;\n background: #ffffff;\n box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.13);\n border-radius: 5px;\n outline: none;\n}\n.BaseModal_module_root__2dd7477e .BaseModal_module_body__2dd7477e {\n overflow-y: scroll;\n padding: 0 15px;\n}\n.BaseModal_module_root__2dd7477e .BaseModal_module_header__2dd7477e,\n.BaseModal_module_root__2dd7477e .BaseModal_module_footer__2dd7477e {\n padding: 1rem;\n}\n.BaseModal_module_root__2dd7477e .BaseModal_module_header__2dd7477e {\n font-weight: 500;\n font-size: 1.375rem;\n}\n.BaseModal_module_root__2dd7477e .BaseModal_module_footer__2dd7477e {\n margin-top: auto;\n}\n.BaseModal_module_root__2dd7477e .BaseModal_module_close__2dd7477e {\n position: absolute;\n right: 0.5rem;\n top: 0.5rem;\n}\n.BaseModal_module_root__2dd7477e .BaseModal_module_close__2dd7477e .BaseModal_module_icon__2dd7477e {\n width: 1.5rem;\n height: 1.5rem;\n fill: var(--black);\n}";
|
|
@@ -36211,14 +37018,15 @@ var TableChipsSkeleton = function TableChipsSkeleton() {
|
|
|
36211
37018
|
});
|
|
36212
37019
|
};
|
|
36213
37020
|
|
|
36214
|
-
var css$e = ".
|
|
36215
|
-
var modules_016d9b3e = {"root":"
|
|
37021
|
+
var css$e = ".TableChips_module_root__dfc60d0e[data-elem=base-cell] {\n padding: 0.5rem 1.5rem;\n width: 100%;\n background: var(--grey8);\n border-radius: 0.25rem 0.25rem 0 0;\n}\n.TableChips_module_root__dfc60d0e[data-elem=base-cell] > [data-elem=component1] .TableChips_module_back__dfc60d0e {\n height: 2rem;\n width: 2rem;\n}\n.TableChips_module_root__dfc60d0e[data-elem=base-cell] > [data-elem=component1] .TableChips_module_back__dfc60d0e [data-elem=component1] .TableChips_module_icon__dfc60d0e {\n width: 1.5rem;\n height: 1.5rem;\n fill: var(--white);\n}\n.TableChips_module_root__dfc60d0e[data-elem=base-cell] > [data-elem=component2] {\n -ms-overflow-style: none;\n scrollbar-width: none;\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n gap: 0.5rem;\n overflow-x: auto;\n flex: 1;\n}\n.TableChips_module_root__dfc60d0e[data-elem=base-cell] > [data-elem=component2]::-webkit-scrollbar {\n display: none;\n}\n.TableChips_module_root__dfc60d0e[data-elem=base-cell] > [data-elem=component2] .TableChips_module_chip__dfc60d0e .TableChips_module_chipIcon__dfc60d0e {\n width: 1rem;\n height: 1rem;\n}\n.TableChips_module_root__dfc60d0e[data-elem=base-cell] > [data-elem=component3] {\n height: 100%;\n}\n.TableChips_module_root__dfc60d0e[data-elem=base-cell] > [data-elem=component3] .TableChips_module_clear__dfc60d0e {\n height: 100%;\n}";
|
|
37022
|
+
var modules_016d9b3e = {"root":"TableChips_module_root__dfc60d0e","back":"TableChips_module_back__dfc60d0e","icon":"TableChips_module_icon__dfc60d0e","chip":"TableChips_module_chip__dfc60d0e","chip-icon":"TableChips_module_chipIcon__dfc60d0e","clear":"TableChips_module_clear__dfc60d0e"};
|
|
36216
37023
|
n(css$e,{});
|
|
36217
37024
|
|
|
36218
37025
|
var TableChips = function TableChips(props) {
|
|
36219
37026
|
var _chips$filter;
|
|
36220
37027
|
var showBack = props.showBack,
|
|
36221
37028
|
onBack = props.onBack,
|
|
37029
|
+
onClear = props.onClear,
|
|
36222
37030
|
chips = props.chips,
|
|
36223
37031
|
className = props.className,
|
|
36224
37032
|
style = props.style,
|
|
@@ -36266,7 +37074,20 @@ var TableChips = function TableChips(props) {
|
|
|
36266
37074
|
},
|
|
36267
37075
|
onClick: onBack
|
|
36268
37076
|
}),
|
|
36269
|
-
component2: (chipsDOM === null || chipsDOM === void 0 ? void 0 : chipsDOM.length) > 0 ? chipsDOM : null
|
|
37077
|
+
component2: (chipsDOM === null || chipsDOM === void 0 ? void 0 : chipsDOM.length) > 0 ? chipsDOM : null,
|
|
37078
|
+
component3: (chipsDOM === null || chipsDOM === void 0 ? void 0 : chipsDOM.length) > 0 ? /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
37079
|
+
size: "auto",
|
|
37080
|
+
variant: "outlined",
|
|
37081
|
+
color: "danger",
|
|
37082
|
+
title: "Clear All",
|
|
37083
|
+
className: modules_016d9b3e.clear,
|
|
37084
|
+
leftComponent: function leftComponent() {
|
|
37085
|
+
return /*#__PURE__*/jsxRuntime.jsx(Trash, {
|
|
37086
|
+
className: modules_016d9b3e.icon
|
|
37087
|
+
});
|
|
37088
|
+
},
|
|
37089
|
+
onClick: onClear
|
|
37090
|
+
}) : ''
|
|
36270
37091
|
});
|
|
36271
37092
|
}
|
|
36272
37093
|
return null;
|
|
@@ -36277,6 +37098,7 @@ TableChips.propTypes = {
|
|
|
36277
37098
|
style: propTypes$1.exports.object,
|
|
36278
37099
|
showBack: propTypes$1.exports.bool,
|
|
36279
37100
|
onBack: propTypes$1.exports.func,
|
|
37101
|
+
onClear: propTypes$1.exports.func,
|
|
36280
37102
|
chips: propTypes$1.exports.arrayOf(propTypes$1.exports.shape({
|
|
36281
37103
|
key: propTypes$1.exports.string,
|
|
36282
37104
|
icon: propTypes$1.exports.func,
|
|
@@ -36292,6 +37114,7 @@ TableChips.defaultProps = {
|
|
|
36292
37114
|
style: {},
|
|
36293
37115
|
showBack: false,
|
|
36294
37116
|
onBack: function onBack() {},
|
|
37117
|
+
onClear: function onClear() {},
|
|
36295
37118
|
chips: [],
|
|
36296
37119
|
loading: null
|
|
36297
37120
|
};
|
|
@@ -36393,8 +37216,8 @@ Popover.defaultProps = {
|
|
|
36393
37216
|
onClose: function onClose() {}
|
|
36394
37217
|
};
|
|
36395
37218
|
|
|
36396
|
-
var css$c = ".
|
|
36397
|
-
var modules_48c02c99 = {"popover":"
|
|
37219
|
+
var css$c = ".Columns_module_popover__078e5868 {\n height: 32rem;\n padding: 0;\n overflow: hidden;\n}\n\n.Columns_module_root__078e5868 {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n position: relative;\n height: 100%;\n min-width: 18rem;\n max-width: 100%;\n}\n.Columns_module_root__078e5868 .Columns_module_header__078e5868 {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid var(--grey4);\n padding: 0.75rem 2.5rem;\n}\n.Columns_module_root__078e5868 .Columns_module_header__078e5868 > [data-elem=component1] {\n font-weight: 500;\n}\n.Columns_module_root__078e5868 .Columns_module_header__078e5868 > [data-elem=component2] .Columns_module_close__078e5868 {\n height: auto;\n padding: 0;\n}\n.Columns_module_root__078e5868 .Columns_module_header__078e5868 > [data-elem=component2] .Columns_module_close__078e5868 .Columns_module_icon__078e5868 {\n width: 1rem;\n height: 1rem;\n}\n.Columns_module_root__078e5868 .Columns_module_body__078e5868 {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n gap: 0.5rem;\n padding: 0.75rem 2.5rem;\n max-height: 28rem;\n overflow-y: auto;\n flex: 1 1 auto;\n}\n.Columns_module_root__078e5868 .Columns_module_body__078e5868 .Columns_module_search__078e5868 {\n position: -webkit-sticky;\n position: sticky;\n top: 0;\n}\n.Columns_module_root__078e5868 .Columns_module_body__078e5868 .Columns_module_columns__078e5868 {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n gap: 0.5rem;\n overflow-y: auto;\n}\n.Columns_module_root__078e5868 .Columns_module_body__078e5868 .Columns_module_columns__078e5868 .Columns_module_item__078e5868 {\n height: 3rem;\n}\n.Columns_module_root__078e5868 .Columns_module_body__078e5868 .Columns_module_columns__078e5868 .Columns_module_item__078e5868 > [data-elem=title] {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n.Columns_module_root__078e5868 .Columns_module_footer__078e5868 {\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-items: center;\n height: auto;\n margin-top: auto;\n padding: 0.5rem 2.5rem;\n border-top: 1px solid var(--grey4);\n}\n.Columns_module_root__078e5868 .Columns_module_footer__078e5868 button.Columns_module_expand__078e5868 {\n height: auto;\n background: var(--grey8);\n border: 1px solid var(--grey4);\n color: var(--black);\n}\n.Columns_module_root__078e5868 .Columns_module_footer__078e5868 button.Columns_module_expand__078e5868 .Columns_module_icon__078e5868 {\n width: 1.5rem;\n height: 1.5rem;\n transform: rotate(180deg);\n}\n.Columns_module_root__078e5868.Columns_module_expanded__078e5868 .Columns_module_body__078e5868 {\n flex: 0 1 auto;\n}\n.Columns_module_root__078e5868.Columns_module_expanded__078e5868 .Columns_module_body__078e5868 .Columns_module_columns__078e5868 {\n display: grid;\n grid-template-columns: 1fr 1fr;\n}\n.Columns_module_root__078e5868.Columns_module_expanded__078e5868 .Columns_module_body__078e5868 .Columns_module_columns__078e5868 .Columns_module_item__078e5868 {\n overflow: hidden;\n}\n.Columns_module_root__078e5868.Columns_module_expanded__078e5868 .Columns_module_footer__078e5868 button.Columns_module_expand__078e5868 .Columns_module_icon__078e5868 {\n transform: none;\n}";
|
|
37220
|
+
var modules_48c02c99 = {"popover":"Columns_module_popover__078e5868","root":"Columns_module_root__078e5868","header":"Columns_module_header__078e5868","close":"Columns_module_close__078e5868","icon":"Columns_module_icon__078e5868","body":"Columns_module_body__078e5868","search":"Columns_module_search__078e5868","columns":"Columns_module_columns__078e5868","item":"Columns_module_item__078e5868","footer":"Columns_module_footer__078e5868","expand":"Columns_module_expand__078e5868","expanded":"Columns_module_expanded__078e5868"};
|
|
36398
37221
|
n(css$c,{});
|
|
36399
37222
|
|
|
36400
37223
|
var Columns = function Columns(props) {
|
|
@@ -36423,61 +37246,68 @@ var Columns = function Columns(props) {
|
|
|
36423
37246
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
36424
37247
|
className: classes(modules_48c02c99.root, expanded ? modules_48c02c99.expanded : ''),
|
|
36425
37248
|
children: [/*#__PURE__*/jsxRuntime.jsx(BaseCell, {
|
|
37249
|
+
size: "auto",
|
|
36426
37250
|
className: modules_48c02c99.header,
|
|
36427
37251
|
component1: "Columns",
|
|
36428
|
-
component2: /*#__PURE__*/jsxRuntime.jsx(
|
|
37252
|
+
component2: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
37253
|
+
className: modules_48c02c99.close,
|
|
37254
|
+
size: "auto",
|
|
37255
|
+
radius: "round",
|
|
37256
|
+
variant: "text",
|
|
37257
|
+
leftComponent: function leftComponent() {
|
|
37258
|
+
return /*#__PURE__*/jsxRuntime.jsx(Cross$1, {
|
|
37259
|
+
className: modules_48c02c99.icon
|
|
37260
|
+
});
|
|
37261
|
+
},
|
|
37262
|
+
onClick: function onClick() {
|
|
37263
|
+
setOpen(false);
|
|
37264
|
+
}
|
|
37265
|
+
})
|
|
37266
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
37267
|
+
className: modules_48c02c99.body,
|
|
37268
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(TextField, {
|
|
36429
37269
|
className: modules_48c02c99.search,
|
|
36430
|
-
placeholder: "Search
|
|
37270
|
+
placeholder: "Search",
|
|
36431
37271
|
value: search,
|
|
36432
37272
|
onChange: function onChange(e) {
|
|
36433
37273
|
var _inputHelper = inputHelper(e),
|
|
36434
37274
|
fieldValue = _inputHelper.fieldValue;
|
|
36435
37275
|
setSearch(fieldValue);
|
|
36436
37276
|
}
|
|
36437
|
-
})
|
|
36438
|
-
|
|
36439
|
-
|
|
36440
|
-
|
|
36441
|
-
|
|
36442
|
-
|
|
36443
|
-
|
|
36444
|
-
|
|
36445
|
-
|
|
36446
|
-
|
|
36447
|
-
|
|
36448
|
-
|
|
36449
|
-
|
|
36450
|
-
|
|
36451
|
-
|
|
36452
|
-
|
|
36453
|
-
|
|
36454
|
-
|
|
36455
|
-
return (col === null || col === void 0 ? void 0 : (_col$id = col.id) === null || _col$id === void 0 ? void 0 : _col$id.toLowerCase().indexOf(search === null || search === void 0 ? void 0 : search.toLowerCase())) !== -1 && search != null && search !== '' || search == null || search === '';
|
|
36456
|
-
}).map(function (col) {
|
|
36457
|
-
var selected = [null, false, undefined].includes(hiddenColumns === null || hiddenColumns === void 0 ? void 0 : hiddenColumns[col === null || col === void 0 ? void 0 : col.id]);
|
|
36458
|
-
return /*#__PURE__*/jsxRuntime.jsx(DropdownItem, {
|
|
36459
|
-
className: modules_48c02c99.item,
|
|
36460
|
-
selected: selected,
|
|
36461
|
-
title: col.title,
|
|
36462
|
-
variant: "checkbox",
|
|
36463
|
-
onClick: function onClick() {
|
|
36464
|
-
if (selected) {
|
|
36465
|
-
setHiddenColumns(_objectSpread2(_objectSpread2({}, hiddenColumns), {}, _defineProperty$1({}, col.id, true)));
|
|
36466
|
-
} else {
|
|
36467
|
-
setHiddenColumns(_objectSpread2(_objectSpread2({}, hiddenColumns), {}, _defineProperty$1({}, col.id, false)));
|
|
37277
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
37278
|
+
className: modules_48c02c99.columns,
|
|
37279
|
+
children: columns === null || columns === void 0 ? void 0 : columns.filter(function (col) {
|
|
37280
|
+
var _col$id;
|
|
37281
|
+
return (col === null || col === void 0 ? void 0 : (_col$id = col.id) === null || _col$id === void 0 ? void 0 : _col$id.toLowerCase().indexOf(search === null || search === void 0 ? void 0 : search.toLowerCase())) !== -1 && search != null && search !== '' || search == null || search === '';
|
|
37282
|
+
}).map(function (col) {
|
|
37283
|
+
var selected = [null, false, undefined].includes(hiddenColumns === null || hiddenColumns === void 0 ? void 0 : hiddenColumns[col === null || col === void 0 ? void 0 : col.id]);
|
|
37284
|
+
return /*#__PURE__*/jsxRuntime.jsx(DropdownItem, {
|
|
37285
|
+
className: modules_48c02c99.item,
|
|
37286
|
+
selected: selected,
|
|
37287
|
+
title: col.title,
|
|
37288
|
+
variant: "checkbox",
|
|
37289
|
+
onClick: function onClick() {
|
|
37290
|
+
if (selected) {
|
|
37291
|
+
setHiddenColumns(_objectSpread2(_objectSpread2({}, hiddenColumns), {}, _defineProperty$1({}, col.id, true)));
|
|
37292
|
+
} else {
|
|
37293
|
+
setHiddenColumns(_objectSpread2(_objectSpread2({}, hiddenColumns), {}, _defineProperty$1({}, col.id, false)));
|
|
37294
|
+
}
|
|
36468
37295
|
}
|
|
36469
|
-
}
|
|
36470
|
-
}
|
|
36471
|
-
})
|
|
37296
|
+
}, col.id);
|
|
37297
|
+
})
|
|
37298
|
+
})]
|
|
36472
37299
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
36473
37300
|
className: modules_48c02c99.footer,
|
|
36474
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
37301
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
36475
37302
|
className: modules_48c02c99.expand,
|
|
36476
|
-
size: "sm",
|
|
36477
|
-
radius: "ellipse",
|
|
36478
37303
|
color: "default",
|
|
36479
37304
|
title: expanded ? 'See Less' : 'See More',
|
|
36480
|
-
rightComponent: function
|
|
37305
|
+
rightComponent: !expanded && function () {
|
|
37306
|
+
return /*#__PURE__*/jsxRuntime.jsx(AngleDouble, {
|
|
37307
|
+
className: modules_48c02c99.icon
|
|
37308
|
+
});
|
|
37309
|
+
},
|
|
37310
|
+
leftComponent: expanded && function () {
|
|
36481
37311
|
return /*#__PURE__*/jsxRuntime.jsx(AngleDouble, {
|
|
36482
37312
|
className: modules_48c02c99.icon
|
|
36483
37313
|
});
|
|
@@ -36493,12 +37323,12 @@ var Columns = function Columns(props) {
|
|
|
36493
37323
|
});
|
|
36494
37324
|
};
|
|
36495
37325
|
|
|
36496
|
-
var css$b = ".
|
|
36497
|
-
var modules_a0fe63f9 = {"root":"
|
|
37326
|
+
var css$b = ".TableFilters_module_root__3c1e35fb[data-elem=base-cell] {\n -ms-overflow-style: none;\n scrollbar-width: none;\n overflow-x: auto;\n padding: 0.5rem;\n gap: 1.25rem;\n width: 100%;\n}\n.TableFilters_module_root__3c1e35fb[data-elem=base-cell]::-webkit-scrollbar {\n display: none;\n}\n.TableFilters_module_root__3c1e35fb[data-elem=base-cell] .TableFilters_module_icon__3c1e35fb {\n width: 1.5rem;\n height: 1.5rem;\n flex-shrink: 0;\n}\n.TableFilters_module_root__3c1e35fb[data-elem=base-cell] button.TableFilters_module_iconButton__3c1e35fb {\n height: 100%;\n background: var(--grey8);\n border: 1px solid var(--grey4);\n color: var(--black);\n}\n.TableFilters_module_root__3c1e35fb[data-elem=base-cell] > [data-elem*=component] {\n height: 100%;\n}\n.TableFilters_module_root__3c1e35fb[data-elem=base-cell] .TableFilters_module_left__3c1e35fb,\n.TableFilters_module_root__3c1e35fb[data-elem=base-cell] .TableFilters_module_center__3c1e35fb,\n.TableFilters_module_root__3c1e35fb[data-elem=base-cell] .TableFilters_module_right__3c1e35fb {\n height: 100%;\n}\n.TableFilters_module_root__3c1e35fb[data-elem=base-cell] > [data-elem=component1] .TableFilters_module_left__3c1e35fb {\n gap: 1rem;\n background: var(--grey8);\n border: 1px solid var(--grey4);\n color: var(--black);\n}\n.TableFilters_module_root__3c1e35fb[data-elem=base-cell] > [data-elem=component1] .TableFilters_module_left__3c1e35fb [data-elem=left] {\n gap: 1rem;\n}\n.TableFilters_module_root__3c1e35fb[data-elem=base-cell] > [data-elem=component1] .TableFilters_module_left__3c1e35fb .TableFilters_module_icon__3c1e35fb {\n fill: var(--black);\n}\n.TableFilters_module_root__3c1e35fb[data-elem=base-cell] > [data-elem=component1] .TableFilters_module_left__3c1e35fb .TableFilters_module_filterValue__3c1e35fb {\n color: var(--white);\n background: var(--highlight);\n padding: 0.125rem 0.5rem;\n border-radius: 50%;\n font-size: 0.813rem;\n}\n.TableFilters_module_root__3c1e35fb[data-elem=base-cell] > [data-elem=component2] {\n flex: 1;\n}\n.TableFilters_module_root__3c1e35fb[data-elem=base-cell] > [data-elem=component2] .TableFilters_module_center__3c1e35fb {\n width: 100%;\n}\n.TableFilters_module_root__3c1e35fb[data-elem=base-cell] > [data-elem=component2] .TableFilters_module_center__3c1e35fb [data-elem=base-cell] {\n border-color: var(--grey4);\n}\n.TableFilters_module_root__3c1e35fb[data-elem=base-cell] > [data-elem=component2] .TableFilters_module_center__3c1e35fb .TableFilters_module_icon__3c1e35fb {\n width: 1.25rem;\n}\n.TableFilters_module_root__3c1e35fb[data-elem=base-cell] .TableFilters_module_right__3c1e35fb {\n width: auto;\n padding: 0;\n min-width: 0rem;\n gap: 0.5rem;\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n}\n.TableFilters_module_root__3c1e35fb[data-elem=base-cell] .TableFilters_module_right__3c1e35fb > [data-elem*=component] {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n height: 100%;\n}";
|
|
37327
|
+
var modules_a0fe63f9 = {"root":"TableFilters_module_root__3c1e35fb","icon":"TableFilters_module_icon__3c1e35fb","icon-button":"TableFilters_module_iconButton__3c1e35fb","left":"TableFilters_module_left__3c1e35fb","center":"TableFilters_module_center__3c1e35fb","right":"TableFilters_module_right__3c1e35fb","filter-value":"TableFilters_module_filterValue__3c1e35fb"};
|
|
36498
37328
|
n(css$b,{});
|
|
36499
37329
|
|
|
36500
|
-
var css$a = ".
|
|
36501
|
-
var modules_37a5ff73 = {"root":"
|
|
37330
|
+
var css$a = ".Skeleton_module_root__bdc934d4[data-elem=base-cell] {\n width: 100%;\n gap: 1.25rem;\n}\n.Skeleton_module_root__bdc934d4[data-elem=base-cell] > [data-elem=component1] {\n flex: 1;\n}\n.Skeleton_module_root__bdc934d4[data-elem=base-cell] > [data-elem=component2] {\n flex: 6;\n}\n.Skeleton_module_root__bdc934d4[data-elem=base-cell] > [data-elem=component3] {\n flex: 3;\n}\n.Skeleton_module_root__bdc934d4[data-elem=base-cell] > [data-elem=component3] > [data-elem=base-cell] {\n padding: 0;\n align-items: flex-start;\n height: auto;\n}\n.Skeleton_module_root__bdc934d4[data-elem=base-cell] > [data-elem=component3] > [data-elem=base-cell] > [data-elem*=component] {\n flex: 1;\n}\n.Skeleton_module_root__bdc934d4[data-elem=base-cell] > [data-elem=component3] > [data-elem=base-cell] > [data-elem*=component] > [data-elem=skeleton] {\n height: 1.5rem;\n}";
|
|
37331
|
+
var modules_37a5ff73 = {"root":"Skeleton_module_root__bdc934d4"};
|
|
36502
37332
|
n(css$a,{});
|
|
36503
37333
|
|
|
36504
37334
|
var TableFiltersSkeleton = function TableFiltersSkeleton() {
|
|
@@ -36512,16 +37342,15 @@ var TableFiltersSkeleton = function TableFiltersSkeleton() {
|
|
|
36512
37342
|
className: modules_37a5ff73.search
|
|
36513
37343
|
}),
|
|
36514
37344
|
component3: /*#__PURE__*/jsxRuntime.jsx(BaseCell, {
|
|
37345
|
+
flexible: true,
|
|
37346
|
+
size: "auto",
|
|
36515
37347
|
component1: /*#__PURE__*/jsxRuntime.jsx(Skeleton, {
|
|
36516
|
-
variant: "circle",
|
|
36517
37348
|
className: modules_37a5ff73.columns
|
|
36518
37349
|
}),
|
|
36519
37350
|
component2: /*#__PURE__*/jsxRuntime.jsx(Skeleton, {
|
|
36520
|
-
variant: "circle",
|
|
36521
37351
|
className: modules_37a5ff73.refresh
|
|
36522
37352
|
}),
|
|
36523
37353
|
component3: /*#__PURE__*/jsxRuntime.jsx(Skeleton, {
|
|
36524
|
-
variant: "circle",
|
|
36525
37354
|
className: modules_37a5ff73.settings
|
|
36526
37355
|
})
|
|
36527
37356
|
})
|
|
@@ -36602,12 +37431,13 @@ var TableFilters = function TableFilters(props) {
|
|
|
36602
37431
|
},
|
|
36603
37432
|
size: "auto",
|
|
36604
37433
|
className: modules_a0fe63f9['icon-button'],
|
|
36605
|
-
|
|
37434
|
+
color: "default",
|
|
36606
37435
|
leftComponent: function leftComponent() {
|
|
36607
37436
|
return /*#__PURE__*/jsxRuntime.jsx(Columns$1, {
|
|
36608
37437
|
className: modules_a0fe63f9.icon
|
|
36609
37438
|
});
|
|
36610
37439
|
},
|
|
37440
|
+
title: "Columns",
|
|
36611
37441
|
onClick: function onClick() {
|
|
36612
37442
|
setOpenColumns(function (prev) {
|
|
36613
37443
|
return !prev;
|
|
@@ -36625,7 +37455,8 @@ var TableFilters = function TableFilters(props) {
|
|
|
36625
37455
|
component2: !disabledRefresh && /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
36626
37456
|
size: "auto",
|
|
36627
37457
|
className: modules_a0fe63f9['icon-button'],
|
|
36628
|
-
|
|
37458
|
+
color: "default",
|
|
37459
|
+
title: "Refresh",
|
|
36629
37460
|
onClick: onRefresh,
|
|
36630
37461
|
leftComponent: function leftComponent() {
|
|
36631
37462
|
return /*#__PURE__*/jsxRuntime.jsx(Refresh, {
|
|
@@ -36636,9 +37467,10 @@ var TableFilters = function TableFilters(props) {
|
|
|
36636
37467
|
component3: !disabledSettings && /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
36637
37468
|
size: "auto",
|
|
36638
37469
|
className: modules_a0fe63f9['icon-button'],
|
|
36639
|
-
|
|
37470
|
+
color: "default",
|
|
37471
|
+
title: "Settings",
|
|
36640
37472
|
leftComponent: function leftComponent() {
|
|
36641
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
37473
|
+
return /*#__PURE__*/jsxRuntime.jsx(Settings, {
|
|
36642
37474
|
className: modules_a0fe63f9.icon
|
|
36643
37475
|
});
|
|
36644
37476
|
}
|
|
@@ -36656,7 +37488,13 @@ TableFilters.propTypes = {
|
|
|
36656
37488
|
filterValue: propTypes$1.exports.shape({
|
|
36657
37489
|
applied: propTypes$1.exports.number
|
|
36658
37490
|
}),
|
|
36659
|
-
loading: propTypes$1.exports.bool
|
|
37491
|
+
loading: propTypes$1.exports.bool,
|
|
37492
|
+
disabledFilterOptions: propTypes$1.exports.shape({
|
|
37493
|
+
filterButton: propTypes$1.exports.bool,
|
|
37494
|
+
refresh: propTypes$1.exports.bool,
|
|
37495
|
+
columnFilter: propTypes$1.exports.bool,
|
|
37496
|
+
settings: propTypes$1.exports.bool
|
|
37497
|
+
})
|
|
36660
37498
|
};
|
|
36661
37499
|
TableFilters.defaultProps = {
|
|
36662
37500
|
className: '',
|
|
@@ -36667,7 +37505,13 @@ TableFilters.defaultProps = {
|
|
|
36667
37505
|
filterValue: {
|
|
36668
37506
|
applied: null
|
|
36669
37507
|
},
|
|
36670
|
-
loading: null
|
|
37508
|
+
loading: null,
|
|
37509
|
+
disabledFilterOptions: {
|
|
37510
|
+
filterButton: false,
|
|
37511
|
+
refresh: false,
|
|
37512
|
+
columnFilter: false,
|
|
37513
|
+
settings: false
|
|
37514
|
+
}
|
|
36671
37515
|
};
|
|
36672
37516
|
|
|
36673
37517
|
var css$9 = ".Table_module_root__d17cb64f {\n position: relative;\n border-style: solid;\n border-color: var(--grey4);\n border-width: 1px 1px 0px 1px;\n border-radius: 0.25rem;\n width: 100%;\n max-width: 100%;\n height: 100%;\n overflow: hidden;\n}\n.Table_module_root__d17cb64f .Table_module_table__d17cb64f {\n height: calc(100% - 6rem);\n padding-bottom: 3.5rem;\n}\n.Table_module_root__d17cb64f .Table_module_pagination__d17cb64f {\n position: absolute;\n bottom: 0;\n left: 50%;\n transform: translateX(-50%);\n}\n.Table_module_root__d17cb64f .Table_module_pagination__d17cb64f.Table_module_floating__d17cb64f {\n bottom: 1rem;\n}\n.Table_module_root__d17cb64f .Table_module_chips__d17cb64f,\n.Table_module_root__d17cb64f .Table_module_filters__d17cb64f,\n.Table_module_root__d17cb64f .Table_module_table__d17cb64f > [data-elem=table-header] {\n position: -webkit-sticky;\n position: sticky;\n z-index: 1;\n top: 0;\n}";
|
|
@@ -36852,17 +37696,14 @@ Table.defaultProps = {
|
|
|
36852
37696
|
}
|
|
36853
37697
|
};
|
|
36854
37698
|
|
|
36855
|
-
var css$8 = ".
|
|
36856
|
-
var modules_78ab5066 = {"root":"
|
|
37699
|
+
var css$8 = ".Tabs_module_root__83feec3e {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n}\n.Tabs_module_root__83feec3e > .Tabs_module_tab__83feec3e {\n padding: 0.75rem;\n gap: 0.75rem;\n}\n.Tabs_module_root__83feec3e > .Tabs_module_tab__83feec3e > [data-elem=component1] > .Tabs_module_icon__83feec3e,\n.Tabs_module_root__83feec3e > .Tabs_module_tab__83feec3e > [data-elem=component3] > .Tabs_module_icon__83feec3e {\n width: 1.5rem;\n height: 1.5rem;\n fill: var(--black);\n}\n.Tabs_module_root__83feec3e > .Tabs_module_tab__83feec3e > [data-elem=component2] {\n color: var(--black);\n}\n.Tabs_module_root__83feec3e > .Tabs_module_tab__83feec3e.Tabs_module_active__83feec3e {\n border-bottom: 2px solid var(--highlight);\n}\n.Tabs_module_root__83feec3e > .Tabs_module_tab__83feec3e.Tabs_module_active__83feec3e > [data-elem=component1] > .Tabs_module_icon__83feec3e,\n.Tabs_module_root__83feec3e > .Tabs_module_tab__83feec3e.Tabs_module_active__83feec3e > [data-elem=component3] > .Tabs_module_icon__83feec3e {\n fill: var(--highlight);\n}\n.Tabs_module_root__83feec3e > .Tabs_module_tab__83feec3e.Tabs_module_active__83feec3e > [data-elem=component2] {\n color: var(--highlight);\n}\n.Tabs_module_root__83feec3e > .Tabs_module_tab__83feec3e:hover {\n background: var(--info-bg);\n}\n.Tabs_module_root__83feec3e > .Tabs_module_tab__83feec3e:hover > [data-elem=component1] > .Tabs_module_icon__83feec3e,\n.Tabs_module_root__83feec3e > .Tabs_module_tab__83feec3e:hover > [data-elem=component3] > .Tabs_module_icon__83feec3e {\n fill: var(--highlight);\n}\n.Tabs_module_root__83feec3e > .Tabs_module_tab__83feec3e:hover > [data-elem=component2] {\n color: var(--highlight);\n}";
|
|
37700
|
+
var modules_78ab5066 = {"root":"Tabs_module_root__83feec3e","tab":"Tabs_module_tab__83feec3e","icon":"Tabs_module_icon__83feec3e","active":"Tabs_module_active__83feec3e"};
|
|
36857
37701
|
n(css$8,{});
|
|
36858
37702
|
|
|
36859
37703
|
var Tabs = function Tabs(props) {
|
|
36860
37704
|
var tabs = props.tabs,
|
|
36861
37705
|
selectedTab = props.selectedTab,
|
|
36862
37706
|
setSelectedTab = props.setSelectedTab;
|
|
36863
|
-
var tabViewClassName = function tabViewClassName(id) {
|
|
36864
|
-
return id === selectedTab ? "".concat(modules_78ab5066['tab-view-selected']) : "".concat(modules_78ab5066['tab-view']);
|
|
36865
|
-
};
|
|
36866
37707
|
var onTabClick = function onTabClick(id) {
|
|
36867
37708
|
setSelectedTab(id);
|
|
36868
37709
|
};
|
|
@@ -36873,44 +37714,27 @@ var Tabs = function Tabs(props) {
|
|
|
36873
37714
|
title = tab.title,
|
|
36874
37715
|
LeftIcon = tab.leftIcon,
|
|
36875
37716
|
RightIcon = tab.rightIcon;
|
|
36876
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
37717
|
+
return /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
37718
|
+
size: "auto",
|
|
37719
|
+
color: "default",
|
|
37720
|
+
radius: "none",
|
|
37721
|
+
variant: "text",
|
|
36877
37722
|
onClick: function onClick() {
|
|
36878
|
-
|
|
37723
|
+
onTabClick(id);
|
|
36879
37724
|
},
|
|
36880
|
-
|
|
36881
|
-
|
|
36882
|
-
|
|
36883
|
-
|
|
36884
|
-
className: modules_78ab5066.
|
|
36885
|
-
|
|
36886
|
-
|
|
36887
|
-
|
|
36888
|
-
|
|
36889
|
-
|
|
36890
|
-
|
|
36891
|
-
|
|
36892
|
-
|
|
36893
|
-
})
|
|
36894
|
-
})
|
|
36895
|
-
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
36896
|
-
style: {
|
|
36897
|
-
paddingRight: !RightIcon ? 8 : 0
|
|
36898
|
-
},
|
|
36899
|
-
children: title
|
|
36900
|
-
})]
|
|
36901
|
-
}), RightIcon && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
36902
|
-
className: modules_78ab5066.right,
|
|
36903
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("vl", {
|
|
36904
|
-
className: modules_78ab5066.saperator
|
|
36905
|
-
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
36906
|
-
className: modules_78ab5066['icon-container'],
|
|
36907
|
-
children: /*#__PURE__*/jsxRuntime.jsx(RightIcon, {
|
|
36908
|
-
className: classes(modules_78ab5066.icon)
|
|
36909
|
-
})
|
|
36910
|
-
})]
|
|
36911
|
-
})]
|
|
36912
|
-
})
|
|
36913
|
-
}, tab);
|
|
37725
|
+
title: title,
|
|
37726
|
+
className: classes(modules_78ab5066.tab, selectedTab === id ? modules_78ab5066.active : ''),
|
|
37727
|
+
leftComponent: LeftIcon && function () {
|
|
37728
|
+
return /*#__PURE__*/jsxRuntime.jsx(LeftIcon, {
|
|
37729
|
+
className: modules_78ab5066.icon
|
|
37730
|
+
});
|
|
37731
|
+
},
|
|
37732
|
+
rightComponent: RightIcon && function () {
|
|
37733
|
+
return /*#__PURE__*/jsxRuntime.jsx(RightIcon, {
|
|
37734
|
+
className: modules_78ab5066.icon
|
|
37735
|
+
});
|
|
37736
|
+
}
|
|
37737
|
+
}, id);
|
|
36914
37738
|
})
|
|
36915
37739
|
});
|
|
36916
37740
|
};
|
|
@@ -36945,92 +37769,102 @@ Tabs.defaultProps = {
|
|
|
36945
37769
|
setSelectedTab: 'None'
|
|
36946
37770
|
};
|
|
36947
37771
|
|
|
36948
|
-
|
|
36949
|
-
|
|
37772
|
+
function o(f){return r=>{f.forEach(n=>{typeof n=="function"?n(r):n!=null&&(n.current=r);});}}
|
|
37773
|
+
|
|
37774
|
+
var css$7 = ".Tooltip_module_tooltip__1cb07177 {\n text-align: center;\n position: fixed;\n border-radius: 0.25rem;\n min-width: auto;\n max-width: 12rem;\n padding: 0.375rem;\n font-size: 0.875rem;\n font-family: sans-serif;\n line-height: 1;\n}\n.Tooltip_module_tooltip__1cb07177.Tooltip_module_light__1cb07177 {\n color: var(--black);\n background: var(--grey7);\n border-color: var(--black);\n}\n.Tooltip_module_tooltip__1cb07177.Tooltip_module_light__1cb07177 .Tooltip_module_arrow__1cb07177 {\n background: var(--grey7);\n}\n.Tooltip_module_tooltip__1cb07177.Tooltip_module_dark__1cb07177 {\n color: var(--white);\n background: var(--black);\n border-color: var(--white);\n}\n.Tooltip_module_tooltip__1cb07177.Tooltip_module_dark__1cb07177 .Tooltip_module_arrow__1cb07177 {\n background: var(--black);\n}\n.Tooltip_module_tooltip__1cb07177 .Tooltip_module_arrow__1cb07177 {\n position: absolute;\n width: 1rem;\n height: 1rem;\n z-index: -1;\n pointer-events: none;\n transform: rotate(45deg);\n}";
|
|
37775
|
+
var modules_e4619b04 = {"tooltip":"Tooltip_module_tooltip__1cb07177","light":"Tooltip_module_light__1cb07177","arrow":"Tooltip_module_arrow__1cb07177","dark":"Tooltip_module_dark__1cb07177"};
|
|
36950
37776
|
n(css$7,{});
|
|
36951
37777
|
|
|
36952
|
-
var
|
|
36953
|
-
var
|
|
36954
|
-
var position = _ref.position,
|
|
36955
|
-
anchor = _ref.anchor,
|
|
36956
|
-
content = _ref.content;
|
|
36957
|
-
var style = {
|
|
36958
|
-
width: "calc(".concat(content.length / 2, "rem + 0.75rem)")
|
|
36959
|
-
};
|
|
36960
|
-
switch (position) {
|
|
36961
|
-
case 'top':
|
|
36962
|
-
return _objectSpread2(_objectSpread2({}, style), {}, {
|
|
36963
|
-
top: "calc(".concat((_anchor$current$getBo = anchor === null || anchor === void 0 ? void 0 : (_anchor$current = anchor.current) === null || _anchor$current === void 0 ? void 0 : (_anchor$current$getBo2 = _anchor$current.getBoundingClientRect) === null || _anchor$current$getBo2 === void 0 ? void 0 : (_anchor$current$getBo3 = _anchor$current$getBo2.call(_anchor$current)) === null || _anchor$current$getBo3 === void 0 ? void 0 : _anchor$current$getBo3.top) !== null && _anchor$current$getBo !== void 0 ? _anchor$current$getBo : 0, "px - 0.375rem)"),
|
|
36964
|
-
left: "calc(".concat(((_anchor$current$getBo4 = anchor === null || anchor === void 0 ? void 0 : (_anchor$current2 = anchor.current) === null || _anchor$current2 === void 0 ? void 0 : (_anchor$current2$getB = _anchor$current2.getBoundingClientRect) === null || _anchor$current2$getB === void 0 ? void 0 : (_anchor$current2$getB2 = _anchor$current2$getB.call(_anchor$current2)) === null || _anchor$current2$getB2 === void 0 ? void 0 : _anchor$current2$getB2.left) !== null && _anchor$current$getBo4 !== void 0 ? _anchor$current$getBo4 : 0) + ((_anchor$current$getBo5 = anchor === null || anchor === void 0 ? void 0 : (_anchor$current3 = anchor.current) === null || _anchor$current3 === void 0 ? void 0 : (_anchor$current3$getB = _anchor$current3.getBoundingClientRect) === null || _anchor$current3$getB === void 0 ? void 0 : (_anchor$current3$getB2 = _anchor$current3$getB.call(_anchor$current3)) === null || _anchor$current3$getB2 === void 0 ? void 0 : _anchor$current3$getB2.width) !== null && _anchor$current$getBo5 !== void 0 ? _anchor$current$getBo5 : 0) / 2, "px"),
|
|
36965
|
-
transform: 'translate(-50%, -100%)'
|
|
36966
|
-
});
|
|
36967
|
-
case 'bottom':
|
|
36968
|
-
return _objectSpread2(_objectSpread2({}, style), {}, {
|
|
36969
|
-
top: "calc(".concat((_anchor$current$getBo6 = anchor === null || anchor === void 0 ? void 0 : (_anchor$current4 = anchor.current) === null || _anchor$current4 === void 0 ? void 0 : (_anchor$current4$getB = _anchor$current4.getBoundingClientRect) === null || _anchor$current4$getB === void 0 ? void 0 : (_anchor$current4$getB2 = _anchor$current4$getB.call(_anchor$current4)) === null || _anchor$current4$getB2 === void 0 ? void 0 : _anchor$current4$getB2.bottom) !== null && _anchor$current$getBo6 !== void 0 ? _anchor$current$getBo6 : 0, "px + 0.375rem)"),
|
|
36970
|
-
left: "calc(".concat(((_anchor$current$getBo7 = anchor === null || anchor === void 0 ? void 0 : (_anchor$current5 = anchor.current) === null || _anchor$current5 === void 0 ? void 0 : (_anchor$current5$getB = _anchor$current5.getBoundingClientRect) === null || _anchor$current5$getB === void 0 ? void 0 : (_anchor$current5$getB2 = _anchor$current5$getB.call(_anchor$current5)) === null || _anchor$current5$getB2 === void 0 ? void 0 : _anchor$current5$getB2.left) !== null && _anchor$current$getBo7 !== void 0 ? _anchor$current$getBo7 : 0) + ((_anchor$current$getBo8 = anchor === null || anchor === void 0 ? void 0 : (_anchor$current6 = anchor.current) === null || _anchor$current6 === void 0 ? void 0 : (_anchor$current6$getB = _anchor$current6.getBoundingClientRect) === null || _anchor$current6$getB === void 0 ? void 0 : (_anchor$current6$getB2 = _anchor$current6$getB.call(_anchor$current6)) === null || _anchor$current6$getB2 === void 0 ? void 0 : _anchor$current6$getB2.width) !== null && _anchor$current$getBo8 !== void 0 ? _anchor$current$getBo8 : 0) / 2, "px"),
|
|
36971
|
-
transform: 'translate(-50%, 0%)'
|
|
36972
|
-
});
|
|
36973
|
-
case 'left':
|
|
36974
|
-
return _objectSpread2(_objectSpread2({}, style), {}, {
|
|
36975
|
-
top: "calc(".concat(((_anchor$current$getBo9 = anchor === null || anchor === void 0 ? void 0 : (_anchor$current7 = anchor.current) === null || _anchor$current7 === void 0 ? void 0 : (_anchor$current7$getB = _anchor$current7.getBoundingClientRect) === null || _anchor$current7$getB === void 0 ? void 0 : (_anchor$current7$getB2 = _anchor$current7$getB.call(_anchor$current7)) === null || _anchor$current7$getB2 === void 0 ? void 0 : _anchor$current7$getB2.top) !== null && _anchor$current$getBo9 !== void 0 ? _anchor$current$getBo9 : 0) + ((_anchor$current$getBo10 = anchor === null || anchor === void 0 ? void 0 : (_anchor$current8 = anchor.current) === null || _anchor$current8 === void 0 ? void 0 : (_anchor$current8$getB = _anchor$current8.getBoundingClientRect) === null || _anchor$current8$getB === void 0 ? void 0 : (_anchor$current8$getB2 = _anchor$current8$getB.call(_anchor$current8)) === null || _anchor$current8$getB2 === void 0 ? void 0 : _anchor$current8$getB2.height) !== null && _anchor$current$getBo10 !== void 0 ? _anchor$current$getBo10 : 0) / 2, "px)"),
|
|
36976
|
-
left: "calc(".concat((_anchor$current$getBo11 = anchor === null || anchor === void 0 ? void 0 : (_anchor$current9 = anchor.current) === null || _anchor$current9 === void 0 ? void 0 : (_anchor$current9$getB = _anchor$current9.getBoundingClientRect) === null || _anchor$current9$getB === void 0 ? void 0 : (_anchor$current9$getB2 = _anchor$current9$getB.call(_anchor$current9)) === null || _anchor$current9$getB2 === void 0 ? void 0 : _anchor$current9$getB2.left) !== null && _anchor$current$getBo11 !== void 0 ? _anchor$current$getBo11 : 0, "px - 0.375rem"),
|
|
36977
|
-
transform: 'translate(-100%, -50%)'
|
|
36978
|
-
});
|
|
36979
|
-
case 'right':
|
|
36980
|
-
return _objectSpread2(_objectSpread2({}, style), {}, {
|
|
36981
|
-
top: "calc(".concat(((_anchor$current$getBo12 = anchor === null || anchor === void 0 ? void 0 : (_anchor$current10 = anchor.current) === null || _anchor$current10 === void 0 ? void 0 : (_anchor$current10$get = _anchor$current10.getBoundingClientRect) === null || _anchor$current10$get === void 0 ? void 0 : (_anchor$current10$get2 = _anchor$current10$get.call(_anchor$current10)) === null || _anchor$current10$get2 === void 0 ? void 0 : _anchor$current10$get2.top) !== null && _anchor$current$getBo12 !== void 0 ? _anchor$current$getBo12 : 0) + ((_anchor$current$getBo13 = anchor === null || anchor === void 0 ? void 0 : (_anchor$current11 = anchor.current) === null || _anchor$current11 === void 0 ? void 0 : (_anchor$current11$get = _anchor$current11.getBoundingClientRect) === null || _anchor$current11$get === void 0 ? void 0 : (_anchor$current11$get2 = _anchor$current11$get.call(_anchor$current11)) === null || _anchor$current11$get2 === void 0 ? void 0 : _anchor$current11$get2.height) !== null && _anchor$current$getBo13 !== void 0 ? _anchor$current$getBo13 : 0) / 2, "px)"),
|
|
36982
|
-
left: "calc(".concat((_anchor$current$getBo14 = anchor === null || anchor === void 0 ? void 0 : (_anchor$current12 = anchor.current) === null || _anchor$current12 === void 0 ? void 0 : (_anchor$current12$get = _anchor$current12.getBoundingClientRect) === null || _anchor$current12$get === void 0 ? void 0 : (_anchor$current12$get2 = _anchor$current12$get.call(_anchor$current12)) === null || _anchor$current12$get2 === void 0 ? void 0 : _anchor$current12$get2.right) !== null && _anchor$current$getBo14 !== void 0 ? _anchor$current$getBo14 : 0, "px + 0.375rem"),
|
|
36983
|
-
transform: 'translate(0%, -50%)'
|
|
36984
|
-
});
|
|
36985
|
-
default:
|
|
36986
|
-
return {};
|
|
36987
|
-
}
|
|
36988
|
-
};
|
|
36989
|
-
var Tooltip = function Tooltip(props) {
|
|
37778
|
+
var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, propRef) {
|
|
37779
|
+
var _middlewareData$arrow, _middlewareData$arrow2, _middlewareData$arrow3, _middlewareData$arrow4;
|
|
36990
37780
|
var children = props.children,
|
|
36991
37781
|
position = props.position,
|
|
36992
37782
|
content = props.content,
|
|
36993
37783
|
variant = props.variant,
|
|
36994
37784
|
className = props.className;
|
|
36995
|
-
var
|
|
36996
|
-
var tooltipRef = React.useRef(null);
|
|
37785
|
+
var arrowEl = React.useRef(null);
|
|
36997
37786
|
var _useState = React.useState(false),
|
|
36998
37787
|
_useState2 = _slicedToArray(_useState, 2),
|
|
36999
37788
|
open = _useState2[0],
|
|
37000
37789
|
setOpen = _useState2[1];
|
|
37001
|
-
|
|
37002
|
-
|
|
37003
|
-
|
|
37004
|
-
|
|
37005
|
-
|
|
37006
|
-
|
|
37007
|
-
|
|
37008
|
-
|
|
37009
|
-
|
|
37010
|
-
|
|
37011
|
-
|
|
37012
|
-
|
|
37013
|
-
|
|
37014
|
-
,
|
|
37015
|
-
|
|
37016
|
-
|
|
37017
|
-
|
|
37790
|
+
|
|
37791
|
+
// eslint-disable-next-line object-curly-newline
|
|
37792
|
+
var _useFloating = useFloating({
|
|
37793
|
+
open: open,
|
|
37794
|
+
onOpenChange: setOpen,
|
|
37795
|
+
placement: position,
|
|
37796
|
+
// Make sure the tooltip stays on the screen
|
|
37797
|
+
whileElementsMounted: autoUpdate,
|
|
37798
|
+
middleware: [offset(12), flip(), shift(), arrow({
|
|
37799
|
+
element: arrowEl
|
|
37800
|
+
})]
|
|
37801
|
+
}),
|
|
37802
|
+
x = _useFloating.x,
|
|
37803
|
+
y = _useFloating.y,
|
|
37804
|
+
reference = _useFloating.reference,
|
|
37805
|
+
floating = _useFloating.floating,
|
|
37806
|
+
strategy = _useFloating.strategy,
|
|
37807
|
+
context = _useFloating.context,
|
|
37808
|
+
middlewareData = _useFloating.middlewareData,
|
|
37809
|
+
placement = _useFloating.placement;
|
|
37810
|
+
|
|
37811
|
+
// Event listeners to change the open state
|
|
37812
|
+
var hover = useHover(context, {
|
|
37813
|
+
move: true
|
|
37814
|
+
});
|
|
37815
|
+
var focus = useFocus(context);
|
|
37816
|
+
var dismiss = useDismiss(context);
|
|
37817
|
+
// Role props for screen readers
|
|
37818
|
+
var role = useRole(context, {
|
|
37819
|
+
role: 'tooltip'
|
|
37820
|
+
});
|
|
37821
|
+
|
|
37822
|
+
// Merge all the interactions into prop getters
|
|
37823
|
+
var _useInteractions = useInteractions([hover, focus, dismiss, role]),
|
|
37824
|
+
getReferenceProps = _useInteractions.getReferenceProps,
|
|
37825
|
+
getFloatingProps = _useInteractions.getFloatingProps;
|
|
37826
|
+
var childrenRef = children.ref;
|
|
37827
|
+
var ref = React.useMemo(function () {
|
|
37828
|
+
return o([reference, childrenRef, propRef]);
|
|
37829
|
+
}, [reference, childrenRef]);
|
|
37830
|
+
var clonedChildren = /*#__PURE__*/React.cloneElement(children, getReferenceProps(_objectSpread2({
|
|
37831
|
+
ref: ref
|
|
37832
|
+
}, children.props)));
|
|
37833
|
+
var side = placement.split('-')[0];
|
|
37834
|
+
var staticSide = {
|
|
37835
|
+
top: 'bottom',
|
|
37836
|
+
right: 'left',
|
|
37837
|
+
bottom: 'top',
|
|
37838
|
+
left: 'right'
|
|
37839
|
+
}[side];
|
|
37840
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
37841
|
+
children: [clonedChildren, /*#__PURE__*/jsxRuntime.jsx(Popper, {
|
|
37018
37842
|
open: open,
|
|
37019
37843
|
backdrop: false,
|
|
37020
|
-
|
|
37021
|
-
|
|
37022
|
-
|
|
37023
|
-
className: classes(modules_e4619b04.tooltip, modules_e4619b04[
|
|
37024
|
-
style:
|
|
37025
|
-
position:
|
|
37026
|
-
|
|
37027
|
-
|
|
37028
|
-
}
|
|
37029
|
-
|
|
37030
|
-
|
|
37844
|
+
wrapperId: "tooltip",
|
|
37845
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread2(_objectSpread2({}, getFloatingProps({
|
|
37846
|
+
ref: floating,
|
|
37847
|
+
className: classes(modules_e4619b04.tooltip, modules_e4619b04[variant], className),
|
|
37848
|
+
style: {
|
|
37849
|
+
position: strategy,
|
|
37850
|
+
top: y !== null && y !== void 0 ? y : 0,
|
|
37851
|
+
left: x !== null && x !== void 0 ? x : 0
|
|
37852
|
+
}
|
|
37853
|
+
})), {}, {
|
|
37854
|
+
children: [content, /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
37855
|
+
className: modules_e4619b04.arrow,
|
|
37856
|
+
ref: arrowEl,
|
|
37857
|
+
style: _defineProperty$1({
|
|
37858
|
+
left: (_middlewareData$arrow = middlewareData === null || middlewareData === void 0 ? void 0 : (_middlewareData$arrow2 = middlewareData.arrow) === null || _middlewareData$arrow2 === void 0 ? void 0 : _middlewareData$arrow2.x) !== null && _middlewareData$arrow !== void 0 ? _middlewareData$arrow : '',
|
|
37859
|
+
top: (_middlewareData$arrow3 = middlewareData === null || middlewareData === void 0 ? void 0 : (_middlewareData$arrow4 = middlewareData.arrow) === null || _middlewareData$arrow4 === void 0 ? void 0 : _middlewareData$arrow4.y) !== null && _middlewareData$arrow3 !== void 0 ? _middlewareData$arrow3 : '',
|
|
37860
|
+
right: '',
|
|
37861
|
+
bottom: ''
|
|
37862
|
+
}, staticSide, '-0.5rem')
|
|
37863
|
+
})]
|
|
37864
|
+
}))
|
|
37031
37865
|
})]
|
|
37032
37866
|
});
|
|
37033
|
-
};
|
|
37867
|
+
});
|
|
37034
37868
|
Tooltip.propTypes = {
|
|
37035
37869
|
variant: propTypes$1.exports.oneOf(['light', 'dark']),
|
|
37036
37870
|
content: propTypes$1.exports.string,
|
|
@@ -86761,6 +87595,7 @@ exports.RadioIcon = RadioIcon;
|
|
|
86761
87595
|
exports.RefreshIcon = Refresh;
|
|
86762
87596
|
exports.ResetIcon = Reset;
|
|
86763
87597
|
exports.ServerIcon = Server;
|
|
87598
|
+
exports.SettingsIcon = Settings;
|
|
86764
87599
|
exports.Stepper = Stepper;
|
|
86765
87600
|
exports.Table = Table;
|
|
86766
87601
|
exports.TableCell = TableCell;
|
|
@@ -86771,8 +87606,10 @@ exports.TableFilters = TableFilters;
|
|
|
86771
87606
|
exports.Tabs = Tabs;
|
|
86772
87607
|
exports.TextField = TextField;
|
|
86773
87608
|
exports.TickIcon = Tick;
|
|
87609
|
+
exports.TimePicker = TimePicker;
|
|
86774
87610
|
exports.Toggle = Toggle;
|
|
86775
87611
|
exports.Tooltip = Tooltip;
|
|
87612
|
+
exports.TrashIcon = Trash;
|
|
86776
87613
|
exports.ViewIcon = View;
|
|
86777
87614
|
exports.classes = classes;
|
|
86778
87615
|
exports.cloneDeep = cloneDeep;
|