@streamscloud/kit 0.10.3 → 0.10.4
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/ui/divider/cmp.divider.svelte +2 -1
- package/dist/ui/duration/cmp.duration.svelte +2 -1
- package/dist/ui/grid-card/fields/cmp.grid-card-id-field.svelte +2 -1
- package/dist/ui/logo/cmp.logo.svelte +2 -1
- package/dist/ui/navigation/cmp.nav-menu-divider.svelte +2 -1
- package/dist/ui/pin-input/cmp.pin-input.svelte +2 -1
- package/dist/ui/progress/cmp.progress.svelte +2 -1
- package/dist/ui/radio/cmp.radio-card.svelte +2 -1
- package/dist/ui/segmented-control/cmp.segmented-control.svelte +2 -1
- package/dist/ui/skeleton/cmp.skeleton.svelte +2 -1
- package/dist/ui/slider/cmp.slider.svelte +2 -1
- package/dist/ui/spinner/cmp.spinner.svelte +2 -1
- package/dist/ui/table/table-cells/table-badge-cell.svelte +1 -1
- package/dist/ui/table/types.d.ts +2 -0
- package/package.json +3 -3
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<script lang="ts">
|
|
1
|
+
<script lang="ts">"use strict";
|
|
2
|
+
const { seconds, variant = 'raw', showZero = false } = $props();
|
|
2
3
|
const format = (secs) => {
|
|
3
4
|
const total = Math.max(0, Math.round(secs));
|
|
4
5
|
const hours = Math.floor(total / 3600);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<script lang="ts">
|
|
1
|
+
<script lang="ts">"use strict";
|
|
2
|
+
let { mark = false, subheading = null, variant = 'mono', ariaLabel } = $props();
|
|
2
3
|
// Resolve fills per variant. `mono` keeps the existing currentColor behavior;
|
|
3
4
|
// `standard` paints the mark in the brand accent and the type in primary text,
|
|
4
5
|
// matching the Figma master Standard lockup.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<script lang="ts">
|
|
1
|
+
<script lang="ts">"use strict";
|
|
2
|
+
const { value, length = 6, mask = false, disabled = false, error = false, 'aria-label': ariaLabel, on } = $props();
|
|
2
3
|
let cells = $state([]);
|
|
3
4
|
const cellValue = (i) => value[i] ?? '';
|
|
4
5
|
const emit = (next) => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<script lang="ts">
|
|
1
|
+
<script lang="ts">"use strict";
|
|
2
|
+
let { value, size = 'md', color, label } = $props();
|
|
2
3
|
const clamped = $derived(Math.max(0, Math.min(1, value)));
|
|
3
4
|
const cssWidth = $derived(`${100 * clamped}%`);
|
|
4
5
|
const percent = $derived(Math.round(100 * clamped));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<script lang="ts">
|
|
1
|
+
<script lang="ts">"use strict";
|
|
2
|
+
const { selected, title, description, disabled = false, name, on } = $props();
|
|
2
3
|
const handleClick = (event) => {
|
|
3
4
|
event.stopPropagation();
|
|
4
5
|
if (disabled || selected) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script lang="ts" module>export {};
|
|
2
2
|
</script>
|
|
3
3
|
|
|
4
|
-
<script lang="ts" generics="T">
|
|
4
|
+
<script lang="ts" generics="T">"use strict";
|
|
5
|
+
const { value, segments, variant = 'tray', size = 'md', fullWidth = false, compare, on } = $props();
|
|
5
6
|
const isActive = (segment) => (compare ? compare(value, segment.value) : value === segment.value);
|
|
6
7
|
const handleClick = (segment) => {
|
|
7
8
|
if (segment.disabled || isActive(segment)) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<script lang="ts">
|
|
1
|
+
<script lang="ts">"use strict";
|
|
2
|
+
let { value, min = 0, max = 100, step = 1, disabled = false, showValue = false, withInput = false, ticks = [], valueSuffix = '', on } = $props();
|
|
2
3
|
let focused = $state(false);
|
|
3
4
|
const fillPct = $derived(max === min ? 0 : ((value - min) / (max - min)) * 100);
|
|
4
5
|
const handleInput = (e) => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<script lang="ts">
|
|
1
|
+
<script lang="ts">"use strict";
|
|
2
|
+
let { size = 'md', color, label, position, blocking = false, timeout = 0 } = $props();
|
|
2
3
|
let visible = $state(false);
|
|
3
4
|
$effect(() => {
|
|
4
5
|
if (timeout <= 0) {
|
|
@@ -6,7 +6,7 @@ const variant = $derived(column.variantFactory ? column.variantFactory(item) : '
|
|
|
6
6
|
|
|
7
7
|
{#if getValueForColumn(column, item) !== null}
|
|
8
8
|
<div class="table-badge-cell">
|
|
9
|
-
<Badge variant={variant}>{getValueForColumn(column, item)}</Badge>
|
|
9
|
+
<Badge variant={variant} fullWidth={column.fullWidth}>{getValueForColumn(column, item)}</Badge>
|
|
10
10
|
</div>
|
|
11
11
|
{/if}
|
|
12
12
|
|
package/dist/ui/table/types.d.ts
CHANGED
|
@@ -40,6 +40,8 @@ export interface ITableBadgeColumn<T> extends ITableColumn<T> {
|
|
|
40
40
|
type: 'badge';
|
|
41
41
|
variantFactory?: ((item: T) => BadgeVariant) | null;
|
|
42
42
|
valueFactory?: ((item: T) => string) | null;
|
|
43
|
+
/** Stretch the badge to fill the column width. @default false */
|
|
44
|
+
fullWidth?: boolean;
|
|
43
45
|
}
|
|
44
46
|
export interface ITableByColumn<T> extends ITableColumn<T> {
|
|
45
47
|
type: 'by';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamscloud/kit",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.4",
|
|
4
4
|
"author": "StreamsCloud",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -519,7 +519,7 @@
|
|
|
519
519
|
"nanoid": "^5.1.11",
|
|
520
520
|
"p-limit": "^7.3.0",
|
|
521
521
|
"prettier": "^3.8.3",
|
|
522
|
-
"prettier-plugin-svelte": "^
|
|
522
|
+
"prettier-plugin-svelte": "^4.1.0",
|
|
523
523
|
"publint": "^0.3.21",
|
|
524
524
|
"rfdc": "^1.4.1",
|
|
525
525
|
"sass": "^1.99.0",
|
|
@@ -528,7 +528,7 @@
|
|
|
528
528
|
"svelte-check": "^4.4.8",
|
|
529
529
|
"svelte-dnd-action": "^0.9.69",
|
|
530
530
|
"svelte-preprocess": "^6.0.3",
|
|
531
|
-
"typescript": "^
|
|
531
|
+
"typescript": "^6.0.3",
|
|
532
532
|
"typescript-eslint": "^8.59.3",
|
|
533
533
|
"vite": "^8.0.13",
|
|
534
534
|
"vite-tsconfig-paths": "^6.1.1",
|