@umituz/web-design-system 5.3.0 → 5.4.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/styles.css +1 -1
- package/package.json +1 -1
- package/src/__tests__/cn.test.ts +0 -3
- package/src/__tests__/component-slots.test.tsx +0 -4
- package/src/__tests__/components.smoke.test.tsx +3 -11
- package/src/__tests__/money.test.tsx +0 -3
- package/src/__tests__/productivity-components.test.tsx +135 -0
- package/src/__tests__/styles.contract.test.ts +0 -13
- package/src/domain/tokens/index.ts +0 -7
- package/src/domain/tokens/responsive-map.tokens.ts +18 -107
- package/src/domain/types/breakpoint.types.ts +9 -13
- package/src/domain/types/component.types.ts +0 -4
- package/src/domain/types/index.ts +0 -5
- package/src/global.d.ts +0 -4
- package/src/index.ts +82 -29
- package/src/infrastructure/constants/breakpoint.constants.ts +0 -31
- package/src/infrastructure/constants/component.constants.ts +0 -4
- package/src/infrastructure/constants/index.ts +0 -5
- package/src/infrastructure/constants/size-variant.constants.ts +0 -33
- package/src/infrastructure/constants/spacing.constants.ts +34 -63
- package/src/infrastructure/constants/timing.constants.ts +0 -18
- package/src/infrastructure/constants/typography.constants.ts +22 -54
- package/src/infrastructure/utils/calculation.utils.ts +0 -9
- package/src/infrastructure/utils/cn.util.ts +0 -18
- package/src/infrastructure/utils/hash.util.ts +0 -5
- package/src/infrastructure/utils/index.ts +0 -5
- package/src/infrastructure/utils/money.utils.ts +0 -7
- package/src/infrastructure/utils/responsive.utils.ts +0 -66
- package/src/presentation/atoms/AspectRatio.tsx +0 -10
- package/src/presentation/atoms/Badge.tsx +0 -5
- package/src/presentation/atoms/BatteryPill.tsx +0 -5
- package/src/presentation/atoms/Button.tsx +0 -2
- package/src/presentation/atoms/Checkbox.tsx +0 -4
- package/src/presentation/atoms/CopyButton.tsx +93 -0
- package/src/presentation/atoms/Divider.tsx +0 -4
- package/src/presentation/atoms/HeatmapStrip.tsx +0 -10
- package/src/presentation/atoms/Hide.tsx +0 -24
- package/src/presentation/atoms/Icon.tsx +0 -4
- package/src/presentation/atoms/IconButton.tsx +0 -4
- package/src/presentation/atoms/Input.tsx +0 -4
- package/src/presentation/atoms/Kbd.tsx +0 -4
- package/src/presentation/atoms/Label.tsx +0 -4
- package/src/presentation/atoms/Link.tsx +0 -4
- package/src/presentation/atoms/Money.tsx +0 -6
- package/src/presentation/atoms/Progress.tsx +0 -6
- package/src/presentation/atoms/Radio.tsx +0 -4
- package/src/presentation/atoms/Separator.tsx +0 -4
- package/src/presentation/atoms/Show.tsx +0 -24
- package/src/presentation/atoms/Skeleton.tsx +0 -4
- package/src/presentation/atoms/Slider.tsx +0 -4
- package/src/presentation/atoms/Sparkline.tsx +0 -4
- package/src/presentation/atoms/Spinner.tsx +0 -4
- package/src/presentation/atoms/StatusDot.tsx +79 -0
- package/src/presentation/atoms/Switch.tsx +0 -4
- package/src/presentation/atoms/Text.tsx +0 -4
- package/src/presentation/atoms/Textarea.tsx +0 -4
- package/src/presentation/atoms/Toggle.tsx +0 -4
- package/src/presentation/atoms/Tooltip.tsx +0 -4
- package/src/presentation/atoms/index.ts +9 -9
- package/src/presentation/hooks/index.ts +0 -5
- package/src/presentation/hooks/useClickOutside.ts +0 -6
- package/src/presentation/hooks/useClipboard.ts +0 -4
- package/src/presentation/hooks/useDebounce.ts +0 -8
- package/src/presentation/hooks/useKeyboard.ts +0 -6
- package/src/presentation/hooks/useLocalStorage.ts +0 -4
- package/src/presentation/hooks/useMediaQuery.ts +0 -37
- package/src/presentation/hooks/useScrollLock.ts +0 -5
- package/src/presentation/hooks/useTheme.ts +9 -13
- package/src/presentation/hooks/useToggle.ts +0 -4
- package/src/presentation/molecules/ActiveFilterTags.tsx +0 -4
- package/src/presentation/molecules/Avatar.tsx +0 -5
- package/src/presentation/molecules/BookmarkButton.tsx +0 -15
- package/src/presentation/molecules/CheckboxGroup.tsx +0 -4
- package/src/presentation/molecules/Chip.tsx +0 -5
- package/src/presentation/molecules/CodeBlock.tsx +0 -5
- package/src/presentation/molecules/ConfirmButton.tsx +125 -0
- package/src/presentation/molecules/Field.tsx +0 -7
- package/src/presentation/molecules/FormField.tsx +1 -5
- package/src/presentation/molecules/InputGroup.tsx +0 -4
- package/src/presentation/molecules/ListItem.tsx +0 -4
- package/src/presentation/molecules/OptionTile.tsx +0 -10
- package/src/presentation/molecules/PasswordInput.tsx +43 -0
- package/src/presentation/molecules/RadioGroup.tsx +0 -4
- package/src/presentation/molecules/RatingStars.tsx +0 -8
- package/src/presentation/molecules/ScrollArea.tsx +0 -4
- package/src/presentation/molecules/SearchBox.tsx +0 -4
- package/src/presentation/molecules/SearchInput.tsx +110 -0
- package/src/presentation/molecules/Select.tsx +0 -4
- package/src/presentation/molecules/StatPill.tsx +0 -5
- package/src/presentation/molecules/TagInput.tsx +0 -7
- package/src/presentation/molecules/Textarea.tsx +0 -4
- package/src/presentation/molecules/Toggle.tsx +0 -4
- package/src/presentation/molecules/Toolbar.tsx +36 -0
- package/src/presentation/molecules/index.ts +25 -8
- package/src/presentation/organisms/Accordion.tsx +0 -4
- package/src/presentation/organisms/Alert.tsx +0 -4
- package/src/presentation/organisms/AvatarStack.tsx +0 -5
- package/src/presentation/organisms/Breadcrumb.tsx +0 -7
- package/src/presentation/organisms/Card.tsx +0 -6
- package/src/presentation/organisms/Checklist.tsx +0 -4
- package/src/presentation/organisms/Collapsible.tsx +0 -4
- package/src/presentation/organisms/ConfirmDialog.tsx +0 -8
- package/src/presentation/organisms/CoverArt.tsx +0 -9
- package/src/presentation/organisms/DataTable.tsx +0 -8
- package/src/presentation/organisms/DateRangePicker.tsx +0 -9
- package/src/presentation/organisms/DescriptionList.tsx +113 -0
- package/src/presentation/organisms/Dialog.tsx +0 -4
- package/src/presentation/organisms/Drawer.tsx +0 -6
- package/src/presentation/organisms/DropdownMenu.tsx +0 -4
- package/src/presentation/organisms/ErrorBoundary.tsx +0 -12
- package/src/presentation/organisms/FileUploader.tsx +0 -9
- package/src/presentation/organisms/FilterPopover.tsx +0 -8
- package/src/presentation/organisms/FormModal.tsx +0 -5
- package/src/presentation/organisms/HoverCard.tsx +0 -4
- package/src/presentation/organisms/KeyValueList.tsx +0 -4
- package/src/presentation/organisms/KpiCard.tsx +0 -6
- package/src/presentation/organisms/Lightbox.tsx +0 -7
- package/src/presentation/organisms/LoadingState.tsx +0 -4
- package/src/presentation/organisms/MapPreview.tsx +0 -9
- package/src/presentation/organisms/MetricCard.tsx +1 -5
- package/src/presentation/organisms/Modal.tsx +0 -4
- package/src/presentation/organisms/PhotoGallery.tsx +0 -9
- package/src/presentation/organisms/PlanPicker.tsx +0 -5
- package/src/presentation/organisms/Popover.tsx +0 -4
- package/src/presentation/organisms/Sheet.tsx +0 -4
- package/src/presentation/organisms/StatCard.tsx +0 -5
- package/src/presentation/organisms/StatsGrid.tsx +110 -0
- package/src/presentation/organisms/StatusBadge.tsx +0 -12
- package/src/presentation/organisms/Stepper.tsx +0 -5
- package/src/presentation/organisms/Table.tsx +0 -4
- package/src/presentation/organisms/Tabs.tsx +0 -7
- package/src/presentation/organisms/Timeline.tsx +0 -8
- package/src/presentation/organisms/Toaster.tsx +0 -9
- package/src/presentation/organisms/ToggleGroup.tsx +0 -4
- package/src/presentation/organisms/index.ts +10 -11
- package/src/presentation/templates/CrudPageTemplate.tsx +69 -0
- package/src/presentation/templates/Form.tsx +0 -4
- package/src/presentation/templates/List.tsx +0 -4
- package/src/presentation/templates/PageHeader.tsx +0 -4
- package/src/presentation/templates/PageLayout.tsx +0 -4
- package/src/presentation/templates/ProjectSkeleton.tsx +0 -4
- package/src/presentation/templates/ResponsiveContainer.tsx +0 -43
- package/src/presentation/templates/Section.tsx +0 -4
- package/src/presentation/templates/SettingsLayout.tsx +102 -0
- package/src/presentation/templates/index.ts +7 -6
- package/src/styles/app.css +0 -18
- package/src/styles/bridge.css +0 -34
- package/src/styles/compile.css +0 -13
- package/src/styles/source.css +0 -12
- package/src/styles/theme.css +0 -27
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { cn } from '../../infrastructure/utils';
|
|
3
|
+
|
|
4
|
+
export interface SettingsNavItem {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
description?: string;
|
|
9
|
+
badge?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface SettingsLayoutProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title' | 'onSelect'> {
|
|
14
|
+
title?: React.ReactNode;
|
|
15
|
+
description?: React.ReactNode;
|
|
16
|
+
navItems: SettingsNavItem[];
|
|
17
|
+
activeId: string;
|
|
18
|
+
onSelect: (id: string) => void;
|
|
19
|
+
actions?: React.ReactNode;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const SettingsLayout = React.forwardRef<HTMLDivElement, SettingsLayoutProps>(
|
|
23
|
+
(
|
|
24
|
+
{
|
|
25
|
+
title = 'Ayarlar',
|
|
26
|
+
description,
|
|
27
|
+
navItems,
|
|
28
|
+
activeId,
|
|
29
|
+
onSelect,
|
|
30
|
+
actions,
|
|
31
|
+
children,
|
|
32
|
+
className,
|
|
33
|
+
...props
|
|
34
|
+
},
|
|
35
|
+
ref
|
|
36
|
+
) => {
|
|
37
|
+
return (
|
|
38
|
+
<div
|
|
39
|
+
ref={ref}
|
|
40
|
+
className={cn('w-full max-w-6xl mx-auto flex flex-col gap-6 p-4 sm:p-6 lg:p-8', className)}
|
|
41
|
+
{...props}
|
|
42
|
+
>
|
|
43
|
+
{/* Header */}
|
|
44
|
+
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 pb-4 border-b border-border">
|
|
45
|
+
<div>
|
|
46
|
+
<h1 className="text-2xl font-bold tracking-tight text-foreground">{title}</h1>
|
|
47
|
+
{description && (
|
|
48
|
+
<p className="text-sm text-muted-foreground mt-1">{description}</p>
|
|
49
|
+
)}
|
|
50
|
+
</div>
|
|
51
|
+
{actions && <div className="flex items-center gap-2 shrink-0">{actions}</div>}
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
{/* Content Layout */}
|
|
55
|
+
<div className="flex flex-col lg:flex-row gap-8 items-start">
|
|
56
|
+
{/* Navigation Sidebar */}
|
|
57
|
+
<nav
|
|
58
|
+
aria-label="Settings navigation"
|
|
59
|
+
className="w-full lg:w-64 shrink-0 flex flex-row lg:flex-col gap-1 overflow-x-auto pb-2 lg:pb-0"
|
|
60
|
+
>
|
|
61
|
+
{navItems.map((item) => {
|
|
62
|
+
const isActive = item.id === activeId;
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<button
|
|
66
|
+
key={item.id}
|
|
67
|
+
type="button"
|
|
68
|
+
disabled={item.disabled}
|
|
69
|
+
onClick={() => onSelect(item.id)}
|
|
70
|
+
className={cn(
|
|
71
|
+
'flex items-center gap-3 px-3.5 py-2.5 rounded-lg text-sm font-medium transition-colors text-left shrink-0 whitespace-nowrap lg:whitespace-normal',
|
|
72
|
+
isActive
|
|
73
|
+
? 'bg-primary/10 text-primary font-semibold'
|
|
74
|
+
: 'text-muted-foreground hover:bg-accent hover:text-foreground',
|
|
75
|
+
item.disabled && 'opacity-50 pointer-events-none'
|
|
76
|
+
)}
|
|
77
|
+
>
|
|
78
|
+
{item.icon && (
|
|
79
|
+
<span className="shrink-0 size-4 flex items-center justify-center [&_svg]:size-4">
|
|
80
|
+
{item.icon}
|
|
81
|
+
</span>
|
|
82
|
+
)}
|
|
83
|
+
<span className="flex-1 truncate">{item.label}</span>
|
|
84
|
+
{item.badge && (
|
|
85
|
+
<span className="text-xs px-2 py-0.5 rounded-full bg-accent text-accent-foreground ml-auto">
|
|
86
|
+
{item.badge}
|
|
87
|
+
</span>
|
|
88
|
+
)}
|
|
89
|
+
</button>
|
|
90
|
+
);
|
|
91
|
+
})}
|
|
92
|
+
</nav>
|
|
93
|
+
|
|
94
|
+
{/* Main Panel Content */}
|
|
95
|
+
<main className="flex-1 w-full min-w-0">{children}</main>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
SettingsLayout.displayName = 'SettingsLayout';
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Templates Export
|
|
3
|
-
* @description Template components - page structures
|
|
4
|
-
* Subpath: @umituz/web-design-system/templates
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
1
|
export { Form, FormActions } from './Form';
|
|
8
2
|
export type { FormProps } from './Form';
|
|
9
3
|
|
|
@@ -24,3 +18,10 @@ export type { ProjectSkeletonProps } from './ProjectSkeleton';
|
|
|
24
18
|
|
|
25
19
|
export { ResponsiveContainer } from './ResponsiveContainer';
|
|
26
20
|
export type { ResponsiveContainerProps, ResponsiveSize } from './ResponsiveContainer';
|
|
21
|
+
|
|
22
|
+
// New Productivity Templates
|
|
23
|
+
export { SettingsLayout } from './SettingsLayout';
|
|
24
|
+
export type { SettingsLayoutProps, SettingsNavItem } from './SettingsLayout';
|
|
25
|
+
|
|
26
|
+
export { CrudPageTemplate } from './CrudPageTemplate';
|
|
27
|
+
export type { CrudPageTemplateProps } from './CrudPageTemplate';
|
package/src/styles/app.css
CHANGED
|
@@ -1,21 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @umituz/web-design-system — Tailwind v4 host entry (semantic palette)
|
|
3
|
-
*
|
|
4
|
-
* Chains the source compile entry with the --app-* semantic bridge, so a
|
|
5
|
-
* Tailwind host imports exactly one package stylesheet and defines its
|
|
6
|
-
* palette as bare `--app-*` custom properties — it never writes `--color-*`
|
|
7
|
-
* mappings or node_modules `@source` paths itself:
|
|
8
|
-
*
|
|
9
|
-
* @import "tailwindcss";
|
|
10
|
-
* @import "tw-animate-css";
|
|
11
|
-
* @import "@umituz/web-design-system/app.css";
|
|
12
|
-
* :root { --app-primary: …; … }
|
|
13
|
-
*
|
|
14
|
-
* The bridge is unlayered, so its `:root` bindings override the theme
|
|
15
|
-
* layer's defaults while the utilities keep resolving through
|
|
16
|
-
* `var(--color-*)`. Required slots fail loudly when a host omits them —
|
|
17
|
-
* see bridge.css for the full contract.
|
|
18
|
-
*/
|
|
19
1
|
|
|
20
2
|
@import "./source.css";
|
|
21
3
|
@import "./bridge.css";
|
package/src/styles/bridge.css
CHANGED
|
@@ -1,33 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @umituz/web-design-system — semantic palette bridge (CSS-camp apps)
|
|
3
|
-
*
|
|
4
|
-
* Bu dosya, Tailwind derlemesi yapmayan (vanilla CSS) uygulamaların
|
|
5
|
-
* `--color-*` semantik paletini kendi renk isimlerine bağlayan KANONİK
|
|
6
|
-
* köprüdür. 8 uygulamada elle kopyalanan `packages.css` eşlemesinin
|
|
7
|
-
* paketteki tek doğru hâlidir — yeni projeler eşlemeyi buradan alır,
|
|
8
|
-
* kendi başına yazmaz.
|
|
9
|
-
*
|
|
10
|
-
* Sözleşme:
|
|
11
|
-
* 1. İçe aktarım sırası (uygulamanın ana css'i):
|
|
12
|
-
* @import "@umituz/web-design-system/styles.css";
|
|
13
|
-
* @import "@umituz/web-design-system/bridge.css";
|
|
14
|
-
* :root { --app-... } ← uygulamanın kendi token'ları (SON)
|
|
15
|
-
* 2. ZORUNLU slotlar (fallback'siz): uygulama 19 çekirdek `--app-*`
|
|
16
|
-
* tokenını tanımlamazsa ilgili renk görünür biçimde bozulur —
|
|
17
|
-
* eksik palet bilinçli olarak gürültülü başarısız olur.
|
|
18
|
-
* 3. OPSİYONEL slotlar: tanımlanmazsa DS'in açık-theme varsayılanı
|
|
19
|
-
* geçerli olur (success/warning/info üçlüsü, primary-soft, font).
|
|
20
|
-
* 4. Karanlık theme: uygulama `[data-theme="dark"] / .dark` altında
|
|
21
|
-
* `--app-*` tokenlarını yeniden tanımlar; köprü otomatik devralır.
|
|
22
|
-
* 5. `--radius-*` ve `--font-mono` bu dosyada YOKTUR: bilinçli isim
|
|
23
|
-
* çakışması doktrini — uygulama kendi css'inde (unlayered)
|
|
24
|
-
* yeniden tanımlayarak ezer.
|
|
25
|
-
* 6. Tailwind-camp uygulamalar (kaynağı `@source` ile derleyenler) bu
|
|
26
|
-
* dosyaya ihtiyaç duymaz; kendi `@theme` paletiyle ezer.
|
|
27
|
-
*/
|
|
28
1
|
|
|
29
2
|
:root {
|
|
30
|
-
/* --- ZORUNLU: yüzeyler & metin --- */
|
|
31
3
|
--color-background: var(--app-background);
|
|
32
4
|
--color-foreground: var(--app-foreground);
|
|
33
5
|
--color-card: var(--app-card);
|
|
@@ -35,13 +7,11 @@
|
|
|
35
7
|
--color-popover: var(--app-popover);
|
|
36
8
|
--color-popover-foreground: var(--app-popover-foreground);
|
|
37
9
|
|
|
38
|
-
/* --- ZORUNLU: marka --- */
|
|
39
10
|
--color-primary: var(--app-primary);
|
|
40
11
|
--color-primary-foreground: var(--app-primary-foreground);
|
|
41
12
|
--color-secondary: var(--app-secondary);
|
|
42
13
|
--color-secondary-foreground: var(--app-secondary-foreground);
|
|
43
14
|
|
|
44
|
-
/* --- ZORUNLU: nötr --- */
|
|
45
15
|
--color-muted: var(--app-muted);
|
|
46
16
|
--color-muted-foreground: var(--app-muted-foreground);
|
|
47
17
|
--color-accent: var(--app-accent);
|
|
@@ -49,12 +19,10 @@
|
|
|
49
19
|
--color-border: var(--app-border);
|
|
50
20
|
--color-input: var(--app-input);
|
|
51
21
|
|
|
52
|
-
/* --- ZORUNLU: yıkıcı & odak --- */
|
|
53
22
|
--color-destructive: var(--app-destructive);
|
|
54
23
|
--color-destructive-foreground: var(--app-destructive-foreground);
|
|
55
24
|
--color-ring: var(--app-ring);
|
|
56
25
|
|
|
57
|
-
/* --- OPSİYONEL: durum üçlüsü (DS açık-theme varsayılanıyla) --- */
|
|
58
26
|
--color-success: var(--app-success, #16a34a);
|
|
59
27
|
--color-success-foreground: var(--app-success-foreground, #ffffff);
|
|
60
28
|
--color-warning: var(--app-warning, #d97706);
|
|
@@ -64,10 +32,8 @@
|
|
|
64
32
|
--color-violet: var(--app-violet, #7c3aed);
|
|
65
33
|
--color-violet-foreground: var(--app-violet-foreground, #ffffff);
|
|
66
34
|
|
|
67
|
-
/* --- OPSİYONEL: dashboard token sözleşmesi (udb bileşenleri bekler) --- */
|
|
68
35
|
--color-primary-soft: var(--app-primary-soft, rgba(37, 99, 235, 0.1));
|
|
69
36
|
|
|
70
|
-
/* --- OPSİYONEL: tipografi --- */
|
|
71
37
|
--font-sans: var(
|
|
72
38
|
--app-font-sans,
|
|
73
39
|
ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
|
package/src/styles/compile.css
CHANGED
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @umituz/web-design-system — Tailwind v4 compile entry
|
|
3
|
-
*
|
|
4
|
-
* Input for the build step (`npm run build`) that produces
|
|
5
|
-
* `dist/styles.css`: Tailwind + animations + the theme layer, with the
|
|
6
|
-
* component source scanned for utility classes.
|
|
7
|
-
*
|
|
8
|
-
* Vanilla hosts import the precompiled output:
|
|
9
|
-
* @import "@umituz/web-design-system/styles.css";
|
|
10
|
-
*
|
|
11
|
-
* Tailwind v4 hosts compile this package's source themselves instead
|
|
12
|
-
* (see README) and must NOT also import the precompiled stylesheet.
|
|
13
|
-
*/
|
|
14
1
|
|
|
15
2
|
@import "tailwindcss";
|
|
16
3
|
@import "tw-animate-css";
|
package/src/styles/source.css
CHANGED
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @umituz/web-design-system — Tailwind v4 host entry
|
|
3
|
-
*
|
|
4
|
-
* Tailwind v4 hosts import this file right after `@import "tailwindcss"`:
|
|
5
|
-
* it registers the theme token layer and scans the component sources so
|
|
6
|
-
* the package's classes compile inside the host's own Tailwind build,
|
|
7
|
-
* restyled by the host's `@theme` overrides. Hosts must NOT also import
|
|
8
|
-
* the precompiled `dist/styles.css` (that is the vanilla-host path).
|
|
9
|
-
*
|
|
10
|
-
* The `@source` directive is resolved relative to this file, so hosts
|
|
11
|
-
* never write node_modules paths themselves.
|
|
12
|
-
*/
|
|
13
1
|
|
|
14
2
|
@import "./theme.css";
|
|
15
3
|
@source "../presentation";
|
package/src/styles/theme.css
CHANGED
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @umituz/web-design-system — theme layer (Tailwind v4 `@theme`)
|
|
3
|
-
*
|
|
4
|
-
* Single source of truth for colors, radii, fonts and shadows. Component
|
|
5
|
-
* classes are semantic (`bg-primary`, `text-muted-foreground`, …) and bind
|
|
6
|
-
* to the `--color-*` variables defined here, so hosts restyle the whole
|
|
7
|
-
* package by overriding variables — no Tailwind rebuild required.
|
|
8
|
-
*
|
|
9
|
-
* The default palette mirrors @umituz/web-dashboard's tokens.css, so
|
|
10
|
-
* dashboard adoption is visually regression-free.
|
|
11
|
-
*
|
|
12
|
-
* Dark mode: add `data-theme="dark"` or `class="dark"` on any ancestor
|
|
13
|
-
* (typically <html>). The package never switches themes on its own.
|
|
14
|
-
*
|
|
15
|
-
* Tailwind v4 hosts that compile the package source themselves
|
|
16
|
-
* (`@source "../node_modules/@umituz/web-design-system/src"`) import this
|
|
17
|
-
* file; vanilla hosts import the precompiled `dist/styles.css`.
|
|
18
|
-
*/
|
|
19
1
|
|
|
20
2
|
@theme {
|
|
21
|
-
/* Surfaces & text */
|
|
22
3
|
--color-background: #f8fafc;
|
|
23
4
|
--color-foreground: #0f172a;
|
|
24
5
|
--color-card: #ffffff;
|
|
@@ -26,13 +7,11 @@
|
|
|
26
7
|
--color-popover: #ffffff;
|
|
27
8
|
--color-popover-foreground: #0f172a;
|
|
28
9
|
|
|
29
|
-
/* Brand */
|
|
30
10
|
--color-primary: #2563eb;
|
|
31
11
|
--color-primary-foreground: #ffffff;
|
|
32
12
|
--color-secondary: #8b5cf6;
|
|
33
13
|
--color-secondary-foreground: #ffffff;
|
|
34
14
|
|
|
35
|
-
/* Neutral */
|
|
36
15
|
--color-muted: #f1f5f9;
|
|
37
16
|
--color-muted-foreground: #64748b;
|
|
38
17
|
--color-accent: #f1f5f9;
|
|
@@ -40,7 +19,6 @@
|
|
|
40
19
|
--color-border: #e2e8f0;
|
|
41
20
|
--color-input: #e2e8f0;
|
|
42
21
|
|
|
43
|
-
/* Semantic */
|
|
44
22
|
--color-destructive: #dc2626;
|
|
45
23
|
--color-destructive-foreground: #ffffff;
|
|
46
24
|
--color-success: #16a34a;
|
|
@@ -52,27 +30,22 @@
|
|
|
52
30
|
--color-violet: #7c3aed;
|
|
53
31
|
--color-violet-foreground: #ffffff;
|
|
54
32
|
|
|
55
|
-
/* Focus */
|
|
56
33
|
--color-ring: rgba(37, 99, 235, 0.45);
|
|
57
34
|
|
|
58
|
-
/* Radii (dashboard scale) */
|
|
59
35
|
--radius-sm: 6px;
|
|
60
36
|
--radius-md: 8px;
|
|
61
37
|
--radius-lg: 12px;
|
|
62
38
|
--radius-xl: 16px;
|
|
63
39
|
|
|
64
|
-
/* Typography */
|
|
65
40
|
--font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
|
|
66
41
|
"Helvetica Neue", Arial, "Noto Sans", sans-serif;
|
|
67
42
|
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
|
|
68
43
|
"Liberation Mono", "Courier New", monospace;
|
|
69
44
|
|
|
70
|
-
/* Elevation (dashboard scale) */
|
|
71
45
|
--shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
|
|
72
46
|
--shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
|
|
73
47
|
--shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.14);
|
|
74
48
|
|
|
75
|
-
/* Accordion (Radix --radix-accordion-content-height driven) */
|
|
76
49
|
--animate-accordion-down: accordion-down 0.2s ease-out;
|
|
77
50
|
--animate-accordion-up: accordion-up 0.2s ease-out;
|
|
78
51
|
|