kiban-design-system 1.0.288-alpha.0 → 1.0.288
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/index.cjs.js +242 -26
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +242 -26
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -4591,7 +4591,7 @@ function formatFileSize(bytes) {
|
|
|
4591
4591
|
}
|
|
4592
4592
|
return `${size.toFixed(2)} ${units[unitIndex]}`;
|
|
4593
4593
|
}
|
|
4594
|
-
|
|
4594
|
+
|
|
4595
4595
|
// code end
|
|
4596
4596
|
|
|
4597
4597
|
const cssClassName = (mainClass, ...classes) => {
|
|
@@ -18394,7 +18394,7 @@ const TimeSelector = ({
|
|
|
18394
18394
|
onChange(newValue);
|
|
18395
18395
|
}
|
|
18396
18396
|
};
|
|
18397
|
-
const handleFocusField =
|
|
18397
|
+
const handleFocusField = () => {
|
|
18398
18398
|
if (!disabled && !readOnly && !isActive) {
|
|
18399
18399
|
toggleTimePicker();
|
|
18400
18400
|
setIsFocused(true);
|
|
@@ -18623,7 +18623,6 @@ const AlphaZipCodeInput = ({
|
|
|
18623
18623
|
setShowPopover(Boolean(value && value?.length === 5 && items));
|
|
18624
18624
|
if (onFocus) onFocus();
|
|
18625
18625
|
};
|
|
18626
|
-
// eslint-disable-next-line max-len
|
|
18627
18626
|
const handleOnChange = event => {
|
|
18628
18627
|
const isValid = /^[0-9]+$/i.test(event.target.value) || event.target.value === '';
|
|
18629
18628
|
if (isValid && onChange) {
|
|
@@ -32369,9 +32368,7 @@ const Filedrop = ({
|
|
|
32369
32368
|
let encodeFile = null;
|
|
32370
32369
|
if (isGzip) {
|
|
32371
32370
|
const newFile = await readFileAsDataURL(file);
|
|
32372
|
-
const f = newFile ?
|
|
32373
|
-
// eslint-disable-next-line no-extra-parens
|
|
32374
|
-
newFile : new ArrayBuffer(0);
|
|
32371
|
+
const f = newFile ? newFile : new ArrayBuffer(0);
|
|
32375
32372
|
const input = new Uint8Array(f);
|
|
32376
32373
|
const output = pako.gzip(input);
|
|
32377
32374
|
const nF = new File([output], 'archivo.gz', {
|
|
@@ -33181,7 +33178,6 @@ const TrashIcon = () => /*#__PURE__*/jsxs("svg", {
|
|
|
33181
33178
|
strokeLinecap: "round",
|
|
33182
33179
|
strokeLinejoin: "round"
|
|
33183
33180
|
}), /*#__PURE__*/jsx("path", {
|
|
33184
|
-
// eslint-disable-next-line max-len
|
|
33185
33181
|
d: "M8 6V4C8 3.46957 8.21071 2.96086 8.58579 2.58579C8.96086 2.21071 9.46957 2 10 2H14C14.5304 2 15.0391 2.21071 15.4142 2.58579C15.7893 2.96086 16 3.46957 16 4V6M19 6V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20V6H19Z",
|
|
33186
33182
|
strokeWidth: "2",
|
|
33187
33183
|
strokeLinecap: "round",
|
|
@@ -33256,9 +33252,7 @@ const XIcon = () => /*#__PURE__*/jsx("svg", {
|
|
|
33256
33252
|
fill: "none",
|
|
33257
33253
|
children: /*#__PURE__*/jsx("path", {
|
|
33258
33254
|
fillRule: "evenodd",
|
|
33259
|
-
clipRule: "evenodd"
|
|
33260
|
-
// eslint-disable-next-line max-len
|
|
33261
|
-
,
|
|
33255
|
+
clipRule: "evenodd",
|
|
33262
33256
|
d: "M4.94109 4.0019L7.80489 1.13812L6.86209 0.195312L3.99828 3.0591L1.13855 0.195624L0.195129 1.13781L3.05547 4.00191L0.195436 6.86197L1.13825 7.80477L3.99828 4.94471L6.8624 7.80508L7.80459 6.86166L4.94109 4.0019Z"
|
|
33263
33257
|
})
|
|
33264
33258
|
});
|
|
@@ -33319,13 +33313,10 @@ const FormField = ({
|
|
|
33319
33313
|
};
|
|
33320
33314
|
const handleChange = newValue => {
|
|
33321
33315
|
let nValue;
|
|
33322
|
-
if (newValue instanceof Object &&
|
|
33323
|
-
// eslint-disable-next-line no-extra-parens
|
|
33324
|
-
newValue.paramsOnChange) {
|
|
33316
|
+
if (newValue instanceof Object && newValue.paramsOnChange) {
|
|
33325
33317
|
const phoneValue = newValue;
|
|
33326
33318
|
nValue = {
|
|
33327
33319
|
value: phoneValue.value,
|
|
33328
|
-
// eslint-disable-next-line no-extra-parens
|
|
33329
33320
|
dialCode: phoneValue.paramsOnChange.dialCode
|
|
33330
33321
|
};
|
|
33331
33322
|
} else {
|
|
@@ -33343,17 +33334,13 @@ const FormField = ({
|
|
|
33343
33334
|
};
|
|
33344
33335
|
const fieldValue = useMemo(() => {
|
|
33345
33336
|
if (value === null) return undefined;
|
|
33346
|
-
if (typeof value === 'object' && !(value instanceof Date) &&
|
|
33347
|
-
// eslint-disable-next-line no-extra-parens
|
|
33348
|
-
value.dialCode) {
|
|
33337
|
+
if (typeof value === 'object' && !(value instanceof Date) && value.dialCode) {
|
|
33349
33338
|
const phoneValue = value;
|
|
33350
33339
|
return `${phoneValue.dialCode || '52'}${phoneValue.value}`;
|
|
33351
33340
|
}
|
|
33352
33341
|
return value || '';
|
|
33353
33342
|
}, [value]);
|
|
33354
33343
|
const fieldLabel = type !== 'file' ? label : labelInputFile;
|
|
33355
|
-
|
|
33356
|
-
/* eslint-disable indent */
|
|
33357
33344
|
const helpTextObj = helpText ? {
|
|
33358
33345
|
icon: {
|
|
33359
33346
|
icon: iconHelperText || InfoIcon,
|
|
@@ -33361,8 +33348,6 @@ const FormField = ({
|
|
|
33361
33348
|
},
|
|
33362
33349
|
message: helpText
|
|
33363
33350
|
} : undefined;
|
|
33364
|
-
/* eslint-enable indent */
|
|
33365
|
-
|
|
33366
33351
|
const typeField = type === 'text' || type === 'number' ? type : undefined;
|
|
33367
33352
|
const selected = type === 'select' && typeof value === 'string' ? [value] : value;
|
|
33368
33353
|
const fieldMarkup = /*#__PURE__*/jsx("div", {
|
|
@@ -33436,14 +33421,10 @@ function Form$1({
|
|
|
33436
33421
|
const handleChange = (name, newValue) => {
|
|
33437
33422
|
if (data) {
|
|
33438
33423
|
let nData = structuredClone(data);
|
|
33439
|
-
if (newValue instanceof Object &&
|
|
33440
|
-
// eslint-disable-next-line no-extra-parens
|
|
33441
|
-
newValue.dialCode) {
|
|
33424
|
+
if (newValue instanceof Object && newValue.dialCode) {
|
|
33442
33425
|
nData = {
|
|
33443
33426
|
...nData,
|
|
33444
|
-
// eslint-disable-next-line no-extra-parens
|
|
33445
33427
|
countryCode: newValue.dialCode,
|
|
33446
|
-
// eslint-disable-next-line no-extra-parens
|
|
33447
33428
|
cellphone: newValue.value
|
|
33448
33429
|
};
|
|
33449
33430
|
} else {
|
|
@@ -37647,6 +37628,241 @@ function requireDist () {
|
|
|
37647
37628
|
|
|
37648
37629
|
requireDist();
|
|
37649
37630
|
|
|
37631
|
+
var setCookie = {exports: {}};
|
|
37632
|
+
|
|
37633
|
+
var hasRequiredSetCookie;
|
|
37634
|
+
|
|
37635
|
+
function requireSetCookie () {
|
|
37636
|
+
if (hasRequiredSetCookie) return setCookie.exports;
|
|
37637
|
+
hasRequiredSetCookie = 1;
|
|
37638
|
+
|
|
37639
|
+
var defaultParseOptions = {
|
|
37640
|
+
decodeValues: true,
|
|
37641
|
+
map: false,
|
|
37642
|
+
silent: false,
|
|
37643
|
+
};
|
|
37644
|
+
|
|
37645
|
+
function isNonEmptyString(str) {
|
|
37646
|
+
return typeof str === "string" && !!str.trim();
|
|
37647
|
+
}
|
|
37648
|
+
|
|
37649
|
+
function parseString(setCookieValue, options) {
|
|
37650
|
+
var parts = setCookieValue.split(";").filter(isNonEmptyString);
|
|
37651
|
+
|
|
37652
|
+
var nameValuePairStr = parts.shift();
|
|
37653
|
+
var parsed = parseNameValuePair(nameValuePairStr);
|
|
37654
|
+
var name = parsed.name;
|
|
37655
|
+
var value = parsed.value;
|
|
37656
|
+
|
|
37657
|
+
options = options
|
|
37658
|
+
? Object.assign({}, defaultParseOptions, options)
|
|
37659
|
+
: defaultParseOptions;
|
|
37660
|
+
|
|
37661
|
+
try {
|
|
37662
|
+
value = options.decodeValues ? decodeURIComponent(value) : value; // decode cookie value
|
|
37663
|
+
} catch (e) {
|
|
37664
|
+
console.error(
|
|
37665
|
+
"set-cookie-parser encountered an error while decoding a cookie with value '" +
|
|
37666
|
+
value +
|
|
37667
|
+
"'. Set options.decodeValues to false to disable this feature.",
|
|
37668
|
+
e
|
|
37669
|
+
);
|
|
37670
|
+
}
|
|
37671
|
+
|
|
37672
|
+
var cookie = {
|
|
37673
|
+
name: name,
|
|
37674
|
+
value: value,
|
|
37675
|
+
};
|
|
37676
|
+
|
|
37677
|
+
parts.forEach(function (part) {
|
|
37678
|
+
var sides = part.split("=");
|
|
37679
|
+
var key = sides.shift().trimLeft().toLowerCase();
|
|
37680
|
+
var value = sides.join("=");
|
|
37681
|
+
if (key === "expires") {
|
|
37682
|
+
cookie.expires = new Date(value);
|
|
37683
|
+
} else if (key === "max-age") {
|
|
37684
|
+
cookie.maxAge = parseInt(value, 10);
|
|
37685
|
+
} else if (key === "secure") {
|
|
37686
|
+
cookie.secure = true;
|
|
37687
|
+
} else if (key === "httponly") {
|
|
37688
|
+
cookie.httpOnly = true;
|
|
37689
|
+
} else if (key === "samesite") {
|
|
37690
|
+
cookie.sameSite = value;
|
|
37691
|
+
} else if (key === "partitioned") {
|
|
37692
|
+
cookie.partitioned = true;
|
|
37693
|
+
} else {
|
|
37694
|
+
cookie[key] = value;
|
|
37695
|
+
}
|
|
37696
|
+
});
|
|
37697
|
+
|
|
37698
|
+
return cookie;
|
|
37699
|
+
}
|
|
37700
|
+
|
|
37701
|
+
function parseNameValuePair(nameValuePairStr) {
|
|
37702
|
+
// Parses name-value-pair according to rfc6265bis draft
|
|
37703
|
+
|
|
37704
|
+
var name = "";
|
|
37705
|
+
var value = "";
|
|
37706
|
+
var nameValueArr = nameValuePairStr.split("=");
|
|
37707
|
+
if (nameValueArr.length > 1) {
|
|
37708
|
+
name = nameValueArr.shift();
|
|
37709
|
+
value = nameValueArr.join("="); // everything after the first =, joined by a "=" if there was more than one part
|
|
37710
|
+
} else {
|
|
37711
|
+
value = nameValuePairStr;
|
|
37712
|
+
}
|
|
37713
|
+
|
|
37714
|
+
return { name: name, value: value };
|
|
37715
|
+
}
|
|
37716
|
+
|
|
37717
|
+
function parse(input, options) {
|
|
37718
|
+
options = options
|
|
37719
|
+
? Object.assign({}, defaultParseOptions, options)
|
|
37720
|
+
: defaultParseOptions;
|
|
37721
|
+
|
|
37722
|
+
if (!input) {
|
|
37723
|
+
if (!options.map) {
|
|
37724
|
+
return [];
|
|
37725
|
+
} else {
|
|
37726
|
+
return {};
|
|
37727
|
+
}
|
|
37728
|
+
}
|
|
37729
|
+
|
|
37730
|
+
if (input.headers) {
|
|
37731
|
+
if (typeof input.headers.getSetCookie === "function") {
|
|
37732
|
+
// for fetch responses - they combine headers of the same type in the headers array,
|
|
37733
|
+
// but getSetCookie returns an uncombined array
|
|
37734
|
+
input = input.headers.getSetCookie();
|
|
37735
|
+
} else if (input.headers["set-cookie"]) {
|
|
37736
|
+
// fast-path for node.js (which automatically normalizes header names to lower-case
|
|
37737
|
+
input = input.headers["set-cookie"];
|
|
37738
|
+
} else {
|
|
37739
|
+
// slow-path for other environments - see #25
|
|
37740
|
+
var sch =
|
|
37741
|
+
input.headers[
|
|
37742
|
+
Object.keys(input.headers).find(function (key) {
|
|
37743
|
+
return key.toLowerCase() === "set-cookie";
|
|
37744
|
+
})
|
|
37745
|
+
];
|
|
37746
|
+
// warn if called on a request-like object with a cookie header rather than a set-cookie header - see #34, 36
|
|
37747
|
+
if (!sch && input.headers.cookie && !options.silent) {
|
|
37748
|
+
console.warn(
|
|
37749
|
+
"Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."
|
|
37750
|
+
);
|
|
37751
|
+
}
|
|
37752
|
+
input = sch;
|
|
37753
|
+
}
|
|
37754
|
+
}
|
|
37755
|
+
if (!Array.isArray(input)) {
|
|
37756
|
+
input = [input];
|
|
37757
|
+
}
|
|
37758
|
+
|
|
37759
|
+
if (!options.map) {
|
|
37760
|
+
return input.filter(isNonEmptyString).map(function (str) {
|
|
37761
|
+
return parseString(str, options);
|
|
37762
|
+
});
|
|
37763
|
+
} else {
|
|
37764
|
+
var cookies = {};
|
|
37765
|
+
return input.filter(isNonEmptyString).reduce(function (cookies, str) {
|
|
37766
|
+
var cookie = parseString(str, options);
|
|
37767
|
+
cookies[cookie.name] = cookie;
|
|
37768
|
+
return cookies;
|
|
37769
|
+
}, cookies);
|
|
37770
|
+
}
|
|
37771
|
+
}
|
|
37772
|
+
|
|
37773
|
+
/*
|
|
37774
|
+
Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas
|
|
37775
|
+
that are within a single set-cookie field-value, such as in the Expires portion.
|
|
37776
|
+
|
|
37777
|
+
This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2
|
|
37778
|
+
Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128
|
|
37779
|
+
React Native's fetch does this for *every* header, including set-cookie.
|
|
37780
|
+
|
|
37781
|
+
Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25
|
|
37782
|
+
Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation
|
|
37783
|
+
*/
|
|
37784
|
+
function splitCookiesString(cookiesString) {
|
|
37785
|
+
if (Array.isArray(cookiesString)) {
|
|
37786
|
+
return cookiesString;
|
|
37787
|
+
}
|
|
37788
|
+
if (typeof cookiesString !== "string") {
|
|
37789
|
+
return [];
|
|
37790
|
+
}
|
|
37791
|
+
|
|
37792
|
+
var cookiesStrings = [];
|
|
37793
|
+
var pos = 0;
|
|
37794
|
+
var start;
|
|
37795
|
+
var ch;
|
|
37796
|
+
var lastComma;
|
|
37797
|
+
var nextStart;
|
|
37798
|
+
var cookiesSeparatorFound;
|
|
37799
|
+
|
|
37800
|
+
function skipWhitespace() {
|
|
37801
|
+
while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
|
|
37802
|
+
pos += 1;
|
|
37803
|
+
}
|
|
37804
|
+
return pos < cookiesString.length;
|
|
37805
|
+
}
|
|
37806
|
+
|
|
37807
|
+
function notSpecialChar() {
|
|
37808
|
+
ch = cookiesString.charAt(pos);
|
|
37809
|
+
|
|
37810
|
+
return ch !== "=" && ch !== ";" && ch !== ",";
|
|
37811
|
+
}
|
|
37812
|
+
|
|
37813
|
+
while (pos < cookiesString.length) {
|
|
37814
|
+
start = pos;
|
|
37815
|
+
cookiesSeparatorFound = false;
|
|
37816
|
+
|
|
37817
|
+
while (skipWhitespace()) {
|
|
37818
|
+
ch = cookiesString.charAt(pos);
|
|
37819
|
+
if (ch === ",") {
|
|
37820
|
+
// ',' is a cookie separator if we have later first '=', not ';' or ','
|
|
37821
|
+
lastComma = pos;
|
|
37822
|
+
pos += 1;
|
|
37823
|
+
|
|
37824
|
+
skipWhitespace();
|
|
37825
|
+
nextStart = pos;
|
|
37826
|
+
|
|
37827
|
+
while (pos < cookiesString.length && notSpecialChar()) {
|
|
37828
|
+
pos += 1;
|
|
37829
|
+
}
|
|
37830
|
+
|
|
37831
|
+
// currently special character
|
|
37832
|
+
if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
|
|
37833
|
+
// we found cookies separator
|
|
37834
|
+
cookiesSeparatorFound = true;
|
|
37835
|
+
// pos is inside the next cookie, so back up and return it.
|
|
37836
|
+
pos = nextStart;
|
|
37837
|
+
cookiesStrings.push(cookiesString.substring(start, lastComma));
|
|
37838
|
+
start = pos;
|
|
37839
|
+
} else {
|
|
37840
|
+
// in param ',' or param separator ';',
|
|
37841
|
+
// we continue from that comma
|
|
37842
|
+
pos = lastComma + 1;
|
|
37843
|
+
}
|
|
37844
|
+
} else {
|
|
37845
|
+
pos += 1;
|
|
37846
|
+
}
|
|
37847
|
+
}
|
|
37848
|
+
|
|
37849
|
+
if (!cookiesSeparatorFound || pos >= cookiesString.length) {
|
|
37850
|
+
cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
|
|
37851
|
+
}
|
|
37852
|
+
}
|
|
37853
|
+
|
|
37854
|
+
return cookiesStrings;
|
|
37855
|
+
}
|
|
37856
|
+
|
|
37857
|
+
setCookie.exports = parse;
|
|
37858
|
+
setCookie.exports.parse = parse;
|
|
37859
|
+
setCookie.exports.parseString = parseString;
|
|
37860
|
+
setCookie.exports.splitCookiesString = splitCookiesString;
|
|
37861
|
+
return setCookie.exports;
|
|
37862
|
+
}
|
|
37863
|
+
|
|
37864
|
+
requireSetCookie();
|
|
37865
|
+
|
|
37650
37866
|
/**
|
|
37651
37867
|
* react-router v7.6.2
|
|
37652
37868
|
*
|