@thibezer/ui-components-kit 1.0.0 → 2.0.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.
- package/CHANGELOG.md +38 -0
- package/LICENSE +21 -21
- package/README.md +739 -624
- package/dist/botao.cjs +1 -1
- package/dist/botao.js +1 -1
- package/dist/camadas.cjs +38 -38
- package/dist/camadas.js +494 -494
- package/dist/campo-texto.cjs +1 -1
- package/dist/campo-texto.js +1 -1
- package/dist/canvas.cjs +33 -33
- package/dist/canvas.js +100 -100
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/components/ui-botao/ui-botao.d.ts +15 -0
- package/dist/components/ui-campo-texto/ui-campo-texto.d.ts +5 -0
- package/dist/components/ui-modal/modal-pilha.d.ts +3 -0
- package/dist/components/ui-modal/ui-modal.d.ts +19 -4
- package/dist/components/ui-tabela/tabela-corpo.d.ts +2 -0
- package/dist/components/ui-tabela/tabela-renderizador.d.ts +1 -0
- package/dist/components/ui-tabela/tabela-selecao.d.ts +5 -0
- package/dist/components/ui-tabela/ui-tabela.d.ts +15 -0
- package/dist/components/ui-tooltip/ui-tooltip.d.ts +15 -0
- package/dist/core/form-submissao.d.ts +16 -0
- package/dist/core/parts.d.ts +6 -0
- package/dist/core/rotulo.d.ts +6 -0
- package/dist/core/ui-bus.d.ts +13 -2
- package/dist/core.cjs +1 -1
- package/dist/core.js +2 -2
- package/dist/custom-elements.json +28789 -0
- package/dist/data.cjs +1 -1
- package/dist/data.js +2 -2
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.js +3 -3
- package/dist/form-submissao-C-SPRKgT.js +61 -0
- package/dist/form-submissao-DxKO5MHI.cjs +1 -0
- package/dist/forms.cjs +1 -1
- package/dist/forms.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +13 -13
- package/dist/mapa.cjs +4 -4
- package/dist/mapa.js +1 -1
- package/dist/modal.cjs +1 -1
- package/dist/modal.js +1 -1
- package/dist/parts-CaoQiCfI.js +7 -0
- package/dist/parts-vQa2873h.cjs +1 -0
- package/dist/register.cjs +1 -1
- package/dist/register.js +12 -12
- package/dist/seletor-mapa-base.cjs +11 -11
- package/dist/seletor-mapa-base.js +37 -37
- package/dist/tabela.cjs +1 -1
- package/dist/tabela.js +1 -1
- package/dist/tipos-elementos.d.ts +1219 -0
- package/dist/tipos-react.d.ts +113 -0
- package/dist/tipos-vue.d.ts +1190 -0
- package/dist/tools.cjs +1 -1
- package/dist/tools.js +1 -1
- package/dist/ui-badge-BxT-sDmV.cjs +28 -0
- package/dist/ui-badge-C0eKBI8E.js +183 -0
- package/dist/ui-botao-OGJV6Vfk.js +165 -0
- package/dist/ui-botao-psS1juof.cjs +12 -0
- package/dist/ui-campo-texto-Cnn2UAkS.cjs +16 -0
- package/dist/{ui-campo-texto-B_JF6POq.js → ui-campo-texto-Uu2dJE_0.js} +81 -63
- package/dist/{ui-card-Bhm6k91e.cjs → ui-card-B86lJXTP.cjs} +7 -7
- package/dist/{ui-card-BJ8SmvVf.js → ui-card-C_o5_0cB.js} +14 -14
- package/dist/ui-kit.css +1 -1
- package/dist/ui-modal-CvGFGh1h.cjs +18 -0
- package/dist/ui-modal-DBOtSTbR.js +238 -0
- package/dist/{ui-paleta-ferramentas-Bpp4XBVg.js → ui-paleta-ferramentas-BIytXQLh.js} +1 -1
- package/dist/{ui-paleta-ferramentas-B6dJ0O6K.cjs → ui-paleta-ferramentas-DqLY51qa.cjs} +1 -1
- package/dist/ui-segmented-D6b6zxVs.cjs +19 -0
- package/dist/{ui-segmented-C8wuycjJ.js → ui-segmented-wUraId2e.js} +68 -67
- package/dist/ui-skeleton-DI4_9WOX.js +428 -0
- package/dist/ui-skeleton-elhKIh2B.cjs +33 -0
- package/dist/{ui-switch-CO9MoS8x.js → ui-switch-DWLgVVnT.js} +121 -119
- package/dist/ui-switch-yZIn3IW0.cjs +53 -0
- package/dist/ui-tabela-propriedades-BNcE6VLX.js +2180 -0
- package/dist/ui-tabela-propriedades-D3pyQvyy.cjs +145 -0
- package/dist/{ui-toast-CwUmiqyG.js → ui-toast-Bp_NlM5G.js} +51 -51
- package/dist/ui-toast-DGTZKne5.cjs +20 -0
- package/dist/zero-js-triggers-C_KrvFOQ.js +244 -0
- package/dist/zero-js-triggers-C_gtaojZ.cjs +1 -0
- package/package.json +169 -149
- package/dist/ui-badge-92yelKls.js +0 -183
- package/dist/ui-badge-B95jSECC.cjs +0 -28
- package/dist/ui-botao-BShEouvi.js +0 -124
- package/dist/ui-botao-DF1yuUUD.cjs +0 -12
- package/dist/ui-campo-texto-BCh5HyCM.cjs +0 -16
- package/dist/ui-modal-Bi4isGYh.cjs +0 -18
- package/dist/ui-modal-DV-pw2x1.js +0 -194
- package/dist/ui-segmented-NC5cBXLh.cjs +0 -19
- package/dist/ui-skeleton-B3xQyn0Z.js +0 -396
- package/dist/ui-skeleton-D42oQufF.cjs +0 -33
- package/dist/ui-switch-C6o4yZUF.cjs +0 -53
- package/dist/ui-tabela-propriedades-7yJ9g7ti.cjs +0 -145
- package/dist/ui-tabela-propriedades-D-XKNVwK.js +0 -2078
- package/dist/ui-toast-CQBqvUm3.cjs +0 -20
- package/dist/zero-js-triggers-DdESy0tk.js +0 -205
- package/dist/zero-js-triggers-QGD7FOTv.cjs +0 -1
package/package.json
CHANGED
|
@@ -1,149 +1,169 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@thibezer/ui-components-kit",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Web Components nativos (W3C Custom Elements + Shadow DOM) para interfaces densas de GIS, CAD e formulários, sem dependência de framework.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"web-components",
|
|
7
|
-
"custom-elements",
|
|
8
|
-
"shadow-dom",
|
|
9
|
-
"ui-kit",
|
|
10
|
-
"design-system",
|
|
11
|
-
"gis",
|
|
12
|
-
"cad",
|
|
13
|
-
"leaflet",
|
|
14
|
-
"form-associated"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"url": "https://github.com/thibezer/Componentes-UI
|
|
25
|
-
},
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
"
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
"
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
"
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
"
|
|
145
|
-
},
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
|
|
149
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@thibezer/ui-components-kit",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Web Components nativos (W3C Custom Elements + Shadow DOM) para interfaces densas de GIS, CAD e formulários, sem dependência de framework.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"web-components",
|
|
7
|
+
"custom-elements",
|
|
8
|
+
"shadow-dom",
|
|
9
|
+
"ui-kit",
|
|
10
|
+
"design-system",
|
|
11
|
+
"gis",
|
|
12
|
+
"cad",
|
|
13
|
+
"leaflet",
|
|
14
|
+
"form-associated",
|
|
15
|
+
"custom-elements-manifest",
|
|
16
|
+
"react",
|
|
17
|
+
"vue"
|
|
18
|
+
],
|
|
19
|
+
"author": "thibezer",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"homepage": "https://github.com/thibezer/Componentes-UI#readme",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/thibezer/Componentes-UI.git"
|
|
25
|
+
},
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/thibezer/Componentes-UI/issues"
|
|
28
|
+
},
|
|
29
|
+
"type": "module",
|
|
30
|
+
"main": "./dist/index.cjs",
|
|
31
|
+
"module": "./dist/index.js",
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"style": "./dist/ui-kit.css",
|
|
34
|
+
"files": [
|
|
35
|
+
"dist",
|
|
36
|
+
"CHANGELOG.md"
|
|
37
|
+
],
|
|
38
|
+
"exports": {
|
|
39
|
+
".": {
|
|
40
|
+
"types": "./dist/index.d.ts",
|
|
41
|
+
"import": "./dist/index.js",
|
|
42
|
+
"require": "./dist/index.cjs"
|
|
43
|
+
},
|
|
44
|
+
"./camadas": {
|
|
45
|
+
"types": "./dist/camadas.d.ts",
|
|
46
|
+
"import": "./dist/camadas.js",
|
|
47
|
+
"require": "./dist/camadas.cjs"
|
|
48
|
+
},
|
|
49
|
+
"./forms": {
|
|
50
|
+
"types": "./dist/forms.d.ts",
|
|
51
|
+
"import": "./dist/forms.js",
|
|
52
|
+
"require": "./dist/forms.cjs"
|
|
53
|
+
},
|
|
54
|
+
"./feedback": {
|
|
55
|
+
"types": "./dist/feedback.d.ts",
|
|
56
|
+
"import": "./dist/feedback.js",
|
|
57
|
+
"require": "./dist/feedback.cjs"
|
|
58
|
+
},
|
|
59
|
+
"./tabela": {
|
|
60
|
+
"types": "./dist/tabela.d.ts",
|
|
61
|
+
"import": "./dist/tabela.js",
|
|
62
|
+
"require": "./dist/tabela.cjs"
|
|
63
|
+
},
|
|
64
|
+
"./style.css": "./dist/ui-kit.css",
|
|
65
|
+
"./ui-kit.css": "./dist/ui-kit.css",
|
|
66
|
+
"./register": {
|
|
67
|
+
"types": "./dist/register.d.ts",
|
|
68
|
+
"import": "./dist/register.js",
|
|
69
|
+
"require": "./dist/register.cjs"
|
|
70
|
+
},
|
|
71
|
+
"./core": {
|
|
72
|
+
"types": "./dist/core/index.d.ts",
|
|
73
|
+
"import": "./dist/core.js",
|
|
74
|
+
"require": "./dist/core.cjs"
|
|
75
|
+
},
|
|
76
|
+
"./data": {
|
|
77
|
+
"types": "./dist/data.d.ts",
|
|
78
|
+
"import": "./dist/data.js",
|
|
79
|
+
"require": "./dist/data.cjs"
|
|
80
|
+
},
|
|
81
|
+
"./tools": {
|
|
82
|
+
"types": "./dist/tools.d.ts",
|
|
83
|
+
"import": "./dist/tools.js",
|
|
84
|
+
"require": "./dist/tools.cjs"
|
|
85
|
+
},
|
|
86
|
+
"./mapa": {
|
|
87
|
+
"types": "./dist/mapa.d.ts",
|
|
88
|
+
"import": "./dist/mapa.js",
|
|
89
|
+
"require": "./dist/mapa.cjs"
|
|
90
|
+
},
|
|
91
|
+
"./canvas": {
|
|
92
|
+
"types": "./dist/canvas.d.ts",
|
|
93
|
+
"import": "./dist/canvas.js",
|
|
94
|
+
"require": "./dist/canvas.cjs"
|
|
95
|
+
},
|
|
96
|
+
"./botao": {
|
|
97
|
+
"types": "./dist/botao.d.ts",
|
|
98
|
+
"import": "./dist/botao.js",
|
|
99
|
+
"require": "./dist/botao.cjs"
|
|
100
|
+
},
|
|
101
|
+
"./campo-texto": {
|
|
102
|
+
"types": "./dist/campo-texto.d.ts",
|
|
103
|
+
"import": "./dist/campo-texto.js",
|
|
104
|
+
"require": "./dist/campo-texto.cjs"
|
|
105
|
+
},
|
|
106
|
+
"./modal": {
|
|
107
|
+
"types": "./dist/modal.d.ts",
|
|
108
|
+
"import": "./dist/modal.js",
|
|
109
|
+
"require": "./dist/modal.cjs"
|
|
110
|
+
},
|
|
111
|
+
"./card": {
|
|
112
|
+
"types": "./dist/card.d.ts",
|
|
113
|
+
"import": "./dist/card.js",
|
|
114
|
+
"require": "./dist/card.cjs"
|
|
115
|
+
},
|
|
116
|
+
"./seletor-mapa-base": {
|
|
117
|
+
"types": "./dist/seletor-mapa-base.d.ts",
|
|
118
|
+
"import": "./dist/seletor-mapa-base.js",
|
|
119
|
+
"require": "./dist/seletor-mapa-base.cjs"
|
|
120
|
+
},
|
|
121
|
+
"./custom-elements.json": "./dist/custom-elements.json",
|
|
122
|
+
"./tipos-react": {
|
|
123
|
+
"types": "./dist/tipos-react.d.ts"
|
|
124
|
+
},
|
|
125
|
+
"./tipos-vue": {
|
|
126
|
+
"types": "./dist/tipos-vue.d.ts"
|
|
127
|
+
},
|
|
128
|
+
"./tipos-elementos": {
|
|
129
|
+
"types": "./dist/tipos-elementos.d.ts"
|
|
130
|
+
},
|
|
131
|
+
"./package.json": "./package.json"
|
|
132
|
+
},
|
|
133
|
+
"scripts": {
|
|
134
|
+
"dev": "vite",
|
|
135
|
+
"build": "tsc && vite build && npm run manifesto",
|
|
136
|
+
"test": "vitest run",
|
|
137
|
+
"test:coverage": "vitest run --coverage",
|
|
138
|
+
"preview": "vite preview",
|
|
139
|
+
"prepublishOnly": "npm test && npm run build && npm run test:tipos",
|
|
140
|
+
"manifesto": "cem analyze --config custom-elements-manifest.config.mjs",
|
|
141
|
+
"test:tipos": "tsc -p tests/tipos/tsconfig.json"
|
|
142
|
+
},
|
|
143
|
+
"peerDependencies": {
|
|
144
|
+
"leaflet": "^1.9.4"
|
|
145
|
+
},
|
|
146
|
+
"peerDependenciesMeta": {
|
|
147
|
+
"leaflet": {
|
|
148
|
+
"optional": true
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"devDependencies": {
|
|
152
|
+
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
153
|
+
"@types/leaflet": "^1.9.22",
|
|
154
|
+
"@types/react": "^19.3.0",
|
|
155
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
156
|
+
"element-internals-polyfill": "^3.0.2",
|
|
157
|
+
"esbuild": "0.28.2",
|
|
158
|
+
"happy-dom": "20.11.1",
|
|
159
|
+
"leaflet": "^1.9.4",
|
|
160
|
+
"typescript": "^5.0.0",
|
|
161
|
+
"vite": "^5.0.0",
|
|
162
|
+
"vite-plugin-dts": "^5.0.3",
|
|
163
|
+
"vitest": "^4.1.10"
|
|
164
|
+
},
|
|
165
|
+
"publishConfig": {
|
|
166
|
+
"access": "public"
|
|
167
|
+
},
|
|
168
|
+
"customElements": "dist/custom-elements.json"
|
|
169
|
+
}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
var g = Object.defineProperty;
|
|
2
|
-
var h = (a, o, e) => o in a ? g(a, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[o] = e;
|
|
3
|
-
var t = (a, o, e) => h(a, typeof o != "symbol" ? o + "" : o, e);
|
|
4
|
-
import { d as s, S as u } from "./ssr-safe-5cWfJP-s.js";
|
|
5
|
-
import { L as p } from "./listener-bag-DQgv7OON.js";
|
|
6
|
-
const m = ':host{display:block;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif)}.ui-stat{padding:18px 20px;border-radius:var(--ui-raio-borda, 10px);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));background-color:var(--ui-cor-fundo-card, #18181c);color:var(--ui-cor-texto, #e1e1e6);box-sizing:border-box;display:flex;flex-direction:column;position:relative;transition:border-color .15s ease,box-shadow .15s ease}:root[data-tema=claro] .ui-stat,[data-tema=claro] .ui-stat{background-color:#fff;border-color:#00000017;color:#1a1a1e;box-shadow:0 1px 3px #0000000a}.ui-stat--baixa{box-shadow:0 2px 6px #0000004d}.ui-stat--media{box-shadow:0 4px 14px #0006}.ui-stat--alta{box-shadow:0 8px 24px #00000080}.ui-stat__cabecalho{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;gap:8px}.ui-stat__rotulo{font-size:13px;font-weight:500;color:var(--ui-cor-texto-secundario, #888899);letter-spacing:.01em}:root[data-tema=claro] .ui-stat__rotulo,[data-tema=claro] .ui-stat__rotulo{color:#6c757d}.ui-stat__icone-slot{display:flex;align-items:center;color:var(--ui-cor-texto-secundario, #888899)}.ui-stat__icone-slot svg,.ui-stat__icone-slot ::slotted(svg),.ui-stat__icone-slot ::slotted(ui-icone){shape-rendering:geometricPrecision}.ui-stat__conteudo{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:6px}.ui-stat__valor{font-size:28px;font-weight:700;color:var(--ui-cor-texto, #ffffff);line-height:1.15;letter-spacing:-.025em}:root[data-tema=claro] .ui-stat__valor,[data-tema=claro] .ui-stat__valor{color:#111114}.ui-stat__indicador{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border-radius:5px;font-size:12px;font-weight:600;line-height:1}.ui-stat__indicador--positivo,.ui-stat__indicador--alta{background-color:#00e08a24;color:var(--ui-cor-primaria, #00E08A)}.ui-stat__indicador--negativo,.ui-stat__indicador--baixa{background-color:#ff444424;color:var(--ui-cor-texto-erro, #ff5555)}.ui-stat__indicador--neutro{background-color:#ffffff14;color:var(--ui-cor-texto-secundario, #888899)}:root[data-tema=claro] .ui-stat__indicador--neutro,[data-tema=claro] .ui-stat__indicador--neutro{background-color:#f1f3f5;color:#495057}.ui-stat__seta{font-size:.85em;line-height:1}.ui-stat__rodape{display:flex;flex-direction:column;gap:6px}.ui-stat__descricao{font-size:12px;color:var(--ui-cor-texto-secundario, #888899);line-height:1.3}:root[data-tema=claro] .ui-stat__descricao,[data-tema=claro] .ui-stat__descricao{color:#6c757d}';
|
|
7
|
-
class n extends u {
|
|
8
|
-
constructor() {
|
|
9
|
-
super();
|
|
10
|
-
t(this, "statElement");
|
|
11
|
-
t(this, "rotuloElement");
|
|
12
|
-
t(this, "valorElement");
|
|
13
|
-
t(this, "indicadorElement");
|
|
14
|
-
t(this, "setaElement");
|
|
15
|
-
t(this, "variacaoElement");
|
|
16
|
-
t(this, "descricaoElement");
|
|
17
|
-
const e = this.attachShadow({ mode: "open" });
|
|
18
|
-
e.innerHTML = `
|
|
19
|
-
<style>${m}</style>
|
|
20
|
-
<div class="ui-stat">
|
|
21
|
-
<div class="ui-stat__cabecalho">
|
|
22
|
-
<span class="ui-stat__rotulo"></span>
|
|
23
|
-
<div class="ui-stat__icone-slot"><slot name="icone"></slot></div>
|
|
24
|
-
</div>
|
|
25
|
-
<div class="ui-stat__conteudo">
|
|
26
|
-
<div class="ui-stat__valor"></div>
|
|
27
|
-
<div class="ui-stat__indicador" style="display: none;">
|
|
28
|
-
<span class="ui-stat__seta" aria-hidden="true"></span>
|
|
29
|
-
<span class="ui-stat__variacao"></span>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
<div class="ui-stat__rodape">
|
|
33
|
-
<span class="ui-stat__descricao" style="display: none;"></span>
|
|
34
|
-
<slot name="grafico"></slot>
|
|
35
|
-
<slot></slot>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
`, this.statElement = e.querySelector(".ui-stat"), this.rotuloElement = e.querySelector(".ui-stat__rotulo"), this.valorElement = e.querySelector(".ui-stat__valor"), this.indicadorElement = e.querySelector(".ui-stat__indicador"), this.setaElement = e.querySelector(".ui-stat__seta"), this.variacaoElement = e.querySelector(".ui-stat__variacao"), this.descricaoElement = e.querySelector(".ui-stat__descricao");
|
|
39
|
-
}
|
|
40
|
-
static get observedAttributes() {
|
|
41
|
-
return [
|
|
42
|
-
"rotulo",
|
|
43
|
-
"label",
|
|
44
|
-
"valor",
|
|
45
|
-
"value",
|
|
46
|
-
"variacao",
|
|
47
|
-
"trend",
|
|
48
|
-
"tendencia",
|
|
49
|
-
"direction",
|
|
50
|
-
"descricao",
|
|
51
|
-
"description",
|
|
52
|
-
"elevacao",
|
|
53
|
-
"elevation"
|
|
54
|
-
];
|
|
55
|
-
}
|
|
56
|
-
connectedCallback() {
|
|
57
|
-
this.syncState();
|
|
58
|
-
}
|
|
59
|
-
attributeChangedCallback(e, r, i) {
|
|
60
|
-
this.syncState();
|
|
61
|
-
}
|
|
62
|
-
get rotulo() {
|
|
63
|
-
return this.getAttribute("rotulo") || this.getAttribute("label") || "";
|
|
64
|
-
}
|
|
65
|
-
set rotulo(e) {
|
|
66
|
-
this.setAttribute("rotulo", e);
|
|
67
|
-
}
|
|
68
|
-
get valor() {
|
|
69
|
-
return this.getAttribute("valor") || this.getAttribute("value") || "";
|
|
70
|
-
}
|
|
71
|
-
set valor(e) {
|
|
72
|
-
this.setAttribute("valor", e);
|
|
73
|
-
}
|
|
74
|
-
get variacao() {
|
|
75
|
-
return this.getAttribute("variacao") || this.getAttribute("trend") || "";
|
|
76
|
-
}
|
|
77
|
-
set variacao(e) {
|
|
78
|
-
this.setAttribute("variacao", e);
|
|
79
|
-
}
|
|
80
|
-
get tendencia() {
|
|
81
|
-
const e = (this.getAttribute("tendencia") || this.getAttribute("direction") || "positivo").toLowerCase();
|
|
82
|
-
return e === "baixa" || e === "negativo" || e === "down" ? "baixa" : e === "neutro" || e === "neutral" ? "neutro" : "alta";
|
|
83
|
-
}
|
|
84
|
-
set tendencia(e) {
|
|
85
|
-
this.setAttribute("tendencia", e);
|
|
86
|
-
}
|
|
87
|
-
get descricao() {
|
|
88
|
-
return this.getAttribute("descricao") || this.getAttribute("description") || "";
|
|
89
|
-
}
|
|
90
|
-
set descricao(e) {
|
|
91
|
-
this.setAttribute("descricao", e);
|
|
92
|
-
}
|
|
93
|
-
syncState() {
|
|
94
|
-
const e = this.rotulo, r = this.valor, i = this.variacao, l = this.tendencia, d = this.descricao, b = this.getAttribute("elevacao") || this.getAttribute("elevation") || "baixa";
|
|
95
|
-
this.statElement.className = `ui-stat ui-stat--${b}`, this.rotuloElement.textContent = e, this.valorElement.textContent = r, i ? (this.variacaoElement.textContent = i, this.indicadorElement.style.display = "inline-flex", l === "baixa" ? (this.indicadorElement.className = "ui-stat__indicador ui-stat__indicador--negativo", this.setaElement.textContent = "↓", this.indicadorElement.setAttribute("aria-label", `Queda de ${i}`)) : l === "neutro" ? (this.indicadorElement.className = "ui-stat__indicador ui-stat__indicador--neutro", this.setaElement.textContent = "→", this.indicadorElement.setAttribute("aria-label", `Variação estável de ${i}`)) : (this.indicadorElement.className = "ui-stat__indicador ui-stat__indicador--positivo", this.setaElement.textContent = "↑", this.indicadorElement.setAttribute("aria-label", `Aumento de ${i}`))) : this.indicadorElement.style.display = "none", d ? (this.descricaoElement.textContent = d, this.descricaoElement.style.display = "block") : this.descricaoElement.style.display = "none";
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
class v extends n {
|
|
99
|
-
}
|
|
100
|
-
class f extends n {
|
|
101
|
-
}
|
|
102
|
-
s("ui-stat", n);
|
|
103
|
-
s("ui-kpi", v);
|
|
104
|
-
s("ui-metrica", f);
|
|
105
|
-
const x = ':host{display:inline-flex;align-items:center;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif);vertical-align:middle}.ui-badge{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:3px 8px;border-radius:999px;font-size:11px;font-weight:600;line-height:1;-webkit-user-select:none;user-select:none;box-sizing:border-box;transition:background-color .15s ease,color .15s ease,border-color .15s ease;white-space:nowrap}::slotted(svg),::slotted(ui-icone){width:12px!important;height:12px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;line-height:1!important;vertical-align:middle!important;shape-rendering:geometricPrecision;flex-shrink:0}::slotted(span){display:inline-flex;align-items:center;line-height:1}.ui-badge--suave{background-color:var(--ui-cor-badge-fundo, rgba(255, 255, 255, .08));color:var(--ui-cor-badge-texto, #e1e1e6);border:1px solid transparent}.ui-badge--solido{background-color:var(--ui-cor-badge-solido, #888899);color:#000;border:1px solid transparent}.ui-badge--contornado{background-color:transparent;color:var(--ui-cor-badge-texto, #e1e1e6);border:1px solid var(--ui-cor-badge-borda, rgba(255, 255, 255, .2))}.ui-badge--sucesso.ui-badge--suave{background-color:#00e08a26;color:var(--ui-cor-primaria, #00E08A)}.ui-badge--sucesso.ui-badge--solido{background-color:var(--ui-cor-primaria, #00E08A);color:#000}.ui-badge--sucesso.ui-badge--contornado{color:var(--ui-cor-primaria, #00E08A);border-color:#00e08a66}.ui-badge--erro.ui-badge--suave{background-color:#ff555526;color:var(--ui-cor-texto-erro, #ff5555)}.ui-badge--erro.ui-badge--solido{background-color:var(--ui-cor-texto-erro, #ff5555);color:#fff}.ui-badge--erro.ui-badge--contornado{color:var(--ui-cor-texto-erro, #ff5555);border-color:#f556}.ui-badge--alerta.ui-badge--suave{background-color:#ffb86c26;color:var(--ui-cor-texto-alerta, #ffb86c)}.ui-badge--alerta.ui-badge--solido{background-color:var(--ui-cor-texto-alerta, #ffb86c);color:#000}.ui-badge--alerta.ui-badge--contornado{color:var(--ui-cor-texto-alerta, #ffb86c);border-color:#ffb86c66}.ui-badge--info.ui-badge--suave,.ui-badge--primaria.ui-badge--suave{background-color:#00aaff26;color:#0af}.ui-badge--info.ui-badge--solido,.ui-badge--primaria.ui-badge--solido{background-color:#0af;color:#fff}.ui-badge--info.ui-badge--contornado,.ui-badge--primaria.ui-badge--contornado{color:#0af;border-color:#0af6}.ui-badge--neutro.ui-badge--suave{background-color:#ffffff14;color:var(--ui-cor-texto-secundario, #888899)}.ui-badge__close{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;border-radius:50%;cursor:pointer;opacity:.7;transition:opacity .15s ease,background-color .15s ease;font-size:10px;line-height:1;margin-left:2px}.ui-badge__close:hover{opacity:1;background-color:#fff3}';
|
|
106
|
-
class c extends u {
|
|
107
|
-
constructor() {
|
|
108
|
-
super();
|
|
109
|
-
t(this, "badgeElement");
|
|
110
|
-
t(this, "labelElement");
|
|
111
|
-
t(this, "closeElement");
|
|
112
|
-
t(this, "listeners", new p());
|
|
113
|
-
t(this, "handleRemove", (e) => {
|
|
114
|
-
var r;
|
|
115
|
-
e.stopPropagation(), this.dispatchEvent(
|
|
116
|
-
new CustomEvent("ui-remove", {
|
|
117
|
-
detail: {
|
|
118
|
-
value: this.getAttribute("value") || ((r = this.textContent) == null ? void 0 : r.trim()) || ""
|
|
119
|
-
},
|
|
120
|
-
bubbles: !0,
|
|
121
|
-
composed: !0
|
|
122
|
-
})
|
|
123
|
-
);
|
|
124
|
-
});
|
|
125
|
-
const e = this.attachShadow({ mode: "open" });
|
|
126
|
-
e.innerHTML = `
|
|
127
|
-
<style>${x}</style>
|
|
128
|
-
<span class="ui-badge">
|
|
129
|
-
<slot></slot>
|
|
130
|
-
<span class="ui-badge__label" style="display: none;"></span>
|
|
131
|
-
<span class="ui-badge__close" role="button" tabindex="0" aria-label="Remover" style="display: none;" title="Remover">✕</span>
|
|
132
|
-
</span>
|
|
133
|
-
`, this.badgeElement = e.querySelector(".ui-badge"), this.labelElement = e.querySelector(".ui-badge__label"), this.closeElement = e.querySelector(".ui-badge__close");
|
|
134
|
-
}
|
|
135
|
-
static get observedAttributes() {
|
|
136
|
-
return [
|
|
137
|
-
"variante",
|
|
138
|
-
"variant",
|
|
139
|
-
"estilo",
|
|
140
|
-
"removivel",
|
|
141
|
-
"removable",
|
|
142
|
-
"disabled",
|
|
143
|
-
"label",
|
|
144
|
-
"value"
|
|
145
|
-
];
|
|
146
|
-
}
|
|
147
|
-
connectedCallback() {
|
|
148
|
-
this.listeners.cleanup(), this.listeners.add(this.closeElement, "click", this.handleRemove), this.listeners.add(this.closeElement, "keydown", (e) => {
|
|
149
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.handleRemove(e));
|
|
150
|
-
}), this.syncState();
|
|
151
|
-
}
|
|
152
|
-
disconnectedCallback() {
|
|
153
|
-
this.listeners.cleanup();
|
|
154
|
-
}
|
|
155
|
-
attributeChangedCallback(e, r, i) {
|
|
156
|
-
this.syncState();
|
|
157
|
-
}
|
|
158
|
-
get removivel() {
|
|
159
|
-
return this.hasAttribute("removivel") || this.hasAttribute("removable");
|
|
160
|
-
}
|
|
161
|
-
set removivel(e) {
|
|
162
|
-
e ? this.setAttribute("removivel", "") : (this.removeAttribute("removivel"), this.removeAttribute("removable"));
|
|
163
|
-
}
|
|
164
|
-
syncState() {
|
|
165
|
-
const e = this.getAttribute("variante") || this.getAttribute("variant") || "neutro", r = this.getAttribute("estilo") || "suave", i = this.getAttribute("label"), l = this.removivel;
|
|
166
|
-
this.badgeElement.className = "ui-badge", this.badgeElement.classList.add(`ui-badge--${e}`), this.badgeElement.classList.add(`ui-badge--${r}`), i ? (this.labelElement.textContent = i, this.labelElement.style.display = "inline") : this.labelElement.style.display = "none", l ? this.closeElement.style.display = "inline-flex" : this.closeElement.style.display = "none";
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
class _ extends c {
|
|
170
|
-
}
|
|
171
|
-
class y extends c {
|
|
172
|
-
}
|
|
173
|
-
s("ui-badge", c);
|
|
174
|
-
s("ui-chip", _);
|
|
175
|
-
s("ui-tag", y);
|
|
176
|
-
export {
|
|
177
|
-
c as U,
|
|
178
|
-
_ as a,
|
|
179
|
-
v as b,
|
|
180
|
-
f as c,
|
|
181
|
-
n as d,
|
|
182
|
-
y as e
|
|
183
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";var p=Object.defineProperty;var v=(a,o,e)=>o in a?p(a,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[o]=e;var t=(a,o,e)=>v(a,typeof o!="symbol"?o+"":o,e);const s=require("./ssr-safe-CiHD1adl.cjs"),f=require("./listener-bag-D5omxZ9h.cjs"),x=':host{display:block;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif)}.ui-stat{padding:18px 20px;border-radius:var(--ui-raio-borda, 10px);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));background-color:var(--ui-cor-fundo-card, #18181c);color:var(--ui-cor-texto, #e1e1e6);box-sizing:border-box;display:flex;flex-direction:column;position:relative;transition:border-color .15s ease,box-shadow .15s ease}:root[data-tema=claro] .ui-stat,[data-tema=claro] .ui-stat{background-color:#fff;border-color:#00000017;color:#1a1a1e;box-shadow:0 1px 3px #0000000a}.ui-stat--baixa{box-shadow:0 2px 6px #0000004d}.ui-stat--media{box-shadow:0 4px 14px #0006}.ui-stat--alta{box-shadow:0 8px 24px #00000080}.ui-stat__cabecalho{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;gap:8px}.ui-stat__rotulo{font-size:13px;font-weight:500;color:var(--ui-cor-texto-secundario, #888899);letter-spacing:.01em}:root[data-tema=claro] .ui-stat__rotulo,[data-tema=claro] .ui-stat__rotulo{color:#6c757d}.ui-stat__icone-slot{display:flex;align-items:center;color:var(--ui-cor-texto-secundario, #888899)}.ui-stat__icone-slot svg,.ui-stat__icone-slot ::slotted(svg),.ui-stat__icone-slot ::slotted(ui-icone){shape-rendering:geometricPrecision}.ui-stat__conteudo{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:6px}.ui-stat__valor{font-size:28px;font-weight:700;color:var(--ui-cor-texto, #ffffff);line-height:1.15;letter-spacing:-.025em}:root[data-tema=claro] .ui-stat__valor,[data-tema=claro] .ui-stat__valor{color:#111114}.ui-stat__indicador{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border-radius:5px;font-size:12px;font-weight:600;line-height:1}.ui-stat__indicador--positivo,.ui-stat__indicador--alta{background-color:#00e08a24;color:var(--ui-cor-primaria, #00E08A)}.ui-stat__indicador--negativo,.ui-stat__indicador--baixa{background-color:#ff444424;color:var(--ui-cor-texto-erro, #ff5555)}.ui-stat__indicador--neutro{background-color:#ffffff14;color:var(--ui-cor-texto-secundario, #888899)}:root[data-tema=claro] .ui-stat__indicador--neutro,[data-tema=claro] .ui-stat__indicador--neutro{background-color:#f1f3f5;color:#495057}.ui-stat__seta{font-size:.85em;line-height:1}.ui-stat__rodape{display:flex;flex-direction:column;gap:6px}.ui-stat__descricao{font-size:12px;color:var(--ui-cor-texto-secundario, #888899);line-height:1.3}:root[data-tema=claro] .ui-stat__descricao,[data-tema=claro] .ui-stat__descricao{color:#6c757d}';class n extends s.SafeHTMLElement{constructor(){super();t(this,"statElement");t(this,"rotuloElement");t(this,"valorElement");t(this,"indicadorElement");t(this,"setaElement");t(this,"variacaoElement");t(this,"descricaoElement");const e=this.attachShadow({mode:"open"});e.innerHTML=`
|
|
2
|
-
<style>${x}</style>
|
|
3
|
-
<div class="ui-stat">
|
|
4
|
-
<div class="ui-stat__cabecalho">
|
|
5
|
-
<span class="ui-stat__rotulo"></span>
|
|
6
|
-
<div class="ui-stat__icone-slot"><slot name="icone"></slot></div>
|
|
7
|
-
</div>
|
|
8
|
-
<div class="ui-stat__conteudo">
|
|
9
|
-
<div class="ui-stat__valor"></div>
|
|
10
|
-
<div class="ui-stat__indicador" style="display: none;">
|
|
11
|
-
<span class="ui-stat__seta" aria-hidden="true"></span>
|
|
12
|
-
<span class="ui-stat__variacao"></span>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
<div class="ui-stat__rodape">
|
|
16
|
-
<span class="ui-stat__descricao" style="display: none;"></span>
|
|
17
|
-
<slot name="grafico"></slot>
|
|
18
|
-
<slot></slot>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
`,this.statElement=e.querySelector(".ui-stat"),this.rotuloElement=e.querySelector(".ui-stat__rotulo"),this.valorElement=e.querySelector(".ui-stat__valor"),this.indicadorElement=e.querySelector(".ui-stat__indicador"),this.setaElement=e.querySelector(".ui-stat__seta"),this.variacaoElement=e.querySelector(".ui-stat__variacao"),this.descricaoElement=e.querySelector(".ui-stat__descricao")}static get observedAttributes(){return["rotulo","label","valor","value","variacao","trend","tendencia","direction","descricao","description","elevacao","elevation"]}connectedCallback(){this.syncState()}attributeChangedCallback(e,r,i){this.syncState()}get rotulo(){return this.getAttribute("rotulo")||this.getAttribute("label")||""}set rotulo(e){this.setAttribute("rotulo",e)}get valor(){return this.getAttribute("valor")||this.getAttribute("value")||""}set valor(e){this.setAttribute("valor",e)}get variacao(){return this.getAttribute("variacao")||this.getAttribute("trend")||""}set variacao(e){this.setAttribute("variacao",e)}get tendencia(){const e=(this.getAttribute("tendencia")||this.getAttribute("direction")||"positivo").toLowerCase();return e==="baixa"||e==="negativo"||e==="down"?"baixa":e==="neutro"||e==="neutral"?"neutro":"alta"}set tendencia(e){this.setAttribute("tendencia",e)}get descricao(){return this.getAttribute("descricao")||this.getAttribute("description")||""}set descricao(e){this.setAttribute("descricao",e)}syncState(){const e=this.rotulo,r=this.valor,i=this.variacao,l=this.tendencia,d=this.descricao,h=this.getAttribute("elevacao")||this.getAttribute("elevation")||"baixa";this.statElement.className=`ui-stat ui-stat--${h}`,this.rotuloElement.textContent=e,this.valorElement.textContent=r,i?(this.variacaoElement.textContent=i,this.indicadorElement.style.display="inline-flex",l==="baixa"?(this.indicadorElement.className="ui-stat__indicador ui-stat__indicador--negativo",this.setaElement.textContent="↓",this.indicadorElement.setAttribute("aria-label",`Queda de ${i}`)):l==="neutro"?(this.indicadorElement.className="ui-stat__indicador ui-stat__indicador--neutro",this.setaElement.textContent="→",this.indicadorElement.setAttribute("aria-label",`Variação estável de ${i}`)):(this.indicadorElement.className="ui-stat__indicador ui-stat__indicador--positivo",this.setaElement.textContent="↑",this.indicadorElement.setAttribute("aria-label",`Aumento de ${i}`))):this.indicadorElement.style.display="none",d?(this.descricaoElement.textContent=d,this.descricaoElement.style.display="block"):this.descricaoElement.style.display="none"}}class u extends n{}class b extends n{}s.definirCustomElement("ui-stat",n);s.definirCustomElement("ui-kpi",u);s.definirCustomElement("ui-metrica",b);const _=':host{display:inline-flex;align-items:center;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif);vertical-align:middle}.ui-badge{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:3px 8px;border-radius:999px;font-size:11px;font-weight:600;line-height:1;-webkit-user-select:none;user-select:none;box-sizing:border-box;transition:background-color .15s ease,color .15s ease,border-color .15s ease;white-space:nowrap}::slotted(svg),::slotted(ui-icone){width:12px!important;height:12px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;line-height:1!important;vertical-align:middle!important;shape-rendering:geometricPrecision;flex-shrink:0}::slotted(span){display:inline-flex;align-items:center;line-height:1}.ui-badge--suave{background-color:var(--ui-cor-badge-fundo, rgba(255, 255, 255, .08));color:var(--ui-cor-badge-texto, #e1e1e6);border:1px solid transparent}.ui-badge--solido{background-color:var(--ui-cor-badge-solido, #888899);color:#000;border:1px solid transparent}.ui-badge--contornado{background-color:transparent;color:var(--ui-cor-badge-texto, #e1e1e6);border:1px solid var(--ui-cor-badge-borda, rgba(255, 255, 255, .2))}.ui-badge--sucesso.ui-badge--suave{background-color:#00e08a26;color:var(--ui-cor-primaria, #00E08A)}.ui-badge--sucesso.ui-badge--solido{background-color:var(--ui-cor-primaria, #00E08A);color:#000}.ui-badge--sucesso.ui-badge--contornado{color:var(--ui-cor-primaria, #00E08A);border-color:#00e08a66}.ui-badge--erro.ui-badge--suave{background-color:#ff555526;color:var(--ui-cor-texto-erro, #ff5555)}.ui-badge--erro.ui-badge--solido{background-color:var(--ui-cor-texto-erro, #ff5555);color:#fff}.ui-badge--erro.ui-badge--contornado{color:var(--ui-cor-texto-erro, #ff5555);border-color:#f556}.ui-badge--alerta.ui-badge--suave{background-color:#ffb86c26;color:var(--ui-cor-texto-alerta, #ffb86c)}.ui-badge--alerta.ui-badge--solido{background-color:var(--ui-cor-texto-alerta, #ffb86c);color:#000}.ui-badge--alerta.ui-badge--contornado{color:var(--ui-cor-texto-alerta, #ffb86c);border-color:#ffb86c66}.ui-badge--info.ui-badge--suave,.ui-badge--primaria.ui-badge--suave{background-color:#00aaff26;color:#0af}.ui-badge--info.ui-badge--solido,.ui-badge--primaria.ui-badge--solido{background-color:#0af;color:#fff}.ui-badge--info.ui-badge--contornado,.ui-badge--primaria.ui-badge--contornado{color:#0af;border-color:#0af6}.ui-badge--neutro.ui-badge--suave{background-color:#ffffff14;color:var(--ui-cor-texto-secundario, #888899)}.ui-badge__close{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;border-radius:50%;cursor:pointer;opacity:.7;transition:opacity .15s ease,background-color .15s ease;font-size:10px;line-height:1;margin-left:2px}.ui-badge__close:hover{opacity:1;background-color:#fff3}';class c extends s.SafeHTMLElement{constructor(){super();t(this,"badgeElement");t(this,"labelElement");t(this,"closeElement");t(this,"listeners",new f.ListenerBag);t(this,"handleRemove",e=>{var r;e.stopPropagation(),this.dispatchEvent(new CustomEvent("ui-remove",{detail:{value:this.getAttribute("value")||((r=this.textContent)==null?void 0:r.trim())||""},bubbles:!0,composed:!0}))});const e=this.attachShadow({mode:"open"});e.innerHTML=`
|
|
22
|
-
<style>${_}</style>
|
|
23
|
-
<span class="ui-badge">
|
|
24
|
-
<slot></slot>
|
|
25
|
-
<span class="ui-badge__label" style="display: none;"></span>
|
|
26
|
-
<span class="ui-badge__close" role="button" tabindex="0" aria-label="Remover" style="display: none;" title="Remover">✕</span>
|
|
27
|
-
</span>
|
|
28
|
-
`,this.badgeElement=e.querySelector(".ui-badge"),this.labelElement=e.querySelector(".ui-badge__label"),this.closeElement=e.querySelector(".ui-badge__close")}static get observedAttributes(){return["variante","variant","estilo","removivel","removable","disabled","label","value"]}connectedCallback(){this.listeners.cleanup(),this.listeners.add(this.closeElement,"click",this.handleRemove),this.listeners.add(this.closeElement,"keydown",e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.handleRemove(e))}),this.syncState()}disconnectedCallback(){this.listeners.cleanup()}attributeChangedCallback(e,r,i){this.syncState()}get removivel(){return this.hasAttribute("removivel")||this.hasAttribute("removable")}set removivel(e){e?this.setAttribute("removivel",""):(this.removeAttribute("removivel"),this.removeAttribute("removable"))}syncState(){const e=this.getAttribute("variante")||this.getAttribute("variant")||"neutro",r=this.getAttribute("estilo")||"suave",i=this.getAttribute("label"),l=this.removivel;this.badgeElement.className="ui-badge",this.badgeElement.classList.add(`ui-badge--${e}`),this.badgeElement.classList.add(`ui-badge--${r}`),i?(this.labelElement.textContent=i,this.labelElement.style.display="inline"):this.labelElement.style.display="none",l?this.closeElement.style.display="inline-flex":this.closeElement.style.display="none"}}class g extends c{}class m extends c{}s.definirCustomElement("ui-badge",c);s.definirCustomElement("ui-chip",g);s.definirCustomElement("ui-tag",m);exports.UIBadge=c;exports.UIChip=g;exports.UIKpi=u;exports.UIMetrica=b;exports.UIStat=n;exports.UITag=m;
|