@wrrdev/fenix-ui 1.1.6 → 1.1.8
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 +23 -3
- package/dist/assets/{base-css-Be_r8aTo.js → font-CF0TXsAP.js} +39 -3
- package/dist/assets/font-CF0TXsAP.js.map +1 -0
- package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/autocomplete.js +9 -6
- package/dist/components/autocomplete/autocomplete.js.map +1 -1
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +5 -3
- package/dist/components/button/button.js.map +1 -1
- package/dist/components/datepicker/datepicker.d.ts.map +1 -1
- package/dist/components/datepicker/datepicker.js +11 -6
- package/dist/components/datepicker/datepicker.js.map +1 -1
- package/dist/components/fileupload/fileupload.d.ts +1 -1
- package/dist/components/fileupload/fileupload.d.ts.map +1 -1
- package/dist/components/fileupload/fileupload.js +5 -3
- package/dist/components/fileupload/fileupload.js.map +1 -1
- package/dist/components/icon/icon.d.ts +40 -0
- package/dist/components/icon/icon.d.ts.map +1 -0
- package/dist/components/icon/icon.js +79 -0
- package/dist/components/icon/icon.js.map +1 -0
- package/dist/components/icon/index.d.ts +8 -0
- package/dist/components/icon/index.d.ts.map +1 -0
- package/dist/components/icon/index.js +7 -0
- package/dist/components/icon/index.js.map +1 -0
- package/dist/components/input/input.d.ts.map +1 -1
- package/dist/components/input/input.js +12 -6
- package/dist/components/input/input.js.map +1 -1
- package/dist/components/knob/knob.d.ts +1 -1
- package/dist/components/knob/knob.d.ts.map +1 -1
- package/dist/components/knob/knob.js +3 -1
- package/dist/components/knob/knob.js.map +1 -1
- package/dist/components/multiselect/multiselect.d.ts.map +1 -1
- package/dist/components/multiselect/multiselect.js +8 -3
- package/dist/components/multiselect/multiselect.js.map +1 -1
- package/dist/components/orderlist/orderlist.js +2 -2
- package/dist/components/orderlist/orderlist.js.map +1 -1
- package/dist/components/picklist/picklist.js +2 -2
- package/dist/components/picklist/picklist.js.map +1 -1
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/select/select.js +9 -3
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/textarea/textarea.d.ts.map +1 -1
- package/dist/components/textarea/textarea.js +7 -3
- package/dist/components/textarea/textarea.js.map +1 -1
- package/dist/components/toggle-button-group/toggle-button-group.d.ts.map +1 -1
- package/dist/components/toggle-button-group/toggle-button-group.js +3 -1
- package/dist/components/toggle-button-group/toggle-button-group.js.map +1 -1
- package/dist/core/jsx.d.ts +22 -0
- package/dist/core/jsx.d.ts.map +1 -1
- package/dist/core/jsx.js.map +1 -1
- package/dist/core/theme.d.ts.map +1 -1
- package/dist/core/theme.js +12 -0
- package/dist/core/theme.js.map +1 -1
- package/dist/core/tokens.d.ts +4 -0
- package/dist/core/tokens.d.ts.map +1 -1
- package/dist/core/tokens.js +9 -1
- package/dist/core/tokens.js.map +1 -1
- package/dist/core/vue.d.ts +3 -1
- package/dist/core/vue.d.ts.map +1 -1
- package/dist/core/vue.js.map +1 -1
- package/dist/docs/app.d.ts.map +1 -1
- package/dist/docs/componentes/icon.doc.d.ts +9 -0
- package/dist/docs/componentes/icon.doc.d.ts.map +1 -0
- package/dist/docs/componentes/index.d.ts.map +1 -1
- package/dist/fenix-ui.umd.min.js +195 -138
- package/dist/fenix-ui2.esm.js.map +1 -1
- package/dist/fenix-ui3.esm.js +10 -14
- package/dist/fenix-ui3.esm.js.map +1 -1
- package/dist/fenix-ui4.esm.js +187 -60
- package/dist/fenix-ui4.esm.js.map +1 -1
- package/dist/fenix-ui5.esm.js +41 -15
- package/dist/fenix-ui5.esm.js.map +1 -1
- package/dist/icons/font.d.ts +26 -0
- package/dist/icons/font.d.ts.map +1 -0
- package/dist/icons/font.js +42 -0
- package/dist/icons/font.js.map +1 -0
- package/dist/icons/index.d.ts +3 -1
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/icons/index.js +11 -13
- package/dist/icons/index.js.map +1 -1
- package/dist/icons/name-union.d.ts +11 -0
- package/dist/icons/name-union.d.ts.map +1 -0
- package/dist/icons/names.d.ts +0 -1
- package/dist/icons/names.d.ts.map +1 -1
- package/dist/icons/names.js.map +1 -1
- package/dist/icons/types.d.ts +14 -0
- package/dist/icons/types.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/plugins/auto-import.d.ts +19 -2
- package/dist/plugins/auto-import.d.ts.map +1 -1
- package/dist/plugins/auto-import.js +40 -14
- package/dist/plugins/auto-import.js.map +1 -1
- package/dist/plugins/index.d.ts +5 -0
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +1 -1
- package/dist/plugins/index.js.map +1 -1
- package/package.json +5 -1
- package/dist/assets/base-css-Be_r8aTo.js.map +0 -1
package/dist/fenix-ui4.esm.js
CHANGED
|
@@ -5,8 +5,8 @@ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot
|
|
|
5
5
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
6
6
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
7
7
|
var _FxToast_instances, render_fn;
|
|
8
|
-
import { a as FENIX_ICON_BASE_CSS, f as fenixIconHtml, e as esc, i as isFenixIconName } from "./assets/
|
|
9
|
-
import { s,
|
|
8
|
+
import { a as FENIX_ICON_BASE_CSS, f as fenixIconHtml, e as esc, i as isFenixIconName, l as loadFenixIconsFont } from "./assets/font-CF0TXsAP.js";
|
|
9
|
+
import { s, g } from "./assets/font-CF0TXsAP.js";
|
|
10
10
|
const lightTokens = {
|
|
11
11
|
color: {
|
|
12
12
|
primary: "#c2410c",
|
|
@@ -53,7 +53,15 @@ const lightTokens = {
|
|
|
53
53
|
/** '0' desativa o efeito ripple do botão. */
|
|
54
54
|
ripple: "1",
|
|
55
55
|
/** Anel de foco dos campos de formulário. Use 'none' para campos sem sobra. */
|
|
56
|
-
"focus-ring": "0 0 0 3px color-mix(in srgb, var(--fx-color-primary) 22%, transparent)"
|
|
56
|
+
"focus-ring": "0 0 0 3px color-mix(in srgb, var(--fx-color-primary) 22%, transparent)",
|
|
57
|
+
/**
|
|
58
|
+
* Brilho dos estados `error`/`invalid`. Acompanha `focus-ring`: quando o
|
|
59
|
+
* anel de foco está desligado, `applyTokens` força 'none' — o erro segue
|
|
60
|
+
* visível pela borda (border-color) e pela mensagem, mas sem o anel.
|
|
61
|
+
*/
|
|
62
|
+
"error-ring": "0 0 0 3px color-mix(in srgb, var(--fx-color-danger, #dc2626) 18%, transparent)",
|
|
63
|
+
/** Brilho dos estados `success`/`valid` — acompanha `focus-ring` igualmente. */
|
|
64
|
+
"success-ring": "0 0 0 3px color-mix(in srgb, var(--fx-color-success, #16a34a) 18%, transparent)"
|
|
57
65
|
},
|
|
58
66
|
z: { base: "auto", dropdown: "1000", modal: "1100", toast: "1200" }
|
|
59
67
|
};
|
|
@@ -113,6 +121,7 @@ function tokenCssVars(tokens) {
|
|
|
113
121
|
function applyTokens(themeName, overrides, target = document.documentElement) {
|
|
114
122
|
const base = themeName === "dark" ? darkTokens : defaultTokens;
|
|
115
123
|
const finalTokens = deepMerge(base, overrides);
|
|
124
|
+
syncValidationRings(finalTokens, overrides);
|
|
116
125
|
const vars = tokenCssVars(finalTokens);
|
|
117
126
|
for (const [name, value] of Object.entries(vars)) {
|
|
118
127
|
target.style.setProperty(name, value);
|
|
@@ -121,6 +130,17 @@ function applyTokens(themeName, overrides, target = document.documentElement) {
|
|
|
121
130
|
window.dispatchEvent(new CustomEvent("fenix:theme", { detail: { theme: themeName, tokens: finalTokens } }));
|
|
122
131
|
}
|
|
123
132
|
}
|
|
133
|
+
const RING_OFF_VALUES = /* @__PURE__ */ new Set(["", "none", "0", "unset", "initial"]);
|
|
134
|
+
function syncValidationRings(tokens, overrides) {
|
|
135
|
+
const focusRing = String(tokens.effect["focus-ring"] ?? "").trim();
|
|
136
|
+
if (!RING_OFF_VALUES.has(focusRing)) return;
|
|
137
|
+
const explicit = (key2) => Boolean(overrides?.effect && Object.prototype.hasOwnProperty.call(overrides.effect, key2));
|
|
138
|
+
tokens.effect = {
|
|
139
|
+
...tokens.effect,
|
|
140
|
+
"error-ring": explicit("error-ring") ? tokens.effect["error-ring"] : "none",
|
|
141
|
+
"success-ring": explicit("success-ring") ? tokens.effect["success-ring"] : "none"
|
|
142
|
+
};
|
|
143
|
+
}
|
|
124
144
|
function configure(options = {}, target = document.documentElement) {
|
|
125
145
|
if (options.theme) activeTheme = options.theme;
|
|
126
146
|
if (options.tokens) activeOverrides = options.tokens;
|
|
@@ -419,7 +439,9 @@ _FxButton.styles = css`
|
|
|
419
439
|
font-size: var(--fx-font-size);
|
|
420
440
|
font-weight: var(--fx-font-weight);
|
|
421
441
|
line-height: var(--fx-font-line-height);
|
|
422
|
-
|
|
442
|
+
/* Padding vertical limitado ao orçamento do token --fx-size-*: a altura
|
|
443
|
+
fica EXATAMENTE em sm 32 / md 40 / lg 48 (mesma medida dos campos). */
|
|
444
|
+
padding: var(--fx-space-sm) var(--fx-space-xl);
|
|
423
445
|
border-radius: var(--fx-radius-md);
|
|
424
446
|
border: 1px solid transparent;
|
|
425
447
|
color: #fff;
|
|
@@ -442,8 +464,8 @@ _FxButton.styles = css`
|
|
|
442
464
|
|
|
443
465
|
/* Tamanhos — alturas vindas dos tokens (personalizáveis por preset) */
|
|
444
466
|
.btn { min-height: var(--fx-size-md); }
|
|
445
|
-
:host([size='sm']) .btn { padding: var(--fx-space-
|
|
446
|
-
:host([size='lg']) .btn { padding: var(--fx-space-
|
|
467
|
+
:host([size='sm']) .btn { padding: var(--fx-space-xs) var(--fx-space-lg); font-size: var(--fx-font-size); min-height: var(--fx-size-sm); }
|
|
468
|
+
:host([size='lg']) .btn { padding: var(--fx-space-sm) var(--fx-space-xl); font-size: calc(var(--fx-font-size) + 4px); min-height: var(--fx-size-lg); }
|
|
447
469
|
|
|
448
470
|
/* Full width */
|
|
449
471
|
:host([full]) .btn { width: 100%; }
|
|
@@ -781,6 +803,9 @@ _FxSelect.styles = css`
|
|
|
781
803
|
/* Acompanha a largura definida no :host. */
|
|
782
804
|
width: 100%;
|
|
783
805
|
font: inherit;
|
|
806
|
+
/* Altura/linha determinísticas: a caixa fica no token --fx-size-*
|
|
807
|
+
(o line-height fixo impede que a herança da página estoure o min-height). */
|
|
808
|
+
line-height: var(--fx-font-line-height);
|
|
784
809
|
font-weight: var(--fx-font-weight);
|
|
785
810
|
color: var(--fx-text-default);
|
|
786
811
|
text-align: left;
|
|
@@ -808,28 +833,31 @@ _FxSelect.styles = css`
|
|
|
808
833
|
:host([full]) { min-width: 0; }
|
|
809
834
|
:host([full]) .trigger { width: 100%; min-width: 0; }
|
|
810
835
|
:host([full]) .panel { width: 100%; }
|
|
811
|
-
/* Validação
|
|
836
|
+
/* Validação — borda e brilho JÁ EM REPOUSO (igual ao fx-input); o
|
|
837
|
+
brilho segue --fx-effect-error-ring, que acompanha effect.focus-ring. */
|
|
812
838
|
:host([error]) .trigger,
|
|
813
839
|
:host([invalid]) .trigger {
|
|
814
840
|
border-color: var(--fx-color-danger, #dc2626);
|
|
841
|
+
box-shadow: var(--fx-effect-error-ring, 0 0 0 3px color-mix(in srgb, var(--fx-color-danger, #dc2626) 18%, transparent));
|
|
815
842
|
}
|
|
816
843
|
:host([error]) .trigger:focus-visible,
|
|
817
844
|
:host([invalid]) .trigger:focus-visible,
|
|
818
845
|
:host([error][open]) .trigger,
|
|
819
846
|
:host([invalid][open]) .trigger {
|
|
820
847
|
border-color: var(--fx-color-danger, #dc2626);
|
|
821
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--fx-color-danger, #dc2626) 18%, transparent);
|
|
848
|
+
box-shadow: var(--fx-effect-error-ring, 0 0 0 3px color-mix(in srgb, var(--fx-color-danger, #dc2626) 18%, transparent));
|
|
822
849
|
}
|
|
823
850
|
:host([success]) .trigger,
|
|
824
851
|
:host([valid]) .trigger {
|
|
825
852
|
border-color: var(--fx-color-success, #16a34a);
|
|
853
|
+
box-shadow: var(--fx-effect-success-ring, 0 0 0 3px color-mix(in srgb, var(--fx-color-success, #16a34a) 18%, transparent));
|
|
826
854
|
}
|
|
827
855
|
:host([success]) .trigger:focus-visible,
|
|
828
856
|
:host([valid]) .trigger:focus-visible,
|
|
829
857
|
:host([success][open]) .trigger,
|
|
830
858
|
:host([valid][open]) .trigger {
|
|
831
859
|
border-color: var(--fx-color-success, #16a34a);
|
|
832
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--fx-color-success, #16a34a) 18%, transparent);
|
|
860
|
+
box-shadow: var(--fx-effect-success-ring, 0 0 0 3px color-mix(in srgb, var(--fx-color-success, #16a34a) 18%, transparent));
|
|
833
861
|
}
|
|
834
862
|
:host([disabled]) .trigger,
|
|
835
863
|
.trigger[aria-disabled='true'] { opacity: 0.55; cursor: not-allowed; background-color: var(--fx-surface-surface-hover); }
|
|
@@ -1036,13 +1064,17 @@ _FxInput.styles = css`
|
|
|
1036
1064
|
.field {
|
|
1037
1065
|
font-family: inherit;
|
|
1038
1066
|
font-size: inherit;
|
|
1067
|
+
/* Altura determinística: com line-height fixo, o padding vertical cabe no
|
|
1068
|
+
token --fx-size-* e a caixa fica EXATAMENTE no tamanho padrão
|
|
1069
|
+
(sm 32 / md 40 / lg 48), igual para todos os campos. */
|
|
1070
|
+
line-height: var(--fx-font-line-height);
|
|
1039
1071
|
min-height: var(--fx-size-md);
|
|
1040
1072
|
font-weight: var(--fx-font-weight);
|
|
1041
1073
|
color: var(--fx-text-default);
|
|
1042
1074
|
background-color: var(--fx-surface-background);
|
|
1043
1075
|
border: 1px solid var(--fx-border-default);
|
|
1044
1076
|
border-radius: var(--fx-radius-md);
|
|
1045
|
-
padding: var(--fx-space-
|
|
1077
|
+
padding: var(--fx-space-sm) var(--fx-space-lg);
|
|
1046
1078
|
/* Acompanha a largura definida no :host. */
|
|
1047
1079
|
width: 100%;
|
|
1048
1080
|
box-sizing: border-box;
|
|
@@ -1063,25 +1095,27 @@ _FxInput.styles = css`
|
|
|
1063
1095
|
cursor: not-allowed;
|
|
1064
1096
|
background-color: var(--fx-surface-surface-hover);
|
|
1065
1097
|
}
|
|
1066
|
-
/* Validação:
|
|
1098
|
+
/* Validação: borda sempre; o brilho (anel) segue o token do preset
|
|
1099
|
+
--fx-effect-error-ring, que acompanha effect.focus-ring — anel
|
|
1100
|
+
desligado ⇒ erro só com a borda vermelha, ligado ⇒ soma o brilho. */
|
|
1067
1101
|
:host([error]) .field,
|
|
1068
1102
|
:host([invalid]) .field,
|
|
1069
1103
|
:host([error]) .field:focus-visible,
|
|
1070
1104
|
:host([invalid]) .field:focus-visible {
|
|
1071
1105
|
border-color: var(--fx-color-danger, #dc2626);
|
|
1072
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--fx-color-danger, #dc2626) 18%, transparent);
|
|
1106
|
+
box-shadow: var(--fx-effect-error-ring, 0 0 0 3px color-mix(in srgb, var(--fx-color-danger, #dc2626) 18%, transparent));
|
|
1073
1107
|
}
|
|
1074
1108
|
:host([success]) .field,
|
|
1075
1109
|
:host([valid]) .field,
|
|
1076
1110
|
:host([success]) .field:focus-visible,
|
|
1077
1111
|
:host([valid]) .field:focus-visible {
|
|
1078
1112
|
border-color: var(--fx-color-success, #16a34a);
|
|
1079
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--fx-color-success, #16a34a) 18%, transparent);
|
|
1113
|
+
box-shadow: var(--fx-effect-success-ring, 0 0 0 3px color-mix(in srgb, var(--fx-color-success, #16a34a) 18%, transparent));
|
|
1080
1114
|
}
|
|
1081
1115
|
:host([size='sm']) { width: var(--fx-input-width-sm, 220px); }
|
|
1082
|
-
:host([size='sm']) .field { padding: var(--fx-space-
|
|
1116
|
+
:host([size='sm']) .field { padding: var(--fx-space-xs) var(--fx-space-md); font-size: var(--fx-font-size); min-height: var(--fx-size-sm); }
|
|
1083
1117
|
:host([size='lg']) { width: var(--fx-input-width-lg, 300px); }
|
|
1084
|
-
:host([size='lg']) .field { padding: var(--fx-space-
|
|
1118
|
+
:host([size='lg']) .field { padding: var(--fx-space-sm) var(--fx-space-xl); font-size: calc(var(--fx-font-size) + 4px); min-height: var(--fx-size-lg); }
|
|
1085
1119
|
/* Full width: o host estica até o pai e o campo interno acompanha
|
|
1086
1120
|
(usar com um container de largura controlada, ex. w-full no Vue). */
|
|
1087
1121
|
:host([full]) { display: block; width: 100%; }
|
|
@@ -1475,6 +1509,8 @@ _FxMultiselect.styles = css`
|
|
|
1475
1509
|
min-height: var(--fx-size-md);
|
|
1476
1510
|
padding: var(--fx-space-xs) var(--fx-space-md);
|
|
1477
1511
|
font: inherit;
|
|
1512
|
+
/* Altura determinística: a caixa fica no token --fx-size-*. */
|
|
1513
|
+
line-height: var(--fx-font-line-height);
|
|
1478
1514
|
color: var(--fx-text-default);
|
|
1479
1515
|
background-color: var(--fx-surface-background);
|
|
1480
1516
|
border: 1px solid var(--fx-border-default);
|
|
@@ -1500,28 +1536,31 @@ _FxMultiselect.styles = css`
|
|
|
1500
1536
|
/* Full width: o host estica até o pai e o trigger acompanha. */
|
|
1501
1537
|
:host([full]) { display: block; width: 100%; }
|
|
1502
1538
|
:host([full]) .trigger { width: 100%; }
|
|
1503
|
-
/* Validação
|
|
1539
|
+
/* Validação — borda e brilho JÁ EM REPOUSO (igual ao fx-input); o brilho
|
|
1540
|
+
segue o token --fx-effect-error-ring, que acompanha effect.focus-ring. */
|
|
1504
1541
|
:host([error]) .trigger,
|
|
1505
1542
|
:host([invalid]) .trigger {
|
|
1506
1543
|
border-color: var(--fx-color-danger, #dc2626);
|
|
1544
|
+
box-shadow: var(--fx-effect-error-ring, 0 0 0 3px color-mix(in srgb, var(--fx-color-danger, #dc2626) 18%, transparent));
|
|
1507
1545
|
}
|
|
1508
1546
|
:host([error]) .trigger:focus-visible,
|
|
1509
1547
|
:host([invalid]) .trigger:focus-visible,
|
|
1510
1548
|
:host([error][open]) .trigger,
|
|
1511
1549
|
:host([invalid][open]) .trigger {
|
|
1512
1550
|
border-color: var(--fx-color-danger, #dc2626);
|
|
1513
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--fx-color-danger, #dc2626) 18%, transparent);
|
|
1551
|
+
box-shadow: var(--fx-effect-error-ring, 0 0 0 3px color-mix(in srgb, var(--fx-color-danger, #dc2626) 18%, transparent));
|
|
1514
1552
|
}
|
|
1515
1553
|
:host([success]) .trigger,
|
|
1516
1554
|
:host([valid]) .trigger {
|
|
1517
1555
|
border-color: var(--fx-color-success, #16a34a);
|
|
1556
|
+
box-shadow: var(--fx-effect-success-ring, 0 0 0 3px color-mix(in srgb, var(--fx-color-success, #16a34a) 18%, transparent));
|
|
1518
1557
|
}
|
|
1519
1558
|
:host([success]) .trigger:focus-visible,
|
|
1520
1559
|
:host([valid]) .trigger:focus-visible,
|
|
1521
1560
|
:host([success][open]) .trigger,
|
|
1522
1561
|
:host([valid][open]) .trigger {
|
|
1523
1562
|
border-color: var(--fx-color-success, #16a34a);
|
|
1524
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--fx-color-success, #16a34a) 18%, transparent);
|
|
1563
|
+
box-shadow: var(--fx-effect-success-ring, 0 0 0 3px color-mix(in srgb, var(--fx-color-success, #16a34a) 18%, transparent));
|
|
1525
1564
|
}
|
|
1526
1565
|
.trigger:hover { border-color: var(--fx-border-hover); }
|
|
1527
1566
|
.trigger:focus-visible {
|
|
@@ -1928,9 +1967,9 @@ const _FxCalendar = class _FxCalendar extends FxElement {
|
|
|
1928
1967
|
<div class="grid ${this.view}">${cells}</div>
|
|
1929
1968
|
`);
|
|
1930
1969
|
this.root.querySelectorAll("[data-nav]").forEach(
|
|
1931
|
-
(
|
|
1970
|
+
(b) => b.addEventListener(
|
|
1932
1971
|
"click",
|
|
1933
|
-
() => this.navigate(Number(
|
|
1972
|
+
() => this.navigate(Number(b.dataset.nav))
|
|
1934
1973
|
)
|
|
1935
1974
|
);
|
|
1936
1975
|
const gotoBtn = this.root.querySelector("[data-goto]");
|
|
@@ -1939,21 +1978,21 @@ const _FxCalendar = class _FxCalendar extends FxElement {
|
|
|
1939
1978
|
this.render();
|
|
1940
1979
|
});
|
|
1941
1980
|
this.root.querySelectorAll("[data-day]").forEach(
|
|
1942
|
-
(
|
|
1981
|
+
(b) => b.addEventListener(
|
|
1943
1982
|
"click",
|
|
1944
|
-
() => this.pickDay(Number(
|
|
1983
|
+
() => this.pickDay(Number(b.dataset.day))
|
|
1945
1984
|
)
|
|
1946
1985
|
);
|
|
1947
1986
|
this.root.querySelectorAll("[data-month]").forEach(
|
|
1948
|
-
(
|
|
1949
|
-
this.cursor.m = Number(
|
|
1987
|
+
(b) => b.addEventListener("click", () => {
|
|
1988
|
+
this.cursor.m = Number(b.dataset.month);
|
|
1950
1989
|
this.view = "days";
|
|
1951
1990
|
this.render();
|
|
1952
1991
|
})
|
|
1953
1992
|
);
|
|
1954
1993
|
this.root.querySelectorAll("[data-year]").forEach(
|
|
1955
|
-
(
|
|
1956
|
-
this.cursor.y = Number(
|
|
1994
|
+
(b) => b.addEventListener("click", () => {
|
|
1995
|
+
this.cursor.y = Number(b.dataset.year);
|
|
1957
1996
|
this.view = "months";
|
|
1958
1997
|
this.render();
|
|
1959
1998
|
})
|
|
@@ -2364,7 +2403,7 @@ const _FxDatepicker = class _FxDatepicker extends FxElement {
|
|
|
2364
2403
|
if (Number.isNaN(d.getTime())) return null;
|
|
2365
2404
|
const [y, m, day] = iso.split("-").map((n) => parseInt(n, 10));
|
|
2366
2405
|
if (d.getFullYear() !== y || d.getMonth() + 1 !== m || d.getDate() !== day) return null;
|
|
2367
|
-
const cmp = (a,
|
|
2406
|
+
const cmp = (a, b) => a.split("T")[0].localeCompare(b.split("T")[0]);
|
|
2368
2407
|
const min = this.getAttr("min");
|
|
2369
2408
|
const max = this.getAttr("max");
|
|
2370
2409
|
if (min && cmp(iso, min) < 0) return null;
|
|
@@ -2391,9 +2430,9 @@ const _FxDatepicker = class _FxDatepicker extends FxElement {
|
|
|
2391
2430
|
this.setAttribute("start", this.withTime(parsed));
|
|
2392
2431
|
this.removeAttribute("end");
|
|
2393
2432
|
} else {
|
|
2394
|
-
const [a,
|
|
2433
|
+
const [a, b] = [this.getAttr("start").split("T")[0], parsed].sort();
|
|
2395
2434
|
this.setAttribute("start", this.withTime(a));
|
|
2396
|
-
this.setAttribute("end", this.withTime(
|
|
2435
|
+
this.setAttribute("end", this.withTime(b));
|
|
2397
2436
|
}
|
|
2398
2437
|
this.emitChange({ start: this.getAttr("start"), end: this.getAttr("end") });
|
|
2399
2438
|
} else {
|
|
@@ -2423,6 +2462,8 @@ _FxDatepicker.styles = css`
|
|
|
2423
2462
|
min-height: var(--fx-size-md, 40px);
|
|
2424
2463
|
min-width: 150px;
|
|
2425
2464
|
padding: var(--fx-space-xs) var(--fx-space-md);
|
|
2465
|
+
/* Altura determinística: a caixa fica EXATAMENTE no token --fx-size-*. */
|
|
2466
|
+
line-height: var(--fx-font-line-height);
|
|
2426
2467
|
background-color: var(--fx-surface-background);
|
|
2427
2468
|
border: 1px solid var(--fx-border-default);
|
|
2428
2469
|
border-radius: var(--fx-radius-md);
|
|
@@ -2431,9 +2472,9 @@ _FxDatepicker.styles = css`
|
|
|
2431
2472
|
border-color var(--fx-motion-duration-normal) var(--fx-motion-easing),
|
|
2432
2473
|
box-shadow var(--fx-motion-duration-normal) var(--fx-motion-easing);
|
|
2433
2474
|
}
|
|
2434
|
-
:host([size='sm']) .field { min-height:
|
|
2435
|
-
:host([size='md']) .field { min-height:
|
|
2436
|
-
:host([size='lg']) .field { min-height:
|
|
2475
|
+
:host([size='sm']) .field { min-height: var(--fx-size-sm); min-width: 180px; }
|
|
2476
|
+
:host([size='md']) .field { min-height: var(--fx-size-md); }
|
|
2477
|
+
:host([size='lg']) .field { min-height: var(--fx-size-lg); min-width: 220px; font-size: calc(var(--fx-font-size) + 4px); }
|
|
2437
2478
|
/* Range e multiple exibem mais de uma data: campo mais largo */
|
|
2438
2479
|
:host([mode='range']) .field { min-width: 250px; }
|
|
2439
2480
|
:host([mode='multiple']) .field { min-width: 220px; }
|
|
@@ -2444,28 +2485,31 @@ _FxDatepicker.styles = css`
|
|
|
2444
2485
|
descartados para permitir layouts estreitos sob controle do pai). */
|
|
2445
2486
|
:host([full]) { display: block; width: 100%; }
|
|
2446
2487
|
:host([full]) .field { min-width: 0; }
|
|
2447
|
-
/* Validação
|
|
2488
|
+
/* Validação — borda e brilho JÁ EM REPOUSO (igual ao fx-input); o brilho
|
|
2489
|
+
segue o token --fx-effect-error-ring, que acompanha effect.focus-ring. */
|
|
2448
2490
|
:host([error]) .field,
|
|
2449
2491
|
:host([invalid]) .field {
|
|
2450
2492
|
border-color: var(--fx-color-danger, #dc2626);
|
|
2493
|
+
box-shadow: var(--fx-effect-error-ring, 0 0 0 3px color-mix(in srgb, var(--fx-color-danger, #dc2626) 18%, transparent));
|
|
2451
2494
|
}
|
|
2452
2495
|
:host([error]) .field:focus-within,
|
|
2453
2496
|
:host([invalid]) .field:focus-within,
|
|
2454
2497
|
:host([error][open]) .field,
|
|
2455
2498
|
:host([invalid][open]) .field {
|
|
2456
2499
|
border-color: var(--fx-color-danger, #dc2626);
|
|
2457
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--fx-color-danger, #dc2626) 18%, transparent);
|
|
2500
|
+
box-shadow: var(--fx-effect-error-ring, 0 0 0 3px color-mix(in srgb, var(--fx-color-danger, #dc2626) 18%, transparent));
|
|
2458
2501
|
}
|
|
2459
2502
|
:host([success]) .field,
|
|
2460
2503
|
:host([valid]) .field {
|
|
2461
2504
|
border-color: var(--fx-color-success, #16a34a);
|
|
2505
|
+
box-shadow: var(--fx-effect-success-ring, 0 0 0 3px color-mix(in srgb, var(--fx-color-success, #16a34a) 18%, transparent));
|
|
2462
2506
|
}
|
|
2463
2507
|
:host([success]) .field:focus-within,
|
|
2464
2508
|
:host([valid]) .field:focus-within,
|
|
2465
2509
|
:host([success][open]) .field,
|
|
2466
2510
|
:host([valid][open]) .field {
|
|
2467
2511
|
border-color: var(--fx-color-success, #16a34a);
|
|
2468
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--fx-color-success, #16a34a) 18%, transparent);
|
|
2512
|
+
box-shadow: var(--fx-effect-success-ring, 0 0 0 3px color-mix(in srgb, var(--fx-color-success, #16a34a) 18%, transparent));
|
|
2469
2513
|
}
|
|
2470
2514
|
.field:hover { border-color: var(--fx-border-hover); }
|
|
2471
2515
|
.field:focus-within {
|
|
@@ -3355,8 +3399,8 @@ const _FxTable = class _FxTable extends FxElement {
|
|
|
3355
3399
|
}
|
|
3356
3400
|
const total = this.lazy ? this.total : out.length;
|
|
3357
3401
|
if (this.sortField) {
|
|
3358
|
-
out.sort((a,
|
|
3359
|
-
const av = a[this.sortField], bv =
|
|
3402
|
+
out.sort((a, b) => {
|
|
3403
|
+
const av = a[this.sortField], bv = b[this.sortField];
|
|
3360
3404
|
if (typeof av === "number" && typeof bv === "number")
|
|
3361
3405
|
return (av - bv) * this.sortDir;
|
|
3362
3406
|
return String(av ?? "").localeCompare(String(bv ?? ""), "pt-BR") * this.sortDir;
|
|
@@ -4140,6 +4184,8 @@ _FxTextarea.styles = css`
|
|
|
4140
4184
|
.field {
|
|
4141
4185
|
font-family: inherit;
|
|
4142
4186
|
font-size: inherit;
|
|
4187
|
+
/* Altura determinística: a caixa fica EXATAMENTE no token --fx-size-*. */
|
|
4188
|
+
line-height: var(--fx-font-line-height);
|
|
4143
4189
|
font-weight: var(--fx-font-weight);
|
|
4144
4190
|
color: var(--fx-text-default);
|
|
4145
4191
|
background-color: var(--fx-surface-background);
|
|
@@ -4168,16 +4214,18 @@ _FxTextarea.styles = css`
|
|
|
4168
4214
|
cursor: not-allowed;
|
|
4169
4215
|
background-color: var(--fx-surface-surface-hover);
|
|
4170
4216
|
}
|
|
4217
|
+
/* Validação: borda sempre; brilho (anel) via token que acompanha
|
|
4218
|
+
effect.focus-ring — desligado ⇒ erro só com a borda vermelha. */
|
|
4171
4219
|
:host([error]) .field, :host([invalid]) .field {
|
|
4172
4220
|
border-color: var(--fx-color-danger, #dc2626);
|
|
4173
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--fx-color-danger, #dc2626) 18%, transparent);
|
|
4221
|
+
box-shadow: var(--fx-effect-error-ring, 0 0 0 3px color-mix(in srgb, var(--fx-color-danger, #dc2626) 18%, transparent));
|
|
4174
4222
|
}
|
|
4175
4223
|
:host([success]) .field, :host([valid]) .field {
|
|
4176
4224
|
border-color: var(--fx-color-success, #16a34a);
|
|
4177
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--fx-color-success, #16a34a) 18%, transparent);
|
|
4225
|
+
box-shadow: var(--fx-effect-success-ring, 0 0 0 3px color-mix(in srgb, var(--fx-color-success, #16a34a) 18%, transparent));
|
|
4178
4226
|
}
|
|
4179
4227
|
:host([size='sm']) { width: var(--fx-textarea-width-sm, 220px); }
|
|
4180
|
-
:host([size='sm']) .field { min-height: var(--fx-size-sm); padding: var(--fx-space-
|
|
4228
|
+
:host([size='sm']) .field { min-height: var(--fx-size-sm); padding: var(--fx-space-xs) var(--fx-space-md); }
|
|
4181
4229
|
:host([size='lg']) { width: var(--fx-textarea-width-lg, 300px); }
|
|
4182
4230
|
:host([size='lg']) .field { min-height: calc(var(--fx-size-lg) + 80px); }
|
|
4183
4231
|
/* Full width: o host estica até o pai e o campo interno acompanha. */
|
|
@@ -4824,10 +4872,12 @@ _FxFileUpload.styles = css`
|
|
|
4824
4872
|
o botão sem precisar do full (host é shrink-to-fit por padrão). */
|
|
4825
4873
|
width: 100%;
|
|
4826
4874
|
min-height: var(--fx-size-md);
|
|
4827
|
-
|
|
4875
|
+
/* Padding vertical no orçamento do token --fx-size-* ⇒ altura padrão. */
|
|
4876
|
+
padding: var(--fx-space-sm) var(--fx-space-lg);
|
|
4828
4877
|
font-family: inherit;
|
|
4829
4878
|
font-size: inherit;
|
|
4830
4879
|
font-weight: var(--fx-font-weight);
|
|
4880
|
+
line-height: var(--fx-font-line-height);
|
|
4831
4881
|
color: var(--fx-text-default);
|
|
4832
4882
|
background-color: var(--fx-surface-background);
|
|
4833
4883
|
border: 1px solid var(--fx-border-default);
|
|
@@ -4854,8 +4904,8 @@ _FxFileUpload.styles = css`
|
|
|
4854
4904
|
:host([severity='info']) .btn { background: var(--fx-color-info); border-color: transparent; color: #fff; }
|
|
4855
4905
|
:host([severity]) .btn:hover { filter: brightness(0.88); }
|
|
4856
4906
|
:host([severity]) .btn:focus-visible { border-color: transparent; }
|
|
4857
|
-
:host([size='sm']) .btn { min-height: var(--fx-size-sm); padding: var(--fx-space-
|
|
4858
|
-
:host([size='lg']) .btn { min-height: var(--fx-size-lg); padding: var(--fx-space-
|
|
4907
|
+
:host([size='sm']) .btn { min-height: var(--fx-size-sm); padding: var(--fx-space-xs) var(--fx-space-md); font-size: calc(var(--fx-font-size) - 2px); }
|
|
4908
|
+
:host([size='lg']) .btn { min-height: var(--fx-size-lg); padding: var(--fx-space-sm) var(--fx-space-xl); font-size: calc(var(--fx-font-size) + 4px); }
|
|
4859
4909
|
:host([size='sm']) .drop { min-height: 72px; }
|
|
4860
4910
|
:host([size='lg']) .drop { min-height: 132px; }
|
|
4861
4911
|
|
|
@@ -5415,6 +5465,75 @@ function defineFxAvatar() {
|
|
|
5415
5465
|
return defineElement("fx-avatar", FxAvatar);
|
|
5416
5466
|
}
|
|
5417
5467
|
defineFxAvatar();
|
|
5468
|
+
const _FxIcon = class _FxIcon extends FxElement {
|
|
5469
|
+
static get observedAttributes() {
|
|
5470
|
+
return ["name", "size", "label", "fill", "bold"];
|
|
5471
|
+
}
|
|
5472
|
+
/** Nome do glifo (ou texto livre/emoji). */
|
|
5473
|
+
get name() {
|
|
5474
|
+
return this.getAttr("name");
|
|
5475
|
+
}
|
|
5476
|
+
set name(value) {
|
|
5477
|
+
this.setAttribute("name", value);
|
|
5478
|
+
}
|
|
5479
|
+
/** Tamanho: '' (herda 1em) | 'sm' | 'md' | 'lg' | 'xl'. */
|
|
5480
|
+
get size() {
|
|
5481
|
+
return this.getAttr("size");
|
|
5482
|
+
}
|
|
5483
|
+
set size(value) {
|
|
5484
|
+
if (value) this.setAttribute("size", value);
|
|
5485
|
+
else this.removeAttribute("size");
|
|
5486
|
+
}
|
|
5487
|
+
/** Nome acessível; vazio = ícone decorativo (aria-hidden). */
|
|
5488
|
+
get label() {
|
|
5489
|
+
return this.getAttr("label");
|
|
5490
|
+
}
|
|
5491
|
+
set label(value) {
|
|
5492
|
+
if (value) this.setAttribute("label", value);
|
|
5493
|
+
else this.removeAttribute("label");
|
|
5494
|
+
}
|
|
5495
|
+
connectedCallback() {
|
|
5496
|
+
loadFenixIconsFont();
|
|
5497
|
+
super.connectedCallback();
|
|
5498
|
+
}
|
|
5499
|
+
render() {
|
|
5500
|
+
const name = this.getAttr("name").trim();
|
|
5501
|
+
const label = this.getAttr("label").trim();
|
|
5502
|
+
const a11y = label ? `role="img" aria-label="${esc(label)}"` : 'aria-hidden="true"';
|
|
5503
|
+
if (!name) {
|
|
5504
|
+
this.setTemplate(`<span class="icon" part="icon" ${a11y}></span>`);
|
|
5505
|
+
return;
|
|
5506
|
+
}
|
|
5507
|
+
const inner = isFenixIconName(name) ? `<i class="icon fx-icon" part="icon" ${a11y}>${esc(name)}</i>` : `<span class="icon" part="icon" ${a11y}>${esc(name)}</span>`;
|
|
5508
|
+
this.setTemplate(inner);
|
|
5509
|
+
}
|
|
5510
|
+
};
|
|
5511
|
+
_FxIcon.styles = css`
|
|
5512
|
+
:host {
|
|
5513
|
+
display: inline-flex;
|
|
5514
|
+
align-items: center;
|
|
5515
|
+
justify-content: center;
|
|
5516
|
+
vertical-align: middle;
|
|
5517
|
+
line-height: 1;
|
|
5518
|
+
color: currentColor;
|
|
5519
|
+
font-size: var(--fx-icon-size, 1em);
|
|
5520
|
+
}
|
|
5521
|
+
:host([size='sm']) { font-size: var(--fx-icon-size-sm, 16px); }
|
|
5522
|
+
:host([size='md']) { font-size: var(--fx-icon-size-md, 20px); }
|
|
5523
|
+
:host([size='lg']) { font-size: var(--fx-icon-size-lg, 24px); }
|
|
5524
|
+
:host([size='xl']) { font-size: var(--fx-icon-size-xl, 32px); }
|
|
5525
|
+
:host([hidden]) { display: none; }
|
|
5526
|
+
.icon { display: inline-block; }
|
|
5527
|
+
/* Variantes da fonte (FILL/wght): vencem a classe base .fx-icon. */
|
|
5528
|
+
:host([fill]) .icon { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
|
|
5529
|
+
:host([bold]) .icon { font-variation-settings: 'FILL' 0, 'wght' 600, 'GRAD' 0, 'opsz' 24; }
|
|
5530
|
+
${FENIX_ICON_BASE_CSS}
|
|
5531
|
+
`;
|
|
5532
|
+
let FxIcon = _FxIcon;
|
|
5533
|
+
function defineFxIcon() {
|
|
5534
|
+
return defineElement("fx-icon", FxIcon);
|
|
5535
|
+
}
|
|
5536
|
+
defineFxIcon();
|
|
5418
5537
|
const _FxCard = class _FxCard extends FxElement {
|
|
5419
5538
|
static get observedAttributes() {
|
|
5420
5539
|
return ["variant", "radius", "size", "padded", "heading"];
|
|
@@ -6303,6 +6422,8 @@ _FxToggleButtonGroup.styles = css`
|
|
|
6303
6422
|
min-height: var(--fx-size-md);
|
|
6304
6423
|
padding: var(--fx-space-sm) var(--fx-space-lg);
|
|
6305
6424
|
font-weight: var(--fx-font-weight);
|
|
6425
|
+
/* Altura determinística: a caixa fica EXATAMENTE no token --fx-size-*. */
|
|
6426
|
+
line-height: var(--fx-font-line-height);
|
|
6306
6427
|
color: var(--fx-text-default);
|
|
6307
6428
|
background: var(--fx-surface-background);
|
|
6308
6429
|
border: 1px solid var(--fx-border-default);
|
|
@@ -6312,7 +6433,7 @@ _FxToggleButtonGroup.styles = css`
|
|
|
6312
6433
|
transition: background var(--fx-motion-duration-fast) var(--fx-motion-easing), border-color var(--fx-motion-duration-fast) var(--fx-motion-easing), color var(--fx-motion-duration-fast) var(--fx-motion-easing);
|
|
6313
6434
|
}
|
|
6314
6435
|
:host([size='sm']) .option { min-height: var(--fx-size-sm); padding: var(--fx-space-xs) var(--fx-space-md); font-size: calc(var(--fx-font-size) - 2px); }
|
|
6315
|
-
:host([size='lg']) .option { min-height: var(--fx-size-lg); padding: var(--fx-space-
|
|
6436
|
+
:host([size='lg']) .option { min-height: var(--fx-size-lg); padding: var(--fx-space-sm) var(--fx-space-xl); font-size: calc(var(--fx-font-size) + 2px); }
|
|
6316
6437
|
.option:hover { border-color: var(--fx-color-primary); }
|
|
6317
6438
|
.option.active {
|
|
6318
6439
|
background: var(--fx-color-primary);
|
|
@@ -8515,12 +8636,14 @@ _FxAutocomplete.styles = css`
|
|
|
8515
8636
|
.field {
|
|
8516
8637
|
font-family: inherit;
|
|
8517
8638
|
font-size: inherit;
|
|
8639
|
+
/* Altura determinística: a caixa fica EXATAMENTE no token --fx-size-*. */
|
|
8640
|
+
line-height: var(--fx-font-line-height);
|
|
8518
8641
|
font-weight: var(--fx-font-weight);
|
|
8519
8642
|
color: var(--fx-text-default);
|
|
8520
8643
|
background-color: var(--fx-surface-background);
|
|
8521
8644
|
border: 1px solid var(--fx-border-default);
|
|
8522
8645
|
border-radius: var(--fx-radius-md);
|
|
8523
|
-
padding: var(--fx-space-
|
|
8646
|
+
padding: var(--fx-space-sm) var(--fx-space-lg);
|
|
8524
8647
|
/* Acompanha a largura definida no :host. */
|
|
8525
8648
|
width: 100%;
|
|
8526
8649
|
min-height: var(--fx-size-md);
|
|
@@ -8537,22 +8660,23 @@ _FxAutocomplete.styles = css`
|
|
|
8537
8660
|
box-shadow: var(--fx-effect-focus-ring, none);
|
|
8538
8661
|
}
|
|
8539
8662
|
:host([size='sm']) { width: var(--fx-autocomplete-width-sm, 220px); }
|
|
8540
|
-
:host([size='sm']) .field { min-height: var(--fx-size-sm); padding: var(--fx-space-
|
|
8663
|
+
:host([size='sm']) .field { min-height: var(--fx-size-sm); padding: var(--fx-space-xs) var(--fx-space-md); }
|
|
8541
8664
|
:host([size='lg']) { width: var(--fx-autocomplete-width-lg, 300px); }
|
|
8542
|
-
:host([size='lg']) .field { min-height: var(--fx-size-lg); }
|
|
8665
|
+
:host([size='lg']) .field { min-height: var(--fx-size-lg); padding: var(--fx-space-sm) var(--fx-space-lg); }
|
|
8543
8666
|
/* Full width: o host estica até o pai e o campo interno acompanha. */
|
|
8544
8667
|
:host([full]) { display: block; width: 100%; }
|
|
8545
8668
|
:host([full]) .field { width: 100%; }
|
|
8546
|
-
/* Validação:
|
|
8669
|
+
/* Validação: borda sempre; brilho (anel) via token que acompanha
|
|
8670
|
+
effect.focus-ring — desligado ⇒ erro só com a borda vermelha. */
|
|
8547
8671
|
:host([error]) .field,
|
|
8548
8672
|
:host([invalid]) .field {
|
|
8549
8673
|
border-color: var(--fx-color-danger, #dc2626);
|
|
8550
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--fx-color-danger, #dc2626) 18%, transparent);
|
|
8674
|
+
box-shadow: var(--fx-effect-error-ring, 0 0 0 3px color-mix(in srgb, var(--fx-color-danger, #dc2626) 18%, transparent));
|
|
8551
8675
|
}
|
|
8552
8676
|
:host([success]) .field,
|
|
8553
8677
|
:host([valid]) .field {
|
|
8554
8678
|
border-color: var(--fx-color-success, #16a34a);
|
|
8555
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--fx-color-success, #16a34a) 18%, transparent);
|
|
8679
|
+
box-shadow: var(--fx-effect-success-ring, 0 0 0 3px color-mix(in srgb, var(--fx-color-success, #16a34a) 18%, transparent));
|
|
8556
8680
|
}
|
|
8557
8681
|
.list {
|
|
8558
8682
|
position: absolute;
|
|
@@ -8909,7 +9033,9 @@ _FxKnob.styles = css`
|
|
|
8909
9033
|
outline: none;
|
|
8910
9034
|
}
|
|
8911
9035
|
.knob:focus-visible svg {
|
|
8912
|
-
|
|
9036
|
+
/* Mesmo fallback none dos demais componentes: sem motor de tema (ou com
|
|
9037
|
+
effect.focus-ring desligado) não há anel de foco. */
|
|
9038
|
+
filter: drop-shadow(var(--fx-effect-focus-ring, none));
|
|
8913
9039
|
}
|
|
8914
9040
|
`;
|
|
8915
9041
|
let FxKnob = _FxKnob;
|
|
@@ -9394,7 +9520,7 @@ const _FxOrderList = class _FxOrderList extends FxElement {
|
|
|
9394
9520
|
_handleMoveAction(action) {
|
|
9395
9521
|
if (!this._selection.length) return;
|
|
9396
9522
|
const displayData = this._getDisplayData();
|
|
9397
|
-
const selectedIndices = this._selection.map((s2) => displayData.findIndex((d) => this._getItemKey(d, -1) === this._getItemKey(s2, -1))).filter((i) => i >= 0).sort((a,
|
|
9523
|
+
const selectedIndices = this._selection.map((s2) => displayData.findIndex((d) => this._getItemKey(d, -1) === this._getItemKey(s2, -1))).filter((i) => i >= 0).sort((a, b) => a - b);
|
|
9398
9524
|
if (selectedIndices.length === 0) return;
|
|
9399
9525
|
switch (action) {
|
|
9400
9526
|
case "top":
|
|
@@ -9419,7 +9545,7 @@ const _FxOrderList = class _FxOrderList extends FxElement {
|
|
|
9419
9545
|
items.push(this._data[actualIdx]);
|
|
9420
9546
|
actualIndices.push(actualIdx);
|
|
9421
9547
|
}
|
|
9422
|
-
actualIndices.sort((a,
|
|
9548
|
+
actualIndices.sort((a, b) => b - a).forEach((i) => this._data.splice(i, 1));
|
|
9423
9549
|
const insertIdx = this._getActualIndex(0);
|
|
9424
9550
|
this._data.splice(insertIdx, 0, ...items);
|
|
9425
9551
|
this._applyFilter();
|
|
@@ -9435,7 +9561,7 @@ const _FxOrderList = class _FxOrderList extends FxElement {
|
|
|
9435
9561
|
items.push(this._data[actualIdx]);
|
|
9436
9562
|
actualIndices.push(actualIdx);
|
|
9437
9563
|
}
|
|
9438
|
-
actualIndices.sort((a,
|
|
9564
|
+
actualIndices.sort((a, b) => b - a).forEach((i) => this._data.splice(i, 1));
|
|
9439
9565
|
const displayData = this._getDisplayData();
|
|
9440
9566
|
const insertIdx = this._getActualIndex(displayData.length - 1);
|
|
9441
9567
|
this._data.splice(insertIdx + 1, 0, ...items);
|
|
@@ -9447,7 +9573,7 @@ const _FxOrderList = class _FxOrderList extends FxElement {
|
|
|
9447
9573
|
_moveSelectedByOne(indices, delta) {
|
|
9448
9574
|
const displayData = this._getDisplayData();
|
|
9449
9575
|
if (displayData.length === 0) return;
|
|
9450
|
-
const actualIndices = indices.map((idx) => this._getActualIndex(idx)).filter((idx) => idx >= 0).sort((a,
|
|
9576
|
+
const actualIndices = indices.map((idx) => this._getActualIndex(idx)).filter((idx) => idx >= 0).sort((a, b) => a - b);
|
|
9451
9577
|
if (actualIndices.length === 0) return;
|
|
9452
9578
|
if (delta < 0 && actualIndices[0] <= 0) return;
|
|
9453
9579
|
if (delta > 0 && actualIndices[actualIndices.length - 1] >= this._data.length - 1) return;
|
|
@@ -9515,7 +9641,7 @@ _FxOrderList.styles = css`
|
|
|
9515
9641
|
.select-all-bar input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--orderlist-primary); cursor: pointer; }
|
|
9516
9642
|
.filter-wrapper { margin-bottom: var(--fx-space-xs, 4px); }
|
|
9517
9643
|
.filter-input { width: 100%; padding: var(--fx-space-sm, 10px) var(--fx-space-md, 14px); padding-left: 42px; border: 1.5px solid var(--orderlist-border); border-radius: var(--orderlist-radius); font-family: inherit; font-size: inherit; color: var(--orderlist-text); background: var(--orderlist-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat 14px center; transition: var(--orderlist-transition); }
|
|
9518
|
-
.filter-input:focus { outline: none; border-color: var(--orderlist-primary); box-shadow:
|
|
9644
|
+
.filter-input:focus { outline: none; border-color: var(--orderlist-primary); box-shadow: var(--fx-effect-focus-ring, none); }
|
|
9519
9645
|
.filter-input::placeholder { color: var(--orderlist-text-muted); }
|
|
9520
9646
|
.main-row { display: flex; align-items: stretch; gap: var(--fx-space-sm, 8px); }
|
|
9521
9647
|
.list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--orderlist-border); border-radius: var(--orderlist-radius); overflow: hidden; box-shadow: var(--orderlist-shadow); max-height: 450px; overflow-y: auto; flex: 1; }
|
|
@@ -9558,7 +9684,7 @@ _FxOrderList.styles = css`
|
|
|
9558
9684
|
button.control-btn { display: flex; align-items: center; justify-content: center; width: 42px; height: 38px; padding: 0; border: none; border-radius: 8px; background: transparent; color: var(--orderlist-text-muted); cursor: pointer; font-size: 16px; line-height: 1; transition: var(--orderlist-transition); position: relative; }
|
|
9559
9685
|
button.control-btn:hover:not(:disabled) { background: var(--orderlist-bg-hover); color: var(--orderlist-primary); transform: scale(1.1); }
|
|
9560
9686
|
button.control-btn:active:not(:disabled) { transform: scale(0.92); background: color-mix(in srgb, var(--orderlist-primary) 15%, transparent); }
|
|
9561
|
-
button.control-btn:focus-visible { outline: none; box-shadow:
|
|
9687
|
+
button.control-btn:focus-visible { outline: none; box-shadow: var(--fx-effect-focus-ring, none); }
|
|
9562
9688
|
button.control-btn:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }
|
|
9563
9689
|
.control-btn-icon { font-size: 18px; line-height: 1; }
|
|
9564
9690
|
/* Tooltip nos botoes */
|
|
@@ -10169,7 +10295,7 @@ _FxPickList.styles = css`
|
|
|
10169
10295
|
.filter-input:focus {
|
|
10170
10296
|
outline: none;
|
|
10171
10297
|
border-color: var(--picklist-primary);
|
|
10172
|
-
box-shadow:
|
|
10298
|
+
box-shadow: var(--fx-effect-focus-ring, none);
|
|
10173
10299
|
}
|
|
10174
10300
|
.filter-input::placeholder {
|
|
10175
10301
|
color: var(--picklist-text-muted);
|
|
@@ -10266,7 +10392,7 @@ _FxPickList.styles = css`
|
|
|
10266
10392
|
}
|
|
10267
10393
|
button.control-btn:focus-visible {
|
|
10268
10394
|
outline: none;
|
|
10269
|
-
box-shadow:
|
|
10395
|
+
box-shadow: var(--fx-effect-focus-ring, none);
|
|
10270
10396
|
}
|
|
10271
10397
|
button.control-btn:disabled {
|
|
10272
10398
|
opacity: 0.3;
|
|
@@ -10619,6 +10745,7 @@ export {
|
|
|
10619
10745
|
FxEmptyState,
|
|
10620
10746
|
FxFileUpload,
|
|
10621
10747
|
FxFloatlabel,
|
|
10748
|
+
FxIcon,
|
|
10622
10749
|
FxInput,
|
|
10623
10750
|
FxKnob,
|
|
10624
10751
|
FxMenu,
|
|
@@ -10665,7 +10792,7 @@ export {
|
|
|
10665
10792
|
resetTheme,
|
|
10666
10793
|
s as sanitizeData,
|
|
10667
10794
|
setTokens,
|
|
10668
|
-
|
|
10795
|
+
g as stripTags,
|
|
10669
10796
|
theme,
|
|
10670
10797
|
themePresets,
|
|
10671
10798
|
tokenCssVars
|