@helpdice/ui 2.1.8 → 2.1.9

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.
Files changed (100) hide show
  1. package/dist/auto-complete/index.js +2147 -8
  2. package/dist/button/index.js +2 -2
  3. package/dist/carousal/index.js +2 -2
  4. package/dist/container/box.d.ts +42 -0
  5. package/dist/container/index.d.ts +2 -0
  6. package/dist/container/index.js +948 -0
  7. package/dist/copy-to-clipboard/clipboard.d.ts +13 -1
  8. package/dist/copy-to-clipboard/index.d.ts +1 -1
  9. package/dist/copy-to-clipboard/index.js +142 -157
  10. package/dist/grid/index.d.ts +2 -3
  11. package/dist/grid/index.js +0 -1
  12. package/dist/index.d.ts +3 -4
  13. package/dist/index.js +15389 -15350
  14. package/dist/input/index.d.ts +4 -0
  15. package/dist/input/index.js +2151 -9
  16. package/dist/input/phone-input/phone.d.ts +13 -0
  17. package/dist/modal/index.js +2 -2
  18. package/dist/placeholder/index.js +643 -8
  19. package/dist/table/index.js +3515 -1368
  20. package/dist/text/child.d.ts +1 -0
  21. package/dist/text/index.js +686 -8
  22. package/dist/text/text.d.ts +1 -0
  23. package/esm/button/button.js +2 -2
  24. package/esm/container/box.d.ts +42 -0
  25. package/esm/container/box.js +39 -0
  26. package/esm/container/index.d.ts +2 -0
  27. package/esm/container/index.js +2 -0
  28. package/esm/copy-to-clipboard/clipboard.d.ts +13 -1
  29. package/esm/copy-to-clipboard/clipboard.js +91 -0
  30. package/esm/copy-to-clipboard/index.d.ts +1 -1
  31. package/esm/copy-to-clipboard/index.js +1 -1
  32. package/esm/grid/index.d.ts +2 -3
  33. package/esm/grid/index.js +5 -3
  34. package/esm/index.d.ts +3 -4
  35. package/esm/index.js +4 -3
  36. package/esm/input/index.d.ts +4 -0
  37. package/esm/input/index.js +4 -0
  38. package/esm/input/phone-input/phone.d.ts +13 -0
  39. package/esm/input/phone-input/phone.js +166 -0
  40. package/esm/text/child.d.ts +1 -0
  41. package/esm/text/text.d.ts +1 -0
  42. package/esm/text/text.js +25 -3
  43. package/package.json +8 -15
  44. package/dist/currency-input/index.js +0 -862
  45. package/dist/phone-input/index.js +0 -2033
  46. package/dist/phone-input/phone.d.ts +0 -11
  47. package/esm/phone-input/phone.d.ts +0 -11
  48. package/esm/phone-input/phone.js +0 -161
  49. /package/dist/{currency-input → input/currency-input}/components/CurrencyInput.d.ts +0 -0
  50. /package/dist/{currency-input → input/currency-input}/components/CurrencyInputProps.d.ts +0 -0
  51. /package/dist/{currency-input → input/currency-input}/components/utils/cleanValue.d.ts +0 -0
  52. /package/dist/{currency-input → input/currency-input}/components/utils/escapeRegExp.d.ts +0 -0
  53. /package/dist/{currency-input → input/currency-input}/components/utils/fixedDecimalValue.d.ts +0 -0
  54. /package/dist/{currency-input → input/currency-input}/components/utils/formatValue.d.ts +0 -0
  55. /package/dist/{currency-input → input/currency-input}/components/utils/getLocaleConfig.d.ts +0 -0
  56. /package/dist/{currency-input → input/currency-input}/components/utils/getSuffix.d.ts +0 -0
  57. /package/dist/{currency-input → input/currency-input}/components/utils/index.d.ts +0 -0
  58. /package/dist/{currency-input → input/currency-input}/components/utils/isNumber.d.ts +0 -0
  59. /package/dist/{currency-input → input/currency-input}/components/utils/padTrimValue.d.ts +0 -0
  60. /package/dist/{currency-input → input/currency-input}/components/utils/parseAbbrValue.d.ts +0 -0
  61. /package/dist/{currency-input → input/currency-input}/components/utils/removeInvalidChars.d.ts +0 -0
  62. /package/dist/{currency-input → input/currency-input}/components/utils/removeSeparators.d.ts +0 -0
  63. /package/dist/{currency-input → input/currency-input}/components/utils/repositionCursor.d.ts +0 -0
  64. /package/dist/{currency-input → input/currency-input}/index.d.ts +0 -0
  65. /package/dist/{phone-input → input/phone-input}/index.d.ts +0 -0
  66. /package/esm/{currency-input → input/currency-input}/components/CurrencyInput.d.ts +0 -0
  67. /package/esm/{currency-input → input/currency-input}/components/CurrencyInput.js +0 -0
  68. /package/esm/{currency-input → input/currency-input}/components/CurrencyInputProps.d.ts +0 -0
  69. /package/esm/{currency-input → input/currency-input}/components/CurrencyInputProps.js +0 -0
  70. /package/esm/{currency-input → input/currency-input}/components/utils/addSeparators.js +0 -0
  71. /package/esm/{currency-input → input/currency-input}/components/utils/cleanValue.d.ts +0 -0
  72. /package/esm/{currency-input → input/currency-input}/components/utils/cleanValue.js +0 -0
  73. /package/esm/{currency-input → input/currency-input}/components/utils/escapeRegExp.d.ts +0 -0
  74. /package/esm/{currency-input → input/currency-input}/components/utils/escapeRegExp.js +0 -0
  75. /package/esm/{currency-input → input/currency-input}/components/utils/fixedDecimalValue.d.ts +0 -0
  76. /package/esm/{currency-input → input/currency-input}/components/utils/fixedDecimalValue.js +0 -0
  77. /package/esm/{currency-input → input/currency-input}/components/utils/formatValue.d.ts +0 -0
  78. /package/esm/{currency-input → input/currency-input}/components/utils/formatValue.js +0 -0
  79. /package/esm/{currency-input → input/currency-input}/components/utils/getLocaleConfig.d.ts +0 -0
  80. /package/esm/{currency-input → input/currency-input}/components/utils/getLocaleConfig.js +0 -0
  81. /package/esm/{currency-input → input/currency-input}/components/utils/getSuffix.d.ts +0 -0
  82. /package/esm/{currency-input → input/currency-input}/components/utils/getSuffix.js +0 -0
  83. /package/esm/{currency-input → input/currency-input}/components/utils/index.d.ts +0 -0
  84. /package/esm/{currency-input → input/currency-input}/components/utils/index.js +0 -0
  85. /package/esm/{currency-input → input/currency-input}/components/utils/isNumber.d.ts +0 -0
  86. /package/esm/{currency-input → input/currency-input}/components/utils/isNumber.js +0 -0
  87. /package/esm/{currency-input → input/currency-input}/components/utils/padTrimValue.d.ts +0 -0
  88. /package/esm/{currency-input → input/currency-input}/components/utils/padTrimValue.js +0 -0
  89. /package/esm/{currency-input → input/currency-input}/components/utils/parseAbbrValue.d.ts +0 -0
  90. /package/esm/{currency-input → input/currency-input}/components/utils/parseAbbrValue.js +0 -0
  91. /package/esm/{currency-input → input/currency-input}/components/utils/removeInvalidChars.d.ts +0 -0
  92. /package/esm/{currency-input → input/currency-input}/components/utils/removeInvalidChars.js +0 -0
  93. /package/esm/{currency-input → input/currency-input}/components/utils/removeSeparators.d.ts +0 -0
  94. /package/esm/{currency-input → input/currency-input}/components/utils/removeSeparators.js +0 -0
  95. /package/esm/{currency-input → input/currency-input}/components/utils/repositionCursor.d.ts +0 -0
  96. /package/esm/{currency-input → input/currency-input}/components/utils/repositionCursor.js +0 -0
  97. /package/esm/{currency-input → input/currency-input}/index.d.ts +0 -0
  98. /package/esm/{currency-input → input/currency-input}/index.js +0 -0
  99. /package/esm/{phone-input → input/phone-input}/index.d.ts +0 -0
  100. /package/esm/{phone-input → input/phone-input}/index.js +0 -0
@@ -0,0 +1,948 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React$1 = require('react');
6
+ var theme = require('@helpdice/theme');
7
+
8
+ function _arrayLikeToArray(r, a) {
9
+ (null == a || a > r.length) && (a = r.length);
10
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
11
+ return n;
12
+ }
13
+ function _createForOfIteratorHelper(r, e) {
14
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
15
+ if (!t) {
16
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) {
17
+ t && (r = t);
18
+ var n = 0,
19
+ F = function () {};
20
+ return {
21
+ s: F,
22
+ n: function () {
23
+ return n >= r.length ? {
24
+ done: true
25
+ } : {
26
+ done: false,
27
+ value: r[n++]
28
+ };
29
+ },
30
+ e: function (r) {
31
+ throw r;
32
+ },
33
+ f: F
34
+ };
35
+ }
36
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
37
+ }
38
+ var o,
39
+ a = true,
40
+ u = false;
41
+ return {
42
+ s: function () {
43
+ t = t.call(r);
44
+ },
45
+ n: function () {
46
+ var r = t.next();
47
+ return a = r.done, r;
48
+ },
49
+ e: function (r) {
50
+ u = true, o = r;
51
+ },
52
+ f: function () {
53
+ try {
54
+ a || null == t.return || t.return();
55
+ } finally {
56
+ if (u) throw o;
57
+ }
58
+ }
59
+ };
60
+ }
61
+ function _extends() {
62
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
63
+ for (var e = 1; e < arguments.length; e++) {
64
+ var t = arguments[e];
65
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
66
+ }
67
+ return n;
68
+ }, _extends.apply(null, arguments);
69
+ }
70
+ function _objectWithoutProperties(e, t) {
71
+ if (null == e) return {};
72
+ var o,
73
+ r,
74
+ i = _objectWithoutPropertiesLoose(e, t);
75
+ if (Object.getOwnPropertySymbols) {
76
+ var n = Object.getOwnPropertySymbols(e);
77
+ for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
78
+ }
79
+ return i;
80
+ }
81
+ function _objectWithoutPropertiesLoose(r, e) {
82
+ if (null == r) return {};
83
+ var t = {};
84
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
85
+ if (-1 !== e.indexOf(n)) continue;
86
+ t[n] = r[n];
87
+ }
88
+ return t;
89
+ }
90
+ function _unsupportedIterableToArray(r, a) {
91
+ if (r) {
92
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
93
+ var t = {}.toString.call(r).slice(8, -1);
94
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
95
+ }
96
+ }
97
+
98
+ function getDefaultExportFromCjs (x) {
99
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
100
+ }
101
+
102
+ var index = {};
103
+
104
+ var hasRequiredIndex;
105
+
106
+ function requireIndex () {
107
+ if (hasRequiredIndex) return index;
108
+ hasRequiredIndex = 1;
109
+ var React = React$1;
110
+
111
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
112
+
113
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
114
+
115
+ /*
116
+ Based on Glamor's sheet
117
+ https://github.com/threepointone/glamor/blob/667b480d31b3721a905021b26e1290ce92ca2879/src/sheet.js
118
+ */ function _defineProperties(target, props) {
119
+ for(var i = 0; i < props.length; i++){
120
+ var descriptor = props[i];
121
+ descriptor.enumerable = descriptor.enumerable || false;
122
+ descriptor.configurable = true;
123
+ if ("value" in descriptor) descriptor.writable = true;
124
+ Object.defineProperty(target, descriptor.key, descriptor);
125
+ }
126
+ }
127
+ function _createClass(Constructor, protoProps, staticProps) {
128
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
129
+ return Constructor;
130
+ }
131
+ var isProd = typeof process !== "undefined" && process.env && process.env.NODE_ENV === "production";
132
+ var isString = function(o) {
133
+ return Object.prototype.toString.call(o) === "[object String]";
134
+ };
135
+ var StyleSheet = /*#__PURE__*/ function() {
136
+ function StyleSheet(param) {
137
+ var ref = param === void 0 ? {} : param, _name = ref.name, name = _name === void 0 ? "stylesheet" : _name, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? isProd : _optimizeForSpeed;
138
+ invariant$1(isString(name), "`name` must be a string");
139
+ this._name = name;
140
+ this._deletedRulePlaceholder = "#" + name + "-deleted-rule____{}";
141
+ invariant$1(typeof optimizeForSpeed === "boolean", "`optimizeForSpeed` must be a boolean");
142
+ this._optimizeForSpeed = optimizeForSpeed;
143
+ this._serverSheet = undefined;
144
+ this._tags = [];
145
+ this._injected = false;
146
+ this._rulesCount = 0;
147
+ var node = typeof window !== "undefined" && document.querySelector('meta[property="csp-nonce"]');
148
+ this._nonce = node ? node.getAttribute("content") : null;
149
+ }
150
+ var _proto = StyleSheet.prototype;
151
+ _proto.setOptimizeForSpeed = function setOptimizeForSpeed(bool) {
152
+ invariant$1(typeof bool === "boolean", "`setOptimizeForSpeed` accepts a boolean");
153
+ invariant$1(this._rulesCount === 0, "optimizeForSpeed cannot be when rules have already been inserted");
154
+ this.flush();
155
+ this._optimizeForSpeed = bool;
156
+ this.inject();
157
+ };
158
+ _proto.isOptimizeForSpeed = function isOptimizeForSpeed() {
159
+ return this._optimizeForSpeed;
160
+ };
161
+ _proto.inject = function inject() {
162
+ var _this = this;
163
+ invariant$1(!this._injected, "sheet already injected");
164
+ this._injected = true;
165
+ if (typeof window !== "undefined" && this._optimizeForSpeed) {
166
+ this._tags[0] = this.makeStyleTag(this._name);
167
+ this._optimizeForSpeed = "insertRule" in this.getSheet();
168
+ if (!this._optimizeForSpeed) {
169
+ if (!isProd) {
170
+ console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode.");
171
+ }
172
+ this.flush();
173
+ this._injected = true;
174
+ }
175
+ return;
176
+ }
177
+ this._serverSheet = {
178
+ cssRules: [],
179
+ insertRule: function(rule, index) {
180
+ if (typeof index === "number") {
181
+ _this._serverSheet.cssRules[index] = {
182
+ cssText: rule
183
+ };
184
+ } else {
185
+ _this._serverSheet.cssRules.push({
186
+ cssText: rule
187
+ });
188
+ }
189
+ return index;
190
+ },
191
+ deleteRule: function(index) {
192
+ _this._serverSheet.cssRules[index] = null;
193
+ }
194
+ };
195
+ };
196
+ _proto.getSheetForTag = function getSheetForTag(tag) {
197
+ if (tag.sheet) {
198
+ return tag.sheet;
199
+ }
200
+ // this weirdness brought to you by firefox
201
+ for(var i = 0; i < document.styleSheets.length; i++){
202
+ if (document.styleSheets[i].ownerNode === tag) {
203
+ return document.styleSheets[i];
204
+ }
205
+ }
206
+ };
207
+ _proto.getSheet = function getSheet() {
208
+ return this.getSheetForTag(this._tags[this._tags.length - 1]);
209
+ };
210
+ _proto.insertRule = function insertRule(rule, index) {
211
+ invariant$1(isString(rule), "`insertRule` accepts only strings");
212
+ if (typeof window === "undefined") {
213
+ if (typeof index !== "number") {
214
+ index = this._serverSheet.cssRules.length;
215
+ }
216
+ this._serverSheet.insertRule(rule, index);
217
+ return this._rulesCount++;
218
+ }
219
+ if (this._optimizeForSpeed) {
220
+ var sheet = this.getSheet();
221
+ if (typeof index !== "number") {
222
+ index = sheet.cssRules.length;
223
+ }
224
+ // this weirdness for perf, and chrome's weird bug
225
+ // https://stackoverflow.com/questions/20007992/chrome-suddenly-stopped-accepting-insertrule
226
+ try {
227
+ sheet.insertRule(rule, index);
228
+ } catch (error) {
229
+ if (!isProd) {
230
+ console.warn("StyleSheet: illegal rule: \n\n" + rule + "\n\nSee https://stackoverflow.com/q/20007992 for more info");
231
+ }
232
+ return -1;
233
+ }
234
+ } else {
235
+ var insertionPoint = this._tags[index];
236
+ this._tags.push(this.makeStyleTag(this._name, rule, insertionPoint));
237
+ }
238
+ return this._rulesCount++;
239
+ };
240
+ _proto.replaceRule = function replaceRule(index, rule) {
241
+ if (this._optimizeForSpeed || typeof window === "undefined") {
242
+ var sheet = typeof window !== "undefined" ? this.getSheet() : this._serverSheet;
243
+ if (!rule.trim()) {
244
+ rule = this._deletedRulePlaceholder;
245
+ }
246
+ if (!sheet.cssRules[index]) {
247
+ // @TBD Should we throw an error?
248
+ return index;
249
+ }
250
+ sheet.deleteRule(index);
251
+ try {
252
+ sheet.insertRule(rule, index);
253
+ } catch (error) {
254
+ if (!isProd) {
255
+ console.warn("StyleSheet: illegal rule: \n\n" + rule + "\n\nSee https://stackoverflow.com/q/20007992 for more info");
256
+ }
257
+ // In order to preserve the indices we insert a deleteRulePlaceholder
258
+ sheet.insertRule(this._deletedRulePlaceholder, index);
259
+ }
260
+ } else {
261
+ var tag = this._tags[index];
262
+ invariant$1(tag, "old rule at index `" + index + "` not found");
263
+ tag.textContent = rule;
264
+ }
265
+ return index;
266
+ };
267
+ _proto.deleteRule = function deleteRule(index) {
268
+ if (typeof window === "undefined") {
269
+ this._serverSheet.deleteRule(index);
270
+ return;
271
+ }
272
+ if (this._optimizeForSpeed) {
273
+ this.replaceRule(index, "");
274
+ } else {
275
+ var tag = this._tags[index];
276
+ invariant$1(tag, "rule at index `" + index + "` not found");
277
+ tag.parentNode.removeChild(tag);
278
+ this._tags[index] = null;
279
+ }
280
+ };
281
+ _proto.flush = function flush() {
282
+ this._injected = false;
283
+ this._rulesCount = 0;
284
+ if (typeof window !== "undefined") {
285
+ this._tags.forEach(function(tag) {
286
+ return tag && tag.parentNode.removeChild(tag);
287
+ });
288
+ this._tags = [];
289
+ } else {
290
+ // simpler on server
291
+ this._serverSheet.cssRules = [];
292
+ }
293
+ };
294
+ _proto.cssRules = function cssRules() {
295
+ var _this = this;
296
+ if (typeof window === "undefined") {
297
+ return this._serverSheet.cssRules;
298
+ }
299
+ return this._tags.reduce(function(rules, tag) {
300
+ if (tag) {
301
+ rules = rules.concat(Array.prototype.map.call(_this.getSheetForTag(tag).cssRules, function(rule) {
302
+ return rule.cssText === _this._deletedRulePlaceholder ? null : rule;
303
+ }));
304
+ } else {
305
+ rules.push(null);
306
+ }
307
+ return rules;
308
+ }, []);
309
+ };
310
+ _proto.makeStyleTag = function makeStyleTag(name, cssString, relativeToTag) {
311
+ if (cssString) {
312
+ invariant$1(isString(cssString), "makeStyleTag accepts only strings as second parameter");
313
+ }
314
+ var tag = document.createElement("style");
315
+ if (this._nonce) tag.setAttribute("nonce", this._nonce);
316
+ tag.type = "text/css";
317
+ tag.setAttribute("data-" + name, "");
318
+ if (cssString) {
319
+ tag.appendChild(document.createTextNode(cssString));
320
+ }
321
+ var head = document.head || document.getElementsByTagName("head")[0];
322
+ if (relativeToTag) {
323
+ head.insertBefore(tag, relativeToTag);
324
+ } else {
325
+ head.appendChild(tag);
326
+ }
327
+ return tag;
328
+ };
329
+ _createClass(StyleSheet, [
330
+ {
331
+ key: "length",
332
+ get: function get() {
333
+ return this._rulesCount;
334
+ }
335
+ }
336
+ ]);
337
+ return StyleSheet;
338
+ }();
339
+ function invariant$1(condition, message) {
340
+ if (!condition) {
341
+ throw new Error("StyleSheet: " + message + ".");
342
+ }
343
+ }
344
+
345
+ function hash(str) {
346
+ var _$hash = 5381, i = str.length;
347
+ while(i){
348
+ _$hash = _$hash * 33 ^ str.charCodeAt(--i);
349
+ }
350
+ /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed
351
+ * integers. Since we want the results to be always positive, convert the
352
+ * signed int to an unsigned by doing an unsigned bitshift. */ return _$hash >>> 0;
353
+ }
354
+ var stringHash = hash;
355
+
356
+ var sanitize = function(rule) {
357
+ return rule.replace(/\/style/gi, "\\/style");
358
+ };
359
+ var cache = {};
360
+ /**
361
+ * computeId
362
+ *
363
+ * Compute and memoize a jsx id from a basedId and optionally props.
364
+ */ function computeId(baseId, props) {
365
+ if (!props) {
366
+ return "jsx-" + baseId;
367
+ }
368
+ var propsToString = String(props);
369
+ var key = baseId + propsToString;
370
+ if (!cache[key]) {
371
+ cache[key] = "jsx-" + stringHash(baseId + "-" + propsToString);
372
+ }
373
+ return cache[key];
374
+ }
375
+ /**
376
+ * computeSelector
377
+ *
378
+ * Compute and memoize dynamic selectors.
379
+ */ function computeSelector(id, css) {
380
+ var selectoPlaceholderRegexp = /__jsx-style-dynamic-selector/g;
381
+ // Sanitize SSR-ed CSS.
382
+ // Client side code doesn't need to be sanitized since we use
383
+ // document.createTextNode (dev) and the CSSOM api sheet.insertRule (prod).
384
+ if (typeof window === "undefined") {
385
+ css = sanitize(css);
386
+ }
387
+ var idcss = id + css;
388
+ if (!cache[idcss]) {
389
+ cache[idcss] = css.replace(selectoPlaceholderRegexp, id);
390
+ }
391
+ return cache[idcss];
392
+ }
393
+
394
+ function mapRulesToStyle(cssRules, options) {
395
+ if (options === void 0) options = {};
396
+ return cssRules.map(function(args) {
397
+ var id = args[0];
398
+ var css = args[1];
399
+ return /*#__PURE__*/ React__default["default"].createElement("style", {
400
+ id: "__" + id,
401
+ // Avoid warnings upon render with a key
402
+ key: "__" + id,
403
+ nonce: options.nonce ? options.nonce : undefined,
404
+ dangerouslySetInnerHTML: {
405
+ __html: css
406
+ }
407
+ });
408
+ });
409
+ }
410
+ var StyleSheetRegistry = /*#__PURE__*/ function() {
411
+ function StyleSheetRegistry(param) {
412
+ var ref = param === void 0 ? {} : param, _styleSheet = ref.styleSheet, styleSheet = _styleSheet === void 0 ? null : _styleSheet, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? false : _optimizeForSpeed;
413
+ this._sheet = styleSheet || new StyleSheet({
414
+ name: "styled-jsx",
415
+ optimizeForSpeed: optimizeForSpeed
416
+ });
417
+ this._sheet.inject();
418
+ if (styleSheet && typeof optimizeForSpeed === "boolean") {
419
+ this._sheet.setOptimizeForSpeed(optimizeForSpeed);
420
+ this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();
421
+ }
422
+ this._fromServer = undefined;
423
+ this._indices = {};
424
+ this._instancesCounts = {};
425
+ }
426
+ var _proto = StyleSheetRegistry.prototype;
427
+ _proto.add = function add(props) {
428
+ var _this = this;
429
+ if (undefined === this._optimizeForSpeed) {
430
+ this._optimizeForSpeed = Array.isArray(props.children);
431
+ this._sheet.setOptimizeForSpeed(this._optimizeForSpeed);
432
+ this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();
433
+ }
434
+ if (typeof window !== "undefined" && !this._fromServer) {
435
+ this._fromServer = this.selectFromServer();
436
+ this._instancesCounts = Object.keys(this._fromServer).reduce(function(acc, tagName) {
437
+ acc[tagName] = 0;
438
+ return acc;
439
+ }, {});
440
+ }
441
+ var ref = this.getIdAndRules(props), styleId = ref.styleId, rules = ref.rules;
442
+ // Deduping: just increase the instances count.
443
+ if (styleId in this._instancesCounts) {
444
+ this._instancesCounts[styleId] += 1;
445
+ return;
446
+ }
447
+ var indices = rules.map(function(rule) {
448
+ return _this._sheet.insertRule(rule);
449
+ })// Filter out invalid rules
450
+ .filter(function(index) {
451
+ return index !== -1;
452
+ });
453
+ this._indices[styleId] = indices;
454
+ this._instancesCounts[styleId] = 1;
455
+ };
456
+ _proto.remove = function remove(props) {
457
+ var _this = this;
458
+ var styleId = this.getIdAndRules(props).styleId;
459
+ invariant(styleId in this._instancesCounts, "styleId: `" + styleId + "` not found");
460
+ this._instancesCounts[styleId] -= 1;
461
+ if (this._instancesCounts[styleId] < 1) {
462
+ var tagFromServer = this._fromServer && this._fromServer[styleId];
463
+ if (tagFromServer) {
464
+ tagFromServer.parentNode.removeChild(tagFromServer);
465
+ delete this._fromServer[styleId];
466
+ } else {
467
+ this._indices[styleId].forEach(function(index) {
468
+ return _this._sheet.deleteRule(index);
469
+ });
470
+ delete this._indices[styleId];
471
+ }
472
+ delete this._instancesCounts[styleId];
473
+ }
474
+ };
475
+ _proto.update = function update(props, nextProps) {
476
+ this.add(nextProps);
477
+ this.remove(props);
478
+ };
479
+ _proto.flush = function flush() {
480
+ this._sheet.flush();
481
+ this._sheet.inject();
482
+ this._fromServer = undefined;
483
+ this._indices = {};
484
+ this._instancesCounts = {};
485
+ };
486
+ _proto.cssRules = function cssRules() {
487
+ var _this = this;
488
+ var fromServer = this._fromServer ? Object.keys(this._fromServer).map(function(styleId) {
489
+ return [
490
+ styleId,
491
+ _this._fromServer[styleId]
492
+ ];
493
+ }) : [];
494
+ var cssRules = this._sheet.cssRules();
495
+ return fromServer.concat(Object.keys(this._indices).map(function(styleId) {
496
+ return [
497
+ styleId,
498
+ _this._indices[styleId].map(function(index) {
499
+ return cssRules[index].cssText;
500
+ }).join(_this._optimizeForSpeed ? "" : "\n")
501
+ ];
502
+ })// filter out empty rules
503
+ .filter(function(rule) {
504
+ return Boolean(rule[1]);
505
+ }));
506
+ };
507
+ _proto.styles = function styles(options) {
508
+ return mapRulesToStyle(this.cssRules(), options);
509
+ };
510
+ _proto.getIdAndRules = function getIdAndRules(props) {
511
+ var css = props.children, dynamic = props.dynamic, id = props.id;
512
+ if (dynamic) {
513
+ var styleId = computeId(id, dynamic);
514
+ return {
515
+ styleId: styleId,
516
+ rules: Array.isArray(css) ? css.map(function(rule) {
517
+ return computeSelector(styleId, rule);
518
+ }) : [
519
+ computeSelector(styleId, css)
520
+ ]
521
+ };
522
+ }
523
+ return {
524
+ styleId: computeId(id),
525
+ rules: Array.isArray(css) ? css : [
526
+ css
527
+ ]
528
+ };
529
+ };
530
+ /**
531
+ * selectFromServer
532
+ *
533
+ * Collects style tags from the document with id __jsx-XXX
534
+ */ _proto.selectFromServer = function selectFromServer() {
535
+ var elements = Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]'));
536
+ return elements.reduce(function(acc, element) {
537
+ var id = element.id.slice(2);
538
+ acc[id] = element;
539
+ return acc;
540
+ }, {});
541
+ };
542
+ return StyleSheetRegistry;
543
+ }();
544
+ function invariant(condition, message) {
545
+ if (!condition) {
546
+ throw new Error("StyleSheetRegistry: " + message + ".");
547
+ }
548
+ }
549
+ var StyleSheetContext = /*#__PURE__*/ React.createContext(null);
550
+ StyleSheetContext.displayName = "StyleSheetContext";
551
+ function createStyleRegistry() {
552
+ return new StyleSheetRegistry();
553
+ }
554
+ function StyleRegistry(param) {
555
+ var configuredRegistry = param.registry, children = param.children;
556
+ var rootRegistry = React.useContext(StyleSheetContext);
557
+ var ref = React.useState(function() {
558
+ return rootRegistry || configuredRegistry || createStyleRegistry();
559
+ }), registry = ref[0];
560
+ return /*#__PURE__*/ React__default["default"].createElement(StyleSheetContext.Provider, {
561
+ value: registry
562
+ }, children);
563
+ }
564
+ function useStyleRegistry() {
565
+ return React.useContext(StyleSheetContext);
566
+ }
567
+
568
+ // Opt-into the new `useInsertionEffect` API in React 18, fallback to `useLayoutEffect`.
569
+ // https://github.com/reactwg/react-18/discussions/110
570
+ var useInsertionEffect = React__default["default"].useInsertionEffect || React.useLayoutEffect;
571
+ var defaultRegistry = typeof window !== "undefined" ? createStyleRegistry() : undefined;
572
+ function JSXStyle(props) {
573
+ var registry = defaultRegistry ? defaultRegistry : useStyleRegistry();
574
+ var insertionEffectCalled = React.useRef(false);
575
+ // `registry` might not exist while server-side rendering
576
+ if (!registry) {
577
+ return null;
578
+ }
579
+ if (typeof window === "undefined") {
580
+ registry.add(props);
581
+ return null;
582
+ }
583
+ useInsertionEffect(function() {
584
+ // ReactDOM removes all DOM during hydration in certain cases
585
+ if (!document.head) {
586
+ return;
587
+ }
588
+ registry.add(props);
589
+ insertionEffectCalled.current = true;
590
+ return function() {
591
+ insertionEffectCalled.current = false;
592
+ registry.remove(props);
593
+ };
594
+ }, [
595
+ props.id,
596
+ String(props.dynamic)
597
+ ]);
598
+ React.useLayoutEffect(function() {
599
+ if (!document.head || insertionEffectCalled.current) {
600
+ return;
601
+ }
602
+ registry.add(props);
603
+ return function() {
604
+ registry.remove(props);
605
+ };
606
+ // props.children can be string[], will be striped since id is identical
607
+ }, [
608
+ props.id,
609
+ String(props.dynamic)
610
+ ]);
611
+ return null;
612
+ }
613
+ JSXStyle.dynamic = function(info) {
614
+ return info.map(function(tagInfo) {
615
+ var baseId = tagInfo[0];
616
+ var props = tagInfo[1];
617
+ return computeId(baseId, props);
618
+ }).join(" ");
619
+ };
620
+
621
+ index.StyleRegistry = StyleRegistry;
622
+ index.createStyleRegistry = createStyleRegistry;
623
+ index.style = JSXStyle;
624
+ index.useStyleRegistry = useStyleRegistry;
625
+ return index;
626
+ }
627
+
628
+ var style;
629
+ var hasRequiredStyle;
630
+
631
+ function requireStyle () {
632
+ if (hasRequiredStyle) return style;
633
+ hasRequiredStyle = 1;
634
+ style = requireIndex().style;
635
+ return style;
636
+ }
637
+
638
+ var styleExports = requireStyle();
639
+ var _JSXStyle = /*@__PURE__*/getDefaultExportFromCjs(styleExports);
640
+
641
+ /* "use client" */
642
+
643
+ var ScalePropKeys = ['width', 'height', 'padding', 'margin', 'w', 'h', 'paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom', 'pl', 'pr', 'pt', 'pb', 'marginLeft', 'marginRight', 'marginTop', 'marginBottom', 'ml', 'mr', 'mt', 'mb', 'px', 'py', 'mx', 'my', 'font', 'unit', 'scale'];
644
+ var defaultDynamicLayoutPipe = function defaultDynamicLayoutPipe(scale1x) {
645
+ return "".concat(scale1x);
646
+ };
647
+ var defaultContext = {
648
+ getScaleProps: function getScaleProps() {
649
+ return undefined;
650
+ },
651
+ getAllScaleProps: function getAllScaleProps() {
652
+ return {};
653
+ },
654
+ SCALES: {
655
+ pl: defaultDynamicLayoutPipe,
656
+ pr: defaultDynamicLayoutPipe,
657
+ pb: defaultDynamicLayoutPipe,
658
+ pt: defaultDynamicLayoutPipe,
659
+ px: defaultDynamicLayoutPipe,
660
+ py: defaultDynamicLayoutPipe,
661
+ mb: defaultDynamicLayoutPipe,
662
+ ml: defaultDynamicLayoutPipe,
663
+ mr: defaultDynamicLayoutPipe,
664
+ mt: defaultDynamicLayoutPipe,
665
+ mx: defaultDynamicLayoutPipe,
666
+ my: defaultDynamicLayoutPipe,
667
+ width: defaultDynamicLayoutPipe,
668
+ height: defaultDynamicLayoutPipe,
669
+ font: defaultDynamicLayoutPipe
670
+ },
671
+ unit: '16px'
672
+ };
673
+ var ScaleContext = /*#__PURE__*/React$1.createContext(defaultContext);
674
+ var useScale = function useScale() {
675
+ return React$1.useContext(ScaleContext);
676
+ };
677
+
678
+ /* "use client" */
679
+
680
+ var isCSSNumberValue = function isCSSNumberValue(value) {
681
+ return value !== undefined && !Number.isNaN(+value);
682
+ };
683
+
684
+ var generateGetScaleProps = function generateGetScaleProps(props) {
685
+ var getScaleProps = function getScaleProps(keyOrKeys) {
686
+ if (!Array.isArray(keyOrKeys)) return props[keyOrKeys];
687
+ var value = undefined;
688
+ var _iterator = _createForOfIteratorHelper(keyOrKeys),
689
+ _step;
690
+ try {
691
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
692
+ var key = _step.value;
693
+ var currentValue = props[key];
694
+ if (typeof currentValue !== 'undefined') {
695
+ value = currentValue;
696
+ }
697
+ }
698
+ } catch (err) {
699
+ _iterator.e(err);
700
+ } finally {
701
+ _iterator.f();
702
+ }
703
+ return value;
704
+ };
705
+ return getScaleProps;
706
+ };
707
+ var generateGetAllScaleProps = function generateGetAllScaleProps(props) {
708
+ var getAllScaleProps = function getAllScaleProps() {
709
+ var scaleProps = {};
710
+ var _iterator2 = _createForOfIteratorHelper(ScalePropKeys),
711
+ _step2;
712
+ try {
713
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
714
+ var key = _step2.value;
715
+ var value = props[key];
716
+ if (typeof value !== 'undefined') {
717
+ scaleProps[key] = value;
718
+ }
719
+ }
720
+ } catch (err) {
721
+ _iterator2.e(err);
722
+ } finally {
723
+ _iterator2.f();
724
+ }
725
+ return scaleProps;
726
+ };
727
+ return getAllScaleProps;
728
+ };
729
+
730
+ var _excluded$2 = ["children"];
731
+ var reduceScaleCoefficient = function reduceScaleCoefficient(scale) {
732
+ if (scale === 1) return scale;
733
+ var diff = Math.abs((scale - 1) / 2);
734
+ return scale > 1 ? 1 + diff : 1 - diff;
735
+ };
736
+ var withScale = function withScale(Render) {
737
+ var ScaleFC = /*#__PURE__*/React$1.forwardRef(function (_ref, ref) {
738
+ var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref0, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref30, _ref31;
739
+ var children = _ref.children,
740
+ props = _objectWithoutProperties(_ref, _excluded$2);
741
+ var _useTheme = theme.useTheme(),
742
+ layout = _useTheme.layout;
743
+ var paddingLeft = props.paddingLeft,
744
+ pl = props.pl,
745
+ paddingRight = props.paddingRight,
746
+ pr = props.pr,
747
+ paddingTop = props.paddingTop,
748
+ pt = props.pt,
749
+ paddingBottom = props.paddingBottom,
750
+ pb = props.pb,
751
+ marginTop = props.marginTop,
752
+ mt = props.mt,
753
+ marginRight = props.marginRight,
754
+ mr = props.mr,
755
+ marginBottom = props.marginBottom,
756
+ mb = props.mb,
757
+ marginLeft = props.marginLeft,
758
+ ml = props.ml,
759
+ px = props.px,
760
+ py = props.py,
761
+ mx = props.mx,
762
+ my = props.my,
763
+ width = props.width,
764
+ height = props.height,
765
+ font = props.font,
766
+ w = props.w,
767
+ h = props.h,
768
+ margin = props.margin,
769
+ padding = props.padding,
770
+ _props$unit = props.unit,
771
+ unit = _props$unit === void 0 ? layout.unit : _props$unit,
772
+ _props$scale = props.scale,
773
+ scale = _props$scale === void 0 ? 1 : _props$scale;
774
+ var makeScaleHandler = function makeScaleHandler(attrValue) {
775
+ return function (scale1x, defaultValue) {
776
+ // 0 means disable scale and the default value is 0
777
+ if (scale1x === 0) {
778
+ scale1x = 1;
779
+ defaultValue = defaultValue || 0;
780
+ }
781
+ var factor = reduceScaleCoefficient(scale) * scale1x;
782
+ if (typeof attrValue === 'undefined') {
783
+ if (typeof defaultValue !== 'undefined') return "".concat(defaultValue);
784
+ return "calc(".concat(factor, " * ").concat(unit, ")");
785
+ }
786
+ if (!isCSSNumberValue(attrValue)) return "".concat(attrValue);
787
+ var customFactor = factor * Number(attrValue);
788
+ return "calc(".concat(customFactor, " * ").concat(unit, ")");
789
+ };
790
+ };
791
+ var value = {
792
+ unit: unit,
793
+ SCALES: {
794
+ pt: makeScaleHandler((_ref2 = (_ref3 = paddingTop !== null && paddingTop !== void 0 ? paddingTop : pt) !== null && _ref3 !== void 0 ? _ref3 : py) !== null && _ref2 !== void 0 ? _ref2 : padding),
795
+ pr: makeScaleHandler((_ref4 = (_ref5 = paddingRight !== null && paddingRight !== void 0 ? paddingRight : pr) !== null && _ref5 !== void 0 ? _ref5 : px) !== null && _ref4 !== void 0 ? _ref4 : padding),
796
+ pb: makeScaleHandler((_ref6 = (_ref7 = paddingBottom !== null && paddingBottom !== void 0 ? paddingBottom : pb) !== null && _ref7 !== void 0 ? _ref7 : py) !== null && _ref6 !== void 0 ? _ref6 : padding),
797
+ pl: makeScaleHandler((_ref8 = (_ref9 = paddingLeft !== null && paddingLeft !== void 0 ? paddingLeft : pl) !== null && _ref9 !== void 0 ? _ref9 : px) !== null && _ref8 !== void 0 ? _ref8 : padding),
798
+ px: makeScaleHandler((_ref0 = (_ref1 = (_ref10 = (_ref11 = px !== null && px !== void 0 ? px : paddingLeft) !== null && _ref11 !== void 0 ? _ref11 : paddingRight) !== null && _ref10 !== void 0 ? _ref10 : pl) !== null && _ref1 !== void 0 ? _ref1 : pr) !== null && _ref0 !== void 0 ? _ref0 : padding),
799
+ py: makeScaleHandler((_ref12 = (_ref13 = (_ref14 = (_ref15 = py !== null && py !== void 0 ? py : paddingTop) !== null && _ref15 !== void 0 ? _ref15 : paddingBottom) !== null && _ref14 !== void 0 ? _ref14 : pt) !== null && _ref13 !== void 0 ? _ref13 : pb) !== null && _ref12 !== void 0 ? _ref12 : padding),
800
+ mt: makeScaleHandler((_ref16 = (_ref17 = marginTop !== null && marginTop !== void 0 ? marginTop : mt) !== null && _ref17 !== void 0 ? _ref17 : my) !== null && _ref16 !== void 0 ? _ref16 : margin),
801
+ mr: makeScaleHandler((_ref18 = (_ref19 = marginRight !== null && marginRight !== void 0 ? marginRight : mr) !== null && _ref19 !== void 0 ? _ref19 : mx) !== null && _ref18 !== void 0 ? _ref18 : margin),
802
+ mb: makeScaleHandler((_ref20 = (_ref21 = marginBottom !== null && marginBottom !== void 0 ? marginBottom : mb) !== null && _ref21 !== void 0 ? _ref21 : my) !== null && _ref20 !== void 0 ? _ref20 : margin),
803
+ ml: makeScaleHandler((_ref22 = (_ref23 = marginLeft !== null && marginLeft !== void 0 ? marginLeft : ml) !== null && _ref23 !== void 0 ? _ref23 : mx) !== null && _ref22 !== void 0 ? _ref22 : margin),
804
+ mx: makeScaleHandler((_ref24 = (_ref25 = (_ref26 = (_ref27 = mx !== null && mx !== void 0 ? mx : marginLeft) !== null && _ref27 !== void 0 ? _ref27 : marginRight) !== null && _ref26 !== void 0 ? _ref26 : ml) !== null && _ref25 !== void 0 ? _ref25 : mr) !== null && _ref24 !== void 0 ? _ref24 : margin),
805
+ my: makeScaleHandler((_ref28 = (_ref29 = (_ref30 = (_ref31 = my !== null && my !== void 0 ? my : marginTop) !== null && _ref31 !== void 0 ? _ref31 : marginBottom) !== null && _ref30 !== void 0 ? _ref30 : mt) !== null && _ref29 !== void 0 ? _ref29 : mb) !== null && _ref28 !== void 0 ? _ref28 : margin),
806
+ width: makeScaleHandler(width !== null && width !== void 0 ? width : w),
807
+ height: makeScaleHandler(height !== null && height !== void 0 ? height : h),
808
+ font: makeScaleHandler(font)
809
+ },
810
+ getScaleProps: generateGetScaleProps(props),
811
+ getAllScaleProps: generateGetAllScaleProps(props)
812
+ };
813
+ return /*#__PURE__*/React$1.createElement(ScaleContext.Provider, {
814
+ value: value
815
+ }, /*#__PURE__*/React$1.createElement(Render, _extends({}, props, {
816
+ ref: ref
817
+ }), children));
818
+ });
819
+ ScaleFC.displayName = "Scale".concat(Render.displayName || 'Wrapper');
820
+ return ScaleFC;
821
+ };
822
+
823
+ var _excluded$1 = ["xs", "sm", "md", "lg", "xl", "justify", "direction", "alignItems", "alignContent", "children", "className"];
824
+ var getItemLayout = function getItemLayout(val) {
825
+ var display = val === 0 ? 'display: none;' : 'display: inherit;';
826
+ if (typeof val === 'number') {
827
+ var width = 100 / 24 * val;
828
+ var ratio = width > 100 ? '100%' : width < 0 ? '0' : "".concat(width, "%");
829
+ return {
830
+ grow: 0,
831
+ display: display,
832
+ width: ratio,
833
+ basis: ratio
834
+ };
835
+ }
836
+ return {
837
+ grow: 1,
838
+ display: display,
839
+ width: '100%',
840
+ basis: '0'
841
+ };
842
+ };
843
+ var GridBasicItem = function GridBasicItem(_ref) {
844
+ var _ref$xs = _ref.xs,
845
+ xs = _ref$xs === void 0 ? false : _ref$xs,
846
+ _ref$sm = _ref.sm,
847
+ sm = _ref$sm === void 0 ? false : _ref$sm,
848
+ _ref$md = _ref.md,
849
+ md = _ref$md === void 0 ? false : _ref$md,
850
+ _ref$lg = _ref.lg,
851
+ lg = _ref$lg === void 0 ? false : _ref$lg,
852
+ _ref$xl = _ref.xl,
853
+ xl = _ref$xl === void 0 ? false : _ref$xl,
854
+ justify = _ref.justify,
855
+ direction = _ref.direction,
856
+ alignItems = _ref.alignItems,
857
+ alignContent = _ref.alignContent,
858
+ children = _ref.children,
859
+ _ref$className = _ref.className,
860
+ className = _ref$className === void 0 ? '' : _ref$className,
861
+ props = _objectWithoutProperties(_ref, _excluded$1);
862
+ var theme$1 = theme.useTheme();
863
+ var _useScale = useScale(),
864
+ SCALES = _useScale.SCALES;
865
+ var classes = React$1.useMemo(function () {
866
+ var aligns = {
867
+ justify: justify,
868
+ direction: direction,
869
+ alignItems: alignItems,
870
+ alignContent: alignContent,
871
+ xs: xs,
872
+ sm: sm,
873
+ md: md,
874
+ lg: lg,
875
+ xl: xl
876
+ };
877
+ var classString = Object.keys(aligns).reduce(function (pre, name) {
878
+ if (aligns[name] !== undefined && aligns[name] !== false) return "".concat(pre, " ").concat(name);
879
+ return pre;
880
+ }, '');
881
+ return classString.trim();
882
+ }, [justify, direction, alignItems, alignContent, xs, sm, md, lg, xl]);
883
+ var layout = React$1.useMemo(function () {
884
+ return {
885
+ xs: getItemLayout(xs),
886
+ sm: getItemLayout(sm),
887
+ md: getItemLayout(md),
888
+ lg: getItemLayout(lg),
889
+ xl: getItemLayout(xl)
890
+ };
891
+ }, [xs, sm, md, lg, xl]);
892
+ return /*#__PURE__*/React$1.createElement("div", _extends({}, props, {
893
+ className: _JSXStyle.dynamic([["568430467", [SCALES.font(1, 'inherit'), SCALES.height(1, 'auto'), justify, direction, alignContent, alignItems, layout.xs.grow, layout.xs.width, layout.xs.basis, layout.xs.display, theme$1.breakpoints.sm.min, layout.sm.grow, layout.sm.width, layout.sm.basis, layout.sm.display, theme$1.breakpoints.md.min, layout.md.grow, layout.md.width, layout.md.basis, layout.md.display, theme$1.breakpoints.lg.min, layout.lg.grow, layout.lg.width, layout.lg.basis, layout.lg.display, theme$1.breakpoints.xl.min, layout.xl.grow, layout.xl.width, layout.xl.basis, layout.xl.display]]]) + " " + (props && props.className != null && props.className || theme.useClasses('item', classes, className) || "")
894
+ }), children, /*#__PURE__*/React$1.createElement(_JSXStyle, {
895
+ id: "568430467",
896
+ dynamic: [SCALES.font(1, 'inherit'), SCALES.height(1, 'auto'), justify, direction, alignContent, alignItems, layout.xs.grow, layout.xs.width, layout.xs.basis, layout.xs.display, theme$1.breakpoints.sm.min, layout.sm.grow, layout.sm.width, layout.sm.basis, layout.sm.display, theme$1.breakpoints.md.min, layout.md.grow, layout.md.width, layout.md.basis, layout.md.display, theme$1.breakpoints.lg.min, layout.lg.grow, layout.lg.width, layout.lg.basis, layout.lg.display, theme$1.breakpoints.xl.min, layout.xl.grow, layout.xl.width, layout.xl.basis, layout.xl.display]
897
+ }, ".item.__jsx-style-dynamic-selector{font-size:".concat(SCALES.font(1, 'inherit'), ";height:").concat(SCALES.height(1, 'auto'), ";}.justify.__jsx-style-dynamic-selector{-webkit-box-pack:").concat(justify, ";-webkit-justify-content:").concat(justify, ";-ms-flex-pack:").concat(justify, ";justify-content:").concat(justify, ";}.direction.__jsx-style-dynamic-selector{-webkit-flex-direction:").concat(direction, ";-ms-flex-direction:").concat(direction, ";flex-direction:").concat(direction, ";}.alignContent.__jsx-style-dynamic-selector{-webkit-align-content:").concat(alignContent, ";-ms-flex-line-pack:").concat(alignContent, ";align-content:").concat(alignContent, ";}.alignItems.__jsx-style-dynamic-selector{-webkit-align-items:").concat(alignItems, ";-webkit-box-align:").concat(alignItems, ";-ms-flex-align:").concat(alignItems, ";align-items:").concat(alignItems, ";}.xs.__jsx-style-dynamic-selector{-webkit-box-flex:").concat(layout.xs.grow, ";-webkit-flex-grow:").concat(layout.xs.grow, ";-ms-flex-positive:").concat(layout.xs.grow, ";flex-grow:").concat(layout.xs.grow, ";max-width:").concat(layout.xs.width, ";-webkit-flex-basis:").concat(layout.xs.basis, ";-ms-flex-preferred-size:").concat(layout.xs.basis, ";flex-basis:").concat(layout.xs.basis, ";").concat(layout.xs.display, ";}@media only screen and (min-width:").concat(theme$1.breakpoints.sm.min, "){.sm.__jsx-style-dynamic-selector{-webkit-box-flex:").concat(layout.sm.grow, ";-webkit-flex-grow:").concat(layout.sm.grow, ";-ms-flex-positive:").concat(layout.sm.grow, ";flex-grow:").concat(layout.sm.grow, ";max-width:").concat(layout.sm.width, ";-webkit-flex-basis:").concat(layout.sm.basis, ";-ms-flex-preferred-size:").concat(layout.sm.basis, ";flex-basis:").concat(layout.sm.basis, ";").concat(layout.sm.display, ";}}@media only screen and (min-width:").concat(theme$1.breakpoints.md.min, "){.md.__jsx-style-dynamic-selector{-webkit-box-flex:").concat(layout.md.grow, ";-webkit-flex-grow:").concat(layout.md.grow, ";-ms-flex-positive:").concat(layout.md.grow, ";flex-grow:").concat(layout.md.grow, ";max-width:").concat(layout.md.width, ";-webkit-flex-basis:").concat(layout.md.basis, ";-ms-flex-preferred-size:").concat(layout.md.basis, ";flex-basis:").concat(layout.md.basis, ";").concat(layout.md.display, ";}}@media only screen and (min-width:").concat(theme$1.breakpoints.lg.min, "){.lg.__jsx-style-dynamic-selector{-webkit-box-flex:").concat(layout.lg.grow, ";-webkit-flex-grow:").concat(layout.lg.grow, ";-ms-flex-positive:").concat(layout.lg.grow, ";flex-grow:").concat(layout.lg.grow, ";max-width:").concat(layout.lg.width, ";-webkit-flex-basis:").concat(layout.lg.basis, ";-ms-flex-preferred-size:").concat(layout.lg.basis, ";flex-basis:").concat(layout.lg.basis, ";").concat(layout.lg.display, ";}}@media only screen and (min-width:").concat(theme$1.breakpoints.xl.min, "){.xl.__jsx-style-dynamic-selector{-webkit-box-flex:").concat(layout.xl.grow, ";-webkit-flex-grow:").concat(layout.xl.grow, ";-ms-flex-positive:").concat(layout.xl.grow, ";flex-grow:").concat(layout.xl.grow, ";max-width:").concat(layout.xl.width, ";-webkit-flex-basis:").concat(layout.xl.basis, ";-ms-flex-preferred-size:").concat(layout.xl.basis, ";flex-basis:").concat(layout.xl.basis, ";").concat(layout.xl.display, ";}}")));
898
+ };
899
+ GridBasicItem.displayName = 'GridBasicItem';
900
+
901
+ var tuple = function tuple() {
902
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
903
+ args[_key] = arguments[_key];
904
+ }
905
+ return args;
906
+ };
907
+ tuple('default', 'secondary', 'success', 'warning', 'error', 'abort', 'secondary-light', 'success-light', 'warning-light', 'error-light');
908
+ tuple('default', 'secondary', 'success', 'warning', 'error');
909
+ tuple('default', 'secondary', 'success', 'warning', 'error', 'dark', 'lite');
910
+ tuple('default', 'secondary', 'success', 'warning', 'error', 'dark', 'lite', 'alert', 'purple', 'violet', 'cyan');
911
+ tuple('default', 'silent', 'prevent');
912
+ tuple('hover', 'click');
913
+ tuple('top', 'topStart', 'topEnd', 'left', 'leftStart', 'leftEnd', 'bottom', 'bottomStart', 'bottomEnd', 'right', 'rightStart', 'rightEnd');
914
+ tuple('start', 'center', 'end', 'left', 'right');
915
+
916
+ var _excluded = ["gap", "children", "className"];
917
+ var wrap = tuple('nowrap', 'wrap', 'wrap-reverse');
918
+ var Container = function Container(_ref) {
919
+ var _ref$gap = _ref.gap,
920
+ gap = _ref$gap === void 0 ? 0 : _ref$gap,
921
+ children = _ref.children,
922
+ _ref$className = _ref.className,
923
+ className = _ref$className === void 0 ? '' : _ref$className,
924
+ props = _objectWithoutProperties(_ref, _excluded);
925
+ var _useScale = useScale(),
926
+ unit = _useScale.unit,
927
+ SCALES = _useScale.SCALES;
928
+ var gapUnit = React$1.useMemo(function () {
929
+ return "calc(".concat(gap, " * ").concat(unit, " * 1/3)");
930
+ }, [gap, unit]);
931
+ var _styles$className = {
932
+ styles: /*#__PURE__*/React.createElement(_JSXStyle, {
933
+ id: "2955470113",
934
+ dynamic: [gapUnit, wrap, SCALES.width(1, 'var(--container-width)')]
935
+ }, "div.__jsx-style-dynamic-selector{--gap-unit:".concat(gapUnit, ";--container-width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:").concat(wrap, ";-ms-flex-wrap:").concat(wrap, ";flex-wrap:").concat(wrap, ";box-sizing:border-box;gap:var(--gap-unit);width:").concat(SCALES.width(1, 'var(--container-width)'), ";}")),
936
+ className: _JSXStyle.dynamic([["2955470113", [gapUnit, wrap, SCALES.width(1, 'var(--container-width)')]]])
937
+ },
938
+ resolveClassName = _styles$className.className,
939
+ styles = _styles$className.styles;
940
+ var classes = theme.useClasses(resolveClassName, className);
941
+ return /*#__PURE__*/React.createElement(GridBasicItem, _extends({
942
+ className: classes
943
+ }, props), children, styles);
944
+ };
945
+ Container.displayName = 'Container';
946
+ var Container$1 = withScale(Container);
947
+
948
+ exports.default = Container$1;