@lunit/design-system 2.0.2 → 2.1.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.
Files changed (128) hide show
  1. package/README.md +107 -7
  2. package/dist/cjs/components/Chip/index.js +1 -1
  3. package/dist/cjs/components/Chip/index.js.map +1 -1
  4. package/dist/cjs/components/Dialog/index.js +1 -1
  5. package/dist/cjs/components/Dialog/index.js.map +1 -1
  6. package/dist/cjs/components/Dropdown/index.js +1 -1
  7. package/dist/cjs/components/Dropdown/index.js.map +1 -1
  8. package/dist/cjs/components/TextField/index.js +1 -1
  9. package/dist/cjs/components/TextField/index.js.map +1 -1
  10. package/dist/cjs/index.js +1 -1
  11. package/dist/cjs/index.js.map +1 -1
  12. package/dist/components/Chip/Chip.styled.js +9 -16
  13. package/dist/components/Chip/Chip.styled.js.map +1 -1
  14. package/dist/components/Dialog/Dialog.js +0 -6
  15. package/dist/components/Dialog/Dialog.js.map +1 -1
  16. package/dist/components/Dropdown/Dropdown.js +37 -4
  17. package/dist/components/Dropdown/Dropdown.js.map +1 -1
  18. package/dist/components/Dropdown/Dropdown.styled.js +161 -0
  19. package/dist/components/Dropdown/Dropdown.styled.js.map +1 -0
  20. package/dist/components/Dropdown/Dropdown.types.js +2 -0
  21. package/dist/components/Dropdown/Dropdown.types.js.map +1 -0
  22. package/dist/components/Dropdown/DropdownItem.js +36 -0
  23. package/dist/components/Dropdown/DropdownItem.js.map +1 -0
  24. package/dist/components/Dropdown/index.js +1 -0
  25. package/dist/components/Dropdown/index.js.map +1 -1
  26. package/dist/components/TextField/TextField.js +1 -1
  27. package/dist/components/TextField/TextField.js.map +1 -1
  28. package/dist/components/TextField/TextField.style.js +27 -3
  29. package/dist/components/TextField/TextField.style.js.map +1 -1
  30. package/dist/foundation/Typography/index.js +5 -0
  31. package/dist/foundation/Typography/index.js.map +1 -1
  32. package/dist/foundation/Typography/tokens.js +44 -0
  33. package/dist/foundation/Typography/tokens.js.map +1 -1
  34. package/dist/foundation/colors/base/blue.js +12 -10
  35. package/dist/foundation/colors/base/blue.js.map +1 -1
  36. package/dist/foundation/colors/base/green.js +11 -9
  37. package/dist/foundation/colors/base/green.js.map +1 -1
  38. package/dist/foundation/colors/base/grey.js +30 -15
  39. package/dist/foundation/colors/base/grey.js.map +1 -1
  40. package/dist/foundation/colors/base/lunitTeal.js +2 -0
  41. package/dist/foundation/colors/base/lunitTeal.js.map +1 -1
  42. package/dist/foundation/colors/base/magenta.js +3 -1
  43. package/dist/foundation/colors/base/magenta.js.map +1 -1
  44. package/dist/foundation/colors/base/orange.js +11 -9
  45. package/dist/foundation/colors/base/orange.js.map +1 -1
  46. package/dist/foundation/colors/base/purple.js +3 -1
  47. package/dist/foundation/colors/base/purple.js.map +1 -1
  48. package/dist/foundation/colors/base/red.js +5 -3
  49. package/dist/foundation/colors/base/red.js.map +1 -1
  50. package/dist/foundation/colors/base/yellow.js +12 -10
  51. package/dist/foundation/colors/base/yellow.js.map +1 -1
  52. package/dist/foundation/colors/index.js +3 -0
  53. package/dist/foundation/colors/index.js.map +1 -1
  54. package/dist/foundation/colors/token/component.js +26 -22
  55. package/dist/foundation/colors/token/component.js.map +1 -1
  56. package/dist/foundation/colors/token/core.js +21 -0
  57. package/dist/foundation/colors/token/core.js.map +1 -1
  58. package/dist/index.js +1 -1
  59. package/dist/index.js.map +1 -1
  60. package/dist/types/components/Button/Button.styled.d.ts +3 -3
  61. package/dist/types/components/Chip/Chip.styled.d.ts +12 -12
  62. package/dist/types/components/Dialog/Dialog.d.ts +0 -3
  63. package/dist/types/components/Dropdown/Dropdown.d.ts +3 -1
  64. package/dist/types/components/Dropdown/Dropdown.styled.d.ts +41 -0
  65. package/dist/types/components/Dropdown/Dropdown.types.d.ts +11 -0
  66. package/dist/types/components/Dropdown/DropdownItem.d.ts +13 -0
  67. package/dist/types/components/Dropdown/index.d.ts +2 -0
  68. package/dist/types/components/ToggleButton/ToggleButton.styled.d.ts +2 -2
  69. package/dist/types/foundation/Typography/index.d.ts +21 -1
  70. package/dist/types/foundation/Typography/tokens.d.ts +15 -0
  71. package/dist/types/foundation/colors/base/blue.d.ts +2 -0
  72. package/dist/types/foundation/colors/base/green.d.ts +2 -0
  73. package/dist/types/foundation/colors/base/grey.d.ts +15 -0
  74. package/dist/types/foundation/colors/base/lunitTeal.d.ts +2 -0
  75. package/dist/types/foundation/colors/base/magenta.d.ts +2 -0
  76. package/dist/types/foundation/colors/base/orange.d.ts +2 -0
  77. package/dist/types/foundation/colors/base/purple.d.ts +2 -0
  78. package/dist/types/foundation/colors/base/red.d.ts +2 -0
  79. package/dist/types/foundation/colors/base/yellow.d.ts +2 -0
  80. package/dist/types/foundation/colors/index.d.ts +3 -0
  81. package/dist/types/foundation/colors/types.d.ts +3 -0
  82. package/dist/types/foundation/index.d.ts +3 -0
  83. package/dist/types/index.d.ts +1 -1
  84. package/package.json +2 -2
  85. package/src/components/Chip/Chip.styled.ts +9 -16
  86. package/src/components/Dialog/Dialog.tsx +0 -8
  87. package/src/components/Dropdown/Dropdown.styled.tsx +170 -0
  88. package/src/components/Dropdown/Dropdown.tsx +59 -8
  89. package/src/components/Dropdown/Dropdown.types.ts +15 -0
  90. package/src/components/Dropdown/DropdownItem.tsx +107 -0
  91. package/src/components/Dropdown/index.ts +6 -0
  92. package/src/components/TextField/TextField.style.ts +28 -3
  93. package/src/components/TextField/TextField.tsx +1 -7
  94. package/src/foundation/Typography/index.ts +10 -0
  95. package/src/foundation/Typography/tokens.ts +45 -0
  96. package/src/foundation/colors/base/blue.ts +12 -10
  97. package/src/foundation/colors/base/green.ts +11 -9
  98. package/src/foundation/colors/base/grey.ts +30 -15
  99. package/src/foundation/colors/base/lunitTeal.ts +2 -0
  100. package/src/foundation/colors/base/magenta.ts +3 -1
  101. package/src/foundation/colors/base/orange.ts +11 -9
  102. package/src/foundation/colors/base/purple.ts +3 -1
  103. package/src/foundation/colors/base/red.ts +5 -3
  104. package/src/foundation/colors/base/yellow.ts +12 -10
  105. package/src/foundation/colors/index.ts +3 -0
  106. package/src/foundation/colors/token/component.ts +26 -22
  107. package/src/foundation/colors/token/core.ts +21 -0
  108. package/src/foundation/colors/types.ts +3 -0
  109. package/src/index.ts +6 -1
  110. package/src/stories/components/Chip/Chip.stories.tsx +18 -0
  111. package/src/stories/components/Chip/ChipDocs.mdx +20 -0
  112. package/src/stories/components/Dialog/DialogDocs.mdx +2 -10
  113. package/src/stories/components/Dropdown/Dropdown.stories.tsx +299 -10
  114. package/src/stories/components/Dropdown/DropdownExamples.stories.tsx +221 -0
  115. package/src/stories/components/Dropdown/DropdownItem.stories.tsx +360 -0
  116. package/src/stories/components/TextField/BasicTextField.stories.tsx +28 -0
  117. package/src/stories/components/TextField/TextFieldDocs.mdx +12 -0
  118. package/src/stories/foundation/Typography/Typography.stories.tsx +13 -0
  119. package/src/stories/foundation/Typography/const.ts +6 -1
  120. package/src/stories/foundation/colors/TokenPaletteTable.tsx +19 -1
  121. package/dist/cjs/components/Modal/index.js +0 -2
  122. package/dist/cjs/components/Modal/index.js.map +0 -1
  123. package/dist/components/Modal/Modal.js +0 -7
  124. package/dist/components/Modal/Modal.js.map +0 -1
  125. package/dist/components/Modal/index.js +0 -2
  126. package/dist/components/Modal/index.js.map +0 -1
  127. package/dist/types/components/Modal/Modal.d.ts +0 -2
  128. package/dist/types/components/Modal/index.d.ts +0 -1
@@ -6,7 +6,7 @@ export declare const StyledOutlinedChip: import("@emotion/styled").StyledCompone
6
6
  children?: null | undefined;
7
7
  classes?: Partial<import("@mui/material").ChipClasses> | undefined;
8
8
  clickable?: boolean | undefined;
9
- color?: "success" | "info" | "warning" | "error" | "default" | "primary" | "secondary" | undefined;
9
+ color?: "primary" | "secondary" | "success" | "info" | "warning" | "error" | "default" | undefined;
10
10
  deleteIcon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
11
11
  disabled?: boolean | undefined;
12
12
  icon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
@@ -16,16 +16,16 @@ export declare const StyledOutlinedChip: import("@emotion/styled").StyledCompone
16
16
  skipFocusWhenDisabled?: boolean | undefined;
17
17
  sx?: import("@mui/material").SxProps<Theme> | undefined;
18
18
  tabIndex?: number | undefined;
19
- variant?: "filled" | "outlined" | undefined;
19
+ variant?: "outlined" | "filled" | undefined;
20
20
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
21
21
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
22
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "label" | "tabIndex" | "color" | "icon" | "disabled" | "size" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled"> & import("@mui/system").MUIStyledCommonProps<Theme> & OutlinedChipProps, {}, {}>;
22
+ }, "color" | keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "label" | "tabIndex" | "disabled" | "icon" | "size" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled"> & import("@mui/system").MUIStyledCommonProps<Theme> & OutlinedChipProps, {}, {}>;
23
23
  export declare const StyledContainedChipBase: import("@emotion/styled").StyledComponent<{
24
24
  avatar?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
25
25
  children?: null | undefined;
26
26
  classes?: Partial<import("@mui/material").ChipClasses> | undefined;
27
27
  clickable?: boolean | undefined;
28
- color?: "success" | "info" | "warning" | "error" | "default" | "primary" | "secondary" | undefined;
28
+ color?: "primary" | "secondary" | "success" | "info" | "warning" | "error" | "default" | undefined;
29
29
  deleteIcon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
30
30
  disabled?: boolean | undefined;
31
31
  icon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
@@ -35,16 +35,16 @@ export declare const StyledContainedChipBase: import("@emotion/styled").StyledCo
35
35
  skipFocusWhenDisabled?: boolean | undefined;
36
36
  sx?: import("@mui/material").SxProps<Theme> | undefined;
37
37
  tabIndex?: number | undefined;
38
- variant?: "filled" | "outlined" | undefined;
38
+ variant?: "outlined" | "filled" | undefined;
39
39
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
40
40
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
41
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "label" | "tabIndex" | "color" | "icon" | "disabled" | "size" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled"> & import("@mui/system").MUIStyledCommonProps<Theme> & BaseContainedChipProps, {}, {}>;
41
+ }, "color" | keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "label" | "tabIndex" | "disabled" | "icon" | "size" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled"> & import("@mui/system").MUIStyledCommonProps<Theme> & BaseContainedChipProps, {}, {}>;
42
42
  export declare const StyledContainedChipEnable: import("@emotion/styled").StyledComponent<{
43
43
  avatar?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
44
44
  children?: null | undefined;
45
45
  classes?: Partial<import("@mui/material").ChipClasses> | undefined;
46
46
  clickable?: boolean | undefined;
47
- color?: "success" | "info" | "warning" | "error" | "default" | "primary" | "secondary" | undefined;
47
+ color?: "primary" | "secondary" | "success" | "info" | "warning" | "error" | "default" | undefined;
48
48
  deleteIcon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
49
49
  disabled?: boolean | undefined;
50
50
  icon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
@@ -54,16 +54,16 @@ export declare const StyledContainedChipEnable: import("@emotion/styled").Styled
54
54
  skipFocusWhenDisabled?: boolean | undefined;
55
55
  sx?: import("@mui/material").SxProps<Theme> | undefined;
56
56
  tabIndex?: number | undefined;
57
- variant?: "filled" | "outlined" | undefined;
57
+ variant?: "outlined" | "filled" | undefined;
58
58
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
59
59
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
60
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "label" | "tabIndex" | "color" | "icon" | "disabled" | "size" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled"> & import("@mui/system").MUIStyledCommonProps<Theme> & BaseContainedChipProps & EnableContainedChipProps, {}, {}>;
60
+ }, "color" | keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "label" | "tabIndex" | "disabled" | "icon" | "size" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled"> & import("@mui/system").MUIStyledCommonProps<Theme> & BaseContainedChipProps & EnableContainedChipProps, {}, {}>;
61
61
  export declare const StyledContainedChipDeletable: import("@emotion/styled").StyledComponent<{
62
62
  avatar?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
63
63
  children?: null | undefined;
64
64
  classes?: Partial<import("@mui/material").ChipClasses> | undefined;
65
65
  clickable?: boolean | undefined;
66
- color?: "success" | "info" | "warning" | "error" | "default" | "primary" | "secondary" | undefined;
66
+ color?: "primary" | "secondary" | "success" | "info" | "warning" | "error" | "default" | undefined;
67
67
  deleteIcon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
68
68
  disabled?: boolean | undefined;
69
69
  icon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
@@ -73,7 +73,7 @@ export declare const StyledContainedChipDeletable: import("@emotion/styled").Sty
73
73
  skipFocusWhenDisabled?: boolean | undefined;
74
74
  sx?: import("@mui/material").SxProps<Theme> | undefined;
75
75
  tabIndex?: number | undefined;
76
- variant?: "filled" | "outlined" | undefined;
76
+ variant?: "outlined" | "filled" | undefined;
77
77
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
78
78
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
79
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "label" | "tabIndex" | "color" | "icon" | "disabled" | "size" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled"> & import("@mui/system").MUIStyledCommonProps<Theme> & BaseContainedChipProps, {}, {}>;
79
+ }, "color" | keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "label" | "tabIndex" | "disabled" | "icon" | "size" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled"> & import("@mui/system").MUIStyledCommonProps<Theme> & BaseContainedChipProps, {}, {}>;
@@ -11,7 +11,6 @@ export interface DialogBase {
11
11
  titleVariant?: TypographyProps["variant"];
12
12
  children: React.ReactNode;
13
13
  actions?: React.ReactNode;
14
- enableBackButtonClose?: boolean;
15
14
  enableBackdropClose?: boolean;
16
15
  size?: "small" | "medium";
17
16
  sx?: SxProps;
@@ -21,13 +20,11 @@ export interface DialogBase {
21
20
  export interface PassiveDialogType extends DialogBase {
22
21
  type: "passive";
23
22
  actions?: undefined;
24
- enableBackButtonClose?: true;
25
23
  enableBackdropClose?: true;
26
24
  }
27
25
  export interface ActionDialogType extends DialogBase {
28
26
  type: "action";
29
27
  actions: React.ReactNode;
30
- enableBackButtonClose?: false;
31
28
  enableBackdropClose?: boolean;
32
29
  }
33
30
  export interface PassiveModalProps extends PassiveDialogType {
@@ -1,2 +1,4 @@
1
- declare const Dropdown: () => import("react/jsx-runtime").JSX.Element;
1
+ import React from "react";
2
+ import { DropdownProps } from "./Dropdown.types";
3
+ declare const Dropdown: React.ForwardRefExoticComponent<Omit<DropdownProps, "ref"> & React.RefAttributes<unknown>>;
2
4
  export default Dropdown;
@@ -0,0 +1,41 @@
1
+ /// <reference types="react" />
2
+ import { DropdownProps } from "./Dropdown.types";
3
+ export declare const StyledSelect: import("@emotion/styled").StyledComponent<import("@mui/material/Select").SelectProps<unknown> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Omit<DropdownProps, "size"> & {
4
+ selectSize: "small" | "medium" | "large";
5
+ }, {}, {}>;
6
+ export declare const StyledMenuItem: import("@emotion/styled").StyledComponent<{
7
+ autoFocus?: boolean | undefined;
8
+ classes?: Partial<import("@mui/material/MenuItem").MenuItemClasses> | undefined;
9
+ dense?: boolean | undefined;
10
+ disabled?: boolean | undefined;
11
+ disableGutters?: boolean | undefined;
12
+ divider?: boolean | undefined;
13
+ selected?: boolean | undefined;
14
+ sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
15
+ } & Omit<{
16
+ action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
17
+ centerRipple?: boolean | undefined;
18
+ children?: import("react").ReactNode;
19
+ classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
20
+ disabled?: boolean | undefined;
21
+ disableRipple?: boolean | undefined;
22
+ disableTouchRipple?: boolean | undefined;
23
+ focusRipple?: boolean | undefined;
24
+ focusVisibleClassName?: string | undefined;
25
+ LinkComponent?: import("react").ElementType<any> | undefined;
26
+ onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
27
+ sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
28
+ tabIndex?: number | undefined;
29
+ TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
30
+ touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
31
+ }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
32
+ ref?: ((instance: HTMLLIElement | null) => void) | import("react").RefObject<HTMLLIElement> | null | undefined;
33
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "autoFocus" | "tabIndex" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "selected" | "dense" | "disableGutters" | "divider"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
34
+ export declare const StyledIconWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
35
+ children?: import("react").ReactNode;
36
+ component?: import("react").ElementType<any> | undefined;
37
+ ref?: import("react").Ref<unknown> | undefined;
38
+ sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
39
+ } & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
40
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
41
+ }, ("zIndex" | "typography" | "boxShadow" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "displayPrint" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "marginX" | "marginY" | "paddingX" | "paddingY") | "children" | "sx" | "ref" | "component"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import type { MenuItemProps, SelectProps } from "@mui/material";
3
+ export interface DropdownProps extends Omit<SelectProps, "size" | "variant" | "placeholder"> {
4
+ select?: "single" | "multiple";
5
+ size?: "small" | "medium" | "large";
6
+ }
7
+ export interface DropdownItemProps extends MenuItemProps {
8
+ leftIcon?: JSX.Element;
9
+ rightText?: string;
10
+ isFilledStyle?: boolean;
11
+ }
@@ -0,0 +1,13 @@
1
+ import { SxProps } from "@mui/material";
2
+ import { DropdownItemProps } from "./Dropdown.types";
3
+ export declare function DropdownItem(props: DropdownItemProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare function DropdownDivider({ sx }: {
5
+ sx?: SxProps;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ export declare function DropdownSubtitle({ title, sx, }: {
8
+ title: string;
9
+ sx?: SxProps;
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ export declare namespace DropdownSubtitle {
12
+ var muiSkipListHighlight: boolean;
13
+ }
@@ -1 +1,3 @@
1
1
  export { default } from "./Dropdown";
2
+ export { DropdownItem, DropdownDivider, DropdownSubtitle, } from "./DropdownItem";
3
+ export type { DropdownProps, DropdownItemProps } from "./Dropdown.types";
@@ -6,7 +6,7 @@ type CustomToggleButtonProps = ToggleButtonProps & {
6
6
  export declare const CustomToggleButton: import("@emotion/styled").StyledComponent<{
7
7
  children?: import("react").ReactNode;
8
8
  classes?: Partial<import("@mui/material").ToggleButtonClasses> | undefined;
9
- color?: "success" | "info" | "warning" | "error" | "standard" | "primary" | "secondary" | undefined;
9
+ color?: "primary" | "secondary" | "success" | "info" | "warning" | "error" | "standard" | undefined;
10
10
  disabled?: boolean | undefined;
11
11
  disableFocusRipple?: boolean | undefined;
12
12
  fullWidth?: boolean | undefined;
@@ -34,7 +34,7 @@ export declare const CustomToggleButton: import("@emotion/styled").StyledCompone
34
34
  touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
35
35
  }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
36
36
  ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
37
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "tabIndex" | "color" | "onChange" | "onClick" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "fullWidth" | "size" | "value" | "selected"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & CustomToggleButtonProps, {}, {}>;
37
+ }, "color" | keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "tabIndex" | "onChange" | "onClick" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "value" | "disableFocusRipple" | "fullWidth" | "size" | "selected"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & CustomToggleButtonProps, {}, {}>;
38
38
  export declare const IconAndChildrenWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
39
39
  export declare const IconWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
40
40
  hasIconOnly: boolean;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import type { TypographyOptions } from "@mui/material/styles/createTypography";
3
- type DSVariants = "headline1" | "headline2" | "headline3" | "headline4" | "headline5" | "body1_16_semibold" | "body1_16_regular" | "body2_14_bold" | "body2_14_medium" | "body2_14_regular" | "body3_12_semibold" | "body3_12_regular" | "button1" | "button2";
3
+ type DSVariants = "headline1" | "headline2" | "headline3" | "headline4" | "headline5" | "body1_16_semibold" | "body1_16_regular" | "body2_14_bold" | "body2_14_medium" | "body2_14_regular" | "body3_12_semibold" | "body3_12_regular" | "body_m2" | "body_reg6" | "body_reg8" | "small_body_sb1" | "small_body_m2" | "button1" | "button2";
4
4
  type DSVariantsType = Record<DSVariants, React.CSSProperties>;
5
5
  declare module "@mui/material/styles" {
6
6
  interface TypographyVariants extends DSVariantsType {
@@ -24,6 +24,11 @@ export declare const typographyDefaultProps: {
24
24
  body2_14_regular: string;
25
25
  body3_12_semibold: string;
26
26
  body3_12_regular: string;
27
+ body_m2: string;
28
+ body_reg6: string;
29
+ body_reg8: string;
30
+ small_body_sb1: string;
31
+ small_body_m2: string;
27
32
  };
28
33
  };
29
34
  export declare const createTypographyCssBaseline: () => {
@@ -43,6 +48,12 @@ export declare const createTypographyCssBaseline: () => {
43
48
  "--caption-font-weight": "var(--font-weight-medium)";
44
49
  "--caption-font-size": "12px";
45
50
  "--caption-line-height": "16px";
51
+ "--small_body_sb1-font-weight": "var(--font-weight-semibold)";
52
+ "--small_body_sb1-font-size": "12px";
53
+ "--small_body_sb1-line-height": "16px";
54
+ "--small_body_m2-font-weight": "var(--font-weight-medium)";
55
+ "--small_body_m2-font-size": "12px";
56
+ "--small_body_m2-line-height": "20px";
46
57
  "--body1-16-semibold-font-weight": "var(--font-weight-semibold)";
47
58
  "--body1-16-semibold-font-size": "16px";
48
59
  "--body1-16-semibold-line-height": "24px";
@@ -64,6 +75,15 @@ export declare const createTypographyCssBaseline: () => {
64
75
  "--body3-12-regular-font-weight": "var(--font-weight-regular)";
65
76
  "--body3-12-regular-font-size": "12.4px";
66
77
  "--body3-12-regular-line-height": "16px";
78
+ "--body_m2-font-weight": "var(--font-weight-medium)";
79
+ "--body_m2-font-size": "13px";
80
+ "--body_m2-line-height": "18px";
81
+ "--body_reg6-font-weight": "var(--font-weight-regular)";
82
+ "--body_reg6-font-size": "13px";
83
+ "--body_reg6-line-height": "18px";
84
+ "--body_reg8-font-weight": "var(--font-weight-regular)";
85
+ "--body_reg8-font-size": "12px";
86
+ "--body_reg8-line-height": "16px";
67
87
  "--headline1-font-weight": "var(--font-weight-semibold)";
68
88
  "--headline1-font-size": "52px";
69
89
  "--headline1-line-height": "68px";
@@ -13,6 +13,12 @@ export declare const cssVariables: {
13
13
  "--caption-font-weight": "var(--font-weight-medium)";
14
14
  "--caption-font-size": "12px";
15
15
  "--caption-line-height": "16px";
16
+ "--small_body_sb1-font-weight": "var(--font-weight-semibold)";
17
+ "--small_body_sb1-font-size": "12px";
18
+ "--small_body_sb1-line-height": "16px";
19
+ "--small_body_m2-font-weight": "var(--font-weight-medium)";
20
+ "--small_body_m2-font-size": "12px";
21
+ "--small_body_m2-line-height": "20px";
16
22
  "--body1-16-semibold-font-weight": "var(--font-weight-semibold)";
17
23
  "--body1-16-semibold-font-size": "16px";
18
24
  "--body1-16-semibold-line-height": "24px";
@@ -34,6 +40,15 @@ export declare const cssVariables: {
34
40
  "--body3-12-regular-font-weight": "var(--font-weight-regular)";
35
41
  "--body3-12-regular-font-size": "12.4px";
36
42
  "--body3-12-regular-line-height": "16px";
43
+ "--body_m2-font-weight": "var(--font-weight-medium)";
44
+ "--body_m2-font-size": "13px";
45
+ "--body_m2-line-height": "18px";
46
+ "--body_reg6-font-weight": "var(--font-weight-regular)";
47
+ "--body_reg6-font-size": "13px";
48
+ "--body_reg6-line-height": "18px";
49
+ "--body_reg8-font-weight": "var(--font-weight-regular)";
50
+ "--body_reg8-font-size": "12px";
51
+ "--body_reg8-line-height": "16px";
37
52
  "--headline1-font-weight": "var(--font-weight-semibold)";
38
53
  "--headline1-font-size": "52px";
39
54
  "--headline1-line-height": "68px";
@@ -1,6 +1,7 @@
1
1
  export declare const blue: {
2
2
  5: string;
3
3
  10: string;
4
+ 15: string;
4
5
  20: string;
5
6
  30: string;
6
7
  40: string;
@@ -13,6 +14,7 @@ export declare const blue: {
13
14
  export declare const blueText: {
14
15
  5: string;
15
16
  10: string;
17
+ 15: string;
16
18
  20: string;
17
19
  30: string;
18
20
  40: string;
@@ -1,6 +1,7 @@
1
1
  export declare const green: {
2
2
  5: string;
3
3
  10: string;
4
+ 15: string;
4
5
  20: string;
5
6
  30: string;
6
7
  40: string;
@@ -13,6 +14,7 @@ export declare const green: {
13
14
  export declare const greenText: {
14
15
  5: string;
15
16
  10: string;
17
+ 15: string;
16
18
  20: string;
17
19
  30: string;
18
20
  40: string;
@@ -6,14 +6,21 @@ export declare const grey: {
6
6
  20: string;
7
7
  25: string;
8
8
  30: string;
9
+ 35: string;
9
10
  40: string;
11
+ 45: string;
10
12
  50: string;
13
+ 55: string;
11
14
  60: string;
15
+ 65: string;
12
16
  70: string;
13
17
  75: string;
14
18
  80: string;
19
+ 82: string;
15
20
  85: string;
21
+ 88: string;
16
22
  90: string;
23
+ 93: string;
17
24
  95: string;
18
25
  100: string;
19
26
  };
@@ -25,13 +32,21 @@ export declare const greyText: {
25
32
  20: string;
26
33
  25: string;
27
34
  30: string;
35
+ 35: string;
28
36
  40: string;
37
+ 45: string;
29
38
  50: string;
39
+ 55: string;
30
40
  60: string;
41
+ 65: string;
31
42
  70: string;
43
+ 75: string;
32
44
  80: string;
45
+ 82: string;
33
46
  85: string;
47
+ 88: string;
34
48
  90: string;
49
+ 93: string;
35
50
  95: string;
36
51
  100: string;
37
52
  };
@@ -1,6 +1,7 @@
1
1
  export declare const lunit_teal: {
2
2
  5: string;
3
3
  10: string;
4
+ 15: string;
4
5
  20: string;
5
6
  30: string;
6
7
  40: string;
@@ -13,6 +14,7 @@ export declare const lunit_teal: {
13
14
  export declare const lunit_tealText: {
14
15
  5: string;
15
16
  10: string;
17
+ 15: string;
16
18
  20: string;
17
19
  30: string;
18
20
  40: string;
@@ -1,6 +1,7 @@
1
1
  export declare const magenta: {
2
2
  5: string;
3
3
  10: string;
4
+ 15: string;
4
5
  20: string;
5
6
  30: string;
6
7
  40: string;
@@ -13,6 +14,7 @@ export declare const magenta: {
13
14
  export declare const magentaText: {
14
15
  5: string;
15
16
  10: string;
17
+ 15: string;
16
18
  20: string;
17
19
  30: string;
18
20
  40: string;
@@ -1,6 +1,7 @@
1
1
  export declare const orange: {
2
2
  5: string;
3
3
  10: string;
4
+ 15: string;
4
5
  20: string;
5
6
  30: string;
6
7
  40: string;
@@ -13,6 +14,7 @@ export declare const orange: {
13
14
  export declare const orangeText: {
14
15
  5: string;
15
16
  10: string;
17
+ 15: string;
16
18
  20: string;
17
19
  30: string;
18
20
  40: string;
@@ -1,6 +1,7 @@
1
1
  export declare const purple: {
2
2
  5: string;
3
3
  10: string;
4
+ 15: string;
4
5
  20: string;
5
6
  30: string;
6
7
  40: string;
@@ -13,6 +14,7 @@ export declare const purple: {
13
14
  export declare const purpleText: {
14
15
  5: string;
15
16
  10: string;
17
+ 15: string;
16
18
  20: string;
17
19
  30: string;
18
20
  40: string;
@@ -1,6 +1,7 @@
1
1
  export declare const red: {
2
2
  5: string;
3
3
  10: string;
4
+ 15: string;
4
5
  20: string;
5
6
  30: string;
6
7
  40: string;
@@ -13,6 +14,7 @@ export declare const red: {
13
14
  export declare const redText: {
14
15
  5: string;
15
16
  10: string;
17
+ 15: string;
16
18
  20: string;
17
19
  30: string;
18
20
  40: string;
@@ -1,6 +1,7 @@
1
1
  export declare const yellow: {
2
2
  5: string;
3
3
  10: string;
4
+ 15: string;
4
5
  20: string;
5
6
  30: string;
6
7
  40: string;
@@ -13,6 +14,7 @@ export declare const yellow: {
13
14
  export declare const yellowText: {
14
15
  5: string;
15
16
  10: string;
17
+ 15: string;
16
18
  20: string;
17
19
  30: string;
18
20
  40: string;
@@ -125,8 +125,11 @@ declare const paletteOptions: {
125
125
  icon_warning_02: string;
126
126
  icon_info_02: string;
127
127
  hover: string;
128
+ status_hover: string;
128
129
  focused: string;
130
+ status_focused: string;
129
131
  selected: string;
132
+ status_selected: string;
130
133
  shadow_01: string;
131
134
  shadow_02: string;
132
135
  shadow_03: string;
@@ -20,8 +20,11 @@ export interface ColorToken {
20
20
  icon_warning_02: string;
21
21
  icon_info_02: string;
22
22
  hover: string;
23
+ status_hover: string;
23
24
  focused: string;
25
+ status_focused: string;
24
26
  selected: string;
27
+ status_selected: string;
25
28
  shadow_01: string;
26
29
  shadow_02: string;
27
30
  shadow_03: string;
@@ -76,8 +76,11 @@ export declare const palette: {
76
76
  icon_warning_02: string;
77
77
  icon_info_02: string;
78
78
  hover: string;
79
+ status_hover: string;
79
80
  focused: string;
81
+ status_focused: string;
80
82
  selected: string;
83
+ status_selected: string;
81
84
  shadow_01: string;
82
85
  shadow_02: string;
83
86
  shadow_03: string;
@@ -7,7 +7,7 @@ export { default as Checkbox } from "./components/Checkbox";
7
7
  export { default as Dialog } from "./components/Dialog";
8
8
  export { default as DataTable } from "./components/DataTable";
9
9
  export { default as DatePicker } from "./components/DatePicker";
10
- export { default as Dropdown } from "./components/Dropdown";
10
+ export { default as Dropdown, DropdownItem, DropdownDivider, DropdownSubtitle, } from "./components/Dropdown";
11
11
  export { default as FormLabel } from "./components/FormLabel";
12
12
  export { default as Radio } from "./components/Radio";
13
13
  export { default as RadioGroup } from "./components/RadioGroup";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunit/design-system",
3
- "version": "2.0.2",
3
+ "version": "2.1.0",
4
4
  "description": "Lunit Design System",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/index.js",
@@ -102,4 +102,4 @@
102
102
  "react": "^17.0.0 || ^18.0.0",
103
103
  "react-dom": "^17.0.0 || ^18.0.0"
104
104
  }
105
- }
105
+ }
@@ -10,19 +10,14 @@ import type {
10
10
  } from "./Chip.types";
11
11
 
12
12
  const COMMON_STYLES = {
13
- "&.MuiChip-root": {
14
- height: "22px",
15
- width: "auto",
16
- minWidth: "22px",
17
- boxShadow: "none",
18
- },
13
+ height: "22px",
14
+ width: "auto",
15
+ minWidth: "22px",
16
+ boxShadow: "none",
19
17
  "&.Mui-disabled": {
20
18
  opacity: 1,
21
19
  },
22
20
  "& .MuiChip-label": {
23
- display: "flex",
24
- alignItems: "center",
25
- textAlign: "center",
26
21
  padding: 0,
27
22
  marginInline: "8px",
28
23
  },
@@ -117,16 +112,14 @@ export const StyledContainedChipEnable = styled(StyledContainedChipBase, {
117
112
  * Setting the z-index of the chip to 0 and the z-index of the pseudo element to -1
118
113
  * allows the pseudo element(hover layer) to be rendered between the chip and the chip's children.
119
114
  */
120
- "&.MuiChip-root": {
121
- position: "relative",
122
- left: 0,
123
- right: 0,
124
- zIndex: 0,
125
- },
115
+ position: "relative",
116
+ left: 0,
117
+ right: 0,
118
+ zIndex: 0,
126
119
  "&:hover": {
127
120
  backgroundColor: getColorToken("bg", theme, color),
128
121
  },
129
- "&.MuiChip-root:hover::before": {
122
+ "&:hover::before": {
130
123
  position: "absolute",
131
124
  zIndex: -1,
132
125
  content: '""',
@@ -26,7 +26,6 @@ export interface DialogBase {
26
26
  titleVariant?: TypographyProps["variant"];
27
27
  children: React.ReactNode;
28
28
  actions?: React.ReactNode;
29
- enableBackButtonClose?: boolean; // only for passive dialog
30
29
  enableBackdropClose?: boolean;
31
30
  size?: "small" | "medium"; // default "small"
32
31
  sx?: SxProps;
@@ -37,13 +36,11 @@ export interface DialogBase {
37
36
  export interface PassiveDialogType extends DialogBase {
38
37
  type: "passive";
39
38
  actions?: undefined;
40
- enableBackButtonClose?: true;
41
39
  enableBackdropClose?: true;
42
40
  }
43
41
  export interface ActionDialogType extends DialogBase {
44
42
  type: "action";
45
43
  actions: React.ReactNode;
46
- enableBackButtonClose?: false;
47
44
  enableBackdropClose?: boolean;
48
45
  }
49
46
 
@@ -89,16 +86,11 @@ function Dialog(props: DialogProps) {
89
86
  function handleEscClose(event: KeyboardEvent) {
90
87
  if (event.key === "Escape") onClose();
91
88
  }
92
- function handleBackButtonClose(event: KeyboardEvent) {
93
- if (event.key === "Backspace") onClose();
94
- }
95
89
 
96
90
  document.addEventListener("keydown", handleEscClose);
97
- document.addEventListener("keydown", handleBackButtonClose);
98
91
 
99
92
  return () => {
100
93
  document.removeEventListener("keydown", handleEscClose);
101
- document.removeEventListener("keydown", handleBackButtonClose);
102
94
  };
103
95
  }, [isOpen, isPassiveModal, onClose]);
104
96