Skip to content

Commit

Permalink
fix: refactor - remove unnecessary getters and setters
Browse files Browse the repository at this point in the history
  • Loading branch information
rossrobino committed Jun 4, 2024
1 parent 48c98b1 commit ca7cd72
Show file tree
Hide file tree
Showing 33 changed files with 299 additions and 345 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "drab",
"description": "A headless custom element library",
"version": "5.4.1",
"version": "5.4.2",
"homepage": "https://drab.robino.dev",
"license": "MIT",
"author": {
Expand Down
30 changes: 15 additions & 15 deletions src/lib/docs/classes/animate.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Animations `options` can be set:

#### Source

[src/package/animate/index.ts:39](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/animate/index.ts#L39)
[src/package/animate/index.ts:39](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/animate/index.ts#L39)

---

Expand All @@ -74,7 +74,7 @@ To clean up event listeners added to `document` when the element is removed.

#### Source

[src/package/base/index.ts:17](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L17)
[src/package/base/index.ts:17](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L17)

---

Expand All @@ -92,7 +92,7 @@ An object containing the values of each `animation-option` attribute

#### Source

[src/package/animate/index.ts:46](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/animate/index.ts#L46)
[src/package/animate/index.ts:46](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/animate/index.ts#L46)

### event

Expand Down Expand Up @@ -120,7 +120,7 @@ keyof `HTMLElementEventMap`

#### Source

[src/package/base/index.ts:30](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L30)
[src/package/base/index.ts:30](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L30)

### keyframes

Expand All @@ -132,7 +132,7 @@ keyof `HTMLElementEventMap`

#### Source

[src/package/animate/index.ts:128](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/animate/index.ts#L128)
[src/package/animate/index.ts:128](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/animate/index.ts#L128)

---

Expand Down Expand Up @@ -168,7 +168,7 @@ Animates a particular element using the web animations API.

#### Source

[src/package/animate/index.ts:76](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/animate/index.ts#L76)
[src/package/animate/index.ts:76](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/animate/index.ts#L76)

### connectedCallback()

Expand All @@ -186,7 +186,7 @@ Called when custom element is added to the page.

#### Source

[src/package/base/index.ts:155](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L155)
[src/package/base/index.ts:155](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L155)

### destroy()

Expand All @@ -204,7 +204,7 @@ Passed into `disconnectedCallback`, since `Base` needs to run `disconnectedCallb

#### Source

[src/package/base/index.ts:162](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L162)
[src/package/base/index.ts:162](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L162)

### disconnectedCallback()

Expand All @@ -222,7 +222,7 @@ Called when custom element is removed from the page.

#### Source

[src/package/base/index.ts:167](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L167)
[src/package/base/index.ts:167](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L167)

### getContent()

Expand Down Expand Up @@ -257,7 +257,7 @@ this.querySelector("[data-content]");

#### Source

[src/package/base/index.ts:55](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L55)
[src/package/base/index.ts:55](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L55)

### getTrigger()

Expand Down Expand Up @@ -285,7 +285,7 @@ this.querySelectorAll("[data-trigger]");

#### Source

[src/package/base/index.ts:42](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L42)
[src/package/base/index.ts:42](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L42)

### mount()

Expand All @@ -305,7 +305,7 @@ The reason for this is to make these elements work better with frameworks like S

#### Source

[src/package/base/index.ts:150](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L150)
[src/package/base/index.ts:150](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L150)

### safeListener()

Expand Down Expand Up @@ -340,7 +340,7 @@ element is removed from the DOM, these event listeners are cleaned up.

#### Source

[src/package/base/index.ts:118](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L118)
[src/package/base/index.ts:118](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L118)

### swapContent()

Expand Down Expand Up @@ -369,7 +369,7 @@ Wait time before swapping back

#### Source

[src/package/base/index.ts:72](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L72)
[src/package/base/index.ts:72](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L72)

### triggerListener()

Expand Down Expand Up @@ -401,4 +401,4 @@ Listener to attach to all of the `trigger` elements.

#### Source

[src/package/base/index.ts:135](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L135)
[src/package/base/index.ts:135](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L135)
24 changes: 12 additions & 12 deletions src/lib/docs/classes/base.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Each element can have multiple `trigger`s, but will only have one `content`.

#### Source

[src/package/base/index.ts:19](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L19)
[src/package/base/index.ts:19](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L19)

---

Expand All @@ -61,7 +61,7 @@ To clean up event listeners added to `document` when the element is removed.

#### Source

[src/package/base/index.ts:17](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L17)
[src/package/base/index.ts:17](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L17)

---

Expand Down Expand Up @@ -93,7 +93,7 @@ keyof `HTMLElementEventMap`

#### Source

[src/package/base/index.ts:30](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L30)
[src/package/base/index.ts:30](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L30)

---

Expand All @@ -111,7 +111,7 @@ Called when custom element is added to the page.

#### Source

[src/package/base/index.ts:155](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L155)
[src/package/base/index.ts:155](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L155)

### destroy()

Expand All @@ -125,7 +125,7 @@ Passed into `disconnectedCallback`, since `Base` needs to run `disconnectedCallb

#### Source

[src/package/base/index.ts:162](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L162)
[src/package/base/index.ts:162](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L162)

### disconnectedCallback()

Expand All @@ -139,7 +139,7 @@ Called when custom element is removed from the page.

#### Source

[src/package/base/index.ts:167](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L167)
[src/package/base/index.ts:167](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L167)

### getContent()

Expand Down Expand Up @@ -170,7 +170,7 @@ this.querySelector("[data-content]");

#### Source

[src/package/base/index.ts:55](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L55)
[src/package/base/index.ts:55](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L55)

### getTrigger()

Expand All @@ -194,7 +194,7 @@ this.querySelectorAll("[data-trigger]");

#### Source

[src/package/base/index.ts:42](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L42)
[src/package/base/index.ts:42](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L42)

### mount()

Expand All @@ -210,7 +210,7 @@ The reason for this is to make these elements work better with frameworks like S

#### Source

[src/package/base/index.ts:150](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L150)
[src/package/base/index.ts:150](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L150)

### safeListener()

Expand Down Expand Up @@ -241,7 +241,7 @@ element is removed from the DOM, these event listeners are cleaned up.

#### Source

[src/package/base/index.ts:118](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L118)
[src/package/base/index.ts:118](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L118)

### swapContent()

Expand All @@ -266,7 +266,7 @@ Wait time before swapping back

#### Source

[src/package/base/index.ts:72](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L72)
[src/package/base/index.ts:72](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L72)

### triggerListener()

Expand Down Expand Up @@ -294,4 +294,4 @@ Listener to attach to all of the `trigger` elements.

#### Source

[src/package/base/index.ts:135](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L135)
[src/package/base/index.ts:135](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L135)
28 changes: 14 additions & 14 deletions src/lib/docs/classes/breakpoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Provide alternate breakpoints by specifying `breakpoint` attributes:

#### Source

[src/package/breakpoint/index.ts:27](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/breakpoint/index.ts#L27)
[src/package/breakpoint/index.ts:27](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/breakpoint/index.ts#L27)

---

Expand All @@ -48,15 +48,15 @@ To clean up event listeners added to `document` when the element is removed.

#### Source

[src/package/base/index.ts:17](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L17)
[src/package/base/index.ts:17](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L17)

### breakpoints

> **breakpoints**: `Breakpoints`
#### Source

[src/package/breakpoint/index.ts:19](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/breakpoint/index.ts#L19)
[src/package/breakpoint/index.ts:19](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/breakpoint/index.ts#L19)

---

Expand All @@ -74,7 +74,7 @@ finds the current breakpoint

#### Source

[src/package/breakpoint/index.ts:51](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/breakpoint/index.ts#L51)
[src/package/breakpoint/index.ts:51](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/breakpoint/index.ts#L51)

### event

Expand Down Expand Up @@ -102,7 +102,7 @@ keyof `HTMLElementEventMap`

#### Source

[src/package/base/index.ts:30](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L30)
[src/package/base/index.ts:30](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L30)

---

Expand All @@ -124,7 +124,7 @@ Called when custom element is added to the page.

#### Source

[src/package/base/index.ts:155](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L155)
[src/package/base/index.ts:155](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L155)

### destroy()

Expand All @@ -142,7 +142,7 @@ Passed into `disconnectedCallback`, since `Base` needs to run `disconnectedCallb

#### Source

[src/package/base/index.ts:162](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L162)
[src/package/base/index.ts:162](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L162)

### disconnectedCallback()

Expand All @@ -160,7 +160,7 @@ Called when custom element is removed from the page.

#### Source

[src/package/base/index.ts:167](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L167)
[src/package/base/index.ts:167](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L167)

### getContent()

Expand Down Expand Up @@ -195,7 +195,7 @@ this.querySelector("[data-content]");

#### Source

[src/package/base/index.ts:55](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L55)
[src/package/base/index.ts:55](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L55)

### getTrigger()

Expand Down Expand Up @@ -223,7 +223,7 @@ this.querySelectorAll("[data-trigger]");

#### Source

[src/package/base/index.ts:42](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L42)
[src/package/base/index.ts:42](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L42)

### mount()

Expand All @@ -243,7 +243,7 @@ The reason for this is to make these elements work better with frameworks like S

#### Source

[src/package/breakpoint/index.ts:63](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/breakpoint/index.ts#L63)
[src/package/breakpoint/index.ts:63](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/breakpoint/index.ts#L63)

### safeListener()

Expand Down Expand Up @@ -278,7 +278,7 @@ element is removed from the DOM, these event listeners are cleaned up.

#### Source

[src/package/base/index.ts:118](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L118)
[src/package/base/index.ts:118](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L118)

### swapContent()

Expand Down Expand Up @@ -307,7 +307,7 @@ Wait time before swapping back

#### Source

[src/package/base/index.ts:72](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L72)
[src/package/base/index.ts:72](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L72)

### triggerListener()

Expand Down Expand Up @@ -339,4 +339,4 @@ Listener to attach to all of the `trigger` elements.

#### Source

[src/package/base/index.ts:135](https://github.com/rossrobino/components/blob/33c45b8385b046591d3902fc8e91aef56864abde/src/package/base/index.ts#L135)
[src/package/base/index.ts:135](https://github.com/rossrobino/components/blob/48c98b10e173fadbab032543d3a85f26875ed206/src/package/base/index.ts#L135)
Loading

0 comments on commit ca7cd72

Please sign in to comment.