labsense-ui-kit 1.1.21 → 1.1.23

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.
@@ -6461,5 +6461,35 @@ var InternalTabs = function InternalTabs(_ref) {
6461
6461
  }));
6462
6462
  };
6463
6463
 
6464
- export { Badge, Breadcrumbs, ButtonComponent as Button, ButtonCarousel, CheckBox, CircularLoader, Container, DatePicker, DropdownMenu$1 as DropdownMenu, Icon, InternalTabs, Loader, MultiSelectDropdown, OptionComponent, Options, Pagination, ProgressBar, SearchBox, SelectOption, SelectedOption, Sidebar, Span, Table, TableCell, TableRow, Tabs, TextArea, TextField, TextFieldWithDropdown, colorVariables, convertEpochToDateString, convertEpochToOnlyDate, convertToEpoch, darkColorVariables, formatCalendarDateTime, formatDate, formatEpochToIST, formatTimestamp, getSystemTimezoneAbbreviation, themes, timeAgo, timeStringToSeconds, useClickOutside, useCustomModal, useNotification };
6464
+ var injectCSSVariables = function injectCSSVariables(theme) {
6465
+ var themeVars = theme === 'dark' ? darkColorVariables : colorVariables;
6466
+ var flatVars = _flattenVariables(themeVars);
6467
+ var root = document.body;
6468
+ for (var _i = 0, _Object$entries = Object.entries(flatVars); _i < _Object$entries.length; _i++) {
6469
+ var _Object$entries$_i = _Object$entries[_i],
6470
+ key = _Object$entries$_i[0],
6471
+ value = _Object$entries$_i[1];
6472
+ root.style.setProperty("--" + key, value);
6473
+ }
6474
+ };
6475
+ var _flattenVariables = function flattenVariables(obj, prefix) {
6476
+ if (prefix === void 0) {
6477
+ prefix = '';
6478
+ }
6479
+ var result = {};
6480
+ for (var key in obj) {
6481
+ if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
6482
+ var value = obj[key];
6483
+ var fullKey = prefix ? prefix + "-" + key : key;
6484
+ if (typeof value === 'object') {
6485
+ var nested = _flattenVariables(value, fullKey);
6486
+ Object.assign(result, nested);
6487
+ } else {
6488
+ result[fullKey] = value;
6489
+ }
6490
+ }
6491
+ return result;
6492
+ };
6493
+
6494
+ export { Badge, Breadcrumbs, ButtonComponent as Button, ButtonCarousel, CheckBox, CircularLoader, Container, DatePicker, DropdownMenu$1 as DropdownMenu, Icon, InternalTabs, Loader, MultiSelectDropdown, OptionComponent, Options, Pagination, ProgressBar, SearchBox, SelectOption, SelectedOption, Sidebar, Span, Table, TableCell, TableRow, Tabs, TextArea, TextField, TextFieldWithDropdown, colorVariables, convertEpochToDateString, convertEpochToOnlyDate, convertToEpoch, darkColorVariables, formatCalendarDateTime, formatDate, formatEpochToIST, formatTimestamp, getSystemTimezoneAbbreviation, injectCSSVariables, themes, timeAgo, timeStringToSeconds, useClickOutside, useCustomModal, useNotification };
6465
6495
  //# sourceMappingURL=index.modern.js.map