@proj-airi/ui 0.9.0-beta.2 → 0.9.0-beta.6

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@proj-airi/ui",
3
3
  "type": "module",
4
- "version": "0.9.0-beta.2",
4
+ "version": "0.9.0-beta.6",
5
5
  "description": "A collection of UI components that used by Project AIRI",
6
6
  "author": {
7
7
  "name": "Moeru AI Project AIRI Team",
@@ -16,6 +16,7 @@
16
16
  },
17
17
  "exports": {
18
18
  ".": "./src/index.ts",
19
+ "./main.css": "./src/main.css",
19
20
  "./components/animations": "./src/components/animations/index.ts",
20
21
  "./components/form": "./src/components/form/index.ts",
21
22
  "./components/layouts": "./src/components/layouts/index.ts",
@@ -44,7 +44,7 @@ const variantClasses: Record<ButtonVariant, Record<ButtonTheme, {
44
44
  'primary': {
45
45
  default: {
46
46
  default: [
47
- 'rounded-lg',
47
+ 'rounded-xl',
48
48
  'backdrop-blur-md',
49
49
  'bg-primary-500/15 hover:bg-primary-500/20 active:bg-primary-500/30 dark:bg-primary-700/30 dark:hover:bg-primary-700/40 dark:active:bg-primary-700/30',
50
50
  'focus:ring-primary-300/60 dark:focus:ring-primary-600/30',
@@ -57,7 +57,7 @@ const variantClasses: Record<ButtonVariant, Record<ButtonTheme, {
57
57
  'secondary': {
58
58
  default: {
59
59
  default: [
60
- 'rounded-lg',
60
+ 'rounded-xl',
61
61
  'backdrop-blur-md',
62
62
  'bg-neutral-100/55 hover:bg-neutral-400/20 active:bg-neutral-400/30 dark:bg-neutral-700/60 dark:hover:bg-neutral-700/80 dark:active:bg-neutral-700/60',
63
63
  'focus:ring-neutral-300/30 dark:focus:ring-neutral-600/60 dark:focus:ring-neutral-600/30',
@@ -70,7 +70,7 @@ const variantClasses: Record<ButtonVariant, Record<ButtonTheme, {
70
70
  'secondary-muted': {
71
71
  default: {
72
72
  default: [
73
- 'rounded-lg',
73
+ 'rounded-xl',
74
74
  'backdrop-blur-md',
75
75
  'hover:bg-neutral-50/50 active:bg-neutral-50/90 hover:dark:bg-neutral-800/50 active:dark:bg-neutral-800/90',
76
76
  'border-2 border-solid border-neutral-100/60 dark:border-neutral-800/30',
@@ -83,7 +83,7 @@ const variantClasses: Record<ButtonVariant, Record<ButtonTheme, {
83
83
  'danger': {
84
84
  default: {
85
85
  default: [
86
- 'rounded-lg',
86
+ 'rounded-xl',
87
87
  'backdrop-blur-md',
88
88
  'bg-red-500/15 hover:bg-red-500/20 active:bg-red-500/30 dark:bg-red-700/30 dark:hover:bg-red-700/40 dark:active:bg-red-700/30',
89
89
  'focus:ring-2 focus:ring-red-300/30 dark:focus:ring-red-600/60 dark:focus:ring-red-600/30',
@@ -95,7 +95,7 @@ const variantClasses: Record<ButtonVariant, Record<ButtonTheme, {
95
95
  'caution': {
96
96
  default: {
97
97
  default: [
98
- 'rounded-lg',
98
+ 'rounded-xl',
99
99
  'backdrop-blur-md',
100
100
  'bg-amber-400/20 hover:bg-amber-400/25 active:bg-amber-400/35 dark:bg-amber-500/20 dark:hover:bg-amber-500/30 dark:active:bg-amber-500/35',
101
101
  'focus:ring-2 focus:ring-amber-300/40 dark:focus:ring-amber-400/40',
@@ -0,0 +1,2 @@
1
+ /** Global class from `@proj-airi/ui/main.css`; pairs with useLampFlickerAnimation in stage-ui. */
2
+ export const lampFlickerAnimationClass = 'lamp-flicker-animation' as const
package/src/index.ts CHANGED
@@ -1,8 +1,7 @@
1
- import './fallback.css'
2
-
3
1
  export * from './components/animations'
4
2
  export * from './components/form'
5
3
  export * from './components/layouts'
6
4
  export * from './components/misc'
7
5
  export * from './composables/use-deferred-mount'
8
6
  export * from './composables/use-theme'
7
+ export { lampFlickerAnimationClass } from './constants/lamp-flicker-animation'
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Opacity “lamp flicker” for offline / warning icons.
3
+ * Timing is driven by useLampFlickerAnimation (@proj-airi/stage-ui) via
4
+ * --lamp-flicker-delay and --lamp-flicker-duration.
5
+ * Loaded via @proj-airi/ui/main.css (import from app `styles/main.css`).
6
+ */
7
+ @keyframes lamp-flicker-keyframes {
8
+ 0%,
9
+ 6%,
10
+ 22%,
11
+ 33%,
12
+ 52%,
13
+ 68%,
14
+ 86%,
15
+ 100% {
16
+ opacity: 1;
17
+ }
18
+
19
+ 3% {
20
+ opacity: 0.74;
21
+ }
22
+
23
+ 9% {
24
+ opacity: 0.92;
25
+ }
26
+
27
+ 13% {
28
+ opacity: 0.38;
29
+ }
30
+
31
+ 18% {
32
+ opacity: 0.58;
33
+ }
34
+
35
+ 27% {
36
+ opacity: 0.44;
37
+ }
38
+
39
+ 29% {
40
+ opacity: 0.84;
41
+ }
42
+
43
+ 41% {
44
+ opacity: 0.42;
45
+ }
46
+
47
+ 45% {
48
+ opacity: 0.88;
49
+ }
50
+
51
+ 57% {
52
+ opacity: 0.62;
53
+ }
54
+
55
+ 61% {
56
+ opacity: 0.8;
57
+ }
58
+
59
+ 73% {
60
+ opacity: 0.36;
61
+ }
62
+
63
+ 74.4% {
64
+ opacity: 0.08;
65
+ }
66
+
67
+ 75.2% {
68
+ opacity: 0.82;
69
+ }
70
+
71
+ 78% {
72
+ opacity: 0.94;
73
+ }
74
+
75
+ 91% {
76
+ opacity: 0.52;
77
+ }
78
+ }
79
+
80
+ .lamp-flicker-animation {
81
+ animation-delay: var(--lamp-flicker-delay, 0s);
82
+ animation-duration: var(--lamp-flicker-duration, 6.4s);
83
+ animation-iteration-count: infinite;
84
+ animation-name: lamp-flicker-keyframes;
85
+ animation-timing-function: ease-in-out;
86
+ filter: drop-shadow(0 0 0.14rem rgb(251 191 36 / 0.18));
87
+ will-change: opacity;
88
+ }
package/src/main.css ADDED
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Global styles for @proj-airi/ui. Import once from the app entry stylesheet
3
+ * (e.g. `src/styles/main.css`) so CSS is not tied to JS side-effect imports.
4
+ */
5
+ @import './fallback.css';
6
+ @import './lamp-flicker.css';