@ultraviolet/ui 3.22.0 → 3.24.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/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 +3 -3
- 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/type.d.ts +1 -2
- package/dist/components/Tag/type.d.ts.map +1 -1
- package/dist/components/TagInput/index.d.ts +4 -3
- package/dist/components/TagInput/index.d.ts.map +1 -1
- package/dist/components/TagInput/index.js +5 -3
- package/dist/components/TagList/index.d.ts +8 -3
- package/dist/components/TagList/index.d.ts.map +1 -1
- package/dist/components/TagList/index.js +24 -19
- package/dist/components/TagList/styles.css.d.ts.map +1 -1
- 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 +21 -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 +97 -97
- 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 +97 -97
- 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 +6 -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,10 +1,12 @@
|
|
|
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.146.0/helpers/esm/objectSpread2.js";
|
|
3
4
|
import { Stack, init_Stack } from "../Stack/index.js";
|
|
4
5
|
import { Tooltip, init_Tooltip } from "../Tooltip/index.js";
|
|
5
6
|
import { Text, init_Text } from "../Text/index.js";
|
|
6
7
|
import { Loader, init_Loader } from "../Loader/index.js";
|
|
7
8
|
import { Separator, init_Separator } from "../Separator/index.js";
|
|
9
|
+
import { Row, init_Row } from "../Row/index.js";
|
|
8
10
|
import { init_styles_css, tagStyle } from "./styles.css.js";
|
|
9
11
|
import { useMemo } from "react";
|
|
10
12
|
import { cn } from "@ultraviolet/utils";
|
|
@@ -18,11 +20,13 @@ var COPY_DURATION, Tag;
|
|
|
18
20
|
function init_Tag() {
|
|
19
21
|
return (init_Tag = __esmMin(() => {
|
|
20
22
|
init_Loader();
|
|
23
|
+
init_Row();
|
|
21
24
|
init_Separator();
|
|
22
25
|
init_Stack();
|
|
23
26
|
init_Text();
|
|
24
27
|
init_Tooltip();
|
|
25
28
|
init_styles_css();
|
|
29
|
+
init_objectSpread2();
|
|
26
30
|
COPY_DURATION = 2500;
|
|
27
31
|
Tag = ({ children, isLoading, onClose, copiable = false, copyButton, copyText = "Copy", copiedText = "Copied!", disabled, sentiment = "neutral", variant = "default", className, style, keyValue, "data-testid": dataTestId }) => {
|
|
28
32
|
const stringChildren = useMemo(() => {
|
|
@@ -35,8 +39,17 @@ function init_Tag() {
|
|
|
35
39
|
const [isCopied, setCopied] = useClipboard(stringChildren, { successDuration: COPY_DURATION });
|
|
36
40
|
const isCopiable = copiable && !disabled;
|
|
37
41
|
const TagInner = copiable ? "button" : "span";
|
|
42
|
+
const copyTextTooltip = isCopied ? copiedText : copyText;
|
|
43
|
+
const textProps = {
|
|
44
|
+
"aria-disabled": disabled,
|
|
45
|
+
as: "span",
|
|
46
|
+
variant: variant === "code" ? "code" : "caption",
|
|
47
|
+
oneLine: true,
|
|
48
|
+
sentiment: disabled ? "neutral" : sentiment,
|
|
49
|
+
disabled
|
|
50
|
+
};
|
|
38
51
|
return /* @__PURE__ */ jsx(Tooltip, {
|
|
39
|
-
text: isCopiable ?
|
|
52
|
+
text: isCopiable ? copyTextTooltip : null,
|
|
40
53
|
children: /* @__PURE__ */ jsxs(Stack, {
|
|
41
54
|
direction: "row",
|
|
42
55
|
className: tagStyle.wrapper[copiable ? "copiable" : "notCopiable"],
|
|
@@ -56,29 +69,21 @@ function init_Tag() {
|
|
|
56
69
|
if (isCopiable) setCopied().catch(() => null);
|
|
57
70
|
},
|
|
58
71
|
children: [
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
|
|
61
|
-
|
|
72
|
+
keyValue ? /* @__PURE__ */ jsxs(Row, {
|
|
73
|
+
templateColumns: "minmax(0, auto) 1px minmax(0, auto)",
|
|
74
|
+
gap: 1,
|
|
62
75
|
className: tagStyle.text,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
direction: "vertical",
|
|
75
|
-
thickness: 1,
|
|
76
|
-
className: tagStyle.separator
|
|
77
|
-
}),
|
|
78
|
-
keyValue.value
|
|
79
|
-
]
|
|
80
|
-
}) : children
|
|
81
|
-
}),
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ jsx(Text, _objectSpread2(_objectSpread2({}, textProps), {}, { children: keyValue.key })),
|
|
78
|
+
/* @__PURE__ */ jsx(Separator, {
|
|
79
|
+
sentiment: disabled ? "neutral" : sentiment,
|
|
80
|
+
direction: "vertical",
|
|
81
|
+
thickness: 1,
|
|
82
|
+
className: tagStyle.separator
|
|
83
|
+
}),
|
|
84
|
+
/* @__PURE__ */ jsx(Text, _objectSpread2(_objectSpread2({}, textProps), {}, { children: keyValue.value }))
|
|
85
|
+
]
|
|
86
|
+
}) : /* @__PURE__ */ jsx(Text, _objectSpread2(_objectSpread2({ className: tagStyle.text }, textProps), {}, { children })),
|
|
82
87
|
copiable && copyButton && !isLoading ? /* @__PURE__ */ jsx(CopyContentIcon, { size: "xsmall" }) : null,
|
|
83
88
|
isLoading ? /* @__PURE__ */ jsx(Loader, {
|
|
84
89
|
active: true,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { CSSProperties, MouseEventHandler, ReactNode } from 'react';
|
|
2
|
-
import type { SENTIMENTS } from './styles.css';
|
|
3
2
|
export type TagProps = {
|
|
4
3
|
isLoading?: boolean;
|
|
5
|
-
sentiment?:
|
|
4
|
+
sentiment?: 'danger' | 'info' | 'neutral' | 'primary' | 'secondary' | 'success' | 'warning';
|
|
6
5
|
disabled?: boolean;
|
|
7
6
|
copyText?: string;
|
|
8
7
|
copiedText?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAExE,MAAM,MAAM,QAAQ,GAAG;IACrB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,SAAS,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,CAAA;IAC3F,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,OAAO,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAA;CAC/C,GAAG,CACA;IACE,QAAQ,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IACxC,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,UAAU,CAAC,EAAE,KAAK,CAAA;CACnB,GACD;IACE,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,QAAQ,EAAE,SAAS,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CACJ,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { CSSProperties, ReactNode } from 'react';
|
|
1
|
+
import type { ComponentProps, CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { Tag } from '../Tag';
|
|
2
3
|
import type { TAGINPUT_SIZE_PADDING } from './styles.css';
|
|
3
4
|
type TagInputSize = keyof typeof TAGINPUT_SIZE_PADDING;
|
|
4
5
|
type TagInputProp = (string | {
|
|
@@ -30,8 +31,8 @@ type TagInputProps = {
|
|
|
30
31
|
clearable?: boolean;
|
|
31
32
|
style?: CSSProperties;
|
|
32
33
|
'aria-describedBy'?: string;
|
|
33
|
-
}
|
|
34
|
-
export declare function TagInput({ disabled, id, name, onChange, placeholder, value, className, 'data-testid': dataTestId, 'aria-label': ariaLabel, label, labelDescription, required, size, error, success, helper, readOnly, tooltip, clearable, style, 'aria-describedBy': ariaDescribedBy, }: TagInputProps): import("react").JSX.Element;
|
|
34
|
+
} & Pick<ComponentProps<typeof Tag>, 'sentiment' | 'variant'>;
|
|
35
|
+
export declare function TagInput({ disabled, id, name, onChange, placeholder, value, className, 'data-testid': dataTestId, 'aria-label': ariaLabel, label, labelDescription, required, size, error, success, helper, readOnly, tooltip, clearable, style, variant, sentiment, 'aria-describedBy': ariaDescribedBy, }: TagInputProps): import("react").JSX.Element;
|
|
35
36
|
export declare namespace TagInput {
|
|
36
37
|
var displayName: string;
|
|
37
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TagInput/index.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAe,aAAa,EAAwB,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TagInput/index.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAe,cAAc,EAAE,aAAa,EAAwB,SAAS,EAAE,MAAM,OAAO,CAAA;AAMxG,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAG5B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAEzD,KAAK,YAAY,GAAG,MAAM,OAAO,qBAAqB,CAAA;AAiBtD,KAAK,YAAY,GAAG,CAAC,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,CAAA;AAEjE,KAAK,aAAa,GAAG;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,YAAY,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,gBAAgB,CAAC,EAAE,SAAS,CAAA;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAC1B,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC,CAAA;iCAKpC,EACvB,QAAgB,EAChB,EAAE,EACF,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,KAAK,EACL,SAAS,EACT,aAAa,EAAE,UAAU,EACzB,YAAY,EAAE,SAAS,EACvB,KAAK,EACL,gBAAgB,EAChB,QAAgB,EAChB,IAAc,EACd,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAgB,EAChB,OAAO,EACP,SAAiB,EACjB,KAAK,EACL,OAAmB,EACnB,SAAqB,EACrB,kBAAkB,EAAE,eAAe,GACpC,EAAE,aAAa"}
|
|
@@ -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 { Stack, init_Stack } from "../Stack/index.js";
|
|
5
5
|
import { Tooltip, init_Tooltip } from "../Tooltip/index.js";
|
|
6
6
|
import { Button, init_Button } from "../Button/index.js";
|
|
@@ -40,7 +40,7 @@ function init_TagInput() {
|
|
|
40
40
|
label: tag
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
|
-
TagInput = ({ disabled = false, id, name, onChange, placeholder, value, className, "data-testid": dataTestId, "aria-label": ariaLabel, label, labelDescription, required = false, size = "large", error, success, helper, readOnly = false, tooltip, clearable = false, style, "aria-describedBy": ariaDescribedBy }) => {
|
|
43
|
+
TagInput = ({ disabled = false, id, name, onChange, placeholder, value, className, "data-testid": dataTestId, "aria-label": ariaLabel, label, labelDescription, required = false, size = "large", error, success, helper, readOnly = false, tooltip, clearable = false, style, variant = "default", sentiment = "neutral", "aria-describedBy": ariaDescribedBy }) => {
|
|
44
44
|
const [tagInputState, setTagInput] = useState(convertTagArrayToTagStateArray(value));
|
|
45
45
|
const [input, setInput] = useState("");
|
|
46
46
|
const [status, setStatus] = useState({});
|
|
@@ -136,6 +136,7 @@ function init_TagInput() {
|
|
|
136
136
|
"data-readonly": readOnly,
|
|
137
137
|
"data-success": !!success,
|
|
138
138
|
"data-testid": dataTestId,
|
|
139
|
+
tabIndex: 0,
|
|
139
140
|
onClick: handleContainerClick,
|
|
140
141
|
onKeyDown: (event) => {
|
|
141
142
|
if ([" ", "Enter"].includes(event.key)) handleContainerClick();
|
|
@@ -149,7 +150,8 @@ function init_TagInput() {
|
|
|
149
150
|
e.stopPropagation();
|
|
150
151
|
deleteTag(tag.index);
|
|
151
152
|
},
|
|
152
|
-
sentiment
|
|
153
|
+
sentiment,
|
|
154
|
+
variant,
|
|
153
155
|
children: tag.label
|
|
154
156
|
}, tag.index)), disabled ? null : /* @__PURE__ */ jsx("input", {
|
|
155
157
|
"aria-describedby": ariaDescribedBy || (hasHelperText(helper, error, success) ? helperId : void 0),
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import type { ComponentProps, CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { Popover } from '../Popover';
|
|
3
3
|
import { Tag } from '../Tag';
|
|
4
|
-
|
|
4
|
+
type TagKeyValue = {
|
|
5
|
+
key: string;
|
|
6
|
+
value: string;
|
|
7
|
+
};
|
|
8
|
+
type TagIcon = {
|
|
5
9
|
label: string;
|
|
6
10
|
icon: ReactNode;
|
|
7
11
|
};
|
|
12
|
+
export type TagType = string | TagKeyValue | TagIcon;
|
|
8
13
|
type TagListProps = {
|
|
9
14
|
/**
|
|
10
15
|
* This property define maximum characters length of all tags until it hide tags into tooltip.
|
|
@@ -36,8 +41,8 @@ type TagListProps = {
|
|
|
36
41
|
className?: string;
|
|
37
42
|
'data-testid'?: string;
|
|
38
43
|
style?: CSSProperties;
|
|
39
|
-
} & Pick<ComponentProps<typeof Tag>, 'copiable' | 'copyText' | 'copiedText'>;
|
|
40
|
-
export declare function TagList({ maxLength, tags, threshold, multiline, popoverTitle, popoverPlacement, popoverMaxHeight, copiable, copyText, copiedText, className, 'data-testid': dataTestId, style, }: TagListProps): import("react").JSX.Element;
|
|
44
|
+
} & Pick<ComponentProps<typeof Tag>, 'copiable' | 'copyText' | 'copiedText' | 'variant' | 'sentiment'>;
|
|
45
|
+
export declare function TagList({ maxLength, tags, threshold, multiline, popoverTitle, popoverPlacement, popoverMaxHeight, copiable, copyText, copiedText, sentiment, variant, className, 'data-testid': dataTestId, style, }: TagListProps): import("react").JSX.Element;
|
|
41
46
|
export declare namespace TagList {
|
|
42
47
|
var displayName: string;
|
|
43
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TagList/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAI5B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TagList/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAI5B,KAAK,WAAW,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AACjD,KAAK,OAAO,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,SAAS,CAAA;CAAE,CAAA;AACjD,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,CAAA;AAEpD,KAAK,YAAY,GAAG;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,EAAE,CAAA;IAChB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC,WAAW,CAAC,CAAA;IAC9D;;OAEG;IACH,gBAAgB,CAAC,EAAE,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC,WAAW,CAAC,CAAA;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,YAAY,GAAG,SAAS,GAAG,WAAW,CAAC,CAAA;gCAyB9E,EACtB,SAAe,EACf,IAAmB,EACnB,SAAa,EACb,SAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,gBAA6C,EAC7C,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,SAAqB,EACrB,OAAmB,EACnB,SAAS,EACT,aAAa,EAAE,UAAU,EACzB,KAAK,GACN,EAAE,YAAY"}
|
|
@@ -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, popoverTriggerWidthVar, tagListStyle } from "./styles.css.js";
|
|
5
5
|
import { Tag, init_Tag } from "../Tag/index.js";
|
|
6
6
|
import { Popover, init_Popover } from "../Popover/index.js";
|
|
@@ -11,7 +11,7 @@ import { assignInlineVars } from "@vanilla-extract/dynamic";
|
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
|
|
13
13
|
//#region src/components/TagList/index.tsx
|
|
14
|
-
var DEFAULT_TAGS, getTagLabel, TagList;
|
|
14
|
+
var DEFAULT_TAGS, isLabelIconTag, isKeyValueTag, getTagLabel, TagList;
|
|
15
15
|
function init_TagList() {
|
|
16
16
|
return (init_TagList = __esmMin(() => {
|
|
17
17
|
init_Popover();
|
|
@@ -20,8 +20,14 @@ function init_TagList() {
|
|
|
20
20
|
init_styles_css();
|
|
21
21
|
init_objectSpread2();
|
|
22
22
|
DEFAULT_TAGS = [];
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
isLabelIconTag = (tag) => typeof tag === "object" && tag !== null && "label" in tag && "icon" in tag;
|
|
24
|
+
isKeyValueTag = (tag) => typeof tag === "object" && tag !== null && "key" in tag && "value" in tag;
|
|
25
|
+
getTagLabel = (tag) => {
|
|
26
|
+
if (isKeyValueTag(tag)) return `${tag.key}-${tag.value}`;
|
|
27
|
+
if (isLabelIconTag(tag)) return tag.label;
|
|
28
|
+
return tag;
|
|
29
|
+
};
|
|
30
|
+
TagList = ({ maxLength = 600, tags = DEFAULT_TAGS, threshold = 1, multiline = false, popoverTitle, popoverPlacement, popoverMaxHeight = DEFAULT_POPOVER_MAX_HEIGHT, copiable, copyText, copiedText, sentiment = "neutral", variant = "default", className, "data-testid": dataTestId, style }) => {
|
|
25
31
|
var _containerRef$current3;
|
|
26
32
|
var _containerRef$current6;
|
|
27
33
|
const containerRef = useRef(null);
|
|
@@ -117,21 +123,20 @@ function init_TagList() {
|
|
|
117
123
|
visibleTags.length,
|
|
118
124
|
(_containerRef$current6 = containerRef.current) === null || _containerRef$current6 === void 0 || (_containerRef$current6 = _containerRef$current6.parentElement) === null || _containerRef$current6 === void 0 ? void 0 : _containerRef$current6.offsetWidth
|
|
119
125
|
]);
|
|
120
|
-
const renderTag = (tag, index, isEllipsis = false, hidden) =>
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}, `${getTagLabel(tag)}-${index}`);
|
|
126
|
+
const renderTag = (tag, index, isEllipsis = false, hidden) => {
|
|
127
|
+
const commonProps = {
|
|
128
|
+
className: cn(isEllipsis ? "ellipsed" : "", tagListStyle.ellipsisChild),
|
|
129
|
+
copiable,
|
|
130
|
+
copiedText,
|
|
131
|
+
copyText,
|
|
132
|
+
key: `${getTagLabel(tag)}-${index}`,
|
|
133
|
+
"data-testid": hidden ? "" : getTagLabel(tag),
|
|
134
|
+
variant,
|
|
135
|
+
sentiment
|
|
136
|
+
};
|
|
137
|
+
if (isKeyValueTag(tag)) return /* @__PURE__ */ jsx(Tag, _objectSpread2({ keyValue: tag }, commonProps));
|
|
138
|
+
return /* @__PURE__ */ jsxs(Tag, _objectSpread2(_objectSpread2({}, commonProps), {}, { children: [isLabelIconTag(tag) ? tag.icon : void 0, getTagLabel(tag)] }));
|
|
139
|
+
};
|
|
135
140
|
return /* @__PURE__ */ jsxs("div", {
|
|
136
141
|
className: cn(className, tagListStyle.container),
|
|
137
142
|
"data-testid": dataTestId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/TagList/styles.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,sBAAsB,oBAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/TagList/styles.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,sBAAsB,oBAAc,CAAA;AA4DjD,eAAO,MAAM,YAAY;;;;;;;;;;;;CAMxB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Text/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Text/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAGtD,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAG5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAI9C,KAAK,eAAe,GAAG,MAAM,OAAO,WAAW,CAAA;AAC/C,KAAK,cAAc,GAAG,aAAa,CAAC,WAAW,CAAC,CAAA;AAChD,KAAK,eAAe,GAAG,aAAa,CAAC,YAAY,CAAC,CAAA;AAElD,KAAK,SAAS,GAAG;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,cAAc,CAAA;IAC1B,OAAO,EAAE,WAAW,CAAA;IACpB,SAAS,CAAC,EAAE,aAAa,CAAA;IACzB,UAAU,CAAC,EAAE,eAAe,CAAA;IAC5B,EAAE,EAAE,WAAW,CAAA;IACf,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAA;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,UAAU,CAAC,EAAE,eAAe,CAAA;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,CAAA;IAC5C,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,CAAA;6BAKoB,EACnB,OAAO,EACP,QAAQ,EACR,EAAE,EAAE,SAAiB,EACrB,SAAS,EACT,OAAe,EACf,SAAS,EACT,UAAsB,EACtB,SAAS,EACT,QAAgB,EAChB,MAAc,EACd,SAAiB,EACjB,aAAqB,EACrB,EAAE,EACF,GAAG,EACH,UAAU,EACV,OAAO,EACP,IAAI,EACJ,aAAa,EAAE,UAAU,EACzB,aAAa,EAAE,UAAU,EACzB,KAAK,GACN,EAAE,SAAS"}
|
|
@@ -1,12 +1,11 @@
|
|
|
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 recursivelyGetChildrenString, { init_recursivelyGetChildrenString } from "../../helpers/recursivelyGetChildrenString.js";
|
|
5
5
|
import { init_useIsOverflowing, useIsOverflowing } from "../../hooks/useIsOverflowing.js";
|
|
6
6
|
import { Tooltip, init_Tooltip } from "../Tooltip/index.js";
|
|
7
7
|
import { init_style_css, textStyle } from "./style.css.js";
|
|
8
8
|
import { init_variables_css, textVars } from "./variables.css.js";
|
|
9
|
-
import { useRef } from "react";
|
|
10
9
|
import { cn } from "@ultraviolet/utils";
|
|
11
10
|
import { assignInlineVars } from "@vanilla-extract/dynamic";
|
|
12
11
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -22,11 +21,10 @@ function init_Text() {
|
|
|
22
21
|
init_variables_css();
|
|
23
22
|
init_objectSpread2();
|
|
24
23
|
Text = ({ variant, children, as: Component = "div", sentiment, oneLine = false, placement, prominence = "default", className, disabled = false, italic = false, underline = false, strikeThrough = false, id, dir, whiteSpace, htmlFor, role, "data-testid": dataTestId, "aria-hidden": ariaHidden, style }) => {
|
|
25
|
-
const
|
|
26
|
-
const isOverflowing = useIsOverflowing(elementRef);
|
|
24
|
+
const [setElement, isOverflowing] = useIsOverflowing({ enabled: oneLine === true });
|
|
27
25
|
const finalStringChildren = recursivelyGetChildrenString(children);
|
|
28
26
|
return /* @__PURE__ */ jsx(Tooltip, {
|
|
29
|
-
text:
|
|
27
|
+
text: isOverflowing ? finalStringChildren : "",
|
|
30
28
|
children: /* @__PURE__ */ jsx(Component, {
|
|
31
29
|
role,
|
|
32
30
|
"aria-hidden": ariaHidden,
|
|
@@ -44,7 +42,7 @@ function init_Text() {
|
|
|
44
42
|
dir,
|
|
45
43
|
htmlFor,
|
|
46
44
|
id,
|
|
47
|
-
ref:
|
|
45
|
+
ref: setElement,
|
|
48
46
|
style: _objectSpread2(_objectSpread2({}, assignInlineVars(textVars, {
|
|
49
47
|
textAlign: placement !== null && placement !== void 0 ? placement : "",
|
|
50
48
|
whiteSpace: whiteSpace !== null && whiteSpace !== void 0 ? whiteSpace : ""
|
|
@@ -1,54 +1,7 @@
|
|
|
1
1
|
import type { TextStyleObject } from '@ultraviolet/themes';
|
|
2
|
-
import type { RecipeVariants } from '@vanilla-extract/recipes';
|
|
3
2
|
type StyleText = Omit<TextStyleObject, 'paragraphSpacing' | 'textCase' | 'textDecoration' | 'weight'> & {
|
|
4
3
|
textTransform: string;
|
|
5
4
|
};
|
|
6
|
-
declare const text: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
7
|
-
disabled: {
|
|
8
|
-
true: {};
|
|
9
|
-
};
|
|
10
|
-
italic: {
|
|
11
|
-
true: {
|
|
12
|
-
fontStyle: "italic";
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
oneLine: {
|
|
16
|
-
true: {
|
|
17
|
-
overflow: "hidden";
|
|
18
|
-
textOverflow: "ellipsis";
|
|
19
|
-
whiteSpace: "nowrap";
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
prominence: {
|
|
23
|
-
default: {};
|
|
24
|
-
strong: {};
|
|
25
|
-
stronger: {};
|
|
26
|
-
weak: {};
|
|
27
|
-
};
|
|
28
|
-
sentiment: {
|
|
29
|
-
black: {};
|
|
30
|
-
danger: {};
|
|
31
|
-
info: {};
|
|
32
|
-
neutral: {};
|
|
33
|
-
primary: {};
|
|
34
|
-
secondary: {};
|
|
35
|
-
success: {};
|
|
36
|
-
warning: {};
|
|
37
|
-
white: {};
|
|
38
|
-
};
|
|
39
|
-
strikeThrough: {
|
|
40
|
-
true: {
|
|
41
|
-
textDecoration: "line-through";
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
underline: {
|
|
45
|
-
true: {
|
|
46
|
-
textDecoration: "underline";
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
variant: Record<"body" | "bodySmall" | "bodySmallStrong" | "bodySmallStronger" | "bodyStrong" | "bodyStronger" | "caption" | "captionSmall" | "captionSmallStrong" | "captionSmallStronger" | "captionStrong" | "captionStronger" | "code" | "codeSmall" | "codeSmallStrong" | "codeSmallStronger" | "codeStrong" | "codeStronger" | "heading" | "headingLarge" | "headingLargeStrong" | "headingLargeStronger" | "headingSmall" | "headingSmallStrong" | "headingSmallStronger" | "headingStrong" | "headingStronger", StyleText>;
|
|
50
|
-
}>;
|
|
51
|
-
export type TextVariants = NonNullable<RecipeVariants<typeof text>>;
|
|
52
5
|
export declare const textStyle: {
|
|
53
6
|
text: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
54
7
|
disabled: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.css.d.ts","sourceRoot":"","sources":["../../../src/components/Text/style.css.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,eAAe,EAAe,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"style.css.d.ts","sourceRoot":"","sources":["../../../src/components/Text/style.css.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,eAAe,EAAe,MAAM,qBAAqB,CAAA;AAyBtF,KAAK,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,kBAAkB,GAAG,UAAU,GAAG,gBAAgB,GAAG,QAAQ,CAAC,GAAG;IACtG,aAAa,EAAE,MAAM,CAAA;CACtB,CAAA;AAoJD,eAAO,MAAM,SAAS;;;YA/ChB,IAAI;;;;;;;;;;;;;;;YAeJ,OAAO;YACP,MAAM;YACN,QAAQ;YACR,IAAI;;;YAGJ,KAAK;YACL,MAAM;YACN,IAAI;YACJ,OAAO;YACP,OAAO;YACP,SAAS;YACT,OAAO;YACP,OAAO;YACP,KAAK;;;;;;;;;;;;;;;CAkB+B,CAAA"}
|
|
@@ -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 { Stack, init_Stack } from "../Stack/index.js";
|
|
5
5
|
import { Tooltip, init_Tooltip } from "../Tooltip/index.js";
|
|
6
6
|
import { Button, init_Button } from "../Button/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 { Stack, init_Stack } from "../Stack/index.js";
|
|
5
5
|
import { Text, init_Text } from "../Text/index.js";
|
|
6
6
|
import { hasHelperText, init_hasHelperText } from "../../helpers/hasHelperText.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 { CloseButton, init_CloseButton } from "./components/CloseButton.js";
|
|
5
5
|
import { Content, init_Content } from "./components/Content.js";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -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 { Button, init_Button as init_Button$1 } from "../../Button/index.js";
|
|
6
6
|
import { init_styles_css, toasterStyle } from "../styles.css.js";
|
|
7
7
|
import { cn } from "@ultraviolet/utils";
|
|
@@ -1,9 +1,9 @@
|
|
|
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 { Link, init_Link as init_Link$1 } from "../../Link/index.js";
|
|
5
|
-
import _objectDestructuringEmpty, { init_objectDestructuringEmpty } from "../../../_virtual/_@oxc-project_runtime@0.
|
|
6
|
-
import _extends, { init_extends } from "../../../_virtual/_@oxc-project_runtime@0.
|
|
5
|
+
import _objectDestructuringEmpty, { init_objectDestructuringEmpty } from "../../../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectDestructuringEmpty.js";
|
|
6
|
+
import _extends, { init_extends } from "../../../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/extends.js";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
|
|
9
9
|
//#region src/components/Toaster/components/Link.tsx
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TooltipProps } from '.';
|
|
2
|
+
import type { useTooltip } from './useTooltip';
|
|
3
|
+
type TooltipChildrenProps = {
|
|
4
|
+
tooltip: ReturnType<typeof useTooltip>;
|
|
5
|
+
tooltipId: string;
|
|
6
|
+
isTooltipVisible: boolean;
|
|
7
|
+
} & Pick<TooltipProps, 'children' | 'tabIndex' | 'relation' | 'containerFullHeight' | 'containerFullWidth'>;
|
|
8
|
+
export declare const TooltipChildren: ({ children, tooltip, tooltipId, tabIndex, relation, isTooltipVisible, containerFullHeight, containerFullWidth, }: TooltipChildrenProps) => string | number | bigint | boolean | import("react").JSX.Element | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | Iterable<import("react").ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null | undefined;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=TooltipChildren.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TooltipChildren.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/TooltipChildren.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,GAAG,CAAA;AACrC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAqB9C,KAAK,oBAAoB,GAAG;IAC1B,OAAO,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAA;IACtC,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB,EAAE,OAAO,CAAA;CAC1B,GAAG,IAAI,CAAC,YAAY,EAAE,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,qBAAqB,GAAG,oBAAoB,CAAC,CAAA;AAE3G,eAAO,MAAM,eAAe,qHASzB,oBAAoB,gWA4DtB,CAAA"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { __esmMin, __name } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import _objectSpread2, { init_objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
3
|
+
import { init_styles_css, tooltipStyle } from "./styles.css.js";
|
|
4
|
+
import { useEffect, useRef } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/Tooltip/TooltipChildren.tsx
|
|
8
|
+
var FOCUSABLE_ELEMENTS, TooltipChildren;
|
|
9
|
+
function init_TooltipChildren() {
|
|
10
|
+
return (init_TooltipChildren = __esmMin(() => {
|
|
11
|
+
init_styles_css();
|
|
12
|
+
init_objectSpread2();
|
|
13
|
+
FOCUSABLE_ELEMENTS = `
|
|
14
|
+
:is(
|
|
15
|
+
a[href],
|
|
16
|
+
button,
|
|
17
|
+
input:not([type="hidden"]),
|
|
18
|
+
select,
|
|
19
|
+
textarea,
|
|
20
|
+
[tabindex],
|
|
21
|
+
[contenteditable="true"],
|
|
22
|
+
details,
|
|
23
|
+
summary,
|
|
24
|
+
audio[controls],
|
|
25
|
+
video[controls]
|
|
26
|
+
)
|
|
27
|
+
:not([disabled])
|
|
28
|
+
:not([tabindex="-1"])
|
|
29
|
+
`.replace(/\s+/g, "");
|
|
30
|
+
TooltipChildren = ({ children, tooltip, tooltipId, tabIndex = 0, relation, isTooltipVisible, containerFullHeight, containerFullWidth }) => {
|
|
31
|
+
const eventHandlers = tooltip.getReferenceProps();
|
|
32
|
+
const ariaAttributeName = relation === "label" ? "aria-labelledby" : "aria-describedby";
|
|
33
|
+
const ariaAttributeValue = isTooltipVisible ? tooltipId : null;
|
|
34
|
+
const tooltipWrapperRef = useRef(null);
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
if (!tooltipWrapperRef.current) return;
|
|
37
|
+
const reference = tooltipWrapperRef.current.querySelector(FOCUSABLE_ELEMENTS) || tooltipWrapperRef.current;
|
|
38
|
+
const existingAriaValue = reference.getAttribute(ariaAttributeName);
|
|
39
|
+
tooltip.refs.setReference(reference);
|
|
40
|
+
const clearAriaAttribute = () => {
|
|
41
|
+
if (existingAriaValue) reference.setAttribute(ariaAttributeName, existingAriaValue);
|
|
42
|
+
else reference.removeAttribute(ariaAttributeName);
|
|
43
|
+
};
|
|
44
|
+
if (ariaAttributeValue) reference.setAttribute(ariaAttributeName, [existingAriaValue, ariaAttributeValue].join(" ").trim());
|
|
45
|
+
else clearAriaAttribute();
|
|
46
|
+
if (reference === tooltipWrapperRef.current && tooltipWrapperRef.current.tabIndex !== tabIndex) tooltipWrapperRef.current.tabIndex = tabIndex;
|
|
47
|
+
return clearAriaAttribute;
|
|
48
|
+
}, [
|
|
49
|
+
tooltip,
|
|
50
|
+
tabIndex,
|
|
51
|
+
ariaAttributeName,
|
|
52
|
+
ariaAttributeValue
|
|
53
|
+
]);
|
|
54
|
+
if (typeof children === "function") return children(_objectSpread2(_objectSpread2({}, eventHandlers), {}, {
|
|
55
|
+
[ariaAttributeName]: ariaAttributeValue,
|
|
56
|
+
ref: tooltip.refs.setReference
|
|
57
|
+
}));
|
|
58
|
+
return /* @__PURE__ */ jsx("div", _objectSpread2(_objectSpread2({
|
|
59
|
+
ref: tooltipWrapperRef,
|
|
60
|
+
className: tooltipStyle.childrenContainer({
|
|
61
|
+
fullHeight: containerFullHeight,
|
|
62
|
+
fullWidth: containerFullWidth
|
|
63
|
+
})
|
|
64
|
+
}, eventHandlers), {}, { children }));
|
|
65
|
+
};
|
|
66
|
+
}))();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
//#endregion
|
|
70
|
+
init_TooltipChildren();
|
|
71
|
+
export { TooltipChildren, init_TooltipChildren };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TooltipProps } from '.';
|
|
2
|
+
import type { useTooltip } from './useTooltip';
|
|
3
|
+
type TooltipElementProps = Pick<TooltipProps, 'id' | 'className' | 'style' | 'data-testid' | 'maxWidth' | 'text'> & {
|
|
4
|
+
tooltip: ReturnType<typeof useTooltip>;
|
|
5
|
+
};
|
|
6
|
+
export declare const TooltipElement: ({ tooltip, id, className, style, 'data-testid': dataTestId, maxWidth, text, }: TooltipElementProps) => import("react").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=TooltipElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TooltipElement.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/TooltipElement.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,GAAG,CAAA;AACrC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAI9C,KAAK,mBAAmB,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,GAAG,WAAW,GAAG,OAAO,GAAG,aAAa,GAAG,UAAU,GAAG,MAAM,CAAC,GAAG;IAClH,OAAO,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAA;CACvC,CAAA;AAED,eAAO,MAAM,cAAc,kFAQxB,mBAAmB,gCAyBrB,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __esmMin, __name } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import _objectSpread2, { init_objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
3
|
+
import { init_styles_css, tooltipStyle } from "./styles.css.js";
|
|
4
|
+
import { init_styles_css as init_styles_css$1, visuallyHiddenStyle } from "../VisuallyHidden/styles.css.js";
|
|
5
|
+
import { cn } from "@ultraviolet/utils";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/components/Tooltip/TooltipElement.tsx
|
|
9
|
+
var TooltipElement;
|
|
10
|
+
function init_TooltipElement() {
|
|
11
|
+
return (init_TooltipElement = __esmMin(() => {
|
|
12
|
+
init_styles_css$1();
|
|
13
|
+
init_styles_css();
|
|
14
|
+
init_objectSpread2();
|
|
15
|
+
TooltipElement = ({ tooltip, id, className, style, "data-testid": dataTestId, maxWidth, text }) => {
|
|
16
|
+
return /* @__PURE__ */ jsxs("div", _objectSpread2(_objectSpread2({}, tooltip.getFloatingProps()), {}, {
|
|
17
|
+
id,
|
|
18
|
+
className: cn(className, tooltipStyle.tooltip, tooltip.isMounted ? null : visuallyHiddenStyle.visuallyHidden, tooltip.status === "open" || tooltip.status === "close" ? tooltipStyle.animation[tooltip.status] : null),
|
|
19
|
+
"data-placement": tooltip.finalPlacement,
|
|
20
|
+
"data-testid": dataTestId,
|
|
21
|
+
ref: tooltip.refs.setFloating,
|
|
22
|
+
role: "tooltip",
|
|
23
|
+
style: _objectSpread2(_objectSpread2({}, tooltip.floatingStyles), {}, { maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth }, style),
|
|
24
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
25
|
+
className: tooltipStyle.arrow,
|
|
26
|
+
ref: tooltip.arrowRef,
|
|
27
|
+
style: tooltip.arrowStyle
|
|
28
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
29
|
+
className: tooltipStyle.content,
|
|
30
|
+
children: text
|
|
31
|
+
})]
|
|
32
|
+
}));
|
|
33
|
+
};
|
|
34
|
+
}))();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
init_TooltipElement();
|
|
39
|
+
export { TooltipElement, init_TooltipElement };
|