bard-attachment_field 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/app/assets/javascripts/input-attachment.js +15 -8
- data/input-attachment/package.json +1 -1
- data/lib/bard/attachment_field/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6bef7d86b4bd8938fe4944c96dde471a868af65c72817f254bad2ef989840eb3
|
|
4
|
+
data.tar.gz: b40d5ad52b14aa85e4a695dbc7f2aaa58cf2ae6d75b11860100a7818805a1e51
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8907713c89cfab1718f7a812a23c49b604abe65e4a613669760f63d8a22790ffaed0ac19af0682262237a9557d3c45221f7c5f4ede50255cbec48564e412418f
|
|
7
|
+
data.tar.gz: cf825d567f49628992b93247ac2668b6adf35204dda72c0aa1701fe537bf247d9214bfb14d688e64d2e4593e70b4720dc449d3a345c1d4451ccaf62b48243395
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.6.1] - 2026-06-24
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
- Bump `@botandrose/progress-bar` to 0.6.1, which moves the `progressbar` role
|
|
8
|
+
off the host onto the inner fill/ring and names it from its slotted content.
|
|
9
|
+
This resolves the `aria-progressbar-name` and `nested-interactive` axe
|
|
10
|
+
violations on `<attachment-file>`, whose download link is slotted as the
|
|
11
|
+
progress bar's content.
|
|
12
|
+
|
|
3
13
|
## [0.6.0] - 2026-06-11
|
|
4
14
|
|
|
5
15
|
### Features
|
|
@@ -4808,11 +4808,14 @@ var t = class extends HTMLElement {
|
|
|
4808
4808
|
super(), this.attachShadow({ mode: "open" }), this._percent = null, this._renderedMode = null, this._rateTimer = null;
|
|
4809
4809
|
}
|
|
4810
4810
|
connectedCallback() {
|
|
4811
|
-
this.render(), this.
|
|
4811
|
+
this.render(), this.updateBar(), this._syncTicker();
|
|
4812
4812
|
}
|
|
4813
4813
|
disconnectedCallback() {
|
|
4814
4814
|
this._stopTicker();
|
|
4815
4815
|
}
|
|
4816
|
+
get _progressbarEl() {
|
|
4817
|
+
return this.shadowRoot.querySelector("circular" === this.mode ? ".ring" : ".bar");
|
|
4818
|
+
}
|
|
4816
4819
|
get percent() {
|
|
4817
4820
|
return this._percent;
|
|
4818
4821
|
}
|
|
@@ -4849,13 +4852,14 @@ var t = class extends HTMLElement {
|
|
|
4849
4852
|
}
|
|
4850
4853
|
updateBar() {
|
|
4851
4854
|
if ("circular" === this.mode) {
|
|
4852
|
-
const
|
|
4853
|
-
|
|
4855
|
+
const r5 = this.shadowRoot?.querySelector(".progress-ring");
|
|
4856
|
+
r5 && (r5.style.strokeDashoffset = this.indeterminate ? "" : String(100 * (1 - this._percent / 100)));
|
|
4854
4857
|
} else {
|
|
4855
|
-
const
|
|
4856
|
-
|
|
4858
|
+
const r5 = this.shadowRoot?.querySelector(".bar");
|
|
4859
|
+
r5 && (r5.style.width = this.indeterminate ? "" : `${this._percent}%`);
|
|
4857
4860
|
}
|
|
4858
|
-
|
|
4861
|
+
const r4 = this._progressbarEl;
|
|
4862
|
+
r4 && (this.indeterminate ? r4.removeAttribute("aria-valuenow") : r4.setAttribute("aria-valuenow", String(this._percent)));
|
|
4859
4863
|
}
|
|
4860
4864
|
_syncTicker() {
|
|
4861
4865
|
const r4 = Number(this.getAttribute("rate")), n3 = this.isConnected && !this.indeterminate && Number.isFinite(r4) && 0 !== r4;
|
|
@@ -4870,7 +4874,8 @@ var t = class extends HTMLElement {
|
|
|
4870
4874
|
}
|
|
4871
4875
|
render() {
|
|
4872
4876
|
const n3 = this.mode;
|
|
4873
|
-
|
|
4877
|
+
if (this._renderedMode === n3) return;
|
|
4878
|
+
this._renderedMode = n3, this.shadowRoot.adoptedStyleSheets = [(r || (r = new CSSStyleSheet(), r.replaceSync(`
|
|
4874
4879
|
:host {
|
|
4875
4880
|
--progress-color: #2E7D32;
|
|
4876
4881
|
--error-color: #7a242f;
|
|
@@ -5012,7 +5017,9 @@ var t = class extends HTMLElement {
|
|
|
5012
5017
|
:host([error]) .progress-ring { display: none; }
|
|
5013
5018
|
:host([error]) .ring { animation: none; }
|
|
5014
5019
|
:host([error]) .error-mark { display: block; }
|
|
5015
|
-
`)), r)], this.shadowRoot.innerHTML = "circular" === n3 ? '\n <div class="circular">\n <svg class="ring" viewBox="0 0 100 100">\n <circle class="track" cx="50" cy="50" r="40"></circle>\n <circle class="progress-ring" cx="50" cy="50" r="40" pathLength="100"></circle>\n <path class="error-mark" d="M37 37 L63 63 M63 37 L37 63"></path>\n </svg>\n <span class="label"><slot></slot></span>\n </div>\n' : '\n <div class="bar"></div>\n <div class="text"><slot></slot></div>\n'
|
|
5020
|
+
`)), r)], this.shadowRoot.innerHTML = "circular" === n3 ? '\n <div class="circular">\n <svg class="ring" viewBox="0 0 100 100">\n <circle class="track" cx="50" cy="50" r="40"></circle>\n <circle class="progress-ring" cx="50" cy="50" r="40" pathLength="100"></circle>\n <path class="error-mark" d="M37 37 L63 63 M63 37 L37 63"></path>\n </svg>\n <span class="label" id="label"><slot></slot></span>\n </div>\n' : '\n <div class="bar"></div>\n <div class="text" id="label"><slot></slot></div>\n';
|
|
5021
|
+
const e3 = this._progressbarEl;
|
|
5022
|
+
e3.setAttribute("role", "progressbar"), e3.setAttribute("aria-valuemin", "0"), e3.setAttribute("aria-valuemax", "100"), e3.setAttribute("aria-labelledby", "label");
|
|
5016
5023
|
}
|
|
5017
5024
|
};
|
|
5018
5025
|
customElements.get("progress-bar") || customElements.define("progress-bar", t);
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bard-attachment_field
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Micah Geisel
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-06-
|
|
11
|
+
date: 2026-06-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activestorage
|