@udixio/ui-react 2.9.13 → 2.9.15
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/CHANGELOG.md +40 -0
- package/dist/index.cjs +3 -3
- package/dist/index.js +4348 -3781
- package/dist/lib/components/AnchorPositioner.d.ts +11 -0
- package/dist/lib/components/AnchorPositioner.d.ts.map +1 -0
- package/dist/lib/components/Button.d.ts.map +1 -1
- package/dist/lib/components/Card.d.ts +2 -2
- package/dist/lib/components/Card.d.ts.map +1 -1
- package/dist/lib/components/Checkbox.d.ts +15 -0
- package/dist/lib/components/Checkbox.d.ts.map +1 -0
- package/dist/lib/components/DatePicker.d.ts +9 -0
- package/dist/lib/components/DatePicker.d.ts.map +1 -0
- package/dist/lib/components/FabMenu.d.ts.map +1 -1
- package/dist/lib/components/IconButton.d.ts.map +1 -1
- package/dist/lib/components/TabGroup.d.ts +1 -0
- package/dist/lib/components/TabGroup.d.ts.map +1 -1
- package/dist/lib/components/TabGroupContext.d.ts +1 -0
- package/dist/lib/components/TabGroupContext.d.ts.map +1 -1
- package/dist/lib/components/TabPanel.d.ts +1 -0
- package/dist/lib/components/TabPanel.d.ts.map +1 -1
- package/dist/lib/components/TabPanels.d.ts +1 -0
- package/dist/lib/components/TabPanels.d.ts.map +1 -1
- package/dist/lib/components/TextField.d.ts +4 -5
- package/dist/lib/components/TextField.d.ts.map +1 -1
- package/dist/lib/components/Tooltip.d.ts +1 -1
- package/dist/lib/components/Tooltip.d.ts.map +1 -1
- package/dist/lib/components/index.d.ts +3 -0
- package/dist/lib/components/index.d.ts.map +1 -1
- package/dist/lib/effects/State.d.ts +3 -1
- package/dist/lib/effects/State.d.ts.map +1 -1
- package/dist/lib/effects/smooth-scroll.effect.d.ts +14 -0
- package/dist/lib/effects/smooth-scroll.effect.d.ts.map +1 -1
- package/dist/lib/hooks/index.d.ts +0 -1
- package/dist/lib/hooks/index.d.ts.map +1 -1
- package/dist/lib/interfaces/card.interface.d.ts +1 -1
- package/dist/lib/interfaces/card.interface.d.ts.map +1 -1
- package/dist/lib/interfaces/checkbox.interface.d.ts +38 -0
- package/dist/lib/interfaces/checkbox.interface.d.ts.map +1 -0
- package/dist/lib/interfaces/date-picker.interface.d.ts +67 -0
- package/dist/lib/interfaces/date-picker.interface.d.ts.map +1 -0
- package/dist/lib/interfaces/icon-button.interface.d.ts +2 -1
- package/dist/lib/interfaces/icon-button.interface.d.ts.map +1 -1
- package/dist/lib/interfaces/index.d.ts +1 -0
- package/dist/lib/interfaces/index.d.ts.map +1 -1
- package/dist/lib/interfaces/text-field.interface.d.ts +8 -5
- package/dist/lib/interfaces/text-field.interface.d.ts.map +1 -1
- package/dist/lib/interfaces/tooltip.interface.d.ts +2 -0
- package/dist/lib/interfaces/tooltip.interface.d.ts.map +1 -1
- package/dist/lib/styles/card.style.d.ts +5 -5
- package/dist/lib/styles/checkbox.style.d.ts +45 -0
- package/dist/lib/styles/checkbox.style.d.ts.map +1 -0
- package/dist/lib/styles/date-picker.style.d.ts +45 -0
- package/dist/lib/styles/date-picker.style.d.ts.map +1 -0
- package/dist/lib/styles/fab.style.d.ts +2 -2
- package/dist/lib/styles/icon-button.style.d.ts +10 -4
- package/dist/lib/styles/icon-button.style.d.ts.map +1 -1
- package/dist/lib/styles/index.d.ts +1 -0
- package/dist/lib/styles/index.d.ts.map +1 -1
- package/dist/lib/styles/navigation-rail-item.style.d.ts +2 -2
- package/dist/lib/styles/side-sheet.style.d.ts +2 -2
- package/dist/lib/styles/slider.style.d.ts +2 -2
- package/dist/lib/styles/tab.style.d.ts +2 -2
- package/dist/lib/styles/text-field.style.d.ts +22 -13
- package/dist/lib/styles/text-field.style.d.ts.map +1 -1
- package/dist/lib/styles/tooltip.style.d.ts +8 -4
- package/dist/lib/styles/tooltip.style.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/lib/components/AnchorPositioner.tsx +132 -0
- package/src/lib/components/Button.tsx +1 -0
- package/src/lib/components/Card.tsx +9 -4
- package/src/lib/components/Checkbox.tsx +120 -0
- package/src/lib/components/DatePicker.tsx +432 -0
- package/src/lib/components/FabMenu.tsx +4 -5
- package/src/lib/components/IconButton.tsx +9 -7
- package/src/lib/components/TabGroup.tsx +8 -6
- package/src/lib/components/TabGroupContext.tsx +1 -1
- package/src/lib/components/TabPanel.tsx +1 -0
- package/src/lib/components/TabPanels.tsx +1 -0
- package/src/lib/components/TextField.tsx +222 -123
- package/src/lib/components/Tooltip.tsx +13 -13
- package/src/lib/components/index.ts +3 -0
- package/src/lib/effects/State.tsx +4 -1
- package/src/lib/effects/smooth-scroll.effect.tsx +15 -1
- package/src/lib/hooks/index.ts +0 -1
- package/src/lib/interfaces/card.interface.ts +1 -1
- package/src/lib/interfaces/checkbox.interface.ts +39 -0
- package/src/lib/interfaces/date-picker.interface.ts +79 -0
- package/src/lib/interfaces/icon-button.interface.ts +2 -1
- package/src/lib/interfaces/index.ts +1 -0
- package/src/lib/interfaces/text-field.interface.ts +8 -5
- package/src/lib/interfaces/tooltip.interface.ts +2 -0
- package/src/lib/styles/checkbox.style.ts +64 -0
- package/src/lib/styles/date-picker.style.ts +43 -0
- package/src/lib/styles/index.ts +1 -0
- package/src/lib/styles/side-sheet.style.ts +2 -2
- package/src/lib/styles/text-field.style.ts +2 -2
- package/src/stories/containment/card.stories.tsx +1 -1
- package/dist/lib/hooks/useTooltipPosition.d.ts +0 -22
- package/dist/lib/hooks/useTooltipPosition.d.ts.map +0 -1
- package/src/lib/hooks/useTooltipPosition.ts +0 -95
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ClassNameComponent } from '../utils';
|
|
2
|
+
import { DatePickerInterface } from '../interfaces/date-picker.interface';
|
|
3
|
+
export declare const datePickerStyle: (states: {
|
|
4
|
+
mode: any;
|
|
5
|
+
value: any;
|
|
6
|
+
defaultValue: any;
|
|
7
|
+
onChange: any;
|
|
8
|
+
minDate: any;
|
|
9
|
+
maxDate: any;
|
|
10
|
+
shouldDisableDate: any;
|
|
11
|
+
locale: any;
|
|
12
|
+
weekStartDay: any;
|
|
13
|
+
className: any;
|
|
14
|
+
style: any;
|
|
15
|
+
} & {
|
|
16
|
+
mode?: "single" | "range";
|
|
17
|
+
value?: Date | import('../interfaces/date-picker.interface').DateRange | null;
|
|
18
|
+
defaultValue?: Date | import('../interfaces/date-picker.interface').DateRange | null;
|
|
19
|
+
onChange?: (value: any) => void;
|
|
20
|
+
minDate?: Date;
|
|
21
|
+
maxDate?: Date;
|
|
22
|
+
shouldDisableDate?: (date: Date) => boolean;
|
|
23
|
+
locale?: string;
|
|
24
|
+
weekStartDay?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
25
|
+
className?: string;
|
|
26
|
+
style?: React.CSSProperties;
|
|
27
|
+
} & import('../interfaces/date-picker.interface').DatePickerStates & {
|
|
28
|
+
className: string | ClassNameComponent<DatePickerInterface> | undefined;
|
|
29
|
+
}) => Record<"header" | "datePicker" | "monthNav" | "monthLabel" | "weekDays" | "weekDay" | "daysGrid" | "dayCell" | "dayButton", string>;
|
|
30
|
+
export declare const useDatePickerStyle: (states: import('../interfaces/date-picker.interface').DatePickerStates & {
|
|
31
|
+
mode?: "single" | "range";
|
|
32
|
+
value?: Date | import('../interfaces/date-picker.interface').DateRange | null;
|
|
33
|
+
defaultValue?: Date | import('../interfaces/date-picker.interface').DateRange | null;
|
|
34
|
+
onChange?: (value: any) => void;
|
|
35
|
+
minDate?: Date;
|
|
36
|
+
maxDate?: Date;
|
|
37
|
+
shouldDisableDate?: (date: Date) => boolean;
|
|
38
|
+
locale?: string;
|
|
39
|
+
weekStartDay?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
40
|
+
className?: string;
|
|
41
|
+
style?: React.CSSProperties;
|
|
42
|
+
} & {
|
|
43
|
+
className?: string | ClassNameComponent<DatePickerInterface> | undefined;
|
|
44
|
+
}) => Record<"header" | "datePicker" | "monthNav" | "monthLabel" | "weekDays" | "weekDay" | "daysGrid" | "dayCell" | "dayButton", string>;
|
|
45
|
+
//# sourceMappingURL=date-picker.style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker.style.d.ts","sourceRoot":"","sources":["../../../src/lib/styles/date-picker.style.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EAIxB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AA4B1E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;yIAG3B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;yIAG9B,CAAC"}
|
|
@@ -40,7 +40,7 @@ export declare const fabStyle: (states: ({
|
|
|
40
40
|
href?: never;
|
|
41
41
|
})) & {
|
|
42
42
|
className: string | ClassNameComponent<FabInterface> | undefined;
|
|
43
|
-
})) => Record<"label" | "icon" | "
|
|
43
|
+
})) => Record<"label" | "icon" | "stateLayer" | "fab", string>;
|
|
44
44
|
export declare const useFabStyle: (states: (({
|
|
45
45
|
variant?: import('..').FabVariant;
|
|
46
46
|
label?: string;
|
|
@@ -63,5 +63,5 @@ export declare const useFabStyle: (states: (({
|
|
|
63
63
|
href?: never;
|
|
64
64
|
})) & {
|
|
65
65
|
className?: string | ClassNameComponent<FabInterface> | undefined;
|
|
66
|
-
}) => Record<"label" | "icon" | "
|
|
66
|
+
}) => Record<"label" | "icon" | "stateLayer" | "fab", string>;
|
|
67
67
|
//# sourceMappingURL=fab.style.d.ts.map
|
|
@@ -11,6 +11,7 @@ export declare const iconButtonStyle: (states: (({
|
|
|
11
11
|
variant: any;
|
|
12
12
|
disabled: any;
|
|
13
13
|
activated: any;
|
|
14
|
+
title: any;
|
|
14
15
|
shape: any;
|
|
15
16
|
allowShapeTransformation: any;
|
|
16
17
|
transition: any;
|
|
@@ -26,6 +27,7 @@ export declare const iconButtonStyle: (states: (({
|
|
|
26
27
|
variant: any;
|
|
27
28
|
disabled: any;
|
|
28
29
|
activated: any;
|
|
30
|
+
title: any;
|
|
29
31
|
shape: any;
|
|
30
32
|
allowShapeTransformation: any;
|
|
31
33
|
transition: any;
|
|
@@ -33,7 +35,7 @@ export declare const iconButtonStyle: (states: (({
|
|
|
33
35
|
}) & (({
|
|
34
36
|
label?: string;
|
|
35
37
|
children?: string;
|
|
36
|
-
icon
|
|
38
|
+
icon?: import('..').Icon;
|
|
37
39
|
size?: "xSmall" | "small" | "medium" | "large" | "xLarge";
|
|
38
40
|
width?: "default" | "narrow" | "wide";
|
|
39
41
|
iconSelected?: import('@fortawesome/fontawesome-svg-core').IconDefinition;
|
|
@@ -41,6 +43,7 @@ export declare const iconButtonStyle: (states: (({
|
|
|
41
43
|
variant?: import('..').IconButtonVariant;
|
|
42
44
|
disabled?: boolean;
|
|
43
45
|
activated?: boolean;
|
|
46
|
+
title?: string | null;
|
|
44
47
|
shape?: "squared" | "rounded";
|
|
45
48
|
allowShapeTransformation?: boolean;
|
|
46
49
|
transition?: import('motion').Transition;
|
|
@@ -49,7 +52,7 @@ export declare const iconButtonStyle: (states: (({
|
|
|
49
52
|
}) | ({
|
|
50
53
|
label?: string;
|
|
51
54
|
children?: string;
|
|
52
|
-
icon
|
|
55
|
+
icon?: import('..').Icon;
|
|
53
56
|
size?: "xSmall" | "small" | "medium" | "large" | "xLarge";
|
|
54
57
|
width?: "default" | "narrow" | "wide";
|
|
55
58
|
iconSelected?: import('@fortawesome/fontawesome-svg-core').IconDefinition;
|
|
@@ -57,6 +60,7 @@ export declare const iconButtonStyle: (states: (({
|
|
|
57
60
|
variant?: import('..').IconButtonVariant;
|
|
58
61
|
disabled?: boolean;
|
|
59
62
|
activated?: boolean;
|
|
63
|
+
title?: string | null;
|
|
60
64
|
shape?: "squared" | "rounded";
|
|
61
65
|
allowShapeTransformation?: boolean;
|
|
62
66
|
transition?: import('motion').Transition;
|
|
@@ -68,7 +72,7 @@ export declare const iconButtonStyle: (states: (({
|
|
|
68
72
|
export declare const useIconButtonStyle: (states: import('..').IconButtonStates & ((({
|
|
69
73
|
label?: string;
|
|
70
74
|
children?: string;
|
|
71
|
-
icon
|
|
75
|
+
icon?: import('..').Icon;
|
|
72
76
|
size?: "xSmall" | "small" | "medium" | "large" | "xLarge";
|
|
73
77
|
width?: "default" | "narrow" | "wide";
|
|
74
78
|
iconSelected?: import('@fortawesome/fontawesome-svg-core').IconDefinition;
|
|
@@ -76,6 +80,7 @@ export declare const useIconButtonStyle: (states: import('..').IconButtonStates
|
|
|
76
80
|
variant?: import('..').IconButtonVariant;
|
|
77
81
|
disabled?: boolean;
|
|
78
82
|
activated?: boolean;
|
|
83
|
+
title?: string | null;
|
|
79
84
|
shape?: "squared" | "rounded";
|
|
80
85
|
allowShapeTransformation?: boolean;
|
|
81
86
|
transition?: import('motion').Transition;
|
|
@@ -84,7 +89,7 @@ export declare const useIconButtonStyle: (states: import('..').IconButtonStates
|
|
|
84
89
|
}) | ({
|
|
85
90
|
label?: string;
|
|
86
91
|
children?: string;
|
|
87
|
-
icon
|
|
92
|
+
icon?: import('..').Icon;
|
|
88
93
|
size?: "xSmall" | "small" | "medium" | "large" | "xLarge";
|
|
89
94
|
width?: "default" | "narrow" | "wide";
|
|
90
95
|
iconSelected?: import('@fortawesome/fontawesome-svg-core').IconDefinition;
|
|
@@ -92,6 +97,7 @@ export declare const useIconButtonStyle: (states: import('..').IconButtonStates
|
|
|
92
97
|
variant?: import('..').IconButtonVariant;
|
|
93
98
|
disabled?: boolean;
|
|
94
99
|
activated?: boolean;
|
|
100
|
+
title?: string | null;
|
|
95
101
|
shape?: "squared" | "rounded";
|
|
96
102
|
allowShapeTransformation?: boolean;
|
|
97
103
|
transition?: import('motion').Transition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.style.d.ts","sourceRoot":"","sources":["../../../src/lib/styles/icon-button.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EACL,KAAK,kBAAkB,EAIxB,MAAM,UAAU,CAAC;AAyJlB,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"icon-button.style.d.ts","sourceRoot":"","sources":["../../../src/lib/styles/icon-button.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EACL,KAAK,kBAAkB,EAIxB,MAAM,UAAU,CAAC;AAyJlB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0EAG3B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2EAG9B,CAAC"}
|
|
@@ -2,6 +2,7 @@ export * from './button.style';
|
|
|
2
2
|
export * from './card.style';
|
|
3
3
|
export * from './carousel-item.style';
|
|
4
4
|
export * from './carousel.style';
|
|
5
|
+
export * from './checkbox.style';
|
|
5
6
|
export * from './chip.style';
|
|
6
7
|
export * from './chips.style';
|
|
7
8
|
export * from './divider.style';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/styles/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/styles/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -38,7 +38,7 @@ export declare const navigationRailItemStyle: (states: (({
|
|
|
38
38
|
isSelected: boolean;
|
|
39
39
|
} & {
|
|
40
40
|
className: string | ClassNameComponent<NavigationRailItemInterface> | undefined;
|
|
41
|
-
}) => Record<"
|
|
41
|
+
}) => Record<"label" | "container" | "icon" | "stateLayer" | "navigationRailItem", string>;
|
|
42
42
|
export declare const useNavigationRailItemStyle: (states: {
|
|
43
43
|
isSelected: boolean;
|
|
44
44
|
} & (((import('..').NavProps & {
|
|
@@ -47,5 +47,5 @@ export declare const useNavigationRailItemStyle: (states: {
|
|
|
47
47
|
href?: never;
|
|
48
48
|
})) & {
|
|
49
49
|
className?: string | ClassNameComponent<NavigationRailItemInterface> | undefined;
|
|
50
|
-
})) => Record<"
|
|
50
|
+
})) => Record<"label" | "container" | "icon" | "stateLayer" | "navigationRailItem", string>;
|
|
51
51
|
//# sourceMappingURL=navigation-rail-item.style.d.ts.map
|
|
@@ -25,7 +25,7 @@ export declare const sideSheetStyle: (states: {
|
|
|
25
25
|
isExtended: boolean;
|
|
26
26
|
} & {
|
|
27
27
|
className: string | ClassNameComponent<SideSheetInterface> | undefined;
|
|
28
|
-
}) => Record<"
|
|
28
|
+
}) => Record<"header" | "title" | "content" | "container" | "overlay" | "divider" | "sideSheet" | "closeButton", string>;
|
|
29
29
|
export declare const useSideSheetStyle: (states: {
|
|
30
30
|
isExtended: boolean;
|
|
31
31
|
} & {
|
|
@@ -40,5 +40,5 @@ export declare const useSideSheetStyle: (states: {
|
|
|
40
40
|
divider?: boolean;
|
|
41
41
|
} & {
|
|
42
42
|
className?: string | ClassNameComponent<SideSheetInterface> | undefined;
|
|
43
|
-
}) => Record<"
|
|
43
|
+
}) => Record<"header" | "title" | "content" | "container" | "overlay" | "divider" | "sideSheet" | "closeButton", string>;
|
|
44
44
|
//# sourceMappingURL=side-sheet.style.d.ts.map
|
|
@@ -26,7 +26,7 @@ export declare const sliderStyle: (states: {
|
|
|
26
26
|
isChanging: boolean;
|
|
27
27
|
} & {
|
|
28
28
|
className: string | ClassNameComponent<SliderInterface> | undefined;
|
|
29
|
-
}) => Record<"
|
|
29
|
+
}) => Record<"dot" | "slider" | "activeTrack" | "handle" | "inactiveTrack" | "valueIndicator", string>;
|
|
30
30
|
export declare const useSliderStyle: (states: {
|
|
31
31
|
isChanging: boolean;
|
|
32
32
|
} & {
|
|
@@ -43,5 +43,5 @@ export declare const useSliderStyle: (states: {
|
|
|
43
43
|
}[];
|
|
44
44
|
} & {
|
|
45
45
|
className?: string | ClassNameComponent<SliderInterface> | undefined;
|
|
46
|
-
}) => Record<"
|
|
46
|
+
}) => Record<"dot" | "slider" | "activeTrack" | "handle" | "inactiveTrack" | "valueIndicator", string>;
|
|
47
47
|
//# sourceMappingURL=slider.style.d.ts.map
|
|
@@ -34,7 +34,7 @@ export declare const tabStyle: (states: (({
|
|
|
34
34
|
isSelected: boolean;
|
|
35
35
|
} & {
|
|
36
36
|
className: string | ClassNameComponent<TabInterface> | undefined;
|
|
37
|
-
}) => Record<"
|
|
37
|
+
}) => Record<"label" | "content" | "icon" | "underline" | "tab" | "stateLayer", string>;
|
|
38
38
|
export declare const useTabStyle: (states: {
|
|
39
39
|
isSelected: boolean;
|
|
40
40
|
} & (((import('..').TabProps & {
|
|
@@ -43,5 +43,5 @@ export declare const useTabStyle: (states: {
|
|
|
43
43
|
href?: never;
|
|
44
44
|
})) & {
|
|
45
45
|
className?: string | ClassNameComponent<TabInterface> | undefined;
|
|
46
|
-
})) => Record<"
|
|
46
|
+
})) => Record<"label" | "content" | "icon" | "underline" | "tab" | "stateLayer", string>;
|
|
47
47
|
//# sourceMappingURL=tab.style.d.ts.map
|
|
@@ -14,48 +14,57 @@ export declare const textFieldStyle: (states: {
|
|
|
14
14
|
showSupportingText: any;
|
|
15
15
|
suffix: any;
|
|
16
16
|
value: any;
|
|
17
|
+
defaultValue: any;
|
|
18
|
+
id: any;
|
|
19
|
+
style: any;
|
|
17
20
|
variant: any;
|
|
18
21
|
type: any;
|
|
19
22
|
autoComplete: any;
|
|
20
|
-
|
|
23
|
+
multiline: any;
|
|
21
24
|
} & {
|
|
22
25
|
placeholder?: string;
|
|
23
|
-
name
|
|
26
|
+
name?: string;
|
|
24
27
|
label: string;
|
|
25
28
|
disabled?: boolean;
|
|
26
29
|
errorText?: string | null;
|
|
27
30
|
supportingText?: string;
|
|
28
31
|
trailingIcon?: React.ReactElement<typeof import('..').IconButton> | import('..').Icon;
|
|
29
32
|
leadingIcon?: React.ReactElement<typeof import('..').IconButton> | import('..').Icon;
|
|
30
|
-
onChange?:
|
|
33
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
31
34
|
showSupportingText?: boolean;
|
|
32
35
|
suffix?: string;
|
|
33
|
-
value
|
|
36
|
+
value?: string;
|
|
37
|
+
defaultValue?: string;
|
|
38
|
+
id?: string;
|
|
39
|
+
style?: React.CSSProperties;
|
|
34
40
|
variant?: import('..').TextFieldVariant;
|
|
35
|
-
type?: "text" | "password" | "number";
|
|
41
|
+
type?: "text" | "password" | "number" | "date";
|
|
36
42
|
autoComplete?: "on" | "off" | string;
|
|
37
|
-
|
|
43
|
+
multiline?: boolean;
|
|
38
44
|
} & import('..').TextFieldStates & {
|
|
39
45
|
className: string | ClassNameComponent<TextFieldInterface> | undefined;
|
|
40
|
-
}) => Record<"
|
|
46
|
+
}) => Record<"input" | "label" | "content" | "stateLayer" | "leadingIcon" | "trailingIcon" | "activeIndicator" | "supportingText" | "textField" | "suffix", string>;
|
|
41
47
|
export declare const useTextFieldStyle: (states: import('..').TextFieldStates & {
|
|
42
48
|
placeholder?: string;
|
|
43
|
-
name
|
|
49
|
+
name?: string;
|
|
44
50
|
label: string;
|
|
45
51
|
disabled?: boolean;
|
|
46
52
|
errorText?: string | null;
|
|
47
53
|
supportingText?: string;
|
|
48
54
|
trailingIcon?: React.ReactElement<typeof import('..').IconButton> | import('..').Icon;
|
|
49
55
|
leadingIcon?: React.ReactElement<typeof import('..').IconButton> | import('..').Icon;
|
|
50
|
-
onChange?:
|
|
56
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
51
57
|
showSupportingText?: boolean;
|
|
52
58
|
suffix?: string;
|
|
53
|
-
value
|
|
59
|
+
value?: string;
|
|
60
|
+
defaultValue?: string;
|
|
61
|
+
id?: string;
|
|
62
|
+
style?: React.CSSProperties;
|
|
54
63
|
variant?: import('..').TextFieldVariant;
|
|
55
|
-
type?: "text" | "password" | "number";
|
|
64
|
+
type?: "text" | "password" | "number" | "date";
|
|
56
65
|
autoComplete?: "on" | "off" | string;
|
|
57
|
-
|
|
66
|
+
multiline?: boolean;
|
|
58
67
|
} & {
|
|
59
68
|
className?: string | ClassNameComponent<TextFieldInterface> | undefined;
|
|
60
|
-
}) => Record<"
|
|
69
|
+
}) => Record<"input" | "label" | "content" | "stateLayer" | "leadingIcon" | "trailingIcon" | "activeIndicator" | "supportingText" | "textField" | "suffix", string>;
|
|
61
70
|
//# sourceMappingURL=text-field.style.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-field.style.d.ts","sourceRoot":"","sources":["../../../src/lib/styles/text-field.style.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,KAAK,kBAAkB,EAIxB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAmGnD,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"text-field.style.d.ts","sourceRoot":"","sources":["../../../src/lib/styles/text-field.style.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,KAAK,kBAAkB,EAIxB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAmGnD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mKAG1B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;mKAG7B,CAAC"}
|
|
@@ -15,6 +15,7 @@ export declare const toolStyle: (states: ({
|
|
|
15
15
|
defaultOpen: any;
|
|
16
16
|
onOpenChange: any;
|
|
17
17
|
id: any;
|
|
18
|
+
anchorRef: any;
|
|
18
19
|
children: any;
|
|
19
20
|
targetRef: any;
|
|
20
21
|
} | {
|
|
@@ -32,6 +33,7 @@ export declare const toolStyle: (states: ({
|
|
|
32
33
|
defaultOpen: any;
|
|
33
34
|
onOpenChange: any;
|
|
34
35
|
id: any;
|
|
36
|
+
anchorRef: any;
|
|
35
37
|
children: any;
|
|
36
38
|
targetRef: any;
|
|
37
39
|
}) & (({
|
|
@@ -41,7 +43,7 @@ export declare const toolStyle: (states: ({
|
|
|
41
43
|
content?: import('react').ReactNode;
|
|
42
44
|
buttons?: import('..').ReactProps<import('..').ButtonInterface> | import('..').ReactProps<import('..').ButtonInterface>[];
|
|
43
45
|
position?: "top" | "bottom" | "left" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
44
|
-
trigger?: ("
|
|
46
|
+
trigger?: ("click" | "focus" | "hover" | null) | ("click" | "focus" | "hover" | null)[];
|
|
45
47
|
transition?: import('motion').Transition;
|
|
46
48
|
openDelay?: number;
|
|
47
49
|
closeDelay?: number;
|
|
@@ -49,6 +51,7 @@ export declare const toolStyle: (states: ({
|
|
|
49
51
|
defaultOpen?: boolean;
|
|
50
52
|
onOpenChange?: (open: boolean) => void;
|
|
51
53
|
id?: string;
|
|
54
|
+
anchorRef?: import('react').RefObject<HTMLElement>;
|
|
52
55
|
} & ({
|
|
53
56
|
children: import('react').ReactNode;
|
|
54
57
|
targetRef?: never;
|
|
@@ -57,7 +60,7 @@ export declare const toolStyle: (states: ({
|
|
|
57
60
|
targetRef: import('react').RefObject<any>;
|
|
58
61
|
})) & {
|
|
59
62
|
className: string | ClassNameComponent<ToolTipInterface> | undefined;
|
|
60
|
-
})) => Record<"
|
|
63
|
+
})) => Record<"content" | "container" | "actions" | "supportingText" | "toolTip" | "subHead", string>;
|
|
61
64
|
export declare const useToolTipStyle: (states: ({
|
|
62
65
|
variant?: "plain" | "rich";
|
|
63
66
|
title?: string;
|
|
@@ -65,7 +68,7 @@ export declare const useToolTipStyle: (states: ({
|
|
|
65
68
|
content?: import('react').ReactNode;
|
|
66
69
|
buttons?: import('..').ReactProps<import('..').ButtonInterface> | import('..').ReactProps<import('..').ButtonInterface>[];
|
|
67
70
|
position?: "top" | "bottom" | "left" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
68
|
-
trigger?: ("
|
|
71
|
+
trigger?: ("click" | "focus" | "hover" | null) | ("click" | "focus" | "hover" | null)[];
|
|
69
72
|
transition?: import('motion').Transition;
|
|
70
73
|
openDelay?: number;
|
|
71
74
|
closeDelay?: number;
|
|
@@ -73,6 +76,7 @@ export declare const useToolTipStyle: (states: ({
|
|
|
73
76
|
defaultOpen?: boolean;
|
|
74
77
|
onOpenChange?: (open: boolean) => void;
|
|
75
78
|
id?: string;
|
|
79
|
+
anchorRef?: import('react').RefObject<HTMLElement>;
|
|
76
80
|
} & ({
|
|
77
81
|
children: import('react').ReactNode;
|
|
78
82
|
targetRef?: never;
|
|
@@ -81,5 +85,5 @@ export declare const useToolTipStyle: (states: ({
|
|
|
81
85
|
targetRef: import('react').RefObject<any>;
|
|
82
86
|
})) & {
|
|
83
87
|
className?: string | ClassNameComponent<ToolTipInterface> | undefined;
|
|
84
|
-
}) => Record<"
|
|
88
|
+
}) => Record<"content" | "container" | "actions" | "supportingText" | "toolTip" | "subHead", string>;
|
|
85
89
|
//# sourceMappingURL=tooltip.style.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.style.d.ts","sourceRoot":"","sources":["../../../src/lib/styles/tooltip.style.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EAIxB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAiCjD,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"tooltip.style.d.ts","sourceRoot":"","sources":["../../../src/lib/styles/tooltip.style.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EAIxB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAiCjD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qGAGrB,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;oGAG3B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@udixio/ui-react",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"react": "^19.1.1",
|
|
39
39
|
"react-dom": "^19.1.1",
|
|
40
|
-
"@udixio/tailwind": "2.4.
|
|
41
|
-
"@udixio/theme": "2.1.
|
|
40
|
+
"@udixio/tailwind": "2.4.13",
|
|
41
|
+
"@udixio/theme": "2.1.13"
|
|
42
42
|
},
|
|
43
43
|
"repository": {
|
|
44
44
|
"type": "git",
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import React, {
|
|
2
|
+
CSSProperties,
|
|
3
|
+
RefObject,
|
|
4
|
+
useId,
|
|
5
|
+
useLayoutEffect,
|
|
6
|
+
useState,
|
|
7
|
+
} from 'react';
|
|
8
|
+
import { SyncedFixedWrapper } from '../effects';
|
|
9
|
+
|
|
10
|
+
export type Position =
|
|
11
|
+
| 'top'
|
|
12
|
+
| 'bottom'
|
|
13
|
+
| 'left'
|
|
14
|
+
| 'right'
|
|
15
|
+
| 'top-left'
|
|
16
|
+
| 'top-right'
|
|
17
|
+
| 'bottom-left'
|
|
18
|
+
| 'bottom-right';
|
|
19
|
+
|
|
20
|
+
export interface AnchorPositionerProps {
|
|
21
|
+
anchorRef: RefObject<HTMLElement | null>;
|
|
22
|
+
position?: Position;
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
style?: CSSProperties;
|
|
25
|
+
className?: string; // Optional if we want to wrap in a class
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const AnchorPositioner = ({
|
|
29
|
+
anchorRef,
|
|
30
|
+
position = 'bottom',
|
|
31
|
+
children,
|
|
32
|
+
style,
|
|
33
|
+
}: AnchorPositionerProps) => {
|
|
34
|
+
const uniqueId = useId();
|
|
35
|
+
const anchorName = `--anchor-${uniqueId.replace(/:/g, '')}`;
|
|
36
|
+
const [supportsAnchor, setSupportsAnchor] = useState(false);
|
|
37
|
+
|
|
38
|
+
useLayoutEffect(() => {
|
|
39
|
+
if (typeof CSS !== 'undefined' && CSS.supports('anchor-name', '--a')) {
|
|
40
|
+
setSupportsAnchor(true);
|
|
41
|
+
}
|
|
42
|
+
}, []);
|
|
43
|
+
|
|
44
|
+
useLayoutEffect(() => {
|
|
45
|
+
if (supportsAnchor && anchorRef.current) {
|
|
46
|
+
const el = anchorRef.current;
|
|
47
|
+
// Apply anchor name to the reference element
|
|
48
|
+
(el.style as any).anchorName = anchorName;
|
|
49
|
+
return () => {
|
|
50
|
+
if (anchorRef.current) {
|
|
51
|
+
(anchorRef.current.style as any).anchorName = '';
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}, [supportsAnchor, anchorRef, anchorName]);
|
|
56
|
+
|
|
57
|
+
if (supportsAnchor) {
|
|
58
|
+
const positionAreaMap: Record<Position, string> = {
|
|
59
|
+
top: 'top',
|
|
60
|
+
bottom: 'bottom',
|
|
61
|
+
left: 'left',
|
|
62
|
+
right: 'right',
|
|
63
|
+
'top-left': 'top left',
|
|
64
|
+
'top-right': 'top right',
|
|
65
|
+
'bottom-left': 'bottom left',
|
|
66
|
+
'bottom-right': 'bottom right',
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const floatingStyles: CSSProperties = {
|
|
70
|
+
position: 'fixed',
|
|
71
|
+
margin: 0,
|
|
72
|
+
zIndex: 9999,
|
|
73
|
+
positionAnchor: anchorName,
|
|
74
|
+
positionArea: positionAreaMap[position],
|
|
75
|
+
positionTryFallbacks: 'flip-block, flip-inline',
|
|
76
|
+
...style,
|
|
77
|
+
} as any;
|
|
78
|
+
|
|
79
|
+
return <div style={floatingStyles}>{children}</div>;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const fallbackStyles: CSSProperties = {
|
|
83
|
+
position: 'absolute',
|
|
84
|
+
pointerEvents: 'auto',
|
|
85
|
+
...style,
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
switch (position) {
|
|
89
|
+
case 'top':
|
|
90
|
+
fallbackStyles.bottom = '100%';
|
|
91
|
+
fallbackStyles.left = '50%';
|
|
92
|
+
fallbackStyles.transform = 'translateX(-50%)';
|
|
93
|
+
break;
|
|
94
|
+
case 'top-left':
|
|
95
|
+
fallbackStyles.bottom = '100%';
|
|
96
|
+
fallbackStyles.left = 0;
|
|
97
|
+
break;
|
|
98
|
+
case 'top-right':
|
|
99
|
+
fallbackStyles.bottom = '100%';
|
|
100
|
+
fallbackStyles.right = 0;
|
|
101
|
+
break;
|
|
102
|
+
case 'bottom':
|
|
103
|
+
fallbackStyles.top = '100%';
|
|
104
|
+
fallbackStyles.left = '50%';
|
|
105
|
+
fallbackStyles.transform = 'translateX(-50%)';
|
|
106
|
+
break;
|
|
107
|
+
case 'bottom-left':
|
|
108
|
+
fallbackStyles.top = '100%';
|
|
109
|
+
fallbackStyles.left = 0;
|
|
110
|
+
break;
|
|
111
|
+
case 'bottom-right':
|
|
112
|
+
fallbackStyles.top = '100%';
|
|
113
|
+
fallbackStyles.right = 0;
|
|
114
|
+
break;
|
|
115
|
+
case 'left':
|
|
116
|
+
fallbackStyles.right = '100%';
|
|
117
|
+
fallbackStyles.top = '50%';
|
|
118
|
+
fallbackStyles.transform = 'translateY(-50%)';
|
|
119
|
+
break;
|
|
120
|
+
case 'right':
|
|
121
|
+
fallbackStyles.left = '100%';
|
|
122
|
+
fallbackStyles.top = '50%';
|
|
123
|
+
fallbackStyles.transform = 'translateY(-50%)';
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return (
|
|
128
|
+
<SyncedFixedWrapper targetRef={anchorRef}>
|
|
129
|
+
<div style={fallbackStyles}>{children}</div>
|
|
130
|
+
</SyncedFixedWrapper>
|
|
131
|
+
);
|
|
132
|
+
};
|
|
@@ -9,7 +9,7 @@ import { State } from '../effects';
|
|
|
9
9
|
* @status beta
|
|
10
10
|
* @category Layout
|
|
11
11
|
* @devx
|
|
12
|
-
* - `
|
|
12
|
+
* - `interactive` only adds a state layer; add your own click/role semantics.
|
|
13
13
|
* @limitations
|
|
14
14
|
* - No built-in header/actions slots; layout is fully custom via children.
|
|
15
15
|
*/
|
|
@@ -17,18 +17,23 @@ export const Card = ({
|
|
|
17
17
|
variant = 'outlined',
|
|
18
18
|
className,
|
|
19
19
|
children,
|
|
20
|
-
|
|
20
|
+
interactive = false,
|
|
21
21
|
ref,
|
|
22
22
|
...rest
|
|
23
23
|
}: ReactProps<CardInterface>) => {
|
|
24
|
-
const styles = useCardStyle({
|
|
24
|
+
const styles = useCardStyle({
|
|
25
|
+
className,
|
|
26
|
+
isInteractive: interactive,
|
|
27
|
+
variant,
|
|
28
|
+
children,
|
|
29
|
+
});
|
|
25
30
|
|
|
26
31
|
const defaultRef = useRef<HTMLDivElement>(null);
|
|
27
32
|
const resolvedRef = ref || defaultRef;
|
|
28
33
|
|
|
29
34
|
return (
|
|
30
35
|
<div {...rest} ref={resolvedRef} className={styles.card}>
|
|
31
|
-
{
|
|
36
|
+
{interactive && (
|
|
32
37
|
<State
|
|
33
38
|
className={styles.stateLayer}
|
|
34
39
|
colorName={'on-surface'}
|