diff --git a/react/css/package.json b/react/css/package.json index 56a0c1bf09..7716e00298 100644 --- a/react/css/package.json +++ b/react/css/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-components-css", - "version": "0.0.2-beta.36", + "version": "0.0.2-beta.37", "license": "MIT", "main": "dist/index.css", "author": "Jagankumar ", diff --git a/react/css/src/digitv2/components/dividerV2.scss b/react/css/src/digitv2/components/dividerV2.scss index 70ad783327..3b9f9fb3ec 100644 --- a/react/css/src/digitv2/components/dividerV2.scss +++ b/react/css/src/digitv2/components/dividerV2.scss @@ -1,6 +1,7 @@ .digit-divider { border: theme(digitv2.divider.dividerS); width: 100%; + margin: theme(digitv2.spacers.spacer0); &.medium { border: theme(digitv2.divider.dividerM); diff --git a/react/css/src/digitv2/components/filterCardV2.scss b/react/css/src/digitv2/components/filterCardV2.scss new file mode 100644 index 0000000000..06e578b8e9 --- /dev/null +++ b/react/css/src/digitv2/components/filterCardV2.scss @@ -0,0 +1,417 @@ +.digit-filter-card-popup-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(11, 12, 12, 0.7); + display: flex; + justify-content: center; + align-items: center; + z-index: 9999; + backdrop-filter: blur(0.125rem); + -webkit-backdrop-filter: blur(0.125rem); + + .digit-filter-card-popup-wrapper { + @apply w-full h-auto flex-col fixed; + z-index: 10000; + background-color: theme(digitv2.lightTheme.paper-primary); + border-radius: theme(digitv2.spacers.spacer1); + box-shadow: theme(digitv2.spacers.spacer0) 0.063rem 0.125rem theme(digitv2.spacers.spacer0) #00000029; + display: flex; + top: 50%; + left: 50%; + transform: translate(-50%, -50%) scale(0); + opacity: 0; + animation: scaleIn 300ms ease-in-out forwards; + + @media (min-aspect-ratio: 3/4) { + max-height: 86%; + max-width: 51%; + } + + @media (min-aspect-ratio: 9/16) and (max-aspect-ratio: 3/4) { + max-height: 82%; + max-width: 74%; + } + + @media (max-aspect-ratio: 9/16) { + max-height: 80%; + max-width: 91%; + } + + .digit-radio-options-wrap { + margin-bottom: theme(digitv2.spacers.spacer0); + } + } +} + + +.digit-filter-card-popup-wrapper.closing { + animation: scaleOut 300ms ease-in-out forwards; +} + +@keyframes scaleIn { + 0% { + transform: translate(-50%, -50%) scale(0); + opacity: 0; + } + + 100% { + transform: translate(-50%, -50%) scale(1); + opacity: 1; + } +} + +@keyframes scaleOut { + 0% { + transform: translate(-50%, -50%) scale(1); + opacity: 1; + } + + 100% { + transform: translate(-50%, -50%) scale(0); + opacity: 0; + } +} + + +.filter-card { + width: 100%; + height: auto; + background-color: theme(digitv2.lightTheme.paper-primary); + border-radius: theme(digitv2.spacers.spacer1); + box-shadow: 0rem 0.063rem 0.125rem 0rem #00000029; + display: flex; + flex-direction: column; + position: relative; + + .digit-radio-options-wrap { + margin-bottom: theme(digitv2.spacers.spacer0); + } +} + +.filter-card-horizontal { + display: grid; + flex-direction: column; +} + +.filter-card-vertical { + display: flex; + flex-direction: column; + + @media (min-aspect-ratio: 9/16) and (max-aspect-ratio: 3/4) { + /* Media query for tablets */ + max-width: 27.5rem; + } + + @media (max-aspect-ratio: 9/16) { + /* Media query for mobile */ + max-width: 100%; + width: 100%; + } + + @media (min-aspect-ratio: 3/4) { + /* Media query for desktop */ + max-width: 37.5rem; + } +} + + +.filter-header { + display: flex; + justify-content: space-between; + align-items: center; + + .title-container { + display: flex !important; + gap: 0.5rem; + align-items: center; + + .close-icon { + cursor: pointer; + position: absolute; + top: theme(digitv2.spacers.spacer2); + right: theme(digitv2.spacers.spacer2); + width: theme(digitv2.spacers.spacer8); + height: theme(digitv2.spacers.spacer8); + } + } + + &.with-shadow { + box-shadow: theme(digitv2.spacers.spacer0) 0.063rem 0.125rem theme(digitv2.spacers.spacer0) #00000026; + } + + &.with-shadow { + box-shadow: theme(digitv2.spacers.spacer0) 0.063rem 0.125rem theme(digitv2.spacers.spacer0) #00000026; + } + + @media (min-aspect-ratio: 3/4) { + padding: theme(digitv2.spacers.spacer6); + padding-bottom: theme(digitv2.spacers.spacer0); + + &.with-shadow { + padding-bottom: theme(digitv2.spacers.spacer6); + } + } + + @media (min-aspect-ratio: 9/16) and (max-aspect-ratio: 3/4) { + padding: theme(digitv2.spacers.spacer5); + padding-bottom: theme(digitv2.spacers.spacer0); + + &.with-shadow { + padding-bottom: theme(digitv2.spacers.spacer5); + } + } + + @media (max-aspect-ratio: 9/16) { + padding: theme(digitv2.spacers.spacer4); + padding-bottom: theme(digitv2.spacers.spacer0); + + &.with-shadow { + padding-bottom: theme(digitv2.spacers.spacer4); + } + } +} + +.filter-header .filter-title { + @extend .typography.caption-l; + color: theme(digitv2.lightTheme.primary-2); +} + +.content-container { + display: flex; + flex-direction: column; + overflow-y: auto; + + + @media (min-aspect-ratio: 3/4) { + gap: theme(digitv2.spacers.spacer6); + padding: theme(digitv2.spacers.spacer6) theme(digitv2.spacers.spacer6) theme(digitv2.spacers.spacer0) theme(digitv2.spacers.spacer6); + + &.with-shadow, + &.without-footer { + padding: theme(digitv2.spacers.spacer6); + } + + } + + @media (min-aspect-ratio: 9/16) and (max-aspect-ratio: 3/4) { + gap: theme(digitv2.spacers.spacer5); + padding: theme(digitv2.spacers.spacer5) theme(digitv2.spacers.spacer5) theme(digitv2.spacers.spacer0) theme(digitv2.spacers.spacer5); + + &.with-shadow, + &.without-footer { + padding: theme(digitv2.spacers.spacer5); + } + + } + + @media (max-aspect-ratio: 9/16) { + gap: theme(digitv2.spacers.spacer4); + padding: theme(digitv2.spacers.spacer4) theme(digitv2.spacers.spacer4) theme(digitv2.spacers.spacer0) theme(digitv2.spacers.spacer4); + + &.with-shadow, + &.without-footer { + padding: theme(digitv2.spacers.spacer4); + } + } + + .digit-label-field-pair { + margin-bottom: unset; + } +} + +.content-item { + display: flex; + justify-content: space-between; +} + +.content-item:last-child { + border-bottom: none; +} + + +.button-container { + display: flex; + justify-content: flex-end; + gap: 1.5rem; + /*grid-column: span 3 ;*/ + + &.equal-buttons { + justify-content: flex-start; + width: 100%; + + button { + flex: 1 + } + } + + &.vertical{ + flex-direction: column !important; + + button { + width: 100%; + } + + &.equal-buttons { + justify-content: flex-start; + width: 100%; + + button { + flex: unset; + width: 100%; + } + } + } + + @media (max-aspect-ratio: 9/16){ + + flex-direction: column !important; + + button { + width: 100%; + } + + &.equal-buttons { + justify-content: flex-start; + width: 100%; + + button { + flex: unset; + width: 100%; + } + } + } + + &.with-shadow { + box-shadow: theme(digitv2.spacers.spacer0) -0.063rem 0.125rem theme(digitv2.spacers.spacer0) #00000026; + } + + @media (min-aspect-ratio: 3/4) { + padding: theme(digitv2.spacers.spacer6); + } + + @media (min-aspect-ratio: 9/16) and (max-aspect-ratio: 3/4) { + @apply w-full; + padding: theme(digitv2.spacers.spacer5); + } + + @media (max-aspect-ratio: 9/16) { + padding: theme(digitv2.spacers.spacer4); + } +} + +.content-action-wrapper { + display: flex; + flex-wrap: wrap; + overflow-y: auto; + + @media (min-aspect-ratio: 3/4) { + gap: theme(digitv2.spacers.spacer6); + padding: theme(digitv2.spacers.spacer6); + } + + @media (min-aspect-ratio: 9/16) and (max-aspect-ratio: 3/4) { + padding: theme(digitv2.spacers.spacer5); + gap: theme(digitv2.spacers.spacer5); + } + + @media (max-aspect-ratio: 9/16) { + padding: theme(digitv2.spacers.spacer4); + gap: theme(digitv2.spacers.spacer4); + } + + .content-container { + flex-direction: row; + padding: 0rem; + display: flex; + flex-wrap: wrap; + width: 100%; + display: grid; + grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); + + + @media (max-aspect-ratio: 9/16) { + flex-direction: column; + .digit-label-field-pair{ + width: 100%; + } + } + + .digit-label-field-pair{ + flex: 1; + } + } + + .button-container { + padding: 0rem; + display: flex; + flex-direction: row; + flex:1; + align-items: center; + justify-content: flex-end; + grid-column: span 2 / -1; + justify-self: end; + + @media (min-aspect-ratio: 3/4) { + button{ + margin-top: 1.875rem; + } + } + + @media (min-aspect-ratio: 9/16) and (max-aspect-ratio: 3/4){ + button{ + margin-top: 1.875rem; + } + } + + @media (max-aspect-ratio: 9/16) { + button{ + margin-top: 0rem; + } + } + + &.equal-buttons { + justify-content: flex-end; + width: 100%; + + button { + flex: unset + } + } + + } +} + +.content-container::-webkit-scrollbar { + width: theme(digitv2.spacers.spacer2); + height: 0rem; + background-color: theme(digitv2.lightTheme.generic-background); +} + +.content-container::-webkit-scrollbar-track { + background-color: theme(digitv2.lightTheme.generic-background); + border-radius: 0.563rem; +} + +.content-container::-webkit-scrollbar-thumb { + background-color: theme(digitv2.lightTheme.generic-divider); + border-radius: 0.563rem; +} + +.content-action-wrapper::-webkit-scrollbar { + width: theme(digitv2.spacers.spacer2); + background-color: theme(digitv2.lightTheme.generic-background); +} + + +.content-action-wrapper::-webkit-scrollbar-track { + background-color: theme(digitv2.lightTheme.generic-background); + border-radius: 0.563rem; +} + +.content-action-wrapper::-webkit-scrollbar-thumb { + background-color: theme(digitv2.lightTheme.generic-divider); + border-radius: 0.563rem; +} \ No newline at end of file diff --git a/react/css/src/digitv2/components/formCardV2.scss b/react/css/src/digitv2/components/formCardV2.scss index 9f9f23961e..13bb2c6151 100644 --- a/react/css/src/digitv2/components/formCardV2.scss +++ b/react/css/src/digitv2/components/formCardV2.scss @@ -107,6 +107,20 @@ } } + &.with-divider{ + @media (min-width: 48rem) { + grid-column-gap: theme(digitv2.spacers.spacer12); + } + + @media (min-width: 30.063rem) and (max-width: 47.938rem) { + grid-column-gap: theme(digitv2.spacers.spacer10); + } + + @media (max-width: 30rem) { + grid-column-gap: theme(digitv2.spacers.spacer8); + } + } + .digit-label-field-pair { margin-bottom: unset; } @@ -178,25 +192,41 @@ .vertical-formcard-divider{ position: absolute; + height: 100%; @media (max-aspect-ratio: 9/16) { /* Media query for mobile */ top: theme(digitv2.spacers.spacer4); - height: calc(100% - 2rem); + /*height: calc(100% - 2rem);*/ } @media (min-aspect-ratio: 9/16) and (max-aspect-ratio: 3/4) { /* Media query for tablets */ top: theme(digitv2.spacers.spacer5); - height: calc(100% - 2.5rem); + /*height: calc(100% - 2.5rem);*/ } @media (min-aspect-ratio: 3/4) { /* Media query for desktop */ top: theme(digitv2.spacers.spacer6); - height: calc(100% - 3rem); + /*height: calc(100% - 3rem);*/ } border: 0.063rem solid theme(digitv2.lightTheme.generic-divider); z-index: 1; } +} + + +.digit-form-card-content::-webkit-scrollbar { + width: theme(digitv2.spacers.spacer2); + background-color: theme(digitv2.lightTheme.generic-background); +} +.digit-form-card-content::-webkit-scrollbar-track { + background-color: theme(digitv2.lightTheme.generic-background); + border-radius: 0.563rem; +} + +.digit-form-card-content::-webkit-scrollbar-thumb { + background-color: theme(digitv2.lightTheme.generic-divider); + border-radius: 0.563rem; } \ No newline at end of file diff --git a/react/css/src/digitv2/components/labelFieldPairV2.scss b/react/css/src/digitv2/components/labelFieldPairV2.scss index 73c3aef7e8..00bd0c84cb 100644 --- a/react/css/src/digitv2/components/labelFieldPairV2.scss +++ b/react/css/src/digitv2/components/labelFieldPairV2.scss @@ -19,9 +19,26 @@ gap: theme(digitv2.spacers.spacer6); } + .digit-text-block-wrap { + margin-top: 0.565rem; + } + + .digit-radio-options-wrap { + margin-top: 0.565rem; + } + &.vertical { @apply flex-col items-start; gap: theme(digitv2.spacers.spacer2); + + .digit-text-block-wrap { + margin-top: theme(digitv2.spacers.spacer0); + } + + .digit-radio-options-wrap { + margin-top: theme(digitv2.spacers.spacer0); + } + } & .label, diff --git a/react/css/src/digitv2/components/popUpV2.scss b/react/css/src/digitv2/components/popUpV2.scss index 5594455a62..68dd91566b 100644 --- a/react/css/src/digitv2/components/popUpV2.scss +++ b/react/css/src/digitv2/components/popUpV2.scss @@ -21,7 +21,9 @@ display: flex; top: 50%; left: 50%; - transform: translate(-50%, -50%); + transform: translate(-50%, -50%) scale(0); + opacity: 0; + animation: scaleIn 300ms ease-in-out forwards; @media (min-width: 48rem) { max-height: 86%; @@ -360,6 +362,10 @@ } } +.digit-popup-wrapper.closing{ + animation: scaleOut 300ms ease-in-out forwards; +} + .digit-popup-children-wrap::-webkit-scrollbar { width: theme(digitv2.spacers.spacer2); background-color: theme(digitv2.lightTheme.generic-background); @@ -373,4 +379,26 @@ .digit-popup-children-wrap::-webkit-scrollbar-thumb { background-color: theme(digitv2.lightTheme.generic-divider); border-radius: 0.563rem; -} \ No newline at end of file +} + +@keyframes popupscaleIn { + 0% { + transform: translate(-50%, -50%) scale(0); + opacity: 0; + } + 100% { + transform: translate(-50%, -50%) scale(1); + opacity: 1; + } +} + +@keyframes popupscaleOut { + 0% { + transform: translate(-50%, -50%) scale(1); + opacity: 1; + } + 100% { + transform: translate(-50%, -50%) scale(0); + opacity: 0; + } +} diff --git a/react/css/src/digitv2/components/radiobtnV2.scss b/react/css/src/digitv2/components/radiobtnV2.scss index fd3dc73511..bf22da68a3 100644 --- a/react/css/src/digitv2/components/radiobtnV2.scss +++ b/react/css/src/digitv2/components/radiobtnV2.scss @@ -12,6 +12,10 @@ @apply block mb-md; } + &.vertical{ + flex-direction: column + } + .digit-radio-btn-wrap { @apply block float-left relative; diff --git a/react/css/src/digitv2/components/slideOverMenuV2.scss b/react/css/src/digitv2/components/slideOverMenuV2.scss index bcaeba5c17..bef178cee5 100644 --- a/react/css/src/digitv2/components/slideOverMenuV2.scss +++ b/react/css/src/digitv2/components/slideOverMenuV2.scss @@ -6,9 +6,8 @@ z-index: 1000; overflow: hidden; border: 0.063rem solid theme(digitv2.lightTheme.generic-divider); - background: #FAFAFA; + background: theme(digitv2.lightTheme.paper-secondary); box-shadow: -0.125rem -0.25rem 0.356rem 0rem #00000026; - } .digit-slider-container.left { @@ -56,7 +55,7 @@ border-radius: 50%; z-index: 1001; display: flex; - gap:theme(digitv2.spacers.spacer1); + gap: theme(digitv2.spacers.spacer1); align-items: center; .scroll-bar { @@ -64,15 +63,16 @@ width: theme(digitv2.spacers.spacer2); border-radius: 0.563rem; background-color: #D9D9D9; - } .slider-handler-svg { - background: #FFFFFF; + background: theme(digitv2.lightTheme.paper-primary); box-shadow: 0rem 0.063rem 0.125rem 0rem #00000029; width: theme(digitv2.spacers.spacer8); - height:theme(digitv2.spacers.spacer8); - + height: 3.25rem; + display: flex !important; + align-items: center; + border: 0.063rem solid theme(digitv2.lightTheme.generic-divider); } &.dynamic { @@ -105,6 +105,15 @@ flex-shrink: 0; padding: theme(digitv2.spacers.spacer4); border-bottom: 0.063rem solid #d6d5d4; + + .close-icon { + cursor: pointer; + position: absolute; + top: theme(digitv2.spacers.spacer2); + right: theme(digitv2.spacers.spacer2); + width: theme(digitv2.spacers.spacer8); + height: theme(digitv2.spacers.spacer8); + } } .slider-section { @@ -166,6 +175,14 @@ font-weight: theme(digitv2.fontWeight.regular); line-height: theme(digitv2.lineHeight.lineheight2); } + + &.with-sections { + padding: theme(digitv2.spacers.spacer0); + + .slider-section { + padding: theme(digitv2.spacers.spacer4); + } + } } diff --git a/react/css/src/digitv2/components/stepperV2.scss b/react/css/src/digitv2/components/stepperV2.scss index 665ebbaa50..05f432acf6 100644 --- a/react/css/src/digitv2/components/stepperV2.scss +++ b/react/css/src/digitv2/components/stepperV2.scss @@ -163,7 +163,7 @@ &.vertical { top: calc(50% + (theme(digitv2.spacers.spacer2))); bottom: calc(-50% + (theme(digitv2.spacers.spacer2))); - left: -(theme(digitv2.spacers.spacer12)); + left: -3.1rem; width: 0.125rem; height: auto; transform: rotate(90deg); @@ -173,10 +173,20 @@ border-color: theme(digitv2.lightTheme.primary-1); } @media (max-aspect-ratio: 9/16) { - left: -2.75rem; + left: -3.65rem; + min-width: 4.313rem; + max-width: 16.875rem; + top: 0.875rem; } @media (min-aspect-ratio: 9/16) and (max-aspect-ratio: 3/4) { left: -3.5rem; + min-width: 6.313rem; + max-width: 39.438rem; + } + + @media (min-aspect-ratio: 3/4) { + min-width: 5.313rem; + max-width: 82.688rem; } } } diff --git a/react/css/src/digitv2/components/timelineV2.scss b/react/css/src/digitv2/components/timelineV2.scss index a4b1739abc..1d63c9ac38 100644 --- a/react/css/src/digitv2/components/timelineV2.scss +++ b/react/css/src/digitv2/components/timelineV2.scss @@ -128,6 +128,26 @@ .timeline-additional-elements-column { @apply flex flex-col items-start; + @extend .typography.body-s; + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.normal); + font-weight: theme(digitv2.fontWeight.regular); + line-height: theme(digitv2.lineHeight.lineheight2); + + @media (max-aspect-ratio: 9/16) { + /* Media query for mobile */ + font-size: theme(digitv2.fontSize.body-s.mobile); + } + + @media (min-aspect-ratio: 9/16) and (max-aspect-ratio: 3/4) { + /* Media query for tablets */ + font-size: theme(digitv2.fontSize.body-s.tablet); + } + + @media (min-aspect-ratio: 3/4) { + /* Media query for desktop */ + font-size: theme(digitv2.fontSize.body-s.desktop); + } gap: theme(digitv2.spacers.spacer4); .timeline-individual-element { diff --git a/react/css/src/digitv2/components/tooltipwrapperV2.scss b/react/css/src/digitv2/components/tooltipwrapperV2.scss index 5a52470560..7d3d3dcf0f 100644 --- a/react/css/src/digitv2/components/tooltipwrapperV2.scss +++ b/react/css/src/digitv2/components/tooltipwrapperV2.scss @@ -3,7 +3,7 @@ display: inline-block; } -.tooltip-content{ +.tooltip-content { position: absolute; background-color: theme(digitv2.lightTheme.generic-inputborder); color: theme(digitv2.lightTheme.paper-primary); @@ -16,7 +16,7 @@ display: flex; justify-content: center; flex-direction: column; - gap:0.625rem; + gap: 0.625rem; min-width: 4.125rem; max-width: 14.563rem; @@ -37,8 +37,14 @@ font-size: theme(digitv2.fontSize.body-s.desktop); } + &.light { + color: theme(digitv2.lightTheme.text-primary); + background-color: theme(digitv2.lightTheme.paper-secondary); + box-shadow: 0rem 0.063rem 0.125rem 0rem #36363629; + border: 0.063rem solid theme(digitv2.lightTheme.generic-divider); + } - .tooltip-header{ + .tooltip-header { @extend .typography.heading-s; font-family: theme(digitv2.fontFamily.sans); font-style: theme(digitv2.fontStyle.normal); @@ -59,12 +65,29 @@ /* Media query for desktop */ font-size: theme(digitv2.fontSize.heading-s.desktop); } + color: theme(digitv2.lightTheme.paper-primary); + + &.light { + color: theme(digitv2.lightTheme.text-primary); + } } - .tooltip-description{ + .tooltip-data{ + width: 100%; + display: flex; + align-items: center; + justify-content: flex-start; + flex-direction: column + } + + .tooltip-description { @extend .typography.body-xs; color: theme(digitv2.lightTheme.paper-primary); + + &.light { + color: theme(digitv2.lightTheme.text-primary); + } } } @@ -72,7 +95,7 @@ top: theme(digitv2.spacers.spacer12); left: 0; - &.with-arrow{ + &.with-arrow { border-top-left-radius: theme(digitv2.spacers.spacer0); } @@ -88,7 +111,7 @@ top: theme(digitv2.spacers.spacer12); right: 0; - &.with-arrow{ + &.with-arrow { border-top-right-radius: 0px; } } @@ -97,7 +120,7 @@ bottom: theme(digitv2.spacers.spacer12); left: 0; - &.with-arrow{ + &.with-arrow { border-bottom-left-radius: theme(digitv2.spacers.spacer0); } } @@ -113,7 +136,7 @@ bottom: theme(digitv2.spacers.spacer12); right: 0; - &.with-arrow{ + &.with-arrow { border-bottom-right-radius: theme(digitv2.spacers.spacer0); } } @@ -122,7 +145,7 @@ right: calc(100% + theme(digitv2.spacers.spacer2)); top: 0; - &.with-arrow{ + &.with-arrow { border-top-right-radius: theme(digitv2.spacers.spacer0); } } @@ -137,7 +160,7 @@ right: calc(100% + theme(digitv2.spacers.spacer2)); bottom: 0; - &.with-arrow{ + &.with-arrow { border-bottom-right-radius: theme(digitv2.spacers.spacer0); } } @@ -146,7 +169,7 @@ left: calc(100% + theme(digitv2.spacers.spacer2)); top: 0; - &.with-arrow{ + &.with-arrow { border-top-left-radius: theme(digitv2.spacers.spacer0); } } @@ -161,23 +184,27 @@ left: calc(100% + theme(digitv2.spacers.spacer2)); bottom: 0; - &.with-arrow{ + &.with-arrow { border-bottom-left-radius: theme(digitv2.spacers.spacer0); } -} +} -.tooltip-bottom-start.with-arrow:before{ +.tooltip-bottom-start.with-arrow:before { content: ""; position: absolute; top: -0.5rem; - left:theme(digitv2.spacers.spacer1); + left: theme(digitv2.spacers.spacer1); transform: translateX(-50%); border-bottom: theme(digitv2.spacers.spacer2) solid theme(digitv2.lightTheme.generic-inputborder); - border-right:theme(digitv2.spacers.spacer2) solid transparent; + border-right: theme(digitv2.spacers.spacer2) solid transparent; +} + +.tooltip-bottom-start.with-arrow.light:before { + border-bottom: theme(digitv2.spacers.spacer2) solid theme(digitv2.lightTheme.paper-secondary); } -.tooltip-bottom.with-arrow:before{ +.tooltip-bottom.with-arrow:before { content: ""; position: absolute; top: -0.5rem; @@ -188,19 +215,25 @@ border-right: theme(digitv2.spacers.spacer1) solid transparent; } +.tooltip-bottom.with-arrow.light:before { + border-bottom: theme(digitv2.spacers.spacer2) solid theme(digitv2.lightTheme.paper-secondary); +} .tooltip-bottom-end.with-arrow:before { content: ""; position: absolute; top: -0.5rem; - left:calc(100% -0.25rem); + left: calc(100% -0.25rem); transform: translateX(-50%); - border-bottom:theme(digitv2.spacers.spacer2) solid theme(digitv2.lightTheme.generic-inputborder); + border-bottom: theme(digitv2.spacers.spacer2) solid theme(digitv2.lightTheme.generic-inputborder); border-left: theme(digitv2.spacers.spacer2) solid transparent; } +.tooltip-bottom-end.with-arrow.light:before { + border-bottom: theme(digitv2.spacers.spacer2) solid theme(digitv2.lightTheme.paper-secondary); +} -.tooltip-top-start.with-arrow:before{ +.tooltip-top-start.with-arrow:before { content: ""; position: absolute; bottom: -0.5rem; @@ -210,7 +243,11 @@ border-right: theme(digitv2.spacers.spacer2) solid transparent; } -.tooltip-top.with-arrow:before{ +.tooltip-top-start.with-arrow.light:before { + border-top: theme(digitv2.spacers.spacer2) solid theme(digitv2.lightTheme.paper-secondary); +} + +.tooltip-top.with-arrow:before { content: ""; position: absolute; bottom: -0.5rem; @@ -221,18 +258,25 @@ border-right: theme(digitv2.spacers.spacer1) solid transparent; } +.tooltip-top.with-arrow.light:before { + border-top: theme(digitv2.spacers.spacer2) solid theme(digitv2.lightTheme.paper-secondary); +} + .tooltip-top-end.with-arrow:before { content: ""; position: absolute; bottom: -0.5rem; - left:calc(100% -0.25rem); + left: calc(100% -0.25rem); transform: translateX(-50%); border-top: theme(digitv2.spacers.spacer2) solid theme(digitv2.lightTheme.generic-inputborder); border-left: theme(digitv2.spacers.spacer2) solid transparent; } +.tooltip-top-end.with-arrow.light:before { + border-top: theme(digitv2.spacers.spacer2) solid theme(digitv2.lightTheme.paper-secondary); +} -.tooltip-left-start.with-arrow:before{ +.tooltip-left-start.with-arrow:before { content: ""; position: absolute; top: theme(digitv2.spacers.spacer1); @@ -242,6 +286,11 @@ transform: translateY(-50%); } +.tooltip-left-start.with-arrow.light:before { + border-left: theme(digitv2.spacers.spacer2) solid theme(digitv2.lightTheme.paper-secondary); + +} + .tooltip-left.with-arrow:before { content: ""; position: absolute; @@ -253,17 +302,26 @@ transform: translateY(-50%); } +.tooltip-left.with-arrow.light:before { + border-left: theme(digitv2.spacers.spacer2) solid theme(digitv2.lightTheme.paper-secondary); +} + .tooltip-left-end.with-arrow:before { content: ""; position: absolute; - top:calc(100% -0.25rem); + top: calc(100% -0.25rem); right: -0.45rem; border-left: theme(digitv2.spacers.spacer2) solid theme(digitv2.lightTheme.generic-inputborder); border-top: theme(digitv2.spacers.spacer2) solid transparent; transform: translateY(-50%); } -.tooltip-right-start.with-arrow:before{ +.tooltip-left-end.with-arrow.light:before { + border-left: theme(digitv2.spacers.spacer2) solid theme(digitv2.lightTheme.paper-secondary); + +} + +.tooltip-right-start.with-arrow:before { content: ""; position: absolute; top: theme(digitv2.spacers.spacer1); @@ -273,7 +331,11 @@ transform: translateY(-50%); } -.tooltip-right.with-arrow:before{ +.tooltip-right-start.with-arrow.light:before { + border-right: theme(digitv2.spacers.spacer2) solid theme(digitv2.lightTheme.paper-secondary); +} + +.tooltip-right.with-arrow:before { content: ""; position: absolute; top: 50%; @@ -284,13 +346,20 @@ transform: translateY(-50%); } +.tooltip-right.with-arrow.light:before { + border-right: theme(digitv2.spacers.spacer2) solid theme(digitv2.lightTheme.paper-secondary); +} .tooltip-right-end.with-arrow:before { content: ""; position: absolute; - top:calc(100% -0.25rem); + top: calc(100% -0.25rem); left: -0.45rem; border-right: theme(digitv2.spacers.spacer2) solid theme(digitv2.lightTheme.generic-inputborder); border-top: theme(digitv2.spacers.spacer2) solid transparent; transform: translateY(-50%); +} + +.tooltip-right-end.with-arrow.light:before { + border-right: theme(digitv2.spacers.spacer2) solid theme(digitv2.lightTheme.paper-secondary); } \ No newline at end of file diff --git a/react/css/src/digitv2/components/viewCardV2.scss b/react/css/src/digitv2/components/viewCardV2.scss new file mode 100644 index 0000000000..172156a81c --- /dev/null +++ b/react/css/src/digitv2/components/viewCardV2.scss @@ -0,0 +1,100 @@ +.digit-view-card { + .digit-view-card-header { + @extend .typography.heading-l; + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.normal); + font-weight: theme(digitv2.fontWeight.bold); + line-height: theme(digitv2.lineHeight.lineheight1); + + @media (max-aspect-ratio: 9/16) { + /* Media query for mobile */ + font-size: theme(digitv2.fontSize.heading-l.mobile); + } + + @media (min-aspect-ratio: 9/16) and (max-aspect-ratio: 3/4) { + /* Media query for tablets */ + font-size: theme(digitv2.fontSize.heading-l.tablet); + } + + @media (min-aspect-ratio: 3/4) { + /* Media query for desktop */ + font-size: theme(digitv2.fontSize.heading-l.desktop); + } + + padding-bottom: theme(digitv2.spacers.spacer2); + color: theme(digitv2.lightTheme.text-primary); + line-height: normal; + + @media (max-width: 30rem) { + padding-bottom: theme(digitv2.spacers.spacer1); + } + } + + .digit-view-card-subheader { + @extend .typography.heading-m; + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.normal); + font-weight: theme(digitv2.fontWeight.bold); + line-height: theme(digitv2.lineHeight.lineheight1); + + @media (max-aspect-ratio: 9/16) { + /* Media query for mobile */ + font-size: theme(digitv2.fontSize.heading-m.mobile); + } + + @media (min-aspect-ratio: 9/16) and (max-aspect-ratio: 3/4) { + /* Media query for tablets */ + font-size: theme(digitv2.fontSize.heading-m.tablet); + } + + @media (min-aspect-ratio: 3/4) { + /* Media query for desktop */ + font-size: theme(digitv2.fontSize.heading-m.desktop); + } + + color: theme(digitv2.lightTheme.primary-2); + line-height: normal; + } + + .view-card-field-pairs { + display: flex; + flex-direction: column; + gap: theme(digitv2.spacers.spacer4); + position: relative; + + &.two-column-layout { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: theme(digitv2.spacers.spacer4); + + &.with-divider{ + grid-column-gap:theme(digitv2.spacers.spacer8); + } + } + + .vertical-viewcard-divider { + position: absolute; + height: 100%; + border: 0.063rem solid theme(digitv2.lightTheme.generic-divider); + z-index: 1; + } + } +} + +.seperate-card-sections { + display: flex; + flex-direction: column; + + @media (min-aspect-ratio: 9/16) and (max-aspect-ratio: 3/4) { + gap: theme(digitv2.spacers.spacer5); + } + + @media (min-aspect-ratio: 3/4) { + gap: theme(digitv2.spacers.spacer6); + } + + @media (max-aspect-ratio: 9/16) { + gap: theme(digitv2.spacers.spacer4); + } + +} \ No newline at end of file diff --git a/react/css/src/digitv2/index.scss b/react/css/src/digitv2/index.scss index 1ab3ed9c83..fbf7328c25 100644 --- a/react/css/src/digitv2/index.scss +++ b/react/css/src/digitv2/index.scss @@ -50,6 +50,8 @@ @import url("./components/slideOverMenuV2.scss"); @import url("./components/metricCardV2.scss"); @import url("./components/formCardV2.scss"); +@import url("./components/filterCardV2.scss"); +@import url("./components/viewCardV2.scss"); /* pages */ @import url("./pages/employee/index.scss"); diff --git a/react/example/package.json b/react/example/package.json index 3d49b906f1..e66ed78d59 100644 --- a/react/example/package.json +++ b/react/example/package.json @@ -10,14 +10,14 @@ "build": "webpack --mode production" }, "dependencies": { - "@egovernments/digit-ui-components": "0.0.2-beta.43", + "@egovernments/digit-ui-components": "0.0.2-beta.44", "@egovernments/digit-ui-libraries": "1.8.2-beta.1", "@egovernments/digit-ui-module-common": "1.7.10", "@egovernments/digit-ui-module-core": "1.8.1-beta.6", "@egovernments/digit-ui-module-project": "0.3.4", "@egovernments/digit-ui-module-sample": "0.0.1", "@egovernments/digit-ui-react-components": "1.7.10", - "@egovernments/digit-ui-svg-components": "1.0.11", + "@egovernments/digit-ui-svg-components": "1.0.12", "http-proxy-middleware": "^1.0.5", "react": "17.0.2", "react-dom": "17.0.2", diff --git a/react/example/public/index.html b/react/example/public/index.html index fa8d0bd778..b6ae7921a9 100644 --- a/react/example/public/index.html +++ b/react/example/public/index.html @@ -9,7 +9,7 @@ rel='stylesheet' type='text/css'> diff --git a/react/modules/core/package.json b/react/modules/core/package.json index eb8b002022..210529510b 100644 --- a/react/modules/core/package.json +++ b/react/modules/core/package.json @@ -14,7 +14,7 @@ "prepublish": "yarn build" }, "dependencies": { - "@egovernments/digit-ui-components": "0.0.2-beta.43", + "@egovernments/digit-ui-components": "0.0.2-beta.44", "@egovernments/digit-ui-react-components": "1.8.1-beta.4", "react": "17.0.2", "react-dom": "17.0.2", diff --git a/react/modules/sample/package.json b/react/modules/sample/package.json index 469c865f16..90484c345b 100644 --- a/react/modules/sample/package.json +++ b/react/modules/sample/package.json @@ -19,7 +19,7 @@ }, "dependencies": { "@egovernments/digit-ui-react-components": "1.8.1-beta.4", - "@egovernments/digit-ui-components": "0.0.2-beta.43", + "@egovernments/digit-ui-components": "0.0.2-beta.44", "react": "17.0.2", "react-date-range": "^1.4.0", "react-dom": "17.0.2", diff --git a/react/package.json b/react/package.json index 469601c249..a6b1e4664d 100644 --- a/react/package.json +++ b/react/package.json @@ -79,13 +79,13 @@ "@babel/plugin-syntax-jsx": "^7.24.1", "@babel/preset-react": "^7.24.1", "@egovernments/digit-ui-libraries": "1.8.2-beta.1", - "@egovernments/digit-ui-components-css":"0.0.2-beta.36", + "@egovernments/digit-ui-components-css":"0.0.2-beta.37", "@egovernments/digit-ui-module-core": "1.8.1-beta.6", "@egovernments/digit-ui-module-project": "0.3.4", "@egovernments/digit-ui-module-sample": "0.0.1", "@egovernments/digit-ui-react-components": "1.7.10", - "@egovernments/digit-ui-svg-components": "1.0.11", - "@egovernments/digit-ui-components": "0.0.2-beta.43", + "@egovernments/digit-ui-svg-components": "1.0.12", + "@egovernments/digit-ui-components": "0.0.2-beta.44", "babel-loader": "8.1.0", "clean-webpack-plugin": "4.0.0", "css-loader": "5.2.6", diff --git a/react/ui-components/.storybook/preview-head.html b/react/ui-components/.storybook/preview-head.html index 6b43182f38..0ec7ad21d4 100644 --- a/react/ui-components/.storybook/preview-head.html +++ b/react/ui-components/.storybook/preview-head.html @@ -1,6 +1,6 @@ - + diff --git a/react/ui-components/CHANGELOG.md b/react/ui-components/CHANGELOG.md index aea863de33..a76146cea6 100644 --- a/react/ui-components/CHANGELOG.md +++ b/react/ui-components/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.0.2-beta.44] - 2024-10-07 +### New Changes +- Added NestedTable, FilterCard and FormCards + ## [0.0.2-beta.42] - 2024-09-23 ### New Changes - Added Table Molecule diff --git a/react/ui-components/package.json b/react/ui-components/package.json index 7bbd4ca6fb..50dca2e627 100644 --- a/react/ui-components/package.json +++ b/react/ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-components", - "version": "0.0.2-beta.43", + "version": "0.0.2-beta.44", "license": "MIT", "main": "dist/index.js", "module": "dist/index.modern.js", @@ -51,9 +51,9 @@ "dist" ], "dependencies": { - "@egovernments/digit-ui-components-css": "0.0.2-beta.36", + "@egovernments/digit-ui-components-css": "0.0.2-beta.37", "@egovernments/digit-ui-libraries": "1.8.1-beta.1", - "@egovernments/digit-ui-svg-components": "1.0.11", + "@egovernments/digit-ui-svg-components": "1.0.12", "@googlemaps/js-api-loader": "1.13.10", "autoprefixer": "^10.4.15", "postcss-flexbugs-fixes": "^5.0.2", diff --git a/react/ui-components/public/index.html b/react/ui-components/public/index.html index a89374948e..05fdd2a87e 100644 --- a/react/ui-components/public/index.html +++ b/react/ui-components/public/index.html @@ -7,7 +7,7 @@ - +