@ultraviolet/ui 3.23.0 → 3.24.1
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/dist/_virtual/{_@oxc-project_runtime@0.142.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/asyncToGenerator.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.142.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/defineProperty.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.142.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/extends.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.142.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/objectDestructuringEmpty.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.142.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/objectSpread2.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.142.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/objectWithoutProperties.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.142.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/objectWithoutPropertiesLoose.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.142.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/toPrimitive.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.142.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/toPropertyKey.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.142.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/typeof.js +1 -1
- package/dist/components/ActionBar/index.js +1 -1
- package/dist/components/Alert/index.js +0 -1
- package/dist/components/Alert/styles.css.d.ts +0 -40
- package/dist/components/Alert/styles.css.d.ts.map +1 -1
- package/dist/components/Avatar/index.js +1 -1
- package/dist/components/Badge/index.d.ts +5 -2
- package/dist/components/Badge/index.d.ts.map +1 -1
- package/dist/components/Badge/styles.css.d.ts +0 -45
- package/dist/components/Badge/styles.css.d.ts.map +1 -1
- package/dist/components/Banner/index.d.ts +3 -2
- package/dist/components/Banner/index.d.ts.map +1 -1
- package/dist/components/Banner/styles.css.d.ts +0 -17
- package/dist/components/Banner/styles.css.d.ts.map +1 -1
- package/dist/components/BarChart/index.js +1 -1
- package/dist/components/Breadcrumbs/components/Item.js +1 -1
- package/dist/components/Button/index.d.ts +6 -2
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/styles.css.d.ts +0 -83
- package/dist/components/Button/styles.css.d.ts.map +1 -1
- package/dist/components/Carousel/Item.js +1 -1
- package/dist/components/Chip/index.js +4 -2
- package/dist/components/DateInput/components/CalendarContent.js +14 -10
- package/dist/components/DateInput/components/CalendarDaily.js +37 -35
- package/dist/components/DateInput/components/CalendarMonthly.js +46 -42
- package/dist/components/DateInput/index.js +8 -6
- package/dist/components/DateInput/styles.css.d.ts.map +1 -1
- package/dist/components/Dialog/index.js +1 -1
- package/dist/components/Expandable/AnimatedExpandable.js +1 -1
- package/dist/components/Expandable/NonAnimatedExpandable.js +1 -1
- package/dist/components/FileInput/components/Button.js +2 -2
- package/dist/components/FileInput/helpers.js +1 -1
- package/dist/components/FileInput/index.js +2 -2
- package/dist/components/InfiniteScroll/index.js +1 -1
- package/dist/components/KeyValueInput/index.js +1 -1
- package/dist/components/LineChart/index.js +1 -1
- package/dist/components/List/Cell.js +1 -1
- package/dist/components/List/ListContext.js +3 -3
- package/dist/components/Loader/index.js +1 -1
- package/dist/components/Menu/MenuContent.js +1 -1
- package/dist/components/Menu/index.js +2 -2
- package/dist/components/Modal/components/Dialog.js +1 -1
- package/dist/components/Notification/Notification.js +1 -1
- package/dist/components/NumberInput/components/Controls.d.ts.map +1 -1
- package/dist/components/NumberInput/components/Controls.js +1 -0
- package/dist/components/Pagination/PaginationButtons.d.ts +2 -1
- package/dist/components/Pagination/PaginationButtons.d.ts.map +1 -1
- package/dist/components/Pagination/PaginationButtons.js +19 -15
- package/dist/components/Pagination/getPageItems.d.ts +8 -0
- package/dist/components/Pagination/getPageItems.d.ts.map +1 -0
- package/dist/components/Pagination/getPageItems.js +35 -0
- package/dist/components/Pagination/getPageNumbers.d.ts +2 -1
- package/dist/components/Pagination/getPageNumbers.d.ts.map +1 -1
- package/dist/components/Pagination/getPageNumbers.js +3 -4
- package/dist/components/Pagination/index.d.ts.map +1 -1
- package/dist/components/Pagination/index.js +15 -3
- package/dist/components/Pagination/styles.css.d.ts +1 -0
- package/dist/components/Pagination/styles.css.d.ts.map +1 -1
- package/dist/components/Pagination/styles.css.js +6 -5
- package/dist/components/PieChart/index.js +1 -1
- package/dist/components/Popup/index.js +1 -1
- package/dist/components/Popup/styles.css.d.ts.map +1 -1
- package/dist/components/Popup/styles.css.js +1 -7
- package/dist/components/Row/index.js +1 -1
- package/dist/components/SearchInput/styles.css.d.ts.map +1 -1
- package/dist/components/SelectInput/components/Dropdown/Dropdown.js +1 -1
- package/dist/components/SelectInput/components/Dropdown/Group.js +9 -7
- package/dist/components/SelectInput/components/Dropdown/Item.d.ts.map +1 -1
- package/dist/components/SelectInput/components/Dropdown/Item.js +49 -43
- package/dist/components/SelectInput/components/Dropdown/Option.d.ts.map +1 -1
- package/dist/components/SelectInput/components/Dropdown/Option.js +71 -89
- package/dist/components/SelectInput/components/Dropdown/SearchBar.js +36 -31
- package/dist/components/SelectInput/components/Dropdown/dropdown.css.d.ts.map +1 -1
- package/dist/components/SelectInput/components/SelectBar/SelectBar.js +6 -4
- package/dist/components/SelectableCard/MultiStateInput.js +1 -1
- package/dist/components/SelectableCard/SelectableCard.js +1 -1
- package/dist/components/SelectableCardOptionGroup/components/Option.js +1 -1
- package/dist/components/Separator/index.d.ts +3 -2
- package/dist/components/Separator/index.d.ts.map +1 -1
- package/dist/components/Separator/styles.css.d.ts +0 -60
- package/dist/components/Separator/styles.css.d.ts.map +1 -1
- package/dist/components/Separator/styles.css.js +6 -4
- package/dist/components/Slider/components/DoubleSlider.d.ts.map +1 -1
- package/dist/components/Slider/components/DoubleSlider.js +103 -114
- package/dist/components/Slider/components/SingleSlider.js +2 -5
- package/dist/components/Slider/styles.css.d.ts +0 -37
- package/dist/components/Slider/styles.css.d.ts.map +1 -1
- package/dist/components/Slider/styles.css.js +27 -44
- package/dist/components/Stack/index.js +2 -2
- package/dist/components/Stepper/index.js +1 -1
- package/dist/components/SwitchButton/index.js +1 -0
- package/dist/components/Table/Cell.js +1 -1
- package/dist/components/Table/TableContext.js +2 -2
- package/dist/components/Tabs/Tab.js +2 -2
- package/dist/components/Tabs/TabMenu.js +2 -2
- package/dist/components/Tabs/TabMenuItem.js +2 -2
- package/dist/components/Tabs/index.js +2 -2
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/index.js +28 -23
- package/dist/components/Tag/styles.css.d.ts.map +1 -1
- package/dist/components/Tag/styles.css.js +43 -41
- package/dist/components/Tag/type.d.ts +1 -2
- package/dist/components/Tag/type.d.ts.map +1 -1
- package/dist/components/TagInput/index.js +2 -1
- package/dist/components/TagList/constant.d.ts +2 -2
- package/dist/components/TagList/constant.d.ts.map +1 -1
- package/dist/components/TagList/constant.js +2 -4
- package/dist/components/TagList/index.d.ts +6 -6
- package/dist/components/TagList/index.d.ts.map +1 -1
- package/dist/components/TagList/index.js +77 -115
- package/dist/components/TagList/styles.css.d.ts +3 -3
- package/dist/components/TagList/styles.css.d.ts.map +1 -1
- package/dist/components/TagList/styles.css.js +7 -8
- package/dist/components/Text/index.d.ts.map +1 -1
- package/dist/components/Text/index.js +4 -6
- package/dist/components/Text/style.css.d.ts +0 -47
- package/dist/components/Text/style.css.d.ts.map +1 -1
- package/dist/components/TextArea/index.js +1 -1
- package/dist/components/TimeInput/index.js +1 -1
- package/dist/components/Toaster/Toaster.js +1 -1
- package/dist/components/Toaster/components/Button.js +2 -2
- package/dist/components/Toaster/components/Link.js +3 -3
- package/dist/components/Tooltip/TooltipChildren.d.ts +10 -0
- package/dist/components/Tooltip/TooltipChildren.d.ts.map +1 -0
- package/dist/components/Tooltip/TooltipChildren.js +71 -0
- package/dist/components/Tooltip/TooltipElement.d.ts +8 -0
- package/dist/components/Tooltip/TooltipElement.d.ts.map +1 -0
- package/dist/components/Tooltip/TooltipElement.js +39 -0
- package/dist/components/Tooltip/index.d.ts +92 -34
- package/dist/components/Tooltip/index.d.ts.map +1 -1
- package/dist/components/Tooltip/index.js +51 -29
- package/dist/components/Tooltip/styles.css.d.ts +17 -0
- package/dist/components/Tooltip/styles.css.d.ts.map +1 -1
- package/dist/components/Tooltip/styles.css.js +23 -1
- package/dist/components/Tooltip/types.d.ts +7 -0
- package/dist/components/Tooltip/types.d.ts.map +1 -0
- package/dist/components/Tooltip/useTooltip.d.ts +25 -0
- package/dist/components/Tooltip/useTooltip.d.ts.map +1 -0
- package/dist/components/Tooltip/useTooltip.js +75 -0
- package/dist/components/TreeMapChart/index.js +1 -1
- package/dist/components/VisuallyHidden/index.js +2 -2
- package/dist/composition.js +3 -3
- package/dist/compositions/EstimateCost/Components/Item.js +1 -1
- package/dist/compositions/EstimateCost/Components/LineThrough.js +2 -2
- package/dist/compositions/EstimateCost/Components/Unit.js +1 -1
- package/dist/compositions/EstimateCost/EstimateCostProvider.js +1 -1
- package/dist/compositions/EstimateCost/Image.js +1 -1
- package/dist/compositions/Filters/filterTypes/FilterSlider.js +1 -1
- package/dist/compositions/Filters/filterTypes/FilterText.d.ts.map +1 -1
- package/dist/compositions/Filters/filterTypes/FilterText.js +1 -0
- package/dist/compositions/Filters/parts/AbstractFilter.js +1 -1
- package/dist/compositions/Filters/parts/FiltersDrawer.d.ts +1 -0
- package/dist/compositions/Filters/parts/FiltersDrawer.d.ts.map +1 -1
- package/dist/compositions/Filters/parts/FiltersDrawer.js +15 -4
- package/dist/compositions/Filters/parts/FiltersMainRow.js +1 -0
- package/dist/compositions/Filters/parts/helpers.d.ts.map +1 -1
- package/dist/compositions/Filters/parts/helpers.js +3 -1
- package/dist/compositions/Filters/parts/reducer.js +1 -1
- package/dist/compositions/Filters/parts/useFilters.js +1 -1
- package/dist/compositions/Filters/types.d.ts +1 -0
- package/dist/compositions/Filters/types.d.ts.map +1 -1
- package/dist/compositions/InfoTable/components/Row.js +1 -1
- package/dist/compositions/InfoTable/styles.css.d.ts.map +1 -1
- package/dist/compositions/InfoTable/styles.css.js +30 -30
- package/dist/compositions/Navigation/NavigationProvider.js +1 -1
- package/dist/compositions/Navigation/components/items.css.d.ts.map +1 -1
- package/dist/compositions/Navigation/components/styles.css.d.ts.map +1 -1
- package/dist/compositions/OfferList/components/Row.js +4 -2
- package/dist/compositions/OptionSelector/styles.css.js +30 -30
- package/dist/compositions/OrderSummary/helpers.js +1 -1
- package/dist/compositions/RichTextInput/index.js +1 -1
- package/dist/hooks/useBreakpoint.d.ts +15 -0
- package/dist/hooks/useBreakpoint.d.ts.map +1 -0
- package/dist/hooks/useBreakpoint.js +46 -0
- package/dist/hooks/useIsOverflowing.d.ts +7 -3
- package/dist/hooks/useIsOverflowing.d.ts.map +1 -1
- package/dist/hooks/useIsOverflowing.js +13 -10
- package/dist/index.js +13 -13
- package/dist/ui.css +1 -1
- package/package.json +5 -4
- package/dist/components/Pagination/PaginationButton.d.ts +0 -11
- package/dist/components/Pagination/PaginationButton.d.ts.map +0 -1
- package/dist/components/Pagination/PaginationButton.js +0 -34
|
@@ -1,43 +1,101 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import type { CSSProperties, HTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
|
+
import type { TooltipPlacement } from './types';
|
|
3
|
+
export type TooltipRenderProps = Pick<HTMLAttributes<HTMLElement>, 'onBlur' | 'onFocus' | 'onKeyDown' | 'onMouseLeave' | 'onMouseMove' | 'onPointerDown' | 'onPointerEnter' | 'aria-describedby' | 'aria-labelledby'> & {
|
|
4
|
+
ref?: Ref<any>;
|
|
5
|
+
};
|
|
6
|
+
export type TooltipProps = {
|
|
7
|
+
/**
|
|
8
|
+
* id of the tooltip element
|
|
9
|
+
*/
|
|
8
10
|
id?: string;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
/**
|
|
12
|
+
* The trigger element of the tooltip. If a function is provided, it receives
|
|
13
|
+
* the props (including `aria-describedby`, event handlers and `ref`) to spread
|
|
14
|
+
* on the trigger element.
|
|
15
|
+
*/
|
|
16
|
+
children: ReactNode | ((renderProps: TooltipRenderProps) => ReactNode);
|
|
17
|
+
/**
|
|
18
|
+
* max-width of the tooltip element
|
|
19
|
+
*/
|
|
17
20
|
maxWidth?: number | string;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Content of the tooltip, preferably text inside. When omitted, no tooltip is rendered.
|
|
23
|
+
*/
|
|
24
|
+
text?: ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Preferred placement for the Tooltip.
|
|
27
|
+
* If there is not enough space, the direction will be flipped so that the Tooltip stays visible.
|
|
28
|
+
* @default 'top'
|
|
29
|
+
*/
|
|
30
|
+
placement?: TooltipPlacement;
|
|
31
|
+
/**
|
|
32
|
+
* Force the tooltip to be visible. When set, the tooltip is controlled and won't react to hover/focus.
|
|
33
|
+
*/
|
|
34
|
+
visible?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* className added on the tooltip element
|
|
37
|
+
*/
|
|
21
38
|
className?: string;
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated use relation instead
|
|
41
|
+
*/
|
|
42
|
+
role?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Role of the tooltip in relation to its reference element
|
|
45
|
+
* - use "description" only if the reference element already has an accessible label
|
|
46
|
+
* - use "label" if the tooltip text should be the label of the reference element
|
|
47
|
+
* @default 'description'
|
|
48
|
+
*/
|
|
49
|
+
relation?: 'description' | 'label';
|
|
50
|
+
'data-testid'?: string;
|
|
51
|
+
/**
|
|
52
|
+
* It will add `width: 100%` to the tooltip trigger container.
|
|
53
|
+
*/
|
|
22
54
|
containerFullWidth?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* It will add `height: 100%` to the tooltip trigger container.
|
|
57
|
+
*/
|
|
23
58
|
containerFullHeight?: boolean;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Render the tooltip in a portal target if you need it to overflow from a scroll container, at the cost of a small lag of the tooltip behind its reference element when scrolling.
|
|
61
|
+
* @default document.body
|
|
62
|
+
*/
|
|
63
|
+
portalTarget?: HTMLElement | null;
|
|
64
|
+
/**
|
|
65
|
+
* tabindex attribute for the tooltip trigger container
|
|
66
|
+
*/
|
|
30
67
|
tabIndex?: number;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
68
|
+
/**
|
|
69
|
+
* Delay (in ms) before the tooltip opens and closes.
|
|
70
|
+
* @deprecated Use `delay` instead to have more control over opening and closing delays.
|
|
71
|
+
*/
|
|
34
72
|
debounceDelay?: number;
|
|
35
|
-
|
|
73
|
+
/**
|
|
74
|
+
* Open and close delay (in ms) for the tooltip.
|
|
75
|
+
*/
|
|
76
|
+
delay?: {
|
|
77
|
+
open?: number;
|
|
78
|
+
close?: number;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* @deprecated The animation cannot be disabled
|
|
82
|
+
*/
|
|
36
83
|
disableAnimation?: boolean;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
84
|
+
/**
|
|
85
|
+
* style added on the tooltip element
|
|
86
|
+
*/
|
|
87
|
+
style?: CSSProperties;
|
|
88
|
+
/**
|
|
89
|
+
* Called when the tooltip visibility changes (open/close, including Escape dismiss).
|
|
90
|
+
*/
|
|
91
|
+
onOpenChange?: (open: boolean) => void;
|
|
92
|
+
};
|
|
93
|
+
export declare const DEFAULT_DELAY: {
|
|
94
|
+
close: number;
|
|
95
|
+
open: number;
|
|
96
|
+
};
|
|
97
|
+
export declare function Tooltip({ children, text, placement, id, className, containerFullWidth, containerFullHeight, maxWidth, visible, 'data-testid': dataTestId, portalTarget, relation, debounceDelay, delay, tabIndex, style, onOpenChange, }: TooltipProps): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null | undefined;
|
|
98
|
+
export declare namespace Tooltip {
|
|
99
|
+
var displayName: string;
|
|
100
|
+
}
|
|
43
101
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAI1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAG/C,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,cAAc,CAAC,WAAW,CAAC,EACzB,QAAQ,GACR,SAAS,GACT,WAAW,GACX,cAAc,GACd,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,kBAAkB,GAClB,iBAAiB,CACpB,GAAG;IAGF,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAA;CACf,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;;;OAIG;IACH,QAAQ,EAAE,SAAS,GAAG,CAAC,CAAC,WAAW,EAAE,kBAAkB,KAAK,SAAS,CAAC,CAAA;IACtE;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;;;;OAIG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAA;IAC5B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,aAAa,GAAG,OAAO,CAAA;IAClC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;;;OAGG;IACH,YAAY,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IACjC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IACzC;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;CACvC,CAAA;AAED,eAAO,MAAM,aAAa;IAAK,KAAK;IAAK,IAAI;CAAO,CAAA;gCAM5B,EACtB,QAAQ,EACR,IAAS,EACT,SAAiB,EACjB,EAAE,EACF,SAAS,EACT,kBAAkB,EAClB,mBAAmB,EACnB,QAAc,EACd,OAAO,EACP,aAAa,EAAE,UAAU,EACzB,YAAmE,EACnE,QAAQ,EACR,aAAa,EACb,KAAK,EACL,QAAY,EACZ,KAAK,EACL,YAAY,GACb,EAAE,YAAY"}
|
|
@@ -1,41 +1,63 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { __esmMin, __name } from "../../_virtual/_rolldown/runtime.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import _objectSpread2, { init_objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
4
|
+
import { TooltipChildren, init_TooltipChildren } from "./TooltipChildren.js";
|
|
5
|
+
import { TooltipElement, init_TooltipElement } from "./TooltipElement.js";
|
|
6
|
+
import { init_useTooltip, useTooltip } from "./useTooltip.js";
|
|
7
|
+
import { useId } from "react";
|
|
8
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { createPortal } from "react-dom";
|
|
8
10
|
|
|
9
11
|
//#region src/components/Tooltip/index.tsx
|
|
10
|
-
var Tooltip;
|
|
12
|
+
var DEFAULT_DELAY, Tooltip;
|
|
11
13
|
function init_Tooltip() {
|
|
12
14
|
return (init_Tooltip = __esmMin(() => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
children
|
|
34
|
-
|
|
15
|
+
init_TooltipChildren();
|
|
16
|
+
init_TooltipElement();
|
|
17
|
+
init_useTooltip();
|
|
18
|
+
init_objectSpread2();
|
|
19
|
+
DEFAULT_DELAY = {
|
|
20
|
+
close: 0,
|
|
21
|
+
open: 200
|
|
22
|
+
};
|
|
23
|
+
Tooltip = ({ children, text = "", placement = "top", id, className, containerFullWidth, containerFullHeight, maxWidth = 232, visible, "data-testid": dataTestId, portalTarget = typeof window === "undefined" ? null : document.body, relation, debounceDelay, delay, tabIndex = 0, style, onOpenChange }) => {
|
|
24
|
+
const tooltip = useTooltip({
|
|
25
|
+
delay: delay !== null && delay !== void 0 ? delay : debounceDelay ? {
|
|
26
|
+
open: debounceDelay,
|
|
27
|
+
close: debounceDelay
|
|
28
|
+
} : DEFAULT_DELAY,
|
|
29
|
+
onOpenChange,
|
|
30
|
+
placement,
|
|
31
|
+
visible
|
|
32
|
+
});
|
|
33
|
+
const uniqueId = useId();
|
|
34
|
+
const tooltipId = id !== null && id !== void 0 ? id : uniqueId;
|
|
35
|
+
if (!text) return typeof children === "function" ? children({}) : children;
|
|
36
|
+
const shouldRenderTooltipElement = relation === "label" ? true : tooltip.isMounted;
|
|
37
|
+
const tooltipProps = {
|
|
38
|
+
tooltip,
|
|
39
|
+
id: tooltipId,
|
|
40
|
+
className,
|
|
41
|
+
style,
|
|
42
|
+
"data-testid": dataTestId,
|
|
43
|
+
maxWidth,
|
|
44
|
+
text
|
|
45
|
+
};
|
|
46
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(TooltipChildren, {
|
|
47
|
+
tooltip,
|
|
48
|
+
containerFullHeight,
|
|
49
|
+
containerFullWidth,
|
|
50
|
+
tooltipId,
|
|
51
|
+
isTooltipVisible: shouldRenderTooltipElement,
|
|
52
|
+
relation,
|
|
53
|
+
tabIndex,
|
|
54
|
+
children
|
|
55
|
+
}), shouldRenderTooltipElement ? portalTarget ? createPortal(/* @__PURE__ */ jsx(TooltipElement, _objectSpread2({}, tooltipProps)), portalTarget) : /* @__PURE__ */ jsx(TooltipElement, _objectSpread2({}, tooltipProps)) : null] });
|
|
56
|
+
};
|
|
35
57
|
Tooltip.displayName = "Tooltip";
|
|
36
58
|
}))();
|
|
37
59
|
}
|
|
38
60
|
|
|
39
61
|
//#endregion
|
|
40
62
|
init_Tooltip();
|
|
41
|
-
export { Tooltip, init_Tooltip };
|
|
63
|
+
export { DEFAULT_DELAY, Tooltip, init_Tooltip };
|
|
@@ -1,4 +1,21 @@
|
|
|
1
|
+
export declare const ARROW_SIZE = 8;
|
|
2
|
+
export declare const ANIMATION_DURATION = 200;
|
|
1
3
|
export declare const tooltipStyle: {
|
|
4
|
+
animation: Record<"close" | "open", string>;
|
|
5
|
+
arrow: string;
|
|
6
|
+
childrenContainer: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
7
|
+
fullHeight: {
|
|
8
|
+
true: {
|
|
9
|
+
height: "100%";
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
fullWidth: {
|
|
13
|
+
true: {
|
|
14
|
+
width: "100%";
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}>;
|
|
18
|
+
content: string;
|
|
2
19
|
tooltip: string;
|
|
3
20
|
};
|
|
4
21
|
//# sourceMappingURL=styles.css.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/styles.css.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/styles.css.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU,IAAI,CAAA;AAE3B,eAAO,MAAM,kBAAkB,MAAM,CAAA;AA2ErC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;CAMxB,CAAA"}
|
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { init_animationsVanillaExtract_css_ts_vanilla } from "../../utils/animations/animationsVanillaExtract.css.ts.vanilla.js";
|
|
3
|
+
import { init_style_css_ts_vanilla } from "../Text/style.css.ts.vanilla.js";
|
|
2
4
|
import { init_styles_css_ts_vanilla } from "./styles.css.ts.vanilla.js";
|
|
5
|
+
import { createRuntimeFn } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3
6
|
|
|
4
7
|
//#region src/components/Tooltip/styles.css.ts
|
|
5
8
|
var tooltipStyle;
|
|
6
9
|
function init_styles_css() {
|
|
7
10
|
return (init_styles_css = __esmMin(() => {
|
|
11
|
+
/* @__PURE__ */ init_animationsVanillaExtract_css_ts_vanilla();
|
|
12
|
+
/* @__PURE__ */ init_style_css_ts_vanilla();
|
|
8
13
|
/* @__PURE__ */ init_styles_css_ts_vanilla();
|
|
9
|
-
tooltipStyle = {
|
|
14
|
+
tooltipStyle = {
|
|
15
|
+
animation: {
|
|
16
|
+
open: "uv_1y5sygv3",
|
|
17
|
+
close: "uv_1y5sygv4"
|
|
18
|
+
},
|
|
19
|
+
arrow: "uv_1y5sygv1",
|
|
20
|
+
childrenContainer: createRuntimeFn({
|
|
21
|
+
defaultClassName: "uv_1y5sygv5",
|
|
22
|
+
variantClassNames: {
|
|
23
|
+
fullHeight: { true: "uv_1y5sygv6" },
|
|
24
|
+
fullWidth: { true: "uv_1y5sygv7" }
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {},
|
|
27
|
+
compoundVariants: []
|
|
28
|
+
}),
|
|
29
|
+
content: "uv_1y5sygv2",
|
|
30
|
+
tooltip: "uv_1y5sygv0"
|
|
31
|
+
};
|
|
10
32
|
}))();
|
|
11
33
|
}
|
|
12
34
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated "auto" is not required since the Tooltip placement is always flipped if needed to remain visible.
|
|
3
|
+
*/
|
|
4
|
+
type LegacyTooltipPlacement = 'auto' | 'auto-top' | 'auto-bottom' | 'auto-left' | 'auto-right';
|
|
5
|
+
export type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right' | LegacyTooltipPlacement;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,KAAK,sBAAsB,GAAG,MAAM,GAAG,UAAU,GAAG,aAAa,GAAG,WAAW,GAAG,YAAY,CAAA;AAE9F,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ExtendedRefs, Placement, ReferenceType } from '@floating-ui/react';
|
|
2
|
+
import type { CSSProperties } from 'react';
|
|
3
|
+
import type { TooltipPlacement } from './types';
|
|
4
|
+
export type UseTooltipOptions = {
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
placement: TooltipPlacement;
|
|
7
|
+
delay?: {
|
|
8
|
+
open?: number;
|
|
9
|
+
close?: number;
|
|
10
|
+
};
|
|
11
|
+
onOpenChange?: (open: boolean) => void;
|
|
12
|
+
};
|
|
13
|
+
export declare const useTooltip: ({ visible, placement, delay, onOpenChange }: UseTooltipOptions) => {
|
|
14
|
+
refs: ExtendedRefs<ReferenceType>;
|
|
15
|
+
arrowRef: import("react").RefObject<HTMLDivElement | null>;
|
|
16
|
+
arrowStyle: CSSProperties;
|
|
17
|
+
finalPlacement: Placement;
|
|
18
|
+
floatingStyles: CSSProperties;
|
|
19
|
+
getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
|
|
20
|
+
getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
|
|
21
|
+
isMounted: boolean;
|
|
22
|
+
open: boolean;
|
|
23
|
+
status: "close" | "initial" | "open" | "unmounted";
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=useTooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTooltip.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/useTooltip.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAiBhF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAG/C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,EAAE,gBAAgB,CAAA;IAC3B,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IACzC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;CACvC,CAAA;AAED,eAAO,MAAM,UAAU,gDAAiD,iBAAiB;UAuDvE,YAAY,CAAC,aAAa,CAAC;;;;;;;;;;CAW5C,CAAA"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { __esmMin, __name } from "../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { init_styles_css } from "./styles.css.js";
|
|
4
|
+
import { useCallback, useRef, useState } from "react";
|
|
5
|
+
import { arrow, autoUpdate, flip, offset, safePolygon, shift, useDismiss, useFloating, useFocus, useHover, useInteractions, useTransitionStatus } from "@floating-ui/react";
|
|
6
|
+
import { usePrefersReducedMotion } from "@ultraviolet/animations";
|
|
7
|
+
|
|
8
|
+
//#region src/components/Tooltip/useTooltip.ts
|
|
9
|
+
var useTooltip;
|
|
10
|
+
function init_useTooltip() {
|
|
11
|
+
return (init_useTooltip = __esmMin(() => {
|
|
12
|
+
init_styles_css();
|
|
13
|
+
useTooltip = ({ visible, placement, delay, onOpenChange }) => {
|
|
14
|
+
var _middlewareData$arrow;
|
|
15
|
+
var _middlewareData$arrow2;
|
|
16
|
+
const [uncontrolledOpen, setUncontrolledOpen] = useState(false);
|
|
17
|
+
const isControlled = visible !== void 0;
|
|
18
|
+
const open = isControlled ? visible : uncontrolledOpen;
|
|
19
|
+
const arrowRef = useRef(null);
|
|
20
|
+
const setOpen = useCallback((next) => {
|
|
21
|
+
if (!isControlled) setUncontrolledOpen(next);
|
|
22
|
+
onOpenChange === null || onOpenChange === void 0 || onOpenChange(next);
|
|
23
|
+
}, [isControlled, onOpenChange]);
|
|
24
|
+
const { refs, floatingStyles, context, middlewareData, placement: finalPlacement } = useFloating({
|
|
25
|
+
open,
|
|
26
|
+
onOpenChange: setOpen,
|
|
27
|
+
middleware: [
|
|
28
|
+
offset(8),
|
|
29
|
+
flip(),
|
|
30
|
+
shift(),
|
|
31
|
+
arrow({
|
|
32
|
+
element: arrowRef,
|
|
33
|
+
padding: 4
|
|
34
|
+
})
|
|
35
|
+
],
|
|
36
|
+
whileElementsMounted: autoUpdate,
|
|
37
|
+
placement: placement.replace(/auto-?/, "") || "top"
|
|
38
|
+
});
|
|
39
|
+
const prefersReducedMotion = usePrefersReducedMotion();
|
|
40
|
+
const { isMounted, status } = useTransitionStatus(context, { duration: prefersReducedMotion ? 0 : 200 });
|
|
41
|
+
const hover = useHover(context, {
|
|
42
|
+
enabled: !isControlled,
|
|
43
|
+
handleClose: safePolygon(),
|
|
44
|
+
move: false,
|
|
45
|
+
delay
|
|
46
|
+
});
|
|
47
|
+
const focus = useFocus(context, { enabled: !isControlled });
|
|
48
|
+
const dismiss = useDismiss(context);
|
|
49
|
+
const { getReferenceProps, getFloatingProps } = useInteractions([
|
|
50
|
+
hover,
|
|
51
|
+
focus,
|
|
52
|
+
dismiss
|
|
53
|
+
]);
|
|
54
|
+
return {
|
|
55
|
+
refs,
|
|
56
|
+
arrowRef,
|
|
57
|
+
arrowStyle: {
|
|
58
|
+
left: (_middlewareData$arrow = middlewareData.arrow) === null || _middlewareData$arrow === void 0 ? void 0 : _middlewareData$arrow.x,
|
|
59
|
+
top: (_middlewareData$arrow2 = middlewareData.arrow) === null || _middlewareData$arrow2 === void 0 ? void 0 : _middlewareData$arrow2.y
|
|
60
|
+
},
|
|
61
|
+
finalPlacement,
|
|
62
|
+
floatingStyles,
|
|
63
|
+
getFloatingProps,
|
|
64
|
+
getReferenceProps,
|
|
65
|
+
isMounted,
|
|
66
|
+
open,
|
|
67
|
+
status
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
}))();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
//#endregion
|
|
74
|
+
init_useTooltip();
|
|
75
|
+
export { init_useTooltip, useTooltip };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { __esmMin, __name } from "../../_virtual/_rolldown/runtime.js";
|
|
3
|
-
import _objectSpread2, { init_objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import _objectSpread2, { init_objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
4
4
|
import { init_styles_css, treeMapChartStyle } from "./styles.css.js";
|
|
5
5
|
import { getDataColors, init_treeMap } from "../../helpers/treeMap.js";
|
|
6
6
|
import { Tooltip, init_Tooltip } from "./Tooltip.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { __esmMin, __name } from "../../_virtual/_rolldown/runtime.js";
|
|
3
|
-
import _objectSpread2, { init_objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.
|
|
4
|
-
import _objectWithoutProperties, { init_objectWithoutProperties } from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import _objectSpread2, { init_objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
4
|
+
import _objectWithoutProperties, { init_objectWithoutProperties } from "../../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectWithoutProperties.js";
|
|
5
5
|
import { init_styles_css, visuallyHiddenStyle } from "./styles.css.js";
|
|
6
6
|
import { createElement, forwardRef } from "react";
|
|
7
7
|
import { cn } from "@ultraviolet/utils";
|
package/dist/composition.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { __esmMin } from "./_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { Stack, init_Stack } from "./components/Stack/index.js";
|
|
3
|
-
import { Popup, init_Popup } from "./components/Popup/index.js";
|
|
4
3
|
import { Tooltip, init_Tooltip } from "./components/Tooltip/index.js";
|
|
5
4
|
import { Text, init_Text } from "./components/Text/index.js";
|
|
6
5
|
import { NavigationProvider, init_NavigationProvider, useNavigation } from "./compositions/Navigation/NavigationProvider.js";
|
|
7
6
|
import { init_styles_css, navigationStyle } from "./compositions/Navigation/styles.css.js";
|
|
8
7
|
import { Loader, init_Loader } from "./components/Loader/index.js";
|
|
9
8
|
import { Button, init_Button } from "./components/Button/index.js";
|
|
9
|
+
import { Popup, init_Popup } from "./components/Popup/index.js";
|
|
10
10
|
import { Label, init_Label } from "./components/Label/index.js";
|
|
11
11
|
import { TextInput, init_TextInput } from "./components/TextInput/index.js";
|
|
12
12
|
import { Key, init_Key } from "./components/Key/index.js";
|
|
@@ -27,8 +27,6 @@ import { Tag, init_Tag } from "./components/Tag/index.js";
|
|
|
27
27
|
import { SelectInput, init_SelectInput } from "./components/SelectInput/index.js";
|
|
28
28
|
import { UnitInput, init_UnitInput } from "./components/UnitInput/index.js";
|
|
29
29
|
import { EstimateCost, init_EstimateCost } from "./_virtual/EstimateCost.js";
|
|
30
|
-
import { Modal, init_Modal } from "./components/Modal/index.js";
|
|
31
|
-
import { Drawer, init_Drawer } from "./components/Drawer/index.js";
|
|
32
30
|
import { ActionBar, init_ActionBar } from "./components/ActionBar/index.js";
|
|
33
31
|
import { Avatar, init_Avatar } from "./components/Avatar/index.js";
|
|
34
32
|
import { Link, init_Link } from "./components/Link/index.js";
|
|
@@ -44,7 +42,9 @@ import { CheckboxGroup, init_CheckboxGroup } from "./components/CheckboxGroup/in
|
|
|
44
42
|
import { Chip, init_Chip } from "./components/Chip/index.js";
|
|
45
43
|
import { CopyButton, init_CopyButton } from "./components/CopyButton/index.js";
|
|
46
44
|
import { DateInput, init_DateInput } from "./components/DateInput/index.js";
|
|
45
|
+
import { Modal, init_Modal } from "./components/Modal/index.js";
|
|
47
46
|
import { Dialog, init_Dialog } from "./components/Dialog/index.js";
|
|
47
|
+
import { Drawer, init_Drawer } from "./components/Drawer/index.js";
|
|
48
48
|
import { EmptyState, init_EmptyState } from "./components/EmptyState/index.js";
|
|
49
49
|
import { ExpandableCard, init_ExpandableCard } from "./components/ExpandableCard/index.js";
|
|
50
50
|
import { FileInput, init_FileInput } from "./components/FileInput/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { __esmMin, __name } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
-
import _objectSpread2, { init_objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import _objectSpread2, { init_objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
4
4
|
import { init_constants, maximumFractionDigits, maximumFractionDigitsLong, multiplier } from "../constants.js";
|
|
5
5
|
import { init_EstimateCostProvider, useEstimateCost } from "../EstimateCostProvider.js";
|
|
6
6
|
import { calculatePrice, init_helper } from "../helper.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { __esmMin, __name } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
-
import _objectSpread2, { init_objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.
|
|
4
|
-
import _objectWithoutProperties, { init_objectWithoutProperties } from "../../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import _objectSpread2, { init_objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
4
|
+
import _objectWithoutProperties, { init_objectWithoutProperties } from "../../../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectWithoutProperties.js";
|
|
5
5
|
import { estimateCostStyle, init_styles_css } from "../styles.css.js";
|
|
6
6
|
import { cn } from "@ultraviolet/utils";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { __esmMin, __name } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
-
import _objectSpread2, { init_objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import _objectSpread2, { init_objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
4
4
|
import { init_OverlayContext, useOverlay } from "../OverlayContext.js";
|
|
5
5
|
import { estimateCostStyle, init_styles_css } from "../styles.css.js";
|
|
6
6
|
import { NumberInput, init_NumberInput } from "../../../components/NumberInput/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { __esmMin, __name } from "../../_virtual/_rolldown/runtime.js";
|
|
3
|
-
import _objectSpread2, { init_objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import _objectSpread2, { init_objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
4
4
|
import en_default, { init_en } from "./locales/en.js";
|
|
5
5
|
import { createContext, useCallback, useContext, useMemo } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __esmMin, __name } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import _objectSpread2, { init_objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _objectSpread2, { init_objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { estimateCostStyle, init_styles_css } from "./styles.css.js";
|
|
4
4
|
import { cn } from "@ultraviolet/utils";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __esmMin, __name } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import _objectSpread2, { init_objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _objectSpread2, { init_objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { Slider, init_Slider } from "../../../components/Slider/index.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterText.d.ts","sourceRoot":"","sources":["../../../../src/compositions/Filters/filterTypes/FilterText.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAE1E,KAAK,eAAe,GAAG,oBAAoB,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAA;AAEzE,eAAO,MAAM,UAAU,iDAAkD,eAAe,
|
|
1
|
+
{"version":3,"file":"FilterText.d.ts","sourceRoot":"","sources":["../../../../src/compositions/Filters/filterTypes/FilterText.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAE1E,KAAK,eAAe,GAAG,oBAAoB,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAA;AAEzE,eAAO,MAAM,UAAU,iDAAkD,eAAe,gCAgCvF,CAAA"}
|
|
@@ -18,6 +18,7 @@ function init_FilterText() {
|
|
|
18
18
|
}, [value]);
|
|
19
19
|
return /* @__PURE__ */ jsx(TextInput, {
|
|
20
20
|
"aria-label": hideLabel ? config.label : void 0,
|
|
21
|
+
clearable: config.clearable,
|
|
21
22
|
label: hideLabel ? void 0 : config.label,
|
|
22
23
|
labelDescription: hideLabel ? void 0 : config.labelDescription,
|
|
23
24
|
loading: tempValue !== value,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __esmMin, __name } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import _objectSpread2, { init_objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _objectSpread2, { init_objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { FilterDateRange, init_FilterDateRange } from "../filterTypes/FilterDateRange.js";
|
|
4
4
|
import { FilterDatetimeRange, init_FilterDatetimeRange } from "../filterTypes/FilterDatetimeRange/FilterDatetimeRange.js";
|
|
5
5
|
import { FilterSelect, init_FilterSelect } from "../filterTypes/FilterSelect.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FiltersDrawer.d.ts","sourceRoot":"","sources":["../../../../src/compositions/Filters/parts/FiltersDrawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAe,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"FiltersDrawer.d.ts","sourceRoot":"","sources":["../../../../src/compositions/Filters/parts/FiltersDrawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAe,MAAM,OAAO,CAAA;AAMvD,OAAO,KAAK,EAAE,SAAS,EAAE,oBAAoB,EAAE,YAAY,EAAoB,MAAM,UAAU,CAAA;AAM/F,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,IAAI;IACzD,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAA;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC,CAAA;IAChE,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,CAAA;QACd,KAAK,EAAE,MAAM,CAAA;QACb,QAAQ,EAAE,MAAM,CAAA;QAChB,YAAY,EAAE,MAAM,CAAA;KACrB,CAAA;CACF,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,SAAS,kCAAkC,WAAW,CAAC,CAAC,CAAC,uCAkGhG,CAAA"}
|
|
@@ -2,6 +2,7 @@ import { __esmMin, __name } from "../../../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { Stack, init_Stack } from "../../../components/Stack/index.js";
|
|
3
3
|
import { Button, init_Button } from "../../../components/Button/index.js";
|
|
4
4
|
import { Separator, init_Separator } from "../../../components/Separator/index.js";
|
|
5
|
+
import { Row, init_Row } from "../../../components/Row/index.js";
|
|
5
6
|
import { Drawer, init_Drawer } from "../../../components/Drawer/index.js";
|
|
6
7
|
import { AbstractFilter, init_AbstractFilter } from "./AbstractFilter.js";
|
|
7
8
|
import { ExpandableFilterGroup, init_ExpandableFilterGroup } from "./ExpandableFilterGroup.js";
|
|
@@ -14,6 +15,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
14
15
|
var FiltersDrawer;
|
|
15
16
|
function init_FiltersDrawer() {
|
|
16
17
|
return (init_FiltersDrawer = __esmMin(() => {
|
|
18
|
+
init_Row();
|
|
17
19
|
init_Button();
|
|
18
20
|
init_Drawer();
|
|
19
21
|
init_Separator();
|
|
@@ -34,10 +36,19 @@ function init_FiltersDrawer() {
|
|
|
34
36
|
};
|
|
35
37
|
if (drawerFilters.length === 0) return null;
|
|
36
38
|
return /* @__PURE__ */ jsx(Drawer, {
|
|
37
|
-
footer: /* @__PURE__ */
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
children:
|
|
39
|
+
footer: /* @__PURE__ */ jsxs(Row, {
|
|
40
|
+
gap: 2,
|
|
41
|
+
templateColumns: "1fr 1fr",
|
|
42
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
43
|
+
variant: "outlined",
|
|
44
|
+
onClick: () => filters.reset(),
|
|
45
|
+
disabled: filters.dirtyFilters.length === 0,
|
|
46
|
+
children: labels.clearAll
|
|
47
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
48
|
+
form: formId,
|
|
49
|
+
type: "submit",
|
|
50
|
+
children: labels.submit
|
|
51
|
+
})]
|
|
41
52
|
}),
|
|
42
53
|
header: labels.drawerHeader,
|
|
43
54
|
hideOnClickOutside: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/compositions/Filters/parts/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAE1E,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,SAAS,QAAQ,YAAY,CAAC,CAAC,CAAC,KAAG,IAAI,IAAI,iBAAiB,CAAC,CAAC,CACrF,CAAA;
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/compositions/Filters/parts/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAE1E,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,SAAS,QAAQ,YAAY,CAAC,CAAC,CAAC,KAAG,IAAI,IAAI,iBAAiB,CAAC,CAAC,CACrF,CAAA;AAIvB,eAAO,MAAM,0BAA0B,GAAI,MAAM,SAAS,SAAS,MAAM,MAAM,MAAM,MAAM,KAAG,CAAC,MAAM,MAAM,CAAC,EAoD3G,CAAA;AAID,eAAO,MAAM,YAAY,GAAI,MAAM,SAAS,SAAS,MAAM,MAAM,MAAM,MAAM,YAa5E,CAAA"}
|