@ably/ui 18.3.1 → 18.4.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/core/Accordion.js +1 -1
- package/core/Accordion.js.map +1 -1
- package/core/CodeSnippet/CodeSnippet.test.js +1 -1
- package/core/CodeSnippet/CodeSnippet.test.js.map +1 -1
- package/core/CodeSnippet/PlainCodeView.js +1 -1
- package/core/CodeSnippet/PlainCodeView.js.map +1 -1
- package/core/CodeSnippet/PlainCodeView.test.js +2 -0
- package/core/CodeSnippet/PlainCodeView.test.js.map +1 -0
- package/core/CodeSnippet/copyToClipboard.js +2 -0
- package/core/CodeSnippet/copyToClipboard.js.map +1 -0
- package/core/CodeSnippet.js +1 -1
- package/core/CodeSnippet.js.map +1 -1
- package/core/DropdownMenu.js +1 -1
- package/core/DropdownMenu.js.map +1 -1
- package/core/FeaturedLink.js +1 -1
- package/core/FeaturedLink.js.map +1 -1
- package/core/Flyout.js +1 -1
- package/core/Flyout.js.map +1 -1
- package/core/Header/HeaderLinks.js +1 -1
- package/core/Header/HeaderLinks.js.map +1 -1
- package/core/Icon/types.js.map +1 -1
- package/core/Icon.js.map +1 -1
- package/core/Meganav/MeganavMobile.js +1 -1
- package/core/Meganav/MeganavMobile.js.map +1 -1
- package/core/TabMenu.js +1 -1
- package/core/TabMenu.js.map +1 -1
- package/core/styles/buttons.css +4 -4
- package/core/styles/legacy-buttons.css +5 -5
- package/index.d.ts +29 -0
- package/package.json +26 -25
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.ui-btn {
|
|
3
|
-
@apply text-white bg-cool-black text-label2 font-sans font-
|
|
3
|
+
@apply text-white bg-cool-black text-label2 font-sans font-semibold inline-block rounded p-btn;
|
|
4
4
|
@apply hover:text-white hover:bg-neutral-1100;
|
|
5
5
|
@apply active:text-white active:bg-neutral-1200;
|
|
6
6
|
@apply focus:text-white focus:bg-cool-black focus-base;
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
background-size: 200% 100%;
|
|
25
25
|
background-position: 0% 0%;
|
|
26
26
|
|
|
27
|
-
@apply text-white text-label2 font-sans font-
|
|
27
|
+
@apply text-white text-label2 font-sans font-semibold inline-block rounded p-btn;
|
|
28
28
|
@apply focus-base;
|
|
29
29
|
@apply inline-flex items-center justify-center;
|
|
30
30
|
}
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.ui-btn-invert {
|
|
43
|
-
@apply text-cool-black bg-white text-label2 font-sans font-
|
|
43
|
+
@apply text-cool-black bg-white text-label2 font-sans font-semibold inline-block rounded p-btn;
|
|
44
44
|
@apply hover:text-white hover:bg-active-orange;
|
|
45
45
|
@apply active:text-white active:bg-red-orange;
|
|
46
46
|
@apply focus:text-white focus:bg-cool-black focus-base;
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.ui-btn-secondary {
|
|
53
|
-
@apply text-cool-black bg-white text-label2 font-sans font-
|
|
53
|
+
@apply text-cool-black bg-white text-label2 font-sans font-semibold inline-block border-btn border-cool-black rounded p-btn;
|
|
54
54
|
@apply hover:text-cool-black hover:border-active-orange hover:bg-white;
|
|
55
55
|
@apply active:border-red-orange active:bg-white;
|
|
56
56
|
@apply focus:border-cool-black focus:bg-white focus-base;
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.ui-btn-secondary-invert {
|
|
63
|
-
@apply text-white bg-cool-black text-label2 font-sans font-
|
|
63
|
+
@apply text-white bg-cool-black text-label2 font-sans font-semibold inline-block border-btn border-mid-grey rounded p-btn;
|
|
64
64
|
@apply hover:text-white hover:border-active-orange;
|
|
65
65
|
@apply active:border-red-orange;
|
|
66
66
|
@apply focus-base;
|
package/index.d.ts
CHANGED
|
@@ -369,6 +369,11 @@ type PlainCodeViewProps = {
|
|
|
369
369
|
language: string;
|
|
370
370
|
icon: IconName | null;
|
|
371
371
|
className?: string;
|
|
372
|
+
/**
|
|
373
|
+
* Fired with the copied text once the copy control is used and the text has
|
|
374
|
+
* actually reached the clipboard.
|
|
375
|
+
*/
|
|
376
|
+
onCopy?: (text: string) => void;
|
|
372
377
|
};
|
|
373
378
|
const PlainCodeView: React.FC<PlainCodeViewProps>;
|
|
374
379
|
export default PlainCodeView;
|
|
@@ -397,6 +402,18 @@ export default TooltipButton;
|
|
|
397
402
|
//# sourceMappingURL=TooltipButton.d.ts.map
|
|
398
403
|
}
|
|
399
404
|
|
|
405
|
+
declare module '@ably/ui/core/CodeSnippet/copyToClipboard' {
|
|
406
|
+
/**
|
|
407
|
+
* Writes `text` to the clipboard and only then reports it to `onCopy`. A failed
|
|
408
|
+
* write (denied permission, or a non-secure context where `navigator.clipboard`
|
|
409
|
+
* is absent) leaves nothing on the clipboard, so callers — which use `onCopy` to
|
|
410
|
+
* record that the user took the snippet — must not be told a copy happened.
|
|
411
|
+
*/
|
|
412
|
+
const copyToClipboard: (text: string, onCopy?: (text: string) => void) => Promise<void>;
|
|
413
|
+
export default copyToClipboard;
|
|
414
|
+
//# sourceMappingURL=copyToClipboard.d.ts.map
|
|
415
|
+
}
|
|
416
|
+
|
|
400
417
|
declare module '@ably/ui/core/CodeSnippet/languages' {
|
|
401
418
|
import { IconName } from ".@ably/ui/core/Icon/types";
|
|
402
419
|
export interface LanguageInfo {
|
|
@@ -476,6 +493,18 @@ export type CodeSnippetProps = {
|
|
|
476
493
|
* Whether to wrap code content instead of scrolling
|
|
477
494
|
*/
|
|
478
495
|
wrapCode?: boolean;
|
|
496
|
+
/**
|
|
497
|
+
* Fired when the user takes the snippet with a copy control, receiving the
|
|
498
|
+
* exact text written to the clipboard. Selecting part of the code and
|
|
499
|
+
* pressing cmd-C does not fire it — a partial selection isn't the user
|
|
500
|
+
* taking the snippet, and callers use this to record that they did. A copy
|
|
501
|
+
* that fails to reach the clipboard does not fire it either.
|
|
502
|
+
*
|
|
503
|
+
* The text may contain a live, unmasked API key — `apiKeys` placeholders are
|
|
504
|
+
* substituted for real before the copy. Do not log it or transmit it to
|
|
505
|
+
* third-party services.
|
|
506
|
+
*/
|
|
507
|
+
onCopy?: (text: string) => void;
|
|
479
508
|
};
|
|
480
509
|
/**
|
|
481
510
|
* CodeSnippet component that displays code with language switching capability
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ably/ui",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.4.0",
|
|
4
4
|
"description": "Home of the Ably design system library ([design.ably.com](https://design.ably.com)). It provides a showcase, development/test environment and a publishing pipeline for different distributables.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,28 +21,28 @@
|
|
|
21
21
|
"workerDirectory": "./public"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@storybook/addon-docs": "^10.
|
|
25
|
-
"@storybook/addon-themes": "^10.
|
|
26
|
-
"@storybook/addon-vitest": "^10.
|
|
27
|
-
"@storybook/react-vite": "^10.
|
|
24
|
+
"@storybook/addon-docs": "^10.5.0",
|
|
25
|
+
"@storybook/addon-themes": "^10.5.0",
|
|
26
|
+
"@storybook/addon-vitest": "^10.5.0",
|
|
27
|
+
"@storybook/react-vite": "^10.5.0",
|
|
28
28
|
"@svgr/core": "^8.1.0",
|
|
29
29
|
"@svgr/plugin-jsx": "^8.1.0",
|
|
30
30
|
"@svgr/plugin-svgo": "^8.1.0",
|
|
31
|
-
"@swc/cli": "^0.8.
|
|
31
|
+
"@swc/cli": "^0.8.1",
|
|
32
32
|
"@swc/core": "^1.13.5",
|
|
33
33
|
"@tailwindcss/container-queries": "^0.1.1",
|
|
34
34
|
"@testing-library/react": "^16.3.0",
|
|
35
35
|
"@types/js-cookie": "^3.0.6",
|
|
36
|
-
"@types/node": "^
|
|
36
|
+
"@types/node": "^24",
|
|
37
37
|
"@types/react": "^18.3.1",
|
|
38
38
|
"@types/react-dom": "^18.3.0",
|
|
39
39
|
"@types/svg-sprite": "^0.0.39",
|
|
40
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
41
|
-
"@typescript-eslint/parser": "^8.
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "^8.64.0",
|
|
41
|
+
"@typescript-eslint/parser": "^8.64.0",
|
|
42
42
|
"@vitejs/plugin-react-swc": "^4.3.0",
|
|
43
|
-
"@vitest/browser": "^4.1.
|
|
44
|
-
"@vitest/browser-playwright": "^4.1.
|
|
45
|
-
"@vitest/coverage-v8": "^4.1.
|
|
43
|
+
"@vitest/browser": "^4.1.10",
|
|
44
|
+
"@vitest/browser-playwright": "^4.1.10",
|
|
45
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
46
46
|
"autoprefixer": "^10.5.0",
|
|
47
47
|
"eslint": "^8.57.1",
|
|
48
48
|
"eslint-config-prettier": "^10.1.8",
|
|
@@ -50,40 +50,41 @@
|
|
|
50
50
|
"eslint-plugin-react": "^7.35.0",
|
|
51
51
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
52
52
|
"eslint-plugin-react-perf": "^3.3.3",
|
|
53
|
-
"eslint-plugin-storybook": "^10.
|
|
53
|
+
"eslint-plugin-storybook": "^10.5.0",
|
|
54
54
|
"heroicons": "^2.2.0",
|
|
55
55
|
"http-server": "14.1.1",
|
|
56
56
|
"jsdom": "^29.1.0",
|
|
57
|
-
"mixpanel-browser": "^2.
|
|
58
|
-
"msw": "2.
|
|
57
|
+
"mixpanel-browser": "^2.81.0",
|
|
58
|
+
"msw": "2.15.0",
|
|
59
59
|
"msw-storybook-addon": "^2.0.7",
|
|
60
|
-
"playwright": "^1.
|
|
61
|
-
"posthog-js": "1.
|
|
62
|
-
"prettier": "^3.
|
|
63
|
-
"storybook": "^10.
|
|
60
|
+
"playwright": "^1.61.1",
|
|
61
|
+
"posthog-js": "1.403.0",
|
|
62
|
+
"prettier": "^3.9.4",
|
|
63
|
+
"storybook": "^10.5.0",
|
|
64
64
|
"svg-sprite": "^2.0.4",
|
|
65
65
|
"tailwindcss": "^3.3.6",
|
|
66
66
|
"ts-node": "^10.9.2",
|
|
67
67
|
"typescript": "6.0.2",
|
|
68
|
-
"
|
|
69
|
-
"
|
|
68
|
+
"update-browserslist-db": "^1.2.3",
|
|
69
|
+
"vite": "^8.1.2",
|
|
70
|
+
"vitest": "^4.1.10"
|
|
70
71
|
},
|
|
71
72
|
"dependencies": {
|
|
72
73
|
"@heroicons/react": "^2.2.0",
|
|
73
74
|
"@radix-ui/react-accordion": "^1.2.1",
|
|
74
75
|
"@radix-ui/react-collapsible": "^1.1.12",
|
|
75
76
|
"@radix-ui/react-navigation-menu": "^1.2.4",
|
|
76
|
-
"@radix-ui/react-select": "^2.
|
|
77
|
-
"@radix-ui/react-switch": "^1.
|
|
77
|
+
"@radix-ui/react-select": "^2.3.1",
|
|
78
|
+
"@radix-ui/react-switch": "^1.3.1",
|
|
78
79
|
"@radix-ui/react-tabs": "^1.1.1",
|
|
79
80
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
80
81
|
"array-flat-polyfill": "^1.0.1",
|
|
81
82
|
"clsx": "^2.1.1",
|
|
82
|
-
"dompurify": "^3.4.
|
|
83
|
+
"dompurify": "^3.4.12",
|
|
83
84
|
"embla-carousel": "^8.6.0",
|
|
84
85
|
"embla-carousel-autoplay": "^8.6.0",
|
|
85
86
|
"embla-carousel-react": "^8.6.0",
|
|
86
|
-
"es-toolkit": "^1.
|
|
87
|
+
"es-toolkit": "^1.49.0",
|
|
87
88
|
"highlight.js": "^11.11.1",
|
|
88
89
|
"highlightjs-curl": "^1.3.0",
|
|
89
90
|
"js-cookie": "^3.0.7",
|