@solostylist/ui-kit 1.0.73 → 1.0.75
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/main.d.ts +2 -0
- package/dist/main.js +29 -27
- package/dist/s-copyable-text/index.d.ts +2 -0
- package/dist/s-copyable-text/index.js +4 -0
- package/dist/s-copyable-text/package.json +5 -0
- package/dist/s-copyable-text/s-copyable-text.d.ts +8 -0
- package/dist/s-copyable-text/s-copyable-text.js +56 -0
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -68,5 +68,7 @@ export { default as SGlowButton } from './s-glow-button/index';
|
|
|
68
68
|
export type { GlowButtonProps } from './s-glow-button/index';
|
|
69
69
|
export { default as SMovingBorder } from './s-moving-border/index';
|
|
70
70
|
export type { SMovingBorderProps } from './s-moving-border/index';
|
|
71
|
+
export { default as SCopyableText } from './s-copyable-text/index';
|
|
72
|
+
export type { SCopyableTextProps } from './s-copyable-text/index';
|
|
71
73
|
export * from './hooks';
|
|
72
74
|
export * from './utils';
|
package/dist/main.js
CHANGED
|
@@ -3,11 +3,11 @@ import { default as a } from "./s-button-link/s-button-link.js";
|
|
|
3
3
|
import { default as l } from "./s-text-editor/s-text-editor.js";
|
|
4
4
|
import { default as p } from "./s-checkbox/s-checkbox.js";
|
|
5
5
|
import { default as S } from "./s-chips/s-chips.js";
|
|
6
|
-
import { default as
|
|
7
|
-
import { DialogConfirmProvider as
|
|
6
|
+
import { default as d } from "./s-data-table/s-data-table.js";
|
|
7
|
+
import { DialogConfirmProvider as i, default as g, useDialogConfirm as n } from "./s-dialog-confirm/s-dialog-confirm.js";
|
|
8
8
|
import { DialogMessageProvider as D, default as P, useDialogMessage as T } from "./s-dialog-message/s-dialog-message.js";
|
|
9
9
|
import { default as b } from "./s-error/s-error.js";
|
|
10
|
-
import { default as
|
|
10
|
+
import { default as k } from "./s-empty/s-empty.js";
|
|
11
11
|
import { default as L } from "./s-dialog/s-dialog.js";
|
|
12
12
|
import { default as y } from "./s-file-dropzone/s-file-dropzone.js";
|
|
13
13
|
import { default as E } from "./s-file-icon/s-file-icon.js";
|
|
@@ -26,43 +26,45 @@ import { default as ee, SnackbarMessageProvider as oe, useSnackbarMessage as re
|
|
|
26
26
|
import { default as ae } from "./s-form/s-form.js";
|
|
27
27
|
import { SSmartTextField as le } from "./s-smart-text-field/s-smart-text-field.js";
|
|
28
28
|
import { SCopilotKitProvider as pe } from "./s-copilot-kit-provider/s-copilot-kit-provider.js";
|
|
29
|
-
import { SStripeCVC as Se, SStripeExpiry as
|
|
29
|
+
import { SStripeCVC as Se, SStripeExpiry as xe, SStripeNumber as de, StripeTextField as ue } from "./s-stripe/s-stripe.js";
|
|
30
30
|
import { default as ge } from "./s-theme-provider/s-theme-provider.js";
|
|
31
31
|
import { default as ce } from "./s-datetime-picker/s-datetime-picker.js";
|
|
32
32
|
import { default as Pe } from "./s-date-picker/s-date-picker.js";
|
|
33
33
|
import { default as ve } from "./s-localization-provider/s-localization-provider.js";
|
|
34
|
-
import { default as
|
|
34
|
+
import { default as Ce } from "./s-gradient-icon/s-gradient-icon.js";
|
|
35
35
|
import { default as Me } from "./s-glow-button/s-glow-button.js";
|
|
36
36
|
import { default as Fe } from "./s-moving-border/s-moving-border.js";
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
37
|
+
import { default as Be } from "./s-copyable-text/s-copyable-text.js";
|
|
38
|
+
import { useDialog as Ie } from "./hooks/use-dialog.js";
|
|
39
|
+
import { usePopover as ze } from "./hooks/use-popover.js";
|
|
40
|
+
import { formatDatePosted as Ne } from "./utils/dayjs.js";
|
|
41
|
+
import { bytesToSize as we } from "./utils/bytes-to-size.js";
|
|
42
|
+
import { LogLevel as Ke, Logger as Ve, createLogger as qe, logger as He } from "./utils/logger.js";
|
|
43
|
+
import { default as Oe } from "dayjs";
|
|
43
44
|
export {
|
|
44
|
-
|
|
45
|
+
i as DialogConfirmProvider,
|
|
45
46
|
D as DialogMessageProvider,
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
Ke as LogLevel,
|
|
48
|
+
Ve as Logger,
|
|
48
49
|
r as SAutocomplete,
|
|
49
50
|
a as SButtonLink,
|
|
50
51
|
p as SCheckbox,
|
|
51
52
|
S as SChips,
|
|
52
53
|
pe as SCopilotKitProvider,
|
|
53
|
-
|
|
54
|
+
Be as SCopyableText,
|
|
55
|
+
d as SDataTable,
|
|
54
56
|
Pe as SDatePicker,
|
|
55
57
|
ce as SDateTimePicker,
|
|
56
58
|
L as SDialog,
|
|
57
59
|
g as SDialogConfirm,
|
|
58
60
|
P as SDialogMessage,
|
|
59
|
-
|
|
61
|
+
k as SEmpty,
|
|
60
62
|
b as SError,
|
|
61
63
|
y as SFileDropzone,
|
|
62
64
|
E as SFileIcon,
|
|
63
65
|
ae as SForm,
|
|
64
66
|
Me as SGlowButton,
|
|
65
|
-
|
|
67
|
+
Ce as SGradientIcon,
|
|
66
68
|
h as SI18nProvider,
|
|
67
69
|
G as SIconButton,
|
|
68
70
|
j as SLabel,
|
|
@@ -76,23 +78,23 @@ export {
|
|
|
76
78
|
le as SSmartTextField,
|
|
77
79
|
ee as SSnackbarMessage,
|
|
78
80
|
Se as SStripeCVC,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
xe as SStripeExpiry,
|
|
82
|
+
de as SStripeNumber,
|
|
81
83
|
l as STextEditor,
|
|
82
84
|
H as STextField,
|
|
83
85
|
_ as STextTruncation,
|
|
84
86
|
ge as SThemeProvider,
|
|
85
87
|
Y as STip,
|
|
86
88
|
oe as SnackbarMessageProvider,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
89
|
+
ue as StripeTextField,
|
|
90
|
+
we as bytesToSize,
|
|
91
|
+
qe as createLogger,
|
|
92
|
+
Oe as dayjs,
|
|
93
|
+
Ne as formatDatePosted,
|
|
94
|
+
He as logger,
|
|
95
|
+
Ie as useDialog,
|
|
94
96
|
n as useDialogConfirm,
|
|
95
97
|
T as useDialogMessage,
|
|
96
|
-
|
|
98
|
+
ze as usePopover,
|
|
97
99
|
re as useSnackbarMessage
|
|
98
100
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TypographyProps } from '@mui/material';
|
|
2
|
+
export interface SCopyableTextProps {
|
|
3
|
+
text?: string;
|
|
4
|
+
typographyProps?: TypographyProps;
|
|
5
|
+
onCopied?: () => void;
|
|
6
|
+
}
|
|
7
|
+
declare const SCopyableText: ({ text, typographyProps, onCopied }: SCopyableTextProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export default SCopyableText;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { j as e } from "../jsx-runtime-DywqP_6a.js";
|
|
2
|
+
import { useState as l } from "react";
|
|
3
|
+
import { Box as d, IconButton as m, Typography as x } from "@mui/material";
|
|
4
|
+
import { c as i } from "../createSvgIcon-DN-sh_sr.js";
|
|
5
|
+
const u = i(/* @__PURE__ */ e.jsx("path", {
|
|
6
|
+
d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"
|
|
7
|
+
}), "Check"), h = i(/* @__PURE__ */ e.jsx("path", {
|
|
8
|
+
d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"
|
|
9
|
+
}), "ContentCopy"), b = ({ text: t, typographyProps: o, onCopied: r }) => {
|
|
10
|
+
const [s, c] = l(!1), a = async () => {
|
|
11
|
+
if (t)
|
|
12
|
+
try {
|
|
13
|
+
await navigator.clipboard.writeText(t), c(!0), setTimeout(() => c(!1), 2e3), r == null || r();
|
|
14
|
+
} catch (n) {
|
|
15
|
+
console.error("Failed to copy text:", n);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
return t ? /* @__PURE__ */ e.jsxs(d, { sx: { position: "relative" }, children: [
|
|
19
|
+
/* @__PURE__ */ e.jsx(
|
|
20
|
+
m,
|
|
21
|
+
{
|
|
22
|
+
onClick: a,
|
|
23
|
+
size: "small",
|
|
24
|
+
sx: {
|
|
25
|
+
position: "absolute",
|
|
26
|
+
top: 8,
|
|
27
|
+
right: 8,
|
|
28
|
+
zIndex: 1,
|
|
29
|
+
color: s ? "success.main" : "inherit"
|
|
30
|
+
},
|
|
31
|
+
children: s ? /* @__PURE__ */ e.jsx(u, { fontSize: "small" }) : /* @__PURE__ */ e.jsx(h, { fontSize: "small" })
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
/* @__PURE__ */ e.jsx(
|
|
35
|
+
x,
|
|
36
|
+
{
|
|
37
|
+
variant: "body1",
|
|
38
|
+
sx: {
|
|
39
|
+
marginBottom: 0,
|
|
40
|
+
whiteSpace: "pre-wrap",
|
|
41
|
+
padding: 2,
|
|
42
|
+
borderRadius: 1,
|
|
43
|
+
border: "1px solid var(--s-palette-divider)",
|
|
44
|
+
wordBreak: "break-word",
|
|
45
|
+
...o == null ? void 0 : o.sx
|
|
46
|
+
},
|
|
47
|
+
color: "text.secondary",
|
|
48
|
+
...o,
|
|
49
|
+
children: t
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
] }) : null;
|
|
53
|
+
};
|
|
54
|
+
export {
|
|
55
|
+
b as default
|
|
56
|
+
};
|