@fibery/ui-kit 1.39.0 → 1.40.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/CHANGELOG.md +12 -0
- package/package.json +3 -4
- package/src/button/select-button.tsx +11 -3
- package/src/collapsible/index.tsx +2 -2
- package/src/command-menu/index.tsx +4 -2
- package/src/copy-to-clipboard.ts +10 -0
- package/src/file-item-2.tsx +257 -150
- package/src/file-item.tsx +35 -18
- package/src/guide-link.tsx +1 -1
- package/src/html-styles.ts +2 -12
- package/src/icons/ast/FileImage.ts +1 -1
- package/src/icons/ast/Mermaid.ts +8 -0
- package/src/icons/ast/TextNoWrap.ts +8 -0
- package/src/icons/ast/TextWrap.ts +8 -0
- package/src/icons/ast/TypeId.ts +8 -0
- package/src/icons/ast/index.tsx +4 -0
- package/src/icons/react/Mermaid.tsx +13 -0
- package/src/icons/react/TextNoWrap.tsx +13 -0
- package/src/icons/react/TextWrap.tsx +13 -0
- package/src/icons/react/TypeId.tsx +13 -0
- package/src/icons/react/index.tsx +4 -0
- package/src/icons/svg/file-image.svg +2 -2
- package/src/icons/svg/mermaid.svg +3 -0
- package/src/icons/svg/text-no-wrap.svg +3 -0
- package/src/icons/svg/text-wrap.svg +3 -0
- package/src/icons/svg/type/id.svg +3 -0
- package/src/images-gallery/images-gallery-fall-through-provider.tsx +2 -1
- package/src/images-gallery/images-gallery.tsx +524 -185
- package/src/{images-gallery-2 → images-gallery}/slide-buttons.tsx +25 -13
- package/src/images-gallery/zoom.tsx +5 -94
- package/src/popover/index.tsx +5 -3
- package/src/select/components/menu-list-virtualized.tsx +123 -84
- package/src/select/components/menu.tsx +5 -3
- package/src/table.tsx +13 -10
- package/src/toggle-button/toggle-button.tsx +5 -0
- package/src/images-gallery-2/images-gallery-2.tsx +0 -522
- package/src/images-gallery-2/zoom.tsx +0 -35
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fibery/ui-kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.40.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"dependencies": {
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
"react-color": "2.19.3",
|
|
40
40
|
"react-day-picker": "8.10.1",
|
|
41
41
|
"react-intersection-observer": "9.3.5",
|
|
42
|
-
"react-medium-image-zoom": "5.2.10",
|
|
43
42
|
"react-popper": "2.3.0",
|
|
44
43
|
"react-select": "5.3.2",
|
|
45
44
|
"react-select-country-list": "2.2.1",
|
|
@@ -47,9 +46,9 @@
|
|
|
47
46
|
"screenfull": "6.0.2",
|
|
48
47
|
"tabbable": "5.2.1",
|
|
49
48
|
"ua-parser-js": "1.0.39",
|
|
49
|
+
"@fibery/emoji-data": "2.7.1",
|
|
50
50
|
"@fibery/helpers": "1.3.4",
|
|
51
|
-
"@fibery/react": "1.4.6"
|
|
52
|
-
"@fibery/emoji-data": "2.7.1"
|
|
51
|
+
"@fibery/react": "1.4.6"
|
|
53
52
|
},
|
|
54
53
|
"peerDependencies": {
|
|
55
54
|
"react": "18.3.1",
|
|
@@ -34,10 +34,18 @@ export type SelectButtonProps = {
|
|
|
34
34
|
* Should be used as an escape hatch for components like ui-kit/src/popup that don't set "aria-expanded"
|
|
35
35
|
*/
|
|
36
36
|
open?: boolean;
|
|
37
|
-
} &
|
|
37
|
+
} & ButtonProps;
|
|
38
38
|
|
|
39
39
|
export const SelectButton = forwardRef<HTMLButtonElement, SelectButtonProps>(function SelectButton(
|
|
40
|
-
{
|
|
40
|
+
{
|
|
41
|
+
size = "medium",
|
|
42
|
+
className,
|
|
43
|
+
open,
|
|
44
|
+
variant = "ghost",
|
|
45
|
+
iconEnd = <ArrowBottom className={iconSize[size]} />,
|
|
46
|
+
color = "neutral",
|
|
47
|
+
...rest
|
|
48
|
+
},
|
|
41
49
|
forwardedRef
|
|
42
50
|
) {
|
|
43
51
|
return (
|
|
@@ -45,7 +53,7 @@ export const SelectButton = forwardRef<HTMLButtonElement, SelectButtonProps>(fun
|
|
|
45
53
|
ref={forwardedRef}
|
|
46
54
|
aria-expanded={open}
|
|
47
55
|
size={size}
|
|
48
|
-
iconEnd={
|
|
56
|
+
iconEnd={iconEnd}
|
|
49
57
|
variant={variant}
|
|
50
58
|
color={color}
|
|
51
59
|
className={className}
|
|
@@ -36,10 +36,10 @@ export const CollapsibleContent = styled(Collapsible.Content)`
|
|
|
36
36
|
|
|
37
37
|
@media (prefers-reduced-motion: no-preference) {
|
|
38
38
|
&[data-state="open"] {
|
|
39
|
-
animation: slideDown
|
|
39
|
+
animation: slideDown 120ms ease-out;
|
|
40
40
|
}
|
|
41
41
|
&[data-state="closed"] {
|
|
42
|
-
animation: slideUp
|
|
42
|
+
animation: slideUp 120ms ease-out;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
`;
|
|
@@ -10,8 +10,10 @@ import Search from "../icons/react/Search";
|
|
|
10
10
|
|
|
11
11
|
export const CommandMenuRoot = styled(CommandRoot)`
|
|
12
12
|
display: flex;
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
:where(&) {
|
|
14
|
+
height: 100%;
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
15
17
|
flex-direction: column;
|
|
16
18
|
overflow: hidden;
|
|
17
19
|
border-radius: ${border.radius8}px;
|
package/src/copy-to-clipboard.ts
CHANGED
|
@@ -1 +1,11 @@
|
|
|
1
1
|
export const copyToClipboard = (text: string) => window.navigator.clipboard.writeText(text);
|
|
2
|
+
export const copyUrlToClipboard = ({url, label}: {url: string; label?: string}) => {
|
|
3
|
+
const htmlString = `<a href="${url}" target="_blank">${label || url}</a>`;
|
|
4
|
+
|
|
5
|
+
return window.navigator.clipboard.write([
|
|
6
|
+
new ClipboardItem({
|
|
7
|
+
"text/html": new Blob([htmlString], {type: "text/html"}),
|
|
8
|
+
"text/plain": url,
|
|
9
|
+
}),
|
|
10
|
+
]);
|
|
11
|
+
};
|