sterling-svelte  2.0.7
A modern, accessible, lightweight UI component library for Svelte.

Changelog

2.0.7

Slider

  • Removed unnecessary min/max clamping
  • Fixed to immediately ensure valid value on component instantiation

Tooltip

  • Added missing onOpen event

2.0.6

Autocomplete *NEW*

  • Added Autocomplete component

Label

  • Added optional form validation to set message and class.
  • Added optional form validation to show required indicator.

Component Props

  • Exported all component props types to allow for better composition outside the library.

2.0.5

TextArea

  • Removed empty string default for value to support undefined.

Tooltip

  • Fixed issue with mouse leave debounce.

Label

  • Moved tooltip upwards from required indicator to avoid mouse hover conflicts.
  • Added sterling-label-tooltip class to requiredReason tooltip to support styling.

2.0.4

ColorScheme Action (NEW)

  • Added colorScheme action to support sterling-svelte-themes 2.0.
  • Deprecated applyLightDarkMode action.

2.0.3

No breaking changes where props and classes were added, existing ones were not removed.

Dropdown

  • Fixed snippets to account for the value being clickable.
    • button -> icon
    • buttonIcon -> icon
  • Added class="icon" to the icon.
  • Improved classes for content.
    • sterling-dropdown-popup-content -> sterling-dropdown-content

MenuItem

  • Added snippet support to text and shortcut props.
    • text: string | Snippet
    • shortcut: string | Snippet
  • Ensured each child div is present in MenuItem's default item.
  • Added class="default-item" to MenuItem's default item.
    • sterling-menu-item-display -> default-item

Pagination *NEW*

  • Added Pagination component

Select

  • Fixed snippets to account for the value being clickable.
    • buttonSnippet -> icon
    • valueSnippet -> value
  • Added string support to the value prop.
    • value: string | Snippet
  • Improved classes for content.
    • sterling-select-popup-content -> sterling-select-content

Slider

  • Fixed thumb from starting a drag operation when dragged perpendicular to the slider.

Tooltip

  • Added sterling-tooltip-callout class to allow styling of the callout.

Documentation

  • Better described the HTML structure with classes in anatomy section for each component.

Other changes

  • Deprecated idGenerator in favor of $props.id()
  • Deprecated the extraClass action in favor of built-in clsx class merging
  • Removed some leftover console.log and $inspect calls from debugging

2.0.2 (Bad version)

The build script failed and a empty version was published.

2.0.1

2.x release from main branch

2.0.0

Breaking changes due to converting to Svelte 5

  • Removed variant prop from all components. Instead, class prop is used.
  • Event handlers (e.g. on:select) are now callbacks in props (e.g. onSelect).
  • Slots are now snippets. The children snippet prop is used instead of default slot.
  • Some HTML structure and class names were changed in components based on prop/snippet changes.
  • Context property types are plain values (e.g. string, boolean) rather than stores. Context objects are implemented with getters and setters when supporting property change detection is needed.
  • Props that were previously boolean are expanded to boolean | null | undefined

Other changes

  • The Sterling theme was moved to a separate package: @geoffcox/sterling-svelte-themes.
  • The ColorPicker and associated components were removed. In the future, they will be included in a separate package to avoid the tinycolor dependency in this library.

Component specific changes

  • Label: status property removed.
  • Label: vertical property removed.
  • MenuItemDisplay: removed. Built in to MenuItem as default content.
  • Progress: status property removed.
  • Switch: offText and offLabel combined into offLabel snippet.
  • Switch: onText and onLabel combined into onLabel snippet.
  • TreeItem: icon snippet added.
  • TreeItemDisplay: removed. Built in to TreeItem as default content.