@ceed/ads 0.0.39 → 0.0.41-0

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.
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import type { CalendarProps } from "./types";
3
+ /**
4
+ * @see https://mui.com/x/api/date-pickers/date-calendar/ 인터페이스 참고
5
+ */
6
+ declare const Calendar: React.ForwardRefExoticComponent<CalendarProps & React.RefAttributes<HTMLDivElement>>;
7
+ export { Calendar };
@@ -0,0 +1,27 @@
1
+ import React from "react";
2
+ import type { View, CalendarProps } from "../types";
3
+ export declare const useCalendarProps: (inProps: CalendarProps) => readonly [{
4
+ onChange: ((date: [Date, Date | undefined]) => void) | undefined;
5
+ onMonthChange: (newMonth: Date) => void;
6
+ onViewChange: () => void;
7
+ value: [Date, Date | undefined] | undefined;
8
+ defaultValue?: [Date, Date | undefined] | undefined;
9
+ locale: string;
10
+ view: View;
11
+ views: View[];
12
+ slots?: Partial<Record<import("../types").CalendarSlot, React.ElementType<any, keyof React.JSX.IntrinsicElements>>> | undefined;
13
+ rangeSelection?: boolean | undefined;
14
+ }, {
15
+ viewMonth: Date;
16
+ direction: number;
17
+ onChange: ((date: [Date, Date | undefined]) => void) | undefined;
18
+ onMonthChange: (newMonth: Date) => void;
19
+ onViewChange: () => void;
20
+ value: [Date, Date | undefined] | undefined;
21
+ defaultValue?: [Date, Date | undefined] | undefined;
22
+ locale: string;
23
+ view: View;
24
+ views: View[];
25
+ slots?: Partial<Record<import("../types").CalendarSlot, React.ElementType<any, keyof React.JSX.IntrinsicElements>>> | undefined;
26
+ rangeSelection?: boolean | undefined;
27
+ }];
@@ -0,0 +1,26 @@
1
+ import { CalendarOwnerState } from "../types";
2
+ export declare const useCalendar: (ownerState: CalendarOwnerState) => {
3
+ calendarTitle: string;
4
+ onPrev: () => void;
5
+ onNext: () => void;
6
+ getDayCellProps: (day: number) => {
7
+ readonly "aria-label": string;
8
+ readonly "aria-current": "date" | undefined;
9
+ };
10
+ getPickerDayProps: (day: number) => {
11
+ readonly isToday: boolean;
12
+ readonly isSelected: boolean | undefined;
13
+ readonly onClick: () => void;
14
+ readonly onMouseEnter: (() => void) | undefined;
15
+ readonly tabIndex: -1;
16
+ readonly "aria-label": string;
17
+ readonly "aria-selected": "true" | undefined;
18
+ readonly "aria-current": "date" | undefined;
19
+ };
20
+ getPickerMonthProps: (monthIndex: number) => {
21
+ readonly isSelected: boolean | undefined;
22
+ readonly onClick: () => void;
23
+ readonly tabIndex: -1;
24
+ readonly "aria-label": string;
25
+ };
26
+ };
@@ -0,0 +1,3 @@
1
+ import { Calendar } from "./Calendar";
2
+ export * from "./Calendar";
3
+ export default Calendar;
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ export type DateValue = Date;
3
+ export type View = "month" | "day";
4
+ export type CalendarSlot = "root" | "day" | "calendarHeader" | "viewContainer" | "viewTable" | "switchViewButton" | "weekHeaderContainer" | "dayPickerContainer";
5
+ export interface CalendarProps {
6
+ value?: [DateValue, DateValue | undefined];
7
+ defaultValue?: [DateValue, DateValue | undefined];
8
+ onChange?: (date: [DateValue, DateValue | undefined]) => void;
9
+ locale?: string;
10
+ view?: View;
11
+ views?: View[];
12
+ onViewChange?: (view: View) => void;
13
+ onMonthChange?: (newMonth: DateValue) => void;
14
+ slots?: Partial<Record<CalendarSlot, React.ElementType>>;
15
+ rangeSelection?: boolean;
16
+ }
17
+ export interface CalendarOwnerState extends CalendarProps {
18
+ viewMonth: Date;
19
+ direction: number;
20
+ }
@@ -0,0 +1,12 @@
1
+ export declare const getCalendarDates: (date: Date) => (number | undefined)[][];
2
+ export declare const getYearName: (date: Date, locale: string) => string;
3
+ export declare const getMonthName: (date: Date, locale: string) => string;
4
+ export declare const getMonthNameFromIndex: (index: number, locale: string) => string;
5
+ /**
6
+ * 일~토 / Sun ~ Sat 같은 요일 이름을 가져옵니다.
7
+ */
8
+ export declare const getWeekdayNames: (locale: string) => string[];
9
+ export declare const isToday: (date: Date) => boolean;
10
+ export declare const isSameDay: (date1: Date, date2: Date) => boolean;
11
+ export declare const isWithinRange: (d1: Date, d2: Date, date: Date) => boolean;
12
+ export declare const isSameMonth: (date1: Date, date2: Date) => boolean;
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ interface DatePickerProps {
3
+ value?: string;
4
+ onChange?: (event: {
5
+ target: {
6
+ name?: string;
7
+ value: string;
8
+ };
9
+ }) => void;
10
+ name?: string;
11
+ disabled?: boolean;
12
+ }
13
+ declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLDivElement>>;
14
+ export { DatePicker };
@@ -0,0 +1,3 @@
1
+ import { DatePicker } from "./DatePicker";
2
+ export * from "./DatePicker";
3
+ export default DatePicker;
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ interface DateRangePickerProps {
3
+ value?: string;
4
+ onChange?: (event: {
5
+ target: {
6
+ name?: string;
7
+ value: string;
8
+ };
9
+ }) => void;
10
+ name?: string;
11
+ disabled?: boolean;
12
+ }
13
+ declare const DateRangePicker: React.ForwardRefExoticComponent<DateRangePickerProps & React.RefAttributes<HTMLDivElement>>;
14
+ export { DateRangePicker };
@@ -0,0 +1,3 @@
1
+ import { DateRangePicker } from "./DateRangePicker";
2
+ export * from "./DateRangePicker";
3
+ export default DateRangePicker;
@@ -10,5 +10,5 @@ declare const FormControl: import("framer-motion").CustomDomComponent<{
10
10
  sx?: import("@mui/joy/styles/types").SxProps | undefined;
11
11
  } & import("@mui/joy").FormControlSlotsAndSlotProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
12
12
  ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
13
- }, "children" | "color" | "sx" | "disabled" | "size" | "required" | "orientation" | "error" | keyof import("@mui/joy").FormControlSlotsAndSlotProps>>;
13
+ }, "children" | "color" | "sx" | "disabled" | "size" | "orientation" | "required" | "error" | keyof import("@mui/joy").FormControlSlotsAndSlotProps>>;
14
14
  export { FormControl };
@@ -1,10 +1,10 @@
1
1
  import React from "react";
2
- declare const Modal: import("framer-motion").CustomDomComponent<Pick<import("@mui/base").ModalOwnProps, "children" | "container" | "open" | "disableAutoFocus" | "disableEnforceFocus" | "disableEscapeKeyDown" | "disablePortal" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "keepMounted"> & {
3
- onClose?: ((event: {}, reason: "backdropClick" | "escapeKeyDown" | "closeClick") => void) | undefined;
2
+ declare const Modal: import("framer-motion").CustomDomComponent<Pick<import("@mui/base").ModalOwnProps, "children" | "container" | "open" | "disablePortal" | "keepMounted" | "disableAutoFocus" | "disableEnforceFocus" | "disableRestoreFocus" | "disableEscapeKeyDown" | "disableScrollLock" | "hideBackdrop"> & {
3
+ onClose?: ((event: {}, reason: "escapeKeyDown" | "backdropClick" | "closeClick") => void) | undefined;
4
4
  sx?: import("@mui/joy/styles/types").SxProps | undefined;
5
5
  } & import("@mui/joy").ModalSlotsAndSlotProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
6
6
  ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
7
- }, "children" | "container" | "sx" | "open" | "onClose" | "disableAutoFocus" | "disableEnforceFocus" | "disableEscapeKeyDown" | "disablePortal" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "keepMounted" | keyof import("@mui/joy").ModalSlotsAndSlotProps>>;
7
+ }, "children" | "container" | "sx" | "open" | "onClose" | "disablePortal" | "keepMounted" | "disableAutoFocus" | "disableEnforceFocus" | "disableRestoreFocus" | "disableEscapeKeyDown" | "disableScrollLock" | "hideBackdrop" | keyof import("@mui/joy").ModalSlotsAndSlotProps>>;
8
8
  export { Modal };
9
9
  declare const ModalDialog: import("framer-motion").CustomDomComponent<{
10
10
  children?: React.ReactNode;
@@ -19,7 +19,7 @@ declare const ModalDialog: import("framer-motion").CustomDomComponent<{
19
19
  variant?: import("@mui/types").OverridableStringUnion<import("@mui/joy").VariantProp, import("@mui/joy").ModalDialogPropsVariantOverrides> | undefined;
20
20
  } & import("@mui/joy").ModalDialogSlotsAndSlotProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
21
21
  ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
22
- }, "children" | "layout" | "color" | "maxWidth" | "minWidth" | "variant" | "sx" | "size" | "invertedColors" | "orientation" | keyof import("@mui/joy").ModalDialogSlotsAndSlotProps>>;
22
+ }, "children" | "layout" | "color" | "maxWidth" | "minWidth" | "variant" | "sx" | "size" | "orientation" | "invertedColors" | keyof import("@mui/joy").ModalDialogSlotsAndSlotProps>>;
23
23
  export { ModalDialog };
24
24
  declare const ModalClose: import("framer-motion").CustomDomComponent<{
25
25
  color?: import("@mui/types").OverridableStringUnion<import("@mui/joy").ColorPaletteProp, import("@mui/joy").ModalClosePropsColorOverrides> | undefined;
@@ -32,5 +32,5 @@ declare const RadioGroup: import("framer-motion").CustomDomComponent<{
32
32
  variant?: import("@mui/types").OverridableStringUnion<import("@mui/joy").VariantProp, import("@mui/joy").RadioPropsVariantOverrides> | undefined;
33
33
  } & import("@mui/joy").RadioGroupSlotsAndSlotProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
34
34
  ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
35
- }, "color" | "overlay" | "defaultValue" | "className" | "onChange" | "variant" | "sx" | "size" | "component" | "name" | "value" | "disableIcon" | "orientation" | keyof import("@mui/joy").RadioGroupSlotsAndSlotProps>>;
35
+ }, "color" | "overlay" | "defaultValue" | "className" | "onChange" | "variant" | "sx" | "size" | "component" | "name" | "value" | "orientation" | "disableIcon" | keyof import("@mui/joy").RadioGroupSlotsAndSlotProps>>;
36
36
  export { RadioGroup };
@@ -8,5 +8,5 @@ declare const Stack: import("framer-motion").CustomDomComponent<{
8
8
  sx?: import("@mui/joy/styles/types").SxProps | undefined;
9
9
  } & import("@mui/joy").StackSlotsAndSlotProps & import("@mui/joy/styles/types").SystemProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
10
10
  ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
11
- }, "children" | "direction" | "sx" | ("p" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "spacing" | "divider" | "useFlexGap" | keyof import("@mui/joy").StackSlotsAndSlotProps>>;
11
+ }, "children" | "direction" | "sx" | ("p" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "divider" | "spacing" | "useFlexGap" | keyof import("@mui/joy").StackSlotsAndSlotProps>>;
12
12
  export { Stack };
@@ -1,4 +1,14 @@
1
1
  import React from "react";
2
+ import { StyleOverrides, Theme } from "@mui/joy/styles";
3
+ import { CalendarOwnerState, CalendarProps, CalendarSlot } from "../Calendar/types";
4
+ declare module "@mui/joy/styles" {
5
+ interface Components {
6
+ Calendar?: {
7
+ defaultProps?: Partial<CalendarProps>;
8
+ styleOverrides?: StyleOverrides<CalendarSlot, CalendarOwnerState, Theme>;
9
+ };
10
+ }
11
+ }
2
12
  declare function ThemeProvider(props: {
3
13
  children?: React.ReactNode;
4
14
  }): React.JSX.Element;
@@ -1,9 +1,12 @@
1
- export { Accordion, AccordionDetails, Accordions, AccordionSummary } from './Accordions';
1
+ export { Accordion, AccordionDetails, Accordions, AccordionSummary, } from "./Accordions";
2
2
  export { Box } from "./Box";
3
3
  export { Button } from "./Button";
4
+ export { Calendar } from "./Calendar";
4
5
  export { Checkbox } from "./Checkbox";
5
6
  export { Container } from "./Container";
6
7
  export { DataTable } from "./DataTable";
8
+ export { DatePicker } from "./DatePicker";
9
+ export { DateRangePicker } from "./DateRangePicker";
7
10
  export { DialogActions } from "./DialogActions";
8
11
  export { DialogContent } from "./DialogContent";
9
12
  export { DialogTitle } from "./DialogTitle";
@@ -18,7 +21,7 @@ export { Grid } from "./Grid";
18
21
  export { IconButton } from "./IconButton";
19
22
  export { Input } from "./Input";
20
23
  export { Menu, MenuButton, MenuItem } from "./Menu";
21
- export { Modal, ModalClose, ModalDialog, ModalOverflow, ModalFrame } from "./Modal";
24
+ export { Modal, ModalClose, ModalDialog, ModalOverflow, ModalFrame, } from "./Modal";
22
25
  export { Radio, RadioGroup } from "./Radio";
23
26
  export { RadioList } from "./RadioList";
24
27
  export { Select, Option } from "./Select";
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export { boxClasses, buttonClasses, checkboxClasses, dividerClasses, iconButtonClasses, inputClasses, menuClasses, menuButtonClasses, menuItemClasses, optionClasses, radioClasses, radioGroupClasses, selectClasses, switchClasses, tableClasses, textareaClasses, typographyClasses, formControlClasses, formLabelClasses, formHelperTextClasses, gridClasses, stackClasses, sheetClasses, modalClasses, modalCloseClasses, modalDialogClasses, modalOverflowClasses, dialogTitleClasses, dialogContentClasses, dialogActionsClasses, tooltipClasses, tabsClasses, tabListClasses, tabPanelClasses, accordionClasses, accordionDetailsClasses, accordionGroupClasses as accordionsClasses, accordionSummaryClasses, Autocomplete, AutocompleteListbox, AutocompleteOption, autocompleteClasses, autocompleteListboxClasses, autocompleteOptionClasses, Avatar, avatarClasses, AvatarGroup, avatarGroupClasses, AspectRatio, aspectRatioClasses, Badge, badgeClasses, Breadcrumbs, breadcrumbsClasses, Card, cardClasses, CardActions, cardActionsClasses, CardContent, cardContentClasses, CardCover, cardCoverClasses, CardOverflow, cardOverflowClasses, Chip, chipClasses, CircularProgress, circularProgressClasses, Drawer, drawerClasses, LinearProgress, linearProgressClasses, List, listClasses, ListDivider, listDividerClasses, ListItem, listItemClasses, ListItemButton, listItemButtonClasses, ListItemContent, listItemContentClasses, ListItemDecorator, listItemDecoratorClasses, ListSubheader, listSubheaderClasses, Link, linkClasses, Slider, sliderClasses, Step, stepClasses, StepButton, stepButtonClasses, StepIndicator, Stepper, stepperClasses, Skeleton, skeletonClasses, } from "@mui/joy";
2
- export { Accordion, Accordions, AccordionDetails, AccordionSummary, Box, Button, Checkbox, Container, DataTable, DialogActions, DialogContent, DialogTitle, DialogFrame, Divider, Dropdown, InsetDrawer, FormControl, FormHelperText, FormLabel, Grid, IconButton, Input, Menu, MenuButton, MenuItem, Modal, ModalClose, ModalDialog, ModalOverflow, ModalFrame, Radio, RadioGroup, RadioList, Select, Option, Sheet, Stack, Switch, Table, TableHead, TableBody, Tabs, Tab, TabList, TabPanel, Textarea, ThemeProvider, Tooltip, Typography, } from "./components";
2
+ export { Accordion, Accordions, AccordionDetails, AccordionSummary, Box, Button, Calendar, Checkbox, Container, DataTable, DatePicker, DateRangePicker, DialogActions, DialogContent, DialogTitle, DialogFrame, Divider, Dropdown, InsetDrawer, FormControl, FormHelperText, FormLabel, Grid, IconButton, Input, Menu, MenuButton, MenuItem, Modal, ModalClose, ModalDialog, ModalOverflow, ModalFrame, Radio, RadioGroup, RadioList, Select, Option, Sheet, Stack, Switch, Table, TableHead, TableBody, Tabs, Tab, TabList, TabPanel, Textarea, ThemeProvider, Tooltip, Typography, } from "./components";