@selectwin/kit 0.1.206 → 0.1.207
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/dist/SelectSkeleton.d.ts +12 -2
- package/dist/SelectSkeleton.js +35 -8
- package/dist/SelectTable.d.ts +3 -1
- package/dist/SelectTable.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/SelectSkeleton.d.ts
CHANGED
|
@@ -8,10 +8,13 @@ declare function SkeletonThumbnail({ size }: {
|
|
|
8
8
|
size?: 'small' | 'medium' | 'large';
|
|
9
9
|
}): import("react").JSX.Element;
|
|
10
10
|
/** Área de conteúdo não-textual carregando (chart, mapa, imagem, preview): retângulo
|
|
11
|
-
* shimmer com 100% da largura do pai e a altura dada.
|
|
12
|
-
|
|
11
|
+
* shimmer com 100% da largura do pai e a altura dada. 0.1.207: `width` (o número grande
|
|
12
|
+
* de um cartão, a bolha de uma conversa) e `className` (o alinhamento no pai). */
|
|
13
|
+
declare function SkeletonBlock({ height, aspectRatio, width, className, }: {
|
|
13
14
|
height?: number | string;
|
|
14
15
|
aspectRatio?: string;
|
|
16
|
+
width?: number | string;
|
|
17
|
+
className?: string;
|
|
15
18
|
}): import("react").JSX.Element;
|
|
16
19
|
/** Um campo de formulário carregando: o rótulo curto e a caixa do controle na altura real. */
|
|
17
20
|
declare function SkeletonField({ tall }: {
|
|
@@ -23,6 +26,12 @@ declare function SkeletonRow({ media, action, boxed }: {
|
|
|
23
26
|
action?: boolean;
|
|
24
27
|
boxed?: boolean;
|
|
25
28
|
}): import("react").JSX.Element;
|
|
29
|
+
/** As linhas de uma tabela carregando (0.1.207), fora do SelectDataTable: `columns` colunas (a primeira mais larga, a
|
|
30
|
+
* última à direita), `rows` linhas, os tamanhos variando de uma linha para a outra. A forma da tabela que vem. */
|
|
31
|
+
declare function SkeletonTable({ columns, rows }: {
|
|
32
|
+
columns?: number;
|
|
33
|
+
rows?: number;
|
|
34
|
+
}): import("react").JSX.Element;
|
|
26
35
|
export declare const SelectSkeleton: (({ lines }: {
|
|
27
36
|
lines?: number;
|
|
28
37
|
}) => import("react").JSX.Element) & {
|
|
@@ -32,5 +41,6 @@ export declare const SelectSkeleton: (({ lines }: {
|
|
|
32
41
|
Block: typeof SkeletonBlock;
|
|
33
42
|
Field: typeof SkeletonField;
|
|
34
43
|
Row: typeof SkeletonRow;
|
|
44
|
+
Table: typeof SkeletonTable;
|
|
35
45
|
};
|
|
36
46
|
export {};
|
package/dist/SelectSkeleton.js
CHANGED
|
@@ -4,19 +4,33 @@ import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
|
4
4
|
function n({ lines: t = 3 }) {
|
|
5
5
|
return /* @__PURE__ */ e("div", {
|
|
6
6
|
className: "select-skel-body",
|
|
7
|
+
"aria-hidden": "true",
|
|
7
8
|
children: Array.from({ length: Math.max(1, t) }, (t, n) => /* @__PURE__ */ e("div", { className: "select-skeleton select-skel-line" }, n))
|
|
8
9
|
});
|
|
9
10
|
}
|
|
10
11
|
function r({ size: t = "medium" }) {
|
|
11
|
-
return /* @__PURE__ */ e("div", {
|
|
12
|
+
return /* @__PURE__ */ e("div", {
|
|
13
|
+
className: `select-skeleton select-skel-display select-skel-display--${t}`,
|
|
14
|
+
"aria-hidden": "true"
|
|
15
|
+
});
|
|
12
16
|
}
|
|
13
17
|
function i({ size: t = "medium" }) {
|
|
14
|
-
return /* @__PURE__ */ e("div", {
|
|
18
|
+
return /* @__PURE__ */ e("div", {
|
|
19
|
+
className: `select-skeleton select-skel-thumb select-skel-thumb--${t}`,
|
|
20
|
+
"aria-hidden": "true"
|
|
21
|
+
});
|
|
15
22
|
}
|
|
16
|
-
function a({ height: t = 240, aspectRatio: n }) {
|
|
23
|
+
function a({ height: t = 240, aspectRatio: n, width: r, className: i }) {
|
|
17
24
|
return /* @__PURE__ */ e("div", {
|
|
18
|
-
className:
|
|
19
|
-
style: n ? {
|
|
25
|
+
className: `select-skeleton select-skel-block${i ? " " + i : ""}`,
|
|
26
|
+
style: n ? {
|
|
27
|
+
aspectRatio: n,
|
|
28
|
+
width: r
|
|
29
|
+
} : {
|
|
30
|
+
height: t,
|
|
31
|
+
width: r
|
|
32
|
+
},
|
|
33
|
+
"aria-hidden": "true"
|
|
20
34
|
});
|
|
21
35
|
}
|
|
22
36
|
function o({ tall: n = !1 }) {
|
|
@@ -40,7 +54,19 @@ function s({ media: n = !0, action: r = !0, boxed: i = !1 }) {
|
|
|
40
54
|
]
|
|
41
55
|
});
|
|
42
56
|
}
|
|
43
|
-
|
|
57
|
+
function c({ columns: t = 4, rows: n = 4 }) {
|
|
58
|
+
let r = Math.max(1, Math.floor(t)), i = { gridTemplateColumns: r === 1 ? "minmax(0, 1fr)" : `minmax(0, 2fr) repeat(${r - 1}, minmax(0, 1fr))` };
|
|
59
|
+
return /* @__PURE__ */ e("div", {
|
|
60
|
+
className: "select-skel-table",
|
|
61
|
+
"aria-hidden": "true",
|
|
62
|
+
children: Array.from({ length: Math.max(1, Math.floor(n)) }, (t, n) => /* @__PURE__ */ e("div", {
|
|
63
|
+
className: "select-skel-table__row",
|
|
64
|
+
style: i,
|
|
65
|
+
children: Array.from({ length: r }, (t, n) => /* @__PURE__ */ e("div", { className: "select-skeleton select-skel-table__cell" }, n))
|
|
66
|
+
}, n))
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
var l = Object.assign(function({ lines: t }) {
|
|
44
70
|
return /* @__PURE__ */ e(n, { lines: t });
|
|
45
71
|
}, {
|
|
46
72
|
Body: n,
|
|
@@ -48,9 +74,10 @@ var c = Object.assign(function({ lines: t }) {
|
|
|
48
74
|
Thumbnail: i,
|
|
49
75
|
Block: a,
|
|
50
76
|
Field: o,
|
|
51
|
-
Row: s
|
|
77
|
+
Row: s,
|
|
78
|
+
Table: c
|
|
52
79
|
});
|
|
53
80
|
//#endregion
|
|
54
|
-
export {
|
|
81
|
+
export { l as SelectSkeleton };
|
|
55
82
|
|
|
56
83
|
//# sourceMappingURL=SelectSkeleton.js.map
|
package/dist/SelectTable.d.ts
CHANGED
|
@@ -117,8 +117,10 @@ type SelectTableEmptyOwnProps = {
|
|
|
117
117
|
icon?: ReactNode;
|
|
118
118
|
title: ReactNode;
|
|
119
119
|
subtitle?: ReactNode;
|
|
120
|
-
/** Optional CTA below the text (e.g. "Enable Billing") — for standalone empty cards. */
|
|
120
|
+
/** Optional CTA below the text (e.g. "Enable Billing") — for standalone empty cards. Várias ações ficam lado a lado. */
|
|
121
121
|
action?: ReactNode;
|
|
122
|
+
/** 0.1.207: o vazio que é um ERRO (a lista não carregou): o ícone no tom crítico. O `role="alert"` é de quem usa. */
|
|
123
|
+
tone?: 'critical';
|
|
122
124
|
};
|
|
123
125
|
export type SelectTableEmptyProps = SelectTableEmptyOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectTableEmptyOwnProps>;
|
|
124
126
|
export declare const SelectTableEmpty: import('react').ForwardRefExoticComponent<SelectTableEmptyOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectTableEmptyOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
package/dist/SelectTable.js
CHANGED
|
@@ -212,11 +212,11 @@ var O = l(function({ children: e, align: n = "start", disclosure: r, className:
|
|
|
212
212
|
children: r !== "none" && /* @__PURE__ */ g(t, {})
|
|
213
213
|
}) : null, e]
|
|
214
214
|
});
|
|
215
|
-
}), k = l(function({ icon: e, title: t, subtitle: n, action: r,
|
|
215
|
+
}), k = l(function({ icon: e, title: t, subtitle: n, action: r, tone: i, className: a, ...o }, s) {
|
|
216
216
|
return /* @__PURE__ */ _("div", {
|
|
217
|
-
ref:
|
|
218
|
-
...
|
|
219
|
-
className: `select-table-empty${i ? " " +
|
|
217
|
+
ref: s,
|
|
218
|
+
...o,
|
|
219
|
+
className: `select-table-empty${i === "critical" ? " select-table-empty--critical" : ""}${a ? " " + a : ""}`,
|
|
220
220
|
children: [
|
|
221
221
|
e && /* @__PURE__ */ g("span", {
|
|
222
222
|
className: "select-table-empty__icon",
|