@shohojdhara/atomix 0.6.1 → 0.6.3
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/README.md +510 -106
- package/dist/atomix.css +30 -24
- package/dist/atomix.css.map +1 -1
- package/dist/atomix.min.css +6 -6
- package/dist/atomix.min.css.map +1 -1
- package/dist/atomix.umd.js +1 -1
- package/dist/atomix.umd.js.map +1 -1
- package/dist/atomix.umd.min.js +1 -1
- package/dist/charts.d.ts +11 -2
- package/dist/charts.js +294 -139
- package/dist/charts.js.map +1 -1
- package/dist/core.d.ts +14 -39
- package/dist/core.js +297 -145
- package/dist/core.js.map +1 -1
- package/dist/forms.d.ts +11 -1
- package/dist/forms.js +385 -185
- package/dist/forms.js.map +1 -1
- package/dist/heavy.d.ts +9 -0
- package/dist/heavy.js +297 -143
- package/dist/heavy.js.map +1 -1
- package/dist/index.d.ts +156 -164
- package/dist/index.esm.js +391 -203
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +391 -203
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/theme.d.ts +14 -6
- package/dist/theme.js +2 -9
- package/dist/theme.js.map +1 -1
- package/package.json +26 -26
- package/src/components/AtomixGlass/AtomixGlass.tsx +1 -1
- package/src/components/AtomixGlass/AtomixGlassContainer.tsx +8 -1
- package/src/components/AtomixGlass/deprecated/AtomixGlass.deprecated.tsx +390 -0
- package/src/components/AtomixGlass/glass-utils.ts +29 -0
- package/src/components/AtomixGlass/stories/Playground.stories.tsx +32 -1
- package/src/components/Button/Button.stories.tsx +1 -1
- package/src/components/Button/Button.tsx +6 -5
- package/src/components/Card/Card.tsx +2 -2
- package/src/components/Dropdown/Dropdown.tsx +1 -0
- package/src/components/EdgePanel/EdgePanel.tsx +1 -3
- package/src/components/Form/Select.test.tsx +75 -0
- package/src/components/Form/Select.tsx +348 -252
- package/src/components/Form/SelectOption.tsx +16 -10
- package/src/components/index.ts +1 -1
- package/src/layouts/CssGrid/index.ts +1 -0
- package/src/lib/composables/shared-mouse-tracker.ts +62 -6
- package/src/lib/composables/useAtomixGlass.ts +241 -139
- package/src/lib/composables/useAtomixGlassStyles.ts +201 -149
- package/src/lib/constants/components.ts +54 -35
- package/src/lib/theme/config/configLoader.ts +1 -1
- package/src/lib/theme/test/testTheme.ts +2 -2
- package/src/lib/theme/utils/themeUtils.ts +98 -110
- package/src/lib/types/components.ts +29 -65
- package/src/styles/01-settings/_settings.spacing.scss +6 -1
- package/src/styles/03-generic/_generic.reset.scss +1 -1
- package/src/styles/06-components/_components.atomix-glass.scss +20 -29
- package/src/styles/06-components/_components.data-table.scss +5 -4
- package/src/styles/06-components/_components.dynamic-background.scss +9 -8
- package/src/styles/06-components/_components.footer.scss +8 -7
- package/src/styles/06-components/_components.hero.scss +2 -2
- package/src/styles/06-components/_components.messages.scss +16 -16
- package/src/styles/06-components/_components.navbar.scss +2 -0
- package/src/styles/06-components/_components.select.scss +15 -2
- package/src/styles/06-components/_components.upload.scss +3 -3
- package/CHANGELOG.md +0 -165
- package/src/lib/theme/devtools/DesignTokensCustomizer.stories.tsx +0 -215
package/dist/theme.d.ts
CHANGED
|
@@ -1176,6 +1176,20 @@ declare function applyComponentTheme(component: string, style?: React.CSSPropert
|
|
|
1176
1176
|
*/
|
|
1177
1177
|
declare function useComponentTheme(component: string, variant?: string, size?: string, tokens?: Partial<DesignTokens>): (property: string) => string;
|
|
1178
1178
|
|
|
1179
|
+
/**
|
|
1180
|
+
* Theme Manager Utility Functions
|
|
1181
|
+
*
|
|
1182
|
+
* Helper functions for theme operations including CSS loading, DOM manipulation,
|
|
1183
|
+
* and theme validation.
|
|
1184
|
+
*/
|
|
1185
|
+
|
|
1186
|
+
/**
|
|
1187
|
+
* Detect system theme preference
|
|
1188
|
+
*
|
|
1189
|
+
* @returns 'dark' if system prefers dark mode, 'light' otherwise
|
|
1190
|
+
*/
|
|
1191
|
+
declare const getSystemTheme: () => "light" | "dark";
|
|
1192
|
+
|
|
1179
1193
|
/**
|
|
1180
1194
|
* Theme Utilities
|
|
1181
1195
|
*
|
|
@@ -1245,12 +1259,6 @@ declare function toggleTheme(options?: ThemeSwitcherOptions): ThemeMode;
|
|
|
1245
1259
|
* @returns Current theme mode or 'light' if not set
|
|
1246
1260
|
*/
|
|
1247
1261
|
declare function getCurrentTheme(storageKey?: string): ThemeMode;
|
|
1248
|
-
/**
|
|
1249
|
-
* Get system theme preference
|
|
1250
|
-
*
|
|
1251
|
-
* @returns 'dark' if system prefers dark mode, 'light' otherwise
|
|
1252
|
-
*/
|
|
1253
|
-
declare function getSystemTheme(): ThemeMode;
|
|
1254
1262
|
/**
|
|
1255
1263
|
* Initialize theme based on saved preference or system preference
|
|
1256
1264
|
*
|
package/dist/theme.js
CHANGED
|
@@ -1671,7 +1671,7 @@ class ThemeLogger {
|
|
|
1671
1671
|
document.body && document.body.setAttribute(dataAttribute, themeName),
|
|
1672
1672
|
// Also set on documentElement for broader compatibility
|
|
1673
1673
|
document.documentElement.setAttribute(dataAttribute, themeName));
|
|
1674
|
-
}, isValidThemeName = themeName => !(!themeName || "string" != typeof themeName) && /^[a-z0-9]+(-[a-z0-9]+)*$/.test(themeName), createLocalStorageAdapter = () => ({
|
|
1674
|
+
}, getSystemTheme = () => isServer() ? "light" : window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", isValidThemeName = themeName => !(!themeName || "string" != typeof themeName) && /^[a-z0-9]+(-[a-z0-9]+)*$/.test(themeName), createLocalStorageAdapter = () => ({
|
|
1675
1675
|
getItem: key => {
|
|
1676
1676
|
if (isServer()) return null;
|
|
1677
1677
|
try {
|
|
@@ -1708,6 +1708,7 @@ class ThemeLogger {
|
|
|
1708
1708
|
applyThemeAttributes: applyThemeAttributes,
|
|
1709
1709
|
buildThemePath: buildThemePath,
|
|
1710
1710
|
createLocalStorageAdapter: createLocalStorageAdapter,
|
|
1711
|
+
getSystemTheme: getSystemTheme,
|
|
1711
1712
|
isBrowser: isBrowser,
|
|
1712
1713
|
isServer: isServer,
|
|
1713
1714
|
isValidThemeName: isValidThemeName,
|
|
@@ -1870,14 +1871,6 @@ const _reduceInstanceProperty = getDefaultExportFromCjs((function(it) {
|
|
|
1870
1871
|
return "undefined" == typeof window ? "light" : localStorage.getItem(storageKey) || "light";
|
|
1871
1872
|
}
|
|
1872
1873
|
|
|
1873
|
-
/**
|
|
1874
|
-
* Get system theme preference
|
|
1875
|
-
*
|
|
1876
|
-
* @returns 'dark' if system prefers dark mode, 'light' otherwise
|
|
1877
|
-
*/ function getSystemTheme() {
|
|
1878
|
-
return "undefined" == typeof window ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
1879
|
-
}
|
|
1880
|
-
|
|
1881
1874
|
/**
|
|
1882
1875
|
* Initialize theme based on saved preference or system preference
|
|
1883
1876
|
*
|