@fluidattacks/design 3.1.12 → 3.1.13

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 (172) hide show
  1. package/dist/components/@core/index.js +2 -2
  2. package/dist/components/accordion/accordion-content/index.js +18 -5
  3. package/dist/components/accordion/index.js +71 -14
  4. package/dist/components/alert/index.js +108 -57
  5. package/dist/components/button/index.js +64 -13
  6. package/dist/components/card/card-header/index.js +78 -9
  7. package/dist/components/card/card-with-image/index.js +88 -13
  8. package/dist/components/card/card-with-input/index.js +72 -23
  9. package/dist/components/card/card-with-selector/index.js +63 -8
  10. package/dist/components/card/card-with-switch/index.js +46 -8
  11. package/dist/components/carousel/index.js +54 -28
  12. package/dist/components/checkbox/index.js +66 -32
  13. package/dist/components/cloud-image/index.js +2 -2
  14. package/dist/components/code-snippet/index.js +64 -19
  15. package/dist/components/code-snippet/location-code/index.js +146 -100
  16. package/dist/components/colors/index.js +220 -5
  17. package/dist/components/confirm-dialog/index.js +41 -18
  18. package/dist/components/container/index.js +39 -15
  19. package/dist/components/content-card/category-tag/index.js +37 -8
  20. package/dist/components/content-card/event-date/index.js +53 -10
  21. package/dist/components/content-card/index.js +118 -13
  22. package/dist/components/content-card-carousel/index.js +87 -7
  23. package/dist/components/content-card-carousel/scroll-buttons/index.js +1 -1
  24. package/dist/components/divider/index.js +22 -7
  25. package/dist/components/empty-state/empty-button/index.js +4 -4
  26. package/dist/components/empty-state/index.js +52 -15
  27. package/dist/components/file-preview/index.js +28 -12
  28. package/dist/components/form/index.js +46 -9
  29. package/dist/components/grid-container/index.js +31 -11
  30. package/dist/components/group-selector/index.js +126 -17
  31. package/dist/components/group-selector/option-container/index.js +1 -1
  32. package/dist/components/icon/index.js +78 -18
  33. package/dist/components/icon-button/index.js +63 -14
  34. package/dist/components/indicator-card/index.js +70 -11
  35. package/dist/components/info-sidebar/index.js +107 -7
  36. package/dist/components/inputs/fields/combobox/index.js +141 -21
  37. package/dist/components/inputs/fields/combobox/option/index.js +1 -1
  38. package/dist/components/inputs/fields/date/calendar/cell/index.js +22 -11
  39. package/dist/components/inputs/fields/date/calendar/grid/index.js +21 -10
  40. package/dist/components/inputs/fields/date/calendar/header/index.js +35 -13
  41. package/dist/components/inputs/fields/date/calendar/index.js +26 -11
  42. package/dist/components/inputs/fields/date/index.js +65 -15
  43. package/dist/components/inputs/fields/date-range/calendar/index.js +29 -10
  44. package/dist/components/inputs/fields/date-range/index.js +98 -18
  45. package/dist/components/inputs/fields/date-time/calendar/index.js +44 -15
  46. package/dist/components/inputs/fields/date-time/index.js +65 -14
  47. package/dist/components/inputs/fields/editable/index.js +22 -10
  48. package/dist/components/inputs/fields/input/index.js +74 -10
  49. package/dist/components/inputs/fields/input-file/index.js +114 -21
  50. package/dist/components/inputs/fields/input-tags/index.js +60 -11
  51. package/dist/components/inputs/fields/number/index.js +54 -7
  52. package/dist/components/inputs/fields/number-range/index.js +46 -8
  53. package/dist/components/inputs/fields/phone/index.js +446 -286
  54. package/dist/components/inputs/fields/text-area/index.js +78 -10
  55. package/dist/components/inputs/label/index.js +34 -8
  56. package/dist/components/inputs/outline-container/index.js +98 -12
  57. package/dist/components/inputs/utils/action-button/index.js +28 -7
  58. package/dist/components/inputs/utils/calendar-button/index.js +34 -10
  59. package/dist/components/inputs/utils/date-selector/index.js +60 -6
  60. package/dist/components/inputs/utils/date-time-field/index.js +129 -28
  61. package/dist/components/inputs/utils/dialog/index.js +10 -7
  62. package/dist/components/inputs/utils/number-field/index.js +81 -8
  63. package/dist/components/inputs/utils/popover/index.js +41 -10
  64. package/dist/components/interactive-card/icon/index.js +1 -1
  65. package/dist/components/interactive-card/index.js +110 -7
  66. package/dist/components/language-selector/index.js +34 -10
  67. package/dist/components/language-selector/item-list/index.js +1 -1
  68. package/dist/components/link/index.js +71 -17
  69. package/dist/components/list-item/index.js +64 -13
  70. package/dist/components/little-flag/index.js +26 -9
  71. package/dist/components/loading/index.js +48 -21
  72. package/dist/components/logo/index.js +10 -4
  73. package/dist/components/logo-carousel/index.js +40 -5
  74. package/dist/components/lottie/index.js +12 -7
  75. package/dist/components/menu/index.js +53 -9
  76. package/dist/components/message-banner/index.js +79 -13
  77. package/dist/components/modal/index.js +59 -13
  78. package/dist/components/modal/modal-confirm/index.js +48 -7
  79. package/dist/components/modal/modal-footer/index.js +22 -13
  80. package/dist/components/modal/modal-header/index.js +45 -19
  81. package/dist/components/notification/index.js +65 -20
  82. package/dist/components/notification-sign/index.js +27 -10
  83. package/dist/components/number-input/index.js +58 -21
  84. package/dist/components/oauth-selector/index.js +97 -23
  85. package/dist/components/oauth-selector/option-container/index.js +68 -7
  86. package/dist/components/plan-card/index.js +99 -28
  87. package/dist/components/plan-card/recommended-tag/index.js +23 -2
  88. package/dist/components/pop-up/description/index.js +47 -9
  89. package/dist/components/pop-up/index.js +146 -17
  90. package/dist/components/premium-feature/index.js +56 -16
  91. package/dist/components/priority-score/index.js +24 -9
  92. package/dist/components/progress/index.js +30 -17
  93. package/dist/components/progress-bar/index.js +99 -41
  94. package/dist/components/radio-button/index.js +64 -27
  95. package/dist/components/scroll-button/index.js +33 -15
  96. package/dist/components/search/index.js +77 -35
  97. package/dist/components/search-bar/index.js +211 -24
  98. package/dist/components/search-bar/item-searching/index.js +1 -1
  99. package/dist/components/severity-badge/index.js +66 -6
  100. package/dist/components/severity-overview/badge/index.js +62 -11
  101. package/dist/components/severity-overview/index.js +15 -5
  102. package/dist/components/show-on-hover/index.js +16 -10
  103. package/dist/components/slide-out-menu/index.js +2611 -1164
  104. package/dist/components/slide-out-menu/menu-item/index.js +58 -6
  105. package/dist/components/slider/index.js +79 -48
  106. package/dist/components/slider/thumb/index.js +13 -6
  107. package/dist/components/step-lapse/index.js +81 -23
  108. package/dist/components/table-button/index.js +65 -24
  109. package/dist/components/tabs/fixed-tabs/index.js +24 -4
  110. package/dist/components/tabs/index.js +54 -11
  111. package/dist/components/tabs/tab/index.js +37 -6
  112. package/dist/components/tag/index.js +95 -27
  113. package/dist/components/timeline/card/index.js +1 -1
  114. package/dist/components/timeline/index.js +15 -5
  115. package/dist/components/toggle/index.js +65 -25
  116. package/dist/components/toggle-buttons/index.js +51 -22
  117. package/dist/components/tooltip/index.js +1 -1
  118. package/dist/components/tour/index.js +3897 -1829
  119. package/dist/components/typography/heading/index.js +43 -5
  120. package/dist/components/typography/span/index.js +38 -6
  121. package/dist/components/typography/text/index.js +44 -6
  122. package/dist/components/web-form/index.js +28 -19
  123. package/dist/hooks/index.js +5 -5
  124. package/dist/index-BMHVi812.mjs +234 -0
  125. package/dist/index-BzAniA2J.mjs +135 -0
  126. package/dist/index-C6LbClYh.mjs +146 -0
  127. package/dist/index-CAIe8hBv.mjs +130 -0
  128. package/dist/index-CUQBAqt_.mjs +75 -0
  129. package/dist/index-CWlrSlUk.mjs +68 -0
  130. package/dist/index-Ckmu1TfV.mjs +86 -0
  131. package/dist/index-DwznImvK.mjs +1678 -0
  132. package/dist/index-maWH3JYC.mjs +3561 -0
  133. package/dist/index.js +11 -11
  134. package/dist/styles-B2N0JLw1.mjs +114 -0
  135. package/dist/styles-B64DVBIF.mjs +115 -0
  136. package/dist/{styles-lSVV9kjn.mjs → styles-BXFVwnWT.mjs} +28 -28
  137. package/dist/styles-BZQOqe8p.mjs +141 -0
  138. package/dist/styles-Bdque9TT.mjs +65 -0
  139. package/dist/{styles-CI-I6joH.mjs → styles-BlHspTrz.mjs} +18 -18
  140. package/dist/{styles-Cx93EcVo.mjs → styles-CROOwXEH.mjs} +5 -5
  141. package/dist/styles-CplEd2kw.mjs +228 -0
  142. package/dist/styles-D1eTIklB.mjs +110 -0
  143. package/dist/styles-ePGii_9g.mjs +74 -0
  144. package/dist/use-carousel-CgAF78h3.mjs +23 -0
  145. package/dist/use-click-outside-BUll8Ag-.mjs +18 -0
  146. package/dist/use-cloudinary-image-BCxwj15o.mjs +1176 -0
  147. package/dist/use-modal-CtgexKnf.mjs +14 -0
  148. package/dist/use-search-Dj47QDw9.mjs +15 -0
  149. package/dist/utils-V0EumEPM.mjs +6 -0
  150. package/package.json +1 -3
  151. package/dist/index-38JqtnAI.mjs +0 -122
  152. package/dist/index-B5yoGFs6.mjs +0 -54
  153. package/dist/index-BLbKylyw.mjs +0 -209
  154. package/dist/index-Bu448Tz2.mjs +0 -106
  155. package/dist/index-BwFnfaRh.mjs +0 -2310
  156. package/dist/index-Co_k0WFk.mjs +0 -75
  157. package/dist/index-Cu7uUMlx.mjs +0 -82
  158. package/dist/index-D-lcuEHY.mjs +0 -1018
  159. package/dist/index-DrfjITyT.mjs +0 -61
  160. package/dist/styles-7_q7nHce.mjs +0 -110
  161. package/dist/styles-BA0WIQL-.mjs +0 -74
  162. package/dist/styles-C3cZmKVJ.mjs +0 -131
  163. package/dist/styles-D85YYIjM.mjs +0 -131
  164. package/dist/styles-EIbGRPlk.mjs +0 -106
  165. package/dist/styles-Q1VXuWI7.mjs +0 -65
  166. package/dist/styles-fH2c4cfc.mjs +0 -77
  167. package/dist/use-carousel-CvRxi2FI.mjs +0 -17
  168. package/dist/use-click-outside-BtZLIoU1.mjs +0 -18
  169. package/dist/use-cloudinary-image-fG7ODNgr.mjs +0 -611
  170. package/dist/use-modal-CkrZ-_-M.mjs +0 -14
  171. package/dist/use-search-DpLNvt7Q.mjs +0 -12
  172. package/dist/utils-CQvBF-wY.mjs +0 -4
@@ -1,611 +0,0 @@
1
- import { useMemo as A } from "react";
2
- class E {
3
- filterOutNonSupportedKeys(t, e) {
4
- const r = /* @__PURE__ */ Object.create({});
5
- return typeof (s = t) != "object" || s instanceof Array ? /* @__PURE__ */ Object.create({}) : (Object.keys(t).forEach((u) => {
6
- e.indexOf(u) >= 0 ? r[u] = t[u] : console.warn("Warning - unsupported key provided to configuration: ", u);
7
- }), r);
8
- var s;
9
- }
10
- }
11
- const V = ["cname", "secureDistribution", "privateCdn", "signUrl", "longUrlSignature", "shorten", "useRootPath", "secure", "forceVersion", "analytics", "queryParams"];
12
- class b extends E {
13
- constructor(t) {
14
- super();
15
- const e = this.filterOutNonSupportedKeys(t, V);
16
- Object.assign(this, { secure: !0 }, e);
17
- }
18
- extend(t) {
19
- const e = this.filterOutNonSupportedKeys(t, V);
20
- return new b(Object.assign({}, this, e));
21
- }
22
- setCname(t) {
23
- return this.cname = t, this;
24
- }
25
- setSecureDistribution(t) {
26
- return this.secureDistribution = t, this;
27
- }
28
- setPrivateCdn(t) {
29
- return this.privateCdn = t, this;
30
- }
31
- setSignUrl(t) {
32
- return this.signUrl = t, this;
33
- }
34
- setLongUrlSignature(t) {
35
- return this.longUrlSignature = t, this;
36
- }
37
- setShorten(t) {
38
- return this.shorten = t, this;
39
- }
40
- setUseRootPath(t) {
41
- return this.useRootPath = t, this;
42
- }
43
- setSecure(t) {
44
- return this.secure = t, this;
45
- }
46
- setForceVersion(t) {
47
- return this.forceVersion = t, this;
48
- }
49
- setQueryParams(t) {
50
- return this.queryParams = t, this;
51
- }
52
- }
53
- class g {
54
- constructor(t) {
55
- this.values = [], this.delimiter = ":", this.hasValue(t) && this.addValue(t);
56
- }
57
- toString() {
58
- return this.values.join(this.delimiter);
59
- }
60
- hasValue(t) {
61
- return t != null && t !== "";
62
- }
63
- addValue(t) {
64
- return Array.isArray(t) ? this.values = this.values.concat(t) : this.values.push(t), this.values = this.values.filter((e) => this.hasValue(e)), this;
65
- }
66
- setDelimiter(t) {
67
- return this.delimiter = t, this;
68
- }
69
- }
70
- class O extends Error {
71
- constructor(t = "Unsupported") {
72
- super(t);
73
- }
74
- }
75
- function S(i) {
76
- return new O(i);
77
- }
78
- function F() {
79
- return this._qualifierModel || { error: S(`unsupported qualifier ${this.constructor.name}`) };
80
- }
81
- class L {
82
- constructor() {
83
- this._qualifierModel = {};
84
- }
85
- toJson() {
86
- return F.apply(this);
87
- }
88
- }
89
- class v extends L {
90
- constructor(t, e) {
91
- super(), this.delimiter = "_", this.key = t, e instanceof g ? this.qualifierValue = e : (this.qualifierValue = new g(), this.qualifierValue.addValue(e));
92
- }
93
- toString() {
94
- const { key: t, delimiter: e, qualifierValue: r } = this;
95
- return `${t}${e}${r.toString()}`;
96
- }
97
- addValue(t) {
98
- return this.qualifierValue.addValue(t), this;
99
- }
100
- }
101
- class f extends v {
102
- constructor(t, e) {
103
- let r;
104
- r = e ? new g([t, `${e}`]).setDelimiter(":") : t, super("fl", r), this.flagValue = e;
105
- }
106
- toString() {
107
- return super.toString().replace(/\./g, "%2E");
108
- }
109
- getFlagValue() {
110
- return this.flagValue;
111
- }
112
- }
113
- function D() {
114
- var i, t, e;
115
- const r = this._actionModel && Object.keys(this._actionModel).length, s = (e = (t = (i = this._actionModel) === null || i === void 0 ? void 0 : i.source) === null || t === void 0 ? void 0 : t.transformation) === null || e === void 0 ? void 0 : e.error;
116
- return s && s instanceof Error ? { error: s } : r ? this._actionModel : { error: S(`unsupported action ${this.constructor.name}`) };
117
- }
118
- class I {
119
- constructor() {
120
- this._actionModel = {};
121
- }
122
- toJson() {
123
- return D.apply(this);
124
- }
125
- }
126
- class T extends I {
127
- constructor() {
128
- super(...arguments), this.qualifiers = /* @__PURE__ */ new Map(), this.flags = [], this.delimiter = ",", this.actionTag = "";
129
- }
130
- prepareQualifiers() {
131
- }
132
- getActionTag() {
133
- return this.actionTag;
134
- }
135
- setActionTag(t) {
136
- return this.actionTag = t, this;
137
- }
138
- toString() {
139
- return this.prepareQualifiers(), function(t, e) {
140
- const r = Array.from(t.entries());
141
- return e.forEach((s) => {
142
- r.push(["fl", s]);
143
- }), r.sort().map((s) => s[1]);
144
- }(this.qualifiers, this.flags).join(this.delimiter);
145
- }
146
- addQualifier(t) {
147
- if (typeof t == "string") {
148
- const [e, r] = t.toLowerCase().split("_");
149
- e === "fl" ? this.flags.push(new f(r)) : this.qualifiers.set(e, new v(e, r));
150
- } else this.qualifiers.set(t.key, t);
151
- return this;
152
- }
153
- addFlag(t) {
154
- return typeof t == "string" ? this.flags.push(new f(t)) : t instanceof f && this.flags.push(t), this;
155
- }
156
- addValueToQualifier(t, e) {
157
- return this.qualifiers.get(t).addValue(e), this;
158
- }
159
- }
160
- class N extends T {
161
- constructor(t) {
162
- super(), this._actionModel = {}, this.addQualifier(new v("b", new g(function(e) {
163
- return e && e.match(/^#/) ? `rgb:${e.substr(1)}` : e;
164
- }(t)).setDelimiter("_"))), this._actionModel.color = t, this._actionModel.actionType = "backgroundColor";
165
- }
166
- static fromJson(t) {
167
- const { color: e } = t;
168
- return new this(e);
169
- }
170
- }
171
- class x {
172
- constructor(t) {
173
- this.raw = t;
174
- }
175
- toString() {
176
- return this.raw;
177
- }
178
- toJson() {
179
- return { error: S(`unsupported action ${this.constructor.name}`) };
180
- }
181
- }
182
- class Q extends g {
183
- constructor(t) {
184
- super(t), this.val = t;
185
- }
186
- getValue() {
187
- return this.val;
188
- }
189
- }
190
- function p(i) {
191
- const t = {};
192
- return Object.keys(i).forEach((e) => {
193
- t[i[e]] = e;
194
- }), t;
195
- }
196
- p({ 444: "CHROMA_444", 420: "CHROMA_420" }), p({ noCmyk: "no_cmyk", keepCmyk: "keep_cmyk", tinySrgb: "tinysrgb", srgbTrueColor: "srgb:truecolor" }), p({ limitFit: "limit", limitFill: "lfill", minimumFit: "mfit", thumbnail: "thumb", limitPad: "lpad", minimumPad: "mpad", autoPad: "auto_pad" });
197
- const J = p({ colorSpace: "cs", dpr: "dpr", density: "dn", defaultImage: "d", format: "f", quality: "q" });
198
- p({ redEye: "redeye", advancedRedEye: "adv_redeye", oilPaint: "oil_paint", unsharpMask: "unsharp_mask", makeTransparent: "make_transparent", generativeRestore: "gen_restore", upscale: "upscale" }), p({ autoBest: "auto:best", autoEco: "auto:eco", autoGood: "auto:good", autoLow: "auto:low", jpegminiHigh: "jpegmini:1", jpegminiMedium: "jpegmini:2", jpegminiBest: "jpegmini:0" }), p({ fullHd: "full_hd", fullHdWifi: "full_hd_wifi", fullHdLean: "full_hd_lean", hdLean: "hd_lean" });
199
- class z extends T {
200
- constructor(t, e, r) {
201
- let s;
202
- super(), this._actionModel = {}, s = e instanceof Q ? e.getValue() : e, this._actionModel.actionType = J[t], this._actionModel[r] = s, this.addQualifier(new v(t, e));
203
- }
204
- }
205
- class H extends f {
206
- constructor(t) {
207
- super("progressive", t);
208
- }
209
- }
210
- class m extends z {
211
- constructor(t, e) {
212
- super(t, e, "formatType");
213
- }
214
- lossy() {
215
- return this._actionModel.lossy = !0, this.addFlag(new f("lossy")), this;
216
- }
217
- progressive(t) {
218
- return t instanceof H ? (this._actionModel.progressive = { mode: t.getFlagValue() }, this.addFlag(t)) : (this._actionModel.progressive = { mode: t }, this.addFlag(function(e) {
219
- return new f("progressive", e);
220
- }(t))), this;
221
- }
222
- preserveTransparency() {
223
- return this._actionModel.preserveTransparency = !0, this.addFlag(new f("preserve_transparency")), this;
224
- }
225
- static fromJson(t) {
226
- const { formatType: e, lossy: r, progressive: s, preserveTransparency: u } = t;
227
- let n;
228
- return n = e ? new this("f", e) : new this("f"), s && (s.mode ? n.progressive(s.mode) : n.progressive()), r && n.lossy(), u && n.preserveTransparency(), n;
229
- }
230
- }
231
- class w {
232
- constructor() {
233
- this.actions = [];
234
- }
235
- addAction(t) {
236
- let e;
237
- if (typeof t == "string") {
238
- if (t.indexOf("/") >= 0) throw "addAction cannot accept a string with a forward slash in it - /, use .addTransformation() instead";
239
- e = new x(t);
240
- } else e = t;
241
- return this.actions.push(e), this;
242
- }
243
- addTransformation(t) {
244
- return t instanceof w ? this.actions = this.actions.concat(t.actions) : this.actions.push(new x(t)), this;
245
- }
246
- toString() {
247
- return this.actions.map((t) => t.toString()).filter((t) => t).join("/");
248
- }
249
- animated(t) {
250
- return this.addAction(t);
251
- }
252
- border(t) {
253
- return this.addAction(t);
254
- }
255
- reshape(t) {
256
- return this.addAction(t);
257
- }
258
- resize(t) {
259
- return this.addAction(t);
260
- }
261
- quality(t) {
262
- return this.addAction(new m("q", t)), this;
263
- }
264
- format(t) {
265
- return this.addAction(new m("f", t)), this;
266
- }
267
- roundCorners(t) {
268
- return this.addAction(t);
269
- }
270
- overlay(t) {
271
- return this.addAction(t);
272
- }
273
- underlay(t) {
274
- return t.setLayerType("u"), this.addAction(t);
275
- }
276
- addVariable(t) {
277
- return this.addAction(t);
278
- }
279
- conditional(t) {
280
- return this.addAction(t);
281
- }
282
- effect(t) {
283
- return this.addAction(t);
284
- }
285
- adjust(t) {
286
- return this.addAction(t);
287
- }
288
- rotate(t) {
289
- return this.addAction(t);
290
- }
291
- namedTransformation(t) {
292
- return this.addAction(t);
293
- }
294
- delivery(t) {
295
- return this.addAction(t);
296
- }
297
- backgroundColor(t) {
298
- return this.addAction(new N(t));
299
- }
300
- psdTools(t) {
301
- return this.addAction(t);
302
- }
303
- extract(t) {
304
- return this.addAction(t);
305
- }
306
- addFlag(t) {
307
- const e = new T();
308
- let r = t;
309
- return typeof t == "string" && (r = new f(t)), e.addQualifier(r), this.addAction(e);
310
- }
311
- customFunction(t) {
312
- return this.addAction(t);
313
- }
314
- transcode(t) {
315
- return this.addAction(t);
316
- }
317
- videoEdit(t) {
318
- return this.addAction(t);
319
- }
320
- toJson() {
321
- const t = [];
322
- for (const r of this.actions) {
323
- const s = r.toJson();
324
- if ("error" in (e = s) && e.error) return s;
325
- t.push(s);
326
- }
327
- var e;
328
- return { actions: t };
329
- }
330
- }
331
- class K extends w {
332
- }
333
- class B extends w {
334
- }
335
- function C(i, t, e) {
336
- let r = t | 0, s = String(e);
337
- return i.length > r ? String(i) : (r -= i.length, r > s.length && (s += function(u, n) {
338
- let o = n, a = "";
339
- for (; o > 0; ) a += u, o--;
340
- return a;
341
- }(s, r / s.length)), s.slice(0, r) + String(i));
342
- }
343
- const y = {};
344
- let _ = 0;
345
- function $(i) {
346
- let t = "";
347
- const e = 6 * i.split(".").length, r = function(n) {
348
- if (n.split(".").length < 2) throw new Error("invalid semVer, must have at least two segments");
349
- return n.split(".").reverse().join(".");
350
- }(i), s = function(n) {
351
- if (n.split(".").length < 2) throw new Error("invalid semVer, must have at least two segments");
352
- return n.split(".").map((o) => {
353
- const a = +o;
354
- if (isNaN(a) || a < 0) throw "Invalid version number provided";
355
- return C(o, 2, "0");
356
- }).join(".");
357
- }(r);
358
- let u = parseInt(s.split(".").join("")).toString(2);
359
- if (u = C(u, e, "0"), u.length % 6 != 0) throw "Version must be smaller than 43.21.26)";
360
- return u.match(/.{1,6}/g).forEach((n) => {
361
- t += y[n];
362
- }), t;
363
- }
364
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("").forEach((i) => {
365
- let t = _.toString(2);
366
- t = C(t, 6, "0"), y[t] = i, _++;
367
- });
368
- function W() {
369
- const i = "0.0.0";
370
- if (typeof window < "u") return i;
371
- try {
372
- return process.versions.node || i;
373
- } catch {
374
- return i;
375
- }
376
- }
377
- function k(i) {
378
- const t = function(e) {
379
- const r = { sdkSemver: e.sdkSemver, techVersion: e.techVersion, sdkCode: e.sdkCode, product: e.product, feature: "0", osType: e.osType, osVersion: e.osVersion };
380
- return e.accessibility && (r.feature = "D"), e.lazyload && (r.feature = "C"), e.responsive && (r.feature = "A"), e.placeholder && (r.feature = "B"), r;
381
- }(function(e) {
382
- const r = { techVersion: W(), sdkCode: "T", sdkSemver: "1.21.0".split("-")[0], product: "A", osType: "Z", osVersion: "0.0", responsive: !1, placeholder: !1, lazyload: !1, accessibility: !1 };
383
- return e ? Object.assign(Object.assign({}, r), e) : r;
384
- }(i));
385
- try {
386
- const e = function(h) {
387
- const d = h.split(".");
388
- return `${d[0]}.${d[1]}`;
389
- }(t.techVersion), r = $(t.sdkSemver), s = $(e), u = function(h) {
390
- const [d, l] = h.split("."), q = parseInt(d).toString(2), U = parseInt(l).toString(2), M = q.padStart(6, "0"), P = U.padStart(6, "0");
391
- return y[M] + y[P];
392
- }(t.osVersion), n = t.feature, o = t.sdkCode, { product: a, osType: c } = t;
393
- return `D${a}${o}${r}${s}${c}${u}${n}`;
394
- } catch {
395
- return "E";
396
- }
397
- }
398
- const j = { "image/upload": "images", "image/private": "private_images", "image/authenticated": "authenticated_images", "raw/upload": "files", "video/upload": "videos" };
399
- class G {
400
- constructor(t, e = {}, r) {
401
- this.setPublicID(t), this.setCloudConfig(e), this.setURLConfig(r);
402
- }
403
- setURLConfig(t) {
404
- return this.urlConfig = new b(t), this;
405
- }
406
- setCloudConfig(t) {
407
- return this.cloudName = t.cloudName, this.apiKey = t.apiKey, this.apiSecret = t.apiSecret, this.authToken = t.authToken, this;
408
- }
409
- setPublicID(t) {
410
- return this.publicID = t ? t.toString() : "", this;
411
- }
412
- setDeliveryType(t) {
413
- return this.deliveryType = t, this;
414
- }
415
- setSuffix(t) {
416
- return this.suffix = t, this;
417
- }
418
- setSignature(t) {
419
- return this.signature = t, this;
420
- }
421
- setVersion(t) {
422
- return t && (this.version = t), this;
423
- }
424
- setAssetType(t) {
425
- return t && (this.assetType = t), this;
426
- }
427
- sign() {
428
- return this;
429
- }
430
- toURL(t = {}) {
431
- return this.createCloudinaryURL(null, t.trackedAnalytics);
432
- }
433
- validateAssetForURLCreation() {
434
- if (this.cloudName === void 0) throw "You must supply a cloudName when initializing the asset";
435
- const t = this.suffix && this.suffix.indexOf(".") >= 0, e = this.suffix && this.suffix.indexOf("/") >= 0;
436
- if (t || e) throw "`suffix`` should not include . or /";
437
- }
438
- getResourceType() {
439
- const t = /* @__PURE__ */ function(a) {
440
- return a || "image";
441
- }(this.assetType), e = /* @__PURE__ */ function(a) {
442
- return a || "upload";
443
- }(this.deliveryType), r = !!this.suffix, s = `${t}/${e}`, u = j[`${t}/${e}`], n = this.urlConfig.useRootPath, o = this.urlConfig.shorten;
444
- if (n) {
445
- if (s === "image/upload") return "";
446
- throw new Error(`useRootPath can only be used with assetType: 'image' and deliveryType: 'upload'. Provided: ${s} instead`);
447
- }
448
- if (o && s === "image/upload") return "iu";
449
- if (r) {
450
- if (u) return u;
451
- throw new Error(`URL Suffix only supported for ${Object.keys(j).join(", ")}, Provided: ${s} instead`);
452
- }
453
- return s;
454
- }
455
- getSignature() {
456
- return this.signature ? `s--${this.signature}--` : "";
457
- }
458
- createCloudinaryURL(t, e) {
459
- if (!this.publicID) return "";
460
- this.validateAssetForURLCreation();
461
- const r = function(o, a) {
462
- const c = a.secure, h = a.privateCdn, d = a.cname, l = a.secureDistribution;
463
- return c || d ? c && !l && h ? `https://${o}-res.cloudinary.com` : c && !l ? `https://res.cloudinary.com/${o}` : c && l && h ? `https://${l}` : c && l ? `https://${l}/${o}` : !c && d ? `http://${d}/${o}` : "ERROR" : `http://res.cloudinary.com/${o}`;
464
- }(this.cloudName, this.urlConfig), s = t ? t.toString() : "", u = function(o, a, c) {
465
- const h = c !== !1;
466
- return a ? `v${a}` : function(d) {
467
- return d.match(/^v[0-9]+/);
468
- }(o) || function(d) {
469
- return d.match(/^https?:\//);
470
- }(o) || function(d) {
471
- return d.indexOf("/") < 0;
472
- }(o) ? "" : h ? "v1" : "";
473
- }(this.publicID, this.version, this.urlConfig.forceVersion), n = this.publicID;
474
- if (typeof t == "string")
475
- return [r, this.getResourceType(), this.getSignature(), s, u, n.replace(/,/g, "%2C"), this.suffix].filter((o) => o).join("/");
476
- {
477
- const o = [encodeURI(r), this.getResourceType(), this.getSignature(), encodeURI(s), u, encodeURI(n).replace(/,/g, "%2C"), this.suffix && encodeURI(this.suffix)].filter((h) => h).join("/").replace(/\?/g, "%3F").replace(/=/g, "%3D"), a = this.urlConfig.analytics !== !1 && !n.includes("?");
478
- let c = "";
479
- if (typeof this.urlConfig.queryParams == "object") try {
480
- const h = new URLSearchParams(this.urlConfig.queryParams);
481
- a && h.set("_a", k(e)), c = h.toString();
482
- } catch {
483
- console.error("Error: URLSearchParams is not available so the queryParams object cannot be parsed, please try passing as an already parsed string");
484
- }
485
- else c = this.urlConfig.queryParams || "", a && (c += `${c.length > 0 ? "&" : ""}_a=${k(e)}`);
486
- return c ? `${o}?${c}` : o;
487
- }
488
- }
489
- }
490
- class R extends G {
491
- constructor(t, e, r, s) {
492
- super(t, e, r), this.transformation = s;
493
- }
494
- animated(t) {
495
- return this.transformation.animated(t), this;
496
- }
497
- border(t) {
498
- return this.transformation.border(t), this;
499
- }
500
- reshape(t) {
501
- return this.transformation.reshape(t), this;
502
- }
503
- resize(t) {
504
- return this.transformation.resize(t), this;
505
- }
506
- quality(t) {
507
- return this.addAction(new m("q", t)), this;
508
- }
509
- format(t) {
510
- return this.addAction(new m("f", t)), this;
511
- }
512
- roundCorners(t) {
513
- return this.transformation.roundCorners(t), this;
514
- }
515
- overlay(t) {
516
- return this.transformation.overlay(t), this;
517
- }
518
- addVariable(t) {
519
- return this.transformation.addVariable(t), this;
520
- }
521
- conditional(t) {
522
- return this.transformation.conditional(t), this;
523
- }
524
- effect(t) {
525
- return this.transformation.effect(t), this;
526
- }
527
- adjust(t) {
528
- return this.transformation.adjust(t), this;
529
- }
530
- rotate(t) {
531
- return this.transformation.rotate(t), this;
532
- }
533
- namedTransformation(t) {
534
- return this.transformation.namedTransformation(t), this;
535
- }
536
- delivery(t) {
537
- return this.transformation.delivery(t), this;
538
- }
539
- backgroundColor(t) {
540
- return this.transformation.backgroundColor(t), this;
541
- }
542
- psdTools(t) {
543
- return this.transformation.psdTools(t), this;
544
- }
545
- extract(t) {
546
- return this.transformation.extract(t), this;
547
- }
548
- addFlag(t) {
549
- return this.transformation.addFlag(t), this;
550
- }
551
- customFunction(t) {
552
- return this.transformation.customFunction(t), this;
553
- }
554
- addAction(t) {
555
- return this.transformation.addAction(t), this;
556
- }
557
- addTransformation(t) {
558
- return this.transformation.addTransformation(t), this;
559
- }
560
- toString() {
561
- return this.transformation.toString();
562
- }
563
- underlay(t) {
564
- return this.transformation.underlay(t), this;
565
- }
566
- toURL(t = {}) {
567
- return this.createCloudinaryURL(this.transformation, t == null ? void 0 : t.trackedAnalytics);
568
- }
569
- }
570
- class Y extends R {
571
- constructor(t, e, r) {
572
- super(t, e, r, new K());
573
- }
574
- }
575
- class Z extends R {
576
- constructor(t, e, r) {
577
- super(t, e, r, new B()), this.assetType = "video";
578
- }
579
- transcode(t) {
580
- return this.transformation.transcode(t), this;
581
- }
582
- videoEdit(t) {
583
- return this.transformation.videoEdit(t), this;
584
- }
585
- }
586
- class X {
587
- constructor(t) {
588
- t && (this.cloudinaryConfig = t);
589
- }
590
- image(t) {
591
- return new Y(t, this.cloudinaryConfig.cloud, this.cloudinaryConfig.url);
592
- }
593
- video(t) {
594
- return new Z(t, this.cloudinaryConfig.cloud, this.cloudinaryConfig.url);
595
- }
596
- setConfig(t) {
597
- return this.cloudinaryConfig = t, this;
598
- }
599
- getConfig() {
600
- return this.cloudinaryConfig;
601
- }
602
- extendConfig() {
603
- }
604
- }
605
- const et = ({ publicId: i, format: t = "webp" }) => {
606
- const e = A(() => new X({ cloud: { cloudName: "fluid-attacks" } }), []);
607
- return A(() => e.image(i).format(t), [e, i, t]);
608
- };
609
- export {
610
- et as u
611
- };
@@ -1,14 +0,0 @@
1
- import { useState as c, useCallback as s } from "react";
2
- const u = (t) => {
3
- const [o, e] = c(!1), n = s(() => {
4
- e(!0);
5
- }, []), a = s(() => {
6
- e(!1);
7
- }, []), p = s(() => {
8
- e((r) => !r);
9
- }, []);
10
- return { close: a, isOpen: o, name: t, open: n, setIsOpen: e, toggle: p };
11
- };
12
- export {
13
- u
14
- };
@@ -1,12 +0,0 @@
1
- import { useMemo as r, useState as s } from "react";
2
- import u from "lodash";
3
- const m = (t, e) => r(() => u.debounce(t, e), [t, e]), i = (t) => {
4
- const [e, a] = s();
5
- return [e, m((o) => {
6
- a(o);
7
- }, (t == null ? void 0 : t.debounceWait) ?? 300)];
8
- };
9
- export {
10
- i as a,
11
- m as u
12
- };
@@ -1,4 +0,0 @@
1
- const n = (t) => ({ getVariant: (a, e) => t(a)[e] });
2
- export {
3
- n as v
4
- };