@integrigo/integrigo-ui 1.2.2 → 1.2.3

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.
@@ -1,8 +1,10 @@
1
1
  import React from "react";
2
- declare type IconType = "bars" | "plus" | "minus";
2
+ import { FontAwesomeIconProps } from "@fortawesome/react-fontawesome";
3
+ declare const ICONS: string[];
3
4
  declare const SOCIAL_ICONS: string[];
5
+ declare type IconType = typeof ICONS[number];
4
6
  declare type IconSocialType = typeof SOCIAL_ICONS[number];
5
- declare type IconProps = {
7
+ declare type IconProps = Omit<FontAwesomeIconProps, "icon"> & {
6
8
  icon: IconType | IconSocialType;
7
9
  };
8
10
  export declare const Icon: React.FC<IconProps>;
@@ -1,24 +1,24 @@
1
- import React from 'react';
2
- import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- declare const _default: ComponentMeta<React.FC<{
1
+ import React from "react";
2
+ import { ComponentStory, ComponentMeta } from "@storybook/react";
3
+ declare const _default: ComponentMeta<React.FC<Omit<import("@fortawesome/react-fontawesome").FontAwesomeIconProps, "icon"> & {
4
4
  icon: string;
5
5
  }>>;
6
6
  export default _default;
7
- export declare const Bars: ComponentStory<React.FC<{
7
+ export declare const Bars: ComponentStory<React.FC<Omit<import("@fortawesome/react-fontawesome").FontAwesomeIconProps, "icon"> & {
8
8
  icon: string;
9
9
  }>>;
10
- export declare const Plus: ComponentStory<React.FC<{
10
+ export declare const Plus: ComponentStory<React.FC<Omit<import("@fortawesome/react-fontawesome").FontAwesomeIconProps, "icon"> & {
11
11
  icon: string;
12
12
  }>>;
13
- export declare const Minus: ComponentStory<React.FC<{
13
+ export declare const Minus: ComponentStory<React.FC<Omit<import("@fortawesome/react-fontawesome").FontAwesomeIconProps, "icon"> & {
14
14
  icon: string;
15
15
  }>>;
16
- export declare const Facebook: ComponentStory<React.FC<{
16
+ export declare const Facebook: ComponentStory<React.FC<Omit<import("@fortawesome/react-fontawesome").FontAwesomeIconProps, "icon"> & {
17
17
  icon: string;
18
18
  }>>;
19
- export declare const Instagram: ComponentStory<React.FC<{
19
+ export declare const Instagram: ComponentStory<React.FC<Omit<import("@fortawesome/react-fontawesome").FontAwesomeIconProps, "icon"> & {
20
20
  icon: string;
21
21
  }>>;
22
- export declare const Linkedin: ComponentStory<React.FC<{
22
+ export declare const Linkedin: ComponentStory<React.FC<Omit<import("@fortawesome/react-fontawesome").FontAwesomeIconProps, "icon"> & {
23
23
  icon: string;
24
24
  }>>;
package/lib/index.esm.js CHANGED
@@ -16,6 +16,29 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16
16
  PERFORMANCE OF THIS SOFTWARE.
17
17
  ***************************************************************************** */
18
18
 
19
+ var __assign = function() {
20
+ __assign = Object.assign || function __assign(t) {
21
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
22
+ s = arguments[i];
23
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
24
+ }
25
+ return t;
26
+ };
27
+ return __assign.apply(this, arguments);
28
+ };
29
+
30
+ function __rest(s, e) {
31
+ var t = {};
32
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
33
+ t[p] = s[p];
34
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
35
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
36
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
37
+ t[p[i]] = s[p[i]];
38
+ }
39
+ return t;
40
+ }
41
+
19
42
  function __makeTemplateObject(cooked, raw) {
20
43
  if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
21
44
  return cooked;
@@ -19094,21 +19117,22 @@ var BrandIcons = /*#__PURE__*/Object.freeze({
19094
19117
  });
19095
19118
 
19096
19119
  var SOCIAL_ICONS = ["facebook", "instagram", "linkedin"];
19120
+ var toFaIcon = function (icon) { return "fa".concat(icon.charAt(0).toUpperCase() + icon.slice(1)); };
19097
19121
  var getIcon = function (icon) {
19098
19122
  if (SOCIAL_ICONS.includes(icon)) {
19099
19123
  if (icon === "facebook") {
19100
19124
  return faFacebookSquare;
19101
19125
  }
19102
- var iconName_1 = "fa".concat(icon.charAt(0).toUpperCase() + icon.slice(1));
19126
+ var iconName_1 = toFaIcon(icon);
19103
19127
  return BrandIcons[iconName_1];
19104
19128
  }
19105
- var iconName = "fa".concat(icon.charAt(0).toUpperCase() + icon.slice(1));
19129
+ var iconName = toFaIcon(icon);
19106
19130
  return SolidIcons[iconName];
19107
19131
  };
19108
19132
  var Icon = function (_a) {
19109
- var icon = _a.icon;
19133
+ var icon = _a.icon, props = __rest(_a, ["icon"]);
19110
19134
  var iconType = getIcon(icon);
19111
- return React.createElement(FontAwesomeIcon, { icon: iconType });
19135
+ return React.createElement(FontAwesomeIcon, __assign({ icon: iconType }, props));
19112
19136
  };
19113
19137
 
19114
19138
  var Input = styled.input(templateObject_1$7 || (templateObject_1$7 = __makeTemplateObject(["\n background-color: var(--color-orange-transparent);\n border: 2px solid transparent;\n border-radius: var(--padding-xl);\n padding: var(--padding-l);\n position: relative;\n overflow: hidden;\n color: var(--color-navy);\n font-weight: var(--font-bold);\n\n &:focus, &:active {\n outline: none;\n border: 2px solid var(--color-green);\n }\n"], ["\n background-color: var(--color-orange-transparent);\n border: 2px solid transparent;\n border-radius: var(--padding-xl);\n padding: var(--padding-l);\n position: relative;\n overflow: hidden;\n color: var(--color-navy);\n font-weight: var(--font-bold);\n\n &:focus, &:active {\n outline: none;\n border: 2px solid var(--color-green);\n }\n"])));