@exem-ui/react 0.3.4-next.20260824050435 → 0.3.4-next.20260902003121
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/index.js +54 -67
- package/dist/index.mjs +55 -68
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -571,24 +571,20 @@ var Button = React.forwardRef(
|
|
|
571
571
|
}, ref) => {
|
|
572
572
|
const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
573
573
|
icon && React.cloneElement(icon, {
|
|
574
|
-
className: utils.cn(
|
|
575
|
-
"shrink-0 [&>path]:fill-current",
|
|
576
|
-
colorStyles[color][variant].icon,
|
|
577
|
-
icon.props.className
|
|
578
|
-
),
|
|
574
|
+
className: utils.cn("shrink-0", colorStyles[color][variant].icon, icon.props.className),
|
|
579
575
|
size: icon.props.size ?? IconSizeMap[size]
|
|
580
576
|
}),
|
|
581
|
-
|
|
577
|
+
children != null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
582
578
|
"span",
|
|
583
579
|
{
|
|
584
580
|
className: utils.cn(
|
|
585
|
-
"truncate",
|
|
581
|
+
"min-w-0 truncate",
|
|
586
582
|
size === "xlarge" ? "px-1" : "px-0.5",
|
|
587
583
|
colorStyles[color][variant].text
|
|
588
584
|
),
|
|
589
585
|
children
|
|
590
586
|
}
|
|
591
|
-
)
|
|
587
|
+
)
|
|
592
588
|
] });
|
|
593
589
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
594
590
|
"button",
|
|
@@ -960,6 +956,16 @@ var Switch = React.forwardRef(
|
|
|
960
956
|
}
|
|
961
957
|
);
|
|
962
958
|
Switch.displayName = SwitchPrimitives__namespace.Root.displayName;
|
|
959
|
+
function mergeClassNames(base, user) {
|
|
960
|
+
if (!user) {
|
|
961
|
+
return base;
|
|
962
|
+
}
|
|
963
|
+
const merged = { ...base };
|
|
964
|
+
for (const key in user) {
|
|
965
|
+
merged[key] = utils.cn(base[key], user[key]);
|
|
966
|
+
}
|
|
967
|
+
return merged;
|
|
968
|
+
}
|
|
963
969
|
function DatePickerChevron({ orientation }) {
|
|
964
970
|
if (orientation === "left") {
|
|
965
971
|
return /* @__PURE__ */ jsxRuntime.jsx(chunk6MFMQCL5_js.ChevronLeft, { type: "regular", className: "size-5" });
|
|
@@ -988,7 +994,6 @@ function DatePickerDayButton({
|
|
|
988
994
|
}
|
|
989
995
|
function DatePicker({ type = "single", showOutsideDays = true, ...rest }) {
|
|
990
996
|
const dayPickerProps = { ...rest, mode: type };
|
|
991
|
-
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
992
997
|
const [month, setMonth] = React.useState(
|
|
993
998
|
dayPickerProps.month ?? dayPickerProps.defaultMonth ?? /* @__PURE__ */ new Date()
|
|
994
999
|
);
|
|
@@ -1004,6 +1009,41 @@ function DatePicker({ type = "single", showOutsideDays = true, ...rest }) {
|
|
|
1004
1009
|
}
|
|
1005
1010
|
dayPickerProps.onDayClick?.(day, modifiers, e);
|
|
1006
1011
|
};
|
|
1012
|
+
const dayPickerClassNames = {
|
|
1013
|
+
root: "rounded-medium",
|
|
1014
|
+
months: "relative",
|
|
1015
|
+
month: "flex flex-col gap-2",
|
|
1016
|
+
month_caption: "flex h-7 items-center px-0.5",
|
|
1017
|
+
caption_label: "text-body-2 font-semibold text-text-primary",
|
|
1018
|
+
nav: "absolute right-0 top-0 flex h-7 items-center gap-2",
|
|
1019
|
+
button_previous: "flex size-7 items-center justify-center rounded-medium hover:bg-elevation-elevation-2",
|
|
1020
|
+
button_next: "flex size-7 items-center justify-center rounded-medium hover:bg-elevation-elevation-2",
|
|
1021
|
+
weekday: "size-8 text-body-3 font-regular text-text-tertiary",
|
|
1022
|
+
month_grid: "border-separate border-spacing-x-0 border-spacing-y-1",
|
|
1023
|
+
week: "overflow-hidden rounded-medium",
|
|
1024
|
+
day: "size-8 text-body-2 font-medium text-text-secondary",
|
|
1025
|
+
day_button: "size-8 cursor-pointer rounded-full hover:border hover:border-border-focused",
|
|
1026
|
+
outside: "!text-text-disabled",
|
|
1027
|
+
selected: utils.cn(
|
|
1028
|
+
"[&>button]:bg-solid-primary-default",
|
|
1029
|
+
"[&>button]:text-text-inverse",
|
|
1030
|
+
"[&>button]:border-0",
|
|
1031
|
+
"[&>button]:hover:border-0"
|
|
1032
|
+
),
|
|
1033
|
+
range_start: utils.cn(
|
|
1034
|
+
"rounded-none",
|
|
1035
|
+
isRangeComplete && "[background:linear-gradient(to_right,transparent_50%,var(--color-elevation-elevation-2)_50%)]"
|
|
1036
|
+
),
|
|
1037
|
+
range_end: utils.cn(
|
|
1038
|
+
"rounded-none",
|
|
1039
|
+
isRangeComplete && "[background:linear-gradient(to_left,transparent_50%,var(--color-elevation-elevation-2)_50%)]"
|
|
1040
|
+
),
|
|
1041
|
+
range_middle: utils.cn(
|
|
1042
|
+
"bg-elevation-elevation-2 rounded-none",
|
|
1043
|
+
"[&>button]:!bg-transparent",
|
|
1044
|
+
"[&>button]:!text-text-secondary"
|
|
1045
|
+
)
|
|
1046
|
+
};
|
|
1007
1047
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1008
1048
|
reactDayPicker.DayPicker,
|
|
1009
1049
|
{
|
|
@@ -1026,64 +1066,11 @@ function DatePicker({ type = "single", showOutsideDays = true, ...rest }) {
|
|
|
1026
1066
|
DayButton: DatePickerDayButton,
|
|
1027
1067
|
...dayPickerProps.components
|
|
1028
1068
|
},
|
|
1029
|
-
classNames:
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
months: utils.cn(defaultClassNames.months, "relative"),
|
|
1035
|
-
month: utils.cn(defaultClassNames.month, "flex flex-col gap-2"),
|
|
1036
|
-
month_caption: utils.cn(defaultClassNames.month_caption, "flex h-7 items-center px-0.5"),
|
|
1037
|
-
caption_label: "text-body-2 font-semibold text-text-primary",
|
|
1038
|
-
nav: utils.cn(defaultClassNames.nav, "absolute right-0 top-0 flex h-7 items-center gap-2"),
|
|
1039
|
-
button_previous: utils.cn(
|
|
1040
|
-
defaultClassNames.button_previous,
|
|
1041
|
-
"flex size-7 items-center justify-center rounded-medium hover:bg-elevation-elevation-2"
|
|
1042
|
-
),
|
|
1043
|
-
button_next: utils.cn(
|
|
1044
|
-
defaultClassNames.button_next,
|
|
1045
|
-
"flex size-7 items-center justify-center rounded-medium hover:bg-elevation-elevation-2"
|
|
1046
|
-
),
|
|
1047
|
-
weekday: utils.cn(
|
|
1048
|
-
defaultClassNames.weekday,
|
|
1049
|
-
"size-8 text-body-3 font-regular text-text-tertiary"
|
|
1050
|
-
),
|
|
1051
|
-
month_grid: utils.cn(
|
|
1052
|
-
defaultClassNames.month_grid,
|
|
1053
|
-
"border-separate border-spacing-x-0 border-spacing-y-1"
|
|
1054
|
-
),
|
|
1055
|
-
week: utils.cn(defaultClassNames.week, "overflow-hidden rounded-medium"),
|
|
1056
|
-
day: utils.cn(defaultClassNames.day, "size-8 text-body-2 font-medium text-text-secondary"),
|
|
1057
|
-
day_button: utils.cn(
|
|
1058
|
-
defaultClassNames.day_button,
|
|
1059
|
-
"size-8 cursor-pointer rounded-full hover:border hover:border-border-focused"
|
|
1060
|
-
),
|
|
1061
|
-
outside: "!text-text-disabled",
|
|
1062
|
-
selected: utils.cn(
|
|
1063
|
-
"[&>button]:bg-solid-primary-default",
|
|
1064
|
-
"[&>button]:text-text-inverse",
|
|
1065
|
-
"[&>button]:border-0",
|
|
1066
|
-
"[&>button]:hover:border-0"
|
|
1067
|
-
),
|
|
1068
|
-
range_start: utils.cn(
|
|
1069
|
-
"rounded-none",
|
|
1070
|
-
isRangeComplete && "[background:linear-gradient(to_right,transparent_50%,var(--color-elevation-elevation-2)_50%)]"
|
|
1071
|
-
),
|
|
1072
|
-
range_end: utils.cn(
|
|
1073
|
-
"rounded-none",
|
|
1074
|
-
isRangeComplete && "[background:linear-gradient(to_left,transparent_50%,var(--color-elevation-elevation-2)_50%)]"
|
|
1075
|
-
),
|
|
1076
|
-
range_middle: utils.cn(
|
|
1077
|
-
"bg-elevation-elevation-2 rounded-none",
|
|
1078
|
-
"[&>button]:!bg-transparent",
|
|
1079
|
-
"[&>button]:!text-text-secondary"
|
|
1080
|
-
),
|
|
1081
|
-
...dayPickerProps.classNames
|
|
1082
|
-
},
|
|
1083
|
-
modifiersClassNames: {
|
|
1084
|
-
today: "rdp-calendar-today",
|
|
1085
|
-
...dayPickerProps.modifiersClassNames
|
|
1086
|
-
}
|
|
1069
|
+
classNames: mergeClassNames(dayPickerClassNames, dayPickerProps.classNames),
|
|
1070
|
+
modifiersClassNames: mergeClassNames(
|
|
1071
|
+
{ today: "rdp-calendar-today" },
|
|
1072
|
+
dayPickerProps.modifiersClassNames
|
|
1073
|
+
)
|
|
1087
1074
|
}
|
|
1088
1075
|
);
|
|
1089
1076
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { Slot } from '@radix-ui/react-slot';
|
|
|
9
9
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
10
10
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
11
11
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
12
|
-
import {
|
|
12
|
+
import { DayPicker } from 'react-day-picker';
|
|
13
13
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
14
14
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
15
15
|
import { Resizable } from 're-resizable';
|
|
@@ -546,24 +546,20 @@ var Button = forwardRef(
|
|
|
546
546
|
}, ref) => {
|
|
547
547
|
const content = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
548
548
|
icon && cloneElement(icon, {
|
|
549
|
-
className: cn(
|
|
550
|
-
"shrink-0 [&>path]:fill-current",
|
|
551
|
-
colorStyles[color][variant].icon,
|
|
552
|
-
icon.props.className
|
|
553
|
-
),
|
|
549
|
+
className: cn("shrink-0", colorStyles[color][variant].icon, icon.props.className),
|
|
554
550
|
size: icon.props.size ?? IconSizeMap[size]
|
|
555
551
|
}),
|
|
556
|
-
|
|
552
|
+
children != null && /* @__PURE__ */ jsx(
|
|
557
553
|
"span",
|
|
558
554
|
{
|
|
559
555
|
className: cn(
|
|
560
|
-
"truncate",
|
|
556
|
+
"min-w-0 truncate",
|
|
561
557
|
size === "xlarge" ? "px-1" : "px-0.5",
|
|
562
558
|
colorStyles[color][variant].text
|
|
563
559
|
),
|
|
564
560
|
children
|
|
565
561
|
}
|
|
566
|
-
)
|
|
562
|
+
)
|
|
567
563
|
] });
|
|
568
564
|
return /* @__PURE__ */ jsx(
|
|
569
565
|
"button",
|
|
@@ -935,6 +931,16 @@ var Switch = forwardRef(
|
|
|
935
931
|
}
|
|
936
932
|
);
|
|
937
933
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
934
|
+
function mergeClassNames(base, user) {
|
|
935
|
+
if (!user) {
|
|
936
|
+
return base;
|
|
937
|
+
}
|
|
938
|
+
const merged = { ...base };
|
|
939
|
+
for (const key in user) {
|
|
940
|
+
merged[key] = cn(base[key], user[key]);
|
|
941
|
+
}
|
|
942
|
+
return merged;
|
|
943
|
+
}
|
|
938
944
|
function DatePickerChevron({ orientation }) {
|
|
939
945
|
if (orientation === "left") {
|
|
940
946
|
return /* @__PURE__ */ jsx(ChevronLeft, { type: "regular", className: "size-5" });
|
|
@@ -963,7 +969,6 @@ function DatePickerDayButton({
|
|
|
963
969
|
}
|
|
964
970
|
function DatePicker({ type = "single", showOutsideDays = true, ...rest }) {
|
|
965
971
|
const dayPickerProps = { ...rest, mode: type };
|
|
966
|
-
const defaultClassNames = getDefaultClassNames();
|
|
967
972
|
const [month, setMonth] = useState(
|
|
968
973
|
dayPickerProps.month ?? dayPickerProps.defaultMonth ?? /* @__PURE__ */ new Date()
|
|
969
974
|
);
|
|
@@ -979,6 +984,41 @@ function DatePicker({ type = "single", showOutsideDays = true, ...rest }) {
|
|
|
979
984
|
}
|
|
980
985
|
dayPickerProps.onDayClick?.(day, modifiers, e);
|
|
981
986
|
};
|
|
987
|
+
const dayPickerClassNames = {
|
|
988
|
+
root: "rounded-medium",
|
|
989
|
+
months: "relative",
|
|
990
|
+
month: "flex flex-col gap-2",
|
|
991
|
+
month_caption: "flex h-7 items-center px-0.5",
|
|
992
|
+
caption_label: "text-body-2 font-semibold text-text-primary",
|
|
993
|
+
nav: "absolute right-0 top-0 flex h-7 items-center gap-2",
|
|
994
|
+
button_previous: "flex size-7 items-center justify-center rounded-medium hover:bg-elevation-elevation-2",
|
|
995
|
+
button_next: "flex size-7 items-center justify-center rounded-medium hover:bg-elevation-elevation-2",
|
|
996
|
+
weekday: "size-8 text-body-3 font-regular text-text-tertiary",
|
|
997
|
+
month_grid: "border-separate border-spacing-x-0 border-spacing-y-1",
|
|
998
|
+
week: "overflow-hidden rounded-medium",
|
|
999
|
+
day: "size-8 text-body-2 font-medium text-text-secondary",
|
|
1000
|
+
day_button: "size-8 cursor-pointer rounded-full hover:border hover:border-border-focused",
|
|
1001
|
+
outside: "!text-text-disabled",
|
|
1002
|
+
selected: cn(
|
|
1003
|
+
"[&>button]:bg-solid-primary-default",
|
|
1004
|
+
"[&>button]:text-text-inverse",
|
|
1005
|
+
"[&>button]:border-0",
|
|
1006
|
+
"[&>button]:hover:border-0"
|
|
1007
|
+
),
|
|
1008
|
+
range_start: cn(
|
|
1009
|
+
"rounded-none",
|
|
1010
|
+
isRangeComplete && "[background:linear-gradient(to_right,transparent_50%,var(--color-elevation-elevation-2)_50%)]"
|
|
1011
|
+
),
|
|
1012
|
+
range_end: cn(
|
|
1013
|
+
"rounded-none",
|
|
1014
|
+
isRangeComplete && "[background:linear-gradient(to_left,transparent_50%,var(--color-elevation-elevation-2)_50%)]"
|
|
1015
|
+
),
|
|
1016
|
+
range_middle: cn(
|
|
1017
|
+
"bg-elevation-elevation-2 rounded-none",
|
|
1018
|
+
"[&>button]:!bg-transparent",
|
|
1019
|
+
"[&>button]:!text-text-secondary"
|
|
1020
|
+
)
|
|
1021
|
+
};
|
|
982
1022
|
return /* @__PURE__ */ jsx(
|
|
983
1023
|
DayPicker,
|
|
984
1024
|
{
|
|
@@ -1001,64 +1041,11 @@ function DatePicker({ type = "single", showOutsideDays = true, ...rest }) {
|
|
|
1001
1041
|
DayButton: DatePickerDayButton,
|
|
1002
1042
|
...dayPickerProps.components
|
|
1003
1043
|
},
|
|
1004
|
-
classNames:
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
months: cn(defaultClassNames.months, "relative"),
|
|
1010
|
-
month: cn(defaultClassNames.month, "flex flex-col gap-2"),
|
|
1011
|
-
month_caption: cn(defaultClassNames.month_caption, "flex h-7 items-center px-0.5"),
|
|
1012
|
-
caption_label: "text-body-2 font-semibold text-text-primary",
|
|
1013
|
-
nav: cn(defaultClassNames.nav, "absolute right-0 top-0 flex h-7 items-center gap-2"),
|
|
1014
|
-
button_previous: cn(
|
|
1015
|
-
defaultClassNames.button_previous,
|
|
1016
|
-
"flex size-7 items-center justify-center rounded-medium hover:bg-elevation-elevation-2"
|
|
1017
|
-
),
|
|
1018
|
-
button_next: cn(
|
|
1019
|
-
defaultClassNames.button_next,
|
|
1020
|
-
"flex size-7 items-center justify-center rounded-medium hover:bg-elevation-elevation-2"
|
|
1021
|
-
),
|
|
1022
|
-
weekday: cn(
|
|
1023
|
-
defaultClassNames.weekday,
|
|
1024
|
-
"size-8 text-body-3 font-regular text-text-tertiary"
|
|
1025
|
-
),
|
|
1026
|
-
month_grid: cn(
|
|
1027
|
-
defaultClassNames.month_grid,
|
|
1028
|
-
"border-separate border-spacing-x-0 border-spacing-y-1"
|
|
1029
|
-
),
|
|
1030
|
-
week: cn(defaultClassNames.week, "overflow-hidden rounded-medium"),
|
|
1031
|
-
day: cn(defaultClassNames.day, "size-8 text-body-2 font-medium text-text-secondary"),
|
|
1032
|
-
day_button: cn(
|
|
1033
|
-
defaultClassNames.day_button,
|
|
1034
|
-
"size-8 cursor-pointer rounded-full hover:border hover:border-border-focused"
|
|
1035
|
-
),
|
|
1036
|
-
outside: "!text-text-disabled",
|
|
1037
|
-
selected: cn(
|
|
1038
|
-
"[&>button]:bg-solid-primary-default",
|
|
1039
|
-
"[&>button]:text-text-inverse",
|
|
1040
|
-
"[&>button]:border-0",
|
|
1041
|
-
"[&>button]:hover:border-0"
|
|
1042
|
-
),
|
|
1043
|
-
range_start: cn(
|
|
1044
|
-
"rounded-none",
|
|
1045
|
-
isRangeComplete && "[background:linear-gradient(to_right,transparent_50%,var(--color-elevation-elevation-2)_50%)]"
|
|
1046
|
-
),
|
|
1047
|
-
range_end: cn(
|
|
1048
|
-
"rounded-none",
|
|
1049
|
-
isRangeComplete && "[background:linear-gradient(to_left,transparent_50%,var(--color-elevation-elevation-2)_50%)]"
|
|
1050
|
-
),
|
|
1051
|
-
range_middle: cn(
|
|
1052
|
-
"bg-elevation-elevation-2 rounded-none",
|
|
1053
|
-
"[&>button]:!bg-transparent",
|
|
1054
|
-
"[&>button]:!text-text-secondary"
|
|
1055
|
-
),
|
|
1056
|
-
...dayPickerProps.classNames
|
|
1057
|
-
},
|
|
1058
|
-
modifiersClassNames: {
|
|
1059
|
-
today: "rdp-calendar-today",
|
|
1060
|
-
...dayPickerProps.modifiersClassNames
|
|
1061
|
-
}
|
|
1044
|
+
classNames: mergeClassNames(dayPickerClassNames, dayPickerProps.classNames),
|
|
1045
|
+
modifiersClassNames: mergeClassNames(
|
|
1046
|
+
{ today: "rdp-calendar-today" },
|
|
1047
|
+
dayPickerProps.modifiersClassNames
|
|
1048
|
+
)
|
|
1062
1049
|
}
|
|
1063
1050
|
);
|
|
1064
1051
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exem-ui/react",
|
|
3
|
-
"version": "0.3.4-next.
|
|
3
|
+
"version": "0.3.4-next.20260902003121",
|
|
4
4
|
"description": "Exem Design System - React Components",
|
|
5
5
|
"author": "Exem Design Team",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"tailwind-merge": "^3.3.1",
|
|
101
101
|
"tailwind-scrollbar-hide": "^4.0.0",
|
|
102
102
|
"tiny-invariant": "^1.3.3",
|
|
103
|
-
"@exem-ui/core": "0.3.3-next.
|
|
103
|
+
"@exem-ui/core": "0.3.3-next.20260902003121"
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
106
|
"@eslint/js": "^9.15.0",
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"tsup": "^8.5.0",
|
|
137
137
|
"typescript": "^5.8.2",
|
|
138
138
|
"typescript-eslint": "^8.16.0",
|
|
139
|
-
"@exem-ui/tailwindcss3": "0.3.2-next.
|
|
139
|
+
"@exem-ui/tailwindcss3": "0.3.2-next.20260902003121"
|
|
140
140
|
},
|
|
141
141
|
"scripts": {
|
|
142
142
|
"generate": "node scripts/generate-icons.js",
|