@agregio-solutions/design-system 1.45.2 → 1.46.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.
@@ -45,6 +45,11 @@ interface Props {
45
45
  * @default false
46
46
  */
47
47
  noPadding?: boolean;
48
+ /**
49
+ * Whether the accordion should have a bottom close button.
50
+ * @default false
51
+ */
52
+ withBottomCloseButton?: boolean;
48
53
  /**
49
54
  * Additional class name to apply to the accordion.
50
55
  */
@@ -54,5 +59,5 @@ interface Props {
54
59
  */
55
60
  style?: React.CSSProperties;
56
61
  }
57
- export default function Accordion({ children, title, description, unmountOnExit, defaultExpanded, isExpanded, onExpandedChange, isDisabled, className, style, nature, noPadding, }: Props): import("react/jsx-runtime").JSX.Element;
62
+ export default function Accordion({ children, title, description, unmountOnExit, defaultExpanded, isExpanded, onExpandedChange, isDisabled, className, style, nature, noPadding, withBottomCloseButton, }: Props): import("react/jsx-runtime").JSX.Element;
58
63
  export {};
@@ -0,0 +1,69 @@
1
+ import { default as React } from 'react';
2
+ import { ButtonProps } from 'react-aria-components';
3
+ interface Props {
4
+ /**
5
+ * The `Button` or `TooltipTrigger` to display (that will open the tooltip on hover).
6
+ */
7
+ children: React.ReactNode;
8
+ /**
9
+ * The label to display in the tooltip
10
+ */
11
+ label: string;
12
+ /**
13
+ * Tooltips appear after a short delay when hovering the trigger, or instantly when using keyboard focus.
14
+ * This delay is called the "warmup period", and it is a global timer, shared by all tooltips.
15
+ * Once a tooltip is displayed, other tooltips display immediately.
16
+ * If the user waits for the "cooldown period" before hovering another element, the warmup timer restarts.
17
+ * The value is in seconds.
18
+ * @default 200
19
+ */
20
+ delay?: number;
21
+ /**
22
+ * The delay time for the tooltip to close
23
+ * @default 500
24
+ */
25
+ closeDelay?: number;
26
+ /**
27
+ * By default, tooltips appear both on hover and on focus.
28
+ * The trigger prop can be set to "focus" to display the tooltip only on focus, and not on hover.
29
+ * @default undefined
30
+ */
31
+ trigger?: "focus";
32
+ /**
33
+ * Whether the tooltip is open by default (uncontrolled mode).
34
+ */
35
+ defaultOpen?: boolean;
36
+ /**
37
+ * Whether the tooltip is open (controlled mode).
38
+ */
39
+ isOpen?: boolean;
40
+ /**
41
+ * Callback function that is called when the tooltip is opened or closed (controlled mode).
42
+ */
43
+ onOpenChange?: (isOpen: boolean) => void;
44
+ /**
45
+ * The placement of the tooltip with respect to the trigger.
46
+ * @default "top"
47
+ */
48
+ placement?: "bottom" | "bottom left" | "bottom right" | "bottom start" | "bottom end" | "top" | "top left" | "top right" | "top start" | "top end" | "left" | "left top" | "left bottom" | "start" | "start top" | "start bottom" | "right" | "right top" | "right bottom" | "end" | "end top" | "end bottom";
49
+ /**
50
+ * Whether the tooltip should be disabled, independent from the trigger.
51
+ * @default false
52
+ */
53
+ isDisabled?: boolean;
54
+ }
55
+ export default function Tooltip({ children, label, delay, closeDelay, trigger, defaultOpen, isOpen, onOpenChange, placement, isDisabled, }: Props): import("react/jsx-runtime").JSX.Element;
56
+ type TooltipTriggerProps = {
57
+ /**
58
+ * The content to place in the tooltip trigger.
59
+ * Must NOT be a Button or other interactive component.
60
+ * The TooltipTrigger will wrap your component in an unstyled Button that serves as a trigger for the tooltip to show.
61
+ */
62
+ children: React.ReactNode;
63
+ /**
64
+ * Props to pass to the trigger button.
65
+ */
66
+ triggerButtonProps?: ButtonProps;
67
+ };
68
+ export declare function TooltipTrigger({ children, triggerButtonProps, }: TooltipTriggerProps): import("react/jsx-runtime").JSX.Element;
69
+ export {};
@@ -46,11 +46,12 @@ import { default as Tag } from './components/Tag';
46
46
  import { default as TextInput } from './components/TextInput';
47
47
  import { default as TimeField } from './components/TimeField';
48
48
  import { default as Toaster } from './components/Toaster';
49
+ import { default as Tooltip } from './components/Tooltip/Tooltip';
49
50
  import { default as YearMonthPicker } from './components/YearMonthPicker';
50
51
  import { default as RouterProvider } from './components/RouterProvider';
51
52
  import { default as createMuiTheme } from './mui/mui-theme.ts';
52
53
  import { tokens, fontSize, lineHeight } from './ds-design-tokens/index';
53
54
  import { I18nProvider } from 'react-aria';
54
55
  import { toast } from 'sonner';
55
- export { Accordion, Badge, Breadcrumbs, Button, Checkbox, CheckboxGroup, Chip, Combobox, createMuiTheme, DataTable, DataTableCell, DataTableHeader, DataTableRoot, DataTableRow, DatePicker, DateRangePicker, Drawer, Dropdown, FileUpload, Filter, fontSize, Header, I18nProvider, Icon, Label, lineHeight, Link, Loader, Menu, MenuItem, Message, Modal, ModalContent, ModalActions, ModalForm, Navigation, NavigationItem, PageLayout, Pagination, Radio, RouterProvider, SegmentedControl, SegmentedControlButton, SegmentedControlList, SegmentedControlPanel, Select, SelectItem, Switch, Tab, TabList, TabPanel, Tabs, Tag, TextInput, TimeField, toast, Toaster, tokens, YearMonthPicker, };
56
+ export { Accordion, Badge, Breadcrumbs, Button, Checkbox, CheckboxGroup, Chip, Combobox, createMuiTheme, DataTable, DataTableCell, DataTableHeader, DataTableRoot, DataTableRow, DatePicker, DateRangePicker, Drawer, Dropdown, FileUpload, Filter, fontSize, Header, I18nProvider, Icon, Label, lineHeight, Link, Loader, Menu, MenuItem, Message, Modal, ModalContent, ModalActions, ModalForm, Navigation, NavigationItem, PageLayout, Pagination, Radio, RouterProvider, SegmentedControl, SegmentedControlButton, SegmentedControlList, SegmentedControlPanel, Select, SelectItem, Switch, Tab, TabList, TabPanel, Tabs, Tag, TextInput, TimeField, toast, Toaster, Tooltip, tokens, YearMonthPicker, };
56
57
  export type { TypeTableColumnWithFilter };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agregio-solutions/design-system",
3
- "version": "1.45.2",
3
+ "version": "1.46.0",
4
4
  "description": "React Component library and Storybook that is part of the Design System for Agregio Solutions",
5
5
  "type": "module",
6
6
  "module": "dist/design-system.js",
@@ -26,7 +26,7 @@
26
26
  "prettier:write": "prettier . --write --ignore-path .gitignore",
27
27
  "storybook:start": "http-server storybook-static -p 6006 --silent",
28
28
  "storybook": "storybook dev -p 6006",
29
- "storybook:test": "test-storybook --url http://localhost:6006",
29
+ "storybook:test": "test-storybook --url http://localhost:6006 --browsers chromium",
30
30
  "storybook:test:integrity": "npm run build-storybook && npx start-server-and-test storybook:start http://localhost:6006 storybook:test",
31
31
  "storybook:test:only-changed": "start-server-and-test storybook 6006 'npm run storybook:test -- -- -o'",
32
32
  "typescript:check": "tsc --noEmit",