@jamsrui/clipboard 0.0.5 → 0.0.6

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 +1 @@
1
- import{useRenderElement as i}from"@jamsrui/hooks";import{CheckIcon as u,CopyIcon as m}from"@jamsrui/icons";import{useClipboardContext as c}from"./clipboard-context";const a=t=>{const{getButtonProps:r,hideCopyButton:e,isCopied:n,getIconProps:o}=c(),p=n?React.createElement(u,{...o({})}):React.createElement(m,{...o({})}),s=i("button",{props:[r(t),{children:p}]});return e?null:s};export{a as ClipboardButton};
1
+ import{jsx as t}from"react/jsx-runtime";import{useRenderElement as u}from"@jamsrui/hooks";import{CheckIcon as d,CopyIcon as m}from"@jamsrui/icons";import{useClipboardContext as c}from"./clipboard-context";const b=r=>{const{getButtonProps:e,hideCopyButton:n,isCopied:p,getIconProps:o}=c(),s=p?t(d,{...o({})}):t(m,{...o({})}),i=u("button",{props:[e(r),{children:s}]});return n?null:i};export{b as ClipboardButton};
@@ -1,7 +1,8 @@
1
1
  import { Clipboard } from './clipboard.mjs';
2
- import * as react from 'react';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import { GlobalConfigProps } from '@jamsrui/core';
4
4
  import './use-clipboard.mjs';
5
+ import 'react';
5
6
  import './use-copy-to-clipboard.mjs';
6
7
  import '@jamsrui/utils';
7
8
  import './clipboard-button.mjs';
@@ -11,7 +12,7 @@ import 'tailwind-variants';
11
12
  declare const useClipboardConfig: () => ClipboardConfig.Props;
12
13
  declare const ClipboardConfig: (props: ClipboardConfig.Props & {
13
14
  merge?: boolean;
14
- }) => react.JSX.Element;
15
+ }) => react_jsx_runtime.JSX.Element;
15
16
  declare namespace ClipboardConfig {
16
17
  interface Props extends Clipboard.Props, GlobalConfigProps<Clipboard.Props> {
17
18
  }
@@ -1,12 +1,13 @@
1
- import * as react from 'react';
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { useClipboard } from './use-clipboard.mjs';
3
+ import 'react';
3
4
  import './use-copy-to-clipboard.mjs';
4
5
  import '@jamsrui/utils';
5
6
  import './clipboard-button.mjs';
6
7
  import './styles.mjs';
7
8
  import 'tailwind-variants';
8
9
 
9
- declare const Clipboard: (props: Clipboard.Props) => react.JSX.Element;
10
+ declare const Clipboard: (props: Clipboard.Props) => react_jsx_runtime.JSX.Element;
10
11
  declare namespace Clipboard {
11
12
  interface Props extends useClipboard.Props {
12
13
  }
@@ -1 +1 @@
1
- import{useRenderElement as m}from"@jamsrui/hooks";import{mergeConfigProps as d}from"@jamsrui/utils";import{ClipboardButton as l}from"./clipboard-button";import{useClipboardConfig as c}from"./clipboard-config";import{ClipboardContext as a}from"./clipboard-context";import{useClipboard as C}from"./use-clipboard";const h=o=>{const r=c(),t=d(r,r,o),e=C(t),{getRootProps:p}=e,{children:n}=o,i=React.createElement(React.Fragment,null,n,React.createElement(l,null)),s=m("label",{props:[p(),{children:i}]});return React.createElement(a,{value:e},s)};export{h as Clipboard};
1
+ import{Fragment as f,jsx as t,jsxs as g}from"react/jsx-runtime";import{useRenderElement as l}from"@jamsrui/hooks";import{mergeConfigProps as m}from"@jamsrui/utils";import{ClipboardButton as c}from"./clipboard-button";import{useClipboardConfig as C}from"./clipboard-config";import{ClipboardContext as a}from"./clipboard-context";import{useClipboard as b}from"./use-clipboard";const v=o=>{const r=C(),p=m(r,r,o),e=b(p),{getRootProps:n}=e,{children:i}=o,s=g(f,{children:[i,t(c,{})]}),d=l("label",{props:[n(),{children:s}]});return t(a,{value:e,children:d})};export{v as Clipboard};
package/dist/index.d.mts CHANGED
@@ -1,7 +1,8 @@
1
1
  export { Clipboard } from './clipboard.mjs';
2
2
  export { ClipboardConfig, useClipboardConfig } from './clipboard-config.mjs';
3
- import 'react';
3
+ import 'react/jsx-runtime';
4
4
  import './use-clipboard.mjs';
5
+ import 'react';
5
6
  import './use-copy-to-clipboard.mjs';
6
7
  import '@jamsrui/utils';
7
8
  import './clipboard-button.mjs';
package/dist/styles.d.mts CHANGED
@@ -1,21 +1,22 @@
1
1
  import * as tailwind_variants from 'tailwind-variants';
2
+ import * as _jamsrui_utils from '@jamsrui/utils';
2
3
  import { VariantProps } from '@jamsrui/utils';
3
4
 
4
5
  declare const test = "";
5
6
  declare const copyToClipboardVariants: tailwind_variants.TVReturnType<{
6
7
  [key: string]: {
7
- [key: string]: tailwind_variants.ClassValue | {
8
- button?: tailwind_variants.ClassValue;
9
- root?: tailwind_variants.ClassValue;
10
- icon?: tailwind_variants.ClassValue;
8
+ [key: string]: _jamsrui_utils.ClassValue | {
9
+ root?: _jamsrui_utils.ClassValue;
10
+ button?: _jamsrui_utils.ClassValue;
11
+ icon?: _jamsrui_utils.ClassValue;
11
12
  };
12
13
  };
13
14
  } | {
14
15
  [x: string]: {
15
- [x: string]: tailwind_variants.ClassValue | {
16
- button?: tailwind_variants.ClassValue;
17
- root?: tailwind_variants.ClassValue;
18
- icon?: tailwind_variants.ClassValue;
16
+ [x: string]: _jamsrui_utils.ClassValue | {
17
+ root?: _jamsrui_utils.ClassValue;
18
+ button?: _jamsrui_utils.ClassValue;
19
+ icon?: _jamsrui_utils.ClassValue;
19
20
  };
20
21
  };
21
22
  } | {}, {
@@ -24,10 +25,10 @@ declare const copyToClipboardVariants: tailwind_variants.TVReturnType<{
24
25
  icon: string;
25
26
  }, undefined, {
26
27
  [key: string]: {
27
- [key: string]: tailwind_variants.ClassValue | {
28
- button?: tailwind_variants.ClassValue;
29
- root?: tailwind_variants.ClassValue;
30
- icon?: tailwind_variants.ClassValue;
28
+ [key: string]: _jamsrui_utils.ClassValue | {
29
+ root?: _jamsrui_utils.ClassValue;
30
+ button?: _jamsrui_utils.ClassValue;
31
+ icon?: _jamsrui_utils.ClassValue;
31
32
  };
32
33
  };
33
34
  } | {}, {
@@ -12,59 +12,24 @@ declare const useClipboard: (props: useClipboard.Props) => {
12
12
  "data-slot": string | undefined;
13
13
  "data-component": string | undefined;
14
14
  className: string;
15
+ onChange?: react.FormEventHandler<HTMLLabelElement> | undefined;
15
16
  form?: string | undefined | undefined;
16
17
  style?: react.CSSProperties | undefined;
17
18
  title?: string | undefined | undefined;
18
19
  ref?: react.Ref<HTMLLabelElement> | undefined;
20
+ onPointerDown?: react.PointerEventHandler<HTMLLabelElement> | undefined;
21
+ "aria-disabled"?: (boolean | "true" | "false") | undefined;
22
+ content?: string | undefined | undefined;
23
+ translate?: "yes" | "no" | undefined | undefined;
24
+ prefix?: string | undefined | undefined;
19
25
  key?: react.Key | null | undefined;
20
- suppressContentEditableWarning?: boolean | undefined | undefined;
21
- suppressHydrationWarning?: boolean | undefined | undefined;
22
- accessKey?: string | undefined | undefined;
23
- autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
24
- autoFocus?: boolean | undefined | undefined;
25
- contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
26
- contextMenu?: string | undefined | undefined;
27
- dir?: string | undefined | undefined;
28
- draggable?: (boolean | "true" | "false") | undefined;
29
- enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
26
+ children?: react.ReactNode;
30
27
  hidden?: boolean | undefined | undefined;
28
+ suppressHydrationWarning?: boolean | undefined | undefined;
31
29
  id?: string | undefined | undefined;
32
30
  lang?: string | undefined | undefined;
33
- nonce?: string | undefined | undefined;
34
- spellCheck?: (boolean | "true" | "false") | undefined;
35
- tabIndex?: number | undefined | undefined;
36
- translate?: "yes" | "no" | undefined | undefined;
37
- radioGroup?: string | undefined | undefined;
38
31
  role?: react.AriaRole | undefined;
39
- about?: string | undefined | undefined;
40
- content?: string | undefined | undefined;
41
- datatype?: string | undefined | undefined;
42
- inlist?: any;
43
- prefix?: string | undefined | undefined;
44
- property?: string | undefined | undefined;
45
- rel?: string | undefined | undefined;
46
- resource?: string | undefined | undefined;
47
- rev?: string | undefined | undefined;
48
- typeof?: string | undefined | undefined;
49
- vocab?: string | undefined | undefined;
50
- autoCorrect?: string | undefined | undefined;
51
- autoSave?: string | undefined | undefined;
52
- itemProp?: string | undefined | undefined;
53
- itemScope?: boolean | undefined | undefined;
54
- itemType?: string | undefined | undefined;
55
- itemID?: string | undefined | undefined;
56
- itemRef?: string | undefined | undefined;
57
- results?: number | undefined | undefined;
58
- security?: string | undefined | undefined;
59
- unselectable?: "on" | "off" | undefined | undefined;
60
- popover?: "" | "auto" | "manual" | undefined | undefined;
61
- popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
62
- popoverTarget?: string | undefined | undefined;
63
- inert?: boolean | undefined | undefined;
64
- inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
65
- is?: string | undefined | undefined;
66
- exportparts?: string | undefined | undefined;
67
- part?: string | undefined | undefined;
32
+ tabIndex?: number | undefined | undefined;
68
33
  "aria-activedescendant"?: string | undefined | undefined;
69
34
  "aria-atomic"?: (boolean | "true" | "false") | undefined;
70
35
  "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
@@ -81,7 +46,6 @@ declare const useClipboard: (props: useClipboard.Props) => {
81
46
  "aria-describedby"?: string | undefined | undefined;
82
47
  "aria-description"?: string | undefined | undefined;
83
48
  "aria-details"?: string | undefined | undefined;
84
- "aria-disabled"?: (boolean | "true" | "false") | undefined;
85
49
  "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
86
50
  "aria-errormessage"?: string | undefined | undefined;
87
51
  "aria-expanded"?: (boolean | "true" | "false") | undefined;
@@ -118,7 +82,6 @@ declare const useClipboard: (props: useClipboard.Props) => {
118
82
  "aria-valuemin"?: number | undefined | undefined;
119
83
  "aria-valuenow"?: number | undefined | undefined;
120
84
  "aria-valuetext"?: string | undefined | undefined;
121
- children?: react.ReactNode;
122
85
  dangerouslySetInnerHTML?: {
123
86
  __html: string | TrustedHTML;
124
87
  } | undefined | undefined;
@@ -138,7 +101,6 @@ declare const useClipboard: (props: useClipboard.Props) => {
138
101
  onFocusCapture?: react.FocusEventHandler<HTMLLabelElement> | undefined;
139
102
  onBlur?: react.FocusEventHandler<HTMLLabelElement> | undefined;
140
103
  onBlurCapture?: react.FocusEventHandler<HTMLLabelElement> | undefined;
141
- onChange?: react.FormEventHandler<HTMLLabelElement> | undefined;
142
104
  onChangeCapture?: react.FormEventHandler<HTMLLabelElement> | undefined;
143
105
  onBeforeInput?: react.FormEventHandler<HTMLLabelElement> | undefined;
144
106
  onBeforeInputCapture?: react.FormEventHandler<HTMLLabelElement> | undefined;
@@ -251,7 +213,6 @@ declare const useClipboard: (props: useClipboard.Props) => {
251
213
  onTouchMoveCapture?: react.TouchEventHandler<HTMLLabelElement> | undefined;
252
214
  onTouchStart?: react.TouchEventHandler<HTMLLabelElement> | undefined;
253
215
  onTouchStartCapture?: react.TouchEventHandler<HTMLLabelElement> | undefined;
254
- onPointerDown?: react.PointerEventHandler<HTMLLabelElement> | undefined;
255
216
  onPointerDownCapture?: react.PointerEventHandler<HTMLLabelElement> | undefined;
256
217
  onPointerMove?: react.PointerEventHandler<HTMLLabelElement> | undefined;
257
218
  onPointerMoveCapture?: react.PointerEventHandler<HTMLLabelElement> | undefined;
@@ -291,6 +252,45 @@ declare const useClipboard: (props: useClipboard.Props) => {
291
252
  onTransitionRunCapture?: react.TransitionEventHandler<HTMLLabelElement> | undefined;
292
253
  onTransitionStart?: react.TransitionEventHandler<HTMLLabelElement> | undefined;
293
254
  onTransitionStartCapture?: react.TransitionEventHandler<HTMLLabelElement> | undefined;
255
+ suppressContentEditableWarning?: boolean | undefined | undefined;
256
+ accessKey?: string | undefined | undefined;
257
+ autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
258
+ autoFocus?: boolean | undefined | undefined;
259
+ contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
260
+ contextMenu?: string | undefined | undefined;
261
+ dir?: string | undefined | undefined;
262
+ draggable?: (boolean | "true" | "false") | undefined;
263
+ enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
264
+ nonce?: string | undefined | undefined;
265
+ spellCheck?: (boolean | "true" | "false") | undefined;
266
+ radioGroup?: string | undefined | undefined;
267
+ about?: string | undefined | undefined;
268
+ datatype?: string | undefined | undefined;
269
+ inlist?: any;
270
+ property?: string | undefined | undefined;
271
+ rel?: string | undefined | undefined;
272
+ resource?: string | undefined | undefined;
273
+ rev?: string | undefined | undefined;
274
+ typeof?: string | undefined | undefined;
275
+ vocab?: string | undefined | undefined;
276
+ autoCorrect?: string | undefined | undefined;
277
+ autoSave?: string | undefined | undefined;
278
+ itemProp?: string | undefined | undefined;
279
+ itemScope?: boolean | undefined | undefined;
280
+ itemType?: string | undefined | undefined;
281
+ itemID?: string | undefined | undefined;
282
+ itemRef?: string | undefined | undefined;
283
+ results?: number | undefined | undefined;
284
+ security?: string | undefined | undefined;
285
+ unselectable?: "on" | "off" | undefined | undefined;
286
+ popover?: "" | "auto" | "manual" | undefined | undefined;
287
+ popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
288
+ popoverTarget?: string | undefined | undefined;
289
+ inert?: boolean | undefined | undefined;
290
+ inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
291
+ is?: string | undefined | undefined;
292
+ exportparts?: string | undefined | undefined;
293
+ part?: string | undefined | undefined;
294
294
  htmlFor?: string | undefined | undefined;
295
295
  render?: React.ReactElement;
296
296
  };
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@jamsrui/clipboard",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "peerDependencies": {
5
5
  "react": ">=19"
6
6
  },
7
7
  "dependencies": {
8
- "@jamsrui/hooks": "^0.0.5",
9
- "@jamsrui/core": "^0.0.5",
10
- "@jamsrui/utils": "^0.0.5",
11
- "@jamsrui/icons": "^0.0.5"
8
+ "@jamsrui/icons": "^0.0.6",
9
+ "@jamsrui/core": "^0.0.6",
10
+ "@jamsrui/hooks": "^0.0.6",
11
+ "@jamsrui/utils": "^0.0.6"
12
12
  },
13
13
  "exports": {
14
14
  ".": {