@geoffcox/sterling-svelte 2.0.10 → 2.0.11

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.
@@ -11,7 +11,7 @@
11
11
  children,
12
12
  checked = $bindable(false),
13
13
  class: _class,
14
- disabled = $bindable(false),
14
+ disabled = false,
15
15
  ...rest
16
16
  }: CheckboxProps = $props();
17
17
 
@@ -3,6 +3,6 @@ declare const Checkbox: import("svelte").Component<import("svelte/elements").HTM
3
3
  blur: () => void;
4
4
  click: () => void;
5
5
  focus: (options?: FocusOptions) => void;
6
- }, "disabled" | "checked">;
6
+ }, "checked">;
7
7
  type Checkbox = ReturnType<typeof Checkbox>;
8
8
  export default Checkbox;
package/dist/Menu.svelte CHANGED
@@ -8,6 +8,7 @@
8
8
  import { isElementEnabledMenuItem, isElementMenuItem } from './MenuItem.utils';
9
9
  import { prefersReducedMotion } from './mediaQueries/prefersReducedMotion';
10
10
  import type { MenuProps } from './Menu.types';
11
+ import { linear } from 'svelte/easing';
11
12
 
12
13
  let { children, class: _class, ...rest }: MenuProps = $props();
13
14
 
@@ -91,8 +92,8 @@
91
92
  class:open
92
93
  data-root-value={rootValue}
93
94
  tabindex="-1"
94
- in:slideMotion|global={{ duration: 300 }}
95
- out:slideMotion|global={{ duration: 100 }}
95
+ in:slideMotion|global={{ delay: 10, duration: 250, easing: linear, axis: 'y' }}
96
+ out:slideMotion|global={{ delay: 10, duration: 250, easing: linear, axis: 'y' }}
96
97
  {...rest}
97
98
  >
98
99
  <div bind:this={menuItemsRef} class="menu-items">
@@ -381,7 +381,7 @@
381
381
  aria-haspopup={!!children}
382
382
  aria-owns={menuId}
383
383
  class={['sterling-menu-item', _class]}
384
- class:using-keyboard={usingKeyboard}
384
+ class:using-keyboard={$usingKeyboard}
385
385
  data-value={value}
386
386
  data-root-value={menuItemContext.rootValue}
387
387
  {disabled}
@@ -202,11 +202,9 @@
202
202
  {#if _page}
203
203
  {#if currentNumber}
204
204
  {@render currentNumber(_page)}
205
- {:else}
205
+ {:else if itemCount > 0}
206
206
  <input disabled={_page === undefined} value={_page} onchange={onInputChange} />
207
207
  {/if}
208
- {:else}
209
- -
210
208
  {/if}
211
209
  </div>
212
210
  <div class="page-number next">
@@ -3,6 +3,7 @@ type ProgressOrientationTuple = typeof PROGRESS_ORIENTATIONS;
3
3
  export type ProgressOrientation = ProgressOrientationTuple[number];
4
4
  import type { HTMLAttributes } from 'svelte/elements';
5
5
  export type ProgressProps = HTMLAttributes<HTMLDivElement> & {
6
+ /** @deprecated Progress is not interactive and should not have disabled state. */
6
7
  disabled?: boolean | null;
7
8
  max?: number;
8
9
  percent?: number;
@@ -4,6 +4,7 @@
4
4
  import { round } from 'lodash-es';
5
5
  import type { KeyboardEventHandler, PointerEventHandler } from 'svelte/elements';
6
6
  import type { SliderProps } from './Slider.types';
7
+ import { usingKeyboard } from './mediaQueries/usingKeyboard';
7
8
 
8
9
  let {
9
10
  class: _class,
@@ -180,6 +181,7 @@
180
181
  class:disabled
181
182
  class:horizontal={!vertical}
182
183
  class:reverse
184
+ class:using-keyboard={$usingKeyboard}
183
185
  class:vertical
184
186
  role="slider"
185
187
  tabindex={!disabled ? 0 : undefined}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geoffcox/sterling-svelte",
3
- "version": "2.0.10",
3
+ "version": "2.0.11",
4
4
  "author": "Geoff Cox",
5
5
  "description": "A modern, accessible, and lightweight component library for Svelte.",
6
6
  "license": "MIT",
@@ -74,7 +74,7 @@
74
74
  "@eslint/js": "^9.18.0",
75
75
  "@fontsource/atkinson-hyperlegible": "^5.1.1",
76
76
  "@fontsource/source-code-pro": "^4.5.14",
77
- "@geoffcox/sterling-svelte-themes": "^2.0.3",
77
+ "@geoffcox/sterling-svelte-themes": "^2.0.4",
78
78
  "@sveltejs/adapter-static": "^3.0.8",
79
79
  "@sveltejs/kit": "^2.16.0",
80
80
  "@sveltejs/package": "^2.0.0",