@versini/ui-button 12.3.1 → 13.0.0

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/README.md CHANGED
@@ -175,7 +175,6 @@ function ThemeExamples() {
175
175
  | disabled | `boolean` | `false` | Whether or not the Button is disabled |
176
176
  | fullWidth | `boolean` | `false` | Whether or not the Button is full width |
177
177
  | mode | `"dark" \| "light" \| "system" \| "alt-system"` | `"system"` | The mode of Button |
178
- | focusMode | `"dark" \| "light" \| "system" \| "alt-system"` | `"system"` | The type of focus for the Button |
179
178
  | noBorder | `boolean` | `false` | Whether or not to render the Button with a border |
180
179
  | raw | `boolean` | `false` | Whether or not to render the Button with styles |
181
180
  | radius | `"small" \| "medium" \| "large"` | `"large"` | The rounded style of the Button |
@@ -198,7 +197,7 @@ function ThemeExamples() {
198
197
  | animated | `boolean` | `false` | Whether or not to animate the label when displayed |
199
198
  | iconClassName | `string` | - | The extra class name to pass to the icon itself |
200
199
 
201
- _Inherits all common button props (mode, focusMode, disabled, etc.)_
200
+ _Inherits all common button props (mode, disabled, etc.)_
202
201
 
203
202
  ### ButtonLink Props
204
203
 
package/dist/188.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-button v12.3.1
2
+ @versini/ui-button v13.0.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -70,12 +70,6 @@ const BORDER_DANGER_DARK = "border-border-danger-dark";
70
70
  const BORDER_DARK_MEDIUM = "border-border-medium dark:border-border-medium";
71
71
  const BORDER_DANGER_DARK_DARK_MEDIUM = "border-border-danger-dark dark:border-border-danger-medium";
72
72
  const BORDER_DANGER_MEDIUM_DARK_DARK = "border-border-danger-medium dark:border-border-danger-dark";
73
- // Focus classes
74
- const FOCUS_LIGHT = "focus:outline-focus-light";
75
- const FOCUS_DARK = "focus:outline-focus-dark";
76
- // System mode compound focus classes
77
- const FOCUS_LIGHT_DARK_DARK = "focus:outline-focus-light dark:focus:outline-focus-dark";
78
- const FOCUS_DARK_DARK_LIGHT = "focus:outline-focus-dark dark:focus:outline-focus-light";
79
73
  // Common utility classes
80
74
  const NOT_PLUME = "not-plume";
81
75
  // Size classes
@@ -339,13 +333,8 @@ const getButtonBorderClasses = ({ mode, noBorder, variant })=>{
339
333
  return "border border-border-selected-dark";
340
334
  }
341
335
  /* v8 ignore stop */ };
342
- const getButtonFocusClasses = ({ focusMode })=>{
343
- return clsx("focus:outline-2 focus:outline-offset-2", {
344
- [FOCUS_DARK]: isDark(focusMode),
345
- [FOCUS_LIGHT]: isLight(focusMode),
346
- [FOCUS_LIGHT_DARK_DARK]: isAltSystem(focusMode),
347
- [FOCUS_DARK_DARK_LIGHT]: isSystem(focusMode)
348
- });
336
+ const getButtonFocusClasses = ()=>{
337
+ return clsx("focus:outline-2 focus:outline-offset-2 focus:outline-focus-dark");
349
338
  };
350
339
  const getIconClasses = ({ mode, raw, iconClassName, variant = "primary" })=>{
351
340
  if (raw) {
@@ -412,7 +401,7 @@ const getBadgeClasses = ({ size, badge })=>{
412
401
  displayValue
413
402
  };
414
403
  };
415
- const getButtonClasses = ({ type, className, raw, mode, focusMode, disabled, fullWidth, size, noBorder, labelRight, labelLeft, noBackground, variant, truncate, align, radius, animated, badge, splitBackground })=>{
404
+ const getButtonClasses = ({ type, className, raw, mode, disabled, fullWidth, size, noBorder, labelRight, labelLeft, noBackground, variant, truncate, align, radius, animated, badge, splitBackground })=>{
416
405
  if (!variant) {
417
406
  variant = "primary";
418
407
  }
@@ -445,9 +434,7 @@ const getButtonClasses = ({ type, className, raw, mode, focusMode, disabled, ful
445
434
  mode,
446
435
  variant,
447
436
  noBorder
448
- }), getButtonFocusClasses({
449
- focusMode
450
- }), getButtonHoverClasses({
437
+ }), getButtonFocusClasses(), getButtonHoverClasses({
451
438
  mode,
452
439
  variant,
453
440
  disabled
package/dist/370.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-button v12.3.1
2
+ @versini/ui-button v13.0.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -28,11 +28,10 @@ const PADDINGS = {
28
28
  };
29
29
  const BORDERS = 2; // border x 2
30
30
  const ANIMATION_DURATION = 300; // ms - should match the CSS transition duration
31
- function ButtonIcon({ children, disabled = false, mode = "system", focusMode = "system", fullWidth = false, className, type = "button", raw = false, noBorder = false, "aria-label": ariaLabel, label, size = "medium", labelRight, labelLeft, noBackground = false, align = "center", radius = "large", variant = "secondary", iconClassName, animated = false, badge, splitBackground = false, ref, ...otherProps }) {
31
+ function ButtonIcon({ children, disabled = false, mode = "system", fullWidth = false, className, type = "button", raw = false, noBorder = false, "aria-label": ariaLabel, label, size = "medium", labelRight, labelLeft, noBackground = false, align = "center", radius = "large", variant = "secondary", iconClassName, animated = false, badge, splitBackground = false, ref, ...otherProps }) {
32
32
  const buttonClass = getButtonClasses({
33
33
  type: TYPE_ICON,
34
34
  mode,
35
- focusMode,
36
35
  fullWidth,
37
36
  disabled,
38
37
  raw,
package/dist/795.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-button v12.3.1
2
+ @versini/ui-button v13.0.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,2 +1,2 @@
1
1
  import type { ButtonTypes } from "@versini/ui-types";
2
- export declare function Button({ children, disabled, mode, focusMode, fullWidth, className, size, raw, noBorder, variant, truncate, radius, splitBackground, ref, ...otherProps }: ButtonTypes.Props): import("react/jsx-runtime").JSX.Element;
2
+ export declare function Button({ children, disabled, mode, fullWidth, className, size, raw, noBorder, variant, truncate, radius, splitBackground, ref, ...otherProps }: ButtonTypes.Props): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-button v12.3.1
2
+ @versini/ui-button v13.0.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -9,11 +9,10 @@ import { BaseButton_private } from "../../795.js";
9
9
 
10
10
 
11
11
 
12
- function Button({ children, disabled = false, mode = "system", focusMode = "system", fullWidth = false, className, size = "medium", raw = false, noBorder = false, variant = "primary", truncate = false, radius = "large", splitBackground = false, ref, ...otherProps }) {
12
+ function Button({ children, disabled = false, mode = "system", fullWidth = false, className, size = "medium", raw = false, noBorder = false, variant = "primary", truncate = false, radius = "large", splitBackground = false, ref, ...otherProps }) {
13
13
  const buttonClass = getButtonClasses({
14
14
  type: TYPE_BUTTON,
15
15
  mode,
16
- focusMode,
17
16
  fullWidth,
18
17
  disabled,
19
18
  raw,
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-button v12.3.1
2
+ @versini/ui-button v13.0.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,2 +1,2 @@
1
1
  import type { ButtonIconTypes } from "@versini/ui-types";
2
- export declare function ButtonIcon({ children, disabled, mode, focusMode, fullWidth, className, type, raw, noBorder, "aria-label": ariaLabel, label, size, labelRight, labelLeft, noBackground, align, radius, variant, iconClassName, animated, badge, splitBackground, ref, ...otherProps }: ButtonIconTypes.Props): import("react/jsx-runtime").JSX.Element;
2
+ export declare function ButtonIcon({ children, disabled, mode, fullWidth, className, type, raw, noBorder, "aria-label": ariaLabel, label, size, labelRight, labelLeft, noBackground, align, radius, variant, iconClassName, animated, badge, splitBackground, ref, ...otherProps }: ButtonIconTypes.Props): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-button v12.3.1
2
+ @versini/ui-button v13.0.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -1,2 +1,2 @@
1
1
  import type { ButtonLinkTypes } from "@versini/ui-types";
2
- export declare function ButtonLink({ children, mode, focusMode, fullWidth, className, size, raw, noBorder, target, truncate, noNewWindowIcon, radius, splitBackground, ref, ...otherProps }: ButtonLinkTypes.Props): import("react/jsx-runtime").JSX.Element;
2
+ export declare function ButtonLink({ children, mode, fullWidth, className, size, raw, noBorder, target, truncate, noNewWindowIcon, radius, splitBackground, ref, ...otherProps }: ButtonLinkTypes.Props): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-button v12.3.1
2
+ @versini/ui-button v13.0.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -8,11 +8,10 @@ import { jsxs, getButtonClasses, TYPE_LINK, clsx, jsx } from "../../188.js";
8
8
 
9
9
 
10
10
 
11
- function ButtonLink({ children, mode = "system", focusMode = "system", fullWidth = false, className, size = "small", raw = false, noBorder = false, target, truncate = false, noNewWindowIcon = false, radius = "large", splitBackground = false, ref, ...otherProps }) {
11
+ function ButtonLink({ children, mode = "system", fullWidth = false, className, size = "small", raw = false, noBorder = false, target, truncate = false, noNewWindowIcon = false, radius = "large", splitBackground = false, ref, ...otherProps }) {
12
12
  const buttonClass = getButtonClasses({
13
13
  type: TYPE_LINK,
14
14
  mode,
15
- focusMode,
16
15
  fullWidth,
17
16
  disabled: false,
18
17
  raw,
@@ -13,5 +13,5 @@ export declare const getBadgeClasses: ({ size, badge, }: Pick<ButtonIconTypes.Pr
13
13
  className: string;
14
14
  displayValue: string | null;
15
15
  } | null;
16
- export declare const getButtonClasses: ({ type, className, raw, mode, focusMode, disabled, fullWidth, size, noBorder, labelRight, labelLeft, noBackground, variant, truncate, align, radius, animated, badge, splitBackground, }: GetButtonClassesProps) => string;
16
+ export declare const getButtonClasses: ({ type, className, raw, mode, disabled, fullWidth, size, noBorder, labelRight, labelLeft, noBackground, variant, truncate, align, radius, animated, badge, splitBackground, }: GetButtonClassesProps) => string;
17
17
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-button",
3
- "version": "12.3.1",
3
+ "version": "13.0.0",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -59,7 +59,7 @@
59
59
  },
60
60
  "devDependencies": {
61
61
  "@testing-library/jest-dom": "6.9.1",
62
- "@versini/ui-types": "8.4.0"
62
+ "@versini/ui-types": "9.0.0"
63
63
  },
64
64
  "dependencies": {
65
65
  "@versini/ui-hooks": "6.1.1",
@@ -70,5 +70,5 @@
70
70
  "sideEffects": [
71
71
  "**/*.css"
72
72
  ],
73
- "gitHead": "2b4b581f8eb4e12cf4a2d6e0c40583f0f86d3b4c"
73
+ "gitHead": "a295349019d1512796f266bba535de383f12b6ee"
74
74
  }