@popsure/dirty-swan 0.27.27 → 0.27.28
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.js +4 -60
- package/dist/index.js.map +1 -1
- package/package.json +2 -3
- package/src/lib/components/input/index.tsx +6 -3
package/dist/index.js
CHANGED
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var require$$0 = require('react');
|
|
7
|
-
var crypto = require('crypto');
|
|
8
7
|
var require$$1 = require('react-dom');
|
|
9
8
|
var path = require('path');
|
|
10
9
|
var require$$2 = require('querystring');
|
|
@@ -12,7 +11,6 @@ var require$$2 = require('querystring');
|
|
|
12
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
12
|
|
|
14
13
|
var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
|
|
15
|
-
var crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto);
|
|
16
14
|
var require$$1__default = /*#__PURE__*/_interopDefaultLegacy(require$$1);
|
|
17
15
|
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
|
|
18
16
|
var require$$2__default = /*#__PURE__*/_interopDefaultLegacy(require$$2);
|
|
@@ -5153,71 +5151,17 @@ module.exports = isEqual;
|
|
|
5153
5151
|
|
|
5154
5152
|
var isEqual = lodash_isequal.exports;
|
|
5155
5153
|
|
|
5156
|
-
const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate
|
|
5157
|
-
|
|
5158
|
-
let poolPtr = rnds8Pool.length;
|
|
5159
|
-
function rng() {
|
|
5160
|
-
if (poolPtr > rnds8Pool.length - 16) {
|
|
5161
|
-
crypto__default['default'].randomFillSync(rnds8Pool);
|
|
5162
|
-
poolPtr = 0;
|
|
5163
|
-
}
|
|
5164
|
-
|
|
5165
|
-
return rnds8Pool.slice(poolPtr, poolPtr += 16);
|
|
5166
|
-
}
|
|
5167
|
-
|
|
5168
|
-
/**
|
|
5169
|
-
* Convert array of 16 byte values to UUID string format of the form:
|
|
5170
|
-
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
5171
|
-
*/
|
|
5172
|
-
|
|
5173
|
-
const byteToHex = [];
|
|
5174
|
-
|
|
5175
|
-
for (let i = 0; i < 256; ++i) {
|
|
5176
|
-
byteToHex.push((i + 0x100).toString(16).slice(1));
|
|
5177
|
-
}
|
|
5178
|
-
|
|
5179
|
-
function unsafeStringify(arr, offset = 0) {
|
|
5180
|
-
// Note: Be careful editing this code! It's been tuned for performance
|
|
5181
|
-
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
5182
|
-
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
5183
|
-
}
|
|
5184
|
-
|
|
5185
|
-
var native = {
|
|
5186
|
-
randomUUID: crypto__default['default'].randomUUID
|
|
5187
|
-
};
|
|
5188
|
-
|
|
5189
|
-
function v4(options, buf, offset) {
|
|
5190
|
-
if (native.randomUUID && !buf && !options) {
|
|
5191
|
-
return native.randomUUID();
|
|
5192
|
-
}
|
|
5193
|
-
|
|
5194
|
-
options = options || {};
|
|
5195
|
-
const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
5196
|
-
|
|
5197
|
-
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
5198
|
-
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
5199
|
-
|
|
5200
|
-
if (buf) {
|
|
5201
|
-
offset = offset || 0;
|
|
5202
|
-
|
|
5203
|
-
for (let i = 0; i < 16; ++i) {
|
|
5204
|
-
buf[offset + i] = rnds[i];
|
|
5205
|
-
}
|
|
5206
|
-
|
|
5207
|
-
return buf;
|
|
5208
|
-
}
|
|
5209
|
-
|
|
5210
|
-
return unsafeStringify(rnds);
|
|
5211
|
-
}
|
|
5212
|
-
|
|
5213
5154
|
var css_248z$p = ".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.style-module_label--hidden__1e9iX {\n visibility: hidden;\n height: 0;\n margin: 0;\n}\n\n.style-module_error__167Zc {\n margin-top: 4px;\n}";
|
|
5214
5155
|
var styles$o = {"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","label--hidden":"style-module_label--hidden__1e9iX","error":"style-module_error__167Zc"};
|
|
5215
5156
|
styleInject(css_248z$p);
|
|
5216
5157
|
|
|
5158
|
+
var generateUniqueId = function () {
|
|
5159
|
+
return "input-id-" + Math.floor(Math.random() * 10000000);
|
|
5160
|
+
};
|
|
5217
5161
|
var Input = require$$0__default['default'].forwardRef(function (_a, ref) {
|
|
5218
5162
|
var _b, _c, _d, _e, _f, _g;
|
|
5219
5163
|
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"]);
|
|
5220
|
-
var uniqueId = id !== null && id !== void 0 ? id :
|
|
5164
|
+
var uniqueId = require$$0.useState(id !== null && id !== void 0 ? id : generateUniqueId())[0];
|
|
5221
5165
|
return (jsxRuntime.jsxs("div", __assign({ className: styles$o.container + " " + (className !== null && className !== void 0 ? className : '') }, { children: [label && (jsxRuntime.jsx("label", __assign({ htmlFor: uniqueId, className: classNames('p-p', styles$o.label, (_b = {},
|
|
5222
5166
|
_b[styles$o['label--with-error']] = error,
|
|
5223
5167
|
_b[styles$o['label--hidden']] = hideLabel,
|