@kubed/components 0.0.34 → 0.0.37
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 +22 -0
- package/cjs/Button/Button.styles.js +1 -0
- package/cjs/Button/Button.styles.js.map +1 -1
- package/cjs/Collapse/Collapse.js +2 -0
- package/cjs/Collapse/Collapse.js.map +1 -0
- package/cjs/Collapse/Collapse.styles.js +12 -0
- package/cjs/Collapse/Collapse.styles.js.map +1 -0
- package/cjs/Collapse/CollapsePanel.js +2 -0
- package/cjs/Collapse/CollapsePanel.js.map +1 -0
- package/cjs/Entity/Entity.js +1 -1
- package/cjs/Entity/Entity.js.map +1 -1
- package/cjs/Loading/Loading.js +1 -12
- package/cjs/Loading/Loading.js.map +1 -1
- package/cjs/Loading/loaders/Circle.js +13 -0
- package/cjs/Loading/loaders/Circle.js.map +1 -0
- package/cjs/Loading/loaders/Oval.js +6 -0
- package/cjs/Loading/loaders/Oval.js.map +1 -0
- package/cjs/Progress/Progress.js +1 -1
- package/cjs/Progress/Progress.js.map +1 -1
- package/cjs/Steps/Step/Step.js +2 -0
- package/cjs/Steps/Step/Step.js.map +1 -0
- package/cjs/Steps/Step/Step.styles.js +59 -0
- package/cjs/Steps/Step/Step.styles.js.map +1 -0
- package/cjs/Steps/StepCompleted/StepCompleted.js +2 -0
- package/cjs/Steps/StepCompleted/StepCompleted.js.map +1 -0
- package/cjs/Steps/Steps.js +2 -0
- package/cjs/Steps/Steps.js.map +1 -0
- package/cjs/Steps/Steps.styles.js +48 -0
- package/cjs/Steps/Steps.styles.js.map +1 -0
- package/cjs/Steps/TabStep/TabStep.js +2 -0
- package/cjs/Steps/TabStep/TabStep.js.map +1 -0
- package/cjs/Steps/TabStep/TabStep.styles.js +84 -0
- package/cjs/Steps/TabStep/TabStep.styles.js.map +1 -0
- package/cjs/Tag/Tag.js +13 -4
- package/cjs/Tag/Tag.js.map +1 -1
- package/cjs/TypeSelect/TypeSelect.js +2 -0
- package/cjs/TypeSelect/TypeSelect.js.map +1 -0
- package/cjs/TypeSelect/TypeSelect.styles.js +52 -0
- package/cjs/TypeSelect/TypeSelect.styles.js.map +1 -0
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/utils/motion.js +1 -1
- package/cjs/utils/motion.js.map +1 -1
- package/cjs/utils/reactNode.js +2 -0
- package/cjs/utils/reactNode.js.map +1 -0
- package/cjs/utils/toArray.js.map +1 -1
- package/cjs/utils/types.js.map +1 -1
- package/esm/Button/Button.styles.js +2 -1
- package/esm/Button/Button.styles.js.map +1 -1
- package/esm/Collapse/Collapse.js +2 -0
- package/esm/Collapse/Collapse.js.map +1 -0
- package/esm/Collapse/Collapse.styles.js +12 -0
- package/esm/Collapse/Collapse.styles.js.map +1 -0
- package/esm/Collapse/CollapsePanel.js +2 -0
- package/esm/Collapse/CollapsePanel.js.map +1 -0
- package/esm/Entity/Entity.js +3 -3
- package/esm/Entity/Entity.js.map +1 -1
- package/esm/Loading/Loading.js +1 -12
- package/esm/Loading/Loading.js.map +1 -1
- package/esm/Loading/loaders/Circle.js +13 -0
- package/esm/Loading/loaders/Circle.js.map +1 -0
- package/esm/Loading/loaders/Oval.js +6 -0
- package/esm/Loading/loaders/Oval.js.map +1 -0
- package/esm/Progress/Progress.js +1 -1
- package/esm/Progress/Progress.js.map +1 -1
- package/esm/Steps/Step/Step.js +2 -0
- package/esm/Steps/Step/Step.js.map +1 -0
- package/esm/Steps/Step/Step.styles.js +59 -0
- package/esm/Steps/Step/Step.styles.js.map +1 -0
- package/esm/Steps/StepCompleted/StepCompleted.js +2 -0
- package/esm/Steps/StepCompleted/StepCompleted.js.map +1 -0
- package/esm/Steps/Steps.js +2 -0
- package/esm/Steps/Steps.js.map +1 -0
- package/esm/Steps/Steps.styles.js +48 -0
- package/esm/Steps/Steps.styles.js.map +1 -0
- package/esm/Steps/TabStep/TabStep.js +2 -0
- package/esm/Steps/TabStep/TabStep.js.map +1 -0
- package/esm/Steps/TabStep/TabStep.styles.js +84 -0
- package/esm/Steps/TabStep/TabStep.styles.js.map +1 -0
- package/esm/Tag/Tag.js +18 -9
- package/esm/Tag/Tag.js.map +1 -1
- package/esm/TypeSelect/TypeSelect.js +2 -0
- package/esm/TypeSelect/TypeSelect.js.map +1 -0
- package/esm/TypeSelect/TypeSelect.styles.js +52 -0
- package/esm/TypeSelect/TypeSelect.styles.js.map +1 -0
- package/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/esm/utils/motion.js +1 -1
- package/esm/utils/motion.js.map +1 -1
- package/esm/utils/reactNode.js +2 -0
- package/esm/utils/reactNode.js.map +1 -0
- package/esm/utils/toArray.js.map +1 -1
- package/esm/utils/types.js.map +1 -1
- package/lib/src/Button/Button.styles.d.ts.map +1 -1
- package/lib/src/Collapse/Collapse.d.ts +37 -0
- package/lib/src/Collapse/Collapse.d.ts.map +1 -0
- package/lib/src/Collapse/Collapse.styles.d.ts +3 -0
- package/lib/src/Collapse/Collapse.styles.d.ts.map +1 -0
- package/lib/src/Collapse/CollapsePanel.d.ts +19 -0
- package/lib/src/Collapse/CollapsePanel.d.ts.map +1 -0
- package/lib/src/Entity/Entity.d.ts.map +1 -1
- package/lib/src/Loading/Loading.d.ts +10 -2
- package/lib/src/Loading/Loading.d.ts.map +1 -1
- package/lib/src/Loading/loaders/Circle.d.ts +12 -0
- package/lib/src/Loading/loaders/Circle.d.ts.map +1 -0
- package/lib/src/Loading/loaders/Oval.d.ts +4 -0
- package/lib/src/Loading/loaders/Oval.d.ts.map +1 -0
- package/lib/src/Progress/Progress.d.ts.map +1 -1
- package/lib/src/ShowMore/ShowMore.d.ts +18 -0
- package/lib/src/ShowMore/ShowMore.d.ts.map +1 -0
- package/lib/src/Slider/Slider.d.ts.map +1 -1
- package/lib/src/Steps/Step/Step.d.ts +38 -0
- package/lib/src/Steps/Step/Step.d.ts.map +1 -0
- package/lib/src/Steps/Step/Step.styles.d.ts +8 -0
- package/lib/src/Steps/Step/Step.styles.d.ts.map +1 -0
- package/lib/src/Steps/StepCompleted/StepCompleted.d.ts +10 -0
- package/lib/src/Steps/StepCompleted/StepCompleted.d.ts.map +1 -0
- package/lib/src/Steps/Steps.d.ts +37 -0
- package/lib/src/Steps/Steps.d.ts.map +1 -0
- package/lib/src/Steps/Steps.styles.d.ts +10 -0
- package/lib/src/Steps/Steps.styles.d.ts.map +1 -0
- package/lib/src/Steps/TabStep/TabStep.d.ts +42 -0
- package/lib/src/Steps/TabStep/TabStep.d.ts.map +1 -0
- package/lib/src/Steps/TabStep/TabStep.styles.d.ts +8 -0
- package/lib/src/Steps/TabStep/TabStep.styles.d.ts.map +1 -0
- package/lib/src/Tag/Tag.d.ts +8 -1
- package/lib/src/Tag/Tag.d.ts.map +1 -1
- package/lib/src/TypeSelect/TypeSelect.d.ts +20 -0
- package/lib/src/TypeSelect/TypeSelect.d.ts.map +1 -0
- package/lib/src/TypeSelect/TypeSelect.styles.d.ts +10 -0
- package/lib/src/TypeSelect/TypeSelect.styles.d.ts.map +1 -0
- package/lib/src/index.d.ts +3 -0
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/utils/reactNode.d.ts +8 -0
- package/lib/src/utils/reactNode.d.ts.map +1 -0
- package/lib/src/utils/toArray.d.ts.map +1 -1
- package/lib/src/utils/types.d.ts +3 -0
- package/lib/src/utils/types.d.ts.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -1
package/esm/Tag/Tag.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","sources":["../../src/Tag/Tag.tsx"],"sourcesContent":["import React from 'react';\nimport styled, { css } from 'styled-components';\nimport forwardRef from '../utils/forwardRef';\nimport { DefaultProps, KubedTheme, themeUtils } from '../theme';\n\nconst colorMap = {\n default: {\n color: 'background',\n background: 'accents_8',\n },\n primary: {\n color: 'green4',\n background: 'green0',\n },\n success: {\n color: 'green4',\n background: 'green0',\n },\n secondary: {\n color: 'accents_7',\n background: 'accents_2',\n },\n warning: {\n color: 'yellow4',\n background: 'yellow0',\n },\n error: {\n color: 'red4',\n background: 'red0',\n },\n info: {\n color: 'blue4',\n background: 'blue0',\n },\n};\n\nconst getColor = (color = 'default', theme: KubedTheme) => {\n const colorValue = themeUtils.getColor(colorMap[color].color, theme);\n const background = themeUtils.getColor(colorMap[color].background, theme);\n\n return css`\n background-color: ${background};\n color: ${colorValue};\n `;\n};\n\nconst TagWrapper = styled('div')<TagProps>`\n display: inline-flex;\n align-items: center;\n padding: ${({ title }) => (title ? '0 6px 0 2px' : '0 4px')};\n line-height: 20px;\n border-radius: ${({ title })
|
|
1
|
+
{"version":3,"file":"Tag.js","sources":["../../src/Tag/Tag.tsx"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport styled, { css } from 'styled-components';\nimport { Close } from '@kubed/icons';\nimport forwardRef from '../utils/forwardRef';\nimport { DefaultProps, KubedTheme, KubedNumberSize, themeUtils } from '../theme';\nimport { addColorAlpha } from '../utils/color';\n\nconst colorMap = {\n default: {\n color: 'background',\n background: 'accents_8',\n },\n primary: {\n color: 'green4',\n background: 'green0',\n },\n success: {\n color: 'green4',\n background: 'green0',\n },\n secondary: {\n color: 'accents_7',\n background: 'accents_2',\n },\n warning: {\n color: 'yellow4',\n background: 'yellow0',\n },\n error: {\n color: 'red4',\n background: 'red0',\n },\n info: {\n color: 'blue4',\n background: 'blue0',\n },\n};\n\nconst getColor = (color = 'default', theme: KubedTheme) => {\n const colorValue = themeUtils.getColor(colorMap[color].color, theme);\n const background = themeUtils.getColor(colorMap[color].background, theme);\n\n return css`\n background-color: ${background};\n color: ${colorValue};\n `;\n};\n\nconst TagWrapper = styled('div')<TagProps>`\n display: inline-flex;\n align-items: center;\n padding: ${({ title }) => (title ? '0 6px 0 2px' : '0 4px')};\n line-height: 20px;\n border-radius: ${({ title, radius, theme }) =>\n radius ? themeUtils.getSizeValue(radius, theme.layout.radius) : title ? '3px' : '2px'};\n word-break: break-all;\n white-space: normal;\n font-weight: 600;\n ${({ color, theme }) => getColor(color, theme)};\n\n .tag-close {\n margin-left: 6px;\n cursor: pointer;\n border-radius: 3px;\n &:hover {\n background-color: ${({ theme }) => addColorAlpha(theme.palette.accents_6, 0.6)};\n }\n }\n`;\n\nconst TagTitle = styled('span')`\n display: inline-flex;\n padding: 0 6px;\n margin: 2px 6px 2px 0;\n line-height: 16px;\n color: ${({ theme }) => theme.palette.background};\n background-color: ${({ theme }) => theme.palette.accents_7};\n border-radius: 1px;\n font-weight: 500;\n`;\n\nexport interface TagProps extends DefaultProps {\n /** Title of the tag */\n title?: React.ReactNode;\n\n /** Style of title */\n titleStyle?: React.CSSProperties;\n\n /** Tag color from theme */\n color?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info' | string;\n\n /** Append element of the tag */\n append?: React.ReactNode;\n\n /** Prepend element of the tag */\n prepend?: React.ReactNode;\n\n /** Radius of the tag */\n radius?: KubedNumberSize;\n\n visible?: boolean;\n\n closable?: boolean;\n\n onClose?: (e: React.MouseEvent<SVGElement>) => void;\n}\n\nexport const Tag = forwardRef<TagProps, 'div'>(\n (\n { radius, title, titleStyle, color, onClose, children, prepend, append, closable, ...rest },\n ref\n ) => {\n const [visible, setVisible] = useState(true);\n\n useEffect(() => {\n if ('visible' in rest) {\n setVisible(rest.visible!);\n }\n }, [rest.visible]);\n\n const handleClose = (e: React.MouseEvent<SVGElement>) => {\n e.stopPropagation();\n onClose?.(e);\n\n if (e.defaultPrevented) {\n return;\n }\n if (!('visible' in rest)) {\n setVisible(false);\n }\n };\n\n if (!visible) return null;\n\n return (\n <TagWrapper ref={ref} radius={radius} title={title} color={color} {...rest}>\n {prepend}\n {title && <TagTitle style={titleStyle}>{title}</TagTitle>}\n {children}\n {append}\n {closable && <Close variant=\"light\" className=\"tag-close\" onClick={handleClose} />}\n </TagWrapper>\n );\n }\n);\n\nTag.displayName = '@kubed/components/Tag';\n"],"names":["React"],"mappings":";;;;;;;AAAA,IAAI,SAAS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AACd,IAAI,OAAO,IAAI,CAAC;AAChB,EAAE,uBAAuBA,cAAK,CAAC,aAAa,CAAC,UAAU,EAAE,cAAc,CAAC;AACxE,IAAI,GAAG;AACP,IAAI,MAAM;AACV,IAAI,KAAK;AACT,IAAI,KAAK;AACT,GAAG,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,oBAAoBA,cAAK,CAAC,aAAa,CAAC,QAAQ,EAAE;AAC5E,IAAI,KAAK,EAAE,UAAU;AACrB,GAAG,EAAE,KAAK,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,oBAAoBA,cAAK,CAAC,aAAa,CAAC,KAAK,EAAE;AACtF,IAAI,OAAO,EAAE,OAAO;AACpB,IAAI,SAAS,EAAE,WAAW;AAC1B,IAAI,OAAO,EAAE,WAAW;AACxB,GAAG,CAAC,CAAC,CAAC;AACN,CAAC,EAAE;AACH,GAAG,CAAC,WAAW,GAAG,uBAAuB;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import t,{useState as E,useEffect as V}from"react";import{isUndefined as k}from"lodash";import j from"classnames";import{ChevronDown as W}from"@kubed/icons";import{useClickOutside as _,useMergedRef as g}from"@kubed/hooks";import h from"../utils/forwardRef.js";import{Field as w}from"../Entity/Field.js";import{TypeSelectWrapper as F,ControlWrapper as N,DropdownWrapper as A,DropdownOption as I,DropdownArrow as M}from"./TypeSelect.styles.js";const y=h(({options:l,value:n,defaultValue:p,className:b,onChange:u},v)=>{const[o,a]=E(!1),C=_(()=>{a(!1)}),O=g(v,C),s=e=>k(e)?!1:l.some(r=>r.value===e),x=()=>s(n)?n:s(p)?p:l[0].value,[m,f]=E(x());V(()=>{s(n)&&f(n)},[n]);const R=()=>{const e=l.find(d=>d.value===m),{label:r,description:c,icon:i}=e;return t.createElement(N,{onClick:()=>{a(!o)},$expanded:o},t.createElement(w,{label:c,value:r,avatar:i}))},D=e=>{k(n)&&f(e.value),a(!1),u&&u(e.value,e)},S=()=>l.filter(r=>r.value!==m).map(r=>{const{label:c,description:i,icon:d,value:T}=r;return t.createElement(I,{key:T,onClick:()=>D(r)},t.createElement(w,{label:i,value:c,avatar:d}))});return t.createElement(F,{ref:O,className:j(b,{"is-expand":o})},R(),o&&t.createElement(A,null,S()),!o&&t.createElement(M,null,t.createElement(W,null)))});y.displayName="@kubed/components/TypeSelect";export{y as TypeSelect};
|
|
2
|
+
//# sourceMappingURL=TypeSelect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypeSelect.js","sources":["../../src/TypeSelect/TypeSelect.tsx"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport { isUndefined } from 'lodash';\nimport cx from 'classnames';\nimport { ChevronDown } from '@kubed/icons';\nimport { useClickOutside, useMergedRef } from '@kubed/hooks';\nimport { DefaultProps } from '../theme';\nimport forwardRef from '../utils/forwardRef';\nimport { Field } from '../Entity/Field';\nimport {\n TypeSelectWrapper,\n ControlWrapper,\n DropdownWrapper,\n DropdownOption,\n DropdownArrow,\n} from './TypeSelect.styles';\n\ninterface OptionProps {\n /** Field label */\n label: React.ReactNode;\n\n /** Field description */\n description?: React.ReactNode;\n\n value: React.ReactNode;\n\n /** Field avatar */\n icon?: React.ReactNode;\n}\n\nexport interface TypeSelectProps extends DefaultProps {\n value?: any;\n defaultValue?: any;\n options: OptionProps[];\n onChange?: (value: any, option: OptionProps) => void;\n}\n\nexport const TypeSelect = forwardRef<TypeSelectProps, 'div'>(\n ({ options, value, defaultValue, className, onChange }, ref) => {\n const [expanded, setExpanded] = useState(false);\n\n const useClickOutsideRef = useClickOutside(() => {\n setExpanded(false);\n });\n const mergedRef = useMergedRef(ref, useClickOutsideRef);\n\n const isValidValue = (v) => {\n if (isUndefined(v)) {\n return false;\n }\n return options.some((option) => option.value === v);\n };\n\n const getInitialValue = () => {\n if (isValidValue(value)) {\n return value;\n }\n if (isValidValue(defaultValue)) {\n return defaultValue;\n }\n return options[0].value;\n };\n\n const [_value, setValue] = useState(getInitialValue());\n\n useEffect(() => {\n if (isValidValue(value)) {\n setValue(value);\n }\n }, [value]);\n\n const renderControl = () => {\n const currentOption = options.find((option) => option.value === _value);\n const { label, description, icon } = currentOption;\n return (\n <ControlWrapper\n onClick={() => {\n setExpanded(!expanded);\n }}\n $expanded={expanded}\n >\n <Field label={description} value={label} avatar={icon} />\n </ControlWrapper>\n );\n };\n\n const onOptionClick = (option) => {\n if (isUndefined(value)) {\n setValue(option.value);\n }\n setExpanded(false);\n onChange && onChange(option.value, option);\n };\n\n const renderDropdown = () => {\n const dropdownOptions = options.filter((option) => option.value !== _value);\n return dropdownOptions.map((option) => {\n const { label, description, icon, value: optionValue } = option;\n return (\n // @ts-ignore\n <DropdownOption key={optionValue} onClick={() => onOptionClick(option)}>\n <Field label={description} value={label} avatar={icon} />\n </DropdownOption>\n );\n });\n };\n\n return (\n <TypeSelectWrapper ref={mergedRef} className={cx(className, { 'is-expand': expanded })}>\n {renderControl()}\n {expanded && <DropdownWrapper>{renderDropdown()}</DropdownWrapper>}\n {!expanded && (\n <DropdownArrow>\n <ChevronDown />\n </DropdownArrow>\n )}\n </TypeSelectWrapper>\n );\n }\n);\n\nTypeSelect.displayName = '@kubed/components/TypeSelect';\n"],"names":["React"],"mappings":";;;;;;;;;AAcY,MAAC,UAAU,GAAG,UAAU,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,GAAG,KAAK;AACrG,EAAE,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;AAClD,EAAE,MAAM,kBAAkB,GAAG,eAAe,CAAC,MAAM;AACnD,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC;AACvB,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAAC;AAC1D,EAAE,MAAM,YAAY,GAAG,CAAC,CAA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,EAAE,SAAS;AAClB,IAAI,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;AACvD,GAAG,EAAE,aAAa,EAAE,EAAE,QAAQ,oBAAoBA,cAAK,CAAC,aAAa,CAAC,eAAe,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,EAAE,CAAC,QAAQ,oBAAoBA,cAAK,CAAC,aAAa,CAAC,aAAa,EAAE,IAAI,kBAAkBA,cAAK,CAAC,aAAa,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAC/O,CAAC,EAAE;AACH,UAAU,CAAC,WAAW,GAAG,8BAA8B;;;;"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import r,{css as e}from"styled-components";const p=(o,t)=>o?e`
|
|
2
|
+
border-color: ${t.palette.accents_5};
|
|
3
|
+
border-bottom: 0;
|
|
4
|
+
border-bottom-right-radius: 0;
|
|
5
|
+
border-bottom-left-radius: 0;
|
|
6
|
+
transition: none;
|
|
7
|
+
background-color: ${t.palette.accents_1};
|
|
8
|
+
`:null,n=r("div")`
|
|
9
|
+
position: relative;
|
|
10
|
+
border-radius: 4px;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
`,d=r("div")`
|
|
13
|
+
border-radius: 4px;
|
|
14
|
+
border: 1px solid ${({theme:o})=>o.palette.border};
|
|
15
|
+
height: 64px;
|
|
16
|
+
padding: 12px 64px 12px 12px;
|
|
17
|
+
transition: all 0.3s ease-in-out;
|
|
18
|
+
|
|
19
|
+
&:hover {
|
|
20
|
+
border-color: ${({theme:o})=>o.palette.accents_5};
|
|
21
|
+
}
|
|
22
|
+
${({$expanded:o,theme:t})=>p(o,t)};
|
|
23
|
+
`,a=r.div`
|
|
24
|
+
position: absolute;
|
|
25
|
+
height: 16px;
|
|
26
|
+
top: 50%;
|
|
27
|
+
right: 12px;
|
|
28
|
+
transform: translateY(-50%);
|
|
29
|
+
&:hover {
|
|
30
|
+
background-color: ${({theme:o})=>o.palette.accents_1};
|
|
31
|
+
}
|
|
32
|
+
z-index: 999;
|
|
33
|
+
`,i=r.div`
|
|
34
|
+
position: absolute;
|
|
35
|
+
top: 63px;
|
|
36
|
+
left: 0px;
|
|
37
|
+
width: 100%;
|
|
38
|
+
border: 1px solid ${({theme:o})=>o.palette.accents_5};
|
|
39
|
+
border-radius: 4px;
|
|
40
|
+
border-top-right-radius: 0;
|
|
41
|
+
border-top-left-radius: 0;
|
|
42
|
+
border-top: 0;
|
|
43
|
+
background-color: ${({theme:o})=>o.palette.background};
|
|
44
|
+
//box-sizing: content-box;
|
|
45
|
+
`,s=r.div`
|
|
46
|
+
height: 64px;
|
|
47
|
+
padding: 12px 64px 12px 12px;
|
|
48
|
+
&:hover {
|
|
49
|
+
background-color: ${({theme:o})=>o.palette.accents_0};
|
|
50
|
+
}
|
|
51
|
+
`;export{d as ControlWrapper,a as DropdownArrow,s as DropdownOption,i as DropdownWrapper,n as TypeSelectWrapper};
|
|
52
|
+
//# sourceMappingURL=TypeSelect.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypeSelect.styles.js","sources":["../../src/TypeSelect/TypeSelect.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\n\ninterface ControlWrapperProps {\n $expanded: boolean;\n}\n\nconst getExpandedStyle = (expanded: boolean, theme) => {\n if (expanded) {\n return css`\n border-color: ${theme.palette.accents_5};\n border-bottom: 0;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n transition: none;\n background-color: ${theme.palette.accents_1};\n `;\n }\n return null;\n};\n\nexport const TypeSelectWrapper = styled('div')`\n position: relative;\n border-radius: 4px;\n cursor: pointer;\n`;\n\nexport const ControlWrapper = styled('div')<ControlWrapperProps>`\n border-radius: 4px;\n border: 1px solid ${({ theme }) => theme.palette.border};\n height: 64px;\n padding: 12px 64px 12px 12px;\n transition: all 0.3s ease-in-out;\n\n &:hover {\n border-color: ${({ theme }) => theme.palette.accents_5};\n }\n ${({ $expanded, theme }) => getExpandedStyle($expanded, theme)};\n`;\n\nexport const DropdownArrow = styled.div`\n position: absolute;\n height: 16px;\n top: 50%;\n right: 12px;\n transform: translateY(-50%);\n &:hover {\n background-color: ${({ theme }) => theme.palette.accents_1};\n }\n z-index: 999;\n`;\n\nexport const DropdownWrapper = styled.div`\n position: absolute;\n top: 63px;\n left: 0px;\n width: 100%;\n border: 1px solid ${({ theme }) => theme.palette.accents_5};\n border-radius: 4px;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n border-top: 0;\n background-color: ${({ theme }) => theme.palette.background};\n //box-sizing: content-box;\n`;\n\nexport const DropdownOption = styled.div`\n height: 64px;\n padding: 12px 64px 12px 12px;\n &:hover {\n background-color: ${({ theme }) => theme.palette.accents_0};\n }\n`;\n"],"names":[],"mappings":";;AACA,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,KAAK,KAAK;AAC9C,EAAE,IAAI,QAAQ,EAAE;AAChB,IAAI,OAAO,GAAG,CAAC;AACf,oBAAoB,EAAE,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AAC9C;AACA;AACA;AACA;AACA,wBAAwB,EAAE,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AAClD,IAAI,CAAC,CAAC;AACN,GAAG;AACH,EAAE,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AACU,MAAC,iBAAiB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAC/C;AACA;AACA;AACA,EAAE;AACU,MAAC,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5C;AACA,oBAAoB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;AAC1D;AACA;AACA;AACA;AACA;AACA,kBAAkB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AAC3D;AACA,EAAE,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,gBAAgB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;AACjE,EAAE;AACU,MAAC,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AAC/D;AACA;AACA,EAAE;AACU,MAAC,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC;AAC1C;AACA;AACA;AACA;AACA,oBAAoB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AAC7D;AACA;AACA;AACA;AACA,oBAAoB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC;AAC9D;AACA,EAAE;AACU,MAAC,cAAc,GAAG,MAAM,CAAC,GAAG,CAAC;AACzC;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AAC/D;AACA;;;;"}
|
package/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{KubedConfigProvider}from"./ConfigProvider/index.js";export{Button}from"./Button/Button.js";export{Group}from"./Group/Group.js";export{Container}from"./Container/Container.js";export{Center}from"./Center/Center.js";export{Row}from"./Grid/Row.js";export{Navs}from"./Navs/Navs.js";export{Snippet}from"./Snippet/Snippet.js";export{Tabs}from"./Tabs/Tabs.js";export{Text}from"./Text/Text.js";export{Tooltip}from"./Tooltip/Tooltip.js";export{Popover}from"./Popover/Popover.js";export{Divider}from"./Divider/Divider.js";export{Menu}from"./Menu/Menu.js";export{StatusDot}from"./StatusDot/StatusDot.js";export{Tag}from"./Tag/Tag.js";export{Badge}from"./Badge/Badge.js";export{Alert}from"./Alert/Alert.js";export{Card}from"./Card/Card.js";export{Descriptions}from"./Descriptions/Descriptions.js";export{Entity}from"./Entity/Entity.js";export{Dropdown}from"./Dropdown/Dropdown.js";export{Loading}from"./Loading/Loading.js";export{LoadingOverlay}from"./LoadingOverlay/LoadingOverlay.js";export{Input}from"./Input/Input.js";export{InputPassword}from"./InputPassword/InputPassword.js";export{FilterInput}from"./FilterInput/FilterInput.js";export{Empty}from"./Empty/Empty.js";export{Form}from"./Form/Form.js";export{Select}from"./Select/Select.js";export{Checkbox}from"./Checkbox/Checkbox.js";export{Radio}from"./Radio/Radio.js";export{Switch}from"./Switch/Switch.js";export{InputNumber}from"./InputNumber/InputNumber.js";export{DatePicker}from"./DatePicker/DatePicker.js";export{default as TimePicker}from"./TimePicker/TimePicker.js";export{Banner}from"./Banner/Banner.js";export{Notify}from"./Notify/Notify.js";export{AutoComplete}from"./AutoComplete/AutoComplete.js";export{ActionConfirm}from"./ActionConfirm/ActionConfirm.js";export{Progress}from"./Progress/Progress.js";export{addColorAlpha,colorToRgbValues}from"./utils/color.js";export{default as Drawer}from"./Drawer/Drawer.js";export{default as forwardRef}from"./utils/forwardRef.js";export{default as toArray}from"./utils/toArray.js";export{default as useForm}from"./Form/hooks/useForm.js";export{Col}from"./Grid/Col.js";export{Tab}from"./Tabs/Tab/Tab.js";export{MenuLabel}from"./Menu/MenuLabel/MenuLabel.js";export{MenuItem}from"./Menu/MenuItem/MenuItem.js";export{BadgeAnchor}from"./Badge/BadgeAnchor.js";export{Description}from"./Descriptions/Description.js";export{Field}from"./Entity/Field.js";export{Modal}from"./Modal/Modal.js";export{useModal}from"./Modal/ModalProvider/ModalContext.js";export{CheckboxGroup}from"./Checkbox/CheckboxGroup.js";export{RadioGroup}from"./Radio/RadioGroup.js";export{BannerTip}from"./Banner/BannerTip.js";export{default as notify}from"react-hot-toast";export{Slider}from"./Slider/Slider/Slider.js";export{RangeSlider}from"./Slider/RangeSlider/RangeSlider.js";export{default as CssBaseline}from"./theme/CssBaseline.js";export{useTheme}from"./theme/ThemeContext.js";export{default as themeUtils}from"./theme/utils.js";export{List as FormList}from"rc-field-form";export{FormItem}from"./Form/FormItem/FormItem.js";
|
|
1
|
+
export{KubedConfigProvider}from"./ConfigProvider/index.js";export{Button}from"./Button/Button.js";export{Group}from"./Group/Group.js";export{Container}from"./Container/Container.js";export{Center}from"./Center/Center.js";export{Row}from"./Grid/Row.js";export{Navs}from"./Navs/Navs.js";export{Snippet}from"./Snippet/Snippet.js";export{Tabs}from"./Tabs/Tabs.js";export{Text}from"./Text/Text.js";export{Tooltip}from"./Tooltip/Tooltip.js";export{Popover}from"./Popover/Popover.js";export{Divider}from"./Divider/Divider.js";export{Menu}from"./Menu/Menu.js";export{StatusDot}from"./StatusDot/StatusDot.js";export{Tag}from"./Tag/Tag.js";export{Badge}from"./Badge/Badge.js";export{Alert}from"./Alert/Alert.js";export{Card}from"./Card/Card.js";export{Descriptions}from"./Descriptions/Descriptions.js";export{Entity}from"./Entity/Entity.js";export{Dropdown}from"./Dropdown/Dropdown.js";export{Loading}from"./Loading/Loading.js";export{LoadingOverlay}from"./LoadingOverlay/LoadingOverlay.js";export{Input}from"./Input/Input.js";export{InputPassword}from"./InputPassword/InputPassword.js";export{FilterInput}from"./FilterInput/FilterInput.js";export{Empty}from"./Empty/Empty.js";export{Form}from"./Form/Form.js";export{Select}from"./Select/Select.js";export{Checkbox}from"./Checkbox/Checkbox.js";export{Radio}from"./Radio/Radio.js";export{Switch}from"./Switch/Switch.js";export{InputNumber}from"./InputNumber/InputNumber.js";export{DatePicker}from"./DatePicker/DatePicker.js";export{default as TimePicker}from"./TimePicker/TimePicker.js";export{Banner}from"./Banner/Banner.js";export{Notify}from"./Notify/Notify.js";export{AutoComplete}from"./AutoComplete/AutoComplete.js";export{ActionConfirm}from"./ActionConfirm/ActionConfirm.js";export{Progress}from"./Progress/Progress.js";export{addColorAlpha,colorToRgbValues}from"./utils/color.js";export{Steps}from"./Steps/Steps.js";export{TypeSelect}from"./TypeSelect/TypeSelect.js";export{default as Drawer}from"./Drawer/Drawer.js";export{default as Collapse}from"./Collapse/Collapse.js";export{default as forwardRef}from"./utils/forwardRef.js";export{default as toArray}from"./utils/toArray.js";export{default as useForm}from"./Form/hooks/useForm.js";export{Col}from"./Grid/Col.js";export{Tab}from"./Tabs/Tab/Tab.js";export{MenuLabel}from"./Menu/MenuLabel/MenuLabel.js";export{MenuItem}from"./Menu/MenuItem/MenuItem.js";export{BadgeAnchor}from"./Badge/BadgeAnchor.js";export{Description}from"./Descriptions/Description.js";export{Field}from"./Entity/Field.js";export{Modal}from"./Modal/Modal.js";export{useModal}from"./Modal/ModalProvider/ModalContext.js";export{CheckboxGroup}from"./Checkbox/CheckboxGroup.js";export{RadioGroup}from"./Radio/RadioGroup.js";export{BannerTip}from"./Banner/BannerTip.js";export{default as notify}from"react-hot-toast";export{Slider}from"./Slider/Slider/Slider.js";export{RangeSlider}from"./Slider/RangeSlider/RangeSlider.js";export{Step}from"./Steps/Step/Step.js";export{StepCompleted}from"./Steps/StepCompleted/StepCompleted.js";export{TabStep}from"./Steps/TabStep/TabStep.js";export{default as CssBaseline}from"./theme/CssBaseline.js";export{useTheme}from"./theme/ThemeContext.js";export{default as themeUtils}from"./theme/utils.js";export{List as FormList}from"rc-field-form";export{FormItem}from"./Form/FormItem/FormItem.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/esm/utils/motion.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const n=(e,t,
|
|
1
|
+
const o=()=>({height:0,opacity:0}),a=t=>{const{scrollHeight:e}=t;return{height:e,opacity:1}},r=t=>({height:t?t.offsetHeight:0}),n=(t,e)=>(e==null?void 0:e.deadline)===!0||e.propertyName==="height",c={motionName:"motion-collapse",onAppearStart:o,onEnterStart:o,onAppearActive:a,onEnterActive:a,onLeaveStart:r,onLeaveActive:o,onAppearEnd:n,onEnterEnd:n,onLeaveEnd:n,motionDeadline:500},p=(t,e,i)=>i!==void 0?i:`${t}-${e}`;export{c as default,p as getTransitionName};
|
|
2
2
|
//# sourceMappingURL=motion.js.map
|
package/esm/utils/motion.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"motion.js","sources":["../../src/utils/motion.ts"],"sourcesContent":["// https://github.com/ant-design/ant-design/blob/master/components/_util/motion.tsx\nimport { CSSMotionProps, MotionEventHandler, MotionEndEventHandler } from 'rc-motion';\nimport { MotionEvent } from 'rc-motion/lib/interface';\n\n// ================== Collapse Motion ==================\nconst getCollapsedHeight: MotionEventHandler = () => ({ height: 0, opacity: 0 });\nconst getRealHeight: MotionEventHandler = (node) => {\n const { scrollHeight } = node;\n return { height: scrollHeight, opacity: 1 };\n};\nconst getCurrentHeight: MotionEventHandler = (node) => ({ height: node ? node.offsetHeight : 0 });\nconst skipOpacityTransition: MotionEndEventHandler = (_, event: MotionEvent) =>\n event?.deadline === true || (event as TransitionEvent).propertyName === 'height';\n\nconst collapseMotion: CSSMotionProps = {\n motionName: '
|
|
1
|
+
{"version":3,"file":"motion.js","sources":["../../src/utils/motion.ts"],"sourcesContent":["// https://github.com/ant-design/ant-design/blob/master/components/_util/motion.tsx\nimport { CSSMotionProps, MotionEventHandler, MotionEndEventHandler } from 'rc-motion';\nimport { MotionEvent } from 'rc-motion/lib/interface';\n\n// ================== Collapse Motion ==================\nconst getCollapsedHeight: MotionEventHandler = () => ({ height: 0, opacity: 0 });\nconst getRealHeight: MotionEventHandler = (node) => {\n const { scrollHeight } = node;\n return { height: scrollHeight, opacity: 1 };\n};\nconst getCurrentHeight: MotionEventHandler = (node) => ({ height: node ? node.offsetHeight : 0 });\nconst skipOpacityTransition: MotionEndEventHandler = (_, event: MotionEvent) =>\n event?.deadline === true || (event as TransitionEvent).propertyName === 'height';\n\nconst collapseMotion: CSSMotionProps = {\n motionName: 'motion-collapse',\n onAppearStart: getCollapsedHeight,\n onEnterStart: getCollapsedHeight,\n onAppearActive: getRealHeight,\n onEnterActive: getRealHeight,\n onLeaveStart: getCurrentHeight,\n onLeaveActive: getCollapsedHeight,\n onAppearEnd: skipOpacityTransition,\n onEnterEnd: skipOpacityTransition,\n onLeaveEnd: skipOpacityTransition,\n motionDeadline: 500,\n};\n\nconst getTransitionName = (rootPrefixCls: string, motion: string, transitionName?: string) => {\n if (transitionName !== undefined) {\n return transitionName;\n }\n return `${rootPrefixCls}-${motion}`;\n};\nexport { getTransitionName };\nexport default collapseMotion;\n"],"names":[],"mappings":"AAAA,MAAM,kBAAkB,GAAG,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;AAC7D,MAAM,aAAa,GAAG,CAAC,IAAI,KAAK;AAChC,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC;AAChC,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;AAC9C,CAAC,CAAC;AACF,MAAM,gBAAgB,GAAG,CAAC,IAAI,MAAM,EAAE,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC,YAAY,GAAG,CAAC,EAAE,CAAC,CAAC;AAC9E,MAAM,qBAAqB,GAAG,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC,KAAK,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC,QAAQ,MAAM,IAAI,IAAI,KAAK,CAAC,YAAY,KAAK,QAAQ,CAAC;AAC7H,MAAC,cAAc,GAAG;AACvB,EAAE,UAAU,EAAE,iBAAiB;AAC/B,EAAE,aAAa,EAAE,kBAAkB;AACnC,EAAE,YAAY,EAAE,kBAAkB;AAClC,EAAE,cAAc,EAAE,aAAa;AAC/B,EAAE,aAAa,EAAE,aAAa;AAC9B,EAAE,YAAY,EAAE,gBAAgB;AAChC,EAAE,aAAa,EAAE,kBAAkB;AACnC,EAAE,WAAW,EAAE,qBAAqB;AACpC,EAAE,UAAU,EAAE,qBAAqB;AACnC,EAAE,UAAU,EAAE,qBAAqB;AACnC,EAAE,cAAc,EAAE,GAAG;AACrB,EAAE;AACG,MAAC,iBAAiB,GAAG,CAAC,aAAa,EAAE,MAAM,EAAE,cAAc,KAAK;AACrE,EAAE,IAAI,cAAc,KAAK,KAAK,CAAC,EAAE;AACjC,IAAI,OAAO,cAAc,CAAC;AAC1B,GAAG;AACH,EAAE,OAAO,CAAC,EAAE,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AACtC;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactNode.js","sources":["../../src/utils/reactNode.ts"],"sourcesContent":["import * as React from 'react';\n\nexport const { isValidElement } = React;\n\ntype AnyObject = Record<any, any>;\n\ntype RenderProps = undefined | AnyObject | ((originProps: AnyObject) => AnyObject | undefined);\n\nexport function replaceElement(\n element: React.ReactNode,\n replacement: React.ReactNode,\n props: RenderProps\n): React.ReactNode {\n if (!isValidElement(element)) return replacement;\n\n return React.cloneElement(\n element,\n typeof props === 'function' ? props(element.props || {}) : props\n );\n}\n\nexport function cloneElement(element: React.ReactNode, props?: RenderProps): React.ReactElement {\n return replaceElement(element, element, props) as React.ReactElement;\n}\n"],"names":[],"mappings":";;AACY,MAAC,EAAE,cAAc,EAAE,GAAG,MAAM;AACjC,SAAS,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE;AAC5D,EAAE,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;AAC9B,IAAI,OAAO,WAAW,CAAC;AACvB,EAAE,OAAO,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,KAAK,KAAK,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC;AACvG,CAAC;AACM,SAAS,YAAY,CAAC,OAAO,EAAE,KAAK,EAAE;AAC7C,EAAE,OAAO,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AACjD;;;;"}
|
package/esm/utils/toArray.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toArray.js","sources":["../../src/utils/toArray.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"toArray.js","sources":["../../src/utils/toArray.ts"],"sourcesContent":["// https://github.com/react-component/util/blob/master/src/Children/toArray.ts\nimport React from 'react';\nimport { isFragment } from 'react-is';\n\nexport interface Option {\n keepEmpty?: boolean;\n}\n\nexport default function toArray(\n children: React.ReactNode,\n option: Option = {}\n): React.ReactElement[] {\n let ret: React.ReactElement[] = [];\n\n React.Children.forEach(children, (child: any) => {\n if ((child === undefined || child === null) && !option.keepEmpty) {\n return;\n }\n\n if (Array.isArray(child)) {\n ret = ret.concat(toArray(child));\n } else if (isFragment(child) && child.props) {\n ret = ret.concat(toArray(child.props.children, option));\n } else {\n ret.push(child);\n }\n });\n\n return ret;\n}\n"],"names":["React"],"mappings":";;;AAEe,SAAS,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,EAAE,EAAE;AACvD,EAAE,IAAI,GAAG,GAAG,EAAE,CAAC;AACf,EAAEA,cAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,KAAK;AAC9C,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,IAAI,KAAK,KAAK,IAAI,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE;AACnE,MAAM,OAAO;AACb,KAAK;AACL,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC9B,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;AACvC,KAAK,MAAM,IAAI,UAAU,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,EAAE;AACjD,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AAC9D,KAAK,MAAM;AACX,MAAM,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACtB,KAAK;AACL,GAAG,CAAC,CAAC;AACL,EAAE,OAAO,GAAG,CAAC;AACb;;;;"}
|
package/esm/utils/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../src/utils/types.ts"],"sourcesContent":["import React from 'react';\n\nexport type DeepPartial<T> = {\n [P in keyof T]?: T[P] extends Record<string, any> ? DeepPartial<T[P]> : T[P];\n};\n\nexport const tuple = <T extends string[]>(...args: T) => args;\n\nexport type ComponentPassThrough<T extends React.ElementType, Props> = Props &\n React.ComponentPropsWithoutRef<T> & {\n /** Element or component that will be used as root element */\n component?: T;\n };\n\nexport type As<Props = any> = React.ElementType<Props>;\n\n/**\n * Extract the props of a React element or component\n */\nexport type PropsOf<T extends As> = React.ComponentPropsWithoutRef<T> & {\n as?: As;\n};\n\nexport type OmitCommonProps<Target, OmitAdditionalProps extends keyof any = never> = Omit<\n Target,\n 'transition' | 'as' | 'color' | OmitAdditionalProps\n>;\n\nexport type RightJoinProps<\n SourceProps extends object = {},\n OverrideProps extends object = {}\n> = OmitCommonProps<SourceProps, keyof OverrideProps> & OverrideProps;\n\nexport type MergeWithAs<\n ComponentProps extends object,\n AsProps extends object,\n AdditionalProps extends object = {},\n AsComponent extends As = As\n> = RightJoinProps<ComponentProps, AdditionalProps> &\n RightJoinProps<AsProps, AdditionalProps> & {\n as?: AsComponent;\n };\n\nexport type ComponentWithAs<Component extends As, Props extends object = {}> = {\n <AsComponent extends As>(\n props: MergeWithAs<\n React.ComponentProps<Component>,\n React.ComponentProps<AsComponent>,\n Props,\n AsComponent\n >\n ): JSX.Element;\n\n displayName?: string;\n propTypes?: React.WeakValidationMap<any>;\n contextTypes?: React.ValidationMap<any>;\n defaultProps?: Partial<any>;\n id?: string;\n};\n"],"names":[],"mappings":"AAAY,MAAC,KAAK,GAAG,CAAC,GAAG,IAAI,KAAK;;;;"}
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../src/utils/types.ts"],"sourcesContent":["import React from 'react';\n\nexport type DeepPartial<T> = {\n [P in keyof T]?: T[P] extends Record<string, any> ? DeepPartial<T[P]> : T[P];\n};\n\nexport const tuple = <T extends string[]>(...args: T) => args;\n\nexport type ComponentPassThrough<T extends React.ElementType, Props> = Props &\n React.ComponentPropsWithoutRef<T> & {\n /** Element or component that will be used as root element */\n component?: T;\n };\n\nexport type As<Props = any> = React.ElementType<Props>;\n\n/**\n * Extract the props of a React element or component\n */\nexport type PropsOf<T extends As> = React.ComponentPropsWithoutRef<T> & {\n as?: As;\n};\n\nexport type OmitCommonProps<Target, OmitAdditionalProps extends keyof any = never> = Omit<\n Target,\n 'transition' | 'as' | 'color' | OmitAdditionalProps\n>;\n\nexport type RightJoinProps<\n SourceProps extends object = {},\n OverrideProps extends object = {}\n> = OmitCommonProps<SourceProps, keyof OverrideProps> & OverrideProps;\n\nexport type MergeWithAs<\n ComponentProps extends object,\n AsProps extends object,\n AdditionalProps extends object = {},\n AsComponent extends As = As\n> = RightJoinProps<ComponentProps, AdditionalProps> &\n RightJoinProps<AsProps, AdditionalProps> & {\n as?: AsComponent;\n };\n\nexport type ComponentWithAs<Component extends As, Props extends object = {}> = {\n <AsComponent extends As>(\n props: MergeWithAs<\n React.ComponentProps<Component>,\n React.ComponentProps<AsComponent>,\n Props,\n AsComponent\n >\n ): JSX.Element;\n\n displayName?: string;\n propTypes?: React.WeakValidationMap<any>;\n contextTypes?: React.ValidationMap<any>;\n defaultProps?: Partial<any>;\n id?: string;\n};\n\nexport type ForwardRefWithStaticComponents<\n Props extends Record<string, any>,\n Static extends Record<string, any>\n> = ((props: Props) => React.ReactElement) &\n Static & {\n displayName: string;\n };\n"],"names":[],"mappings":"AAAY,MAAC,KAAK,GAAG,CAAC,GAAG,IAAI,KAAK;;;;"}
|
|
@@ -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,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,
|
|
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,wHAMvB,CAAC;AAEF,eAAO,MAAM,WAAW,yHAKvB,CAAC;AAEF,eAAO,MAAM,YAAY,yHAIxB,CAAC;AAEF,eAAO,MAAM,aAAa,yHAIzB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import CollapsePanel, { CollapsibleType } from './CollapsePanel';
|
|
3
|
+
export declare type ExpandIconPosition = 'left' | 'right' | undefined;
|
|
4
|
+
export interface CollapseProps {
|
|
5
|
+
activeKey?: Array<string | number> | string | number;
|
|
6
|
+
defaultActiveKey?: Array<string | number> | string | number;
|
|
7
|
+
accordion?: boolean;
|
|
8
|
+
destroyInactivePanel?: boolean;
|
|
9
|
+
onChange?: (key: string | string[]) => void;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
className?: string;
|
|
12
|
+
bordered?: boolean;
|
|
13
|
+
prefixCls?: string;
|
|
14
|
+
expandIcon?: (panelProps: PanelProps) => React.ReactNode;
|
|
15
|
+
expandIconPosition?: ExpandIconPosition;
|
|
16
|
+
ghost?: boolean;
|
|
17
|
+
collapsible?: CollapsibleType;
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
interface PanelProps {
|
|
21
|
+
isActive?: boolean;
|
|
22
|
+
header?: React.ReactNode;
|
|
23
|
+
className?: string;
|
|
24
|
+
style?: React.CSSProperties;
|
|
25
|
+
showArrow?: boolean;
|
|
26
|
+
forceRender?: boolean;
|
|
27
|
+
/** @deprecated Use `collapsible="disabled"` instead */
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
extra?: React.ReactNode;
|
|
30
|
+
collapsible?: CollapsibleType;
|
|
31
|
+
}
|
|
32
|
+
interface CollapseInterface extends React.FC<CollapseProps> {
|
|
33
|
+
Panel: typeof CollapsePanel;
|
|
34
|
+
}
|
|
35
|
+
declare const Collapse: CollapseInterface;
|
|
36
|
+
export default Collapse;
|
|
37
|
+
//# sourceMappingURL=Collapse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Collapse.d.ts","sourceRoot":"","sources":["../../../src/Collapse/Collapse.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAKjD,OAAO,aAAa,EAAE,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAMjE,oBAAY,kBAAkB,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAE9D,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,GAAG,MAAM,CAAC;IACrD,gBAAgB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,GAAG,MAAM,CAAC;IAC5D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAC;IAC5C,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,KAAK,CAAC,SAAS,CAAC;IACzD,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,UAAU,UAAU;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;AAED,UAAU,iBAAkB,SAAQ,KAAK,CAAC,EAAE,CAAC,aAAa,CAAC;IACzD,KAAK,EAAE,OAAO,aAAa,CAAC;CAC7B;AAED,QAAA,MAAM,QAAQ,EAAE,iBA6Bf,CAAC;AAIF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Collapse.styles.d.ts","sourceRoot":"","sources":["../../../src/Collapse/Collapse.styles.ts"],"names":[],"mappings":"AACA,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,eAAO,MAAM,cAAc,qHAU1B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type CollapsibleType = 'header' | 'disabled';
|
|
3
|
+
export interface CollapsePanelProps {
|
|
4
|
+
key: string | number;
|
|
5
|
+
header: React.ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
showArrow?: boolean;
|
|
10
|
+
prefixCls?: string;
|
|
11
|
+
forceRender?: boolean;
|
|
12
|
+
id?: string;
|
|
13
|
+
extra?: React.ReactNode;
|
|
14
|
+
collapsible?: CollapsibleType;
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
declare const CollapsePanel: React.FC<CollapsePanelProps>;
|
|
18
|
+
export default CollapsePanel;
|
|
19
|
+
//# sourceMappingURL=CollapsePanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollapsePanel.d.ts","sourceRoot":"","sources":["../../../src/Collapse/CollapsePanel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,oBAAY,eAAe,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEpD,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAU/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Entity.d.ts","sourceRoot":"","sources":["../../../src/Entity/Entity.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAY,aAAa,E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;IAC3B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB,2BAA2B;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,sBAAsB;IACtB,WAAW,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;CAC/C;AAED,eAAO,MAAM,MAAM,8DAgDlB,CAAC"}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { DefaultProps, KubedNumberSize } from '../theme';
|
|
2
|
-
interface LoadingProps extends DefaultProps {
|
|
2
|
+
export interface LoadingProps extends DefaultProps {
|
|
3
3
|
size?: KubedNumberSize;
|
|
4
|
+
color?: string;
|
|
5
|
+
variant?: 'circle1' | 'circle2';
|
|
4
6
|
}
|
|
7
|
+
export declare const sizes: {
|
|
8
|
+
xs: string;
|
|
9
|
+
sm: string;
|
|
10
|
+
md: string;
|
|
11
|
+
lg: string;
|
|
12
|
+
xl: string;
|
|
13
|
+
};
|
|
5
14
|
export declare const Loading: import("../utils/types").ComponentWithAs<"svg", LoadingProps>;
|
|
6
|
-
export {};
|
|
7
15
|
//# sourceMappingURL=Loading.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Loading.d.ts","sourceRoot":"","sources":["../../../src/Loading/Loading.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Loading.d.ts","sourceRoot":"","sources":["../../../src/Loading/Loading.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAKzD,MAAM,WAAW,YAAa,SAAQ,YAAY;IAChD,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AAED,eAAO,MAAM,KAAK;;;;;;CAMjB,CAAC;AAEF,eAAO,MAAM,OAAO,+DAQlB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DefaultProps, KubedNumberSize } from '../../theme';
|
|
3
|
+
export interface LoaderProps extends React.ComponentPropsWithoutRef<'svg'> {
|
|
4
|
+
size?: KubedNumberSize;
|
|
5
|
+
color?: string;
|
|
6
|
+
}
|
|
7
|
+
interface LoadingProps extends DefaultProps {
|
|
8
|
+
size?: KubedNumberSize;
|
|
9
|
+
}
|
|
10
|
+
export declare const CircleLoader: import("../../utils/types").ComponentWithAs<"svg", LoadingProps>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=Circle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Circle.d.ts","sourceRoot":"","sources":["../../../../src/Loading/loaders/Circle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAK5D,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACxE,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAiBD,UAAU,YAAa,SAAQ,YAAY;IACzC,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB;AAED,eAAO,MAAM,YAAY,kEAiCvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Oval.d.ts","sourceRoot":"","sources":["../../../../src/Loading/loaders/Oval.tsx"],"names":[],"mappings":";AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAS/C,wBAAgB,IAAI,CAAC,KAAK,EAAE,YAAY,eAoBvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../src/Progress/Progress.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAkBzD,MAAM,WAAW,aAAc,SAAQ,YAAY;IACjD,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,4DAA4D;IAC5D,IAAI,CAAC,EAAE,eAAe,CAAC;IAEvB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,eAAe,CAAC;IAEzB,mBAAmB;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,iFAAiF;IACjF,QAAQ,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC/C;AAED,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../src/Progress/Progress.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAkBzD,MAAM,WAAW,aAAc,SAAQ,YAAY;IACjD,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,4DAA4D;IAC5D,IAAI,CAAC,EAAE,eAAe,CAAC;IAEvB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,eAAe,CAAC;IAEzB,mBAAmB;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,iFAAiF;IACjF,QAAQ,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC/C;AAED,eAAO,MAAM,QAAQ,gEA6BpB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DefaultProps } from '../theme';
|
|
3
|
+
export interface FilterInputProps extends DefaultProps {
|
|
4
|
+
/** Max height of visible content, when this point is reached ShowMore appears */
|
|
5
|
+
maxHeight: number;
|
|
6
|
+
/** Label for close ShowMore action */
|
|
7
|
+
hideLabel: React.ReactNode;
|
|
8
|
+
/** Label for open ShowMore action */
|
|
9
|
+
showLabel: React.ReactNode;
|
|
10
|
+
/** Get ref of ShowMore toggle button */
|
|
11
|
+
controlRef?: React.ForwardedRef<HTMLButtonElement>;
|
|
12
|
+
/** Initial ShowMore state, true to wrap content in ShowMore, false to show content without ShowMore, opened state will be updated on mount */
|
|
13
|
+
expanded?: boolean;
|
|
14
|
+
/** ShowMore reveal transition duration in ms, 0 or null to turn off animation */
|
|
15
|
+
transitionDuration?: number;
|
|
16
|
+
}
|
|
17
|
+
export declare const ShowMore: import("../utils/types").ComponentWithAs<"div", FilterInputProps>;
|
|
18
|
+
//# sourceMappingURL=ShowMore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShowMore.d.ts","sourceRoot":"","sources":["../../../src/ShowMore/ShowMore.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAqBxC,MAAM,WAAW,gBAAiB,SAAQ,YAAY;IACpD,iFAAiF;IACjF,SAAS,EAAE,MAAM,CAAC;IAElB,sCAAsC;IACtC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B,qCAAqC;IACrC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B,wCAAwC;IACxC,UAAU,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;IAEnD,8IAA8I;IAC9I,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,iFAAiF;IACjF,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,QAAQ,mEA+CpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../src/Slider/Slider.tsx"],"names":[],"mappings":";AAIA,OAAO,EAOL,eAAe,EAEhB,MAAM,iBAAiB,CAAC;AAEzB,wBAAgB,MAAM,CAAC,KAAK,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../src/Slider/Slider.tsx"],"names":[],"mappings":";AAIA,OAAO,EAOL,eAAe,EAEhB,MAAM,iBAAiB,CAAC;AAEzB,wBAAgB,MAAM,CAAC,KAAK,EAAE,eAAe,eAuN5C;yBAvNe,MAAM;;;AA2NtB,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DefaultProps, KubedNumberSize, KubedSizes } from '../../theme';
|
|
3
|
+
export interface StepProps extends DefaultProps {
|
|
4
|
+
/** Step state, controlled by Steps component */
|
|
5
|
+
state?: 'stepInactive' | 'stepProgress' | 'stepCompleted';
|
|
6
|
+
/** Step color from theme.colors */
|
|
7
|
+
color?: string | 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error';
|
|
8
|
+
/** Should icon be displayed */
|
|
9
|
+
withIcon?: boolean;
|
|
10
|
+
/** Step icon, defaults to step index + 1 when rendered within Stepper */
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
|
+
/** Step icon displayed when step is completed */
|
|
13
|
+
completedIcon?: React.ReactNode;
|
|
14
|
+
/** Step icon displayed when step is in progress */
|
|
15
|
+
progressIcon?: React.ReactNode;
|
|
16
|
+
/** Step label, render after icon */
|
|
17
|
+
label?: React.ReactNode;
|
|
18
|
+
/** Step description */
|
|
19
|
+
description?: React.ReactNode;
|
|
20
|
+
/** Icon wrapper size in px */
|
|
21
|
+
iconSize?: number;
|
|
22
|
+
/** Icon position relative to step body */
|
|
23
|
+
iconPosition?: 'right' | 'left';
|
|
24
|
+
/** Component size */
|
|
25
|
+
size?: KubedSizes;
|
|
26
|
+
/** Radius from theme.radius, or number to set border-radius in px */
|
|
27
|
+
radius?: KubedNumberSize;
|
|
28
|
+
/** Indicates loading state on step */
|
|
29
|
+
loading?: boolean;
|
|
30
|
+
/** Set to false to disable clicks on step */
|
|
31
|
+
allowStepClick?: boolean;
|
|
32
|
+
/** Should step selection be allowed */
|
|
33
|
+
allowStepSelect?: boolean;
|
|
34
|
+
/** Static selector base */
|
|
35
|
+
__staticSelector?: string;
|
|
36
|
+
}
|
|
37
|
+
export declare const Step: import("../../utils/types").ComponentWithAs<"div", StepProps>;
|
|
38
|
+
//# sourceMappingURL=Step.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Step.d.ts","sourceRoot":"","sources":["../../../../src/Steps/Step/Step.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAaxE,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C,gDAAgD;IAChD,KAAK,CAAC,EAAE,cAAc,GAAG,cAAc,GAAG,eAAe,CAAC;IAE1D,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAEvF,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,yEAAyE;IACzE,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEvB,iDAAiD;IACjD,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEhC,mDAAmD;IACnD,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE/B,oCAAoC;IACpC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAExB,uBAAuB;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE9B,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAEhC,qBAAqB;IACrB,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB,qEAAqE;IACrE,MAAM,CAAC,EAAE,eAAe,CAAC;IAEzB,sCAAsC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,6CAA6C;IAC7C,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,uCAAuC;IACvC,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,2BAA2B;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAUD,eAAO,MAAM,IAAI,+DA2EhB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const StepWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
+
export declare const StepBody: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const StepLabel: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const StepDescription: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
+
export declare const StepIcon: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
6
|
+
export declare const StepIconWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
7
|
+
export declare const StepCompletedIcon: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
8
|
+
//# sourceMappingURL=Step.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Step.styles.d.ts","sourceRoot":"","sources":["../../../../src/Steps/Step/Step.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,yGAMvB,CAAC;AAEF,eAAO,MAAM,QAAQ,yGAIpB,CAAC;AAEF,eAAO,MAAM,SAAS,yGAMrB,CAAC;AAEF,eAAO,MAAM,eAAe,yGAI3B,CAAC;AAEF,eAAO,MAAM,QAAQ,yGAyBpB,CAAC;AAMF,eAAO,MAAM,eAAe,yGAK3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,yGAO7B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface StepCompletedProps {
|
|
3
|
+
/** Label content */
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare function StepCompleted(props: StepCompletedProps): any;
|
|
7
|
+
export declare namespace StepCompleted {
|
|
8
|
+
var displayName: string;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=StepCompleted.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepCompleted.d.ts","sourceRoot":"","sources":["../../../../src/Steps/StepCompleted/StepCompleted.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,kBAAkB;IACjC,oBAAoB;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,aAAa,CAE3B,KAAK,EAAE,kBAAkB,OAG1B;yBALe,aAAa"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DefaultProps, KubedNumberSize, KubedSizes } from '../theme';
|
|
3
|
+
import { Step } from './Step/Step';
|
|
4
|
+
import { TabStep } from './TabStep/TabStep';
|
|
5
|
+
import { StepCompleted } from './StepCompleted/StepCompleted';
|
|
6
|
+
export interface StepsProps extends DefaultProps {
|
|
7
|
+
/** <Stepper.Step /> components only */
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
/** Called when step is clicked */
|
|
10
|
+
onStepClick?(stepIndex: number): void;
|
|
11
|
+
/** Active step index */
|
|
12
|
+
active: number;
|
|
13
|
+
/** Step icon displayed when step is completed */
|
|
14
|
+
completedIcon?: React.ReactNode;
|
|
15
|
+
/** Step icon displayed when step is in progress */
|
|
16
|
+
progressIcon?: React.ReactNode;
|
|
17
|
+
/** Active and progress Step colors from theme.colors */
|
|
18
|
+
color?: string | 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error';
|
|
19
|
+
/** Step icon size in px */
|
|
20
|
+
iconSize?: number;
|
|
21
|
+
/** Content padding-top from theme.spacing or number to set value in px */
|
|
22
|
+
contentPadding?: KubedNumberSize;
|
|
23
|
+
/** Component orientation */
|
|
24
|
+
orientation?: 'vertical' | 'horizontal';
|
|
25
|
+
/** Icon position relative to step body */
|
|
26
|
+
iconPosition?: 'right' | 'left';
|
|
27
|
+
/** Component size */
|
|
28
|
+
size?: KubedSizes;
|
|
29
|
+
/** Radius from theme.radius, or number to set border-radius in px */
|
|
30
|
+
radius?: KubedNumberSize;
|
|
31
|
+
/** Breakpoint at which orientation will change from horizontal to vertical */
|
|
32
|
+
breakpoint?: KubedNumberSize;
|
|
33
|
+
variant?: 'default' | 'tab';
|
|
34
|
+
}
|
|
35
|
+
export declare const Steps: import("../utils/types").ComponentWithAs<"div", StepsProps>;
|
|
36
|
+
export { Step, StepCompleted, TabStep };
|
|
37
|
+
//# sourceMappingURL=Steps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Steps.d.ts","sourceRoot":"","sources":["../../../src/Steps/Steps.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiC,MAAM,OAAO,CAAC;AAGtD,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAG9D,MAAM,WAAW,UAAW,SAAQ,YAAY;IAC9C,uCAAuC;IACvC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B,kCAAkC;IAClC,WAAW,CAAC,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtC,wBAAwB;IACxB,MAAM,EAAE,MAAM,CAAC;IAEf,iDAAiD;IACjD,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEhC,mDAAmD;IACnD,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE/B,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAEvF,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,0EAA0E;IAC1E,cAAc,CAAC,EAAE,eAAe,CAAC;IAEjC,4BAA4B;IAC5B,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IAExC,0CAA0C;IAC1C,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAEhC,qBAAqB;IACrB,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB,qEAAqE;IACrE,MAAM,CAAC,EAAE,eAAe,CAAC;IAEzB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,eAAe,CAAC;IAE7B,OAAO,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC;CAC7B;AAED,eAAO,MAAM,KAAK,6DA2FjB,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const StepsRoot: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
+
export declare const StepsWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const StepsContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
interface SeparatorProps {
|
|
5
|
+
$active: boolean;
|
|
6
|
+
$vertical: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const StepsSeparator: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, SeparatorProps, never>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=Steps.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Steps.styles.d.ts","sourceRoot":"","sources":["../../../src/Steps/Steps.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,yGAqBrB,CAAC;AAEF,eAAO,MAAM,YAAY,yGASxB,CAAC;AAEF,eAAO,MAAM,YAAY,yGAExB,CAAC;AAEF,UAAU,cAAc;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;CACpB;AAoBD,eAAO,MAAM,cAAc,qHAG1B,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DefaultProps, KubedNumberSize, KubedSizes } from '../../theme';
|
|
3
|
+
export interface StepProps extends DefaultProps {
|
|
4
|
+
/** Step state, controlled by Steps component */
|
|
5
|
+
state?: 'stepInactive' | 'stepProgress' | 'stepCompleted';
|
|
6
|
+
/** Step color from theme.colors */
|
|
7
|
+
color?: string | 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error';
|
|
8
|
+
/** Should icon be displayed */
|
|
9
|
+
withIcon?: boolean;
|
|
10
|
+
/** Step icon, defaults to step index + 1 when rendered within Stepper */
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
|
+
/** Step icon displayed when step is completed */
|
|
13
|
+
completedIcon?: React.ReactNode;
|
|
14
|
+
/** Step icon displayed when step is in progress */
|
|
15
|
+
progressIcon?: React.ReactNode;
|
|
16
|
+
/** Step label, render after icon */
|
|
17
|
+
label?: React.ReactNode;
|
|
18
|
+
/** Step description */
|
|
19
|
+
description?: React.ReactNode;
|
|
20
|
+
/** Step progress description */
|
|
21
|
+
progressDescription?: React.ReactNode;
|
|
22
|
+
/** Step completed description */
|
|
23
|
+
completedDescription?: React.ReactNode;
|
|
24
|
+
/** Icon wrapper size in px */
|
|
25
|
+
iconSize?: number;
|
|
26
|
+
/** Icon position relative to step body */
|
|
27
|
+
iconPosition?: 'right' | 'left';
|
|
28
|
+
/** Component size */
|
|
29
|
+
size?: KubedSizes;
|
|
30
|
+
/** Radius from theme.radius, or number to set border-radius in px */
|
|
31
|
+
radius?: KubedNumberSize;
|
|
32
|
+
/** Indicates loading state on step */
|
|
33
|
+
loading?: boolean;
|
|
34
|
+
/** Set to false to disable clicks on step */
|
|
35
|
+
allowStepClick?: boolean;
|
|
36
|
+
/** Should step selection be allowed */
|
|
37
|
+
allowStepSelect?: boolean;
|
|
38
|
+
/** Static selector base */
|
|
39
|
+
__staticSelector?: string;
|
|
40
|
+
}
|
|
41
|
+
export declare const TabStep: import("../../utils/types").ComponentWithAs<"div", StepProps>;
|
|
42
|
+
//# sourceMappingURL=TabStep.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabStep.d.ts","sourceRoot":"","sources":["../../../../src/Steps/TabStep/TabStep.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAaxE,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C,gDAAgD;IAChD,KAAK,CAAC,EAAE,cAAc,GAAG,cAAc,GAAG,eAAe,CAAC;IAE1D,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAEvF,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,yEAAyE;IACzE,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEvB,iDAAiD;IACjD,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEhC,mDAAmD;IACnD,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE/B,oCAAoC;IACpC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAExB,uBAAuB;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE9B,gCAAgC;IAChC,mBAAmB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEtC,iCAAiC;IACjC,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEvC,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAEhC,qBAAqB;IACrB,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB,qEAAqE;IACrE,MAAM,CAAC,EAAE,eAAe,CAAC;IAEzB,sCAAsC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,6CAA6C;IAC7C,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,uCAAuC;IACvC,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,2BAA2B;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAUD,eAAO,MAAM,OAAO,+DAoFnB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const StepWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
+
export declare const StepBody: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const StepLabel: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const StepDescription: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
+
export declare const StepIcon: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
6
|
+
export declare const StepIconWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
7
|
+
export declare const StepCompletedIcon: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
8
|
+
//# sourceMappingURL=TabStep.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabStep.styles.d.ts","sourceRoot":"","sources":["../../../../src/Steps/TabStep/TabStep.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,yGAYvB,CAAC;AAEF,eAAO,MAAM,QAAQ,yGAIpB,CAAC;AAEF,eAAO,MAAM,SAAS,yGAMrB,CAAC;AAEF,eAAO,MAAM,eAAe,yGAI3B,CAAC;AAEF,eAAO,MAAM,QAAQ,yGA6CpB,CAAC;AAEF,eAAO,MAAM,eAAe,yGAI3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,yGAO7B,CAAC"}
|