labsense-ui-kit 1.1.36 → 1.1.37
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/Themes/Colors.d.ts +2 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +16 -5
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +17 -5
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/Themes/Colors.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ThemeColorsInterface } from '.';
|
|
2
|
+
export declare const light: ThemeColorsInterface;
|
|
3
|
+
export declare const dark: ThemeColorsInterface;
|
|
2
4
|
export declare const colorVariables: ThemeColorsInterface;
|
|
3
|
-
export declare const darkColorVariables: ThemeColorsInterface;
|
|
4
5
|
export declare const themes: {
|
|
5
6
|
light: ThemeColorsInterface;
|
|
6
7
|
dark: ThemeColorsInterface;
|
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ import { Sidebar, logoDetails, SidebarItems } from './Sidebar';
|
|
|
15
15
|
import { Table, TableCell, TableRow, TableProps } from './Table';
|
|
16
16
|
import { InternalTabs, Tabs, TabContentProps } from './Tabs';
|
|
17
17
|
import { ThemeColorsInterface } from './Themes';
|
|
18
|
-
import { colorVariables,
|
|
18
|
+
import { colorVariables, themes } from './Themes/Colors';
|
|
19
19
|
import { convertToEpoch, formatDate, formatTimestamp, formatCalendarDateTime, timeAgo, formatEpochToIST, convertEpochToDateString, convertEpochToOnlyDate, getSystemTimezoneAbbreviation, timeStringToSeconds } from './Utils/Date&Time';
|
|
20
20
|
export { Badge };
|
|
21
21
|
export { Breadcrumbs, BreadcrumbDetail };
|
|
@@ -33,5 +33,5 @@ export { ProgressBar };
|
|
|
33
33
|
export { Sidebar, logoDetails, SidebarItems };
|
|
34
34
|
export { TableCell, Table, TableRow, TableProps };
|
|
35
35
|
export { InternalTabs, Tabs, TabContentProps };
|
|
36
|
-
export { ThemeColorsInterface, colorVariables,
|
|
36
|
+
export { ThemeColorsInterface, colorVariables, themes };
|
|
37
37
|
export { convertToEpoch, formatDate, formatTimestamp, formatCalendarDateTime, timeAgo, formatEpochToIST, convertEpochToDateString, convertEpochToOnlyDate, getSystemTimezoneAbbreviation, timeStringToSeconds };
|
package/dist/index.js
CHANGED
|
@@ -21,7 +21,7 @@ function _taggedTemplateLiteralLoose(e, t) {
|
|
|
21
21
|
return t || (t = e.slice(0)), e.raw = t, e;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var light = {
|
|
25
25
|
brand: {
|
|
26
26
|
primary: '#4C9EEB',
|
|
27
27
|
secondary: '#14171A',
|
|
@@ -88,7 +88,7 @@ var colorVariables = {
|
|
|
88
88
|
lightBlue: '#ADD8E6'
|
|
89
89
|
}
|
|
90
90
|
};
|
|
91
|
-
var
|
|
91
|
+
var dark = {
|
|
92
92
|
brand: {
|
|
93
93
|
primary: '#4C9EEB',
|
|
94
94
|
secondary: '#FFFFFF',
|
|
@@ -155,9 +155,21 @@ var darkColorVariables = {
|
|
|
155
155
|
lightBlue: '#ADD8E6'
|
|
156
156
|
}
|
|
157
157
|
};
|
|
158
|
+
var getCurrentTheme = function getCurrentTheme() {
|
|
159
|
+
if (typeof document !== 'undefined') {
|
|
160
|
+
return document.documentElement.classList.contains('dark') ? dark : light;
|
|
161
|
+
}
|
|
162
|
+
return light;
|
|
163
|
+
};
|
|
164
|
+
var colorVariables = new Proxy({}, {
|
|
165
|
+
get: function get(_, prop) {
|
|
166
|
+
var currentTheme = getCurrentTheme();
|
|
167
|
+
return currentTheme[prop];
|
|
168
|
+
}
|
|
169
|
+
});
|
|
158
170
|
var themes = {
|
|
159
|
-
light:
|
|
160
|
-
dark:
|
|
171
|
+
light: light,
|
|
172
|
+
dark: dark
|
|
161
173
|
};
|
|
162
174
|
|
|
163
175
|
var Add = function Add(_ref) {
|
|
@@ -6539,7 +6551,6 @@ exports.colorVariables = colorVariables;
|
|
|
6539
6551
|
exports.convertEpochToDateString = convertEpochToDateString;
|
|
6540
6552
|
exports.convertEpochToOnlyDate = convertEpochToOnlyDate;
|
|
6541
6553
|
exports.convertToEpoch = convertToEpoch;
|
|
6542
|
-
exports.darkColorVariables = darkColorVariables;
|
|
6543
6554
|
exports.formatCalendarDateTime = formatCalendarDateTime;
|
|
6544
6555
|
exports.formatDate = formatDate;
|
|
6545
6556
|
exports.formatEpochToIST = formatEpochToIST;
|