diff --git a/.changeset/fix-docs-links-and-vector-map.md b/.changeset/fix-docs-links-and-vector-map.md new file mode 100644 index 000000000..f65308b37 --- /dev/null +++ b/.changeset/fix-docs-links-and-vector-map.md @@ -0,0 +1,5 @@ +--- +"@tabler/docs": patch +--- + +Fixed the docs logo link name, dead example links in the navbar and offcanvas pages, and the vector map error on its plugin page. diff --git a/.changeset/fix-preview-markup-a11y.md b/.changeset/fix-preview-markup-a11y.md new file mode 100644 index 000000000..05abe1659 --- /dev/null +++ b/.changeset/fix-preview-markup-a11y.md @@ -0,0 +1,5 @@ +--- +"@tabler/preview": patch +--- + +Fixed the marketing footer layout, timeline social icons, missing `alt` and `aria-label` attributes and invalid nesting in demos. diff --git a/.changeset/fix-scrollspy-numeric-ids.md b/.changeset/fix-scrollspy-numeric-ids.md new file mode 100644 index 000000000..9cf042bc0 --- /dev/null +++ b/.changeset/fix-scrollspy-numeric-ids.md @@ -0,0 +1,5 @@ +--- +"@tabler/core": patch +--- + +Fixed ScrollSpy throwing on target ids that start with a digit, such as headings like `1. Setup`. diff --git a/core/js/src/bootstrap/scrollspy.ts b/core/js/src/bootstrap/scrollspy.ts index f4f1dc591..33c530f2a 100644 --- a/core/js/src/bootstrap/scrollspy.ts +++ b/core/js/src/bootstrap/scrollspy.ts @@ -8,7 +8,7 @@ import BaseComponent from './base-component' import EventHandler from './dom/event-handler' import SelectorEngine from './dom/selector-engine' -import { getElement, isDisabled, isVisible } from './util/index' +import { getElement, isDisabled, isVisible, parseSelector } from './util/index' import type { ComponentConfig, ComponentConfigType } from './types' const NAME = 'scrollspy' @@ -198,7 +198,7 @@ class ScrollSpy extends BaseComponent { continue } - const observableSection = SelectorEngine.findOne(decodeURI((anchor as HTMLAnchorElement).hash), this._element) + const observableSection = SelectorEngine.findOne(parseSelector(decodeURI((anchor as HTMLAnchorElement).hash)), this._element) if (isVisible(observableSection!)) { this._targetLinks.set(decodeURI((anchor as HTMLAnchorElement).hash), anchor) diff --git a/core/js/tests/unit/scrollspy.spec.ts b/core/js/tests/unit/scrollspy.spec.ts index 2c67a57d9..4668695a7 100644 --- a/core/js/tests/unit/scrollspy.spec.ts +++ b/core/js/tests/unit/scrollspy.spec.ts @@ -624,4 +624,11 @@ describe('ScrollSpy', () => { expect(ScrollSpy.getInstance(scrollSpyEl)).not.toBeNull() }) }) + describe('target ids', () => { + it('should accept anchors whose target id starts with a digit', () => { + fixtureEl.innerHTML = ['', '
', '
test
', '
'].join('') + + expect(() => new ScrollSpy('#content', { target: '#navigation' })).not.toThrow() + }) + }) }) diff --git a/docs/components/DocsNavbar.astro b/docs/components/DocsNavbar.astro index 324fc928f..96e4c0635 100644 --- a/docs/components/DocsNavbar.astro +++ b/docs/components/DocsNavbar.astro @@ -17,7 +17,7 @@ const changelogUrl = 'https://tabler.io/changelog' - + v{site.version} diff --git a/docs/content/ui/components/avatar.mdx b/docs/content/ui/components/avatar.mdx index bd4a2df1f..e75e97ba1 100644 --- a/docs/content/ui/components/avatar.mdx +++ b/docs/content/ui/components/avatar.mdx @@ -204,9 +204,9 @@ Put an icon inside to show the action. The variant is often used as a link or a - - - + + + @@ -216,11 +216,11 @@ The upload avatar uses the same size classes as a normal avatar, from `avatar-xx - - - - - + + + + + diff --git a/docs/content/ui/components/button.mdx b/docs/content/ui/components/button.mdx index 36242b3a7..aa8f21a5f 100644 --- a/docs/content/ui/components/button.mdx +++ b/docs/content/ui/components/button.mdx @@ -592,10 +592,10 @@ Use the `.btn-actions` container to group multiple action buttons together. This
- - - - + + + +
diff --git a/docs/content/ui/components/card.mdx b/docs/content/ui/components/card.mdx index a85d18e40..b3f40052d 100644 --- a/docs/content/ui/components/card.mdx +++ b/docs/content/ui/components/card.mdx @@ -151,7 +151,7 @@ Add an image to your blog post card to make it eye-catching. You can do it by ad
3 days ago
- +
@@ -203,7 +203,7 @@ You can also put the image beside the text instead of above it. Use a `row row-0
3 days ago
- +
diff --git a/docs/content/ui/components/list-group.mdx b/docs/content/ui/components/list-group.mdx index 46fd44814..f98eb2bfb 100644 --- a/docs/content/ui/components/list-group.mdx +++ b/docs/content/ui/components/list-group.mdx @@ -124,7 +124,7 @@ Add `list-group-hoverable` to the container to highlight the row under the point
Change deprecated html tags
- +
@@ -132,7 +132,7 @@ Add `list-group-hoverable` to the container to highlight the row under the point
Fix spacing in the navbar
- +
@@ -248,7 +248,7 @@ This pattern joins several variants: a flush list inside a card, hoverable rows,
The last deploy did not finish
- +
@@ -260,7 +260,7 @@ This pattern joins several variants: a flush list inside a card, hoverable rows,
Alice replied in the design thread
- +
diff --git a/docs/content/ui/components/offcanvas.mdx b/docs/content/ui/components/offcanvas.mdx index 2b8cc03da..e47949f67 100644 --- a/docs/content/ui/components/offcanvas.mdx +++ b/docs/content/ui/components/offcanvas.mdx @@ -68,8 +68,8 @@ Add `offcanvas-narrow` for a panel thinner than the default. It suits a short li The offcanvas component is used to display a cookies banner. It is a great way to inform users about the use of cookies on your website and to get their consent. -
Do you like cookies? 🍪 We use cookies to ensure you get the best experience on our website. Learn more
`}> - +
Do you like cookies? 🍪 We use cookies to ensure you get the best experience on our website. Learn more
`}> +
## Accessibility diff --git a/docs/content/ui/layout/navbars.mdx b/docs/content/ui/layout/navbars.mdx index af57dc179..09cbe1c33 100644 --- a/docs/content/ui/layout/navbars.mdx +++ b/docs/content/ui/layout/navbars.mdx @@ -69,11 +69,11 @@ The navbar can contain links, buttons, and other elements. You can customize the diff --git a/preview/pages/badges.astro b/preview/pages/badges.astro index 5fc56e320..70f649a36 100644 --- a/preview/pages/badges.astro +++ b/preview/pages/badges.astro @@ -92,7 +92,7 @@ const sizes = ['sm', 'md', 'lg'] - diff --git a/preview/pages/buttons.astro b/preview/pages/buttons.astro index 62ab572df..ad83c0d1e 100644 --- a/preview/pages/buttons.astro +++ b/preview/pages/buttons.astro @@ -1,4 +1,5 @@ --- +import { ucFirst } from '@shared/lib/string-format' import DefaultLayout from '@shared/layouts/DefaultLayout.astro' import Icon from '@ui/Icon.astro' import Button from '@ui/Button.astro' @@ -69,7 +70,7 @@ const sizes = ['sm', 'md', 'lg', 'xl'] as const
{ actions.map((action) => ( - + )) diff --git a/preview/pages/card-actions.astro b/preview/pages/card-actions.astro index c884fa325..41102e2e0 100644 --- a/preview/pages/card-actions.astro +++ b/preview/pages/card-actions.astro @@ -130,7 +130,7 @@ const person3 = requireIndex(people, 3)