@lavalogic/scoria 0.34.0 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/README.md +58 -58
  2. package/dist/Components/AccordionGroup.svelte +42 -42
  3. package/dist/Components/AccordionGroupButton.svelte +99 -99
  4. package/dist/Components/Action.svelte +138 -138
  5. package/dist/Components/AlertModal.svelte +125 -125
  6. package/dist/Components/Base/ContextWrapper.svelte +50 -50
  7. package/dist/Components/Base/Pagination.svelte +190 -190
  8. package/dist/Components/Base/Snippets.svelte +29 -29
  9. package/dist/Components/BigRadioSet.svelte +29 -29
  10. package/dist/Components/Bubble.svelte +77 -77
  11. package/dist/Components/Button.svelte +197 -197
  12. package/dist/Components/Checkbox.svelte +68 -68
  13. package/dist/Components/CollapsibleCard.svelte +70 -70
  14. package/dist/Components/Contexts/ContextMenu.svelte +157 -157
  15. package/dist/Components/Contexts/ContextMenuDivider.svelte +11 -11
  16. package/dist/Components/Contexts/ContextMenuOption.svelte +52 -52
  17. package/dist/Components/Contexts/Toast.svelte +61 -61
  18. package/dist/Components/Contexts/ToastContainer.svelte +46 -46
  19. package/dist/Components/Contexts/Tooltip.svelte +26 -26
  20. package/dist/Components/DataMatrixIcon.svelte +41 -41
  21. package/dist/Components/DateInput.svelte +109 -109
  22. package/dist/Components/DatePicker.svelte +312 -312
  23. package/dist/Components/DesktopModal.svelte +106 -106
  24. package/dist/Components/Dial.svelte +151 -151
  25. package/dist/Components/DimensionInput.svelte +184 -184
  26. package/dist/Components/DragMenu/DragMenuHolder.svelte +106 -106
  27. package/dist/Components/DragMenu/DraggableCard.svelte +41 -41
  28. package/dist/Components/FileCard.svelte +20 -20
  29. package/dist/Components/FileUpload.svelte +196 -196
  30. package/dist/Components/GridInput.svelte +190 -190
  31. package/dist/Components/GridInputSet.svelte +22 -22
  32. package/dist/Components/HorizontalTabGroup.svelte +78 -78
  33. package/dist/Components/HorizontalTabGroupButton.svelte +96 -96
  34. package/dist/Components/Icon.svelte +97 -97
  35. package/dist/Components/Icons.js +357 -357
  36. package/dist/Components/LoadingAnimation.svelte +32 -32
  37. package/dist/Components/LoadingModal.svelte +47 -47
  38. package/dist/Components/LoadingOverlay.svelte +27 -27
  39. package/dist/Components/Modal.svelte +251 -251
  40. package/dist/Components/MultiSelect.svelte +197 -197
  41. package/dist/Components/Nav/Nav.svelte +97 -97
  42. package/dist/Components/Nav/NavServiceMenuList.svelte +34 -34
  43. package/dist/Components/Nav/NavTab.svelte +91 -91
  44. package/dist/Components/Nav/ServiceMenuItem.svelte +91 -91
  45. package/dist/Components/Nav/ServicesNav.svelte +53 -53
  46. package/dist/Components/NumberInput.svelte +144 -144
  47. package/dist/Components/PageHeading.svelte +36 -36
  48. package/dist/Components/PasswordInput.svelte +73 -73
  49. package/dist/Components/Portal.svelte +25 -25
  50. package/dist/Components/ProgressBubble.svelte +80 -80
  51. package/dist/Components/QuerySelect.svelte +411 -411
  52. package/dist/Components/SingleSelect.svelte +261 -261
  53. package/dist/Components/StepButton.svelte +120 -120
  54. package/dist/Components/StepForm.svelte +108 -108
  55. package/dist/Components/Switch.svelte +36 -36
  56. package/dist/Components/Table/Body/QuickSearchCell.svelte +632 -632
  57. package/dist/Components/Table/Body/Rows/ColumnHighlight.svelte +30 -30
  58. package/dist/Components/Table/Body/Rows/ColumnList.svelte +56 -56
  59. package/dist/Components/Table/Body/Rows/ColumnListRow.svelte +179 -179
  60. package/dist/Components/Table/Body/Rows/Columns/AccessorComponent.svelte +49 -49
  61. package/dist/Components/Table/Body/Rows/Columns/ActionsCell.svelte +180 -180
  62. package/dist/Components/Table/Body/Rows/Columns/BubbleCell.svelte +102 -102
  63. package/dist/Components/Table/Body/Rows/Columns/ExpandCell.svelte +119 -119
  64. package/dist/Components/Table/Body/Rows/Columns/FocusableImmutableCell.svelte +114 -114
  65. package/dist/Components/Table/Body/Rows/Columns/ProgressCell.svelte +96 -96
  66. package/dist/Components/Table/Body/Rows/Columns/TableAction.svelte +72 -72
  67. package/dist/Components/Table/Body/Rows/Columns/TableCheckbox.svelte +131 -131
  68. package/dist/Components/Table/Body/Rows/Columns/TableColumn.svelte +144 -144
  69. package/dist/Components/Table/Body/Rows/Columns/TableDatePicker.svelte +238 -238
  70. package/dist/Components/Table/Body/Rows/Columns/TableNumberInput.svelte +358 -358
  71. package/dist/Components/Table/Body/Rows/Columns/TableQuerySelect.svelte +338 -338
  72. package/dist/Components/Table/Body/Rows/Columns/TableRowSelectionCheckbox.svelte +183 -183
  73. package/dist/Components/Table/Body/Rows/Columns/TableSelect.svelte +309 -309
  74. package/dist/Components/Table/Body/Rows/Columns/TableTextInput.svelte +369 -369
  75. package/dist/Components/Table/Body/Rows/Columns/ValidityCell.svelte +170 -170
  76. package/dist/Components/Table/Body/Rows/TableRow.svelte +259 -259
  77. package/dist/Components/Table/Body/TableBody.svelte +67 -67
  78. package/dist/Components/Table/Headers/HighlightAllHeader.svelte +39 -39
  79. package/dist/Components/Table/Headers/SelectAllHeader.svelte +28 -28
  80. package/dist/Components/Table/Headers/TableHead.svelte +260 -260
  81. package/dist/Components/Table/Misc/ColumnPanel.svelte +78 -78
  82. package/dist/Components/Table/Misc/ColumnPanelModal.svelte +99 -99
  83. package/dist/Components/Table/Misc/FilterInput.svelte +556 -556
  84. package/dist/Components/Table/Misc/FilterPanel.svelte +46 -46
  85. package/dist/Components/Table/Misc/FilterPanelModal.svelte +67 -67
  86. package/dist/Components/Table/Misc/SidePanel.svelte +32 -32
  87. package/dist/Components/Table/Misc/TableFooter.svelte +304 -304
  88. package/dist/Components/Table/Misc/TableHorizontalBar.svelte +156 -156
  89. package/dist/Components/Table/Misc/TableSidebar.svelte +176 -176
  90. package/dist/Components/Table/Misc/ToolboxPanel.svelte +77 -77
  91. package/dist/Components/Table/Misc/ToolboxPanelModal.svelte +91 -91
  92. package/dist/Components/Table/NestedTable.svelte +84 -84
  93. package/dist/Components/Table/Table.svelte +492 -492
  94. package/dist/Components/Test/TestContextConsumer.svelte +13 -13
  95. package/dist/Components/TextArea.svelte +108 -108
  96. package/dist/Components/TextInput.svelte +147 -147
  97. package/dist/Components/ThreeStateRadio.svelte +124 -124
  98. package/dist/Components/Touch/BoolCard.svelte +52 -52
  99. package/dist/Components/Touch/DateModal.svelte +217 -217
  100. package/dist/Components/Touch/EditCard.svelte +52 -52
  101. package/dist/Components/Touch/InfoCard.svelte +24 -24
  102. package/dist/Components/Touch/InfoTextCard.svelte +21 -21
  103. package/dist/Components/Touch/ModalExplanation.svelte +20 -20
  104. package/dist/Components/Touch/NumberKeyboard.svelte +268 -268
  105. package/dist/Components/Touch/NumberModal.svelte +69 -69
  106. package/dist/Components/Touch/PlusMinusCard.svelte +50 -50
  107. package/dist/Components/Touch/SelectModal.svelte +105 -105
  108. package/dist/Components/Touch/SummaryCard.svelte +65 -65
  109. package/dist/Components/Touch/TextAreaModal.svelte +86 -86
  110. package/dist/Components/Touch/TextModal.svelte +123 -123
  111. package/dist/Components/Touch/TouchCard.svelte +28 -28
  112. package/dist/Components/Touch/TouchModal.svelte +259 -259
  113. package/dist/Components/Touch/UtilityButton.svelte +91 -91
  114. package/dist/Components/VerticalTabGroup.svelte +66 -66
  115. package/dist/Components/VerticalTabGroupButton.svelte +97 -97
  116. package/dist/Helpers/Datamatrix.d.ts +10 -10
  117. package/dist/Helpers/Datamatrix.js +1 -1
  118. package/dist/Helpers/Helpers.svelte.js +6 -4
  119. package/dist/Types/Examples/ExampleModal.svelte +34 -34
  120. package/dist/scss/_basics.scss +12 -12
  121. package/dist/scss/_colours.scss +134 -134
  122. package/dist/scss/_mixins.scss +3016 -3016
  123. package/dist/scss/_sizing.scss +69 -69
  124. package/dist/scss/_transitions.scss +8 -8
  125. package/package.json +2 -2
@@ -1,88 +1,88 @@
1
- <svelte:options runes />
2
-
3
- <script lang="ts">
4
- import { devCatch, passthrough } from '../../Helpers/Helpers.svelte.js';
5
- import { Colour } from '../../scss/colours.js';
6
- import { InputVariant } from '../../Types/Internal/InputVariant.js';
7
- import { Size } from '../../Types/Internal/Size.js';
8
- import { onMount, tick } from 'svelte';
9
- import TextArea from '../TextArea.svelte';
10
- import type { TextAreaModalProps } from './TextAreaModalProps.js';
11
- import TouchModal from './TouchModal.svelte';
12
-
13
- let {
14
- header,
15
- value = $bindable(''),
16
- label,
17
- placeholder,
18
- cancelEditing,
19
- confirm,
20
- uppercase = false,
21
- textAreaRef = $bindable(),
22
- explanation
23
- }: TextAreaModalProps = $props();
24
-
25
- let tempValue = $state('');
26
-
27
- onMount(() => {
28
- tempValue = value;
29
- tick()
30
- .then(() => {
31
- textAreaRef?.select();
32
- })
33
- .catch(devCatch);
34
- });
35
-
36
- async function resetValue() {
37
- tempValue = '';
38
- await tick();
39
- textAreaRef?.select();
40
- }
41
- </script>
42
-
43
- <TouchModal
44
- onclose={() => {
45
- cancelEditing();
46
- }}
47
- {header}
48
- mandatory
49
- minHeight="400px"
50
- minWidth="600px"
51
- onsubmit={(e: SubmitEvent) => {
52
- e.preventDefault();
53
- confirm(tempValue);
54
- }}
55
- {explanation}
56
- >
57
- <TextArea
58
- {uppercase}
59
- labelTop={label}
60
- {placeholder}
61
- bind:value={tempValue}
62
- variant={InputVariant.Modal}
63
- bind:textAreaRef
64
- rightIcon={{
65
- name: 'cross',
66
- size: Size.Large,
67
- colour: Colour['$font-primary']
68
- }}
69
- onRightIconClick={resetValue}
70
- />
71
-
72
- {#snippet footer()}
73
- <div class="modal-footer">
74
- <button onkeydown={passthrough} type="submit">Confirm</button>
75
- <button
76
- onkeydown={passthrough}
77
- type="button"
78
- onclick={() => {
79
- cancelEditing();
80
- }}>Cancel</button
81
- >
82
- </div>
83
- {/snippet}
84
- </TouchModal>
85
-
1
+ <svelte:options runes />
2
+
3
+ <script lang="ts">
4
+ import { devCatch, passthrough } from '../../Helpers/Helpers.svelte.js';
5
+ import { Colour } from '../../scss/colours.js';
6
+ import { InputVariant } from '../../Types/Internal/InputVariant.js';
7
+ import { Size } from '../../Types/Internal/Size.js';
8
+ import { onMount, tick } from 'svelte';
9
+ import TextArea from '../TextArea.svelte';
10
+ import type { TextAreaModalProps } from './TextAreaModalProps.js';
11
+ import TouchModal from './TouchModal.svelte';
12
+
13
+ let {
14
+ header,
15
+ value = $bindable(''),
16
+ label,
17
+ placeholder,
18
+ cancelEditing,
19
+ confirm,
20
+ uppercase = false,
21
+ textAreaRef = $bindable(),
22
+ explanation
23
+ }: TextAreaModalProps = $props();
24
+
25
+ let tempValue = $state('');
26
+
27
+ onMount(() => {
28
+ tempValue = value;
29
+ tick()
30
+ .then(() => {
31
+ textAreaRef?.select();
32
+ })
33
+ .catch(devCatch);
34
+ });
35
+
36
+ async function resetValue() {
37
+ tempValue = '';
38
+ await tick();
39
+ textAreaRef?.select();
40
+ }
41
+ </script>
42
+
43
+ <TouchModal
44
+ onclose={() => {
45
+ cancelEditing();
46
+ }}
47
+ {header}
48
+ mandatory
49
+ minHeight="400px"
50
+ minWidth="600px"
51
+ onsubmit={(e: SubmitEvent) => {
52
+ e.preventDefault();
53
+ confirm(tempValue);
54
+ }}
55
+ {explanation}
56
+ >
57
+ <TextArea
58
+ {uppercase}
59
+ labelTop={label}
60
+ {placeholder}
61
+ bind:value={tempValue}
62
+ variant={InputVariant.Modal}
63
+ bind:textAreaRef
64
+ rightIcon={{
65
+ name: 'cross',
66
+ size: Size.Large,
67
+ colour: Colour['$font-primary']
68
+ }}
69
+ onRightIconClick={resetValue}
70
+ />
71
+
72
+ {#snippet footer()}
73
+ <div class="modal-footer">
74
+ <button onkeydown={passthrough} type="submit">Confirm</button>
75
+ <button
76
+ onkeydown={passthrough}
77
+ type="button"
78
+ onclick={() => {
79
+ cancelEditing();
80
+ }}>Cancel</button
81
+ >
82
+ </div>
83
+ {/snippet}
84
+ </TouchModal>
85
+
86
86
  <style>dialog {
87
87
  overflow: clip;
88
88
  background-color: #e9ecf1;
@@ -324,4 +324,4 @@ button {
324
324
  display: block;
325
325
  border-width: 2px;
326
326
  border-radius: 4px;
327
- }</style>
327
+ }</style>
@@ -1,125 +1,125 @@
1
- <svelte:options runes />
2
-
3
- <script lang="ts">
4
- import { devCatch, passthrough } from '../../Helpers/Helpers.svelte.js';
5
- import { Colour } from '../../scss/colours.js';
6
- import { InputVariant } from '../../Types/Internal/InputVariant.js';
7
- import { Size } from '../../Types/Internal/Size.js';
8
- import { onMount, tick } from 'svelte';
9
- import TextInput from '../TextInput.svelte';
10
- import type { TextModalProps } from './TextModalProps.js';
11
- import TouchModal from './TouchModal.svelte';
12
-
13
- let {
14
- header,
15
- value = $bindable(''),
16
- label,
17
- placeholder,
18
- cancelEditing,
19
- confirm,
20
- uppercase = false,
21
- inputRef = $bindable(),
22
- isValid: _isValid = true,
23
- mandatory = true,
24
- explanation,
25
- width,
26
- minWidth,
27
- staticWidth,
28
- minHeight,
29
- height
30
- }: TextModalProps = $props();
31
-
32
- // let tempValue = '';
33
-
34
- onMount(() => {
35
- tick()
36
- .then(() => {
37
- inputRef?.select();
38
- })
39
- .catch(devCatch);
40
- });
41
-
42
- async function resetValue() {
43
- //TODO discuss wether we want to empty the value or reset to snapshot
44
- // tempValue = '';
45
- value = '';
46
- await tick();
47
- inputRef?.select();
48
- }
49
-
50
- let isValid = $state(true);
51
-
52
- $effect(() => {
53
- if (!_isValid) {
54
- isValid = false;
55
- } else {
56
- if (typeof _isValid == 'function') {
57
- const result = _isValid(value);
58
-
59
- if (typeof result == 'boolean') {
60
- isValid = result;
61
- } else {
62
- result
63
- .then((it) => {
64
- isValid = it;
65
- })
66
- .catch(devCatch);
67
- }
68
- } else {
69
- isValid = _isValid;
70
- }
71
- }
72
- });
73
- </script>
74
-
75
- <TouchModal
76
- onclose={() => {
77
- cancelEditing();
78
- }}
79
- {header}
80
- {mandatory}
81
- {width}
82
- {minWidth}
83
- {staticWidth}
84
- {minHeight}
85
- {height}
86
- onsubmit={(e: SubmitEvent) => {
87
- e.preventDefault();
88
- confirm(value);
89
- }}
90
- {explanation}
91
- >
92
- <!-- bind:value={tempValue} -->
93
- <TextInput
94
- {uppercase}
95
- labelTop={label}
96
- {placeholder}
97
- variant={InputVariant.Modal}
98
- bind:inputRef
99
- bind:value
100
- showErrorColours
101
- invalid={!isValid}
102
- rightIcon={{
103
- name: 'cross',
104
- size: Size.Large,
105
- colour: Colour['$font-primary']
106
- }}
107
- onRightIconClick={resetValue}
108
- />
109
- {#snippet footer()}
110
- <div class="modal-footer">
111
- <button onkeydown={passthrough} type="submit" disabled={!isValid}>Confirm</button>
112
- <button
113
- onkeydown={passthrough}
114
- type="button"
115
- onclick={() => {
116
- cancelEditing();
117
- }}>Cancel</button
118
- >
119
- </div>
120
- {/snippet}
121
- </TouchModal>
122
-
1
+ <svelte:options runes />
2
+
3
+ <script lang="ts">
4
+ import { devCatch, passthrough } from '../../Helpers/Helpers.svelte.js';
5
+ import { Colour } from '../../scss/colours.js';
6
+ import { InputVariant } from '../../Types/Internal/InputVariant.js';
7
+ import { Size } from '../../Types/Internal/Size.js';
8
+ import { onMount, tick } from 'svelte';
9
+ import TextInput from '../TextInput.svelte';
10
+ import type { TextModalProps } from './TextModalProps.js';
11
+ import TouchModal from './TouchModal.svelte';
12
+
13
+ let {
14
+ header,
15
+ value = $bindable(''),
16
+ label,
17
+ placeholder,
18
+ cancelEditing,
19
+ confirm,
20
+ uppercase = false,
21
+ inputRef = $bindable(),
22
+ isValid: _isValid = true,
23
+ mandatory = true,
24
+ explanation,
25
+ width,
26
+ minWidth,
27
+ staticWidth,
28
+ minHeight,
29
+ height
30
+ }: TextModalProps = $props();
31
+
32
+ // let tempValue = '';
33
+
34
+ onMount(() => {
35
+ tick()
36
+ .then(() => {
37
+ inputRef?.select();
38
+ })
39
+ .catch(devCatch);
40
+ });
41
+
42
+ async function resetValue() {
43
+ //TODO discuss wether we want to empty the value or reset to snapshot
44
+ // tempValue = '';
45
+ value = '';
46
+ await tick();
47
+ inputRef?.select();
48
+ }
49
+
50
+ let isValid = $state(true);
51
+
52
+ $effect(() => {
53
+ if (!_isValid) {
54
+ isValid = false;
55
+ } else {
56
+ if (typeof _isValid == 'function') {
57
+ const result = _isValid(value);
58
+
59
+ if (typeof result == 'boolean') {
60
+ isValid = result;
61
+ } else {
62
+ result
63
+ .then((it) => {
64
+ isValid = it;
65
+ })
66
+ .catch(devCatch);
67
+ }
68
+ } else {
69
+ isValid = _isValid;
70
+ }
71
+ }
72
+ });
73
+ </script>
74
+
75
+ <TouchModal
76
+ onclose={() => {
77
+ cancelEditing();
78
+ }}
79
+ {header}
80
+ {mandatory}
81
+ {width}
82
+ {minWidth}
83
+ {staticWidth}
84
+ {minHeight}
85
+ {height}
86
+ onsubmit={(e: SubmitEvent) => {
87
+ e.preventDefault();
88
+ confirm(value);
89
+ }}
90
+ {explanation}
91
+ >
92
+ <!-- bind:value={tempValue} -->
93
+ <TextInput
94
+ {uppercase}
95
+ labelTop={label}
96
+ {placeholder}
97
+ variant={InputVariant.Modal}
98
+ bind:inputRef
99
+ bind:value
100
+ showErrorColours
101
+ invalid={!isValid}
102
+ rightIcon={{
103
+ name: 'cross',
104
+ size: Size.Large,
105
+ colour: Colour['$font-primary']
106
+ }}
107
+ onRightIconClick={resetValue}
108
+ />
109
+ {#snippet footer()}
110
+ <div class="modal-footer">
111
+ <button onkeydown={passthrough} type="submit" disabled={!isValid}>Confirm</button>
112
+ <button
113
+ onkeydown={passthrough}
114
+ type="button"
115
+ onclick={() => {
116
+ cancelEditing();
117
+ }}>Cancel</button
118
+ >
119
+ </div>
120
+ {/snippet}
121
+ </TouchModal>
122
+
123
123
  <style>dialog {
124
124
  overflow: clip;
125
125
  background-color: #e9ecf1;
@@ -361,4 +361,4 @@ button {
361
361
  display: block;
362
362
  border-width: 2px;
363
363
  border-radius: 4px;
364
- }</style>
364
+ }</style>
@@ -1,30 +1,30 @@
1
- <script lang="ts">
2
- import { Colour } from '../../scss/colours.js';
3
- import Action from '../Action.svelte';
4
- import type { TouchCardProps } from './TouchCardProps.js';
5
- let { children, additionalButtons, highlighted = $bindable(false) }: TouchCardProps = $props();
6
- </script>
7
-
8
- <div class="card" class:highlighted>
9
- <div class="float-right">
10
- {#if additionalButtons}
11
- {@render additionalButtons()}
12
- {/if}
13
- <Action
14
- icon={{
15
- name: 'star-banner',
16
- colour: highlighted ? Colour['$brand-primary'] : Colour['$ui-blue-4']
17
- }}
18
- backgroundColour={Colour['$transparent-0']}
19
- label="Highlight Card"
20
- onclick={() => {
21
- highlighted = !highlighted;
22
- }}
23
- />
24
- </div>
25
- {@render children()}
26
- </div>
27
-
1
+ <script lang="ts">
2
+ import { Colour } from '../../scss/colours.js';
3
+ import Action from '../Action.svelte';
4
+ import type { TouchCardProps } from './TouchCardProps.js';
5
+ let { children, additionalButtons, highlighted = $bindable(false) }: TouchCardProps = $props();
6
+ </script>
7
+
8
+ <div class="card" class:highlighted>
9
+ <div class="float-right">
10
+ {#if additionalButtons}
11
+ {@render additionalButtons()}
12
+ {/if}
13
+ <Action
14
+ icon={{
15
+ name: 'star-banner',
16
+ colour: highlighted ? Colour['$brand-primary'] : Colour['$ui-blue-4']
17
+ }}
18
+ backgroundColour={Colour['$transparent-0']}
19
+ label="Highlight Card"
20
+ onclick={() => {
21
+ highlighted = !highlighted;
22
+ }}
23
+ />
24
+ </div>
25
+ {@render children()}
26
+ </div>
27
+
28
28
  <style>button.card {
29
29
  color: #3a4952;
30
30
  fill: #3a4952;
@@ -157,4 +157,4 @@ button.card * {
157
157
  padding: 0.375rem 0.5rem;
158
158
  margin-left: 0;
159
159
  width: fit-content;
160
- }</style>
160
+ }</style>