@decisiv/ui-components 2.0.0 → 2.0.1-alpha.100
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/lib/atoms/BaseButton/index.d.ts.map +1 -1
- package/lib/atoms/BaseButton/index.js +1 -1
- package/lib/atoms/BooleanInput/elements.d.ts.map +1 -1
- package/lib/atoms/BooleanInput/elements.js +8 -3
- package/lib/atoms/BooleanInput/index.d.ts.map +1 -1
- package/lib/atoms/BooleanInput/index.js +26 -5
- package/lib/atoms/BooleanInput/index.test.js +17 -6
- package/lib/atoms/BooleanInput/types.d.ts +4 -0
- package/lib/atoms/BooleanInput/types.d.ts.map +1 -1
- package/lib/atoms/BooleanInput/types.js +5 -1
- package/lib/atoms/Calendar/hooks/useCalendar/index.d.ts.map +1 -1
- package/lib/atoms/Calendar/hooks/useCalendar/index.js +2 -1
- package/lib/atoms/Calendar/hooks/useCalendar/index.test.js +5 -6
- package/lib/atoms/Calendar/index.d.ts.map +1 -1
- package/lib/atoms/Calendar/index.js +8 -1
- package/lib/atoms/Calendar/index.test.js +70 -40
- package/lib/atoms/Calendar/types.js +5 -1
- package/lib/atoms/InputField/Containers.d.ts +11 -6
- package/lib/atoms/InputField/Containers.d.ts.map +1 -1
- package/lib/atoms/InputField/Containers.js +6 -6
- package/lib/atoms/InputField/InputLabel.d.ts +1 -0
- package/lib/atoms/InputField/InputLabel.d.ts.map +1 -1
- package/lib/atoms/InputField/InputLabel.js +2 -1
- package/lib/atoms/InputField/index.d.ts +5 -0
- package/lib/atoms/InputField/index.d.ts.map +1 -1
- package/lib/atoms/InputField/index.js +21 -7
- package/lib/atoms/InputField/index.test.js +91 -0
- package/lib/atoms/InputField/schema.d.ts.map +1 -1
- package/lib/atoms/InputField/schema.js +1 -0
- package/lib/atoms/OptionsList/Category.d.ts +1 -1
- package/lib/atoms/OptionsList/Category.d.ts.map +1 -1
- package/lib/atoms/OptionsList/Category.js +4 -2
- package/lib/atoms/OptionsList/Footer.d.ts +8 -0
- package/lib/atoms/OptionsList/Footer.d.ts.map +1 -0
- package/lib/atoms/OptionsList/Footer.js +72 -0
- package/lib/atoms/OptionsList/Option.d.ts.map +1 -1
- package/lib/atoms/OptionsList/Option.js +8 -5
- package/lib/atoms/OptionsList/index.d.ts.map +1 -1
- package/lib/atoms/OptionsList/index.js +43 -16
- package/lib/atoms/OptionsList/index.test.js +107 -11
- package/lib/atoms/OptionsList/schema.d.ts.map +1 -1
- package/lib/atoms/OptionsList/schema.js +4 -0
- package/lib/atoms/OptionsList/types.d.ts +14 -0
- package/lib/atoms/OptionsList/types.d.ts.map +1 -1
- package/lib/atoms/OptionsList/types.js +5 -1
- package/lib/atoms/RequiredIcon.d.ts +9 -0
- package/lib/atoms/RequiredIcon.d.ts.map +1 -0
- package/lib/atoms/{InputField/RequiredIcon.js → RequiredIcon.js} +7 -3
- package/lib/components/Accordion/types.js +5 -1
- package/lib/components/Accordion/useAccordion/types.js +5 -1
- package/lib/components/Alert/Container.d.ts +201 -0
- package/lib/components/Alert/Container.d.ts.map +1 -0
- package/lib/components/Alert/Container.js +26 -0
- package/lib/components/Alert/StyledButton.d.ts +5 -0
- package/lib/components/Alert/StyledButton.d.ts.map +1 -0
- package/lib/components/Alert/StyledButton.js +23 -0
- package/lib/components/Alert/index.d.ts +27 -0
- package/lib/components/Alert/index.d.ts.map +1 -0
- package/lib/components/Alert/index.js +112 -0
- package/lib/components/Alert/index.test.js +79 -0
- package/lib/components/Alert/intents.d.ts +13 -0
- package/lib/components/Alert/intents.d.ts.map +1 -0
- package/lib/components/Alert/intents.js +72 -0
- package/lib/components/Alert/schema.d.ts +3 -0
- package/lib/components/Alert/schema.d.ts.map +1 -0
- package/lib/components/Alert/schema.js +25 -0
- package/lib/components/Alert/types.d.ts +36 -0
- package/lib/components/Alert/types.d.ts.map +1 -0
- package/lib/components/Alert/types.js +32 -0
- package/lib/components/Avatar/types.js +5 -1
- package/lib/components/Badge/constants.d.ts +2 -0
- package/lib/components/Badge/constants.d.ts.map +1 -0
- package/lib/components/Badge/constants.js +29 -0
- package/lib/components/Badge/index.d.ts.map +1 -1
- package/lib/components/Badge/index.js +12 -23
- package/lib/components/Badge/index.test.js +51 -8
- package/lib/components/Badge/schema.js +1 -1
- package/lib/components/Badge/types.d.ts +1 -1
- package/lib/components/Badge/types.d.ts.map +1 -1
- package/lib/components/Badge/types.js +7 -3
- package/lib/components/Breadcrumbs/types.js +5 -1
- package/lib/components/Button/schema.d.ts +6 -1
- package/lib/components/Button/schema.d.ts.map +1 -1
- package/lib/components/Button/schema.js +9 -4
- package/lib/components/Button/types.js +5 -1
- package/lib/components/Checkbox/index.d.ts.map +1 -1
- package/lib/components/Checkbox/index.js +3 -1
- package/lib/components/Checkbox/schema.d.ts.map +1 -1
- package/lib/components/Checkbox/schema.js +2 -0
- package/lib/components/Combobox/Target.d.ts.map +1 -1
- package/lib/components/Combobox/Target.js +45 -14
- package/lib/components/Combobox/index.d.ts.map +1 -1
- package/lib/components/Combobox/index.js +193 -65
- package/lib/components/Combobox/index.test.js +358 -135
- package/lib/components/Combobox/schema.d.ts.map +1 -1
- package/lib/components/Combobox/schema.js +9 -2
- package/lib/components/Combobox/types.d.ts +12 -3
- package/lib/components/Combobox/types.d.ts.map +1 -1
- package/lib/components/Combobox/types.js +5 -1
- package/lib/components/DropdownList/index.d.ts +4 -0
- package/lib/components/DropdownList/index.d.ts.map +1 -1
- package/lib/components/DropdownList/index.js +76 -11
- package/lib/components/DropdownList/propTypes.d.ts +4 -0
- package/lib/components/DropdownList/propTypes.d.ts.map +1 -0
- package/lib/components/DropdownList/propTypes.js +42 -0
- package/lib/components/DropdownList/schema.d.ts.map +1 -1
- package/lib/components/DropdownList/schema.js +5 -0
- package/lib/components/DropdownList/types.d.ts +4 -1
- package/lib/components/DropdownList/types.d.ts.map +1 -1
- package/lib/components/Filter/IconWrapper/index.d.ts +197 -0
- package/lib/components/Filter/IconWrapper/index.d.ts.map +1 -0
- package/lib/components/Filter/IconWrapper/index.js +35 -0
- package/lib/components/Filter/SimplePrimary/index.d.ts +31 -0
- package/lib/components/Filter/SimplePrimary/index.d.ts.map +1 -0
- package/lib/components/Filter/SimplePrimary/index.js +58 -0
- package/lib/components/Filter/SimplePrimary/index.test.js +34 -0
- package/lib/components/Filter/StyledFilter.d.ts +4 -0
- package/lib/components/Filter/StyledFilter.d.ts.map +1 -0
- package/lib/components/Filter/StyledFilter.js +39 -0
- package/lib/components/Filter/StyledLabel/index.d.ts +8 -0
- package/lib/components/Filter/StyledLabel/index.d.ts.map +1 -0
- package/lib/components/Filter/StyledLabel/index.js +30 -0
- package/lib/components/Filter/index.d.ts +27 -0
- package/lib/components/Filter/index.d.ts.map +1 -0
- package/lib/components/Filter/index.js +95 -0
- package/lib/components/Filter/index.test.js +41 -0
- package/lib/components/Filter/kind.d.ts +6 -0
- package/lib/components/Filter/kind.d.ts.map +1 -0
- package/lib/components/Filter/kind.js +45 -0
- package/lib/components/Filter/schema.d.ts +9 -0
- package/lib/components/Filter/schema.d.ts.map +1 -0
- package/lib/components/Filter/schema.js +32 -0
- package/lib/components/Filter/types.d.ts +17 -0
- package/lib/components/Filter/types.d.ts.map +1 -0
- package/lib/components/Filter/types.js +5 -0
- package/lib/components/JumpTo/JumpToMenu.d.ts +2 -2
- package/lib/components/JumpTo/JumpToMenu.d.ts.map +1 -1
- package/lib/components/JumpTo/JumpToMenu.js +3 -3
- package/lib/components/JumpTo/types.js +5 -1
- package/lib/components/LeftNav/Item/ClickArea.d.ts.map +1 -1
- package/lib/components/LeftNav/Item/ClickArea.js +2 -2
- package/lib/components/LeftNav/Item/ItemWrapper.d.ts.map +1 -1
- package/lib/components/LeftNav/Item/ItemWrapper.js +3 -3
- package/lib/components/LeftNav/Item/MenuItemWrapper.d.ts +7 -0
- package/lib/components/LeftNav/Item/MenuItemWrapper.d.ts.map +1 -0
- package/lib/components/LeftNav/Item/MenuItemWrapper.js +20 -0
- package/lib/components/LeftNav/Item/NavCollapsedXItem/index.d.ts.map +1 -1
- package/lib/components/LeftNav/Item/NavCollapsedXItem/index.js +7 -5
- package/lib/components/LeftNav/Item/NavExpandedItem/index.d.ts.map +1 -1
- package/lib/components/LeftNav/Item/NavExpandedItem/index.js +24 -13
- package/lib/components/LeftNav/Item/types.d.ts +1 -1
- package/lib/components/LeftNav/Item/types.d.ts.map +1 -1
- package/lib/components/LeftNav/Item/types.js +5 -1
- package/lib/components/LeftNav/index.test.js +13 -3
- package/lib/components/LeftNav/schema.d.ts.map +1 -1
- package/lib/components/LeftNav/schema.js +2 -0
- package/lib/components/LeftNav/types.d.ts +1 -0
- package/lib/components/LeftNav/types.d.ts.map +1 -1
- package/lib/components/LeftNav/types.js +5 -1
- package/lib/components/Link/index.d.ts +2 -2
- package/lib/components/Link/index.d.ts.map +1 -1
- package/lib/components/Link/index.js +1 -1
- package/lib/components/Link/index.test.js +8 -0
- package/lib/components/Link/schema.d.ts.map +1 -1
- package/lib/components/Link/schema.js +1 -1
- package/lib/components/Menu/index.d.ts.map +1 -1
- package/lib/components/Menu/index.js +3 -1
- package/lib/components/Menu/types.d.ts +2 -0
- package/lib/components/Menu/types.d.ts.map +1 -1
- package/lib/components/Menu/types.js +5 -1
- package/lib/components/Modal/components.d.ts +2 -2
- package/lib/components/Modal/index.d.ts.map +1 -1
- package/lib/components/Modal/index.js +5 -5
- package/lib/components/Modal/index.test.js +32 -0
- package/lib/components/Modal/schema.d.ts.map +1 -1
- package/lib/components/Modal/schema.js +2 -2
- package/lib/components/Modal/types.d.ts +2 -2
- package/lib/components/Modal/types.d.ts.map +1 -1
- package/lib/components/Modal/types.js +5 -1
- package/lib/components/Notifications/Notification/components.d.ts +3 -3
- package/lib/components/Notifications/Notification/components.d.ts.map +1 -1
- package/lib/components/Notifications/Notification/components.js +12 -6
- package/lib/components/Notifications/Notification/index.d.ts +3 -6
- package/lib/components/Notifications/Notification/index.d.ts.map +1 -1
- package/lib/components/Notifications/Notification/index.js +19 -12
- package/lib/components/Notifications/Notification/index.test.js +38 -19
- package/lib/components/Notifications/NotificationsPanel/index.d.ts +2 -1
- package/lib/components/Notifications/NotificationsPanel/index.d.ts.map +1 -1
- package/lib/components/Notifications/NotificationsPanel/index.js +44 -21
- package/lib/components/Notifications/NotificationsPanel/schema.js +1 -1
- package/lib/components/Notifications/Notifier.test.js +79 -10
- package/lib/components/Notifications/constants.d.ts +2 -0
- package/lib/components/Notifications/constants.d.ts.map +1 -0
- package/lib/components/Notifications/constants.js +16 -0
- package/lib/components/Notifications/schema.d.ts.map +1 -1
- package/lib/components/Notifications/schema.js +2 -1
- package/lib/components/Notifications/useNotifications.d.ts +1 -0
- package/lib/components/Notifications/useNotifications.d.ts.map +1 -1
- package/lib/components/Notifications/useNotifications.js +3 -3
- package/lib/components/Notifications/useNotifications.test.js +7 -4
- package/lib/components/Pagination/Pagination.d.ts +1 -1
- package/lib/components/Pagination/Pagination.d.ts.map +1 -1
- package/lib/components/Pagination/Pagination.js +1 -0
- package/lib/components/Pagination/Pagination.test.js +9 -0
- package/lib/components/Pagination/types.js +5 -1
- package/lib/components/Select/Target.js +1 -1
- package/lib/components/Select/index.d.ts.map +1 -1
- package/lib/components/Select/index.js +37 -1
- package/lib/components/Select/index.test.js +82 -23
- package/lib/components/Select/schema.d.ts.map +1 -1
- package/lib/components/Select/schema.js +7 -0
- package/lib/components/Select/types.d.ts +4 -1
- package/lib/components/Select/types.d.ts.map +1 -1
- package/lib/components/Select/types.js +5 -1
- package/lib/components/SelectDate/Target.js +1 -1
- package/lib/components/SelectDate/index.d.ts.map +1 -1
- package/lib/components/SelectDate/index.js +28 -1
- package/lib/components/SelectDate/index.test.js +108 -51
- package/lib/components/SelectDate/schema.d.ts.map +1 -1
- package/lib/components/SelectDate/schema.js +2 -0
- package/lib/components/SelectDate/types.d.ts +2 -0
- package/lib/components/SelectDate/types.d.ts.map +1 -1
- package/lib/components/SelectDate/types.js +5 -1
- package/lib/components/SelectDateRange/index.d.ts.map +1 -1
- package/lib/components/SelectDateRange/index.js +28 -1
- package/lib/components/SelectDateRange/index.test.js +115 -58
- package/lib/components/SelectDateRange/schema.d.ts.map +1 -1
- package/lib/components/SelectDateRange/schema.js +2 -0
- package/lib/components/SelectDateRange/types.js +5 -1
- package/lib/components/SelectMenu/index.d.ts +5 -0
- package/lib/components/SelectMenu/index.d.ts.map +1 -1
- package/lib/components/SelectMenu/index.js +27 -3
- package/lib/components/SelectMenu/schema.d.ts.map +1 -1
- package/lib/components/SelectMenu/schema.js +4 -0
- package/lib/components/Table/Body.d.ts.map +1 -1
- package/lib/components/Table/Body.js +182 -38
- package/lib/components/Table/Container.d.ts.map +1 -1
- package/lib/components/Table/Container.js +3 -3
- package/lib/components/Table/DataRow.d.ts.map +1 -1
- package/lib/components/Table/DataRow.js +54 -10
- package/lib/components/Table/DraggableWrapper.d.ts +5 -0
- package/lib/components/Table/DraggableWrapper.d.ts.map +1 -0
- package/lib/components/Table/DraggableWrapper.js +38 -0
- package/lib/components/Table/Grip.d.ts +4 -0
- package/lib/components/Table/Grip.d.ts.map +1 -0
- package/lib/components/Table/Grip.js +30 -0
- package/lib/components/Table/Head.d.ts +1 -1
- package/lib/components/Table/Head.d.ts.map +1 -1
- package/lib/components/Table/Head.js +12 -9
- package/lib/components/Table/HeaderCell/index.d.ts.map +1 -1
- package/lib/components/Table/HeaderCell/index.js +57 -4
- package/lib/components/Table/HeaderCell/types.d.ts +6 -0
- package/lib/components/Table/HeaderCell/types.d.ts.map +1 -1
- package/lib/components/Table/HeaderCell/types.js +5 -1
- package/lib/components/Table/Provider.d.ts +18 -3
- package/lib/components/Table/Provider.d.ts.map +1 -1
- package/lib/components/Table/Provider.js +50 -4
- package/lib/components/Table/index.d.ts.map +1 -1
- package/lib/components/Table/index.js +167 -21
- package/lib/components/Table/index.test.js +335 -64
- package/lib/components/Table/schema.columns.d.ts.map +1 -1
- package/lib/components/Table/schema.columns.js +7 -4
- package/lib/components/Table/schema.d.ts.map +1 -1
- package/lib/components/Table/schema.js +8 -6
- package/lib/components/Table/types.d.ts +34 -3
- package/lib/components/Table/types.d.ts.map +1 -1
- package/lib/components/Table/utils.d.ts +4 -1
- package/lib/components/Table/utils.d.ts.map +1 -1
- package/lib/components/Table/utils.js +30 -1
- package/lib/components/Tabs/types.js +5 -1
- package/lib/components/Tag/types.d.ts +1 -1
- package/lib/components/Tag/types.d.ts.map +1 -1
- package/lib/components/Tag/types.js +5 -1
- package/lib/components/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/TextArea/TextArea.js +1 -1
- package/lib/components/TextArea/index.js +1 -0
- package/lib/components/TextArea/index.test.js +5 -0
- package/lib/components/TextField/Input.js +1 -1
- package/lib/components/TextField/index.test.js +5 -0
- package/lib/components/Toggle/index.d.ts.map +1 -1
- package/lib/components/Toggle/index.js +4 -0
- package/lib/components/Toggle/index.test.js +39 -10
- package/lib/components/Toggle/types.js +5 -1
- package/lib/components/TopNav/BrandInfo/index.d.ts +2 -1
- package/lib/components/TopNav/BrandInfo/index.d.ts.map +1 -1
- package/lib/components/TopNav/BrandInfo/index.js +9 -1
- package/lib/components/TopNav/BrandInfo/schema.d.ts.map +1 -1
- package/lib/components/TopNav/BrandInfo/schema.js +4 -1
- package/lib/components/TopNav/index.test.js +28 -0
- package/lib/components/Typography/withColors.d.ts +1 -1
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +25 -0
- package/lib/providers/ConfigProvider/index.d.ts.map +1 -1
- package/lib/providers/ConfigProvider/index.js +5 -1
- package/lib/providers/ConfigProvider/utils/context.d.ts +1 -1
- package/lib/providers/ConfigProvider/utils/context.d.ts.map +1 -1
- package/lib/providers/ConfigProvider/utils/normalizer.d.ts.map +1 -1
- package/lib/providers/ConfigProvider/utils/normalizer.js +1 -1
- package/lib/providers/ConfigProvider/utils/translations.d.ts +5 -1
- package/lib/providers/ConfigProvider/utils/translations.d.ts.map +1 -1
- package/lib/providers/ConfigProvider/utils/translations.js +5 -1
- package/lib/providers/NotificationsProvider/index.d.ts +6 -3
- package/lib/providers/NotificationsProvider/index.d.ts.map +1 -1
- package/lib/providers/NotificationsProvider/index.js +74 -18
- package/lib/providers/NotificationsProvider/types.d.ts +4 -1
- package/lib/providers/NotificationsProvider/types.d.ts.map +1 -1
- package/lib/utils/joinClassnames.d.ts +3 -0
- package/lib/utils/joinClassnames.d.ts.map +1 -0
- package/lib/utils/joinClassnames.js +26 -0
- package/lib/utils/useFirstMount.d.ts +2 -0
- package/lib/utils/useFirstMount.d.ts.map +1 -0
- package/lib/utils/useFirstMount.js +19 -0
- package/lib/utils/useUpdateEffect.d.ts +4 -0
- package/lib/utils/useUpdateEffect.d.ts.map +1 -0
- package/lib/utils/useUpdateEffect.js +28 -0
- package/package.json +4 -2
- package/lib/atoms/InputField/RequiredIcon.d.ts +0 -4
- package/lib/atoms/InputField/RequiredIcon.d.ts.map +0 -1
|
@@ -7,21 +7,17 @@ exports.default = exports.Container = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
10
12
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
13
|
|
|
12
14
|
var _rem = _interopRequireDefault(require("polished/lib/helpers/rem"));
|
|
13
15
|
|
|
14
16
|
var _isArray = _interopRequireDefault(require("lodash/isArray"));
|
|
15
17
|
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
var _Option = _interopRequireDefault(require("./Option"));
|
|
18
|
+
var _Button = require("../../components/Button");
|
|
19
19
|
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
var _utils = require("./utils");
|
|
23
|
-
|
|
24
|
-
var _schema = _interopRequireDefault(require("./schema"));
|
|
20
|
+
var _Grid = _interopRequireDefault(require("../../components/Grid"));
|
|
25
21
|
|
|
26
22
|
var _canUseDOM = _interopRequireDefault(require("../../utils/canUseDOM"));
|
|
27
23
|
|
|
@@ -31,8 +27,20 @@ var _assignRef = _interopRequireDefault(require("../../utils/assignRef"));
|
|
|
31
27
|
|
|
32
28
|
var _isCtrlCmd = _interopRequireDefault(require("../../utils/isCtrlCmd"));
|
|
33
29
|
|
|
30
|
+
var _Option = _interopRequireDefault(require("./Option"));
|
|
31
|
+
|
|
32
|
+
var _Category = _interopRequireDefault(require("./Category"));
|
|
33
|
+
|
|
34
|
+
var _Footer = _interopRequireDefault(require("./Footer"));
|
|
35
|
+
|
|
36
|
+
var _context = require("./context");
|
|
37
|
+
|
|
38
|
+
var _utils = require("./utils");
|
|
39
|
+
|
|
34
40
|
var _useListSelectionKeyboardActions = _interopRequireDefault(require("./useListSelectionKeyboardActions"));
|
|
35
41
|
|
|
42
|
+
var _schema = _interopRequireDefault(require("./schema"));
|
|
43
|
+
|
|
36
44
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
37
45
|
|
|
38
46
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
|
|
@@ -61,6 +69,7 @@ function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d =
|
|
|
61
69
|
|
|
62
70
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
63
71
|
|
|
72
|
+
var Row = _Grid.default.Row;
|
|
64
73
|
var isUsingKeyboard = false;
|
|
65
74
|
|
|
66
75
|
if (_canUseDOM.default) {
|
|
@@ -75,7 +84,7 @@ if (_canUseDOM.default) {
|
|
|
75
84
|
var Container = _styledComponents.default.ul.withConfig({
|
|
76
85
|
displayName: "OptionsList__Container",
|
|
77
86
|
componentId: "sc-107p8d5-0"
|
|
78
|
-
})(["list-style:none;margin:0;width:
|
|
87
|
+
})(["list-style:none;margin:0;width:100%;height:auto;max-height:", ";max-width:", ";padding:0;overflow:auto;position:relative;", " ", " ", " &:focus{outline:none;}"], (0, _rem.default)(310), (0, _rem.default)(340), function (_ref) {
|
|
79
88
|
var minWidth = _ref.minWidth;
|
|
80
89
|
return minWidth ? "\n min-width: ".concat(minWidth, ";\n ") : '';
|
|
81
90
|
}, function (_ref2) {
|
|
@@ -89,7 +98,8 @@ var Container = _styledComponents.default.ul.withConfig({
|
|
|
89
98
|
exports.Container = Container;
|
|
90
99
|
|
|
91
100
|
function OptionsList(props, forwardedRef) {
|
|
92
|
-
var
|
|
101
|
+
var actions = props.actions,
|
|
102
|
+
items = props.items,
|
|
93
103
|
multiple = props.multiple,
|
|
94
104
|
onChange = props.onChange,
|
|
95
105
|
name = props.name,
|
|
@@ -100,6 +110,7 @@ function OptionsList(props, forwardedRef) {
|
|
|
100
110
|
activeIdProp = props.activeId,
|
|
101
111
|
onChangeActiveItem = props.onChangeActiveItem,
|
|
102
112
|
onKeyDownProp = props.onKeyDown,
|
|
113
|
+
showCheckbox = props.showCheckbox,
|
|
103
114
|
tabIndex = props.tabIndex,
|
|
104
115
|
selectable = props.selectable,
|
|
105
116
|
defaultSelected = props.defaultSelected,
|
|
@@ -266,7 +277,7 @@ function OptionsList(props, forwardedRef) {
|
|
|
266
277
|
selectable: !!selectable,
|
|
267
278
|
itemRole: itemRole
|
|
268
279
|
}
|
|
269
|
-
}, _react.default.createElement(Container, {
|
|
280
|
+
}, _react.default.createElement(_Grid.default.Container, null, _react.default.createElement(Row, null, _react.default.createElement(Container, {
|
|
270
281
|
"aria-activedescendant": activeId,
|
|
271
282
|
"aria-multiselectable": !!multiple,
|
|
272
283
|
ref: setContainerRefFunc,
|
|
@@ -287,25 +298,41 @@ function OptionsList(props, forwardedRef) {
|
|
|
287
298
|
if ((0, _utils.isCategory)(item)) {
|
|
288
299
|
return _react.default.createElement(_Category.default, _extends({}, item, {
|
|
289
300
|
key: id,
|
|
290
|
-
borderRadius: borderRadius
|
|
301
|
+
borderRadius: borderRadius,
|
|
302
|
+
showCheckbox: showCheckbox
|
|
291
303
|
}));
|
|
292
304
|
}
|
|
293
305
|
|
|
294
306
|
return _react.default.createElement(_Option.default, _extends({}, item, {
|
|
295
307
|
key: id,
|
|
296
|
-
borderRadius: borderRadius
|
|
308
|
+
borderRadius: borderRadius,
|
|
309
|
+
showCheckbox: showCheckbox
|
|
297
310
|
}));
|
|
298
|
-
})))
|
|
311
|
+
}))), actions && _react.default.createElement(Row, null, _react.default.createElement(_Footer.default, {
|
|
312
|
+
actions: actions
|
|
313
|
+
}))));
|
|
299
314
|
}
|
|
300
315
|
|
|
301
316
|
var OptionsListWithContainerRef = (0, _react.forwardRef)(OptionsList); // @ts-ignore
|
|
302
317
|
|
|
303
|
-
OptionsListWithContainerRef.propTypes = _objectSpread({}, _schema.default.propTypes
|
|
318
|
+
OptionsListWithContainerRef.propTypes = _objectSpread({}, _schema.default.propTypes, {
|
|
319
|
+
actions: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.shape((0, _Button.makeButtonSchemaPropTypes)({
|
|
320
|
+
id: _propTypes.default.string.isRequired
|
|
321
|
+
}))), _propTypes.default.shape({
|
|
322
|
+
left: _propTypes.default.arrayOf(_propTypes.default.shape((0, _Button.makeButtonSchemaPropTypes)({
|
|
323
|
+
id: _propTypes.default.string.isRequired
|
|
324
|
+
}))),
|
|
325
|
+
right: _propTypes.default.arrayOf(_propTypes.default.shape((0, _Button.makeButtonSchemaPropTypes)({
|
|
326
|
+
id: _propTypes.default.string.isRequired
|
|
327
|
+
})))
|
|
328
|
+
})])
|
|
329
|
+
});
|
|
304
330
|
OptionsListWithContainerRef.defaultProps = {
|
|
305
331
|
role: 'listbox',
|
|
306
332
|
itemRole: 'option',
|
|
307
333
|
tabIndex: 0,
|
|
308
|
-
selectable: true
|
|
334
|
+
selectable: true,
|
|
335
|
+
showCheckbox: true
|
|
309
336
|
};
|
|
310
337
|
var _default = OptionsListWithContainerRef;
|
|
311
338
|
exports.default = _default;
|
|
@@ -41,6 +41,8 @@ var item0Id = '0';
|
|
|
41
41
|
var item0Label = 'Option 0';
|
|
42
42
|
var item2Id = '2';
|
|
43
43
|
var item2Label = 'Option 2';
|
|
44
|
+
var disabledItemLabel = 'Option 4';
|
|
45
|
+
var disabledItemId = '4';
|
|
44
46
|
var items = [{
|
|
45
47
|
id: item0Id,
|
|
46
48
|
label: item0Label,
|
|
@@ -75,8 +77,8 @@ var items = [{
|
|
|
75
77
|
}, {
|
|
76
78
|
label: 'Category 2',
|
|
77
79
|
items: [{
|
|
78
|
-
id:
|
|
79
|
-
label:
|
|
80
|
+
id: disabledItemId,
|
|
81
|
+
label: disabledItemLabel,
|
|
80
82
|
value: '4',
|
|
81
83
|
disabled: true
|
|
82
84
|
}, {
|
|
@@ -189,15 +191,58 @@ describe('OptionsList', function () {
|
|
|
189
191
|
expect(onChange).toHaveBeenCalledWith(selectedItem.id);
|
|
190
192
|
expect(getByLabelText(selectedItem.label)).toBeChecked();
|
|
191
193
|
});
|
|
194
|
+
describe('selecting disabled element with keyboard', function () {
|
|
195
|
+
it('selects an item with Enter or Space key', function () {
|
|
196
|
+
var onChange = jest.fn();
|
|
197
|
+
var onlyDisabledItems = [{
|
|
198
|
+
id: '2',
|
|
199
|
+
label: 'Option 2',
|
|
200
|
+
value: '2',
|
|
201
|
+
disabled: true
|
|
202
|
+
}, {
|
|
203
|
+
id: disabledItemId,
|
|
204
|
+
label: disabledItemLabel,
|
|
205
|
+
value: '4',
|
|
206
|
+
disabled: true
|
|
207
|
+
}];
|
|
208
|
+
|
|
209
|
+
var _render5 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
|
|
210
|
+
items: onlyDisabledItems,
|
|
211
|
+
onChange: onChange
|
|
212
|
+
}))),
|
|
213
|
+
getByLabelText = _render5.getByLabelText,
|
|
214
|
+
container = _render5.container;
|
|
215
|
+
|
|
216
|
+
var optionsList = container.querySelector('ul'); // simulate it is focused while tabbing
|
|
217
|
+
|
|
218
|
+
_react2.fireEvent.keyDown(container, {
|
|
219
|
+
key: 'Tab'
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
_react2.fireEvent.focus(optionsList);
|
|
223
|
+
|
|
224
|
+
_react2.fireEvent.keyDown(optionsList, {
|
|
225
|
+
key: 'ArrowDown'
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
_react2.fireEvent.keyDown(optionsList, {
|
|
229
|
+
key: 'Enter'
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
expect(onChange).not.toHaveBeenCalledWith(disabledItemId);
|
|
233
|
+
expect(onChange).not.toHaveBeenCalled();
|
|
234
|
+
expect(getByLabelText(disabledItemLabel)).not.toBeChecked();
|
|
235
|
+
});
|
|
236
|
+
});
|
|
192
237
|
describe('single selection', function () {
|
|
193
238
|
it('calls onChange with id when item is clicked', function () {
|
|
194
239
|
var onChange = jest.fn();
|
|
195
240
|
|
|
196
|
-
var
|
|
241
|
+
var _render6 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
|
|
197
242
|
onChange: onChange
|
|
198
243
|
}))),
|
|
199
|
-
getByText =
|
|
200
|
-
getByLabelText =
|
|
244
|
+
getByText = _render6.getByText,
|
|
245
|
+
getByLabelText = _render6.getByLabelText;
|
|
201
246
|
|
|
202
247
|
var item = items[0];
|
|
203
248
|
|
|
@@ -212,15 +257,33 @@ describe('OptionsList', function () {
|
|
|
212
257
|
|
|
213
258
|
expect(getByLabelText(subItem.label)).toBeChecked();
|
|
214
259
|
});
|
|
260
|
+
describe('disabled element', function () {
|
|
261
|
+
it('does not calls onChange when item is clicked', function () {
|
|
262
|
+
var onChange = jest.fn();
|
|
263
|
+
|
|
264
|
+
var _render7 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
|
|
265
|
+
onChange: onChange
|
|
266
|
+
}))),
|
|
267
|
+
getByText = _render7.getByText,
|
|
268
|
+
getByLabelText = _render7.getByLabelText;
|
|
269
|
+
|
|
270
|
+
_react2.fireEvent.click(getByText(disabledItemLabel));
|
|
271
|
+
|
|
272
|
+
expect(onChange).not.toHaveBeenLastCalledWith(disabledItemId);
|
|
273
|
+
expect(onChange).not.toHaveBeenCalled(); // the item shouldn't be marked as selected
|
|
274
|
+
|
|
275
|
+
expect(getByLabelText(disabledItemLabel)).not.toBeChecked();
|
|
276
|
+
});
|
|
277
|
+
});
|
|
215
278
|
describe('controlled', function () {
|
|
216
279
|
it('prefers value over internal', function () {
|
|
217
280
|
var selected = items[1];
|
|
218
281
|
|
|
219
|
-
var
|
|
282
|
+
var _render8 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
|
|
220
283
|
selected: selected.id
|
|
221
284
|
}))),
|
|
222
|
-
getByText =
|
|
223
|
-
getByLabelText =
|
|
285
|
+
getByText = _render8.getByText,
|
|
286
|
+
getByLabelText = _render8.getByLabelText;
|
|
224
287
|
|
|
225
288
|
var item = items[0];
|
|
226
289
|
|
|
@@ -235,12 +298,12 @@ describe('OptionsList', function () {
|
|
|
235
298
|
it('calls onChange with array of selected ids when item is clicked', function () {
|
|
236
299
|
var onChange = jest.fn();
|
|
237
300
|
|
|
238
|
-
var
|
|
301
|
+
var _render9 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
|
|
239
302
|
onChange: onChange,
|
|
240
303
|
multiple: true
|
|
241
304
|
}))),
|
|
242
|
-
getByText =
|
|
243
|
-
getByLabelText =
|
|
305
|
+
getByText = _render9.getByText,
|
|
306
|
+
getByLabelText = _render9.getByLabelText;
|
|
244
307
|
|
|
245
308
|
var item = items[0];
|
|
246
309
|
|
|
@@ -259,5 +322,38 @@ describe('OptionsList', function () {
|
|
|
259
322
|
|
|
260
323
|
expect(onChange).toHaveBeenLastCalledWith([subItem.id]);
|
|
261
324
|
});
|
|
325
|
+
it('adds a footer with buttons when actions are provided', function () {
|
|
326
|
+
var onClick = jest.fn();
|
|
327
|
+
var actions = [{
|
|
328
|
+
id: '1',
|
|
329
|
+
text: 'apply',
|
|
330
|
+
onClick: onClick
|
|
331
|
+
}, {
|
|
332
|
+
id: '2',
|
|
333
|
+
text: 'cancel',
|
|
334
|
+
kind: 'secondary',
|
|
335
|
+
onClick: onClick
|
|
336
|
+
}, {
|
|
337
|
+
id: '3',
|
|
338
|
+
text: 'clear',
|
|
339
|
+
kind: 'secondary',
|
|
340
|
+
variant: 'ghost',
|
|
341
|
+
paddingLeft: 4,
|
|
342
|
+
onClick: onClick
|
|
343
|
+
}];
|
|
344
|
+
|
|
345
|
+
var _render10 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
|
|
346
|
+
actions: actions,
|
|
347
|
+
multiple: true
|
|
348
|
+
}))),
|
|
349
|
+
baseElement = _render10.baseElement,
|
|
350
|
+
getByText = _render10.getByText;
|
|
351
|
+
|
|
352
|
+
actions.forEach(function (_ref5) {
|
|
353
|
+
var label = _ref5.text;
|
|
354
|
+
return expect(getByText(label)).toBeTruthy();
|
|
355
|
+
});
|
|
356
|
+
expect(baseElement).toMatchSnapshot();
|
|
357
|
+
});
|
|
262
358
|
});
|
|
263
359
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/atoms/OptionsList/schema.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,MAAM,KAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/atoms/OptionsList/schema.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,MAAM,KAA2C,CAAC;AAoExD,eAAe,MAAM,CAAC"}
|
|
@@ -15,6 +15,10 @@ var schema = (0, _reactDesc.describe)({
|
|
|
15
15
|
schema.makePropTypes = function () {
|
|
16
16
|
return {
|
|
17
17
|
defaultSelected: _reactDesc.PropTypes.oneOfType([_reactDesc.PropTypes.string, _reactDesc.PropTypes.arrayOf(_reactDesc.PropTypes.string)]).description('These IDs will appear as selected the first time the user opens the dropdown.'),
|
|
18
|
+
actions: _reactDesc.PropTypes.oneOfType([_reactDesc.PropTypes.arrayOf(_reactDesc.PropTypes.object), _reactDesc.PropTypes.shape({
|
|
19
|
+
left: _reactDesc.PropTypes.arrayOf(_reactDesc.PropTypes.object),
|
|
20
|
+
right: _reactDesc.PropTypes.arrayOf(_reactDesc.PropTypes.object)
|
|
21
|
+
})]).description('A collection of objects, each containing a subset of props valid for a Button component. Check the notes below.'),
|
|
18
22
|
items: _reactDesc.PropTypes.arrayOf(_reactDesc.PropTypes.shape({
|
|
19
23
|
decoration: _reactDesc.PropTypes.shape({
|
|
20
24
|
type: _reactDesc.PropTypes.oneOf(['Avatar', 'Badge', 'Icon'])
|
|
@@ -4,6 +4,7 @@ import { IconProps } from '@decisiv/iconix';
|
|
|
4
4
|
import { AvatarProps } from '../../components/Avatar';
|
|
5
5
|
import { BadgeProps } from '../../components/Badge';
|
|
6
6
|
import { DimensionsProps } from '../../modifiers/dimensions';
|
|
7
|
+
import { ButtonProps } from '../../components/Button';
|
|
7
8
|
export declare type OptionAvatarProps = Omit<AvatarProps, 'ref' | 'size'>;
|
|
8
9
|
export declare type OptionBadgeProps = Omit<BadgeProps, 'size' | 'variant'>;
|
|
9
10
|
export declare type InputMethod = 'mouse' | 'keyboard' | undefined;
|
|
@@ -22,12 +23,21 @@ interface IconDecoration {
|
|
|
22
23
|
icon: IconComponent;
|
|
23
24
|
disabled?: boolean;
|
|
24
25
|
}
|
|
26
|
+
export interface ActionProps extends ButtonProps {
|
|
27
|
+
id: string;
|
|
28
|
+
}
|
|
29
|
+
interface SideActionProps {
|
|
30
|
+
left?: ActionProps[];
|
|
31
|
+
right?: ActionProps[];
|
|
32
|
+
}
|
|
33
|
+
export declare type FooterActions = SideActionProps | ActionProps[];
|
|
25
34
|
export declare type Decoration = AvatarDecoration | BadgeDecoration | IconDecoration;
|
|
26
35
|
export interface Category {
|
|
27
36
|
borderRadius?: BorderRadiusProperty<string>;
|
|
28
37
|
id?: string;
|
|
29
38
|
items: Option[];
|
|
30
39
|
label: string;
|
|
40
|
+
showCheckbox?: boolean;
|
|
31
41
|
}
|
|
32
42
|
export declare type CategoryProps = Category;
|
|
33
43
|
export declare type IconComponent = (props: IconProps) => JSX.Element;
|
|
@@ -37,6 +47,8 @@ interface BaseOption {
|
|
|
37
47
|
disabled?: boolean;
|
|
38
48
|
id: string;
|
|
39
49
|
label: string;
|
|
50
|
+
showCheckbox?: boolean;
|
|
51
|
+
meta?: object;
|
|
40
52
|
}
|
|
41
53
|
export interface ItemOption extends BaseOption {
|
|
42
54
|
value?: string;
|
|
@@ -49,6 +61,7 @@ export declare type OptionProps = Option;
|
|
|
49
61
|
export declare type Item = Category | Option;
|
|
50
62
|
export interface OptionsListProps extends OptionsListDimensions {
|
|
51
63
|
items: Item[];
|
|
64
|
+
actions?: FooterActions;
|
|
52
65
|
name?: string;
|
|
53
66
|
multiple?: boolean;
|
|
54
67
|
onChange: (ids: Selection) => void;
|
|
@@ -59,6 +72,7 @@ export interface OptionsListProps extends OptionsListDimensions {
|
|
|
59
72
|
defaultActiveId?: string;
|
|
60
73
|
onChangeActiveItem?: (activeId: string) => void;
|
|
61
74
|
onKeyDown?: (event: KeyboardEvent) => void;
|
|
75
|
+
showCheckbox?: boolean;
|
|
62
76
|
tabIndex?: number;
|
|
63
77
|
selectable?: boolean;
|
|
64
78
|
defaultSelected?: Selection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atoms/OptionsList/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atoms/OptionsList/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RefForwardingComponent, RefAttributes } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
marginLeft?: string;
|
|
4
|
+
marginTop?: string;
|
|
5
|
+
}
|
|
6
|
+
declare type RequiredIconType = RefForwardingComponent<HTMLDivElement, RefAttributes<HTMLDivElement> & Props>;
|
|
7
|
+
declare const RequiredIcon: RequiredIconType;
|
|
8
|
+
export default RequiredIcon;
|
|
9
|
+
//# sourceMappingURL=RequiredIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequiredIcon.d.ts","sourceRoot":"","sources":["../../src/atoms/RequiredIcon.tsx"],"names":[],"mappings":"AACA,OAAc,EACZ,sBAAsB,EAGtB,aAAa,EACd,MAAM,OAAO,CAAC;AAOf,UAAU,KAAK;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAQD,aAAK,gBAAgB,GAAG,sBAAsB,CAC5C,cAAc,EACd,aAAa,CAAC,cAAc,CAAC,GAAG,KAAK,CACtC,CAAC;AAEF,QAAA,MAAM,YAAY,EAAE,gBASnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -21,10 +21,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
21
21
|
|
|
22
22
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
23
|
|
|
24
|
-
var RequiredIconContainer = _styledComponents.default.
|
|
24
|
+
var RequiredIconContainer = _styledComponents.default.div.withConfig({
|
|
25
25
|
displayName: "RequiredIcon__RequiredIconContainer",
|
|
26
|
-
componentId: "
|
|
27
|
-
})(["margin-left:
|
|
26
|
+
componentId: "sc-18pnvm5-0"
|
|
27
|
+
})(["display:inline;margin-left:", ";margin-top:", ";"], function (props) {
|
|
28
|
+
return props.marginLeft || '3px';
|
|
29
|
+
}, function (props) {
|
|
30
|
+
return props.marginTop || '0px';
|
|
31
|
+
});
|
|
28
32
|
|
|
29
33
|
var RequiredIcon = (0, _react.forwardRef)(function (props, ref) {
|
|
30
34
|
return _react.default.createElement(RequiredIconContainer, _extends({}, props, {
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import intents from './intents';
|
|
3
|
+
import { FlexComponentProps } from '../Flex';
|
|
4
|
+
interface ContainerProps extends FlexComponentProps {
|
|
5
|
+
intent?: keyof typeof intents;
|
|
6
|
+
}
|
|
7
|
+
declare const Container: import("styled-components").StyledComponent<"div", any, Partial<{
|
|
8
|
+
readonly alignContent?: string | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
|
|
9
|
+
readonly XS: "XS";
|
|
10
|
+
readonly SM: "SM";
|
|
11
|
+
readonly MD: "MD";
|
|
12
|
+
readonly LG: "LG";
|
|
13
|
+
readonly XL: "XL";
|
|
14
|
+
}> | undefined;
|
|
15
|
+
readonly alignItems?: string | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
|
|
16
|
+
readonly XS: "XS";
|
|
17
|
+
readonly SM: "SM";
|
|
18
|
+
readonly MD: "MD";
|
|
19
|
+
readonly LG: "LG";
|
|
20
|
+
readonly XL: "XL";
|
|
21
|
+
}> | undefined;
|
|
22
|
+
readonly alignSelf?: string | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
|
|
23
|
+
readonly XS: "XS";
|
|
24
|
+
readonly SM: "SM";
|
|
25
|
+
readonly MD: "MD";
|
|
26
|
+
readonly LG: "LG";
|
|
27
|
+
readonly XL: "XL";
|
|
28
|
+
}> | undefined;
|
|
29
|
+
readonly flex?: string | number | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("react").ReactText, {
|
|
30
|
+
readonly XS: "XS";
|
|
31
|
+
readonly SM: "SM";
|
|
32
|
+
readonly MD: "MD";
|
|
33
|
+
readonly LG: "LG";
|
|
34
|
+
readonly XL: "XL";
|
|
35
|
+
}> | undefined;
|
|
36
|
+
readonly flexBasis?: string | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
|
|
37
|
+
readonly XS: "XS";
|
|
38
|
+
readonly SM: "SM";
|
|
39
|
+
readonly MD: "MD";
|
|
40
|
+
readonly LG: "LG";
|
|
41
|
+
readonly XL: "XL";
|
|
42
|
+
}> | undefined;
|
|
43
|
+
readonly flexDirection?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "row" | "column" | "column-reverse" | "row-reverse" | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("csstype").FlexDirectionProperty, {
|
|
44
|
+
readonly XS: "XS";
|
|
45
|
+
readonly SM: "SM";
|
|
46
|
+
readonly MD: "MD";
|
|
47
|
+
readonly LG: "LG";
|
|
48
|
+
readonly XL: "XL";
|
|
49
|
+
}> | undefined;
|
|
50
|
+
readonly flexGrow?: number | "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("csstype").GlobalsNumber, {
|
|
51
|
+
readonly XS: "XS";
|
|
52
|
+
readonly SM: "SM";
|
|
53
|
+
readonly MD: "MD";
|
|
54
|
+
readonly LG: "LG";
|
|
55
|
+
readonly XL: "XL";
|
|
56
|
+
}> | undefined;
|
|
57
|
+
readonly flexShrink?: number | "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("csstype").GlobalsNumber, {
|
|
58
|
+
readonly XS: "XS";
|
|
59
|
+
readonly SM: "SM";
|
|
60
|
+
readonly MD: "MD";
|
|
61
|
+
readonly LG: "LG";
|
|
62
|
+
readonly XL: "XL";
|
|
63
|
+
}> | undefined;
|
|
64
|
+
readonly flexWrap?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "nowrap" | "wrap" | "wrap-reverse" | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("csstype").FlexWrapProperty, {
|
|
65
|
+
readonly XS: "XS";
|
|
66
|
+
readonly SM: "SM";
|
|
67
|
+
readonly MD: "MD";
|
|
68
|
+
readonly LG: "LG";
|
|
69
|
+
readonly XL: "XL";
|
|
70
|
+
}> | undefined;
|
|
71
|
+
readonly justifyContent?: string | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
|
|
72
|
+
readonly XS: "XS";
|
|
73
|
+
readonly SM: "SM";
|
|
74
|
+
readonly MD: "MD";
|
|
75
|
+
readonly LG: "LG";
|
|
76
|
+
readonly XL: "XL";
|
|
77
|
+
}> | undefined;
|
|
78
|
+
readonly justifyItems?: string | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
|
|
79
|
+
readonly XS: "XS";
|
|
80
|
+
readonly SM: "SM";
|
|
81
|
+
readonly MD: "MD";
|
|
82
|
+
readonly LG: "LG";
|
|
83
|
+
readonly XL: "XL";
|
|
84
|
+
}> | undefined;
|
|
85
|
+
readonly justifySelf?: string | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
|
|
86
|
+
readonly XS: "XS";
|
|
87
|
+
readonly SM: "SM";
|
|
88
|
+
readonly MD: "MD";
|
|
89
|
+
readonly LG: "LG";
|
|
90
|
+
readonly XL: "XL";
|
|
91
|
+
}> | undefined;
|
|
92
|
+
readonly order?: number | "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("csstype").GlobalsNumber, {
|
|
93
|
+
readonly XS: "XS";
|
|
94
|
+
readonly SM: "SM";
|
|
95
|
+
readonly MD: "MD";
|
|
96
|
+
readonly LG: "LG";
|
|
97
|
+
readonly XL: "XL";
|
|
98
|
+
}> | undefined;
|
|
99
|
+
readonly size?: "XS" | "SM" | "MD" | "LG" | "XL" | undefined;
|
|
100
|
+
}> & Partial<{
|
|
101
|
+
readonly margin: import("../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
102
|
+
readonly XS: "XS";
|
|
103
|
+
readonly SM: "SM";
|
|
104
|
+
readonly MD: "MD";
|
|
105
|
+
readonly LG: "LG";
|
|
106
|
+
readonly XL: "XL";
|
|
107
|
+
}>;
|
|
108
|
+
readonly marginBottom: import("../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
109
|
+
readonly XS: "XS";
|
|
110
|
+
readonly SM: "SM";
|
|
111
|
+
readonly MD: "MD";
|
|
112
|
+
readonly LG: "LG";
|
|
113
|
+
readonly XL: "XL";
|
|
114
|
+
}>;
|
|
115
|
+
readonly marginLeft: import("../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
116
|
+
readonly XS: "XS";
|
|
117
|
+
readonly SM: "SM";
|
|
118
|
+
readonly MD: "MD";
|
|
119
|
+
readonly LG: "LG";
|
|
120
|
+
readonly XL: "XL";
|
|
121
|
+
}>;
|
|
122
|
+
readonly marginRight: import("../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
123
|
+
readonly XS: "XS";
|
|
124
|
+
readonly SM: "SM";
|
|
125
|
+
readonly MD: "MD";
|
|
126
|
+
readonly LG: "LG";
|
|
127
|
+
readonly XL: "XL";
|
|
128
|
+
}>;
|
|
129
|
+
readonly marginTop: import("../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
130
|
+
readonly XS: "XS";
|
|
131
|
+
readonly SM: "SM";
|
|
132
|
+
readonly MD: "MD";
|
|
133
|
+
readonly LG: "LG";
|
|
134
|
+
readonly XL: "XL";
|
|
135
|
+
}>;
|
|
136
|
+
readonly marginX: import("../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
137
|
+
readonly XS: "XS";
|
|
138
|
+
readonly SM: "SM";
|
|
139
|
+
readonly MD: "MD";
|
|
140
|
+
readonly LG: "LG";
|
|
141
|
+
readonly XL: "XL";
|
|
142
|
+
}>;
|
|
143
|
+
readonly marginY: import("../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
144
|
+
readonly XS: "XS";
|
|
145
|
+
readonly SM: "SM";
|
|
146
|
+
readonly MD: "MD";
|
|
147
|
+
readonly LG: "LG";
|
|
148
|
+
readonly XL: "XL";
|
|
149
|
+
}>;
|
|
150
|
+
readonly padding: import("../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
151
|
+
readonly XS: "XS";
|
|
152
|
+
readonly SM: "SM";
|
|
153
|
+
readonly MD: "MD";
|
|
154
|
+
readonly LG: "LG";
|
|
155
|
+
readonly XL: "XL";
|
|
156
|
+
}>;
|
|
157
|
+
readonly paddingBottom: import("../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
158
|
+
readonly XS: "XS";
|
|
159
|
+
readonly SM: "SM";
|
|
160
|
+
readonly MD: "MD";
|
|
161
|
+
readonly LG: "LG";
|
|
162
|
+
readonly XL: "XL";
|
|
163
|
+
}>;
|
|
164
|
+
readonly paddingLeft: import("../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
165
|
+
readonly XS: "XS";
|
|
166
|
+
readonly SM: "SM";
|
|
167
|
+
readonly MD: "MD";
|
|
168
|
+
readonly LG: "LG";
|
|
169
|
+
readonly XL: "XL";
|
|
170
|
+
}>;
|
|
171
|
+
readonly paddingRight: import("../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
172
|
+
readonly XS: "XS";
|
|
173
|
+
readonly SM: "SM";
|
|
174
|
+
readonly MD: "MD";
|
|
175
|
+
readonly LG: "LG";
|
|
176
|
+
readonly XL: "XL";
|
|
177
|
+
}>;
|
|
178
|
+
readonly paddingTop: import("../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
179
|
+
readonly XS: "XS";
|
|
180
|
+
readonly SM: "SM";
|
|
181
|
+
readonly MD: "MD";
|
|
182
|
+
readonly LG: "LG";
|
|
183
|
+
readonly XL: "XL";
|
|
184
|
+
}>;
|
|
185
|
+
readonly paddingX: import("../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
186
|
+
readonly XS: "XS";
|
|
187
|
+
readonly SM: "SM";
|
|
188
|
+
readonly MD: "MD";
|
|
189
|
+
readonly LG: "LG";
|
|
190
|
+
readonly XL: "XL";
|
|
191
|
+
}>;
|
|
192
|
+
readonly paddingY: import("../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
193
|
+
readonly XS: "XS";
|
|
194
|
+
readonly SM: "SM";
|
|
195
|
+
readonly MD: "MD";
|
|
196
|
+
readonly LG: "LG";
|
|
197
|
+
readonly XL: "XL";
|
|
198
|
+
}>;
|
|
199
|
+
}> & ContainerProps, never>;
|
|
200
|
+
export default Container;
|
|
201
|
+
//# sourceMappingURL=Container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../src/components/Alert/Container.ts"],"names":[],"mappings":";AAIA,OAAO,OAAwB,MAAM,WAAW,CAAC;AAEjD,OAAa,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEnD,UAAU,cAAe,SAAQ,kBAAkB;IACjD,MAAM,CAAC,EAAE,MAAM,OAAO,OAAO,CAAC;CAC/B;AAGD,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAcd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|