@estiva-app/ui 0.104.3 → 0.105.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.
@@ -74,9 +74,9 @@ export interface MoveDialogProps {
74
74
  startIn?: string
75
75
  /** The dialog's heading. "Move" when absent. */
76
76
  heading?: string
77
- /** The Folder field's label. "Folder" when absent. */
77
+ /** The team field's label. "Team" when absent. */
78
78
  folderLabel?: string
79
- /** Said when no Folder is offered. "There is no other folder it can be moved to." when absent. */
79
+ /** Said when no team is offered. "There is no other team it can be moved to." when absent. */
80
80
  noFolder?: string
81
81
  /** A box under the choice, asked only where `label` names it; its answer comes back as `checked`. */
82
82
  check?: MoveCheck
@@ -96,8 +96,8 @@ export function MoveDialog({
96
96
  topLabel,
97
97
  startIn,
98
98
  heading = 'Move',
99
- folderLabel = 'Folder',
100
- noFolder = 'There is no other folder it can be moved to.',
99
+ folderLabel = 'Team',
100
+ noFolder = 'There is no other team it can be moved to.',
101
101
  check,
102
102
  onMove,
103
103
  onClose,
@@ -139,7 +139,8 @@ export function MoveDialog({
139
139
  setPicked(undefined)
140
140
  }
141
141
 
142
- const folderName = destinations?.find((candidate) => candidate.id === folder)?.name ?? 'this folder'
142
+ const chosenName = destinations?.find((candidate) => candidate.id === folder)?.name
143
+ const folderName = chosenName || 'this team'
143
144
  const status = nests && folder ? read[folder] : undefined
144
145
  const targets = Array.isArray(status) ? (status as readonly MovePlace[]) : []
145
146
  const valueOf = (place: MovePlace) => place.id || TOP
@@ -171,14 +172,14 @@ export function MoveDialog({
171
172
  value={folder}
172
173
  onChange={chooseFolder}
173
174
  options={(destinations ?? []).map((candidate) => ({ value: candidate.id, label: candidate.name }))}
174
- placeholder={destinations ? 'Pick a folder' : 'Reading…'}
175
+ placeholder={destinations ? 'Pick a team' : 'Reading…'}
175
176
  ariaLabel={folderLabel}
176
177
  />
177
178
  </Field>
178
179
  {nests &&
179
180
  folder &&
180
181
  (status === 'failed' ? (
181
- <EmptyState scope="section" message={`${folderName} could not be read.`} action={{ label: 'Try again', onClick: () => readPlaces(folder) }} />
182
+ <EmptyState scope="section" message={`${chosenName || 'This team'} could not be read.`} action={{ label: 'Try again', onClick: () => readPlaces(folder) }} />
182
183
  ) : Array.isArray(status) && targets.length === 0 ? (
183
184
  <EmptyState scope="section" message={`There is nowhere in ${folderName} to put it.`} />
184
185
  ) : (