design-zystem 1.0.271 → 1.0.273
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.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +21 -2
- package/dist/index.mjs +21 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1076,6 +1076,7 @@ declare const Timeline: ({ items, lineColor, emptyLabel, }: TimelineProps) => re
|
|
|
1076
1076
|
* - type:
|
|
1077
1077
|
* - "date": locale short date (ex: 16/05/2024)
|
|
1078
1078
|
* - "dateTime": locale short date + time (24h)
|
|
1079
|
+
* - "dateTimeSeconds": DD/MM/YY + time with seconds (24h) (ex: 16/05/24 14:32:07)
|
|
1079
1080
|
* - "weekday": short weekday + day + month (year only if different)
|
|
1080
1081
|
* - "weekdayDay": short weekday + day
|
|
1081
1082
|
* - "weekdayYear": short weekday + day + month + year
|
package/dist/index.d.ts
CHANGED
|
@@ -1076,6 +1076,7 @@ declare const Timeline: ({ items, lineColor, emptyLabel, }: TimelineProps) => re
|
|
|
1076
1076
|
* - type:
|
|
1077
1077
|
* - "date": locale short date (ex: 16/05/2024)
|
|
1078
1078
|
* - "dateTime": locale short date + time (24h)
|
|
1079
|
+
* - "dateTimeSeconds": DD/MM/YY + time with seconds (24h) (ex: 16/05/24 14:32:07)
|
|
1079
1080
|
* - "weekday": short weekday + day + month (year only if different)
|
|
1080
1081
|
* - "weekdayDay": short weekday + day
|
|
1081
1082
|
* - "weekdayYear": short weekday + day + month + year
|
package/dist/index.js
CHANGED
|
@@ -1640,7 +1640,12 @@ var import_react7 = require("react");
|
|
|
1640
1640
|
var import_styled_components13 = __toESM(require("styled-components"));
|
|
1641
1641
|
|
|
1642
1642
|
// src/Components/Toast/toastStore.ts
|
|
1643
|
-
var
|
|
1643
|
+
var DEFAULT_TIMEOUT_BY_TYPE = {
|
|
1644
|
+
success: 2e3,
|
|
1645
|
+
info: 2e3,
|
|
1646
|
+
warning: 4e3,
|
|
1647
|
+
error: 5e3
|
|
1648
|
+
};
|
|
1644
1649
|
var toasts = [];
|
|
1645
1650
|
var nextId = 0;
|
|
1646
1651
|
var listeners = /* @__PURE__ */ new Set();
|
|
@@ -1665,7 +1670,7 @@ var pushToast = (type, message, options = {}) => {
|
|
|
1665
1670
|
type,
|
|
1666
1671
|
message,
|
|
1667
1672
|
title: options.title,
|
|
1668
|
-
timeOut: (_a = options.timeOut) != null ? _a :
|
|
1673
|
+
timeOut: (_a = options.timeOut) != null ? _a : DEFAULT_TIMEOUT_BY_TYPE[type]
|
|
1669
1674
|
}
|
|
1670
1675
|
];
|
|
1671
1676
|
emitChange();
|
|
@@ -6121,6 +6126,12 @@ var formatDate = (dateString, type = "date", language = "en") => {
|
|
|
6121
6126
|
minute: "2-digit",
|
|
6122
6127
|
hourCycle: "h23"
|
|
6123
6128
|
}).format(date);
|
|
6129
|
+
const formatTimeWithSeconds = () => new Intl.DateTimeFormat(locale, {
|
|
6130
|
+
hour: "2-digit",
|
|
6131
|
+
minute: "2-digit",
|
|
6132
|
+
second: "2-digit",
|
|
6133
|
+
hourCycle: "h23"
|
|
6134
|
+
}).format(date);
|
|
6124
6135
|
switch (type) {
|
|
6125
6136
|
case "date":
|
|
6126
6137
|
return format({ day: "2-digit", month: "2-digit", year: "numeric" });
|
|
@@ -6132,6 +6143,14 @@ var formatDate = (dateString, type = "date", language = "en") => {
|
|
|
6132
6143
|
});
|
|
6133
6144
|
return `${dayPart} ${formatTime2()}`;
|
|
6134
6145
|
}
|
|
6146
|
+
case "dateTimeSeconds": {
|
|
6147
|
+
const dayPart = format({
|
|
6148
|
+
day: "2-digit",
|
|
6149
|
+
month: "2-digit",
|
|
6150
|
+
year: "2-digit"
|
|
6151
|
+
});
|
|
6152
|
+
return `${dayPart} ${formatTimeWithSeconds()}`;
|
|
6153
|
+
}
|
|
6135
6154
|
case "dateISO": {
|
|
6136
6155
|
const year = date.getFullYear();
|
|
6137
6156
|
const month = String(date.getMonth() + 1).padStart(2, "0");
|
package/dist/index.mjs
CHANGED
|
@@ -1504,7 +1504,12 @@ import { useCallback as useCallback2, useEffect as useEffect5, useState as useSt
|
|
|
1504
1504
|
import styled13, { keyframes } from "styled-components";
|
|
1505
1505
|
|
|
1506
1506
|
// src/Components/Toast/toastStore.ts
|
|
1507
|
-
var
|
|
1507
|
+
var DEFAULT_TIMEOUT_BY_TYPE = {
|
|
1508
|
+
success: 2e3,
|
|
1509
|
+
info: 2e3,
|
|
1510
|
+
warning: 4e3,
|
|
1511
|
+
error: 5e3
|
|
1512
|
+
};
|
|
1508
1513
|
var toasts = [];
|
|
1509
1514
|
var nextId = 0;
|
|
1510
1515
|
var listeners = /* @__PURE__ */ new Set();
|
|
@@ -1529,7 +1534,7 @@ var pushToast = (type, message, options = {}) => {
|
|
|
1529
1534
|
type,
|
|
1530
1535
|
message,
|
|
1531
1536
|
title: options.title,
|
|
1532
|
-
timeOut: (_a = options.timeOut) != null ? _a :
|
|
1537
|
+
timeOut: (_a = options.timeOut) != null ? _a : DEFAULT_TIMEOUT_BY_TYPE[type]
|
|
1533
1538
|
}
|
|
1534
1539
|
];
|
|
1535
1540
|
emitChange();
|
|
@@ -6005,6 +6010,12 @@ var formatDate = (dateString, type = "date", language = "en") => {
|
|
|
6005
6010
|
minute: "2-digit",
|
|
6006
6011
|
hourCycle: "h23"
|
|
6007
6012
|
}).format(date);
|
|
6013
|
+
const formatTimeWithSeconds = () => new Intl.DateTimeFormat(locale, {
|
|
6014
|
+
hour: "2-digit",
|
|
6015
|
+
minute: "2-digit",
|
|
6016
|
+
second: "2-digit",
|
|
6017
|
+
hourCycle: "h23"
|
|
6018
|
+
}).format(date);
|
|
6008
6019
|
switch (type) {
|
|
6009
6020
|
case "date":
|
|
6010
6021
|
return format({ day: "2-digit", month: "2-digit", year: "numeric" });
|
|
@@ -6016,6 +6027,14 @@ var formatDate = (dateString, type = "date", language = "en") => {
|
|
|
6016
6027
|
});
|
|
6017
6028
|
return `${dayPart} ${formatTime2()}`;
|
|
6018
6029
|
}
|
|
6030
|
+
case "dateTimeSeconds": {
|
|
6031
|
+
const dayPart = format({
|
|
6032
|
+
day: "2-digit",
|
|
6033
|
+
month: "2-digit",
|
|
6034
|
+
year: "2-digit"
|
|
6035
|
+
});
|
|
6036
|
+
return `${dayPart} ${formatTimeWithSeconds()}`;
|
|
6037
|
+
}
|
|
6019
6038
|
case "dateISO": {
|
|
6020
6039
|
const year = date.getFullYear();
|
|
6021
6040
|
const month = String(date.getMonth() + 1).padStart(2, "0");
|