design-zystem 1.0.295 → 1.0.297
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 +17 -2
- package/dist/index.d.ts +17 -2
- package/dist/index.js +46 -0
- package/dist/index.mjs +45 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -976,12 +976,14 @@ interface MetricCardProps {
|
|
|
976
976
|
iconBackgroundColor?: string;
|
|
977
977
|
iconColor?: string;
|
|
978
978
|
contentLayout?: 'col' | 'row';
|
|
979
|
+
/** Cross-axis alignment of the card itself. `alignSelf="stretch"` makes a row of cards share the height of the tallest one — a Box is `align-self: center` by default. */
|
|
980
|
+
alignSelf?: string;
|
|
979
981
|
onClick?: () => void;
|
|
980
982
|
checked?: boolean;
|
|
981
983
|
/** Contenu libre à droite de l'icône. Remplace title/value quand fourni. */
|
|
982
984
|
children?: ReactNode;
|
|
983
985
|
}
|
|
984
|
-
declare const MetricCard: ({ icon, title, value, valueColor, subtitle, iconBackgroundColor, iconColor, contentLayout, onClick, checked, children, }: MetricCardProps) => react_jsx_runtime.JSX.Element;
|
|
986
|
+
declare const MetricCard: ({ icon, title, value, valueColor, subtitle, iconBackgroundColor, iconColor, contentLayout, alignSelf, onClick, checked, children, }: MetricCardProps) => react_jsx_runtime.JSX.Element;
|
|
985
987
|
|
|
986
988
|
interface CardProps {
|
|
987
989
|
children?: ReactNode;
|
|
@@ -1317,6 +1319,19 @@ declare const getInitials: (author: AuthorLike | null | undefined) => string;
|
|
|
1317
1319
|
|
|
1318
1320
|
declare const getAvatarColor: (key: string) => string;
|
|
1319
1321
|
|
|
1322
|
+
declare const PASTEL_COLORS: {
|
|
1323
|
+
background: string;
|
|
1324
|
+
text: string;
|
|
1325
|
+
}[];
|
|
1326
|
+
type PastelColorPair = (typeof PASTEL_COLORS)[number];
|
|
1327
|
+
/**
|
|
1328
|
+
* Couleur d'avatar déterministe pour un nom, en pastel avec sa couleur de texte
|
|
1329
|
+
* lisible. `generateHexColor` et `getAvatarColor` renvoient un hex saturé et
|
|
1330
|
+
* seul : ils ne conviennent ni au rendu pastel attendu, ni aux props
|
|
1331
|
+
* `backgroundColor` + `textColor` de l'`Avatar`.
|
|
1332
|
+
*/
|
|
1333
|
+
declare const getPastelColorPair: (firstName?: string, lastName?: string) => PastelColorPair;
|
|
1334
|
+
|
|
1320
1335
|
declare const formatNameWithInitial: (firstname: string | null, lastname: string | null) => string | null;
|
|
1321
1336
|
|
|
1322
1337
|
declare const getFileNameFromUrl: (url: string | null | undefined, fallback?: string) => string;
|
|
@@ -1339,4 +1354,4 @@ declare const formatKM: (value: string | number | null | undefined) => string;
|
|
|
1339
1354
|
|
|
1340
1355
|
declare const parseAmount: (value: string) => number | null;
|
|
1341
1356
|
|
|
1342
|
-
export { Accordion, type AccordionItem, Avatar, Banner, type BannerAction, type BannerProps, Box, Bubble, Bulk, Button, Card, type CardProps, CardSkeleton, Checkbox, Col, Collapse, ColorPicker, DatePicker, type DatePickerProps, type DatePreset, Divider, Drawer, EmptyState, FileUploadZone, type FloatingAction, FloatingButton, type FloatingButtonProps, Gantt, type GanttBand, type GanttBar, type GanttDay, GanttDot, type GanttProps, type GanttRow, GanttSwatch, Grid, Icon, IconTabs, Image, Input, Link, List, ListItem, MetricCard, Modal, ModalConfirmation, MultiSelect, NewModal, Options, PageContainer, Pagination, Popover, ProgressBar, Radio, Row, Select, type SelectOption, type SelectProps, SkeletonRow, SliderInput, type SortOrder, Spinner, Stepper, Switch, Table, TableBody, TableCell, TableFooter, TableFooterCell, TableFooterRow, TableHeader, TableHeaderCell, type TableHeaderCellProps, TableHeaderRow, TableRow, Tabs, TagBubble, Text, Timeline, type TimelineItem, type ToastOptions, type ToastType, Toaster, Tooltip, addBusinessDays, appendCacheBuster, appendQueryParam, capitalizeFirstLetter, colors, easterDate, formatAddress, formatCityFromFormattedAddress, formatCityWithPostalCode, formatDate, formatDateWithTime, formatDistance, formatDuration, formatEuro, formatKM, formatLocality, formatName, formatNameWithInitial, formatPhoneNumber, formatPlate, formatPlateWithoutDashes, formatPostalCodeFromFormattedAddress, formatRegionCode, formatTime, formatVin, generateHexColor, getAvatarColor, getCleanFileName, getElapsedTime, getFileIconByMimeType, getFileKind, getFileNameFromUrl, getInitials, getMimeCategory, getRelativeTime, isHoliday, isSameDay, isolateCity, optimizeImage, parseAmount, parseIsoDate, toast, truncateFileName, truncateText };
|
|
1357
|
+
export { Accordion, type AccordionItem, Avatar, Banner, type BannerAction, type BannerProps, Box, Bubble, Bulk, Button, Card, type CardProps, CardSkeleton, Checkbox, Col, Collapse, ColorPicker, DatePicker, type DatePickerProps, type DatePreset, Divider, Drawer, EmptyState, FileUploadZone, type FloatingAction, FloatingButton, type FloatingButtonProps, Gantt, type GanttBand, type GanttBar, type GanttDay, GanttDot, type GanttProps, type GanttRow, GanttSwatch, Grid, Icon, IconTabs, Image, Input, Link, List, ListItem, MetricCard, Modal, ModalConfirmation, MultiSelect, NewModal, Options, PageContainer, Pagination, type PastelColorPair, Popover, ProgressBar, Radio, Row, Select, type SelectOption, type SelectProps, SkeletonRow, SliderInput, type SortOrder, Spinner, Stepper, Switch, Table, TableBody, TableCell, TableFooter, TableFooterCell, TableFooterRow, TableHeader, TableHeaderCell, type TableHeaderCellProps, TableHeaderRow, TableRow, Tabs, TagBubble, Text, Timeline, type TimelineItem, type ToastOptions, type ToastType, Toaster, Tooltip, addBusinessDays, appendCacheBuster, appendQueryParam, capitalizeFirstLetter, colors, easterDate, formatAddress, formatCityFromFormattedAddress, formatCityWithPostalCode, formatDate, formatDateWithTime, formatDistance, formatDuration, formatEuro, formatKM, formatLocality, formatName, formatNameWithInitial, formatPhoneNumber, formatPlate, formatPlateWithoutDashes, formatPostalCodeFromFormattedAddress, formatRegionCode, formatTime, formatVin, generateHexColor, getAvatarColor, getCleanFileName, getElapsedTime, getFileIconByMimeType, getFileKind, getFileNameFromUrl, getInitials, getMimeCategory, getPastelColorPair, getRelativeTime, isHoliday, isSameDay, isolateCity, optimizeImage, parseAmount, parseIsoDate, toast, truncateFileName, truncateText };
|
package/dist/index.d.ts
CHANGED
|
@@ -976,12 +976,14 @@ interface MetricCardProps {
|
|
|
976
976
|
iconBackgroundColor?: string;
|
|
977
977
|
iconColor?: string;
|
|
978
978
|
contentLayout?: 'col' | 'row';
|
|
979
|
+
/** Cross-axis alignment of the card itself. `alignSelf="stretch"` makes a row of cards share the height of the tallest one — a Box is `align-self: center` by default. */
|
|
980
|
+
alignSelf?: string;
|
|
979
981
|
onClick?: () => void;
|
|
980
982
|
checked?: boolean;
|
|
981
983
|
/** Contenu libre à droite de l'icône. Remplace title/value quand fourni. */
|
|
982
984
|
children?: ReactNode;
|
|
983
985
|
}
|
|
984
|
-
declare const MetricCard: ({ icon, title, value, valueColor, subtitle, iconBackgroundColor, iconColor, contentLayout, onClick, checked, children, }: MetricCardProps) => react_jsx_runtime.JSX.Element;
|
|
986
|
+
declare const MetricCard: ({ icon, title, value, valueColor, subtitle, iconBackgroundColor, iconColor, contentLayout, alignSelf, onClick, checked, children, }: MetricCardProps) => react_jsx_runtime.JSX.Element;
|
|
985
987
|
|
|
986
988
|
interface CardProps {
|
|
987
989
|
children?: ReactNode;
|
|
@@ -1317,6 +1319,19 @@ declare const getInitials: (author: AuthorLike | null | undefined) => string;
|
|
|
1317
1319
|
|
|
1318
1320
|
declare const getAvatarColor: (key: string) => string;
|
|
1319
1321
|
|
|
1322
|
+
declare const PASTEL_COLORS: {
|
|
1323
|
+
background: string;
|
|
1324
|
+
text: string;
|
|
1325
|
+
}[];
|
|
1326
|
+
type PastelColorPair = (typeof PASTEL_COLORS)[number];
|
|
1327
|
+
/**
|
|
1328
|
+
* Couleur d'avatar déterministe pour un nom, en pastel avec sa couleur de texte
|
|
1329
|
+
* lisible. `generateHexColor` et `getAvatarColor` renvoient un hex saturé et
|
|
1330
|
+
* seul : ils ne conviennent ni au rendu pastel attendu, ni aux props
|
|
1331
|
+
* `backgroundColor` + `textColor` de l'`Avatar`.
|
|
1332
|
+
*/
|
|
1333
|
+
declare const getPastelColorPair: (firstName?: string, lastName?: string) => PastelColorPair;
|
|
1334
|
+
|
|
1320
1335
|
declare const formatNameWithInitial: (firstname: string | null, lastname: string | null) => string | null;
|
|
1321
1336
|
|
|
1322
1337
|
declare const getFileNameFromUrl: (url: string | null | undefined, fallback?: string) => string;
|
|
@@ -1339,4 +1354,4 @@ declare const formatKM: (value: string | number | null | undefined) => string;
|
|
|
1339
1354
|
|
|
1340
1355
|
declare const parseAmount: (value: string) => number | null;
|
|
1341
1356
|
|
|
1342
|
-
export { Accordion, type AccordionItem, Avatar, Banner, type BannerAction, type BannerProps, Box, Bubble, Bulk, Button, Card, type CardProps, CardSkeleton, Checkbox, Col, Collapse, ColorPicker, DatePicker, type DatePickerProps, type DatePreset, Divider, Drawer, EmptyState, FileUploadZone, type FloatingAction, FloatingButton, type FloatingButtonProps, Gantt, type GanttBand, type GanttBar, type GanttDay, GanttDot, type GanttProps, type GanttRow, GanttSwatch, Grid, Icon, IconTabs, Image, Input, Link, List, ListItem, MetricCard, Modal, ModalConfirmation, MultiSelect, NewModal, Options, PageContainer, Pagination, Popover, ProgressBar, Radio, Row, Select, type SelectOption, type SelectProps, SkeletonRow, SliderInput, type SortOrder, Spinner, Stepper, Switch, Table, TableBody, TableCell, TableFooter, TableFooterCell, TableFooterRow, TableHeader, TableHeaderCell, type TableHeaderCellProps, TableHeaderRow, TableRow, Tabs, TagBubble, Text, Timeline, type TimelineItem, type ToastOptions, type ToastType, Toaster, Tooltip, addBusinessDays, appendCacheBuster, appendQueryParam, capitalizeFirstLetter, colors, easterDate, formatAddress, formatCityFromFormattedAddress, formatCityWithPostalCode, formatDate, formatDateWithTime, formatDistance, formatDuration, formatEuro, formatKM, formatLocality, formatName, formatNameWithInitial, formatPhoneNumber, formatPlate, formatPlateWithoutDashes, formatPostalCodeFromFormattedAddress, formatRegionCode, formatTime, formatVin, generateHexColor, getAvatarColor, getCleanFileName, getElapsedTime, getFileIconByMimeType, getFileKind, getFileNameFromUrl, getInitials, getMimeCategory, getRelativeTime, isHoliday, isSameDay, isolateCity, optimizeImage, parseAmount, parseIsoDate, toast, truncateFileName, truncateText };
|
|
1357
|
+
export { Accordion, type AccordionItem, Avatar, Banner, type BannerAction, type BannerProps, Box, Bubble, Bulk, Button, Card, type CardProps, CardSkeleton, Checkbox, Col, Collapse, ColorPicker, DatePicker, type DatePickerProps, type DatePreset, Divider, Drawer, EmptyState, FileUploadZone, type FloatingAction, FloatingButton, type FloatingButtonProps, Gantt, type GanttBand, type GanttBar, type GanttDay, GanttDot, type GanttProps, type GanttRow, GanttSwatch, Grid, Icon, IconTabs, Image, Input, Link, List, ListItem, MetricCard, Modal, ModalConfirmation, MultiSelect, NewModal, Options, PageContainer, Pagination, type PastelColorPair, Popover, ProgressBar, Radio, Row, Select, type SelectOption, type SelectProps, SkeletonRow, SliderInput, type SortOrder, Spinner, Stepper, Switch, Table, TableBody, TableCell, TableFooter, TableFooterCell, TableFooterRow, TableHeader, TableHeaderCell, type TableHeaderCellProps, TableHeaderRow, TableRow, Tabs, TagBubble, Text, Timeline, type TimelineItem, type ToastOptions, type ToastType, Toaster, Tooltip, addBusinessDays, appendCacheBuster, appendQueryParam, capitalizeFirstLetter, colors, easterDate, formatAddress, formatCityFromFormattedAddress, formatCityWithPostalCode, formatDate, formatDateWithTime, formatDistance, formatDuration, formatEuro, formatKM, formatLocality, formatName, formatNameWithInitial, formatPhoneNumber, formatPlate, formatPlateWithoutDashes, formatPostalCodeFromFormattedAddress, formatRegionCode, formatTime, formatVin, generateHexColor, getAvatarColor, getCleanFileName, getElapsedTime, getFileIconByMimeType, getFileKind, getFileNameFromUrl, getInitials, getMimeCategory, getPastelColorPair, getRelativeTime, isHoliday, isSameDay, isolateCity, optimizeImage, parseAmount, parseIsoDate, toast, truncateFileName, truncateText };
|
package/dist/index.js
CHANGED
|
@@ -157,6 +157,7 @@ __export(index_exports, {
|
|
|
157
157
|
getFileNameFromUrl: () => getFileNameFromUrl,
|
|
158
158
|
getInitials: () => getInitials2,
|
|
159
159
|
getMimeCategory: () => getMimeCategory,
|
|
160
|
+
getPastelColorPair: () => getPastelColorPair,
|
|
160
161
|
getRelativeTime: () => getRelativeTime,
|
|
161
162
|
isHoliday: () => isHoliday,
|
|
162
163
|
isSameDay: () => isSameDay,
|
|
@@ -5323,6 +5324,7 @@ var MetricCard = ({
|
|
|
5323
5324
|
iconBackgroundColor = "blue_50",
|
|
5324
5325
|
iconColor = "blue_950",
|
|
5325
5326
|
contentLayout = "col",
|
|
5327
|
+
alignSelf,
|
|
5326
5328
|
onClick,
|
|
5327
5329
|
checked = false,
|
|
5328
5330
|
children
|
|
@@ -5332,6 +5334,7 @@ var MetricCard = ({
|
|
|
5332
5334
|
{
|
|
5333
5335
|
padding: "16px",
|
|
5334
5336
|
borderRadius: "6px",
|
|
5337
|
+
alignSelf,
|
|
5335
5338
|
style: {
|
|
5336
5339
|
flex: 1,
|
|
5337
5340
|
border: checked ? `1px solid ${colors.blue_950}` : void 0,
|
|
@@ -7209,6 +7212,48 @@ var getAvatarColor = (key) => {
|
|
|
7209
7212
|
return AVATAR_COLORS[hashString(key) % AVATAR_COLORS.length];
|
|
7210
7213
|
};
|
|
7211
7214
|
|
|
7215
|
+
// src/utils/string/getPastelColorPair.ts
|
|
7216
|
+
var PASTEL_COLORS = [
|
|
7217
|
+
{ background: "#ffe5e5", text: "#993333" },
|
|
7218
|
+
{ background: "#ffd9cc", text: "#994d33" },
|
|
7219
|
+
{ background: "#ffedcc", text: "#996633" },
|
|
7220
|
+
{ background: "#fff5cc", text: "#997a33" },
|
|
7221
|
+
{ background: "#f9ffcc", text: "#7a9933" },
|
|
7222
|
+
{ background: "#ecffcc", text: "#669933" },
|
|
7223
|
+
{ background: "#ddffcc", text: "#339933" },
|
|
7224
|
+
{ background: "#ccffd9", text: "#33996b" },
|
|
7225
|
+
{ background: "#ccffe5", text: "#339988" },
|
|
7226
|
+
{ background: "#ccfff5", text: "#339999" },
|
|
7227
|
+
{ background: "#ccf5ff", text: "#337a99" },
|
|
7228
|
+
{ background: "#ccecff", text: "#336699" },
|
|
7229
|
+
{ background: "#ccdfff", text: "#334d99" },
|
|
7230
|
+
{ background: "#ccd1ff", text: "#333399" },
|
|
7231
|
+
{ background: "#e5ccff", text: "#5c3399" },
|
|
7232
|
+
{ background: "#f2ccff", text: "#7a3399" },
|
|
7233
|
+
{ background: "#ffccf9", text: "#99337a" },
|
|
7234
|
+
{ background: "#ffcce5", text: "#993366" },
|
|
7235
|
+
{ background: "#ffccd9", text: "#99334d" },
|
|
7236
|
+
{ background: "#dbffcc", text: "#4d9933" },
|
|
7237
|
+
{ background: "#ccffe8", text: "#33997a" },
|
|
7238
|
+
{ background: "#daccff", text: "#443399" },
|
|
7239
|
+
{ background: "#ecccff", text: "#663399" },
|
|
7240
|
+
{ background: "#cce0ff", text: "#334d99" },
|
|
7241
|
+
{ background: "#f5ccff", text: "#7a3399" },
|
|
7242
|
+
{ background: "#ffcce8", text: "#993366" },
|
|
7243
|
+
{ background: "#f0ffcc", text: "#669933" },
|
|
7244
|
+
{ background: "#ccffd2", text: "#33994d" },
|
|
7245
|
+
{ background: "#ccffe0", text: "#339966" }
|
|
7246
|
+
];
|
|
7247
|
+
var getPastelColorPair = (firstName = "", lastName = "") => {
|
|
7248
|
+
var _a, _b, _c, _d;
|
|
7249
|
+
const fullName = ((_b = (_a = firstName == null ? void 0 : firstName.trim()) == null ? void 0 : _a.toLowerCase()) != null ? _b : "") + ((_d = (_c = lastName == null ? void 0 : lastName.trim()) == null ? void 0 : _c.toLowerCase()) != null ? _d : "");
|
|
7250
|
+
let hash = 0;
|
|
7251
|
+
for (let i = 0; i < fullName.length; i++) {
|
|
7252
|
+
hash = fullName.charCodeAt(i) + ((hash << 5) - hash);
|
|
7253
|
+
}
|
|
7254
|
+
return PASTEL_COLORS[Math.abs(hash) % PASTEL_COLORS.length];
|
|
7255
|
+
};
|
|
7256
|
+
|
|
7212
7257
|
// src/utils/string/formatNameWithInitial.ts
|
|
7213
7258
|
var formatNameWithInitial = (firstname, lastname) => {
|
|
7214
7259
|
if (!firstname && !lastname) return null;
|
|
@@ -7399,6 +7444,7 @@ var parseAmount = (value) => {
|
|
|
7399
7444
|
getFileNameFromUrl,
|
|
7400
7445
|
getInitials,
|
|
7401
7446
|
getMimeCategory,
|
|
7447
|
+
getPastelColorPair,
|
|
7402
7448
|
getRelativeTime,
|
|
7403
7449
|
isHoliday,
|
|
7404
7450
|
isSameDay,
|
package/dist/index.mjs
CHANGED
|
@@ -5203,6 +5203,7 @@ var MetricCard = ({
|
|
|
5203
5203
|
iconBackgroundColor = "blue_50",
|
|
5204
5204
|
iconColor = "blue_950",
|
|
5205
5205
|
contentLayout = "col",
|
|
5206
|
+
alignSelf,
|
|
5206
5207
|
onClick,
|
|
5207
5208
|
checked = false,
|
|
5208
5209
|
children
|
|
@@ -5212,6 +5213,7 @@ var MetricCard = ({
|
|
|
5212
5213
|
{
|
|
5213
5214
|
padding: "16px",
|
|
5214
5215
|
borderRadius: "6px",
|
|
5216
|
+
alignSelf,
|
|
5215
5217
|
style: {
|
|
5216
5218
|
flex: 1,
|
|
5217
5219
|
border: checked ? `1px solid ${colors.blue_950}` : void 0,
|
|
@@ -7089,6 +7091,48 @@ var getAvatarColor = (key) => {
|
|
|
7089
7091
|
return AVATAR_COLORS[hashString(key) % AVATAR_COLORS.length];
|
|
7090
7092
|
};
|
|
7091
7093
|
|
|
7094
|
+
// src/utils/string/getPastelColorPair.ts
|
|
7095
|
+
var PASTEL_COLORS = [
|
|
7096
|
+
{ background: "#ffe5e5", text: "#993333" },
|
|
7097
|
+
{ background: "#ffd9cc", text: "#994d33" },
|
|
7098
|
+
{ background: "#ffedcc", text: "#996633" },
|
|
7099
|
+
{ background: "#fff5cc", text: "#997a33" },
|
|
7100
|
+
{ background: "#f9ffcc", text: "#7a9933" },
|
|
7101
|
+
{ background: "#ecffcc", text: "#669933" },
|
|
7102
|
+
{ background: "#ddffcc", text: "#339933" },
|
|
7103
|
+
{ background: "#ccffd9", text: "#33996b" },
|
|
7104
|
+
{ background: "#ccffe5", text: "#339988" },
|
|
7105
|
+
{ background: "#ccfff5", text: "#339999" },
|
|
7106
|
+
{ background: "#ccf5ff", text: "#337a99" },
|
|
7107
|
+
{ background: "#ccecff", text: "#336699" },
|
|
7108
|
+
{ background: "#ccdfff", text: "#334d99" },
|
|
7109
|
+
{ background: "#ccd1ff", text: "#333399" },
|
|
7110
|
+
{ background: "#e5ccff", text: "#5c3399" },
|
|
7111
|
+
{ background: "#f2ccff", text: "#7a3399" },
|
|
7112
|
+
{ background: "#ffccf9", text: "#99337a" },
|
|
7113
|
+
{ background: "#ffcce5", text: "#993366" },
|
|
7114
|
+
{ background: "#ffccd9", text: "#99334d" },
|
|
7115
|
+
{ background: "#dbffcc", text: "#4d9933" },
|
|
7116
|
+
{ background: "#ccffe8", text: "#33997a" },
|
|
7117
|
+
{ background: "#daccff", text: "#443399" },
|
|
7118
|
+
{ background: "#ecccff", text: "#663399" },
|
|
7119
|
+
{ background: "#cce0ff", text: "#334d99" },
|
|
7120
|
+
{ background: "#f5ccff", text: "#7a3399" },
|
|
7121
|
+
{ background: "#ffcce8", text: "#993366" },
|
|
7122
|
+
{ background: "#f0ffcc", text: "#669933" },
|
|
7123
|
+
{ background: "#ccffd2", text: "#33994d" },
|
|
7124
|
+
{ background: "#ccffe0", text: "#339966" }
|
|
7125
|
+
];
|
|
7126
|
+
var getPastelColorPair = (firstName = "", lastName = "") => {
|
|
7127
|
+
var _a, _b, _c, _d;
|
|
7128
|
+
const fullName = ((_b = (_a = firstName == null ? void 0 : firstName.trim()) == null ? void 0 : _a.toLowerCase()) != null ? _b : "") + ((_d = (_c = lastName == null ? void 0 : lastName.trim()) == null ? void 0 : _c.toLowerCase()) != null ? _d : "");
|
|
7129
|
+
let hash = 0;
|
|
7130
|
+
for (let i = 0; i < fullName.length; i++) {
|
|
7131
|
+
hash = fullName.charCodeAt(i) + ((hash << 5) - hash);
|
|
7132
|
+
}
|
|
7133
|
+
return PASTEL_COLORS[Math.abs(hash) % PASTEL_COLORS.length];
|
|
7134
|
+
};
|
|
7135
|
+
|
|
7092
7136
|
// src/utils/string/formatNameWithInitial.ts
|
|
7093
7137
|
var formatNameWithInitial = (firstname, lastname) => {
|
|
7094
7138
|
if (!firstname && !lastname) return null;
|
|
@@ -7278,6 +7322,7 @@ export {
|
|
|
7278
7322
|
getFileNameFromUrl,
|
|
7279
7323
|
getInitials2 as getInitials,
|
|
7280
7324
|
getMimeCategory,
|
|
7325
|
+
getPastelColorPair,
|
|
7281
7326
|
getRelativeTime,
|
|
7282
7327
|
isHoliday,
|
|
7283
7328
|
isSameDay,
|