diff --git a/docs/resources/changelog.md b/docs/resources/changelog.md index 8488ac709..dd5598250 100644 --- a/docs/resources/changelog.md +++ b/docs/resources/changelog.md @@ -9,6 +9,7 @@ _During the beta period, these restrictions may be relaxed in the event of a mis ## Next - Fixed a bug where setting properties before an element was defined would render incorrectly [#425](https://github.com/shoelace-style/shoelace/issues/425) +- Fixed a bug that caused all modules to be imported when cherry picking certain components [#439](https://github.com/shoelace-style/shoelace/issues/439) - Improved a11y in `sl-progress-ring` - Updated React docs to use [`@shoelace-style/react`](https://github.com/shoelace-style/react) - Updated NextJS docs [#434](https://github.com/shoelace-style/shoelace/pull/434) diff --git a/src/components/animation/animation.ts b/src/components/animation/animation.ts index a16869a45..46dd27d9b 100644 --- a/src/components/animation/animation.ts +++ b/src/components/animation/animation.ts @@ -1,8 +1,8 @@ import { LitElement, html, unsafeCSS } from 'lit'; import { customElement, property, queryAsync } from 'lit/decorators'; import { event, EventEmitter, watch } from '../../internal/decorators'; -import styles from 'sass:./animation.scss'; import { animations } from './animations'; +import styles from 'sass:./animation.scss'; /** * @since 2.0 diff --git a/src/components/button/button.ts b/src/components/button/button.ts index 5de97f8d7..f029f29b8 100644 --- a/src/components/button/button.ts +++ b/src/components/button/button.ts @@ -3,8 +3,8 @@ import { customElement, property, query, state } from 'lit/decorators'; import { classMap } from 'lit-html/directives/class-map'; import { ifDefined } from 'lit-html/directives/if-defined'; import { event, EventEmitter } from '../../internal/decorators'; -import styles from 'sass:./button.scss'; import { hasSlot } from '../../internal/slot'; +import styles from 'sass:./button.scss'; /** * @since 2.0 diff --git a/src/components/card/card.ts b/src/components/card/card.ts index 263735284..46a19fc36 100644 --- a/src/components/card/card.ts +++ b/src/components/card/card.ts @@ -1,8 +1,8 @@ import { LitElement, html, unsafeCSS } from 'lit'; import { customElement, state } from 'lit/decorators'; import { classMap } from 'lit-html/directives/class-map'; -import styles from 'sass:./card.scss'; import { hasSlot } from '../../internal/slot'; +import styles from 'sass:./card.scss'; /** * @since 2.0 diff --git a/src/components/color-picker/color-picker.ts b/src/components/color-picker/color-picker.ts index 5d6cbd639..d47b9ded6 100644 --- a/src/components/color-picker/color-picker.ts +++ b/src/components/color-picker/color-picker.ts @@ -4,10 +4,11 @@ import { classMap } from 'lit-html/directives/class-map'; import { ifDefined } from 'lit-html/directives/if-defined'; import { styleMap } from 'lit-html/directives/style-map'; import { event, EventEmitter, watch } from '../../internal/decorators'; -import styles from 'sass:./color-picker.scss'; -import { SlDropdown, SlInput } from '../../shoelace'; -import color from 'color'; import { clamp } from '../../internal/math'; +import SlDropdown from '../dropdown/dropdown'; +import SlInput from '../input/input'; +import color from 'color'; +import styles from 'sass:./color-picker.scss'; /** * @since 2.0 diff --git a/src/components/details/details.ts b/src/components/details/details.ts index ed260014c..999184294 100644 --- a/src/components/details/details.ts +++ b/src/components/details/details.ts @@ -2,8 +2,8 @@ import { LitElement, html, unsafeCSS } from 'lit'; import { customElement, property, query } from 'lit/decorators'; import { classMap } from 'lit-html/directives/class-map'; import { event, EventEmitter, watch } from '../../internal/decorators'; -import styles from 'sass:./details.scss'; import { focusVisible } from '../../internal/focus-visible'; +import styles from 'sass:./details.scss'; let id = 0; diff --git a/src/components/dropdown/dropdown.ts b/src/components/dropdown/dropdown.ts index 02e04e28a..64ae62231 100644 --- a/src/components/dropdown/dropdown.ts +++ b/src/components/dropdown/dropdown.ts @@ -2,11 +2,12 @@ import { LitElement, html, unsafeCSS } from 'lit'; import { customElement, property, query } from 'lit/decorators'; import { classMap } from 'lit-html/directives/class-map'; import { event, EventEmitter, watch } from '../../internal/decorators'; -import styles from 'sass:./dropdown.scss'; -import { SlMenu, SlMenuItem } from '../../shoelace'; import { scrollIntoView } from '../../internal/scroll'; import { getNearestTabbableElement } from '../../internal/tabbable'; import Popover from '../../internal/popover'; +import SlMenu from '../menu/menu'; +import SlMenuItem from '../menu-item/menu-item'; +import styles from 'sass:./dropdown.scss'; let id = 0; diff --git a/src/components/form/form.ts b/src/components/form/form.ts index 3f0f63c7b..81de9187f 100644 --- a/src/components/form/form.ts +++ b/src/components/form/form.ts @@ -1,18 +1,16 @@ import { LitElement, html, unsafeCSS } from 'lit'; import { customElement, property, query } from 'lit/decorators'; import { event, EventEmitter } from '../../internal/decorators'; +import SlButton from '../button/button'; +import SlCheckbox from '../checkbox/checkbox'; +import SlColorPicker from '../color-picker/color-picker'; +import SlInput from '../input/input'; +import SlRadio from '../radio/radio'; +import SlRange from '../range/range'; +import SlSelect from '../select/select'; +import SlSwitch from '../switch/switch'; +import SlTextarea from '../textarea/textarea'; import styles from 'sass:./form.scss'; -import { - SlButton, - SlCheckbox, - SlColorPicker, - SlInput, - SlRadio, - SlRange, - SlSelect, - SlSwitch, - SlTextarea -} from '../../shoelace'; interface FormControl { tag: string; diff --git a/src/components/icon-button/icon-button.ts b/src/components/icon-button/icon-button.ts index d0e8cbd59..4f40099c2 100644 --- a/src/components/icon-button/icon-button.ts +++ b/src/components/icon-button/icon-button.ts @@ -2,8 +2,8 @@ import { LitElement, html, unsafeCSS } from 'lit'; import { customElement, property, query } from 'lit/decorators'; import { classMap } from 'lit-html/directives/class-map'; import { ifDefined } from 'lit-html/directives/if-defined'; -import styles from 'sass:./icon-button.scss'; import { focusVisible } from '../../internal/focus-visible'; +import styles from 'sass:./icon-button.scss'; /** * @since 2.0 diff --git a/src/components/icon/icon.ts b/src/components/icon/icon.ts index 89f08d40c..e9aed72f6 100644 --- a/src/components/icon/icon.ts +++ b/src/components/icon/icon.ts @@ -2,9 +2,9 @@ import { LitElement, html, unsafeCSS } from 'lit'; import { customElement, property, state } from 'lit/decorators'; import { unsafeSVG } from 'lit-html/directives/unsafe-svg'; import { event, EventEmitter, watch } from '../../internal/decorators'; -import styles from 'sass:./icon.scss'; import { getIconLibrary, watchIcon, unwatchIcon } from './library'; import { requestIcon } from './request'; +import styles from 'sass:./icon.scss'; const parser = new DOMParser(); diff --git a/src/components/icon/library.ts b/src/components/icon/library.ts index 6dbaa70d8..9fc111d94 100644 --- a/src/components/icon/library.ts +++ b/src/components/icon/library.ts @@ -1,4 +1,4 @@ -import { SlIcon } from '../../shoelace'; +import SlIcon from '../icon/icon'; import defaultLibrary from './library.default'; import systemLibrary from './library.system'; diff --git a/src/components/image-comparer/image-comparer.ts b/src/components/image-comparer/image-comparer.ts index 00fcc6d21..a586de751 100644 --- a/src/components/image-comparer/image-comparer.ts +++ b/src/components/image-comparer/image-comparer.ts @@ -2,8 +2,8 @@ import { LitElement, html, unsafeCSS } from 'lit'; import { customElement, property, query } from 'lit/decorators'; import { styleMap } from 'lit-html/directives/style-map'; import { event, EventEmitter, watch } from '../../internal/decorators'; -import styles from 'sass:./image-comparer.scss'; import { clamp } from '../../internal/math'; +import styles from 'sass:./image-comparer.scss'; /** * @since 2.0 diff --git a/src/components/include/include.ts b/src/components/include/include.ts index 6fe9e405d..ecca8c755 100644 --- a/src/components/include/include.ts +++ b/src/components/include/include.ts @@ -1,8 +1,8 @@ import { LitElement, html, unsafeCSS } from 'lit'; import { customElement, property } from 'lit/decorators'; import { event, EventEmitter, watch } from '../../internal/decorators'; -import styles from 'sass:./include.scss'; import { requestInclude } from './request'; +import styles from 'sass:./include.scss'; /** * @since 2.0 diff --git a/src/components/input/input.ts b/src/components/input/input.ts index 5474a032b..e452a9ad4 100644 --- a/src/components/input/input.ts +++ b/src/components/input/input.ts @@ -3,9 +3,9 @@ import { customElement, property, query, state } from 'lit/decorators'; import { ifDefined } from 'lit-html/directives/if-defined'; import { classMap } from 'lit-html/directives/class-map'; import { event, EventEmitter, watch } from '../../internal/decorators'; -import styles from 'sass:./input.scss'; import { getLabelledBy, renderFormControl } from '../../internal/form-control'; import { hasSlot } from '../../internal/slot'; +import styles from 'sass:./input.scss'; let id = 0; diff --git a/src/components/menu/menu.ts b/src/components/menu/menu.ts index d0b505fd3..04d786f3f 100644 --- a/src/components/menu/menu.ts +++ b/src/components/menu/menu.ts @@ -1,9 +1,9 @@ import { LitElement, html, unsafeCSS } from 'lit'; import { customElement, query } from 'lit/decorators'; import { event, EventEmitter } from '../../internal/decorators'; -import styles from 'sass:./menu.scss'; -import { SlMenuItem } from '../../shoelace'; import { getTextContent } from '../../internal/slot'; +import SlMenuItem from '../menu-item/menu-item'; +import styles from 'sass:./menu.scss'; /** * @since 2.0 diff --git a/src/components/range/range.ts b/src/components/range/range.ts index 1127f937b..20718b051 100644 --- a/src/components/range/range.ts +++ b/src/components/range/range.ts @@ -3,9 +3,9 @@ import { customElement, property, query, state } from 'lit/decorators'; import { classMap } from 'lit-html/directives/class-map'; import { ifDefined } from 'lit-html/directives/if-defined'; import { event, EventEmitter, watch } from '../../internal/decorators'; -import styles from 'sass:./range.scss'; import { getLabelledBy, renderFormControl } from '../../internal/form-control'; import { hasSlot } from '../../internal/slot'; +import styles from 'sass:./range.scss'; let id = 0; diff --git a/src/components/rating/rating.ts b/src/components/rating/rating.ts index 4f2c4c219..f65a684ba 100644 --- a/src/components/rating/rating.ts +++ b/src/components/rating/rating.ts @@ -4,9 +4,9 @@ import { classMap } from 'lit-html/directives/class-map'; import { styleMap } from 'lit-html/directives/style-map'; import { unsafeHTML } from 'lit-html/directives/unsafe-html'; import { event, EventEmitter, watch } from '../../internal/decorators'; -import styles from 'sass:./rating.scss'; import { focusVisible } from '../../internal/focus-visible'; import { clamp } from '../../internal/math'; +import styles from 'sass:./rating.scss'; /** * @since 2.0 diff --git a/src/components/responsive-embed/responsive-embed.ts b/src/components/responsive-embed/responsive-embed.ts index 9ecf97bb8..8321a5b83 100644 --- a/src/components/responsive-embed/responsive-embed.ts +++ b/src/components/responsive-embed/responsive-embed.ts @@ -1,7 +1,7 @@ import { LitElement, html, unsafeCSS } from 'lit'; import { customElement, property, query } from 'lit/decorators'; -import styles from 'sass:./responsive-embed.scss'; import { watch } from '../../internal/decorators'; +import styles from 'sass:./responsive-embed.scss'; /** * @since 2.0 diff --git a/src/components/select/select.ts b/src/components/select/select.ts index f7f64b003..bec0e85fb 100644 --- a/src/components/select/select.ts +++ b/src/components/select/select.ts @@ -3,11 +3,14 @@ import { customElement, property, query, state } from 'lit/decorators'; import { classMap } from 'lit-html/directives/class-map'; import { ifDefined } from 'lit-html/directives/if-defined'; import { event, EventEmitter, watch } from '../../internal/decorators'; -import styles from 'sass:./select.scss'; -import { SlDropdown, SlIconButton, SlMenu, SlMenuItem } from '../../shoelace'; import { getLabelledBy, renderFormControl } from '../../internal/form-control'; import { getTextContent } from '../../internal/slot'; import { hasSlot } from '../../internal/slot'; +import SlDropdown from '../dropdown/dropdown'; +import SlIconButton from '../icon-button/icon-button'; +import SlMenu from '../menu/menu'; +import SlMenuItem from '../menu-item/menu-item'; +import styles from 'sass:./select.scss'; let id = 0; diff --git a/src/components/tab-group/tab-group.ts b/src/components/tab-group/tab-group.ts index 2dcbe32e2..fd222d1ec 100644 --- a/src/components/tab-group/tab-group.ts +++ b/src/components/tab-group/tab-group.ts @@ -2,11 +2,12 @@ import { LitElement, html, unsafeCSS } from 'lit'; import { customElement, property, query, state } from 'lit/decorators'; import { classMap } from 'lit-html/directives/class-map'; import { event, EventEmitter, watch } from '../../internal/decorators'; -import styles from 'sass:./tab-group.scss'; -import { SlTab, SlTabPanel } from '../../shoelace'; import { focusVisible } from '../../internal/focus-visible'; import { getOffset } from '../../internal/offset'; import { scrollIntoView } from '../../internal/scroll'; +import SlTab from '../tab/tab'; +import SlTabPanel from '../tab-panel/tab-panel'; +import styles from 'sass:./tab-group.scss'; /** * @since 2.0 diff --git a/src/components/textarea/textarea.ts b/src/components/textarea/textarea.ts index b0aee8062..1e55404b7 100644 --- a/src/components/textarea/textarea.ts +++ b/src/components/textarea/textarea.ts @@ -3,9 +3,9 @@ import { customElement, property, query, state } from 'lit/decorators'; import { classMap } from 'lit-html/directives/class-map'; import { ifDefined } from 'lit-html/directives/if-defined'; import { event, EventEmitter, watch } from '../../internal/decorators'; -import styles from 'sass:./textarea.scss'; import { getLabelledBy, renderFormControl } from '../../internal/form-control'; import { hasSlot } from '../../internal/slot'; +import styles from 'sass:./textarea.scss'; let id = 0; diff --git a/src/components/tooltip/tooltip.ts b/src/components/tooltip/tooltip.ts index 37f4b3703..26dbc5c6f 100644 --- a/src/components/tooltip/tooltip.ts +++ b/src/components/tooltip/tooltip.ts @@ -2,8 +2,8 @@ import { LitElement, html, unsafeCSS } from 'lit'; import { customElement, property, query } from 'lit/decorators'; import { classMap } from 'lit-html/directives/class-map'; import { event, EventEmitter, watch } from '../../internal/decorators'; -import styles from 'sass:./tooltip.scss'; import Popover from '../../internal/popover'; +import styles from 'sass:./tooltip.scss'; let id = 0;