@sebgroup/green-react 1.0.0-beta.40 → 1.0.0-beta.42

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.
package/index.esm.js CHANGED
@@ -1063,7 +1063,8 @@ function Button({
1063
1063
  onClick,
1064
1064
  disabled,
1065
1065
  active = false,
1066
- type = 'button'
1066
+ type = 'button',
1067
+ size
1067
1068
  }) {
1068
1069
  const props = {
1069
1070
  type,
@@ -1072,6 +1073,7 @@ function Button({
1072
1073
  const classNames = [];
1073
1074
  if (variant) classNames.push(variant);
1074
1075
  if (active) classNames.push('active');
1076
+ if (size) classNames.push('small');
1075
1077
  if (classNames.length) props.className = classNames.join(' ');
1076
1078
  if (onClick) props.onClick = onClick;
1077
1079
  return jsx("button", Object.assign({}, props, {
@@ -2825,19 +2827,21 @@ const useDropdown = ({
2825
2827
  };
2826
2828
 
2827
2829
  const Dropdown = ({
2830
+ compareWith,
2831
+ display,
2828
2832
  id,
2829
- value,
2830
- options,
2833
+ informationLabel,
2834
+ label,
2831
2835
  loop,
2832
2836
  multiSelect,
2833
- searchable,
2837
+ onChange,
2838
+ options,
2834
2839
  searchFilter,
2835
- compareWith,
2836
- useValue,
2837
- display,
2840
+ searchable,
2838
2841
  texts,
2839
- onChange,
2840
- validator
2842
+ useValue,
2843
+ validator,
2844
+ value
2841
2845
  }) => {
2842
2846
  var _a;
2843
2847
 
@@ -2873,7 +2877,7 @@ const Dropdown = ({
2873
2877
  if (Object.keys(props).length === 0) return {
2874
2878
  role: 'listbox',
2875
2879
  tabIndex: -1,
2876
- className: (_c = (_b = (_a = dropdownValues.elements) === null || _a === void 0 ? void 0 : _a.listbox) === null || _b === void 0 ? void 0 : _b.classes) === null || _c === void 0 ? void 0 : _c.join(' ')
2880
+ className: (_c = (_b = (_a = dropdownValues().elements) === null || _a === void 0 ? void 0 : _a.listbox) === null || _b === void 0 ? void 0 : _b.classes) === null || _c === void 0 ? void 0 : _c.join(' ')
2877
2881
  };
2878
2882
  return props;
2879
2883
  };
@@ -2881,7 +2885,13 @@ const Dropdown = ({
2881
2885
  return jsxs("div", Object.assign({
2882
2886
  className: "form-group"
2883
2887
  }, {
2884
- children: [jsx("button", Object.assign({
2888
+ children: [label && jsx("label", {
2889
+ children: label
2890
+ }), informationLabel && jsx("div", Object.assign({
2891
+ className: "form-info"
2892
+ }, {
2893
+ children: informationLabel
2894
+ })), jsx("button", Object.assign({
2885
2895
  type: "button"
2886
2896
  }, togglerProps, {
2887
2897
  ref: togglerRef
package/index.umd.js CHANGED
@@ -1069,7 +1069,8 @@
1069
1069
  onClick,
1070
1070
  disabled,
1071
1071
  active = false,
1072
- type = 'button'
1072
+ type = 'button',
1073
+ size
1073
1074
  }) {
1074
1075
  const props = {
1075
1076
  type,
@@ -1078,6 +1079,7 @@
1078
1079
  const classNames = [];
1079
1080
  if (variant) classNames.push(variant);
1080
1081
  if (active) classNames.push('active');
1082
+ if (size) classNames.push('small');
1081
1083
  if (classNames.length) props.className = classNames.join(' ');
1082
1084
  if (onClick) props.onClick = onClick;
1083
1085
  return jsxRuntime.jsx("button", Object.assign({}, props, {
@@ -2831,19 +2833,21 @@
2831
2833
  };
2832
2834
 
2833
2835
  const Dropdown = ({
2836
+ compareWith,
2837
+ display,
2834
2838
  id,
2835
- value,
2836
- options,
2839
+ informationLabel,
2840
+ label,
2837
2841
  loop,
2838
2842
  multiSelect,
2839
- searchable,
2843
+ onChange,
2844
+ options,
2840
2845
  searchFilter,
2841
- compareWith,
2842
- useValue,
2843
- display,
2846
+ searchable,
2844
2847
  texts,
2845
- onChange,
2846
- validator
2848
+ useValue,
2849
+ validator,
2850
+ value
2847
2851
  }) => {
2848
2852
  var _a;
2849
2853
 
@@ -2879,7 +2883,7 @@
2879
2883
  if (Object.keys(props).length === 0) return {
2880
2884
  role: 'listbox',
2881
2885
  tabIndex: -1,
2882
- className: (_c = (_b = (_a = extract.dropdownValues.elements) === null || _a === void 0 ? void 0 : _a.listbox) === null || _b === void 0 ? void 0 : _b.classes) === null || _c === void 0 ? void 0 : _c.join(' ')
2886
+ className: (_c = (_b = (_a = extract.dropdownValues().elements) === null || _a === void 0 ? void 0 : _a.listbox) === null || _b === void 0 ? void 0 : _b.classes) === null || _c === void 0 ? void 0 : _c.join(' ')
2883
2887
  };
2884
2888
  return props;
2885
2889
  };
@@ -2887,7 +2891,13 @@
2887
2891
  return jsxRuntime.jsxs("div", Object.assign({
2888
2892
  className: "form-group"
2889
2893
  }, {
2890
- children: [jsxRuntime.jsx("button", Object.assign({
2894
+ children: [label && jsxRuntime.jsx("label", {
2895
+ children: label
2896
+ }), informationLabel && jsxRuntime.jsx("div", Object.assign({
2897
+ className: "form-info"
2898
+ }, {
2899
+ children: informationLabel
2900
+ })), jsxRuntime.jsx("button", Object.assign({
2891
2901
  type: "button"
2892
2902
  }, togglerProps, {
2893
2903
  ref: togglerRef
@@ -2,5 +2,5 @@ import { DropdownArgs, OnChange } from '@sebgroup/extract';
2
2
  export interface DropdownProps extends DropdownArgs {
3
3
  onChange?: OnChange;
4
4
  }
5
- export declare const Dropdown: ({ id, value, options, loop, multiSelect, searchable, searchFilter, compareWith, useValue, display, texts, onChange, validator, }: DropdownProps) => JSX.Element;
5
+ export declare const Dropdown: ({ compareWith, display, id, informationLabel, label, loop, multiSelect, onChange, options, searchFilter, searchable, texts, useValue, validator, value, }: DropdownProps) => JSX.Element;
6
6
  export default Dropdown;
@@ -7,6 +7,7 @@ export interface ButtonProps {
7
7
  active?: boolean;
8
8
  onClick?: MouseEventHandler<HTMLButtonElement>;
9
9
  disabled?: boolean;
10
+ size?: 'small';
10
11
  }
11
- export declare function Button({ children, variant, onClick, disabled, active, type, }: ButtonProps): JSX.Element;
12
+ export declare function Button({ children, variant, onClick, disabled, active, type, size }: ButtonProps): JSX.Element;
12
13
  export default Button;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@sebgroup/green-react",
3
- "version": "1.0.0-beta.40",
3
+ "version": "1.0.0-beta.42",
4
4
  "peerDependencies": {
5
5
  "react": "^17 || ^18",
6
6
  "react-dom": "^17 || ^18"
7
7
  },
8
8
  "dependencies": {
9
- "@sebgroup/chlorophyll": "^1.0.0-beta.41",
10
- "@sebgroup/extract": "^1.0.0-beta.40"
9
+ "@sebgroup/chlorophyll": "^1.0.0-beta.43",
10
+ "@sebgroup/extract": "^1.0.0-beta.42"
11
11
  },
12
12
  "description": "React components built on top of @sebgroup/chlorophyll.",
13
13
  "repository": {