@metropolle/design-system 1.0.0-beta.2025.9.12.1800.94b9f9c → 1.0.0-beta.2025.9.14.135.6a01a93
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/css/components.css +61 -4
- package/dist/react/components/react/Select/Select.d.ts +19 -0
- package/dist/react/components/react/Select/Select.d.ts.map +1 -0
- package/dist/react/components/react/Select/index.d.ts +2 -0
- package/dist/react/components/react/Select/index.d.ts.map +1 -0
- package/dist/react/components/react/ThemeToggle/ThemeToggle.d.ts +28 -0
- package/dist/react/components/react/ThemeToggle/ThemeToggle.d.ts.map +1 -0
- package/dist/react/components/react/ThemeToggle/index.d.ts +3 -0
- package/dist/react/components/react/ThemeToggle/index.d.ts.map +1 -0
- package/dist/react/components/react/index.d.ts +4 -0
- package/dist/react/components/react/index.d.ts.map +1 -1
- package/dist/react/index.d.ts +4 -0
- package/dist/react/index.esm.js +91 -2
- package/dist/react/index.esm.js.map +1 -1
- package/dist/react/index.js +91 -0
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
package/dist/css/components.css
CHANGED
|
@@ -613,11 +613,11 @@ html:not([data-theme]) .modal-overlay .mds-modal-card {
|
|
|
613
613
|
|
|
614
614
|
/* Theme Support - Default (Dark Theme) */
|
|
615
615
|
:root {
|
|
616
|
-
/* Dashboard Control Variables - Dark Theme */
|
|
617
|
-
--mds-dashboard-control-bg: rgba(
|
|
618
|
-
--mds-dashboard-control-bg-hover: rgba(
|
|
616
|
+
/* Dashboard Control Variables - Dark Theme (default) */
|
|
617
|
+
--mds-dashboard-control-bg: rgba(0, 0, 0, 0.35);
|
|
618
|
+
--mds-dashboard-control-bg-hover: rgba(0, 0, 0, 0.5);
|
|
619
619
|
--mds-dashboard-control-color: #ffffff;
|
|
620
|
-
--mds-dashboard-control-border: rgba(255, 255, 255, 0.
|
|
620
|
+
--mds-dashboard-control-border: rgba(255, 255, 255, 0.18);
|
|
621
621
|
--mds-dashboard-control-border-disabled: rgba(255, 255, 255, 0.3);
|
|
622
622
|
--mds-dashboard-control-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
|
|
623
623
|
--mds-dashboard-control-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.4);
|
|
@@ -626,8 +626,56 @@ html:not([data-theme]) .modal-overlay .mds-modal-card {
|
|
|
626
626
|
/* Dropdown Options - Dark Theme */
|
|
627
627
|
--mds-dashboard-control-option-bg: #2a2a2a;
|
|
628
628
|
--mds-dashboard-control-option-color: #ffffff;
|
|
629
|
+
|
|
630
|
+
/* Login specific variables - Dark Theme */
|
|
631
|
+
--mds-login-bg: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #2a2a2a 100%);
|
|
632
|
+
--mds-input-bg: rgba(255, 255, 255, 0.1);
|
|
633
|
+
--mds-input-focus-border: #aaaaaa;
|
|
634
|
+
--mds-input-focus-bg: rgba(255, 255, 255, 0.15);
|
|
635
|
+
--mds-input-focus-shadow: 0 4px 12px rgba(170, 170, 170, 0.2);
|
|
636
|
+
--mds-error-bg: rgba(200, 200, 200, 0.15);
|
|
637
|
+
--mds-error-border: rgba(200, 200, 200, 0.3);
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
/* Theme Toggle (square, themed) */
|
|
641
|
+
.mds-theme-toggle {
|
|
642
|
+
position: relative;
|
|
643
|
+
display: inline-flex;
|
|
644
|
+
align-items: center;
|
|
645
|
+
justify-content: center;
|
|
646
|
+
width: var(--mds-theme-toggle-size, 2.5rem);
|
|
647
|
+
height: var(--mds-theme-toggle-size, 2.5rem);
|
|
648
|
+
min-width: var(--mds-theme-toggle-size, 2.5rem);
|
|
649
|
+
padding: 0;
|
|
650
|
+
border-radius: var(--mds-spacing-borderRadius-md);
|
|
651
|
+
border: 1px solid var(--mds-dashboard-control-border);
|
|
652
|
+
background-color: var(--mds-dashboard-control-bg);
|
|
653
|
+
color: var(--mds-dashboard-control-color);
|
|
654
|
+
box-shadow: var(--mds-dashboard-control-shadow);
|
|
655
|
+
cursor: pointer;
|
|
656
|
+
outline: none;
|
|
657
|
+
transition: var(--mds-effects-transition-normal);
|
|
629
658
|
}
|
|
630
659
|
|
|
660
|
+
.mds-theme-toggle:hover:not(:disabled) {
|
|
661
|
+
background-color: var(--mds-dashboard-control-bg-hover);
|
|
662
|
+
box-shadow: var(--mds-dashboard-control-shadow-hover);
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
.mds-theme-toggle:disabled {
|
|
666
|
+
opacity: var(--mds-effects-opacity-disabled);
|
|
667
|
+
cursor: not-allowed;
|
|
668
|
+
background-color: transparent !important;
|
|
669
|
+
border: 2px solid var(--mds-dashboard-control-border-disabled);
|
|
670
|
+
box-shadow: none !important;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
.mds-theme-toggle--sm { --mds-theme-toggle-size: 2rem; }
|
|
674
|
+
.mds-theme-toggle--md { --mds-theme-toggle-size: 2.5rem; }
|
|
675
|
+
.mds-theme-toggle--lg { --mds-theme-toggle-size: 3rem; }
|
|
676
|
+
|
|
677
|
+
/* Theme toggle uses SVG icons directly in React component */
|
|
678
|
+
|
|
631
679
|
/* Light Theme Support */
|
|
632
680
|
[data-theme="light"] {
|
|
633
681
|
--mds-dashboard-control-bg: rgba(0, 0, 0, 0.1);
|
|
@@ -642,6 +690,15 @@ html:not([data-theme]) .modal-overlay .mds-modal-card {
|
|
|
642
690
|
/* Dropdown Options - Light Theme */
|
|
643
691
|
--mds-dashboard-control-option-bg: #ffffff;
|
|
644
692
|
--mds-dashboard-control-option-color: #1a1a1a;
|
|
693
|
+
|
|
694
|
+
/* Login specific variables - Light Theme */
|
|
695
|
+
--mds-login-bg: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 50%, #dcdcdc 100%);
|
|
696
|
+
--mds-input-bg: rgba(255, 255, 255, 0.8);
|
|
697
|
+
--mds-input-focus-border: #666666;
|
|
698
|
+
--mds-input-focus-bg: rgba(255, 255, 255, 1);
|
|
699
|
+
--mds-input-focus-shadow: 0 4px 12px rgba(102, 102, 102, 0.15);
|
|
700
|
+
--mds-error-bg: rgba(150, 150, 150, 0.1);
|
|
701
|
+
--mds-error-border: rgba(150, 150, 150, 0.3);
|
|
645
702
|
}
|
|
646
703
|
|
|
647
704
|
/* Form Input Styles */
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { SelectHTMLAttributes } from 'react';
|
|
2
|
+
export interface SelectOption {
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
export interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
|
|
7
|
+
options?: SelectOption[];
|
|
8
|
+
variant?: 'base' | 'dashboard';
|
|
9
|
+
containerClassName?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Select Component (Design System)
|
|
13
|
+
*
|
|
14
|
+
* Provides a themed select element. The `dashboard` variant uses the
|
|
15
|
+
* dashboard control styles/tokens to match the Refresh button styling
|
|
16
|
+
* across light/dark themes.
|
|
17
|
+
*/
|
|
18
|
+
export declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
19
|
+
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAGhE,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAE1E,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IAEzB,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;IAE/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,uFAsCjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/Select/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ThemeToggleProps {
|
|
3
|
+
/**
|
|
4
|
+
* Size variant of the toggle button
|
|
5
|
+
* @default 'md'
|
|
6
|
+
*/
|
|
7
|
+
size?: 'sm' | 'md' | 'lg';
|
|
8
|
+
/**
|
|
9
|
+
* CSS class name to apply
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the toggle is disabled
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Callback when theme changes
|
|
19
|
+
*/
|
|
20
|
+
onChange?: (theme: 'light' | 'dark') => void;
|
|
21
|
+
/**
|
|
22
|
+
* Storage key for persisting theme preference
|
|
23
|
+
* @default 'theme'
|
|
24
|
+
*/
|
|
25
|
+
storageKey?: string;
|
|
26
|
+
}
|
|
27
|
+
export default function ThemeToggle({ size, className, disabled, onChange, storageKey }: ThemeToggleProps): React.JSX.Element;
|
|
28
|
+
//# sourceMappingURL=ThemeToggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeToggle.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/ThemeToggle/ThemeToggle.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAE1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,KAAK,IAAI,CAAC;IAE7C;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,IAAW,EACX,SAAc,EACd,QAAgB,EAChB,QAAQ,EACR,UAAoB,EACrB,EAAE,gBAAgB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAuFtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/ThemeToggle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
export { GlassCard, type GlassCardProps } from './GlassCard';
|
|
2
2
|
export { Typography, BrandLogo, type TypographyProps, type BrandLogoProps } from './Typography';
|
|
3
3
|
export { Button, type ButtonProps } from './Button';
|
|
4
|
+
export { Select, type SelectProps } from './Select';
|
|
5
|
+
export { ThemeToggle, type ThemeToggleProps } from './ThemeToggle';
|
|
4
6
|
export { cn } from '../../utils/cn';
|
|
5
7
|
export * from './GlassCard';
|
|
6
8
|
export * from './Typography';
|
|
7
9
|
export * from './Button';
|
|
10
|
+
export * from './Select';
|
|
8
11
|
export * from './Modal/Modal';
|
|
9
12
|
export * from './Modal/ModalHeader';
|
|
10
13
|
export * from './Modal/ModalBody';
|
|
11
14
|
export * from './Modal/ModalFooter';
|
|
12
15
|
export * from './Modal/ConfirmDialog';
|
|
16
|
+
export * from './ThemeToggle';
|
|
13
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/react/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EACL,UAAU,EACV,SAAS,EACT,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/react/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EACL,UAAU,EACV,SAAS,EACT,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGnE,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAGpC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC"}
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
export { GlassCard, type GlassCardProps } from './GlassCard';
|
|
2
2
|
export { Typography, BrandLogo, type TypographyProps, type BrandLogoProps } from './Typography';
|
|
3
3
|
export { Button, type ButtonProps } from './Button';
|
|
4
|
+
export { Select, type SelectProps } from './Select';
|
|
5
|
+
export { ThemeToggle, type ThemeToggleProps } from './ThemeToggle';
|
|
4
6
|
export { cn } from '../../utils/cn';
|
|
5
7
|
export * from './GlassCard';
|
|
6
8
|
export * from './Typography';
|
|
7
9
|
export * from './Button';
|
|
10
|
+
export * from './Select';
|
|
8
11
|
export * from './Modal/Modal';
|
|
9
12
|
export * from './Modal/ModalHeader';
|
|
10
13
|
export * from './Modal/ModalBody';
|
|
11
14
|
export * from './Modal/ModalFooter';
|
|
12
15
|
export * from './Modal/ConfirmDialog';
|
|
16
|
+
export * from './ThemeToggle';
|
|
13
17
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/react/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import require$$0, { forwardRef, useState,
|
|
1
|
+
import require$$0, { forwardRef, useState, useEffect, useRef } from 'react';
|
|
2
2
|
import { createPortal } from 'react-dom';
|
|
3
3
|
|
|
4
4
|
var jsxRuntime = {exports: {}};
|
|
@@ -1490,6 +1490,95 @@ Button.displayName = 'Button';
|
|
|
1490
1490
|
*/
|
|
1491
1491
|
const LoadingSpinner = () => (jsxRuntimeExports.jsxs("svg", { className: "mds-spinner", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", children: [jsxRuntimeExports.jsx("circle", { className: "mds-spinner__track", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2", fill: "none", opacity: "0.25" }), jsxRuntimeExports.jsx("circle", { className: "mds-spinner__path", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2", fill: "none", strokeDasharray: "40 20", strokeLinecap: "round" })] }));
|
|
1492
1492
|
|
|
1493
|
+
/**
|
|
1494
|
+
* Select Component (Design System)
|
|
1495
|
+
*
|
|
1496
|
+
* Provides a themed select element. The `dashboard` variant uses the
|
|
1497
|
+
* dashboard control styles/tokens to match the Refresh button styling
|
|
1498
|
+
* across light/dark themes.
|
|
1499
|
+
*/
|
|
1500
|
+
const Select = forwardRef(({ options, children, className, containerClassName, variant = 'dashboard', ...rest }, ref) => {
|
|
1501
|
+
const selectEl = (jsxRuntimeExports.jsx("select", { ref: ref, className: cn(variant === 'dashboard'
|
|
1502
|
+
? 'mds-period-filter__select'
|
|
1503
|
+
: 'mds-input mds-select', className), ...rest, children: options
|
|
1504
|
+
? options.map(opt => (jsxRuntimeExports.jsx("option", { value: opt.value, children: opt.label }, opt.value)))
|
|
1505
|
+
: children }));
|
|
1506
|
+
if (variant === 'dashboard') {
|
|
1507
|
+
return (jsxRuntimeExports.jsx("div", { className: cn('mds-period-filter', containerClassName), children: selectEl }));
|
|
1508
|
+
}
|
|
1509
|
+
return selectEl;
|
|
1510
|
+
});
|
|
1511
|
+
Select.displayName = 'Select';
|
|
1512
|
+
|
|
1513
|
+
function ThemeToggle({ size = 'md', className = '', disabled = false, onChange, storageKey = 'theme' }) {
|
|
1514
|
+
const [theme, setTheme] = useState('dark');
|
|
1515
|
+
const [mounted, setMounted] = useState(false);
|
|
1516
|
+
// Initialize theme on mount
|
|
1517
|
+
useEffect(() => {
|
|
1518
|
+
try {
|
|
1519
|
+
if (typeof window !== 'undefined') {
|
|
1520
|
+
const savedTheme = localStorage.getItem(storageKey) || 'dark';
|
|
1521
|
+
setTheme(savedTheme);
|
|
1522
|
+
document.documentElement.setAttribute('data-theme', savedTheme);
|
|
1523
|
+
setMounted(true);
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
catch (err) {
|
|
1527
|
+
setTheme('dark');
|
|
1528
|
+
setMounted(true);
|
|
1529
|
+
}
|
|
1530
|
+
}, [storageKey]);
|
|
1531
|
+
// Listen to external theme changes
|
|
1532
|
+
useEffect(() => {
|
|
1533
|
+
if (typeof window !== 'undefined') {
|
|
1534
|
+
const updateTheme = () => {
|
|
1535
|
+
const currentTheme = document.documentElement.getAttribute('data-theme') || 'dark';
|
|
1536
|
+
setTheme(currentTheme);
|
|
1537
|
+
};
|
|
1538
|
+
const observer = new MutationObserver(() => {
|
|
1539
|
+
updateTheme();
|
|
1540
|
+
});
|
|
1541
|
+
observer.observe(document.documentElement, {
|
|
1542
|
+
attributes: true,
|
|
1543
|
+
attributeFilter: ['data-theme']
|
|
1544
|
+
});
|
|
1545
|
+
return () => observer.disconnect();
|
|
1546
|
+
}
|
|
1547
|
+
}, []);
|
|
1548
|
+
const toggleTheme = () => {
|
|
1549
|
+
if (disabled)
|
|
1550
|
+
return;
|
|
1551
|
+
try {
|
|
1552
|
+
const newTheme = theme === 'light' ? 'dark' : 'light';
|
|
1553
|
+
document.documentElement.setAttribute('data-theme', newTheme);
|
|
1554
|
+
localStorage.setItem(storageKey, newTheme);
|
|
1555
|
+
setTheme(newTheme);
|
|
1556
|
+
onChange?.(newTheme);
|
|
1557
|
+
}
|
|
1558
|
+
catch (err) {
|
|
1559
|
+
console.warn('Failed to toggle theme:', err);
|
|
1560
|
+
}
|
|
1561
|
+
};
|
|
1562
|
+
// Don't render until mounted (prevents hydration mismatch)
|
|
1563
|
+
if (!mounted) {
|
|
1564
|
+
return (jsxRuntimeExports.jsx("div", { className: `mds-theme-toggle mds-theme-toggle--${size} ${className}`, style: { opacity: 0.5 }, "aria-hidden": "true", children: jsxRuntimeExports.jsx(SunIcon, {}) }));
|
|
1565
|
+
}
|
|
1566
|
+
const isDark = theme === 'dark';
|
|
1567
|
+
const buttonClasses = [
|
|
1568
|
+
'mds-theme-toggle',
|
|
1569
|
+
`mds-theme-toggle--${size}`,
|
|
1570
|
+
className
|
|
1571
|
+
].filter(Boolean).join(' ');
|
|
1572
|
+
return (jsxRuntimeExports.jsx("button", { onClick: toggleTheme, className: buttonClasses, disabled: disabled, type: "button", "aria-pressed": isDark, "aria-label": `Switch to ${isDark ? 'light' : 'dark'} mode`, title: `Switch to ${isDark ? 'light' : 'dark'} mode`, children: isDark ? jsxRuntimeExports.jsx(SunIcon, {}) : jsxRuntimeExports.jsx(MoonIcon, {}) }));
|
|
1573
|
+
}
|
|
1574
|
+
// SVG Icons with currentColor for theme compatibility
|
|
1575
|
+
function SunIcon() {
|
|
1576
|
+
return (jsxRuntimeExports.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { color: 'currentColor' }, children: [jsxRuntimeExports.jsx("circle", { cx: "12", cy: "12", r: "5", stroke: "currentColor", strokeWidth: "2" }), jsxRuntimeExports.jsx("path", { d: "M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })] }));
|
|
1577
|
+
}
|
|
1578
|
+
function MoonIcon() {
|
|
1579
|
+
return (jsxRuntimeExports.jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { color: 'currentColor' }, children: jsxRuntimeExports.jsx("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1493
1582
|
function Modal({ open, onClose, closeOnOverlay = true, children, className, style }) {
|
|
1494
1583
|
const [mounted, setMounted] = useState(false);
|
|
1495
1584
|
const [visible, setVisible] = useState(false);
|
|
@@ -1617,5 +1706,5 @@ function ConfirmDialog({ open, onClose, title, description, confirmText = 'Confi
|
|
|
1617
1706
|
return (jsxRuntimeExports.jsx(Modal, { open: open, onClose: onClose, closeOnOverlay: !disableOverlayClose, children: jsxRuntimeExports.jsxs("div", { className: "mds-modal-card", style: { maxWidth: 480, width: '100%' }, children: [jsxRuntimeExports.jsx(ModalHeader, { title: title, icon: icon ?? toneIcon[tone], onClose: onClose, align: "center" }), description && (jsxRuntimeExports.jsx("div", { style: { padding: '0 24px 16px 24px' }, children: description })), jsxRuntimeExports.jsxs("div", { style: { display: 'flex', gap: 12, justifyContent: 'flex-end', borderTop: '1px solid var(--border-color)', padding: '16px 24px', marginTop: 8 }, children: [jsxRuntimeExports.jsx("button", { type: "button", onClick: onClose, className: "mds-button mds-button--secondary", children: cancelText }), jsxRuntimeExports.jsx("button", { type: "button", onClick: onConfirm, disabled: loading, className: "mds-button mds-button--primary", children: loading ? 'Processando...' : confirmText })] })] }) }));
|
|
1618
1707
|
}
|
|
1619
1708
|
|
|
1620
|
-
export { BrandLogo, Button, ConfirmDialog, GlassCard, Modal, ModalBody, ModalFooter, ModalHeader, Typography, cn };
|
|
1709
|
+
export { BrandLogo, Button, ConfirmDialog, GlassCard, Modal, ModalBody, ModalFooter, ModalHeader, Select, ThemeToggle, Typography, cn };
|
|
1621
1710
|
//# sourceMappingURL=index.esm.js.map
|