@transferwise/components 0.0.0-experimental-a656242 → 0.0.0-experimental-887f2e6
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/build/avatarLayout/AvatarLayout.js +9 -2
- package/build/avatarLayout/AvatarLayout.js.map +1 -1
- package/build/avatarLayout/AvatarLayout.mjs +9 -2
- package/build/avatarLayout/AvatarLayout.mjs.map +1 -1
- package/build/avatarView/AvatarView.js +1 -12
- package/build/avatarView/AvatarView.js.map +1 -1
- package/build/avatarView/AvatarView.mjs +1 -12
- package/build/avatarView/AvatarView.mjs.map +1 -1
- package/build/button/Button.js +78 -79
- package/build/button/Button.js.map +1 -1
- package/build/button/Button.mjs +79 -80
- package/build/button/Button.mjs.map +1 -1
- package/build/button/Button.resolver.js +78 -0
- package/build/button/Button.resolver.js.map +1 -0
- package/build/button/Button.resolver.mjs +76 -0
- package/build/button/Button.resolver.mjs.map +1 -0
- package/build/button/LegacyButton.js +114 -0
- package/build/button/LegacyButton.js.map +1 -0
- package/build/button/LegacyButton.mjs +112 -0
- package/build/button/LegacyButton.mjs.map +1 -0
- package/build/circularButton/CircularButton.js +21 -18
- package/build/circularButton/CircularButton.js.map +1 -1
- package/build/circularButton/CircularButton.mjs +22 -19
- package/build/circularButton/CircularButton.mjs.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.js +2 -2
- package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.mjs +1 -1
- package/build/definitionList/DefinitionList.js.map +1 -1
- package/build/definitionList/DefinitionList.mjs.map +1 -1
- package/build/header/Header.js +2 -2
- package/build/header/Header.js.map +1 -1
- package/build/header/Header.mjs +1 -1
- package/build/i18n/de.json +0 -1
- package/build/i18n/de.json.js +0 -1
- package/build/i18n/de.json.js.map +1 -1
- package/build/i18n/de.json.mjs +0 -1
- package/build/i18n/de.json.mjs.map +1 -1
- package/build/i18n/it.json +0 -1
- package/build/i18n/it.json.js +0 -1
- package/build/i18n/it.json.js.map +1 -1
- package/build/i18n/it.json.mjs +0 -1
- package/build/i18n/it.json.mjs.map +1 -1
- package/build/i18n/th.json +0 -1
- package/build/i18n/th.json.js +0 -1
- package/build/i18n/th.json.js.map +1 -1
- package/build/i18n/th.json.mjs +0 -1
- package/build/i18n/th.json.mjs.map +1 -1
- package/build/index.js +2 -2
- package/build/index.mjs +1 -1
- package/build/link/Link.js +8 -3
- package/build/link/Link.js.map +1 -1
- package/build/link/Link.mjs +8 -3
- package/build/link/Link.mjs.map +1 -1
- package/build/main.css +416 -17
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.js +1 -3
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.js.map +1 -1
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.mjs +1 -3
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.mjs.map +1 -1
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.js +1 -4
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.js.map +1 -1
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.mjs +1 -4
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.mjs.map +1 -1
- package/build/select/Select.js +5 -3
- package/build/select/Select.js.map +1 -1
- package/build/select/Select.mjs +4 -2
- package/build/select/Select.mjs.map +1 -1
- package/build/styles/avatarLayout/AvatarLayout.css +11 -0
- package/build/styles/button/Button.css +240 -16
- package/build/styles/button/Button.vars.css +55 -0
- package/build/styles/button/LegacyButton.css +23 -0
- package/build/styles/circularButton/CircularButton.css +158 -17
- package/build/styles/main.css +416 -17
- package/build/types/avatarLayout/AvatarLayout.d.ts +1 -2
- package/build/types/avatarLayout/AvatarLayout.d.ts.map +1 -1
- package/build/types/avatarLayout/index.d.ts +1 -0
- package/build/types/avatarLayout/index.d.ts.map +1 -1
- package/build/types/avatarView/AvatarView.d.ts.map +1 -1
- package/build/types/button/Button.d.ts +1 -23
- package/build/types/button/Button.d.ts.map +1 -1
- package/build/types/button/Button.resolver.d.ts +31 -0
- package/build/types/button/Button.resolver.d.ts.map +1 -0
- package/build/types/button/Button.types.d.ts +67 -0
- package/build/types/button/Button.types.d.ts.map +1 -0
- package/build/types/button/LegacyButton.d.ts +30 -0
- package/build/types/button/LegacyButton.d.ts.map +1 -0
- package/build/types/button/index.d.ts +2 -2
- package/build/types/button/index.d.ts.map +1 -1
- package/build/types/circularButton/CircularButton.d.ts +4 -11
- package/build/types/circularButton/CircularButton.d.ts.map +1 -1
- package/build/types/definitionList/DefinitionList.d.ts +2 -1
- package/build/types/definitionList/DefinitionList.d.ts.map +1 -1
- package/build/types/link/Link.d.ts +2 -2
- package/build/types/link/Link.d.ts.map +1 -1
- package/build/types/primitives/PrimitiveAnchor/src/PrimitiveAnchor.d.ts.map +1 -1
- package/build/types/primitives/PrimitiveAnchor/src/PrimitiveAnchor.types.d.ts +1 -1
- package/build/types/primitives/PrimitiveAnchor/src/PrimitiveAnchor.types.d.ts.map +1 -1
- package/build/types/primitives/PrimitiveButton/src/PrimitiveButton.d.ts.map +1 -1
- package/build/types/select/Select.d.ts.map +1 -1
- package/build/upload/steps/completeStep/completeStep.js +2 -2
- package/build/upload/steps/completeStep/completeStep.js.map +1 -1
- package/build/upload/steps/completeStep/completeStep.mjs +1 -1
- package/build/upload/steps/processingStep/processingStep.js +2 -2
- package/build/upload/steps/processingStep/processingStep.js.map +1 -1
- package/build/upload/steps/processingStep/processingStep.mjs +1 -1
- package/build/uploadInput/UploadInput.js +3 -3
- package/build/uploadInput/UploadInput.js.map +1 -1
- package/build/uploadInput/UploadInput.mjs +1 -1
- package/package.json +3 -3
- package/src/avatarLayout/AvatarLayout.css +11 -0
- package/src/avatarLayout/AvatarLayout.less +18 -1
- package/src/avatarLayout/AvatarLayout.tsx +11 -3
- package/src/avatarLayout/index.ts +1 -0
- package/src/avatarView/AvatarView.tsx +1 -15
- package/src/button/Button.css +240 -16
- package/src/button/Button.less +208 -14
- package/src/button/Button.resolver.tsx +120 -0
- package/src/button/Button.spec.tsx +54 -231
- package/src/button/Button.story.tsx +610 -137
- package/src/button/Button.tsx +88 -132
- package/src/button/Button.types.ts +88 -0
- package/src/button/Button.vars.css +55 -0
- package/src/button/Button.vars.less +69 -0
- package/src/button/LegacyButton.css +23 -0
- package/src/button/LegacyButton.less +24 -0
- package/src/button/LegacyButton.spec.tsx +146 -0
- package/src/button/LegacyButton.story.tsx +224 -0
- package/src/button/LegacyButton.tsx +161 -0
- package/src/button/index.ts +2 -3
- package/src/circularButton/CircularButton.css +158 -17
- package/src/circularButton/CircularButton.less +91 -22
- package/src/circularButton/CircularButton.story.tsx +24 -45
- package/src/circularButton/CircularButton.tsx +25 -38
- package/src/circularButton/_button-label-states.less +34 -0
- package/src/definitionList/DefinitionList.spec.js +91 -0
- package/src/definitionList/DefinitionList.story.tsx +57 -57
- package/src/definitionList/DefinitionList.tsx +1 -1
- package/src/flowNavigation/__snapshots__/FlowNavigation.spec.js.snap +1 -1
- package/src/i18n/de.json +0 -1
- package/src/i18n/it.json +0 -1
- package/src/i18n/th.json +0 -1
- package/src/iconButton/IconButton.story.tsx +6 -6
- package/src/inputs/SelectInput.story.tsx +1 -1
- package/src/link/Link.tsx +15 -6
- package/src/main.css +416 -17
- package/src/main.less +1 -0
- package/src/primitives/PrimitiveAnchor/src/PrimitiveAnchor.tsx +1 -7
- package/src/primitives/PrimitiveAnchor/src/PrimitiveAnchor.types.ts +1 -1
- package/src/primitives/PrimitiveAnchor/test/PrimitiveAnchor.spec.tsx +1 -3
- package/src/primitives/PrimitiveButton/src/PrimitiveButton.tsx +1 -8
- package/src/primitives/PrimitiveButton/test/PrimitiveButton.spec.tsx +2 -5
- package/src/select/Select.tsx +1 -0
- package/src/slidingPanel/SlidingPanel.spec.js +56 -0
- package/src/button/__snapshots__/Button.spec.tsx.snap +0 -309
- package/src/slidingPanel/SlidingPanel.spec.tsx +0 -69
package/build/styles/main.css
CHANGED
|
@@ -518,10 +518,18 @@ div.critical-comms .critical-comms-body {
|
|
|
518
518
|
-webkit-mask-image: radial-gradient(circle at bottom calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)) right calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)), transparent 0, transparent calc(var(--np-avatar-size) / 2 + 2px), black 0);
|
|
519
519
|
mask-image: radial-gradient(circle at bottom calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)) right calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)), transparent 0, transparent calc(var(--np-avatar-size) / 2 + 2px), black 0);
|
|
520
520
|
}
|
|
521
|
+
[dir="rtl"] .np-avatar-layout-diagonal-mask {
|
|
522
|
+
-webkit-mask-image: radial-gradient(circle at bottom calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)) left calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)), transparent 0, transparent calc(var(--np-avatar-size) / 2 + 2px), black 0);
|
|
523
|
+
mask-image: radial-gradient(circle at bottom calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)) left calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)), transparent 0, transparent calc(var(--np-avatar-size) / 2 + 2px), black 0);
|
|
524
|
+
}
|
|
521
525
|
.np-avatar-layout-diagonal-child {
|
|
522
526
|
margin-left: calc(var(--np-avatar-layout-size) - var(--np-avatar-size) * 2);
|
|
523
527
|
margin-top: calc(var(--np-avatar-layout-size) - var(--np-avatar-size));
|
|
524
528
|
}
|
|
529
|
+
[dir="rtl"] .np-avatar-layout-diagonal-child {
|
|
530
|
+
margin-left: 0;
|
|
531
|
+
margin-right: calc(var(--np-avatar-layout-size) - var(--np-avatar-size) * 2);
|
|
532
|
+
}
|
|
525
533
|
.np-avatar-layout-horizontal {
|
|
526
534
|
width: calc(var(--np-avatar-size) * 2 - var(--np-avatar-offset) - 2px);
|
|
527
535
|
height: var(--np-avatar-layout-size);
|
|
@@ -535,6 +543,9 @@ div.critical-comms .critical-comms-body {
|
|
|
535
543
|
.np-avatar-layout-horizontal-child {
|
|
536
544
|
margin-left: calc(var(--np-avatar-offset) * -1);
|
|
537
545
|
}
|
|
546
|
+
[dir="rtl"] .np-avatar-layout-horizontal-child {
|
|
547
|
+
margin-right: calc(var(--np-avatar-offset) * -1);
|
|
548
|
+
}
|
|
538
549
|
.np-icon-button {
|
|
539
550
|
border: none;
|
|
540
551
|
}
|
|
@@ -705,6 +716,253 @@ div.critical-comms .critical-comms-body {
|
|
|
705
716
|
.np-btn.disabled[class] {
|
|
706
717
|
pointer-events: auto;
|
|
707
718
|
}
|
|
719
|
+
:root {
|
|
720
|
+
--Button-background: var(--color-interactive-accent);
|
|
721
|
+
--Button-background-hover: var(--color-interactive-accent-hover);
|
|
722
|
+
--Button-background-active: var(--color-interactive-accent-active);
|
|
723
|
+
--Button-color: var(--color-interactive-control);
|
|
724
|
+
--Button-padding: var(--size-8) var(--size-12);
|
|
725
|
+
--Button-border-radius: var(--radius-full);
|
|
726
|
+
--Button-size-small-padding: 5px var(--size-12);
|
|
727
|
+
--Button-size-medium-padding: var(--size-8) var(--size-12);
|
|
728
|
+
--Button-size-large-padding: var(--size-12) var(--size-16);
|
|
729
|
+
--Button-avatar-border-color: var(--color-border-neutral);
|
|
730
|
+
--Button-transition-duration: 150ms;
|
|
731
|
+
--Button-transition-easing: ease-in-out;
|
|
732
|
+
--Button-secondary-background: var(--color-interactive-neutral);
|
|
733
|
+
--Button-secondary-background-hover: var(--color-interactive-neutral-hover);
|
|
734
|
+
--Button-secondary-background-active: var(--color-interactive-neutral-active);
|
|
735
|
+
--Button-secondary-color: var(--color-interactive-primary);
|
|
736
|
+
--Button-tertiary-background: var(--color-background-neutral);
|
|
737
|
+
--Button-tertiary-background-hover: var(--color-background-neutral-hover);
|
|
738
|
+
--Button-tertiary-background-active: var(--color-background-neutral-active);
|
|
739
|
+
--Button-tertiary-color: var(--color-content-primary);
|
|
740
|
+
--Button-minimal-background: transparent;
|
|
741
|
+
--Button-minimal-background-hover: var(--color-background-screen-hover);
|
|
742
|
+
--Button-minimal-background-active: var(--color-background-screen-active);
|
|
743
|
+
--Button-minimal-color: var(--color-interactive-primary);
|
|
744
|
+
--Button-primary-negative-background: var(--color-sentiment-negative-primary);
|
|
745
|
+
--Button-primary-negative-background-hover: var(--color-sentiment-negative-primary-hover);
|
|
746
|
+
--Button-primary-negative-background-active: var(--color-sentiment-negative-primary-active);
|
|
747
|
+
--Button-primary-negative-color: var(--color-contrast);
|
|
748
|
+
--Button-primary-netative-avatar-border-color: rgba(255,255,255,0.2);
|
|
749
|
+
--Button-secondary-negative-background: var(--color-sentiment-negative-secondary);
|
|
750
|
+
--Button-secondary-negative-background-hover: var(--color-sentiment-negative-secondary-hover);
|
|
751
|
+
--Button-secondary-negative-background-active: var(--color-sentiment-negative-secondary-active);
|
|
752
|
+
--Button-secondary-negative-color: var(--color-sentiment-negative-primary);
|
|
753
|
+
--Button-secondary-netative-avatar-border-color: rgba(168,32,13,0.12157);
|
|
754
|
+
}
|
|
755
|
+
.np-theme-personal--dark .wds-Button {
|
|
756
|
+
--Button-primary-netative-avatar-border-color: rgba(14,15,12,0.12157);
|
|
757
|
+
}
|
|
758
|
+
.np-theme-personal--forest-green .wds-Button {
|
|
759
|
+
--color-interactive-neutral: rgba(159,232,112,0.2);
|
|
760
|
+
--color-interactive-neutral-hover: rgba(205,255,173,0.2);
|
|
761
|
+
--color-interactive-neutral-active: rgba(236,255,224,0.2);
|
|
762
|
+
--color-sentiment-negative-secondary: rgba(255,196,194,0.2);
|
|
763
|
+
--color-sentiment-negative-secondary-hover: rgba(255,220,219,0.2);
|
|
764
|
+
--color-sentiment-negative-secondary-active: rgba(255,235,235,0.2);
|
|
765
|
+
--Button-primary-netative-avatar-border-color: rgba(14,15,12,0.12157);
|
|
766
|
+
--Button-secondary-netative-avatar-border-color: rgba(14,15,12,0.12157);
|
|
767
|
+
}
|
|
768
|
+
.np-theme-personal--bright-green .wds-Button {
|
|
769
|
+
--color-contrast: #FFFFFF;
|
|
770
|
+
--Button-secondary-color: var(--color-interactive-control);
|
|
771
|
+
--Button-secondary-negative-color: var(--color-contrast);
|
|
772
|
+
--Button-secondary-netative-avatar-border-color: var(--Button-primary-netative-avatar-border-color);
|
|
773
|
+
}
|
|
774
|
+
/* Button Styles */
|
|
775
|
+
.wds-Button {
|
|
776
|
+
display: inline-flex;
|
|
777
|
+
flex: none;
|
|
778
|
+
width: auto;
|
|
779
|
+
align-items: center;
|
|
780
|
+
justify-content: center;
|
|
781
|
+
vertical-align: middle;
|
|
782
|
+
text-align: center;
|
|
783
|
+
-webkit-text-decoration: none;
|
|
784
|
+
text-decoration: none;
|
|
785
|
+
white-space: nowrap;
|
|
786
|
+
word-wrap: break-word;
|
|
787
|
+
-webkit-appearance: none;
|
|
788
|
+
-moz-appearance: none;
|
|
789
|
+
appearance: none;
|
|
790
|
+
background-color: #00a2dd;
|
|
791
|
+
background-color: var(--Button-background);
|
|
792
|
+
border: none;
|
|
793
|
+
border-radius: 9999px;
|
|
794
|
+
border-radius: var(--Button-border-radius);
|
|
795
|
+
color: var(--Button-color);
|
|
796
|
+
cursor: pointer;
|
|
797
|
+
padding: 8px 12px;
|
|
798
|
+
padding: var(--Button-padding);
|
|
799
|
+
transition: color, background-color 150ms ease-in-out;
|
|
800
|
+
transition: color, background-color var(--Button-transition-duration) var(--Button-transition-easing);
|
|
801
|
+
}
|
|
802
|
+
.wds-Button:focus {
|
|
803
|
+
-webkit-text-decoration: none;
|
|
804
|
+
text-decoration: none;
|
|
805
|
+
}
|
|
806
|
+
.wds-Button:hover {
|
|
807
|
+
background-color: #008fc9;
|
|
808
|
+
background-color: var(--Button-background-hover);
|
|
809
|
+
-webkit-text-decoration: none;
|
|
810
|
+
text-decoration: none;
|
|
811
|
+
}
|
|
812
|
+
.wds-Button:active {
|
|
813
|
+
background-color: #0081ba;
|
|
814
|
+
background-color: var(--Button-background-active);
|
|
815
|
+
-webkit-text-decoration: none;
|
|
816
|
+
text-decoration: none;
|
|
817
|
+
}
|
|
818
|
+
.wds-Button.wds-Button--disabled,
|
|
819
|
+
.wds-Button:disabled {
|
|
820
|
+
mix-blend-mode: luminosity;
|
|
821
|
+
opacity: 0.45;
|
|
822
|
+
cursor: not-allowed;
|
|
823
|
+
}
|
|
824
|
+
.wds-Button.wds-Button--disabled:hover,
|
|
825
|
+
.wds-Button:disabled:hover,
|
|
826
|
+
.wds-Button.wds-Button--disabled:active,
|
|
827
|
+
.wds-Button:disabled:active {
|
|
828
|
+
background-color: #00a2dd;
|
|
829
|
+
background-color: var(--Button-background);
|
|
830
|
+
}
|
|
831
|
+
.wds-Button--secondary {
|
|
832
|
+
--Button-background: var(--Button-secondary-background);
|
|
833
|
+
--Button-background-hover: var(--Button-secondary-background-hover);
|
|
834
|
+
--Button-background-active: var(--Button-secondary-background-active);
|
|
835
|
+
--Button-color: var(--Button-secondary-color);
|
|
836
|
+
}
|
|
837
|
+
.wds-Button--tertiary {
|
|
838
|
+
--Button-background: var(--Button-tertiary-background);
|
|
839
|
+
--Button-background-hover: var(--Button-tertiary-background-hover);
|
|
840
|
+
--Button-background-active: var(--Button-tertiary-background-active);
|
|
841
|
+
--Button-color: var(--Button-tertiary-color);
|
|
842
|
+
}
|
|
843
|
+
.wds-Button--tertiary .wds-Button-icon--end {
|
|
844
|
+
color: var(--color-interactive-primary);
|
|
845
|
+
}
|
|
846
|
+
.wds-Button--minimal {
|
|
847
|
+
--Button-background: var(--Button-minimal-background);
|
|
848
|
+
--Button-background-hover: var(--Button-minimal-background-hover);
|
|
849
|
+
--Button-background-active: var(--Button-minimal-background-active);
|
|
850
|
+
--Button-color: var(--Button-minimal-color);
|
|
851
|
+
-webkit-text-decoration: underline;
|
|
852
|
+
text-decoration: underline;
|
|
853
|
+
text-underline-offset: 3px;
|
|
854
|
+
text-decoration-thickness: 1px;
|
|
855
|
+
}
|
|
856
|
+
.wds-Button--minimal:hover,
|
|
857
|
+
.wds-Button--minimal:hover:active {
|
|
858
|
+
-webkit-text-decoration: underline;
|
|
859
|
+
text-decoration: underline;
|
|
860
|
+
}
|
|
861
|
+
.wds-Button--negative.wds-Button--primary {
|
|
862
|
+
--Button-background: var(--Button-primary-negative-background);
|
|
863
|
+
--Button-background-hover: var(--Button-primary-negative-background-hover);
|
|
864
|
+
--Button-background-active: var(--Button-primary-negative-background-active);
|
|
865
|
+
--Button-color: var(--Button-primary-negative-color);
|
|
866
|
+
--Button-avatar-border-color: var(--Button-primary-netative-avatar-border-color);
|
|
867
|
+
}
|
|
868
|
+
.wds-Button--negative.wds-Button--secondary {
|
|
869
|
+
--Button-background: var(--Button-secondary-negative-background);
|
|
870
|
+
--Button-background-hover: var(--Button-secondary-negative-background-hover);
|
|
871
|
+
--Button-background-active: var(--Button-secondary-negative-background-active);
|
|
872
|
+
--Button-color: var(--Button-secondary-negative-color);
|
|
873
|
+
--Button-avatar-border-color: var(--Button-secondary-netative-avatar-border-color);
|
|
874
|
+
}
|
|
875
|
+
.wds-Button--small {
|
|
876
|
+
--Button-padding: var(--Button-size-small-padding);
|
|
877
|
+
}
|
|
878
|
+
.wds-Button--small .wds-Button-icon--start {
|
|
879
|
+
margin-right: 4px;
|
|
880
|
+
margin-right: var(--size-4);
|
|
881
|
+
}
|
|
882
|
+
[dir="rtl"] .wds-Button--small .wds-Button-icon--start {
|
|
883
|
+
margin-right: 0;
|
|
884
|
+
margin-left: 4px;
|
|
885
|
+
margin-left: var(--size-4);
|
|
886
|
+
}
|
|
887
|
+
.wds-Button--medium {
|
|
888
|
+
--Button-padding: var(--Button-size-medium-padding);
|
|
889
|
+
}
|
|
890
|
+
.wds-Button--large {
|
|
891
|
+
--Button-padding: var(--Button-size-large-padding);
|
|
892
|
+
}
|
|
893
|
+
.wds-Button--block {
|
|
894
|
+
width: 100%;
|
|
895
|
+
}
|
|
896
|
+
.wds-Button-avatars {
|
|
897
|
+
display: inline-flex;
|
|
898
|
+
margin-right: 5px;
|
|
899
|
+
margin-left: calc(4px * -1);
|
|
900
|
+
margin-left: calc(var(--size-4) * -1);
|
|
901
|
+
}
|
|
902
|
+
[dir="rtl"] .wds-Button-avatars {
|
|
903
|
+
margin-right: 0;
|
|
904
|
+
margin-left: 5px;
|
|
905
|
+
}
|
|
906
|
+
.wds-Button-avatars .np-circle {
|
|
907
|
+
--circle-border-color: var(--Button-avatar-border-color);
|
|
908
|
+
}
|
|
909
|
+
.wds-Button-avatars .np-avatar-view .np-avatar-view-content {
|
|
910
|
+
color: var(--Button-color);
|
|
911
|
+
}
|
|
912
|
+
.wds-Button-icon {
|
|
913
|
+
display: inline-block;
|
|
914
|
+
}
|
|
915
|
+
.wds-Button-icon--start {
|
|
916
|
+
margin-right: 8px;
|
|
917
|
+
margin-right: var(--size-8);
|
|
918
|
+
}
|
|
919
|
+
[dir="rtl"] .wds-Button-icon--start {
|
|
920
|
+
margin-right: 0;
|
|
921
|
+
margin-left: 8px;
|
|
922
|
+
margin-left: var(--size-8);
|
|
923
|
+
}
|
|
924
|
+
.wds-Button-icon--end {
|
|
925
|
+
margin-left: 4px;
|
|
926
|
+
margin-left: var(--size-4);
|
|
927
|
+
}
|
|
928
|
+
[dir="rtl"] .wds-Button-icon--end {
|
|
929
|
+
margin-left: 0;
|
|
930
|
+
margin-right: 4px;
|
|
931
|
+
margin-right: var(--size-4);
|
|
932
|
+
}
|
|
933
|
+
.wds-Button-content {
|
|
934
|
+
position: relative;
|
|
935
|
+
}
|
|
936
|
+
.wds-Button-content--loading .wds-Button-label,
|
|
937
|
+
.wds-Button-content--loading .wds-Button-media,
|
|
938
|
+
.wds-Button-content--loading .wds-Button-icon {
|
|
939
|
+
visibility: hidden;
|
|
940
|
+
opacity: 0;
|
|
941
|
+
}
|
|
942
|
+
.wds-Button-label {
|
|
943
|
+
display: flex;
|
|
944
|
+
justify-content: center;
|
|
945
|
+
align-items: center;
|
|
946
|
+
position: relative;
|
|
947
|
+
}
|
|
948
|
+
.wds-Button-loader {
|
|
949
|
+
position: absolute;
|
|
950
|
+
display: flex;
|
|
951
|
+
justify-content: center;
|
|
952
|
+
align-items: center;
|
|
953
|
+
width: 100%;
|
|
954
|
+
height: 100%;
|
|
955
|
+
}
|
|
956
|
+
.wds-Button-loader .process-circle {
|
|
957
|
+
stroke: var(--Button-color);
|
|
958
|
+
}
|
|
959
|
+
/* RTL Styles */
|
|
960
|
+
[dir="rtl"] .wds-Button .tw-icon-chevron-right,[dir="rtl"] .wds-Button .tw-icon-arrow-right {
|
|
961
|
+
transform: rotate(180deg);
|
|
962
|
+
}
|
|
963
|
+
[dir="rtl"] .wds-Button .tw-icon-chevron-left,[dir="rtl"] .wds-Button .tw-icon-arrow-left {
|
|
964
|
+
transform: rotate(180deg);
|
|
965
|
+
}
|
|
708
966
|
.np-card {
|
|
709
967
|
overflow: hidden;
|
|
710
968
|
transition-property: transform, box-shadow;
|
|
@@ -1184,34 +1442,175 @@ div.critical-comms .critical-comms-body {
|
|
|
1184
1442
|
display: inline-flex;
|
|
1185
1443
|
flex-direction: column;
|
|
1186
1444
|
align-items: center;
|
|
1445
|
+
text-align: center;
|
|
1187
1446
|
cursor: pointer;
|
|
1447
|
+
position: relative;
|
|
1448
|
+
}
|
|
1449
|
+
.np-circular-btn .tw-icon {
|
|
1450
|
+
position: absolute;
|
|
1451
|
+
top: 16px;
|
|
1452
|
+
top: var(--size-16);
|
|
1453
|
+
pointer-events: none;
|
|
1454
|
+
color: white;
|
|
1455
|
+
transition: color 0.15s ease-in-out;
|
|
1456
|
+
width: 100%;
|
|
1457
|
+
left: 0;
|
|
1458
|
+
}
|
|
1459
|
+
[dir="rtl"] .np-circular-btn .tw-icon {
|
|
1460
|
+
right: 0;
|
|
1461
|
+
left: auto;
|
|
1462
|
+
left: initial;
|
|
1463
|
+
}
|
|
1464
|
+
@media (max-width: 320px) {
|
|
1465
|
+
.np-circular-btn .tw-icon {
|
|
1466
|
+
top: 12px;
|
|
1467
|
+
top: var(--size-12);
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
.np-circular-btn .tw-icon > svg {
|
|
1471
|
+
margin: 0 auto;
|
|
1472
|
+
}
|
|
1473
|
+
.np-theme-personal .np-circular-btn {
|
|
1474
|
+
/* stylelint-disable-next-line no-duplicate-selectors */
|
|
1475
|
+
}
|
|
1476
|
+
.np-theme-personal .np-circular-btn .tw-icon,
|
|
1477
|
+
.np-theme-personal .np-circular-btn .tw-icon:hover,
|
|
1478
|
+
.np-theme-personal .np-circular-btn .tw-icon:active {
|
|
1479
|
+
color: var(--color-interactive-control);
|
|
1480
|
+
}
|
|
1481
|
+
.np-theme-personal .np-circular-btn.negative .tw-icon,
|
|
1482
|
+
.np-theme-personal .np-circular-btn.negative.secondary:not(.disabled):not(:disabled):hover .tw-icon,
|
|
1483
|
+
.np-theme-personal .np-circular-btn.negative.secondary:not(.disabled):not(:disabled):active .tw-icon {
|
|
1484
|
+
color: var(--color-contrast) !important;
|
|
1485
|
+
}
|
|
1486
|
+
.np-theme-personal .np-circular-btn.negative.secondary:not(.disabled):not(:disabled) .tw-icon {
|
|
1487
|
+
color: var(--color-sentiment-negative) !important;
|
|
1488
|
+
}
|
|
1489
|
+
.np-circular-btn.accent .np-circular-btn__label {
|
|
1490
|
+
color: #00a2dd;
|
|
1491
|
+
color: var(--color-interactive-accent);
|
|
1492
|
+
}
|
|
1493
|
+
.np-circular-btn.accent:not(.disabled):not(:disabled):hover .np-circular-btn__label {
|
|
1494
|
+
color: #008fc9;
|
|
1495
|
+
color: var(--color-interactive-accent-hover);
|
|
1496
|
+
}
|
|
1497
|
+
.np-circular-btn.accent:active .np-circular-btn__label,
|
|
1498
|
+
.np-circular-btn.accent input[type="button"]:active ~ .np-circular-btn__label {
|
|
1499
|
+
color: #0081ba;
|
|
1500
|
+
color: var(--color-interactive-accent-active);
|
|
1501
|
+
}
|
|
1502
|
+
.np-circular-btn.accent.secondary .tw-icon {
|
|
1503
|
+
color: #00a2dd;
|
|
1504
|
+
color: var(--color-interactive-accent);
|
|
1188
1505
|
}
|
|
1189
|
-
.np-circular-btn
|
|
1190
|
-
.np-circular-btn
|
|
1506
|
+
.np-circular-btn.accent.secondary:not(.disabled):not(:disabled):hover .tw-icon,
|
|
1507
|
+
.np-circular-btn.accent.secondary input[type="button"]:active + .tw-icon {
|
|
1508
|
+
color: white;
|
|
1509
|
+
}
|
|
1510
|
+
.np-circular-btn.positive .np-circular-btn__label {
|
|
1511
|
+
color: #2ead4b;
|
|
1512
|
+
color: var(--color-interactive-positive);
|
|
1513
|
+
}
|
|
1514
|
+
.np-circular-btn.positive:not(.disabled):not(:disabled):hover .np-circular-btn__label {
|
|
1515
|
+
color: #069939;
|
|
1516
|
+
color: var(--color-interactive-positive-hover);
|
|
1517
|
+
}
|
|
1518
|
+
.np-circular-btn.positive:active .np-circular-btn__label,
|
|
1519
|
+
.np-circular-btn.positive input[type="button"]:active ~ .np-circular-btn__label {
|
|
1520
|
+
color: #008b2b;
|
|
1521
|
+
color: var(--color-interactive-positive-active);
|
|
1522
|
+
}
|
|
1523
|
+
.np-circular-btn.positive.secondary .tw-icon {
|
|
1524
|
+
color: #2ead4b;
|
|
1525
|
+
color: var(--color-interactive-positive);
|
|
1526
|
+
}
|
|
1527
|
+
.np-circular-btn.positive.secondary:not(.disabled):not(:disabled):hover .tw-icon,
|
|
1528
|
+
.np-circular-btn.positive.secondary input[type="button"]:active + .tw-icon {
|
|
1529
|
+
color: white;
|
|
1530
|
+
}
|
|
1531
|
+
.np-circular-btn.negative .np-circular-btn__label {
|
|
1532
|
+
color: #e74848;
|
|
1533
|
+
color: var(--color-interactive-negative);
|
|
1534
|
+
}
|
|
1535
|
+
.np-circular-btn.negative:not(.disabled):not(:disabled):hover .np-circular-btn__label {
|
|
1536
|
+
color: #d03238;
|
|
1537
|
+
color: var(--color-interactive-negative-hover);
|
|
1538
|
+
}
|
|
1539
|
+
.np-circular-btn.negative:active .np-circular-btn__label,
|
|
1540
|
+
.np-circular-btn.negative input[type="button"]:active ~ .np-circular-btn__label {
|
|
1541
|
+
color: #bf1e2c;
|
|
1542
|
+
color: var(--color-interactive-negative-active);
|
|
1543
|
+
}
|
|
1544
|
+
.np-circular-btn.negative.secondary .tw-icon {
|
|
1545
|
+
color: #e74848;
|
|
1546
|
+
color: var(--color-interactive-negative);
|
|
1547
|
+
}
|
|
1548
|
+
.np-circular-btn.negative.secondary:not(.disabled):not(:disabled):hover .tw-icon,
|
|
1549
|
+
.np-circular-btn.negative.secondary input[type="button"]:active + .tw-icon {
|
|
1550
|
+
color: white;
|
|
1551
|
+
}
|
|
1552
|
+
.np-theme-personal .np-circular-btn.accent .np-circular-btn__label {
|
|
1191
1553
|
color: var(--color-interactive-primary);
|
|
1192
1554
|
}
|
|
1193
|
-
.np-
|
|
1194
|
-
.np-circular-btn-secondary-default .np-circular-btn-label:not(.disabled):not(:disabled):hover {
|
|
1555
|
+
.np-theme-personal .np-circular-btn.accent:not(.disabled):not(:disabled):hover .np-circular-btn__label {
|
|
1195
1556
|
color: var(--color-interactive-primary-hover);
|
|
1196
1557
|
}
|
|
1197
|
-
.np-
|
|
1198
|
-
.np-
|
|
1558
|
+
.np-theme-personal .np-circular-btn.accent:active .np-circular-btn__label,
|
|
1559
|
+
.np-theme-personal .np-circular-btn.accent input[type="button"]:active ~ .np-circular-btn__label {
|
|
1199
1560
|
color: var(--color-interactive-primary-active);
|
|
1200
1561
|
}
|
|
1201
|
-
.np-
|
|
1202
|
-
|
|
1203
|
-
color: var(--color-sentiment-negative-primary);
|
|
1562
|
+
.np-theme-personal .np-circular-btn.accent.secondary .tw-icon {
|
|
1563
|
+
color: var(--color-interactive-primary);
|
|
1204
1564
|
}
|
|
1205
|
-
.np-
|
|
1206
|
-
.np-
|
|
1207
|
-
color:
|
|
1565
|
+
.np-theme-personal .np-circular-btn.accent.secondary:not(.disabled):not(:disabled):hover .tw-icon,
|
|
1566
|
+
.np-theme-personal .np-circular-btn.accent.secondary input[type="button"]:active + .tw-icon {
|
|
1567
|
+
color: white;
|
|
1568
|
+
color: var(--color-interactive-control);
|
|
1208
1569
|
}
|
|
1209
|
-
.np-
|
|
1210
|
-
|
|
1211
|
-
color: var(--color-sentiment-negative-primary-active);
|
|
1570
|
+
.np-theme-personal .np-circular-btn.accent.secondary:active input[type="button"] + .tw-icon {
|
|
1571
|
+
color: var(--color-interactive-control);
|
|
1212
1572
|
}
|
|
1213
|
-
.np-circular-btn-
|
|
1214
|
-
|
|
1573
|
+
.np-theme-personal .np-circular-btn.positive .np-circular-btn__label {
|
|
1574
|
+
color: var(--color-interactive-primary);
|
|
1575
|
+
}
|
|
1576
|
+
.np-theme-personal .np-circular-btn.positive:not(.disabled):not(:disabled):hover .np-circular-btn__label {
|
|
1577
|
+
color: var(--color-interactive-primary-hover);
|
|
1578
|
+
}
|
|
1579
|
+
.np-theme-personal .np-circular-btn.positive:active .np-circular-btn__label,
|
|
1580
|
+
.np-theme-personal .np-circular-btn.positive input[type="button"]:active ~ .np-circular-btn__label {
|
|
1581
|
+
color: var(--color-interactive-primary-active);
|
|
1582
|
+
}
|
|
1583
|
+
.np-theme-personal .np-circular-btn.positive.secondary .tw-icon {
|
|
1584
|
+
color: var(--color-interactive-primary);
|
|
1585
|
+
}
|
|
1586
|
+
.np-theme-personal .np-circular-btn.positive.secondary:not(.disabled):not(:disabled):hover .tw-icon,
|
|
1587
|
+
.np-theme-personal .np-circular-btn.positive.secondary input[type="button"]:active + .tw-icon {
|
|
1588
|
+
color: white;
|
|
1589
|
+
color: var(--color-interactive-control);
|
|
1590
|
+
}
|
|
1591
|
+
.np-theme-personal .np-circular-btn.positive.secondary:active input[type="button"] + .tw-icon {
|
|
1592
|
+
color: var(--color-interactive-control);
|
|
1593
|
+
}
|
|
1594
|
+
.np-theme-personal .np-circular-btn.negative .np-circular-btn__label {
|
|
1595
|
+
color: var(--color-sentiment-negative);
|
|
1596
|
+
}
|
|
1597
|
+
.np-theme-personal .np-circular-btn.negative:not(.disabled):not(:disabled):hover .np-circular-btn__label {
|
|
1598
|
+
color: var(--color-sentiment-negative-hover);
|
|
1599
|
+
}
|
|
1600
|
+
.np-theme-personal .np-circular-btn.negative:active .np-circular-btn__label,
|
|
1601
|
+
.np-theme-personal .np-circular-btn.negative input[type="button"]:active ~ .np-circular-btn__label {
|
|
1602
|
+
color: var(--color-sentiment-negative-active);
|
|
1603
|
+
}
|
|
1604
|
+
.np-theme-personal .np-circular-btn.negative.secondary .tw-icon {
|
|
1605
|
+
color: var(--color-sentiment-negative);
|
|
1606
|
+
}
|
|
1607
|
+
.np-theme-personal .np-circular-btn.negative.secondary:not(.disabled):not(:disabled):hover .tw-icon,
|
|
1608
|
+
.np-theme-personal .np-circular-btn.negative.secondary input[type="button"]:active + .tw-icon {
|
|
1609
|
+
color: white;
|
|
1610
|
+
color: var(--color-interactive-control);
|
|
1611
|
+
}
|
|
1612
|
+
.np-theme-personal .np-circular-btn.negative.secondary:active input[type="button"] + .tw-icon {
|
|
1613
|
+
color: var(--color-interactive-control);
|
|
1215
1614
|
}
|
|
1216
1615
|
.np-circle {
|
|
1217
1616
|
border-radius: 9999px;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AvatarViewProps } from '../avatarView';
|
|
2
|
-
type SingleAvatarType = {
|
|
2
|
+
export type SingleAvatarType = {
|
|
3
3
|
asset?: AvatarViewProps['children'];
|
|
4
4
|
} & Omit<AvatarViewProps, 'notification' | 'selected' | 'size' | 'badge' | 'children' | 'interactive'>;
|
|
5
5
|
export type Props = {
|
|
@@ -7,5 +7,4 @@ export type Props = {
|
|
|
7
7
|
orientation?: 'horizontal' | 'diagonal';
|
|
8
8
|
} & Pick<AvatarViewProps, 'size' | 'interactive' | 'className' | 'role' | 'aria-label' | 'aria-labelledby' | 'aria-hidden'>;
|
|
9
9
|
export default function AvatarLayout({ avatars, orientation: orientationProp, size, className, interactive, ...restProps }: Props): import("react").JSX.Element | null;
|
|
10
|
-
export {};
|
|
11
10
|
//# sourceMappingURL=AvatarLayout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarLayout.d.ts","sourceRoot":"","sources":["../../../src/avatarLayout/AvatarLayout.tsx"],"names":[],"mappings":"AACA,OAAmB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"AvatarLayout.d.ts","sourceRoot":"","sources":["../../../src/avatarLayout/AvatarLayout.tsx"],"names":[],"mappings":"AACA,OAAmB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAG5D,MAAM,MAAM,gBAAgB,GAAG;IAAE,KAAK,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;CAAE,GAAG,IAAI,CAC3E,eAAe,EACf,cAAc,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,aAAa,CAC5E,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IAClB,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CACzC,GAAG,IAAI,CACN,eAAe,EACf,MAAM,GAAG,aAAa,GAAG,WAAW,GAAG,MAAM,GAAG,YAAY,GAAG,iBAAiB,GAAG,aAAa,CACjG,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,OAAY,EACZ,WAAW,EAAE,eAA8B,EAC3C,IAAS,EACT,SAAS,EACT,WAAW,EACX,GAAG,SAAS,EACb,EAAE,KAAK,sCAuDP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/avatarLayout/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,KAAK,IAAI,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/avatarLayout/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,KAAK,IAAI,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACjE,YAAY,EAAE,gBAAgB,EAAE,M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C;CAC3E,GAAG,IAAI,CACN,cAAc,CAAC,cAAc,CAAC,EAC9B,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,YAAY,GAAG,iBAAiB,GAAG,aAAa,CACrF,CAAC;AAEF,iBAAS,UAAU,CAAC,EAClB,QAAoB,EACpB,IAAS,EACT,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,WAAmB,EACnB,SAAS,EACT,KAAK,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,GAAG,SAAS,EACb,EAAE,KAAK,+BA+BP;AAwFD,eAAe,UAAU,CAAC"}
|
|
@@ -1,25 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
/** @deprecated */
|
|
3
|
-
type DeprecatedTypes = 'primary' | 'pay' | 'secondary' | 'danger' | 'link';
|
|
4
|
-
/** @deprecated */
|
|
5
|
-
type DeprecatedSizes = SizeExtraSmall;
|
|
6
|
-
type CommonProps = {
|
|
7
|
-
block?: boolean;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
loading?: boolean;
|
|
10
|
-
type?: ControlTypeAccent | ControlTypeNegative | ControlTypePositive | DeprecatedTypes | null;
|
|
11
|
-
priority?: PriorityPrimary | PrioritySecondary | PriorityTertiary | null;
|
|
12
|
-
size?: SizeSmall | SizeMedium | SizeLarge | DeprecatedSizes;
|
|
13
|
-
};
|
|
14
|
-
type ButtonProps = CommonProps & Omit<React.ComponentPropsWithRef<'button'>, 'type'> & {
|
|
15
|
-
as?: 'button';
|
|
16
|
-
htmlType?: 'submit' | 'reset' | 'button';
|
|
17
|
-
};
|
|
18
|
-
type AnchorProps = CommonProps & Omit<React.ComponentPropsWithRef<'a'>, 'type'> & {
|
|
19
|
-
as?: 'a';
|
|
20
|
-
};
|
|
21
|
-
export type Props = ButtonProps | AnchorProps;
|
|
22
|
-
export type ButtonReferenceType = HTMLButtonElement | HTMLAnchorElement;
|
|
23
|
-
declare const Button: import("react").ForwardRefExoticComponent<(Omit<ButtonProps, "ref"> | Omit<AnchorProps, "ref">) & import("react").RefAttributes<ButtonReferenceType>>;
|
|
1
|
+
declare const Button: import("react").ForwardRefExoticComponent<(Omit<import("./Button.types").ButtonElementProps, "ref"> | Omit<import("./Button.types").AnchorElementProps, "ref">) & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
24
2
|
export default Button;
|
|
25
3
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/button/Button.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/button/Button.tsx"],"names":[],"mappings":"AAUA,QAAA,MAAM,MAAM,yOAmGX,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { LegacyButtonProps } from './LegacyButton';
|
|
2
|
+
import { ButtonProps as NewButtonProps } from './Button.types';
|
|
3
|
+
type LegacyButtonType = 'accent' | 'negative' | 'positive' | 'primary' | 'pay' | 'secondary' | 'danger' | 'link' | null | undefined;
|
|
4
|
+
type NewButtonType = 'button' | 'submit' | 'reset' | LegacyButtonType | undefined;
|
|
5
|
+
type CommonButtonProps = {
|
|
6
|
+
href?: string;
|
|
7
|
+
target?: string;
|
|
8
|
+
ref?: React.Ref<HTMLButtonElement | HTMLAnchorElement>;
|
|
9
|
+
};
|
|
10
|
+
export type ButtonProps = (Omit<LegacyButtonProps, 'ref'> & CommonButtonProps & {
|
|
11
|
+
priority?: LegacyButtonProps['priority'];
|
|
12
|
+
type?: LegacyButtonType;
|
|
13
|
+
htmlType?: string;
|
|
14
|
+
v2?: false;
|
|
15
|
+
}) | (Omit<Omit<NewButtonProps, 'type'>, 'ref'> & CommonButtonProps & {
|
|
16
|
+
priority?: NewButtonProps['priority'];
|
|
17
|
+
type?: NewButtonType;
|
|
18
|
+
v2: true;
|
|
19
|
+
});
|
|
20
|
+
declare const Button: import("react").ForwardRefExoticComponent<(Omit<Omit<LegacyButtonProps, "ref"> & CommonButtonProps & {
|
|
21
|
+
priority?: LegacyButtonProps["priority"];
|
|
22
|
+
type?: LegacyButtonType;
|
|
23
|
+
htmlType?: string;
|
|
24
|
+
v2?: false;
|
|
25
|
+
}, "ref"> | Omit<Omit<Omit<NewButtonProps, "type">, "ref"> & CommonButtonProps & {
|
|
26
|
+
priority?: NewButtonProps["priority"];
|
|
27
|
+
type?: NewButtonType;
|
|
28
|
+
v2: true;
|
|
29
|
+
}, "ref">) & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
30
|
+
export default Button;
|
|
31
|
+
//# sourceMappingURL=Button.resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.resolver.d.ts","sourceRoot":"","sources":["../../../src/button/Button.resolver.tsx"],"names":[],"mappings":"AACA,OAAqB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAG/D,KAAK,gBAAgB,GACjB,QAAQ,GACR,UAAU,GACV,UAAU,GACV,SAAS,GACT,KAAK,GACL,WAAW,GACX,QAAQ,GACR,MAAM,GACN,IAAI,GACJ,SAAS,CAAC;AAEd,KAAK,aAAa,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,gBAAgB,GAAG,SAAS,CAAC;AAElF,KAAK,iBAAiB,GAAG;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,CAAC;CACxD,CAAC;AAEF,MAAM,MAAM,WAAW,GACnB,CAAC,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC,GAC7B,iBAAiB,GAAG;IAClB,QAAQ,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,EAAE,CAAC,EAAE,KAAK,CAAC;CACZ,CAAC,GACJ,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC,GACxC,iBAAiB,GAAG;IAClB,QAAQ,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;IACtC,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,EAAE,EAAE,IAAI,CAAC;CACV,CAAC,CAAC;AAyDT,QAAA,MAAM,MAAM;eAnEO,iBAAiB,CAAC,UAAU,CAAC;WACjC,gBAAgB;eACZ,MAAM;SACZ,KAAK;;eAIC,cAAc,CAAC,UAAU,CAAC;WAC9B,aAAa;QAChB,IAAI;kFA8Ed,CAAC;AAIH,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import type { PrimitiveButtonProps, PrimitiveAnchorProps, PrimitiveButtonElementRef, PrimitiveAnchorElementRef } from '../primitives';
|
|
3
|
+
import type { SingleAvatarType } from '../avatarLayout';
|
|
4
|
+
export type ButtonSentiment = 'default' | 'negative';
|
|
5
|
+
export type ButtonPriority = 'primary' | 'secondary' | 'tertiary' | 'minimal';
|
|
6
|
+
export type ButtonType = 'button' | 'submit' | 'reset';
|
|
7
|
+
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
8
|
+
export type ButtonRefType = PrimitiveButtonElementRef | PrimitiveAnchorElementRef;
|
|
9
|
+
/**
|
|
10
|
+
* Common properties for the Button component.
|
|
11
|
+
*/
|
|
12
|
+
export interface CommonButtonProps {
|
|
13
|
+
/**
|
|
14
|
+
* If set, toggles the new Button API
|
|
15
|
+
* @default false
|
|
16
|
+
* */
|
|
17
|
+
v2?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* The HTML element to render
|
|
20
|
+
* @default 'button'
|
|
21
|
+
**/
|
|
22
|
+
as?: 'button' | 'a' | null;
|
|
23
|
+
/** Additional class name(s) to apply to the button */
|
|
24
|
+
className?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the button is disabled
|
|
27
|
+
* @default false
|
|
28
|
+
**/
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
href?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the button is in a loading state
|
|
33
|
+
* @default false
|
|
34
|
+
* */
|
|
35
|
+
loading?: boolean;
|
|
36
|
+
/** Whether the button should take up the full width of its container */
|
|
37
|
+
block?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Size of the button
|
|
40
|
+
* @default lg
|
|
41
|
+
* */
|
|
42
|
+
size?: ButtonSize;
|
|
43
|
+
/**
|
|
44
|
+
* Priority of the button
|
|
45
|
+
* @default "primary"
|
|
46
|
+
*/
|
|
47
|
+
priority?: ButtonPriority;
|
|
48
|
+
/**
|
|
49
|
+
* Sentiment of the button
|
|
50
|
+
* @default default
|
|
51
|
+
*/
|
|
52
|
+
sentiment?: ButtonSentiment;
|
|
53
|
+
/** Icon to be displayed on the left side of the button */
|
|
54
|
+
iconStart?: React.ElementType;
|
|
55
|
+
/** Icon to be displayed on the right side of the button */
|
|
56
|
+
iconEnd?: React.ElementType;
|
|
57
|
+
/** Media to be displayed on the left side of the button */
|
|
58
|
+
avatars?: SingleAvatarType[];
|
|
59
|
+
/** Optional property to provide component Ref */
|
|
60
|
+
ref?: ButtonRefType;
|
|
61
|
+
/** Content to be displayed inside the button */
|
|
62
|
+
children?: ReactNode;
|
|
63
|
+
}
|
|
64
|
+
export type ButtonElementProps = PrimitiveButtonProps & CommonButtonProps;
|
|
65
|
+
export type AnchorElementProps = PrimitiveAnchorProps & CommonButtonProps;
|
|
66
|
+
export type ButtonProps = ButtonElementProps | AnchorElementProps;
|
|
67
|
+
//# sourceMappingURL=Button.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3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