@signal9/era-ui 34.1.0 → 34.2.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/CHANGELOG.md +6 -0
- package/dist/ui/alert/alert.svelte +49 -0
- package/dist/ui/alert/alert.svelte.d.ts +15 -0
- package/dist/ui/alert/fixture.svelte +13 -0
- package/dist/ui/alert/fixture.svelte.d.ts +18 -0
- package/dist/ui/alert/index.d.ts +2 -0
- package/dist/ui/alert/index.js +2 -0
- package/dist/ui/alert/variants.d.ts +30 -0
- package/dist/ui/alert/variants.js +18 -0
- package/package.json +6 -1
- package/skills/era-ui/references/releases/34.md +6 -0
- package/skills/era-ui/references/releases/index.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [34.2.0](https://github.com/sig-nine/era-ui/compare/v34.1.0...v34.2.0) (2026-08-23)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **alert:** add inline status feedback ([8dab14c](https://github.com/sig-nine/era-ui/commit/8dab14c40453ba7802a42f29c369baa0f5a4fefb))
|
|
6
|
+
|
|
1
7
|
## [34.1.0](https://github.com/sig-nine/era-ui/compare/v34.0.2...v34.1.0) (2026-08-23)
|
|
2
8
|
|
|
3
9
|
### Features
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Component, Snippet } from 'svelte';
|
|
3
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
|
+
import type { IconProps } from '@lucide/svelte';
|
|
5
|
+
import CircleCheck from '@lucide/svelte/icons/circle-check';
|
|
6
|
+
import CircleX from '@lucide/svelte/icons/circle-x';
|
|
7
|
+
import Info from '@lucide/svelte/icons/info';
|
|
8
|
+
import TriangleAlert from '@lucide/svelte/icons/triangle-alert';
|
|
9
|
+
import { cn } from '../../utils/index.js';
|
|
10
|
+
import { alertIconVariants, alertVariants, type AlertTone } from './variants.js';
|
|
11
|
+
|
|
12
|
+
let {
|
|
13
|
+
ref = $bindable(null),
|
|
14
|
+
tone = 'default',
|
|
15
|
+
role = 'status',
|
|
16
|
+
icon,
|
|
17
|
+
children,
|
|
18
|
+
class: className,
|
|
19
|
+
...restProps
|
|
20
|
+
}: HTMLAttributes<HTMLDivElement> & {
|
|
21
|
+
ref?: HTMLDivElement | null;
|
|
22
|
+
/** Visual meaning. Urgency remains independent: use `role="alert"` only for critical messages. */
|
|
23
|
+
tone?: AlertTone;
|
|
24
|
+
/** Override the tone's glyph, or pass `null` for a text-only message. */
|
|
25
|
+
icon?: Component<IconProps> | null;
|
|
26
|
+
children?: Snippet;
|
|
27
|
+
} = $props();
|
|
28
|
+
|
|
29
|
+
const defaultIcon = $derived.by<Component<IconProps>>(() => {
|
|
30
|
+
switch (tone) {
|
|
31
|
+
case 'success':
|
|
32
|
+
return CircleCheck;
|
|
33
|
+
case 'warning':
|
|
34
|
+
return TriangleAlert;
|
|
35
|
+
case 'destructive':
|
|
36
|
+
return CircleX;
|
|
37
|
+
default:
|
|
38
|
+
return Info;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
const Icon = $derived(icon === undefined ? defaultIcon : icon);
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<div bind:this={ref} {role} data-tone={tone} class={cn(alertVariants(), className)} {...restProps}>
|
|
45
|
+
{#if Icon}
|
|
46
|
+
<Icon class={alertIconVariants({ tone })} aria-hidden="true" />
|
|
47
|
+
{/if}
|
|
48
|
+
<div class="min-w-0 flex-1">{@render children?.()}</div>
|
|
49
|
+
</div>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Component, Snippet } from 'svelte';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import type { IconProps } from '@lucide/svelte';
|
|
4
|
+
import { type AlertTone } from './variants.js';
|
|
5
|
+
type $$ComponentProps = HTMLAttributes<HTMLDivElement> & {
|
|
6
|
+
ref?: HTMLDivElement | null;
|
|
7
|
+
/** Visual meaning. Urgency remains independent: use `role="alert"` only for critical messages. */
|
|
8
|
+
tone?: AlertTone;
|
|
9
|
+
/** Override the tone's glyph, or pass `null` for a text-only message. */
|
|
10
|
+
icon?: Component<IconProps> | null;
|
|
11
|
+
children?: Snippet;
|
|
12
|
+
};
|
|
13
|
+
declare const Alert: Component<$$ComponentProps, {}, "ref">;
|
|
14
|
+
type Alert = ReturnType<typeof Alert>;
|
|
15
|
+
export default Alert;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Alert } from './index.js';
|
|
3
|
+
|
|
4
|
+
const tones = ['default', 'accent', 'info', 'success', 'warning', 'destructive'] as const;
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<div class="flex max-w-xl flex-col gap-gutter">
|
|
8
|
+
{#each tones as tone (tone)}
|
|
9
|
+
<Alert {tone}>{tone} message</Alert>
|
|
10
|
+
{/each}
|
|
11
|
+
<Alert tone="destructive" role="alert">Urgent message</Alert>
|
|
12
|
+
<Alert icon={null}>Text-only message</Alert>
|
|
13
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const Fixture: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type Fixture = InstanceType<typeof Fixture>;
|
|
18
|
+
export default Fixture;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type AlertTone = 'default' | 'accent' | 'destructive' | 'success' | 'warning' | 'info';
|
|
2
|
+
export declare const alertVariants: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "flex min-w-0 items-start gap-gutter rounded-control bg-well p-inset-control text-body leading-body text-fg shadow-sm", {} | {}, undefined, import("tailwind-variants").TVReturnTypeLike<unknown, undefined>>;
|
|
3
|
+
export declare const alertIconVariants: import("tailwind-variants").TVReturnType<{
|
|
4
|
+
tone: {
|
|
5
|
+
default: "text-muted";
|
|
6
|
+
accent: "text-primary";
|
|
7
|
+
destructive: "text-destructive";
|
|
8
|
+
success: "text-success";
|
|
9
|
+
warning: "text-warning";
|
|
10
|
+
info: "text-info";
|
|
11
|
+
};
|
|
12
|
+
}, undefined, "size-icon shrink-0", {
|
|
13
|
+
tone: {
|
|
14
|
+
default: "text-muted";
|
|
15
|
+
accent: "text-primary";
|
|
16
|
+
destructive: "text-destructive";
|
|
17
|
+
success: "text-success";
|
|
18
|
+
warning: "text-warning";
|
|
19
|
+
info: "text-info";
|
|
20
|
+
};
|
|
21
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
22
|
+
tone: {
|
|
23
|
+
default: "text-muted";
|
|
24
|
+
accent: "text-primary";
|
|
25
|
+
destructive: "text-destructive";
|
|
26
|
+
success: "text-success";
|
|
27
|
+
warning: "text-warning";
|
|
28
|
+
info: "text-info";
|
|
29
|
+
};
|
|
30
|
+
}, undefined>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { tv } from '../../utils/index.js';
|
|
2
|
+
export const alertVariants = tv({
|
|
3
|
+
base: 'flex min-w-0 items-start gap-gutter rounded-control bg-well p-inset-control text-body leading-body text-fg shadow-sm'
|
|
4
|
+
});
|
|
5
|
+
export const alertIconVariants = tv({
|
|
6
|
+
base: 'size-icon shrink-0',
|
|
7
|
+
variants: {
|
|
8
|
+
tone: {
|
|
9
|
+
default: 'text-muted',
|
|
10
|
+
accent: 'text-primary',
|
|
11
|
+
destructive: 'text-destructive',
|
|
12
|
+
success: 'text-success',
|
|
13
|
+
warning: 'text-warning',
|
|
14
|
+
info: 'text-info'
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: { tone: 'default' }
|
|
18
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signal9/era-ui",
|
|
3
|
-
"version": "34.
|
|
3
|
+
"version": "34.2.0",
|
|
4
4
|
"packageManager": "npm@11.19.0",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=24 <27",
|
|
@@ -104,6 +104,11 @@
|
|
|
104
104
|
"svelte": "./dist/ui/accordion/index.js",
|
|
105
105
|
"default": "./dist/ui/accordion/index.js"
|
|
106
106
|
},
|
|
107
|
+
"./alert": {
|
|
108
|
+
"types": "./dist/ui/alert/index.d.ts",
|
|
109
|
+
"svelte": "./dist/ui/alert/index.js",
|
|
110
|
+
"default": "./dist/ui/alert/index.js"
|
|
111
|
+
},
|
|
107
112
|
"./alert-dialog": {
|
|
108
113
|
"types": "./dist/ui/alert-dialog/index.d.ts",
|
|
109
114
|
"svelte": "./dist/ui/alert-dialog/index.js",
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Era UI v34 release history
|
|
2
2
|
|
|
3
|
+
## [34.2.0](https://github.com/sig-nine/era-ui/compare/v34.1.0...v34.2.0) (2026-08-23)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **alert:** add inline status feedback ([8dab14c](https://github.com/sig-nine/era-ui/commit/8dab14c40453ba7802a42f29c369baa0f5a4fefb))
|
|
8
|
+
|
|
3
9
|
## [34.1.0](https://github.com/sig-nine/era-ui/compare/v34.0.2...v34.1.0) (2026-08-23)
|
|
4
10
|
|
|
5
11
|
### Features
|
|
@@ -5,7 +5,7 @@ Load only the major versions crossed by an upgrade; use the package-root `CHANGE
|
|
|
5
5
|
|
|
6
6
|
| Major | Range | Releases | History |
|
|
7
7
|
| ---: | --- | ---: | --- |
|
|
8
|
-
| 34 | 34.0.0–34.
|
|
8
|
+
| 34 | 34.0.0–34.2.0 | 5 | [Read](./34.md) |
|
|
9
9
|
| 33 | 33.0.0–33.0.1 | 2 | [Read](./33.md) |
|
|
10
10
|
| 32 | 32.0.0–32.0.1 | 2 | [Read](./32.md) |
|
|
11
11
|
| 31 | 31.0.0–31.0.0 | 1 | [Read](./31.md) |
|