@fluidattacks/design 3.1.11 → 3.1.12

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 (204) hide show
  1. package/dist/_commonjsHelpers-C6fGbg64.mjs +6 -0
  2. package/dist/components/@core/index.js +18 -1
  3. package/dist/components/accordion/accordion-content/index.js +9 -1
  4. package/dist/components/accordion/index.js +21 -1
  5. package/dist/components/alert/index.js +111 -4
  6. package/dist/components/button/index.js +18 -1
  7. package/dist/components/card/card-header/index.js +14 -1
  8. package/dist/components/card/card-with-image/index.js +18 -1
  9. package/dist/components/card/card-with-input/index.js +57 -3
  10. package/dist/components/card/card-with-selector/index.js +16 -1
  11. package/dist/components/card/card-with-switch/index.js +12 -1
  12. package/dist/components/card/index.js +12 -1
  13. package/dist/components/carousel/index.js +36 -10
  14. package/dist/components/checkbox/index.js +84 -3
  15. package/dist/components/cloud-image/index.js +8 -1
  16. package/dist/components/code-snippet/index.js +27 -1
  17. package/dist/components/code-snippet/location-code/index.js +125 -1
  18. package/dist/components/colors/index.js +9 -1
  19. package/dist/components/confirm-dialog/index.js +23 -1
  20. package/dist/components/container/index.js +27 -3
  21. package/dist/components/content-card/category-tag/index.js +13 -1
  22. package/dist/components/content-card/event-date/index.js +18 -1
  23. package/dist/components/content-card/index.js +63 -3
  24. package/dist/components/content-card-carousel/index.js +15 -1
  25. package/dist/components/content-card-carousel/scroll-buttons/index.js +9 -1
  26. package/dist/components/divider/index.js +10 -1
  27. package/dist/components/empty-state/empty-button/index.js +6 -1
  28. package/dist/components/empty-state/index.js +21 -8
  29. package/dist/components/file-preview/index.js +15 -3
  30. package/dist/components/form/index.js +26 -3
  31. package/dist/components/grid-container/index.js +26 -5
  32. package/dist/components/group-selector/index.js +26 -1
  33. package/dist/components/group-selector/option-container/index.js +12 -1
  34. package/dist/components/icon/index.js +42 -4
  35. package/dist/components/icon-button/index.js +27 -3
  36. package/dist/components/indicator-card/index.js +15 -1
  37. package/dist/components/info-sidebar/index.js +16 -1
  38. package/dist/components/inputs/fields/combobox/index.js +26 -1
  39. package/dist/components/inputs/fields/combobox/option/index.js +8 -1
  40. package/dist/components/inputs/fields/date/calendar/cell/index.js +16 -1
  41. package/dist/components/inputs/fields/date/calendar/grid/index.js +15 -1
  42. package/dist/components/inputs/fields/date/calendar/header/index.js +16 -1
  43. package/dist/components/inputs/fields/date/calendar/index.js +15 -1
  44. package/dist/components/inputs/fields/date/index.js +18 -1
  45. package/dist/components/inputs/fields/date-range/calendar/index.js +16 -1
  46. package/dist/components/inputs/fields/date-range/index.js +28 -3
  47. package/dist/components/inputs/fields/date-time/calendar/index.js +31 -5
  48. package/dist/components/inputs/fields/date-time/index.js +18 -1
  49. package/dist/components/inputs/fields/editable/index.js +16 -1
  50. package/dist/components/inputs/fields/input/index.js +13 -1
  51. package/dist/components/inputs/fields/input-file/index.js +24 -4
  52. package/dist/components/inputs/fields/input-tags/index.js +14 -2
  53. package/dist/components/inputs/fields/number/index.js +10 -1
  54. package/dist/components/inputs/fields/number-range/index.js +11 -1
  55. package/dist/components/inputs/fields/phone/index.js +414 -11
  56. package/dist/components/inputs/fields/text-area/index.js +13 -1
  57. package/dist/components/inputs/index.js +28 -1
  58. package/dist/components/inputs/label/index.js +12 -1
  59. package/dist/components/inputs/outline-container/index.js +18 -1
  60. package/dist/components/inputs/utils/action-button/index.js +10 -1
  61. package/dist/components/inputs/utils/calendar-button/index.js +13 -1
  62. package/dist/components/inputs/utils/date-selector/index.js +8 -1
  63. package/dist/components/inputs/utils/date-time-field/index.js +32 -1
  64. package/dist/components/inputs/utils/dialog/index.js +11 -1
  65. package/dist/components/inputs/utils/number-field/index.js +13 -1
  66. package/dist/components/inputs/utils/popover/index.js +13 -1
  67. package/dist/components/interactive-card/icon/index.js +7 -1
  68. package/dist/components/interactive-card/index.js +15 -1
  69. package/dist/components/language-selector/index.js +13 -1
  70. package/dist/components/language-selector/item-list/index.js +8 -1
  71. package/dist/components/link/index.js +52 -7
  72. package/dist/components/list-item/index.js +16 -1
  73. package/dist/components/little-flag/index.js +15 -3
  74. package/dist/components/loading/index.js +28 -14
  75. package/dist/components/logo/index.js +7 -1
  76. package/dist/components/logo-carousel/index.js +10 -4
  77. package/dist/components/lottie/index.js +15 -3
  78. package/dist/components/menu/index.js +23 -1
  79. package/dist/components/message-banner/index.js +21 -4
  80. package/dist/components/modal/index.js +19 -1
  81. package/dist/components/modal/modal-confirm/index.js +10 -1
  82. package/dist/components/modal/modal-footer/index.js +16 -1
  83. package/dist/components/modal/modal-header/index.js +25 -1
  84. package/dist/components/notification/index.js +68 -5
  85. package/dist/components/notification-sign/index.js +26 -6
  86. package/dist/components/number-input/index.js +25 -7
  87. package/dist/components/oauth-selector/index.js +26 -1
  88. package/dist/components/oauth-selector/option-container/index.js +15 -1
  89. package/dist/components/plan-card/index.js +84 -5
  90. package/dist/components/plan-card/recommended-tag/index.js +10 -1
  91. package/dist/components/pop-up/description/index.js +13 -1
  92. package/dist/components/pop-up/index.js +23 -1
  93. package/dist/components/premium-feature/index.js +45 -3
  94. package/dist/components/priority-score/index.js +14 -1
  95. package/dist/components/progress/index.js +23 -3
  96. package/dist/components/progress-bar/index.js +95 -5
  97. package/dist/components/radio-button/index.js +88 -3
  98. package/dist/components/scroll-button/index.js +20 -2
  99. package/dist/components/search/index.js +63 -7
  100. package/dist/components/search-bar/index.js +32 -1
  101. package/dist/components/search-bar/item-searching/index.js +10 -1
  102. package/dist/components/severity-badge/index.js +14 -1
  103. package/dist/components/severity-overview/badge/index.js +18 -1
  104. package/dist/components/severity-overview/index.js +7 -1
  105. package/dist/components/show-on-hover/index.js +25 -3
  106. package/dist/components/slide-out-menu/index.js +2009 -3
  107. package/dist/components/slide-out-menu/menu-item/index.js +15 -1
  108. package/dist/components/slider/index.js +93 -7
  109. package/dist/components/slider/thumb/index.js +10 -1
  110. package/dist/components/step-lapse/index.js +95 -9
  111. package/dist/components/table-button/index.js +56 -3
  112. package/dist/components/tabs/fixed-tabs/index.js +9 -1
  113. package/dist/components/tabs/index.js +14 -1
  114. package/dist/components/tabs/tab/index.js +8 -1
  115. package/dist/components/tag/index.js +116 -3
  116. package/dist/components/timeline/card/index.js +9 -1
  117. package/dist/components/timeline/index.js +7 -1
  118. package/dist/components/toggle/index.js +45 -14
  119. package/dist/components/toggle-buttons/index.js +74 -5
  120. package/dist/components/tooltip/index.js +13 -1
  121. package/dist/components/tour/index.js +2481 -4
  122. package/dist/components/typography/heading/index.js +9 -1
  123. package/dist/components/typography/index.js +8 -1
  124. package/dist/components/typography/span/index.js +9 -1
  125. package/dist/components/typography/text/index.js +9 -1
  126. package/dist/components/web-form/index.js +59 -7
  127. package/dist/hooks/index.js +13 -1
  128. package/dist/index-38JqtnAI.mjs +122 -0
  129. package/dist/index-B5yoGFs6.mjs +54 -0
  130. package/dist/index-BLbKylyw.mjs +209 -0
  131. package/dist/{index-C0_LPuYU.mjs → index-Bu448Tz2.mjs} +22 -22
  132. package/dist/index-BwFnfaRh.mjs +2310 -0
  133. package/dist/index-Co_k0WFk.mjs +75 -0
  134. package/dist/index-Cu7uUMlx.mjs +82 -0
  135. package/dist/index-D-lcuEHY.mjs +1018 -0
  136. package/dist/index-DrfjITyT.mjs +61 -0
  137. package/dist/index.js +206 -1
  138. package/dist/styles-7_q7nHce.mjs +110 -0
  139. package/dist/styles-BA0WIQL-.mjs +74 -0
  140. package/dist/styles-C3cZmKVJ.mjs +131 -0
  141. package/dist/styles-CI-I6joH.mjs +144 -0
  142. package/dist/styles-Cx93EcVo.mjs +76 -0
  143. package/dist/styles-D85YYIjM.mjs +131 -0
  144. package/dist/styles-EIbGRPlk.mjs +106 -0
  145. package/dist/styles-Q1VXuWI7.mjs +65 -0
  146. package/dist/styles-fH2c4cfc.mjs +77 -0
  147. package/dist/{styles-BAhpqi6C.mjs → styles-lSVV9kjn.mjs} +28 -28
  148. package/dist/use-carousel-CvRxi2FI.mjs +17 -0
  149. package/dist/use-click-outside-BtZLIoU1.mjs +18 -0
  150. package/dist/use-cloudinary-image-fG7ODNgr.mjs +611 -0
  151. package/dist/use-modal-CkrZ-_-M.mjs +14 -0
  152. package/dist/use-search-DpLNvt7Q.mjs +12 -0
  153. package/dist/utils-CQvBF-wY.mjs +4 -0
  154. package/package.json +1 -1
  155. package/dist/_commonjsHelpers-C37NGDzP.js +0 -1
  156. package/dist/_commonjsHelpers-D6CrkqQz.mjs +0 -6
  157. package/dist/index-BH27NQKA.mjs +0 -2311
  158. package/dist/index-Bcw2vW_n.mjs +0 -75
  159. package/dist/index-C8zdgAVH.mjs +0 -82
  160. package/dist/index-CA_9DXWd.js +0 -5
  161. package/dist/index-CmylnDrF.js +0 -14
  162. package/dist/index-DUMgwAbO.js +0 -26
  163. package/dist/index-DpQYiwGu.js +0 -5
  164. package/dist/index-Dy8ZUIYs.js +0 -5
  165. package/dist/index-JPf5Yzg6.js +0 -17
  166. package/dist/index-OBZtKZuT.mjs +0 -1021
  167. package/dist/index-SsXlDjK4.mjs +0 -122
  168. package/dist/index-TKLFHcRp.js +0 -18
  169. package/dist/index-TnyKqJHo.mjs +0 -61
  170. package/dist/index-Yr95Cb7Z.mjs +0 -54
  171. package/dist/index-h9-U5wxq.mjs +0 -209
  172. package/dist/index-qCiUU4sZ.js +0 -9
  173. package/dist/index-qe0nJwzl.js +0 -15
  174. package/dist/styles--Elze-LV.js +0 -3
  175. package/dist/styles-3pR4Xdvy.js +0 -33
  176. package/dist/styles-59h91S9m.mjs +0 -65
  177. package/dist/styles-BCwLWpC3.mjs +0 -126
  178. package/dist/styles-BJ7-0I5X.mjs +0 -74
  179. package/dist/styles-BKObp9bh.mjs +0 -76
  180. package/dist/styles-BWVdbvFu.js +0 -5
  181. package/dist/styles-Bl-CstrT.js +0 -5
  182. package/dist/styles-Bn42XCW5.js +0 -7
  183. package/dist/styles-C2CoGJl7.js +0 -33
  184. package/dist/styles-CNzziAXG.js +0 -5
  185. package/dist/styles-CdD9waPD.js +0 -29
  186. package/dist/styles-CnKTwnFk.mjs +0 -110
  187. package/dist/styles-D4R-eerv.mjs +0 -77
  188. package/dist/styles-DNIIhyRC.mjs +0 -144
  189. package/dist/styles-DV8yOaqV.mjs +0 -131
  190. package/dist/styles-DYoftbd3.js +0 -42
  191. package/dist/styles-DlmKLhPh.js +0 -7
  192. package/dist/styles-be8gOdgy.mjs +0 -106
  193. package/dist/use-carousel-64dKFW4E.js +0 -1
  194. package/dist/use-carousel-D7xeL3YZ.mjs +0 -17
  195. package/dist/use-click-outside-BqkLISED.js +0 -1
  196. package/dist/use-click-outside-C4Z4pdiW.mjs +0 -18
  197. package/dist/use-cloudinary-image-DKMl7jbx.mjs +0 -612
  198. package/dist/use-cloudinary-image-YMMafagv.js +0 -1
  199. package/dist/use-modal-CNbLSSQb.mjs +0 -14
  200. package/dist/use-modal-_bYY6M_n.js +0 -1
  201. package/dist/use-search-75ip5xR-.mjs +0 -12
  202. package/dist/use-search-DeL4UDMh.js +0 -1
  203. package/dist/utils-C2whpEd3.js +0 -1
  204. package/dist/utils-Da0qL35u.mjs +0 -4
@@ -0,0 +1,611 @@
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
+ };
@@ -0,0 +1,14 @@
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
+ };
@@ -0,0 +1,12 @@
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
+ };
@@ -0,0 +1,4 @@
1
+ const n = (t) => ({ getVariant: (a, e) => t(a)[e] });
2
+ export {
3
+ n as v
4
+ };
package/package.json CHANGED
@@ -119,5 +119,5 @@
119
119
  "test-storybook": "test-storybook"
120
120
  },
121
121
  "typings": "./dist/index.d.ts",
122
- "version": "3.1.11"
122
+ "version": "3.1.12"
123
123
  }
@@ -1 +0,0 @@
1
- "use strict";exports.getDefaultExportFromCjs=function(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t};
@@ -1,6 +0,0 @@
1
- function e(e2) {
2
- return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2;
3
- }
4
- export {
5
- e as g
6
- };