@streamscloud/kit 0.10.5 → 0.10.7-1781470550424
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/button/cmp.button.svelte +1 -1
- package/dist/ui/button/cmp.button.svelte.d.ts +1 -1
- package/dist/ui/grid-card/fields/cmp.grid-card-actions-field.svelte +1 -1
- package/dist/ui/grid-card/fields/cmp.grid-card-actions-field.svelte.d.ts +2 -0
- package/dist/ui/grid-card/fields/cmp.grid-card-button.svelte +14 -10
- package/dist/ui/grid-card/fields/cmp.grid-card-button.svelte.d.ts +5 -3
- package/package.json +1 -1
|
@@ -103,7 +103,7 @@ Pass `type="anchor"` to render as `<a>` with `href`. Otherwise `type` is the nat
|
|
|
103
103
|
| `--sc-kit--button--padding-inline` | Inline (horizontal) padding | per size |
|
|
104
104
|
| `--sc-kit--button--font-size` | Label font size | per size |
|
|
105
105
|
| `--sc-kit--button--gap` | Gap between icon and label | per size |
|
|
106
|
-
| `--sc-kit--button--icon-size` | Icon / spinner size | per size (
|
|
106
|
+
| `--sc-kit--button--icon-size` | Icon / spinner size | per size (14 / 14 / 16 / 20 px for xs/sm/md/lg) |
|
|
107
107
|
| `--sc-kit--button--border-radius` | Corner rounding | `var(--sc-kit--radius--md)` |
|
|
108
108
|
| `--sc-kit--button--font-weight` | Font weight | `var(--sc-kit--font-weight--regular)` |
|
|
109
109
|
| `--sc-kit--button--width` | Explicit width | `fit-content` |
|
|
@@ -61,7 +61,7 @@ type Props = ButtonModeProps | AnchorModeProps;
|
|
|
61
61
|
* | `--sc-kit--button--padding-inline` | Inline (horizontal) padding | per size |
|
|
62
62
|
* | `--sc-kit--button--font-size` | Label font size | per size |
|
|
63
63
|
* | `--sc-kit--button--gap` | Gap between icon and label | per size |
|
|
64
|
-
* | `--sc-kit--button--icon-size` | Icon / spinner size | per size (
|
|
64
|
+
* | `--sc-kit--button--icon-size` | Icon / spinner size | per size (14 / 14 / 16 / 20 px for xs/sm/md/lg) |
|
|
65
65
|
* | `--sc-kit--button--border-radius` | Corner rounding | `var(--sc-kit--radius--md)` |
|
|
66
66
|
* | `--sc-kit--button--font-weight` | Font weight | `var(--sc-kit--font-weight--regular)` |
|
|
67
67
|
* | `--sc-kit--button--width` | Explicit width | `fit-content` |
|
|
@@ -6,7 +6,7 @@ const { label, actions } = $props();
|
|
|
6
6
|
<GridCardField label={label}>
|
|
7
7
|
<div class="grid-card-actions-field">
|
|
8
8
|
{#each actions as action (action)}
|
|
9
|
-
<GridCardButton icon={action.icon} text={action.text} variant={action.variant} on={action.on} />
|
|
9
|
+
<GridCardButton icon={action.icon} text={action.text} ariaLabel={action.ariaLabel} variant={action.variant} on={action.on} />
|
|
10
10
|
{/each}
|
|
11
11
|
</div>
|
|
12
12
|
</GridCardField>
|
|
@@ -4,6 +4,8 @@ export type GridCardAction = {
|
|
|
4
4
|
/** Use the `{ src, color }` object form to tint the icon (e.g. `'danger'` for delete) without coloring the whole button. */
|
|
5
5
|
icon: IconProp;
|
|
6
6
|
text?: string;
|
|
7
|
+
/** Accessible name — required for text-less (icon-only) actions. */
|
|
8
|
+
ariaLabel?: string;
|
|
7
9
|
/** @default 'ghost' */
|
|
8
10
|
variant?: ButtonVariant;
|
|
9
11
|
on: {
|
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
<script lang="ts">import { Button } from '../../button';
|
|
2
|
-
|
|
3
|
-
const { icon, text, variant = 'ghost', on } = $props();
|
|
2
|
+
const { icon, text, ariaLabel, variant = 'ghost', on } = $props();
|
|
4
3
|
const handleClick = (e) => {
|
|
5
4
|
e.stopPropagation();
|
|
6
5
|
on.click(e);
|
|
7
6
|
};
|
|
8
7
|
</script>
|
|
9
8
|
|
|
9
|
+
{#snippet label()}{text}{/snippet}
|
|
10
|
+
|
|
10
11
|
<span class="grid-card-button">
|
|
11
|
-
<Button
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
<Button
|
|
13
|
+
type="button"
|
|
14
|
+
variant={variant}
|
|
15
|
+
icon={icon}
|
|
16
|
+
size="xs"
|
|
17
|
+
aria-label={ariaLabel ?? text}
|
|
18
|
+
children={text ? label : undefined}
|
|
19
|
+
on={{ click: handleClick }} />
|
|
16
20
|
</span>
|
|
17
21
|
|
|
18
22
|
<!--
|
|
19
23
|
@component
|
|
20
|
-
Internal compact action button for `GridCard` rows. Kit `Button`
|
|
21
|
-
default — override via `variant`
|
|
22
|
-
(e.g. `
|
|
24
|
+
Internal compact action button for `GridCard` rows. Kit `Button` at `size='xs'`, `variant='ghost'` by
|
|
25
|
+
default — override via `variant`. Pass the `{ src, color }` icon object form to tint an individual
|
|
26
|
+
action icon (e.g. `'danger'` on delete) without coloring the whole button. Click handler stops
|
|
23
27
|
propagation so it doesn't fire the card's `on.activate`.
|
|
24
28
|
-->
|
|
25
29
|
|
|
@@ -3,6 +3,8 @@ import type { IconProp } from '../../icon';
|
|
|
3
3
|
type Props = {
|
|
4
4
|
icon: IconProp;
|
|
5
5
|
text?: string;
|
|
6
|
+
/** Accessible name — required for text-less (icon-only) actions. */
|
|
7
|
+
ariaLabel?: string;
|
|
6
8
|
/** @default 'ghost' */
|
|
7
9
|
variant?: ButtonVariant;
|
|
8
10
|
on: {
|
|
@@ -10,9 +12,9 @@ type Props = {
|
|
|
10
12
|
};
|
|
11
13
|
};
|
|
12
14
|
/**
|
|
13
|
-
* Internal compact action button for `GridCard` rows. Kit `Button`
|
|
14
|
-
* default — override via `variant`
|
|
15
|
-
* (e.g. `
|
|
15
|
+
* Internal compact action button for `GridCard` rows. Kit `Button` at `size='xs'`, `variant='ghost'` by
|
|
16
|
+
* default — override via `variant`. Pass the `{ src, color }` icon object form to tint an individual
|
|
17
|
+
* action icon (e.g. `'danger'` on delete) without coloring the whole button. Click handler stops
|
|
16
18
|
* propagation so it doesn't fire the card's `on.activate`.
|
|
17
19
|
*/
|
|
18
20
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|