@allxsmith/bestax-bulma 5.65.0 → 5.65.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allxsmith/bestax-bulma",
3
- "version": "5.65.0",
3
+ "version": "5.65.1",
4
4
  "description": "Component library based on React, Bulma, with Agent Skills and MCP",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.esm.js",
@@ -40,7 +40,7 @@
40
40
  "@typescript-eslint/parser": "^8.72.1",
41
41
  "@vitest/browser-playwright": "^5.0.5",
42
42
  "@vitest/coverage-istanbul": "^5.0.5",
43
- "eslint": "^10.13.0",
43
+ "eslint": "^10.14.0",
44
44
  "eslint-config-prettier": "^10.1.5",
45
45
  "eslint-plugin-prettier": "^5.5.7",
46
46
  "eslint-plugin-react-hooks": "^7.1.1",
@@ -52,13 +52,13 @@
52
52
  "playwright": "^1.64.1",
53
53
  "prettier": "^3.9.10",
54
54
  "rimraf": "^6.0.1",
55
- "rollup": "^4.66.0",
55
+ "rollup": "^4.67.4",
56
56
  "rollup-plugin-scss": "^4.0.1",
57
57
  "rollup-plugin-visualizer": "^7.1.1",
58
- "sass": "^1.107.0",
59
- "sass-embedded": "^1.107.0",
58
+ "sass": "^1.107.1",
59
+ "sass-embedded": "^1.107.1",
60
60
  "storybook": "^10.6.5",
61
- "tslib": "^2.8.0",
61
+ "tslib": "^2.9.1",
62
62
  "typescript": "^6.0.3",
63
63
  "vite": "^8.3.5",
64
64
  "vitest": "^5.0.5"
@@ -1,6 +1,6 @@
1
1
  # scss/ — styles for the bestax "extras"
2
2
 
3
- **Only extras get SCSS.** Components that are stock Bulma (Button, Card, Navbar, …) ship no CSS
3
+ **Only extras get SCSS.** Components that are stock Bulma (Box, Card, Navbar, …) ship no CSS
4
4
  of their own — Bulma provides it. A partial exists only for components that extend beyond Bulma
5
5
  (Carousel, Collapse, Dialog, the extended form inputs, …) — or that extend a stock component
6
6
  (e.g. `_tabs.scss` adds vertical Tabs). The `_index.scss` files are the authoritative inventory.
@@ -0,0 +1,49 @@
1
+ // Bestax Extras - Button Styles
2
+ // Bulma's control mixin sets `outline: none` on a focused button and shows
3
+ // focus through the button's border color and a box-shadow instead. Where
4
+ // those show nothing, these give the button Bulma's focus outline, in its
5
+ // focus color, style, width and offset:
6
+ //
7
+ // - A ghost button, which Bulma draws with no border and no shadow, so it
8
+ // shows no focus at all. This one applies outside forced colors too.
9
+ // - Every button in forced colors (Windows' contrast themes), which drops the
10
+ // shadow and forces the border's color, so a focused button can look just
11
+ // like an unfocused one there. A ghost button matches both rules there,
12
+ // and they draw the same outline. A loading button is left to
13
+ // `_loader.scss`, which turns forcing off on it and rings it in the
14
+ // system's colors.
15
+ //
16
+ // `.is-focused` is the class `isFocused` sets, so it gets the outline too.
17
+ // The ghost rule doesn't ask for LinkButton's class, since a ghost Button has
18
+ // none.
19
+ //
20
+ // Bulma's CSS can land on either side of this partial, as `_loader.scss`
21
+ // says, so each selector outranks the mixin's rules by its classes: the
22
+ // ghost rule has three to Bulma's two, and the forced colors rule names
23
+ // `.button` twice, as `_delete.scss` does.
24
+
25
+ @use 'bulma/sass/utilities/initial-variables' as iv;
26
+ @use 'bulma/sass/utilities/css-variables' as cv;
27
+
28
+ @mixin -focus-outline {
29
+ outline-color: hsl(
30
+ cv.getVar('focus-h'),
31
+ cv.getVar('focus-s'),
32
+ cv.getVar('focus-l')
33
+ );
34
+ outline-offset: cv.getVar('focus-offset');
35
+ outline-style: cv.getVar('focus-style');
36
+ outline-width: cv.getVar('focus-width');
37
+ }
38
+
39
+ .#{iv.$class-prefix}button.#{iv.$class-prefix}is-ghost:focus-visible,
40
+ .#{iv.$class-prefix}button.#{iv.$class-prefix}is-ghost.#{iv.$class-prefix}is-focused {
41
+ @include -focus-outline;
42
+ }
43
+
44
+ @media (forced-colors: active) {
45
+ .#{iv.$class-prefix}button.#{iv.$class-prefix}button:not(.#{iv.$class-prefix}is-loading):focus-visible,
46
+ .#{iv.$class-prefix}button.#{iv.$class-prefix}button:not(.#{iv.$class-prefix}is-loading).#{iv.$class-prefix}is-focused {
47
+ @include -focus-outline;
48
+ }
49
+ }
@@ -2,6 +2,7 @@
2
2
  // Import all element partials here
3
3
 
4
4
  // Element Components
5
+ @use 'button';
5
6
  @use 'colorswatch';
6
7
  @use 'delete';
7
8
  @use 'descriptionlist';
@@ -72,14 +72,16 @@
72
72
  // `<button>`, a link's for a link, and no surface for a variant that has
73
73
  // none, as below. Forcing off reaches everything inside too, which the
74
74
  // rule at the top already hides. It also stops the browser recoloring the
75
- // border to show focus, so a focused one gets an outline.
75
+ // border to show focus, so a focused one gets an outline, and so does one
76
+ // with `is-focused`.
76
77
  .#{iv.$class-prefix}button.#{iv.$class-prefix}is-loading {
77
78
  forced-color-adjust: none;
78
79
  background-color: Canvas !important;
79
80
  border-color: CanvasText !important;
80
81
  color: transparent !important;
81
82
 
82
- &:focus-visible {
83
+ &:focus-visible,
84
+ &.#{iv.$class-prefix}is-focused {
83
85
  outline: 2px solid CanvasText;
84
86
  outline-offset: 2px;
85
87
  }
@@ -100,7 +102,8 @@
100
102
  background-color: ButtonFace !important;
101
103
  border-color: ButtonText !important;
102
104
 
103
- &:focus-visible {
105
+ &:focus-visible,
106
+ &.#{iv.$class-prefix}is-focused {
104
107
  outline-color: ButtonText;
105
108
  }
106
109
  }
@@ -108,7 +111,8 @@
108
111
  a[href].#{iv.$class-prefix}button.#{iv.$class-prefix}is-loading {
109
112
  border-color: LinkText !important;
110
113
 
111
- &:focus-visible {
114
+ &:focus-visible,
115
+ &.#{iv.$class-prefix}is-focused {
112
116
  outline-color: LinkText;
113
117
  }
114
118
  }
@@ -123,7 +127,8 @@
123
127
  background-color: transparent !important;
124
128
  border-color: CanvasText !important;
125
129
 
126
- &:focus-visible {
130
+ &:focus-visible,
131
+ &.#{iv.$class-prefix}is-focused {
127
132
  outline-color: CanvasText;
128
133
  }
129
134
  }