JSPM

@spectrum-web-components/core

0.0.5-next.20260223103045
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 13501
  • Score
    100M100P100Q137009F
  • License Apache-2.0

Abstract base classes for Spectrum Web Components

Package Exports

  • @spectrum-web-components/core/components/alert-banner
  • @spectrum-web-components/core/components/asset
  • @spectrum-web-components/core/components/badge
  • @spectrum-web-components/core/components/divider
  • @spectrum-web-components/core/components/progress-circle
  • @spectrum-web-components/core/components/status-light
  • @spectrum-web-components/core/controllers
  • @spectrum-web-components/core/controllers/index.js
  • @spectrum-web-components/core/controllers/language-resolution.js
  • @spectrum-web-components/core/element
  • @spectrum-web-components/core/element/define-element.js
  • @spectrum-web-components/core/element/index.js
  • @spectrum-web-components/core/element/spectrum-element.js
  • @spectrum-web-components/core/element/version.js
  • @spectrum-web-components/core/mixins
  • @spectrum-web-components/core/mixins/index.js
  • @spectrum-web-components/core/mixins/observe-slot-presence.js
  • @spectrum-web-components/core/mixins/observe-slot-text.js
  • @spectrum-web-components/core/mixins/sized-mixin.js
  • @spectrum-web-components/core/utils
  • @spectrum-web-components/core/utils/capitalize.js
  • @spectrum-web-components/core/utils/get-label-from-slot.js
  • @spectrum-web-components/core/utils/index.js

Readme

@spectrum-web-components/core

Abstract base classes for Spectrum Web Components.

This package provides shared functionality between multiple generations of implementations and is not intended for direct external use.

For more information, visit the Spectrum Web Components repository.

Folder structure

The core package is private/internal, so we can organize foundational code for discoverability and incremental migration.

core/
  element/      # SpectrumElement, defineElement, and element infrastructure
  mixins/       # Reusable mixins (SizedMixin, ObserveSlotPresence, etc.)
  controllers/  # Reactive controllers (Lit controllers, observers, etc.)
  utils/        # Utility functions (DOM helpers, label extraction, etc.)
  components/   # Component base classes (already established)

Naming

All new folders and files in /core should be kebab-case.

Imports

Prefer the new top-level paths for new code:

  • @spectrum-web-components/core/element
  • @spectrum-web-components/core/mixins
  • @spectrum-web-components/core/controllers
  • @spectrum-web-components/core/utils

New code should use the top-level paths above.

Migration

See MIGRATION.md for guidance on where to place migrated code.