@wellingtonhlc/shared-ui 0.30.0 → 0.30.1
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/README.md +15 -1
- package/dist/components/AppShell.js +1 -1
- package/dist/components/Avatar.d.ts +9 -0
- package/dist/components/Avatar.d.ts.map +1 -0
- package/dist/components/Avatar.js +22 -0
- package/dist/components/ConfirmationDialog.js +2 -2
- package/dist/components/Table.js +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/styles.css +44 -19
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -208,6 +208,7 @@ Componentes disponiveis na API publica:
|
|
|
208
208
|
| Layout | `AppShell`, `Page`, `Sidebar`, `Card`, `StatCard` |
|
|
209
209
|
| Acoes | `Button`, `ActionPrimitives`, `AppShellActions`, `ConfirmationDialog` |
|
|
210
210
|
| Feedback | `Badge`, `EmptyState`, `PageMessage`, `Tooltip`, `CopyableField`, `NotificationCard` |
|
|
211
|
+
| Identidade | `Avatar` |
|
|
211
212
|
| Formularios | `FieldControl`, `FieldGroup`, `TextField`, `TextareaField`, `SelectField`, `SelectionField`, `DateField`, `DecimalField`, `MultiSelectField`, `PasswordInput`, `Switch`, `RadioGroup` |
|
|
212
213
|
| Consulta | `Filter`, `Workspace` |
|
|
213
214
|
| Dados | `Table`, `Pagination`, `TabsUnderlined` |
|
|
@@ -261,7 +262,7 @@ import { RadioGroup } from '@wellingtonhlc/shared-ui';
|
|
|
261
262
|
</RadioGroup>;
|
|
262
263
|
```
|
|
263
264
|
|
|
264
|
-
## AppShell.Topbar.Button
|
|
265
|
+
## AppShell.Topbar.Button
|
|
265
266
|
|
|
266
267
|
Use `AppShell.Topbar.Button` para acoes de icone na barra superior, como notificacoes,
|
|
267
268
|
configuracoes e atalhos globais. O componente reutiliza o mesmo contrato visual dos
|
|
@@ -277,6 +278,19 @@ import { Bell, Settings } from 'lucide-react';
|
|
|
277
278
|
</AppShell.Actions>
|
|
278
279
|
```
|
|
279
280
|
|
|
281
|
+
`AppShell.Topbar.Button` usa 32 px por padrão, a mesma escala do `Avatar size="md"`.
|
|
282
|
+
|
|
283
|
+
## Avatar
|
|
284
|
+
|
|
285
|
+
`Avatar` exibe uma imagem ou as iniciais acessíveis do nome informado. As cores do fallback
|
|
286
|
+
usam `--avatar-background` e `--avatar-foreground`, com contraste mais escuro no tema dark.
|
|
287
|
+
|
|
288
|
+
```tsx
|
|
289
|
+
import { Avatar } from '@wellingtonhlc/shared-ui/components/Avatar';
|
|
290
|
+
|
|
291
|
+
<Avatar name="Wellington Silva" src={avatarUrl} />
|
|
292
|
+
```
|
|
293
|
+
|
|
280
294
|
## Sidebar
|
|
281
295
|
|
|
282
296
|
Use `Sidebar.ActionButton`, `Sidebar.SubActionButton` e `Sidebar.NavGroup` para navegação.
|
|
@@ -24,7 +24,7 @@ const ContentColumn = forwardRef(({ children, className }, ref) => (_jsx("div",
|
|
|
24
24
|
ContentColumn.displayName = 'AppShell.ContentColumn';
|
|
25
25
|
const WorkArea = forwardRef(({ children, className }, ref) => (_jsx("div", { ref: ref, className: cn('flex min-h-0 min-w-0 flex-1 flex-col-reverse overflow-hidden md:flex-col', className), children: children })));
|
|
26
26
|
WorkArea.displayName = 'AppShell.WorkArea';
|
|
27
|
-
const TopbarButton = forwardRef(({ className, ...props }, ref) => (_jsx(AppShellActionButton, { ref: ref, className: cn('relative size-
|
|
27
|
+
const TopbarButton = forwardRef(({ className, ...props }, ref) => (_jsx(AppShellActionButton, { ref: ref, className: cn('relative size-8 min-h-8 min-w-8 !rounded-full', className), ...props })));
|
|
28
28
|
TopbarButton.displayName = 'AppShell.Topbar.Button';
|
|
29
29
|
const TopbarRoot = forwardRef(({ actions, actionsClassName, children, className, icon, mobileToggle, pageTitle, titleContainerClassName, }, ref) => (_jsxs("header", { ref: ref, className: cn('border-app-border bg-[var(--topbar-background)] flex min-h-16 items-center justify-between border-b px-4 pr-4 shadow-[var(--shadow-topbar)] max-md:pl-0', className), role: "banner", children: [_jsxs("div", { className: cn('flex min-w-0 items-center gap-2.5 max-md:gap-3', titleContainerClassName), children: [mobileToggle, icon && _jsx("span", { className: "shrink-0 text-foreground-muted", "aria-hidden": "true", children: icon }), _jsx("span", { className: "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap text-lg font-semibold leading-7 tracking-[var(--letter-spacing-title)] text-foreground-muted", children: pageTitle })] }), (children || actions) && (_jsxs("div", { className: cn('flex shrink-0 items-center gap-4', actionsClassName), children: [children, actions] }))] })));
|
|
30
30
|
TopbarRoot.displayName = 'AppShell.Topbar';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export type AvatarSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {
|
|
4
|
+
name: string;
|
|
5
|
+
size?: AvatarSize;
|
|
6
|
+
src?: string | null;
|
|
7
|
+
}
|
|
8
|
+
export declare function Avatar({ className, name, size, src, ...props }: AvatarProps): import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../src/components/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,MAAM,WAAW,WAAY,SAAQ,cAAc,CAAC,eAAe,CAAC;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAiBD,wBAAgB,MAAM,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAW,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,+BAoBlF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '../utils/cn';
|
|
3
|
+
const sizeClasses = {
|
|
4
|
+
sm: 'size-7 text-xs',
|
|
5
|
+
md: 'size-8 text-sm',
|
|
6
|
+
lg: 'size-10 text-sm',
|
|
7
|
+
};
|
|
8
|
+
function getInitials(name) {
|
|
9
|
+
const parts = name.trim().split(/\s+/).filter(Boolean);
|
|
10
|
+
if (parts.length === 0)
|
|
11
|
+
return '?';
|
|
12
|
+
if (parts.length === 1)
|
|
13
|
+
return parts[0].charAt(0).toUpperCase();
|
|
14
|
+
return `${parts[0].charAt(0)}${parts[parts.length - 1].charAt(0)}`.toUpperCase();
|
|
15
|
+
}
|
|
16
|
+
export function Avatar({ className, name, size = 'md', src, ...props }) {
|
|
17
|
+
const classes = cn('inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-[var(--avatar-background)] font-semibold text-[var(--avatar-foreground)] select-none', sizeClasses[size], className);
|
|
18
|
+
if (src) {
|
|
19
|
+
return (_jsx("span", { className: classes, ...props, children: _jsx("img", { className: "size-full object-cover", src: src, alt: name }) }));
|
|
20
|
+
}
|
|
21
|
+
return (_jsx("span", { className: classes, role: "img", "aria-label": name, ...props, children: getInitials(name) }));
|
|
22
|
+
}
|
|
@@ -26,8 +26,8 @@ const dialogVariantStyles = {
|
|
|
26
26
|
},
|
|
27
27
|
destructive: {
|
|
28
28
|
icon: AlertCircleIcon,
|
|
29
|
-
iconClassName: 'text-[var(--
|
|
30
|
-
titleClassName: 'text-[var(--
|
|
29
|
+
iconClassName: 'text-[var(--destructive)]',
|
|
30
|
+
titleClassName: 'text-[var(--destructive)]',
|
|
31
31
|
},
|
|
32
32
|
};
|
|
33
33
|
const buttonVariantDefaults = {
|
package/dist/components/Table.js
CHANGED
|
@@ -86,8 +86,8 @@ const ActionCell = forwardRef(({ children, className, style, ...props }, ref) =>
|
|
|
86
86
|
}, ...props, children: _jsx("div", { className: "flex min-h-7 items-center justify-center", children: children }) })));
|
|
87
87
|
ActionCell.displayName = 'Table.ActionCell';
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
90
|
-
*
|
|
89
|
+
* Success usa o token de status. Danger representa uma acao destrutiva e usa o
|
|
90
|
+
* token forte `--destructive`, sem herdar o rosa dos status sobre fundo escuro.
|
|
91
91
|
*
|
|
92
92
|
* `!` obrigatorio: o cn do pacote nao usa tailwind-merge, entao sem ele o
|
|
93
93
|
* `text-foreground-muted`/`hover:bg` do ghost venceria pela ordem do CSS.
|
|
@@ -95,7 +95,7 @@ ActionCell.displayName = 'Table.ActionCell';
|
|
|
95
95
|
const actionToneClasses = {
|
|
96
96
|
default: '',
|
|
97
97
|
success: 'text-[var(--status-success-icon)]! hover:bg-[color-mix(in_srgb,var(--status-success-icon)_10%,transparent)]! hover:text-[var(--status-success-icon)]! dark:hover:bg-[color-mix(in_srgb,var(--status-success-icon)_16%,transparent)]!',
|
|
98
|
-
danger: 'text-[var(--
|
|
98
|
+
danger: 'text-[var(--destructive)]! hover:bg-[color-mix(in_srgb,var(--destructive)_10%,transparent)]! hover:text-[var(--destructive)]! dark:hover:bg-[color-mix(in_srgb,var(--destructive)_16%,transparent)]!',
|
|
99
99
|
};
|
|
100
100
|
const Action = forwardRef(({ className, size = 'xs', tone = 'default', tooltip, ...props }, ref) => (
|
|
101
101
|
// `props` vem primeiro: o corpo (variant/size/className) e do Table.Action, e nao
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { cn } from './utils/cn';
|
|
|
2
2
|
export { AppShell, type AppShellContentMode, type AppShellMainProps, type AppShellOverlayProps, type AppShellOverlayVariant, type AppShellTopbarButtonProps, type AppShellTopbarProps, } from './components/AppShell';
|
|
3
3
|
export { AppShellActionButton, AppShellActions, AppShellActionsSeparator, type AppShellActionButtonProps, type AppShellActionButtonVariant, type AppShellActionsAlign, type AppShellActionsProps, type AppShellActionsRegion, type AppShellActionsSeparatorProps, } from './components/AppShellActions';
|
|
4
4
|
export { Badge, type BadgeProps, type BadgeVariant } from './components/Badge';
|
|
5
|
+
export { Avatar, type AvatarProps, type AvatarSize } from './components/Avatar';
|
|
5
6
|
export { Banner, type BannerProps, type BannerSize, type BannerVariant } from './components/Banner';
|
|
6
7
|
export { Button, type ButtonProps, type ButtonSize, type ButtonVariant } from './components/Button';
|
|
7
8
|
export { Loading, type LoadingProps, type LoadingSize } from './components/Loading';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAChC,OAAO,EACL,QAAQ,EACR,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,GACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,wBAAwB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,6BAA6B,GACnC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpG,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpG,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,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AkB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EACL,KAAK,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,+BAA+B,EAC/B,yBAAyB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC/G,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EACL,wBAAwB,EACxB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,6BAA6B,EAClC,KAAK,qBAAqB,GAC3B,MAAM,uCAAuC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,OAAO,EACL,IAAI,EACJ,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,WAAW,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC9G,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,GAC7B,MAAM,+BAA+B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export { cn } from './utils/cn';
|
|
|
2
2
|
export { AppShell, } from './components/AppShell';
|
|
3
3
|
export { AppShellActionButton, AppShellActions, AppShellActionsSeparator, } from './components/AppShellActions';
|
|
4
4
|
export { Badge } from './components/Badge';
|
|
5
|
+
export { Avatar } from './components/Avatar';
|
|
5
6
|
export { Banner } from './components/Banner';
|
|
6
7
|
export { Button } from './components/Button';
|
|
7
8
|
export { Loading } from './components/Loading';
|
package/dist/styles.css
CHANGED
|
@@ -1159,6 +1159,10 @@ h2.react-datepicker__current-month {
|
|
|
1159
1159
|
width: calc(var(--spacing) * 14);
|
|
1160
1160
|
height: calc(var(--spacing) * 14);
|
|
1161
1161
|
}
|
|
1162
|
+
.size-full {
|
|
1163
|
+
width: 100%;
|
|
1164
|
+
height: 100%;
|
|
1165
|
+
}
|
|
1162
1166
|
.\!h-4 {
|
|
1163
1167
|
height: calc(var(--spacing) * 4) !important;
|
|
1164
1168
|
}
|
|
@@ -2086,6 +2090,9 @@ h2.react-datepicker__current-month {
|
|
|
2086
2090
|
background-color: color-mix(in srgb,var(--foreground-muted) 18%,var(--surface));
|
|
2087
2091
|
}
|
|
2088
2092
|
}
|
|
2093
|
+
.bg-\[var\(--avatar-background\)\] {
|
|
2094
|
+
background-color: var(--avatar-background);
|
|
2095
|
+
}
|
|
2089
2096
|
.bg-\[var\(--brand\)\] {
|
|
2090
2097
|
background-color: var(--brand);
|
|
2091
2098
|
}
|
|
@@ -2200,6 +2207,9 @@ h2.react-datepicker__current-month {
|
|
|
2200
2207
|
.fill-surface {
|
|
2201
2208
|
fill: var(--color-surface);
|
|
2202
2209
|
}
|
|
2210
|
+
.object-cover {
|
|
2211
|
+
object-fit: cover;
|
|
2212
|
+
}
|
|
2203
2213
|
.\!p-0 {
|
|
2204
2214
|
padding: calc(var(--spacing) * 0) !important;
|
|
2205
2215
|
}
|
|
@@ -2580,9 +2590,18 @@ h2.react-datepicker__current-month {
|
|
|
2580
2590
|
color: color-mix(in srgb,var(--destructive) 86%,var(--foreground));
|
|
2581
2591
|
}
|
|
2582
2592
|
}
|
|
2593
|
+
.text-\[var\(--avatar-foreground\)\] {
|
|
2594
|
+
color: var(--avatar-foreground);
|
|
2595
|
+
}
|
|
2583
2596
|
.text-\[var\(--brand\)\] {
|
|
2584
2597
|
color: var(--brand);
|
|
2585
2598
|
}
|
|
2599
|
+
.text-\[var\(--destructive\)\] {
|
|
2600
|
+
color: var(--destructive);
|
|
2601
|
+
}
|
|
2602
|
+
.text-\[var\(--destructive\)\]\! {
|
|
2603
|
+
color: var(--destructive) !important;
|
|
2604
|
+
}
|
|
2586
2605
|
.text-\[var\(--on-solid\)\] {
|
|
2587
2606
|
color: var(--on-solid);
|
|
2588
2607
|
}
|
|
@@ -2592,9 +2611,6 @@ h2.react-datepicker__current-month {
|
|
|
2592
2611
|
.text-\[var\(--status-danger-icon\)\] {
|
|
2593
2612
|
color: var(--status-danger-icon);
|
|
2594
2613
|
}
|
|
2595
|
-
.text-\[var\(--status-danger-icon\)\]\! {
|
|
2596
|
-
color: var(--status-danger-icon) !important;
|
|
2597
|
-
}
|
|
2598
2614
|
.text-\[var\(--status-danger-text\)\] {
|
|
2599
2615
|
color: var(--status-danger-text);
|
|
2600
2616
|
}
|
|
@@ -3186,32 +3202,32 @@ h2.react-datepicker__current-month {
|
|
|
3186
3202
|
}
|
|
3187
3203
|
}
|
|
3188
3204
|
}
|
|
3189
|
-
.hover\:bg-\[color-mix\(in_srgb\,var\(--
|
|
3205
|
+
.hover\:bg-\[color-mix\(in_srgb\,var\(--destructive\)_10\%\,transparent\)\]\! {
|
|
3190
3206
|
&:hover {
|
|
3191
3207
|
@media (hover: hover) {
|
|
3192
|
-
background-color: var(--
|
|
3208
|
+
background-color: var(--destructive) !important;
|
|
3193
3209
|
@supports (color: color-mix(in lab, red, red)) {
|
|
3194
|
-
background-color: color-mix(in srgb,var(--
|
|
3210
|
+
background-color: color-mix(in srgb,var(--destructive) 10%,transparent) !important;
|
|
3195
3211
|
}
|
|
3196
3212
|
}
|
|
3197
3213
|
}
|
|
3198
3214
|
}
|
|
3199
|
-
.hover\:bg-\[color-mix\(in_srgb\,var\(--
|
|
3215
|
+
.hover\:bg-\[color-mix\(in_srgb\,var\(--foreground-muted\)_8\%\,var\(--tabs-background\)\)\] {
|
|
3200
3216
|
&:hover {
|
|
3201
3217
|
@media (hover: hover) {
|
|
3202
|
-
background-color: var(--
|
|
3218
|
+
background-color: var(--foreground-muted);
|
|
3203
3219
|
@supports (color: color-mix(in lab, red, red)) {
|
|
3204
|
-
background-color: color-mix(in srgb,var(--
|
|
3220
|
+
background-color: color-mix(in srgb,var(--foreground-muted) 8%,var(--tabs-background));
|
|
3205
3221
|
}
|
|
3206
3222
|
}
|
|
3207
3223
|
}
|
|
3208
3224
|
}
|
|
3209
|
-
.hover\:bg-\[color-mix\(in_srgb\,var\(--status-danger-
|
|
3225
|
+
.hover\:bg-\[color-mix\(in_srgb\,var\(--status-danger-bg\)_78\%\,var\(--status-danger-border\)\)\] {
|
|
3210
3226
|
&:hover {
|
|
3211
3227
|
@media (hover: hover) {
|
|
3212
|
-
background-color: var(--status-danger-
|
|
3228
|
+
background-color: var(--status-danger-bg);
|
|
3213
3229
|
@supports (color: color-mix(in lab, red, red)) {
|
|
3214
|
-
background-color: color-mix(in srgb,var(--status-danger-
|
|
3230
|
+
background-color: color-mix(in srgb,var(--status-danger-bg) 78%,var(--status-danger-border));
|
|
3215
3231
|
}
|
|
3216
3232
|
}
|
|
3217
3233
|
}
|
|
@@ -3385,17 +3401,17 @@ h2.react-datepicker__current-month {
|
|
|
3385
3401
|
}
|
|
3386
3402
|
}
|
|
3387
3403
|
}
|
|
3388
|
-
.hover\:text-\[var\(--
|
|
3404
|
+
.hover\:text-\[var\(--destructive\)\]\! {
|
|
3389
3405
|
&:hover {
|
|
3390
3406
|
@media (hover: hover) {
|
|
3391
|
-
color: var(--
|
|
3407
|
+
color: var(--destructive) !important;
|
|
3392
3408
|
}
|
|
3393
3409
|
}
|
|
3394
3410
|
}
|
|
3395
|
-
.hover\:text-\[var\(--
|
|
3411
|
+
.hover\:text-\[var\(--on-solid\)\] {
|
|
3396
3412
|
&:hover {
|
|
3397
3413
|
@media (hover: hover) {
|
|
3398
|
-
color: var(--
|
|
3414
|
+
color: var(--on-solid);
|
|
3399
3415
|
}
|
|
3400
3416
|
}
|
|
3401
3417
|
}
|
|
@@ -4121,13 +4137,13 @@ h2.react-datepicker__current-month {
|
|
|
4121
4137
|
}
|
|
4122
4138
|
}
|
|
4123
4139
|
}
|
|
4124
|
-
.dark\:hover\:bg-\[color-mix\(in_srgb\,var\(--
|
|
4140
|
+
.dark\:hover\:bg-\[color-mix\(in_srgb\,var\(--destructive\)_16\%\,transparent\)\]\! {
|
|
4125
4141
|
@media (prefers-color-scheme: dark) {
|
|
4126
4142
|
&:hover {
|
|
4127
4143
|
@media (hover: hover) {
|
|
4128
|
-
background-color: var(--
|
|
4144
|
+
background-color: var(--destructive) !important;
|
|
4129
4145
|
@supports (color: color-mix(in lab, red, red)) {
|
|
4130
|
-
background-color: color-mix(in srgb,var(--
|
|
4146
|
+
background-color: color-mix(in srgb,var(--destructive) 16%,transparent) !important;
|
|
4131
4147
|
}
|
|
4132
4148
|
}
|
|
4133
4149
|
}
|
|
@@ -4606,6 +4622,11 @@ h2.react-datepicker__current-month {
|
|
|
4606
4622
|
@supports (color: color-mix(in lab, red, red)) {
|
|
4607
4623
|
--brand-surface-active: color-mix(in srgb, var(--brand) 16%, transparent);
|
|
4608
4624
|
}
|
|
4625
|
+
--avatar-background: var(--brand);
|
|
4626
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
4627
|
+
--avatar-background: color-mix(in srgb, var(--brand) 88%, #000);
|
|
4628
|
+
}
|
|
4629
|
+
--avatar-foreground: var(--on-solid);
|
|
4609
4630
|
--contrast-hover: color-mix(in srgb, #000 10%, transparent);
|
|
4610
4631
|
--sidebar-background: var(--surface);
|
|
4611
4632
|
--sidebar-flyout-background: var(--surface);
|
|
@@ -4722,6 +4743,10 @@ h2.react-datepicker__current-month {
|
|
|
4722
4743
|
@supports (color: color-mix(in lab, red, red)) {
|
|
4723
4744
|
--brand-surface-active: color-mix(in srgb, var(--brand) 21%, transparent);
|
|
4724
4745
|
}
|
|
4746
|
+
--avatar-background: var(--brand);
|
|
4747
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
4748
|
+
--avatar-background: color-mix(in srgb, var(--brand) 42%, #000);
|
|
4749
|
+
}
|
|
4725
4750
|
--contrast-hover: var(--on-solid);
|
|
4726
4751
|
@supports (color: color-mix(in lab, red, red)) {
|
|
4727
4752
|
--contrast-hover: color-mix(in srgb, var(--on-solid) 10%, transparent);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wellingtonhlc/shared-ui",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "npm@11.12.1",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"prepare": "npm run setup:hooks",
|
|
50
50
|
"build": "node scripts/clean-dist.mjs && tsc -p tsconfig.json && node scripts/copy-assets.mjs",
|
|
51
51
|
"prepack": "npm run build",
|
|
52
|
+
"prepublishOnly": "node scripts/validate-release.mjs --require-tag",
|
|
52
53
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
53
54
|
"test": "vitest run",
|
|
54
55
|
"test:watch": "vitest",
|