@kubed/components 0.0.12 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/cjs/Button/Button.js +1 -1
- package/cjs/Button/Button.js.map +1 -1
- package/cjs/Button/Button.styles.js +2 -2
- package/cjs/Button/Button.styles.js.map +1 -1
- package/cjs/Divider/Divider.js +1 -1
- package/cjs/Divider/Divider.js.map +1 -1
- package/cjs/Divider/Divider.styles.js +5 -5
- package/cjs/Divider/Divider.styles.js.map +1 -1
- package/cjs/Input/Input.styles.js +1 -0
- package/cjs/Input/Input.styles.js.map +1 -1
- package/cjs/Menu/Menu.styles.js +1 -1
- package/cjs/Menu/Menu.styles.js.map +1 -1
- package/cjs/Menu/MenuButton/MenuButton.styles.js +1 -0
- package/cjs/Menu/MenuButton/MenuButton.styles.js.map +1 -1
- package/cjs/Menu/MenuItem/MenuItem.js +1 -1
- package/cjs/Menu/MenuItem/MenuItem.js.map +1 -1
- package/cjs/Modal/Modal.js +1 -1
- package/cjs/Modal/Modal.js.map +1 -1
- package/cjs/Modal/ModalProvider/ModalContext.js +1 -1
- package/cjs/Modal/ModalProvider/ModalContext.js.map +1 -1
- package/cjs/Modal/ModalProvider/ModalProvider.js +1 -1
- package/cjs/Modal/ModalProvider/ModalProvider.js.map +1 -1
- package/cjs/Popover/Popover.js +3 -2
- package/cjs/Popover/Popover.js.map +1 -1
- package/esm/Button/Button.js +1 -1
- package/esm/Button/Button.js.map +1 -1
- package/esm/Button/Button.styles.js +2 -2
- package/esm/Button/Button.styles.js.map +1 -1
- package/esm/Divider/Divider.js +1 -1
- package/esm/Divider/Divider.js.map +1 -1
- package/esm/Divider/Divider.styles.js +8 -8
- package/esm/Divider/Divider.styles.js.map +1 -1
- package/esm/Input/Input.styles.js +6 -5
- package/esm/Input/Input.styles.js.map +1 -1
- package/esm/Menu/Menu.styles.js +3 -3
- package/esm/Menu/Menu.styles.js.map +1 -1
- package/esm/Menu/MenuButton/MenuButton.styles.js +1 -0
- package/esm/Menu/MenuButton/MenuButton.styles.js.map +1 -1
- package/esm/Menu/MenuItem/MenuItem.js +1 -1
- package/esm/Menu/MenuItem/MenuItem.js.map +1 -1
- package/esm/Modal/Modal.js +1 -1
- package/esm/Modal/Modal.js.map +1 -1
- package/esm/Modal/ModalProvider/ModalContext.js +1 -1
- package/esm/Modal/ModalProvider/ModalContext.js.map +1 -1
- package/esm/Modal/ModalProvider/ModalProvider.js +1 -1
- package/esm/Modal/ModalProvider/ModalProvider.js.map +1 -1
- package/esm/Popover/Popover.js +6 -5
- package/esm/Popover/Popover.js.map +1 -1
- package/lib/src/ActionConfirm/ActionConfirm.d.ts +16 -0
- package/lib/src/ActionConfirm/ActionConfirm.d.ts.map +1 -0
- package/lib/src/Button/Button.styles.d.ts +3 -3
- package/lib/src/Button/Button.styles.d.ts.map +1 -1
- package/lib/src/Divider/Divider.d.ts +2 -0
- package/lib/src/Divider/Divider.d.ts.map +1 -1
- package/lib/src/Input/Input.styles.d.ts.map +1 -1
- package/lib/src/Menu/MenuButton/MenuButton.styles.d.ts.map +1 -1
- package/lib/src/Menu/MenuItem/MenuItem.d.ts +1 -5
- package/lib/src/Menu/MenuItem/MenuItem.d.ts.map +1 -1
- package/lib/src/Modal/Modal.d.ts +1 -1
- package/lib/src/Modal/Modal.d.ts.map +1 -1
- package/lib/src/Modal/ModalProvider/ModalContext.d.ts +2 -2
- package/lib/src/Modal/ModalProvider/ModalContext.d.ts.map +1 -1
- package/lib/src/Modal/ModalProvider/ModalProvider.d.ts.map +1 -1
- package/lib/src/Popover/Popover.d.ts +3 -1
- package/lib/src/Popover/Popover.d.ts.map +1 -1
- package/lib/src/Progress/Progress.d.ts +20 -0
- package/lib/src/Progress/Progress.d.ts.map +1 -0
- package/lib/src/Progress/Progress.styles.d.ts +14 -0
- package/lib/src/Progress/Progress.styles.d.ts.map +1 -0
- package/lib/src/Slider/Slider.d.ts.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -84,8 +84,8 @@ import d,{css as t}from"styled-components";import{colorToRgbValues as B}from"../
|
|
|
84
84
|
border-radius: ${({$radius:r,theme:o})=>o.layout.radius[r]};
|
|
85
85
|
display: ${r=>r.block?"block":"inline-block"};
|
|
86
86
|
${({$loading:r,disabled:o})=>k(r,o)};
|
|
87
|
-
${({size:r,block:o})=>w(r,o)};
|
|
88
|
-
${({theme:r,$color:o
|
|
87
|
+
${({$size:r,block:o})=>w(r,o)};
|
|
88
|
+
${({theme:r,$color:o,$variant:n,$shadow:i,disabled:s,$loading:l})=>j(r,o,n,i,s,l)};
|
|
89
89
|
${({$loading:r})=>r?"opacity: 0.6;":null};
|
|
90
90
|
`,L=d("div")`
|
|
91
91
|
display: flex;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.styles.js","sources":["../../src/Button/Button.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { KubedNumberSize, KubedSizes, KubedTheme } from '../theme';\nimport { colorToRgbValues } from '../utils/color';\n\ninterface ButtonStylesProps {\n $loading?: boolean;\n size?: KubedSizes;\n $radius?: KubedNumberSize;\n theme?: KubedTheme;\n block?: boolean;\n disabled?: boolean;\n shadow?: boolean;\n variant?: 'filled' | 'outline' | 'text' | 'link';\n $color?: string | 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error';\n}\n\nconst getButtonCursor = ($loading: boolean, disabled: boolean) => {\n if (disabled) {\n return css`\n cursor: not-allowed;\n pointer-events: auto;\n `;\n }\n if ($loading) {\n return css`\n cursor: default;\n pointer-events: none;\n `;\n }\n return css`\n cursor: pointer;\n pointer-events: auto;\n `;\n};\n\nconst sizes = {\n xs: css`\n font-size: 10px;\n padding: 0 14px;\n `,\n sm: css`\n font-size: 12px;\n padding: 0 20px;\n `,\n md: css`\n font-size: 14px;\n padding: 0 23px;\n `,\n lg: css`\n font-size: 16px;\n padding: 0 26px;\n `,\n xl: css`\n font-size: 18px;\n padding: 0 30px;\n `,\n};\n\nconst getButtonSize = (size, block) => css`\n ${sizes[size]};\n width: ${block ? '100%' : 'auto'};\n height: ${({ theme }) => theme.layout.inputSizes[size]};\n`;\n\nconst getButtonColor = (variant = 'filled', colorSchema, disabled, $loading, theme: KubedTheme) => {\n const { palette } = theme;\n if (disabled) {\n return css`\n background-color: ${palette.accents_1};\n border-color: ${palette.border};\n color: ${palette.accents_7};\n opacity: 0.7;\n `;\n }\n\n const styles = {\n filled: css`\n background-color: ${colorSchema.bg};\n border-color: ${colorSchema.border};\n color: ${colorSchema.color};\n `,\n outline: css`\n background-color: #fff;\n border-color: ${colorSchema.border};\n color: ${colorSchema.fg || colorSchema.bg};\n `,\n link: css`\n font-weight: 400;\n background-color: transparent;\n border-color: transparent;\n color: ${colorSchema.fg || colorSchema.bg};\n padding: 0;\n `,\n text: css`\n background-color: transparent;\n border-color: transparent;\n color: ${colorSchema.fg || colorSchema.bg};\n `,\n };\n\n return styles[variant];\n};\n\nconst getButtonHoverColor = (\n variant = 'filled',\n colorSchema,\n disabled,\n $loading,\n shadow,\n theme: KubedTheme\n) => {\n if (disabled) return null;\n if (shadow) {\n return css`\n box-shadow: none;\n `;\n }\n const { palette } = theme;\n if (variant === 'link') {\n return css`\n text-decoration: underline;\n `;\n }\n if (variant === 'text') {\n return css`\n background-color: ${palette.accents_2};\n `;\n }\n\n const styles = {\n filled: css`\n background-color: ${colorSchema.hoverBg};\n border-color: ${colorSchema.hoverBorder || colorSchema.hoverBg};\n `,\n outline: css`\n background-color: ${colorSchema.hoverBg};\n color: ${colorSchema.color};\n `,\n text: css`\n background-color: transparent;\n border-color: transparent;\n color: ${palette.accents_5};\n `,\n };\n return styles[variant];\n};\n\nconst getShadow = (shadow, colorSchema, theme) => {\n if (shadow) {\n const { expressiveness } = theme;\n const rgb = colorToRgbValues(colorSchema.bg).join(' ');\n return expressiveness.buttonShadow(rgb);\n }\n return null;\n};\n\nconst getButtonStyles = (\n theme: KubedTheme,\n color = 'default',\n variant,\n shadow,\n disabled,\n $loading\n) => {\n const { palette } = theme;\n const { background, border, accents_1, accents_2, accents_7, accents_8, accents_9, primary } =\n palette;\n const colors = {\n default: {\n bg: accents_1,\n border,\n color: accents_7,\n fg: accents_7,\n hoverBg: accents_2,\n hoverBorder: border,\n },\n primary: {\n bg: palette.colors[primary][2],\n border: palette.colors[primary][2],\n color: '#fff',\n hoverBg: palette.colors[primary][3],\n },\n secondary: {\n bg: accents_8,\n border: accents_8,\n color: background,\n hoverBg: accents_9,\n },\n };\n\n let colorSchema;\n if (colors[color]) {\n colorSchema = colors[color];\n } else if (palette[color]) {\n colorSchema = {\n bg: palette[color],\n border: palette[color],\n color: '#fff',\n hoverBg: palette[`${color}Dark`],\n };\n } else if (palette.colors[color]) {\n const currentColor = palette.colors[color];\n colorSchema = {\n bg: currentColor[2],\n border: currentColor[2],\n color: '#fff',\n hoverBg: currentColor[3],\n };\n } else {\n colorSchema = colors.default;\n }\n\n return css`\n box-shadow: ${getShadow(shadow, colorSchema, theme)};\n ${getButtonColor(variant, colorSchema, disabled, $loading, theme)};\n\n &:hover {\n ${getButtonHoverColor(variant, colorSchema, disabled, $loading, shadow, theme)};\n }\n `;\n};\n\nexport const ButtonContainer = styled('div')<ButtonStylesProps>`\n box-sizing: border-box;\n user-select: none;\n outline: none;\n position: relative;\n overflow: hidden;\n font-weight: 600;\n border: 1px solid;\n transition: all 0.3s ease-in-out;\n border-radius: ${({ $radius, theme }) => theme.layout.radius[$radius]};\n display: ${(props) => (props.block ? 'block' : 'inline-block')};\n ${({ $loading, disabled }) => getButtonCursor($loading, disabled)};\n ${({ size, block }) => getButtonSize(size, block)};\n ${({ theme, $color, variant, shadow, disabled, $loading }) =>\n getButtonStyles(theme, $color, variant, shadow, disabled, $loading)};\n ${({ $loading }) => ($loading ? 'opacity: 0.6;' : null)};\n`;\n\nexport const ButtonInner = styled('div')<ButtonStylesProps>`\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n`;\n\nexport const ButtonLabel = styled('span')<ButtonStylesProps>`\n display: inherit;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n\nexport const IconLeftSpan = styled('span')<ButtonStylesProps>`\n display: flex;\n align-items: center;\n margin-right: 10px;\n`;\n\nexport const IconRightSpan = styled('span')<ButtonStylesProps>`\n display: flex;\n align-items: center;\n margin-left: 10px;\n`;\n"],"names":[],"mappings":";;;AAEA,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,QAAQ,KAAK;AAChD,EAAE,IAAI,QAAQ,EAAE;AAChB,IAAI,OAAO,GAAG,CAAC;AACf;AACA;AACA,IAAI,CAAC,CAAC;AACN,GAAG;AACH,EAAE,IAAI,QAAQ,EAAE;AAChB,IAAI,OAAO,GAAG,CAAC;AACf;AACA;AACA,IAAI,CAAC,CAAC;AACN,GAAG;AACH,EAAE,OAAO,GAAG,CAAC;AACb;AACA;AACA,EAAE,CAAC,CAAC;AACJ,CAAC,CAAC;AACF,MAAM,KAAK,GAAG;AACd,EAAE,EAAE,EAAE,GAAG,CAAC;AACV;AACA;AACA,EAAE,CAAC;AACH,EAAE,EAAE,EAAE,GAAG,CAAC;AACV;AACA;AACA,EAAE,CAAC;AACH,EAAE,EAAE,EAAE,GAAG,CAAC;AACV;AACA;AACA,EAAE,CAAC;AACH,EAAE,EAAE,EAAE,GAAG,CAAC;AACV;AACA;AACA,EAAE,CAAC;AACH,EAAE,EAAE,EAAE,GAAG,CAAC;AACV;AACA;AACA,EAAE,CAAC;AACH,CAAC,CAAC;AACF,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,KAAK,KAAK,GAAG,CAAC;AAC3C,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;AAChB,SAAS,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AACnC,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CA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,CAAC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACxE,WAAW,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,GAAG,OAAO,GAAG,cAAc,CAAC;AAC/D,EAAE,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,eAAe,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACpE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACpD,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACpI,EAAE,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,QAAQ,GAAG,eAAe,GAAG,IAAI,CAAC;AACxD,EAAE;AACU,MAAC,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AACzC;AACA;AACA;AACA;AACA,EAAE;AACU,MAAC,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;AAC1C;AACA;AACA;AACA;AACA,EAAE;AACU,MAAC,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;AAC3C;AACA;AACA;AACA,EAAE;AACU,MAAC,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;AAC5C;AACA;AACA;AACA;;;;"}
|
|
1
|
+
{"version":3,"file":"Button.styles.js","sources":["../../src/Button/Button.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { KubedNumberSize, KubedSizes, KubedTheme } from '../theme';\nimport { colorToRgbValues } from '../utils/color';\n\ninterface ButtonStylesProps {\n $loading?: boolean;\n $size?: KubedSizes;\n $radius?: KubedNumberSize;\n theme?: KubedTheme;\n block?: boolean;\n disabled?: boolean;\n $shadow?: boolean;\n $variant?: 'filled' | 'outline' | 'text' | 'link';\n $color?: string | 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error';\n}\n\nconst getButtonCursor = ($loading: boolean, disabled: boolean) => {\n if (disabled) {\n return css`\n cursor: not-allowed;\n pointer-events: auto;\n `;\n }\n if ($loading) {\n return css`\n cursor: default;\n pointer-events: none;\n `;\n }\n return css`\n cursor: pointer;\n pointer-events: auto;\n `;\n};\n\nconst sizes = {\n xs: css`\n font-size: 10px;\n padding: 0 14px;\n `,\n sm: css`\n font-size: 12px;\n padding: 0 20px;\n `,\n md: css`\n font-size: 14px;\n padding: 0 23px;\n `,\n lg: css`\n font-size: 16px;\n padding: 0 26px;\n `,\n xl: css`\n font-size: 18px;\n padding: 0 30px;\n `,\n};\n\nconst getButtonSize = (size, block) => css`\n ${sizes[size]};\n width: ${block ? '100%' : 'auto'};\n height: ${({ theme }) => theme.layout.inputSizes[size]};\n`;\n\nconst getButtonColor = (variant = 'filled', colorSchema, disabled, $loading, theme: KubedTheme) => {\n const { palette } = theme;\n if (disabled) {\n return css`\n background-color: ${palette.accents_1};\n border-color: ${palette.border};\n color: ${palette.accents_7};\n opacity: 0.7;\n `;\n }\n\n const styles = {\n filled: css`\n background-color: ${colorSchema.bg};\n border-color: ${colorSchema.border};\n color: ${colorSchema.color};\n `,\n outline: css`\n background-color: #fff;\n border-color: ${colorSchema.border};\n color: ${colorSchema.fg || colorSchema.bg};\n `,\n link: css`\n font-weight: 400;\n background-color: transparent;\n border-color: transparent;\n color: ${colorSchema.fg || colorSchema.bg};\n padding: 0;\n `,\n text: css`\n background-color: transparent;\n border-color: transparent;\n color: ${colorSchema.fg || colorSchema.bg};\n `,\n };\n\n return styles[variant];\n};\n\nconst getButtonHoverColor = (\n variant = 'filled',\n colorSchema,\n disabled,\n $loading,\n shadow,\n theme: KubedTheme\n) => {\n if (disabled) return null;\n if (shadow) {\n return css`\n box-shadow: none;\n `;\n }\n const { palette } = theme;\n if (variant === 'link') {\n return css`\n text-decoration: underline;\n `;\n }\n if (variant === 'text') {\n return css`\n background-color: ${palette.accents_2};\n `;\n }\n\n const styles = {\n filled: css`\n background-color: ${colorSchema.hoverBg};\n border-color: ${colorSchema.hoverBorder || colorSchema.hoverBg};\n `,\n outline: css`\n background-color: ${colorSchema.hoverBg};\n color: ${colorSchema.color};\n `,\n text: css`\n background-color: transparent;\n border-color: transparent;\n color: ${palette.accents_5};\n `,\n };\n return styles[variant];\n};\n\nconst getShadow = (shadow, colorSchema, theme) => {\n if (shadow) {\n const { expressiveness } = theme;\n const rgb = colorToRgbValues(colorSchema.bg).join(' ');\n return expressiveness.buttonShadow(rgb);\n }\n return null;\n};\n\nconst getButtonStyles = (\n theme: KubedTheme,\n color = 'default',\n variant,\n shadow,\n disabled,\n $loading\n) => {\n const { palette } = theme;\n const { background, border, accents_1, accents_2, accents_7, accents_8, accents_9, primary } =\n palette;\n const colors = {\n default: {\n bg: accents_1,\n border,\n color: accents_7,\n fg: accents_7,\n hoverBg: accents_2,\n hoverBorder: border,\n },\n primary: {\n bg: palette.colors[primary][2],\n border: palette.colors[primary][2],\n color: '#fff',\n hoverBg: palette.colors[primary][3],\n },\n secondary: {\n bg: accents_8,\n border: accents_8,\n color: background,\n hoverBg: accents_9,\n },\n };\n\n let colorSchema;\n if (colors[color]) {\n colorSchema = colors[color];\n } else if (palette[color]) {\n colorSchema = {\n bg: palette[color],\n border: palette[color],\n color: '#fff',\n hoverBg: palette[`${color}Dark`],\n };\n } else if (palette.colors[color]) {\n const currentColor = palette.colors[color];\n colorSchema = {\n bg: currentColor[2],\n border: currentColor[2],\n color: '#fff',\n hoverBg: currentColor[3],\n };\n } else {\n colorSchema = colors.default;\n }\n\n return css`\n box-shadow: ${getShadow(shadow, colorSchema, theme)};\n ${getButtonColor(variant, colorSchema, disabled, $loading, theme)};\n\n &:hover {\n ${getButtonHoverColor(variant, colorSchema, disabled, $loading, shadow, theme)};\n }\n `;\n};\n\nexport const ButtonContainer = styled('div')<ButtonStylesProps>`\n box-sizing: border-box;\n user-select: none;\n outline: none;\n position: relative;\n overflow: hidden;\n font-weight: 600;\n border: 1px solid;\n transition: all 0.3s ease-in-out;\n border-radius: ${({ $radius, theme }) => theme.layout.radius[$radius]};\n display: ${(props) => (props.block ? 'block' : 'inline-block')};\n ${({ $loading, disabled }) => getButtonCursor($loading, disabled)};\n ${({ $size, block }) => getButtonSize($size, block)};\n ${({ theme, $color, $variant, $shadow, disabled, $loading }) =>\n getButtonStyles(theme, $color, $variant, $shadow, disabled, $loading)};\n ${({ $loading }) => ($loading ? 'opacity: 0.6;' : null)};\n`;\n\nexport const ButtonInner = styled('div')<ButtonStylesProps>`\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n`;\n\nexport const ButtonLabel = styled('span')<ButtonStylesProps>`\n display: inherit;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n\nexport const IconLeftSpan = styled('span')<ButtonStylesProps>`\n display: flex;\n align-items: center;\n margin-right: 10px;\n`;\n\nexport const IconRightSpan = styled('span')<ButtonStylesProps>`\n display: flex;\n align-items: center;\n margin-left: 10px;\n`;\n"],"names":[],"mappings":";;;AAEA,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,QAAQ,KAAK;AAChD,EAAE,IAAI,QAAQ,EAAE;AAChB,IAAI,OAAO,GAAG,CAAC;AACf;AACA;AACA,IAAI,CAAC,CAAC;AACN,GAAG;AACH,EAAE,IAAI,QAAQ,EAAE;AAChB,IAAI,OAAO,GAAG,CAAC;AACf;AACA;AACA,IAAI,CAAC,CAAC;AACN,GAAG;AACH,EAAE,OAAO,GAAG,CAAC;AACb;AACA;AACA,EAAE,CAAC,CAAC;AACJ,CAAC,CAAC;AACF,MAAM,KAAK,GAAG;AACd,EA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Q,CAAC,CAAC;AACxI,EAAE,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,QAAQ,GAAG,eAAe,GAAG,IAAI,CAAC;AACxD,EAAE;AACU,MAAC,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AACzC;AACA;AACA;AACA;AACA,EAAE;AACU,MAAC,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;AAC1C;AACA;AACA;AACA;AACA,EAAE;AACU,MAAC,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;AAC3C;AACA;AACA;AACA,EAAE;AACU,MAAC,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;AAC5C;AACA;AACA;AACA;;;;"}
|
package/esm/Divider/Divider.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import f from"react";import y from"classnames";import u from"../utils/forwardRef.js";import{DividerWrapper as N,Label as j}from"./Divider.styles.js";var z=Object.defineProperty,i=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,p=(r,a,e)=>a in r?z(r,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[a]=e,$=(r,a)=>{for(var e in a||(a={}))c.call(a,e)&&p(r,e,a[e]);if(i)for(var e of i(a))v.call(a,e)&&p(r,e,a[e]);return r},x=(r,a)=>{var e={};for(var t in r)c.call(r,t)&&a.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&i)for(var t of i(r))a.indexOf(t)<0&&v.call(r,t)&&(e[t]=r[t]);return e};const d=u((r,a)=>{var e=r,{className:t,color:b,direction:n="horizontal",size:_="xs",label:l,labelPosition:h="left",labelProps:D,themeOverride:E,variant:s="solid",margins:O=0,height:P}=e,g=x(e,["className","color","direction","size","label","labelPosition","labelProps","themeOverride","variant","margins","height"]);const m=n==="vertical",o=!m,w=!!l&&o;return f.createElement(N,$({ref:a,className:y({"with-label":w,vertical:m,horizontal:o},t),direction:n,variant:s,$margins:O,$size:_,$height:P,$color:b},g),!!l&&o&&f.createElement(j,{as:"label",className:h,$variant:s},l))});d.displayName="@kubed/components/Divider";export{d as Divider};
|
|
2
2
|
//# sourceMappingURL=Divider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.js","sources":["../../src/Divider/Divider.tsx"],"sourcesContent":["import React from 'react';\nimport cx from '
|
|
1
|
+
{"version":3,"file":"Divider.js","sources":["../../src/Divider/Divider.tsx"],"sourcesContent":["import React from 'react';\nimport cx from 'classnames';\nimport forwardRef from '../utils/forwardRef';\nimport { DefaultProps, KubedNumberSize } from '../theme';\nimport { DividerWrapper, Label } from './Divider.styles';\n\nexport interface DividerProps extends DefaultProps {\n /** Line color from theme, defaults to gray in light color scheme and to dark in dark color scheme */\n color?: string;\n\n /** Line direction */\n direction?: 'horizontal' | 'vertical';\n\n /** Sets height in horizontal orientation and with in vertical */\n size?: KubedNumberSize;\n\n /** Adds text after line in horizontal orientation */\n label?: React.ReactNode;\n\n /** Label position */\n labelPosition?: 'left' | 'center' | 'right';\n\n /** Props spread to Text component in label */\n labelProps?: Record<string, any>;\n\n /** Divider borderStyle */\n variant?: 'solid' | 'dashed' | 'dotted';\n\n /** Top and bottom margins for horizontal variant, left and right for vertical, xs, sm, md, lg, xl for value from theme.spacing, number for margins in px */\n margins?: KubedNumberSize;\n\n /** Divider height, only available if direction is vertical */\n height?: number;\n}\n\nexport const Divider = forwardRef<DividerProps, 'hr'>(\n (\n {\n className,\n color,\n direction = 'horizontal',\n size = 'xs',\n label,\n labelPosition = 'left',\n labelProps,\n themeOverride,\n variant = 'solid',\n margins = 0,\n height,\n ...rest\n },\n ref\n ) => {\n const vertical = direction === 'vertical';\n const horizontal = !vertical;\n const withLabel = !!label && horizontal;\n\n return (\n <DividerWrapper\n ref={ref}\n className={cx({ 'with-label': withLabel, vertical, horizontal }, className)}\n direction={direction}\n variant={variant}\n $margins={margins}\n $size={size}\n $height={height}\n $color={color}\n {...rest}\n >\n {!!label && horizontal && (\n <Label as=\"label\" className={labelPosition} $variant={variant}>\n {label}\n </Label>\n )}\n </DividerWrapper>\n );\n }\n);\n\nDivider.displayName = '@kubed/components/Divider';\n"],"names":[],"mappings":";;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAAI,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AAC/B,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AAChC,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAClC,MAAM,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACxC,EAAE,IAAI,mBAAmB;AACzB,IAAI,KAAK,IAAI,IAAI,IAAI,mBAAmB,CAAC,CAAC,CAAC,EAAE;AAC7C,MAAM,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AACpC,QAAQ,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1C,KAAK;AACL,EAAE,OAAO,CAAC,CAAC;AACX,CAAC,CAAC;AACF,I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,IAAI,YAAY;AAChB,IAAI,eAAe;AACnB,IAAI,SAAS;AACb,IAAI,SAAS;AACb,IAAI,QAAQ;AACZ,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,QAAQ,GAAG,SAAS,KAAK,UAAU,CAAC;AAC5C,EAAE,MAAM,UAAU,GAAG,CAAC,QAAQ,CAAC;AAC/B,EAAE,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,IAAI,UAAU,CAAC;AAC1C,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,cAAc,EAAE,cAAc,CAAC;AAC5E,IAAI,GAAG;AACP,IAAI,SAAS,EAAE,EAAE,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,SAAS,CAAC;AAC/E,IAAI,SAAS;AACb,IAAI,OAAO;AACX,IAAI,QAAQ,EAAE,OAAO;AACrB,IAAI,KAAK,EAAE,IAAI;AACf,IAAI,OAAO,EAAE,MAAM;AACnB,IAAI,MAAM,EAAE,KAAK;AACjB,GAAG,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,UAAU,oBAAoB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE;AAChF,IAAI,EAAE,EAAE,OAAO;AACf,IAAI,SAAS,EAAE,aAAa;AAC5B,IAAI,QAAQ,EAAE,OAAO;AACrB,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AACb,CAAC,EAAE;AACH,OAAO,CAAC,WAAW,GAAG,2BAA2B;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import l from"styled-components";import{Text as
|
|
1
|
+
import l from"styled-components";import{Text as p}from"../Text/Text.js";import{getSizeValue as r}from"../theme/utils.js";const o={xs:"1px",sm:"2px",md:"3px",lg:"4px",xl:"5px"},i=l("div")`
|
|
2
2
|
border: 0;
|
|
3
3
|
|
|
4
4
|
&.with-label {
|
|
@@ -7,20 +7,20 @@ import l from"styled-components";import{Text as i}from"../Text/Text.js";import{g
|
|
|
7
7
|
|
|
8
8
|
&.horizontal {
|
|
9
9
|
border-top-style: ${({variant:e})=>e};
|
|
10
|
-
border-top-width: ${({size:e})=>r(e,o)};
|
|
11
|
-
border-top-color: ${({theme:e})=>e.palette.border};
|
|
10
|
+
border-top-width: ${({$size:e})=>r(e,o)};
|
|
11
|
+
border-top-color: ${({theme:e,$color:t})=>t||e.palette.border};
|
|
12
12
|
margin: ${({$margins:e,theme:t})=>r(e,t.layout.spacing)} 0;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
&.vertical {
|
|
16
|
-
align-self: stretch;
|
|
16
|
+
${({$height:e})=>e?`height: ${e}px;`:"align-self: stretch;"};
|
|
17
17
|
border-left-style: ${({variant:e})=>e};
|
|
18
|
-
border-left-color: ${({theme:e})=>e.palette.border};
|
|
19
|
-
border-left-width: ${({size:e})=>r(e,o)};
|
|
18
|
+
border-left-color: ${({theme:e,$color:t})=>t||e.palette.border};
|
|
19
|
+
border-left-width: ${({$size:e})=>r(e,o)};
|
|
20
20
|
margin-left: ${({$margins:e,theme:t})=>r(e,t.layout.spacing)};
|
|
21
21
|
margin-right: ${({$margins:e,theme:t})=>r(e,t.layout.spacing)};
|
|
22
22
|
}
|
|
23
|
-
`,a=l(
|
|
23
|
+
`,a=l(p)`
|
|
24
24
|
display: flex;
|
|
25
25
|
align-items: center;
|
|
26
26
|
color: ${({theme:e})=>e.palette.accents_5};
|
|
@@ -53,5 +53,5 @@ import l from"styled-components";import{Text as i}from"../Text/Text.js";import{g
|
|
|
53
53
|
margin-left: ${({theme:e})=>e.layout.spacing.xs};
|
|
54
54
|
border-top: 1px ${({theme:e,$variant:t})=>`${t} ${e.palette.border}`};
|
|
55
55
|
}
|
|
56
|
-
`;export{
|
|
56
|
+
`;export{i as DividerWrapper,a as Label,o as sizes};
|
|
57
57
|
//# sourceMappingURL=Divider.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.styles.js","sources":["../../src/Divider/Divider.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport React from 'react';\nimport { Text } from '../Text/Text';\nimport { getSizeValue } from '../theme/utils';\n\nexport const sizes = {\n xs: '1px',\n sm: '2px',\n md: '3px',\n lg: '4px',\n xl: '5px',\n};\n\nexport const DividerWrapper = styled('div')<React.ComponentPropsWithoutRef<any>>`\n border: 0;\n\n &.with-label {\n border-top: 0 !important;\n }\n\n &.horizontal {\n border-top-style: ${({ variant }) => variant};\n border-top-width: ${({ size }) => getSizeValue(size, sizes)};\n border-top-color: ${({ theme }) => theme.palette.border};\n margin: ${({ $margins, theme }) => getSizeValue($margins, theme.layout.spacing)} 0;\n }\n\n &.vertical {\n align-self: stretch;\n border-left-style: ${({ variant }) => variant};\n border-left-color: ${({ theme }) => theme.palette.border};\n border-left-width: ${({ size }) => getSizeValue(size, sizes)};\n margin-left: ${({ $margins, theme }) => getSizeValue($margins, theme.layout.spacing)};\n margin-right: ${({ $margins, theme }) => getSizeValue($margins, theme.layout.spacing)};\n }\n`;\n\nexport const Label = styled(Text)<React.ComponentPropsWithoutRef<any>>`\n display: flex;\n align-items: center;\n color: ${({ theme }) => theme.palette.accents_5};\n font-size: 12px;\n\n &.left {\n &:before {\n display: none;\n }\n }\n\n &.right {\n &:after {\n display: none;\n }\n }\n\n &:before {\n content: '';\n flex: 1;\n height: 1px;\n margin-right: ${({ theme }) => theme.layout.spacing.xs};\n border-top: 1px ${({ theme, $variant }) => `${$variant} ${theme.palette.border}`};\n }\n\n &:after {\n content: '';\n flex: 1;\n height: 1px;\n margin-left: ${({ theme }) => theme.layout.spacing.xs};\n border-top: 1px ${({ theme, $variant }) => `${$variant} ${theme.palette.border}`};\n }\n`;\n"],"names":[],"mappings":";;;;AAGY,MAAC,KAAK,GAAG;AACrB,EAAE,EAAE,EAAE,KAAK;AACX,EAAE,EAAE,EAAE,KAAK;AACX,EAAE,EAAE,EAAE,KAAK;AACX,EAAE,EAAE,EAAE,KAAK;AACX,EAAE,EAAE,EAAE,KAAK;AACX,EAAE;AACU,MAAC,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;AACjD,sBAAsB,EAAE,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"Divider.styles.js","sources":["../../src/Divider/Divider.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport React from 'react';\nimport { Text } from '../Text/Text';\nimport { getSizeValue } from '../theme/utils';\n\nexport const sizes = {\n xs: '1px',\n sm: '2px',\n md: '3px',\n lg: '4px',\n xl: '5px',\n};\n\nexport const DividerWrapper = styled('div')<React.ComponentPropsWithoutRef<any>>`\n border: 0;\n\n &.with-label {\n border-top: 0 !important;\n }\n\n &.horizontal {\n border-top-style: ${({ variant }) => variant};\n border-top-width: ${({ $size }) => getSizeValue($size, sizes)};\n border-top-color: ${({ theme, $color }) => $color || theme.palette.border};\n margin: ${({ $margins, theme }) => getSizeValue($margins, theme.layout.spacing)} 0;\n }\n\n &.vertical {\n ${({ $height }) => ($height ? `height: ${$height}px;` : 'align-self: stretch;')};\n border-left-style: ${({ variant }) => variant};\n border-left-color: ${({ theme, $color }) => $color || theme.palette.border};\n border-left-width: ${({ $size }) => getSizeValue($size, sizes)};\n margin-left: ${({ $margins, theme }) => getSizeValue($margins, theme.layout.spacing)};\n margin-right: ${({ $margins, theme }) => getSizeValue($margins, theme.layout.spacing)};\n }\n`;\n\nexport const Label = styled(Text)<React.ComponentPropsWithoutRef<any>>`\n display: flex;\n align-items: center;\n color: ${({ theme }) => theme.palette.accents_5};\n font-size: 12px;\n\n &.left {\n &:before {\n display: none;\n }\n }\n\n &.right {\n &:after {\n display: none;\n }\n }\n\n &:before {\n content: '';\n flex: 1;\n height: 1px;\n margin-right: ${({ theme }) => theme.layout.spacing.xs};\n border-top: 1px ${({ theme, $variant }) => `${$variant} ${theme.palette.border}`};\n }\n\n &:after {\n content: '';\n flex: 1;\n height: 1px;\n margin-left: ${({ theme }) => theme.layout.spacing.xs};\n border-top: 1px ${({ theme, $variant }) => `${$variant} ${theme.palette.border}`};\n }\n`;\n"],"names":[],"mappings":";;;;AAGY,MAAC,KAAK,GAAG;AACrB,EAAE,EAAE,EAAE,KAAK;AACX,EAAE,EAAE,EAAE,KAAK;AACX,EAAE,EAAE,EAAE,KAAK;AACX,EAAE,EAAE,EAAE,KAAK;AACX,EAAE,EAAE,EAAE,KAAK;AACX,EAAE;AACU,MAAC,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;AACjD,sBAAsB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAClE,sBAAsB,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;AAC9E,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACpF;AACA;AACA;AACA,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,OAAO,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,sBAAsB,CAAC;AAClF,uBAAuB,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;AAClD,uBAAuB,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;AAC/E,uBAAuB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AACnE,iBAAiB,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACzF,kBAAkB,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAC1F;AACA,EAAE;AACU,MAAC,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;AAClC;AACA;AACA,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;AAC3D,oBAAoB,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;AACrF;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;AAC1D,oBAAoB,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;AACrF;AACA;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import r from"styled-components";import{addColorAlpha as
|
|
1
|
+
import r from"styled-components";import{addColorAlpha as t}from"../utils/color.js";const a=r("div")`
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
width: ${({width:e})=>e?`${e}px`:"100%"};
|
|
4
4
|
border-radius: 3px;
|
|
@@ -13,7 +13,7 @@ import r from"styled-components";import{addColorAlpha as o}from"../utils/color.j
|
|
|
13
13
|
|
|
14
14
|
&.input-focus {
|
|
15
15
|
border-color: ${({theme:e})=>e.palette.colors.green[2]};
|
|
16
|
-
box-shadow: 0 4px 8px 0 ${({theme:e})=>
|
|
16
|
+
box-shadow: 0 4px 8px 0 ${({theme:e})=>t(e.palette.colors.green[2],.2)};
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
&.input-disabled {
|
|
@@ -27,12 +27,13 @@ import r from"styled-components";import{addColorAlpha as o}from"../utils/color.j
|
|
|
27
27
|
font-weight: 600;
|
|
28
28
|
outline: none;
|
|
29
29
|
border-radius: 3px;
|
|
30
|
-
height: ${({size:e,theme:
|
|
30
|
+
height: ${({size:e,theme:o})=>o.layout.inputSizes[e]};
|
|
31
31
|
padding: 6px 0;
|
|
32
32
|
border: none;
|
|
33
33
|
line-height: 1.67;
|
|
34
34
|
color: ${({theme:e})=>e.palette.accents_7};
|
|
35
35
|
transition: all 0.3s ease-in-out;
|
|
36
|
+
background-color: transparent;
|
|
36
37
|
|
|
37
38
|
&[disabled] {
|
|
38
39
|
cursor: not-allowed;
|
|
@@ -44,7 +45,7 @@ import r from"styled-components";import{addColorAlpha as o}from"../utils/color.j
|
|
|
44
45
|
-webkit-box-shadow: 0 0 0 1000px #fff inset;
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
|
-
`,
|
|
48
|
+
`,i=r("div")`
|
|
48
49
|
margin-right: 8px;
|
|
49
50
|
display: flex;
|
|
50
51
|
align-items: center;
|
|
@@ -88,5 +89,5 @@ import r from"styled-components";import{addColorAlpha as o}from"../utils/color.j
|
|
|
88
89
|
border-top-right-radius: 3px;
|
|
89
90
|
border-bottom-right-radius: 3px;
|
|
90
91
|
}
|
|
91
|
-
`;export{p as AddonWrapper,n as InputGroup,
|
|
92
|
+
`;export{p as AddonWrapper,n as InputGroup,a as InputWrapper,i as PrefixWrapper,d as SuffixWrapper};
|
|
92
93
|
//# sourceMappingURL=Input.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.styles.js","sources":["../../src/Input/Input.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { addColorAlpha } from '../utils/color';\nimport { KubedSizes } from '../theme';\n\ninterface InputProps {\n focused?: boolean;\n disabled?: boolean;\n width?: number;\n size?: KubedSizes;\n}\n\nexport const InputWrapper = styled('div')<InputProps>`\n display: inline-flex;\n width: ${({ width }) => (width ? `${width}px` : '100%')};\n border-radius: 3px;\n padding: 0 12px;\n border: 1px solid ${({ theme }) => theme.palette.accents_4};\n outline: none;\n transition: all 0.3s ease-in-out;\n\n &:hover {\n border-color: ${({ theme }) => theme.palette.accents_5};\n }\n\n &.input-focus {\n border-color: ${({ theme }) => theme.palette.colors.green[2]};\n box-shadow: 0 4px 8px 0 ${({ theme }) => addColorAlpha(theme.palette.colors.green[2], 0.2)};\n }\n\n &.input-disabled {\n cursor: not-allowed;\n background-color: ${({ theme }) => theme.palette.accents_1};\n border-color: ${({ theme }) => theme.palette.accents_4};\n }\n\n input {\n width: 100%;\n font-weight: 600;\n outline: none;\n border-radius: 3px;\n height: ${({ size, theme }) => theme.layout.inputSizes[size]};\n padding: 6px 0;\n border: none;\n line-height: 1.67;\n color: ${({ theme }) => theme.palette.accents_7};\n transition: all 0.3s ease-in-out;\n\n &[disabled] {\n cursor: not-allowed;\n background-color: ${({ theme }) => theme.palette.accents_1};\n }\n\n &:-webkit-autofill {\n background-color: #fff;\n -webkit-box-shadow: 0 0 0 1000px #fff inset;\n }\n }\n`;\n\nexport const PrefixWrapper = styled('div')`\n margin-right: 8px;\n display: flex;\n align-items: center;\n`;\n\nexport const SuffixWrapper = styled('div')`\n margin-left: 8px;\n display: flex;\n align-items: center;\n`;\n\nexport const InputGroup = styled('div')<InputProps>`\n display: flex;\n width: ${({ width }) => (width ? `${width}px` : '100%')};\n\n &.has-addon-before {\n .input-wrapper {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n }\n\n &.has-addon-after {\n .input-wrapper {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n }\n`;\n\nexport const AddonWrapper = styled('div')`\n background-color: ${({ theme }) => theme.palette.accents_1};\n border: 1px solid ${({ theme }) => theme.palette.accents_4};\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0 8px;\n\n &.addon-before {\n border-right-width: 0;\n border-top-left-radius: 3px;\n border-bottom-left-radius: 3px;\n }\n\n &.addon-after {\n border-left-width: 0;\n border-top-right-radius: 3px;\n border-bottom-right-radius: 3px;\n }\n`;\n"],"names":[],"mappings":";;;AAEY,MAAC,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAC1C;AACA,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,GAAG,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC;AACxD;AACA;AACA,oBAAoB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AAC7D;AACA;AACA;AACA;AACA,kBAAkB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AAC3D;AACA;AACA;AACA,kBAAkB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACjE,4BAA4B,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAC/F;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AAC/D,kBAAkB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AACjE;AACA;AACA;AACA,WAAW,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AACpD;AACA;AACA;AACA;AACA,wBAAwB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACU,MAAC,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAC3C;AACA;AACA;AACA,EAAE;AACU,MAAC,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAC3C;AACA;AACA;AACA,EAAE;AACU,MAAC,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AACxC;AACA,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,GAAG,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACU,MAAC,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAC1C,oBAAoB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AAC7D,oBAAoB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
|
|
1
|
+
{"version":3,"file":"Input.styles.js","sources":["../../src/Input/Input.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { addColorAlpha } from '../utils/color';\nimport { KubedSizes } from '../theme';\n\ninterface InputProps {\n focused?: boolean;\n disabled?: boolean;\n width?: number;\n size?: KubedSizes;\n}\n\nexport const InputWrapper = styled('div')<InputProps>`\n display: inline-flex;\n width: ${({ width }) => (width ? `${width}px` : '100%')};\n border-radius: 3px;\n padding: 0 12px;\n border: 1px solid ${({ theme }) => theme.palette.accents_4};\n outline: none;\n transition: all 0.3s ease-in-out;\n\n &:hover {\n border-color: ${({ theme }) => theme.palette.accents_5};\n }\n\n &.input-focus {\n border-color: ${({ theme }) => theme.palette.colors.green[2]};\n box-shadow: 0 4px 8px 0 ${({ theme }) => addColorAlpha(theme.palette.colors.green[2], 0.2)};\n }\n\n &.input-disabled {\n cursor: not-allowed;\n background-color: ${({ theme }) => theme.palette.accents_1};\n border-color: ${({ theme }) => theme.palette.accents_4};\n }\n\n input {\n width: 100%;\n font-weight: 600;\n outline: none;\n border-radius: 3px;\n height: ${({ size, theme }) => theme.layout.inputSizes[size]};\n padding: 6px 0;\n border: none;\n line-height: 1.67;\n color: ${({ theme }) => theme.palette.accents_7};\n transition: all 0.3s ease-in-out;\n background-color: transparent;\n\n &[disabled] {\n cursor: not-allowed;\n background-color: ${({ theme }) => theme.palette.accents_1};\n }\n\n &:-webkit-autofill {\n background-color: #fff;\n -webkit-box-shadow: 0 0 0 1000px #fff inset;\n }\n }\n`;\n\nexport const PrefixWrapper = styled('div')`\n margin-right: 8px;\n display: flex;\n align-items: center;\n`;\n\nexport const SuffixWrapper = styled('div')`\n margin-left: 8px;\n display: flex;\n align-items: center;\n`;\n\nexport const InputGroup = styled('div')<InputProps>`\n display: flex;\n width: ${({ width }) => (width ? `${width}px` : '100%')};\n\n &.has-addon-before {\n .input-wrapper {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n }\n\n &.has-addon-after {\n .input-wrapper {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n }\n`;\n\nexport const AddonWrapper = styled('div')`\n background-color: ${({ theme }) => theme.palette.accents_1};\n border: 1px solid ${({ theme }) => theme.palette.accents_4};\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0 8px;\n\n &.addon-before {\n border-right-width: 0;\n border-top-left-radius: 3px;\n border-bottom-left-radius: 3px;\n }\n\n &.addon-after {\n border-left-width: 0;\n border-top-right-radius: 3px;\n border-bottom-right-radius: 3px;\n }\n`;\n"],"names":[],"mappings":";;;AAEY,MAAC,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAC1C;AACA,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,GAAG,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC;AACxD;AACA;AACA,oBAAoB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AAC7D;AACA;AACA;AACA;AACA,kBAAkB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AAC3D;AACA;AACA;AACA,kBAAkB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACjE,4BAA4B,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAC/F;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AAC/D,kBAAkB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AACjE;AACA;AACA;AACA,WAAW,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AACpD;AACA;AACA;AACA;AACA;AACA,wBAAwB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACU,MAAC,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAC3C;AACA;AACA;AACA,EAAE;AACU,MAAC,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAC3C;AACA;AACA;AACA,EAAE;AACU,MAAC,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AACxC;AACA,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,GAAG,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACU,MAAC,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAC1C,oBAAoB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AAC7D,oBAAoB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
|
package/esm/Menu/Menu.styles.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import d from"styled-components";const e=d("div")`
|
|
2
2
|
margin: 0;
|
|
3
3
|
padding: 8px;
|
|
4
4
|
min-width: 210px;
|
|
5
5
|
border-radius: 4px;
|
|
6
|
-
background-color:
|
|
6
|
+
background-color: ${({theme:p})=>p.palette.background};
|
|
7
7
|
|
|
8
8
|
.menu-label {
|
|
9
9
|
padding: 8px 22px;
|
|
10
10
|
font-size: 12px;
|
|
11
11
|
}
|
|
12
|
-
`;export{
|
|
12
|
+
`;export{e as MenuWrapper};
|
|
13
13
|
//# sourceMappingURL=Menu.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.styles.js","sources":["../../src/Menu/Menu.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const MenuWrapper = styled('div')`\n margin: 0;\n padding: 8px;\n min-width: 210px;\n border-radius: 4px;\n background-color:
|
|
1
|
+
{"version":3,"file":"Menu.styles.js","sources":["../../src/Menu/Menu.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const MenuWrapper = styled('div')`\n margin: 0;\n padding: 8px;\n min-width: 210px;\n border-radius: 4px;\n background-color: ${({ theme }) => theme.palette.background};\n\n .menu-label {\n padding: 8px 22px;\n font-size: 12px;\n }\n`;\n"],"names":[],"mappings":";;AACY,MAAC,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AACzC;AACA;AACA;AACA;AACA,oBAAoB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC;AAC9D;AACA;AACA;AACA;AACA;AACA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuButton.styles.js","sources":["../../../src/Menu/MenuButton/MenuButton.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const MenuButtonElement = styled('button')`\n -webkit-tap-highlight-color: transparent;\n border: 0;\n border-radius: 4px;\n outline: 0;\n width: 100%;\n display: inline-block;\n text-align: left;\n text-decoration: none;\n cursor: pointer;\n background-color: transparent;\n padding: 8px 22px; // todo improve\n line-height: 20px;\n font-weight: 600;\n color: ${({ theme }) => theme.palette.accents_7};\n\n &:hover {\n background-color: ${({ theme }) => theme.palette.accents_2};\n }\n\n .item-inner {\n display: flex;\n align-items: center;\n height: 20px;\n }\n\n .item-icon {\n display: inline-flex;\n margin-right: 12px;\n\n .kubed-icon {\n width: 16px;\n height: 16px;\n }\n }\n`;\n"],"names":[],"mappings":";;AACY,MAAC,iBAAiB,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AAClD;AACA;AACA,sBAAsB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
|
|
1
|
+
{"version":3,"file":"MenuButton.styles.js","sources":["../../../src/Menu/MenuButton/MenuButton.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const MenuButtonElement = styled('button')`\n -webkit-tap-highlight-color: transparent;\n border: 0;\n border-radius: 4px;\n outline: 0;\n width: 100%;\n display: inline-block;\n text-align: left;\n text-decoration: none;\n cursor: pointer;\n background-color: transparent;\n padding: 8px 22px; // todo improve\n line-height: 20px;\n font-weight: 600;\n color: ${({ theme }) => theme.palette.accents_7};\n\n &:hover {\n background-color: ${({ theme }) => theme.palette.accents_2};\n color: ${({ theme }) => theme.palette.accents_7};\n }\n\n .item-inner {\n display: flex;\n align-items: center;\n height: 20px;\n }\n\n .item-icon {\n display: inline-flex;\n margin-right: 12px;\n\n .kubed-icon {\n width: 16px;\n height: 16px;\n }\n }\n`;\n"],"names":[],"mappings":";;AACY,MAAC,iBAAiB,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AAClD;AACA;AACA,sBAAsB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AAC/D,WAAW,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import r from"../../utils/forwardRef.js";const e=r(()=>null);e.displayName="@kubed/component/MenuItem";export{e as MenuItem};
|
|
2
2
|
//# sourceMappingURL=MenuItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.js","sources":["../../../src/Menu/MenuItem/MenuItem.tsx"],"sourcesContent":["import React from 'react';\nimport { DefaultProps } from '../../theme';\nimport
|
|
1
|
+
{"version":3,"file":"MenuItem.js","sources":["../../../src/Menu/MenuItem/MenuItem.tsx"],"sourcesContent":["import React from 'react';\nimport { DefaultProps } from '../../theme';\nimport forwardRef from '../../utils/forwardRef';\n\nexport interface MenuItemProps extends DefaultProps {\n /** Item label */\n children: React.ReactNode;\n\n /** Icon rendered on the left side of label */\n icon?: React.ReactNode;\n\n /** Any color from theme.colors */\n color?: string;\n\n /** Any react node to render on the right side of item, for example, keyboard shortcut or badge */\n rightSection?: React.ReactNode;\n}\n\nexport interface MenuItemType {\n type: any;\n props: MenuItemProps;\n ref?: React.RefObject<HTMLButtonElement> | ((instance: HTMLButtonElement) => void);\n}\n\nexport const MenuItem = forwardRef<MenuItemProps, 'button'>(() => {\n return null;\n});\n\nMenuItem.displayName = '@kubed/component/MenuItem';\n"],"names":[],"mappings":";;AACY,MAAC,QAAQ,GAAG,UAAU,CAAC,MAAM;AACzC,EAAE,OAAO,IAAI,CAAC;AACd,CAAC,EAAE;AACH,QAAQ,CAAC,WAAW,GAAG,2BAA2B;;;;"}
|
package/esm/Modal/Modal.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import l,{useState as L,useEffect as R,useImperativeHandle as S}from"react";import D from"classnames";import{isNull as v}from"lodash";import{Close as V}from"@kubed/icons";import{StyledDialog as z}from"./Modal.styles.js";import{Button as _}from"../Button/Button.js";import{useLocales as A}from"../ConfigProvider/LocaleProvider/LocaleContext.js";import{getTransitionName as g}from"../utils/motion.js";import{Field as H}from"../Entity/Field.js";import $ from"../utils/forwardRef.js";var q=Object.defineProperty,G=Object.defineProperties,J=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,b=(e,t,r)=>t in e?q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m=(e,t)=>{for(var r in t||(t={}))C.call(t,r)&&b(e,r,t[r]);if(i)for(var r of i(t))P.call(t,r)&&b(e,r,t[r]);return e},K=(e,t)=>G(e,J(t)),Q=(e,t)=>{var r={};for(var n in e)C.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&i)for(var n of i(e))t.indexOf(n)<0&&P.call(e,n)&&(r[n]=e[n]);return r};const O=$((e,t)=>{const r=A(),{Modal:n}=r,f=o=>{const{onCancel:a}=e;a==null||a(o)},w=o=>{const{onOk:a}=e;a==null||a(o)},k=()=>{const{header:o,title:a,description:c,titleIcon:d}=e;return o||v(o)?o:l.createElement(H,{value:a,label:c,avatar:d})},y=()=>{const{footer:o,okText:a,cancelText:c,confirmLoading:d,cancelButtonProps:F,okButtonProps:M}=e;return o||v(o)?o:l.createElement(l.Fragment,null,l.createElement(_,m({onClick:f,radius:"xl"},F),c||n.cancelText),l.createElement(_,m({loading:d,onClick:w,radius:"xl",shadow:!0,color:"secondary"},M),a||n.okText))},u=e,{visible:s,centered:j=!0,getContainer:W,closeIcon:x,focusTriggerAfterClose:E=!0,width:N=600,wrapClassName:h}=u,I=Q(u,["visible","centered","getContainer","closeIcon","focusTriggerAfterClose","width","wrapClassName"]),[T,p]=L(s);R(()=>{p(s)},[s]),S(t,()=>({close:o=>(p(!1),o&&o())}));const B=l.createElement(l.Fragment,null,x||l.createElement(V,{size:24}));return l.createElement(z,K(m({},I),{prefixCls:"kubed-modal",wrapClassName:D(h,{"kubed-modal-centered":j}),focusTriggerAfterClose:E,visible:T,width:N,closeIcon:B,onClose:f,title:k(),footer:y(),transitionName:g("kubed","zoom",e.transitionName),maskTransitionName:g("kubed","fade",e.maskTransitionName)}))});O.displayName="kubed/components/Modal";var U=O;export{U as default};
|
|
2
2
|
//# sourceMappingURL=Modal.js.map
|
package/esm/Modal/Modal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sources":["../../src/Modal/Modal.tsx"],"sourcesContent":["import React, { RefObject, useEffect, useImperativeHandle, useState } from 'react';\nimport cx from 'classnames';\nimport { Close } from '@kubed/icons';\nimport { StyledDialog } from './Modal.styles';\nimport { ButtonProps, Button } from '../Button/Button';\nimport { useLocales } from '../ConfigProvider/LocaleProvider/LocaleContext';\nimport { getTransitionName } from '../utils/motion';\nimport { Field } from '../Entity/Field';\nimport forwardRef from '../utils/forwardRef';\n\ntype getContainerFunc = () => HTMLElement;\n\nexport interface ModalProps {\n /** Mounts modal if true */\n visible?: boolean;\n\n /** Whether to apply loading visual effect for OK button or not */\n confirmLoading?: boolean;\n\n /** Modal title, displayed in header before close button */\n title?: React.ReactNode | string;\n\n /** Modal description */\n description?: React.ReactNode | string;\n\n /** Modal Icon */\n titleIcon?: React.ReactNode;\n\n /** Show or hide close button, modal still can be closed with escape key and by clicking outside */\n closable?: boolean;\n\n /** Specify a function that will be called when a user clicks the OK button */\n onOk?: (e: React.MouseEvent<HTMLElement>) => void;\n\n /** Specify a function that will be called when a user clicks mask, close button on top right or Cancel button */\n onCancel?: (e: React.MouseEvent<HTMLElement>) => void;\n\n /** Specify a function that will be called when modal is closed completely */\n afterClose?: () => void;\n\n /** Centered Modal */\n centered?: boolean;\n\n /** Width of the modal dialog */\n width?: string | number;\n\n /** Custom header content */\n header?: React.ReactNode;\n\n /** Custom footer content */\n footer?: React.ReactNode;\n\n /** 确认按钮文字 */\n okText?: React.ReactNode;\n\n /** 取消按钮文字 */\n cancelText?: React.ReactNode;\n\n /** Whether to close the modal dialog when the mask (area outside the modal) is clicked */\n maskClosable?: boolean;\n\n /** Force render Modal */\n forceRender?: boolean;\n\n /** Props of the ok button */\n okButtonProps?: ButtonProps;\n\n /** Props of the cancel button */\n cancelButtonProps?: ButtonProps;\n\n /** Whether to unmount child components on onClose */\n destroyOnClose?: boolean;\n style?: React.CSSProperties;\n wrapClassName?: string;\n maskTransitionName?: string;\n transitionName?: string;\n className?: string;\n getContainer?: string | HTMLElement | getContainerFunc | false;\n\n /** Modal z-index property */\n zIndex?: number;\n bodyStyle?: React.CSSProperties;\n\n /** Style for modal's mask element */\n maskStyle?: React.CSSProperties;\n\n /** Whether show mask or not */\n mask?: boolean;\n\n /** Whether support press esc to close */\n keyboard?: boolean;\n wrapProps?: any;\n closeIcon?: React.ReactNode;\n modalRender?: (node: React.ReactNode) => React.ReactNode;\n focusTriggerAfterClose?: boolean;\n}\n\ninterface ModalRef {\n close?: () => void;\n}\n\nexport type ModalType = 'info' | 'success' | 'error' | 'warn' | 'warning' | 'confirm' | 'open';\n\nexport interface ModalFuncProps\n extends Omit<ModalProps, 'footer' | 'forceRender' | 'destroyOnClose'> {\n content?: React.ReactNode;\n icon?: React.ReactNode;\n type?: ModalType;\n autoFocusButton?: null | 'ok' | 'cancel';\n okCancel?: boolean;\n id?: string;\n ref?: RefObject<ModalRef>;\n}\n\nconst Modal = forwardRef<ModalProps, any>((props, ref) => {\n const locale = useLocales();\n const { Modal: locales } = locale;\n\n const handleCancel = (e: React.MouseEvent<HTMLButtonElement>) => {\n const { onCancel } = props;\n onCancel?.(e);\n };\n\n const handleOk = (e: React.MouseEvent<HTMLButtonElement>) => {\n const { onOk } = props;\n onOk?.(e);\n };\n\n const renderFooter = () => {\n const { okText, cancelText, confirmLoading, cancelButtonProps, okButtonProps } = props;\n return (\n <>\n <Button onClick={handleCancel} radius=\"xl\" {...cancelButtonProps}>\n {cancelText || locales.cancelText}\n </Button>\n <Button\n loading={confirmLoading}\n onClick={handleOk}\n radius=\"xl\"\n shadow\n color=\"secondary\"\n {...okButtonProps}\n >\n {okText || locales.okText}\n </Button>\n </>\n );\n };\n\n const {\n footer,\n visible,\n centered = true,\n getContainer,\n closeIcon,\n focusTriggerAfterClose = true,\n width = 600,\n wrapClassName,\n header,\n title,\n description,\n titleIcon,\n ...restProps\n } = props;\n const [internalVisible, setInternalVisible] = useState(visible);\n\n useEffect(() => {\n setInternalVisible(visible);\n }, [visible]);\n\n useImperativeHandle(ref, () => ({\n // only use for imperative mode\n close: (callback) => {\n setInternalVisible(false);\n return callback && callback();\n },\n }));\n\n const renderCloseIcon = <>{closeIcon || <Close size={24} />}</>;\n\n const renderHeader = header || <Field value={title} label={description} avatar={titleIcon} />;\n\n return (\n <StyledDialog\n {...restProps}\n prefixCls=\"kubed-modal\"\n wrapClassName={cx(wrapClassName, { 'kubed-modal-centered': centered })}\n focusTriggerAfterClose={focusTriggerAfterClose}\n visible={internalVisible}\n width={width}\n closeIcon={renderCloseIcon}\n onClose={handleCancel}\n title={renderHeader}\n footer={footer || renderFooter()}\n transitionName={getTransitionName('kubed', 'zoom', props.transitionName)}\n maskTransitionName={getTransitionName('kubed', 'fade', props.maskTransitionName)}\n />\n );\n});\n\nModal.displayName = 'kubed/components/Modal';\n\nexport default Modal;\n"],"names":[],"mappings":";;;;;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzC,IAAI,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C5B,IAAI,KAAK;AACT,IAAI,SAAS,EAAE,eAAe;AAC9B,IAAI,OAAO,EAAE,YAAY;AACzB,IAAI,KAAK,EAAE,YAAY;AACvB,IAAI,MAAM,EAAE,MAAM,IAAI,YAAY,EAAE;AACpC,IAAI,cAAc,EAAE,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC;AAC5E,IAAI,kBAAkB,EAAE,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,kBAAkB,CAAC;AACpF,GAAG,CAAC,CAAC,CAAC;AACN,CAAC,CAAC,CAAC;AACH,KAAK,CAAC,WAAW,GAAG,wBAAwB,CAAC;AAC7C,cAAe,KAAK;;;;"}
|
|
1
|
+
{"version":3,"file":"Modal.js","sources":["../../src/Modal/Modal.tsx"],"sourcesContent":["import React, { RefObject, useEffect, useImperativeHandle, useState } from 'react';\nimport cx from 'classnames';\nimport { isNull } from 'lodash';\nimport { Close } from '@kubed/icons';\nimport { StyledDialog } from './Modal.styles';\nimport { ButtonProps, Button } from '../Button/Button';\nimport { useLocales } from '../ConfigProvider/LocaleProvider/LocaleContext';\nimport { getTransitionName } from '../utils/motion';\nimport { Field } from '../Entity/Field';\nimport forwardRef from '../utils/forwardRef';\n\ntype getContainerFunc = () => HTMLElement;\n\nexport interface ModalProps {\n /** Mounts modal if true */\n visible?: boolean;\n\n /** Whether to apply loading visual effect for OK button or not */\n confirmLoading?: boolean;\n\n /** Modal title, displayed in header before close button */\n title?: React.ReactNode | string;\n\n /** Modal description */\n description?: React.ReactNode | string;\n\n /** Modal Icon */\n titleIcon?: React.ReactNode;\n\n /** Show or hide close button, modal still can be closed with escape key and by clicking outside */\n closable?: boolean;\n\n /** Specify a function that will be called when a user clicks the OK button */\n onOk?: (e: React.MouseEvent<HTMLElement>) => void;\n\n /** Specify a function that will be called when a user clicks mask, close button on top right or Cancel button */\n onCancel?: (e: React.MouseEvent<HTMLElement>) => void;\n\n /** Specify a function that will be called when modal is closed completely */\n afterClose?: () => void;\n\n /** Centered Modal */\n centered?: boolean;\n\n /** Width of the modal dialog */\n width?: string | number;\n\n /** Custom header content */\n header?: React.ReactNode;\n\n /** Custom footer content */\n footer?: React.ReactNode;\n\n /** 确认按钮文字 */\n okText?: React.ReactNode;\n\n /** 取消按钮文字 */\n cancelText?: React.ReactNode;\n\n /** Whether to close the modal dialog when the mask (area outside the modal) is clicked */\n maskClosable?: boolean;\n\n /** Force render Modal */\n forceRender?: boolean;\n\n /** Props of the ok button */\n okButtonProps?: ButtonProps;\n\n /** Props of the cancel button */\n cancelButtonProps?: ButtonProps;\n\n /** Whether to unmount child components on onClose */\n destroyOnClose?: boolean;\n style?: React.CSSProperties;\n wrapClassName?: string;\n maskTransitionName?: string;\n transitionName?: string;\n className?: string;\n getContainer?: string | HTMLElement | getContainerFunc | false;\n\n /** Modal z-index property */\n zIndex?: number;\n bodyStyle?: React.CSSProperties;\n\n /** Style for modal's mask element */\n maskStyle?: React.CSSProperties;\n\n /** Whether show mask or not */\n mask?: boolean;\n\n /** Whether support press esc to close */\n keyboard?: boolean;\n wrapProps?: any;\n closeIcon?: React.ReactNode;\n modalRender?: (node: React.ReactNode) => React.ReactNode;\n focusTriggerAfterClose?: boolean;\n}\n\ninterface ModalRef {\n close?: () => void;\n}\n\nexport type ModalType = 'info' | 'success' | 'error' | 'warn' | 'warning' | 'confirm' | 'open';\n\nexport interface ModalFuncProps extends Omit<ModalProps, 'forceRender' | 'destroyOnClose'> {\n content?: React.ReactNode;\n icon?: React.ReactNode;\n type?: ModalType;\n autoFocusButton?: null | 'ok' | 'cancel';\n okCancel?: boolean;\n id?: string;\n ref?: RefObject<ModalRef>;\n}\n\nconst Modal = forwardRef<ModalProps, any>((props, ref) => {\n const locale = useLocales();\n const { Modal: locales } = locale;\n\n const handleCancel = (e: React.MouseEvent<HTMLButtonElement>) => {\n const { onCancel } = props;\n onCancel?.(e);\n };\n\n const handleOk = (e: React.MouseEvent<HTMLButtonElement>) => {\n const { onOk } = props;\n onOk?.(e);\n };\n\n const renderHeader = () => {\n const { header, title, description, titleIcon } = props;\n if (header || isNull(header)) return header;\n\n return <Field value={title} label={description} avatar={titleIcon} />;\n };\n\n const renderFooter = () => {\n const { footer, okText, cancelText, confirmLoading, cancelButtonProps, okButtonProps } = props;\n if (footer || isNull(footer)) return footer;\n\n return (\n <>\n <Button onClick={handleCancel} radius=\"xl\" {...cancelButtonProps}>\n {cancelText || locales.cancelText}\n </Button>\n <Button\n loading={confirmLoading}\n onClick={handleOk}\n radius=\"xl\"\n shadow\n color=\"secondary\"\n {...okButtonProps}\n >\n {okText || locales.okText}\n </Button>\n </>\n );\n };\n\n const {\n visible,\n centered = true,\n getContainer,\n closeIcon,\n focusTriggerAfterClose = true,\n width = 600,\n wrapClassName,\n ...restProps\n } = props;\n const [internalVisible, setInternalVisible] = useState(visible);\n\n useEffect(() => {\n setInternalVisible(visible);\n }, [visible]);\n\n useImperativeHandle(ref, () => ({\n // only use for imperative mode\n close: (callback) => {\n setInternalVisible(false);\n return callback && callback();\n },\n }));\n\n const renderCloseIcon = <>{closeIcon || <Close size={24} />}</>;\n\n return (\n <StyledDialog\n {...restProps}\n prefixCls=\"kubed-modal\"\n wrapClassName={cx(wrapClassName, { 'kubed-modal-centered': centered })}\n focusTriggerAfterClose={focusTriggerAfterClose}\n visible={internalVisible}\n width={width}\n closeIcon={renderCloseIcon}\n onClose={handleCancel}\n title={renderHeader()}\n footer={renderFooter()}\n transitionName={getTransitionName('kubed', 'zoom', props.transitionName)}\n maskTransitionName={getTransitionName('kubed', 'fade', props.maskTransitionName)}\n />\n );\n});\n\nModal.displayName = 'kubed/components/Modal';\n\nexport default Modal;\n"],"names":[],"mappings":";;;;;;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzC,IAAI,iBAAiB,GAAG,MAAM,CAAC,yBAAyB,CAAC;A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sB,EAAE,QAAQ,EAAE,CAAC;AAC1E,IAAI,sBAAsB;AAC1B,IAAI,OAAO,EAAE,eAAe;AAC5B,IAAI,KAAK;AACT,IAAI,SAAS,EAAE,eAAe;AAC9B,IAAI,OAAO,EAAE,YAAY;AACzB,IAAI,KAAK,EAAE,YAAY,EAAE;AACzB,IAAI,MAAM,EAAE,YAAY,EAAE;AAC1B,IAAI,cAAc,EAAE,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC;AAC5E,IAAI,kBAAkB,EAAE,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,kBAAkB,CAAC;AACpF,GAAG,CAAC,CAAC,CAAC;AACN,CAAC,CAAC,CAAC;AACH,KAAK,CAAC,WAAW,GAAG,wBAAwB,CAAC;AAC7C,cAAe,KAAK;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createContext as
|
|
1
|
+
import{createContext as t,useContext as e}from"react";const o=t({open:()=>null,confirm:()=>null}),n=()=>e(o);export{o as ModalContext,n as useModal};
|
|
2
2
|
//# sourceMappingURL=ModalContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalContext.js","sources":["../../../src/Modal/ModalProvider/ModalContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\nimport { ModalFuncProps } from '../Modal';\n\nexport interface IModalContext {\n open
|
|
1
|
+
{"version":3,"file":"ModalContext.js","sources":["../../../src/Modal/ModalProvider/ModalContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\nimport { ModalFuncProps } from '../Modal';\n\nexport interface IModalContext {\n open(config: ModalFuncProps, type?: string): void;\n confirm(config: ModalFuncProps): void;\n}\n\nexport const ModalContext = createContext<IModalContext>({\n open: () => null,\n confirm: () => null,\n});\n\nexport const useModal = (): IModalContext => useContext<IModalContext>(ModalContext);\n"],"names":[],"mappings":";;AACY,MAAC,YAAY,GAAG,aAAa,CAAC;AAC1C,EAAE,IAAI,EAAE,MAAM,IAAI;AAClB,EAAE,OAAO,EAAE,MAAM,IAAI;AACrB,CAAC,EAAE;AACS,MAAC,QAAQ,GAAG,MAAM,UAAU,CAAC,YAAY;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import s,{createRef as
|
|
1
|
+
import s,{createRef as O}from"react";import{useQueue as y,randomId as g}from"@kubed/hooks";import{ModalContext as j}from"./ModalContext.js";import w from"../Modal.js";import b from"../ConfirmDialog/ConfirmDialog.js";var C=Object.defineProperty,D=Object.defineProperties,E=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,M=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,m=(o,r,t)=>r in o?C(o,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[r]=t,c=(o,r)=>{for(var t in r||(r={}))M.call(r,t)&&m(o,t,r[t]);if(l)for(var t of l(r))h.call(r,t)&&m(o,t,r[t]);return o},p=(o,r)=>D(o,E(r));function x({children:o}){const{state:r,update:t}=y({initialValues:[],limit:5}),_=(e,a)=>{a.current.close(),setTimeout(()=>{t(n=>n.filter(i=>i.id!==e))},300)},f=(e,a)=>{const n=e.id||g();return t(i=>{if(e.id&&i.some(P=>P.id===e.id))return i;const u=O(),v=()=>{_(n,u)};return[...i,p(c({onCancel:v,ref:u,type:a},e),{id:n,visible:!0})]}),n},d=e=>f(e,"confirm");return s.createElement(j.Provider,{value:{open:f,confirm:d}},o,r.map(e=>e.type?s.createElement(b,p(c({},e),{key:e.id})):s.createElement(w,p(c({},e),{key:e.id}),e.content)))}export{x as ModalProvider};
|
|
2
2
|
//# sourceMappingURL=ModalProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalProvider.js","sources":["../../../src/Modal/ModalProvider/ModalProvider.tsx"],"sourcesContent":["import React, { createRef, PropsWithChildren } from 'react';\nimport { useQueue, randomId } from '@kubed/hooks';\nimport { ModalContext } from './ModalContext';\nimport Modal, { ModalFuncProps, ModalType } from '../Modal';\nimport ConfirmDialog from '../ConfirmDialog/ConfirmDialog';\n\ninterface Props {}\n\nexport function ModalProvider({ children }: PropsWithChildren<Props>) {\n const { state: modalState, update } = useQueue<ModalFuncProps>({\n initialValues: [],\n limit: 5,\n });\n\n const close = (id: string, ref: React.RefObject<any>) => {\n ref.current.close();\n setTimeout(() => {\n update((modals) => {\n return modals.filter((modal) => {\n return modal.id !== id;\n });\n });\n }, 300);\n };\n\n const open = (modal: ModalFuncProps, type?: ModalType) => {\n const id = modal.id || randomId();\n\n update((modals) => {\n if (modal.id && modals.some((n) => n.id === modal.id)) {\n return modals;\n }\n\n const ref = createRef();\n\n const onCancel = () => {\n close(id, ref);\n };\n\n return [...modals, { onCancel, ref, type, ...modal, id, visible: true }];\n });\n\n return id;\n };\n\n const confirm = (modal: ModalFuncProps) => {\n return open(modal, 'confirm');\n };\n\n return (\n <ModalContext.Provider value={{ open, confirm }}>\n {children}\n {modalState.map((modal) => {\n if (!modal.type) {\n return <Modal {...modal}
|
|
1
|
+
{"version":3,"file":"ModalProvider.js","sources":["../../../src/Modal/ModalProvider/ModalProvider.tsx"],"sourcesContent":["import React, { createRef, PropsWithChildren } from 'react';\nimport { useQueue, randomId } from '@kubed/hooks';\nimport { ModalContext } from './ModalContext';\nimport Modal, { ModalFuncProps, ModalType } from '../Modal';\nimport ConfirmDialog from '../ConfirmDialog/ConfirmDialog';\n\ninterface Props {}\n\nexport function ModalProvider({ children }: PropsWithChildren<Props>) {\n const { state: modalState, update } = useQueue<ModalFuncProps>({\n initialValues: [],\n limit: 5,\n });\n\n const close = (id: string, ref: React.RefObject<any>) => {\n ref.current.close();\n setTimeout(() => {\n update((modals) => {\n return modals.filter((modal) => {\n return modal.id !== id;\n });\n });\n }, 300);\n };\n\n const open = (modal: ModalFuncProps, type?: ModalType) => {\n const id = modal.id || randomId();\n\n update((modals) => {\n if (modal.id && modals.some((n) => n.id === modal.id)) {\n return modals;\n }\n\n const ref = createRef();\n\n const onCancel = () => {\n close(id, ref);\n };\n\n return [...modals, { onCancel, ref, type, ...modal, id, visible: true }];\n });\n\n return id;\n };\n\n const confirm = (modal: ModalFuncProps) => {\n return open(modal, 'confirm');\n };\n\n return (\n <ModalContext.Provider value={{ open, confirm }}>\n {children}\n {modalState.map((modal) => {\n if (!modal.type) {\n return (\n <Modal {...modal} key={modal.id}>\n {modal.content}\n </Modal>\n );\n }\n return <ConfirmDialog {...modal} key={modal.id} />;\n })}\n </ModalContext.Provider>\n );\n}\n"],"names":[],"mappings":";;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzC,IAAI,iBAAiB,GAAG,MAAM,CAAC,yBAAyB,CAAC;AACzD,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAAI,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AAC/B,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AAChC,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAClC,MAAM,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACxC,EAAE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a,CAAC,cAAc,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE;AACvG,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE;AACnB,KAAK,CAAC,CAAC,CAAC;AACR,GAAG,CAAC,CAAC,CAAC;AACN;;;;"}
|
package/esm/Popover/Popover.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import n from"react";import i from"styled-components";import{Tooltip as
|
|
1
|
+
import n from"react";import i from"styled-components";import{Tooltip as u}from"../Tooltip/Tooltip.js";import{addColorAlpha as h}from"../utils/color.js";var w=Object.defineProperty,y=Object.defineProperties,b=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,c=(e,t,r)=>t in e?w(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g=(e,t)=>{for(var r in t||(t={}))l.call(t,r)&&c(e,r,t[r]);if(a)for(var r of a(t))p.call(t,r)&&c(e,r,t[r]);return e},x=(e,t)=>y(e,b(t)),j=(e,t)=>{var r={};for(var o in e)l.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&a)for(var o of a(e))t.indexOf(o)<0&&p.call(e,o)&&(r[o]=e[o]);return r};const E=i("div")`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
|
-
|
|
4
|
+
${({$width:e})=>e?`width: ${e}px`:null};
|
|
5
|
+
`,C=i.div`
|
|
5
6
|
font-weight: 600;
|
|
6
7
|
font-size: ${({theme:e})=>e.font.fontSizeBase};
|
|
7
|
-
`,
|
|
8
|
-
color: ${({theme:e})=>
|
|
9
|
-
`;function
|
|
8
|
+
`,N=i.div`
|
|
9
|
+
color: ${({theme:e})=>h(e.palette.background,.7)};
|
|
10
|
+
`;function s(e){var t=e,{title:r,children:o,maxWidth:f="264px",width:d,interactive:m=!0,content:v,contentClassName:_}=t,P=j(t,["title","children","maxWidth","width","interactive","content","contentClassName"]);const O=n.createElement(E,{$width:d,className:_},r&&n.createElement(C,null,r),n.createElement(N,null,v));return n.createElement(u,x(g({},P),{content:O,interactive:m,maxWidth:f}),o)}s.displayName="@kubed/components/Popover";export{s as Popover};
|
|
10
11
|
//# sourceMappingURL=Popover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.js","sources":["../../src/Popover/Popover.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { Tooltip, TooltipProps } from '../Tooltip/Tooltip';\nimport { addColorAlpha } from '../utils/color';\n\nconst PopoverWrapper = styled
|
|
1
|
+
{"version":3,"file":"Popover.js","sources":["../../src/Popover/Popover.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { Tooltip, TooltipProps } from '../Tooltip/Tooltip';\nimport { addColorAlpha } from '../utils/color';\n\ninterface WrapperProps {\n $width?: number;\n}\n\nconst PopoverWrapper = styled('div')<WrapperProps>`\n display: flex;\n flex-direction: column;\n ${({ $width }) => ($width ? `width: ${$width}px` : null)};\n`;\n\nconst PopoverTitle = styled.div`\n font-weight: 600;\n font-size: ${({ theme }) => theme.font.fontSizeBase};\n`;\n\nconst PopoverContent = styled.div`\n color: ${({ theme }) => addColorAlpha(theme.palette.background, 0.7)};\n`;\n\nexport interface PopoverProps extends TooltipProps {\n title?: string;\n width?: number;\n contentClassName?: string;\n}\n\nexport function Popover({\n title,\n children,\n maxWidth = '264px',\n width,\n interactive = true,\n content,\n contentClassName,\n ...rest\n}: PopoverProps) {\n const popContent = (\n <PopoverWrapper $width={width} className={contentClassName}>\n {title && <PopoverTitle>{title}</PopoverTitle>}\n <PopoverContent>{content}</PopoverContent>\n </PopoverWrapper>\n );\n\n return (\n <Tooltip {...rest} content={popContent} interactive={interactive} maxWidth={maxWidth}>\n {children}\n </Tooltip>\n );\n}\n\nPopover.displayName = '@kubed/components/Popover';\n"],"names":[],"mappings":";;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CA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CAAC,CAAC;AACvE,CAAC,CAAC;AACK,SAAS,OAAO,CAAC,EAAE,EAAE;AAC5B,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;AACf,IAAI,KAAK;AACT,IAAI,QAAQ;AACZ,IAAI,QAAQ,GAAG,OAAO;AACtB,IAAI,KAAK;AACT,IAAI,WAAW,GAAG,IAAI;AACtB,IAAI,OAAO;AACX,IAAI,gBAAgB;AACpB,GAAG,GAAG,EAAE,EAAE,IAAI,GAAG,SAAS,CAAC,EAAE,EAAE;AAC/B,IAAI,OAAO;AACX,IAAI,UAAU;AACd,IAAI,UAAU;AACd,IAAI,OAAO;AACX,IAAI,aAAa;AACjB,IAAI,SAAS;AACb,IAAI,kBAAkB;AACtB,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,UAAU,mBAAmB,KAAK,CAAC,aAAa,CAAC,cAAc,EAAE;AACzE,IAAI,MAAM,EAAE,KAAK;AACjB,IAAI,SAAS,EAAE,gBAAgB;AAC/B,GAAG,EAAE,KAAK,oBAAoB,KAAK,CAAC,aAAa,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,CAAC,kBAAkB,KAAK,CAAC,aAAa,CAAC,cAAc,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;AAClJ,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE;AAC9F,IAAI,OAAO,EAAE,UAAU;AACvB,IAAI,WAAW;AACf,IAAI,QAAQ;AACZ,GAAG,CAAC,EAAE,QAAQ,CAAC,CAAC;AAChB,CAAC;AACD,OAAO,CAAC,WAAW,GAAG,2BAA2B;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DefaultProps } from '../theme';
|
|
3
|
+
export interface ActionConfirmProps extends DefaultProps {
|
|
4
|
+
visible: boolean;
|
|
5
|
+
/** text of ok button */
|
|
6
|
+
okText?: React.ReactNode;
|
|
7
|
+
/** text of cancel button */
|
|
8
|
+
cancelText?: React.ReactNode;
|
|
9
|
+
/** Specify a function that will be called when a user clicks the OK button */
|
|
10
|
+
onOk?: () => void;
|
|
11
|
+
/** Specify a function that will be called when a user clicks the OK button */
|
|
12
|
+
onCancel?: () => void;
|
|
13
|
+
confirmLoading?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const ActionConfirm: import("../utils/types").ComponentWithAs<null, ActionConfirmProps>;
|
|
16
|
+
//# sourceMappingURL=ActionConfirm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionConfirm.d.ts","sourceRoot":"","sources":["../../../src/ActionConfirm/ActionConfirm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AA+DxC,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,OAAO,EAAE,OAAO,CAAC;IAEjB,wBAAwB;IACxB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB,4BAA4B;IAC5B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE7B,8EAA8E;IAC9E,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC;IAElB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAEtB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,aAAa,oEAuBzB,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { KubedNumberSize, KubedSizes, KubedTheme } from '../theme';
|
|
2
2
|
interface ButtonStylesProps {
|
|
3
3
|
$loading?: boolean;
|
|
4
|
-
size?: KubedSizes;
|
|
4
|
+
$size?: KubedSizes;
|
|
5
5
|
$radius?: KubedNumberSize;
|
|
6
6
|
theme?: KubedTheme;
|
|
7
7
|
block?: boolean;
|
|
8
8
|
disabled?: boolean;
|
|
9
|
-
shadow?: boolean;
|
|
10
|
-
variant?: 'filled' | 'outline' | 'text' | 'link';
|
|
9
|
+
$shadow?: boolean;
|
|
10
|
+
$variant?: 'filled' | 'outline' | 'text' | 'link';
|
|
11
11
|
$color?: string | 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error';
|
|
12
12
|
}
|
|
13
13
|
export declare const ButtonContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, ButtonStylesProps, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.styles.d.ts","sourceRoot":"","sources":["../../../src/Button/Button.styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGnE,UAAU,iBAAiB;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,
|
|
1
|
+
{"version":3,"file":"Button.styles.d.ts","sourceRoot":"","sources":["../../../src/Button/Button.styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGnE,UAAU,iBAAiB;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;IAClD,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;CACzF;AAgND,eAAO,MAAM,eAAe,wHAgB3B,CAAC;AAEF,eAAO,MAAM,WAAW,wHAKvB,CAAC;AAEF,eAAO,MAAM,WAAW,yHAKvB,CAAC;AAEF,eAAO,MAAM,YAAY,yHAIxB,CAAC;AAEF,eAAO,MAAM,aAAa,yHAIzB,CAAC"}
|
|
@@ -17,6 +17,8 @@ export interface DividerProps extends DefaultProps {
|
|
|
17
17
|
variant?: 'solid' | 'dashed' | 'dotted';
|
|
18
18
|
/** Top and bottom margins for horizontal variant, left and right for vertical, xs, sm, md, lg, xl for value from theme.spacing, number for margins in px */
|
|
19
19
|
margins?: KubedNumberSize;
|
|
20
|
+
/** Divider height, only available if direction is vertical */
|
|
21
|
+
height?: number;
|
|
20
22
|
}
|
|
21
23
|
export declare const Divider: import("../utils/types").ComponentWithAs<"hr", DividerProps>;
|
|
22
24
|
//# sourceMappingURL=Divider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../src/Divider/Divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGzD,MAAM,WAAW,YAAa,SAAQ,YAAY;IAChD,qGAAqG;IACrG,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,qBAAqB;IACrB,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IAEtC,iEAAiE;IACjE,IAAI,CAAC,EAAE,eAAe,CAAC;IAEvB,qDAAqD;IACrD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAExB,qBAAqB;IACrB,aAAa,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IAE5C,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEjC,0BAA0B;IAC1B,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAExC,4JAA4J;IAC5J,OAAO,CAAC,EAAE,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../src/Divider/Divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGzD,MAAM,WAAW,YAAa,SAAQ,YAAY;IAChD,qGAAqG;IACrG,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,qBAAqB;IACrB,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IAEtC,iEAAiE;IACjE,IAAI,CAAC,EAAE,eAAe,CAAC;IAEvB,qDAAqD;IACrD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAExB,qBAAqB;IACrB,aAAa,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IAE5C,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEjC,0BAA0B;IAC1B,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAExC,4JAA4J;IAC5J,OAAO,CAAC,EAAE,eAAe,CAAC;IAE1B,8DAA8D;IAC9D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,OAAO,8DA0CnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.styles.d.ts","sourceRoot":"","sources":["../../../src/Input/Input.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,UAAU,UAAU;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"Input.styles.d.ts","sourceRoot":"","sources":["../../../src/Input/Input.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,UAAU,UAAU;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED,eAAO,MAAM,YAAY,iHA+CxB,CAAC;AAEF,eAAO,MAAM,aAAa,yGAIzB,CAAC;AAEF,eAAO,MAAM,aAAa,yGAIzB,CAAC;AAEF,eAAO,MAAM,UAAU,iHAiBtB,CAAC;AAEF,eAAO,MAAM,YAAY,yGAmBxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuButton.styles.d.ts","sourceRoot":"","sources":["../../../../src/Menu/MenuButton/MenuButton.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"MenuButton.styles.d.ts","sourceRoot":"","sources":["../../../../src/Menu/MenuButton/MenuButton.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,4GAoC7B,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DefaultProps } from '../../theme';
|
|
3
|
-
import { ComponentPassThrough } from '../../utils/types';
|
|
4
3
|
export interface MenuItemProps extends DefaultProps {
|
|
5
4
|
/** Item label */
|
|
6
5
|
children: React.ReactNode;
|
|
@@ -16,8 +15,5 @@ export interface MenuItemType {
|
|
|
16
15
|
props: MenuItemProps;
|
|
17
16
|
ref?: React.RefObject<HTMLButtonElement> | ((instance: HTMLButtonElement) => void);
|
|
18
17
|
}
|
|
19
|
-
export declare
|
|
20
|
-
export declare namespace MenuItem {
|
|
21
|
-
var displayName: string;
|
|
22
|
-
}
|
|
18
|
+
export declare const MenuItem: import("../../utils/types").ComponentWithAs<"button", MenuItemProps>;
|
|
23
19
|
//# sourceMappingURL=MenuItem.d.ts.map
|