@fibery/ui-kit 1.29.2 → 1.29.4

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 (56) hide show
  1. package/package.json +3 -3
  2. package/src/actions-menu/actions-menu-item.tsx +3 -1
  3. package/src/actions-menu/actions-menu-sub-command-menu.tsx +14 -6
  4. package/src/button/button-base.tsx +1 -1
  5. package/src/button/button.tsx +1 -1
  6. package/src/design-system.ts +71 -16
  7. package/src/emoji-picker/primitives/footer.tsx +1 -1
  8. package/src/icons/ast/Abort.ts +8 -0
  9. package/src/icons/ast/AiAvatar.ts +1 -1
  10. package/src/icons/ast/Database.ts +1 -1
  11. package/src/icons/ast/DatabaseStroke.ts +8 -0
  12. package/src/icons/ast/ExtensionComments.ts +1 -1
  13. package/src/icons/ast/FieldUnit.ts +1 -1
  14. package/src/icons/ast/InfoCircle.ts +8 -0
  15. package/src/icons/ast/Key.ts +8 -0
  16. package/src/icons/ast/MoveBottom.ts +1 -1
  17. package/src/icons/ast/MoveLeft.ts +1 -1
  18. package/src/icons/ast/MoveRight.ts +1 -1
  19. package/src/icons/ast/MoveTop.ts +1 -1
  20. package/src/icons/ast/Pin.ts +1 -1
  21. package/src/icons/ast/RicheditorCommentCreate.ts +1 -1
  22. package/src/icons/ast/SendArrow.ts +8 -0
  23. package/src/icons/ast/UnitsAvatar.ts +8 -0
  24. package/src/icons/ast/UnitsCollection.ts +8 -0
  25. package/src/icons/ast/UnitsCounter.ts +8 -0
  26. package/src/icons/ast/UnitsDbBadgeAbbr.ts +8 -0
  27. package/src/icons/ast/UnitsDbBadgeFull.ts +8 -0
  28. package/src/icons/ast/UnitsDbIcon.ts +8 -0
  29. package/src/icons/ast/UnitsField.ts +8 -0
  30. package/src/icons/ast/UnitsInput.ts +8 -0
  31. package/src/icons/ast/UnitsProgressBar.ts +8 -0
  32. package/src/icons/ast/UnitsRichText.ts +8 -0
  33. package/src/icons/ast/UnitsSnippet.ts +8 -0
  34. package/src/icons/ast/index.tsx +16 -0
  35. package/src/icons/react/Abort.tsx +12 -0
  36. package/src/icons/react/DatabaseStroke.tsx +12 -0
  37. package/src/icons/react/InfoCircle.tsx +12 -0
  38. package/src/icons/react/Key.tsx +12 -0
  39. package/src/icons/react/SendArrow.tsx +12 -0
  40. package/src/icons/react/UnitsAvatar.tsx +12 -0
  41. package/src/icons/react/UnitsCollection.tsx +12 -0
  42. package/src/icons/react/UnitsCounter.tsx +12 -0
  43. package/src/icons/react/UnitsDbBadgeAbbr.tsx +12 -0
  44. package/src/icons/react/UnitsDbBadgeFull.tsx +12 -0
  45. package/src/icons/react/UnitsDbIcon.tsx +12 -0
  46. package/src/icons/react/UnitsField.tsx +12 -0
  47. package/src/icons/react/UnitsInput.tsx +12 -0
  48. package/src/icons/react/UnitsProgressBar.tsx +12 -0
  49. package/src/icons/react/UnitsRichText.tsx +12 -0
  50. package/src/icons/react/UnitsSnippet.tsx +12 -0
  51. package/src/icons/react/index.tsx +16 -0
  52. package/src/select/custom-select-partials/menu.tsx +1 -1
  53. package/src/select/select-in-popover.tsx +56 -10
  54. package/src/theme-settings.ts +10 -8
  55. package/src/toggle.tsx +3 -1
  56. package/src/tooltip.tsx +4 -2
@@ -0,0 +1,8 @@
1
+
2
+ // This icon file is generated automatically.
3
+
4
+ import { IconDefinition } from '../types';
5
+
6
+ const UnitsProgressBar: IconDefinition = {"icon":{"type":"root","children":[{"type":"element","tagName":"svg","properties":{"width":20,"height":20,"fill":"none"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","clipRule":"evenodd","d":"M5 13h10c2 0 3-1 3-3s-1.233-3-3-3H5c-2 0-3 1-3 3s1 3 3 3Zm5-4.5v3h5c.84 0 1.5-.5 1.5-1.5S16 8.5 15 8.5h-5Z","fill":"currentColor"},"children":[]}],"metadata":""}]},"name":"units-progress-bar"};
7
+
8
+ export default UnitsProgressBar;
@@ -0,0 +1,8 @@
1
+
2
+ // This icon file is generated automatically.
3
+
4
+ import { IconDefinition } from '../types';
5
+
6
+ const UnitsRichText: IconDefinition = {"icon":{"type":"root","children":[{"type":"element","tagName":"svg","properties":{"width":20,"height":20},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","clipRule":"evenodd","d":"M13.25 3.75A.75.75 0 0 1 14 3h1.25A2.75 2.75 0 0 1 18 5.75v8.5A2.75 2.75 0 0 1 15.25 17H4.75A2.75 2.75 0 0 1 2 14.25V11a.75.75 0 0 1 1.5 0v3.25c0 .69.56 1.25 1.25 1.25h10.5c.69 0 1.25-.56 1.25-1.25v-8.5c0-.69-.56-1.25-1.25-1.25H14a.75.75 0 0 1-.75-.75Zm-4.65.564H3.8a.8.8 0 1 0 0 1.6h1.6v4a.8.8 0 1 0 1.6 0v-4h1.6a.8.8 0 0 0 0-1.6Zm2.1 3.257h3.6a.664.664 0 0 0 .495-.23.837.837 0 0 0 .205-.555.837.837 0 0 0-.205-.556A.664.664 0 0 0 14.3 6h-3.6a.664.664 0 0 0-.495.23.837.837 0 0 0-.205.556c0 .208.074.408.205.555.131.148.31.23.495.23Zm3.6 4.715c.186 0 .364.082.495.23a.837.837 0 0 1 .205.555.837.837 0 0 1-.205.556.664.664 0 0 1-.495.23H5.7a.664.664 0 0 1-.495-.23.837.837 0 0 1-.205-.556c0-.208.074-.408.205-.555a.663.663 0 0 1 .495-.23h8.6Zm0-3.143h-3.6a.664.664 0 0 0-.495.23.837.837 0 0 0-.205.556c0 .208.074.408.205.555.131.148.31.23.495.23h3.6a.664.664 0 0 0 .495-.23A.837.837 0 0 0 15 9.93a.837.837 0 0 0-.205-.556.664.664 0 0 0-.495-.23Z"},"children":[]}],"metadata":""}]},"name":"units-rich-text"};
7
+
8
+ export default UnitsRichText;
@@ -0,0 +1,8 @@
1
+
2
+ // This icon file is generated automatically.
3
+
4
+ import { IconDefinition } from '../types';
5
+
6
+ const UnitsSnippet: IconDefinition = {"icon":{"type":"root","children":[{"type":"element","tagName":"svg","properties":{"width":20,"height":20,"fill":"none"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","clipRule":"evenodd","d":"M4.25 15A2.25 2.25 0 0 1 2 12.75v-5.5A2.25 2.25 0 0 1 4.25 5h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 0-.75.75v5.5c0 .414.336.75.75.75h.5a.75.75 0 0 1 0 1.5h-.5ZM18 12.75A2.25 2.25 0 0 1 15.75 15h-.5a.75.75 0 0 1 0-1.5h.5a.75.75 0 0 0 .75-.75v-5.5a.75.75 0 0 0-.75-.75h-.5a.75.75 0 0 1 0-1.5h.5A2.25 2.25 0 0 1 18 7.25v5.5Zm-12-1.5a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75Zm0-3a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 6 8.25Z","fill":"currentColor"},"children":[]}],"metadata":""}]},"name":"units-snippet"};
7
+
8
+ export default UnitsSnippet;
@@ -1,4 +1,5 @@
1
1
  // This icon file is generated automatically.
2
+ export { default as Abort } from './Abort';
2
3
  export { default as ActivityLog } from './ActivityLog';
3
4
  export { default as Activity } from './Activity';
4
5
  export { default as AddAfter } from './AddAfter';
@@ -60,6 +61,7 @@ export { default as Columns2 } from './Columns2';
60
61
  export { default as Columns4 } from './Columns4';
61
62
  export { default as Columns } from './Columns';
62
63
  export { default as Copy } from './Copy';
64
+ export { default as DatabaseStroke } from './DatabaseStroke';
63
65
  export { default as Database } from './Database';
64
66
  export { default as Delete } from './Delete';
65
67
  export { default as Demo } from './Demo';
@@ -107,6 +109,7 @@ export { default as Home } from './Home';
107
109
  export { default as ImageXmark } from './ImageXmark';
108
110
  export { default as Import } from './Import';
109
111
  export { default as InfoCircleFilled } from './InfoCircleFilled';
112
+ export { default as InfoCircle } from './InfoCircle';
110
113
  export { default as Integration } from './Integration';
111
114
  export { default as IntegrationsIntegrationDiscourseColor } from './IntegrationsIntegrationDiscourseColor';
112
115
  export { default as IntegrationsIntegrationIntercomColor } from './IntegrationsIntegrationIntercomColor';
@@ -115,6 +118,7 @@ export { default as IntegrationsIntegrationZendeskColor } from './IntegrationsIn
115
118
  export { default as InvitePeople } from './InvitePeople';
116
119
  export { default as Items } from './Items';
117
120
  export { default as Jira } from './Jira';
121
+ export { default as Key } from './Key';
118
122
  export { default as Lab } from './Lab';
119
123
  export { default as LayoutDouble } from './LayoutDouble';
120
124
  export { default as LayoutSingle } from './LayoutSingle';
@@ -211,6 +215,7 @@ export { default as Rows } from './Rows';
211
215
  export { default as Search } from './Search';
212
216
  export { default as SelfReferenceOff } from './SelfReferenceOff';
213
217
  export { default as SelfReferenceOn } from './SelfReferenceOn';
218
+ export { default as SendArrow } from './SendArrow';
214
219
  export { default as Settings } from './Settings';
215
220
  export { default as Share } from './Share';
216
221
  export { default as Shared } from './Shared';
@@ -253,6 +258,17 @@ export { default as TypeRule } from './TypeRule';
253
258
  export { default as TypeSingleSelect } from './TypeSingleSelect';
254
259
  export { default as TypeText } from './TypeText';
255
260
  export { default as TypeUrl } from './TypeUrl';
261
+ export { default as UnitsAvatar } from './UnitsAvatar';
262
+ export { default as UnitsCollection } from './UnitsCollection';
263
+ export { default as UnitsCounter } from './UnitsCounter';
264
+ export { default as UnitsDbBadgeAbbr } from './UnitsDbBadgeAbbr';
265
+ export { default as UnitsDbBadgeFull } from './UnitsDbBadgeFull';
266
+ export { default as UnitsDbIcon } from './UnitsDbIcon';
267
+ export { default as UnitsField } from './UnitsField';
268
+ export { default as UnitsInput } from './UnitsInput';
269
+ export { default as UnitsProgressBar } from './UnitsProgressBar';
270
+ export { default as UnitsRichText } from './UnitsRichText';
271
+ export { default as UnitsSnippet } from './UnitsSnippet';
256
272
  export { default as Upgrade } from './Upgrade';
257
273
  export { default as UsbFlashDrive } from './UsbFlashDrive';
258
274
  export { default as UserRole } from './UserRole';
@@ -0,0 +1,12 @@
1
+ // This icon file is generated automatically.
2
+
3
+ import AbortSvg from '../ast/Abort';
4
+ import { Icon } from '../Icon';
5
+ import { IconBaseProps } from '../types';
6
+
7
+ const Abort = (
8
+ props: IconBaseProps,
9
+ ): JSX.Element => <Icon {...props} icon={AbortSvg} />;
10
+
11
+ Abort.displayName = 'Abort';
12
+ export default Abort;
@@ -0,0 +1,12 @@
1
+ // This icon file is generated automatically.
2
+
3
+ import DatabaseStrokeSvg from '../ast/DatabaseStroke';
4
+ import { Icon } from '../Icon';
5
+ import { IconBaseProps } from '../types';
6
+
7
+ const DatabaseStroke = (
8
+ props: IconBaseProps,
9
+ ): JSX.Element => <Icon {...props} icon={DatabaseStrokeSvg} />;
10
+
11
+ DatabaseStroke.displayName = 'DatabaseStroke';
12
+ export default DatabaseStroke;
@@ -0,0 +1,12 @@
1
+ // This icon file is generated automatically.
2
+
3
+ import InfoCircleSvg from '../ast/InfoCircle';
4
+ import { Icon } from '../Icon';
5
+ import { IconBaseProps } from '../types';
6
+
7
+ const InfoCircle = (
8
+ props: IconBaseProps,
9
+ ): JSX.Element => <Icon {...props} icon={InfoCircleSvg} />;
10
+
11
+ InfoCircle.displayName = 'InfoCircle';
12
+ export default InfoCircle;
@@ -0,0 +1,12 @@
1
+ // This icon file is generated automatically.
2
+
3
+ import KeySvg from '../ast/Key';
4
+ import { Icon } from '../Icon';
5
+ import { IconBaseProps } from '../types';
6
+
7
+ const Key = (
8
+ props: IconBaseProps,
9
+ ): JSX.Element => <Icon {...props} icon={KeySvg} />;
10
+
11
+ Key.displayName = 'Key';
12
+ export default Key;
@@ -0,0 +1,12 @@
1
+ // This icon file is generated automatically.
2
+
3
+ import SendArrowSvg from '../ast/SendArrow';
4
+ import { Icon } from '../Icon';
5
+ import { IconBaseProps } from '../types';
6
+
7
+ const SendArrow = (
8
+ props: IconBaseProps,
9
+ ): JSX.Element => <Icon {...props} icon={SendArrowSvg} />;
10
+
11
+ SendArrow.displayName = 'SendArrow';
12
+ export default SendArrow;
@@ -0,0 +1,12 @@
1
+ // This icon file is generated automatically.
2
+
3
+ import UnitsAvatarSvg from '../ast/UnitsAvatar';
4
+ import { Icon } from '../Icon';
5
+ import { IconBaseProps } from '../types';
6
+
7
+ const UnitsAvatar = (
8
+ props: IconBaseProps,
9
+ ): JSX.Element => <Icon {...props} icon={UnitsAvatarSvg} />;
10
+
11
+ UnitsAvatar.displayName = 'UnitsAvatar';
12
+ export default UnitsAvatar;
@@ -0,0 +1,12 @@
1
+ // This icon file is generated automatically.
2
+
3
+ import UnitsCollectionSvg from '../ast/UnitsCollection';
4
+ import { Icon } from '../Icon';
5
+ import { IconBaseProps } from '../types';
6
+
7
+ const UnitsCollection = (
8
+ props: IconBaseProps,
9
+ ): JSX.Element => <Icon {...props} icon={UnitsCollectionSvg} />;
10
+
11
+ UnitsCollection.displayName = 'UnitsCollection';
12
+ export default UnitsCollection;
@@ -0,0 +1,12 @@
1
+ // This icon file is generated automatically.
2
+
3
+ import UnitsCounterSvg from '../ast/UnitsCounter';
4
+ import { Icon } from '../Icon';
5
+ import { IconBaseProps } from '../types';
6
+
7
+ const UnitsCounter = (
8
+ props: IconBaseProps,
9
+ ): JSX.Element => <Icon {...props} icon={UnitsCounterSvg} />;
10
+
11
+ UnitsCounter.displayName = 'UnitsCounter';
12
+ export default UnitsCounter;
@@ -0,0 +1,12 @@
1
+ // This icon file is generated automatically.
2
+
3
+ import UnitsDbBadgeAbbrSvg from '../ast/UnitsDbBadgeAbbr';
4
+ import { Icon } from '../Icon';
5
+ import { IconBaseProps } from '../types';
6
+
7
+ const UnitsDbBadgeAbbr = (
8
+ props: IconBaseProps,
9
+ ): JSX.Element => <Icon {...props} icon={UnitsDbBadgeAbbrSvg} />;
10
+
11
+ UnitsDbBadgeAbbr.displayName = 'UnitsDbBadgeAbbr';
12
+ export default UnitsDbBadgeAbbr;
@@ -0,0 +1,12 @@
1
+ // This icon file is generated automatically.
2
+
3
+ import UnitsDbBadgeFullSvg from '../ast/UnitsDbBadgeFull';
4
+ import { Icon } from '../Icon';
5
+ import { IconBaseProps } from '../types';
6
+
7
+ const UnitsDbBadgeFull = (
8
+ props: IconBaseProps,
9
+ ): JSX.Element => <Icon {...props} icon={UnitsDbBadgeFullSvg} />;
10
+
11
+ UnitsDbBadgeFull.displayName = 'UnitsDbBadgeFull';
12
+ export default UnitsDbBadgeFull;
@@ -0,0 +1,12 @@
1
+ // This icon file is generated automatically.
2
+
3
+ import UnitsDbIconSvg from '../ast/UnitsDbIcon';
4
+ import { Icon } from '../Icon';
5
+ import { IconBaseProps } from '../types';
6
+
7
+ const UnitsDbIcon = (
8
+ props: IconBaseProps,
9
+ ): JSX.Element => <Icon {...props} icon={UnitsDbIconSvg} />;
10
+
11
+ UnitsDbIcon.displayName = 'UnitsDbIcon';
12
+ export default UnitsDbIcon;
@@ -0,0 +1,12 @@
1
+ // This icon file is generated automatically.
2
+
3
+ import UnitsFieldSvg from '../ast/UnitsField';
4
+ import { Icon } from '../Icon';
5
+ import { IconBaseProps } from '../types';
6
+
7
+ const UnitsField = (
8
+ props: IconBaseProps,
9
+ ): JSX.Element => <Icon {...props} icon={UnitsFieldSvg} />;
10
+
11
+ UnitsField.displayName = 'UnitsField';
12
+ export default UnitsField;
@@ -0,0 +1,12 @@
1
+ // This icon file is generated automatically.
2
+
3
+ import UnitsInputSvg from '../ast/UnitsInput';
4
+ import { Icon } from '../Icon';
5
+ import { IconBaseProps } from '../types';
6
+
7
+ const UnitsInput = (
8
+ props: IconBaseProps,
9
+ ): JSX.Element => <Icon {...props} icon={UnitsInputSvg} />;
10
+
11
+ UnitsInput.displayName = 'UnitsInput';
12
+ export default UnitsInput;
@@ -0,0 +1,12 @@
1
+ // This icon file is generated automatically.
2
+
3
+ import UnitsProgressBarSvg from '../ast/UnitsProgressBar';
4
+ import { Icon } from '../Icon';
5
+ import { IconBaseProps } from '../types';
6
+
7
+ const UnitsProgressBar = (
8
+ props: IconBaseProps,
9
+ ): JSX.Element => <Icon {...props} icon={UnitsProgressBarSvg} />;
10
+
11
+ UnitsProgressBar.displayName = 'UnitsProgressBar';
12
+ export default UnitsProgressBar;
@@ -0,0 +1,12 @@
1
+ // This icon file is generated automatically.
2
+
3
+ import UnitsRichTextSvg from '../ast/UnitsRichText';
4
+ import { Icon } from '../Icon';
5
+ import { IconBaseProps } from '../types';
6
+
7
+ const UnitsRichText = (
8
+ props: IconBaseProps,
9
+ ): JSX.Element => <Icon {...props} icon={UnitsRichTextSvg} />;
10
+
11
+ UnitsRichText.displayName = 'UnitsRichText';
12
+ export default UnitsRichText;
@@ -0,0 +1,12 @@
1
+ // This icon file is generated automatically.
2
+
3
+ import UnitsSnippetSvg from '../ast/UnitsSnippet';
4
+ import { Icon } from '../Icon';
5
+ import { IconBaseProps } from '../types';
6
+
7
+ const UnitsSnippet = (
8
+ props: IconBaseProps,
9
+ ): JSX.Element => <Icon {...props} icon={UnitsSnippetSvg} />;
10
+
11
+ UnitsSnippet.displayName = 'UnitsSnippet';
12
+ export default UnitsSnippet;
@@ -1,4 +1,5 @@
1
1
  // This icon file is generated automatically.
2
+ export { default as Abort } from './Abort';
2
3
  export { default as ActivityLog } from './ActivityLog';
3
4
  export { default as Activity } from './Activity';
4
5
  export { default as AddAfter } from './AddAfter';
@@ -60,6 +61,7 @@ export { default as Columns2 } from './Columns2';
60
61
  export { default as Columns4 } from './Columns4';
61
62
  export { default as Columns } from './Columns';
62
63
  export { default as Copy } from './Copy';
64
+ export { default as DatabaseStroke } from './DatabaseStroke';
63
65
  export { default as Database } from './Database';
64
66
  export { default as Delete } from './Delete';
65
67
  export { default as Demo } from './Demo';
@@ -107,6 +109,7 @@ export { default as Home } from './Home';
107
109
  export { default as ImageXmark } from './ImageXmark';
108
110
  export { default as Import } from './Import';
109
111
  export { default as InfoCircleFilled } from './InfoCircleFilled';
112
+ export { default as InfoCircle } from './InfoCircle';
110
113
  export { default as Integration } from './Integration';
111
114
  export { default as IntegrationsIntegrationDiscourseColor } from './IntegrationsIntegrationDiscourseColor';
112
115
  export { default as IntegrationsIntegrationIntercomColor } from './IntegrationsIntegrationIntercomColor';
@@ -115,6 +118,7 @@ export { default as IntegrationsIntegrationZendeskColor } from './IntegrationsIn
115
118
  export { default as InvitePeople } from './InvitePeople';
116
119
  export { default as Items } from './Items';
117
120
  export { default as Jira } from './Jira';
121
+ export { default as Key } from './Key';
118
122
  export { default as Lab } from './Lab';
119
123
  export { default as LayoutDouble } from './LayoutDouble';
120
124
  export { default as LayoutSingle } from './LayoutSingle';
@@ -211,6 +215,7 @@ export { default as Rows } from './Rows';
211
215
  export { default as Search } from './Search';
212
216
  export { default as SelfReferenceOff } from './SelfReferenceOff';
213
217
  export { default as SelfReferenceOn } from './SelfReferenceOn';
218
+ export { default as SendArrow } from './SendArrow';
214
219
  export { default as Settings } from './Settings';
215
220
  export { default as Share } from './Share';
216
221
  export { default as Shared } from './Shared';
@@ -253,6 +258,17 @@ export { default as TypeRule } from './TypeRule';
253
258
  export { default as TypeSingleSelect } from './TypeSingleSelect';
254
259
  export { default as TypeText } from './TypeText';
255
260
  export { default as TypeUrl } from './TypeUrl';
261
+ export { default as UnitsAvatar } from './UnitsAvatar';
262
+ export { default as UnitsCollection } from './UnitsCollection';
263
+ export { default as UnitsCounter } from './UnitsCounter';
264
+ export { default as UnitsDbBadgeAbbr } from './UnitsDbBadgeAbbr';
265
+ export { default as UnitsDbBadgeFull } from './UnitsDbBadgeFull';
266
+ export { default as UnitsDbIcon } from './UnitsDbIcon';
267
+ export { default as UnitsField } from './UnitsField';
268
+ export { default as UnitsInput } from './UnitsInput';
269
+ export { default as UnitsProgressBar } from './UnitsProgressBar';
270
+ export { default as UnitsRichText } from './UnitsRichText';
271
+ export { default as UnitsSnippet } from './UnitsSnippet';
256
272
  export { default as Upgrade } from './Upgrade';
257
273
  export { default as UsbFlashDrive } from './UsbFlashDrive';
258
274
  export { default as UserRole } from './UserRole';
@@ -28,5 +28,5 @@ const MenuRootClass = css`
28
28
  export function Menu<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(
29
29
  props: MenuProps<Option, IsMulti, Group>
30
30
  ) {
31
- return <components.Menu {...props} className={cn(props.className, MenuRootClass, "react-select-menu")} />;
31
+ return <components.Menu {...props} className={cn(MenuRootClass, "react-select-menu", props.className)} />;
32
32
  }
@@ -2,6 +2,7 @@ import {css, cx} from "@linaria/core";
2
2
  import {border, space, textStyles} from "../design-system";
3
3
  import {inputOverrides} from "../antd/styles";
4
4
  import React, {
5
+ ComponentProps,
5
6
  ComponentType,
6
7
  forwardRef,
7
8
  ReactNode,
@@ -26,16 +27,32 @@ import {
26
27
  StylesConfig,
27
28
  } from "./index";
28
29
  import {SelectControlSettingsProvider} from "./select-control-settings-context";
30
+ import {Menu} from "./custom-select-partials/menu";
29
31
 
30
32
  const offset = [0, space.s4] as [number, number];
33
+ const popupHeightVH = 45;
34
+ const popupMinHeightPx = 300;
35
+ const popupPaddingTop = space.s8;
36
+ const popupPaddingBottom = space.s8;
31
37
  const popupContainerClassName = css`
32
38
  z-index: 1050;
39
+ height: max(${popupHeightVH}vh, ${popupMinHeightPx}px);
40
+ display: flex;
41
+ flex-direction: row;
42
+
43
+ &:is([data-popper-placement="bottom-start"], [data-popper-placement="bottom-end"]) {
44
+ align-items: flex-start;
45
+ }
46
+
47
+ &:is([data-popper-placement="top-start"], [data-popper-placement="top-end"]) {
48
+ align-items: flex-end;
49
+ }
33
50
  `;
34
51
  const popupClassName = css`
35
52
  min-width: 320px;
36
53
  max-width: 440px;
37
- padding-top: ${space.s8}px;
38
- padding-bottom: ${space.s4}px;
54
+ padding-top: ${popupPaddingTop}px;
55
+ padding-bottom: ${popupPaddingBottom}px;
39
56
  padding-left: ${space.s8}px;
40
57
  padding-right: ${space.s8}px;
41
58
  `;
@@ -67,6 +84,8 @@ const titleClassName = css`
67
84
  padding-bottom: ${space.s12}px;
68
85
  `;
69
86
 
87
+ export const valueMaxHeight = 116;
88
+
70
89
  export const selectInPopupStyles = {
71
90
  container: (props: $TSFixMe) => ({
72
91
  ...props,
@@ -80,6 +99,11 @@ export const selectInPopupStyles = {
80
99
  paddingLeft: 0,
81
100
  paddingRight: 0,
82
101
  }),
102
+ control: (props: $TSFixMe) => ({
103
+ ...props,
104
+ maxHeight: valueMaxHeight,
105
+ overflow: "auto",
106
+ }),
83
107
  menu: (props: $TSFixMe) => ({
84
108
  ...props,
85
109
  minWidth: 100,
@@ -96,6 +120,7 @@ export type TriggerProps = {
96
120
  children: ReactNode;
97
121
  onClick: React.MouseEventHandler;
98
122
  onKeyDown: React.KeyboardEventHandler;
123
+ disabled?: boolean;
99
124
  };
100
125
 
101
126
  const Trigger = ({innerRef, children, onClick, onKeyDown}: TriggerProps) => {
@@ -106,11 +131,14 @@ const Trigger = ({innerRef, children, onClick, onKeyDown}: TriggerProps) => {
106
131
  );
107
132
  };
108
133
 
109
- type Components = {Trigger: ComponentType<TriggerProps>};
134
+ type Components = {
135
+ Trigger: ComponentType<TriggerProps>;
136
+ Menu: ComponentType<ComponentProps<typeof Menu>>;
137
+ };
110
138
 
111
139
  export type ComponentsConfig = Partial<Components>;
112
140
 
113
- const defaultComponents = {Trigger};
141
+ const defaultComponents = {Trigger, Menu};
114
142
 
115
143
  type Ref = {
116
144
  valueRef: HTMLDivElement | null;
@@ -146,10 +174,11 @@ type Props<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = {
146
174
  onChange: (newValue: OnChangeValue<Option, IsMulti>, actionMeta: ActionMeta<Option>) => void;
147
175
  onMenuOpen?: () => void;
148
176
  onMenuClose?: () => void | boolean;
177
+ getPopupContainer?: () => HTMLElement;
149
178
  };
150
179
 
151
180
  function SelectInPopoverInner<Option, IsMulti extends boolean, Group extends GroupBase<Option>>(
152
- props: Props<Option, IsMulti, Group>,
181
+ props: Omit<Props<Option, IsMulti, Group>, "maxMenuHeight">,
153
182
  forwardedRef: React.ForwardedRef<Ref>
154
183
  ) {
155
184
  const {
@@ -168,7 +197,6 @@ function SelectInPopoverInner<Option, IsMulti extends boolean, Group extends Gro
168
197
  isClearable = true,
169
198
  renderValue,
170
199
  title,
171
- maxMenuHeight,
172
200
  hideOnChange = true,
173
201
  renderInPortal = true,
174
202
  popupStyles,
@@ -181,12 +209,14 @@ function SelectInPopoverInner<Option, IsMulti extends boolean, Group extends Gro
181
209
  onChange,
182
210
  onMenuOpen,
183
211
  onMenuClose,
212
+ getPopupContainer,
184
213
  } = props;
185
214
  const [triggerElement, setTriggerElement] = useState<HTMLDivElement | null>(null);
186
215
  const [visible, setVisible] = useState(menuIsOpen);
187
216
  const blurTimeoutRef = useRef<ReturnType<typeof setTimeout>>();
188
217
  const selectRef = useRef<{focus: () => void}>(null);
189
218
  const ref = useRef<HTMLDivElement | null>(null);
219
+
190
220
  useImperativeHandle(
191
221
  forwardedRef,
192
222
  () =>
@@ -269,12 +299,23 @@ function SelectInPopoverInner<Option, IsMulti extends boolean, Group extends Gro
269
299
  },
270
300
  [onShow, visible]
271
301
  );
272
-
302
+ const paddingPopup = popupPaddingTop + popupPaddingBottom;
303
+ const paddingMenu = 6 + 6 + 6;
304
+ const maxMenuHeight =
305
+ Math.max((document.body.clientHeight / 100) * popupHeightVH, popupMinHeightPx) -
306
+ valueMaxHeight -
307
+ paddingPopup -
308
+ paddingMenu;
273
309
  const mergedComponents = {...defaultComponents, ...components};
274
310
 
275
311
  return (
276
312
  <>
277
- <mergedComponents.Trigger innerRef={ref} onClick={onTriggerClick} onKeyDown={onTriggerKeyDown}>
313
+ <mergedComponents.Trigger
314
+ innerRef={ref}
315
+ onClick={onTriggerClick}
316
+ onKeyDown={onTriggerKeyDown}
317
+ disabled={disabled}
318
+ >
278
319
  {renderValue ? renderValue() : null}
279
320
  </mergedComponents.Trigger>
280
321
  {Boolean(triggerElement) && (
@@ -289,6 +330,7 @@ function SelectInPopoverInner<Option, IsMulti extends boolean, Group extends Gro
289
330
  onClose={() => onHide()}
290
331
  trigger={<></>}
291
332
  triggerDomElement={triggerElement}
333
+ getPopupContainer={getPopupContainer}
292
334
  >
293
335
  {title && <div className={titleClassName}>{title}</div>}
294
336
  {/*Usually we set popupContainerElement for react-select via context (SelectControlSettingsProvider). But here we render react-select in popover.*/}
@@ -338,7 +380,11 @@ function SelectInPopoverInner<Option, IsMulti extends boolean, Group extends Gro
338
380
  isClearable={!isCollectionMode && isClearable}
339
381
  formatGroupLabel={formatGroupLabel}
340
382
  formatOptionLabel={formatOptionLabel}
341
- components={{DropdownIndicator: null, IndicatorSeparator: null}}
383
+ components={{
384
+ DropdownIndicator: null,
385
+ IndicatorSeparator: null,
386
+ Menu: mergedComponents.Menu as $TSFixMe,
387
+ }}
342
388
  />
343
389
  </SelectControlSettingsProvider>
344
390
  </Popup>
@@ -348,7 +394,7 @@ function SelectInPopoverInner<Option, IsMulti extends boolean, Group extends Gro
348
394
  }
349
395
 
350
396
  type SelectInPopoverType = <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(
351
- props: Props<Option, IsMulti, Group> & {ref?: React.ForwardedRef<Ref>}
397
+ props: Omit<Props<Option, IsMulti, Group>, "maxMenuHeight"> & {ref?: React.ForwardedRef<Ref>}
352
398
  ) => ReturnType<typeof SelectInPopoverInner>;
353
399
 
354
400
  // Explicit type assertion to specify that component accepts generic props because forwardRef breaks it
@@ -13,17 +13,19 @@ export type ThemeMenuPreference = "dark" | "auto";
13
13
  export type ThemeMode = "dark" | "light" | "light2";
14
14
 
15
15
  export function getThemePreference(): ThemePreference {
16
+ const allowedValues = ["dark", "light", "auto"];
16
17
  try {
17
- const item = localStorage.getItem(themePreferenceKey);
18
- if (item === "auto") {
19
- return "auto";
20
- } else if (item === "dark") {
21
- return "dark";
22
- } else if (item === "light") {
23
- return "light";
18
+ const urlParams = new URLSearchParams(window.location.search);
19
+ const itemInUrl = urlParams.get("force-theme");
20
+ if (itemInUrl && allowedValues.includes(itemInUrl)) {
21
+ return itemInUrl as ThemePreference;
22
+ }
23
+ const itemInStorage = localStorage.getItem(themePreferenceKey);
24
+ if (itemInStorage && allowedValues.includes(itemInStorage)) {
25
+ return itemInStorage as ThemePreference;
24
26
  }
25
27
  } catch (e) {
26
- return "light";
28
+ // Just return the default below
27
29
  }
28
30
  return "light";
29
31
  }
package/src/toggle.tsx CHANGED
@@ -81,6 +81,7 @@ interface ToggleProps extends Omit<ComponentProps<"input">, "value"> {
81
81
  value?: boolean;
82
82
  label?: ReactNode;
83
83
  labelTitle?: string;
84
+ labelMutedWhenDisabled?: boolean;
84
85
  backgroundColor: string;
85
86
  labelPosition?: "first" | "last";
86
87
  wrapperClassName?: string;
@@ -95,6 +96,7 @@ export const Toggle: FC<ToggleProps> = ({
95
96
  size = 16,
96
97
  onChange,
97
98
  labelPosition = "last",
99
+ labelMutedWhenDisabled = true,
98
100
  className,
99
101
  wrapperClassName,
100
102
  ...rest
@@ -149,7 +151,7 @@ export const Toggle: FC<ToggleProps> = ({
149
151
  </CircleContainer>
150
152
 
151
153
  {label && (
152
- <Label disabled={disabled} labelPosition={labelPosition}>
154
+ <Label disabled={disabled && labelMutedWhenDisabled} labelPosition={labelPosition}>
153
155
  {label}
154
156
  </Label>
155
157
  )}
package/src/tooltip.tsx CHANGED
@@ -20,7 +20,7 @@ const descriptionStyle = css`
20
20
  font-weight: ${fontWeight.regular};
21
21
  `;
22
22
 
23
- const tooltipStyle = css`
23
+ export const tooltipStyle = css`
24
24
  font-size: 13px;
25
25
  color: ${themeVars.whiteColor};
26
26
  z-index: 100000;
@@ -96,6 +96,7 @@ export const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps> =
96
96
  export type TooltipProps = Omit<TooltipPrimitive.TooltipTriggerProps, "title"> & {
97
97
  title?: ReactNode;
98
98
  description?: ReactNode;
99
+ tooltipContentStyle?: string;
99
100
  setContentElement?: (el: HTMLDivElement | null) => void;
100
101
  content?: ReactNode;
101
102
  container?: HTMLElement | null | undefined;
@@ -146,6 +147,7 @@ export const Tooltip = forwardRef<HTMLButtonElement, TooltipProps>(
146
147
  disabled,
147
148
  setContentElement,
148
149
  container,
150
+ tooltipContentStyle,
149
151
  ...triggerProps
150
152
  },
151
153
  ref
@@ -179,7 +181,7 @@ export const Tooltip = forwardRef<HTMLButtonElement, TooltipProps>(
179
181
  sideOffset={sideOffset}
180
182
  align={align}
181
183
  alignOffset={alignOffset}
182
- className={cx(tooltipStyle, whiteBg && whiteBgStyle)}
184
+ className={cx(tooltipStyle, whiteBg && whiteBgStyle, tooltipContentStyle)}
183
185
  >
184
186
  {content}
185
187
  </TooltipPrimitive.Content>