@xanui/core 1.3.12 → 1.3.14

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 (102) hide show
  1. package/AppRoot/AppRootProvider.cjs.map +1 -1
  2. package/AppRoot/AppRootProvider.js.map +1 -1
  3. package/AppRoot/Renderar.cjs.map +1 -1
  4. package/AppRoot/Renderar.js.map +1 -1
  5. package/AppRoot/index.cjs +2 -2
  6. package/AppRoot/index.cjs.map +1 -1
  7. package/AppRoot/index.js +2 -2
  8. package/AppRoot/index.js.map +1 -1
  9. package/Document/index.cjs.map +1 -1
  10. package/Document/index.js.map +1 -1
  11. package/Iframe/index.cjs.map +1 -1
  12. package/Iframe/index.js.map +1 -1
  13. package/Portal/index.cjs.map +1 -1
  14. package/Portal/index.js.map +1 -1
  15. package/Tag/ServerStyleTag.cjs.map +1 -1
  16. package/Tag/ServerStyleTag.js.map +1 -1
  17. package/Tag/cssPropList.cjs.map +1 -1
  18. package/Tag/cssPropList.js.map +1 -1
  19. package/Tag/index.cjs.map +1 -1
  20. package/Tag/index.js.map +1 -1
  21. package/Tag/useTagProps.cjs.map +1 -1
  22. package/Tag/useTagProps.js.map +1 -1
  23. package/Transition/index.cjs.map +1 -1
  24. package/Transition/index.js.map +1 -1
  25. package/Transition/variants.cjs.map +1 -1
  26. package/Transition/variants.js.map +1 -1
  27. package/animate/easing.cjs.map +1 -1
  28. package/animate/easing.js.map +1 -1
  29. package/animate/index.cjs.map +1 -1
  30. package/animate/index.js.map +1 -1
  31. package/breakpoint/BreakpointProvider.cjs.map +1 -1
  32. package/breakpoint/BreakpointProvider.js.map +1 -1
  33. package/breakpoint/useBreakpoint.cjs.map +1 -1
  34. package/breakpoint/useBreakpoint.js.map +1 -1
  35. package/breakpoint/useBreakpointProps.cjs.map +1 -1
  36. package/breakpoint/useBreakpointProps.js.map +1 -1
  37. package/cookie.cjs.map +1 -1
  38. package/cookie.js.map +1 -1
  39. package/css/CSSCacheProvider.cjs.map +1 -1
  40. package/css/CSSCacheProvider.js.map +1 -1
  41. package/css/aliases.cjs.map +1 -1
  42. package/css/aliases.js.map +1 -1
  43. package/css/getProps.cjs +1 -1
  44. package/css/getProps.cjs.map +1 -1
  45. package/css/getProps.js +1 -1
  46. package/css/getProps.js.map +1 -1
  47. package/css/getValue.cjs +7 -7
  48. package/css/getValue.cjs.map +1 -1
  49. package/css/getValue.js +7 -7
  50. package/css/getValue.js.map +1 -1
  51. package/css/index.cjs.map +1 -1
  52. package/css/index.js.map +1 -1
  53. package/hooks/useColorTemplate.cjs +10 -10
  54. package/hooks/useColorTemplate.cjs.map +1 -1
  55. package/hooks/useColorTemplate.js +10 -10
  56. package/hooks/useColorTemplate.js.map +1 -1
  57. package/hooks/useInView.cjs +32 -0
  58. package/hooks/useInView.cjs.map +1 -0
  59. package/hooks/useInView.d.ts +15 -0
  60. package/hooks/useInView.js +30 -0
  61. package/hooks/useInView.js.map +1 -0
  62. package/hooks/useInterface.cjs.map +1 -1
  63. package/hooks/useInterface.js.map +1 -1
  64. package/hooks/useMergeRefs.cjs.map +1 -1
  65. package/hooks/useMergeRefs.js.map +1 -1
  66. package/hooks/useTransition.cjs.map +1 -1
  67. package/hooks/useTransition.js.map +1 -1
  68. package/hooks/useTransitionGroup.cjs.map +1 -1
  69. package/hooks/useTransitionGroup.js.map +1 -1
  70. package/index.cjs +10 -0
  71. package/index.cjs.map +1 -1
  72. package/index.d.ts +3 -2
  73. package/index.js +2 -1
  74. package/index.js.map +1 -1
  75. package/package.json +1 -1
  76. package/readme.md +109 -109
  77. package/theme/ThemeCssVars.cjs +4 -4
  78. package/theme/ThemeCssVars.cjs.map +1 -1
  79. package/theme/ThemeCssVars.js +4 -4
  80. package/theme/ThemeCssVars.js.map +1 -1
  81. package/theme/ThemeDefaultOptions.cjs +19 -18
  82. package/theme/ThemeDefaultOptions.cjs.map +1 -1
  83. package/theme/ThemeDefaultOptions.js +19 -18
  84. package/theme/ThemeDefaultOptions.js.map +1 -1
  85. package/theme/ThemeProvider.cjs +4 -4
  86. package/theme/ThemeProvider.cjs.map +1 -1
  87. package/theme/ThemeProvider.js +4 -4
  88. package/theme/ThemeProvider.js.map +1 -1
  89. package/theme/core.cjs +14 -4
  90. package/theme/core.cjs.map +1 -1
  91. package/theme/core.d.ts +9 -1
  92. package/theme/core.js +15 -5
  93. package/theme/core.js.map +1 -1
  94. package/theme/index.cjs +8 -0
  95. package/theme/index.cjs.map +1 -1
  96. package/theme/index.js +1 -1
  97. package/theme/index.js.map +1 -1
  98. package/theme/oklch.cjs +89 -89
  99. package/theme/oklch.cjs.map +1 -1
  100. package/theme/oklch.js +89 -89
  101. package/theme/oklch.js.map +1 -1
  102. package/theme/types.d.ts +6 -6
package/readme.md CHANGED
@@ -1,109 +1,109 @@
1
- # Xanui Core
2
-
3
- Xanui Core is a lightweight styling and theming toolkit for React. It bundles a constraint-based CSS generator, a TypeScript-friendly `<Tag>` primitive, responsive helpers, and an opinionated theme engine so that design tokens, animations, and layout logic stay consistent across your application.
4
-
5
- ## Highlights
6
-
7
- - Build any element with `<Tag>` and the ergonomic `sx`/alias props while still passing native attributes.
8
- - Author design tokens once via `createTheme`, ship them with `ThemeProvider`, and switch them at runtime with `createThemeSwitcher`.
9
- - Drive responsive layouts using `BreakpointProvider`, `useBreakpoint`, and `useBreakpointProps` without bespoke media queries.
10
- - Compose micro-animations through `useAnimation`, ready-made `Transition` variants, and reusable CSS utilities.
11
- - Support SSR portals by rehydrating critical styles with `RenderServerStyles`.
12
-
13
- ## Installation
14
-
15
- ```bash
16
- npm install @xanui/core
17
- ```
18
-
19
- ## Quick Start
20
-
21
- ```tsx
22
- import { ThemeProvider, Tag, createTheme, createThemeSwitcher } from '@xanui/core'
23
-
24
- // Register a custom theme once at startup
25
- createTheme('brand', {
26
- colors: {
27
- brand: { primary: '#7C3AED', secondary: '#5B21B6' },
28
- },
29
- })
30
-
31
- const useThemeSwitcher = createThemeSwitcher('brand', ThemeSwitcherOption)
32
-
33
- export const App = () => {
34
- const { name, change } = useThemeSwitcher()
35
-
36
- return (
37
- <ThemeProvider theme={name} isRootProvider>
38
- <Tag
39
- component="main"
40
- px={24}
41
- py={32}
42
- bgcolor="background"
43
- color="surface.contrast"
44
- gap={24}
45
- >
46
- <Tag component="h1" fontSize="h2">
47
- Xanui Core
48
- </Tag>
49
-
50
- <button onClick={() => change(name === 'brand' ? 'dark' : 'brand')}>
51
- Toggle Theme
52
- </button>
53
- </Tag>
54
- </ThemeProvider>
55
- )
56
- }
57
- ```
58
-
59
- ## Core Concepts
60
-
61
- - **Design Tokens** – `createTheme` merges your overrides with defaults and exposes typed references like `primary.main` or typography presets.
62
- - **Adaptive Layout** – Wrap your app with `BreakpointProvider` (automatically included by `ThemeProvider` when `isRootProvider` is `true`) to consume breakpoint helpers throughout the tree.
63
- - **Composable Styles** – `css`, `getValue`, and `getProps` transform alias props, breakpoints, and pseudo selectors into atomic class names. Use them directly for utilities such as scrollbars or keyframes.
64
- - **Animation Primitives** – `useAnimation` builds scoped keyframes on the fly; `Transition` controls mount/unmount sequences with variants such as `fade`, `slideDown`, or `collapseVertical`.
65
-
66
- ## Server-Side Rendering
67
-
68
- When rendering on the server, collect the emitted styles:
69
-
70
- ```tsx
71
- import RenderServerStyles from '@xanui/core/RenderServerStyles'
72
-
73
- export const Document = () => (
74
- <html>
75
- <head>
76
- <RenderServerStyles />
77
- </head>
78
- <body>{/* app */}</body>
79
- </html>
80
- )
81
- ```
82
-
83
- ## Documentation
84
-
85
- Detailed API docs (props tables, option summaries, and usage examples) live inside the `docs/` directory. Each API/component has its own `README.md` for fast reference:
86
-
87
- - `docs/tag/README.md`
88
- - `docs/theme-provider/README.md`
89
- - `docs/transition/README.md`
90
- - `docs/use-animation/README.md`
91
- - `docs/use-color-template/README.md`
92
- - `docs/use-interface/README.md`
93
- - `docs/use-breakpoint/README.md`
94
- - `docs/use-breakpoint-props/README.md`
95
- - `docs/use-scrollbar/README.md`
96
- - `docs/render-server-styles/README.md`
97
- - `docs/css/README.md`
98
- - `docs/create-theme/README.md`
99
-
100
- ## Contributing
101
-
102
- 1. Fork and clone the repo.
103
- 2. Run `npm install`.
104
- 3. Use `npm run build` to verify type safety.
105
- 4. Submit a pull request that focuses on one improvement at a time.
106
-
107
- ---
108
-
109
- Need another integration example or a new preset? Open an issue so we can keep the primitives lean and discoverable.
1
+ # Xanui Core
2
+
3
+ Xanui Core is a lightweight styling and theming toolkit for React. It bundles a constraint-based CSS generator, a TypeScript-friendly `<Tag>` primitive, responsive helpers, and an opinionated theme engine so that design tokens, animations, and layout logic stay consistent across your application.
4
+
5
+ ## Highlights
6
+
7
+ - Build any element with `<Tag>` and the ergonomic `sx`/alias props while still passing native attributes.
8
+ - Author design tokens once via `createTheme`, ship them with `ThemeProvider`, and switch them at runtime with `createThemeSwitcher`.
9
+ - Drive responsive layouts using `BreakpointProvider`, `useBreakpoint`, and `useBreakpointProps` without bespoke media queries.
10
+ - Compose micro-animations through `useAnimation`, ready-made `Transition` variants, and reusable CSS utilities.
11
+ - Support SSR portals by rehydrating critical styles with `RenderServerStyles`.
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ npm install @xanui/core
17
+ ```
18
+
19
+ ## Quick Start
20
+
21
+ ```tsx
22
+ import { ThemeProvider, Tag, createTheme, createThemeSwitcher } from '@xanui/core'
23
+
24
+ // Register a custom theme once at startup
25
+ createTheme('brand', {
26
+ colors: {
27
+ brand: { primary: '#7C3AED', secondary: '#5B21B6' },
28
+ },
29
+ })
30
+
31
+ const useThemeSwitcher = createThemeSwitcher('brand', ThemeSwitcherOption)
32
+
33
+ export const App = () => {
34
+ const { name, change } = useThemeSwitcher()
35
+
36
+ return (
37
+ <ThemeProvider theme={name} isRootProvider>
38
+ <Tag
39
+ component="main"
40
+ px={24}
41
+ py={32}
42
+ bgcolor="background"
43
+ color="default.contrast"
44
+ gap={24}
45
+ >
46
+ <Tag component="h1" fontSize="h2">
47
+ Xanui Core
48
+ </Tag>
49
+
50
+ <button onClick={() => change(name === 'brand' ? 'dark' : 'brand')}>
51
+ Toggle Theme
52
+ </button>
53
+ </Tag>
54
+ </ThemeProvider>
55
+ )
56
+ }
57
+ ```
58
+
59
+ ## Core Concepts
60
+
61
+ - **Design Tokens** – `createTheme` merges your overrides with defaults and exposes typed references like `primary.base` or typography presets.
62
+ - **Adaptive Layout** – Wrap your app with `BreakpointProvider` (automatically included by `ThemeProvider` when `isRootProvider` is `true`) to consume breakpoint helpers throughout the tree.
63
+ - **Composable Styles** – `css`, `getValue`, and `getProps` transform alias props, breakpoints, and pseudo selectors into atomic class names. Use them directly for utilities such as scrollbars or keyframes.
64
+ - **Animation Primitives** – `useAnimation` builds scoped keyframes on the fly; `Transition` controls mount/unmount sequences with variants such as `fade`, `slideDown`, or `collapseVertical`.
65
+
66
+ ## Server-Side Rendering
67
+
68
+ When rendering on the server, collect the emitted styles:
69
+
70
+ ```tsx
71
+ import RenderServerStyles from '@xanui/core/RenderServerStyles'
72
+
73
+ export const Document = () => (
74
+ <html>
75
+ <head>
76
+ <RenderServerStyles />
77
+ </head>
78
+ <body>{/* app */}</body>
79
+ </html>
80
+ )
81
+ ```
82
+
83
+ ## Documentation
84
+
85
+ Detailed API docs (props tables, option summaries, and usage examples) live inside the `docs/` directory. Each API/component has its own `README.md` for fast reference:
86
+
87
+ - `docs/tag/README.md`
88
+ - `docs/theme-provider/README.md`
89
+ - `docs/transition/README.md`
90
+ - `docs/use-animation/README.md`
91
+ - `docs/use-color-template/README.md`
92
+ - `docs/use-interface/README.md`
93
+ - `docs/use-breakpoint/README.md`
94
+ - `docs/use-breakpoint-props/README.md`
95
+ - `docs/use-scrollbar/README.md`
96
+ - `docs/render-server-styles/README.md`
97
+ - `docs/css/README.md`
98
+ - `docs/create-theme/README.md`
99
+
100
+ ## Contributing
101
+
102
+ 1. Fork and clone the repo.
103
+ 2. Run `npm install`.
104
+ 3. Use `npm run build` to verify type safety.
105
+ 4. Submit a pull request that focuses on one improvement at a time.
106
+
107
+ ---
108
+
109
+ Need another integration example or a new preset? Open an issue so we can keep the primitives lean and discoverable.
@@ -24,12 +24,12 @@ const ThemeCssVars = (theme) => {
24
24
  }
25
25
  }
26
26
  }
27
- const colorNames = ["surface", "primary", "accent", "success", "info", "warning", "danger"];
28
- const colorKeys = ["main", "light", "lighter", "dark", "darker", "contrast", "muted", "divider", "ghost"];
27
+ const colorNames = ["default", "primary", "accent", "success", "info", "warning", "danger"];
28
+ const colorKeys = ["base", "surface", "subtle", "elevated", "emphasis", "contrast", "muted", "divider", "ghost"];
29
29
  for (let cname of colorNames) {
30
30
  if (cname in theme.colors) {
31
- if ("main" in theme.colors[cname]) {
32
- vars[`--color-${cname}`] = theme.colors[cname]["main"];
31
+ if ("base" in theme.colors[cname]) {
32
+ vars[`--color-${cname}`] = theme.colors[cname]["base"];
33
33
  }
34
34
  for (let key of colorKeys) {
35
35
  if (key in theme.colors[cname]) {
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeCssVars.cjs","sources":["../../src/theme/ThemeCssVars.ts"],"sourcesContent":["import { breakpoints } from \"../css\";\nimport { ThemeOptions } from \"./types\";\n\nconst ThemeCssVars = (theme: ThemeOptions) => {\n const vars: any = {}\n\n const bnames = Object.keys(breakpoints)\n for (let name of bnames) {\n if (name in theme.breakpoints) {\n vars[`--bp-${name}`] = (theme as any).breakpoints[name]\n }\n }\n\n const typoNames = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"big\", \"text\", \"button\", \"small\"]\n const typoKeys = [\"fontSize\", \"fontWeight\", \"lineHeight\"]\n for (let tname of typoNames) {\n if (tname in theme.typography) {\n for (let key of typoKeys) {\n const v = (theme as any).typography[tname]\n if (key in v) {\n let px = key === \"fontSize\" ? \"px\" : \"\"\n vars[`--${key.toLowerCase()}-${tname}`] = `${(theme as any).typography[tname][key]}${px}`\n }\n }\n }\n }\n\n const colorNames = [\"surface\", \"primary\", \"accent\", \"success\", \"info\", \"warning\", \"danger\"]\n const colorKeys = [\"main\", \"light\", \"lighter\", \"dark\", \"darker\", \"contrast\", \"muted\", \"divider\", \"ghost\"]\n for (let cname of colorNames) {\n if (cname in theme.colors) {\n if (\"main\" in (theme as any).colors[cname]) {\n vars[`--color-${cname}`] = (theme as any).colors[cname][\"main\"]\n }\n\n for (let key of colorKeys) {\n if (key in (theme as any).colors[cname]) {\n vars[`--color-${cname}-${key}`] = (theme as any).colors[cname][key]\n }\n }\n }\n }\n\n theme.shadow?.forEach((s, i) => vars[`--shadow-${i}`] = s)\n\n return vars\n}\n\nexport default ThemeCssVars"],"names":["breakpoints"],"mappings":";;;;AAGA,MAAM,YAAY,GAAG,CAAC,KAAmB,KAAI;;IACzC,MAAM,IAAI,GAAQ,EAAE;IAEpB,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAACA,iBAAW,CAAC;AACvC,IAAA,KAAK,IAAI,IAAI,IAAI,MAAM,EAAE;AACrB,QAAA,IAAI,IAAI,IAAI,KAAK,CAAC,WAAW,EAAE;AAC3B,YAAA,IAAI,CAAC,CAAA,KAAA,EAAQ,IAAI,CAAA,CAAE,CAAC,GAAI,KAAa,CAAC,WAAW,CAAC,IAAI,CAAC;QAC3D;IACJ;IAEA,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC;IACxF,MAAM,QAAQ,GAAG,CAAC,UAAU,EAAE,YAAY,EAAE,YAAY,CAAC;AACzD,IAAA,KAAK,IAAI,KAAK,IAAI,SAAS,EAAE;AACzB,QAAA,IAAI,KAAK,IAAI,KAAK,CAAC,UAAU,EAAE;AAC3B,YAAA,KAAK,IAAI,GAAG,IAAI,QAAQ,EAAE;gBACtB,MAAM,CAAC,GAAI,KAAa,CAAC,UAAU,CAAC,KAAK,CAAC;AAC1C,gBAAA,IAAI,GAAG,IAAI,CAAC,EAAE;AACV,oBAAA,IAAI,EAAE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AAA,CAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,CAAA,SAAA,EAAY,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAE1D,IAAA,OAAO,IAAI;AACf;;;;"}
1
+ {"version":3,"file":"ThemeCssVars.cjs","sources":["../../src/theme/ThemeCssVars.ts"],"sourcesContent":["import { breakpoints } from \"../css\";\r\nimport { ThemeOptions } from \"./types\";\r\n\r\nconst ThemeCssVars = (theme: ThemeOptions) => {\r\n const vars: any = {}\r\n\r\n const bnames = Object.keys(breakpoints)\r\n for (let name of bnames) {\r\n if (name in theme.breakpoints) {\r\n vars[`--bp-${name}`] = (theme as any).breakpoints[name]\r\n }\r\n }\r\n\r\n const typoNames = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"big\", \"text\", \"button\", \"small\"]\r\n const typoKeys = [\"fontSize\", \"fontWeight\", \"lineHeight\"]\r\n for (let tname of typoNames) {\r\n if (tname in theme.typography) {\r\n for (let key of typoKeys) {\r\n const v = (theme as any).typography[tname]\r\n if (key in v) {\r\n let px = key === \"fontSize\" ? \"px\" : \"\"\r\n vars[`--${key.toLowerCase()}-${tname}`] = `${(theme as any).typography[tname][key]}${px}`\r\n }\r\n }\r\n }\r\n }\r\n\r\n const colorNames = [\"default\", \"primary\", \"accent\", \"success\", \"info\", \"warning\", \"danger\"]\r\n const colorKeys = [\"base\", \"surface\", \"subtle\", \"elevated\", \"emphasis\", \"contrast\", \"muted\", \"divider\", \"ghost\"]\r\n for (let cname of colorNames) {\r\n if (cname in theme.colors) {\r\n if (\"base\" in (theme as any).colors[cname]) {\r\n vars[`--color-${cname}`] = (theme as any).colors[cname][\"base\"]\r\n }\r\n\r\n for (let key of colorKeys) {\r\n if (key in (theme as any).colors[cname]) {\r\n vars[`--color-${cname}-${key}`] = (theme as any).colors[cname][key]\r\n }\r\n }\r\n }\r\n }\r\n\r\n theme.shadow?.forEach((s, i) => vars[`--shadow-${i}`] = s)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,UAAU,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC;IAC3F,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC;AAChH,IAAA,KAAK,IAAI,KAAK,IAAI,UAAU,EAAE;AAC1B,QAAA,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE;YACvB,IAAI,MAAM,IAAK,KAAa,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;AACxC,gBAAA,IAAI,CAAC,CAAA,QAAA,EAAW,KAAK,CAAA,CAAE,CAAC,GAAI,KAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;YACnE;AAEA,YAAA,KAAK,IAAI,GAAG,IAAI,SAAS,EAAE;gBACvB,IAAI,GAAG,IAAK,KAAa,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;AACrC,oBAAA,IAAI,CAAC,CAAA,QAAA,EAAW,KAAK,CAAA,CAAA,EAAI,GAAG,EAAE,CAAC,GAAI,KAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC;gBACvE;YACJ;QACJ;IACJ;IAEA,CAAA,EAAA,GAAA,KAAK,CAAC,MAAM,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,CAAA,SAAA,EAAY,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAE1D,IAAA,OAAO,IAAI;AACf;;;;"}
@@ -22,12 +22,12 @@ const ThemeCssVars = (theme) => {
22
22
  }
23
23
  }
24
24
  }
25
- const colorNames = ["surface", "primary", "accent", "success", "info", "warning", "danger"];
26
- const colorKeys = ["main", "light", "lighter", "dark", "darker", "contrast", "muted", "divider", "ghost"];
25
+ const colorNames = ["default", "primary", "accent", "success", "info", "warning", "danger"];
26
+ const colorKeys = ["base", "surface", "subtle", "elevated", "emphasis", "contrast", "muted", "divider", "ghost"];
27
27
  for (let cname of colorNames) {
28
28
  if (cname in theme.colors) {
29
- if ("main" in theme.colors[cname]) {
30
- vars[`--color-${cname}`] = theme.colors[cname]["main"];
29
+ if ("base" in theme.colors[cname]) {
30
+ vars[`--color-${cname}`] = theme.colors[cname]["base"];
31
31
  }
32
32
  for (let key of colorKeys) {
33
33
  if (key in theme.colors[cname]) {
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeCssVars.js","sources":["../../src/theme/ThemeCssVars.ts"],"sourcesContent":["import { breakpoints } from \"../css\";\nimport { ThemeOptions } from \"./types\";\n\nconst ThemeCssVars = (theme: ThemeOptions) => {\n const vars: any = {}\n\n const bnames = Object.keys(breakpoints)\n for (let name of bnames) {\n if (name in theme.breakpoints) {\n vars[`--bp-${name}`] = (theme as any).breakpoints[name]\n }\n }\n\n const typoNames = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"big\", \"text\", \"button\", \"small\"]\n const typoKeys = [\"fontSize\", \"fontWeight\", \"lineHeight\"]\n for (let tname of typoNames) {\n if (tname in theme.typography) {\n for (let key of typoKeys) {\n const v = (theme as any).typography[tname]\n if (key in v) {\n let px = key === \"fontSize\" ? \"px\" : \"\"\n vars[`--${key.toLowerCase()}-${tname}`] = `${(theme as any).typography[tname][key]}${px}`\n }\n }\n }\n }\n\n const colorNames = [\"surface\", \"primary\", \"accent\", \"success\", \"info\", \"warning\", \"danger\"]\n const colorKeys = [\"main\", \"light\", \"lighter\", \"dark\", \"darker\", \"contrast\", \"muted\", \"divider\", \"ghost\"]\n for (let cname of colorNames) {\n if (cname in theme.colors) {\n if (\"main\" in (theme as any).colors[cname]) {\n vars[`--color-${cname}`] = (theme as any).colors[cname][\"main\"]\n }\n\n for (let key of colorKeys) {\n if (key in (theme as any).colors[cname]) {\n vars[`--color-${cname}-${key}`] = (theme as any).colors[cname][key]\n }\n }\n }\n }\n\n theme.shadow?.forEach((s, i) => vars[`--shadow-${i}`] = s)\n\n return vars\n}\n\nexport default ThemeCssVars"],"names":[],"mappings":";;AAGA,MAAM,YAAY,GAAG,CAAC,KAAmB,KAAI;;IACzC,MAAM,IAAI,GAAQ,EAAE;IAEpB,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC;AACvC,IAAA,KAAK,IAAI,IAAI,IAAI,MAAM,EAAE;AACrB,QAAA,IAAI,IAAI,IAAI,KAAK,CAAC,WAAW,EAAE;AAC3B,YAAA,IAAI,CAAC,CAAA,KAAA,EAAQ,IAAI,CAAA,CAAE,CAAC,GAAI,KAAa,CAAC,WAAW,CAAC,IAAI,CAAC;QAC3D;IACJ;IAEA,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC;IACxF,MAAM,QAAQ,GAAG,CAAC,UAAU,EAAE,YAAY,EAAE,YAAY,CAAC;AACzD,IAAA,KAAK,IAAI,KAAK,IAAI,SAAS,EAAE;AACzB,QAAA,IAAI,KAAK,IAAI,KAAK,CAAC,UAAU,EAAE;AAC3B,YAAA,KAAK,IAAI,GAAG,IAAI,QAAQ,EAAE;gBACtB,MAAM,CAAC,GAAI,KAAa,CAAC,UAAU,CAAC,KAAK,CAAC;AAC1C,gBAAA,IAAI,GAAG,IAAI,CAAC,EAAE;AACV,oBAAA,IAAI,EAAE,GAAG,GAAG,KAAK,UAAU,GAAG,IAAI,GAAG,EAAE;oBACvC,IAAI,CAAC,CAAA,EAAA,EAAK,GAAG,CAAC,WAAW,EAAE,CAAA,CAAA,EAAI,KAAK,CAAA,CAAE,CAAC,GAAG,CAAA,EAAI,KAAa,CAAC,UAAU,CAAC,KAAK,CAAC,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Vars.ts"],"sourcesContent":["import { breakpoints } from \"../css\";\r\nimport { ThemeOptions } from \"./types\";\r\n\r\nconst ThemeCssVars = (theme: ThemeOptions) => {\r\n const vars: any = {}\r\n\r\n const bnames = Object.keys(breakpoints)\r\n for (let name of bnames) {\r\n if (name in theme.breakpoints) {\r\n vars[`--bp-${name}`] = (theme as any).breakpoints[name]\r\n }\r\n }\r\n\r\n const typoNames = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"big\", \"text\", \"button\", \"small\"]\r\n const typoKeys = [\"fontSize\", \"fontWeight\", \"lineHeight\"]\r\n for (let tname of typoNames) {\r\n if (tname in theme.typography) {\r\n for (let key of typoKeys) {\r\n const v = (theme as any).typography[tname]\r\n if (key in v) {\r\n let px = key === \"fontSize\" ? \"px\" : \"\"\r\n vars[`--${key.toLowerCase()}-${tname}`] = `${(theme as any).typography[tname][key]}${px}`\r\n }\r\n }\r\n }\r\n }\r\n\r\n const colorNames = [\"default\", \"primary\", \"accent\", \"success\", \"info\", \"warning\", \"danger\"]\r\n const colorKeys = [\"base\", \"surface\", \"subtle\", \"elevated\", \"emphasis\", \"contrast\", \"muted\", \"divider\", \"ghost\"]\r\n for (let cname of colorNames) {\r\n if (cname in theme.colors) {\r\n if (\"base\" in (theme as any).colors[cname]) {\r\n vars[`--color-${cname}`] = (theme as any).colors[cname][\"base\"]\r\n }\r\n\r\n for (let key of colorKeys) {\r\n if (key in (theme as any).colors[cname]) {\r\n vars[`--color-${cname}-${key}`] = (theme as any).colors[cname][key]\r\n }\r\n }\r\n }\r\n }\r\n\r\n theme.shadow?.forEach((s, i) => vars[`--shadow-${i}`] = s)\r\n\r\n return vars\r\n}\r\n\r\nexport default ThemeCssVars"],"names":[],"mappings":";;AAGA,MAAM,YAAY,GAAG,CAAC,KAAmB,KAAI;;IACzC,MAAM,IAAI,GAAQ,EAAE;IAEpB,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC;AACvC,IAAA,K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E,SAAS,EAAE,OAAO,CAAC;AAChH,IAAA,KAAK,IAAI,KAAK,IAAI,UAAU,EAAE;AAC1B,QAAA,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE;YACvB,IAAI,MAAM,IAAK,KAAa,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;AACxC,gBAAA,IAAI,CAAC,CAAA,QAAA,EAAW,KAAK,CAAA,CAAE,CAAC,GAAI,KAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;YACnE;AAEA,YAAA,KAAK,IAAI,GAAG,IAAI,SAAS,EAAE;gBACvB,IAAI,GAAG,IAAK,KAAa,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;AACrC,oBAAA,IAAI,CAAC,CAAA,QAAA,EAAW,KAAK,CAAA,CAAA,EAAI,GAAG,EAAE,CAAC,GAAI,KAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC;gBACvE;YACJ;QACJ;IACJ;IAEA,CAAA,EAAA,GAAA,KAAK,CAAC,MAAM,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,CAAA,SAAA,EAAY,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAE1D,IAAA,OAAO,IAAI;AACf;;;;"}
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ var core = require('./core.cjs');
3
4
  var oklch = require('./oklch.cjs');
4
5
 
5
6
  const lightShadows = [
@@ -68,37 +69,37 @@ const ThemeTypography = {
68
69
  small: { fontSize: 12, lineHeight: 1.6, fontWeight: 400 },
69
70
  };
70
71
  const lightThemeOptions = {
71
- name: "default-light",
72
- mode: "light",
72
+ name: core.DEFAULT_THEME_NAME.DARK,
73
+ mode: core.THEME_MODE.LIGTH,
73
74
  rtl: false,
74
75
  shadow: lightShadows,
75
76
  globalStyle: {},
76
77
  colors: {
77
- surface: oklch.createLightThemePalette("#FFFFFF"),
78
- primary: oklch.createPalette("#2563EB", "light"),
79
- accent: oklch.createPalette("#7C3AED", "light"),
80
- success: oklch.createPalette("#16A34A", "light"),
81
- info: oklch.createPalette("#06B6D4", "light"),
82
- warning: oklch.createPalette("#ff8904", "light"),
83
- danger: oklch.createPalette("#EF4444", "light"),
78
+ default: oklch.createLightThemePalette("#FFFFFF"),
79
+ primary: oklch.createPalette("#2563EB", core.THEME_MODE.LIGTH),
80
+ accent: oklch.createPalette("#7C3AED", core.THEME_MODE.LIGTH),
81
+ success: oklch.createPalette("#16A34A", core.THEME_MODE.LIGTH),
82
+ info: oklch.createPalette("#06B6D4", core.THEME_MODE.LIGTH),
83
+ warning: oklch.createPalette("#ff8904", core.THEME_MODE.LIGTH),
84
+ danger: oklch.createPalette("#EF4444", core.THEME_MODE.LIGTH),
84
85
  },
85
86
  typography: ThemeTypography,
86
87
  interfaces: {}
87
88
  };
88
89
  const darkThemeOptions = {
89
- name: "default-dark",
90
- mode: "dark",
90
+ name: core.DEFAULT_THEME_NAME.LIGHT,
91
+ mode: core.THEME_MODE.DARK,
91
92
  rtl: false,
92
93
  shadow: darkShadows,
93
94
  globalStyle: {},
94
95
  colors: {
95
- surface: oklch.createDarkThemePalette("#0F1115"),
96
- primary: oklch.createPalette("#2563EB", "dark"),
97
- accent: oklch.createPalette("#7C3AED", "dark"),
98
- success: oklch.createPalette("#16A34A", "dark"),
99
- info: oklch.createPalette("#06B6D4", "dark"),
100
- warning: oklch.createPalette("#ff8904", "dark"),
101
- danger: oklch.createPalette("#EF4444", "dark"),
96
+ default: oklch.createDarkThemePalette("#19191b"),
97
+ primary: oklch.createPalette("#2563EB", core.THEME_MODE.DARK),
98
+ accent: oklch.createPalette("#7C3AED", core.THEME_MODE.DARK),
99
+ success: oklch.createPalette("#16A34A", core.THEME_MODE.DARK),
100
+ info: oklch.createPalette("#06B6D4", core.THEME_MODE.DARK),
101
+ warning: oklch.createPalette("#ff8904", core.THEME_MODE.DARK),
102
+ danger: oklch.createPalette("#EF4444", core.THEME_MODE.DARK),
102
103
  },
103
104
  typography: ThemeTypography,
104
105
  interfaces: {}
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeDefaultOptions.cjs","sources":["../../src/theme/ThemeDefaultOptions.ts"],"sourcesContent":["import { createDarkThemePalette, createLightThemePalette, createPalette } from './oklch';\nimport { ThemeOptionInput, ThemeOptions } from './types'\n\nexport const lightShadows = [\n \"none\",\n \"0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12)\",\n \"0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12)\",\n \"0px 3px 3px -2px rgba(0,0,0,0.2),0px 3px 4px 0px rgba(0,0,0,0.14),0px 1px 8px 0px rgba(0,0,0,0.12)\",\n \"0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)\",\n \"0px 3px 5px -1px rgba(0,0,0,0.2),0px 5px 8px 0px rgba(0,0,0,0.14),0px 1px 14px 0px rgba(0,0,0,0.12)\",\n \"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)\",\n \"0px 4px 5px -2px rgba(0,0,0,0.2),0px 7px 10px 1px rgba(0,0,0,0.14),0px 2px 16px 1px rgba(0,0,0,0.12)\",\n \"0px 5px 5px -3px rgba(0,0,0,0.2),0px 8px 10px 1px rgba(0,0,0,0.14),0px 3px 14px 2px rgba(0,0,0,0.12)\",\n \"0px 5px 6px -3px rgba(0,0,0,0.2),0px 9px 12px 1px rgba(0,0,0,0.14),0px 3px 16px 2px rgba(0,0,0,0.12)\",\n \"0px 6px 6px -3px rgba(0,0,0,0.2),0px 10px 14px 1px rgba(0,0,0,0.14),0px 4px 18px 3px rgba(0,0,0,0.12)\",\n \"0px 6px 7px -4px rgba(0,0,0,0.2),0px 11px 15px 1px rgba(0,0,0,0.14),0px 4px 20px 3px rgba(0,0,0,0.12)\",\n \"0px 7px 8px -4px rgba(0,0,0,0.2),0px 12px 17px 2px rgba(0,0,0,0.14),0px 5px 22px 4px rgba(0,0,0,0.12)\",\n \"0px 7px 8px -4px rgba(0,0,0,0.2),0px 13px 19px 2px rgba(0,0,0,0.14),0px 5px 24px 4px rgba(0,0,0,0.12)\",\n \"0px 7px 9px -4px rgba(0,0,0,0.2),0px 14px 21px 2px rgba(0,0,0,0.14),0px 5px 26px 4px rgba(0,0,0,0.12)\",\n \"0px 8px 9px -5px rgba(0,0,0,0.2),0px 15px 22px 2px rgba(0,0,0,0.14),0px 6px 28px 5px rgba(0,0,0,0.12)\",\n \"0px 8px 10px -5px rgba(0,0,0,0.2),0px 16px 24px 2px rgba(0,0,0,0.14),0px 6px 30px 5px rgba(0,0,0,0.12)\",\n \"0px 8px 11px -5px rgba(0,0,0,0.2),0px 17px 26px 2px rgba(0,0,0,0.14),0px 6px 32px 5px rgba(0,0,0,0.12)\",\n \"0px 9px 11px -5px rgba(0,0,0,0.2),0px 18px 28px 2px rgba(0,0,0,0.14),0px 7px 34px 6px rgba(0,0,0,0.12)\",\n \"0px 9px 12px -6px rgba(0,0,0,0.2),0px 19px 29px 2px rgba(0,0,0,0.14),0px 7px 36px 6px rgba(0,0,0,0.12)\",\n \"0px 10px 13px -6px rgba(0,0,0,0.2),0px 20px 31px 3px rgba(0,0,0,0.14),0px 8px 38px 7px rgba(0,0,0,0.12)\",\n \"0px 10px 13px -6px rgba(0,0,0,0.2),0px 21px 33px 3px rgba(0,0,0,0.14),0px 8px 40px 7px rgba(0,0,0,0.12)\",\n \"0px 10px 14px -6px rgba(0,0,0,0.2),0px 22px 35px 3px rgba(0,0,0,0.14),0px 8px 42px 7px rgba(0,0,0,0.12)\",\n \"0px 11px 14px -7px rgba(0,0,0,0.2),0px 23px 36px 3px rgba(0,0,0,0.14),0px 9px 44px 8px rgba(0,0,0,0.12)\",\n \"0px 11px 15px -7px rgba(0,0,0,0.2),0px 24px 38px 3px rgba(0,0,0,0.14),0px 9px 46px 8px rgba(0,0,0,0.12)\",\n]\n\nexport const darkShadows = [\n \"none\",\n\n \"0px 1px 2px rgba(0,0,0,0.65), inset 0px 1px 0px rgba(255,255,255,0.04)\",\n \"0px 2px 3px rgba(0,0,0,0.68), inset 0px 1px 0px rgba(255,255,255,0.04)\",\n \"0px 2px 4px rgba(0,0,0,0.7), inset 0px 1px 0px rgba(255,255,255,0.05)\",\n \"0px 3px 5px rgba(0,0,0,0.72), inset 0px 1px 0px rgba(255,255,255,0.05)\",\n\n \"0px 4px 6px rgba(0,0,0,0.75), inset 0px 1px 0px rgba(255,255,255,0.05)\",\n \"0px 5px 8px rgba(0,0,0,0.78), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n \"0px 6px 10px rgba(0,0,0,0.8), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n \"0px 7px 12px rgba(0,0,0,0.82), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n \"0px 8px 14px rgba(0,0,0,0.84), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n\n \"0px 9px 16px rgba(0,0,0,0.86), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 10px 18px rgba(0,0,0,0.88), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 11px 20px rgba(0,0,0,0.89), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 12px 22px rgba(0,0,0,0.9), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 13px 24px rgba(0,0,0,0.91), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n\n \"0px 14px 26px rgba(0,0,0,0.92), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 15px 28px rgba(0,0,0,0.93), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 16px 30px rgba(0,0,0,0.94), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 18px 32px rgba(0,0,0,0.95), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 20px 34px rgba(0,0,0,0.95), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n\n \"0px 22px 36px rgba(0,0,0,0.96), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 24px 38px rgba(0,0,0,0.97), inset 0px 1px 0px rgba(255,255,255,0.09)\",\n \"0px 26px 40px rgba(0,0,0,0.98), inset 0px 1px 0px rgba(255,255,255,0.09)\",\n \"0px 28px 42px rgba(0,0,0,0.99), inset 0px 1px 0px rgba(255,255,255,0.1)\",\n]\n\n\nexport const ThemeTypography: ThemeOptions['typography'] = {\n h1: { fontSize: 48, lineHeight: 1.3, fontWeight: 600 }, // bolder for emphasis\n h2: { fontSize: 40, lineHeight: 1.35, fontWeight: 500 },\n h3: { fontSize: 34, lineHeight: 1.4, fontWeight: 500 },\n h4: { fontSize: 28, lineHeight: 1.45, fontWeight: 500 },\n h5: { fontSize: 24, lineHeight: 1.5, fontWeight: 500 },\n h6: { fontSize: 20, lineHeight: 1.55, fontWeight: 500 },\n big: { fontSize: 18, lineHeight: 1.6, fontWeight: 400 },\n text: { fontSize: 16, lineHeight: 1.6, fontWeight: 400 },\n button: { fontSize: 14, lineHeight: 1.6, fontWeight: 500 },\n small: { fontSize: 12, lineHeight: 1.6, fontWeight: 400 },\n}\n\n\nexport const lightThemeOptions: ThemeOptionInput = {\n name: \"default-light\",\n mode: \"light\",\n rtl: false,\n shadow: lightShadows,\n globalStyle: {},\n colors: {\n surface: createLightThemePalette(\"#FFFFFF\"),\n primary: createPalette(\"#2563EB\", \"light\"),\n accent: createPalette(\"#7C3AED\", \"light\"),\n success: createPalette(\"#16A34A\", \"light\"),\n info: createPalette(\"#06B6D4\", \"light\"),\n warning: createPalette(\"#ff8904\", \"light\"),\n danger: createPalette(\"#EF4444\", \"light\"),\n },\n typography: ThemeTypography,\n interfaces: {}\n} as ThemeOptionInput;\n\nexport const darkThemeOptions: ThemeOptionInput = {\n name: \"default-dark\",\n mode: \"dark\",\n rtl: false,\n shadow: darkShadows,\n globalStyle: {},\n colors: {\n surface: createDarkThemePalette(\"#0F1115\"),\n primary: createPalette(\"#2563EB\", \"dark\"),\n accent: createPalette(\"#7C3AED\", \"dark\"),\n success: createPalette(\"#16A34A\", \"dark\"),\n info: createPalette(\"#06B6D4\", \"dark\"),\n warning: createPalette(\"#ff8904\", \"dark\"),\n danger: createPalette(\"#EF4444\", \"dark\"),\n },\n typography: ThemeTypography,\n interfaces: {}\n} as ThemeOptionInput;\n\n\n"],"names":["createLightThemePalette","createPalette","createDarkThemePalette"],"mappings":";;;;AAGO,MAAM,YAAY,GAAG;IACxB,MAAM;IACN,oGAAoG;IACpG,oGAAoG;IACpG,oGAAoG;IACpG,qGAAqG;IACrG,qGAAqG;IACrG,sGAAsG;IACtG,sGAAsG;IACtG,sGAAsG;IACtG,sGAAsG;IACtG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,wGAAwG;IACxG,wGAAwG;IACxG,wGAAwG;IACxG,wGAAwG;IACxG,yGAAyG;IACzG,yGAAyG;IACzG,yGAAyG;IACzG,yGAAyG;IACzG,yGAAyG;;AAGtG,MAAM,WAAW,GAAG;IACvB,MAAM;IAEN,wEAAwE;IACxE,wEAAwE;IACxE,uEAAuE;IACvE,wEAAwE;IAExE,wEAAwE;IACxE,wEAAwE;IACxE,wEAAwE;IACxE,yEAAyE;IACzE,yEAAyE;IAEzE,yEAAyE;IACzE,0EAA0E;IAC1E,0EAA0E;IAC1E,yEAAyE;IACzE,0EAA0E;IAE1E,0EAA0E;IAC1E,0EAA0E;IAC1E,0EAA0E;IAC1E,0EAA0E;IAC1E,0EAA0E;IAE1E,0EAA0E;IAC1E,0EAA0E;IAC1E,0EAA0E;IAC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,EAAE;;;;;;;;;"}
1
+ {"version":3,"file":"ThemeDefaultOptions.cjs","sources":["../../src/theme/ThemeDefaultOptions.ts"],"sourcesContent":["import { DEFAULT_THEME_NAME, THEME_MODE } from './core';\r\nimport { createDarkThemePalette, createLightThemePalette, createPalette } from './oklch';\r\nimport { ThemeOptionInput, ThemeOptions } from './types'\r\n\r\nexport const lightShadows = [\r\n \"none\",\r\n \"0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12)\",\r\n \"0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12)\",\r\n \"0px 3px 3px -2px rgba(0,0,0,0.2),0px 3px 4px 0px rgba(0,0,0,0.14),0px 1px 8px 0px rgba(0,0,0,0.12)\",\r\n \"0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)\",\r\n \"0px 3px 5px -1px rgba(0,0,0,0.2),0px 5px 8px 0px rgba(0,0,0,0.14),0px 1px 14px 0px rgba(0,0,0,0.12)\",\r\n \"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)\",\r\n \"0px 4px 5px -2px rgba(0,0,0,0.2),0px 7px 10px 1px rgba(0,0,0,0.14),0px 2px 16px 1px rgba(0,0,0,0.12)\",\r\n \"0px 5px 5px -3px rgba(0,0,0,0.2),0px 8px 10px 1px rgba(0,0,0,0.14),0px 3px 14px 2px rgba(0,0,0,0.12)\",\r\n \"0px 5px 6px -3px rgba(0,0,0,0.2),0px 9px 12px 1px rgba(0,0,0,0.14),0px 3px 16px 2px rgba(0,0,0,0.12)\",\r\n \"0px 6px 6px -3px rgba(0,0,0,0.2),0px 10px 14px 1px rgba(0,0,0,0.14),0px 4px 18px 3px rgba(0,0,0,0.12)\",\r\n \"0px 6px 7px -4px rgba(0,0,0,0.2),0px 11px 15px 1px rgba(0,0,0,0.14),0px 4px 20px 3px rgba(0,0,0,0.12)\",\r\n \"0px 7px 8px -4px rgba(0,0,0,0.2),0px 12px 17px 2px rgba(0,0,0,0.14),0px 5px 22px 4px rgba(0,0,0,0.12)\",\r\n \"0px 7px 8px -4px rgba(0,0,0,0.2),0px 13px 19px 2px rgba(0,0,0,0.14),0px 5px 24px 4px rgba(0,0,0,0.12)\",\r\n \"0px 7px 9px -4px rgba(0,0,0,0.2),0px 14px 21px 2px rgba(0,0,0,0.14),0px 5px 26px 4px rgba(0,0,0,0.12)\",\r\n \"0px 8px 9px -5px rgba(0,0,0,0.2),0px 15px 22px 2px rgba(0,0,0,0.14),0px 6px 28px 5px rgba(0,0,0,0.12)\",\r\n \"0px 8px 10px -5px rgba(0,0,0,0.2),0px 16px 24px 2px rgba(0,0,0,0.14),0px 6px 30px 5px rgba(0,0,0,0.12)\",\r\n \"0px 8px 11px -5px rgba(0,0,0,0.2),0px 17px 26px 2px rgba(0,0,0,0.14),0px 6px 32px 5px rgba(0,0,0,0.12)\",\r\n \"0px 9px 11px -5px rgba(0,0,0,0.2),0px 18px 28px 2px rgba(0,0,0,0.14),0px 7px 34px 6px rgba(0,0,0,0.12)\",\r\n \"0px 9px 12px -6px rgba(0,0,0,0.2),0px 19px 29px 2px rgba(0,0,0,0.14),0px 7px 36px 6px rgba(0,0,0,0.12)\",\r\n \"0px 10px 13px -6px rgba(0,0,0,0.2),0px 20px 31px 3px rgba(0,0,0,0.14),0px 8px 38px 7px rgba(0,0,0,0.12)\",\r\n \"0px 10px 13px -6px rgba(0,0,0,0.2),0px 21px 33px 3px rgba(0,0,0,0.14),0px 8px 40px 7px rgba(0,0,0,0.12)\",\r\n \"0px 10px 14px -6px rgba(0,0,0,0.2),0px 22px 35px 3px rgba(0,0,0,0.14),0px 8px 42px 7px rgba(0,0,0,0.12)\",\r\n \"0px 11px 14px -7px rgba(0,0,0,0.2),0px 23px 36px 3px rgba(0,0,0,0.14),0px 9px 44px 8px rgba(0,0,0,0.12)\",\r\n \"0px 11px 15px -7px rgba(0,0,0,0.2),0px 24px 38px 3px rgba(0,0,0,0.14),0px 9px 46px 8px rgba(0,0,0,0.12)\",\r\n]\r\n\r\nexport const darkShadows = [\r\n \"none\",\r\n\r\n \"0px 1px 2px rgba(0,0,0,0.65), inset 0px 1px 0px rgba(255,255,255,0.04)\",\r\n \"0px 2px 3px rgba(0,0,0,0.68), inset 0px 1px 0px rgba(255,255,255,0.04)\",\r\n \"0px 2px 4px rgba(0,0,0,0.7), inset 0px 1px 0px rgba(255,255,255,0.05)\",\r\n \"0px 3px 5px rgba(0,0,0,0.72), inset 0px 1px 0px rgba(255,255,255,0.05)\",\r\n\r\n \"0px 4px 6px rgba(0,0,0,0.75), inset 0px 1px 0px rgba(255,255,255,0.05)\",\r\n \"0px 5px 8px rgba(0,0,0,0.78), inset 0px 1px 0px rgba(255,255,255,0.06)\",\r\n \"0px 6px 10px rgba(0,0,0,0.8), inset 0px 1px 0px rgba(255,255,255,0.06)\",\r\n \"0px 7px 12px rgba(0,0,0,0.82), inset 0px 1px 0px rgba(255,255,255,0.06)\",\r\n \"0px 8px 14px rgba(0,0,0,0.84), inset 0px 1px 0px rgba(255,255,255,0.06)\",\r\n\r\n \"0px 9px 16px rgba(0,0,0,0.86), inset 0px 1px 0px rgba(255,255,255,0.07)\",\r\n \"0px 10px 18px rgba(0,0,0,0.88), inset 0px 1px 0px rgba(255,255,255,0.07)\",\r\n \"0px 11px 20px rgba(0,0,0,0.89), inset 0px 1px 0px rgba(255,255,255,0.07)\",\r\n \"0px 12px 22px rgba(0,0,0,0.9), inset 0px 1px 0px rgba(255,255,255,0.07)\",\r\n \"0px 13px 24px rgba(0,0,0,0.91), inset 0px 1px 0px rgba(255,255,255,0.07)\",\r\n\r\n \"0px 14px 26px rgba(0,0,0,0.92), inset 0px 1px 0px rgba(255,255,255,0.08)\",\r\n \"0px 15px 28px rgba(0,0,0,0.93), inset 0px 1px 0px rgba(255,255,255,0.08)\",\r\n \"0px 16px 30px rgba(0,0,0,0.94), inset 0px 1px 0px rgba(255,255,255,0.08)\",\r\n \"0px 18px 32px rgba(0,0,0,0.95), inset 0px 1px 0px rgba(255,255,255,0.08)\",\r\n \"0px 20px 34px rgba(0,0,0,0.95), inset 0px 1px 0px rgba(255,255,255,0.08)\",\r\n\r\n \"0px 22px 36px rgba(0,0,0,0.96), inset 0px 1px 0px rgba(255,255,255,0.08)\",\r\n \"0px 24px 38px rgba(0,0,0,0.97), inset 0px 1px 0px rgba(255,255,255,0.09)\",\r\n \"0px 26px 40px rgba(0,0,0,0.98), inset 0px 1px 0px rgba(255,255,255,0.09)\",\r\n \"0px 28px 42px rgba(0,0,0,0.99), inset 0px 1px 0px rgba(255,255,255,0.1)\",\r\n]\r\n\r\n\r\nexport const ThemeTypography: ThemeOptions['typography'] = {\r\n h1: { fontSize: 48, lineHeight: 1.3, fontWeight: 600 }, // bolder for emphasis\r\n h2: { fontSize: 40, lineHeight: 1.35, fontWeight: 500 },\r\n h3: { fontSize: 34, lineHeight: 1.4, fontWeight: 500 },\r\n h4: { fontSize: 28, lineHeight: 1.45, fontWeight: 500 },\r\n h5: { fontSize: 24, lineHeight: 1.5, fontWeight: 500 },\r\n h6: { fontSize: 20, lineHeight: 1.55, fontWeight: 500 },\r\n big: { fontSize: 18, lineHeight: 1.6, fontWeight: 400 },\r\n text: { fontSize: 16, lineHeight: 1.6, fontWeight: 400 },\r\n button: { fontSize: 14, lineHeight: 1.6, fontWeight: 500 },\r\n small: { fontSize: 12, lineHeight: 1.6, fontWeight: 400 },\r\n}\r\n\r\n\r\nexport const lightThemeOptions: ThemeOptionInput = {\r\n name: DEFAULT_THEME_NAME.DARK,\r\n mode: THEME_MODE.LIGTH,\r\n rtl: false,\r\n shadow: lightShadows,\r\n globalStyle: {},\r\n colors: {\r\n default: createLightThemePalette(\"#FFFFFF\"),\r\n primary: createPalette(\"#2563EB\", THEME_MODE.LIGTH),\r\n accent: createPalette(\"#7C3AED\", THEME_MODE.LIGTH),\r\n success: createPalette(\"#16A34A\", THEME_MODE.LIGTH),\r\n info: createPalette(\"#06B6D4\", THEME_MODE.LIGTH),\r\n warning: createPalette(\"#ff8904\", THEME_MODE.LIGTH),\r\n danger: createPalette(\"#EF4444\", THEME_MODE.LIGTH),\r\n },\r\n typography: ThemeTypography,\r\n interfaces: {}\r\n} as ThemeOptionInput;\r\n\r\nexport const darkThemeOptions: ThemeOptionInput = {\r\n name: DEFAULT_THEME_NAME.LIGHT,\r\n mode: THEME_MODE.DARK,\r\n rtl: false,\r\n shadow: darkShadows,\r\n globalStyle: {},\r\n colors: {\r\n default: createDarkThemePalette(\"#19191b\"),\r\n primary: createPalette(\"#2563EB\", THEME_MODE.DARK),\r\n accent: createPalette(\"#7C3AED\", THEME_MODE.DARK),\r\n success: createPalette(\"#16A34A\", THEME_MODE.DARK),\r\n info: createPalette(\"#06B6D4\", THEME_MODE.DARK),\r\n warning: createPalette(\"#ff8904\", THEME_MODE.DARK),\r\n danger: createPalette(\"#EF4444\", THEME_MODE.DARK),\r\n },\r\n typography: ThemeTypography,\r\n interfaces: {}\r\n} as ThemeOptionInput;\r\n\r\n\r\n"],"names":["DEFAULT_THEME_NAME","THEME_MODE","createLightThemePalette","createPalette","createDarkThemePalette"],"mappings":";;;;;AAIO,MAAM,YAAY,GAAG;IACxB,MAAM;IACN,oGAAoG;IACpG,oGAAoG;IACpG,oGAAoG;IACpG,qGAAqG;IACrG,qGAAqG;IACrG,sGAAsG;IACtG,sGAAsG;IACtG,sGAAsG;IACtG,sGAAsG;IACtG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,wGAAwG;IACxG,wGAAwG;IACxG,wGAAwG;IACxG,wGAAwG;IACxG,yGAAyG;IACzG,yGAAyG;IACzG,yGAAyG;IACzG,yGAAyG;IAC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AAsB,CAAC,SAAS,CAAC;QAC1C,OAAO,EAAED,mBAAa,CAAC,SAAS,EAAEF,eAAU,CAAC,IAAI,CAAC;QAClD,MAAM,EAAEE,mBAAa,CAAC,SAAS,EAAEF,eAAU,CAAC,IAAI,CAAC;QACjD,OAAO,EAAEE,mBAAa,CAAC,SAAS,EAAEF,eAAU,CAAC,IAAI,CAAC;QAClD,IAAI,EAAEE,mBAAa,CAAC,SAAS,EAAEF,eAAU,CAAC,IAAI,CAAC;QAC/C,OAAO,EAAEE,mBAAa,CAAC,SAAS,EAAEF,eAAU,CAAC,IAAI,CAAC;QAClD,MAAM,EAAEE,mBAAa,CAAC,SAAS,EAAEF,eAAU,CAAC,IAAI,CAAC;AACpD,KAAA;AACD,IAAA,UAAU,EAAE,eAAe;AAC3B,IAAA,UAAU,EAAE;;;;;;;;;"}
@@ -1,3 +1,4 @@
1
+ import { THEME_MODE, DEFAULT_THEME_NAME } from './core.js';
1
2
  import { createPalette, createLightThemePalette, createDarkThemePalette } from './oklch.js';
2
3
 
3
4
  const lightShadows = [
@@ -66,37 +67,37 @@ const ThemeTypography = {
66
67
  small: { fontSize: 12, lineHeight: 1.6, fontWeight: 400 },
67
68
  };
68
69
  const lightThemeOptions = {
69
- name: "default-light",
70
- mode: "light",
70
+ name: DEFAULT_THEME_NAME.DARK,
71
+ mode: THEME_MODE.LIGTH,
71
72
  rtl: false,
72
73
  shadow: lightShadows,
73
74
  globalStyle: {},
74
75
  colors: {
75
- surface: createLightThemePalette("#FFFFFF"),
76
- primary: createPalette("#2563EB", "light"),
77
- accent: createPalette("#7C3AED", "light"),
78
- success: createPalette("#16A34A", "light"),
79
- info: createPalette("#06B6D4", "light"),
80
- warning: createPalette("#ff8904", "light"),
81
- danger: createPalette("#EF4444", "light"),
76
+ default: createLightThemePalette("#FFFFFF"),
77
+ primary: createPalette("#2563EB", THEME_MODE.LIGTH),
78
+ accent: createPalette("#7C3AED", THEME_MODE.LIGTH),
79
+ success: createPalette("#16A34A", THEME_MODE.LIGTH),
80
+ info: createPalette("#06B6D4", THEME_MODE.LIGTH),
81
+ warning: createPalette("#ff8904", THEME_MODE.LIGTH),
82
+ danger: createPalette("#EF4444", THEME_MODE.LIGTH),
82
83
  },
83
84
  typography: ThemeTypography,
84
85
  interfaces: {}
85
86
  };
86
87
  const darkThemeOptions = {
87
- name: "default-dark",
88
- mode: "dark",
88
+ name: DEFAULT_THEME_NAME.LIGHT,
89
+ mode: THEME_MODE.DARK,
89
90
  rtl: false,
90
91
  shadow: darkShadows,
91
92
  globalStyle: {},
92
93
  colors: {
93
- surface: createDarkThemePalette("#0F1115"),
94
- primary: createPalette("#2563EB", "dark"),
95
- accent: createPalette("#7C3AED", "dark"),
96
- success: createPalette("#16A34A", "dark"),
97
- info: createPalette("#06B6D4", "dark"),
98
- warning: createPalette("#ff8904", "dark"),
99
- danger: createPalette("#EF4444", "dark"),
94
+ default: createDarkThemePalette("#19191b"),
95
+ primary: createPalette("#2563EB", THEME_MODE.DARK),
96
+ accent: createPalette("#7C3AED", THEME_MODE.DARK),
97
+ success: createPalette("#16A34A", THEME_MODE.DARK),
98
+ info: createPalette("#06B6D4", THEME_MODE.DARK),
99
+ warning: createPalette("#ff8904", THEME_MODE.DARK),
100
+ danger: createPalette("#EF4444", THEME_MODE.DARK),
100
101
  },
101
102
  typography: ThemeTypography,
102
103
  interfaces: {}
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeDefaultOptions.js","sources":["../../src/theme/ThemeDefaultOptions.ts"],"sourcesContent":["import { createDarkThemePalette, createLightThemePalette, createPalette } from './oklch';\nimport { ThemeOptionInput, ThemeOptions } from './types'\n\nexport const lightShadows = [\n \"none\",\n \"0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12)\",\n \"0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12)\",\n \"0px 3px 3px -2px rgba(0,0,0,0.2),0px 3px 4px 0px rgba(0,0,0,0.14),0px 1px 8px 0px rgba(0,0,0,0.12)\",\n \"0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)\",\n \"0px 3px 5px -1px rgba(0,0,0,0.2),0px 5px 8px 0px rgba(0,0,0,0.14),0px 1px 14px 0px rgba(0,0,0,0.12)\",\n \"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)\",\n \"0px 4px 5px -2px rgba(0,0,0,0.2),0px 7px 10px 1px rgba(0,0,0,0.14),0px 2px 16px 1px rgba(0,0,0,0.12)\",\n \"0px 5px 5px -3px rgba(0,0,0,0.2),0px 8px 10px 1px rgba(0,0,0,0.14),0px 3px 14px 2px rgba(0,0,0,0.12)\",\n \"0px 5px 6px -3px rgba(0,0,0,0.2),0px 9px 12px 1px rgba(0,0,0,0.14),0px 3px 16px 2px rgba(0,0,0,0.12)\",\n \"0px 6px 6px -3px rgba(0,0,0,0.2),0px 10px 14px 1px rgba(0,0,0,0.14),0px 4px 18px 3px rgba(0,0,0,0.12)\",\n \"0px 6px 7px -4px rgba(0,0,0,0.2),0px 11px 15px 1px rgba(0,0,0,0.14),0px 4px 20px 3px rgba(0,0,0,0.12)\",\n \"0px 7px 8px -4px rgba(0,0,0,0.2),0px 12px 17px 2px rgba(0,0,0,0.14),0px 5px 22px 4px rgba(0,0,0,0.12)\",\n \"0px 7px 8px -4px rgba(0,0,0,0.2),0px 13px 19px 2px rgba(0,0,0,0.14),0px 5px 24px 4px rgba(0,0,0,0.12)\",\n \"0px 7px 9px -4px rgba(0,0,0,0.2),0px 14px 21px 2px rgba(0,0,0,0.14),0px 5px 26px 4px rgba(0,0,0,0.12)\",\n \"0px 8px 9px -5px rgba(0,0,0,0.2),0px 15px 22px 2px rgba(0,0,0,0.14),0px 6px 28px 5px rgba(0,0,0,0.12)\",\n \"0px 8px 10px -5px rgba(0,0,0,0.2),0px 16px 24px 2px rgba(0,0,0,0.14),0px 6px 30px 5px rgba(0,0,0,0.12)\",\n \"0px 8px 11px -5px rgba(0,0,0,0.2),0px 17px 26px 2px rgba(0,0,0,0.14),0px 6px 32px 5px rgba(0,0,0,0.12)\",\n \"0px 9px 11px -5px rgba(0,0,0,0.2),0px 18px 28px 2px rgba(0,0,0,0.14),0px 7px 34px 6px rgba(0,0,0,0.12)\",\n \"0px 9px 12px -6px rgba(0,0,0,0.2),0px 19px 29px 2px rgba(0,0,0,0.14),0px 7px 36px 6px rgba(0,0,0,0.12)\",\n \"0px 10px 13px -6px rgba(0,0,0,0.2),0px 20px 31px 3px rgba(0,0,0,0.14),0px 8px 38px 7px rgba(0,0,0,0.12)\",\n \"0px 10px 13px -6px rgba(0,0,0,0.2),0px 21px 33px 3px rgba(0,0,0,0.14),0px 8px 40px 7px rgba(0,0,0,0.12)\",\n \"0px 10px 14px -6px rgba(0,0,0,0.2),0px 22px 35px 3px rgba(0,0,0,0.14),0px 8px 42px 7px rgba(0,0,0,0.12)\",\n \"0px 11px 14px -7px rgba(0,0,0,0.2),0px 23px 36px 3px rgba(0,0,0,0.14),0px 9px 44px 8px rgba(0,0,0,0.12)\",\n \"0px 11px 15px -7px rgba(0,0,0,0.2),0px 24px 38px 3px rgba(0,0,0,0.14),0px 9px 46px 8px rgba(0,0,0,0.12)\",\n]\n\nexport const darkShadows = [\n \"none\",\n\n \"0px 1px 2px rgba(0,0,0,0.65), inset 0px 1px 0px rgba(255,255,255,0.04)\",\n \"0px 2px 3px rgba(0,0,0,0.68), inset 0px 1px 0px rgba(255,255,255,0.04)\",\n \"0px 2px 4px rgba(0,0,0,0.7), inset 0px 1px 0px rgba(255,255,255,0.05)\",\n \"0px 3px 5px rgba(0,0,0,0.72), inset 0px 1px 0px rgba(255,255,255,0.05)\",\n\n \"0px 4px 6px rgba(0,0,0,0.75), inset 0px 1px 0px rgba(255,255,255,0.05)\",\n \"0px 5px 8px rgba(0,0,0,0.78), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n \"0px 6px 10px rgba(0,0,0,0.8), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n \"0px 7px 12px rgba(0,0,0,0.82), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n \"0px 8px 14px rgba(0,0,0,0.84), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n\n \"0px 9px 16px rgba(0,0,0,0.86), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 10px 18px rgba(0,0,0,0.88), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 11px 20px rgba(0,0,0,0.89), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 12px 22px rgba(0,0,0,0.9), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 13px 24px rgba(0,0,0,0.91), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n\n \"0px 14px 26px rgba(0,0,0,0.92), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 15px 28px rgba(0,0,0,0.93), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 16px 30px rgba(0,0,0,0.94), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 18px 32px rgba(0,0,0,0.95), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 20px 34px rgba(0,0,0,0.95), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n\n \"0px 22px 36px rgba(0,0,0,0.96), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 24px 38px rgba(0,0,0,0.97), inset 0px 1px 0px rgba(255,255,255,0.09)\",\n \"0px 26px 40px rgba(0,0,0,0.98), inset 0px 1px 0px rgba(255,255,255,0.09)\",\n \"0px 28px 42px rgba(0,0,0,0.99), inset 0px 1px 0px rgba(255,255,255,0.1)\",\n]\n\n\nexport const ThemeTypography: ThemeOptions['typography'] = {\n h1: { fontSize: 48, lineHeight: 1.3, fontWeight: 600 }, // bolder for emphasis\n h2: { fontSize: 40, lineHeight: 1.35, fontWeight: 500 },\n h3: { fontSize: 34, lineHeight: 1.4, fontWeight: 500 },\n h4: { fontSize: 28, lineHeight: 1.45, fontWeight: 500 },\n h5: { fontSize: 24, lineHeight: 1.5, fontWeight: 500 },\n h6: { fontSize: 20, lineHeight: 1.55, fontWeight: 500 },\n big: { fontSize: 18, lineHeight: 1.6, fontWeight: 400 },\n text: { fontSize: 16, lineHeight: 1.6, fontWeight: 400 },\n button: { fontSize: 14, lineHeight: 1.6, fontWeight: 500 },\n small: { fontSize: 12, lineHeight: 1.6, fontWeight: 400 },\n}\n\n\nexport const lightThemeOptions: ThemeOptionInput = {\n name: \"default-light\",\n mode: \"light\",\n rtl: false,\n shadow: lightShadows,\n globalStyle: {},\n colors: {\n surface: createLightThemePalette(\"#FFFFFF\"),\n primary: createPalette(\"#2563EB\", \"light\"),\n accent: createPalette(\"#7C3AED\", \"light\"),\n success: createPalette(\"#16A34A\", \"light\"),\n info: createPalette(\"#06B6D4\", \"light\"),\n warning: createPalette(\"#ff8904\", \"light\"),\n danger: createPalette(\"#EF4444\", \"light\"),\n },\n typography: ThemeTypography,\n interfaces: {}\n} as ThemeOptionInput;\n\nexport const darkThemeOptions: ThemeOptionInput = {\n name: \"default-dark\",\n mode: \"dark\",\n rtl: false,\n shadow: darkShadows,\n globalStyle: {},\n colors: {\n surface: createDarkThemePalette(\"#0F1115\"),\n primary: createPalette(\"#2563EB\", \"dark\"),\n accent: createPalette(\"#7C3AED\", \"dark\"),\n success: createPalette(\"#16A34A\", \"dark\"),\n info: createPalette(\"#06B6D4\", \"dark\"),\n warning: createPalette(\"#ff8904\", \"dark\"),\n danger: createPalette(\"#EF4444\", \"dark\"),\n },\n typography: ThemeTypography,\n interfaces: {}\n} as ThemeOptionInput;\n\n\n"],"names":[],"mappings":";;AAGO,MAAM,YAAY,GAAG;IACxB,MAAM;IACN,oGAAoG;IAC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AGT,MAAM,gBAAgB,GAAqB;AAC9C,IAAA,IAAI,EAAE,cAAc;AACpB,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,MAAM,EAAE,WAAW;AACnB,IAAA,WAAW,EAAE,EAAE;AACf,IAAA,MAAM,EAAE;AACJ,QAAA,OAAO,EAAE,sBAAsB,CAAC,SAAS,CAAC;AAC1C,QAAA,OAAO,EAAE,aAAa,CAAC,SAAS,EAAE,MAAM,CAAC;AACzC,QAAA,MAAM,EAAE,aAAa,CAAC,SAAS,EAAE,MAAM,CAAC;AACxC,QAAA,OAAO,EAAE,aAAa,CAAC,SAAS,EAAE,MAAM,CAAC;AACzC,QAAA,IAAI,EAAE,aAAa,CAAC,SAAS,EAAE,MAAM,CAAC;AACtC,QAAA,OAAO,EAAE,aAAa,CAAC,SAAS,EAAE,MAAM,CAAC;AACzC,QAAA,MAAM,EAAE,aAAa,CAAC,SAAS,EAAE,MAAM,CAAC;AAC3C,KAAA;AACD,IAAA,UAAU,EAAE,eAAe;AAC3B,IAAA,UAAU,EAAE;;;;;"}
1
+ {"version":3,"file":"ThemeDefaultOptions.js","sources":["../../src/theme/ThemeDefaultOptions.ts"],"sourcesContent":["import { DEFAULT_THEME_NAME, THEME_MODE } from './core';\r\nimport { createDarkThemePalette, createLightThemePalette, createPalette } from './oklch';\r\nimport { ThemeOptionInput, ThemeOptions } from './types'\r\n\r\nexport const lightShadows = [\r\n \"none\",\r\n \"0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12)\",\r\n \"0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12)\",\r\n \"0px 3px 3px -2px rgba(0,0,0,0.2),0px 3px 4px 0px rgba(0,0,0,0.14),0px 1px 8px 0px rgba(0,0,0,0.12)\",\r\n \"0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)\",\r\n \"0px 3px 5px -1px rgba(0,0,0,0.2),0px 5px 8px 0px rgba(0,0,0,0.14),0px 1px 14px 0px rgba(0,0,0,0.12)\",\r\n \"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)\",\r\n \"0px 4px 5px -2px rgba(0,0,0,0.2),0px 7px 10px 1px rgba(0,0,0,0.14),0px 2px 16px 1px rgba(0,0,0,0.12)\",\r\n \"0px 5px 5px -3px rgba(0,0,0,0.2),0px 8px 10px 1px rgba(0,0,0,0.14),0px 3px 14px 2px rgba(0,0,0,0.12)\",\r\n \"0px 5px 6px -3px rgba(0,0,0,0.2),0px 9px 12px 1px rgba(0,0,0,0.14),0px 3px 16px 2px rgba(0,0,0,0.12)\",\r\n \"0px 6px 6px -3px rgba(0,0,0,0.2),0px 10px 14px 1px rgba(0,0,0,0.14),0px 4px 18px 3px rgba(0,0,0,0.12)\",\r\n \"0px 6px 7px -4px rgba(0,0,0,0.2),0px 11px 15px 1px rgba(0,0,0,0.14),0px 4px 20px 3px rgba(0,0,0,0.12)\",\r\n \"0px 7px 8px -4px rgba(0,0,0,0.2),0px 12px 17px 2px rgba(0,0,0,0.14),0px 5px 22px 4px rgba(0,0,0,0.12)\",\r\n \"0px 7px 8px -4px rgba(0,0,0,0.2),0px 13px 19px 2px rgba(0,0,0,0.14),0px 5px 24px 4px rgba(0,0,0,0.12)\",\r\n \"0px 7px 9px -4px rgba(0,0,0,0.2),0px 14px 21px 2px rgba(0,0,0,0.14),0px 5px 26px 4px rgba(0,0,0,0.12)\",\r\n \"0px 8px 9px -5px rgba(0,0,0,0.2),0px 15px 22px 2px rgba(0,0,0,0.14),0px 6px 28px 5px rgba(0,0,0,0.12)\",\r\n \"0px 8px 10px -5px rgba(0,0,0,0.2),0px 16px 24px 2px rgba(0,0,0,0.14),0px 6px 30px 5px rgba(0,0,0,0.12)\",\r\n \"0px 8px 11px -5px rgba(0,0,0,0.2),0px 17px 26px 2px rgba(0,0,0,0.14),0px 6px 32px 5px rgba(0,0,0,0.12)\",\r\n \"0px 9px 11px -5px rgba(0,0,0,0.2),0px 18px 28px 2px rgba(0,0,0,0.14),0px 7px 34px 6px rgba(0,0,0,0.12)\",\r\n \"0px 9px 12px -6px rgba(0,0,0,0.2),0px 19px 29px 2px rgba(0,0,0,0.14),0px 7px 36px 6px rgba(0,0,0,0.12)\",\r\n \"0px 10px 13px -6px rgba(0,0,0,0.2),0px 20px 31px 3px rgba(0,0,0,0.14),0px 8px 38px 7px rgba(0,0,0,0.12)\",\r\n \"0px 10px 13px -6px rgba(0,0,0,0.2),0px 21px 33px 3px rgba(0,0,0,0.14),0px 8px 40px 7px rgba(0,0,0,0.12)\",\r\n \"0px 10px 14px -6px rgba(0,0,0,0.2),0px 22px 35px 3px rgba(0,0,0,0.14),0px 8px 42px 7px rgba(0,0,0,0.12)\",\r\n \"0px 11px 14px -7px rgba(0,0,0,0.2),0px 23px 36px 3px rgba(0,0,0,0.14),0px 9px 44px 8px rgba(0,0,0,0.12)\",\r\n \"0px 11px 15px -7px rgba(0,0,0,0.2),0px 24px 38px 3px rgba(0,0,0,0.14),0px 9px 46px 8px rgba(0,0,0,0.12)\",\r\n]\r\n\r\nexport const darkShadows = [\r\n \"none\",\r\n\r\n \"0px 1px 2px rgba(0,0,0,0.65), inset 0px 1px 0px rgba(255,255,255,0.04)\",\r\n \"0px 2px 3px rgba(0,0,0,0.68), inset 0px 1px 0px rgba(255,255,255,0.04)\",\r\n \"0px 2px 4px rgba(0,0,0,0.7), inset 0px 1px 0px rgba(255,255,255,0.05)\",\r\n \"0px 3px 5px rgba(0,0,0,0.72), inset 0px 1px 0px rgba(255,255,255,0.05)\",\r\n\r\n \"0px 4px 6px rgba(0,0,0,0.75), inset 0px 1px 0px rgba(255,255,255,0.05)\",\r\n \"0px 5px 8px rgba(0,0,0,0.78), inset 0px 1px 0px rgba(255,255,255,0.06)\",\r\n \"0px 6px 10px rgba(0,0,0,0.8), inset 0px 1px 0px rgba(255,255,255,0.06)\",\r\n \"0px 7px 12px rgba(0,0,0,0.82), inset 0px 1px 0px rgba(255,255,255,0.06)\",\r\n \"0px 8px 14px rgba(0,0,0,0.84), inset 0px 1px 0px rgba(255,255,255,0.06)\",\r\n\r\n \"0px 9px 16px rgba(0,0,0,0.86), inset 0px 1px 0px rgba(255,255,255,0.07)\",\r\n \"0px 10px 18px rgba(0,0,0,0.88), inset 0px 1px 0px rgba(255,255,255,0.07)\",\r\n \"0px 11px 20px rgba(0,0,0,0.89), inset 0px 1px 0px rgba(255,255,255,0.07)\",\r\n \"0px 12px 22px rgba(0,0,0,0.9), inset 0px 1px 0px rgba(255,255,255,0.07)\",\r\n \"0px 13px 24px rgba(0,0,0,0.91), inset 0px 1px 0px rgba(255,255,255,0.07)\",\r\n\r\n \"0px 14px 26px rgba(0,0,0,0.92), inset 0px 1px 0px rgba(255,255,255,0.08)\",\r\n \"0px 15px 28px rgba(0,0,0,0.93), inset 0px 1px 0px rgba(255,255,255,0.08)\",\r\n \"0px 16px 30px rgba(0,0,0,0.94), inset 0px 1px 0px rgba(255,255,255,0.08)\",\r\n \"0px 18px 32px rgba(0,0,0,0.95), inset 0px 1px 0px rgba(255,255,255,0.08)\",\r\n \"0px 20px 34px rgba(0,0,0,0.95), inset 0px 1px 0px rgba(255,255,255,0.08)\",\r\n\r\n \"0px 22px 36px rgba(0,0,0,0.96), inset 0px 1px 0px rgba(255,255,255,0.08)\",\r\n \"0px 24px 38px rgba(0,0,0,0.97), inset 0px 1px 0px rgba(255,255,255,0.09)\",\r\n \"0px 26px 40px rgba(0,0,0,0.98), inset 0px 1px 0px rgba(255,255,255,0.09)\",\r\n \"0px 28px 42px rgba(0,0,0,0.99), inset 0px 1px 0px rgba(255,255,255,0.1)\",\r\n]\r\n\r\n\r\nexport const ThemeTypography: ThemeOptions['typography'] = {\r\n h1: { fontSize: 48, lineHeight: 1.3, fontWeight: 600 }, // bolder for emphasis\r\n h2: { fontSize: 40, lineHeight: 1.35, fontWeight: 500 },\r\n h3: { fontSize: 34, lineHeight: 1.4, fontWeight: 500 },\r\n h4: { fontSize: 28, lineHeight: 1.45, fontWeight: 500 },\r\n h5: { fontSize: 24, lineHeight: 1.5, fontWeight: 500 },\r\n h6: { fontSize: 20, lineHeight: 1.55, fontWeight: 500 },\r\n big: { fontSize: 18, lineHeight: 1.6, fontWeight: 400 },\r\n text: { fontSize: 16, lineHeight: 1.6, fontWeight: 400 },\r\n button: { fontSize: 14, lineHeight: 1.6, fontWeight: 500 },\r\n small: { fontSize: 12, lineHeight: 1.6, fontWeight: 400 },\r\n}\r\n\r\n\r\nexport const lightThemeOptions: ThemeOptionInput = {\r\n name: DEFAULT_THEME_NAME.DARK,\r\n mode: THEME_MODE.LIGTH,\r\n rtl: false,\r\n shadow: lightShadows,\r\n globalStyle: {},\r\n colors: {\r\n default: createLightThemePalette(\"#FFFFFF\"),\r\n primary: createPalette(\"#2563EB\", THEME_MODE.LIGTH),\r\n accent: createPalette(\"#7C3AED\", THEME_MODE.LIGTH),\r\n success: createPalette(\"#16A34A\", THEME_MODE.LIGTH),\r\n info: createPalette(\"#06B6D4\", THEME_MODE.LIGTH),\r\n warning: createPalette(\"#ff8904\", THEME_MODE.LIGTH),\r\n danger: createPalette(\"#EF4444\", THEME_MODE.LIGTH),\r\n },\r\n typography: ThemeTypography,\r\n interfaces: {}\r\n} as ThemeOptionInput;\r\n\r\nexport const darkThemeOptions: ThemeOptionInput = {\r\n name: DEFAULT_THEME_NAME.LIGHT,\r\n mode: THEME_MODE.DARK,\r\n rtl: false,\r\n shadow: darkShadows,\r\n globalStyle: {},\r\n colors: {\r\n default: createDarkThemePalette(\"#19191b\"),\r\n primary: createPalette(\"#2563EB\", THEME_MODE.DARK),\r\n accent: createPalette(\"#7C3AED\", THEME_MODE.DARK),\r\n success: createPalette(\"#16A34A\", THEME_MODE.DARK),\r\n info: createPalette(\"#06B6D4\", THEME_MODE.DARK),\r\n warning: createPalette(\"#ff8904\", THEME_MODE.DARK),\r\n danger: createPalette(\"#EF4444\", THEME_MODE.DARK),\r\n },\r\n typography: ThemeTypography,\r\n interfaces: {}\r\n} as ThemeOptionInput;\r\n\r\n\r\n"],"names":[],"mappings":";;;AAIO,MAAM,YAAY,GAAG;IACxB,MAAM;IACN,oGAAoG;IACpG,oGAAoG;IACpG,oGAAoG;IACpG,qGAAqG;IACrG,qGAAqG;IACrG,sGAAsG;IACtG,sGAAsG;IACtG,sGAAsG;IACtG,sGAAsG;IACtG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,wGAAwG;IACxG,wGAAwG;IACxG,wGAAwG;IACxG,wGAAwG;IACxG,yGAAyG;IACzG,yGAAyG;IACzG,yGAAyG;IACzG,yGAAyG;IACzG,yGAAyG;;AAGtG,MAAM,WAAW,GAAG;IACvB,MAAM;IAEN,wEAAwE;IACxE,wEAAwE;IACxE,uEAAuE;IACvE,wEAAwE;IAExE,wEAAwE;IACxE,wEAAwE;IACxE,wEAAwE;IACxE,yEAAyE;IACzE,yEAAyE;IAEzE,yEAAyE;IACzE,0EAA0E;IAC1E,0EAA0E;IAC1E,yEAAyE;IACzE,0EAA0E;IAE1E,0EAA0E;IAC1E,0EAA0E;IAC1E,0EAA0E;IAC1E,0EAA0E;IAC1E,0EAA0E;IAE1E,0EAA0E;IAC1E,0EAA0E;IAC1E,0EAA0E;IAC1E,yEAAyE;;AAItE,MAAM,eAAe,GAA+B;AACvD,IAAA,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE;AACtD,IAAA,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,E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AC;QAClD,OAAO,EAAE,aAAa,CAAC,SAAS,EAAE,UAAU,CAAC,KAAK,CAAC;QACnD,IAAI,EAAE,aAAa,CAAC,SAAS,EAAE,UAAU,CAAC,KAAK,CAAC;QAChD,OAAO,EAAE,aAAa,CAAC,SAAS,EAAE,UAAU,CAAC,KAAK,CAAC;QACnD,MAAM,EAAE,aAAa,CAAC,SAAS,EAAE,UAAU,CAAC,KAAK,CAAC;AACrD,KAAA;AACD,IAAA,UAAU,EAAE,eAAe;AAC3B,IAAA,UAAU,EAAE;;AAGT,MAAM,gBAAgB,GAAqB;IAC9C,IAAI,EAAE,kBAAkB,CAAC,KAAK;IAC9B,IAAI,EAAE,UAAU,CAAC,IAAI;AACrB,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,MAAM,EAAE,WAAW;AACnB,IAAA,WAAW,EAAE,EAAE;AACf,IAAA,MAAM,EAAE;AACJ,QAAA,OAAO,EAAE,sBAAsB,CAAC,SAAS,CAAC;QAC1C,OAAO,EAAE,aAAa,CAAC,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC;QAClD,MAAM,EAAE,aAAa,CAAC,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC;QACjD,OAAO,EAAE,aAAa,CAAC,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC;QAClD,IAAI,EAAE,aAAa,CAAC,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC;QAC/C,OAAO,EAAE,aAAa,CAAC,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC;QAClD,MAAM,EAAE,aAAa,CAAC,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC;AACpD,KAAA;AACD,IAAA,UAAU,EAAE,eAAe;AAC3B,IAAA,UAAU,EAAE;;;;;"}
@@ -110,8 +110,8 @@ const ThemeProvider = (_a) => {
110
110
  return;
111
111
  const cls = (cls) => `${index$2.themeRootClass(theme.name)} ${cls}`;
112
112
  let thumbSize = (_a = scrollbar === null || scrollbar === void 0 ? void 0 : scrollbar.size) !== null && _a !== void 0 ? _a : 7;
113
- let thumbColor = (_b = scrollbar === null || scrollbar === void 0 ? void 0 : scrollbar.thumbColor) !== null && _b !== void 0 ? _b : "var(--color-surface-muted)";
114
- let trackColor = (_c = scrollbar === null || scrollbar === void 0 ? void 0 : scrollbar.trackColor) !== null && _c !== void 0 ? _c : "var(--color-surface-divider)";
113
+ let thumbColor = (_b = scrollbar === null || scrollbar === void 0 ? void 0 : scrollbar.thumbColor) !== null && _b !== void 0 ? _b : "var(--color-default-muted)";
114
+ let trackColor = (_c = scrollbar === null || scrollbar === void 0 ? void 0 : scrollbar.trackColor) !== null && _c !== void 0 ? _c : "var(--color-default-divider)";
115
115
  return index$1.css({
116
116
  "@global": {
117
117
  [cls('*::-webkit-scrollbar')]: {
@@ -141,9 +141,9 @@ const ThemeProvider = (_a) => {
141
141
  onChange: (t) => {
142
142
  onThemeChange && onThemeChange(t);
143
143
  }
144
- }, children: [isRoot && jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ServerStyleTag, { factory: resetCss }), !noScrollbarCss && jsxRuntime.jsx(ServerStyleTag, { factory: scrollbarCss })] }), jsxRuntime.jsx(ServerStyleTag, { factory: themeGlobalStyle }), jsxRuntime.jsx(index$3, Object.assign({ minHeight: "100%", bgcolor: "surface.main", color: "surface.contrast", fontSize: "text", fontWeight: "text", lineHeight: "text", fontFamily: `system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif` }, props, { sxr: {
144
+ }, children: [isRoot && jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ServerStyleTag, { factory: resetCss }), !noScrollbarCss && jsxRuntime.jsx(ServerStyleTag, { factory: scrollbarCss })] }), jsxRuntime.jsx(ServerStyleTag, { factory: themeGlobalStyle }), jsxRuntime.jsx(index$3, Object.assign({ minHeight: "100%", bgcolor: "default.surface", color: "default.contrast", fontSize: "text", fontWeight: "text", lineHeight: "text", fontFamily: `system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif` }, props, { sxr: {
145
145
  "& a": {
146
- color: "primary.main",
146
+ color: "primary.base",
147
147
  },
148
148
  }, baseClass: `${theme.name}-theme-root`, direction: theme.rtl ? "rtl" : "ltr", children: children }))] }));
149
149
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeProvider.cjs","sources":["../../src/theme/ThemeProvider.tsx"],"sourcesContent":["\"use client\";\nimport * as React from \"react\"\nimport { ThemeOptionInput, ThemeOptions } from \"./types\"\nimport Tag from \"../Tag\"\nimport { TagComponentType, TagProps } from \"../Tag/types\"\nimport { createTheme, ThemeContex } from \"./core\"\nimport ThemeCssVars from \"./ThemeCssVars\"\nimport { css } from \"../css\"\nimport ServerStyleTag from \"../Tag/ServerStyleTag\"\nimport { useDocument } from \"../Document\";\nimport { themeRootClass } from \".\";\nimport { useCSSCacheId } from \"../css/CSSCacheProvider\";\n\nexport type ThemeProviderProps<T extends TagComponentType = 'div'> = TagProps<T> & {\n theme: ThemeOptionInput;\n onThemeChange?: (theme: ThemeOptions) => void\n isRoot?: boolean;\n noScrollbarCss?: boolean;\n scrollbar?: {\n size?: number;\n thumbColor?: string;\n trackColor?: string;\n }\n}\n\nconst ThemeProvider = <T extends TagComponentType = 'div'>({ children, theme: THEME, scrollbar, onThemeChange, isRoot, noScrollbarCss, ...props }: ThemeProviderProps<T>) => {\n const doc = useDocument()\n const cacheId = useCSSCacheId()\n\n const theme = React.useMemo(() => createTheme(THEME), [THEME])\n\n const themeGlobalStyle: any = React.useMemo(() => {\n const root_cls = `.xui-${theme.name}-theme-root`\n let gkeys = Object.keys(theme.globalStyle || {})\n let gstyles: any = {}\n gkeys.forEach((key) => {\n gstyles[`${root_cls} ${key}`] = theme.globalStyle[key as any]\n })\n\n return css({\n \"@global\": {\n ...gstyles,\n [root_cls]: ThemeCssVars(theme)\n }\n }, {\n injectStyle: typeof window !== 'undefined',\n container: doc?.document,\n cacheId\n })\n }, [theme, doc])\n\n const resetCss = React.useMemo(() => {\n if (!isRoot) return\n return css({\n \"@global\": {\n \"*\": {\n m: 0,\n p: 0,\n outline: \"none\",\n boxSizing: \"border-box\",\n verticalAlign: \"baseline\",\n },\n \"html, body\": {\n height: \"100%\",\n \"-webkit-font-smoothing\": \"antialiased\",\n \"-moz-osx-font-smoothing\": \"grayscale\",\n } as any,\n \"img, picture, video, canvas, svg\": {\n maxWidth: \"100%\",\n display: \"block\"\n },\n \"input, button, textarea, select\": {\n font: \"inherit\"\n },\n \"table\": {\n borderCollapse: \"collapse\",\n borderSpacing: 0,\n },\n \"ol, ul\": {\n listStyle: \"none\",\n padding: 0,\n margin: 0,\n },\n \"a\": {\n display: \"inline-block\",\n color: \"inherit\",\n textDecoration: \"none\",\n cursor: \"pointer\",\n \"&:hover\": {\n textDecoration: \"underline\"\n }\n },\n \"p, h1, h2, h3, h4, h5, h6\": {\n overflowWrap: \"break-word\",\n },\n }\n }, {\n injectStyle: typeof window !== 'undefined',\n container: doc?.document,\n cacheId\n })\n }, [])\n\n const scrollbarCss: any = React.useMemo(() => {\n if (noScrollbarCss) return;\n const cls = (cls: string) => `${themeRootClass(theme.name)} ${cls}`\n let thumbSize = scrollbar?.size ?? 7\n let thumbColor = scrollbar?.thumbColor ?? \"var(--color-surface-muted)\"\n let trackColor = scrollbar?.trackColor ?? \"var(--color-surface-divider)\"\n\n return css({\n \"@global\": {\n [cls('*::-webkit-scrollbar')]: {\n width: thumbSize,\n height: thumbSize,\n },\n [cls(\"*::-webkit-scrollbar-thumb\")]: {\n backgroundColor: thumbColor,\n borderRadius: \"6px\",\n },\n [cls(\"*::-webkit-scrollbar-thumb:hover\")]: {\n backgroundColor: thumbColor,\n },\n [cls(\"*::-webkit-scrollbar-track\")]: {\n backgroundColor: trackColor,\n borderRadius: \"6px\",\n },\n }\n }, {\n injectStyle: typeof window !== 'undefined',\n container: doc?.document,\n cacheId\n }) as any\n }, [noScrollbarCss, theme])\n\n return (\n <ThemeContex.Provider\n value={{\n theme,\n onChange: (t) => {\n onThemeChange && onThemeChange(t)\n }\n }}\n >\n {\n isRoot && <>\n <ServerStyleTag factory={resetCss as any} />\n {\n !noScrollbarCss && <ServerStyleTag factory={scrollbarCss} />\n }\n </>\n }\n <ServerStyleTag factory={themeGlobalStyle} />\n <Tag\n minHeight=\"100%\"\n bgcolor=\"surface.main\"\n color=\"surface.contrast\"\n fontSize=\"text\"\n fontWeight=\"text\"\n lineHeight=\"text\"\n fontFamily={`system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif`}\n {...props}\n sxr={{\n \"& a\": {\n color: \"primary.main\",\n },\n }}\n baseClass={`${theme.name}-theme-root`}\n direction={theme.rtl ? \"rtl\" : \"ltr\"}\n >\n {children}\n </Tag>\n </ThemeContex.Provider>\n )\n}\n\nexport default ThemeProvider"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA;AAA2D;AACxD;AACA;AAEA;AAEA;AACG;AACA;;AAEA;AACG;AACH;AAEA;;;AAMG;AACA;;AAEF;AACJ;AAEA;AACG;;AACA;AACG;AACG;AACG;AACA;AACA;AACA;AACA;AACF;AACD;AACG;AACA;AACA;AACK;AACR;AACG;AACA;AACF;AACD;AACG;AACF;AACD;AACG;AACA;AACF;AACD;AACG;AACA;AACA;AACF;AACD;AACG;AACA;AACA;AACA;AACA;AACG;AACF;AACH;AACD;AACG;AACF;AACH;;AAED;AACA;;AAEF;;AAGJ;;AACG;;AACA;AACA;AACA;AACA;AAEA;AACG;AACG;AACG;AACA;AACF;AACD;AACG;AACA;AACF;AACD;AACG;AACF;AACD;AACG;AACA;AACF;AACH;;AAED;AACA;;AAEF;AACJ;AAEA;;AAIS;AACG;;AAEL;AAqBK;AACG;AACF;;AAShB;;"}
1
+ {"version":3,"file":"ThemeProvider.cjs","sources":["../../src/theme/ThemeProvider.tsx"],"sourcesContent":["\"use client\";\r\nimport * as React from \"react\"\r\nimport { ThemeOptionInput, ThemeOptions } from \"./types\"\r\nimport Tag from \"../Tag\"\r\nimport { TagComponentType, TagProps } from \"../Tag/types\"\r\nimport { createTheme, ThemeContex } from \"./core\"\r\nimport ThemeCssVars from \"./ThemeCssVars\"\r\nimport { css } from \"../css\"\r\nimport ServerStyleTag from \"../Tag/ServerStyleTag\"\r\nimport { useDocument } from \"../Document\";\r\nimport { themeRootClass } from \".\";\r\nimport { useCSSCacheId } from \"../css/CSSCacheProvider\";\r\n\r\nexport type ThemeProviderProps<T extends TagComponentType = 'div'> = TagProps<T> & {\r\n theme: ThemeOptionInput;\r\n onThemeChange?: (theme: ThemeOptions) => void\r\n isRoot?: boolean;\r\n noScrollbarCss?: boolean;\r\n scrollbar?: {\r\n size?: number;\r\n thumbColor?: string;\r\n trackColor?: string;\r\n }\r\n}\r\n\r\nconst ThemeProvider = <T extends TagComponentType = 'div'>({ children, theme: THEME, scrollbar, onThemeChange, isRoot, noScrollbarCss, ...props }: ThemeProviderProps<T>) => {\r\n const doc = useDocument()\r\n const cacheId = useCSSCacheId()\r\n\r\n const theme = React.useMemo(() => createTheme(THEME), [THEME])\r\n\r\n const themeGlobalStyle: any = React.useMemo(() => {\r\n const root_cls = `.xui-${theme.name}-theme-root`\r\n let gkeys = Object.keys(theme.globalStyle || {})\r\n let gstyles: any = {}\r\n gkeys.forEach((key) => {\r\n gstyles[`${root_cls} ${key}`] = theme.globalStyle[key as any]\r\n })\r\n\r\n return css({\r\n \"@global\": {\r\n ...gstyles,\r\n [root_cls]: ThemeCssVars(theme)\r\n }\r\n }, {\r\n injectStyle: typeof window !== 'undefined',\r\n container: doc?.document,\r\n cacheId\r\n })\r\n }, [theme, doc])\r\n\r\n const resetCss = React.useMemo(() => {\r\n if (!isRoot) return\r\n return css({\r\n \"@global\": {\r\n \"*\": {\r\n m: 0,\r\n p: 0,\r\n outline: \"none\",\r\n boxSizing: \"border-box\",\r\n verticalAlign: \"baseline\",\r\n },\r\n \"html, body\": {\r\n height: \"100%\",\r\n \"-webkit-font-smoothing\": \"antialiased\",\r\n \"-moz-osx-font-smoothing\": \"grayscale\",\r\n } as any,\r\n \"img, picture, video, canvas, svg\": {\r\n maxWidth: \"100%\",\r\n display: \"block\"\r\n },\r\n \"input, button, textarea, select\": {\r\n font: \"inherit\"\r\n },\r\n \"table\": {\r\n borderCollapse: \"collapse\",\r\n borderSpacing: 0,\r\n },\r\n \"ol, ul\": {\r\n listStyle: \"none\",\r\n padding: 0,\r\n margin: 0,\r\n },\r\n \"a\": {\r\n display: \"inline-block\",\r\n color: \"inherit\",\r\n textDecoration: \"none\",\r\n cursor: \"pointer\",\r\n \"&:hover\": {\r\n textDecoration: \"underline\"\r\n }\r\n },\r\n \"p, h1, h2, h3, h4, h5, h6\": {\r\n overflowWrap: \"break-word\",\r\n },\r\n }\r\n }, {\r\n injectStyle: typeof window !== 'undefined',\r\n container: doc?.document,\r\n cacheId\r\n })\r\n }, [])\r\n\r\n const scrollbarCss: any = React.useMemo(() => {\r\n if (noScrollbarCss) return;\r\n const cls = (cls: string) => `${themeRootClass(theme.name)} ${cls}`\r\n let thumbSize = scrollbar?.size ?? 7\r\n let thumbColor = scrollbar?.thumbColor ?? \"var(--color-default-muted)\"\r\n let trackColor = scrollbar?.trackColor ?? \"var(--color-default-divider)\"\r\n\r\n return css({\r\n \"@global\": {\r\n [cls('*::-webkit-scrollbar')]: {\r\n width: thumbSize,\r\n height: thumbSize,\r\n },\r\n [cls(\"*::-webkit-scrollbar-thumb\")]: {\r\n backgroundColor: thumbColor,\r\n borderRadius: \"6px\",\r\n },\r\n [cls(\"*::-webkit-scrollbar-thumb:hover\")]: {\r\n backgroundColor: thumbColor,\r\n },\r\n [cls(\"*::-webkit-scrollbar-track\")]: {\r\n backgroundColor: trackColor,\r\n borderRadius: \"6px\",\r\n },\r\n }\r\n }, {\r\n injectStyle: typeof window !== 'undefined',\r\n container: doc?.document,\r\n cacheId\r\n }) as any\r\n }, [noScrollbarCss, theme])\r\n\r\n return (\r\n <ThemeContex.Provider\r\n value={{\r\n theme,\r\n onChange: (t) => {\r\n onThemeChange && onThemeChange(t)\r\n }\r\n }}\r\n >\r\n {\r\n isRoot && <>\r\n <ServerStyleTag factory={resetCss as any} />\r\n {\r\n !noScrollbarCss && <ServerStyleTag factory={scrollbarCss} />\r\n }\r\n </>\r\n }\r\n <ServerStyleTag factory={themeGlobalStyle} />\r\n <Tag\r\n minHeight=\"100%\"\r\n bgcolor={\"default.surface\"}\r\n color=\"default.contrast\"\r\n fontSize=\"text\"\r\n fontWeight=\"text\"\r\n lineHeight=\"text\"\r\n fontFamily={`system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif`}\r\n {...props}\r\n sxr={{\r\n \"& a\": {\r\n color: \"primary.base\",\r\n },\r\n }}\r\n baseClass={`${theme.name}-theme-root`}\r\n direction={theme.rtl ? \"rtl\" : \"ltr\"}\r\n >\r\n {children}\r\n </Tag>\r\n </ThemeContex.Provider>\r\n )\r\n}\r\n\r\nexport default ThemeProvider"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA;AAA2D;AACxD;AACA;AAEA;AAEA;AACG;AACA;;AAEA;AACG;AACH;AAEA;;;AAMG;AACA;;AAEF;AACJ;AAEA;AACG;;AACA;AACG;AACG;AACG;AACA;AACA;AACA;AACA;AACF;AACD;AACG;AACA;AACA;AACK;AACR;AACG;AACA;AACF;AACD;AACG;AACF;AACD;AACG;AACA;AACF;AACD;AACG;AACA;AACA;AACF;AACD;AACG;AACA;AACA;AACA;AACA;AACG;AACF;AACH;AACD;AACG;AACF;AACH;;AAED;AACA;;AAEF;;AAGJ;;AACG;;AACA;AACA;AACA;AACA;AAEA;AACG;AACG;AACG;AACA;AACF;AACD;AACG;AACA;AACF;AACD;AACG;AACF;AACD;AACG;AACA;AACF;AACH;;AAED;AACA;;AAEF;AACJ;AAEA;;AAIS;AACG;;AAEL;AAqBK;AACG;AACF;;AAShB;;"}