@dorsk/tsumikit 0.61.0 → 0.61.1

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/README.md CHANGED
@@ -656,7 +656,8 @@ takes `label` (its accessible name), `items`, `placement` and the `Menu`
656
656
  panel props (`tag`, `panelClass`, `gap`, `open`, `onopen`, `onclose`).
657
657
  `variant` (default | primary | danger), `size` and `control` apply to both
658
658
  segments and match `Button` heights; `disabled` turns off the whole control,
659
- `menuDisabled` only the caret. ArrowDown on the primary opens the menu.
659
+ `menuDisabled` only the caret. `caret="half"` narrows the caret to half the
660
+ control height so it reads as secondary. ArrowDown on the primary opens the menu.
660
661
 
661
662
  ```svelte
662
663
  <SplitButton variant="primary" label="Send options" {items} onclick={send}>Send</SplitButton>
@@ -18,6 +18,9 @@
18
18
  size?: ControlSize;
19
19
  /** Use the shared `--control-height` toolbar/composer contract. */
20
20
  control?: boolean;
21
+ /** `half` narrows the caret to half the control height so it reads as
22
+ * secondary to the primary action. */
23
+ caret?: 'square' | 'half';
21
24
  /** Disables both segments. */
22
25
  disabled?: boolean;
23
26
  /** Disables the caret only; the primary action keeps working. */
@@ -50,6 +53,7 @@
50
53
  variant = 'default',
51
54
  size = 'md',
52
55
  control = false,
56
+ caret = 'square',
53
57
  disabled = false,
54
58
  menuDisabled = false,
55
59
  label,
@@ -90,6 +94,7 @@
90
94
  data-tsu="SplitButton"
91
95
  class="split {klass}"
92
96
  class:split-primary={variant === 'primary'}
97
+ class:split-half={caret === 'half'}
93
98
  style={styleProp}
94
99
  style:--split-height={height}
95
100
  >
@@ -152,6 +157,9 @@
152
157
  --pop-trigger-radius: 0 var(--r-md) var(--r-md) 0;
153
158
  --pop-trigger-pad: 0;
154
159
  }
160
+ .split-half .split-caret {
161
+ width: calc(var(--split-height) / 2);
162
+ }
155
163
  /* The hovered or focused segment paints above its neighbour, so its
156
164
  accent border and focus ring are not cut by the overlap. */
157
165
  .split-main:hover,
@@ -8,6 +8,9 @@ type Own = {
8
8
  size?: ControlSize;
9
9
  /** Use the shared `--control-height` toolbar/composer contract. */
10
10
  control?: boolean;
11
+ /** `half` narrows the caret to half the control height so it reads as
12
+ * secondary to the primary action. */
13
+ caret?: 'square' | 'half';
11
14
  /** Disables both segments. */
12
15
  disabled?: boolean;
13
16
  /** Disables the caret only; the primary action keeps working. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dorsk/tsumikit",
3
- "version": "0.61.0",
3
+ "version": "0.61.1",
4
4
  "description": "Minimal, dependency-free Svelte 5 + pure-CSS UI kit. Token-driven atoms, molecules & layouts with theming out of the box.",
5
5
  "type": "module",
6
6
  "license": "MIT",