@carbon-labs/react-ui-shell 0.5.0 → 0.6.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/es/components/SideNav.d.ts +29 -16
- package/es/components/SideNav.js +30 -6
- package/es/components/SideNavToggle.d.ts +28 -0
- package/es/components/SideNavToggle.js +52 -0
- package/es/node_modules/@carbon/icon-helpers/es/index.js +125 -0
- package/es/node_modules/@carbon/icons-react/es/Icon.js +71 -0
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-15.js +3076 -0
- package/es/node_modules/@carbon/icons-react/es/iconPropTypes-4cbeb95d.js +14 -0
- package/lib/components/SideNav.d.ts +29 -16
- package/lib/components/SideNav.js +50 -5
- package/lib/components/SideNavToggle.d.ts +28 -0
- package/lib/components/SideNavToggle.js +57 -0
- package/lib/node_modules/@carbon/icon-helpers/es/index.js +128 -0
- package/lib/node_modules/@carbon/icons-react/es/Icon.js +75 -0
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-15.js +3202 -0
- package/lib/node_modules/@carbon/icons-react/es/iconPropTypes-4cbeb95d.js +16 -0
- package/package.json +2 -2
- package/scss/styles/_side-nav.scss +51 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2024
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
var PropTypes = require('prop-types');
|
|
11
|
+
|
|
12
|
+
const iconPropTypes = {
|
|
13
|
+
size: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
exports.i = iconPropTypes;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon-labs/react-ui-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@ibm/telemetry-js": "^1.9.1"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "615e563886e18b341199eea82182fecd16c8dfd1"
|
|
37
37
|
}
|
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
@use '@carbon/styles/scss/utilities/convert' as convert;
|
|
9
|
+
@use '@carbon/styles/scss/utilities/button-reset' as button-reset;
|
|
10
|
+
@use '@carbon/styles/scss/utilities/focus-outline' as *;
|
|
11
|
+
@use '@carbon/styles/scss/theme' as *;
|
|
12
|
+
@use '@carbon/styles/scss/motion' as *;
|
|
13
|
+
@use '@carbon/styles/scss/type' as *;
|
|
14
|
+
@use '@carbon/styles/scss/components/ui-shell/mixins' as *;
|
|
15
|
+
@use '@carbon/styles/scss/components/ui-shell/functions' as *;
|
|
16
|
+
@use '@carbon/styles/scss/spacing' as *;
|
|
9
17
|
|
|
10
18
|
$prefix: 'cds' !default;
|
|
11
19
|
|
|
@@ -19,3 +27,46 @@ $prefix: 'cds' !default;
|
|
|
19
27
|
.#{$prefix}--side-nav--collapsible.#{$prefix}--side-nav--expanded {
|
|
20
28
|
inline-size: convert.to-rem(256px);
|
|
21
29
|
}
|
|
30
|
+
|
|
31
|
+
//----------------------------------------------------------------------------
|
|
32
|
+
// Side-nav Panel
|
|
33
|
+
//----------------------------------------------------------------------------
|
|
34
|
+
.#{$prefix}--side-nav--panel {
|
|
35
|
+
.#{$prefix}--side-nav__icon:not(.#{$prefix}--side-nav__submenu-chevron) {
|
|
36
|
+
margin-inline-end: $spacing-05;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.#{$prefix}--side-nav__item.#{$prefix}--side-nav__item--icon
|
|
40
|
+
a.#{$prefix}--side-nav__link {
|
|
41
|
+
padding-inline-start: mini-units(8);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.#{$prefix}--side-nav__toggle {
|
|
45
|
+
@include button-reset.reset($width: true);
|
|
46
|
+
@include type-style('heading-compact-01');
|
|
47
|
+
@include focus-outline('reset');
|
|
48
|
+
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
padding: 0 $spacing-05;
|
|
52
|
+
block-size: $spacing-09;
|
|
53
|
+
color: $text-secondary;
|
|
54
|
+
transition: color $duration-fast-02, background-color $duration-fast-02,
|
|
55
|
+
outline $duration-fast-02;
|
|
56
|
+
|
|
57
|
+
&:hover {
|
|
58
|
+
background-color: $background-hover;
|
|
59
|
+
color: $text-primary;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&:focus {
|
|
63
|
+
@include focus-outline('outline');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.#{$prefix}--side-nav__toggle-text {
|
|
68
|
+
@include text-overflow();
|
|
69
|
+
|
|
70
|
+
text-align: start;
|
|
71
|
+
}
|
|
72
|
+
}
|