@veracity/vui 2.31.0 → 2.32.0
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/button/button.d.ts.map +1 -1
- package/dist/cjs/button/button.js +15 -0
- package/dist/cjs/button/button.js.map +1 -1
- package/dist/cjs/footer/footer.d.ts.map +1 -1
- package/dist/cjs/footer/footer.js +1 -1
- package/dist/cjs/footer/footer.js.map +1 -1
- package/dist/cjs/header/loggedInHeader.js +1 -1
- package/dist/cjs/header/loggedInHeader.js.map +1 -1
- package/dist/cjs/header/loggedOutHeader.js +1 -1
- package/dist/cjs/header/loggedOutHeader.js.map +1 -1
- package/dist/cjs/icons/baseIcons/brand/brandXTwitter.d.ts +4 -0
- package/dist/cjs/icons/baseIcons/brand/brandXTwitter.d.ts.map +1 -0
- package/dist/cjs/icons/baseIcons/brand/brandXTwitter.js +7 -0
- package/dist/cjs/icons/baseIcons/brand/brandXTwitter.js.map +1 -0
- package/dist/cjs/icons/baseIcons/brand/brandXTwitterSolid.d.ts +4 -0
- package/dist/cjs/icons/baseIcons/brand/brandXTwitterSolid.d.ts.map +1 -0
- package/dist/cjs/icons/baseIcons/brand/brandXTwitterSolid.js +7 -0
- package/dist/cjs/icons/baseIcons/brand/brandXTwitterSolid.js.map +1 -0
- package/dist/cjs/icons/baseIcons/icons.d.ts +3 -2
- package/dist/cjs/icons/baseIcons/icons.d.ts.map +1 -1
- package/dist/cjs/icons/baseIcons/icons.js +12 -10
- package/dist/cjs/icons/baseIcons/icons.js.map +1 -1
- package/dist/cjs/icons/baseIcons/types.d.ts +2 -2
- package/dist/cjs/icons/baseIcons/types.d.ts.map +1 -1
- package/dist/cjs/icons/baseIcons/ui/uiShield.js +1 -1
- package/dist/cjs/icons/baseIcons/ui/uiShield.js.map +1 -1
- package/dist/cjs/icons/baseIcons/ui/uiShieldSolid.d.ts +4 -0
- package/dist/cjs/icons/baseIcons/ui/uiShieldSolid.d.ts.map +1 -0
- package/dist/cjs/icons/baseIcons/ui/uiShieldSolid.js +8 -0
- package/dist/cjs/icons/baseIcons/ui/uiShieldSolid.js.map +1 -0
- package/dist/cjs/input/consts.d.ts +3 -3
- package/dist/cjs/input/consts.js +5 -5
- package/dist/cjs/input/consts.js.map +1 -1
- package/dist/cjs/input/input.d.ts.map +1 -1
- package/dist/cjs/input/input.js +6 -0
- package/dist/cjs/input/input.js.map +1 -1
- package/dist/cjs/input/inputIcon.d.ts.map +1 -1
- package/dist/cjs/input/inputIcon.js +1 -3
- package/dist/cjs/input/inputIcon.js.map +1 -1
- package/dist/cjs/select/useSelect.js +1 -1
- package/dist/cjs/select/useSelect.js.map +1 -1
- package/dist/cjs/sidemenuV2/SidemenuItemContent.d.ts +14 -0
- package/dist/cjs/sidemenuV2/SidemenuItemContent.d.ts.map +1 -0
- package/dist/cjs/sidemenuV2/SidemenuItemContent.js +22 -0
- package/dist/cjs/sidemenuV2/SidemenuItemContent.js.map +1 -0
- package/dist/cjs/sidemenuV2/sidemenuItemV2.d.ts.map +1 -1
- package/dist/cjs/sidemenuV2/sidemenuItemV2.js +20 -16
- package/dist/cjs/sidemenuV2/sidemenuItemV2.js.map +1 -1
- package/dist/cjs/sidemenuV2/sidemenuTopV2.d.ts +8 -0
- package/dist/cjs/sidemenuV2/sidemenuTopV2.d.ts.map +1 -0
- package/dist/cjs/sidemenuV2/sidemenuTopV2.js +31 -0
- package/dist/cjs/sidemenuV2/sidemenuTopV2.js.map +1 -0
- package/dist/cjs/sidemenuV2/sidemenuV2.d.ts +2 -0
- package/dist/cjs/sidemenuV2/sidemenuV2.d.ts.map +1 -1
- package/dist/cjs/sidemenuV2/sidemenuV2.js +5 -3
- package/dist/cjs/sidemenuV2/sidemenuV2.js.map +1 -1
- package/dist/cjs/sidemenuV2/sidemenuV2.types.d.ts +8 -0
- package/dist/cjs/sidemenuV2/sidemenuV2.types.d.ts.map +1 -1
- package/dist/cjs/tooltip/tooltip.d.ts.map +1 -1
- package/dist/cjs/tooltip/tooltip.js +2 -2
- package/dist/cjs/tooltip/tooltip.js.map +1 -1
- package/dist/cjs/tooltip/tooltip.types.d.ts +1 -0
- package/dist/cjs/tooltip/tooltip.types.d.ts.map +1 -1
- package/dist/cjs/tooltip/tooltipContent.js +1 -1
- package/dist/cjs/tooltip/tooltipContent.js.map +1 -1
- package/dist/esm/button/button.d.ts.map +1 -1
- package/dist/esm/button/button.js +15 -0
- package/dist/esm/button/button.js.map +1 -1
- package/dist/esm/footer/footer.d.ts.map +1 -1
- package/dist/esm/footer/footer.js +1 -1
- package/dist/esm/footer/footer.js.map +1 -1
- package/dist/esm/header/loggedInHeader.js +1 -1
- package/dist/esm/header/loggedInHeader.js.map +1 -1
- package/dist/esm/header/loggedOutHeader.js +1 -1
- package/dist/esm/header/loggedOutHeader.js.map +1 -1
- package/dist/esm/icons/baseIcons/brand/brandXTwitter.d.ts +4 -0
- package/dist/esm/icons/baseIcons/brand/brandXTwitter.d.ts.map +1 -0
- package/dist/esm/icons/baseIcons/brand/brandXTwitter.js +5 -0
- package/dist/esm/icons/baseIcons/brand/brandXTwitter.js.map +1 -0
- package/dist/esm/icons/baseIcons/brand/brandXTwitterSolid.d.ts +4 -0
- package/dist/esm/icons/baseIcons/brand/brandXTwitterSolid.d.ts.map +1 -0
- package/dist/esm/icons/baseIcons/brand/brandXTwitterSolid.js +5 -0
- package/dist/esm/icons/baseIcons/brand/brandXTwitterSolid.js.map +1 -0
- package/dist/esm/icons/baseIcons/icons.d.ts +3 -2
- package/dist/esm/icons/baseIcons/icons.d.ts.map +1 -1
- package/dist/esm/icons/baseIcons/icons.js +5 -4
- package/dist/esm/icons/baseIcons/icons.js.map +1 -1
- package/dist/esm/icons/baseIcons/types.d.ts +2 -2
- package/dist/esm/icons/baseIcons/types.d.ts.map +1 -1
- package/dist/esm/icons/baseIcons/ui/uiShield.js +1 -1
- package/dist/esm/icons/baseIcons/ui/uiShield.js.map +1 -1
- package/dist/esm/icons/baseIcons/ui/uiShieldSolid.d.ts +4 -0
- package/dist/esm/icons/baseIcons/ui/uiShieldSolid.d.ts.map +1 -0
- package/dist/esm/icons/baseIcons/ui/uiShieldSolid.js +6 -0
- package/dist/esm/icons/baseIcons/ui/uiShieldSolid.js.map +1 -0
- package/dist/esm/input/consts.d.ts +3 -3
- package/dist/esm/input/consts.js +5 -5
- package/dist/esm/input/consts.js.map +1 -1
- package/dist/esm/input/input.d.ts.map +1 -1
- package/dist/esm/input/input.js +6 -0
- package/dist/esm/input/input.js.map +1 -1
- package/dist/esm/input/inputIcon.d.ts.map +1 -1
- package/dist/esm/input/inputIcon.js +1 -3
- package/dist/esm/input/inputIcon.js.map +1 -1
- package/dist/esm/select/useSelect.js +1 -1
- package/dist/esm/select/useSelect.js.map +1 -1
- package/dist/esm/sidemenuV2/SidemenuItemContent.d.ts +14 -0
- package/dist/esm/sidemenuV2/SidemenuItemContent.d.ts.map +1 -0
- package/dist/esm/sidemenuV2/SidemenuItemContent.js +16 -0
- package/dist/esm/sidemenuV2/SidemenuItemContent.js.map +1 -0
- package/dist/esm/sidemenuV2/sidemenuItemV2.d.ts.map +1 -1
- package/dist/esm/sidemenuV2/sidemenuItemV2.js +22 -17
- package/dist/esm/sidemenuV2/sidemenuItemV2.js.map +1 -1
- package/dist/esm/sidemenuV2/sidemenuTopV2.d.ts +8 -0
- package/dist/esm/sidemenuV2/sidemenuTopV2.d.ts.map +1 -0
- package/dist/esm/sidemenuV2/sidemenuTopV2.js +16 -0
- package/dist/esm/sidemenuV2/sidemenuTopV2.js.map +1 -0
- package/dist/esm/sidemenuV2/sidemenuV2.d.ts +2 -0
- package/dist/esm/sidemenuV2/sidemenuV2.d.ts.map +1 -1
- package/dist/esm/sidemenuV2/sidemenuV2.js +5 -3
- package/dist/esm/sidemenuV2/sidemenuV2.js.map +1 -1
- package/dist/esm/sidemenuV2/sidemenuV2.types.d.ts +8 -0
- package/dist/esm/sidemenuV2/sidemenuV2.types.d.ts.map +1 -1
- package/dist/esm/tooltip/tooltip.d.ts.map +1 -1
- package/dist/esm/tooltip/tooltip.js +2 -2
- package/dist/esm/tooltip/tooltip.js.map +1 -1
- package/dist/esm/tooltip/tooltip.types.d.ts +1 -0
- package/dist/esm/tooltip/tooltip.types.d.ts.map +1 -1
- package/dist/esm/tooltip/tooltipContent.js +1 -1
- package/dist/esm/tooltip/tooltipContent.js.map +1 -1
- package/dist/tsconfig.legacy.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/button/button.tsx +15 -0
- package/src/footer/footer.tsx +8 -2
- package/src/header/loggedInHeader.tsx +1 -1
- package/src/header/loggedOutHeader.tsx +1 -1
- package/src/icons/baseIcons/brand/brandXTwitter.ts +6 -0
- package/src/icons/baseIcons/brand/brandXTwitterSolid.ts +6 -0
- package/src/icons/baseIcons/icons.ts +5 -4
- package/src/icons/baseIcons/types.ts +6 -5
- package/src/icons/baseIcons/ui/uiShield.ts +1 -1
- package/src/icons/baseIcons/ui/uiShieldSolid.ts +7 -0
- package/src/input/consts.ts +5 -5
- package/src/input/input.tsx +6 -0
- package/src/input/inputIcon.tsx +1 -4
- package/src/select/useSelect.tsx +1 -1
- package/src/sidemenuV2/SidemenuItemContent.tsx +75 -0
- package/src/sidemenuV2/sidemenuItemV2.tsx +128 -134
- package/src/sidemenuV2/sidemenuTopV2.tsx +28 -0
- package/src/sidemenuV2/sidemenuV2.tsx +10 -5
- package/src/sidemenuV2/sidemenuV2.types.ts +9 -0
- package/src/tooltip/tooltip.tsx +2 -1
- package/src/tooltip/tooltip.types.ts +1 -0
- package/src/tooltip/tooltipContent.tsx +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veracity/vui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.32.0",
|
|
4
4
|
"description": "Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.",
|
|
5
5
|
"module": "./dist/esm/index.js",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -54,4 +54,4 @@
|
|
|
54
54
|
"dist",
|
|
55
55
|
"src"
|
|
56
56
|
]
|
|
57
|
-
}
|
|
57
|
+
}
|
package/src/button/button.tsx
CHANGED
|
@@ -54,6 +54,21 @@ export const ButtonBase = styled.buttonBox<ButtonProps>`
|
|
|
54
54
|
color: #91ffba;
|
|
55
55
|
border-color-left: #91ffba;
|
|
56
56
|
}
|
|
57
|
+
&.vui-button-variant-menuDark.vui-button-variant-menuDark:focus,
|
|
58
|
+
&.vui-button-variant-menuDark.vui-button-variant-menuDark:focus-visible,
|
|
59
|
+
&.vui-button-variant-menuLight.vui-button-variant-menuLight:focus,
|
|
60
|
+
&.vui-button-variant-menuLight.vui-button-variant-menuLight:focus-visible {
|
|
61
|
+
box-shadow: none;
|
|
62
|
+
outline: none;
|
|
63
|
+
border-bottom: 0 solid transparent;
|
|
64
|
+
}
|
|
65
|
+
&.vui-button-variant-menuDark.vui-button-variant-menuDark.focusAsBorder:focus,
|
|
66
|
+
&.vui-button-variant-menuDark.vui-button-variant-menuDark.focusAsBorder:focus-visible,
|
|
67
|
+
&.vui-button-variant-menuLight.vui-button-variant-menuLight.focusAsBorder:focus,
|
|
68
|
+
&.vui-button-variant-menuLight.vui-button-variant-menuLight.focusAsBorder:focus-visible {
|
|
69
|
+
transition: border-bottom 0s linear;
|
|
70
|
+
border-bottom: 3px solid #d3eef8;
|
|
71
|
+
}
|
|
57
72
|
`
|
|
58
73
|
|
|
59
74
|
const useButtonStyles = (mergedProps: any, variant: any) => {
|
package/src/footer/footer.tsx
CHANGED
|
@@ -94,7 +94,7 @@ export const Footer = vui<'div', FooterProps>((props, ref) => {
|
|
|
94
94
|
{applicationLinks?.map((link, index) => (
|
|
95
95
|
<Box flex={{ xs: '0 0 100%', sm: '0 0 auto' }} key={index}>
|
|
96
96
|
{link.items && (
|
|
97
|
-
<Menu isLazy={false} offset={[-16, 9]} placement="top-start" size="
|
|
97
|
+
<Menu isLazy={false} offset={[-16, 9]} placement="top-start" size="sm" {...rest}>
|
|
98
98
|
<Menu.Button
|
|
99
99
|
as={Link}
|
|
100
100
|
className="vui-footerLink-trigger"
|
|
@@ -157,7 +157,13 @@ export const Footer = vui<'div', FooterProps>((props, ref) => {
|
|
|
157
157
|
aria-label={link.text}
|
|
158
158
|
fontWeight="demi"
|
|
159
159
|
href={link.url}
|
|
160
|
-
iconLeft={
|
|
160
|
+
iconLeft={
|
|
161
|
+
<Link.Icon
|
|
162
|
+
name={`${link.text === 'Twitter' ? 'brandX' + link.text + 'Solid' : 'brandCircle' + link.text}`}
|
|
163
|
+
radius="50%"
|
|
164
|
+
size="xs"
|
|
165
|
+
/>
|
|
166
|
+
}
|
|
161
167
|
isExternal
|
|
162
168
|
key={index}
|
|
163
169
|
mr={1}
|
|
@@ -58,7 +58,7 @@ export const LoggedInHeader = vui<'div', LoggedInHeaderProps>((props, ref) => {
|
|
|
58
58
|
<RenderOnScreen minWidth="sm">
|
|
59
59
|
<Header.Divider mr={2} />
|
|
60
60
|
</RenderOnScreen>
|
|
61
|
-
<Header.ApplicationName color={localTextColor} title={applicationName} url={applicationUrl
|
|
61
|
+
<Header.ApplicationName color={localTextColor} title={applicationName} url={applicationUrl} />
|
|
62
62
|
</>
|
|
63
63
|
)}
|
|
64
64
|
{!isApplication && <RenderOnScreen minWidth="lg">{children}</RenderOnScreen>}
|
|
@@ -44,7 +44,7 @@ export const LoggedOutHeader = vui<'div', LoggedOutHeaderProps>((props, ref) =>
|
|
|
44
44
|
<RenderOnScreen minWidth="sm">
|
|
45
45
|
<Header.Divider mr={2} />
|
|
46
46
|
</RenderOnScreen>
|
|
47
|
-
<Header.ApplicationName color={localTextColor} title={applicationName} url={applicationUrl
|
|
47
|
+
<Header.ApplicationName color={localTextColor} title={applicationName} url={applicationUrl} />
|
|
48
48
|
</>
|
|
49
49
|
)}
|
|
50
50
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IconDefinition } from '../../types'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
details: [32, 32, [], '', 'M24.0495 4H28.3451L18.9631 14.5889L30 29H21.3603L14.5884 20.262L6.8492 29H2.54759L12.5806 17.6719L2 4H10.8588L16.9735 11.9868L24.0495 4ZM22.5406 26.4639H24.9196L9.5628 6.40385H7.00739L22.5406 26.4639Z'],
|
|
5
|
+
name: 'brandXTwitter'
|
|
6
|
+
} as IconDefinition
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IconDefinition } from '../../types'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
details: [32, 32, [], '', 'M4.57143 0C2.05 0 0 2.05 0 4.57143V27.4286C0 29.95 2.05 32 4.57143 32H27.4286C29.95 32 32 29.95 32 27.4286V4.57143C32 2.05 29.95 0 27.4286 0H4.57143ZM25.7929 6L18.3786 14.4714L27.1 26H20.2714L14.9286 19.0071L8.80714 26H5.41429L13.3429 16.9357L4.97857 6H11.9786L16.8143 12.3929L22.4 6H25.7929ZM23.0929 23.9714L10.9571 7.92143H8.93571L21.2071 23.9714H23.0929Z'],
|
|
5
|
+
name: 'brandXTwitterSolid'
|
|
6
|
+
} as IconDefinition
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated. Do not edit manually.
|
|
2
2
|
// Run the icon transformation script to update.
|
|
3
3
|
|
|
4
|
-
// BRAND icons (
|
|
4
|
+
// BRAND icons (33)
|
|
5
5
|
export { default as brandApplePay } from './brand/brandApplePay'
|
|
6
6
|
export { default as brandBellship } from './brand/brandBellship'
|
|
7
7
|
export { default as brandCcAmazonPay } from './brand/brandCcAmazonPay'
|
|
@@ -13,7 +13,6 @@ export { default as brandCcPaypal } from './brand/brandCcPaypal'
|
|
|
13
13
|
export { default as brandCcVisa } from './brand/brandCcVisa'
|
|
14
14
|
export { default as brandCircleFB } from './brand/brandCircleFB'
|
|
15
15
|
export { default as brandCircleLinkedIn } from './brand/brandCircleLinkedIn'
|
|
16
|
-
export { default as brandCircleTwitter } from './brand/brandCircleTwitter'
|
|
17
16
|
export { default as brandCircleYoutube } from './brand/brandCircleYoutube'
|
|
18
17
|
export { default as brandDNV } from './brand/brandDNV'
|
|
19
18
|
export { default as brandDhl } from './brand/brandDhl'
|
|
@@ -29,9 +28,10 @@ export { default as brandMedium } from './brand/brandMedium'
|
|
|
29
28
|
export { default as brandOsi } from './brand/brandOsi'
|
|
30
29
|
export { default as brandPowerBi } from './brand/brandPowerBi'
|
|
31
30
|
export { default as brandSlack } from './brand/brandSlack'
|
|
32
|
-
export { default as brandTwitter } from './brand/brandTwitter'
|
|
33
31
|
export { default as brandUps } from './brand/brandUps'
|
|
34
32
|
export { default as brandVeracity } from './brand/brandVeracity'
|
|
33
|
+
export { default as brandXTwitter } from './brand/brandXTwitter'
|
|
34
|
+
export { default as brandXTwitterSolid } from './brand/brandXTwitterSolid'
|
|
35
35
|
export { default as brandYoutube } from './brand/brandYoutube'
|
|
36
36
|
// CONC icons (63)
|
|
37
37
|
export { default as conAPI } from './conc/conAPI'
|
|
@@ -97,7 +97,7 @@ export { default as conUploadFile2 } from './conc/conUploadFile2'
|
|
|
97
97
|
export { default as conVeracityAdapter } from './conc/conVeracityAdapter'
|
|
98
98
|
export { default as conVesselConnect } from './conc/conVesselConnect'
|
|
99
99
|
export { default as conWindmill } from './conc/conWindmill'
|
|
100
|
-
// UI icons (
|
|
100
|
+
// UI icons (374)
|
|
101
101
|
export { default as uiAddressBook } from './ui/uiAddressBook'
|
|
102
102
|
export { default as uiAddressCard } from './ui/uiAddressCard'
|
|
103
103
|
export { default as uiAlignCenter } from './ui/uiAlignCenter'
|
|
@@ -390,6 +390,7 @@ export { default as uiShieldAlt } from './ui/uiShieldAlt'
|
|
|
390
390
|
export { default as uiShieldCheck } from './ui/uiShieldCheck'
|
|
391
391
|
export { default as uiShieldHalf } from './ui/uiShieldHalf'
|
|
392
392
|
export { default as uiShieldKeyhole } from './ui/uiShieldKeyhole'
|
|
393
|
+
export { default as uiShieldSolid } from './ui/uiShieldSolid'
|
|
393
394
|
export { default as uiShip } from './ui/uiShip'
|
|
394
395
|
export { default as uiShips } from './ui/uiShips'
|
|
395
396
|
export { default as uiShoppingBasket } from './ui/uiShoppingBasket'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated. Do not edit manually.
|
|
2
2
|
// Run the icon transformation script to update.
|
|
3
3
|
|
|
4
|
-
// BRAND icons (
|
|
4
|
+
// BRAND icons (33)
|
|
5
5
|
export type BrandIcons =
|
|
6
6
|
| 'brandApplePay'
|
|
7
7
|
| 'brandBellship'
|
|
@@ -14,7 +14,6 @@ export type BrandIcons =
|
|
|
14
14
|
| 'brandCcVisa'
|
|
15
15
|
| 'brandCircleFB'
|
|
16
16
|
| 'brandCircleLinkedIn'
|
|
17
|
-
| 'brandCircleTwitter'
|
|
18
17
|
| 'brandCircleYoutube'
|
|
19
18
|
| 'brandDNV'
|
|
20
19
|
| 'brandDhl'
|
|
@@ -30,9 +29,10 @@ export type BrandIcons =
|
|
|
30
29
|
| 'brandOsi'
|
|
31
30
|
| 'brandPowerBi'
|
|
32
31
|
| 'brandSlack'
|
|
33
|
-
| 'brandTwitter'
|
|
34
32
|
| 'brandUps'
|
|
35
33
|
| 'brandVeracity'
|
|
34
|
+
| 'brandXTwitter'
|
|
35
|
+
| 'brandXTwitterSolid'
|
|
36
36
|
| 'brandYoutube'
|
|
37
37
|
// CONC icons (63)
|
|
38
38
|
export type ConcIcons =
|
|
@@ -99,7 +99,7 @@ export type ConcIcons =
|
|
|
99
99
|
| 'conVeracityAdapter'
|
|
100
100
|
| 'conVesselConnect'
|
|
101
101
|
| 'conWindmill'
|
|
102
|
-
// UI icons (
|
|
102
|
+
// UI icons (374)
|
|
103
103
|
export type UiIcons =
|
|
104
104
|
| 'uiAddressBook'
|
|
105
105
|
| 'uiAddressCard'
|
|
@@ -282,9 +282,9 @@ export type UiIcons =
|
|
|
282
282
|
| 'uiFilePlus'
|
|
283
283
|
| 'uiFilePowerpoint'
|
|
284
284
|
| 'uiFileSignature'
|
|
285
|
+
| 'uiFileSolid'
|
|
285
286
|
| 'uiFileSpreadsheet'
|
|
286
287
|
| 'uiFileStandard'
|
|
287
|
-
| 'uiFileSolid'
|
|
288
288
|
| 'uiFileVideo'
|
|
289
289
|
| 'uiFileWord'
|
|
290
290
|
| 'uiFilter'
|
|
@@ -393,6 +393,7 @@ export type UiIcons =
|
|
|
393
393
|
| 'uiShieldCheck'
|
|
394
394
|
| 'uiShieldHalf'
|
|
395
395
|
| 'uiShieldKeyhole'
|
|
396
|
+
| 'uiShieldSolid'
|
|
396
397
|
| 'uiShip'
|
|
397
398
|
| 'uiShips'
|
|
398
399
|
| 'uiShoppingBasket'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IconDefinition } from '../../types'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
details: [
|
|
4
|
+
details: [512, 512, [], '', 'M466.5 83.7l-192-80a48.15 48.15 0 0 0-36.9 0l-192 80C27.7 91.1 16 108.6 16 128c0 198.5 114.5 335.7 221.5 380.3 11.8 4.9 25.1 4.9 36.9 0C360.1 472.6 496 349.3 496 128c0-19.4-11.7-36.9-29.5-44.3zM262.2 478.8c-3.9 1.6-8.3 1.6-12.3 0C152 440 48 304 48 128c0-6.5 3.9-12.3 9.8-14.8l192-80c3.8-1.6 8.3-1.7 12.3 0l192 80c6 2.5 9.8 8.3 9.8 14.8.1 176-103.9 312-201.7 350.8z'],
|
|
5
5
|
name: 'uiShield',
|
|
6
6
|
oldName: 'fasShield'
|
|
7
7
|
} as IconDefinition
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IconDefinition } from '../../types'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
details: [32, 32, [], '', 'M29.125 5.25C29.7083 5.45833 30.1667 5.8125 30.5 6.3125C30.8333 6.8125 31 7.375 31 8C31 10.625 30.6875 13.1458 30.0625 15.5625C29.4375 17.9375 28.6458 20 27.6875 21.75C26.7292 23.4583 25.6042 25.0208 24.3125 26.4375C23.0625 27.8125 21.8333 28.9167 20.625 29.75C19.4583 30.625 18.2917 31.2917 17.125 31.75C16.375 32.0833 15.625 32.0833 14.875 31.75C13.125 31.0417 11.4375 29.9792 9.8125 28.5625C8.22917 27.1875 6.77083 25.5208 5.4375 23.5625C4.10417 21.5625 3.02083 19.2083 2.1875 16.5C1.39583 13.7917 1 10.9583 1 8C1 7.75 1.02083 7.52083 1.0625 7.3125C1.14583 7.0625 1.22917 6.83333 1.3125 6.625C1.4375 6.41667 1.5625 6.22917 1.6875 6.0625C1.85417 5.89583 2.02083 5.75 2.1875 5.625C2.39583 5.45833 2.625 5.33333 2.875 5.25L14.875 0.25C15.2083 0.0833333 15.5833 0 16 0C16.4167 0 16.7917 0.0833333 17.125 0.25L29.125 5.25Z'],
|
|
5
|
+
name: 'uiShieldSolid',
|
|
6
|
+
oldName: 'fasShield'
|
|
7
|
+
} as IconDefinition
|
package/src/input/consts.ts
CHANGED
|
@@ -14,9 +14,9 @@ export const inputColors = {
|
|
|
14
14
|
} as const
|
|
15
15
|
|
|
16
16
|
export const stateIcons = {
|
|
17
|
-
error: '
|
|
18
|
-
loading: '
|
|
19
|
-
success: '
|
|
17
|
+
error: 'uiExclamationTriangle',
|
|
18
|
+
loading: 'uiSpinnerThird',
|
|
19
|
+
success: 'uiCheck',
|
|
20
20
|
} as const
|
|
21
21
|
|
|
22
22
|
export const inputStateMapping: InputStateMapping = {
|
|
@@ -24,7 +24,7 @@ export const inputStateMapping: InputStateMapping = {
|
|
|
24
24
|
variant: 'red',
|
|
25
25
|
iconProps: {
|
|
26
26
|
color: inputColors.error,
|
|
27
|
-
|
|
27
|
+
name: stateIcons.error,
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
30
|
loading: {
|
|
@@ -39,7 +39,7 @@ export const inputStateMapping: InputStateMapping = {
|
|
|
39
39
|
variant: 'green',
|
|
40
40
|
iconProps: {
|
|
41
41
|
color: inputColors.success,
|
|
42
|
-
|
|
42
|
+
name: stateIcons.success,
|
|
43
43
|
},
|
|
44
44
|
},
|
|
45
45
|
}
|
package/src/input/input.tsx
CHANGED
package/src/input/inputIcon.tsx
CHANGED
|
@@ -2,7 +2,6 @@ import { useStyleConfig, vui } from '../core'
|
|
|
2
2
|
import type { IconProps } from '../icon'
|
|
3
3
|
import Icon from '../icon'
|
|
4
4
|
import { cs } from '../utils'
|
|
5
|
-
import { inputColors } from './consts'
|
|
6
5
|
import { useInputContext } from './context'
|
|
7
6
|
|
|
8
7
|
/** Displays an icon within the Input. */
|
|
@@ -12,9 +11,7 @@ export const InputIcon = vui<'svg', IconProps>((props, ref) => {
|
|
|
12
11
|
const mergedProps = { ...inputProps, ...props }
|
|
13
12
|
const styles = useStyleConfig('Input', mergedProps)
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return <Icon className={cs('vui-inputIcon', className)} color={color} ref={ref} {...styles.icon} {...rest} />
|
|
14
|
+
return <Icon className={cs('vui-inputIcon', className)} ref={ref} {...styles.icon} {...rest} />
|
|
18
15
|
})
|
|
19
16
|
|
|
20
17
|
InputIcon.displayName = 'InputIcon'
|
package/src/select/useSelect.tsx
CHANGED
|
@@ -36,7 +36,7 @@ export default function useSelect(props: UseSelectProps) {
|
|
|
36
36
|
if (option.text && option.value) dynamicOptions.push(option)
|
|
37
37
|
})
|
|
38
38
|
|
|
39
|
-
/** Sends a change event to the external consumer, but
|
|
39
|
+
/** Sends a change event to the external consumer, but internal keeps the actual value as primitive or array. */
|
|
40
40
|
const onChange = useCallbackRef((e: ChangeEvent) => {
|
|
41
41
|
onChangeProp?.(e)
|
|
42
42
|
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { memo } from 'react'
|
|
2
|
+
|
|
3
|
+
import Badge from '../badge'
|
|
4
|
+
import type { BadgeProps } from '../badge/badge.types'
|
|
5
|
+
import Box from '../box'
|
|
6
|
+
import type { IconProp } from '../icon'
|
|
7
|
+
import Icon from '../icon'
|
|
8
|
+
import T from '../t'
|
|
9
|
+
|
|
10
|
+
export interface SidemenuItemContentProps {
|
|
11
|
+
icon?: IconProp
|
|
12
|
+
iconSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
13
|
+
title?: string
|
|
14
|
+
isMenuExpanded?: boolean
|
|
15
|
+
isInPopover?: boolean
|
|
16
|
+
badge?: Pick<BadgeProps, 'text' | 'variant'>
|
|
17
|
+
badgeLinkUrl?: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const SidemenuItemContent = memo<SidemenuItemContentProps>(
|
|
21
|
+
({ icon, iconSize = 'sm', title, isMenuExpanded, isInPopover, badge, badgeLinkUrl }) => {
|
|
22
|
+
const iconBaseMarginLeft = 13 / 8
|
|
23
|
+
const iconMarginRight = isMenuExpanded ? 10 / 8 : 20 / 8
|
|
24
|
+
|
|
25
|
+
if (isInPopover)
|
|
26
|
+
return (
|
|
27
|
+
<>
|
|
28
|
+
<T isTruncated size="sm" display="inline-block" fontWeight="500" ml={iconBaseMarginLeft}>
|
|
29
|
+
{title}
|
|
30
|
+
</T>
|
|
31
|
+
{badge && typeof badge === 'object' && typeof badge.text === 'string' && badge.text.trim() !== '' && (
|
|
32
|
+
<Badge
|
|
33
|
+
{...badge}
|
|
34
|
+
data-link={btoa(badgeLinkUrl ?? '#')}
|
|
35
|
+
variant={badge.variant ?? 'subtleGreen'}
|
|
36
|
+
size="sm"
|
|
37
|
+
minW="32px"
|
|
38
|
+
fontSize="12px"
|
|
39
|
+
lineHeight="16px"
|
|
40
|
+
ml="10px"
|
|
41
|
+
mr="10px"
|
|
42
|
+
/>
|
|
43
|
+
)}
|
|
44
|
+
</>
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<>
|
|
49
|
+
<Box ml={iconBaseMarginLeft} mr={iconMarginRight} w="20px" transition="margin 0.2s ease-in-out">
|
|
50
|
+
{icon && <Icon name={icon} size={iconSize} />}
|
|
51
|
+
</Box>
|
|
52
|
+
<T isTruncated size="sm" display="inline-block">
|
|
53
|
+
{title}
|
|
54
|
+
</T>
|
|
55
|
+
{badge && typeof badge === 'object' && typeof badge.text === 'string' && badge.text.trim() !== '' && (
|
|
56
|
+
<Badge
|
|
57
|
+
{...badge}
|
|
58
|
+
data-link={btoa(badgeLinkUrl ?? '#')}
|
|
59
|
+
variant={badge.variant ?? 'subtleGreen'}
|
|
60
|
+
size="sm"
|
|
61
|
+
minW="32px"
|
|
62
|
+
fontSize="12px"
|
|
63
|
+
lineHeight="16px"
|
|
64
|
+
ml="10px"
|
|
65
|
+
mr="10px"
|
|
66
|
+
/>
|
|
67
|
+
)}
|
|
68
|
+
</>
|
|
69
|
+
)
|
|
70
|
+
},
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
SidemenuItemContent.displayName = 'SidemenuItemContent'
|
|
74
|
+
|
|
75
|
+
export default SidemenuItemContent
|
|
@@ -1,93 +1,19 @@
|
|
|
1
1
|
import type { MouseEvent } from 'react'
|
|
2
|
-
import { useEffect, useMemo, useCallback
|
|
2
|
+
import { useEffect, useMemo, useCallback } from 'react'
|
|
3
3
|
|
|
4
|
-
import Badge from '../badge'
|
|
5
|
-
import type { BadgeProps } from '../badge/badge.types'
|
|
6
4
|
import Box from '../box'
|
|
7
5
|
import Button from '../button'
|
|
8
6
|
import type { VuiComponent } from '../core'
|
|
9
7
|
import { omitThemingProps, styled, th, vui } from '../core'
|
|
10
|
-
import Icon from '../icon'
|
|
11
|
-
import type { IconProp } from '../icon'
|
|
12
8
|
import Popover from '../popover'
|
|
13
|
-
import
|
|
9
|
+
import { colors } from '../theme'
|
|
10
|
+
import Tooltip from '../tooltip'
|
|
14
11
|
import { cs, generateMenuItemId } from '../utils'
|
|
15
12
|
import { collapsedWidth, expandedWidth } from './consts'
|
|
13
|
+
import SidemenuItemContent from './SidemenuItemContent'
|
|
16
14
|
import type { SidemenuItemV2Props } from './sidemenuV2.types'
|
|
17
15
|
import useSidemenuItem from './useSidemenuItem'
|
|
18
16
|
|
|
19
|
-
// Internal component for sidemenu item content
|
|
20
|
-
interface SidemenuItemContentProps {
|
|
21
|
-
icon?: IconProp
|
|
22
|
-
iconSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
23
|
-
title: string
|
|
24
|
-
isMenuExpanded?: boolean
|
|
25
|
-
isInPopover?: boolean
|
|
26
|
-
badge?: Pick<BadgeProps, 'text' | 'variant'>
|
|
27
|
-
badgeLinkUrl?: string
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const SidemenuItemContent = memo<SidemenuItemContentProps>(
|
|
31
|
-
({ icon, iconSize = 'sm', title, isMenuExpanded, isInPopover, badge, badgeLinkUrl }) => {
|
|
32
|
-
// Calculate dynamic margins based on menu state
|
|
33
|
-
const iconBaseMarginLeft = 13 / 8 // 1.625rem (13px)
|
|
34
|
-
const iconMarginRight = isMenuExpanded
|
|
35
|
-
? 10 / 8 // 1.25rem (10px) when expanded
|
|
36
|
-
: 20 / 8 // 2.5rem (20px) when collapsed
|
|
37
|
-
|
|
38
|
-
if (isInPopover)
|
|
39
|
-
return (
|
|
40
|
-
<>
|
|
41
|
-
<T isTruncated size="sm" display="inline-block" fontWeight="500" ml={iconBaseMarginLeft}>
|
|
42
|
-
{title}
|
|
43
|
-
</T>
|
|
44
|
-
{badge && typeof badge === 'object' && typeof badge.text === 'string' && badge.text.trim() !== '' && (
|
|
45
|
-
<Badge
|
|
46
|
-
{...badge}
|
|
47
|
-
data-link={btoa(badgeLinkUrl ?? '#')}
|
|
48
|
-
variant={badge.variant ?? 'subtleGreen'}
|
|
49
|
-
size="sm"
|
|
50
|
-
minW="32px"
|
|
51
|
-
fontSize="12px"
|
|
52
|
-
lineHeight="16px"
|
|
53
|
-
ml="10px"
|
|
54
|
-
mr="10px"
|
|
55
|
-
/>
|
|
56
|
-
)}
|
|
57
|
-
</>
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
return (
|
|
61
|
-
<>
|
|
62
|
-
{/* Icon container with responsive margins */}
|
|
63
|
-
<Box ml={iconBaseMarginLeft} mr={iconMarginRight} w="20px" transition="margin 0.2s ease-in-out">
|
|
64
|
-
{icon && <Icon name={icon} size={iconSize} />}
|
|
65
|
-
</Box>
|
|
66
|
-
|
|
67
|
-
{/* Menu item title and badge */}
|
|
68
|
-
<T isTruncated size="sm" display="inline-block">
|
|
69
|
-
{title}
|
|
70
|
-
</T>
|
|
71
|
-
{badge && typeof badge === 'object' && typeof badge.text === 'string' && badge.text.trim() !== '' && (
|
|
72
|
-
<Badge
|
|
73
|
-
{...badge}
|
|
74
|
-
data-link={btoa(badgeLinkUrl ?? '#')}
|
|
75
|
-
variant={badge.variant ?? 'subtleGreen'}
|
|
76
|
-
size="sm"
|
|
77
|
-
minW="32px"
|
|
78
|
-
fontSize="12px"
|
|
79
|
-
lineHeight="16px"
|
|
80
|
-
ml="10px"
|
|
81
|
-
mr="10px"
|
|
82
|
-
/>
|
|
83
|
-
)}
|
|
84
|
-
</>
|
|
85
|
-
)
|
|
86
|
-
},
|
|
87
|
-
)
|
|
88
|
-
|
|
89
|
-
SidemenuItemContent.displayName = 'SidemenuItemContent'
|
|
90
|
-
|
|
91
17
|
export const PopoverHovered = styled.div<{ hoverColor: string }>`
|
|
92
18
|
&:hover .vui-sidemenu-item-popover .vui-button.vui-button {
|
|
93
19
|
background: ${p => th.color(p.hoverColor)};
|
|
@@ -97,6 +23,63 @@ export const PopoverHovered = styled.div<{ hoverColor: string }>`
|
|
|
97
23
|
}
|
|
98
24
|
`
|
|
99
25
|
|
|
26
|
+
// SidemenuPopover component extracted from inline Popover logic
|
|
27
|
+
const SidemenuPopover = ({
|
|
28
|
+
isDark,
|
|
29
|
+
className,
|
|
30
|
+
buttonStyles,
|
|
31
|
+
isExactlyActive,
|
|
32
|
+
icon,
|
|
33
|
+
title,
|
|
34
|
+
isMenuExpanded,
|
|
35
|
+
children,
|
|
36
|
+
}: {
|
|
37
|
+
isDark: boolean
|
|
38
|
+
className?: string
|
|
39
|
+
buttonStyles: any
|
|
40
|
+
isExactlyActive: boolean
|
|
41
|
+
icon?: any
|
|
42
|
+
title: string
|
|
43
|
+
isMenuExpanded: boolean
|
|
44
|
+
children: React.ReactNode
|
|
45
|
+
}) => (
|
|
46
|
+
<Popover offset={[0, collapsedWidth - expandedWidth - 2]} placement="right-start" trigger="mouseenter">
|
|
47
|
+
{({ isOpen }: { isOpen: boolean }) => (
|
|
48
|
+
<PopoverHovered hoverColor={isDark ? colors.seaBlue.main : colors.skyBlue.selected}>
|
|
49
|
+
<Popover.Trigger as={Box} className={cs('vui-sidemenu-item-popover', className)}>
|
|
50
|
+
<Button
|
|
51
|
+
{...buttonStyles}
|
|
52
|
+
borderLeft={`3px solid ${isDark ? 'digiGreen.main' : 'seaBlue.main'}`}
|
|
53
|
+
isActive={isExactlyActive}
|
|
54
|
+
className={cs('focusAsBorder')}
|
|
55
|
+
>
|
|
56
|
+
<SidemenuItemContent
|
|
57
|
+
icon={icon}
|
|
58
|
+
iconSize={buttonStyles.iconSize}
|
|
59
|
+
title={title}
|
|
60
|
+
isMenuExpanded={isMenuExpanded}
|
|
61
|
+
/>
|
|
62
|
+
</Button>
|
|
63
|
+
</Popover.Trigger>
|
|
64
|
+
<Popover.Content elevation="none" className={cs('vui-sidemenu-item-content', className)}>
|
|
65
|
+
<Box flexDirection="column" justifyContent="start" w="100%">
|
|
66
|
+
<Button
|
|
67
|
+
{...buttonStyles}
|
|
68
|
+
borderLeftColor={'transparent!important'}
|
|
69
|
+
minW={'240px'}
|
|
70
|
+
isActive={isOpen && isExactlyActive}
|
|
71
|
+
className={cs('focusAsBorder')}
|
|
72
|
+
>
|
|
73
|
+
<SidemenuItemContent title={title} isInPopover={true} />
|
|
74
|
+
</Button>
|
|
75
|
+
{children}
|
|
76
|
+
</Box>
|
|
77
|
+
</Popover.Content>
|
|
78
|
+
</PopoverHovered>
|
|
79
|
+
)}
|
|
80
|
+
</Popover>
|
|
81
|
+
)
|
|
82
|
+
|
|
100
83
|
/** A menu item. */
|
|
101
84
|
export const SidemenuItemV2 = vui<'button', SidemenuItemV2Props>((props, ref) => {
|
|
102
85
|
const {
|
|
@@ -253,64 +236,75 @@ export const SidemenuItemV2 = vui<'button', SidemenuItemV2Props>((props, ref) =>
|
|
|
253
236
|
}
|
|
254
237
|
}, [isSubmenuOpen, themeValues.buttonVariant])
|
|
255
238
|
|
|
239
|
+
// Helper: Render collapsed popover
|
|
240
|
+
const renderPopover = () => (
|
|
241
|
+
<SidemenuPopover
|
|
242
|
+
isDark={isDark}
|
|
243
|
+
className={className}
|
|
244
|
+
buttonStyles={buttonStyles}
|
|
245
|
+
isExactlyActive={isExactlyActive}
|
|
246
|
+
icon={icon}
|
|
247
|
+
title={title}
|
|
248
|
+
isMenuExpanded={isMenuExpanded}
|
|
249
|
+
>
|
|
250
|
+
{children ? children : undefined}
|
|
251
|
+
</SidemenuPopover>
|
|
252
|
+
)
|
|
253
|
+
|
|
254
|
+
// Helper: Render expanded button
|
|
255
|
+
const renderButton = () => {
|
|
256
|
+
if (level === 0 && !isMenuExpanded) {
|
|
257
|
+
return (
|
|
258
|
+
<Tooltip text={title} placement="right" offset={[0, -200]}>
|
|
259
|
+
<Button
|
|
260
|
+
className={cs('vui-sidemenu-item focusAsBorder', isExactlyActive && 'vui-sidemenu-item--active', className)}
|
|
261
|
+
{...buttonStyles}
|
|
262
|
+
isActive={isExactlyActive}
|
|
263
|
+
>
|
|
264
|
+
<SidemenuItemContent icon={icon} iconSize={buttonStyles.iconSize} />
|
|
265
|
+
{isMenuExpanded && computedStates.shouldShowExpandButton && <Button {...expandButtonProps} />}{' '}
|
|
266
|
+
</Button>
|
|
267
|
+
</Tooltip>
|
|
268
|
+
)
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
return (
|
|
272
|
+
<Button
|
|
273
|
+
className={cs('vui-sidemenu-item focusAsBorder', isExactlyActive && 'vui-sidemenu-item--active', className)}
|
|
274
|
+
{...buttonStyles}
|
|
275
|
+
isActive={isExactlyActive}
|
|
276
|
+
title={!isMenuExpanded ? title : undefined}
|
|
277
|
+
>
|
|
278
|
+
<SidemenuItemContent
|
|
279
|
+
icon={icon}
|
|
280
|
+
iconSize={buttonStyles.iconSize}
|
|
281
|
+
title={title}
|
|
282
|
+
isMenuExpanded={isMenuExpanded}
|
|
283
|
+
badge={props.badge}
|
|
284
|
+
badgeLinkUrl={props.badgeLinkUrl}
|
|
285
|
+
/>
|
|
286
|
+
{isMenuExpanded && computedStates.shouldShowExpandButton && <Button {...expandButtonProps} />}{' '}
|
|
287
|
+
{/* Expand/Collapse button */}
|
|
288
|
+
</Button>
|
|
289
|
+
)
|
|
290
|
+
// No leftover return, handled above
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// Helper: Render expanded children
|
|
294
|
+
const renderChildren = () => (
|
|
295
|
+
<Box flexDirection="column" justifyContent="start" w="100%">
|
|
296
|
+
{children}
|
|
297
|
+
</Box>
|
|
298
|
+
)
|
|
299
|
+
|
|
300
|
+
const shouldShowPopover = Boolean(!isMenuExpanded && level === 0 && !!children)
|
|
301
|
+
const shouldShowChildren = computedStates.hasChildrenExpanded
|
|
302
|
+
|
|
256
303
|
return (
|
|
257
304
|
<Box flexDirection="column" ref={ref} w="100%" mt={onBottom ? 'auto' : 0} id={computedItemId}>
|
|
258
|
-
{
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
<PopoverHovered hoverColor={isDark ?'#003591' : '#d3eef8'}>
|
|
262
|
-
<Popover.Trigger as={Box} className={cs('vui-sidemenu-item-popover', className)}>
|
|
263
|
-
<Button
|
|
264
|
-
{...buttonStyles}
|
|
265
|
-
borderLeft={`3px solid ${isDark ? 'digiGreen.main' : 'seaBlue.main'}`}
|
|
266
|
-
isActive={isExactlyActive}
|
|
267
|
-
>
|
|
268
|
-
<SidemenuItemContent
|
|
269
|
-
icon={icon}
|
|
270
|
-
iconSize={buttonStyles.iconSize}
|
|
271
|
-
title={title}
|
|
272
|
-
isMenuExpanded={isMenuExpanded}
|
|
273
|
-
/>
|
|
274
|
-
</Button>
|
|
275
|
-
</Popover.Trigger>
|
|
276
|
-
<Popover.Content elevation="none" className={cs('vui-sidemenu-item-content', className)}>
|
|
277
|
-
<Box flexDirection="column" justifyContent="start" w="100%">
|
|
278
|
-
<Button
|
|
279
|
-
{...buttonStyles}
|
|
280
|
-
borderLeftColor={'transparent!important'}
|
|
281
|
-
minW={'240px'}
|
|
282
|
-
isActive={isOpen && isExactlyActive}
|
|
283
|
-
>
|
|
284
|
-
<SidemenuItemContent title={title} isInPopover={true} />
|
|
285
|
-
</Button>
|
|
286
|
-
{children}
|
|
287
|
-
</Box>
|
|
288
|
-
</Popover.Content>
|
|
289
|
-
</PopoverHovered>
|
|
290
|
-
)}
|
|
291
|
-
</Popover>
|
|
292
|
-
) : (
|
|
293
|
-
<Button
|
|
294
|
-
className={cs('vui-sidemenu-item', isExactlyActive && 'vui-sidemenu-item--active', className)}
|
|
295
|
-
{...buttonStyles}
|
|
296
|
-
isActive={isExactlyActive}
|
|
297
|
-
>
|
|
298
|
-
<SidemenuItemContent
|
|
299
|
-
icon={icon}
|
|
300
|
-
iconSize={buttonStyles.iconSize}
|
|
301
|
-
title={title}
|
|
302
|
-
isMenuExpanded={isMenuExpanded}
|
|
303
|
-
badge={props.badge}
|
|
304
|
-
badgeLinkUrl={props.badgeLinkUrl}
|
|
305
|
-
/>
|
|
306
|
-
{computedStates.shouldShowExpandButton && <Button {...expandButtonProps} />} {/* Expand/Collapse button */}
|
|
307
|
-
</Button>
|
|
308
|
-
)}
|
|
309
|
-
{computedStates.hasChildrenExpanded && (
|
|
310
|
-
<Box flexDirection="column" justifyContent="start" w="100%">
|
|
311
|
-
{children}
|
|
312
|
-
</Box>
|
|
313
|
-
)}
|
|
305
|
+
{shouldShowPopover && renderPopover()}
|
|
306
|
+
{!shouldShowPopover && renderButton()}
|
|
307
|
+
{shouldShowChildren && renderChildren()}
|
|
314
308
|
</Box>
|
|
315
309
|
)
|
|
316
310
|
}) as VuiComponent<'div', SidemenuItemV2Props>
|