@ceed/cds 1.36.0-next.1 → 1.36.1

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
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  useTheme as useTheme2,
4
4
  useColorScheme,
5
- useThemeProps as useThemeProps13,
5
+ useThemeProps as useThemeProps10,
6
6
  ButtonGroup,
7
7
  alertClasses,
8
8
  boxClasses,
@@ -141,7 +141,7 @@ Accordions.displayName = "Accordions";
141
141
 
142
142
  // src/components/Alert/Alert.tsx
143
143
  import React3 from "react";
144
- import { Alert as JoyAlert, styled, useThemeProps } from "@mui/joy";
144
+ import { Alert as JoyAlert, styled } from "@mui/joy";
145
145
  import { motion as motion3 } from "framer-motion";
146
146
 
147
147
  // src/components/Typography/Typography.tsx
@@ -178,8 +178,7 @@ var contentLevelMapping = {
178
178
  md: "body-sm",
179
179
  lg: "body-md"
180
180
  };
181
- function Alert(inProps) {
182
- const props = useThemeProps({ props: inProps, name: "Alert" });
181
+ function Alert(props) {
183
182
  const { title, content, actions, color = "primary", size = "md", ...innerProps } = props;
184
183
  const invertedColors = props.invertedColors || props.variant === "solid";
185
184
  return /* @__PURE__ */ React3.createElement(MotionAlert, { ...innerProps, color, endDecorator: actions, invertedColors, size }, /* @__PURE__ */ React3.createElement(Stack_default, null, title && /* @__PURE__ */ React3.createElement(Typography_default, { level: titleLevelMapping[size], fontWeight: "bold", color }, title), /* @__PURE__ */ React3.createElement(Typography_default, { level: contentLevelMapping[size], fontWeight: 500, color }, content)));
@@ -584,7 +583,7 @@ var Autocomplete_default = Autocomplete;
584
583
 
585
584
  // src/components/Avatar/Avatar.tsx
586
585
  import React6, { forwardRef as forwardRef2, useMemo as useMemo2 } from "react";
587
- import { Avatar as JoyAvatar, AvatarGroup, styled as styled4, useThemeProps as useThemeProps2 } from "@mui/joy";
586
+ import { Avatar as JoyAvatar, AvatarGroup, styled as styled4, useThemeProps } from "@mui/joy";
588
587
  var StyledAvatar = styled4(JoyAvatar, {
589
588
  name: "Avatar",
590
589
  slot: "Root",
@@ -606,7 +605,7 @@ var defaultGetInitial = (name) => {
606
605
  }
607
606
  };
608
607
  var Avatar = forwardRef2(function Avatar2(inProps, ref) {
609
- const props = useThemeProps2({
608
+ const props = useThemeProps({
610
609
  props: inProps,
611
610
  name: "Avatar"
612
611
  });
@@ -826,7 +825,7 @@ var isSameMonth = (date1, date2) => {
826
825
 
827
826
  // src/components/Calendar/hooks/use-calendar-props.ts
828
827
  import { useCallback as useCallback4, useMemo as useMemo4, useState as useState3 } from "react";
829
- import { useThemeProps as useThemeProps3 } from "@mui/joy";
828
+ import { useThemeProps as useThemeProps2 } from "@mui/joy";
830
829
  var resolveView = (view, views) => {
831
830
  return views.includes(view) ? view : views[0];
832
831
  };
@@ -875,7 +874,7 @@ var useCalendarProps = (inProps) => {
875
874
  },
876
875
  [resolvedView, inProps, viewMonth, paginate]
877
876
  );
878
- const props = useThemeProps3({
877
+ const props = useThemeProps2({
879
878
  props: {
880
879
  locale: "default",
881
880
  views: ["day", "month"],
@@ -1927,7 +1926,7 @@ Input.displayName = "Input";
1927
1926
  var Input_default = Input;
1928
1927
 
1929
1928
  // src/components/CurrencyInput/CurrencyInput.tsx
1930
- import { styled as styled7, useThemeProps as useThemeProps4 } from "@mui/joy";
1929
+ import { styled as styled7, useThemeProps as useThemeProps3 } from "@mui/joy";
1931
1930
 
1932
1931
  // src/components/CurrencyInput/hooks/use-currency-setting.ts
1933
1932
  var CURRENCY_DECIMAL_MAP = {
@@ -2113,7 +2112,7 @@ var CurrencyInputRoot = styled7(Input_default, {
2113
2112
  overridesResolver: (props, styles) => styles.root
2114
2113
  })({});
2115
2114
  var CurrencyInput = React17.forwardRef(function CurrencyInput2(inProps, ref) {
2116
- const props = useThemeProps4({ props: inProps, name: "CurrencyInput" });
2115
+ const props = useThemeProps3({ props: inProps, name: "CurrencyInput" });
2117
2116
  const {
2118
2117
  currency = "USD",
2119
2118
  name,
@@ -2641,7 +2640,7 @@ import { AnimatePresence as AnimatePresence2 } from "framer-motion";
2641
2640
  import React19, { forwardRef as forwardRef6, useCallback as useCallback9, useEffect as useEffect4, useImperativeHandle, useRef as useRef4, useState as useState8 } from "react";
2642
2641
  import { IMaskInput, IMask } from "react-imask";
2643
2642
  import CalendarTodayIcon from "@mui/icons-material/CalendarToday";
2644
- import { styled as styled10, useThemeProps as useThemeProps5 } from "@mui/joy";
2643
+ import { styled as styled10, useThemeProps as useThemeProps4 } from "@mui/joy";
2645
2644
  import { FocusTrap, ClickAwayListener, Popper as Popper2 } from "@mui/base";
2646
2645
 
2647
2646
  // src/components/Sheet/Sheet.tsx
@@ -2829,7 +2828,7 @@ var TextMaskAdapter3 = React19.forwardRef(function TextMaskAdapter4(props, ref)
2829
2828
  );
2830
2829
  });
2831
2830
  var DatePicker = forwardRef6((inProps, ref) => {
2832
- const props = useThemeProps5({ props: inProps, name: "DatePicker" });
2831
+ const props = useThemeProps4({ props: inProps, name: "DatePicker" });
2833
2832
  const {
2834
2833
  onChange,
2835
2834
  disabled,
@@ -3176,11 +3175,22 @@ function Select(props) {
3176
3175
  disabled,
3177
3176
  required,
3178
3177
  onChange,
3178
+ // NOTE: id 를 FormControl 에 넘겨 htmlFor/labelId(`${id}-label`)를 결정론적으로 만든다.
3179
+ // Joy FormControl context 가 FormLabel(id) ↔ Select button(aria-labelledby)을 자동 결선하므로,
3180
+ // 외부에서 useId 로 라벨/버튼 ARIA 를 수동 결합할 필요가 없다.
3181
+ id,
3182
+ slotProps,
3179
3183
  // NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
3180
3184
  sx,
3181
3185
  className,
3182
3186
  ...innerProps
3183
3187
  } = props;
3188
+ const {
3189
+ formControl: formControlProps,
3190
+ formLabel: formLabelProps,
3191
+ formHelperText: formHelperTextProps,
3192
+ ...joySlotProps
3193
+ } = slotProps ?? {};
3184
3194
  const options = useMemo8(
3185
3195
  () => props.options.map((option) => {
3186
3196
  if (option.hasOwnProperty("value") && option.hasOwnProperty("label")) {
@@ -3221,6 +3231,7 @@ function Select(props) {
3221
3231
  disabled,
3222
3232
  size,
3223
3233
  color: error ? "danger" : color,
3234
+ slotProps: joySlotProps,
3224
3235
  onChange: handleChange,
3225
3236
  renderValue: (selected) => {
3226
3237
  if (!selected) return null;
@@ -3240,12 +3251,14 @@ function Select(props) {
3240
3251
  size,
3241
3252
  color,
3242
3253
  error,
3254
+ id,
3243
3255
  sx,
3244
- className
3256
+ className,
3257
+ ...formControlProps
3245
3258
  },
3246
- label && /* @__PURE__ */ React21.createElement(FormLabel_default, null, label),
3259
+ label && /* @__PURE__ */ React21.createElement(FormLabel_default, { ...formLabelProps }, label),
3247
3260
  select,
3248
- helperText && /* @__PURE__ */ React21.createElement(FormHelperText_default, null, helperText)
3261
+ helperText && /* @__PURE__ */ React21.createElement(FormHelperText_default, { ...formHelperTextProps }, helperText)
3249
3262
  );
3250
3263
  }
3251
3264
  Select.displayName = "Select";
@@ -4209,7 +4222,7 @@ import PreviousIcon from "@mui/icons-material/ChevronLeftRounded";
4209
4222
  import NextIcon from "@mui/icons-material/ChevronRightRounded";
4210
4223
  import FirstPageIcon from "@mui/icons-material/FirstPageRounded";
4211
4224
  import LastPageIcon from "@mui/icons-material/LastPageRounded";
4212
- import { styled as styled13, useThemeProps as useThemeProps6 } from "@mui/joy";
4225
+ import { styled as styled13 } from "@mui/joy";
4213
4226
  var PaginationButton = styled13(Button_default, {
4214
4227
  name: "Pagination",
4215
4228
  slot: "button"
@@ -4260,8 +4273,7 @@ var PaginationContainer = styled13(Stack_default, {
4260
4273
  lg: theme.spacing(2)
4261
4274
  }[size]
4262
4275
  }));
4263
- function Pagination(inProps) {
4264
- const props = useThemeProps6({ props: inProps, name: "Pagination" });
4276
+ function Pagination(props) {
4265
4277
  const {
4266
4278
  paginationModel: _paginationModel,
4267
4279
  defaultPaginationModel = { page: 1, pageSize: 25 },
@@ -4922,7 +4934,7 @@ DataTable.displayName = "DataTable";
4922
4934
  import React27, { forwardRef as forwardRef8, useCallback as useCallback14, useEffect as useEffect8, useImperativeHandle as useImperativeHandle3, useMemo as useMemo12, useRef as useRef8, useState as useState11 } from "react";
4923
4935
  import { IMaskInput as IMaskInput2, IMask as IMask2 } from "react-imask";
4924
4936
  import CalendarTodayIcon2 from "@mui/icons-material/CalendarToday";
4925
- import { styled as styled14, useThemeProps as useThemeProps7 } from "@mui/joy";
4937
+ import { styled as styled14, useThemeProps as useThemeProps5 } from "@mui/joy";
4926
4938
  import { FocusTrap as FocusTrap2, ClickAwayListener as ClickAwayListener2, Popper as Popper3 } from "@mui/base";
4927
4939
  var hasAlphabeticMonth2 = (format) => /MMMM|MMM/.test(format);
4928
4940
  var CalendarButton2 = styled14(IconButton_default, {
@@ -5098,7 +5110,7 @@ var TextMaskAdapter5 = React27.forwardRef(function TextMaskAdapter6(props, ref)
5098
5110
  );
5099
5111
  });
5100
5112
  var DateRangePicker = forwardRef8((inProps, ref) => {
5101
- const props = useThemeProps7({ props: inProps, name: "DateRangePicker" });
5113
+ const props = useThemeProps5({ props: inProps, name: "DateRangePicker" });
5102
5114
  const {
5103
5115
  onChange,
5104
5116
  disabled,
@@ -5495,7 +5507,6 @@ var InsetDrawer = styled20(JoyDrawer2)(({ theme }) => ({
5495
5507
  // src/components/FilterableCheckboxGroup/FilterableCheckboxGroup.tsx
5496
5508
  import React32, { useCallback as useCallback15, useEffect as useEffect9, useMemo as useMemo13, useRef as useRef9, useState as useState12 } from "react";
5497
5509
  import SearchIcon from "@mui/icons-material/Search";
5498
- import { useThemeProps as useThemeProps8 } from "@mui/joy";
5499
5510
  import { useVirtualizer as useVirtualizer3 } from "@tanstack/react-virtual";
5500
5511
  function LabelWithTooltip(props) {
5501
5512
  const { label, size } = props;
@@ -5528,8 +5539,7 @@ function LabelWithTooltip(props) {
5528
5539
  }
5529
5540
  return labelContent;
5530
5541
  }
5531
- function FilterableCheckboxGroup(inProps) {
5532
- const props = useThemeProps8({ props: inProps, name: "FilterableCheckboxGroup" });
5542
+ function FilterableCheckboxGroup(props) {
5533
5543
  const {
5534
5544
  value,
5535
5545
  options,
@@ -5806,7 +5816,14 @@ var Markdown = (props) => {
5806
5816
  return /* @__PURE__ */ React34.createElement(Typography, { component: "div", color, textColor, level: defaultLevel, ...innerProps }, /* @__PURE__ */ React34.createElement(
5807
5817
  Suspense,
5808
5818
  {
5809
- fallback: fallback || /* @__PURE__ */ React34.createElement(Typography, null, /* @__PURE__ */ React34.createElement(Skeleton, null, content || ""))
5819
+ fallback: (
5820
+ // While in the fallback state, prevent browser auto-translation (e.g. Chrome/Google Translate)
5821
+ // from wrapping text nodes in <font> tags. Once the lazy react-markdown chunk arrives, React
5822
+ // swaps the fallback for the real content via insertBefore; if the browser has mutated the DOM
5823
+ // in the meantime, the reference node's parent changes and React throws a DOMException
5824
+ // ("Failed to execute 'insertBefore' on 'Node'"), crashing the subtree. (cf. facebook/react#11538)
5825
+ fallback || /* @__PURE__ */ React34.createElement(Typography, { translate: "no", className: "notranslate" }, /* @__PURE__ */ React34.createElement(Skeleton, null, content || ""))
5826
+ )
5810
5827
  },
5811
5828
  /* @__PURE__ */ React34.createElement(
5812
5829
  LazyReactMarkdown,
@@ -5957,7 +5974,7 @@ MenuButton2.displayName = "MenuButton";
5957
5974
  // src/components/MonthPicker/MonthPicker.tsx
5958
5975
  import React36, { forwardRef as forwardRef9, useCallback as useCallback16, useEffect as useEffect11, useImperativeHandle as useImperativeHandle4, useRef as useRef10, useState as useState14 } from "react";
5959
5976
  import CalendarTodayIcon3 from "@mui/icons-material/CalendarToday";
5960
- import { styled as styled21, useThemeProps as useThemeProps9 } from "@mui/joy";
5977
+ import { styled as styled21, useThemeProps as useThemeProps6 } from "@mui/joy";
5961
5978
  import { FocusTrap as FocusTrap3, ClickAwayListener as ClickAwayListener3, Popper as Popper4 } from "@mui/base";
5962
5979
  var StyledPopper3 = styled21(Popper4, {
5963
5980
  name: "MonthPicker",
@@ -6012,7 +6029,7 @@ function parseDate3(dateString, format) {
6012
6029
  return result;
6013
6030
  }
6014
6031
  var MonthPicker = forwardRef9((inProps, ref) => {
6015
- const props = useThemeProps9({ props: inProps, name: "MonthPicker" });
6032
+ const props = useThemeProps6({ props: inProps, name: "MonthPicker" });
6016
6033
  const {
6017
6034
  onChange,
6018
6035
  disabled,
@@ -6212,7 +6229,7 @@ var MonthPicker = forwardRef9((inProps, ref) => {
6212
6229
  import React37, { forwardRef as forwardRef10, useCallback as useCallback17, useEffect as useEffect12, useImperativeHandle as useImperativeHandle5, useMemo as useMemo14, useRef as useRef11, useState as useState15 } from "react";
6213
6230
  import { IMaskInput as IMaskInput3, IMask as IMask3 } from "react-imask";
6214
6231
  import CalendarTodayIcon4 from "@mui/icons-material/CalendarToday";
6215
- import { styled as styled22, useThemeProps as useThemeProps10 } from "@mui/joy";
6232
+ import { styled as styled22, useThemeProps as useThemeProps7 } from "@mui/joy";
6216
6233
  import { FocusTrap as FocusTrap4, ClickAwayListener as ClickAwayListener4, Popper as Popper5 } from "@mui/base";
6217
6234
  var hasAlphabeticMonth3 = (format) => /MMMM|MMM/.test(format);
6218
6235
  var StyledPopper4 = styled22(Popper5, {
@@ -6301,7 +6318,7 @@ var TextMaskAdapter7 = React37.forwardRef(function TextMaskAdapter8(props, ref)
6301
6318
  );
6302
6319
  });
6303
6320
  var MonthRangePicker = forwardRef10((inProps, ref) => {
6304
- const props = useThemeProps10({ props: inProps, name: "MonthRangePicker" });
6321
+ const props = useThemeProps7({ props: inProps, name: "MonthRangePicker" });
6305
6322
  const {
6306
6323
  onChange,
6307
6324
  disabled,
@@ -6621,7 +6638,7 @@ Navigator.displayName = "Navigator";
6621
6638
  // src/components/PercentageInput/PercentageInput.tsx
6622
6639
  import React41, { useCallback as useCallback18, useMemo as useMemo15, useState as useState16 } from "react";
6623
6640
  import { NumericFormat as NumericFormat2 } from "react-number-format";
6624
- import { styled as styled25, useThemeProps as useThemeProps11 } from "@mui/joy";
6641
+ import { styled as styled25, useThemeProps as useThemeProps8 } from "@mui/joy";
6625
6642
  var padDecimal = (value, decimalScale) => {
6626
6643
  const [integer, decimal = ""] = `${value}`.split(".");
6627
6644
  return Number(`${integer}${decimal.padEnd(decimalScale, "0")}`);
@@ -6655,7 +6672,7 @@ var PercentageInputRoot = styled25(Input_default, {
6655
6672
  })({});
6656
6673
  var PercentageInput = React41.forwardRef(
6657
6674
  function PercentageInput2(inProps, ref) {
6658
- const props = useThemeProps11({ props: inProps, name: "PercentageInput" });
6675
+ const props = useThemeProps8({ props: inProps, name: "PercentageInput" });
6659
6676
  const {
6660
6677
  name,
6661
6678
  onChange,
@@ -6917,7 +6934,7 @@ RadioList.displayName = "RadioList";
6917
6934
 
6918
6935
  // src/components/SearchBar/SearchBar.tsx
6919
6936
  import * as React44 from "react";
6920
- import { styled as styled27, useThemeProps as useThemeProps12 } from "@mui/joy/styles";
6937
+ import { styled as styled27, useThemeProps as useThemeProps9 } from "@mui/joy/styles";
6921
6938
  import Box2 from "@mui/joy/Box";
6922
6939
  import SearchRoundedIcon from "@mui/icons-material/SearchRounded";
6923
6940
  import CloseRoundedIcon from "@mui/icons-material/CloseRounded";
@@ -6937,7 +6954,7 @@ var SearchBarRoot = styled27(Box2, {
6937
6954
  flexShrink: 0
6938
6955
  }));
6939
6956
  var SearchBar = React44.forwardRef(function SearchBar2(inProps, ref) {
6940
- const props = useThemeProps12({ props: inProps, name: "SearchBar" });
6957
+ const props = useThemeProps9({ props: inProps, name: "SearchBar" });
6941
6958
  const { showSelect = false, options, placeholder: placeholderProp, value, onChange, onSearch, ...other } = props;
6942
6959
  const [selectVal, setSelectVal] = React44.useState(options?.[0]?.value ?? "");
6943
6960
  const [isHovered, setIsHovered] = React44.useState(false);
@@ -7428,21 +7445,6 @@ var defaultTheme = extendTheme({
7428
7445
  fontWeight: "var(--ceed-fontWeight-xl, 700)"
7429
7446
  }
7430
7447
  }
7431
- },
7432
- Alert: {
7433
- defaultProps: {
7434
- size: "md"
7435
- }
7436
- },
7437
- Pagination: {
7438
- defaultProps: {
7439
- size: "md"
7440
- }
7441
- },
7442
- FilterableCheckboxGroup: {
7443
- defaultProps: {
7444
- size: "md"
7445
- }
7446
7448
  }
7447
7449
  }
7448
7450
  });
@@ -7987,5 +7989,5 @@ export {
7987
7989
  useColorScheme,
7988
7990
  useMenuButton,
7989
7991
  useTheme2 as useTheme,
7990
- useThemeProps13 as useThemeProps
7992
+ useThemeProps10 as useThemeProps
7991
7993
  };