@popsure/dirty-swan 0.45.0-alpha → 0.47.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.
- package/dist/cjs/index.js +421 -362
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/components/button/index.d.ts +4 -9
- package/dist/cjs/lib/components/button/index.stories.d.ts +2 -10
- package/dist/cjs/lib/components/dateSelector/components/Calendar.d.ts +16 -0
- package/dist/cjs/lib/components/dateSelector/index.d.ts +5 -7
- package/dist/cjs/lib/components/dateSelector/index.stories.d.ts +1 -1
- package/dist/cjs/lib/components/input/currency/input.stories.d.ts +7 -0
- package/dist/cjs/lib/components/input/index.d.ts +5 -3
- package/dist/cjs/lib/components/input/input.stories.d.ts +11 -3
- package/dist/cjs/lib/components/input/stories/config.d.ts +7 -0
- package/dist/esm/{index-f0e3bc9a.js → Calendar-62c6cf21.js} +24 -150
- package/dist/esm/Calendar-62c6cf21.js.map +1 -0
- package/dist/esm/components/button/index.js +2 -3
- package/dist/esm/components/button/index.js.map +1 -1
- package/dist/esm/components/button/index.stories.js +3 -16
- package/dist/esm/components/button/index.stories.js.map +1 -1
- package/dist/esm/components/card/index.js.map +1 -1
- package/dist/esm/components/card/index.stories.js +2 -2
- package/dist/esm/components/card/index.stories.js.map +1 -1
- package/dist/esm/components/comparisonTable/components/TableInfoButton/index.js +7 -10
- package/dist/esm/components/comparisonTable/components/TableInfoButton/index.js.map +1 -1
- package/dist/esm/components/comparisonTable/index.js +2 -0
- package/dist/esm/components/comparisonTable/index.js.map +1 -1
- package/dist/esm/components/dateSelector/components/Calendar.js +11 -0
- package/dist/esm/components/dateSelector/components/Calendar.js.map +1 -0
- package/dist/esm/components/dateSelector/index.js +203 -7
- package/dist/esm/components/dateSelector/index.js.map +1 -1
- package/dist/esm/components/dateSelector/index.stories.js +14 -5
- package/dist/esm/components/dateSelector/index.stories.js.map +1 -1
- package/dist/esm/components/dateSelector/index.test.js +177 -23
- package/dist/esm/components/dateSelector/index.test.js.map +1 -1
- package/dist/esm/components/icon/icons/Info.js +2 -2
- package/dist/esm/components/icon/icons/Info.js.map +1 -1
- package/dist/esm/components/icon/icons.stories.js +1 -1
- package/dist/esm/components/icon/index.stories.js +1 -1
- package/dist/esm/components/input/currency/input.stories.js +1 -1
- package/dist/esm/components/input/iban/index.js +1 -1
- package/dist/esm/components/input/iban/index.js.map +1 -1
- package/dist/esm/components/input/index.js +10 -7
- package/dist/esm/components/input/index.js.map +1 -1
- package/dist/esm/components/input/input.stories.js +3 -3
- package/dist/esm/components/input/input.stories.js.map +1 -1
- package/dist/esm/{config-56f12c98.js → config-1d276a9d.js} +7 -2
- package/dist/esm/config-1d276a9d.js.map +1 -0
- package/dist/esm/{index-03b0133a.js → index-e506c4ca.js} +3 -3
- package/dist/esm/{index-03b0133a.js.map → index-e506c4ca.js.map} +1 -1
- package/dist/esm/index.js +4 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/components/button/index.d.ts +4 -9
- package/dist/esm/lib/components/button/index.stories.d.ts +2 -10
- package/dist/esm/lib/components/dateSelector/components/Calendar.d.ts +16 -0
- package/dist/esm/lib/components/dateSelector/index.d.ts +5 -7
- package/dist/esm/lib/components/dateSelector/index.stories.d.ts +1 -1
- package/dist/esm/lib/components/input/currency/input.stories.d.ts +7 -0
- package/dist/esm/lib/components/input/index.d.ts +5 -3
- package/dist/esm/lib/components/input/input.stories.d.ts +11 -3
- package/dist/esm/lib/components/input/stories/config.d.ts +7 -0
- package/package.json +1 -1
- package/src/lib/components/button/index.stories.tsx +1 -26
- package/src/lib/components/button/index.tsx +10 -21
- package/src/lib/components/card/index.tsx +1 -1
- package/src/lib/components/comparisonTable/components/TableInfoButton/index.tsx +5 -30
- package/src/lib/components/comparisonTable/components/TableInfoButton/style.module.scss +6 -2
- package/src/lib/components/dateSelector/components/Calendar.tsx +112 -0
- package/src/lib/components/dateSelector/{datepicker.scss → components/datepicker.scss} +4 -4
- package/src/lib/components/dateSelector/components/style.module.scss +3 -0
- package/src/lib/components/dateSelector/index.stories.tsx +18 -8
- package/src/lib/components/dateSelector/index.test.tsx +118 -20
- package/src/lib/components/dateSelector/index.tsx +196 -227
- package/src/lib/components/dateSelector/style.module.scss +6 -79
- package/src/lib/components/input/iban/index.tsx +1 -1
- package/src/lib/components/input/index.tsx +13 -7
- package/src/lib/components/input/input.stories.tsx +2 -0
- package/src/lib/components/input/stories/config.ts +6 -1
- package/src/lib/components/input/style.module.scss +8 -1
- package/dist/esm/config-56f12c98.js.map +0 -1
- package/dist/esm/index-f0e3bc9a.js.map +0 -1
- package/src/lib/components/dateSelector/icons/chevron-left.svg +0 -3
- package/src/lib/components/dateSelector/icons/chevron-right.svg +0 -3
- package/src/lib/components/dateSelector/index.test.ts +0 -33
package/dist/cjs/index.js
CHANGED
|
@@ -152,6 +152,163 @@ var localeData$1 = {exports: {}};
|
|
|
152
152
|
|
|
153
153
|
var localeData = localeData$1.exports;
|
|
154
154
|
|
|
155
|
+
var customParseFormat$1 = {exports: {}};
|
|
156
|
+
|
|
157
|
+
(function (module, exports) {
|
|
158
|
+
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^\s\d-_:/()]+/,o={},s=function(t){return (t=+t)+(t>68?1900:2e3)};var a=function(t){return function(e){this[t]=+e;}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t);}],u=function(t){var e=o[t];return e&&(e.indexOf?e:e.s.concat(e.f))},h=function(t,e){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(t.indexOf(r(i,0,e))>-1){n=i>12;break}}else n=t===(e?"pm":"PM");return n},d={A:[i,function(t){this.afternoon=h(t,!1);}],a:[i,function(t){this.afternoon=h(t,!0);}],S:[/\d/,function(t){this.milliseconds=100*+t;}],SS:[n,function(t){this.milliseconds=10*+t;}],SSS:[/\d{3}/,function(t){this.milliseconds=+t;}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(t){var e=o.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===t&&(this.day=r);}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(t){var e=u("months"),n=(u("monthsShort")||e.map((function(t){return t.substr(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n;}],MMMM:[i,function(t){var e=u("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e;}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(t){this.year=s(t);}],YYYY:[/\d{4}/,a("year")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,r){var o=r&&r.toUpperCase();return n||i[r]||t[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),a=s.length,f=0;f<a;f+=1){var u=s[f],h=d[u],c=h&&h[0],l=h&&h[1];s[f]=l?{regex:c,parser:l}:u.replace(/^\[|\]$/g,"");}return function(t){for(var e={},n=0,r=0;n<a;n+=1){var i=s[n];if("string"==typeof i)r+=i.length;else {var o=i.regex,f=i.parser,u=t.substr(r),h=o.exec(u)[0];f.call(e,h),t=t.replace(h,"");}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon;}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(s=t.parseTwoDigitYear);var r=e.prototype,i=r.parse;r.parse=function(t){var e=t.date,r=t.utc,s=t.args;this.$u=r;var a=s[1];if("string"==typeof a){var f=!0===s[2],u=!0===s[3],h=f||u,d=s[2];u&&(d=s[2]),o=this.$locale(),!f&&d&&(o=n.Ls[d]),this.$d=function(t,e,n){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var r=c(e)(t),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,u=r.seconds,h=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=u||0,g=h||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(t){return new Date("")}}(e,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),h&&e!=this.format(a)&&(this.$d=new Date("")),o={};}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(""));}else i.call(this,t);};}}));
|
|
159
|
+
}(customParseFormat$1));
|
|
160
|
+
|
|
161
|
+
var customParseFormat = customParseFormat$1.exports;
|
|
162
|
+
|
|
163
|
+
function zerofill(input, size) {
|
|
164
|
+
if (size === void 0) { size = 2; }
|
|
165
|
+
var toReturn = String(input);
|
|
166
|
+
while (toReturn.length < size) {
|
|
167
|
+
toReturn = '0' + toReturn;
|
|
168
|
+
}
|
|
169
|
+
return toReturn;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
dayjs.extend(customParseFormat);
|
|
173
|
+
function calendarDateToISODate(calendarDate) {
|
|
174
|
+
return calendarDate.year + "-" + zerofill(calendarDate.month) + "-" + zerofill(calendarDate.day);
|
|
175
|
+
}
|
|
176
|
+
function isoStringtoCalendarDate(input) {
|
|
177
|
+
var date = dayjs(input, 'YYYY-MM-DD');
|
|
178
|
+
var dateValidity = dayjs(input, 'YYYY-MM-DD', true).isValid();
|
|
179
|
+
if (dateValidity === false) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
var year = date.year();
|
|
183
|
+
var month = date.get('month');
|
|
184
|
+
var day = date.date();
|
|
185
|
+
return { year: year, month: month + 1, day: day };
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
function styleInject(css, ref) {
|
|
189
|
+
if ( ref === void 0 ) ref = {};
|
|
190
|
+
var insertAt = ref.insertAt;
|
|
191
|
+
|
|
192
|
+
if (!css || typeof document === 'undefined') { return; }
|
|
193
|
+
|
|
194
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
195
|
+
var style = document.createElement('style');
|
|
196
|
+
style.type = 'text/css';
|
|
197
|
+
|
|
198
|
+
if (insertAt === 'top') {
|
|
199
|
+
if (head.firstChild) {
|
|
200
|
+
head.insertBefore(style, head.firstChild);
|
|
201
|
+
} else {
|
|
202
|
+
head.appendChild(style);
|
|
203
|
+
}
|
|
204
|
+
} else {
|
|
205
|
+
head.appendChild(style);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
if (style.styleSheet) {
|
|
209
|
+
style.styleSheet.cssText = css;
|
|
210
|
+
} else {
|
|
211
|
+
style.appendChild(document.createTextNode(css));
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
var css_248z$A = ".style-module_container__3bJf5 {\n display: flex;\n}\n@media (max-width: 34rem) {\n .style-module_container__3bJf5 {\n flex-direction: column;\n }\n}\n\n.style-module_dayInput__1OBNv,\n.style-module_monthInput__2L_7o {\n width: 88px;\n flex: 1;\n}\n\n.style-module_yearInput__2C_H8 {\n width: 104px;\n}\n@media (max-width: 34rem) {\n .style-module_yearInput__2C_H8 {\n width: 100%;\n }\n}";
|
|
216
|
+
var styles$z = {"container":"style-module_container__3bJf5","dayInput":"style-module_dayInput__1OBNv","monthInput":"style-module_monthInput__2L_7o","yearInput":"style-module_yearInput__2C_H8"};
|
|
217
|
+
styleInject(css_248z$A);
|
|
218
|
+
|
|
219
|
+
var classnames = {exports: {}};
|
|
220
|
+
|
|
221
|
+
/*!
|
|
222
|
+
Copyright (c) 2018 Jed Watson.
|
|
223
|
+
Licensed under the MIT License (MIT), see
|
|
224
|
+
http://jedwatson.github.io/classnames
|
|
225
|
+
*/
|
|
226
|
+
|
|
227
|
+
(function (module) {
|
|
228
|
+
/* global define */
|
|
229
|
+
|
|
230
|
+
(function () {
|
|
231
|
+
|
|
232
|
+
var hasOwn = {}.hasOwnProperty;
|
|
233
|
+
|
|
234
|
+
function classNames() {
|
|
235
|
+
var classes = [];
|
|
236
|
+
|
|
237
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
238
|
+
var arg = arguments[i];
|
|
239
|
+
if (!arg) continue;
|
|
240
|
+
|
|
241
|
+
var argType = typeof arg;
|
|
242
|
+
|
|
243
|
+
if (argType === 'string' || argType === 'number') {
|
|
244
|
+
classes.push(arg);
|
|
245
|
+
} else if (Array.isArray(arg)) {
|
|
246
|
+
if (arg.length) {
|
|
247
|
+
var inner = classNames.apply(null, arg);
|
|
248
|
+
if (inner) {
|
|
249
|
+
classes.push(inner);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
} else if (argType === 'object') {
|
|
253
|
+
if (arg.toString === Object.prototype.toString) {
|
|
254
|
+
for (var key in arg) {
|
|
255
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
256
|
+
classes.push(key);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
} else {
|
|
260
|
+
classes.push(arg.toString());
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
return classes.join(' ');
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
if (module.exports) {
|
|
269
|
+
classNames.default = classNames;
|
|
270
|
+
module.exports = classNames;
|
|
271
|
+
} else {
|
|
272
|
+
window.classNames = classNames;
|
|
273
|
+
}
|
|
274
|
+
}());
|
|
275
|
+
}(classnames));
|
|
276
|
+
|
|
277
|
+
var classNames$1 = classnames.exports;
|
|
278
|
+
|
|
279
|
+
function generateId() {
|
|
280
|
+
var _a;
|
|
281
|
+
if (typeof window !== "undefined" && ((_a = window === null || window === void 0 ? void 0 : window.crypto) === null || _a === void 0 ? void 0 : _a.getRandomValues)) {
|
|
282
|
+
return ([1e7] + "-" + 1e3 + "-" + 4e3 + "-" + 8e3 + "-" + 1e11).replace(/[018]/g, function (c) {
|
|
283
|
+
return (((c ^ window.crypto.getRandomValues(new Uint8Array(1))[0]) & 15) >> c / 4).toString(16);
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
return 'xxxx-xxxx-xxx-xxxx'.replace(/[x]/g, function () { return (Math.floor(Math.random() * 16).toString(16)); });
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
var css_248z$z = ".style-module_container__2L4SP {\n position: relative;\n}\n\n.style-module_prefix__3jAFZ {\n position: absolute;\n left: 16px;\n top: 50%;\n transform: translateY(-50%);\n color: var(--ds-grey-500);\n transition: 0.3s top;\n}\n.style-module_prefix--with-error__1yTTM {\n color: var(--ds-red-500);\n}\n.style-module_prefix--disabled__2-gcw {\n color: var(--ds-grey-600);\n}\n\n.style-module_input__1eJO5:not(:placeholder-shown) ~ .style-module_placeholder__1U2z0,\n.style-module_input__1eJO5:focus ~ .style-module_placeholder__1U2z0,\n.style-module_input--with-inside-label__253bZ ~ .style-module_placeholder__1U2z0 {\n top: 7px;\n left: 16px;\n transform: translateY(0);\n font-size: 10px;\n line-height: 12px;\n opacity: 1;\n}\n\n.style-module_input__1eJO5:focus ~ .style-module_placeholder__1U2z0 {\n color: var(--ds-primary-500);\n}\n.style-module_input__1eJO5:focus ~ .style-module_placeholder--with-error__2ieRU {\n color: var(--ds-red-500);\n}\n\n.style-module_input__1eJO5:focus ~ .style-module_prefix__3jAFZ {\n color: var(--ds-primary-500);\n}\n.style-module_input__1eJO5:focus ~ .style-module_prefix--with-error__1yTTM {\n color: var(--ds-red-500);\n}\n\n.style-module_input__1eJO5:not(:placeholder-shown) ~ .style-module_prefix__3jAFZ,\n.style-module_input__1eJO5:focus ~ .style-module_prefix__3jAFZ {\n top: 28px;\n}\n\n.style-module_input--with-inside-label__253bZ ~ .style-module_prefix__3jAFZ,\n.style-module_input--with-inside-label__253bZ:focus ~ .style-module_prefix__3jAFZ,\n.style-module_input--with-inside-label__253bZ:not(:placeholder-shown) ~ .style-module_prefix__3jAFZ {\n top: 29px;\n}\n\n.style-module_input__1eJO5 {\n box-sizing: border-box;\n padding-top: 9px;\n font-family: inherit;\n}\n.style-module_input--no-placeholder__3EGwh {\n padding-top: 0px;\n}\n.style-module_input--with-prefix__38e0j {\n padding-left: 32px !important;\n}\n\n.style-module_placeholder__1U2z0 {\n position: absolute;\n pointer-events: none;\n left: 16px;\n top: 50%;\n transform: translateY(-50%);\n transition: 0.3s ease all;\n color: var(--ds-grey-500);\n}\n.style-module_placeholder--with-prefix__2PquQ {\n left: 32px;\n}\n.style-module_placeholder--with-error__2ieRU {\n color: var(--ds-red-500);\n}\n\n.style-module_label__3FEZ1 {\n display: inline-block;\n margin-bottom: 8px;\n color: var(--ds-grey-600);\n}\n.style-module_label--with-error__166bP {\n color: var(--ds-red-500);\n}\n\n.style-module_error__167Zc {\n margin-top: 4px;\n}";
|
|
290
|
+
var styles$y = {"container":"style-module_container__2L4SP","prefix":"style-module_prefix__3jAFZ","prefix--with-error":"style-module_prefix--with-error__1yTTM","prefix--disabled":"style-module_prefix--disabled__2-gcw","input":"style-module_input__1eJO5","placeholder":"style-module_placeholder__1U2z0","input--with-inside-label":"style-module_input--with-inside-label__253bZ","placeholder--with-error":"style-module_placeholder--with-error__2ieRU","input--no-placeholder":"style-module_input--no-placeholder__3EGwh","input--with-prefix":"style-module_input--with-prefix__38e0j","placeholder--with-prefix":"style-module_placeholder--with-prefix__2PquQ","label":"style-module_label__3FEZ1","label--with-error":"style-module_label--with-error__166bP","error":"style-module_error__167Zc"};
|
|
291
|
+
styleInject(css_248z$z);
|
|
292
|
+
|
|
293
|
+
var Input = require$$0__default['default'].forwardRef(function (_a, ref) {
|
|
294
|
+
var _b, _c, _d, _e, _f, _g;
|
|
295
|
+
var className = _a.className, placeholder = _a.placeholder, label = _a.label, id = _a.id, prefix = _a.prefix, error = _a.error, disabled = _a.disabled, _h = _a.hideLabel, hideLabel = _h === void 0 ? false : _h, _j = _a.labelInsideInput, labelInsideInput = _j === void 0 ? false : _j, props = __rest$1(_a, ["className", "placeholder", "label", "id", "prefix", "error", "disabled", "hideLabel", "labelInsideInput"]);
|
|
296
|
+
var uniqueId = require$$0.useState(id !== null && id !== void 0 ? id : generateId())[0];
|
|
297
|
+
return (jsxRuntime.jsxs("div", __assign({ className: styles$y.container + " " + (className !== null && className !== void 0 ? className : '') }, { children: [label && !labelInsideInput && (jsxRuntime.jsx("label", __assign({ htmlFor: uniqueId, className: classNames$1('p-p', styles$y.label, (_b = {},
|
|
298
|
+
_b[styles$y['label--with-error']] = error,
|
|
299
|
+
_b['sr-only'] = hideLabel,
|
|
300
|
+
_b)) }, { children: label }), void 0)),
|
|
301
|
+
jsxRuntime.jsxs("div", __assign({ style: { position: 'relative' } }, { children: [jsxRuntime.jsx("input", __assign({ id: uniqueId, "data-testid": "ds-input-input", type: "text", ref: ref, className: classNames$1(error ? 'p-input--error' : 'p-input', (!label || labelInsideInput) && placeholder && placeholder.length > 0
|
|
302
|
+
? styles$y.input
|
|
303
|
+
: styles$y['input--no-placeholder'], (_c = {},
|
|
304
|
+
_c[styles$y['input--with-prefix']] = prefix,
|
|
305
|
+
_c[styles$y['input--with-inside-label']] = labelInsideInput,
|
|
306
|
+
_c)), placeholder: label || labelInsideInput ? placeholder : ' ', disabled: disabled }, props), void 0),
|
|
307
|
+
prefix && (jsxRuntime.jsx("span", __assign({ className: classNames$1(styles$y.prefix, (_d = {}, _d[styles$y['prefix--with-error']] = error, _d), (_e = {}, _e[styles$y['prefix--disabled']] = disabled, _e)) }, { children: prefix }), void 0)),
|
|
308
|
+
(!label || labelInsideInput) && (jsxRuntime.jsx("label", __assign({ htmlFor: uniqueId, className: classNames$1(styles$y.placeholder, (_f = {}, _f[styles$y['placeholder--with-prefix']] = prefix, _f), (_g = {}, _g[styles$y['placeholder--with-error']] = error, _g)) }, { children: labelInsideInput ? label : placeholder }), void 0))] }), void 0),
|
|
309
|
+
error && (jsxRuntime.jsx("p", __assign({ className: "p-p--small tc-red-500 w100 " + styles$y.error }, { children: error }), void 0))] }), void 0));
|
|
310
|
+
});
|
|
311
|
+
|
|
155
312
|
var build = {};
|
|
156
313
|
|
|
157
314
|
var DayPicker$2 = {};
|
|
@@ -303,14 +460,14 @@ Caption$1.default = Caption;
|
|
|
303
460
|
|
|
304
461
|
var Navbar$1 = {};
|
|
305
462
|
|
|
306
|
-
var classNames
|
|
463
|
+
var classNames = {};
|
|
307
464
|
|
|
308
|
-
Object.defineProperty(classNames
|
|
465
|
+
Object.defineProperty(classNames, "__esModule", {
|
|
309
466
|
value: true
|
|
310
467
|
});
|
|
311
468
|
// Proxy object to map classnames when css modules are not used
|
|
312
469
|
|
|
313
|
-
classNames
|
|
470
|
+
classNames.default = {
|
|
314
471
|
container: 'DayPicker',
|
|
315
472
|
wrapper: 'DayPicker-wrapper',
|
|
316
473
|
interactionDisabled: 'DayPicker--interactionDisabled',
|
|
@@ -350,7 +507,7 @@ var _react$5 = require$$0__default['default'];
|
|
|
350
507
|
|
|
351
508
|
var _react2$5 = _interopRequireDefault$6(_react$5);
|
|
352
509
|
|
|
353
|
-
var _classNames$3 = classNames
|
|
510
|
+
var _classNames$3 = classNames;
|
|
354
511
|
|
|
355
512
|
var _classNames2$3 = _interopRequireDefault$6(_classNames$3);
|
|
356
513
|
|
|
@@ -834,7 +991,7 @@ var _DateUtils$4 = DateUtils$2;
|
|
|
834
991
|
|
|
835
992
|
var _LocaleUtils$1 = LocaleUtils$1;
|
|
836
993
|
|
|
837
|
-
var _classNames$2 = classNames
|
|
994
|
+
var _classNames$2 = classNames;
|
|
838
995
|
|
|
839
996
|
var _classNames2$2 = _interopRequireDefault$4(_classNames$2);
|
|
840
997
|
|
|
@@ -1001,7 +1158,7 @@ var _DateUtils$3 = DateUtils$2;
|
|
|
1001
1158
|
|
|
1002
1159
|
var _Helpers$3 = Helpers$2;
|
|
1003
1160
|
|
|
1004
|
-
var _classNames$1 = classNames
|
|
1161
|
+
var _classNames$1 = classNames;
|
|
1005
1162
|
|
|
1006
1163
|
var _classNames2$1 = _interopRequireDefault$3(_classNames$1);
|
|
1007
1164
|
|
|
@@ -1548,7 +1705,7 @@ var _ModifiersUtils = ModifiersUtils$2;
|
|
|
1548
1705
|
|
|
1549
1706
|
var ModifiersUtils = _interopRequireWildcard(_ModifiersUtils);
|
|
1550
1707
|
|
|
1551
|
-
var _classNames = classNames
|
|
1708
|
+
var _classNames = classNames;
|
|
1552
1709
|
|
|
1553
1710
|
var _classNames2 = _interopRequireDefault(_classNames);
|
|
1554
1711
|
|
|
@@ -2126,39 +2283,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
2126
2283
|
|
|
2127
2284
|
var DayPicker = /*@__PURE__*/getDefaultExportFromCjs(build);
|
|
2128
2285
|
|
|
2129
|
-
var customParseFormat$1 = {exports: {}};
|
|
2130
|
-
|
|
2131
|
-
(function (module, exports) {
|
|
2132
|
-
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^\s\d-_:/()]+/,o={},s=function(t){return (t=+t)+(t>68?1900:2e3)};var a=function(t){return function(e){this[t]=+e;}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t);}],u=function(t){var e=o[t];return e&&(e.indexOf?e:e.s.concat(e.f))},h=function(t,e){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(t.indexOf(r(i,0,e))>-1){n=i>12;break}}else n=t===(e?"pm":"PM");return n},d={A:[i,function(t){this.afternoon=h(t,!1);}],a:[i,function(t){this.afternoon=h(t,!0);}],S:[/\d/,function(t){this.milliseconds=100*+t;}],SS:[n,function(t){this.milliseconds=10*+t;}],SSS:[/\d{3}/,function(t){this.milliseconds=+t;}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(t){var e=o.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===t&&(this.day=r);}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(t){var e=u("months"),n=(u("monthsShort")||e.map((function(t){return t.substr(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n;}],MMMM:[i,function(t){var e=u("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e;}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(t){this.year=s(t);}],YYYY:[/\d{4}/,a("year")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,r){var o=r&&r.toUpperCase();return n||i[r]||t[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),a=s.length,f=0;f<a;f+=1){var u=s[f],h=d[u],c=h&&h[0],l=h&&h[1];s[f]=l?{regex:c,parser:l}:u.replace(/^\[|\]$/g,"");}return function(t){for(var e={},n=0,r=0;n<a;n+=1){var i=s[n];if("string"==typeof i)r+=i.length;else {var o=i.regex,f=i.parser,u=t.substr(r),h=o.exec(u)[0];f.call(e,h),t=t.replace(h,"");}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon;}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(s=t.parseTwoDigitYear);var r=e.prototype,i=r.parse;r.parse=function(t){var e=t.date,r=t.utc,s=t.args;this.$u=r;var a=s[1];if("string"==typeof a){var f=!0===s[2],u=!0===s[3],h=f||u,d=s[2];u&&(d=s[2]),o=this.$locale(),!f&&d&&(o=n.Ls[d]),this.$d=function(t,e,n){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var r=c(e)(t),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,u=r.seconds,h=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=u||0,g=h||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(t){return new Date("")}}(e,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),h&&e!=this.format(a)&&(this.$d=new Date("")),o={};}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(""));}else i.call(this,t);};}}));
|
|
2133
|
-
}(customParseFormat$1));
|
|
2134
|
-
|
|
2135
|
-
var customParseFormat = customParseFormat$1.exports;
|
|
2136
|
-
|
|
2137
|
-
function zerofill(input, size) {
|
|
2138
|
-
if (size === void 0) { size = 2; }
|
|
2139
|
-
var toReturn = String(input);
|
|
2140
|
-
while (toReturn.length < size) {
|
|
2141
|
-
toReturn = '0' + toReturn;
|
|
2142
|
-
}
|
|
2143
|
-
return toReturn;
|
|
2144
|
-
}
|
|
2145
|
-
|
|
2146
|
-
dayjs.extend(customParseFormat);
|
|
2147
|
-
function calendarDateToISODate(calendarDate) {
|
|
2148
|
-
return calendarDate.year + "-" + zerofill(calendarDate.month) + "-" + zerofill(calendarDate.day);
|
|
2149
|
-
}
|
|
2150
|
-
function isoStringtoCalendarDate(input) {
|
|
2151
|
-
var date = dayjs(input, 'YYYY-MM-DD');
|
|
2152
|
-
var dateValidity = dayjs(input, 'YYYY-MM-DD', true).isValid();
|
|
2153
|
-
if (dateValidity === false) {
|
|
2154
|
-
return;
|
|
2155
|
-
}
|
|
2156
|
-
var year = date.year();
|
|
2157
|
-
var month = date.get('month');
|
|
2158
|
-
var day = date.date();
|
|
2159
|
-
return { year: year, month: month + 1, day: day };
|
|
2160
|
-
}
|
|
2161
|
-
|
|
2162
2286
|
var useOnClickOutside = function (ref, callback) {
|
|
2163
2287
|
require$$0.useEffect(function () {
|
|
2164
2288
|
var listener = function (event) {
|
|
@@ -2176,103 +2300,16 @@ var useOnClickOutside = function (ref, callback) {
|
|
|
2176
2300
|
}, [ref, callback]);
|
|
2177
2301
|
};
|
|
2178
2302
|
|
|
2179
|
-
var
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
Copyright (c) 2018 Jed Watson.
|
|
2183
|
-
Licensed under the MIT License (MIT), see
|
|
2184
|
-
http://jedwatson.github.io/classnames
|
|
2185
|
-
*/
|
|
2186
|
-
|
|
2187
|
-
(function (module) {
|
|
2188
|
-
/* global define */
|
|
2189
|
-
|
|
2190
|
-
(function () {
|
|
2191
|
-
|
|
2192
|
-
var hasOwn = {}.hasOwnProperty;
|
|
2193
|
-
|
|
2194
|
-
function classNames() {
|
|
2195
|
-
var classes = [];
|
|
2196
|
-
|
|
2197
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
2198
|
-
var arg = arguments[i];
|
|
2199
|
-
if (!arg) continue;
|
|
2200
|
-
|
|
2201
|
-
var argType = typeof arg;
|
|
2202
|
-
|
|
2203
|
-
if (argType === 'string' || argType === 'number') {
|
|
2204
|
-
classes.push(arg);
|
|
2205
|
-
} else if (Array.isArray(arg)) {
|
|
2206
|
-
if (arg.length) {
|
|
2207
|
-
var inner = classNames.apply(null, arg);
|
|
2208
|
-
if (inner) {
|
|
2209
|
-
classes.push(inner);
|
|
2210
|
-
}
|
|
2211
|
-
}
|
|
2212
|
-
} else if (argType === 'object') {
|
|
2213
|
-
if (arg.toString === Object.prototype.toString) {
|
|
2214
|
-
for (var key in arg) {
|
|
2215
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
2216
|
-
classes.push(key);
|
|
2217
|
-
}
|
|
2218
|
-
}
|
|
2219
|
-
} else {
|
|
2220
|
-
classes.push(arg.toString());
|
|
2221
|
-
}
|
|
2222
|
-
}
|
|
2223
|
-
}
|
|
2224
|
-
|
|
2225
|
-
return classes.join(' ');
|
|
2226
|
-
}
|
|
2227
|
-
|
|
2228
|
-
if (module.exports) {
|
|
2229
|
-
classNames.default = classNames;
|
|
2230
|
-
module.exports = classNames;
|
|
2231
|
-
} else {
|
|
2232
|
-
window.classNames = classNames;
|
|
2233
|
-
}
|
|
2234
|
-
}());
|
|
2235
|
-
}(classnames));
|
|
2236
|
-
|
|
2237
|
-
var classNames = classnames.exports;
|
|
2238
|
-
|
|
2239
|
-
function styleInject(css, ref) {
|
|
2240
|
-
if ( ref === void 0 ) ref = {};
|
|
2241
|
-
var insertAt = ref.insertAt;
|
|
2242
|
-
|
|
2243
|
-
if (!css || typeof document === 'undefined') { return; }
|
|
2244
|
-
|
|
2245
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
2246
|
-
var style = document.createElement('style');
|
|
2247
|
-
style.type = 'text/css';
|
|
2248
|
-
|
|
2249
|
-
if (insertAt === 'top') {
|
|
2250
|
-
if (head.firstChild) {
|
|
2251
|
-
head.insertBefore(style, head.firstChild);
|
|
2252
|
-
} else {
|
|
2253
|
-
head.appendChild(style);
|
|
2254
|
-
}
|
|
2255
|
-
} else {
|
|
2256
|
-
head.appendChild(style);
|
|
2257
|
-
}
|
|
2258
|
-
|
|
2259
|
-
if (style.styleSheet) {
|
|
2260
|
-
style.styleSheet.cssText = css;
|
|
2261
|
-
} else {
|
|
2262
|
-
style.appendChild(document.createTextNode(css));
|
|
2263
|
-
}
|
|
2264
|
-
}
|
|
2265
|
-
|
|
2266
|
-
var css_248z$z = ".styles-module_wrapper__1_lY0 {\n margin: 4px;\n}";
|
|
2267
|
-
var styles$y = {"wrapper":"styles-module_wrapper__1_lY0"};
|
|
2268
|
-
styleInject(css_248z$z);
|
|
2303
|
+
var css_248z$y = ".styles-module_wrapper__1_lY0 {\n margin: 4px;\n}";
|
|
2304
|
+
var styles$x = {"wrapper":"styles-module_wrapper__1_lY0"};
|
|
2305
|
+
styleInject(css_248z$y);
|
|
2269
2306
|
|
|
2270
2307
|
var IconWrapper = function (_a) {
|
|
2271
2308
|
var _b;
|
|
2272
2309
|
var children = _a.children, _c = _a.size, size = _c === void 0 ? 16 : _c, color = _a.color, className = _a.className, noMargin = _a.noMargin;
|
|
2273
|
-
return (jsxRuntime.jsx("span", __assign({ className: classNames('d-inline-block', className !== null && className !== void 0 ? className : '', (_b = {},
|
|
2310
|
+
return (jsxRuntime.jsx("span", __assign({ className: classNames$1('d-inline-block', className !== null && className !== void 0 ? className : '', (_b = {},
|
|
2274
2311
|
_b["tc-" + color] = !!color,
|
|
2275
|
-
_b[styles$
|
|
2312
|
+
_b[styles$x.wrapper] = !noMargin,
|
|
2276
2313
|
_b)), style: {
|
|
2277
2314
|
minWidth: size + "px",
|
|
2278
2315
|
width: size + "px",
|
|
@@ -3737,59 +3774,51 @@ var ZoomOut = (function (props) {
|
|
|
3737
3774
|
return require$$0.createElement(IconWrapper, props, jsxRuntime.jsx("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM21.35 21.35 17 17M8 11h6" }, void 0));
|
|
3738
3775
|
});
|
|
3739
3776
|
|
|
3740
|
-
var css_248z$
|
|
3741
|
-
var styles$
|
|
3742
|
-
styleInject(css_248z$
|
|
3777
|
+
var css_248z$x = ".style-module_container__3SY_g {\n position: relative;\n}";
|
|
3778
|
+
var styles$w = {"container":"style-module_container__3SY_g"};
|
|
3779
|
+
styleInject(css_248z$x);
|
|
3743
3780
|
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
var fillArray = function (from, to) {
|
|
3754
|
-
var ascending = from > to;
|
|
3755
|
-
var arraySize = Math.abs(from - to) + 1;
|
|
3756
|
-
var toReturn = new Array(arraySize).fill(0).map(function (_, index) {
|
|
3757
|
-
return ascending ? to + index : from + index;
|
|
3758
|
-
});
|
|
3759
|
-
if (ascending) {
|
|
3760
|
-
return toReturn.reverse();
|
|
3761
|
-
}
|
|
3762
|
-
return toReturn;
|
|
3763
|
-
};
|
|
3764
|
-
/*
|
|
3765
|
-
Return the maximum number of days given a month and a year.
|
|
3766
|
-
*/
|
|
3767
|
-
var daysInMonthOfYear = function (_a) {
|
|
3768
|
-
var month = _a.month, year = _a.year;
|
|
3769
|
-
return dayjs(year + "-" + month).daysInMonth();
|
|
3781
|
+
var buttonTypeClassNameMap = {
|
|
3782
|
+
filledColor: 'p-btn--primary',
|
|
3783
|
+
filledGray: 'p-btn--secondary-grey',
|
|
3784
|
+
filledWhite: 'p-btn--secondary-white',
|
|
3785
|
+
textColor: 'p-btn--secondary',
|
|
3786
|
+
textWhite: 'p-btn--secondary-inverted',
|
|
3787
|
+
outlineWhite: 'p-btn--outline-white',
|
|
3788
|
+
filledSuccess: 'p-btn--success',
|
|
3789
|
+
filledError: 'p-btn--danger',
|
|
3770
3790
|
};
|
|
3771
|
-
var
|
|
3772
|
-
var _b, _c,
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3791
|
+
var Button = require$$0__default['default'].forwardRef(function (_a, ref) {
|
|
3792
|
+
var className = _a.className, _b = _a.loading, loading = _b === void 0 ? false : _b, children = _a.children, _c = _a.variant, variant = _c === void 0 ? 'filledColor' : _c, leftIcon = _a.leftIcon, rightIcon = _a.rightIcon, hideLabel = _a.hideLabel, props = __rest$1(_a, ["className", "loading", "children", "variant", "leftIcon", "rightIcon", "hideLabel"]);
|
|
3793
|
+
return (jsxRuntime.jsx("button", __assign({ ref: ref, className: classNames$1(buttonTypeClassNameMap[variant], className, {
|
|
3794
|
+
'p-btn--loading': loading,
|
|
3795
|
+
'tc-transparent': loading,
|
|
3796
|
+
'p-btn--icon-only': hideLabel,
|
|
3797
|
+
}), "data-testid": "button" }, props, { children: !loading && (leftIcon || rightIcon) ? (jsxRuntime.jsxs("div", __assign({ className: "d-flex jc-center ai-center" }, { children: [leftIcon && (jsxRuntime.jsx("span", __assign({ className: classNames$1('d-inline-flex', {
|
|
3798
|
+
'mr8': !hideLabel
|
|
3799
|
+
}) }, { children: require$$0__default['default'].cloneElement(leftIcon, {
|
|
3800
|
+
size: 20,
|
|
3801
|
+
noMargin: true
|
|
3802
|
+
}) }), void 0)),
|
|
3803
|
+
jsxRuntime.jsx("div", __assign({ className: classNames$1({
|
|
3804
|
+
'sr-only': hideLabel
|
|
3805
|
+
}) }, { children: children }), void 0),
|
|
3806
|
+
rightIcon && (jsxRuntime.jsx("span", __assign({ className: classNames$1('d-inline-flex', {
|
|
3807
|
+
'ml8': !hideLabel
|
|
3808
|
+
}) }, { children: require$$0__default['default'].cloneElement(rightIcon, {
|
|
3809
|
+
size: 20,
|
|
3810
|
+
noMargin: true
|
|
3811
|
+
}) }), void 0))] }), void 0)) : children }), void 0));
|
|
3812
|
+
});
|
|
3813
|
+
|
|
3814
|
+
var Calendar = function (_a) {
|
|
3815
|
+
var dateFormat = _a.dateFormat, value = _a.value, onChange = _a.onChange, yearBoundaries = _a.yearBoundaries, displayCalendar = _a.displayCalendar, dayjsLocale = _a.dayjsLocale, firstDayOfWeek = _a.firstDayOfWeek, setCalendarOpen = _a.setCalendarOpen, isOpen = _a.isOpen;
|
|
3781
3816
|
var localeDate = dayjsLocale
|
|
3782
3817
|
? dayjs().locale(dayjsLocale).localeData()
|
|
3783
3818
|
: dayjs().locale('en').localeData();
|
|
3784
3819
|
var localizedWeekdays = localeDate.weekdays();
|
|
3785
3820
|
var localizedWeekdaysShort = localeDate.weekdaysShort();
|
|
3786
3821
|
var localizedMonths = localeDate.months();
|
|
3787
|
-
var localizedMonthsShort = localeDate.monthsShort();
|
|
3788
|
-
var availableDays = fillArray(1, daysInSelectedDate);
|
|
3789
|
-
var availableYears = fillArray(yearBoundaries.max, yearBoundaries.min);
|
|
3790
|
-
var availableMonths = localizedMonthsShort;
|
|
3791
|
-
var _f = require$$0.useState(calendarDateValue !== null && calendarDateValue !== void 0 ? calendarDateValue : {}), date = _f[0], setDate = _f[1];
|
|
3792
|
-
var _g = require$$0.useState(false), openCalendar = _g[0], setOpenCalendar = _g[1];
|
|
3793
3822
|
var calendarContainerRef = require$$0.useRef(null);
|
|
3794
3823
|
var calendarDefaultDate = dayjs().year() >= yearBoundaries.min && dayjs().year() <= yearBoundaries.max
|
|
3795
3824
|
? dayjs().toDate()
|
|
@@ -3803,67 +3832,168 @@ var DateSelector = function (_a) {
|
|
|
3803
3832
|
var dateCalendarToMonth = dayjs(String(yearBoundaries.max))
|
|
3804
3833
|
.endOf('year')
|
|
3805
3834
|
.toDate();
|
|
3806
|
-
useOnClickOutside(calendarContainerRef, function () { return
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3835
|
+
useOnClickOutside(calendarContainerRef, function () { return setCalendarOpen(false); });
|
|
3836
|
+
if (!displayCalendar) {
|
|
3837
|
+
return null;
|
|
3838
|
+
}
|
|
3839
|
+
return (jsxRuntime.jsxs("div", __assign({ className: styles$w.container + " ml8", ref: calendarContainerRef }, { children: [jsxRuntime.jsx(Button, __assign({ onClick: function () { return setCalendarOpen(!isOpen); }, "data-testid": "calendar-button", hideLabel: true, variant: 'textColor', leftIcon: jsxRuntime.jsx(CalendarIcon, {}, void 0) }, { children: "Select date" }), void 0),
|
|
3840
|
+
isOpen && (jsxRuntime.jsx(DayPicker, { month: selectedDateInDateType, showOutsideDays: true, fromMonth: dateCalendarFromMonth, toMonth: dateCalendarToMonth, selectedDays: selectedDateInDateType, onDayClick: function (date) {
|
|
3841
|
+
if (dayjs(date).isAfter(dateCalendarFromMonth) ||
|
|
3842
|
+
dayjs(date).isBefore(dateCalendarToMonth)) {
|
|
3843
|
+
var selectedDate = dayjs(date).format(dateFormat);
|
|
3844
|
+
onChange(selectedDate);
|
|
3845
|
+
setCalendarOpen(false);
|
|
3846
|
+
}
|
|
3847
|
+
}, pagedNavigation: true, disabledDays: {
|
|
3848
|
+
before: dateCalendarFromMonth,
|
|
3849
|
+
after: dateCalendarToMonth,
|
|
3850
|
+
}, firstDayOfWeek: firstDayOfWeek, locale: (dayjsLocale === null || dayjsLocale === void 0 ? void 0 : dayjsLocale.name) || 'en', months: localizedMonths, weekdaysLong: localizedWeekdays, weekdaysShort: localizedWeekdaysShort }, void 0))] }), void 0));
|
|
3851
|
+
};
|
|
3852
|
+
|
|
3853
|
+
dayjs.extend(localeData);
|
|
3854
|
+
var COLLECTABLE_DATE_FORMAT = 'YYYY-MM-DD';
|
|
3855
|
+
var defaultPlaceholders = {
|
|
3856
|
+
day: "Day",
|
|
3857
|
+
dayFormat: "DD",
|
|
3858
|
+
month: "Month",
|
|
3859
|
+
monthFormat: "MM",
|
|
3860
|
+
year: "Year",
|
|
3861
|
+
yearFormat: "YYYY",
|
|
3862
|
+
error: "Please enter a valid date"
|
|
3863
|
+
};
|
|
3864
|
+
var isDateValid = function (date, yearBoundaries) {
|
|
3865
|
+
var _a = yearBoundaries.min, min = _a === void 0 ? 0 : _a, _b = yearBoundaries.max, max = _b === void 0 ? 0 : _b;
|
|
3866
|
+
if (!date) {
|
|
3867
|
+
return { isValid: false, field: 'all' };
|
|
3868
|
+
}
|
|
3869
|
+
if (max && dayjs(date).isAfter(max + "-01-01", 'year')) {
|
|
3870
|
+
return { isValid: false, field: 'year' };
|
|
3871
|
+
}
|
|
3872
|
+
if (min && dayjs(date).isBefore(min + "-01-01", 'year')) {
|
|
3873
|
+
return { isValid: false, field: 'year' };
|
|
3874
|
+
}
|
|
3875
|
+
var isDateValid = dayjs(date, COLLECTABLE_DATE_FORMAT, true).isValid();
|
|
3876
|
+
return {
|
|
3877
|
+
isValid: isDateValid,
|
|
3878
|
+
field: isDateValid ? undefined : 'all',
|
|
3879
|
+
};
|
|
3880
|
+
};
|
|
3881
|
+
var DateSelector = function (_a) {
|
|
3882
|
+
var value = _a.value, onChange = _a.onChange, placeholdersProps = _a.placeholders, yearBoundaries = _a.yearBoundaries, displayCalendar = _a.displayCalendar, dayjsLocale = _a.dayjsLocale, _b = _a.firstDayOfWeek, firstDayOfWeek = _b === void 0 ? 0 : _b;
|
|
3883
|
+
var placeholders = __assign(__assign({}, defaultPlaceholders), placeholdersProps);
|
|
3884
|
+
var itemsRef = require$$0.useRef([]);
|
|
3885
|
+
var _c = require$$0.useState(false), isDirty = _c[0], setIsDirty = _c[1];
|
|
3886
|
+
var _d = require$$0.useState(), hasError = _d[0], setHasError = _d[1];
|
|
3887
|
+
var _e = require$$0.useState(false), isCalendarOpen = _e[0], setIsCalendarOpen = _e[1];
|
|
3888
|
+
var _f = require$$0.useState({}), internalValue = _f[0], setInternalValue = _f[1];
|
|
3812
3889
|
require$$0.useEffect(function () {
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
date.year !== calendarDateValue.year) {
|
|
3820
|
-
onChange(calendarDateToISODate({
|
|
3821
|
-
day: date.day,
|
|
3822
|
-
month: date.month,
|
|
3823
|
-
year: date.year,
|
|
3824
|
-
}));
|
|
3825
|
-
}
|
|
3890
|
+
var calendarDateValue = value ? isoStringtoCalendarDate(value) : undefined;
|
|
3891
|
+
if (value !== calendarDateValue && (calendarDateValue === null || calendarDateValue === void 0 ? void 0 : calendarDateValue.day) && (calendarDateValue === null || calendarDateValue === void 0 ? void 0 : calendarDateValue.month) && (calendarDateValue === null || calendarDateValue === void 0 ? void 0 : calendarDateValue.year)) {
|
|
3892
|
+
var _a = isDateValid(value, yearBoundaries), isValid = _a.isValid, field = _a.field;
|
|
3893
|
+
setInternalValue(calendarDateValue);
|
|
3894
|
+
setHasError(isValid ? undefined : field);
|
|
3895
|
+
setIsDirty(true);
|
|
3826
3896
|
}
|
|
3827
|
-
|
|
3897
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3898
|
+
}, [value]);
|
|
3828
3899
|
var handleOnChange = function (key, v) {
|
|
3829
3900
|
var _a;
|
|
3830
|
-
var
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3901
|
+
var tempValue = __assign(__assign({}, internalValue), (_a = {}, _a[key] = v || undefined, _a));
|
|
3902
|
+
setInternalValue(tempValue);
|
|
3903
|
+
var formattedDate = calendarDateToISODate({
|
|
3904
|
+
day: tempValue.day || 0,
|
|
3905
|
+
month: tempValue.month || 0,
|
|
3906
|
+
year: tempValue.year || 0,
|
|
3907
|
+
});
|
|
3908
|
+
var _b = isDateValid(formattedDate, yearBoundaries), isValid = _b.isValid, field = _b.field;
|
|
3909
|
+
if (dayjs(formattedDate, COLLECTABLE_DATE_FORMAT, true).isValid()) {
|
|
3910
|
+
setIsDirty(true);
|
|
3837
3911
|
}
|
|
3838
|
-
|
|
3839
|
-
|
|
3912
|
+
setHasError(isValid ? undefined : field);
|
|
3913
|
+
onChange(isValid ? formattedDate : "");
|
|
3914
|
+
setIsCalendarOpen(false);
|
|
3915
|
+
};
|
|
3916
|
+
var handleOnKeyDown = function (event, index) {
|
|
3917
|
+
var _a, _b, _c;
|
|
3918
|
+
var currentInput = (_a = itemsRef.current) === null || _a === void 0 ? void 0 : _a[index];
|
|
3919
|
+
var inputSelectionStart = currentInput === null || currentInput === void 0 ? void 0 : currentInput.selectionStart;
|
|
3920
|
+
var inputSelectionEnd = currentInput === null || currentInput === void 0 ? void 0 : currentInput.selectionEnd;
|
|
3921
|
+
if (
|
|
3922
|
+
// is not day input
|
|
3923
|
+
index > 0 &&
|
|
3924
|
+
// has clicked backspace or arrow left
|
|
3925
|
+
['Backspace', "ArrowLeft"].includes(event.key) &&
|
|
3926
|
+
// is focused at the first character of the input
|
|
3927
|
+
inputSelectionStart === 0 && inputSelectionEnd === 0) {
|
|
3928
|
+
var prevInput = (_b = itemsRef.current) === null || _b === void 0 ? void 0 : _b[index - 1];
|
|
3929
|
+
event.preventDefault();
|
|
3930
|
+
prevInput === null || prevInput === void 0 ? void 0 : prevInput.focus();
|
|
3931
|
+
prevInput === null || prevInput === void 0 ? void 0 : prevInput.setSelectionRange(0, 3);
|
|
3932
|
+
}
|
|
3933
|
+
if (
|
|
3934
|
+
// is not year input
|
|
3935
|
+
index < 2
|
|
3936
|
+
// has clicked arrow right
|
|
3937
|
+
&& event.key === "ArrowRight"
|
|
3938
|
+
// is focused at the last character of the input value
|
|
3939
|
+
&& inputSelectionStart === currentInput.value.length) {
|
|
3940
|
+
var nextInput = (_c = itemsRef.current) === null || _c === void 0 ? void 0 : _c[index + 1];
|
|
3941
|
+
event.preventDefault();
|
|
3942
|
+
nextInput === null || nextInput === void 0 ? void 0 : nextInput.focus();
|
|
3943
|
+
nextInput === null || nextInput === void 0 ? void 0 : nextInput.setSelectionRange(0, index === 1 ? 4 : 3);
|
|
3944
|
+
}
|
|
3945
|
+
};
|
|
3946
|
+
var handleOnKeyUp = function (event, index) {
|
|
3947
|
+
var _a, _b;
|
|
3948
|
+
var currentInput = (_a = itemsRef.current) === null || _a === void 0 ? void 0 : _a[index];
|
|
3949
|
+
var inputSelectionStart = currentInput === null || currentInput === void 0 ? void 0 : currentInput.selectionStart;
|
|
3950
|
+
if (
|
|
3951
|
+
// is not year input
|
|
3952
|
+
index < 2
|
|
3953
|
+
// is a number key
|
|
3954
|
+
&& /^\d+$/.test(event.key)
|
|
3955
|
+
&& (
|
|
3956
|
+
// is focused at the last character of the input value
|
|
3957
|
+
inputSelectionStart === currentInput.maxLength
|
|
3958
|
+
// or month value is over 1 or day value is over 3
|
|
3959
|
+
|| Number(currentInput.value) > (index === 1 ? 1 : 3))) {
|
|
3960
|
+
var nextInput = (_b = itemsRef.current) === null || _b === void 0 ? void 0 : _b[index + 1];
|
|
3961
|
+
event.preventDefault();
|
|
3962
|
+
event.stopPropagation();
|
|
3963
|
+
nextInput === null || nextInput === void 0 ? void 0 : nextInput.focus();
|
|
3964
|
+
nextInput === null || nextInput === void 0 ? void 0 : nextInput.setSelectionRange(0, index === 1 ? 4 : 3);
|
|
3840
3965
|
}
|
|
3841
|
-
setOpenCalendar(false);
|
|
3842
3966
|
};
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3967
|
+
var getInputProps = function (key, index) {
|
|
3968
|
+
var _a, _b;
|
|
3969
|
+
return ({
|
|
3970
|
+
'data-cy': "date-selector-" + key,
|
|
3971
|
+
'data-testid': "date-selector-" + key,
|
|
3972
|
+
className: styles$z[key + "Input"],
|
|
3973
|
+
id: key,
|
|
3974
|
+
name: key,
|
|
3975
|
+
maxLength: 2,
|
|
3976
|
+
required: true,
|
|
3977
|
+
label: placeholders === null || placeholders === void 0 ? void 0 : placeholders[key],
|
|
3978
|
+
placeholder: (_a = placeholders === null || placeholders === void 0 ? void 0 : placeholders[key + "Format"]) !== null && _a !== void 0 ? _a : "",
|
|
3979
|
+
labelInsideInput: true,
|
|
3980
|
+
value: (_b = internalValue[key]) !== null && _b !== void 0 ? _b : '',
|
|
3981
|
+
error: (hasError && [key, 'all'].includes(hasError)) && isDirty,
|
|
3982
|
+
type: "text",
|
|
3983
|
+
ref: function (el) { itemsRef.current[index] = el; },
|
|
3984
|
+
onKeyUp: function (event) { return handleOnKeyUp(event, index); },
|
|
3985
|
+
onKeyDown: function (event) { return handleOnKeyDown(event, index); },
|
|
3986
|
+
onChange: function (_a) {
|
|
3987
|
+
var target = _a.target;
|
|
3988
|
+
return handleOnChange(key, target.value);
|
|
3989
|
+
},
|
|
3990
|
+
});
|
|
3991
|
+
};
|
|
3992
|
+
return (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("div", __assign({ className: "d-flex ai-center" }, { children: [jsxRuntime.jsxs("div", __assign({ className: classNames$1(styles$z.container, "d-flex gap8") }, { children: [jsxRuntime.jsxs("div", __assign({ className: "d-flex gap8 jc-between" }, { children: [jsxRuntime.jsx(Input, __assign({}, getInputProps('day', 0), { inputMode: 'numeric' }), void 0),
|
|
3993
|
+
jsxRuntime.jsx(Input, __assign({}, getInputProps('month', 1), { inputMode: 'numeric' }), void 0)] }), void 0),
|
|
3994
|
+
jsxRuntime.jsx(Input, __assign({}, getInputProps('year', 2), { inputMode: 'numeric', maxLength: 4 }), void 0)] }), void 0),
|
|
3995
|
+
jsxRuntime.jsx(Calendar, { dateFormat: COLLECTABLE_DATE_FORMAT, yearBoundaries: yearBoundaries, displayCalendar: displayCalendar, dayjsLocale: dayjsLocale, firstDayOfWeek: firstDayOfWeek, isOpen: isCalendarOpen, setCalendarOpen: setIsCalendarOpen, value: value, onChange: onChange }, void 0)] }), void 0),
|
|
3996
|
+
hasError && isDirty && (jsxRuntime.jsx("p", __assign({ className: "p-p--small tc-red-500 w100 mt8" }, { children: placeholders.error }), void 0))] }, void 0));
|
|
3867
3997
|
};
|
|
3868
3998
|
|
|
3869
3999
|
/*!
|
|
@@ -4360,9 +4490,9 @@ class SignaturePad$1 {
|
|
|
4360
4490
|
}
|
|
4361
4491
|
}
|
|
4362
4492
|
|
|
4363
|
-
var css_248z$
|
|
4364
|
-
var styles$
|
|
4365
|
-
styleInject(css_248z$
|
|
4493
|
+
var css_248z$w = ".style-module_container__1VolG {\n position: relative;\n background-color: var(--ds-grey-200);\n border-radius: 8px;\n height: 272px;\n}\n\n.style-module_canvas__1Q440 {\n width: 100%;\n height: 100%;\n}\n\n.style-module_separator__Fdmnn {\n position: absolute;\n height: 2px;\n right: 112px;\n left: 72px;\n bottom: 32px;\n background-color: var(--ds-grey-400);\n border-radius: 1px;\n}\n\n.style-module_reset__1ePiM {\n display: flex;\n position: absolute;\n right: 16px;\n bottom: 32px;\n color: var(--ds-primary-500);\n cursor: pointer;\n border: none;\n text-decoration: none;\n font-size: 16px;\n line-height: 24px;\n background-color: transparent;\n}\n.style-module_reset__1ePiM:hover {\n color: var(--ds-primary-700);\n}\n.style-module_reset__1ePiM:before {\n content: \"\";\n display: inline-block;\n height: 24px;\n width: 24px;\n mask-repeat: no-repeat;\n mask-position: center;\n background-color: currentColor;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-position: center;\n -webkit-background-color: currentColor;\n margin-right: 4px;\n}\n.style-module_reset__1ePiM[disabled] {\n color: var(--ds-grey-500);\n}\n\n.style-module_sign__35Gp2 {\n position: absolute;\n bottom: 32px;\n left: 16px;\n height: 24px;\n width: 24px;\n mask-size: 24px 24px;\n mask-repeat: no-repeat;\n mask-position: center;\n -webkit-mask-size: 24px 24px;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-position: center;\n background-color: var(--ds-grey-500);\n}";
|
|
4494
|
+
var styles$v = {"container":"style-module_container__1VolG","canvas":"style-module_canvas__1Q440","separator":"style-module_separator__Fdmnn","reset":"style-module_reset__1ePiM","sign":"style-module_sign__35Gp2"};
|
|
4495
|
+
styleInject(css_248z$w);
|
|
4366
4496
|
|
|
4367
4497
|
var sign = "data:image/svg+xml,%3Csvg%20width%3D%2280%22%20height%3D%2280%22%20viewBox%3D%220%200%2080%2080%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M13.7%203.70001C13.3%204.00001%2013.5%205.10001%2014.1%206.20001C14.7%207.30001%2014.9%209.20001%2014.6%2010.5C14.1%2012.3%2015.3%2014.4%2019.3%2019.7C22.2%2023.4%2025.6%2028%2026.9%2029.8L29.2%2033L23%2039.7C19.7%2043.4%2017.1%2046.9%2017.4%2047.6C17.7%2048.3%2017.2%2049.4%2016.4%2050C14.8%2051.4%2014.5%2054%2016.1%2054C17.5%2054%2023.6%2049.5%2029%2044.4L33.5%2040.1L41%2051.3C49.2%2063.6%2053.7%2069%2055.8%2069C56.6%2069%2056.8%2068.5%2056.4%2067.7C56%2067.1%2057.8%2068.9%2060.5%2071.8C63.1%2074.7%2065.5%2076.9%2065.7%2076.6C65.9%2076.4%2065.2%2074.4%2064.1%2072.1C62.9%2069.9%2062%2067.2%2062%2066.2C62%2063.3%2054.5%2047.6%2048.9%2039C46.2%2034.8%2044%2031%2044%2030.6C44%2030.2%2046.2%2027.3%2048.9%2024.2C54.3%2017.9%2059%2011.2%2059%209.80001C59%209.30001%2057.7%209.10001%2056%209.50001C54.2%209.90001%2050.5%2012.7%2046.4%2017.1C42.7%2020.9%2039.4%2024%2039.1%2024C38.8%2024%2036.3%2020.7%2033.6%2016.8C30.9%2012.9%2027.9%209.50001%2027%209.30001C26%209.00001%2024.3%207.60001%2023.2%206.10001C21.7%204.10001%2020.3%203.30001%2017.7%203.20001C15.8%203.10001%2014%203.30001%2013.7%203.70001Z%22%20fill%3D%22%238E8CEE%22%2F%3E%3C%2Fsvg%3E";
|
|
4368
4498
|
|
|
@@ -4391,15 +4521,15 @@ var SignaturePad = /** @class */ (function (_super) {
|
|
|
4391
4521
|
SignaturePad.prototype.render = function () {
|
|
4392
4522
|
var hasContent = this.state.hasContent;
|
|
4393
4523
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: {
|
|
4394
|
-
__html: "." + styles$
|
|
4524
|
+
__html: "." + styles$v.reset + "::before { \n -webkit-mask-image: url(\"" + reset + "\");\n mask-image: url(\"" + reset + "\");\n }",
|
|
4395
4525
|
} }, void 0),
|
|
4396
|
-
jsxRuntime.jsxs("div", __assign({ className: styles$
|
|
4397
|
-
jsxRuntime.jsx("div", { className: styles$
|
|
4398
|
-
jsxRuntime.jsx("div", { className: styles$
|
|
4526
|
+
jsxRuntime.jsxs("div", __assign({ className: styles$v.container }, { children: [jsxRuntime.jsx("canvas", { className: styles$v.canvas, ref: this.canvasRef }, void 0),
|
|
4527
|
+
jsxRuntime.jsx("div", { className: styles$v.separator }, void 0),
|
|
4528
|
+
jsxRuntime.jsx("div", { className: styles$v.sign, style: {
|
|
4399
4529
|
WebkitMaskImage: "url(\"" + sign + "\")",
|
|
4400
4530
|
maskImage: "url(\"" + sign + "\")",
|
|
4401
4531
|
} }, void 0),
|
|
4402
|
-
jsxRuntime.jsx("button", __assign({ className: styles$
|
|
4532
|
+
jsxRuntime.jsx("button", __assign({ className: styles$v.reset, onClick: this.clear, disabled: !hasContent }, { children: "Reset" }), void 0)] }), void 0)] }, void 0));
|
|
4403
4533
|
};
|
|
4404
4534
|
SignaturePad.prototype.notifyOnChange = function () {
|
|
4405
4535
|
var onChange = this.props.onChange;
|
|
@@ -4797,36 +4927,6 @@ function toNumber(value) {
|
|
|
4797
4927
|
|
|
4798
4928
|
var lodash_debounce = debounce;
|
|
4799
4929
|
|
|
4800
|
-
function generateId() {
|
|
4801
|
-
var _a;
|
|
4802
|
-
if (typeof window !== "undefined" && ((_a = window === null || window === void 0 ? void 0 : window.crypto) === null || _a === void 0 ? void 0 : _a.getRandomValues)) {
|
|
4803
|
-
return ([1e7] + "-" + 1e3 + "-" + 4e3 + "-" + 8e3 + "-" + 1e11).replace(/[018]/g, function (c) {
|
|
4804
|
-
return (((c ^ window.crypto.getRandomValues(new Uint8Array(1))[0]) & 15) >> c / 4).toString(16);
|
|
4805
|
-
});
|
|
4806
|
-
}
|
|
4807
|
-
return 'xxxx-xxxx-xxx-xxxx'.replace(/[x]/g, function () { return (Math.floor(Math.random() * 16).toString(16)); });
|
|
4808
|
-
}
|
|
4809
|
-
|
|
4810
|
-
var css_248z$w = ".style-module_container__2L4SP {\n position: relative;\n}\n\n.style-module_prefix__3jAFZ {\n position: absolute;\n left: 16px;\n top: 50%;\n transform: translateY(-50%);\n color: var(--ds-grey-500);\n transition: 0.3s top;\n}\n.style-module_prefix--with-error__1yTTM {\n color: var(--ds-red-500);\n}\n.style-module_prefix--disabled__2-gcw {\n color: var(--ds-grey-600);\n}\n\n.style-module_input__1eJO5:not(:placeholder-shown) ~ .style-module_placeholder__1U2z0,\n.style-module_input__1eJO5:focus ~ .style-module_placeholder__1U2z0 {\n top: 7px;\n left: 16px;\n transform: translateY(0);\n font-size: 10px;\n line-height: 12px;\n opacity: 1;\n}\n\n.style-module_input__1eJO5:focus ~ .style-module_placeholder__1U2z0 {\n color: var(--ds-primary-500);\n}\n.style-module_input__1eJO5:focus ~ .style-module_placeholder--with-error__2ieRU {\n color: var(--ds-red-500);\n}\n\n.style-module_input__1eJO5:focus ~ .style-module_prefix__3jAFZ {\n color: var(--ds-primary-500);\n}\n.style-module_input__1eJO5:focus ~ .style-module_prefix--with-error__1yTTM {\n color: var(--ds-red-500);\n}\n\n.style-module_input__1eJO5:not(:placeholder-shown) ~ .style-module_prefix__3jAFZ,\n.style-module_input__1eJO5:focus ~ .style-module_prefix__3jAFZ {\n top: 28px;\n}\n\n.style-module_input__1eJO5 {\n box-sizing: border-box;\n padding-top: 9px;\n font-family: inherit;\n}\n.style-module_input--no-placeholder__3EGwh {\n padding-top: 0px;\n}\n.style-module_input--with-prefix__38e0j {\n padding-left: 32px !important;\n}\n\n.style-module_placeholder__1U2z0 {\n position: absolute;\n pointer-events: none;\n left: 16px;\n top: 50%;\n transform: translateY(-50%);\n transition: 0.3s ease all;\n color: var(--ds-grey-500);\n}\n.style-module_placeholder--with-prefix__2PquQ {\n left: 32px;\n}\n.style-module_placeholder--with-error__2ieRU {\n color: var(--ds-red-500);\n}\n\n.style-module_label__3FEZ1 {\n display: inline-block;\n margin-bottom: 8px;\n color: var(--ds-grey-600);\n}\n.style-module_label--with-error__166bP {\n color: var(--ds-red-500);\n}\n\n.style-module_error__167Zc {\n margin-top: 4px;\n}";
|
|
4811
|
-
var styles$v = {"container":"style-module_container__2L4SP","prefix":"style-module_prefix__3jAFZ","prefix--with-error":"style-module_prefix--with-error__1yTTM","prefix--disabled":"style-module_prefix--disabled__2-gcw","input":"style-module_input__1eJO5","placeholder":"style-module_placeholder__1U2z0","placeholder--with-error":"style-module_placeholder--with-error__2ieRU","input--no-placeholder":"style-module_input--no-placeholder__3EGwh","input--with-prefix":"style-module_input--with-prefix__38e0j","placeholder--with-prefix":"style-module_placeholder--with-prefix__2PquQ","label":"style-module_label__3FEZ1","label--with-error":"style-module_label--with-error__166bP","error":"style-module_error__167Zc"};
|
|
4812
|
-
styleInject(css_248z$w);
|
|
4813
|
-
|
|
4814
|
-
var Input = require$$0__default['default'].forwardRef(function (_a, ref) {
|
|
4815
|
-
var _b, _c, _d, _e, _f, _g;
|
|
4816
|
-
var className = _a.className, placeholder = _a.placeholder, label = _a.label, id = _a.id, prefix = _a.prefix, error = _a.error, disabled = _a.disabled, _h = _a.hideLabel, hideLabel = _h === void 0 ? false : _h, props = __rest$1(_a, ["className", "placeholder", "label", "id", "prefix", "error", "disabled", "hideLabel"]);
|
|
4817
|
-
var uniqueId = require$$0.useState(id !== null && id !== void 0 ? id : generateId())[0];
|
|
4818
|
-
return (jsxRuntime.jsxs("div", __assign({ className: styles$v.container + " " + (className !== null && className !== void 0 ? className : '') }, { children: [label && (jsxRuntime.jsx("label", __assign({ htmlFor: uniqueId, className: classNames('p-p', styles$v.label, (_b = {},
|
|
4819
|
-
_b[styles$v['label--with-error']] = error,
|
|
4820
|
-
_b['sr-only'] = hideLabel,
|
|
4821
|
-
_b)) }, { children: label }), void 0)),
|
|
4822
|
-
jsxRuntime.jsxs("div", __assign({ style: { position: 'relative' } }, { children: [jsxRuntime.jsx("input", __assign({ id: uniqueId, "data-testid": "ds-input-input", type: "text", ref: ref, className: classNames(error ? 'p-input--error' : 'p-input', !label && placeholder && placeholder.length > 0
|
|
4823
|
-
? styles$v.input
|
|
4824
|
-
: styles$v['input--no-placeholder'], (_c = {}, _c[styles$v['input--with-prefix']] = prefix, _c)), placeholder: label ? placeholder : ' ', disabled: disabled }, props), void 0),
|
|
4825
|
-
prefix && (jsxRuntime.jsx("span", __assign({ className: classNames(styles$v.prefix, (_d = {}, _d[styles$v['prefix--with-error']] = error, _d), (_e = {}, _e[styles$v['prefix--disabled']] = disabled, _e)) }, { children: prefix }), void 0)),
|
|
4826
|
-
!label && (jsxRuntime.jsx("label", __assign({ htmlFor: uniqueId, className: classNames(styles$v.placeholder, (_f = {}, _f[styles$v['placeholder--with-prefix']] = prefix, _f), (_g = {}, _g[styles$v['placeholder--with-error']] = error, _g)) }, { children: placeholder }), void 0))] }), void 0),
|
|
4827
|
-
error && (jsxRuntime.jsx("p", __assign({ className: "p-p--small tc-red-500 w100 " + styles$v.error }, { children: error }), void 0))] }), void 0));
|
|
4828
|
-
});
|
|
4829
|
-
|
|
4830
4930
|
var z7=Object.defineProperty;var V$1=(t,a)=>{for(var z in a)z7(t,z,{get:a[z],enumerable:!0});};var s$1=["AF","AL","DZ","AD","AS","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","ME","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","BL","MF","SX","XK","SS"];var r$3={};V$1(r$3,{countries:()=>L$1,default:()=>p7,locale:()=>y$3});var y$3="en",L$1={AF:"Afghanistan",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia",BA:"Bosnia and Herzegovina",BW:"Botswana",BV:"Bouvet Island",BR:"Brazil",IO:"British Indian Ocean Territory",BN:"Brunei Darussalam",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CC:"Cocos (Keeling) Islands",CO:"Colombia",KM:"Comoros",CG:"Republic of the Congo",CD:"Democratic Republic of the Congo",CK:"Cook Islands",CR:"Costa Rica",CI:"Cote D'Ivoire",HR:"Croatia",CU:"Cuba",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",FK:"Falkland Islands (Malvinas)",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",TF:"French Southern Territories",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard Island and McDonald Islands",VA:"Holy See (Vatican City State)",HN:"Honduras",HK:"Hong Kong",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran",IQ:"Iraq",IE:"Ireland",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Lao People's Democratic Republic",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macao",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia, Federated States of",MD:"Moldova, Republic of",MC:"Monaco",MN:"Mongolia",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",MK:"North Macedonia",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",PK:"Pakistan",PW:"Palau",PS:"Palestine",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"Reunion",RO:"Romania",RU:"Russia",RW:"Rwanda",SH:"Saint Helena",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"Sao Tome and Principe",SA:"Saudi Arabia",SN:"Senegal",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",GS:"South Georgia and the South Sandwich Islands",ES:"Spain",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Eswatini",SE:"Sweden",CH:"Switzerland",SY:"Syrian Arab Republic",TW:"Taiwan",TJ:"Tajikistan",TZ:"Tanzania",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UM:"United States Minor Outlying Islands",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VE:"Venezuela",VN:"Vietnam",VG:"Virgin Islands, British",VI:"Virgin Islands, U.S.",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe",AX:"\xC5land Islands",BQ:"Bonaire, Sint Eustatius and Saba",CW:"Cura\xE7ao",GG:"Guernsey",IM:"Isle of Man",JE:"Jersey",ME:"Montenegro",BL:"Saint Barth\xE9lemy",MF:"Saint Martin (French part)",RS:"Serbia",SX:"Sint Maarten (Dutch part)",SS:"South Sudan",XK:"Kosovo"},p7={locale:y$3,countries:L$1};var m$4={};V$1(m$4,{countries:()=>S$1,default:()=>M7,locale:()=>B});var B="de",S$1={AF:"Afghanistan",EG:"\xC4gypten",AX:"\xC5land",AL:"Albanien",DZ:"Algerien",AS:"Amerikanisch-Samoa",VI:"Amerikanische Jungferninseln",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarktis",AG:"Antigua und Barbuda",GQ:"\xC4quatorialguinea",AR:"Argentinien",AM:"Armenien",AW:"Aruba",AZ:"Aserbaidschan",ET:"\xC4thiopien",AU:"Australien",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesch",BB:"Barbados",BY:"Belarus",BE:"Belgien",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivien",BQ:"Bonaire",BA:"Bosnien und Herzegowina",BW:"Botswana",BV:"Bouvetinsel",BR:"Brasilien",VG:"Britische Jungferninseln",IO:"Britisches Territorium im Indischen Ozean",BN:"Brunei Darussalam",BG:"Bulgarien",BF:"Burkina Faso",BI:"Burundi",CL:"Chile",CN:"China",CK:"Cookinseln",CR:"Costa Rica",CI:"Elfenbeink\xFCste",CW:"Cura\xE7ao",DK:"D\xE4nemark",DE:"Deutschland",DM:"Dominica",DO:"Dominikanische Republik",DJ:"Dschibuti",EC:"Ecuador",SV:"El Salvador",ER:"Eritrea",EE:"Estland",FK:"Falklandinseln",FO:"F\xE4r\xF6er",FJ:"Fidschi",FI:"Finnland",FR:"Frankreich",GF:"Franz\xF6sisch-Guayana",PF:"Franz\xF6sisch-Polynesien",TF:"Franz\xF6sische S\xFCd- und Antarktisgebiete",GA:"Gabun",GM:"Gambia",GE:"Georgien",GH:"Ghana",GI:"Gibraltar",GD:"Grenada",GR:"Griechenland",GL:"Gr\xF6nland",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GG:"Guernsey",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard und McDonaldinseln",HN:"Honduras",HK:"Hongkong",IN:"Indien",ID:"Indonesien",IM:"Insel Man",IQ:"Irak",IR:"Iran",IE:"Irland",IS:"Island",IL:"Israel",IT:"Italien",JM:"Jamaika",JP:"Japan",YE:"Jemen",JE:"Jersey",JO:"Jordanien",KY:"Kaimaninseln",KH:"Kambodscha",CM:"Kamerun",CA:"Kanada",CV:"Kap Verde",KZ:"Kasachstan",QA:"Katar",KE:"Kenia",KG:"Kirgisistan",KI:"Kiribati",CC:"Kokosinseln",CO:"Kolumbien",KM:"Komoren",CD:"Kongo",KP:"Nordkorea",KR:"S\xFCdkorea",HR:"Kroatien",CU:"Kuba",KW:"Kuwait",LA:"Laos",LS:"Lesotho",LV:"Lettland",LB:"Libanon",LR:"Liberia",LY:"Libyen",LI:"Liechtenstein",LT:"Litauen",LU:"Luxemburg",MO:"Macao",MG:"Madagaskar",MW:"Malawi",MY:"Malaysia",MV:"Malediven",ML:"Mali",MT:"Malta",MA:"Marokko",MH:"Marshallinseln",MQ:"Martinique",MR:"Mauretanien",MU:"Mauritius",YT:"Mayotte",MX:"Mexiko",FM:"Mikronesien",MD:"Moldawien",MC:"Monaco",MN:"Mongolei",ME:"Montenegro",MS:"Montserrat",MZ:"Mosambik",MM:"Myanmar",NA:"Namibia",NR:"Nauru",NP:"Nepal",NC:"Neukaledonien",NZ:"Neuseeland",NI:"Nicaragua",NL:"Niederlande",NE:"Niger",NG:"Nigeria",NU:"Niue",MK:"Nordmazedonien",MP:"N\xF6rdliche Marianen",NF:"Norfolkinsel",NO:"Norwegen",OM:"Oman",AT:"\xD6sterreich",TL:"Osttimor",PK:"Pakistan",PS:"Staat Pal\xE4stina",PW:"Palau",PA:"Panama",PG:"Papua-Neuguinea",PY:"Paraguay",PE:"Peru",PH:"Philippinen",PN:"Pitcairninseln",PL:"Polen",PT:"Portugal",PR:"Puerto Rico",TW:"Taiwan",CG:"Republik Kongo",RE:"R\xE9union",RW:"Ruanda",RO:"Rum\xE4nien",RU:"Russische F\xF6deration",BL:"Saint-Barth\xE9lemy",MF:"Saint-Martin",SB:"Salomonen",ZM:"Sambia",WS:"Samoa",SM:"San Marino",ST:"S\xE3o Tom\xE9 und Pr\xEDncipe",SA:"Saudi-Arabien",SE:"Schweden",CH:"Schweiz",SN:"Senegal",RS:"Serbien",SC:"Seychellen",SL:"Sierra Leone",ZW:"Simbabwe",SG:"Singapur",SX:"Sint Maarten",SK:"Slowakei",SI:"Slowenien",SO:"Somalia",ES:"Spanien",LK:"Sri Lanka",SH:"St. Helena",KN:"St. Kitts und Nevis",LC:"St. Lucia",PM:"Saint-Pierre und Miquelon",VC:"St. Vincent und die Grenadinen",ZA:"S\xFCdafrika",SD:"Sudan",GS:"S\xFCdgeorgien und die S\xFCdlichen Sandwichinseln",SS:"S\xFCdsudan",SR:"Suriname",SJ:"Svalbard und Jan Mayen",SZ:"Eswatini",SY:"Syrien, Arabische Republik",TJ:"Tadschikistan",TZ:"Tansania, Vereinigte Republik",TH:"Thailand",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad und Tobago",TD:"Tschad",CZ:"Tschechische Republik",TN:"Tunesien",TR:"T\xFCrkei",TM:"Turkmenistan",TC:"Turks- und Caicosinseln",TV:"Tuvalu",UG:"Uganda",UA:"Ukraine",HU:"Ungarn",UM:"United States Minor Outlying Islands",UY:"Uruguay",UZ:"Usbekistan",VU:"Vanuatu",VA:"Vatikanstadt",VE:"Venezuela",AE:"Vereinigte Arabische Emirate",US:"Vereinigte Staaten",GB:"Vereinigtes K\xF6nigreich",VN:"Vietnam",WF:"Wallis und Futuna",CX:"Weihnachtsinsel",EH:"Westsahara",CF:"Zentralafrikanische Republik",CY:"Zypern",XK:"Kosovo"},M7={locale:B,countries:S$1};var c7={en:r$3,de:m$4};function $5(t,a="en"){return c7[a].countries[t]}var f7=(t="en")=>s$1.map(a=>({name:c7[t].countries[a],code:a}));f7();
|
|
4831
4931
|
|
|
4832
4932
|
var geocoderAddressComponentToPartialAddress = function (input) {
|
|
@@ -4998,7 +5098,7 @@ var AutocompleteAddress = function (_a) {
|
|
|
4998
5098
|
}
|
|
4999
5099
|
};
|
|
5000
5100
|
};
|
|
5001
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", __assign({ className: classNames("wmx8 bg-grey-500 " + styles$u['map-container'], (_b = {},
|
|
5101
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", __assign({ className: classNames$1("wmx8 bg-grey-500 " + styles$u['map-container'], (_b = {},
|
|
5002
5102
|
_b[styles$u['map-container--hidden']] = place === null,
|
|
5003
5103
|
_b)) }, { children: [jsxRuntime.jsx("div", { className: styles$u.map, id: "map" }, void 0),
|
|
5004
5104
|
isLoading && (jsxRuntime.jsx("div", __assign({ className: styles$u['loading-spinner'] }, { children: jsxRuntime.jsx("div", { className: "ds-spinner ds-spinner__m" }, void 0) }), void 0))] }), void 0),
|
|
@@ -7869,7 +7969,7 @@ const ANIMATION_STATE_CLASSES = {
|
|
|
7869
7969
|
staticHeightSpecific: 'rah-static--height-specific',
|
|
7870
7970
|
};
|
|
7871
7971
|
function getStaticStateClasses(animationStateClasses, height) {
|
|
7872
|
-
return classNames({
|
|
7972
|
+
return classNames$1({
|
|
7873
7973
|
[animationStateClasses.static]: true,
|
|
7874
7974
|
[animationStateClasses.staticHeightZero]: height === 0,
|
|
7875
7975
|
[animationStateClasses.staticHeightSpecific]: height > 0,
|
|
@@ -7953,7 +8053,7 @@ const AnimateHeight = (_a) => {
|
|
|
7953
8053
|
newHeight = contentHeight;
|
|
7954
8054
|
}
|
|
7955
8055
|
// Animation classes
|
|
7956
|
-
const newAnimationStateClassNames = classNames({
|
|
8056
|
+
const newAnimationStateClassNames = classNames$1({
|
|
7957
8057
|
[stateClasses.current.animating]: true,
|
|
7958
8058
|
[stateClasses.current.animatingUp]: prevHeight.current === 'auto' || height < prevHeight.current,
|
|
7959
8059
|
[stateClasses.current.animatingDown]: height === 'auto' || height > prevHeight.current,
|
|
@@ -8077,16 +8177,16 @@ var UploadFileCell = function (_a) {
|
|
|
8077
8177
|
COMPLETE: name,
|
|
8078
8178
|
ERROR: error !== null && error !== void 0 ? error : 'Something went wrong. Try uploading again.',
|
|
8079
8179
|
}[uploadStatus];
|
|
8080
|
-
return (jsxRuntime.jsxs("div", __assign({ className: classNames("mt8 " + styles$s['upload-file-cell'], (_b = {},
|
|
8180
|
+
return (jsxRuntime.jsxs("div", __assign({ className: classNames$1("mt8 " + styles$s['upload-file-cell'], (_b = {},
|
|
8081
8181
|
_b[styles$s['upload-file-cell-error']] = hasError,
|
|
8082
|
-
_b)) }, { children: [jsxRuntime.jsxs("div", __assign({ className: "w100 " + styles$s['cell-left-section'] }, { children: [jsxRuntime.jsx(FileIcon, { className: classNames(styles$s['main-icon'] + " " + styles$s.icon), color: mapFileIconColor[uploadStatus], size: 24 }, void 0),
|
|
8182
|
+
_b)) }, { children: [jsxRuntime.jsxs("div", __assign({ className: "w100 " + styles$s['cell-left-section'] }, { children: [jsxRuntime.jsx(FileIcon, { className: classNames$1(styles$s['main-icon'] + " " + styles$s.icon), color: mapFileIconColor[uploadStatus], size: 24 }, void 0),
|
|
8083
8183
|
jsxRuntime.jsxs("div", __assign({ className: "w100" }, { children: [jsxRuntime.jsx("div", __assign({ className: "p-p " + styles$s['upload-display-text'], title: displayText }, { children: displayText }), void 0),
|
|
8084
8184
|
isUploading && showProgressBar && (jsxRuntime.jsxs("div", __assign({ className: "mt8 w100 " + styles$s['progress-bar-container'] }, { children: [jsxRuntime.jsx("div", { className: "" + styles$s['progress-bar'] }, void 0),
|
|
8085
8185
|
jsxRuntime.jsx("div", { "data-testid": "ds-filecell-progressbar", className: "" + styles$s['progress-bar-filler'], style: { width: progress + "%" } }, void 0)] }), void 0))] }), void 0)] }), void 0),
|
|
8086
|
-
jsxRuntime.jsx("div", __assign({ className: classNames(styles$s['cell-right-section'], (_c = {},
|
|
8186
|
+
jsxRuntime.jsx("div", __assign({ className: classNames$1(styles$s['cell-right-section'], (_c = {},
|
|
8087
8187
|
_c[styles$s['cell-right-section-complete']] = isComplete,
|
|
8088
8188
|
_c)) }, { children: isUploading ? (jsxRuntime.jsx("div", __assign({ className: styles$s.spinner }, { children: showLoadingSpinner && (jsxRuntime.jsx("div", { className: "ds-spinner ds-spinner__m", "data-testid": "ds-filecell-spinner" }, void 0)) }), void 0)) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [isComplete && (jsxRuntime.jsx("a", __assign({ className: styles$s['view-icon'], href: previewUrl, target: "_blank", rel: "noopener noreferrer" }, { children: jsxRuntime.jsx(EyeVisionIcon, { color: 'grey-500', size: 24, className: styles$s.icon }, void 0) }), void 0)),
|
|
8089
|
-
onRemoveFile && (jsxRuntime.jsx("button", __assign({ type: "button", onClick: function () { return onRemoveFile(id); }, className: classNames(styles$s['remove-icon'], (_d = {},
|
|
8189
|
+
onRemoveFile && (jsxRuntime.jsx("button", __assign({ type: "button", onClick: function () { return onRemoveFile(id); }, className: classNames$1(styles$s['remove-icon'], (_d = {},
|
|
8090
8190
|
_d[styles$s.disabled] = uploading,
|
|
8091
8191
|
_d)), "data-testid": "remove-button" }, { children: jsxRuntime.jsx(Trash2Icon, { color: hasError ? 'red-500' : 'grey-500', size: 24, className: styles$s.icon }, void 0) }), void 0))] }, void 0)) }), void 0)] }), void 0));
|
|
8092
8192
|
};
|
|
@@ -8199,7 +8299,7 @@ var MultiDropzone = function (_a) {
|
|
|
8199
8299
|
maxSize: maxSize,
|
|
8200
8300
|
onDrop: onDrop,
|
|
8201
8301
|
}), getRootProps = _f.getRootProps, getInputProps = _f.getInputProps;
|
|
8202
|
-
return (jsxRuntime.jsxs("div", __assign({ className: styles$t.container }, { children: [jsxRuntime.jsxs("div", __assign({ className: classNames("w100 ta-center br8 c-pointer " + styles$t.dropzoneContainer, (_b = {},
|
|
8302
|
+
return (jsxRuntime.jsxs("div", __assign({ className: styles$t.container }, { children: [jsxRuntime.jsxs("div", __assign({ className: classNames$1("w100 ta-center br8 c-pointer " + styles$t.dropzoneContainer, (_b = {},
|
|
8203
8303
|
_b[styles$t['dropzoneContainerDisabled']] = uploading,
|
|
8204
8304
|
_b)) }, getRootProps(), { children: [jsxRuntime.jsx("input", __assign({ "data-testid": "ds-drop-input" }, getInputProps()), void 0),
|
|
8205
8305
|
jsxRuntime.jsx(UploadCloudIcon, { className: isCondensed ? styles$t.img : '', size: isCondensed ? 24 : 64, color: 'purple-500' }, void 0),
|
|
@@ -8221,40 +8321,6 @@ var MultiDropzone = function (_a) {
|
|
|
8221
8321
|
jsxRuntime.jsx(AnimateHeight, __assign({ duration: 300, height: isOverMaxFiles ? 'auto' : 0 }, { children: jsxRuntime.jsx("p", __assign({ className: "tc-red-500 p-p--small" }, { children: (textOverrides === null || textOverrides === void 0 ? void 0 : textOverrides.tooManyFilesError) || 'Too many files.' }), void 0) }), void 0)] }), void 0));
|
|
8222
8322
|
};
|
|
8223
8323
|
|
|
8224
|
-
var buttonTypeClassNameMap = {
|
|
8225
|
-
filledColor: 'p-btn--primary',
|
|
8226
|
-
filledGray: 'p-btn--secondary-grey',
|
|
8227
|
-
filledWhite: 'p-btn--secondary-white',
|
|
8228
|
-
textColor: 'p-btn--secondary',
|
|
8229
|
-
textWhite: 'p-btn--secondary-inverted',
|
|
8230
|
-
outlineWhite: 'p-btn--outline-white',
|
|
8231
|
-
filledSuccess: 'p-btn--success',
|
|
8232
|
-
filledError: 'p-btn--danger',
|
|
8233
|
-
};
|
|
8234
|
-
var Button = require$$0__default['default'].forwardRef(function (_a, ref) {
|
|
8235
|
-
var as = _a.as, className = _a.className, _b = _a.loading, loading = _b === void 0 ? false : _b, children = _a.children, _c = _a.variant, variant = _c === void 0 ? 'filledColor' : _c, leftIcon = _a.leftIcon, rightIcon = _a.rightIcon, hideLabel = _a.hideLabel, props = __rest$1(_a, ["as", "className", "loading", "children", "variant", "leftIcon", "rightIcon", "hideLabel"]);
|
|
8236
|
-
var ButtonTag = as || 'button';
|
|
8237
|
-
return (jsxRuntime.jsx(ButtonTag, __assign({ ref: ref, className: classNames(buttonTypeClassNameMap[variant], className, {
|
|
8238
|
-
'p-btn--loading': loading,
|
|
8239
|
-
'tc-transparent': loading,
|
|
8240
|
-
'p-btn--icon-only': hideLabel,
|
|
8241
|
-
}), "data-testid": "button" }, props, { children: !loading && (leftIcon || rightIcon) ? (jsxRuntime.jsxs("div", __assign({ className: "d-flex jc-center ai-center" }, { children: [leftIcon && (jsxRuntime.jsx("span", __assign({ className: classNames('d-inline-flex', {
|
|
8242
|
-
'mr8': !hideLabel
|
|
8243
|
-
}) }, { children: require$$0__default['default'].cloneElement(leftIcon, {
|
|
8244
|
-
size: 20,
|
|
8245
|
-
noMargin: true
|
|
8246
|
-
}) }), void 0)),
|
|
8247
|
-
jsxRuntime.jsx("div", __assign({ className: classNames({
|
|
8248
|
-
'sr-only': hideLabel
|
|
8249
|
-
}) }, { children: children }), void 0),
|
|
8250
|
-
rightIcon && (jsxRuntime.jsx("span", __assign({ className: classNames('d-inline-flex', {
|
|
8251
|
-
'ml8': !hideLabel
|
|
8252
|
-
}) }, { children: require$$0__default['default'].cloneElement(rightIcon, {
|
|
8253
|
-
size: 20,
|
|
8254
|
-
noMargin: true
|
|
8255
|
-
}) }), void 0))] }), void 0)) : children }), void 0));
|
|
8256
|
-
});
|
|
8257
|
-
|
|
8258
8324
|
var css_248z$s = ".style-module_button__mw9kQ {\n height: 48px;\n}\n\n.style-module_chip-complete__3YkB9 {\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: white;\n border-radius: 8px;\n padding: 8px 16px;\n height: 48px;\n}";
|
|
8259
8325
|
var styles$r = {"button":"style-module_button__mw9kQ","chip-complete":"style-module_chip-complete__3YkB9"};
|
|
8260
8326
|
styleInject(css_248z$s);
|
|
@@ -8292,8 +8358,8 @@ var InformationBox = function (_a) {
|
|
|
8292
8358
|
information: 'blue-500',
|
|
8293
8359
|
neutral: 'purple-500',
|
|
8294
8360
|
};
|
|
8295
|
-
return (jsxRuntime.jsx("div", __assign({ className: classNames(className, 'p16 br8 color-black', styles$q.informationBox, styles$q["informationBox--" + variant]), role: "alert" }, { children: jsxRuntime.jsxs("div", __assign({ className: "d-flex" }, { children: [showIcon && (jsxRuntime.jsx("div", __assign({ "data-testid": "information-box-icon", className: 'mr8' }, { children: jsxRuntime.jsx(AlertCircleIcon, { className: styles$q.icon, color: mapAlertIconColor[variant], size: size === 'default' ? 24 : 16 }, void 0) }), void 0)),
|
|
8296
|
-
jsxRuntime.jsxs("div", { children: [title && (jsxRuntime.jsx("h4", __assign({ "data-testid": "information-box-title", className: classNames(size === 'default' ? 'p-h4' : 'p-h5', 'mb8') }, { children: title }), void 0)),
|
|
8361
|
+
return (jsxRuntime.jsx("div", __assign({ className: classNames$1(className, 'p16 br8 color-black', styles$q.informationBox, styles$q["informationBox--" + variant]), role: "alert" }, { children: jsxRuntime.jsxs("div", __assign({ className: "d-flex" }, { children: [showIcon && (jsxRuntime.jsx("div", __assign({ "data-testid": "information-box-icon", className: 'mr8' }, { children: jsxRuntime.jsx(AlertCircleIcon, { className: styles$q.icon, color: mapAlertIconColor[variant], size: size === 'default' ? 24 : 16 }, void 0) }), void 0)),
|
|
8362
|
+
jsxRuntime.jsxs("div", { children: [title && (jsxRuntime.jsx("h4", __assign({ "data-testid": "information-box-title", className: classNames$1(size === 'default' ? 'p-h4' : 'p-h5', 'mb8') }, { children: title }), void 0)),
|
|
8297
8363
|
jsxRuntime.jsx("p", __assign({ className: size === 'default' ? 'p-p' : 'p-p--small' }, { children: children }), void 0)] }, void 0)] }), void 0) }), void 0));
|
|
8298
8364
|
};
|
|
8299
8365
|
|
|
@@ -8317,7 +8383,7 @@ var formatIban = function (iban) {
|
|
|
8317
8383
|
|
|
8318
8384
|
var IbanInput = function (_a) {
|
|
8319
8385
|
var value = _a.value, onChange = _a.onChange, props = __rest$1(_a, ["value", "onChange"]);
|
|
8320
|
-
return (jsxRuntime.jsx(Input, __assign({ value: formatIban(value), onChange: function (e) { return onChange(formatIban(e.target.value)); } }, props), void 0));
|
|
8386
|
+
return (jsxRuntime.jsx(Input, __assign({ value: formatIban(value), onChange: function (e) { return onChange === null || onChange === void 0 ? void 0 : onChange(formatIban(e.target.value)); } }, props), void 0));
|
|
8321
8387
|
};
|
|
8322
8388
|
|
|
8323
8389
|
var formatInput = function (input) {
|
|
@@ -8395,7 +8461,7 @@ var getVariantClassNames = function (variant) { return ({
|
|
|
8395
8461
|
}[variant]); };
|
|
8396
8462
|
var Badge = function (_a) {
|
|
8397
8463
|
var _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.size, size = _c === void 0 ? 'medium' : _c, _d = _a.variant, variant = _d === void 0 ? 'information' : _d, children = _a.children;
|
|
8398
|
-
return (jsxRuntime.jsx("div", __assign({ className: classNames(className, 'px16 br8 d-inline-block ai-center fw-bold p-p', { 'p-p--small': size === 'small' }, styles$p["badge--" + size], getVariantClassNames(variant)) }, { children: children }), void 0));
|
|
8464
|
+
return (jsxRuntime.jsx("div", __assign({ className: classNames$1(className, 'px16 br8 d-inline-block ai-center fw-bold p-p', { 'p-p--small': size === 'small' }, styles$p["badge--" + size], getVariantClassNames(variant)) }, { children: children }), void 0));
|
|
8399
8465
|
};
|
|
8400
8466
|
|
|
8401
8467
|
var css_248z$p = ".styles-module_container__3zJJC {\n max-width: 100%;\n}\n\n.styles-module_narrow__2p34b {\n max-width: 424px;\n}";
|
|
@@ -8429,7 +8495,7 @@ var Checkbox = function (_a) {
|
|
|
8429
8495
|
var isCheckboxLabelObject = function (label) {
|
|
8430
8496
|
return label.title !== undefined;
|
|
8431
8497
|
};
|
|
8432
|
-
return (jsxRuntime.jsx("div", __assign({ className: classNames(classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.container, styles$o.container, 'd-flex gap8', (_b = {},
|
|
8498
|
+
return (jsxRuntime.jsx("div", __assign({ className: classNames$1(classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.container, styles$o.container, 'd-flex gap8', (_b = {},
|
|
8433
8499
|
_b[styles$o.narrow] = !wide,
|
|
8434
8500
|
_b['fd-row'] = inlineLayout,
|
|
8435
8501
|
_b['f-wrap'] = inlineLayout,
|
|
@@ -8439,10 +8505,10 @@ var Checkbox = function (_a) {
|
|
|
8439
8505
|
var currentValue = _a[0], label = _a[1];
|
|
8440
8506
|
var checked = value === null || value === void 0 ? void 0 : value.includes(currentValue);
|
|
8441
8507
|
var customIcon = (_b = label) === null || _b === void 0 ? void 0 : _b.icon;
|
|
8442
|
-
return (jsxRuntime.jsxs("div", __assign({ className: classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.option }, { children: [jsxRuntime.jsx("input", { className: classNames('p-checkbox', {
|
|
8508
|
+
return (jsxRuntime.jsxs("div", __assign({ className: classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.option }, { children: [jsxRuntime.jsx("input", { className: classNames$1('p-checkbox', {
|
|
8443
8509
|
'p-checkbox--no-icon': customIcon,
|
|
8444
8510
|
}), id: currentValue, type: "checkbox", value: currentValue, onChange: function () { return handleOnChange(currentValue); }, checked: checked, "data-testid": "checkbox-input-" + currentValue }, void 0),
|
|
8445
|
-
jsxRuntime.jsxs("label", __assign({ htmlFor: currentValue, className: classNames(classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.label, 'p-label pr16', {
|
|
8511
|
+
jsxRuntime.jsxs("label", __assign({ htmlFor: currentValue, className: classNames$1(classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.label, 'p-label pr16', {
|
|
8446
8512
|
'p-label--bordered': bordered,
|
|
8447
8513
|
'jc-center': customIcon,
|
|
8448
8514
|
'fd-column': customIcon,
|
|
@@ -8460,7 +8526,7 @@ var Radio = function (_a) {
|
|
|
8460
8526
|
var _b;
|
|
8461
8527
|
var options = _a.options, value = _a.value, onChange = _a.onChange, _c = _a.wide, wide = _c === void 0 ? false : _c, _d = _a.inlineLayout, inlineLayout = _d === void 0 ? false : _d, _e = _a.inlineIcon, inlineIcon = _e === void 0 ? false : _e, classNamesObj = _a.classNames, _f = _a.bordered, bordered = _f === void 0 ? true : _f, _g = _a.disabled, disabled = _g === void 0 ? false : _g;
|
|
8462
8528
|
var entries = Object.entries(options);
|
|
8463
|
-
return (jsxRuntime.jsx("div", __assign({ className: classNames(classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.container, styles$n.container, 'd-flex gap8', (_b = {},
|
|
8529
|
+
return (jsxRuntime.jsx("div", __assign({ className: classNames$1(classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.container, styles$n.container, 'd-flex gap8', (_b = {},
|
|
8464
8530
|
_b[styles$n.wide] = wide,
|
|
8465
8531
|
_b[styles$n.narrow] = !wide,
|
|
8466
8532
|
_b['fd-row'] = inlineLayout,
|
|
@@ -8475,15 +8541,15 @@ var Radio = function (_a) {
|
|
|
8475
8541
|
var isRadioLabelObject = function (label) {
|
|
8476
8542
|
return label.title !== undefined;
|
|
8477
8543
|
};
|
|
8478
|
-
return (jsxRuntime.jsxs("div", __assign({ className: classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.option }, { children: [jsxRuntime.jsx("input", { className: classNames('p-radio', {
|
|
8544
|
+
return (jsxRuntime.jsxs("div", __assign({ className: classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.option }, { children: [jsxRuntime.jsx("input", { className: classNames$1('p-radio', {
|
|
8479
8545
|
'p-radio--no-icon': customIcon || hideIcon,
|
|
8480
8546
|
'p-radio--centered': !label,
|
|
8481
8547
|
}), id: currentValue, type: "radio", value: currentValue, onChange: function () { return onChange(currentValue); }, checked: checked, "data-testid": "radio-input-" + currentValue, disabled: disabled }, void 0),
|
|
8482
|
-
jsxRuntime.jsxs("label", __assign({ htmlFor: currentValue, className: classNames(classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.label, 'p-label', {
|
|
8548
|
+
jsxRuntime.jsxs("label", __assign({ htmlFor: currentValue, className: classNames$1(classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.label, 'p-label', {
|
|
8483
8549
|
'jc-center': customIcon && !inlineIcon,
|
|
8484
8550
|
'fd-column': customIcon && !inlineIcon,
|
|
8485
8551
|
'p-label--bordered': bordered,
|
|
8486
|
-
}), "data-cy": "radio-" + currentValue, "data-testid": "radio-" + currentValue }, { children: [customIcon && (jsxRuntime.jsx("div", __assign({ className: classNames('d-inline-flex ai-center jc-center', inlineIcon ? 'mr8' : 'mt8') }, { children: customIcon === null || customIcon === void 0 ? void 0 : customIcon(checked) }), void 0)),
|
|
8552
|
+
}), "data-cy": "radio-" + currentValue, "data-testid": "radio-" + currentValue }, { children: [customIcon && (jsxRuntime.jsx("div", __assign({ className: classNames$1('d-inline-flex ai-center jc-center', inlineIcon ? 'mr8' : 'mt8') }, { children: customIcon === null || customIcon === void 0 ? void 0 : customIcon(checked) }), void 0)),
|
|
8487
8553
|
isRadioLabelObject(label) ? (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("p", __assign({ className: "p-p" }, { children: label.title }), void 0),
|
|
8488
8554
|
jsxRuntime.jsx("span", __assign({ className: "d-block p-p p-p--small tc-grey-600" }, { children: label.description }), void 0)] }, void 0)) : (label)] }), void 0)] }), currentValue));
|
|
8489
8555
|
}) }), void 0));
|
|
@@ -8547,7 +8613,7 @@ var BottomModal = function (_a) {
|
|
|
8547
8613
|
if (!isOpen) {
|
|
8548
8614
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {}, void 0);
|
|
8549
8615
|
}
|
|
8550
|
-
return (jsxRuntime.jsx("div", __assign({ className: isClosing ? styles$m['overlay--close'] : styles$m.overlay, onClick: handleOnOverlayClick }, { children: jsxRuntime.jsx("div", __assign({ className: styles$m.wrapper, ref: containerRef, onClick: handleContainerClick, style: { top: containerXOffset + "px" } }, { children: jsxRuntime.jsxs("div", __assign({ className: (isClosing ? styles$m['container--close'] : styles$m.container) + " " + className }, { children: [jsxRuntime.jsxs("div", __assign({ className: classNames(styles$m.header, {
|
|
8616
|
+
return (jsxRuntime.jsx("div", __assign({ className: isClosing ? styles$m['overlay--close'] : styles$m.overlay, onClick: handleOnOverlayClick }, { children: jsxRuntime.jsx("div", __assign({ className: styles$m.wrapper, ref: containerRef, onClick: handleContainerClick, style: { top: containerXOffset + "px" } }, { children: jsxRuntime.jsxs("div", __assign({ className: (isClosing ? styles$m['container--close'] : styles$m.container) + " " + className }, { children: [jsxRuntime.jsxs("div", __assign({ className: classNames$1(styles$m.header, {
|
|
8551
8617
|
'jc-between': !!title,
|
|
8552
8618
|
'jc-end': !title,
|
|
8553
8619
|
}) }, { children: [jsxRuntime.jsx("div", __assign({ className: "p-h4 " + styles$m.title }, { children: title }), void 0),
|
|
@@ -8565,7 +8631,7 @@ var RegularModal = function (_a) {
|
|
|
8565
8631
|
if (!isOpen) {
|
|
8566
8632
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {}, void 0);
|
|
8567
8633
|
}
|
|
8568
|
-
return (jsxRuntime.jsx("div", __assign({ className: isClosing ? styles$l['overlay--close'] : styles$l.overlay, onClick: handleOnOverlayClick }, { children: jsxRuntime.jsx("div", __assign({ className: (isClosing ? styles$l['container--close'] : styles$l.container) + " " + className }, { children: jsxRuntime.jsxs("div", __assign({ className: styles$l.body, onClick: handleContainerClick }, { children: [jsxRuntime.jsxs("div", __assign({ className: classNames(styles$l.header, {
|
|
8634
|
+
return (jsxRuntime.jsx("div", __assign({ className: isClosing ? styles$l['overlay--close'] : styles$l.overlay, onClick: handleOnOverlayClick }, { children: jsxRuntime.jsx("div", __assign({ className: (isClosing ? styles$l['container--close'] : styles$l.container) + " " + className }, { children: jsxRuntime.jsxs("div", __assign({ className: styles$l.body, onClick: handleContainerClick }, { children: [jsxRuntime.jsxs("div", __assign({ className: classNames$1(styles$l.header, {
|
|
8569
8635
|
'jc-between': !!title,
|
|
8570
8636
|
'jc-end': !title,
|
|
8571
8637
|
}) }, { children: [title && jsxRuntime.jsx("div", __assign({ className: "p-h2 " + styles$l.title }, { children: title }), void 0),
|
|
@@ -8756,32 +8822,32 @@ styleInject(css_248z$f);
|
|
|
8756
8822
|
var cardDefaultAs = 'section';
|
|
8757
8823
|
var Card = function (_a) {
|
|
8758
8824
|
var _b;
|
|
8759
|
-
var as = _a.as, children = _a.children, classNames
|
|
8825
|
+
var as = _a.as, children = _a.children, classNames = _a.classNames, _c = _a.density, density = _c === void 0 ? 'balanced' : _c, description = _a.description, _d = _a.descriptionVariant, descriptionVariant = _d === void 0 ? 'large' : _d, _e = _a.dropShadow, dropShadow = _e === void 0 ? true : _e, icon = _a.icon, label = _a.label, onClick = _a.onClick, actionIcon = _a.actionIcon, title = _a.title, _f = _a.titleVariant, titleVariant = _f === void 0 ? 'large' : _f, showActionIcon = _a.showActionIcon, rest = __rest$1(_a, ["as", "children", "classNames", "density", "description", "descriptionVariant", "dropShadow", "icon", "label", "onClick", "actionIcon", "title", "titleVariant", "showActionIcon"]);
|
|
8760
8826
|
var hideActionIcon = typeof actionIcon !== 'undefined' && !actionIcon;
|
|
8761
8827
|
var propsWithActionIcon = onClick || (rest === null || rest === void 0 ? void 0 : rest.href) || rest.to;
|
|
8762
8828
|
var cardDefaultTag = onClick ? 'button' : cardDefaultAs;
|
|
8763
8829
|
var Tag = as || cardDefaultTag;
|
|
8764
|
-
return (jsxRuntime.jsx(Tag, __assign({ className: classNames(classNames
|
|
8830
|
+
return (jsxRuntime.jsx(Tag, __assign({ className: classNames$1(classNames === null || classNames === void 0 ? void 0 : classNames.buttonWrapper, ' d-flex w100 br8 ai-stretch', (_b = {
|
|
8765
8831
|
'c-pointer': propsWithActionIcon
|
|
8766
8832
|
},
|
|
8767
8833
|
_b[styles$e.button] = propsWithActionIcon,
|
|
8768
8834
|
_b)) }, onClick && {
|
|
8769
8835
|
onClick: onClick,
|
|
8770
8836
|
type: "button"
|
|
8771
|
-
}, rest, { children: jsxRuntime.jsxs("div", __assign({ className: classNames('d-flex fd-column jc-center br8 bg-white w100 ta-left', { 'bs-sm': dropShadow }, {
|
|
8837
|
+
}, rest, { children: jsxRuntime.jsxs("div", __assign({ className: classNames$1('d-flex fd-column jc-center br8 bg-white w100 ta-left', { 'bs-sm': dropShadow }, {
|
|
8772
8838
|
compact: 'p16',
|
|
8773
8839
|
balanced: 'p24',
|
|
8774
8840
|
spacious: 'p32',
|
|
8775
|
-
}[density], classNames
|
|
8776
|
-
jsxRuntime.jsxs("div", __assign({ className: "d-flex jc-between w100" }, { children: [jsxRuntime.jsxs("div", __assign({ className: "d-flex jc-center gap8 fd-column tc-grey-900 w100" }, { children: [label && (jsxRuntime.jsx("h3", __assign({ className: classNames('p-p--small', classNames
|
|
8777
|
-
title && (jsxRuntime.jsx("h2", __assign({ className: classNames(classNames
|
|
8841
|
+
}[density], classNames === null || classNames === void 0 ? void 0 : classNames.wrapper) }, { children: [jsxRuntime.jsxs("div", __assign({ className: "d-flex w100" }, { children: [icon && (jsxRuntime.jsx("div", __assign({ className: classNames$1("d-flex ai-center tc-primary-500", styles$e.icon, styles$e["icon" + density], classNames === null || classNames === void 0 ? void 0 : classNames.icon) }, { children: icon }), void 0)),
|
|
8842
|
+
jsxRuntime.jsxs("div", __assign({ className: "d-flex jc-between w100" }, { children: [jsxRuntime.jsxs("div", __assign({ className: "d-flex jc-center gap8 fd-column tc-grey-900 w100" }, { children: [label && (jsxRuntime.jsx("h3", __assign({ className: classNames$1('p-p--small', classNames === null || classNames === void 0 ? void 0 : classNames.label) }, { children: label }), void 0)),
|
|
8843
|
+
title && (jsxRuntime.jsx("h2", __assign({ className: classNames$1(classNames === null || classNames === void 0 ? void 0 : classNames.title, {
|
|
8778
8844
|
large: 'p-h3',
|
|
8779
8845
|
medium: 'p-h4',
|
|
8780
8846
|
small: 'p-p',
|
|
8781
8847
|
}[titleVariant]) }, { children: title }), void 0)),
|
|
8782
|
-
description && (jsxRuntime.jsx("div", __assign({ className: classNames('tc-grey-600', classNames
|
|
8783
|
-
(showActionIcon || (propsWithActionIcon && !hideActionIcon)) && (jsxRuntime.jsx("div", __assign({ className: classNames(styles$e.actionIcon, classNames
|
|
8784
|
-
children && jsxRuntime.jsx("div", __assign({ className: classNames
|
|
8848
|
+
description && (jsxRuntime.jsx("div", __assign({ className: classNames$1('tc-grey-600', classNames === null || classNames === void 0 ? void 0 : classNames.description, descriptionVariant === 'small' ? 'p-p--small' : 'p-p') }, { children: description }), void 0))] }), void 0),
|
|
8849
|
+
(showActionIcon || (propsWithActionIcon && !hideActionIcon)) && (jsxRuntime.jsx("div", __assign({ className: classNames$1(styles$e.actionIcon, classNames === null || classNames === void 0 ? void 0 : classNames.actionIcon, styles$e["actionIcon" + density], 'd-flex ai-center') }, { children: actionIcon || jsxRuntime.jsx(ChevronRightIcon, { size: 24 }, void 0) }), void 0))] }), void 0)] }), void 0),
|
|
8850
|
+
children && jsxRuntime.jsx("div", __assign({ className: classNames === null || classNames === void 0 ? void 0 : classNames.children }, { children: children }), void 0)] }), void 0) }), void 0));
|
|
8785
8851
|
};
|
|
8786
8852
|
|
|
8787
8853
|
var css_248z$e = ".style-module_chip__3LMgV {\n background: var(--ds-primary-100);\n border: 2px solid var(--ds-primary-100);\n border-radius: 8px;\n padding: 4px 8px;\n width: fit-content;\n width: -moz-fit-content;\n display: flex;\n align-items: center;\n animation-name: style-module_appearInAnimation__33Ebn;\n animation-duration: 0.5s;\n animation-fill-mode: both;\n}\n\n.style-module_chip__3LMgV:hover {\n transition: 0.2s ease-in;\n border: 2px solid var(--ds-primary-500);\n}\n\n.style-module_chip-image__2vVqF {\n width: 24px;\n height: 14px;\n}\n\n.style-module_chip-button-container__3gSRY {\n color: #b1b0f5;\n position: relative;\n width: 16px;\n height: 16px;\n background: none;\n border: none;\n padding: 0;\n margin: 0;\n text-align: inherit;\n outline: none;\n box-shadow: none;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n cursor: pointer;\n}\n.style-module_chip-button-container__3gSRY:hover {\n color: #8e8cee;\n}\n\n.style-module_chip-remove-button__3LK7e {\n margin: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.style-module_chip-remove-button__3LK7e svg {\n vertical-align: top;\n}\n\n@keyframes style-module_appearInAnimation__33Ebn {\n from {\n opacity: 0;\n transform: translateX(16px);\n }\n to {\n opacity: 1;\n }\n}";
|
|
@@ -11918,7 +11984,7 @@ var AutoSuggestInput = function (_a) {
|
|
|
11918
11984
|
var renderSuggestion = function (suggestion) {
|
|
11919
11985
|
var _a;
|
|
11920
11986
|
return (jsxRuntime.jsxs("div", __assign({ className: "" + styles$c['suggestion-option'] }, { children: [suggestion.leftIcon && (jsxRuntime.jsx("img", { className: "mr16 " + styles$c['suggestion-img'], src: suggestion.leftIcon, alt: suggestion.value }, void 0)),
|
|
11921
|
-
jsxRuntime.jsx("div", __assign({ className: classNames(styles$c['suggestion-text'], (_a = {},
|
|
11987
|
+
jsxRuntime.jsx("div", __assign({ className: classNames$1(styles$c['suggestion-text'], (_a = {},
|
|
11922
11988
|
_a[styles$c.nowrap] = !wrapText,
|
|
11923
11989
|
_a)) }, { children: suggestion.value }), void 0)] }), void 0));
|
|
11924
11990
|
};
|
|
@@ -11943,7 +12009,7 @@ var AutoSuggestMultiSelect = function (_a) {
|
|
|
11943
12009
|
var _c = require$$0.useState([]), suggestions = _c[0], setSuggestions = _c[1];
|
|
11944
12010
|
var _d = require$$0.useState(''), currentOption = _d[0], setCurrentOption = _d[1];
|
|
11945
12011
|
var hasChips = Boolean(selectedValues && selectedValues.length > 0);
|
|
11946
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", __assign({ className: classNames(styles$b['chip-container'], chipsListClassName, (_b = {},
|
|
12012
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", __assign({ className: classNames$1(styles$b['chip-container'], chipsListClassName, (_b = {},
|
|
11947
12013
|
_b[styles$b.appearIn] = hasChips,
|
|
11948
12014
|
_b)) }, { children: selectedValues && hasChips && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: selectedValues.map(function (value, index) { return (jsxRuntime.jsx(Chip, { className: "mb16", value: value, onRemove: function (value) {
|
|
11949
12015
|
var newValues = __spreadArray$1([], selectedValues).filter(function (selectedValue) { return selectedValue.value !== value.value; });
|
|
@@ -13554,10 +13620,10 @@ var TableArrows = function (props) {
|
|
|
13554
13620
|
var _a, _b;
|
|
13555
13621
|
var active = props.active, onClick = props.onClick;
|
|
13556
13622
|
var handleButtonClick = function (value) { return function () { return onClick(value); }; };
|
|
13557
|
-
return (jsxRuntime.jsxs("div", __assign({ className: styles$8.container }, { children: [jsxRuntime.jsx("button", __assign({ onClick: handleButtonClick('prev'), className: classNames("p-btn--secondary d-flex", styles$8.prev, styles$8.arrow, (_a = {},
|
|
13623
|
+
return (jsxRuntime.jsxs("div", __assign({ className: styles$8.container }, { children: [jsxRuntime.jsx("button", __assign({ onClick: handleButtonClick('prev'), className: classNames$1("p-btn--secondary d-flex", styles$8.prev, styles$8.arrow, (_a = {},
|
|
13558
13624
|
_a[styles$8.active] = active.left,
|
|
13559
13625
|
_a)) }, { children: jsxRuntime.jsx(ArrowIcon, {}, void 0) }), void 0),
|
|
13560
|
-
jsxRuntime.jsx("button", __assign({ onClick: handleButtonClick('next'), className: classNames("p-btn--secondary d-flex", styles$8.next, styles$8.arrow, (_b = {},
|
|
13626
|
+
jsxRuntime.jsx("button", __assign({ onClick: handleButtonClick('next'), className: classNames$1("p-btn--secondary d-flex", styles$8.next, styles$8.arrow, (_b = {},
|
|
13561
13627
|
_b[styles$8.active] = active.right,
|
|
13562
13628
|
_b)) }, { children: jsxRuntime.jsx(ArrowIcon, {}, void 0) }), void 0)] }), void 0));
|
|
13563
13629
|
};
|
|
@@ -13571,20 +13637,13 @@ var TableButton = function (_a) {
|
|
|
13571
13637
|
return (jsxRuntime.jsx("button", __assign({ className: styles$7.button + " " + className, "data-testid": "ds-table-button", onClick: onClick }, { children: jsxRuntime.jsx("span", { children: children }, void 0) }), void 0));
|
|
13572
13638
|
};
|
|
13573
13639
|
|
|
13574
|
-
var css_248z$7 = ".style-module_button__3TkNT {\n padding: 0;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n vertical-align: bottom;\n border-radius: 12px;\n width: 24px;\n height: 24px;\n transition: all 0.3s ease;\n}\n.style-module_button__3TkNT:hover, .style-module_button__3TkNT:focus {\n background-color: #f7f7ff;\n}\n.style-module_button__3TkNT:hover svg, .style-module_button__3TkNT:focus svg {\n fill: #b1b0f5;\n}\n.style-module_button__3TkNT svg {\n
|
|
13640
|
+
var css_248z$7 = ".style-module_button__3TkNT {\n padding: 0;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n vertical-align: bottom;\n border-radius: 12px;\n width: 24px;\n height: 24px;\n transition: all 0.3s ease;\n}\n.style-module_button__3TkNT:hover, .style-module_button__3TkNT:focus {\n background-color: #f7f7ff;\n}\n.style-module_button__3TkNT:hover svg path, .style-module_button__3TkNT:focus svg path {\n fill: #b1b0f5;\n}\n.style-module_button__3TkNT svg {\n transition: all 0.3s ease;\n}\n.style-module_button__3TkNT svg path {\n fill: #d2d2d8;\n}\n.style-module_button__3TkNT:focus-visible {\n box-shadow: 0 0 0 2px #8e8cee;\n}";
|
|
13575
13641
|
var styles$6 = {"button":"style-module_button__3TkNT"};
|
|
13576
13642
|
styleInject(css_248z$7);
|
|
13577
13643
|
|
|
13578
13644
|
var TableInfoButton = function (_a) {
|
|
13579
13645
|
var onClick = _a.onClick, _b = _a.className, className = _b === void 0 ? '' : _b;
|
|
13580
|
-
return (jsxRuntime.jsx("
|
|
13581
|
-
e.stopPropagation();
|
|
13582
|
-
if (e.key === 'Enter' || e.key === " ") {
|
|
13583
|
-
onClick();
|
|
13584
|
-
}
|
|
13585
|
-
}, tabIndex: 0 }, { children: jsxRuntime.jsxs("svg", __assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10 2.66667C5.94991 2.66667 2.66667 5.94991 2.66667 10C2.66667 14.0501 5.94991 17.3333 10 17.3333C14.0501 17.3333 17.3333 14.0501 17.3333 10C17.3333 5.94991 14.0501 2.66667 10 2.66667ZM0.666667 10C0.666667 4.84534 4.84534 0.666667 10 0.666667C15.1547 0.666667 19.3333 4.84534 19.3333 10C19.3333 15.1547 15.1547 19.3333 10 19.3333C4.84534 19.3333 0.666667 15.1547 0.666667 10Z" }, void 0),
|
|
13586
|
-
jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10 9C10.5523 9 11 9.44772 11 10V13.3333C11 13.8856 10.5523 14.3333 10 14.3333C9.44772 14.3333 9 13.8856 9 13.3333V10C9 9.44772 9.44772 9 10 9Z" }, void 0),
|
|
13587
|
-
jsxRuntime.jsx("path", { d: "M10.8333 6.66667C10.8333 7.1269 10.4602 7.5 10 7.5C9.53976 7.5 9.16667 7.1269 9.16667 6.66667C9.16667 6.20643 9.53976 5.83333 10 5.83333C10.4602 5.83333 10.8333 6.20643 10.8333 6.66667Z" }, void 0)] }), void 0) }), void 0));
|
|
13646
|
+
return (jsxRuntime.jsx("button", __assign({ className: "p-btn--secondary " + styles$6.button + " " + className, type: "button", onClick: onClick }, { children: jsxRuntime.jsx(Info$2, { size: 20 }, void 0) }), void 0));
|
|
13588
13647
|
};
|
|
13589
13648
|
|
|
13590
13649
|
var StarIcon = function (_a) {
|
|
@@ -13612,7 +13671,7 @@ var VALID_VALUES = [1, 2, 3];
|
|
|
13612
13671
|
var TableRating = function (props) {
|
|
13613
13672
|
var rating = props.rating, type = props.type;
|
|
13614
13673
|
var SelectedIcon = getRatingIcon(type);
|
|
13615
|
-
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: VALID_VALUES.map(function (value) { return (jsxRuntime.jsx(SelectedIcon, { className: classNames(styles$5.icon, value <= rating ? styles$5.filled : styles$5.empty) }, value)); }) }, void 0));
|
|
13674
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: VALID_VALUES.map(function (value) { return (jsxRuntime.jsx(SelectedIcon, { className: classNames$1(styles$5.icon, value <= rating ? styles$5.filled : styles$5.empty) }, value)); }) }, void 0));
|
|
13616
13675
|
};
|
|
13617
13676
|
|
|
13618
13677
|
var css_248z$5 = ".style-module_icon__30Nor {\n min-width: 20px;\n}";
|
|
@@ -13762,9 +13821,9 @@ var ComparisonTable = function (props) {
|
|
|
13762
13821
|
: {})), (stickyHeaderTopOffset
|
|
13763
13822
|
? { '--stickyHeaderTopOffset': stickyHeaderTopOffset + "px" }
|
|
13764
13823
|
: {})), (growContent ? { '--growContent': '100%' } : {}));
|
|
13765
|
-
return (jsxRuntime.jsx(dist$1.exports.ScrollSync, __assign({ onSync: scrollContainerCallbackRef }, { children: jsxRuntime.jsxs("div", __assign({ style: cssVariablesStyle }, { children: [jsxRuntime.jsx("div", __assign({ className: classNames(baseStyles.header, styles === null || styles === void 0 ? void 0 : styles.header) }, { children: jsxRuntime.jsx(dist$1.exports.ScrollSyncPane, { children: jsxRuntime.jsx("div", __assign({ id: headerId, className: classNames(baseStyles.container, (_a = {},
|
|
13824
|
+
return (jsxRuntime.jsx(dist$1.exports.ScrollSync, __assign({ onSync: scrollContainerCallbackRef }, { children: jsxRuntime.jsxs("div", __assign({ style: cssVariablesStyle }, { children: [jsxRuntime.jsx("div", __assign({ className: classNames$1(baseStyles.header, styles === null || styles === void 0 ? void 0 : styles.header) }, { children: jsxRuntime.jsx(dist$1.exports.ScrollSyncPane, { children: jsxRuntime.jsx("div", __assign({ id: headerId, className: classNames$1(baseStyles.container, (_a = {},
|
|
13766
13825
|
_a[baseStyles.noScrollBars] = hideScrollBars,
|
|
13767
|
-
_a)) }, { children: jsxRuntime.jsx("div", __assign({ className: classNames(baseStyles['overflow-container']) }, { children: jsxRuntime.jsxs("div", __assign({ className: baseStyles['group-container'] }, { children: [jsxRuntime.jsx(TableArrows, { onClick: handleArrowsClick, active: {
|
|
13826
|
+
_a)) }, { children: jsxRuntime.jsx("div", __assign({ className: classNames$1(baseStyles['overflow-container']) }, { children: jsxRuntime.jsxs("div", __assign({ className: baseStyles['group-container'] }, { children: [jsxRuntime.jsx(TableArrows, { onClick: handleArrowsClick, active: {
|
|
13768
13827
|
left: selectedTabIndex > 0,
|
|
13769
13828
|
right: selectedTabIndex < data.length - 1,
|
|
13770
13829
|
} }, void 0),
|
|
@@ -13784,17 +13843,17 @@ var ComparisonTable = function (props) {
|
|
|
13784
13843
|
return (jsxRuntime.jsx(Row$1, { rowId: rowId, cell: cell, data: data }, rowId));
|
|
13785
13844
|
});
|
|
13786
13845
|
var idString = "headerGroup-" + headerGroup.id;
|
|
13787
|
-
return (jsxRuntime.jsx(require$$0.Fragment, { children: headerGroup.label && collapsibleSections ? (jsxRuntime.jsx(AccordionItem, __assign({ className: "mt8", label: headerGroup.label, headerClassName: "p24 br8", isOpen: selectedSection === idString, onOpen: function () { return setSelectedSection(idString); }, onClose: function () { return setSelectedSection(''); } }, { children: jsxRuntime.jsx(dist$1.exports.ScrollSyncPane, { children: jsxRuntime.jsx("div", __assign({ className: classNames(baseStyles.container, styles === null || styles === void 0 ? void 0 : styles.container, (_a = {},
|
|
13846
|
+
return (jsxRuntime.jsx(require$$0.Fragment, { children: headerGroup.label && collapsibleSections ? (jsxRuntime.jsx(AccordionItem, __assign({ className: "mt8", label: headerGroup.label, headerClassName: "p24 br8", isOpen: selectedSection === idString, onOpen: function () { return setSelectedSection(idString); }, onClose: function () { return setSelectedSection(''); } }, { children: jsxRuntime.jsx(dist$1.exports.ScrollSyncPane, { children: jsxRuntime.jsx("div", __assign({ className: classNames$1(baseStyles.container, styles === null || styles === void 0 ? void 0 : styles.container, (_a = {},
|
|
13788
13847
|
_a[baseStyles.noScrollBars] = hideScrollBars,
|
|
13789
|
-
_a)) }, { children: jsxRuntime.jsx("div", __assign({ className: classNames(baseStyles['overflow-container']) }, { children: jsxRuntime.jsx("div", __assign({ className: baseStyles['group-container'] }, { children: content }), void 0) }), void 0) }), void 0) }, void 0) }), void 0)) : (jsxRuntime.jsx("div", { children: jsxRuntime.jsx(dist$1.exports.ScrollSyncPane, { children: jsxRuntime.jsx("div", __assign({ className: classNames(baseStyles.container, styles === null || styles === void 0 ? void 0 : styles.container, (_b = {},
|
|
13848
|
+
_a)) }, { children: jsxRuntime.jsx("div", __assign({ className: classNames$1(baseStyles['overflow-container']) }, { children: jsxRuntime.jsx("div", __assign({ className: baseStyles['group-container'] }, { children: content }), void 0) }), void 0) }), void 0) }, void 0) }), void 0)) : (jsxRuntime.jsx("div", { children: jsxRuntime.jsx(dist$1.exports.ScrollSyncPane, { children: jsxRuntime.jsx("div", __assign({ className: classNames$1(baseStyles.container, styles === null || styles === void 0 ? void 0 : styles.container, (_b = {},
|
|
13790
13849
|
_b[baseStyles.noScrollBars] = hideScrollBars,
|
|
13791
|
-
_b)) }, { children: jsxRuntime.jsx("div", __assign({ className: classNames(baseStyles['overflow-container']) }, { children: jsxRuntime.jsxs("div", __assign({ className: baseStyles['group-container'] }, { children: [
|
|
13850
|
+
_b)) }, { children: jsxRuntime.jsx("div", __assign({ className: classNames$1(baseStyles['overflow-container']) }, { children: jsxRuntime.jsxs("div", __assign({ className: baseStyles['group-container'] }, { children: [
|
|
13792
13851
|
/**
|
|
13793
13852
|
* Print a table subheader if the `label` value is present
|
|
13794
13853
|
*/
|
|
13795
13854
|
headerGroup.label && !collapsibleSections && (jsxRuntime.jsx("div", __assign({ className: baseStyles['group-title'] }, { children: jsxRuntime.jsx("h4", __assign({ className: "p-h4 " + baseStyles.sticky }, { children: headerGroup.label }), void 0) }), void 0)), content] }), void 0) }), void 0) }), void 0) }, void 0) }, idString)) }, idString));
|
|
13796
13855
|
}),
|
|
13797
|
-
hideDetails && (jsxRuntime.jsx("div", __assign({ className: classNames(baseStyles['show-details-container'], baseStyles.sticky, 'mt48') }, { children: jsxRuntime.jsx("div", { children: jsxRuntime.jsxs("button", __assign({ className: "w100 d-flex p-a p-h4 c-pointer " + baseStyles['show-details-button'], onClick: toggleMoreRows, type: "button" }, { children: [showMore ? 'Hide details' : 'Show details', jsxRuntime.jsx(Chevron, { className: showMore ? '' : baseStyles['icon-inverted'] }, void 0)] }), void 0) }, void 0) }), void 0))] }), void 0)] }), void 0) }), void 0));
|
|
13856
|
+
hideDetails && (jsxRuntime.jsx("div", __assign({ className: classNames$1(baseStyles['show-details-container'], baseStyles.sticky, 'mt48') }, { children: jsxRuntime.jsx("div", { children: jsxRuntime.jsxs("button", __assign({ className: "w100 d-flex p-a p-h4 c-pointer " + baseStyles['show-details-button'], onClick: toggleMoreRows, type: "button" }, { children: [showMore ? 'Hide details' : 'Show details', jsxRuntime.jsx(Chevron, { className: showMore ? '' : baseStyles['icon-inverted'] }, void 0)] }), void 0) }, void 0) }), void 0))] }), void 0)] }), void 0) }), void 0));
|
|
13798
13857
|
};
|
|
13799
13858
|
|
|
13800
13859
|
var css_248z$3 = ".style-module_background-container__2Gjka {\n position: relative;\n display: inline-block;\n background-color: var(--ds-primary-100);\n border-radius: 8px;\n padding: 0 8px;\n}\n\n.style-module_chip-container__7XeKn {\n display: flex;\n align-items: center;\n}\n\n.style-module_chip__3rgLT {\n cursor: pointer;\n z-index: 2;\n padding-left: 16px;\n padding-right: 16px;\n}\n\n.style-module_select-chip-background__YCAyw {\n position: absolute;\n background-color: white;\n border-radius: 8px;\n top: 8px;\n z-index: 1;\n transition: width 0.3s, left 0.3s;\n}";
|
|
@@ -36000,7 +36059,7 @@ var Markdown = function (_a) {
|
|
|
36000
36059
|
|
|
36001
36060
|
var Link = function (_a) {
|
|
36002
36061
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
36003
|
-
return (jsxRuntime.jsx("a", __assign({ className: classNames(className, 'p-a c-pointer') }, rest, { children: children }), void 0));
|
|
36062
|
+
return (jsxRuntime.jsx("a", __assign({ className: classNames$1(className, 'p-a c-pointer') }, rest, { children: children }), void 0));
|
|
36004
36063
|
};
|
|
36005
36064
|
|
|
36006
36065
|
var basePath = 'https://assets.cdn.feather-insurance.com/assets/images';
|
|
@@ -36162,7 +36221,7 @@ var illustrations = {
|
|
|
36162
36221
|
|
|
36163
36222
|
var Spinner = function (_a) {
|
|
36164
36223
|
var _b = _a.size, size = _b === void 0 ? 's' : _b;
|
|
36165
|
-
return (jsxRuntime.jsx("div", { className: classNames('ds-spinner', "ds-spinner__" + size), "data-testid": "ds-spinner" }, void 0));
|
|
36224
|
+
return (jsxRuntime.jsx("div", { className: classNames$1('ds-spinner', "ds-spinner__" + size), "data-testid": "ds-spinner" }, void 0));
|
|
36166
36225
|
};
|
|
36167
36226
|
|
|
36168
36227
|
var css_248z$1 = ".styles-module_container__F0d5Q {\n max-width: 100%;\n}\n\n.styles-module_toggleContainer__2yz_j {\n position: relative;\n width: 40px;\n height: 12px;\n}\n\n.styles-module_label__3EAX_ {\n align-items: center;\n}\n\n.styles-module_toggle__2sL88 {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: var(--ds-grey-400);\n transition: all 0.3s ease-in-out;\n border-radius: 100px;\n}\n.styles-module_toggle__2sL88:before {\n position: absolute;\n content: \"\";\n height: 20px;\n width: 20px;\n left: 0;\n bottom: -4px;\n background: var(--ds-grey-500);\n transition: 0.3s ease-in-out;\n transition-property: background-color, outline, transform;\n outline-color: var(--ds-purple-300);\n border-radius: 50%;\n}\n\n.styles-module_input__2sUF3 {\n opacity: 0;\n}\n.styles-module_input__2sUF3:checked + .styles-module_toggle__2sL88 {\n background: var(--ds-purple-100);\n}\n.styles-module_input__2sUF3:checked + .styles-module_toggle__2sL88:before {\n background: var(--ds-purple-500);\n}\n.styles-module_input__2sUF3:disabled + .styles-module_toggle__2sL88 {\n cursor: not-allowed;\n opacity: 0.4;\n}\n.styles-module_input__2sUF3:focus-visible ~ .styles-module_toggle__2sL88:before {\n outline: 4px solid var(--ds-purple-300);\n}\n.styles-module_input__2sUF3:checked + .styles-module_toggle__2sL88:before {\n transform: translateX(20px);\n}";
|
|
@@ -36196,16 +36255,16 @@ var Toggle = function (_a) {
|
|
|
36196
36255
|
onChange(newValues);
|
|
36197
36256
|
};
|
|
36198
36257
|
var entries = Object.entries(options);
|
|
36199
|
-
return (jsxRuntime.jsx("div", __assign({ className: classNames(classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.container, styles$1.container, 'd-flex gap8', {
|
|
36258
|
+
return (jsxRuntime.jsx("div", __assign({ className: classNames$1(classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.container, styles$1.container, 'd-flex gap8', {
|
|
36200
36259
|
'fd-row': inlineLayout,
|
|
36201
36260
|
'f-wrap': inlineLayout,
|
|
36202
36261
|
'fd-column': !inlineLayout,
|
|
36203
36262
|
}) }, { children: entries.map(function (_a) {
|
|
36204
36263
|
var currentValue = _a[0], label = _a[1];
|
|
36205
36264
|
var checked = value === null || value === void 0 ? void 0 : value.includes(currentValue);
|
|
36206
|
-
return (jsxRuntime.jsx("div", __assign({ className: classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.option }, { children: jsxRuntime.jsxs("label", __assign({ className: classNames(styles$1.label, classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.label, 'p-label pr16 gap16', {
|
|
36265
|
+
return (jsxRuntime.jsx("div", __assign({ className: classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.option }, { children: jsxRuntime.jsxs("label", __assign({ className: classNames$1(styles$1.label, classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.label, 'p-label pr16 gap16', {
|
|
36207
36266
|
'p-label--bordered': bordered,
|
|
36208
|
-
}), "data-cy": "toggle-" + currentValue, "data-testid": "toggle-" + currentValue }, { children: [jsxRuntime.jsxs("span", __assign({ className: classNames(styles$1.toggleContainer, 'd-inline-block') }, { children: [jsxRuntime.jsx("input", { checked: checked, className: styles$1.input, "data-testid": "toggle-input-" + currentValue, onChange: function () { return handleOnChange(currentValue); }, type: "checkbox", value: currentValue, disabled: disabled }, void 0),
|
|
36267
|
+
}), "data-cy": "toggle-" + currentValue, "data-testid": "toggle-" + currentValue }, { children: [jsxRuntime.jsxs("span", __assign({ className: classNames$1(styles$1.toggleContainer, 'd-inline-block') }, { children: [jsxRuntime.jsx("input", { checked: checked, className: styles$1.input, "data-testid": "toggle-input-" + currentValue, onChange: function () { return handleOnChange(currentValue); }, type: "checkbox", value: currentValue, disabled: disabled }, void 0),
|
|
36209
36268
|
jsxRuntime.jsx("span", { className: styles$1.toggle }, void 0)] }), void 0),
|
|
36210
36269
|
isToggleLabelObject(label) ? (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("p", __assign({ className: "p-p" }, { children: label.title }), void 0),
|
|
36211
36270
|
jsxRuntime.jsx("span", __assign({ className: "d-block p-p p-p--small tc-grey-600" }, { children: label.description }), void 0)] }, void 0)) : label] }), void 0) }), currentValue));
|
|
@@ -36411,19 +36470,19 @@ to {
|
|
|
36411
36470
|
var Toaster = function (_a) {
|
|
36412
36471
|
var toasterClassNames = _a.classNames;
|
|
36413
36472
|
return (jsxRuntime.jsx(dist.Toaster, { containerClassName: toasterClassNames === null || toasterClassNames === void 0 ? void 0 : toasterClassNames.wrapper, toastOptions: {
|
|
36414
|
-
className: classNames(styles.toast, 'bs-lg', toasterClassNames === null || toasterClassNames === void 0 ? void 0 : toasterClassNames.toast),
|
|
36473
|
+
className: classNames$1(styles.toast, 'bs-lg', toasterClassNames === null || toasterClassNames === void 0 ? void 0 : toasterClassNames.toast),
|
|
36415
36474
|
} }, void 0));
|
|
36416
36475
|
};
|
|
36417
36476
|
var Toast = function (_a) {
|
|
36418
36477
|
var action = _a.action, description = _a.description, onDismiss = _a.onDismiss, title = _a.title, _b = _a.type, type = _b === void 0 ? "success" : _b;
|
|
36419
|
-
return (jsxRuntime.jsxs("div", __assign({ className: classNames(styles.toastContent, 'd-flex jc-between w100') }, { children: [jsxRuntime.jsx("div", { className: classNames(styles.toastSidebar, styles["toastSidebar--" + type]) }, void 0),
|
|
36478
|
+
return (jsxRuntime.jsxs("div", __assign({ className: classNames$1(styles.toastContent, 'd-flex jc-between w100') }, { children: [jsxRuntime.jsx("div", { className: classNames$1(styles.toastSidebar, styles["toastSidebar--" + type]) }, void 0),
|
|
36420
36479
|
jsxRuntime.jsxs("div", __assign({ className: 'd-flex fd-column jc-center ta-left mr8' }, { children: [jsxRuntime.jsx("h4", __assign({ className: 'p-h4' }, { children: title }), void 0),
|
|
36421
36480
|
description && (jsxRuntime.jsx("p", __assign({ className: 'p-p p-p--small mt8 tc-grey-600' }, { children: description }), void 0)),
|
|
36422
|
-
action && (jsxRuntime.jsx("button", __assign({ className: classNames(styles.actionButton, styles["actionButton--" + type], 'mt8 c-pointer ta-left'), onClick: function () {
|
|
36481
|
+
action && (jsxRuntime.jsx("button", __assign({ className: classNames$1(styles.actionButton, styles["actionButton--" + type], 'mt8 c-pointer ta-left'), onClick: function () {
|
|
36423
36482
|
action.onClick();
|
|
36424
36483
|
onDismiss();
|
|
36425
36484
|
}, type: "button" }, { children: action.title }), void 0))] }), void 0),
|
|
36426
|
-
jsxRuntime.jsx("div", __assign({ className: 'd-flex ai-center' }, { children: jsxRuntime.jsx("button", __assign({ className: classNames(styles.closeButton, 'c-pointer'), onClick: onDismiss, "data-testid": "toast-close-button" }, { children: jsxRuntime.jsx(XIcon, { size: 24 }, void 0) }), void 0) }), void 0)] }), void 0));
|
|
36485
|
+
jsxRuntime.jsx("div", __assign({ className: 'd-flex ai-center' }, { children: jsxRuntime.jsx("button", __assign({ className: classNames$1(styles.closeButton, 'c-pointer'), onClick: onDismiss, "data-testid": "toast-close-button" }, { children: jsxRuntime.jsx(XIcon, { size: 24 }, void 0) }), void 0) }), void 0)] }), void 0));
|
|
36427
36486
|
};
|
|
36428
36487
|
var toast = function (title, _a) {
|
|
36429
36488
|
var _b = _a.duration, duration = _b === void 0 ? 3000 : _b, toastOptions = __rest$1(_a, ["duration"]);
|