karsten-design-system 1.2.50 → 1.2.52
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.ts +1 -0
- package/dist/index.js +34 -5
- package/dist/index.js.map +1 -1
- package/dist/stories/components/header.d.ts +2 -1
- package/dist/stories/components/textColor.d.ts +6 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stories/components/header.d.ts +2 -1
- package/dist/types/stories/components/textColor.d.ts +6 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -36,5 +36,6 @@ export * from './stories/components/spinner';
|
|
|
36
36
|
export * from './stories/components/table';
|
|
37
37
|
export * from './stories/components/tabs';
|
|
38
38
|
export * from './stories/components/tagStatus';
|
|
39
|
+
export * from './stories/components/textColor';
|
|
39
40
|
export * from './stories/components/toast';
|
|
40
41
|
export * from './stories/components/tooltip';
|
package/dist/index.js
CHANGED
|
@@ -451,7 +451,7 @@ function Sidebar({ item, onClose, topItem, homeTranslation = 'Início', favorite
|
|
|
451
451
|
}, "aria-label": `Ir para ${item.title}`, children: jsx(Tooltip, { text: item.tooltipText, children: item.title }) })) : (jsx(Link$1, { to: item.path || '', className: "font-roboto text-base text-light-900 hover:font-bold dark:text-light-500 dark:hover:bg-dark-400", onClick: onClose, "aria-label": `Ir para ${item.title}`, children: jsx(Tooltip, { text: item.tooltipText, children: item.title }) })) }, `top-item-${item.id ?? item.title}`))), jsxs("div", { className: "flex flex-row gap-3 items-center pl-6 pt-8 pb-4", children: [jsx("i", { className: "pi pi-star text-light-900 !font-bold text-lg dark:text-light-500" }), jsx("p", { className: "text-light-900 font-bold text-lg dark:text-light-500", children: favoritesTranslation })] })] }), jsx("div", { className: "flex-1 overflow-y-auto overflow-x-hidden px-0 pb-4 pr-1 custom-scrollbar", children: item?.map((item) => (jsx(Link$1, { className: "flex flex-row items-center pl-6 gap-2 border-b border-b-light-200 hover:bg-light-300 hover:font-bold dark:bg-dark-100 dark:text-light-500 dark:hover:bg-dark-400", to: item.path || '', onClick: onClose, "aria-label": `Ir para ${item.title}`, children: jsx("span", { className: "font-roboto text-base py-2 text-light-900 hover:font-bold dark:text-light-500 dark:hover:bg-dark-400", children: jsx(Tooltip, { text: item.tooltipText, children: item.title }) }) }, item.id))) })] }) }));
|
|
452
452
|
}
|
|
453
453
|
|
|
454
|
-
function Header({ sidebarItems, sidebarTopItems, username, userConfigItems, setOpenNotifications, isRenderNotifications = false, rightActions, redirect = '/', helloTranslation = 'Olá', favoritesTranslation = 'Favoritos', }) {
|
|
454
|
+
function Header({ sidebarItems, sidebarTopItems, username, userConfigItems, setOpenNotifications, isRenderNotifications = false, rightActions, redirect = '/', helloTranslation = 'Olá', favoritesTranslation = 'Favoritos', homeTranslation = 'Início', }) {
|
|
455
455
|
const [openSidebar, setOpenSidebar] = useState(false);
|
|
456
456
|
const [openUserConfig, setOpenUserConfig] = useState(false);
|
|
457
457
|
const userConfigRef = useRef(null);
|
|
@@ -478,7 +478,7 @@ function Header({ sidebarItems, sidebarTopItems, username, userConfigItems, setO
|
|
|
478
478
|
setOpenUserConfig(false);
|
|
479
479
|
}, href: path, className: "block w-full font-base font-roboto text-light-900 cursor-pointer hover:font-bold dark:text-light-500", "aria-label": "Op\u00E7\u00F5es de configura\u00E7\u00F5es do usu\u00E1rio", children: title }) }, id))) }) }))] }), rightActions && rightActions] })] }), openSidebar && (jsx(Sidebar, { topItem: sidebarTopItems, item: sidebarItems, onClose: () => {
|
|
480
480
|
setOpenSidebar(false);
|
|
481
|
-
}, favoritesTranslation: favoritesTranslation }))] }));
|
|
481
|
+
}, favoritesTranslation: favoritesTranslation, homeTranslation: homeTranslation }))] }));
|
|
482
482
|
}
|
|
483
483
|
|
|
484
484
|
const variants$2 = {
|
|
@@ -4686,7 +4686,7 @@ function Tabs({ tabs, activeIndex = 0, onTabChange, className, }) {
|
|
|
4686
4686
|
}) }), jsx("div", { className: "py-1 px-3", children: tabs.map((tab, index) => (jsx("div", { className: clsx(index !== currentIndex && 'hidden'), children: tab.content }, index))) })] }));
|
|
4687
4687
|
}
|
|
4688
4688
|
|
|
4689
|
-
const colorMap = {
|
|
4689
|
+
const colorMap$1 = {
|
|
4690
4690
|
blue: 'bg-[#DBEAFE] text-[#1E40AF] border-[#BFDBFE]',
|
|
4691
4691
|
red: 'bg-[#FEE2E2] text-[#991B1B] border-[#FCA5A5]',
|
|
4692
4692
|
green: 'bg-[#D1FAE5] text-[#065F46] border-[#6EE7B7]',
|
|
@@ -4711,12 +4711,41 @@ const colorMap = {
|
|
|
4711
4711
|
neutral: 'bg-[#F5F5F5] text-[#404040] border-[#D4D4D4]',
|
|
4712
4712
|
};
|
|
4713
4713
|
function TagStatus({ value, color = 'gray' }) {
|
|
4714
|
-
const colorClass = colorMap[color];
|
|
4714
|
+
const colorClass = colorMap$1[color];
|
|
4715
4715
|
return (jsx("span", { className: `
|
|
4716
4716
|
text-sm px-2 py-[2px] rounded-xl font-medium border ${colorClass} shadow-container dark:shadow-dark-400 inline-block text-center break-words leading-snug
|
|
4717
4717
|
`, children: value }));
|
|
4718
4718
|
}
|
|
4719
4719
|
|
|
4720
|
+
const colorMap = {
|
|
4721
|
+
blue: 'text-[#1E40AF]',
|
|
4722
|
+
red: 'text-[#991B1B]',
|
|
4723
|
+
green: 'text-[#065F46]',
|
|
4724
|
+
gray: 'text-[#374151]',
|
|
4725
|
+
purple: 'text-[#6B21A8]',
|
|
4726
|
+
yellow: 'text-[#92400E]',
|
|
4727
|
+
orange: 'text-[#9A3412]',
|
|
4728
|
+
pink: 'text-[#9D174D]',
|
|
4729
|
+
emerald: 'text-[#065F46]',
|
|
4730
|
+
teal: 'text-[#134E4A]',
|
|
4731
|
+
cyan: 'text-[#155E75]',
|
|
4732
|
+
sky: 'text-[#0369A1]',
|
|
4733
|
+
indigo: 'text-[#3730A3]',
|
|
4734
|
+
violet: 'text-[#6D28D9]',
|
|
4735
|
+
fuchsia: 'text-[#A21CAF]',
|
|
4736
|
+
rose: 'text-[#BE123C]',
|
|
4737
|
+
stone: 'text-[#44403C]',
|
|
4738
|
+
amber: 'text-[#92400E]',
|
|
4739
|
+
lime: 'text-[#365314]',
|
|
4740
|
+
slate: 'text-[#334155]',
|
|
4741
|
+
zinc: 'text-[#3F3F46]',
|
|
4742
|
+
neutral: 'text-[#404040]',
|
|
4743
|
+
};
|
|
4744
|
+
function TextColor({ value, color = 'gray' }) {
|
|
4745
|
+
const colorClass = colorMap[color];
|
|
4746
|
+
return jsx("span", { className: `${colorClass} font-bold`, children: value });
|
|
4747
|
+
}
|
|
4748
|
+
|
|
4720
4749
|
function ErrorIcon() {
|
|
4721
4750
|
return (jsxs("svg", { width: "27", height: "27", viewBox: "0 0 27 27", fill: "none", className: "min-w-7", children: [jsx("circle", { cx: "13.5", cy: "13.5", r: "12.5", stroke: "#B71C1C", strokeWidth: "2" }), jsx("path", { d: "M8 8L19 19", stroke: "#B71C1C", strokeWidth: "2", strokeLinecap: "round" }), jsx("path", { d: "M19 8L8 19", stroke: "#B71C1C", strokeWidth: "2", strokeLinecap: "round" })] }));
|
|
4722
4751
|
}
|
|
@@ -4739,5 +4768,5 @@ function Toast({ messages }) {
|
|
|
4739
4768
|
: ''), "aria-label": "toast", children: [severity === 'success' && jsx(SuccessIcon, {}), severity === 'info' && jsx(InfoIcon, {}), severity === 'error' && jsx(ErrorIcon, {}), jsxs("div", { children: [jsx("strong", { children: summary }), jsx("p", { children: detail })] })] }, id))) }));
|
|
4740
4769
|
}
|
|
4741
4770
|
|
|
4742
|
-
export { Accordion, BasicHeader, Breadcrumb, Button, CalendarInput, Card, CardButton, CardIconsButton, Charts, Divider, EmptyContent, ExpandablePanel, FileUpload, Header, IconButton, InfoCard, Input, InputSwitch, InputTextArea, InternalMenu, LanguageDropdown, Link, MegaMenu, Modal, ModalForm, MultiSelect, NotificationsSidebar, Paginator, RadioButton, RightSidebar, Select, Sidebar, Skeleton, Spinner, Table, Tabs, TagStatus, Toast, Tooltip };
|
|
4771
|
+
export { Accordion, BasicHeader, Breadcrumb, Button, CalendarInput, Card, CardButton, CardIconsButton, Charts, Divider, EmptyContent, ExpandablePanel, FileUpload, Header, IconButton, InfoCard, Input, InputSwitch, InputTextArea, InternalMenu, LanguageDropdown, Link, MegaMenu, Modal, ModalForm, MultiSelect, NotificationsSidebar, Paginator, RadioButton, RightSidebar, Select, Sidebar, Skeleton, Spinner, Table, Tabs, TagStatus, TextColor, Toast, Tooltip };
|
|
4743
4772
|
//# sourceMappingURL=index.js.map
|