@payfit/unity-components 0.0.0-alpha.12 → 0.0.0-alpha.13
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/cjs/components/button/Button.d.cts +5 -2
- package/dist/cjs/components/checkbox/Checkbox.variants.cjs +1 -1
- package/dist/cjs/components/data-table/DataTable.cjs +1 -1
- package/dist/cjs/components/data-table/DataTable.d.cts +3 -6
- package/dist/cjs/components/date-calendar/DateCalendar.cjs +1 -0
- package/dist/cjs/components/date-calendar/DateCalendar.d.cts +23 -0
- package/dist/cjs/components/date-calendar/hooks/useMonthsList.d.cts +4 -0
- package/dist/cjs/components/date-calendar/hooks/useYearsList.d.cts +10 -0
- package/dist/cjs/components/date-picker/DatePicker.cjs +1 -1
- package/dist/cjs/components/date-picker/DatePicker.d.cts +3 -3
- package/dist/cjs/components/definition-tooltip/DefinitionTooltip.cjs +1 -0
- package/dist/cjs/components/definition-tooltip/DefinitionTooltip.d.cts +23 -0
- package/dist/cjs/components/dialog/parts/DialogActions/DialogButton.cjs +1 -1
- package/dist/cjs/components/dialog/parts/DialogActions/DialogButton.d.cts +2 -2
- package/dist/cjs/components/icon-button/CircularIconButton.cjs +1 -1
- package/dist/cjs/components/icon-button/CircularIconButton.d.cts +0 -21
- package/dist/cjs/components/icon-button/IconButton.d.cts +1 -1
- package/dist/cjs/components/number-field/NumberField.cjs +1 -0
- package/dist/cjs/components/number-field/NumberField.d.cts +47 -0
- package/dist/cjs/components/number-input/NumberInput.cjs +1 -0
- package/dist/cjs/components/number-input/NumberInput.d.cts +216 -0
- package/dist/cjs/components/pagination/Pagination.cjs +1 -1
- package/dist/cjs/components/pagination/hooks/use-pagination.cjs +1 -1
- package/dist/cjs/components/pagination/hooks/use-pagination.d.cts +2 -1
- package/dist/cjs/components/popover/Popover.cjs +1 -1
- package/dist/cjs/components/popover/parts/PopoverHeader.cjs +1 -1
- package/dist/cjs/components/radio-button-group/parts/RadioButton.cjs +1 -1
- package/dist/cjs/components/select-field/test-utils.cjs +1 -0
- package/dist/cjs/components/selectable-button-group/SelectableButtonGroup.cjs +1 -1
- package/dist/cjs/components/selectable-button-group/SelectableButtonGroup.context.d.cts +5 -1
- package/dist/cjs/components/selectable-button-group/SelectableButtonGroup.d.cts +7 -1
- package/dist/cjs/components/selectable-button-group/parts/SelectableButton.cjs +1 -1
- package/dist/cjs/components/selectable-button-group/parts/SelectableButton.d.cts +35 -0
- package/dist/cjs/components/selectable-button-group-field/SelectableButtonGroupField.cjs +1 -0
- package/dist/cjs/components/selectable-button-group-field/SelectableButtonGroupField.d.cts +59 -0
- package/dist/cjs/components/side-panel/SidePanel.cjs +1 -1
- package/dist/cjs/components/side-panel/SidePanel.d.cts +6 -0
- package/dist/cjs/components/table/Table.cjs +1 -1
- package/dist/cjs/components/table/Table.d.cts +4 -0
- package/dist/cjs/components/table/parts/TableCell.cjs +1 -1
- package/dist/cjs/components/tabs/parts/NavigationButton.cjs +1 -1
- package/dist/cjs/components/tabs/parts/TabList.cjs +1 -1
- package/dist/cjs/components/text/Text.cjs +1 -1
- package/dist/cjs/components/text/Text.d.cts +1 -1
- package/dist/cjs/components/text/Text.variants.cjs +1 -1
- package/dist/cjs/components/text/Text.variants.d.cts +7 -0
- package/dist/cjs/components/tooltip/Tooltip.cjs +1 -1
- package/dist/cjs/components/tooltip/Tooltip.d.cts +4 -3
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.d.cts +5 -0
- package/dist/cjs/index.storybook-testing.d.cts +1 -0
- package/dist/cjs/storybook-testing.cjs +1 -1
- package/dist/esm/components/button/Button.d.ts +5 -2
- package/dist/esm/components/checkbox/Checkbox.variants.js +4 -4
- package/dist/esm/components/data-table/DataTable.d.ts +3 -6
- package/dist/esm/components/data-table/DataTable.js +61 -56
- package/dist/esm/components/date-calendar/DateCalendar.d.ts +23 -0
- package/dist/esm/components/{date-picker/parts → date-calendar}/DateCalendar.js +62 -60
- package/dist/esm/components/date-calendar/hooks/useMonthsList.d.ts +4 -0
- package/dist/esm/components/date-calendar/hooks/useYearsList.d.ts +10 -0
- package/dist/esm/components/date-picker/DatePicker.d.ts +3 -3
- package/dist/esm/components/date-picker/DatePicker.js +22 -22
- package/dist/esm/components/definition-tooltip/DefinitionTooltip.d.ts +23 -0
- package/dist/esm/components/definition-tooltip/DefinitionTooltip.js +29 -0
- package/dist/esm/components/dialog/parts/DialogActions/DialogButton.d.ts +2 -2
- package/dist/esm/components/dialog/parts/DialogActions/DialogButton.js +31 -27
- package/dist/esm/components/icon-button/CircularIconButton.d.ts +0 -21
- package/dist/esm/components/icon-button/CircularIconButton.js +23 -26
- package/dist/esm/components/icon-button/IconButton.d.ts +1 -1
- package/dist/esm/components/number-field/NumberField.d.ts +47 -0
- package/dist/esm/components/number-field/NumberField.js +71 -0
- package/dist/esm/components/number-input/NumberInput.d.ts +216 -0
- package/dist/esm/components/number-input/NumberInput.js +214 -0
- package/dist/esm/components/pagination/Pagination.js +17 -16
- package/dist/esm/components/pagination/hooks/use-pagination.d.ts +2 -1
- package/dist/esm/components/pagination/hooks/use-pagination.js +12 -11
- package/dist/esm/components/popover/Popover.js +25 -21
- package/dist/esm/components/popover/parts/PopoverHeader.js +17 -15
- package/dist/esm/components/radio-button-group/parts/RadioButton.js +1 -1
- package/dist/esm/components/select-field/test-utils.js +25 -0
- package/dist/esm/components/selectable-button-group/SelectableButtonGroup.context.d.ts +5 -1
- package/dist/esm/components/selectable-button-group/SelectableButtonGroup.d.ts +7 -1
- package/dist/esm/components/selectable-button-group/SelectableButtonGroup.js +23 -16
- package/dist/esm/components/selectable-button-group/parts/SelectableButton.d.ts +35 -0
- package/dist/esm/components/selectable-button-group/parts/SelectableButton.js +44 -36
- package/dist/esm/components/selectable-button-group-field/SelectableButtonGroupField.d.ts +59 -0
- package/dist/esm/components/selectable-button-group-field/SelectableButtonGroupField.js +45 -0
- package/dist/esm/components/side-panel/SidePanel.d.ts +6 -0
- package/dist/esm/components/side-panel/SidePanel.js +38 -35
- package/dist/esm/components/table/Table.d.ts +4 -0
- package/dist/esm/components/table/Table.js +96 -71
- package/dist/esm/components/table/parts/TableCell.js +5 -5
- package/dist/esm/components/tabs/parts/NavigationButton.js +4 -4
- package/dist/esm/components/tabs/parts/TabList.js +44 -35
- package/dist/esm/components/text/Text.d.ts +1 -1
- package/dist/esm/components/text/Text.js +6 -5
- package/dist/esm/components/text/Text.variants.d.ts +7 -0
- package/dist/esm/components/text/Text.variants.js +2 -1
- package/dist/esm/components/tooltip/Tooltip.d.ts +4 -3
- package/dist/esm/components/tooltip/Tooltip.js +13 -12
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.js +237 -225
- package/dist/esm/index.storybook-testing.d.ts +1 -0
- package/dist/esm/storybook-testing.js +3 -1
- package/i18n/en-GB.json +2 -0
- package/i18n/es-ES.json +2 -0
- package/i18n/fr-FR.json +2 -0
- package/package.json +7 -6
- package/dist/cjs/components/date-picker/parts/DateCalendar.cjs +0 -1
- package/dist/cjs/components/date-picker/parts/DateCalendar.d.cts +0 -9
- package/dist/cjs/components/popover/parts/PopoverContent.cjs +0 -1
- package/dist/esm/components/date-picker/parts/DateCalendar.d.ts +0 -9
- package/dist/esm/components/popover/parts/PopoverContent.js +0 -9
- /package/dist/cjs/components/{date-picker → date-calendar}/hooks/useMonthsList.cjs +0 -0
- /package/dist/cjs/components/{date-picker → date-calendar}/hooks/useYearsList.cjs +0 -0
- /package/dist/cjs/components/{date-picker → date-calendar}/parts/DateSegmentSelect.cjs +0 -0
- /package/dist/cjs/components/{date-picker → date-calendar}/parts/DateSegmentSelect.d.cts +0 -0
- /package/dist/esm/components/{date-picker → date-calendar}/hooks/useMonthsList.js +0 -0
- /package/dist/esm/components/{date-picker → date-calendar}/hooks/useYearsList.js +0 -0
- /package/dist/esm/components/{date-picker → date-calendar}/parts/DateSegmentSelect.d.ts +0 -0
- /package/dist/esm/components/{date-picker → date-calendar}/parts/DateSegmentSelect.js +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as x } from "react";
|
|
3
3
|
import { tv as g } from "tailwind-variants";
|
|
4
4
|
import { useTableContext as v } from "../Table.context.js";
|
|
5
5
|
const C = g({
|
|
6
6
|
base: [
|
|
7
|
-
"uy-px-200 uy-py-150 uy-
|
|
7
|
+
"uy-px-200 uy-py-150 uy-text-content-neutral uy-typography-body",
|
|
8
8
|
"focus-visible:uy-outline-2 focus-visible:-uy-outline-offset-2 focus-visible:uy-outline-utility-focus-ring"
|
|
9
9
|
],
|
|
10
10
|
variants: {
|
|
@@ -14,7 +14,7 @@ const C = g({
|
|
|
14
14
|
right: "uy-text-right"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
}), T =
|
|
17
|
+
}), T = x(
|
|
18
18
|
({
|
|
19
19
|
children: i,
|
|
20
20
|
colIndex: a = 0,
|
|
@@ -29,7 +29,7 @@ const C = g({
|
|
|
29
29
|
const { keyboardNavigation: c } = v(), { isCellFocused: f, handleCellKeyDown: b, handleCellFocus: d } = c, m = f(o, a), p = (e) => {
|
|
30
30
|
e.key !== "Tab" && (b(e), t == null || t(e));
|
|
31
31
|
};
|
|
32
|
-
return /* @__PURE__ */
|
|
32
|
+
return /* @__PURE__ */ h(
|
|
33
33
|
r ? "th" : "td",
|
|
34
34
|
{
|
|
35
35
|
ref: y,
|
|
@@ -11,14 +11,14 @@ const s = n({
|
|
|
11
11
|
variants: {
|
|
12
12
|
direction: {
|
|
13
13
|
left: {
|
|
14
|
-
base: "uy-top-0 uy-left-0 uy-z-10 uy-bg-gradient-to-r uy-from-surface-inverted/
|
|
14
|
+
base: "uy-top-0 uy-left-0 uy-z-10 uy-bg-gradient-to-r uy-from-surface-inverted/100 uy-to-surface-inverted/0 uy-pl-50 uy-pr-200"
|
|
15
15
|
},
|
|
16
16
|
right: {
|
|
17
|
-
base: "uy-right-0 uy-top-0 uy-z-10 uy-bg-gradient-to-l uy-from-surface-inverted/100 uy-
|
|
17
|
+
base: "uy-right-0 uy-top-0 uy-z-10 uy-bg-gradient-to-l uy-from-surface-inverted/100 uy-to-surface-inverted/0 uy-pl-200 uy-pr-50"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
}),
|
|
21
|
+
}), v = ({ direction: t, onPress: u }) => {
|
|
22
22
|
const { base: o, button: r, icon: l } = s({ direction: t });
|
|
23
23
|
return /* @__PURE__ */ e("div", { className: o(), children: /* @__PURE__ */ e(
|
|
24
24
|
i,
|
|
@@ -39,5 +39,5 @@ const s = n({
|
|
|
39
39
|
) });
|
|
40
40
|
};
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
v as NavigationButton
|
|
43
43
|
};
|
|
@@ -1,47 +1,56 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { TabList as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsxs as w, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as A, useRef as C, useState as L, useCallback as B } from "react";
|
|
3
|
+
import { TabList as y } from "react-aria-components";
|
|
4
|
+
import { useResizeObserver as j } from "usehooks-ts";
|
|
5
|
+
import { useTabsContext as q } from "../Tabs.context.js";
|
|
6
|
+
import { tabsVariant as z } from "../Tabs.variant.js";
|
|
7
|
+
import { NavigationButton as p } from "./NavigationButton.js";
|
|
8
|
+
const P = A(
|
|
9
|
+
({ children: f }, u) => {
|
|
10
|
+
const r = C(null), [g, S] = L(!1), [v, R] = L(!1), { variant: W, scrollable: b } = q(), { tabList: d } = z({ variant: W, scrollable: b }), m = B(() => {
|
|
11
|
+
if (!r.current) return;
|
|
12
|
+
const { scrollLeft: t, scrollWidth: s, clientWidth: e } = r.current;
|
|
13
|
+
S(t > 0), R(t + e < s);
|
|
14
|
+
}, []);
|
|
15
|
+
j({
|
|
16
|
+
ref: r,
|
|
17
|
+
onResize: m
|
|
18
|
+
});
|
|
19
|
+
const x = (t) => {
|
|
20
|
+
m();
|
|
21
|
+
}, N = () => {
|
|
22
|
+
var l;
|
|
23
|
+
const t = (l = r.current) == null ? void 0 : l.querySelectorAll("[role=tab]");
|
|
15
24
|
if (!r.current || !t) return 0;
|
|
16
|
-
const { scrollLeft:
|
|
17
|
-
for (let
|
|
18
|
-
const n =
|
|
19
|
-
if (n.offsetLeft <
|
|
25
|
+
const { scrollLeft: s } = r.current, e = Array.from(t);
|
|
26
|
+
for (let o = e.length - 1; o >= 0; o--) {
|
|
27
|
+
const n = e[o];
|
|
28
|
+
if (n.offsetLeft < s)
|
|
20
29
|
return -n.offsetWidth;
|
|
21
30
|
}
|
|
22
31
|
return 0;
|
|
23
|
-
},
|
|
32
|
+
}, T = () => {
|
|
24
33
|
var n;
|
|
25
|
-
const t = (n = r.current) == null ? void 0 : n.querySelectorAll("
|
|
34
|
+
const t = (n = r.current) == null ? void 0 : n.querySelectorAll("[role=tab]");
|
|
26
35
|
if (!r.current || !t) return 0;
|
|
27
|
-
const { scrollLeft:
|
|
28
|
-
for (let a = 0; a <
|
|
29
|
-
const i =
|
|
30
|
-
if (
|
|
36
|
+
const { scrollLeft: s, clientWidth: e } = r.current, l = Array.from(t), o = s + e;
|
|
37
|
+
for (let a = 0; a < l.length - 1; a++) {
|
|
38
|
+
const i = l[a], h = i.offsetLeft + i.offsetWidth;
|
|
39
|
+
if (h > o || h < o)
|
|
31
40
|
return i.offsetWidth;
|
|
32
41
|
}
|
|
33
42
|
return 0;
|
|
34
43
|
};
|
|
35
|
-
return
|
|
44
|
+
return b ? /* @__PURE__ */ w("div", { className: "uy-relative", children: [
|
|
36
45
|
g && /* @__PURE__ */ c(
|
|
37
|
-
|
|
46
|
+
p,
|
|
38
47
|
{
|
|
39
48
|
direction: "left",
|
|
40
49
|
onPress: () => {
|
|
41
50
|
var t;
|
|
42
51
|
(t = r.current) == null || t.scrollBy({
|
|
43
52
|
behavior: "smooth",
|
|
44
|
-
left:
|
|
53
|
+
left: N()
|
|
45
54
|
});
|
|
46
55
|
}
|
|
47
56
|
}
|
|
@@ -52,27 +61,27 @@ const C = T(
|
|
|
52
61
|
ref: r,
|
|
53
62
|
"data-testid": "scrollable-tab-list",
|
|
54
63
|
className: "uy-overflow-x-auto uy-overflow-y-hidden uy-border-b-[1.25px] uy-border-solid uy-border-b-border-form-enabled",
|
|
55
|
-
onScroll:
|
|
56
|
-
children: /* @__PURE__ */ c(
|
|
64
|
+
onScroll: x,
|
|
65
|
+
children: /* @__PURE__ */ c(y, { ref: u, className: d(), children: f })
|
|
57
66
|
}
|
|
58
67
|
),
|
|
59
|
-
|
|
60
|
-
|
|
68
|
+
v && /* @__PURE__ */ c(
|
|
69
|
+
p,
|
|
61
70
|
{
|
|
62
71
|
direction: "right",
|
|
63
72
|
onPress: () => {
|
|
64
73
|
var t;
|
|
65
74
|
(t = r.current) == null || t.scrollBy({
|
|
66
75
|
behavior: "smooth",
|
|
67
|
-
left:
|
|
76
|
+
left: T()
|
|
68
77
|
});
|
|
69
78
|
}
|
|
70
79
|
}
|
|
71
80
|
)
|
|
72
|
-
] }) : /* @__PURE__ */ c(
|
|
81
|
+
] }) : /* @__PURE__ */ c(y, { ref: u, className: d(), children: f });
|
|
73
82
|
}
|
|
74
83
|
);
|
|
75
|
-
|
|
84
|
+
P.displayName = "TabList";
|
|
76
85
|
export {
|
|
77
|
-
|
|
86
|
+
P as TabList
|
|
78
87
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
2
|
import { VariantProps } from 'tailwind-variants';
|
|
3
3
|
import { text } from './Text.variants.js';
|
|
4
|
-
type ValidTextElements = 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'em' | 'strong' | 'small';
|
|
4
|
+
export type ValidTextElements = 'p' | 'span' | 'div' | 'abbr' | 'dfn' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'em' | 'strong' | 'small';
|
|
5
5
|
export type TextProps = PropsWithChildren<HTMLAttributes<HTMLSpanElement> & {
|
|
6
6
|
/**
|
|
7
7
|
* The HTML element to render the text as. Defaults to a recommended element based on the variant.
|
|
@@ -19,27 +19,28 @@ const y = {
|
|
|
19
19
|
bodyLargeStrong: "strong",
|
|
20
20
|
action: "span",
|
|
21
21
|
actionLarge: "span",
|
|
22
|
-
actionSmall: "span"
|
|
22
|
+
actionSmall: "span",
|
|
23
|
+
actionInfo: "span"
|
|
23
24
|
}, g = c(
|
|
24
25
|
({
|
|
25
26
|
children: e,
|
|
26
27
|
variant: o,
|
|
27
|
-
color:
|
|
28
|
+
color: n,
|
|
28
29
|
isTruncated: a,
|
|
29
30
|
lineClamp: t,
|
|
30
|
-
asElement:
|
|
31
|
+
asElement: s,
|
|
31
32
|
className: r,
|
|
32
33
|
...l
|
|
33
34
|
}, i) => {
|
|
34
35
|
const m = h({
|
|
35
36
|
variant: o,
|
|
36
|
-
color:
|
|
37
|
+
color: n,
|
|
37
38
|
isTruncated: a,
|
|
38
39
|
isLineClamped: t !== void 0,
|
|
39
40
|
className: r
|
|
40
41
|
}), p = y[o ?? "inherit"];
|
|
41
42
|
return /* @__PURE__ */ d(
|
|
42
|
-
|
|
43
|
+
s ?? p,
|
|
43
44
|
{
|
|
44
45
|
"data-dd-privacy": "mask",
|
|
45
46
|
...l,
|
|
@@ -18,6 +18,7 @@ export declare const text: import('tailwind-variants').TVReturnType<{
|
|
|
18
18
|
action: string;
|
|
19
19
|
actionLarge: string;
|
|
20
20
|
actionSmall: string;
|
|
21
|
+
actionInfo: string;
|
|
21
22
|
};
|
|
22
23
|
color: {
|
|
23
24
|
inherit: string;
|
|
@@ -114,6 +115,7 @@ export declare const text: import('tailwind-variants').TVReturnType<{
|
|
|
114
115
|
action: string;
|
|
115
116
|
actionLarge: string;
|
|
116
117
|
actionSmall: string;
|
|
118
|
+
actionInfo: string;
|
|
117
119
|
};
|
|
118
120
|
color: {
|
|
119
121
|
inherit: string;
|
|
@@ -210,6 +212,7 @@ export declare const text: import('tailwind-variants').TVReturnType<{
|
|
|
210
212
|
action: string;
|
|
211
213
|
actionLarge: string;
|
|
212
214
|
actionSmall: string;
|
|
215
|
+
actionInfo: string;
|
|
213
216
|
};
|
|
214
217
|
color: {
|
|
215
218
|
inherit: string;
|
|
@@ -306,6 +309,7 @@ export declare const text: import('tailwind-variants').TVReturnType<{
|
|
|
306
309
|
action: string;
|
|
307
310
|
actionLarge: string;
|
|
308
311
|
actionSmall: string;
|
|
312
|
+
actionInfo: string;
|
|
309
313
|
};
|
|
310
314
|
color: {
|
|
311
315
|
inherit: string;
|
|
@@ -402,6 +406,7 @@ export declare const text: import('tailwind-variants').TVReturnType<{
|
|
|
402
406
|
action: string;
|
|
403
407
|
actionLarge: string;
|
|
404
408
|
actionSmall: string;
|
|
409
|
+
actionInfo: string;
|
|
405
410
|
};
|
|
406
411
|
color: {
|
|
407
412
|
inherit: string;
|
|
@@ -498,6 +503,7 @@ export declare const text: import('tailwind-variants').TVReturnType<{
|
|
|
498
503
|
action: string;
|
|
499
504
|
actionLarge: string;
|
|
500
505
|
actionSmall: string;
|
|
506
|
+
actionInfo: string;
|
|
501
507
|
};
|
|
502
508
|
color: {
|
|
503
509
|
inherit: string;
|
|
@@ -594,6 +600,7 @@ export declare const text: import('tailwind-variants').TVReturnType<{
|
|
|
594
600
|
action: string;
|
|
595
601
|
actionLarge: string;
|
|
596
602
|
actionSmall: string;
|
|
603
|
+
actionInfo: string;
|
|
597
604
|
};
|
|
598
605
|
color: {
|
|
599
606
|
inherit: string;
|
|
@@ -20,7 +20,8 @@ const n = t({
|
|
|
20
20
|
bodyLargeStrong: "uy-typography-body-large-strong",
|
|
21
21
|
action: "uy-typography-action",
|
|
22
22
|
actionLarge: "uy-typography-body-large",
|
|
23
|
-
actionSmall: "uy-typography-body-small"
|
|
23
|
+
actionSmall: "uy-typography-body-small",
|
|
24
|
+
actionInfo: "uy-typography-action uy-underline uy-decoration-dotted uy-decoration-[10%] uy-underline-offset-[25%]"
|
|
24
25
|
},
|
|
25
26
|
color: {
|
|
26
27
|
inherit: "uy-text-inherit",
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
interface TooltipProps {
|
|
2
|
+
export interface TooltipProps {
|
|
3
|
+
/** The content displayed in the tooltip. */
|
|
3
4
|
title: string;
|
|
5
|
+
/** The trigger element that displays the tooltip. */
|
|
4
6
|
children: ReactElement;
|
|
5
7
|
}
|
|
6
|
-
declare
|
|
7
|
-
export { Tooltip };
|
|
8
|
+
export declare const Tooltip: import('react').ForwardRefExoticComponent<TooltipProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { forwardRef as y } from "react";
|
|
3
|
+
import { TooltipTrigger as a, Tooltip as p, Button as u } from "react-aria-components";
|
|
4
|
+
import { Button as i } from "../button/Button.js";
|
|
5
|
+
const s = (o) => o.type === i || o.type === u, f = y(
|
|
6
|
+
({ title: o, children: t }, r) => /* @__PURE__ */ l(a, { delay: 500, closeDelay: 1500, children: [
|
|
7
|
+
t,
|
|
8
8
|
/* @__PURE__ */ e(
|
|
9
|
-
|
|
9
|
+
p,
|
|
10
10
|
{
|
|
11
|
+
ref: r,
|
|
11
12
|
"data-dd-privacy": "allow",
|
|
12
|
-
offset:
|
|
13
|
+
offset: s(t) ? 4 : 8,
|
|
13
14
|
className: "uy-inline-flex uy-rounded-50 uy-pl-100 uy-pr-100 uy-pt-50 uy-pb-50 uy-bg-grayscale-L12 uy-max-w-[300px]",
|
|
14
|
-
children: /* @__PURE__ */ e("p", { className: "uy-typography-body-small uy-text-content-inverted uy-overflow-hidden uy-text-ellipsis uy-line-clamp-3", children:
|
|
15
|
+
children: /* @__PURE__ */ e("p", { className: "uy-typography-body-small uy-text-content-inverted uy-overflow-hidden uy-text-ellipsis uy-line-clamp-3", children: o })
|
|
15
16
|
}
|
|
16
17
|
)
|
|
17
|
-
] })
|
|
18
|
-
|
|
18
|
+
] })
|
|
19
|
+
);
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
+
f as Tooltip
|
|
21
22
|
};
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -60,6 +60,7 @@ export * from './components/grid/Grid.variants.js';
|
|
|
60
60
|
export * from './components/grid/GridItem.js';
|
|
61
61
|
export * from './components/icon/Icon.js';
|
|
62
62
|
export * from './components/icon-button/IconButton.js';
|
|
63
|
+
export * from './components/definition-tooltip/DefinitionTooltip.js';
|
|
63
64
|
export * from './components/input/Input.js';
|
|
64
65
|
export * from './components/label/Label.js';
|
|
65
66
|
export * from './components/link/Link.js';
|
|
@@ -83,6 +84,8 @@ export * from './components/pagination/Pagination.js';
|
|
|
83
84
|
export * from './components/payfit-brand/PayFitBrand.js';
|
|
84
85
|
export * from './components/payfit-brand/PayFitPreprod.js';
|
|
85
86
|
export * from './components/pill/Pill.js';
|
|
87
|
+
export * from './components/number-field/NumberField.js';
|
|
88
|
+
export * from './components/number-input/NumberInput.js';
|
|
86
89
|
export * from './components/popover/Popover.js';
|
|
87
90
|
export * from './components/progress-bar/ProgressBar.js';
|
|
88
91
|
export * from './components/radio-button-group/RadioButtonGroup.js';
|
|
@@ -140,3 +143,5 @@ export * from './components/toggle-switch/ToggleSwitch.js';
|
|
|
140
143
|
export * from './components/toggle-switch-group/ToggleSwitchGroup.js';
|
|
141
144
|
export * from './components/toggle-switch-field/ToggleSwitchField.js';
|
|
142
145
|
export * from './components/toggle-switch-group-field/ToggleSwitchGroupField.js';
|
|
146
|
+
export * from './components/selectable-button-group-field/SelectableButtonGroupField.js';
|
|
147
|
+
export * from './components/date-calendar/DateCalendar.js';
|