Compare commits

..

1 Commits

Author SHA1 Message Date
Cory LaViska
4add1d374c make parts consistent; fixes #1646 2025-10-24 08:35:57 -04:00
7 changed files with 32 additions and 43 deletions

View File

@@ -12,22 +12,22 @@ export const themes = [
isPro: false, isPro: false,
fonts: { fonts: {
body: { body: {
name: 'OS Default (sans-serif)', name: 'OS Default',
css: 'ui-sans-serif, system-ui, sans-serif', css: 'ui-sans-serif, system-ui, sans-serif',
href: null, href: null,
}, },
heading: { heading: {
name: 'OS Default (sans-serif)', name: 'OS Default',
css: 'ui-sans-serif, system-ui, sans-serif', css: 'ui-sans-serif, system-ui, sans-serif',
href: null, href: null,
}, },
code: { code: {
name: 'OS Default (monospace)', name: 'OS Default',
css: 'ui-monospace, monospace', css: 'ui-monospace, monospace',
href: null, href: null,
}, },
longform: { longform: {
name: 'OS Default (serif)', name: 'OS Default',
css: 'ui-serif, serif', css: 'ui-serif, serif',
href: null, href: null,
}, },
@@ -82,7 +82,7 @@ export const themes = [
href: 'https://fonts.bunny.net/css2?family=Quicksand:wght@300..700&display=swap', href: 'https://fonts.bunny.net/css2?family=Quicksand:wght@300..700&display=swap',
}, },
code: { code: {
name: 'OS Default (monospace)', name: 'OS Default',
css: 'ui-monospace, monospace', css: 'ui-monospace, monospace',
href: null, href: null,
}, },
@@ -132,22 +132,22 @@ export const themes = [
isPro: false, isPro: false,
fonts: { fonts: {
body: { body: {
name: 'OS Default (sans-serif)', name: 'OS Default',
css: 'ui-sans-serif, system-ui, sans-serif', css: 'ui-sans-serif, system-ui, sans-serif',
href: null, href: null,
}, },
heading: { heading: {
name: 'OS Default (sans-serif)', name: 'OS Default',
css: 'ui-sans-serif, system-ui, sans-serif', css: 'ui-sans-serif, system-ui, sans-serif',
href: null, href: null,
}, },
code: { code: {
name: 'OS Default (monospace)', name: 'OS Default',
css: 'ui-monospace, monospace', css: 'ui-monospace, monospace',
href: null, href: null,
}, },
longform: { longform: {
name: 'OS Default (serif)', name: 'OS Default',
css: 'ui-serif, serif', css: 'ui-serif, serif',
href: null, href: null,
}, },
@@ -442,7 +442,7 @@ export const themes = [
href: 'https://fonts.bunny.net/css2?family=Lora:ital,wght@0,400..700;1,400..700&display=swap', href: 'https://fonts.bunny.net/css2?family=Lora:ital,wght@0,400..700;1,400..700&display=swap',
}, },
code: { code: {
name: 'OS Default (monospace)', name: 'OS Default',
css: 'ui-monospace, monospace', css: 'ui-monospace, monospace',
href: null, href: null,
}, },
@@ -562,7 +562,7 @@ export const themes = [
href: 'https://fonts.bunny.net/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap', href: 'https://fonts.bunny.net/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap',
}, },
code: { code: {
name: 'OS Default (monospace)', name: 'OS Default',
css: 'ui-monospace, monospace', css: 'ui-monospace, monospace',
href: null, href: null,
}, },
@@ -622,12 +622,12 @@ export const themes = [
href: 'https://fonts.bunny.net/css2?family=Inter:ital,wght@0,100..900;1,100..900&display=swap', href: 'https://fonts.bunny.net/css2?family=Inter:ital,wght@0,100..900;1,100..900&display=swap',
}, },
code: { code: {
name: 'OS Default (monospace)', name: 'OS Default',
css: 'ui-monospace, monospace', css: 'ui-monospace, monospace',
href: null, href: null,
}, },
longform: { longform: {
name: 'OS Default (serif)', name: 'OS Default',
css: 'ui-serif, serif', css: 'ui-serif, serif',
href: null, href: null,
}, },

View File

@@ -2,25 +2,22 @@
pre[id*='code-block-'] { pre[id*='code-block-'] {
color-scheme: dark; color-scheme: dark;
color: white; color: white;
background-color: var(--code-background, var(--wa-color-neutral-20)); background-color: var(--wa-color-neutral-20);
/* Ensures a discernible background color in dark mode /* Ensures a discernible background color in dark mode
* Useful for themes that use gray-20 as --wa-color-surface-default */ * Useful for themes that use gray-20 as --wa-color-surface-default */
.wa-dark & { .wa-dark & {
background-color: var(--code-background-dark, var(--wa-color-surface-lowered)); background-color: var(--wa-color-surface-lowered);
} }
} }
.code-comment, .code-comment,
.code-prolog, .code-prolog,
.code-doctype, .code-doctype,
.code-cdata { .code-cdata,
color: var(--code-comment, var(--wa-color-gray-70));
}
.code-operator, .code-operator,
.code-punctuation { .code-punctuation {
color: var(--code-operator, var(--wa-color-gray-70)); color: var(--wa-color-gray-70);
} }
.code-namespace { .code-namespace {
@@ -31,27 +28,24 @@ pre[id*='code-block-'] {
.code-keyword, .code-keyword,
.code-tag, .code-tag,
.code-url { .code-url {
color: var(--code-keyword, var(--wa-color-indigo-70)); color: var(--wa-color-indigo-70);
} }
.code-symbol, .code-symbol,
.code-deleted, .code-deleted,
.code-important { .code-important {
color: var(--code-error, var(--wa-color-red-70)); color: var(--wa-color-red-70);
}
.code-string,
.code-char,
.code-constant {
color: var(--code-string, var(--wa-color-green-70));
} }
.code-boolean, .code-boolean,
.code-constant,
.code-selector, .code-selector,
.code-attr-name, .code-attr-name,
.code-string,
.code-char,
.code-builtin, .code-builtin,
.code-inserted { .code-inserted {
color: var(--code-literal, var(--wa-color-green-70)); color: var(--wa-color-green-70);
} }
.code-atrule, .code-atrule,
@@ -61,7 +55,7 @@ pre[id*='code-block-'] {
.code-function, .code-function,
.code-class-name, .code-class-name,
.code-regex { .code-regex {
color: var(--code-value, var(--wa-color-blue-70)); color: var(--wa-color-blue-70);
} }
.code-important, .code-important,

View File

@@ -21,11 +21,10 @@ Components with the <wa-badge variant="warning">Experimental</wa-badge> badge sh
- `<wa-select>` - `<wa-select>`
- `<wa-tag>` - `<wa-tag>`
- `<wa-textarea>` - `<wa-textarea>`
- 🚨 BREAKING: Fixed a bug where `base` and `input` parts were swapped in `<wa-input>` [issue:1646]
- Added the Kazakh translation [pr:1496] - Added the Kazakh translation [pr:1496]
- Added docs for code completion for VS Code and JetBrains [pr:1550] - Added docs for code completion for VS Code and JetBrains [pr:1550]
- Added back the missing `form-control-label` part to `<wa-textarea>` for consistency with other form controls [pr:1533] - Added back the missing `form-control-label` part to `<wa-textarea>` for consistency with other form controls [pr:1533]
- Added focus delegation to `<wa-button>` to ensure tabbing works properly when using `tabindex` [issue:1622]
- Added [text utilities](/docs/utilities/text/) for longform text, form control text, font sizes, font weights, text color, and truncation [pr:1602]
- Fixed a bug in `<wa-button>` where slotted badges weren't properly positioned in buttons with an `href` [issue:1377] - Fixed a bug in `<wa-button>` where slotted badges weren't properly positioned in buttons with an `href` [issue:1377]
- Fixed focus outline styles in `<wa-details>` and native `<details>` [issue:1456] - Fixed focus outline styles in `<wa-details>` and native `<details>` [issue:1456]
- Fixed focus outline styles in `<wa-scroller>`, `<wa-dialog>`, and `<wa-drawer>` [issue:1484] - Fixed focus outline styles in `<wa-scroller>`, `<wa-dialog>`, and `<wa-drawer>` [issue:1484]
@@ -39,9 +38,9 @@ Components with the <wa-badge variant="warning">Experimental</wa-badge> badge sh
- Fixed a bug that caused the required `*` in form labels to have incorrect spacing in `<wa-checkbox>` and `<wa-switch>` [issue:1472] - Fixed a bug that caused the required `*` in form labels to have incorrect spacing in `<wa-checkbox>` and `<wa-switch>` [issue:1472]
- Fixed a bug in `<wa-dialog>` and `<wa-drawer>` that caused the component to prematurely hide when certain child elements are used [pr:1636] - Fixed a bug in `<wa-dialog>` and `<wa-drawer>` that caused the component to prematurely hide when certain child elements are used [pr:1636]
- Improved autofill styles in `<wa-input>` so they span the entire width of the visual input [issue:1439] - Improved autofill styles in `<wa-input>` so they span the entire width of the visual input [issue:1439]
- Improved [text utilities](/docs/utilities/text/) so that each size modifier always exactly matches the applied font size [pr:1602]
- Improved Native Styles to use the `--wa-font-weight-code` design token
- Modified `<wa-slider>` to only show the tooltip on the handle being dragged when in range mode [issue:1320] - Modified `<wa-slider>` to only show the tooltip on the handle being dragged when in range mode [issue:1320]
- Improved [text utilities](/docs/utilities/text/) so that each size modifier always exactly matches the applied font size [pr:1602]
- Added [text utilities](/docs/utilities/text/) for longform text, form control text, font sizes, font weights, text color, and truncation [pr:1602]
- Upgraded `<wa-page>` from _experimental_ to _stable_ - Upgraded `<wa-page>` from _experimental_ to _stable_
## 3.0.0-beta.6 ## 3.0.0-beta.6

View File

@@ -41,7 +41,6 @@ import styles from './button.css';
*/ */
@customElement('wa-button') @customElement('wa-button')
export default class WaButton extends WebAwesomeFormAssociatedElement { export default class WaButton extends WebAwesomeFormAssociatedElement {
static shadowRootOptions = { ...WebAwesomeFormAssociatedElement.shadowRootOptions, delegatesFocus: true };
static css = [styles, variantStyles, sizeStyles]; static css = [styles, variantStyles, sizeStyles];
static get validators() { static get validators() {

View File

@@ -40,8 +40,8 @@ import styles from './input.css';
* *
* @csspart label - The label * @csspart label - The label
* @csspart hint - The hint's wrapper. * @csspart hint - The hint's wrapper.
* @csspart input - The wrapper being rendered as an input * @csspart base - The wrapper being rendered as an input
* @csspart base - The internal `<input>` control. * @csspart input - The internal `<input>` control.
* @csspart start - The container that wraps the `start` slot. * @csspart start - The container that wraps the `start` slot.
* @csspart clear-button - The clear button. * @csspart clear-button - The clear button.
* @csspart password-toggle-button - The password toggle button. * @csspart password-toggle-button - The password toggle button.
@@ -353,11 +353,11 @@ export default class WaInput extends WebAwesomeFormAssociatedElement {
<slot name="label">${this.label}</slot> <slot name="label">${this.label}</slot>
</label> </label>
<div part="input" class="text-field"> <div part="base" class="text-field">
<slot name="start" part="start" class="start"></slot> <slot name="start" part="start" class="start"></slot>
<input <input
part="base" part="input"
id="input" id="input"
class="control" class="control"
type=${this.type === 'password' && this.passwordVisible ? 'text' : this.type} type=${this.type === 'password' && this.passwordVisible ? 'text' : this.type}

View File

@@ -228,7 +228,6 @@
font-family: var(--wa-font-family-code); font-family: var(--wa-font-family-code);
font-size: var(--wa-font-size-smaller); font-size: var(--wa-font-size-smaller);
font-weight: var(--wa-font-weight-code);
border: solid var(--wa-border-width-s) color-mix(in oklab, currentColor, transparent 50%); border: solid var(--wa-border-width-s) color-mix(in oklab, currentColor, transparent 50%);
border-radius: var(--wa-border-radius-s); border-radius: var(--wa-border-radius-s);
@@ -282,7 +281,6 @@
font-family: var(--wa-font-family-code); font-family: var(--wa-font-family-code);
font-size: var(--wa-font-size-smaller); font-size: var(--wa-font-size-smaller);
font-weight: var(--wa-font-weight-code);
background-color: var(--wa-color-overlay-inline); background-color: var(--wa-color-overlay-inline);
border-radius: var(--wa-border-radius-s); border-radius: var(--wa-border-radius-s);
@@ -293,7 +291,6 @@
font-family: var(--wa-font-family-code); font-family: var(--wa-font-family-code);
font-size: var(--wa-font-size-smaller); font-size: var(--wa-font-size-smaller);
font-weight: var(--wa-font-weight-code);
white-space: pre; white-space: pre;
background-color: var(--wa-color-overlay-inline); background-color: var(--wa-color-overlay-inline);

View File

@@ -460,7 +460,7 @@
wa-textarea wa-textarea
):not(:focus):not([appearance='filled']) { ):not(:focus):not([appearance='filled']) {
&:where(:not(wa-input):not(wa-select):not(wa-textarea)), &:where(:not(wa-input):not(wa-select):not(wa-textarea)),
&:where(wa-input)::part(input), &:where(wa-input)::part(base),
&:where(wa-select)::part(combobox), &:where(wa-select)::part(combobox),
&:where(wa-textarea)::part(base) { &:where(wa-textarea)::part(base) {
box-shadow: inset var(--wa-shadow-offset-x-s) box-shadow: inset var(--wa-shadow-offset-x-s)