@wallarm-org/design-system 3.2.0-rc-feat-app-shell-aside.2 → 3.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.
@@ -15,7 +15,7 @@ const ASIDE_MOTION = {
15
15
  "--app-shell-aside-ease": ASIDE_SLIDE_EASE
16
16
  };
17
17
  const AppShell = (t0)=>{
18
- const $ = c(52);
18
+ const $ = c(54);
19
19
  let appearedProp;
20
20
  let children;
21
21
  let className;
@@ -24,10 +24,11 @@ const AppShell = (t0)=>{
24
24
  let props;
25
25
  let ref;
26
26
  let reveal;
27
+ let style;
27
28
  let t1;
28
29
  let testId;
29
30
  if ($[0] !== t0) {
30
- ({ ref, className, children, reveal, expandFrom, onRevealed, appeared: appearedProp, ambient: t1, "data-testid": testId, ...props } = t0);
31
+ ({ ref, className, children, reveal, expandFrom, onRevealed, appeared: appearedProp, ambient: t1, style, "data-testid": testId, ...props } = t0);
31
32
  $[0] = t0;
32
33
  $[1] = appearedProp;
33
34
  $[2] = children;
@@ -37,8 +38,9 @@ const AppShell = (t0)=>{
37
38
  $[6] = props;
38
39
  $[7] = ref;
39
40
  $[8] = reveal;
40
- $[9] = t1;
41
- $[10] = testId;
41
+ $[9] = style;
42
+ $[10] = t1;
43
+ $[11] = testId;
42
44
  } else {
43
45
  appearedProp = $[1];
44
46
  children = $[2];
@@ -48,90 +50,93 @@ const AppShell = (t0)=>{
48
50
  props = $[6];
49
51
  ref = $[7];
50
52
  reveal = $[8];
51
- t1 = $[9];
52
- testId = $[10];
53
+ style = $[9];
54
+ t1 = $[10];
55
+ testId = $[11];
53
56
  }
54
57
  const ambient = void 0 === t1 ? true : t1;
55
58
  const internalRef = useRef(null);
56
59
  let t2;
57
- if ($[11] !== appearedProp || $[12] !== expandFrom || $[13] !== onRevealed || $[14] !== reveal) {
60
+ if ($[12] !== appearedProp || $[13] !== expandFrom || $[14] !== onRevealed || $[15] !== reveal) {
58
61
  t2 = {
59
62
  reveal,
60
63
  expandFrom,
61
64
  onRevealed,
62
65
  appearedProp
63
66
  };
64
- $[11] = appearedProp;
65
- $[12] = expandFrom;
66
- $[13] = onRevealed;
67
- $[14] = reveal;
68
- $[15] = t2;
69
- } else t2 = $[15];
67
+ $[12] = appearedProp;
68
+ $[13] = expandFrom;
69
+ $[14] = onRevealed;
70
+ $[15] = reveal;
71
+ $[16] = t2;
72
+ } else t2 = $[16];
70
73
  const { phase, targetRect, expandStyle, appeared, handleRevealOverlayTransitionEnd, handleExpandTransitionEnd } = useShellAnimation(internalRef, t2);
71
74
  let t3;
72
- if ($[16] !== appeared) {
75
+ if ($[17] !== appeared) {
73
76
  t3 = {
74
77
  appeared
75
78
  };
76
- $[16] = appeared;
77
- $[17] = t3;
78
- } else t3 = $[17];
79
+ $[17] = appeared;
80
+ $[18] = t3;
81
+ } else t3 = $[18];
79
82
  const shellContext = t3;
80
83
  let t4;
81
- if ($[18] !== ref) {
84
+ if ($[19] !== ref) {
82
85
  t4 = composeRefs(internalRef, ref);
83
- $[18] = ref;
84
- $[19] = t4;
85
- } else t4 = $[19];
86
+ $[19] = ref;
87
+ $[20] = t4;
88
+ } else t4 = $[20];
86
89
  let t5;
87
- if ($[20] !== className) {
88
- t5 = cn('relative isolate grid h-screen overscroll-none [grid-template-areas:"header_header_header""rail_remote_aside"] [grid-template-columns:auto_1fr_0px] [grid-template-rows:auto_1fr] bg-component-app-shell-bg', "[--app-shell-aside-width:--spacing(480)]", "has-[>[data-slot=app-shell-aside][data-state=open]]:[grid-template-columns:auto_1fr_calc(var(--app-shell-aside-width)+var(--spacing-8)*2)] has-[>[data-slot=app-shell-aside]]:overflow-x-clip", "transition-[grid-template-columns] duration-(--app-shell-aside-duration) ease-(--app-shell-aside-ease) motion-reduce:transition-none", className);
89
- $[20] = className;
90
- $[21] = t5;
91
- } else t5 = $[21];
90
+ if ($[21] !== className) {
91
+ t5 = cn('relative isolate grid h-screen overscroll-none [grid-template-areas:"header_header""rail_remote"] [grid-template-columns:auto_1fr] [grid-template-rows:auto_1fr] bg-component-app-shell-bg', "[--app-shell-aside-width:--spacing(480)]", 'has-[>[data-slot=app-shell-aside]]:[grid-template-areas:"header_header_header""rail_remote_aside"] has-[>[data-slot=app-shell-aside]]:[grid-template-columns:auto_1fr_0px] has-[>[data-slot=app-shell-aside]]:overflow-x-clip', "has-[>[data-slot=app-shell-aside][data-state=open]]:[grid-template-columns:auto_1fr_calc(var(--app-shell-aside-width)+var(--spacing-8)*2)]", "transition-[grid-template-columns] duration-(--app-shell-aside-duration) ease-(--app-shell-aside-ease) motion-reduce:transition-none", className);
92
+ $[21] = className;
93
+ $[22] = t5;
94
+ } else t5 = $[22];
92
95
  let t6;
93
- if ($[22] !== expandStyle) {
96
+ if ($[23] !== expandStyle || $[24] !== style) {
94
97
  t6 = {
95
98
  ...ASIDE_MOTION,
99
+ ...style,
96
100
  ...expandStyle
97
101
  };
98
- $[22] = expandStyle;
99
- $[23] = t6;
100
- } else t6 = $[23];
102
+ $[23] = expandStyle;
103
+ $[24] = style;
104
+ $[25] = t6;
105
+ } else t6 = $[25];
101
106
  const t7 = expandFrom ? handleExpandTransitionEnd : void 0;
102
107
  let t8;
103
- if ($[24] !== ambient) {
108
+ if ($[26] !== ambient) {
104
109
  t8 = ambient && /*#__PURE__*/ jsx(AppShellAmbient, {});
105
- $[24] = ambient;
106
- $[25] = t8;
107
- } else t8 = $[25];
110
+ $[26] = ambient;
111
+ $[27] = t8;
112
+ } else t8 = $[27];
108
113
  let t9;
109
- if ($[26] !== expandFrom || $[27] !== phase || $[28] !== targetRect) {
114
+ if ($[28] !== expandFrom || $[29] !== phase || $[30] !== targetRect) {
110
115
  t9 = expandFrom && /*#__PURE__*/ jsx(ExpandOverlay, {
111
116
  phase: phase,
112
117
  expandFrom: expandFrom,
113
118
  targetRect: targetRect
114
119
  });
115
- $[26] = expandFrom;
116
- $[27] = phase;
117
- $[28] = targetRect;
118
- $[29] = t9;
119
- } else t9 = $[29];
120
+ $[28] = expandFrom;
121
+ $[29] = phase;
122
+ $[30] = targetRect;
123
+ $[31] = t9;
124
+ } else t9 = $[31];
120
125
  let t10;
121
- if ($[30] !== expandFrom || $[31] !== handleRevealOverlayTransitionEnd || $[32] !== phase || $[33] !== targetRect) {
126
+ if ($[32] !== expandFrom || $[33] !== handleRevealOverlayTransitionEnd || $[34] !== phase || $[35] !== targetRect) {
122
127
  t10 = !expandFrom && /*#__PURE__*/ jsx(RevealOverlay, {
123
128
  phase: phase,
124
129
  targetRect: targetRect,
125
130
  onTransitionEnd: handleRevealOverlayTransitionEnd
126
131
  });
127
- $[30] = expandFrom;
128
- $[31] = handleRevealOverlayTransitionEnd;
129
- $[32] = phase;
130
- $[33] = targetRect;
131
- $[34] = t10;
132
- } else t10 = $[34];
132
+ $[32] = expandFrom;
133
+ $[33] = handleRevealOverlayTransitionEnd;
134
+ $[34] = phase;
135
+ $[35] = targetRect;
136
+ $[36] = t10;
137
+ } else t10 = $[36];
133
138
  let t11;
134
- if ($[35] !== children || $[36] !== props || $[37] !== t10 || $[38] !== t4 || $[39] !== t5 || $[40] !== t6 || $[41] !== t7 || $[42] !== t8 || $[43] !== t9 || $[44] !== testId) {
139
+ if ($[37] !== children || $[38] !== props || $[39] !== t10 || $[40] !== t4 || $[41] !== t5 || $[42] !== t6 || $[43] !== t7 || $[44] !== t8 || $[45] !== t9 || $[46] !== testId) {
135
140
  t11 = /*#__PURE__*/ jsxs("div", {
136
141
  ...props,
137
142
  ref: t4,
@@ -147,38 +152,38 @@ const AppShell = (t0)=>{
147
152
  t10
148
153
  ]
149
154
  });
150
- $[35] = children;
151
- $[36] = props;
152
- $[37] = t10;
153
- $[38] = t4;
154
- $[39] = t5;
155
- $[40] = t6;
156
- $[41] = t7;
157
- $[42] = t8;
158
- $[43] = t9;
159
- $[44] = testId;
160
- $[45] = t11;
161
- } else t11 = $[45];
155
+ $[37] = children;
156
+ $[38] = props;
157
+ $[39] = t10;
158
+ $[40] = t4;
159
+ $[41] = t5;
160
+ $[42] = t6;
161
+ $[43] = t7;
162
+ $[44] = t8;
163
+ $[45] = t9;
164
+ $[46] = testId;
165
+ $[47] = t11;
166
+ } else t11 = $[47];
162
167
  let t12;
163
- if ($[46] !== shellContext || $[47] !== t11) {
168
+ if ($[48] !== shellContext || $[49] !== t11) {
164
169
  t12 = /*#__PURE__*/ jsx(AppShellContext.Provider, {
165
170
  value: shellContext,
166
171
  children: t11
167
172
  });
168
- $[46] = shellContext;
169
- $[47] = t11;
170
- $[48] = t12;
171
- } else t12 = $[48];
173
+ $[48] = shellContext;
174
+ $[49] = t11;
175
+ $[50] = t12;
176
+ } else t12 = $[50];
172
177
  let t13;
173
- if ($[49] !== t12 || $[50] !== testId) {
178
+ if ($[51] !== t12 || $[52] !== testId) {
174
179
  t13 = /*#__PURE__*/ jsx(TestIdProvider, {
175
180
  value: testId,
176
181
  children: t12
177
182
  });
178
- $[49] = t12;
179
- $[50] = testId;
180
- $[51] = t13;
181
- } else t13 = $[51];
183
+ $[51] = t12;
184
+ $[52] = testId;
185
+ $[53] = t13;
186
+ } else t13 = $[53];
182
187
  return t13;
183
188
  };
184
189
  AppShell.displayName = "AppShell";
@@ -3,23 +3,31 @@ export interface AppShellAsideProps extends HTMLAttributes<HTMLElement> {
3
3
  ref?: Ref<HTMLElement>;
4
4
  /**
5
5
  * Shows the panel, sliding it in from the right as the canvas narrows. Closing makes it
6
- * `hidden` and `inert` at once and slides it back out, after which it takes no space; under
7
- * reduced motion both are instant. Its children stay mounted throughout, so whatever state
8
- * they hold survives a close and reopen.
6
+ * `hidden` and `inert` at once while the column slides shut, after which it takes no space.
7
+ * The panel stays painted through that slide only where `display` can transition
8
+ * (`transition-behavior: allow-discrete`: Chromium, WebKit); in Firefox it hides at once while
9
+ * the column still closes smoothly. Under reduced motion both directions are instant. Its
10
+ * children stay mounted throughout, so whatever state they hold survives a close and reopen.
9
11
  */
10
12
  open: boolean;
11
13
  children?: ReactNode;
12
14
  }
13
15
  /**
14
16
  * A panel docked right of the content surface, in the shell's `aside` grid area. Render it
15
- * after `AppShellRemote`: while it is open, the remote turns into a card beside it.
17
+ * after `AppShellRemote`: while it is open, the remote turns into a card beside it. Keep it
18
+ * rendered while closed, too: the slide runs between its closed and open states, so an aside
19
+ * that mounts already open simply appears.
16
20
  *
17
21
  * It is 480px wide. To change that, set `--app-shell-aside-width` on the `AppShell` (for example
18
- * `className='[--app-shell-aside-width:400px]'`), not a width class here: the shell sizes its
19
- * track from the same variable.
22
+ * `className='[--app-shell-aside-width:400px]'`) rather than a width or margin class here: the
23
+ * shell sizes its track from that variable and the panel's spacing-8 margins.
20
24
  *
21
- * Desktop-first: while it is open the shell needs room for the rail plus the panel. In a
22
- * narrower window the right end (the panel and the header's last actions) is clipped rather
23
- * than scrolled to, so keep a min-width on the host or close the panel on narrow viewports.
25
+ * Closing while focus is inside the panel makes it inert, which drops focus to the document, so
26
+ * move focus first — for example back to the toggle that opened it, as the story does.
27
+ *
28
+ * Desktop-first: whenever an aside is composed, the shell clips horizontal overflow instead of
29
+ * scrolling. While the panel is open the shell needs room for the rail plus the panel, so in a
30
+ * narrower window the right end (the panel and the header's last actions) is cut off; keep a
31
+ * min-width on the host or close the panel on narrow viewports.
24
32
  */
25
33
  export declare const AppShellAside: FC<AppShellAsideProps>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "3.1.0",
3
- "generatedAt": "2026-10-21T13:45:39.845Z",
3
+ "generatedAt": "2026-10-21T16:04:37.661Z",
4
4
  "components": [
5
5
  {
6
6
  "name": "Accordion",
@@ -4519,7 +4519,7 @@
4519
4519
  "name": "open",
4520
4520
  "type": "boolean",
4521
4521
  "required": true,
4522
- "description": "Shows the panel, sliding it in from the right as the canvas narrows. Closing makes it\n`hidden` and `inert` at once and slides it back out, after which it takes no space; under\nreduced motion both are instant. Its children stay mounted throughout, so whatever state\nthey hold survives a close and reopen."
4522
+ "description": "Shows the panel, sliding it in from the right as the canvas narrows. Closing makes it\n`hidden` and `inert` at once while the column slides shut, after which it takes no space.\nThe panel stays painted through that slide only where `display` can transition\n(`transition-behavior: allow-discrete`: Chromium, WebKit); in Firefox it hides at once while\nthe column still closes smoothly. Under reduced motion both directions are instant. Its\nchildren stay mounted throughout, so whatever state they hold survives a close and reopen."
4523
4523
  },
4524
4524
  {
4525
4525
  "name": "defaultChecked",
@@ -5633,7 +5633,7 @@
5633
5633
  {
5634
5634
  "name": "WithAside",
5635
5635
  "code": "({ ambient }) => (\n <StoryRouter>\n <Shell ambient={ambient} aside />\n </StoryRouter>\n)",
5636
- "description": "`AppShellAside` docks a panel right of the content surface — a stand-in assistant here, toggled from the header — that slides in as the canvas narrows and back out on close, hiding the region without unmounting what is inside, so text typed into the panel survives a close and reopen."
5636
+ "description": "`AppShellAside` docks a panel right of the content surface — a stand-in assistant here, toggled from the header — that slides in as the canvas narrows, while closing widens the canvas back and hides the region without unmounting what is inside, so text typed into the panel survives a close and reopen."
5637
5637
  },
5638
5638
  {
5639
5639
  "name": "RevealFlow",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wallarm-org/design-system",
3
- "version": "3.2.0-rc-feat-app-shell-aside.2",
3
+ "version": "3.2.0",
4
4
  "description": "Core design system library with React components and Storybook documentation",
5
5
  "publishConfig": {
6
6
  "access": "public",