@lavalogic/scoria 0.40.13 → 0.40.15
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/README.md +58 -58
- package/dist/Components/AccordionGroup.svelte +35 -46
- package/dist/Components/AccordionGroupButton.svelte +68 -76
- package/dist/Components/Action.svelte +103 -135
- package/dist/Components/AlertModal.svelte +171 -190
- package/dist/Components/AppointmentCalendar/AppointmentCalendar.svelte +614 -697
- package/dist/Components/Base/BaseModal.svelte +90 -116
- package/dist/Components/Base/ContextWrapper.svelte +67 -72
- package/dist/Components/Base/Pagination.svelte +173 -196
- package/dist/Components/Base/Snippets.svelte +34 -36
- package/dist/Components/BigRadioSet.svelte +36 -38
- package/dist/Components/Bubble.svelte +78 -101
- package/dist/Components/Button.svelte +175 -208
- package/dist/Components/Checkbox.svelte +75 -86
- package/dist/Components/CollapsibleCard.svelte +72 -87
- package/dist/Components/CollapsibleMenuGroup.svelte +53 -57
- package/dist/Components/ConditionBuilder/ConditionBuilder.svelte +39 -64
- package/dist/Components/Contexts/ContextMenu.svelte +141 -156
- package/dist/Components/Contexts/ContextMenuDivider.svelte +15 -15
- package/dist/Components/Contexts/ContextMenuOption.svelte +53 -60
- package/dist/Components/Contexts/Toast.svelte +81 -86
- package/dist/Components/Contexts/ToastContainer.svelte +58 -62
- package/dist/Components/Contexts/Tooltip.svelte +36 -37
- package/dist/Components/DataMatrixIcon.svelte +95 -108
- package/dist/Components/DateInput.svelte +118 -146
- package/dist/Components/DatePicker.svelte +255 -294
- package/dist/Components/DesktopModal.svelte +70 -90
- package/dist/Components/Dial.svelte +167 -197
- package/dist/Components/DimensionInput.svelte +124 -169
- package/dist/Components/DragMenu/DragMenuHolder.svelte +98 -114
- package/dist/Components/DragMenu/DraggableCard.svelte +64 -76
- package/dist/Components/FileCard.svelte +21 -24
- package/dist/Components/FileUpload.svelte +190 -225
- package/dist/Components/GridInput.svelte +159 -196
- package/dist/Components/GridInputSet.svelte +24 -29
- package/dist/Components/HorizontalTabGroup.svelte +73 -89
- package/dist/Components/HorizontalTabGroupButton.svelte +40 -44
- package/dist/Components/Icon.svelte +99 -128
- package/dist/Components/Icons.js +357 -357
- package/dist/Components/InfoAlert.svelte +35 -38
- package/dist/Components/LoadingAnimation.svelte +691 -755
- package/dist/Components/LoadingModal.svelte +36 -44
- package/dist/Components/LoadingOverlay.svelte +22 -26
- package/dist/Components/Modal.svelte +204 -254
- package/dist/Components/MultiSelect.svelte +186 -216
- package/dist/Components/Nav/Nav.svelte +94 -110
- package/dist/Components/Nav/NavServiceMenuList.svelte +57 -61
- package/dist/Components/Nav/NavTab.svelte +58 -62
- package/dist/Components/Nav/ServiceMenuItem.svelte +103 -111
- package/dist/Components/Nav/ServicesNav.svelte +72 -79
- package/dist/Components/NumberInput.svelte +121 -155
- package/dist/Components/OptionCards.svelte +62 -73
- package/dist/Components/PageHeading.svelte +23 -25
- package/dist/Components/PasswordInput.svelte +69 -88
- package/dist/Components/PopoverButton.svelte +151 -0
- package/dist/Components/PopoverButton.svelte.d.ts +9 -0
- package/dist/Components/PopoverButtonProps.d.ts +21 -0
- package/dist/Components/PopoverButtonProps.js +1 -0
- package/dist/Components/Portal.svelte +29 -35
- package/dist/Components/ProgressBubble.svelte +91 -106
- package/dist/Components/QuerySelect.svelte +260 -346
- package/dist/Components/SidebarPanel.svelte +34 -36
- package/dist/Components/SingleSelect.svelte +196 -244
- package/dist/Components/StepButton.svelte +65 -70
- package/dist/Components/StepForm.svelte +115 -135
- package/dist/Components/Switch.svelte +57 -69
- package/dist/Components/Table/ARCHITECTURE.md +298 -298
- package/dist/Components/Table/Body/QuickSearchCell.svelte +578 -655
- package/dist/Components/Table/Body/Rows/ColumnHighlight.svelte +42 -51
- package/dist/Components/Table/Body/Rows/ColumnList.svelte +42 -58
- package/dist/Components/Table/Body/Rows/ColumnListRow.svelte +403 -442
- package/dist/Components/Table/Body/Rows/Columns/AccessorComponent.svelte +51 -78
- package/dist/Components/Table/Body/Rows/Columns/ActionsCell.svelte +165 -184
- package/dist/Components/Table/Body/Rows/Columns/BubbleCell.svelte +110 -123
- package/dist/Components/Table/Body/Rows/Columns/ExpandCell.svelte +134 -160
- package/dist/Components/Table/Body/Rows/Columns/FocusableImmutableCell.svelte +190 -231
- package/dist/Components/Table/Body/Rows/Columns/ProgressCell.svelte +82 -104
- package/dist/Components/Table/Body/Rows/Columns/TableAction.svelte +52 -87
- package/dist/Components/Table/Body/Rows/Columns/TableCheckbox.svelte +122 -150
- package/dist/Components/Table/Body/Rows/Columns/TableColumn.svelte +132 -159
- package/dist/Components/Table/Body/Rows/Columns/TableDatePicker.svelte +190 -236
- package/dist/Components/Table/Body/Rows/Columns/TableNumberInput.svelte +173 -211
- package/dist/Components/Table/Body/Rows/Columns/TableQuerySelect.svelte +204 -244
- package/dist/Components/Table/Body/Rows/Columns/TableRowSelectionCheckbox.svelte +140 -177
- package/dist/Components/Table/Body/Rows/Columns/TableSelect.svelte +188 -217
- package/dist/Components/Table/Body/Rows/Columns/TableTextInput.svelte +173 -193
- package/dist/Components/Table/Body/Rows/Columns/ValidityCell.svelte +166 -187
- package/dist/Components/Table/Body/Rows/TableRow.svelte +245 -288
- package/dist/Components/Table/Body/TableBody.svelte +141 -154
- package/dist/Components/Table/Headers/HighlightAllHeader.svelte +35 -41
- package/dist/Components/Table/Headers/SelectAllHeader.svelte +24 -30
- package/dist/Components/Table/Headers/TableHead.svelte +348 -402
- package/dist/Components/Table/Misc/ColumnPanel.svelte +37 -39
- package/dist/Components/Table/Misc/ColumnPanelModal.svelte +35 -39
- package/dist/Components/Table/Misc/FilterInput.svelte +556 -619
- package/dist/Components/Table/Misc/FilterPanel.svelte +170 -183
- package/dist/Components/Table/Misc/FilterPanelModal.svelte +25 -31
- package/dist/Components/Table/Misc/ShareViewModal.svelte +252 -281
- package/dist/Components/Table/Misc/SidePanel.svelte +32 -35
- package/dist/Components/Table/Misc/TableConfigurationModal.svelte +574 -629
- package/dist/Components/Table/Misc/TableFooter.svelte +326 -332
- package/dist/Components/Table/Misc/TableHorizontalBar.svelte +134 -140
- package/dist/Components/Table/Misc/TableSidebar.svelte +183 -198
- package/dist/Components/Table/Misc/TableViewDropdown.svelte +83 -103
- package/dist/Components/Table/Misc/ToolboxPanel.svelte +83 -100
- package/dist/Components/Table/Misc/ToolboxPanelModal.svelte +88 -107
- package/dist/Components/Table/Misc/UpdateViewOptionsModal.svelte +163 -190
- package/dist/Components/Table/NestedTable.svelte +102 -128
- package/dist/Components/Table/Table.svelte +531 -663
- package/dist/Components/Test/TestContextConsumer.svelte +11 -13
- package/dist/Components/TextArea.svelte +95 -130
- package/dist/Components/TextInput.svelte +125 -176
- package/dist/Components/ThreeStateRadio.svelte +111 -130
- package/dist/Components/Touch/BoolCard.svelte +33 -45
- package/dist/Components/Touch/DateModal.svelte +164 -204
- package/dist/Components/Touch/EditCard.svelte +48 -59
- package/dist/Components/Touch/InfoCard.svelte +28 -31
- package/dist/Components/Touch/InfoTextCard.svelte +26 -28
- package/dist/Components/Touch/ModalExplanation.svelte +15 -17
- package/dist/Components/Touch/NumberKeyboard.svelte +181 -218
- package/dist/Components/Touch/NumberModal.svelte +59 -79
- package/dist/Components/Touch/PlusMinusCard.svelte +43 -46
- package/dist/Components/Touch/SelectModal.svelte +111 -126
- package/dist/Components/Touch/SummaryCard.svelte +80 -93
- package/dist/Components/Touch/TextAreaModal.svelte +72 -94
- package/dist/Components/Touch/TextModal.svelte +77 -105
- package/dist/Components/Touch/TouchCard.svelte +31 -33
- package/dist/Components/Touch/TouchModal.svelte +214 -270
- package/dist/Components/Touch/UtilityButton.svelte +88 -109
- package/dist/Components/VerticalTabGroup.svelte +60 -78
- package/dist/Components/VerticalTabGroupButton.svelte +54 -58
- package/dist/Helpers/Datamatrix.d.ts +19 -19
- package/dist/Helpers/Datamatrix.js +291 -291
- package/dist/Types/Examples/ExampleModal.svelte +31 -35
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/scss/_basics.scss +12 -12
- package/dist/scss/_colours.scss +134 -134
- package/dist/scss/_mixins.scss +3392 -3392
- package/dist/scss/_motion.scss +57 -57
- package/dist/scss/_sizing.scss +85 -85
- package/dist/scss/_transitions.scss +8 -8
- package/package.json +1 -1
|
@@ -1,192 +1,171 @@
|
|
|
1
|
-
<svelte:options runes />
|
|
2
|
-
|
|
3
|
-
<script
|
|
4
|
-
lang="ts"
|
|
5
|
-
module
|
|
6
|
-
>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
1
|
+
<svelte:options runes />
|
|
2
|
+
|
|
3
|
+
<script
|
|
4
|
+
lang="ts"
|
|
5
|
+
module
|
|
6
|
+
>import Action from "../../../../Action.svelte";
|
|
7
|
+
import { TableContext } from "../../../Types/Context/TableContext.svelte.js";
|
|
8
|
+
import { devCatch, isValidityTuple } from "../../../../../Helpers/Helpers.svelte.js";
|
|
9
|
+
import { Colour, ColourSet } from "../../../../../scss/colours.js";
|
|
10
|
+
import { Size } from "../../../../../Types/Internal/Size.js";
|
|
11
|
+
import { Validity } from "../../../../../Types/Internal/Validity.js";
|
|
12
|
+
const iconSets = {
|
|
13
|
+
[Validity.Invalid]: {
|
|
14
|
+
name: "circle-cross",
|
|
15
|
+
colour: Colour["$error-border"],
|
|
16
|
+
size: Size.Medium
|
|
17
|
+
},
|
|
18
|
+
[Validity.Valid]: {
|
|
19
|
+
name: "circle-tick",
|
|
20
|
+
colour: Colour["$brand-primary"],
|
|
21
|
+
size: Size.Medium
|
|
22
|
+
},
|
|
23
|
+
[Validity.Info]: {
|
|
24
|
+
name: "circle-information",
|
|
25
|
+
colour: Colour["$ui-blue-6"],
|
|
26
|
+
size: Size.Medium
|
|
27
|
+
},
|
|
28
|
+
[Validity.Warning]: {
|
|
29
|
+
name: "circle-exclamation",
|
|
30
|
+
colour: Colour["$warning-border"],
|
|
31
|
+
size: Size.Medium
|
|
32
|
+
},
|
|
33
|
+
[Validity.Neutral]: {
|
|
34
|
+
name: "circle-minus",
|
|
35
|
+
colour: Colour["$ui-blue-6"],
|
|
36
|
+
size: Size.Medium
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<script
|
|
42
|
+
lang="ts"
|
|
43
|
+
generics="T extends object, FilterValueType, RowIdType extends Primitive"
|
|
44
|
+
>import "../../../Types/Context/TableInitOptions.js";
|
|
45
|
+
import { getContext, tick } from "svelte";
|
|
46
|
+
const { cell } = $props();
|
|
47
|
+
const tableContext = getContext(TableContext.identifier);
|
|
48
|
+
const ColumnDef = $derived(cell.column.columnDef);
|
|
49
|
+
const focusDetails = $derived(tableContext._focus.getFocusDetailsFor(cell));
|
|
50
|
+
let previousFocusElement = $state();
|
|
51
|
+
let showModal = $state(false);
|
|
52
|
+
// Match the open-modal state by row-object identity and column id.
|
|
53
|
+
// Identity-based comparison keeps the modal locked to the row it was
|
|
54
|
+
// opened on even when pagination / sort / filter changes the visible
|
|
55
|
+
// index of that row.
|
|
56
|
+
$effect(() => {
|
|
57
|
+
const target = tableContext.openModalCell;
|
|
58
|
+
if (target !== null && target.row === cell.row.original && target.columnId === cell.column.id) {
|
|
59
|
+
previousFocusElement = document.activeElement;
|
|
60
|
+
showModal = true;
|
|
61
|
+
} else {
|
|
62
|
+
showModal = false;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
let validity = $state(Validity.Valid);
|
|
66
|
+
let reason = $state();
|
|
67
|
+
$effect(() => {
|
|
68
|
+
const validityPromise = focusDetails.validity;
|
|
69
|
+
validityPromise.then((v) => {
|
|
70
|
+
if (!v) {
|
|
71
|
+
validity = Validity.Neutral;
|
|
72
|
+
reason = undefined;
|
|
73
|
+
} else if (isValidityTuple(v)) {
|
|
74
|
+
validity = v.value;
|
|
75
|
+
reason = v.reason;
|
|
68
76
|
} else {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
let validity: Validity = $state(Validity.Valid);
|
|
74
|
-
let reason = $state<string | undefined>();
|
|
75
|
-
|
|
76
|
-
$effect(() => {
|
|
77
|
-
const validityPromise = focusDetails.validity;
|
|
78
|
-
|
|
79
|
-
validityPromise
|
|
80
|
-
.then((v) => {
|
|
81
|
-
if (!v) {
|
|
82
|
-
validity = Validity.Neutral;
|
|
83
|
-
reason = undefined;
|
|
84
|
-
} else if (isValidityTuple(v)) {
|
|
85
|
-
validity = v.value;
|
|
86
|
-
reason = v.reason;
|
|
87
|
-
} else {
|
|
88
|
-
validity = v;
|
|
89
|
-
|
|
90
|
-
reason = undefined;
|
|
91
|
-
}
|
|
92
|
-
})
|
|
93
|
-
.catch(devCatch);
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
const thisId = $derived(
|
|
97
|
-
`${tableContext.tableName}-cell-${cell.row.visibleIndex}-${cell.column.id}`
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
function onclose() {
|
|
101
|
-
tableContext.setOpenModalCell(null);
|
|
102
|
-
|
|
103
|
-
if (previousFocusElement?.id != thisId) {
|
|
104
|
-
tick()
|
|
105
|
-
.then(() => {
|
|
106
|
-
previousFocusElement?.focus();
|
|
107
|
-
})
|
|
108
|
-
.catch(devCatch);
|
|
77
|
+
validity = v;
|
|
78
|
+
reason = undefined;
|
|
109
79
|
}
|
|
80
|
+
}).catch(devCatch);
|
|
81
|
+
});
|
|
82
|
+
const thisId = $derived(`${tableContext.tableName}-cell-${cell.row.visibleIndex}-${cell.column.id}`);
|
|
83
|
+
function onclose() {
|
|
84
|
+
tableContext.setOpenModalCell(null);
|
|
85
|
+
if (previousFocusElement?.id != thisId) {
|
|
86
|
+
tick().then(() => {
|
|
87
|
+
previousFocusElement?.focus();
|
|
88
|
+
}).catch(devCatch);
|
|
110
89
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
</script>
|
|
114
|
-
|
|
115
|
-
<!-- svelte-ignore a11y_mouse_events_have_key_events -->
|
|
116
|
-
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
117
|
-
<div
|
|
118
|
-
class="focusable"
|
|
119
|
-
onmousedown={(e) => {
|
|
120
|
-
// start focus only on left click
|
|
121
|
-
if (e.button === 0) {
|
|
122
|
-
if (e.shiftKey) {
|
|
123
|
-
e.preventDefault();
|
|
124
|
-
tableContext.setFocusEnd(focusDetails.coordinates);
|
|
125
|
-
} else {
|
|
126
|
-
tableContext.startFocus(focusDetails.coordinates);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}}
|
|
130
|
-
onmouseover={() => {
|
|
131
|
-
if (tableContext.isMousingDown) {
|
|
132
|
-
tableContext.setFocusEnd(focusDetails.coordinates);
|
|
133
|
-
}
|
|
134
|
-
}}
|
|
135
|
-
onmouseup={() => {
|
|
136
|
-
tableContext.endFocus(focusDetails.coordinates);
|
|
137
|
-
}}
|
|
138
|
-
>
|
|
139
|
-
<div
|
|
140
|
-
class="slot-wrapper"
|
|
141
|
-
class:multifocus={focusDetails.isMultiFocused}
|
|
142
|
-
class:multifocus-start={focusDetails.isMultiFocusStart}
|
|
143
|
-
>
|
|
144
|
-
<Action
|
|
145
|
-
id={thisId}
|
|
146
|
-
style={focusDetails.outline}
|
|
147
|
-
border={false}
|
|
148
|
-
colourSet={ColourSet.Auxiliary}
|
|
149
|
-
label={reason}
|
|
150
|
-
size={Size.FillWidth}
|
|
151
|
-
{icon}
|
|
152
|
-
onclick={() => {
|
|
153
|
-
if (ColumnDef.modal) {
|
|
154
|
-
tableContext.setOpenModalCell({
|
|
155
|
-
row: cell.row.original,
|
|
156
|
-
columnId: cell.column.id,
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
}}
|
|
160
|
-
/>
|
|
161
|
-
</div>
|
|
162
|
-
{#if showModal}
|
|
163
|
-
<!--
|
|
164
|
-
`ColumnDef.modal` is declared as
|
|
165
|
-
`Component<DisplayModalProps<TRow>>` on the public column
|
|
166
|
-
options, which exposes a stable `{ row, close }` prop
|
|
167
|
-
shape. Cell renderers used to hand a legacy
|
|
168
|
-
`{ cell, onclose, onsubmit }` triple here, which made the
|
|
169
|
-
public type lie about the runtime shape - migrated to
|
|
170
|
-
`{ row, close }` so consumer-authored modals can rely on
|
|
171
|
-
the documented type.
|
|
172
|
-
|
|
173
|
-
The dialog is NOT wrapped in `<Portal target={document.body}>`
|
|
174
|
-
any more. `<dialog>` opened via `showModal()` enters the
|
|
175
|
-
browser's top layer, so it already escapes overflow:hidden /
|
|
176
|
-
sticky / transform ancestors without needing to be re-parented.
|
|
177
|
-
Moving the `<div>` ancestor mid-mount (Portal's $effect runs
|
|
178
|
-
during the same microtask round as BaseModal's `tick().then`
|
|
179
|
-
`dialog.showModal()`) was popping the dialog out of the top
|
|
180
|
-
layer and leaving it to render inline at the bottom of the
|
|
181
|
-
page.
|
|
182
|
-
-->
|
|
183
|
-
<ColumnDef.modal
|
|
184
|
-
row={cell.row.original}
|
|
185
|
-
close={onclose}
|
|
186
|
-
/>
|
|
187
|
-
{/if}
|
|
188
|
-
</div>
|
|
189
|
-
|
|
90
|
+
}
|
|
91
|
+
const icon = $derived(iconSets[validity]);
|
|
92
|
+
</script>
|
|
93
|
+
|
|
94
|
+
<!-- svelte-ignore a11y_mouse_events_have_key_events -->
|
|
95
|
+
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
96
|
+
<div
|
|
97
|
+
class="focusable"
|
|
98
|
+
onmousedown={(e) => {
|
|
99
|
+
// start focus only on left click
|
|
100
|
+
if (e.button === 0) {
|
|
101
|
+
if (e.shiftKey) {
|
|
102
|
+
e.preventDefault();
|
|
103
|
+
tableContext.setFocusEnd(focusDetails.coordinates);
|
|
104
|
+
} else {
|
|
105
|
+
tableContext.startFocus(focusDetails.coordinates);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}}
|
|
109
|
+
onmouseover={() => {
|
|
110
|
+
if (tableContext.isMousingDown) {
|
|
111
|
+
tableContext.setFocusEnd(focusDetails.coordinates);
|
|
112
|
+
}
|
|
113
|
+
}}
|
|
114
|
+
onmouseup={() => {
|
|
115
|
+
tableContext.endFocus(focusDetails.coordinates);
|
|
116
|
+
}}
|
|
117
|
+
>
|
|
118
|
+
<div
|
|
119
|
+
class="slot-wrapper"
|
|
120
|
+
class:multifocus={focusDetails.isMultiFocused}
|
|
121
|
+
class:multifocus-start={focusDetails.isMultiFocusStart}
|
|
122
|
+
>
|
|
123
|
+
<Action
|
|
124
|
+
id={thisId}
|
|
125
|
+
style={focusDetails.outline}
|
|
126
|
+
border={false}
|
|
127
|
+
colourSet={ColourSet.Auxiliary}
|
|
128
|
+
label={reason}
|
|
129
|
+
size={Size.FillWidth}
|
|
130
|
+
{icon}
|
|
131
|
+
onclick={() => {
|
|
132
|
+
if (ColumnDef.modal) {
|
|
133
|
+
tableContext.setOpenModalCell({
|
|
134
|
+
row: cell.row.original,
|
|
135
|
+
columnId: cell.column.id,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}}
|
|
139
|
+
/>
|
|
140
|
+
</div>
|
|
141
|
+
{#if showModal}
|
|
142
|
+
<!--
|
|
143
|
+
`ColumnDef.modal` is declared as
|
|
144
|
+
`Component<DisplayModalProps<TRow>>` on the public column
|
|
145
|
+
options, which exposes a stable `{ row, close }` prop
|
|
146
|
+
shape. Cell renderers used to hand a legacy
|
|
147
|
+
`{ cell, onclose, onsubmit }` triple here, which made the
|
|
148
|
+
public type lie about the runtime shape - migrated to
|
|
149
|
+
`{ row, close }` so consumer-authored modals can rely on
|
|
150
|
+
the documented type.
|
|
151
|
+
|
|
152
|
+
The dialog is NOT wrapped in `<Portal target={document.body}>`
|
|
153
|
+
any more. `<dialog>` opened via `showModal()` enters the
|
|
154
|
+
browser's top layer, so it already escapes overflow:hidden /
|
|
155
|
+
sticky / transform ancestors without needing to be re-parented.
|
|
156
|
+
Moving the `<div>` ancestor mid-mount (Portal's $effect runs
|
|
157
|
+
during the same microtask round as BaseModal's `tick().then`
|
|
158
|
+
`dialog.showModal()`) was popping the dialog out of the top
|
|
159
|
+
layer and leaving it to render inline at the bottom of the
|
|
160
|
+
page.
|
|
161
|
+
-->
|
|
162
|
+
<ColumnDef.modal
|
|
163
|
+
row={cell.row.original}
|
|
164
|
+
close={onclose}
|
|
165
|
+
/>
|
|
166
|
+
{/if}
|
|
167
|
+
</div>
|
|
168
|
+
|
|
190
169
|
<style>.focusable,
|
|
191
170
|
.checkbox-cell,
|
|
192
171
|
.input-cell,
|
|
@@ -245,4 +224,4 @@ div.slot-wrapper {
|
|
|
245
224
|
display: flex;
|
|
246
225
|
align-items: center;
|
|
247
226
|
justify-content: center;
|
|
248
|
-
}</style>
|
|
227
|
+
}</style>
|