@innovaccer/design-system 2.18.0 → 2.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +83 -0
- package/css/dist/MaterialSymbolsOutlined.ttf +0 -0
- package/css/dist/MaterialSymbolsRounded.ttf +0 -0
- package/css/dist/index.css +134 -87
- package/css/dist/index.css.map +1 -1
- package/css/gulpfile.js +7 -11
- package/css/material-design-icons/iconfont/MaterialSymbolsOutlined.ttf +0 -0
- package/css/material-design-icons/iconfont/MaterialSymbolsRounded.ttf +0 -0
- package/css/material-design-icons/iconfont/material-icons.css +10 -88
- package/css/src/components/actionCard.css +40 -0
- package/css/src/components/calendar.css +33 -0
- package/css/src/components/chipInput.css +23 -0
- package/css/src/components/toast.css +2 -0
- package/css/src/utils/text.css +23 -0
- package/dist/.lib/tsconfig.type.tsbuildinfo +70 -24
- package/dist/core/common.type.d.ts +6 -0
- package/dist/core/components/atoms/actionCard/ActionCard.d.ts +13 -0
- package/dist/core/components/atoms/actionCard/index.d.ts +2 -0
- package/dist/core/components/atoms/button/Button.d.ts +3 -1
- package/dist/core/components/atoms/icon/Icon.d.ts +7 -0
- package/dist/core/components/atoms/icon/utils.d.ts +7 -0
- package/dist/core/components/atoms/input/actionButton/ActionButton.d.ts +3 -1
- package/dist/core/components/atoms/popperWrapper/PopperWrapper.d.ts +20 -20
- package/dist/core/components/molecules/chipInput/ChipInput.d.ts +1 -0
- package/dist/core/components/organisms/calendar/utility.d.ts +1 -0
- package/dist/core/components/organisms/timePicker/TimePickerWithInput.d.ts +1 -0
- package/dist/core/components/organisms/timePicker/TimePickerWithSearch.d.ts +1 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.type.d.ts +1 -0
- package/dist/index.esm.js +346 -158
- package/dist/index.js +274 -86
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.br +0 -0
- package/dist/index.umd.js.gz +0 -0
- package/package.json +1 -1
- package/css/dist/MaterialIcons-Regular.ttf +0 -0
- package/css/dist/MaterialIconsOutlined-Regular.otf +0 -0
- package/css/dist/MaterialIconsRound-Regular.otf +0 -0
- package/css/dist/MaterialIconsSharp-Regular.otf +0 -0
- package/css/dist/MaterialIconsTwoTone-Regular.otf +0 -0
- package/css/material-design-icons/iconfont/MaterialIcons-Regular.ttf +0 -0
- package/css/material-design-icons/iconfont/MaterialIconsOutlined-Regular.otf +0 -0
- package/css/material-design-icons/iconfont/MaterialIconsRound-Regular.otf +0 -0
- package/css/material-design-icons/iconfont/MaterialIconsSharp-Regular.otf +0 -0
- package/css/material-design-icons/iconfont/MaterialIconsTwoTone-Regular.otf +0 -0
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
/**
|
|
3
|
-
* Generated on:
|
|
3
|
+
* Generated on: 1694185325555
|
|
4
4
|
* Package: @innovaccer/design-system
|
|
5
|
-
* Version: v2.
|
|
5
|
+
* Version: v2.20.0
|
|
6
6
|
* License: MIT
|
|
7
7
|
* Docs: https://innovaccer.github.io/design-system
|
|
8
8
|
*/
|
|
@@ -892,7 +892,8 @@
|
|
|
892
892
|
disabled = props.disabled,
|
|
893
893
|
className = props.className;
|
|
894
894
|
props.tooltip;
|
|
895
|
-
var
|
|
895
|
+
var iconVariations = props.iconVariations,
|
|
896
|
+
rest = __rest(props, ["size", "appearance", "iconAlign", "tabIndex", "largeIcon", "type", "children", "icon", "expanded", "selected", "loading", "disabled", "className", "tooltip", "iconVariations"]);
|
|
896
897
|
|
|
897
898
|
var buttonClass = classNames__default["default"]((_a = {}, _a['Button'] = true, _a['Button--expanded'] = expanded, _a["Button--" + size] = size, _a["Button--" + size + "Square"] = !children, _a["Button--" + appearance] = appearance, _a['Button--selected'] = selected && (appearance === 'basic' || appearance === 'transparent'), _a["Button--iconAlign-" + iconAlign] = children && iconAlign, _a["" + className] = className, _a));
|
|
898
899
|
var iconClass = classNames__default["default"]((_b = {}, _b['Button-icon'] = true, _b["Button-icon--" + iconAlign] = children && iconAlign, _b));
|
|
@@ -915,6 +916,7 @@
|
|
|
915
916
|
}, /*#__PURE__*/React__namespace.createElement(Icon, {
|
|
916
917
|
"data-test": "DesignSystem-Button--Icon",
|
|
917
918
|
name: icon,
|
|
919
|
+
variations: iconVariations,
|
|
918
920
|
size: largeIcon && !children ? sizeMapping$3[size] + 4 : sizeMapping$3[size]
|
|
919
921
|
})), children && /*#__PURE__*/React__namespace.createElement("span", {
|
|
920
922
|
className: "Button-text"
|
|
@@ -1154,6 +1156,27 @@
|
|
|
1154
1156
|
return undefined;
|
|
1155
1157
|
}
|
|
1156
1158
|
};
|
|
1159
|
+
var dateComparison = function dateComparison(date, operator, currDate, currMonth, currYear) {
|
|
1160
|
+
var currentDate = new Date(currYear + "-" + currMonth + "-" + currDate);
|
|
1161
|
+
|
|
1162
|
+
if (date) {
|
|
1163
|
+
switch (operator) {
|
|
1164
|
+
case 'less':
|
|
1165
|
+
return date <= currentDate;
|
|
1166
|
+
|
|
1167
|
+
case 'equal':
|
|
1168
|
+
return date.toDateString() === currentDate.toDateString();
|
|
1169
|
+
|
|
1170
|
+
case 'more':
|
|
1171
|
+
return date >= currentDate;
|
|
1172
|
+
|
|
1173
|
+
default:
|
|
1174
|
+
return false;
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
return false;
|
|
1179
|
+
};
|
|
1157
1180
|
|
|
1158
1181
|
var Calendar = function (_super) {
|
|
1159
1182
|
__extends(Calendar, _super);
|
|
@@ -1302,9 +1325,8 @@
|
|
|
1302
1325
|
neighbouringMonthDate = prevMonthDayRange + date;
|
|
1303
1326
|
type = 'prev';
|
|
1304
1327
|
} else if (date > dayRange) {
|
|
1305
|
-
neighbouringMonthIndex = index
|
|
1306
|
-
neighbouringMonthDate = date
|
|
1307
|
-
type = 'next';
|
|
1328
|
+
neighbouringMonthIndex = index;
|
|
1329
|
+
neighbouringMonthDate = date;
|
|
1308
1330
|
} else {
|
|
1309
1331
|
neighbouringMonthIndex = index;
|
|
1310
1332
|
neighbouringMonthDate = date;
|
|
@@ -1563,6 +1585,10 @@
|
|
|
1563
1585
|
'Calendar-value--disabled': disabled,
|
|
1564
1586
|
'Calendar-yearValue': true
|
|
1565
1587
|
}, _a["Calendar-yearValue--" + size] = size, _a['Calendar-value--currDateMonthYear'] = isCurrentYear(), _a));
|
|
1588
|
+
var textClass = classNames__default["default"]({
|
|
1589
|
+
'Calendar-value--currDate': isCurrentYear() && !active,
|
|
1590
|
+
'Calendar-text': true
|
|
1591
|
+
});
|
|
1566
1592
|
var getTextColor = classNames__default["default"]({
|
|
1567
1593
|
inverse: !active && !isCurrentYear() && !disabled,
|
|
1568
1594
|
white: active,
|
|
@@ -1579,7 +1605,7 @@
|
|
|
1579
1605
|
}, /*#__PURE__*/React__namespace.createElement(Text, {
|
|
1580
1606
|
size: size === 'small' ? 'small' : 'regular',
|
|
1581
1607
|
color: getTextColor,
|
|
1582
|
-
className:
|
|
1608
|
+
className: textClass
|
|
1583
1609
|
}, year));
|
|
1584
1610
|
}));
|
|
1585
1611
|
});
|
|
@@ -1631,6 +1657,10 @@
|
|
|
1631
1657
|
primary: isCurrentMonth(),
|
|
1632
1658
|
'inverse-lightest': disabled
|
|
1633
1659
|
});
|
|
1660
|
+
var textClass = classNames__default["default"]({
|
|
1661
|
+
'Calendar-value--currDate': isCurrentMonth() && !active,
|
|
1662
|
+
'Calendar-text': true
|
|
1663
|
+
});
|
|
1634
1664
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
1635
1665
|
key: row + "-" + col,
|
|
1636
1666
|
"data-test": "DesignSystem-Calendar--monthValue",
|
|
@@ -1640,7 +1670,7 @@
|
|
|
1640
1670
|
}, /*#__PURE__*/React__namespace.createElement(Text, {
|
|
1641
1671
|
size: size === 'small' ? 'small' : 'regular',
|
|
1642
1672
|
color: getTextColor,
|
|
1643
|
-
className:
|
|
1673
|
+
className: textClass
|
|
1644
1674
|
}, months[month]));
|
|
1645
1675
|
}));
|
|
1646
1676
|
});
|
|
@@ -1809,21 +1839,6 @@
|
|
|
1809
1839
|
var inRange = false;
|
|
1810
1840
|
var inRangeLast = false;
|
|
1811
1841
|
|
|
1812
|
-
if (rangePicker) {
|
|
1813
|
-
startActive = compareDate(startDate, 'equal', yearNavVal, monthNavVal, date);
|
|
1814
|
-
endActive = compareDate(endDate, 'equal', yearNavVal, monthNavVal, date);
|
|
1815
|
-
inRangeLast = compareDate(hoverDate, 'equal', yearNavVal, monthNavVal, date);
|
|
1816
|
-
active = !disabled && (startActive || endActive);
|
|
1817
|
-
|
|
1818
|
-
if (startDate && endDate) {
|
|
1819
|
-
inRange = !disabled && (compareDate(startDate, 'less', yearNavVal, monthNavVal, date) || startActive) && (compareDate(endDate, 'more', yearNavVal, monthNavVal, date) || endActive);
|
|
1820
|
-
} else if (startDate) {
|
|
1821
|
-
inRange = !disabled && (compareDate(hoverDate, 'more', yearNavVal, monthNavVal, date) || inRangeLast) && compareDate(startDate, 'less', yearNavVal, monthNavVal, date);
|
|
1822
|
-
} else if (endDate) {
|
|
1823
|
-
inRange = !disabled && (compareDate(hoverDate, 'less', yearNavVal, monthNavVal, date) || inRangeLast) && compareDate(endDate, 'more', yearNavVal, monthNavVal, date);
|
|
1824
|
-
}
|
|
1825
|
-
}
|
|
1826
|
-
|
|
1827
1842
|
var _b = getDateInfo(startDate),
|
|
1828
1843
|
sYear = _b.year,
|
|
1829
1844
|
sMonth = _b.month,
|
|
@@ -1836,37 +1851,63 @@
|
|
|
1836
1851
|
|
|
1837
1852
|
var isStart = startActive || endDate && inRangeLast && compareDate(hoverDate, 'less', eYear, eMonth, eDate);
|
|
1838
1853
|
var isEnd = endActive || startDate && inRangeLast && compareDate(hoverDate, 'more', sYear, sMonth, sDate);
|
|
1839
|
-
var isRangeError = inRange && inRangeError;
|
|
1840
1854
|
var dateInString = "" + (date <= 0 ? prevMonthDayRange + date : date > dayRange ? date - dayRange : date);
|
|
1841
1855
|
var monthInString = "" + (date <= 0 ? monthNavVal === 0 ? monthNavVal + monthBlock : (monthNavVal - 1) % monthBlock + 1 : date > dayRange ? (monthNavVal + 1) % monthBlock + 1 : monthNavVal + 1);
|
|
1842
1856
|
var yearInString = "" + (date <= 0 && monthNavVal + 1 === 1 ? yearNavVal - 1 : date > dayRange && monthNavVal + 1 === 12 ? yearNavVal + 1 : yearNavVal);
|
|
1843
1857
|
var completeDateString = (monthInString.length === 2 ? monthInString : "0" + monthInString) + "/" + (dateInString.length === 2 ? dateInString : "0" + dateInString) + "/" + yearInString;
|
|
1844
1858
|
var isEventExist = events && _typeof(events) === 'object' && events.hasOwnProperty(completeDateString);
|
|
1859
|
+
|
|
1860
|
+
if (rangePicker) {
|
|
1861
|
+
startActive = compareDate(startDate, 'equal', yearNavVal, monthNavVal, date);
|
|
1862
|
+
endActive = compareDate(endDate, 'equal', yearNavVal, monthNavVal, date);
|
|
1863
|
+
inRangeLast = compareDate(hoverDate, 'equal', yearNavVal, monthNavVal, date);
|
|
1864
|
+
active = !disabled && (startActive || endActive);
|
|
1865
|
+
|
|
1866
|
+
if (startDate && endDate) {
|
|
1867
|
+
inRange = !disabled && (dateComparison(startDate, 'less', dateInString, monthInString, yearInString) && dateComparison(endDate, 'more', dateInString, monthInString, yearInString) || startActive || endActive);
|
|
1868
|
+
} else if (startDate) {
|
|
1869
|
+
inRange = !disabled && (dateComparison(hoverDate, 'more', dateInString, monthInString, yearInString) || inRangeLast) && dateComparison(startDate, 'less', dateInString, monthInString, yearInString);
|
|
1870
|
+
} else if (endDate) {
|
|
1871
|
+
inRange = !disabled && (compareDate(hoverDate, 'less', yearNavVal, monthNavVal, date) || inRangeLast) && compareDate(endDate, 'more', yearNavVal, monthNavVal, date);
|
|
1872
|
+
}
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
var isRangeError = inRange && inRangeError;
|
|
1876
|
+
var isStartActive = startDate && dateComparison(startDate, 'equal', dateInString, monthInString, yearInString);
|
|
1877
|
+
var isEndActive = endDate && dateComparison(endDate, 'equal', dateInString, monthInString, yearInString);
|
|
1878
|
+
var activeDate = startDate && endDate && (isStartActive || isEndActive);
|
|
1879
|
+
var isHoverLast = dateComparison(hoverDate, 'equal', dateInString, monthInString, yearInString) && hoverDate && startDate && hoverDate >= startDate;
|
|
1880
|
+
var isEdgeElement = col === 0 || col === 6;
|
|
1881
|
+
var isValueRange = inRange || rangePicker && (active || activeDate);
|
|
1845
1882
|
var wrapperClass = classNames__default["default"]({
|
|
1846
1883
|
'Calendar-valueWrapper': true,
|
|
1847
|
-
'Calendar-valueWrapper--inRange':
|
|
1884
|
+
'Calendar-valueWrapper--inRange': !isEdgeElement && isValueRange,
|
|
1885
|
+
'Calendar-valueWrapper--inEdgeRange': isValueRange && isEdgeElement,
|
|
1848
1886
|
'Calendar-valueWrapper--inRangeError': isRangeError,
|
|
1849
|
-
'Calendar-valueWrapper--start': isStart && !isEnd,
|
|
1850
|
-
'Calendar-valueWrapper--end': isEnd && !isStart,
|
|
1887
|
+
'Calendar-valueWrapper--start': isStart && !isEnd && col !== 6 || rangePicker && isStartActive && col !== 6,
|
|
1888
|
+
'Calendar-valueWrapper--end': isEnd && !isStart && col !== 0 || rangePicker && isEndActive && col !== 0,
|
|
1851
1889
|
'Calendar-valueWrapper--startEnd': isStart && isEnd,
|
|
1852
|
-
'Calendar-valueWrapper--startError': isStart && isRangeError,
|
|
1853
|
-
'Calendar-valueWrapper--endError': isEnd && isRangeError,
|
|
1854
|
-
'Calendar-valueWrapper--dummy': dummy
|
|
1890
|
+
'Calendar-valueWrapper--startError': isStart && isRangeError || rangePicker && isRangeError && isStartActive,
|
|
1891
|
+
'Calendar-valueWrapper--endError': isEnd && isRangeError || rangePicker && isRangeError && isEndActive,
|
|
1892
|
+
'Calendar-valueWrapper--dummy': dummy,
|
|
1893
|
+
'Calendar-valueWrapper--hoverDate': rangePicker && isHoverLast,
|
|
1894
|
+
'Calendar-valueWrapper--inStartRange': isValueRange && col === 0 && !active && !activeDate,
|
|
1895
|
+
'Calendar-valueWrapper--inEndRange': isValueRange && col === 6 && !active && !activeDate
|
|
1855
1896
|
});
|
|
1856
1897
|
var valueClass = classNames__default["default"]((_a = {
|
|
1857
1898
|
'Calendar-value': true,
|
|
1858
|
-
'Calendar-inRangeValue': !isStart && !isEnd,
|
|
1899
|
+
'Calendar-inRangeValue': !isStart && !isEnd && !active && !activeDate,
|
|
1859
1900
|
'Calendar-value--start': isStart && !isEnd,
|
|
1860
1901
|
'Calendar-value--end': isEnd && !isStart,
|
|
1861
1902
|
'Calendar-value--startError': isStart && isRangeError,
|
|
1862
1903
|
'Calendar-value--endError': isEnd && isRangeError,
|
|
1863
|
-
'Calendar-value--active': active,
|
|
1904
|
+
'Calendar-value--active': active || activeDate,
|
|
1864
1905
|
'Calendar-value--disabled': disabled,
|
|
1865
1906
|
'Calendar-dateValue': true
|
|
1866
|
-
}, _a["Calendar-dateValue--" + size] = size, _a['Calendar-value--currDateMonthYear'] = today(), _a));
|
|
1907
|
+
}, _a["Calendar-dateValue--" + size] = size, _a['Calendar-value--currDateMonthYear'] = today(), _a['Calendar-value--currDate'] = today() && !active && !activeDate, _a));
|
|
1867
1908
|
var getTextColor = classNames__default["default"]({
|
|
1868
|
-
inverse: !active && !today() && !disabled,
|
|
1869
|
-
white: active,
|
|
1909
|
+
inverse: !active && !today() && !disabled && !activeDate,
|
|
1910
|
+
white: active || activeDate,
|
|
1870
1911
|
'primary-lighter': today() && disabled,
|
|
1871
1912
|
primary: today(),
|
|
1872
1913
|
'inverse-lightest': disabled
|
|
@@ -1884,7 +1925,7 @@
|
|
|
1884
1925
|
onMouseOver: onMouseOverHandler(date),
|
|
1885
1926
|
onMouseEnter: onMouseEnterHandler.bind(_this, date, today(), disabled)
|
|
1886
1927
|
}, date), isEventExist && _this.renderEventsIndicator(size, active)), (dummy && date > 0 && index === monthsInView - 1 || dummy && date <= 0 && index === 0) && /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(Text, {
|
|
1887
|
-
appearance: active ? 'white' : disabled ? 'disabled' : today() ? 'link' : 'default',
|
|
1928
|
+
appearance: active || activeDate ? 'white' : disabled ? 'disabled' : today() ? 'link' : 'default',
|
|
1888
1929
|
size: size === 'small' ? 'small' : 'regular',
|
|
1889
1930
|
"data-test": "DesignSystem-Calendar--dateValue",
|
|
1890
1931
|
className: valueClass,
|
|
@@ -2300,6 +2341,116 @@
|
|
|
2300
2341
|
});
|
|
2301
2342
|
};
|
|
2302
2343
|
|
|
2344
|
+
var getOpticalSize = function getOpticalSize(size) {
|
|
2345
|
+
if (size && size <= 20) {
|
|
2346
|
+
return 20;
|
|
2347
|
+
} else if (size && size >= 48) {
|
|
2348
|
+
return 48;
|
|
2349
|
+
}
|
|
2350
|
+
|
|
2351
|
+
return size;
|
|
2352
|
+
};
|
|
2353
|
+
|
|
2354
|
+
var iconVariantMapper = {
|
|
2355
|
+
more_horiz: {
|
|
2356
|
+
weight: 600,
|
|
2357
|
+
opticalSize: 24
|
|
2358
|
+
},
|
|
2359
|
+
"delete": {
|
|
2360
|
+
fill: 0
|
|
2361
|
+
},
|
|
2362
|
+
radio_button_checked: {
|
|
2363
|
+
fill: 0
|
|
2364
|
+
},
|
|
2365
|
+
radio_button_unchecked: {
|
|
2366
|
+
fill: 0
|
|
2367
|
+
},
|
|
2368
|
+
schedule: {
|
|
2369
|
+
fill: 0
|
|
2370
|
+
},
|
|
2371
|
+
help_outline: {
|
|
2372
|
+
fill: 0
|
|
2373
|
+
},
|
|
2374
|
+
check_circle_outline: {
|
|
2375
|
+
fill: 0
|
|
2376
|
+
},
|
|
2377
|
+
highlight_of: {
|
|
2378
|
+
fill: 0
|
|
2379
|
+
},
|
|
2380
|
+
credit_card: {
|
|
2381
|
+
fill: 0
|
|
2382
|
+
},
|
|
2383
|
+
delete_outline: {
|
|
2384
|
+
fill: 0
|
|
2385
|
+
},
|
|
2386
|
+
bookmark_border: {
|
|
2387
|
+
fill: 0
|
|
2388
|
+
},
|
|
2389
|
+
work_outline: {
|
|
2390
|
+
fill: 0
|
|
2391
|
+
},
|
|
2392
|
+
alarm: {
|
|
2393
|
+
fill: 0
|
|
2394
|
+
},
|
|
2395
|
+
arrow_circle_up: {
|
|
2396
|
+
fill: 0
|
|
2397
|
+
},
|
|
2398
|
+
copyright: {
|
|
2399
|
+
fill: 0
|
|
2400
|
+
},
|
|
2401
|
+
query_builder: {
|
|
2402
|
+
fill: 0
|
|
2403
|
+
},
|
|
2404
|
+
card_membership: {
|
|
2405
|
+
fill: 0
|
|
2406
|
+
},
|
|
2407
|
+
arrow_circle_down: {
|
|
2408
|
+
fill: 0
|
|
2409
|
+
},
|
|
2410
|
+
change_history: {
|
|
2411
|
+
fill: 0
|
|
2412
|
+
},
|
|
2413
|
+
aspect_ratio: {
|
|
2414
|
+
fill: 0
|
|
2415
|
+
},
|
|
2416
|
+
calendar_view_month: {
|
|
2417
|
+
fill: 0
|
|
2418
|
+
},
|
|
2419
|
+
alarm_on: {
|
|
2420
|
+
fill: 0
|
|
2421
|
+
},
|
|
2422
|
+
thumb_down_off_alt: {
|
|
2423
|
+
fill: 0
|
|
2424
|
+
},
|
|
2425
|
+
important_devices: {
|
|
2426
|
+
fill: 0
|
|
2427
|
+
},
|
|
2428
|
+
turned_in_not: {
|
|
2429
|
+
fill: 0
|
|
2430
|
+
},
|
|
2431
|
+
add_circle_outline: {
|
|
2432
|
+
fill: 0
|
|
2433
|
+
},
|
|
2434
|
+
speed: {
|
|
2435
|
+
fill: 0
|
|
2436
|
+
},
|
|
2437
|
+
content_copy: {
|
|
2438
|
+
fill: 0
|
|
2439
|
+
},
|
|
2440
|
+
timelapse: {
|
|
2441
|
+
fill: 0
|
|
2442
|
+
}
|
|
2443
|
+
};
|
|
2444
|
+
var getFontVariation = function getFontVariation(iconName, variations, type, size) {
|
|
2445
|
+
var defaultVariant = {
|
|
2446
|
+
fill: type === 'outlined' ? 0 : 1,
|
|
2447
|
+
weight: 400,
|
|
2448
|
+
grade: 0,
|
|
2449
|
+
opticalSize: getOpticalSize(size)
|
|
2450
|
+
};
|
|
2451
|
+
return __assign(__assign(__assign({}, defaultVariant), iconVariantMapper[iconName]), variations);
|
|
2452
|
+
};
|
|
2453
|
+
|
|
2303
2454
|
var Icon = function Icon(props) {
|
|
2304
2455
|
var _a;
|
|
2305
2456
|
|
|
@@ -2307,17 +2458,18 @@
|
|
|
2307
2458
|
className = props.className,
|
|
2308
2459
|
name = props.name,
|
|
2309
2460
|
size = props.size,
|
|
2310
|
-
children = props.children
|
|
2461
|
+
children = props.children,
|
|
2462
|
+
variations = props.variations;
|
|
2311
2463
|
var accessibilityProps = useAccessibilityProps(props);
|
|
2312
2464
|
var baseProps = extractBaseProps(props);
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2465
|
+
var mapper = {
|
|
2466
|
+
outline: 'outlined',
|
|
2467
|
+
sharp: 'outlined',
|
|
2468
|
+
round: 'rounded',
|
|
2469
|
+
filled: 'rounded',
|
|
2470
|
+
'two-tone': 'rounded'
|
|
2318
2471
|
};
|
|
2319
|
-
|
|
2320
|
-
var type = mapper(props.type);
|
|
2472
|
+
var type = props.type && mapper[props.type] || props.type;
|
|
2321
2473
|
|
|
2322
2474
|
var getIconAppearance = function getIconAppearance(iconColor) {
|
|
2323
2475
|
var x = iconColor.indexOf('_');
|
|
@@ -2325,10 +2477,18 @@
|
|
|
2325
2477
|
};
|
|
2326
2478
|
|
|
2327
2479
|
var color = appearance && appearance.includes('_') ? getIconAppearance(appearance) : appearance;
|
|
2328
|
-
var iconClass = classNames__default["default"]((_a = {}, _a['material-icons'] = true, _a[
|
|
2480
|
+
var iconClass = classNames__default["default"]((_a = {}, _a['material-icons'] = true, _a['material-icons-rounded'] = type === 'rounded', _a['material-icons-outlined'] = type === 'outlined', _a['Icon'] = true, _a["Icon--" + color] = appearance, _a["" + className] = className, _a));
|
|
2481
|
+
|
|
2482
|
+
var _b = getFontVariation(name, variations, type, size),
|
|
2483
|
+
fill = _b.fill,
|
|
2484
|
+
grade = _b.grade,
|
|
2485
|
+
opticalSize = _b.opticalSize,
|
|
2486
|
+
weight = _b.weight;
|
|
2487
|
+
|
|
2329
2488
|
var styles = {
|
|
2330
2489
|
fontSize: size + "px",
|
|
2331
|
-
width: size + "px"
|
|
2490
|
+
width: size + "px",
|
|
2491
|
+
'font-variation-settings': "\"FILL\" " + fill + ", \"wght\" " + weight + ", \"GRAD\" " + grade + ", \"opsz\" " + opticalSize
|
|
2332
2492
|
};
|
|
2333
2493
|
|
|
2334
2494
|
if (children && /*#__PURE__*/React__namespace.isValidElement(children)) {
|
|
@@ -2337,15 +2497,17 @@
|
|
|
2337
2497
|
}), children);
|
|
2338
2498
|
}
|
|
2339
2499
|
|
|
2340
|
-
return /*#__PURE__*/React__namespace.createElement("i", __assign({
|
|
2500
|
+
return /*#__PURE__*/React__namespace.createElement("i", __assign({
|
|
2501
|
+
"data-test": "DesignSystem-Icon"
|
|
2502
|
+
}, baseProps, {
|
|
2341
2503
|
className: iconClass,
|
|
2342
2504
|
style: styles
|
|
2343
|
-
}, accessibilityProps),
|
|
2505
|
+
}, accessibilityProps), name);
|
|
2344
2506
|
};
|
|
2345
2507
|
Icon.displayName = 'Icon';
|
|
2346
2508
|
Icon.defaultProps = {
|
|
2347
2509
|
size: 16,
|
|
2348
|
-
type: '
|
|
2510
|
+
type: 'rounded'
|
|
2349
2511
|
};
|
|
2350
2512
|
|
|
2351
2513
|
var GenericText = function GenericText(_a) {
|
|
@@ -3636,7 +3798,8 @@
|
|
|
3636
3798
|
showDuration = props.showDuration,
|
|
3637
3799
|
noResultMessage = props.noResultMessage,
|
|
3638
3800
|
disabledSlotList = props.disabledSlotList,
|
|
3639
|
-
fetchTimeOptions = props.fetchTimeOptions
|
|
3801
|
+
fetchTimeOptions = props.fetchTimeOptions,
|
|
3802
|
+
error = props.error;
|
|
3640
3803
|
|
|
3641
3804
|
var _a = React__namespace.useState(0),
|
|
3642
3805
|
tabIndex = _a[0],
|
|
@@ -3728,7 +3891,8 @@
|
|
|
3728
3891
|
staticLimit: dropdownOptionList.length,
|
|
3729
3892
|
onPopperToggle: function onPopperToggle() {
|
|
3730
3893
|
setOpenPopover(!openPopover);
|
|
3731
|
-
}
|
|
3894
|
+
},
|
|
3895
|
+
error: error
|
|
3732
3896
|
});
|
|
3733
3897
|
};
|
|
3734
3898
|
TimePickerWithSearch.defaultProps = {
|
|
@@ -3743,7 +3907,8 @@
|
|
|
3743
3907
|
inputFormat = props.inputFormat,
|
|
3744
3908
|
outputFormat = props.outputFormat,
|
|
3745
3909
|
onTimeChange = props.onTimeChange,
|
|
3746
|
-
timeProp = props.time
|
|
3910
|
+
timeProp = props.time,
|
|
3911
|
+
error = props.error;
|
|
3747
3912
|
|
|
3748
3913
|
var _a = React__namespace.useState(timeProp),
|
|
3749
3914
|
time$1 = _a[0],
|
|
@@ -3812,6 +3977,7 @@
|
|
|
3812
3977
|
onChange: onChangeHandler,
|
|
3813
3978
|
onClear: onClearHandler,
|
|
3814
3979
|
onBlur: onBlurHandler,
|
|
3980
|
+
error: error,
|
|
3815
3981
|
id: "parent-TimePicker"
|
|
3816
3982
|
}));
|
|
3817
3983
|
};
|
|
@@ -5643,36 +5809,20 @@
|
|
|
5643
5809
|
var _a;
|
|
5644
5810
|
|
|
5645
5811
|
var className = props.className,
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
children = props.children,
|
|
5649
|
-
type = props.type;
|
|
5650
|
-
var accessibilityProps = useAccessibilityProps(props);
|
|
5651
|
-
var baseProps = extractBaseProps(props);
|
|
5652
|
-
var iconClass = classNames__default["default"]((_a = {}, _a['material-icons'] = true, _a["material-icons-" + type] = type && type !== 'filled', _a['ActionButton'] = true, _a["" + className] = className, _a));
|
|
5653
|
-
var styles = {
|
|
5654
|
-
fontSize: size + "px",
|
|
5655
|
-
width: size + "px"
|
|
5656
|
-
};
|
|
5812
|
+
iconVariations = props.iconVariations,
|
|
5813
|
+
rest = __rest(props, ["className", "iconVariations"]);
|
|
5657
5814
|
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
className: iconClass,
|
|
5661
|
-
"data-test": "DesignSystem-Input-ActionButton"
|
|
5662
|
-
}), children);
|
|
5663
|
-
}
|
|
5664
|
-
|
|
5665
|
-
return /*#__PURE__*/React__namespace.createElement("i", __assign({}, baseProps, {
|
|
5815
|
+
var iconClass = classNames__default["default"]((_a = {}, _a['ActionButton'] = true, _a["" + className] = className, _a));
|
|
5816
|
+
return /*#__PURE__*/React__namespace.createElement(Icon, __assign({
|
|
5666
5817
|
className: iconClass,
|
|
5667
|
-
|
|
5668
|
-
}, accessibilityProps, {
|
|
5818
|
+
variations: iconVariations,
|
|
5669
5819
|
"data-test": "DesignSystem-Input-ActionButton"
|
|
5670
|
-
}
|
|
5820
|
+
}, rest));
|
|
5671
5821
|
};
|
|
5672
5822
|
ActionButton$1.displayName = 'ActionButton';
|
|
5673
5823
|
ActionButton$1.defaultProps = {
|
|
5674
5824
|
size: 16,
|
|
5675
|
-
type: '
|
|
5825
|
+
type: 'rounded'
|
|
5676
5826
|
};
|
|
5677
5827
|
|
|
5678
5828
|
var sizeMapping$2 = {
|
|
@@ -8476,11 +8626,12 @@
|
|
|
8476
8626
|
ENTER: 'Enter'
|
|
8477
8627
|
};
|
|
8478
8628
|
var ChipInput = function ChipInput(props) {
|
|
8479
|
-
var _a;
|
|
8629
|
+
var _a, _b;
|
|
8480
8630
|
|
|
8481
8631
|
var chipOptions = props.chipOptions,
|
|
8482
8632
|
allowDuplicates = props.allowDuplicates,
|
|
8483
8633
|
disabled = props.disabled,
|
|
8634
|
+
error = props.error,
|
|
8484
8635
|
placeholder = props.placeholder,
|
|
8485
8636
|
defaultValue = props.defaultValue,
|
|
8486
8637
|
value = props.value,
|
|
@@ -8491,13 +8642,13 @@
|
|
|
8491
8642
|
onFocus = props.onFocus;
|
|
8492
8643
|
var inputRef = /*#__PURE__*/React__namespace.createRef();
|
|
8493
8644
|
|
|
8494
|
-
var
|
|
8495
|
-
chips =
|
|
8496
|
-
setChips =
|
|
8645
|
+
var _c = React__namespace.useState(value || defaultValue),
|
|
8646
|
+
chips = _c[0],
|
|
8647
|
+
setChips = _c[1];
|
|
8497
8648
|
|
|
8498
|
-
var
|
|
8499
|
-
inputValue =
|
|
8500
|
-
setInputValue =
|
|
8649
|
+
var _d = React__namespace.useState(''),
|
|
8650
|
+
inputValue = _d[0],
|
|
8651
|
+
setInputValue = _d[1];
|
|
8501
8652
|
|
|
8502
8653
|
var baseProps = extractBaseProps(props);
|
|
8503
8654
|
React__namespace.useEffect(function () {
|
|
@@ -8505,9 +8656,10 @@
|
|
|
8505
8656
|
setChips(value);
|
|
8506
8657
|
}
|
|
8507
8658
|
}, [value]);
|
|
8508
|
-
var
|
|
8659
|
+
var ChipInputBorderClass = classNames__default["default"]((_a = {}, _a['ChipInput-border'] = true, _a['ChipInput-border--error'] = error, _a));
|
|
8660
|
+
var ChipInputClass = classNames__default["default"]((_b = {
|
|
8509
8661
|
ChipInput: true
|
|
8510
|
-
},
|
|
8662
|
+
}, _b['ChipInput--disabled'] = disabled, _b['ChipInput--withChips'] = chips && chips.length > 0, _b['ChipInput--error'] = error, _b), className);
|
|
8511
8663
|
|
|
8512
8664
|
var onUpdateChips = function onUpdateChips(updatedChips) {
|
|
8513
8665
|
if (onChange) onChange(updatedChips);
|
|
@@ -8604,7 +8756,7 @@
|
|
|
8604
8756
|
});
|
|
8605
8757
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
8606
8758
|
"data-test": "DesignSystem-ChipInput--Border",
|
|
8607
|
-
className:
|
|
8759
|
+
className: ChipInputBorderClass
|
|
8608
8760
|
}, /*#__PURE__*/React__namespace.createElement("div", __assign({
|
|
8609
8761
|
"data-test": "DesignSystem-ChipInput"
|
|
8610
8762
|
}, baseProps, {
|
|
@@ -16155,8 +16307,44 @@
|
|
|
16155
16307
|
iconAlign: 'left'
|
|
16156
16308
|
};
|
|
16157
16309
|
|
|
16158
|
-
var
|
|
16310
|
+
var ActionCard = function ActionCard(props) {
|
|
16311
|
+
var _a;
|
|
16312
|
+
|
|
16313
|
+
var children = props.children,
|
|
16314
|
+
disabled = props.disabled,
|
|
16315
|
+
className = props.className,
|
|
16316
|
+
zIndex = props.zIndex,
|
|
16317
|
+
onClick = props.onClick,
|
|
16318
|
+
rest = __rest(props, ["children", "disabled", "className", "zIndex", "onClick"]);
|
|
16319
|
+
|
|
16320
|
+
var classes = classNames__default["default"]((_a = {}, _a['ActionCard'] = true, _a['ActionCard--disabled'] = disabled, _a), className);
|
|
16321
|
+
|
|
16322
|
+
var onKeyDownHandler = function onKeyDownHandler(event) {
|
|
16323
|
+
if (event.key === 'Enter' && onClick) {
|
|
16324
|
+
onClick(event);
|
|
16325
|
+
}
|
|
16326
|
+
};
|
|
16327
|
+
|
|
16328
|
+
return /*#__PURE__*/React__namespace.createElement("div", __assign({
|
|
16329
|
+
tabIndex: disabled ? -1 : 0,
|
|
16330
|
+
role: "link",
|
|
16331
|
+
"data-test": "DesignSystem-ActionCard",
|
|
16332
|
+
className: classes,
|
|
16333
|
+
onClick: onClick,
|
|
16334
|
+
onKeyDown: onKeyDownHandler
|
|
16335
|
+
}, rest), disabled && /*#__PURE__*/React__namespace.createElement("div", {
|
|
16336
|
+
style: {
|
|
16337
|
+
zIndex: zIndex
|
|
16338
|
+
},
|
|
16339
|
+
"data-test": "DesignSystem-ActionCard-Overlay",
|
|
16340
|
+
className: "ActionCard-overlay--disabled"
|
|
16341
|
+
}), children);
|
|
16342
|
+
};
|
|
16343
|
+
ActionCard.displayName = 'ActionCard';
|
|
16344
|
+
|
|
16345
|
+
var version = "2.20.0";
|
|
16159
16346
|
|
|
16347
|
+
exports.ActionCard = ActionCard;
|
|
16160
16348
|
exports.Avatar = Avatar;
|
|
16161
16349
|
exports.AvatarGroup = AvatarGroup;
|
|
16162
16350
|
exports.Backdrop = Backdrop;
|