@exem-ui/react 0.3.4-next.20260824050435 → 0.3.4-next.20260828070546

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 CHANGED
@@ -960,6 +960,16 @@ var Switch = React.forwardRef(
960
960
  }
961
961
  );
962
962
  Switch.displayName = SwitchPrimitives__namespace.Root.displayName;
963
+ function mergeClassNames(base, user) {
964
+ if (!user) {
965
+ return base;
966
+ }
967
+ const merged = { ...base };
968
+ for (const key in user) {
969
+ merged[key] = utils.cn(base[key], user[key]);
970
+ }
971
+ return merged;
972
+ }
963
973
  function DatePickerChevron({ orientation }) {
964
974
  if (orientation === "left") {
965
975
  return /* @__PURE__ */ jsxRuntime.jsx(chunk6MFMQCL5_js.ChevronLeft, { type: "regular", className: "size-5" });
@@ -988,7 +998,6 @@ function DatePickerDayButton({
988
998
  }
989
999
  function DatePicker({ type = "single", showOutsideDays = true, ...rest }) {
990
1000
  const dayPickerProps = { ...rest, mode: type };
991
- const defaultClassNames = reactDayPicker.getDefaultClassNames();
992
1001
  const [month, setMonth] = React.useState(
993
1002
  dayPickerProps.month ?? dayPickerProps.defaultMonth ?? /* @__PURE__ */ new Date()
994
1003
  );
@@ -1004,6 +1013,41 @@ function DatePicker({ type = "single", showOutsideDays = true, ...rest }) {
1004
1013
  }
1005
1014
  dayPickerProps.onDayClick?.(day, modifiers, e);
1006
1015
  };
1016
+ const dayPickerClassNames = {
1017
+ root: "rounded-medium",
1018
+ months: "relative",
1019
+ month: "flex flex-col gap-2",
1020
+ month_caption: "flex h-7 items-center px-0.5",
1021
+ caption_label: "text-body-2 font-semibold text-text-primary",
1022
+ nav: "absolute right-0 top-0 flex h-7 items-center gap-2",
1023
+ button_previous: "flex size-7 items-center justify-center rounded-medium hover:bg-elevation-elevation-2",
1024
+ button_next: "flex size-7 items-center justify-center rounded-medium hover:bg-elevation-elevation-2",
1025
+ weekday: "size-8 text-body-3 font-regular text-text-tertiary",
1026
+ month_grid: "border-separate border-spacing-x-0 border-spacing-y-1",
1027
+ week: "overflow-hidden rounded-medium",
1028
+ day: "size-8 text-body-2 font-medium text-text-secondary",
1029
+ day_button: "size-8 cursor-pointer rounded-full hover:border hover:border-border-focused",
1030
+ outside: "!text-text-disabled",
1031
+ selected: utils.cn(
1032
+ "[&>button]:bg-solid-primary-default",
1033
+ "[&>button]:text-text-inverse",
1034
+ "[&>button]:border-0",
1035
+ "[&>button]:hover:border-0"
1036
+ ),
1037
+ range_start: utils.cn(
1038
+ "rounded-none",
1039
+ isRangeComplete && "[background:linear-gradient(to_right,transparent_50%,var(--color-elevation-elevation-2)_50%)]"
1040
+ ),
1041
+ range_end: utils.cn(
1042
+ "rounded-none",
1043
+ isRangeComplete && "[background:linear-gradient(to_left,transparent_50%,var(--color-elevation-elevation-2)_50%)]"
1044
+ ),
1045
+ range_middle: utils.cn(
1046
+ "bg-elevation-elevation-2 rounded-none",
1047
+ "[&>button]:!bg-transparent",
1048
+ "[&>button]:!text-text-secondary"
1049
+ )
1050
+ };
1007
1051
  return /* @__PURE__ */ jsxRuntime.jsx(
1008
1052
  reactDayPicker.DayPicker,
1009
1053
  {
@@ -1026,64 +1070,11 @@ function DatePicker({ type = "single", showOutsideDays = true, ...rest }) {
1026
1070
  DayButton: DatePickerDayButton,
1027
1071
  ...dayPickerProps.components
1028
1072
  },
1029
- classNames: {
1030
- root: utils.cn(
1031
- defaultClassNames.root,
1032
- "rounded-medium border border-border-primary bg-background-overlay p-4 shadow-medium"
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
- }
1073
+ classNames: mergeClassNames(dayPickerClassNames, dayPickerProps.classNames),
1074
+ modifiersClassNames: mergeClassNames(
1075
+ { today: "rdp-calendar-today" },
1076
+ dayPickerProps.modifiersClassNames
1077
+ )
1087
1078
  }
1088
1079
  );
1089
1080
  }
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 { getDefaultClassNames, DayPicker } from 'react-day-picker';
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';
@@ -935,6 +935,16 @@ var Switch = forwardRef(
935
935
  }
936
936
  );
937
937
  Switch.displayName = SwitchPrimitives.Root.displayName;
938
+ function mergeClassNames(base, user) {
939
+ if (!user) {
940
+ return base;
941
+ }
942
+ const merged = { ...base };
943
+ for (const key in user) {
944
+ merged[key] = cn(base[key], user[key]);
945
+ }
946
+ return merged;
947
+ }
938
948
  function DatePickerChevron({ orientation }) {
939
949
  if (orientation === "left") {
940
950
  return /* @__PURE__ */ jsx(ChevronLeft, { type: "regular", className: "size-5" });
@@ -963,7 +973,6 @@ function DatePickerDayButton({
963
973
  }
964
974
  function DatePicker({ type = "single", showOutsideDays = true, ...rest }) {
965
975
  const dayPickerProps = { ...rest, mode: type };
966
- const defaultClassNames = getDefaultClassNames();
967
976
  const [month, setMonth] = useState(
968
977
  dayPickerProps.month ?? dayPickerProps.defaultMonth ?? /* @__PURE__ */ new Date()
969
978
  );
@@ -979,6 +988,41 @@ function DatePicker({ type = "single", showOutsideDays = true, ...rest }) {
979
988
  }
980
989
  dayPickerProps.onDayClick?.(day, modifiers, e);
981
990
  };
991
+ const dayPickerClassNames = {
992
+ root: "rounded-medium",
993
+ months: "relative",
994
+ month: "flex flex-col gap-2",
995
+ month_caption: "flex h-7 items-center px-0.5",
996
+ caption_label: "text-body-2 font-semibold text-text-primary",
997
+ nav: "absolute right-0 top-0 flex h-7 items-center gap-2",
998
+ button_previous: "flex size-7 items-center justify-center rounded-medium hover:bg-elevation-elevation-2",
999
+ button_next: "flex size-7 items-center justify-center rounded-medium hover:bg-elevation-elevation-2",
1000
+ weekday: "size-8 text-body-3 font-regular text-text-tertiary",
1001
+ month_grid: "border-separate border-spacing-x-0 border-spacing-y-1",
1002
+ week: "overflow-hidden rounded-medium",
1003
+ day: "size-8 text-body-2 font-medium text-text-secondary",
1004
+ day_button: "size-8 cursor-pointer rounded-full hover:border hover:border-border-focused",
1005
+ outside: "!text-text-disabled",
1006
+ selected: cn(
1007
+ "[&>button]:bg-solid-primary-default",
1008
+ "[&>button]:text-text-inverse",
1009
+ "[&>button]:border-0",
1010
+ "[&>button]:hover:border-0"
1011
+ ),
1012
+ range_start: cn(
1013
+ "rounded-none",
1014
+ isRangeComplete && "[background:linear-gradient(to_right,transparent_50%,var(--color-elevation-elevation-2)_50%)]"
1015
+ ),
1016
+ range_end: cn(
1017
+ "rounded-none",
1018
+ isRangeComplete && "[background:linear-gradient(to_left,transparent_50%,var(--color-elevation-elevation-2)_50%)]"
1019
+ ),
1020
+ range_middle: cn(
1021
+ "bg-elevation-elevation-2 rounded-none",
1022
+ "[&>button]:!bg-transparent",
1023
+ "[&>button]:!text-text-secondary"
1024
+ )
1025
+ };
982
1026
  return /* @__PURE__ */ jsx(
983
1027
  DayPicker,
984
1028
  {
@@ -1001,64 +1045,11 @@ function DatePicker({ type = "single", showOutsideDays = true, ...rest }) {
1001
1045
  DayButton: DatePickerDayButton,
1002
1046
  ...dayPickerProps.components
1003
1047
  },
1004
- classNames: {
1005
- root: cn(
1006
- defaultClassNames.root,
1007
- "rounded-medium border border-border-primary bg-background-overlay p-4 shadow-medium"
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
- }
1048
+ classNames: mergeClassNames(dayPickerClassNames, dayPickerProps.classNames),
1049
+ modifiersClassNames: mergeClassNames(
1050
+ { today: "rdp-calendar-today" },
1051
+ dayPickerProps.modifiersClassNames
1052
+ )
1062
1053
  }
1063
1054
  );
1064
1055
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exem-ui/react",
3
- "version": "0.3.4-next.20260824050435",
3
+ "version": "0.3.4-next.20260828070546",
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.20260824050435"
103
+ "@exem-ui/core": "0.3.3-next.20260828070546"
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.20260824050435"
139
+ "@exem-ui/tailwindcss3": "0.3.2-next.20260828070546"
140
140
  },
141
141
  "scripts": {
142
142
  "generate": "node scripts/generate-icons.js",