@selectwin/kit 0.1.199 → 0.1.200
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/SelectBackLink.js +4 -4
- package/dist/SelectBreadcrumb.js +4 -4
- package/dist/SelectButton.d.ts +4 -2
- package/dist/SelectButton.js +23 -41
- package/dist/SelectButtonLink.d.ts +17 -0
- package/dist/SelectButtonLink.js +40 -0
- package/dist/SelectCopyRow.js +9 -9
- package/dist/SelectCopyableId.js +8 -8
- package/dist/SelectIconButton.d.ts +8 -3
- package/dist/SelectIconButton.js +1 -1
- package/dist/SelectInsight.js +43 -43
- package/dist/SelectListCard.js +10 -10
- package/dist/SelectMenu.js +8 -8
- package/dist/SelectPreviewFrame.js +11 -11
- package/dist/SelectSpinner.d.ts +5 -0
- package/dist/SelectSpinner.js +15 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +211 -209
- package/dist/internal/buttonParts.d.ts +24 -0
- package/dist/internal/buttonParts.js +52 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/SelectMenu.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { safeHref as e } from "./internal/safeHref.js";
|
|
2
|
+
import { ChevronDownIcon as t, ExternalLinkIcon as n } from "./icons.js";
|
|
3
3
|
import { forwardRef as r } from "react";
|
|
4
4
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
5
|
//#region src/SelectMenu.tsx
|
|
@@ -50,8 +50,8 @@ var c = r(function({ children: e, description: t, icon: n, trailing: r, onClick:
|
|
|
50
50
|
})
|
|
51
51
|
]
|
|
52
52
|
});
|
|
53
|
-
}), l = r(function({ children:
|
|
54
|
-
let h =
|
|
53
|
+
}), l = r(function({ children: t, description: r, href: o, icon: c, trailing: l, external: u, tone: d = "default", className: f, ...p }, m) {
|
|
54
|
+
let h = e(o), g = u ?? /^(https?:|mailto:|tel:)/i.test(h ?? ""), _ = l ?? (g ? /* @__PURE__ */ i(n, {}) : void 0);
|
|
55
55
|
return /* @__PURE__ */ a("a", {
|
|
56
56
|
ref: m,
|
|
57
57
|
...p,
|
|
@@ -67,7 +67,7 @@ var c = r(function({ children: e, description: t, icon: n, trailing: r, onClick:
|
|
|
67
67
|
}),
|
|
68
68
|
/* @__PURE__ */ i(s, {
|
|
69
69
|
description: r,
|
|
70
|
-
children:
|
|
70
|
+
children: t
|
|
71
71
|
}),
|
|
72
72
|
_ && /* @__PURE__ */ i("span", {
|
|
73
73
|
className: "select-menu__trailing",
|
|
@@ -88,7 +88,7 @@ function d() {
|
|
|
88
88
|
role: "separator"
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
-
var f = r(function({ children:
|
|
91
|
+
var f = r(function({ children: e, onClick: n, active: r = !1, className: o, ...s }, c) {
|
|
92
92
|
return /* @__PURE__ */ a("button", {
|
|
93
93
|
ref: c,
|
|
94
94
|
...s,
|
|
@@ -97,10 +97,10 @@ var f = r(function({ children: t, onClick: n, active: r = !1, className: o, ...s
|
|
|
97
97
|
onClick: n,
|
|
98
98
|
"aria-haspopup": "menu",
|
|
99
99
|
"aria-expanded": r,
|
|
100
|
-
children: [/* @__PURE__ */ i("span", { children:
|
|
100
|
+
children: [/* @__PURE__ */ i("span", { children: e }), /* @__PURE__ */ i("span", {
|
|
101
101
|
className: "select-menubtn__caret",
|
|
102
102
|
"aria-hidden": "true",
|
|
103
|
-
children: /* @__PURE__ */ i(
|
|
103
|
+
children: /* @__PURE__ */ i(t, {})
|
|
104
104
|
})]
|
|
105
105
|
});
|
|
106
106
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { safeHref as e } from "./internal/safeHref.js";
|
|
2
|
+
import { ExternalLinkIcon as t, MobileIcon as n, MonitorIcon as r, RefreshIcon as i } from "./icons.js";
|
|
3
|
+
import { SelectIconButton as a } from "./SelectIconButton.js";
|
|
4
4
|
import { SelectLoader as o } from "./SelectLoader.js";
|
|
5
5
|
import { forwardRef as s, useLayoutEffect as c, useRef as l, useState as u } from "react";
|
|
6
6
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
7
|
//#region src/SelectPreviewFrame.tsx
|
|
8
8
|
var m = "allow-scripts allow-same-origin allow-forms", h = 390, g = 1280, _ = s(function({ src: s, sandbox: _ = m, title: v = "Pré-visualização", height: y = 560, fill: b = !1, initialDevice: x = "desktop", showDeviceToggle: S = !0, openLabel: C = "Abrir em nova aba", emptyLabel: w = "Salve para gerar a pré-visualização.", onReload: T, notice: E, iframeRef: D, desktopWidth: O = g, className: k, ...A }, j) {
|
|
9
|
-
let M =
|
|
9
|
+
let M = e(s), [N, P] = u(x), [F, I] = u(0), [L, R] = u(!0), z = l(null), [B, V] = u({
|
|
10
10
|
w: 0,
|
|
11
11
|
h: 0
|
|
12
12
|
});
|
|
@@ -48,22 +48,22 @@ var m = "allow-scripts allow-same-origin allow-forms", h = 390, g = 1280, _ = s(
|
|
|
48
48
|
/* @__PURE__ */ p("div", {
|
|
49
49
|
className: "select-preview__actions",
|
|
50
50
|
children: [
|
|
51
|
-
S && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(
|
|
51
|
+
S && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(a, {
|
|
52
52
|
size: "sm",
|
|
53
|
-
icon: /* @__PURE__ */ f(
|
|
53
|
+
icon: /* @__PURE__ */ f(r, {}),
|
|
54
54
|
label: "Ver no computador",
|
|
55
55
|
active: N === "desktop",
|
|
56
56
|
onClick: () => P("desktop")
|
|
57
|
-
}), /* @__PURE__ */ f(
|
|
57
|
+
}), /* @__PURE__ */ f(a, {
|
|
58
58
|
size: "sm",
|
|
59
|
-
icon: /* @__PURE__ */ f(
|
|
59
|
+
icon: /* @__PURE__ */ f(n, {}),
|
|
60
60
|
label: "Ver no celular",
|
|
61
61
|
active: N === "mobile",
|
|
62
62
|
onClick: () => P("mobile")
|
|
63
63
|
})] }),
|
|
64
|
-
/* @__PURE__ */ f(
|
|
64
|
+
/* @__PURE__ */ f(a, {
|
|
65
65
|
size: "sm",
|
|
66
|
-
icon: /* @__PURE__ */ f(
|
|
66
|
+
icon: /* @__PURE__ */ f(i, {}),
|
|
67
67
|
label: "Recarregar",
|
|
68
68
|
onClick: G,
|
|
69
69
|
disabled: !M
|
|
@@ -75,7 +75,7 @@ var m = "allow-scripts allow-same-origin allow-forms", h = 390, g = 1280, _ = s(
|
|
|
75
75
|
rel: "noreferrer",
|
|
76
76
|
"aria-label": C,
|
|
77
77
|
title: C,
|
|
78
|
-
children: /* @__PURE__ */ f(
|
|
78
|
+
children: /* @__PURE__ */ f(t, {})
|
|
79
79
|
})
|
|
80
80
|
]
|
|
81
81
|
})
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
//#region src/SelectSpinner.tsx
|
|
4
|
+
function t({ size: t = "md", label: n, className: r }) {
|
|
5
|
+
return /* @__PURE__ */ e("span", {
|
|
6
|
+
className: `select-spinner${t === "md" ? "" : ` select-spinner--${t}`}${r ? ` ${r}` : ""}`,
|
|
7
|
+
role: n ? "status" : void 0,
|
|
8
|
+
"aria-label": n,
|
|
9
|
+
"aria-hidden": !n || void 0
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { t as SelectSpinner };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=SelectSpinner.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export { SelectAuthFx, AUTH_FX_VARIANTS } from './SelectAuthFx';
|
|
|
6
6
|
export type { AuthFxVariant } from './SelectAuthFx';
|
|
7
7
|
export { SelectCard } from './SelectCard';
|
|
8
8
|
export { SelectButton } from './SelectButton';
|
|
9
|
+
export { SelectButtonLink, type SelectButtonLinkProps } from './SelectButtonLink';
|
|
10
|
+
export { SelectSpinner } from './SelectSpinner';
|
|
9
11
|
export { SelectField, SelectCheckbox, SelectLabelRow } from './SelectField';
|
|
10
12
|
export { SelectTextarea } from './SelectTextarea';
|
|
11
13
|
export { SelectUnitInput } from './SelectUnitInput';
|
|
@@ -259,7 +261,7 @@ export type { SelectSwitchFieldProps } from './SelectSwitchField';
|
|
|
259
261
|
export type { SelectColorFieldProps } from './SelectColorField';
|
|
260
262
|
export type { SelectImageFieldProps } from './SelectImageField';
|
|
261
263
|
export type { SelectAccordionItem, SelectAccordionProps } from './SelectAccordion';
|
|
262
|
-
export type { SelectButtonProps } from './SelectButton';
|
|
264
|
+
export type { SelectButtonProps, SelectButtonVariant } from './SelectButton';
|
|
263
265
|
export type { SelectFieldProps, SelectNativeInputProps } from './SelectField';
|
|
264
266
|
export type { SelectSelectOption } from './SelectSelect';
|
|
265
267
|
export type { PhoneValue } from './SelectPhoneField';
|