diff --git a/packages/core/src/common/classes.ts b/packages/core/src/common/classes.ts index 6f43ecce5d..2d373489f0 100644 --- a/packages/core/src/common/classes.ts +++ b/packages/core/src/common/classes.ts @@ -44,6 +44,9 @@ export const COLLAPSIBLE_LIST = "pt-collapse-list"; export const CONTEXT_MENU = "pt-context-menu"; export const CONTEXT_MENU_POPOVER_TARGET = "pt-context-menu-popover-target"; +export const CONTROL = "pt-control"; +export const CONTROL_INDICATOR = "pt-control-indicator"; + export const DIALOG = "pt-dialog"; export const DIALOG_BODY = "pt-dialog-body"; export const DIALOG_CLOSE_BUTTON = "pt-dialog-close-button"; diff --git a/packages/core/src/components/forms/_common.scss b/packages/core/src/components/forms/_common.scss index 0aeb91ae98..418d1b6dc8 100644 --- a/packages/core/src/components/forms/_common.scss +++ b/packages/core/src/components/forms/_common.scss @@ -205,4 +205,8 @@ $input-focus-box-shadow: inset 0 1px 1px rgba($black, $pt-drop-shadow-opacity) ! color: $pt-icon-color; content: $pt-icon-caret-down; pointer-events: none; + + &.pt-disabled { + color: $pt-icon-color-disabled; + } } diff --git a/packages/core/src/components/forms/_controls.scss b/packages/core/src/components/forms/_controls.scss index 3a0060ad67..951d1b71e3 100644 --- a/packages/core/src/components/forms/_controls.scss +++ b/packages/core/src/components/forms/_controls.scss @@ -32,6 +32,11 @@ $control-checked-background-color-active: nth(map-get($button-intents, "primary" text-transform: none; line-height: $control-indicator-size; + &.pt-disabled { + cursor: not-allowed; + color: $pt-text-color-disabled; + } + &.pt-inline { display: inline-block; margin-right: $pt-grid-size * 2; @@ -169,7 +174,7 @@ $control-checked-background-color-active: nth(map-get($button-intents, "primary" :checked - Checked - :disabled - Disabled + :disabled - Disabled. Also add .pt-disabled to .pt-control to change text color (not shown below). :indeterminate - Indeterminate. Note that this style can only be achieved via JavaScript input.indeterminate = true. .pt-align-right - Right-aligned indicator @@ -252,7 +257,7 @@ $control-checked-background-color-active: nth(map-get($button-intents, "primary" :checked - Selected - :disabled - Disabled + :disabled - Disabled. Also add .pt-disabled to .pt-control to change text color (not shown below). .pt-align-right - Right-aligned indicator .pt-large - Large @@ -343,7 +348,7 @@ $control-checked-background-color-active: nth(map-get($button-intents, "primary" :checked - Selected - :disabled - Disabled + :disabled - Disabled. Also add .pt-disabled to .pt-control to change text color (not shown below). .pt-align-right - Right-aligned indicator .pt-large - Large diff --git a/packages/core/src/components/forms/_input-group.scss b/packages/core/src/components/forms/_input-group.scss index 7b4a1dcc45..59cc58fbde 100644 --- a/packages/core/src/components/forms/_input-group.scss +++ b/packages/core/src/components/forms/_input-group.scss @@ -51,7 +51,7 @@ Markup: -:disabled - Disabled input. Must be added separately to the <input> and <button>. +:disabled - Disabled input. Must be added separately to the <input> and <button>. Also add .pt-disabled to .pt-input-group for icon coloring (not shown below). .pt-round - Rounded caps. Button will also be rounded. .pt-large - Large group. Children will adjust size accordingly. .pt-intent-primary - Primary intent. (All 4 intents are supported.) diff --git a/packages/core/src/components/forms/_input.scss b/packages/core/src/components/forms/_input.scss index 8f03189c04..71158ca174 100644 --- a/packages/core/src/components/forms/_input.scss +++ b/packages/core/src/components/forms/_input.scss @@ -76,7 +76,7 @@ Markup: -:disabled - Disabled +:disabled - Disabled. Also add .pt-disabled to .pt-input-group for icon coloring (not shown below). .pt-large - Large Styleguide components.forms.input.search diff --git a/packages/core/src/components/forms/_label.scss b/packages/core/src/components/forms/_label.scss index 221afcb9ef..26882d276b 100644 --- a/packages/core/src/components/forms/_label.scss +++ b/packages/core/src/components/forms/_label.scss @@ -41,8 +41,8 @@ Add the `.pt-label` and `.pt-disabled` class modifiers to a `