dash-ui-kit 1.0.94 → 2.1.0-dev

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 (201) hide show
  1. package/README.md +52 -0
  2. package/dist/react/components/accordion/index.cjs.js +193 -0
  3. package/dist/react/components/accordion/index.cjs.js.map +1 -0
  4. package/dist/react/components/accordion/index.esm.js +169 -0
  5. package/dist/react/components/accordion/index.esm.js.map +1 -0
  6. package/dist/react/components/avatar/index.cjs.js +39 -0
  7. package/dist/react/components/avatar/index.cjs.js.map +1 -0
  8. package/dist/react/components/avatar/index.esm.js +34 -0
  9. package/dist/react/components/avatar/index.esm.js.map +1 -0
  10. package/dist/react/components/badge/index.cjs.js +97 -0
  11. package/dist/react/components/badge/index.cjs.js.map +1 -0
  12. package/dist/react/components/badge/index.d.ts +10 -1
  13. package/dist/react/components/badge/index.esm.js +92 -0
  14. package/dist/react/components/badge/index.esm.js.map +1 -0
  15. package/dist/react/components/bigNumber/index.cjs.js +100 -0
  16. package/dist/react/components/bigNumber/index.cjs.js.map +1 -0
  17. package/dist/react/components/bigNumber/index.esm.js +95 -0
  18. package/dist/react/components/bigNumber/index.esm.js.map +1 -0
  19. package/dist/react/components/button/index.cjs.js +540 -0
  20. package/dist/react/components/button/index.cjs.js.map +1 -0
  21. package/dist/react/components/button/index.d.ts +7 -1
  22. package/dist/react/components/button/index.esm.js +535 -0
  23. package/dist/react/components/button/index.esm.js.map +1 -0
  24. package/dist/react/components/copyButton/index.cjs.js +95 -0
  25. package/dist/react/components/copyButton/index.cjs.js.map +1 -0
  26. package/dist/react/components/copyButton/index.esm.js +71 -0
  27. package/dist/react/components/copyButton/index.esm.js.map +1 -0
  28. package/dist/react/components/dashLogo/index.cjs.js +74 -0
  29. package/dist/react/components/dashLogo/index.cjs.js.map +1 -0
  30. package/dist/react/components/dashLogo/index.esm.js +69 -0
  31. package/dist/react/components/dashLogo/index.esm.js.map +1 -0
  32. package/dist/react/components/dateBlock/index.cjs.js +120 -0
  33. package/dist/react/components/dateBlock/index.cjs.js.map +1 -0
  34. package/dist/react/components/dateBlock/index.esm.js +115 -0
  35. package/dist/react/components/dateBlock/index.esm.js.map +1 -0
  36. package/dist/react/components/dialog/index.cjs.js +292 -0
  37. package/dist/react/components/dialog/index.cjs.js.map +1 -0
  38. package/dist/react/components/dialog/index.esm.js +270 -0
  39. package/dist/react/components/dialog/index.esm.js.map +1 -0
  40. package/dist/react/components/heading/index.cjs.js +65 -0
  41. package/dist/react/components/heading/index.cjs.js.map +1 -0
  42. package/dist/react/components/heading/index.d.ts +4 -1
  43. package/dist/react/components/heading/index.esm.js +63 -0
  44. package/dist/react/components/heading/index.esm.js.map +1 -0
  45. package/dist/react/components/icons/index.cjs.js +1173 -0
  46. package/dist/react/components/icons/index.cjs.js.map +1 -0
  47. package/dist/react/components/icons/index.d.ts +2 -0
  48. package/dist/react/components/icons/index.esm.js +1128 -0
  49. package/dist/react/components/icons/index.esm.js.map +1 -0
  50. package/dist/react/components/identifier/index.cjs.js +286 -0
  51. package/dist/react/components/identifier/index.cjs.js.map +1 -0
  52. package/dist/react/components/identifier/index.esm.js +282 -0
  53. package/dist/react/components/identifier/index.esm.js.map +1 -0
  54. package/dist/react/components/index.cjs.js +101 -0
  55. package/dist/react/components/index.cjs.js.map +1 -0
  56. package/dist/react/components/index.d.ts +1 -1
  57. package/dist/react/components/index.esm.js +29 -0
  58. package/dist/react/components/index.esm.js.map +1 -0
  59. package/dist/react/components/input/index.cjs.js +242 -0
  60. package/dist/react/components/input/index.cjs.js.map +1 -0
  61. package/dist/react/components/input/index.d.ts +4 -0
  62. package/dist/react/components/input/index.esm.js +237 -0
  63. package/dist/react/components/input/index.esm.js.map +1 -0
  64. package/dist/react/components/list/index.cjs.js +49 -0
  65. package/dist/react/components/list/index.cjs.js.map +1 -0
  66. package/dist/react/components/list/index.esm.js +47 -0
  67. package/dist/react/components/list/index.esm.js.map +1 -0
  68. package/dist/react/components/notActive/index.cjs.js +40 -0
  69. package/dist/react/components/notActive/index.cjs.js.map +1 -0
  70. package/dist/react/components/notActive/index.esm.js +38 -0
  71. package/dist/react/components/notActive/index.esm.js.map +1 -0
  72. package/dist/react/components/overlayMenu/index.cjs.js +469 -0
  73. package/dist/react/components/overlayMenu/index.cjs.js.map +1 -0
  74. package/dist/react/components/overlayMenu/index.d.ts +9 -10
  75. package/dist/react/components/overlayMenu/index.esm.js +464 -0
  76. package/dist/react/components/overlayMenu/index.esm.js.map +1 -0
  77. package/dist/react/components/overlaySelect/index.cjs.js +350 -0
  78. package/dist/react/components/overlaySelect/index.cjs.js.map +1 -0
  79. package/dist/react/components/overlaySelect/index.d.ts +4 -0
  80. package/dist/react/components/overlaySelect/index.esm.js +345 -0
  81. package/dist/react/components/overlaySelect/index.esm.js.map +1 -0
  82. package/dist/react/components/progressStepBar/index.cjs.js +54 -0
  83. package/dist/react/components/progressStepBar/index.cjs.js.map +1 -0
  84. package/dist/react/components/progressStepBar/index.d.ts +5 -2
  85. package/dist/react/components/progressStepBar/index.esm.js +52 -0
  86. package/dist/react/components/progressStepBar/index.esm.js.map +1 -0
  87. package/dist/react/components/select/index.cjs.js +241 -0
  88. package/dist/react/components/select/index.cjs.js.map +1 -0
  89. package/dist/react/components/select/index.d.ts +4 -0
  90. package/dist/react/components/select/index.esm.js +217 -0
  91. package/dist/react/components/select/index.esm.js.map +1 -0
  92. package/dist/react/components/switch/index.cjs.js +184 -0
  93. package/dist/react/components/switch/index.cjs.js.map +1 -0
  94. package/dist/react/components/switch/index.esm.js +179 -0
  95. package/dist/react/components/switch/index.esm.js.map +1 -0
  96. package/dist/react/components/tabs/index.cjs.js +178 -0
  97. package/dist/react/components/tabs/index.cjs.js.map +1 -0
  98. package/dist/react/components/tabs/index.esm.js +154 -0
  99. package/dist/react/components/tabs/index.esm.js.map +1 -0
  100. package/dist/react/components/text/index.cjs.js +126 -0
  101. package/dist/react/components/text/index.cjs.js.map +1 -0
  102. package/dist/react/components/text/index.d.ts +5 -0
  103. package/dist/react/components/text/index.esm.js +121 -0
  104. package/dist/react/components/text/index.esm.js.map +1 -0
  105. package/dist/react/components/textarea/index.cjs.js +260 -0
  106. package/dist/react/components/textarea/index.cjs.js.map +1 -0
  107. package/dist/react/components/textarea/index.d.ts +4 -0
  108. package/dist/react/components/textarea/index.esm.js +255 -0
  109. package/dist/react/components/textarea/index.esm.js.map +1 -0
  110. package/dist/react/components/timeDelta/index.cjs.js +93 -0
  111. package/dist/react/components/timeDelta/index.cjs.js.map +1 -0
  112. package/dist/react/components/timeDelta/index.d.ts +1 -1
  113. package/dist/react/components/timeDelta/index.esm.js +88 -0
  114. package/dist/react/components/timeDelta/index.esm.js.map +1 -0
  115. package/dist/react/components/transactionStatusIcon/index.cjs.js +59 -0
  116. package/dist/react/components/transactionStatusIcon/index.cjs.js.map +1 -0
  117. package/dist/react/components/transactionStatusIcon/index.esm.js +54 -0
  118. package/dist/react/components/transactionStatusIcon/index.esm.js.map +1 -0
  119. package/dist/react/components/valueCard/index.cjs.js +181 -0
  120. package/dist/react/components/valueCard/index.cjs.js.map +1 -0
  121. package/dist/react/components/valueCard/index.d.ts +5 -1
  122. package/dist/react/components/valueCard/index.esm.js +176 -0
  123. package/dist/react/components/valueCard/index.esm.js.map +1 -0
  124. package/dist/react/contexts/ThemeContext.cjs.js +79 -0
  125. package/dist/react/contexts/ThemeContext.cjs.js.map +1 -0
  126. package/dist/react/contexts/ThemeContext.esm.js +76 -0
  127. package/dist/react/contexts/ThemeContext.esm.js.map +1 -0
  128. package/dist/react/contexts/index.cjs.js +11 -0
  129. package/dist/react/contexts/index.cjs.js.map +1 -0
  130. package/dist/react/contexts/index.esm.js +4 -0
  131. package/dist/react/contexts/index.esm.js.map +1 -0
  132. package/dist/react/hooks/index.d.ts +1 -0
  133. package/dist/react/hooks/useColorScheme.cjs.js +25 -0
  134. package/dist/react/hooks/useColorScheme.cjs.js.map +1 -0
  135. package/dist/react/hooks/useColorScheme.d.ts +9 -0
  136. package/dist/react/hooks/useColorScheme.esm.js +23 -0
  137. package/dist/react/hooks/useColorScheme.esm.js.map +1 -0
  138. package/dist/react/hooks/useDebounce.cjs.js +83 -0
  139. package/dist/react/hooks/useDebounce.cjs.js.map +1 -0
  140. package/dist/react/hooks/useDebounce.esm.js +78 -0
  141. package/dist/react/hooks/useDebounce.esm.js.map +1 -0
  142. package/dist/react/index.cjs.js +99 -12833
  143. package/dist/react/index.cjs.js.map +1 -1
  144. package/dist/react/index.d.ts +1 -1
  145. package/dist/react/index.esm.js +27 -12747
  146. package/dist/react/index.esm.js.map +1 -1
  147. package/dist/react/shared/utils/datetime.cjs.js +59 -0
  148. package/dist/react/shared/utils/datetime.cjs.js.map +1 -0
  149. package/dist/react/shared/utils/datetime.esm.js +57 -0
  150. package/dist/react/shared/utils/datetime.esm.js.map +1 -0
  151. package/dist/react/utils/copyToClipboard.cjs.js +31 -0
  152. package/dist/react/utils/copyToClipboard.cjs.js.map +1 -0
  153. package/dist/react/utils/copyToClipboard.esm.js +26 -0
  154. package/dist/react/utils/copyToClipboard.esm.js.map +1 -0
  155. package/dist/react/utils/index.d.ts +1 -1
  156. package/dist/react-native/components/avatar/index.d.ts +26 -0
  157. package/dist/react-native/components/avatar/index.web.d.ts +24 -0
  158. package/dist/react-native/components/badge/index.d.ts +63 -0
  159. package/dist/react-native/components/bigNumber/index.d.ts +26 -0
  160. package/dist/react-native/components/button/index.d.ts +45 -0
  161. package/dist/react-native/components/copyButton/index.d.ts +22 -0
  162. package/dist/react-native/components/copyButton/index.web.d.ts +20 -0
  163. package/dist/react-native/components/dashLogo/index.d.ts +30 -0
  164. package/dist/react-native/components/heading/index.d.ts +25 -0
  165. package/dist/react-native/components/icons/index.d.ts +43 -0
  166. package/dist/react-native/components/identifier/index.d.ts +47 -0
  167. package/dist/react-native/components/index.d.ts +15 -0
  168. package/dist/react-native/components/input/index.d.ts +59 -0
  169. package/dist/react-native/components/notActive/index.d.ts +16 -0
  170. package/dist/react-native/components/tabs/index.d.ts +50 -0
  171. package/dist/react-native/components/text/index.d.ts +28 -0
  172. package/dist/react-native/components/transactionStatusIcon/index.d.ts +24 -0
  173. package/dist/react-native/components/valueCard/index.d.ts +47 -0
  174. package/dist/react-native/hooks/index.d.ts +1 -0
  175. package/dist/react-native/hooks/useDebounce.d.ts +43 -0
  176. package/dist/react-native/index.cjs.js +2882 -0
  177. package/dist/react-native/index.cjs.js.map +1 -0
  178. package/dist/react-native/index.d.ts +4 -0
  179. package/dist/react-native/index.esm.js +2833 -0
  180. package/dist/react-native/index.esm.js.map +1 -0
  181. package/dist/react-native/styles/index.d.ts +11 -0
  182. package/dist/react-native/styles/tokens.d.ts +308 -0
  183. package/dist/react-native/styles/utils.d.ts +65 -0
  184. package/dist/react-native/utils/clipboard.d.ts +27 -0
  185. package/dist/react-native/utils/index.d.ts +3 -0
  186. package/dist/react-native/utils/resolveColorScheme.d.ts +1 -0
  187. package/dist/react-native/utils/tw.d.ts +7 -0
  188. package/dist/shared/constants/colors.d.ts +25 -0
  189. package/dist/shared/constants/index.d.ts +2 -0
  190. package/dist/shared/constants/sizes.d.ts +49 -0
  191. package/dist/shared/index.cjs.js +171 -0
  192. package/dist/shared/index.cjs.js.map +1 -0
  193. package/dist/shared/index.d.ts +3 -0
  194. package/dist/shared/index.esm.js +161 -0
  195. package/dist/shared/index.esm.js.map +1 -0
  196. package/dist/shared/types/common.d.ts +33 -0
  197. package/dist/shared/types/index.d.ts +1 -0
  198. package/dist/shared/utils/index.d.ts +1 -0
  199. package/dist/styles.css +1 -1
  200. package/package.json +50 -8
  201. /package/dist/{react → shared}/utils/datetime.d.ts +0 -0
@@ -0,0 +1,176 @@
1
+ "use client";
2
+
3
+ import { __rest } from 'tslib';
4
+ import { jsx } from 'react/jsx-runtime';
5
+ import { cva } from 'class-variance-authority';
6
+ import { useTheme } from '../../contexts/ThemeContext.esm.js';
7
+ import { useColorScheme } from '../../hooks/useColorScheme.esm.js';
8
+
9
+ const valueCard = cva('flex items-center transition-all outline outline-1 outline-offset-[-1px]', {
10
+ variants: {
11
+ theme: {
12
+ light: 'outline-gray-200',
13
+ dark: 'bg-gray-800/50 outline-gray-400'
14
+ },
15
+ colorScheme: {
16
+ default: '',
17
+ transparent: 'bg-transparent',
18
+ green: 'text-green-500 bg-green-200 outline-green-400',
19
+ lightBlue: 'bg-dash-brand-dim/10 !outline-dash-brand/20',
20
+ white: 'bg-white',
21
+ lightGray: 'bg-dash-primary-die-subdued',
22
+ yellow: 'bg-dash-yellow-light !outline-dash-yellow'
23
+ },
24
+ size: {
25
+ xs: 'px-[0.5rem] py-[0.25rem] rounded-[0.25rem]',
26
+ sm: 'dash-block-sm',
27
+ md: 'dash-block-md',
28
+ xl: 'dash-block-xl'
29
+ },
30
+ clickable: {
31
+ false: '',
32
+ true: 'cursor-pointer transition-colors active:translate-y-px active:opacity-90'
33
+ },
34
+ loading: {
35
+ false: '',
36
+ true: 'animate-pulse'
37
+ },
38
+ border: {
39
+ false: '!outline-none',
40
+ true: ''
41
+ }
42
+ },
43
+ compoundVariants: [
44
+ // default scheme hover
45
+ {
46
+ theme: 'light',
47
+ colorScheme: 'default',
48
+ clickable: true,
49
+ class: 'hover:bg-gray-200/50'
50
+ }, {
51
+ theme: 'dark',
52
+ colorScheme: 'default',
53
+ clickable: true,
54
+ class: 'hover:bg-gray-700/50'
55
+ },
56
+ // transparent scheme hover
57
+ {
58
+ theme: 'light',
59
+ colorScheme: 'transparent',
60
+ clickable: true,
61
+ class: 'hover:bg-gray-100'
62
+ }, {
63
+ theme: 'dark',
64
+ colorScheme: 'transparent',
65
+ clickable: true,
66
+ class: 'hover:bg-gray-900'
67
+ },
68
+ // green scheme hover
69
+ {
70
+ theme: 'light',
71
+ colorScheme: 'green',
72
+ clickable: true,
73
+ class: 'hover:bg-green-300'
74
+ }, {
75
+ theme: 'dark',
76
+ colorScheme: 'green',
77
+ clickable: true,
78
+ class: 'hover:bg-green-400'
79
+ },
80
+ // green lightBlue
81
+ {
82
+ colorScheme: 'lightBlue',
83
+ clickable: true,
84
+ class: 'hover:bg-dash-brand/15'
85
+ },
86
+ // white
87
+ {
88
+ theme: 'light',
89
+ colorScheme: 'white',
90
+ clickable: true,
91
+ class: 'hover:bg-gray-100'
92
+ }, {
93
+ theme: 'dark',
94
+ colorScheme: 'white',
95
+ clickable: true,
96
+ class: 'hover:bg-gray-100'
97
+ },
98
+ // lightGray scheme hover
99
+ {
100
+ theme: 'light',
101
+ colorScheme: 'lightGray',
102
+ clickable: true,
103
+ class: 'hover:bg-dash-primary-die'
104
+ }, {
105
+ theme: 'dark',
106
+ colorScheme: 'lightGray',
107
+ clickable: true,
108
+ class: 'hover:bg-gray-600'
109
+ },
110
+ // yellow scheme hover
111
+ {
112
+ colorScheme: 'yellow',
113
+ clickable: true,
114
+ class: 'hover:bg-dash-yellow'
115
+ }],
116
+ defaultVariants: {
117
+ theme: 'light',
118
+ colorScheme: 'default',
119
+ size: 'md',
120
+ clickable: false,
121
+ loading: false,
122
+ border: true
123
+ }
124
+ });
125
+ /**
126
+ * A card container that adapts to light/dark theme,
127
+ * supports various color schemes, sizes, clickability,
128
+ * loading state, and optional border styling.
129
+ *
130
+ * @example
131
+ * <ValueCard colorScheme="green" border as={Link} link="/foo">
132
+ * Go
133
+ * </ValueCard>
134
+ */
135
+ const ValueCard = _a => {
136
+ var _b;
137
+ var {
138
+ as,
139
+ link = '',
140
+ colorScheme,
141
+ colorSchemeLight,
142
+ colorSchemeDark,
143
+ size,
144
+ clickable = false,
145
+ loading,
146
+ border,
147
+ className = '',
148
+ children
149
+ } = _a,
150
+ props = __rest(_a, ["as", "link", "colorScheme", "colorSchemeLight", "colorSchemeDark", "size", "clickable", "loading", "border", "className", "children"]);
151
+ const {
152
+ theme
153
+ } = useTheme();
154
+ const effectiveColorScheme = (_b = useColorScheme(colorScheme, colorSchemeLight, colorSchemeDark)) !== null && _b !== void 0 ? _b : 'default';
155
+ const isClickable = Boolean(link !== '' || clickable);
156
+ const classes = valueCard({
157
+ theme,
158
+ colorScheme: effectiveColorScheme,
159
+ size,
160
+ clickable: isClickable,
161
+ loading,
162
+ border
163
+ }) + ' ' + String(className);
164
+ // choose element: custom `as`, or <a> if link, else <div>
165
+ const Component = as !== null && as !== void 0 ? as : link !== '' ? 'a' : 'div';
166
+ const mergedProps = Object.assign(Object.assign({}, props), {
167
+ className: classes
168
+ });
169
+ if (link !== '') mergedProps.href = link;
170
+ return jsx(Component, Object.assign({}, mergedProps, {
171
+ children: children
172
+ }));
173
+ };
174
+
175
+ export { ValueCard, ValueCard as default };
176
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../../../../src/react/components/valueCard/index.tsx"],"sourcesContent":["import React from 'react'\nimport { cva, VariantProps } from 'class-variance-authority'\nimport { useTheme } from '../../contexts/ThemeContext'\nimport { useColorScheme } from '../../hooks/useColorScheme'\n\nconst valueCard = cva(\n 'flex items-center transition-all outline outline-1 outline-offset-[-1px]',\n {\n variants: {\n theme: {\n light: 'outline-gray-200',\n dark: 'bg-gray-800/50 outline-gray-400'\n },\n colorScheme: {\n default: '',\n transparent: 'bg-transparent',\n green: 'text-green-500 bg-green-200 outline-green-400',\n lightBlue: 'bg-dash-brand-dim/10 !outline-dash-brand/20',\n white: 'bg-white',\n lightGray: 'bg-dash-primary-die-subdued',\n yellow: 'bg-dash-yellow-light !outline-dash-yellow'\n },\n size: {\n xs: 'px-[0.5rem] py-[0.25rem] rounded-[0.25rem]',\n sm: 'dash-block-sm',\n md: 'dash-block-md',\n xl: 'dash-block-xl'\n },\n clickable: {\n false: '',\n true: 'cursor-pointer transition-colors active:translate-y-px active:opacity-90'\n },\n loading: {\n false: '',\n true: 'animate-pulse'\n },\n border: {\n false: '!outline-none',\n true: ''\n }\n },\n compoundVariants: [\n // default scheme hover\n { theme: 'light', colorScheme: 'default', clickable: true, class: 'hover:bg-gray-200/50' },\n { theme: 'dark', colorScheme: 'default', clickable: true, class: 'hover:bg-gray-700/50' },\n // transparent scheme hover\n { theme: 'light', colorScheme: 'transparent', clickable: true, class: 'hover:bg-gray-100' },\n { theme: 'dark', colorScheme: 'transparent', clickable: true, class: 'hover:bg-gray-900' },\n // green scheme hover\n { theme: 'light', colorScheme: 'green', clickable: true, class: 'hover:bg-green-300' },\n { theme: 'dark', colorScheme: 'green', clickable: true, class: 'hover:bg-green-400' },\n // green lightBlue\n { colorScheme: 'lightBlue', clickable: true, class: 'hover:bg-dash-brand/15' },\n // white\n { theme: 'light', colorScheme: 'white', clickable: true, class: 'hover:bg-gray-100' },\n { theme: 'dark', colorScheme: 'white', clickable: true, class: 'hover:bg-gray-100' },\n // lightGray scheme hover\n { theme: 'light', colorScheme: 'lightGray', clickable: true, class: 'hover:bg-dash-primary-die' },\n { theme: 'dark', colorScheme: 'lightGray', clickable: true, class: 'hover:bg-gray-600' },\n // yellow scheme hover\n { colorScheme: 'yellow', clickable: true, class: 'hover:bg-dash-yellow' }\n ],\n defaultVariants: {\n theme: 'light',\n colorScheme: 'default',\n size: 'md',\n clickable: false,\n loading: false,\n border: true\n }\n }\n)\n\ntype ValueCardVariants = VariantProps<typeof valueCard>\n\nexport interface ValueCardProps extends Omit<ValueCardVariants, 'theme'> {\n /** If you pass an `as` component, it'll receive `href` when `link` is set */\n as?: React.ElementType\n /** Only applies `href` if `as` is `'a'` or a component that accepts `href` */\n link?: string\n className?: string\n children: React.ReactNode\n /** Color scheme override for light theme */\n colorSchemeLight?: 'default' | 'transparent' | 'green' | 'lightBlue' | 'white' | 'lightGray' | 'yellow'\n /** Color scheme override for dark theme */\n colorSchemeDark?: 'default' | 'transparent' | 'green' | 'lightBlue' | 'white' | 'lightGray' | 'yellow'\n /** Additional props to pass to the underlying element */\n [key: string]: any\n}\n\n/**\n * A card container that adapts to light/dark theme,\n * supports various color schemes, sizes, clickability,\n * loading state, and optional border styling.\n *\n * @example\n * <ValueCard colorScheme=\"green\" border as={Link} link=\"/foo\">\n * Go\n * </ValueCard>\n */\nexport const ValueCard: React.FC<ValueCardProps> = ({\n as,\n link = '',\n colorScheme,\n colorSchemeLight,\n colorSchemeDark,\n size,\n clickable = false,\n loading,\n border,\n className = '',\n children,\n ...props\n}) => {\n const { theme } = useTheme()\n const effectiveColorScheme = useColorScheme(colorScheme, colorSchemeLight, colorSchemeDark) ?? 'default'\n const isClickable = Boolean(link !== '' || clickable)\n\n const classes = valueCard({\n theme,\n colorScheme: effectiveColorScheme,\n size,\n clickable: isClickable,\n loading,\n border\n }) + ' ' + (String(className))\n\n // choose element: custom `as`, or <a> if link, else <div>\n const Component = as ?? (link !== '' ? 'a' : 'div')\n\n const mergedProps: any = { ...props, className: classes }\n if (link !== '') mergedProps.href = link\n\n return <Component {...mergedProps}>{children}</Component>\n}\n\nexport default ValueCard "],"names":["valueCard","cva","variants","theme","light","dark","colorScheme","default","transparent","green","lightBlue","white","lightGray","yellow","size","xs","sm","md","xl","clickable","false","true","loading","border","compoundVariants","class","defaultVariants","ValueCard","_a","as","link","colorSchemeLight","colorSchemeDark","className","children","props","__rest","useTheme","effectiveColorScheme","_b","useColorScheme","isClickable","Boolean","classes","String","Component","mergedProps","href","_jsx","Object","assign"],"mappings":";;;;;;;;AAKA,MAAMA,SAAS,GAAGC,GAAG,CACnB,0EAA0E,EAC1E;AACEC,EAAAA,QAAQ,EAAE;AACRC,IAAAA,KAAK,EAAE;AACLC,MAAAA,KAAK,EAAE,kBAAkB;AACzBC,MAAAA,IAAI,EAAE;KACP;AACDC,IAAAA,WAAW,EAAE;AACXC,MAAAA,OAAO,EAAE,EAAE;AACXC,MAAAA,WAAW,EAAE,gBAAgB;AAC7BC,MAAAA,KAAK,EAAE,+CAA+C;AACtDC,MAAAA,SAAS,EAAE,6CAA6C;AACxDC,MAAAA,KAAK,EAAE,UAAU;AACjBC,MAAAA,SAAS,EAAE,6BAA6B;AACxCC,MAAAA,MAAM,EAAE;KACT;AACDC,IAAAA,IAAI,EAAE;AACJC,MAAAA,EAAE,EAAE,4CAA4C;AAChDC,MAAAA,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+ 'use strict';
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var React = require('react');
7
+
8
+ const ThemeContext = /*#__PURE__*/React.createContext(undefined);
9
+ /**
10
+ * Provides theme context to its descendants and syncs theme with localStorage
11
+ * and the root HTML element's class list ('light' or 'dark').
12
+ *
13
+ * @param initialTheme - Optional initial theme override.
14
+ * @param children - React children.
15
+ */
16
+ const ThemeProvider = ({
17
+ initialTheme,
18
+ children
19
+ }) => {
20
+ /**
21
+ * Retrieve stored theme from localStorage, if available.
22
+ */
23
+ const getStoredTheme = () => {
24
+ if (typeof window === 'undefined') return null;
25
+ const stored = localStorage.getItem('theme');
26
+ return stored != null && (stored === 'light' || stored === 'dark') ? stored : null;
27
+ };
28
+ const [theme, setThemeState] = React.useState(() => {
29
+ var _a;
30
+ return (_a = initialTheme !== null && initialTheme !== void 0 ? initialTheme : getStoredTheme()) !== null && _a !== void 0 ? _a : 'light';
31
+ });
32
+ // Sync theme changes to document <html> class and localStorage.
33
+ React.useEffect(() => {
34
+ document.documentElement.classList.toggle('dark', theme === 'dark');
35
+ document.documentElement.classList.toggle('light', theme === 'light');
36
+ try {
37
+ localStorage.setItem('theme', theme);
38
+ } catch (_a) {
39
+ // Ignore localStorage.
40
+ }
41
+ }, [theme]);
42
+ /**
43
+ * Update theme state explicitly.
44
+ * @param newTheme - The theme to set ('light' or 'dark').
45
+ */
46
+ const setTheme = newTheme => {
47
+ setThemeState(newTheme);
48
+ };
49
+ /**
50
+ * Toggle between 'light' and 'dark' theme.
51
+ */
52
+ const toggleTheme = () => {
53
+ setThemeState(current => current === 'light' ? 'dark' : 'light');
54
+ };
55
+ return jsxRuntime.jsx(ThemeContext.Provider, {
56
+ value: {
57
+ theme,
58
+ setTheme,
59
+ toggleTheme
60
+ },
61
+ children: children
62
+ });
63
+ };
64
+ /**
65
+ * Hook to access the theme context.
66
+ * @returns ThemeContextValue - Contains `theme`, `setTheme`, and `toggleTheme`.
67
+ * @throws If used outside of a ThemeProvider.
68
+ */
69
+ function useTheme() {
70
+ const context = React.useContext(ThemeContext);
71
+ if (context == null) {
72
+ throw new Error('useTheme must be used within a ThemeProvider');
73
+ }
74
+ return context;
75
+ }
76
+
77
+ exports.ThemeProvider = ThemeProvider;
78
+ exports.useTheme = useTheme;
79
+ //# sourceMappingURL=ThemeContext.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeContext.cjs.js","sources":["../../../src/react/contexts/ThemeContext.tsx"],"sourcesContent":["import React, { createContext, useContext, useState, useEffect } from 'react'\n\nexport type Theme = 'light' | 'dark'\n\n/**\n * Context value shape for theme switching.\n */\nexport interface ThemeContextValue {\n /** Current theme, either 'light' or 'dark'. */\n theme: Theme\n /** Set the theme explicitly. */\n setTheme: (theme: Theme) => void\n /** Toggle between 'light' and 'dark'. */\n toggleTheme: () => void\n}\n\nconst ThemeContext = createContext<ThemeContextValue | undefined>(undefined)\n\n/**\n * Props for the ThemeProvider component.\n */\nexport interface ThemeProviderProps {\n /** Initial theme; if not provided, reads from localStorage or defaults to 'light'. */\n initialTheme?: Theme\n /** React children that will have access to the theme context. */\n children: React.ReactNode\n}\n\n/**\n * Provides theme context to its descendants and syncs theme with localStorage\n * and the root HTML element's class list ('light' or 'dark').\n *\n * @param initialTheme - Optional initial theme override.\n * @param children - React children.\n */\nexport const ThemeProvider: React.FC<ThemeProviderProps> = ({ initialTheme, children }) => {\n /**\n * Retrieve stored theme from localStorage, if available.\n */\n const getStoredTheme = (): Theme | null => {\n if (typeof window === 'undefined') return null\n const stored = localStorage.getItem('theme')\n return (stored != null && (stored === 'light' || stored === 'dark')) ? stored : null\n }\n\n const [theme, setThemeState] = useState<Theme>(() => {\n return initialTheme ?? getStoredTheme() ?? 'light'\n })\n\n // Sync theme changes to document <html> class and localStorage.\n useEffect(() => {\n document.documentElement.classList.toggle('dark', theme === 'dark')\n document.documentElement.classList.toggle('light', theme === 'light')\n try {\n localStorage.setItem('theme', theme)\n } catch {\n // Ignore localStorage.\n }\n }, [theme])\n\n /**\n * Update theme state explicitly.\n * @param newTheme - The theme to set ('light' or 'dark').\n */\n const setTheme = (newTheme: Theme): void => {\n setThemeState(newTheme)\n }\n\n /**\n * Toggle between 'light' and 'dark' theme.\n */\n const toggleTheme = (): void => {\n setThemeState((current) => (current === 'light' ? 'dark' : 'light'))\n }\n\n return (\n <ThemeContext.Provider value={{ theme, setTheme, toggleTheme }}>\n {children}\n </ThemeContext.Provider>\n )\n}\n\n/**\n * Hook to access the theme context.\n * @returns ThemeContextValue - Contains `theme`, `setTheme`, and `toggleTheme`.\n * @throws If used outside of a ThemeProvider.\n */\nexport function useTheme (): ThemeContextValue {\n const context = useContext(ThemeContext)\n if (context == null) {\n throw new Error('useTheme must be used within a ThemeProvider')\n }\n return context\n}\n"],"names":["ThemeContext","createContext","undefined","ThemeProvider","initialTheme","children","getStoredTheme","window","stored","localStorage","getItem","theme","setThemeState","useState","_a","useEffect","document","documentElement","classList","toggle","setItem","setTheme","newTheme","toggleTheme","current","_jsx","Provider","value","useTheme","context","useContext","Error"],"mappings":";;;;;;;AAgBA,MAAMA,YAAY,gBAAGC,mBAAa,CAAgCC,SAAS,CAAC;AAY5E;;;;;;AAMG;AACI,MAAMC,aAAa,GAAiCA,CAAC;EAAEC,YAAY;AAAEC,EAAAA;AAAU,CAAA,KAAI;AACxF;;AAEG;EACH,MAAMC,cAAc,GAAGA,MAAmB;AACxC,IAAA,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE,OAAO,IAAI;AAC9C,IAAA,MAAMC,MAAM,GAAGC,YAAY,CAACC,OAAO,CAAC,OAAO,CAAC;AAC5C,IAAA,OAAQF,MAAM,IAAI,IAAI,KAAKA,MAAM,KAAK,OAAO,IAAIA,MAAM,KAAK,MAAM,CAAC,GAAIA,MAAM,GAAG,IAAI;GACrF;EAED,MAAM,CAACG,KAAK,EAAEC,aAAa,CAAC,GAAGC,cAAQ,CAAQ,MAAK;;IAClD,OAAO,CAAAC,EAAA,GAAAV,YAAY,KA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
+ import { useState, useEffect, createContext, useContext } from 'react';
5
+
6
+ const ThemeContext = /*#__PURE__*/createContext(undefined);
7
+ /**
8
+ * Provides theme context to its descendants and syncs theme with localStorage
9
+ * and the root HTML element's class list ('light' or 'dark').
10
+ *
11
+ * @param initialTheme - Optional initial theme override.
12
+ * @param children - React children.
13
+ */
14
+ const ThemeProvider = ({
15
+ initialTheme,
16
+ children
17
+ }) => {
18
+ /**
19
+ * Retrieve stored theme from localStorage, if available.
20
+ */
21
+ const getStoredTheme = () => {
22
+ if (typeof window === 'undefined') return null;
23
+ const stored = localStorage.getItem('theme');
24
+ return stored != null && (stored === 'light' || stored === 'dark') ? stored : null;
25
+ };
26
+ const [theme, setThemeState] = useState(() => {
27
+ var _a;
28
+ return (_a = initialTheme !== null && initialTheme !== void 0 ? initialTheme : getStoredTheme()) !== null && _a !== void 0 ? _a : 'light';
29
+ });
30
+ // Sync theme changes to document <html> class and localStorage.
31
+ useEffect(() => {
32
+ document.documentElement.classList.toggle('dark', theme === 'dark');
33
+ document.documentElement.classList.toggle('light', theme === 'light');
34
+ try {
35
+ localStorage.setItem('theme', theme);
36
+ } catch (_a) {
37
+ // Ignore localStorage.
38
+ }
39
+ }, [theme]);
40
+ /**
41
+ * Update theme state explicitly.
42
+ * @param newTheme - The theme to set ('light' or 'dark').
43
+ */
44
+ const setTheme = newTheme => {
45
+ setThemeState(newTheme);
46
+ };
47
+ /**
48
+ * Toggle between 'light' and 'dark' theme.
49
+ */
50
+ const toggleTheme = () => {
51
+ setThemeState(current => current === 'light' ? 'dark' : 'light');
52
+ };
53
+ return jsx(ThemeContext.Provider, {
54
+ value: {
55
+ theme,
56
+ setTheme,
57
+ toggleTheme
58
+ },
59
+ children: children
60
+ });
61
+ };
62
+ /**
63
+ * Hook to access the theme context.
64
+ * @returns ThemeContextValue - Contains `theme`, `setTheme`, and `toggleTheme`.
65
+ * @throws If used outside of a ThemeProvider.
66
+ */
67
+ function useTheme() {
68
+ const context = useContext(ThemeContext);
69
+ if (context == null) {
70
+ throw new Error('useTheme must be used within a ThemeProvider');
71
+ }
72
+ return context;
73
+ }
74
+
75
+ export { ThemeProvider, useTheme };
76
+ //# sourceMappingURL=ThemeContext.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeContext.esm.js","sources":["../../../src/react/contexts/ThemeContext.tsx"],"sourcesContent":["import React, { createContext, useContext, useState, useEffect } from 'react'\n\nexport type Theme = 'light' | 'dark'\n\n/**\n * Context value shape for theme switching.\n */\nexport interface ThemeContextValue {\n /** Current theme, either 'light' or 'dark'. */\n theme: Theme\n /** Set the theme explicitly. */\n setTheme: (theme: Theme) => void\n /** Toggle between 'light' and 'dark'. */\n toggleTheme: () => void\n}\n\nconst ThemeContext = createContext<ThemeContextValue | undefined>(undefined)\n\n/**\n * Props for the ThemeProvider component.\n */\nexport interface ThemeProviderProps {\n /** Initial theme; if not provided, reads from localStorage or defaults to 'light'. */\n initialTheme?: Theme\n /** React children that will have access to the theme context. */\n children: React.ReactNode\n}\n\n/**\n * Provides theme context to its descendants and syncs theme with localStorage\n * and the root HTML element's class list ('light' or 'dark').\n *\n * @param initialTheme - Optional initial theme override.\n * @param children - React children.\n */\nexport const ThemeProvider: React.FC<ThemeProviderProps> = ({ initialTheme, children }) => {\n /**\n * Retrieve stored theme from localStorage, if available.\n */\n const getStoredTheme = (): Theme | null => {\n if (typeof window === 'undefined') return null\n const stored = localStorage.getItem('theme')\n return (stored != null && (stored === 'light' || stored === 'dark')) ? stored : null\n }\n\n const [theme, setThemeState] = useState<Theme>(() => {\n return initialTheme ?? getStoredTheme() ?? 'light'\n })\n\n // Sync theme changes to document <html> class and localStorage.\n useEffect(() => {\n document.documentElement.classList.toggle('dark', theme === 'dark')\n document.documentElement.classList.toggle('light', theme === 'light')\n try {\n localStorage.setItem('theme', theme)\n } catch {\n // Ignore localStorage.\n }\n }, [theme])\n\n /**\n * Update theme state explicitly.\n * @param newTheme - The theme to set ('light' or 'dark').\n */\n const setTheme = (newTheme: Theme): void => {\n setThemeState(newTheme)\n }\n\n /**\n * Toggle between 'light' and 'dark' theme.\n */\n const toggleTheme = (): void => {\n setThemeState((current) => (current === 'light' ? 'dark' : 'light'))\n }\n\n return (\n <ThemeContext.Provider value={{ theme, setTheme, toggleTheme }}>\n {children}\n </ThemeContext.Provider>\n )\n}\n\n/**\n * Hook to access the theme context.\n * @returns ThemeContextValue - Contains `theme`, `setTheme`, and `toggleTheme`.\n * @throws If used outside of a ThemeProvider.\n */\nexport function useTheme (): ThemeContextValue {\n const context = useContext(ThemeContext)\n if (context == null) {\n throw new Error('useTheme must be used within a ThemeProvider')\n }\n return context\n}\n"],"names":["ThemeContext","createContext","undefined","ThemeProvider","initialTheme","children","getStoredTheme","window","stored","localStorage","getItem","theme","setThemeState","useState","_a","useEffect","document","documentElement","classList","toggle","setItem","setTheme","newTheme","toggleTheme","current","_jsx","Provider","value","useTheme","context","useContext","Error"],"mappings":";;;;;AAgBA,MAAMA,YAAY,gBAAGC,aAAa,CAAgCC,SAAS,CAAC;AAY5E;;;;;;AAMG;AACI,MAAMC,aAAa,GAAiCA,CAAC;EAAEC,YAAY;AAAEC,EAAAA;AAAU,CAAA,KAAI;AACxF;;AAEG;EACH,MAAMC,cAAc,GAAGA,MAAmB;AACxC,IAAA,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE,OAAO,IAAI;AAC9C,IAAA,MAAMC,MAAM,GAAGC,YAAY,CAACC,OAAO,CAAC,OAAO,CAAC;AAC5C,IAAA,OAAQF,MAAM,IAAI,IAAI,KAAKA,MAAM,KAAK,OAAO,IAAIA,MAAM,KAAK,MAAM,CAAC,GAAIA,MAAM,GAAG,IAAI;GACrF;EAED,MAAM,CAACG,KAAK,EAAEC,aAAa,CAAC,GAAGC,QAAQ,CAAQ,MAAK;;IAClD,OAAO,CAAAC,EAAA,GAAAV,YAAY,KAAA,IAAA,IAAZA,YAAY,KAAA,MAAA,GAAZA,YAAY,GAAIE,cAAc,EAAE,MAAI,IAAA,IAAAQ,EAAA,KAAA,MAAA,GAAAA,EAAA,GAAA,OAAO;AACpD,GAAC,CAAC;AAEF;AACAC,EAAAA,SAAS,CAAC,MAAK;AACbC,IAAAA,QAAQ,CAACC,eAAe,CAACC,SAAS,CAACC,MAAM,CAAC,MAAM,EAAER,KAAK,KAAK,MAAM,CAAC;AACnEK,IAAAA,QAAQ,CAACC,eAAe,CAACC,SAAS,CAACC,MAAM,CAAC,OAAO,EAAER,KAAK,KAAK,OAAO,CAAC;IACrE,IAAI;AACFF,MAAAA,YAAY,CAACW,OAAO,CAAC,OAAO,EAAET,KAAK,CAAC;KACrC,CAAC,OAAAG,EAAA,EAAM;AACN;AAAA;AAEJ,GAAC,EAAE,CAACH,KAAK,CAAC,CAAC;AAEX;;;AAGG;EACH,MAAMU,QAAQ,GAAIC,QAAe,IAAU;IACzCV,aAAa,CAACU,QAAQ,CAAC;GACxB;AAED;;AAEG;EACH,MAAMC,WAAW,GAAGA,MAAW;IAC7BX,aAAa,CAAEY,OAAO,IAAMA,OAAO,KAAK,OAAO,GAAG,MAAM,GAAG,OAAQ,CAAC;GACrE;AAED,EAAA,OACEC,GAAC,CAAAzB,YAAY,CAAC0B,QAAQ,EAAA;AAACC,IAAAA,KAAK,EAAE;MAAEhB,KAAK;MAAEU,QAAQ;AAAEE,MAAAA;KAAa;cAC3DlB;AAAQ,GAAA,CACa;AAE5B;AAEA;;;;AAIG;SACauB,QAAQA,GAAA;AACtB,EAAA,MAAMC,OAAO,GAAGC,UAAU,CAAC9B,YAAY,CAAC;EACxC,IAAI6B,OAAO,IAAI,IAAI,EAAE;AACnB,IAAA,MAAM,IAAIE,KAAK,CAAC,8CAA8C,CAAC;AACjE;AACA,EAAA,OAAOF,OAAO;AAChB;;;;"}
@@ -0,0 +1,11 @@
1
+ "use client";
2
+
3
+ 'use strict';
4
+
5
+ var ThemeContext = require('./ThemeContext.cjs.js');
6
+
7
+
8
+
9
+ exports.ThemeProvider = ThemeContext.ThemeProvider;
10
+ exports.useTheme = ThemeContext.useTheme;
11
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -0,0 +1,4 @@
1
+ "use client";
2
+
3
+ export { ThemeProvider, useTheme } from './ThemeContext.esm.js';
4
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +1,2 @@
1
1
  export { default as useDebounce } from './useDebounce';
2
+ export { useColorScheme } from './useColorScheme';
@@ -0,0 +1,25 @@
1
+ "use client";
2
+
3
+ 'use strict';
4
+
5
+ var ThemeContext = require('../contexts/ThemeContext.cjs.js');
6
+
7
+ /**
8
+ * Resolves the effective color scheme based on the active theme.
9
+ *
10
+ * Priority:
11
+ * 1. colorSchemeLight — when theme is 'light' and value is provided
12
+ * 2. colorSchemeDark — when theme is 'dark' and value is provided
13
+ * 3. colorScheme — fallback, theme-independent
14
+ */
15
+ function useColorScheme(colorScheme, colorSchemeLight, colorSchemeDark) {
16
+ const {
17
+ theme
18
+ } = ThemeContext.useTheme();
19
+ if (theme === 'light' && colorSchemeLight !== undefined) return colorSchemeLight;
20
+ if (theme === 'dark' && colorSchemeDark !== undefined) return colorSchemeDark;
21
+ return colorScheme;
22
+ }
23
+
24
+ exports.useColorScheme = useColorScheme;
25
+ //# sourceMappingURL=useColorScheme.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useColorScheme.cjs.js","sources":["../../../src/react/hooks/useColorScheme.ts"],"sourcesContent":["import { useTheme } from '../contexts/ThemeContext'\n\n/**\n * Resolves the effective color scheme based on the active theme.\n *\n * Priority:\n * 1. colorSchemeLight — when theme is 'light' and value is provided\n * 2. colorSchemeDark — when theme is 'dark' and value is provided\n * 3. colorScheme — fallback, theme-independent\n */\nexport function useColorScheme<T>(\n colorScheme?: T,\n colorSchemeLight?: T,\n colorSchemeDark?: T\n): T | undefined {\n const { theme } = useTheme()\n\n if (theme === 'light' && colorSchemeLight !== undefined) return colorSchemeLight\n if (theme === 'dark' && colorSchemeDark !== undefined) return colorSchemeDark\n\n return colorScheme\n}\n"],"names":["useColorScheme","colorScheme","colorSchemeLight","colorSchemeDark","theme","useTheme","undefined"],"mappings":";;;;;;AAEA;;;;;;;AAOG;SACaA,cAAcA,CAC5BC,WAAe,EACfC,gBAAoB,EACpBC,eAAmB,EAAA;EAEnB,MAAM;AAAEC,IAAAA;GAAO,GAAGC,qBAAQ,EAAE;EAE5B,IAAID,KAAK,KAAK,OAAO,IAAIF,gBAAgB,KAAKI,SAAS,EAAE,OAAOJ,gBAAgB;EAChF,IAAIE,KAAK,KAAK,MAAM,IAAID,eAAe,KAAKG,SAAS,EAAE,OAAOH,eAAe;AAE7E,EAAA,OAAOF,WAAW;AACpB;;;;"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Resolves the effective color scheme based on the active theme.
3
+ *
4
+ * Priority:
5
+ * 1. colorSchemeLight — when theme is 'light' and value is provided
6
+ * 2. colorSchemeDark — when theme is 'dark' and value is provided
7
+ * 3. colorScheme — fallback, theme-independent
8
+ */
9
+ export declare function useColorScheme<T>(colorScheme?: T, colorSchemeLight?: T, colorSchemeDark?: T): T | undefined;
@@ -0,0 +1,23 @@
1
+ "use client";
2
+
3
+ import { useTheme } from '../contexts/ThemeContext.esm.js';
4
+
5
+ /**
6
+ * Resolves the effective color scheme based on the active theme.
7
+ *
8
+ * Priority:
9
+ * 1. colorSchemeLight — when theme is 'light' and value is provided
10
+ * 2. colorSchemeDark — when theme is 'dark' and value is provided
11
+ * 3. colorScheme — fallback, theme-independent
12
+ */
13
+ function useColorScheme(colorScheme, colorSchemeLight, colorSchemeDark) {
14
+ const {
15
+ theme
16
+ } = useTheme();
17
+ if (theme === 'light' && colorSchemeLight !== undefined) return colorSchemeLight;
18
+ if (theme === 'dark' && colorSchemeDark !== undefined) return colorSchemeDark;
19
+ return colorScheme;
20
+ }
21
+
22
+ export { useColorScheme };
23
+ //# sourceMappingURL=useColorScheme.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useColorScheme.esm.js","sources":["../../../src/react/hooks/useColorScheme.ts"],"sourcesContent":["import { useTheme } from '../contexts/ThemeContext'\n\n/**\n * Resolves the effective color scheme based on the active theme.\n *\n * Priority:\n * 1. colorSchemeLight — when theme is 'light' and value is provided\n * 2. colorSchemeDark — when theme is 'dark' and value is provided\n * 3. colorScheme — fallback, theme-independent\n */\nexport function useColorScheme<T>(\n colorScheme?: T,\n colorSchemeLight?: T,\n colorSchemeDark?: T\n): T | undefined {\n const { theme } = useTheme()\n\n if (theme === 'light' && colorSchemeLight !== undefined) return colorSchemeLight\n if (theme === 'dark' && colorSchemeDark !== undefined) return colorSchemeDark\n\n return colorScheme\n}\n"],"names":["useColorScheme","colorScheme","colorSchemeLight","colorSchemeDark","theme","useTheme","undefined"],"mappings":";;;;AAEA;;;;;;;AAOG;SACaA,cAAcA,CAC5BC,WAAe,EACfC,gBAAoB,EACpBC,eAAmB,EAAA;EAEnB,MAAM;AAAEC,IAAAA;GAAO,GAAGC,QAAQ,EAAE;EAE5B,IAAID,KAAK,KAAK,OAAO,IAAIF,gBAAgB,KAAKI,SAAS,EAAE,OAAOJ,gBAAgB;EAChF,IAAIE,KAAK,KAAK,MAAM,IAAID,eAAe,KAAKG,SAAS,EAAE,OAAOH,eAAe;AAE7E,EAAA,OAAOF,WAAW;AACpB;;;;"}
@@ -0,0 +1,83 @@
1
+ "use client";
2
+
3
+ 'use strict';
4
+
5
+ Object.defineProperty(exports, '__esModule', { value: true });
6
+
7
+ var React = require('react');
8
+
9
+ /**
10
+ * Hook for debouncing values with extended functionality
11
+ *
12
+ * @param value - Value to debounce
13
+ * @param options - Configuration options
14
+ * @returns Object with debounced value and control methods
15
+ */
16
+ const useDebounce = (value, options) => {
17
+ // Backward compatibility support - if number is passed, it's delay
18
+ const config = typeof options === 'number' ? {
19
+ delay: options
20
+ } : options;
21
+ const {
22
+ delay,
23
+ callback,
24
+ immediate = false
25
+ } = config;
26
+ const [debouncedValue, setDebouncedValue] = React.useState(value);
27
+ const [isPending, setIsPending] = React.useState(false);
28
+ const timeoutRef = React.useRef(null);
29
+ const isFirstRun = React.useRef(true);
30
+ const cancel = React.useCallback(() => {
31
+ if (timeoutRef.current) {
32
+ clearTimeout(timeoutRef.current);
33
+ timeoutRef.current = null;
34
+ setIsPending(false);
35
+ }
36
+ }, []);
37
+ const flush = React.useCallback(() => {
38
+ cancel();
39
+ setDebouncedValue(value);
40
+ callback === null || callback === void 0 ? void 0 : callback(value);
41
+ setIsPending(false);
42
+ }, [value, callback, cancel]);
43
+ React.useEffect(() => {
44
+ // If immediate === true and this is first run, set value immediately
45
+ if (immediate && isFirstRun.current) {
46
+ setDebouncedValue(value);
47
+ callback === null || callback === void 0 ? void 0 : callback(value);
48
+ isFirstRun.current = false;
49
+ return;
50
+ }
51
+ isFirstRun.current = false;
52
+ setIsPending(true);
53
+ const handler = setTimeout(() => {
54
+ setDebouncedValue(value);
55
+ callback === null || callback === void 0 ? void 0 : callback(value);
56
+ setIsPending(false);
57
+ timeoutRef.current = null;
58
+ }, delay);
59
+ timeoutRef.current = handler;
60
+ return () => {
61
+ clearTimeout(handler);
62
+ setIsPending(false);
63
+ };
64
+ }, [value, delay, callback, immediate]);
65
+ // Cleanup on unmount
66
+ React.useEffect(() => {
67
+ return () => {
68
+ if (timeoutRef.current) {
69
+ clearTimeout(timeoutRef.current);
70
+ }
71
+ };
72
+ }, []);
73
+ return {
74
+ debouncedValue,
75
+ flush,
76
+ cancel,
77
+ isPending
78
+ };
79
+ };
80
+
81
+ exports.default = useDebounce;
82
+ exports.useDebounce = useDebounce;
83
+ //# sourceMappingURL=useDebounce.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDebounce.cjs.js","sources":["../../../src/react/hooks/useDebounce.ts"],"sourcesContent":["import { useState, useEffect, useRef, useCallback } from 'react'\n\ninterface UseDebounceOptions<T> {\n /**\n * Delay in milliseconds\n */\n delay: number\n /**\n * Callback called when debounced value changes\n */\n callback?: (value: T) => void\n /**\n * If true, the value will be set immediately on first call\n */\n immediate?: boolean\n}\n\ninterface UseDebounceReturn<T> {\n /**\n * Current debounced value\n */\n debouncedValue: T\n /**\n * Function to force flush debounce and immediately update value\n */\n flush: () => void\n /**\n * Function to cancel current pending debounce\n */\n cancel: () => void\n /**\n * Whether there's a pending change\n */\n isPending: boolean\n}\n\n/**\n * Hook for debouncing values with extended functionality\n * \n * @param value - Value to debounce\n * @param options - Configuration options\n * @returns Object with debounced value and control methods\n */\nconst useDebounce = <T>(\n value: T, \n options: UseDebounceOptions<T> | number\n): UseDebounceReturn<T> => {\n // Backward compatibility support - if number is passed, it's delay\n const config: UseDebounceOptions<T> = typeof options === 'number' \n ? { delay: options }\n : options\n\n const { delay, callback, immediate = false } = config\n \n const [debouncedValue, setDebouncedValue] = useState<T>(value)\n const [isPending, setIsPending] = useState(false)\n const timeoutRef = useRef<NodeJS.Timeout | null>(null)\n const isFirstRun = useRef(true)\n\n const cancel = useCallback(() => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current)\n timeoutRef.current = null\n setIsPending(false)\n }\n }, [])\n\n const flush = useCallback(() => {\n cancel()\n setDebouncedValue(value)\n callback?.(value)\n setIsPending(false)\n }, [value, callback, cancel])\n\n useEffect(() => {\n // If immediate === true and this is first run, set value immediately\n if (immediate && isFirstRun.current) {\n setDebouncedValue(value)\n callback?.(value)\n isFirstRun.current = false\n return\n }\n\n isFirstRun.current = false\n setIsPending(true)\n\n const handler = setTimeout(() => {\n setDebouncedValue(value)\n callback?.(value)\n setIsPending(false)\n timeoutRef.current = null\n }, delay)\n\n timeoutRef.current = handler\n\n return () => {\n clearTimeout(handler)\n setIsPending(false)\n }\n }, [value, delay, callback, immediate])\n\n // Cleanup on unmount\n useEffect(() => {\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current)\n }\n }\n }, [])\n\n return {\n debouncedValue,\n flush,\n cancel,\n isPending\n }\n}\n\n// Export for backward compatibility\nexport default useDebounce\n\n// Named export for new API\nexport { useDebounce } "],"names":["useDebounce","value","options","config","delay","callback","immediate","debouncedValue","setDebouncedValue","useState","isPending","setIsPending","timeoutRef","useRef","isFirstRun","cancel","useCallback","current","clearTimeout","flush","useEffect","handler","setTimeout"],"mappings":";;;;;;;;AAoCA;;;;;;AAMG;AACH,MAAMA,WAAW,GAAGA,CAClBC,KAAQ,EACRC,OAAuC,KACf;AACxB;AACA,EAAA,MAAMC,MAAM,GAA0B,OAAOD,OAAO,KAAK,QAAQ,GAC7D;AAAEE,IAAAA,KAAK,EAAEF;AAAS,GAAA,GAClBA,OAAO;EAEX,MAAM;IAAEE,KAAK;IAAEC,QAAQ;AAAEC,IAAAA,SAAS,GAAG;AAAK,GAAE,GAAGH,MAAM;EAErD,MAAM,CAACI,cAAc,EAAEC,iBAAiB,CAAC,GAAGC,cAAQ,CAAIR,KAAK,CAAC;EAC9D,MAAM,CAACS,SAAS,EAAEC,YAAY,CAAC,GAAGF,cAAQ,CAAC,KAAK,CAAC;AACjD,EAAA,MAAMG,UAAU,GAAGC,YAAM,CAAwB,IAAI,CAAC;AACtD,EAAA,MAAMC,UAAU,GAAGD,YAAM,CAAC,IAAI,CAAC;AAE/B,EAAA,MAAME,MAAM,GAAGC,iBAAW,CAAC,MAAK;IAC9B,IAAIJ,UAAU,CAACK,OAAO,EAAE;AACtBC,MAAAA,YAAY,CAACN,UAAU,CAACK,OAAO,CAAC;MAChCL,UAAU,CAACK,OAAO,GAAG,IAAI;MACzBN,YAAY,CAAC,KAAK,CAAC;AACrB;GACD,EAAE,EAAE,CAAC;AAEN,EAAA,MAAMQ,KAAK,GAAGH,iBAAW,CAAC,MAAK;AAC7BD,IAAAA,MAAM,EAAE;IACRP,iBAAiB,CAACP,KAAK,CAAC;AACxBI,IAAAA,QAAQ,aAARA,QAAQ,KAAA,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"}
@@ -0,0 +1,78 @@
1
+ "use client";
2
+
3
+ import { useState, useRef, useCallback, useEffect } from 'react';
4
+
5
+ /**
6
+ * Hook for debouncing values with extended functionality
7
+ *
8
+ * @param value - Value to debounce
9
+ * @param options - Configuration options
10
+ * @returns Object with debounced value and control methods
11
+ */
12
+ const useDebounce = (value, options) => {
13
+ // Backward compatibility support - if number is passed, it's delay
14
+ const config = typeof options === 'number' ? {
15
+ delay: options
16
+ } : options;
17
+ const {
18
+ delay,
19
+ callback,
20
+ immediate = false
21
+ } = config;
22
+ const [debouncedValue, setDebouncedValue] = useState(value);
23
+ const [isPending, setIsPending] = useState(false);
24
+ const timeoutRef = useRef(null);
25
+ const isFirstRun = useRef(true);
26
+ const cancel = useCallback(() => {
27
+ if (timeoutRef.current) {
28
+ clearTimeout(timeoutRef.current);
29
+ timeoutRef.current = null;
30
+ setIsPending(false);
31
+ }
32
+ }, []);
33
+ const flush = useCallback(() => {
34
+ cancel();
35
+ setDebouncedValue(value);
36
+ callback === null || callback === void 0 ? void 0 : callback(value);
37
+ setIsPending(false);
38
+ }, [value, callback, cancel]);
39
+ useEffect(() => {
40
+ // If immediate === true and this is first run, set value immediately
41
+ if (immediate && isFirstRun.current) {
42
+ setDebouncedValue(value);
43
+ callback === null || callback === void 0 ? void 0 : callback(value);
44
+ isFirstRun.current = false;
45
+ return;
46
+ }
47
+ isFirstRun.current = false;
48
+ setIsPending(true);
49
+ const handler = setTimeout(() => {
50
+ setDebouncedValue(value);
51
+ callback === null || callback === void 0 ? void 0 : callback(value);
52
+ setIsPending(false);
53
+ timeoutRef.current = null;
54
+ }, delay);
55
+ timeoutRef.current = handler;
56
+ return () => {
57
+ clearTimeout(handler);
58
+ setIsPending(false);
59
+ };
60
+ }, [value, delay, callback, immediate]);
61
+ // Cleanup on unmount
62
+ useEffect(() => {
63
+ return () => {
64
+ if (timeoutRef.current) {
65
+ clearTimeout(timeoutRef.current);
66
+ }
67
+ };
68
+ }, []);
69
+ return {
70
+ debouncedValue,
71
+ flush,
72
+ cancel,
73
+ isPending
74
+ };
75
+ };
76
+
77
+ export { useDebounce as default, useDebounce };
78
+ //# sourceMappingURL=useDebounce.esm.js.map