@landtrustinc/design-system 1.2.42 → 1.2.44
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/dist/index.d.ts +21 -1
- package/dist/index.js +28 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import React__default, { SVGProps, HTMLAttributes, FC, PropsWithChildren, ReactN
|
|
|
5
5
|
import * as _emotion_styled from '@emotion/styled';
|
|
6
6
|
import * as csstype from 'csstype';
|
|
7
7
|
import * as styled_system from 'styled-system';
|
|
8
|
-
import { BorderProps, SpaceProps, ColorProps, FlexboxProps, GridProps as GridProps$1, LayoutProps, PositionProps, TypographyProps, WidthProps } from 'styled-system';
|
|
8
|
+
import { BorderProps, SpaceProps, ColorProps, FlexboxProps, GridProps as GridProps$1, LayoutProps, PositionProps, TypographyProps, WidthProps, TLengthStyledSystem } from 'styled-system';
|
|
9
9
|
import * as _emotion_react from '@emotion/react';
|
|
10
10
|
import { Interpolation, Theme } from '@emotion/react';
|
|
11
11
|
|
|
@@ -2016,6 +2016,18 @@ type TimerProps = {
|
|
|
2016
2016
|
* Additional CSS class names
|
|
2017
2017
|
*/
|
|
2018
2018
|
className?: string;
|
|
2019
|
+
/**
|
|
2020
|
+
* Text to display before the time left
|
|
2021
|
+
*/
|
|
2022
|
+
fontSize?: TTextSize;
|
|
2023
|
+
/**
|
|
2024
|
+
* Font weight of the text
|
|
2025
|
+
*/
|
|
2026
|
+
fontWeight?: TFontWeight;
|
|
2027
|
+
/**
|
|
2028
|
+
* Color of the text
|
|
2029
|
+
*/
|
|
2030
|
+
showSeconds?: boolean;
|
|
2019
2031
|
};
|
|
2020
2032
|
declare const Timer: FC<TimerProps>;
|
|
2021
2033
|
|
|
@@ -2355,6 +2367,14 @@ type ProgressBarProps = {
|
|
|
2355
2367
|
* Additional CSS class names
|
|
2356
2368
|
*/
|
|
2357
2369
|
className?: string;
|
|
2370
|
+
/**
|
|
2371
|
+
* Height of the progress bar
|
|
2372
|
+
*/
|
|
2373
|
+
height?: TLengthStyledSystem;
|
|
2374
|
+
/**
|
|
2375
|
+
* Kind of the progress bar
|
|
2376
|
+
*/
|
|
2377
|
+
kind?: 'rounded' | 'square';
|
|
2358
2378
|
};
|
|
2359
2379
|
declare const ProgressBar: FC<ProgressBarProps>;
|
|
2360
2380
|
|
package/dist/index.js
CHANGED
|
@@ -7835,15 +7835,20 @@ var progressStyles = import_react49.css`
|
|
|
7835
7835
|
|
|
7836
7836
|
// src/ProgressBar/ProgressBar.tsx
|
|
7837
7837
|
var import_jsx_runtime242 = require("@emotion/react/jsx-runtime");
|
|
7838
|
-
var ProgressBar = ({
|
|
7838
|
+
var ProgressBar = ({
|
|
7839
|
+
progress,
|
|
7840
|
+
className,
|
|
7841
|
+
kind = "rounded",
|
|
7842
|
+
height = "10px"
|
|
7843
|
+
}) => {
|
|
7839
7844
|
const clampedProgress = Math.min(100, Math.max(0, progress));
|
|
7840
7845
|
return /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
|
|
7841
7846
|
Box_default,
|
|
7842
7847
|
{
|
|
7843
7848
|
width: "100%",
|
|
7844
|
-
height
|
|
7849
|
+
height,
|
|
7845
7850
|
backgroundColor: "var(--color-primary-100)",
|
|
7846
|
-
borderRadius: "48px",
|
|
7851
|
+
borderRadius: kind === "rounded" ? "48px" : "0px",
|
|
7847
7852
|
overflow: "hidden",
|
|
7848
7853
|
position: "relative",
|
|
7849
7854
|
className,
|
|
@@ -7851,7 +7856,7 @@ var ProgressBar = ({ progress, className }) => {
|
|
|
7851
7856
|
Box_default,
|
|
7852
7857
|
{
|
|
7853
7858
|
height: "100%",
|
|
7854
|
-
borderRadius: "48px",
|
|
7859
|
+
borderRadius: kind === "rounded" ? "48px" : "0px",
|
|
7855
7860
|
backgroundColor: "var(--color-primary-900)",
|
|
7856
7861
|
css: progressStyles,
|
|
7857
7862
|
style: { width: `${clampedProgress}%` },
|
|
@@ -7901,7 +7906,10 @@ var Timer = ({
|
|
|
7901
7906
|
expirationTimestamp,
|
|
7902
7907
|
onTimeUpdate,
|
|
7903
7908
|
onExpire,
|
|
7904
|
-
className
|
|
7909
|
+
className,
|
|
7910
|
+
fontSize = "md",
|
|
7911
|
+
fontWeight = "bold",
|
|
7912
|
+
showSeconds = false
|
|
7905
7913
|
}) => {
|
|
7906
7914
|
const [timeLeft, setTimeLeft] = (0, import_react51.useState)(
|
|
7907
7915
|
() => calculateTimeLeft(expirationTimestamp)
|
|
@@ -7931,14 +7939,21 @@ var Timer = ({
|
|
|
7931
7939
|
if (!timeLeft) {
|
|
7932
7940
|
return null;
|
|
7933
7941
|
}
|
|
7934
|
-
return /* @__PURE__ */ (0, import_jsx_runtime243.
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
|
|
7938
|
-
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
|
|
7942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)(Box_default, { css: rootStyles2, className, children: [
|
|
7943
|
+
/* @__PURE__ */ (0, import_jsx_runtime243.jsxs)(Text_default, { as: "span", fontWeight, size: fontSize, children: [
|
|
7944
|
+
timeLeft.days,
|
|
7945
|
+
"d : ",
|
|
7946
|
+
timeLeft.hours,
|
|
7947
|
+
"h : ",
|
|
7948
|
+
timeLeft.minutes,
|
|
7949
|
+
"m"
|
|
7950
|
+
] }),
|
|
7951
|
+
showSeconds && /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)(Text_default, { as: "span", fontWeight, size: fontSize, children: [
|
|
7952
|
+
"\xA0: ",
|
|
7953
|
+
timeLeft.seconds,
|
|
7954
|
+
"s"
|
|
7955
|
+
] })
|
|
7956
|
+
] });
|
|
7942
7957
|
};
|
|
7943
7958
|
Timer.displayName = "Timer";
|
|
7944
7959
|
var Timer_default = Timer;
|