@directcryptopay/sdk 0.2.3 → 0.3.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.
Files changed (127) hide show
  1. package/README.md +51 -87
  2. package/dist/core/config.d.ts +9 -46
  3. package/dist/core/iframe.d.ts +16 -0
  4. package/dist/dcp-sdk.umd.js +1 -12811
  5. package/dist/dcp.d.ts +12 -5
  6. package/dist/index.d.ts +1 -1
  7. package/dist/index.js +219 -2
  8. package/dist/types.d.ts +26 -164
  9. package/package.json +3 -13
  10. package/dist/ExchangeController-CPMQq6Q-.js +0 -217
  11. package/dist/HelpersUtil-DfMFC7Bf.js +0 -120
  12. package/dist/NavigationUtil-kj9LEOOd.js +0 -8
  13. package/dist/PhArrowCircleDown-lsK25DCk.js +0 -73
  14. package/dist/PhArrowClockwise-NeKHZ1co.js +0 -73
  15. package/dist/PhArrowDown-C9AkNvLs.js +0 -73
  16. package/dist/PhArrowLeft-RNfIQP1X.js +0 -73
  17. package/dist/PhArrowRight-DM1tna0G.js +0 -73
  18. package/dist/PhArrowSquareOut-S5XYbAZj.js +0 -73
  19. package/dist/PhArrowUp-DmktzOWy.js +0 -73
  20. package/dist/PhArrowUpRight-BkNeW_5i.js +0 -73
  21. package/dist/PhArrowsClockwise-CQ4pG76b.js +0 -73
  22. package/dist/PhArrowsDownUp-H6gxaNM6.js +0 -73
  23. package/dist/PhArrowsLeftRight-DZSsfMR6.js +0 -73
  24. package/dist/PhBank-4_9QzqIB.js +0 -73
  25. package/dist/PhBrowser-B-JSznId.js +0 -73
  26. package/dist/PhCaretDown-vV5oHMNi.js +0 -73
  27. package/dist/PhCaretLeft-BLo6Y_f4.js +0 -73
  28. package/dist/PhCaretRight-CqQN4TT3.js +0 -73
  29. package/dist/PhCaretUp-Df7UCAHy.js +0 -73
  30. package/dist/PhCheck-gtpfK4ed.js +0 -73
  31. package/dist/PhCircleHalf-Uq7dwDYw.js +0 -73
  32. package/dist/PhClock-SDCW-NmF.js +0 -73
  33. package/dist/PhCompass-B7hgtdx-.js +0 -73
  34. package/dist/PhCopy-BcnhyXCy.js +0 -73
  35. package/dist/PhCreditCard-BJjByVgu.js +0 -73
  36. package/dist/PhCurrencyDollar-B7ZXqXBy.js +0 -73
  37. package/dist/PhDesktop-B3VKPuJx.js +0 -73
  38. package/dist/PhDeviceMobile-Bnd0TYEH.js +0 -73
  39. package/dist/PhDotsThree-yyMWyZ-R.js +0 -73
  40. package/dist/PhEnvelope-67uzHbI9.js +0 -73
  41. package/dist/PhFunnelSimple-B-DCsloI.js +0 -73
  42. package/dist/PhGlobe-TMm_6qGk.js +0 -73
  43. package/dist/PhIdentificationCard-CePPD2xc.js +0 -73
  44. package/dist/PhImage-gY96WtHR.js +0 -73
  45. package/dist/PhInfo-DRQM_ZDP.js +0 -73
  46. package/dist/PhLightbulb-B0TxPfZ1.js +0 -73
  47. package/dist/PhMagnifyingGlass-B8si5_6W.js +0 -73
  48. package/dist/PhPaperPlaneRight-DVu5PLYd.js +0 -73
  49. package/dist/PhPlus-BfTsQnUz.js +0 -73
  50. package/dist/PhPower-CxYUGOWn.js +0 -73
  51. package/dist/PhPuzzlePiece-CQ4wh0gV.js +0 -73
  52. package/dist/PhQrCode-BuJ97NYJ.js +0 -73
  53. package/dist/PhQuestion-kJoP8Mja.js +0 -73
  54. package/dist/PhQuestionMark-C46ZkFpu.js +0 -73
  55. package/dist/PhSealCheck-Eh8jVqSN.js +0 -73
  56. package/dist/PhSignOut-jk97OSVt.js +0 -73
  57. package/dist/PhSpinner-CiYOhwMg.js +0 -73
  58. package/dist/PhTrash-pxerMqzd.js +0 -73
  59. package/dist/PhUser-BMg0VV4A.js +0 -73
  60. package/dist/PhVault-DYQvx5A-.js +0 -73
  61. package/dist/PhWarning-NLC5Mj87.js +0 -73
  62. package/dist/PhWarningCircle-Ch2jU9fA.js +0 -73
  63. package/dist/PhX-Bx4wpwm3.js +0 -73
  64. package/dist/SwapController-Cti0Cyxa.js +0 -457
  65. package/dist/ccip-CKZd2XJ7.js +0 -150
  66. package/dist/core/api.d.ts +0 -39
  67. package/dist/core/logic.d.ts +0 -2
  68. package/dist/core/wallet.d.ts +0 -55
  69. package/dist/data-capture-7D5CL385.js +0 -490
  70. package/dist/email-AmK0INbZ.js +0 -344
  71. package/dist/embedded-wallet-Pn0I_XLn.js +0 -820
  72. package/dist/features-x8XNprEe.js +0 -274
  73. package/dist/hashTypedData-B50-z0AA.js +0 -197
  74. package/dist/if-defined-CdZSZ6UL.js +0 -10
  75. package/dist/index-4ewUtPPp.js +0 -7981
  76. package/dist/index-51l86yqx.js +0 -276
  77. package/dist/index-B6K56LF_.js +0 -85
  78. package/dist/index-BAmv9PxJ.js +0 -257
  79. package/dist/index-BEswjY9r.js +0 -117
  80. package/dist/index-BSKRq56S.js +0 -355
  81. package/dist/index-BaygXQxx.js +0 -172
  82. package/dist/index-BcPxaHr5.js +0 -118
  83. package/dist/index-Bjt7nGaJ.js +0 -199
  84. package/dist/index-BkTSyAJb.js +0 -21991
  85. package/dist/index-Bmnl7l2U.js +0 -555
  86. package/dist/index-BvPvouSq.js +0 -56
  87. package/dist/index-C-6iznUO.js +0 -174
  88. package/dist/index-C1QEJL-2.js +0 -572
  89. package/dist/index-C4M5s_AM.js +0 -228
  90. package/dist/index-CEqcN8QP.js +0 -1175
  91. package/dist/index-CM3YaYca.js +0 -8189
  92. package/dist/index-CclBLA5r.js +0 -517
  93. package/dist/index-ChTxJOiF.js +0 -46
  94. package/dist/index-CmAv0Tzr.js +0 -86
  95. package/dist/index-CmvoKY4x.js +0 -125
  96. package/dist/index-D7PmdQ9B.js +0 -1750
  97. package/dist/index-D7k2Pc4e.js +0 -1083
  98. package/dist/index-D7lmgqUR.js +0 -153
  99. package/dist/index-DG_-qYze.js +0 -107
  100. package/dist/index-DHot9Fdb.js +0 -218
  101. package/dist/index-DV2LrPtU.js +0 -123
  102. package/dist/index-DYBaJQ2W.js +0 -65
  103. package/dist/index-D_8VUmn1.js +0 -41543
  104. package/dist/index-D_gLn3rT.js +0 -100
  105. package/dist/index-DqcVUSC9.js +0 -62
  106. package/dist/index-I7VDqINw.js +0 -128
  107. package/dist/index-Oz72I9VP.js +0 -209
  108. package/dist/index-UclsHkJ0.js +0 -118
  109. package/dist/index-X8zir_1j.js +0 -110
  110. package/dist/index-XvlWKGCu.js +0 -1281
  111. package/dist/index-dO97xPlt.js +0 -171
  112. package/dist/index-uBeF6OAB.js +0 -387
  113. package/dist/index-zeA_RiCV.js +0 -159
  114. package/dist/localBatchGatewayRequest-BUZHGdjw.js +0 -91
  115. package/dist/onramp-CdnBuF0r.js +0 -855
  116. package/dist/parseSignature-CcyTNGr4.js +0 -3304
  117. package/dist/pay-with-exchange-CSM6WCOV.js +0 -525
  118. package/dist/property-Bd8U3_QP.js +0 -618
  119. package/dist/receive-DooMu4Dx.js +0 -232
  120. package/dist/ref-CpgjXAw7.js +0 -107
  121. package/dist/send-3T7CyYic.js +0 -1166
  122. package/dist/socials-Dt-iHL17.js +0 -620
  123. package/dist/swaps-CjA9Es42.js +0 -1760
  124. package/dist/transactions-nRm9DVzn.js +0 -37
  125. package/dist/ui/Modal.d.ts +0 -9
  126. package/dist/ui/index.d.ts +0 -6
  127. package/dist/w3m-modal-NV25AXhM.js +0 -1706
@@ -1,100 +0,0 @@
1
- import { cU as h, cV as f, cX as u, cY as v } from "./index-D_8VUmn1.js";
2
- import { n as d, c as m, U as p } from "./index-CEqcN8QP.js";
3
- import "./index-I7VDqINw.js";
4
- const x = h`
5
- :host {
6
- display: block;
7
- width: var(--local-width);
8
- height: var(--local-height);
9
- border-radius: ${({ borderRadius: l }) => l[16]};
10
- overflow: hidden;
11
- position: relative;
12
- }
13
-
14
- :host([data-variant='generated']) {
15
- --mixed-local-color-1: var(--local-color-1);
16
- --mixed-local-color-2: var(--local-color-2);
17
- --mixed-local-color-3: var(--local-color-3);
18
- --mixed-local-color-4: var(--local-color-4);
19
- --mixed-local-color-5: var(--local-color-5);
20
- }
21
-
22
- :host([data-variant='generated']) {
23
- background: radial-gradient(
24
- var(--local-radial-circle),
25
- #fff 0.52%,
26
- var(--mixed-local-color-5) 31.25%,
27
- var(--mixed-local-color-3) 51.56%,
28
- var(--mixed-local-color-2) 65.63%,
29
- var(--mixed-local-color-1) 82.29%,
30
- var(--mixed-local-color-4) 100%
31
- );
32
- }
33
-
34
- :host([data-variant='default']) {
35
- background: radial-gradient(
36
- 75.29% 75.29% at 64.96% 24.36%,
37
- #fff 0.52%,
38
- #f5ccfc 31.25%,
39
- #dba4f5 51.56%,
40
- #9a8ee8 65.63%,
41
- #6493da 82.29%,
42
- #6ebdea 100%
43
- );
44
- }
45
- `;
46
- var o = function(l, a, r, i) {
47
- var s = arguments.length, e = s < 3 ? a : i === null ? i = Object.getOwnPropertyDescriptor(a, r) : i, c;
48
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") e = Reflect.decorate(l, a, r, i);
49
- else for (var n = l.length - 1; n >= 0; n--) (c = l[n]) && (e = (s < 3 ? c(e) : s > 3 ? c(a, r, e) : c(a, r)) || e);
50
- return s > 3 && e && Object.defineProperty(a, r, e), e;
51
- };
52
- let t = class extends u {
53
- constructor() {
54
- super(...arguments), this.imageSrc = void 0, this.alt = void 0, this.address = void 0, this.size = "xl";
55
- }
56
- render() {
57
- const a = {
58
- inherit: "inherit",
59
- xxs: "3",
60
- xs: "5",
61
- sm: "6",
62
- md: "8",
63
- mdl: "8",
64
- lg: "10",
65
- xl: "16",
66
- xxl: "20"
67
- };
68
- return this.style.cssText = `
69
- --local-width: var(--apkt-spacing-${a[this.size ?? "xl"]});
70
- --local-height: var(--apkt-spacing-${a[this.size ?? "xl"]});
71
- `, v`${this.visualTemplate()}`;
72
- }
73
- visualTemplate() {
74
- if (this.imageSrc)
75
- return this.dataset.variant = "image", v`<wui-image src=${this.imageSrc} alt=${this.alt ?? "avatar"}></wui-image>`;
76
- if (this.address) {
77
- this.dataset.variant = "generated";
78
- const a = p.generateAvatarColors(this.address);
79
- return this.style.cssText += `
80
- ${a}`, null;
81
- }
82
- return this.dataset.variant = "default", null;
83
- }
84
- };
85
- t.styles = [f, x];
86
- o([
87
- d()
88
- ], t.prototype, "imageSrc", void 0);
89
- o([
90
- d()
91
- ], t.prototype, "alt", void 0);
92
- o([
93
- d()
94
- ], t.prototype, "address", void 0);
95
- o([
96
- d()
97
- ], t.prototype, "size", void 0);
98
- t = o([
99
- m("wui-avatar")
100
- ], t);
@@ -1,62 +0,0 @@
1
- import { cU as c, cX as f, cY as l } from "./index-D_8VUmn1.js";
2
- import { n as h, c as m } from "./index-CEqcN8QP.js";
3
- const p = c`
4
- :host {
5
- display: block;
6
- background: linear-gradient(
7
- 90deg,
8
- ${({ tokens: e }) => e.theme.foregroundSecondary} 0%,
9
- ${({ tokens: e }) => e.theme.foregroundTertiary} 50%,
10
- ${({ tokens: e }) => e.theme.foregroundSecondary} 100%
11
- );
12
- background-size: 200% 100%;
13
- animation: shimmer 1s ease-in-out infinite;
14
- border-radius: ${({ borderRadius: e }) => e[2]};
15
- }
16
-
17
- :host([data-rounded='true']) {
18
- border-radius: ${({ borderRadius: e }) => e[16]};
19
- }
20
-
21
- @keyframes shimmer {
22
- 0% {
23
- background-position: 200% 0;
24
- }
25
- 100% {
26
- background-position: -200% 0;
27
- }
28
- }
29
- `;
30
- var n = function(e, o, i, s) {
31
- var d = arguments.length, t = d < 3 ? o : s === null ? s = Object.getOwnPropertyDescriptor(o, i) : s, a;
32
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") t = Reflect.decorate(e, o, i, s);
33
- else for (var u = e.length - 1; u >= 0; u--) (a = e[u]) && (t = (d < 3 ? a(t) : d > 3 ? a(o, i, t) : a(o, i)) || t);
34
- return d > 3 && t && Object.defineProperty(o, i, t), t;
35
- };
36
- let r = class extends f {
37
- constructor() {
38
- super(...arguments), this.width = "", this.height = "", this.variant = "default", this.rounded = !1;
39
- }
40
- render() {
41
- return this.style.cssText = `
42
- width: ${this.width};
43
- height: ${this.height};
44
- `, this.dataset.rounded = this.rounded ? "true" : "false", l`<slot></slot>`;
45
- }
46
- };
47
- r.styles = [p];
48
- n([
49
- h()
50
- ], r.prototype, "width", void 0);
51
- n([
52
- h()
53
- ], r.prototype, "height", void 0);
54
- n([
55
- h()
56
- ], r.prototype, "variant", void 0);
57
- n([
58
- h({ type: Boolean })
59
- ], r.prototype, "rounded", void 0);
60
- r = n([
61
- m("wui-shimmer")
62
- ], r);
@@ -1,128 +0,0 @@
1
- import { cU as u, cV as p, cX as g, cY as c } from "./index-D_8VUmn1.js";
2
- import { n as r, c as f } from "./index-CEqcN8QP.js";
3
- import { o as m } from "./if-defined-CdZSZ6UL.js";
4
- const x = u`
5
- :host {
6
- display: block;
7
- width: var(--local-width);
8
- height: var(--local-height);
9
- }
10
-
11
- img {
12
- display: block;
13
- width: 100%;
14
- height: 100%;
15
- object-fit: cover;
16
- object-position: center center;
17
- border-radius: inherit;
18
- user-select: none;
19
- user-drag: none;
20
- -webkit-user-drag: none;
21
- -khtml-user-drag: none;
22
- -moz-user-drag: none;
23
- -o-user-drag: none;
24
- }
25
-
26
- :host([data-boxed='true']) {
27
- width: 40px;
28
- height: 40px;
29
- display: flex;
30
- align-items: center;
31
- justify-content: center;
32
- background-color: ${({ tokens: e }) => e.theme.foregroundPrimary};
33
- border-radius: ${({ borderRadius: e }) => e[2]};
34
- }
35
-
36
- :host([data-boxed='true']) img {
37
- width: 20px;
38
- height: 20px;
39
- border-radius: ${({ borderRadius: e }) => e[16]};
40
- }
41
-
42
- :host([data-full='true']) img {
43
- width: 100%;
44
- height: 100%;
45
- }
46
-
47
- :host([data-boxed='true']) wui-icon {
48
- width: 20px;
49
- height: 20px;
50
- }
51
-
52
- :host([data-icon='error']) {
53
- background-color: ${({ tokens: e }) => e.core.backgroundError};
54
- }
55
-
56
- :host([data-rounded='true']) {
57
- border-radius: ${({ borderRadius: e }) => e[16]};
58
- }
59
- `;
60
- var o = function(e, i, n, a) {
61
- var d = arguments.length, s = d < 3 ? i : a === null ? a = Object.getOwnPropertyDescriptor(i, n) : a, l;
62
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") s = Reflect.decorate(e, i, n, a);
63
- else for (var h = e.length - 1; h >= 0; h--) (l = e[h]) && (s = (d < 3 ? l(s) : d > 3 ? l(i, n, s) : l(i, n)) || s);
64
- return d > 3 && s && Object.defineProperty(i, n, s), s;
65
- };
66
- let t = class extends g {
67
- constructor() {
68
- super(...arguments), this.src = "./path/to/image.jpg", this.alt = "Image", this.size = void 0, this.boxed = !1, this.rounded = !1, this.fullSize = !1;
69
- }
70
- render() {
71
- const i = {
72
- inherit: "inherit",
73
- xxs: "2",
74
- xs: "3",
75
- sm: "4",
76
- md: "4",
77
- mdl: "5",
78
- lg: "5",
79
- xl: "6",
80
- xxl: "7",
81
- "3xl": "8",
82
- "4xl": "9",
83
- "5xl": "10"
84
- };
85
- return this.style.cssText = `
86
- --local-width: ${this.size ? `var(--apkt-spacing-${i[this.size]});` : "100%"};
87
- --local-height: ${this.size ? `var(--apkt-spacing-${i[this.size]});` : "100%"};
88
- `, this.dataset.boxed = this.boxed ? "true" : "false", this.dataset.rounded = this.rounded ? "true" : "false", this.dataset.full = this.fullSize ? "true" : "false", this.dataset.icon = this.iconColor || "inherit", this.icon ? c`<wui-icon
89
- color=${this.iconColor || "inherit"}
90
- name=${this.icon}
91
- size="lg"
92
- ></wui-icon> ` : this.logo ? c`<wui-icon size="lg" color="inherit" name=${this.logo}></wui-icon> ` : c`<img src=${m(this.src)} alt=${this.alt} @error=${this.handleImageError} />`;
93
- }
94
- handleImageError() {
95
- this.dispatchEvent(new CustomEvent("onLoadError", { bubbles: !0, composed: !0 }));
96
- }
97
- };
98
- t.styles = [p, x];
99
- o([
100
- r()
101
- ], t.prototype, "src", void 0);
102
- o([
103
- r()
104
- ], t.prototype, "logo", void 0);
105
- o([
106
- r()
107
- ], t.prototype, "icon", void 0);
108
- o([
109
- r()
110
- ], t.prototype, "iconColor", void 0);
111
- o([
112
- r()
113
- ], t.prototype, "alt", void 0);
114
- o([
115
- r()
116
- ], t.prototype, "size", void 0);
117
- o([
118
- r({ type: Boolean })
119
- ], t.prototype, "boxed", void 0);
120
- o([
121
- r({ type: Boolean })
122
- ], t.prototype, "rounded", void 0);
123
- o([
124
- r({ type: Boolean })
125
- ], t.prototype, "fullSize", void 0);
126
- t = o([
127
- f("wui-image")
128
- ], t);
@@ -1,209 +0,0 @@
1
- import { cU as b, cV as g, cW as p, cX as h, cY as u } from "./index-D_8VUmn1.js";
2
- import { n, c as v } from "./index-CEqcN8QP.js";
3
- import "./index-CmAv0Tzr.js";
4
- const m = b`
5
- :host {
6
- width: var(--local-width);
7
- }
8
-
9
- button {
10
- width: var(--local-width);
11
- white-space: nowrap;
12
- column-gap: ${({ spacing: t }) => t[2]};
13
- transition:
14
- scale ${({ durations: t }) => t.lg} ${({ easings: t }) => t["ease-out-power-1"]},
15
- background-color ${({ durations: t }) => t.lg}
16
- ${({ easings: t }) => t["ease-out-power-2"]},
17
- border-radius ${({ durations: t }) => t.lg}
18
- ${({ easings: t }) => t["ease-out-power-1"]};
19
- will-change: scale, background-color, border-radius;
20
- cursor: pointer;
21
- }
22
-
23
- /* -- Sizes --------------------------------------------------- */
24
- button[data-size='sm'] {
25
- border-radius: ${({ borderRadius: t }) => t[2]};
26
- padding: 0 ${({ spacing: t }) => t[2]};
27
- height: 28px;
28
- }
29
-
30
- button[data-size='md'] {
31
- border-radius: ${({ borderRadius: t }) => t[3]};
32
- padding: 0 ${({ spacing: t }) => t[4]};
33
- height: 38px;
34
- }
35
-
36
- button[data-size='lg'] {
37
- border-radius: ${({ borderRadius: t }) => t[4]};
38
- padding: 0 ${({ spacing: t }) => t[5]};
39
- height: 48px;
40
- }
41
-
42
- /* -- Variants --------------------------------------------------------- */
43
- button[data-variant='accent-primary'] {
44
- background-color: ${({ tokens: t }) => t.core.backgroundAccentPrimary};
45
- color: ${({ tokens: t }) => t.theme.textInvert};
46
- }
47
-
48
- button[data-variant='accent-secondary'] {
49
- background-color: ${({ tokens: t }) => t.core.foregroundAccent010};
50
- color: ${({ tokens: t }) => t.core.textAccentPrimary};
51
- }
52
-
53
- button[data-variant='neutral-primary'] {
54
- background-color: ${({ tokens: t }) => t.theme.backgroundInvert};
55
- color: ${({ tokens: t }) => t.theme.textInvert};
56
- }
57
-
58
- button[data-variant='neutral-secondary'] {
59
- background-color: transparent;
60
- border: 1px solid ${({ tokens: t }) => t.theme.borderSecondary};
61
- color: ${({ tokens: t }) => t.theme.textPrimary};
62
- }
63
-
64
- button[data-variant='neutral-tertiary'] {
65
- background-color: ${({ tokens: t }) => t.theme.foregroundPrimary};
66
- color: ${({ tokens: t }) => t.theme.textPrimary};
67
- }
68
-
69
- button[data-variant='error-primary'] {
70
- background-color: ${({ tokens: t }) => t.core.textError};
71
- color: ${({ tokens: t }) => t.theme.textInvert};
72
- }
73
-
74
- button[data-variant='error-secondary'] {
75
- background-color: ${({ tokens: t }) => t.core.backgroundError};
76
- color: ${({ tokens: t }) => t.core.textError};
77
- }
78
-
79
- button[data-variant='shade'] {
80
- background: var(--wui-color-gray-glass-002);
81
- color: var(--wui-color-fg-200);
82
- border: none;
83
- box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
84
- }
85
-
86
- /* -- Focus states --------------------------------------------------- */
87
- button[data-size='sm']:focus-visible:enabled {
88
- border-radius: 28px;
89
- }
90
-
91
- button[data-size='md']:focus-visible:enabled {
92
- border-radius: 38px;
93
- }
94
-
95
- button[data-size='lg']:focus-visible:enabled {
96
- border-radius: 48px;
97
- }
98
- button[data-variant='shade']:focus-visible:enabled {
99
- background: var(--wui-color-gray-glass-005);
100
- box-shadow:
101
- inset 0 0 0 1px var(--wui-color-gray-glass-010),
102
- 0 0 0 4px var(--wui-color-gray-glass-002);
103
- }
104
-
105
- /* -- Hover & Active states ----------------------------------------------------------- */
106
- @media (hover: hover) {
107
- button[data-size='sm']:hover:enabled {
108
- border-radius: 28px;
109
- }
110
-
111
- button[data-size='md']:hover:enabled {
112
- border-radius: 38px;
113
- }
114
-
115
- button[data-size='lg']:hover:enabled {
116
- border-radius: 48px;
117
- }
118
-
119
- button[data-variant='shade']:hover:enabled {
120
- background: var(--wui-color-gray-glass-002);
121
- }
122
-
123
- button[data-variant='shade']:active:enabled {
124
- background: var(--wui-color-gray-glass-005);
125
- }
126
- }
127
-
128
- button[data-size='sm']:active:enabled {
129
- border-radius: 28px;
130
- }
131
-
132
- button[data-size='md']:active:enabled {
133
- border-radius: 38px;
134
- }
135
-
136
- button[data-size='lg']:active:enabled {
137
- border-radius: 48px;
138
- }
139
-
140
- /* -- Disabled states --------------------------------------------------- */
141
- button:disabled {
142
- opacity: 0.3;
143
- }
144
- `;
145
- var i = function(t, a, o, s) {
146
- var d = arguments.length, e = d < 3 ? a : s === null ? s = Object.getOwnPropertyDescriptor(a, o) : s, l;
147
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") e = Reflect.decorate(t, a, o, s);
148
- else for (var c = t.length - 1; c >= 0; c--) (l = t[c]) && (e = (d < 3 ? l(e) : d > 3 ? l(a, o, e) : l(a, o)) || e);
149
- return d > 3 && e && Object.defineProperty(a, o, e), e;
150
- };
151
- const y = {
152
- lg: "lg-regular-mono",
153
- md: "md-regular-mono",
154
- sm: "sm-regular-mono"
155
- }, $ = {
156
- lg: "md",
157
- md: "md",
158
- sm: "sm"
159
- };
160
- let r = class extends h {
161
- constructor() {
162
- super(...arguments), this.size = "lg", this.disabled = !1, this.fullWidth = !1, this.loading = !1, this.variant = "accent-primary";
163
- }
164
- render() {
165
- this.style.cssText = `
166
- --local-width: ${this.fullWidth ? "100%" : "auto"};
167
- `;
168
- const a = this.textVariant ?? y[this.size];
169
- return u`
170
- <button data-variant=${this.variant} data-size=${this.size} ?disabled=${this.disabled}>
171
- ${this.loadingTemplate()}
172
- <slot name="iconLeft"></slot>
173
- <wui-text variant=${a} color="inherit">
174
- <slot></slot>
175
- </wui-text>
176
- <slot name="iconRight"></slot>
177
- </button>
178
- `;
179
- }
180
- loadingTemplate() {
181
- if (this.loading) {
182
- const a = $[this.size], o = this.variant === "neutral-primary" || this.variant === "accent-primary" ? "invert" : "primary";
183
- return u`<wui-loading-spinner color=${o} size=${a}></wui-loading-spinner>`;
184
- }
185
- return null;
186
- }
187
- };
188
- r.styles = [g, p, m];
189
- i([
190
- n()
191
- ], r.prototype, "size", void 0);
192
- i([
193
- n({ type: Boolean })
194
- ], r.prototype, "disabled", void 0);
195
- i([
196
- n({ type: Boolean })
197
- ], r.prototype, "fullWidth", void 0);
198
- i([
199
- n({ type: Boolean })
200
- ], r.prototype, "loading", void 0);
201
- i([
202
- n()
203
- ], r.prototype, "variant", void 0);
204
- i([
205
- n()
206
- ], r.prototype, "textVariant", void 0);
207
- r = i([
208
- v("wui-button")
209
- ], r);
@@ -1,118 +0,0 @@
1
- import { cU as u, cV as h, cW as f, cX as p, cY as g } from "./index-D_8VUmn1.js";
2
- import { n as d, c as m } from "./index-CEqcN8QP.js";
3
- import { o as b } from "./if-defined-CdZSZ6UL.js";
4
- const y = u`
5
- :host {
6
- display: inline-flex;
7
- justify-content: center;
8
- align-items: center;
9
- border-radius: ${({ borderRadius: o }) => o[2]};
10
- padding: ${({ spacing: o }) => o[1]} !important;
11
- background-color: ${({ tokens: o }) => o.theme.backgroundPrimary};
12
- position: relative;
13
- }
14
-
15
- :host([data-padding='2']) {
16
- padding: ${({ spacing: o }) => o[2]} !important;
17
- }
18
-
19
- :host:after {
20
- content: '';
21
- position: absolute;
22
- top: 0;
23
- left: 0;
24
- width: 100%;
25
- height: 100%;
26
- border-radius: ${({ borderRadius: o }) => o[2]};
27
- }
28
-
29
- :host > wui-icon {
30
- z-index: 10;
31
- }
32
-
33
- /* -- Colors --------------------------------------------------- */
34
- :host([data-color='accent-primary']) {
35
- color: ${({ tokens: o }) => o.core.iconAccentPrimary};
36
- }
37
-
38
- :host([data-color='accent-primary']):after {
39
- background-color: ${({ tokens: o }) => o.core.foregroundAccent010};
40
- }
41
-
42
- :host([data-color='default']),
43
- :host([data-color='secondary']) {
44
- color: ${({ tokens: o }) => o.theme.iconDefault};
45
- }
46
-
47
- :host([data-color='default']):after {
48
- background-color: ${({ tokens: o }) => o.theme.foregroundPrimary};
49
- }
50
-
51
- :host([data-color='secondary']):after {
52
- background-color: ${({ tokens: o }) => o.theme.foregroundSecondary};
53
- }
54
-
55
- :host([data-color='success']) {
56
- color: ${({ tokens: o }) => o.core.iconSuccess};
57
- }
58
-
59
- :host([data-color='success']):after {
60
- background-color: ${({ tokens: o }) => o.core.backgroundSuccess};
61
- }
62
-
63
- :host([data-color='error']) {
64
- color: ${({ tokens: o }) => o.core.iconError};
65
- }
66
-
67
- :host([data-color='error']):after {
68
- background-color: ${({ tokens: o }) => o.core.backgroundError};
69
- }
70
-
71
- :host([data-color='warning']) {
72
- color: ${({ tokens: o }) => o.core.iconWarning};
73
- }
74
-
75
- :host([data-color='warning']):after {
76
- background-color: ${({ tokens: o }) => o.core.backgroundWarning};
77
- }
78
-
79
- :host([data-color='inverse']) {
80
- color: ${({ tokens: o }) => o.theme.iconInverse};
81
- }
82
-
83
- :host([data-color='inverse']):after {
84
- background-color: transparent;
85
- }
86
- `;
87
- var a = function(o, e, c, n) {
88
- var i = arguments.length, r = i < 3 ? e : n === null ? n = Object.getOwnPropertyDescriptor(e, c) : n, s;
89
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") r = Reflect.decorate(o, e, c, n);
90
- else for (var l = o.length - 1; l >= 0; l--) (s = o[l]) && (r = (i < 3 ? s(r) : i > 3 ? s(e, c, r) : s(e, c)) || r);
91
- return i > 3 && r && Object.defineProperty(e, c, r), r;
92
- };
93
- let t = class extends p {
94
- constructor() {
95
- super(...arguments), this.icon = "copy", this.size = "md", this.padding = "1", this.color = "default";
96
- }
97
- render() {
98
- return this.dataset.padding = this.padding, this.dataset.color = this.color, g`
99
- <wui-icon size=${b(this.size)} name=${this.icon} color="inherit"></wui-icon>
100
- `;
101
- }
102
- };
103
- t.styles = [h, f, y];
104
- a([
105
- d()
106
- ], t.prototype, "icon", void 0);
107
- a([
108
- d()
109
- ], t.prototype, "size", void 0);
110
- a([
111
- d()
112
- ], t.prototype, "padding", void 0);
113
- a([
114
- d()
115
- ], t.prototype, "color", void 0);
116
- t = a([
117
- m("wui-icon-box")
118
- ], t);