Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.2.0 #18

Merged
merged 63 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
5e54190
Initial tabs prototype
louisescher Dec 8, 2024
ffce6fb
Add colors and initial docs for tabs component
louisescher Dec 8, 2024
c36dcef
First bits for sync & storage
louisescher Dec 8, 2024
bfe727f
Remove @fontsource-variable/onest dep
louisescher Dec 10, 2024
b4b1cd5
Update TabItem.astro
louisescher Dec 10, 2024
676c707
Actually remove the dep this time
louisescher Dec 10, 2024
23b8fdd
Update lockfile
louisescher Dec 10, 2024
a52dbf3
Add tab sync / storage
louisescher Dec 12, 2024
e6c08d0
Update docs, fix modal weirdness, add card variant, finish tabs
louisescher Dec 13, 2024
194a2bc
Update theme helper for tailwind theme compatibility
louisescher Dec 13, 2024
1825bdd
Fix theme toggle types being too complex
louisescher Dec 13, 2024
324aede
Add starlight compat to themehelper
louisescher Dec 13, 2024
6d2c446
Update lockfile
louisescher Dec 13, 2024
fceef9d
Merge branch 'main' into v0.2.0
louisescher Dec 13, 2024
de3d16c
Update JSDoc for types, update version in package.json, fix theme helper
louisescher Dec 13, 2024
efa4ffa
Try to fix lockfile?
louisescher Dec 13, 2024
184cfd8
Remove tailwind class compatibility for theme helper in favor of data…
louisescher Dec 13, 2024
c0d9fbc
Fix icon not changing color automatically
louisescher Dec 13, 2024
0940697
Actually fix lockfile
louisescher Dec 13, 2024
9c57de4
Changes to theme helper and theme toggle docs
louisescher Dec 13, 2024
33f297a
Fix again lol
louisescher Dec 13, 2024
b8e4017
Fix everything docs
TheOtterlord Dec 13, 2024
3f08741
Add missing JSDoc comments
louisescher Dec 13, 2024
12366cc
Merge branch 'v0.2.0' of https://github.com/withstudiocms/ui into v0.2.0
louisescher Dec 13, 2024
4c619d5
Fix typo
louisescher Dec 13, 2024
e9078f3
Create integration, update homepage docs, add tailwind docs
TheOtterlord Dec 13, 2024
8e8c86c
Adjusts button hover states for better accessibility
JusticeMatthew Dec 13, 2024
c5a9ec3
Adds Louis' changes
JusticeMatthew Dec 13, 2024
9428e97
Add biome on push to main
TheOtterlord Dec 13, 2024
fbe1dbe
Make buttons, selects, search selects and modals keyboard accessible
louisescher Dec 13, 2024
6691078
Merge branch 'v0.2.0' of https://github.com/withstudiocms/ui into v0.2.0
louisescher Dec 13, 2024
db21006
Fix color contrast in ec theme
TheOtterlord Dec 13, 2024
8314deb
Use correct role
TheOtterlord Dec 13, 2024
9538e74
fixes
TheOtterlord Dec 13, 2024
1c6a719
Make checkboxes, radio groups and toggles keyboard accessible
louisescher Dec 13, 2024
d0b572a
Merge branch 'v0.2.0' of https://github.com/withstudiocms/ui into v0.2.0
louisescher Dec 13, 2024
b8cfac7
Typo fix
louisescher Dec 13, 2024
69b9160
Learn to read
TheOtterlord Dec 13, 2024
a6d6af1
Fix wrong indentation
louisescher Dec 14, 2024
7b4ddc1
Merge branches 'v0.2.0' and 'v0.2.0' of https://github.com/withstudio…
louisescher Dec 14, 2024
6585d44
Add sr only labels for input/textarea
TheOtterlord Dec 15, 2024
6c14548
Fix open select with space key & reset focus index on non active navi…
TheOtterlord Dec 15, 2024
2341e34
Various accessibility improvements
louisescher Dec 15, 2024
d2ff6ee
Fix dropdown & toaster accessibility
louisescher Dec 15, 2024
ffd853b
Make tabs accessible, make image in site title not tabbable, give toa…
louisescher Dec 15, 2024
21cdca9
Fix select arrow keys & pageup/down
TheOtterlord Dec 15, 2024
91bd421
Swap out tabs on homepage for components from lib
louisescher Dec 15, 2024
865cf6a
Add aria roles to dropdown
louisescher Dec 15, 2024
f3f2715
Label theme button
TheOtterlord Dec 15, 2024
09157c8
Add role to tabs, don't blur search select when selected
louisescher Dec 15, 2024
dfc39b8
Remove old dependency, label select buttons
louisescher Dec 15, 2024
9d00555
Upgrade complete
TheOtterlord Dec 15, 2024
1de50f4
Fix remaining accessibility issues
louisescher Dec 15, 2024
1ba6f16
Add missing _top ID for header
louisescher Dec 15, 2024
36c2149
Add missing aria-label to hero section
louisescher Dec 15, 2024
958198c
Fix Radio Group and Tabs keyboard navigation
louisescher Dec 16, 2024
b1c4284
Prepare docs for 0.2.0 release
louisescher Dec 16, 2024
1ce4bc8
Add aria label to toasts
louisescher Dec 16, 2024
7669d0d
Merge branch 'main' into v0.2.0
louisescher Dec 17, 2024
43a99b7
Make all scripts bundle-able, update css, resolve global.css path & more
louisescher Dec 17, 2024
83acbde
Merge branch 'v0.2.0' of https://github.com/withstudiocms/ui into v0.2.0
louisescher Dec 17, 2024
f86137b
Remove double quotes, fix missing highlight
louisescher Dec 17, 2024
d7defc8
Remove integration import from astro config
louisescher Dec 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .changeset/brown-bobcats-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
"@studiocms/ui": minor
---

### The Accessibility Update

This version of `@studiocms/ui` includes a lot of improvements to the documentation and components. The most important changes include the move to
an integration-based system and a massive keyboard accessibility overhaul (thanks to [HiDeoo](https://github.com/HiDeoo) for the feedback on this)!

### Components

- Added a new `<Tabs />` component based on the tabs on the homepage.
- Updated the `<Card />` component to include a new "filled" style.

### Utilities

- Moved the `ThemeHelper` class to its own category in the docs.

### Accessibility

- Overhauled the keyboard accessibility on all components to make them adhere to the ARIA standards.
28 changes: 23 additions & 5 deletions docs/astro.config.mts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import starlight from '@astrojs/starlight';
import onestWoff2 from '@fontsource-variable/onest/files/onest-latin-wght-normal.woff2?url';
import ui from '@studiocms/ui'
import { defineConfig, envField } from 'astro/config';
import starlightImageZoom from 'starlight-image-zoom';
import rehypePluginKit from './src/plugins/rehypePluginKit';

// Define the Site URL
Expand Down Expand Up @@ -63,7 +63,7 @@ export default defineConfig({
defaultLocale: 'root',
locales,
social: {
github: 'https://github.com/withstudiocms/studiocms',
github: 'https://github.com/withstudiocms/ui',
discord: 'https://chat.studiocms.dev',
youtube: 'https://www.youtube.com/@StudioCMS',
'x.com': 'https://x.com/withstudiocms',
Expand Down Expand Up @@ -91,14 +91,14 @@ export default defineConfig({
tag: 'meta',
attrs: {
property: 'og:image',
content: `${site}og.jpg?v=1`,
content: `${site}og.png?v=1`,
},
},
{
tag: 'meta',
attrs: {
property: 'twitter:image',
content: `${site}og.jpg?v=1`,
content: `${site}og.png?v=1`,
},
},
{
Expand Down Expand Up @@ -159,6 +159,10 @@ export default defineConfig({
{
label: 'Installation',
link: 'docs/',
badge: {
text: 'Updated!',
variant: 'success',
}
},
{
label: 'Release Notes',
Expand All @@ -170,15 +174,29 @@ export default defineConfig({
},
],
},
{
label: 'Upgrade Guides',
autogenerate: {
directory: 'docs/upgrade-guides',
collapsed: true,
},
},
{
label: 'Components',
autogenerate: {
directory: 'docs/components',
collapsed: true,
},
},
{
label: 'Utilities',
autogenerate: {
directory: 'docs/utilities',
collapsed: true,
},
},
],
plugins: [starlightImageZoom()],
}),
// ui(),
louisescher marked this conversation as resolved.
Show resolved Hide resolved
],
});
1 change: 1 addition & 0 deletions docs/ec.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default defineEcConfig({
frames: {
editorActiveTabIndicatorBottomColor: 'var(--sl-color-accent)',
},
gutterForeground: 'rgba(166, 166, 166, 0.84)',
twoSlash: {
cursorColor: '#f8f8f2',
},
Expand Down
1 change: 0 additions & 1 deletion docs/lunaria.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export default defineConfig({
name: 'withstudiocms/ui',
rootDir: 'docs',
hosting: 'github',
// TODO: Change to 'main' this once the branch is ready to merge
branch: 'main',
},
sourceLocale: {
Expand Down
5 changes: 2 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dependencies": {
"@11ty/eleventy-fetch": "^5.0.1",
"@astrojs/check": "catalog:",
"@astrojs/starlight": "https://gitpkg.now.sh/HiDeoo/starlight/packages/starlight?hd-astro-v5",
"@astrojs/starlight": "0.30.0",
"@expressive-code/plugin-line-numbers": "^0.38.3",
"@fontsource-variable/fira-code": "^5.1.0",
"@fontsource-variable/onest": "catalog:",
Expand Down Expand Up @@ -47,8 +47,7 @@
"rehype-external-links": "^3.0.0",
"rehype-slug": "^6.0.0",
"sharp": "^0.33.5",
"starlight-image-zoom": "^0.9.0",
"starlight-package-managers": "^0.8.0",
"starlight-package-managers": "^0.8.1",
"tsm": "^2.3.0",
"typescript": "catalog:",
"unist-util-visit": "^5.0.0"
Expand Down
Binary file removed docs/public/og.jpg
Binary file not shown.
Binary file added docs/public/og.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion docs/src/assets/astro.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/assets/logo-adaptive.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/assets/swords.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions docs/src/components/PreviewCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@
type Props = {
vertical?: boolean;
gapSize?: 'sm' | 'md' | 'lg';
fullWidth?: boolean;
fullHeight?: boolean;
};

const { vertical = false, gapSize = 'md' } = Astro.props;
const { vertical = false, gapSize = 'md', fullWidth, fullHeight } = Astro.props;
---
<div class="preview-card not-content" class:list={[vertical && "vertical", gapSize]}>
<div
class="preview-card not-content"
class:list={[vertical && "vertical", gapSize]}
>
<slot />
</div>
<style>
Expand All @@ -18,6 +23,7 @@ const { vertical = false, gapSize = 'md' } = Astro.props;
align-items: center;
justify-content: center;
gap: 1rem;
flex-wrap: wrap;
}

.preview-card.vertical {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/landing/EcosystemSection.astro
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import SwordsIcon from '~/assets/swords.svg';
</p>
</div>
<div class="benefit-card">
<Icon name='user-group' width={24} height={24} />
<Icon name='user-group' width={24} height={24} aria-hidden="true" />
<h3>Community-built</h3>
<p>
StudioCMS isn't a closed-off project or organization - it is made up of Astro
Expand Down
14 changes: 8 additions & 6 deletions docs/src/components/landing/HeroSection.astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
import Icon from '@studiocms/ui/utils/Icon.astro';
import GitHubIcon from '~/components/icons/GitHubIcon.astro';
---
<section class="hero not-content">
<section class="hero not-content" aria-label="A bento grid showcasing various different components from @studiocms/ui">
<div class="checkbox">
<Checkbox
label='Checkbox'
Expand All @@ -28,6 +28,7 @@ import GitHubIcon from '~/components/icons/GitHubIcon.astro';
<div class="input">
<Input
placeholder='Input'
aria-label="Input example"
/>
</div>
<div class="toggle">
Expand Down Expand Up @@ -67,26 +68,26 @@ import GitHubIcon from '~/components/icons/GitHubIcon.astro';
/>
</div>
<div class="hero-text">
<h1>Why install another Framework just for UI?</h1>
<h1 id="_top">Why install another Framework just for UI?</h1>
<div class="hero-desc">
<p>StudioCMS UI is an Astro-native UI library.</p>
<p>All the components you need, without the bloat of React.</p>
<p>All the components you need, without the pain of React.</p>
</div>
<div class="cta-buttons">
<Button color='primary' as="a" href={'/docs/'} size='lg'>
<Icon name='book-open' slot="start-content" width={24} height={24} />
Get started
</Button>
<Button color='default' as="a" href={'https://github.com/withstudiocms/ui'} style={'color: white;'} size='lg'>
<Button color='default' as="a" href={'https://github.com/withstudiocms/ui'} size='lg'>
<GitHubIcon width={24} height={23.5} class="github-icon" slot={'start-content'} />
Star on GitHub
</Button>
</div>
</div>
<div class="theme">
<ThemeToggle>
<Icon name='moon' width={24} height={24} slot="dark" />
<Icon name='sun' width={24} height={24} slot="light" />
<Icon name='moon' width={24} height={24} slot="dark" aria-label="Switch to light mode" />
<Icon name='sun' width={24} height={24} slot="light" aria-label="Switch to dark mode" />
</ThemeToggle>
</div>
<div class="divider">
Expand Down Expand Up @@ -120,6 +121,7 @@ import GitHubIcon from '~/components/icons/GitHubIcon.astro';
fullWidth
fullHeight
placeholder={'Countless stars scattered,\nacross obsidian skies,\nfrosty breath lingers.'}
aria-label="Textarea example"
/>
</div>
<div class="toast">
Expand Down
Loading
Loading