Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(project): revert accidental public api changes #9563

Merged
merged 3 commits into from
Aug 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions packages/components/demo/js/data-table-demo-expand-all-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,35 @@ class DataTableDemoExpandRowAllManager extends mixin(
handles
) {
/**
* The row expand handler for data table "expand all" feature demo.
* The row expando handler for data table "expand all" feature demo.
* @extends CreateComponent
* @extends InitComponentByEvent
* @extends Handles
* @param {HTMLElement} element The element working as the button for data table "expand all" feature demo.
* @param {Object} [options] The component options.
* @param {string} [options.selectorExpandHeader] The CSS selector to find the header expand button.
* @param {string} [options.selectorExpandCells] The CSS selector to find the row expand button.
* @param {string} [options.selectorExpandHeader] The CSS selector to find the header expando button.
* @param {string} [options.selectorExpandCells] The CSS selector to find the row expando button.
* @param {string} [options.selectorExpandCellsExpanded]
* The CSS selector to find the row expand button with its expanded state.
* The CSS selector to find the row expando button with its expanded state.
*/
constructor(element, options) {
super(element, options);
this.manage(on(element, 'click', this._handleClickRowExpand));
this.manage(on(element, 'click', this._handleClickRowExpando));
}

/**
* A method called when this widget is created upon events.
* @param {Event} event The event triggering the creation.
*/
createdByEvent(event) {
this._handleClickRowExpand(event);
this._handleClickRowExpando(event);
}

/**
* Handles `click` event on the row expand button.
* @private
*/
_handleClickRowExpand = () => {
_handleClickRowExpando = () => {
if (
this.element.querySelectorAll(this.options.selectorExpandCells).length ===
this.element.querySelectorAll(this.options.selectorExpandCellsExpanded)
Expand All @@ -66,10 +66,10 @@ class DataTableDemoExpandRowAllManager extends mixin(
* and how {@linkcode DataTableDemoExpandRowAllManager.init .init()} works.
* @member DataTableDemoExpandRowAllManager.options
* @type {Object}
* @property {string} selectorInit The CSS selector to find the row expand handler for data table "expand all" feature demo.
* @property {string} [selectorExpandHeader] The CSS selector to find the header expand button.
* @property {string} [selectorExpandCells] The CSS selector to find the row expand button.
* @property {string} [selectorExpandCellsExpanded] The CSS selector to find the row expand button with its expanded state.
* @property {string} selectorInit The CSS selector to find the row expando handler for data table "expand all" feature demo.
* @property {string} [selectorExpandHeader] The CSS selector to find the header expando button.
* @property {string} [selectorExpandCells] The CSS selector to find the row expando button.
* @property {string} [selectorExpandCellsExpanded] The CSS selector to find the row expando button with its expanded state.
* @property {string[]} initEventNames The event names that instantiates this component.
*/
static get options() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Map {
"open": Object {
"type": "bool",
},
"renderExpand": Object {
"renderExpando": Object {
"type": "func",
},
"title": Object {
Expand Down Expand Up @@ -1145,7 +1145,7 @@ Map {
"className": Object {
"type": "string",
},
"enableExpand": Object {
"enableExpando": Object {
"type": "bool",
},
"expandIconDescription": Object {
Expand Down Expand Up @@ -1782,7 +1782,7 @@ Map {
"className": Object {
"type": "string",
},
"enableExpand": Object {
"enableExpando": Object {
"type": "bool",
},
"expandIconDescription": Object {
Expand Down
16 changes: 8 additions & 8 deletions packages/react/src/components/Accordion/AccordionItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ import { useId } from '../../internal/useId';
import deprecate from '../../prop-types/deprecate.js';

const { prefix } = settings;
const defaultRenderExpand = (props) => <button type="button" {...props} />;
const defaultRenderExpando = (props) => <button type="button" {...props} />;

function AccordionItem({
children,
className: customClassName,
iconDescription, // eslint-disable-line
open = false,
onHeadingClick,
renderExpand: Expand = defaultRenderExpand,
renderExpando: Expando = defaultRenderExpando,
title = 'title',
disabled,
...rest
Expand Down Expand Up @@ -75,7 +75,7 @@ function AccordionItem({

return (
<li className={className} {...rest} onAnimationEnd={handleAnimationEnd}>
<Expand
<Expando
disabled={disabled}
aria-controls={id}
aria-expanded={isOpen}
Expand All @@ -85,7 +85,7 @@ function AccordionItem({
type="button">
<ChevronRight16 className={`${prefix}--accordion__arrow`} />
<div className={`${prefix}--accordion__title`}>{title}</div>
</Expand>
</Expando>
<div id={id} className={`${prefix}--accordion__content`}>
{children}
</div>
Expand All @@ -110,7 +110,7 @@ AccordionItem.propTypes = {
disabled: PropTypes.bool,

/**
* The description of the expand icon.
* The description of the expando icon.
*/
iconDescription: deprecate(
PropTypes.string,
Expand All @@ -131,15 +131,15 @@ AccordionItem.propTypes = {
onHeadingClick: PropTypes.func,

/**
* `true` to open the expand.
* `true` to open the expando.
*/
open: PropTypes.bool,

/**
* The callback function to render the expand button.
* The callback function to render the expando button.
* Can be a React component class.
*/
renderExpand: PropTypes.func,
renderExpando: PropTypes.func,

/**
* The accordion title.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exports[`AccordionItem should render 1`] = `
className="bx--accordion__item extra-class"
onAnimationEnd={[Function]}
>
<defaultRenderExpand
<defaultRenderExpando
aria-controls="accordion-item-1"
aria-expanded={false}
className="bx--accordion__heading"
Expand Down Expand Up @@ -60,7 +60,7 @@ exports[`AccordionItem should render 1`] = `
A heading
</div>
</button>
</defaultRenderExpand>
</defaultRenderExpando>
<div
className="bx--accordion__content"
id="accordion-item-1"
Expand Down
12 changes: 6 additions & 6 deletions packages/react/src/components/DataTable/TableExpandHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const { prefix } = settings;
const TableExpandHeader = ({
ariaLabel,
className: headerClassName,
enableExpand,
enableExpando,
isExpanded,
onExpand,
expandIconDescription,
Expand All @@ -33,7 +33,7 @@ const TableExpandHeader = ({
className={className}
data-previous-value={previousValue}
{...rest}>
{!enableExpand ? null : (
{!enableExpando ? null : (
<button
type="button"
className={`${prefix}--table-expand__button`}
Expand All @@ -56,15 +56,15 @@ TableExpandHeader.propTypes = {
* Specify the string read by a voice reader when the expand trigger is
* focused
*/
ariaLabel: requiredIfGivenPropIsTruthy('enableExpand', PropTypes.string),
ariaLabel: requiredIfGivenPropIsTruthy('enableExpando', PropTypes.string),
children: PropTypes.node,

className: PropTypes.string,

/**
* Specify whether an expand all button should be displayed
*/
enableExpand: PropTypes.bool,
enableExpando: PropTypes.bool,

/**
* The description of the chevron right icon, to be put in its SVG `<title>` element.
Expand All @@ -75,12 +75,12 @@ TableExpandHeader.propTypes = {
* Specify whether this row is expanded or not. This helps coordinate data
* attributes so that `TableExpandRow` and `TableExpandedRow` work together
*/
isExpanded: requiredIfGivenPropIsTruthy('enableExpand', PropTypes.bool),
isExpanded: requiredIfGivenPropIsTruthy('enableExpando', PropTypes.bool),

/**
* Hook for when a listener initiates a request to expand the given row
*/
onExpand: requiredIfGivenPropIsTruthy('enableExpand', PropTypes.func),
onExpand: requiredIfGivenPropIsTruthy('enableExpando', PropTypes.func),
};

export default TableExpandHeader;
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ export const BatchExpansion = () => (
<TableHead>
<TableRow>
<TableExpandHeader
enableExpand={true}
enableExpando={true}
{...getExpandHeaderProps()}
/>
{headers.map((header, i) => (
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/components/TreeView/TreeNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ export default function TreeNode({
* Dynamically calculate padding to recreate tree node indentation
* - parent nodes have (depth + 1rem) left padding
* - leaf nodes have (depth + 2.5rem) left padding without icons (because
* of expand icon + spacing)
* of expando icon + spacing)
* - leaf nodes have (depth + 2rem) left padding with icons (because of
* reduced spacing between the expand icon and the node icon + label)
* reduced spacing between the expando icon and the node icon + label)
*/
const calcOffset = () => {
// parent node
Expand Down