@popsure/dirty-swan 0.27.26 → 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 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 : v4();
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,
@@ -13680,7 +13624,7 @@ var ArrowIcon = function (_a) {
13680
13624
  return (jsxRuntime.jsx("svg", __assign({ width: "14", height: "8", viewBox: "0 0 14 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className }, { children: jsxRuntime.jsx("path", { d: "M1 1.00003L7 7.00003L13 1.00003", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, void 0) }), void 0));
13681
13625
  };
13682
13626
 
13683
- var css_248z$6 = ".style-module_container__3BxOi {\n position: absolute;\n width: 100%;\n padding: 0 16px;\n justify-content: space-between;\n z-index: 1;\n display: flex;\n}\n@media (min-width: 34rem) {\n .style-module_container__3BxOi {\n display: none;\n }\n}\n\n.style-module_next__3yJsi {\n transform: rotate(-90deg);\n}\n\n.style-module_prev__3rIR_ {\n transform: rotate(90deg);\n}\n\n.style-module_arrow__1tlbD {\n width: 32px;\n height: 32px;\n padding: 0;\n border-radius: 50%;\n background-color: #f5f5fa;\n justify-content: center;\n align-items: center;\n stroke: #e6e5ff;\n}\n.style-module_arrow__1tlbD:hover, .style-module_arrow__1tlbD:focus {\n background-color: #f5f5fa;\n cursor: not-allowed;\n}\n\n.style-module_active__2kklB {\n stroke: #8e8cee;\n}\n.style-module_active__2kklB:hover, .style-module_active__2kklB:focus {\n background-color: #f5f5fa;\n cursor: pointer;\n}";
13627
+ var css_248z$6 = ".style-module_container__3BxOi {\n position: absolute;\n width: 100%;\n height: 100%;\n padding: 0 16px;\n justify-content: space-between;\n align-items: center;\n z-index: 1;\n display: flex;\n}\n@media (min-width: 34rem) {\n .style-module_container__3BxOi {\n display: none;\n }\n}\n\n.style-module_next__3yJsi {\n transform: rotate(-90deg);\n}\n\n.style-module_prev__3rIR_ {\n transform: rotate(90deg);\n}\n\n.style-module_arrow__1tlbD {\n width: 32px;\n height: 32px;\n padding: 0;\n border-radius: 50%;\n background-color: #f5f5fa;\n justify-content: center;\n align-items: center;\n stroke: #e6e5ff;\n}\n.style-module_arrow__1tlbD:hover, .style-module_arrow__1tlbD:focus {\n background-color: #f5f5fa;\n cursor: not-allowed;\n}\n\n.style-module_active__2kklB {\n stroke: #8e8cee;\n}\n.style-module_active__2kklB:hover, .style-module_active__2kklB:focus {\n background-color: #f5f5fa;\n cursor: pointer;\n}";
13684
13628
  var styles$5 = {"container":"style-module_container__3BxOi","next":"style-module_next__3yJsi","prev":"style-module_prev__3rIR_","arrow":"style-module_arrow__1tlbD","active":"style-module_active__2kklB"};
13685
13629
  styleInject(css_248z$6);
13686
13630
 
@@ -13688,7 +13632,7 @@ var TableArrows = function (props) {
13688
13632
  var _a, _b;
13689
13633
  var active = props.active, onClick = props.onClick;
13690
13634
  var handleButtonClick = function (value) { return function () { return onClick(value); }; };
13691
- return (jsxRuntime.jsxs("div", __assign({ className: "mt24 " + styles$5.container }, { children: [jsxRuntime.jsx("button", __assign({ onClick: handleButtonClick('prev'), className: classNames("p-btn--secondary d-flex", styles$5.prev, styles$5.arrow, (_a = {},
13635
+ return (jsxRuntime.jsxs("div", __assign({ className: styles$5.container }, { children: [jsxRuntime.jsx("button", __assign({ onClick: handleButtonClick('prev'), className: classNames("p-btn--secondary d-flex", styles$5.prev, styles$5.arrow, (_a = {},
13692
13636
  _a[styles$5.active] = active.left,
13693
13637
  _a)) }, { children: jsxRuntime.jsx(ArrowIcon, {}, void 0) }), void 0),
13694
13638
  jsxRuntime.jsx("button", __assign({ onClick: handleButtonClick('next'), className: classNames("p-btn--secondary d-flex", styles$5.next, styles$5.arrow, (_b = {},
@@ -13886,13 +13830,13 @@ var ComparisonTable = function (props) {
13886
13830
  var idString = "headerGroup-" + headerGroup.id;
13887
13831
  return (jsxRuntime.jsx(jsxRuntime.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.exports.ScrollSyncPane, { children: jsxRuntime.jsx("div", __assign({ className: classNames(baseStyles.container, styles === null || styles === void 0 ? void 0 : styles.container, (_a = {},
13888
13832
  _a[baseStyles.noScrollBars] = hideScrollBars,
13889
- _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) }), idString)) : (jsxRuntime.jsx(dist.exports.ScrollSyncPane, { children: jsxRuntime.jsx("div", __assign({ className: classNames(baseStyles.container, styles === null || styles === void 0 ? void 0 : styles.container, (_b = {},
13890
- _b[baseStyles.noScrollBars] = hideScrollBars,
13891
- _b)) }, { children: jsxRuntime.jsx("div", __assign({ className: classNames(baseStyles['overflow-container']) }, { children: jsxRuntime.jsxs("div", __assign({ className: baseStyles['group-container'] }, { children: [
13892
- /**
13893
- * Print a table subheader if the `label` value is present
13894
- */
13895
- 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)) }, void 0));
13833
+ _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) }), idString)) : (jsxRuntime.jsx("div", { children: jsxRuntime.jsx(dist.exports.ScrollSyncPane, { children: jsxRuntime.jsx("div", __assign({ className: classNames(baseStyles.container, styles === null || styles === void 0 ? void 0 : styles.container, (_b = {},
13834
+ _b[baseStyles.noScrollBars] = hideScrollBars,
13835
+ _b)) }, { children: jsxRuntime.jsx("div", __assign({ className: classNames(baseStyles['overflow-container']) }, { children: jsxRuntime.jsxs("div", __assign({ className: baseStyles['group-container'] }, { children: [
13836
+ /**
13837
+ * Print a table subheader if the `label` value is present
13838
+ */
13839
+ 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)) }, void 0));
13896
13840
  }),
13897
13841
  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));
13898
13842
  };