@lavalogic/scoria 0.38.12 → 0.38.13
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/Components/AccordionGroup.svelte +46 -46
- package/dist/Components/AccordionGroupButton.svelte +76 -76
- package/dist/Components/Action.svelte +136 -136
- package/dist/Components/AppointmentCalendar/AppointmentCalendar.svelte +712 -702
- package/dist/Components/Base/BaseModal.svelte +125 -125
- package/dist/Components/Base/ContextWrapper.svelte +72 -72
- package/dist/Components/Base/Pagination.svelte +198 -198
- package/dist/Components/Base/Snippets.svelte +36 -36
- package/dist/Components/BigRadioSet.svelte +38 -38
- package/dist/Components/Bubble.svelte +101 -101
- package/dist/Components/Button.svelte +209 -209
- package/dist/Components/Checkbox.svelte +86 -86
- package/dist/Components/Contexts/ContextMenu.svelte +164 -164
- package/dist/Components/Contexts/ContextMenuDivider.svelte +15 -15
- package/dist/Components/Contexts/ContextMenuOption.svelte +60 -60
- package/dist/Components/Contexts/ToastContainer.svelte +65 -65
- package/dist/Components/Contexts/Tooltip.svelte +37 -37
- package/dist/Components/DataMatrixIcon.svelte +112 -112
- package/dist/Components/DateInput.svelte +148 -148
- package/dist/Components/DatePicker.svelte +300 -300
- package/dist/Components/DesktopModal.svelte +90 -90
- package/dist/Components/Dial.svelte +204 -204
- package/dist/Components/DimensionInput.svelte +170 -170
- package/dist/Components/DragMenu/DragMenuHolder.svelte +119 -119
- package/dist/Components/DragMenu/DraggableCard.svelte +77 -77
- package/dist/Components/FileCard.svelte +24 -24
- package/dist/Components/FileUpload.svelte +236 -236
- package/dist/Components/GridInputSet.svelte +29 -29
- package/dist/Components/HorizontalTabGroup.svelte +82 -82
- package/dist/Components/HorizontalTabGroupButton.svelte +44 -44
- package/dist/Components/Icon.svelte +128 -128
- package/dist/Components/Icons.js +357 -357
- package/dist/Components/LoadingAnimation.svelte +29 -29
- package/dist/Components/LoadingModal.svelte +45 -45
- package/dist/Components/LoadingOverlay.svelte +25 -25
- package/dist/Components/Modal.svelte +258 -258
- package/dist/Components/MultiSelect.svelte +220 -220
- package/dist/Components/Nav/NavServiceMenuList.svelte +43 -43
- package/dist/Components/Nav/NavTab.svelte +62 -62
- package/dist/Components/Nav/ServicesNav.svelte +80 -80
- package/dist/Components/NumberInput.svelte +157 -157
- package/dist/Components/PageHeading.svelte +25 -25
- package/dist/Components/PasswordInput.svelte +88 -88
- package/dist/Components/Portal.svelte +36 -36
- package/dist/Components/QuerySelect.svelte +366 -366
- package/dist/Components/SingleSelect.svelte +250 -250
- package/dist/Components/StepButton.svelte +70 -70
- package/dist/Components/StepForm.svelte +140 -140
- package/dist/Components/Switch.svelte +69 -69
- package/dist/Components/Table/Body/Rows/ColumnHighlight.svelte +51 -51
- package/dist/Components/Table/Body/Rows/ColumnList.svelte +59 -59
- package/dist/Components/Table/Body/Rows/Columns/AccessorComponent.svelte +79 -79
- package/dist/Components/Table/Body/Rows/Columns/ExpandCell.svelte +120 -120
- package/dist/Components/Table/Body/Rows/Columns/ProgressCell.svelte +105 -105
- package/dist/Components/Table/Body/Rows/Columns/TableAction.svelte +87 -87
- package/dist/Components/Table/Body/Rows/Columns/TableCheckbox.svelte +126 -126
- package/dist/Components/Table/Body/Rows/Columns/TableColumn.svelte +159 -159
- package/dist/Components/Table/Body/Rows/Columns/TableDatePicker.svelte +246 -246
- package/dist/Components/Table/Body/Rows/Columns/TableNumberInput.svelte +216 -216
- package/dist/Components/Table/Body/Rows/Columns/TableRowSelectionCheckbox.svelte +179 -179
- package/dist/Components/Table/Body/Rows/Columns/TableTextInput.svelte +197 -197
- package/dist/Components/Table/Body/Rows/Columns/ValidityCell.svelte +190 -190
- package/dist/Components/Table/Body/Rows/TableRow.svelte +290 -290
- package/dist/Components/Table/Headers/HighlightAllHeader.svelte +41 -41
- package/dist/Components/Table/Headers/SelectAllHeader.svelte +30 -30
- package/dist/Components/Table/Misc/SidePanel.svelte +35 -35
- package/dist/Components/Table/Misc/ToolboxPanel.svelte +100 -100
- package/dist/Components/Table/Misc/ToolboxPanelModal.svelte +107 -107
- package/dist/Components/TextArea.svelte +130 -130
- package/dist/Components/TextInput.svelte +176 -176
- package/dist/Components/ThreeStateRadio.svelte +131 -131
- package/dist/Components/Touch/BoolCard.svelte +45 -45
- package/dist/Components/Touch/DateModal.svelte +209 -209
- package/dist/Components/Touch/EditCard.svelte +59 -59
- package/dist/Components/Touch/InfoCard.svelte +31 -31
- package/dist/Components/Touch/InfoTextCard.svelte +28 -28
- package/dist/Components/Touch/ModalExplanation.svelte +17 -17
- package/dist/Components/Touch/NumberKeyboard.svelte +225 -225
- package/dist/Components/Touch/NumberModal.svelte +79 -79
- package/dist/Components/Touch/PlusMinusCard.svelte +46 -46
- package/dist/Components/Touch/SummaryCard.svelte +93 -93
- package/dist/Components/Touch/TextAreaModal.svelte +95 -95
- package/dist/Components/Touch/TextModal.svelte +106 -106
- package/dist/Components/Touch/TouchCard.svelte +33 -33
- package/dist/Components/Touch/TouchModal.svelte +274 -274
- package/dist/Components/Touch/UtilityButton.svelte +109 -109
- package/dist/Components/VerticalTabGroup.svelte +79 -79
- package/dist/Components/VerticalTabGroupButton.svelte +58 -58
- package/dist/Helpers/Datamatrix.d.ts +19 -19
- package/dist/Helpers/Datamatrix.js +291 -291
- package/dist/Types/Examples/ExampleModal.svelte +35 -35
- package/dist/scss/_motion.scss +57 -57
- package/dist/scss/_sizing.scss +85 -85
- package/package.json +30 -30
|
@@ -1,211 +1,211 @@
|
|
|
1
|
-
<svelte:options runes />
|
|
2
|
-
|
|
3
|
-
<script
|
|
4
|
-
lang="ts"
|
|
5
|
-
module
|
|
6
|
-
>
|
|
7
|
-
import { devCatch, passthrough } from '../../Helpers/Helpers.svelte.js';
|
|
8
|
-
import { ColourSet } from '../../scss/colours.js';
|
|
9
|
-
import { InputVariant } from '../../Types/Internal/InputVariant.js';
|
|
10
|
-
import { Size } from '../../Types/Internal/Size.js';
|
|
11
|
-
import { tick } from 'svelte';
|
|
12
|
-
import Action from '../Action.svelte';
|
|
13
|
-
import DatePicker from '../DatePicker.svelte';
|
|
14
|
-
import TextInput from '../TextInput.svelte';
|
|
15
|
-
import type { DateModalProps } from './DateModalProps.js';
|
|
16
|
-
import TouchModal from './TouchModal.svelte';
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<script lang="ts">
|
|
20
|
-
let {
|
|
21
|
-
header,
|
|
22
|
-
value,
|
|
23
|
-
cancelEditing,
|
|
24
|
-
confirm,
|
|
25
|
-
namedMonths = false,
|
|
26
|
-
validate,
|
|
27
|
-
showScanner = false,
|
|
28
|
-
scanValue = $bindable(''),
|
|
29
|
-
overrideScanValue = $bindable(''),
|
|
30
|
-
confirmScannedValue,
|
|
31
|
-
inclusive = false,
|
|
32
|
-
explanation,
|
|
33
|
-
allowOverride = false,
|
|
34
|
-
showTime = false,
|
|
35
|
-
}: DateModalProps = $props();
|
|
36
|
-
|
|
37
|
-
// Snapshot the incoming `value` into mutable working state. Reset via
|
|
38
|
-
// the effect below when the parent hands us a new `value` reference;
|
|
39
|
-
let tempValue: Date = $state(new Date());
|
|
40
|
-
let overrideValue = $state(new Date());
|
|
41
|
-
let isBeingEdited = $state(false);
|
|
42
|
-
let inputRef: HTMLInputElement | undefined = $state();
|
|
43
|
-
let overrideInputRef: HTMLInputElement | undefined = $state();
|
|
44
|
-
const isValid = $derived(validate?.(tempValue) ?? true);
|
|
45
|
-
|
|
46
|
-
export function resetIsBeingEdited() {
|
|
47
|
-
isBeingEdited = false;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
$effect(() => {
|
|
51
|
-
// Reset edit state and working value when the caller hands us a new
|
|
52
|
-
// `value` reference.
|
|
53
|
-
void value;
|
|
54
|
-
isBeingEdited = false;
|
|
55
|
-
// eslint-disable-next-line svelte/prefer-svelte-reactivity
|
|
56
|
-
tempValue = value ?? new Date();
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
$effect(() => {
|
|
60
|
-
void isBeingEdited;
|
|
61
|
-
void allowOverride;
|
|
62
|
-
tick()
|
|
63
|
-
.then(() => {
|
|
64
|
-
if (isBeingEdited) {
|
|
65
|
-
overrideInputRef?.focus();
|
|
66
|
-
} else {
|
|
67
|
-
inputRef?.focus();
|
|
68
|
-
}
|
|
69
|
-
})
|
|
70
|
-
.catch(devCatch);
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
function onsubmit(e?: SubmitEvent) {
|
|
74
|
-
e?.preventDefault();
|
|
75
|
-
|
|
76
|
-
if (isValid) {
|
|
77
|
-
// Confirm without mutating the bound state. If the caller asked for
|
|
78
|
-
// an inclusive (end-of-day) reading, hand back a fresh copy with
|
|
79
|
-
// 23:59:59 set rather than re-stamping `tempValue` in place.
|
|
80
|
-
let outValue = tempValue;
|
|
81
|
-
if (inclusive) {
|
|
82
|
-
outValue = new Date(tempValue.getTime());
|
|
83
|
-
outValue.setHours(23, 59, 59);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
confirm(outValue, allowOverride && isBeingEdited ? overrideValue : undefined);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
scanValue = '';
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function submitOnEnter(e: KeyboardEvent) {
|
|
93
|
-
if (e.key === 'Enter') {
|
|
94
|
-
e.preventDefault();
|
|
95
|
-
e.stopPropagation();
|
|
96
|
-
|
|
97
|
-
if (!scanValue || (isBeingEdited && !overrideScanValue)) {
|
|
98
|
-
if (
|
|
99
|
-
allowOverride &&
|
|
100
|
-
isBeingEdited &&
|
|
101
|
-
!overrideScanValue &&
|
|
102
|
-
document.activeElement != inputRef
|
|
103
|
-
) {
|
|
104
|
-
overrideInputRef?.focus();
|
|
105
|
-
} else {
|
|
106
|
-
inputRef?.focus();
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
confirmScannedValue?.(
|
|
113
|
-
scanValue,
|
|
114
|
-
allowOverride && isBeingEdited ? overrideScanValue : undefined
|
|
115
|
-
);
|
|
116
|
-
scanValue = '';
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
</script>
|
|
120
|
-
|
|
121
|
-
<TouchModal
|
|
122
|
-
onclose={() => {
|
|
123
|
-
cancelEditing();
|
|
124
|
-
}}
|
|
125
|
-
{header}
|
|
126
|
-
{onsubmit}
|
|
127
|
-
{explanation}
|
|
128
|
-
>
|
|
129
|
-
{#if showScanner}
|
|
130
|
-
<div class="inputs">
|
|
131
|
-
{#if allowOverride}
|
|
132
|
-
<!-- eslint-disable-next-line @typescript-eslint/no-confusing-void-expression -->
|
|
133
|
-
{@render overrideButton()}
|
|
134
|
-
{/if}
|
|
135
|
-
{#if isBeingEdited}
|
|
136
|
-
<TextInput
|
|
137
|
-
bind:inputRef={overrideInputRef}
|
|
138
|
-
bind:value={overrideScanValue}
|
|
139
|
-
variant={InputVariant.Modal}
|
|
140
|
-
labelTop="Scan Barcode to Override"
|
|
141
|
-
onkeydown={submitOnEnter}
|
|
142
|
-
/>
|
|
143
|
-
{/if}
|
|
144
|
-
<TextInput
|
|
145
|
-
bind:inputRef
|
|
146
|
-
bind:value={scanValue}
|
|
147
|
-
variant={InputVariant.Modal}
|
|
148
|
-
labelTop="Scan Barcode"
|
|
149
|
-
onkeydown={submitOnEnter}
|
|
150
|
-
/>
|
|
151
|
-
</div>
|
|
152
|
-
{:else if allowOverride}
|
|
153
|
-
<!-- eslint-disable-next-line @typescript-eslint/no-confusing-void-expression -->
|
|
154
|
-
{@render overrideButton()}
|
|
155
|
-
{/if}
|
|
156
|
-
|
|
157
|
-
<div class="inputs">
|
|
158
|
-
{#if allowOverride && isBeingEdited}
|
|
159
|
-
<DatePicker
|
|
160
|
-
{showTime}
|
|
161
|
-
{onsubmit}
|
|
162
|
-
{namedMonths}
|
|
163
|
-
bind:date={overrideValue}
|
|
164
|
-
/>
|
|
165
|
-
{/if}
|
|
166
|
-
<DatePicker
|
|
167
|
-
{showTime}
|
|
168
|
-
{onsubmit}
|
|
169
|
-
{namedMonths}
|
|
170
|
-
bind:date={tempValue}
|
|
171
|
-
/>
|
|
172
|
-
</div>
|
|
173
|
-
|
|
174
|
-
{#snippet footer()}
|
|
175
|
-
<div class="modal-footer">
|
|
176
|
-
<button
|
|
177
|
-
onkeydown={passthrough}
|
|
178
|
-
type="submit"
|
|
179
|
-
disabled={!isValid}>Confirm</button
|
|
180
|
-
>
|
|
181
|
-
<button
|
|
182
|
-
onkeydown={passthrough}
|
|
183
|
-
type="button"
|
|
184
|
-
onclick={() => {
|
|
185
|
-
cancelEditing();
|
|
186
|
-
}}>Cancel</button
|
|
187
|
-
>
|
|
188
|
-
</div>
|
|
189
|
-
{/snippet}
|
|
190
|
-
</TouchModal>
|
|
191
|
-
|
|
192
|
-
{#snippet overrideButton()}
|
|
193
|
-
<div>
|
|
194
|
-
<Action
|
|
195
|
-
icon={{ name: 'edit' }}
|
|
196
|
-
size={Size.DoubleXLarge}
|
|
197
|
-
colourSet={isBeingEdited ? ColourSet.Primary : ColourSet.Secondary}
|
|
198
|
-
label={isBeingEdited ? 'Cancel override' : 'Override date'}
|
|
199
|
-
onclick={() => {
|
|
200
|
-
if (!allowOverride) {
|
|
201
|
-
return;
|
|
202
|
-
}
|
|
203
|
-
isBeingEdited = !isBeingEdited;
|
|
204
|
-
}}
|
|
205
|
-
/>
|
|
206
|
-
</div>
|
|
207
|
-
{/snippet}
|
|
208
|
-
|
|
1
|
+
<svelte:options runes />
|
|
2
|
+
|
|
3
|
+
<script
|
|
4
|
+
lang="ts"
|
|
5
|
+
module
|
|
6
|
+
>
|
|
7
|
+
import { devCatch, passthrough } from '../../Helpers/Helpers.svelte.js';
|
|
8
|
+
import { ColourSet } from '../../scss/colours.js';
|
|
9
|
+
import { InputVariant } from '../../Types/Internal/InputVariant.js';
|
|
10
|
+
import { Size } from '../../Types/Internal/Size.js';
|
|
11
|
+
import { tick } from 'svelte';
|
|
12
|
+
import Action from '../Action.svelte';
|
|
13
|
+
import DatePicker from '../DatePicker.svelte';
|
|
14
|
+
import TextInput from '../TextInput.svelte';
|
|
15
|
+
import type { DateModalProps } from './DateModalProps.js';
|
|
16
|
+
import TouchModal from './TouchModal.svelte';
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<script lang="ts">
|
|
20
|
+
let {
|
|
21
|
+
header,
|
|
22
|
+
value,
|
|
23
|
+
cancelEditing,
|
|
24
|
+
confirm,
|
|
25
|
+
namedMonths = false,
|
|
26
|
+
validate,
|
|
27
|
+
showScanner = false,
|
|
28
|
+
scanValue = $bindable(''),
|
|
29
|
+
overrideScanValue = $bindable(''),
|
|
30
|
+
confirmScannedValue,
|
|
31
|
+
inclusive = false,
|
|
32
|
+
explanation,
|
|
33
|
+
allowOverride = false,
|
|
34
|
+
showTime = false,
|
|
35
|
+
}: DateModalProps = $props();
|
|
36
|
+
|
|
37
|
+
// Snapshot the incoming `value` into mutable working state. Reset via
|
|
38
|
+
// the effect below when the parent hands us a new `value` reference;
|
|
39
|
+
let tempValue: Date = $state(new Date());
|
|
40
|
+
let overrideValue = $state(new Date());
|
|
41
|
+
let isBeingEdited = $state(false);
|
|
42
|
+
let inputRef: HTMLInputElement | undefined = $state();
|
|
43
|
+
let overrideInputRef: HTMLInputElement | undefined = $state();
|
|
44
|
+
const isValid = $derived(validate?.(tempValue) ?? true);
|
|
45
|
+
|
|
46
|
+
export function resetIsBeingEdited() {
|
|
47
|
+
isBeingEdited = false;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
$effect(() => {
|
|
51
|
+
// Reset edit state and working value when the caller hands us a new
|
|
52
|
+
// `value` reference.
|
|
53
|
+
void value;
|
|
54
|
+
isBeingEdited = false;
|
|
55
|
+
// eslint-disable-next-line svelte/prefer-svelte-reactivity
|
|
56
|
+
tempValue = value ?? new Date();
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
$effect(() => {
|
|
60
|
+
void isBeingEdited;
|
|
61
|
+
void allowOverride;
|
|
62
|
+
tick()
|
|
63
|
+
.then(() => {
|
|
64
|
+
if (isBeingEdited) {
|
|
65
|
+
overrideInputRef?.focus();
|
|
66
|
+
} else {
|
|
67
|
+
inputRef?.focus();
|
|
68
|
+
}
|
|
69
|
+
})
|
|
70
|
+
.catch(devCatch);
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
function onsubmit(e?: SubmitEvent) {
|
|
74
|
+
e?.preventDefault();
|
|
75
|
+
|
|
76
|
+
if (isValid) {
|
|
77
|
+
// Confirm without mutating the bound state. If the caller asked for
|
|
78
|
+
// an inclusive (end-of-day) reading, hand back a fresh copy with
|
|
79
|
+
// 23:59:59 set rather than re-stamping `tempValue` in place.
|
|
80
|
+
let outValue = tempValue;
|
|
81
|
+
if (inclusive) {
|
|
82
|
+
outValue = new Date(tempValue.getTime());
|
|
83
|
+
outValue.setHours(23, 59, 59);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
confirm(outValue, allowOverride && isBeingEdited ? overrideValue : undefined);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
scanValue = '';
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function submitOnEnter(e: KeyboardEvent) {
|
|
93
|
+
if (e.key === 'Enter') {
|
|
94
|
+
e.preventDefault();
|
|
95
|
+
e.stopPropagation();
|
|
96
|
+
|
|
97
|
+
if (!scanValue || (isBeingEdited && !overrideScanValue)) {
|
|
98
|
+
if (
|
|
99
|
+
allowOverride &&
|
|
100
|
+
isBeingEdited &&
|
|
101
|
+
!overrideScanValue &&
|
|
102
|
+
document.activeElement != inputRef
|
|
103
|
+
) {
|
|
104
|
+
overrideInputRef?.focus();
|
|
105
|
+
} else {
|
|
106
|
+
inputRef?.focus();
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
confirmScannedValue?.(
|
|
113
|
+
scanValue,
|
|
114
|
+
allowOverride && isBeingEdited ? overrideScanValue : undefined
|
|
115
|
+
);
|
|
116
|
+
scanValue = '';
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
</script>
|
|
120
|
+
|
|
121
|
+
<TouchModal
|
|
122
|
+
onclose={() => {
|
|
123
|
+
cancelEditing();
|
|
124
|
+
}}
|
|
125
|
+
{header}
|
|
126
|
+
{onsubmit}
|
|
127
|
+
{explanation}
|
|
128
|
+
>
|
|
129
|
+
{#if showScanner}
|
|
130
|
+
<div class="inputs">
|
|
131
|
+
{#if allowOverride}
|
|
132
|
+
<!-- eslint-disable-next-line @typescript-eslint/no-confusing-void-expression -->
|
|
133
|
+
{@render overrideButton()}
|
|
134
|
+
{/if}
|
|
135
|
+
{#if isBeingEdited}
|
|
136
|
+
<TextInput
|
|
137
|
+
bind:inputRef={overrideInputRef}
|
|
138
|
+
bind:value={overrideScanValue}
|
|
139
|
+
variant={InputVariant.Modal}
|
|
140
|
+
labelTop="Scan Barcode to Override"
|
|
141
|
+
onkeydown={submitOnEnter}
|
|
142
|
+
/>
|
|
143
|
+
{/if}
|
|
144
|
+
<TextInput
|
|
145
|
+
bind:inputRef
|
|
146
|
+
bind:value={scanValue}
|
|
147
|
+
variant={InputVariant.Modal}
|
|
148
|
+
labelTop="Scan Barcode"
|
|
149
|
+
onkeydown={submitOnEnter}
|
|
150
|
+
/>
|
|
151
|
+
</div>
|
|
152
|
+
{:else if allowOverride}
|
|
153
|
+
<!-- eslint-disable-next-line @typescript-eslint/no-confusing-void-expression -->
|
|
154
|
+
{@render overrideButton()}
|
|
155
|
+
{/if}
|
|
156
|
+
|
|
157
|
+
<div class="inputs">
|
|
158
|
+
{#if allowOverride && isBeingEdited}
|
|
159
|
+
<DatePicker
|
|
160
|
+
{showTime}
|
|
161
|
+
{onsubmit}
|
|
162
|
+
{namedMonths}
|
|
163
|
+
bind:date={overrideValue}
|
|
164
|
+
/>
|
|
165
|
+
{/if}
|
|
166
|
+
<DatePicker
|
|
167
|
+
{showTime}
|
|
168
|
+
{onsubmit}
|
|
169
|
+
{namedMonths}
|
|
170
|
+
bind:date={tempValue}
|
|
171
|
+
/>
|
|
172
|
+
</div>
|
|
173
|
+
|
|
174
|
+
{#snippet footer()}
|
|
175
|
+
<div class="modal-footer">
|
|
176
|
+
<button
|
|
177
|
+
onkeydown={passthrough}
|
|
178
|
+
type="submit"
|
|
179
|
+
disabled={!isValid}>Confirm</button
|
|
180
|
+
>
|
|
181
|
+
<button
|
|
182
|
+
onkeydown={passthrough}
|
|
183
|
+
type="button"
|
|
184
|
+
onclick={() => {
|
|
185
|
+
cancelEditing();
|
|
186
|
+
}}>Cancel</button
|
|
187
|
+
>
|
|
188
|
+
</div>
|
|
189
|
+
{/snippet}
|
|
190
|
+
</TouchModal>
|
|
191
|
+
|
|
192
|
+
{#snippet overrideButton()}
|
|
193
|
+
<div>
|
|
194
|
+
<Action
|
|
195
|
+
icon={{ name: 'edit' }}
|
|
196
|
+
size={Size.DoubleXLarge}
|
|
197
|
+
colourSet={isBeingEdited ? ColourSet.Primary : ColourSet.Secondary}
|
|
198
|
+
label={isBeingEdited ? 'Cancel override' : 'Override date'}
|
|
199
|
+
onclick={() => {
|
|
200
|
+
if (!allowOverride) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
isBeingEdited = !isBeingEdited;
|
|
204
|
+
}}
|
|
205
|
+
/>
|
|
206
|
+
</div>
|
|
207
|
+
{/snippet}
|
|
208
|
+
|
|
209
209
|
<style>.modal-footer {
|
|
210
210
|
bottom: 0;
|
|
211
211
|
border-top: solid 1px #cbd4da;
|
|
@@ -264,4 +264,4 @@ div.inputs {
|
|
|
264
264
|
flex-flow: row nowrap;
|
|
265
265
|
gap: 1.5rem;
|
|
266
266
|
justify-content: space-around;
|
|
267
|
-
}</style>
|
|
267
|
+
}</style>
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
<svelte:options runes />
|
|
2
|
-
|
|
3
|
-
<script lang="ts">
|
|
4
|
-
import { passthrough } from '../../Helpers/Helpers.svelte.js';
|
|
5
|
-
import { Size } from '../../Types/Internal/Size.js';
|
|
6
|
-
import Icon from '../Icon.svelte';
|
|
7
|
-
import type { EditCardProps } from './EditCardProps.js';
|
|
8
|
-
const {
|
|
9
|
-
noborder,
|
|
10
|
-
label,
|
|
11
|
-
desktop = false,
|
|
12
|
-
iconName = 'edit',
|
|
13
|
-
disabled = false,
|
|
14
|
-
error = false,
|
|
15
|
-
onclick,
|
|
16
|
-
children,
|
|
17
|
-
}: EditCardProps = $props();
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<button
|
|
21
|
-
type="button"
|
|
22
|
-
class="card"
|
|
23
|
-
class:desktop
|
|
24
|
-
class:error
|
|
25
|
-
class:noborder
|
|
26
|
-
{disabled}
|
|
27
|
-
aria-disabled={disabled}
|
|
28
|
-
{onclick}
|
|
29
|
-
onkeydown={passthrough}
|
|
30
|
-
>
|
|
31
|
-
<div class="left">
|
|
32
|
-
{#if label}
|
|
33
|
-
<div class="row">
|
|
34
|
-
<span class="card-label label">{label}</span>
|
|
35
|
-
{#if desktop}
|
|
36
|
-
<span class="card-label border">{label}</span>
|
|
37
|
-
{/if}
|
|
38
|
-
</div>
|
|
39
|
-
{/if}
|
|
40
|
-
<div
|
|
41
|
-
class="row"
|
|
42
|
-
class:labelless={!label}
|
|
43
|
-
>
|
|
44
|
-
{#if children}
|
|
45
|
-
<span class="value">{@render children()}</span>
|
|
46
|
-
{/if}
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
<div class="right">
|
|
50
|
-
{#if iconName}
|
|
51
|
-
<Icon
|
|
52
|
-
name={iconName}
|
|
53
|
-
size={desktop ? Size.Medium : Size.XLarge}
|
|
54
|
-
/>
|
|
55
|
-
{/if}
|
|
56
|
-
</div>
|
|
57
|
-
</button>
|
|
58
|
-
|
|
1
|
+
<svelte:options runes />
|
|
2
|
+
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
import { passthrough } from '../../Helpers/Helpers.svelte.js';
|
|
5
|
+
import { Size } from '../../Types/Internal/Size.js';
|
|
6
|
+
import Icon from '../Icon.svelte';
|
|
7
|
+
import type { EditCardProps } from './EditCardProps.js';
|
|
8
|
+
const {
|
|
9
|
+
noborder,
|
|
10
|
+
label,
|
|
11
|
+
desktop = false,
|
|
12
|
+
iconName = 'edit',
|
|
13
|
+
disabled = false,
|
|
14
|
+
error = false,
|
|
15
|
+
onclick,
|
|
16
|
+
children,
|
|
17
|
+
}: EditCardProps = $props();
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<button
|
|
21
|
+
type="button"
|
|
22
|
+
class="card"
|
|
23
|
+
class:desktop
|
|
24
|
+
class:error
|
|
25
|
+
class:noborder
|
|
26
|
+
{disabled}
|
|
27
|
+
aria-disabled={disabled}
|
|
28
|
+
{onclick}
|
|
29
|
+
onkeydown={passthrough}
|
|
30
|
+
>
|
|
31
|
+
<div class="left">
|
|
32
|
+
{#if label}
|
|
33
|
+
<div class="row">
|
|
34
|
+
<span class="card-label label">{label}</span>
|
|
35
|
+
{#if desktop}
|
|
36
|
+
<span class="card-label border">{label}</span>
|
|
37
|
+
{/if}
|
|
38
|
+
</div>
|
|
39
|
+
{/if}
|
|
40
|
+
<div
|
|
41
|
+
class="row"
|
|
42
|
+
class:labelless={!label}
|
|
43
|
+
>
|
|
44
|
+
{#if children}
|
|
45
|
+
<span class="value">{@render children()}</span>
|
|
46
|
+
{/if}
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
<div class="right">
|
|
50
|
+
{#if iconName}
|
|
51
|
+
<Icon
|
|
52
|
+
name={iconName}
|
|
53
|
+
size={desktop ? Size.Medium : Size.XLarge}
|
|
54
|
+
/>
|
|
55
|
+
{/if}
|
|
56
|
+
</div>
|
|
57
|
+
</button>
|
|
58
|
+
|
|
59
59
|
<style>.card {
|
|
60
60
|
color: #3a4952;
|
|
61
61
|
fill: #3a4952;
|
|
@@ -213,4 +213,4 @@
|
|
|
213
213
|
}
|
|
214
214
|
.card .labelless {
|
|
215
215
|
padding: 0.75rem;
|
|
216
|
-
}</style>
|
|
216
|
+
}</style>
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
<svelte:options runes />
|
|
2
|
-
|
|
3
|
-
<script lang="ts">
|
|
4
|
-
import { Size } from '../../Types/Internal/Size.js';
|
|
5
|
-
import Icon from '../Icon.svelte';
|
|
6
|
-
import type { InfoCardProps } from './InfoCardProps.js';
|
|
7
|
-
|
|
8
|
-
const { noborder, label, iconName, children }: InfoCardProps = $props();
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<div
|
|
12
|
-
class="card"
|
|
13
|
-
class:pad-vertical={!label}
|
|
14
|
-
class:noborder
|
|
15
|
-
>
|
|
16
|
-
{#if label}
|
|
17
|
-
<span class="card-label">{label}</span>
|
|
18
|
-
{/if}
|
|
19
|
-
|
|
20
|
-
<span class="value">{@render children()}</span>
|
|
21
|
-
{#if iconName}
|
|
22
|
-
<div class="icon">
|
|
23
|
-
<Icon
|
|
24
|
-
name={iconName}
|
|
25
|
-
size={Size.Large}
|
|
26
|
-
/>
|
|
27
|
-
</div>
|
|
28
|
-
{/if}
|
|
29
|
-
</div>
|
|
30
|
-
|
|
1
|
+
<svelte:options runes />
|
|
2
|
+
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
import { Size } from '../../Types/Internal/Size.js';
|
|
5
|
+
import Icon from '../Icon.svelte';
|
|
6
|
+
import type { InfoCardProps } from './InfoCardProps.js';
|
|
7
|
+
|
|
8
|
+
const { noborder, label, iconName, children }: InfoCardProps = $props();
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<div
|
|
12
|
+
class="card"
|
|
13
|
+
class:pad-vertical={!label}
|
|
14
|
+
class:noborder
|
|
15
|
+
>
|
|
16
|
+
{#if label}
|
|
17
|
+
<span class="card-label">{label}</span>
|
|
18
|
+
{/if}
|
|
19
|
+
|
|
20
|
+
<span class="value">{@render children()}</span>
|
|
21
|
+
{#if iconName}
|
|
22
|
+
<div class="icon">
|
|
23
|
+
<Icon
|
|
24
|
+
name={iconName}
|
|
25
|
+
size={Size.Large}
|
|
26
|
+
/>
|
|
27
|
+
</div>
|
|
28
|
+
{/if}
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
31
|
<style>.card {
|
|
32
32
|
color: #3a4952;
|
|
33
33
|
fill: #3a4952;
|
|
@@ -77,4 +77,4 @@
|
|
|
77
77
|
align-items: center;
|
|
78
78
|
position: absolute;
|
|
79
79
|
right: 0.75rem;
|
|
80
|
-
}</style>
|
|
80
|
+
}</style>
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
<svelte:options runes />
|
|
2
|
-
|
|
3
|
-
<script lang="ts">
|
|
4
|
-
import { Colour } from '../../scss/colours.js';
|
|
5
|
-
import { Size } from '../../Types/Internal/Size.js';
|
|
6
|
-
import Icon from '../Icon.svelte';
|
|
7
|
-
import type { InfoTextCardProps } from './InfoTextCardProps.js';
|
|
8
|
-
let { label, iconName, children }: InfoTextCardProps = $props();
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<div
|
|
12
|
-
class="card"
|
|
13
|
-
class:pad-vertical={!label}
|
|
14
|
-
>
|
|
15
|
-
{#if iconName}
|
|
16
|
-
<div class="icon">
|
|
17
|
-
<Icon
|
|
18
|
-
name={iconName}
|
|
19
|
-
size={Size.Large}
|
|
20
|
-
colour={Colour['$brand-primary']}
|
|
21
|
-
/>
|
|
22
|
-
</div>
|
|
23
|
-
{/if}
|
|
24
|
-
|
|
25
|
-
<span class="value">{@render children()}</span>
|
|
26
|
-
</div>
|
|
27
|
-
|
|
1
|
+
<svelte:options runes />
|
|
2
|
+
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
import { Colour } from '../../scss/colours.js';
|
|
5
|
+
import { Size } from '../../Types/Internal/Size.js';
|
|
6
|
+
import Icon from '../Icon.svelte';
|
|
7
|
+
import type { InfoTextCardProps } from './InfoTextCardProps.js';
|
|
8
|
+
let { label, iconName, children }: InfoTextCardProps = $props();
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<div
|
|
12
|
+
class="card"
|
|
13
|
+
class:pad-vertical={!label}
|
|
14
|
+
>
|
|
15
|
+
{#if iconName}
|
|
16
|
+
<div class="icon">
|
|
17
|
+
<Icon
|
|
18
|
+
name={iconName}
|
|
19
|
+
size={Size.Large}
|
|
20
|
+
colour={Colour['$brand-primary']}
|
|
21
|
+
/>
|
|
22
|
+
</div>
|
|
23
|
+
{/if}
|
|
24
|
+
|
|
25
|
+
<span class="value">{@render children()}</span>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
28
|
<style>.card {
|
|
29
29
|
color: #3a4952;
|
|
30
30
|
fill: #3a4952;
|
|
@@ -50,4 +50,4 @@
|
|
|
50
50
|
.card .value {
|
|
51
51
|
padding: 0 0.25rem;
|
|
52
52
|
color: #3a4952;
|
|
53
|
-
}</style>
|
|
53
|
+
}</style>
|