@streamscloud/kit 0.10.7-1781528892980 → 0.11.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.
@@ -15,7 +15,8 @@ const { label, text, variant = 'neutral', style = 'soft', icon } = $props();
15
15
  @component
16
16
  Status badge row. Wraps a kit `<Badge>` with optional leading icon (SVG string or snippet)
17
17
  inside a `<GridCardField>` so it aligns with text rows. Use for content status, asset state,
18
- plan / tier indicators, etc.
18
+ plan / tier indicators, etc. Deliberately sizes the badge's icon to `0.875em` (12% below the
19
+ badge font) via a cascade override — `Badge` itself stays size-agnostic.
19
20
  -->
20
21
 
21
22
  <style>.grid-card-badge-field {
@@ -13,7 +13,8 @@ type Props = {
13
13
  /**
14
14
  * Status badge row. Wraps a kit `<Badge>` with optional leading icon (SVG string or snippet)
15
15
  * inside a `<GridCardField>` so it aligns with text rows. Use for content status, asset state,
16
- * plan / tier indicators, etc.
16
+ * plan / tier indicators, etc. Deliberately sizes the badge's icon to `0.875em` (12% below the
17
+ * badge font) via a cascade override — `Badge` itself stays size-agnostic.
17
18
  */
18
19
  declare const Cmp: import("svelte").Component<Props, {}, "">;
19
20
  type Cmp = ReturnType<typeof Cmp>;
@@ -14,6 +14,9 @@ export type SplitIcon = {
14
14
  color: IconColor | null;
15
15
  size: IconSize | null;
16
16
  };
17
- /** One step up the icon-size scale (caps at the largest). Backs IconSlot's `scale: 'large'` fallback. */
17
+ /**
18
+ * One step up the icon-size scale (caps at the largest in each scale). Backs IconSlot's `scale: 'large'` fallback.
19
+ * Steps within a scale (control → control, standalone → standalone); in a control context always pass a `control-*` size.
20
+ */
18
21
  export declare const scaleUp: (size: IconSize | null | undefined) => IconSize | undefined;
19
22
  export declare const splitIcon: (icon: IconProp | undefined | null) => SplitIcon;
@@ -17,7 +17,10 @@ const SIZE_STEP_UP = {
17
17
  'control-lg': 'control-xl',
18
18
  'control-xl': 'control-xl'
19
19
  };
20
- /** One step up the icon-size scale (caps at the largest). Backs IconSlot's `scale: 'large'` fallback. */
20
+ /**
21
+ * One step up the icon-size scale (caps at the largest in each scale). Backs IconSlot's `scale: 'large'` fallback.
22
+ * Steps within a scale (control → control, standalone → standalone); in a control context always pass a `control-*` size.
23
+ */
21
24
  export const scaleUp = (size) => (!size ? undefined : SIZE_STEP_UP[size]);
22
25
  export const splitIcon = (icon) => {
23
26
  if (icon === null || icon === undefined) {
@@ -2,7 +2,7 @@ import { type IconColor, type IconSize } from '../icon';
2
2
  type Props = {
3
3
  value: string;
4
4
  collapsedIconColor?: IconColor;
5
- /** Icon size while collapsed (icon-only). Defaults to one step larger than the inline icon for legibility. */
5
+ /** Icon size while collapsed (icon-only). @default one step larger than the inline icon `scaleUp(CONTROL_ICON_SIZE[size])` */
6
6
  collapsedIconSize?: IconSize;
7
7
  placeholder?: string;
8
8
  /** Size preset (shared with Input / DatePicker / Select). @default 'sm' */
@@ -82,8 +82,8 @@ export const runFuseSearch = (fuse, query, items) => {
82
82
  .search(query)
83
83
  .map((r) => ({ flat: r.item, rank: rankOf(r.item.option.label, r.score ?? 1) }))
84
84
  .sort((a, b) => a.rank - b.rank);
85
- const hasExact = ranked.some((r) => r.rank < 2);
86
- const matches = hasExact ? ranked.filter((r) => r.rank < 2) : ranked;
85
+ const hasPrefixOrSubstring = ranked.some((r) => r.rank < 2);
86
+ const matches = hasPrefixOrSubstring ? ranked.filter((r) => r.rank < 2) : ranked;
87
87
  const groups = items.filter(isSelectGroup);
88
88
  const labelMatches = new Set();
89
89
  if (groups.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/kit",
3
- "version": "0.10.7-1781528892980",
3
+ "version": "0.11.0",
4
4
  "author": "StreamsCloud",
5
5
  "repository": {
6
6
  "type": "git",