@uipath/apollo-wind 2.80.1 → 2.82.0
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/components/ui/calendar.cjs +5 -2
- package/dist/components/ui/calendar.d.ts +1 -1
- package/dist/components/ui/calendar.js +5 -2
- package/dist/components/ui/date-picker.cjs +27 -14
- package/dist/components/ui/date-picker.d.ts +16 -0
- package/dist/components/ui/date-picker.js +28 -15
- package/dist/components/ui/datetime-picker.cjs +41 -28
- package/dist/components/ui/datetime-picker.d.ts +13 -0
- package/dist/components/ui/datetime-picker.js +42 -29
- package/dist/components/ui/editable-cell.cjs +5 -1
- package/dist/components/ui/editable-cell.js +5 -1
- package/dist/components/ui/index.cjs +176 -163
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.js +1 -0
- package/dist/components/ui/locale-provider.cjs +124 -0
- package/dist/components/ui/locale-provider.d.ts +57 -0
- package/dist/components/ui/locale-provider.js +78 -0
- package/dist/components/ui/quick-form-field/quick-form-field.cjs +3 -1
- package/dist/components/ui/quick-form-field/quick-form-field.js +3 -1
- package/dist/components/ui/quick-form-field/utils.cjs +2 -2
- package/dist/components/ui/quick-form-field/utils.d.ts +2 -1
- package/dist/components/ui/quick-form-field/utils.js +2 -2
- package/dist/components/ui/time-field.cjs +191 -0
- package/dist/components/ui/time-field.d.ts +24 -0
- package/dist/components/ui/time-field.js +157 -0
- package/dist/index.cjs +18 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +3 -1
- package/dist/lib/date-locale.cjs +184 -0
- package/dist/lib/date-locale.d.ts +31 -0
- package/dist/lib/date-locale.js +129 -0
- package/dist/styles.css +23 -0
- package/package.json +8 -8
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { format } from "date-fns";
|
|
2
|
+
import { enUS } from "date-fns/locale/en-US";
|
|
3
|
+
const LOADERS = new Map([
|
|
4
|
+
[
|
|
5
|
+
'en',
|
|
6
|
+
()=>import("react-day-picker/locale/en-US").then((m)=>m.enUS)
|
|
7
|
+
],
|
|
8
|
+
[
|
|
9
|
+
'de',
|
|
10
|
+
()=>import("react-day-picker/locale/de").then((m)=>m.de)
|
|
11
|
+
],
|
|
12
|
+
[
|
|
13
|
+
'es',
|
|
14
|
+
()=>import("react-day-picker/locale/es").then((m)=>m.es)
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
'fr',
|
|
18
|
+
()=>import("react-day-picker/locale/fr").then((m)=>m.fr)
|
|
19
|
+
],
|
|
20
|
+
[
|
|
21
|
+
'ja',
|
|
22
|
+
()=>import("react-day-picker/locale/ja").then((m)=>m.ja)
|
|
23
|
+
],
|
|
24
|
+
[
|
|
25
|
+
'ko',
|
|
26
|
+
()=>import("react-day-picker/locale/ko").then((m)=>m.ko)
|
|
27
|
+
],
|
|
28
|
+
[
|
|
29
|
+
'pt',
|
|
30
|
+
()=>import("react-day-picker/locale/pt").then((m)=>m.pt)
|
|
31
|
+
],
|
|
32
|
+
[
|
|
33
|
+
'pt-br',
|
|
34
|
+
()=>import("react-day-picker/locale/pt-BR").then((m)=>m.ptBR)
|
|
35
|
+
],
|
|
36
|
+
[
|
|
37
|
+
'ro',
|
|
38
|
+
()=>import("react-day-picker/locale/ro").then((m)=>m.ro)
|
|
39
|
+
],
|
|
40
|
+
[
|
|
41
|
+
'ru',
|
|
42
|
+
()=>import("react-day-picker/locale/ru").then((m)=>m.ru)
|
|
43
|
+
],
|
|
44
|
+
[
|
|
45
|
+
'tr',
|
|
46
|
+
()=>import("react-day-picker/locale/tr").then((m)=>m.tr)
|
|
47
|
+
],
|
|
48
|
+
[
|
|
49
|
+
'zh',
|
|
50
|
+
()=>import("react-day-picker/locale/zh-CN").then((m)=>m.zhCN)
|
|
51
|
+
],
|
|
52
|
+
[
|
|
53
|
+
'zh-cn',
|
|
54
|
+
()=>import("react-day-picker/locale/zh-CN").then((m)=>m.zhCN)
|
|
55
|
+
],
|
|
56
|
+
[
|
|
57
|
+
'zh-tw',
|
|
58
|
+
()=>import("react-day-picker/locale/zh-TW").then((m)=>m.zhTW)
|
|
59
|
+
]
|
|
60
|
+
]);
|
|
61
|
+
const loaded = new Map();
|
|
62
|
+
const pending = new Map();
|
|
63
|
+
function loaderKey(tag) {
|
|
64
|
+
const normalized = tag.trim().replace(/_/g, '-').toLowerCase();
|
|
65
|
+
if (LOADERS.has(normalized)) return normalized;
|
|
66
|
+
const base = normalized.split('-')[0];
|
|
67
|
+
return LOADERS.has(base) ? base : void 0;
|
|
68
|
+
}
|
|
69
|
+
function getLoadedDateLocale(tag) {
|
|
70
|
+
const key = loaderKey(tag);
|
|
71
|
+
return key ? loaded.get(key) : void 0;
|
|
72
|
+
}
|
|
73
|
+
function loadDateLocale(tag) {
|
|
74
|
+
const key = loaderKey(tag);
|
|
75
|
+
const load = key ? LOADERS.get(key) : void 0;
|
|
76
|
+
if (!key || !load) return Promise.resolve(void 0);
|
|
77
|
+
const done = loaded.get(key);
|
|
78
|
+
if (done) return Promise.resolve(done);
|
|
79
|
+
let promise = pending.get(key);
|
|
80
|
+
if (!promise) {
|
|
81
|
+
promise = load().then((locale)=>{
|
|
82
|
+
loaded.set(key, locale);
|
|
83
|
+
return locale;
|
|
84
|
+
}).catch(()=>void 0).finally(()=>pending.delete(key));
|
|
85
|
+
pending.set(key, promise);
|
|
86
|
+
}
|
|
87
|
+
return promise;
|
|
88
|
+
}
|
|
89
|
+
function patternTokens(pattern) {
|
|
90
|
+
return pattern.replace(/'[^']*'/g, '');
|
|
91
|
+
}
|
|
92
|
+
function localeTimePattern(locale) {
|
|
93
|
+
return locale?.formatLong?.time({
|
|
94
|
+
width: 'short'
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function isTwelveHourPattern(pattern) {
|
|
98
|
+
return /[hK]/.test(patternTokens(pattern));
|
|
99
|
+
}
|
|
100
|
+
function resolveUse12Hour(use12Hour, locale) {
|
|
101
|
+
if (void 0 !== use12Hour) return use12Hour;
|
|
102
|
+
const native = localeTimePattern(locale);
|
|
103
|
+
return native ? isTwelveHourPattern(native) : false;
|
|
104
|
+
}
|
|
105
|
+
function timePattern(locale, use12Hour) {
|
|
106
|
+
const native = localeTimePattern(locale);
|
|
107
|
+
if (native && (void 0 === use12Hour || isTwelveHourPattern(native) === use12Hour)) return native;
|
|
108
|
+
return use12Hour ? 'hh:mm a' : 'HH:mm';
|
|
109
|
+
}
|
|
110
|
+
function formatLongDate(date, locale) {
|
|
111
|
+
return format(date, 'PPP', {
|
|
112
|
+
locale
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
function formatMediumDate(date, locale) {
|
|
116
|
+
return format(date, 'PP', {
|
|
117
|
+
locale
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
function formatDateTime(date, locale, use12Hour) {
|
|
121
|
+
const join = (locale ?? enUS).formatLong.dateTime({
|
|
122
|
+
width: 'long'
|
|
123
|
+
});
|
|
124
|
+
const pattern = join.replace('{{date}}', 'PPP').replace('{{time}}', timePattern(locale, use12Hour));
|
|
125
|
+
return format(date, pattern, {
|
|
126
|
+
locale
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
export { formatDateTime, formatLongDate, formatMediumDate, getLoadedDateLocale, isTwelveHourPattern, loadDateLocale, localeTimePattern, resolveUse12Hour };
|
package/dist/styles.css
CHANGED
|
@@ -1646,6 +1646,9 @@
|
|
|
1646
1646
|
.w-\[1px\] {
|
|
1647
1647
|
width: 1px;
|
|
1648
1648
|
}
|
|
1649
|
+
.w-\[2\.5ch\] {
|
|
1650
|
+
width: 2.5ch;
|
|
1651
|
+
}
|
|
1649
1652
|
.w-\[2px\] {
|
|
1650
1653
|
width: 2px;
|
|
1651
1654
|
}
|
|
@@ -5162,6 +5165,9 @@
|
|
|
5162
5165
|
.underline-offset-4 {
|
|
5163
5166
|
text-underline-offset: 4px;
|
|
5164
5167
|
}
|
|
5168
|
+
.caret-transparent {
|
|
5169
|
+
caret-color: transparent;
|
|
5170
|
+
}
|
|
5165
5171
|
.accent-brand {
|
|
5166
5172
|
accent-color: var(--brand);
|
|
5167
5173
|
}
|
|
@@ -7540,6 +7546,16 @@
|
|
|
7540
7546
|
}
|
|
7541
7547
|
}
|
|
7542
7548
|
}
|
|
7549
|
+
.has-disabled\:cursor-not-allowed {
|
|
7550
|
+
&:has(*:disabled) {
|
|
7551
|
+
cursor: not-allowed;
|
|
7552
|
+
}
|
|
7553
|
+
}
|
|
7554
|
+
.has-disabled\:opacity-50 {
|
|
7555
|
+
&:has(*:disabled) {
|
|
7556
|
+
opacity: 50%;
|
|
7557
|
+
}
|
|
7558
|
+
}
|
|
7543
7559
|
.has-data-\[slot\=attachment-content\]\:w-30 {
|
|
7544
7560
|
&:has(*[data-slot="attachment-content"]) {
|
|
7545
7561
|
width: calc(var(--spacing) * 30);
|
|
@@ -9191,6 +9207,13 @@
|
|
|
9191
9207
|
}
|
|
9192
9208
|
}
|
|
9193
9209
|
}
|
|
9210
|
+
.future\:focus-within\:ring-primary {
|
|
9211
|
+
:is(.future-dark, .future-light) & {
|
|
9212
|
+
&:focus-within {
|
|
9213
|
+
--tw-ring-color: var(--primary);
|
|
9214
|
+
}
|
|
9215
|
+
}
|
|
9216
|
+
}
|
|
9194
9217
|
.future\:focus-within\:ring-offset-2 {
|
|
9195
9218
|
:is(.future-dark, .future-light) & {
|
|
9196
9219
|
&:focus-within {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/apollo-wind",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.82.0",
|
|
4
4
|
"description": "UiPath wind design system - A Tailwind CSS based React component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"tailwind-merge": "^3.4.0",
|
|
133
133
|
"tailwindcss": "^4.1.17",
|
|
134
134
|
"vaul": "^1.1.2",
|
|
135
|
-
"zod": "^4.
|
|
135
|
+
"zod": "^4.6.6",
|
|
136
136
|
"@uipath/apollo-core": "5.15.2"
|
|
137
137
|
},
|
|
138
138
|
"devDependencies": {
|
|
@@ -146,11 +146,11 @@
|
|
|
146
146
|
"@rslib/core": "^0.19.6",
|
|
147
147
|
"@semantic-release/changelog": "^6.0.3",
|
|
148
148
|
"@semantic-release/git": "^10.0.1",
|
|
149
|
-
"@storybook/addon-a11y": "^10.
|
|
150
|
-
"@storybook/addon-docs": "^10.
|
|
151
|
-
"@storybook/addon-links": "^10.
|
|
149
|
+
"@storybook/addon-a11y": "^10.6.2",
|
|
150
|
+
"@storybook/addon-docs": "^10.6.2",
|
|
151
|
+
"@storybook/addon-links": "^10.6.2",
|
|
152
152
|
"@storybook/addon-mcp": "^0.2.2",
|
|
153
|
-
"@storybook/react-vite": "^10.
|
|
153
|
+
"@storybook/react-vite": "^10.6.2",
|
|
154
154
|
"@tailwindcss/cli": "^4.1.17",
|
|
155
155
|
"@testing-library/dom": "^10.4.1",
|
|
156
156
|
"@testing-library/jest-dom": "^6.9.1",
|
|
@@ -174,9 +174,9 @@
|
|
|
174
174
|
"react-dom": "19.2.3",
|
|
175
175
|
"react-scan": "^0.5.3",
|
|
176
176
|
"semantic-release": "^25.0.3",
|
|
177
|
-
"storybook": "^10.
|
|
177
|
+
"storybook": "^10.6.2",
|
|
178
178
|
"typescript": "^5.9.3",
|
|
179
|
-
"vitest": "^4.1.
|
|
179
|
+
"vitest": "^4.1.12"
|
|
180
180
|
},
|
|
181
181
|
"keywords": [
|
|
182
182
|
"react",
|