@xaypay/tui 0.0.119 → 0.0.121

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 (180) hide show
  1. package/dist/index.es.js +3983 -4344
  2. package/dist/index.js +3982 -4345
  3. package/package.json +1 -1
  4. package/tui.config.js +1 -1
  5. package/.eslintrc.js +0 -30
  6. package/.husky/pre-commit +0 -4
  7. package/.prettierrc +0 -10
  8. package/.storybook/main.js +0 -48
  9. package/.storybook/preview.js +0 -9
  10. package/rollup.config.js +0 -37
  11. package/src/assets/attach.svg +0 -4
  12. package/src/assets/delete.svg +0 -4
  13. package/src/assets/down-arrow.svg +0 -4
  14. package/src/assets/figma-image.png +0 -0
  15. package/src/assets/heart-filled.svg +0 -17
  16. package/src/assets/heart-outline.svg +0 -14
  17. package/src/assets/like-filled.svg +0 -21
  18. package/src/assets/like-outline.svg +0 -21
  19. package/src/assets/minus.svg +0 -4
  20. package/src/assets/pdf.svg +0 -3
  21. package/src/assets/plus.svg +0 -4
  22. package/src/assets/range-arrow-default.svg +0 -19
  23. package/src/assets/range-arrow-error.svg +0 -19
  24. package/src/assets/range-arrow-success.svg +0 -19
  25. package/src/assets/star-filled.svg +0 -21
  26. package/src/assets/star-outline.svg +0 -5
  27. package/src/assets/table-settings-icon.svg +0 -3
  28. package/src/assets/up-arrow.svg +0 -4
  29. package/src/assets_old/icons/Read Me.txt +0 -7
  30. package/src/assets_old/icons/demo-files/demo.css +0 -152
  31. package/src/assets_old/icons/demo-files/demo.js +0 -28
  32. package/src/assets_old/icons/demo.html +0 -192
  33. package/src/assets_old/icons/fonts/icomoon.eot +0 -0
  34. package/src/assets_old/icons/fonts/icomoon.svg +0 -21
  35. package/src/assets_old/icons/fonts/icomoon.ttf +0 -0
  36. package/src/assets_old/icons/fonts/icomoon.woff +0 -0
  37. package/src/assets_old/icons/selection.json +0 -1
  38. package/src/assets_old/icons/style.css +0 -58
  39. package/src/components/autocomplate/autocomplate.module.css +0 -95
  40. package/src/components/autocomplate/autocomplate.stories.js +0 -35
  41. package/src/components/autocomplate/index.js +0 -164
  42. package/src/components/button/button.stories.js +0 -13
  43. package/src/components/button/index.js +0 -187
  44. package/src/components/captcha/captcha.module.css +0 -74
  45. package/src/components/captcha/captcha.stories.js +0 -21
  46. package/src/components/captcha/index.js +0 -158
  47. package/src/components/checkbox/checkbox.module.css +0 -0
  48. package/src/components/checkbox/checkbox.stories.js +0 -76
  49. package/src/components/checkbox/index.js +0 -120
  50. package/src/components/file/file.module.css +0 -114
  51. package/src/components/file/file.stories.js +0 -20
  52. package/src/components/file/index.js +0 -138
  53. package/src/components/icon/Active.js +0 -20
  54. package/src/components/icon/Arrow.js +0 -19
  55. package/src/components/icon/Cancel.js +0 -19
  56. package/src/components/icon/CaptchaArrowDown.js +0 -19
  57. package/src/components/icon/CaptchaArrowUp.js +0 -19
  58. package/src/components/icon/CheckboxChecked.js +0 -21
  59. package/src/components/icon/CheckboxUnchecked.js +0 -21
  60. package/src/components/icon/Close.js +0 -19
  61. package/src/components/icon/CloseIcon.js +0 -19
  62. package/src/components/icon/CloseSlide.js +0 -19
  63. package/src/components/icon/DeActive.js +0 -20
  64. package/src/components/icon/DeleteComponent.js +0 -20
  65. package/src/components/icon/Done.js +0 -19
  66. package/src/components/icon/Dots.js +0 -19
  67. package/src/components/icon/DownArrow.js +0 -20
  68. package/src/components/icon/HeartFilled.js +0 -25
  69. package/src/components/icon/HeartOutline.js +0 -25
  70. package/src/components/icon/Heic.js +0 -21
  71. package/src/components/icon/Icon.js +0 -11
  72. package/src/components/icon/ListItemDelete.js +0 -19
  73. package/src/components/icon/ListItemJpeg.js +0 -21
  74. package/src/components/icon/ListItemJpg.js +0 -21
  75. package/src/components/icon/ListItemPdf.js +0 -21
  76. package/src/components/icon/ListItemPng.js +0 -21
  77. package/src/components/icon/Next.js +0 -20
  78. package/src/components/icon/Nextarrow.js +0 -19
  79. package/src/components/icon/PDF.js +0 -19
  80. package/src/components/icon/Prev.js +0 -20
  81. package/src/components/icon/RangeArrowDefault.js +0 -43
  82. package/src/components/icon/RangeArrowError.js +0 -43
  83. package/src/components/icon/RangeArrowSuccess.js +0 -43
  84. package/src/components/icon/Reject.js +0 -19
  85. package/src/components/icon/RemoveFile.js +0 -20
  86. package/src/components/icon/Required.js +0 -19
  87. package/src/components/icon/ToasterClose.js +0 -19
  88. package/src/components/icon/ToasterError.js +0 -19
  89. package/src/components/icon/ToasterInfo.js +0 -19
  90. package/src/components/icon/ToasterSuccess.js +0 -19
  91. package/src/components/icon/ToasterWarning.js +0 -19
  92. package/src/components/icon/Tooltip.js +0 -19
  93. package/src/components/icon/UpArrow.js +0 -20
  94. package/src/components/icon/Upload.js +0 -25
  95. package/src/components/icon/Wrong.js +0 -21
  96. package/src/components/icon/Zoom.js +0 -21
  97. package/src/components/icon/index.js +0 -0
  98. package/src/components/input/index.js +0 -688
  99. package/src/components/input/input.module.css +0 -51
  100. package/src/components/input/input.stories.js +0 -26
  101. package/src/components/modal/index.js +0 -436
  102. package/src/components/modal/modal.module.css +0 -22
  103. package/src/components/modal/modal.stories.js +0 -88
  104. package/src/components/newAutocomplete/NewAutocomplete.stories.js +0 -102
  105. package/src/components/newAutocomplete/autocomplete.module.css +0 -4
  106. package/src/components/newAutocomplete/index.js +0 -592
  107. package/src/components/newFile/fileItem.js +0 -281
  108. package/src/components/newFile/index.js +0 -731
  109. package/src/components/newFile/newFile.stories.js +0 -93
  110. package/src/components/pagination/index.js +0 -234
  111. package/src/components/pagination/pagination.module.css +0 -93
  112. package/src/components/pagination/pagination.stories.js +0 -371
  113. package/src/components/pagination/paginationRange.js +0 -45
  114. package/src/components/radio/index.js +0 -236
  115. package/src/components/radio/radio.module.css +0 -59
  116. package/src/components/radio/radio.stories.js +0 -59
  117. package/src/components/select/index.js +0 -534
  118. package/src/components/select/select.module.css +0 -93
  119. package/src/components/select/select.stories.js +0 -39
  120. package/src/components/singleCheckbox/Checkbox.js +0 -84
  121. package/src/components/singleCheckbox/index.js +0 -65
  122. package/src/components/singleCheckbox/singleCheckbox.stories.js +0 -24
  123. package/src/components/stepper/index.js +0 -45
  124. package/src/components/stepper/stepper.module.css +0 -57
  125. package/src/components/stepper/stepper.stories.js +0 -17
  126. package/src/components/table/index.js +0 -789
  127. package/src/components/table/table.module.css +0 -63
  128. package/src/components/table/table.stories.js +0 -497
  129. package/src/components/table/td.js +0 -429
  130. package/src/components/table/th.js +0 -103
  131. package/src/components/textarea/index.js +0 -285
  132. package/src/components/textarea/textarea.module.css +0 -25
  133. package/src/components/textarea/textarea.stories.js +0 -56
  134. package/src/components/toaster/Toast.js +0 -203
  135. package/src/components/toaster/index.js +0 -131
  136. package/src/components/toaster/toaster.module.css +0 -201
  137. package/src/components/toaster/toaster.stories.js +0 -593
  138. package/src/components/tooltip/index.js +0 -156
  139. package/src/components/tooltip/tooltip.module.css +0 -46
  140. package/src/components/tooltip/tooltip.stories.js +0 -30
  141. package/src/components/typography/index.js +0 -124
  142. package/src/components/typography/typography.module.css +0 -57
  143. package/src/components/typography/typography.stories.js +0 -22
  144. package/src/index.js +0 -19
  145. package/src/stories/Introduction.stories.mdx +0 -210
  146. package/src/stories/assets/code-brackets.svg +0 -1
  147. package/src/stories/assets/colors.svg +0 -1
  148. package/src/stories/assets/comments.svg +0 -1
  149. package/src/stories/assets/direction.svg +0 -1
  150. package/src/stories/assets/flow.svg +0 -1
  151. package/src/stories/assets/plugin.svg +0 -1
  152. package/src/stories/assets/repo.svg +0 -1
  153. package/src/stories/assets/stackalt.svg +0 -1
  154. package/src/stories/changelog.stories.mdx +0 -172
  155. package/src/stories/configuration.stories.mdx +0 -715
  156. package/src/stories/documentation.stories.mdx +0 -118
  157. package/src/stories/static/autocomplete-usage.png +0 -0
  158. package/src/stories/static/button-usage-icon.png +0 -0
  159. package/src/stories/static/button-usage.png +0 -0
  160. package/src/stories/static/captcha-usage.png +0 -0
  161. package/src/stories/static/checkbox-group-usage-2.png +0 -0
  162. package/src/stories/static/checkbox-group-usage.png +0 -0
  163. package/src/stories/static/file-single-usage.png +0 -0
  164. package/src/stories/static/file-usage.png +0 -0
  165. package/src/stories/static/input-usage.png +0 -0
  166. package/src/stories/static/modal-usage.png +0 -0
  167. package/src/stories/static/radio-usage.png +0 -0
  168. package/src/stories/static/select-usage.png +0 -0
  169. package/src/stories/static/table-body-data-structure-first-part-usage.png +0 -0
  170. package/src/stories/static/table-body-data-structure-second-part-usage.png +0 -0
  171. package/src/stories/static/table-body-data-structure-third-part-usage.png +0 -0
  172. package/src/stories/static/table-component-usage.png +0 -0
  173. package/src/stories/static/table-header-data-structure-usage.png +0 -0
  174. package/src/stories/static/table-new-data-structure-usage.png +0 -0
  175. package/src/stories/static/textarea-usage.png +0 -0
  176. package/src/stories/static/toaster-container-usage.png +0 -0
  177. package/src/stories/static/toaster-usage.png +0 -0
  178. package/src/stories/static/tooltip-usage.png +0 -0
  179. package/src/stories/usage.stories.mdx +0 -201
  180. package/src/utils/index.js +0 -29
@@ -1,39 +0,0 @@
1
- import React from 'react'
2
- import { Select } from '.'
3
-
4
- export default {
5
- component: Select,
6
- title: 'Components/Select',
7
- argTypes: {
8
- options: {
9
- control: 'array',
10
- },
11
- selected: {
12
- control: 'array',
13
- },
14
- },
15
- }
16
-
17
- const Template = (args) => (
18
- <Select label="" {...args}>
19
- Default
20
- </Select>
21
- )
22
-
23
- export const Default = Template.bind({})
24
- Default.args = {
25
- showCloseIcon: true,
26
- label: 'վարչական շրջան',
27
- options: [
28
- { bbb: '0', value: 'Արաբկիր' },
29
- { bbb: '1', value: 'Կենտրոն' },
30
- { bbb: '2', value: 'Մալաթիա' },
31
- ],
32
- onChange: () => {},
33
- defaultOption: 'Ընտրել',
34
- selected: [
35
- { bbb: '1', value: 'Կենտրոն' },
36
- { bbb: '2', value: 'Մալաթիա' },
37
- ],
38
- keyNames: { name: 'value', id: 'bbb' },
39
- }
@@ -1,84 +0,0 @@
1
- import React, { useEffect, useState } from 'react'
2
-
3
- import { compereConfigs } from './../../utils'
4
-
5
- import ReactCheckbox from '../icon/CheckboxUnchecked'
6
- import ReactCheckboxChecked from '../icon/CheckboxChecked'
7
-
8
- const Checkbox = ({
9
- data,
10
- index,
11
- label,
12
- styles,
13
- checked,
14
- disabled,
15
- innerIndex,
16
- checkedIcon,
17
- checkedColor,
18
- unCheckedIcon,
19
- handleChecked,
20
- unCheckedColor,
21
- labelMarginLeft,
22
- ignoreDisabledForChecked,
23
- }) => {
24
- const configStyles = compereConfigs()
25
-
26
- const [innerChecked, setInnerChecked] = useState(false)
27
- const [innerDisabled, setInnerDisabled] = useState(false)
28
-
29
- const handleClick = (e) => {
30
- handleChecked(data, e, index, innerIndex)
31
- }
32
-
33
- useEffect(() => {
34
- setInnerDisabled(disabled)
35
- }, [disabled])
36
-
37
- useEffect(() => {
38
- setInnerChecked(checked)
39
- }, [checked])
40
-
41
- useEffect(() => {
42
- if (index && typeof index !== 'number') {
43
- alert('Please set index value as valid number')
44
- }
45
- }, [index])
46
-
47
- useEffect(() => {
48
- if (innerIndex && typeof innerIndex !== 'number') {
49
- alert('Please set index value as valid number')
50
- }
51
- }, [innerIndex])
52
-
53
- return (
54
- <div
55
- style={{
56
- width: label ? 'fit-content' : '16px',
57
- height: '16px',
58
- marginRight: '9px',
59
- display: label ? 'flex' : 'inline-block',
60
- cursor: !innerDisabled ? 'pointer' : 'not-allowed',
61
- ...styles,
62
- }}
63
- onClick={!innerDisabled && handleChecked ? handleClick : (_) => _}
64
- >
65
- {innerChecked && (ignoreDisabledForChecked ? ignoreDisabledForChecked : !innerDisabled) ? (
66
- checkedIcon ? (
67
- checkedIcon
68
- ) : (
69
- <ReactCheckboxChecked
70
- fillColor={checkedColor ? checkedColor : configStyles.CHECKBOX.checkedColor}
71
- />
72
- )
73
- ) : unCheckedIcon ? (
74
- unCheckedIcon
75
- ) : (
76
- <ReactCheckbox fillColor={unCheckedColor ? unCheckedColor : configStyles.CHECKBOX.unCheckedColor} />
77
- )}
78
-
79
- {label && <span style={{ marginLeft: labelMarginLeft }}>{label}</span>}
80
- </div>
81
- )
82
- }
83
-
84
- export default Checkbox
@@ -1,65 +0,0 @@
1
- import React, { useEffect, useState } from 'react'
2
- import PropTypes from 'prop-types'
3
-
4
- import { compereConfigs } from './../../utils'
5
-
6
- import Checkbox from './Checkbox'
7
-
8
- export const SingleCheckbox = ({
9
- data,
10
- index,
11
- label,
12
- styles,
13
- checked,
14
- disabled,
15
- innerIndex,
16
- checkedIcon,
17
- checkedColor,
18
- unCheckedIcon,
19
- handleChecked,
20
- unCheckedColor,
21
- labelMarginLeft,
22
- ignoreDisabledForChecked,
23
- }) => {
24
- const configStyles = compereConfigs()
25
- const [innerData, setInnerData] = useState(null)
26
-
27
- useEffect(() => {
28
- setInnerData(data)
29
- }, [data])
30
-
31
- return (
32
- <Checkbox
33
- index={index}
34
- label={label}
35
- styles={styles}
36
- data={innerData}
37
- checked={checked}
38
- disabled={disabled}
39
- innerIndex={innerIndex}
40
- checkedIcon={checkedIcon}
41
- checkedColor={checkedColor}
42
- unCheckedIcon={unCheckedIcon}
43
- handleChecked={handleChecked}
44
- unCheckedColor={unCheckedColor}
45
- ignoreDisabledForChecked={ignoreDisabledForChecked}
46
- labelMarginLeft={labelMarginLeft ? labelMarginLeft : configStyles.CHECKBOX.labelMarginLeft}
47
- />
48
- )
49
- }
50
-
51
- SingleCheckbox.propTypes = {
52
- data: PropTypes.object,
53
- label: PropTypes.string,
54
- onClick: PropTypes.func,
55
- index: PropTypes.number,
56
- styles: PropTypes.object,
57
- disabled: PropTypes.bool,
58
- innerIndex: PropTypes.number,
59
- checkedColor: PropTypes.string,
60
- checkedIcon: PropTypes.element,
61
- unCheckedIcon: PropTypes.element,
62
- unCheckedColor: PropTypes.string,
63
- labelMarginLeft: PropTypes.string,
64
- ignoreDisabledForChecked: PropTypes.bool,
65
- }
@@ -1,24 +0,0 @@
1
- import React, { useState } from 'react'
2
- import { SingleCheckbox } from '.'
3
- export default {
4
- component: SingleCheckbox,
5
- title: 'Components/SingleCheckbox',
6
- }
7
-
8
- const Template = (args) => {
9
- const [check, setCheck] = useState(false)
10
-
11
- const handleChecked = (data, e) => {
12
- console.log(e, 'target event')
13
- console.log(data, 'data')
14
- setCheck(!check)
15
- }
16
-
17
- return <SingleCheckbox checked={check} handleChecked={handleChecked} {...args} />
18
- }
19
-
20
- export const Default = Template.bind({})
21
- Default.args = {
22
- checkedColor: '#00236A',
23
- unCheckedColor: '#D1D1D1',
24
- }
@@ -1,45 +0,0 @@
1
- import React from 'react'
2
- import PropTypes from 'prop-types'
3
- import classNames from 'classnames'
4
- import { compereConfigs } from './../../utils'
5
- import styles from './stepper.module.css'
6
-
7
- export const Stepper = ({ stepLength, activeSteps, className }) => {
8
- const configStyles = compereConfigs()
9
- return (
10
- <div
11
- className={classNames(
12
- className ? className : configStyles.STEPPER.className,
13
- `${styles['stepper-container']} stepper-container-rem`
14
- )}
15
- >
16
- {(() => {
17
- let steppers = []
18
- for (let step = 1; step <= stepLength; step++) {
19
- steppers.push(
20
- <div
21
- className={classNames(`${step <= activeSteps ? styles.activeRing : styles.bigRing}`)}
22
- key={step}
23
- >
24
- <div
25
- className={classNames(
26
- `${step <= activeSteps ? styles.smallActiveRing : styles.smallRing}`
27
- )}
28
- >
29
- {step <= activeSteps ? step : ''}
30
- </div>
31
- </div>
32
- )
33
- }
34
- return steppers
35
- })()}
36
- </div>
37
- )
38
- }
39
-
40
- Stepper.propTypes = {
41
- className: PropTypes.string,
42
- onChange: PropTypes.func,
43
- stepLength: PropTypes.number,
44
- activeSteps: PropTypes.number,
45
- }
@@ -1,57 +0,0 @@
1
- .stepper-container > div:last-child:before {
2
- display: none;
3
- }
4
- .bigRing, .activeRing {
5
- position: relative;
6
- width: 36px;
7
- height: 36px;
8
- border-radius: 50%;
9
- margin-bottom: 36px;
10
- }
11
- .bigRing {
12
- box-shadow: 0 0 0 2px #D1D1D1;
13
- }
14
- .bigRing:before {
15
- background: #D1D1D1;
16
- }
17
- .activeRing {
18
- box-shadow: 0 0 0 2px #00236A;
19
- }
20
- .activeRing:before {
21
- background: #00236A;
22
- }
23
- .bigRing:before, .activeRing:before {
24
- position: absolute;
25
- content: '';
26
- width: 2px;
27
- height: 28px;
28
- bottom: -32px;
29
- left: 0;
30
- right: 0;
31
- margin: auto;
32
- border-radius: 20px;
33
- overflow: hidden;
34
- }
35
- .smallRing, .smallActiveRing {
36
- border-radius: 50%;
37
- position: absolute;
38
- top: 0;
39
- left: 0;
40
- right: 0;
41
- bottom: 0;
42
- margin: auto;
43
- }
44
- .smallRing {
45
- width: 14px;
46
- height: 14px;
47
- background-color: #D1D1D1;
48
- }
49
- .smallActiveRing {
50
- display: flex;
51
- align-items: center;
52
- justify-content: center;
53
- width: 28px;
54
- height: 28px;
55
- background-color: #00236A;
56
- color: #ffffff;
57
- }
@@ -1,17 +0,0 @@
1
- import React from 'react'
2
- import { Stepper } from './index'
3
- export default {
4
- component: Stepper,
5
- title: 'Components/Stepper',
6
- }
7
-
8
- const Template = ({ stepLength, activeSteps }) => {
9
- return <Stepper stepLength={stepLength} activeSteps={activeSteps} />
10
- }
11
-
12
- export const Default = Template.bind({})
13
-
14
- Default.args = {
15
- stepLength: 5,
16
- activeSteps: 3,
17
- }