@mittwald/flow-react-components 0.2.0-alpha.831 → 0.2.0-alpha.833
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/CHANGELOG.md +10 -0
- package/dist/assets/doc-properties.json +4604 -4604
- package/dist/js/packages/components/src/components/Initials/lib/getInitialsFromString.mjs +9 -2
- package/dist/js/packages/components/src/components/Initials/lib/getInitialsFromString.mjs.map +1 -1
- package/dist/types/components/Initials/lib/getInitialsFromString.d.ts +1 -1
- package/dist/types/components/Initials/lib/getInitialsFromString.d.ts.map +1 -1
- package/dist/types/components/Initials/stories/Default.stories.d.ts +1 -0
- package/dist/types/components/Initials/stories/Default.stories.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
const getInitialsFromString = (
|
|
4
|
-
|
|
3
|
+
const getInitialsFromString = (value) => {
|
|
4
|
+
if (!value.trim()) {
|
|
5
|
+
return [];
|
|
6
|
+
}
|
|
7
|
+
return value.trim().split(/\s+/).map((part) => {
|
|
8
|
+
const normalized = part.trim();
|
|
9
|
+
const match = normalized.match(/(\p{Emoji}|\p{L})/u);
|
|
10
|
+
return match ? match[0].toUpperCase() : "";
|
|
11
|
+
}).filter(Boolean).slice(0, 2);
|
|
5
12
|
};
|
|
6
13
|
|
|
7
14
|
export { getInitialsFromString };
|
package/dist/js/packages/components/src/components/Initials/lib/getInitialsFromString.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInitialsFromString.mjs","sources":["../../../../../../../../src/components/Initials/lib/getInitialsFromString.ts"],"sourcesContent":["export const getInitialsFromString = (
|
|
1
|
+
{"version":3,"file":"getInitialsFromString.mjs","sources":["../../../../../../../../src/components/Initials/lib/getInitialsFromString.ts"],"sourcesContent":["export const getInitialsFromString = (value: string): string[] => {\n if (!value.trim()) {\n return [];\n }\n\n return value\n .trim()\n .split(/\\s+/)\n .map((part) => {\n const normalized = part.trim();\n\n const match = normalized.match(/(\\p{Emoji}|\\p{L})/u);\n\n return match ? match[0].toUpperCase() : \"\";\n })\n .filter(Boolean)\n .slice(0, 2);\n};\n"],"names":[],"mappings":"AAAO,MAAM,qBAAA,GAAwB,CAAC,KAAA,KAA4B;AAChE,EAAA,IAAI,CAAC,KAAA,CAAM,IAAA,EAAK,EAAG;AACjB,IAAA,OAAO,EAAC;AAAA,EACV;AAEA,EAAA,OAAO,KAAA,CACJ,MAAK,CACL,KAAA,CAAM,KAAK,CAAA,CACX,GAAA,CAAI,CAAC,IAAA,KAAS;AACb,IAAA,MAAM,UAAA,GAAa,KAAK,IAAA,EAAK;AAE7B,IAAA,MAAM,KAAA,GAAQ,UAAA,CAAW,KAAA,CAAM,oBAAoB,CAAA;AAEnD,IAAA,OAAO,KAAA,GAAQ,KAAA,CAAM,CAAC,CAAA,CAAE,aAAY,GAAI,EAAA;AAAA,EAC1C,CAAC,CAAA,CACA,MAAA,CAAO,OAAO,CAAA,CACd,KAAA,CAAM,GAAG,CAAC,CAAA;AACf;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const getInitialsFromString: (
|
|
1
|
+
export declare const getInitialsFromString: (value: string) => string[];
|
|
2
2
|
//# sourceMappingURL=getInitialsFromString.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInitialsFromString.d.ts","sourceRoot":"","sources":["../../../../../src/components/Initials/lib/getInitialsFromString.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,GAAI,
|
|
1
|
+
{"version":3,"file":"getInitialsFromString.d.ts","sourceRoot":"","sources":["../../../../../src/components/Initials/lib/getInitialsFromString.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,GAAI,OAAO,MAAM,KAAG,MAAM,EAiB3D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Initials/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,QAAQ,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Initials/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,QAAQ,MAAM,aAAa,CAAC;AAKnC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAO/B,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEvC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,SAAS,EAAE,KAEvB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAQnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-react-components",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.833",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"@codemirror/lint": "^6.9.5",
|
|
61
61
|
"@internationalized/string": "^3.2.7",
|
|
62
62
|
"@lezer/highlight": "^1.2.3",
|
|
63
|
-
"@mittwald/flow-icons": "0.2.0-alpha.
|
|
63
|
+
"@mittwald/flow-icons": "0.2.0-alpha.833",
|
|
64
64
|
"@mittwald/password-tools-js": "3.0.0-alpha.30",
|
|
65
|
-
"@mittwald/react-tunnel": "0.2.0-alpha.
|
|
65
|
+
"@mittwald/react-tunnel": "0.2.0-alpha.833",
|
|
66
66
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
67
67
|
"@react-aria/form": "^3.1.3",
|
|
68
68
|
"@react-aria/i18n": "^3.12.16",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"@lezer/generator": "^1.8.0",
|
|
117
117
|
"@lezer/lr": "^1.4.8",
|
|
118
118
|
"@mittwald/flow-core": "",
|
|
119
|
-
"@mittwald/flow-design-tokens": "0.2.0-alpha.
|
|
119
|
+
"@mittwald/flow-design-tokens": "0.2.0-alpha.833",
|
|
120
120
|
"@mittwald/flow-icons-base": "",
|
|
121
121
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
122
122
|
"@mittwald/remote-dom-react": "1.2.2-mittwald.10",
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
},
|
|
170
170
|
"peerDependencies": {
|
|
171
171
|
"@internationalized/date": "^3.10.0",
|
|
172
|
-
"@mittwald/flow-icons-pro": "0.2.0-alpha.
|
|
172
|
+
"@mittwald/flow-icons-pro": "0.2.0-alpha.832",
|
|
173
173
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
174
174
|
"next": "^16.2.3",
|
|
175
175
|
"react": "^19.2.0",
|
|
@@ -190,5 +190,5 @@
|
|
|
190
190
|
"optional": true
|
|
191
191
|
}
|
|
192
192
|
},
|
|
193
|
-
"gitHead": "
|
|
193
|
+
"gitHead": "658dc3e1384f74f22e72aba900ab14094d2cb2eb"
|
|
194
194
|
}
|