@lunit/design-system 1.0.0-a.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.
Files changed (109) hide show
  1. package/README.md +34 -0
  2. package/dist/components/Alert/Alert.d.ts +2 -0
  3. package/dist/components/Alert/index.d.ts +1 -0
  4. package/dist/components/Alert/index.js +2 -0
  5. package/dist/components/Alert/index.js.map +1 -0
  6. package/dist/components/Button/Button.d.ts +3 -0
  7. package/dist/components/Button/Button.styled.d.ts +890 -0
  8. package/dist/components/Button/Button.types.d.ts +19 -0
  9. package/dist/components/Button/const.d.ts +2 -0
  10. package/dist/components/Button/index.d.ts +1 -0
  11. package/dist/components/Button/index.js +2 -0
  12. package/dist/components/Button/index.js.map +1 -0
  13. package/dist/components/Button/utils/getButtonPaddingBySizeAndKind.d.ts +10 -0
  14. package/dist/components/Button/utils/getIconButtonPaddingBySizeAndKind.d.ts +10 -0
  15. package/dist/components/Checkbox/Checkbox.d.ts +3 -0
  16. package/dist/components/Checkbox/index.d.ts +1 -0
  17. package/dist/components/Checkbox/index.js +2 -0
  18. package/dist/components/Checkbox/index.js.map +1 -0
  19. package/dist/components/Chip/Chip.d.ts +3 -0
  20. package/dist/components/Chip/Chip.styled.d.ts +41 -0
  21. package/dist/components/Chip/Chip.types.d.ts +37 -0
  22. package/dist/components/Chip/consts.d.ts +7 -0
  23. package/dist/components/Chip/index.d.ts +1 -0
  24. package/dist/components/Chip/index.js +2 -0
  25. package/dist/components/Chip/index.js.map +1 -0
  26. package/dist/components/DataTable/DataTable.d.ts +2 -0
  27. package/dist/components/DataTable/index.d.ts +1 -0
  28. package/dist/components/DataTable/index.js +2 -0
  29. package/dist/components/DataTable/index.js.map +1 -0
  30. package/dist/components/DatePicker/DatePicker.d.ts +2 -0
  31. package/dist/components/DatePicker/index.d.ts +1 -0
  32. package/dist/components/DatePicker/index.js +2 -0
  33. package/dist/components/DatePicker/index.js.map +1 -0
  34. package/dist/components/Dropdown/Dropdown.d.ts +2 -0
  35. package/dist/components/Dropdown/index.d.ts +1 -0
  36. package/dist/components/Dropdown/index.js +2 -0
  37. package/dist/components/Dropdown/index.js.map +1 -0
  38. package/dist/components/FormLabel/FormLabel.d.ts +3 -0
  39. package/dist/components/FormLabel/FormLabel.styled.d.ts +1 -0
  40. package/dist/components/FormLabel/index.d.ts +1 -0
  41. package/dist/components/FormLabel/index.js +2 -0
  42. package/dist/components/FormLabel/index.js.map +1 -0
  43. package/dist/components/HelloWorld/HelloWorld.d.ts +28 -0
  44. package/dist/components/Modal/Modal.d.ts +2 -0
  45. package/dist/components/Modal/index.d.ts +1 -0
  46. package/dist/components/Modal/index.js +2 -0
  47. package/dist/components/Modal/index.js.map +1 -0
  48. package/dist/components/Radio/Radio.d.ts +3 -0
  49. package/dist/components/Radio/index.d.ts +1 -0
  50. package/dist/components/Radio/index.js +2 -0
  51. package/dist/components/Radio/index.js.map +1 -0
  52. package/dist/components/RadioGroup/index.d.ts +2 -0
  53. package/dist/components/RadioGroup/index.js +2 -0
  54. package/dist/components/RadioGroup/index.js.map +1 -0
  55. package/dist/components/TextField/TextField.d.ts +2 -0
  56. package/dist/components/TextField/index.d.ts +1 -0
  57. package/dist/components/TextField/index.js +2 -0
  58. package/dist/components/TextField/index.js.map +1 -0
  59. package/dist/components/Toggle/Toggle.d.ts +3 -0
  60. package/dist/components/Toggle/Toggle.styled.d.ts +7 -0
  61. package/dist/components/Toggle/Toggle.types.d.ts +13 -0
  62. package/dist/components/Toggle/index.d.ts +1 -0
  63. package/dist/components/Toggle/index.js +2 -0
  64. package/dist/components/Toggle/index.js.map +1 -0
  65. package/dist/components/ToggleButton/ToggleButton.d.ts +3 -0
  66. package/dist/components/ToggleButton/ToggleButton.styled.d.ts +39 -0
  67. package/dist/components/ToggleButton/ToggleButton.types.d.ts +20 -0
  68. package/dist/components/ToggleButton/index.d.ts +1 -0
  69. package/dist/components/ToggleButton/index.js +2 -0
  70. package/dist/components/ToggleButton/index.js.map +1 -0
  71. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +3 -0
  72. package/dist/components/ToggleButtonGroup/index.d.ts +1 -0
  73. package/dist/components/Tooltip/Tooltip.d.ts +2 -0
  74. package/dist/components/Tooltip/index.d.ts +1 -0
  75. package/dist/components/Tooltip/index.js +2 -0
  76. package/dist/components/Tooltip/index.js.map +1 -0
  77. package/dist/components/index.d.ts +2 -0
  78. package/dist/foundation/Elevation/index.d.ts +65 -0
  79. package/dist/foundation/Elevation/utils.d.ts +2 -0
  80. package/dist/foundation/Typography/index.d.ts +93 -0
  81. package/dist/foundation/Typography/tokens.d.ts +57 -0
  82. package/dist/foundation/colors/base/blue.d.ts +24 -0
  83. package/dist/foundation/colors/base/green.d.ts +24 -0
  84. package/dist/foundation/colors/base/grey.d.ts +35 -0
  85. package/dist/foundation/colors/base/index.d.ts +11 -0
  86. package/dist/foundation/colors/base/lunitGreen.d.ts +24 -0
  87. package/dist/foundation/colors/base/lunitTeal.d.ts +24 -0
  88. package/dist/foundation/colors/base/magenta.d.ts +24 -0
  89. package/dist/foundation/colors/base/opacity.d.ts +6 -0
  90. package/dist/foundation/colors/base/orange.d.ts +24 -0
  91. package/dist/foundation/colors/base/purple.d.ts +24 -0
  92. package/dist/foundation/colors/base/red.d.ts +24 -0
  93. package/dist/foundation/colors/base/yellow.d.ts +24 -0
  94. package/dist/foundation/colors/index.d.ts +155 -0
  95. package/dist/foundation/colors/token/component.d.ts +7 -0
  96. package/dist/foundation/colors/token/core.d.ts +5 -0
  97. package/dist/foundation/colors/token/index.d.ts +2 -0
  98. package/dist/foundation/colors/token/types.d.ts +8 -0
  99. package/dist/foundation/colors/types.d.ts +86 -0
  100. package/dist/foundation/index.d.ts +111 -0
  101. package/dist/foundation/spacing.d.ts +2 -0
  102. package/dist/index.d.ts +16 -0
  103. package/dist/index.js +2 -0
  104. package/dist/index.js.map +1 -0
  105. package/dist/theme.d.ts +2 -0
  106. package/package.json +86 -0
  107. package/tsconfig.build.json +18 -0
  108. package/tsconfig.json +17 -0
  109. package/webpack.config.js +51 -0
@@ -0,0 +1,7 @@
1
+ import { SwitchProps } from "@mui/material";
2
+ interface ToggleProps extends SwitchProps {
3
+ toggleSize: 'medium' | 'large';
4
+ }
5
+ export declare const CommonToggle: import("@emotion/styled").StyledComponent<SwitchProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & ToggleProps, {}, {}>;
6
+ export declare const CommonIndeterminateToggle: import("@emotion/styled").StyledComponent<SwitchProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & ToggleProps, {}, {}>;
7
+ export {};
@@ -0,0 +1,13 @@
1
+ import type { SwitchProps } from "@mui/material";
2
+ export interface ToggleProps extends Omit<SwitchProps, "size"> {
3
+ /**
4
+ * The size of the component.
5
+ * @default medium
6
+ */
7
+ size?: 'medium' | 'large';
8
+ /**
9
+ * If `true`, the component has consistent 'checked' value and change shape.
10
+ * @default false
11
+ */
12
+ indeterminate?: boolean;
13
+ }
@@ -0,0 +1 @@
1
+ export { default } from "./Toggle";
@@ -0,0 +1,2 @@
1
+ (()=>{"use strict";var e={692:e=>{e.exports=require("@mui/material")},997:e=>{e.exports=require("react/jsx-runtime")}},t={};function r(o){var i=t[o];if(void 0!==i)return i.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,r),n.exports}r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{r.r(o),r.d(o,{default:()=>l});var e=r(997),t=r(692),i=function(){return i=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)},n={medium:{root:{width:28,height:18,borderRadius:9},focus:{width:34,height:24,borderRadius:12},switch:{transition:"all 100ms ease-in-out"},switchChecked:{transform:"translateX(10px)"},thumb:{width:14,height:14}},large:{root:{width:44,height:24,borderRadius:12},focus:{width:50,height:30,borderRadius:14},switch:{transition:"all 150ms ease-in-out"},switchChecked:{transform:"translateX(20px)"},thumb:{width:20,height:20}}},a={large:{switchChecked:{top:8,left:-8},track:{borderRadius:12},thumb:{height:4,width:16,borderRadius:2}},medium:{switchChecked:{top:6,left:-4},track:{borderRadius:12},thumb:{height:2,width:12,borderRadius:2}}},c=(0,t.styled)(t.Switch,{shouldForwardProp:function(e){return"toggleSize"!==e}})((function(e){var t=e.theme,r=e.toggleSize,o=e.disabled,a=t.palette.token.component.selectcontrol_on,c=t.palette.token.component.selectcontrol_off,d=t.palette.token.component.selectcontrol_handler,u=n[r],s=o?.38:1;return i(i({},u.root),{display:"flex",padding:0,overflow:"visible",backgroundColor:"transparent",opacity:s,"& .Mui-focusVisible":{boxShadow:"none",background:"transparent",borderColor:"transparent",outline:"none","& + .MuiSwitch-track::after":i(i({},u.focus),{content:'""',position:"absolute",border:"1px solid ".concat(a),boxSizing:"border-box",top:-3,left:-3})},"& .MuiSwitch-track":{opacity:1,borderRadius:12,backgroundColor:c},"& .MuiSwitch-thumb":i(i({},u.thumb),{boxShadow:"0px 0px 1px rgba(0, 0, 0, 0.4)"}),"& .MuiSwitch-switchBase":i(i({},u.switch),{padding:2,opacity:1,"&.Mui-checked":i(i({},u.switchChecked),{color:d,"& + .MuiSwitch-track":{opacity:1,backgroundColor:a}})}),"& .Mui-disabled + .MuiSwitch-track":{opacity:1}})})),d=(0,t.styled)(c,{shouldForwardProp:function(e){return"toggleSize"!==e}})((function(e){var t=e.toggleSize,r=a[t];return{padding:0,cursor:"pointer","& .MuiSwitch-switchBase.Mui-checked":i(i({},r.switchChecked),{"& + .MuiSwitch-track":i({},r.track)}),"& .MuiSwitch-thumb":i(i({},r.thumb),{boxShadow:"none"})}})),u=function(){return u=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},u.apply(this,arguments)},s=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(r[o[i]]=e[o[i]])}return r};const l=function(t){var r=t.size,o=void 0===r?"medium":r,i=t.indeterminate,n=void 0!==i&&i,a=t.disableRipple,l=s(t,["size","indeterminate","disableRipple"]);if(n){l.checked;var h=s(l,["checked"]);return(0,e.jsx)(d,u({toggleSize:o,checked:!0,focusRipple:!1,disableRipple:a},h))}return(0,e.jsx)(c,u({toggleSize:o,focusRipple:!1,disableRipple:a},l))}})(),exports.default=o.default,Object.defineProperty(exports,"__esModule",{value:!0})})();
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components/Toggle/index.js","mappings":"kCAAAA,EAAOC,QAAUC,QAAQ,gB,UCAzBF,EAAOC,QAAUC,QAAQ,oB,GCCrBC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaL,QAGrB,IAAID,EAASG,EAAyBE,GAAY,CAGjDJ,QAAS,CAAC,GAOX,OAHAO,EAAoBH,GAAUL,EAAQA,EAAOC,QAASG,GAG/CJ,EAAOC,OACf,CCrBAG,EAAoBK,EAAI,CAACR,EAASS,KACjC,IAAI,IAAIC,KAAOD,EACXN,EAAoBQ,EAAEF,EAAYC,KAASP,EAAoBQ,EAAEX,EAASU,IAC5EE,OAAOC,eAAeb,EAASU,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE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,EAAS,EAAKD,EAA/B,aAEJ,OAAO,SAACN,EAAyB,GAAC3B,WAAY8B,EAAMK,SAAO,EAACC,aAAa,EAAOJ,cAAeA,GAAmBE,G,CAGtH,OAAQ,SAACvC,EAAY,GAACK,WAAY8B,EAAMM,aAAa,EAAOJ,cAAeA,GAAmBC,GAChG,C","sources":["webpack://@lunit/design-system/external commonjs \"@mui/material\"","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/./src/components/Toggle/Toggle.styled.ts","webpack://@lunit/design-system/./src/components/Toggle/Toggle.tsx"],"sourcesContent":["module.exports = require(\"@mui/material\");","module.exports = require(\"react/jsx-runtime\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { styled, Switch as MuiSwitch, SwitchProps } from \"@mui/material\";\ninterface ToggleProps extends SwitchProps {\n toggleSize: 'medium' | 'large'\n}\n\nconst toggleStyles = {\n medium: {\n root: {\n width: 28,\n height: 18,\n borderRadius: 9,\n },\n focus: {\n width: 34,\n height: 24,\n borderRadius: 12,\n },\n switch: {\n transition: \"all 100ms ease-in-out\",\n },\n switchChecked: {\n transform: 'translateX(10px)',\n },\n thumb: {\n width: 14,\n height: 14,\n }\n },\n large: {\n root:{\n width: 44,\n height: 24,\n borderRadius: 12,\n },\n focus: {\n width: 50,\n height: 30,\n borderRadius: 14,\n },\n switch: {\n transition: \"all 150ms ease-in-out\",\n },\n switchChecked: {\n transform: 'translateX(20px)',\n },\n thumb: {\n width: 20,\n height: 20,\n },\n },\n}\n\nconst indeterminateStyles = {\n large: {\n switchChecked: {\n top: 8,\n left: -8,\n },\n track: {\n borderRadius: 12,\n },\n thumb: {\n height: 4,\n width: 16,\n borderRadius: 2,\n },\n },\n medium: {\n switchChecked: {\n top: 6,\n left: -4,\n },\n track: {\n borderRadius: 12,\n },\n thumb: {\n height: 2,\n width: 12,\n borderRadius: 2,\n },\n }\n}\n\nexport const CommonToggle = styled(MuiSwitch, {\n shouldForwardProp: (props) => props !== 'toggleSize',\n})<ToggleProps>(({ theme, toggleSize, disabled }) => {\n const checkedColor = theme.palette.token.component.selectcontrol_on;\n const uncheckedColor = theme.palette.token.component.selectcontrol_off;\n const handlerColor = theme.palette.token.component.selectcontrol_handler;\n\n const toggleStyle = toggleStyles[toggleSize];\n const toggleOpacity = disabled ? 0.38 : 1;\n\n return {\n ...toggleStyle.root,\n display: 'flex',\n padding: 0,\n overflow: \"visible\",\n backgroundColor: \"transparent\",\n opacity: toggleOpacity,\n \"& .Mui-focusVisible\": {\n // clear default focus style\n boxShadow: \"none\",\n background: \"transparent\",\n borderColor: \"transparent\",\n outline: \"none\",\n \"& + .MuiSwitch-track::after\": {\n ...toggleStyle.focus,\n content: '\"\"',\n position: \"absolute\",\n border: `1px solid ${checkedColor}`,\n boxSizing: \"border-box\",\n top: -3, // border 1px + offset 2px\n left: -3, // border 1px + offset 2px\n }\n },\n '& .MuiSwitch-track': {\n opacity: 1,\n borderRadius: 12,\n backgroundColor: uncheckedColor,\n },\n '& .MuiSwitch-thumb': {\n ...toggleStyle.thumb,\n boxShadow: \"0px 0px 1px rgba(0, 0, 0, 0.4)\",\n },\n '& .MuiSwitch-switchBase': {\n ...toggleStyle.switch,\n padding: 2,\n opacity: 1,\n '&.Mui-checked': {\n ...toggleStyle.switchChecked,\n color: handlerColor,\n '& + .MuiSwitch-track': {\n opacity: 1,\n backgroundColor: checkedColor,\n },\n },\n },\n '& .Mui-disabled + .MuiSwitch-track': {\n opacity: 1,\n },\n }});\n\nexport const CommonIndeterminateToggle = styled(CommonToggle, {\n shouldForwardProp: (props) => props !== 'toggleSize',\n})(({ toggleSize }) => {\n const indeterminateStyle = indeterminateStyles[toggleSize];\n\n return {\n padding: 0,\n cursor: \"pointer\",\n '& .MuiSwitch-switchBase.Mui-checked': {\n ...indeterminateStyle.switchChecked,\n '& + .MuiSwitch-track': {\n ...indeterminateStyle.track,\n },\n },\n '& .MuiSwitch-thumb': {\n ...indeterminateStyle.thumb,\n boxShadow: \"none\",\n },\n}});\n","import React from 'react'\nimport { CommonToggle, CommonIndeterminateToggle } from './Toggle.styled'\nimport type { ToggleProps } from './Toggle.types'\n\n\nconst Toggle = (props: ToggleProps) => {\n const { size = \"medium\", indeterminate = false, disableRipple, ...switchProps } = props\n\n if (indeterminate) {\n const { checked: _, ...restProps } = switchProps;\n // can't use checked props with indeterminate\n return <CommonIndeterminateToggle toggleSize={size} checked focusRipple={false} disableRipple={disableRipple} {...restProps} />\n }\n\n return <CommonToggle toggleSize={size} focusRipple={false} disableRipple={disableRipple} {...switchProps}/>\n}\n\nexport default Toggle\n"],"names":["module","exports","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","toggleStyles","medium","root","width","height","borderRadius","focus","switch","transition","switchChecked","transform","thumb","large","indeterminateStyles","top","left","track","CommonToggle","styled","shouldForwardProp","props","theme","toggleSize","disabled","checkedColor","palette","token","component","selectcontrol_on","uncheckedColor","selectcontrol_off","handlerColor","selectcontrol_handler","toggleStyle","toggleOpacity","display","padding","overflow","backgroundColor","opacity","boxShadow","background","borderColor","outline","content","position","border","boxSizing","color","CommonIndeterminateToggle","indeterminateStyle","cursor","size","indeterminate","disableRipple","switchProps","restProps","checked","focusRipple"],"sourceRoot":""}
@@ -0,0 +1,3 @@
1
+ import type { ToggleButtonProps } from "./ToggleButton.types";
2
+ declare const ToggleButton: (props: ToggleButtonProps) => JSX.Element;
3
+ export default ToggleButton;
@@ -0,0 +1,39 @@
1
+ /// <reference types="react" />
2
+ import type { ToggleButtonProps } from "../ToggleButton/ToggleButton.types";
3
+ type CustomToggleButtonProps = ToggleButtonProps & {
4
+ hasIconOnly: boolean;
5
+ };
6
+ export declare const CustomToggleButton: import("@emotion/styled").StyledComponent<{
7
+ children?: import("react").ReactNode;
8
+ classes?: Partial<import("@mui/material").ToggleButtonClasses> | undefined;
9
+ color?: "primary" | "secondary" | "error" | "warning" | "success" | "info" | "standard" | undefined;
10
+ disabled?: boolean | undefined;
11
+ disableFocusRipple?: boolean | undefined;
12
+ fullWidth?: boolean | undefined;
13
+ onChange?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>, value: any) => void) | undefined;
14
+ onClick?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>, value: any) => void) | undefined;
15
+ selected?: boolean | undefined;
16
+ size?: "small" | "medium" | "large" | undefined;
17
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
18
+ value: {};
19
+ } & Omit<{
20
+ action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
21
+ centerRipple?: boolean | undefined;
22
+ children?: import("react").ReactNode;
23
+ classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
24
+ disabled?: boolean | undefined;
25
+ disableRipple?: boolean | undefined;
26
+ disableTouchRipple?: boolean | undefined;
27
+ focusRipple?: boolean | undefined;
28
+ focusVisibleClassName?: string | undefined;
29
+ LinkComponent?: import("react").ElementType<any> | undefined;
30
+ onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
31
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
32
+ tabIndex?: number | undefined;
33
+ TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
34
+ touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
35
+ }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
36
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
37
+ }, "color" | "children" | "sx" | "tabIndex" | "onChange" | "onClick" | "disabled" | "value" | "action" | "size" | "selected" | keyof import("@mui/material/OverridableComponent").CommonProps | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "fullWidth"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & CustomToggleButtonProps, {}, {}>;
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
+ export {};
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ import type { ToggleButtonProps as MuiToggleButtonProps } from "@mui/material";
3
+ interface ToggleButtonBaseProps extends MuiToggleButtonProps {
4
+ selectedColor?: "primary" | "secondary";
5
+ icon?: React.ReactNode;
6
+ }
7
+ interface ContainedToggleButtonProps extends Omit<ToggleButtonBaseProps, "variant"> {
8
+ kind?: "contained";
9
+ color?: "primary" | "secondary";
10
+ }
11
+ interface GhostToggleButtonProps extends Omit<ToggleButtonBaseProps, "variant"> {
12
+ kind?: "ghost";
13
+ color?: "primary" | "secondary";
14
+ }
15
+ interface OutlinedToggleButtonProps extends Omit<ToggleButtonBaseProps, "variant"> {
16
+ kind?: "outlined";
17
+ color?: "primary";
18
+ }
19
+ export type ToggleButtonProps = ContainedToggleButtonProps | GhostToggleButtonProps | OutlinedToggleButtonProps;
20
+ export {};
@@ -0,0 +1 @@
1
+ export { default } from "./ToggleButton";
@@ -0,0 +1,2 @@
1
+ (()=>{"use strict";var e={493:(e,o,n)=>{n.d(o,{zH:()=>s,oQ:()=>p,Ft:()=>l,Tq:()=>d});var t=n(442),r=n(692),c=function(e){var o=e.kind,n=e.size,t=e.selected,r=void 0!==t&&t;return"small"===n?"outlined"!==o||r?"4px 8px":"".concat(3,"px ").concat(7,"px"):"medium"===n?"outlined"!==o||r?"8px 12px":"".concat(7,"px ").concat(11,"px"):"outlined"!==o||r?"10px 12px":"".concat(9,"px ").concat(11,"px")},i=function(e){var o=e.kind,n=e.size,t=e.selected,r=void 0!==t&&t;return"small"===n?"outlined"!==o||r?"4px":"".concat(3,"px"):"medium"===n?"outlined"!==o||r?"8px":"".concat(7,"px"):"outlined"!==o||r?"12px":"".concat(11,"px")},a=function(){return a=Object.assign||function(e){for(var o,n=1,t=arguments.length;n<t;n++)for(var r in o=arguments[n])Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r]);return e},a.apply(this,arguments)},d=function(e){var o=e.size,n=e.kind,t=e.hasIconOnly,r=e.typography,d=e.selected,l=void 0!==d&&d;return a(a(a({},"small"===o&&a(a({},r.button2),{padding:"".concat(t?i({kind:n,size:o,selected:l}):c({kind:n,size:o,selected:l})),minWidth:"28px",minHeight:"28px"})),"medium"===o&&a(a({},r.button2),{padding:"".concat(t?i({kind:n,size:o,selected:l}):c({kind:n,size:o,selected:l})),minWidth:"36px",minHeight:"36px"})),"large"===o&&a(a({},r.button1),{padding:"".concat(t?i({kind:n,size:o,selected:l}):c({kind:n,size:o,selected:l})),minWidth:"44px",minHeight:"44px"}))},l=function(e){var o=e.kind,n=e.color,t=e.token;return a(a(a(a(a(a(a({},"contained"===o&&"primary"===n&&{color:t.component.btn_contained_primary_text,backgroundColor:t.component.btn_contained_primary_bg,"&:hover":{backgroundColor:t.component.btn_contained_primary_bg},"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_contained_primary_text}}),"contained"===o&&"secondary"===n&&{color:t.component.btn_contained_secondary_text,backgroundColor:t.component.btn_contained_secondary_bg,"&:hover":{backgroundColor:t.component.btn_contained_secondary_bg},"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_contained_secondary_text}}),"contained"===o&&"error"===n&&{color:t.component.btn_contained_error_text,backgroundColor:t.component.btn_contained_error_bg,"&:hover":{backgroundColor:t.component.btn_contained_error_bg},"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_contained_error_text}}),"ghost"===o&&"primary"===n&&{color:t.component.btn_ghost_primary_text,border:"none","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.06)"},"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_ghost_primary_text}}),"ghost"===o&&"secondary"===n&&{color:t.component.btn_ghost_secondary_text,border:"none","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.06)"},"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_ghost_secondary_text}}),"ghost"===o&&"error"===n&&{color:t.component.btn_ghost_error_text,"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.06)"},"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_ghost_error_text}}),"outlined"===o&&"primary"===n&&{color:t.component.btn_outlined_primary_text,border:"".concat(1,"px solid ").concat(t.component.btn_outlined_primary_border),"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.06)"},"&.Mui-disabled":{opacity:.38,color:t.component.btn_outlined_primary_text}})},s=function(e){var o=e.token;return{fontWeight:"500",borderRadius:"8px",textTransform:"initial","&.Mui-focusVisible":{"&::after":{position:"absolute",width:"calc(100% + ".concat(6,"px)"),height:"calc(100% + ".concat(6,"px)"),content:'""',borderRadius:"11px",border:"1px solid ".concat(o.core.focused),boxSizing:"border-box"}}}},p=function(e){var o=e.size,n=e.hasIconOnly;return{"& .MuiButton-startIcon":{width:"20px",height:"20px",margin:0,marginRight:n?"0px":"large"===o?"8px":"4px","*:nth-of-type(1)":{fontSize:"20px"}},svg:{width:"20px",height:"20px",margin:0,marginRight:n?"0px":"large"===o?"8px":"4px"}}};(0,t.styled)(r.Button,{shouldForwardProp:function(e){return!["kind","hasIconOnly"].includes(e)}})((function(e){var o=e.theme,n=o.typography,t=o.palette.token,r=e.kind,c=e.size,i=e.color,u=e.hasIconOnly;return a(a(a(a({},s({token:t})),p({size:c,hasIconOnly:u})),d({size:c,kind:r,hasIconOnly:u,typography:n})),l({kind:r,color:i,token:t}))}))},692:e=>{e.exports=require("@mui/material")},442:e=>{e.exports=require("@mui/material/styles")},997:e=>{e.exports=require("react/jsx-runtime")}},o={};function n(t){var r=o[t];if(void 0!==r)return r.exports;var c=o[t]={exports:{}};return e[t](c,c.exports,n),c.exports}n.d=(e,o)=>{for(var t in o)n.o(o,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},n.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};(()=>{n.r(t),n.d(t,{default:()=>s});var e=n(997),o=n(442),r=n(692),c=n(493),i=function(){return i=Object.assign||function(e){for(var o,n=1,t=arguments.length;n<t;n++)for(var r in o=arguments[n])Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r]);return e},i.apply(this,arguments)},a=(0,o.styled)(r.ToggleButton,{shouldForwardProp:function(e){return!["icon","kind","selectedColor","hasIconOnly"].includes(e)}})((function(e){var o=e.theme,n=o.typography,t=o.palette.token,r=e.kind,a=e.size,d=e.color,l=e.selectedColor,s=e.hasIconOnly,p=e.selected;return i(i(i(i(i(i({border:"none"},(0,c.zH)({token:t})),(0,c.oQ)({size:a,hasIconOnly:s})),(0,c.Tq)({size:a,kind:r,hasIconOnly:s,selected:p,typography:n})),(0,c.Ft)({kind:r,color:d,token:t})),"primary"===l&&{"&.Mui-selected, &.Mui-selected:hover":{border:"none",backgroundColor:t.component.btn_selected_primary_bg,color:t.component.btn_selected_primary_text}}),"secondary"===l&&{"&.Mui-selected, &.Mui-selected:hover":{border:"none",backgroundColor:t.component.btn_selected_secondary_bg,color:t.component.btn_selected_secondary_text}})})),d=(0,o.styled)("div")({display:"flex",alignItems:"center"}),l=function(){return l=Object.assign||function(e){for(var o,n=1,t=arguments.length;n<t;n++)for(var r in o=arguments[n])Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r]);return e},l.apply(this,arguments)};const s=function(o){var n=o.kind,t=void 0===n?"contained":n,r=o.size,c=void 0===r?"small":r,i=o.color,s=void 0===i?"primary":i,p=o.selectedColor,u=void 0===p?"primary":p,b=o.className,y=void 0===b?"":b,g=o.icon,m=o.selected,h=o.children,x=function(e,o){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(t=Object.getOwnPropertySymbols(e);r<t.length;r++)o.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(e,t[r])&&(n[t[r]]=e[t[r]])}return n}(o,["kind","size","color","selectedColor","className","icon","selected","children"]),_=Boolean(g&&!h),f=y.replace("MuiToggleButtonGroup-grouped","").replace("MuiToggleButtonGroup-groupedHorizontal","");return(0,e.jsx)(e.Fragment,{children:"contained"===t||"ghost"===t?(0,e.jsx)(a,l({className:"".concat(t," ").concat(f),selected:m,kind:t,color:s,size:c,hasIconOnly:_,selectedColor:u,disableRipple:!0,disableFocusRipple:!0},x,{children:_?g:(0,e.jsx)(e.Fragment,{children:g?(0,e.jsxs)(d,{children:[g,h]}):h})})):(0,e.jsx)(a,l({className:"outlined ".concat(f),selected:m,kind:"outlined",color:"primary",size:c,hasIconOnly:_,selectedColor:u,disableRipple:!0,disableFocusRipple:!0},x,{children:_?g:(0,e.jsx)(e.Fragment,{children:g?(0,e.jsxs)(d,{children:[g,h]}):h})}))})}})(),exports.default=t.default,Object.defineProperty(exports,"__esModule",{value:!0})})();
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components/ToggleButton/index.js","mappings":"2GAaaA,EAAgC,SAAC,G,IAC5CC,EAAI,OACJC,EAAI,OACJ,IAAAC,SAAAA,OAAQ,IAAG,GAAK,EAEhB,MAAa,UAATD,EACc,aAATD,GAAwBE,EAE3B,UADA,UAAG,EAAyB,cAAM,EAAyB,MAIpD,WAATD,EACc,aAATD,GAAwBE,EAE3B,WADA,UAAG,EAAyB,cAAM,GAA0B,MAKlD,aAATF,GAAwBE,EAE3B,YADA,UAAG,EAA0B,cAAM,GAA0B,KAEnE,EClBaC,EAAoC,SAAC,G,IAChDH,EAAI,OACJC,EAAI,OACJ,IAAAC,SAAAA,OAAQ,IAAG,GAAK,EAEhB,MAAa,UAATD,EACc,aAATD,GAAwBE,EAE3B,MADA,UAAG,EAAyB,MAIrB,WAATD,EACc,aAATD,GAAwBE,EAE3B,MADA,UAAG,EAAyB,MAKlB,aAATF,GAAwBE,EAE3B,OADA,UAAG,GAA0B,KAEnC,E,gNCbaE,EAAY,SAAC,G,IACxBH,EAAI,OACJD,EAAI,OACJK,EAAW,cACXC,EAAU,aACV,IAAAJ,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nF,EAGEmF,EAAK,SAFPG,EAEEH,EAAK,SADJI,E,yUAAW,CACZJ,EAVE,kFAYAhF,EAAcqF,QAAQH,IAASC,GAC/BG,EAA0BL,EAC7BM,QAAQ,+BAAgC,IACxCA,QAAQ,yCAA0C,IAErD,OACE,8BACY,cAAT5F,GAAiC,UAATA,GACvB,SAAC4E,EAAkB,GACjBU,UAAW,UAAGtF,EAAI,YAAI2F,GACtBzF,SAAUA,EACVF,KAAMA,EACNa,MAAOA,EACPZ,KAAMA,EACNI,YAAaA,EACbwE,cAAeA,EACfgB,eAAa,EACbC,oBAAkB,GACdL,EAAW,UAEbpF,EAWE,GAVF,8BACGkF,GACC,UAACL,EAAsB,WACpBK,EACAC,KAED,QASV,SAACZ,EAAkB,GACjBU,UAAW,mBAAYK,GACvBzF,SAAUA,EACVF,KAAK,WACLa,MAAM,UACNZ,KAAMA,EACNI,YAAaA,EACbwE,cAAeA,EACfgB,eAAa,EACbC,oBAAkB,GACdL,EAAW,UAEbpF,EAWE,GAVF,8BACGkF,GACC,UAACL,EAAsB,WACpBK,EACAC,KAED,QAWlB,C","sources":["webpack://@lunit/design-system/./src/components/Button/utils/getButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getIconButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/Button.styled.ts","webpack://@lunit/design-system/./src/components/Button/const.ts","webpack://@lunit/design-system/external commonjs \"@mui/material\"","webpack://@lunit/design-system/external commonjs \"@mui/material/styles\"","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/./src/components/ToggleButton/ToggleButton.styled.ts","webpack://@lunit/design-system/./src/components/ToggleButton/ToggleButton.tsx"],"sourcesContent":["import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetButtonPaddingBySizeAndKindParams = Pick<ButtonProps, \"kind\" | \"size\"> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetButtonPaddingBySizeAndKindParams) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px ${8 - OUTLINED_BORDER_WIDTH}px`\n : \"4px 8px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"8px 12px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${10 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"10px 12px\";\n};\n","import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetIconButtonPaddingBySizeAndKindProps = Pick<\n ButtonProps,\n \"kind\" | \"size\"\n> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getIconButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetIconButtonPaddingBySizeAndKindProps) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px`\n : \"4px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px`\n : \"8px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${12 - OUTLINED_BORDER_WIDTH}px`\n : \"12px\";\n};\n","import { styled } from \"@mui/material/styles\";\nimport { Button as MuiButton } from \"@mui/material\";\n\nimport { ColorToken } from \"@/foundation/colors/types\";\nimport { PADDING_OF_FOCUS, OUTLINED_BORDER_WIDTH } from \"./const\";\nimport { getButtonPaddingBySizeAndKind } from \"./utils/getButtonPaddingBySizeAndKind\";\nimport { getIconButtonPaddingBySizeAndKind } from \"./utils/getIconButtonPaddingBySizeAndKind\";\n\nimport type { ButtonProps } from \"./Button.types\";\nimport type { ToggleButtonProps } from \"../ToggleButton/ToggleButton.types\";\nimport type { Typography } from \"@mui/material/styles/createTypography\";\n\ntype KindStyleParams = Pick<ButtonProps, \"kind\" | \"color\"> & {\n token: ColorToken;\n};\n\ntype CustomButtonProps = ButtonProps & { hasIconOnly: boolean };\n\ntype sizeStyleParams = Pick<\n CustomButtonProps,\n \"size\" | \"hasIconOnly\" | \"kind\"\n> &\n Pick<ToggleButtonProps, \"selected\"> & { typography: Typography };\n\nexport const sizeStyle = ({\n size,\n kind,\n hasIconOnly,\n typography,\n selected = false,\n}: sizeStyleParams) => ({\n ...(size === \"small\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"28px\",\n minHeight: \"28px\",\n }),\n ...(size === \"medium\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"36px\",\n minHeight: \"36px\",\n }),\n ...(size === \"large\" && {\n ...typography.button1,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"44px\",\n minHeight: \"44px\",\n }),\n});\n\nexport const kindStyle = ({ kind, color, token }: KindStyleParams) => ({\n // kind: container\n ...(kind === \"contained\" &&\n color === \"primary\" && {\n color: token.component.btn_contained_primary_text,\n backgroundColor: token.component.btn_contained_primary_bg,\n \"&:hover\": {\n backgroundColor: token.component.btn_contained_primary_bg,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_contained_primary_text,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"secondary\" && {\n color: token.component.btn_contained_secondary_text,\n backgroundColor: token.component.btn_contained_secondary_bg,\n \"&:hover\": {\n backgroundColor: token.component.btn_contained_secondary_bg,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_contained_secondary_text,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"error\" && {\n color: token.component.btn_contained_error_text,\n backgroundColor: token.component.btn_contained_error_bg,\n \"&:hover\": {\n backgroundColor: token.component.btn_contained_error_bg,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_contained_error_text,\n },\n }),\n // kind: ghost\n ...(kind === \"ghost\" &&\n color === \"primary\" && {\n color: token.component.btn_ghost_primary_text,\n border: \"none\",\n \"&:hover\": {\n backgroundColor: \"rgba(0, 0, 0, 0.06)\",\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_ghost_primary_text,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"secondary\" && {\n color: token.component.btn_ghost_secondary_text,\n border: \"none\",\n \"&:hover\": {\n backgroundColor: \"rgba(0, 0, 0, 0.06)\",\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_ghost_secondary_text,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"error\" && {\n color: token.component.btn_ghost_error_text,\n \"&:hover\": {\n backgroundColor: \"rgba(0, 0, 0, 0.06)\",\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_ghost_error_text,\n },\n }),\n // kind: outlined\n ...(kind === \"outlined\" &&\n color === \"primary\" && {\n color: token.component.btn_outlined_primary_text,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${token.component.btn_outlined_primary_border}`,\n \"&:hover\": {\n backgroundColor: \"rgba(0, 0, 0, 0.06)\", // TODO: color util function 추가 후 변경\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: token.component.btn_outlined_primary_text,\n },\n }),\n});\n\nexport const commonStyle = ({ token }: { token: ColorToken }) =>\n ({\n fontWeight: \"500\",\n borderRadius: \"8px\",\n textTransform: \"initial\",\n \"&.Mui-focusVisible\": {\n \"&::after\": {\n position: \"absolute\",\n width: `calc(100% + ${PADDING_OF_FOCUS}px)`,\n height: `calc(100% + ${PADDING_OF_FOCUS}px)`,\n content: '\"\"',\n borderRadius: \"11px\",\n border: `1px solid ${token.core.focused}`,\n boxSizing: \"border-box\",\n },\n },\n } as const);\n\nexport const iconStyle = ({\n size,\n hasIconOnly,\n}: Pick<CustomButtonProps, \"size\" | \"hasIconOnly\">) => ({\n \"& .MuiButton-startIcon\": {\n width: \"20px\",\n height: \"20px\",\n margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n\n // This style was added for Mui Button Svg Icon handling\n \"*:nth-of-type(1)\": {\n fontSize: \"20px\",\n },\n },\n svg: {\n width: \"20px\",\n height: \"20px\",\n margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n },\n});\n\nexport const CustomButton = styled(MuiButton, {\n shouldForwardProp: (prop: string) => {\n return ![\"kind\", \"hasIconOnly\"].includes(prop);\n },\n})<CustomButtonProps>(\n ({\n theme: {\n typography,\n palette: { token },\n },\n kind,\n size,\n color,\n hasIconOnly,\n }) => ({\n ...commonStyle({ token }),\n ...iconStyle({ size, hasIconOnly }),\n ...sizeStyle({ size, kind, hasIconOnly, typography }),\n ...kindStyle({ kind, color, token }),\n })\n);\n","export const PADDING_OF_FOCUS = 6; // TODO: focus 시 padding 고정값, size 별 차이 여부 확인 필요\nexport const OUTLINED_BORDER_WIDTH = 1;\n","module.exports = require(\"@mui/material\");","module.exports = require(\"@mui/material/styles\");","module.exports = require(\"react/jsx-runtime\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { styled } from \"@mui/material/styles\";\nimport { ToggleButton as MuiToggleButton } from \"@mui/material\";\n\nimport type { ToggleButtonProps } from \"../ToggleButton/ToggleButton.types\";\nimport {\n commonStyle,\n sizeStyle,\n kindStyle,\n iconStyle,\n} from \"../Button/Button.styled\";\n\ntype CustomToggleButtonProps = ToggleButtonProps & { hasIconOnly: boolean };\n\nexport const CustomToggleButton = styled(MuiToggleButton, {\n shouldForwardProp: (prop: string) => {\n return ![\"icon\", \"kind\", \"selectedColor\", \"hasIconOnly\"].includes(prop);\n },\n})<CustomToggleButtonProps>(\n ({\n theme: {\n typography,\n palette: { token },\n },\n kind,\n size,\n color,\n selectedColor,\n hasIconOnly,\n selected,\n }) => {\n return {\n border: \"none\",\n ...commonStyle({ token }),\n ...iconStyle({ size, hasIconOnly }),\n ...sizeStyle({ size, kind, hasIconOnly, selected, typography }),\n ...kindStyle({ kind, color, token }),\n ...(selectedColor === \"primary\" && {\n \"&.Mui-selected, &.Mui-selected:hover\": {\n border: \"none\",\n backgroundColor: token.component.btn_selected_primary_bg,\n color: token.component.btn_selected_primary_text,\n },\n }),\n ...(selectedColor === \"secondary\" && {\n \"&.Mui-selected, &.Mui-selected:hover\": {\n border: \"none\",\n backgroundColor: token.component.btn_selected_secondary_bg,\n color: token.component.btn_selected_secondary_text,\n },\n }),\n };\n }\n);\n\nexport const IconAndChildrenWrapper = styled(\"div\")({\n display: \"flex\",\n alignItems: \"center\",\n});\n","import React from \"react\";\nimport {\n CustomToggleButton,\n IconAndChildrenWrapper,\n} from \"./ToggleButton.styled\";\nimport type { ToggleButtonProps } from \"./ToggleButton.types\";\n\nconst ToggleButton = (props: ToggleButtonProps) => {\n const {\n kind = \"contained\",\n size = \"small\",\n color = \"primary\",\n selectedColor = \"primary\",\n className = \"\",\n icon,\n selected,\n children,\n ...buttonProps\n } = props;\n\n const hasIconOnly = Boolean(icon && !children);\n const excludeToggleGroupClass = className\n .replace(\"MuiToggleButtonGroup-grouped\", \"\")\n .replace(\"MuiToggleButtonGroup-groupedHorizontal\", \"\");\n\n return (\n <>\n {kind === \"contained\" || kind === \"ghost\" ? (\n <CustomToggleButton\n className={`${kind} ${excludeToggleGroupClass}`}\n selected={selected}\n kind={kind}\n color={color}\n size={size}\n hasIconOnly={hasIconOnly}\n selectedColor={selectedColor}\n disableRipple\n disableFocusRipple\n {...buttonProps}\n >\n {!hasIconOnly ? (\n <>\n {icon ? (\n <IconAndChildrenWrapper>\n {icon}\n {children}\n </IconAndChildrenWrapper>\n ) : (\n children\n )}\n </>\n ) : (\n icon\n )}\n </CustomToggleButton>\n ) : (\n <CustomToggleButton\n className={`outlined ${excludeToggleGroupClass}`}\n selected={selected}\n kind=\"outlined\"\n color=\"primary\"\n size={size}\n hasIconOnly={hasIconOnly}\n selectedColor={selectedColor}\n disableRipple\n disableFocusRipple\n {...buttonProps}\n >\n {!hasIconOnly ? (\n <>\n {icon ? (\n <IconAndChildrenWrapper>\n {icon}\n {children}\n </IconAndChildrenWrapper>\n ) : (\n children\n )}\n </>\n ) : (\n icon\n )}\n </CustomToggleButton>\n )}\n </>\n );\n};\n\nexport default ToggleButton;\n"],"names":["getButtonPaddingBySizeAndKind","kind","size","selected","getIconButtonPaddingBySizeAndKind","sizeStyle","hasIconOnly","typography","button2","padding","minWidth","minHeight","button1","kindStyle","color","token","component","btn_contained_primary_text","backgroundColor","btn_contained_primary_bg","opacity","border","btn_contained_secondary_text","btn_contained_secondary_bg","btn_contained_error_text","btn_contained_error_bg","btn_ghost_primary_text","btn_ghost_secondary_text","btn_ghost_error_text","btn_outlined_primary_text","btn_outlined_primary_border","commonStyle","fontWeight","borderRadius","textTransform","position","width","height","content","core","focused","boxSizing","iconStyle","margin","marginRight","fontSize","svg","styled","shouldForwardProp","prop","includes","theme","module","exports","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","CustomToggleButton","selectedColor","btn_selected_primary_bg","btn_selected_primary_text","btn_selected_secondary_bg","btn_selected_secondary_text","IconAndChildrenWrapper","display","alignItems","props","className","icon","children","buttonProps","Boolean","excludeToggleGroupClass","replace","disableRipple","disableFocusRipple"],"sourceRoot":""}
@@ -0,0 +1,3 @@
1
+ import { ToggleButtonGroupProps } from "@mui/material/ToggleButtonGroup";
2
+ declare const ToggleButtonGroup: ({ size, ...props }: ToggleButtonGroupProps) => JSX.Element;
3
+ export default ToggleButtonGroup;
@@ -0,0 +1 @@
1
+ export { default } from "./ToggleButtonGroup";
@@ -0,0 +1,2 @@
1
+ declare const Tooltip: () => JSX.Element;
2
+ export default Tooltip;
@@ -0,0 +1 @@
1
+ export { default } from "./Tooltip";
@@ -0,0 +1,2 @@
1
+ (()=>{"use strict";var e={692:e=>{e.exports=require("@mui/material")},997:e=>{e.exports=require("react/jsx-runtime")}},r={};function t(o){var n=r[o];if(void 0!==n)return n.exports;var u=r[o]={exports:{}};return e[o](u,u.exports,t),u.exports}t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{t.r(o),t.d(o,{default:()=>n});var e=t(997),r=t(692);const n=function(){return(0,e.jsx)(r.Box,{children:"Tooltip"})}})(),exports.default=o.default,Object.defineProperty(exports,"__esModule",{value:!0})})();
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components/Tooltip/index.js","mappings":"kCAAAA,EAAOC,QAAUC,QAAQ,gB,UCAzBF,EAAOC,QAAUC,QAAQ,oB,GCCrBC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaL,QAGrB,IAAID,EAASG,EAAyBE,GAAY,CAGjDJ,QAAS,CAAC,GAOX,OAHAO,EAAoBH,GAAUL,EAAQA,EAAOC,QAASG,GAG/CJ,EAAOC,OACf,CCrBAG,EAAoBK,EAAI,CAACR,EAASS,KACjC,IAAI,IAAIC,KAAOD,EACXN,EAAoBQ,EAAEF,EAAYC,KAASP,EAAoBQ,EAAEX,EAASU,IAC5EE,OAAOC,eAAeb,EAASU,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDP,EAAoBQ,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFd,EAAoBkB,EAAKrB,IACH,oBAAXsB,QAA0BA,OAAOC,aAC1CX,OAAOC,eAAeb,EAASsB,OAAOC,YAAa,CAAEC,MAAO,WAE7DZ,OAAOC,eAAeb,EAAS,aAAc,CAAEwB,OAAO,GAAO,E,mECG9D,QAJgB,WACd,OAAO,SAAC,EAAAC,IAAG,qBACb,C","sources":["webpack://@lunit/design-system/external commonjs \"@mui/material\"","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/./src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["module.exports = require(\"@mui/material\");","module.exports = require(\"react/jsx-runtime\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import React from \"react\";\n\nimport { Box } from \"@mui/material\";\n\nconst Tooltip = () => {\n return <Box>Tooltip</Box>;\n};\n\nexport default Tooltip;\n"],"names":["module","exports","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","Box"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ import { Components, Theme } from "@mui/material";
2
+ export declare const componentsCssBaseline: Components<Theme>["MuiCssBaseline"];
@@ -0,0 +1,65 @@
1
+ export declare const shadows: {
2
+ shadow1: string;
3
+ shadow2: string;
4
+ shadow3: string;
5
+ shadow4: string;
6
+ };
7
+ export declare const elevations: {
8
+ elevation_00: string;
9
+ elevation_01: string;
10
+ elevation_02: string;
11
+ };
12
+ export declare const elevationOptions: {
13
+ elevation_00: string;
14
+ elevation_01: string;
15
+ elevation_02: string;
16
+ shadow1: string;
17
+ shadow2: string;
18
+ shadow3: string;
19
+ shadow4: string;
20
+ };
21
+ export declare const createElevationCssBaseline: () => {
22
+ ".light1, .light2, .dark1, .dark2, .dark3, .dark4": {
23
+ "--elevation-shadow": string;
24
+ elevation_00: string;
25
+ elevation_01: string;
26
+ elevation_02: string;
27
+ shadow1: string;
28
+ shadow2: string;
29
+ shadow3: string;
30
+ shadow4: string;
31
+ };
32
+ ".MuiPaper-root": {
33
+ "--elevation-shadow": string;
34
+ };
35
+ ".MuiDialog-paper": {
36
+ "--elevation-shadow": string;
37
+ };
38
+ ".MuiPopover-paper": {
39
+ "--elevation-shadow": string;
40
+ };
41
+ ".MuiMenu-paper": {
42
+ "--elevation-shadow": string;
43
+ };
44
+ ".MuiTooltip-tooltip": {
45
+ "--elevation-shadow": string;
46
+ };
47
+ ".MuiAlert-root": {
48
+ "--elevation-shadow": string;
49
+ };
50
+ ".elevation0, .elevation1, .elevation2": {
51
+ boxShadow: string;
52
+ };
53
+ ".elevation3, .elevation4, .elevation5, .elevation6, .elevation7, .elevation8, .elevation9, .elevation10, .elevation11, .elevation12, .elevation13, .elevation14, .elevation15, .elevation16, .elevation17, .elevation18, .elevation19, .elevation20, .elevation21, .elevation22, .elevation23, .elevation24": {
54
+ boxShadow: string;
55
+ };
56
+ ".elevation0": {
57
+ "--elevation-shadow": string;
58
+ };
59
+ ".elevation1": {
60
+ "--elevation-shadow": string;
61
+ };
62
+ ".elevation2": {
63
+ "--elevation-shadow": string;
64
+ };
65
+ };
@@ -0,0 +1,2 @@
1
+ export declare const createCSSVars: <T extends Record<string, string>>(tokens: T) => Record<keyof T, string>;
2
+ export declare const createCSSVarNames: <T extends Record<string, string>>(tokens: T) => Record<keyof T, string>;
@@ -0,0 +1,93 @@
1
+ /// <reference types="react" />
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";
4
+ type DSVariantsType = Record<DSVariants, React.CSSProperties>;
5
+ declare module "@mui/material/styles" {
6
+ interface TypographyVariants extends DSVariantsType {
7
+ }
8
+ interface TypographyVariantsOptions extends Partial<DSVariantsType> {
9
+ }
10
+ }
11
+ type TypographyPropsVariantOverridesType = Record<DSVariants, true>;
12
+ declare module "@mui/material/Typography" {
13
+ interface TypographyPropsVariantOverrides extends TypographyPropsVariantOverridesType {
14
+ }
15
+ }
16
+ declare const typographyOptions: TypographyOptions;
17
+ export declare const typographyDefaultProps: {
18
+ variantMapping: {
19
+ headline1: string;
20
+ headline2: string;
21
+ headline3: string;
22
+ headline4: string;
23
+ headline5: string;
24
+ body1_16_semibold: string;
25
+ body1_16_regular: string;
26
+ body2_14_bold: string;
27
+ body2_14_medium: string;
28
+ body2_14_regular: string;
29
+ body3_12_semibold: string;
30
+ body3_12_regular: string;
31
+ };
32
+ };
33
+ export declare const createTypographyCssBaseline: () => {
34
+ html: {
35
+ fontFamily: string;
36
+ fontFeatureSettings: string;
37
+ };
38
+ ":root": {
39
+ "--overline-font-weight": "var(--font-weight-medium)";
40
+ "--overline-font-size": "14px";
41
+ "--overline-line-height": "20px";
42
+ "--button1-font-weight": "var(--font-weight-medium)";
43
+ "--button1-font-size": "16px";
44
+ "--button1-line-height": "22px";
45
+ "--button2-font-weight": "var(--font-weight-medium)";
46
+ "--button2-font-size": "14px";
47
+ "--button2-line-height": "20px";
48
+ "--caption-font-weight": "var(--font-weight-medium)";
49
+ "--caption-font-size": "12px";
50
+ "--caption-line-height": "16px";
51
+ "--body1-16-semibold-font-weight": "var(--font-weight-semibold)";
52
+ "--body1-16-semibold-font-size": "16px";
53
+ "--body1-16-semibold-line-height": "24px";
54
+ "--body1-16-regular-font-weight": "var(--font-weight-regular)";
55
+ "--body1-16-regular-font-size": "16px";
56
+ "--body1-16-regular-line-height": "24px";
57
+ "--body2-14-bold-font-weight": "var(--font-weight-bold)";
58
+ "--body2-14-bold-font-size": "14px";
59
+ "--body2-14-bold-line-height": "20px";
60
+ "--body2-14-medium-font-weight": "var(--font-weight-medium)";
61
+ "--body2-14-medium-font-size": "14px";
62
+ "--body2-14-medium-line-height": "20px";
63
+ "--body2-14-regular-font-weight": "var(--font-weight-regular)";
64
+ "--body2-14-regular-font-size": "14px";
65
+ "--body2-14-regular-line-height": "20px";
66
+ "--body3-12-semibold-font-weight": "var(--font-weight-semibold)";
67
+ "--body3-12-semibold-font-size": "12.4px";
68
+ "--body3-12-semibold-line-height": "16px";
69
+ "--body3-12-regular-font-weight": "var(--font-weight-regular)";
70
+ "--body3-12-regular-font-size": "12.4px";
71
+ "--body3-12-regular-line-height": "16px";
72
+ "--headline1-font-weight": "var(--font-weight-semibold)";
73
+ "--headline1-font-size": "52px";
74
+ "--headline1-line-height": "68px";
75
+ "--headline2-font-weight": "var(--font-weight-bold)";
76
+ "--headline2-font-size": "38px";
77
+ "--headline2-line-height": "48px";
78
+ "--headline3-font-weight": "var(--font-weight-semibold)";
79
+ "--headline3-font-size": "24px";
80
+ "--headline3-line-height": "36px";
81
+ "--headline4-font-weight": "var(--font-weight-semibold)";
82
+ "--headline4-font-size": "20px";
83
+ "--headline4-line-height": "28px";
84
+ "--headline5-font-weight": "var(--font-weight-semibold)";
85
+ "--headline5-font-size": "16px";
86
+ "--headline5-line-height": "24px";
87
+ "--font-weight-bold": 700;
88
+ "--font-weight-semibold": 600;
89
+ "--font-weight-medium": 500;
90
+ "--font-weight-regular": 400;
91
+ };
92
+ };
93
+ export default typographyOptions;
@@ -0,0 +1,57 @@
1
+ import type { TypographyStyleOptions } from "@mui/material/styles/createTypography";
2
+ declare const fontVariants: Record<string, TypographyStyleOptions>;
3
+ export declare const cssVariables: {
4
+ "--overline-font-weight": "var(--font-weight-medium)";
5
+ "--overline-font-size": "14px";
6
+ "--overline-line-height": "20px";
7
+ "--button1-font-weight": "var(--font-weight-medium)";
8
+ "--button1-font-size": "16px";
9
+ "--button1-line-height": "22px";
10
+ "--button2-font-weight": "var(--font-weight-medium)";
11
+ "--button2-font-size": "14px";
12
+ "--button2-line-height": "20px";
13
+ "--caption-font-weight": "var(--font-weight-medium)";
14
+ "--caption-font-size": "12px";
15
+ "--caption-line-height": "16px";
16
+ "--body1-16-semibold-font-weight": "var(--font-weight-semibold)";
17
+ "--body1-16-semibold-font-size": "16px";
18
+ "--body1-16-semibold-line-height": "24px";
19
+ "--body1-16-regular-font-weight": "var(--font-weight-regular)";
20
+ "--body1-16-regular-font-size": "16px";
21
+ "--body1-16-regular-line-height": "24px";
22
+ "--body2-14-bold-font-weight": "var(--font-weight-bold)";
23
+ "--body2-14-bold-font-size": "14px";
24
+ "--body2-14-bold-line-height": "20px";
25
+ "--body2-14-medium-font-weight": "var(--font-weight-medium)";
26
+ "--body2-14-medium-font-size": "14px";
27
+ "--body2-14-medium-line-height": "20px";
28
+ "--body2-14-regular-font-weight": "var(--font-weight-regular)";
29
+ "--body2-14-regular-font-size": "14px";
30
+ "--body2-14-regular-line-height": "20px";
31
+ "--body3-12-semibold-font-weight": "var(--font-weight-semibold)";
32
+ "--body3-12-semibold-font-size": "12.4px";
33
+ "--body3-12-semibold-line-height": "16px";
34
+ "--body3-12-regular-font-weight": "var(--font-weight-regular)";
35
+ "--body3-12-regular-font-size": "12.4px";
36
+ "--body3-12-regular-line-height": "16px";
37
+ "--headline1-font-weight": "var(--font-weight-semibold)";
38
+ "--headline1-font-size": "52px";
39
+ "--headline1-line-height": "68px";
40
+ "--headline2-font-weight": "var(--font-weight-bold)";
41
+ "--headline2-font-size": "38px";
42
+ "--headline2-line-height": "48px";
43
+ "--headline3-font-weight": "var(--font-weight-semibold)";
44
+ "--headline3-font-size": "24px";
45
+ "--headline3-line-height": "36px";
46
+ "--headline4-font-weight": "var(--font-weight-semibold)";
47
+ "--headline4-font-size": "20px";
48
+ "--headline4-line-height": "28px";
49
+ "--headline5-font-weight": "var(--font-weight-semibold)";
50
+ "--headline5-font-size": "16px";
51
+ "--headline5-line-height": "24px";
52
+ "--font-weight-bold": 700;
53
+ "--font-weight-semibold": 600;
54
+ "--font-weight-medium": 500;
55
+ "--font-weight-regular": 400;
56
+ };
57
+ export { fontVariants };
@@ -0,0 +1,24 @@
1
+ export declare const blue: {
2
+ 5: string;
3
+ 10: string;
4
+ 20: string;
5
+ 30: string;
6
+ 40: string;
7
+ 50: string;
8
+ 60: string;
9
+ 70: string;
10
+ 80: string;
11
+ 90: string;
12
+ };
13
+ export declare const blueText: {
14
+ 5: string;
15
+ 10: string;
16
+ 20: string;
17
+ 30: string;
18
+ 40: string;
19
+ 50: string;
20
+ 60: string;
21
+ 70: string;
22
+ 80: string;
23
+ 90: string;
24
+ };
@@ -0,0 +1,24 @@
1
+ export declare const green: {
2
+ 5: string;
3
+ 10: string;
4
+ 20: string;
5
+ 30: string;
6
+ 40: string;
7
+ 50: string;
8
+ 60: string;
9
+ 70: string;
10
+ 80: string;
11
+ 90: string;
12
+ };
13
+ export declare const greenText: {
14
+ 5: string;
15
+ 10: string;
16
+ 20: string;
17
+ 30: string;
18
+ 40: string;
19
+ 50: string;
20
+ 60: string;
21
+ 70: string;
22
+ 80: string;
23
+ 90: string;
24
+ };
@@ -0,0 +1,35 @@
1
+ export declare const grey: {
2
+ 0: string;
3
+ 5: string;
4
+ 10: string;
5
+ 15: string;
6
+ 20: string;
7
+ 30: string;
8
+ 40: string;
9
+ 50: string;
10
+ 60: string;
11
+ 70: string;
12
+ 75: string;
13
+ 80: string;
14
+ 85: string;
15
+ 90: string;
16
+ 95: string;
17
+ 100: string;
18
+ };
19
+ export declare const greyText: {
20
+ 0: string;
21
+ 5: string;
22
+ 10: string;
23
+ 15: string;
24
+ 20: string;
25
+ 30: string;
26
+ 40: string;
27
+ 50: string;
28
+ 60: string;
29
+ 70: string;
30
+ 80: string;
31
+ 85: string;
32
+ 90: string;
33
+ 95: string;
34
+ 100: string;
35
+ };
@@ -0,0 +1,11 @@
1
+ export * from "./blue";
2
+ export * from "./green";
3
+ export * from "./grey";
4
+ export * from "./lunitGreen";
5
+ export * from "./lunitTeal";
6
+ export * from "./magenta";
7
+ export * from "./orange";
8
+ export * from "./red";
9
+ export * from "./yellow";
10
+ export * from "./purple";
11
+ export * from "./opacity";
@@ -0,0 +1,24 @@
1
+ export declare const lunitGreen: {
2
+ 5: string;
3
+ 10: string;
4
+ 20: string;
5
+ 30: string;
6
+ 40: string;
7
+ 50: string;
8
+ 60: string;
9
+ 70: string;
10
+ 80: string;
11
+ 90: string;
12
+ };
13
+ export declare const lunitGreenText: {
14
+ 5: string;
15
+ 10: string;
16
+ 20: string;
17
+ 30: string;
18
+ 40: string;
19
+ 50: string;
20
+ 60: string;
21
+ 70: string;
22
+ 80: string;
23
+ 90: string;
24
+ };