@twentyfirstmedia/ui-core 0.2.1 → 0.3.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/admin.d.ts.map +1 -1
- package/dist/components/admin.js +95 -71
- package/dist/components/admin.js.map +1 -1
- package/dist/components/agents.d.ts.map +1 -1
- package/dist/components/agents.js +49 -35
- package/dist/components/agents.js.map +1 -1
- package/dist/components/app-chrome.d.ts.map +1 -1
- package/dist/components/app-chrome.js +6 -2
- package/dist/components/app-chrome.js.map +1 -1
- package/dist/components/approvals.d.ts.map +1 -1
- package/dist/components/approvals.js +22 -18
- package/dist/components/approvals.js.map +1 -1
- package/dist/components/building-blocks.d.ts.map +1 -1
- package/dist/components/building-blocks.js +6 -2
- package/dist/components/building-blocks.js.map +1 -1
- package/dist/components/charts.d.ts.map +1 -1
- package/dist/components/charts.js +20 -10
- package/dist/components/charts.js.map +1 -1
- package/dist/components/chat.d.ts.map +1 -1
- package/dist/components/chat.js +31 -19
- package/dist/components/chat.js.map +1 -1
- package/dist/components/commerce.d.ts +2 -2
- package/dist/components/commerce.d.ts.map +1 -1
- package/dist/components/commerce.js +45 -31
- package/dist/components/commerce.js.map +1 -1
- package/dist/components/data-display.d.ts +5 -9
- package/dist/components/data-display.d.ts.map +1 -1
- package/dist/components/data-display.js +34 -35
- package/dist/components/data-display.js.map +1 -1
- package/dist/components/data-table.d.ts.map +1 -1
- package/dist/components/data-table.js +15 -10
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/developer.d.ts.map +1 -1
- package/dist/components/developer.js +20 -11
- package/dist/components/developer.js.map +1 -1
- package/dist/components/feedback.d.ts.map +1 -1
- package/dist/components/feedback.js +12 -6
- package/dist/components/feedback.js.map +1 -1
- package/dist/components/form.d.ts +2 -1
- package/dist/components/form.d.ts.map +1 -1
- package/dist/components/form.js +12 -9
- package/dist/components/form.js.map +1 -1
- package/dist/components/forms.d.ts +2 -1
- package/dist/components/forms.d.ts.map +1 -1
- package/dist/components/forms.js +92 -42
- package/dist/components/forms.js.map +1 -1
- package/dist/components/foundation.d.ts +5 -2
- package/dist/components/foundation.d.ts.map +1 -1
- package/dist/components/foundation.js +15 -12
- package/dist/components/foundation.js.map +1 -1
- package/dist/components/inputs.d.ts.map +1 -1
- package/dist/components/inputs.js +3 -1
- package/dist/components/inputs.js.map +1 -1
- package/dist/components/mail.d.ts.map +1 -1
- package/dist/components/mail.js +15 -10
- package/dist/components/mail.js.map +1 -1
- package/dist/components/media.d.ts.map +1 -1
- package/dist/components/media.js +39 -18
- package/dist/components/media.js.map +1 -1
- package/dist/components/navigation.d.ts.map +1 -1
- package/dist/components/navigation.js +21 -9
- package/dist/components/navigation.js.map +1 -1
- package/dist/components/operations.d.ts.map +1 -1
- package/dist/components/operations.js +37 -27
- package/dist/components/operations.js.map +1 -1
- package/dist/components/previews.d.ts.map +1 -1
- package/dist/components/previews.js +14 -10
- package/dist/components/previews.js.map +1 -1
- package/dist/components/primitives.d.ts.map +1 -1
- package/dist/components/primitives.js +4 -1
- package/dist/components/primitives.js.map +1 -1
- package/dist/components/real-estate.d.ts.map +1 -1
- package/dist/components/real-estate.js +43 -28
- package/dist/components/real-estate.js.map +1 -1
- package/dist/components/rich-text-editor.d.ts.map +1 -1
- package/dist/components/rich-text-editor.js +18 -15
- package/dist/components/rich-text-editor.js.map +1 -1
- package/dist/components/select-menu.d.ts.map +1 -1
- package/dist/components/select-menu.js +4 -1
- package/dist/components/select-menu.js.map +1 -1
- package/dist/components/shell.d.ts.map +1 -1
- package/dist/components/shell.js +8 -3
- package/dist/components/shell.js.map +1 -1
- package/dist/components/site.d.ts.map +1 -1
- package/dist/components/site.js +17 -13
- package/dist/components/site.js.map +1 -1
- package/dist/components/types.d.ts +102 -3
- package/dist/components/types.d.ts.map +1 -1
- package/dist/components/workspace.d.ts.map +1 -1
- package/dist/components/workspace.js +50 -34
- package/dist/components/workspace.js.map +1 -1
- package/dist/context.d.ts +39 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +76 -0
- package/dist/context.js.map +1 -0
- package/dist/format.d.ts +33 -6
- package/dist/format.d.ts.map +1 -1
- package/dist/format.js +75 -10
- package/dist/format.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/provider.d.ts +18 -11
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +11 -18
- package/dist/provider.js.map +1 -1
- package/dist/strings.d.ts +503 -0
- package/dist/strings.d.ts.map +1 -0
- package/dist/strings.js +537 -0
- package/dist/strings.js.map +1 -0
- package/package.json +1 -1
- package/src/components/admin.tsx +117 -93
- package/src/components/agents.tsx +55 -41
- package/src/components/app-chrome.tsx +6 -2
- package/src/components/approvals.tsx +26 -22
- package/src/components/building-blocks.tsx +6 -2
- package/src/components/charts.tsx +21 -11
- package/src/components/chat.tsx +45 -35
- package/src/components/commerce.tsx +61 -53
- package/src/components/data-display.tsx +38 -45
- package/src/components/data-table.tsx +20 -15
- package/src/components/developer.tsx +26 -15
- package/src/components/feedback.tsx +19 -7
- package/src/components/form.tsx +17 -9
- package/src/components/forms.tsx +131 -53
- package/src/components/foundation.tsx +23 -36
- package/src/components/inputs.tsx +4 -2
- package/src/components/mail.tsx +16 -11
- package/src/components/media.tsx +64 -21
- package/src/components/navigation.tsx +25 -13
- package/src/components/operations.tsx +40 -32
- package/src/components/previews.tsx +17 -15
- package/src/components/primitives.tsx +8 -5
- package/src/components/real-estate.tsx +55 -35
- package/src/components/rich-text-editor.tsx +20 -17
- package/src/components/select-menu.tsx +5 -2
- package/src/components/shell.tsx +8 -3
- package/src/components/site.tsx +18 -14
- package/src/components/types.ts +111 -3
- package/src/components/workspace.tsx +79 -60
- package/src/context.ts +112 -0
- package/src/format.ts +108 -15
- package/src/index.ts +43 -0
- package/src/provider.tsx +36 -40
- package/src/strings.ts +1500 -0
package/dist/format.js
CHANGED
|
@@ -1,39 +1,104 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Numbers, money, percentages and dates, formatted with Intl
|
|
3
|
-
*
|
|
2
|
+
* Numbers, money, percentages and dates, formatted with Intl. English (en-US) by default; every
|
|
3
|
+
* helper takes an optional BCP 47 locale as its last argument, and components use the locale of
|
|
4
|
+
* the nearest `UIProvider` (see `useFormat`). Money defaults to euros; calendars start on Monday.
|
|
4
5
|
*/
|
|
5
6
|
export const LOCALE = "en-US";
|
|
6
7
|
export const CURRENCY = "EUR";
|
|
7
8
|
/** First day of the week in calendars: 0 Sunday … 6 Saturday. */
|
|
8
9
|
export const WEEK_START = 1;
|
|
9
|
-
export function formatNumber(v, o) {
|
|
10
|
+
export function formatNumber(v, o, locale) {
|
|
10
11
|
try {
|
|
11
|
-
return new Intl.NumberFormat(LOCALE, o).format(v);
|
|
12
|
+
return new Intl.NumberFormat(locale || LOCALE, o).format(v);
|
|
12
13
|
}
|
|
13
14
|
catch {
|
|
14
15
|
return String(v);
|
|
15
16
|
}
|
|
16
17
|
}
|
|
17
|
-
export function formatMoney(v, currency, o) {
|
|
18
|
+
export function formatMoney(v, currency, o, locale) {
|
|
18
19
|
return formatNumber(v, {
|
|
19
20
|
style: "currency",
|
|
20
21
|
currency: currency || CURRENCY,
|
|
21
22
|
minimumFractionDigits: v % 1 ? 2 : 0,
|
|
22
23
|
maximumFractionDigits: 2,
|
|
23
24
|
...o,
|
|
24
|
-
});
|
|
25
|
+
}, locale);
|
|
25
26
|
}
|
|
26
27
|
/** A share in percent: `19` → "19%". */
|
|
27
|
-
export function formatPercent(v, o) {
|
|
28
|
-
return formatNumber(v / 100, { style: "percent", maximumFractionDigits: 0, ...o });
|
|
28
|
+
export function formatPercent(v, o, locale) {
|
|
29
|
+
return formatNumber(v / 100, { style: "percent", maximumFractionDigits: 0, ...o }, locale);
|
|
29
30
|
}
|
|
30
|
-
export function formatDate(input, o) {
|
|
31
|
+
export function formatDate(input, o, locale) {
|
|
31
32
|
const d = input instanceof Date ? input : new Date(input);
|
|
32
33
|
try {
|
|
33
|
-
return new Intl.DateTimeFormat(LOCALE, o || { day: "2-digit", month: "2-digit", year: "numeric" }).format(d);
|
|
34
|
+
return new Intl.DateTimeFormat(locale || LOCALE, o || { day: "2-digit", month: "2-digit", year: "numeric" }).format(d);
|
|
34
35
|
}
|
|
35
36
|
catch {
|
|
36
37
|
return d.toDateString();
|
|
37
38
|
}
|
|
38
39
|
}
|
|
40
|
+
/** The group and decimal separators of a locale: `en-US` → `{ group: ",", decimal: "." }`. */
|
|
41
|
+
export function numberSeparators(locale) {
|
|
42
|
+
let group = ",", decimal = ".";
|
|
43
|
+
try {
|
|
44
|
+
for (const part of new Intl.NumberFormat(locale || LOCALE).formatToParts(12345.6)) {
|
|
45
|
+
if (part.type === "group")
|
|
46
|
+
group = part.value;
|
|
47
|
+
else if (part.type === "decimal")
|
|
48
|
+
decimal = part.value;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
// keep the English separators
|
|
53
|
+
}
|
|
54
|
+
return { group, decimal };
|
|
55
|
+
}
|
|
56
|
+
const escape = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
57
|
+
/**
|
|
58
|
+
* Finds the first number in a string formatted for `locale` and returns it with the text around
|
|
59
|
+
* it: `parseFormatted("13,05 €/m²", "de-DE")` → `{ prefix: "", value: 13.05, decimals: 2, … }`.
|
|
60
|
+
* Group separators are only taken between digits; a space or no-break space counts as a group
|
|
61
|
+
* separator for locales that group with one.
|
|
62
|
+
*/
|
|
63
|
+
export function parseFormatted(input, locale) {
|
|
64
|
+
if (typeof input === "number") {
|
|
65
|
+
if (!Number.isFinite(input))
|
|
66
|
+
return null;
|
|
67
|
+
const s = String(input);
|
|
68
|
+
if (/e/i.test(s))
|
|
69
|
+
return null;
|
|
70
|
+
return {
|
|
71
|
+
prefix: "",
|
|
72
|
+
value: input,
|
|
73
|
+
decimals: (s.split(".")[1] || "").length,
|
|
74
|
+
grouped: false,
|
|
75
|
+
suffix: "",
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
const { group, decimal } = numberSeparators(locale);
|
|
79
|
+
// narrow and regular no-break spaces both appear as group separators (fr, de-CH …)
|
|
80
|
+
const groups = /^\s$/.test(group) ? "[\\s\\u00a0\\u202f]" : escape(group);
|
|
81
|
+
const re = new RegExp(`^([^0-9-]*)(-?[0-9](?:[0-9]|${groups}(?=[0-9]))*)(?:${escape(decimal)}([0-9]+))?(.*)$`, "s");
|
|
82
|
+
const m = re.exec(input);
|
|
83
|
+
if (!m)
|
|
84
|
+
return null;
|
|
85
|
+
const int = m[2].replace(new RegExp(groups, "g"), "");
|
|
86
|
+
const frac = m[3] ?? "";
|
|
87
|
+
return {
|
|
88
|
+
prefix: m[1] ?? "",
|
|
89
|
+
value: parseFloat(frac ? `${int}.${frac}` : int),
|
|
90
|
+
decimals: frac.length,
|
|
91
|
+
grouped: int.length !== m[2].length,
|
|
92
|
+
suffix: m[4] ?? "",
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
/** Writes a number back in the shape `parseFormatted` found it in (same decimals, grouping, text). */
|
|
96
|
+
export function formatLike(v, shape, locale) {
|
|
97
|
+
const s = formatNumber(v, {
|
|
98
|
+
minimumFractionDigits: shape.decimals,
|
|
99
|
+
maximumFractionDigits: shape.decimals,
|
|
100
|
+
useGrouping: shape.grouped,
|
|
101
|
+
}, locale);
|
|
102
|
+
return shape.prefix + s + shape.suffix;
|
|
103
|
+
}
|
|
39
104
|
//# sourceMappingURL=format.js.map
|
package/dist/format.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.js","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"format.js","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC;AAC9B,MAAM,CAAC,MAAM,QA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;AACJ,CAAC;AAED,sGAAsG;AACtG,MAAM,UAAU,UAAU,CAAC,CAAS,EAAE,KAAsB,EAAE,MAAe;IAC3E,MAAM,CAAC,GAAG,YAAY,CACpB,CAAC,EACD;QACE,qBAAqB,EAAE,KAAK,CAAC,QAAQ;QACrC,qBAAqB,EAAE,KAAK,CAAC,QAAQ;QACrC,WAAW,EAAE,KAAK,CAAC,OAAO;KAC3B,EACD,MAAM,CACP,CAAC;IACF,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;AACzC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { cx, durationToken, initials, reduced } from "./cx.js";
|
|
2
|
-
export { formatNumber, formatPercent, formatMoney, formatDate, LOCALE, CURRENCY, WEEK_START, } from "./format.js";
|
|
3
|
-
export {
|
|
2
|
+
export { formatNumber, formatPercent, formatMoney, formatDate, formatLike, parseFormatted, numberSeparators, LOCALE, CURRENCY, WEEK_START, type FormattedNumber, } from "./format.js";
|
|
3
|
+
export { DEFAULT_STRINGS, SHARED_STRINGS, ADMIN_STRINGS, AGENTS_STRINGS, APP_CHROME_STRINGS, APPROVALS_STRINGS, BUILDING_BLOCKS_STRINGS, CHARTS_STRINGS, CHAT_STRINGS, COMMERCE_STRINGS, DATA_DISPLAY_STRINGS, DATA_TABLE_STRINGS, DEVELOPER_STRINGS, FEEDBACK_STRINGS, FORM_STRINGS, FORMS_STRINGS, MAIL_STRINGS, MEDIA_STRINGS, NAVIGATION_STRINGS, OPERATIONS_STRINGS, PREVIEWS_STRINGS, PRIMITIVES_STRINGS, REAL_ESTATE_STRINGS, RICH_TEXT_EDITOR_STRINGS, SELECT_MENU_STRINGS, SHELL_STRINGS, SITE_STRINGS, WORKSPACE_STRINGS, mergeStrings, mergeMessages, type UIStrings, type UIMessages, } from "./strings.js";
|
|
4
|
+
export { UIProvider, useUI, useUIStrings, useStrings, useFormat, formattersFor, type Formatters, type UIProviderProps, type UIContextValue, type Kit, type Theme, type Density, type Motion, } from "./provider.js";
|
|
4
5
|
export { Portal } from "./portal.js";
|
|
5
6
|
export { startViewTransition, useMotion } from "./motion.js";
|
|
6
7
|
export { usePresence, leaving, type Presence } from "./presence.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EACL,YAAY,EACZ,aAAa,EACb,WAAW,EACX,UAAU,EACV,MAAM,EACN,QAAQ,EACR,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EACL,YAAY,EACZ,aAAa,EACb,WAAW,EACX,UAAU,EACV,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,MAAM,EACN,QAAQ,EACR,UAAU,EACV,KAAK,eAAe,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,eAAe,EACf,cAAc,EACd,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,KAAK,SAAS,EACd,KAAK,UAAU,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,UAAU,EACV,KAAK,EACL,YAAY,EACZ,UAAU,EACV,SAAS,EACT,aAAa,EACb,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,GAAG,EACR,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,MAAM,GACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EACL,UAAU,EACV,aAAa,EACb,QAAQ,EACR,UAAU,EACV,aAAa,EACb,UAAU,EACV,aAAa,EACb,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,eAAe,GACrB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,SAAS,EACT,aAAa,EACb,KAAK,EACL,aAAa,EACb,cAAc,EACd,UAAU,EACV,UAAU,EACV,OAAO,EACP,QAAQ,GACT,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,KAAK,EACL,eAAe,EACf,SAAS,EACT,eAAe,EACf,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,SAAS,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AACjD,cAAc,uBAAuB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { cx, durationToken, initials, reduced } from "./cx.js";
|
|
2
|
-
export { formatNumber, formatPercent, formatMoney, formatDate, LOCALE, CURRENCY, WEEK_START, } from "./format.js";
|
|
3
|
-
export {
|
|
2
|
+
export { formatNumber, formatPercent, formatMoney, formatDate, formatLike, parseFormatted, numberSeparators, LOCALE, CURRENCY, WEEK_START, } from "./format.js";
|
|
3
|
+
export { DEFAULT_STRINGS, SHARED_STRINGS, ADMIN_STRINGS, AGENTS_STRINGS, APP_CHROME_STRINGS, APPROVALS_STRINGS, BUILDING_BLOCKS_STRINGS, CHARTS_STRINGS, CHAT_STRINGS, COMMERCE_STRINGS, DATA_DISPLAY_STRINGS, DATA_TABLE_STRINGS, DEVELOPER_STRINGS, FEEDBACK_STRINGS, FORM_STRINGS, FORMS_STRINGS, MAIL_STRINGS, MEDIA_STRINGS, NAVIGATION_STRINGS, OPERATIONS_STRINGS, PREVIEWS_STRINGS, PRIMITIVES_STRINGS, REAL_ESTATE_STRINGS, RICH_TEXT_EDITOR_STRINGS, SELECT_MENU_STRINGS, SHELL_STRINGS, SITE_STRINGS, WORKSPACE_STRINGS, mergeStrings, mergeMessages, } from "./strings.js";
|
|
4
|
+
export { UIProvider, useUI, useUIStrings, useStrings, useFormat, formattersFor, } from "./provider.js";
|
|
4
5
|
export { Portal } from "./portal.js";
|
|
5
6
|
export { startViewTransition, useMotion } from "./motion.js";
|
|
6
7
|
export { usePresence, leaving } from "./presence.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EACL,YAAY,EACZ,aAAa,EACb,WAAW,EACX,UAAU,EACV,MAAM,EACN,QAAQ,EACR,UAAU,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO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AACnE,OAAO,EAAE,IAAI,EAAkB,MAAM,WAAW,CAAC;AACjD,cAAc,uBAAuB,CAAC"}
|
package/dist/provider.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type CSSProperties, type ReactNode } from "react";
|
|
2
|
+
import { type UIMessages } from "./strings.js";
|
|
2
3
|
import { type ThemeInput, type ThemeValues } from "./theme.js";
|
|
4
|
+
export { useUI, useUIStrings, useStrings, useFormat, formattersFor, type UIContextValue, type Formatters, } from "./context.js";
|
|
3
5
|
export type Kit = "halo" | "pro";
|
|
4
6
|
export type Theme = "light" | "dark" | "system";
|
|
5
7
|
export type Density = "compact" | "comfortable";
|
|
@@ -42,20 +44,25 @@ export interface UIProviderProps {
|
|
|
42
44
|
* reduced-motion setting always turns motion off.
|
|
43
45
|
*/
|
|
44
46
|
motion?: Motion;
|
|
47
|
+
/**
|
|
48
|
+
* BCP 47 locale for the numbers, money, percentages and dates components show (`"de-DE"`).
|
|
49
|
+
* Default `"en-US"`; a nested provider keeps its parent's locale unless it sets its own.
|
|
50
|
+
*/
|
|
51
|
+
locale?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Your own text for any built-in string: accessible names, button texts, placeholders, status
|
|
54
|
+
* words (`{ close: "Schließen", selectedCount: (n) => \`${n} ausgewählt\` }`). Partial: what you
|
|
55
|
+
* leave out stays English (or what an outer provider set). Props such as `title` or `label` on a
|
|
56
|
+
* component still win. See `DEFAULT_STRINGS` for every key.
|
|
57
|
+
*/
|
|
58
|
+
messages?: UIMessages;
|
|
45
59
|
className?: string;
|
|
46
60
|
style?: CSSProperties;
|
|
47
61
|
children?: ReactNode;
|
|
48
62
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
surface: Surface | undefined;
|
|
54
|
-
motion: Motion | undefined;
|
|
55
|
-
/** Element portals render into (null: document.body). */
|
|
56
|
-
portalRoot: HTMLElement | null;
|
|
57
|
-
}
|
|
58
|
-
/** Current kit, theme, density and portal target. */
|
|
59
|
-
export declare function useUI(): UIContextValue;
|
|
63
|
+
/**
|
|
64
|
+
* Sets kit, theme, density, locale and strings for everything inside (switching never re-mounts
|
|
65
|
+
* the subtree: kit, theme and density only change attributes, locale and strings re-render).
|
|
66
|
+
*/
|
|
60
67
|
export declare function UIProvider(p: UIProviderProps): import("react").JSX.Element;
|
|
61
68
|
//# sourceMappingURL=provider.d.ts.map
|
package/dist/provider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAwC,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjG,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAc,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAE3E,OAAO,EACL,KAAK,EACL,YAAY,EACZ,UAAU,EACV,SAAS,EACT,aAAa,EACb,KAAK,cAAc,EACnB,KAAK,UAAU,GAChB,MAAM,cAAc,CAAC;AACtB,MAAM,MAAM,GAAG,GAAG,MAAM,GAAG,KAAK,CAAC;AACjC,MAAM,MAAM,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAChD,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,aAAa,CAAC;AAChD,8FAA8F;AAC9F,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AACxC;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,KAAK,GAAG,UAAU,GAAG,YAAY,CAAC;AAEvD,MAAM,WAAW,eAAe;IAC9B,wGAAwG;IACxG,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,wEAAwE;IACxE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,qGAAqG;IACrG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC/B;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;IAClC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAsBD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,eAAe,+BAiF5C"}
|
package/dist/provider.js
CHANGED
|
@@ -1,23 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { useEffect, useMemo, useRef, useState } from "react";
|
|
4
|
+
import { UIContext, useUI } from "./context.js";
|
|
5
|
+
import { mergeMessages } from "./strings.js";
|
|
4
6
|
import { themeStyle } from "./theme.js";
|
|
5
|
-
|
|
6
|
-
kit: undefined,
|
|
7
|
-
theme: undefined,
|
|
8
|
-
density: undefined,
|
|
9
|
-
surface: undefined,
|
|
10
|
-
motion: undefined,
|
|
11
|
-
portalRoot: null,
|
|
12
|
-
});
|
|
13
|
-
/** Current kit, theme, density and portal target. */
|
|
14
|
-
export function useUI() {
|
|
15
|
-
return useContext(UIContext);
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Sets kit, theme and density for everything inside (they only change attributes, so switching
|
|
19
|
-
* never re-mounts the subtree).
|
|
20
|
-
*/
|
|
7
|
+
export { useUI, useUIStrings, useStrings, useFormat, formattersFor, } from "./context.js";
|
|
21
8
|
/** True while the colour scheme the page shows is dark (theme prop, kit default, system). */
|
|
22
9
|
function useDarkMode(theme, kit, enabled) {
|
|
23
10
|
const [systemDark, setSystemDark] = useState(false);
|
|
@@ -39,6 +26,10 @@ function useDarkMode(theme, kit, enabled) {
|
|
|
39
26
|
return systemDark;
|
|
40
27
|
}
|
|
41
28
|
const isThemeInput = (t) => "light" in t || "dark" in t || "radius" in t;
|
|
29
|
+
/**
|
|
30
|
+
* Sets kit, theme, density, locale and strings for everything inside (switching never re-mounts
|
|
31
|
+
* the subtree: kit, theme and density only change attributes, locale and strings re-render).
|
|
32
|
+
*/
|
|
42
33
|
export function UIProvider(p) {
|
|
43
34
|
const parent = useUI();
|
|
44
35
|
const scope = p.scope ?? "document";
|
|
@@ -48,6 +39,8 @@ export function UIProvider(p) {
|
|
|
48
39
|
const density = p.density ?? parent.density;
|
|
49
40
|
const surface = p.surface ?? parent.surface;
|
|
50
41
|
const motion = p.motion ?? parent.motion;
|
|
42
|
+
const locale = p.locale || parent.locale;
|
|
43
|
+
const messages = useMemo(() => (p.messages ? mergeMessages(parent.messages, p.messages) : parent.messages), [parent.messages, p.messages]);
|
|
51
44
|
const perMode = !!p.tokens && isThemeInput(p.tokens);
|
|
52
45
|
const dark = useDarkMode(theme, kit, perMode);
|
|
53
46
|
const vars = useMemo(() => {
|
|
@@ -93,7 +86,7 @@ export function UIProvider(p) {
|
|
|
93
86
|
set("data-motion", p.motion);
|
|
94
87
|
}, [scope, p.kit, p.theme, p.density, p.surface, p.motion]);
|
|
95
88
|
const [portalRoot, setPortalRoot] = useState(null);
|
|
96
|
-
const ctx = useMemo(() => ({ kit, theme, density, surface, motion, portalRoot }), [kit, theme, density, surface, motion, portalRoot]);
|
|
89
|
+
const ctx = useMemo(() => ({ kit, theme, density, surface, motion, locale, messages, portalRoot }), [kit, theme, density, surface, motion, locale, messages, portalRoot]);
|
|
97
90
|
// Derived colours (glass, hover shades, Pro's scale) are worked out where data-theme sits. A
|
|
98
91
|
// subtree with its own tokens needs data-theme too, or they would keep the outer values.
|
|
99
92
|
const subtreeTheme = p.theme ?? (vars ? (theme ?? (kit === "pro" ? "dark" : "system")) : undefined);
|
package/dist/provider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAsC,MAAM,OAAO,CAAC;AACjG,OAAO,EAAE,SAAS,EAAE,KAAK,EAAuB,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,aAAa,EAAmB,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAqC,MAAM,YAAY,CAAC;AAE3E,OAAO,EACL,KAAK,EACL,YAAY,EACZ,UAAU,EACV,SAAS,EACT,aAAa,GAGd,MAAM,cAAc,CAAC;AA6DtB,6FAA6F;AAC7F,SAAS,WAAW,CAAC,KAAwB,EAAE,GAAoB,EAAE,OAAgB;IACnF,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,OAAO,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,CAAC,MAAM,CAAC,UAAU;YAAE,OAAO;QAC5E,MAAM,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC;QAC7D,MAAM,EAAE,GAAG,GAAG,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;QAC3C,EAAE,EAAE,CAAC;QACL,EAAE,CAAC,gBAAgB,CAAC,Q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