@react-md/app-bar
Advanced tools
Comparing version 3.0.1 to 3.1.0
@@ -6,2 +6,14 @@ # Change Log | ||
# [3.1.0](https://github.com/mlaursen/react-md/compare/v3.0.1...v3.1.0) (2021-09-10) | ||
### Other Internal Changes | ||
* ran `yarn format` to include new files ([48d3d7f](https://github.com/mlaursen/react-md/commit/48d3d7fddb0435edf7dec9d0ba38cf3f0f251709)) | ||
## [3.0.1](https://github.com/mlaursen/react-md/compare/v3.0.0...v3.0.1) (2021-08-15) | ||
@@ -8,0 +20,0 @@ |
@@ -52,3 +52,3 @@ "use strict"; | ||
var useInheritContext_1 = require("./useInheritContext"); | ||
var block = utils_1.bem("rmd-app-bar"); | ||
var block = (0, utils_1.bem)("rmd-app-bar"); | ||
/** | ||
@@ -63,3 +63,3 @@ * This component is used to create a top-level app bar in your application that | ||
*/ | ||
exports.AppBar = react_1.forwardRef(function AppBar(_a, ref) { | ||
exports.AppBar = (0, react_1.forwardRef)(function AppBar(_a, ref) { | ||
var _b; | ||
@@ -69,4 +69,4 @@ var className = _a.className, children = _a.children, _c = _a.theme, propTheme = _c === void 0 ? "primary" : _c, _d = _a.component, propComponent = _d === void 0 ? "header" : _d, _e = _a.height, height = _e === void 0 ? "normal" : _e, _f = _a.fixed, fixed = _f === void 0 ? false : _f, _g = _a.fixedPosition, fixedPosition = _g === void 0 ? "top" : _g, _h = _a.fixedElevation, fixedElevation = _h === void 0 ? true : _h, inheritColor = _a.inheritColor, _j = _a.flexWrap, flexWrap = _j === void 0 ? height === "none" || | ||
height === "prominent-dense" : _j, remaining = __rest(_a, ["className", "children", "theme", "component", "height", "fixed", "fixedPosition", "fixedElevation", "inheritColor", "flexWrap"]); | ||
var parentContext = useInheritContext_1.useParentContext(); | ||
var inheritContext = useInheritContext_1.useInheritContext(undefined); | ||
var parentContext = (0, useInheritContext_1.useParentContext)(); | ||
var inheritContext = (0, useInheritContext_1.useInheritContext)(undefined); | ||
var inherit; | ||
@@ -88,3 +88,3 @@ var theme = propTheme; | ||
react_1.default.createElement(useInheritContext_1.InheritContext.Provider, { value: inherit }, | ||
react_1.default.createElement(Component, __assign({}, remaining, { className: classnames_1.default(block((_b = {}, | ||
react_1.default.createElement(Component, __assign({}, remaining, { className: (0, classnames_1.default)(block((_b = {}, | ||
_b[theme] = theme !== "clear", | ||
@@ -91,0 +91,0 @@ _b[height] = height !== "none", |
@@ -55,5 +55,5 @@ "use strict"; | ||
*/ | ||
exports.AppBarAction = react_1.forwardRef(function AppBarAction(_a, ref) { | ||
exports.AppBarAction = (0, react_1.forwardRef)(function AppBarAction(_a, ref) { | ||
var className = _a.className, _b = _a.first, first = _b === void 0 ? false : _b, _c = _a.last, last = _c === void 0 ? false : _c, children = _a.children, inheritColor = _a.inheritColor, floating = _a.floating, _d = _a.theme, theme = _d === void 0 ? floating ? "secondary" : "clear" : _d, _e = _a.buttonType, buttonType = _e === void 0 ? "icon" : _e, props = __rest(_a, ["className", "first", "last", "children", "inheritColor", "floating", "theme", "buttonType"]); | ||
return (react_1.default.createElement(button_1.Button, __assign({}, props, { theme: theme, buttonType: buttonType, floating: floating, ref: ref, className: useActionClassName_1.useActionClassName({ first: first, last: last, inheritColor: inheritColor, className: className }) }), children)); | ||
return (react_1.default.createElement(button_1.Button, __assign({}, props, { theme: theme, buttonType: buttonType, floating: floating, ref: ref, className: (0, useActionClassName_1.useActionClassName)({ first: first, last: last, inheritColor: inheritColor, className: className }) }), children)); | ||
}); | ||
@@ -60,0 +60,0 @@ /* istanbul ignore next */ |
@@ -54,3 +54,3 @@ "use strict"; | ||
var useInheritContext_1 = require("./useInheritContext"); | ||
var block = utils_1.bem("rmd-app-bar"); | ||
var block = (0, utils_1.bem)("rmd-app-bar"); | ||
/** | ||
@@ -67,8 +67,8 @@ * This component is really just a simple wrapper for the `Button` component | ||
*/ | ||
exports.AppBarNav = react_1.forwardRef(function AppBarNav(_a, ref) { | ||
exports.AppBarNav = (0, react_1.forwardRef)(function AppBarNav(_a, ref) { | ||
var className = _a.className, children = _a.children, inheritColor = _a.inheritColor, floating = _a.floating, _b = _a.theme, theme = _b === void 0 ? floating ? "secondary" : "clear" : _b, _c = _a.buttonType, buttonType = _c === void 0 ? "icon" : _c, props = __rest(_a, ["className", "children", "inheritColor", "floating", "theme", "buttonType"]); | ||
return (react_1.default.createElement(button_1.Button, __assign({}, props, { theme: theme, floating: floating, buttonType: buttonType, ref: ref, className: classnames_1.default(block("nav", { | ||
inherit: useInheritContext_1.useInheritContext(inheritColor), | ||
return (react_1.default.createElement(button_1.Button, __assign({}, props, { theme: theme, floating: floating, buttonType: buttonType, ref: ref, className: (0, classnames_1.default)(block("nav", { | ||
inherit: (0, useInheritContext_1.useInheritContext)(inheritColor), | ||
}), className) }), children)); | ||
}); | ||
//# sourceMappingURL=AppBarNav.js.map |
@@ -52,3 +52,3 @@ "use strict"; | ||
var useInheritContext_1 = require("./useInheritContext"); | ||
var block = utils_1.bem("rmd-app-bar"); | ||
var block = (0, utils_1.bem)("rmd-app-bar"); | ||
/** | ||
@@ -59,8 +59,8 @@ * This component is used to create a title for your application. If your app is | ||
*/ | ||
exports.AppBarTitle = react_1.forwardRef(function AppBarTitle(_a, ref) { | ||
exports.AppBarTitle = (0, react_1.forwardRef)(function AppBarTitle(_a, ref) { | ||
var _b = _a.noWrap, noWrap = _b === void 0 ? true : _b, _c = _a.keyline, keyline = _c === void 0 ? false : _c, className = _a.className, children = _a.children, inheritColor = _a.inheritColor, props = __rest(_a, ["noWrap", "keyline", "className", "children", "inheritColor"]); | ||
return (react_1.default.createElement("h6", __assign({}, props, { ref: ref, className: classnames_1.default(block("title", { | ||
return (react_1.default.createElement("h6", __assign({}, props, { ref: ref, className: (0, classnames_1.default)(block("title", { | ||
"no-wrap": noWrap, | ||
keyline: keyline, | ||
inherit: useInheritContext_1.useInheritContext(inheritColor), | ||
inherit: (0, useInheritContext_1.useInheritContext)(inheritColor), | ||
}), className) }), children)); | ||
@@ -67,0 +67,0 @@ }); |
@@ -10,3 +10,3 @@ "use strict"; | ||
var useInheritContext_1 = require("./useInheritContext"); | ||
var block = utils_1.bem("rmd-app-bar"); | ||
var block = (0, utils_1.bem)("rmd-app-bar"); | ||
/** | ||
@@ -21,6 +21,6 @@ * This is a hook that will apply the nav classnames to an element. This should | ||
var _b = _a === void 0 ? {} : _a, first = _b.first, last = _b.last, inheritColor = _b.inheritColor, className = _b.className; | ||
return classnames_1.default(block("action", { | ||
return (0, classnames_1.default)(block("action", { | ||
first: first, | ||
last: last, | ||
inherit: useInheritContext_1.useInheritContext(inheritColor), | ||
inherit: (0, useInheritContext_1.useInheritContext)(inheritColor), | ||
}), className); | ||
@@ -27,0 +27,0 @@ } |
@@ -9,3 +9,3 @@ "use strict"; | ||
*/ | ||
exports.InheritContext = react_1.createContext(false); | ||
exports.InheritContext = (0, react_1.createContext)(false); | ||
/** | ||
@@ -22,3 +22,3 @@ * This is probably a bit overkill... but this is used so that all the AppBar | ||
function useInheritContext(inheritColor) { | ||
var inheritContext = react_1.useContext(exports.InheritContext); | ||
var inheritContext = (0, react_1.useContext)(exports.InheritContext); | ||
return typeof inheritColor === "boolean" ? inheritColor : inheritContext; | ||
@@ -35,3 +35,3 @@ } | ||
*/ | ||
exports.ParentContext = react_1.createContext(false); | ||
exports.ParentContext = (0, react_1.createContext)(false); | ||
/** | ||
@@ -42,3 +42,3 @@ * | ||
function useParentContext() { | ||
return react_1.useContext(exports.ParentContext); | ||
return (0, react_1.useContext)(exports.ParentContext); | ||
} | ||
@@ -45,0 +45,0 @@ exports.useParentContext = useParentContext; |
{ | ||
"name": "@react-md/app-bar", | ||
"version": "3.0.1", | ||
"version": "3.1.0", | ||
"description": "This small package implments the AppBar spec in material design.", | ||
@@ -32,8 +32,8 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@react-md/button": "^3.0.1", | ||
"@react-md/elevation": "^3.0.1", | ||
"@react-md/icon": "^3.0.0", | ||
"@react-md/theme": "^3.0.0", | ||
"@react-md/typography": "^3.0.0", | ||
"@react-md/utils": "^3.0.0", | ||
"@react-md/button": "^3.1.0", | ||
"@react-md/elevation": "^3.1.0", | ||
"@react-md/icon": "^3.1.0", | ||
"@react-md/theme": "^3.1.0", | ||
"@react-md/typography": "^3.1.0", | ||
"@react-md/utils": "^3.1.0", | ||
"classnames": "^2.3.1" | ||
@@ -55,3 +55,3 @@ }, | ||
}, | ||
"gitHead": "68149668ebc79c4bbcbb2875d65b9ac243e12c77" | ||
"gitHead": "5891a3255f12fb34d2cc82d81d10f85f712a21e8" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
150192
Updated@react-md/button@^3.1.0
Updated@react-md/elevation@^3.1.0
Updated@react-md/icon@^3.1.0
Updated@react-md/theme@^3.1.0
Updated@react-md/typography@^3.1.0
Updated@react-md/utils@^3.1.0