labsense-ui-kit 1.1.77 → 1.1.78
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 +1 -0
- package/dist/Themes/index.d.ts +2 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +5 -3
- 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
2
|
export declare const light: ThemeColorsInterface;
|
|
3
3
|
export declare const dark: ThemeColorsInterface;
|
|
4
|
+
export declare const getCurrentTheme: () => "dark" | "light";
|
|
4
5
|
export declare const colorVariables: ThemeColorsInterface;
|
|
5
6
|
export declare const themes: {
|
|
6
7
|
light: ThemeColorsInterface;
|
package/dist/Themes/index.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { ProgressBar, ProgressBarProps, CircularProgress, CircularProgressProps
|
|
|
14
14
|
import { Sidebar, logoDetails, SidebarItems } from './Sidebar';
|
|
15
15
|
import { Table, TableCell, TableRow, TableProps } from './Table';
|
|
16
16
|
import { InternalTabs, Tabs, TabContentProps } from './Tabs';
|
|
17
|
-
import { ThemeColorsInterface } from './Themes';
|
|
17
|
+
import { ThemeColorsInterface, ThemeMode } from './Themes';
|
|
18
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, IconTooltip };
|
|
@@ -33,5 +33,5 @@ export { ProgressBar, ProgressBarProps, CircularProgress, CircularProgressProps
|
|
|
33
33
|
export { Sidebar, logoDetails, SidebarItems };
|
|
34
34
|
export { TableCell, Table, TableRow, TableProps };
|
|
35
35
|
export { InternalTabs, Tabs, TabContentProps };
|
|
36
|
-
export { ThemeColorsInterface, colorVariables, themes };
|
|
36
|
+
export { ThemeColorsInterface, ThemeMode, colorVariables, themes };
|
|
37
37
|
export { convertToEpoch, formatDate, formatTimestamp, formatCalendarDateTime, timeAgo, formatEpochToIST, convertEpochToDateString, convertEpochToOnlyDate, getSystemTimezoneAbbreviation, timeStringToSeconds };
|
package/dist/index.js
CHANGED
|
@@ -163,13 +163,15 @@ var dark = {
|
|
|
163
163
|
};
|
|
164
164
|
var getCurrentTheme = function getCurrentTheme() {
|
|
165
165
|
if (typeof document !== 'undefined') {
|
|
166
|
-
|
|
166
|
+
var isDarkClass = document.documentElement.classList.contains('dark');
|
|
167
|
+
return isDarkClass ? 'dark' : 'light';
|
|
167
168
|
}
|
|
168
|
-
return light;
|
|
169
|
+
return 'light';
|
|
169
170
|
};
|
|
170
171
|
var colorVariables = new Proxy({}, {
|
|
171
172
|
get: function get(_, prop) {
|
|
172
|
-
var
|
|
173
|
+
var currentThemeName = getCurrentTheme();
|
|
174
|
+
var currentTheme = themes[currentThemeName];
|
|
173
175
|
return currentTheme[prop];
|
|
174
176
|
}
|
|
175
177
|
});
|