@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.
Files changed (37) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/package.json +3 -4
  3. package/src/button/select-button.tsx +11 -3
  4. package/src/collapsible/index.tsx +2 -2
  5. package/src/command-menu/index.tsx +4 -2
  6. package/src/copy-to-clipboard.ts +10 -0
  7. package/src/file-item-2.tsx +257 -150
  8. package/src/file-item.tsx +35 -18
  9. package/src/guide-link.tsx +1 -1
  10. package/src/html-styles.ts +2 -12
  11. package/src/icons/ast/FileImage.ts +1 -1
  12. package/src/icons/ast/Mermaid.ts +8 -0
  13. package/src/icons/ast/TextNoWrap.ts +8 -0
  14. package/src/icons/ast/TextWrap.ts +8 -0
  15. package/src/icons/ast/TypeId.ts +8 -0
  16. package/src/icons/ast/index.tsx +4 -0
  17. package/src/icons/react/Mermaid.tsx +13 -0
  18. package/src/icons/react/TextNoWrap.tsx +13 -0
  19. package/src/icons/react/TextWrap.tsx +13 -0
  20. package/src/icons/react/TypeId.tsx +13 -0
  21. package/src/icons/react/index.tsx +4 -0
  22. package/src/icons/svg/file-image.svg +2 -2
  23. package/src/icons/svg/mermaid.svg +3 -0
  24. package/src/icons/svg/text-no-wrap.svg +3 -0
  25. package/src/icons/svg/text-wrap.svg +3 -0
  26. package/src/icons/svg/type/id.svg +3 -0
  27. package/src/images-gallery/images-gallery-fall-through-provider.tsx +2 -1
  28. package/src/images-gallery/images-gallery.tsx +524 -185
  29. package/src/{images-gallery-2 → images-gallery}/slide-buttons.tsx +25 -13
  30. package/src/images-gallery/zoom.tsx +5 -94
  31. package/src/popover/index.tsx +5 -3
  32. package/src/select/components/menu-list-virtualized.tsx +123 -84
  33. package/src/select/components/menu.tsx +5 -3
  34. package/src/table.tsx +13 -10
  35. package/src/toggle-button/toggle-button.tsx +5 -0
  36. package/src/images-gallery-2/images-gallery-2.tsx +0 -522
  37. package/src/images-gallery-2/zoom.tsx +0 -35
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @fibery/ui-kit
2
2
 
3
+ ## 1.40.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 589e0f6: add new icon TypeId
8
+
9
+ ## 1.39.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 66dca07: add mode attribute for code block node
14
+
3
15
  ## 1.39.0
4
16
 
5
17
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fibery/ui-kit",
3
- "version": "1.39.0",
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
- } & Omit<ButtonProps, "iconEnd">;
37
+ } & ButtonProps;
38
38
 
39
39
  export const SelectButton = forwardRef<HTMLButtonElement, SelectButtonProps>(function SelectButton(
40
- {size = "medium", className, open, variant = "ghost", color = "neutral", ...rest},
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={<ArrowBottom className={iconSize[size]} />}
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 150ms ease-out;
39
+ animation: slideDown 120ms ease-out;
40
40
  }
41
41
  &[data-state="closed"] {
42
- animation: slideUp 150ms ease-out;
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
- height: 100%;
14
- width: 100%;
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;
@@ -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
+ };