@wallarm-org/design-system 0.67.3 → 0.68.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.
Files changed (96) hide show
  1. package/dist/components/AnimatedBackground/AnimatedBackground.d.ts +8 -1
  2. package/dist/components/AnimatedBackground/AnimatedBackground.js +9 -118
  3. package/dist/components/AnimatedBackground/blur/BlurBackground.d.ts +6 -0
  4. package/dist/components/AnimatedBackground/blur/BlurBackground.js +129 -0
  5. package/dist/components/AnimatedBackground/blur/index.d.ts +1 -0
  6. package/dist/components/AnimatedBackground/blur/index.js +2 -0
  7. package/dist/components/AnimatedBackground/index.d.ts +3 -2
  8. package/dist/components/AnimatedBackground/index.js +3 -1
  9. package/dist/components/AnimatedBackground/{GameHud.js → pixel/GameHud.js} +1 -1
  10. package/dist/components/AnimatedBackground/pixel/PixelBackground.d.ts +11 -0
  11. package/dist/components/AnimatedBackground/pixel/PixelBackground.js +102 -0
  12. package/dist/components/AnimatedBackground/pixel/index.d.ts +1 -0
  13. package/dist/components/AnimatedBackground/pixel/index.js +2 -0
  14. package/dist/components/AnimatedBackground/{module → pixel/module}/game-logic.js +1 -1
  15. package/dist/components/AnimatedBackground/{module → pixel/module}/index.d.ts +1 -1
  16. package/dist/components/AnimatedBackground/pixel/module/lib.d.ts +2 -0
  17. package/dist/components/AnimatedBackground/pixel/module/lib.js +16 -0
  18. package/dist/components/AnimatedBackground/pixel/module/types.d.ts +38 -0
  19. package/dist/components/Calendar/CalendarInputHeader.js +31 -5
  20. package/dist/components/InputGroup/InputGroup.js +1 -1
  21. package/dist/components/InputGroup/InputGroupAddon.d.ts +1 -1
  22. package/dist/components/InputGroup/InputGroupAddon.js +3 -2
  23. package/dist/components/NavPanel/NavPanelContext.d.ts +9 -1
  24. package/dist/components/NavPanel/NavPanelContext.js +14 -1
  25. package/dist/components/NavPanel/NavPanelGroup.d.ts +1 -3
  26. package/dist/components/NavPanel/NavPanelGroup.js +1 -5
  27. package/dist/components/NavPanel/NavPanelGroupContent.d.ts +1 -1
  28. package/dist/components/NavPanel/NavPanelGroupContent.js +21 -19
  29. package/dist/components/NavPanel/NavPanelGroupItem.js +3 -2
  30. package/dist/components/NavPanel/NavPanelGroupLabel.js +4 -2
  31. package/dist/components/Textarea/Textarea.d.ts +8 -8
  32. package/dist/components/Textarea/Textarea.js +24 -17
  33. package/dist/components/Textarea/classes.d.ts +6 -0
  34. package/dist/components/Textarea/classes.js +20 -0
  35. package/dist/components/Textarea/useAutoResize.d.ts +4 -0
  36. package/dist/components/Textarea/useAutoResize.js +34 -0
  37. package/dist/components/Tree/Tree.d.ts +9 -0
  38. package/dist/components/Tree/Tree.js +48 -0
  39. package/dist/components/Tree/TreeContext.d.ts +11 -0
  40. package/dist/components/Tree/TreeContext.js +19 -0
  41. package/dist/components/Tree/TreeItem.d.ts +10 -0
  42. package/dist/components/Tree/TreeItem.js +46 -0
  43. package/dist/components/Tree/TreeItemContent.d.ts +6 -0
  44. package/dist/components/Tree/TreeItemContent.js +26 -0
  45. package/dist/components/Tree/TreeItemContext.d.ts +8 -0
  46. package/dist/components/Tree/TreeItemContext.js +11 -0
  47. package/dist/components/Tree/TreeItemHeader.d.ts +8 -0
  48. package/dist/components/Tree/TreeItemHeader.js +57 -0
  49. package/dist/components/Tree/TreeItemIcon.d.ts +5 -0
  50. package/dist/components/Tree/TreeItemIcon.js +40 -0
  51. package/dist/components/Tree/index.d.ts +5 -0
  52. package/dist/components/Tree/index.js +6 -0
  53. package/dist/components/TreeBase/TreeBase.d.ts +31 -0
  54. package/dist/components/TreeBase/TreeBase.js +56 -0
  55. package/dist/components/TreeBase/classes.d.ts +7 -0
  56. package/dist/components/TreeBase/classes.js +10 -0
  57. package/dist/components/TreeBase/index.d.ts +1 -0
  58. package/dist/components/TreeBase/index.js +2 -0
  59. package/dist/index.d.ts +1 -0
  60. package/dist/index.js +2 -1
  61. package/dist/metadata/components.json +3561 -1486
  62. package/dist/theme/components/animated-background.css +117 -0
  63. package/dist/theme/index.css +1 -1
  64. package/package.json +1 -1
  65. package/dist/components/AnimatedBackground/module/lib.d.ts +0 -2
  66. package/dist/components/AnimatedBackground/module/lib.js +0 -32
  67. package/dist/components/AnimatedBackground/module/types.d.ts +0 -79
  68. package/dist/theme/components/login-background.css +0 -45
  69. /package/dist/components/AnimatedBackground/{GameHud.d.ts → pixel/GameHud.d.ts} +0 -0
  70. /package/dist/components/AnimatedBackground/{module → pixel/module}/celebration-renderer.d.ts +0 -0
  71. /package/dist/components/AnimatedBackground/{module → pixel/module}/celebration-renderer.js +0 -0
  72. /package/dist/components/AnimatedBackground/{module → pixel/module}/celebration.d.ts +0 -0
  73. /package/dist/components/AnimatedBackground/{module → pixel/module}/celebration.js +0 -0
  74. /package/dist/components/AnimatedBackground/{module → pixel/module}/constants.d.ts +0 -0
  75. /package/dist/components/AnimatedBackground/{module → pixel/module}/constants.js +0 -0
  76. /package/dist/components/AnimatedBackground/{module → pixel/module}/engine-colors.d.ts +0 -0
  77. /package/dist/components/AnimatedBackground/{module → pixel/module}/engine-colors.js +0 -0
  78. /package/dist/components/AnimatedBackground/{module → pixel/module}/engine-grid.d.ts +0 -0
  79. /package/dist/components/AnimatedBackground/{module → pixel/module}/engine-grid.js +0 -0
  80. /package/dist/components/AnimatedBackground/{module → pixel/module}/engine.d.ts +0 -0
  81. /package/dist/components/AnimatedBackground/{module → pixel/module}/engine.js +0 -0
  82. /package/dist/components/AnimatedBackground/{module → pixel/module}/game-logic.d.ts +0 -0
  83. /package/dist/components/AnimatedBackground/{module → pixel/module}/game-plugins.d.ts +0 -0
  84. /package/dist/components/AnimatedBackground/{module → pixel/module}/game-plugins.js +0 -0
  85. /package/dist/components/AnimatedBackground/{module → pixel/module}/game-renderer.d.ts +0 -0
  86. /package/dist/components/AnimatedBackground/{module → pixel/module}/game-renderer.js +0 -0
  87. /package/dist/components/AnimatedBackground/{module → pixel/module}/index.js +0 -0
  88. /package/dist/components/AnimatedBackground/{module → pixel/module}/math.d.ts +0 -0
  89. /package/dist/components/AnimatedBackground/{module → pixel/module}/math.js +0 -0
  90. /package/dist/components/AnimatedBackground/{module → pixel/module}/sfx.d.ts +0 -0
  91. /package/dist/components/AnimatedBackground/{module → pixel/module}/sfx.js +0 -0
  92. /package/dist/components/AnimatedBackground/{module → pixel/module}/types.js +0 -0
  93. /package/dist/components/AnimatedBackground/{module → pixel/module}/useGame.d.ts +0 -0
  94. /package/dist/components/AnimatedBackground/{module → pixel/module}/useGame.js +0 -0
  95. /package/dist/components/AnimatedBackground/{module → pixel/module}/useGameKeyboard.d.ts +0 -0
  96. /package/dist/components/AnimatedBackground/{module → pixel/module}/useGameKeyboard.js +0 -0
@@ -0,0 +1,117 @@
1
+ /* Pixel variant */
2
+
3
+ @font-face {
4
+ font-family: 'Press Start 2P';
5
+ font-style: normal;
6
+ font-weight: 400;
7
+ font-display: swap;
8
+ src: url('https://fonts.gstatic.com/s/pressstart2p/v15/e3t4euO8T-267oIAQAu6jDQyK3nVivM.woff2') format('woff2');
9
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
10
+ U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
11
+ U+2212, U+2215, U+FEFF, U+FFFD;
12
+ }
13
+
14
+ :root {
15
+ --animated-bg-dot: var(--color-slate-500);
16
+ --animated-bg-accent-dot: var(--color-red-400);
17
+ --animated-bg-caught-dot: var(--color-green-500);
18
+ }
19
+
20
+ [data-theme="dark"] {
21
+ --animated-bg-dot: var(--color-slate-500);
22
+ --animated-bg-accent-dot: var(--color-red-400);
23
+ --animated-bg-caught-dot: var(--color-green-300);
24
+ }
25
+
26
+ @keyframes hud-in {
27
+ from {
28
+ opacity: 0;
29
+ transform: translateY(-4px);
30
+ }
31
+ to {
32
+ opacity: 1;
33
+ transform: translateY(0);
34
+ }
35
+ }
36
+
37
+ @keyframes catch-pop {
38
+ 0% {
39
+ transform: scale(1);
40
+ }
41
+ 40% {
42
+ transform: scale(1.25);
43
+ }
44
+ 100% {
45
+ transform: scale(1);
46
+ }
47
+ }
48
+
49
+ /* Blur variant */
50
+
51
+ .lg-frame {
52
+ position: relative;
53
+ overflow: hidden;
54
+ background: #ffffff;
55
+ container-type: inline-size;
56
+ --lg-blur-ref: 360;
57
+ }
58
+
59
+ .lg-mesh {
60
+ position: absolute;
61
+ inset: 0;
62
+ filter: blur(calc(var(--lg-blur-ref, 90) * 100cqw / var(--lg-blur-ref, 360)));
63
+ }
64
+
65
+ .lg-blob {
66
+ position: absolute;
67
+ border-radius: 50%;
68
+ will-change: transform;
69
+ }
70
+
71
+ @keyframes lg-f1 {
72
+ 0% { transform: translate(0, 0) scale(1); }
73
+ 30% { transform: translate(25%, 29%) scale(1.18); }
74
+ 60% { transform: translate(-18%, 34%) scale(0.92); }
75
+ 100% { transform: translate(0, 0) scale(1); }
76
+ }
77
+
78
+ @keyframes lg-f2 {
79
+ 0% { transform: translate(0, 0) scale(1.08); }
80
+ 30% { transform: translate(-29%, 18%) scale(0.88); }
81
+ 60% { transform: translate(-13%, -25%) scale(1.16); }
82
+ 100% { transform: translate(0, 0) scale(1.08); }
83
+ }
84
+
85
+ @keyframes lg-f3 {
86
+ 0% { transform: translate(0, 0) scale(1); }
87
+ 35% { transform: translate(22%, -29%) scale(1.26); }
88
+ 70% { transform: translate(-25%, -9%) scale(0.9); }
89
+ 100% { transform: translate(0, 0) scale(1); }
90
+ }
91
+
92
+ @keyframes lg-f4 {
93
+ 0% { transform: translate(0, 0) scale(1.12); }
94
+ 30% { transform: translate(-25%, -22%) scale(0.86); }
95
+ 60% { transform: translate(17%, -13%) scale(1.2); }
96
+ 100% { transform: translate(0, 0) scale(1.12); }
97
+ }
98
+
99
+ @keyframes lg-f5 {
100
+ 0% { transform: translate(0, 0) scale(1); }
101
+ 35% { transform: translate(-29%, -32%) scale(1.18); }
102
+ 65% { transform: translate(13%, -17%) scale(0.92); }
103
+ 100% { transform: translate(0, 0) scale(1); }
104
+ }
105
+
106
+ @keyframes lg-f6 {
107
+ 0% { transform: translate(0, 0) scale(1); }
108
+ 30% { transform: translate(23%, 25%) scale(1.12); }
109
+ 60% { transform: translate(-22%, 13%) scale(0.92); }
110
+ 100% { transform: translate(0, 0) scale(1); }
111
+ }
112
+
113
+ @media (prefers-reduced-motion: reduce) {
114
+ .lg-blob {
115
+ animation: none !important;
116
+ }
117
+ }
@@ -23,7 +23,7 @@
23
23
  @import './components/accordion.css';
24
24
  @import './components/progress.css';
25
25
  @import './components/product-nav.css';
26
- @import './components/login-background.css';
26
+ @import './components/animated-background.css';
27
27
 
28
28
  [data-scope='scroll-area'][data-part='viewport'] {
29
29
  scrollbar-width: none;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wallarm-org/design-system",
3
- "version": "0.67.3",
3
+ "version": "0.68.0",
4
4
  "description": "Core design system library with React components and Storybook documentation",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -1,2 +0,0 @@
1
- import type { AnimatedBackgroundProps, EngineOptions } from './types';
2
- export declare const resolveOptions: (props: AnimatedBackgroundProps) => EngineOptions;
@@ -1,32 +0,0 @@
1
- const LOGIN_BG_DEFAULTS = {
2
- clean: {
3
- spacing: 20,
4
- bloomRadius: 44,
5
- maxDotSize: 20
6
- },
7
- halftone: {
8
- spacing: 16,
9
- bloomRadius: 80,
10
- maxDotSize: 20
11
- }
12
- };
13
- const resolveOptions = (props)=>{
14
- const texture = props.texture ?? 'halftone';
15
- const d = LOGIN_BG_DEFAULTS[texture];
16
- return {
17
- texture,
18
- spacing: props.spacing ?? d.spacing,
19
- sweepPeriod: props.sweepPeriod ?? 12.5,
20
- bloomRadius: props.bloomRadius ?? d.bloomRadius,
21
- anomalyInterval: props.anomalyInterval ?? 1.4,
22
- intensity: props.intensity ?? 0.9,
23
- bloomAlpha: props.bloomAlpha ?? 0.2,
24
- maxDotSize: props.maxDotSize ?? d.maxDotSize,
25
- tilt: props.tilt ?? 16,
26
- dotColorVar: props.dotColorVar ?? '--animated-bg-dot',
27
- accentColorVar: props.accentColorVar ?? '--animated-bg-accent-dot',
28
- baseColorVar: props.baseColorVar ?? '--color-component-app-shell-bg',
29
- caughtColorVar: props.caughtColorVar ?? '--animated-bg-caught-dot'
30
- };
31
- };
32
- export { resolveOptions };
@@ -1,79 +0,0 @@
1
- import type { HTMLAttributes, ReactNode, Ref } from 'react';
2
- export type Texture = 'clean' | 'halftone';
3
- export interface AnimatedBackgroundProps extends HTMLAttributes<HTMLDivElement> {
4
- ref?: Ref<HTMLDivElement>;
5
- /** Content rendered centered above the animated canvas. */
6
- children?: ReactNode;
7
- /** Variant A (`clean`) vs Variant B (`halftone`). */
8
- texture?: Texture;
9
- /** Grid cell size in px. */
10
- spacing?: number;
11
- /** Seconds for one L->R sweep pass. */
12
- sweepPeriod?: number;
13
- /** How far from the scan line (px) dots react. */
14
- bloomRadius?: number;
15
- /** Minimum seconds between orange events. Higher = rarer. */
16
- anomalyInterval?: number;
17
- /** Global opacity/strength multiplier (0-1). */
18
- intensity?: number;
19
- /** Peak alpha of fully-bloomed (emphasized) dots, before intensity. */
20
- bloomAlpha?: number;
21
- /** Halftone only: cap on a bloomed pixel's full edge length (px). */
22
- maxDotSize?: number;
23
- /** Sweep-line tilt in degrees (0 = vertical; positive leans the top right). */
24
- tilt?: number;
25
- /** CSS custom-property name for the dot color. */
26
- dotColorVar?: string;
27
- /** CSS custom-property name for the "caught" accent. */
28
- accentColorVar?: string;
29
- /** CSS custom-property name for the base fill. */
30
- baseColorVar?: string;
31
- /** CSS custom-property name for the "neutralised" (caught) color. */
32
- caughtColorVar?: string;
33
- /** Force a single static frame (also auto-true under reduced motion). */
34
- paused?: boolean;
35
- /** Enable the interactive shooter easter egg (halftone only). Default: false. */
36
- game?: boolean;
37
- /** Card dimensions for spawn-exclusion when game is enabled. */
38
- excludeCardSize?: {
39
- width: number;
40
- height: number;
41
- };
42
- }
43
- export interface EngineOptions {
44
- texture: Texture;
45
- /** Grid cell size in px. */
46
- spacing: number;
47
- /** Seconds for one L→R sweep pass. */
48
- sweepPeriod: number;
49
- /** How far from the scan line (px) dots react. */
50
- bloomRadius: number;
51
- /** Minimum seconds between accent events. */
52
- anomalyInterval: number;
53
- /** Global opacity multiplier (0–1). */
54
- intensity: number;
55
- /** Peak alpha of bloomed dots before `intensity`. */
56
- bloomAlpha: number;
57
- /** Halftone only: cap on a bloomed pixel's edge length (px). */
58
- maxDotSize: number;
59
- /** Sweep-line tilt in degrees (0 = vertical). */
60
- tilt: number;
61
- /** CSS custom-property names resolved at runtime. */
62
- dotColorVar: string;
63
- accentColorVar: string;
64
- baseColorVar: string;
65
- /** CSS custom-property name for the "caught" (neutralised) color. */
66
- caughtColorVar: string;
67
- }
68
- export interface GameStats {
69
- /** Lifetime catches — drives the arming gate (≥ 5); reset only by exitGame. */
70
- kills: number;
71
- /** Threats stopped THIS round (HIT numerator). */
72
- stopped: number;
73
- /** Threats that timed out unshot THIS round. */
74
- escaped: number;
75
- /** Attacks spawned this round (caps at ROUND_ATTACKS). */
76
- spawned: number;
77
- /** Round complete — full wave spawned AND field cleared. */
78
- done: boolean;
79
- }
@@ -1,45 +0,0 @@
1
- @font-face {
2
- font-family: 'Press Start 2P';
3
- font-style: normal;
4
- font-weight: 400;
5
- font-display: swap;
6
- src: url('https://fonts.gstatic.com/s/pressstart2p/v15/e3t4euO8T-267oIAQAu6jDQyK3nVivM.woff2') format('woff2');
7
- unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
8
- U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
9
- U+2212, U+2215, U+FEFF, U+FFFD;
10
- }
11
-
12
- :root {
13
- --animated-bg-dot: var(--color-slate-500);
14
- --animated-bg-accent-dot: var(--color-red-400);
15
- --animated-bg-caught-dot: var(--color-green-500);
16
- }
17
-
18
- [data-theme="dark"] {
19
- --animated-bg-dot: var(--color-slate-500);
20
- --animated-bg-accent-dot: var(--color-red-400);
21
- --animated-bg-caught-dot: var(--color-green-300);
22
- }
23
-
24
- @keyframes hud-in {
25
- from {
26
- opacity: 0;
27
- transform: translateY(-4px);
28
- }
29
- to {
30
- opacity: 1;
31
- transform: translateY(0);
32
- }
33
- }
34
-
35
- @keyframes catch-pop {
36
- 0% {
37
- transform: scale(1);
38
- }
39
- 40% {
40
- transform: scale(1.25);
41
- }
42
- 100% {
43
- transform: scale(1);
44
- }
45
- }