@versini/ui-button 12.0.3 → 12.1.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/dist/188.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-button v12.0.3
2
+ @versini/ui-button v12.1.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -189,12 +189,17 @@ const getButtonTextCopyClasses = ({ mode, noBackground, truncate, variant })=>{
189
189
  return clsx(NOT_PLUME, TEXT_COPY_LIGHTER, truncateClass);
190
190
  }
191
191
  /* v8 ignore stop */ };
192
- const getButtonBackgroundClasses = ({ mode, noBackground, variant })=>{
192
+ // Aqua-style split background overlay:
193
+ // - Top half: flat white overlay (light, uniform)
194
+ // - Bottom half: starts darker, gradually lightens toward the bottom edge
195
+ const BG_SPLIT_OVERLAY = "bg-[linear-gradient(to_bottom,oklch(1_0_0/0.2)_50%,oklch(0_0_0/0.1)_50%,oklch(1_0_0/0.05)_100%)]";
196
+ const getButtonBackgroundClasses = ({ mode, noBackground, variant, splitBackground })=>{
193
197
  if (noBackground) {
194
198
  return;
195
199
  }
200
+ const splitClass = splitBackground ? BG_SPLIT_OVERLAY : "";
196
201
  if (isPrimary(variant)) {
197
- return clsx({
202
+ return clsx(splitClass, {
198
203
  [BG_ACTION_LIGHT]: isLight(mode),
199
204
  [BG_ACTION_DARK]: isDark(mode),
200
205
  [BG_LIGHT_DARK_DARK]: isSystem(mode),
@@ -202,7 +207,7 @@ const getButtonBackgroundClasses = ({ mode, noBackground, variant })=>{
202
207
  });
203
208
  }
204
209
  if (isSecondary(variant)) {
205
- return clsx({
210
+ return clsx(splitClass, {
206
211
  [BG_ACTION_DARK]: isLight(mode),
207
212
  [BG_ACTION_LIGHT]: isDark(mode),
208
213
  [BG_DARK_DARK_LIGHT]: isSystem(mode),
@@ -210,7 +215,7 @@ const getButtonBackgroundClasses = ({ mode, noBackground, variant })=>{
210
215
  });
211
216
  }
212
217
  if (isDanger(variant)) {
213
- return clsx({
218
+ return clsx(splitClass, {
214
219
  [BG_DANGER_DARK]: isDark(mode),
215
220
  [BG_DANGER_LIGHT]: isLight(mode),
216
221
  [BG_DANGER_DARK_DARK_LIGHT]: isSystem(mode),
@@ -218,7 +223,7 @@ const getButtonBackgroundClasses = ({ mode, noBackground, variant })=>{
218
223
  });
219
224
  }
220
225
  /* v8 ignore start - selected variant edge case */ if (isSelected(variant)) {
221
- return "bg-action-selected-dark";
226
+ return clsx(splitClass, "bg-action-selected-dark");
222
227
  }
223
228
  /* v8 ignore stop */ };
224
229
  const getButtonRadiusClasses = ({ radius })=>{
@@ -413,7 +418,7 @@ const getBadgeClasses = ({ size, badge })=>{
413
418
  displayValue
414
419
  };
415
420
  };
416
- const getButtonClasses = ({ type, className, raw, mode, focusMode, disabled, fullWidth, size, noBorder, labelRight, labelLeft, noBackground, variant, truncate, align, radius, animated, badge })=>{
421
+ const getButtonClasses = ({ type, className, raw, mode, focusMode, disabled, fullWidth, size, noBorder, labelRight, labelLeft, noBackground, variant, truncate, align, radius, animated, badge, splitBackground })=>{
417
422
  if (!variant) {
418
423
  variant = "primary";
419
424
  }
@@ -426,7 +431,8 @@ const getButtonClasses = ({ type, className, raw, mode, focusMode, disabled, ful
426
431
  }), getButtonBackgroundClasses({
427
432
  mode,
428
433
  noBackground,
429
- variant
434
+ variant,
435
+ splitBackground
430
436
  }), getButtonRadiusClasses({
431
437
  radius
432
438
  }), getButtonSizesClasses({
package/dist/370.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-button v12.0.3
2
+ @versini/ui-button v12.1.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -28,7 +28,7 @@ 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, ref, ...otherProps }) {
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 }) {
32
32
  const buttonClass = getButtonClasses({
33
33
  type: TYPE_ICON,
34
34
  mode,
@@ -46,7 +46,8 @@ function ButtonIcon({ children, disabled = false, mode = "system", focusMode = "
46
46
  radius,
47
47
  variant,
48
48
  animated,
49
- badge
49
+ badge,
50
+ splitBackground
50
51
  });
51
52
  const iconClass = getIconClasses({
52
53
  mode,
package/dist/795.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-button v12.0.3
2
+ @versini/ui-button v12.1.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, ref, ...otherProps }: ButtonTypes.Props): import("react/jsx-runtime").JSX.Element;
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;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-button v12.0.3
2
+ @versini/ui-button v12.1.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -9,7 +9,7 @@ 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", ref, ...otherProps }) {
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 }) {
13
13
  const buttonClass = getButtonClasses({
14
14
  type: TYPE_BUTTON,
15
15
  mode,
@@ -22,7 +22,8 @@ function Button({ children, disabled = false, mode = "system", focusMode = "syst
22
22
  noBorder,
23
23
  variant,
24
24
  truncate,
25
- radius
25
+ radius,
26
+ splitBackground
26
27
  });
27
28
  return /*#__PURE__*/ jsx(BaseButton_private, {
28
29
  ref: ref,
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-button v12.0.3
2
+ @versini/ui-button v12.1.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, ref, ...otherProps }: ButtonIconTypes.Props): import("react/jsx-runtime").JSX.Element;
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;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-button v12.0.3
2
+ @versini/ui-button v12.1.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, ref, ...otherProps }: ButtonLinkTypes.Props): import("react/jsx-runtime").JSX.Element;
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;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-button v12.0.3
2
+ @versini/ui-button v12.1.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -8,7 +8,7 @@ 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", ref, ...otherProps }) {
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 }) {
12
12
  const buttonClass = getButtonClasses({
13
13
  type: TYPE_LINK,
14
14
  mode,
@@ -20,7 +20,8 @@ function ButtonLink({ children, mode = "system", focusMode = "system", fullWidth
20
20
  size,
21
21
  noBorder,
22
22
  truncate,
23
- radius
23
+ radius,
24
+ splitBackground
24
25
  });
25
26
  const newWindow = target === "_blank";
26
27
  const extraProps = {
@@ -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, }: GetButtonClassesProps) => string;
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;
17
17
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-button",
3
- "version": "12.0.3",
3
+ "version": "12.1.0",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -59,16 +59,16 @@
59
59
  },
60
60
  "devDependencies": {
61
61
  "@testing-library/jest-dom": "6.9.1",
62
- "@versini/ui-types": "8.3.0"
62
+ "@versini/ui-types": "8.4.0"
63
63
  },
64
64
  "dependencies": {
65
65
  "@versini/ui-hooks": "6.1.1",
66
- "@versini/ui-icons": "4.19.0",
66
+ "@versini/ui-icons": "4.19.2",
67
67
  "clsx": "2.1.1",
68
68
  "tailwindcss": "4.2.1"
69
69
  },
70
70
  "sideEffects": [
71
71
  "**/*.css"
72
72
  ],
73
- "gitHead": "4031959707f3c3fd06007b28b07f77d7a7692516"
73
+ "gitHead": "08f46d8b356d5cfbb4e58dca300428ed6bb03789"
74
74
  }