@uniformdev/design-system 20.35.1-alpha.188 → 20.35.1-alpha.228
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/esm/index.js +13 -1
- package/dist/index.js +13 -1
- package/package.json +6 -6
package/dist/esm/index.js
CHANGED
|
@@ -7824,6 +7824,12 @@ var DateTimePickerVariant = /* @__PURE__ */ ((DateTimePickerVariant2) => {
|
|
|
7824
7824
|
// src/components/DateTimePicker/DateTimePicker.tsx
|
|
7825
7825
|
import { jsx as jsx65, jsxs as jsxs43 } from "@emotion/react/jsx-runtime";
|
|
7826
7826
|
var timeZoneOptions = typeof Intl !== "undefined" && typeof Intl.supportedValuesOf === "function" ? Intl.supportedValuesOf("timeZone") : ["Etc/UTC"];
|
|
7827
|
+
function getTimezoneOffset(tz) {
|
|
7828
|
+
const now = /* @__PURE__ */ new Date();
|
|
7829
|
+
const utcDate = new Date(now.toLocaleString("en-US", { timeZone: "UTC" }));
|
|
7830
|
+
const tzDate = new Date(now.toLocaleString("en-US", { timeZone: tz }));
|
|
7831
|
+
return (tzDate.getTime() - utcDate.getTime()) / 6e4;
|
|
7832
|
+
}
|
|
7827
7833
|
var TIMEZONE_OPTIONS = timeZoneOptions.map((v) => {
|
|
7828
7834
|
let tz = v;
|
|
7829
7835
|
if (tz === "Europe/Kiev") {
|
|
@@ -7831,8 +7837,14 @@ var TIMEZONE_OPTIONS = timeZoneOptions.map((v) => {
|
|
|
7831
7837
|
}
|
|
7832
7838
|
return {
|
|
7833
7839
|
label: getTimeZoneLabel(tz),
|
|
7834
|
-
value: tz
|
|
7840
|
+
value: tz,
|
|
7841
|
+
offset: getTimezoneOffset(tz)
|
|
7835
7842
|
};
|
|
7843
|
+
}).sort((a, b) => {
|
|
7844
|
+
if (a.offset !== b.offset) {
|
|
7845
|
+
return a.offset - b.offset;
|
|
7846
|
+
}
|
|
7847
|
+
return a.value.localeCompare(b.value);
|
|
7836
7848
|
});
|
|
7837
7849
|
var DateTimePickerContext = createContext2({
|
|
7838
7850
|
clearValue() {
|
package/dist/index.js
CHANGED
|
@@ -9632,6 +9632,12 @@ var DateTimePickerVariant = /* @__PURE__ */ ((DateTimePickerVariant2) => {
|
|
|
9632
9632
|
// src/components/DateTimePicker/DateTimePicker.tsx
|
|
9633
9633
|
var import_jsx_runtime65 = require("@emotion/react/jsx-runtime");
|
|
9634
9634
|
var timeZoneOptions = typeof Intl !== "undefined" && typeof Intl.supportedValuesOf === "function" ? Intl.supportedValuesOf("timeZone") : ["Etc/UTC"];
|
|
9635
|
+
function getTimezoneOffset(tz) {
|
|
9636
|
+
const now = /* @__PURE__ */ new Date();
|
|
9637
|
+
const utcDate = new Date(now.toLocaleString("en-US", { timeZone: "UTC" }));
|
|
9638
|
+
const tzDate = new Date(now.toLocaleString("en-US", { timeZone: tz }));
|
|
9639
|
+
return (tzDate.getTime() - utcDate.getTime()) / 6e4;
|
|
9640
|
+
}
|
|
9635
9641
|
var TIMEZONE_OPTIONS = timeZoneOptions.map((v) => {
|
|
9636
9642
|
let tz = v;
|
|
9637
9643
|
if (tz === "Europe/Kiev") {
|
|
@@ -9639,8 +9645,14 @@ var TIMEZONE_OPTIONS = timeZoneOptions.map((v) => {
|
|
|
9639
9645
|
}
|
|
9640
9646
|
return {
|
|
9641
9647
|
label: getTimeZoneLabel(tz),
|
|
9642
|
-
value: tz
|
|
9648
|
+
value: tz,
|
|
9649
|
+
offset: getTimezoneOffset(tz)
|
|
9643
9650
|
};
|
|
9651
|
+
}).sort((a, b) => {
|
|
9652
|
+
if (a.offset !== b.offset) {
|
|
9653
|
+
return a.offset - b.offset;
|
|
9654
|
+
}
|
|
9655
|
+
return a.value.localeCompare(b.value);
|
|
9644
9656
|
});
|
|
9645
9657
|
var DateTimePickerContext = (0, import_react79.createContext)({
|
|
9646
9658
|
clearValue() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/design-system",
|
|
3
|
-
"version": "20.35.1-alpha.
|
|
3
|
+
"version": "20.35.1-alpha.228+26f6f414c9",
|
|
4
4
|
"description": "Uniform design system components",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"exports": {
|
|
@@ -38,15 +38,15 @@
|
|
|
38
38
|
"@storybook/theming": "^8.3.3",
|
|
39
39
|
"@types/react": "19.2.2",
|
|
40
40
|
"@types/react-dom": "19.2.2",
|
|
41
|
-
"@uniformdev/canvas": "^20.35.1-alpha.
|
|
42
|
-
"@uniformdev/richtext": "^20.35.1-alpha.
|
|
41
|
+
"@uniformdev/canvas": "^20.35.1-alpha.228+26f6f414c9",
|
|
42
|
+
"@uniformdev/richtext": "^20.35.1-alpha.228+26f6f414c9",
|
|
43
43
|
"autoprefixer": "10.4.21",
|
|
44
44
|
"hygen": "6.2.11",
|
|
45
45
|
"jsdom": "20.0.3",
|
|
46
46
|
"nwsapi": "2.2.2",
|
|
47
47
|
"postcss": "8.5.3",
|
|
48
|
-
"react": "19.2.
|
|
49
|
-
"react-dom": "19.2.
|
|
48
|
+
"react": "19.2.1",
|
|
49
|
+
"react-dom": "19.2.1",
|
|
50
50
|
"react-select-event": "^5.5.1",
|
|
51
51
|
"tsup": "8.3.0"
|
|
52
52
|
},
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"publishConfig": {
|
|
92
92
|
"access": "public"
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "26f6f414c9725e8e36785bcf51e62e8b15331f2e"
|
|
95
95
|
}
|