@salmexio/ui 0.3.0 → 0.3.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.
@@ -53,6 +53,12 @@ interface Props {
53
53
  class?: string;
54
54
  /** Change handler */
55
55
  onchange?: (value: string) => void;
56
+ /** Called when a tab receives focus (keyboard or click) */
57
+ onfocus?: (value: string) => void;
58
+ /** Called when the pointer enters a tab (hover) */
59
+ onmouseenter?: (value: string) => void;
60
+ /** Called when the pointer leaves a tab */
61
+ onmouseleave?: (value: string) => void;
56
62
  /** Panel content - receives active tab value */
57
63
  children?: Snippet<[activeValue: string]>;
58
64
  /** Test ID */
@@ -67,6 +73,9 @@ let {
67
73
  size = 'md',
68
74
  class: className = '',
69
75
  onchange,
76
+ onfocus,
77
+ onmouseenter,
78
+ onmouseleave,
70
79
  children,
71
80
  testId
72
81
  }: Props = $props();
@@ -144,6 +153,9 @@ function handleKeydown(event: KeyboardEvent, currentIndex: number) {
144
153
  )}
145
154
  onclick={() => activateTab(index)}
146
155
  onkeydown={(e) => handleKeydown(e, index)}
156
+ onfocus={() => !isDisabled && onfocus?.(tab.value)}
157
+ onmouseenter={() => !isDisabled && onmouseenter?.(tab.value)}
158
+ onmouseleave={() => !isDisabled && onmouseleave?.(tab.value)}
147
159
  >
148
160
  {#if tab.icon}
149
161
  <span class="salmex-tab-icon" aria-hidden="true">
@@ -27,6 +27,12 @@ interface Props {
27
27
  class?: string;
28
28
  /** Change handler */
29
29
  onchange?: (value: string) => void;
30
+ /** Called when a tab receives focus (keyboard or click) */
31
+ onfocus?: (value: string) => void;
32
+ /** Called when the pointer enters a tab (hover) */
33
+ onmouseenter?: (value: string) => void;
34
+ /** Called when the pointer leaves a tab */
35
+ onmouseleave?: (value: string) => void;
30
36
  /** Panel content - receives active tab value */
31
37
  children?: Snippet<[activeValue: string]>;
32
38
  /** Test ID */
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.svelte.d.ts","sourceRoot":"","sources":["../../../src/navigation/Tabs/Tabs.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAItC,KAAK,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEnC,MAAM,WAAW,SAAS;IACzB,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,4BAA4B;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,KAAK;IACd,wBAAwB;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAC;IACd,sBAAsB;IACtB,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mBAAmB;IACnB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qBAAqB;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,gDAAgD;IAChD,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;IAC1C,cAAc;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AA8GD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,QAAA,MAAM,IAAI,2CAAwC,CAAC;AACnD,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC;AACpC,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"Tabs.svelte.d.ts","sourceRoot":"","sources":["../../../src/navigation/Tabs/Tabs.svelte.ts"],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oBG;AACH,QAAA,MAAM,IAAI,2CAAwC,CAAC;AACnD,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC;AACpC,eAAe,IAAI,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salmexio/ui",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Salmex I/O Design System — Win2K-inspired UI component library for Salmex and Salmex I/O products",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",