xyne-components 0.1.0 → 0.1.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.
Files changed (86) hide show
  1. package/dist/Badge/index.cjs +9 -0
  2. package/dist/Badge/index.cjs.map +1 -0
  3. package/dist/Badge/index.d.cts +24 -0
  4. package/dist/Badge/index.d.ts +24 -0
  5. package/dist/Badge/index.js +9 -0
  6. package/dist/Badge/index.js.map +1 -0
  7. package/dist/Directory/index.cjs +9 -0
  8. package/dist/Directory/index.cjs.map +1 -0
  9. package/dist/Directory/index.d.cts +34 -0
  10. package/dist/Directory/index.d.ts +34 -0
  11. package/dist/Directory/index.js +9 -0
  12. package/dist/Directory/index.js.map +1 -0
  13. package/dist/Label/index.cjs +9 -0
  14. package/dist/Label/index.cjs.map +1 -0
  15. package/dist/Label/index.d.cts +28 -0
  16. package/dist/Label/index.d.ts +28 -0
  17. package/dist/Label/index.js +9 -0
  18. package/dist/Label/index.js.map +1 -0
  19. package/dist/ListItem/index.cjs +9 -0
  20. package/dist/ListItem/index.cjs.map +1 -0
  21. package/dist/ListItem/index.d.cts +34 -0
  22. package/dist/ListItem/index.d.ts +34 -0
  23. package/dist/ListItem/index.js +9 -0
  24. package/dist/ListItem/index.js.map +1 -0
  25. package/dist/chunk-2452BBK4.js +219 -0
  26. package/dist/chunk-2452BBK4.js.map +1 -0
  27. package/dist/chunk-2JYR6C3L.cjs +219 -0
  28. package/dist/chunk-2JYR6C3L.cjs.map +1 -0
  29. package/dist/chunk-54N4ZTTL.js +173 -0
  30. package/dist/chunk-54N4ZTTL.js.map +1 -0
  31. package/dist/chunk-73U3B3WX.cjs +23 -0
  32. package/dist/chunk-73U3B3WX.cjs.map +1 -0
  33. package/dist/chunk-CNEANQ6B.js +23 -0
  34. package/dist/chunk-CNEANQ6B.js.map +1 -0
  35. package/dist/chunk-EJ4BXCSG.js +55 -0
  36. package/dist/chunk-EJ4BXCSG.js.map +1 -0
  37. package/dist/chunk-HAG5EYQ5.cjs +87 -0
  38. package/dist/chunk-HAG5EYQ5.cjs.map +1 -0
  39. package/dist/chunk-JKYZDOSJ.cjs +55 -0
  40. package/dist/chunk-JKYZDOSJ.cjs.map +1 -0
  41. package/dist/chunk-RVNFEWBE.js +87 -0
  42. package/dist/chunk-RVNFEWBE.js.map +1 -0
  43. package/dist/chunk-RXHOBQUJ.cjs +65 -0
  44. package/dist/chunk-RXHOBQUJ.cjs.map +1 -0
  45. package/dist/chunk-SEFQF2DQ.js +91 -0
  46. package/dist/chunk-SEFQF2DQ.js.map +1 -0
  47. package/dist/chunk-SRXGVBJ5.cjs +133 -0
  48. package/dist/chunk-SRXGVBJ5.cjs.map +1 -0
  49. package/dist/chunk-WUV742E6.cjs +173 -0
  50. package/dist/chunk-WUV742E6.cjs.map +1 -0
  51. package/dist/chunk-XF7A3MNW.cjs +91 -0
  52. package/dist/chunk-XF7A3MNW.cjs.map +1 -0
  53. package/dist/chunk-ZJ3XTUYJ.js +65 -0
  54. package/dist/chunk-ZJ3XTUYJ.js.map +1 -0
  55. package/dist/chunk-ZS6WGFYT.js +133 -0
  56. package/dist/chunk-ZS6WGFYT.js.map +1 -0
  57. package/dist/colorScheme.types-CqDRrNL0.d.cts +54 -0
  58. package/dist/colorScheme.types-CqDRrNL0.d.ts +54 -0
  59. package/dist/hooks/index.cjs +11 -0
  60. package/dist/hooks/index.cjs.map +1 -0
  61. package/dist/hooks/index.d.cts +20 -0
  62. package/dist/hooks/index.d.ts +20 -0
  63. package/dist/hooks/index.js +11 -0
  64. package/dist/hooks/index.js.map +1 -0
  65. package/dist/index.cjs +26 -560
  66. package/dist/index.cjs.map +1 -1
  67. package/dist/index.d.cts +10 -176
  68. package/dist/index.d.ts +10 -176
  69. package/dist/index.js +29 -517
  70. package/dist/index.js.map +1 -1
  71. package/dist/polymorphic-BpYm1AeE.d.cts +115 -0
  72. package/dist/polymorphic-BpYm1AeE.d.ts +115 -0
  73. package/dist/styles/index.css +23 -8
  74. package/dist/theme/index.cjs +16 -0
  75. package/dist/theme/index.cjs.map +1 -0
  76. package/dist/theme/index.d.cts +56 -0
  77. package/dist/theme/index.d.ts +56 -0
  78. package/dist/theme/index.js +16 -0
  79. package/dist/theme/index.js.map +1 -0
  80. package/dist/utils/index.cjs +8 -0
  81. package/dist/utils/index.cjs.map +1 -0
  82. package/dist/utils/index.d.cts +7 -0
  83. package/dist/utils/index.d.ts +7 -0
  84. package/dist/utils/index.js +8 -0
  85. package/dist/utils/index.js.map +1 -0
  86. package/package.json +39 -3
@@ -0,0 +1,9 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
+
3
+
4
+ var _chunkJKYZDOSJcjs = require('../chunk-JKYZDOSJ.cjs');
5
+ require('../chunk-SRXGVBJ5.cjs');
6
+
7
+
8
+ exports.Badge = _chunkJKYZDOSJcjs.Badge;
9
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/harshpreet.singh/Desktop/Juspay/xyne-spaces/components/dist/Badge/index.cjs"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACE;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACF,wCAAC","file":"/Users/harshpreet.singh/Desktop/Juspay/xyne-spaces/components/dist/Badge/index.cjs"}
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { a as PolymorphicComponentPropsWithRef, S as SxProp } from '../polymorphic-BpYm1AeE.cjs';
3
+
4
+ type BadgeVariant = 'badge' | 'dot';
5
+ type BadgeSlots = {
6
+ root?: React.ElementType;
7
+ icon?: React.ElementType;
8
+ };
9
+ type BadgeSlotProps = {
10
+ root?: React.HTMLAttributes<HTMLElement>;
11
+ icon?: React.HTMLAttributes<HTMLSpanElement>;
12
+ };
13
+ type BadgeOwnProps = {
14
+ variant?: BadgeVariant;
15
+ icon?: React.ReactNode;
16
+ slots?: BadgeSlots;
17
+ slotProps?: BadgeSlotProps;
18
+ sx?: SxProp;
19
+ };
20
+ type BadgeProps<C extends React.ElementType = 'span'> = PolymorphicComponentPropsWithRef<C, BadgeOwnProps>;
21
+ type BadgeComponent = <C extends React.ElementType = 'span'>(props: BadgeProps<C>) => React.ReactElement | null;
22
+ declare const Badge: BadgeComponent;
23
+
24
+ export { Badge, type BadgeProps, type BadgeSlotProps, type BadgeSlots, type BadgeVariant };
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { a as PolymorphicComponentPropsWithRef, S as SxProp } from '../polymorphic-BpYm1AeE.js';
3
+
4
+ type BadgeVariant = 'badge' | 'dot';
5
+ type BadgeSlots = {
6
+ root?: React.ElementType;
7
+ icon?: React.ElementType;
8
+ };
9
+ type BadgeSlotProps = {
10
+ root?: React.HTMLAttributes<HTMLElement>;
11
+ icon?: React.HTMLAttributes<HTMLSpanElement>;
12
+ };
13
+ type BadgeOwnProps = {
14
+ variant?: BadgeVariant;
15
+ icon?: React.ReactNode;
16
+ slots?: BadgeSlots;
17
+ slotProps?: BadgeSlotProps;
18
+ sx?: SxProp;
19
+ };
20
+ type BadgeProps<C extends React.ElementType = 'span'> = PolymorphicComponentPropsWithRef<C, BadgeOwnProps>;
21
+ type BadgeComponent = <C extends React.ElementType = 'span'>(props: BadgeProps<C>) => React.ReactElement | null;
22
+ declare const Badge: BadgeComponent;
23
+
24
+ export { Badge, type BadgeProps, type BadgeSlotProps, type BadgeSlots, type BadgeVariant };
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import {
3
+ Badge
4
+ } from "../chunk-EJ4BXCSG.js";
5
+ import "../chunk-ZS6WGFYT.js";
6
+ export {
7
+ Badge
8
+ };
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,9 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
+
3
+
4
+ var _chunkXF7A3MNWcjs = require('../chunk-XF7A3MNW.cjs');
5
+ require('../chunk-SRXGVBJ5.cjs');
6
+
7
+
8
+ exports.Directory = _chunkXF7A3MNWcjs.Directory;
9
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/harshpreet.singh/Desktop/Juspay/xyne-spaces/components/dist/Directory/index.cjs"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACE;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACF,gDAAC","file":"/Users/harshpreet.singh/Desktop/Juspay/xyne-spaces/components/dist/Directory/index.cjs"}
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ import { a as PolymorphicComponentPropsWithRef, S as SxProp } from '../polymorphic-BpYm1AeE.cjs';
3
+
4
+ type DirectoryVariant = 'opened' | 'closed';
5
+ type DirectorySlots = {
6
+ root?: React.ElementType;
7
+ header?: React.ElementType;
8
+ leading?: React.ElementType;
9
+ trailing?: React.ElementType;
10
+ content?: React.ElementType;
11
+ };
12
+ type DirectorySlotProps = {
13
+ root?: React.HTMLAttributes<HTMLElement>;
14
+ header?: React.ButtonHTMLAttributes<HTMLButtonElement>;
15
+ leading?: React.HTMLAttributes<HTMLSpanElement>;
16
+ trailing?: React.HTMLAttributes<HTMLSpanElement>;
17
+ content?: React.HTMLAttributes<HTMLDivElement>;
18
+ };
19
+ type DirectoryOwnProps = {
20
+ label?: string;
21
+ variant?: DirectoryVariant;
22
+ leading?: React.ReactNode;
23
+ trailing?: React.ReactNode;
24
+ onHeaderClick?: React.MouseEventHandler<HTMLButtonElement>;
25
+ children?: React.ReactNode;
26
+ slots?: DirectorySlots;
27
+ slotProps?: DirectorySlotProps;
28
+ sx?: SxProp;
29
+ };
30
+ type DirectoryProps<C extends React.ElementType = 'div'> = PolymorphicComponentPropsWithRef<C, DirectoryOwnProps>;
31
+ type DirectoryComponent = <C extends React.ElementType = 'div'>(props: DirectoryProps<C>) => React.ReactElement | null;
32
+ declare const Directory: DirectoryComponent;
33
+
34
+ export { Directory, type DirectoryProps, type DirectorySlotProps, type DirectorySlots, type DirectoryVariant };
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ import { a as PolymorphicComponentPropsWithRef, S as SxProp } from '../polymorphic-BpYm1AeE.js';
3
+
4
+ type DirectoryVariant = 'opened' | 'closed';
5
+ type DirectorySlots = {
6
+ root?: React.ElementType;
7
+ header?: React.ElementType;
8
+ leading?: React.ElementType;
9
+ trailing?: React.ElementType;
10
+ content?: React.ElementType;
11
+ };
12
+ type DirectorySlotProps = {
13
+ root?: React.HTMLAttributes<HTMLElement>;
14
+ header?: React.ButtonHTMLAttributes<HTMLButtonElement>;
15
+ leading?: React.HTMLAttributes<HTMLSpanElement>;
16
+ trailing?: React.HTMLAttributes<HTMLSpanElement>;
17
+ content?: React.HTMLAttributes<HTMLDivElement>;
18
+ };
19
+ type DirectoryOwnProps = {
20
+ label?: string;
21
+ variant?: DirectoryVariant;
22
+ leading?: React.ReactNode;
23
+ trailing?: React.ReactNode;
24
+ onHeaderClick?: React.MouseEventHandler<HTMLButtonElement>;
25
+ children?: React.ReactNode;
26
+ slots?: DirectorySlots;
27
+ slotProps?: DirectorySlotProps;
28
+ sx?: SxProp;
29
+ };
30
+ type DirectoryProps<C extends React.ElementType = 'div'> = PolymorphicComponentPropsWithRef<C, DirectoryOwnProps>;
31
+ type DirectoryComponent = <C extends React.ElementType = 'div'>(props: DirectoryProps<C>) => React.ReactElement | null;
32
+ declare const Directory: DirectoryComponent;
33
+
34
+ export { Directory, type DirectoryProps, type DirectorySlotProps, type DirectorySlots, type DirectoryVariant };
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import {
3
+ Directory
4
+ } from "../chunk-SEFQF2DQ.js";
5
+ import "../chunk-ZS6WGFYT.js";
6
+ export {
7
+ Directory
8
+ };
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,9 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
+
3
+
4
+ var _chunkRXHOBQUJcjs = require('../chunk-RXHOBQUJ.cjs');
5
+ require('../chunk-SRXGVBJ5.cjs');
6
+
7
+
8
+ exports.Label = _chunkRXHOBQUJcjs.Label;
9
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/harshpreet.singh/Desktop/Juspay/xyne-spaces/components/dist/Label/index.cjs"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACE;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACF,wCAAC","file":"/Users/harshpreet.singh/Desktop/Juspay/xyne-spaces/components/dist/Label/index.cjs"}
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { a as PolymorphicComponentPropsWithRef, S as SxProp } from '../polymorphic-BpYm1AeE.cjs';
3
+
4
+ type LabelVariant = 'opened' | 'closed';
5
+ type LabelSlots = {
6
+ root?: React.ElementType;
7
+ leading?: React.ElementType;
8
+ trailing?: React.ElementType;
9
+ };
10
+ type LabelSlotProps = {
11
+ root?: React.HTMLAttributes<HTMLElement>;
12
+ leading?: React.HTMLAttributes<HTMLSpanElement>;
13
+ trailing?: React.HTMLAttributes<HTMLSpanElement>;
14
+ };
15
+ type LabelOwnProps = {
16
+ children?: React.ReactNode;
17
+ variant?: LabelVariant;
18
+ leading?: React.ReactNode;
19
+ trailing?: React.ReactNode;
20
+ slots?: LabelSlots;
21
+ slotProps?: LabelSlotProps;
22
+ sx?: SxProp;
23
+ };
24
+ type LabelProps<C extends React.ElementType = 'button'> = PolymorphicComponentPropsWithRef<C, LabelOwnProps>;
25
+ type LabelComponent = <C extends React.ElementType = 'button'>(props: LabelProps<C>) => React.ReactElement | null;
26
+ declare const Label: LabelComponent;
27
+
28
+ export { Label, type LabelProps, type LabelSlotProps, type LabelSlots, type LabelVariant };
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { a as PolymorphicComponentPropsWithRef, S as SxProp } from '../polymorphic-BpYm1AeE.js';
3
+
4
+ type LabelVariant = 'opened' | 'closed';
5
+ type LabelSlots = {
6
+ root?: React.ElementType;
7
+ leading?: React.ElementType;
8
+ trailing?: React.ElementType;
9
+ };
10
+ type LabelSlotProps = {
11
+ root?: React.HTMLAttributes<HTMLElement>;
12
+ leading?: React.HTMLAttributes<HTMLSpanElement>;
13
+ trailing?: React.HTMLAttributes<HTMLSpanElement>;
14
+ };
15
+ type LabelOwnProps = {
16
+ children?: React.ReactNode;
17
+ variant?: LabelVariant;
18
+ leading?: React.ReactNode;
19
+ trailing?: React.ReactNode;
20
+ slots?: LabelSlots;
21
+ slotProps?: LabelSlotProps;
22
+ sx?: SxProp;
23
+ };
24
+ type LabelProps<C extends React.ElementType = 'button'> = PolymorphicComponentPropsWithRef<C, LabelOwnProps>;
25
+ type LabelComponent = <C extends React.ElementType = 'button'>(props: LabelProps<C>) => React.ReactElement | null;
26
+ declare const Label: LabelComponent;
27
+
28
+ export { Label, type LabelProps, type LabelSlotProps, type LabelSlots, type LabelVariant };
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import {
3
+ Label
4
+ } from "../chunk-ZJ3XTUYJ.js";
5
+ import "../chunk-ZS6WGFYT.js";
6
+ export {
7
+ Label
8
+ };
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,9 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
+
3
+
4
+ var _chunkHAG5EYQ5cjs = require('../chunk-HAG5EYQ5.cjs');
5
+ require('../chunk-SRXGVBJ5.cjs');
6
+
7
+
8
+ exports.ListItem = _chunkHAG5EYQ5cjs.ListItem;
9
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/harshpreet.singh/Desktop/Juspay/xyne-spaces/components/dist/ListItem/index.cjs"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACE;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACF,8CAAC","file":"/Users/harshpreet.singh/Desktop/Juspay/xyne-spaces/components/dist/ListItem/index.cjs"}
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ import { a as PolymorphicComponentPropsWithRef, S as SxProp } from '../polymorphic-BpYm1AeE.cjs';
3
+
4
+ type ListItemSlots = {
5
+ root?: React.ElementType;
6
+ bar?: React.ElementType;
7
+ leading?: React.ElementType;
8
+ trailing?: React.ElementType;
9
+ text?: React.ElementType;
10
+ };
11
+ type ListItemSlotProps = {
12
+ root?: React.HTMLAttributes<HTMLElement>;
13
+ bar?: React.HTMLAttributes<HTMLSpanElement>;
14
+ leading?: React.HTMLAttributes<HTMLSpanElement>;
15
+ trailing?: React.HTMLAttributes<HTMLSpanElement>;
16
+ text?: React.HTMLAttributes<HTMLSpanElement>;
17
+ };
18
+ type ListItemOwnProps = {
19
+ label?: string;
20
+ subtext?: string;
21
+ selected?: boolean;
22
+ active?: boolean;
23
+ showBar?: boolean;
24
+ leading?: React.ReactNode;
25
+ trailing?: React.ReactNode;
26
+ slots?: ListItemSlots;
27
+ slotProps?: ListItemSlotProps;
28
+ sx?: SxProp;
29
+ };
30
+ type ListItemProps<C extends React.ElementType = 'button'> = PolymorphicComponentPropsWithRef<C, ListItemOwnProps>;
31
+ type ListItemComponent = <C extends React.ElementType = 'button'>(props: ListItemProps<C>) => React.ReactElement | null;
32
+ declare const ListItem: ListItemComponent;
33
+
34
+ export { ListItem, type ListItemProps, type ListItemSlotProps, type ListItemSlots };
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ import { a as PolymorphicComponentPropsWithRef, S as SxProp } from '../polymorphic-BpYm1AeE.js';
3
+
4
+ type ListItemSlots = {
5
+ root?: React.ElementType;
6
+ bar?: React.ElementType;
7
+ leading?: React.ElementType;
8
+ trailing?: React.ElementType;
9
+ text?: React.ElementType;
10
+ };
11
+ type ListItemSlotProps = {
12
+ root?: React.HTMLAttributes<HTMLElement>;
13
+ bar?: React.HTMLAttributes<HTMLSpanElement>;
14
+ leading?: React.HTMLAttributes<HTMLSpanElement>;
15
+ trailing?: React.HTMLAttributes<HTMLSpanElement>;
16
+ text?: React.HTMLAttributes<HTMLSpanElement>;
17
+ };
18
+ type ListItemOwnProps = {
19
+ label?: string;
20
+ subtext?: string;
21
+ selected?: boolean;
22
+ active?: boolean;
23
+ showBar?: boolean;
24
+ leading?: React.ReactNode;
25
+ trailing?: React.ReactNode;
26
+ slots?: ListItemSlots;
27
+ slotProps?: ListItemSlotProps;
28
+ sx?: SxProp;
29
+ };
30
+ type ListItemProps<C extends React.ElementType = 'button'> = PolymorphicComponentPropsWithRef<C, ListItemOwnProps>;
31
+ type ListItemComponent = <C extends React.ElementType = 'button'>(props: ListItemProps<C>) => React.ReactElement | null;
32
+ declare const ListItem: ListItemComponent;
33
+
34
+ export { ListItem, type ListItemProps, type ListItemSlotProps, type ListItemSlots };
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import {
3
+ ListItem
4
+ } from "../chunk-RVNFEWBE.js";
5
+ import "../chunk-ZS6WGFYT.js";
6
+ export {
7
+ ListItem
8
+ };
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,219 @@
1
+ "use client";
2
+ import {
3
+ ColorSchemeContext,
4
+ DEFAULT_THEME,
5
+ ThemeContext
6
+ } from "./chunk-54N4ZTTL.js";
7
+
8
+ // src/theme/createTheme.ts
9
+ function isPlainObject(value) {
10
+ return value !== null && typeof value === "object" && !Array.isArray(value);
11
+ }
12
+ function deepMerge(target, source) {
13
+ const result = { ...target };
14
+ for (const key of Object.keys(source)) {
15
+ if (isPlainObject(source[key]) && isPlainObject(target[key])) {
16
+ result[key] = deepMerge(
17
+ target[key],
18
+ source[key]
19
+ );
20
+ } else {
21
+ result[key] = source[key];
22
+ }
23
+ }
24
+ return result;
25
+ }
26
+ function createTheme(override) {
27
+ return deepMerge(
28
+ DEFAULT_THEME,
29
+ override
30
+ );
31
+ }
32
+
33
+ // src/theme/ThemeProvider.tsx
34
+ import { useMemo as useMemo2 } from "react";
35
+
36
+ // src/theme/ColorSchemeProvider.tsx
37
+ import { useState, useEffect, useMemo, useCallback } from "react";
38
+ import { jsx } from "react/jsx-runtime";
39
+ var STORAGE_KEY = "xc-color-scheme";
40
+ function getSystemPreference() {
41
+ if (typeof window === "undefined") return "light";
42
+ return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
43
+ }
44
+ function applyToDOM(resolved, getRootElement) {
45
+ if (typeof document === "undefined") return;
46
+ const root = getRootElement ? getRootElement() : document.documentElement;
47
+ if (root) root.setAttribute("data-theme", resolved);
48
+ }
49
+ function ColorSchemeProvider({
50
+ defaultColorScheme = "light",
51
+ forceColorScheme,
52
+ storageKey = STORAGE_KEY,
53
+ getRootElement,
54
+ children
55
+ }) {
56
+ const [colorScheme, setColorSchemeRaw] = useState(() => {
57
+ if (forceColorScheme) return forceColorScheme;
58
+ try {
59
+ if (typeof window !== "undefined") {
60
+ const v = window.localStorage.getItem(storageKey);
61
+ if (v === "light" || v === "dark" || v === "auto") return v;
62
+ }
63
+ } catch {
64
+ }
65
+ return defaultColorScheme;
66
+ });
67
+ const [systemPreference, setSystemPreference] = useState(getSystemPreference);
68
+ const resolvedColorScheme = forceColorScheme ?? (colorScheme === "auto" ? systemPreference : colorScheme);
69
+ useEffect(() => {
70
+ if (typeof window === "undefined") return;
71
+ const mq = window.matchMedia("(prefers-color-scheme: dark)");
72
+ const handler = (e) => {
73
+ setSystemPreference(e.matches ? "dark" : "light");
74
+ };
75
+ mq.addEventListener("change", handler);
76
+ return () => mq.removeEventListener("change", handler);
77
+ }, []);
78
+ useEffect(() => {
79
+ if (typeof window === "undefined") return;
80
+ const handler = (e) => {
81
+ if (e.key !== storageKey) return;
82
+ const val = e.newValue;
83
+ if (val === "light" || val === "dark" || val === "auto") {
84
+ setColorSchemeRaw(val);
85
+ }
86
+ };
87
+ window.addEventListener("storage", handler);
88
+ return () => window.removeEventListener("storage", handler);
89
+ }, [storageKey]);
90
+ useEffect(() => {
91
+ applyToDOM(resolvedColorScheme, getRootElement);
92
+ }, [resolvedColorScheme, getRootElement]);
93
+ const setColorScheme = useCallback((scheme) => {
94
+ if (forceColorScheme) return;
95
+ setColorSchemeRaw(scheme);
96
+ try {
97
+ window.localStorage.setItem(storageKey, scheme);
98
+ } catch {
99
+ }
100
+ }, [forceColorScheme, storageKey]);
101
+ const toggleColorScheme = useCallback(() => {
102
+ setColorScheme(resolvedColorScheme === "dark" ? "light" : "dark");
103
+ }, [resolvedColorScheme, setColorScheme]);
104
+ const value = useMemo(() => ({
105
+ colorScheme,
106
+ resolvedColorScheme,
107
+ setColorScheme,
108
+ toggleColorScheme
109
+ }), [colorScheme, resolvedColorScheme, setColorScheme, toggleColorScheme]);
110
+ return /* @__PURE__ */ jsx(ColorSchemeContext.Provider, { value, children });
111
+ }
112
+
113
+ // src/theme/ThemeProvider.tsx
114
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
115
+ function camelToKebab(str) {
116
+ return str.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`);
117
+ }
118
+ function themeOverrideToCssVars(override) {
119
+ const vars = {};
120
+ if (override.colors) {
121
+ for (const [scale, shades] of Object.entries(override.colors)) {
122
+ for (const [shade, value] of Object.entries(shades)) {
123
+ vars[`--xc-color-${camelToKebab(scale)}-${shade}`] = value;
124
+ }
125
+ }
126
+ }
127
+ if (override.text) {
128
+ for (const [key, value] of Object.entries(override.text)) {
129
+ vars[`--xc-color-text-${camelToKebab(key)}`] = value;
130
+ }
131
+ }
132
+ if (override.bg) {
133
+ for (const [key, value] of Object.entries(override.bg)) {
134
+ vars[`--xc-color-bg-${camelToKebab(key)}`] = value;
135
+ }
136
+ }
137
+ if (override.border) {
138
+ for (const [key, value] of Object.entries(override.border)) {
139
+ vars[`--xc-color-border-${camelToKebab(key)}`] = value;
140
+ }
141
+ }
142
+ if (override.shadow) {
143
+ for (const [key, value] of Object.entries(override.shadow)) {
144
+ vars[`--xc-shadow-${camelToKebab(key)}`] = value;
145
+ }
146
+ }
147
+ if (override.radius) {
148
+ for (const [key, value] of Object.entries(override.radius)) {
149
+ vars[`--xc-radius-${camelToKebab(key)}`] = value;
150
+ }
151
+ }
152
+ if (override.spacing) {
153
+ for (const [key, value] of Object.entries(override.spacing)) {
154
+ vars[`--xc-space-${key}`] = value;
155
+ }
156
+ }
157
+ if (override.fontFamily) {
158
+ vars["--xc-font-family"] = override.fontFamily;
159
+ }
160
+ if (override.fontWeight) {
161
+ for (const [key, value] of Object.entries(override.fontWeight)) {
162
+ vars[`--xc-font-weight-${camelToKebab(key)}`] = value;
163
+ }
164
+ }
165
+ if (override.fontSize) {
166
+ for (const [key, value] of Object.entries(override.fontSize)) {
167
+ vars[`--xc-font-size-${key}`] = value;
168
+ }
169
+ }
170
+ if (override.lineHeight) {
171
+ for (const [key, value] of Object.entries(override.lineHeight)) {
172
+ vars[`--xc-line-height-${key}`] = value;
173
+ }
174
+ }
175
+ return vars;
176
+ }
177
+ function ThemeProvider({
178
+ theme: themeOverride = {},
179
+ cssVariablesSelector = ":root",
180
+ defaultColorScheme = "light",
181
+ forceColorScheme,
182
+ colorSchemeStorageKey,
183
+ getRootElement,
184
+ children
185
+ }) {
186
+ const resolvedTheme = useMemo2(
187
+ () => createTheme(themeOverride),
188
+ [themeOverride]
189
+ );
190
+ const cssText = useMemo2(() => {
191
+ const vars = themeOverrideToCssVars(themeOverride);
192
+ const entries = Object.entries(vars);
193
+ if (entries.length === 0) return "";
194
+ const declarations = entries.map(([k, v]) => ` ${k}: ${v};`).join("\n");
195
+ return `${cssVariablesSelector} {
196
+ ${declarations}
197
+ }`;
198
+ }, [themeOverride, cssVariablesSelector]);
199
+ return /* @__PURE__ */ jsx2(
200
+ ColorSchemeProvider,
201
+ {
202
+ defaultColorScheme,
203
+ forceColorScheme,
204
+ storageKey: colorSchemeStorageKey,
205
+ getRootElement,
206
+ children: /* @__PURE__ */ jsxs(ThemeContext.Provider, { value: resolvedTheme, children: [
207
+ cssText && /* @__PURE__ */ jsx2("style", { "data-xc-theme": "", children: cssText }),
208
+ children
209
+ ] })
210
+ }
211
+ );
212
+ }
213
+
214
+ export {
215
+ createTheme,
216
+ ColorSchemeProvider,
217
+ ThemeProvider
218
+ };
219
+ //# sourceMappingURL=chunk-2452BBK4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/theme/createTheme.ts","../src/theme/ThemeProvider.tsx","../src/theme/ColorSchemeProvider.tsx"],"sourcesContent":["import type { XyneTheme, XyneThemeOverride } from './types'\nimport { DEFAULT_THEME } from './defaultTheme'\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return value !== null && typeof value === 'object' && !Array.isArray(value)\n}\n\nfunction deepMerge(\n target: Record<string, unknown>,\n source: Record<string, unknown>,\n): Record<string, unknown> {\n const result: Record<string, unknown> = { ...target }\n for (const key of Object.keys(source)) {\n if (isPlainObject(source[key]) && isPlainObject(target[key])) {\n result[key] = deepMerge(\n target[key] as Record<string, unknown>,\n source[key] as Record<string, unknown>,\n )\n } else {\n result[key] = source[key]\n }\n }\n return result\n}\n\n/** Deep-merge a partial override with DEFAULT_THEME to produce a full theme. */\nexport function createTheme(override: XyneThemeOverride): XyneTheme {\n return deepMerge(\n DEFAULT_THEME as unknown as Record<string, unknown>,\n override as Record<string, unknown>,\n ) as unknown as XyneTheme\n}\n","import React, { useMemo } from 'react'\nimport type { XyneThemeOverride } from './types'\nimport type { ColorScheme, ResolvedColorScheme } from './colorScheme.types'\nimport { ThemeContext } from './ThemeContext'\nimport { createTheme } from './createTheme'\nimport { ColorSchemeProvider } from './ColorSchemeProvider'\n\n/** Convert camelCase to kebab-case: \"surfaceHover\" → \"surface-hover\" */\nfunction camelToKebab(str: string): string {\n return str.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`)\n}\n\n/**\n * Generate CSS custom-property declarations from a theme override.\n * Only fields present in the override produce variables — tokens.css provides all defaults.\n */\nfunction themeOverrideToCssVars(override: XyneThemeOverride): Record<string, string> {\n const vars: Record<string, string> = {}\n\n if (override.colors) {\n for (const [scale, shades] of Object.entries(override.colors)) {\n for (const [shade, value] of Object.entries(shades)) {\n vars[`--xc-color-${camelToKebab(scale)}-${shade}`] = value\n }\n }\n }\n\n if (override.text) {\n for (const [key, value] of Object.entries(override.text)) {\n vars[`--xc-color-text-${camelToKebab(key)}`] = value\n }\n }\n\n if (override.bg) {\n for (const [key, value] of Object.entries(override.bg)) {\n vars[`--xc-color-bg-${camelToKebab(key)}`] = value\n }\n }\n\n if (override.border) {\n for (const [key, value] of Object.entries(override.border)) {\n vars[`--xc-color-border-${camelToKebab(key)}`] = value\n }\n }\n\n if (override.shadow) {\n for (const [key, value] of Object.entries(override.shadow)) {\n vars[`--xc-shadow-${camelToKebab(key)}`] = value\n }\n }\n\n if (override.radius) {\n for (const [key, value] of Object.entries(override.radius)) {\n vars[`--xc-radius-${camelToKebab(key)}`] = value\n }\n }\n\n if (override.spacing) {\n for (const [key, value] of Object.entries(override.spacing)) {\n vars[`--xc-space-${key}`] = value\n }\n }\n\n if (override.fontFamily) {\n vars['--xc-font-family'] = override.fontFamily\n }\n\n if (override.fontWeight) {\n for (const [key, value] of Object.entries(override.fontWeight)) {\n vars[`--xc-font-weight-${camelToKebab(key)}`] = value\n }\n }\n\n if (override.fontSize) {\n for (const [key, value] of Object.entries(override.fontSize)) {\n vars[`--xc-font-size-${key}`] = value\n }\n }\n\n if (override.lineHeight) {\n for (const [key, value] of Object.entries(override.lineHeight)) {\n vars[`--xc-line-height-${key}`] = value\n }\n }\n\n return vars\n}\n\nexport interface ThemeProviderProps {\n /** Theme override — deep-merged with DEFAULT_THEME */\n theme?: XyneThemeOverride\n /** CSS selector for variable injection. @default ':root' */\n cssVariablesSelector?: string\n /** Initial color scheme if nothing is stored. @default 'light' */\n defaultColorScheme?: ColorScheme\n /** Force a specific color scheme — ignores storage and user toggle. */\n forceColorScheme?: ResolvedColorScheme\n /** localStorage key for color scheme persistence. @default 'xc-color-scheme' */\n colorSchemeStorageKey?: string\n /** Return the element to set `data-theme` on. @default () => document.documentElement */\n getRootElement?: () => HTMLElement | undefined\n children: React.ReactNode\n}\n\n/**\n * Provides theme context and injects CSS variable overrides via a <style> tag.\n * Wrap your app (or a subtree) to customise design tokens.\n *\n * @important Pass a stable reference (from `createTheme()` or `useMemo`) to the `theme` prop.\n * Inline object literals recreate a new reference every render, causing unnecessary CSS\n * recalculations. Example: `const theme = createTheme({ text: { brand: '#0066ff' } })` outside\n * your component, then `<ThemeProvider theme={theme}>`.\n *\n * @example\n * ```tsx\n * const theme = createTheme({ text: { brand: '#0066ff' } })\n * <ThemeProvider theme={theme}>{children}</ThemeProvider>\n * ```\n */\nexport function ThemeProvider({\n theme: themeOverride = {},\n cssVariablesSelector = ':root',\n defaultColorScheme = 'light',\n forceColorScheme,\n colorSchemeStorageKey,\n getRootElement,\n children,\n}: ThemeProviderProps) {\n const resolvedTheme = useMemo(\n () => createTheme(themeOverride),\n [themeOverride],\n )\n\n const cssText = useMemo(() => {\n const vars = themeOverrideToCssVars(themeOverride)\n const entries = Object.entries(vars)\n if (entries.length === 0) return ''\n const declarations = entries\n .map(([k, v]) => ` ${k}: ${v};`)\n .join('\\n')\n return `${cssVariablesSelector} {\\n${declarations}\\n}`\n }, [themeOverride, cssVariablesSelector])\n\n return (\n <ColorSchemeProvider\n defaultColorScheme={defaultColorScheme}\n forceColorScheme={forceColorScheme}\n storageKey={colorSchemeStorageKey}\n getRootElement={getRootElement}\n >\n <ThemeContext.Provider value={resolvedTheme}>\n {cssText && <style data-xc-theme=\"\">{cssText}</style>}\n {children}\n </ThemeContext.Provider>\n </ColorSchemeProvider>\n )\n}\n","import React, { useState, useEffect, useMemo, useCallback } from 'react'\nimport type { ColorScheme, ResolvedColorScheme, ColorSchemeContextValue } from './colorScheme.types'\nimport { ColorSchemeContext } from './ColorSchemeContext'\n\nconst STORAGE_KEY = 'xc-color-scheme'\n\nfunction getSystemPreference(): ResolvedColorScheme {\n if (typeof window === 'undefined') return 'light'\n return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'\n}\n\nfunction applyToDOM(resolved: ResolvedColorScheme, getRootElement?: () => HTMLElement | undefined) {\n if (typeof document === 'undefined') return\n const root = getRootElement ? getRootElement() : document.documentElement\n if (root) root.setAttribute('data-theme', resolved)\n}\n\nexport interface ColorSchemeProviderProps {\n defaultColorScheme?: ColorScheme\n forceColorScheme?: ResolvedColorScheme\n storageKey?: string\n getRootElement?: () => HTMLElement | undefined\n children: React.ReactNode\n}\n\nexport function ColorSchemeProvider({\n defaultColorScheme = 'light',\n forceColorScheme,\n storageKey = STORAGE_KEY,\n getRootElement,\n children,\n}: ColorSchemeProviderProps) {\n const [colorScheme, setColorSchemeRaw] = useState<ColorScheme>(() => {\n if (forceColorScheme) return forceColorScheme\n try {\n if (typeof window !== 'undefined') {\n const v = window.localStorage.getItem(storageKey)\n if (v === 'light' || v === 'dark' || v === 'auto') return v\n }\n } catch { /* noop */ }\n return defaultColorScheme\n })\n\n const [systemPreference, setSystemPreference] = useState<ResolvedColorScheme>(getSystemPreference)\n\n const resolvedColorScheme: ResolvedColorScheme = forceColorScheme\n ?? (colorScheme === 'auto' ? systemPreference : colorScheme)\n\n useEffect(() => {\n if (typeof window === 'undefined') return\n const mq = window.matchMedia('(prefers-color-scheme: dark)')\n const handler = (e: MediaQueryListEvent) => {\n setSystemPreference(e.matches ? 'dark' : 'light')\n }\n mq.addEventListener('change', handler)\n return () => mq.removeEventListener('change', handler)\n }, [])\n\n useEffect(() => {\n if (typeof window === 'undefined') return\n const handler = (e: StorageEvent) => {\n if (e.key !== storageKey) return\n const val = e.newValue\n if (val === 'light' || val === 'dark' || val === 'auto') {\n setColorSchemeRaw(val)\n }\n }\n window.addEventListener('storage', handler)\n return () => window.removeEventListener('storage', handler)\n }, [storageKey])\n\n useEffect(() => {\n applyToDOM(resolvedColorScheme, getRootElement)\n }, [resolvedColorScheme, getRootElement])\n\n const setColorScheme = useCallback((scheme: ColorScheme) => {\n if (forceColorScheme) return\n setColorSchemeRaw(scheme)\n try {\n window.localStorage.setItem(storageKey, scheme)\n } catch { /* noop */ }\n }, [forceColorScheme, storageKey])\n\n const toggleColorScheme = useCallback(() => {\n setColorScheme(resolvedColorScheme === 'dark' ? 'light' : 'dark')\n }, [resolvedColorScheme, setColorScheme])\n\n const value = useMemo<ColorSchemeContextValue>(() => ({\n colorScheme,\n resolvedColorScheme,\n setColorScheme,\n toggleColorScheme,\n }), [colorScheme, resolvedColorScheme, setColorScheme, toggleColorScheme])\n\n return (\n <ColorSchemeContext.Provider value={value}>\n {children}\n </ColorSchemeContext.Provider>\n )\n}\n"],"mappings":";;;;;;;;AAGA,SAAS,cAAc,OAAkD;AACvE,SAAO,UAAU,QAAQ,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAEA,SAAS,UACP,QACA,QACyB;AACzB,QAAM,SAAkC,EAAE,GAAG,OAAO;AACpD,aAAW,OAAO,OAAO,KAAK,MAAM,GAAG;AACrC,QAAI,cAAc,OAAO,GAAG,CAAC,KAAK,cAAc,OAAO,GAAG,CAAC,GAAG;AAC5D,aAAO,GAAG,IAAI;AAAA,QACZ,OAAO,GAAG;AAAA,QACV,OAAO,GAAG;AAAA,MACZ;AAAA,IACF,OAAO;AACL,aAAO,GAAG,IAAI,OAAO,GAAG;AAAA,IAC1B;AAAA,EACF;AACA,SAAO;AACT;AAGO,SAAS,YAAY,UAAwC;AAClE,SAAO;AAAA,IACL;AAAA,IACA;AAAA,EACF;AACF;;;AC/BA,SAAgB,WAAAA,gBAAe;;;ACA/B,SAAgB,UAAU,WAAW,SAAS,mBAAmB;AA+F7D;AA3FJ,IAAM,cAAc;AAEpB,SAAS,sBAA2C;AAClD,MAAI,OAAO,WAAW,YAAa,QAAO;AAC1C,SAAO,OAAO,WAAW,8BAA8B,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