@cripty2001/utils 0.0.123 → 0.0.125

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.
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = Copiable;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const utils_1 = require("@cripty2001/utils");
6
5
  const lucide_react_1 = require("lucide-react");
7
6
  const react_1 = require("react");
7
+ const __1 = require("../");
8
8
  function Copiable({ value, className }) {
9
9
  const [copying, setCopying] = (0, react_1.useState)(false);
10
10
  const copy = (0, react_1.useCallback)(() => {
11
- (0, utils_1.copyToClipboard)(value);
11
+ (0, __1.copyToClipboard)(value);
12
12
  setCopying(true);
13
13
  setTimeout(() => {
14
14
  setCopying(false);
@@ -11,7 +11,7 @@ function InputComponent(props) {
11
11
  const [error, setError] = (0, react_1.useState)(null);
12
12
  return ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', gap: '0.5rem' }, children: [(0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', gap: '0.5rem' }, children: [props.label &&
13
13
  (0, jsx_runtime_1.jsx)("label", { className: baseClassName.label, children: props.label }), props.copy &&
14
- (0, jsx_runtime_1.jsx)(lucide_react_1.CopyIcon, { style: { width: '1rem', height: '1rem', cursor: 'pointer' }, onClick: () => (0, index_1.copyToClipboard)(props.value) })] }), (0, jsx_runtime_1.jsxs)("div", { style: { position: 'relative' }, className: baseClassName.wrapper, children: [props.icon &&
14
+ (0, jsx_runtime_1.jsx)(lucide_react_1.CopyIcon, { style: { width: '1rem', height: '1rem', cursor: 'pointer' }, onClick: () => (0, index_1.copyToClipboard)(props.value) })] }), (0, jsx_runtime_1.jsxs)("div", { style: { position: 'relative' }, className: baseClassName.wrapper, children: ["!!! ", baseClassName.wrapper, "!!!", props.icon &&
15
15
  (0, jsx_runtime_1.jsx)("div", { style: { position: 'absolute', left: '0.5rem', top: '0.5rem' }, children: props.icon }), (0, jsx_runtime_1.jsx)("div", { style: { paddingLeft: props.icon ? '2rem' : '0.5rem' }, children: props.children({
16
16
  value: props.value,
17
17
  setValue: (v) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cripty2001/utils",
3
- "version": "0.0.123",
3
+ "version": "0.0.125",
4
4
  "description": "Internal Set of utils. If you need them use them, otherwise go to the next package ;)",
5
5
  "homepage": "https://github.com/cripty2001/utils#readme",
6
6
  "bugs": {