@waggylabs/yumekit 0.5.1-beta.6 → 0.5.1-beta.9
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.
- package/CHANGELOG.md +25 -3
- package/dist/components/y-appbar.js +47 -12
- package/dist/components/y-banner.js +39 -8
- package/dist/components/y-break.js +10 -3
- package/dist/components/y-button/y-button.d.ts +2 -0
- package/dist/components/y-button.d.ts +2 -0
- package/dist/components/y-button.js +39 -8
- package/dist/components/y-card.js +2 -1
- package/dist/components/y-checkbox.js +11 -4
- package/dist/components/y-code/y-code.d.ts +2 -0
- package/dist/components/y-code.d.ts +2 -0
- package/dist/components/y-code.js +81 -3
- package/dist/components/y-color.js +60 -28
- package/dist/components/y-colorpicker.js +56 -26
- package/dist/components/y-data-grid.js +297 -91
- package/dist/components/y-date.js +645 -69
- package/dist/components/y-datepicker/y-datepicker.d.ts +9 -0
- package/dist/components/y-datepicker.d.ts +9 -0
- package/dist/components/y-datepicker.js +643 -68
- package/dist/components/y-dialog.js +2 -1
- package/dist/components/y-drawer.js +4 -1
- package/dist/components/y-help/y-help.d.ts +1 -0
- package/dist/components/y-help.d.ts +1 -0
- package/dist/components/y-help.js +60 -28
- package/dist/components/y-input.js +10 -4
- package/dist/components/y-menu.js +2 -1
- package/dist/components/y-paginator.js +85 -30
- package/dist/components/y-popover/y-popover.d.ts +1 -0
- package/dist/components/y-popover.d.ts +1 -0
- package/dist/components/y-popover.js +15 -13
- package/dist/components/y-progress.js +2 -1
- package/dist/components/y-radio.js +9 -2
- package/dist/components/y-select/y-select.d.ts +1 -0
- package/dist/components/y-select.d.ts +1 -0
- package/dist/components/y-select.js +46 -22
- package/dist/components/y-sidebar/y-sidebar.d.ts +9 -0
- package/dist/components/y-sidebar.d.ts +9 -0
- package/dist/components/y-sidebar.js +67 -11
- package/dist/components/y-slider.js +4 -2
- package/dist/components/y-switch.js +2 -1
- package/dist/components/y-tabs.js +5 -3
- package/dist/components/y-textarea.js +2 -1
- package/dist/components/y-theme.js +111 -45
- package/dist/index.js +596 -168
- package/dist/modules/helpers.d.ts +14 -0
- package/dist/modules/helpers.js +24 -0
- package/dist/modules/helpers.test.js +46 -0
- package/dist/styles/ant-blue-dark.css +6 -1
- package/dist/styles/ant-blue-light.css +6 -1
- package/dist/styles/ant-green-dark.css +226 -0
- package/dist/styles/ant-green-light.css +226 -0
- package/dist/styles/blue-dark.css +3 -3
- package/dist/styles/blue-light.css +1 -1
- package/dist/styles/bootstrap-dark.css +7 -1
- package/dist/styles/bootstrap-light.css +7 -1
- package/dist/styles/brown-dark.css +3 -3
- package/dist/styles/brown-light.css +1 -1
- package/dist/styles/carbon-dark.css +6 -1
- package/dist/styles/carbon-light.css +6 -1
- package/dist/styles/catppuccin-frappe.css +1 -1
- package/dist/styles/catppuccin-latte.css +1 -1
- package/dist/styles/catppuccin-macchiato.css +1 -1
- package/dist/styles/catppuccin-mocha.css +1 -1
- package/dist/styles/green-dark.css +3 -3
- package/dist/styles/green-light.css +1 -1
- package/dist/styles/indigo-dark.css +3 -3
- package/dist/styles/indigo-light.css +1 -1
- package/dist/styles/kepler-amber.css +220 -0
- package/dist/styles/kepler-dark.css +220 -0
- package/dist/styles/kepler-galaxy.css +220 -0
- package/dist/styles/kepler-light.css +220 -0
- package/dist/styles/kepler-matrix.css +220 -0
- package/dist/styles/material-blue-dark.css +11 -5
- package/dist/styles/material-blue-light.css +11 -5
- package/dist/styles/material-purple-dark.css +240 -0
- package/dist/styles/material-purple-light.css +240 -0
- package/dist/styles/mono-dark.css +3 -3
- package/dist/styles/mono-light.css +1 -1
- package/dist/styles/neobrutalist-dark.css +239 -0
- package/dist/styles/neobrutalist.css +239 -0
- package/dist/styles/nord-aurora.css +211 -0
- package/dist/styles/nord.css +211 -0
- package/dist/styles/olive-dark.css +3 -3
- package/dist/styles/olive-light.css +1 -1
- package/dist/styles/orange-dark.css +3 -3
- package/dist/styles/orange-light.css +1 -1
- package/dist/styles/pink-dark.css +3 -3
- package/dist/styles/pink-light.css +1 -1
- package/dist/styles/primer-dark-dimmed.css +18 -1
- package/dist/styles/primer-dark.css +18 -1
- package/dist/styles/primer-light.css +18 -1
- package/dist/styles/purple-dark.css +3 -3
- package/dist/styles/purple-light.css +1 -1
- package/dist/styles/red-dark.css +3 -3
- package/dist/styles/red-light.css +1 -1
- package/dist/styles/rose-dark.css +215 -0
- package/dist/styles/rose-light.css +215 -0
- package/dist/styles/shadcn-blue-dark.css +18 -1
- package/dist/styles/shadcn-blue-light.css +18 -1
- package/dist/styles/shadcn-dark.css +18 -1
- package/dist/styles/shadcn-light.css +18 -1
- package/dist/styles/slate-dark.css +215 -0
- package/dist/styles/slate-light.css +215 -0
- package/dist/styles/teal-dark.css +3 -3
- package/dist/styles/teal-light.css +1 -1
- package/dist/styles/variables.css +56 -2
- package/dist/styles/yellow-dark.css +3 -3
- package/dist/styles/yellow-light.css +1 -1
- package/dist/yumekit.min.js +1 -1
- package/llm.txt +47 -16
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -35,7 +35,9 @@ Delete any empty sections before publishing.
|
|
|
35
35
|
|
|
36
36
|
### Added
|
|
37
37
|
|
|
38
|
-
-
|
|
38
|
+
- `y-checkbox` / `y-radio` — checked-state color hooks so themes can fill the control on selection: `--component-checkbox-checked-background` / `-checked-border-color` / `-checked-icon-color` and `--component-radio-background` / `-checked-background` / `-checked-border-color` / `-checked-dot-color`. Each falls back to the matching unchecked value, so existing themes are unchanged. The design-system themes now use them — checked checkboxes (and Shadcn/Bootstrap/Primer radios) fill with the primary color and draw the check/dot in the primary-inverse color, matching each system's native look.
|
|
39
|
+
|
|
40
|
+
- Several theme color variations including `Slate`, `Rose`, the `Catppuccin` and `Nord` color schemes, two `Neobrutalist` themes, as well as several new themes based on some of the most popular design systems. This includes Material, Carbon, Ant, Shadcn, Primer, Bootstrap, and a few throwback themes inspired by Yumekit's spiritual ancestor: `Kepler UI`.
|
|
39
41
|
|
|
40
42
|
- `y-tabs` — new `variant="accent"` style: minimal tabs where the active tab shows a primary-colored indicator border on its content-facing edge (bottom for top tabs, etc.). The default bordered style is unchanged. Adds `--component-tabs-accent-width` (indicator thickness). The border-width token is normalized to `--component-tabs-border-width` (matching `--component-tabs-border-color`); the legacy `--component-tab-border-width` is still honored as a fallback.
|
|
41
43
|
|
|
@@ -55,9 +57,19 @@ Delete any empty sections before publishing.
|
|
|
55
57
|
|
|
56
58
|
- Filled icon variants for `y-icon` via a new `weight="filled"` value, with automatic fallback to the line icon when no filled version is registered. 116 filled icons ship under `icons/all-filled.js` (also pulled in by `icons/all.js`); the remaining component-illustration icons fall back to their line versions.
|
|
57
59
|
|
|
60
|
+
- New theming hooks: `--component-control-height-{size}` (shared min-height for `y-button` and `y-input` so fields and buttons match per theme, falling back to `--sizing-{size}`), `--component-checkbox-border-radius` (lets checkboxes use a tighter radius than text inputs). Outlined `y-button`s now source their border from the matching semantic border token (`--base-border`, `--error-border`, …) per color, falling back to the button's text color when that token is unset; `--component-button-outline-border` / `--component-button-outline-border-color` remain available as optional global overrides. Defaults preserve the existing look for all current themes.
|
|
61
|
+
|
|
58
62
|
### Changed
|
|
59
63
|
|
|
60
|
-
- `y-
|
|
64
|
+
- `y-break` — the divider line now uses the semantic border color (`base.border`) instead of `base.content.lightest`, matching other component borders, and the host now applies default perpendicular spacing (above/below a horizontal break, left/right of a vertical one) via the new `--component-break-spacing` token (defaults to `--spacing-medium`) so a break separates content out of the box. The line color and thickness also gained `--base-border` / `1px` fallbacks for use without a full token set.
|
|
65
|
+
|
|
66
|
+
- `y-button` — `--component-button-border-width` is now applied as the `border-width` longhand instead of being baked into the `border` shorthand, so it accepts a 1–4 value pattern for per-side widths (e.g. `0 0 2px 0` for a bottom-only border). Default (`1px`) is unchanged. The `--component-button-outline-border` shorthand override now controls border style + color only; its width is superseded by `--component-button-border-width`.
|
|
67
|
+
|
|
68
|
+
- Every bordered component now applies its `--component-*-border-width` token as the `border-width` longhand (out of the `border` shorthand), so each accepts a 1–4 value pattern for per-side borders, consistent with `y-button` and the form fields: surfaces/containers (`y-card`, `y-menu`, `y-dialog`, `y-popover`, `y-datepicker`, `y-data-grid`, `y-appbar`, `y-sidebar`, `y-tabs`) and controls (`y-checkbox`, `y-radio`, `y-switch`, `y-slider`, `y-progress`). Default rendering is unchanged.
|
|
69
|
+
|
|
70
|
+
- Form fields (`y-input`, `y-textarea`, `y-select`, `y-color`, `y-date`) — `--component-inputs-border-width` is now applied as the `border-width` longhand (out of the `border` shorthand) on every field surface, including the `y-select` dropdown panel and the `y-color` picker popup, so like `y-button` it accepts a 1–4 value pattern for per-side borders.
|
|
71
|
+
|
|
72
|
+
- `y-button` — Outlined button borders were changed to use semantic border values instead of content color. Padding can now be set per-axis via `--component-button-padding-block-{size}` / `--component-button-padding-inline-{size}` (overriding, and falling back to, the all-sides `--component-button-padding-{size}`), plus a new `padding-mode` attribute (`auto` (default) / `square` / `wide`) controlling whether the inline axis collapses to the block value. `auto` makes icon-only buttons square automatically; `square`/`wide` force it. The Material themes use this for wide pill buttons that stay round when icon-only; `y-paginator` number buttons and `y-datepicker` day / month / year buttons set `padding-mode="square"` so they don't bloat under the wide Material padding.
|
|
61
73
|
|
|
62
74
|
- Custom color support expanded to the browser-native color functions — `hwb()`, `lab()`, `lch()`, `oklab()`, `oklch()`, and `color()` — in addition to `#hex`, `rgb()`/`rgba()`, and `hsl()`/`hsla()`. The shared `isSafeCssColor` gate now also tightens its argument allowlist (rejecting semicolons, braces, angle brackets, and nested functions). Applies anywhere a `color` accepts a custom value, including `y-badge`, `y-select`, `y-popover`, `y-button`, `y-tag`, `y-icon`, and `y-rating`.
|
|
63
75
|
|
|
@@ -71,7 +83,17 @@ Delete any empty sections before publishing.
|
|
|
71
83
|
|
|
72
84
|
### Fixed
|
|
73
85
|
|
|
74
|
-
- `y-
|
|
86
|
+
- `y-sidebar` — nav/footer icons now stay in the same position between the expanded and collapsed states under themes whose borders use a multi-value width (e.g. the Neobrutalist offset border `2px 2px 6px 2px`). The icon-column width is now derived from the sidebar's resolved horizontal border (flat buttons render no border) instead of an invalid `calc()` that multiplied the multi-value token, which had collapsed the column to `auto` and shifted icons.
|
|
87
|
+
|
|
88
|
+
- `y-drawer` — corners closest to the screen's edge are now squared in all themes.
|
|
89
|
+
|
|
90
|
+
- `y-datepicker` — the month and year pickers were reworked. The month picker (`show-days="false"`) now shows a selectable year dropdown in its header (toggled by `show-years`, omitted when `false`) above the twelve months, and the year picker (`show-months="false"`) now bounds its scrollable year grid with two start/end year inputs. Clicking a month or year now selects it and fires `change`; clicking a year in the year picker no longer shifts the visible range.
|
|
91
|
+
|
|
92
|
+
- `y-theme` — switching themes now clears the previous theme's CSS custom properties from the host before applying the new ones. Variables defined only by the outgoing theme (e.g. a theme-specific token like `--component-tabs-inactive-background`) previously lingered inline and "stuck" until a page reload; they are now removed on every switch.
|
|
93
|
+
|
|
94
|
+
- `y-tabs` — unselected tabs now use a dedicated `--component-tabs-inactive-background` (falling back to `--component-tabs-border-color`, so existing themes are unchanged) instead of always painting the tab background with the border color. This fixes the Neobrutalist themes, where the border color equals the text color and made unselected tab labels unreadable; both Neobrutalist themes now set it to a distinct surface tone.
|
|
95
|
+
|
|
96
|
+
- Portaled overlays now inherit the active theme. `y-help` (tour overlay/tooltip), `y-popover` (`portal` mode), and `y-select` (`portal` mode) previously rendered into `document.body`, escaping the `<y-theme>` subtree that scopes the theme's CSS custom properties — so they fell back to the default un-themed palette. They now mount into the nearest enclosing `<y-theme>`, walking up across shadow boundaries so the fix also applies when the component is used inside another component's shadow root (e.g. `y-data-grid`'s per-column header menus), falling back to `document.body` when there is no theme ancestor. The portaled surface matches the active theme and tracks live theme switches. Keep the component inside your `<y-theme>`.
|
|
75
97
|
|
|
76
98
|
- Form field components now share one field background. `y-select` (trigger and dropdown) used `base.background.app` while `y-input` / `y-textarea` / `y-color` / `y-date` used `base.background.component`; `select.background` is now `base.background.component` across all themes, so fields match when placed together on a form (most visible in the Material and Carbon themes). The select dropdown panel now also matches menus/popovers.
|
|
77
99
|
|
|
@@ -253,6 +253,7 @@ class YumeButton extends HTMLElement {
|
|
|
253
253
|
"--background-color": color,
|
|
254
254
|
"--border-color": color,
|
|
255
255
|
"--text-color": text,
|
|
256
|
+
"--btn-outline-border": "initial",
|
|
256
257
|
"--hover-background-color": hover,
|
|
257
258
|
"--hover-border-color": hover,
|
|
258
259
|
"--hover-text-color": text,
|
|
@@ -267,20 +268,22 @@ class YumeButton extends HTMLElement {
|
|
|
267
268
|
"--background-color": "transparent",
|
|
268
269
|
"--border-color": color,
|
|
269
270
|
"--text-color": color,
|
|
271
|
+
"--btn-outline-border": this._outlineBorder(color),
|
|
270
272
|
"--hover-background-color": subtle,
|
|
271
|
-
"--hover-border-color": color,
|
|
273
|
+
"--hover-border-color": this._outlineBorderColor(color),
|
|
272
274
|
"--hover-text-color": color,
|
|
273
275
|
"--focus-background-color": subtle,
|
|
274
|
-
"--focus-border-color": color,
|
|
276
|
+
"--focus-border-color": this._outlineBorderColor(color),
|
|
275
277
|
"--focus-text-color": color,
|
|
276
278
|
"--active-background-color": color,
|
|
277
|
-
"--active-border-color": color,
|
|
279
|
+
"--active-border-color": this._outlineBorderColor(color),
|
|
278
280
|
"--active-text-color": text,
|
|
279
281
|
},
|
|
280
282
|
flat: {
|
|
281
283
|
"--background-color": "transparent",
|
|
282
284
|
"--border-color": "transparent",
|
|
283
285
|
"--text-color": color,
|
|
286
|
+
"--btn-outline-border": "initial",
|
|
284
287
|
"--hover-background-color": subtle,
|
|
285
288
|
"--hover-border-color": subtle,
|
|
286
289
|
"--hover-text-color": color,
|
|
@@ -361,9 +364,9 @@ class YumeButton extends HTMLElement {
|
|
|
361
364
|
this.button.style.setProperty("--button-gap", shared);
|
|
362
365
|
|
|
363
366
|
const minSizeMapping = {
|
|
364
|
-
small: "var(--sizing-small, 32px)",
|
|
365
|
-
medium: "var(--sizing-medium, 40px)",
|
|
366
|
-
large: "var(--sizing-large, 56px)",
|
|
367
|
+
small: "var(--component-control-height-small, var(--sizing-small, 32px))",
|
|
368
|
+
medium: "var(--component-control-height-medium, var(--sizing-medium, 40px))",
|
|
369
|
+
large: "var(--component-control-height-large, var(--sizing-large, 56px))",
|
|
367
370
|
};
|
|
368
371
|
this.button.style.setProperty(
|
|
369
372
|
"--button-min-height",
|
|
@@ -400,7 +403,13 @@ class YumeButton extends HTMLElement {
|
|
|
400
403
|
position: relative;
|
|
401
404
|
overflow: hidden;
|
|
402
405
|
border-radius: var(--component-button-border-radius-outer, 4px);
|
|
403
|
-
|
|
406
|
+
/* Style + color come from the shorthand (its width stays a
|
|
407
|
+
fixed, always-valid 1px); the real width is applied as a
|
|
408
|
+
longhand below so --component-button-border-width can take a
|
|
409
|
+
1–4 value pattern (e.g. "1px 2px") for per-side widths
|
|
410
|
+
without invalidating the shorthand. */
|
|
411
|
+
border: var(--btn-outline-border, 1px solid var(--border-color, var(--base-content--, #f7f7fa)));
|
|
412
|
+
border-width: var(--component-button-border-width, 1px);
|
|
404
413
|
background: var(--background-color, #0c0c0d);
|
|
405
414
|
transition: background-color 0.1s, color 0.1s, border-color 0.1s;
|
|
406
415
|
cursor: pointer;
|
|
@@ -463,7 +472,9 @@ class YumeButton extends HTMLElement {
|
|
|
463
472
|
}
|
|
464
473
|
|
|
465
474
|
_applyUnfilledInteractionStyles(vars, styleType) {
|
|
466
|
-
const borderColor =
|
|
475
|
+
const borderColor = this._outlineBorderColor(
|
|
476
|
+
`var(${vars[7]}, var(${vars[0]}, #f7f7fa))`,
|
|
477
|
+
);
|
|
467
478
|
|
|
468
479
|
this.button.style.setProperty(
|
|
469
480
|
"--hover-background-color",
|
|
@@ -522,6 +533,7 @@ class YumeButton extends HTMLElement {
|
|
|
522
533
|
"--primary-background-hover",
|
|
523
534
|
"--primary-background-active",
|
|
524
535
|
"--primary-content-inverse",
|
|
536
|
+
"--primary-border",
|
|
525
537
|
],
|
|
526
538
|
secondary: [
|
|
527
539
|
"--secondary-content--",
|
|
@@ -531,6 +543,7 @@ class YumeButton extends HTMLElement {
|
|
|
531
543
|
"--secondary-background-hover",
|
|
532
544
|
"--secondary-background-active",
|
|
533
545
|
"--secondary-content-inverse",
|
|
546
|
+
"--secondary-border",
|
|
534
547
|
],
|
|
535
548
|
base: [
|
|
536
549
|
"--base-content--",
|
|
@@ -540,6 +553,7 @@ class YumeButton extends HTMLElement {
|
|
|
540
553
|
"--base-background-hover",
|
|
541
554
|
"--base-background-active",
|
|
542
555
|
"--base-content-inverse",
|
|
556
|
+
"--base-border",
|
|
543
557
|
],
|
|
544
558
|
success: [
|
|
545
559
|
"--success-content--",
|
|
@@ -549,6 +563,7 @@ class YumeButton extends HTMLElement {
|
|
|
549
563
|
"--success-background-hover",
|
|
550
564
|
"--success-background-active",
|
|
551
565
|
"--success-content-inverse",
|
|
566
|
+
"--success-border",
|
|
552
567
|
],
|
|
553
568
|
error: [
|
|
554
569
|
"--error-content--",
|
|
@@ -558,6 +573,7 @@ class YumeButton extends HTMLElement {
|
|
|
558
573
|
"--error-background-hover",
|
|
559
574
|
"--error-background-active",
|
|
560
575
|
"--error-content-inverse",
|
|
576
|
+
"--error-border",
|
|
561
577
|
],
|
|
562
578
|
warning: [
|
|
563
579
|
"--warning-content--",
|
|
@@ -567,6 +583,7 @@ class YumeButton extends HTMLElement {
|
|
|
567
583
|
"--warning-background-hover",
|
|
568
584
|
"--warning-background-active",
|
|
569
585
|
"--warning-content-inverse",
|
|
586
|
+
"--warning-border",
|
|
570
587
|
],
|
|
571
588
|
help: [
|
|
572
589
|
"--help-content--",
|
|
@@ -576,6 +593,7 @@ class YumeButton extends HTMLElement {
|
|
|
576
593
|
"--help-background-hover",
|
|
577
594
|
"--help-background-active",
|
|
578
595
|
"--help-content-inverse",
|
|
596
|
+
"--help-border",
|
|
579
597
|
],
|
|
580
598
|
};
|
|
581
599
|
}
|
|
@@ -762,6 +780,14 @@ class YumeButton extends HTMLElement {
|
|
|
762
780
|
});
|
|
763
781
|
}
|
|
764
782
|
|
|
783
|
+
_outlineBorder(defaultColor) {
|
|
784
|
+
return `var(--component-button-outline-border, 1px solid ${this._outlineBorderColor(defaultColor)})`;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
_outlineBorderColor(defaultColor) {
|
|
788
|
+
return `var(--component-button-outline-border-color, ${defaultColor})`;
|
|
789
|
+
}
|
|
790
|
+
|
|
765
791
|
_updateStyles() {
|
|
766
792
|
const { color, size, styleType } = this;
|
|
767
793
|
const colorVars = this._getColorVarsMap();
|
|
@@ -778,16 +804,21 @@ class YumeButton extends HTMLElement {
|
|
|
778
804
|
"--background-color": `var(${vars[3]}, #0c0c0d)`,
|
|
779
805
|
"--border-color": `var(${vars[0]}, #f7f7fa)`,
|
|
780
806
|
"--text-color": `var(${vars[0]}, #f7f7fa)`,
|
|
807
|
+
"--btn-outline-border": this._outlineBorder(
|
|
808
|
+
`var(${vars[7]}, var(${vars[0]}, #f7f7fa))`,
|
|
809
|
+
),
|
|
781
810
|
},
|
|
782
811
|
filled: {
|
|
783
812
|
"--background-color": `var(${vars[0]}, #f7f7fa)`,
|
|
784
813
|
"--border-color": `var(${vars[0]}, #f7f7fa)`,
|
|
785
814
|
"--text-color": `var(${vars[6]}, #0c0c0d)`,
|
|
815
|
+
"--btn-outline-border": "initial",
|
|
786
816
|
},
|
|
787
817
|
flat: {
|
|
788
818
|
"--background-color": `var(${vars[3]},#0c0c0d)`,
|
|
789
819
|
"--border-color": `var(${vars[3]},#0c0c0d)`,
|
|
790
820
|
"--text-color": `var(${vars[0]},#f7f7fa)`,
|
|
821
|
+
"--btn-outline-border": "initial",
|
|
791
822
|
},
|
|
792
823
|
};
|
|
793
824
|
|
|
@@ -1341,7 +1372,8 @@ class YumeMenu extends HTMLElement {
|
|
|
1341
1372
|
.menu,
|
|
1342
1373
|
.submenu {
|
|
1343
1374
|
background: var(--component-menu-background, #0c0c0d);
|
|
1344
|
-
border:
|
|
1375
|
+
border: 1px solid var(--component-menu-border-color, #37383a);
|
|
1376
|
+
border-width: var(--component-menu-border-width, 1px);
|
|
1345
1377
|
border-radius: var(--component-menu-border-radius, 4px);
|
|
1346
1378
|
box-shadow: var(--component-menu-shadow, 0 2px 8px rgba(0, 0, 0, 0.15));
|
|
1347
1379
|
min-width: 150px;
|
|
@@ -1910,7 +1942,8 @@ class YumeAppbar extends HTMLElement {
|
|
|
1910
1942
|
flex-direction: row;
|
|
1911
1943
|
align-items: center;
|
|
1912
1944
|
background: var(--component-appbar-background, #0c0c0d);
|
|
1913
|
-
border:
|
|
1945
|
+
border: 2px solid var(--component-appbar-border-color, #37383a);
|
|
1946
|
+
border-width: var(--component-appbar-border-width, 2px);
|
|
1914
1947
|
border-radius: var(--component-appbar-border-radius, 4px);
|
|
1915
1948
|
overflow: visible;
|
|
1916
1949
|
padding: var(--_appbar-padding);
|
|
@@ -2108,7 +2141,8 @@ class YumeAppbar extends HTMLElement {
|
|
|
2108
2141
|
flex-direction: row;
|
|
2109
2142
|
align-items: center;
|
|
2110
2143
|
background: var(--component-appbar-background, #0c0c0d);
|
|
2111
|
-
border:
|
|
2144
|
+
border: 2px solid var(--component-appbar-border-color, #37383a);
|
|
2145
|
+
border-width: var(--component-appbar-border-width, var(--component-sidebar-border-width, 2px));
|
|
2112
2146
|
border-radius: var(--component-appbar-border-radius, var(--component-sidebar-border-radius, 4px));
|
|
2113
2147
|
overflow: visible;
|
|
2114
2148
|
padding: var(--_appbar-padding);
|
|
@@ -2144,7 +2178,8 @@ class YumeAppbar extends HTMLElement {
|
|
|
2144
2178
|
left: 0;
|
|
2145
2179
|
margin-top: 4px;
|
|
2146
2180
|
background: var(--component-appbar-background, #0c0c0d);
|
|
2147
|
-
border:
|
|
2181
|
+
border: 2px solid var(--component-appbar-border-color, #37383a);
|
|
2182
|
+
border-width: var(--component-appbar-border-width, var(--component-sidebar-border-width, 2px));
|
|
2148
2183
|
border-radius: var(--component-appbar-border-radius, var(--component-sidebar-border-radius, 4px));
|
|
2149
2184
|
padding: var(--_appbar-padding);
|
|
2150
2185
|
display: none;
|
|
@@ -253,6 +253,7 @@ class YumeButton extends HTMLElement {
|
|
|
253
253
|
"--background-color": color,
|
|
254
254
|
"--border-color": color,
|
|
255
255
|
"--text-color": text,
|
|
256
|
+
"--btn-outline-border": "initial",
|
|
256
257
|
"--hover-background-color": hover,
|
|
257
258
|
"--hover-border-color": hover,
|
|
258
259
|
"--hover-text-color": text,
|
|
@@ -267,20 +268,22 @@ class YumeButton extends HTMLElement {
|
|
|
267
268
|
"--background-color": "transparent",
|
|
268
269
|
"--border-color": color,
|
|
269
270
|
"--text-color": color,
|
|
271
|
+
"--btn-outline-border": this._outlineBorder(color),
|
|
270
272
|
"--hover-background-color": subtle,
|
|
271
|
-
"--hover-border-color": color,
|
|
273
|
+
"--hover-border-color": this._outlineBorderColor(color),
|
|
272
274
|
"--hover-text-color": color,
|
|
273
275
|
"--focus-background-color": subtle,
|
|
274
|
-
"--focus-border-color": color,
|
|
276
|
+
"--focus-border-color": this._outlineBorderColor(color),
|
|
275
277
|
"--focus-text-color": color,
|
|
276
278
|
"--active-background-color": color,
|
|
277
|
-
"--active-border-color": color,
|
|
279
|
+
"--active-border-color": this._outlineBorderColor(color),
|
|
278
280
|
"--active-text-color": text,
|
|
279
281
|
},
|
|
280
282
|
flat: {
|
|
281
283
|
"--background-color": "transparent",
|
|
282
284
|
"--border-color": "transparent",
|
|
283
285
|
"--text-color": color,
|
|
286
|
+
"--btn-outline-border": "initial",
|
|
284
287
|
"--hover-background-color": subtle,
|
|
285
288
|
"--hover-border-color": subtle,
|
|
286
289
|
"--hover-text-color": color,
|
|
@@ -361,9 +364,9 @@ class YumeButton extends HTMLElement {
|
|
|
361
364
|
this.button.style.setProperty("--button-gap", shared);
|
|
362
365
|
|
|
363
366
|
const minSizeMapping = {
|
|
364
|
-
small: "var(--sizing-small, 32px)",
|
|
365
|
-
medium: "var(--sizing-medium, 40px)",
|
|
366
|
-
large: "var(--sizing-large, 56px)",
|
|
367
|
+
small: "var(--component-control-height-small, var(--sizing-small, 32px))",
|
|
368
|
+
medium: "var(--component-control-height-medium, var(--sizing-medium, 40px))",
|
|
369
|
+
large: "var(--component-control-height-large, var(--sizing-large, 56px))",
|
|
367
370
|
};
|
|
368
371
|
this.button.style.setProperty(
|
|
369
372
|
"--button-min-height",
|
|
@@ -400,7 +403,13 @@ class YumeButton extends HTMLElement {
|
|
|
400
403
|
position: relative;
|
|
401
404
|
overflow: hidden;
|
|
402
405
|
border-radius: var(--component-button-border-radius-outer, 4px);
|
|
403
|
-
|
|
406
|
+
/* Style + color come from the shorthand (its width stays a
|
|
407
|
+
fixed, always-valid 1px); the real width is applied as a
|
|
408
|
+
longhand below so --component-button-border-width can take a
|
|
409
|
+
1–4 value pattern (e.g. "1px 2px") for per-side widths
|
|
410
|
+
without invalidating the shorthand. */
|
|
411
|
+
border: var(--btn-outline-border, 1px solid var(--border-color, var(--base-content--, #f7f7fa)));
|
|
412
|
+
border-width: var(--component-button-border-width, 1px);
|
|
404
413
|
background: var(--background-color, #0c0c0d);
|
|
405
414
|
transition: background-color 0.1s, color 0.1s, border-color 0.1s;
|
|
406
415
|
cursor: pointer;
|
|
@@ -463,7 +472,9 @@ class YumeButton extends HTMLElement {
|
|
|
463
472
|
}
|
|
464
473
|
|
|
465
474
|
_applyUnfilledInteractionStyles(vars, styleType) {
|
|
466
|
-
const borderColor =
|
|
475
|
+
const borderColor = this._outlineBorderColor(
|
|
476
|
+
`var(${vars[7]}, var(${vars[0]}, #f7f7fa))`,
|
|
477
|
+
);
|
|
467
478
|
|
|
468
479
|
this.button.style.setProperty(
|
|
469
480
|
"--hover-background-color",
|
|
@@ -522,6 +533,7 @@ class YumeButton extends HTMLElement {
|
|
|
522
533
|
"--primary-background-hover",
|
|
523
534
|
"--primary-background-active",
|
|
524
535
|
"--primary-content-inverse",
|
|
536
|
+
"--primary-border",
|
|
525
537
|
],
|
|
526
538
|
secondary: [
|
|
527
539
|
"--secondary-content--",
|
|
@@ -531,6 +543,7 @@ class YumeButton extends HTMLElement {
|
|
|
531
543
|
"--secondary-background-hover",
|
|
532
544
|
"--secondary-background-active",
|
|
533
545
|
"--secondary-content-inverse",
|
|
546
|
+
"--secondary-border",
|
|
534
547
|
],
|
|
535
548
|
base: [
|
|
536
549
|
"--base-content--",
|
|
@@ -540,6 +553,7 @@ class YumeButton extends HTMLElement {
|
|
|
540
553
|
"--base-background-hover",
|
|
541
554
|
"--base-background-active",
|
|
542
555
|
"--base-content-inverse",
|
|
556
|
+
"--base-border",
|
|
543
557
|
],
|
|
544
558
|
success: [
|
|
545
559
|
"--success-content--",
|
|
@@ -549,6 +563,7 @@ class YumeButton extends HTMLElement {
|
|
|
549
563
|
"--success-background-hover",
|
|
550
564
|
"--success-background-active",
|
|
551
565
|
"--success-content-inverse",
|
|
566
|
+
"--success-border",
|
|
552
567
|
],
|
|
553
568
|
error: [
|
|
554
569
|
"--error-content--",
|
|
@@ -558,6 +573,7 @@ class YumeButton extends HTMLElement {
|
|
|
558
573
|
"--error-background-hover",
|
|
559
574
|
"--error-background-active",
|
|
560
575
|
"--error-content-inverse",
|
|
576
|
+
"--error-border",
|
|
561
577
|
],
|
|
562
578
|
warning: [
|
|
563
579
|
"--warning-content--",
|
|
@@ -567,6 +583,7 @@ class YumeButton extends HTMLElement {
|
|
|
567
583
|
"--warning-background-hover",
|
|
568
584
|
"--warning-background-active",
|
|
569
585
|
"--warning-content-inverse",
|
|
586
|
+
"--warning-border",
|
|
570
587
|
],
|
|
571
588
|
help: [
|
|
572
589
|
"--help-content--",
|
|
@@ -576,6 +593,7 @@ class YumeButton extends HTMLElement {
|
|
|
576
593
|
"--help-background-hover",
|
|
577
594
|
"--help-background-active",
|
|
578
595
|
"--help-content-inverse",
|
|
596
|
+
"--help-border",
|
|
579
597
|
],
|
|
580
598
|
};
|
|
581
599
|
}
|
|
@@ -762,6 +780,14 @@ class YumeButton extends HTMLElement {
|
|
|
762
780
|
});
|
|
763
781
|
}
|
|
764
782
|
|
|
783
|
+
_outlineBorder(defaultColor) {
|
|
784
|
+
return `var(--component-button-outline-border, 1px solid ${this._outlineBorderColor(defaultColor)})`;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
_outlineBorderColor(defaultColor) {
|
|
788
|
+
return `var(--component-button-outline-border-color, ${defaultColor})`;
|
|
789
|
+
}
|
|
790
|
+
|
|
765
791
|
_updateStyles() {
|
|
766
792
|
const { color, size, styleType } = this;
|
|
767
793
|
const colorVars = this._getColorVarsMap();
|
|
@@ -778,16 +804,21 @@ class YumeButton extends HTMLElement {
|
|
|
778
804
|
"--background-color": `var(${vars[3]}, #0c0c0d)`,
|
|
779
805
|
"--border-color": `var(${vars[0]}, #f7f7fa)`,
|
|
780
806
|
"--text-color": `var(${vars[0]}, #f7f7fa)`,
|
|
807
|
+
"--btn-outline-border": this._outlineBorder(
|
|
808
|
+
`var(${vars[7]}, var(${vars[0]}, #f7f7fa))`,
|
|
809
|
+
),
|
|
781
810
|
},
|
|
782
811
|
filled: {
|
|
783
812
|
"--background-color": `var(${vars[0]}, #f7f7fa)`,
|
|
784
813
|
"--border-color": `var(${vars[0]}, #f7f7fa)`,
|
|
785
814
|
"--text-color": `var(${vars[6]}, #0c0c0d)`,
|
|
815
|
+
"--btn-outline-border": "initial",
|
|
786
816
|
},
|
|
787
817
|
flat: {
|
|
788
818
|
"--background-color": `var(${vars[3]},#0c0c0d)`,
|
|
789
819
|
"--border-color": `var(${vars[3]},#0c0c0d)`,
|
|
790
820
|
"--text-color": `var(${vars[0]},#f7f7fa)`,
|
|
821
|
+
"--btn-outline-border": "initial",
|
|
791
822
|
},
|
|
792
823
|
};
|
|
793
824
|
|
|
@@ -526,13 +526,20 @@ class YumeBreak extends HTMLElement {
|
|
|
526
526
|
--_inset: var(--component-break-inset, ${inset});
|
|
527
527
|
display: block;
|
|
528
528
|
box-sizing: border-box;
|
|
529
|
-
|
|
529
|
+
/* Breathing room above/below the line so the break separates
|
|
530
|
+
content out of the box. Perpendicular to the line, so it
|
|
531
|
+
becomes inline padding when vertical (below). */
|
|
532
|
+
padding-block: var(--component-break-spacing, var(--spacing-medium, 16px));
|
|
533
|
+
padding-inline: 0;
|
|
534
|
+
color: var(--component-break-content-color, var(--base-content-lightest, currentColor));
|
|
530
535
|
}
|
|
531
536
|
|
|
532
537
|
:host([orientation="vertical"]) {
|
|
533
538
|
display: inline-flex;
|
|
534
539
|
align-self: stretch;
|
|
535
540
|
min-height: 1em;
|
|
541
|
+
padding-block: 0;
|
|
542
|
+
padding-inline: var(--component-break-spacing, var(--spacing-medium, 16px));
|
|
536
543
|
}
|
|
537
544
|
|
|
538
545
|
.break {
|
|
@@ -551,13 +558,13 @@ class YumeBreak extends HTMLElement {
|
|
|
551
558
|
.line {
|
|
552
559
|
flex: 1 1 auto;
|
|
553
560
|
min-width: var(--component-break-min-length);
|
|
554
|
-
border-top: var(--component-break-line-thickness) var(--_line-style) var(--component-break-line-color);
|
|
561
|
+
border-top: var(--component-break-line-thickness, 1px) var(--_line-style) var(--component-break-line-color, var(--base-border, currentColor));
|
|
555
562
|
align-self: center;
|
|
556
563
|
}
|
|
557
564
|
|
|
558
565
|
:host([orientation="vertical"]) .line {
|
|
559
566
|
border-top: 0;
|
|
560
|
-
border-left: var(--component-break-line-thickness) var(--_line-style) var(--component-break-line-color);
|
|
567
|
+
border-left: var(--component-break-line-thickness, 1px) var(--_line-style) var(--component-break-line-color, var(--base-border, currentColor));
|
|
561
568
|
min-width: 0;
|
|
562
569
|
min-height: var(--component-break-min-length);
|
|
563
570
|
width: 0;
|
|
@@ -253,6 +253,7 @@ class YumeButton extends HTMLElement {
|
|
|
253
253
|
"--background-color": color,
|
|
254
254
|
"--border-color": color,
|
|
255
255
|
"--text-color": text,
|
|
256
|
+
"--btn-outline-border": "initial",
|
|
256
257
|
"--hover-background-color": hover,
|
|
257
258
|
"--hover-border-color": hover,
|
|
258
259
|
"--hover-text-color": text,
|
|
@@ -267,20 +268,22 @@ class YumeButton extends HTMLElement {
|
|
|
267
268
|
"--background-color": "transparent",
|
|
268
269
|
"--border-color": color,
|
|
269
270
|
"--text-color": color,
|
|
271
|
+
"--btn-outline-border": this._outlineBorder(color),
|
|
270
272
|
"--hover-background-color": subtle,
|
|
271
|
-
"--hover-border-color": color,
|
|
273
|
+
"--hover-border-color": this._outlineBorderColor(color),
|
|
272
274
|
"--hover-text-color": color,
|
|
273
275
|
"--focus-background-color": subtle,
|
|
274
|
-
"--focus-border-color": color,
|
|
276
|
+
"--focus-border-color": this._outlineBorderColor(color),
|
|
275
277
|
"--focus-text-color": color,
|
|
276
278
|
"--active-background-color": color,
|
|
277
|
-
"--active-border-color": color,
|
|
279
|
+
"--active-border-color": this._outlineBorderColor(color),
|
|
278
280
|
"--active-text-color": text,
|
|
279
281
|
},
|
|
280
282
|
flat: {
|
|
281
283
|
"--background-color": "transparent",
|
|
282
284
|
"--border-color": "transparent",
|
|
283
285
|
"--text-color": color,
|
|
286
|
+
"--btn-outline-border": "initial",
|
|
284
287
|
"--hover-background-color": subtle,
|
|
285
288
|
"--hover-border-color": subtle,
|
|
286
289
|
"--hover-text-color": color,
|
|
@@ -361,9 +364,9 @@ class YumeButton extends HTMLElement {
|
|
|
361
364
|
this.button.style.setProperty("--button-gap", shared);
|
|
362
365
|
|
|
363
366
|
const minSizeMapping = {
|
|
364
|
-
small: "var(--sizing-small, 32px)",
|
|
365
|
-
medium: "var(--sizing-medium, 40px)",
|
|
366
|
-
large: "var(--sizing-large, 56px)",
|
|
367
|
+
small: "var(--component-control-height-small, var(--sizing-small, 32px))",
|
|
368
|
+
medium: "var(--component-control-height-medium, var(--sizing-medium, 40px))",
|
|
369
|
+
large: "var(--component-control-height-large, var(--sizing-large, 56px))",
|
|
367
370
|
};
|
|
368
371
|
this.button.style.setProperty(
|
|
369
372
|
"--button-min-height",
|
|
@@ -400,7 +403,13 @@ class YumeButton extends HTMLElement {
|
|
|
400
403
|
position: relative;
|
|
401
404
|
overflow: hidden;
|
|
402
405
|
border-radius: var(--component-button-border-radius-outer, 4px);
|
|
403
|
-
|
|
406
|
+
/* Style + color come from the shorthand (its width stays a
|
|
407
|
+
fixed, always-valid 1px); the real width is applied as a
|
|
408
|
+
longhand below so --component-button-border-width can take a
|
|
409
|
+
1–4 value pattern (e.g. "1px 2px") for per-side widths
|
|
410
|
+
without invalidating the shorthand. */
|
|
411
|
+
border: var(--btn-outline-border, 1px solid var(--border-color, var(--base-content--, #f7f7fa)));
|
|
412
|
+
border-width: var(--component-button-border-width, 1px);
|
|
404
413
|
background: var(--background-color, #0c0c0d);
|
|
405
414
|
transition: background-color 0.1s, color 0.1s, border-color 0.1s;
|
|
406
415
|
cursor: pointer;
|
|
@@ -463,7 +472,9 @@ class YumeButton extends HTMLElement {
|
|
|
463
472
|
}
|
|
464
473
|
|
|
465
474
|
_applyUnfilledInteractionStyles(vars, styleType) {
|
|
466
|
-
const borderColor =
|
|
475
|
+
const borderColor = this._outlineBorderColor(
|
|
476
|
+
`var(${vars[7]}, var(${vars[0]}, #f7f7fa))`,
|
|
477
|
+
);
|
|
467
478
|
|
|
468
479
|
this.button.style.setProperty(
|
|
469
480
|
"--hover-background-color",
|
|
@@ -522,6 +533,7 @@ class YumeButton extends HTMLElement {
|
|
|
522
533
|
"--primary-background-hover",
|
|
523
534
|
"--primary-background-active",
|
|
524
535
|
"--primary-content-inverse",
|
|
536
|
+
"--primary-border",
|
|
525
537
|
],
|
|
526
538
|
secondary: [
|
|
527
539
|
"--secondary-content--",
|
|
@@ -531,6 +543,7 @@ class YumeButton extends HTMLElement {
|
|
|
531
543
|
"--secondary-background-hover",
|
|
532
544
|
"--secondary-background-active",
|
|
533
545
|
"--secondary-content-inverse",
|
|
546
|
+
"--secondary-border",
|
|
534
547
|
],
|
|
535
548
|
base: [
|
|
536
549
|
"--base-content--",
|
|
@@ -540,6 +553,7 @@ class YumeButton extends HTMLElement {
|
|
|
540
553
|
"--base-background-hover",
|
|
541
554
|
"--base-background-active",
|
|
542
555
|
"--base-content-inverse",
|
|
556
|
+
"--base-border",
|
|
543
557
|
],
|
|
544
558
|
success: [
|
|
545
559
|
"--success-content--",
|
|
@@ -549,6 +563,7 @@ class YumeButton extends HTMLElement {
|
|
|
549
563
|
"--success-background-hover",
|
|
550
564
|
"--success-background-active",
|
|
551
565
|
"--success-content-inverse",
|
|
566
|
+
"--success-border",
|
|
552
567
|
],
|
|
553
568
|
error: [
|
|
554
569
|
"--error-content--",
|
|
@@ -558,6 +573,7 @@ class YumeButton extends HTMLElement {
|
|
|
558
573
|
"--error-background-hover",
|
|
559
574
|
"--error-background-active",
|
|
560
575
|
"--error-content-inverse",
|
|
576
|
+
"--error-border",
|
|
561
577
|
],
|
|
562
578
|
warning: [
|
|
563
579
|
"--warning-content--",
|
|
@@ -567,6 +583,7 @@ class YumeButton extends HTMLElement {
|
|
|
567
583
|
"--warning-background-hover",
|
|
568
584
|
"--warning-background-active",
|
|
569
585
|
"--warning-content-inverse",
|
|
586
|
+
"--warning-border",
|
|
570
587
|
],
|
|
571
588
|
help: [
|
|
572
589
|
"--help-content--",
|
|
@@ -576,6 +593,7 @@ class YumeButton extends HTMLElement {
|
|
|
576
593
|
"--help-background-hover",
|
|
577
594
|
"--help-background-active",
|
|
578
595
|
"--help-content-inverse",
|
|
596
|
+
"--help-border",
|
|
579
597
|
],
|
|
580
598
|
};
|
|
581
599
|
}
|
|
@@ -762,6 +780,14 @@ class YumeButton extends HTMLElement {
|
|
|
762
780
|
});
|
|
763
781
|
}
|
|
764
782
|
|
|
783
|
+
_outlineBorder(defaultColor) {
|
|
784
|
+
return `var(--component-button-outline-border, 1px solid ${this._outlineBorderColor(defaultColor)})`;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
_outlineBorderColor(defaultColor) {
|
|
788
|
+
return `var(--component-button-outline-border-color, ${defaultColor})`;
|
|
789
|
+
}
|
|
790
|
+
|
|
765
791
|
_updateStyles() {
|
|
766
792
|
const { color, size, styleType } = this;
|
|
767
793
|
const colorVars = this._getColorVarsMap();
|
|
@@ -778,16 +804,21 @@ class YumeButton extends HTMLElement {
|
|
|
778
804
|
"--background-color": `var(${vars[3]}, #0c0c0d)`,
|
|
779
805
|
"--border-color": `var(${vars[0]}, #f7f7fa)`,
|
|
780
806
|
"--text-color": `var(${vars[0]}, #f7f7fa)`,
|
|
807
|
+
"--btn-outline-border": this._outlineBorder(
|
|
808
|
+
`var(${vars[7]}, var(${vars[0]}, #f7f7fa))`,
|
|
809
|
+
),
|
|
781
810
|
},
|
|
782
811
|
filled: {
|
|
783
812
|
"--background-color": `var(${vars[0]}, #f7f7fa)`,
|
|
784
813
|
"--border-color": `var(${vars[0]}, #f7f7fa)`,
|
|
785
814
|
"--text-color": `var(${vars[6]}, #0c0c0d)`,
|
|
815
|
+
"--btn-outline-border": "initial",
|
|
786
816
|
},
|
|
787
817
|
flat: {
|
|
788
818
|
"--background-color": `var(${vars[3]},#0c0c0d)`,
|
|
789
819
|
"--border-color": `var(${vars[3]},#0c0c0d)`,
|
|
790
820
|
"--text-color": `var(${vars[0]},#f7f7fa)`,
|
|
821
|
+
"--btn-outline-border": "initial",
|
|
791
822
|
},
|
|
792
823
|
};
|
|
793
824
|
|