@sbkbs/ui 1.0.2 → 1.0.4

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 (146) hide show
  1. package/README.md +13 -10
  2. package/dist/components/Accordion/Accordion.d.ts +11 -0
  3. package/dist/components/Accordion/Accordion.js +56 -0
  4. package/dist/components/Accordion/Accordion.js.map +1 -0
  5. package/dist/components/Accordion/Accordion.stories.d.ts +7 -0
  6. package/dist/components/Alert/Alert.d.ts +6 -0
  7. package/dist/components/Alert/Alert.js +32 -0
  8. package/dist/components/Alert/Alert.js.map +1 -0
  9. package/dist/components/Alert/Alert.stories.d.ts +8 -0
  10. package/dist/components/Badge/Badge.d.ts +6 -0
  11. package/dist/components/Badge/Badge.js +35 -0
  12. package/dist/components/Badge/Badge.js.map +1 -0
  13. package/dist/components/Badge/Badge.stories.d.ts +8 -0
  14. package/dist/components/Breadcrumb/Breadcrumb.d.ts +10 -0
  15. package/dist/components/Breadcrumb/Breadcrumb.js +26 -0
  16. package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -0
  17. package/dist/components/Breadcrumb/Breadcrumb.stories.d.ts +8 -0
  18. package/dist/components/Button/Button.js +122 -0
  19. package/dist/components/Button/Button.js.map +1 -0
  20. package/dist/components/Button/Button.stories.d.ts +7 -0
  21. package/dist/components/Card/Card.js +33 -0
  22. package/dist/components/Card/Card.js.map +1 -0
  23. package/dist/components/Card/Card.stories.d.ts +8 -0
  24. package/dist/components/Checkbox/Checkbox.d.ts +6 -0
  25. package/dist/components/Checkbox/Checkbox.js +36 -0
  26. package/dist/components/Checkbox/Checkbox.js.map +1 -0
  27. package/dist/components/Checkbox/Checkbox.stories.d.ts +7 -0
  28. package/dist/components/Chip/Chip.d.ts +5 -0
  29. package/dist/components/Chip/Chip.js +19 -0
  30. package/dist/components/Chip/Chip.js.map +1 -0
  31. package/dist/components/Combobox/Combobox.d.ts +17 -0
  32. package/dist/components/Combobox/Combobox.js +143 -0
  33. package/dist/components/Combobox/Combobox.js.map +1 -0
  34. package/dist/components/Combobox/Combobox.stories.d.ts +9 -0
  35. package/dist/components/Divider/Divider.d.ts +5 -0
  36. package/dist/components/Divider/Divider.js +22 -0
  37. package/dist/components/Divider/Divider.js.map +1 -0
  38. package/dist/components/EmptyState/EmptyState.d.ts +8 -0
  39. package/dist/components/EmptyState/EmptyState.js +29 -0
  40. package/dist/components/EmptyState/EmptyState.js.map +1 -0
  41. package/dist/components/Feedback/Feedback.stories.d.ts +5 -0
  42. package/dist/components/FileUpload/FileUpload.d.ts +13 -0
  43. package/dist/components/FileUpload/FileUpload.js +116 -0
  44. package/dist/components/FileUpload/FileUpload.js.map +1 -0
  45. package/dist/components/FileUpload/FileUpload.stories.d.ts +10 -0
  46. package/dist/components/Footer/Footer.js +54 -0
  47. package/dist/components/Footer/Footer.js.map +1 -0
  48. package/dist/components/Header/Header.js +114 -0
  49. package/dist/components/Header/Header.js.map +1 -0
  50. package/dist/components/Input/Input.d.ts +2 -2
  51. package/dist/components/Input/Input.js +78 -0
  52. package/dist/components/Input/Input.js.map +1 -0
  53. package/dist/components/Input/Input.stories.d.ts +9 -0
  54. package/dist/components/Layout/Layout.d.ts +14 -0
  55. package/dist/components/Layout/Layout.js +41 -0
  56. package/dist/components/Layout/Layout.js.map +1 -0
  57. package/dist/components/Modal/Modal.js +113 -0
  58. package/dist/components/Modal/Modal.js.map +1 -0
  59. package/dist/components/Modal/Modal.stories.d.ts +8 -0
  60. package/dist/components/Navigation/Navigation.d.ts +7 -0
  61. package/dist/components/Navigation/Navigation.js +26 -0
  62. package/dist/components/Navigation/Navigation.js.map +1 -0
  63. package/dist/components/NumberInput/NumberInput.d.ts +12 -0
  64. package/dist/components/NumberInput/NumberInput.js +135 -0
  65. package/dist/components/NumberInput/NumberInput.js.map +1 -0
  66. package/dist/components/NumberInput/NumberInput.stories.d.ts +8 -0
  67. package/dist/components/PageHeader/PageHeader.d.ts +7 -0
  68. package/dist/components/PageHeader/PageHeader.js +29 -0
  69. package/dist/components/PageHeader/PageHeader.js.map +1 -0
  70. package/dist/components/Pagination/Pagination.d.ts +7 -0
  71. package/dist/components/Pagination/Pagination.js +50 -0
  72. package/dist/components/Pagination/Pagination.js.map +1 -0
  73. package/dist/components/Pagination/Pagination.stories.d.ts +8 -0
  74. package/dist/components/Paragraph/Paragraph.js +41 -0
  75. package/dist/components/Paragraph/Paragraph.js.map +1 -0
  76. package/dist/components/Popover/Popover.d.ts +7 -0
  77. package/dist/components/Popover/Popover.js +57 -0
  78. package/dist/components/Popover/Popover.js.map +1 -0
  79. package/dist/components/Radio/Radio.d.ts +6 -0
  80. package/dist/components/Radio/Radio.js +36 -0
  81. package/dist/components/Radio/Radio.js.map +1 -0
  82. package/dist/components/Radio/Radio.stories.d.ts +7 -0
  83. package/dist/components/SectionHeader/SectionHeader.d.ts +7 -0
  84. package/dist/components/SectionHeader/SectionHeader.js +19 -0
  85. package/dist/components/SectionHeader/SectionHeader.js.map +1 -0
  86. package/dist/components/Select/Select.d.ts +13 -0
  87. package/dist/components/Select/Select.js +45 -0
  88. package/dist/components/Select/Select.js.map +1 -0
  89. package/dist/components/Select/Select.stories.d.ts +8 -0
  90. package/dist/components/Skeleton/Skeleton.d.ts +7 -0
  91. package/dist/components/Skeleton/Skeleton.js +25 -0
  92. package/dist/components/Skeleton/Skeleton.js.map +1 -0
  93. package/dist/components/Stepper/Stepper.d.ts +13 -0
  94. package/dist/components/Stepper/Stepper.js +97 -0
  95. package/dist/components/Stepper/Stepper.js.map +1 -0
  96. package/dist/components/Stepper/Stepper.stories.d.ts +8 -0
  97. package/dist/components/Subtitle/Subtitle.js +40 -0
  98. package/dist/components/Subtitle/Subtitle.js.map +1 -0
  99. package/dist/components/Switch/Switch.d.ts +7 -0
  100. package/dist/components/Switch/Switch.js +37 -0
  101. package/dist/components/Switch/Switch.js.map +1 -0
  102. package/dist/components/Switch/Switch.stories.d.ts +8 -0
  103. package/dist/components/Table/Table.d.ts +4 -0
  104. package/dist/components/Table/Table.js +17 -0
  105. package/dist/components/Table/Table.js.map +1 -0
  106. package/dist/components/Tabs/Tabs.d.ts +11 -0
  107. package/dist/components/Tabs/Tabs.js +62 -0
  108. package/dist/components/Tabs/Tabs.js.map +1 -0
  109. package/dist/components/Tabs/Tabs.stories.d.ts +8 -0
  110. package/dist/components/Tag/Tag.d.ts +5 -0
  111. package/dist/components/Tag/Tag.js +29 -0
  112. package/dist/components/Tag/Tag.js.map +1 -0
  113. package/dist/components/Textarea/Textarea.d.ts +7 -0
  114. package/dist/components/Textarea/Textarea.js +46 -0
  115. package/dist/components/Textarea/Textarea.js.map +1 -0
  116. package/dist/components/Textarea/Textarea.stories.d.ts +7 -0
  117. package/dist/components/Title/Title.js +47 -0
  118. package/dist/components/Title/Title.js.map +1 -0
  119. package/dist/components/Toast/Toast.d.ts +26 -0
  120. package/dist/components/Toast/Toast.js +110 -0
  121. package/dist/components/Toast/Toast.js.map +1 -0
  122. package/dist/components/Toast/Toast.stories.d.ts +8 -0
  123. package/dist/components/Tooltip/Tooltip.d.ts +7 -0
  124. package/dist/components/Tooltip/Tooltip.js +36 -0
  125. package/dist/components/Tooltip/Tooltip.js.map +1 -0
  126. package/dist/index.d.ts +31 -3
  127. package/dist/index.js +88 -0
  128. package/dist/index.js.map +1 -0
  129. package/dist/node_modules/clsx/dist/clsx.js +17 -0
  130. package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
  131. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +2925 -0
  132. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
  133. package/dist/oficios-ui.umd.cjs +1 -1
  134. package/dist/oficios-ui.umd.cjs.map +1 -1
  135. package/dist/theme/ThemeProvider.d.ts +1 -1
  136. package/dist/theme/ThemeProvider.js +22 -0
  137. package/dist/theme/ThemeProvider.js.map +1 -0
  138. package/dist/theme.css +60 -64
  139. package/dist/ui.css +1 -0
  140. package/dist/utils/cn.d.ts +7 -0
  141. package/dist/utils/cn.js +7 -0
  142. package/dist/utils/cn.js.map +1 -0
  143. package/package.json +54 -5
  144. package/dist/oficios-ui.css +0 -1
  145. package/dist/oficios-ui.js +0 -593
  146. package/dist/oficios-ui.js.map +0 -1
@@ -1,593 +0,0 @@
1
- import { jsxs as v, jsx as e } from "react/jsx-runtime";
2
- import { useState as z, useEffect as b, useContext as $, createContext as P } from "react";
3
- const W = ({
4
- variant: t = "primary",
5
- size: a = "md",
6
- compact: r = !1,
7
- fullWidth: n = !1,
8
- isLoading: o = !1,
9
- leftIcon: s,
10
- rightIcon: i,
11
- children: d,
12
- className: h = "",
13
- disabled: c,
14
- palette: l,
15
- style: f,
16
- ...m
17
- }) => {
18
- const x = "relative inline-flex select-none items-center justify-center overflow-hidden whitespace-nowrap rounded-[var(--border-radius-md)] border border-transparent font-semibold leading-none tracking-[0.01em] transition-[all_var(--transition-base)]", p = "focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--md-primary)]", N = "disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-60", u = n ? "w-full" : "", g = "", M = l === "off-white" && t === "primary" ? "border-[var(--border-color)]" : "", _ = {
19
- xs: r ? "min-h-[1.75rem] min-w-[1.75rem] gap-1 px-2 py-1 text-[var(--font-size-xs)]" : "min-h-8 min-w-8 gap-1.5 px-3 py-1.5 text-[var(--font-size-xs)]",
20
- sm: r ? "min-h-8 min-w-8 gap-[0.3125rem] px-2.5 py-1.5 text-[var(--font-size-sm)]" : "min-h-9 min-w-9 gap-[0.4375rem] px-3.5 py-2 text-[var(--font-size-sm)]",
21
- md: r ? "min-h-[2.375rem] min-w-[2.375rem] gap-1.5 px-3 py-2 text-[var(--font-size-base)]" : "min-h-11 min-w-11 gap-2 px-4 py-2.5 text-[var(--font-size-base)]",
22
- lg: r ? "min-h-[2.625rem] min-w-[2.625rem] gap-[0.4375rem] px-3.5 py-[0.5625rem] text-[var(--font-size-lg)]" : "min-h-12 min-w-12 gap-[0.5625rem] px-6 py-4 text-[var(--font-size-lg)]",
23
- xl: r ? "min-h-12 min-w-12 gap-2 px-4 py-3 text-[var(--font-size-xl)]" : "min-h-14 min-w-14 gap-2.5 px-8 py-6 text-[var(--font-size-xl)]"
24
- }, E = {
25
- primary: "bg-[var(--md-primary)] text-[var(--md-on-primary)] shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--primary-color-hover)] hover:shadow-[var(--shadow-md)]",
26
- secondary: "bg-[var(--md-secondary)] text-[var(--md-on-secondary)] shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--secondary-color-light)] hover:shadow-[var(--shadow-md)]",
27
- success: "bg-[var(--success-color)] text-white shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--success-color-light)] hover:shadow-[var(--shadow-md)]",
28
- error: "bg-[var(--md-error)] text-[var(--md-on-error)] shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--error-color-light)] hover:shadow-[var(--shadow-md)]",
29
- warning: "bg-[var(--warning-color)] text-white shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--warning-color-light)] hover:shadow-[var(--shadow-md)]",
30
- info: "bg-[var(--info-color)] text-white shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--info-color-light)] hover:shadow-[var(--shadow-md)]",
31
- neutral: "bg-[var(--neutral-color)] text-white shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--neutral-color-light)] hover:shadow-[var(--shadow-md)]",
32
- ghost: "border-[var(--border-color)] bg-[var(--bg-secondary)] text-[var(--md-on-surface)] shadow-[var(--shadow-xs)] hover:bg-[var(--bg-hover)] hover:text-[var(--md-primary)] hover:border-[var(--border-color-hover)]"
33
- }, C = {
34
- xs: r ? "h-3 w-3" : "h-3.5 w-3.5",
35
- sm: r ? "h-3.5 w-3.5" : "h-4 w-4",
36
- md: "h-[1.125rem] w-[1.125rem]",
37
- lg: "h-5 w-5",
38
- xl: "h-5 w-5"
39
- }, w = {
40
- "verde-vibrante": {
41
- primary: "var(--brand-verde-vibrante)",
42
- hover: "var(--brand-verde-profundo)"
43
- },
44
- "verde-profundo": {
45
- primary: "var(--brand-verde-profundo)",
46
- hover: "var(--brand-grafite-azulado)"
47
- },
48
- "grafite-azulado": {
49
- primary: "var(--brand-grafite-azulado)",
50
- hover: "var(--brand-cinza-escuro)"
51
- },
52
- "azul-acinzentado": {
53
- primary: "var(--brand-azul-acinzentado)",
54
- hover: "var(--brand-grafite-azulado)"
55
- },
56
- "cinza-medio": {
57
- primary: "var(--brand-cinza-medio)",
58
- hover: "var(--brand-cinza-escuro)"
59
- },
60
- "cinza-escuro": {
61
- primary: "var(--brand-cinza-escuro)",
62
- hover: "var(--brand-preto)"
63
- },
64
- "off-white": {
65
- primary: "var(--brand-off-white)",
66
- hover: "var(--brand-branco)",
67
- onPrimary: "var(--brand-grafite-azulado)"
68
- }
69
- }, y = {};
70
- l && t === "primary" && (y["--md-primary"] = w[l].primary, y["--primary-color-hover"] = w[l].hover, w[l].onPrimary && (y["--md-on-primary"] = w[l].onPrimary));
71
- const B = [
72
- x,
73
- p,
74
- N,
75
- _[a],
76
- E[t],
77
- M,
78
- u,
79
- g,
80
- h
81
- ].filter(Boolean).join(" ");
82
- return /* @__PURE__ */ v(
83
- "button",
84
- {
85
- className: B,
86
- disabled: c || o,
87
- style: { ...y, ...f },
88
- ...m,
89
- children: [
90
- o && /* @__PURE__ */ e(
91
- "span",
92
- {
93
- "aria-hidden": "true",
94
- className: "absolute inline-flex h-[1em] w-[1em] animate-spin items-center justify-center",
95
- children: /* @__PURE__ */ v("svg", { fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: [
96
- /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "10", strokeOpacity: "0.25" }),
97
- /* @__PURE__ */ e("path", { d: "M12 2 A10 10 0 0 1 22 12", strokeLinecap: "round" })
98
- ] })
99
- }
100
- ),
101
- !o && s && /* @__PURE__ */ e(
102
- "span",
103
- {
104
- className: `mr-1 inline-flex shrink-0 items-center justify-center leading-none ${C[a]}`,
105
- children: s
106
- }
107
- ),
108
- !o && /* @__PURE__ */ e("span", { className: "btn__content inline-flex items-center justify-center", children: d }),
109
- !o && i && /* @__PURE__ */ e(
110
- "span",
111
- {
112
- className: `ml-1 inline-flex shrink-0 items-center justify-center leading-none ${C[a]}`,
113
- children: i
114
- }
115
- )
116
- ]
117
- }
118
- );
119
- }, F = ({
120
- variant: t = "default",
121
- padding: a = "md",
122
- hoverable: r = !1,
123
- children: n,
124
- className: o = "",
125
- ...s
126
- }) => {
127
- const i = "relative overflow-hidden rounded-[var(--border-radius-lg)] transition-[var(--transition-all)]", d = {
128
- default: "bg-[var(--md-surface)] border border-[var(--md-outline-variant)] shadow-[var(--shadow-sm)]",
129
- elevated: "bg-[var(--md-surface)] border border-[var(--md-outline-variant)] shadow-[var(--shadow-lg)]",
130
- outlined: "bg-transparent border border-[var(--md-outline-variant)] shadow-none",
131
- flat: "bg-[var(--md-surface)] border-0 shadow-none"
132
- }, h = {
133
- none: "p-0",
134
- sm: "p-[var(--spacing-md)]",
135
- md: "p-[var(--spacing-lg)]",
136
- lg: "p-[var(--spacing-xl)]",
137
- xl: "p-[var(--spacing-2xl)]"
138
- }, c = r ? "hover:shadow-[var(--shadow-md)]" : "", l = [
139
- i,
140
- d[t],
141
- h[a],
142
- c,
143
- o
144
- ].filter(Boolean).join(" ");
145
- return /* @__PURE__ */ e("div", { className: l, ...s, children: n });
146
- }, A = ({
147
- poweredByText: t = "Powered by",
148
- logoSrc: a,
149
- logoAlt: r = "Logo",
150
- logoFallbackText: n,
151
- className: o = ""
152
- }) => {
153
- const [s, i] = z(!0);
154
- return /* @__PURE__ */ e(
155
- "footer",
156
- {
157
- className: [
158
- "relative z-[1] flex w-full shrink-0 items-center justify-center border-t border-[var(--border-color)] bg-[var(--bg-secondary)] px-[var(--spacing-2xl)] py-[var(--spacing-lg)]",
159
- o
160
- ].filter(Boolean).join(" "),
161
- children: /* @__PURE__ */ v("div", { className: "flex items-center gap-[var(--spacing-md)]", children: [
162
- t && /* @__PURE__ */ e("span", { className: "text-[0.95rem] font-normal text-[var(--text-secondary)]", children: t }),
163
- (a || n) && /* @__PURE__ */ v("div", { className: "flex items-center", children: [
164
- a && s && /* @__PURE__ */ e(
165
- "img",
166
- {
167
- alt: r,
168
- className: "h-6 w-auto object-contain",
169
- onError: (d) => {
170
- i(!1);
171
- },
172
- src: a,
173
- style: {
174
- filter: "brightness(0)"
175
- }
176
- }
177
- ),
178
- n && /* @__PURE__ */ e(
179
- "span",
180
- {
181
- className: "flex items-center text-base font-bold tracking-[0.1em] text-[var(--md-primary)]",
182
- style: {
183
- display: a && s ? "none" : "flex",
184
- fontFamily: '"Orbitron", sans-serif'
185
- },
186
- children: n
187
- }
188
- )
189
- ] })
190
- ] })
191
- }
192
- );
193
- }, k = () => typeof document > "u" ? "light" : document.documentElement.getAttribute("data-theme") === "dark" ? "dark" : "light", V = ({
194
- logoSrc: t,
195
- logoDarkSrc: a,
196
- logoAlt: r = "Logo",
197
- title: n,
198
- subtitle: o,
199
- theme: s,
200
- onLogoClick: i,
201
- rightContent: d,
202
- className: h = ""
203
- }) => {
204
- const [c, l] = z(!1), [f, m] = z(
205
- () => s ?? k()
206
- ), x = f === "dark" && a ? a : t;
207
- b(() => {
208
- const u = () => l(window.scrollY > 10);
209
- return window.addEventListener("scroll", u, { passive: !0 }), () => window.removeEventListener("scroll", u);
210
- }, []), b(() => {
211
- if (s) {
212
- m(s);
213
- return;
214
- }
215
- const u = () => m(k());
216
- if (u(), typeof MutationObserver > "u")
217
- return;
218
- const g = new MutationObserver(u);
219
- return g.observe(document.documentElement, {
220
- attributes: !0,
221
- attributeFilter: ["data-theme"]
222
- }), () => g.disconnect();
223
- }, [s]);
224
- const p = () => i?.(), N = (u) => {
225
- u.key === "Enter" && i?.();
226
- };
227
- return /* @__PURE__ */ v(
228
- "header",
229
- {
230
- className: [
231
- "fixed inset-x-0 top-0 z-[1000] w-full backdrop-blur-[12px]",
232
- h
233
- ].filter(Boolean).join(" "),
234
- children: [
235
- /* @__PURE__ */ e("div", { className: "h-0.5 w-full bg-[var(--md-primary)]" }),
236
- /* @__PURE__ */ v(
237
- "div",
238
- {
239
- className: "flex items-center justify-between px-6 py-2 shadow-[var(--shadow-sm)] max-md:flex-col max-md:gap-3 max-md:px-4 max-md:py-3",
240
- style: {
241
- color: "var(--md-on-surface)",
242
- background: `color-mix(in srgb, var(--md-surface) ${c ? "14%" : "18%"}, transparent)`,
243
- borderBottom: `1px solid color-mix(in srgb, var(--md-outline-variant) ${c ? "22%" : "30%"}, transparent)`
244
- },
245
- children: [
246
- /* @__PURE__ */ v(
247
- "div",
248
- {
249
- className: "flex cursor-pointer items-center gap-3 transition-opacity duration-200 ease-in-out hover:opacity-80",
250
- onClick: i ? p : void 0,
251
- onKeyDown: i ? N : void 0,
252
- role: i ? "button" : void 0,
253
- tabIndex: i ? 0 : void 0,
254
- children: [
255
- x && /* @__PURE__ */ v("div", { className: "flex h-16 w-16 shrink-0 items-center justify-center", children: [
256
- /* @__PURE__ */ e(
257
- "img",
258
- {
259
- alt: r,
260
- className: "h-full w-full object-contain",
261
- onError: (u) => {
262
- u.target.style.display = "none";
263
- const g = u.target.nextElementSibling;
264
- g && (g.style.display = "block");
265
- },
266
- src: x
267
- }
268
- ),
269
- /* @__PURE__ */ v(
270
- "svg",
271
- {
272
- className: "hidden h-full w-full",
273
- fill: "none",
274
- stroke: "currentColor",
275
- strokeWidth: "2",
276
- viewBox: "0 0 24 24",
277
- children: [
278
- /* @__PURE__ */ e("path", { d: "M12 2L2 7l10 5 10-5-10-5z" }),
279
- /* @__PURE__ */ e("path", { d: "M2 17l10 5 10-5M2 12l10 5 10-5" })
280
- ]
281
- }
282
- )
283
- ] }),
284
- (n || o) && /* @__PURE__ */ v("div", { className: "flex flex-col gap-1", children: [
285
- n && /* @__PURE__ */ e(
286
- "h1",
287
- {
288
- className: "m-0 inline-flex items-baseline text-[1.375rem] font-bold leading-[1.2] tracking-[0.05em] text-[var(--md-on-surface)] max-md:text-xl",
289
- style: { fontFamily: '"Orbitron", sans-serif' },
290
- children: n
291
- }
292
- ),
293
- o && /* @__PURE__ */ e("p", { className: "m-0 text-[0.8125rem] font-normal text-[var(--md-on-surface-variant)] max-md:text-xs", children: o })
294
- ] })
295
- ]
296
- }
297
- ),
298
- d && /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-3 max-md:w-full max-md:flex-wrap max-md:justify-between", children: d })
299
- ]
300
- }
301
- )
302
- ]
303
- }
304
- );
305
- }, K = ({
306
- label: t,
307
- error: a,
308
- helperText: r,
309
- leftIcon: n,
310
- rightIcon: o,
311
- fullWidth: s = !1,
312
- size: i = "md",
313
- className: d = "",
314
- id: h,
315
- ...c
316
- }) => {
317
- const l = h || `input-${Math.random().toString(36).substring(2, 9)}`, f = !!a, x = [
318
- "w-full rounded-[var(--border-radius-md)] border border-[var(--md-outline-variant)] bg-[var(--md-surface)] font-inherit text-[var(--md-on-surface)] outline-none transition-[var(--transition-all)] placeholder:text-[var(--md-on-surface-variant)] placeholder:opacity-70 hover:not-disabled:not-focus:border-[var(--border-color-hover)] focus:border-[var(--border-color-focus)] focus:[box-shadow:0_0_0_0.1875rem_rgba(47,93,140,0.15)] disabled:cursor-not-allowed disabled:bg-[var(--md-surface-container-high)] disabled:opacity-60",
319
- f ? "border-[var(--md-error)] focus:border-[var(--md-error)] focus:[box-shadow:0_0_0_0.1875rem_rgba(186,26,26,0.2)]" : "",
320
- n ? "pl-10" : "",
321
- o ? "pr-10" : "",
322
- {
323
- sm: "min-h-8 px-[var(--spacing-md)] py-[var(--spacing-sm)] text-[var(--font-size-sm)]",
324
- md: "min-h-10 px-[var(--spacing-lg)] py-[var(--spacing-md)] text-[var(--font-size-base)]",
325
- lg: "min-h-12 px-[var(--spacing-xl)] py-[var(--spacing-lg)] text-[var(--font-size-lg)]"
326
- }[i],
327
- d
328
- ].filter(Boolean).join(" ");
329
- return /* @__PURE__ */ v("div", { className: `flex flex-col gap-[var(--spacing-xs)] ${s ? "w-full" : ""}`, children: [
330
- t && /* @__PURE__ */ e(
331
- "label",
332
- {
333
- className: "text-[var(--font-size-sm)] font-[var(--font-weight-semibold)] text-[var(--md-on-surface)]",
334
- htmlFor: l,
335
- children: t
336
- }
337
- ),
338
- /* @__PURE__ */ v("div", { className: "group relative flex w-full items-center", children: [
339
- n && /* @__PURE__ */ e("span", { className: "pointer-events-none absolute left-[var(--spacing-md)] z-[1] flex items-center justify-center text-[var(--md-on-surface-variant)] group-focus-within:text-[var(--md-primary)] [&_svg]:h-[1.125rem] [&_svg]:w-[1.125rem]", children: n }),
340
- /* @__PURE__ */ e(
341
- "input",
342
- {
343
- "aria-describedby": a ? `${l}-error` : r ? `${l}-helper` : void 0,
344
- "aria-invalid": f ? !0 : void 0,
345
- className: x,
346
- id: l,
347
- ...c
348
- }
349
- ),
350
- o && /* @__PURE__ */ e("span", { className: "pointer-events-none absolute right-[var(--spacing-md)] z-[1] flex items-center justify-center text-[var(--md-on-surface-variant)] group-focus-within:text-[var(--md-primary)] [&_svg]:h-[1.125rem] [&_svg]:w-[1.125rem]", children: o })
351
- ] }),
352
- a && /* @__PURE__ */ e(
353
- "span",
354
- {
355
- className: "mt-[var(--spacing-xs)] block text-[var(--font-size-xs)] text-[var(--md-error)]",
356
- id: `${l}-error`,
357
- role: "alert",
358
- children: a
359
- }
360
- ),
361
- r && !a && /* @__PURE__ */ e(
362
- "span",
363
- {
364
- className: "mt-[var(--spacing-xs)] block text-[var(--font-size-xs)] text-[var(--md-on-surface-variant)]",
365
- id: `${l}-helper`,
366
- children: r
367
- }
368
- )
369
- ] });
370
- }, R = ({
371
- isOpen: t,
372
- onClose: a,
373
- title: r,
374
- subtitle: n,
375
- children: o,
376
- size: s = "md",
377
- showCloseButton: i = !0,
378
- closeOnOverlayClick: d = !0,
379
- className: h = ""
380
- }) => {
381
- if (b(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
382
- document.body.style.overflow = "";
383
- }), [t]), b(() => {
384
- const m = (x) => {
385
- x.key === "Escape" && t && a();
386
- };
387
- return t && document.addEventListener("keydown", m), () => document.removeEventListener("keydown", m);
388
- }, [t, a]), !t)
389
- return null;
390
- const c = (m) => {
391
- d && m.target === m.currentTarget && a();
392
- }, f = [
393
- "relative z-[var(--z-index-modal)] m-auto flex w-full max-h-[90vh] max-w-full flex-col overflow-hidden rounded-[var(--border-radius-2xl)] border border-[var(--md-outline-variant)] bg-[var(--md-surface)] shadow-[var(--shadow-2xl)]",
394
- {
395
- sm: "max-w-[25rem]",
396
- md: "max-w-[31.25rem]",
397
- lg: "max-w-[43.75rem]",
398
- xl: "max-w-[56.25rem]",
399
- full: "max-h-[90vh] max-w-[90vw]"
400
- }[s],
401
- h
402
- ].filter(Boolean).join(" ");
403
- return /* @__PURE__ */ e(
404
- "div",
405
- {
406
- "aria-labelledby": r ? "modal-title" : void 0,
407
- "aria-modal": "true",
408
- className: "fixed inset-0 z-[var(--z-index-modal-backdrop)] flex min-h-[100dvh] items-center justify-center overflow-y-auto bg-black/50 p-[var(--spacing-lg)] backdrop-blur-[8px]",
409
- onClick: c,
410
- role: "dialog",
411
- children: /* @__PURE__ */ v("div", { className: f, children: [
412
- (r || n || i) && /* @__PURE__ */ v("div", { className: "flex shrink-0 items-start justify-between gap-[var(--spacing-lg)] border-b border-[var(--md-outline-variant)] p-[var(--spacing-2xl)]", children: [
413
- (r || n) && /* @__PURE__ */ v("div", { className: "flex-1", children: [
414
- r && /* @__PURE__ */ e(
415
- "h2",
416
- {
417
- className: "mb-[var(--spacing-xs)] mt-0 text-[var(--font-size-2xl)] font-[var(--font-weight-semibold)] leading-[var(--line-height-tight)] text-[var(--md-on-surface)]",
418
- id: "modal-title",
419
- children: r
420
- }
421
- ),
422
- n && /* @__PURE__ */ e("p", { className: "m-0 text-[var(--font-size-base)] leading-[var(--line-height-normal)] text-[var(--md-on-surface-variant)]", children: n })
423
- ] }),
424
- i && /* @__PURE__ */ e(
425
- "button",
426
- {
427
- "aria-label": "Fechar modal",
428
- className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-[var(--border-radius-md)] border-0 bg-[var(--md-surface-container-high)] text-[var(--md-on-surface)] transition-[var(--transition-all)] hover:bg-[color:color-mix(in_srgb,var(--md-error)_15%,var(--md-surface))] hover:text-[var(--md-error)]",
429
- onClick: a,
430
- type: "button",
431
- children: /* @__PURE__ */ v(
432
- "svg",
433
- {
434
- fill: "none",
435
- className: "h-5 w-5",
436
- stroke: "currentColor",
437
- strokeWidth: "2",
438
- viewBox: "0 0 24 24",
439
- children: [
440
- /* @__PURE__ */ e("line", { x1: "18", x2: "6", y1: "6", y2: "18" }),
441
- /* @__PURE__ */ e("line", { x1: "6", x2: "18", y1: "6", y2: "18" })
442
- ]
443
- }
444
- )
445
- }
446
- )
447
- ] }),
448
- /* @__PURE__ */ e("div", { className: "flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto p-[var(--spacing-2xl)]", children: o })
449
- ] })
450
- }
451
- );
452
- }, D = ({
453
- as: t = "p",
454
- size: a = "md",
455
- weight: r = "normal",
456
- align: n = "left",
457
- muted: o = !1,
458
- italic: s = !1,
459
- children: i,
460
- className: d = "",
461
- ...h
462
- }) => {
463
- const c = t, l = {
464
- xs: "text-[var(--font-size-xs)] leading-[var(--line-height-normal)]",
465
- sm: "text-[var(--font-size-sm)] leading-[var(--line-height-normal)]",
466
- md: "text-[var(--font-size-base)] leading-[var(--line-height-relaxed)]",
467
- lg: "text-[var(--font-size-lg)] leading-[var(--line-height-loose)]"
468
- }, f = {
469
- light: "font-[var(--font-weight-light)]",
470
- normal: "font-[var(--font-weight-normal)]",
471
- medium: "font-[var(--font-weight-medium)]"
472
- }, m = {
473
- left: "text-left",
474
- center: "text-center",
475
- right: "text-right",
476
- justify: "text-justify"
477
- }, x = [
478
- "m-0 text-[var(--text-primary)] transition-[var(--transition-colors)]",
479
- l[a],
480
- f[r],
481
- m[n],
482
- s ? "italic" : "not-italic",
483
- o ? "text-[var(--text-muted)]" : "",
484
- d
485
- ].filter(Boolean).join(" ");
486
- return /* @__PURE__ */ e(c, { className: x, ...h, children: i });
487
- }, H = ({
488
- as: t = "p",
489
- size: a = "md",
490
- weight: r = "normal",
491
- align: n = "left",
492
- muted: o = !1,
493
- italic: s = !1,
494
- children: i,
495
- className: d = "",
496
- ...h
497
- }) => {
498
- const c = t, l = {
499
- xs: "text-[var(--font-size-xs)]",
500
- sm: "text-[var(--font-size-sm)]",
501
- md: "text-[var(--font-size-base)]",
502
- lg: "text-[var(--font-size-lg)]"
503
- }, f = {
504
- normal: "font-[var(--font-weight-normal)]",
505
- medium: "font-[var(--font-weight-medium)]",
506
- semibold: "font-[var(--font-weight-semibold)]"
507
- }, m = {
508
- left: "text-left",
509
- center: "text-center",
510
- right: "text-right"
511
- }, x = [
512
- "m-0 leading-[var(--line-height-normal)] text-[var(--text-secondary)] transition-[var(--transition-colors)]",
513
- l[a],
514
- f[r],
515
- m[n],
516
- s ? "italic" : "not-italic",
517
- o ? "text-[var(--text-muted)] opacity-80" : "",
518
- d
519
- ].filter(Boolean).join(" ");
520
- return /* @__PURE__ */ e(c, { className: x, ...h, children: i });
521
- }, O = ({
522
- as: t = "h1",
523
- size: a = "2xl",
524
- weight: r = "bold",
525
- align: n = "left",
526
- gradient: o = !1,
527
- italic: s = !1,
528
- children: i,
529
- className: d = "",
530
- ...h
531
- }) => {
532
- const c = t, l = {
533
- xs: "text-[var(--font-size-sm)]",
534
- sm: "text-[var(--font-size-base)]",
535
- md: "text-[var(--font-size-lg)]",
536
- lg: "text-[var(--font-size-xl)]",
537
- xl: "text-[var(--font-size-2xl)]",
538
- "2xl": "text-[var(--font-size-3xl)]",
539
- "3xl": "text-[var(--font-size-4xl)]",
540
- "4xl": "text-[3rem]"
541
- }, f = {
542
- light: "font-[var(--font-weight-light)]",
543
- normal: "font-[var(--font-weight-normal)]",
544
- medium: "font-[var(--font-weight-medium)]",
545
- semibold: "font-[var(--font-weight-semibold)]",
546
- bold: "font-[var(--font-weight-bold)]",
547
- extrabold: "font-extrabold"
548
- }, m = {
549
- left: "text-left",
550
- center: "text-center",
551
- right: "text-right"
552
- }, x = o ? "bg-[linear-gradient(135deg,var(--text-primary)_0%,var(--primary-color)_50%,var(--secondary-color)_100%)] bg-clip-text text-transparent" : "", p = [
553
- "m-0 leading-[var(--line-height-tight)] text-[var(--text-primary)] transition-[var(--transition-colors)]",
554
- l[a],
555
- f[r],
556
- m[n],
557
- s ? "italic" : "not-italic",
558
- x,
559
- d
560
- ].filter(Boolean).join(" ");
561
- return /* @__PURE__ */ e(c, { className: p, ...h, children: i });
562
- }, j = P(void 0), Y = () => {
563
- const t = $(j);
564
- if (!t)
565
- throw new Error("useTheme must be used within a ThemeProvider");
566
- return t;
567
- }, q = ({
568
- children: t,
569
- defaultTheme: a = "light"
570
- }) => {
571
- const [r, n] = z(() => typeof window > "u" ? a : window.localStorage.getItem("theme") || a);
572
- b(() => {
573
- typeof window > "u" || (window.localStorage.setItem("theme", r), document.documentElement.setAttribute("data-theme", r));
574
- }, [r]);
575
- const o = () => {
576
- n((s) => s === "dark" ? "light" : "dark");
577
- };
578
- return /* @__PURE__ */ e(j.Provider, { value: { theme: r, toggleTheme: o }, children: t });
579
- };
580
- export {
581
- W as Button,
582
- F as Card,
583
- A as Footer,
584
- V as Header,
585
- K as Input,
586
- R as Modal,
587
- D as Paragraph,
588
- H as Subtitle,
589
- q as ThemeProvider,
590
- O as Title,
591
- Y as useTheme
592
- };
593
- //# sourceMappingURL=oficios-ui.js.map