venice-ui 3.0.34 → 3.0.36

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.
@@ -9,7 +9,7 @@ const config_1 = require("../../config");
9
9
  const ComponentRoot_1 = require("../ComponentRoot");
10
10
  const Checkbox_styles_1 = require("./Checkbox.styles");
11
11
  const IconsPath_1 = require("../Icon/IconsPath");
12
- const Checkbox = ({ name, value = false, size = 'md', label, labelPosition = 'top', theme, width = 'auto', themeVariant = 'default', handleClick, isIntermedian = false, isDisabled = false, labelInversed = false, error = false, helperText, required = false, optional = false, optionalLabel, componentWidth }) => {
12
+ const Checkbox = ({ name, value = false, size = 'md', label, labelPosition = 'top', theme, width = 'auto', themeVariant = 'default', handleClick, isIntermedian = false, isDisabled = false, labelInversed = false, error = false, helperText, required = false, optional = false, optionalLabel, componentWidth, noBreakLabel = false }) => {
13
13
  const resolvedThemeData = (0, config_1.resolveThemeWithComponentsConfig)({
14
14
  theme,
15
15
  themeVariant,
@@ -26,7 +26,7 @@ const Checkbox = ({ name, value = false, size = 'md', label, labelPosition = 'to
26
26
  handleClick(!value);
27
27
  }
28
28
  };
29
- return (react_1.default.createElement(ComponentRoot_1.ComponentRoot, { labelPosition: labelPosition, size: size, width: width, disabled: isDisabled, error: error, readOnly: false, required: required, optional: optional, optionalLabel: optionalLabel, helperText: helperText, themeVariant: themeVariant, theme: resolvedTheme, componentConfig: checkboxConfig, label: label, isActive: value, labelInversed: labelInversed, smallSize: true, componentWidth: componentWidth ? componentWidth : `${checkboxConfig.size[size].width}px` },
29
+ return (react_1.default.createElement(ComponentRoot_1.ComponentRoot, { labelPosition: labelPosition, size: size, width: width, disabled: isDisabled, error: error, readOnly: false, required: required, optional: optional, optionalLabel: optionalLabel, helperText: helperText, themeVariant: themeVariant, theme: resolvedTheme, componentConfig: checkboxConfig, label: label, isActive: value, labelInversed: labelInversed, smallSize: true, noBreakLabel: noBreakLabel, componentWidth: componentWidth ? componentWidth : `${checkboxConfig.size[size].width}px` },
30
30
  react_1.default.createElement(Checkbox_styles_1.CheckboxRoot, { onClick: onClick, isDisabled: isDisabled },
31
31
  react_1.default.createElement(Checkbox_styles_1.CheckboxBox, { theme: resolvedTheme, config: checkboxConfig, size: size, isDisabled: isDisabled, isIntermedian: isIntermedian, isActive: value }, (value || isIntermedian) && (react_1.default.createElement("svg", { width: resolvedSize.iconSize, height: resolvedSize.iconSize, viewBox: '0 0 24 24', preserveAspectRatio: "xMidYMid meet", x: "0", y: "0", name: name },
32
32
  react_1.default.createElement("path", { d: iconName, fill: isDisabled
@@ -10,7 +10,7 @@ const Label_1 = require("../Label");
10
10
  const react_1 = __importDefault(require("react"));
11
11
  const styled_components_1 = require("styled-components");
12
12
  const ComponentRoot_styles_1 = require("./ComponentRoot.styles");
13
- const ComponentRoot = ({ theme, themeVariant = 'default', label, labelPosition = 'top', size = 'md', width, disabled = false, error = false, readOnly = false, required = false, optional = false, optionalLabel, helperText, componentConfig, children, isActive = false, labelInversed = false, smallSize = false, noBorder = false, noBreakLabel, componentWidth = 'auto' }) => {
13
+ const ComponentRoot = ({ theme, themeVariant = 'default', label, labelPosition = 'top', size = 'md', width, disabled = false, error = false, readOnly = false, required = false, optional = false, optionalLabel, helperText, componentConfig, children, isActive = false, labelInversed = false, smallSize = false, noBorder = false, noBreakLabel = false, componentWidth = 'auto' }) => {
14
14
  return (react_1.default.createElement(styled_components_1.ThemeProvider, { theme: theme },
15
15
  react_1.default.createElement(Aligment_1.Aligment, { align: 'flex-start', direction: labelPosition === 'top'
16
16
  ? 'column'
@@ -81,19 +81,19 @@ const List = ({ theme, themeVariant = 'default', items, handleChange, handleSele
81
81
  updateParentSelection(newListOption, item.id);
82
82
  handleChange(newListOption);
83
83
  };
84
- const select = (id) => {
84
+ const selectRow = (id) => {
85
85
  if (handleSelect && isSelectable) {
86
86
  handleSelect(id);
87
87
  }
88
88
  };
89
89
  const renderRow = (row, level) => {
90
90
  const rowHaveStatus = row.statusDone || row.statusError || row.statusWarning;
91
- return (react_1.default.createElement(styled_components_1.ThemeProvider, { theme: resolvedTheme },
91
+ return (react_1.default.createElement(styled_components_1.ThemeProvider, { theme: resolvedTheme, key: row.id },
92
92
  react_1.default.createElement(List_styles_1.ListRowRoot, { theme: resolvedTheme, config: checkboxConfig,
93
93
  // action={}
94
- level: level },
94
+ level: level, key: `row_${row.id}` },
95
95
  react_1.default.createElement(List_styles_1.ListRow, { theme: resolvedTheme, config: checkboxConfig, isSelected: isSelectable && selected ? selected === row.id : false, isSelectable: isSelectable, onClick: () => {
96
- select(row.id);
96
+ selectRow(row.id);
97
97
  } },
98
98
  react_1.default.createElement(react_1.default.Fragment, null,
99
99
  react_1.default.createElement(Aligment_1.Aligment, { justify: "start-flex", gap: checkboxConfig.size.gap, align: "center" },
@@ -0,0 +1 @@
1
+ "use strict";
@@ -3,7 +3,7 @@ import { resolveThemeWithComponentsConfig } from '../../config';
3
3
  import { ComponentRoot } from '../ComponentRoot';
4
4
  import { CheckboxBox, CheckboxRoot } from './Checkbox.styles';
5
5
  import { iconsPath } from '../Icon/IconsPath';
6
- export const Checkbox = ({ name, value = false, size = 'md', label, labelPosition = 'top', theme, width = 'auto', themeVariant = 'default', handleClick, isIntermedian = false, isDisabled = false, labelInversed = false, error = false, helperText, required = false, optional = false, optionalLabel, componentWidth }) => {
6
+ export const Checkbox = ({ name, value = false, size = 'md', label, labelPosition = 'top', theme, width = 'auto', themeVariant = 'default', handleClick, isIntermedian = false, isDisabled = false, labelInversed = false, error = false, helperText, required = false, optional = false, optionalLabel, componentWidth, noBreakLabel = false }) => {
7
7
  const resolvedThemeData = resolveThemeWithComponentsConfig({
8
8
  theme,
9
9
  themeVariant,
@@ -20,7 +20,7 @@ export const Checkbox = ({ name, value = false, size = 'md', label, labelPositio
20
20
  handleClick(!value);
21
21
  }
22
22
  };
23
- return (React.createElement(ComponentRoot, { labelPosition: labelPosition, size: size, width: width, disabled: isDisabled, error: error, readOnly: false, required: required, optional: optional, optionalLabel: optionalLabel, helperText: helperText, themeVariant: themeVariant, theme: resolvedTheme, componentConfig: checkboxConfig, label: label, isActive: value, labelInversed: labelInversed, smallSize: true, componentWidth: componentWidth ? componentWidth : `${checkboxConfig.size[size].width}px` },
23
+ return (React.createElement(ComponentRoot, { labelPosition: labelPosition, size: size, width: width, disabled: isDisabled, error: error, readOnly: false, required: required, optional: optional, optionalLabel: optionalLabel, helperText: helperText, themeVariant: themeVariant, theme: resolvedTheme, componentConfig: checkboxConfig, label: label, isActive: value, labelInversed: labelInversed, smallSize: true, noBreakLabel: noBreakLabel, componentWidth: componentWidth ? componentWidth : `${checkboxConfig.size[size].width}px` },
24
24
  React.createElement(CheckboxRoot, { onClick: onClick, isDisabled: isDisabled },
25
25
  React.createElement(CheckboxBox, { theme: resolvedTheme, config: checkboxConfig, size: size, isDisabled: isDisabled, isIntermedian: isIntermedian, isActive: value }, (value || isIntermedian) && (React.createElement("svg", { width: resolvedSize.iconSize, height: resolvedSize.iconSize, viewBox: '0 0 24 24', preserveAspectRatio: "xMidYMid meet", x: "0", y: "0", name: name },
26
26
  React.createElement("path", { d: iconName, fill: isDisabled
@@ -4,7 +4,7 @@ import { Label } from '../Label';
4
4
  import React from 'react';
5
5
  import { ThemeProvider } from 'styled-components';
6
6
  import { ComponentWrapper } from './ComponentRoot.styles';
7
- export const ComponentRoot = ({ theme, themeVariant = 'default', label, labelPosition = 'top', size = 'md', width, disabled = false, error = false, readOnly = false, required = false, optional = false, optionalLabel, helperText, componentConfig, children, isActive = false, labelInversed = false, smallSize = false, noBorder = false, noBreakLabel, componentWidth = 'auto' }) => {
7
+ export const ComponentRoot = ({ theme, themeVariant = 'default', label, labelPosition = 'top', size = 'md', width, disabled = false, error = false, readOnly = false, required = false, optional = false, optionalLabel, helperText, componentConfig, children, isActive = false, labelInversed = false, smallSize = false, noBorder = false, noBreakLabel = false, componentWidth = 'auto' }) => {
8
8
  return (React.createElement(ThemeProvider, { theme: theme },
9
9
  React.createElement(Aligment, { align: 'flex-start', direction: labelPosition === 'top'
10
10
  ? 'column'
@@ -75,19 +75,19 @@ export const List = ({ theme, themeVariant = 'default', items, handleChange, han
75
75
  updateParentSelection(newListOption, item.id);
76
76
  handleChange(newListOption);
77
77
  };
78
- const select = (id) => {
78
+ const selectRow = (id) => {
79
79
  if (handleSelect && isSelectable) {
80
80
  handleSelect(id);
81
81
  }
82
82
  };
83
83
  const renderRow = (row, level) => {
84
84
  const rowHaveStatus = row.statusDone || row.statusError || row.statusWarning;
85
- return (React.createElement(ThemeProvider, { theme: resolvedTheme },
85
+ return (React.createElement(ThemeProvider, { theme: resolvedTheme, key: row.id },
86
86
  React.createElement(ListRowRoot, { theme: resolvedTheme, config: checkboxConfig,
87
87
  // action={}
88
- level: level },
88
+ level: level, key: `row_${row.id}` },
89
89
  React.createElement(ListRow, { theme: resolvedTheme, config: checkboxConfig, isSelected: isSelectable && selected ? selected === row.id : false, isSelectable: isSelectable, onClick: () => {
90
- select(row.id);
90
+ selectRow(row.id);
91
91
  } },
92
92
  React.createElement(React.Fragment, null,
93
93
  React.createElement(Aligment, { justify: "start-flex", gap: checkboxConfig.size.gap, align: "center" },
@@ -0,0 +1 @@
1
+ "use strict";
@@ -20,6 +20,7 @@ interface ICheckboxProps {
20
20
  optional?: boolean;
21
21
  optionalLabel?: string;
22
22
  componentWidth?: string;
23
+ noBreakLabel?: boolean;
23
24
  }
24
25
  export declare const Checkbox: FC<ICheckboxProps>;
25
26
  export {};
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "venice-ui",
3
- "version": "3.0.34",
3
+ "version": "3.0.36",
4
4
  "description": "Component library",
5
5
  "main": "index.js",
6
6
  "module": "./dist/esm/index.js",