@signal9/era-ui 2.11.3 → 2.11.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.
@@ -78,9 +78,10 @@
78
78
  ondrop={handleDrop}
79
79
  class={cn(
80
80
  // Styled to match the era Input (elevated fill, shadow-well, and the same
81
- // hover/focus highlight) so the composer reads as a first-class input
82
- // focus-within because the focus target is the inner textarea, not the form.
83
- 'flex w-full flex-col era-interactive rounded-(--era-rd-lg) bg-(--era-surface-bg-elevated) p-(--era-gap) text-body text-fg shadow-(--era-shadow-well) transition-colors duration-(--era-duration) ease-(--era-ease) hover:bg-(--era-highlight) focus-within:bg-(--era-highlight)',
81
+ // hover/focus highlight, which snaps Input carries no transition) so the
82
+ // composer reads as a first-class input. focus-within, not focus, because
83
+ // the focus target is the inner textarea, not the form.
84
+ 'flex w-full flex-col era-interactive rounded-(--era-rd-lg) bg-(--era-surface-bg-elevated) p-(--era-gap) text-body text-fg shadow-(--era-shadow-well) hover:bg-(--era-highlight) focus-within:bg-(--era-highlight)',
84
85
  className
85
86
  )}
86
87
  {...restProps}
@@ -10,7 +10,6 @@
10
10
  <script lang="ts">
11
11
  import type { Snippet } from 'svelte';
12
12
  import * as Step from '../../ui/step/index.js';
13
- import { cn } from '../../utils/index.js';
14
13
 
15
14
  let {
16
15
  state: toolState = 'input-streaming',
@@ -36,6 +35,6 @@
36
35
  );
37
36
  </script>
38
37
 
39
- <Step.Root {status} bind:open class={cn(className)}>
38
+ <Step.Root {status} bind:open class={className}>
40
39
  {@render children?.()}
41
40
  </Step.Root>
@@ -2590,6 +2590,8 @@ Composed from sub-components — compose explicitly at the call site:
2590
2590
  - `Select.Value`
2591
2591
  - `Select.Content`
2592
2592
  - `Select.Item`
2593
+ - `Select.Group`
2594
+ - `Select.GroupHeading`
2593
2595
 
2594
2596
  ## Select.Trigger
2595
2597
 
@@ -2624,6 +2626,22 @@ Inherits all props from `Select.ItemProps`.
2624
2626
  |------|------|---------|-------|
2625
2627
  | `ref?` | `(forwarded)` | `null` | bindable |
2626
2628
 
2629
+ ## Select.Group
2630
+
2631
+ Inherits all props from `Select.GroupProps`.
2632
+
2633
+ | Prop | Type | Default | Notes |
2634
+ |------|------|---------|-------|
2635
+ | `ref?` | `(forwarded)` | `null` | bindable |
2636
+
2637
+ ## Select.GroupHeading
2638
+
2639
+ Inherits all props from `PartProps<Select.GroupHeadingProps>`.
2640
+
2641
+ | Prop | Type | Default | Notes |
2642
+ |------|------|---------|-------|
2643
+ | `ref?` | `(forwarded)` | `null` | bindable |
2644
+
2627
2645
  <!-- end: select -->
2628
2646
 
2629
2647
  <!-- begin: slider -->
@@ -713,13 +713,15 @@
713
713
  "slug": "select",
714
714
  "title": "Select",
715
715
  "summary": "A dropdown select menu.",
716
- "tokenEstimate": 265,
716
+ "tokenEstimate": 371,
717
717
  "sections": [
718
718
  "Import",
719
719
  "Select.Trigger",
720
720
  "Select.Value",
721
721
  "Select.Content",
722
- "Select.Item"
722
+ "Select.Item",
723
+ "Select.Group",
724
+ "Select.GroupHeading"
723
725
  ],
724
726
  "file": "select.md"
725
727
  },
@@ -14,6 +14,8 @@ Composed from sub-components — compose explicitly at the call site:
14
14
  - `Select.Value`
15
15
  - `Select.Content`
16
16
  - `Select.Item`
17
+ - `Select.Group`
18
+ - `Select.GroupHeading`
17
19
 
18
20
  ## Select.Trigger
19
21
 
@@ -47,3 +49,19 @@ Inherits all props from `Select.ItemProps`.
47
49
  | Prop | Type | Default | Notes |
48
50
  |------|------|---------|-------|
49
51
  | `ref?` | `(forwarded)` | `null` | bindable |
52
+
53
+ ## Select.Group
54
+
55
+ Inherits all props from `Select.GroupProps`.
56
+
57
+ | Prop | Type | Default | Notes |
58
+ |------|------|---------|-------|
59
+ | `ref?` | `(forwarded)` | `null` | bindable |
60
+
61
+ ## Select.GroupHeading
62
+
63
+ Inherits all props from `PartProps<Select.GroupHeadingProps>`.
64
+
65
+ | Prop | Type | Default | Notes |
66
+ |------|------|---------|-------|
67
+ | `ref?` | `(forwarded)` | `null` | bindable |
@@ -68,12 +68,16 @@
68
68
  * Where text-box is supported it fully determines the box, so the two
69
69
  * declarations never fight. Worst-case residual: 0.44px.
70
70
  *
71
- * NEVER put this on an element that also clips overflow (`truncate`,
72
- * `overflow-hidden`, or an <input>): trim-both collapses the box to the
73
- * x-height band (~7.5px at 14px), and the clip then slices off every
74
- * ascender, cap, and descender text renders as a chopped middle stripe.
75
- * Put era-text-trim on the fixed-height ROW/control instead, and let a
76
- * truncating child inherit vertical centering from the row's items-center.
71
+ * The one hard rule concerns overflow clipping, and it is HEIGHT-conditional.
72
+ * On an AUTO-height element that also clips a `truncate` child, a
73
+ * <textarea>, an auto-height <input> trim-both collapses the box to the
74
+ * x-height band (~7.5px at 14px) and the clip slices off every ascender, cap,
75
+ * and descender (text renders as a chopped middle stripe): NEVER do that.
76
+ * A FIXED-height control is the intended home, and is safe: the explicit
77
+ * `h-(--era-*)` overrides the collapse, so a single-line <input> (Input,
78
+ * command-input) and clipping display tokens (KV) correctly carry it. For
79
+ * truncating text, put the trim on the fixed-height ROW and let the child
80
+ * center via the row's items-center.
77
81
  */
78
82
  @utility era-text-trim {
79
83
  line-height: 1;
@@ -3,7 +3,7 @@ export { Button };
3
3
  export { buttonVariants } from './variants.js';
4
4
  export interface ButtonVariants {
5
5
  tone?: 'default' | 'accent' | 'destructive' | 'success' | 'warning';
6
- size?: 'default' | 'sm' | 'xs' | 'icon';
6
+ size?: 'default' | 'sm' | 'xxs' | 'xs' | 'icon';
7
7
  variant?: 'filled' | 'link';
8
8
  icon?: boolean;
9
9
  active?: boolean;
@@ -1,6 +1,9 @@
1
1
  import { Select } from 'bits-ui';
2
2
  export declare const Root: typeof Select.Root;
3
+ export declare const Portal: typeof Select.Portal;
3
4
  export { default as Trigger } from './select-trigger.svelte';
4
5
  export { default as Value } from './select-value.svelte';
5
6
  export { default as Content } from './select-content.svelte';
6
7
  export { default as Item } from './select-item.svelte';
8
+ export { default as Group } from './select-group.svelte';
9
+ export { default as GroupHeading } from './select-group-heading.svelte';
@@ -1,6 +1,9 @@
1
1
  import { Select } from 'bits-ui';
2
2
  export const Root = Select.Root;
3
+ export const Portal = Select.Portal;
3
4
  export { default as Trigger } from './select-trigger.svelte';
4
5
  export { default as Value } from './select-value.svelte';
5
6
  export { default as Content } from './select-content.svelte';
6
7
  export { default as Item } from './select-item.svelte';
8
+ export { default as Group } from './select-group.svelte';
9
+ export { default as GroupHeading } from './select-group-heading.svelte';
@@ -0,0 +1,19 @@
1
+ <script lang="ts">
2
+ import { Select } from 'bits-ui';
3
+ import { cn, type PartProps } from '../../utils/index.js';
4
+
5
+ let {
6
+ ref = $bindable(null),
7
+ children,
8
+ class: className,
9
+ ...restProps
10
+ }: PartProps<Select.GroupHeadingProps> = $props();
11
+ </script>
12
+
13
+ <Select.GroupHeading
14
+ bind:ref
15
+ class={cn('flex h-(--era-h-md) items-center px-(--era-inset-md) text-body text-muted', className)}
16
+ {...restProps}
17
+ >
18
+ {@render children?.()}
19
+ </Select.GroupHeading>
@@ -0,0 +1,5 @@
1
+ import { Select } from 'bits-ui';
2
+ import { type PartProps } from '../../utils/index.js';
3
+ declare const SelectGroupHeading: import("svelte").Component<PartProps<Select.GroupHeadingProps>, {}, "ref">;
4
+ type SelectGroupHeading = ReturnType<typeof SelectGroupHeading>;
5
+ export default SelectGroupHeading;
@@ -0,0 +1,8 @@
1
+ <script lang="ts">
2
+ import { Select } from 'bits-ui';
3
+
4
+ // Pattern A: no extra DOM, so children flow through restProps untouched.
5
+ let { ref = $bindable(null), class: className, ...restProps }: Select.GroupProps = $props();
6
+ </script>
7
+
8
+ <Select.Group bind:ref class={className} {...restProps} />
@@ -0,0 +1,4 @@
1
+ import { Select } from 'bits-ui';
2
+ declare const SelectGroup: import("svelte").Component<Select.GroupProps, {}, "ref">;
3
+ type SelectGroup = ReturnType<typeof SelectGroup>;
4
+ export default SelectGroup;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signal9/era-ui",
3
- "version": "2.11.3",
3
+ "version": "2.11.4",
4
4
  "scripts": {
5
5
  "dev": "vite dev --host",
6
6
  "build": "vite build && npm run prepack",