@fluidattacks/design 10.4.0 → 11.0.0

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.
@@ -77,7 +77,7 @@ type TSize = keyof FluidTheme["typography"]["heading"];
77
77
  type TSpacing = keyof FluidTheme["spacing"];
78
78
  type TShadows = keyof FluidTheme["shadows"];
79
79
  type TIconSize = "xl" | "lg" | "md" | "sm" | "xs" | string;
80
- type TIconType = "fa-brands" | "fa-gradient" | "fa-kit" | "fa-light" | "fa-regular" | "fa-solid";
80
+ type TIconType = "fa-brands" | "fa-gradient" | "fa-kit" | "fa-kit-duotone" | "fa-light" | "fa-regular" | "fa-solid";
81
81
  type TOrientation = "horizontal" | "vertical";
82
82
  interface IPaddingModifiable {
83
83
  padding?: [TSpacing, TSpacing, TSpacing, TSpacing];
@@ -115,7 +115,7 @@ interface IBorderModifiable {
115
115
  borderRadius?: string;
116
116
  }
117
117
  interface IIconModifiable {
118
- icon: IconName | "priority-bars-high" | "priority-bars-low" | "priority-bars-medium";
118
+ icon: IconName | "azure-devops" | "gitlab-tanuki" | "priority-bars-high" | "priority-bars-low" | "priority-bars-medium";
119
119
  iconColor?: string;
120
120
  iconSize: TIconSize;
121
121
  iconType?: TIconType;
@@ -1,5 +1,5 @@
1
1
  import { PropsWithChildren } from 'react';
2
2
  import { IDrawerProps } from './types';
3
- declare const Drawer: ({ _containerId, _portal, actions, children, dismissable, footer, footerMessage, header, id, modalRef, side, size, subtitle, tabs, title, titleIcon, titleTag, onClose, }: Readonly<PropsWithChildren<IDrawerProps>>) => JSX.Element | null;
3
+ declare const Drawer: ({ _containerId, _portal, actions, children, dismissable, footer, footerMessage, header, id, modalRef, side, size, subtitle, tabs, title, titleIcon, titleIconColor, titleIconSecondaryColor, titleIconType, titleTag, onClose, }: Readonly<PropsWithChildren<IDrawerProps>>) => JSX.Element | null;
4
4
  export { Drawer };
5
5
  export type { IDrawerProps } from './types';
@@ -1,45 +1,48 @@
1
1
  import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
- import { useCallback as k, useEffect as O } from "react";
3
- import { createPortal as L } from "react-dom";
4
- import { useTheme as P } from "styled-components";
5
- import { DrawerWrapper as K, DrawerPanel as q, DrawerBody as A } from "./styles.js";
6
- import { Button as F } from "../button/index.js";
2
+ import { useCallback as C, useEffect as K } from "react";
3
+ import { createPortal as q } from "react-dom";
4
+ import { useTheme as A } from "styled-components";
5
+ import { DrawerWrapper as F, DrawerPanel as G, DrawerBody as H } from "./styles.js";
6
+ import { Button as J } from "../button/index.js";
7
7
  import { Container as i } from "../container/index.js";
8
- import { Icon as G } from "../icon/index.js";
9
- import { IconButton as C } from "../icon-button/index.js";
10
- import { Tabs as H } from "../tabs/index.js";
8
+ import { Icon as N } from "../icon/index.js";
9
+ import { IconButton as T } from "../icon-button/index.js";
10
+ import { Tabs as Q } from "../tabs/index.js";
11
11
  import "../typography/heading/index.js";
12
12
  import "../typography/span/index.js";
13
- import { Text as T } from "../typography/text/index.js";
14
- const re = ({
15
- _containerId: D = "portals",
16
- _portal: S = !0,
17
- actions: W = void 0,
18
- children: z = void 0,
13
+ import { Text as D } from "../typography/text/index.js";
14
+ const ne = ({
15
+ _containerId: W = "portals",
16
+ _portal: z = !0,
17
+ actions: B = void 0,
18
+ children: O = void 0,
19
19
  dismissable: a = !0,
20
20
  footer: s = void 0,
21
- footerMessage: y = void 0,
22
- header: B = void 0,
21
+ footerMessage: f = void 0,
22
+ header: S = void 0,
23
23
  id: d = "drawer-container",
24
24
  modalRef: n,
25
25
  side: g = "right",
26
- size: I = "md",
26
+ size: b = "md",
27
27
  subtitle: v = void 0,
28
28
  tabs: w = void 0,
29
- title: b,
29
+ title: j,
30
30
  titleIcon: x = void 0,
31
- titleTag: j = void 0,
32
- onClose: u = void 0
31
+ titleIconColor: E = void 0,
32
+ titleIconSecondaryColor: u = void 0,
33
+ titleIconType: I = "fa-solid",
34
+ titleTag: L = void 0,
35
+ onClose: $ = void 0
33
36
  }) => {
34
- const o = P(), p = k(() => {
35
- n.close(), u?.();
36
- }, [n, u]), E = k(
37
+ const o = A(), p = C(() => {
38
+ n.close(), $?.();
39
+ }, [n, $]), P = C(
37
40
  (r) => {
38
41
  a && r.target === r.currentTarget && p();
39
42
  },
40
43
  [a, p]
41
44
  );
42
- O(() => {
45
+ K(() => {
43
46
  if (!a || !n.isOpen)
44
47
  return () => {
45
48
  };
@@ -50,18 +53,18 @@ const re = ({
50
53
  window.removeEventListener("keydown", r);
51
54
  };
52
55
  }, [a, p, n.isOpen]);
53
- const $ = /* @__PURE__ */ e(
54
- K,
56
+ const k = /* @__PURE__ */ e(
57
+ F,
55
58
  {
56
59
  $side: g,
57
60
  id: `${d}-wrapper`,
58
- onClick: E,
61
+ onClick: P,
59
62
  role: "presentation",
60
63
  children: /* @__PURE__ */ t(
61
- q,
64
+ G,
62
65
  {
63
66
  $side: g,
64
- $size: I,
67
+ $size: b,
65
68
  "aria-label": n.name,
66
69
  "aria-modal": "true",
67
70
  "data-testid": d,
@@ -108,12 +111,14 @@ const re = ({
108
111
  minWidth: "2rem",
109
112
  width: "2rem",
110
113
  children: /* @__PURE__ */ e(
111
- G,
114
+ N,
112
115
  {
113
116
  icon: x,
114
- iconColor: o.palette.gray[700],
117
+ iconColor: E ?? o.palette.gray[700],
115
118
  iconSize: "md",
116
- iconType: "fa-solid"
119
+ iconType: I,
120
+ secondaryColor: u,
121
+ secondaryOpacity: u === void 0 ? void 0 : 1
117
122
  }
118
123
  )
119
124
  }
@@ -134,7 +139,7 @@ const re = ({
134
139
  minWidth: "0",
135
140
  children: [
136
141
  /* @__PURE__ */ e(
137
- T,
142
+ D,
138
143
  {
139
144
  color: o.palette.gray[800],
140
145
  display: "inline-block",
@@ -143,15 +148,15 @@ const re = ({
143
148
  size: "lg",
144
149
  textOverflow: "ellipsis",
145
150
  whiteSpace: "nowrap",
146
- children: b
151
+ children: j
147
152
  }
148
153
  ),
149
- j
154
+ L
150
155
  ]
151
156
  }
152
157
  ),
153
158
  v === void 0 ? void 0 : /* @__PURE__ */ e(
154
- T,
159
+ D,
155
160
  {
156
161
  color: o.palette.gray[400],
157
162
  overflow: "hidden",
@@ -167,21 +172,21 @@ const re = ({
167
172
  ]
168
173
  }
169
174
  ),
170
- B
175
+ S
171
176
  ]
172
177
  }
173
178
  ),
174
179
  /* @__PURE__ */ t(i, { display: "flex", gap: 0.25, children: [
175
- W?.map(
180
+ B?.map(
176
181
  ({
177
182
  disabled: r,
178
183
  icon: l,
179
184
  iconColor: h,
180
185
  shadow: c,
181
- tooltip: f,
186
+ tooltip: y,
182
187
  onClick: m
183
188
  }) => /* @__PURE__ */ e(
184
- C,
189
+ T,
185
190
  {
186
191
  disabled: r,
187
192
  icon: l ?? "paper-plane",
@@ -190,14 +195,14 @@ const re = ({
190
195
  iconType: "fa-light",
191
196
  onClick: m,
192
197
  shadow: c,
193
- tooltip: f,
198
+ tooltip: y,
194
199
  variant: "ghost"
195
200
  },
196
201
  `${d}-${l}`
197
202
  )
198
203
  ),
199
204
  a ? /* @__PURE__ */ e(
200
- C,
205
+ T,
201
206
  {
202
207
  icon: "xmark",
203
208
  iconColor: o.palette.gray[400],
@@ -212,9 +217,9 @@ const re = ({
212
217
  ]
213
218
  }
214
219
  ),
215
- w ? /* @__PURE__ */ e(i, { display: "flex", pt: 0.25, width: "100%", children: /* @__PURE__ */ e(H, { items: w }) }) : void 0,
216
- /* @__PURE__ */ e(A, { children: z }),
217
- s || y ? /* @__PURE__ */ t(
220
+ w ? /* @__PURE__ */ e(i, { display: "flex", pt: 0.25, width: "100%", children: /* @__PURE__ */ e(Q, { items: w }) }) : void 0,
221
+ /* @__PURE__ */ e(H, { children: O }),
222
+ s || f ? /* @__PURE__ */ t(
218
223
  i,
219
224
  {
220
225
  alignSelf: "stretch",
@@ -225,7 +230,7 @@ const re = ({
225
230
  px: 1.25,
226
231
  py: 1,
227
232
  children: [
228
- y,
233
+ f,
229
234
  s ? /* @__PURE__ */ e(
230
235
  i,
231
236
  {
@@ -234,13 +239,13 @@ const re = ({
234
239
  justify: "end",
235
240
  width: "100%",
236
241
  children: s.map(
237
- ({ disabled: r, icon: l, id: h, text: c, onClick: f }, m) => /* @__PURE__ */ e(
238
- F,
242
+ ({ disabled: r, icon: l, id: h, text: c, onClick: y }, m) => /* @__PURE__ */ e(
243
+ J,
239
244
  {
240
245
  disabled: r,
241
246
  icon: l,
242
247
  id: h,
243
- onClick: f,
248
+ onClick: y,
244
249
  variant: m === 0 ? "primary" : "tertiary",
245
250
  width: "100%",
246
251
  children: c
@@ -258,11 +263,11 @@ const re = ({
258
263
  )
259
264
  }
260
265
  );
261
- return n.isOpen ? S ? L(
262
- $,
263
- document.getElementById(D) ?? document.body
264
- ) : $ : null;
266
+ return n.isOpen ? z ? q(
267
+ k,
268
+ document.getElementById(W) ?? document.body
269
+ ) : k : null;
265
270
  };
266
271
  export {
267
- re as Drawer
272
+ ne as Drawer
268
273
  };
@@ -52,6 +52,9 @@ interface IDrawerButtonProps extends Partial<IIconModifiable> {
52
52
  * @property { ITabProps[] } [tabs] - The tab items.
53
53
  * @property { string } title - The title of the drawer.
54
54
  * @property { IIconModifiable["icon"] } [titleIcon] - Icon shown beside the title.
55
+ * @property { string } [titleIconColor] - Color of the title icon.
56
+ * @property { string } [titleIconSecondaryColor] - Color of a duotone title icon's secondary layer, shown at full opacity.
57
+ * @property { IIconModifiable["iconType"] } [titleIconType] - Font Awesome style of the title icon.
55
58
  * @property { React.ReactNode } [titleTag] - Content shown on the title line, after the title.
56
59
  * @property { Function } [onClose] - Handler called after the drawer closes.
57
60
  */
@@ -71,6 +74,9 @@ interface IDrawerProps {
71
74
  tabs?: ITabProps[];
72
75
  title: string;
73
76
  titleIcon?: IIconModifiable["icon"];
77
+ titleIconColor?: string;
78
+ titleIconSecondaryColor?: string;
79
+ titleIconType?: IIconModifiable["iconType"];
74
80
  titleTag?: React.ReactNode;
75
81
  onClose?: () => void;
76
82
  }
@@ -1,91 +1,92 @@
1
- import { jsx as r, jsxs as s } from "react/jsx-runtime";
2
- import { yupResolver as S } from "../../node_modules/@hookform/resolvers/yup/dist/yup.js";
3
- import { useForm as j, FormProvider as k } from "../../node_modules/react-hook-form/dist/index.esm.js";
4
- import { Controller as J, useController as K, useFieldArray as L, useFormContext as M, useWatch as N } from "../../node_modules/react-hook-form/dist/index.esm.js";
5
- import { useTheme as D } from "styled-components";
6
- import { InnerForm as U } from "./inner-form/index.js";
7
- import { StyledForm as P, FormContent as R } from "./styles.js";
8
- import { Button as h } from "../button/index.js";
1
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
2
+ import { yupResolver as j } from "../../node_modules/@hookform/resolvers/yup/dist/yup.js";
3
+ import { useForm as k, FormProvider as D } from "../../node_modules/react-hook-form/dist/index.esm.js";
4
+ import { Controller as K, useController as L, useFieldArray as M, useFormContext as N, useWatch as Q } from "../../node_modules/react-hook-form/dist/index.esm.js";
5
+ import { useTheme as P } from "styled-components";
6
+ import { InnerForm as V } from "./inner-form/index.js";
7
+ import { StyledForm as R, FormContent as W } from "./styles.js";
8
+ import { Button as x } from "../button/index.js";
9
9
  import { Container as l } from "../container/index.js";
10
- const A = ({
10
+ const E = ({
11
11
  alert: n,
12
- buttonAlignment: a,
13
- cancelButton: o,
12
+ buttonAlignment: d,
13
+ cancelButton: e,
14
14
  children: u,
15
- confirmButton: t,
16
- defaultDisabled: x = !0,
17
- id: d = "modal-confirm",
18
- maxButtonWidth: y = "392px",
19
- mode: b,
20
- onSubmit: g,
21
- padding: C = !0,
22
- showButtons: m = !0,
23
- yupSchema: p,
15
+ confirmButton: i,
16
+ defaultDisabled: y = !0,
17
+ id: p = "modal-confirm",
18
+ maxButtonWidth: b,
19
+ mode: g,
20
+ onSubmit: C,
21
+ padding: m = !0,
22
+ showButtons: a = !0,
23
+ yupSchema: c,
24
24
  ...F
25
25
  }) => {
26
- const e = D(), i = j({
26
+ const r = P(), t = k({
27
27
  ...F,
28
- mode: b ?? "all",
29
- resolver: p ? S(p) : void 0
28
+ mode: g ?? "all",
29
+ resolver: c ? j(c) : void 0
30
30
  });
31
- function $(f) {
32
- f.stopPropagation(), i.handleSubmit(g)(f);
31
+ function $(h) {
32
+ h.stopPropagation(), t.handleSubmit(C)(h);
33
33
  }
34
- const v = m ? `calc(100% - ${n ? "139px" : "83px"})` : "100%", c = C ? 1.5 : 0;
35
- return /* @__PURE__ */ r(k, { ...i, children: /* @__PURE__ */ r(P, { onSubmit: $, children: /* @__PURE__ */ s(l, { scroll: "y", width: "100%", children: [
36
- /* @__PURE__ */ r(
37
- R,
34
+ const v = a ? `calc(100% - ${n ? "139px" : "83px"})` : "100%", f = m ? 1.5 : 0, S = b ?? (e ? "392px" : "190px");
35
+ return /* @__PURE__ */ o(D, { ...t, children: /* @__PURE__ */ o(R, { onSubmit: $, children: /* @__PURE__ */ s(l, { scroll: "y", width: "100%", children: [
36
+ /* @__PURE__ */ o(
37
+ W,
38
38
  {
39
- borderRadius: `0 0 ${e.spacing[0.25]} ${e.spacing[0.25]}`,
39
+ $padded: m,
40
+ borderRadius: `0 0 ${r.spacing[0.25]} ${r.spacing[0.25]}`,
40
41
  display: "flex",
41
42
  flexDirection: "column",
42
43
  gap: 0.5,
43
44
  height: v,
44
- pb: c,
45
+ pb: f,
45
46
  pt: 0,
46
- px: c,
47
+ px: f,
47
48
  scroll: "y",
48
49
  children: u
49
50
  }
50
51
  ),
51
- m && /* @__PURE__ */ s(
52
+ a && /* @__PURE__ */ s(
52
53
  l,
53
54
  {
54
- borderRadius: `0 0 ${e.spacing[0.25]} ${e.spacing[0.25]}`,
55
- borderTop: `1px solid ${e.palette.gray[200]}`,
55
+ borderRadius: `0 0 ${r.spacing[0.25]} ${r.spacing[0.25]}`,
56
+ borderTop: `1px solid ${r.palette.gray[200]}`,
56
57
  display: "flex",
57
- flexDirection: a ? "unset" : "column",
58
+ flexDirection: d ? "unset" : "column",
58
59
  gap: 0.625,
59
- justify: a ?? "stretch",
60
+ justify: d ?? "stretch",
60
61
  position: "sticky",
61
62
  px: 1.25,
62
63
  py: 1.25,
63
64
  children: [
64
65
  n,
65
- /* @__PURE__ */ s(l, { display: "flex", gap: 0.75, maxWidth: y, children: [
66
- o ? /* @__PURE__ */ r(
67
- h,
66
+ /* @__PURE__ */ s(l, { display: "flex", gap: 0.75, maxWidth: S, children: [
67
+ e ? /* @__PURE__ */ o(
68
+ x,
68
69
  {
69
- icon: o.icon,
70
- id: `${d}-cancel`,
70
+ icon: e.icon,
71
+ id: `${p}-cancel`,
71
72
  justify: "center",
72
- onClick: o.onClick,
73
+ onClick: e.onClick,
73
74
  type: "reset",
74
75
  variant: "tertiary",
75
76
  width: "100%",
76
- children: o.label ?? "Cancel"
77
+ children: e.label ?? "Cancel"
77
78
  }
78
79
  ) : void 0,
79
- /* @__PURE__ */ r(
80
- h,
80
+ /* @__PURE__ */ o(
81
+ x,
81
82
  {
82
- disabled: (t?.disabled ?? !1) || i.formState.isSubmitting || x && !i.formState.isDirty,
83
- icon: t?.icon,
84
- id: d,
83
+ disabled: (i?.disabled ?? !1) || t.formState.isSubmitting || y && !t.formState.isDirty,
84
+ icon: i?.icon,
85
+ id: p,
85
86
  justify: "center",
86
87
  type: "submit",
87
88
  width: "100%",
88
- children: t?.label ?? "Confirm"
89
+ children: i?.label ?? "Confirm"
89
90
  }
90
91
  )
91
92
  ] })
@@ -95,11 +96,11 @@ const A = ({
95
96
  ] }) }) });
96
97
  };
97
98
  export {
98
- J as Controller,
99
- A as Form,
100
- U as InnerForm,
101
- K as useController,
102
- L as useFieldArray,
103
- M as useFormContext,
104
- N as useWatch
99
+ K as Controller,
100
+ E as Form,
101
+ V as InnerForm,
102
+ L as useController,
103
+ M as useFieldArray,
104
+ N as useFormContext,
105
+ Q as useWatch
105
106
  };
@@ -1,7 +1,11 @@
1
- declare const FormContent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<Omit<Readonly<import('react').PropsWithChildren<import('../container').IContainerProps>> & import('react').RefAttributes<HTMLDivElement>, "ref"> & {
1
+ declare const FormContent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<Omit<Readonly<import('react').PropsWithChildren<import('../container').IContainerProps>> & import('react').RefAttributes<HTMLDivElement>, "ref"> & {
2
2
  ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
3
- }, never> & Partial<Pick<Omit<Readonly<import('react').PropsWithChildren<import('../container').IContainerProps>> & import('react').RefAttributes<HTMLDivElement>, "ref"> & {
3
+ }, "$padded"> & {
4
+ $padded: boolean;
5
+ }, never> & Partial<Pick<import('styled-components').FastOmit<Omit<Readonly<import('react').PropsWithChildren<import('../container').IContainerProps>> & import('react').RefAttributes<HTMLDivElement>, "ref"> & {
4
6
  ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
7
+ }, "$padded"> & {
8
+ $padded: boolean;
5
9
  }, never>>> & string & Omit<import('react').ForwardRefExoticComponent<Readonly<import('react').PropsWithChildren<import('../container').IContainerProps>> & import('react').RefAttributes<HTMLDivElement>>, keyof import('react').Component<any, {}, any>>;
6
10
  declare const StyledForm: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<import('react').FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, never>>> & string;
7
11
  export { FormContent, StyledForm };
@@ -1,26 +1,30 @@
1
- import { styled as o } from "styled-components";
2
- import { Container as e } from "../container/index.js";
3
- const l = o(e)`
1
+ import { styled as i } from "styled-components";
2
+ import { Container as n } from "../container/index.js";
3
+ const e = i(n)`
4
4
  > * {
5
5
  flex-shrink: 0;
6
6
  }
7
7
 
8
- &:has(> #sticky-footer) {
9
- height: auto;
10
- overflow: visible;
11
- }
12
- `, n = o.form`
13
- ${({ theme: t }) => `
8
+ ${({ $padded: o, theme: t }) => o ? "" : `
9
+ > #footer {
10
+ box-sizing: content-box;
11
+ padding-bottom: ${t.spacing[1.25]};
12
+ padding-left: ${t.spacing[1.25]};
13
+ padding-right: ${t.spacing[1.25]};
14
+ }
15
+ `}
16
+ `, s = i.form`
17
+ ${({ theme: o }) => `
14
18
  align-items: flex-start;
15
19
  align-self: stretch;
16
20
  display: flex;
17
21
  flex-direction: column;
18
- gap: ${t.spacing[0.5]};
22
+ gap: ${o.spacing[0.5]};
19
23
  overflow: hidden auto;
20
24
  width: 100%;
21
25
  `}
22
26
  `;
23
27
  export {
24
- l as FormContent,
25
- n as StyledForm
28
+ e as FormContent,
29
+ s as StyledForm
26
30
  };
@@ -29,7 +29,7 @@ interface IButtonProps {
29
29
  * @property { IButtonProps } [confirmButton] - The confirm button props.
30
30
  * @property { boolean } [defaultDisabled] - Whether the submit button is disabled by default.
31
31
  * @property { string } [id] - The form id.
32
- * @property { string } [maxButtonWidth] - The max button width.
32
+ * @property { string } [maxButtonWidth] - The max width of the buttons row. Defaults to 392px with a cancel button, or 190px for a single button.
33
33
  * @property { Function } onSubmit - The callback to be called when the form is submitted.
34
34
  * @property { boolean } [showButtons] - Whether to show the action buttons.
35
35
  * @property { Schema } [yupSchema] - The yup schema for form validation.
@@ -7,16 +7,17 @@ const w = b(function({
7
7
  hoverColor: l,
8
8
  icon: o,
9
9
  iconClass: n = "",
10
- iconColor: f,
10
+ iconColor: c,
11
11
  iconMask: r,
12
- iconSize: c,
12
+ iconSize: f,
13
13
  iconTransform: e,
14
14
  iconType: a = "fa-solid",
15
15
  onClick: $,
16
16
  rotation: m,
17
17
  spanClass: p,
18
18
  secondaryColor: v,
19
- ...I
19
+ secondaryOpacity: I,
20
+ ...y
20
21
  }, C) {
21
22
  const t = a === "fa-gradient", N = [
22
23
  t ? "fa-solid" : a,
@@ -28,17 +29,18 @@ const w = b(function({
28
29
  g,
29
30
  {
30
31
  $clickable: d,
31
- $color: f,
32
+ $color: c,
32
33
  $disabled: i,
33
34
  $hoverColor: l,
34
35
  $rotation: m,
35
36
  $secondaryColor: v,
36
- $size: c,
37
+ $secondaryOpacity: I,
38
+ $size: f,
37
39
  className: p,
38
40
  "data-testid": `${o}-icon`,
39
41
  onClick: $,
40
42
  ref: C,
41
- ...I,
43
+ ...y,
42
44
  children: /* @__PURE__ */ s(
43
45
  "i",
44
46
  {
@@ -7,6 +7,7 @@ interface IStyledIconWrapProps {
7
7
  $rotation?: IIconWrapProps["rotation"];
8
8
  $size: IIconWrapProps["iconSize"];
9
9
  $secondaryColor: IIconWrapProps["secondaryColor"];
10
+ $secondaryOpacity?: IIconWrapProps["secondaryOpacity"];
10
11
  }
11
12
  declare const IconWrap: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<Omit<import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof import('../@core').IPaddingModifiable | keyof import('../@core').IMarginModifiable | keyof import('../@core').IPositionModifiable | keyof import('../@core').IBorderModifiable | keyof import('../@core').IDisplayModifiable | keyof import('../@core').ITextModifiable | keyof import('../@core').IInteractionModifiable> & import('../@core').IBorderModifiable & import('../@core').IDisplayModifiable & import('../@core').IInteractionModifiable & import('../@core').IMarginModifiable & import('../@core').IPaddingModifiable & import('../@core').IPositionModifiable & import('../@core').ITextModifiable, never> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof import('../@core').IPaddingModifiable | keyof import('../@core').IMarginModifiable | keyof import('../@core').IPositionModifiable | keyof import('../@core').IBorderModifiable | keyof import('../@core').IDisplayModifiable | keyof import('../@core').ITextModifiable | keyof import('../@core').IInteractionModifiable> & import('../@core').IBorderModifiable & import('../@core').IDisplayModifiable & import('../@core').IInteractionModifiable & import('../@core').IMarginModifiable & import('../@core').IPaddingModifiable & import('../@core').IPositionModifiable & import('../@core').ITextModifiable, never>>, "as" | "forwardedAs"> & {
12
13
  as?: import('styled-components').WebTarget | undefined;
@@ -1,4 +1,4 @@
1
- import { styled as n } from "styled-components";
1
+ import { styled as o } from "styled-components";
2
2
  import { BaseSpanComponent as g } from "../@core/styles.js";
3
3
  const t = {
4
4
  xl: "24px",
@@ -6,28 +6,30 @@ const t = {
6
6
  md: "14px",
7
7
  sm: "12px",
8
8
  xs: "10px"
9
- }, f = (r) => t[r] ? t[r] : typeof r == "string" && r.includes("px") ? r : t.md, h = n(g)`
9
+ }, c = (r) => t[r] ? t[r] : typeof r == "string" && r.includes("px") ? r : t.md, m = o(g)`
10
10
  ${({
11
11
  $clickable: r,
12
- $color: o = "inherit",
13
- $disabled: l = !1,
12
+ $color: l = "inherit",
13
+ $disabled: s = !1,
14
14
  $hoverColor: e,
15
15
  $rotation: i,
16
- $size: s,
17
- $secondaryColor: a
16
+ $size: a,
17
+ $secondaryColor: d,
18
+ $secondaryOpacity: n
18
19
  }) => {
19
- const d = e ? "" : "brightness(50%)", p = e ?? "";
20
+ const p = e ? "" : "brightness(50%)", f = e ?? "";
20
21
  return `
21
- color: ${o};
22
+ color: ${l};
22
23
  cursor: ${r ? "pointer" : "inherit"};
23
- font-size: ${f(s)};
24
+ font-size: ${c(a)};
24
25
  line-height: 0;
25
26
  vertical-align: middle;
26
27
  pointer-events: inherit;
27
- opacity: ${l ? "0.5" : "1"};
28
+ opacity: ${s ? "0.5" : "1"};
28
29
 
29
30
  > svg {
30
- --fa-secondary-color: ${a};
31
+ --fa-secondary-color: ${d};
32
+ ${n === void 0 ? "" : `--fa-secondary-opacity: ${n};`}
31
33
  transform: ${i === void 0 ? "" : `rotate(${i}deg)`};
32
34
  }
33
35
 
@@ -41,13 +43,13 @@ const t = {
41
43
  }
42
44
 
43
45
  ${r ? `&:hover {
44
- filter: ${d};
45
- color: ${p};
46
+ filter: ${p};
47
+ color: ${f};
46
48
  }` : ""}
47
49
  `;
48
50
  }}
49
51
  `;
50
- n.div`
52
+ o.div`
51
53
  cursor: pointer;
52
54
  transition: all 0.2s ease-in-out;
53
55
 
@@ -56,5 +58,5 @@ n.div`
56
58
  }
57
59
  `;
58
60
  export {
59
- h as IconWrap
61
+ m as IconWrap
60
62
  };