diff --git a/package.json b/package.json index 56e3297..d94ad07 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mhmo91/schmancy", - "version": "0.0.10", + "version": "0.0.11", "description": "UI library build with web components", "main": "./dist/index.js", "repository": { diff --git a/src/index.ts b/src/index.ts index 206149a..0b4a05e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,18 +1,18 @@ -export * from './autocomplete'; -export * from './busy'; -export * from './button'; -export * from './checkbox'; -export * from './form'; -export * from './input'; -export * from './layout'; -export * from './menu'; -export * from './mixin'; -export * from './notification'; -export * from './option'; -export * from './paper'; -export * from './radio-group'; -export * from './sheet'; -export * from './table'; -export * from './tabs'; -export * from './tree'; -export * from './typography'; +export * from './autocomplete' +export * from './busy' +export * from './button' +export * from './checkbox' +export * from './form' +export * from './input' +export * from './layout' +export * from './menu' +export * from './mixin' +export * from './notification' +export * from './option' +export * from './paper' +export * from './radio-group' +export * from './sheet' +export * from './table' +export * from './tabs' +export * from './tree' +export * from './typography' diff --git a/src/sheet/index.ts b/src/sheet/index.ts index 39725e6..458ad83 100644 --- a/src/sheet/index.ts +++ b/src/sheet/index.ts @@ -1,4 +1,4 @@ -export * from './sheet' -export * from './sheet-content' -export * from './sheet.service' -export * from './hook' +export * from './hook' +export * from './sheet-content' +export * from './sheet.service' +export * from './sheet' diff --git a/src/sheet/sheet.service.ts b/src/sheet/sheet.service.ts index f8f76de..dbf2154 100644 --- a/src/sheet/sheet.service.ts +++ b/src/sheet/sheet.service.ts @@ -171,5 +171,4 @@ class BottomSheetService { // sheet?.remove() } } -const sheet = new BottomSheetService() -export default sheet +export const sheet = new BottomSheetService() diff --git a/src/sheet/sheet.ts b/src/sheet/sheet.ts index 2080f49..49d9248 100644 --- a/src/sheet/sheet.ts +++ b/src/sheet/sheet.ts @@ -5,12 +5,7 @@ import { classMap } from 'lit/directives/class-map.js' import { fromEvent, merge, takeUntil, tap } from 'rxjs' import { hook } from './hook' import style from './sheet.scss?inline' -import bottomsheetService, { - HereMorty, - SchmancySheetPosition, - WhereAreYouRicky, - WhereAreYouRickyEvent, -} from './sheet.service' +import { HereMorty, SchmancySheetPosition, WhereAreYouRicky, WhereAreYouRickyEvent, sheet } from './sheet.service' @customElement('schmancy-sheet') export default class SchmancySheet extends TailwindElement(style) { @@ -59,7 +54,7 @@ export default class SchmancySheet extends TailwindElement(style) { const isSheetElementFocused = this.sheet?.contains(event.target as Node) && document.activeElement === event.target if (event.key === 'Escape' && !isSheetElementFocused) { - bottomsheetService.dismiss(this.uid) + sheet.dismiss(this.uid) } }), ), @@ -157,7 +152,7 @@ export default class SchmancySheet extends TailwindElement(style) {