anentrypoint-design 0.0.322 → 0.0.323

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,6 +1,6 @@
1
1
  {
2
2
  "name": "anentrypoint-design",
3
- "version": "0.0.322",
3
+ "version": "0.0.323",
4
4
  "description": "247420 design system SDK — webjsx + modified ripple-ui, single-file ESM bundle for reproducible use of the AnEntrypoint design.",
5
5
  "type": "module",
6
6
  "main": "./dist/247420.js",
@@ -178,7 +178,19 @@ export function ConfirmDialog({ title = 'Are you sure?', message, confirmLabel =
178
178
  });
179
179
  }
180
180
 
181
- export function PromptDialog({ title = 'Enter a name', value = '', placeholder = '', confirmLabel = 'ok', cancelLabel = 'cancel', onConfirm, onCancel, onInput, error, busy = false, busyLabel = 'working…' } = {}) {
181
+ export function PromptDialog({ title = 'Enter a name', value = '', placeholder = '', confirmLabel = 'ok', cancelLabel = 'cancel', onConfirm, onCancel, onInput, error, busy = false, busyLabel = 'working…', roots, onPickRoot } = {}) {
182
+ // Optional one-click starting-point chips (e.g. a destination-path prompt
183
+ // for a filesystem with more than one allowed root) - a user typing a
184
+ // path has no way to discover what a second disjoint root even looks
185
+ // like otherwise. Each { path, label } fills the input via the same
186
+ // onInput callback a manual keystroke would.
187
+ const rootsRow = (roots && roots.length)
188
+ ? h('div', { class: 'ds-prompt-roots', role: 'group', 'aria-label': 'accessible folders' },
189
+ ...roots.map((r, i) => h('button', {
190
+ key: 'pr' + i, type: 'button', class: 'ds-prompt-root-chip',
191
+ onclick: () => { const p = r.path || r; if (onPickRoot) onPickRoot(p); else if (onInput) onInput(p); },
192
+ }, r.label || r.path || r)))
193
+ : null;
182
194
  return Modal({
183
195
  onClose: onCancel,
184
196
  kind: 'small',
@@ -198,7 +210,7 @@ export function PromptDialog({ title = 'Enter a name', value = '', placeholder =
198
210
  if (e.key === 'Enter' && !e.isComposing && e.keyCode !== 229) { e.preventDefault(); if (!busy) onConfirm && onConfirm(e.target.value); }
199
211
  if (e.key === 'Escape') { e.preventDefault(); if (!busy) onCancel && onCancel(); }
200
212
  }
201
- }), modalError(error)].filter(Boolean),
213
+ }), rootsRow, modalError(error)].filter(Boolean),
202
214
  actions: [
203
215
  Btn({ onClick: onCancel, disabled: busy, children: cancelLabel }),
204
216
  Btn({