@gridui/clipboard 1.0.6 → 1.0.7

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/README.md CHANGED
@@ -18,3 +18,5 @@ uses the grid border color for the copy button's separator;
18
18
  standalone mode supplies a straight control border. Neither mode adds external
19
19
  padding or expands environment variables, usernames, or path placeholders.
20
20
 
21
+
22
+ [Component reference](docs/reference/README.md) contains focused API pages for each public component.
package/docs/catalog.json CHANGED
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "name": "@gridui/clipboard",
4
- "version": "1.0.6",
4
+ "version": "1.0.7",
5
5
  "category": "core",
6
6
  "description": "GridUI React clipboard",
7
7
  "usage": "`CopyPath` displays an exact `value` and an explicit copy button. Callers supply its accessible `label`, `copyLabel`, `copiedLabel`, and `failedLabel`. Clipboard success is announced only after the write resolves; unavailable or denied clipboard access selects the visible path for manual copying and reports failure. `frame=\"integrated\"` omits outer borders so a parent grid owns its seams and uses the grid border color for the copy button's separator; standalone mode supplies a straight control border. Neither mode adds external padding or expands environment variables, usernames, or path placeholders.",
8
8
  "documentation": [
9
- "README.md"
9
+ "README.md",
10
+ "docs/reference/README.md",
11
+ "docs/reference/copy-button.md",
12
+ "docs/reference/copy-path.md"
10
13
  ],
11
14
  "exports": [
12
15
  {
@@ -0,0 +1,5 @@
1
+ <!-- Generated by pnpm docs:storybook. -->
2
+ # Component reference
3
+
4
+ - [CopyButton](copy-button.md)
5
+ - [CopyPath](copy-path.md)
@@ -0,0 +1,105 @@
1
+ <!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
2
+ # CopyButton
3
+
4
+ Copies supplied text to the clipboard and reports the result. Use it beside content that users need to paste elsewhere.
5
+
6
+ Import from ``@gridui/clipboard`` and load Theme before this family's stylesheet.
7
+
8
+ ```tsx
9
+ import { CopyButton } from "@gridui/clipboard";
10
+ import "@gridui/theme/styles.css";
11
+ import "@gridui/clipboard/styles.css";
12
+ ```
13
+
14
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/clipboard/README.md) for shared behavior and stylesheet dependencies.
15
+
16
+ The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/clipboard/stories/copy-button.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
17
+
18
+ ## API
19
+
20
+ The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
21
+
22
+ ### variant
23
+
24
+ ``"text" | "primary" | "secondary" | "quiet" | "highlight" | "underlined" | null | undefined`` · Optional
25
+
26
+ Visual variant.
27
+
28
+ ### size
29
+
30
+ ``"small" | "standard" | "large" | "extra-large" | null | undefined`` · Optional
31
+
32
+ Component size preset.
33
+
34
+ ### layout
35
+
36
+ ``"cell" | "standard" | "icon" | "entry" | "rail" | "divided" | null | undefined`` · Optional
37
+
38
+ Layout within the containing region.
39
+
40
+ ### iconMotion
41
+
42
+ ``"none" | "outward" | null | undefined`` · Optional
43
+
44
+ ### onFocus
45
+
46
+ ``(event: FocusEvent<HTMLButtonElement, Element>): void`` · Optional
47
+
48
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
49
+
50
+ ### onBlur
51
+
52
+ ``(event: FocusEvent<HTMLButtonElement, Element>): void`` · Optional
53
+
54
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
55
+
56
+ ### onChange
57
+
58
+ ``(event: ChangeEvent<HTMLButtonElement, Element>): void`` · Optional
59
+
60
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
61
+
62
+ ### onSubmit
63
+
64
+ ``(event: SubmitEvent<HTMLButtonElement>): void`` · Optional
65
+
66
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
67
+
68
+ ### loading
69
+
70
+ ``boolean | undefined`` · Optional
71
+
72
+ ### startIcon
73
+
74
+ ``ReactNode`` · Optional
75
+
76
+ ### startIconLayout
77
+
78
+ ``"divided" | "inline" | undefined`` · Optional
79
+
80
+ ### startIconSize
81
+
82
+ ``"standard" | "large" | "extra-large" | undefined`` · Optional
83
+
84
+ ### endIcon
85
+
86
+ ``ReactNode`` · Optional
87
+
88
+ ### value
89
+
90
+ ``string`` · Required
91
+
92
+ Controlled value. Pair with the corresponding change callback.
93
+
94
+ ### copiedLabel
95
+
96
+ ``string`` · Required
97
+
98
+ ### failedLabel
99
+
100
+ ``string`` · Required
101
+
102
+ ### label
103
+
104
+ ``string`` · Required
105
+
@@ -0,0 +1,49 @@
1
+ <!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
2
+ # CopyPath
3
+
4
+ Displays a path with a copy action. Use it for file locations or other path-like values that users need to reuse.
5
+
6
+ Import from ``@gridui/clipboard`` and load Theme before this family's stylesheet.
7
+
8
+ ```tsx
9
+ import { CopyPath } from "@gridui/clipboard";
10
+ import "@gridui/theme/styles.css";
11
+ import "@gridui/clipboard/styles.css";
12
+ ```
13
+
14
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/clipboard/README.md) for shared behavior and stylesheet dependencies.
15
+
16
+ The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/clipboard/stories/copy-path.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
17
+
18
+ ## API
19
+
20
+ The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
21
+
22
+ ### value
23
+
24
+ ``string`` · Required
25
+
26
+ Controlled value. Pair with the corresponding change callback.
27
+
28
+ ### copiedLabel
29
+
30
+ ``string`` · Required
31
+
32
+ ### failedLabel
33
+
34
+ ``string`` · Required
35
+
36
+ ### label
37
+
38
+ ``string`` · Required
39
+
40
+ ### copyLabel
41
+
42
+ ``string`` · Required
43
+
44
+ ### frame
45
+
46
+ ``"standalone" | "integrated" | undefined`` · Optional
47
+
48
+ Default: ``"standalone"``
49
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridui/clipboard",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "GridUI React clipboard",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@gridui/button": "^4.0.0",
31
- "@gridui/input": "^2.0.0",
31
+ "@gridui/input": "^3.0.0",
32
32
  "@gridui/theme": "^2.5.3",
33
33
  "class-variance-authority": "0.7.1",
34
34
  "lucide-react": "1.70.0"