@tfn-design/design-system 0.4.0 → 0.4.2
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/dist/accordion/web/ds-accordion.js +2 -2
- package/dist/button/web/ds-button.js +1 -1
- package/dist/check-option/web/ds-check-option.js +1 -1
- package/dist/data-table/web/data-table-theme.css +32 -7
- package/dist/date-field/web/ds-date-field.d.ts +5 -2
- package/dist/date-field/web/ds-date-field.js +1 -1
- package/dist/date-input/web/ds-date-input.d.ts +6 -3
- package/dist/date-input/web/ds-date-input.js +1 -1
- package/dist/field-rules/field-rules.d.ts +16 -2
- package/dist/field-rules/field-rules.js +8 -2
- package/dist/form-field-group/form-field-group.d.ts +9 -0
- package/dist/form-field-group/form-field-group.js +1 -0
- package/dist/form-field-group/web/ds-form-field-group.js +2 -2
- package/dist/geo/geo.js +14 -1
- package/dist/geofence-editor/geofence-editor.d.ts +25 -0
- package/dist/geofence-editor/geofence-editor.js +14 -0
- package/dist/geofence-editor/web/ds-geofence-editor.d.ts +4 -1
- package/dist/geofence-editor/web/ds-geofence-editor.js +29 -12
- package/dist/index.d.ts +11 -11
- package/dist/index.js +5 -5
- package/dist/input/web/ds-input.js +4 -3
- package/dist/lib/native/animated.d.ts +4 -5
- package/dist/lib/native/animated.js +3 -4
- package/dist/map/web/ds-map-names.d.ts +5 -0
- package/dist/map/web/ds-map-names.js +10 -0
- package/dist/map/web/ds-map.d.ts +4 -1
- package/dist/map/web/ds-map.js +5 -3
- package/dist/map/web/map-provider.d.ts +6 -0
- package/dist/number-field/native/ds-number-field.d.ts +1 -1
- package/dist/number-field/native/ds-number-field.js +10 -6
- package/dist/number-field/number-field.d.ts +28 -6
- package/dist/number-field/number-field.js +5 -2
- package/dist/number-field/web/ds-number-field.d.ts +1 -1
- package/dist/number-field/web/ds-number-field.js +10 -6
- package/dist/phone-field/phone-field.d.ts +9 -1
- package/dist/phone-field/phone-field.js +11 -1
- package/dist/phone-field/web/ds-phone-field.d.ts +2 -2
- package/dist/phone-field/web/ds-phone-field.js +21 -5
- package/dist/sheet/sheet.d.ts +9 -0
- package/dist/sheet/sheet.js +1 -0
- package/dist/sheet/web/ds-sheet.d.ts +9 -2
- package/dist/sheet/web/ds-sheet.js +4 -2
- package/dist/tabs/tabs.d.ts +15 -8
- package/dist/tabs/tabs.js +13 -3
- package/dist/tabs/web/ds-tabs.js +6 -4
- package/dist/web.d.ts +2 -1
- package/dist/web.js +1 -0
- package/package.json +1 -1
|
@@ -47,9 +47,9 @@ export function DSAccordion({ items, expanded, onExpandedChange, allowMultiple =
|
|
|
47
47
|
const headerId = `${id}-header-${String(index)}`;
|
|
48
48
|
return (_jsxs("div", { ...(spec.separate ? { 'data-accordion-card': '' } : {}), className: spec.separate
|
|
49
49
|
? cn('overflow-hidden rounded-card shadow-low', SURFACE[spec.surface], isOpen && [SECTION_OPEN, 'accordion-open'])
|
|
50
|
-
: cn(index > 0 && ['border-t', BORDER[spec.border]], isOpen && [SECTION_OPEN, 'accordion-open']), children: [_jsxs("div", { "data-open": isOpen ? '' : undefined, className: cn('flex items-center gap-2 transition-control', !flat && 'pe-5', isDisabled ? undefined : isOpen ? HEADER_PRESSED : HEADER_STATES), children: [_jsx("div", { role: "heading", "aria-level": headingLevel, className: "flex min-w-0 flex-1", children: _jsxs("button", { type: "button", id: headerId, "aria-expanded": isOpen, "aria-controls": panelId, disabled: isDisabled, [HEADER_ATTR]: id, onKeyDown: onHeaderKeyDown, onClick: () => {
|
|
50
|
+
: cn(index > 0 && ['border-t', BORDER[spec.border]], isOpen && [SECTION_OPEN, 'accordion-open']), children: [_jsxs("div", { "data-open": isOpen ? '' : undefined, className: cn('flex items-center gap-2 transition-control', !flat && item.actions !== undefined && 'pe-5', isDisabled ? undefined : isOpen ? HEADER_PRESSED : HEADER_STATES), children: [_jsx("div", { role: "heading", "aria-level": headingLevel, className: "flex min-w-0 flex-1", children: _jsxs("button", { type: "button", id: headerId, "aria-expanded": isOpen, "aria-controls": panelId, disabled: isDisabled, [HEADER_ATTR]: id, onKeyDown: onHeaderKeyDown, onClick: () => {
|
|
51
51
|
onExpandedChange(toggleAccordion(open, index, allowMultiple));
|
|
52
|
-
}, className: cn(HEADER_FOCUS, 'flex min-w-0 flex-1 items-center gap-3 py-3 text-start', !flat && 'ps-5', 'enabled:cursor-pointer disabled:cursor-not-allowed'), children: [_jsx(ChevronRight, { size: 16, "aria-hidden": true, className: cn('shrink-0 transition-control', isOpen && 'rotate-90', isDisabled
|
|
52
|
+
}, className: cn(HEADER_FOCUS, 'flex min-w-0 flex-1 items-center gap-3 py-3 text-start', !flat && 'ps-5', !flat && item.actions === undefined ? 'pe-5' : 'pe-3', 'enabled:cursor-pointer disabled:cursor-not-allowed'), children: [_jsx(ChevronRight, { size: 16, "aria-hidden": true, className: cn('shrink-0 transition-control', isOpen && 'rotate-90', isDisabled
|
|
53
53
|
? 'text-disabled-foreground'
|
|
54
54
|
: isOpen
|
|
55
55
|
? 'accordion-open-chevron'
|
|
@@ -121,7 +121,7 @@ export function DSButton({ variant = 'default', size = 'md', disabled, pending =
|
|
|
121
121
|
wasPending.current = pending;
|
|
122
122
|
}, [pending, busyLabel]);
|
|
123
123
|
const onHero = variant === 'overDark' || variant === 'linkOnDark';
|
|
124
|
-
const recipe = cn('inline-flex items-center justify-center gap-2 transition-control', spec.shape === 'control' && (spec.surface === 'outline' ? 'state-layer-press' : 'state-layer'), spec.shape === 'control' && spec.border === 'outline-border' && 'state-layer-edge', spec.shape === 'control' && spec.surface === 'outline' && 'state-layer-quiet-hover', spec.shape === 'control' && spec.tone === 'primary' && 'state-layer-edge state-layer-brand', spec.shape === 'control' && STATE_INK[spec.surface], onHero ? 'focusable-on-hero' : 'focusable', shape.chrome, RADIUS[spec.radius], shape.control && SURFACE[spec.surface], shape.control && PRESS[spec.surface], LABEL[spec.label], BORDER[spec.border], shape.control && spec.border === 'none' && 'forced-colors:border', spec.block && 'w-full', !spec.block && 'w-fit', spec.underlined && (spec.standing ? 'link-standing-rule' : 'underline'), shape.control &&
|
|
124
|
+
const recipe = cn('inline-flex items-center justify-center gap-2 transition-control', spec.shape === 'control' && (spec.surface === 'outline' ? 'state-layer-press' : 'state-layer'), spec.shape === 'control' && spec.border === 'outline-border' && 'state-layer-edge', spec.shape === 'control' && spec.surface === 'outline' && 'state-layer-quiet-hover', spec.shape === 'control' && spec.tone === 'primary' && 'state-layer-edge state-layer-brand', spec.shape === 'control' && STATE_INK[spec.surface], onHero ? 'focusable-on-hero' : 'focusable', shape.chrome, !shape.control && 'justify-start text-start', RADIUS[spec.radius], shape.control && SURFACE[spec.surface], shape.control && PRESS[spec.surface], LABEL[spec.label], BORDER[spec.border], shape.control && spec.border === 'none' && 'forced-colors:border', spec.block && 'w-full', !spec.block && 'w-fit', spec.underlined && (spec.standing ? 'link-standing-rule' : 'underline'), shape.control &&
|
|
125
125
|
!spec.flush &&
|
|
126
126
|
(SIZED_PADDING[spec.minHeight]?.[spec.paddingX] ?? PADDING[spec.paddingX]), shape.control &&
|
|
127
127
|
!spec.flush &&
|
|
@@ -50,7 +50,7 @@ export function DSCheckOption({ checked, appearance = 'row', control = 'checkbox
|
|
|
50
50
|
const errorId = hasError ? `${generated}-error` : undefined;
|
|
51
51
|
const isInvalid = invalid === true || hasError;
|
|
52
52
|
const describedBy = [descriptionId, infoId, errorId].filter(Boolean).join(' ') || undefined;
|
|
53
|
-
return (_jsxs("div", { className: cn('relative flex cursor-pointer items-start gap-3', GEOMETRY[spec.appearance], SURFACE[spec.appearance], CHECKED[spec.appearance], isDisabled ? cn('cursor-not-allowed', DISABLED_INK) : STATE[spec.appearance], 'focusable-within', className), ...(isDisabled ? { 'aria-disabled': true } : {}), ...props, children: [_jsx("span", { className: "flex h-5 flex-none items-center", children: _jsx(DSCheckbox, { id: inputId, control: control, size: spec.box, name: name, checked: checked, disabled: isDisabled, ...(isInvalid ? { invalid: true } : {}), ...(describedBy === undefined ? {} : { 'aria-describedby': describedBy }), onCheckedChange: (next) => {
|
|
53
|
+
return (_jsxs("div", { "data-check-option": spec.appearance, className: cn('relative flex cursor-pointer items-start gap-3', GEOMETRY[spec.appearance], SURFACE[spec.appearance], CHECKED[spec.appearance], isDisabled ? cn('cursor-not-allowed', DISABLED_INK) : STATE[spec.appearance], 'focusable-within', className), ...(isDisabled ? { 'aria-disabled': true } : {}), ...props, children: [_jsx("span", { className: "flex h-5 flex-none items-center", children: _jsx(DSCheckbox, { id: inputId, control: control, size: spec.box, name: name, checked: checked, disabled: isDisabled, ...(isInvalid ? { invalid: true } : {}), ...(describedBy === undefined ? {} : { 'aria-describedby': describedBy }), onCheckedChange: (next) => {
|
|
54
54
|
if (control === 'radio' && !next)
|
|
55
55
|
return;
|
|
56
56
|
onCheckedChange(next);
|
|
@@ -156,15 +156,19 @@
|
|
|
156
156
|
|
|
157
157
|
/* PINNED COLUMNS (`pin` on a column). DevExtreme holds them with sticky positioning, so the other
|
|
158
158
|
* columns pass under them and each pinned cell needs a fill of its own. A row's cell sits on the
|
|
159
|
-
*
|
|
160
|
-
* The heading's fill may be clear (a theme whose head sits on the
|
|
161
|
-
* the head's fill over the
|
|
159
|
+
* CARD's surface, the one the table is drawn on, under any hover, tone or selection rule below,
|
|
160
|
+
* which all name the cell and win. The heading's fill may be clear (a theme whose head sits on the
|
|
161
|
+
* page), so a pinned heading lays the head's fill over the card.
|
|
162
|
+
*
|
|
163
|
+
* THE CARD, NOT THE PAGE (2026-11-09). This said the page's surface, from before the table was a
|
|
164
|
+
* card, and at this weight it beat the card rule further down. On a white table the pinned name
|
|
165
|
+
* and actions columns stood out as two grey bands, read as a design choice nobody made. */
|
|
162
166
|
.lcv-data-grid .dx-datagrid-rowsview .dx-row > td:is(.dx-datagrid-sticky-column-left, .dx-datagrid-sticky-column-right) {
|
|
163
|
-
background-color: var(--color-
|
|
167
|
+
background-color: var(--color-card);
|
|
164
168
|
}
|
|
165
169
|
|
|
166
170
|
.lcv-data-grid .dx-datagrid-headers .dx-row > td:is(.dx-datagrid-sticky-column-left, .dx-datagrid-sticky-column-right) {
|
|
167
|
-
background-color: var(--color-
|
|
171
|
+
background-color: var(--color-card);
|
|
168
172
|
background-image: linear-gradient(var(--color-table-head, var(--color-muted)), var(--color-table-head, var(--color-muted)));
|
|
169
173
|
}
|
|
170
174
|
|
|
@@ -544,6 +548,15 @@
|
|
|
544
548
|
vertical-align: middle;
|
|
545
549
|
}
|
|
546
550
|
|
|
551
|
+
/* A ROW THAT HOLDS A WRAPPING CELL READS FROM THE TOP (2026-11-09). On its middle line, a short
|
|
552
|
+
* value ("Not granted") floated halfway down beside a four-line paragraph, so reading across a
|
|
553
|
+
* row meant hunting for where each cell began. A `wrap` cell is the one kind that grows past a
|
|
554
|
+
* line, so a row holding one sets every cell on the row's top edge; a row of single lines keeps
|
|
555
|
+
* the middle, where a control and its text line up. */
|
|
556
|
+
.lcv-data-grid .dx-datagrid-rowsview .dx-datagrid-table .dx-data-row:has(> td.lcv-data-grid-wrap) > td {
|
|
557
|
+
vertical-align: top;
|
|
558
|
+
}
|
|
559
|
+
|
|
547
560
|
/* The columns DevExtreme keeps for its own expand arrows, and for the columns that gave way to a
|
|
548
561
|
narrow page (`priority`), are empty and one pixel wide. */
|
|
549
562
|
.lcv-data-grid .dx-command-expand,
|
|
@@ -602,11 +615,23 @@
|
|
|
602
615
|
center / contain no-repeat;
|
|
603
616
|
}
|
|
604
617
|
|
|
618
|
+
/* Part-ticked is the DS checkbox's dash (CheckboxMark's Minus), drawn where the tick is and as large.
|
|
619
|
+
* DevExtreme's own mark is a small filled square, which on the primary fill read as a full tick. */
|
|
605
620
|
.lcv-data-grid .dx-checkbox-indeterminate .dx-checkbox-icon::before {
|
|
606
|
-
|
|
621
|
+
width: 1em;
|
|
622
|
+
height: 1em;
|
|
623
|
+
margin-top: -0.5em;
|
|
624
|
+
margin-inline-start: -0.5em;
|
|
625
|
+
font-size: 0.75em;
|
|
626
|
+
border-radius: 0;
|
|
627
|
+
background-color: currentcolor;
|
|
628
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E")
|
|
629
|
+
center / contain no-repeat;
|
|
607
630
|
}
|
|
608
631
|
|
|
609
|
-
|
|
632
|
+
/* The ring is for a box reached by the keyboard. DevExtreme keeps a box it was clicked on
|
|
633
|
+
* `dx-state-focused`, so the row ticked last with the pointer wore a ring the others didn't. */
|
|
634
|
+
.lcv-data-grid .dx-checkbox:focus-visible .dx-checkbox-icon {
|
|
610
635
|
outline: var(--spacing-focus-ring) solid var(--color-ring);
|
|
611
636
|
outline-offset: var(--spacing-focus-ring);
|
|
612
637
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { type DateFieldContract } from '../date-field';
|
|
2
|
+
import { type DateEntryState } from '../../date-input/date-input';
|
|
2
3
|
import { type DSDateInputProps } from '../../date-input/web/ds-date-input';
|
|
3
4
|
export type DSDateFieldProps = Omit<DSDateInputProps, 'end' | keyof DateFieldContract> & DateFieldContract & {
|
|
4
5
|
/** Fires with a complete ISO date, typed or picked, or `null` while there
|
|
5
|
-
* is not one.
|
|
6
|
-
|
|
6
|
+
* is not one. The second argument tells an empty field (`'empty'`) from a
|
|
7
|
+
* half-typed one (`'incomplete'`) and a day that does not exist
|
|
8
|
+
* (`'invalid'`), so a screen can ask for the date or for the whole date. */
|
|
9
|
+
onValueChange: (next: string | null, entry: DateEntryState) => void;
|
|
7
10
|
/** Names the field and the calendar that drops from it. Required, as
|
|
8
11
|
* `DSDateInput`'s is. */
|
|
9
12
|
'aria-label': string;
|
|
@@ -37,7 +37,7 @@ export function DSDateField({ value, onValueChange, order = DATE_INPUT_DEFAULT_O
|
|
|
37
37
|
else
|
|
38
38
|
show();
|
|
39
39
|
} }), children: _jsx("div", { ref: bodyRef, children: _jsx(DSCalendar, { previousLabel: previousLabel, nextLabel: nextLabel, year: view.year, month: view.month, range: { from: value, to: value }, selectionAppearance: "brand", today: today, min: min, max: max, monthsOpen: monthsOpen, onMonthsOpenChange: setMonthsOpen, onMonthChange: setView, onSelectDate: (iso) => {
|
|
40
|
-
onValueChange(iso);
|
|
40
|
+
onValueChange(iso, 'complete');
|
|
41
41
|
setOpen(false);
|
|
42
42
|
} }) }) })) }));
|
|
43
43
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { type ComponentProps, type ReactNode } from 'react';
|
|
2
|
-
import { type DateInputContract } from '../date-input';
|
|
2
|
+
import { type DateInputContract, type DateEntryState } from '../date-input';
|
|
3
3
|
export type DSDateInputProps = Omit<ComponentProps<'div'>, 'children' | 'role' | 'onChange' | 'defaultValue' | 'onBlur'> & DateInputContract & {
|
|
4
4
|
/** Fires with a complete ISO date, or `null` while there is not one yet.
|
|
5
|
-
* Never with a half-typed value, see the contract's header.
|
|
6
|
-
|
|
5
|
+
* Never with a half-typed value, see the contract's header. The second
|
|
6
|
+
* argument says where the typing stands, so a screen can tell an empty
|
|
7
|
+
* field (`'empty'`) from a half-typed one (`'incomplete'`) and a day that
|
|
8
|
+
* does not exist (`'invalid'`). */
|
|
9
|
+
onValueChange: (next: string | null, entry: DateEntryState) => void;
|
|
7
10
|
/** Names the control. Required: three unlabelled boxes announce as three
|
|
8
11
|
* unrelated text fields. A caller inside `DSLabeledField` passes the same
|
|
9
12
|
* words as the label. */
|
|
@@ -26,7 +26,7 @@ export function DSDateInput({ value, onValueChange, order = DATE_INPUT_DEFAULT_O
|
|
|
26
26
|
const refs = useRef({});
|
|
27
27
|
const commit = (next) => {
|
|
28
28
|
setParts(next);
|
|
29
|
-
onValueChange(toISODate(next));
|
|
29
|
+
onValueChange(toISODate(next), dateEntryState(next));
|
|
30
30
|
};
|
|
31
31
|
const focus = (segment) => {
|
|
32
32
|
if (segment === null)
|
|
@@ -71,8 +71,22 @@ export declare function fieldCheckIsError(check: FieldCheck): boolean;
|
|
|
71
71
|
export declare function fieldCheckIsSilent(check: FieldCheck): boolean;
|
|
72
72
|
/** Normalises a validator's `void` return into a check. */
|
|
73
73
|
export declare function fieldCheck(value: string, validate: FieldValidator): FieldCheck;
|
|
74
|
-
/**
|
|
75
|
-
|
|
74
|
+
/**
|
|
75
|
+
* Whether leaving the field is a moment to check it, rules 1 and 2.
|
|
76
|
+
*
|
|
77
|
+
* A FIELD PASSED OVER EMPTY IS LEFT OUT (Jess, 2026-11-03): moving on to the
|
|
78
|
+
* next field without filling one is told at once, not only at the save. Only
|
|
79
|
+
* moving on to ANOTHER FIELD counts, `movedOn`: a sheet focuses its first field
|
|
80
|
+
* as it opens, so a click on the backdrop, a button or Close still says nothing
|
|
81
|
+
* about a box nobody has started on.
|
|
82
|
+
*/
|
|
83
|
+
export declare function fieldShouldCheckOnBlur(value: string, told: boolean, movedOn?: boolean): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Whether focus left `from` for another field to fill, the web's `movedOn`.
|
|
86
|
+
* `to` is the blur's `relatedTarget`: null when focus went nowhere (a click
|
|
87
|
+
* on the page, the window left), a button or a box when it went to one.
|
|
88
|
+
*/
|
|
89
|
+
export declare function fieldMovedOn(from: Element, to: EventTarget | null): boolean;
|
|
76
90
|
/** Whether a keystroke is a moment to check, rule 3. */
|
|
77
91
|
export declare function fieldShouldCheckOnChange(told: boolean): boolean;
|
|
78
92
|
/** Whether the field is now one that gets checked on every keystroke. */
|
|
@@ -94,8 +94,14 @@ export function fieldCheckIsSilent(check) {
|
|
|
94
94
|
export function fieldCheck(value, validate) {
|
|
95
95
|
return validate(value) ?? FIELD_CHECK_SILENT;
|
|
96
96
|
}
|
|
97
|
-
export function fieldShouldCheckOnBlur(value, told) {
|
|
98
|
-
return value.trim() !== '' || told;
|
|
97
|
+
export function fieldShouldCheckOnBlur(value, told, movedOn = false) {
|
|
98
|
+
return value.trim() !== '' || told || movedOn;
|
|
99
|
+
}
|
|
100
|
+
const FIELD_SELECTOR = 'input:not([type=button],[type=submit],[type=reset],[type=checkbox],[type=radio],[type=hidden]), textarea, select, [role=combobox], [contenteditable=true]';
|
|
101
|
+
export function fieldMovedOn(from, to) {
|
|
102
|
+
if (typeof Element === 'undefined' || !(to instanceof Element))
|
|
103
|
+
return false;
|
|
104
|
+
return to !== from && to.matches(FIELD_SELECTOR);
|
|
99
105
|
}
|
|
100
106
|
export function fieldShouldCheckOnChange(told) {
|
|
101
107
|
return told;
|
|
@@ -8,6 +8,15 @@ export declare const FORM_FIELD_GROUP_GAP_PX: 16;
|
|
|
8
8
|
* screen keeps the 24 every other field in the form keeps from the next one.
|
|
9
9
|
* At 16 a stacked name and surname read as one field and its echo. */
|
|
10
10
|
export declare const FORM_FIELD_GROUP_ROW_GAP_PX: 24;
|
|
11
|
+
/** 0. A column of option ROWS (`DSCheckOption` at its `row` appearance) takes no
|
|
12
|
+
* gap of its own (2026-11-09). Each row already carries 12px of padding above and
|
|
13
|
+
* below, the surface its hover wash fills, so the form's 24 on top of that set the
|
|
14
|
+
* rows 48px apart: five roles took a whole screen and the details under them
|
|
15
|
+
* started below the fold. With no gap the words of one row sit 24px from the
|
|
16
|
+
* next, a field's gap, and the rows still touch nothing but their own wash.
|
|
17
|
+
* The adapter applies it whenever the group holds option rows, as a child or
|
|
18
|
+
* one wrapper down, so no caller has to remember to ask. */
|
|
19
|
+
export declare const FORM_FIELD_GROUP_OPTION_ROW_GAP_PX: 0;
|
|
11
20
|
/** `spacingUnit / 2`. The description sits tight under its legend: they are one
|
|
12
21
|
* block and a gap here would read as two. */
|
|
13
22
|
export declare const FORM_FIELD_GROUP_DESCRIPTION_GAP_PX: 4;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export const FORM_FIELD_GROUP_COLUMNS = [1, 2];
|
|
2
2
|
export const FORM_FIELD_GROUP_GAP_PX = 16;
|
|
3
3
|
export const FORM_FIELD_GROUP_ROW_GAP_PX = 24;
|
|
4
|
+
export const FORM_FIELD_GROUP_OPTION_ROW_GAP_PX = 0;
|
|
4
5
|
export const FORM_FIELD_GROUP_DESCRIPTION_GAP_PX = 4;
|
|
5
6
|
export const FORM_FIELD_GROUP_MIN_ROW_WIDTH_PX = 360;
|
|
6
7
|
export const FORM_FIELD_GROUP_ROWS = ['field', 'card'];
|
|
@@ -27,10 +27,10 @@ export function DSFormFieldGroup({ legend: legendLine, description: descriptionL
|
|
|
27
27
|
]
|
|
28
28
|
.filter((id) => id !== undefined && id !== '')
|
|
29
29
|
.join(' ') || undefined;
|
|
30
|
-
return (_jsxs("fieldset", { className: cn('@container m-0 min-w-0 border-0 p-0', className), ...(message.invalid ? { 'aria-invalid': true } : {}), ...(describedBy === undefined ? {} : { 'aria-describedby': describedBy }), ...props, children: [legend !== undefined && (_jsx("legend", { className: "float-none mb-0 block w-full p-0", children: _jsx(DSText, { variant: "label-md", className: LEGEND_INK[spec.legendInk], children: legend }) })), description !== undefined && (_jsx(DSText, { as: "p", id: descriptionId, variant: "body-sm", className: cn('m-0', DESCRIPTION_INK[spec.descriptionInk]), style: { marginBlockStart: spec.descriptionGap }, children: description })), _jsx("div", { className: cn('grid grid-cols-1', spec.columns === 2 &&
|
|
30
|
+
return (_jsxs("fieldset", { className: cn('@container m-0 min-w-0 border-0 p-0', className), ...(message.invalid ? { 'aria-invalid': true } : {}), ...(describedBy === undefined ? {} : { 'aria-describedby': describedBy }), ...props, children: [legend !== undefined && (_jsx("legend", { className: "float-none mb-0 block w-full p-0", children: _jsx(DSText, { variant: "label-md", className: LEGEND_INK[spec.legendInk], children: legend }) })), description !== undefined && (_jsx(DSText, { as: "p", id: descriptionId, variant: "body-sm", className: cn('m-0', DESCRIPTION_INK[spec.descriptionInk]), style: { marginBlockStart: spec.descriptionGap }, children: description })), _jsx("div", { className: cn('grid grid-cols-1 gap-y-(--form-field-group-row-gap)', '[&:has(>[data-check-option=row],>*>[data-check-option=row])]:gap-y-0', spec.columns === 2 &&
|
|
31
31
|
(spec.row === 'card' ? '@card-row:grid-cols-2' : '@field-row:grid-cols-2')), style: {
|
|
32
32
|
columnGap: spec.gap,
|
|
33
|
-
|
|
33
|
+
['--form-field-group-row-gap']: `${String(spec.rowGap)}px`,
|
|
34
34
|
marginBlockStart: legend !== undefined || description !== undefined ? spec.gap : 0,
|
|
35
35
|
}, children: children }), message.message === undefined ? null : (_jsx(DSHelperText, { id: messageId, ...(message.tone === 'error' ? { tone: 'error', announce: true } : {}), style: { marginBlockStart: spec.descriptionGap }, children: message.message }))] }));
|
|
36
36
|
}
|
package/dist/geo/geo.js
CHANGED
|
@@ -303,7 +303,20 @@ export function lineCorridor(line, width) {
|
|
|
303
303
|
...side(back),
|
|
304
304
|
...cap(back[back.length - 1] ?? { x: 0, y: 0 }, endNormal(back)),
|
|
305
305
|
];
|
|
306
|
-
|
|
306
|
+
const edge = ring.filter((p) => nearestOnLine(p, pts) >= width * 0.999);
|
|
307
|
+
return edge.map(flat.from);
|
|
308
|
+
}
|
|
309
|
+
function nearestOnLine(p, line) {
|
|
310
|
+
let least = Infinity;
|
|
311
|
+
line.slice(1).forEach((b, i) => {
|
|
312
|
+
const a = line[i] ?? b;
|
|
313
|
+
const dx = b.x - a.x;
|
|
314
|
+
const dy = b.y - a.y;
|
|
315
|
+
const span = dx * dx + dy * dy;
|
|
316
|
+
const t = span === 0 ? 0 : Math.max(0, Math.min(1, ((p.x - a.x) * dx + (p.y - a.y) * dy) / span));
|
|
317
|
+
least = Math.min(least, Math.hypot(p.x - a.x - t * dx, p.y - a.y - t * dy));
|
|
318
|
+
});
|
|
319
|
+
return least;
|
|
307
320
|
}
|
|
308
321
|
export function boundingBox(points) {
|
|
309
322
|
const [first, ...rest] = points;
|
|
@@ -85,6 +85,31 @@ export declare function geofenceConvert(shape: GeofenceShape, to: GeofenceMode,
|
|
|
85
85
|
export declare function geofencePlace(shape: GeofenceShape, point: GeoPoint): GeofenceShape;
|
|
86
86
|
/** How many steps Undo goes back. Enough for a session of shaping; a ring buffer past it. */
|
|
87
87
|
export declare const GEOFENCE_UNDO_DEPTH = 50;
|
|
88
|
+
/** A marker stands above its point: its body is about this far up. */
|
|
89
|
+
export declare const GEOFENCE_MARKER_RISE_PX = 22;
|
|
90
|
+
/** How far a handle keeps from a marker, in pixels. */
|
|
91
|
+
export declare const GEOFENCE_MARKER_CLEAR_PX = 30;
|
|
92
|
+
/** Whether a spot on screen stands clear of every marker, its point and its body both. */
|
|
93
|
+
export declare function geofenceClearOfMarkers(spot: {
|
|
94
|
+
x: number;
|
|
95
|
+
y: number;
|
|
96
|
+
}, markers: readonly {
|
|
97
|
+
x: number;
|
|
98
|
+
y: number;
|
|
99
|
+
}[]): boolean;
|
|
100
|
+
/** HOW FAR ALONG ITS EDGE AN EDGE'S DOT IS DRAWN. Any point on an edge adds a corner as well as
|
|
101
|
+
* its middle does, so a dot that would sit on a station's pin slides along the edge to the
|
|
102
|
+
* first spot clear of every marker. No clear spot, and it stays in the middle. */
|
|
103
|
+
export declare function geofenceEdgeSpot(a: {
|
|
104
|
+
x: number;
|
|
105
|
+
y: number;
|
|
106
|
+
}, b: {
|
|
107
|
+
x: number;
|
|
108
|
+
y: number;
|
|
109
|
+
}, markers: readonly {
|
|
110
|
+
x: number;
|
|
111
|
+
y: number;
|
|
112
|
+
}[]): number;
|
|
88
113
|
/** Whether an outline is still being drawn: a polygon with points, not yet closed. A line
|
|
89
114
|
* is finished at two points, so a route of two is never wiped by Escape. */
|
|
90
115
|
export declare function geofenceDrawing(shape: GeofenceShape, line?: boolean): boolean;
|
|
@@ -144,6 +144,20 @@ export function geofencePlace(shape, point) {
|
|
|
144
144
|
return { type: 'polygon', vertices: [...shape.vertices, point] };
|
|
145
145
|
}
|
|
146
146
|
export const GEOFENCE_UNDO_DEPTH = 50;
|
|
147
|
+
export const GEOFENCE_MARKER_RISE_PX = 22;
|
|
148
|
+
export const GEOFENCE_MARKER_CLEAR_PX = 30;
|
|
149
|
+
const EDGE_SPOTS = [0.5, 0.35, 0.65, 0.2, 0.8];
|
|
150
|
+
export function geofenceClearOfMarkers(spot, markers) {
|
|
151
|
+
return markers.every((m) => Math.hypot(m.x - spot.x, m.y - spot.y) >= GEOFENCE_MARKER_CLEAR_PX &&
|
|
152
|
+
Math.hypot(m.x - spot.x, m.y - GEOFENCE_MARKER_RISE_PX - spot.y) >= GEOFENCE_MARKER_CLEAR_PX);
|
|
153
|
+
}
|
|
154
|
+
export function geofenceEdgeSpot(a, b, markers) {
|
|
155
|
+
for (const t of EDGE_SPOTS) {
|
|
156
|
+
if (geofenceClearOfMarkers({ x: a.x + (b.x - a.x) * t, y: a.y + (b.y - a.y) * t }, markers))
|
|
157
|
+
return t;
|
|
158
|
+
}
|
|
159
|
+
return 0.5;
|
|
160
|
+
}
|
|
147
161
|
export function geofenceDrawing(shape, line = false) {
|
|
148
162
|
return (shape.type === 'polygon' &&
|
|
149
163
|
shape.vertices.length > 0 &&
|
|
@@ -52,6 +52,9 @@ export type DSGeofenceEditorProps = Omit<ComponentProps<'div'>, 'children' | 'on
|
|
|
52
52
|
/** The points of markers drawn under the fence, such as stations: the move handle is
|
|
53
53
|
* drawn clear of them rather than over one. */
|
|
54
54
|
clearOf?: readonly GeoPoint[];
|
|
55
|
+
/** The children place `DSMapNames` themselves, over fences of their own and under their
|
|
56
|
+
* pins. Without this the names go directly over the outline, under the children. */
|
|
57
|
+
namesInChildren?: boolean;
|
|
55
58
|
/** Draws and edits a polygon's points as a line, such as a route: no closing edge, no
|
|
56
59
|
* fill and no crossing check. It needs two points, not three and is finished at its
|
|
57
60
|
* last point (a double-click or Enter), never by pressing its first. */
|
|
@@ -76,4 +79,4 @@ export type DSGeofenceEditorProps = Omit<ComponentProps<'div'>, 'children' | 'on
|
|
|
76
79
|
children?: ReactNode;
|
|
77
80
|
};
|
|
78
81
|
/** Draws and edits one geofence, a polygon or a circle, on a map, with its size and its problems stated live. */
|
|
79
|
-
export declare function DSGeofenceEditor({ label, value, onValueChange, viewport, onViewportChange, modes, minArea, maxArea, step, hue, height, attribution, scrollZoom, base, readout, placing, tools, onUndoChange, highlighted, onFinish, clearOf, line, fitTo, historyKey, width, widthLabel, children, className, ...props }: DSGeofenceEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
82
|
+
export declare function DSGeofenceEditor({ label, value, onValueChange, viewport, onViewportChange, modes, minArea, maxArea, step, hue, height, attribution, scrollZoom, base, readout, placing, tools, onUndoChange, highlighted, onFinish, clearOf, line, fitTo, historyKey, namesInChildren, width, widthLabel, children, className, ...props }: DSGeofenceEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useId, useLayoutEffect, useRef, useState, } from 'react';
|
|
3
|
-
import { GEOFENCE_DEFAULT_LIMITS, GEOFENCE_DEFAULT_STEP_M, GEOFENCE_MODES, GEOFENCE_SHIFT_FACTOR, GEOFENCE_UNDO_DEPTH, GEOFENCE_UNMEASURED_WORDS, geofenceAnnouncement, geofenceConvert, geofenceDrawing, geofenceEditorKey, geofenceIssueIsGuidance, geofenceIssueMessage, geofenceIssues, geofenceMinPoints, geofenceMidpointLabel, geofenceMoveHandle, geofenceNudge, geofenceNudgeStep, geofencePlace, geofenceRadiusKey, geofenceRadiusRange, geofenceReadout, geofenceTranslate, geofenceVertexLabel, } from '../geofence-editor';
|
|
3
|
+
import { GEOFENCE_DEFAULT_LIMITS, GEOFENCE_DEFAULT_STEP_M, GEOFENCE_MODES, GEOFENCE_SHIFT_FACTOR, GEOFENCE_UNDO_DEPTH, GEOFENCE_UNMEASURED_WORDS, geofenceAnnouncement, geofenceConvert, geofenceDrawing, geofenceEditorKey, geofenceClearOfMarkers, geofenceEdgeSpot, geofenceIssueIsGuidance, geofenceIssueMessage, geofenceIssues, geofenceMinPoints, geofenceMidpointLabel, geofenceMoveHandle, geofenceNudge, geofenceNudgeStep, geofencePlace, geofenceRadiusKey, geofenceRadiusRange, geofenceReadout, geofenceTranslate, geofenceVertexLabel, } from '../geofence-editor';
|
|
4
4
|
import { destination, edgeMidpoints, formatCoordinate, formatDistance, haversineDistance, insertVertex, lineCorridor, moveVertex, polygonSelfIntersections, removeVertex, shapeBounds, } from '../../geo/geo';
|
|
5
5
|
import { MAP_OFF_BOX_GRACE_PX, MAP_PRESS_SLOP_PX, mapInBox, mapShapePath, mapShapeScreenPoints, } from '../../map/map';
|
|
6
|
+
import { createPortal } from 'react-dom';
|
|
6
7
|
import { DSMap } from '../../map/web/ds-map';
|
|
7
8
|
import { DSMapFence } from '../../map/web/ds-map-fence';
|
|
9
|
+
import { DSMapNames } from '../../map/web/ds-map-names';
|
|
8
10
|
import { useMapView } from '../../map/web/map-provider';
|
|
9
11
|
import { Move } from 'lucide-react';
|
|
10
12
|
import { DSSegmentedControl } from '../../segmented-control/web/ds-segmented-control';
|
|
@@ -46,8 +48,6 @@ const HANDLE = cn('focusable pointer-events-auto absolute flex size-6 -translate
|
|
|
46
48
|
const POINT_LAYER = 'z-(--layer-raised)';
|
|
47
49
|
const DOT_CASING = 'ring-2 ring-card';
|
|
48
50
|
const NO_POINTS = [];
|
|
49
|
-
const MARKER_BODY_RISE_PX = 22;
|
|
50
|
-
const MARKER_CLEAR_PX = 30;
|
|
51
51
|
const MOVE_STEPS = [
|
|
52
52
|
[0, 0],
|
|
53
53
|
[0, 40],
|
|
@@ -57,15 +57,17 @@ const MOVE_STEPS = [
|
|
|
57
57
|
[0, 80],
|
|
58
58
|
[0, -80],
|
|
59
59
|
];
|
|
60
|
-
|
|
60
|
+
const TURN_CLEAR_PX = 32;
|
|
61
|
+
function clearOfMarkers(at, markers, turns) {
|
|
61
62
|
for (const [dx, dy] of MOVE_STEPS) {
|
|
62
63
|
const spot = { x: at.x + dx, y: at.y + dy };
|
|
63
|
-
if (
|
|
64
|
+
if (geofenceClearOfMarkers(spot, markers) &&
|
|
65
|
+
turns.every((t) => Math.hypot(t.x - spot.x, t.y - spot.y) >= TURN_CLEAR_PX))
|
|
64
66
|
return spot;
|
|
65
67
|
}
|
|
66
68
|
return at;
|
|
67
69
|
}
|
|
68
|
-
function EditingLayer({ value, onValueChange, step, hue, range, announce, hintId, moveHintId, onDragValue, remember, highlighted, placing, onFinish, clearOf, line, }) {
|
|
70
|
+
function EditingLayer({ value, onValueChange, step, hue, range, announce, hintId, moveHintId, onDragValue, remember, highlighted, placing, onFinish, clearOf, line, outlineSlot, }) {
|
|
69
71
|
const { projection, clientToGeo, focusSurface } = useMapView();
|
|
70
72
|
const vertexRefs = useRef([]);
|
|
71
73
|
const pendingFocus = useRef(null);
|
|
@@ -262,18 +264,32 @@ function EditingLayer({ value, onValueChange, step, hue, range, announce, hintId
|
|
|
262
264
|
return null;
|
|
263
265
|
return (_jsx("line", { x1: a.x, y1: a.y, x2: b.x, y2: b.y, className: "stroke-error", strokeWidth: 3, strokeDasharray: "4 3", "data-testid": "geofence-crossing" }, `cross-${String(i)}-${String(j)}-${String(edge)}`));
|
|
264
266
|
}))] }));
|
|
267
|
+
const drawnOutline = outlineSlot === null ? outline : createPortal(outline, outlineSlot);
|
|
265
268
|
if (value.type === 'circle') {
|
|
266
|
-
return (_jsxs(_Fragment, { children: [
|
|
269
|
+
return (_jsxs(_Fragment, { children: [drawnOutline, _jsx(CircleHandles, { circle: value, hue: hue, range: range, step: step, hintId: hintId, startDrag: startDrag, dragHandlers: dragHandlers, handle: handle, onValueChange: onValueChange, announce: announce, onEdgeHover: setEdgeHover })] }));
|
|
267
270
|
}
|
|
268
271
|
const polygon = value;
|
|
269
272
|
const midpoints = line
|
|
270
273
|
? edgeMidpoints(polygon.vertices).slice(0, Math.max(0, polygon.vertices.length - 1))
|
|
271
274
|
: edgeMidpoints(polygon.vertices);
|
|
272
275
|
const move = geofenceMoveHandle(polygon.vertices);
|
|
273
|
-
const
|
|
274
|
-
|
|
276
|
+
const markers = clearOf.map(projection.toScreen);
|
|
277
|
+
const moveAt = move === undefined
|
|
278
|
+
? undefined
|
|
279
|
+
: clearOfMarkers(projection.toScreen(move), markers, polygon.vertices.map(projection.toScreen));
|
|
280
|
+
return (_jsxs(_Fragment, { children: [drawnOutline, polygon.vertices.map((vertex, index) => {
|
|
275
281
|
const at = projection.toScreen(vertex);
|
|
276
|
-
const
|
|
282
|
+
const middle = midpoints[index];
|
|
283
|
+
const next = polygon.vertices[(index + 1) % polygon.vertices.length];
|
|
284
|
+
const spot = middle === undefined || next === undefined
|
|
285
|
+
? 0.5
|
|
286
|
+
: geofenceEdgeSpot(at, projection.toScreen(next), markers);
|
|
287
|
+
const mid = middle === undefined || next === undefined || spot === 0.5
|
|
288
|
+
? middle
|
|
289
|
+
: {
|
|
290
|
+
lat: vertex.lat + (next.lat - vertex.lat) * spot,
|
|
291
|
+
lng: vertex.lng + (next.lng - vertex.lng) * spot,
|
|
292
|
+
};
|
|
277
293
|
const midAt = mid === undefined ? undefined : projection.toScreen(mid);
|
|
278
294
|
return (_jsxs("span", { className: "contents", children: [_jsx("button", { ref: (node) => {
|
|
279
295
|
vertexRefs.current[index] = node;
|
|
@@ -419,8 +435,9 @@ function RadiusField({ circle, range, onValueChange, announce, }) {
|
|
|
419
435
|
announce({ kind: 'radius', radius: next });
|
|
420
436
|
} })] }));
|
|
421
437
|
}
|
|
422
|
-
export function DSGeofenceEditor({ label, value, onValueChange, viewport, onViewportChange, modes = GEOFENCE_MODES, minArea = GEOFENCE_DEFAULT_LIMITS.minArea, maxArea = GEOFENCE_DEFAULT_LIMITS.maxArea, step = GEOFENCE_DEFAULT_STEP_M, hue = 1, height, attribution, scrollZoom = false, base = 'standard', readout = true, placing = true, tools = true, onUndoChange, highlighted = false, onFinish, clearOf = NO_POINTS, line = false, fitTo, historyKey, width, widthLabel, children, className, ...props }) {
|
|
438
|
+
export function DSGeofenceEditor({ label, value, onValueChange, viewport, onViewportChange, modes = GEOFENCE_MODES, minArea = GEOFENCE_DEFAULT_LIMITS.minArea, maxArea = GEOFENCE_DEFAULT_LIMITS.maxArea, step = GEOFENCE_DEFAULT_STEP_M, hue = 1, height, attribution, scrollZoom = false, base = 'standard', readout = true, placing = true, tools = true, onUndoChange, highlighted = false, onFinish, clearOf = NO_POINTS, line = false, fitTo, historyKey, namesInChildren = false, width, widthLabel, children, className, ...props }) {
|
|
423
439
|
const limits = { minArea, maxArea };
|
|
440
|
+
const [outlineSlot, setOutlineSlot] = useState(null);
|
|
424
441
|
const range = geofenceRadiusRange(limits);
|
|
425
442
|
const issues = geofenceIssues(value, limits, line);
|
|
426
443
|
const figures = geofenceReadout(value, line);
|
|
@@ -576,5 +593,5 @@ export function DSGeofenceEditor({ label, value, onValueChange, viewport, onView
|
|
|
576
593
|
}, children: _jsx("button", { type: "button", children: "Clear points" }) }))] })] })), _jsxs(DSMap, { label: label, viewport: viewport, onViewportChange: onViewportChange, fitTo: fitTo ?? shapeBounds(value), ...(placing ? { onPick } : {}), finishable: placing &&
|
|
577
594
|
onFinish !== undefined &&
|
|
578
595
|
value.type === 'polygon' &&
|
|
579
|
-
value.vertices.length >= minPoints, attribution: attribution, scrollZoom: scrollZoom, base: base, ...(height === undefined ? {} : { height }), children: [corridor.length > 0 && (_jsx(DSMapFence, { shape: { type: 'polygon', vertices: corridor }, label: widthLabel ?? `Within ${formatDistance(width ?? 0)} of the line`, hue: hue })), _jsx("div", { className: "pointer-events-none absolute inset-0 z-(--layer-raised)", children: _jsx(EditingLayer, { value: value, onValueChange: change, step: step, hue: hue, range: range, announce: announce, hintId: hintId, moveHintId: moveHintId, onDragValue: onValueChange, remember: remember, highlighted: highlighted, placing: placing, onFinish: onFinish, clearOf: clearOf, line: line }) }), children] }), _jsx("p", { id: hintId, className: "sr-only", children: hint }), _jsx("p", { id: moveHintId, className: "sr-only", children: `Drag to move the whole area, or press the arrow keys to move it ${formatDistance(step)}, ${formatDistance(step * GEOFENCE_SHIFT_FACTOR)} with Shift.` }), readout && (_jsxs("div", { className: "flex flex-wrap items-end justify-between gap-4", children: [_jsxs("dl", { className: "flex flex-wrap gap-x-6 gap-y-1 text-body-sm", children: [figures.length !== undefined && (_jsxs("div", { className: "flex flex-col", children: [_jsx("dt", { className: "text-muted-foreground", children: "Length" }), _jsx("dd", { className: "font-semibold tabular-nums text-foreground", "data-testid": "geofence-length", children: _jsx(Figure, { measured: figures.measured, text: figures.length }) })] })), figures.length !== undefined && width !== undefined && width > 0 && (_jsxs("div", { className: "flex flex-col", children: [_jsx("dt", { className: "text-muted-foreground", children: "Either side" }), _jsx("dd", { className: "font-semibold tabular-nums text-foreground", children: formatDistance(width) })] })), figures.radius !== undefined && (_jsxs("div", { className: "flex flex-col", children: [_jsx("dt", { className: "text-muted-foreground", children: "Radius" }), _jsx("dd", { className: "font-semibold tabular-nums text-foreground", children: figures.radius })] })), figures.length === undefined && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex flex-col", children: [_jsx("dt", { className: "text-muted-foreground", children: "Area" }), _jsx("dd", { className: "font-semibold tabular-nums text-foreground", "data-testid": "geofence-area", children: _jsx(Figure, { measured: figures.measured, text: figures.area }) })] }), _jsxs("div", { className: "flex flex-col", children: [_jsx("dt", { className: "text-muted-foreground", children: value.type === 'circle' ? 'Circumference' : 'Perimeter' }), _jsx("dd", { className: "font-semibold tabular-nums text-foreground", children: _jsx(Figure, { measured: figures.measured, text: figures.perimeter }) })] })] }))] }), value.type === 'circle' && (_jsx(RadiusField, { circle: value, range: range, onValueChange: change, announce: announce }))] })), tools && (_jsx("div", { "aria-live": "polite", className: "flex min-h-5 flex-col gap-1", "data-testid": "geofence-issues", children: issues.map((issue) => (_jsx(DSHelperText, { ...(geofenceIssueIsGuidance(issue) ? {} : { tone: 'error' }), children: geofenceIssueMessage(issue, value, limits, line) }, issue))) }))] }));
|
|
596
|
+
value.vertices.length >= minPoints, attribution: attribution, scrollZoom: scrollZoom, base: base, namesAbove: true, ...(height === undefined ? {} : { height }), children: [corridor.length > 0 && (_jsx(DSMapFence, { shape: { type: 'polygon', vertices: corridor }, label: widthLabel ?? `Within ${formatDistance(width ?? 0)} of the line`, hue: hue })), _jsx("div", { ref: setOutlineSlot, className: "contents" }), namesInChildren ? null : _jsx(DSMapNames, {}), _jsx("div", { className: "pointer-events-none absolute inset-0 z-(--layer-raised)", children: _jsx(EditingLayer, { outlineSlot: outlineSlot, value: value, onValueChange: change, step: step, hue: hue, range: range, announce: announce, hintId: hintId, moveHintId: moveHintId, onDragValue: onValueChange, remember: remember, highlighted: highlighted, placing: placing, onFinish: onFinish, clearOf: clearOf, line: line }) }), children] }), _jsx("p", { id: hintId, className: "sr-only", children: hint }), _jsx("p", { id: moveHintId, className: "sr-only", children: `Drag to move the whole area, or press the arrow keys to move it ${formatDistance(step)}, ${formatDistance(step * GEOFENCE_SHIFT_FACTOR)} with Shift.` }), readout && (_jsxs("div", { className: "flex flex-wrap items-end justify-between gap-4", children: [_jsxs("dl", { className: "flex flex-wrap gap-x-6 gap-y-1 text-body-sm", children: [figures.length !== undefined && (_jsxs("div", { className: "flex flex-col", children: [_jsx("dt", { className: "text-muted-foreground", children: "Length" }), _jsx("dd", { className: "font-semibold tabular-nums text-foreground", "data-testid": "geofence-length", children: _jsx(Figure, { measured: figures.measured, text: figures.length }) })] })), figures.length !== undefined && width !== undefined && width > 0 && (_jsxs("div", { className: "flex flex-col", children: [_jsx("dt", { className: "text-muted-foreground", children: "Either side" }), _jsx("dd", { className: "font-semibold tabular-nums text-foreground", children: formatDistance(width) })] })), figures.radius !== undefined && (_jsxs("div", { className: "flex flex-col", children: [_jsx("dt", { className: "text-muted-foreground", children: "Radius" }), _jsx("dd", { className: "font-semibold tabular-nums text-foreground", children: figures.radius })] })), figures.length === undefined && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex flex-col", children: [_jsx("dt", { className: "text-muted-foreground", children: "Area" }), _jsx("dd", { className: "font-semibold tabular-nums text-foreground", "data-testid": "geofence-area", children: _jsx(Figure, { measured: figures.measured, text: figures.area }) })] }), _jsxs("div", { className: "flex flex-col", children: [_jsx("dt", { className: "text-muted-foreground", children: value.type === 'circle' ? 'Circumference' : 'Perimeter' }), _jsx("dd", { className: "font-semibold tabular-nums text-foreground", children: _jsx(Figure, { measured: figures.measured, text: figures.perimeter }) })] })] }))] }), value.type === 'circle' && (_jsx(RadiusField, { circle: value, range: range, onValueChange: change, announce: announce }))] })), tools && (_jsx("div", { "aria-live": "polite", className: "flex min-h-5 flex-col gap-1", "data-testid": "geofence-issues", children: issues.map((issue) => (_jsx(DSHelperText, { ...(geofenceIssueIsGuidance(issue) ? {} : { tone: 'error' }), children: geofenceIssueMessage(issue, value, limits, line) }, issue))) }))] }));
|
|
580
597
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export { INPUT_SIZE_SPECS, INPUT_SIZES, INPUT_STATE_SPECS, INPUT_STATES, inputSp
|
|
|
10
10
|
export type { TextareaContract, TextareaPaddingYStep } from './input/input';
|
|
11
11
|
export type { TextareaCopy } from './input/input';
|
|
12
12
|
export type { InputBorderRole, InputContract, InputLabelRole, InputPlaceholderRole, InputResolvedSpec, InputSize, InputSizeSpec, InputState, InputStateSpec, InputSurfaceRole, InputValueContract, PasswordInputContract, } from './input/input';
|
|
13
|
-
export { FIELD_CHECK_SILENT, FIELD_MASK_TOKENS, fieldCheck, fieldCheckIsError, fieldCheckIsSilent, fieldChecksEqual, fieldFormatter, fieldMaskCaretPosition, fieldMaskDisplay, fieldMaskFormatter, fieldMaskIsComplete, fieldMaskLength, fieldMaskParts, fieldMaskValue, fieldShouldCheckOnBlur, fieldShouldCheckOnChange, fieldTold, fieldValueCharsBefore, } from './field-rules/field-rules';
|
|
13
|
+
export { FIELD_CHECK_SILENT, FIELD_MASK_TOKENS, fieldCheck, fieldCheckIsError, fieldCheckIsSilent, fieldChecksEqual, fieldFormatter, fieldMaskCaretPosition, fieldMaskDisplay, fieldMaskFormatter, fieldMaskIsComplete, fieldMaskLength, fieldMaskParts, fieldMaskValue, fieldMovedOn, fieldShouldCheckOnBlur, fieldShouldCheckOnChange, fieldTold, fieldValueCharsBefore, } from './field-rules/field-rules';
|
|
14
14
|
export type { FieldCheck, FieldFormatter, FieldMask, FieldMaskToken, FieldRulesContract, FieldValidator, } from './field-rules/field-rules';
|
|
15
15
|
export { MEASURE_CHAR_PX, MEASURE_MAX_CHARS, MEASURE_MAX_PX, MEASURE_MIN_CHARS, MEASURE_MIN_PX, } from './measure';
|
|
16
16
|
export { isTone, TONES, TONE_SPECS, toneSpec } from './tone';
|
|
@@ -105,8 +105,8 @@ export { PROPORTION_BAND_KINDS, PROPORTION_BAND_STOPPED_FILL, proportionBandSpec
|
|
|
105
105
|
export type { ProportionBand, ProportionBandColourRole, ProportionBandKind, ProportionBandShape, ProportionBandSpec, ProportionBarContract, } from './proportion-bar/proportion-bar';
|
|
106
106
|
export { METRIC_SIZES, METRIC_SIZE_SPECS, metricSpec } from './metric/metric';
|
|
107
107
|
export type { MetricContract, MetricInkRole, MetricQualifierInkRole, MetricResolvedSpec, MetricScaleStep, MetricSize, MetricSizeSpec, } from './metric/metric';
|
|
108
|
-
export { DELTA_MINUS, DELTA_SENTIMENTS, DELTA_SENTIMENT_SPECS, deltaChange, deltaHasBasis, deltaSpec, deltaText, } from './delta/delta';
|
|
109
|
-
export type { DeltaContract, DeltaInkRole, DeltaResolvedSpec, DeltaSentiment, DeltaSentimentSpec, } from './delta/delta';
|
|
108
|
+
export { DELTA_MINUS, DELTA_SENTIMENTS, DELTA_SENTIMENT_SPECS, deltaChange, deltaHasBasis, deltaSpec, deltaText, deltaDirection, } from './delta/delta';
|
|
109
|
+
export type { DeltaContract, DeltaInkRole, DeltaResolvedSpec, DeltaSentiment, DeltaSentimentSpec, DeltaDirection, } from './delta/delta';
|
|
110
110
|
export { isStatTileFootDelta, statTileSpec } from './stat-tile/stat-tile';
|
|
111
111
|
export type { StatTileBorderRole, StatTileContract, StatTileLabelInkRole, StatTileResolvedSpec, StatTileSurfaceRole, } from './stat-tile/stat-tile';
|
|
112
112
|
export { METRIC_CARD_CHART_HEIGHT_PX, METRIC_CARD_STATES, metricCardSpec } from './metric-card/metric-card';
|
|
@@ -123,8 +123,8 @@ export { factSpec } from './fact/fact';
|
|
|
123
123
|
export type { FactBorderRole, FactContract, FactNameInkRole, FactResolvedSpec, FactSubInkRole, FactValueInkRole, } from './fact/fact';
|
|
124
124
|
export { DROPDOWN_MENU_BORDER_ROLES, DROPDOWN_MENU_ITEM_HOVER_SURFACE_ROLES, DROPDOWN_MENU_ITEM_INK_ROLES, DROPDOWN_MENU_ITEM_SPECS, DROPDOWN_MENU_NEEDS_A_NAME, DROPDOWN_MENU_NEEDS_A_RELATIVE_ANCHOR, DROPDOWN_MENU_NEEDS_A_TRIGGER, DROPDOWN_MENU_SURFACE_ROLES, dropdownMenuItemSpec, dropdownMenuSpec, DROPDOWN_MENU_DANGER_SECTION, DROPDOWN_MENU_DISABLED_INK, DROPDOWN_MENU_DISABLED_INK_ROLES, DROPDOWN_MENU_KEY_INTENTS, DROPDOWN_MENU_OPEN_ENDS, dropdownMenuAriaShortcut, dropdownMenuHasSubmenu, dropdownMenuInitialIndex, dropdownMenuIsTypeaheadKey, dropdownMenuTriggerOpenEnd, dropdownMenuItemStateSpec, dropdownMenuItemRole, dropdownMenuItemStaysOpen, dropdownMenuChoiceItems, DROPDOWN_MENU_CHECK_INK, DROPDOWN_MENU_TYPEAHEAD_RESET_MS, dropdownMenuKeyIntent, dropdownMenuMove, dropdownMenuRowIsDestructive, dropdownMenuSections, dropdownMenuTypeahead, dropdownMenuWalk, isDropdownMenuSeparator, } from './dropdown-menu/dropdown-menu';
|
|
125
125
|
export type { DropdownMenuBorderRole, DropdownMenuContract, DropdownMenuItemHoverSurfaceRole, DropdownMenuItemInkRole, DropdownMenuItemSpec, DropdownMenuResolvedSpec, DropdownMenuSurfaceRole, DropdownMenuItem, DropdownMenuDisabledInkRole, DropdownMenuEntry, DropdownMenuItemStateSpec, DropdownMenuKeyIntent, DropdownMenuLeaf, DropdownMenuOpenEnd, DropdownMenuChoice, DropdownMenuItemRole, DropdownMenuCheckInkRole, DropdownMenuRow, DropdownMenuSection, DropdownMenuSeparator, } from './dropdown-menu/dropdown-menu';
|
|
126
|
-
export { SHEET_BACKDROP_ROLES, SHEET_BORDER_ROLES, SHEET_CLOSE_INK_ROLES, SHEET_CLOSE_SURFACE_ROLES, SHEET_DIRTY_CLOSE_IGNORED, SHEET_SCRIM_OPACITY, SHEET_SCRIM_SOLID_OPACITY, SHEET_SURFACE_ROLES, SHEET_TITLE_INK_ROLES, sheetSpec, } from './sheet/sheet';
|
|
127
|
-
export type { SheetBackdropRole, SheetBorderRole, SheetCloseInkRole, SheetCloseSurfaceRole, SheetContract, SheetResolvedSpec, SheetSubInkRole, SheetSurfaceRole, SheetTitleInkRole, } from './sheet/sheet';
|
|
126
|
+
export { SHEET_BACKDROP_ROLES, SHEET_BORDER_ROLES, SHEET_CLOSE_INK_ROLES, SHEET_CLOSE_SURFACE_ROLES, SHEET_DIRTY_CLOSE_IGNORED, SHEET_SCRIM_OPACITY, SHEET_SCRIM_SOLID_OPACITY, SHEET_SURFACE_ROLES, SHEET_TITLE_INK_ROLES, sheetSpec, SHEET_INITIAL_FOCUS, } from './sheet/sheet';
|
|
127
|
+
export type { SheetBackdropRole, SheetBorderRole, SheetCloseInkRole, SheetCloseSurfaceRole, SheetContract, SheetInitialFocus, SheetResolvedSpec, SheetSubInkRole, SheetSurfaceRole, SheetTitleInkRole, } from './sheet/sheet';
|
|
128
128
|
export { BOTTOM_NAV_ACTION_RISE, BOTTOM_NAV_ACTION_SIZE, BOTTOM_NAV_CONTAINER_BORDER_ROLES, BOTTOM_NAV_CONTAINER_SURFACE_ROLES, BOTTOM_NAV_COUNT_MAX, BOTTOM_NAV_CURRENT_EDGE_ROLES, BOTTOM_NAV_CURRENT_WASH_ROLES, BOTTOM_NAV_DEFAULT_STATE, BOTTOM_NAV_HEIGHT, BOTTOM_NAV_ICON_SIZE, BOTTOM_NAV_ICON_STROKE, BOTTOM_NAV_ICON_ROLES, BOTTOM_NAV_LABEL_MAX_SCALE, BOTTOM_NAV_STATES, bottomNavClearance, bottomNavCount, bottomNavItemName, bottomNavItemSpec, bottomNavSpec, } from './bottom-nav/bottom-nav';
|
|
129
129
|
export type { BottomNavContainerBorderRole, BottomNavContainerSurfaceRole, BottomNavContract, BottomNavCurrentEdgeRole, BottomNavCurrentIconRole, BottomNavCurrentWashRole, BottomNavIconRole, BottomNavItem, BottomNavItemSpec, BottomNavResolvedSpec, BottomNavRestIconRole, BottomNavState, } from './bottom-nav/bottom-nav';
|
|
130
130
|
export { TASK_SHELL_ASIDE_SIDES, TASK_SHELL_ASIDE_WIDTH_PX, TASK_SHELL_BAR_MIN_HEIGHT_PX, TASK_SHELL_INSET_PX, TASK_SHELL_NEEDS_A_LABEL, TASK_SHELL_SPLIT_WIDTH_PX, TASK_SHELL_CLOSE_LABEL, TASK_SHELL_BACK_LABEL, taskShellSpec, taskShellStepText, taskShellStepFraction, } from './task-shell/task-shell';
|
|
@@ -135,8 +135,8 @@ export { SIDE_NAV_CURRENT_ICON, SIDE_NAV_CURRENT_INK, SIDE_NAV_EDGE, SIDE_NAV_ED
|
|
|
135
135
|
export type { SideNavBox, SideNavContract, SideNavCurrentIconRole, SideNavCurrentInkRole, SideNavEdgeRole, SideNavEntry, SideNavGroup, SideNavHeadingInkRole, SideNavHoverSurfaceRole, SideNavRowInkRole, SideNavLink, SideNavLogo, SideNavMenuEntry, SideNavMenuItem, SideNavOpenMenu, SideNavMenuLeaf, SideNavMenuSeparator, SideNavResolvedSpec, SideNavRestIconRole, SideNavRestInkRole, SideNavRowSpec, SideNavSection, SideNavSectionPlacement, SideNavSurfaceRole, } from './side-nav/side-nav';
|
|
136
136
|
export { selectFilter, selectGroupedOptions, selectInitialActiveIndex, selectIsSearchable, selectMoveIndex, selectSpec, selectTypeaheadIndex, selectTypeaheadSearch, SELECT_LONG_LIST_NEEDS_SEARCH_COPY, SELECT_PLACEHOLDER_IS_NOT_AN_OPTION, SELECT_SEARCH_THRESHOLD, SELECT_TYPEAHEAD_RESET_MS, } from './select/select';
|
|
137
137
|
export type { SelectCaretInkRole, SelectContract, SelectGroupInkRole, SelectListBorderRole, SelectListSurfaceRole, SelectNoneInkRole, SelectOption, SelectOptionActiveSurfaceRole, SelectOptionGroup, SelectOptionInkRole, SelectResolvedSpec, SelectTickInkRole, } from './select/select';
|
|
138
|
-
export { phoneFieldCaretPosition, phoneFieldDigits, phoneFieldFormat, phoneFieldIsComplete, phoneFieldMaxDigits, phoneFieldNationalDigits, phoneFieldSpec, PHONE_FIELD_CODE_SCALE, PHONE_FIELD_CODE_WEIGHT, PHONE_FIELD_FLAG_SCALE, PHONE_FIELD_HAS_NO_VALID_STATE, PHONE_FIELD_PREFIX_IS_DECORATION, } from './phone-field/phone-field';
|
|
139
|
-
export type { PhoneFieldCodeScale, PhoneFieldCodeWeight, PhoneFieldContract, PhoneFieldDialCode, PhoneFieldDividerRole, PhoneFieldFlagScale, PhoneFieldResolvedSpec, PhoneNumberFormat, } from './phone-field/phone-field';
|
|
138
|
+
export { phoneFieldCaretPosition, phoneFieldDigits, phoneFieldFormat, phoneFieldIsComplete, phoneFieldMaxDigits, phoneFieldNationalDigits, phoneFieldSpec, PHONE_FIELD_CODE_SCALE, PHONE_FIELD_CODE_WEIGHT, PHONE_FIELD_FLAG_SCALE, PHONE_FIELD_HAS_NO_VALID_STATE, PHONE_FIELD_PREFIX_IS_DECORATION, phoneFieldCountryFormat, phoneFieldCountryIsComplete, phoneFieldCountryLabel, phoneFieldCountryOf, phoneFieldCodeIsOpen, } from './phone-field/phone-field';
|
|
139
|
+
export type { PhoneFieldCodeScale, PhoneFieldCodeWeight, PhoneFieldContract, PhoneFieldDialCode, PhoneFieldDividerRole, PhoneFieldFlagScale, PhoneFieldResolvedSpec, PhoneNumberFormat, PhoneFieldCountry, } from './phone-field/phone-field';
|
|
140
140
|
export { POPOVER_ANCHOR_GAP_PX, POPOVER_BORDER, POPOVER_FOOTER_BORDER, POPOVER_INK, POPOVER_MAX_HEIGHT_REM, POPOVER_RADIUS_PX, POPOVER_ROLES, POPOVER_SURFACE, POPOVER_VIEWPORT_MARGIN_PX, POPOVER_VIEWPORT_RESERVE_PX, POPOVER_WIDTHS, POPOVER_WIDTH_PX, POPOVER_Z_INDEX, popoverSpec, } from './popover/popover';
|
|
141
141
|
export type { PopoverBorderRole, PopoverContract, PopoverFooterBorderRole, PopoverInkRole, PopoverResolvedSpec, PopoverSurfaceRole, PopoverWidth, } from './popover/popover';
|
|
142
142
|
export { assertTooltipCarriesNoTaskRequiredContent, TOOLTIP_BORDER, TOOLTIP_FORBIDS_TASK_REQUIRED_CONTENT, TOOLTIP_GAP_PX, TOOLTIP_INK, TOOLTIP_INTERACTIVE_TAGS, TOOLTIP_IS_WEB_ONLY, TOOLTIP_SC_1_4_13, TOOLTIP_MAX_WIDTH_CH, TOOLTIP_RADIUS_PX, TOOLTIP_ROLES, TOOLTIP_SURFACE, TOOLTIP_Z_INDEX, tooltipSpec, } from './tooltip/tooltip';
|
|
@@ -145,7 +145,7 @@ export { DRAWER_AXES, DRAWER_BORDER, DRAWER_CLOSE_INK, DRAWER_CLOSE_SURFACE, DRA
|
|
|
145
145
|
export type { DrawerBorderRole, DrawerCloseInkRole, DrawerCloseSurfaceRole, DrawerContract, DrawerCopy, DrawerDirection, DrawerHeadingLevel, DrawerInkRole, DrawerResolvedSpec, DrawerScrimRole, DrawerSize, DrawerSubInkRole, DrawerSurfaceRole, DrawerTitleInkRole, } from './drawer/drawer';
|
|
146
146
|
export { DIALOG_BODY_INK, DIALOG_BORDER, DIALOG_DEFAULT_HEADING_LEVEL, DIALOG_DOCKS_BELOW, DIALOG_FOOTER_IS_A_SLOT, DIALOG_HEADING_LEVELS, DIALOG_INK, DIALOG_RADIUS_PX, DIALOG_ROLES, DIALOG_SCRIM, DIALOG_SCRIM_OPACITY, DIALOG_SCRIM_SOLID_OPACITY, DIALOG_SCRIM_Z_INDEX, DIALOG_SIZES, DIALOG_SURFACE, DIALOG_TITLE_INK, DIALOG_MIN_HEIGHT_PX, DIALOG_VIEWPORT_MARGIN_PX, DIALOG_VIEWPORT_RESERVE_PX, DIALOG_WIDTH_PX, DIALOG_Z_INDEX, dialogSpec, } from './dialog/dialog';
|
|
147
147
|
export type { DialogBodyInkRole, DialogBorderRole, DialogContract, DialogFooterArrangement, DialogHeadingLevel, DialogInkRole, DialogResolvedSpec, DialogScrimRole, DialogSize, DialogSurfaceRole, DialogTitleInkRole, } from './dialog/dialog';
|
|
148
|
-
export { TAB_BORDER, TAB_REST_INK, TAB_CURRENT_INK, TAB_TINT_INK, TAB_CURRENT_TINT_PERCENT, TAB_HOVER_TINT_PERCENT, TAB_APPEARANCES, TAB_SELECTED_WEIGHT, TABS_KEYS, nextTabIndex, tabSpec, } from './tabs/tabs';
|
|
148
|
+
export { TAB_BORDER, TAB_REST_INK, TAB_CURRENT_INK, TAB_CHOSEN_FILL, TAB_CHOSEN_INK, TAB_TINT_INK, TAB_CURRENT_TINT_PERCENT, TAB_HOVER_TINT_PERCENT, TAB_APPEARANCES, TAB_SELECTED_WEIGHT, TABS_KEYS, nextTabIndex, tabSpec, } from './tabs/tabs';
|
|
149
149
|
export type { TabAppearance, TabInkRole, TabItem, TabResolvedSpec, TabsContract, TabsKey, } from './tabs/tabs';
|
|
150
150
|
export { RADIO_HOVER_BORDER_ROLE, RADIO_MARKER_BORDER_WIDTH, RADIO_MARKER_DIAMETER, RADIO_MARKER_DOT_DIAMETER, RADIO_MARKER_FACE_INSET, RADIO_MIN_HEIGHT, radioMarkerSpec, radioSpec, } from './radio/radio';
|
|
151
151
|
export type { RadioBorderRole, RadioContract, RadioInkRole, RadioMarkerRingRole, RadioMarkerSpec, RadioResolvedSpec, RadioSurfaceRole, } from './radio/radio';
|
|
@@ -228,7 +228,7 @@ export type { RelativeTimeLocale, RelativeTimeInput, RelativeTimeContract, } fro
|
|
|
228
228
|
export { KBD_PLATFORMS, KBD_SIZES, KBD_SURFACE, KBD_INK, KBD_BORDER, KBD_RADIUS, shortcutPlatform, parseShortcut, shortcutKeys, shortcutLabel, keySpoken, shortcutSpoken, keysSpoken, kbdSpec, } from './kbd/kbd';
|
|
229
229
|
export type { KbdPlatform, KbdSize, KbdSurfaceRole, KbdInkRole, KbdBorderRole, KbdRadius, KbdResolvedSpec, KbdContract, } from './kbd/kbd';
|
|
230
230
|
export { parseNumberInput, numberDecimalPlaces, clampNumberInput, stepNumber, formatNumberInput, settleNumberInput, numberFieldValueText, numberFieldStepperLabels, } from './number-field/number-field';
|
|
231
|
-
export type { NumberInputParse, NumberStepOptions, NumberFieldSettled, NumberFieldContract, } from './number-field/number-field';
|
|
231
|
+
export type { NumberInputParse, NumberStepOptions, NumberFieldSettled, NumberFieldOutOfRange, NumberFieldContract, } from './number-field/number-field';
|
|
232
232
|
export { SLIDER_SIZES, SLIDER_PAGE_STEPS, SLIDER_TRACK, SLIDER_FILL, SLIDER_THUMB, SLIDER_THUMB_EDGE, SLIDER_MARK_INK, clampSliderValue, snapSliderValue, sliderPositionOf, sliderValueAt, sliderKeyAction, sliderKeyValue, orderSliderRange, moveRangeThumb, nearestThumb, thumbLimits, sliderMarks, sliderThumbLabels, sliderSpec, } from './slider/slider';
|
|
233
233
|
export type { SliderSize, SliderMark, SliderBounds, SliderKeyAction, SliderTrackRole, SliderFillRole, SliderThumbRole, SliderThumbEdgeRole, SliderMarkInkRole, SliderResolvedSpec, SliderBaseContract, SliderSingleContract, SliderRangeContract, SliderContract, } from './slider/slider';
|
|
234
234
|
export { LEGEND_MARKS, LEGEND_STEPS, LEGEND_STEP_OPACITY, legendRampSpec, legendSpec, legendToggle, } from './legend/legend';
|
|
@@ -286,7 +286,7 @@ export type { CoordinateAxis, CoordinateFormat, FitBoundsOptions, FormatCoordina
|
|
|
286
286
|
export { MAP_ATTRIBUTION_INK, MAP_ATTRIBUTION_SURFACE, MAP_BASES, MAP_BORDER, MAP_CONTROL_LABELS, MAP_DEFAULT_HEIGHT, MAP_FENCE_HUES, MAP_FENCE_STATUSES, MAP_FIT_PADDING_PX, MAP_GRATICULE, MAP_KEY_PAN_PX, MAP_MAX_ZOOM, MAP_MIN_ZOOM, MAP_POPUP_INK, MAP_POPUP_SURFACE, MAP_PRESS_SLOP_PX, MAP_RASTER_TILE_PX, MAP_SURFACE, clampZoom, mapBasesAvailable, mapFenceEdge, mapGraticule, mapGraticuleStep, mapInBox, mapInstructions, mapKeyAction, mapLabelPoint, mapProjection, mapScaleBar, mapShapePath, mapShapeScreenPoints, mapTileTemplate, mapTileUrl, mapVisibleTiles, metresPerPixel, panViewport, zoomViewport, } from './map/map';
|
|
287
287
|
export type { MapBase, MapContract, MapFenceEdge, MapFenceHue, MapFenceStatus, MapKeyAction, MapProjection, MapScaleBar, MapTile, MapTileSource, MapViewport, } from './map/map';
|
|
288
288
|
export { MAP_CLUSTER_MAX_SHOWN, MAP_MARKER_KINDS, MAP_MARKER_NEUTRAL_EDGE, MAP_MARKER_NEUTRAL_INK, MAP_MARKER_NEUTRAL_SURFACE, MAP_MARKER_SELECTED_RING, MAP_MARKER_STATUSES, mapClusterText, mapMarkerName, mapMarkerSpec, } from './map-marker/map-marker';
|
|
289
|
-
export type { MapMarkerBadge, MapMarkerContract, MapMarkerEdgeRole, MapMarkerInkRole, MapMarkerKind, MapMarkerResolvedSpec, MapMarkerStatus, MapMarkerSurfaceRole, } from './map-marker/map-marker';
|
|
289
|
+
export type { MapMarkerBadge, MapMarkerContract, MapMarkerEdgeRole, MapMarkerInkRole, MapMarkerKind, MapMarkerResolvedSpec, MapMarkerStatus, MapMarkerSurfaceRole, MapMarkerFill, } from './map-marker/map-marker';
|
|
290
290
|
export { GEOFENCE_DEFAULT_LIMITS, GEOFENCE_DEFAULT_RADIUS_M, GEOFENCE_DEFAULT_STEP_M, GEOFENCE_MIN_LINE_POINTS, GEOFENCE_MIN_VERTICES, GEOFENCE_MODES, GEOFENCE_SHIFT_FACTOR, geofenceAnnouncement, geofenceConvert, geofenceIssueIsGuidance, geofenceIssueMessage, geofenceIssues, geofenceMidpointLabel, geofenceMinPoints, geofenceNudge, geofenceParseRadius, geofencePlace, geofenceRadiusKey, geofenceRadiusRange, geofenceReadout, geofenceVertexLabel, } from './geofence-editor/geofence-editor';
|
|
291
291
|
export type { GeofenceEdit, GeofenceEditorContract, GeofenceIssue, GeofenceLimits, GeofenceMode, GeofenceReadout, } from './geofence-editor/geofence-editor';
|
|
292
292
|
export { COORDINATE_FIELD_MODES, COORDINATE_FIELD_SIZES, coordinateAxisErrorMessage, coordinateAxisText, coordinateDraft, coordinateDraftErrors, coordinateDraftPoint, coordinateDraftTyped, coordinateEcho, coordinateErrorMessage, COORDINATE_FIELD_COPY, coordinateFieldLeft, coordinateText, parseCoordinate, parseCoordinateAxis, } from './coordinate-field/coordinate-field';
|
|
@@ -400,7 +400,7 @@ export type { FileDropzoneBorderRole, FileDropzoneContract, FileDropzoneCopy, Fi
|
|
|
400
400
|
export { FILE_FIELD_COPY } from './file-field/file-field';
|
|
401
401
|
export type { FileFieldCopy } from './file-field/file-field';
|
|
402
402
|
export { FILE_UPLOAD_COPY } from './file-upload/file-upload';
|
|
403
|
-
export type { FileUploadCopy } from './file-upload/file-upload';
|
|
403
|
+
export type { FileFact, FileUploadCopy, FileVersion, UploadPhase } from './file-upload/file-upload';
|
|
404
404
|
export { FILE_IMPORT_COPY } from './file-import/file-import';
|
|
405
405
|
export type { FileImportCopy } from './file-import/file-import';
|
|
406
406
|
export { SPLIT_PANE_ACTIVE_RULE, SPLIT_PANE_DEFAULT_MAX, SPLIT_PANE_DEFAULT_MIN, SPLIT_PANE_GRIP, SPLIT_PANE_LARGE_STEP, SPLIT_PANE_ORIENTATIONS, SPLIT_PANE_RULE, SPLIT_PANE_SIDES, SPLIT_PANE_SNAP_THRESHOLD, SPLIT_PANE_STACK_BELOW_PX, SPLIT_PANE_STEP, splitPaneAria, splitPaneClamp, splitPaneDrag, splitPaneFromPointer, splitPaneGripSpec, splitPaneKey, splitPaneRuleSpec, splitPaneShare, splitPaneSnap, } from './split-pane/split-pane';
|