@solostylist/ui-kit 1.0.73 → 1.0.74

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 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 x } from "./s-data-table/s-data-table.js";
7
- import { DialogConfirmProvider as u, default as g, useDialogConfirm as n } from "./s-dialog-confirm/s-dialog-confirm.js";
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 C } from "./s-empty/s-empty.js";
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 de, SStripeNumber as xe, StripeTextField as ie } from "./s-stripe/s-stripe.js";
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 ke } from "./s-gradient-icon/s-gradient-icon.js";
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 { useDialog as Be } from "./hooks/use-dialog.js";
38
- import { usePopover as Ie } from "./hooks/use-popover.js";
39
- import { formatDatePosted as ze } from "./utils/dayjs.js";
40
- import { bytesToSize as Ne } from "./utils/bytes-to-size.js";
41
- import { LogLevel as we, Logger as Ae, createLogger as Ke, logger as Ve } from "./utils/logger.js";
42
- import { default as He } from "dayjs";
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
- u as DialogConfirmProvider,
45
+ i as DialogConfirmProvider,
45
46
  D as DialogMessageProvider,
46
- we as LogLevel,
47
- Ae as Logger,
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
- x as SDataTable,
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
- C as SEmpty,
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
- ke as SGradientIcon,
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
- de as SStripeExpiry,
80
- xe as SStripeNumber,
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
- ie as StripeTextField,
88
- Ne as bytesToSize,
89
- Ke as createLogger,
90
- He as dayjs,
91
- ze as formatDatePosted,
92
- Ve as logger,
93
- Be as useDialog,
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
- Ie as usePopover,
98
+ ze as usePopover,
97
99
  re as useSnackbarMessage
98
100
  };
@@ -0,0 +1,2 @@
1
+ export { default } from './s-copyable-text';
2
+ export type { SCopyableTextProps } from './s-copyable-text';
@@ -0,0 +1,4 @@
1
+ import { default as o } from "./s-copyable-text.js";
2
+ export {
3
+ o as default
4
+ };
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -0,0 +1,7 @@
1
+ import { TypographyProps } from '@mui/material';
2
+ export interface SCopyableTextProps {
3
+ text?: string;
4
+ typographyProps?: TypographyProps;
5
+ }
6
+ declare const SCopyableText: ({ text, typographyProps }: SCopyableTextProps) => import("react/jsx-runtime").JSX.Element | null;
7
+ export default SCopyableText;
@@ -0,0 +1,55 @@
1
+ import { j as e } from "../jsx-runtime-DywqP_6a.js";
2
+ import { useState as a } from "react";
3
+ import { Box as l, IconButton as d, Typography as x } from "@mui/material";
4
+ import { c as s } from "../createSvgIcon-DN-sh_sr.js";
5
+ const m = s(/* @__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 = s(/* @__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"), j = ({ text: t, typographyProps: o }) => {
10
+ const [r, i] = a(!1), n = async () => {
11
+ try {
12
+ await navigator.clipboard.writeText(t || ""), i(!0), setTimeout(() => i(!1), 2e3);
13
+ } catch (c) {
14
+ console.error("Failed to copy text:", c);
15
+ }
16
+ };
17
+ return t ? /* @__PURE__ */ e.jsxs(l, { sx: { position: "relative" }, children: [
18
+ /* @__PURE__ */ e.jsx(
19
+ d,
20
+ {
21
+ onClick: n,
22
+ size: "small",
23
+ sx: {
24
+ position: "absolute",
25
+ top: 8,
26
+ right: 8,
27
+ zIndex: 1,
28
+ color: r ? "success.main" : "inherit"
29
+ },
30
+ children: r ? /* @__PURE__ */ e.jsx(m, { fontSize: "small" }) : /* @__PURE__ */ e.jsx(h, { fontSize: "small" })
31
+ }
32
+ ),
33
+ /* @__PURE__ */ e.jsx(
34
+ x,
35
+ {
36
+ variant: "body1",
37
+ sx: {
38
+ marginBottom: 0,
39
+ whiteSpace: "pre-wrap",
40
+ padding: 2,
41
+ borderRadius: 1,
42
+ border: "1px solid var(--s-palette-divider)",
43
+ wordBreak: "break-word",
44
+ ...o == null ? void 0 : o.sx
45
+ },
46
+ color: "text.secondary",
47
+ ...o,
48
+ children: t
49
+ }
50
+ )
51
+ ] }) : null;
52
+ };
53
+ export {
54
+ j as default
55
+ };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "registry": "https://registry.npmjs.org"
5
5
  },
6
- "version": "1.0.73",
6
+ "version": "1.0.74",
7
7
  "description": "advanced ui kit for solostylist",
8
8
  "private": false,
9
9
  "type": "module",