@nulogy/components 8.15.0 → 8.15.2

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/dist/main.js CHANGED
@@ -8772,38 +8772,74 @@
8772
8772
  disabled: false
8773
8773
  };
8774
8774
 
8775
- var Heading1 = Text.withComponent("h1");
8776
- Heading1.defaultProps = {
8777
- fontSize: "heading1",
8778
- lineHeight: "heading1",
8779
- fontWeight: "light",
8780
- mt: 0,
8781
- mb: "x6"
8782
- };
8783
- var Heading2 = Text.withComponent("h2");
8784
- Heading2.defaultProps = {
8785
- fontSize: "heading2",
8786
- lineHeight: "heading2",
8787
- fontWeight: "normal",
8788
- mt: 0,
8789
- mb: "x2"
8790
- };
8791
- var Heading3 = Text.withComponent("h3");
8792
- Heading3.defaultProps = {
8793
- fontSize: "heading3",
8794
- lineHeight: "heading3",
8795
- fontWeight: "medium",
8796
- mt: 0,
8797
- mb: "x1"
8798
- };
8799
- var Heading4 = Text.withComponent("h4");
8800
- Heading4.defaultProps = {
8801
- fontSize: "heading4",
8802
- lineHeight: "heading4",
8803
- fontWeight: "bold",
8804
- mt: 0,
8805
- mb: "x1"
8806
- };
8775
+ var Heading1 = styled__default["default"](Text).attrs(function (props) {
8776
+ return Object.assign({
8777
+ as: "h1"
8778
+ }, props);
8779
+ }).withConfig({
8780
+ displayName: "Headings__Heading1",
8781
+ componentId: "sc-7kwh7g-0"
8782
+ })(function (_ref) {
8783
+ var theme = _ref.theme;
8784
+ return {
8785
+ fontSize: theme.fontSizes.heading1,
8786
+ lineHeight: theme.lineHeights.heading1,
8787
+ fontWeight: theme.fontWeights.light,
8788
+ marginTop: 0,
8789
+ marginBottom: theme.space.x6
8790
+ };
8791
+ }, addStyledProps);
8792
+ var Heading2 = styled__default["default"](Text).attrs(function (props) {
8793
+ return Object.assign({
8794
+ as: "h2"
8795
+ }, props);
8796
+ }).withConfig({
8797
+ displayName: "Headings__Heading2",
8798
+ componentId: "sc-7kwh7g-1"
8799
+ })(function (_ref2) {
8800
+ var theme = _ref2.theme;
8801
+ return {
8802
+ fontSize: theme.fontSizes.heading2,
8803
+ lineHeight: theme.lineHeights.heading2,
8804
+ fontWeight: theme.fontWeights.normal,
8805
+ marginTop: 0,
8806
+ marginBottom: theme.space.x2
8807
+ };
8808
+ }, addStyledProps);
8809
+ var Heading3 = styled__default["default"](Text).attrs(function (props) {
8810
+ return Object.assign({
8811
+ as: "h3"
8812
+ }, props);
8813
+ }).withConfig({
8814
+ displayName: "Headings__Heading3",
8815
+ componentId: "sc-7kwh7g-2"
8816
+ })(function (_ref3) {
8817
+ var theme = _ref3.theme;
8818
+ return {
8819
+ fontSize: theme.fontSizes.heading3,
8820
+ lineHeight: theme.lineHeights.heading3,
8821
+ fontWeight: theme.fontWeights.medium,
8822
+ marginTop: 0,
8823
+ marginBottom: theme.space.x1
8824
+ };
8825
+ }, addStyledProps);
8826
+ var Heading4 = styled__default["default"](Text).attrs(function (props) {
8827
+ return Object.assign({
8828
+ as: "h4"
8829
+ }, props);
8830
+ }).withConfig({
8831
+ displayName: "Headings__Heading4",
8832
+ componentId: "sc-7kwh7g-3"
8833
+ })(function (_ref4) {
8834
+ var theme = _ref4.theme;
8835
+ return {
8836
+ fontSize: theme.fontSizes.heading4,
8837
+ lineHeight: theme.lineHeights.heading4,
8838
+ fontWeight: theme.fontWeights.bold,
8839
+ marginTop: 0,
8840
+ marginBottom: theme.space.x1
8841
+ };
8842
+ }, addStyledProps);
8807
8843
 
8808
8844
  var defaultOptions = {
8809
8845
  bindI18n: 'languageChanged',
@@ -24937,10 +24973,12 @@
24937
24973
  id: id,
24938
24974
  backgroundColor: backgroundColor,
24939
24975
  showArrow: showArrow
24940
- }, restProps), React__default["default"].Children.map(children, function (child) {
24941
- return /*#__PURE__*/React__default["default"].cloneElement(child, Object.assign({
24942
- size: componentSize
24943
- }, child.props), child.props.children);
24976
+ }, restProps), typeof children === "function" ? children : React__default["default"].Children.map(children, function (child) {
24977
+ if ( /*#__PURE__*/React__default["default"].isValidElement(child)) {
24978
+ return /*#__PURE__*/React__default["default"].cloneElement(child, Object.assign({
24979
+ size: componentSize
24980
+ }, child.props), child.props.children);
24981
+ }
24944
24982
  })));
24945
24983
  });
24946
24984
 
@@ -8749,38 +8749,74 @@ Text.defaultProps = {
8749
8749
  disabled: false
8750
8750
  };
8751
8751
 
8752
- var Heading1 = Text.withComponent("h1");
8753
- Heading1.defaultProps = {
8754
- fontSize: "heading1",
8755
- lineHeight: "heading1",
8756
- fontWeight: "light",
8757
- mt: 0,
8758
- mb: "x6"
8759
- };
8760
- var Heading2 = Text.withComponent("h2");
8761
- Heading2.defaultProps = {
8762
- fontSize: "heading2",
8763
- lineHeight: "heading2",
8764
- fontWeight: "normal",
8765
- mt: 0,
8766
- mb: "x2"
8767
- };
8768
- var Heading3 = Text.withComponent("h3");
8769
- Heading3.defaultProps = {
8770
- fontSize: "heading3",
8771
- lineHeight: "heading3",
8772
- fontWeight: "medium",
8773
- mt: 0,
8774
- mb: "x1"
8775
- };
8776
- var Heading4 = Text.withComponent("h4");
8777
- Heading4.defaultProps = {
8778
- fontSize: "heading4",
8779
- lineHeight: "heading4",
8780
- fontWeight: "bold",
8781
- mt: 0,
8782
- mb: "x1"
8783
- };
8752
+ var Heading1 = styled(Text).attrs(function (props) {
8753
+ return Object.assign({
8754
+ as: "h1"
8755
+ }, props);
8756
+ }).withConfig({
8757
+ displayName: "Headings__Heading1",
8758
+ componentId: "sc-7kwh7g-0"
8759
+ })(function (_ref) {
8760
+ var theme = _ref.theme;
8761
+ return {
8762
+ fontSize: theme.fontSizes.heading1,
8763
+ lineHeight: theme.lineHeights.heading1,
8764
+ fontWeight: theme.fontWeights.light,
8765
+ marginTop: 0,
8766
+ marginBottom: theme.space.x6
8767
+ };
8768
+ }, addStyledProps);
8769
+ var Heading2 = styled(Text).attrs(function (props) {
8770
+ return Object.assign({
8771
+ as: "h2"
8772
+ }, props);
8773
+ }).withConfig({
8774
+ displayName: "Headings__Heading2",
8775
+ componentId: "sc-7kwh7g-1"
8776
+ })(function (_ref2) {
8777
+ var theme = _ref2.theme;
8778
+ return {
8779
+ fontSize: theme.fontSizes.heading2,
8780
+ lineHeight: theme.lineHeights.heading2,
8781
+ fontWeight: theme.fontWeights.normal,
8782
+ marginTop: 0,
8783
+ marginBottom: theme.space.x2
8784
+ };
8785
+ }, addStyledProps);
8786
+ var Heading3 = styled(Text).attrs(function (props) {
8787
+ return Object.assign({
8788
+ as: "h3"
8789
+ }, props);
8790
+ }).withConfig({
8791
+ displayName: "Headings__Heading3",
8792
+ componentId: "sc-7kwh7g-2"
8793
+ })(function (_ref3) {
8794
+ var theme = _ref3.theme;
8795
+ return {
8796
+ fontSize: theme.fontSizes.heading3,
8797
+ lineHeight: theme.lineHeights.heading3,
8798
+ fontWeight: theme.fontWeights.medium,
8799
+ marginTop: 0,
8800
+ marginBottom: theme.space.x1
8801
+ };
8802
+ }, addStyledProps);
8803
+ var Heading4 = styled(Text).attrs(function (props) {
8804
+ return Object.assign({
8805
+ as: "h4"
8806
+ }, props);
8807
+ }).withConfig({
8808
+ displayName: "Headings__Heading4",
8809
+ componentId: "sc-7kwh7g-3"
8810
+ })(function (_ref4) {
8811
+ var theme = _ref4.theme;
8812
+ return {
8813
+ fontSize: theme.fontSizes.heading4,
8814
+ lineHeight: theme.lineHeights.heading4,
8815
+ fontWeight: theme.fontWeights.bold,
8816
+ marginTop: 0,
8817
+ marginBottom: theme.space.x1
8818
+ };
8819
+ }, addStyledProps);
8784
8820
 
8785
8821
  var defaultOptions = {
8786
8822
  bindI18n: 'languageChanged',
@@ -24914,10 +24950,12 @@ var DropdownMenu = /*#__PURE__*/React__default.forwardRef(function (_a, ref) {
24914
24950
  id: id,
24915
24951
  backgroundColor: backgroundColor,
24916
24952
  showArrow: showArrow
24917
- }, restProps), React__default.Children.map(children, function (child) {
24918
- return /*#__PURE__*/React__default.cloneElement(child, Object.assign({
24919
- size: componentSize
24920
- }, child.props), child.props.children);
24953
+ }, restProps), typeof children === "function" ? children : React__default.Children.map(children, function (child) {
24954
+ if ( /*#__PURE__*/React__default.isValidElement(child)) {
24955
+ return /*#__PURE__*/React__default.cloneElement(child, Object.assign({
24956
+ size: componentSize
24957
+ }, child.props), child.props.children);
24958
+ }
24921
24959
  })));
24922
24960
  });
24923
24961
 
@@ -1,12 +1,12 @@
1
1
  import React from "react";
2
- import { StyledProps } from "../StyledProps";
3
2
  import { ComponentSize } from "../NDSProvider/ComponentSizeContext";
3
+ import { StyledProps } from "../StyledProps";
4
4
  type DropdownMenuProps = {
5
5
  className?: string;
6
6
  size?: ComponentSize;
7
7
  id?: string;
8
8
  disabled?: boolean;
9
- trigger?: React.ReactNode | ((...args: any[]) => any);
9
+ trigger?: () => React.FunctionComponentElement<unknown>;
10
10
  backgroundColor?: string;
11
11
  showArrow?: boolean;
12
12
  placement?: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { DefaultNDSThemeType } from "../theme.type";
3
3
  type DropdownMenuContainerProps = {
4
+ id?: string;
4
5
  className?: string;
5
6
  backgroundColor?: string;
6
7
  showArrow?: boolean;