@spaziodati/atoka-design-system 2.0.72-beta
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/AddableItems/AddableItems.d.ts +72 -0
- package/AddableItems/ClickableExcludableItem.d.ts +23 -0
- package/AddableItems/ClickableItemList.d.ts +32 -0
- package/AddableItems/index.d.ts +1 -0
- package/AddableItems/index.js +1046 -0
- package/AddableItems/index.js.map +1 -0
- package/Alert/Alert.d.ts +37 -0
- package/Alert/index.d.ts +1 -0
- package/Alert/index.js +319 -0
- package/Alert/index.js.map +1 -0
- package/Badge/Badge.d.ts +38 -0
- package/Badge/index.d.ts +1 -0
- package/Badge/index.js +285 -0
- package/Badge/index.js.map +1 -0
- package/Bs4V3Wrapper/Bs4V3Wrapper.d.ts +7 -0
- package/Bs4V3Wrapper/StoryWrapper.d.ts +8 -0
- package/Bs4V3Wrapper/index.d.ts +1 -0
- package/Bs4V3Wrapper/index.js +251 -0
- package/Bs4V3Wrapper/index.js.map +1 -0
- package/BubbleChart/BubbleChart.d.ts +33 -0
- package/BubbleChart/BubbleChartUI.d.ts +31 -0
- package/BubbleChart/index.d.ts +1 -0
- package/BubbleChart/index.js +3793 -0
- package/BubbleChart/index.js.map +1 -0
- package/Button/Button.d.ts +29 -0
- package/Button/Button.storiesConfig.d.ts +68 -0
- package/Button/index.d.ts +1 -0
- package/Button/index.js +323 -0
- package/Button/index.js.map +1 -0
- package/ButtonDropdown/ButtonDropdown.d.ts +23 -0
- package/ButtonDropdown/index.d.ts +2 -0
- package/ButtonDropdown/index.js +603 -0
- package/ButtonDropdown/index.js.map +1 -0
- package/CardsPage/CardsPage.d.ts +12 -0
- package/CardsPage/CardsPageActions.d.ts +2 -0
- package/CardsPage/CardsPageCards.d.ts +5 -0
- package/CardsPage/CardsPageCardsCounter.d.ts +7 -0
- package/CardsPage/CardsPageFilters.d.ts +3 -0
- package/CardsPage/CardsPageHeader.d.ts +11 -0
- package/CardsPage/CardsPageLayoutMode.d.ts +13 -0
- package/CardsPage/CardsPageSelectionActions.d.ts +17 -0
- package/CardsPage/CardsPageSelectionToggler.d.ts +8 -0
- package/CardsPage/CardsPageSorting.d.ts +15 -0
- package/CardsPage/CardsPageSubtitle.d.ts +2 -0
- package/CardsPage/CardsPageTabContent.d.ts +19 -0
- package/CardsPage/CardsPageTabSwitcher.d.ts +3 -0
- package/CardsPage/CardsPageTitle.d.ts +2 -0
- package/CardsPage/index.d.ts +2 -0
- package/CardsPage/index.js +2511 -0
- package/CardsPage/index.js.map +1 -0
- package/CursorPagination/CursorPagination.d.ts +21 -0
- package/CursorPagination/index.d.ts +1 -0
- package/CursorPagination/index.js +952 -0
- package/CursorPagination/index.js.map +1 -0
- package/DatePicker/DatePicker.d.ts +27 -0
- package/DatePicker/index.d.ts +1 -0
- package/DatePicker/index.js +452 -0
- package/DatePicker/index.js.map +1 -0
- package/DetailPage/DetailPage.d.ts +18 -0
- package/DetailPage/DetailPageBodyContainer.d.ts +2 -0
- package/DetailPage/DetailPageBodySection.d.ts +3 -0
- package/DetailPage/DetailPageHeaderContainer.d.ts +7 -0
- package/DetailPage/DetailPageHeaderUI.d.ts +12 -0
- package/DetailPage/DetailPageMenuContainer.d.ts +2 -0
- package/DetailPage/DetailPageMenuUI.d.ts +4 -0
- package/DetailPage/index.d.ts +1 -0
- package/DetailPage/index.js +2066 -0
- package/DetailPage/index.js.map +1 -0
- package/Dropdown/AtokaDropdownToggles.d.ts +11 -0
- package/Dropdown/Dropdown.d.ts +12 -0
- package/Dropdown/DropdownMenu.d.ts +7 -0
- package/Dropdown/index.d.ts +3 -0
- package/Dropdown/index.js +723 -0
- package/Dropdown/index.js.map +1 -0
- package/EditableString/EditableString.d.ts +42 -0
- package/EditableString/index.d.ts +1 -0
- package/EditableString/index.js +3321 -0
- package/EditableString/index.js.map +1 -0
- package/EllipsableContent/EllipsableContent.d.ts +18 -0
- package/EllipsableContent/index.d.ts +1 -0
- package/EllipsableContent/index.js +784 -0
- package/EllipsableContent/index.js.map +1 -0
- package/EmptyState/EmptyState.d.ts +12 -0
- package/EmptyState/index.d.ts +1 -0
- package/EmptyState/index.js +278 -0
- package/EmptyState/index.js.map +1 -0
- package/Facet/Facet.d.ts +21 -0
- package/Facet/FacetHelp.d.ts +28 -0
- package/Facet/FacetItemCount.d.ts +7 -0
- package/Facet/FacetSubtitle.d.ts +2 -0
- package/Facet/index.d.ts +1 -0
- package/Facet/index.js +914 -0
- package/Facet/index.js.map +1 -0
- package/FacetSection/FacetSection.d.ts +21 -0
- package/FacetSection/index.d.ts +1 -0
- package/FacetSection/index.js +443 -0
- package/FacetSection/index.js.map +1 -0
- package/FadeAnimation/FadeAnimation.d.ts +14 -0
- package/FadeAnimation/index.d.ts +1 -0
- package/FadeAnimation/index.js +1228 -0
- package/FadeAnimation/index.js.map +1 -0
- package/FeedbackButton/FeedbackButton.d.ts +19 -0
- package/FeedbackButton/index.d.ts +1 -0
- package/FeedbackButton/index.js +398 -0
- package/FeedbackButton/index.js.map +1 -0
- package/Form/Form.d.ts +23 -0
- package/Form/FormCheckbox.d.ts +10 -0
- package/Form/FormControl.d.ts +23 -0
- package/Form/FormControlFeedBack.d.ts +6 -0
- package/Form/FormHelp.d.ts +7 -0
- package/Form/FormLabel.d.ts +4 -0
- package/Form/FormRadio.d.ts +10 -0
- package/Form/index.d.ts +1 -0
- package/Form/index.js +450 -0
- package/Form/index.js.map +1 -0
- package/Funnel/Funnel.d.ts +54 -0
- package/Funnel/SVGDataLabel.d.ts +11 -0
- package/Funnel/index.d.ts +1 -0
- package/Funnel/index.js +3997 -0
- package/Funnel/index.js.map +1 -0
- package/GridCard/Fixtures.d.ts +3 -0
- package/GridCard/GridCard.d.ts +20 -0
- package/GridCard/GridCardContent.d.ts +2 -0
- package/GridCard/GridCardFooter.d.ts +2 -0
- package/GridCard/GridCardHeader.d.ts +14 -0
- package/GridCard/GridCardMenu.d.ts +2 -0
- package/GridCard/GridCardTags.d.ts +2 -0
- package/GridCard/GridCardTitle.d.ts +6 -0
- package/GridCard/index.d.ts +1 -0
- package/GridCard/index.js +1618 -0
- package/GridCard/index.js.map +1 -0
- package/HighlightableText/HighlightableText.d.ts +21 -0
- package/HighlightableText/index.d.ts +1 -0
- package/HighlightableText/index.js +624 -0
- package/HighlightableText/index.js.map +1 -0
- package/Histogram/Histogram.d.ts +126 -0
- package/Histogram/Types.d.ts +19 -0
- package/Histogram/index.d.ts +1 -0
- package/Histogram/index.js +2359 -0
- package/Histogram/index.js.map +1 -0
- package/InlineStringEditor/InlineStringEditor.d.ts +49 -0
- package/InlineStringEditor/index.d.ts +1 -0
- package/InlineStringEditor/index.js +1882 -0
- package/InlineStringEditor/index.js.map +1 -0
- package/InputGroup/InputGroup.d.ts +16 -0
- package/InputGroup/InputGroupText.d.ts +2 -0
- package/InputGroup/index.d.ts +1 -0
- package/InputGroup/index.js +279 -0
- package/InputGroup/index.js.map +1 -0
- package/Jumbotron/Jumbotron.d.ts +16 -0
- package/Jumbotron/index.d.ts +1 -0
- package/Jumbotron/index.js +270 -0
- package/Jumbotron/index.js.map +1 -0
- package/Map/Map.d.ts +27 -0
- package/Map/MapChoropleth.d.ts +31 -0
- package/Map/MapControl.d.ts +13 -0
- package/Map/MapLegendContent.d.ts +27 -0
- package/Map/MapPopup.d.ts +5 -0
- package/Map/MapUtils.d.ts +2 -0
- package/Map/Types.d.ts +38 -0
- package/Map/index.d.ts +2 -0
- package/Map/index.js +4810 -0
- package/Map/index.js.map +1 -0
- package/Modal/Modal.d.ts +32 -0
- package/Modal/index.d.ts +1 -0
- package/Modal/index.js +743 -0
- package/Modal/index.js.map +1 -0
- package/Navbar/Navbar.d.ts +42 -0
- package/Navbar/NavbarMobileMenuCollapse.d.ts +3 -0
- package/Navbar/NavbarMobileMenuToggle.d.ts +3 -0
- package/Navbar/NavbarNavigationMenu.d.ts +9 -0
- package/Navbar/NavbarNavigationMenuItem.d.ts +9 -0
- package/Navbar/NavbarNinjaMenu.d.ts +6 -0
- package/Navbar/NavbarNinjaMenuItem.d.ts +6 -0
- package/Navbar/NavbarNotificationMenu.d.ts +12 -0
- package/Navbar/NavbarNotificationMenuItem.d.ts +8 -0
- package/Navbar/NavbarOverlaySearch.d.ts +28 -0
- package/Navbar/NavbarOverlaySearchCard.d.ts +9 -0
- package/Navbar/NavbarOverlaySearchResults.d.ts +12 -0
- package/Navbar/NavbarUserMenu.d.ts +9 -0
- package/Navbar/NavbarUserMenuItem.d.ts +6 -0
- package/Navbar/index.d.ts +1 -0
- package/Navbar/index.js +3521 -0
- package/Navbar/index.js.map +1 -0
- package/Pagination/Pagination.d.ts +27 -0
- package/Pagination/PaginationNext.d.ts +7 -0
- package/Pagination/PaginationPrev.d.ts +7 -0
- package/Pagination/index.d.ts +1 -0
- package/Pagination/index.js +994 -0
- package/Pagination/index.js.map +1 -0
- package/PieChart/PieChart.d.ts +71 -0
- package/PieChart/index.d.ts +1 -0
- package/PieChart/index.js +1986 -0
- package/PieChart/index.js.map +1 -0
- package/PublicFooter/PublicFooter.d.ts +6 -0
- package/PublicFooter/index.d.ts +1 -0
- package/PublicFooter/index.js +454 -0
- package/PublicFooter/index.js.map +1 -0
- package/PublicNavbar/PublicNavbar.d.ts +6 -0
- package/PublicNavbar/index.d.ts +1 -0
- package/PublicNavbar/index.js +255 -0
- package/PublicNavbar/index.js.map +1 -0
- package/RecordBit/RecordBit.d.ts +14 -0
- package/RecordBit/index.d.ts +1 -0
- package/RecordBit/index.js +482 -0
- package/RecordBit/index.js.map +1 -0
- package/ResultItemCard/ResultItemCard.d.ts +19 -0
- package/ResultItemCard/ResultItemCardActions.d.ts +3 -0
- package/ResultItemCard/ResultItemCardFooter.d.ts +6 -0
- package/ResultItemCard/ResultItemCardImage.d.ts +6 -0
- package/ResultItemCard/ResultItemCardSubtitle.d.ts +6 -0
- package/ResultItemCard/ResultItemCardText.d.ts +7 -0
- package/ResultItemCard/ResultItemCardTitle.d.ts +7 -0
- package/ResultItemCard/index.d.ts +1 -0
- package/ResultItemCard/index.js +1067 -0
- package/ResultItemCard/index.js.map +1 -0
- package/SelectDropdown/SelectDropdown.d.ts +29 -0
- package/SelectDropdown/index.d.ts +1 -0
- package/SelectDropdown/index.js +1520 -0
- package/SelectDropdown/index.js.map +1 -0
- package/Spinner/Spinner.d.ts +32 -0
- package/Spinner/index.d.ts +1 -0
- package/Spinner/index.js +325 -0
- package/Spinner/index.js.map +1 -0
- package/StatisticsItemCard/StatisticsItemCard.d.ts +35 -0
- package/StatisticsItemCard/index.d.ts +1 -0
- package/StatisticsItemCard/index.js +1786 -0
- package/StatisticsItemCard/index.js.map +1 -0
- package/StatisticsItemNumeric/StatisticsItemNumeric.d.ts +18 -0
- package/StatisticsItemNumeric/index.d.ts +1 -0
- package/StatisticsItemNumeric/index.js +283 -0
- package/StatisticsItemNumeric/index.js.map +1 -0
- package/StatisticsLegend/StatisticsLegend.d.ts +35 -0
- package/StatisticsLegend/StatisticsLegendItem.d.ts +50 -0
- package/StatisticsLegend/StatisticsSVGLegend.d.ts +26 -0
- package/StatisticsLegend/helpers.d.ts +19 -0
- package/StatisticsLegend/index.d.ts +3 -0
- package/StatisticsLegend/index.js +1571 -0
- package/StatisticsLegend/index.js.map +1 -0
- package/StatisticsTooltip/StatisticsTooltip.d.ts +20 -0
- package/StatisticsTooltip/helpers.d.ts +19 -0
- package/StatisticsTooltip/index.d.ts +2 -0
- package/StatisticsTooltip/index.js +796 -0
- package/StatisticsTooltip/index.js.map +1 -0
- package/Suggester/CustomOption.d.ts +29 -0
- package/Suggester/InputValueContainer.d.ts +11 -0
- package/Suggester/Suggester.d.ts +80 -0
- package/Suggester/getRenderCustomMultiValueWithIcon.d.ts +6 -0
- package/Suggester/index.d.ts +3 -0
- package/Suggester/index.js +1126 -0
- package/Suggester/index.js.map +1 -0
- package/SunBurst/SunBurst.d.ts +61 -0
- package/SunBurst/index.d.ts +2 -0
- package/SunBurst/index.js +1170 -0
- package/SunBurst/index.js.map +1 -0
- package/TabSwitcher/TabSwitcher.d.ts +35 -0
- package/TabSwitcher/TabSwitcherChoice.d.ts +21 -0
- package/TabSwitcher/index.d.ts +1 -0
- package/TabSwitcher/index.js +1135 -0
- package/TabSwitcher/index.js.map +1 -0
- package/Title/Title.d.ts +16 -0
- package/Title/index.d.ts +1 -0
- package/Title/index.js +302 -0
- package/Title/index.js.map +1 -0
- package/ToggleButtonGroup/ToggleButton.d.ts +15 -0
- package/ToggleButtonGroup/ToggleButtonGroup.d.ts +24 -0
- package/ToggleButtonGroup/index.d.ts +1 -0
- package/ToggleButtonGroup/index.js +609 -0
- package/ToggleButtonGroup/index.js.map +1 -0
- package/Tooltip/Tooltip.d.ts +20 -0
- package/Tooltip/index.d.ts +1 -0
- package/Tooltip/index.js +291 -0
- package/Tooltip/index.js.map +1 -0
- package/Utils/CommonTypes.d.ts +29 -0
- package/Utils/Statistics.d.ts +3 -0
- package/Utils/Style.d.ts +5 -0
- package/Utils/Text.d.ts +12 -0
- package/Utils/Utils.d.ts +12 -0
- package/Utils/index.d.ts +5 -0
- package/Utils/index.js +3379 -0
- package/Utils/index.js.map +1 -0
- package/atoka-design-system-2.0.72-beta.min.css +1 -0
- package/commonFixtures.d.ts +1 -0
- package/index.d.ts +51 -0
- package/index.js +15343 -0
- package/index.js.map +1 -0
- package/package.json +157 -0
- package/styles/animations-mixin.less +28 -0
- package/styles/atoka-bootstrap-fixed-mixins.less +81 -0
- package/styles/atoka-bootstrap-variables.less +70 -0
- package/styles/atoka-bs.less +99 -0
- package/styles/atoka-namespaced-bs.less +28 -0
- package/styles/variables.less +106 -0
- package/styles/variant-mixins.less +96 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { SyntheticEvent } from 'react';
|
|
2
|
+
import './Button.less';
|
|
3
|
+
import { IconDefinition } from '@fortawesome/pro-light-svg-icons';
|
|
4
|
+
import { PropsWithClassName } from '../Utils';
|
|
5
|
+
declare type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'tertiary-danger' | 'danger' | 'primary-orange' | 'primary-white' | 'primary-danger';
|
|
6
|
+
declare type ButtonSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg';
|
|
7
|
+
interface ButtonProps extends PropsWithClassName {
|
|
8
|
+
variant: ButtonVariant;
|
|
9
|
+
size: ButtonSize;
|
|
10
|
+
icon?: IconDefinition;
|
|
11
|
+
iconLeft?: IconDefinition;
|
|
12
|
+
iconRight?: IconDefinition;
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
block: boolean;
|
|
15
|
+
onClick?: (e?: SyntheticEvent) => void;
|
|
16
|
+
href?: string;
|
|
17
|
+
target?: string;
|
|
18
|
+
}
|
|
19
|
+
declare class Button extends React.PureComponent<ButtonProps> {
|
|
20
|
+
static displayName: string;
|
|
21
|
+
static defaultProps: Partial<ButtonProps>;
|
|
22
|
+
private renderIcon;
|
|
23
|
+
private renderChildren;
|
|
24
|
+
private renderLeftSide;
|
|
25
|
+
private renderRightSide;
|
|
26
|
+
private renderContent;
|
|
27
|
+
render(): React.ReactNode;
|
|
28
|
+
}
|
|
29
|
+
export { Button, ButtonVariant, ButtonSize, ButtonProps };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button } from './Button';
|
|
3
|
+
export declare const config: {
|
|
4
|
+
component: typeof Button;
|
|
5
|
+
title: string;
|
|
6
|
+
decorators: ((storyFn: () => React.ReactNode) => React.ReactNode)[];
|
|
7
|
+
parameters: {
|
|
8
|
+
controls: {
|
|
9
|
+
hideNoControlsWarning: boolean;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
argTypes: {
|
|
13
|
+
onClick: {
|
|
14
|
+
action: string;
|
|
15
|
+
table: {
|
|
16
|
+
category: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
icon: {
|
|
20
|
+
control: {
|
|
21
|
+
disable: boolean;
|
|
22
|
+
};
|
|
23
|
+
table: {
|
|
24
|
+
category: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
iconLeft: {
|
|
28
|
+
control: {
|
|
29
|
+
disable: boolean;
|
|
30
|
+
};
|
|
31
|
+
table: {
|
|
32
|
+
category: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
iconRight: {
|
|
36
|
+
control: {
|
|
37
|
+
disable: boolean;
|
|
38
|
+
};
|
|
39
|
+
table: {
|
|
40
|
+
category: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
href: {
|
|
44
|
+
control: {
|
|
45
|
+
disable: boolean;
|
|
46
|
+
};
|
|
47
|
+
table: {
|
|
48
|
+
category: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
target: {
|
|
52
|
+
control: {
|
|
53
|
+
disable: boolean;
|
|
54
|
+
};
|
|
55
|
+
table: {
|
|
56
|
+
category: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
className: {
|
|
60
|
+
control: {
|
|
61
|
+
disable: boolean;
|
|
62
|
+
};
|
|
63
|
+
table: {
|
|
64
|
+
category: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Button';
|
package/Button/index.js
ADDED
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
+
module.exports = factory(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/react-fontawesome", "classnames", "react", "react-bootstrap/Button"], factory);
|
|
6
|
+
else if(typeof exports === 'object')
|
|
7
|
+
exports["atoka-design-system"] = factory(require("@fortawesome/react-fontawesome"), require("classnames"), require("react"), require("react-bootstrap/Button"));
|
|
8
|
+
else
|
|
9
|
+
root["atoka-design-system"] = factory(root["@fortawesome/react-fontawesome"], root["classnames"], root["react"], root["react-bootstrap/Button"]);
|
|
10
|
+
})(self, function(__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
|
+
/***/ 1710:
|
|
16
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
17
|
+
|
|
18
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
19
|
+
/* harmony export */ "z": () => (/* binding */ Button)
|
|
20
|
+
/* harmony export */ });
|
|
21
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8156);
|
|
22
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
23
|
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8310);
|
|
24
|
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);
|
|
25
|
+
/* harmony import */ var react_bootstrap_Button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8926);
|
|
26
|
+
/* harmony import */ var react_bootstrap_Button__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_bootstrap_Button__WEBPACK_IMPORTED_MODULE_2__);
|
|
27
|
+
/* harmony import */ var _fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5692);
|
|
28
|
+
/* harmony import */ var _fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_3__);
|
|
29
|
+
var __extends = (undefined && undefined.__extends) || (function () {
|
|
30
|
+
var extendStatics = function (d, b) {
|
|
31
|
+
extendStatics = Object.setPrototypeOf ||
|
|
32
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
33
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
34
|
+
return extendStatics(d, b);
|
|
35
|
+
};
|
|
36
|
+
return function (d, b) {
|
|
37
|
+
extendStatics(d, b);
|
|
38
|
+
function __() { this.constructor = d; }
|
|
39
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
40
|
+
};
|
|
41
|
+
})();
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
var Button = /** @class */ (function (_super) {
|
|
48
|
+
__extends(Button, _super);
|
|
49
|
+
function Button() {
|
|
50
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
51
|
+
}
|
|
52
|
+
Button.prototype.renderIcon = function () {
|
|
53
|
+
if (this.props.icon == null) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_3__.FontAwesomeIcon, { icon: this.props.icon });
|
|
57
|
+
};
|
|
58
|
+
Button.prototype.renderChildren = function () {
|
|
59
|
+
if (this.props.children == null) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: 'btn-children' }, this.props.children);
|
|
63
|
+
};
|
|
64
|
+
Button.prototype.renderLeftSide = function () {
|
|
65
|
+
if (this.props.iconLeft == null) {
|
|
66
|
+
if (this.props.iconRight == null) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_3__.FontAwesomeIcon, { icon: this.props.iconRight, className: 'invisible' });
|
|
70
|
+
}
|
|
71
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_3__.FontAwesomeIcon, { icon: this.props.iconLeft });
|
|
72
|
+
};
|
|
73
|
+
Button.prototype.renderRightSide = function () {
|
|
74
|
+
if (this.props.iconRight == null) {
|
|
75
|
+
if (this.props.iconLeft == null) {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_3__.FontAwesomeIcon, { icon: this.props.iconLeft, className: 'invisible' });
|
|
79
|
+
}
|
|
80
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_3__.FontAwesomeIcon, { icon: this.props.iconRight });
|
|
81
|
+
};
|
|
82
|
+
Button.prototype.renderContent = function () {
|
|
83
|
+
if (this.props.icon != null && this.props.children == null) {
|
|
84
|
+
return this.renderIcon();
|
|
85
|
+
}
|
|
86
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: 'button-content-center-container' },
|
|
87
|
+
this.renderIcon(),
|
|
88
|
+
this.renderChildren()));
|
|
89
|
+
};
|
|
90
|
+
Button.prototype.render = function () {
|
|
91
|
+
var className = classnames__WEBPACK_IMPORTED_MODULE_1___default()('atoka-btn', "btn-" + this.props.size, this.props.className, {
|
|
92
|
+
'btn-icon-only': this.props.icon != null && this.props.children == null,
|
|
93
|
+
});
|
|
94
|
+
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 },
|
|
95
|
+
this.renderLeftSide(),
|
|
96
|
+
this.renderContent(),
|
|
97
|
+
this.renderRightSide()));
|
|
98
|
+
};
|
|
99
|
+
Button.displayName = 'Button';
|
|
100
|
+
Button.defaultProps = {
|
|
101
|
+
variant: 'primary',
|
|
102
|
+
size: 'md',
|
|
103
|
+
disabled: false,
|
|
104
|
+
block: false,
|
|
105
|
+
};
|
|
106
|
+
return Button;
|
|
107
|
+
}((react__WEBPACK_IMPORTED_MODULE_0___default().PureComponent)));
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
/***/ }),
|
|
112
|
+
|
|
113
|
+
/***/ 125:
|
|
114
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
115
|
+
|
|
116
|
+
__webpack_require__.r(__webpack_exports__);
|
|
117
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
118
|
+
/* harmony export */ "Button": () => (/* reexport safe */ _Button__WEBPACK_IMPORTED_MODULE_0__.z)
|
|
119
|
+
/* harmony export */ });
|
|
120
|
+
/* harmony import */ var _Button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1710);
|
|
121
|
+
// use the star because of this issue: https://github.com/babel/babel-loader/issues/603
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
/***/ }),
|
|
126
|
+
|
|
127
|
+
/***/ 5692:
|
|
128
|
+
/***/ ((module) => {
|
|
129
|
+
|
|
130
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__5692__;
|
|
131
|
+
|
|
132
|
+
/***/ }),
|
|
133
|
+
|
|
134
|
+
/***/ 8310:
|
|
135
|
+
/***/ ((module) => {
|
|
136
|
+
|
|
137
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__8310__;
|
|
138
|
+
|
|
139
|
+
/***/ }),
|
|
140
|
+
|
|
141
|
+
/***/ 8156:
|
|
142
|
+
/***/ ((module) => {
|
|
143
|
+
|
|
144
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__8156__;
|
|
145
|
+
|
|
146
|
+
/***/ }),
|
|
147
|
+
|
|
148
|
+
/***/ 8926:
|
|
149
|
+
/***/ ((module) => {
|
|
150
|
+
|
|
151
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__8926__;
|
|
152
|
+
|
|
153
|
+
/***/ })
|
|
154
|
+
|
|
155
|
+
/******/ });
|
|
156
|
+
/************************************************************************/
|
|
157
|
+
/******/ // The module cache
|
|
158
|
+
/******/ var __webpack_module_cache__ = {};
|
|
159
|
+
/******/
|
|
160
|
+
/******/ // The require function
|
|
161
|
+
/******/ function __webpack_require__(moduleId) {
|
|
162
|
+
/******/ // Check if module is in cache
|
|
163
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
164
|
+
/******/ if (cachedModule !== undefined) {
|
|
165
|
+
/******/ return cachedModule.exports;
|
|
166
|
+
/******/ }
|
|
167
|
+
/******/ // Create a new module (and put it into the cache)
|
|
168
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
169
|
+
/******/ // no module.id needed
|
|
170
|
+
/******/ // no module.loaded needed
|
|
171
|
+
/******/ exports: {}
|
|
172
|
+
/******/ };
|
|
173
|
+
/******/
|
|
174
|
+
/******/ // Execute the module function
|
|
175
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
176
|
+
/******/
|
|
177
|
+
/******/ // Return the exports of the module
|
|
178
|
+
/******/ return module.exports;
|
|
179
|
+
/******/ }
|
|
180
|
+
/******/
|
|
181
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
182
|
+
/******/ __webpack_require__.m = __webpack_modules__;
|
|
183
|
+
/******/
|
|
184
|
+
/************************************************************************/
|
|
185
|
+
/******/ /* webpack/runtime/chunk loaded */
|
|
186
|
+
/******/ (() => {
|
|
187
|
+
/******/ var deferred = [];
|
|
188
|
+
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
|
|
189
|
+
/******/ if(chunkIds) {
|
|
190
|
+
/******/ priority = priority || 0;
|
|
191
|
+
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
|
|
192
|
+
/******/ deferred[i] = [chunkIds, fn, priority];
|
|
193
|
+
/******/ return;
|
|
194
|
+
/******/ }
|
|
195
|
+
/******/ var notFulfilled = Infinity;
|
|
196
|
+
/******/ for (var i = 0; i < deferred.length; i++) {
|
|
197
|
+
/******/ var [chunkIds, fn, priority] = deferred[i];
|
|
198
|
+
/******/ var fulfilled = true;
|
|
199
|
+
/******/ for (var j = 0; j < chunkIds.length; j++) {
|
|
200
|
+
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
|
|
201
|
+
/******/ chunkIds.splice(j--, 1);
|
|
202
|
+
/******/ } else {
|
|
203
|
+
/******/ fulfilled = false;
|
|
204
|
+
/******/ if(priority < notFulfilled) notFulfilled = priority;
|
|
205
|
+
/******/ }
|
|
206
|
+
/******/ }
|
|
207
|
+
/******/ if(fulfilled) {
|
|
208
|
+
/******/ deferred.splice(i--, 1)
|
|
209
|
+
/******/ var r = fn();
|
|
210
|
+
/******/ if (r !== undefined) result = r;
|
|
211
|
+
/******/ }
|
|
212
|
+
/******/ }
|
|
213
|
+
/******/ return result;
|
|
214
|
+
/******/ };
|
|
215
|
+
/******/ })();
|
|
216
|
+
/******/
|
|
217
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
218
|
+
/******/ (() => {
|
|
219
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
220
|
+
/******/ __webpack_require__.n = (module) => {
|
|
221
|
+
/******/ var getter = module && module.__esModule ?
|
|
222
|
+
/******/ () => (module['default']) :
|
|
223
|
+
/******/ () => (module);
|
|
224
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
225
|
+
/******/ return getter;
|
|
226
|
+
/******/ };
|
|
227
|
+
/******/ })();
|
|
228
|
+
/******/
|
|
229
|
+
/******/ /* webpack/runtime/define property getters */
|
|
230
|
+
/******/ (() => {
|
|
231
|
+
/******/ // define getter functions for harmony exports
|
|
232
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
233
|
+
/******/ for(var key in definition) {
|
|
234
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
235
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
236
|
+
/******/ }
|
|
237
|
+
/******/ }
|
|
238
|
+
/******/ };
|
|
239
|
+
/******/ })();
|
|
240
|
+
/******/
|
|
241
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
242
|
+
/******/ (() => {
|
|
243
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
244
|
+
/******/ })();
|
|
245
|
+
/******/
|
|
246
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
247
|
+
/******/ (() => {
|
|
248
|
+
/******/ // define __esModule on exports
|
|
249
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
250
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
251
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
252
|
+
/******/ }
|
|
253
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
254
|
+
/******/ };
|
|
255
|
+
/******/ })();
|
|
256
|
+
/******/
|
|
257
|
+
/******/ /* webpack/runtime/jsonp chunk loading */
|
|
258
|
+
/******/ (() => {
|
|
259
|
+
/******/ // no baseURI
|
|
260
|
+
/******/
|
|
261
|
+
/******/ // object to store loaded and loading chunks
|
|
262
|
+
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
|
263
|
+
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
|
264
|
+
/******/ var installedChunks = {
|
|
265
|
+
/******/ 6615: 0,
|
|
266
|
+
/******/ 1981: 0
|
|
267
|
+
/******/ };
|
|
268
|
+
/******/
|
|
269
|
+
/******/ // no chunk on demand loading
|
|
270
|
+
/******/
|
|
271
|
+
/******/ // no prefetching
|
|
272
|
+
/******/
|
|
273
|
+
/******/ // no preloaded
|
|
274
|
+
/******/
|
|
275
|
+
/******/ // no HMR
|
|
276
|
+
/******/
|
|
277
|
+
/******/ // no HMR manifest
|
|
278
|
+
/******/
|
|
279
|
+
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
|
|
280
|
+
/******/
|
|
281
|
+
/******/ // install a JSONP callback for chunk loading
|
|
282
|
+
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
|
283
|
+
/******/ var [chunkIds, moreModules, runtime] = data;
|
|
284
|
+
/******/ // add "moreModules" to the modules object,
|
|
285
|
+
/******/ // then flag all "chunkIds" as loaded and fire callback
|
|
286
|
+
/******/ var moduleId, chunkId, i = 0;
|
|
287
|
+
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
|
288
|
+
/******/ for(moduleId in moreModules) {
|
|
289
|
+
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
|
290
|
+
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
|
291
|
+
/******/ }
|
|
292
|
+
/******/ }
|
|
293
|
+
/******/ if(runtime) var result = runtime(__webpack_require__);
|
|
294
|
+
/******/ }
|
|
295
|
+
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
|
296
|
+
/******/ for(;i < chunkIds.length; i++) {
|
|
297
|
+
/******/ chunkId = chunkIds[i];
|
|
298
|
+
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
|
299
|
+
/******/ installedChunks[chunkId][0]();
|
|
300
|
+
/******/ }
|
|
301
|
+
/******/ installedChunks[chunkIds[i]] = 0;
|
|
302
|
+
/******/ }
|
|
303
|
+
/******/ return __webpack_require__.O(result);
|
|
304
|
+
/******/ }
|
|
305
|
+
/******/
|
|
306
|
+
/******/ var chunkLoadingGlobal = self["webpackChunkatoka_design_system"] = self["webpackChunkatoka_design_system"] || [];
|
|
307
|
+
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
|
308
|
+
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
|
309
|
+
/******/ })();
|
|
310
|
+
/******/
|
|
311
|
+
/************************************************************************/
|
|
312
|
+
/******/
|
|
313
|
+
/******/ // startup
|
|
314
|
+
/******/ // Load entry module and return exports
|
|
315
|
+
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
|
316
|
+
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, [1981], () => (__webpack_require__(125)))
|
|
317
|
+
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
|
318
|
+
/******/
|
|
319
|
+
/******/ return __webpack_exports__;
|
|
320
|
+
/******/ })()
|
|
321
|
+
;
|
|
322
|
+
});
|
|
323
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button/index.js","mappings":"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CA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://atoka-design-system/webpack/universalModuleDefinition","webpack://atoka-design-system/./src/components/Button/Button.tsx","webpack://atoka-design-system/./src/components/Button/index.ts","webpack://atoka-design-system/external umd \"@fortawesome/react-fontawesome\"","webpack://atoka-design-system/external umd \"classnames\"","webpack://atoka-design-system/external umd \"react\"","webpack://atoka-design-system/external umd \"react-bootstrap/Button\"","webpack://atoka-design-system/webpack/bootstrap","webpack://atoka-design-system/webpack/runtime/chunk loaded","webpack://atoka-design-system/webpack/runtime/compat get default export","webpack://atoka-design-system/webpack/runtime/define property getters","webpack://atoka-design-system/webpack/runtime/hasOwnProperty shorthand","webpack://atoka-design-system/webpack/runtime/make namespace object","webpack://atoka-design-system/webpack/runtime/jsonp chunk loading","webpack://atoka-design-system/webpack/before-startup","webpack://atoka-design-system/webpack/startup","webpack://atoka-design-system/webpack/after-startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@fortawesome/react-fontawesome\"), require(\"classnames\"), require(\"react\"), require(\"react-bootstrap/Button\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"atoka-design-system\", [\"@fortawesome/react-fontawesome\", \"classnames\", \"react\", \"react-bootstrap/Button\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"atoka-design-system\"] = factory(require(\"@fortawesome/react-fontawesome\"), require(\"classnames\"), require(\"react\"), require(\"react-bootstrap/Button\"));\n\telse\n\t\troot[\"atoka-design-system\"] = factory(root[\"@fortawesome/react-fontawesome\"], root[\"classnames\"], root[\"react\"], root[\"react-bootstrap/Button\"]);\n})(self, function(__WEBPACK_EXTERNAL_MODULE__5692__, __WEBPACK_EXTERNAL_MODULE__8310__, __WEBPACK_EXTERNAL_MODULE__8156__, __WEBPACK_EXTERNAL_MODULE__8926__) {\nreturn ","import React, {SyntheticEvent} from 'react';\nimport classnames from 'classnames';\nimport BsButton from 'react-bootstrap/Button';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\n\nimport './Button.less';\nimport {IconDefinition} from '@fortawesome/pro-light-svg-icons';\nimport {PropsWithClassName} from '../Utils';\n\ntype ButtonVariant =\n | 'primary'\n | 'secondary'\n | 'tertiary'\n | 'tertiary-danger'\n | 'danger'\n | 'primary-orange'\n | 'primary-white'\n | 'primary-danger';\ntype ButtonSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg';\ninterface ButtonProps extends PropsWithClassName {\n variant: ButtonVariant;\n size: ButtonSize;\n\n icon?: IconDefinition;\n iconLeft?: IconDefinition;\n iconRight?: IconDefinition;\n\n disabled: boolean;\n block: boolean;\n\n onClick?: (e?: SyntheticEvent) => void;\n\n href?: string;\n target?: string;\n}\n\nclass Button extends React.PureComponent<ButtonProps> {\n static displayName: string = 'Button';\n\n public static defaultProps: Partial<ButtonProps> = {\n variant: 'primary',\n size: 'md',\n disabled: false,\n block: false,\n };\n\n private renderIcon(): React.ReactNode {\n if (this.props.icon == null) {\n return null;\n }\n\n return <FontAwesomeIcon icon={this.props.icon} />;\n }\n\n private renderChildren(): React.ReactNode {\n if (this.props.children == null) {\n return null;\n }\n\n return <span className='btn-children'>{this.props.children}</span>;\n }\n\n private renderLeftSide(): React.ReactNode {\n if (this.props.iconLeft == null) {\n if (this.props.iconRight == null) {\n return null;\n }\n return <FontAwesomeIcon icon={this.props.iconRight} className='invisible' />;\n }\n\n return <FontAwesomeIcon icon={this.props.iconLeft} />;\n }\n\n private renderRightSide(): React.ReactNode {\n if (this.props.iconRight == null) {\n if (this.props.iconLeft == null) {\n return null;\n }\n return <FontAwesomeIcon icon={this.props.iconLeft} className='invisible' />;\n }\n\n return <FontAwesomeIcon icon={this.props.iconRight} />;\n }\n\n private renderContent(): React.ReactNode {\n if (this.props.icon != null && this.props.children == null) {\n return this.renderIcon();\n }\n\n return (\n <div className='button-content-center-container'>\n {this.renderIcon()}\n {this.renderChildren()}\n </div>\n );\n }\n\n public render(): React.ReactNode {\n const className: string = classnames('atoka-btn', `btn-${this.props.size}`, this.props.className, {\n 'btn-icon-only': this.props.icon != null && this.props.children == null,\n });\n\n return (\n <BsButton\n className={className}\n variant={this.props.variant}\n disabled={this.props.disabled}\n block={this.props.block}\n onClick={this.props.onClick}\n href={this.props.href}\n target={this.props.target}\n >\n {this.renderLeftSide()}\n {this.renderContent()}\n {this.renderRightSide()}\n </BsButton>\n );\n }\n}\n\nexport {Button, ButtonVariant, ButtonSize, ButtonProps};\n","// use the star because of this issue: https://github.com/babel/babel-loader/issues/603\nexport * from './Button';\n","module.exports = __WEBPACK_EXTERNAL_MODULE__5692__;","module.exports = __WEBPACK_EXTERNAL_MODULE__8310__;","module.exports = __WEBPACK_EXTERNAL_MODULE__8156__;","module.exports = __WEBPACK_EXTERNAL_MODULE__8926__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t6615: 0,\n\t1981: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkIds[i]] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkatoka_design_system\"] = self[\"webpackChunkatoka_design_system\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [1981], () => (__webpack_require__(125)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":[],"sourceRoot":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './ButtonDropdown.less';
|
|
3
|
+
import { Button } from '../Button';
|
|
4
|
+
import { ButtonProps } from '../Button/Button';
|
|
5
|
+
interface ButtonDropdownState {
|
|
6
|
+
isButtonDropdownOpen: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface ButtonDropdownProps extends Omit<ButtonProps, 'onClick' | 'iconRight' | 'block' | 'variant'> {
|
|
9
|
+
toggleText: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare class ButtonDropdown extends React.Component<ButtonDropdownProps, ButtonDropdownState> {
|
|
12
|
+
static displayName: string;
|
|
13
|
+
static defaultProps: typeof Button.defaultProps;
|
|
14
|
+
private wrapperRef;
|
|
15
|
+
state: ButtonDropdownState;
|
|
16
|
+
componentDidMount(): void;
|
|
17
|
+
componentWillUnmount(): void;
|
|
18
|
+
private handleClickOutside;
|
|
19
|
+
private onToggle;
|
|
20
|
+
private renderChildren;
|
|
21
|
+
render(): React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export {};
|