@lavalogic/scoria 0.40.32 → 0.40.33
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 +28 -28
- package/dist/Components/AccordionGroupButton.svelte +60 -60
- package/dist/Components/Action.svelte +48 -48
- package/dist/Components/AlertModal.svelte +102 -102
- package/dist/Components/Base/ContextWrapper.svelte +45 -45
- package/dist/Components/Base/Pagination.svelte +135 -135
- package/dist/Components/Base/Snippets.svelte +25 -25
- package/dist/Components/BigRadioSet.svelte +34 -34
- package/dist/Components/Bubble.svelte +38 -38
- package/dist/Components/Button.svelte +83 -83
- package/dist/Components/Checkbox.svelte +71 -71
- package/dist/Components/CollapsibleCard.svelte +59 -59
- package/dist/Components/CollapsibleMenuGroup.svelte +43 -43
- package/dist/Components/ConditionBuilder/ConditionBuilder.svelte +101 -101
- package/dist/Components/Contexts/ContextMenu.svelte +76 -76
- package/dist/Components/Contexts/ContextMenuDivider.svelte +15 -15
- package/dist/Components/Contexts/ContextMenuOption.svelte +38 -38
- package/dist/Components/Contexts/Toast.svelte +71 -71
- package/dist/Components/Contexts/ToastContainer.svelte +34 -34
- package/dist/Components/Contexts/Tooltip.svelte +32 -32
- package/dist/Components/DataMatrixIcon.svelte +37 -37
- package/dist/Components/DateInput.svelte +80 -80
- package/dist/Components/DatePicker.svelte +86 -86
- package/dist/Components/DesktopModal.svelte +65 -65
- package/dist/Components/Dial.svelte +35 -35
- package/dist/Components/DimensionInput.svelte +95 -95
- package/dist/Components/DragMenu/DragMenuHolder.svelte +53 -53
- package/dist/Components/DragMenu/DraggableCard.svelte +49 -49
- package/dist/Components/FileCard.svelte +18 -18
- package/dist/Components/FileUpload.svelte +115 -115
- package/dist/Components/GridInput.svelte +123 -123
- package/dist/Components/GridInputSet.svelte +21 -21
- package/dist/Components/HorizontalTabGroup.svelte +54 -54
- package/dist/Components/HorizontalTabGroupButton.svelte +32 -32
- package/dist/Components/Icon.svelte +68 -68
- package/dist/Components/InfoAlert.svelte +32 -32
- package/dist/Components/LoadingAnimation.svelte +228 -227
- package/dist/Components/LoadingModal.svelte +19 -19
- package/dist/Components/LoadingOverlay.svelte +20 -20
- package/dist/Components/Modal.svelte +127 -127
- package/dist/Components/MultiSelect.svelte +126 -126
- package/dist/Components/Nav/Nav.svelte +71 -71
- package/dist/Components/Nav/NavServiceMenuList.svelte +37 -37
- package/dist/Components/Nav/NavTab.svelte +46 -46
- package/dist/Components/Nav/ServiceMenuItem.svelte +62 -62
- package/dist/Components/Nav/ServicesNav.svelte +50 -50
- package/dist/Components/NumberInput.svelte +98 -98
- package/dist/Components/OptionCards.svelte +58 -58
- package/dist/Components/PageHeading.svelte +21 -21
- package/dist/Components/PasswordInput.svelte +61 -61
- package/dist/Components/PopoverButton.svelte +53 -53
- package/dist/Components/Portal.svelte +7 -7
- package/dist/Components/ProgressBubble.svelte +42 -42
- package/dist/Components/QuerySelect.svelte +102 -102
- package/dist/Components/ResourceCalendar/ResourceCalendar.svelte +241 -241
- package/dist/Components/SidebarPanel.svelte +32 -32
- package/dist/Components/SingleSelect.svelte +122 -122
- package/dist/Components/StepButton.svelte +48 -48
- package/dist/Components/StepForm.svelte +58 -58
- package/dist/Components/Switch.svelte +43 -43
- package/dist/Components/Table/ARCHITECTURE.md +298 -298
- package/dist/Components/Table/Body/Rows/ColumnHighlight.svelte +30 -30
- package/dist/Components/Table/Body/Rows/ColumnList.svelte +24 -24
- package/dist/Components/Table/Body/Rows/ColumnListRow.svelte +165 -165
- package/dist/Components/Table/Body/Rows/Columns/AccessorComponent.svelte +13 -13
- package/dist/Components/Table/Body/Rows/Columns/ActionsCell.svelte +120 -120
- package/dist/Components/Table/Body/Rows/Columns/BubbleCell.svelte +81 -81
- package/dist/Components/Table/Body/Rows/Columns/ExpandCell.svelte +92 -92
- package/dist/Components/Table/Body/Rows/Columns/FocusableImmutableCell.svelte +110 -110
- package/dist/Components/Table/Body/Rows/Columns/ProgressCell.svelte +54 -54
- package/dist/Components/Table/Body/Rows/Columns/TableAction.svelte +35 -35
- package/dist/Components/Table/Body/Rows/Columns/TableCheckbox.svelte +64 -64
- package/dist/Components/Table/Body/Rows/Columns/TableColumn.svelte +82 -82
- package/dist/Components/Table/Body/Rows/Columns/TableDatePicker.svelte +88 -88
- package/dist/Components/Table/Body/Rows/Columns/TableNumberInput.svelte +90 -90
- package/dist/Components/Table/Body/Rows/Columns/TableQuerySelect.svelte +96 -96
- package/dist/Components/Table/Body/Rows/Columns/TableRowSelectionCheckbox.svelte +71 -71
- package/dist/Components/Table/Body/Rows/Columns/TableSelect.svelte +124 -124
- package/dist/Components/Table/Body/Rows/Columns/TableTextInput.svelte +91 -91
- package/dist/Components/Table/Body/Rows/Columns/ValidityCell.svelte +88 -88
- package/dist/Components/Table/Body/Rows/TableRow.svelte +127 -127
- package/dist/Components/Table/Body/TableBody.svelte +92 -92
- package/dist/Components/Table/Headers/HighlightAllHeader.svelte +25 -25
- package/dist/Components/Table/Headers/SelectAllHeader.svelte +20 -20
- package/dist/Components/Table/Headers/TableHead.svelte +175 -175
- package/dist/Components/Table/Misc/ColumnPanel.svelte +32 -32
- package/dist/Components/Table/Misc/ColumnPanelModal.svelte +29 -29
- package/dist/Components/Table/Misc/FilterInput.svelte +326 -326
- package/dist/Components/Table/Misc/FilterPanel.svelte +79 -79
- package/dist/Components/Table/Misc/FilterPanelModal.svelte +21 -21
- package/dist/Components/Table/Misc/ShareViewModal.svelte +118 -118
- package/dist/Components/Table/Misc/SidePanel.svelte +24 -24
- package/dist/Components/Table/Misc/TableConfigurationModal.svelte +318 -318
- package/dist/Components/Table/Misc/TableFooter.svelte +201 -201
- package/dist/Components/Table/Misc/TableHorizontalBar.svelte +112 -112
- package/dist/Components/Table/Misc/TableSidebar.svelte +116 -116
- package/dist/Components/Table/Misc/TableViewDropdown.svelte +25 -25
- package/dist/Components/Table/Misc/ToolboxPanel.svelte +60 -60
- package/dist/Components/Table/Misc/ToolboxPanelModal.svelte +63 -63
- package/dist/Components/Table/Misc/UpdateViewOptionsModal.svelte +101 -101
- package/dist/Components/Table/NestedTable.svelte +29 -29
- package/dist/Components/Table/Table.svelte +140 -140
- package/dist/Components/Test/TestContextConsumer.svelte +8 -8
- package/dist/Components/TextArea.svelte +92 -90
- package/dist/Components/TextInput.svelte +128 -117
- package/dist/Components/ThreeStateRadio.svelte +101 -101
- package/dist/Components/Touch/BoolCard.svelte +27 -27
- package/dist/Components/Touch/DateModal.svelte +98 -98
- package/dist/Components/Touch/EditCard.svelte +44 -44
- package/dist/Components/Touch/InfoCard.svelte +25 -25
- package/dist/Components/Touch/InfoTextCard.svelte +22 -22
- package/dist/Components/Touch/ModalExplanation.svelte +13 -13
- package/dist/Components/Touch/NumberKeyboard.svelte +81 -81
- package/dist/Components/Touch/NumberModal.svelte +49 -49
- package/dist/Components/Touch/PlusMinusCard.svelte +40 -40
- package/dist/Components/Touch/SelectModal.svelte +86 -86
- package/dist/Components/Touch/SummaryCard.svelte +74 -74
- package/dist/Components/Touch/TextAreaModal.svelte +53 -53
- package/dist/Components/Touch/TextModal.svelte +56 -56
- package/dist/Components/Touch/TouchCard.svelte +28 -28
- package/dist/Components/Touch/TouchModal.svelte +141 -141
- package/dist/Components/Touch/UtilityButton.svelte +63 -63
- package/dist/Components/VerticalTabGroup.svelte +38 -38
- package/dist/Components/VerticalTabGroupButton.svelte +46 -46
- package/dist/Helpers/Datamatrix.d.ts +19 -19
- package/dist/Helpers/Datamatrix.js +291 -291
- package/dist/Types/Examples/ExampleModal.svelte +27 -27
- package/dist/paraglide/README.md +1 -1
- package/dist/scss/_basics.scss +12 -12
- package/dist/scss/_colours.scss +140 -140
- 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,8 +1,8 @@
|
|
|
1
|
-
<svelte:options runes />
|
|
2
|
-
|
|
3
|
-
<script
|
|
4
|
-
module
|
|
5
|
-
lang="ts"
|
|
1
|
+
<svelte:options runes />
|
|
2
|
+
|
|
3
|
+
<script
|
|
4
|
+
module
|
|
5
|
+
lang="ts"
|
|
6
6
|
>import { m as i18n } from "../../paraglide/messages.js";
|
|
7
7
|
import { browser } from "$app/environment";
|
|
8
8
|
import { DATAMatrix } from "../../Helpers/Datamatrix.js";
|
|
@@ -14,8 +14,8 @@ import { onMount } from "svelte";
|
|
|
14
14
|
import Action from "../Action.svelte";
|
|
15
15
|
import BaseModal from "../Base/BaseModal.svelte";
|
|
16
16
|
import DataMatrixIcon from "../DataMatrixIcon.svelte";
|
|
17
|
-
</script>
|
|
18
|
-
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
19
|
<script lang="ts">let { header, buttons, mandatory = false, staticHeight = false, staticWidth = false, minWidth = "400px", minHeight = "280px", width, height, onShowCallback, defaultTimer, isValid = true, noscroll = false, onsubmit, headerExtra, explanation, children, footer, onclose, row, wrap, submitRef = $bindable() } = $props();
|
|
20
20
|
let open = $state(true);
|
|
21
21
|
let form = $state();
|
|
@@ -83,139 +83,139 @@ const dialogClassNames = $derived([
|
|
|
83
83
|
noscroll ? "noscroll" : null
|
|
84
84
|
].filter((c) => c !== null).join(" "));
|
|
85
85
|
const dialogStyle = $derived(`--timer: ${defaultTimer ? defaultTimer.time.toString() + "ms" : "unset"};` + `--dialog-min-width: ${minWidth};` + `--dialog-min-height: ${minHeight};` + (height != null ? `--dialog-height: ${height};` : "") + (width != null ? `--dialog-width: ${width};` : ""));
|
|
86
|
-
</script>
|
|
87
|
-
|
|
88
|
-
<BaseModal
|
|
89
|
-
bind:value={open}
|
|
90
|
-
{onclose}
|
|
91
|
-
{mandatory}
|
|
92
|
-
dialogClass={dialogClassNames}
|
|
93
|
-
{dialogStyle}
|
|
94
|
-
>
|
|
95
|
-
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
|
|
96
|
-
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
97
|
-
<form
|
|
98
|
-
method="dialog"
|
|
99
|
-
bind:this={form}
|
|
100
|
-
onsubmit={(e) => {
|
|
101
|
-
e.preventDefault();
|
|
102
|
-
clearTimer();
|
|
103
|
-
if (isActive) {
|
|
104
|
-
onsubmit?.(e);
|
|
105
|
-
}
|
|
106
|
-
}}
|
|
107
|
-
onclick={clearTimer}
|
|
108
|
-
class="modal-root"
|
|
109
|
-
>
|
|
110
|
-
<div class="modal-header">
|
|
111
|
-
{#if mandatory}
|
|
112
|
-
<div class="title-wrapper">
|
|
113
|
-
<h3 class="modal-heading">{header}</h3>
|
|
114
|
-
</div>
|
|
115
|
-
{:else}
|
|
116
|
-
<div class="title-wrapper">
|
|
117
|
-
<h3 class="modal-heading padded">{header}</h3>
|
|
118
|
-
<div class="close-button">
|
|
119
|
-
<Action
|
|
120
|
-
size={Size.Large}
|
|
121
|
-
onclick={requestClose}
|
|
122
|
-
icon={{
|
|
123
|
-
name: 'cross',
|
|
124
|
-
size: Size.DoubleXLarge,
|
|
125
|
-
}}
|
|
126
|
-
onkeydown={handleEsc}
|
|
127
|
-
colourSet={ColourSet.Primary}
|
|
128
|
-
label={i18n['scoria.action.close_modal_generic']()}
|
|
129
|
-
/>
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
{/if}
|
|
133
|
-
|
|
134
|
-
{#if headerExtra}
|
|
135
|
-
{@render headerExtra()}
|
|
136
|
-
{/if}
|
|
137
|
-
</div>
|
|
138
|
-
|
|
139
|
-
{#if defaultTimer}
|
|
140
|
-
<div class="bar-container">
|
|
141
|
-
<div
|
|
142
|
-
class:paused
|
|
143
|
-
class="bar-timer"
|
|
144
|
-
></div>
|
|
145
|
-
</div>
|
|
146
|
-
{/if}
|
|
147
|
-
|
|
148
|
-
<div
|
|
149
|
-
class="modal-main"
|
|
150
|
-
class:row
|
|
151
|
-
class:wrap
|
|
152
|
-
class:noscroll
|
|
153
|
-
>
|
|
154
|
-
{#if explanation}
|
|
155
|
-
{@render explanation()}
|
|
156
|
-
{/if}
|
|
157
|
-
{@render children()}
|
|
158
|
-
</div>
|
|
159
|
-
|
|
160
|
-
{#if footer}
|
|
161
|
-
{@render footer()}
|
|
162
|
-
{:else if buttons?.length}
|
|
163
|
-
<div class="modal-footer">
|
|
164
|
-
{#each buttons as button, index (button.label)}
|
|
165
|
-
{@const buttonIsValid = buttonValidities.value[index] ?? true}
|
|
166
|
-
{#if button.callback}
|
|
167
|
-
<div class="button-barcode-set">
|
|
168
|
-
{#if barcodeIcons[index]}
|
|
169
|
-
<DataMatrixIcon
|
|
170
|
-
title={button.label}
|
|
171
|
-
icon={{ kind: 'svg', svg: barcodeIcons[index] }}
|
|
172
|
-
/>
|
|
173
|
-
{/if}
|
|
174
|
-
<button
|
|
175
|
-
class:call-to-action={button.colourSet === ColourSet.CallToAction}
|
|
176
|
-
class:primary={button.colourSet === ColourSet.Primary}
|
|
177
|
-
class:secondary-colour={button.colourSet === ColourSet.Secondary}
|
|
178
|
-
class:warning={button.colourSet === ColourSet.Warning}
|
|
179
|
-
class:error={button.colourSet === ColourSet.Error}
|
|
180
|
-
class:info={button.colourSet === ColourSet.Info}
|
|
181
|
-
onkeydown={passthrough}
|
|
182
|
-
disabled={!buttonIsValid}
|
|
183
|
-
class:margin-inline-start={button.margin === 'left'}
|
|
184
|
-
class:margin-inline-end={button.margin === 'right'}
|
|
185
|
-
type={button.type ?? 'button'}
|
|
186
|
-
onclick={button.callback}>{button.label}</button
|
|
187
|
-
>
|
|
188
|
-
</div>
|
|
189
|
-
{:else}
|
|
190
|
-
<div class="button-barcode-set">
|
|
191
|
-
{#if barcodeIcons[index]}
|
|
192
|
-
<DataMatrixIcon
|
|
193
|
-
title={button.label}
|
|
194
|
-
icon={{ kind: 'svg', svg: barcodeIcons[index] }}
|
|
195
|
-
/>
|
|
196
|
-
{/if}
|
|
197
|
-
<button
|
|
198
|
-
class:call-to-action={button.colourSet === ColourSet.CallToAction}
|
|
199
|
-
class:primary={button.colourSet === ColourSet.Primary}
|
|
200
|
-
class:secondary-colour={button.colourSet === ColourSet.Secondary}
|
|
201
|
-
class:warning={button.colourSet === ColourSet.Warning}
|
|
202
|
-
class:error={button.colourSet === ColourSet.Error}
|
|
203
|
-
class:info={button.colourSet === ColourSet.Info}
|
|
204
|
-
onkeydown={passthrough}
|
|
205
|
-
disabled={!buttonIsValid || !isValid}
|
|
206
|
-
class:margin-inline-start={button.margin === 'left'}
|
|
207
|
-
class:margin-inline-end={button.margin === 'right'}
|
|
208
|
-
bind:this={submitRef}
|
|
209
|
-
type={button.type ?? 'submit'}>{button.label}</button
|
|
210
|
-
>
|
|
211
|
-
</div>
|
|
212
|
-
{/if}
|
|
213
|
-
{/each}
|
|
214
|
-
</div>
|
|
215
|
-
{/if}
|
|
216
|
-
</form>
|
|
217
|
-
</BaseModal>
|
|
218
|
-
|
|
86
|
+
</script>
|
|
87
|
+
|
|
88
|
+
<BaseModal
|
|
89
|
+
bind:value={open}
|
|
90
|
+
{onclose}
|
|
91
|
+
{mandatory}
|
|
92
|
+
dialogClass={dialogClassNames}
|
|
93
|
+
{dialogStyle}
|
|
94
|
+
>
|
|
95
|
+
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
|
|
96
|
+
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
97
|
+
<form
|
|
98
|
+
method="dialog"
|
|
99
|
+
bind:this={form}
|
|
100
|
+
onsubmit={(e) => {
|
|
101
|
+
e.preventDefault();
|
|
102
|
+
clearTimer();
|
|
103
|
+
if (isActive) {
|
|
104
|
+
onsubmit?.(e);
|
|
105
|
+
}
|
|
106
|
+
}}
|
|
107
|
+
onclick={clearTimer}
|
|
108
|
+
class="modal-root"
|
|
109
|
+
>
|
|
110
|
+
<div class="modal-header">
|
|
111
|
+
{#if mandatory}
|
|
112
|
+
<div class="title-wrapper">
|
|
113
|
+
<h3 class="modal-heading">{header}</h3>
|
|
114
|
+
</div>
|
|
115
|
+
{:else}
|
|
116
|
+
<div class="title-wrapper">
|
|
117
|
+
<h3 class="modal-heading padded">{header}</h3>
|
|
118
|
+
<div class="close-button">
|
|
119
|
+
<Action
|
|
120
|
+
size={Size.Large}
|
|
121
|
+
onclick={requestClose}
|
|
122
|
+
icon={{
|
|
123
|
+
name: 'cross',
|
|
124
|
+
size: Size.DoubleXLarge,
|
|
125
|
+
}}
|
|
126
|
+
onkeydown={handleEsc}
|
|
127
|
+
colourSet={ColourSet.Primary}
|
|
128
|
+
label={i18n['scoria.action.close_modal_generic']()}
|
|
129
|
+
/>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
{/if}
|
|
133
|
+
|
|
134
|
+
{#if headerExtra}
|
|
135
|
+
{@render headerExtra()}
|
|
136
|
+
{/if}
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
{#if defaultTimer}
|
|
140
|
+
<div class="bar-container">
|
|
141
|
+
<div
|
|
142
|
+
class:paused
|
|
143
|
+
class="bar-timer"
|
|
144
|
+
></div>
|
|
145
|
+
</div>
|
|
146
|
+
{/if}
|
|
147
|
+
|
|
148
|
+
<div
|
|
149
|
+
class="modal-main"
|
|
150
|
+
class:row
|
|
151
|
+
class:wrap
|
|
152
|
+
class:noscroll
|
|
153
|
+
>
|
|
154
|
+
{#if explanation}
|
|
155
|
+
{@render explanation()}
|
|
156
|
+
{/if}
|
|
157
|
+
{@render children()}
|
|
158
|
+
</div>
|
|
159
|
+
|
|
160
|
+
{#if footer}
|
|
161
|
+
{@render footer()}
|
|
162
|
+
{:else if buttons?.length}
|
|
163
|
+
<div class="modal-footer">
|
|
164
|
+
{#each buttons as button, index (button.label)}
|
|
165
|
+
{@const buttonIsValid = buttonValidities.value[index] ?? true}
|
|
166
|
+
{#if button.callback}
|
|
167
|
+
<div class="button-barcode-set">
|
|
168
|
+
{#if barcodeIcons[index]}
|
|
169
|
+
<DataMatrixIcon
|
|
170
|
+
title={button.label}
|
|
171
|
+
icon={{ kind: 'svg', svg: barcodeIcons[index] }}
|
|
172
|
+
/>
|
|
173
|
+
{/if}
|
|
174
|
+
<button
|
|
175
|
+
class:call-to-action={button.colourSet === ColourSet.CallToAction}
|
|
176
|
+
class:primary={button.colourSet === ColourSet.Primary}
|
|
177
|
+
class:secondary-colour={button.colourSet === ColourSet.Secondary}
|
|
178
|
+
class:warning={button.colourSet === ColourSet.Warning}
|
|
179
|
+
class:error={button.colourSet === ColourSet.Error}
|
|
180
|
+
class:info={button.colourSet === ColourSet.Info}
|
|
181
|
+
onkeydown={passthrough}
|
|
182
|
+
disabled={!buttonIsValid}
|
|
183
|
+
class:margin-inline-start={button.margin === 'left'}
|
|
184
|
+
class:margin-inline-end={button.margin === 'right'}
|
|
185
|
+
type={button.type ?? 'button'}
|
|
186
|
+
onclick={button.callback}>{button.label}</button
|
|
187
|
+
>
|
|
188
|
+
</div>
|
|
189
|
+
{:else}
|
|
190
|
+
<div class="button-barcode-set">
|
|
191
|
+
{#if barcodeIcons[index]}
|
|
192
|
+
<DataMatrixIcon
|
|
193
|
+
title={button.label}
|
|
194
|
+
icon={{ kind: 'svg', svg: barcodeIcons[index] }}
|
|
195
|
+
/>
|
|
196
|
+
{/if}
|
|
197
|
+
<button
|
|
198
|
+
class:call-to-action={button.colourSet === ColourSet.CallToAction}
|
|
199
|
+
class:primary={button.colourSet === ColourSet.Primary}
|
|
200
|
+
class:secondary-colour={button.colourSet === ColourSet.Secondary}
|
|
201
|
+
class:warning={button.colourSet === ColourSet.Warning}
|
|
202
|
+
class:error={button.colourSet === ColourSet.Error}
|
|
203
|
+
class:info={button.colourSet === ColourSet.Info}
|
|
204
|
+
onkeydown={passthrough}
|
|
205
|
+
disabled={!buttonIsValid || !isValid}
|
|
206
|
+
class:margin-inline-start={button.margin === 'left'}
|
|
207
|
+
class:margin-inline-end={button.margin === 'right'}
|
|
208
|
+
bind:this={submitRef}
|
|
209
|
+
type={button.type ?? 'submit'}>{button.label}</button
|
|
210
|
+
>
|
|
211
|
+
</div>
|
|
212
|
+
{/if}
|
|
213
|
+
{/each}
|
|
214
|
+
</div>
|
|
215
|
+
{/if}
|
|
216
|
+
</form>
|
|
217
|
+
</BaseModal>
|
|
218
|
+
|
|
219
219
|
<style>dialog {
|
|
220
220
|
overflow: clip;
|
|
221
221
|
background-color: #e9ecf1;
|
|
@@ -463,4 +463,4 @@ div.bar-container div.bar-timer.paused {
|
|
|
463
463
|
animation-play-state: paused;
|
|
464
464
|
opacity: 0%;
|
|
465
465
|
transition: opacity 300ms 0s ease-out;
|
|
466
|
-
}</style>
|
|
466
|
+
}</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<svelte:options runes />
|
|
2
|
-
|
|
1
|
+
<svelte:options runes />
|
|
2
|
+
|
|
3
3
|
<script lang="ts">import { passthrough } from "../../Helpers/Helpers.svelte.js";
|
|
4
4
|
import { ColourSet } from "../../scss/colours.js";
|
|
5
5
|
import { Side } from "../../Types/Internal/Side.js";
|
|
@@ -25,66 +25,66 @@ const size = $derived.by(() => {
|
|
|
25
25
|
return icon?.size ?? Size.DoubleXLarge;
|
|
26
26
|
});
|
|
27
27
|
let slotSpan = $state();
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<button
|
|
31
|
-
{type}
|
|
32
|
-
class:call-to-action={colourSet === ColourSet.Primary || colourSet === ColourSet.CallToAction}
|
|
33
|
-
{disabled}
|
|
34
|
-
class:left={side == Side.Left}
|
|
35
|
-
class:right={side == Side.Right}
|
|
36
|
-
class:top={side == Side.Top}
|
|
37
|
-
class:bottom={side == Side.Bottom}
|
|
38
|
-
bind:this={ref}
|
|
39
|
-
aria-label={label}
|
|
40
|
-
{onclick}
|
|
41
|
-
{onfocus}
|
|
42
|
-
{onblur}
|
|
43
|
-
oncontextmenu={(e) => {
|
|
44
|
-
if (onEditBarcode) {
|
|
45
|
-
e.preventDefault();
|
|
46
|
-
onEditBarcode();
|
|
47
|
-
}
|
|
48
|
-
}}
|
|
49
|
-
onkeydown={passthrough}
|
|
50
|
-
>
|
|
51
|
-
{#if isMounted && icon}
|
|
52
|
-
<div
|
|
53
|
-
class="expand"
|
|
54
|
-
class:left={side == Side.Left}
|
|
55
|
-
class:right={side == Side.Right}
|
|
56
|
-
class:top={side == Side.Top}
|
|
57
|
-
class:bottom={side == Side.Bottom}
|
|
58
|
-
>
|
|
59
|
-
{#if icon instanceof SVGSVGElement}
|
|
60
|
-
<!-- SECURITY: UtilityButton accepts a generic SVGSVGElement here for backwards
|
|
61
|
-
compatibility. The cast to DataMatrixSvg trusts the caller; DataMatrixIcon
|
|
62
|
-
additionally sanitises the cloned subtree before mounting. -->
|
|
63
|
-
<DataMatrixIcon
|
|
64
|
-
title={slotSpan?.textContent ?? '{unknown}'}
|
|
65
|
-
icon={{ kind: 'svg', svg: icon as DataMatrixSvg }}
|
|
66
|
-
/>
|
|
67
|
-
{:else}
|
|
68
|
-
{#if notifications}
|
|
69
|
-
<span class="notification">{notifications}</span>
|
|
70
|
-
{/if}
|
|
71
|
-
|
|
72
|
-
<Icon
|
|
73
|
-
{...icon}
|
|
74
|
-
{size}
|
|
75
|
-
/>
|
|
76
|
-
{/if}
|
|
77
|
-
</div>
|
|
78
|
-
{/if}
|
|
79
|
-
<span class="utility-label">
|
|
80
|
-
{#if notifications && icon instanceof SVGSVGElement}
|
|
81
|
-
<span class="notification-on-text">{notifications}</span>
|
|
82
|
-
{/if}<span bind:this={slotSpan}
|
|
83
|
-
>{#if children}{@render children()}{/if}</span
|
|
84
|
-
>
|
|
85
|
-
</span>
|
|
86
|
-
</button>
|
|
87
|
-
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<button
|
|
31
|
+
{type}
|
|
32
|
+
class:call-to-action={colourSet === ColourSet.Primary || colourSet === ColourSet.CallToAction}
|
|
33
|
+
{disabled}
|
|
34
|
+
class:left={side == Side.Left}
|
|
35
|
+
class:right={side == Side.Right}
|
|
36
|
+
class:top={side == Side.Top}
|
|
37
|
+
class:bottom={side == Side.Bottom}
|
|
38
|
+
bind:this={ref}
|
|
39
|
+
aria-label={label}
|
|
40
|
+
{onclick}
|
|
41
|
+
{onfocus}
|
|
42
|
+
{onblur}
|
|
43
|
+
oncontextmenu={(e) => {
|
|
44
|
+
if (onEditBarcode) {
|
|
45
|
+
e.preventDefault();
|
|
46
|
+
onEditBarcode();
|
|
47
|
+
}
|
|
48
|
+
}}
|
|
49
|
+
onkeydown={passthrough}
|
|
50
|
+
>
|
|
51
|
+
{#if isMounted && icon}
|
|
52
|
+
<div
|
|
53
|
+
class="expand"
|
|
54
|
+
class:left={side == Side.Left}
|
|
55
|
+
class:right={side == Side.Right}
|
|
56
|
+
class:top={side == Side.Top}
|
|
57
|
+
class:bottom={side == Side.Bottom}
|
|
58
|
+
>
|
|
59
|
+
{#if icon instanceof SVGSVGElement}
|
|
60
|
+
<!-- SECURITY: UtilityButton accepts a generic SVGSVGElement here for backwards
|
|
61
|
+
compatibility. The cast to DataMatrixSvg trusts the caller; DataMatrixIcon
|
|
62
|
+
additionally sanitises the cloned subtree before mounting. -->
|
|
63
|
+
<DataMatrixIcon
|
|
64
|
+
title={slotSpan?.textContent ?? '{unknown}'}
|
|
65
|
+
icon={{ kind: 'svg', svg: icon as DataMatrixSvg }}
|
|
66
|
+
/>
|
|
67
|
+
{:else}
|
|
68
|
+
{#if notifications}
|
|
69
|
+
<span class="notification">{notifications}</span>
|
|
70
|
+
{/if}
|
|
71
|
+
|
|
72
|
+
<Icon
|
|
73
|
+
{...icon}
|
|
74
|
+
{size}
|
|
75
|
+
/>
|
|
76
|
+
{/if}
|
|
77
|
+
</div>
|
|
78
|
+
{/if}
|
|
79
|
+
<span class="utility-label">
|
|
80
|
+
{#if notifications && icon instanceof SVGSVGElement}
|
|
81
|
+
<span class="notification-on-text">{notifications}</span>
|
|
82
|
+
{/if}<span bind:this={slotSpan}
|
|
83
|
+
>{#if children}{@render children()}{/if}</span
|
|
84
|
+
>
|
|
85
|
+
</span>
|
|
86
|
+
</button>
|
|
87
|
+
|
|
88
88
|
<style>button {
|
|
89
89
|
background-color: #f4f7f9;
|
|
90
90
|
box-sizing: border-box;
|
|
@@ -173,4 +173,4 @@ button:not([disabled]).call-to-action:not([disabled]):focus, button:not([disable
|
|
|
173
173
|
}
|
|
174
174
|
button:not([disabled]).call-to-action:not([disabled]):focus {
|
|
175
175
|
outline-offset: -2px;
|
|
176
|
-
}</style>
|
|
176
|
+
}</style>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<svelte:options runes />
|
|
2
|
-
|
|
3
|
-
<script
|
|
4
|
-
lang="ts"
|
|
5
|
-
generics="CommonDenominator"
|
|
1
|
+
<svelte:options runes />
|
|
2
|
+
|
|
3
|
+
<script
|
|
4
|
+
lang="ts"
|
|
5
|
+
generics="CommonDenominator"
|
|
6
6
|
>import { m as i18n } from "../paraglide/messages.js";
|
|
7
7
|
import { readJSON } from "../Helpers/Storage.js";
|
|
8
8
|
import { onMount, untrack } from "svelte";
|
|
@@ -27,38 +27,38 @@ $effect(() => {
|
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<div
|
|
33
|
-
class="wrapper"
|
|
34
|
-
class:noscroll
|
|
35
|
-
class:dense
|
|
36
|
-
{style}
|
|
37
|
-
>
|
|
38
|
-
<div class="tabs">
|
|
39
|
-
{#each tabs as option (option.label)}
|
|
40
|
-
<VerticalTabGroupButton
|
|
41
|
-
{option}
|
|
42
|
-
selected={selected?.label === option.label}
|
|
43
|
-
/>
|
|
44
|
-
{/each}
|
|
45
|
-
</div>
|
|
46
|
-
|
|
47
|
-
<div
|
|
48
|
-
class="content"
|
|
49
|
-
class:noscroll
|
|
50
|
-
class:dense
|
|
51
|
-
>
|
|
52
|
-
{#if selected}
|
|
53
|
-
{@render selected.content(selected.args)}
|
|
54
|
-
{:else}
|
|
55
|
-
<div class="wrapper bg">
|
|
56
|
-
<span class="red">{noTabMessage ?? i18n['scoria.text.no_tab_selected']()}</span>
|
|
57
|
-
</div>
|
|
58
|
-
{/if}
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<div
|
|
33
|
+
class="wrapper"
|
|
34
|
+
class:noscroll
|
|
35
|
+
class:dense
|
|
36
|
+
{style}
|
|
37
|
+
>
|
|
38
|
+
<div class="tabs">
|
|
39
|
+
{#each tabs as option (option.label)}
|
|
40
|
+
<VerticalTabGroupButton
|
|
41
|
+
{option}
|
|
42
|
+
selected={selected?.label === option.label}
|
|
43
|
+
/>
|
|
44
|
+
{/each}
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div
|
|
48
|
+
class="content"
|
|
49
|
+
class:noscroll
|
|
50
|
+
class:dense
|
|
51
|
+
>
|
|
52
|
+
{#if selected}
|
|
53
|
+
{@render selected.content(selected.args)}
|
|
54
|
+
{:else}
|
|
55
|
+
<div class="wrapper bg">
|
|
56
|
+
<span class="red">{noTabMessage ?? i18n['scoria.text.no_tab_selected']()}</span>
|
|
57
|
+
</div>
|
|
58
|
+
{/if}
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
62
|
<style>.bg {
|
|
63
63
|
padding: 1.5rem;
|
|
64
64
|
background-color: #f9e9e9;
|
|
@@ -107,4 +107,4 @@ $effect(() => {
|
|
|
107
107
|
.wrapper .content.dense {
|
|
108
108
|
flex-grow: 0;
|
|
109
109
|
overflow: visible;
|
|
110
|
-
}</style>
|
|
110
|
+
}</style>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<svelte:options runes />
|
|
2
|
-
|
|
3
|
-
<script
|
|
4
|
-
lang="ts"
|
|
5
|
-
generics="Args"
|
|
1
|
+
<svelte:options runes />
|
|
2
|
+
|
|
3
|
+
<script
|
|
4
|
+
lang="ts"
|
|
5
|
+
generics="Args"
|
|
6
6
|
>import { useAsyncFlag } from "../Helpers/AsyncFlag.svelte.js";
|
|
7
7
|
import { Colour } from "../scss/colours.js";
|
|
8
8
|
import { Size } from "../Types/Internal/Size.js";
|
|
@@ -11,46 +11,46 @@ const { option, selected } = $props();
|
|
|
11
11
|
const isValid = useAsyncFlag(() => option.isValid, true);
|
|
12
12
|
const disabled = useAsyncFlag(() => option.disabled, false);
|
|
13
13
|
const visible = useAsyncFlag(() => option.visible, true);
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<button
|
|
17
|
-
class:selected
|
|
18
|
-
disabled={disabled.value}
|
|
19
|
-
onclick={() => {
|
|
20
|
-
option.onclick();
|
|
21
|
-
}}
|
|
22
|
-
type="button"
|
|
23
|
-
class="tab"
|
|
24
|
-
class:invalid={!isValid.value}
|
|
25
|
-
class:hidden={!visible.value}
|
|
26
|
-
>
|
|
27
|
-
<div
|
|
28
|
-
class="bordered"
|
|
29
|
-
class:invalid={!isValid.value}
|
|
30
|
-
>
|
|
31
|
-
{#if option.iconLeft}
|
|
32
|
-
<Icon
|
|
33
|
-
{...option.iconLeft}
|
|
34
|
-
colour={Colour['$brand-primary']}
|
|
35
|
-
/>
|
|
36
|
-
{/if}
|
|
37
|
-
{option.label}
|
|
38
|
-
{#if !isValid.value}
|
|
39
|
-
<Icon
|
|
40
|
-
name="error"
|
|
41
|
-
colour={Colour['$error-border']}
|
|
42
|
-
size={Size.Small}
|
|
43
|
-
/>
|
|
44
|
-
{:else if option.iconRight}
|
|
45
|
-
<Icon
|
|
46
|
-
colour={Colour['$brand-primary']}
|
|
47
|
-
size={Size.Small}
|
|
48
|
-
{...option.iconRight}
|
|
49
|
-
/>
|
|
50
|
-
{/if}
|
|
51
|
-
</div>
|
|
52
|
-
</button>
|
|
53
|
-
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<button
|
|
17
|
+
class:selected
|
|
18
|
+
disabled={disabled.value}
|
|
19
|
+
onclick={() => {
|
|
20
|
+
option.onclick();
|
|
21
|
+
}}
|
|
22
|
+
type="button"
|
|
23
|
+
class="tab"
|
|
24
|
+
class:invalid={!isValid.value}
|
|
25
|
+
class:hidden={!visible.value}
|
|
26
|
+
>
|
|
27
|
+
<div
|
|
28
|
+
class="bordered"
|
|
29
|
+
class:invalid={!isValid.value}
|
|
30
|
+
>
|
|
31
|
+
{#if option.iconLeft}
|
|
32
|
+
<Icon
|
|
33
|
+
{...option.iconLeft}
|
|
34
|
+
colour={Colour['$brand-primary']}
|
|
35
|
+
/>
|
|
36
|
+
{/if}
|
|
37
|
+
{option.label}
|
|
38
|
+
{#if !isValid.value}
|
|
39
|
+
<Icon
|
|
40
|
+
name="error"
|
|
41
|
+
colour={Colour['$error-border']}
|
|
42
|
+
size={Size.Small}
|
|
43
|
+
/>
|
|
44
|
+
{:else if option.iconRight}
|
|
45
|
+
<Icon
|
|
46
|
+
colour={Colour['$brand-primary']}
|
|
47
|
+
size={Size.Small}
|
|
48
|
+
{...option.iconRight}
|
|
49
|
+
/>
|
|
50
|
+
{/if}
|
|
51
|
+
</div>
|
|
52
|
+
</button>
|
|
53
|
+
|
|
54
54
|
<style>button.tab.hidden {
|
|
55
55
|
display: none !important;
|
|
56
56
|
}
|
|
@@ -97,4 +97,4 @@ const visible = useAsyncFlag(() => option.visible, true);
|
|
|
97
97
|
}
|
|
98
98
|
.tab.selected.invalid {
|
|
99
99
|
border-bottom-color: #aa1414;
|
|
100
|
-
}</style>
|
|
100
|
+
}</style>
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import type { DataMatrixSvg } from '../Components/DataMatrixIconProps.js';
|
|
2
|
-
|
|
3
|
-
export interface IDatamatrixOptions {
|
|
4
|
-
msg: string;
|
|
5
|
-
dim?: number;
|
|
6
|
-
rct?: number;
|
|
7
|
-
pad?: number;
|
|
8
|
-
pal?: [string, string];
|
|
9
|
-
vrb?: number;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Build a DATAMatrix barcode SVG. The returned element is branded as
|
|
14
|
-
* {@link DataMatrixSvg} so it can be passed directly to
|
|
15
|
-
* `DataMatrixIcon` without further casting. The underlying JS
|
|
16
|
-
* implementation produces a vanilla `SVGSVGElement`; the brand is a
|
|
17
|
-
* compile-time discipline only.
|
|
18
|
-
*/
|
|
19
|
-
export declare function DATAMatrix(value: IDatamatrixOptions | string): DataMatrixSvg;
|
|
1
|
+
import type { DataMatrixSvg } from '../Components/DataMatrixIconProps.js';
|
|
2
|
+
|
|
3
|
+
export interface IDatamatrixOptions {
|
|
4
|
+
msg: string;
|
|
5
|
+
dim?: number;
|
|
6
|
+
rct?: number;
|
|
7
|
+
pad?: number;
|
|
8
|
+
pal?: [string, string];
|
|
9
|
+
vrb?: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Build a DATAMatrix barcode SVG. The returned element is branded as
|
|
14
|
+
* {@link DataMatrixSvg} so it can be passed directly to
|
|
15
|
+
* `DataMatrixIcon` without further casting. The underlying JS
|
|
16
|
+
* implementation produces a vanilla `SVGSVGElement`; the brand is a
|
|
17
|
+
* compile-time discipline only.
|
|
18
|
+
*/
|
|
19
|
+
export declare function DATAMatrix(value: IDatamatrixOptions | string): DataMatrixSvg;
|