terra-slide-panel-manager
Advanced tools
Comparing version 5.31.0 to 5.32.0
@@ -7,2 +7,12 @@ Changelog | ||
5.32.0 - (April 22, 2020) | ||
------------------ | ||
### Changed | ||
* Update docs to use MDX syntax | ||
5.31.0 - (April 6, 2020) | ||
------------------ | ||
### Changed | ||
* Minor dependency version bump | ||
5.30.0 - (March 31, 2020) | ||
@@ -9,0 +19,0 @@ ------------------ |
@@ -22,2 +22,4 @@ "use strict"; | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); | ||
@@ -27,4 +29,2 @@ | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
@@ -31,0 +31,0 @@ |
@@ -18,2 +18,4 @@ "use strict"; | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); | ||
@@ -23,4 +25,2 @@ | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -220,3 +220,2 @@ | ||
value: function renderButton(size) { | ||
var disclosureType = this.props.disclosureType; | ||
var disclosureManager = this.context; | ||
@@ -227,3 +226,3 @@ return /*#__PURE__*/_react.default.createElement("button", { | ||
disclosureManager.disclose({ | ||
preferredType: disclosureType, | ||
preferredType: 'panel', | ||
size: size, | ||
@@ -234,3 +233,3 @@ content: { | ||
name: "Disclosure Component", | ||
disclosureType: disclosureType | ||
disclosureType: "panel" | ||
}) | ||
@@ -247,3 +246,2 @@ } | ||
var disclosureType = this.props.disclosureType; | ||
var disclosureManager = this.context; | ||
@@ -255,3 +253,3 @@ var name = "Disclose (".concat(this.state.disclosureHeight, ") x (").concat(this.state.disclosureWidth, ")"); | ||
disclosureManager.disclose({ | ||
preferredType: disclosureType, | ||
preferredType: 'panel', | ||
dimensions: { | ||
@@ -265,3 +263,3 @@ height: _this5.state.disclosureHeight, | ||
name: "Disclosure Component", | ||
disclosureType: disclosureType | ||
disclosureType: "panel" | ||
}) | ||
@@ -277,5 +275,5 @@ } | ||
return /*#__PURE__*/_react.default.createElement("form", null, /*#__PURE__*/_react.default.createElement("label", { | ||
htmlFor: this.getId("disclosureHeight".concat(this.props.panelBehavior)) | ||
htmlFor: this.getId('disclosureHeightOverlay') | ||
}, "Pop Content Height"), /*#__PURE__*/_react.default.createElement("select", { | ||
id: this.getId("disclosureHeight".concat(this.props.panelBehavior)), | ||
id: this.getId('disclosureHeightOverlay'), | ||
name: "disclosureHeight", | ||
@@ -285,5 +283,5 @@ value: this.state.disclosureHeight, | ||
}, generateDimensionOptions(HEIGHT_KEYS)), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement("label", { | ||
htmlFor: this.getId("disclosureWidth".concat(this.props.panelBehavior)) | ||
htmlFor: this.getId('disclosureWidthOverlay') | ||
}, "Pop Content Width"), /*#__PURE__*/_react.default.createElement("select", { | ||
id: this.getId("disclosureWidth".concat(this.props.panelBehavior)), | ||
id: this.getId('disclosureWidthOverlay'), | ||
name: "disclosureWidth", | ||
@@ -312,27 +310,11 @@ value: this.state.disclosureWidth, | ||
ContentComponent.contextType = _terraDisclosureManager.DisclosureManagerContext; | ||
ContentComponent.propTypes = { | ||
disclosureType: _propTypes.default.string, | ||
panelBehavior: _propTypes.default.oneOf(['overlay', 'squish']) | ||
}; | ||
var SlidePanelManagerExample = function SlidePanelManagerExample(_ref) { | ||
var behavior = _ref.behavior, | ||
showAccessory = _ref.showAccessory; | ||
var SlidePanelManagerExample = function SlidePanelManagerExample() { | ||
return /*#__PURE__*/_react.default.createElement("div", { | ||
className: cx('example-wrapper') | ||
}, /*#__PURE__*/_react.default.createElement(_terraSlidePanelManager.default, { | ||
panelBehavior: behavior, | ||
disclosureAccessory: showAccessory ? /*#__PURE__*/_react.default.createElement("div", { | ||
className: cx('disclosure-accessory') | ||
}, "Disclosure Accessory") : undefined | ||
}, /*#__PURE__*/_react.default.createElement(ContentComponent, { | ||
panelBehavior: behavior, | ||
disclosureType: "panel" | ||
}))); | ||
panelBehavior: "overlay" | ||
}, /*#__PURE__*/_react.default.createElement(ContentComponent, null))); | ||
}; | ||
SlidePanelManagerExample.propTypes = { | ||
behavior: _propTypes.default.string, | ||
showAccessory: _propTypes.default.bool | ||
}; | ||
var _default = SlidePanelManagerExample; | ||
@@ -339,0 +321,0 @@ /* eslint-disable max-classes-per-file */ |
@@ -18,2 +18,4 @@ "use strict"; | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); | ||
@@ -23,4 +25,2 @@ | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -27,0 +27,0 @@ |
{ | ||
"name": "terra-slide-panel-manager", | ||
"main": "lib/SlidePanelManager.js", | ||
"version": "5.31.0", | ||
"version": "5.32.0", | ||
"description": "A DisclosureManager implementation that presents disclosed content using a SlidePanel.", | ||
@@ -39,4 +39,3 @@ "repository": { | ||
"devDependencies": { | ||
"terra-collapsible-menu-view": "^6.31.0", | ||
"terra-doc-template": "^2.2.0" | ||
"terra-collapsible-menu-view": "^6.31.0" | ||
}, | ||
@@ -56,3 +55,3 @@ "scripts": { | ||
}, | ||
"gitHead": "e15ef5d9cbdfab0269500fdf287174c8a464a51f" | ||
"gitHead": "e13dc9d272524a7aa43d3be29c5e6d088e630c9c" | ||
} |
@@ -9,3 +9,3 @@ # Terra SlidePanel Manager | ||
- [Getting Started](#getting-started) | ||
- [Documentation](https://github.com/cerner/terra-framework/tree/master/packages/terra-slide-panel-manager/docs) | ||
- [Documentation](https://engineering.cerner.com/terra-framework/components/terra-slide-panel-manager/slide-panel-manager/slide-panel-manager) | ||
- [LICENSE](#license) | ||
@@ -12,0 +12,0 @@ |
/* eslint-disable max-classes-per-file */ | ||
/* Slide Panel Manager example with panel behavior as "overlay" */ | ||
import React from 'react'; | ||
@@ -179,3 +180,2 @@ import PropTypes from 'prop-types'; | ||
renderButton(size) { | ||
const { disclosureType } = this.props; | ||
const disclosureManager = this.context; | ||
@@ -188,7 +188,7 @@ | ||
disclosureManager.disclose({ | ||
preferredType: disclosureType, | ||
preferredType: 'panel', | ||
size, | ||
content: { | ||
key: `Content-Disclosure-${size}`, | ||
component: <DisclosureComponent name="Disclosure Component" disclosureType={disclosureType} />, | ||
component: <DisclosureComponent name="Disclosure Component" disclosureType="panel" />, | ||
}, | ||
@@ -204,3 +204,2 @@ }); | ||
renderFormButton() { | ||
const { disclosureType } = this.props; | ||
const disclosureManager = this.context; | ||
@@ -215,7 +214,7 @@ | ||
disclosureManager.disclose({ | ||
preferredType: disclosureType, | ||
preferredType: 'panel', | ||
dimensions: { height: this.state.disclosureHeight, width: this.state.disclosureWidth }, | ||
content: { | ||
key: 'Content-Disclosure-Dimensions', | ||
component: <DisclosureComponent name="Disclosure Component" disclosureType={disclosureType} />, | ||
component: <DisclosureComponent name="Disclosure Component" disclosureType="panel" />, | ||
}, | ||
@@ -233,4 +232,4 @@ }); | ||
<form> | ||
<label htmlFor={this.getId(`disclosureHeight${this.props.panelBehavior}`)}>Pop Content Height</label> | ||
<select id={this.getId(`disclosureHeight${this.props.panelBehavior}`)} name="disclosureHeight" value={this.state.disclosureHeight} onChange={this.handleSelectChange}> | ||
<label htmlFor={this.getId('disclosureHeightOverlay')}>Pop Content Height</label> | ||
<select id={this.getId('disclosureHeightOverlay')} name="disclosureHeight" value={this.state.disclosureHeight} onChange={this.handleSelectChange}> | ||
{generateDimensionOptions(HEIGHT_KEYS)} | ||
@@ -240,4 +239,4 @@ </select> | ||
<br /> | ||
<label htmlFor={this.getId(`disclosureWidth${this.props.panelBehavior}`)}>Pop Content Width</label> | ||
<select id={this.getId(`disclosureWidth${this.props.panelBehavior}`)} name="disclosureWidth" value={this.state.disclosureWidth} onChange={this.handleSelectChange}> | ||
<label htmlFor={this.getId('disclosureWidthOverlay')}>Pop Content Width</label> | ||
<select id={this.getId('disclosureWidthOverlay')} name="disclosureWidth" value={this.state.disclosureWidth} onChange={this.handleSelectChange}> | ||
{generateDimensionOptions(WIDTH_KEYS)} | ||
@@ -282,18 +281,9 @@ </select> | ||
ContentComponent.contextType = DisclosureManagerContext; | ||
ContentComponent.propTypes = { | ||
disclosureType: PropTypes.string, | ||
panelBehavior: PropTypes.oneOf(['overlay', 'squish']), | ||
}; | ||
const SlidePanelManagerExample = ({ behavior, showAccessory }) => ( | ||
const SlidePanelManagerExample = () => ( | ||
<div className={cx('example-wrapper')}> | ||
<SlidePanelManager | ||
panelBehavior={behavior} | ||
disclosureAccessory={showAccessory ? ( | ||
<div className={cx('disclosure-accessory')}> | ||
Disclosure Accessory | ||
</div> | ||
) : undefined} | ||
panelBehavior="overlay" | ||
> | ||
<ContentComponent panelBehavior={behavior} disclosureType="panel" /> | ||
<ContentComponent /> | ||
</SlidePanelManager> | ||
@@ -303,8 +293,3 @@ </div> | ||
SlidePanelManagerExample.propTypes = { | ||
behavior: PropTypes.string, | ||
showAccessory: PropTypes.bool, | ||
}; | ||
export default SlidePanelManagerExample; | ||
/* eslint-disable max-classes-per-file */ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
163059
1
39
2801