acinguiux-ds-react-framework 0.1.22 → 0.1.24
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/build/cjs/components/Menu/components/MenuItem.js.map +1 -1
- package/build/cjs/react-base/src/components/FormField/FormField.styles.js +3 -3
- package/build/cjs/react-base/src/components/FormField/FormField.styles.js.map +1 -1
- package/build/cjs/react-base/src/components/FormField/components/FormFieldLabel/FormFieldLabel.styles.js +1 -1
- package/build/cjs/react-base/src/components/FormField/components/FormFieldLabel/FormFieldLabel.styles.js.map +1 -1
- package/build/cjs/react-base/src/components/Pagination/Paginations.utils.js +1 -1
- package/build/cjs/react-base/src/components/Pagination/Paginations.utils.js.map +1 -1
- package/build/cjs/react-base/src/components/ProgressBar/CircleProgressBar/CircleProgressBar.styles.js +3 -3
- package/build/cjs/react-base/src/components/ProgressBar/CircleProgressBar/CircleProgressBar.styles.js.map +1 -1
- package/build/cjs/react-base/src/components/Text/components/Display/Display.utils.js +1 -1
- package/build/cjs/react-base/src/components/Text/components/Display/Display.utils.js.map +1 -1
- package/build/cjs/react-base/src/components/Text/components/Heading/Heading.utils.js +1 -1
- package/build/cjs/react-base/src/components/Text/components/Heading/Heading.utils.js.map +1 -1
- package/build/esm/components/Menu/components/MenuItem.d.ts +2 -0
- package/build/esm/components/Menu/components/MenuItem.d.ts.map +1 -1
- package/build/esm/components/Menu/components/MenuItem.js.map +1 -1
- package/build/esm/react-base/src/components/FormField/FormField.styles.js +8 -10
- package/build/esm/react-base/src/components/FormField/FormField.styles.js.map +1 -1
- package/build/esm/react-base/src/components/FormField/components/FormFieldLabel/FormFieldLabel.styles.js +26 -27
- package/build/esm/react-base/src/components/FormField/components/FormFieldLabel/FormFieldLabel.styles.js.map +1 -1
- package/build/esm/react-base/src/components/Pagination/Paginations.utils.js +4 -5
- package/build/esm/react-base/src/components/Pagination/Paginations.utils.js.map +1 -1
- package/build/esm/react-base/src/components/ProgressBar/CircleProgressBar/CircleProgressBar.styles.js +11 -12
- package/build/esm/react-base/src/components/ProgressBar/CircleProgressBar/CircleProgressBar.styles.js.map +1 -1
- package/build/esm/react-base/src/components/Text/components/Display/Display.utils.js +20 -23
- package/build/esm/react-base/src/components/Text/components/Display/Display.utils.js.map +1 -1
- package/build/esm/react-base/src/components/Text/components/Heading/Heading.utils.js +14 -17
- package/build/esm/react-base/src/components/Text/components/Heading/Heading.utils.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.js","sources":["../../../../../src/components/Menu/components/MenuItem.tsx"],"sourcesContent":["import {\n type ReactElement,\n forwardRef,\n useCallback,\n useContext,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { MenuItem as RCMenuItem } from '@rc-component/menu';\nimport type { MenuItemProps as RCMenuItemProps } from '@rc-component/menu/lib/MenuItem';\nimport { Positions } from 'acinguiux-ds-react-base/consts';\nimport type { MenuTypes } from 'acinguiux-ds-react-base/components/Menu';\nimport type { BadgeTypes } from 'acinguiux-ds-react-base/components/Badge';\nimport { getSmallerSize } from 'acinguiux-ds-react-base/utils/sizesUtils';\n\nimport { getString } from '../../../utils/textUtils';\nimport MenuLabel from './MenuLabel';\nimport Tooltip from '../../Tooltip/Tooltip';\nimport MenuContext from '../MenuContext';\nimport { TooltipContainer, TooltipLabel } from '../styles/menuLabel.styles';\nimport { getTooltipLabelSize } from '../Menu.utils';\nimport Badge from '../../Badge/Badge';\n\nexport interface IMenuItemProps extends RCMenuItemProps {\n level?: number;\n path?: string;\n badge?: Omit<BadgeTypes.IProps, 'size'>;\n itemRender?: MenuTypes.ItemRender;\n}\n\nconst MenuItem = forwardRef<HTMLElement, IMenuItemProps>(\n ({ children, itemIcon, level, path, badge, itemRender, ...rest }, ref): ReactElement => {\n const menuItemRef = useRef<HTMLElement>(null);\n const [isTooltipOpen, setIsTooltipOpen] = useState(false);\n const { inlineCollapsed, size } = useContext(MenuContext);\n useImperativeHandle<HTMLElement | null, HTMLElement | null>(ref, () => menuItemRef.current);\n\n const onMouseEnter = useCallback(() => setIsTooltipOpen(true), []);\n const onMouseLeave = useCallback(() => setIsTooltipOpen(false), []);\n const isTooltipDisabled = useMemo(\n () => !inlineCollapsed || level === undefined || level > 0,\n [inlineCollapsed, level],\n );\n\n return (\n <RCMenuItem\n ref={menuItemRef}\n aria-label={getString(children)}\n {...rest}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n <Tooltip\n targetRef={menuItemRef}\n isOpen={!isTooltipDisabled && isTooltipOpen}\n isDisabled={isTooltipDisabled}\n placement={Positions.Right}\n trigger={\n <MenuLabel parentRef={menuItemRef} path={path} itemIcon={itemIcon} itemRender={itemRender} badge={badge}>\n {children}\n </MenuLabel>\n }\n overlay={\n <TooltipContainer gap=\"1rem\">\n <TooltipLabel size={getTooltipLabelSize(size)}>{children}</TooltipLabel>\n {badge && <Badge size={getSmallerSize(size) as BadgeTypes.Size} {...badge} />}\n </TooltipContainer>\n }\n delay={50}\n closeDelay={200}\n />\n </RCMenuItem>\n );\n },\n);\n\nexport default MenuItem;\n"],"names":["MenuItem","forwardRef","children","itemIcon","level","path","badge","itemRender","rest","ref","menuItemRef","useRef","isTooltipOpen","setIsTooltipOpen","useState","inlineCollapsed","size","useContext","MenuContext","useImperativeHandle","onMouseEnter","useCallback","onMouseLeave","isTooltipDisabled","useMemo","jsx","RCMenuItem","getString","Tooltip","Positions","MenuLabel","jsxs","TooltipContainer","TooltipLabel","getTooltipLabelSize","Badge","getSmallerSize"],"mappings":"
|
|
1
|
+
{"version":3,"file":"MenuItem.js","sources":["../../../../../src/components/Menu/components/MenuItem.tsx"],"sourcesContent":["import {\n type ReactElement,\n type ReactNode,\n forwardRef,\n useCallback,\n useContext,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { MenuItem as RCMenuItem } from '@rc-component/menu';\nimport type { MenuItemProps as RCMenuItemProps } from '@rc-component/menu/lib/MenuItem';\nimport { Positions } from 'acinguiux-ds-react-base/consts';\nimport type { MenuTypes } from 'acinguiux-ds-react-base/components/Menu';\nimport type { BadgeTypes } from 'acinguiux-ds-react-base/components/Badge';\nimport { getSmallerSize } from 'acinguiux-ds-react-base/utils/sizesUtils';\n\nimport { getString } from '../../../utils/textUtils';\nimport MenuLabel from './MenuLabel';\nimport Tooltip from '../../Tooltip/Tooltip';\nimport MenuContext from '../MenuContext';\nimport { TooltipContainer, TooltipLabel } from '../styles/menuLabel.styles';\nimport { getTooltipLabelSize } from '../Menu.utils';\nimport Badge from '../../Badge/Badge';\n\nexport interface IMenuItemProps extends RCMenuItemProps {\n level?: number;\n path?: string;\n badge?: Omit<BadgeTypes.IProps, 'size'>;\n itemRender?: MenuTypes.ItemRender;\n children?: ReactNode;\n}\n\nconst MenuItem = forwardRef<HTMLElement, IMenuItemProps>(\n ({ children, itemIcon, level, path, badge, itemRender, ...rest }, ref): ReactElement => {\n const menuItemRef = useRef<HTMLElement>(null);\n const [isTooltipOpen, setIsTooltipOpen] = useState(false);\n const { inlineCollapsed, size } = useContext(MenuContext);\n useImperativeHandle<HTMLElement | null, HTMLElement | null>(ref, () => menuItemRef.current);\n\n const onMouseEnter = useCallback(() => setIsTooltipOpen(true), []);\n const onMouseLeave = useCallback(() => setIsTooltipOpen(false), []);\n const isTooltipDisabled = useMemo(\n () => !inlineCollapsed || level === undefined || level > 0,\n [inlineCollapsed, level],\n );\n\n return (\n <RCMenuItem\n ref={menuItemRef}\n aria-label={getString(children)}\n {...rest}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n <Tooltip\n targetRef={menuItemRef}\n isOpen={!isTooltipDisabled && isTooltipOpen}\n isDisabled={isTooltipDisabled}\n placement={Positions.Right}\n trigger={\n <MenuLabel parentRef={menuItemRef} path={path} itemIcon={itemIcon} itemRender={itemRender} badge={badge}>\n {children}\n </MenuLabel>\n }\n overlay={\n <TooltipContainer gap=\"1rem\">\n <TooltipLabel size={getTooltipLabelSize(size)}>{children}</TooltipLabel>\n {badge && <Badge size={getSmallerSize(size) as BadgeTypes.Size} {...badge} />}\n </TooltipContainer>\n }\n delay={50}\n closeDelay={200}\n />\n </RCMenuItem>\n );\n },\n);\n\nexport default MenuItem;\n"],"names":["MenuItem","forwardRef","children","itemIcon","level","path","badge","itemRender","rest","ref","menuItemRef","useRef","isTooltipOpen","setIsTooltipOpen","useState","inlineCollapsed","size","useContext","MenuContext","useImperativeHandle","onMouseEnter","useCallback","onMouseLeave","isTooltipDisabled","useMemo","jsx","RCMenuItem","getString","Tooltip","Positions","MenuLabel","jsxs","TooltipContainer","TooltipLabel","getTooltipLabelSize","Badge","getSmallerSize"],"mappings":"wcAmCMA,EAAWC,EAAAA,WACf,CAAC,CAAE,SAAAC,EAAU,SAAAC,EAAU,MAAAC,EAAO,KAAAC,EAAM,MAAAC,EAAO,WAAAC,EAAY,GAAGC,CAAA,EAAQC,IAAsB,CACtF,MAAMC,EAAcC,EAAAA,OAAoB,IAAI,EACtC,CAACC,EAAeC,CAAgB,EAAIC,EAAAA,SAAS,EAAK,EAClD,CAAE,gBAAAC,EAAiB,KAAAC,GAASC,EAAAA,WAAWC,CAAW,EACxDC,EAAAA,oBAA4DV,EAAK,IAAMC,EAAY,OAAO,EAE1F,MAAMU,EAAeC,EAAAA,YAAY,IAAMR,EAAiB,EAAI,EAAG,CAAA,CAAE,EAC3DS,EAAeD,EAAAA,YAAY,IAAMR,EAAiB,EAAK,EAAG,CAAA,CAAE,EAC5DU,EAAoBC,EAAAA,QACxB,IAAM,CAACT,GAAmBX,IAAU,QAAaA,EAAQ,EACzD,CAACW,EAAiBX,CAAK,CAAA,EAGzB,OACEqB,EAAAA,IAACC,EAAAA,SAAA,CACC,IAAKhB,EACL,aAAYiB,EAAAA,UAAUzB,CAAQ,EAC7B,GAAGM,EACJ,aAAAY,EACA,aAAAE,EAEA,SAAAG,EAAAA,IAACG,EAAA,CACC,UAAWlB,EACX,OAAQ,CAACa,GAAqBX,EAC9B,WAAYW,EACZ,UAAWM,EAAAA,UAAU,MACrB,cACGC,EAAA,CAAU,UAAWpB,EAAa,KAAAL,EAAY,SAAAF,EAAoB,WAAAI,EAAwB,MAAAD,EACxF,SAAAJ,CAAA,CACH,EAEF,QACE6B,EAAAA,KAACC,EAAAA,iBAAA,CAAiB,IAAI,OACpB,SAAA,CAAAP,EAAAA,IAACQ,EAAAA,aAAA,CAAa,KAAMC,EAAAA,oBAAoBlB,CAAI,EAAI,SAAAd,EAAS,EACxDI,SAAU6B,EAAA,CAAM,KAAMC,EAAAA,eAAepB,CAAI,EAAuB,GAAGV,CAAA,CAAO,CAAA,EAC7E,EAEF,MAAO,GACP,WAAY,GAAA,CAAA,CACd,CAAA,CAGN,CACF"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("styled-components"),r=require("./FormField.consts.js"),i=require("./FormField.utils.js"),c=require("../../utils/sizesUtils.js")
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("styled-components"),r=require("./FormField.consts.js"),i=require("./FormField.utils.js"),c=require("../../utils/sizesUtils.js"),n=e.css`
|
|
2
2
|
${({$size:s})=>e.css`
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
gap: ${r.consts[s].gap}px;
|
|
6
6
|
width: 100%;
|
|
7
7
|
`}
|
|
8
|
-
`,
|
|
8
|
+
`,a=e.css`
|
|
9
9
|
${({$kind:s,$size:l,$disabled:o,theme:t})=>e.css`
|
|
10
10
|
${t.typography("label",c.getLabelTypographySize(l))};
|
|
11
11
|
display: flex;
|
|
12
12
|
color: ${i.getColor(t,o,s)};
|
|
13
13
|
`};
|
|
14
|
-
`;exports.MessageStyles=
|
|
14
|
+
`;exports.MessageStyles=a;exports.Styles=n;
|
|
15
15
|
//# sourceMappingURL=FormField.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormField.styles.js","sources":["../../../../../../../react-base/src/components/FormField/FormField.styles.ts"],"sourcesContent":["import { css } from 'styled-components';\n\nimport { consts } from './FormField.consts';\nimport type { Size, Kind } from './FormField.types';\nimport { getColor } from './FormField.utils';\nimport { getLabelTypographySize } from '../../utils';\n\ntype MessageStyledProps = {\n $size: Size;\n $disabled: boolean;\n $kind?: Kind;\n};\n\nexport const Styles = css<{ $size: Size }>`\n ${({ $size }) => css`\n display: flex;\n flex-direction: column;\n gap: ${consts[$size].gap}px;\n width: 100%;\n `}\n`;\n\nexport const MessageStyles = css<MessageStyledProps>`\n ${({ $kind, $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size))};\n display: flex;\n color: ${getColor(theme, $disabled, $kind)};\n `};\n`;\n"],"names":["Styles","css","$size","consts","MessageStyles","$kind","$disabled","theme","getLabelTypographySize","getColor"],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormField.styles.js","sources":["../../../../../../../react-base/src/components/FormField/FormField.styles.ts"],"sourcesContent":["import { css } from 'styled-components';\n\nimport { consts } from './FormField.consts';\nimport type { Size, Kind } from './FormField.types';\nimport { getColor } from './FormField.utils';\nimport { getLabelTypographySize } from '../../utils';\n\ntype MessageStyledProps = {\n $size: Size;\n $disabled: boolean;\n $kind?: Kind;\n};\n\nexport const Styles = css<{ $size: Size }>`\n ${({ $size }) => css`\n display: flex;\n flex-direction: column;\n gap: ${consts[$size].gap}px;\n width: 100%;\n `}\n`;\n\nexport const MessageStyles = css<MessageStyledProps>`\n ${({ $kind, $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size))};\n display: flex;\n color: ${getColor(theme, $disabled, $kind)};\n `};\n`;\n"],"names":["Styles","css","$size","consts","MessageStyles","$kind","$disabled","theme","getLabelTypographySize","getColor"],"mappings":"6PAaaA,EAASC,EAAAA;AAAAA,IAClB,CAAC,CAAE,MAAAC,CAAA,IAAYD,EAAAA;AAAAA;AAAAA;AAAAA,WAGRE,EAAAA,OAAOD,CAAK,EAAE,GAAG;AAAA;AAAA,GAEzB;AAAA,EAGUE,EAAgBH,EAAAA;AAAAA,IACzB,CAAC,CAAE,MAAAI,EAAO,MAAAH,EAAO,UAAAI,EAAW,MAAAC,KAAYN,EAAAA;AAAAA,MACtCM,EAAM,WAAW,QAASC,EAAAA,uBAAuBN,CAAK,CAAC,CAAC;AAAA;AAAA,aAEjDO,WAASF,EAAOD,EAAWD,CAAK,CAAC;AAAA,GAC3C;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("styled-components"),n=require("../../FormField.consts.js"),l=require("../../../../theme/types/layer.js"),o=require("../../../../utils/sizesUtils.js")
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("styled-components"),n=require("../../FormField.consts.js"),l=require("../../../../theme/types/layer.js"),o=require("../../../../utils/sizesUtils.js"),r=t.css`
|
|
2
2
|
${({$size:s,$disabled:a,theme:e})=>t.css`
|
|
3
3
|
${e.typography("label",o.getLabelTypographySize(s))};
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormFieldLabel.styles.js","sources":["../../../../../../../../../react-base/src/components/FormField/components/FormFieldLabel/FormFieldLabel.styles.ts"],"sourcesContent":["import { css } from 'styled-components';\n\nimport type { Size } from '../../FormField.types';\nimport { consts } from '../../FormField.consts';\nimport { Variables } from '../../../../theme';\nimport { getLabelTypographySize } from '../../../../utils';\n\ntype StyledProps = {\n $size: Size;\n $disabled?: boolean;\n};\n\nexport const HeaderStyles = css<StyledProps>`\n ${({ $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size))};\n\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n gap: ${consts[$size].headerGap}px;\n color: ${theme.layer({ foundation: 'surface', disabled: $disabled })[Variables.TextOnFoundationStrong]};\n `}\n`;\n\nexport const LabelHelperStyles = css<StyledProps>`\n ${({ $size }) => css`\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n flex-grow: 1;\n gap: ${consts[$size].labelHelperGap}px;\n `};\n`;\n\nexport const LabelContainerStyles = css<StyledProps>`\n ${({ $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size), 'strong')};\n\n color: ${theme.layer({ foundation: 'surface', disabled: $disabled })[Variables.TextOnFoundationStrong]};\n display: flex;\n gap: ${consts[$size].labelContainerGap}px;\n align-items: center;\n `};\n`;\n\nexport const LabelTextStyles = css`\n display: flex;\n gap: 6px;\n`;\n\nexport const TitleStyles = css<StyledProps>`\n ${({ $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size), 'strong')};\n\n color: ${theme.layer({ foundation: 'surface', disabled: $disabled })[Variables.TextOnFoundationStrong]};\n `}\n`;\n\nexport const MandatoryStyles = css<StyledProps>`\n ${({ $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size), 'strong')};\n\n color: ${theme.layer({\n foundation: 'surface',\n sentiment: 'negative',\n sentimentProminence: 'transparent',\n disabled: $disabled,\n })[Variables.TextOnSentimentOnBackground]};\n margin-left: 1px;\n `}\n`;\n\nexport const DescriptionStyles = css<StyledProps>`\n ${({ $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size))};\n\n color: ${theme.layer({ foundation: 'surface', disabled: $disabled })[Variables.TextOnFoundationSubtle]};\n `}\n`;\n"],"names":["HeaderStyles","css","$size","$disabled","theme","getLabelTypographySize","consts","Variables","LabelHelperStyles","LabelContainerStyles","LabelTextStyles","TitleStyles","MandatoryStyles","DescriptionStyles"],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormFieldLabel.styles.js","sources":["../../../../../../../../../react-base/src/components/FormField/components/FormFieldLabel/FormFieldLabel.styles.ts"],"sourcesContent":["import { css } from 'styled-components';\n\nimport type { Size } from '../../FormField.types';\nimport { consts } from '../../FormField.consts';\nimport { Variables } from '../../../../theme';\nimport { getLabelTypographySize } from '../../../../utils';\n\ntype StyledProps = {\n $size: Size;\n $disabled?: boolean;\n};\n\nexport const HeaderStyles = css<StyledProps>`\n ${({ $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size))};\n\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n gap: ${consts[$size].headerGap}px;\n color: ${theme.layer({ foundation: 'surface', disabled: $disabled })[Variables.TextOnFoundationStrong]};\n `}\n`;\n\nexport const LabelHelperStyles = css<StyledProps>`\n ${({ $size }) => css`\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n flex-grow: 1;\n gap: ${consts[$size].labelHelperGap}px;\n `};\n`;\n\nexport const LabelContainerStyles = css<StyledProps>`\n ${({ $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size), 'strong')};\n\n color: ${theme.layer({ foundation: 'surface', disabled: $disabled })[Variables.TextOnFoundationStrong]};\n display: flex;\n gap: ${consts[$size].labelContainerGap}px;\n align-items: center;\n `};\n`;\n\nexport const LabelTextStyles = css`\n display: flex;\n gap: 6px;\n`;\n\nexport const TitleStyles = css<StyledProps>`\n ${({ $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size), 'strong')};\n\n color: ${theme.layer({ foundation: 'surface', disabled: $disabled })[Variables.TextOnFoundationStrong]};\n `}\n`;\n\nexport const MandatoryStyles = css<StyledProps>`\n ${({ $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size), 'strong')};\n\n color: ${theme.layer({\n foundation: 'surface',\n sentiment: 'negative',\n sentimentProminence: 'transparent',\n disabled: $disabled,\n })[Variables.TextOnSentimentOnBackground]};\n margin-left: 1px;\n `}\n`;\n\nexport const DescriptionStyles = css<StyledProps>`\n ${({ $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size))};\n\n color: ${theme.layer({ foundation: 'surface', disabled: $disabled })[Variables.TextOnFoundationSubtle]};\n `}\n`;\n"],"names":["HeaderStyles","css","$size","$disabled","theme","getLabelTypographySize","consts","Variables","LabelHelperStyles","LabelContainerStyles","LabelTextStyles","TitleStyles","MandatoryStyles","DescriptionStyles"],"mappings":"mRAYaA,EAAeC,EAAAA;AAAAA,IACxB,CAAC,CAAE,MAAAC,EAAO,UAAAC,EAAW,MAAAC,KAAYH,EAAAA;AAAAA,MAC/BG,EAAM,WAAW,QAASC,EAAAA,uBAAuBH,CAAK,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,WAKnDI,EAAAA,OAAOJ,CAAK,EAAE,SAAS;AAAA,aACrBE,EAAM,MAAM,CAAE,WAAY,UAAW,SAAUD,EAAW,EAAEI,YAAU,sBAAsB,CAAC;AAAA,GACvG;AAAA,EAGUC,EAAoBP,EAAAA;AAAAA,IAC7B,CAAC,CAAE,MAAAC,CAAA,IAAYD,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,WAMRK,EAAAA,OAAOJ,CAAK,EAAE,cAAc;AAAA,GACpC;AAAA,EAGUO,EAAuBR,EAAAA;AAAAA,IAChC,CAAC,CAAE,MAAAC,EAAO,UAAAC,EAAW,MAAAC,KAAYH,EAAAA;AAAAA,MAC/BG,EAAM,WAAW,QAASC,EAAAA,uBAAuBH,CAAK,EAAG,QAAQ,CAAC;AAAA;AAAA,aAE3DE,EAAM,MAAM,CAAE,WAAY,UAAW,SAAUD,EAAW,EAAEI,YAAU,sBAAsB,CAAC;AAAA;AAAA,WAE/FD,EAAAA,OAAOJ,CAAK,EAAE,iBAAiB;AAAA;AAAA,GAEvC;AAAA,EAGUQ,EAAkBT,EAAAA;AAAAA;AAAAA;AAAAA,EAKlBU,EAAcV,EAAAA;AAAAA,IACvB,CAAC,CAAE,MAAAC,EAAO,UAAAC,EAAW,MAAAC,KAAYH,EAAAA;AAAAA,MAC/BG,EAAM,WAAW,QAASC,EAAAA,uBAAuBH,CAAK,EAAG,QAAQ,CAAC;AAAA;AAAA,aAE3DE,EAAM,MAAM,CAAE,WAAY,UAAW,SAAUD,EAAW,EAAEI,YAAU,sBAAsB,CAAC;AAAA,GACvG;AAAA,EAGUK,EAAkBX,EAAAA;AAAAA,IAC3B,CAAC,CAAE,MAAAC,EAAO,UAAAC,EAAW,MAAAC,KAAYH,EAAAA;AAAAA,MAC/BG,EAAM,WAAW,QAASC,EAAAA,uBAAuBH,CAAK,EAAG,QAAQ,CAAC;AAAA;AAAA,aAE3DE,EAAM,MAAM,CACnB,WAAY,UACZ,UAAW,WACX,oBAAqB,cACrB,SAAUD,CACZ,CAAC,EAAEI,EAAAA,UAAU,2BAA2B,CAAC;AAAA;AAAA,GAE1C;AAAA,EAGUM,EAAoBZ,EAAAA;AAAAA,IAC7B,CAAC,CAAE,MAAAC,EAAO,UAAAC,EAAW,MAAAC,KAAYH,EAAAA;AAAAA,MAC/BG,EAAM,WAAW,QAASC,EAAAA,uBAAuBH,CAAK,CAAC,CAAC;AAAA;AAAA,aAEjDE,EAAM,MAAM,CAAE,WAAY,UAAW,SAAUD,EAAW,EAAEI,YAAU,sBAAsB,CAAC;AAAA,GACvG;AAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("acinguiux-ds-fabrics"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("acinguiux-ds-fabrics"),r=require("../../theme/types/layer.js"),n=require("../../utils/sizesUtils.js"),s=(o,e)=>o.typography("label",n.getLabelTypographySize(e)),g=(o,e)=>o.typography("label",n.getLabelTypographySize(e)),u=(o,e,a)=>{const t=o.layer({foundation:"surface",state:e}),l=a?t[r.Variables.BorderOnSelectedOnBackground]:t[r.Variables.BorderOnFoundationMedium];return{backgroundColor:a?t[r.Variables.BackgroundSelected]:t[r.Variables.BackgroundFoundation],color:a?t[r.Variables.TextOnSelectedBackgroundStrong]:t[r.Variables.TextOnFoundationStrong],border:`${a&&e===i.FabricsVariables.States.Resting?0:1}px solid ${l}`}};exports.getPaginationNumbersFontStyle=g;exports.getStylesForState=u;exports.getTextFontStyle=s;
|
|
2
2
|
//# sourceMappingURL=Paginations.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Paginations.utils.js","sources":["../../../../../../../react-base/src/components/Pagination/Paginations.utils.ts"],"sourcesContent":["import type { CSSProperties } from 'styled-components';\nimport { FabricsVariables } from 'acinguiux-ds-fabrics';\n\nimport type { Size } from './Pagination.types';\nimport { type Theme, Variables } from '../../theme';\nimport { getLabelTypographySize } from '../../utils';\n\nexport const getTextFontStyle = (theme: Theme, size: Size) => theme.typography('label', getLabelTypographySize(size));\n\nexport const getPaginationNumbersFontStyle = (theme: Theme, size: Size) =>\n theme.typography('label', getLabelTypographySize(size));\n\nexport const getStylesForState = (\n theme: Theme,\n state: FabricsVariables.StateType,\n isSelected?: boolean,\n): CSSProperties => {\n const layer = theme.layer({\n foundation: 'surface',\n state,\n });\n const borderColor = isSelected\n ? layer[Variables.BorderOnSelectedOnBackground]\n : layer[Variables.BorderOnFoundationMedium];\n\n return {\n backgroundColor: isSelected ? layer[Variables.BackgroundSelected] : layer[Variables.BackgroundFoundation],\n color: isSelected ? layer[Variables.TextOnSelectedBackgroundStrong] : layer[Variables.TextOnFoundationStrong],\n border: `${isSelected && state === FabricsVariables.States.Resting ? 0 : 1}px solid ${borderColor}`,\n };\n};\n"],"names":["getTextFontStyle","theme","size","getLabelTypographySize","getPaginationNumbersFontStyle","getStylesForState","state","isSelected","layer","borderColor","Variables","FabricsVariables"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Paginations.utils.js","sources":["../../../../../../../react-base/src/components/Pagination/Paginations.utils.ts"],"sourcesContent":["import type { CSSProperties } from 'styled-components';\nimport { FabricsVariables } from 'acinguiux-ds-fabrics';\n\nimport type { Size } from './Pagination.types';\nimport { type Theme, Variables } from '../../theme';\nimport { getLabelTypographySize } from '../../utils';\n\nexport const getTextFontStyle = (theme: Theme, size: Size) => theme.typography('label', getLabelTypographySize(size));\n\nexport const getPaginationNumbersFontStyle = (theme: Theme, size: Size) =>\n theme.typography('label', getLabelTypographySize(size));\n\nexport const getStylesForState = (\n theme: Theme,\n state: FabricsVariables.StateType,\n isSelected?: boolean,\n): CSSProperties => {\n const layer = theme.layer({\n foundation: 'surface',\n state,\n });\n const borderColor = isSelected\n ? layer[Variables.BorderOnSelectedOnBackground]\n : layer[Variables.BorderOnFoundationMedium];\n\n return {\n backgroundColor: isSelected ? layer[Variables.BackgroundSelected] : layer[Variables.BackgroundFoundation],\n color: isSelected ? layer[Variables.TextOnSelectedBackgroundStrong] : layer[Variables.TextOnFoundationStrong],\n border: `${isSelected && state === FabricsVariables.States.Resting ? 0 : 1}px solid ${borderColor}`,\n };\n};\n"],"names":["getTextFontStyle","theme","size","getLabelTypographySize","getPaginationNumbersFontStyle","getStylesForState","state","isSelected","layer","borderColor","Variables","FabricsVariables"],"mappings":"mOAOaA,EAAmB,CAACC,EAAcC,IAAeD,EAAM,WAAW,QAASE,EAAAA,uBAAuBD,CAAI,CAAC,EAEvGE,EAAgC,CAACH,EAAcC,IAC1DD,EAAM,WAAW,QAASE,EAAAA,uBAAuBD,CAAI,CAAC,EAE3CG,EAAoB,CAC/BJ,EACAK,EACAC,IACkB,CAClB,MAAMC,EAAQP,EAAM,MAAM,CACxB,WAAY,UACZ,MAAAK,CAAA,CACD,EACKG,EAAcF,EAChBC,EAAME,EAAAA,UAAU,4BAA4B,EAC5CF,EAAME,EAAAA,UAAU,wBAAwB,EAE5C,MAAO,CACL,gBAAiBH,EAAaC,EAAME,EAAAA,UAAU,kBAAkB,EAAIF,EAAME,EAAAA,UAAU,oBAAoB,EACxG,MAAOH,EAAaC,EAAME,EAAAA,UAAU,8BAA8B,EAAIF,EAAME,EAAAA,UAAU,sBAAsB,EAC5G,OAAQ,GAAGH,GAAcD,IAAUK,EAAAA,iBAAiB,OAAO,QAAU,EAAI,CAAC,YAAYF,CAAW,EAAA,CAErG"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("styled-components"),a=require("../ProgressBar.consts.js"),t=require("../../../consts/index.js"),n=require("../../../utils/circleSvgUtils.js")
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("styled-components"),a=require("../ProgressBar.consts.js"),t=require("../../../consts/index.js"),n=require("../../../utils/circleSvgUtils.js"),c=require("../ProgressBar.utils.js"),l=require("../../../theme/types/layer.js"),S=s.css`
|
|
2
2
|
position: relative;
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: center;
|
|
5
|
-
`,
|
|
5
|
+
`,u=s.css`
|
|
6
6
|
${({size:e})=>s.css`
|
|
7
7
|
width: ${`${a.consts[e].viewBoxSize}px`};
|
|
8
8
|
height: ${`${a.consts[e].viewBoxSize}px`};
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
color: ${r.layer()[l.Variables.TextOnFoundationStrong]};
|
|
33
33
|
transform: translate(-50%, -50%);
|
|
34
34
|
`}
|
|
35
|
-
`;exports.BackgroundStyles=g;exports.ContainerStyles=
|
|
35
|
+
`;exports.BackgroundStyles=g;exports.ContainerStyles=S;exports.LabelStyles=f;exports.ProgressBarStyles=u;exports.ProgressStyles=d;
|
|
36
36
|
//# sourceMappingURL=CircleProgressBar.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CircleProgressBar.styles.js","sources":["../../../../../../../../react-base/src/components/ProgressBar/CircleProgressBar/CircleProgressBar.styles.ts"],"sourcesContent":["import { css } from 'styled-components';\n\nimport type { Size } from '../ProgressBar.types';\nimport { consts } from '../ProgressBar.consts';\nimport { Sizes } from '../../../consts';\nimport { getStrokeDashArray, getStrokeDashoffset } from '../../../utils';\nimport { getProgressFillColor } from '../ProgressBar.utils';\nimport { type TypographySize, Variables } from '../../../theme';\n\nexport const ContainerStyles = css`\n position: relative;\n display: flex;\n justify-content: center;\n`;\n\nexport const ProgressBarStyles = css<{ size: Size }>`\n ${({ size }) => css`\n width: ${`${consts[size].viewBoxSize}px`};\n height: ${`${consts[size].viewBoxSize}px`};\n overflow: inherit;\n transform: rotate(-90deg);\n `}\n`;\n\nexport const BackgroundStyles = css`\n ${({ theme }) => css`\n fill: transparent;\n stroke: ${theme.layer({ foundation: 'section' })[Variables.BackgroundFoundation]};\n `}\n`;\n\nexport const ProgressStyles = css<{ value: number; r: number; muted?: boolean }>`\n ${({ theme, value, r, muted }) => css`\n fill: transparent;\n stroke: ${getProgressFillColor(theme, muted)};\n stroke-linecap: round;\n stroke-dasharray: ${`${getStrokeDashArray(r)}`};\n stroke-dashoffset: ${getStrokeDashoffset(r, value)};\n transition: stroke-dashoffset 1s;\n `}\n`;\n\nconst getLabelSize = (size: Size): TypographySize<'label'> => {\n switch (size) {\n case Sizes.XSmall:\n case Sizes.Smallest:\n case Sizes.Small:\n return 'smallest';\n case Sizes.Medium:\n return 'extraSmall';\n case Sizes.Large:\n return 'small';\n default:\n throw new Error(`size \"${size}\" does not have a label size`);\n }\n};\n\nexport const LabelStyles = css<{ size: Size }>`\n ${({ size, theme }) => css`\n ${theme.typography('heading', getLabelSize(size))};\n position: absolute;\n top: 50%;\n left: 50%;\n color: ${theme.layer()[Variables.TextOnFoundationStrong]};\n transform: translate(-50%, -50%);\n `}\n`;\n"],"names":["ContainerStyles","css","ProgressBarStyles","size","consts","BackgroundStyles","theme","Variables","ProgressStyles","value","r","muted","getProgressFillColor","getStrokeDashArray","getStrokeDashoffset","getLabelSize","Sizes","LabelStyles"],"mappings":"
|
|
1
|
+
{"version":3,"file":"CircleProgressBar.styles.js","sources":["../../../../../../../../react-base/src/components/ProgressBar/CircleProgressBar/CircleProgressBar.styles.ts"],"sourcesContent":["import { css } from 'styled-components';\n\nimport type { Size } from '../ProgressBar.types';\nimport { consts } from '../ProgressBar.consts';\nimport { Sizes } from '../../../consts';\nimport { getStrokeDashArray, getStrokeDashoffset } from '../../../utils';\nimport { getProgressFillColor } from '../ProgressBar.utils';\nimport { type TypographySize, Variables } from '../../../theme';\n\nexport const ContainerStyles = css`\n position: relative;\n display: flex;\n justify-content: center;\n`;\n\nexport const ProgressBarStyles = css<{ size: Size }>`\n ${({ size }) => css`\n width: ${`${consts[size].viewBoxSize}px`};\n height: ${`${consts[size].viewBoxSize}px`};\n overflow: inherit;\n transform: rotate(-90deg);\n `}\n`;\n\nexport const BackgroundStyles = css`\n ${({ theme }) => css`\n fill: transparent;\n stroke: ${theme.layer({ foundation: 'section' })[Variables.BackgroundFoundation]};\n `}\n`;\n\nexport const ProgressStyles = css<{ value: number; r: number; muted?: boolean }>`\n ${({ theme, value, r, muted }) => css`\n fill: transparent;\n stroke: ${getProgressFillColor(theme, muted)};\n stroke-linecap: round;\n stroke-dasharray: ${`${getStrokeDashArray(r)}`};\n stroke-dashoffset: ${getStrokeDashoffset(r, value)};\n transition: stroke-dashoffset 1s;\n `}\n`;\n\nconst getLabelSize = (size: Size): TypographySize<'label'> => {\n switch (size) {\n case Sizes.XSmall:\n case Sizes.Smallest:\n case Sizes.Small:\n return 'smallest';\n case Sizes.Medium:\n return 'extraSmall';\n case Sizes.Large:\n return 'small';\n default:\n throw new Error(`size \"${size}\" does not have a label size`);\n }\n};\n\nexport const LabelStyles = css<{ size: Size }>`\n ${({ size, theme }) => css`\n ${theme.typography('heading', getLabelSize(size))};\n position: absolute;\n top: 50%;\n left: 50%;\n color: ${theme.layer()[Variables.TextOnFoundationStrong]};\n transform: translate(-50%, -50%);\n `}\n`;\n"],"names":["ContainerStyles","css","ProgressBarStyles","size","consts","BackgroundStyles","theme","Variables","ProgressStyles","value","r","muted","getProgressFillColor","getStrokeDashArray","getStrokeDashoffset","getLabelSize","Sizes","LabelStyles"],"mappings":"2VASaA,EAAkBC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA,EAMlBC,EAAoBD,EAAAA;AAAAA,IAC7B,CAAC,CAAE,KAAAE,CAAA,IAAWF,EAAAA;AAAAA,aACL,GAAGG,EAAAA,OAAOD,CAAI,EAAE,WAAW,IAAI;AAAA,cAC9B,GAAGC,EAAAA,OAAOD,CAAI,EAAE,WAAW,IAAI;AAAA;AAAA;AAAA,GAG1C;AAAA,EAGUE,EAAmBJ,EAAAA;AAAAA,IAC5B,CAAC,CAAE,MAAAK,CAAA,IAAYL,EAAAA;AAAAA;AAAAA,cAELK,EAAM,MAAM,CAAE,WAAY,UAAW,EAAEC,EAAAA,UAAU,oBAAoB,CAAC;AAAA,GACjF;AAAA,EAGUC,EAAiBP,EAAAA;AAAAA,IAC1B,CAAC,CAAE,MAAAK,EAAO,MAAAG,EAAO,EAAAC,EAAG,MAAAC,KAAYV,EAAAA;AAAAA;AAAAA,cAEtBW,EAAAA,qBAAqBN,EAAOK,CAAK,CAAC;AAAA;AAAA,wBAExB,GAAGE,EAAAA,mBAAmBH,CAAC,CAAC,EAAE;AAAA,yBACzBI,EAAAA,oBAAoBJ,EAAGD,CAAK,CAAC;AAAA;AAAA,GAEnD;AAAA,EAGGM,EAAgBZ,GAAwC,CAC5D,OAAQA,EAAA,CACN,KAAKa,EAAAA,MAAM,OACX,KAAKA,EAAAA,MAAM,SACX,KAAKA,EAAAA,MAAM,MACT,MAAO,WACT,KAAKA,EAAAA,MAAM,OACT,MAAO,aACT,KAAKA,EAAAA,MAAM,MACT,MAAO,QACT,QACE,MAAM,IAAI,MAAM,SAASb,CAAI,8BAA8B,CAAA,CAEjE,EAEac,EAAchB,EAAAA;AAAAA,IACvB,CAAC,CAAE,KAAAE,EAAM,MAAAG,CAAA,IAAYL,EAAAA;AAAAA,MACnBK,EAAM,WAAW,UAAWS,EAAaZ,CAAI,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA,aAIxCG,EAAM,MAAA,EAAQC,EAAAA,UAAU,sBAAsB,CAAC;AAAA;AAAA,GAEzD;AAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("../../../../consts/index.js"),n=require("../../../../utils/sizesUtils.js"),u={1:"large",2:"medium",3:"small",4:"extraSmall"},y=(t,s,e)=>t.typography("display",e?n.getDisplayTypographySize(e):u[s]),d=({level:t=1,contrast:s,gutter:e,bold:l,size:o,disabled:r,type:a=`${p.TextElementTypes.Span}`,...i})=>({$level:t,type:a,$contrast:s,$gutter:e,$size:o,$bold:l,$disabled:r,...i});exports.font=y;exports.useProps=d;
|
|
2
2
|
//# sourceMappingURL=Display.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Display.utils.js","sources":["../../../../../../../../../react-base/src/components/Text/components/Display/Display.utils.ts"],"sourcesContent":["import type { Theme, TypographySize } from '../../../../theme';\nimport { TextElementTypes } from '../../../../consts';\nimport type { IProps, Levels, Size } from './Display.types';\nimport { getDisplayTypographySize } from '../../../../utils';\n\nconst DisplayLevelToTypographySize: Record<Levels, TypographySize<'display'>> = {\n 1: 'large',\n 2: 'medium',\n 3: 'small',\n 4: 'extraSmall',\n} as const;\n\nexport const font = (theme: Theme, level: Levels, size?: Size) =>\n theme.typography('display', size ? getDisplayTypographySize(size) : DisplayLevelToTypographySize[level]);\n\nexport const useProps = ({\n level = 1,\n contrast,\n gutter,\n bold,\n size,\n disabled,\n type = `${TextElementTypes.Span}`,\n ...rest\n}: IProps) => ({\n $level: level,\n type,\n $contrast: contrast,\n $gutter: gutter,\n $size: size,\n $bold: bold,\n $disabled: disabled,\n ...rest,\n});\n"],"names":["DisplayLevelToTypographySize","font","theme","level","size","getDisplayTypographySize","useProps","contrast","gutter","bold","disabled","type","TextElementTypes","rest"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Display.utils.js","sources":["../../../../../../../../../react-base/src/components/Text/components/Display/Display.utils.ts"],"sourcesContent":["import type { Theme, TypographySize } from '../../../../theme';\nimport { TextElementTypes } from '../../../../consts';\nimport type { IProps, Levels, Size } from './Display.types';\nimport { getDisplayTypographySize } from '../../../../utils';\n\nconst DisplayLevelToTypographySize: Record<Levels, TypographySize<'display'>> = {\n 1: 'large',\n 2: 'medium',\n 3: 'small',\n 4: 'extraSmall',\n} as const;\n\nexport const font = (theme: Theme, level: Levels, size?: Size) =>\n theme.typography('display', size ? getDisplayTypographySize(size) : DisplayLevelToTypographySize[level]);\n\nexport const useProps = ({\n level = 1,\n contrast,\n gutter,\n bold,\n size,\n disabled,\n type = `${TextElementTypes.Span}`,\n ...rest\n}: IProps) => ({\n $level: level,\n type,\n $contrast: contrast,\n $gutter: gutter,\n $size: size,\n $bold: bold,\n $disabled: disabled,\n ...rest,\n});\n"],"names":["DisplayLevelToTypographySize","font","theme","level","size","getDisplayTypographySize","useProps","contrast","gutter","bold","disabled","type","TextElementTypes","rest"],"mappings":"wMAKMA,EAA0E,CAC9E,EAAG,QACH,EAAG,SACH,EAAG,QACH,EAAG,YACL,EAEaC,EAAO,CAACC,EAAcC,EAAeC,IAChDF,EAAM,WAAW,UAAWE,EAAOC,EAAAA,yBAAyBD,CAAI,EAAIJ,EAA6BG,CAAK,CAAC,EAE5FG,EAAW,CAAC,CACvB,MAAAH,EAAQ,EACR,SAAAI,EACA,OAAAC,EACA,KAAAC,EACA,KAAAL,EACA,SAAAM,EACA,KAAAC,EAAO,GAAGC,mBAAiB,IAAI,GAC/B,GAAGC,CACL,KAAe,CACb,OAAQV,EACR,KAAAQ,EACA,UAAWJ,EACX,QAASC,EACT,MAAOJ,EACP,MAAOK,EACP,UAAWC,EACX,GAAGG,CACL"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../../../consts/index.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../../../consts/index.js"),p=require("../../../../utils/sizesUtils.js"),m=[`${e.TextElementTypes.H1}`,`${e.TextElementTypes.H2}`,`${e.TextElementTypes.H3}`,`${e.TextElementTypes.H4}`,`${e.TextElementTypes.H5}`,`${e.TextElementTypes.H6}`],u={1:"extraLarge",2:"large",3:"medium",4:"small",5:"extraSmall",6:"smallest"},y=(t,n,s)=>t.typography("heading",s?p.getHeadingTypographySize(s):u[n]),$=({type:t=`${e.TextElementTypes.H1}`,contrast:n,level:s,size:l,gutter:r,bold:o,disabled:a,...i})=>{const T=s||m.indexOf(t)+1||1;return{...i,type:t,$gutter:r,$bold:o,$size:l,$contrast:n,$disabled:a,$innerLevel:T}};exports.font=y;exports.useProps=$;
|
|
2
2
|
//# sourceMappingURL=Heading.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heading.utils.js","sources":["../../../../../../../../../react-base/src/components/Text/components/Heading/Heading.utils.ts"],"sourcesContent":["import type { IProps, Level, Size } from './Heading.types';\nimport { TextElementTypes } from '../../../../consts';\nimport type { Theme, TypographySize } from '../../../../theme';\nimport { getHeadingTypographySize } from '../../../../utils';\n\nconst allHeadings = [\n `${TextElementTypes.H1}`,\n `${TextElementTypes.H2}`,\n `${TextElementTypes.H3}`,\n `${TextElementTypes.H4}`,\n `${TextElementTypes.H5}`,\n `${TextElementTypes.H6}`,\n];\n\nconst LevelToTypographySize: Record<Level, TypographySize<'heading'>> = {\n 1: 'extraLarge',\n 2: 'large',\n 3: 'medium',\n 4: 'small',\n 5: 'extraSmall',\n 6: 'smallest',\n};\n\nexport const font = (theme: Theme, level: Level, size?: Size) =>\n theme.typography('heading', size ? getHeadingTypographySize(size) : LevelToTypographySize[level]);\n\nexport const useProps = ({\n type = `${TextElementTypes.H1}`,\n contrast,\n level,\n size,\n gutter,\n bold,\n disabled,\n ...rest\n}: IProps) => {\n const innerLevel = level || ((allHeadings.indexOf(type) + 1) as Level) || 1;\n\n return {\n ...rest,\n type,\n $gutter: gutter,\n $bold: bold,\n $size: size,\n $contrast: contrast,\n $disabled: disabled,\n $innerLevel: innerLevel,\n };\n};\n"],"names":["allHeadings","TextElementTypes","LevelToTypographySize","font","theme","level","size","getHeadingTypographySize","useProps","type","contrast","gutter","bold","disabled","rest","innerLevel"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Heading.utils.js","sources":["../../../../../../../../../react-base/src/components/Text/components/Heading/Heading.utils.ts"],"sourcesContent":["import type { IProps, Level, Size } from './Heading.types';\nimport { TextElementTypes } from '../../../../consts';\nimport type { Theme, TypographySize } from '../../../../theme';\nimport { getHeadingTypographySize } from '../../../../utils';\n\nconst allHeadings = [\n `${TextElementTypes.H1}`,\n `${TextElementTypes.H2}`,\n `${TextElementTypes.H3}`,\n `${TextElementTypes.H4}`,\n `${TextElementTypes.H5}`,\n `${TextElementTypes.H6}`,\n];\n\nconst LevelToTypographySize: Record<Level, TypographySize<'heading'>> = {\n 1: 'extraLarge',\n 2: 'large',\n 3: 'medium',\n 4: 'small',\n 5: 'extraSmall',\n 6: 'smallest',\n};\n\nexport const font = (theme: Theme, level: Level, size?: Size) =>\n theme.typography('heading', size ? getHeadingTypographySize(size) : LevelToTypographySize[level]);\n\nexport const useProps = ({\n type = `${TextElementTypes.H1}`,\n contrast,\n level,\n size,\n gutter,\n bold,\n disabled,\n ...rest\n}: IProps) => {\n const innerLevel = level || ((allHeadings.indexOf(type) + 1) as Level) || 1;\n\n return {\n ...rest,\n type,\n $gutter: gutter,\n $bold: bold,\n $size: size,\n $contrast: contrast,\n $disabled: disabled,\n $innerLevel: innerLevel,\n };\n};\n"],"names":["allHeadings","TextElementTypes","LevelToTypographySize","font","theme","level","size","getHeadingTypographySize","useProps","type","contrast","gutter","bold","disabled","rest","innerLevel"],"mappings":"wMAKMA,EAAc,CAClB,GAAGC,EAAAA,iBAAiB,EAAE,GACtB,GAAGA,EAAAA,iBAAiB,EAAE,GACtB,GAAGA,EAAAA,iBAAiB,EAAE,GACtB,GAAGA,EAAAA,iBAAiB,EAAE,GACtB,GAAGA,EAAAA,iBAAiB,EAAE,GACtB,GAAGA,EAAAA,iBAAiB,EAAE,EACxB,EAEMC,EAAkE,CACtE,EAAG,aACH,EAAG,QACH,EAAG,SACH,EAAG,QACH,EAAG,aACH,EAAG,UACL,EAEaC,EAAO,CAACC,EAAcC,EAAcC,IAC/CF,EAAM,WAAW,UAAWE,EAAOC,EAAAA,yBAAyBD,CAAI,EAAIJ,EAAsBG,CAAK,CAAC,EAErFG,EAAW,CAAC,CACvB,KAAAC,EAAO,GAAGR,mBAAiB,EAAE,GAC7B,SAAAS,EACA,MAAAL,EACA,KAAAC,EACA,OAAAK,EACA,KAAAC,EACA,SAAAC,EACA,GAAGC,CACL,IAAc,CACZ,MAAMC,EAAaV,GAAWL,EAAY,QAAQS,CAAI,EAAI,GAAgB,EAE1E,MAAO,CACL,GAAGK,EACH,KAAAL,EACA,QAASE,EACT,MAAOC,EACP,MAAON,EACP,UAAWI,EACX,UAAWG,EACX,YAAaE,CAAA,CAEjB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
1
2
|
import type { MenuItemProps as RCMenuItemProps } from '@rc-component/menu/lib/MenuItem';
|
|
2
3
|
import type { MenuTypes } from '../../../react-base/src/components/Menu';
|
|
3
4
|
import type { BadgeTypes } from '../../../react-base/src/components/Badge';
|
|
@@ -6,6 +7,7 @@ export interface IMenuItemProps extends RCMenuItemProps {
|
|
|
6
7
|
path?: string;
|
|
7
8
|
badge?: Omit<BadgeTypes.IProps, 'size'>;
|
|
8
9
|
itemRender?: MenuTypes.ItemRender;
|
|
10
|
+
children?: ReactNode;
|
|
9
11
|
}
|
|
10
12
|
declare const MenuItem: import("react").ForwardRefExoticComponent<IMenuItemProps & import("react").RefAttributes<HTMLElement>>;
|
|
11
13
|
export default MenuItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/Menu/components/MenuItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/Menu/components/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EAQf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,aAAa,IAAI,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAExF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAW3E,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,UAAU,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC;IAClC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,QAAQ,wGA4Cb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.js","sources":["../../../../../src/components/Menu/components/MenuItem.tsx"],"sourcesContent":["import {\n type ReactElement,\n forwardRef,\n useCallback,\n useContext,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { MenuItem as RCMenuItem } from '@rc-component/menu';\nimport type { MenuItemProps as RCMenuItemProps } from '@rc-component/menu/lib/MenuItem';\nimport { Positions } from 'acinguiux-ds-react-base/consts';\nimport type { MenuTypes } from 'acinguiux-ds-react-base/components/Menu';\nimport type { BadgeTypes } from 'acinguiux-ds-react-base/components/Badge';\nimport { getSmallerSize } from 'acinguiux-ds-react-base/utils/sizesUtils';\n\nimport { getString } from '../../../utils/textUtils';\nimport MenuLabel from './MenuLabel';\nimport Tooltip from '../../Tooltip/Tooltip';\nimport MenuContext from '../MenuContext';\nimport { TooltipContainer, TooltipLabel } from '../styles/menuLabel.styles';\nimport { getTooltipLabelSize } from '../Menu.utils';\nimport Badge from '../../Badge/Badge';\n\nexport interface IMenuItemProps extends RCMenuItemProps {\n level?: number;\n path?: string;\n badge?: Omit<BadgeTypes.IProps, 'size'>;\n itemRender?: MenuTypes.ItemRender;\n}\n\nconst MenuItem = forwardRef<HTMLElement, IMenuItemProps>(\n ({ children, itemIcon, level, path, badge, itemRender, ...rest }, ref): ReactElement => {\n const menuItemRef = useRef<HTMLElement>(null);\n const [isTooltipOpen, setIsTooltipOpen] = useState(false);\n const { inlineCollapsed, size } = useContext(MenuContext);\n useImperativeHandle<HTMLElement | null, HTMLElement | null>(ref, () => menuItemRef.current);\n\n const onMouseEnter = useCallback(() => setIsTooltipOpen(true), []);\n const onMouseLeave = useCallback(() => setIsTooltipOpen(false), []);\n const isTooltipDisabled = useMemo(\n () => !inlineCollapsed || level === undefined || level > 0,\n [inlineCollapsed, level],\n );\n\n return (\n <RCMenuItem\n ref={menuItemRef}\n aria-label={getString(children)}\n {...rest}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n <Tooltip\n targetRef={menuItemRef}\n isOpen={!isTooltipDisabled && isTooltipOpen}\n isDisabled={isTooltipDisabled}\n placement={Positions.Right}\n trigger={\n <MenuLabel parentRef={menuItemRef} path={path} itemIcon={itemIcon} itemRender={itemRender} badge={badge}>\n {children}\n </MenuLabel>\n }\n overlay={\n <TooltipContainer gap=\"1rem\">\n <TooltipLabel size={getTooltipLabelSize(size)}>{children}</TooltipLabel>\n {badge && <Badge size={getSmallerSize(size) as BadgeTypes.Size} {...badge} />}\n </TooltipContainer>\n }\n delay={50}\n closeDelay={200}\n />\n </RCMenuItem>\n );\n },\n);\n\nexport default MenuItem;\n"],"names":["MenuItem","forwardRef","children","itemIcon","level","path","badge","itemRender","rest","ref","menuItemRef","useRef","isTooltipOpen","setIsTooltipOpen","useState","inlineCollapsed","size","useContext","MenuContext","useImperativeHandle","onMouseEnter","useCallback","onMouseLeave","isTooltipDisabled","useMemo","jsx","RCMenuItem","getString","Tooltip","Positions","MenuLabel","jsxs","TooltipContainer","TooltipLabel","getTooltipLabelSize","Badge","getSmallerSize"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"MenuItem.js","sources":["../../../../../src/components/Menu/components/MenuItem.tsx"],"sourcesContent":["import {\n type ReactElement,\n type ReactNode,\n forwardRef,\n useCallback,\n useContext,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { MenuItem as RCMenuItem } from '@rc-component/menu';\nimport type { MenuItemProps as RCMenuItemProps } from '@rc-component/menu/lib/MenuItem';\nimport { Positions } from 'acinguiux-ds-react-base/consts';\nimport type { MenuTypes } from 'acinguiux-ds-react-base/components/Menu';\nimport type { BadgeTypes } from 'acinguiux-ds-react-base/components/Badge';\nimport { getSmallerSize } from 'acinguiux-ds-react-base/utils/sizesUtils';\n\nimport { getString } from '../../../utils/textUtils';\nimport MenuLabel from './MenuLabel';\nimport Tooltip from '../../Tooltip/Tooltip';\nimport MenuContext from '../MenuContext';\nimport { TooltipContainer, TooltipLabel } from '../styles/menuLabel.styles';\nimport { getTooltipLabelSize } from '../Menu.utils';\nimport Badge from '../../Badge/Badge';\n\nexport interface IMenuItemProps extends RCMenuItemProps {\n level?: number;\n path?: string;\n badge?: Omit<BadgeTypes.IProps, 'size'>;\n itemRender?: MenuTypes.ItemRender;\n children?: ReactNode;\n}\n\nconst MenuItem = forwardRef<HTMLElement, IMenuItemProps>(\n ({ children, itemIcon, level, path, badge, itemRender, ...rest }, ref): ReactElement => {\n const menuItemRef = useRef<HTMLElement>(null);\n const [isTooltipOpen, setIsTooltipOpen] = useState(false);\n const { inlineCollapsed, size } = useContext(MenuContext);\n useImperativeHandle<HTMLElement | null, HTMLElement | null>(ref, () => menuItemRef.current);\n\n const onMouseEnter = useCallback(() => setIsTooltipOpen(true), []);\n const onMouseLeave = useCallback(() => setIsTooltipOpen(false), []);\n const isTooltipDisabled = useMemo(\n () => !inlineCollapsed || level === undefined || level > 0,\n [inlineCollapsed, level],\n );\n\n return (\n <RCMenuItem\n ref={menuItemRef}\n aria-label={getString(children)}\n {...rest}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n <Tooltip\n targetRef={menuItemRef}\n isOpen={!isTooltipDisabled && isTooltipOpen}\n isDisabled={isTooltipDisabled}\n placement={Positions.Right}\n trigger={\n <MenuLabel parentRef={menuItemRef} path={path} itemIcon={itemIcon} itemRender={itemRender} badge={badge}>\n {children}\n </MenuLabel>\n }\n overlay={\n <TooltipContainer gap=\"1rem\">\n <TooltipLabel size={getTooltipLabelSize(size)}>{children}</TooltipLabel>\n {badge && <Badge size={getSmallerSize(size) as BadgeTypes.Size} {...badge} />}\n </TooltipContainer>\n }\n delay={50}\n closeDelay={200}\n />\n </RCMenuItem>\n );\n },\n);\n\nexport default MenuItem;\n"],"names":["MenuItem","forwardRef","children","itemIcon","level","path","badge","itemRender","rest","ref","menuItemRef","useRef","isTooltipOpen","setIsTooltipOpen","useState","inlineCollapsed","size","useContext","MenuContext","useImperativeHandle","onMouseEnter","useCallback","onMouseLeave","isTooltipDisabled","useMemo","jsx","RCMenuItem","getString","Tooltip","Positions","MenuLabel","jsxs","TooltipContainer","TooltipLabel","getTooltipLabelSize","Badge","getSmallerSize"],"mappings":";;;;;;;;;;;;AAmCA,MAAMA,IAAWC;AAAA,EACf,CAAC,EAAE,UAAAC,GAAU,UAAAC,GAAU,OAAAC,GAAO,MAAAC,GAAM,OAAAC,GAAO,YAAAC,GAAY,GAAGC,EAAA,GAAQC,MAAsB;AACtF,UAAMC,IAAcC,EAAoB,IAAI,GACtC,CAACC,GAAeC,CAAgB,IAAIC,EAAS,EAAK,GAClD,EAAE,iBAAAC,GAAiB,MAAAC,MAASC,EAAWC,CAAW;AACxD,IAAAC,EAA4DV,GAAK,MAAMC,EAAY,OAAO;AAE1F,UAAMU,IAAeC,EAAY,MAAMR,EAAiB,EAAI,GAAG,CAAA,CAAE,GAC3DS,IAAeD,EAAY,MAAMR,EAAiB,EAAK,GAAG,CAAA,CAAE,GAC5DU,IAAoBC;AAAA,MACxB,MAAM,CAACT,KAAmBX,MAAU,UAAaA,IAAQ;AAAA,MACzD,CAACW,GAAiBX,CAAK;AAAA,IAAA;AAGzB,WACE,gBAAAqB;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,KAAKhB;AAAA,QACL,cAAYiB,EAAUzB,CAAQ;AAAA,QAC7B,GAAGM;AAAA,QACJ,cAAAY;AAAA,QACA,cAAAE;AAAA,QAEA,UAAA,gBAAAG;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,WAAWlB;AAAA,YACX,QAAQ,CAACa,KAAqBX;AAAA,YAC9B,YAAYW;AAAA,YACZ,WAAWM,EAAU;AAAA,YACrB,2BACGC,GAAA,EAAU,WAAWpB,GAAa,MAAAL,GAAY,UAAAF,GAAoB,YAAAI,GAAwB,OAAAD,GACxF,UAAAJ,EAAA,CACH;AAAA,YAEF,SACE,gBAAA6B,EAACC,GAAA,EAAiB,KAAI,QACpB,UAAA;AAAA,cAAA,gBAAAP,EAACQ,GAAA,EAAa,MAAMC,EAAoBlB,CAAI,GAAI,UAAAd,GAAS;AAAA,cACxDI,uBAAU6B,GAAA,EAAM,MAAMC,EAAepB,CAAI,GAAuB,GAAGV,EAAA,CAAO;AAAA,YAAA,GAC7E;AAAA,YAEF,OAAO;AAAA,YACP,YAAY;AAAA,UAAA;AAAA,QAAA;AAAA,MACd;AAAA,IAAA;AAAA,EAGN;AACF;"}
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
import { css as o } from "styled-components";
|
|
2
2
|
import { consts as e } from "./FormField.consts.js";
|
|
3
|
-
import { getColor as
|
|
4
|
-
import { getLabelTypographySize as
|
|
5
|
-
|
|
6
|
-
import "../../theme/types/layer.js";
|
|
7
|
-
const n = o`
|
|
3
|
+
import { getColor as s } from "./FormField.utils.js";
|
|
4
|
+
import { getLabelTypographySize as i } from "../../utils/sizesUtils.js";
|
|
5
|
+
const f = o`
|
|
8
6
|
${({ $size: p }) => o`
|
|
9
7
|
display: flex;
|
|
10
8
|
flex-direction: column;
|
|
11
9
|
gap: ${e[p].gap}px;
|
|
12
10
|
width: 100%;
|
|
13
11
|
`}
|
|
14
|
-
`,
|
|
12
|
+
`, g = o`
|
|
15
13
|
${({ $kind: p, $size: t, $disabled: l, theme: r }) => o`
|
|
16
|
-
${r.typography("label",
|
|
14
|
+
${r.typography("label", i(t))};
|
|
17
15
|
display: flex;
|
|
18
|
-
color: ${
|
|
16
|
+
color: ${s(r, l, p)};
|
|
19
17
|
`};
|
|
20
18
|
`;
|
|
21
19
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
g as MessageStyles,
|
|
21
|
+
f as Styles
|
|
24
22
|
};
|
|
25
23
|
//# sourceMappingURL=FormField.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormField.styles.js","sources":["../../../../../../../react-base/src/components/FormField/FormField.styles.ts"],"sourcesContent":["import { css } from 'styled-components';\n\nimport { consts } from './FormField.consts';\nimport type { Size, Kind } from './FormField.types';\nimport { getColor } from './FormField.utils';\nimport { getLabelTypographySize } from '../../utils';\n\ntype MessageStyledProps = {\n $size: Size;\n $disabled: boolean;\n $kind?: Kind;\n};\n\nexport const Styles = css<{ $size: Size }>`\n ${({ $size }) => css`\n display: flex;\n flex-direction: column;\n gap: ${consts[$size].gap}px;\n width: 100%;\n `}\n`;\n\nexport const MessageStyles = css<MessageStyledProps>`\n ${({ $kind, $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size))};\n display: flex;\n color: ${getColor(theme, $disabled, $kind)};\n `};\n`;\n"],"names":["Styles","css","$size","consts","MessageStyles","$kind","$disabled","theme","getLabelTypographySize","getColor"],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormField.styles.js","sources":["../../../../../../../react-base/src/components/FormField/FormField.styles.ts"],"sourcesContent":["import { css } from 'styled-components';\n\nimport { consts } from './FormField.consts';\nimport type { Size, Kind } from './FormField.types';\nimport { getColor } from './FormField.utils';\nimport { getLabelTypographySize } from '../../utils';\n\ntype MessageStyledProps = {\n $size: Size;\n $disabled: boolean;\n $kind?: Kind;\n};\n\nexport const Styles = css<{ $size: Size }>`\n ${({ $size }) => css`\n display: flex;\n flex-direction: column;\n gap: ${consts[$size].gap}px;\n width: 100%;\n `}\n`;\n\nexport const MessageStyles = css<MessageStyledProps>`\n ${({ $kind, $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size))};\n display: flex;\n color: ${getColor(theme, $disabled, $kind)};\n `};\n`;\n"],"names":["Styles","css","$size","consts","MessageStyles","$kind","$disabled","theme","getLabelTypographySize","getColor"],"mappings":";;;;AAaO,MAAMA,IAASC;AAAA,IAClB,CAAC,EAAE,OAAAC,EAAA,MAAYD;AAAA;AAAA;AAAA,WAGRE,EAAOD,CAAK,EAAE,GAAG;AAAA;AAAA,GAEzB;AAAA,GAGUE,IAAgBH;AAAA,IACzB,CAAC,EAAE,OAAAI,GAAO,OAAAH,GAAO,WAAAI,GAAW,OAAAC,QAAYN;AAAA,MACtCM,EAAM,WAAW,SAASC,EAAuBN,CAAK,CAAC,CAAC;AAAA;AAAA,aAEjDO,EAASF,GAAOD,GAAWD,CAAK,CAAC;AAAA,GAC3C;AAAA;"}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { css as
|
|
1
|
+
import { css as a } from "styled-components";
|
|
2
2
|
import { consts as r } from "../../FormField.consts.js";
|
|
3
3
|
import { Variables as n } from "../../../../theme/types/layer.js";
|
|
4
4
|
import { getLabelTypographySize as l } from "../../../../utils/sizesUtils.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
${({ $size: o, $disabled: a, theme: e }) => t`
|
|
5
|
+
const c = a`
|
|
6
|
+
${({ $size: o, $disabled: t, theme: e }) => a`
|
|
8
7
|
${e.typography("label", l(o))};
|
|
9
8
|
|
|
10
9
|
display: flex;
|
|
11
10
|
flex-direction: column;
|
|
12
11
|
flex-grow: 1;
|
|
13
12
|
gap: ${r[o].headerGap}px;
|
|
14
|
-
color: ${e.layer({ foundation: "surface", disabled:
|
|
13
|
+
color: ${e.layer({ foundation: "surface", disabled: t })[n.TextOnFoundationStrong]};
|
|
15
14
|
`}
|
|
16
|
-
`,
|
|
17
|
-
${({ $size: o }) =>
|
|
15
|
+
`, d = a`
|
|
16
|
+
${({ $size: o }) => a`
|
|
18
17
|
display: flex;
|
|
19
18
|
flex-direction: row;
|
|
20
19
|
align-items: center;
|
|
@@ -22,50 +21,50 @@ const d = t`
|
|
|
22
21
|
flex-grow: 1;
|
|
23
22
|
gap: ${r[o].labelHelperGap}px;
|
|
24
23
|
`};
|
|
25
|
-
`,
|
|
26
|
-
${({ $size: o, $disabled:
|
|
24
|
+
`, f = a`
|
|
25
|
+
${({ $size: o, $disabled: t, theme: e }) => a`
|
|
27
26
|
${e.typography("label", l(o), "strong")};
|
|
28
27
|
|
|
29
|
-
color: ${e.layer({ foundation: "surface", disabled:
|
|
28
|
+
color: ${e.layer({ foundation: "surface", disabled: t })[n.TextOnFoundationStrong]};
|
|
30
29
|
display: flex;
|
|
31
30
|
gap: ${r[o].labelContainerGap}px;
|
|
32
31
|
align-items: center;
|
|
33
32
|
`};
|
|
34
|
-
`,
|
|
33
|
+
`, g = a`
|
|
35
34
|
display: flex;
|
|
36
35
|
gap: 6px;
|
|
37
|
-
`,
|
|
38
|
-
${({ $size: o, $disabled:
|
|
36
|
+
`, x = a`
|
|
37
|
+
${({ $size: o, $disabled: t, theme: e }) => a`
|
|
39
38
|
${e.typography("label", l(o), "strong")};
|
|
40
39
|
|
|
41
|
-
color: ${e.layer({ foundation: "surface", disabled:
|
|
40
|
+
color: ${e.layer({ foundation: "surface", disabled: t })[n.TextOnFoundationStrong]};
|
|
42
41
|
`}
|
|
43
|
-
`,
|
|
44
|
-
${({ $size: o, $disabled:
|
|
42
|
+
`, b = a`
|
|
43
|
+
${({ $size: o, $disabled: t, theme: e }) => a`
|
|
45
44
|
${e.typography("label", l(o), "strong")};
|
|
46
45
|
|
|
47
46
|
color: ${e.layer({
|
|
48
47
|
foundation: "surface",
|
|
49
48
|
sentiment: "negative",
|
|
50
49
|
sentimentProminence: "transparent",
|
|
51
|
-
disabled:
|
|
50
|
+
disabled: t
|
|
52
51
|
})[n.TextOnSentimentOnBackground]};
|
|
53
52
|
margin-left: 1px;
|
|
54
53
|
`}
|
|
55
|
-
`,
|
|
56
|
-
${({ $size: o, $disabled:
|
|
54
|
+
`, u = a`
|
|
55
|
+
${({ $size: o, $disabled: t, theme: e }) => a`
|
|
57
56
|
${e.typography("label", l(o))};
|
|
58
57
|
|
|
59
|
-
color: ${e.layer({ foundation: "surface", disabled:
|
|
58
|
+
color: ${e.layer({ foundation: "surface", disabled: t })[n.TextOnFoundationSubtle]};
|
|
60
59
|
`}
|
|
61
60
|
`;
|
|
62
61
|
export {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
62
|
+
u as DescriptionStyles,
|
|
63
|
+
c as HeaderStyles,
|
|
64
|
+
f as LabelContainerStyles,
|
|
65
|
+
d as LabelHelperStyles,
|
|
66
|
+
g as LabelTextStyles,
|
|
67
|
+
b as MandatoryStyles,
|
|
68
|
+
x as TitleStyles
|
|
70
69
|
};
|
|
71
70
|
//# sourceMappingURL=FormFieldLabel.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormFieldLabel.styles.js","sources":["../../../../../../../../../react-base/src/components/FormField/components/FormFieldLabel/FormFieldLabel.styles.ts"],"sourcesContent":["import { css } from 'styled-components';\n\nimport type { Size } from '../../FormField.types';\nimport { consts } from '../../FormField.consts';\nimport { Variables } from '../../../../theme';\nimport { getLabelTypographySize } from '../../../../utils';\n\ntype StyledProps = {\n $size: Size;\n $disabled?: boolean;\n};\n\nexport const HeaderStyles = css<StyledProps>`\n ${({ $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size))};\n\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n gap: ${consts[$size].headerGap}px;\n color: ${theme.layer({ foundation: 'surface', disabled: $disabled })[Variables.TextOnFoundationStrong]};\n `}\n`;\n\nexport const LabelHelperStyles = css<StyledProps>`\n ${({ $size }) => css`\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n flex-grow: 1;\n gap: ${consts[$size].labelHelperGap}px;\n `};\n`;\n\nexport const LabelContainerStyles = css<StyledProps>`\n ${({ $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size), 'strong')};\n\n color: ${theme.layer({ foundation: 'surface', disabled: $disabled })[Variables.TextOnFoundationStrong]};\n display: flex;\n gap: ${consts[$size].labelContainerGap}px;\n align-items: center;\n `};\n`;\n\nexport const LabelTextStyles = css`\n display: flex;\n gap: 6px;\n`;\n\nexport const TitleStyles = css<StyledProps>`\n ${({ $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size), 'strong')};\n\n color: ${theme.layer({ foundation: 'surface', disabled: $disabled })[Variables.TextOnFoundationStrong]};\n `}\n`;\n\nexport const MandatoryStyles = css<StyledProps>`\n ${({ $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size), 'strong')};\n\n color: ${theme.layer({\n foundation: 'surface',\n sentiment: 'negative',\n sentimentProminence: 'transparent',\n disabled: $disabled,\n })[Variables.TextOnSentimentOnBackground]};\n margin-left: 1px;\n `}\n`;\n\nexport const DescriptionStyles = css<StyledProps>`\n ${({ $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size))};\n\n color: ${theme.layer({ foundation: 'surface', disabled: $disabled })[Variables.TextOnFoundationSubtle]};\n `}\n`;\n"],"names":["HeaderStyles","css","$size","$disabled","theme","getLabelTypographySize","consts","Variables","LabelHelperStyles","LabelContainerStyles","LabelTextStyles","TitleStyles","MandatoryStyles","DescriptionStyles"],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormFieldLabel.styles.js","sources":["../../../../../../../../../react-base/src/components/FormField/components/FormFieldLabel/FormFieldLabel.styles.ts"],"sourcesContent":["import { css } from 'styled-components';\n\nimport type { Size } from '../../FormField.types';\nimport { consts } from '../../FormField.consts';\nimport { Variables } from '../../../../theme';\nimport { getLabelTypographySize } from '../../../../utils';\n\ntype StyledProps = {\n $size: Size;\n $disabled?: boolean;\n};\n\nexport const HeaderStyles = css<StyledProps>`\n ${({ $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size))};\n\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n gap: ${consts[$size].headerGap}px;\n color: ${theme.layer({ foundation: 'surface', disabled: $disabled })[Variables.TextOnFoundationStrong]};\n `}\n`;\n\nexport const LabelHelperStyles = css<StyledProps>`\n ${({ $size }) => css`\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n flex-grow: 1;\n gap: ${consts[$size].labelHelperGap}px;\n `};\n`;\n\nexport const LabelContainerStyles = css<StyledProps>`\n ${({ $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size), 'strong')};\n\n color: ${theme.layer({ foundation: 'surface', disabled: $disabled })[Variables.TextOnFoundationStrong]};\n display: flex;\n gap: ${consts[$size].labelContainerGap}px;\n align-items: center;\n `};\n`;\n\nexport const LabelTextStyles = css`\n display: flex;\n gap: 6px;\n`;\n\nexport const TitleStyles = css<StyledProps>`\n ${({ $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size), 'strong')};\n\n color: ${theme.layer({ foundation: 'surface', disabled: $disabled })[Variables.TextOnFoundationStrong]};\n `}\n`;\n\nexport const MandatoryStyles = css<StyledProps>`\n ${({ $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size), 'strong')};\n\n color: ${theme.layer({\n foundation: 'surface',\n sentiment: 'negative',\n sentimentProminence: 'transparent',\n disabled: $disabled,\n })[Variables.TextOnSentimentOnBackground]};\n margin-left: 1px;\n `}\n`;\n\nexport const DescriptionStyles = css<StyledProps>`\n ${({ $size, $disabled, theme }) => css`\n ${theme.typography('label', getLabelTypographySize($size))};\n\n color: ${theme.layer({ foundation: 'surface', disabled: $disabled })[Variables.TextOnFoundationSubtle]};\n `}\n`;\n"],"names":["HeaderStyles","css","$size","$disabled","theme","getLabelTypographySize","consts","Variables","LabelHelperStyles","LabelContainerStyles","LabelTextStyles","TitleStyles","MandatoryStyles","DescriptionStyles"],"mappings":";;;;AAYO,MAAMA,IAAeC;AAAA,IACxB,CAAC,EAAE,OAAAC,GAAO,WAAAC,GAAW,OAAAC,QAAYH;AAAA,MAC/BG,EAAM,WAAW,SAASC,EAAuBH,CAAK,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,WAKnDI,EAAOJ,CAAK,EAAE,SAAS;AAAA,aACrBE,EAAM,MAAM,EAAE,YAAY,WAAW,UAAUD,GAAW,EAAEI,EAAU,sBAAsB,CAAC;AAAA,GACvG;AAAA,GAGUC,IAAoBP;AAAA,IAC7B,CAAC,EAAE,OAAAC,EAAA,MAAYD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAMRK,EAAOJ,CAAK,EAAE,cAAc;AAAA,GACpC;AAAA,GAGUO,IAAuBR;AAAA,IAChC,CAAC,EAAE,OAAAC,GAAO,WAAAC,GAAW,OAAAC,QAAYH;AAAA,MAC/BG,EAAM,WAAW,SAASC,EAAuBH,CAAK,GAAG,QAAQ,CAAC;AAAA;AAAA,aAE3DE,EAAM,MAAM,EAAE,YAAY,WAAW,UAAUD,GAAW,EAAEI,EAAU,sBAAsB,CAAC;AAAA;AAAA,WAE/FD,EAAOJ,CAAK,EAAE,iBAAiB;AAAA;AAAA,GAEvC;AAAA,GAGUQ,IAAkBT;AAAA;AAAA;AAAA,GAKlBU,IAAcV;AAAA,IACvB,CAAC,EAAE,OAAAC,GAAO,WAAAC,GAAW,OAAAC,QAAYH;AAAA,MAC/BG,EAAM,WAAW,SAASC,EAAuBH,CAAK,GAAG,QAAQ,CAAC;AAAA;AAAA,aAE3DE,EAAM,MAAM,EAAE,YAAY,WAAW,UAAUD,GAAW,EAAEI,EAAU,sBAAsB,CAAC;AAAA,GACvG;AAAA,GAGUK,IAAkBX;AAAA,IAC3B,CAAC,EAAE,OAAAC,GAAO,WAAAC,GAAW,OAAAC,QAAYH;AAAA,MAC/BG,EAAM,WAAW,SAASC,EAAuBH,CAAK,GAAG,QAAQ,CAAC;AAAA;AAAA,aAE3DE,EAAM,MAAM;AAAA,EACnB,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,qBAAqB;AAAA,EACrB,UAAUD;AACZ,CAAC,EAAEI,EAAU,2BAA2B,CAAC;AAAA;AAAA,GAE1C;AAAA,GAGUM,IAAoBZ;AAAA,IAC7B,CAAC,EAAE,OAAAC,GAAO,WAAAC,GAAW,OAAAC,QAAYH;AAAA,MAC/BG,EAAM,WAAW,SAASC,EAAuBH,CAAK,CAAC,CAAC;AAAA;AAAA,aAEjDE,EAAM,MAAM,EAAE,YAAY,WAAW,UAAUD,GAAW,EAAEI,EAAU,sBAAsB,CAAC;AAAA,GACvG;AAAA;"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { FabricsVariables as l } from "acinguiux-ds-fabrics";
|
|
2
2
|
import { Variables as t } from "../../theme/types/layer.js";
|
|
3
3
|
import { getLabelTypographySize as a } from "../../utils/sizesUtils.js";
|
|
4
|
-
|
|
5
|
-
const p = (n, o) => n.typography("label", a(o)), y = (n, o) => n.typography("label", a(o)), b = (n, o, e) => {
|
|
4
|
+
const u = (n, o) => n.typography("label", a(o)), p = (n, o) => n.typography("label", a(o)), y = (n, o, e) => {
|
|
6
5
|
const r = n.layer({
|
|
7
6
|
foundation: "surface",
|
|
8
7
|
state: o
|
|
@@ -14,8 +13,8 @@ const p = (n, o) => n.typography("label", a(o)), y = (n, o) => n.typography("lab
|
|
|
14
13
|
};
|
|
15
14
|
};
|
|
16
15
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
p as getPaginationNumbersFontStyle,
|
|
17
|
+
y as getStylesForState,
|
|
18
|
+
u as getTextFontStyle
|
|
20
19
|
};
|
|
21
20
|
//# sourceMappingURL=Paginations.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Paginations.utils.js","sources":["../../../../../../../react-base/src/components/Pagination/Paginations.utils.ts"],"sourcesContent":["import type { CSSProperties } from 'styled-components';\nimport { FabricsVariables } from 'acinguiux-ds-fabrics';\n\nimport type { Size } from './Pagination.types';\nimport { type Theme, Variables } from '../../theme';\nimport { getLabelTypographySize } from '../../utils';\n\nexport const getTextFontStyle = (theme: Theme, size: Size) => theme.typography('label', getLabelTypographySize(size));\n\nexport const getPaginationNumbersFontStyle = (theme: Theme, size: Size) =>\n theme.typography('label', getLabelTypographySize(size));\n\nexport const getStylesForState = (\n theme: Theme,\n state: FabricsVariables.StateType,\n isSelected?: boolean,\n): CSSProperties => {\n const layer = theme.layer({\n foundation: 'surface',\n state,\n });\n const borderColor = isSelected\n ? layer[Variables.BorderOnSelectedOnBackground]\n : layer[Variables.BorderOnFoundationMedium];\n\n return {\n backgroundColor: isSelected ? layer[Variables.BackgroundSelected] : layer[Variables.BackgroundFoundation],\n color: isSelected ? layer[Variables.TextOnSelectedBackgroundStrong] : layer[Variables.TextOnFoundationStrong],\n border: `${isSelected && state === FabricsVariables.States.Resting ? 0 : 1}px solid ${borderColor}`,\n };\n};\n"],"names":["getTextFontStyle","theme","size","getLabelTypographySize","getPaginationNumbersFontStyle","getStylesForState","state","isSelected","layer","borderColor","Variables","FabricsVariables"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Paginations.utils.js","sources":["../../../../../../../react-base/src/components/Pagination/Paginations.utils.ts"],"sourcesContent":["import type { CSSProperties } from 'styled-components';\nimport { FabricsVariables } from 'acinguiux-ds-fabrics';\n\nimport type { Size } from './Pagination.types';\nimport { type Theme, Variables } from '../../theme';\nimport { getLabelTypographySize } from '../../utils';\n\nexport const getTextFontStyle = (theme: Theme, size: Size) => theme.typography('label', getLabelTypographySize(size));\n\nexport const getPaginationNumbersFontStyle = (theme: Theme, size: Size) =>\n theme.typography('label', getLabelTypographySize(size));\n\nexport const getStylesForState = (\n theme: Theme,\n state: FabricsVariables.StateType,\n isSelected?: boolean,\n): CSSProperties => {\n const layer = theme.layer({\n foundation: 'surface',\n state,\n });\n const borderColor = isSelected\n ? layer[Variables.BorderOnSelectedOnBackground]\n : layer[Variables.BorderOnFoundationMedium];\n\n return {\n backgroundColor: isSelected ? layer[Variables.BackgroundSelected] : layer[Variables.BackgroundFoundation],\n color: isSelected ? layer[Variables.TextOnSelectedBackgroundStrong] : layer[Variables.TextOnFoundationStrong],\n border: `${isSelected && state === FabricsVariables.States.Resting ? 0 : 1}px solid ${borderColor}`,\n };\n};\n"],"names":["getTextFontStyle","theme","size","getLabelTypographySize","getPaginationNumbersFontStyle","getStylesForState","state","isSelected","layer","borderColor","Variables","FabricsVariables"],"mappings":";;;AAOO,MAAMA,IAAmB,CAACC,GAAcC,MAAeD,EAAM,WAAW,SAASE,EAAuBD,CAAI,CAAC,GAEvGE,IAAgC,CAACH,GAAcC,MAC1DD,EAAM,WAAW,SAASE,EAAuBD,CAAI,CAAC,GAE3CG,IAAoB,CAC/BJ,GACAK,GACAC,MACkB;AAClB,QAAMC,IAAQP,EAAM,MAAM;AAAA,IACxB,YAAY;AAAA,IACZ,OAAAK;AAAA,EAAA,CACD,GACKG,IAAcF,IAChBC,EAAME,EAAU,4BAA4B,IAC5CF,EAAME,EAAU,wBAAwB;AAE5C,SAAO;AAAA,IACL,iBAAiBH,IAAaC,EAAME,EAAU,kBAAkB,IAAIF,EAAME,EAAU,oBAAoB;AAAA,IACxG,OAAOH,IAAaC,EAAME,EAAU,8BAA8B,IAAIF,EAAME,EAAU,sBAAsB;AAAA,IAC5G,QAAQ,GAAGH,KAAcD,MAAUK,EAAiB,OAAO,UAAU,IAAI,CAAC,YAAYF,CAAW;AAAA,EAAA;AAErG;"}
|
|
@@ -2,26 +2,25 @@ import { css as e } from "styled-components";
|
|
|
2
2
|
import { consts as a } from "../ProgressBar.consts.js";
|
|
3
3
|
import { Sizes as o } from "../../../consts/index.js";
|
|
4
4
|
import { getStrokeDashArray as i, getStrokeDashoffset as f } from "../../../utils/circleSvgUtils.js";
|
|
5
|
-
import "acinguiux-ds-fabrics";
|
|
6
|
-
import { Variables as n } from "../../../theme/types/layer.js";
|
|
7
5
|
import { getProgressFillColor as c } from "../ProgressBar.utils.js";
|
|
8
|
-
|
|
6
|
+
import { Variables as n } from "../../../theme/types/layer.js";
|
|
7
|
+
const u = e`
|
|
9
8
|
position: relative;
|
|
10
9
|
display: flex;
|
|
11
10
|
justify-content: center;
|
|
12
|
-
`,
|
|
11
|
+
`, y = e`
|
|
13
12
|
${({ size: t }) => e`
|
|
14
13
|
width: ${`${a[t].viewBoxSize}px`};
|
|
15
14
|
height: ${`${a[t].viewBoxSize}px`};
|
|
16
15
|
overflow: inherit;
|
|
17
16
|
transform: rotate(-90deg);
|
|
18
17
|
`}
|
|
19
|
-
`,
|
|
18
|
+
`, k = e`
|
|
20
19
|
${({ theme: t }) => e`
|
|
21
20
|
fill: transparent;
|
|
22
21
|
stroke: ${t.layer({ foundation: "section" })[n.BackgroundFoundation]};
|
|
23
22
|
`}
|
|
24
|
-
`,
|
|
23
|
+
`, x = e`
|
|
25
24
|
${({ theme: t, value: r, r: s, muted: l }) => e`
|
|
26
25
|
fill: transparent;
|
|
27
26
|
stroke: ${c(t, l)};
|
|
@@ -43,7 +42,7 @@ const y = e`
|
|
|
43
42
|
default:
|
|
44
43
|
throw new Error(`size "${t}" does not have a label size`);
|
|
45
44
|
}
|
|
46
|
-
},
|
|
45
|
+
}, w = e`
|
|
47
46
|
${({ size: t, theme: r }) => e`
|
|
48
47
|
${r.typography("heading", m(t))};
|
|
49
48
|
position: absolute;
|
|
@@ -54,10 +53,10 @@ const y = e`
|
|
|
54
53
|
`}
|
|
55
54
|
`;
|
|
56
55
|
export {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
k as BackgroundStyles,
|
|
57
|
+
u as ContainerStyles,
|
|
58
|
+
w as LabelStyles,
|
|
59
|
+
y as ProgressBarStyles,
|
|
60
|
+
x as ProgressStyles
|
|
62
61
|
};
|
|
63
62
|
//# sourceMappingURL=CircleProgressBar.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CircleProgressBar.styles.js","sources":["../../../../../../../../react-base/src/components/ProgressBar/CircleProgressBar/CircleProgressBar.styles.ts"],"sourcesContent":["import { css } from 'styled-components';\n\nimport type { Size } from '../ProgressBar.types';\nimport { consts } from '../ProgressBar.consts';\nimport { Sizes } from '../../../consts';\nimport { getStrokeDashArray, getStrokeDashoffset } from '../../../utils';\nimport { getProgressFillColor } from '../ProgressBar.utils';\nimport { type TypographySize, Variables } from '../../../theme';\n\nexport const ContainerStyles = css`\n position: relative;\n display: flex;\n justify-content: center;\n`;\n\nexport const ProgressBarStyles = css<{ size: Size }>`\n ${({ size }) => css`\n width: ${`${consts[size].viewBoxSize}px`};\n height: ${`${consts[size].viewBoxSize}px`};\n overflow: inherit;\n transform: rotate(-90deg);\n `}\n`;\n\nexport const BackgroundStyles = css`\n ${({ theme }) => css`\n fill: transparent;\n stroke: ${theme.layer({ foundation: 'section' })[Variables.BackgroundFoundation]};\n `}\n`;\n\nexport const ProgressStyles = css<{ value: number; r: number; muted?: boolean }>`\n ${({ theme, value, r, muted }) => css`\n fill: transparent;\n stroke: ${getProgressFillColor(theme, muted)};\n stroke-linecap: round;\n stroke-dasharray: ${`${getStrokeDashArray(r)}`};\n stroke-dashoffset: ${getStrokeDashoffset(r, value)};\n transition: stroke-dashoffset 1s;\n `}\n`;\n\nconst getLabelSize = (size: Size): TypographySize<'label'> => {\n switch (size) {\n case Sizes.XSmall:\n case Sizes.Smallest:\n case Sizes.Small:\n return 'smallest';\n case Sizes.Medium:\n return 'extraSmall';\n case Sizes.Large:\n return 'small';\n default:\n throw new Error(`size \"${size}\" does not have a label size`);\n }\n};\n\nexport const LabelStyles = css<{ size: Size }>`\n ${({ size, theme }) => css`\n ${theme.typography('heading', getLabelSize(size))};\n position: absolute;\n top: 50%;\n left: 50%;\n color: ${theme.layer()[Variables.TextOnFoundationStrong]};\n transform: translate(-50%, -50%);\n `}\n`;\n"],"names":["ContainerStyles","css","ProgressBarStyles","size","consts","BackgroundStyles","theme","Variables","ProgressStyles","value","r","muted","getProgressFillColor","getStrokeDashArray","getStrokeDashoffset","getLabelSize","Sizes","LabelStyles"],"mappings":"
|
|
1
|
+
{"version":3,"file":"CircleProgressBar.styles.js","sources":["../../../../../../../../react-base/src/components/ProgressBar/CircleProgressBar/CircleProgressBar.styles.ts"],"sourcesContent":["import { css } from 'styled-components';\n\nimport type { Size } from '../ProgressBar.types';\nimport { consts } from '../ProgressBar.consts';\nimport { Sizes } from '../../../consts';\nimport { getStrokeDashArray, getStrokeDashoffset } from '../../../utils';\nimport { getProgressFillColor } from '../ProgressBar.utils';\nimport { type TypographySize, Variables } from '../../../theme';\n\nexport const ContainerStyles = css`\n position: relative;\n display: flex;\n justify-content: center;\n`;\n\nexport const ProgressBarStyles = css<{ size: Size }>`\n ${({ size }) => css`\n width: ${`${consts[size].viewBoxSize}px`};\n height: ${`${consts[size].viewBoxSize}px`};\n overflow: inherit;\n transform: rotate(-90deg);\n `}\n`;\n\nexport const BackgroundStyles = css`\n ${({ theme }) => css`\n fill: transparent;\n stroke: ${theme.layer({ foundation: 'section' })[Variables.BackgroundFoundation]};\n `}\n`;\n\nexport const ProgressStyles = css<{ value: number; r: number; muted?: boolean }>`\n ${({ theme, value, r, muted }) => css`\n fill: transparent;\n stroke: ${getProgressFillColor(theme, muted)};\n stroke-linecap: round;\n stroke-dasharray: ${`${getStrokeDashArray(r)}`};\n stroke-dashoffset: ${getStrokeDashoffset(r, value)};\n transition: stroke-dashoffset 1s;\n `}\n`;\n\nconst getLabelSize = (size: Size): TypographySize<'label'> => {\n switch (size) {\n case Sizes.XSmall:\n case Sizes.Smallest:\n case Sizes.Small:\n return 'smallest';\n case Sizes.Medium:\n return 'extraSmall';\n case Sizes.Large:\n return 'small';\n default:\n throw new Error(`size \"${size}\" does not have a label size`);\n }\n};\n\nexport const LabelStyles = css<{ size: Size }>`\n ${({ size, theme }) => css`\n ${theme.typography('heading', getLabelSize(size))};\n position: absolute;\n top: 50%;\n left: 50%;\n color: ${theme.layer()[Variables.TextOnFoundationStrong]};\n transform: translate(-50%, -50%);\n `}\n`;\n"],"names":["ContainerStyles","css","ProgressBarStyles","size","consts","BackgroundStyles","theme","Variables","ProgressStyles","value","r","muted","getProgressFillColor","getStrokeDashArray","getStrokeDashoffset","getLabelSize","Sizes","LabelStyles"],"mappings":";;;;;;AASO,MAAMA,IAAkBC;AAAA;AAAA;AAAA;AAAA,GAMlBC,IAAoBD;AAAA,IAC7B,CAAC,EAAE,MAAAE,EAAA,MAAWF;AAAA,aACL,GAAGG,EAAOD,CAAI,EAAE,WAAW,IAAI;AAAA,cAC9B,GAAGC,EAAOD,CAAI,EAAE,WAAW,IAAI;AAAA;AAAA;AAAA,GAG1C;AAAA,GAGUE,IAAmBJ;AAAA,IAC5B,CAAC,EAAE,OAAAK,EAAA,MAAYL;AAAA;AAAA,cAELK,EAAM,MAAM,EAAE,YAAY,WAAW,EAAEC,EAAU,oBAAoB,CAAC;AAAA,GACjF;AAAA,GAGUC,IAAiBP;AAAA,IAC1B,CAAC,EAAE,OAAAK,GAAO,OAAAG,GAAO,GAAAC,GAAG,OAAAC,QAAYV;AAAA;AAAA,cAEtBW,EAAqBN,GAAOK,CAAK,CAAC;AAAA;AAAA,wBAExB,GAAGE,EAAmBH,CAAC,CAAC,EAAE;AAAA,yBACzBI,EAAoBJ,GAAGD,CAAK,CAAC;AAAA;AAAA,GAEnD;AAAA,GAGGM,IAAe,CAACZ,MAAwC;AAC5D,UAAQA,GAAA;AAAA,IACN,KAAKa,EAAM;AAAA,IACX,KAAKA,EAAM;AAAA,IACX,KAAKA,EAAM;AACT,aAAO;AAAA,IACT,KAAKA,EAAM;AACT,aAAO;AAAA,IACT,KAAKA,EAAM;AACT,aAAO;AAAA,IACT;AACE,YAAM,IAAI,MAAM,SAASb,CAAI,8BAA8B;AAAA,EAAA;AAEjE,GAEac,IAAchB;AAAA,IACvB,CAAC,EAAE,MAAAE,GAAM,OAAAG,EAAA,MAAYL;AAAA,MACnBK,EAAM,WAAW,WAAWS,EAAaZ,CAAI,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA,aAIxCG,EAAM,MAAA,EAAQC,EAAU,sBAAsB,CAAC;AAAA;AAAA,GAEzD;AAAA;"}
|
|
@@ -1,34 +1,31 @@
|
|
|
1
|
-
import { TextElementTypes as
|
|
2
|
-
import { getDisplayTypographySize as
|
|
3
|
-
|
|
4
|
-
import "acinguiux-ds-fabrics";
|
|
5
|
-
import "../../../../theme/types/layer.js";
|
|
6
|
-
const y = {
|
|
1
|
+
import { TextElementTypes as y } from "../../../../consts/index.js";
|
|
2
|
+
import { getDisplayTypographySize as i } from "../../../../utils/sizesUtils.js";
|
|
3
|
+
const m = {
|
|
7
4
|
1: "large",
|
|
8
5
|
2: "medium",
|
|
9
6
|
3: "small",
|
|
10
7
|
4: "extraSmall"
|
|
11
|
-
},
|
|
12
|
-
level:
|
|
13
|
-
contrast:
|
|
14
|
-
gutter:
|
|
8
|
+
}, g = (o, t, e) => o.typography("display", e ? i(e) : m[t]), d = ({
|
|
9
|
+
level: o = 1,
|
|
10
|
+
contrast: t,
|
|
11
|
+
gutter: e,
|
|
15
12
|
bold: p,
|
|
16
|
-
size:
|
|
17
|
-
disabled:
|
|
18
|
-
type:
|
|
19
|
-
...
|
|
13
|
+
size: l,
|
|
14
|
+
disabled: a,
|
|
15
|
+
type: r = `${y.Span}`,
|
|
16
|
+
...s
|
|
20
17
|
}) => ({
|
|
21
|
-
$level:
|
|
22
|
-
type:
|
|
23
|
-
$contrast:
|
|
24
|
-
$gutter:
|
|
25
|
-
$size:
|
|
18
|
+
$level: o,
|
|
19
|
+
type: r,
|
|
20
|
+
$contrast: t,
|
|
21
|
+
$gutter: e,
|
|
22
|
+
$size: l,
|
|
26
23
|
$bold: p,
|
|
27
|
-
$disabled:
|
|
28
|
-
...
|
|
24
|
+
$disabled: a,
|
|
25
|
+
...s
|
|
29
26
|
});
|
|
30
27
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
g as font,
|
|
29
|
+
d as useProps
|
|
33
30
|
};
|
|
34
31
|
//# sourceMappingURL=Display.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Display.utils.js","sources":["../../../../../../../../../react-base/src/components/Text/components/Display/Display.utils.ts"],"sourcesContent":["import type { Theme, TypographySize } from '../../../../theme';\nimport { TextElementTypes } from '../../../../consts';\nimport type { IProps, Levels, Size } from './Display.types';\nimport { getDisplayTypographySize } from '../../../../utils';\n\nconst DisplayLevelToTypographySize: Record<Levels, TypographySize<'display'>> = {\n 1: 'large',\n 2: 'medium',\n 3: 'small',\n 4: 'extraSmall',\n} as const;\n\nexport const font = (theme: Theme, level: Levels, size?: Size) =>\n theme.typography('display', size ? getDisplayTypographySize(size) : DisplayLevelToTypographySize[level]);\n\nexport const useProps = ({\n level = 1,\n contrast,\n gutter,\n bold,\n size,\n disabled,\n type = `${TextElementTypes.Span}`,\n ...rest\n}: IProps) => ({\n $level: level,\n type,\n $contrast: contrast,\n $gutter: gutter,\n $size: size,\n $bold: bold,\n $disabled: disabled,\n ...rest,\n});\n"],"names":["DisplayLevelToTypographySize","font","theme","level","size","getDisplayTypographySize","useProps","contrast","gutter","bold","disabled","type","TextElementTypes","rest"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Display.utils.js","sources":["../../../../../../../../../react-base/src/components/Text/components/Display/Display.utils.ts"],"sourcesContent":["import type { Theme, TypographySize } from '../../../../theme';\nimport { TextElementTypes } from '../../../../consts';\nimport type { IProps, Levels, Size } from './Display.types';\nimport { getDisplayTypographySize } from '../../../../utils';\n\nconst DisplayLevelToTypographySize: Record<Levels, TypographySize<'display'>> = {\n 1: 'large',\n 2: 'medium',\n 3: 'small',\n 4: 'extraSmall',\n} as const;\n\nexport const font = (theme: Theme, level: Levels, size?: Size) =>\n theme.typography('display', size ? getDisplayTypographySize(size) : DisplayLevelToTypographySize[level]);\n\nexport const useProps = ({\n level = 1,\n contrast,\n gutter,\n bold,\n size,\n disabled,\n type = `${TextElementTypes.Span}`,\n ...rest\n}: IProps) => ({\n $level: level,\n type,\n $contrast: contrast,\n $gutter: gutter,\n $size: size,\n $bold: bold,\n $disabled: disabled,\n ...rest,\n});\n"],"names":["DisplayLevelToTypographySize","font","theme","level","size","getDisplayTypographySize","useProps","contrast","gutter","bold","disabled","type","TextElementTypes","rest"],"mappings":";;AAKA,MAAMA,IAA0E;AAAA,EAC9E,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL,GAEaC,IAAO,CAACC,GAAcC,GAAeC,MAChDF,EAAM,WAAW,WAAWE,IAAOC,EAAyBD,CAAI,IAAIJ,EAA6BG,CAAK,CAAC,GAE5FG,IAAW,CAAC;AAAA,EACvB,OAAAH,IAAQ;AAAA,EACR,UAAAI;AAAA,EACA,QAAAC;AAAA,EACA,MAAAC;AAAA,EACA,MAAAL;AAAA,EACA,UAAAM;AAAA,EACA,MAAAC,IAAO,GAAGC,EAAiB,IAAI;AAAA,EAC/B,GAAGC;AACL,OAAe;AAAA,EACb,QAAQV;AAAA,EACR,MAAAQ;AAAA,EACA,WAAWJ;AAAA,EACX,SAASC;AAAA,EACT,OAAOJ;AAAA,EACP,OAAOK;AAAA,EACP,WAAWC;AAAA,EACX,GAAGG;AACL;"}
|
|
@@ -1,46 +1,43 @@
|
|
|
1
1
|
import { TextElementTypes as e } from "../../../../consts/index.js";
|
|
2
|
-
import { getHeadingTypographySize as
|
|
3
|
-
|
|
4
|
-
import "acinguiux-ds-fabrics";
|
|
5
|
-
import "../../../../theme/types/layer.js";
|
|
6
|
-
const $ = [
|
|
2
|
+
import { getHeadingTypographySize as g } from "../../../../utils/sizesUtils.js";
|
|
3
|
+
const m = [
|
|
7
4
|
`${e.H1}`,
|
|
8
5
|
`${e.H2}`,
|
|
9
6
|
`${e.H3}`,
|
|
10
7
|
`${e.H4}`,
|
|
11
8
|
`${e.H5}`,
|
|
12
9
|
`${e.H6}`
|
|
13
|
-
],
|
|
10
|
+
], p = {
|
|
14
11
|
1: "extraLarge",
|
|
15
12
|
2: "large",
|
|
16
13
|
3: "medium",
|
|
17
14
|
4: "small",
|
|
18
15
|
5: "extraSmall",
|
|
19
16
|
6: "smallest"
|
|
20
|
-
},
|
|
17
|
+
}, c = (t, o, r) => t.typography("heading", r ? g(r) : p[o]), y = ({
|
|
21
18
|
type: t = `${e.H1}`,
|
|
22
19
|
contrast: o,
|
|
23
20
|
level: r,
|
|
24
21
|
size: n,
|
|
25
22
|
gutter: a,
|
|
26
|
-
bold:
|
|
27
|
-
disabled:
|
|
28
|
-
|
|
23
|
+
bold: l,
|
|
24
|
+
disabled: s,
|
|
25
|
+
...$
|
|
29
26
|
}) => {
|
|
30
|
-
const
|
|
27
|
+
const i = r || m.indexOf(t) + 1 || 1;
|
|
31
28
|
return {
|
|
32
|
-
|
|
29
|
+
...$,
|
|
33
30
|
type: t,
|
|
34
31
|
$gutter: a,
|
|
35
|
-
$bold:
|
|
32
|
+
$bold: l,
|
|
36
33
|
$size: n,
|
|
37
34
|
$contrast: o,
|
|
38
|
-
$disabled:
|
|
39
|
-
$innerLevel:
|
|
35
|
+
$disabled: s,
|
|
36
|
+
$innerLevel: i
|
|
40
37
|
};
|
|
41
38
|
};
|
|
42
39
|
export {
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
c as font,
|
|
41
|
+
y as useProps
|
|
45
42
|
};
|
|
46
43
|
//# sourceMappingURL=Heading.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heading.utils.js","sources":["../../../../../../../../../react-base/src/components/Text/components/Heading/Heading.utils.ts"],"sourcesContent":["import type { IProps, Level, Size } from './Heading.types';\nimport { TextElementTypes } from '../../../../consts';\nimport type { Theme, TypographySize } from '../../../../theme';\nimport { getHeadingTypographySize } from '../../../../utils';\n\nconst allHeadings = [\n `${TextElementTypes.H1}`,\n `${TextElementTypes.H2}`,\n `${TextElementTypes.H3}`,\n `${TextElementTypes.H4}`,\n `${TextElementTypes.H5}`,\n `${TextElementTypes.H6}`,\n];\n\nconst LevelToTypographySize: Record<Level, TypographySize<'heading'>> = {\n 1: 'extraLarge',\n 2: 'large',\n 3: 'medium',\n 4: 'small',\n 5: 'extraSmall',\n 6: 'smallest',\n};\n\nexport const font = (theme: Theme, level: Level, size?: Size) =>\n theme.typography('heading', size ? getHeadingTypographySize(size) : LevelToTypographySize[level]);\n\nexport const useProps = ({\n type = `${TextElementTypes.H1}`,\n contrast,\n level,\n size,\n gutter,\n bold,\n disabled,\n ...rest\n}: IProps) => {\n const innerLevel = level || ((allHeadings.indexOf(type) + 1) as Level) || 1;\n\n return {\n ...rest,\n type,\n $gutter: gutter,\n $bold: bold,\n $size: size,\n $contrast: contrast,\n $disabled: disabled,\n $innerLevel: innerLevel,\n };\n};\n"],"names":["allHeadings","TextElementTypes","LevelToTypographySize","font","theme","level","size","getHeadingTypographySize","useProps","type","contrast","gutter","bold","disabled","rest","innerLevel"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Heading.utils.js","sources":["../../../../../../../../../react-base/src/components/Text/components/Heading/Heading.utils.ts"],"sourcesContent":["import type { IProps, Level, Size } from './Heading.types';\nimport { TextElementTypes } from '../../../../consts';\nimport type { Theme, TypographySize } from '../../../../theme';\nimport { getHeadingTypographySize } from '../../../../utils';\n\nconst allHeadings = [\n `${TextElementTypes.H1}`,\n `${TextElementTypes.H2}`,\n `${TextElementTypes.H3}`,\n `${TextElementTypes.H4}`,\n `${TextElementTypes.H5}`,\n `${TextElementTypes.H6}`,\n];\n\nconst LevelToTypographySize: Record<Level, TypographySize<'heading'>> = {\n 1: 'extraLarge',\n 2: 'large',\n 3: 'medium',\n 4: 'small',\n 5: 'extraSmall',\n 6: 'smallest',\n};\n\nexport const font = (theme: Theme, level: Level, size?: Size) =>\n theme.typography('heading', size ? getHeadingTypographySize(size) : LevelToTypographySize[level]);\n\nexport const useProps = ({\n type = `${TextElementTypes.H1}`,\n contrast,\n level,\n size,\n gutter,\n bold,\n disabled,\n ...rest\n}: IProps) => {\n const innerLevel = level || ((allHeadings.indexOf(type) + 1) as Level) || 1;\n\n return {\n ...rest,\n type,\n $gutter: gutter,\n $bold: bold,\n $size: size,\n $contrast: contrast,\n $disabled: disabled,\n $innerLevel: innerLevel,\n };\n};\n"],"names":["allHeadings","TextElementTypes","LevelToTypographySize","font","theme","level","size","getHeadingTypographySize","useProps","type","contrast","gutter","bold","disabled","rest","innerLevel"],"mappings":";;AAKA,MAAMA,IAAc;AAAA,EAClB,GAAGC,EAAiB,EAAE;AAAA,EACtB,GAAGA,EAAiB,EAAE;AAAA,EACtB,GAAGA,EAAiB,EAAE;AAAA,EACtB,GAAGA,EAAiB,EAAE;AAAA,EACtB,GAAGA,EAAiB,EAAE;AAAA,EACtB,GAAGA,EAAiB,EAAE;AACxB,GAEMC,IAAkE;AAAA,EACtE,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL,GAEaC,IAAO,CAACC,GAAcC,GAAcC,MAC/CF,EAAM,WAAW,WAAWE,IAAOC,EAAyBD,CAAI,IAAIJ,EAAsBG,CAAK,CAAC,GAErFG,IAAW,CAAC;AAAA,EACvB,MAAAC,IAAO,GAAGR,EAAiB,EAAE;AAAA,EAC7B,UAAAS;AAAA,EACA,OAAAL;AAAA,EACA,MAAAC;AAAA,EACA,QAAAK;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAAc;AACZ,QAAMC,IAAaV,KAAWL,EAAY,QAAQS,CAAI,IAAI,KAAgB;AAE1E,SAAO;AAAA,IACL,GAAGK;AAAA,IACH,MAAAL;AAAA,IACA,SAASE;AAAA,IACT,OAAOC;AAAA,IACP,OAAON;AAAA,IACP,WAAWI;AAAA,IACX,WAAWG;AAAA,IACX,aAAaE;AAAA,EAAA;AAEjB;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "acinguiux-ds-react-framework",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.24",
|
|
4
4
|
"description": "All Acingui-UX components for React",
|
|
5
5
|
"main": "./build/cjs/index.js",
|
|
6
6
|
"module": "./build/esm/index.js",
|
|
@@ -125,8 +125,8 @@
|
|
|
125
125
|
"@tanstack/match-sorter-utils": "8.15.1",
|
|
126
126
|
"@tanstack/react-table": "8.17.3",
|
|
127
127
|
"@tanstack/react-virtual": "3.11.1",
|
|
128
|
-
"acinguiux-ds-fabrics": "
|
|
129
|
-
"acinguiux-ds-foundations": "
|
|
128
|
+
"acinguiux-ds-fabrics": "0.1.0",
|
|
129
|
+
"acinguiux-ds-foundations": "1.0.1",
|
|
130
130
|
"classnames": "2.5.1",
|
|
131
131
|
"countup.js": "2.8.0",
|
|
132
132
|
"date-fns": "3.6.0",
|