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

[RFC] Sass theming, theme zoning, and whitelabelling #1822

Closed

Conversation

mattrosno
Copy link
Member

@mattrosno mattrosno commented Feb 14, 2019

This RFC looks at our current Sass architecture to identify how we can better support theming. As-is, we support a page-level theme and Sass variable overrides for theme colors and some component styling properties. The current Sass architecture breaks down quickly if a product is looking to use two or more themes at once, or if they want to modify component styling in a future-friendly way (as opposed to CSS overrides), a.k.a. whitelabel.

Definitions

The word "theme" is currently overloaded, causing confusion. At the end of the day, everything is a Sass variable (or map) so let's start there.

Variables - _vars.scss has been renamed to _variables.scss to better describe the file.

_theme-tokens.scss got moved into _variables.scss as it included theming variables as well as v9 to v10 feature gate variables. Bumping up versions does not constitute a theme.

Variants - button primary, secondary, etc. are variants not themes. Mixin names have been updated accordingly.

Theme - for now let's consider a theme being just colors. These colors are defined as Sass variables.

Inline Theme - when a theme is nested inside another theme.

Tokens - subset of theme variables. These are defined in the carbon website and come from @carbon/carbon-elements as theme tokens.

Whitelabel - if you want to override more than default color variables.

NOTE - inline theming only affects colors. If for some reason you want whitelabel just part your webpage (e.g. this secondary part of the page gets rounded buttons), use CSS overrides, or include two full Carbon builds to target that secondary part of the page.

Theme Overrides

Now that Carbon supports four themes out-of-box (as defined in tokens), you can global override the default theme variable using theme-white, theme-g10, theme-g90, theme-g100, or theme-custom. E.g. in your Sass build:

$token-theme: 'theme-g90';

@import '../node_modules/carbon-components/scss/global/styles.scss';

To support inline themes, token sets need to be in a Sass map. To use custom tokens, simply do this in your Sass build:

$token-theme: 'theme-custom';

$custom-theme-tokens: (
  interactive-03: pink,
);

@import '../node_modules/carbon-components/scss/global/styles.scss';

Any token not recognized is ignored, and unspecified custom tokens default to the white theme.

Inline Themes

Also called theme zones, or styling islands, this is possible by giving your theme a namespace class and deciding which component styling to include. Include just the components that you'll need in the inline themes to keep CSS bloat down. In your Sass build:

@import '../node_modules/carbon-components/scss/global/styles.scss';

@if feature-flag-enabled('components-x') {
  .my-dark-theme {
    @include theme-g90() {
      @include button-theme--x;
    }
  }
}

For the purpose of this RFC, only button Sass has been updated to support inline themes. The CSS output looks like:

.my-dark-theme .bx--btn--primary {
  background-color: #0062ff;
  border-color: transparent;
  color: #ffffff;
}

.my-dark-theme .bx--btn--primary:focus::before {
  border-color: #ffffff;
}

.my-dark-theme .bx--btn--primary:focus::after {
  border-color: #0062ff;
}

...

The inline theme overrides just contain colors to minimize CSS bloat.

If you want, you could even use your custom theme in inline themes:

$custom-theme-tokens: (
  interactive-03: pink,
);

@import '../node_modules/carbon-components/scss/global/styles.scss';

@if feature-flag-enabled('components-x') {
  .my-custom-theme {
    @include theme-custom() {
      @include button-theme--x;
    }
  }
}

Things to review

Carbon-elements

Question: Can we get carbon-elements to include Sass maps of colors? Since we can't interpolate Sass variable names, it's easiest to have the carbon-elements mixins set one $carbon--theme-tokens map. Using maps greatly simplifies handling custom tokens as global Sass override.

Notice how that does not use the !default keyword so our inline theme definitions can override the one $carbon--theme-tokens, print out inline theme declaration blocks, and move on by using @content.

Button

I used the new token map $carbon--theme-tokens instead of token variables, through a new theme-token function. E.g. theme-token(ui-04) instead of $ui-04.

I also shifted around button mixins so the main experimental mixin includes colors via button-theme--x mixin, but that mixin can also be used when defining inline themes. If you look at button-theme--x, it only includes colors.

Question: What would be the best way to test that this mixin refactor doesn't negatively impact selector specificity (order).

Whitelabel

In addition to using a non-default theme, a custom theme, or inline theme, we need a better way to allow styling customizations beyond color. This is where a two-layer Sass variable strategy comes in place.

Some variables are global (token map, color variables, font family, spacing, etc.) and for certain properties, components should use their own variables that reference the global variables. E.g. let's say you want more space between ghost button text and icon.

.#{$prefix}--btn--ghost {
  @include button-variant--x;

  .#{$prefix}--btn__icon {
    margin-left: $spacing-xs;
  }
}

You likely don't want to globally override $spacing-xs. You also don't want to override the declaration block as that becomes a migration nightmare. Instead, use a component variable:

$button-icon-margin-x: $spacing-xs !default;

.#{$prefix}--btn--ghost {
  @include button-variant--x;

  .#{$prefix}--btn__icon {
    margin-left: $button-icon-margin-x;
  }
}

And then in your custom Sass build:

$button-icon-margin-x: 12px;

@import '../node_modules/carbon-components/scss/global/styles.scss';

Things to review

Variables

Question: How many variables are too many variables? Evaluating Boostrap's Sass, it looks like colors, text, and box model can take you a very long way.

Question: What do we think of Bootstrap's variable naming convention? Is a Carbon prefix needed on these variables?

Variables should follow the $component-state-property-size formula for consistent naming. Ex: $nav-link-disabled-color and $modal-content-box-shadow-xs.

Question: What migration risks / actions does this entail? E.g. can we change a file name?

To Do

  • Commit with button variables example

- refactor themes from carbon-elements
- demonstrate new approach to theme tokens with button
- so you can call mixin in inline theme
- rename button "theme" to "variant"
@netlify
Copy link

netlify bot commented Feb 14, 2019

Deploy preview for the-carbon-components ready!

Built with commit b47ffcf

https://deploy-preview-1822--the-carbon-components.netlify.com

@mattrosno mattrosno changed the title RFC: Sass theming, theme zoning, and whitelabelling [RFC] Sass theming, theme zoning, and whitelabelling Feb 14, 2019
Copy link
Contributor

@asudoh asudoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mattrosno for the proposal! I see your proposal includes valuable APIs (such as theme tokens defined as maps), or possibility of ones. Let's discuss further on these. When we discussed this topic with design team, IIRC @joshblack quickly demonstrated some of his ideas that I thought makes sense to some extent. Wondering if such idea has been incorporated.

While I understand looking at the codebase is sometimes frustrating with miscellaneous lack of expressiveness, I suggest avoiding changes to just improve them for now (or at least making them separate), for the sake of backward-compatibility. Also I suggest making the effort introduction of new (probably clean) APIs (with compatibility layer as necessary), instead of refactoring existing ones. In this way we can make the effort free from our release schedule (e.g. of v10).

Another of my thoughts on naming scheme is that theme is not just for colors IMO. Given the notion of theme involves designers in large extent, let's discuss this with our designers.

@@ -180,10 +180,6 @@
// <button> elements cannot be used as flex containers
button.#{$prefix}--btn {
display: inline-block;

&:disabled > .#{$prefix}--btn__icon {
fill: $ui-04;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were lines here removed by accident...?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional. Moved down to the button-theme--x mixin because it sets color. So when doing an inline theme and calling the button-theme--x mixin, that fill would be updated accordingly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it - Thanks @mattrosno for explaining!

@@ -41,7 +41,7 @@
}
}

@mixin button-theme($bg-color, $border-color, $font-color, $hover-bg-color, $icon-color) {
@mixin button-variant($bg-color, $border-color, $font-color, $hover-bg-color, $icon-color) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mix-in name is considered an API; thus let's not change the stable ones.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If going forward with separate color-only component mixins to be called during inline theme creation, it'd be great to use the component-theme naming convention across all components. E.g. to include two components in a dark inline theme.

@if feature-flag-enabled('components-x') {
  .my-dark-theme {
    @include theme-g90;
    @include button-theme--x;
    @include modal-theme--x;
  }
}

Lack of inline theme support is blocking some adoption, so changing this mixin name could be worth justifying the breaking change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why you seem to think the name here blocks inline theme support - Wondering if you have more background. Probably the topic may connect to your attempt to narrow-scroping "theme" word definition?

src/globals/scss/_theme.scss Show resolved Hide resolved
@@ -56,7 +56,61 @@
$brand-03: #0062ff !default !global;
$active-01: #bebebe !default !global;
$hover-field: #e5e5e5 !default !global;

$carbon--theme-tokens: (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My apologies for not understanding you intent of not using !global here in the meeting. I see that calling this mix-in should override $carbon-theme-tokens variable, instead of letting application code directly define $carbon-theme-tokens for overriding - Please correct me if I'm still misunderstanding here.

One idea here is defining the map for each theme as variables (e.g. $carbon-theme-tokens-white/$carbon-theme-tokens-g10). In this way, we can do a couple of things:

  • Something like @include theme-custom($custom-theme-variables, $carbon-theme-tokens-g10), where the 2nd parameter should default to $carbon-theme-tokens-white
  • Defining $ui-01, etc. (compatibility) variables from the map

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!global is on $carbon--theme-tokens. !default is not. Having !default prevents reassignment during inline theming.

Thanks for your suggestion on unique token map naming per theme. I'll explore that. And defining compatibility variables from the map.

@@ -9,7 +9,7 @@
// Interior Left Nav
//-----------------------------

@import '../../src/globals/scss/vars';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename here is considered a breaking change, e.g. application code, or more for inheriting component library, calling @import 'carbon-components/scss/globals/scss/vars.

Same comment for other file renames - Generally we need to be very careful about changing @import structures. Searching for my Slack message in our internal Slack channel about #1709 provides more details - I had to sent out the message because my acceptance test revealed that it breaks an app.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a better place than developers getting started where we can document our Sass API? Also variable/mixin/function naming conventions. General acceptance criteria to improve commit quality for new (and active) contributors?

Having a location for that in this repo's markdown will also help PR review as we can see documented suggested changes.

Regarding the name change, _vars.scss goes against common convention when looking for where to reference global Sass variables. This file name is least important aspect of this PR. If it needs to stay _vars.scss to minimize breaking changes, 👍.

Regarding redundant @imports, I found and removed and extra theme import in _link.scss.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a better place than developers getting started where we can document our Sass API?

Two places I can think of; SassDoc and README.md files in src. And thank you for understanding my concern on breaking changes! We sometime tend to be inclined to be frustrated to see our Sass code like functions, variables, mix-ins, etc. being used by consumers and finding hard to change them (and I with Sass had more notion of scoping, etc.) even for something like wrong names, but we care about our users - One way we'd tackle this kind of problem is making the module of the old name import the one of the new name, with @warn for deprecation.

@asudoh asudoh requested a review from a team February 15, 2019 04:30
Copy link
Member Author

@mattrosno mattrosno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the review @asudoh. I'll make another pass to address your feedback.

@@ -9,7 +9,7 @@
// Interior Left Nav
//-----------------------------

@import '../../src/globals/scss/vars';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a better place than developers getting started where we can document our Sass API? Also variable/mixin/function naming conventions. General acceptance criteria to improve commit quality for new (and active) contributors?

Having a location for that in this repo's markdown will also help PR review as we can see documented suggested changes.

Regarding the name change, _vars.scss goes against common convention when looking for where to reference global Sass variables. This file name is least important aspect of this PR. If it needs to stay _vars.scss to minimize breaking changes, 👍.

Regarding redundant @imports, I found and removed and extra theme import in _link.scss.

@@ -180,10 +180,6 @@
// <button> elements cannot be used as flex containers
button.#{$prefix}--btn {
display: inline-block;

&:disabled > .#{$prefix}--btn__icon {
fill: $ui-04;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional. Moved down to the button-theme--x mixin because it sets color. So when doing an inline theme and calling the button-theme--x mixin, that fill would be updated accordingly.

@@ -41,7 +41,7 @@
}
}

@mixin button-theme($bg-color, $border-color, $font-color, $hover-bg-color, $icon-color) {
@mixin button-variant($bg-color, $border-color, $font-color, $hover-bg-color, $icon-color) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If going forward with separate color-only component mixins to be called during inline theme creation, it'd be great to use the component-theme naming convention across all components. E.g. to include two components in a dark inline theme.

@if feature-flag-enabled('components-x') {
  .my-dark-theme {
    @include theme-g90;
    @include button-theme--x;
    @include modal-theme--x;
  }
}

Lack of inline theme support is blocking some adoption, so changing this mixin name could be worth justifying the breaking change.

src/globals/scss/_theme.scss Show resolved Hide resolved
@@ -56,7 +56,61 @@
$brand-03: #0062ff !default !global;
$active-01: #bebebe !default !global;
$hover-field: #e5e5e5 !default !global;

$carbon--theme-tokens: (
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!global is on $carbon--theme-tokens. !default is not. Having !default prevents reassignment during inline theming.

Thanks for your suggestion on unique token map naming per theme. I'll explore that. And defining compatibility variables from the map.

@mattrosno
Copy link
Member Author

Another of my thoughts on naming scheme is that theme is not just for colors IMO. Given the notion of theme involves designers in large extent, let's discuss this with our designers.

@asudoh It comes down to support and drawing a circle around how we intend inline theme functionality to work. Trying to keep this contained, regarding tokens and inline theming, it makes a lot of sense to keep this to just colors. And, if we intentionally use more component Sass variables going forward, that sets us up for improved whitelabelling. Whitelabelling is always going to be "do at your own risk / we don't support your whitelabel customizations / but we've made whitelabelling easy and future-friendly for you".

@IBM/carbon-design-system Please chime in if you see future theme variations that we officially support being more than colors. I'm hoping that component modifiers (cozy data table, condensed data table, etc.) will handle variations not related to color, and theming handles color.

@jeanservaas
Copy link
Contributor

wow @mattrosno thank you for all this work!!!!! I wonder if the designers could have a smaller meeting with you to walk through this and figure out a roadmap for some next steps.

Most importantly how do we make this sass map?

Also I know there's an aversion from the language team to calling the background colors "themes" they refer to themes only at the light and dark level... but that's more of a conceptual vs. a practical issue at the moment.

@mattrosno
Copy link
Member Author

@jeanservaas I'd be happy to show this to the design team after we have a better idea of development containment (effort and minimizing breaking changes.)

The Sass maps are just a way to put each set of tokens in a single "variable".

As for design input, it'd be nice to know if any future "theming" concepts or ideas extend beyond colors, as that influences how this is architected.

Copy link
Contributor

@asudoh asudoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattrosno Thank you for giving it your thoughts on my comments! Added some follow-up comments.

It comes down to support and drawing a circle around how we intend inline theme functionality to work. Trying to keep this contained, regarding tokens and inline theming, it makes a lot of sense to keep this to just colors.

Seems that it's more of technical scoping rather than re-defining "theme" word. Would like to more details here - My knee-jerk reaction to above comment is that probably usage of "colors" in variables/functions, etc. would make sense here.

@@ -180,10 +180,6 @@
// <button> elements cannot be used as flex containers
button.#{$prefix}--btn {
display: inline-block;

&:disabled > .#{$prefix}--btn__icon {
fill: $ui-04;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it - Thanks @mattrosno for explaining!

@@ -41,7 +41,7 @@
}
}

@mixin button-theme($bg-color, $border-color, $font-color, $hover-bg-color, $icon-color) {
@mixin button-variant($bg-color, $border-color, $font-color, $hover-bg-color, $icon-color) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why you seem to think the name here blocks inline theme support - Wondering if you have more background. Probably the topic may connect to your attempt to narrow-scroping "theme" word definition?

@@ -9,7 +9,7 @@
// Interior Left Nav
//-----------------------------

@import '../../src/globals/scss/vars';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a better place than developers getting started where we can document our Sass API?

Two places I can think of; SassDoc and README.md files in src. And thank you for understanding my concern on breaking changes! We sometime tend to be inclined to be frustrated to see our Sass code like functions, variables, mix-ins, etc. being used by consumers and finding hard to change them (and I with Sass had more notion of scoping, etc.) even for something like wrong names, but we care about our users - One way we'd tackle this kind of problem is making the module of the old name import the one of the new name, with @warn for deprecation.

@joshblack
Copy link
Contributor

Really like the direction this stuff is heading 💯 I think the only concern would be around theming more than just color, and how extracting color could impact how a contributor authors styles.

@asudoh
Copy link
Contributor

asudoh commented Feb 21, 2019

@mattrosno Can we mark this as superseded by #1872 - Thanks again for the uddate!

@mattrosno mattrosno closed this Feb 21, 2019
joshblack pushed a commit to joshblack/carbon that referenced this pull request May 2, 2019
* refactor(OverflowMenu): use keycode matching util functions

* refactor(OverflowMenuItem): refactor to class component for ref access

* feat(OverflowMenu): add arrow key navigation

* fix(OverflowMenuItem): avoid spreading invalid attributes

* feat(OverflowMenu): focus on first menu item on menu open

* docs(OverflowMenu): avoid redundant prop value

* fix(OverflowMenuItem): disallow tab key navigation

* fix(OverflowMenu): close menu on blur

* docs(OverflowMenu): add additional menu to test keyboard navigation

* fix(OverflowMenu): prevent blur handler is menu is floating
joshblack added a commit that referenced this pull request May 8, 2019
* fix(Storybook): IE11 fix (#1779)

This fix workarounds storybooks/storybook#5080.

*  fix(list-box): Prevent focus on open/close icon (#1772)

* fix(list-box): Prevent focus on open/close icon

* fix(date-picker): Prevent focus on date-picker/input icon

* fix(date-picker): Prevent focus on date-picker/input icon - snap

* fix(a11y): avoid empty label in ToggleSmall (#1771)

Fixes #1183.

* feat(OverflowMenu): add experimental OverflowMenu (#1767)

* docs(OverflowMenu): support `flipped` storybook knob

* chore: bump carbon-components version

* fix(OverflowMenu): pass trigger node and flip prop through FloatingMenu

* docs(FloatingMenu): fix typo

* fix(OverflowMenu): handle click on trigger button div

* fix(MultiSelect): avoid repeated assignment of ids (#1795)

* feat(ContentSwitcher): add experimental ContentSwitcher (#1716)

* docs(ContentSwitcher): use experimental icons

* fix(ContentSwitcher): match vanilla markup

* feat(ContentSwitcher): support `disabled` attribute

* chore: bump carbon-components version

* docs(OrderedList): create component story (#1723)

* fix(TimePicker): update markup to match experimental component (#1747)

* fix(TimePicker): update markup to match experimental component

* docs(TimePicker): fix typo

* chore(lint): ensure lint-staged formats the code (#1803)

* fix(Tile): reorder component markup for a11y (#1774)

* fix(TileGroup): use fieldset element for TileGroup wrapper

* fix(Tile): place label after input control

* test(Tile): account for new React.Fragment wrapper

*  docs(TextInput): expose `defaultValue` prop as Storybook knob (#1808)

* chore: update offline package mirrors

* docs(TextInput): expose `defaultValue` prop as Storybook knob

* docs(components): usage of feature flags (#1794)

* feat(NumberInput): add experimental NumberInput (#1654)

* docs(FormItem): add `hideLabel` prop to storybook example

* feat(NumberInput): align NumberInput markup with vanilla repo

* test(NumberInput): remove form item wrapper check

* Revert "feat(NumberInput): align NumberInput markup with vanilla repo"

This reverts commit 6abb5fcf2a5b2d9a329ce9739fee22628df4e132.

* refactor(NumberInput): set default label value to empty string

* Revert "test(NumberInput): remove form item wrapper check"

This reverts commit c780e6a85231b948db541a119ba2c2a4602f9db9.

* refactor(NumberInput): set default labelText based on feature flag

* fix(NumberInput): match vanilla markup

* fix(NumberInput): match vanilla markup and use caret glyph icons

* refactor(NumberInput): use React fragment syntax

* fix(ui-shell): improve keyboard accessibility (#1813)

* fix(ui-shell): remove aria menu keyhandlers

* fix(ui-shell): remove unused variables

* fix(ui-shell): return focus to menu button on escape

* fix(ui-shell): remove unused variables

* fix(ui-shell): run prettier and update snap shots

* fix(ui-shell): handle keydown enter on nested menuitems  (#1816)

* fix(ui-shell): remove aria menu keyhandlers

* fix(ui-shell): remove unused variables

* fix(ui-shell): return focus to menu button on escape

* fix(ui-shell): remove unused variables

* fix(ui-shell): run prettier and update snap shots

* fix(ui-shell): handle keydown enter on menuitems

* chore(ui-shell): update snapshots

* fix(ui-shell): refactor some event handler logic with Josh

* chore(ui-shell): update snapshots

* docs(OverflowMenu): highlight floatingMenu and primaryFocus (#1812)

* docs(Storybook): more detailed doc for using our Storybook (#1809)

* docs(Storybook): more detailed doc for using our Storybook

* Update docs/components.md

Co-Authored-By: asudoh <asudoh@gmail.com>

* Update README.md

Co-Authored-By: asudoh <asudoh@gmail.com>

* docs(Storybook): minor updates

* fix(tab-content): add prefix to content classname (#1784)

* fix(tab-content): add prefix to content classname

* fix(tabs): remove unnecessary classname

* fix(radiobuttongroup): custom class should merge with base class (#1818)

* feat(ListBoxMenuIcon): support translatable SVG icon title (#1802)

* feat(ListBoxMenuIcon): support translatable SVG icon title

* feat(MultiSelect): pass custom SVG titles to ListBoxMenuIcon

* chore: update snapshot

* refactor(MultiSelect): use callback pattern for assigning SVG title

* chore: update snapshot

* fix(MultiSelect): remove default `translateWithid` prop value

* chore: update snapshot

* feat(PaginationV2): add experimental Pagination (#1800)

* chore: bump carbon-components version

* feat(PaginationV2): add experimental Pagination

* chore: bump carbon-components version

* fix(Pagination): render page range only when page input is enabled

* refactor(Pagination): remove `isLastPage` prop

* refactor(Notification): remove unused props (#1832)

* chore: Update wai-aria on tooltip. resolve #1494 (#1823)

* chore: Update wai-aria on tooltip. resolve #1494

* chore: Updates test.

* chore: reverts triggers to div with button roles.

* AccordionSkeleton: Properties added (#1821)

* refactor(AccordionSkeleton): Converted skeleton from class to functional component

* feat(AccordionSkeleton): Added option to show first item opened or not

* fix(AccordionSkeleton): Number of items differ for first item opened and closed variations

* feat(AccordionSkeleton): Option to set number of items added

* chore: bump webpack-dev-server in example package.json (#1830)

* chore: bump webpack-dev-server in example package.json

* fix: use caret prefix

* Update 'InnerClickListener'  (#1825)

* Update 'InnerClickListener'
- check if event target exists in DOM
- if it does not exist, should not trigger onClickOutside

* Run prettier

* Implemented suggestions fix

* Fix failing tests

* reordering boolean test elements

* Trying different approach for IE fix

* Attempt to fix failing test

* Attempt fix 2 - check if target === body

* Testing simpler version

* Test simpler 2

* fix(InnerClickListener): added test case and reverted to previous fix

* fix(InnerClickListener): Removing outdated comment

*  feat(AccordionItem): add experimental Accordion Item (#1835)

* feat(AccordionItem): add experimental Accordion Item

* test(AccordionItem): Fixes tests for new icon components

* chore(AccordionItem): Use aria label prop

* fix(AccordionItem): Remove role null

* chore(AccordionItem): Remove icon prop

* chore(AccorionItem): Adds role null back into legacy icon

* docs(examples): usage of react-router, resolves #795 (#1797)

* docs(examples): usage of react-router, resolves #795

* docs(examples): address prettier errors

* docs(examples): remove svg

* docs(examples): address review comments and use prebuilt css

* docs(examples): accidentally updated incorrect file

* fix(components): avoid being shown as ForwardRef (#1787)

* fix(components): avoid being shown as ForwardRef

Fixes #1786.

* chore: use ForwardRef(ComponentName)

* chore(components): avoid Object.assign() for ref forwarding components

* Update src/components/Checkbox/Checkbox.js

Co-Authored-By: asudoh <asudoh@gmail.com>

* chore: bring missing React.forwardRef() call back

* chore: bring missing React.forwardRef() call back

* feat(ProgressIndicator): add experimental progress indicator (#1726)

* feat(ProgressIndicator): update SVG icons and match experimental markup

* feat(ProgressIndicator): support experimental overflow tooltip

* fix(ProgressIndicator): avoid passing style prop to nested tooltips

* fix(ProgressIndicator): allow assignment of tooltip ID for each step

* refactor(ProgressIndicator): use render prop for overflow tooltip

* refactor(ProgressIndicator): set default progress step label

* refactor(ProgressIndicator): remove else-returns

* docs(g11n): notes of globalization (#1826)

* docs(g11n): notes of globalization

Refs IBM/carbon-components#1335.

* Update docs/g11n.md

Co-Authored-By: asudoh <asudoh@gmail.com>

* fix(Slider): remove redundant updatePosition() call (#1840)

`updatePosition()` used to be called in `cDM()` for initial
prop->state sync. Given we have got new prop->state sync code in
`v10`, such logic is no longer needed.

Fixes #1839 for `v10`.

* fix(Tabs): re-implement tab-content classname (#1846)

* fix(MultiSelect): fixed translateWithId prop-type, resolves #1847 (#1849)

* feat(Notification): allow composable notification content (#1856)

* Revert "refactor(Notification): remove unused props (#1832)"

This reverts commit c2c6b70585f3f8ef09fb2e9e3cb36f844ffcff99.

* fix(Notification): add experimental icons

* docs(Notification): add prop type comments

* docs(Notification): remove unneeded wrapper divs

* feat(Notification): allow composable notification content

* feat(OverflowMenu): add arrow key navigation (#1822)

* refactor(OverflowMenu): use keycode matching util functions

* refactor(OverflowMenuItem): refactor to class component for ref access

* feat(OverflowMenu): add arrow key navigation

* fix(OverflowMenuItem): avoid spreading invalid attributes

* feat(OverflowMenu): focus on first menu item on menu open

* docs(OverflowMenu): avoid redundant prop value

* fix(OverflowMenuItem): disallow tab key navigation

* fix(OverflowMenu): close menu on blur

* docs(OverflowMenu): add additional menu to test keyboard navigation

* fix(OverflowMenu): prevent blur handler is menu is floating

* feat(DataTable): support radio button selection (#1824)

* refactor(RadioButton): remove deprecated lifecycle methods

* feat(DataTable): support radio button selection

* docs(DataTable): add radio button selection story

* fix(InlineCheckbox): add expected onChange prop

* fix(RadioButton): add expected props and default values

* test(DataTable): add radio button selection tests

* test(DataTable): refactor existing tests to use new helper function

* chore: update snapshots

* refactor(TableSelectRow): dynamically assign tag

* docs: add additional `propTypes`

* fix(ui-shell): add aria label to sidenav with complimentary landmark (#1848)

* fix(a11y): add aria label to complimentary landmark

* fix(jest): update snapshot tests

* fix(ui-shell): remove wrapper aside element

* fix(ui-shell): update snapshots

* fix: remove bitwise operators (#1857)

* fix(NumberInput): add aria attributes for a11y (#1841)

* fix(NumberInput): add aria attributes for a11y

* feat(NumberInput): support translations on arrow control labels

* fix: (<DataTable>): filter without boolean column" (#1858)

* feat(Tabs): allow custom className for `<TabContent>` (#1855)

* fix(modal): uses secondary button on danger modal for componentsX (#1861)

* feat(DataTableSkeleton): add optional headers property (#1862)

* feat(DataTableSkeleton): add optional headers property

* feat(DataTableSkeleton): specify prop-type

* Update issue templates

Adds an accessibility specific issue template to help expedite issue triage and help me stay on top of existing issues.

* fix: run prettier to fix issues with new md (#1872)

* fix(tile): typo in clickable variation knob desc (#1867)

* fix(TableExpandRow): pass headers value to fix a11y violation (#1792)

* fix(TableExpandRow): pass headers value to fix a11y violation

* fix: run prettier on changed files

* docs: add relevant URL into proptypes comments

* chore(Tooltip): deprecate non-click-to-open in regular tooltip (#1873)

* chore(Tooltip): deprecate non-click-to-open in regular tooltip

Fixes #1864.

* Update src/components/Tooltip/Tooltip.js

Co-Authored-By: asudoh <asudoh@gmail.com>

* fix(overflowMenu): include iconProps for CarbonX version (#1881)

* feat(DropdownV2): highlight selected item in drop down (#1869)

* feat: support experimental icon strategy (#1838)

* refactor: support experimental icon strategy

* fix(Notification): remove unneeded boolean check

* chore: avoid default icon import entry point

* fix(Tooltip): ensure debounce function is cleaned-up (#1882)

Fixes #1871.

Note that the feature this fix is applied to has been deprecated.

* docs(experimental): update instruction to change feature flags (#1875)

* docs(build): update instruction on building carbon-coponents style (#1874)

Refs IBM/carbon-components#1754.

* fix(Modal): NPE check for focusable element ref (#1887)

* feat: allow tabs to accept any react node (#1886)

* chore: bump icons dependency (#1884)

* Tooltip with custom icon (#1814)

* feat(Tooltip): custom icon support

* feat(Tooltip): custom icon support

* feat(Tooltip): custom icon support with the renderIcon approach

* feat(Tooltip): custom icon support with forward ref

* feat(Tooltip): custom icon support with forward ref, update @carbon/icons-react

* feat(Tooltip): custom icon support with forward ref, fix typo in tests

* feat(Tooltip): custom icon support, update @carbon/icons-react

* Update src/components/Tooltip/Tooltip.js

Co-Authored-By: devniel <dnielfs@gmail.com>

* feat(Tooltip): custom icon support, add react-is to validated forwardRef components

* feat(Tooltip): custom icon support, add react-is to validated forwardRef components

* feat(Tooltip): custom icon support, add react-is to validate forwardRef components

* feat(datatable): custom classes support for TableSelectAll and TableSelectRow (#1894)

* fix(DropdownV2): uses strict equality operator to know if item is highlighted, resolves #1898 (#1900)

* fix(ToggleSmall): replace `class` prop with `className` (#1902)

* fix(ToggleSmall): replace `class` prop with `className`

* docs(ToggleSmall): remove unused props

* feat(Button): allows button to render arbitrary component as its root (#1891)

* feat(Button): allows button to render arbitrary component as its root

leverages a render prop to allow consumers to render whatever they want in place of button or anchor

closes #1890

* refactor(Button): consolidates code to choose button node type

* fix(Button): fixes props to button and anchor components

* refactor(Button): renames render prop to as

* chore(components): remove deprecated components (#1606)

* chore(components): remove deprecated components

Refs IBM/carbon-components#1501.

* chore(test): move describeBreakingChangesXFeatures() to setup

* chore: some cleanup

* chore: resolve merge conflict

* fix(OverflowMenu): check menu body and click handler event origin (#1903)

* fix(OverflowMenu): check menu body and click handler event origin

* docs(Toolbar): add input props to radio button

* fix(datepickerinput): update logic for displaying icon for carbonX (#1906)

* docs(Button): add example with custom link component as root (#1910)

* docs(Button): remove hard-coded type prop

* docs(Button): add example with custom link component as root

* fix(Checkbox): ensure indeterminate DOM property is set (#1788)

Fixes #1785.

* feat(MultiSelect): add open prop (#1793)

* feat(MultiSelect): add isOpen prop

* feat(MultiSelect): add state handling for open prop

* fix(MultiSelect): test update

* chore(Storybook): add knob for danger in ModalWrapper (#1914)

Fixes #640.

* fix(Toggle): hide on/off test for screen readers (#1865)

* fix(Toggle): hide on/off test for screen readers

Refs IBM/carbon-components#1794.

* fix(Toggle): replace fieldset/legend with div

* chore(Toggle): turn to class and use setupGetInstanceId

* chore(tag): fix class name (#1928)

* chore: bump `carbon-components` version (#1950)

* chore(dependencies): upgrade carbon-components (#1962)

Fixes IBM/carbon-components#1964.

* fix(DatePicker): fix tabbing through in range mode (#1957)

* fix(DatePicker): fix tabbing through in range mode

Refs #1899.

* chore(build): update size threshold

* feat(components): support custom icon renderer (#1908)

* feat(components): support custom icon renderer

Fixes #1750, #1749.

* chore(Button): change code style of the story

* fix: get rid of console error from using ref on SFC (#1969)

* fix: get rid of console error from using ref on SFC

* fix(ui-shell): add displayName for ui-shell link

* feat(components): support forwardRef for button and stateful (#1859)

* feat(components): support forwardRef for button and stateful

Refs #1191, #1777.

* chore(components): s/forwardRef/innerRef/g

* fix(MultiSelect): remove item autosort behavior (#1926)

* fix(ProgressIndicator): fix wrong prop (#1922)

* fix(OverflowMenu): assign menu body ref for non-floating menu (#1920)

* fix(Tooltip): assign correct classes (#1917)

* fix(toggle): add checkmark icon for v10 mini toggle (#1936)

* fix(number-input): use required prop `iconDescription` in CarbonX icons (#1975)

* fix(number-input): use required prop `iconDescription` in CarbonX icons

* fix(number-input): use deconstruction

* fix(number-input): apply aria-label to up-icon per PR feedback

Co-Authored-By: jendowns <hello@jendowns.com>

* fix(number-input): apply aria-label to down-icon per PR feedback

Co-Authored-By: jendowns <hello@jendowns.com>

* chore: prettier change

* docs(components): introduce misc migration guides (#1959)

Refs #1759.

* Deprecate non floating overflow menu (#1961)

* chore(OverflowMenu): deprecate non-floating option

Fixes #1921.

* docs(OverflowMenu): add migration guide

* feat(multi-select): address accessibility tabbing issue (#1731)

* Added keydown to open, fixed a11y tabbing issue

* Linting

* Addressed reviews

* fixup

* linting

* added test coverage for list-box

* ran prettier

* feat(RadioButton): support labelPosition prop (#1930)

* feat(RadioButton): support labelPosition prop

Fixes #1913.

* chore(RadioButton): code format change

* chore(RadioButton): deprecate/remove top/bottom option

* fix(DropdownV2): expect string or object for `selectedItem` prop (#1946)

* feat(footer): deprecate for v10 (#1960)

Fixes #1956.

* feat(Notification): remove for v10 (#1978)

Superseded by `<InlineNotification>` and `<ToastNotification>`.

Fixes #1958.

* feat(FloatingMenu): support refs (#1988)

Fixes #1778.

* docs(components): introduce migration guides for renderIcon and ref props (#1976)

* docs(components): introduce migration guides for renderIcon and ref props

Refs #1759.

* test(DataTable): test tweaks

* docs(RadioButton): formatting fix

* [Feat] Add ability to render item other than string for HeaderMenu (#1980)

* feat: add ability for component to render any content instead of a string

* chore: update snapshot for change in HeaderMenu

* test: adding test for HeaderMenu

* test: add test for content prop

* feat: remove dropdown chevron when content is rendered

* refactor: changed to function component based on code review

* refactor: name change from code review

* chore(OverflowMenuItem): warn missing closeMenu prop (#1955)

Fixes #1951.

* docs(migrate): add migration docs and update README (#1993)

* docs(migrate): add migration docs and update README

* Update docs/migration/README.md

Co-Authored-By: joshblack <josh@josh.black>

* Update docs/migration/migrate-to-10.x.md

Co-Authored-By: joshblack <josh@josh.black>

* Update docs/migration/migrate-to-10.x.md

Co-Authored-By: joshblack <josh@josh.black>

* Update docs/migration/migrate-to-10.x.md

Co-Authored-By: joshblack <josh@josh.black>

* Update docs/migration/migrate-to-10.x.md

Co-Authored-By: joshblack <josh@josh.black>

* Update docs/migration/migrate-to-10.x.md

Co-Authored-By: joshblack <josh@josh.black>

* Update docs/migration/migrate-to-10.x.md

Co-Authored-By: joshblack <josh@josh.black>

* Update docs/migration/migrate-to-10.x.md

Co-Authored-By: joshblack <josh@josh.black>

* chore(lint): Add no-typos for react linting (#2000)

* fix: Add titles to buttons that encapsulate icons (#1982)

* fix: Add titles to buttons that encapsulate icons

* fix: update snapshots

* feat: add missing title tags to icon buttons

* fix: update snapshots

* fix(DatePicker): fix month input appearance (#2004)

By incorporating  IBM/carbon-components#1977.

Fixes #2001.

* chore(components): simplify react node tree structure (#1997)

Such optimization is done for stateless components with
`React.forwardRef()`, optimizing the React node tree from:

```
<ForwardRef(TextInput) ...>
  <TextInput ...>...</TextInput>
</ForwardRef(TextInput)>
```

To:

```
<ForwardRef(TextInput) ...>...</ForwardRef(TextInput)>
```

Refs #1768.

* fix(DatePicker): match experimental spec (#1966)

* fix(DatePicker): use new SVG icon markup

* fix(DatePicker): use correct flatpickr config option

* fix(DatePickerInput): match experimental markup

* chore: update carbon-components

* docs(migrate): update README.md (#1998)

* feat(NumberInput): add experimental mobile variant (#1983)

* feat(NumberInput): add experimental mobile variant

* chore: bump carbon-components version

* chore: bump dependencies

* fix(NumberInput): reorder default legacy props for icon description

* style(NumberInput): rename prop

* chore: bump carbon-components version

* style(NumberInput): rename prop type

* chore: bump carbon-components version

* chore(components): update required polyfills (#1938)

* chore(components): update required polyfills

Fixes #1934.
Fixes #1517.

* docs(migration): add polyfills to root migration doc

* fix(TextInput): match text input to experimental spec (#1990)

* chore: bump dependencies

* fix(TextInput): add disabled classes

* chore: bump carbon-components version

* fix(TextInput): add invalid class for input field

* chore(search): search audit (#2005)

* chore(package): update carbon-components

* chore(search): remove lg search and add xl

* chore(search): update icon

* chore(search): add aria label

* chore(search): update tests

* chore(search): remove default value to none

* chore(search): guard against breaking changes

* fix(OverflowMenu): match experimental spec (#2007)

* chore: bump carbon-components version

* fix(OverflowMenu): properly align menu item icons

* chore: bump carbon-components version

* docs(OverflowMenu): refactor example menus

* chore: bump carbon-components version

* feat(ProgressIndicator): add optional interactivity (#1945)

* fix(DatePicker): protect flatpickr in shallow render tests

* fix(DatePicker): add comment to describe the Null check

* fix(DatePicker): protect callbacks against this.cal NPE

* test(DatePicker): add testcase to cover shallow behavior

* feat(progressindicator): add interactivity if onChange prop is passed

* fix(progressindicator): few small style fixes to the focus outline

* fix(progress): support experimental mode

* fix(progress): typoed the key to check, fix proptypes errors

* fix(progress): current step should not be interactive

* fix(progress): added reference to the new styles and additional tests

* chore(package): update peer dep to latest carbon

* fix(progressindicator): remove unnecessary index check

* ContentSwitcher react, audit fixes (#2038)

* chore(content-switcher): remove icon support

* chore(content-switcher): set icon and a/href for v9 only

* chore(content-switcher): update to new carbon-components

* feat(Link): add disabled prop (#2024)

* feat(Link): add disabled prop

* docs(Link): add disabled knob

* chore(components): support SVG title attribute for icon description (#1977)

* chore(components): support SVG title attribute for icon description

Refs #1750.

* test(components): adjust tests with the new DOM structure

* chore(components): moving away from alt for icons

* chore(Tooltip): use correct prop for title

* chore(components): revert ones with surrounding button

* test(components): test fixes

* fix(Notification): match experimental spec (#2020)

* chore: upgrade @carbon/icons-react

* fix(Notification): render toast icons

* feat(Notification): support iconDescription

* Revert "chore: upgrade @carbon/icons-react"

This reverts commit 78fa3f8d4867056e7a1e750e22c9e403025d76d4.

* chore: bump @carbon/icons-react version

* chore: update snapshots

* refactor(Notification): account for modified React node tree

* fix(Notification): expect proper SVG asset

* chore: bump carbon-elements version

* chore: bump carbon-components version

* chore(Button): remove danger--primary from v10 demo (#2044)

* chore(Button): remove danger--primary from v10 demo

Refs #2027.

* docs(Button): update migration guide

* fix(Slider): add proper support for disabled state (#2034)

* docs(components): add process to migration document (#2049)

- fix component typo
- add additional Icon migration instruction

* fix(Select): match experimental spec (#2030)

* fix(Select): match experimental spec

* fix(Select): add legacy helper text

* chore: bump carbon-components version

* chore: bump carbon-components version

* fix(Select): backport support for v9 inline helper

* fix(Tooltip): support click-to-open with no-icon scenario (#2047)

Fixes #2046.

* chore: bump carbon-components version (#2060)

* feat(data-table): add renderIcon to TableBatchAction (#2056)

* Audit: Pagination fixes (react) (#2057)

* chore(pagination): screen reader UX fixes

* chore(pagination): hide label

* test(components): support v10 code (#2031)

* test(components): support v10 code

Fixes #2032.

* chore(test): mac support

* chore(test): use setup file instead of sed

* test(components): update tests upon latest commits

* chore: Yarn updates

* fix(Select): add aria-label back on chevron

* Fix tooltip a11y issue (#2065)

* https://github.com/IBM/carbon-components-react/issues/2063

https://github.com/IBM/carbon-components-react/issues/2063

* remove the space

* fix(TextArea): match experimental spec (#2036)

* fix(TextArea): add disabled class to label

* fix(Textarea): match experimental spec

* fix(TextArea): add disabled class to input

* chore: bump carbon-components version

* chore: bump carbon-components version

* chore: bump carbon-components version

* feat(breadcrumb): add support for current page (#2054)

* feat(breadcrumb): add support for current page

* chore(breadcrumb): add new prop types behind feature flag

* chore(breadcrumb): update imports in storybook

* Update Breadcrumb-story.js

* fix(Button): add disabled state for other nodes (#2067)

* fix(Button): add disabled state for other nodes

* chore: bump carbon-components version

* docs(Button): incorporate button set wrapper

* chore(code-snippet): add margin to seperate skeletons (#2075)

* chore(code-snippet): add margin to seperate skeletons

* chore(code-snippet): remove px

* chore(code-snippet): fix label

* chore(tabs): add padding in tabs to content story (#2077)

* fix: deprecate the appendTo prop in date picker (#2062)

* fix: deprecate the appendTo prop in date picker

* fix: Add deprecation warning

* fix: typos in warning

* fix(progress-indicator): remove ternary for null label, update story name (#2073)

* Pagination screen reader tweak (#2069)

* chore(pagination): screen reader UX fixes

* chore(pagination): hide label

* chore(pagination): screen reader label tweak

* chore(pagination): re-implement stuff. set story and default props better

* fix(progressIndicatorSkeleton): Update html to fix styling (#2084)

* fix: update skeleton svg for progress indicator

* chore: update html

* refactor(Slider): replace Carbon TextInput (#2085)

* docs(storybook): add rtl addon (#2092)

* docs: add rtl addon

* fix: add offline files

* fix: add more offline files

* feat(DataTable): Add sorting params to header onClick callback (#2083)

* feat(DataTable): Add sorting params to header onClick callback

* chore(build): update size threshold

* fix(progressIndicatorSkeleton): Update html to fix styling (#2084)

* fix: update skeleton svg for progress indicator

* chore: update html

* refactor(Slider): replace Carbon TextInput (#2085)

* feat(DataTable): Add sorting params to header onClick callback

* fix(SkeletonText): support SSR (#2095)

* fix(SkeletonText): support SSR

Fixes #2013.

* chore: update bundle size threshold

* Update issue templates

Removing myself from being auto assigned. Carbonated auto-ping-bot incoming!

* chore(format): run prettier (#2099)

* docs(7.x): update docs to reference v7 instead of v10 (#2100)

* docs(7.x): update docs to reference v7 instead of v10

* Update migrate-to-7.x.md

* chore(DataTable): update exports test

* docs(migration): misc updates (#2105)

* docs(migration): misc updates

Refs #2100.

* docs(components): migration guides to more components

* feat(Icon): deprecate name prop (#2104)

Refs #2100.

Aligns the actual behavior to that doc update.

* fix(DropdownV2): match experimental spec (#2093)

* docs(DropdownV2): add invalid knob

* chore: bump carbon-components version

* fix(ListBox): add v10 listbox classes

* fix(DropdownV2): add disabled form and v10 classes

* refactor(ListBox): deprecate `type` prop

* feat(DropdownV2): integrate v10 listbox

* test: update snapshots and inline variant test

* Revert "refactor(ListBox): deprecate `type` prop"

This reverts commit 642c01ac3cef2970e0d1fc8c9b88e343db9db0a3.

* Revert "test: update snapshots and inline variant test"

This reverts commit d98db03c3a11cd3b746e97e3ccc44a846d2f676d.

* docs(ListBox): add propType

* fix(Dropdown): use listbox light and invalid style

* docs(DropdownV2): change options list placeholder

* fix(Dropdown): remove breaking changes flag

* test: update snapshots

* chore: bump carbon-components version

* chore: bump carbon-components version

* chore: bump carbon-components version

* chore: bump carbon-components version

* fix(ListBoxMenuItem): add conditional for v10

* fix(DropdownV2): add disabled class

* fix(DropdownV2): add light class

* chore: update snapshots

* refactor(ListBoxMenuItem): remove unneeded attrs

* chore: bump carbon-components version

* refactor(DropdownV2): remove wrapper from v9

* chore: update snapshot

* feat(modal): make modal a focus trap (#2096)

* fix(modal): add focus-trap-react package

* fix(modal): make modal a focus trap

* chore(modal): update snapshots

* fix(modal): move focus trap to outer-inner modal

* fix(modal): remove focusButton, onBlur, onTransitionEnd

* fix(modal): add asudoh suggested changes

* fix(modal): reverting changes

* chore(modal): update snapshot

* fix(modal): get tests passing

* fix(modal): add check for open modal

* chore(modal): update snapshot

* chore(pagination): use en dash instead of hyphen (#2115)

* chore(pagination): use en dash instead of hyphen

* chore(pagination): update test with en dashes in expected content

* chore(pagination): more en dash

* chore(pagination): more en dash

* docs(Search): make input value editable (#2121)

* docs(Search): expose defaultValue instead of value

* chore(Search): update prop types

* feat(project): release v10 (#2089)

* feat(project): update dependencies and feature flags

* chore(project): sync offline mirror

* chore(project): update dependencies

* chore(examples): prevent duplicate module name

* chore(project): update snapshots

* test: add exports test

* feat(table): remove old table exports

BREAKING CHANGE: TableData and TableRowExpanded have been removed.

* feat(tooltip-simple): remove TooltipSimple

BREAKING CHANGE: The TooltipSimple component has been removed.

* feat(DropdownV2): move DropdownV2 to Dropdown

BREAKING CHANGE: DropdownItem removed, DropdownV2 is now Dropdown

* fix(Dropdown): remove reference to DropdownItem

* chore(format): run prettier

* Revert "fix(Dropdown): remove reference to DropdownItem"

This reverts commit 920a1607ea7e38bfaa53dc993acaf5b9ef0ef829.

* Revert "feat(DropdownV2): move DropdownV2 to Dropdown"

This reverts commit 4cdbadc05ab1c71955238a1793e04f3653b89aba.

* feat(dropdown): rename DropdownV2 to Dropdown

BREAKING CHANGE: Dropdown now points to DropdownV2

* feat(components): remove Footer component

BREAKING CHANGE: the Footer component has been removed

* feat(pagination): rename PaginationV2 to Pagination

BREAKING CHANGE: Pagination now points to PaginationV2

* chore(storybook): remove experimental preview

* feat(icon): remove name prop

BREAKING CHANGE: the name prop for Icon has been removed

* chore(package): v10.0.0-rc.0

* chore(package): update carbon-components to 10.0.0-rc.0

* chore(project): fix license in package.json

* Revert "feat(icon): remove name prop"

This reverts commit 752c6fc099270436fb999b669ae854b3dda07b99.

* chore(storybook): invert feature flags

* chore(storybook): fix icon story errors and knob options (#2)

* chore(ModalWrapper): update snapshot

* chore(ci): remove semantic-release

* chore(project): update carbon-components to v10

* chore(ci): temporarily disable storybook publish step (#2122)

* chore(ci): temporarily disable storybook publish step

* chore(project): sync offline mirror

* feat(project): update to v7.0.0 (#2123)

* chore(pagination): remove unused stuff (#2129)

* fix: apply correct aria label prop for radio (#2079)

* chore: apply correct aria label prop for radio

* feat: add hideLabel to RadioButton

* fix(TextInput): add invalid attr on wrapper div (#2134)

* docs(ModalWrapper): use unique radio button values (#2144)

* chore(build): upgrade rollup (#2156)

* fix: add disabled label styles (#2159)

* fix(DatePickerInput): add disabled label styles

* fix(TimePicker): add disabled label styles

* chore(test): upgrade Jest/Enzyme (#2157)

* fix(Modal): fix NPE at onTransitionEnd (#2141)

Caused by `onTransitionEnd` on a child element in modal, presumably
when modal node ref hasn't been ready yet.

Fixes #2140.

* Update migrate-to-7.x.md (#2132)

* Update migrate-to-7.x.md

* fix: prettier

* FEAT(SideNav): Side nav focus state (#2150)

* feat(sidenav): add ability to change default expanded state

* feat(sidenav): add focus class to sidenav when a child holds focus

* refactor(sidenav): conditionally use expand class instead of adding new focus one

* refactor(sidenav): added gDSFP as suggested from code review

* refactor(sidenav): removed changes from PR #2146

* refactor(sidenav): add state check in handleBlur

* chore(build): upgrade Yarn (#2154)

And a change to ensure a specific version of Yarn runs.

* chore(lint): introduce commitlint (#2155)

Also introduces 50/72 rule.

* chore(lint): upgrade prettier (#2153)

* fix(DataTable): update data-table styles and add description prop (#2127)

* feat: update data-table styles and add description prop

* fix: update snapshots

* chore: remove old icons

* chore: update snapshots

* feat: Add expansion and sorting functionality

* test: update snapshots and tests

* docs: update default table to be sortable

* feat: add class to parent/sibling on hover

* test: update snapshots

* fix: update sort prop to match header

* fix: use previousElementSibling and combine event handlers

* fix: don't use toggle

* FEAT(SideNav):  add ability to change default expanded state (#2146)

* feat(sidenav): add ability to change default expanded state

* refactor(sidenav): add gDSFP to sidenav component

* chore(sidenav): updated snapshots

* refactor(sidenav): rename prop

* test(sidenav): add additional test

* refactor(sidenav): changed name of state

* Adds README.md for MultiSelect component (#2139)

* docs(MultiSelect): adds README.md that describes use cases

* feat(MultiSelect): adds withReadme on stories.

* would to will

* updates readme

* corrects grammar

* adds you

* removes itemToSting that was not neede

* docs(MultiSelect): prettier

* docs(migration): remove unreleased block (#2176)

* fix(multi-select): introduce translateWithId (#2175)

Fixes #2162.

* feat(OverflowMenu): add menuOptionsClass to overflowMenu (#2174)

* feat: add menuOptionsClass to overflowMenu

* refactor: use the destructured prop

* fix(TimePicker): add carbon text input classes (#2169)

* fix(modal): set initial focus and conditionally render focus trap (#2163)

* fix(Modal): get focus behavior in sync with/without focus-trap

* fix(modal): remove unused focus-trap, createFocusTrap

* chore(modal): update snapshots

* v7.0.1 (#2190)

## [7.0.1](https://github.com/IBM/carbon-components-react/compare/v7.0.0...v7.0.1) (2019-04-10)


### Bug Fixes

* add disabled label styles ([#2159](https://github.com/IBM/carbon-components-react/issues/2159)) ([fe9fd41](https://github.com/IBM/carbon-components-react/commit/fe9fd41))
* apply correct aria label prop for radio ([#2079](https://github.com/IBM/carbon-components-react/issues/2079)) ([1fb7214](https://github.com/IBM/carbon-components-react/commit/1fb7214))
* **DataTable:** update data-table styles and add description prop ([#2127](https://github.com/IBM/carbon-components-react/issues/2127)) ([4196a39](https://github.com/IBM/carbon-components-react/commit/4196a39))
* **Modal:** fix NPE at onTransitionEnd ([#2141](https://github.com/IBM/carbon-components-react/issues/2141)) ([09c248a](https://github.com/IBM/carbon-components-react/commit/09c248a)), closes [#2140](https://github.com/IBM/carbon-components-react/issues/2140)
* **multi-select:** introduce translateWithId ([#2175](https://github.com/IBM/carbon-components-react/issues/2175)) ([e769f33](https://github.com/IBM/carbon-components-react/commit/e769f33)), closes [#2162](https://github.com/IBM/carbon-components-react/issues/2162)
* **TextInput:** add invalid attr on wrapper div ([#2134](https://github.com/IBM/carbon-components-react/issues/2134)) ([bbbcff8](https://github.com/IBM/carbon-components-react/commit/bbbcff8))

* docs: update codepen example (#2186)

* fix: delete build folders (#2202)

* v7.1.0 (#2203)

* fix(DataTableSkeleton): headers prop can now be array of objects to match DataTable (#2181)

* fix(data-table-skel): headers can be array of objs

* fix(data-table-skel): pr feedback

* fix: use new classnames (#2200)

* fix(content-switcher): update markup to match v10 changes (#2209)

* chore(ci): re-enable storybook, remove experimental (#2199)

* fix(tooltip): handle esc keydown event (#2164)

* fix(tooltip): handle esc keydown event

* chore(tooltip): update snapshots

* chore(tooltip): update snapshots

* fix(tooltip): add keys.js module

* fix(tooltip): add event.code object to key.js

* chore(package): remove bowser dependency (#2213)

* chore(project): update eslint to 5.16.0 (#2214)

* refactor: update SideNav state management (#2208)

* refactor: update SideNav state management

* test: update snapshots

* test: update snapshots and tests

* refactor: change listener API, pass dom event

* test: update snapshots

* fix: handleToggle arguments

* refactor: use strict undefined check for control

* docs(migration): add block to refer to Carbon X (#2210)

* chore(project): add clean task (#2215)

* chore(project): add clean task

* chore(yarn): sync yarn.lock file

* chore(rollup): update rollup and config (#2216)

* chore(rollup): update rollup and config

* Update rollup.config.js

* Update package.json

* chore(build): change main field reading order

* feat(project): update React and dependencies to 16.8.6 (#2212)

* fix(Modal): adds text to modalAriaLabel on story. (#2217)

* chore(project): update babel deps, remove unused plugins (#2211)

* chore(project): update babel deps, remove unused plugins

* chore(project): sync offline mirror

* chore(storybook): update babel config to read from package.json

* chore: update carbon-components for storybook (#2221)

Brings in new styles and updates for data table work

* fix(ComboBox): match experimental spec (#2158)

* feat(ComboBox): add title and helper text support

* feat(ComboBox): support invalid state

* docs(ComboBox): add knob for light variant

* refactor(ComboBox): match vanilla invalid state

* fix(ListBox): pass aria label and role into menu

* fix(ListBoxMenuIcon): add `role="button"`

* fix(ListBox): require id for listbox menus

* fix(ListBox): add aria attrs for listbox inputs

* fix(ComboBox): pass `isOpen` to `<ListBox>`

* fix(ListBoxField): set default negative tabindex

* fix(ListBox): remove tabindex on wrapper div

* test(ListBox): remove outdated tests

* test(ListBoxField): test modifiable tabindex prop

* chore: update snapshots

* docs: add `ariaLabel` propType

* test: pass in example IDs

* docs(ListBox): remove unused propType

* fix(Dropdown): remove unneeded ListBox prop

* chore: update snapshots

* fix: add IDs for Dropdown and Multiselect control

* chore: update snapshots

* fix(Dropdown): make listbox field tabbable

* fix(MultiSelect): make listbox field tabbable

* fix(FilterableMultiSelect): remove unused prop

* chore: update snapshots

* chore: bump carbon-components version

* feat(Toggle and ToggleSmall): on Enter key press toggle action is being triggered. (#2219)

* fix(Toggle): adds event for key.wich===13

* fix(ToggleSmall): adds event for key.wich===13

* fix(Toggle): adds helpers for keypress

* fix: adds helpers for keypress

* fix: adds actions

* fix(Icon): removes description default value (#2235)

* fix(Icon): no alt in svg (#2243)

* chore(commitlint): disable scope-case (#2225)

We are historycally using React component name for scope when we change
React component.

* fix(Tabs): avoid stale tab ref cache (#2224)

The problem happens when `selected` and `children` changes at the same
time.

Fixes #2204.

* fix(Loading): adds aria-label and description property to component (#2252)

* fix: adds property description

* fix: adds description property to aria-label

* fix: typo

* fix: typo

* fix(Modal): fix button type in danger mode (#2254)

* fix(Modal): fix button type in danger mode

Fixes #2249.

* test(Modal): update for danger button

* fix(notification): adds aria-label to button (#2255)

* fix(notification): adds aria-label to button

* fix(notification): remove test label

* fix(accordion): remove role=presentation (#2256)

* fix(code-snippet): add screen reader accessibility improvements (#2165)

* fix(code-snippet): add alert role to copy verification

* fix(code-snippet): add aria-describedby, aria-labelledby to inline snippet

* fix(code-snippet): add unique id to aria-describedby

* fix(code-snippet): remove breaking change

* fix(codesnippet): preserve ariaLabel

* fix(InputField) -  adds aria-label property on `input` element (#2262)

* fix: adds property ariaLabel

* fix: adds ariaLabel into the label of the inout

* fix: typo

* fix: adds aria-label on input and not on label

* feat: Table toolbar v10 (#2247)

* chore: update carbon-components for storybook

* feat: add initial toolbar updates

* fix: default props

* test: update snapshots

* test: update tests

* test: fix tests

* test: update snapshots

* chore: update peer deps

* feat: add new modifiers, update stories, add knobs

This commit adds all of the new modifiers and removes the unusued ones.
All of the datatable stories have been updated to reflect new markup
and to expose knobs to adjust shared modifiers.

The dynamic content story was updated to use the new menu system. This
also adds support for styles that have not been added yet (row size).

* test: update snapshots

* test: update snapshots

* fix: update proptypes and use cx lib

* test: update snapshots

* fix: add sortable prop and update snaps

* chore: refine story responsibilities

This updates the stories so that they only use the feature they are
showcasing. This will prevent users from bringing in DataTable features
that they don't need.

A "kitchen sink" data table might be useful as well.

* fix: add a11y updates

* test: fix tests

* Update src/components/DataTable/TableToolbar.js

Co-Authored-By: vpicone <vpicone@gmail.com>

* fix: remove tab index

Received the following linting error when attempting to define tabindex
on the section component:

`tabIndex` should only be declared on interactive
elements.eslint(jsx-a11y/no-noninteractive-tabindex)

* test: update snapshots

* fix(Tooltip): adds esc listener (#2248)

* fix: adds esc listener

* fix: adds open

* fix: clean listener on unmount

* chore: add test for 2209 (#2218)

* fix(Tooltop): a11y improvements (#2245)

* fix(Icon): no alt in svg

* fix(Tooltip): ✅ removes IconTitle

* fix(Tooltip): ✅ removes aria-owns - should not used in tooltip pattern

* fix(Tooltip): ✅ adds sensible default aria-label. "Help" not "tooltip"

* fix(Tooltip): ✅ aria-labels are now set on the Icon only and not in the div

if the user provides property `triggerText`, then the button should use aria-labelledby to point to its id, if the user doesn't provide property `triggerText`, then they need to provide an aria-label via the `iconDescription` property.

* fix(Tooltip): ✅ aria-labels

* fix: FinalIcon is now shown when Icon is there

* fix: rearanges

* fix: refs cannot be passed into func components

* fix: adds proptypes validation using helpers

* fix: ref a propRef

* fix(Tab): add missing disabled prop (#2234)

Refs #1293.

* fix(pagination): add noLabel prop to Select (#2260)

* fix(pagination): add noLabel prop to Select

* fix(pagination): preserve hideLabel

* fix(pagination): add noLabel use comment

* fix(pagination): add proptypes

* docs(DataTable): Update documentation for DataTable expansion (#2276)

- Update to reflect that no `TableCell` should be a child of `TableExpandedRow`
- Update to add `colSpan` property to the `TableExpandedRow` element

* fix(tooltip): remove aria-owns (#2273)

* chore(components): better name with forwardRef (#2281)

This change updates React component name for various forward-ref'ed
components from just `<ForwardRef>` to  something like
`<ForwardRef(TextInput)>`.

Refs #1768.

* fix(Pagination): pageInputDisabled won't disable buttons (#2264) (#2278)

* feat: update SideNav and Menu (#2294)

- Use new PropTypes.elementType to allow for `Link`
- Make menu icons optional

* v7.2.0 (#2296)

* Multi select v9 selection behaviour (#2090)

* feat(MultiSelect): Selected items will not move to top

* feat(MultiSelect): Selected items move to top after reopening dropdown

* chore: update snapshots

* Add stalebot. Update exemptions after it runs once (#2289)

* feat(Tabs): support custom tab content (#2142)

Fixes #2028.

* fix(OverflowMenu): cleanup timeout upon unmount (#2259)

Fixes #2114.

* fix(DataTable): selection fix (#2271)

* fix(DataTable): selection fix

* fix(DataTable): updating snapshots for tests

* refactor(DataTable): keeping the same keys

* refactor(DataTable): updated optional proptypes

* docs(DataTable): storybook + README

* fix(ComboBox): prevent open upon clear (#2257)

Fixes #1984.

* fix(MultiSelect): apply tWI to selection (#2268)

Fixes #2267.

* docs(Modal): update prop type comment (#2275)

Closes #2272.

* fix(NumberInput): avoid validation for space (#2280)

Fixes #2106

* docs(Pagination): fix typo (#2284)

* docs(Toggle): expose `disabled` knob (#2285)

* chore(components): remove v9 code (#2269)

* chore(components): remove v9 code

Refs IBM/carbon-components#2308.

* chore(DatePickerInput): remove fragment

* fix(Dropdown): pass translationWithId through (#2298)

* fix: add TableToolbarMenu to default exports (#2301)

* fix: add TableToolbarMenu to default exports

* test: update snapshots

* chore(readme): fix broken ci status badge photo (#2305)

* chore(SideNav): align icon API to other components (#2306)

Fixes #2008.

* fix(Modal): accept nodes to heading (#2303)

Fixes carbon-design-system/carbon-components#629.

* chore(components): complete removing icon prop (#2302)

Refs carbon-design-system/carbon-components#2308.

* fix(tile): various DAP fixes (#2258)

* fix(tile): move aria-label, use unique ids

* fix(tile): re-add aria-label to chevron

* fix(tile): add unique id

* fix(tile): move uid call into creation

* fix(tile): merge master and add ID prop

* Update src/components/Tile/Tile.js

Co-Authored-By: dakahn <40970507+dakahn@users.noreply.github.com>

* Update src/components/Tile/Tile.js

Co-Authored-By: dakahn <40970507+dakahn@users.noreply.github.com>

* Update src/components/Tile/Tile.js

Co-Authored-By: dakahn <40970507+dakahn@users.noreply.github.com>

* Update src/components/Tile/Tile.js

Co-Authored-By: dakahn <40970507+dakahn@users.noreply.github.com>

* fix(overflow-menu): remove add from menu (#2309)

* Update stale.yml (#2310)

Changing the label of stale bot issue closers to `inactive` from `wontfix`

* fix(modal): screen reader improvements (#2299)

* fix(modal): change title add proper headings

* chore(modal): update snaps

* chore(modal): update snapshot

* fix(modal): add back the title attr

* chore(modal): update snapshots

* feat(MultiSelect): match experimental spec (#2239)

* chore(Storybook): remove RTL plugin (#2316)

This change removes RTL plugin of Storybook. Though it's a nice add-on,
we require an additional build step to generate RTL version of CSS and
that Storybook add-on does not seem to kick off an altern ate build.

Refs #2053.
Refs #2314.
Refs #2286.

* feat(TextInput): add password visibility toggle for text fields (#2323)

* docs(TextInput): describe PropTypes

* chore: update carbon peer dependencies

* docs(TextInput): modify `type` storybook knob

* feat(TextInput): add password visibility toggle

* docs(TextInput): add `text` option to storybook types knob

* test(TextInput): test password visibility toggle TextInput

* refactor(TextInput): create PasswordInput component

* feat(PasswordInput): allow custom `alt` text attribute

* refactor(PasswordInput): pull out shared function

* feat(PasswordInput): display tooltip text on hover of visibility toggle

* feat: add ControlledPasswordInput component

* feat(ControlledPasswordInput): set default `type` prop value

* test(TextInput): add tests for PasswordInput and ControlledPasswordInput

* feat(PasswordInput): allow custom password visibility toggle alt text

* fix(PasswordInput): export named password input components

* docs(TextInput): refactor story for storybook v4

* fix(PasswordInput): match experimental spec

* fix(PasswordInput): rename attribute

* test(TextInput): checkout test from master

* test(TextInput): fix console warning

* feat(ControlledPasswordInput): match v10 spec

* test(PasswordInput): rename suite

* test(ControlledPasswordInput): add test suite

* fix(TextInput): add data-invalid attribute for v10

* refactor: remove v9 code

* chore: sync forwardRef changes

* chore: update lockfile

* docs: revert comment changes

* docs: space between propTypes

* chore(react): sync offline mirror

* chore(components): sync docs to local folder

* docs(github): update to include question for package

* chore(ci): update CI config and steps for lint-staged

* chore(project): sync yarn.lock

* chore(project): sync offline mirror

* chore(react): update storybook dependency

* chore(react): update dev env to use source path

* chore(project): update commitlint settings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants