@selectwin/kit 0.1.130 → 0.1.132
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/SelectListCard.d.ts +7 -1
- package/dist/SelectMiniStats.d.ts +7 -0
- package/dist/SelectRecordCard.d.ts +4 -0
- package/dist/SelectTagSelect.d.ts +5 -0
- package/dist/index.js +61 -39
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/SelectListCard.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ type SelectListCardOwnProps = {
|
|
|
20
20
|
};
|
|
21
21
|
export type SelectListCardProps = SelectListCardOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectListCardOwnProps>;
|
|
22
22
|
export declare const SelectListCard: import('react').ForwardRefExoticComponent<SelectListCardOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectListCardOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
23
|
-
export declare function SelectListRow({ media, mediaSize, title, secondary, action, muted, onClick, }: {
|
|
23
|
+
export declare function SelectListRow({ media, mediaSize, title, secondary, action, muted, wrap, onClick, }: {
|
|
24
24
|
/** Leading visual — an icon or SelectAvatar. */
|
|
25
25
|
media?: ReactNode;
|
|
26
26
|
/** `icon` (padrão) encaixa um glifo cru numa caixa de 1.25rem; `auto` deixa o visual com o
|
|
@@ -33,6 +33,12 @@ export declare function SelectListRow({ media, mediaSize, title, secondary, acti
|
|
|
33
33
|
action?: ReactNode;
|
|
34
34
|
/** Dim the title/media (e.g. a disabled field). */
|
|
35
35
|
muted?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* A ação é LARGA (um preço com a situação embaixo + um botão, 0.1.131): no estreito ela desce para
|
|
38
|
+
* baixo do texto, alinhada à direita, em vez de espremer o título numa coluna de uma palavra por linha.
|
|
39
|
+
* No largo, tudo segue numa linha só.
|
|
40
|
+
*/
|
|
41
|
+
wrap?: boolean;
|
|
36
42
|
onClick?: () => void;
|
|
37
43
|
}): import("react").JSX.Element;
|
|
38
44
|
/**
|
|
@@ -15,6 +15,13 @@ type SelectMiniStatsOwnProps = {
|
|
|
15
15
|
* estreitas cai para 2 (ou 1).
|
|
16
16
|
*/
|
|
17
17
|
columns?: 2 | 3 | 4 | 5;
|
|
18
|
+
/**
|
|
19
|
+
* Colunas no ESTREITO (≤ 40rem, 0.1.132). Padrão 2 — com 3 números, o terceiro fica órfão numa linha
|
|
20
|
+
* sozinho; `narrowColumns={3}` mantém os três lado a lado (números curtos), `1` empilha.
|
|
21
|
+
*/
|
|
22
|
+
narrowColumns?: 1 | 2 | 3;
|
|
23
|
+
/** Carregando (0.1.132): os rótulos ficam, um esqueleto no lugar de cada número — a forma não pula. */
|
|
24
|
+
loading?: boolean;
|
|
18
25
|
};
|
|
19
26
|
export type SelectMiniStatsProps = SelectMiniStatsOwnProps & Omit<ComponentPropsWithoutRef<'dl'>, keyof SelectMiniStatsOwnProps>;
|
|
20
27
|
export declare const SelectMiniStats: import('react').ForwardRefExoticComponent<SelectMiniStatsOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDListElement>, HTMLDListElement>, "ref">, keyof SelectMiniStatsOwnProps> & import('react').RefAttributes<HTMLDListElement>>;
|
|
@@ -45,8 +45,12 @@ export declare const SelectRecordCard: import('react').ForwardRefExoticComponent
|
|
|
45
45
|
*/
|
|
46
46
|
export type SelectLayoutThumbProps = {
|
|
47
47
|
kind: 'steps' | 'columns';
|
|
48
|
+
/** A cor principal do template na faixa de destaque (0.1.132). Padrão: a primária da casa. */
|
|
49
|
+
accent?: string;
|
|
48
50
|
} & Omit<ComponentPropsWithoutRef<'span'>, 'children'>;
|
|
49
51
|
export declare const SelectLayoutThumb: import('react').ForwardRefExoticComponent<{
|
|
50
52
|
kind: "steps" | "columns";
|
|
53
|
+
/** A cor principal do template na faixa de destaque (0.1.132). Padrão: a primária da casa. */
|
|
54
|
+
accent?: string;
|
|
51
55
|
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref">, "children"> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
52
56
|
export {};
|
|
@@ -22,6 +22,11 @@ type SelectTagSelectOwnProps = {
|
|
|
22
22
|
onBlur?: () => void;
|
|
23
23
|
/** Control density. Default `md`; use `sm` in dense surfaces and modal/card forms. */
|
|
24
24
|
size?: 'sm' | 'md';
|
|
25
|
+
/**
|
|
26
|
+
* Um valor selecionado que não está em `options` (0.1.132) — antes ele SUMIA do controle e continuava no
|
|
27
|
+
* `selected`, reenviado sem ninguém ver. Agora vira um chip tracejado com este rótulo (padrão: o próprio valor).
|
|
28
|
+
*/
|
|
29
|
+
unknownLabel?: (value: string) => ReactNode;
|
|
25
30
|
};
|
|
26
31
|
export type SelectTagSelectProps = SelectTagSelectOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectTagSelectOwnProps>;
|
|
27
32
|
export declare const SelectTagSelect: import('react').ForwardRefExoticComponent<SelectTagSelectOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectTagSelectOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
package/dist/index.js
CHANGED
|
@@ -7821,11 +7821,16 @@ function lo({ src: e, fallback: t }) {
|
|
|
7821
7821
|
})
|
|
7822
7822
|
});
|
|
7823
7823
|
}
|
|
7824
|
-
var uo = r(function({ kind: e,
|
|
7824
|
+
var uo = r(function({ kind: e, accent: t, className: n, style: r, ...i }, a) {
|
|
7825
|
+
let o = t ? {
|
|
7826
|
+
...r,
|
|
7827
|
+
"--select-rcard-thumb-accent": t
|
|
7828
|
+
} : r;
|
|
7825
7829
|
return /* @__PURE__ */ h("span", {
|
|
7826
|
-
ref:
|
|
7827
|
-
...
|
|
7828
|
-
|
|
7830
|
+
ref: a,
|
|
7831
|
+
...i,
|
|
7832
|
+
style: o,
|
|
7833
|
+
className: `select-rcard__thumb${n ? " " + n : ""}`,
|
|
7829
7834
|
"aria-hidden": "true",
|
|
7830
7835
|
children: [/* @__PURE__ */ m("span", { className: "select-rcard__thumbline select-rcard__thumbline--accent" }), e === "steps" ? /* @__PURE__ */ h(p, { children: [
|
|
7831
7836
|
/* @__PURE__ */ m("span", { className: "select-rcard__thumbline" }),
|
|
@@ -8520,12 +8525,25 @@ var Zo = r(function({ filters: e, values: t, onChange: n, onClearAll: r, search:
|
|
|
8520
8525
|
})]
|
|
8521
8526
|
})]
|
|
8522
8527
|
});
|
|
8523
|
-
}), Qo = r(function({ label: e, options: t, selected: n, onChange: r, placeholder: i = "Selecionar…", hint: a, help: o, error: s, onBlur: c, size: l = "md",
|
|
8524
|
-
let [
|
|
8528
|
+
}), Qo = r(function({ label: e, options: t, selected: n, onChange: r, placeholder: i = "Selecionar…", hint: a, help: o, error: s, onBlur: c, size: l = "md", unknownLabel: u, className: f, ...p }, g) {
|
|
8529
|
+
let [_, v] = d(!1), [y, b] = d(""), x = t.filter((e) => e.label.toLowerCase().includes(y.trim().toLowerCase())), S = (e) => r(n.includes(e) ? n.filter((t) => t !== e) : [...n, e]), C = n.map((e) => {
|
|
8530
|
+
let n = t.find((t) => t.value === e);
|
|
8531
|
+
return n ? {
|
|
8532
|
+
value: e,
|
|
8533
|
+
label: n.label,
|
|
8534
|
+
text: n.label,
|
|
8535
|
+
unknown: !1
|
|
8536
|
+
} : {
|
|
8537
|
+
value: e,
|
|
8538
|
+
label: u ? u(e) : e,
|
|
8539
|
+
text: e,
|
|
8540
|
+
unknown: !0
|
|
8541
|
+
};
|
|
8542
|
+
});
|
|
8525
8543
|
return /* @__PURE__ */ h("div", {
|
|
8526
|
-
ref:
|
|
8527
|
-
...
|
|
8528
|
-
className: `select-field${l === "sm" ? " select-field--sm" : ""}${
|
|
8544
|
+
ref: g,
|
|
8545
|
+
...p,
|
|
8546
|
+
className: `select-field${l === "sm" ? " select-field--sm" : ""}${f ? " " + f : ""}`,
|
|
8529
8547
|
children: [
|
|
8530
8548
|
(e || o) && /* @__PURE__ */ m("div", {
|
|
8531
8549
|
className: "select-field__labelrow",
|
|
@@ -8538,35 +8556,35 @@ var Zo = r(function({ filters: e, values: t, onChange: n, onClearAll: r, search:
|
|
|
8538
8556
|
})
|
|
8539
8557
|
}),
|
|
8540
8558
|
/* @__PURE__ */ m(Fn, {
|
|
8541
|
-
active:
|
|
8559
|
+
active: _,
|
|
8542
8560
|
onClose: () => {
|
|
8543
|
-
|
|
8561
|
+
v(!1), c == null || c();
|
|
8544
8562
|
},
|
|
8545
8563
|
placement: "bottom-start",
|
|
8546
8564
|
role: "listbox",
|
|
8547
8565
|
matchWidth: !0,
|
|
8548
8566
|
activator: /* @__PURE__ */ h("div", {
|
|
8549
|
-
className: `select-tagselect__control${
|
|
8567
|
+
className: `select-tagselect__control${_ ? " is-open" : ""}${s ? " is-error" : ""}`,
|
|
8550
8568
|
"aria-invalid": s ? !0 : void 0,
|
|
8551
8569
|
role: "button",
|
|
8552
8570
|
tabIndex: 0,
|
|
8553
8571
|
"aria-haspopup": "listbox",
|
|
8554
|
-
"aria-expanded":
|
|
8555
|
-
onClick: () =>
|
|
8572
|
+
"aria-expanded": _,
|
|
8573
|
+
onClick: () => v(!0),
|
|
8556
8574
|
onKeyDown: (e) => {
|
|
8557
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
8575
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), v(!0));
|
|
8558
8576
|
},
|
|
8559
|
-
children: [
|
|
8577
|
+
children: [C.length === 0 ? /* @__PURE__ */ m("span", {
|
|
8560
8578
|
className: "select-tagselect__placeholder",
|
|
8561
8579
|
children: i
|
|
8562
|
-
}) :
|
|
8563
|
-
className: "select-tagselect__chip"
|
|
8580
|
+
}) : C.map((e) => /* @__PURE__ */ h("span", {
|
|
8581
|
+
className: `select-tagselect__chip${e.unknown ? " select-tagselect__chip--unknown" : ""}`,
|
|
8564
8582
|
children: [e.label, /* @__PURE__ */ m("button", {
|
|
8565
8583
|
type: "button",
|
|
8566
8584
|
className: "select-tagselect__remove",
|
|
8567
|
-
"aria-label": `Remover ${e.
|
|
8585
|
+
"aria-label": `Remover ${e.text}`,
|
|
8568
8586
|
onClick: (t) => {
|
|
8569
|
-
t.stopPropagation(),
|
|
8587
|
+
t.stopPropagation(), S(e.value);
|
|
8570
8588
|
},
|
|
8571
8589
|
children: /* @__PURE__ */ m(le, {})
|
|
8572
8590
|
})]
|
|
@@ -8581,24 +8599,24 @@ var Zo = r(function({ filters: e, values: t, onChange: n, onClearAll: r, search:
|
|
|
8581
8599
|
children: [/* @__PURE__ */ m("div", {
|
|
8582
8600
|
className: "select-tagselect__search",
|
|
8583
8601
|
children: /* @__PURE__ */ m(oa, {
|
|
8584
|
-
value:
|
|
8585
|
-
onChange:
|
|
8602
|
+
value: y,
|
|
8603
|
+
onChange: b,
|
|
8586
8604
|
placeholder: "Buscar…"
|
|
8587
8605
|
})
|
|
8588
8606
|
}), /* @__PURE__ */ m("div", {
|
|
8589
8607
|
className: "select-tagselect__options",
|
|
8590
8608
|
role: "presentation",
|
|
8591
|
-
children:
|
|
8609
|
+
children: x.length === 0 ? /* @__PURE__ */ m("div", {
|
|
8592
8610
|
className: "select-tagselect__empty",
|
|
8593
8611
|
children: "Nada encontrado"
|
|
8594
|
-
}) :
|
|
8612
|
+
}) : x.map((e) => {
|
|
8595
8613
|
let t = n.includes(e.value);
|
|
8596
8614
|
return /* @__PURE__ */ h("button", {
|
|
8597
8615
|
type: "button",
|
|
8598
8616
|
role: "option",
|
|
8599
8617
|
"aria-selected": t,
|
|
8600
8618
|
className: `select-tagselect__option${t ? " is-selected" : ""}`,
|
|
8601
|
-
onClick: () =>
|
|
8619
|
+
onClick: () => S(e.value),
|
|
8602
8620
|
children: [
|
|
8603
8621
|
e.image && /* @__PURE__ */ m("img", {
|
|
8604
8622
|
className: "select-tagselect__optimg",
|
|
@@ -10788,11 +10806,12 @@ var Qs = r(function({ value: e, max: t = 100, size: n = 64, thickness: r, tone:
|
|
|
10788
10806
|
})]
|
|
10789
10807
|
})]
|
|
10790
10808
|
});
|
|
10791
|
-
}), ic = r(function({ items: e, order: t = "label-first", columns: n,
|
|
10809
|
+
}), ic = r(function({ items: e, order: t = "label-first", columns: n, narrowColumns: r, loading: i = !1, className: a, ...o }, s) {
|
|
10792
10810
|
return /* @__PURE__ */ m("dl", {
|
|
10793
|
-
ref:
|
|
10794
|
-
|
|
10795
|
-
|
|
10811
|
+
ref: s,
|
|
10812
|
+
"aria-busy": i || void 0,
|
|
10813
|
+
...o,
|
|
10814
|
+
className: `select-ministats select-ministats--${t}${n ? ` select-ministats--cols-${n}` : ""}${r ? ` select-ministats--narrow-${r}` : ""}${i ? " select-ministats--loading" : ""}${a ? " " + a : ""}`,
|
|
10796
10815
|
children: e.map((e, t) => /* @__PURE__ */ h("div", {
|
|
10797
10816
|
className: "select-ministats__item",
|
|
10798
10817
|
children: [
|
|
@@ -10802,7 +10821,10 @@ var Qs = r(function({ value: e, max: t = 100, size: n = 64, thickness: r, tone:
|
|
|
10802
10821
|
}),
|
|
10803
10822
|
/* @__PURE__ */ m("dd", {
|
|
10804
10823
|
className: "select-ministats__value",
|
|
10805
|
-
children:
|
|
10824
|
+
children: i ? /* @__PURE__ */ m("span", {
|
|
10825
|
+
className: "select-skeleton select-ministats__skeleton",
|
|
10826
|
+
"aria-hidden": "true"
|
|
10827
|
+
}) : e.value
|
|
10806
10828
|
}),
|
|
10807
10829
|
e.hint != null && /* @__PURE__ */ m("dd", {
|
|
10808
10830
|
className: "select-ministats__hint",
|
|
@@ -25692,8 +25714,8 @@ var jl = r(function({ name: e, price: t, priceSuffix: n, headerAction: r, summar
|
|
|
25692
25714
|
]
|
|
25693
25715
|
});
|
|
25694
25716
|
});
|
|
25695
|
-
function Nl({ media: e, mediaSize: t = "icon", title: n, secondary: r, action: i, muted: a = !1,
|
|
25696
|
-
let
|
|
25717
|
+
function Nl({ media: e, mediaSize: t = "icon", title: n, secondary: r, action: i, muted: a = !1, wrap: o = !1, onClick: s }) {
|
|
25718
|
+
let c = /* @__PURE__ */ h(p, { children: [
|
|
25697
25719
|
e && /* @__PURE__ */ m("span", {
|
|
25698
25720
|
className: `select-listrow__media${t === "auto" ? " select-listrow__media--auto" : ""}`,
|
|
25699
25721
|
"aria-hidden": "true",
|
|
@@ -25713,15 +25735,15 @@ function Nl({ media: e, mediaSize: t = "icon", title: n, secondary: r, action: i
|
|
|
25713
25735
|
className: "select-listrow__action",
|
|
25714
25736
|
children: i
|
|
25715
25737
|
})
|
|
25716
|
-
] }),
|
|
25717
|
-
return
|
|
25738
|
+
] }), l = `select-listrow${a ? " select-listrow--muted" : ""}${o ? " select-listrow--wrap" : ""}`;
|
|
25739
|
+
return s ? /* @__PURE__ */ m("button", {
|
|
25718
25740
|
type: "button",
|
|
25719
|
-
className: `${
|
|
25720
|
-
onClick:
|
|
25721
|
-
children:
|
|
25741
|
+
className: `${l} select-listrow--clickable`,
|
|
25742
|
+
onClick: s,
|
|
25743
|
+
children: c
|
|
25722
25744
|
}) : /* @__PURE__ */ m("div", {
|
|
25723
|
-
className:
|
|
25724
|
-
children:
|
|
25745
|
+
className: l,
|
|
25746
|
+
children: c
|
|
25725
25747
|
});
|
|
25726
25748
|
}
|
|
25727
25749
|
function Pl({ children: e }) {
|