@wrrdev/fenix-ui 1.1.11 → 1.1.12
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 +2 -2
- package/dist/components/table/table.d.ts +2 -1
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +92 -22
- package/dist/components/table/table.js.map +1 -1
- package/dist/core/jsx.d.ts +19 -0
- package/dist/core/jsx.d.ts.map +1 -1
- package/dist/core/jsx.js.map +1 -1
- package/dist/docs/componentes/table.doc.d.ts.map +1 -1
- package/dist/fenix-ui.umd.min.js +138 -71
- package/dist/fenix-ui4.esm.js +91 -21
- package/dist/fenix-ui4.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/fenix-ui4.esm.js
CHANGED
|
@@ -3311,7 +3311,10 @@ const _FxTable = class _FxTable extends FxElement {
|
|
|
3311
3311
|
"loading",
|
|
3312
3312
|
"loading-message",
|
|
3313
3313
|
"sort-field",
|
|
3314
|
-
"sort-order"
|
|
3314
|
+
"sort-order",
|
|
3315
|
+
"rounded",
|
|
3316
|
+
"radius",
|
|
3317
|
+
"no-borders-x"
|
|
3315
3318
|
];
|
|
3316
3319
|
}
|
|
3317
3320
|
get data() {
|
|
@@ -3550,16 +3553,18 @@ const _FxTable = class _FxTable extends FxElement {
|
|
|
3550
3553
|
this._shellKey = shellKey;
|
|
3551
3554
|
this.setTemplate(`
|
|
3552
3555
|
${toolbarHtml}
|
|
3553
|
-
<div class="
|
|
3554
|
-
<div class="
|
|
3555
|
-
<
|
|
3556
|
-
<
|
|
3557
|
-
|
|
3558
|
-
|
|
3556
|
+
<div class="frame${toolbar ? " has-toolbar" : ""}" part="frame">
|
|
3557
|
+
<div class="table-wrap">
|
|
3558
|
+
<div class="scroll">
|
|
3559
|
+
<table part="table">
|
|
3560
|
+
<thead><tr>${headHtml}</tr>${filterRow}</thead>
|
|
3561
|
+
<tbody>${bodyHtml}</tbody>
|
|
3562
|
+
</table>
|
|
3563
|
+
</div>
|
|
3564
|
+
${loadingHtml}
|
|
3559
3565
|
</div>
|
|
3560
|
-
${
|
|
3566
|
+
${pagerHtml}
|
|
3561
3567
|
</div>
|
|
3562
|
-
${pagerHtml}
|
|
3563
3568
|
`);
|
|
3564
3569
|
this.root.querySelectorAll("th.sortable").forEach((th) => {
|
|
3565
3570
|
th.addEventListener("click", () => {
|
|
@@ -3691,14 +3696,61 @@ _FxTable.styles = css`
|
|
|
3691
3696
|
font-size: var(--fx-font-size);
|
|
3692
3697
|
color: var(--fx-text-default);
|
|
3693
3698
|
background: var(--fx-surface-background);
|
|
3699
|
+
/* Raio da moldura (tabela + paginação). O atributo "rounded"
|
|
3700
|
+
sobrescreve este valor e o consumidor também pode sobrescrever
|
|
3701
|
+
por CSS: fx-table { --fx-table-radius: 20px; }. */
|
|
3702
|
+
--fx-table-radius: var(--fx-radius-md);
|
|
3703
|
+
}
|
|
3704
|
+
/* Arredondamento das bordas — "none" deixa tudo reto, como nos demais
|
|
3705
|
+
tokens de radius do design system. "rounded" é o nome atual; "radius"
|
|
3706
|
+
segue aceito como alias para ficar consistente com o <fx-card>. */
|
|
3707
|
+
:host([rounded="none"]),
|
|
3708
|
+
:host([radius="none"]) {
|
|
3709
|
+
--fx-table-radius: var(--fx-radius-none, 0);
|
|
3710
|
+
}
|
|
3711
|
+
:host([rounded="sm"]),
|
|
3712
|
+
:host([radius="sm"]) {
|
|
3713
|
+
--fx-table-radius: var(--fx-radius-sm);
|
|
3714
|
+
}
|
|
3715
|
+
:host([rounded="md"]),
|
|
3716
|
+
:host([radius="md"]) {
|
|
3717
|
+
--fx-table-radius: var(--fx-radius-md);
|
|
3718
|
+
}
|
|
3719
|
+
:host([rounded="lg"]),
|
|
3720
|
+
:host([radius="lg"]) {
|
|
3721
|
+
--fx-table-radius: var(--fx-radius-lg);
|
|
3722
|
+
}
|
|
3723
|
+
/* Moldura: uma única borda envolvendo a tabela E a paginação, para que
|
|
3724
|
+
o pager não fique "solto" fora do contorno da tabela. */
|
|
3725
|
+
.frame {
|
|
3726
|
+
border: 1px solid var(--fx-border-default);
|
|
3727
|
+
border-radius: var(--fx-table-radius);
|
|
3728
|
+
background: var(--fx-surface-background);
|
|
3729
|
+
}
|
|
3730
|
+
/* Com toolbar no topo, quem desenha a borda superior é a própria
|
|
3731
|
+
toolbar — a moldura desenha apenas o contorno restante. */
|
|
3732
|
+
.frame.has-toolbar {
|
|
3733
|
+
border-top: none;
|
|
3734
|
+
}
|
|
3735
|
+
/* "no-borders-x": mantém somente as bordas de topo e de base
|
|
3736
|
+
(tabela encaixada em um layout que já desenha as laterais). */
|
|
3737
|
+
:host([no-borders-x]) .frame,
|
|
3738
|
+
:host([no-borders-x]) .toolbar {
|
|
3739
|
+
border-left: none;
|
|
3740
|
+
border-right: none;
|
|
3694
3741
|
}
|
|
3695
3742
|
.table-wrap {
|
|
3696
3743
|
position: relative;
|
|
3697
3744
|
}
|
|
3698
3745
|
.scroll {
|
|
3699
3746
|
overflow-x: auto;
|
|
3700
|
-
|
|
3701
|
-
|
|
3747
|
+
/* O topo acompanha o raio da moldura; a base fica reta porque o
|
|
3748
|
+
rodapé (.pager) é quem a desenha. */
|
|
3749
|
+
border-radius: var(--fx-table-radius) var(--fx-table-radius) 0 0;
|
|
3750
|
+
}
|
|
3751
|
+
/* Sem paginação não existe rodapé: a moldura fecha embaixo. */
|
|
3752
|
+
:host(:not([pagination])) .scroll {
|
|
3753
|
+
border-radius: var(--fx-table-radius);
|
|
3702
3754
|
}
|
|
3703
3755
|
table {
|
|
3704
3756
|
width: 100%;
|
|
@@ -3785,7 +3837,13 @@ _FxTable.styles = css`
|
|
|
3785
3837
|
align-items: center;
|
|
3786
3838
|
gap: var(--fx-space-sm);
|
|
3787
3839
|
flex-wrap: wrap;
|
|
3788
|
-
|
|
3840
|
+
/* O rodapé é parte da moldura: borda só no topo (separando da
|
|
3841
|
+
tabela) e o mesmo padding horizontal das células. Antes ele
|
|
3842
|
+
ficava fora do contorno, sem borda e sem respiro lateral. */
|
|
3843
|
+
padding: var(--fx-space-sm) var(--fx-space-md);
|
|
3844
|
+
border-top: 1px solid var(--fx-border-default);
|
|
3845
|
+
border-radius: 0 0 var(--fx-table-radius) var(--fx-table-radius);
|
|
3846
|
+
background: var(--fx-surface-background);
|
|
3789
3847
|
}
|
|
3790
3848
|
:host([pagination-position="center"]) .pager {
|
|
3791
3849
|
justify-content: center;
|
|
@@ -3834,15 +3892,27 @@ _FxTable.styles = css`
|
|
|
3834
3892
|
color: #fff;
|
|
3835
3893
|
font-weight: var(--fx-font-weight);
|
|
3836
3894
|
}
|
|
3837
|
-
|
|
3895
|
+
/* O seletor "Por página" só mostra números, então não pode herdar a
|
|
3896
|
+
largura padrão do <fx-select> (200px / 180px em size="sm"), que
|
|
3897
|
+
deixava o rodapé da paginação desproporcional. O limite tem que ser
|
|
3898
|
+
no HOST — apertar só ::part(trigger) não funciona, porque o
|
|
3899
|
+
trigger é width:100% e continua herdando o min-width do host.
|
|
3900
|
+
O painel (dropdown) continua largo (220px) em select.ts. */
|
|
3901
|
+
fx-select.rows-sel {
|
|
3838
3902
|
vertical-align: middle;
|
|
3903
|
+
/* Não deixa o flex do .pager esticar nem esmagar o controle. */
|
|
3904
|
+
flex: none;
|
|
3905
|
+
width: auto;
|
|
3906
|
+
--fx-select-min-width: 56px;
|
|
3907
|
+
--fx-select-min-width-sm: 56px;
|
|
3839
3908
|
}
|
|
3840
|
-
fx-select::part(trigger) {
|
|
3841
|
-
min-width:
|
|
3842
|
-
min-height: var(--fx-size-sm)
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3909
|
+
fx-select.rows-sel::part(trigger) {
|
|
3910
|
+
min-width: 0;
|
|
3911
|
+
min-height: var(--fx-size-sm);
|
|
3912
|
+
/* Padding curto: sobra espaço para o número + caret. */
|
|
3913
|
+
padding: 0 var(--fx-space-xs);
|
|
3914
|
+
border-radius: var(--fx-radius-sm);
|
|
3915
|
+
font-size: calc(var(--fx-font-size) - 2px);
|
|
3846
3916
|
}
|
|
3847
3917
|
.toolbar {
|
|
3848
3918
|
display: flex;
|
|
@@ -3852,7 +3922,7 @@ _FxTable.styles = css`
|
|
|
3852
3922
|
padding: var(--fx-space-sm) var(--fx-space-md);
|
|
3853
3923
|
border: 1px solid var(--fx-border-default);
|
|
3854
3924
|
border-bottom: none;
|
|
3855
|
-
border-radius: var(--fx-radius
|
|
3925
|
+
border-radius: var(--fx-table-radius) var(--fx-table-radius) 0 0;
|
|
3856
3926
|
background: var(--fx-surface-background);
|
|
3857
3927
|
}
|
|
3858
3928
|
.toolbar:empty {
|
|
@@ -3873,7 +3943,7 @@ _FxTable.styles = css`
|
|
|
3873
3943
|
);
|
|
3874
3944
|
backdrop-filter: blur(2px);
|
|
3875
3945
|
z-index: 10;
|
|
3876
|
-
border-radius: var(--fx-radius-
|
|
3946
|
+
border-radius: var(--fx-table-radius) var(--fx-table-radius) 0 0;
|
|
3877
3947
|
}
|
|
3878
3948
|
.tbl-spinner {
|
|
3879
3949
|
width: 32px;
|