diff --git a/packages/blade/src/components/Checkbox/Checkbox.tsx b/packages/blade/src/components/Checkbox/Checkbox.tsx index 3a02750fa9f..d39cdfc0550 100644 --- a/packages/blade/src/components/Checkbox/Checkbox.tsx +++ b/packages/blade/src/components/Checkbox/Checkbox.tsx @@ -231,7 +231,7 @@ const _Checkbox: React.ForwardRefRenderFunction inputProps={state.isReactNative ? inputProps : {}} > - + should render checkbox with error validationState 1`] = `"
This has to be checked
"`; +exports[` should render checkbox with error validationState 1`] = `"
This has to be checked
"`; exports[` should render checkbox with error validationState 2`] = ` .c4.c4.c4.c4.c4 { @@ -57,6 +57,7 @@ exports[` should render checkbox with error validationState 2`] = ` -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; + cursor: pointer; } .c6.c6.c6.c6.c6 { diff --git a/packages/blade/src/components/Checkbox/__tests__/__snapshots__/Checkbox.web.test.tsx.snap b/packages/blade/src/components/Checkbox/__tests__/__snapshots__/Checkbox.web.test.tsx.snap index 7fcc38b13e5..78794a56af4 100644 --- a/packages/blade/src/components/Checkbox/__tests__/__snapshots__/Checkbox.web.test.tsx.snap +++ b/packages/blade/src/components/Checkbox/__tests__/__snapshots__/Checkbox.web.test.tsx.snap @@ -51,6 +51,7 @@ exports[` should render checkbox with label 1`] = ` -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; + cursor: pointer; } .c6.c6.c6.c6.c6 { @@ -339,6 +340,7 @@ exports[` should set disabled state with isDisabled 1`] = ` -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; + cursor: not-allowed; } .c6.c6.c6.c6.c6 { @@ -534,6 +536,7 @@ exports[` should set error state with validationState 1`] = ` -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; + cursor: pointer; } .c6.c6.c6.c6.c6 { @@ -823,6 +826,7 @@ exports[` should set to indeterminate state of checkbox 1`] = ` -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; + cursor: pointer; } .c7.c7.c7.c7.c7 { diff --git a/packages/blade/src/components/Checkbox/__tests__/__snapshots__/CheckboxGroup.ssr.test.tsx.snap b/packages/blade/src/components/Checkbox/__tests__/__snapshots__/CheckboxGroup.ssr.test.tsx.snap index 9feb0d76eac..90f6bed976a 100644 --- a/packages/blade/src/components/Checkbox/__tests__/__snapshots__/CheckboxGroup.ssr.test.tsx.snap +++ b/packages/blade/src/components/Checkbox/__tests__/__snapshots__/CheckboxGroup.ssr.test.tsx.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[` should render errorText when validationState is set to error 1`] = `"

Select fruits

,Invalid selection

Invalid selection
"`; +exports[` should render errorText when validationState is set to error 1`] = `"

Select fruits

,Invalid selection

Invalid selection
"`; exports[` should render errorText when validationState is set to error 2`] = ` .c10.c10.c10.c10.c10 { @@ -81,6 +81,7 @@ exports[` should render errorText when validationState is set t -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; + cursor: pointer; } .c12.c12.c12.c12.c12 { diff --git a/packages/blade/src/components/Checkbox/__tests__/__snapshots__/CheckboxGroup.web.test.tsx.snap b/packages/blade/src/components/Checkbox/__tests__/__snapshots__/CheckboxGroup.web.test.tsx.snap index da35ab6f6a8..a4ed4a857d4 100644 --- a/packages/blade/src/components/Checkbox/__tests__/__snapshots__/CheckboxGroup.web.test.tsx.snap +++ b/packages/blade/src/components/Checkbox/__tests__/__snapshots__/CheckboxGroup.web.test.tsx.snap @@ -75,6 +75,7 @@ exports[` should render with help text 1`] = ` -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; + cursor: pointer; } .c12.c12.c12.c12.c12 { @@ -632,6 +633,7 @@ exports[` should render with label 1`] = ` -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; + cursor: pointer; } .c12.c12.c12.c12.c12 { diff --git a/packages/blade/src/components/Table/TableHeader.web.tsx b/packages/blade/src/components/Table/TableHeader.web.tsx index 1248d95b6e5..8ca3ff6b8ce 100644 --- a/packages/blade/src/components/Table/TableHeader.web.tsx +++ b/packages/blade/src/components/Table/TableHeader.web.tsx @@ -164,17 +164,19 @@ const TableHeaderCell = assignWithoutSideEffects(_TableHeaderCell, { const TableHeaderCellCheckbox = ({ isChecked, + isDisabled, isIndeterminate, onChange, }: { isChecked: CheckboxProps['isChecked']; + isDisabled: CheckboxProps['isDisabled']; isIndeterminate?: CheckboxProps['isIndeterminate']; onChange: CheckboxProps['onChange']; }): React.ReactElement => { return ( - + ); @@ -197,6 +199,7 @@ const StyledHeaderRow = styled(HeaderRow)<{ $showBorderedCells: boolean }>( const _TableHeaderRow = ({ children, rowDensity }: TableHeaderRowProps): React.ReactElement => { const { + disabledRows, selectionType, selectedRows, totalItems, @@ -207,6 +210,7 @@ const _TableHeaderRow = ({ children, rowDensity }: TableHeaderRowProps): React.R const isMultiSelect = selectionType === 'multiple'; const isAllSelected = selectedRows && selectedRows.length === totalItems; const isIndeterminate = selectedRows && selectedRows.length > 0 && !isAllSelected; + const isDisabled = disabledRows && disabledRows.length === totalItems; if (rowDensity) { setHeaderRowDensity(rowDensity); } @@ -219,6 +223,7 @@ const _TableHeaderRow = ({ children, rowDensity }: TableHeaderRowProps): React.R {isMultiSelect && ( toggleAllRowsSelection()} />