@e-burgos/tucu-ui 2.7.2 → 2.8.0

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 (63) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/base.css +225 -0
  3. package/components/inputs/select.mjs +1 -1
  4. package/components/loaders/loader.mjs +21 -21
  5. package/components/typography/index.mjs +30 -30
  6. package/components/utils/code-block.mjs +1 -1
  7. package/hooks/use-breakpoint.mjs +21 -5
  8. package/hooks/use-click-away.mjs +17 -6
  9. package/hooks/use-copy-to-clipboard.mjs +45 -6
  10. package/hooks/use-measure.mjs +24 -4
  11. package/index.css +1 -1
  12. package/index.d.ts +29 -6
  13. package/index.js +9 -9
  14. package/macos/index.css +15 -0
  15. package/macos/sonoma/index.css +34 -0
  16. package/macos/sonoma/macos-auth.css +162 -0
  17. package/macos/sonoma/macos-backgrounds.css +314 -0
  18. package/macos/sonoma/macos-buttons.css +231 -0
  19. package/macos/sonoma/macos-cards.css +104 -0
  20. package/macos/sonoma/macos-content.css +157 -0
  21. package/macos/sonoma/macos-dialogs.css +122 -0
  22. package/macos/sonoma/macos-feedback.css +237 -0
  23. package/macos/sonoma/macos-fonts.css +7 -0
  24. package/macos/sonoma/macos-foundations.css +479 -0
  25. package/macos/sonoma/macos-inputs.css +1580 -0
  26. package/macos/sonoma/macos-layouts.css +223 -0
  27. package/macos/sonoma/macos-liquid-glass.css +279 -0
  28. package/macos/sonoma/macos-menus.css +184 -0
  29. package/macos/sonoma/macos-misc.css +635 -0
  30. package/macos/sonoma/macos-navigation.css +145 -0
  31. package/macos/sonoma/macos-selection.css +237 -0
  32. package/macos/sonoma/macos-sidebar.css +416 -0
  33. package/macos/sonoma/macos-tables.css +318 -0
  34. package/macos/sonoma/macos-toolbar.css +302 -0
  35. package/macos/sonoma/macos-typography.css +485 -0
  36. package/macos/sonoma/macos-window.css +273 -0
  37. package/macos/tahoe/index.css +34 -0
  38. package/macos/tahoe/macos-auth.css +162 -0
  39. package/macos/tahoe/macos-backgrounds.css +314 -0
  40. package/macos/tahoe/macos-buttons.css +286 -0
  41. package/macos/tahoe/macos-cards.css +125 -0
  42. package/macos/tahoe/macos-content.css +157 -0
  43. package/macos/tahoe/macos-dialogs.css +195 -0
  44. package/macos/tahoe/macos-feedback.css +273 -0
  45. package/macos/tahoe/macos-fonts.css +7 -0
  46. package/macos/tahoe/macos-foundations.css +516 -0
  47. package/macos/tahoe/macos-inputs.css +1656 -0
  48. package/macos/tahoe/macos-layouts.css +438 -0
  49. package/macos/tahoe/macos-liquid-glass.css +279 -0
  50. package/macos/tahoe/macos-menus.css +184 -0
  51. package/macos/tahoe/macos-misc.css +635 -0
  52. package/macos/tahoe/macos-navigation.css +191 -0
  53. package/macos/tahoe/macos-selection.css +237 -0
  54. package/macos/tahoe/macos-sidebar.css +420 -0
  55. package/macos/tahoe/macos-tables.css +320 -0
  56. package/macos/tahoe/macos-toolbar.css +304 -0
  57. package/macos/tahoe/macos-typography.css +485 -0
  58. package/macos/tahoe/macos-window.css +273 -0
  59. package/package.json +3 -3
  60. package/theme.css +812 -0
  61. package/third-party.css +39 -0
  62. package/utilities.css +105 -0
  63. package/hooks/internal/cjs-esm-interop.mjs +0 -9
package/CHANGELOG.md CHANGED
@@ -5,6 +5,29 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.8.0] - 2026-07-15
9
+
10
+ ### Added
11
+
12
+ - add a tokens-only ./theme export for Tailwind consumers (WS2)
13
+
14
+ ### Changed
15
+
16
+ - bump @e-burgos/tucu-ui to ^2.7.3
17
+
18
+ ### Fixed
19
+
20
+ - stop scanning third-party node_modules for Tailwind classes
21
+ ## [2.7.3] - 2026-07-15
22
+
23
+ ### Changed
24
+
25
+ - replace react-use with native React implementations
26
+ - bump @e-burgos/tucu-ui to ^2.7.2
27
+
28
+ ### Fixed
29
+
30
+ - resolve typecheck errors in CodeBlock's lazy prismjs loading
8
31
  ## [2.7.2] - 2026-07-15
9
32
 
10
33
  ### Fixed
package/base.css ADDED
@@ -0,0 +1,225 @@
1
+ /* ===================================================================
2
+ TUCU-UI — BASE STYLES
3
+ ===================================================================
4
+
5
+ Structural mode styles (html:root, html.dark) live in Tailwind's own
6
+ `base` layer. Tailwind v4 fixes the layer order — theme < base <
7
+ components < utilities — the moment `@import 'tailwindcss'` runs
8
+ ANYWHERE in a build, regardless of where relative to that import this
9
+ file's `@layer base { ... }` block appears. That means any utility
10
+ class (the consumer's own, or one of ours) reliably wins over these
11
+ rules, while they still win over Tailwind's own preflight/theme reset
12
+ — without needing to be unlayered.
13
+
14
+ Imported by globals.css and theme.css.
15
+ =================================================================== */
16
+
17
+ @layer base {
18
+ /* =================================================================
19
+ LIGHT MODE (default)
20
+ ================================================================= */
21
+ html:root {
22
+ @apply antialiased;
23
+ @apply bg-light;
24
+ -webkit-tap-highlight-color: transparent;
25
+ border-color: var(--color-border);
26
+ font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
27
+ 'Segoe UI', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans',
28
+ 'Helvetica Neue', sans-serif;
29
+ color: var(--font-primary-color);
30
+
31
+ /* Semantic colors — Foreground */
32
+ --color-semantic-fg: var(--color-tucu-ui-gray-100);
33
+ --color-semantic-fg-muted: var(--color-tucu-ui-gray-60);
34
+ --color-semantic-fg-inverse: var(--color-tucu-ui-gray-0);
35
+ --color-semantic-fg-primary: var(--color-tucu-ui-blue-60);
36
+ --color-semantic-fg-warning: var(--color-tucu-ui-orange-60);
37
+ --color-semantic-fg-positive: var(--color-tucu-ui-green-60);
38
+ --color-semantic-fg-negative: var(--color-tucu-ui-red-60);
39
+
40
+ /* Semantic colors — Background */
41
+ --color-semantic-bg: var(--color-tucu-ui-gray-0);
42
+ --color-semantic-bg-alternate: var(--color-tucu-ui-gray-10);
43
+ --color-semantic-bg-inverse: var(--color-tucu-ui-gray-100);
44
+ --color-semantic-bg-primary: var(--color-tucu-ui-blue-60);
45
+ --color-semantic-bg-primary-wash: var(--color-tucu-ui-blue-0);
46
+ --color-semantic-bg-secondary: var(--color-tucu-ui-gray-10);
47
+ --color-semantic-bg-tertiary: var(--color-tucu-ui-gray-20);
48
+ --color-semantic-bg-secondary-wash: var(--color-tucu-ui-gray-5);
49
+ --color-semantic-bg-negative: var(--color-tucu-ui-red-60);
50
+ --color-semantic-bg-negative-wash: var(--color-tucu-ui-red-0);
51
+ --color-semantic-bg-positive: var(--color-tucu-ui-green-60);
52
+ --color-semantic-bg-positive-wash: var(--color-tucu-ui-green-0);
53
+ --color-semantic-bg-warning: var(--color-tucu-ui-orange-40);
54
+ --color-semantic-bg-warning-wash: var(--color-tucu-ui-orange-0);
55
+ --color-semantic-bg-info: var(--color-tucu-ui-blue-60);
56
+
57
+ /* Semantic colors — Line */
58
+ --color-semantic-line-primary: var(--color-tucu-ui-gray-20);
59
+ --color-semantic-line-primary-subtle: color-mix(
60
+ in oklab,
61
+ var(--color-black) 10%,
62
+ transparent
63
+ );
64
+ --color-semantic-line-inverse: var(--color-tucu-ui-gray-0);
65
+
66
+ /* Semantic colors — Elevation */
67
+ --color-semantic-elevation-1: var(--color-tucu-ui-gray-0);
68
+ --color-semantic-elevation-2: var(--color-tucu-ui-gray-0);
69
+
70
+ /* Semantic colors — Accent */
71
+ --color-semantic-accent-subtle-green: var(--color-tucu-ui-green-0);
72
+ --color-semantic-accent-bold-green: var(--color-tucu-ui-green-60);
73
+ --color-semantic-accent-subtle-blue: var(--color-tucu-ui-blue-0);
74
+ --color-semantic-accent-bold-blue: var(--color-tucu-ui-blue-60);
75
+ --color-semantic-accent-subtle-purple: var(--color-tucu-ui-purple-0);
76
+ --color-semantic-accent-bold-purple: var(--color-tucu-ui-purple-80);
77
+ --color-semantic-accent-subtle-yellow: var(--color-tucu-ui-yellow-0);
78
+ --color-semantic-accent-bold-yellow: var(--color-tucu-ui-yellow-30);
79
+ --color-semantic-accent-subtle-red: var(--color-tucu-ui-red-0);
80
+ --color-semantic-accent-bold-red: var(--color-tucu-ui-red-60);
81
+ --color-semantic-accent-subtle-gray: var(--color-tucu-ui-gray-10);
82
+ --color-semantic-accent-bold-gray: var(--color-tucu-ui-gray-80);
83
+ }
84
+
85
+ /* =================================================================
86
+ DARK MODE
87
+ ================================================================= */
88
+ html.dark {
89
+ @apply bg-dark;
90
+ color: var(--font-primary-dark-color);
91
+
92
+ --color-brand: var(--color-semantic-dark-bg-primary);
93
+ --color-primary: var(--color-semantic-dark-bg-primary);
94
+ --color-secondary: var(--color-semantic-dark-bg-secondary);
95
+ --color-accent: var(--color-semantic-dark-accent-bold-yellow);
96
+ --color-muted: var(--color-semantic-dark-fg-muted);
97
+ --color-border: var(
98
+ --color-semantic-dark-line-primary-subtle,
99
+ color-mix(in oklab, var(--color-white) 8%, transparent)
100
+ ) !important;
101
+
102
+ /* Status Colors */
103
+ --color-success: var(--color-semantic-dark-bg-positive);
104
+ --color-warning: var(--color-semantic-dark-bg-warning);
105
+ --color-error: var(--color-semantic-dark-bg-negative);
106
+ --color-info: var(--color-semantic-dark-bg-info);
107
+
108
+ /* Dark/Light Theme Colors */
109
+ --color-body: var(--color-semantic-dark-bg);
110
+ --color-light-dark: var(--color-semantic-dark-bg-secondary-wash);
111
+ --color-foreground: var(--font-primary-dark-color);
112
+ --hero-grid-color: var(--color-gray-800);
113
+
114
+ /* Semantic colors — Foreground */
115
+ --color-semantic-fg: var(--color-semantic-dark-fg);
116
+ --color-semantic-fg-muted: var(--color-semantic-dark-fg-muted);
117
+ --color-semantic-fg-inverse: var(--color-semantic-dark-fg-inverse);
118
+ --color-semantic-fg-primary: var(--color-semantic-dark-fg-primary);
119
+ --color-semantic-fg-warning: var(--color-semantic-dark-fg-warning);
120
+ --color-semantic-fg-positive: var(--color-semantic-dark-fg-positive);
121
+ --color-semantic-fg-negative: var(--color-semantic-dark-fg-negative);
122
+
123
+ /* Semantic colors — Background */
124
+ --color-semantic-bg: var(--color-semantic-dark-bg);
125
+ --color-semantic-bg-alternate: var(--color-semantic-dark-bg-alternate);
126
+ --color-semantic-bg-inverse: var(--color-semantic-dark-bg-inverse);
127
+ --color-semantic-bg-primary: var(--color-semantic-dark-bg-primary);
128
+ --color-semantic-bg-primary-wash: var(
129
+ --color-semantic-dark-bg-primary-wash
130
+ );
131
+ --color-semantic-bg-secondary: var(--color-semantic-dark-bg-secondary);
132
+ --color-semantic-bg-tertiary: var(--color-semantic-dark-bg-tertiary);
133
+ --color-semantic-bg-secondary-wash: var(
134
+ --color-semantic-dark-bg-secondary-wash
135
+ );
136
+ --color-semantic-bg-negative: var(--color-semantic-dark-bg-negative);
137
+ --color-semantic-bg-negative-wash: var(
138
+ --color-semantic-dark-bg-negative-wash
139
+ );
140
+ --color-semantic-bg-positive: var(--color-semantic-dark-bg-positive);
141
+ --color-semantic-bg-positive-wash: var(
142
+ --color-semantic-dark-bg-positive-wash
143
+ );
144
+ --color-semantic-bg-warning: var(--color-semantic-dark-bg-warning);
145
+ --color-semantic-bg-warning-wash: var(
146
+ --color-semantic-dark-bg-warning-wash
147
+ );
148
+ --color-semantic-bg-info: var(--color-semantic-dark-bg-info);
149
+
150
+ /* Semantic colors — Line */
151
+ --color-semantic-line-primary: var(--color-semantic-dark-line-primary);
152
+ --color-semantic-line-primary-subtle: var(
153
+ --color-semantic-dark-line-primary-subtle
154
+ );
155
+ --color-semantic-line-inverse: var(--color-semantic-dark-line-inverse);
156
+
157
+ /* Semantic colors — Elevation */
158
+ --color-semantic-elevation-1: var(--color-semantic-dark-elevation-1);
159
+ --color-semantic-elevation-2: var(--color-semantic-dark-elevation-2);
160
+
161
+ /* Semantic colors — Accent */
162
+ --color-semantic-accent-subtle-green: var(
163
+ --color-semantic-dark-accent-subtle-green
164
+ );
165
+ --color-semantic-accent-bold-green: var(
166
+ --color-semantic-dark-accent-bold-green
167
+ );
168
+ --color-semantic-accent-subtle-blue: var(
169
+ --color-semantic-dark-accent-subtle-blue
170
+ );
171
+ --color-semantic-accent-bold-blue: var(
172
+ --color-semantic-dark-accent-bold-blue
173
+ );
174
+ --color-semantic-accent-subtle-purple: var(
175
+ --color-semantic-dark-accent-subtle-purple
176
+ );
177
+ --color-semantic-accent-bold-purple: var(
178
+ --color-semantic-dark-accent-bold-purple
179
+ );
180
+ --color-semantic-accent-subtle-yellow: var(
181
+ --color-semantic-dark-accent-subtle-yellow
182
+ );
183
+ --color-semantic-accent-bold-yellow: var(
184
+ --color-semantic-dark-accent-bold-yellow
185
+ );
186
+ --color-semantic-accent-subtle-red: var(
187
+ --color-semantic-dark-accent-subtle-red
188
+ );
189
+ --color-semantic-accent-bold-red: var(
190
+ --color-semantic-dark-accent-bold-red
191
+ );
192
+ --color-semantic-accent-subtle-gray: var(
193
+ --color-semantic-dark-accent-subtle-gray
194
+ );
195
+ --color-semantic-accent-bold-gray: var(
196
+ --color-semantic-dark-accent-bold-gray
197
+ );
198
+ }
199
+
200
+ /* ===================================================================
201
+ NO FOCUS RINGS ON INPUTS (all themes)
202
+ Uses html:root to match specificity of theme-scoped rules
203
+ (html.macos-tahoe / html.macos) and wins by cascade order.
204
+ =================================================================== */
205
+ html:root [data-tucu='input-control']:focus,
206
+ html:root [data-tucu='input']:focus-within,
207
+ html:root [data-tucu='textarea']:focus,
208
+ html:root [data-tucu='select']:focus-within,
209
+ html:root [data-tucu='select-trigger']:focus,
210
+ html:root [data-tucu='select-search']:focus,
211
+ html:root [data-tucu='input-searcher']:focus-within,
212
+ html:root [data-tucu='input-calendar']:focus,
213
+ html:root [data-tucu='checkbox']:focus,
214
+ html:root [data-tucu='checkbox']:focus-visible,
215
+ html:root [data-tucu='radio']:focus,
216
+ html:root [data-tucu='radio']:focus-visible,
217
+ html:root [data-tucu='switch-control']:focus-visible,
218
+ html:root [data-tucu='pin-code-input']:focus,
219
+ html:root [data-tucu='file-input-dropzone']:focus,
220
+ html:root [data-tucu='file-input-dropzone']:focus-within {
221
+ outline: none !important;
222
+ box-shadow: none !important;
223
+ --tw-ring-shadow: 0 0 #0000 !important;
224
+ }
225
+ }
@@ -276,7 +276,7 @@ function ze({
276
276
  onClick: se,
277
277
  onKeyDown: ie,
278
278
  className: f(
279
- "text-case-inherit letter-space-inherit flex w-full items-center justify-between font-medium outline-hidden duration-200",
279
+ "tucu-text-case-inherit tucu-letter-space-inherit flex w-full items-center justify-between font-medium outline-hidden duration-200",
280
280
  be.select[q],
281
281
  ve[A],
282
282
  b && we[A][b],
@@ -1,6 +1,6 @@
1
1
  import { jsxs as p, jsx as o } from "react/jsx-runtime";
2
2
  import m from "classnames";
3
- const i = {
3
+ const c = {
4
4
  blink: "animate-blink",
5
5
  scaleUp: "animate-scale-up",
6
6
  moveUp: "animate-move-up"
@@ -8,7 +8,7 @@ const i = {
8
8
  small: "w-1.5 h-1.5",
9
9
  medium: "w-2.5 h-2.5",
10
10
  large: "w-3 h-3"
11
- }, r = {
11
+ }, t = {
12
12
  primary: "bg-brand",
13
13
  gray: "bg-gray-500",
14
14
  success: "bg-green-500",
@@ -16,19 +16,19 @@ const i = {
16
16
  info: "bg-blue-500",
17
17
  warning: "bg-orange-500"
18
18
  };
19
- function c(e) {
19
+ function i(e) {
20
20
  return e === "small" ? "relative top-1.5" : "relative top-3";
21
21
  }
22
- function t(e, n) {
23
- return e === "moveUp" && n === "small" ? "animate-move-up-small" : i[e];
22
+ function u(e, n) {
23
+ return e === "moveUp" && n === "small" ? "animate-move-up-small" : c[e];
24
24
  }
25
25
  function y({
26
26
  tag: e = "div",
27
27
  color: n = "primary",
28
28
  size: a = "medium",
29
29
  variant: l = "moveUp",
30
- showOnlyThreeDots: d,
31
- className: u
30
+ showOnlyThreeDots: r,
31
+ className: d
32
32
  }) {
33
33
  return /* @__PURE__ */ p(
34
34
  e,
@@ -36,8 +36,8 @@ function y({
36
36
  "data-tucu": "loader",
37
37
  className: m(
38
38
  "flex items-center gap-2",
39
- l === "moveUp" && c(a),
40
- u
39
+ l === "moveUp" && i(a),
40
+ d
41
41
  ),
42
42
  children: [
43
43
  /* @__PURE__ */ o(
@@ -45,9 +45,9 @@ function y({
45
45
  {
46
46
  className: m(
47
47
  "rounded-full",
48
- t(l, a),
48
+ u(l, a),
49
49
  s[a],
50
- r[n]
50
+ t[n]
51
51
  )
52
52
  }
53
53
  ),
@@ -55,10 +55,10 @@ function y({
55
55
  "span",
56
56
  {
57
57
  className: m(
58
- "animation-delay-200 rounded-full",
59
- t(l, a),
58
+ "tucu-animation-delay-200 rounded-full",
59
+ u(l, a),
60
60
  s[a],
61
- r[n]
61
+ t[n]
62
62
  )
63
63
  }
64
64
  ),
@@ -66,21 +66,21 @@ function y({
66
66
  "span",
67
67
  {
68
68
  className: m(
69
- "animation-delay-500 rounded-full",
70
- t(l, a),
69
+ "tucu-animation-delay-500 rounded-full",
70
+ u(l, a),
71
71
  s[a],
72
- r[n]
72
+ t[n]
73
73
  )
74
74
  }
75
75
  ),
76
- l === "moveUp" && !d ? /* @__PURE__ */ o(
76
+ l === "moveUp" && !r ? /* @__PURE__ */ o(
77
77
  "span",
78
78
  {
79
79
  className: m(
80
- "animation-delay-700 rounded-full",
81
- t(l, a),
80
+ "tucu-animation-delay-700 rounded-full",
81
+ u(l, a),
82
82
  s[a],
83
- r[n]
83
+ t[n]
84
84
  )
85
85
  }
86
86
  ) : null
@@ -1,13 +1,13 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import u from "classnames";
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import m from "classnames";
3
3
  import { Tooltip as h } from "../common/tooltip.mjs";
4
4
  const g = {
5
- h1: "text-h1",
6
- h2: "text-h2",
7
- h3: "text-h3",
8
- h4: "text-h4",
9
- h5: "text-h5",
10
- h6: "text-h6",
5
+ h1: "tucu-text-h1",
6
+ h2: "tucu-text-h2",
7
+ h3: "tucu-text-h3",
8
+ h4: "tucu-text-h4",
9
+ h5: "tucu-text-h5",
10
+ h6: "tucu-text-h6",
11
11
  p: "",
12
12
  i: "",
13
13
  b: "",
@@ -25,12 +25,12 @@ const g = {
25
25
  blockquote: "border-l-4 border-border text-quote py-3 px-4",
26
26
  sub: "p-3 text-sx text-bottom",
27
27
  sup: "p-3 text-sx text-top",
28
- headline: "text-headline",
29
- body: "text-body",
30
- "label-1": "text-label-1",
31
- "label-2": "text-label-2",
32
- caption: "text-caption",
33
- legal: "text-legal"
28
+ headline: "tucu-text-headline",
29
+ body: "tucu-text-body",
30
+ "label-1": "tucu-text-label-1",
31
+ "label-2": "tucu-text-label-2",
32
+ caption: "tucu-text-caption",
33
+ legal: "tucu-text-legal"
34
34
  }, y = {
35
35
  default: "text-primary-color",
36
36
  primary: "text-primary",
@@ -72,40 +72,40 @@ const g = {
72
72
  function v({
73
73
  tag: t = "p",
74
74
  title: e,
75
- children: p,
76
- className: x,
75
+ children: d,
76
+ className: c,
77
77
  color: r,
78
78
  fontFamily: o,
79
79
  tooltip: a,
80
- tooltipPlacement: b = "top",
81
- tooltipColor: i,
82
- tooltipArrow: c = !0
80
+ tooltipPlacement: p = "top",
81
+ tooltipColor: x,
82
+ tooltipArrow: b = !0
83
83
  }) {
84
- const m = !k.includes(
84
+ const i = !k.includes(
85
85
  t
86
86
  ) ? "div" : t;
87
87
  let s = "", n = "";
88
88
  t === "abbr" && e === void 0 && console.warn("title attribute is missing for abbr tag."), r && (s = y[r]), o && (n = f[o]);
89
- const l = /* @__PURE__ */ d(
90
- m,
89
+ const u = /* @__PURE__ */ l(
90
+ i,
91
91
  {
92
92
  "data-tucu": "typography",
93
93
  "data-typography-tag": t,
94
94
  ...e && { title: e },
95
- className: u(g[t], n, s, x),
96
- children: p
95
+ className: m(g[t], n, s, c),
96
+ children: d
97
97
  }
98
98
  );
99
- return a ? /* @__PURE__ */ d(
99
+ return a ? /* @__PURE__ */ l(
100
100
  h,
101
101
  {
102
102
  content: a,
103
- placement: b,
104
- color: i,
105
- arrow: c,
106
- children: l
103
+ placement: p,
104
+ color: x,
105
+ arrow: b,
106
+ children: u
107
107
  }
108
- ) : l;
108
+ ) : u;
109
109
  }
110
110
  export {
111
111
  v as Typography,
@@ -45,7 +45,7 @@ function y(r) {
45
45
  }
46
46
  async function L(r) {
47
47
  p || (p = import("prismjs"));
48
- const { default: o } = await p;
48
+ const o = await p;
49
49
  return r && b[r] && await y(r).catch(() => {
50
50
  m.delete(r);
51
51
  }), o;
@@ -1,6 +1,5 @@
1
- import * as o from "react-use/lib/factory/createBreakpoint";
2
- import { unwrapCjsDefault as t } from "./internal/cjs-esm-interop.mjs";
3
- const e = t(o), r = {
1
+ import { useState as s, useEffect as d } from "react";
2
+ const a = {
4
3
  xs: 480,
5
4
  sm: 640,
6
5
  md: 768,
@@ -9,7 +8,24 @@ const e = t(o), r = {
9
8
  "2xl": 1440,
10
9
  "3xl": 1780,
11
10
  "4xl": 2160
12
- }, s = e(r);
11
+ }, i = Object.entries(a).sort(
12
+ (n, e) => n[1] - e[1]
13
+ );
14
+ function r(n) {
15
+ let e = i[0][0];
16
+ for (const [t, o] of i)
17
+ n >= o && (e = t);
18
+ return e;
19
+ }
20
+ function f() {
21
+ const [n, e] = s(
22
+ () => r(typeof window < "u" ? window.innerWidth : 0)
23
+ );
24
+ return d(() => {
25
+ const t = () => e(r(window.innerWidth));
26
+ return t(), window.addEventListener("resize", t), () => window.removeEventListener("resize", t);
27
+ }, []), n;
28
+ }
13
29
  export {
14
- s as useBreakpoint
30
+ f as useBreakpoint
15
31
  };
@@ -1,8 +1,19 @@
1
- import * as o from "react-use/lib/useClickAway";
2
- import { unwrapCjsDefault as r } from "./internal/cjs-esm-interop.mjs";
3
- const e = r(
4
- o
5
- );
1
+ import { useRef as s, useEffect as a } from "react";
2
+ const d = ["mousedown", "touchstart"];
3
+ function i(r, n, e = d) {
4
+ const c = s(n);
5
+ c.current = n, a(() => {
6
+ const o = (t) => {
7
+ const u = r.current;
8
+ u && !u.contains(t.target) && c.current(t);
9
+ };
10
+ return e.forEach((t) => document.addEventListener(t, o)), () => {
11
+ e.forEach(
12
+ (t) => document.removeEventListener(t, o)
13
+ );
14
+ };
15
+ }, [r, e]);
16
+ }
6
17
  export {
7
- e as useClickAway
18
+ i as useClickAway
8
19
  };
@@ -1,8 +1,47 @@
1
- import * as o from "react-use/lib/useCopyToClipboard";
2
- import { unwrapCjsDefault as p } from "./internal/cjs-esm-interop.mjs";
3
- const a = p(
4
- o
5
- );
1
+ import { useState as c, useCallback as i } from "react";
2
+ function s(t) {
3
+ const e = document.createElement("textarea");
4
+ e.value = t, e.style.position = "fixed", e.style.opacity = "0", document.body.appendChild(e), e.focus(), e.select();
5
+ let r = !1;
6
+ try {
7
+ r = document.execCommand("copy");
8
+ } catch {
9
+ r = !1;
10
+ }
11
+ return document.body.removeChild(e), r;
12
+ }
13
+ function d() {
14
+ const [t, e] = c({
15
+ value: void 0,
16
+ error: void 0,
17
+ noUserInteraction: !0
18
+ }), r = i((o) => {
19
+ if (typeof o != "string") {
20
+ e({
21
+ value: o,
22
+ error: new Error(
23
+ `Cannot copy typeof ${typeof o} to clipboard, must be a string`
24
+ ),
25
+ noUserInteraction: !0
26
+ });
27
+ return;
28
+ }
29
+ if (navigator.clipboard && window.isSecureContext) {
30
+ navigator.clipboard.writeText(o).then(
31
+ () => e({ value: o, error: void 0, noUserInteraction: !1 }),
32
+ (a) => e({ value: o, error: a, noUserInteraction: !1 })
33
+ );
34
+ return;
35
+ }
36
+ const n = s(o);
37
+ e({
38
+ value: o,
39
+ error: n ? void 0 : new Error("Copy failed"),
40
+ noUserInteraction: !1
41
+ });
42
+ }, []);
43
+ return [t, r];
44
+ }
6
45
  export {
7
- a as useCopyToClipboard
46
+ d as useCopyToClipboard
8
47
  };
@@ -1,6 +1,26 @@
1
- import * as e from "react-use/lib/useMeasure";
2
- import { unwrapCjsDefault as r } from "./internal/cjs-esm-interop.mjs";
3
- const s = r(e);
1
+ import { useState as n, useEffect as m } from "react";
2
+ const p = {
3
+ x: 0,
4
+ y: 0,
5
+ width: 0,
6
+ height: 0,
7
+ top: 0,
8
+ right: 0,
9
+ bottom: 0,
10
+ left: 0
11
+ };
12
+ function a() {
13
+ const [e, o] = n(null), [s, i] = n(p);
14
+ return m(() => {
15
+ if (!e || typeof ResizeObserver > "u") return;
16
+ const t = new ResizeObserver(([r]) => {
17
+ if (!r) return;
18
+ const { x: c, y: u, width: f, height: h, top: l, right: d, bottom: g, left: b } = r.target.getBoundingClientRect();
19
+ i({ x: c, y: u, width: f, height: h, top: l, right: d, bottom: g, left: b });
20
+ });
21
+ return t.observe(e), () => t.disconnect();
22
+ }, [e]), [o, s];
23
+ }
4
24
  export {
5
- s as useMeasure
25
+ a as useMeasure
6
26
  };