@spaziodati/atoka-design-system 2.1.6 → 2.1.7

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 (109) hide show
  1. package/AddableItems/index.js +1 -1050
  2. package/Alert/index.js +1 -321
  3. package/Badge/index.js +1 -285
  4. package/Bs4V3Wrapper/index.js +1 -253
  5. package/BubbleChart/index.js +2 -3424
  6. package/BubbleChart/index.js.LICENSE.txt +1 -0
  7. package/Button/index.js +1 -325
  8. package/ButtonDropdown/index.js +1 -601
  9. package/CardsPage/index.js +1 -2505
  10. package/CursorPagination/index.js +1 -948
  11. package/DatePicker/index.js +1 -449
  12. package/DetailPage/index.js +1 -1990
  13. package/Dropdown/index.js +1 -723
  14. package/EditableString/index.js +1 -3238
  15. package/EllipsableContent/index.js +1 -786
  16. package/EmptyState/index.js +1 -280
  17. package/Facet/index.js +1 -919
  18. package/FacetSection/index.js +1 -447
  19. package/FadeAnimation/index.js +1 -1157
  20. package/FeedbackButton/index.js +1 -400
  21. package/Form/index.js +1 -450
  22. package/Funnel/index.js +2 -3624
  23. package/Funnel/index.js.LICENSE.txt +1 -0
  24. package/GridCard/index.js +1 -1626
  25. package/HighlightableText/index.js +1 -625
  26. package/Histogram/index.js +1 -2346
  27. package/InlineStringEditor/index.js +1 -1862
  28. package/InputGroup/index.js +1 -279
  29. package/Jumbotron/index.js +1 -272
  30. package/Map/index.js +2 -5187
  31. package/Map/index.js.LICENSE.txt +10 -0
  32. package/Modal/index.js +1 -745
  33. package/Navbar/index.js +1 -3430
  34. package/Pagination/index.js +1 -990
  35. package/PieChart/index.js +1 -1971
  36. package/PublicFooter/index.js +1 -458
  37. package/PublicNavbar/index.js +1 -257
  38. package/RecordBit/index.js +1 -486
  39. package/ResultItemCard/index.js +1 -1073
  40. package/SelectDropdown/index.js +1 -1506
  41. package/Spinner/index.js +1 -327
  42. package/StatisticsItemCard/index.js +1 -1796
  43. package/StatisticsItemNumeric/index.js +1 -285
  44. package/StatisticsLegend/index.js +1 -1555
  45. package/StatisticsTooltip/index.js +1 -796
  46. package/Suggester/index.js +1 -1126
  47. package/SunBurst/index.js +1 -1166
  48. package/TabSwitcher/index.js +1 -1135
  49. package/Title/index.js +1 -304
  50. package/Toasts/index.js +1 -2285
  51. package/ToggleButtonGroup/index.js +1 -607
  52. package/Tooltip/index.js +1 -291
  53. package/Utils/index.js +2 -3002
  54. package/Utils/index.js.LICENSE.txt +1 -0
  55. package/{atoka-design-system-2.1.6.min.css → atoka-design-system-2.1.7.min.css} +0 -0
  56. package/index.js +2 -16819
  57. package/index.js.LICENSE.txt +10 -0
  58. package/package.json +1 -1
  59. package/AddableItems/index.js.map +0 -1
  60. package/Alert/index.js.map +0 -1
  61. package/Badge/index.js.map +0 -1
  62. package/Bs4V3Wrapper/index.js.map +0 -1
  63. package/BubbleChart/index.js.map +0 -1
  64. package/Button/index.js.map +0 -1
  65. package/ButtonDropdown/index.js.map +0 -1
  66. package/CardsPage/index.js.map +0 -1
  67. package/CursorPagination/index.js.map +0 -1
  68. package/DatePicker/index.js.map +0 -1
  69. package/DetailPage/index.js.map +0 -1
  70. package/Dropdown/index.js.map +0 -1
  71. package/EditableString/index.js.map +0 -1
  72. package/EllipsableContent/index.js.map +0 -1
  73. package/EmptyState/index.js.map +0 -1
  74. package/Facet/index.js.map +0 -1
  75. package/FacetSection/index.js.map +0 -1
  76. package/FadeAnimation/index.js.map +0 -1
  77. package/FeedbackButton/index.js.map +0 -1
  78. package/Form/index.js.map +0 -1
  79. package/Funnel/index.js.map +0 -1
  80. package/GridCard/index.js.map +0 -1
  81. package/HighlightableText/index.js.map +0 -1
  82. package/Histogram/index.js.map +0 -1
  83. package/InlineStringEditor/index.js.map +0 -1
  84. package/InputGroup/index.js.map +0 -1
  85. package/Jumbotron/index.js.map +0 -1
  86. package/Map/index.js.map +0 -1
  87. package/Modal/index.js.map +0 -1
  88. package/Navbar/index.js.map +0 -1
  89. package/Pagination/index.js.map +0 -1
  90. package/PieChart/index.js.map +0 -1
  91. package/PublicFooter/index.js.map +0 -1
  92. package/PublicNavbar/index.js.map +0 -1
  93. package/RecordBit/index.js.map +0 -1
  94. package/ResultItemCard/index.js.map +0 -1
  95. package/SelectDropdown/index.js.map +0 -1
  96. package/Spinner/index.js.map +0 -1
  97. package/StatisticsItemCard/index.js.map +0 -1
  98. package/StatisticsItemNumeric/index.js.map +0 -1
  99. package/StatisticsLegend/index.js.map +0 -1
  100. package/StatisticsTooltip/index.js.map +0 -1
  101. package/Suggester/index.js.map +0 -1
  102. package/SunBurst/index.js.map +0 -1
  103. package/TabSwitcher/index.js.map +0 -1
  104. package/Title/index.js.map +0 -1
  105. package/Toasts/index.js.map +0 -1
  106. package/ToggleButtonGroup/index.js.map +0 -1
  107. package/Tooltip/index.js.map +0 -1
  108. package/Utils/index.js.map +0 -1
  109. package/index.js.map +0 -1
@@ -1,601 +1 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory(require("@fortawesome/pro-light-svg-icons/faChevronDown"), require("@fortawesome/pro-light-svg-icons/faChevronUp"), require("@fortawesome/react-fontawesome"), require("classnames"), require("react"), require("react-bootstrap/Button"));
4
- else if(typeof define === 'function' && define.amd)
5
- define("atoka-design-system", ["@fortawesome/pro-light-svg-icons/faChevronDown", "@fortawesome/pro-light-svg-icons/faChevronUp", "@fortawesome/react-fontawesome", "classnames", "react", "react-bootstrap/Button"], factory);
6
- else if(typeof exports === 'object')
7
- exports["atoka-design-system"] = factory(require("@fortawesome/pro-light-svg-icons/faChevronDown"), require("@fortawesome/pro-light-svg-icons/faChevronUp"), require("@fortawesome/react-fontawesome"), require("classnames"), require("react"), require("react-bootstrap/Button"));
8
- else
9
- root["atoka-design-system"] = factory(root["@fortawesome/pro-light-svg-icons/faChevronDown"], root["@fortawesome/pro-light-svg-icons/faChevronUp"], root["@fortawesome/react-fontawesome"], root["classnames"], root["react"], root["react-bootstrap/Button"]);
10
- })(self, function(__WEBPACK_EXTERNAL_MODULE__1711__, __WEBPACK_EXTERNAL_MODULE__9153__, __WEBPACK_EXTERNAL_MODULE__5692__, __WEBPACK_EXTERNAL_MODULE__8310__, __WEBPACK_EXTERNAL_MODULE__8156__, __WEBPACK_EXTERNAL_MODULE__8926__) {
11
- return /******/ (() => { // webpackBootstrap
12
- /******/ "use strict";
13
- /******/ var __webpack_modules__ = ({
14
-
15
- /***/ 6627:
16
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
17
-
18
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19
- /* harmony export */ "ZP": () => (/* binding */ autobind)
20
- /* harmony export */ });
21
- /* unused harmony exports boundMethod, boundClass */
22
- /* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4329);
23
-
24
-
25
- function _typeof(obj) {
26
- if (typeof Symbol === "function" && (0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(Symbol.iterator) === "symbol") {
27
- _typeof = function _typeof(obj) {
28
- return (0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(obj);
29
- };
30
- } else {
31
- _typeof = function _typeof(obj) {
32
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : (0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(obj);
33
- };
34
- }
35
-
36
- return _typeof(obj);
37
- }
38
- /**
39
- * Return a descriptor removing the value and returning a getter
40
- * The getter will return a .bind version of the function
41
- * and memoize the result against a symbol on the instance
42
- */
43
-
44
-
45
- function boundMethod(target, key, descriptor) {
46
- var fn = descriptor.value;
47
-
48
- if (typeof fn !== 'function') {
49
- throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(_typeof(fn)));
50
- } // In IE11 calling Object.defineProperty has a side-effect of evaluating the
51
- // getter for the property which is being replaced. This causes infinite
52
- // recursion and an "Out of stack space" error.
53
-
54
-
55
- var definingProperty = false;
56
- return {
57
- configurable: true,
58
- get: function get() {
59
- // eslint-disable-next-line no-prototype-builtins
60
- if (definingProperty || this === target.prototype || this.hasOwnProperty(key) || typeof fn !== 'function') {
61
- return fn;
62
- }
63
-
64
- var boundFn = fn.bind(this);
65
- definingProperty = true;
66
- Object.defineProperty(this, key, {
67
- configurable: true,
68
- get: function get() {
69
- return boundFn;
70
- },
71
- set: function set(value) {
72
- fn = value;
73
- delete this[key];
74
- }
75
- });
76
- definingProperty = false;
77
- return boundFn;
78
- },
79
- set: function set(value) {
80
- fn = value;
81
- }
82
- };
83
- }
84
- /**
85
- * Use boundMethod to bind all methods on the target.prototype
86
- */
87
-
88
- function boundClass(target) {
89
- // (Using reflect to get all keys including symbols)
90
- var keys; // Use Reflect if exists
91
-
92
- if (typeof Reflect !== 'undefined' && typeof Reflect.ownKeys === 'function') {
93
- keys = Reflect.ownKeys(target.prototype);
94
- } else {
95
- keys = Object.getOwnPropertyNames(target.prototype); // Use symbols if support is provided
96
-
97
- if (typeof Object.getOwnPropertySymbols === 'function') {
98
- keys = keys.concat(Object.getOwnPropertySymbols(target.prototype));
99
- }
100
- }
101
-
102
- keys.forEach(function (key) {
103
- // Ignore special case target method
104
- if (key === 'constructor') {
105
- return;
106
- }
107
-
108
- var descriptor = Object.getOwnPropertyDescriptor(target.prototype, key); // Only methods need binding
109
-
110
- if (typeof descriptor.value === 'function') {
111
- Object.defineProperty(target.prototype, key, boundMethod(target, key, descriptor));
112
- }
113
- });
114
- return target;
115
- }
116
- function autobind() {
117
- if (arguments.length === 1) {
118
- return boundClass.apply(void 0, arguments);
119
- }
120
-
121
- return boundMethod.apply(void 0, arguments);
122
- }
123
-
124
- /***/ }),
125
-
126
- /***/ 4397:
127
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
128
-
129
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
130
- /* harmony export */ "z": () => (/* binding */ Button)
131
- /* harmony export */ });
132
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8156);
133
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
134
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8310);
135
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);
136
- /* harmony import */ var react_bootstrap_Button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8926);
137
- /* harmony import */ var react_bootstrap_Button__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_bootstrap_Button__WEBPACK_IMPORTED_MODULE_2__);
138
- /* harmony import */ var _fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5692);
139
- /* harmony import */ var _fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_3__);
140
- var __extends = (undefined && undefined.__extends) || (function () {
141
- var extendStatics = function (d, b) {
142
- extendStatics = Object.setPrototypeOf ||
143
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
144
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
145
- return extendStatics(d, b);
146
- };
147
- return function (d, b) {
148
- if (typeof b !== "function" && b !== null)
149
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
150
- extendStatics(d, b);
151
- function __() { this.constructor = d; }
152
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
153
- };
154
- })();
155
-
156
-
157
-
158
-
159
-
160
- var Button = /** @class */ (function (_super) {
161
- __extends(Button, _super);
162
- function Button() {
163
- return _super !== null && _super.apply(this, arguments) || this;
164
- }
165
- Button.prototype.renderIcon = function () {
166
- if (this.props.icon == null) {
167
- return null;
168
- }
169
- return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_3__.FontAwesomeIcon, { icon: this.props.icon });
170
- };
171
- Button.prototype.renderChildren = function () {
172
- if (this.props.children == null) {
173
- return null;
174
- }
175
- return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: 'btn-children' }, this.props.children);
176
- };
177
- Button.prototype.renderLeftSide = function () {
178
- if (this.props.iconLeft == null) {
179
- if (this.props.iconRight == null) {
180
- return null;
181
- }
182
- return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_3__.FontAwesomeIcon, { icon: this.props.iconRight, className: 'invisible' });
183
- }
184
- return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_3__.FontAwesomeIcon, { icon: this.props.iconLeft });
185
- };
186
- Button.prototype.renderRightSide = function () {
187
- if (this.props.iconRight == null) {
188
- if (this.props.iconLeft == null) {
189
- return null;
190
- }
191
- return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_3__.FontAwesomeIcon, { icon: this.props.iconLeft, className: 'invisible' });
192
- }
193
- return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_3__.FontAwesomeIcon, { icon: this.props.iconRight });
194
- };
195
- Button.prototype.renderContent = function () {
196
- if (this.props.icon != null && this.props.children == null) {
197
- return this.renderIcon();
198
- }
199
- return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: 'button-content-center-container' },
200
- this.renderIcon(),
201
- this.renderChildren()));
202
- };
203
- Button.prototype.render = function () {
204
- var className = classnames__WEBPACK_IMPORTED_MODULE_1___default()('atoka-btn', "btn-".concat(this.props.size), this.props.className, {
205
- 'btn-icon-only': this.props.icon != null && this.props.children == null,
206
- });
207
- return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react_bootstrap_Button__WEBPACK_IMPORTED_MODULE_2___default()), { className: className, variant: this.props.variant, disabled: this.props.disabled, block: this.props.block, onClick: this.props.onClick, href: this.props.href, target: this.props.target },
208
- this.renderLeftSide(),
209
- this.renderContent(),
210
- this.renderRightSide()));
211
- };
212
- Button.displayName = 'Button';
213
- Button.defaultProps = {
214
- variant: 'primary',
215
- size: 'md',
216
- disabled: false,
217
- block: false,
218
- };
219
- return Button;
220
- }((react__WEBPACK_IMPORTED_MODULE_0___default().PureComponent)));
221
-
222
-
223
-
224
- /***/ }),
225
-
226
- /***/ 7325:
227
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
228
-
229
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
230
- /* harmony export */ "Button": () => (/* reexport safe */ _Button__WEBPACK_IMPORTED_MODULE_0__.z)
231
- /* harmony export */ });
232
- /* harmony import */ var _Button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4397);
233
- // use the star because of this issue: https://github.com/babel/babel-loader/issues/603
234
-
235
-
236
-
237
- /***/ }),
238
-
239
- /***/ 5478:
240
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
241
-
242
- // ESM COMPAT FLAG
243
- __webpack_require__.r(__webpack_exports__);
244
-
245
- // EXPORTS
246
- __webpack_require__.d(__webpack_exports__, {
247
- "ButtonDropdown": () => (/* reexport */ ButtonDropdown)
248
- });
249
-
250
- // EXTERNAL MODULE: external "react"
251
- var external_react_ = __webpack_require__(8156);
252
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
253
- // EXTERNAL MODULE: external "classnames"
254
- var external_classnames_ = __webpack_require__(8310);
255
- var external_classnames_default = /*#__PURE__*/__webpack_require__.n(external_classnames_);
256
- // EXTERNAL MODULE: ./node_modules/autobind-decorator/lib/esm/index.js
257
- var esm = __webpack_require__(6627);
258
- // EXTERNAL MODULE: external "@fortawesome/pro-light-svg-icons/faChevronUp"
259
- var faChevronUp_ = __webpack_require__(9153);
260
- // EXTERNAL MODULE: external "@fortawesome/pro-light-svg-icons/faChevronDown"
261
- var faChevronDown_ = __webpack_require__(1711);
262
- // EXTERNAL MODULE: ./src/components/Button/index.ts
263
- var Button = __webpack_require__(7325);
264
- ;// CONCATENATED MODULE: ./src/components/ButtonDropdown/ButtonDropdown.tsx
265
- var __extends = (undefined && undefined.__extends) || (function () {
266
- var extendStatics = function (d, b) {
267
- extendStatics = Object.setPrototypeOf ||
268
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
269
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
270
- return extendStatics(d, b);
271
- };
272
- return function (d, b) {
273
- if (typeof b !== "function" && b !== null)
274
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
275
- extendStatics(d, b);
276
- function __() { this.constructor = d; }
277
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
278
- };
279
- })();
280
- var __assign = (undefined && undefined.__assign) || function () {
281
- __assign = Object.assign || function(t) {
282
- for (var s, i = 1, n = arguments.length; i < n; i++) {
283
- s = arguments[i];
284
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
285
- t[p] = s[p];
286
- }
287
- return t;
288
- };
289
- return __assign.apply(this, arguments);
290
- };
291
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
292
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
293
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
294
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
295
- return c > 3 && r && Object.defineProperty(target, key, r), r;
296
- };
297
- var __metadata = (undefined && undefined.__metadata) || function (k, v) {
298
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
299
- };
300
-
301
-
302
-
303
-
304
-
305
-
306
-
307
- var ButtonDropdown = /** @class */ (function (_super) {
308
- __extends(ButtonDropdown, _super);
309
- function ButtonDropdown() {
310
- var _this = _super !== null && _super.apply(this, arguments) || this;
311
- _this.wrapperRef = external_react_default().createRef();
312
- _this.state = {
313
- isButtonDropdownOpen: false,
314
- };
315
- return _this;
316
- }
317
- ButtonDropdown.prototype.componentDidMount = function () {
318
- document.addEventListener('mousedown', this.handleClickOutside);
319
- };
320
- ButtonDropdown.prototype.componentWillUnmount = function () {
321
- document.removeEventListener('mousedown', this.handleClickOutside);
322
- };
323
- ButtonDropdown.prototype.handleClickOutside = function (event) {
324
- var _a, _b;
325
- // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
326
- if (!((_b = (_a = this.wrapperRef) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.contains(event.target))) {
327
- this.setState({ isButtonDropdownOpen: false });
328
- }
329
- };
330
- ButtonDropdown.prototype.onToggle = function () {
331
- this.setState({ isButtonDropdownOpen: !this.state.isButtonDropdownOpen });
332
- };
333
- ButtonDropdown.prototype.renderChildren = function () {
334
- if (this.state.isButtonDropdownOpen !== true) {
335
- return null;
336
- }
337
- return external_react_default().createElement("ul", { className: 'dropdown-content' }, this.props.children);
338
- };
339
- ButtonDropdown.prototype.render = function () {
340
- var className = external_classnames_default()(this.props.className, 'atoka-button-dropdown', 'position-relative', "dropdown-".concat(this.props.size), 'dropdown-primary', {
341
- 'dropdown-is-open': this.state.isButtonDropdownOpen,
342
- });
343
- return (external_react_default().createElement("div", { className: className, ref: this.wrapperRef },
344
- external_react_default().createElement(Button.Button, __assign({}, this.props, { onClick: this.onToggle, block: true, iconRight: this.state.isButtonDropdownOpen ? faChevronUp_.faChevronUp : faChevronDown_.faChevronDown }), this.props.toggleText),
345
- this.renderChildren()));
346
- };
347
- ButtonDropdown.displayName = 'ButtonDropdown';
348
- ButtonDropdown.defaultProps = Button.Button.defaultProps;
349
- __decorate([
350
- esm/* default */.ZP,
351
- __metadata("design:type", Function),
352
- __metadata("design:paramtypes", [Object]),
353
- __metadata("design:returntype", void 0)
354
- ], ButtonDropdown.prototype, "handleClickOutside", null);
355
- __decorate([
356
- esm/* default */.ZP,
357
- __metadata("design:type", Function),
358
- __metadata("design:paramtypes", []),
359
- __metadata("design:returntype", void 0)
360
- ], ButtonDropdown.prototype, "onToggle", null);
361
- return ButtonDropdown;
362
- }((external_react_default()).Component));
363
-
364
-
365
- ;// CONCATENATED MODULE: ./src/components/ButtonDropdown/index.ts
366
-
367
-
368
-
369
-
370
- /***/ }),
371
-
372
- /***/ 1711:
373
- /***/ ((module) => {
374
-
375
- module.exports = __WEBPACK_EXTERNAL_MODULE__1711__;
376
-
377
- /***/ }),
378
-
379
- /***/ 9153:
380
- /***/ ((module) => {
381
-
382
- module.exports = __WEBPACK_EXTERNAL_MODULE__9153__;
383
-
384
- /***/ }),
385
-
386
- /***/ 5692:
387
- /***/ ((module) => {
388
-
389
- module.exports = __WEBPACK_EXTERNAL_MODULE__5692__;
390
-
391
- /***/ }),
392
-
393
- /***/ 8310:
394
- /***/ ((module) => {
395
-
396
- module.exports = __WEBPACK_EXTERNAL_MODULE__8310__;
397
-
398
- /***/ }),
399
-
400
- /***/ 8156:
401
- /***/ ((module) => {
402
-
403
- module.exports = __WEBPACK_EXTERNAL_MODULE__8156__;
404
-
405
- /***/ }),
406
-
407
- /***/ 8926:
408
- /***/ ((module) => {
409
-
410
- module.exports = __WEBPACK_EXTERNAL_MODULE__8926__;
411
-
412
- /***/ }),
413
-
414
- /***/ 4329:
415
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
416
-
417
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
418
- /* harmony export */ "Z": () => (/* binding */ _typeof)
419
- /* harmony export */ });
420
- function _typeof(obj) {
421
- "@babel/helpers - typeof";
422
-
423
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
424
- return typeof obj;
425
- } : function (obj) {
426
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
427
- }, _typeof(obj);
428
- }
429
-
430
- /***/ })
431
-
432
- /******/ });
433
- /************************************************************************/
434
- /******/ // The module cache
435
- /******/ var __webpack_module_cache__ = {};
436
- /******/
437
- /******/ // The require function
438
- /******/ function __webpack_require__(moduleId) {
439
- /******/ // Check if module is in cache
440
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
441
- /******/ if (cachedModule !== undefined) {
442
- /******/ return cachedModule.exports;
443
- /******/ }
444
- /******/ // Create a new module (and put it into the cache)
445
- /******/ var module = __webpack_module_cache__[moduleId] = {
446
- /******/ // no module.id needed
447
- /******/ // no module.loaded needed
448
- /******/ exports: {}
449
- /******/ };
450
- /******/
451
- /******/ // Execute the module function
452
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
453
- /******/
454
- /******/ // Return the exports of the module
455
- /******/ return module.exports;
456
- /******/ }
457
- /******/
458
- /******/ // expose the modules object (__webpack_modules__)
459
- /******/ __webpack_require__.m = __webpack_modules__;
460
- /******/
461
- /************************************************************************/
462
- /******/ /* webpack/runtime/chunk loaded */
463
- /******/ (() => {
464
- /******/ var deferred = [];
465
- /******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
466
- /******/ if(chunkIds) {
467
- /******/ priority = priority || 0;
468
- /******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
469
- /******/ deferred[i] = [chunkIds, fn, priority];
470
- /******/ return;
471
- /******/ }
472
- /******/ var notFulfilled = Infinity;
473
- /******/ for (var i = 0; i < deferred.length; i++) {
474
- /******/ var [chunkIds, fn, priority] = deferred[i];
475
- /******/ var fulfilled = true;
476
- /******/ for (var j = 0; j < chunkIds.length; j++) {
477
- /******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
478
- /******/ chunkIds.splice(j--, 1);
479
- /******/ } else {
480
- /******/ fulfilled = false;
481
- /******/ if(priority < notFulfilled) notFulfilled = priority;
482
- /******/ }
483
- /******/ }
484
- /******/ if(fulfilled) {
485
- /******/ deferred.splice(i--, 1)
486
- /******/ var r = fn();
487
- /******/ if (r !== undefined) result = r;
488
- /******/ }
489
- /******/ }
490
- /******/ return result;
491
- /******/ };
492
- /******/ })();
493
- /******/
494
- /******/ /* webpack/runtime/compat get default export */
495
- /******/ (() => {
496
- /******/ // getDefaultExport function for compatibility with non-harmony modules
497
- /******/ __webpack_require__.n = (module) => {
498
- /******/ var getter = module && module.__esModule ?
499
- /******/ () => (module['default']) :
500
- /******/ () => (module);
501
- /******/ __webpack_require__.d(getter, { a: getter });
502
- /******/ return getter;
503
- /******/ };
504
- /******/ })();
505
- /******/
506
- /******/ /* webpack/runtime/define property getters */
507
- /******/ (() => {
508
- /******/ // define getter functions for harmony exports
509
- /******/ __webpack_require__.d = (exports, definition) => {
510
- /******/ for(var key in definition) {
511
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
512
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
513
- /******/ }
514
- /******/ }
515
- /******/ };
516
- /******/ })();
517
- /******/
518
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
519
- /******/ (() => {
520
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
521
- /******/ })();
522
- /******/
523
- /******/ /* webpack/runtime/make namespace object */
524
- /******/ (() => {
525
- /******/ // define __esModule on exports
526
- /******/ __webpack_require__.r = (exports) => {
527
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
528
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
529
- /******/ }
530
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
531
- /******/ };
532
- /******/ })();
533
- /******/
534
- /******/ /* webpack/runtime/jsonp chunk loading */
535
- /******/ (() => {
536
- /******/ // no baseURI
537
- /******/
538
- /******/ // object to store loaded and loading chunks
539
- /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
540
- /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
541
- /******/ var installedChunks = {
542
- /******/ 9733: 0,
543
- /******/ 6615: 0,
544
- /******/ 5785: 0
545
- /******/ };
546
- /******/
547
- /******/ // no chunk on demand loading
548
- /******/
549
- /******/ // no prefetching
550
- /******/
551
- /******/ // no preloaded
552
- /******/
553
- /******/ // no HMR
554
- /******/
555
- /******/ // no HMR manifest
556
- /******/
557
- /******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
558
- /******/
559
- /******/ // install a JSONP callback for chunk loading
560
- /******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
561
- /******/ var [chunkIds, moreModules, runtime] = data;
562
- /******/ // add "moreModules" to the modules object,
563
- /******/ // then flag all "chunkIds" as loaded and fire callback
564
- /******/ var moduleId, chunkId, i = 0;
565
- /******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
566
- /******/ for(moduleId in moreModules) {
567
- /******/ if(__webpack_require__.o(moreModules, moduleId)) {
568
- /******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
569
- /******/ }
570
- /******/ }
571
- /******/ if(runtime) var result = runtime(__webpack_require__);
572
- /******/ }
573
- /******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
574
- /******/ for(;i < chunkIds.length; i++) {
575
- /******/ chunkId = chunkIds[i];
576
- /******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
577
- /******/ installedChunks[chunkId][0]();
578
- /******/ }
579
- /******/ installedChunks[chunkIds[i]] = 0;
580
- /******/ }
581
- /******/ return __webpack_require__.O(result);
582
- /******/ }
583
- /******/
584
- /******/ var chunkLoadingGlobal = self["webpackChunkatoka_design_system"] = self["webpackChunkatoka_design_system"] || [];
585
- /******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
586
- /******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
587
- /******/ })();
588
- /******/
589
- /************************************************************************/
590
- /******/
591
- /******/ // startup
592
- /******/ // Load entry module and return exports
593
- /******/ // This entry module depends on other loaded chunks and execution need to be delayed
594
- /******/ var __webpack_exports__ = __webpack_require__.O(undefined, [5785], () => (__webpack_require__(5478)))
595
- /******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
596
- /******/
597
- /******/ return __webpack_exports__;
598
- /******/ })()
599
- ;
600
- });
601
- //# sourceMappingURL=index.js.map
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@fortawesome/pro-light-svg-icons/faChevronDown"),require("@fortawesome/pro-light-svg-icons/faChevronUp"),require("@fortawesome/react-fontawesome"),require("classnames"),require("react"),require("react-bootstrap/Button")):"function"==typeof define&&define.amd?define("atoka-design-system",["@fortawesome/pro-light-svg-icons/faChevronDown","@fortawesome/pro-light-svg-icons/faChevronUp","@fortawesome/react-fontawesome","classnames","react","react-bootstrap/Button"],e):"object"==typeof exports?exports["atoka-design-system"]=e(require("@fortawesome/pro-light-svg-icons/faChevronDown"),require("@fortawesome/pro-light-svg-icons/faChevronUp"),require("@fortawesome/react-fontawesome"),require("classnames"),require("react"),require("react-bootstrap/Button")):t["atoka-design-system"]=e(t["@fortawesome/pro-light-svg-icons/faChevronDown"],t["@fortawesome/pro-light-svg-icons/faChevronUp"],t["@fortawesome/react-fontawesome"],t.classnames,t.react,t["react-bootstrap/Button"])}(self,(function(t,e,o,n,r,i){return(()=>{"use strict";var s,p={6627:(t,e,o)=>{o.d(e,{ZP:()=>p});var n=o(4329);function r(t){return r="function"==typeof Symbol&&"symbol"===(0,n.Z)(Symbol.iterator)?function(t){return(0,n.Z)(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":(0,n.Z)(t)},r(t)}function i(t,e,o){var n=o.value;if("function"!=typeof n)throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(r(n)));var i=!1;return{configurable:!0,get:function(){if(i||this===t.prototype||this.hasOwnProperty(e)||"function"!=typeof n)return n;var o=n.bind(this);return i=!0,Object.defineProperty(this,e,{configurable:!0,get:function(){return o},set:function(t){n=t,delete this[e]}}),i=!1,o},set:function(t){n=t}}}function s(t){var e;return"undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys?e=Reflect.ownKeys(t.prototype):(e=Object.getOwnPropertyNames(t.prototype),"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(t.prototype)))),e.forEach((function(e){if("constructor"!==e){var o=Object.getOwnPropertyDescriptor(t.prototype,e);"function"==typeof o.value&&Object.defineProperty(t.prototype,e,i(t,e,o))}})),t}function p(){return 1===arguments.length?s.apply(void 0,arguments):i.apply(void 0,arguments)}},4397:(t,e,o)=>{o.d(e,{z:()=>f});var n,r=o(8156),i=o.n(r),s=o(8310),p=o.n(s),c=o(8926),a=o.n(c),l=o(5692),u=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.renderIcon=function(){return null==this.props.icon?null:i().createElement(l.FontAwesomeIcon,{icon:this.props.icon})},e.prototype.renderChildren=function(){return null==this.props.children?null:i().createElement("span",{className:"btn-children"},this.props.children)},e.prototype.renderLeftSide=function(){return null==this.props.iconLeft?null==this.props.iconRight?null:i().createElement(l.FontAwesomeIcon,{icon:this.props.iconRight,className:"invisible"}):i().createElement(l.FontAwesomeIcon,{icon:this.props.iconLeft})},e.prototype.renderRightSide=function(){return null==this.props.iconRight?null==this.props.iconLeft?null:i().createElement(l.FontAwesomeIcon,{icon:this.props.iconLeft,className:"invisible"}):i().createElement(l.FontAwesomeIcon,{icon:this.props.iconRight})},e.prototype.renderContent=function(){return null!=this.props.icon&&null==this.props.children?this.renderIcon():i().createElement("div",{className:"button-content-center-container"},this.renderIcon(),this.renderChildren())},e.prototype.render=function(){var t=p()("atoka-btn","btn-".concat(this.props.size),this.props.className,{"btn-icon-only":null!=this.props.icon&&null==this.props.children});return i().createElement(a(),{className:t,variant:this.props.variant,disabled:this.props.disabled,block:this.props.block,onClick:this.props.onClick,href:this.props.href,target:this.props.target},this.renderLeftSide(),this.renderContent(),this.renderRightSide())},e.displayName="Button",e.defaultProps={variant:"primary",size:"md",disabled:!1,block:!1},e}(i().PureComponent)},7325:(t,e,o)=>{o.d(e,{Button:()=>n.z});var n=o(4397)},5478:(t,e,o)=>{o.r(e),o.d(e,{ButtonDropdown:()=>m});var n,r=o(8156),i=o.n(r),s=o(8310),p=o.n(s),c=o(6627),a=o(9153),l=o(1711),u=o(7325),f=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),d=function(){return d=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},d.apply(this,arguments)},h=function(t,e,o,n){var r,i=arguments.length,s=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(r=t[p])&&(s=(i<3?r(s):i>3?r(e,o,s):r(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},y=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.wrapperRef=i().createRef(),e.state={isButtonDropdownOpen:!1},e}return f(e,t),e.prototype.componentDidMount=function(){document.addEventListener("mousedown",this.handleClickOutside)},e.prototype.componentWillUnmount=function(){document.removeEventListener("mousedown",this.handleClickOutside)},e.prototype.handleClickOutside=function(t){var e,o;(null===(o=null===(e=this.wrapperRef)||void 0===e?void 0:e.current)||void 0===o?void 0:o.contains(t.target))||this.setState({isButtonDropdownOpen:!1})},e.prototype.onToggle=function(){this.setState({isButtonDropdownOpen:!this.state.isButtonDropdownOpen})},e.prototype.renderChildren=function(){return!0!==this.state.isButtonDropdownOpen?null:i().createElement("ul",{className:"dropdown-content"},this.props.children)},e.prototype.render=function(){var t=p()(this.props.className,"atoka-button-dropdown","position-relative","dropdown-".concat(this.props.size),"dropdown-primary",{"dropdown-is-open":this.state.isButtonDropdownOpen});return i().createElement("div",{className:t,ref:this.wrapperRef},i().createElement(u.Button,d({},this.props,{onClick:this.onToggle,block:!0,iconRight:this.state.isButtonDropdownOpen?a.faChevronUp:l.faChevronDown}),this.props.toggleText),this.renderChildren())},e.displayName="ButtonDropdown",e.defaultProps=u.Button.defaultProps,h([c.ZP,y("design:type",Function),y("design:paramtypes",[Object]),y("design:returntype",void 0)],e.prototype,"handleClickOutside",null),h([c.ZP,y("design:type",Function),y("design:paramtypes",[]),y("design:returntype",void 0)],e.prototype,"onToggle",null),e}(i().Component)},1711:e=>{e.exports=t},9153:t=>{t.exports=e},5692:t=>{t.exports=o},8310:t=>{t.exports=n},8156:t=>{t.exports=r},8926:t=>{t.exports=i},4329:(t,e,o)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}o.d(e,{Z:()=>n})}},c={};function a(t){var e=c[t];if(void 0!==e)return e.exports;var o=c[t]={exports:{}};return p[t](o,o.exports,a),o.exports}a.m=p,s=[],a.O=(t,e,o,n)=>{if(!e){var r=1/0;for(l=0;l<s.length;l++){for(var[e,o,n]=s[l],i=!0,p=0;p<e.length;p++)(!1&n||r>=n)&&Object.keys(a.O).every((t=>a.O[t](e[p])))?e.splice(p--,1):(i=!1,n<r&&(r=n));if(i){s.splice(l--,1);var c=o();void 0!==c&&(t=c)}}return t}n=n||0;for(var l=s.length;l>0&&s[l-1][2]>n;l--)s[l]=s[l-1];s[l]=[e,o,n]},a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var o in e)a.o(e,o)&&!a.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={9733:0,6615:0,8699:0};a.O.j=e=>0===t[e];var e=(e,o)=>{var n,r,[i,s,p]=o,c=0;if(i.some((e=>0!==t[e]))){for(n in s)a.o(s,n)&&(a.m[n]=s[n]);if(p)var l=p(a)}for(e&&e(o);c<i.length;c++)r=i[c],a.o(t,r)&&t[r]&&t[r][0](),t[i[c]]=0;return a.O(l)},o=self.webpackChunkatoka_design_system=self.webpackChunkatoka_design_system||[];o.forEach(e.bind(null,0)),o.push=e.bind(null,o.push.bind(o))})();var l=a.O(void 0,[8699],(()=>a(5478)));return l=a.O(l)})()}));