@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
package/README.md CHANGED
@@ -1,58 +1,58 @@
1
- # Svelte library
2
-
3
- Everything you need to build a Svelte library, powered by [`sv`](https://npmjs.com/package/sv).
4
-
5
- Read more about creating a library [in the docs](https://svelte.dev/docs/kit/packaging).
6
-
7
- ## Creating a project
8
-
9
- If you're seeing this, you've probably already done this step. Congrats!
10
-
11
- ```sh
12
- # create a new project in the current directory
13
- npx sv create
14
-
15
- # create a new project in my-app
16
- npx sv create my-app
17
- ```
18
-
19
- ## Developing
20
-
21
- Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
22
-
23
- ```sh
24
- npm run dev
25
-
26
- # or start the server and open the app in a new browser tab
27
- npm run dev -- --open
28
- ```
29
-
30
- Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview app.
31
-
32
- ## Building
33
-
34
- To build your library:
35
-
36
- ```sh
37
- npm pack
38
- ```
39
-
40
- To create a production version of your showcase app:
41
-
42
- ```sh
43
- npm run build
44
- ```
45
-
46
- You can preview the production build with `npm run preview`.
47
-
48
- > To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
49
-
50
- ## Publishing
51
-
52
- Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)).
53
-
54
- To publish your library to [npm](https://www.npmjs.com):
55
-
56
- ```sh
57
- npm publish
58
- ```
1
+ # Svelte library
2
+
3
+ Everything you need to build a Svelte library, powered by [`sv`](https://npmjs.com/package/sv).
4
+
5
+ Read more about creating a library [in the docs](https://svelte.dev/docs/kit/packaging).
6
+
7
+ ## Creating a project
8
+
9
+ If you're seeing this, you've probably already done this step. Congrats!
10
+
11
+ ```sh
12
+ # create a new project in the current directory
13
+ npx sv create
14
+
15
+ # create a new project in my-app
16
+ npx sv create my-app
17
+ ```
18
+
19
+ ## Developing
20
+
21
+ Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
22
+
23
+ ```sh
24
+ npm run dev
25
+
26
+ # or start the server and open the app in a new browser tab
27
+ npm run dev -- --open
28
+ ```
29
+
30
+ Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview app.
31
+
32
+ ## Building
33
+
34
+ To build your library:
35
+
36
+ ```sh
37
+ npm pack
38
+ ```
39
+
40
+ To create a production version of your showcase app:
41
+
42
+ ```sh
43
+ npm run build
44
+ ```
45
+
46
+ You can preview the production build with `npm run preview`.
47
+
48
+ > To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
49
+
50
+ ## Publishing
51
+
52
+ Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)).
53
+
54
+ To publish your library to [npm](https://www.npmjs.com):
55
+
56
+ ```sh
57
+ npm publish
58
+ ```
@@ -1,44 +1,44 @@
1
- <svelte:options runes />
2
-
3
- <script
4
- lang="ts"
5
- generics="CommonDenominator"
6
- >
7
- import AccordionGroupButton from './AccordionGroupButton.svelte';
8
-
9
- import { cubicOut } from 'svelte/easing';
10
- import { slide } from 'svelte/transition';
11
- import type { AccordionGroupProps } from './AccordionGroupProps.js';
12
-
13
- let {
14
- // name: _name, //FIXME why is this not implemented?
15
- tabs,
16
- selected,
17
- noRadius = false,
18
- grow = false,
19
- }: AccordionGroupProps<CommonDenominator> = $props();
20
- </script>
21
-
22
- <div
23
- class="wrapper"
24
- class:no-radius={noRadius}
25
- class:grow
26
- >
27
- {#each tabs as option (option)}
28
- {@const isSelected = selected === option}
29
- <AccordionGroupButton
30
- {option}
31
- {noRadius}
32
- selected={isSelected}
33
- />
34
- {#if isSelected}
35
- <div transition:slide={{ duration: 200, easing: cubicOut }}>
36
- {@render selected.content(selected.args)}
37
- </div>
38
- {/if}
39
- {/each}
40
- </div>
41
-
1
+ <svelte:options runes />
2
+
3
+ <script
4
+ lang="ts"
5
+ generics="CommonDenominator"
6
+ >
7
+ import AccordionGroupButton from './AccordionGroupButton.svelte';
8
+
9
+ import { cubicOut } from 'svelte/easing';
10
+ import { slide } from 'svelte/transition';
11
+ import type { AccordionGroupProps } from './AccordionGroupProps.js';
12
+
13
+ let {
14
+ // name: _name, //FIXME why is this not implemented?
15
+ tabs,
16
+ selected,
17
+ noRadius = false,
18
+ grow = false,
19
+ }: AccordionGroupProps<CommonDenominator> = $props();
20
+ </script>
21
+
22
+ <div
23
+ class="wrapper"
24
+ class:no-radius={noRadius}
25
+ class:grow
26
+ >
27
+ {#each tabs as option (option)}
28
+ {@const isSelected = selected === option}
29
+ <AccordionGroupButton
30
+ {option}
31
+ {noRadius}
32
+ selected={isSelected}
33
+ />
34
+ {#if isSelected}
35
+ <div transition:slide={{ duration: 200, easing: cubicOut }}>
36
+ {@render selected.content(selected.args)}
37
+ </div>
38
+ {/if}
39
+ {/each}
40
+ </div>
41
+
42
42
  <style>.wrapper {
43
43
  box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.1333333333);
44
44
  border-radius: 4px;
@@ -82,4 +82,4 @@
82
82
  flex-grow: 1;
83
83
  overflow: visible;
84
84
  border-radius: 0 4px 0 4px;
85
- }</style>
85
+ }</style>
@@ -1,101 +1,101 @@
1
- <svelte:options runes />
2
-
3
- <script
4
- lang="ts"
5
- generics="Args"
6
- >
7
- import { devCatch } from '../Helpers/Helpers.svelte.js';
8
- import { Colour, ColourSet } from '../scss/colours.js';
9
- import { Size } from '../Types/Internal/Size.js';
10
- import type { AccordionGroupButtonProps } from './AccordionGroupButtonProps.js';
11
- import Action from './Action.svelte';
12
- import Icon from './Icon.svelte';
13
-
14
- let {
15
- option,
16
- selected: isSelected,
17
- noRadius = false,
18
- }: AccordionGroupButtonProps<Args> = $props();
19
-
20
- let disabled = $state(true);
21
- let isVisible = $state(true);
22
- let isValid = $state(true);
23
-
24
- $effect(() => {
25
- if (typeof option.isValid === 'boolean') {
26
- isValid = option.isValid;
27
- } else {
28
- option.isValid
29
- ?.then((v) => {
30
- isValid = v;
31
- })
32
- .catch(devCatch);
33
- }
34
- });
35
- $effect(() => {
36
- if (typeof option.disabled === 'boolean') {
37
- disabled = option.disabled;
38
- } else if (option.disabled == undefined) {
39
- disabled = false;
40
- } else {
41
- option.disabled
42
- .then((v) => {
43
- disabled = v;
44
- })
45
- .catch(devCatch);
46
- }
47
- });
48
-
49
- $effect(() => {
50
- if (typeof option.visible === 'boolean') {
51
- isVisible = option.visible;
52
- } else if (option.visible == undefined) {
53
- isVisible = true;
54
- } else {
55
- option.visible
56
- .then((v) => {
57
- isVisible = v;
58
- })
59
- .catch(devCatch);
60
- }
61
- });
62
- </script>
63
-
64
- <div
65
- class:isSelected
66
- class="tab"
67
- class:invalid={!isValid}
68
- class:hidden={!isVisible}
69
- class:no-radius={noRadius}
70
- >
71
- {#if typeof option.label == 'string'}
72
- {option.label}
73
- {:else}
74
- {@render option.label()}
75
- {/if}
76
- <div class="spacer"></div>
77
-
78
- {#if option.extras}
79
- {@render option.extras()}
80
- {/if}
81
- {#if !isValid}
82
- <Icon
83
- name="error"
84
- colour={Colour['$error-border']}
85
- size={Size.Small}
86
- />
87
- {/if}
88
- <Action
89
- icon={{ name: isSelected ? 'circle-minus' : 'circle-plus' }}
90
- backgroundColour="transparent"
91
- colourSet={ColourSet.Info}
92
- {disabled}
93
- onclick={() => {
94
- option.onclick();
95
- }}
96
- />
97
- </div>
98
-
1
+ <svelte:options runes />
2
+
3
+ <script
4
+ lang="ts"
5
+ generics="Args"
6
+ >
7
+ import { devCatch } from '../Helpers/Helpers.svelte.js';
8
+ import { Colour, ColourSet } from '../scss/colours.js';
9
+ import { Size } from '../Types/Internal/Size.js';
10
+ import type { AccordionGroupButtonProps } from './AccordionGroupButtonProps.js';
11
+ import Action from './Action.svelte';
12
+ import Icon from './Icon.svelte';
13
+
14
+ let {
15
+ option,
16
+ selected: isSelected,
17
+ noRadius = false,
18
+ }: AccordionGroupButtonProps<Args> = $props();
19
+
20
+ let disabled = $state(true);
21
+ let isVisible = $state(true);
22
+ let isValid = $state(true);
23
+
24
+ $effect(() => {
25
+ if (typeof option.isValid === 'boolean') {
26
+ isValid = option.isValid;
27
+ } else {
28
+ option.isValid
29
+ ?.then((v) => {
30
+ isValid = v;
31
+ })
32
+ .catch(devCatch);
33
+ }
34
+ });
35
+ $effect(() => {
36
+ if (typeof option.disabled === 'boolean') {
37
+ disabled = option.disabled;
38
+ } else if (option.disabled == undefined) {
39
+ disabled = false;
40
+ } else {
41
+ option.disabled
42
+ .then((v) => {
43
+ disabled = v;
44
+ })
45
+ .catch(devCatch);
46
+ }
47
+ });
48
+
49
+ $effect(() => {
50
+ if (typeof option.visible === 'boolean') {
51
+ isVisible = option.visible;
52
+ } else if (option.visible == undefined) {
53
+ isVisible = true;
54
+ } else {
55
+ option.visible
56
+ .then((v) => {
57
+ isVisible = v;
58
+ })
59
+ .catch(devCatch);
60
+ }
61
+ });
62
+ </script>
63
+
64
+ <div
65
+ class:isSelected
66
+ class="tab"
67
+ class:invalid={!isValid}
68
+ class:hidden={!isVisible}
69
+ class:no-radius={noRadius}
70
+ >
71
+ {#if typeof option.label == 'string'}
72
+ {option.label}
73
+ {:else}
74
+ {@render option.label()}
75
+ {/if}
76
+ <div class="spacer"></div>
77
+
78
+ {#if option.extras}
79
+ {@render option.extras()}
80
+ {/if}
81
+ {#if !isValid}
82
+ <Icon
83
+ name="error"
84
+ colour={Colour['$error-border']}
85
+ size={Size.Small}
86
+ />
87
+ {/if}
88
+ <Action
89
+ icon={{ name: isSelected ? 'circle-minus' : 'circle-plus' }}
90
+ backgroundColour="transparent"
91
+ colourSet={ColourSet.Info}
92
+ {disabled}
93
+ onclick={() => {
94
+ option.onclick();
95
+ }}
96
+ />
97
+ </div>
98
+
99
99
  <style>.tab {
100
100
  color: #3a4952;
101
101
  font-size: 1rem;
@@ -119,4 +119,4 @@
119
119
  }
120
120
  .tab .spacer {
121
121
  margin: auto;
122
- }</style>
122
+ }</style>