@xaypay/tui 0.2.33 → 0.3.0
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/CHANGELOG.md +13 -0
- package/dist/index.es.js +53 -49
- package/dist/index.js +53 -49
- package/package.json +1 -1
- package/tui.config.js +6 -8
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@ All notable changes to `@xaypay/tui` will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.2.34] - 2025-11-27
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **INPUT, SELECT, AUTOCOMPLETE** Reuse each component's label margin when rendering the "show more / show less" trigger so the toggle no longer collapses surrounding spacing.
|
|
12
|
+
|
|
13
|
+
## [0.2.33] - 2025-11-25
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- **INPUT, SELECT, TEXTAREA, AUTOCOMPLETE** Add label show more or less functionality on input, select, textarea, and autocomplete components like file component
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- **INPUT, SELECT, TEXTAREA, AUTOCOMPLETE, FILE** Change show less position in all labels
|
|
20
|
+
|
|
8
21
|
## [0.2.32] - 2025-11-10
|
|
9
22
|
|
|
10
23
|
### Fixed
|
package/dist/index.es.js
CHANGED
|
@@ -525,7 +525,6 @@ var packageResult = {
|
|
|
525
525
|
BUTTON: {
|
|
526
526
|
opacity: 1,
|
|
527
527
|
width: '100%',
|
|
528
|
-
radius: '6px',
|
|
529
528
|
className: '',
|
|
530
529
|
type: 'button',
|
|
531
530
|
height: '46px',
|
|
@@ -534,16 +533,16 @@ var packageResult = {
|
|
|
534
533
|
disabled: false,
|
|
535
534
|
cursor: 'pointer',
|
|
536
535
|
contentWidth: false,
|
|
536
|
+
borderRadius: '6px',
|
|
537
|
+
outlineWidth: '2px',
|
|
537
538
|
padding: '12px 20px',
|
|
539
|
+
disabledBorderWidth: '2px',
|
|
538
540
|
transition: 'background-color 240ms, color 240ms',
|
|
539
|
-
box: {
|
|
540
|
-
sizing: boxSizing
|
|
541
|
-
},
|
|
542
541
|
colors: {
|
|
543
542
|
background: 'rgba(0, 35, 106, 1)',
|
|
544
543
|
backgroundHover: '#CB3A3A',
|
|
545
544
|
disabled: 'rgba(60, 57, 62, 1)',
|
|
546
|
-
|
|
545
|
+
disabledBorderColor: 'rgba(60, 57, 62, 1)',
|
|
547
546
|
disabledBackground: 'rgba(238, 238, 238, 1)',
|
|
548
547
|
withoutStyling: {
|
|
549
548
|
color: '#000000',
|
|
@@ -560,8 +559,7 @@ var packageResult = {
|
|
|
560
559
|
}
|
|
561
560
|
},
|
|
562
561
|
icon: {
|
|
563
|
-
|
|
564
|
-
marginRight: '10px'
|
|
562
|
+
gap: '10px'
|
|
565
563
|
},
|
|
566
564
|
withoutStyling: false
|
|
567
565
|
},
|
|
@@ -1112,6 +1110,7 @@ var packageResult = {
|
|
|
1112
1110
|
showLessText: 'Փակել',
|
|
1113
1111
|
showMoreText: 'Ավելին',
|
|
1114
1112
|
showMoreTextColor: '#2C46C1',
|
|
1113
|
+
marginBottom: '6px',
|
|
1115
1114
|
color: '#4A4A4D',
|
|
1116
1115
|
font: {
|
|
1117
1116
|
...fontObject
|
|
@@ -1544,39 +1543,39 @@ var configStylesPromise = getProps();
|
|
|
1544
1543
|
|
|
1545
1544
|
const Button = ({
|
|
1546
1545
|
icon,
|
|
1547
|
-
size,
|
|
1548
|
-
style,
|
|
1549
1546
|
type,
|
|
1550
|
-
font,
|
|
1551
1547
|
color,
|
|
1552
|
-
|
|
1548
|
+
text,
|
|
1553
1549
|
width,
|
|
1554
1550
|
height,
|
|
1555
1551
|
cursor,
|
|
1556
|
-
weight,
|
|
1557
1552
|
border,
|
|
1558
|
-
radius,
|
|
1559
1553
|
outline,
|
|
1560
1554
|
padding,
|
|
1561
1555
|
opacity,
|
|
1562
1556
|
onClick,
|
|
1557
|
+
iconGap,
|
|
1563
1558
|
disabled,
|
|
1559
|
+
fontSize,
|
|
1564
1560
|
className,
|
|
1565
|
-
|
|
1566
|
-
|
|
1561
|
+
iconHover,
|
|
1562
|
+
fontStyle,
|
|
1567
1563
|
hoverColor,
|
|
1568
1564
|
transition,
|
|
1565
|
+
fontWeight,
|
|
1566
|
+
fontFamily,
|
|
1567
|
+
outlineWidth,
|
|
1568
|
+
borderRadius,
|
|
1569
1569
|
contentWidth,
|
|
1570
|
-
iconRightSide,
|
|
1571
1570
|
disabledColor,
|
|
1572
1571
|
textTransform,
|
|
1573
1572
|
withoutStyling,
|
|
1574
1573
|
backgroundColor,
|
|
1575
|
-
disabledLineColor,
|
|
1576
|
-
btnIconMarginLeft,
|
|
1577
|
-
btnIconMarginRight,
|
|
1578
1574
|
withoutStylingColor,
|
|
1575
|
+
disabledBorderColor,
|
|
1576
|
+
disabledBorderWidth,
|
|
1579
1577
|
backgroundHoverColor,
|
|
1578
|
+
iconPosition = 'left',
|
|
1580
1579
|
disabledBackgroundColor,
|
|
1581
1580
|
withoutStylingHoverColor,
|
|
1582
1581
|
...props
|
|
@@ -1594,8 +1593,8 @@ const Button = ({
|
|
|
1594
1593
|
className && setClassProps(() => classnames(className ?? configStyles.BUTTON.className));
|
|
1595
1594
|
}, [className]);
|
|
1596
1595
|
useEffect(() => {
|
|
1597
|
-
if (!
|
|
1598
|
-
alert('Add icon or
|
|
1596
|
+
if (!text && !icon) {
|
|
1597
|
+
alert('Add icon or text props on Button component');
|
|
1599
1598
|
}
|
|
1600
1599
|
configStylesPromise.then(data => {
|
|
1601
1600
|
setClassProps(() => classnames(className ?? data.BUTTON.className));
|
|
@@ -1613,15 +1612,15 @@ const Button = ({
|
|
|
1613
1612
|
display: 'flex',
|
|
1614
1613
|
outline: 'none',
|
|
1615
1614
|
alignItems: 'center',
|
|
1615
|
+
boxSizing: 'border-box',
|
|
1616
1616
|
justifyContent: 'center',
|
|
1617
1617
|
height: height ?? configStyles.BUTTON.height,
|
|
1618
1618
|
padding: padding ?? configStyles.BUTTON.padding,
|
|
1619
|
-
fontSize:
|
|
1620
|
-
borderRadius:
|
|
1621
|
-
fontStyle:
|
|
1622
|
-
fontFamily:
|
|
1623
|
-
fontWeight:
|
|
1624
|
-
boxSizing: boxSizing ?? configStyles.BUTTON.box.sizing,
|
|
1619
|
+
fontSize: fontSize ?? configStyles.BUTTON.font.size,
|
|
1620
|
+
borderRadius: borderRadius ?? configStyles.BUTTON.borderRadius,
|
|
1621
|
+
fontStyle: fontStyle ?? configStyles.BUTTON.font.style,
|
|
1622
|
+
fontFamily: fontFamily ?? configStyles.BUTTON.font.family,
|
|
1623
|
+
fontWeight: fontWeight ?? configStyles.BUTTON.font.weight,
|
|
1625
1624
|
transition: transition ?? configStyles.BUTTON.transition,
|
|
1626
1625
|
border: outline ? 'none' : border ?? configStyles.BUTTON.border,
|
|
1627
1626
|
width: contentWidth ? 'auto' : width ?? configStyles.BUTTON.width,
|
|
@@ -1629,7 +1628,7 @@ const Button = ({
|
|
|
1629
1628
|
cursor: disabled ? 'not-allowed' : cursor ?? configStyles.BUTTON.cursor,
|
|
1630
1629
|
opacity: opacity ?? configStyles.BUTTON.opacity,
|
|
1631
1630
|
backgroundColor: withoutStyling ?? configStyles.BUTTON.withoutStyling ? 'transparent' : (outline || !outline) && disabled ? disabledBackgroundColor ? disabledBackgroundColor : configStyles.BUTTON.colors.disabledBackground : outline && !disabled ? isHover ? backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background : '#ffffff' : !outline && !disabled && isHover ? backgroundHoverColor ? backgroundHoverColor : configStyles.BUTTON.colors.backgroundHover : backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background,
|
|
1632
|
-
boxShadow: outline && !withoutStyling && !configStyles.BUTTON.withoutStyling ? disabled ? `inset 0 0 0
|
|
1631
|
+
boxShadow: outline && !withoutStyling && !configStyles.BUTTON.withoutStyling ? disabled ? `inset 0 0 0 ${disabledBorderWidth ?? configStyles.BUTTON.disabledBorderWidth} ${disabledBorderColor ?? configStyles.BUTTON.colors.disabledBorderColor}` : `inset 0 0 0 ${outlineWidth ?? configStyles.BUTTON.outlineWidth} ${backgroundColor ?? configStyles.BUTTON.colors.background}` : 'none',
|
|
1633
1632
|
color: withoutStyling ?? configStyles.BUTTON.withoutStyling ? isHover ? withoutStylingHoverColor ?? configStyles.BUTTON.colors.withoutStyling.hoverColor : withoutStylingColor ?? configStyles.BUTTON.colors.withoutStyling.color : (outline || !outline) && disabled ? disabledColor ? disabledColor : configStyles.BUTTON.colors.disabled : outline && !disabled ? isHover ? color ? color : configStyles.BUTTON.color : backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background : !outline && !disabled && isHover ? hoverColor ? hoverColor : configStyles.BUTTON.text.colors.hover : color ? color : configStyles.BUTTON.color
|
|
1634
1633
|
},
|
|
1635
1634
|
type: type ?? configStyles.BUTTON.type,
|
|
@@ -1638,50 +1637,50 @@ const Button = ({
|
|
|
1638
1637
|
onMouseEnter: handleMouseEnter,
|
|
1639
1638
|
onMouseLeave: handleMouseLeave,
|
|
1640
1639
|
className: classProps
|
|
1641
|
-
}, props),
|
|
1640
|
+
}, props), iconPosition === 'left' ? isHover && iconHover ? iconHover : icon ?? null : ' ', ' ', text && /*#__PURE__*/React__default.createElement("span", {
|
|
1642
1641
|
style: {
|
|
1643
|
-
marginLeft: icon &&
|
|
1644
|
-
marginRight: icon &&
|
|
1642
|
+
marginLeft: icon && iconPosition === 'left' ? iconGap ?? configStyles.BUTTON.icon.gap : '0px',
|
|
1643
|
+
marginRight: icon && iconPosition === 'right' ? iconGap ?? configStyles.BUTTON.icon.gap : '0px'
|
|
1645
1644
|
}
|
|
1646
|
-
},
|
|
1645
|
+
}, text), ' ', iconPosition === 'right' ? isHover && iconHover ? iconHover : icon ?? null : ' ', !icon && !text && 'Add icon or text prop on Button component'));
|
|
1647
1646
|
};
|
|
1648
1647
|
Button.propTypes = {
|
|
1649
1648
|
type: PropTypes.string,
|
|
1650
|
-
size: PropTypes.string,
|
|
1651
|
-
style: PropTypes.string,
|
|
1652
|
-
font: PropTypes.string,
|
|
1653
1649
|
icon: PropTypes.element,
|
|
1654
1650
|
color: PropTypes.string,
|
|
1655
1651
|
width: PropTypes.string,
|
|
1656
1652
|
outline: PropTypes.bool,
|
|
1657
1653
|
onClick: PropTypes.func,
|
|
1658
|
-
label: PropTypes.string,
|
|
1659
|
-
weight: PropTypes.string,
|
|
1660
1654
|
height: PropTypes.string,
|
|
1661
1655
|
cursor: PropTypes.string,
|
|
1662
1656
|
border: PropTypes.string,
|
|
1663
1657
|
disabled: PropTypes.bool,
|
|
1664
|
-
radius: PropTypes.string,
|
|
1665
1658
|
padding: PropTypes.string,
|
|
1666
1659
|
opacity: PropTypes.number,
|
|
1667
|
-
boxSizing: PropTypes.string,
|
|
1668
1660
|
className: PropTypes.string,
|
|
1669
|
-
|
|
1661
|
+
iconHover: PropTypes.element,
|
|
1670
1662
|
hoverColor: PropTypes.string,
|
|
1671
1663
|
transition: PropTypes.string,
|
|
1672
1664
|
contentWidth: PropTypes.bool,
|
|
1673
|
-
|
|
1665
|
+
outlineWidth: PropTypes.string,
|
|
1674
1666
|
withoutStyling: PropTypes.bool,
|
|
1675
1667
|
textTransform: PropTypes.string,
|
|
1676
1668
|
disabledColor: PropTypes.string,
|
|
1677
1669
|
backgroundColor: PropTypes.string,
|
|
1678
|
-
|
|
1679
|
-
btnIconMarginLeft: PropTypes.string,
|
|
1680
|
-
btnIconMarginRight: PropTypes.string,
|
|
1670
|
+
disabledBorderWidth: PropTypes.string,
|
|
1681
1671
|
withoutStylingColor: PropTypes.string,
|
|
1682
1672
|
backgroundHoverColor: PropTypes.string,
|
|
1683
1673
|
disabledBackgroundColor: PropTypes.string,
|
|
1684
|
-
withoutStylingHoverColor: PropTypes.string
|
|
1674
|
+
withoutStylingHoverColor: PropTypes.string,
|
|
1675
|
+
text: PropTypes.string,
|
|
1676
|
+
fontFamily: PropTypes.string,
|
|
1677
|
+
fontSize: PropTypes.string,
|
|
1678
|
+
fontStyle: PropTypes.string,
|
|
1679
|
+
fontWeight: PropTypes.string,
|
|
1680
|
+
iconGap: PropTypes.string,
|
|
1681
|
+
borderRadius: PropTypes.string,
|
|
1682
|
+
disabledBorderColor: PropTypes.string,
|
|
1683
|
+
iconPosition: PropTypes.oneOf(['left', 'right'])
|
|
1685
1684
|
};
|
|
1686
1685
|
|
|
1687
1686
|
const SvgSvg = ({
|
|
@@ -1879,6 +1878,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1879
1878
|
labelShowLessText,
|
|
1880
1879
|
labelShowMoreText,
|
|
1881
1880
|
showMoreTextColor,
|
|
1881
|
+
labelMarginBottom,
|
|
1882
1882
|
useLabelTooltip,
|
|
1883
1883
|
labelTooltipColor,
|
|
1884
1884
|
labelTooltipPadding,
|
|
@@ -2447,9 +2447,9 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2447
2447
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2448
2448
|
style: {
|
|
2449
2449
|
display: 'flex',
|
|
2450
|
-
marginBottom: '6px',
|
|
2451
2450
|
alignItems: 'center',
|
|
2452
2451
|
justifyContent: label ? 'space-between' : 'flex-end',
|
|
2452
|
+
marginBottom: labelMarginBottom ?? configStyles.FILE.label.marginBottom,
|
|
2453
2453
|
width: deleteComponent && useLabelTooltip && handleCheckTextWidth() === 'more' ? 'calc(100% - 26px)' : '100%'
|
|
2454
2454
|
}
|
|
2455
2455
|
}, label && /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -2756,6 +2756,7 @@ File.propTypes = {
|
|
|
2756
2756
|
labelShowLessText: PropTypes.string,
|
|
2757
2757
|
labelShowMoreText: PropTypes.string,
|
|
2758
2758
|
showMoreTextColor: PropTypes.string,
|
|
2759
|
+
labelMarginBottom: PropTypes.string,
|
|
2759
2760
|
useLabelTooltip: PropTypes.bool,
|
|
2760
2761
|
labelTooltipColor: PropTypes.string,
|
|
2761
2762
|
labelTooltipPadding: PropTypes.string,
|
|
@@ -5828,7 +5829,8 @@ const Input = ({
|
|
|
5828
5829
|
fontStyle: labelStyle ?? configStyles.INPUT.label.font.style,
|
|
5829
5830
|
fontWeight: labelWeight ?? configStyles.INPUT.label.font.weight,
|
|
5830
5831
|
fontFamily: labelFontFamily ?? configStyles.INPUT.label.font.family,
|
|
5831
|
-
color: showMoreTextColor ?? configStyles.INPUT.label.showMoreTextColor
|
|
5832
|
+
color: showMoreTextColor ?? configStyles.INPUT.label.showMoreTextColor,
|
|
5833
|
+
marginBottom: labelMarginBottom ?? configStyles.INPUT.label.marginBottom
|
|
5832
5834
|
},
|
|
5833
5835
|
onClick: handleChangeShowMore
|
|
5834
5836
|
}, labelShowMoreText ?? configStyles.INPUT.label.showMoreText) : ''), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -6656,7 +6658,8 @@ const Select = ({
|
|
|
6656
6658
|
fontStyle: labelFontStyle ?? configStyles.SELECT.label.font.style,
|
|
6657
6659
|
fontWeight: labelWeight ?? configStyles.SELECT.label.font.weight,
|
|
6658
6660
|
fontFamily: labelFontFamily ?? configStyles.SELECT.label.font.family,
|
|
6659
|
-
color: showMoreTextColor ?? configStyles.SELECT.label.showMoreTextColor
|
|
6661
|
+
color: showMoreTextColor ?? configStyles.SELECT.label.showMoreTextColor,
|
|
6662
|
+
marginBottom: labelMarginBottom ?? configStyles.INPUT.label.marginBottom
|
|
6660
6663
|
},
|
|
6661
6664
|
onClick: handleChangeShowMore
|
|
6662
6665
|
}, labelShowMoreText ?? configStyles.SELECT.label.showMoreText) : ''), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -9891,7 +9894,8 @@ const Autocomplete = ({
|
|
|
9891
9894
|
fontStyle: labelStyle ?? configStyles.AUTOCOMPLETE.label.font.style,
|
|
9892
9895
|
fontWeight: labelWeight ?? configStyles.AUTOCOMPLETE.label.font.weight,
|
|
9893
9896
|
fontFamily: labelFontFamily ?? configStyles.AUTOCOMPLETE.label.font.family,
|
|
9894
|
-
color: showMoreTextColor ?? configStyles.AUTOCOMPLETE.label.showMoreTextColor
|
|
9897
|
+
color: showMoreTextColor ?? configStyles.AUTOCOMPLETE.label.showMoreTextColor,
|
|
9898
|
+
marginBottom: labelMarginBottom ?? configStyles.AUTOCOMPLETE.label.marginBottom
|
|
9895
9899
|
},
|
|
9896
9900
|
onClick: handleChangeShowMore
|
|
9897
9901
|
}, labelShowMoreText ?? configStyles.AUTOCOMPLETE.label.showMoreText) : ''), /*#__PURE__*/React__default.createElement("div", {
|
package/dist/index.js
CHANGED
|
@@ -556,7 +556,6 @@ var packageResult = {
|
|
|
556
556
|
BUTTON: {
|
|
557
557
|
opacity: 1,
|
|
558
558
|
width: '100%',
|
|
559
|
-
radius: '6px',
|
|
560
559
|
className: '',
|
|
561
560
|
type: 'button',
|
|
562
561
|
height: '46px',
|
|
@@ -565,16 +564,16 @@ var packageResult = {
|
|
|
565
564
|
disabled: false,
|
|
566
565
|
cursor: 'pointer',
|
|
567
566
|
contentWidth: false,
|
|
567
|
+
borderRadius: '6px',
|
|
568
|
+
outlineWidth: '2px',
|
|
568
569
|
padding: '12px 20px',
|
|
570
|
+
disabledBorderWidth: '2px',
|
|
569
571
|
transition: 'background-color 240ms, color 240ms',
|
|
570
|
-
box: {
|
|
571
|
-
sizing: boxSizing
|
|
572
|
-
},
|
|
573
572
|
colors: {
|
|
574
573
|
background: 'rgba(0, 35, 106, 1)',
|
|
575
574
|
backgroundHover: '#CB3A3A',
|
|
576
575
|
disabled: 'rgba(60, 57, 62, 1)',
|
|
577
|
-
|
|
576
|
+
disabledBorderColor: 'rgba(60, 57, 62, 1)',
|
|
578
577
|
disabledBackground: 'rgba(238, 238, 238, 1)',
|
|
579
578
|
withoutStyling: {
|
|
580
579
|
color: '#000000',
|
|
@@ -591,8 +590,7 @@ var packageResult = {
|
|
|
591
590
|
}
|
|
592
591
|
},
|
|
593
592
|
icon: {
|
|
594
|
-
|
|
595
|
-
marginRight: '10px'
|
|
593
|
+
gap: '10px'
|
|
596
594
|
},
|
|
597
595
|
withoutStyling: false
|
|
598
596
|
},
|
|
@@ -1143,6 +1141,7 @@ var packageResult = {
|
|
|
1143
1141
|
showLessText: 'Փակել',
|
|
1144
1142
|
showMoreText: 'Ավելին',
|
|
1145
1143
|
showMoreTextColor: '#2C46C1',
|
|
1144
|
+
marginBottom: '6px',
|
|
1146
1145
|
color: '#4A4A4D',
|
|
1147
1146
|
font: {
|
|
1148
1147
|
...fontObject
|
|
@@ -1575,39 +1574,39 @@ var configStylesPromise = getProps();
|
|
|
1575
1574
|
|
|
1576
1575
|
const Button = ({
|
|
1577
1576
|
icon,
|
|
1578
|
-
size,
|
|
1579
|
-
style,
|
|
1580
1577
|
type,
|
|
1581
|
-
font,
|
|
1582
1578
|
color,
|
|
1583
|
-
|
|
1579
|
+
text,
|
|
1584
1580
|
width,
|
|
1585
1581
|
height,
|
|
1586
1582
|
cursor,
|
|
1587
|
-
weight,
|
|
1588
1583
|
border,
|
|
1589
|
-
radius,
|
|
1590
1584
|
outline,
|
|
1591
1585
|
padding,
|
|
1592
1586
|
opacity,
|
|
1593
1587
|
onClick,
|
|
1588
|
+
iconGap,
|
|
1594
1589
|
disabled,
|
|
1590
|
+
fontSize,
|
|
1595
1591
|
className,
|
|
1596
|
-
|
|
1597
|
-
|
|
1592
|
+
iconHover,
|
|
1593
|
+
fontStyle,
|
|
1598
1594
|
hoverColor,
|
|
1599
1595
|
transition,
|
|
1596
|
+
fontWeight,
|
|
1597
|
+
fontFamily,
|
|
1598
|
+
outlineWidth,
|
|
1599
|
+
borderRadius,
|
|
1600
1600
|
contentWidth,
|
|
1601
|
-
iconRightSide,
|
|
1602
1601
|
disabledColor,
|
|
1603
1602
|
textTransform,
|
|
1604
1603
|
withoutStyling,
|
|
1605
1604
|
backgroundColor,
|
|
1606
|
-
disabledLineColor,
|
|
1607
|
-
btnIconMarginLeft,
|
|
1608
|
-
btnIconMarginRight,
|
|
1609
1605
|
withoutStylingColor,
|
|
1606
|
+
disabledBorderColor,
|
|
1607
|
+
disabledBorderWidth,
|
|
1610
1608
|
backgroundHoverColor,
|
|
1609
|
+
iconPosition = 'left',
|
|
1611
1610
|
disabledBackgroundColor,
|
|
1612
1611
|
withoutStylingHoverColor,
|
|
1613
1612
|
...props
|
|
@@ -1625,8 +1624,8 @@ const Button = ({
|
|
|
1625
1624
|
className && setClassProps(() => classnames__default["default"](className ?? configStyles.BUTTON.className));
|
|
1626
1625
|
}, [className]);
|
|
1627
1626
|
React.useEffect(() => {
|
|
1628
|
-
if (!
|
|
1629
|
-
alert('Add icon or
|
|
1627
|
+
if (!text && !icon) {
|
|
1628
|
+
alert('Add icon or text props on Button component');
|
|
1630
1629
|
}
|
|
1631
1630
|
configStylesPromise.then(data => {
|
|
1632
1631
|
setClassProps(() => classnames__default["default"](className ?? data.BUTTON.className));
|
|
@@ -1644,15 +1643,15 @@ const Button = ({
|
|
|
1644
1643
|
display: 'flex',
|
|
1645
1644
|
outline: 'none',
|
|
1646
1645
|
alignItems: 'center',
|
|
1646
|
+
boxSizing: 'border-box',
|
|
1647
1647
|
justifyContent: 'center',
|
|
1648
1648
|
height: height ?? configStyles.BUTTON.height,
|
|
1649
1649
|
padding: padding ?? configStyles.BUTTON.padding,
|
|
1650
|
-
fontSize:
|
|
1651
|
-
borderRadius:
|
|
1652
|
-
fontStyle:
|
|
1653
|
-
fontFamily:
|
|
1654
|
-
fontWeight:
|
|
1655
|
-
boxSizing: boxSizing ?? configStyles.BUTTON.box.sizing,
|
|
1650
|
+
fontSize: fontSize ?? configStyles.BUTTON.font.size,
|
|
1651
|
+
borderRadius: borderRadius ?? configStyles.BUTTON.borderRadius,
|
|
1652
|
+
fontStyle: fontStyle ?? configStyles.BUTTON.font.style,
|
|
1653
|
+
fontFamily: fontFamily ?? configStyles.BUTTON.font.family,
|
|
1654
|
+
fontWeight: fontWeight ?? configStyles.BUTTON.font.weight,
|
|
1656
1655
|
transition: transition ?? configStyles.BUTTON.transition,
|
|
1657
1656
|
border: outline ? 'none' : border ?? configStyles.BUTTON.border,
|
|
1658
1657
|
width: contentWidth ? 'auto' : width ?? configStyles.BUTTON.width,
|
|
@@ -1660,7 +1659,7 @@ const Button = ({
|
|
|
1660
1659
|
cursor: disabled ? 'not-allowed' : cursor ?? configStyles.BUTTON.cursor,
|
|
1661
1660
|
opacity: opacity ?? configStyles.BUTTON.opacity,
|
|
1662
1661
|
backgroundColor: withoutStyling ?? configStyles.BUTTON.withoutStyling ? 'transparent' : (outline || !outline) && disabled ? disabledBackgroundColor ? disabledBackgroundColor : configStyles.BUTTON.colors.disabledBackground : outline && !disabled ? isHover ? backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background : '#ffffff' : !outline && !disabled && isHover ? backgroundHoverColor ? backgroundHoverColor : configStyles.BUTTON.colors.backgroundHover : backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background,
|
|
1663
|
-
boxShadow: outline && !withoutStyling && !configStyles.BUTTON.withoutStyling ? disabled ? `inset 0 0 0
|
|
1662
|
+
boxShadow: outline && !withoutStyling && !configStyles.BUTTON.withoutStyling ? disabled ? `inset 0 0 0 ${disabledBorderWidth ?? configStyles.BUTTON.disabledBorderWidth} ${disabledBorderColor ?? configStyles.BUTTON.colors.disabledBorderColor}` : `inset 0 0 0 ${outlineWidth ?? configStyles.BUTTON.outlineWidth} ${backgroundColor ?? configStyles.BUTTON.colors.background}` : 'none',
|
|
1664
1663
|
color: withoutStyling ?? configStyles.BUTTON.withoutStyling ? isHover ? withoutStylingHoverColor ?? configStyles.BUTTON.colors.withoutStyling.hoverColor : withoutStylingColor ?? configStyles.BUTTON.colors.withoutStyling.color : (outline || !outline) && disabled ? disabledColor ? disabledColor : configStyles.BUTTON.colors.disabled : outline && !disabled ? isHover ? color ? color : configStyles.BUTTON.color : backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background : !outline && !disabled && isHover ? hoverColor ? hoverColor : configStyles.BUTTON.text.colors.hover : color ? color : configStyles.BUTTON.color
|
|
1665
1664
|
},
|
|
1666
1665
|
type: type ?? configStyles.BUTTON.type,
|
|
@@ -1669,50 +1668,50 @@ const Button = ({
|
|
|
1669
1668
|
onMouseEnter: handleMouseEnter,
|
|
1670
1669
|
onMouseLeave: handleMouseLeave,
|
|
1671
1670
|
className: classProps
|
|
1672
|
-
}, props),
|
|
1671
|
+
}, props), iconPosition === 'left' ? isHover && iconHover ? iconHover : icon ?? null : ' ', ' ', text && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1673
1672
|
style: {
|
|
1674
|
-
marginLeft: icon &&
|
|
1675
|
-
marginRight: icon &&
|
|
1673
|
+
marginLeft: icon && iconPosition === 'left' ? iconGap ?? configStyles.BUTTON.icon.gap : '0px',
|
|
1674
|
+
marginRight: icon && iconPosition === 'right' ? iconGap ?? configStyles.BUTTON.icon.gap : '0px'
|
|
1676
1675
|
}
|
|
1677
|
-
},
|
|
1676
|
+
}, text), ' ', iconPosition === 'right' ? isHover && iconHover ? iconHover : icon ?? null : ' ', !icon && !text && 'Add icon or text prop on Button component'));
|
|
1678
1677
|
};
|
|
1679
1678
|
Button.propTypes = {
|
|
1680
1679
|
type: PropTypes__default["default"].string,
|
|
1681
|
-
size: PropTypes__default["default"].string,
|
|
1682
|
-
style: PropTypes__default["default"].string,
|
|
1683
|
-
font: PropTypes__default["default"].string,
|
|
1684
1680
|
icon: PropTypes__default["default"].element,
|
|
1685
1681
|
color: PropTypes__default["default"].string,
|
|
1686
1682
|
width: PropTypes__default["default"].string,
|
|
1687
1683
|
outline: PropTypes__default["default"].bool,
|
|
1688
1684
|
onClick: PropTypes__default["default"].func,
|
|
1689
|
-
label: PropTypes__default["default"].string,
|
|
1690
|
-
weight: PropTypes__default["default"].string,
|
|
1691
1685
|
height: PropTypes__default["default"].string,
|
|
1692
1686
|
cursor: PropTypes__default["default"].string,
|
|
1693
1687
|
border: PropTypes__default["default"].string,
|
|
1694
1688
|
disabled: PropTypes__default["default"].bool,
|
|
1695
|
-
radius: PropTypes__default["default"].string,
|
|
1696
1689
|
padding: PropTypes__default["default"].string,
|
|
1697
1690
|
opacity: PropTypes__default["default"].number,
|
|
1698
|
-
boxSizing: PropTypes__default["default"].string,
|
|
1699
1691
|
className: PropTypes__default["default"].string,
|
|
1700
|
-
|
|
1692
|
+
iconHover: PropTypes__default["default"].element,
|
|
1701
1693
|
hoverColor: PropTypes__default["default"].string,
|
|
1702
1694
|
transition: PropTypes__default["default"].string,
|
|
1703
1695
|
contentWidth: PropTypes__default["default"].bool,
|
|
1704
|
-
|
|
1696
|
+
outlineWidth: PropTypes__default["default"].string,
|
|
1705
1697
|
withoutStyling: PropTypes__default["default"].bool,
|
|
1706
1698
|
textTransform: PropTypes__default["default"].string,
|
|
1707
1699
|
disabledColor: PropTypes__default["default"].string,
|
|
1708
1700
|
backgroundColor: PropTypes__default["default"].string,
|
|
1709
|
-
|
|
1710
|
-
btnIconMarginLeft: PropTypes__default["default"].string,
|
|
1711
|
-
btnIconMarginRight: PropTypes__default["default"].string,
|
|
1701
|
+
disabledBorderWidth: PropTypes__default["default"].string,
|
|
1712
1702
|
withoutStylingColor: PropTypes__default["default"].string,
|
|
1713
1703
|
backgroundHoverColor: PropTypes__default["default"].string,
|
|
1714
1704
|
disabledBackgroundColor: PropTypes__default["default"].string,
|
|
1715
|
-
withoutStylingHoverColor: PropTypes__default["default"].string
|
|
1705
|
+
withoutStylingHoverColor: PropTypes__default["default"].string,
|
|
1706
|
+
text: PropTypes__default["default"].string,
|
|
1707
|
+
fontFamily: PropTypes__default["default"].string,
|
|
1708
|
+
fontSize: PropTypes__default["default"].string,
|
|
1709
|
+
fontStyle: PropTypes__default["default"].string,
|
|
1710
|
+
fontWeight: PropTypes__default["default"].string,
|
|
1711
|
+
iconGap: PropTypes__default["default"].string,
|
|
1712
|
+
borderRadius: PropTypes__default["default"].string,
|
|
1713
|
+
disabledBorderColor: PropTypes__default["default"].string,
|
|
1714
|
+
iconPosition: PropTypes__default["default"].oneOf(['left', 'right'])
|
|
1716
1715
|
};
|
|
1717
1716
|
|
|
1718
1717
|
const SvgSvg = ({
|
|
@@ -1910,6 +1909,7 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
1910
1909
|
labelShowLessText,
|
|
1911
1910
|
labelShowMoreText,
|
|
1912
1911
|
showMoreTextColor,
|
|
1912
|
+
labelMarginBottom,
|
|
1913
1913
|
useLabelTooltip,
|
|
1914
1914
|
labelTooltipColor,
|
|
1915
1915
|
labelTooltipPadding,
|
|
@@ -2478,9 +2478,9 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2478
2478
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2479
2479
|
style: {
|
|
2480
2480
|
display: 'flex',
|
|
2481
|
-
marginBottom: '6px',
|
|
2482
2481
|
alignItems: 'center',
|
|
2483
2482
|
justifyContent: label ? 'space-between' : 'flex-end',
|
|
2483
|
+
marginBottom: labelMarginBottom ?? configStyles.FILE.label.marginBottom,
|
|
2484
2484
|
width: deleteComponent && useLabelTooltip && handleCheckTextWidth() === 'more' ? 'calc(100% - 26px)' : '100%'
|
|
2485
2485
|
}
|
|
2486
2486
|
}, label && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -2787,6 +2787,7 @@ File.propTypes = {
|
|
|
2787
2787
|
labelShowLessText: PropTypes__default["default"].string,
|
|
2788
2788
|
labelShowMoreText: PropTypes__default["default"].string,
|
|
2789
2789
|
showMoreTextColor: PropTypes__default["default"].string,
|
|
2790
|
+
labelMarginBottom: PropTypes__default["default"].string,
|
|
2790
2791
|
useLabelTooltip: PropTypes__default["default"].bool,
|
|
2791
2792
|
labelTooltipColor: PropTypes__default["default"].string,
|
|
2792
2793
|
labelTooltipPadding: PropTypes__default["default"].string,
|
|
@@ -5859,7 +5860,8 @@ const Input = ({
|
|
|
5859
5860
|
fontStyle: labelStyle ?? configStyles.INPUT.label.font.style,
|
|
5860
5861
|
fontWeight: labelWeight ?? configStyles.INPUT.label.font.weight,
|
|
5861
5862
|
fontFamily: labelFontFamily ?? configStyles.INPUT.label.font.family,
|
|
5862
|
-
color: showMoreTextColor ?? configStyles.INPUT.label.showMoreTextColor
|
|
5863
|
+
color: showMoreTextColor ?? configStyles.INPUT.label.showMoreTextColor,
|
|
5864
|
+
marginBottom: labelMarginBottom ?? configStyles.INPUT.label.marginBottom
|
|
5863
5865
|
},
|
|
5864
5866
|
onClick: handleChangeShowMore
|
|
5865
5867
|
}, labelShowMoreText ?? configStyles.INPUT.label.showMoreText) : ''), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -6687,7 +6689,8 @@ const Select = ({
|
|
|
6687
6689
|
fontStyle: labelFontStyle ?? configStyles.SELECT.label.font.style,
|
|
6688
6690
|
fontWeight: labelWeight ?? configStyles.SELECT.label.font.weight,
|
|
6689
6691
|
fontFamily: labelFontFamily ?? configStyles.SELECT.label.font.family,
|
|
6690
|
-
color: showMoreTextColor ?? configStyles.SELECT.label.showMoreTextColor
|
|
6692
|
+
color: showMoreTextColor ?? configStyles.SELECT.label.showMoreTextColor,
|
|
6693
|
+
marginBottom: labelMarginBottom ?? configStyles.INPUT.label.marginBottom
|
|
6691
6694
|
},
|
|
6692
6695
|
onClick: handleChangeShowMore
|
|
6693
6696
|
}, labelShowMoreText ?? configStyles.SELECT.label.showMoreText) : ''), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -9922,7 +9925,8 @@ const Autocomplete = ({
|
|
|
9922
9925
|
fontStyle: labelStyle ?? configStyles.AUTOCOMPLETE.label.font.style,
|
|
9923
9926
|
fontWeight: labelWeight ?? configStyles.AUTOCOMPLETE.label.font.weight,
|
|
9924
9927
|
fontFamily: labelFontFamily ?? configStyles.AUTOCOMPLETE.label.font.family,
|
|
9925
|
-
color: showMoreTextColor ?? configStyles.AUTOCOMPLETE.label.showMoreTextColor
|
|
9928
|
+
color: showMoreTextColor ?? configStyles.AUTOCOMPLETE.label.showMoreTextColor,
|
|
9929
|
+
marginBottom: labelMarginBottom ?? configStyles.AUTOCOMPLETE.label.marginBottom
|
|
9926
9930
|
},
|
|
9927
9931
|
onClick: handleChangeShowMore
|
|
9928
9932
|
}, labelShowMoreText ?? configStyles.AUTOCOMPLETE.label.showMoreText) : ''), /*#__PURE__*/React__default["default"].createElement("div", {
|
package/package.json
CHANGED
package/tui.config.js
CHANGED
|
@@ -40,7 +40,6 @@ export default {
|
|
|
40
40
|
BUTTON: {
|
|
41
41
|
opacity: 1,
|
|
42
42
|
width: '100%',
|
|
43
|
-
radius: '6px',
|
|
44
43
|
className: '',
|
|
45
44
|
type: 'button',
|
|
46
45
|
height: '46px',
|
|
@@ -49,18 +48,17 @@ export default {
|
|
|
49
48
|
disabled: false,
|
|
50
49
|
cursor: 'pointer',
|
|
51
50
|
contentWidth: false,
|
|
51
|
+
borderRadius: '6px',
|
|
52
|
+
outlineWidth: '2px',
|
|
52
53
|
padding: '12px 20px',
|
|
54
|
+
disabledBorderWidth: '2px',
|
|
53
55
|
transition: 'background-color 240ms, color 240ms',
|
|
54
|
-
|
|
55
|
-
box: {
|
|
56
|
-
sizing: boxSizing,
|
|
57
|
-
},
|
|
58
56
|
|
|
59
57
|
colors: {
|
|
60
58
|
background: 'rgba(0, 35, 106, 1)',
|
|
61
59
|
backgroundHover: '#CB3A3A',
|
|
62
60
|
disabled: 'rgba(60, 57, 62, 1)',
|
|
63
|
-
|
|
61
|
+
disabledBorderColor: 'rgba(60, 57, 62, 1)',
|
|
64
62
|
disabledBackground: 'rgba(238, 238, 238, 1)',
|
|
65
63
|
withoutStyling: {
|
|
66
64
|
color: '#000000',
|
|
@@ -78,8 +76,7 @@ export default {
|
|
|
78
76
|
},
|
|
79
77
|
|
|
80
78
|
icon: {
|
|
81
|
-
|
|
82
|
-
marginRight: '10px'
|
|
79
|
+
gap: '10px',
|
|
83
80
|
},
|
|
84
81
|
|
|
85
82
|
withoutStyling: false
|
|
@@ -668,6 +665,7 @@ export default {
|
|
|
668
665
|
showLessText: 'Փակել',
|
|
669
666
|
showMoreText: 'Ավելին',
|
|
670
667
|
showMoreTextColor: '#2C46C1',
|
|
668
|
+
marginBottom: '6px',
|
|
671
669
|
color: '#4A4A4D',
|
|
672
670
|
|
|
673
671
|
font: {...fontObject},
|