venice-ui 3.0.60 → 3.0.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,7 +20,7 @@ const buildVariantStyles = (variant, isActive, isDisabled, hasBorder = false) =>
20
20
  color: ${color};
21
21
  ${border}
22
22
  :hover {
23
- background-color: ${variant.backgroundHover};
23
+ ${!isDisabled ? `background-color: ${variant.backgroundHover};` : ''}
24
24
  }
25
25
  `;
26
26
  };
@@ -40,7 +40,6 @@ exports.ButtonRoot = styled_components_1.default.div `
40
40
  padding: 0 ${({ config, size }) => config.sizes[size].paddingX}px;
41
41
  border-radius: ${({ config, size }) => config.sizes[size].radius}px;
42
42
  cursor: ${({ isDisabled }) => (isDisabled ? 'not-allowed' : 'pointer')};
43
- pointer-events: ${({ isDisabled }) => (isDisabled ? 'none' : 'auto')};
44
43
  transition: background-color 300ms, color 300ms, border-color 300ms;
45
44
 
46
45
  ${({ config, mode, isActive, isDisabled }) => mode === 'primary' && buildVariantStyles(config.variants.primary, isActive, isDisabled)}
@@ -46,10 +46,11 @@ const HeaderCell_1 = require("./HeaderCell");
46
46
  const Cell_1 = require("./Cell");
47
47
  const SearchInput_1 = require("../SearchInput");
48
48
  const PageSize_1 = require("../PageSize");
49
+ const EMPTY_ACTIONS = [];
49
50
  const Table = ({ theme, themeVariant = 'default', headers, elements, hover = true, selectable = true, filtrable = false, pagination = false, sortable = true, sort = {
50
51
  name: '',
51
52
  order: 'none',
52
- }, pageSize = 20, moreActions = [], onRowClick, filterLabels, pageSizeAvailableValues, tableHeight, tableWrapperHeight, paginationLabel, calendarLabels, calendarLocaleLabels, paginationZIndex, headerExtraContent, searchable = true, searchInputPlaceholder = config_2.wordbook.searchInput.placeholder, noResultsText = config_2.wordbook.table.filterEmptyState, emptyStateText = config_2.wordbook.table.emptyState, }) => {
53
+ }, pageSize = 20, moreActions = EMPTY_ACTIONS, onRowClick, filterLabels, pageSizeAvailableValues, tableHeight, tableWrapperHeight, paginationLabel, calendarLabels, calendarLocaleLabels, paginationZIndex, headerExtraContent, searchable = true, searchInputPlaceholder = config_2.wordbook.searchInput.placeholder, noResultsText = config_2.wordbook.table.filterEmptyState, emptyStateText = config_2.wordbook.table.emptyState, }) => {
53
54
  const resolvedThemeData = (0, config_1.resolveThemeWithComponentsConfig)({
54
55
  theme,
55
56
  themeVariant,
@@ -14,7 +14,7 @@ const buildVariantStyles = (variant, isActive, isDisabled, hasBorder = false) =>
14
14
  color: ${color};
15
15
  ${border}
16
16
  :hover {
17
- background-color: ${variant.backgroundHover};
17
+ ${!isDisabled ? `background-color: ${variant.backgroundHover};` : ''}
18
18
  }
19
19
  `;
20
20
  };
@@ -34,7 +34,6 @@ export const ButtonRoot = styled.div `
34
34
  padding: 0 ${({ config, size }) => config.sizes[size].paddingX}px;
35
35
  border-radius: ${({ config, size }) => config.sizes[size].radius}px;
36
36
  cursor: ${({ isDisabled }) => (isDisabled ? 'not-allowed' : 'pointer')};
37
- pointer-events: ${({ isDisabled }) => (isDisabled ? 'none' : 'auto')};
38
37
  transition: background-color 300ms, color 300ms, border-color 300ms;
39
38
 
40
39
  ${({ config, mode, isActive, isDisabled }) => mode === 'primary' && buildVariantStyles(config.variants.primary, isActive, isDisabled)}
@@ -10,10 +10,11 @@ import { HeaderCell } from './HeaderCell';
10
10
  import { Cell } from './Cell';
11
11
  import { SearchInput } from '../SearchInput';
12
12
  import { PageSize } from '../PageSize';
13
+ const EMPTY_ACTIONS = [];
13
14
  export const Table = ({ theme, themeVariant = 'default', headers, elements, hover = true, selectable = true, filtrable = false, pagination = false, sortable = true, sort = {
14
15
  name: '',
15
16
  order: 'none',
16
- }, pageSize = 20, moreActions = [], onRowClick, filterLabels, pageSizeAvailableValues, tableHeight, tableWrapperHeight, paginationLabel, calendarLabels, calendarLocaleLabels, paginationZIndex, headerExtraContent, searchable = true, searchInputPlaceholder = wordbook.searchInput.placeholder, noResultsText = wordbook.table.filterEmptyState, emptyStateText = wordbook.table.emptyState, }) => {
17
+ }, pageSize = 20, moreActions = EMPTY_ACTIONS, onRowClick, filterLabels, pageSizeAvailableValues, tableHeight, tableWrapperHeight, paginationLabel, calendarLabels, calendarLocaleLabels, paginationZIndex, headerExtraContent, searchable = true, searchInputPlaceholder = wordbook.searchInput.placeholder, noResultsText = wordbook.table.filterEmptyState, emptyStateText = wordbook.table.emptyState, }) => {
17
18
  const resolvedThemeData = resolveThemeWithComponentsConfig({
18
19
  theme,
19
20
  themeVariant,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "venice-ui",
3
- "version": "3.0.60",
3
+ "version": "3.0.62",
4
4
  "description": "Component library",
5
5
  "main": "index.js",
6
6
  "module": "./dist/esm/index.js",