@maxio-com/react-ui-components 9.22.1 → 9.23.0
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/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/skills/maxio-react/references/components-copy-to-clipboard.md +6 -4
- package/dist/temporary-typings/src/components/CopyToClipboard/CopyToClipboard.d.ts.map +1 -1
- package/dist/temporary-typings/src/components/CopyToClipboard/CopyToClipboard.types.d.ts +2 -2
- package/dist/temporary-typings/src/components/CopyToClipboard/CopyToClipboard.types.d.ts.map +1 -1
- package/package.json +2 -2
- package/typings/index.d.ts +2 -2
|
@@ -45,6 +45,7 @@ Use `variant` to increase its emphasis when needed:
|
|
|
45
45
|
| `variant` | When to use |
|
|
46
46
|
| :---------- | :------------------------------------------------------------- |
|
|
47
47
|
| `ghost` | Default. Suits inline use beside the value being copied. |
|
|
48
|
+
| `subtle` | Ghost with a gray icon. Only when it must be discreet. |
|
|
48
49
|
| `tertiary` | Use when the copy control needs slightly more emphasis. |
|
|
49
50
|
| `secondary` | Copying is one of the main actions on the surface. |
|
|
50
51
|
| `primary` | Rare. Only when copying is _the_ action users came to perform. |
|
|
@@ -66,8 +67,9 @@ Use `variant` to increase its emphasis when needed:
|
|
|
66
67
|
that did not happen.
|
|
67
68
|
- **Async values**: keep the button `disabled` until `value` is populated so
|
|
68
69
|
users cannot copy a placeholder.
|
|
69
|
-
- **Sizing**: `size` uses the shared IconButton sizing. Target areas are
|
|
70
|
-
32px, and 40px; the glyph remains 16px
|
|
70
|
+
- **Sizing**: `size` uses the shared IconButton sizing. Target areas are 24px,
|
|
71
|
+
28px, 32px, and 40px; the glyph remains 16px except at `xs`, which drops it to
|
|
72
|
+
14px and removes the padding for dense inline use. Otherwise consistent with
|
|
71
73
|
other icon buttons in the system.
|
|
72
74
|
|
|
73
75
|
### Accessibility
|
|
@@ -153,10 +155,10 @@ import { Body, CopyToClipboard, Flex } from "@maxio-com/react-ui-components";
|
|
|
153
155
|
| `onCopy` | `((value: string) => void)` | no | - | Called with the copied value once the clipboard write succeeds. | TypeLiteral |
|
|
154
156
|
| `onCopyError` | `((error: unknown) => void)` | no | - | Called when the clipboard write fails, such as in an insecure context or when permission is denied. The copied state is not entered. | TypeLiteral |
|
|
155
157
|
| `resetAfterMs` | `number` | no | `2000` | How long the copied state lasts before reverting, in milliseconds. | TypeLiteral |
|
|
156
|
-
| `size` | `"sm" \| "md" \| "lg"` | no | `md` | Changes the size of the button. | TypeLiteral |
|
|
158
|
+
| `size` | `"sm" \| "md" \| "lg" \| "xs"` | no | `md` | Changes the size of the button. | TypeLiteral |
|
|
157
159
|
| `tooltipPlacement` | `"top" \| "right" \| "bottom" \| "left" \| "top-start" \| "top-end" \| "right-start" \| "right-end" \| "bottom-start" \| "bottom-end" \| "left-start" \| "left-end"` | no | `top` | Where the tooltip is positioned relative to the button. | TypeLiteral |
|
|
158
160
|
| `value` | `string` | yes | - | Text written to the clipboard when the button is pressed. | TypeLiteral |
|
|
159
|
-
| `variant` | `"primary" \| "secondary" \| "tertiary" \| "ghost"` | no | `ghost` | Button variant. | TypeLiteral |
|
|
161
|
+
| `variant` | `"primary" \| "secondary" \| "tertiary" \| "ghost" \| "subtle"` | no | `ghost` | Button variant. | TypeLiteral |
|
|
160
162
|
|
|
161
163
|
## Stories
|
|
162
164
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopyToClipboard.d.ts","sourceRoot":"","sources":["../../../../../src/components/CopyToClipboard/CopyToClipboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CopyToClipboard.d.ts","sourceRoot":"","sources":["../../../../../src/components/CopyToClipboard/CopyToClipboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAc/D,QAAA,MAAM,eAAe,GAAI,8JAetB,oBAAoB,sBA6CtB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes } from 'react';
|
|
2
2
|
import { Placement } from '../../hooks/useOverlayTrigger/types';
|
|
3
|
-
export type CopyToClipboardSize = 'sm' | 'md' | 'lg';
|
|
4
|
-
export type CopyToClipboardVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost';
|
|
3
|
+
export type CopyToClipboardSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
4
|
+
export type CopyToClipboardVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'subtle';
|
|
5
5
|
export type CopyToClipboardProps = {
|
|
6
6
|
value: string;
|
|
7
7
|
copyLabel?: string;
|
package/dist/temporary-typings/src/components/CopyToClipboard/CopyToClipboard.types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopyToClipboard.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/CopyToClipboard/CopyToClipboard.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAEhE,MAAM,MAAM,mBAAmB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"CopyToClipboard.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/CopyToClipboard/CopyToClipboard.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAEhE,MAAM,MAAM,mBAAmB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5D,MAAM,MAAM,sBAAsB,GAC9B,SAAS,GACT,WAAW,GACX,UAAU,GACV,OAAO,GACP,QAAQ,CAAC;AAEb,MAAM,MAAM,oBAAoB,GAAG;IAIjC,KAAK,EAAE,MAAM,CAAC;IAKd,SAAS,CAAC,EAAE,MAAM,CAAC;IAMnB,WAAW,CAAC,EAAE,MAAM,CAAC;IAKrB,cAAc,CAAC,EAAE,MAAM,CAAC;IAKxB,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAK3B,OAAO,CAAC,EAAE,sBAAsB,CAAC;IAIjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAKnB,YAAY,CAAC,EAAE,MAAM,CAAC;IAKtB,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAI7B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAKjC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC,GAAG,IAAI,CACN,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,CACzC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maxio-com/react-ui-components",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.23.0",
|
|
4
4
|
"description": "React UI components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "b1b1dedfb4c97a381d065702fd7d8ee7002fbefd"
|
|
68
68
|
}
|
package/typings/index.d.ts
CHANGED
|
@@ -157,8 +157,8 @@ type Placement = Side | AlignedPlacement;
|
|
|
157
157
|
type Interactions = 'click' | 'hover' | 'focus' | 'dismiss';
|
|
158
158
|
type OverlayAriaRole = 'tooltip' | 'dialog' | 'alertdialog' | 'menu' | 'listbox' | 'grid' | 'tree';
|
|
159
159
|
|
|
160
|
-
type CopyToClipboardSize = 'sm' | 'md' | 'lg';
|
|
161
|
-
type CopyToClipboardVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost';
|
|
160
|
+
type CopyToClipboardSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
161
|
+
type CopyToClipboardVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'subtle';
|
|
162
162
|
type CopyToClipboardProps = {
|
|
163
163
|
value: string;
|
|
164
164
|
copyLabel?: string;
|