intelicoreact 0.0.94 → 0.0.97

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 (162) hide show
  1. package/dist/Atomic/FormElements/Input/Input.js +3 -1
  2. package/dist/Atomic/FormElements/Input/Input.stories.js +5 -1
  3. package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +23 -4
  4. package/dist/Atomic/FormElements/InputCalendar/InputCalendar.stories.js +3 -3
  5. package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +16 -5
  6. package/dist/Atomic/FormElements/InputDateRange/InputDateRange.stories.js +7 -5
  7. package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +29 -24
  8. package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +13 -7
  9. package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +427 -0
  10. package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.scss +120 -0
  11. package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.stories.js +56 -0
  12. package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +11 -8
  13. package/dist/Atomic/FormElements/Spinner/Spinner.js +21 -0
  14. package/{src/Atomic/FormElements/Dropdown/components/DropdownLoader.scss → dist/Atomic/FormElements/Spinner/Spinner.scss} +8 -5
  15. package/dist/Atomic/FormElements/Spinner/Spinner.stories.js +34 -0
  16. package/dist/Atomic/UI/Calendar/Calendar.js +13 -12
  17. package/dist/Functions/customEventListener.js +66 -0
  18. package/dist/Functions/inputExecutor.js +7 -1
  19. package/dist/Functions/useMouseUpOutside.js +23 -0
  20. package/package.json +3 -2
  21. package/.babelrc +0 -12
  22. package/.eslintignore +0 -10
  23. package/.eslintrc.json +0 -93
  24. package/src/Atomic/FormElements/CheckboxInput/CheckboxInput.js +0 -28
  25. package/src/Atomic/FormElements/CheckboxInput/CheckboxInput.scss +0 -107
  26. package/src/Atomic/FormElements/CheckboxInput/CheckboxInput.stories.js +0 -26
  27. package/src/Atomic/FormElements/DateTime/DateTime.js +0 -18
  28. package/src/Atomic/FormElements/DateTime/DateTime.scss +0 -12
  29. package/src/Atomic/FormElements/DateTime/DateTime.stories.js +0 -17
  30. package/src/Atomic/FormElements/DoubleString/DoubleString.js +0 -13
  31. package/src/Atomic/FormElements/DoubleString/DoubleString.scss +0 -20
  32. package/src/Atomic/FormElements/DoubleString/DoubleString.stories.js +0 -18
  33. package/src/Atomic/FormElements/Dropdown/Dropdown.js +0 -178
  34. package/src/Atomic/FormElements/Dropdown/Dropdown.scss +0 -192
  35. package/src/Atomic/FormElements/Dropdown/Dropdown.stories.js +0 -87
  36. package/src/Atomic/FormElements/Dropdown/components/DropdownLoader.js +0 -17
  37. package/src/Atomic/FormElements/Header/Header.js +0 -67
  38. package/src/Atomic/FormElements/Header/Header.scss +0 -93
  39. package/src/Atomic/FormElements/Header/Header.stories.js +0 -30
  40. package/src/Atomic/FormElements/Input/Input.js +0 -186
  41. package/src/Atomic/FormElements/Input/Input.scss +0 -136
  42. package/src/Atomic/FormElements/Input/Input.stories.js +0 -94
  43. package/src/Atomic/FormElements/InputCalendar/InputCalendar.js +0 -73
  44. package/src/Atomic/FormElements/InputCalendar/InputCalendar.scss +0 -23
  45. package/src/Atomic/FormElements/InputCalendar/InputCalendar.stories.js +0 -39
  46. package/src/Atomic/FormElements/InputDateRange/InputDateRange.js +0 -219
  47. package/src/Atomic/FormElements/InputDateRange/InputDateRange.scss +0 -624
  48. package/src/Atomic/FormElements/InputDateRange/InputDateRange.stories.js +0 -63
  49. package/src/Atomic/FormElements/InputDateRange/components/Datepicker.js +0 -433
  50. package/src/Atomic/FormElements/InputDateRange/components/OpenedPart.js +0 -118
  51. package/src/Atomic/FormElements/InputDateRange/components/SelectItem.js +0 -24
  52. package/src/Atomic/FormElements/InputDateRange/dependencies.js +0 -161
  53. package/src/Atomic/FormElements/InputsRow/InputsRow.js +0 -112
  54. package/src/Atomic/FormElements/InputsRow/InputsRow.scss +0 -45
  55. package/src/Atomic/FormElements/InputsRow/InputsRow.stories.js +0 -34
  56. package/src/Atomic/FormElements/Label/Label.js +0 -13
  57. package/src/Atomic/FormElements/Label/Label.scss +0 -20
  58. package/src/Atomic/FormElements/Label/Label.stories.js +0 -23
  59. package/src/Atomic/FormElements/Modal/Modal.js +0 -69
  60. package/src/Atomic/FormElements/Modal/Modal.scss +0 -230
  61. package/src/Atomic/FormElements/Modal/Modal.stories.js +0 -116
  62. package/src/Atomic/FormElements/MultiSelect/MultiSelect.js +0 -39
  63. package/src/Atomic/FormElements/MultiSelect/MultiSelect.scss +0 -16
  64. package/src/Atomic/FormElements/MultiSelect/MultiSelect.stories.js +0 -28
  65. package/src/Atomic/FormElements/NavLine/NavLine.js +0 -67
  66. package/src/Atomic/FormElements/NavLine/NavLine.scss +0 -108
  67. package/src/Atomic/FormElements/NavLine/NavLine.stories.js +0 -108
  68. package/src/Atomic/FormElements/NumericInput/NumericInput.js +0 -263
  69. package/src/Atomic/FormElements/NumericInput/NumericInput.scss +0 -135
  70. package/src/Atomic/FormElements/NumericInput/NumericInput.stories.js +0 -78
  71. package/src/Atomic/FormElements/RadioInput/RadioInput.js +0 -28
  72. package/src/Atomic/FormElements/RadioInput/RadioInput.scss +0 -63
  73. package/src/Atomic/FormElements/RadioInput/RadioInput.stories.js +0 -23
  74. package/src/Atomic/FormElements/RangeCalendar/RangeCalendar.js +0 -146
  75. package/src/Atomic/FormElements/RangeCalendar/RangeCalendar.scss +0 -101
  76. package/src/Atomic/FormElements/RangeCalendar/RangeCalendar.stories.js +0 -54
  77. package/src/Atomic/FormElements/RangeInputs/RangeInputs.js +0 -41
  78. package/src/Atomic/FormElements/RangeInputs/RangeInputs.scss +0 -20
  79. package/src/Atomic/FormElements/RangeInputs/RangeInputs.stories.js +0 -23
  80. package/src/Atomic/FormElements/Switcher/Switcher.js +0 -24
  81. package/src/Atomic/FormElements/Switcher/Switcher.scss +0 -56
  82. package/src/Atomic/FormElements/Switcher/Switcher.stories.js +0 -22
  83. package/src/Atomic/FormElements/Table/Partials/TdCell.js +0 -47
  84. package/src/Atomic/FormElements/Table/Partials/TdHeader.js +0 -33
  85. package/src/Atomic/FormElements/Table/Partials/TdRow.js +0 -84
  86. package/src/Atomic/FormElements/Table/Partials/TdTitle.js +0 -38
  87. package/src/Atomic/FormElements/Table/Table.js +0 -50
  88. package/src/Atomic/FormElements/Table/Table.scss +0 -78
  89. package/src/Atomic/FormElements/Table/Table.stories.js +0 -102
  90. package/src/Atomic/FormElements/Table/TdTypes/TdActions.js +0 -59
  91. package/src/Atomic/FormElements/Table/TdTypes/TdPriority.js +0 -20
  92. package/src/Atomic/FormElements/Table/TdTypes/TdRange.js +0 -15
  93. package/src/Atomic/FormElements/Table/TdTypes/TdTypes.scss +0 -35
  94. package/src/Atomic/FormElements/Table/TdTypes/TdWeight.js +0 -43
  95. package/src/Atomic/FormElements/Tag/Tag.js +0 -24
  96. package/src/Atomic/FormElements/Tag/Tag.scss +0 -38
  97. package/src/Atomic/FormElements/Tag/Tag.stories.js +0 -30
  98. package/src/Atomic/FormElements/TagsDropdown/TagsDropdown.js +0 -108
  99. package/src/Atomic/FormElements/TagsDropdown/TagsDropdown.scss +0 -131
  100. package/src/Atomic/FormElements/TagsDropdown/TagsDropdown.stories.js +0 -44
  101. package/src/Atomic/FormElements/TextSwitcher/TextSwitcher.js +0 -18
  102. package/src/Atomic/FormElements/TextSwitcher/TextSwitcher.scss +0 -50
  103. package/src/Atomic/FormElements/TextSwitcher/TextSwitcher.stories.js +0 -21
  104. package/src/Atomic/FormElements/Textarea/Textarea.js +0 -19
  105. package/src/Atomic/FormElements/Textarea/Textarea.scss +0 -35
  106. package/src/Atomic/FormElements/Textarea/Textarea.stories.js +0 -24
  107. package/src/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +0 -66
  108. package/src/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.scss +0 -10
  109. package/src/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.stories.js +0 -57
  110. package/src/Atomic/FormElements/TimeRange/TimeRange.js +0 -55
  111. package/src/Atomic/FormElements/TimeRange/TimeRange.scss +0 -17
  112. package/src/Atomic/FormElements/TimeRange/TimeRange.stories.js +0 -21
  113. package/src/Atomic/MainMenu/MainMenu.js +0 -112
  114. package/src/Atomic/MainMenu/MainMenu.scss +0 -176
  115. package/src/Atomic/MainMenu/MainMenu.stories.js +0 -91
  116. package/src/Atomic/UI/Accordion/Accordion.js +0 -45
  117. package/src/Atomic/UI/Accordion/Accordion.scss +0 -73
  118. package/src/Atomic/UI/Accordion/Accordion.stories.js +0 -78
  119. package/src/Atomic/UI/Accordion/AccordionItem.js +0 -92
  120. package/src/Atomic/UI/AdvancedTag/AdvTag.js +0 -81
  121. package/src/Atomic/UI/AdvancedTag/AdvancedTags.js +0 -32
  122. package/src/Atomic/UI/AdvancedTag/AdvancedTags.scss +0 -72
  123. package/src/Atomic/UI/AdvancedTag/AdvancedTags.stories.js +0 -49
  124. package/src/Atomic/UI/Alert/Alert.js +0 -23
  125. package/src/Atomic/UI/Alert/Alert.scss +0 -65
  126. package/src/Atomic/UI/Alert/Alert.stories.js +0 -34
  127. package/src/Atomic/UI/Arrow/Arrow.js +0 -41
  128. package/src/Atomic/UI/Arrow/Arrow.scss +0 -19
  129. package/src/Atomic/UI/Arrow/Arrow.stories.js +0 -32
  130. package/src/Atomic/UI/Button/Button.js +0 -17
  131. package/src/Atomic/UI/Button/Button.scss +0 -108
  132. package/src/Atomic/UI/Button/Button.stories.js +0 -49
  133. package/src/Atomic/UI/Calendar/Calendar.js +0 -180
  134. package/src/Atomic/UI/Calendar/Calendar.scss +0 -607
  135. package/src/Atomic/UI/Calendar/Calendar.stories.js +0 -26
  136. package/src/Atomic/UI/Header/partials/default_ava.png +0 -0
  137. package/src/Atomic/UI/Hint/Hint.js +0 -34
  138. package/src/Atomic/UI/Hint/Hint.scss +0 -92
  139. package/src/Atomic/UI/Hint/Hint.stories.js +0 -34
  140. package/src/Atomic/UI/Price/Price.js +0 -20
  141. package/src/Atomic/UI/Price/Price.stories.js +0 -30
  142. package/src/Atomic/UI/Status/Status.js +0 -38
  143. package/src/Atomic/UI/Status/Status.scss +0 -69
  144. package/src/Atomic/UI/Status/Status.stories.js +0 -47
  145. package/src/Constants/index.constants.js +0 -41
  146. package/src/Functions/inputExecutor.js +0 -53
  147. package/src/Functions/schemas.js +0 -31
  148. package/src/Functions/useClickOutside.js +0 -15
  149. package/src/Functions/useToggle.js +0 -17
  150. package/src/Functions/utils.js +0 -51
  151. package/src/Molecular/Datepicker/Datepicker.js +0 -346
  152. package/src/Molecular/Datepicker/Datepicker.scss +0 -8
  153. package/src/Molecular/Datepicker/Datepicker.stories.js +0 -27
  154. package/src/Molecular/Datepicker/components/Calendar.js +0 -118
  155. package/src/Molecular/FormElements/FormElement.js +0 -18
  156. package/src/Molecular/FormElements/FormElement.scss +0 -8
  157. package/src/Molecular/FormElements/FormElement.stories.js +0 -59
  158. package/src/index.js +0 -3
  159. package/src/scss/_fonts.scss +0 -109
  160. package/src/scss/_vars.scss +0 -48
  161. package/src/scss/main.scss +0 -40
  162. package/webpack.config.js +0 -61
@@ -1,116 +0,0 @@
1
- import React, { useState } from 'react';
2
-
3
- import Modal from './Modal';
4
- import Button from '../../UI/Button/Button';
5
- import Alert from '../../UI/Alert/Alert';
6
-
7
- global.lng = 'en';
8
-
9
- const examples = [
10
- JSON.stringify({ withConfirmation: { cancel: true } }),
11
- JSON.stringify({ withConfirmation: { confirm: true } }),
12
- JSON.stringify({ withConfirmation: { confirm: true, cancel: true } }),
13
- JSON.stringify({
14
- withConfirmation: {
15
- title: 'some value',
16
- children: 'some value',
17
- confirmBtnLabel: 'some value'
18
- }
19
- })
20
- ];
21
- const confirmationDescrip =
22
- 'If you pass the "withConfirmation" property, you will be able to request confirmation of the user\'s action.\n\n' +
23
- `For example, if you want to request confirmation to close a modal window, pass the property like this: ${examples[0]}\n\n` +
24
- `To confirm submit, pass the property like this: with Confirmation: ${examples[1]}\n\n` +
25
- `If you want confirmation for each action, pass the property like this: with Confirmation: ${examples[2]}\n\n` +
26
- `If you want to control the contents of the confirmation window, pass an object with values instead of boolean values, like this:\n\n${examples[3]}\n\n`;
27
-
28
- export default {
29
- title: 'Modal',
30
- component: Modal,
31
- argTypes: {
32
- mode: {
33
- control: {
34
- type: 'select',
35
- options: ['default', 'edit', 'create', 'add']
36
- }
37
- },
38
- variant: {
39
- control: {
40
- type: 'select',
41
- options: ['default', 'primary']
42
- }
43
- },
44
- size: {
45
- control: {
46
- type: 'select',
47
- options: ['default', '290', '420', '870', '770', '950']
48
- }
49
- },
50
- type: {
51
- control: {
52
- type: 'select',
53
- options: ['default', 'primary']
54
- }
55
- },
56
- withConfirmation: {
57
- description: confirmationDescrip
58
- }
59
- }
60
- };
61
-
62
- const Template = args => {
63
- const [isOpen, setIsOpen] = useState(false);
64
- const closeModal = () => setIsOpen(false);
65
-
66
- return (
67
- <>
68
- <Button onClick={() => setIsOpen(true)} text="Show modal" />
69
- <Modal
70
- {...args}
71
- closeModal={closeModal}
72
- submitHandler={() => {
73
- args.submitHandler();
74
- closeModal();
75
- }}
76
- isOpen={isOpen}
77
- >
78
- <Alert message="Alert message" variant="error" className="mb5" />
79
- <Alert message="Alert message" variant="warning" className="mb5" />
80
- <Alert message="Alert message" variant="success" className="mb5" />
81
- <Alert message="Alert message" variant="info" />
82
- </Modal>
83
- </>
84
- );
85
- };
86
-
87
- export const ModalTemplate = Template.bind({});
88
- export const ModalWithConfirmation = Template.bind({});
89
-
90
- const mainProps = {
91
- title: 'Modal',
92
- variant: 'primary',
93
- mode: 'edit',
94
- size: '',
95
- confirmBtnLabel: '',
96
- submitHandler: () => {
97
- console.log('Hi');
98
- }
99
- };
100
-
101
- const confirmationProps = {
102
- title: '',
103
- children: '',
104
- confirmBtnLabel: ''
105
- };
106
-
107
- const confirmationVariants = {
108
- // confirm: { ...confirmationProps },
109
- cancel: { ...confirmationProps }
110
- };
111
-
112
- ModalTemplate.args = { ...mainProps };
113
- ModalWithConfirmation.args = {
114
- ...mainProps,
115
- withConfirmation: { ...confirmationVariants }
116
- };
@@ -1,39 +0,0 @@
1
- import React, { useState } from 'react';
2
-
3
- import Input from '../Input/Input';
4
- import CheckboxInput from '../CheckboxInput/CheckboxInput';
5
-
6
- import './MultiSelect.scss';
7
-
8
- const MultiSelect = ({ options, chosenOptions, onChange }) => {
9
- const [searchValue, setSearchValue] = useState('');
10
-
11
- const checkHandler = (state, value) => {
12
- if (state) {
13
- onChange([...chosenOptions, value]);
14
- } else {
15
- onChange(chosenOptions.filter(item => item !== value));
16
- }
17
- };
18
-
19
- const filteredOptions = options.filter(({ label }) => label.toLowerCase().includes(searchValue.toLowerCase()));
20
-
21
- return (
22
- <div className="multiselect">
23
- <Input value={searchValue} onChange={value => setSearchValue(value)} placeholder="Search" />
24
- <div className="multiselect__list">
25
- {filteredOptions.map(({ label, value, id }) => (
26
- <CheckboxInput
27
- key={id}
28
- value={chosenOptions.includes(value)}
29
- label={label}
30
- onChange={state => checkHandler(state, value)}
31
- className="multiselect__item"
32
- />
33
- ))}
34
- </div>
35
- </div>
36
- );
37
- };
38
-
39
- export default MultiSelect;
@@ -1,16 +0,0 @@
1
- .multiselect {
2
- display: inline-flex;
3
- flex-direction: column;
4
- background-color: #fff;
5
- border: 1px solid #e2e5ec;
6
- border-radius: 4px;
7
- padding: 8px 10px;
8
-
9
- &__item {
10
- height: 24px;
11
- }
12
-
13
- &__list {
14
- margin-top: 4px;
15
- }
16
- }
@@ -1,28 +0,0 @@
1
- import React, { useState } from 'react';
2
- import MultiSelect from './MultiSelect';
3
-
4
- global.lng = 'en';
5
-
6
- export default {
7
- title: 'MultiSelect',
8
- component: MultiSelect
9
- };
10
-
11
- const MultiTemplate = args => {
12
- const options = [
13
- { id: 1, label: 'label test 1', value: 'check1' },
14
- { id: 2, label: 'label test 2', value: 'check2' },
15
- { id: 3, label: 'label test 3', value: 'check3' },
16
- { id: 4, label: 'label test 4', value: 'check4' },
17
- { id: 5, label: 'label test 5', value: 'check5' },
18
- { id: 6, label: 'label test 6', value: 'check6' },
19
- { id: 7, label: 'label test 7', value: 'check7' }
20
- ];
21
-
22
- const [value, setValue] = useState([]);
23
-
24
- return <MultiSelect {...args} options={options} chosenOptions={value} onChange={setValue} />;
25
- };
26
-
27
- export const MultiDropdownTemplate = MultiTemplate.bind({});
28
- MultiDropdownTemplate.args = {};
@@ -1,67 +0,0 @@
1
- import React from 'react';
2
- import { NavLink } from 'react-router-dom';
3
- import cn from 'classnames';
4
- import * as Icons from 'react-feather';
5
-
6
- import './NavLine.scss';
7
-
8
- const NavLine = ({ root, activeTab, variant, onChange, className, items, children, isLocal, mode }) => {
9
- return (
10
- <div className={cn({ 'nav-line': !variant }, { 'nav-line--simple': variant === 'simple' }, className)}>
11
- <div className={`${variant === 'simple' ? 'nav-line--simple__inner' : 'nav-line__inner'}`}>
12
- {items.map(item => {
13
- const Icon = Icons[item?.icon];
14
- return isLocal ? (
15
- <span
16
- onClick={() => onChange(item.tabId)}
17
- key={`tab__${item.tabId}`}
18
- className={cn(
19
- { 'nav-line__item': !variant },
20
- { 'nav-line--simple__item': variant === 'simple' },
21
- { active: activeTab === item.tabId },
22
- { disabled: item.disabled || (mode === 'create' && item.tabId !== 'general') }
23
- )}
24
- >
25
- <div className="j4">
26
- {item.icon && (
27
- <div className="nav-line__item--icon">
28
- <Icon />
29
- </div>
30
- )}
31
-
32
- <span className={cn({ 'nav-line__item--label': variant !== 'simple' })}>{item.label}</span>
33
- {item.count !== undefined ? <span className="nav-line--count ml5">({item.count || 0})</span> : null}
34
- </div>
35
- </span>
36
- ) : (
37
- <NavLink
38
- to={`${root}${item.tabId}/`}
39
- key={`tab__${item.tabId}`}
40
- className={cn(
41
- { 'nav-line__item': !variant },
42
- { 'nav-line--simple__item': variant === 'simple' },
43
- { active: activeTab === item.tabId },
44
- { disabled: item.disabled || (mode === 'create' && item.tabId !== 'general') }
45
- )}
46
- >
47
- <div className="j4">
48
- {item.icon && (
49
- <div className="nav-line__item--icon">
50
- <Icon />
51
- </div>
52
- )}
53
-
54
- <span className={cn({ 'nav-line__item--label': variant !== 'simple' })}>{item.label}</span>
55
- {item.count !== undefined ? <span className="nav-line--count ml5">({item.count || 0})</span> : null}
56
- </div>
57
- </NavLink>
58
- );
59
- })}
60
- </div>
61
-
62
- <div className="nav-line__body">{children}</div>
63
- </div>
64
- );
65
- };
66
-
67
- export default NavLine;
@@ -1,108 +0,0 @@
1
- .nav-line {
2
- &__inner {
3
- display: flex;
4
- justify-content: flex-start;
5
- align-items: center;
6
- flex-wrap: wrap;
7
- background-color: #f7fafc;
8
- }
9
-
10
- &__item {
11
- padding: 10px;
12
- cursor: pointer;
13
- font-size: 13px;
14
- color: #1e1e2d;
15
- border-top: 2px solid transparent;
16
- user-select: none;
17
- margin-bottom: -1px;
18
- border-left: 1px solid transparent;
19
- border-right: 1px solid transparent;
20
-
21
- &--label {
22
- text-transform: uppercase;
23
- }
24
-
25
- &--icon {
26
- display: flex;
27
- align-items: center;
28
- margin-right: 5px;
29
-
30
- svg {
31
- height: 17px;
32
- width: 17px;
33
- }
34
- }
35
-
36
- &.active {
37
- color: #6b81dd;
38
- background: #fff;
39
- font-weight: 500;
40
- border-top: 2px solid #6b81dd;
41
- cursor: default;
42
- border-left: 1px solid #cfcfcf;
43
- border-right: 1px solid #cfcfcf;
44
- text-decoration: none;
45
- }
46
- }
47
-
48
- &__body {
49
- display: flex;
50
- flex-wrap: wrap;
51
- padding: 24px 32px;
52
- font-size: 13px;
53
- border-top: 1px solid #cfcfcf;
54
- margin-left: -32px;
55
- margin-right: -32px;
56
- background-color: #f7fafc;
57
- &:empty {
58
- padding: 0 32px;
59
- }
60
- }
61
- }
62
-
63
- .nav-line--simple {
64
- &__inner {
65
- display: flex;
66
- justify-content: flex-start;
67
- align-items: center;
68
- flex-wrap: wrap;
69
- padding-left: 8px;
70
- }
71
-
72
- &__item {
73
- padding: 10px 10px 14px 10px;
74
- cursor: pointer;
75
- font-size: 13px;
76
- color: #1e1e2d;
77
- border-bottom: 1px solid #cfcfcf;
78
- user-select: none;
79
- margin-bottom: -1px;
80
- border-bottom: 2px solid transparent;
81
- opacity: 65%;
82
- text-decoration: none !important;
83
- &:hover {
84
- border-bottom: 2px solid rgba(107, 129, 221, 0.65);
85
- opacity: 100%;
86
- }
87
-
88
- &.active {
89
- border-bottom: 2px solid #6b81dd;
90
- font-weight: 500;
91
- cursor: default;
92
- opacity: 100%;
93
- }
94
- }
95
-
96
- &__body {
97
- padding: 15px 10px;
98
- font-size: 13px;
99
- }
100
- }
101
-
102
- .nav-line-count {
103
- margin-left: 5px;
104
- }
105
-
106
- .post-log-tab__body {
107
- background-color: #f7fafc;
108
- }
@@ -1,108 +0,0 @@
1
- import React, { useState } from 'react';
2
- import { BrowserRouter } from 'react-router-dom';
3
-
4
- import NavLine from './NavLine';
5
- import Alert from '../../UI/Alert/Alert';
6
- import Status from '../../UI/Status/Status';
7
-
8
- global.lng = 'en';
9
-
10
- export default {
11
- title: 'NavLine',
12
- component: NavLine
13
- };
14
-
15
- const Template = args => {
16
- const navLineContent = {
17
- general: <Alert message="General tab content" />,
18
- payments: <Status status="active" label="Payments tab content" />,
19
- filters: 'Filters tab content',
20
- offers: 'Offers tab content',
21
- merchants: 'Merchants tab content',
22
- integration: 'Integration tab content',
23
- customDetails: <Alert message="Custom Details tab content" type="info" />,
24
- postsLog: 'Posts Log tab content',
25
- tab2: 'Tab2 content'
26
- };
27
- const { initialTab } = args;
28
- const [activeTab, setActiveTab] = useState(initialTab);
29
-
30
- return (
31
- <BrowserRouter>
32
- <NavLine {...args} activeTab={activeTab} onChange={setActiveTab}>
33
- {navLineContent[activeTab]}
34
- </NavLine>
35
- </BrowserRouter>
36
- );
37
- };
38
-
39
- export const NavLineSimpleTemplate = Template.bind({});
40
- export const NavLineTemplate = Template.bind({});
41
-
42
- NavLineSimpleTemplate.args = {
43
- initialTab: 'general',
44
- variant: 'simple',
45
- isLocal: false,
46
- items: [
47
- {
48
- tabId: 'general',
49
- label: 'Tab1'
50
- },
51
- {
52
- tabId: 'payments',
53
- label: 'Tab2'
54
- },
55
- {
56
- tabId: 'filters',
57
- label: 'Tab3'
58
- },
59
- {
60
- tabId: 'offers',
61
- label: 'Tab4',
62
- count: 2
63
- },
64
- {
65
- tabId: 'merchants',
66
- label: 'Tab5',
67
- count: 15
68
- },
69
- {
70
- tabId: 'integration',
71
- label: 'Tab6'
72
- },
73
- {
74
- tabId: 'tab',
75
- label: 'Disabled tab',
76
- status: 'disabled'
77
- }
78
- ]
79
- };
80
-
81
- NavLineTemplate.args = {
82
- initialTab: 'customDetails',
83
- isLocal: false,
84
- items: [
85
- {
86
- tabId: 'customDetails',
87
- label: 'Tab1',
88
- icon: 'Gift'
89
- },
90
- {
91
- tabId: 'postsLog',
92
- label: 'Tab2',
93
- icon: 'Gift',
94
- count: 43
95
- },
96
- {
97
- tabId: 'tab1',
98
- label: 'disabled tab',
99
- icon: 'Gift',
100
- status: 'disabled'
101
- },
102
- {
103
- tabId: 'tab2',
104
- label: 'tab 2',
105
- icon: 'Gift'
106
- }
107
- ]
108
- };