@selectwin/kit 0.1.202 → 0.1.203

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.
@@ -1,12 +1,15 @@
1
1
  import { ReactNode, ComponentPropsWithoutRef } from 'react';
2
+ type SelectAlertTone = 'critical' | 'success' | 'info' | 'warning';
2
3
  type SelectAlertOwnProps = {
3
4
  children?: ReactNode;
4
- tone?: 'critical' | 'success' | 'info' | 'warning';
5
+ tone?: SelectAlertTone;
5
6
  /** Bold heading above the body (e.g. "Motivo da falha"). */
6
7
  title?: ReactNode;
7
8
  /** Action row under the body — buttons/links that resolve the message. An alert that
8
9
  * names another surface should carry the shortcut to it, not only describe the path. */
9
10
  action?: ReactNode;
11
+ /** 0.1.203: `true` = o ícone do tom; um nó = outro ícone; `false` = sem. Sem a prop, só o crítico leva o triângulo. */
12
+ icon?: boolean | ReactNode;
10
13
  };
11
14
  export type SelectAlertProps = SelectAlertOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectAlertOwnProps>;
12
15
  export declare const SelectAlert: import('react').ForwardRefExoticComponent<SelectAlertOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectAlertOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,36 +1,41 @@
1
- import { WarningIcon as e } from "./icons.js";
2
- import { forwardRef as t } from "react";
3
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
1
+ import { CheckCircleIcon as e, InfoIcon as t, WarningIcon as n } from "./icons.js";
2
+ import { forwardRef as r } from "react";
3
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
4
4
  //#region src/SelectAlert.tsx
5
- var i = t(function({ children: t, tone: i = "critical", title: a, action: o, className: s, ...c }, l) {
6
- let u = i === "critical";
7
- return /* @__PURE__ */ r("div", {
8
- ref: l,
9
- ...c,
10
- className: `select-alert select-alert--${i}${u ? " select-alert--icon" : ""}${s ? " " + s : ""}`,
5
+ var o = {
6
+ critical: /* @__PURE__ */ i(n, {}),
7
+ warning: /* @__PURE__ */ i(n, {}),
8
+ info: /* @__PURE__ */ i(t, {}),
9
+ success: /* @__PURE__ */ i(e, {})
10
+ }, s = r(function({ children: e, tone: t = "critical", title: n, action: r, icon: s, className: c, ...l }, u) {
11
+ let d = s === void 0 ? t === "critical" : s !== !1, f = s === void 0 || s === !0 ? o[t] : s;
12
+ return /* @__PURE__ */ a("div", {
13
+ ref: u,
11
14
  role: "alert",
15
+ ...l,
16
+ className: `select-alert select-alert--${t}${d ? " select-alert--icon" : ""}${c ? " " + c : ""}`,
12
17
  children: [
13
- u && /* @__PURE__ */ n("span", {
18
+ d && /* @__PURE__ */ i("span", {
14
19
  className: "select-alert__icon",
15
20
  "aria-hidden": "true",
16
- children: /* @__PURE__ */ n(e, {})
21
+ children: f
17
22
  }),
18
- a != null && /* @__PURE__ */ n("p", {
23
+ n != null && /* @__PURE__ */ i("p", {
19
24
  className: "select-alert__title",
20
- children: a
25
+ children: n
21
26
  }),
22
- t != null && /* @__PURE__ */ n("div", {
27
+ e != null && /* @__PURE__ */ i("div", {
23
28
  className: "select-alert__body",
24
- children: t
29
+ children: e
25
30
  }),
26
- o != null && /* @__PURE__ */ n("div", {
31
+ r != null && /* @__PURE__ */ i("div", {
27
32
  className: "select-alert__action",
28
- children: o
33
+ children: r
29
34
  })
30
35
  ]
31
36
  });
32
37
  });
33
38
  //#endregion
34
- export { i as SelectAlert };
39
+ export { s as SelectAlert };
35
40
 
36
41
  //# sourceMappingURL=SelectAlert.js.map
@@ -6,6 +6,11 @@ type SelectBadgeOwnProps = {
6
6
  /** 'sm' compacts the pill for dense surfaces. Cells of .select-datatable adopt the
7
7
  * compact metrics automatically — pass 'sm' only for dense chrome OUTSIDE tables. */
8
8
  size?: 'md' | 'sm';
9
+ /**
10
+ * 0.1.203: o valor técnico (o tipo de um registro, `TXT`; um metadado, `order_id: A-10482`; um escopo) na fonte mono, com o
11
+ * peso do texto: o selo de um estado lê o tom; o de um valor lê o que está escrito.
12
+ */
13
+ mono?: boolean;
9
14
  };
10
15
  export type SelectBadgeProps = SelectBadgeOwnProps & Omit<ComponentPropsWithoutRef<'span'>, keyof SelectBadgeOwnProps>;
11
16
  export declare const SelectBadge: import('react').ForwardRefExoticComponent<SelectBadgeOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref">, keyof SelectBadgeOwnProps> & import('react').RefAttributes<HTMLSpanElement>>;
@@ -1,11 +1,11 @@
1
1
  import { forwardRef as e } from "react";
2
2
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
3
  //#region src/SelectBadge.tsx
4
- var r = e(function({ children: e, tone: r = "neutral", icon: i, size: a = "md", className: o, ...s }, c) {
4
+ var r = e(function({ children: e, tone: r = "neutral", icon: i, size: a = "md", mono: o = !1, className: s, ...c }, l) {
5
5
  return /* @__PURE__ */ n("span", {
6
- ref: c,
7
- ...s,
8
- className: `select-badge select-badge--${r}${a === "sm" ? " select-badge--sm" : ""}${o ? " " + o : ""}`,
6
+ ref: l,
7
+ ...c,
8
+ className: `select-badge select-badge--${r}${a === "sm" ? " select-badge--sm" : ""}${o ? " select-badge--mono" : ""}${s ? " " + s : ""}`,
9
9
  children: [i && /* @__PURE__ */ t("span", {
10
10
  className: "select-badge__icon",
11
11
  children: i