@wrrdev/fenix-ui 1.0.3 → 1.0.5

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.
package/README.md CHANGED
@@ -18,8 +18,8 @@ import { FenixUI } from '@wrrdev/fenix-ui'; // API de tema/tokens (índice)
18
18
  FenixUI.theme('dark');
19
19
  ```
20
20
 
21
- > 📦 npm: [`@wrrdev/fenix-ui`](https://www.npmjs.com/package/@wrrdev/fenix-ui) — **v1.0.3**, acesso público.
22
- > Subpaths disponíveis: `./theme`, `./tokens`, `./button`, `./badge`, `./spinner`, `./select`, `./input`, `./switch`, `./textarea`, `./checkbox`, `./radio`, `./calendar`, `./datepicker`, `./multiselect`, `./table`, `./floatlabel`, `./dialog`, `./toast`, `./tooltip`, `./tabs`, `./progress`, `./skeleton`, `./alert`, `./drawer`, `./dropdown`, `./sidebar`, `./pagination`, `./autocomplete`, `./auto-import` e o curinga `./components/*`.
21
+ > 📦 npm: [`@wrrdev/fenix-ui`](https://www.npmjs.com/package/@wrrdev/fenix-ui) — **v1.0.5**, acesso público.
22
+ > Subpaths disponíveis: `./theme`, `./tokens`, `./jsx`, `./vue`, `./button`, `./badge`, `./spinner`, `./select`, `./input`, `./switch`, `./textarea`, `./checkbox`, `./radio`, `./calendar`, `./datepicker`, `./multiselect`, `./table`, `./floatlabel`, `./dialog`, `./toast`, `./tooltip`, `./tabs`, `./progress`, `./skeleton`, `./alert`, `./drawer`, `./dropdown`, `./sidebar`, `./pagination`, `./autocomplete`, `./auto-import` e o curinga `./components/*`.
23
23
 
24
24
 
25
25
  ## Consumo
@@ -65,7 +65,7 @@ Carregue o bundle **UMD** único: ele registra todos os componentes e expõe os
65
65
  <fx-toast></fx-toast>
66
66
 
67
67
  <!--
68
- 🔗 Links diretos para CDN (versão 1.0.3):
68
+ 🔗 Links diretos para CDN (versão 1.0.5):
69
69
  • https://cdn.jsdelivr.net/npm/@wrrdev/fenix-ui@latest/dist/fenix-ui.umd.min.js
70
70
  • https://unpkg.com/@wrrdev/fenix-ui@latest/dist/fenix-ui.umd.min.js
71
71
  -->
@@ -165,6 +165,120 @@ FenixUI.resetTheme();
165
165
  Os tokens viram CSS Custom Properties (`--fx-color-primary`, `--fx-radius-md`, …) no `:root`,
166
166
  atravessando o Shadow DOM. Todo componente reage automaticamente.
167
167
 
168
+ ### Configuração completa (`FenixUI.configure`)
169
+
170
+ Alternativa a chamar `theme()`/`setTokens()` separadamente — define tema e tokens numa chamada só:
171
+
172
+ ```ts
173
+ import { FenixUI } from '@wrrdev/fenix-ui';
174
+
175
+ FenixUI.configure({
176
+ theme: 'light', // 'light' | 'dark'
177
+ tokens: {
178
+ color: {
179
+ primary: '#0d9488', // sobrescreve apenas o primary (merge profundo)
180
+ },
181
+ effect: {
182
+ ripple: '1', // '0' desativa o ripple do fx-button
183
+ 'focus-ring': 'none', // campos sem anel de foco/sobra
184
+ },
185
+ },
186
+ });
187
+ ```
188
+
189
+ Grupos de tokens disponíveis: `color`, `surface`, `text`, `border`, `font`, `space`,
190
+ `radius`, `size`, `shadow`, `motion`, `effect` e `z` (veja `@wrrdev/fenix-ui/tokens`).
191
+
192
+ ### Presets prontos (temas padrão)
193
+
194
+ O FenixUI já vem com temas prontos — **não é preciso definir nada**. Basta aplicar:
195
+
196
+ ```ts
197
+ import { applyPreset } from '@wrrdev/fenix-ui';
198
+
199
+ applyPreset('seiya'); // aplica o preset Seiya em modo claro
200
+ applyPreset('shiryu', 'dark'); // preset + modo escuro
201
+ ```
202
+
203
+ Presets disponíveis: `fenix` (padrão), `seiya`, `shiryu`, `hyoga`, `shun`, `ikki`, `aiolia`.
204
+
205
+ ```ts
206
+ import { listPresets } from '@wrrdev/fenix-ui';
207
+
208
+ listPresets(); // [{ name, label, tokens }, ...] — inclui os presets customizados
209
+ ```
210
+
211
+ **Criando seu próprio preset** (fica registrado junto aos padrões):
212
+
213
+ ```ts
214
+ import { defineCustomPreset, applyPreset } from '@wrrdev/fenix-ui';
215
+
216
+ defineCustomPreset('minha-marca', 'Minha Marca', {
217
+ color: { primary: '#7c3aed', secondary: '#a78bfa' },
218
+ radius: { md: '14px' },
219
+ });
220
+
221
+ applyPreset('minha-marca'); // ✅ disponível como qualquer preset nativo
222
+ ```
223
+
224
+ **Sobrescrevendo apenas uma config de um preset** (merge profundo — o restante herda):
225
+
226
+ ```ts
227
+ import { applyPreset, FenixUI } from '@wrrdev/fenix-ui';
228
+
229
+ applyPreset('shiryu', 'dark'); // aplica o tema base
230
+ FenixUI.setTokens({ color: { primary: '#0ea5e9' } }); // sobrescreve só o primary
231
+ ```
232
+
233
+ > Presets sobrescrevem **apenas** os tokens informados — o restante herda do tema base (claro/escuro).
234
+
235
+ ### Tipagem / autocomplete no TypeScript
236
+
237
+ A partir da v1.x, importar a lib (ou o subpath `@wrrdev/fenix-ui/jsx`) habilita no TypeScript:
238
+
239
+ - **autocomplete + validação de atributos** de `fx-*` em TSX/JSX (React, Preact, Vue JSX);
240
+ - tipos nomeados por componente (`FxButtonProps`, `FxInputProps`, …) e uniões (`FxSize`, `FxButtonVariant`, …);
241
+ - tipagem imperativa de `document.createElement('fx-button')` via `HTMLElementTagNameMap`.
242
+
243
+ ```tsx
244
+ import '@wrrdev/fenix-ui'; // registra componentes + habilita as tipagens JSX
245
+
246
+ <fx-button variant="primary" size="lg" loading>Salvar</fx-button>
247
+ ```
248
+
249
+ Se o autocomplete ainda não aparecer, garanta que o `tsconfig` do seu projeto tem
250
+ `"moduleResolution": "bundler"` (ou `"node16"`/`"nodenext"`) para resolver os `exports` do pacote.
251
+
252
+ #### Vue 3 (templates SFC / Volar)
253
+
254
+ No Vue, o autocomplete dos atributos `fx-*` nos templates é habilitado por um módulo próprio.
255
+ Importe o subpath `./vue` **uma única vez** no `main.ts`:
256
+
257
+ ```ts
258
+ import '@wrrdev/fenix-ui/vue'; // habilita autocomplete de fx-* nos templates SFC
259
+ ```
260
+
261
+ Requisitos:
262
+
263
+ - `vue` ≥ 3.5 (usa `IntrinsicElementAttributes`);
264
+ - Volar / vue-tsc (já incluído no `@vue/language-tools` usado pelo VS Code + Volar);
265
+ - no `tsconfig`, `"moduleResolution": "bundler"`.
266
+
267
+ Com isso o editor mostra as propriedades de cada componente (`variant`, `size`, `loading`, …)
268
+ nos templates. Para além do autocomplete, **validar** valores inválidos (ex.: `variant="foo"`),
269
+ ative o modo estrito do Volar no `tsconfig.json`:
270
+
271
+ ```jsonc
272
+ {
273
+ "vueCompilerOptions": {
274
+ "strictTemplates": true
275
+ }
276
+ }
277
+ ```
278
+
279
+ > Sem `strictTemplates`, o Vue não reporta atributos desconhecidos de elementos nativos
280
+ > (comportamento padrão do Volar) — mas o autocomplete das propriedades continua funcionando.
281
+
168
282
  ## Componentes (fase 1)
169
283
 
170
284
  | Elemento | Atributos principais | Slots |
@@ -0,0 +1,281 @@
1
+ /**
2
+ * Tipagens de propriedades + augmentations JSX do FenixUI.
3
+ *
4
+ * Importar este módulo — diretamente (`@wrrdev/fenix-ui/jsx`) ou via o
5
+ * índice principal (`@wrrdev/fenix-ui`) — habilita, no TypeScript:
6
+ *
7
+ * 1. autocomplete + validação de atributos em templates JSX/TSX;
8
+ * 2. tipos nomeados (`FxButtonProps`, `FxInputProps`, …) para wrappers ou código imperativo.
9
+ *
10
+ * A biblioteca NÃO depende de React/Vue: os atributos comuns
11
+ * (`className`, `onClick`, `style`, `children`, …) são aceitos via assinatura
12
+ * de índice, funcionando com qualquer runtime JSX.
13
+ */
14
+ import type { FxElementProps, FxSize } from './types';
15
+ /** Marcador de runtime: permite `import '@wrrdev/fenix-ui/jsx'` como side-effect import. */
16
+ export declare const FX_JSX_TYPES: true;
17
+ export type FxButtonVariant = 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'ghost' | 'outline';
18
+ export type FxBadgeVariant = 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info';
19
+ export type FxAlertVariant = 'info' | 'success' | 'warning' | 'danger';
20
+ export type FxProgressVariant = 'primary' | 'success' | 'warning' | 'danger';
21
+ export type FxSkeletonVariant = 'text' | 'circle' | 'rect';
22
+ export type FxFloatlabelVariant = 'on' | 'in' | 'over';
23
+ export type FxInputType = 'text' | 'number' | 'email' | 'password' | 'search' | 'tel' | 'url';
24
+ export type FxFieldStatus = 'error' | 'invalid' | 'success' | 'valid';
25
+ export type FxToastKind = 'success' | 'error' | 'info' | 'warning';
26
+ export type FxToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
27
+ export type FxTooltipPosition = 'top' | 'bottom' | 'left' | 'right';
28
+ export type FxDrawerPosition = 'left' | 'right' | 'top' | 'bottom';
29
+ export type FxDropdownPosition = 'left' | 'center' | 'right' | 'bottom-left' | 'bottom-right';
30
+ export type FxPaginationPosition = 'left' | 'center' | 'right';
31
+ export interface FxButtonProps extends FxElementProps {
32
+ variant?: FxButtonVariant;
33
+ type?: 'button' | 'submit' | 'reset';
34
+ size?: FxSize;
35
+ loading?: boolean;
36
+ full?: boolean;
37
+ }
38
+ export interface FxBadgeProps extends FxElementProps {
39
+ variant?: FxBadgeVariant;
40
+ round?: boolean;
41
+ }
42
+ export interface FxSpinnerProps extends FxElementProps {
43
+ size?: FxSize;
44
+ }
45
+ export interface FxInputProps extends FxElementProps {
46
+ type?: FxInputType;
47
+ size?: FxSize;
48
+ placeholder?: string;
49
+ readonly?: boolean;
50
+ min?: string | number;
51
+ max?: string | number;
52
+ step?: string | number;
53
+ clearable?: boolean;
54
+ error?: boolean;
55
+ invalid?: boolean;
56
+ success?: boolean;
57
+ valid?: boolean;
58
+ }
59
+ export interface FxSelectProps extends FxElementProps {
60
+ value?: string;
61
+ size?: FxSize;
62
+ placeholder?: string;
63
+ searchable?: boolean;
64
+ clearable?: boolean;
65
+ 'search-placeholder'?: string;
66
+ 'no-results'?: string;
67
+ error?: boolean;
68
+ invalid?: boolean;
69
+ success?: boolean;
70
+ valid?: boolean;
71
+ }
72
+ export interface FxSwitchProps extends FxElementProps {
73
+ checked?: boolean;
74
+ size?: FxSize;
75
+ }
76
+ export interface FxCheckboxProps extends FxElementProps {
77
+ checked?: boolean;
78
+ indeterminate?: boolean;
79
+ value?: string;
80
+ size?: FxSize;
81
+ }
82
+ export interface FxRadioProps extends FxElementProps {
83
+ checked?: boolean;
84
+ value?: string;
85
+ name?: string;
86
+ size?: FxSize;
87
+ }
88
+ export interface FxTextareaProps extends FxElementProps {
89
+ value?: string;
90
+ size?: FxSize;
91
+ placeholder?: string;
92
+ readonly?: boolean;
93
+ rows?: number;
94
+ maxlength?: number;
95
+ error?: boolean;
96
+ invalid?: boolean;
97
+ success?: boolean;
98
+ valid?: boolean;
99
+ }
100
+ export interface FxMultiselectProps extends FxElementProps {
101
+ values?: string;
102
+ size?: FxSize;
103
+ placeholder?: string;
104
+ searchable?: boolean;
105
+ clearable?: boolean;
106
+ open?: boolean;
107
+ error?: boolean;
108
+ invalid?: boolean;
109
+ success?: boolean;
110
+ valid?: boolean;
111
+ }
112
+ export interface FxCalendarProps extends FxElementProps {
113
+ value?: string;
114
+ start?: string;
115
+ end?: string;
116
+ min?: string;
117
+ max?: string;
118
+ mode?: 'single' | 'range' | 'multiple';
119
+ values?: string;
120
+ locale?: string;
121
+ disabled?: boolean;
122
+ }
123
+ export interface FxDatepickerProps extends FxElementProps {
124
+ value?: string;
125
+ start?: string;
126
+ end?: string;
127
+ values?: string;
128
+ mode?: 'single' | 'range' | 'multiple';
129
+ min?: string;
130
+ max?: string;
131
+ placeholder?: string;
132
+ size?: FxSize;
133
+ format?: string;
134
+ 'show-time'?: boolean;
135
+ 'free-text'?: boolean;
136
+ clearable?: boolean;
137
+ error?: boolean;
138
+ invalid?: boolean;
139
+ success?: boolean;
140
+ valid?: boolean;
141
+ }
142
+ export interface FxTableProps extends FxElementProps {
143
+ pagination?: boolean;
144
+ rows?: number;
145
+ 'rows-options'?: string;
146
+ striped?: boolean;
147
+ 'empty-message'?: string;
148
+ 'pagination-position'?: FxPaginationPosition;
149
+ total?: number;
150
+ page?: number;
151
+ }
152
+ export interface FxFloatlabelProps extends FxElementProps {
153
+ variant?: FxFloatlabelVariant;
154
+ error?: boolean;
155
+ invalid?: boolean;
156
+ success?: boolean;
157
+ valid?: boolean;
158
+ active?: boolean;
159
+ 'error-text'?: string;
160
+ }
161
+ export interface FxDialogProps extends FxElementProps {
162
+ open?: boolean;
163
+ size?: FxSize;
164
+ heading?: string;
165
+ }
166
+ export interface FxDrawerProps extends FxElementProps {
167
+ open?: boolean;
168
+ title?: string;
169
+ position?: FxDrawerPosition;
170
+ }
171
+ export interface FxToastProps extends FxElementProps {
172
+ kind?: FxToastKind;
173
+ title?: string;
174
+ message?: string;
175
+ duration?: number;
176
+ position?: FxToastPosition;
177
+ }
178
+ export interface FxTooltipProps extends FxElementProps {
179
+ content?: string;
180
+ position?: FxTooltipPosition;
181
+ }
182
+ export interface FxTabsProps extends FxElementProps {
183
+ value?: string;
184
+ }
185
+ export interface FxTabPanelProps extends FxElementProps {
186
+ tab?: string;
187
+ hidden?: boolean;
188
+ }
189
+ export interface FxProgressProps extends FxElementProps {
190
+ value?: number;
191
+ indeterminate?: boolean;
192
+ variant?: FxProgressVariant;
193
+ label?: string;
194
+ 'hide-label'?: boolean;
195
+ size?: FxSize;
196
+ }
197
+ export interface FxSkeletonProps extends FxElementProps {
198
+ variant?: FxSkeletonVariant;
199
+ width?: string;
200
+ height?: string;
201
+ lines?: number;
202
+ }
203
+ export interface FxAlertProps extends FxElementProps {
204
+ variant?: FxAlertVariant;
205
+ title?: string;
206
+ dismissible?: boolean;
207
+ }
208
+ export interface FxDropdownProps extends FxElementProps {
209
+ label?: string;
210
+ position?: FxDropdownPosition;
211
+ open?: boolean;
212
+ }
213
+ export interface FxDropdownItemProps extends FxElementProps {
214
+ value?: string;
215
+ }
216
+ export interface FxPaginationProps extends FxElementProps {
217
+ page?: number;
218
+ total?: number;
219
+ rows?: number;
220
+ 'rows-options'?: string;
221
+ position?: FxPaginationPosition;
222
+ }
223
+ export interface FxAutocompleteProps extends FxElementProps {
224
+ value?: string;
225
+ size?: FxSize;
226
+ placeholder?: string;
227
+ source?: string;
228
+ disabled?: boolean;
229
+ 'min-chars'?: number;
230
+ }
231
+ declare global {
232
+ namespace JSX {
233
+ interface IntrinsicElements {
234
+ 'fx-button': FxButtonProps;
235
+ 'fx-badge': FxBadgeProps;
236
+ 'fx-spinner': FxSpinnerProps;
237
+ 'fx-input': FxInputProps;
238
+ 'fx-select': FxSelectProps;
239
+ 'fx-switch': FxSwitchProps;
240
+ 'fx-checkbox': FxCheckboxProps;
241
+ 'fx-radio': FxRadioProps;
242
+ 'fx-textarea': FxTextareaProps;
243
+ 'fx-multiselect': FxMultiselectProps;
244
+ 'fx-calendar': FxCalendarProps;
245
+ 'fx-datepicker': FxDatepickerProps;
246
+ 'fx-table': FxTableProps;
247
+ 'fx-floatlabel': FxFloatlabelProps;
248
+ 'fx-dialog': FxDialogProps;
249
+ 'fx-drawer': FxDrawerProps;
250
+ 'fx-toast': FxToastProps;
251
+ 'fx-tooltip': FxTooltipProps;
252
+ 'fx-tabs': FxTabsProps;
253
+ 'fx-tab-panel': FxTabPanelProps;
254
+ 'fx-progress': FxProgressProps;
255
+ 'fx-skeleton': FxSkeletonProps;
256
+ 'fx-alert': FxAlertProps;
257
+ 'fx-dropdown': FxDropdownProps;
258
+ 'fx-dropdown-item': FxDropdownItemProps;
259
+ 'fx-pagination': FxPaginationProps;
260
+ 'fx-autocomplete': FxAutocompleteProps;
261
+ }
262
+ }
263
+ }
264
+ declare global {
265
+ interface HTMLElementTagNameMap {
266
+ 'fx-button': HTMLElement;
267
+ 'fx-badge': HTMLElement;
268
+ 'fx-spinner': HTMLElement;
269
+ 'fx-input': HTMLElement;
270
+ 'fx-select': HTMLElement;
271
+ 'fx-switch': HTMLElement;
272
+ 'fx-checkbox': HTMLElement;
273
+ 'fx-radio': HTMLElement;
274
+ 'fx-multiselect': HTMLElement;
275
+ 'fx-calendar': HTMLElement;
276
+ 'fx-datepicker': HTMLElement;
277
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,iBAAiB,CAAC;YACnC,WAAW,EAAE,aAAa,CAAC;YAC3B,WAAW,EAAE,aAAa,CAAC;YAC3B,UAAU,EAAE,YAAY,CAAC;YACzB,YAAY,EAAE,cAAc,CAAC;YAC7B,SAAS,EAAE,WAAW,CAAC;YACvB,cAAc,EAAE,eAAe,CAAC;YAChC,aAAa,EAAE,eAAe,CAAC;YAC/B,aAAa,EAAE,eAAe,CAAC;YAC/B,UAAU,EAAE,YAAY,CAAC;YACzB,aAAa,EAAE,eAAe,CAAC;YAC/B,kBAAkB,EAAE,mBAAmB,CAAC;YACxC,eAAe,EAAE,iBAAiB,CAAC;YACnC,iBAAiB,EAAE,mBAAmB,CAAC;SACxC;KACF;CACF;AAOD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,WAAW,CAAC;QACzB,UAAU,EAAE,WAAW,CAAC;QACxB,YAAY,EAAE,WAAW,CAAC;QAC1B,UAAU,EAAE,WAAW,CAAC;QACxB,WAAW,EAAE,WAAW,CAAC;QACzB,WAAW,EAAE,WAAW,CAAC;QACzB,aAAa,EAAE,WAAW,CAAC;QAC3B,UAAU,EAAE,WAAW,CAAC;QACxB,gBAAgB,EAAE,WAAW,CAAC;QAC9B,aAAa,EAAE,WAAW,CAAC;QAC3B,eAAe,EAAE,WAAW,CAAC;QAC7B,UAAU,EAAE,WAAW,CAAC;QACxB,eAAe,EAAE,WAAW,CAAC;KAC9B;CACF"}
@@ -0,0 +1,5 @@
1
+ const FX_JSX_TYPES = true;
2
+ export {
3
+ FX_JSX_TYPES
4
+ };
5
+ //# sourceMappingURL=jsx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsx.js","sources":["../../src/core/jsx.ts"],"sourcesContent":["/**\r\n * Tipagens de propriedades + augmentations JSX do FenixUI.\r\n *\r\n * Importar este módulo — diretamente (`@wrrdev/fenix-ui/jsx`) ou via o\r\n * índice principal (`@wrrdev/fenix-ui`) — habilita, no TypeScript:\r\n *\r\n * 1. autocomplete + validação de atributos em templates JSX/TSX;\r\n * 2. tipos nomeados (`FxButtonProps`, `FxInputProps`, …) para wrappers ou código imperativo.\r\n *\r\n * A biblioteca NÃO depende de React/Vue: os atributos comuns\r\n * (`className`, `onClick`, `style`, `children`, …) são aceitos via assinatura\r\n * de índice, funcionando com qualquer runtime JSX.\r\n */\r\n\r\nimport type { FxElementProps, FxSize } from './types';\r\n\r\n/** Marcador de runtime: permite `import '@wrrdev/fenix-ui/jsx'` como side-effect import. */\r\nexport const FX_JSX_TYPES = true as const;\r\n\r\n/* Uniões auxiliares (variants, enums) */\r\nexport type FxButtonVariant = 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'ghost' | 'outline';\r\nexport type FxBadgeVariant = 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info';\r\nexport type FxAlertVariant = 'info' | 'success' | 'warning' | 'danger';\r\nexport type FxProgressVariant = 'primary' | 'success' | 'warning' | 'danger';\r\nexport type FxSkeletonVariant = 'text' | 'circle' | 'rect';\r\nexport type FxFloatlabelVariant = 'on' | 'in' | 'over';\r\nexport type FxInputType = 'text' | 'number' | 'email' | 'password' | 'search' | 'tel' | 'url';\r\nexport type FxFieldStatus = 'error' | 'invalid' | 'success' | 'valid';\r\nexport type FxToastKind = 'success' | 'error' | 'info' | 'warning';\r\nexport type FxToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';\r\nexport type FxTooltipPosition = 'top' | 'bottom' | 'left' | 'right';\r\nexport type FxDrawerPosition = 'left' | 'right' | 'top' | 'bottom';\r\nexport type FxDropdownPosition = 'left' | 'center' | 'right' | 'bottom-left' | 'bottom-right';\r\nexport type FxPaginationPosition = 'left' | 'center' | 'right';\r\n\r\n/* Props por componente */\r\nexport interface FxButtonProps extends FxElementProps {\r\n variant?: FxButtonVariant;\r\n type?: 'button' | 'submit' | 'reset';\r\n size?: FxSize;\r\n loading?: boolean;\r\n full?: boolean;\r\n}\r\nexport interface FxBadgeProps extends FxElementProps {\r\n variant?: FxBadgeVariant;\r\n round?: boolean;\r\n}\r\nexport interface FxSpinnerProps extends FxElementProps { size?: FxSize; }\r\nexport interface FxInputProps extends FxElementProps {\r\n type?: FxInputType;\r\n size?: FxSize;\r\n placeholder?: string;\r\n readonly?: boolean;\r\n min?: string | number;\r\n max?: string | number;\r\n step?: string | number;\r\n clearable?: boolean;\r\n error?: boolean;\r\n invalid?: boolean;\r\n success?: boolean;\r\n valid?: boolean;\r\n}\r\nexport interface FxSelectProps extends FxElementProps {\r\n value?: string;\r\n size?: FxSize;\r\n placeholder?: string;\r\n searchable?: boolean;\r\n clearable?: boolean;\r\n 'search-placeholder'?: string;\r\n 'no-results'?: string;\r\n error?: boolean;\r\n invalid?: boolean;\r\n success?: boolean;\r\n valid?: boolean;\r\n}\r\nexport interface FxSwitchProps extends FxElementProps { checked?: boolean; size?: FxSize; }\r\nexport interface FxCheckboxProps extends FxElementProps {\r\n checked?: boolean;\r\n indeterminate?: boolean;\r\n value?: string;\r\n size?: FxSize;\r\n}\r\nexport interface FxRadioProps extends FxElementProps {\r\n checked?: boolean;\r\n value?: string;\r\n name?: string;\r\n size?: FxSize;\r\n}\r\nexport interface FxTextareaProps extends FxElementProps {\r\n value?: string;\r\n size?: FxSize;\r\n placeholder?: string;\r\n readonly?: boolean;\r\n rows?: number;\r\n maxlength?: number;\r\n error?: boolean;\r\n invalid?: boolean;\r\n success?: boolean;\r\n valid?: boolean;\r\n}\r\nexport interface FxMultiselectProps extends FxElementProps {\r\n values?: string;\r\n size?: FxSize;\r\n placeholder?: string;\r\n searchable?: boolean;\r\n clearable?: boolean;\r\n open?: boolean;\r\n error?: boolean;\r\n invalid?: boolean;\r\n success?: boolean;\r\n valid?: boolean;\r\n}\r\nexport interface FxCalendarProps extends FxElementProps {\r\n value?: string;\r\n start?: string;\r\n end?: string;\r\n min?: string;\r\n max?: string;\r\n mode?: 'single' | 'range' | 'multiple';\r\n values?: string;\r\n locale?: string;\r\n disabled?: boolean;\r\n}\r\nexport interface FxDatepickerProps extends FxElementProps {\r\n value?: string;\r\n start?: string;\r\n end?: string;\r\n values?: string;\r\n mode?: 'single' | 'range' | 'multiple';\r\n min?: string;\r\n max?: string;\r\n placeholder?: string;\r\n size?: FxSize;\r\n format?: string;\r\n 'show-time'?: boolean;\r\n 'free-text'?: boolean;\r\n clearable?: boolean;\r\n error?: boolean;\r\n invalid?: boolean;\r\n success?: boolean;\r\n valid?: boolean;\r\n}\r\nexport interface FxTableProps extends FxElementProps {\r\n pagination?: boolean;\r\n rows?: number;\r\n 'rows-options'?: string;\r\n striped?: boolean;\r\n 'empty-message'?: string;\r\n 'pagination-position'?: FxPaginationPosition;\r\n total?: number;\r\n page?: number;\r\n}\r\nexport interface FxFloatlabelProps extends FxElementProps {\r\n variant?: FxFloatlabelVariant;\r\n error?: boolean;\r\n invalid?: boolean;\r\n success?: boolean;\r\n valid?: boolean;\r\n active?: boolean;\r\n 'error-text'?: string;\r\n}\r\nexport interface FxDialogProps extends FxElementProps { open?: boolean; size?: FxSize; heading?: string; }\r\nexport interface FxDrawerProps extends FxElementProps { open?: boolean; title?: string; position?: FxDrawerPosition; }\r\nexport interface FxToastProps extends FxElementProps {\r\n kind?: FxToastKind;\r\n title?: string;\r\n message?: string;\r\n duration?: number;\r\n position?: FxToastPosition;\r\n}\r\nexport interface FxTooltipProps extends FxElementProps { content?: string; position?: FxTooltipPosition; }\r\nexport interface FxTabsProps extends FxElementProps { value?: string; }\r\nexport interface FxTabPanelProps extends FxElementProps { tab?: string; hidden?: boolean; }\r\nexport interface FxProgressProps extends FxElementProps {\r\n value?: number;\r\n indeterminate?: boolean;\r\n variant?: FxProgressVariant;\r\n label?: string;\r\n 'hide-label'?: boolean;\r\n size?: FxSize;\r\n}\r\nexport interface FxSkeletonProps extends FxElementProps {\r\n variant?: FxSkeletonVariant;\r\n width?: string;\r\n height?: string;\r\n lines?: number;\r\n}\r\nexport interface FxAlertProps extends FxElementProps { variant?: FxAlertVariant; title?: string; dismissible?: boolean; }\r\nexport interface FxDropdownProps extends FxElementProps { label?: string; position?: FxDropdownPosition; open?: boolean; }\r\nexport interface FxDropdownItemProps extends FxElementProps { value?: string; }\r\nexport interface FxPaginationProps extends FxElementProps {\r\n page?: number;\r\n total?: number;\r\n rows?: number;\r\n 'rows-options'?: string;\r\n position?: FxPaginationPosition;\r\n}\r\nexport interface FxAutocompleteProps extends FxElementProps {\r\n value?: string;\r\n size?: FxSize;\r\n placeholder?: string;\r\n source?: string;\r\n disabled?: boolean;\r\n 'min-chars'?: number;\r\n}\r\n/* Augmentation global de JSX (React/TSX, Preact, Vue JSX, …).\r\n Cada tag fx-* recebe autocomplete + validação de atributos. */\r\ndeclare global {\r\n namespace JSX {\r\n interface IntrinsicElements {\r\n 'fx-button': FxButtonProps;\r\n 'fx-badge': FxBadgeProps;\r\n 'fx-spinner': FxSpinnerProps;\r\n 'fx-input': FxInputProps;\r\n 'fx-select': FxSelectProps;\r\n 'fx-switch': FxSwitchProps;\r\n 'fx-checkbox': FxCheckboxProps;\r\n 'fx-radio': FxRadioProps;\r\n 'fx-textarea': FxTextareaProps;\r\n 'fx-multiselect': FxMultiselectProps;\r\n 'fx-calendar': FxCalendarProps;\r\n 'fx-datepicker': FxDatepickerProps;\r\n 'fx-table': FxTableProps;\r\n 'fx-floatlabel': FxFloatlabelProps;\r\n 'fx-dialog': FxDialogProps;\r\n 'fx-drawer': FxDrawerProps;\r\n 'fx-toast': FxToastProps;\r\n 'fx-tooltip': FxTooltipProps;\r\n 'fx-tabs': FxTabsProps;\r\n 'fx-tab-panel': FxTabPanelProps;\r\n 'fx-progress': FxProgressProps;\r\n 'fx-skeleton': FxSkeletonProps;\r\n 'fx-alert': FxAlertProps;\r\n 'fx-dropdown': FxDropdownProps;\r\n 'fx-dropdown-item': FxDropdownItemProps;\r\n 'fx-pagination': FxPaginationProps;\r\n 'fx-autocomplete': FxAutocompleteProps;\r\n }\r\n }\r\n}\r\n\r\n/* Tipagem imperativa: document.createElement('fx-...').\r\n As tags abaixo não declaradas nos próprios componentes ganham tipagem aqui;\r\n as demais (alert, dialog, drawer, dropdown, pagination, progress, skeleton,\r\n tabs, textarea, toast, tooltip, autocomplete) já são tipadas com a classe\r\n concreta nos respectivos index.ts. */\r\ndeclare global {\r\n interface HTMLElementTagNameMap {\r\n 'fx-button': HTMLElement;\r\n 'fx-badge': HTMLElement;\r\n 'fx-spinner': HTMLElement;\r\n 'fx-input': HTMLElement;\r\n 'fx-select': HTMLElement;\r\n 'fx-switch': HTMLElement;\r\n 'fx-checkbox': HTMLElement;\r\n 'fx-radio': HTMLElement;\r\n 'fx-multiselect': HTMLElement;\r\n 'fx-calendar': HTMLElement;\r\n 'fx-datepicker': HTMLElement;\r\n 'fx-table': HTMLElement;\r\n 'fx-floatlabel': HTMLElement;\r\n }\r\n}\r\n"],"names":[],"mappings":"AAiBO,MAAM,eAAe;"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Tipos e unions compartilhados do FenixUI.
3
+ *
4
+ * Estes tipos existem apenas em tempo de compilação — não geram código
5
+ * em runtime. São reexportados pelo índice principal
6
+ * (`import type { FxSize } from '@wrrdev/fenix-ui'`).
7
+ */
8
+ /** Tema de cor suportado. */
9
+ export type FxTheme = 'light' | 'dark';
10
+ /** Tamanhos de controle suportados pela maioria dos componentes. */
11
+ export type FxSize = 'sm' | 'md' | 'lg';
12
+ /**
13
+ * Base de atributos comuns a praticamente todos os componentes FenixUI
14
+ * expostos via JSX/HTML.
15
+ *
16
+ * Possui uma assinatura de índice (`[key: string]: unknown`) para que
17
+ * atributos e eventos arbitrários — `className`, `onClick`, `style`, … —
18
+ * sejam aceitos sem erro em frameworks JSX (React/Preact/Vue), sem acoplar
19
+ * a biblioteca a nenhum deles. As propriedades explícitas abaixo são as que
20
+ * recebem autocomplete e validação.
21
+ */
22
+ export interface FxElementProps {
23
+ /** Estado desativado (equivalente ao atributo `disabled`). */
24
+ disabled?: boolean;
25
+ /** Estado de carregamento (spinner) — onde aplicável. */
26
+ loading?: boolean;
27
+ /** Largura total (equivalente ao atributo `full`, onde aplicável). */
28
+ full?: boolean;
29
+ /** Texto/label do controle. */
30
+ label?: string;
31
+ /** Texto de apoio/placeholder. */
32
+ placeholder?: string;
33
+ /** Valor do controle (string ou número). */
34
+ value?: string | number;
35
+ /** Conteúdo do slot (equivalente a `children` em React). */
36
+ children?: unknown;
37
+ /** Classes CSS externas (React) — via índice também aceita `class`. */
38
+ className?: string;
39
+ /** Estilos inline. */
40
+ style?: string | Record<string, unknown>;
41
+ /** Atributos/eventos arbitrários são aceitos via índice. */
42
+ [key: string]: unknown;
43
+ }
44
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,6BAA6B;AAC7B,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEvC,oEAAoE;AACpE,MAAM,MAAM,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAExC;;;;;;;;;GASG;AACH,MAAM,WAAW,cAAc;IAC7B,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yDAAyD;IACzD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sEAAsE;IACtE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,4DAA4D;IAC5D,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Tipagem de componentes <fx-*> para Vue 3 (Volar / vue-tsc).
3
+ *
4
+ * Este módulo é OPT-IN: importe `@wrrdev/fenix-ui/vue` uma única vez
5
+ * (ex.: no `main.ts`) para habilitar autocomplete + validação de atributos
6
+ * dos elementos `fx-*` nos templates SFC.
7
+ *
8
+ * - `IntrinsicElementAttributes` (Vue 3.5+): ponto oficial de extensão para
9
+ * elementos nativos/custom — alimenta `NativeElements` e o
10
+ * `JSX.IntrinsicElements` usado pelo Volar para tags com hífen.
11
+ * - `GlobalComponents`: registro adicional como componentes globais.
12
+ */
13
+ import type { FxAutocompleteProps, FxAlertProps, FxBadgeProps, FxButtonProps, FxCalendarProps, FxCheckboxProps, FxDatepickerProps, FxDialogProps, FxDropdownItemProps, FxDropdownProps, FxDrawerProps, FxFloatlabelProps, FxInputProps, FxMultiselectProps, FxPaginationProps, FxProgressProps, FxRadioProps, FxSelectProps, FxSkeletonProps, FxSpinnerProps, FxSwitchProps, FxTableProps, FxTabPanelProps, FxTabsProps, FxTextareaProps, FxToastProps, FxTooltipProps } from './jsx';
14
+ type FxComp<P> = import('vue').FunctionalComponent<P>;
15
+ declare module '@vue/runtime-core' {
16
+ interface GlobalComponents {
17
+ 'fx-button': FxComp<FxButtonProps>;
18
+ 'fx-badge': FxComp<FxBadgeProps>;
19
+ 'fx-spinner': FxComp<FxSpinnerProps>;
20
+ 'fx-input': FxComp<FxInputProps>;
21
+ 'fx-select': FxComp<FxSelectProps>;
22
+ 'fx-switch': FxComp<FxSwitchProps>;
23
+ 'fx-checkbox': FxComp<FxCheckboxProps>;
24
+ 'fx-radio': FxComp<FxRadioProps>;
25
+ 'fx-textarea': FxComp<FxTextareaProps>;
26
+ 'fx-multiselect': FxComp<FxMultiselectProps>;
27
+ 'fx-calendar': FxComp<FxCalendarProps>;
28
+ 'fx-datepicker': FxComp<FxDatepickerProps>;
29
+ 'fx-table': FxComp<FxTableProps>;
30
+ 'fx-floatlabel': FxComp<FxFloatlabelProps>;
31
+ 'fx-dialog': FxComp<FxDialogProps>;
32
+ 'fx-drawer': FxComp<FxDrawerProps>;
33
+ 'fx-toast': FxComp<FxToastProps>;
34
+ 'fx-tooltip': FxComp<FxTooltipProps>;
35
+ 'fx-tabs': FxComp<FxTabsProps>;
36
+ 'fx-tab-panel': FxComp<FxTabPanelProps>;
37
+ 'fx-progress': FxComp<FxProgressProps>;
38
+ 'fx-skeleton': FxComp<FxSkeletonProps>;
39
+ 'fx-alert': FxComp<FxAlertProps>;
40
+ 'fx-dropdown': FxComp<FxDropdownProps>;
41
+ 'fx-dropdown-item': FxComp<FxDropdownItemProps>;
42
+ 'fx-pagination': FxComp<FxPaginationProps>;
43
+ 'fx-autocomplete': FxComp<FxAutocompleteProps>;
44
+ }
45
+ }
46
+ declare module '@vue/runtime-dom' {
47
+ interface IntrinsicElementAttributes {
48
+ 'fx-button': FxButtonProps;
49
+ 'fx-badge': FxBadgeProps;
50
+ 'fx-spinner': FxSpinnerProps;
51
+ 'fx-input': FxInputProps;
52
+ 'fx-select': FxSelectProps;
53
+ 'fx-switch': FxSwitchProps;
54
+ 'fx-checkbox': FxCheckboxProps;
55
+ 'fx-radio': FxRadioProps;
56
+ 'fx-textarea': FxTextareaProps;
57
+ 'fx-multiselect': FxMultiselectProps;
58
+ 'fx-calendar': FxCalendarProps;
59
+ 'fx-datepicker': FxDatepickerProps;
60
+ 'fx-table': FxTableProps;
61
+ 'fx-floatlabel': FxFloatlabelProps;
62
+ 'fx-dialog': FxDialogProps;
63
+ 'fx-drawer': FxDrawerProps;
64
+ 'fx-toast': FxToastProps;
65
+ 'fx-tooltip': FxTooltipProps;
66
+ 'fx-tabs': FxTabsProps;
67
+ 'fx-tab-panel': FxTabPanelProps;
68
+ 'fx-progress': FxProgressProps;
69
+ 'fx-skeleton': FxSkeletonProps;
70
+ 'fx-alert': FxAlertProps;
71
+ 'fx-dropdown': FxDropdownProps;
72
+ 'fx-dropdown-item': FxDropdownItemProps;
73
+ 'fx-pagination': FxPaginationProps;
74
+ 'fx-autocomplete': FxAutocompleteProps;
75
+ }
76
+ }
77
+ /** Marcador para `import '@wrrdev/fenix-ui/vue'` funcionar como side-effect import. */
78
+ export declare const FX_VUE_TYPES: true;
79
+ export {};
80
+ //# sourceMappingURL=vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vue.d.ts","sourceRoot":"","sources":["../../src/core/vue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,eAAe,EACf,cAAc,EACd,aAAa,EACb,YAAY,EACZ,eAAe,EACf,WAAW,EACX,eAAe,EACf,YAAY,EACZ,cAAc,EACf,MAAM,OAAO,CAAC;AAIf,KAAK,MAAM,CAAC,CAAC,IAAI,OAAO,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC;AAEtD,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAU,gBAAgB;QACxB,WAAW,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;QACnC,UAAU,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;QACjC,YAAY,EAAE,MAAM,CAAC,cAAc,CAAC,CAAC;QACrC,UAAU,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;QACjC,WAAW,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;QACnC,WAAW,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;QACnC,aAAa,EAAE,MAAM,CAAC,eAAe,CAAC,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aAAa,CAAC;QAC3B,aAAa,EAAE,eAAe,CAAC;QAC/B,UAAU,EAAE,YAAY,CAAC;QACzB,aAAa,EAAE,eAAe,CAAC;QAC/B,gBAAgB,EAAE,kBAAkB,CAAC;QACrC,aAAa,EAAE,eAAe,CAAC;QAC/B,eAAe,EAAE,iBAAiB,CAAC;QACnC,UAAU,EAAE,YAAY,CAAC;QACzB,eAAe,EAAE,iBAAiB,CAAC;QACnC,WAAW,EAAE,aAAa,CAAC;QAC3B,WAAW,EAAE,aAAa,CAAC;QAC3B,UAAU,EAAE,YAAY,CAAC;QACzB,YAAY,EAAE,cAAc,CAAC;QAC7B,SAAS,EAAE,WAAW,CAAC;QACvB,cAAc,EAAE,eAAe,CAAC;QAChC,aAAa,EAAE,eAAe,CAAC;QAC/B,aAAa,EAAE,eAAe,CAAC;QAC/B,UAAU,EAAE,YAAY,CAAC;QACzB,aAAa,EAAE,eAAe,CAAC;QAC/B,kBAAkB,EAAE,mBAAmB,CAAC;QACxC,eAAe,EAAE,iBAAiB,CAAC;QACnC,iBAAiB,EAAE,mBAAmB,CAAC;KACxC;CACF;AAED,uFAAuF;AACvF,eAAO,MAAM,YAAY,EAAG,IAAa,CAAC"}
@@ -0,0 +1,5 @@
1
+ const FX_VUE_TYPES = true;
2
+ export {
3
+ FX_VUE_TYPES
4
+ };
5
+ //# sourceMappingURL=vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vue.js","sources":["../../src/core/vue.ts"],"sourcesContent":["/**\n * Tipagem de componentes <fx-*> para Vue 3 (Volar / vue-tsc).\n *\n * Este módulo é OPT-IN: importe `@wrrdev/fenix-ui/vue` uma única vez\n * (ex.: no `main.ts`) para habilitar autocomplete + validação de atributos\n * dos elementos `fx-*` nos templates SFC.\n *\n * - `IntrinsicElementAttributes` (Vue 3.5+): ponto oficial de extensão para\n * elementos nativos/custom — alimenta `NativeElements` e o\n * `JSX.IntrinsicElements` usado pelo Volar para tags com hífen.\n * - `GlobalComponents`: registro adicional como componentes globais.\n */\nimport type {\n FxAutocompleteProps,\n FxAlertProps,\n FxBadgeProps,\n FxButtonProps,\n FxCalendarProps,\n FxCheckboxProps,\n FxDatepickerProps,\n FxDialogProps,\n FxDropdownItemProps,\n FxDropdownProps,\n FxDrawerProps,\n FxFloatlabelProps,\n FxInputProps,\n FxMultiselectProps,\n FxPaginationProps,\n FxProgressProps,\n FxRadioProps,\n FxSelectProps,\n FxSkeletonProps,\n FxSpinnerProps,\n FxSwitchProps,\n FxTableProps,\n FxTabPanelProps,\n FxTabsProps,\n FxTextareaProps,\n FxToastProps,\n FxTooltipProps,\n} from './jsx';\n\nimport type {} from '@vue/runtime-dom';\r\n\r\ntype FxComp<P> = import('vue').FunctionalComponent<P>;\n\ndeclare module '@vue/runtime-core' {\r\n interface GlobalComponents {\r\n 'fx-button': FxComp<FxButtonProps>;\r\n 'fx-badge': FxComp<FxBadgeProps>;\r\n 'fx-spinner': FxComp<FxSpinnerProps>;\r\n 'fx-input': FxComp<FxInputProps>;\r\n 'fx-select': FxComp<FxSelectProps>;\r\n 'fx-switch': FxComp<FxSwitchProps>;\r\n 'fx-checkbox': FxComp<FxCheckboxProps>;\r\n 'fx-radio': FxComp<FxRadioProps>;\r\n 'fx-textarea': FxComp<FxTextareaProps>;\r\n 'fx-multiselect': FxComp<FxMultiselectProps>;\r\n 'fx-calendar': FxComp<FxCalendarProps>;\r\n 'fx-datepicker': FxComp<FxDatepickerProps>;\r\n 'fx-table': FxComp<FxTableProps>;\r\n 'fx-floatlabel': FxComp<FxFloatlabelProps>;\r\n 'fx-dialog': FxComp<FxDialogProps>;\r\n 'fx-drawer': FxComp<FxDrawerProps>;\r\n 'fx-toast': FxComp<FxToastProps>;\r\n 'fx-tooltip': FxComp<FxTooltipProps>;\r\n 'fx-tabs': FxComp<FxTabsProps>;\r\n 'fx-tab-panel': FxComp<FxTabPanelProps>;\r\n 'fx-progress': FxComp<FxProgressProps>;\r\n 'fx-skeleton': FxComp<FxSkeletonProps>;\r\n 'fx-alert': FxComp<FxAlertProps>;\r\n 'fx-dropdown': FxComp<FxDropdownProps>;\r\n 'fx-dropdown-item': FxComp<FxDropdownItemProps>;\r\n 'fx-pagination': FxComp<FxPaginationProps>;\r\n 'fx-autocomplete': FxComp<FxAutocompleteProps>;\r\n }\r\n}\r\n\r\ndeclare module '@vue/runtime-dom' {\n interface IntrinsicElementAttributes {\n 'fx-button': FxButtonProps;\n 'fx-badge': FxBadgeProps;\n 'fx-spinner': FxSpinnerProps;\n 'fx-input': FxInputProps;\n 'fx-select': FxSelectProps;\n 'fx-switch': FxSwitchProps;\n 'fx-checkbox': FxCheckboxProps;\n 'fx-radio': FxRadioProps;\n 'fx-textarea': FxTextareaProps;\n 'fx-multiselect': FxMultiselectProps;\n 'fx-calendar': FxCalendarProps;\n 'fx-datepicker': FxDatepickerProps;\n 'fx-table': FxTableProps;\n 'fx-floatlabel': FxFloatlabelProps;\n 'fx-dialog': FxDialogProps;\n 'fx-drawer': FxDrawerProps;\n 'fx-toast': FxToastProps;\n 'fx-tooltip': FxTooltipProps;\n 'fx-tabs': FxTabsProps;\n 'fx-tab-panel': FxTabPanelProps;\n 'fx-progress': FxProgressProps;\n 'fx-skeleton': FxSkeletonProps;\n 'fx-alert': FxAlertProps;\n 'fx-dropdown': FxDropdownProps;\n 'fx-dropdown-item': FxDropdownItemProps;\n 'fx-pagination': FxPaginationProps;\n 'fx-autocomplete': FxAutocompleteProps;\n }\n}\n\n/** Marcador para `import '@wrrdev/fenix-ui/vue'` funcionar como side-effect import. */\nexport const FX_VUE_TYPES = true as const;\n\n"],"names":[],"mappings":"AA+GO,MAAM,eAAe;"}