@firecms/ui 3.0.0-canary.136 → 3.0.0-canary.138

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.
Files changed (36) hide show
  1. package/README.md +1 -1
  2. package/dist/hooks/index.d.ts +0 -1
  3. package/dist/index.css +0 -4
  4. package/dist/index.es.js +141 -965
  5. package/dist/index.es.js.map +1 -1
  6. package/dist/index.umd.js +143 -966
  7. package/dist/index.umd.js.map +1 -1
  8. package/package.json +2 -3
  9. package/src/components/Autocomplete.tsx +1 -0
  10. package/src/components/Avatar.tsx +1 -1
  11. package/src/components/BooleanSwitchWithLabel.tsx +1 -0
  12. package/src/components/Card.tsx +1 -0
  13. package/src/components/Collapse.tsx +1 -0
  14. package/src/components/DateTimeField.tsx +133 -907
  15. package/src/components/DebouncedTextField.tsx +1 -0
  16. package/src/components/Dialog.tsx +1 -0
  17. package/src/components/DialogContent.tsx +1 -1
  18. package/src/components/DialogTitle.tsx +3 -2
  19. package/src/components/ExpandablePanel.tsx +3 -0
  20. package/src/components/FileUpload.tsx +1 -0
  21. package/src/components/InputLabel.tsx +0 -1
  22. package/src/components/Markdown.tsx +1 -0
  23. package/src/components/MultiSelect.tsx +2 -1
  24. package/src/components/Popover.tsx +1 -0
  25. package/src/components/SearchBar.tsx +1 -0
  26. package/src/components/Select.tsx +21 -28
  27. package/src/components/Sheet.tsx +1 -1
  28. package/src/components/TextField.tsx +3 -2
  29. package/src/components/TextareaAutosize.tsx +1 -0
  30. package/src/components/Tooltip.tsx +1 -0
  31. package/src/hooks/index.ts +0 -1
  32. package/src/index.css +0 -4
  33. package/dist/components/_MultiSelect.d.ts +0 -0
  34. package/dist/hooks/useLocaleConfig.d.ts +0 -1
  35. package/src/components/_MultiSelect.tsx +0 -222
  36. package/src/hooks/useLocaleConfig.tsx +0 -18
package/dist/index.es.js CHANGED
@@ -4,9 +4,6 @@ import React__default, { useEffect, useState, useCallback, useRef, useMemo, Chil
4
4
  import * as Collapsible from "@radix-ui/react-collapsible";
5
5
  import { clsx } from "clsx";
6
6
  import { twMerge } from "tailwind-merge";
7
- import * as locales from "date-fns/locale";
8
- import * as RDP from "react-datepicker";
9
- import { registerLocale, setDefaultLocale } from "react-datepicker";
10
7
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
11
8
  import "material-icons/iconfont/filled.css";
12
9
  import * as DialogPrimitive from "@radix-ui/react-dialog";
@@ -128,18 +125,6 @@ function keyToIconComponent(key) {
128
125
  }).join("") + "Icon";
129
126
  return componentName;
130
127
  }
131
- function useLocaleConfig(locale) {
132
- useEffect(() => {
133
- if (!locale) {
134
- return;
135
- }
136
- const dateFnsLocale = locales[locale];
137
- if (dateFnsLocale) {
138
- registerLocale(locale, dateFnsLocale);
139
- setDefaultLocale(locale);
140
- }
141
- }, [locale]);
142
- }
143
128
  function useInjectStyles(key, styles2) {
144
129
  useEffect(() => {
145
130
  const styleElement = document.getElementById(key);
@@ -389,7 +374,7 @@ const AvatarInner = ({
389
374
  ...props,
390
375
  className: cls(
391
376
  "rounded-full flex items-center justify-center overflow-hidden",
392
- "p-1 hover:bg-slate-200 hover:dark:bg-slate-700 w-12 h-12",
377
+ "p-1 hover:bg-slate-200 hover:dark:bg-slate-700 w-12 h-12 min-w-12 min-h-12",
393
378
  outerClassName
394
379
  ),
395
380
  children: src ? /* @__PURE__ */ jsx(
@@ -13841,7 +13826,6 @@ function Typography({
13841
13826
  }
13842
13827
  );
13843
13828
  }
13844
- const DatePicker = RDP.default.default || RDP.default || RDP;
13845
13829
  const DateTimeField = ({
13846
13830
  value,
13847
13831
  label,
@@ -13856,18 +13840,56 @@ const DateTimeField = ({
13856
13840
  inputClassName,
13857
13841
  invisible,
13858
13842
  locale
13843
+ // Note: The 'locale' prop is not utilized with native inputs as they are managed by the browser.
13859
13844
  }) => {
13860
- const ref = useRef(null);
13861
13845
  const inputRef = useRef(null);
13862
- const [focused, setFocused] = React__default.useState(document.activeElement === inputRef.current);
13863
- const hasValue = value !== void 0 && value !== null;
13846
+ const [focused, setFocused] = useState(false);
13864
13847
  const invalidValue = value !== void 0 && value !== null && !(value instanceof Date);
13865
- useInjectStyles("DateTimeField", datePickerCss);
13848
+ useInjectStyles("DateTimeField", inputStyles);
13866
13849
  const handleClear = (e) => {
13867
13850
  e.preventDefault();
13868
13851
  onChange?.(null);
13869
13852
  };
13853
+ const valueAsInputValue = (dateValue, mode2) => {
13854
+ if (!dateValue) {
13855
+ return "";
13856
+ }
13857
+ const pad = (n) => n.toString().padStart(2, "0");
13858
+ const year = dateValue.getFullYear();
13859
+ const month = pad(dateValue.getMonth() + 1);
13860
+ const day = pad(dateValue.getDate());
13861
+ if (mode2 === "date") {
13862
+ return `${year}-${month}-${day}`;
13863
+ } else {
13864
+ const hours = pad(dateValue.getHours());
13865
+ const minutes = pad(dateValue.getMinutes());
13866
+ return `${year}-${month}-${day}T${hours}:${minutes}`;
13867
+ }
13868
+ };
13869
+ const handleInputChange = (e) => {
13870
+ const inputValue = e.target.value;
13871
+ if (!inputValue) {
13872
+ onChange?.(null);
13873
+ return;
13874
+ }
13875
+ let newDate = null;
13876
+ try {
13877
+ if (mode === "date_time") {
13878
+ const [datePart, timePart] = inputValue.split("T");
13879
+ const [year, month, day] = datePart.split("-").map(Number);
13880
+ const [hours, minutes] = timePart.split(":").map(Number);
13881
+ newDate = new Date(year, month - 1, day, hours, minutes);
13882
+ } else {
13883
+ const [year, month, day] = inputValue.split("-").map(Number);
13884
+ newDate = new Date(year, month - 1, day);
13885
+ }
13886
+ } catch (e2) {
13887
+ newDate = null;
13888
+ }
13889
+ onChange?.(newDate);
13890
+ };
13870
13891
  return /* @__PURE__ */ jsxs(Fragment, { children: [
13892
+ /* @__PURE__ */ jsx("style", { children: inputStyles }),
13871
13893
  /* @__PURE__ */ jsxs(
13872
13894
  "div",
13873
13895
  {
@@ -13882,6 +13904,11 @@ const DateTimeField = ({
13882
13904
  className
13883
13905
  ),
13884
13906
  style,
13907
+ onClick: () => {
13908
+ if (!disabled) {
13909
+ inputRef.current?.focus();
13910
+ }
13911
+ },
13885
13912
  children: [
13886
13913
  label && /* @__PURE__ */ jsx(
13887
13914
  InputLabel,
@@ -13891,33 +13918,26 @@ const DateTimeField = ({
13891
13918
  !error ? focused ? "text-primary" : "text-text-secondary dark:text-text-secondary-dark" : "text-red-500 dark:text-red-500",
13892
13919
  disabled ? "opacity-50" : ""
13893
13920
  ),
13894
- shrink: hasValue || focused,
13921
+ shrink: true,
13895
13922
  children: label
13896
13923
  }
13897
13924
  ),
13898
13925
  /* @__PURE__ */ jsx(
13899
- DatePicker,
13926
+ "input",
13900
13927
  {
13901
- ref,
13902
- locale,
13903
- selected: (invalidValue ? null : value) ?? null,
13904
- onChange,
13905
- disabled: false,
13906
- popperClassName: cls(paperMixin, "my-4 shadow"),
13928
+ ref: inputRef,
13929
+ type: mode === "date_time" ? "datetime-local" : "date",
13930
+ value: valueAsInputValue(value ?? null, mode),
13931
+ onChange: handleInputChange,
13907
13932
  onFocus: () => setFocused(true),
13908
13933
  onBlur: () => setFocused(false),
13909
- showTimeSelect: mode === "date_time",
13910
- timeFormat: "HH:mm",
13911
- timeIntervals: 15,
13912
- timeCaption: "time",
13913
- dateFormat: mode === "date_time" ? "Pp" : "P",
13914
- preventOpenOnFocus: true,
13934
+ disabled,
13915
13935
  className: cls(
13916
13936
  "w-full outline-none bg-transparent leading-normal text-base px-3",
13917
13937
  clearable ? "pr-14" : "pr-12",
13918
13938
  "rounded-md",
13919
13939
  size === "small" ? "min-h-[48px]" : "min-h-[64px]",
13920
- label ? "pt-[28px] pb-2" : "py-2",
13940
+ label ? "pt-8 pb-2" : "py-2",
13921
13941
  inputClassName,
13922
13942
  disabled && "border border-transparent outline-none opacity-50 dark:opacity-50 text-slate-600 dark:text-slate-500"
13923
13943
  )
@@ -13926,10 +13946,11 @@ const DateTimeField = ({
13926
13946
  /* @__PURE__ */ jsx(
13927
13947
  IconButton,
13928
13948
  {
13929
- onClick: () => {
13930
- return ref.current?.setOpen(true);
13949
+ onClick: (e) => {
13950
+ e.stopPropagation();
13951
+ inputRef.current?.showPicker();
13931
13952
  },
13932
- className: "absolute right-3 top-1/2 transform -translate-y-1/2 !text-slate-500 ",
13953
+ className: "absolute right-3 top-1/2 transform -translate-y-1/2 !text-slate-500",
13933
13954
  children: /* @__PURE__ */ jsx(CalendarMonthIcon, { color: "disabled" })
13934
13955
  }
13935
13956
  ),
@@ -13944,863 +13965,28 @@ const DateTimeField = ({
13944
13965
  ]
13945
13966
  }
13946
13967
  ),
13947
- invalidValue && /* @__PURE__ */ jsxs(
13948
- "div",
13949
- {
13950
- className: "flex items-center m-2",
13951
- children: [
13952
- /* @__PURE__ */ jsx(ErrorIcon, { size: "small", color: "error" }),
13953
- /* @__PURE__ */ jsxs("div", { className: "pl-2", children: [
13954
- /* @__PURE__ */ jsx(
13955
- Typography,
13956
- {
13957
- variant: "body2",
13958
- className: "font-medium",
13959
- children: "Invalid date value for this field"
13960
- }
13961
- ),
13962
- /* @__PURE__ */ jsx(Typography, { variant: "body2", children: `The provided value is: ${JSON.stringify(value)}` })
13963
- ] })
13964
- ]
13965
- }
13966
- )
13968
+ invalidValue && /* @__PURE__ */ jsxs("div", { className: "flex items-center m-2", children: [
13969
+ /* @__PURE__ */ jsx(ErrorIcon, { size: "small", color: "error" }),
13970
+ /* @__PURE__ */ jsxs("div", { className: "pl-2", children: [
13971
+ /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "font-medium", children: "Invalid date value for this field" }),
13972
+ /* @__PURE__ */ jsx(Typography, { variant: "body2", children: `The provided value is: ${JSON.stringify(value)}` })
13973
+ ] })
13974
+ ] })
13967
13975
  ] });
13968
13976
  };
13969
- const datePickerCss = `
13970
- .react-datepicker__year-read-view--down-arrow,
13971
- .react-datepicker__month-read-view--down-arrow,
13972
- .react-datepicker__month-year-read-view--down-arrow, .react-datepicker__navigation-icon::before {
13973
- border-color: #ccc;
13974
- border-style: solid;
13975
- border-width: 3px 3px 0 0;
13976
- content: "";
13977
- display: block;
13978
- height: 9px;
13979
- position: absolute;
13980
- top: 6px;
13981
- width: 9px;
13982
- }
13983
-
13984
- .react-datepicker-wrapper {
13985
- width: 100%;
13986
- height: 100%;
13987
- display: flex;
13988
- padding: 0;
13989
- border: 0;
13990
- }
13991
-
13992
- .react-datepicker {
13993
- font-size: 0.875rem;
13994
- color: #111;
13995
- display: flex;
13996
- position: relative;
13997
- }
13998
-
13999
- .react-datepicker--time-only .react-datepicker__time-container {
14000
- border-left: 0;
14001
- }
14002
- .react-datepicker--time-only .react-datepicker__time,
14003
- .react-datepicker--time-only .react-datepicker__time-box {
14004
- border-bottom-left-radius: 4px;
14005
- border-bottom-right-radius: 4px;
14006
- }
14007
-
14008
- .react-datepicker__triangle {
14009
- display: none;
14010
- }
14011
-
14012
- .react-datepicker-popper {
14013
- z-index: 100;
14014
- min-width: 348px;
14015
- }
14016
-
14017
- .react-datepicker__header {
14018
- text-align: center;
14019
- background-color: #f0f0f0;
14020
- border-bottom: 1px solid #e7e7e9;
14021
- border-top-left-radius: 4px;
14022
- padding: 16px;
14023
- position: relative;
14024
- }
14025
- .react-datepicker__header--time {
14026
- padding-bottom: 8px;
14027
- padding-left: 5px;
14028
- padding-right: 5px;
14029
- }
14030
- .react-datepicker__header--time:not(.react-datepicker__header--time--only) {
14031
- border-top-left-radius: 0;
14032
- }
14033
- .react-datepicker__header:not(.react-datepicker__header--has-time-select) {
14034
- border-top-right-radius: 4px;
14035
- }
14036
-
14037
- .react-datepicker__year-dropdown-container--select,
14038
- .react-datepicker__month-dropdown-container--select,
14039
- .react-datepicker__month-year-dropdown-container--select,
14040
- .react-datepicker__year-dropdown-container--scroll,
14041
- .react-datepicker__month-dropdown-container--scroll,
14042
- .react-datepicker__month-year-dropdown-container--scroll {
14043
- display: inline-block;
14044
- margin: 0 15px;
14045
- }
14046
-
14047
- .react-datepicker__current-month,
14048
- .react-datepicker-time__header,
14049
- .react-datepicker-year-header {
14050
- margin-top: 0;
14051
- color: #000;
14052
- font-weight: 500;
14053
- font-size: 0.875rem;
14054
- }
14055
-
14056
- .react-datepicker-time__header {
14057
- text-overflow: ellipsis;
14058
- white-space: nowrap;
14059
- overflow: hidden;
14060
- }
14061
-
14062
- .react-datepicker__navigation {
14063
- align-items: center;
14064
- background: none;
14065
- display: flex;
14066
- justify-content: center;
14067
- text-align: center;
14068
- cursor: pointer;
14069
- position: absolute;
14070
- top: 2px;
14071
- padding: 0;
14072
- border: none;
14073
- z-index: 1;
14074
- height: 32px;
14075
- width: 32px;
14076
- text-indent: -999em;
14077
- overflow: hidden;
14078
- }
14079
- .react-datepicker__navigation--previous {
14080
- top: 12px;
14081
- left: 4px;
14082
- }
14083
- .react-datepicker__navigation--next {
14084
- top: 12px;
14085
- right: 4px;
14086
- }
14087
- .react-datepicker__navigation--next--with-time:not(.react-datepicker__navigation--next--with-today-button) {
14088
- right: 85px;
14089
- }
14090
- .react-datepicker__navigation--years {
14091
- position: relative;
14092
- top: 0;
14093
- display: block;
14094
- margin-left: auto;
14095
- margin-right: auto;
14096
- }
14097
- .react-datepicker__navigation--years-previous {
14098
- top: 4px;
14099
- }
14100
- .react-datepicker__navigation--years-upcoming {
14101
- top: -4px;
14102
- }
14103
- .react-datepicker__navigation:hover *::before {
14104
- border-color: #a6a6a6;
14105
- }
14106
-
14107
- .react-datepicker__navigation-icon {
14108
- position: relative;
14109
- top: -1px;
14110
- font-size: 20px;
14111
- width: 0;
14112
- }
14113
- .react-datepicker__navigation-icon--next {
14114
- left: -2px;
14115
- }
14116
- .react-datepicker__navigation-icon--next::before {
14117
- transform: rotate(45deg);
14118
- left: -7px;
14119
- }
14120
- .react-datepicker__navigation-icon--previous {
14121
- right: -2px;
14122
- }
14123
- .react-datepicker__navigation-icon--previous::before {
14124
- transform: rotate(225deg);
14125
- right: -7px;
14126
- }
14127
-
14128
-
14129
- .react-datepicker__year {
14130
- margin: 0.4rem;
14131
- text-align: center;
14132
- }
14133
- .react-datepicker__year-wrapper {
14134
- display: flex;
14135
- flex-wrap: wrap;
14136
- max-width: 180px;
14137
- }
14138
- .react-datepicker__year .react-datepicker__year-text {
14139
- display: inline-block;
14140
- width: 4rem;
14141
- margin: 2px;
14142
- }
14143
-
14144
- .react-datepicker__month {
14145
- margin: 16px;
14146
- text-align: center;
14147
- }
14148
- .react-datepicker__month .react-datepicker__month-text,
14149
- .react-datepicker__month .react-datepicker__quarter-text {
14150
- display: inline-block;
14151
- width: 4rem;
14152
- margin: 2px;
14153
- }
14154
-
14155
- .react-datepicker__input-time-container {
14156
- display: flex;
14157
- width: 100%;
14158
- height: 100%;
14159
- margin: 5px 0 10px 15px;
14160
- text-align: left;
14161
- }
14162
- .react-datepicker__input-time-container .react-datepicker-time__caption {
14163
- display: inline-block;
14164
- }
14165
- .react-datepicker__input-time-container .react-datepicker-time__input-container {
14166
- display: inline-block;
14167
- }
14168
- .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input {
14169
- display: inline-block;
14170
- margin-left: 10px;
14171
- }
14172
- .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input {
14173
- width: auto;
14174
- }
14175
- .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]::-webkit-inner-spin-button,
14176
- .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]::-webkit-outer-spin-button {
14177
- -webkit-appearance: none;
14178
- margin: 0;
14179
- }
14180
- .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time] {
14181
- -moz-appearance: textfield;
14182
- }
14183
- .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__delimiter {
14184
- margin-left: 5px;
14185
- display: inline-block;
14186
- }
14187
-
14188
- .react-datepicker__time-container {
14189
- float: right;
14190
- border-left: 1px solid #e7e7e9;
14191
- width: 85px;
14192
- height: 320px;
14193
- }
14194
- .react-datepicker__time-container--with-today-button {
14195
- display: inline;
14196
- border: 1px solid #e7e7e9;
14197
- border-radius: 4px;
14198
- position: absolute;
14199
- right: -87px;
14200
- top: 0;
14201
- }
14202
- .react-datepicker__time-container .react-datepicker__time {
14203
- position: relative;
14204
- border-bottom-right-radius: 4px;
14205
- }
14206
- .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box {
14207
- width: 85px;
14208
- overflow-x: hidden;
14209
- margin: 0 auto;
14210
- text-align: center;
14211
- border-bottom-right-radius: 4px;
14212
- }
14213
- .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list {
14214
- list-style: none;
14215
- margin: 0;
14216
- height: calc(195px + (1.7rem / 2));
14217
- overflow-y: scroll;
14218
- padding-right: 0;
14219
- padding-left: 0;
14220
- width: 100%;
14221
- height: 100%;
14222
- box-sizing: content-box;
14223
- }
14224
- .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item {
14225
- height: 28px;
14226
- padding: 5px 10px;
14227
- white-space: nowrap;
14228
- }
14229
- .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item:hover {
14230
- cursor: pointer;
14231
- }
14232
- .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected {
14233
- background-color: #5193f6;
14234
- color: white;
14235
- font-weight: 500;
14236
- }
14237
- .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected:hover {
14238
- background-color: #5193f6;
14239
- }
14240
- .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--disabled {
14241
- color: #ccc;
14242
- }
14243
- .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--disabled:hover {
14244
- cursor: default;
14245
- }
14246
-
14247
- .react-datepicker__week-number {
14248
- color: #ccc;
14249
- display: inline-block;
14250
- width: 1.7rem;
14251
- line-height: 1.7rem;
14252
- text-align: center;
14253
- padding: 2px;
14254
- margin: 2px;
14255
- }
14256
- .react-datepicker__week-number.react-datepicker__week-number--clickable {
14257
- cursor: pointer;
14258
- }
14259
- .react-datepicker__week-number.react-datepicker__week-number--clickable:hover {
14260
- border-radius: 4px;
14261
- background-color: #f0f0f0;
14262
- }
14263
-
14264
- .react-datepicker__day-names,
14265
- .react-datepicker__week {
14266
- white-space: nowrap;
14267
- }
14268
-
14269
- .react-datepicker__day-names {
14270
- margin-bottom: -8px;
14271
- }
14272
-
14273
- .react-datepicker__day-name,
14274
- .react-datepicker__day,
14275
- .react-datepicker__time-name {
14276
- color: #000;
14277
- display: inline-block;
14278
- width: 1.7rem;
14279
- line-height: 1.7rem;
14280
- text-align: center;
14281
- padding: 2px;
14282
- margin: 2px;
14283
- }
14284
-
14285
- .react-datepicker__month-container{
14286
- flex-grow: 1;
14287
- }
14288
-
14289
- .react-datepicker__day,
14290
- .react-datepicker__month-text,
14291
- .react-datepicker__quarter-text,
14292
- .react-datepicker__year-text {
14293
- width: 32px;
14294
- cursor: pointer;
14295
- }
14296
- .react-datepicker__day:hover,
14297
- .react-datepicker__month-text:hover,
14298
- .react-datepicker__quarter-text:hover,
14299
- .react-datepicker__year-text:hover {
14300
- border-radius: 100%;
14301
- background-color: #f0f0f0;
14302
- }
14303
- .react-datepicker__day--today,
14304
- .react-datepicker__month-text--today,
14305
- .react-datepicker__quarter-text--today,
14306
- .react-datepicker__year-text--today {
14307
- font-weight: 500;
14308
- }
14309
- .react-datepicker__day--highlighted,
14310
- .react-datepicker__month-text--highlighted,
14311
- .react-datepicker__quarter-text--highlighted,
14312
- .react-datepicker__year-text--highlighted {
14313
- border-radius: 100%;
14314
- background-color: #3dcc4a;
14315
- color: #fff;
14316
- }
14317
- .react-datepicker__day--highlighted:hover,
14318
- .react-datepicker__month-text--highlighted:hover,
14319
- .react-datepicker__quarter-text--highlighted:hover,
14320
- .react-datepicker__year-text--highlighted:hover {
14321
- background-color: #32be3f;
14322
- }
14323
- .react-datepicker__day--highlighted-custom-1,
14324
- .react-datepicker__month-text--highlighted-custom-1,
14325
- .react-datepicker__quarter-text--highlighted-custom-1,
14326
- .react-datepicker__year-text--highlighted-custom-1 {
14327
- color: magenta;
14328
- }
14329
- .react-datepicker__day--highlighted-custom-2,
14330
- .react-datepicker__month-text--highlighted-custom-2,
14331
- .react-datepicker__quarter-text--highlighted-custom-2,
14332
- .react-datepicker__year-text--highlighted-custom-2 {
14333
- color: green;
14334
- }
14335
- .react-datepicker__day--selected, .react-datepicker__day--in-selecting-range, .react-datepicker__day--in-range,
14336
- .react-datepicker__month-text--selected,
14337
- .react-datepicker__month-text--in-selecting-range,
14338
- .react-datepicker__month-text--in-range,
14339
- .react-datepicker__quarter-text--selected,
14340
- .react-datepicker__quarter-text--in-selecting-range,
14341
- .react-datepicker__quarter-text--in-range,
14342
- .react-datepicker__year-text--selected,
14343
- .react-datepicker__year-text--in-selecting-range,
14344
- .react-datepicker__year-text--in-range {
14345
- border-radius: 100%;
14346
- background-color: #186ef0;
14347
- color: #fff;
14348
- }
14349
- .react-datepicker__day--selected:hover, .react-datepicker__day--in-selecting-range:hover, .react-datepicker__day--in-range:hover,
14350
- .react-datepicker__month-text--selected:hover,
14351
- .react-datepicker__month-text--in-selecting-range:hover,
14352
- .react-datepicker__month-text--in-range:hover,
14353
- .react-datepicker__quarter-text--selected:hover,
14354
- .react-datepicker__quarter-text--in-selecting-range:hover,
14355
- .react-datepicker__quarter-text--in-range:hover,
14356
- .react-datepicker__year-text--selected:hover,
14357
- .react-datepicker__year-text--in-selecting-range:hover,
14358
- .react-datepicker__year-text--in-range:hover {
14359
- background-color: #5698f9;
14360
- }
14361
- // .react-datepicker__day--keyboard-selected,
14362
- // .react-datepicker__month-text--keyboard-selected,
14363
- // .react-datepicker__quarter-text--keyboard-selected,
14364
- // .react-datepicker__year-text--keyboard-selected {
14365
- // border-radius: 100%;
14366
- // background-color: #5193f6;
14367
- // color: rgb(0, 0, 0);
14368
- // }
14369
- // .react-datepicker__day--keyboard-selected:hover,
14370
- // .react-datepicker__month-text--keyboard-selected:hover,
14371
- // .react-datepicker__quarter-text--keyboard-selected:hover,
14372
- // .react-datepicker__year-text--keyboard-selected:hover {
14373
- // background-color: #5193f6;
14374
- // }
14375
- .react-datepicker__day--in-selecting-range:not(.react-datepicker__day--in-range,
14376
- .react-datepicker__month-text--in-range,
14377
- .react-datepicker__quarter-text--in-range,
14378
- .react-datepicker__year-text--in-range),
14379
- .react-datepicker__month-text--in-selecting-range:not(.react-datepicker__day--in-range,
14380
- .react-datepicker__month-text--in-range,
14381
- .react-datepicker__quarter-text--in-range,
14382
- .react-datepicker__year-text--in-range),
14383
- .react-datepicker__quarter-text--in-selecting-range:not(.react-datepicker__day--in-range,
14384
- .react-datepicker__month-text--in-range,
14385
- .react-datepicker__quarter-text--in-range,
14386
- .react-datepicker__year-text--in-range),
14387
- .react-datepicker__year-text--in-selecting-range:not(.react-datepicker__day--in-range,
14388
- .react-datepicker__month-text--in-range,
14389
- .react-datepicker__quarter-text--in-range,
14390
- .react-datepicker__year-text--in-range) {
14391
- background-color: rgba(33, 107, 165, 0.5);
14392
- }
14393
- .react-datepicker__month--selecting-range .react-datepicker__day--in-range:not(.react-datepicker__day--in-selecting-range,
14394
- .react-datepicker__month-text--in-selecting-range,
14395
- .react-datepicker__quarter-text--in-selecting-range,
14396
- .react-datepicker__year-text--in-selecting-range), .react-datepicker__year--selecting-range .react-datepicker__day--in-range:not(.react-datepicker__day--in-selecting-range,
14397
- .react-datepicker__month-text--in-selecting-range,
14398
- .react-datepicker__quarter-text--in-selecting-range,
14399
- .react-datepicker__year-text--in-selecting-range),
14400
- .react-datepicker__month--selecting-range .react-datepicker__month-text--in-range:not(.react-datepicker__day--in-selecting-range,
14401
- .react-datepicker__month-text--in-selecting-range,
14402
- .react-datepicker__quarter-text--in-selecting-range,
14403
- .react-datepicker__year-text--in-selecting-range),
14404
- .react-datepicker__year--selecting-range .react-datepicker__month-text--in-range:not(.react-datepicker__day--in-selecting-range,
14405
- .react-datepicker__month-text--in-selecting-range,
14406
- .react-datepicker__quarter-text--in-selecting-range,
14407
- .react-datepicker__year-text--in-selecting-range),
14408
- .react-datepicker__month--selecting-range .react-datepicker__quarter-text--in-range:not(.react-datepicker__day--in-selecting-range,
14409
- .react-datepicker__month-text--in-selecting-range,
14410
- .react-datepicker__quarter-text--in-selecting-range,
14411
- .react-datepicker__year-text--in-selecting-range),
14412
- .react-datepicker__year--selecting-range .react-datepicker__quarter-text--in-range:not(.react-datepicker__day--in-selecting-range,
14413
- .react-datepicker__month-text--in-selecting-range,
14414
- .react-datepicker__quarter-text--in-selecting-range,
14415
- .react-datepicker__year-text--in-selecting-range),
14416
- .react-datepicker__month--selecting-range .react-datepicker__year-text--in-range:not(.react-datepicker__day--in-selecting-range,
14417
- .react-datepicker__month-text--in-selecting-range,
14418
- .react-datepicker__quarter-text--in-selecting-range,
14419
- .react-datepicker__year-text--in-selecting-range),
14420
- .react-datepicker__year--selecting-range .react-datepicker__year-text--in-range:not(.react-datepicker__day--in-selecting-range,
14421
- .react-datepicker__month-text--in-selecting-range,
14422
- .react-datepicker__quarter-text--in-selecting-range,
14423
- .react-datepicker__year-text--in-selecting-range) {
14424
- background-color: #f0f0f0;
14425
- color: #000;
14426
- }
14427
- .react-datepicker__day--disabled,
14428
- .react-datepicker__month-text--disabled,
14429
- .react-datepicker__quarter-text--disabled,
14430
- .react-datepicker__year-text--disabled {
14431
- cursor: default;
14432
- color: #ccc;
14433
- }
14434
- .react-datepicker__day--disabled:hover,
14435
- .react-datepicker__month-text--disabled:hover,
14436
- .react-datepicker__quarter-text--disabled:hover,
14437
- .react-datepicker__year-text--disabled:hover {
14438
- background-color: transparent;
14439
- }
14440
-
14441
- .react-datepicker__input-container {
14442
- position: relative;
14443
- display: inline-block;
14444
- width: 100%;
14445
- height: 100%;
14446
- }
14447
- .react-datepicker__input-container .react-datepicker__calendar-icon {
14448
- position: absolute;
14449
- padding: 0.5rem;
14450
- }
14451
-
14452
- .react-datepicker__view-calendar-icon input {
14453
- padding: 6px 10px 5px 25px;
14454
- }
14455
-
14456
- .react-datepicker__year-read-view,
14457
- .react-datepicker__month-read-view,
14458
- .react-datepicker__month-year-read-view {
14459
- border: 1px solid transparent;
14460
- border-radius: 4px;
14461
- position: relative;
14462
- }
14463
- .react-datepicker__year-read-view:hover,
14464
- .react-datepicker__month-read-view:hover,
14465
- .react-datepicker__month-year-read-view:hover {
14466
- cursor: pointer;
14467
- }
14468
- .react-datepicker__year-read-view:hover .react-datepicker__year-read-view--down-arrow,
14469
- .react-datepicker__year-read-view:hover .react-datepicker__month-read-view--down-arrow,
14470
- .react-datepicker__month-read-view:hover .react-datepicker__year-read-view--down-arrow,
14471
- .react-datepicker__month-read-view:hover .react-datepicker__month-read-view--down-arrow,
14472
- .react-datepicker__month-year-read-view:hover .react-datepicker__year-read-view--down-arrow,
14473
- .react-datepicker__month-year-read-view:hover .react-datepicker__month-read-view--down-arrow {
14474
- border-top-color: #e7e7e9;
14475
- }
14476
- .react-datepicker__year-read-view--down-arrow,
14477
- .react-datepicker__month-read-view--down-arrow,
14478
- .react-datepicker__month-year-read-view--down-arrow {
14479
- transform: rotate(135deg);
14480
- right: -16px;
14481
- top: 0;
14482
- }
14483
-
14484
- .react-datepicker__year-dropdown,
14485
- .react-datepicker__month-dropdown,
14486
- .react-datepicker__month-year-dropdown {
14487
- background-color: #f0f0f0;
14488
- position: absolute;
14489
- width: 50%;
14490
- left: 25%;
14491
- top: 30px;
14492
- z-index: 1;
14493
- text-align: center;
14494
- border-radius: 4px;
14495
- border: 1px solid #e7e7e9;
14496
- }
14497
- .react-datepicker__year-dropdown:hover,
14498
- .react-datepicker__month-dropdown:hover,
14499
- .react-datepicker__month-year-dropdown:hover {
14500
- cursor: pointer;
14501
- }
14502
- .react-datepicker__year-dropdown--scrollable,
14503
- .react-datepicker__month-dropdown--scrollable,
14504
- .react-datepicker__month-year-dropdown--scrollable {
14505
- height: 150px;
14506
- overflow-y: scroll;
14507
- }
14508
-
14509
- .react-datepicker__year-option,
14510
- .react-datepicker__month-option,
14511
- .react-datepicker__month-year-option {
14512
- line-height: 20px;
14513
- width: 100%;
14514
- display: block;
14515
- margin-left: auto;
14516
- margin-right: auto;
14517
- }
14518
- .react-datepicker__year-option:first-of-type,
14519
- .react-datepicker__month-option:first-of-type,
14520
- .react-datepicker__month-year-option:first-of-type {
14521
- border-top-left-radius: 4px;
14522
- border-top-right-radius: 4px;
14523
- }
14524
- .react-datepicker__year-option:last-of-type,
14525
- .react-datepicker__month-option:last-of-type,
14526
- .react-datepicker__month-year-option:last-of-type {
14527
- -webkit-user-select: none;
14528
- -moz-user-select: none;
14529
- -ms-user-select: none;
14530
- user-select: none;
14531
- border-bottom-left-radius: 4px;
14532
- border-bottom-right-radius: 4px;
14533
- }
14534
- .react-datepicker__year-option:hover,
14535
- .react-datepicker__month-option:hover,
14536
- .react-datepicker__month-year-option:hover {
14537
- background-color: #ccc;
14538
- }
14539
- .react-datepicker__year-option:hover .react-datepicker__navigation--years-upcoming,
14540
- .react-datepicker__month-option:hover .react-datepicker__navigation--years-upcoming,
14541
- .react-datepicker__month-year-option:hover .react-datepicker__navigation--years-upcoming {
14542
- border-bottom-color: #e7e7e9;
14543
- }
14544
- .react-datepicker__year-option:hover .react-datepicker__navigation--years-previous,
14545
- .react-datepicker__month-option:hover .react-datepicker__navigation--years-previous,
14546
- .react-datepicker__month-year-option:hover .react-datepicker__navigation--years-previous {
14547
- border-top-color: #e7e7e9;
14548
- }
14549
- .react-datepicker__year-option--selected,
14550
- .react-datepicker__month-option--selected,
14551
- .react-datepicker__month-year-option--selected {
14552
- position: absolute;
14553
- left: 15px;
14554
- }
14555
-
14556
- .react-datepicker__close-icon {
14557
- cursor: pointer;
14558
- background-color: transparent;
14559
- border: 0;
14560
- outline: 0;
14561
- padding: 0 6px 0 0;
14562
- position: absolute;
14563
- top: 0;
14564
- right: 0;
14565
- height: 100%;
14566
- display: table-cell;
14567
- vertical-align: middle;
14568
- }
14569
- .react-datepicker__close-icon::after {
14570
- cursor: pointer;
14571
- background-color: #5193f6;
14572
- color: #fff;
14573
- border-radius: 50%;
14574
- height: 16px;
14575
- width: 16px;
14576
- padding: 2px;
14577
- font-size: 12px;
14578
- line-height: 1;
14579
- text-align: center;
14580
- display: table-cell;
14581
- vertical-align: middle;
14582
- content: "×";
14583
- }
14584
-
14585
- .react-datepicker__today-button {
14586
- background: #f0f0f0;
14587
- border-top: 1px solid #e7e7e9;
14588
- cursor: pointer;
14589
- text-align: center;
14590
- font-weight: 500;
14591
- padding: 5px 0;
14592
- clear: left;
14593
- }
14594
-
14595
- .react-datepicker__portal {
14596
- position: fixed;
14597
- width: 100vw;
14598
- height: 100vh;
14599
- background-color: rgba(0, 0, 0, 0.8);
14600
- left: 0;
14601
- top: 0;
14602
- justify-content: center;
14603
- align-items: center;
14604
- display: flex;
14605
- z-index: 2147483647;
14606
- }
14607
- .react-datepicker__portal .react-datepicker__day-name,
14608
- .react-datepicker__portal .react-datepicker__day,
14609
- .react-datepicker__portal .react-datepicker__time-name {
14610
- width: 3rem;
14611
- line-height: 3rem;
14612
- }
14613
- @media (max-width: 400px), (max-height: 550px) {
14614
- .react-datepicker__portal .react-datepicker__day-name,
14615
- .react-datepicker__portal .react-datepicker__day,
14616
- .react-datepicker__portal .react-datepicker__time-name {
14617
- width: 2rem;
14618
- line-height: 2rem;
14619
- }
14620
- }
14621
- .react-datepicker__portal .react-datepicker__current-month,
14622
- .react-datepicker__portal .react-datepicker-time__header {
14623
- font-size: 0.875rem;
14624
- }
14625
-
14626
- .react-datepicker__children-container {
14627
- width: 13.8rem;
14628
- margin: 0.4rem;
14629
- padding-right: 0.2rem;
14630
- padding-left: 0.2rem;
14631
- height: auto;
14632
- }
14633
-
14634
- .react-datepicker__aria-live {
14635
- position: absolute;
14636
- clip-path: circle(0);
14637
- border: 0;
14638
- height: 1px;
14639
- margin: -1px;
14640
- overflow: hidden;
14641
- padding: 0;
14642
- width: 1px;
14643
- white-space: nowrap;
14644
- }
14645
-
14646
- .react-datepicker__calendar-icon {
14647
- width: 1em;
14648
- height: 1em;
14649
- vertical-align: -0.125em;
14650
- }
14651
-
14652
-
14653
- :is([data-theme="dark"]) .react-datepicker__year-read-view--down-arrow,
14654
- :is([data-theme="dark"]) .react-datepicker__month-read-view--down-arrow,
14655
- :is([data-theme="dark"]) .react-datepicker__month-year-read-view--down-arrow,
14656
- :is([data-theme="dark"]) .react-datepicker__navigation-icon::before {
14657
- border-color: #999;
14658
- }
14659
-
14660
-
14661
- :is([data-theme="dark"]) .react-datepicker-wrapper,
14662
- :is([data-theme="dark"]) .react-datepicker {
14663
- color: #ccc;
14664
- }
14665
-
14666
- :is([data-theme="dark"]) .react-datepicker__navigation:hover *::before {
14667
- border-color: #e7e7e9;
14668
- }
14669
-
14670
- :is([data-theme="dark"]) .react-datepicker__day-names,
14671
- :is([data-theme="dark"]) .react-datepicker__week {
14672
- color: #ccc;
14673
- }
14674
-
14675
- :is([data-theme="dark"]) .react-datepicker__day,
14676
- :is([data-theme="dark"]) .react-datepicker__month-text,
14677
- :is([data-theme="dark"]) .react-datepicker__quarter-text,
14678
- :is([data-theme="dark"]) .react-datepicker__year-text {
14679
- color: #ccc;
14680
- }
14681
-
14682
- :is([data-theme="dark"]) .react-datepicker__current-month,
14683
- :is([data-theme="dark"]) .react-datepicker-time__header,
14684
- :is([data-theme="dark"]) .react-datepicker-year-header,
14685
- :is([data-theme="dark"]) .react-datepicker__day-name,
14686
- :is([data-theme="dark"]) .react-datepicker__year-dropdown-container--select,
14687
- :is([data-theme="dark"]) .react-datepicker__month-dropdown-container--select,
14688
- :is([data-theme="dark"]) .react-datepicker__month-year-dropdown-container--select,
14689
- :is([data-theme="dark"]) .react-datepicker__year-dropdown-container--scroll,
14690
- :is([data-theme="dark"]) .react-datepicker__month-dropdown-container--scroll,
14691
- :is([data-theme="dark"]) .react-datepicker__month-year-dropdown-container--scroll {
14692
- color: #ccc;
14693
- }
14694
-
14695
- :is([data-theme="dark"]) .react-datepicker__header {
14696
- color: #fff;
14697
- }
14698
-
14699
- :is([data-theme="dark"]) .react-datepicker__day--disabled,
14700
- :is([data-theme="dark"]) .react-datepicker__month-text--disabled,
14701
- :is([data-theme="dark"]) .react-datepicker__quarter-text--disabled,
14702
- :is([data-theme="dark"]) .react-datepicker__year-text--disabled {
14703
- color: #666;
14704
- }
14705
-
14706
- :is([data-theme="dark"]) .react-datepicker__day--highlighted,
14707
- :is([data-theme="dark"]) .react-datepicker__month-text--highlighted,
14708
- :is([data-theme="dark"]) .react-datepicker__quarter-text--highlighted,
14709
- :is([data-theme="dark"]) .react-datepicker__year-text--highlighted {
14710
- background-color: #1a1a1a;
14711
- color: #fff;
14712
- }
14713
-
14714
- :is([data-theme="dark"]) .react-datepicker__day:hover,
14715
- :is([data-theme="dark"]) .react-datepicker__day--in-range:hover,
14716
- :is([data-theme="dark"]) .react-datepicker__day--selected:hover,
14717
- :is([data-theme="dark"]) .react-datepicker__month-text:hover,
14718
- :is([data-theme="dark"]) .react-datepicker__day:hover,
14719
- :is([data-theme="dark"]) .react-datepicker__month-text--in-range:hover,
14720
- :is([data-theme="dark"]) .react-datepicker__month-text--selected:hover,
14721
- :is([data-theme="dark"]) .react-datepicker__quarter-text:hover,
14722
- :is([data-theme="dark"]) .react-datepicker__day:hover,
14723
- :is([data-theme="dark"]) .react-datepicker__quarter-text--in-range:hover,
14724
- :is([data-theme="dark"]) .react-datepicker__quarter-text--selected:hover,
14725
- :is([data-theme="dark"]) .react-datepicker__year-text:hover,
14726
- :is([data-theme="dark"]) .react-datepicker__day:hover,
14727
- :is([data-theme="dark"]) .react-datepicker__year-text--in-range:hover,
14728
- :is([data-theme="dark"]) .react-datepicker__year-text--selected:hover,
14729
- :is([data-theme="dark"]) .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item:hover
14730
- {
14731
- background-color: #262626;
14732
- }
14733
-
14734
- :is([data-theme="dark"]) .react-datepicker__day--selected,
14735
- :is([data-theme="dark"]) .react-datepicker__day--in-range,
14736
- :is([data-theme="dark"]) .react-datepicker__day--in-selecting-range,
14737
- :is([data-theme="dark"]) .react-datepicker__month-text--selected,
14738
- :is([data-theme="dark"]) .react-datepicker__month-text--in-range,
14739
- :is([data-theme="dark"]) .react-datepicker__month-text--in-selecting-range,
14740
- :is([data-theme="dark"]) .react-datepicker__quarter-text--selected,
14741
- :is([data-theme="dark"]) .react-datepicker__quarter-text--in-range,
14742
- :is([data-theme="dark"]) .react-datepicker__quarter-text--in-selecting-range,
14743
- :is([data-theme="dark"]) .react-datepicker__year-text--selected,
14744
- :is([data-theme="dark"]) .react-datepicker__year-text--in-range,
14745
- :is([data-theme="dark"]) .react-datepicker__year-text--in-selecting-range {
14746
- background-color: #0e528f;
14747
- }
14748
-
14749
- // :is([data-theme="dark"]) .react-datepicker__day--keyboard-selected,
14750
- // :is([data-theme="dark"]) .react-datepicker__month-text--keyboard-selected,
14751
- // :is([data-theme="dark"]) .react-datepicker__quarter-text--keyboard-selected,
14752
- // :is([data-theme="dark"]) .react-datepicker__year-text--keyboard-selected {
14753
- // background-color: #0e529f;
14754
- // }
14755
-
14756
- :is([data-theme="dark"]) .react-datepicker__today-button {
14757
- background-color: #262626;
14758
- color: #ccc;
14759
- }
14760
-
14761
- :is([data-theme="dark"]) .react-datepicker__portal {
14762
- background-color: #191919;
14763
- }
14764
-
14765
- :is([data-theme="dark"]) .react-datepicker{
14766
- color: #fff;
14767
- }
14768
-
14769
- :is([data-theme="dark"]) .react-datepicker__time-list{
14770
- background-color: rgba(0, 0, 0, 0.0);
14771
- }
14772
-
14773
- :is([data-theme="dark"]) .react-datepicker__time-container--with-today-button {
14774
- border: 1px solid transparent;
14775
- }
14776
- :is([data-theme="dark"]) .react-datepicker__year-dropdown,
14777
- :is([data-theme="dark"]) .react-datepicker__month-dropdown,
14778
- :is([data-theme="dark"]) .react-datepicker__month-year-dropdown {
14779
- background-color: rgba(0, 0, 0, 0.9);
14780
- border: 1px solid transparent;
14781
- }
14782
-
14783
- :is([data-theme="dark"]) .react-datepicker__header {
14784
- background-color: #191919;
14785
- border-bottom: 1px solid transparent;
14786
- }
14787
-
14788
- :is([data-theme="dark"]) .react-datepicker__time-container {
14789
- border-left: 1px solid transparent;
14790
- }
14791
- :is([data-theme="dark"]) .react-datepicker__time-container .react-datepicker__time {
14792
- background-color: rgba(0, 0, 0, 0.9);
14793
- }
14794
-
14795
- :is([data-theme="dark"]) .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected,
14796
- :is([data-theme="dark"]) .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected {
14797
- background-color: #0e528f;
14798
- }
14799
-
14800
- .react-datepicker__day--outside-month{
14801
- color: #666 !important;
14802
- }
14803
- `;
13977
+ const inputStyles = `
13978
+ /* Hide the default calendar icon in Chrome, Safari, Edge, Opera */
13979
+ input[type="date"]::-webkit-calendar-picker-indicator,
13980
+ input[type="datetime-local"]::-webkit-calendar-picker-indicator {
13981
+ display: none;
13982
+ -webkit-appearance: none;
13983
+ }
13984
+ /* Hide default calendar icon in Firefox */
13985
+ input[type="date"],
13986
+ input[type="datetime-local"] {
13987
+ -moz-appearance:textfield;
13988
+ }
13989
+ `;
14804
13990
  const widthClasses = {
14805
13991
  xs: "max-w-xs min-w-xs w-xs",
14806
13992
  sm: "max-w-sm min-w-sm w-sm",
@@ -14931,7 +14117,7 @@ function DialogContent({
14931
14117
  return /* @__PURE__ */ jsx(
14932
14118
  "div",
14933
14119
  {
14934
- className: cls("py-6 px-6 h-full flex-grow", className),
14120
+ className: cls("my-6 mx-6 h-full flex-grow", className),
14935
14121
  children
14936
14122
  }
14937
14123
  );
@@ -14940,14 +14126,14 @@ function DialogTitle({
14940
14126
  children,
14941
14127
  hidden,
14942
14128
  className,
14943
- variant = "h4",
14129
+ variant = "subtitle2",
14944
14130
  ...props
14945
14131
  }) {
14946
14132
  const title = /* @__PURE__ */ jsx(DialogPrimitive.Title, { asChild: true, children: /* @__PURE__ */ jsx(
14947
14133
  Typography,
14948
14134
  {
14949
14135
  variant,
14950
- className,
14136
+ className: cls("mt-8 mb-6 mx-6", className),
14951
14137
  ...props,
14952
14138
  children
14953
14139
  }
@@ -15034,6 +14220,8 @@ function ExpandablePanel({
15034
14220
  "rounded-t flex items-center justify-between w-full min-h-[52px]",
15035
14221
  "hover:bg-slate-200 hover:bg-opacity-20 dark:hover:bg-gray-800 dark:hover:bg-opacity-20",
15036
14222
  invisible ? "border-b px-2" : "p-4",
14223
+ open ? "py-6" : "py-4",
14224
+ "transition-all duration-200",
15037
14225
  invisible && defaultBorderMixin,
15038
14226
  asField && fieldBackgroundMixin,
15039
14227
  titleClassName
@@ -15569,7 +14757,7 @@ const MultiSelect = React.forwardRef(
15569
14757
  invisible,
15570
14758
  disabled,
15571
14759
  placeholder,
15572
- modalPopover = false,
14760
+ modalPopover = true,
15573
14761
  includeClear = true,
15574
14762
  useChips = true,
15575
14763
  className,
@@ -16037,7 +15225,7 @@ const Select = forwardRef(({
16037
15225
  onChange(event);
16038
15226
  }
16039
15227
  }, [onChange, value, onValueChange]);
16040
- const hasValue = Array.isArray(value) ? value.length > 0 : value != null;
15228
+ const hasValue = Array.isArray(value) ? value.length > 0 : value != null && value !== "" && value !== void 0;
16041
15229
  return /* @__PURE__ */ jsxs(
16042
15230
  SelectPrimitive.Root,
16043
15231
  {
@@ -16053,84 +15241,78 @@ const Select = forwardRef(({
16053
15241
  ...props,
16054
15242
  children: [
16055
15243
  typeof label === "string" ? /* @__PURE__ */ jsx(SelectInputLabel, { error, children: label }) : label,
16056
- /* @__PURE__ */ jsxs(
16057
- "div",
15244
+ /* @__PURE__ */ jsx("div", { className: cls(
15245
+ size === "small" ? "min-h-[42px]" : "min-h-[64px]",
15246
+ "select-none rounded-md text-sm",
15247
+ invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin,
15248
+ disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin,
15249
+ "relative flex items-center",
15250
+ className
15251
+ ), children: /* @__PURE__ */ jsxs(
15252
+ SelectPrimitive.Trigger,
16058
15253
  {
15254
+ ref: inputRef,
15255
+ id,
16059
15256
  className: cls(
16060
- size === "small" ? "min-h-[42px]" : "min-h-[64px]",
15257
+ "w-full h-full",
15258
+ size === "small" ? "h-[42px]" : "h-[64px]",
15259
+ padding ? "px-4 " : "",
15260
+ "outline-none focus:outline-none",
16061
15261
  "select-none rounded-md text-sm",
16062
- invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin,
16063
- disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin,
16064
- "relative flex items-center",
16065
- className
15262
+ error ? "text-red-500 dark:text-red-600" : "focus:text-text-primary dark:focus:text-text-primary-dark",
15263
+ error ? "border border-red-500 dark:border-red-600" : "",
15264
+ disabled ? "text-slate-600 dark:text-slate-400" : "text-slate-800 dark:text-white",
15265
+ "relative flex flex-row items-center",
15266
+ inputClassName
16066
15267
  ),
16067
15268
  children: [
16068
- /* @__PURE__ */ jsxs(
16069
- SelectPrimitive.Trigger,
15269
+ /* @__PURE__ */ jsx(
15270
+ "div",
16070
15271
  {
16071
- ref: inputRef,
16072
- id,
15272
+ ref,
16073
15273
  className: cls(
16074
- "w-full h-full",
16075
- size === "small" ? "h-[42px]" : "h-[64px]",
16076
- padding ? "px-4 " : "",
16077
- "outline-none focus:outline-none",
16078
- "select-none rounded-md text-sm",
16079
- error ? "text-red-500 dark:text-red-600" : "focus:text-text-primary dark:focus:text-text-primary-dark",
16080
- error ? "border border-red-500 dark:border-red-600" : "",
16081
- disabled ? "text-slate-600 dark:text-slate-400" : "text-slate-800 dark:text-white",
16082
- "relative flex items-center",
16083
- inputClassName
15274
+ "flex-grow w-full max-w-full flex flex-row gap-2 items-center",
15275
+ "overflow-visible",
15276
+ size === "small" ? "h-[42px]" : "h-[64px]"
16084
15277
  ),
16085
- onClick: (e) => {
16086
- e.preventDefault();
16087
- e.stopPropagation();
16088
- },
16089
- children: [
16090
- /* @__PURE__ */ jsx(
16091
- "div",
16092
- {
16093
- ref,
16094
- className: cls(
16095
- "flex-grow w-full max-w-full flex flex-row gap-2 items-center",
16096
- "overflow-visible",
16097
- size === "small" ? "h-[42px]" : "h-[64px]"
16098
- ),
16099
- children: /* @__PURE__ */ jsxs(
16100
- SelectPrimitive.Value,
16101
- {
16102
- onClick: (e) => {
16103
- e.preventDefault();
16104
- e.stopPropagation();
16105
- },
16106
- placeholder,
16107
- className: "w-full",
16108
- children: [
16109
- hasValue && value && renderValue ? renderValue(value) : placeholder,
16110
- hasValue && !renderValue && value
16111
- ]
16112
- }
16113
- )
16114
- }
16115
- ),
16116
- /* @__PURE__ */ jsx(SelectPrimitive.Icon, { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsx(ExpandMoreIcon, { size: "small", className: cls("transition", open ? "rotate-180" : "") }) })
16117
- ]
15278
+ children: /* @__PURE__ */ jsxs(
15279
+ SelectPrimitive.Value,
15280
+ {
15281
+ onClick: (e) => {
15282
+ e.preventDefault();
15283
+ e.stopPropagation();
15284
+ },
15285
+ placeholder,
15286
+ className: "w-full",
15287
+ children: [
15288
+ hasValue && value && renderValue ? renderValue(value) : placeholder,
15289
+ hasValue && !renderValue && value
15290
+ ]
15291
+ }
15292
+ )
16118
15293
  }
16119
15294
  ),
16120
15295
  endAdornment && /* @__PURE__ */ jsx(
16121
15296
  "div",
16122
15297
  {
16123
- className: cls("absolute h-full flex items-center", size === "small" ? "right-10" : "right-14"),
15298
+ className: cls("h-full flex items-center"),
16124
15299
  onClick: (e) => {
16125
15300
  e.preventDefault();
16126
15301
  e.stopPropagation();
16127
15302
  },
16128
15303
  children: endAdornment
16129
15304
  }
16130
- )
15305
+ ),
15306
+ /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(
15307
+ ExpandMoreIcon,
15308
+ {
15309
+ size: "small",
15310
+ className: cls("px-2 transition", open ? "rotate-180" : "")
15311
+ }
15312
+ ) })
16131
15313
  ]
16132
15314
  }
16133
- ),
15315
+ ) }),
16134
15316
  /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx(
16135
15317
  SelectPrimitive.Content,
16136
15318
  {
@@ -16162,10 +15344,6 @@ function SelectItem({
16162
15344
  {
16163
15345
  value,
16164
15346
  disabled,
16165
- onClick: (e) => {
16166
- e.preventDefault();
16167
- e.stopPropagation();
16168
- },
16169
15347
  className: cls(
16170
15348
  "w-full",
16171
15349
  "relative flex items-center p-2 rounded-md text-sm text-slate-700 dark:text-slate-300",
@@ -16345,8 +15523,7 @@ const Sheet = ({
16345
15523
  ),
16346
15524
  style: {
16347
15525
  pointerEvents: displayed ? "auto" : "none"
16348
- },
16349
- onClick: () => onOpenChange && onOpenChange(false)
15526
+ }
16350
15527
  }
16351
15528
  ),
16352
15529
  /* @__PURE__ */ jsx(
@@ -16661,7 +15838,7 @@ function TextField({
16661
15838
  style: inputStyle,
16662
15839
  className: cls(
16663
15840
  invisible ? focusedInvisibleMixin : "",
16664
- "rounded-md resize-none w-full outline-none p-[32px] text-base bg-transparent min-h-[64px] px-3 pt-[28px]",
15841
+ "rounded-md resize-none w-full outline-none p-[32px] text-base bg-transparent min-h-[64px] px-3 pt-8",
16665
15842
  disabled && "border border-transparent outline-none opacity-50 text-slate-600 dark:text-slate-500"
16666
15843
  )
16667
15844
  }
@@ -16679,7 +15856,7 @@ function TextField({
16679
15856
  invisible ? focusedInvisibleMixin : "",
16680
15857
  disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin,
16681
15858
  size === "smallest" ? "min-h-[32px]" : size === "small" ? "min-h-[48px]" : "min-h-[64px]",
16682
- label ? size === "medium" ? "pt-[28px] pb-2" : "pt-4 pb-2" : "py-2",
15859
+ label ? size === "medium" ? "pt-8 pb-2" : "pt-4 pb-2" : "py-2",
16683
15860
  focused ? "text-text-primary dark:text-text-primary-dark" : "",
16684
15861
  endAdornment ? "pr-10" : "pr-3",
16685
15862
  disabled && "border border-transparent outline-none opacity-50 dark:opacity-50 text-slate-800 dark:text-white",
@@ -20756,7 +19933,6 @@ export {
20756
19933
  useAutoComplete,
20757
19934
  useDebounceValue,
20758
19935
  useInjectStyles,
20759
- useLocaleConfig,
20760
19936
  useOutsideAlerter
20761
19937
  };
20762
19938
  //# sourceMappingURL=index.es.js.map