@asteby/metacore-theme 2.0.0 → 2.12.2

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.
@@ -12,7 +12,7 @@ export type ThemeProviderState = {
12
12
  setTheme: (theme: Theme) => void;
13
13
  resetTheme: () => void;
14
14
  };
15
- export declare function ThemeProvider({ children, defaultTheme, storageKey, }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
15
+ export declare function ThemeProvider({ children, defaultTheme, storageKey, }: ThemeProviderProps): import("react").JSX.Element;
16
16
  export declare function useTheme(): ThemeProviderState;
17
17
  export {};
18
18
  //# sourceMappingURL=provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":"AAEA,KAAK,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;AACxC,KAAK,aAAa,GAAG,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;AAM7C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,YAAY,CAAC,EAAE,KAAK,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,EAAE,KAAK,CAAA;IACnB,aAAa,EAAE,aAAa,CAAA;IAC5B,KAAK,EAAE,KAAK,CAAA;IACZ,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAChC,UAAU,EAAE,MAAM,IAAI,CAAA;CACvB,CAAA;AAgCD,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,YAA4B,EAC5B,UAAgC,GACjC,EAAE,kBAAkB,2CAuDpB;AAGD,wBAAgB,QAAQ,IAAI,kBAAkB,CAI7C"}
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":"AAEA,KAAK,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;AACxC,KAAK,aAAa,GAAG,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;AAM7C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,YAAY,CAAC,EAAE,KAAK,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,EAAE,KAAK,CAAA;IACnB,aAAa,EAAE,aAAa,CAAA;IAC5B,KAAK,EAAE,KAAK,CAAA;IACZ,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAChC,UAAU,EAAE,MAAM,IAAI,CAAA;CACvB,CAAA;AAgCD,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,YAA4B,EAC5B,UAAgC,GACjC,EAAE,kBAAkB,+BAuDpB;AAGD,wBAAgB,QAAQ,IAAI,kBAAkB,CAI7C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asteby/metacore-theme",
3
- "version": "2.0.0",
3
+ "version": "2.12.2",
4
4
  "description": "Metacore design tokens + Tailwind 4 preset (oklch, shadows, fonts, dark mode)",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -45,7 +45,7 @@
45
45
  "@types/react-dom": "^19.0.0",
46
46
  "react": "^19.2.4",
47
47
  "react-dom": "^19.2.4",
48
- "typescript": "^5.6.0"
48
+ "typescript": "^6.0.0"
49
49
  },
50
50
  "publishConfig": {
51
51
  "access": "public"
package/styles/index.css CHANGED
@@ -65,35 +65,34 @@
65
65
  }
66
66
 
67
67
  /* styles.css */
68
+ /*
69
+ * Sidebar module groups are Radix <Collapsible defaultOpen>, so on mount they
70
+ * paint with data-state='open' immediately. A keyframe `animation` RUNS on that
71
+ * initial mount — and because Radix has not yet measured
72
+ * `--radix-collapsible-content-height` in the first frame, a `slideDown` from
73
+ * height:0 with `overflow:hidden` and no `animation-fill-mode` could settle the
74
+ * group at a wrong height, shoving the group below it up and making its items
75
+ * overlap. This surfaces specifically when returning from a full-screen route
76
+ * (e.g. the POS) that lives outside the authenticated shell: leaving it remounts
77
+ * the whole sidebar and re-triggers the mount animation.
78
+ *
79
+ * Fix: use a `transition` instead of a keyframe `animation`. A transition does
80
+ * NOT run on the initial render (there is no prior value to interpolate from),
81
+ * so a freshly-mounted defaultOpen group simply appears at its correct height —
82
+ * no measurement race — while genuine open/close toggles still animate.
83
+ */
68
84
  .CollapsibleContent {
69
85
  overflow: hidden;
86
+ height: 0;
70
87
  }
71
88
 
72
89
  .CollapsibleContent[data-state='open'] {
73
- animation: slideDown 300ms ease-out;
90
+ height: var(--radix-collapsible-content-height);
74
91
  }
75
92
 
76
- .CollapsibleContent[data-state='closed'] {
77
- animation: slideUp 300ms ease-out;
78
- }
79
-
80
- @keyframes slideDown {
81
- from {
82
- height: 0;
83
- }
84
-
85
- to {
86
- height: var(--radix-collapsible-content-height);
87
- }
88
- }
89
-
90
- @keyframes slideUp {
91
- from {
92
- height: var(--radix-collapsible-content-height);
93
- }
94
-
95
- to {
96
- height: 0;
93
+ @media (prefers-reduced-motion: no-preference) {
94
+ .CollapsibleContent {
95
+ transition: height 300ms ease-out;
97
96
  }
98
97
  }
99
98