@ultraviolet/plus 0.12.5 → 0.12.7

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/index.d.ts CHANGED
@@ -477,6 +477,7 @@ type NavigationProps = {
477
477
  * This function is called when resize occur using the vertical bar on the left of the navigation.
478
478
  */
479
479
  onWidthResize?: (width: number) => void;
480
+ id?: string;
480
481
  };
481
482
  /**
482
483
  * Navigation is a component that allows you to create a sidebar navigation.
@@ -484,7 +485,7 @@ type NavigationProps = {
484
485
  * to make it work in your application.
485
486
  */
486
487
  declare const Navigation: {
487
- ({ children, logo, pinnedFeature, onClickPinUnpin, onClickExpand, initialPinned, initialExpanded, locales, pinLimit, width, onWidthResize, className, }: NavigationProps): _emotion_react_jsx_runtime.JSX.Element;
488
+ ({ children, logo, pinnedFeature, onClickPinUnpin, onClickExpand, initialPinned, initialExpanded, locales, pinLimit, width, onWidthResize, className, id, }: NavigationProps): _emotion_react_jsx_runtime.JSX.Element;
488
489
  Group: ({ children, label }: {
489
490
  children: ReactNode;
490
491
  label: string;
@@ -25,7 +25,8 @@ const Navigation = ({
25
25
  pinLimit = 7,
26
26
  width = NAVIGATION_WIDTH,
27
27
  onWidthResize,
28
- className
28
+ className,
29
+ id
29
30
  }) => jsx(NavigationProvider, {
30
31
  onClickPinUnpin: onClickPinUnpin,
31
32
  pinnedFeature: pinnedFeature,
@@ -39,6 +40,7 @@ const Navigation = ({
39
40
  className: className,
40
41
  width: width,
41
42
  onWidthResize: onWidthResize,
43
+ id: id,
42
44
  children: children
43
45
  })
44
46
  });
@@ -70,7 +70,8 @@ const NavigationContent = ({
70
70
  onClickExpand,
71
71
  width,
72
72
  onWidthResize,
73
- className
73
+ className,
74
+ id
74
75
  }) => {
75
76
  const sliderRef = useRef(null);
76
77
  const navigationRef = useRef(null);
@@ -188,6 +189,7 @@ const NavigationContent = ({
188
189
  }, [expanded, onWidthResize, toggleExpand]);
189
190
  return jsxs(StyledNav, {
190
191
  className: className,
192
+ id: id,
191
193
  children: [jsxs(Container, {
192
194
  ref: navigationRef,
193
195
  "data-animation": animation,
@@ -80,13 +80,13 @@ const StyledContainer = /*#__PURE__*/_styled(Stack, {
80
80
  theme
81
81
  }) => `calc(${theme.space['0.25']} + ${theme.space['0.5']}) ${theme.space['1']}`, ";&[data-has-sub-label='true']{padding:", ({
82
82
  theme
83
- }) => `${theme.space['0.5']} ${theme.space['1']}`, ";}transition:background-color 0.2s ease-in-out,color 0.2s ease-in-out;width:100%;&:hover[data-has-no-expand='false']:not([disabled]):not(\n [data-is-active='true']\n ),&:focus[data-has-no-expand='false']:not([disabled]):not(\n [data-is-active='true']\n ),&[data-has-active-children='true'][data-has-no-expand='false']:not(\n [disabled][data-is-active='true']\n ){background-color:", ({
83
+ }) => `${theme.space['0.5']} ${theme.space['1']}`, ";}width:100%;&:hover[data-has-no-expand='false']:not([disabled]):not(\n [data-is-active='true']\n ),&:focus[data-has-no-expand='false']:not([disabled]):not(\n [data-is-active='true']\n ),&[data-has-active-children='true'][data-has-no-expand='false']:not(\n [disabled][data-is-active='true']\n ){background-color:", ({
84
84
  theme
85
85
  }) => theme.colors.neutral.backgroundHover, ";", WrapText, "{color:", ({
86
86
  theme
87
87
  }) => theme.colors.neutral.textWeakHover, ";}", ExpandedPinnedButton, ",", CollapsedPinnedButton, "{opacity:1;}&[data-is-pinnable='true']{", StyledBadge, "{opacity:0;}}}&:hover[data-has-children='false'][data-is-active='false']{", WrapText, "{color:", ({
88
88
  theme
89
- }) => theme.colors.neutral.textWeakHover, ";transition:background-color 0.2s ease-in-out,color 0.2s ease-in-out;}}&:active[data-has-no-expand='false']:not([disabled]):not(\n [data-is-active='true']\n ){background-color:", ({
89
+ }) => theme.colors.neutral.textWeakHover, ";}}&:active[data-has-no-expand='false']:not([disabled]):not(\n [data-is-active='true']\n ){background-color:", ({
90
90
  theme
91
91
  }) => theme.colors.neutral.backgroundHover, ";}&[data-is-active='true'],&:hover[data-has-active='true']{background-color:", ({
92
92
  theme
@@ -243,7 +243,7 @@ const Item = ({
243
243
  justifyContent: "center",
244
244
  children: jsx(CategoryIcon, {
245
245
  name: categoryIcon,
246
- variant: categoryIconVariant,
246
+ variant: active ? 'primary' : categoryIconVariant,
247
247
  disabled: disabled
248
248
  })
249
249
  }) : null, jsxs(Stack, {
@@ -347,7 +347,8 @@ const Item = ({
347
347
  alignItems: "center",
348
348
  justifyContent: "center",
349
349
  children: jsx(CategoryIcon, {
350
- name: categoryIcon
350
+ name: categoryIcon,
351
+ variant: active ? 'primary' : categoryIconVariant
351
352
  })
352
353
  }) : null
353
354
  }),
@@ -373,7 +374,8 @@ const Item = ({
373
374
  alignItems: "center",
374
375
  justifyContent: "center",
375
376
  children: jsx(CategoryIcon, {
376
- name: categoryIcon ?? 'console'
377
+ name: categoryIcon ?? 'console',
378
+ variant: active ? 'primary' : categoryIconVariant
377
379
  })
378
380
  })
379
381
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultraviolet/plus",
3
- "version": "0.12.5",
3
+ "version": "0.12.7",
4
4
  "description": "Ultraviolet Plus",
5
5
  "homepage": "https://github.com/scaleway/ultraviolet#readme",
6
6
  "repository": {
@@ -39,7 +39,7 @@
39
39
  "react-dom": "18.2.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@babel/core": "7.24.3",
42
+ "@babel/core": "7.24.4",
43
43
  "@emotion/babel-plugin": "11.11.0",
44
44
  "@emotion/react": "11.11.4",
45
45
  "@emotion/styled": "11.11.5",
@@ -47,7 +47,7 @@
47
47
  "@types/react-dom": "18.2.24",
48
48
  "react": "18.2.0",
49
49
  "react-dom": "18.2.0",
50
- "@ultraviolet/icons": "2.12.2",
50
+ "@ultraviolet/icons": "2.12.3",
51
51
  "@ultraviolet/illustrations": "1.7.0"
52
52
  },
53
53
  "dependencies": {
@@ -56,7 +56,7 @@
56
56
  "@uiw/react-codemirror": "4.21.25",
57
57
  "react-intersection-observer": "9.8.1",
58
58
  "@ultraviolet/themes": "1.10.0",
59
- "@ultraviolet/ui": "1.45.6"
59
+ "@ultraviolet/ui": "1.46.0"
60
60
  },
61
61
  "scripts": {
62
62
  "build": "rollup -c ../../rollup.config.mjs",