hds-web 1.12.3 → 1.12.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hds-web",
3
- "version": "1.12.3",
3
+ "version": "1.12.5",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -0,0 +1,115 @@
1
+ import React from "react";
2
+ import PropTypes from 'prop-types';
3
+ import { Icon } from "../../common-components/Icon";
4
+ import { HDSColor } from '../../../foundation/ColorPalette'
5
+ import { Typography } from '../../../foundation/Typography'
6
+ import { HDSButton } from "../../Buttons";
7
+ import ReactMarkdown from "react-markdown";
8
+
9
+ const cardVariant = {
10
+ "withButton": {
11
+ 'cardStyle': 'p-10 ',
12
+ 'iconWidthStyle': 'h-20 w-20',
13
+ 'iconStyle': 'h-10 w-10',
14
+ 'titleTextStyle': 'h4',
15
+ 'titleClasses': 'mb-1 text-hds-m-h4 tb:text-hds-t-h4 db:text-hds-d-h4',
16
+ 'descTextStyle': 'body1c',
17
+ 'descClasses': 'text-hds-m-body1c tb:text-hds-t-body1c db:text-hds-d-body1c'
18
+ },
19
+ "withoutButton": {
20
+ 'cardStyle': 'p-6',
21
+ 'iconWidthStyle': 'h-12 w-12',
22
+ 'iconStyle': 'h-6 w-6',
23
+ 'titleTextStyle': 'h5',
24
+ 'titleClasses': 'mb-1 text-blue-600 text-hds-m-h5 tb:text-hds-t-h5 db:text-hds-d-h5',
25
+ 'descTextStyle': 'body1',
26
+ 'descClasses': 'text-neutral-1000 text-hds-m-body1 tb:text-hds-t-body1 db:text-hds-d-body1'
27
+ },
28
+ "sm": {
29
+ 'cardStyle': 'p-6',
30
+ 'iconWidthStyle': 'h-12 w-12',
31
+ 'iconStyle': 'h-6 w-6',
32
+ 'titleTextStyle': 'body3c',
33
+ 'titleClasses': 'mb-1 text-neutral-800 text-hds-m-body3c-bold tb:text-hds-t-body3c-bold db:text-hds-d-body3c-bold',
34
+ 'descTextStyle': 'body3',
35
+ 'descClasses': 'text-neutral-800 text-hds-m-body3 tb:text-hds-t-body3 db:text-hds-d-body3'
36
+ }
37
+ }
38
+
39
+ export default function IconCardButton(props) {
40
+ const iconBG = props.iconBg ? HDSColor(props.iconBg) : '';
41
+ const textClass = props.textColorClass ? HDSColor(props.textColorClass) : 'text-neutral-1000';
42
+ return (
43
+ <>
44
+ <div>
45
+ {
46
+ props.imgUrl ? (
47
+ <div className={`${iconBG} ${cardVariant[props.cardType]['iconWidthStyle']} w-12 h-12 inline-flex p-1 items-center justify-center rounded-full mb-6`}>
48
+ <img src={props.imgUrl} alt={props.title} />
49
+ </div>
50
+ ) : (
51
+ <div
52
+ className={`${iconBG} ${cardVariant[props.cardType]['iconWidthStyle']} w-12 h-12 flex items-center justify-center rounded-full mb-6`}
53
+ >
54
+ <Icon
55
+ height={`stroke-[1.5px] ${cardVariant[props.cardType]['iconStyle']}`}
56
+ variant={props.iconVariant}
57
+ strokeColor={props.iconStroke}
58
+ strokeClass={HDSColor(props.iconStrokeClass)} />
59
+ </div>
60
+ )
61
+ }
62
+ {props.cardType &&
63
+ (
64
+ <>
65
+ <Typography
66
+ textStyle={cardVariant[props.cardType]['titleTextStyle']}
67
+ className={`${cardVariant[props.cardType]['titleClasses']} ${textClass}`}
68
+ >
69
+ {props.title}
70
+ </Typography>
71
+
72
+ <Typography
73
+ textStyle={cardVariant[props.cardType]['descTextStyle']}
74
+ className={`${cardVariant[props.cardType]['descClasses']} ${textClass} [&>p]:${textClass} [&>p]:pb-2 last:[&>p]:pb-0 [&>ul]:ps-4 [&>ul>li]:list-disc [&>ul>li]:pb-2 last:[&>ul>li]:pb-0 [&>p>a]:text-blue-600`}
75
+ >
76
+ <ReactMarkdown>
77
+ {props.description}
78
+ </ReactMarkdown>
79
+ </Typography>
80
+ </>
81
+ )
82
+ }
83
+ </div>
84
+ {
85
+ props.button && (
86
+ <div className="inline-flex pt-6">
87
+ <HDSButton
88
+ label={props.button.cta_text}
89
+ type={props.button.cta_type || 'secondary'}
90
+ leftIconVariant='none'
91
+ rightIconVariant='none'
92
+ state='default'
93
+ size='sm'
94
+ rightAnimatedArrow={true}
95
+ rightAnimatedArrowColor={props.button.rightAnimatedArrowColor || '#3970FD'}
96
+ btnBgColorClass={props.button.btnBg}
97
+ btnTextHoverClass={props.button.btnTextColorClass}
98
+ animatedHoverStroke={props.button.animatedHoverStroke}
99
+ btnTextColorClass={props.button.btnTextColorClass}
100
+ />
101
+ </div>
102
+ )
103
+ }
104
+ </>
105
+ )
106
+ }
107
+
108
+ IconCardButton.defaultProps = {
109
+ cardType: 'withoutButton',
110
+ iconStrokeClass: 'stroke-neutral-1000',
111
+ iconVariant: 'cube01'
112
+ }
113
+ IconCardButton.propTypes = {
114
+ cardType: PropTypes.oneOf(['withoutButton', 'withButton', 'sm']),
115
+ }
@@ -2,4 +2,5 @@ export {default as TalkCard} from './talkCard';
2
2
  export {default as TalkCard2} from './talkcard2';
3
3
  export {default as IconCard} from './iconCard';
4
4
  export {default as ImageCard} from './imageCard';
5
- export {default as ImageBadgeCard} from './imageBadgeCard';
5
+ export {default as ImageBadgeCard} from './imageBadgeCard';
6
+ export {default as IconCardButton} from './iconCardButton';
@@ -1,4 +1,4 @@
1
1
  export {default as Hero1} from './h1'
2
2
  export {default as HeroSecondary} from './h2'
3
3
  export {default as HeroCapability} from './h3'
4
- export {default as HeroIntegration} from './heroIntegration'
4
+ export {default as HeroIntegration} from './heroIntegration'
@@ -39,7 +39,6 @@ export default function Tab(props) {
39
39
  let tabTextClass = '';
40
40
 
41
41
  function tabClass(name) {
42
-
43
42
  // console.log(currentTab['tabTextColorClass']);
44
43
 
45
44
  if(activeTab['tabTextColorClass']){
@@ -66,7 +65,7 @@ export default function Tab(props) {
66
65
  onClick={(event) => handleTabClick(event, tab)}
67
66
  >
68
67
  <Typography
69
- className={`${tabClass(tab.name)} cursor-pointer px-3 py-1 z-[2] relative whitespace-nowrap`}
68
+ className={`${tabClass(tab.name)} ${tab.name === activeTab.name ? '' : 'hover:bg-neutral-150'} cursor-pointer px-3 py-1 z-[2] relative whitespace-nowrap`}
70
69
  textStyle='body3c-medium'>
71
70
  {tab.name}
72
71
  </Typography>
@@ -74,7 +73,7 @@ export default function Tab(props) {
74
73
  ))}
75
74
  <span
76
75
  ref={pillRef}
77
- className={`absolute left-0 z-[1] ${pillColorClass} rounded-full transition-all ease-in duration-150`}
76
+ className={`absolute left-0 z-[1] ${pillColorClass} rounded-full transition-all ease-in duration-150`}
78
77
  style={{
79
78
  left: `${activeTab.index * 100}%`,
80
79
  width: `${activeTab.width}px`, // Use the width of the clicked tab
@@ -8,7 +8,7 @@ import PropTypes from 'prop-types';
8
8
 
9
9
  const tabCard = (tabContent) => (
10
10
  <>
11
- <div className='px-3'>
11
+ <div className=''>
12
12
  {tabContent.title && <Typography textStyle='h4' className={HDSColor(tabContent.title_color)}>{tabContent.title}</Typography>}
13
13
 
14
14
  {tabContent.sub_title && <Typography textStyle='body1c' className={HDSColor(tabContent.sub_title_color)}>{tabContent.sub_title}</Typography>}
@@ -62,9 +62,9 @@ export default function NavCard(props) {
62
62
  <div>
63
63
  {props.navTabs &&
64
64
 
65
- <div className='max-w-[44.44rem] bg-neutral-0 shadow rounded-2xl'>
65
+ <div className='max-w-[44.44rem] rounded-2xl'>
66
66
 
67
- <div className='flex justify-center pb-8'>
67
+ <div className='flex pb-8'>
68
68
  <Tab
69
69
  onTabClick={handleTabClick}
70
70
  tabs={props.navTabs}
@@ -1777,10 +1777,6 @@ select{
1777
1777
  min-width: 11.5rem;
1778
1778
  }
1779
1779
 
1780
- .min-w-\[110px\]{
1781
- min-width: 110px;
1782
- }
1783
-
1784
1780
  .min-w-\[112px\]{
1785
1781
  min-width: 112px;
1786
1782
  }
@@ -1789,6 +1785,10 @@ select{
1789
1785
  min-width: 12px;
1790
1786
  }
1791
1787
 
1788
+ .min-w-\[130px\]{
1789
+ min-width: 130px;
1790
+ }
1791
+
1792
1792
  .min-w-\[169px\]{
1793
1793
  min-width: 169px;
1794
1794
  }
@@ -1835,10 +1835,6 @@ select{
1835
1835
  min-width: 100%;
1836
1836
  }
1837
1837
 
1838
- .min-w-\[130px\]{
1839
- min-width: 130px;
1840
- }
1841
-
1842
1838
  .max-w-2xl{
1843
1839
  max-width: 42rem;
1844
1840
  }
@@ -8650,10 +8646,6 @@ select{
8650
8646
  margin-right: 0px;
8651
8647
  }
8652
8648
 
8653
- .last\:justify-start:last-child{
8654
- justify-content: flex-start;
8655
- }
8656
-
8657
8649
  .last\:rounded-r-full:last-child{
8658
8650
  border-top-right-radius: 9999px;
8659
8651
  border-bottom-right-radius: 9999px;
@@ -9796,12 +9788,6 @@ select{
9796
9788
  }
9797
9789
  }
9798
9790
 
9799
- @media not all and (min-width: 400px){
9800
- .max-mb-m\:last\:justify-start:last-child{
9801
- justify-content: flex-start;
9802
- }
9803
- }
9804
-
9805
9791
  @media (max-width: 369px){
9806
9792
  .max-\[369px\]\:mt-8{
9807
9793
  margin-top: 2rem;
@@ -9903,10 +9889,6 @@ select{
9903
9889
  .mb-m\:pt-0{
9904
9890
  padding-top: 0px;
9905
9891
  }
9906
-
9907
- .mb-m\:last\:justify-start:last-child{
9908
- justify-content: flex-start;
9909
- }
9910
9892
  }
9911
9893
 
9912
9894
  @media (min-width: 600px){