@cfx-dev/ui-components 5.0.16 → 5.0.17

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 +1 @@
1
- @keyframes cfxui__Flyout__holder-appearance-rtl__3ccf2{0%{opacity:0;transform:translate(calc(var(--quant) * 2.5))}to{opacity:1;transform:translate(0)}}@keyframes cfxui__Flyout__holder-appearance-btu__84100{0%{opacity:0;transform:translateY(calc(var(--quant) * 2.5))}to{opacity:1;transform:translateY(0)}}@keyframes cfxui__Flyout__backdrop-appearance-rtl__9f651{0%{opacity:0}to{opacity:1}}.cfxui__Flyout__root__eba04{position:fixed;z-index:1000;top:0;right:0;bottom:0;left:0;pointer-events:none}.cfxui__Flyout__root__eba04 .cfxui__Flyout__backdrop__57f9e{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--color-overlay-backdrop-background);opacity:0;pointer-events:none}.cfxui__Flyout__root__eba04 .cfxui__Flyout__holder__d80b5{position:fixed;top:0;right:0;bottom:0;left:0;border-radius:0;background:rgba(var(--color-bg),1);opacity:0;transform:translate(calc(var(--quant) * 2.5));pointer-events:none}.cfxui__Flyout__root__eba04 .cfxui__Flyout__holder__d80b5 .cfxui__Flyout__content__04e42{width:100%;height:100%;overflow:hidden}@media (min-width: 640px){.cfxui__Flyout__root__eba04 .cfxui__Flyout__holder__d80b5{inset:0 0 0 calc(100vw - 420px);border-radius:var(--border-radius-medium) 0 0 var(--border-radius-medium)}}.cfxui__Flyout__root__eba04 .cfxui__Flyout__header__40009{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--quant) * 2)}.cfxui__Flyout__root__eba04 .cfxui__Flyout__header__40009 .cfxui__Flyout__title__b235a{flex-grow:1;width:1px;display:flex;align-items:center;gap:calc(var(--quant) * 2);font-size:var(--font-size-xxlarge)}.cfxui__Flyout__root__eba04.cfxui__Flyout__active__14a29 .cfxui__Flyout__backdrop__57f9e{opacity:1;pointer-events:all;animation:cfxui__Flyout__backdrop-appearance__d9564 .2s ease}.cfxui__Flyout__root__eba04.cfxui__Flyout__active__14a29 .cfxui__Flyout__mask__72713{opacity:1}.cfxui__Flyout__root__eba04.cfxui__Flyout__active__14a29 .cfxui__Flyout__holder__d80b5{opacity:1;transform:translate(0);pointer-events:all;animation:cfxui__Flyout__holder-appearance-btu__84100 .2s ease}@media (min-width: 640px){.cfxui__Flyout__root__eba04.cfxui__Flyout__active__14a29 .cfxui__Flyout__holder__d80b5{animation:cfxui__Flyout__holder-appearance-rtl__3ccf2 .2s ease}}.cfxui__Flyout__root__eba04.cfxui__Flyout__theme-legacy__a3452{--offset-flyout: calc((100vh - (var(--height) - var(--offset-safezone) * 2) * 1) * .5 - var(--quant) * 4);top:var(--offset-flyout, initial);bottom:var(--offset-flyout, initial);padding:calc((100vh - (var(--height) - var(--offset-safezone) * 2) * 1) * .5 - var(--offset-flyout, initial)) calc((100vw - (var(--width) - var(--offset-safezone) * 2) * 1) * .5) calc((100vh - (var(--height) - var(--offset-safezone) * 2) * 1) * .5 - var(--offset-flyout, initial)) calc(var(--quant) * 6);border-radius:var(--border-radius-large) 0 0 var(--border-radius-large);box-shadow:0 0 0 calc(var(--quant) * .25) var(--color-flyout-holder-border) inset,var(--shadow-large, initial)}.cfxui__Flyout__root__eba04.cfxui__Flyout__theme-legacy__a3452 .cfxui__Flyout__mask__72713{--mask-right: var(--viewport-right, initial);--mask-right-offset: calc(var(--mask-right, initial) - var(--quant) * 4);position:fixed;top:0;right:0;bottom:0;left:0;mask:linear-gradient(90deg,#000 0%,#000 var(--mask-right-offset, initial),transparent var(--mask-right, initial),transparent 100%);opacity:0;pointer-events:none}.cfxui__Flyout__root__eba04.cfxui__Flyout__theme-legacy__a3452.cfxui__Flyout__size-medium__1fc09 .cfxui__Flyout__holder__d80b5{left:32vw}.cfxui__Flyout__root__eba04.cfxui__Flyout__theme-legacy__a3452.cfxui__Flyout__size-small__038a5 .cfxui__Flyout__holder__d80b5{left:48vw}.cfxui__Flyout__root__eba04.cfxui__Flyout__theme-legacy__a3452.cfxui__Flyout__size-xsmall__839e8 .cfxui__Flyout__holder__d80b5{left:64vw}.cfxui__Flyout__root__eba04.cfxui__Flyout__theme-legacy__a3452.cfxui__Flyout__size-xxsmall__33712 .cfxui__Flyout__holder__d80b5{left:80vw;padding:calc(var(--quant) * 5) calc(var(--quant) * 3.75)}
1
+ @keyframes cfxui__Flyout__backdrop-appearance__d9564{0%{opacity:0}to{opacity:1}}@keyframes cfxui__Flyout__backdrop-disappearance__bf898{0%{opacity:1}to{opacity:0}}@keyframes cfxui__Flyout__holder-appearance-rtl__3ccf2{0%{opacity:0;transform:translate(calc(var(--quant) * 2.5))}to{opacity:1;transform:translate(0)}}@keyframes cfxui__Flyout__holder-appearance-btu__84100{0%{opacity:0;transform:translateY(calc(var(--quant) * 2.5))}to{opacity:1;transform:translateY(0)}}@keyframes cfxui__Flyout__holder-appearance-ltr__83bd2{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(calc(var(--quant) * 2.5))}}@keyframes cfxui__Flyout__holder-appearance-utb__846eb{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(calc(var(--quant) * 2.5))}}.cfxui__Flyout__root__eba04{position:fixed;z-index:1000;top:0;right:0;bottom:0;left:0;pointer-events:none}.cfxui__Flyout__root__eba04 .cfxui__Flyout__backdrop__57f9e{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--color-overlay-backdrop-background);opacity:0;pointer-events:none;animation:cfxui__Flyout__backdrop-disappearance__bf898 .2s ease}.cfxui__Flyout__root__eba04 .cfxui__Flyout__holder__d80b5{position:fixed;top:0;right:0;bottom:0;left:0;border-radius:0;background:rgba(var(--color-bg),1);opacity:0;transform:translate(calc(var(--quant) * 2.5));pointer-events:none;animation:cfxui__Flyout__holder-appearance-utb__846eb .2s ease}.cfxui__Flyout__root__eba04 .cfxui__Flyout__holder__d80b5 .cfxui__Flyout__content__04e42{width:100%;height:100%;overflow:hidden}@media (min-width: 640px){.cfxui__Flyout__root__eba04 .cfxui__Flyout__holder__d80b5{inset:0 0 0 calc(100vw - 420px);border-radius:var(--border-radius-medium) 0 0 var(--border-radius-medium);animation:cfxui__Flyout__holder-appearance-ltr__83bd2 .2s ease}}.cfxui__Flyout__root__eba04 .cfxui__Flyout__header__40009{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--quant) * 2)}.cfxui__Flyout__root__eba04 .cfxui__Flyout__header__40009 .cfxui__Flyout__title__b235a{flex-grow:1;width:1px;display:flex;align-items:center;gap:calc(var(--quant) * 2);font-size:var(--font-size-xxlarge)}.cfxui__Flyout__root__eba04.cfxui__Flyout__active__14a29 .cfxui__Flyout__backdrop__57f9e{opacity:1;pointer-events:all;animation:cfxui__Flyout__backdrop-appearance__d9564 .2s ease}.cfxui__Flyout__root__eba04.cfxui__Flyout__active__14a29 .cfxui__Flyout__mask__72713{opacity:1}.cfxui__Flyout__root__eba04.cfxui__Flyout__active__14a29 .cfxui__Flyout__holder__d80b5{opacity:1;transform:translate(0);pointer-events:all;animation:cfxui__Flyout__holder-appearance-btu__84100 .2s ease}@media (min-width: 640px){.cfxui__Flyout__root__eba04.cfxui__Flyout__active__14a29 .cfxui__Flyout__holder__d80b5{animation:cfxui__Flyout__holder-appearance-rtl__3ccf2 .2s ease}}.cfxui__Flyout__root__eba04.cfxui__Flyout__theme-legacy__a3452{--offset-flyout: calc((100vh - (var(--height) - var(--offset-safezone) * 2) * 1) * .5 - var(--quant) * 4);top:var(--offset-flyout, initial);bottom:var(--offset-flyout, initial);padding:calc((100vh - (var(--height) - var(--offset-safezone) * 2) * 1) * .5 - var(--offset-flyout, initial)) calc((100vw - (var(--width) - var(--offset-safezone) * 2) * 1) * .5) calc((100vh - (var(--height) - var(--offset-safezone) * 2) * 1) * .5 - var(--offset-flyout, initial)) calc(var(--quant) * 6);border-radius:var(--border-radius-large) 0 0 var(--border-radius-large);box-shadow:0 0 0 calc(var(--quant) * .25) var(--color-flyout-holder-border) inset,var(--shadow-large, initial)}.cfxui__Flyout__root__eba04.cfxui__Flyout__theme-legacy__a3452 .cfxui__Flyout__mask__72713{--mask-right: var(--viewport-right, initial);--mask-right-offset: calc(var(--mask-right, initial) - var(--quant) * 4);position:fixed;top:0;right:0;bottom:0;left:0;mask:linear-gradient(90deg,#000 0%,#000 var(--mask-right-offset, initial),transparent var(--mask-right, initial),transparent 100%);opacity:0;pointer-events:none}.cfxui__Flyout__root__eba04.cfxui__Flyout__theme-legacy__a3452.cfxui__Flyout__size-medium__1fc09 .cfxui__Flyout__holder__d80b5{left:32vw}.cfxui__Flyout__root__eba04.cfxui__Flyout__theme-legacy__a3452.cfxui__Flyout__size-small__038a5 .cfxui__Flyout__holder__d80b5{left:48vw}.cfxui__Flyout__root__eba04.cfxui__Flyout__theme-legacy__a3452.cfxui__Flyout__size-xsmall__839e8 .cfxui__Flyout__holder__d80b5{left:64vw}.cfxui__Flyout__root__eba04.cfxui__Flyout__theme-legacy__a3452.cfxui__Flyout__size-xxsmall__33712 .cfxui__Flyout__holder__d80b5{left:80vw;padding:calc(var(--quant) * 5) calc(var(--quant) * 3.75)}
@@ -1 +1 @@
1
- .cfxui__Link__unsetAll__58fea{all:unset}.cfxui__Link__root__a29b3{display:inline-flex;border-radius:var(--border-radius-xsmall);color:var(--anchor-color)}.cfxui__Link__root__a29b3{transition:all .25s ease,outline-offset 0s,outline 0s}.cfxui__Link__root__a29b3:not([aria-disabled=true]){cursor:pointer;text-decoration:underline;text-decoration-color:currentcolor}.cfxui__Link__root__a29b3:not([aria-disabled=true]):hover{text-decoration-color:var(--anchor-decoration-color-hover)}.cfxui__Link__root__a29b3:not([aria-disabled=true]):focus-visible:not(:active,:hover){box-shadow:0 0 0 var(--anchor-outline-size, initial) var(--color-anchor-focus-outline)}.cfxui__Link__root__a29b3[aria-disabled=true]{cursor:not-allowed;opacity:.5}.cfxui__Link__root__a29b3[aria-disabled=true]:active{pointer-events:none}.cfxui__Link__root__a29b3.cfxui__Link__unstyled__f020c{text-decoration:none}
1
+ .cfxui__Link__unsetAll__58fea{all:unset}.cfxui__Link__root__a29b3{display:inline-flex;border-radius:var(--border-radius-xsmall);color:var(--anchor-color)}.cfxui__Link__root__a29b3{transition:all .25s ease,outline-offset 0s,outline 0s}.cfxui__Link__root__a29b3:not([aria-disabled=true]){cursor:pointer;text-decoration:underline;text-decoration-color:currentcolor}.cfxui__Link__root__a29b3:not([aria-disabled=true]):hover{text-decoration-color:var(--anchor-color-hover);color:var(--anchor-color-hover)}.cfxui__Link__root__a29b3:not([aria-disabled=true]):focus-visible:not(:active,:hover){box-shadow:0 0 0 var(--anchor-outline-size, initial) var(--color-anchor-focus-outline)}.cfxui__Link__root__a29b3[aria-disabled=true]{cursor:not-allowed;opacity:.4}.cfxui__Link__root__a29b3[aria-disabled=true]:active{pointer-events:none}.cfxui__Link__root__a29b3.cfxui__Link__unstyled__f020c{text-decoration:none;color:inherit}.cfxui__Link__root__a29b3.cfxui__Link__unstyled__f020c:hover{color:inherit}
@@ -1 +1 @@
1
- .cfxui__Text__root__2fe11{--trim-line-height: calc(var(--font-size-current) * var(--line-height-current));--trim-extra-height: calc(var(--trim-line-height) - 1cap);--trim-size: calc((var(--trim-extra-height) / 2) * -1)}.cfxui__Text__root__2fe11{transition:all .25s ease,outline-offset 0s,outline 0s}.cfxui__Text__root__2fe11:before{content:"";margin-bottom:calc(var(--trim-size) - .015cap);display:table}.cfxui__Text__root__2fe11:after{content:"";margin-top:calc(var(--trim-size) + .025cap);display:table}.cfxui__Text__root__2fe11.cfxui__Text__verticalTrimDisabled__34631:before,.cfxui__Text__root__2fe11.cfxui__Text__verticalTrimDisabled__34631:after{display:none;margin:0}.cfxui__Text__root__2fe11.cfxui__Text__centered__4d7bd{text-align:center}.cfxui__Text__root__2fe11.cfxui__Text__underlined__5860e{text-decoration:underline}.cfxui__Text__root__2fe11.cfxui__Text__strikethrough__e3ee3{text-decoration:line-through}.cfxui__Text__root__2fe11.cfxui__Text__truncated__417f4{width:100%;white-space:nowrap;overflow-x:clip;display:inline-block;mask:linear-gradient(90deg,rgba(var(--color-red),1),rgba(var(--color-red),1) calc(100% - 2ch),transparent)}.cfxui__Text__root__2fe11.cfxui__Text__typographic__d8155{overflow-wrap:break-word}.cfxui__Text__root__2fe11.cfxui__Text__typographic__d8155 li{margin-left:calc(var(--quant) * 4)}.cfxui__Text__root__2fe11:not(.cfxui__Text__typographic__d8155) a{color:inherit;text-decoration:none}.cfxui__Text__root__2fe11.cfxui__Text__block__cb1b6{max-width:100%}
1
+ .cfxui__Text__root__2fe11{--trim-line-height: calc(var(--font-size-current) * var(--line-height-current));--trim-extra-height: calc(var(--trim-line-height) - 1cap);--trim-size: calc((var(--trim-extra-height) / 2) * -1)}.cfxui__Text__root__2fe11{transition:all .25s ease,outline-offset 0s,outline 0s}.cfxui__Text__root__2fe11:before{content:"";margin-bottom:calc(var(--trim-size) - .015cap);display:table}.cfxui__Text__root__2fe11:after{content:"";margin-top:calc(var(--trim-size) + .025cap);display:table}.cfxui__Text__root__2fe11.cfxui__Text__verticalTrimDisabled__34631:before,.cfxui__Text__root__2fe11.cfxui__Text__verticalTrimDisabled__34631:after{display:none;margin:0}.cfxui__Text__root__2fe11.cfxui__Text__centered__4d7bd{text-align:center}.cfxui__Text__root__2fe11.cfxui__Text__underlined__5860e{text-decoration:underline}.cfxui__Text__root__2fe11.cfxui__Text__strikethrough__e3ee3{text-decoration:line-through}.cfxui__Text__root__2fe11.cfxui__Text__truncated__417f4{width:100%;white-space:nowrap;overflow-x:clip;display:inline-block;mask:linear-gradient(90deg,rgba(var(--color-red),1),rgba(var(--color-red),1) calc(100% - 2ch),transparent)}.cfxui__Text__root__2fe11.cfxui__Text__typographic__d8155{overflow-wrap:break-word}.cfxui__Text__root__2fe11.cfxui__Text__typographic__d8155 li{margin-left:calc(var(--quant) * 4)}.cfxui__Text__root__2fe11:not(.cfxui__Text__typographic__d8155) a{color:inherit;text-decoration:none}.cfxui__Text__root__2fe11:not(.cfxui__Text__typographic__d8155) a:hover{color:inherit}.cfxui__Text__root__2fe11.cfxui__Text__block__cb1b6{max-width:100%}
@@ -1,19 +1,22 @@
1
- import { jsx as o, jsxs as m } from "react/jsx-runtime";
1
+ import { jsx as _, jsxs as u } from "react/jsx-runtime";
2
2
  import y from "react";
3
3
  import { F as x } from "../../Combination-N-vN9BB-.js";
4
4
  import F from "../Button/Button.js";
5
5
  import { clsx as c } from "../../utils/clsx.js";
6
6
  import "../../utils/links.js";
7
- import { Interactive as k } from "../Interactive/Interactive.js";
8
- import { noop as b } from "../../utils/functional.js";
7
+ import { Interactive as b } from "../Interactive/Interactive.js";
8
+ import { noop as k } from "../../utils/functional.js";
9
9
  import "../../utils/hooks/useGlobalKeyboardEvent.js";
10
10
  import { useKeyboardClose as N } from "../../utils/hooks/useKeyboardClose.js";
11
11
  import { useOutlet as C } from "../../utils/hooks/useOutlet.js";
12
12
  const v = "cfxui__Flyout__root__eba04", z = "cfxui__Flyout__backdrop__57f9e", O = "cfxui__Flyout__holder__d80b5", L = "cfxui__Flyout__content__04e42", T = "cfxui__Flyout__header__40009", I = "cfxui__Flyout__title__b235a", E = "cfxui__Flyout__active__14a29", U = "cfxui__Flyout__mask__72713", e = {
13
13
  root: v,
14
14
  backdrop: z,
15
+ "backdrop-disappearance": "cfxui__Flyout__backdrop-disappearance__bf898",
15
16
  holder: O,
17
+ "holder-appearance-utb": "cfxui__Flyout__holder-appearance-utb__846eb",
16
18
  content: L,
19
+ "holder-appearance-ltr": "cfxui__Flyout__holder-appearance-ltr__83bd2",
17
20
  header: T,
18
21
  title: I,
19
22
  active: E,
@@ -25,50 +28,49 @@ const v = "cfxui__Flyout__root__eba04", z = "cfxui__Flyout__backdrop__57f9e", O
25
28
  "size-medium": "cfxui__Flyout__size-medium__1fc09",
26
29
  "size-small": "cfxui__Flyout__size-small__038a5",
27
30
  "size-xsmall": "cfxui__Flyout__size-xsmall__839e8",
28
- "size-xxsmall": "cfxui__Flyout__size-xxsmall__33712",
29
- "backdrop-appearance-rtl": "cfxui__Flyout__backdrop-appearance-rtl__9f651"
31
+ "size-xxsmall": "cfxui__Flyout__size-xxsmall__33712"
30
32
  }, g = "flyout-outlet", H = "cfxui-root", n = "shrink";
31
33
  function S(i) {
32
34
  const {
33
- disabled: t = !1,
35
+ disabled: o = !1,
34
36
  size: a = "medium",
35
- theme: s = "default",
36
- onClose: l = b,
37
- children: r,
38
- holderClassName: u,
37
+ theme: r = "default",
38
+ onClose: l = k,
39
+ children: s,
40
+ holderClassName: m,
39
41
  rootClassName: d,
40
- maskClassName: f
41
- } = i, p = C(g);
42
+ maskClassName: p
43
+ } = i, f = C(g);
42
44
  y.useEffect(() => {
43
- if (t)
45
+ if (o)
44
46
  return;
45
- const _ = document.getElementById(H);
46
- return _ == null || _.classList.add(n), () => _ == null ? void 0 : _.classList.remove(n);
47
- }, [t]), N(l);
47
+ const t = document.getElementById(H);
48
+ return t == null || t.classList.add(n), () => t == null ? void 0 : t.classList.remove(n);
49
+ }, [o]), N(l);
48
50
  const h = c(
49
51
  e.root,
50
52
  e[`size-${a}`],
51
- e[`theme-${s}`],
53
+ e[`theme-${r}`],
52
54
  {
53
- [e.active]: !t
55
+ [e.active]: !o
54
56
  },
55
57
  d
56
58
  );
57
- return /* @__PURE__ */ o(p, { children: /* @__PURE__ */ m("div", { className: h, children: [
58
- /* @__PURE__ */ o(k, { showPointer: !1, className: e.backdrop, onClick: l }),
59
- /* @__PURE__ */ o("div", { className: c(e.mask, f), children: /* @__PURE__ */ o("div", { className: c(e.holder, u), children: /* @__PURE__ */ o(x, { disabled: t, className: e.content, children: r }) }) })
59
+ return /* @__PURE__ */ _(f, { children: /* @__PURE__ */ u("div", { className: h, children: [
60
+ /* @__PURE__ */ _(b, { showPointer: !1, className: e.backdrop, onClick: l }),
61
+ /* @__PURE__ */ _("div", { className: c(e.mask, p), children: /* @__PURE__ */ _("div", { className: c(e.holder, m), children: /* @__PURE__ */ _(x, { disabled: o, className: e.content, children: s }) }) })
60
62
  ] }) });
61
63
  }
62
- S.Header = function(t) {
64
+ S.Header = function(o) {
63
65
  const {
64
66
  onClose: a,
65
- children: s,
67
+ children: r,
66
68
  ref: l,
67
- className: r
68
- } = t;
69
- return /* @__PURE__ */ m("div", { ref: l, className: c(e.header, r), children: [
70
- /* @__PURE__ */ o("div", { className: e.title, children: s }),
71
- !!a && /* @__PURE__ */ o(F, { icon: "Close", onClick: a })
69
+ className: s
70
+ } = o;
71
+ return /* @__PURE__ */ u("div", { ref: l, className: c(e.header, s), children: [
72
+ /* @__PURE__ */ _("div", { className: e.title, children: r }),
73
+ !!a && /* @__PURE__ */ _(F, { icon: "Close", onClick: a })
72
74
  ] });
73
75
  };
74
76
  export {
@@ -9,6 +9,7 @@ export interface IconButtonProps extends TextColorProps {
9
9
  areaSize?: IconButtonAreaSize;
10
10
  onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
11
11
  className?: string;
12
+ iconClassName?: string;
12
13
  disabled?: boolean;
13
14
  ariaLabel?: string;
14
15
  }
@@ -1,53 +1,55 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import p from "react";
3
- import { Icon as x } from "../Icon/Icon.js";
4
- import { clsx as I } from "../../utils/clsx.js";
5
- const B = "cfxui__IconButton__unset__de209", b = "cfxui__IconButton__root__5af4a", y = "cfxui__IconButton__medium__52958", g = "cfxui__IconButton__large__6d5d8", o = {
6
- unset: B,
7
- root: b,
8
- medium: y,
2
+ import x from "react";
3
+ import { Icon as I } from "../Icon/Icon.js";
4
+ import { clsx as B } from "../../utils/clsx.js";
5
+ const b = "cfxui__IconButton__unset__de209", y = "cfxui__IconButton__root__5af4a", N = "cfxui__IconButton__medium__52958", g = "cfxui__IconButton__large__6d5d8", o = {
6
+ unset: b,
7
+ root: y,
8
+ medium: N,
9
9
  large: g
10
10
  };
11
11
  function k(n) {
12
12
  const {
13
- name: e,
14
- onClick: a,
15
- className: c,
13
+ name: a,
14
+ onClick: e,
15
+ className: s,
16
+ iconClassName: c,
16
17
  disabled: r,
17
- ariaLabel: s,
18
- areaSize: _ = "small",
19
- size: u = "small",
20
- color: m = "primary",
18
+ ariaLabel: _,
19
+ areaSize: m = "small",
20
+ size: l = "small",
21
+ color: u = "primary",
21
22
  colorToken: i,
22
- opacity: l,
23
- luminance: f,
24
- ...d
23
+ opacity: f,
24
+ luminance: d,
25
+ ...p
25
26
  } = n;
26
27
  return /* @__PURE__ */ t(
27
28
  "button",
28
29
  {
29
30
  type: "button",
30
- className: I(o.unset, o.root, c, o[_]),
31
- onClick: a,
31
+ className: B(o.unset, o.root, s, o[m]),
32
+ onClick: e,
32
33
  disabled: r,
33
- "aria-label": s,
34
- ...d,
34
+ "aria-label": _,
35
+ ...p,
35
36
  children: /* @__PURE__ */ t(
36
- x,
37
+ I,
37
38
  {
38
39
  as: "span",
39
- name: e,
40
- color: m,
41
- size: u,
40
+ name: a,
41
+ color: u,
42
+ size: l,
42
43
  colorToken: i,
43
- opacity: l,
44
- luminance: f
44
+ opacity: f,
45
+ luminance: d,
46
+ className: c
45
47
  }
46
48
  )
47
49
  }
48
50
  );
49
51
  }
50
- const C = p.memo(k);
52
+ const L = x.memo(k);
51
53
  export {
52
- C as default
54
+ L as default
53
55
  };
@@ -3,6 +3,7 @@ import { ColorType } from '../../utils/ui';
3
3
 
4
4
  export interface LinkBaseProps {
5
5
  color?: ColorType;
6
+ theme?: 'default' | 'secondary';
6
7
  className?: string;
7
8
  disabled?: boolean;
8
9
  unstyled?: boolean;
@@ -1,43 +1,44 @@
1
1
  import { jsx as u } from "react/jsx-runtime";
2
- import _ from "react";
3
- import { clsx as d } from "../../utils/clsx.js";
4
- import { getColor as a } from "../../utils/color.js";
5
- const f = "cfxui__Link__unsetAll__58fea", m = "cfxui__Link__root__a29b3", y = "cfxui__Link__unstyled__f020c", e = {
6
- unsetAll: f,
2
+ import f from "react";
3
+ import { clsx as _ } from "../../utils/clsx.js";
4
+ import { getColor as r } from "../../utils/color.js";
5
+ const d = "cfxui__Link__unsetAll__58fea", m = "cfxui__Link__root__a29b3", y = "cfxui__Link__unstyled__f020c", n = {
6
+ unsetAll: d,
7
7
  root: m,
8
8
  unstyled: y
9
9
  };
10
10
  function k(t) {
11
11
  const {
12
- className: o,
13
- disabled: n = !1,
14
- unstyled: s = !1
12
+ className: e,
13
+ disabled: s = !1,
14
+ unstyled: o = !1
15
15
  } = t;
16
- return d(e.unsetAll, e.root, {
17
- [e.disabled]: n,
18
- [e.unstyled]: s
19
- }, o);
16
+ return _(n.unsetAll, n.root, {
17
+ [n.disabled]: s,
18
+ [n.unstyled]: o
19
+ }, e);
20
20
  }
21
21
  function x(t) {
22
22
  const {
23
- color: o = "tertiary"
24
- } = t;
23
+ color: e,
24
+ theme: s = "default"
25
+ } = t, o = () => e || (s === "default" ? "tertiary" : "primary");
25
26
  return {
26
- "--anchor-color": a({ color: o }),
27
- "--anchor-decoration-color-hover": a({
28
- color: o,
29
- opacity: 0.5
27
+ "--anchor-color": r({ color: o() }),
28
+ "--anchor-color-hover": r({
29
+ color: o(),
30
+ opacity: 0.6
30
31
  })
31
32
  };
32
33
  }
33
34
  function L(t) {
34
35
  const {
35
- className: o,
36
- children: n,
37
- disabled: s = !1,
36
+ className: e,
37
+ children: s,
38
+ disabled: o = !1,
38
39
  ...l
39
40
  } = t, {
40
- style: r
41
+ style: a
41
42
  } = l, c = k(t), i = x(t);
42
43
  return /* @__PURE__ */ u(
43
44
  "a",
@@ -45,18 +46,18 @@ function L(t) {
45
46
  ...l,
46
47
  style: {
47
48
  ...i,
48
- ...r
49
+ ...a
49
50
  },
50
- tabIndex: s ? -1 : 0,
51
- "aria-disabled": s,
51
+ tabIndex: o ? -1 : 0,
52
+ "aria-disabled": o,
52
53
  className: c,
53
- children: n
54
+ children: s
54
55
  }
55
56
  );
56
57
  }
57
- const g = _.memo(L);
58
+ const A = f.memo(L);
58
59
  export {
59
- g as default,
60
+ A as default,
60
61
  k as getLinkClassName,
61
62
  x as getLinkStyles
62
63
  };
@@ -1,32 +1,32 @@
1
1
  import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
- import n from "react";
2
+ import t from "react";
3
3
  import d from "../Flex/Flex.js";
4
4
  import { Text as r } from "../Text/Text.js";
5
5
  import "../../utils/ui/ui.js";
6
- import t from "./ButtonLink.js";
6
+ import n from "./ButtonLink.js";
7
7
  import l from "./Link.js";
8
8
  function c() {
9
9
  return /* @__PURE__ */ i(d, { gap: "large", vertical: !0, children: [
10
10
  /* @__PURE__ */ i(d, { gap: "medium", vertical: !0, children: [
11
- /* @__PURE__ */ e(r, { children: "Color Default" }),
11
+ /* @__PURE__ */ e(r, { children: "Default Theme" }),
12
12
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(l, { href: "/", children: "Link active" }) }),
13
- /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(l, { href: "/", disabled: !0, children: "Link disable" }) }),
14
- /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(l, { href: "/", unstyled: !0, children: "Link unstyled" }) })
13
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(l, { href: "/", disabled: !0, children: "Link disable" }) })
15
14
  ] }),
16
15
  /* @__PURE__ */ i(d, { gap: "medium", vertical: !0, children: [
17
- /* @__PURE__ */ e(r, { children: "Color secondary" }),
16
+ /* @__PURE__ */ e(r, { children: "Secondary Theme" }),
18
17
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(l, { href: "/", color: "secondary", children: "Link active" }) }),
19
18
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(l, { href: "/", color: "secondary", disabled: !0, children: "Link disable" }) })
20
19
  ] }),
21
20
  /* @__PURE__ */ i(d, { gap: "medium", vertical: !0, children: [
22
21
  /* @__PURE__ */ e(r, { children: "Color red" }),
23
22
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(l, { href: "/", color: "red", children: "Link active" }) }),
24
- /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(l, { href: "/", color: "red", disabled: !0, children: "Link disable" }) })
23
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(l, { href: "/", color: "red", disabled: !0, children: "Link disable" }) }),
24
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(l, { href: "/", unstyled: !0, children: "This is an unstyled link" }) })
25
25
  ] }),
26
26
  /* @__PURE__ */ i(d, { gap: "medium", vertical: !0, children: [
27
27
  /* @__PURE__ */ e(r, { children: "ButtonLink - look like link but its button" }),
28
- /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(t, { children: "Link active" }) }),
29
- /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(t, { disabled: !0, children: "Link disable" }) })
28
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(n, { children: "Link active" }) }),
29
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(n, { disabled: !0, children: "Link disable" }) })
30
30
  ] }),
31
31
  /* @__PURE__ */ i(d, { gap: "medium", vertical: !0, children: [
32
32
  /* @__PURE__ */ e(r, { children: "Inside text" }),
@@ -66,7 +66,7 @@ function c() {
66
66
  ] })
67
67
  ] });
68
68
  }
69
- const f = n.memo(c);
69
+ const f = t.memo(c);
70
70
  export {
71
71
  f as default
72
72
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cfx-dev/ui-components",
3
3
  "private": false,
4
- "version": "5.0.16",
4
+ "version": "5.0.17",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "dist/main.js",