@terraware/web-components 3.0.33 → 3.0.34-rc.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.
@@ -5,6 +5,7 @@ import { SubNavbarProps } from './SubNavbar';
5
5
  export interface NavItemProps {
6
6
  label: string | React.ReactNode;
7
7
  icon?: IconName;
8
+ iconColor?: string;
8
9
  children?: ReactElement<SubNavbarProps>;
9
10
  disabled?: boolean;
10
11
  selected?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"NavItem.d.ts","sourceRoot":"","sources":["../../../src/components/Navbar/NavItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAe,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAChC,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,QAAQ,CAAC,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,KAAK,IAAI,CAAC;IAC9C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAiEhE"}
1
+ {"version":3,"file":"NavItem.d.ts","sourceRoot":"","sources":["../../../src/components/Navbar/NavItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAe,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAChC,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,KAAK,IAAI,CAAC;IAC9C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAiEhE"}
@@ -9,10 +9,12 @@ exports.default = NavItem;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _Icon = _interopRequireDefault(require("../Icon/Icon"));
11
11
  require("./styles.scss");
12
+ var _theme = _interopRequireDefault(require("../../theme"));
12
13
  function NavItem(props) {
13
14
  const {
14
15
  label,
15
16
  icon,
17
+ iconColor,
16
18
  children: childrenProps,
17
19
  disabled,
18
20
  selected,
@@ -55,7 +57,8 @@ function NavItem(props) {
55
57
  id: id
56
58
  }, icon && /*#__PURE__*/_react.default.createElement(_Icon.default, {
57
59
  name: icon,
58
- className: "nav-item--icon"
60
+ className: "nav-item--icon",
61
+ fillColor: iconColor !== null && iconColor !== void 0 ? iconColor : _theme.default.palette.TwClrIcnSecondary
59
62
  }), !href && /*#__PURE__*/_react.default.createElement("span", {
60
63
  className: "nav-item--label"
61
64
  }, label), href && /*#__PURE__*/_react.default.createElement("a", {
@@ -121,7 +121,6 @@
121
121
  }
122
122
 
123
123
  &--icon {
124
- fill: $tw-clr-icn-secondary;
125
124
  margin-right: $tw-spc-base-x-small;
126
125
  line-height: $tw-sz-icon-small;
127
126
  height: $tw-sz-icon-small;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@terraware/web-components",
3
- "version": "3.0.33",
3
+ "version": "3.0.34-rc.0",
4
4
  "author": "Terraformation Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -0,0 +1,8 @@
1
+ import NavItem, { NavItemProps } from '../components/Navbar/NavItem';
2
+ declare const _default: {
3
+ title: string;
4
+ component: typeof NavItem;
5
+ };
6
+ export default _default;
7
+ export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, NavItemProps>;
8
+ //# sourceMappingURL=NavItem.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavItem.stories.d.ts","sourceRoot":"","sources":["../../src/stories/NavItem.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,OAAO,EAAE,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;;;;;AAGrE,wBAGE;AAYF,eAAO,MAAM,OAAO,qGAAoB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Navbar.stories.d.ts","sourceRoot":"","sources":["../../src/stories/Navbar.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,MAAM,EAAE,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,6BAA6B,CAAC;;;;;;;;AAM3E,wBAME;AA6GF,eAAO,MAAM,OAAO,oGAAwB,CAAC;AAE7C,eAAO,MAAM,KAAK,oGAAqB,CAAC"}
1
+ {"version":3,"file":"Navbar.stories.d.ts","sourceRoot":"","sources":["../../src/stories/Navbar.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,MAAM,EAAE,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,6BAA6B,CAAC;;;;;;;;AAM3E,wBAME;AAiHF,eAAO,MAAM,OAAO,oGAAwB,CAAC;AAE7C,eAAO,MAAM,KAAK,oGAAqB,CAAC"}