@hitachivantara/uikit-react-core 5.24.2 → 5.24.3
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/dist/cjs/components/Card/Card.cjs +2 -2
- package/dist/cjs/components/Card/Card.cjs.map +1 -1
- package/dist/cjs/components/Footer/Footer.cjs +2 -2
- package/dist/cjs/components/Footer/Footer.cjs.map +1 -1
- package/dist/cjs/components/List/List.styles.cjs +2 -2
- package/dist/cjs/components/List/List.styles.cjs.map +1 -1
- package/dist/cjs/components/ListContainer/ListContainer.cjs +8 -4
- package/dist/cjs/components/ListContainer/ListContainer.cjs.map +1 -1
- package/dist/cjs/components/ListContainer/ListContainer.styles.cjs +12 -0
- package/dist/cjs/components/ListContainer/ListContainer.styles.cjs.map +1 -0
- package/dist/cjs/components/ListContainer/ListContext/ListContext.cjs.map +1 -1
- package/dist/cjs/components/ListContainer/ListItem/ListItem.cjs +43 -31
- package/dist/cjs/components/ListContainer/ListItem/ListItem.cjs.map +1 -1
- package/dist/cjs/components/ListContainer/ListItem/ListItem.styles.cjs +47 -75
- package/dist/cjs/components/ListContainer/ListItem/ListItem.styles.cjs.map +1 -1
- package/dist/cjs/components/ScrollTo/Horizontal/ScrollToHorizontal.cjs +2 -2
- package/dist/cjs/components/ScrollTo/Horizontal/ScrollToHorizontal.cjs.map +1 -1
- package/dist/cjs/components/ScrollTo/Vertical/ScrollToVertical.cjs +2 -2
- package/dist/cjs/components/ScrollTo/Vertical/ScrollToVertical.cjs.map +1 -1
- package/dist/cjs/components/Tab/Tab.cjs +12 -8
- package/dist/cjs/components/Tab/Tab.cjs.map +1 -1
- package/dist/cjs/components/Tab/Tab.styles.cjs +53 -57
- package/dist/cjs/components/Tab/Tab.styles.cjs.map +1 -1
- package/dist/cjs/components/TagsInput/TagsInput.styles.cjs +4 -4
- package/dist/cjs/components/TagsInput/TagsInput.styles.cjs.map +1 -1
- package/dist/cjs/components/Typography/Typography.cjs +2 -2
- package/dist/cjs/components/Typography/Typography.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/NavigationSlider/NavigationSlider.styles.cjs +3 -3
- package/dist/cjs/components/VerticalNavigation/NavigationSlider/NavigationSlider.styles.cjs.map +1 -1
- package/dist/cjs/index.cjs +6 -6
- package/dist/esm/components/Card/Card.js +2 -2
- package/dist/esm/components/Card/Card.js.map +1 -1
- package/dist/esm/components/Footer/Footer.js +2 -2
- package/dist/esm/components/Footer/Footer.js.map +1 -1
- package/dist/esm/components/List/List.styles.js +2 -2
- package/dist/esm/components/ListContainer/ListContainer.js +10 -5
- package/dist/esm/components/ListContainer/ListContainer.js.map +1 -1
- package/dist/esm/components/ListContainer/ListContainer.styles.js +12 -0
- package/dist/esm/components/ListContainer/ListContainer.styles.js.map +1 -0
- package/dist/esm/components/ListContainer/ListContext/ListContext.js.map +1 -1
- package/dist/esm/components/ListContainer/ListItem/ListItem.js +46 -33
- package/dist/esm/components/ListContainer/ListItem/ListItem.js.map +1 -1
- package/dist/esm/components/ListContainer/ListItem/ListItem.styles.js +47 -73
- package/dist/esm/components/ListContainer/ListItem/ListItem.styles.js.map +1 -1
- package/dist/esm/components/ScrollTo/Horizontal/ScrollToHorizontal.js +2 -2
- package/dist/esm/components/ScrollTo/Horizontal/ScrollToHorizontal.js.map +1 -1
- package/dist/esm/components/ScrollTo/Vertical/ScrollToVertical.js +2 -2
- package/dist/esm/components/ScrollTo/Vertical/ScrollToVertical.js.map +1 -1
- package/dist/esm/components/Tab/Tab.js +15 -10
- package/dist/esm/components/Tab/Tab.js.map +1 -1
- package/dist/esm/components/Tab/Tab.styles.js +53 -55
- package/dist/esm/components/Tab/Tab.styles.js.map +1 -1
- package/dist/esm/components/TagsInput/TagsInput.styles.js +6 -6
- package/dist/esm/components/Typography/Typography.js +2 -2
- package/dist/esm/components/Typography/Typography.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/NavigationSlider/NavigationSlider.styles.js +3 -3
- package/dist/esm/components/VerticalNavigation/NavigationSlider/NavigationSlider.styles.js.map +1 -1
- package/dist/esm/index.js +236 -236
- package/dist/types/index.d.ts +319 -293
- package/package.json +3 -3
- package/dist/cjs/components/ListContainer/ListItem/listItemClasses.cjs +0 -8
- package/dist/cjs/components/ListContainer/ListItem/listItemClasses.cjs.map +0 -1
- package/dist/cjs/components/ListContainer/listContainerClasses.cjs +0 -8
- package/dist/cjs/components/ListContainer/listContainerClasses.cjs.map +0 -1
- package/dist/cjs/components/Tab/tabClasses.cjs +0 -8
- package/dist/cjs/components/Tab/tabClasses.cjs.map +0 -1
- package/dist/esm/components/ListContainer/ListItem/listItemClasses.js +0 -8
- package/dist/esm/components/ListContainer/ListItem/listItemClasses.js.map +0 -1
- package/dist/esm/components/ListContainer/listContainerClasses.js +0 -8
- package/dist/esm/components/ListContainer/listContainerClasses.js.map +0 -1
- package/dist/esm/components/Tab/tabClasses.js +0 -8
- package/dist/esm/components/Tab/tabClasses.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.styles.js","sources":["../../../../../src/components/ListContainer/ListItem/ListItem.styles.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"ListItem.styles.js","sources":["../../../../../src/components/ListContainer/ListItem/ListItem.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"@core/utils/focusUtils\";\nimport { createClasses } from \"@core/utils/classes\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvListItem\", {\n root: {\n ...theme.typography.body,\n padding: 0,\n display: \"block\",\n height: \"32px\",\n lineHeight: \"32px\",\n listStyleType: \"none\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n position: \"relative\",\n\n \"&:not(:last-child)\": {\n marginBottom: \"8px\",\n },\n\n \"&$condensed\": {\n marginBottom: 0,\n },\n\n \"&.HvIsFocused\": {\n ...outlineStyles,\n backgroundColor: theme.colors.atmo3,\n zIndex: 2,\n },\n },\n focus: { backgroundColor: theme.colors.atmo3, zIndex: 2 },\n startAdornment: {},\n endAdornment: {},\n gutters: {\n padding: `0 ${theme.space.xs}`,\n\n \"&$withStartAdornment\": {\n paddingLeft: 0,\n },\n \"&$withEndAdornment\": {\n paddingRight: 0,\n },\n },\n condensed: {},\n interactive: {\n cursor: \"pointer\",\n \"&:not($disabled):not($selected):hover\": {\n backgroundColor: theme.list.hoverColor,\n },\n \"&$disabled\": {\n cursor: \"not-allowed\",\n },\n },\n selected: { backgroundColor: theme.list.hoverColor },\n disabled: {\n color: theme.colors.secondary_60,\n backgroundColor: theme.list.disabledBackgroundColor,\n },\n withStartAdornment: {\n \"& > div\": {\n float: \"left\",\n },\n\n \"& svg\": {\n boxShadow: \"none !important\",\n outline: \"none !important\",\n },\n \"$disabled > svg *.color0\": {\n fill: theme.colors.secondary_60,\n },\n },\n withEndAdornment: {\n \"& > div\": { float: \"right\" },\n\n \"& svg\": {\n boxShadow: \"none !important\",\n outline: \"none !important\",\n },\n \"$disabled > svg *.color0\": {\n fill: theme.colors.secondary_60,\n },\n },\n});\n"],"names":["staticClasses","useClasses","createClasses","root","theme","typography","body","padding","display","height","lineHeight","listStyleType","overflow","textOverflow","whiteSpace","position","marginBottom","outlineStyles","backgroundColor","colors","atmo3","zIndex","focus","startAdornment","endAdornment","gutters","space","xs","paddingLeft","paddingRight","condensed","interactive","cursor","list","hoverColor","selected","disabled","color","secondary_60","disabledBackgroundColor","withStartAdornment","float","boxShadow","outline","fill","withEndAdornment"],"mappings":";;;AAKa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,cAAc,cAAc;AAAA,EACvEC,MAAM;AAAA,IACJ,GAAGC,MAAMC,WAAWC;AAAAA,IACpBC,SAAS;AAAA,IACTC,SAAS;AAAA,IACTC,QAAQ;AAAA,IACRC,YAAY;AAAA,IACZC,eAAe;AAAA,IACfC,UAAU;AAAA,IACVC,cAAc;AAAA,IACdC,YAAY;AAAA,IACZC,UAAU;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W;AAAA,MACXC,SAAS;AAAA,IACX;AAAA,IACA,4BAA4B;AAAA,MAC1BC,MAAMxC,MAAMe,OAAOmB;AAAAA,IACrB;AAAA,EACF;AACF,CAAC;"}
|
|
@@ -103,10 +103,10 @@ const HvScrollToHorizontal = (props) => {
|
|
|
103
103
|
marginRight: position === "fixed" && (upMd || downSm) ? theme.spacing(upMd ? 4 : 2) : 0,
|
|
104
104
|
marginLeft: position === "fixed" && (upMd || downSm) ? theme.spacing(upMd ? 4 : 2) : 0,
|
|
105
105
|
backgroundColor: hexToRgbA(activeTheme == null ? void 0 : activeTheme.colors.modes[selectedMode].atmo2, activeTheme == null ? void 0 : activeTheme.scrollTo.backgroundColorOpacity)
|
|
106
|
-
}),
|
|
106
|
+
}), classes.root, {
|
|
107
107
|
[classes.positionSticky]: position === "sticky",
|
|
108
108
|
[classes.positionFixed]: position === "fixed"
|
|
109
|
-
}),
|
|
109
|
+
}, className),
|
|
110
110
|
id: elementId,
|
|
111
111
|
...others,
|
|
112
112
|
children: tabs
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollToHorizontal.js","sources":["../../../../../src/components/ScrollTo/Horizontal/ScrollToHorizontal.tsx"],"sourcesContent":["import { useCallback, useMemo } from \"react\";\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\n\nimport { useTheme as useMuiTheme } from \"@mui/material/styles\";\nimport { useMediaQuery } from \"@mui/material\";\n\nimport { theme } from \"@hitachivantara/uikit-styles\";\nimport { CurrentStep } from \"@hitachivantara/uikit-react-icons\";\n\nimport { HvBaseProps } from \"@core/types/generic\";\nimport { useUniqueId } from \"@core/hooks/useUniqueId\";\nimport { useTheme } from \"@core/hooks/useTheme\";\nimport { ExtractNames } from \"@core/utils/classes\";\nimport { isKey } from \"@core/utils/keyboardUtils\";\nimport { setId } from \"@core/utils/setId\";\nimport { hexToRgbA } from \"@core/utils/hexToRgbA\";\n\nimport { HvScrollToTooltipPositions } from \"../types\";\nimport { withTooltip } from \"../withTooltip\";\nimport { HvHorizontalScrollListItem } from \"./HorizontalScrollListItem\";\nimport { useScrollTo } from \"../useScrollTo\";\nimport { staticClasses, useClasses } from \"./ScrollToHorizontal.styles\";\n\nexport { staticClasses as scrollToHorizontalClasses };\n\nexport type HvScrollToHorizontalClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvScrollToHorizontalOption {\n key?: string;\n label: string;\n value: string;\n offset?: number;\n}\n\nexport type HvScrollToHorizontalPositions = \"sticky\" | \"fixed\" | \"relative\";\n\nexport interface HvScrollToHorizontalProps\n extends HvBaseProps<HTMLOListElement, \"onChange\" | \"onClick\"> {\n /** An Array of Objects with Label and Value. Label is the displayed Element and Value is the local navigation location applied */\n options: HvScrollToHorizontalOption[];\n /** True if the href location link should be applied. It will create an a element around every list item */\n href?: boolean;\n /** Default selected index passed from the parent. */\n defaultSelectedIndex?: number;\n /**\n * The Id of the scrollable container containing displayed elements.\n *\n * Defaults to `window` if unspecified.\n */\n scrollElementId?: string;\n /**\n * Defines the offset from the top of each element for getting an optimal viewing region in the container.\n * This allows to exclude regions of the container that are obscured by other content (such as fixed-positioned toolbars or titles)\n * or to put more breathing room between the targeted element and the edges of the container.\n *\n * Each element can also have a specific offset via the options property.\n */\n offset?: number;\n /** Position of the Horizontal scroll to. */\n position?: HvScrollToHorizontalPositions;\n /** Position of tooltip identifying the current item. */\n tooltipPosition?: HvScrollToTooltipPositions;\n /** A function called each time the selected index changes. */\n onChange?: (\n event:\n | Event\n | React.MouseEvent<HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>,\n index: number\n ) => void;\n /** A function called each time an user clicks on a tab element. */\n onClick?: (event: React.MouseEvent<HTMLDivElement>, index: number) => void;\n /** A function called each time an user press enter on a tab element. */\n onEnter?: (event: React.KeyboardEvent<HTMLDivElement>, index: number) => void;\n /** A Jss Object used to override or extend the styles applied. */\n classes?: HvScrollToHorizontalClasses;\n}\n\n/**\n * The horizontal scroll to element can be used to quickly navigate in a page.\n */\nexport const HvScrollToHorizontal = (props: HvScrollToHorizontalProps) => {\n const {\n id,\n defaultSelectedIndex = 0,\n scrollElementId,\n href = true,\n onChange,\n onClick,\n onEnter,\n className,\n classes: classesProp,\n options,\n offset = 0,\n position = \"relative\",\n tooltipPosition = \"top\",\n ...others\n } = useDefaultProps(\"HvScrollToHorizontal\", props);\n\n const { classes, css, cx } = useClasses(classesProp);\n const muiTheme = useMuiTheme();\n\n const downSm = useMediaQuery(muiTheme.breakpoints.down(\"sm\"));\n const upMd = useMediaQuery(muiTheme.breakpoints.up(\"md\"));\n\n const { activeTheme, selectedMode } = useTheme();\n\n const elementId = useUniqueId(id, \"hvHorizontalScrollto\");\n\n const [selectedIndex, setScrollTo] = useScrollTo(\n defaultSelectedIndex,\n scrollElementId,\n href,\n offset,\n options,\n onChange\n );\n\n const handleSelection = (\n event:\n | React.MouseEvent<HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>,\n value: string,\n index: number\n ) => {\n event.preventDefault();\n\n const wrappedOnChange = () => {\n onChange?.(event, index);\n };\n\n setScrollTo(event, value, index, wrappedOnChange);\n };\n\n const tooltipWrappers = useMemo(() => {\n return options.map((option) => {\n return withTooltip(option.label, \"div\", tooltipPosition);\n });\n }, [options, tooltipPosition]);\n\n const NotSelected = useCallback(() => {\n return (\n <div className={classes.notSelectedRoot}>\n <div className={classes.notSelected} />\n </div>\n );\n }, [classes.notSelectedRoot, classes.notSelected]);\n\n const Selected = useCallback(() => {\n return (\n <CurrentStep\n height={activeTheme?.scrollTo.dotSelectedSize}\n width={activeTheme?.scrollTo.dotSelectedSize}\n className={classes.selected}\n />\n );\n }, [classes.selected, activeTheme?.scrollTo.dotSelectedSize]);\n\n const tabs = options.map((option, index) => {\n const selected = selectedIndex === index;\n const tooltipWrapper = tooltipWrappers[index];\n\n return (\n <HvHorizontalScrollListItem\n id={setId(elementId, `item-${index}`)}\n onClick={(event) => {\n handleSelection(event, option.value, index);\n onClick?.(event, index);\n }}\n onKeyDown={(event) => {\n if (isKey(event, \"Enter\") === true) {\n handleSelection(event, option.value, index);\n onEnter?.(event, index);\n }\n }}\n tooltipWrapper={tooltipWrapper}\n selected={selected}\n key={option.key || option.label}\n >\n <p>{option.label}</p>\n {selected ? <Selected /> : <NotSelected />}\n </HvHorizontalScrollListItem>\n );\n });\n\n return (\n <ol\n className={cx(\n css({\n width:\n position === \"fixed\" && (upMd || downSm)\n ? `calc(100% - 2*${theme.spacing(upMd ? 4 : 2)})`\n : \"100%\",\n marginTop: 0,\n marginBottom: 0,\n marginRight:\n position === \"fixed\" && (upMd || downSm)\n ? theme.spacing(upMd ? 4 : 2)\n : 0,\n marginLeft:\n position === \"fixed\" && (upMd || downSm)\n ? theme.spacing(upMd ? 4 : 2)\n : 0,\n backgroundColor: hexToRgbA(\n activeTheme?.colors.modes[selectedMode].atmo2,\n activeTheme?.scrollTo.backgroundColorOpacity\n ),\n }),\n className,\n classes.root,\n {\n [classes.positionSticky]: position === \"sticky\",\n [classes.positionFixed]: position === \"fixed\",\n }\n )}\n id={elementId}\n {...others}\n >\n {tabs}\n </ol>\n );\n};\n"],"names":["HvScrollToHorizontal","props","id","defaultSelectedIndex","scrollElementId","href","onChange","onClick","onEnter","className","classes","classesProp","options","offset","position","tooltipPosition","others","useDefaultProps","css","cx","useClasses","muiTheme","useMuiTheme","downSm","useMediaQuery","breakpoints","down","upMd","up","activeTheme","selectedMode","useTheme","elementId","useUniqueId","selectedIndex","setScrollTo","useScrollTo","handleSelection","event","value","index","preventDefault","wrappedOnChange","tooltipWrappers","useMemo","map","option","withTooltip","label","NotSelected","useCallback","notSelectedRoot","children","notSelected","Selected","CurrentStep","height","scrollTo","dotSelectedSize","width","selected","tabs","tooltipWrapper","HvHorizontalScrollListItem","setId","onKeyDown","isKey","_jsx","key","theme","spacing","marginTop","marginBottom","marginRight","marginLeft","backgroundColor","hexToRgbA","colors","modes","atmo2","backgroundColorOpacity","root","positionSticky","positionFixed"],"mappings":";;;;;;;;;;;;;;;;;AAiFaA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,UAC5B,iBAAgB8C,MAAMC,QAAQ3C,OAAO,IAAI,CAAC,OAC3C;AAAA,MACN4C,WAAW;AAAA,MACXC,cAAc;AAAA,MACdC,aACE3D,aAAa,YAAYa,QAAQJ,UAC7B8C,MAAMC,QAAQ3C,OAAO,IAAI,CAAC,IAC1B;AAAA,MACN+C,YACE5D,aAAa,YAAYa,QAAQJ,UAC7B8C,MAAMC,QAAQ3C,OAAO,IAAI,CAAC,IAC1B;AAAA,MACNgD,iBAAiBC,UACf/C,2CAAagD,OAAOC,MAAMhD,cAAciD,OACxClD,2CAAa4B,SAASuB,sBACxB;AAAA,IAAA,CACD,GACDvE,WACAC,QAAQuE,MACR;AAAA,MACE,CAACvE,QAAQwE,cAAc,GAAGpE,aAAa;AAAA,MACvC,CAACJ,QAAQyE,aAAa,GAAGrE,aAAa;AAAA,IAAA,CAE1C;AAAA,IACAZ,IAAI8B;AAAAA,IAAU,GACVhB;AAAAA,IAAMoC,UAETS;AAAAA,EAAAA,CACC;AAER;"}
|
|
1
|
+
{"version":3,"file":"ScrollToHorizontal.js","sources":["../../../../../src/components/ScrollTo/Horizontal/ScrollToHorizontal.tsx"],"sourcesContent":["import { useCallback, useMemo } from \"react\";\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\n\nimport { useTheme as useMuiTheme } from \"@mui/material/styles\";\nimport { useMediaQuery } from \"@mui/material\";\n\nimport { theme } from \"@hitachivantara/uikit-styles\";\nimport { CurrentStep } from \"@hitachivantara/uikit-react-icons\";\n\nimport { HvBaseProps } from \"@core/types/generic\";\nimport { useUniqueId } from \"@core/hooks/useUniqueId\";\nimport { useTheme } from \"@core/hooks/useTheme\";\nimport { ExtractNames } from \"@core/utils/classes\";\nimport { isKey } from \"@core/utils/keyboardUtils\";\nimport { setId } from \"@core/utils/setId\";\nimport { hexToRgbA } from \"@core/utils/hexToRgbA\";\n\nimport { HvScrollToTooltipPositions } from \"../types\";\nimport { withTooltip } from \"../withTooltip\";\nimport { HvHorizontalScrollListItem } from \"./HorizontalScrollListItem\";\nimport { useScrollTo } from \"../useScrollTo\";\nimport { staticClasses, useClasses } from \"./ScrollToHorizontal.styles\";\n\nexport { staticClasses as scrollToHorizontalClasses };\n\nexport type HvScrollToHorizontalClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvScrollToHorizontalOption {\n key?: string;\n label: string;\n value: string;\n offset?: number;\n}\n\nexport type HvScrollToHorizontalPositions = \"sticky\" | \"fixed\" | \"relative\";\n\nexport interface HvScrollToHorizontalProps\n extends HvBaseProps<HTMLOListElement, \"onChange\" | \"onClick\"> {\n /** An Array of Objects with Label and Value. Label is the displayed Element and Value is the local navigation location applied */\n options: HvScrollToHorizontalOption[];\n /** True if the href location link should be applied. It will create an a element around every list item */\n href?: boolean;\n /** Default selected index passed from the parent. */\n defaultSelectedIndex?: number;\n /**\n * The Id of the scrollable container containing displayed elements.\n *\n * Defaults to `window` if unspecified.\n */\n scrollElementId?: string;\n /**\n * Defines the offset from the top of each element for getting an optimal viewing region in the container.\n * This allows to exclude regions of the container that are obscured by other content (such as fixed-positioned toolbars or titles)\n * or to put more breathing room between the targeted element and the edges of the container.\n *\n * Each element can also have a specific offset via the options property.\n */\n offset?: number;\n /** Position of the Horizontal scroll to. */\n position?: HvScrollToHorizontalPositions;\n /** Position of tooltip identifying the current item. */\n tooltipPosition?: HvScrollToTooltipPositions;\n /** A function called each time the selected index changes. */\n onChange?: (\n event:\n | Event\n | React.MouseEvent<HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>,\n index: number\n ) => void;\n /** A function called each time an user clicks on a tab element. */\n onClick?: (event: React.MouseEvent<HTMLDivElement>, index: number) => void;\n /** A function called each time an user press enter on a tab element. */\n onEnter?: (event: React.KeyboardEvent<HTMLDivElement>, index: number) => void;\n /** A Jss Object used to override or extend the styles applied. */\n classes?: HvScrollToHorizontalClasses;\n}\n\n/**\n * The horizontal scroll to element can be used to quickly navigate in a page.\n */\nexport const HvScrollToHorizontal = (props: HvScrollToHorizontalProps) => {\n const {\n id,\n defaultSelectedIndex = 0,\n scrollElementId,\n href = true,\n onChange,\n onClick,\n onEnter,\n className,\n classes: classesProp,\n options,\n offset = 0,\n position = \"relative\",\n tooltipPosition = \"top\",\n ...others\n } = useDefaultProps(\"HvScrollToHorizontal\", props);\n\n const { classes, css, cx } = useClasses(classesProp);\n const muiTheme = useMuiTheme();\n\n const downSm = useMediaQuery(muiTheme.breakpoints.down(\"sm\"));\n const upMd = useMediaQuery(muiTheme.breakpoints.up(\"md\"));\n\n const { activeTheme, selectedMode } = useTheme();\n\n const elementId = useUniqueId(id, \"hvHorizontalScrollto\");\n\n const [selectedIndex, setScrollTo] = useScrollTo(\n defaultSelectedIndex,\n scrollElementId,\n href,\n offset,\n options,\n onChange\n );\n\n const handleSelection = (\n event:\n | React.MouseEvent<HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>,\n value: string,\n index: number\n ) => {\n event.preventDefault();\n\n const wrappedOnChange = () => {\n onChange?.(event, index);\n };\n\n setScrollTo(event, value, index, wrappedOnChange);\n };\n\n const tooltipWrappers = useMemo(() => {\n return options.map((option) => {\n return withTooltip(option.label, \"div\", tooltipPosition);\n });\n }, [options, tooltipPosition]);\n\n const NotSelected = useCallback(() => {\n return (\n <div className={classes.notSelectedRoot}>\n <div className={classes.notSelected} />\n </div>\n );\n }, [classes.notSelectedRoot, classes.notSelected]);\n\n const Selected = useCallback(() => {\n return (\n <CurrentStep\n height={activeTheme?.scrollTo.dotSelectedSize}\n width={activeTheme?.scrollTo.dotSelectedSize}\n className={classes.selected}\n />\n );\n }, [classes.selected, activeTheme?.scrollTo.dotSelectedSize]);\n\n const tabs = options.map((option, index) => {\n const selected = selectedIndex === index;\n const tooltipWrapper = tooltipWrappers[index];\n\n return (\n <HvHorizontalScrollListItem\n id={setId(elementId, `item-${index}`)}\n onClick={(event) => {\n handleSelection(event, option.value, index);\n onClick?.(event, index);\n }}\n onKeyDown={(event) => {\n if (isKey(event, \"Enter\") === true) {\n handleSelection(event, option.value, index);\n onEnter?.(event, index);\n }\n }}\n tooltipWrapper={tooltipWrapper}\n selected={selected}\n key={option.key || option.label}\n >\n <p>{option.label}</p>\n {selected ? <Selected /> : <NotSelected />}\n </HvHorizontalScrollListItem>\n );\n });\n\n return (\n <ol\n className={cx(\n css({\n width:\n position === \"fixed\" && (upMd || downSm)\n ? `calc(100% - 2*${theme.spacing(upMd ? 4 : 2)})`\n : \"100%\",\n marginTop: 0,\n marginBottom: 0,\n marginRight:\n position === \"fixed\" && (upMd || downSm)\n ? theme.spacing(upMd ? 4 : 2)\n : 0,\n marginLeft:\n position === \"fixed\" && (upMd || downSm)\n ? theme.spacing(upMd ? 4 : 2)\n : 0,\n backgroundColor: hexToRgbA(\n activeTheme?.colors.modes[selectedMode].atmo2,\n activeTheme?.scrollTo.backgroundColorOpacity\n ),\n }),\n classes.root,\n {\n [classes.positionSticky]: position === \"sticky\",\n [classes.positionFixed]: position === \"fixed\",\n },\n className\n )}\n id={elementId}\n {...others}\n >\n {tabs}\n </ol>\n );\n};\n"],"names":["HvScrollToHorizontal","props","id","defaultSelectedIndex","scrollElementId","href","onChange","onClick","onEnter","className","classes","classesProp","options","offset","position","tooltipPosition","others","useDefaultProps","css","cx","useClasses","muiTheme","useMuiTheme","downSm","useMediaQuery","breakpoints","down","upMd","up","activeTheme","selectedMode","useTheme","elementId","useUniqueId","selectedIndex","setScrollTo","useScrollTo","handleSelection","event","value","index","preventDefault","wrappedOnChange","tooltipWrappers","useMemo","map","option","withTooltip","label","NotSelected","useCallback","notSelectedRoot","children","notSelected","Selected","CurrentStep","height","scrollTo","dotSelectedSize","width","selected","tabs","tooltipWrapper","HvHorizontalScrollListItem","setId","onKeyDown","isKey","_jsx","key","theme","spacing","marginTop","marginBottom","marginRight","marginLeft","backgroundColor","hexToRgbA","colors","modes","atmo2","backgroundColorOpacity","root","positionSticky","positionFixed"],"mappings":";;;;;;;;;;;;;;;;;AAiFaA,MAAAA,uBAAuBA,CAACC,UAAqC;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Q3C,OAAO,IAAI,CAAC,OAC3C;AAAA,MACN4C,WAAW;AAAA,MACXC,cAAc;AAAA,MACdC,aACE3D,aAAa,YAAYa,QAAQJ,UAC7B8C,MAAMC,QAAQ3C,OAAO,IAAI,CAAC,IAC1B;AAAA,MACN+C,YACE5D,aAAa,YAAYa,QAAQJ,UAC7B8C,MAAMC,QAAQ3C,OAAO,IAAI,CAAC,IAC1B;AAAA,MACNgD,iBAAiBC,UACf/C,2CAAagD,OAAOC,MAAMhD,cAAciD,OACxClD,2CAAa4B,SAASuB,sBACxB;AAAA,IAAA,CACD,GACDtE,QAAQuE,MACR;AAAA,MACE,CAACvE,QAAQwE,cAAc,GAAGpE,aAAa;AAAA,MACvC,CAACJ,QAAQyE,aAAa,GAAGrE,aAAa;AAAA,OAExCL,SACF;AAAA,IACAP,IAAI8B;AAAAA,IAAU,GACVhB;AAAAA,IAAMoC,UAETS;AAAAA,EAAAA,CACC;AAER;"}
|
|
@@ -77,10 +77,10 @@ const HvScrollToVertical = (props) => {
|
|
|
77
77
|
return /* @__PURE__ */ jsx("ol", {
|
|
78
78
|
className: cx(css({
|
|
79
79
|
backgroundColor
|
|
80
|
-
}),
|
|
80
|
+
}), classes.root, {
|
|
81
81
|
[classes.positionFixed]: position === "fixed",
|
|
82
82
|
[classes.positionAbsolute]: position === "absolute"
|
|
83
|
-
}),
|
|
83
|
+
}, className),
|
|
84
84
|
style: {
|
|
85
85
|
top: `calc(50% - ${positionOffset}px)`,
|
|
86
86
|
...style
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollToVertical.js","sources":["../../../../../src/components/ScrollTo/Vertical/ScrollToVertical.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\n\nimport { HvBaseProps } from \"@core/types/generic\";\nimport { useTheme } from \"@core/hooks/useTheme\";\nimport { useUniqueId } from \"@core/hooks/useUniqueId\";\nimport { ExtractNames } from \"@core/utils/classes\";\nimport { isKey } from \"@core/utils/keyboardUtils\";\nimport { setId } from \"@core/utils/setId\";\nimport { hexToRgbA } from \"@core/utils/hexToRgbA\";\n\nimport {\n staticClasses,\n useClasses,\n calculateOffset,\n} from \"./ScrollToVertical.styles\";\nimport { HvVerticalScrollListItem } from \"./VerticalScrollListItem\";\nimport { useScrollTo } from \"../useScrollTo\";\nimport { withTooltip } from \"../withTooltip\";\nimport {\n HvScrollToTooltipPositions,\n HvScrollToVerticalOption,\n HvScrollToVerticalPositions,\n} from \"../types\";\n\nexport { staticClasses as scrollToVerticalClasses };\n\nexport type HvScrollToVerticalClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvScrollToVerticalProps\n extends HvBaseProps<HTMLOListElement, \"onChange\" | \"onClick\"> {\n /** An Array of Objects with Label and Value. Label is the displayed Element and Value is the local navigation location applied */\n options: HvScrollToVerticalOption[];\n /** True if the href location link should be applied. It will create an a element around every list item */\n href?: boolean;\n /** Default selected index passed from the parent. */\n defaultSelectedIndex?: number;\n /**\n * The Id of the scrollable container containing displayed elements.\n *\n * Defaults to `window` if unspecified.\n */\n scrollElementId?: string;\n /**\n * Defines the offset from the top of each element for getting an optimal viewing region in the container.\n * This allows to exclude regions of the container that are obscured by other content (such as fixed-positioned toolbars or titles)\n * or to put more breathing room between the targeted element and the edges of the container.\n *\n * Each element can also have a specific offset via the options property.\n */\n offset?: number;\n /** Position of the Vertical scroll to. */\n position?: HvScrollToVerticalPositions;\n /** Position of tooltip identifying the current item. */\n tooltipPosition?: HvScrollToTooltipPositions;\n /** A function called each time the selected index changes. */\n onChange?: (\n event:\n | Event\n | React.MouseEvent<HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>,\n index: number\n ) => void;\n /** A function called each time an user clicks on a tab element. */\n onClick?: (event: React.MouseEvent<HTMLDivElement>, index: number) => void;\n /** A function called each time an user press enter on a tab element. */\n onEnter?: (event: React.KeyboardEvent<HTMLDivElement>, index: number) => void;\n /** A Jss Object used to override or extend the styles applied. */\n classes?: HvScrollToVerticalClasses;\n}\n\n/**\n * The vertical scroll to element can be used to quickly navigate in a page.\n */\nexport const HvScrollToVertical = (props: HvScrollToVerticalProps) => {\n const {\n id,\n defaultSelectedIndex = 0,\n scrollElementId,\n href = true,\n onChange,\n onClick,\n onEnter,\n className,\n classes: classesProp,\n options,\n offset = 0,\n position = \"relative\",\n tooltipPosition = \"left\",\n style,\n ...others\n } = useDefaultProps(\"HvScrollToVertical\", props);\n\n const { classes, css, cx } = useClasses(classesProp);\n const { activeTheme, selectedMode } = useTheme();\n\n const elementId = useUniqueId(id, \"hvVerticalScrollto\");\n\n const [selectedIndex, setScrollTo] = useScrollTo(\n defaultSelectedIndex,\n scrollElementId,\n href,\n offset,\n options,\n onChange\n );\n\n const handleSelection = (\n event:\n | React.MouseEvent<HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>,\n value: string,\n index: number\n ) => {\n event.preventDefault();\n\n const wrappedOnChange = () => {\n onChange?.(event, index);\n };\n\n setScrollTo(event, value, index, wrappedOnChange);\n };\n\n const tooltipWrappers = useMemo(() => {\n return options.map((option) => {\n return withTooltip(option.label, \"div\", tooltipPosition, false);\n });\n }, [options, tooltipPosition]);\n\n const tabs = options.map((option, index) => {\n const selected = selectedIndex === index;\n const tooltipWrapper = tooltipWrappers[index];\n\n return (\n <HvVerticalScrollListItem\n id={setId(elementId, `item-${index}`)}\n onClick={(event) => {\n handleSelection(event, option.value, index);\n onClick?.(event, index);\n }}\n onKeyDown={(event) => {\n if (isKey(event, \"Enter\") === true) {\n handleSelection(event, option.value, index);\n onEnter?.(event, index);\n }\n }}\n tooltipWrapper={tooltipWrapper}\n selected={selected}\n key={option.key || option.label}\n aria-label={option.label}\n />\n );\n });\n\n const positionOffset = calculateOffset(options.length);\n const backgroundColor = hexToRgbA(\n activeTheme?.colors.modes[selectedMode].atmo2,\n activeTheme?.scrollTo.backgroundColorOpacity\n );\n\n return (\n <ol\n className={cx(css({ backgroundColor })
|
|
1
|
+
{"version":3,"file":"ScrollToVertical.js","sources":["../../../../../src/components/ScrollTo/Vertical/ScrollToVertical.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\n\nimport { HvBaseProps } from \"@core/types/generic\";\nimport { useTheme } from \"@core/hooks/useTheme\";\nimport { useUniqueId } from \"@core/hooks/useUniqueId\";\nimport { ExtractNames } from \"@core/utils/classes\";\nimport { isKey } from \"@core/utils/keyboardUtils\";\nimport { setId } from \"@core/utils/setId\";\nimport { hexToRgbA } from \"@core/utils/hexToRgbA\";\n\nimport {\n staticClasses,\n useClasses,\n calculateOffset,\n} from \"./ScrollToVertical.styles\";\nimport { HvVerticalScrollListItem } from \"./VerticalScrollListItem\";\nimport { useScrollTo } from \"../useScrollTo\";\nimport { withTooltip } from \"../withTooltip\";\nimport {\n HvScrollToTooltipPositions,\n HvScrollToVerticalOption,\n HvScrollToVerticalPositions,\n} from \"../types\";\n\nexport { staticClasses as scrollToVerticalClasses };\n\nexport type HvScrollToVerticalClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvScrollToVerticalProps\n extends HvBaseProps<HTMLOListElement, \"onChange\" | \"onClick\"> {\n /** An Array of Objects with Label and Value. Label is the displayed Element and Value is the local navigation location applied */\n options: HvScrollToVerticalOption[];\n /** True if the href location link should be applied. It will create an a element around every list item */\n href?: boolean;\n /** Default selected index passed from the parent. */\n defaultSelectedIndex?: number;\n /**\n * The Id of the scrollable container containing displayed elements.\n *\n * Defaults to `window` if unspecified.\n */\n scrollElementId?: string;\n /**\n * Defines the offset from the top of each element for getting an optimal viewing region in the container.\n * This allows to exclude regions of the container that are obscured by other content (such as fixed-positioned toolbars or titles)\n * or to put more breathing room between the targeted element and the edges of the container.\n *\n * Each element can also have a specific offset via the options property.\n */\n offset?: number;\n /** Position of the Vertical scroll to. */\n position?: HvScrollToVerticalPositions;\n /** Position of tooltip identifying the current item. */\n tooltipPosition?: HvScrollToTooltipPositions;\n /** A function called each time the selected index changes. */\n onChange?: (\n event:\n | Event\n | React.MouseEvent<HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>,\n index: number\n ) => void;\n /** A function called each time an user clicks on a tab element. */\n onClick?: (event: React.MouseEvent<HTMLDivElement>, index: number) => void;\n /** A function called each time an user press enter on a tab element. */\n onEnter?: (event: React.KeyboardEvent<HTMLDivElement>, index: number) => void;\n /** A Jss Object used to override or extend the styles applied. */\n classes?: HvScrollToVerticalClasses;\n}\n\n/**\n * The vertical scroll to element can be used to quickly navigate in a page.\n */\nexport const HvScrollToVertical = (props: HvScrollToVerticalProps) => {\n const {\n id,\n defaultSelectedIndex = 0,\n scrollElementId,\n href = true,\n onChange,\n onClick,\n onEnter,\n className,\n classes: classesProp,\n options,\n offset = 0,\n position = \"relative\",\n tooltipPosition = \"left\",\n style,\n ...others\n } = useDefaultProps(\"HvScrollToVertical\", props);\n\n const { classes, css, cx } = useClasses(classesProp);\n const { activeTheme, selectedMode } = useTheme();\n\n const elementId = useUniqueId(id, \"hvVerticalScrollto\");\n\n const [selectedIndex, setScrollTo] = useScrollTo(\n defaultSelectedIndex,\n scrollElementId,\n href,\n offset,\n options,\n onChange\n );\n\n const handleSelection = (\n event:\n | React.MouseEvent<HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>,\n value: string,\n index: number\n ) => {\n event.preventDefault();\n\n const wrappedOnChange = () => {\n onChange?.(event, index);\n };\n\n setScrollTo(event, value, index, wrappedOnChange);\n };\n\n const tooltipWrappers = useMemo(() => {\n return options.map((option) => {\n return withTooltip(option.label, \"div\", tooltipPosition, false);\n });\n }, [options, tooltipPosition]);\n\n const tabs = options.map((option, index) => {\n const selected = selectedIndex === index;\n const tooltipWrapper = tooltipWrappers[index];\n\n return (\n <HvVerticalScrollListItem\n id={setId(elementId, `item-${index}`)}\n onClick={(event) => {\n handleSelection(event, option.value, index);\n onClick?.(event, index);\n }}\n onKeyDown={(event) => {\n if (isKey(event, \"Enter\") === true) {\n handleSelection(event, option.value, index);\n onEnter?.(event, index);\n }\n }}\n tooltipWrapper={tooltipWrapper}\n selected={selected}\n key={option.key || option.label}\n aria-label={option.label}\n />\n );\n });\n\n const positionOffset = calculateOffset(options.length);\n const backgroundColor = hexToRgbA(\n activeTheme?.colors.modes[selectedMode].atmo2,\n activeTheme?.scrollTo.backgroundColorOpacity\n );\n\n return (\n <ol\n className={cx(\n css({ backgroundColor }),\n classes.root,\n {\n [classes.positionFixed]: position === \"fixed\",\n [classes.positionAbsolute]: position === \"absolute\",\n },\n className\n )}\n style={{ top: `calc(50% - ${positionOffset}px)`, ...style }}\n id={elementId}\n {...others}\n >\n {tabs}\n </ol>\n );\n};\n"],"names":["HvScrollToVertical","props","id","defaultSelectedIndex","scrollElementId","href","onChange","onClick","onEnter","className","classes","classesProp","options","offset","position","tooltipPosition","style","others","useDefaultProps","css","cx","useClasses","activeTheme","selectedMode","useTheme","elementId","useUniqueId","selectedIndex","setScrollTo","useScrollTo","handleSelection","event","value","index","preventDefault","wrappedOnChange","tooltipWrappers","useMemo","map","option","withTooltip","label","tabs","selected","tooltipWrapper","HvVerticalScrollListItem","setId","onKeyDown","isKey","key","positionOffset","calculateOffset","length","backgroundColor","hexToRgbA","colors","modes","atmo2","scrollTo","backgroundColorOpacity","root","positionFixed","positionAbsolute","top","children"],"mappings":";;;;;;;;;;;;;AA0EaA,MAAAA,qBAAqBA,CAACC,UAAmC;AAC9D,QAAA;AAAA,IACJC;AAAAA,IACAC,uBAAuB;AAAA,IACvBC;AAAAA,IACAC,OAAO;AAAA,IACPC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC,SAASC;AAAAA,IACTC;AAAAA,IACAC,SAAS;AAAA,IACTC,WAAW;AAAA,IACXC,kBAAkB;AAAA,IAClBC;AAAAA,IACA,GAAGC;AAAAA,EAAAA,IACDC,gBAAgB,sBAAsBjB,KAAK;AAEzC,QAAA;AAAA,IAAES;AAAAA,IAASS;AAAAA,IAAKC;AAAAA,EAAAA,IAAO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KS,QAAAA,iBAAiBC,gBAAgBvC,QAAQwC,MAAM;AAC/CC,QAAAA,kBAAkBC,UACtBhC,2CAAaiC,OAAOC,MAAMjC,cAAckC,OACxCnC,2CAAaoC,SAASC,sBACxB;AAEA,6BACE,MAAA;AAAA,IACElD,WAAWW,GACTD,IAAI;AAAA,MAAEkC;AAAAA,IAAAA,CAAiB,GACvB3C,QAAQkD,MACR;AAAA,MACE,CAAClD,QAAQmD,aAAa,GAAG/C,aAAa;AAAA,MACtC,CAACJ,QAAQoD,gBAAgB,GAAGhD,aAAa;AAAA,OAE3CL,SACF;AAAA,IACAO,OAAO;AAAA,MAAE+C,KAAM,cAAab;AAAAA,MAAqB,GAAGlC;AAAAA,IAAM;AAAA,IAC1Dd,IAAIuB;AAAAA,IAAU,GACVR;AAAAA,IAAM+C,UAETtB;AAAAA,EAAAA,CACC;AAER;"}
|
|
@@ -1,30 +1,35 @@
|
|
|
1
|
+
import { Tab } from "@mui/material";
|
|
1
2
|
import { useDefaultProps } from "../../hooks/useDefaultProps.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import tabClasses from "./tabClasses.js";
|
|
3
|
+
import { useClasses } from "./Tab.styles.js";
|
|
4
|
+
import { staticClasses } from "./Tab.styles.js";
|
|
5
5
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
6
6
|
const HvTab = (props) => {
|
|
7
7
|
const {
|
|
8
|
-
classes,
|
|
8
|
+
classes: classesProp,
|
|
9
9
|
iconPosition = "top",
|
|
10
10
|
disabled = false,
|
|
11
11
|
...others
|
|
12
12
|
} = useDefaultProps("HvTab", props);
|
|
13
|
-
|
|
13
|
+
const {
|
|
14
|
+
classes,
|
|
15
|
+
cx
|
|
16
|
+
} = useClasses(classesProp);
|
|
17
|
+
return /* @__PURE__ */ jsx(Tab, {
|
|
14
18
|
classes: {
|
|
15
|
-
root:
|
|
16
|
-
selected:
|
|
17
|
-
disabled:
|
|
19
|
+
root: classes.root,
|
|
20
|
+
selected: classes.selected,
|
|
21
|
+
disabled: classes.disabled
|
|
18
22
|
},
|
|
19
23
|
disableRipple: true,
|
|
20
24
|
disableTouchRipple: true,
|
|
21
|
-
focusVisibleClassName:
|
|
25
|
+
focusVisibleClassName: cx("HvIsFocusVisible", classes.focusVisible),
|
|
22
26
|
disabled,
|
|
23
27
|
iconPosition,
|
|
24
28
|
...others
|
|
25
29
|
});
|
|
26
30
|
};
|
|
27
31
|
export {
|
|
28
|
-
HvTab
|
|
32
|
+
HvTab,
|
|
33
|
+
staticClasses as tabClasses
|
|
29
34
|
};
|
|
30
35
|
//# sourceMappingURL=Tab.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.js","sources":["../../../../src/components/Tab/Tab.tsx"],"sourcesContent":["import { TabProps as MuiTabProps } from \"@mui/material\";\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\
|
|
1
|
+
{"version":3,"file":"Tab.js","sources":["../../../../src/components/Tab/Tab.tsx"],"sourcesContent":["import { Tab, TabProps as MuiTabProps } from \"@mui/material\";\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\nimport { HvBaseProps } from \"@core/types/generic\";\nimport { ExtractNames } from \"@core/utils/classes\";\nimport { staticClasses, useClasses } from \"./Tab.styles\";\n\nexport { staticClasses as tabClasses };\n\nexport type HvTabClasses = ExtractNames<typeof useClasses>;\n\n// Mui Tab props: https://mui.com/material-ui/api/tab/#props\nexport interface HvTabProps\n extends Omit<MuiTabProps, \"children\">,\n HvBaseProps<HTMLDivElement, \"children\"> {\n /** If `true`, the tab will be disabled. */\n disabled?: boolean;\n /** The icon element. */\n icon?: React.ReactElement | string;\n /** The label element. */\n label?: React.ReactNode;\n /** The position of the icon relative to the label. */\n iconPosition?: \"bottom\" | \"end\" | \"start\" | \"top\";\n /** A Jss Object used to override or extend the component styles. */\n classes?: HvTabClasses;\n}\n\nexport const HvTab = (props: HvTabProps) => {\n const {\n classes: classesProp,\n iconPosition = \"top\",\n disabled = false,\n ...others\n } = useDefaultProps(\"HvTab\", props);\n const { classes, cx } = useClasses(classesProp);\n\n return (\n <Tab\n classes={{\n root: classes.root,\n selected: classes.selected,\n disabled: classes.disabled,\n }}\n disableRipple\n disableTouchRipple\n // expose the global class HvIsFocusVisible as a marker\n // not to be styled directly, only as helper in specific css queries\n focusVisibleClassName={cx(\"HvIsFocusVisible\", classes.focusVisible)}\n disabled={disabled}\n iconPosition={iconPosition}\n {...others}\n />\n );\n};\n"],"names":["HvTab","props","classes","classesProp","iconPosition","disabled","others","useDefaultProps","cx","useClasses","Tab","root","selected","disableRipple","disableTouchRipple","focusVisibleClassName","focusVisible"],"mappings":";;;;;AA0BaA,MAAAA,QAAQA,CAACC,UAAsB;AACpC,QAAA;AAAA,IACJC,SAASC;AAAAA,IACTC,eAAe;AAAA,IACfC,WAAW;AAAA,IACX,GAAGC;AAAAA,EAAAA,IACDC,gBAAgB,SAASN,KAAK;AAC5B,QAAA;AAAA,IAAEC;AAAAA,IAASM;AAAAA,EAAAA,IAAOC,WAAWN,WAAW;AAE9C,6BACGO,KAAG;AAAA,IACFR,SAAS;AAAA,MACPS,MAAMT,QAAQS;AAAAA,MACdC,UAAUV,QAAQU;AAAAA,MAClBP,UAAUH,QAAQG;AAAAA,IACpB;AAAA,IACAQ,eAAa;AAAA,IACbC,oBAAkB;AAAA,IAGlBC,uBAAuBP,GAAG,oBAAoBN,QAAQc,YAAY;AAAA,IAClEX;AAAAA,IACAD;AAAAA,IAA2B,GACvBE;AAAAA,EAAAA,CACL;AAEL;"}
|
|
@@ -1,66 +1,64 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createClasses } from "../../utils/classes.js";
|
|
2
2
|
import { theme } from "@hitachivantara/uikit-styles";
|
|
3
|
-
import { Tab } from "@mui/material";
|
|
4
3
|
import { outlineStyles } from "../../utils/focusUtils.js";
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
4
|
+
const {
|
|
5
|
+
staticClasses,
|
|
6
|
+
useClasses
|
|
7
|
+
} = createClasses("HvTab", {
|
|
8
|
+
root: {
|
|
9
|
+
marginTop: "3px",
|
|
10
|
+
padding: theme.tab.padding,
|
|
11
|
+
minWidth: 70,
|
|
12
|
+
minHeight: 32,
|
|
13
|
+
textTransform: "none",
|
|
14
|
+
fontFamily: theme.fontFamily.body,
|
|
15
|
+
...theme.typography.body,
|
|
16
|
+
"&:hover": {
|
|
17
|
+
backgroundColor: theme.tab.hoverBackgroundColor,
|
|
18
|
+
borderRadius: theme.tab.hoverBackgroundBorderRadius,
|
|
19
|
+
"&::after": {
|
|
20
|
+
height: "1px",
|
|
21
|
+
backgroundColor: theme.tab.hoverUnderlineBackgroundColor
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"&$selected": {
|
|
25
|
+
color: theme.typography.label.color,
|
|
26
|
+
fontWeight: theme.typography.label.fontWeight,
|
|
27
|
+
lineHeight: theme.typography.label.lineHeight,
|
|
28
|
+
letterSpacing: theme.typography.label.letterSpacing
|
|
29
|
+
},
|
|
30
|
+
"&$disabled": {
|
|
31
|
+
color: theme.colors.secondary_60,
|
|
32
|
+
cursor: "not-allowed",
|
|
33
|
+
pointerEvents: "all",
|
|
34
|
+
opacity: 1,
|
|
35
|
+
"&:hover": {
|
|
36
|
+
background: "none"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
opacity: 1,
|
|
32
40
|
"&::after": {
|
|
41
|
+
position: "absolute",
|
|
42
|
+
left: 0,
|
|
43
|
+
top: "calc(100% - 1px)",
|
|
33
44
|
height: "1px",
|
|
34
|
-
|
|
45
|
+
width: "100%",
|
|
46
|
+
backgroundColor: theme.colors.atmo4,
|
|
47
|
+
content: "''"
|
|
48
|
+
},
|
|
49
|
+
// Override Mui styling: https://mui.com/material-ui/api/tab/#css
|
|
50
|
+
"& .MuiTab-iconWrapper": {
|
|
51
|
+
margin: 0
|
|
35
52
|
}
|
|
36
53
|
},
|
|
37
|
-
|
|
54
|
+
focusVisible: {
|
|
38
55
|
...outlineStyles
|
|
39
56
|
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
// Override Mui styling: https://mui.com/material-ui/api/tab/#css
|
|
44
|
-
"&.Mui-selected": {
|
|
45
|
-
color: theme.colors.secondary,
|
|
46
|
-
letterSpacing: theme.typography.label.letterSpacing,
|
|
47
|
-
lineHeight: theme.typography.label.lineHeight,
|
|
48
|
-
fontWeight: theme.typography.label.fontWeight
|
|
49
|
-
},
|
|
50
|
-
"&.Mui-disabled": {
|
|
51
|
-
color: theme.colors.secondary_60,
|
|
52
|
-
cursor: "not-allowed",
|
|
53
|
-
pointerEvents: "all",
|
|
54
|
-
opacity: 1,
|
|
55
|
-
"&:hover": {
|
|
56
|
-
background: "none"
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
"& .MuiTab-iconWrapper": {
|
|
60
|
-
margin: 0
|
|
61
|
-
}
|
|
62
|
-
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL2h2LXVpa2l0LXJlYWN0L2h2LXVpa2l0LXJlYWN0L3BhY2thZ2VzL2NvcmUvc3JjL2NvbXBvbmVudHMvVGFiL1RhYi5zdHlsZXMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVV5QiIsImZpbGUiOiIvaG9tZS9ydW5uZXIvd29yay9odi11aWtpdC1yZWFjdC9odi11a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cbiAgICBcIiY6aG92ZXJcIjoge1xuICAgICAgYmFja2dyb3VuZDogXCJub25lXCIsXG4gICAgfSxcbiAgfSxcbiAgXCImIC5NdWlUYWItaWNvbldyYXBwZXJcIjoge1xuICAgIG1hcmdpbjogMCxcbiAgfSxcbn0pO1xuIl19 */");
|
|
57
|
+
selected: {},
|
|
58
|
+
disabled: {}
|
|
59
|
+
});
|
|
63
60
|
export {
|
|
64
|
-
|
|
61
|
+
staticClasses,
|
|
62
|
+
useClasses
|
|
65
63
|
};
|
|
66
64
|
//# sourceMappingURL=Tab.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.styles.js","sources":["../../../../src/components/Tab/Tab.styles.tsx"],"sourcesContent":["import { CSSProperties } from \"react\";\
|
|
1
|
+
{"version":3,"file":"Tab.styles.js","sources":["../../../../src/components/Tab/Tab.styles.tsx"],"sourcesContent":["import { CSSProperties } from \"react\";\nimport { createClasses } from \"@core/utils/classes\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\nimport { outlineStyles } from \"@core/utils/focusUtils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvTab\", {\n root: {\n marginTop: \"3px\",\n padding: theme.tab.padding,\n minWidth: 70,\n minHeight: 32,\n textTransform: \"none\",\n fontFamily: theme.fontFamily.body,\n ...(theme.typography.body as CSSProperties),\n \"&:hover\": {\n backgroundColor: theme.tab.hoverBackgroundColor,\n borderRadius: theme.tab.hoverBackgroundBorderRadius,\n \"&::after\": {\n height: \"1px\",\n backgroundColor: theme.tab.hoverUnderlineBackgroundColor,\n },\n },\n \"&$selected\": {\n color: theme.typography.label.color,\n fontWeight: theme.typography.label.fontWeight,\n lineHeight: theme.typography.label.lineHeight,\n letterSpacing: theme.typography.label.letterSpacing,\n },\n \"&$disabled\": {\n color: theme.colors.secondary_60,\n cursor: \"not-allowed\",\n pointerEvents: \"all\",\n opacity: 1,\n \"&:hover\": {\n background: \"none\",\n },\n },\n opacity: 1,\n \"&::after\": {\n position: \"absolute\",\n left: 0,\n top: \"calc(100% - 1px)\",\n height: \"1px\",\n width: \"100%\",\n backgroundColor: theme.colors.atmo4,\n content: \"''\",\n },\n // Override Mui styling: https://mui.com/material-ui/api/tab/#css\n \"& .MuiTab-iconWrapper\": {\n margin: 0,\n },\n },\n focusVisible: {\n ...outlineStyles,\n },\n selected: {},\n disabled: {},\n});\n"],"names":["staticClasses","useClasses","createClasses","root","marginTop","padding","theme","tab","minWidth","minHeight","textTransform","fontFamily","body","typography","backgroundColor","hoverBackgroundColor","borderRadius","hoverBackgroundBorderRadius","height","hoverUnderlineBackgroundColor","color","label","fontWeight","lineHeight","letterSpacing","colors","secondary_60","cursor","pointerEvents","opacity","background","position","left","top","width","atmo4","content","margin","focusVisible","outlineStyles","selected","disabled"],"mappings":";;;AAKa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,cAAc,SAAS;AAAA,EAClEC,MAAM;AAAA,IACJC,WAAW;AAAA,IACXC,SAASC,MAAMC,IAAIF;AAAAA,IACnBG,UAAU;AAAA,IACVC,WAAW;AAAA,IACXC,eAAe;AAAA,IACfC,YAAYL,MAAMK,WAAWC;AAAAA,IAC7B,GAAIN,MAAMO,WAAWD;AAAAA,IACrB,WAAW;AAAA,MACTE,iBAAiBR,MAAMC,IAAIQ;AAAAA,MAC3BC,cAAcV,MAAMC,IAAIU;AAAAA,MACxB,YAAY;AAAA,QACVC,QAAQ;AAAA,QACRJ,iBAAiBR,MAAMC,IAAIY;AAAAA,MAC7B;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZC,OAAOd,MAAMO,WAAWQ,MAAMD;AAAAA,MAC9BE,YAAYhB,MAAMO,WAAWQ,MAAMC;AAAAA,MACnCC,YAAYjB,MAAMO,WAAWQ,MAAME;AAAAA,MACnCC,eAAelB,MAAMO,WAAWQ,MAAMG;AAAAA,IACxC;AAAA,IACA,cAAc;AAAA,MACZJ,OAAOd,MAAMmB,OAAOC;AAAAA,MACpBC,QAAQ;AAAA,MACRC,eAAe;AAAA,MACfC,SAAS;AAAA,MACT,WAAW;AAAA,QACTC,YAAY;AAAA,MACd;AAAA,IACF;AAAA,IACAD,SAAS;AAAA,IACT,YAAY;AAAA,MACVE,UAAU;AAAA,MACVC,MAAM;AAAA,MACNC,KAAK;AAAA,MACLf,QAAQ;AAAA,MACRgB,OAAO;AAAA,MACPpB,iBAAiBR,MAAMmB,OAAOU;AAAAA,MAC9BC,SAAS;AAAA,IACX;AAAA;AAAA,IAEA,yBAAyB;AAAA,MACvBC,QAAQ;AAAA,IACV;AAAA,EACF;AAAA,EACAC,cAAc;AAAA,IACZ,GAAGC;AAAAA,EACL;AAAA,EACAC,UAAU,CAAC;AAAA,EACXC,UAAU,CAAC;AACb,CAAC;"}
|
|
@@ -5,7 +5,8 @@ import tagsInputClasses from "./tagsInputClasses.js";
|
|
|
5
5
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
6
6
|
import { staticClasses } from "../BaseInput/BaseInput.styles.js";
|
|
7
7
|
import "../BaseInput/BaseInput.js";
|
|
8
|
-
import
|
|
8
|
+
import { staticClasses as staticClasses$1 } from "../ListContainer/ListItem/ListItem.styles.js";
|
|
9
|
+
import { HvListItem } from "../ListContainer/ListItem/ListItem.js";
|
|
9
10
|
import { HvTag } from "../Tag/Tag.js";
|
|
10
11
|
import { HvInput } from "../Input/Input.js";
|
|
11
12
|
import { HvFormElement } from "../Forms/FormElement/FormElement.js";
|
|
@@ -14,9 +15,8 @@ import { HvInfoMessage } from "../Forms/InfoMessage/InfoMessage.js";
|
|
|
14
15
|
import { HvCharCounter } from "../Forms/CharCounter/CharCounter.js";
|
|
15
16
|
import { HvListContainer } from "../ListContainer/ListContainer.js";
|
|
16
17
|
import { HvWarningText } from "../Forms/WarningText/WarningText.js";
|
|
17
|
-
import { HvListItem } from "../ListContainer/ListItem/ListItem.js";
|
|
18
18
|
import { HvSuggestions } from "../Forms/Suggestions/Suggestions.js";
|
|
19
|
-
import { staticClasses as staticClasses$
|
|
19
|
+
import { staticClasses as staticClasses$2 } from "../Forms/Suggestions/Suggestions.styles.js";
|
|
20
20
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() {
|
|
21
21
|
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
|
22
22
|
}
|
|
@@ -216,7 +216,7 @@ const StyledListItem = /* @__PURE__ */ _styled((props) => /* @__PURE__ */ jsx(Hv
|
|
|
216
216
|
"&:not(:last-child)": {
|
|
217
217
|
marginBottom: 2
|
|
218
218
|
},
|
|
219
|
-
[`&.${
|
|
219
|
+
[`&.${staticClasses$1.gutters}`]: {
|
|
220
220
|
padding: "0 5px"
|
|
221
221
|
},
|
|
222
222
|
...$singleLine && {
|
|
@@ -260,7 +260,7 @@ const StyledInputListItem = /* @__PURE__ */ _styled((props) => /* @__PURE__ */ j
|
|
|
260
260
|
flexGrow: 1,
|
|
261
261
|
height: 24,
|
|
262
262
|
lineHeight: "24px",
|
|
263
|
-
[`&.${
|
|
263
|
+
[`&.${staticClasses$1.gutters}`]: {
|
|
264
264
|
padding: "0 5px"
|
|
265
265
|
},
|
|
266
266
|
...$singleLine && {
|
|
@@ -337,7 +337,7 @@ const StyledSuggestions = /* @__PURE__ */ _styled((props) => /* @__PURE__ */ jsx
|
|
|
337
337
|
width: "100%",
|
|
338
338
|
position: "relative",
|
|
339
339
|
top: 59,
|
|
340
|
-
[`& .${staticClasses$
|
|
340
|
+
[`& .${staticClasses$2.root} .${staticClasses$2.list} &`]: {
|
|
341
341
|
width: "100%"
|
|
342
342
|
}
|
|
343
343
|
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL2h2LXVpa2l0LXJlYWN0L2h2LXVpa2l0LXJlYWN0L3BhY2thZ2VzL2NvcmUvc3J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bGFzc2VzLnJvb3R9IC4ke3N1Z2dlc3Rpb25zQ2xhc3Nlcy5saXN0fSAmYF06IHtcbiAgICB3aWR0aDogXCIxMDAlXCIsXG4gIH0sXG59KTtcbiJdfQ== */");
|
|
@@ -53,11 +53,11 @@ const HvTypography = forwardRef((props, ref) => {
|
|
|
53
53
|
const Component = ComponentProp || paragraph && "p" || HvTypographyMap[variant] || "span";
|
|
54
54
|
return /* @__PURE__ */ jsx(Component, {
|
|
55
55
|
ref,
|
|
56
|
-
className: cx(classes.root, classes[variant],
|
|
56
|
+
className: cx(classes.root, classes[variant], {
|
|
57
57
|
[classes.isLink]: link,
|
|
58
58
|
[classes.noWrap]: noWrap,
|
|
59
59
|
[classes.disabled]: disabled
|
|
60
|
-
}),
|
|
60
|
+
}, className),
|
|
61
61
|
...others
|
|
62
62
|
});
|
|
63
63
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typography.js","sources":["../../../../src/components/Typography/Typography.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\n\nimport { PolymorphicComponentRef, PolymorphicRef } from \"@core/types/generic\";\nimport { ExtractNames } from \"@core/utils/classes\";\nimport { useTheme } from \"@core/hooks/useTheme\";\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\n\nimport {\n HvTypographyLegacyVariants,\n HvTypographyVariants,\n mapVariant,\n} from \"./utils\";\nimport { staticClasses, useClasses } from \"./Typography.styles\";\n\nexport { staticClasses as typographyClasses };\n\nexport type HvTypographyClasses = ExtractNames<typeof useClasses>;\n\nconst HvTypographyMap = {\n display: \"h1\",\n title1: \"h1\",\n title2: \"h2\",\n title3: \"h3\",\n title4: \"h4\",\n body: \"p\",\n label: \"span\",\n caption1: \"p\",\n caption2: \"p\",\n // LEGACY\n \"5xlTitle\": \"h1\",\n \"4xlTitle\": \"h1\",\n xxlTitle: \"h1\",\n lTitle: \"h2\",\n sTitle: \"h4\",\n xxsTitle: \"h6\",\n sectionTitle: \"p\",\n placeholderText: \"p\",\n link: \"p\",\n disabledText: \"p\",\n selectedNavText: \"p\",\n vizTextDisabled: \"p\",\n xsInlineLink: \"p\",\n} as const;\n\nexport type HvTypographyProps<C extends React.ElementType = \"p\"> =\n PolymorphicComponentRef<\n C,\n {\n /** Use the variant prop to change the visual style of the Typography. */\n variant?: HvTypographyVariants | HvTypographyLegacyVariants;\n /** If `true` the typography will display the look of a link. */\n link?: boolean;\n /** If `true` the typography will display the look of a disabled state. */\n disabled?: boolean;\n /** If `true`, the text will have a bottom margin. */\n paragraph?: boolean;\n /**\n * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.\n *\n * Note that text overflow can only happen with block or inline-block level elements\n * (the element needs to have a width in order to overflow).\n */\n noWrap?: boolean;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvTypographyClasses;\n }\n >;\n\n/**\n * Typography component is used to render text and paragraphs within an interface.\n */\nexport const HvTypography: <C extends React.ElementType = \"p\">(\n props: HvTypographyProps<C>\n) => React.ReactElement | null = forwardRef(\n <C extends React.ElementType = \"p\">(\n props: HvTypographyProps<C>,\n ref: PolymorphicRef<C>\n ) => {\n const {\n className,\n component: ComponentProp,\n classes: classesProp,\n variant: variantProp = \"body\",\n link = false,\n disabled = false,\n noWrap = false,\n paragraph = false,\n ...others\n } = useDefaultProps(\"HvTypography\", props);\n const { classes, cx } = useClasses(classesProp);\n const { activeTheme } = useTheme();\n\n const variant = mapVariant(variantProp, activeTheme?.name);\n\n const Component =\n ComponentProp || (paragraph && \"p\") || HvTypographyMap[variant] || \"span\";\n\n return (\n <Component\n ref={ref}\n className={cx(classes.root
|
|
1
|
+
{"version":3,"file":"Typography.js","sources":["../../../../src/components/Typography/Typography.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\n\nimport { PolymorphicComponentRef, PolymorphicRef } from \"@core/types/generic\";\nimport { ExtractNames } from \"@core/utils/classes\";\nimport { useTheme } from \"@core/hooks/useTheme\";\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\n\nimport {\n HvTypographyLegacyVariants,\n HvTypographyVariants,\n mapVariant,\n} from \"./utils\";\nimport { staticClasses, useClasses } from \"./Typography.styles\";\n\nexport { staticClasses as typographyClasses };\n\nexport type HvTypographyClasses = ExtractNames<typeof useClasses>;\n\nconst HvTypographyMap = {\n display: \"h1\",\n title1: \"h1\",\n title2: \"h2\",\n title3: \"h3\",\n title4: \"h4\",\n body: \"p\",\n label: \"span\",\n caption1: \"p\",\n caption2: \"p\",\n // LEGACY\n \"5xlTitle\": \"h1\",\n \"4xlTitle\": \"h1\",\n xxlTitle: \"h1\",\n lTitle: \"h2\",\n sTitle: \"h4\",\n xxsTitle: \"h6\",\n sectionTitle: \"p\",\n placeholderText: \"p\",\n link: \"p\",\n disabledText: \"p\",\n selectedNavText: \"p\",\n vizTextDisabled: \"p\",\n xsInlineLink: \"p\",\n} as const;\n\nexport type HvTypographyProps<C extends React.ElementType = \"p\"> =\n PolymorphicComponentRef<\n C,\n {\n /** Use the variant prop to change the visual style of the Typography. */\n variant?: HvTypographyVariants | HvTypographyLegacyVariants;\n /** If `true` the typography will display the look of a link. */\n link?: boolean;\n /** If `true` the typography will display the look of a disabled state. */\n disabled?: boolean;\n /** If `true`, the text will have a bottom margin. */\n paragraph?: boolean;\n /**\n * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.\n *\n * Note that text overflow can only happen with block or inline-block level elements\n * (the element needs to have a width in order to overflow).\n */\n noWrap?: boolean;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvTypographyClasses;\n }\n >;\n\n/**\n * Typography component is used to render text and paragraphs within an interface.\n */\nexport const HvTypography: <C extends React.ElementType = \"p\">(\n props: HvTypographyProps<C>\n) => React.ReactElement | null = forwardRef(\n <C extends React.ElementType = \"p\">(\n props: HvTypographyProps<C>,\n ref: PolymorphicRef<C>\n ) => {\n const {\n className,\n component: ComponentProp,\n classes: classesProp,\n variant: variantProp = \"body\",\n link = false,\n disabled = false,\n noWrap = false,\n paragraph = false,\n ...others\n } = useDefaultProps(\"HvTypography\", props);\n const { classes, cx } = useClasses(classesProp);\n const { activeTheme } = useTheme();\n\n const variant = mapVariant(variantProp, activeTheme?.name);\n\n const Component =\n ComponentProp || (paragraph && \"p\") || HvTypographyMap[variant] || \"span\";\n\n return (\n <Component\n ref={ref}\n className={cx(\n classes.root,\n classes[variant],\n {\n [classes.isLink]: link,\n [classes.noWrap]: noWrap,\n [classes.disabled]: disabled,\n },\n className\n )}\n {...others}\n />\n );\n }\n);\n"],"names":["HvTypographyMap","display","title1","title2","title3","title4","body","label","caption1","caption2","xxlTitle","lTitle","sTitle","xxsTitle","sectionTitle","placeholderText","link","disabledText","selectedNavText","vizTextDisabled","xsInlineLink","HvTypography","forwardRef","props","ref","className","component","ComponentProp","classes","classesProp","variant","variantProp","disabled","noWrap","paragraph","others","useDefaultProps","cx","useClasses","activeTheme","useTheme","mapVariant","name","Component","root","isLink"],"mappings":";;;;;;;AAkBA,MAAMA,kBAAkB;AAAA,EACtBC,SAAS;AAAA,EACTC,QAAQ;AAAA,EACRC,QAAQ;AAAA,EACRC,QAAQ;AAAA,EACRC,QAAQ;AAAA,EACRC,MAAM;AAAA,EACNC,OAAO;AAAA,EACPC,UAAU;AAAA,EACVC,UAAU;AAAA;AAAA,EAEV,YAAY;AAAA,EACZ,YAAY;AAAA,EACZC,UAAU;AAAA,EACVC,QAAQ;AAAA,EACRC,QAAQ;AAAA,EACRC,UAAU;AAAA,EACVC,cAAc;AAAA,EACdC,iBAAiB;AAAA,EACjBC,MAAM;AAAA,EACNC,cAAc;AAAA,EACdC,iBAAiB;AAAA,EACjBC,iBAAiB;AAAA,EACjBC,cAAc;AAChB;AA6BO,MAAMC,eAEoBC,WAC/B,CACEC,OACAC,QACG;AACG,QAAA;AAAA,IACJC;AAAAA,IACAC,WAAWC;AAAAA,IACXC,SAASC;AAAAA,IACTC,SAASC,cAAc;AAAA,IACvBf,OAAO;AAAA,IACPgB,WAAW;AAAA,IACXC,SAAS;AAAA,IACTC,YAAY;AAAA,IACZ,GAAGC;AAAAA,EAAAA,IACDC,gBAAgB,gBAAgBb,KAAK;AACnC,QAAA;AAAA,IAAEK;AAAAA,IAASS;AAAAA,EAAAA,IAAOC,WAAWT,WAAW;AACxC,QAAA;AAAA,IAAEU;AAAAA,MAAgBC,SAAS;AAEjC,QAAMV,UAAUW,WAAWV,aAAaQ,2CAAaG,IAAI;AAEzD,QAAMC,YACJhB,iBAAkBO,aAAa,OAAQlC,gBAAgB8B,OAAO,KAAK;AAErE,6BACGa,WAAS;AAAA,IACRnB;AAAAA,IACAC,WAAWY,GACTT,QAAQgB,MACRhB,QAAQE,OAAO,GACf;AAAA,MACE,CAACF,QAAQiB,MAAM,GAAG7B;AAAAA,MAClB,CAACY,QAAQK,MAAM,GAAGA;AAAAA,MAClB,CAACL,QAAQI,QAAQ,GAAGA;AAAAA,OAEtBP,SACF;AAAA,IAAE,GACEU;AAAAA,EAAAA,CACL;AAEL,CACF;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
|
2
2
|
import { theme } from "@hitachivantara/uikit-styles";
|
|
3
3
|
import { HvListItem } from "../../ListContainer/ListItem/ListItem.js";
|
|
4
|
-
import
|
|
4
|
+
import { staticClasses } from "../../ListContainer/ListItem/ListItem.styles.js";
|
|
5
5
|
const StyledListItem = /* @__PURE__ */ _styled(HvListItem, process.env.NODE_ENV === "production" ? {
|
|
6
6
|
target: "e13y3edh0"
|
|
7
7
|
} : {
|
|
@@ -16,14 +16,14 @@ const StyledListItem = /* @__PURE__ */ _styled(HvListItem, process.env.NODE_ENV
|
|
|
16
16
|
"& > button": {
|
|
17
17
|
marginLeft: "auto"
|
|
18
18
|
},
|
|
19
|
-
[`&.${
|
|
19
|
+
[`&.${staticClasses.selected}`]: {
|
|
20
20
|
background: theme.colors.atmo3,
|
|
21
21
|
borderLeft: theme.verticalNavigation.activeBorderLeft,
|
|
22
22
|
"& *": {
|
|
23
23
|
background: theme.colors.atmo3
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
-
[`&.${
|
|
26
|
+
[`&.${staticClasses.focus}`]: {
|
|
27
27
|
background: theme.colors.atmo3,
|
|
28
28
|
"& *": {
|
|
29
29
|
background: theme.colors.atmo3
|
package/dist/esm/components/VerticalNavigation/NavigationSlider/NavigationSlider.styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationSlider.styles.js","sources":["../../../../../src/components/VerticalNavigation/NavigationSlider/NavigationSlider.styles.tsx"],"sourcesContent":["import styled from \"@emotion/styled\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\nimport { HvListItem, listItemClasses } from \"@core/components/ListContainer\";\n\nexport const StyledListItem = styled(HvListItem)({\n display: \"flex\",\n alignItems: \"center\",\n borderLeft: theme.verticalNavigation.inactiveBorderLeft,\n minHeight: \"48px\",\n marginBottom: \"8px\",\n \"& > button\": {\n marginLeft: \"auto\",\n },\n\n [`&.${listItemClasses.selected}`]: {\n background: theme.colors.atmo3,\n borderLeft: theme.verticalNavigation.activeBorderLeft,\n \"& *\": {\n background: theme.colors.atmo3,\n },\n },\n\n [`&.${listItemClasses.focus}`]: {\n background: theme.colors.atmo3,\n \"& *\": {\n background: theme.colors.atmo3,\n },\n },\n});\n"],"names":["StyledListItem","HvListItem","process","env","NODE_ENV","target","label","display","alignItems","borderLeft","theme","verticalNavigation","inactiveBorderLeft","minHeight","marginBottom","marginLeft","listItemClasses","selected","background","colors","atmo3","activeBorderLeft","focus"],"mappings":";;;;AAIO,MAAMA,iBAAwBC,wBAAAA,YAAUC,QAAAC,IAAAC,aAAA,eAAA;AAAA,EAAAC,QAAA;AAAA,IAAA;AAAA,EAAAA,QAAA;AAAA,EAAAC,OAAA;AAAA,CAAA,EAAE;AAAA,EAC/CC,SAAS;AAAA,EACTC,YAAY;AAAA,EACZC,YAAYC,MAAMC,mBAAmBC;AAAAA,EACrCC,WAAW;AAAA,EACXC,cAAc;AAAA,EACd,cAAc;AAAA,IACZC,YAAY;AAAA,EACd;AAAA,EAEA,CAAE,KAAIC,
|
|
1
|
+
{"version":3,"file":"NavigationSlider.styles.js","sources":["../../../../../src/components/VerticalNavigation/NavigationSlider/NavigationSlider.styles.tsx"],"sourcesContent":["import styled from \"@emotion/styled\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\nimport { HvListItem, listItemClasses } from \"@core/components/ListContainer\";\n\nexport const StyledListItem = styled(HvListItem)({\n display: \"flex\",\n alignItems: \"center\",\n borderLeft: theme.verticalNavigation.inactiveBorderLeft,\n minHeight: \"48px\",\n marginBottom: \"8px\",\n \"& > button\": {\n marginLeft: \"auto\",\n },\n\n [`&.${listItemClasses.selected}`]: {\n background: theme.colors.atmo3,\n borderLeft: theme.verticalNavigation.activeBorderLeft,\n \"& *\": {\n background: theme.colors.atmo3,\n },\n },\n\n [`&.${listItemClasses.focus}`]: {\n background: theme.colors.atmo3,\n \"& *\": {\n background: theme.colors.atmo3,\n },\n },\n});\n"],"names":["StyledListItem","HvListItem","process","env","NODE_ENV","target","label","display","alignItems","borderLeft","theme","verticalNavigation","inactiveBorderLeft","minHeight","marginBottom","marginLeft","listItemClasses","selected","background","colors","atmo3","activeBorderLeft","focus"],"mappings":";;;;AAIO,MAAMA,iBAAwBC,wBAAAA,YAAUC,QAAAC,IAAAC,aAAA,eAAA;AAAA,EAAAC,QAAA;AAAA,IAAA;AAAA,EAAAA,QAAA;AAAA,EAAAC,OAAA;AAAA,CAAA,EAAE;AAAA,EAC/CC,SAAS;AAAA,EACTC,YAAY;AAAA,EACZC,YAAYC,MAAMC,mBAAmBC;AAAAA,EACrCC,WAAW;AAAA,EACXC,cAAc;AAAA,EACd,cAAc;AAAA,IACZC,YAAY;AAAA,EACd;AAAA,EAEA,CAAE,KAAIC,cAAgBC,UAAU,GAAG;AAAA,IACjCC,YAAYR,MAAMS,OAAOC;AAAAA,IACzBX,YAAYC,MAAMC,mBAAmBU;AAAAA,IACrC,OAAO;AAAA,MACLH,YAAYR,MAAMS,OAAOC;AAAAA,IAC3B;AAAA,EACF;AAAA,EAEA,CAAE,KAAIJ,cAAgBM,OAAO,GAAG;AAAA,IAC9BJ,YAAYR,MAAMS,OAAOC;AAAAA,IACzB,OAAO;AAAA,MACLF,YAAYR,MAAMS,OAAOC;AAAAA,IAC3B;AAAA,EACF;AACF,GAAClB,QAAAC,IAAAC,aAAC,eAAA,KAAA,qmDAAA;"}
|