Skip to content

Commit

Permalink
Merge pull request #18 from Applelo/dev
Browse files Browse the repository at this point in the history
Version 0.7.1
  • Loading branch information
Applelo authored Oct 26, 2023
2 parents 817ccea + 579605c commit 83d5b7b
Show file tree
Hide file tree
Showing 33 changed files with 1,850 additions and 1,481 deletions.
4 changes: 0 additions & 4 deletions .eslintrc

This file was deleted.

3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
- name: Install
run: pnpm install

- name: Playwright Install
run: npx playwright install

- name: Build
run: pnpm build

Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import antfu from '@antfu/eslint-config'

export default antfu()
23 changes: 13 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@compotes/root",
"version": "0.7.0",
"type": "module",
"version": "0.7.1",
"private": "true",
"packageManager": "[email protected]",
"description": "Components library focused on accessibility/customization",
Expand Down Expand Up @@ -32,21 +33,23 @@
"build": "pnpm run -r build",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"test": "pnpm run test:types",
"test": "pnpm run test:types && pnpm run test:vitest",
"test:vitest": "pnpm run -r test:vitest",
"test:types": "pnpm run -r test:types",
"prepublishOnly": "pnpm build",
"docs": "vitepress dev docs",
"docs:build": "vitepress build docs",
"docs:serve": "vitepress serve docs"
},
"devDependencies": {
"@antfu/eslint-config": "^0.39.5",
"eslint": "^8.43.0",
"typescript": "^5.0.4",
"vite": "^4.3.9",
"vitepress": "1.0.0-beta.3",
"vitest": "^0.32.2",
"vue": "^3.3.4",
"vue-tsc": "^1.8.2"
"@antfu/eslint-config": "1.0.0-beta.28",
"eslint": "^8.52.0",
"playwright": "^1.39.0",
"typescript": "^5.2.2",
"vite": "^4.5.0",
"vitepress": "1.0.0-rc.24",
"vitest": "^0.34.6",
"vue": "^3.3.6",
"vue-tsc": "^1.8.20"
}
}
24 changes: 0 additions & 24 deletions packages/core/demo/.gitignore

This file was deleted.

136 changes: 0 additions & 136 deletions packages/core/demo/index.html

This file was deleted.

15 changes: 0 additions & 15 deletions packages/core/demo/package.json

This file was deleted.

26 changes: 0 additions & 26 deletions packages/core/demo/src/main.ts

This file was deleted.

30 changes: 0 additions & 30 deletions packages/core/demo/src/styles.css

This file was deleted.

1 change: 0 additions & 1 deletion packages/core/demo/src/vite-env.d.ts

This file was deleted.

19 changes: 0 additions & 19 deletions packages/core/demo/tsconfig.json

This file was deleted.

15 changes: 8 additions & 7 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "compotes",
"type": "module",
"version": "0.7.0",
"packageManager": "pnpm@8.6.0",
"version": "0.7.1",
"packageManager": "pnpm@8.9.2",
"description": "Components library focused on accessibility/customization",
"author": "Applelo",
"license": "MIT",
Expand All @@ -24,8 +24,8 @@
],
"exports": {
".": {
"require": "./dist/compotes.umd.cjs",
"import": "./dist/compotes.js"
"import": "./dist/compotes.js",
"require": "./dist/compotes.umd.cjs"
},
"./css": "./dist/style.css",
"./css/style.css": "./dist/style.css",
Expand All @@ -46,15 +46,16 @@
"scripts": {
"dev": "vite build --watch",
"build": "vite build",
"test:vitest": "vitest",
"test:types": "tsc --noEmit && vue-tsc --noEmit",
"prepublishOnly": "pnpm build"
},
"dependencies": {
"tabbable": "^6.2.0"
},
"devDependencies": {
"typescript": "^5.0.4",
"vite": "^4.3.9",
"vite-plugin-dts": "^2.3.0"
"typescript": "^5.2.2",
"vite": "^4.5.0",
"vite-plugin-dts": "^3.6.1"
}
}
6 changes: 3 additions & 3 deletions packages/core/src/components/_parent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ export interface ParentEvent {
}

export default abstract class Parent {
protected name: string | undefined = undefined
protected name = ''
public el: HTMLElement
public opts: ParentOptions
protected events: ParentEvent[] = []

constructor(el: HTMLElement | string, options: ParentOptions) {
constructor(el: HTMLElement | string, options: ParentOptions = {}) {
const checkEl = typeof el === 'string' ? document.querySelector<HTMLElement>(el) : el
if (!checkEl)
throw this.error('The element/selector provided cannot be found.')
Expand All @@ -55,7 +55,7 @@ export default abstract class Parent {
/**
* Init the component
*/
protected init() {
public init() {
this.emitEvent('init')
if (typeof this.opts.initAccessibilityAttrs === 'undefined' || this.opts.initAccessibilityAttrs)
this.initAccessibilityAttrs()
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/collapse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default class Collapse extends Parent {
clearTimeout(this.timeout)
this.emitEvent(this.expanded ? 'show' : 'hide')

this.timeout = setTimeout(() => {
this.timeout = window.setTimeout(() => {
this.el.classList.remove('c-collapse--collapsing')
this.collapsing = false
this.el.style.height = ''
Expand Down
Loading

0 comments on commit 83d5b7b

Please sign in to comment.