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.cjs.js
CHANGED
|
@@ -4611,7 +4611,7 @@ function formatFileSize(bytes) {
|
|
|
4611
4611
|
}
|
|
4612
4612
|
return `${size.toFixed(2)} ${units[unitIndex]}`;
|
|
4613
4613
|
}
|
|
4614
|
-
|
|
4614
|
+
|
|
4615
4615
|
// code end
|
|
4616
4616
|
|
|
4617
4617
|
const cssClassName = (mainClass, ...classes) => {
|
|
@@ -18414,7 +18414,7 @@ const TimeSelector = ({
|
|
|
18414
18414
|
onChange(newValue);
|
|
18415
18415
|
}
|
|
18416
18416
|
};
|
|
18417
|
-
const handleFocusField =
|
|
18417
|
+
const handleFocusField = () => {
|
|
18418
18418
|
if (!disabled && !readOnly && !isActive) {
|
|
18419
18419
|
toggleTimePicker();
|
|
18420
18420
|
setIsFocused(true);
|
|
@@ -18643,7 +18643,6 @@ const AlphaZipCodeInput = ({
|
|
|
18643
18643
|
setShowPopover(Boolean(value && value?.length === 5 && items));
|
|
18644
18644
|
if (onFocus) onFocus();
|
|
18645
18645
|
};
|
|
18646
|
-
// eslint-disable-next-line max-len
|
|
18647
18646
|
const handleOnChange = event => {
|
|
18648
18647
|
const isValid = /^[0-9]+$/i.test(event.target.value) || event.target.value === '';
|
|
18649
18648
|
if (isValid && onChange) {
|
|
@@ -32389,9 +32388,7 @@ const Filedrop = ({
|
|
|
32389
32388
|
let encodeFile = null;
|
|
32390
32389
|
if (isGzip) {
|
|
32391
32390
|
const newFile = await readFileAsDataURL(file);
|
|
32392
|
-
const f = newFile ?
|
|
32393
|
-
// eslint-disable-next-line no-extra-parens
|
|
32394
|
-
newFile : new ArrayBuffer(0);
|
|
32391
|
+
const f = newFile ? newFile : new ArrayBuffer(0);
|
|
32395
32392
|
const input = new Uint8Array(f);
|
|
32396
32393
|
const output = pako.gzip(input);
|
|
32397
32394
|
const nF = new File([output], 'archivo.gz', {
|
|
@@ -33201,7 +33198,6 @@ const TrashIcon = () => /*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
|
33201
33198
|
strokeLinecap: "round",
|
|
33202
33199
|
strokeLinejoin: "round"
|
|
33203
33200
|
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
33204
|
-
// eslint-disable-next-line max-len
|
|
33205
33201
|
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",
|
|
33206
33202
|
strokeWidth: "2",
|
|
33207
33203
|
strokeLinecap: "round",
|
|
@@ -33276,9 +33272,7 @@ const XIcon = () => /*#__PURE__*/jsxRuntime.jsx("svg", {
|
|
|
33276
33272
|
fill: "none",
|
|
33277
33273
|
children: /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
33278
33274
|
fillRule: "evenodd",
|
|
33279
|
-
clipRule: "evenodd"
|
|
33280
|
-
// eslint-disable-next-line max-len
|
|
33281
|
-
,
|
|
33275
|
+
clipRule: "evenodd",
|
|
33282
33276
|
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"
|
|
33283
33277
|
})
|
|
33284
33278
|
});
|
|
@@ -33339,13 +33333,10 @@ const FormField = ({
|
|
|
33339
33333
|
};
|
|
33340
33334
|
const handleChange = newValue => {
|
|
33341
33335
|
let nValue;
|
|
33342
|
-
if (newValue instanceof Object &&
|
|
33343
|
-
// eslint-disable-next-line no-extra-parens
|
|
33344
|
-
newValue.paramsOnChange) {
|
|
33336
|
+
if (newValue instanceof Object && newValue.paramsOnChange) {
|
|
33345
33337
|
const phoneValue = newValue;
|
|
33346
33338
|
nValue = {
|
|
33347
33339
|
value: phoneValue.value,
|
|
33348
|
-
// eslint-disable-next-line no-extra-parens
|
|
33349
33340
|
dialCode: phoneValue.paramsOnChange.dialCode
|
|
33350
33341
|
};
|
|
33351
33342
|
} else {
|
|
@@ -33363,17 +33354,13 @@ const FormField = ({
|
|
|
33363
33354
|
};
|
|
33364
33355
|
const fieldValue = React2.useMemo(() => {
|
|
33365
33356
|
if (value === null) return undefined;
|
|
33366
|
-
if (typeof value === 'object' && !(value instanceof Date) &&
|
|
33367
|
-
// eslint-disable-next-line no-extra-parens
|
|
33368
|
-
value.dialCode) {
|
|
33357
|
+
if (typeof value === 'object' && !(value instanceof Date) && value.dialCode) {
|
|
33369
33358
|
const phoneValue = value;
|
|
33370
33359
|
return `${phoneValue.dialCode || '52'}${phoneValue.value}`;
|
|
33371
33360
|
}
|
|
33372
33361
|
return value || '';
|
|
33373
33362
|
}, [value]);
|
|
33374
33363
|
const fieldLabel = type !== 'file' ? label : labelInputFile;
|
|
33375
|
-
|
|
33376
|
-
/* eslint-disable indent */
|
|
33377
33364
|
const helpTextObj = helpText ? {
|
|
33378
33365
|
icon: {
|
|
33379
33366
|
icon: iconHelperText || InfoIcon,
|
|
@@ -33381,8 +33368,6 @@ const FormField = ({
|
|
|
33381
33368
|
},
|
|
33382
33369
|
message: helpText
|
|
33383
33370
|
} : undefined;
|
|
33384
|
-
/* eslint-enable indent */
|
|
33385
|
-
|
|
33386
33371
|
const typeField = type === 'text' || type === 'number' ? type : undefined;
|
|
33387
33372
|
const selected = type === 'select' && typeof value === 'string' ? [value] : value;
|
|
33388
33373
|
const fieldMarkup = /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -33456,14 +33441,10 @@ function Form$1({
|
|
|
33456
33441
|
const handleChange = (name, newValue) => {
|
|
33457
33442
|
if (data) {
|
|
33458
33443
|
let nData = structuredClone(data);
|
|
33459
|
-
if (newValue instanceof Object &&
|
|
33460
|
-
// eslint-disable-next-line no-extra-parens
|
|
33461
|
-
newValue.dialCode) {
|
|
33444
|
+
if (newValue instanceof Object && newValue.dialCode) {
|
|
33462
33445
|
nData = {
|
|
33463
33446
|
...nData,
|
|
33464
|
-
// eslint-disable-next-line no-extra-parens
|
|
33465
33447
|
countryCode: newValue.dialCode,
|
|
33466
|
-
// eslint-disable-next-line no-extra-parens
|
|
33467
33448
|
cellphone: newValue.value
|
|
33468
33449
|
};
|
|
33469
33450
|
} else {
|
|
@@ -37667,6 +37648,241 @@ function requireDist () {
|
|
|
37667
37648
|
|
|
37668
37649
|
requireDist();
|
|
37669
37650
|
|
|
37651
|
+
var setCookie = {exports: {}};
|
|
37652
|
+
|
|
37653
|
+
var hasRequiredSetCookie;
|
|
37654
|
+
|
|
37655
|
+
function requireSetCookie () {
|
|
37656
|
+
if (hasRequiredSetCookie) return setCookie.exports;
|
|
37657
|
+
hasRequiredSetCookie = 1;
|
|
37658
|
+
|
|
37659
|
+
var defaultParseOptions = {
|
|
37660
|
+
decodeValues: true,
|
|
37661
|
+
map: false,
|
|
37662
|
+
silent: false,
|
|
37663
|
+
};
|
|
37664
|
+
|
|
37665
|
+
function isNonEmptyString(str) {
|
|
37666
|
+
return typeof str === "string" && !!str.trim();
|
|
37667
|
+
}
|
|
37668
|
+
|
|
37669
|
+
function parseString(setCookieValue, options) {
|
|
37670
|
+
var parts = setCookieValue.split(";").filter(isNonEmptyString);
|
|
37671
|
+
|
|
37672
|
+
var nameValuePairStr = parts.shift();
|
|
37673
|
+
var parsed = parseNameValuePair(nameValuePairStr);
|
|
37674
|
+
var name = parsed.name;
|
|
37675
|
+
var value = parsed.value;
|
|
37676
|
+
|
|
37677
|
+
options = options
|
|
37678
|
+
? Object.assign({}, defaultParseOptions, options)
|
|
37679
|
+
: defaultParseOptions;
|
|
37680
|
+
|
|
37681
|
+
try {
|
|
37682
|
+
value = options.decodeValues ? decodeURIComponent(value) : value; // decode cookie value
|
|
37683
|
+
} catch (e) {
|
|
37684
|
+
console.error(
|
|
37685
|
+
"set-cookie-parser encountered an error while decoding a cookie with value '" +
|
|
37686
|
+
value +
|
|
37687
|
+
"'. Set options.decodeValues to false to disable this feature.",
|
|
37688
|
+
e
|
|
37689
|
+
);
|
|
37690
|
+
}
|
|
37691
|
+
|
|
37692
|
+
var cookie = {
|
|
37693
|
+
name: name,
|
|
37694
|
+
value: value,
|
|
37695
|
+
};
|
|
37696
|
+
|
|
37697
|
+
parts.forEach(function (part) {
|
|
37698
|
+
var sides = part.split("=");
|
|
37699
|
+
var key = sides.shift().trimLeft().toLowerCase();
|
|
37700
|
+
var value = sides.join("=");
|
|
37701
|
+
if (key === "expires") {
|
|
37702
|
+
cookie.expires = new Date(value);
|
|
37703
|
+
} else if (key === "max-age") {
|
|
37704
|
+
cookie.maxAge = parseInt(value, 10);
|
|
37705
|
+
} else if (key === "secure") {
|
|
37706
|
+
cookie.secure = true;
|
|
37707
|
+
} else if (key === "httponly") {
|
|
37708
|
+
cookie.httpOnly = true;
|
|
37709
|
+
} else if (key === "samesite") {
|
|
37710
|
+
cookie.sameSite = value;
|
|
37711
|
+
} else if (key === "partitioned") {
|
|
37712
|
+
cookie.partitioned = true;
|
|
37713
|
+
} else {
|
|
37714
|
+
cookie[key] = value;
|
|
37715
|
+
}
|
|
37716
|
+
});
|
|
37717
|
+
|
|
37718
|
+
return cookie;
|
|
37719
|
+
}
|
|
37720
|
+
|
|
37721
|
+
function parseNameValuePair(nameValuePairStr) {
|
|
37722
|
+
// Parses name-value-pair according to rfc6265bis draft
|
|
37723
|
+
|
|
37724
|
+
var name = "";
|
|
37725
|
+
var value = "";
|
|
37726
|
+
var nameValueArr = nameValuePairStr.split("=");
|
|
37727
|
+
if (nameValueArr.length > 1) {
|
|
37728
|
+
name = nameValueArr.shift();
|
|
37729
|
+
value = nameValueArr.join("="); // everything after the first =, joined by a "=" if there was more than one part
|
|
37730
|
+
} else {
|
|
37731
|
+
value = nameValuePairStr;
|
|
37732
|
+
}
|
|
37733
|
+
|
|
37734
|
+
return { name: name, value: value };
|
|
37735
|
+
}
|
|
37736
|
+
|
|
37737
|
+
function parse(input, options) {
|
|
37738
|
+
options = options
|
|
37739
|
+
? Object.assign({}, defaultParseOptions, options)
|
|
37740
|
+
: defaultParseOptions;
|
|
37741
|
+
|
|
37742
|
+
if (!input) {
|
|
37743
|
+
if (!options.map) {
|
|
37744
|
+
return [];
|
|
37745
|
+
} else {
|
|
37746
|
+
return {};
|
|
37747
|
+
}
|
|
37748
|
+
}
|
|
37749
|
+
|
|
37750
|
+
if (input.headers) {
|
|
37751
|
+
if (typeof input.headers.getSetCookie === "function") {
|
|
37752
|
+
// for fetch responses - they combine headers of the same type in the headers array,
|
|
37753
|
+
// but getSetCookie returns an uncombined array
|
|
37754
|
+
input = input.headers.getSetCookie();
|
|
37755
|
+
} else if (input.headers["set-cookie"]) {
|
|
37756
|
+
// fast-path for node.js (which automatically normalizes header names to lower-case
|
|
37757
|
+
input = input.headers["set-cookie"];
|
|
37758
|
+
} else {
|
|
37759
|
+
// slow-path for other environments - see #25
|
|
37760
|
+
var sch =
|
|
37761
|
+
input.headers[
|
|
37762
|
+
Object.keys(input.headers).find(function (key) {
|
|
37763
|
+
return key.toLowerCase() === "set-cookie";
|
|
37764
|
+
})
|
|
37765
|
+
];
|
|
37766
|
+
// warn if called on a request-like object with a cookie header rather than a set-cookie header - see #34, 36
|
|
37767
|
+
if (!sch && input.headers.cookie && !options.silent) {
|
|
37768
|
+
console.warn(
|
|
37769
|
+
"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."
|
|
37770
|
+
);
|
|
37771
|
+
}
|
|
37772
|
+
input = sch;
|
|
37773
|
+
}
|
|
37774
|
+
}
|
|
37775
|
+
if (!Array.isArray(input)) {
|
|
37776
|
+
input = [input];
|
|
37777
|
+
}
|
|
37778
|
+
|
|
37779
|
+
if (!options.map) {
|
|
37780
|
+
return input.filter(isNonEmptyString).map(function (str) {
|
|
37781
|
+
return parseString(str, options);
|
|
37782
|
+
});
|
|
37783
|
+
} else {
|
|
37784
|
+
var cookies = {};
|
|
37785
|
+
return input.filter(isNonEmptyString).reduce(function (cookies, str) {
|
|
37786
|
+
var cookie = parseString(str, options);
|
|
37787
|
+
cookies[cookie.name] = cookie;
|
|
37788
|
+
return cookies;
|
|
37789
|
+
}, cookies);
|
|
37790
|
+
}
|
|
37791
|
+
}
|
|
37792
|
+
|
|
37793
|
+
/*
|
|
37794
|
+
Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas
|
|
37795
|
+
that are within a single set-cookie field-value, such as in the Expires portion.
|
|
37796
|
+
|
|
37797
|
+
This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2
|
|
37798
|
+
Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128
|
|
37799
|
+
React Native's fetch does this for *every* header, including set-cookie.
|
|
37800
|
+
|
|
37801
|
+
Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25
|
|
37802
|
+
Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation
|
|
37803
|
+
*/
|
|
37804
|
+
function splitCookiesString(cookiesString) {
|
|
37805
|
+
if (Array.isArray(cookiesString)) {
|
|
37806
|
+
return cookiesString;
|
|
37807
|
+
}
|
|
37808
|
+
if (typeof cookiesString !== "string") {
|
|
37809
|
+
return [];
|
|
37810
|
+
}
|
|
37811
|
+
|
|
37812
|
+
var cookiesStrings = [];
|
|
37813
|
+
var pos = 0;
|
|
37814
|
+
var start;
|
|
37815
|
+
var ch;
|
|
37816
|
+
var lastComma;
|
|
37817
|
+
var nextStart;
|
|
37818
|
+
var cookiesSeparatorFound;
|
|
37819
|
+
|
|
37820
|
+
function skipWhitespace() {
|
|
37821
|
+
while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
|
|
37822
|
+
pos += 1;
|
|
37823
|
+
}
|
|
37824
|
+
return pos < cookiesString.length;
|
|
37825
|
+
}
|
|
37826
|
+
|
|
37827
|
+
function notSpecialChar() {
|
|
37828
|
+
ch = cookiesString.charAt(pos);
|
|
37829
|
+
|
|
37830
|
+
return ch !== "=" && ch !== ";" && ch !== ",";
|
|
37831
|
+
}
|
|
37832
|
+
|
|
37833
|
+
while (pos < cookiesString.length) {
|
|
37834
|
+
start = pos;
|
|
37835
|
+
cookiesSeparatorFound = false;
|
|
37836
|
+
|
|
37837
|
+
while (skipWhitespace()) {
|
|
37838
|
+
ch = cookiesString.charAt(pos);
|
|
37839
|
+
if (ch === ",") {
|
|
37840
|
+
// ',' is a cookie separator if we have later first '=', not ';' or ','
|
|
37841
|
+
lastComma = pos;
|
|
37842
|
+
pos += 1;
|
|
37843
|
+
|
|
37844
|
+
skipWhitespace();
|
|
37845
|
+
nextStart = pos;
|
|
37846
|
+
|
|
37847
|
+
while (pos < cookiesString.length && notSpecialChar()) {
|
|
37848
|
+
pos += 1;
|
|
37849
|
+
}
|
|
37850
|
+
|
|
37851
|
+
// currently special character
|
|
37852
|
+
if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
|
|
37853
|
+
// we found cookies separator
|
|
37854
|
+
cookiesSeparatorFound = true;
|
|
37855
|
+
// pos is inside the next cookie, so back up and return it.
|
|
37856
|
+
pos = nextStart;
|
|
37857
|
+
cookiesStrings.push(cookiesString.substring(start, lastComma));
|
|
37858
|
+
start = pos;
|
|
37859
|
+
} else {
|
|
37860
|
+
// in param ',' or param separator ';',
|
|
37861
|
+
// we continue from that comma
|
|
37862
|
+
pos = lastComma + 1;
|
|
37863
|
+
}
|
|
37864
|
+
} else {
|
|
37865
|
+
pos += 1;
|
|
37866
|
+
}
|
|
37867
|
+
}
|
|
37868
|
+
|
|
37869
|
+
if (!cookiesSeparatorFound || pos >= cookiesString.length) {
|
|
37870
|
+
cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
|
|
37871
|
+
}
|
|
37872
|
+
}
|
|
37873
|
+
|
|
37874
|
+
return cookiesStrings;
|
|
37875
|
+
}
|
|
37876
|
+
|
|
37877
|
+
setCookie.exports = parse;
|
|
37878
|
+
setCookie.exports.parse = parse;
|
|
37879
|
+
setCookie.exports.parseString = parseString;
|
|
37880
|
+
setCookie.exports.splitCookiesString = splitCookiesString;
|
|
37881
|
+
return setCookie.exports;
|
|
37882
|
+
}
|
|
37883
|
+
|
|
37884
|
+
requireSetCookie();
|
|
37885
|
+
|
|
37670
37886
|
/**
|
|
37671
37887
|
* react-router v7.6.2
|
|
37672
37888
|
*
|