@synerise/ds-button 2.1.6 → 2.2.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/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.2.1](https://github.com/synerise/synerise-design/compare/@synerise/ds-button@2.2.0...@synerise/ds-button@2.2.1) (2026-11-03)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-button
9
+
10
+
11
+
12
+
13
+
14
+ # [2.2.0](https://github.com/synerise/synerise-design/compare/@synerise/ds-button@2.1.6...@synerise/ds-button@2.2.0) (2026-10-29)
15
+
16
+
17
+ ### Features
18
+
19
+ * integrate Token Studio design tokens across the design system ([aabb447](https://github.com/synerise/synerise-design/commit/aabb447edfb2d0c85e3de1f07e809ef84083453b))
20
+
21
+
22
+
23
+
24
+
6
25
  ## [2.1.6](https://github.com/synerise/synerise-design/compare/@synerise/ds-button@2.1.5...@synerise/ds-button@2.1.6) (2026-10-28)
7
26
 
8
27
  **Note:** Version bump only for package @synerise/ds-button
package/CLAUDE.md CHANGED
@@ -54,7 +54,7 @@ Uses `:focus-visible` (not `:focus`) so the focus ring only appears on keyboard
54
54
  | `type` | `LiteralStringUnion<ButtonType>` | `'secondary'` | Visual style variant |
55
55
  | `mode` | `LiteralStringUnion<ButtonModes>` | `undefined` | Icon/label layout |
56
56
  | `color` | `string` | `'red'` | Colour token for `custom-color` / `custom-color-ghost` types |
57
- | `iconColor` | `string` | `undefined` | Colour token for icon colour on secondary/tertiary/ghost types |
57
+ | `iconColor` | `string` | `undefined` | Icon colour on secondary/tertiary/ghost types: a custom-colour family maps to its 600 token, another CSS colour passes through, anything else is ignored (no red fallback) |
58
58
  | `groupVariant` | `'left-rounded' \| 'squared' \| 'right-rounded'` | `undefined` | Corner rounding for button groups |
59
59
  | `justifyContent` | `JustifyContentProperty` | `'center'` | CSS justify-content |
60
60
  | `loading` | `boolean \| { delay?: number }` | `false` | Shows spinning overlay |
@@ -161,6 +161,13 @@ Star favourite toggle. Uses `Button`.
161
161
  - **`custom-color-ghost`** — has its own variant entry in `Button.variants.ts` (maps to ghost-primary base styles). Hover preserves the custom color instead of switching to blue.
162
162
  - **`ButtonToggle` blurs after pointer-up** — `setTimeout(..., 200)` removes focus after mouse use.
163
163
  - **`Checkbox` indeterminate click** — always transitions to `checked=true`.
164
+ - **Error state tokens** — `error` uses `--ds-buttons-error-*` (bg default/hover/pressed, border, text default/pressed). Hover is red-200 (was `palette['red-200']`).
165
+ - **Creator tokens** — hover/pressed backgrounds use `--ds-button-creator-bg-hover` / `-bg-pressed`; upload hover text uses `--ds-button-creator-upload-text-hover`.
166
+ - **Variant tokens** — `Button.variants.ts` has no hardcoded colours and no `theme.palette` dependency (`getVariantStyles(type)` takes no palette). Ripples use the variant's `*-bg-active` token (the colour the press builds toward), except tertiary / ghost-secondary / ghost-primary which have their own `--ds-buttons-variant-*-ripple` token. Disabled primary/danger/success use the solid `*-disabled` tokens plus `--ds-buttons-disabled-opacity`, like every other variant, so disabled text dims with the button.
167
+ - **Danger hover/pressed** — `--ds-buttons-variant-primary-danger-bg-hover` is red-500 and `-bg-active` red-700, the same lighter-on-hover / darker-on-press pattern as primary, success and warning (upstream fixed an earlier inverted pair on 2026-10-12).
168
+ - **Split divider** — `splitDividerColor()` uses each variant's own `--ds-buttons-variant-<variant>-separator` token (the one Figma uses). Secondary follows the button's border per state: separator at rest, `--ds-buttons-variant-secondary-border-hover` on hover, `--ds-color-border-brand-strong` pressed. `custom-color` takes the 500 shade of the chosen colour, because the static `custom-color-separator` token is blue and cannot follow the `color` prop. The resolved colour is published on the button as `--ds-button-split-separator`, which ButtonGroup `splitMode` reads for the seam before a `single-icon` button, so both split looks share one mapping.
169
+ - **Outer box-shadows are invisible on the button** — `StyledButton` sets `-webkit-mask-image` (Safari ripple fix), which clips to the border box, so only `inset` shadows render. The old danger-hover `0 2px 4px rgba(255,90,77,.2)` never showed and was removed; don't add outer shadows to the button itself.
170
+ - **Intended visual shift (Chromatic)** — Creator `status="upload"` hover text changes from blue-500 to blue-600 (`text.brand.default`). This is a design decision, not a regression.
164
171
 
165
172
  ## Deprecated
166
173
 
@@ -3,25 +3,7 @@ export declare const ACTIVE_DELAY = 200;
3
3
  export declare const Spinner: import('styled-components').StyledComponent<"div", any, {}, never>;
4
4
  export declare const RippleEffect: import('styled-components').StyledComponent<"span", any, {}, never>;
5
5
  export declare const ButtonFocus: import('styled-components').StyledComponent<"div", any, {}, never>;
6
- export declare const Tag: import('styled-components').StyledComponent<import('react').ForwardRefExoticComponent<{
7
- id?: string | number;
8
- name?: string;
9
- textColor?: string;
10
- color?: string;
11
- image?: string;
12
- shape?: import('@synerise/ds-tag').TagShape;
13
- removable?: boolean;
14
- className?: string;
15
- disabled?: boolean;
16
- onClick?: () => void;
17
- onRemove?: (tag: string | number) => void;
18
- prefixel?: React.ReactNode;
19
- suffixel?: React.ReactNode;
20
- texts?: import('@synerise/ds-tag').TagTexts;
21
- asPill?: boolean;
22
- dashed?: boolean;
23
- tooltipProps?: import('@synerise/ds-tooltip').TooltipProps;
24
- } & Omit<import('react').HTMLAttributes<HTMLDivElement>, "image" | "name" | "className" | "color" | "id" | "onClick" | "shape" | "disabled" | "textColor" | "removable" | "onRemove" | "prefixel" | "suffixel" | "texts" | "asPill" | "dashed" | "tooltipProps"> & import('@synerise/ds-utils').DataAttributes & import('react').RefAttributes<HTMLDivElement>>, any, {}, never>;
6
+ export declare const Tag: import('styled-components').StyledComponent<import('react').ForwardRefExoticComponent<import('@synerise/ds-tag').TagProps & import('react').RefAttributes<HTMLDivElement>>, any, {}, never>;
25
7
  export declare const ButtonLabel: import('styled-components').StyledComponent<"div", any, {
26
8
  withTooltip?: boolean;
27
9
  }, never>;
@@ -1,7 +1,7 @@
1
1
  import styled, { css, keyframes } from "styled-components";
2
2
  import { IconContainer } from "@synerise/ds-icon";
3
3
  import DSTag from "@synerise/ds-tag";
4
- import { toCssSize } from "@synerise/ds-utils";
4
+ import { toCssSize, isCssColor, resolveCustomColor } from "@synerise/ds-utils";
5
5
  import BaseButton from "./BaseButton.js";
6
6
  import { getVariantStyles } from "./Button.variants.js";
7
7
  const RIPPLE_ANIMATION_TIME = 500;
@@ -9,7 +9,36 @@ const ACTIVE_DELAY = 200;
9
9
  const leftIcon = "0 4px 0 8px";
10
10
  const rightIcon = "0 8px 0 4px";
11
11
  const rippleInitialSize = 20;
12
- const splitTypes = ["secondary", "tertiary"];
12
+ const customColorToken = (color, shade) => resolveCustomColor(color, resolveCustomColor("red", "transparent", {
13
+ defaultShade: shade
14
+ }), {
15
+ defaultShade: shade,
16
+ passthroughResolved: true
17
+ });
18
+ const ICON_COLOR_OPTIONS = {
19
+ defaultShade: "600",
20
+ passthroughResolved: true
21
+ };
22
+ const iconColorToken = (color) => isCssColor(color) ? resolveCustomColor(color, color, ICON_COLOR_OPTIONS) : resolveCustomColor(color, void 0, ICON_COLOR_OPTIONS);
23
+ const splitSeparatorTokens = {
24
+ primary: "primary",
25
+ secondary: "secondary",
26
+ tertiary: "tertiary",
27
+ "tertiary-white": "tertiary-white",
28
+ ghost: "ghost-secondary",
29
+ "ghost-primary": "ghost-primary",
30
+ "ghost-white": "ghost-secondary-white",
31
+ "custom-color-ghost": "ghost-custom-color",
32
+ danger: "primary-danger",
33
+ success: "primary-success",
34
+ warning: "primary-warning"
35
+ };
36
+ const splitDividerColor = (type, customColor) => {
37
+ if (type === "custom-color") {
38
+ return customColorToken(customColor, "500");
39
+ }
40
+ return `var(--ds-buttons-variant-${splitSeparatorTokens[type] ?? "secondary"}-separator)`;
41
+ };
13
42
  const SINGLE_ICON_WIDTHS = {
14
43
  small: "28px",
15
44
  large: "48px"
@@ -24,7 +53,6 @@ const singleIconWidth = ({
24
53
  }
25
54
  return size && SINGLE_ICON_WIDTHS[size] || SINGLE_ICON_DEFAULT_WIDTH;
26
55
  };
27
- const pressedStyles = (props) => css(["color:", ";background:", ";&.ant-btn .btn-focus{box-shadow:inset 0 0 0 1px ", ";}", " > .ds-icon:before{background-color:", ";}"], props.theme.palette["blue-600"], props.theme.palette["blue-100"], props.theme.palette["blue-300"], ButtonLabel, props.theme.palette["blue-200"]);
28
56
  const spinnerAnimation = /* @__PURE__ */ keyframes(["from{transform:rotateZ(0deg);}to{transform:rotateZ(360deg);}"]);
29
57
  const rippleAnimation = /* @__PURE__ */ keyframes(["from{opacity:1;transform:scale(1);}to{opacity:0;transform:scale(20);}"]);
30
58
  const Spinner = /* @__PURE__ */ styled.div.withConfig({
@@ -53,7 +81,10 @@ const ButtonLabel = /* @__PURE__ */ styled.div.withConfig({
53
81
  const StyledButton = /* @__PURE__ */ styled(BaseButton).withConfig({
54
82
  displayName: "Buttonstyles__StyledButton",
55
83
  componentId: "sc-3lgta1-5"
56
- })(["&&{", " -webkit-mask-image:-webkit-radial-gradient(white,black);display:inline-flex;align-items:center;padding:0 12px;position:relative;overflow:hidden;", " > *:not(.btn-focus){position:relative;z-index:1;}", " > .ds-icon,> .ds-icon{display:flex;align-items:center;justify-content:center;margin:0;width:24px;height:24px;}", " &&.ant-btn-default:not(.ds-expander):not(.ds-button-creator):not(.read-only):not([disabled]),&&.ant-btn-secondary:not(.ds-expander):not(.ds-button-creator):not(.read-only):not([disabled]){.btn-ripple{background-color:", ";}&.pressed{", " color:", ";}&:focus-visible:not(.pressed){color:", ";background:", ";}&:hover:not(:disabled):not(:focus-visible):not(.pressed){background-color:", ";&.ant-btn .btn-focus{box-shadow:inset 0 0 0 1px ", ";}", " > .ds-icon:before{background-color:", ";}}}", " ", ";", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " &:hover:not(:disabled):not(:focus-visible):not(.pressed){", " span{color:", ";cursor:inherit;}}", "}"], (props) => getVariantStyles(props.type, props.theme.palette), ButtonLabel, ButtonLabel, (props) => props.mode !== "single-icon" && css(["&.ant-btn:not(.ds-expander):not(.ds-button-creator):not( .btn-search ):not(.btn-search-open){min-width:54px;}"]), (props) => props.theme.palette["blue-100"], (props) => pressedStyles(props), (props) => props.theme.palette["blue-600"], (props) => props.error ? props.theme.palette["red-600"] : props.theme.palette["grey-600"], (props) => props.theme.palette["grey-050"], (props) => props.theme.palette["blue-050"], (props) => props.theme.palette["blue-300"], ButtonLabel, (props) => props.theme.palette["blue-200"], (props) => props.readOnly && props.type !== "custom-color-ghost" && css(["&&.ant-btn{cursor:default;transition:none;}&&.ant-btn-secondary{&:hover,&:focus-visible{background:", ";.btn-focus{box-shadow:inset 0 0 0 1px ", ";}color:", ";}}&&.ant-btn-primary{&:hover,&:focus-visible{background:", ";.btn-focus{box-shadow:inset 0 0 0 1px ", ";}color:", ";}}&&.ant-btn-tertiary{&:hover,&:focus-visible{background:", ";.btn-focus{box-shadow:none;}color:", ";}}&&.ant-btn-tertiary-white{&:hover,&:focus-visible{background:rgba(219,224,227,0.15);.btn-focus{box-shadow:none;}color:", ";}}&&.ant-btn-ghost-primary{&:hover,&:focus-visible{background:", ";.btn-focus{box-shadow:none;}color:", ";}}&&.ant-btn-ghost{&:hover,&:focus-visible{background:", ";.btn-focus{box-shadow:none;}color:", ";}}&&.ant-btn-ghost-white{&:hover,&:focus-visible{background:", ";.btn-focus{box-shadow:none;}color:", ";}}&&.ant-btn-danger{&:hover,&:focus-visible{background:", ";.btn-focus{box-shadow:none;}color:", ";}}&&.ant-btn-success{&:hover,&:focus-visible{background:", ";.btn-focus{box-shadow:none;}color:", ";}}&&.ant-btn-warning{&:hover,&:focus-visible{background:", ";.btn-focus{box-shadow:none;}color:", ";}}"], props.theme.palette["grey-050"], props.theme.palette["grey-300"], props.theme.palette["grey-700"], props.theme.palette["blue-600"], props.theme.palette["blue-600"], props.theme.palette["grey-050"], props.theme.palette["grey-100"], props.theme.palette["grey-700"], props.theme.palette["grey-050"], props.theme.palette.white, props.theme.palette["blue-600"], props.theme.palette.white, props.theme.palette["grey-600"], props.theme.palette["grey-600"], props.theme.palette["grey-050"], props.theme.palette["red-600"], props.theme.palette.white, props.theme.palette["green-600"], props.theme.palette.white, props.theme.palette["yellow-600"], props.theme.palette.white), (props) => props.loading && css(["> *:not(.btn-focus){opacity:0;visibility:hidden;}", "{opacity:1;visibility:visible;}"], Spinner), (props) => props.iconColor && css(["&.ant-btn:not(:disabled){color:", ";&:hover{color:inherit;}}"], props.theme.palette[`${props.iconColor}-600`]), (props) => props.mode === "split" && css(["&.ant-btn{padding-right:0;transition:0s;", "{position:relative;}", " > .ds-icon{margin:0 4px 0 15px;position:relative;&:before{content:'';background-color:", ";top:", ";height:", ";width:1px;left:-4px;position:absolute;transition:all 0.3s ease;}}}"], ButtonLabel, ButtonLabel, !splitTypes.includes(props.type) ? `rgba(255, 255, 255, 0.15);` : props.theme.palette["grey-300"], props.size === "large" ? "-12px" : "-4px", props.size === "large" ? "48px" : "32px"), (props) => props.mode === "two-icons" && css(["&.ant-btn{padding:0;transition:0s;", " > ", ":first-of-type,", " > .ds-icon:first-of-type,& > ", ":first-of-type,& > .ds-icon:first-of-type{margin:", ";}", " > ", ":nth-of-type(2),", " > .ds-icon:nth-of-type(2),& > ", ":nth-of-type(2),& > .ds-icon:nth-of-type(2){margin:", ";}}", "{margin:0 12px 0 0;}"], ButtonLabel, IconContainer, ButtonLabel, IconContainer, leftIcon, ButtonLabel, IconContainer, ButtonLabel, IconContainer, rightIcon, Tag), (props) => props.mode === "label-icon" && css(["&.ant-btn{padding-right:0;transition:0s;", " > ", ",", " > .ds-icon,& > ", ",& > .ds-icon{margin:", ";}}", "{margin:0 12px 0 0;}"], ButtonLabel, IconContainer, ButtonLabel, IconContainer, rightIcon, Tag), (props) => props.mode === "icon-label" && css(["&.ant-btn{padding-left:0;transition:0s;", " > ", ",", " > .ds-icon,& > ", ",& > .ds-icon{margin:", ";}}"], ButtonLabel, IconContainer, ButtonLabel, IconContainer, leftIcon), (props) => props.mode === "single-icon" && css(["&.ant-btn:not(.ds-expander){display:flex;align-items:center;justify-content:center;padding:0;transition:0s;width:", ";", " > ", ",", " > .ds-icon,& > ", ",& > .ds-icon{margin:0 4px 0 4px;}}"], singleIconWidth(props), ButtonLabel, IconContainer, ButtonLabel, IconContainer), (props) => props.groupVariant === "squared" && css(["&.ant-btn{border-radius:0;}"]), (props) => props.groupVariant === "left-rounded" && css(["&.ant-btn{border-radius:3px 0 0 3px;}"]), (props) => props.groupVariant === "right-rounded" && css(["&.ant-btn{border-radius:0 3px 3px 0;}"]), (props) => props.error && css(["&.ant-btn{background-color:", ";box-shadow:inset 0 0 0 1px ", ";color:", ";.btn-focus{box-shadow:none;}&&:hover:not(:disabled):not(:focus-visible):not(.pressed){background-color:", ";box-shadow:inset 0 0 0 1px ", ";color:", ";}&.pressed{background-color:", ";box-shadow:none;color:", ";}&&:focus-visible:not(.pressed){border:none !important;background-color:", ";color:", ";.btn-focus{box-shadow:inset 0 0 0 2px ", ";}}}", "{background-color:", ";}"], props.theme.palette[`red-100`], props.theme.palette["red-600"], props.theme.palette[`red-600`], props.theme.palette[`red-200`], props.theme.palette["red-600"], props.theme.palette[`red-600`], props.theme.palette[`red-700`], props.theme.palette.white, props.theme.palette[`red-100`], props.theme.palette[`red-600`], props.theme.palette["blue-600"], RippleEffect, props.theme.palette[`red-700`]), (props) => props.error && props.type === "secondary" && css(["&&&.ant-btn{color:", ";.btn-focus{box-shadow:none;}&&&:hover{background-color:", ";.btn-focus{box-shadow:none;}}&&&:focus-visible:not(.pressed){.btn-focus{box-shadow:inset 0 0 0 2px ", ";}}&&&.pressed{background-color:", ";color:", ";}", "{background-color:", ";}}"], props.theme.palette[`red-600`], props.theme.palette[`red-200`], props.theme.palette["blue-600"], props.theme.palette[`red-700`], props.theme.palette.white, RippleEffect, props.theme.palette[`red-700`]), (props) => props.type === "custom-color" && !props.error && css(["&.ant-btn{background-color:", ";border:0 solid transparent;color:", ";", "{box-shadow:inset 0 0 0 0px transparent;}", "{background-color:", ";}&:focus-visible:not(.read-only){", "{box-shadow:inset 0 0 0 2px ", ";}}&:hover:not(:disabled):not(:focus-visible):not(.pressed){background-color:", ";color:", ";}&.pressed{background-color:", ";color:", ";}&:disabled{opacity:0.4;background-color:", ";color:", ";}}"], props.theme.palette[`${props.customColor}-600`], props.theme.palette.white, ButtonFocus, RippleEffect, props.theme.palette[`${props.customColor}-700`], ButtonFocus, props.theme.palette["blue-600"], props.theme.palette[props.readOnly ? `${props.customColor}-600` : `${props.customColor}-500`], props.theme.palette.white, props.theme.palette[`${props.customColor}-700`], props.theme.palette.white, props.theme.palette[`${props.customColor}-600`], props.theme.palette.white), (props) => props.type === "custom-color-ghost" && !props.error && css(["&&{color:", ";&:hover:not(:disabled){color:", ";}&:disabled{opacity:0.4;color:", ";}}"], props.theme.palette[`${props.customColor}-600`], props.theme.palette[`${props.customColor}-600`], props.theme.palette[`${props.customColor}-600`]), (props) => props.readOnly && props.type === "custom-color-ghost" && css(["&&.ant-btn{cursor:default;transition:none;}&&.ant-btn-custom-color-ghost{&:hover,&:focus-visible{background:", ";.btn-focus{box-shadow:inset 0 0 0 0 ", ";}color:", ";}}"], props.theme.palette.white, props.theme.palette.white, props.theme.palette[`${props.customColor}-600`]), Tag, (props) => props.theme.palette.white, (props) => props.fluidMinWidth !== void 0 && css(["", "{min-width:", ";max-width:none;}"], ButtonLabel, toCssSize(props.fluidMinWidth)));
84
+ })(["&&{", " --ds-button-split-separator:", ";-webkit-mask-image:-webkit-radial-gradient(white,black);display:inline-flex;align-items:center;padding:0 12px;position:relative;overflow:hidden;", " > *:not(.btn-focus){position:relative;z-index:1;}", " > .ds-icon,> .ds-icon{display:flex;align-items:center;justify-content:center;margin:0;width:24px;height:24px;}", " &&.ant-btn-default:not(.ds-expander):not(.ds-button-creator):not(.read-only):not([disabled]),&&.ant-btn-secondary:not(.ds-expander):not(.ds-button-creator):not(.read-only):not([disabled]){.btn-ripple{background-color:var(--ds-color-background-brand-subtlehover);}&.pressed{color:var(--ds-buttons-variant-secondary-text-active);background:var(--ds-buttons-variant-secondary-bg-active);&.ant-btn .btn-focus{box-shadow:inset 0 0 0 1px var(--ds-color-border-brand-strong);}", " > .ds-icon:before{background-color:var(--ds-color-border-brand-strong);}}&:focus-visible:not(.pressed){color:", ";background:var(--ds-buttons-variant-secondary-bg-focus);}&:hover:not(:disabled):not(:focus-visible):not(.pressed){background-color:var(--ds-buttons-variant-secondary-bg-hover);&.ant-btn .btn-focus{box-shadow:inset 0 0 0 1px var(--ds-buttons-variant-secondary-border-hover);}", " > .ds-icon:before{background-color:var(--ds-buttons-variant-secondary-border-hover);}}}", " ", ";", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " &:hover:not(:disabled):not(:focus-visible):not(.pressed){", " span{color:var(--ds-color-text-base-onsolid);cursor:inherit;}}", "}"], (props) => getVariantStyles(props.type), (props) => splitDividerColor(props.type, props.customColor), ButtonLabel, ButtonLabel, (props) => props.mode !== "single-icon" && css(["&.ant-btn:not(.ds-expander):not(.ds-button-creator):not( .btn-search ):not(.btn-search-open){min-width:54px;}"]), ButtonLabel, (props) => props.error ? "var(--ds-buttons-error-text-default)" : "var(--ds-buttons-variant-secondary-text-focus)", ButtonLabel, (props) => props.readOnly && props.type !== "custom-color-ghost" && css(["&&.ant-btn{cursor:default;transition:none;}&&.ant-btn-secondary{&:hover,&:focus-visible{background:var(--ds-buttons-variant-secondary-bg-default);.btn-focus{box-shadow:inset 0 0 0 1px var(--ds-buttons-variant-secondary-border-default);}color:var(--ds-buttons-variant-secondary-text-default);}}&&.ant-btn-primary{&:hover,&:focus-visible{background:var(--ds-buttons-variant-primary-bg-default);.btn-focus{box-shadow:inset 0 0 0 1px var(--ds-buttons-variant-primary-bg-default);}color:var(--ds-buttons-variant-primary-text-default);}}&&.ant-btn-tertiary{&:hover,&:focus-visible{background:var(--ds-buttons-variant-tertiary-bg-default);.btn-focus{box-shadow:none;}color:var(--ds-buttons-variant-tertiary-text-default);}}&&.ant-btn-tertiary-white{&:hover,&:focus-visible{background:var(--ds-buttons-variant-tertiary-white-bg-default);.btn-focus{box-shadow:none;}color:var(--ds-buttons-variant-tertiary-white-text-default);}}&&.ant-btn-ghost-primary{&:hover,&:focus-visible{background:var(--ds-buttons-variant-ghost-primary-bg-default);.btn-focus{box-shadow:none;}color:var(--ds-buttons-variant-ghost-primary-text-default);}}&&.ant-btn-ghost{&:hover,&:focus-visible{background:var(--ds-buttons-variant-ghost-secondary-bg-default);.btn-focus{box-shadow:none;}color:var(--ds-buttons-variant-ghost-secondary-text-default);}}&&.ant-btn-ghost-white{&:hover,&:focus-visible{background:var( --ds-buttons-variant-ghost-secondary-white-bg-default );.btn-focus{box-shadow:none;}color:var(--ds-buttons-variant-ghost-secondary-white-text-default);}}&&.ant-btn-danger{&:hover,&:focus-visible{background:var(--ds-buttons-variant-primary-danger-bg-default);.btn-focus{box-shadow:none;}color:var(--ds-buttons-variant-primary-danger-text-default);}}&&.ant-btn-success{&:hover,&:focus-visible{background:var(--ds-buttons-variant-primary-success-bg-default);.btn-focus{box-shadow:none;}color:var(--ds-buttons-variant-primary-success-text-default);}}&&.ant-btn-warning{&:hover,&:focus-visible{background:var(--ds-buttons-variant-primary-warning-bg-default);.btn-focus{box-shadow:none;}color:var(--ds-buttons-variant-primary-warning-text-default);}}"]), (props) => props.loading && css(["> *:not(.btn-focus){opacity:0;visibility:hidden;}", "{opacity:1;visibility:visible;}"], Spinner), (props) => {
85
+ const iconColor = props.iconColor && iconColorToken(props.iconColor);
86
+ return iconColor && css(["&.ant-btn:not(:disabled){color:", ";&:hover{color:inherit;}}"], iconColor);
87
+ }, (props) => props.mode === "split" && css(["&.ant-btn{padding-right:0;transition:0s;", "{position:relative;}", " > .ds-icon{margin:0 4px 0 15px;position:relative;&:before{content:'';background-color:var(--ds-button-split-separator);top:", ";height:", ";width:1px;left:-4px;position:absolute;transition:all 0.3s ease;}}}"], ButtonLabel, ButtonLabel, props.size === "large" ? "-12px" : "-4px", props.size === "large" ? "48px" : "32px"), (props) => props.mode === "two-icons" && css(["&.ant-btn{padding:0;transition:0s;", " > ", ":first-of-type,", " > .ds-icon:first-of-type,& > ", ":first-of-type,& > .ds-icon:first-of-type{margin:", ";}", " > ", ":nth-of-type(2),", " > .ds-icon:nth-of-type(2),& > ", ":nth-of-type(2),& > .ds-icon:nth-of-type(2){margin:", ";}}", "{margin:0 12px 0 0;}"], ButtonLabel, IconContainer, ButtonLabel, IconContainer, leftIcon, ButtonLabel, IconContainer, ButtonLabel, IconContainer, rightIcon, Tag), (props) => props.mode === "label-icon" && css(["&.ant-btn{padding-right:0;transition:0s;", " > ", ",", " > .ds-icon,& > ", ",& > .ds-icon{margin:", ";}}", "{margin:0 12px 0 0;}"], ButtonLabel, IconContainer, ButtonLabel, IconContainer, rightIcon, Tag), (props) => props.mode === "icon-label" && css(["&.ant-btn{padding-left:0;transition:0s;", " > ", ",", " > .ds-icon,& > ", ",& > .ds-icon{margin:", ";}}"], ButtonLabel, IconContainer, ButtonLabel, IconContainer, leftIcon), (props) => props.mode === "single-icon" && css(["&.ant-btn:not(.ds-expander){display:flex;align-items:center;justify-content:center;padding:0;transition:0s;width:", ";", " > ", ",", " > .ds-icon,& > ", ",& > .ds-icon{margin:0 4px 0 4px;}}"], singleIconWidth(props), ButtonLabel, IconContainer, ButtonLabel, IconContainer), (props) => props.groupVariant === "squared" && css(["&.ant-btn{border-radius:0;}"]), (props) => props.groupVariant === "left-rounded" && css(["&.ant-btn{border-radius:3px 0 0 3px;}"]), (props) => props.groupVariant === "right-rounded" && css(["&.ant-btn{border-radius:0 3px 3px 0;}"]), (props) => props.error && css(["&.ant-btn{background-color:var(--ds-buttons-error-bg-default);box-shadow:inset 0 0 0 1px var(--ds-buttons-error-border);color:var(--ds-buttons-error-text-default);.btn-focus{box-shadow:none;}&&:hover:not(:disabled):not(:focus-visible):not(.pressed){background-color:var(--ds-buttons-error-bg-hover);box-shadow:inset 0 0 0 1px var(--ds-buttons-error-border);color:var(--ds-buttons-error-text-default);}&.pressed{background-color:var(--ds-buttons-error-bg-pressed);box-shadow:none;color:var(--ds-buttons-error-text-pressed);}&&:focus-visible:not(.pressed){border:none !important;background-color:var(--ds-buttons-error-bg-default);color:var(--ds-buttons-error-text-default);.btn-focus{box-shadow:inset 0 0 0 2px var(--ds-color-focus-base-default);}}}", "{background-color:var(--ds-buttons-error-bg-pressed);}"], RippleEffect), (props) => props.error && props.type === "secondary" && css(["&&&.ant-btn{color:var(--ds-buttons-error-text-default);.btn-focus{box-shadow:none;}&&&:hover{background-color:var(--ds-buttons-error-bg-hover);.btn-focus{box-shadow:none;}}&&&:focus-visible:not(.pressed){.btn-focus{box-shadow:inset 0 0 0 2px var(--ds-buttons-variant-secondary-border-focus);}}&&&.pressed{background-color:var(--ds-buttons-error-bg-pressed);color:var(--ds-buttons-error-text-pressed);}", "{background-color:var(--ds-buttons-error-bg-pressed);}}"], RippleEffect), (props) => props.type === "custom-color" && !props.error && css(["&.ant-btn{background-color:", ";border:0 solid transparent;color:var(--ds-buttons-variant-custom-color-text-default);", "{box-shadow:inset 0 0 0 0px transparent;}", "{background-color:", ";}&:focus-visible:not(.read-only){", "{box-shadow:inset 0 0 0 2px var(--ds-color-focus-base-default);}}&:hover:not(:disabled):not(:focus-visible):not(.pressed){background-color:", ";color:var(--ds-buttons-variant-custom-color-text-hover);}&.pressed{background-color:", ";color:var(--ds-buttons-variant-custom-color-text-active);}&:disabled{opacity:var(--ds-buttons-disabled-opacity);background-color:", ";color:var(--ds-buttons-variant-custom-color-text-disabled);}}"], customColorToken(props.customColor, "600"), ButtonFocus, RippleEffect, customColorToken(props.customColor, "700"), ButtonFocus, props.readOnly ? customColorToken(props.customColor, "600") : customColorToken(props.customColor, "500"), customColorToken(props.customColor, "700"), customColorToken(props.customColor, "600")), (props) => props.type === "custom-color-ghost" && !props.error && css(["&&{color:", ";&:hover:not(:disabled){color:", ";}&:disabled{opacity:var(--ds-buttons-disabled-opacity);color:", ";}}"], customColorToken(props.customColor, "600"), customColorToken(props.customColor, "600"), customColorToken(props.customColor, "600")), (props) => props.readOnly && props.type === "custom-color-ghost" && css(["&&.ant-btn{cursor:default;transition:none;}&&.ant-btn-custom-color-ghost{&:hover,&:focus-visible{background:var(--ds-color-background-base-default);.btn-focus{box-shadow:inset 0 0 0 0 var(--ds-color-background-base-default);}color:", ";}}"], customColorToken(props.customColor, "600")), Tag, (props) => props.fluidMinWidth !== void 0 && css(["", "{min-width:", ";max-width:none;}"], ButtonLabel, toCssSize(props.fluidMinWidth)));
57
88
  export {
58
89
  ACTIVE_DELAY,
59
90
  ButtonFocus,
@@ -1,16 +1,6 @@
1
1
  import { FlattenSimpleInterpolation } from 'styled-components';
2
- /**
3
- * Button variant styles — direct port of button.mixin.less to styled-components.
4
- *
5
- * Icons use currentColor for fill/stroke and inherit the button's color property,
6
- * so we only set `color` on the button — no direct svg fill/color overrides needed.
7
- */
8
- type Palette = {
9
- [key: string]: string;
10
- };
11
2
  /**
12
3
  * Returns the variant-specific CSS for a given button type.
13
4
  * Falls back to the default/secondary variant for unknown types.
14
5
  */
15
- export declare const getVariantStyles: (type: string | undefined, palette: Palette) => FlattenSimpleInterpolation;
16
- export {};
6
+ export declare const getVariantStyles: (type: string | undefined) => FlattenSimpleInterpolation;
@@ -1,17 +1,17 @@
1
1
  import { css } from "styled-components";
2
2
  const buttonColor = (color, background, border) => css(["color:", ";background:", ";border-color:", ";"], color, background, border);
3
- const buttonDisabled = (color, background, border) => css(["&.disabled,&[disabled]{&,&:hover,&:focus-visible,&:active,&.active{", " box-shadow:none;}}"], buttonColor(color, background, border));
3
+ const buttonDisabled = (color, background, border) => css(["&.disabled,&[disabled]{opacity:var(--ds-buttons-disabled-opacity);&,&:hover,&:focus-visible,&:active,&.active{", " box-shadow:none;}}"], buttonColor(color, background, border));
4
4
  const buttonHover = (color, background, border) => css(["box-shadow:none;&:not(:disabled):not(:focus-visible):not(.pressed){", "}"], buttonColor(color, background, border));
5
- const variantPrimary = (p) => css(["", " .btn-focus{box-shadow:inset 0 0 0 0px ", ";}&:hover{", "}&:focus-visible{", " .btn-focus{box-shadow:inset 0 0 0 2px ", ";}}&.pressed,&.active{", "}.btn-ripple{background-color:", ";}", ""], buttonColor(p.white, p["blue-600"], p["blue-600"]), p["grey-300"], buttonHover(p.white, p["blue-500"], p["blue-500"]), buttonColor(p.white, p["blue-600"], p["blue-700"]), p["blue-700"], buttonColor(p.white, p["blue-700"], p["blue-700"]), p["blue-700"], buttonDisabled(p.white, `rgba(${hexToRgbValues(p["blue-600"])}, 0.4)`, "transparent"));
6
- const variantDefault = (p) => css(["", " .btn-focus{box-shadow:inset 0 0 0 1px ", ";}&:hover{", "}&:focus-visible{", " .btn-focus{box-shadow:inset 0 0 0 2px ", ";}}&.pressed,&.active{", " border-color:", ";}.btn-ripple{background-color:", ";}", ""], buttonColor(p["grey-600"], p["grey-050"], p["grey-300"]), p["grey-300"], buttonHover(p["blue-600"], p.white, p["grey-300"]), buttonColor(p["grey-600"], p["grey-050"], p["grey-300"]), p["blue-600"], buttonColor(p["grey-600"], p["grey-100"], p["grey-100"]), p["grey-300"], p["grey-100"], buttonDisabled(`rgba(${hexToRgbValues(p["grey-700"])}, 0.4)`, `rgba(${hexToRgbValues(p["grey-050"])}, 0.4)`, p["grey-200"]));
7
- const variantTertiary = (p) => css(["", " .btn-focus{box-shadow:inset 0 0 0 0px ", ";}&:hover{", "}&:focus-visible{", " .btn-focus{box-shadow:inset 0 0 0 2px ", ";}}&.pressed,&.active{", "}.btn-ripple{background-color:rgba( ", ",", " );}", ""], buttonColor(p["grey-700"], `rgba(${hexToRgbValues(p["grey-400"])}, 0.15)`, "transparent"), p["grey-300"], buttonHover(p["grey-700"], `rgba(${hexToRgbValues(p["grey-400"])}, 0.25)`, "transparent"), buttonColor(p["grey-700"], `rgba(${hexToRgbValues(p["grey-400"])}, 0.15)`, `rgba(${hexToRgbValues(p["grey-400"])}, 0.15)`), p["blue-600"], buttonColor(p["grey-700"], `rgba(${hexToRgbValues(p["grey-400"])}, 0.35)`, `rgba(${hexToRgbValues(p["grey-400"])}, 0.35)`), hexToRgbValues(p["grey-400"]), rippleAlpha(0.25, 0.35), buttonDisabled(`rgba(${hexToRgbValues(p["grey-700"])}, 0.4)`, `rgba(${hexToRgbValues(p["grey-400"])}, 0.15)`, "transparent"));
8
- const variantTertiaryWhite = (p) => css(["", " .btn-focus{box-shadow:inset 0 0 0 0px ", ";}&:hover{", "}&:focus-visible{", " .btn-focus{box-shadow:inset 0 0 0 2px ", ";}}&.pressed,&.active{", "}.btn-ripple{background-color:rgba( ", ",", " );}", ""], buttonColor(p.white, `rgba(${hexToRgbValues(p["grey-300"])}, 0.15)`, "transparent"), p["blue-600"], buttonHover(p.white, `rgba(${hexToRgbValues(p["grey-300"])}, 0.25)`, "transparent"), buttonColor(p.white, `rgba(${hexToRgbValues(p["grey-300"])}, 0.15)`, `rgba(${hexToRgbValues(p["grey-300"])}, 0.15)`), p["blue-600"], buttonColor(p.white, `rgba(${hexToRgbValues(p["grey-300"])}, 0.1)`, `rgba(${hexToRgbValues(p["grey-300"])}, 0.1)`), hexToRgbValues(p["grey-300"]), rippleAlpha(0.25, 0.1), buttonDisabled(`rgba(255, 255, 255, 0.4)`, `rgba(${hexToRgbValues(p["grey-300"])}, 0.15)`, "transparent"));
9
- const variantGhost = (p) => css(["", " box-shadow:none;border-color:transparent;.btn-focus{box-shadow:inset 0 0 0 0px transparent;}&:hover{", "}&:focus-visible{", " .btn-focus{box-shadow:inset 0 0 0 2px ", ";}}&.pressed,&.active{", "}.btn-ripple{background-color:rgba( ", ",", " );}", ""], buttonColor(p["grey-600"], "transparent", "transparent"), buttonHover(p["blue-600"], `rgba(${hexToRgbValues(p["grey-400"])}, 0.25)`, "transparent"), buttonColor(p["grey-600"], "transparent", "transparent"), p["blue-600"], buttonColor(p["grey-600"], `rgba(${hexToRgbValues(p["grey-400"])}, 0.35)`, `rgba(${hexToRgbValues(p["grey-400"])}, 0.35)`), hexToRgbValues(p["grey-400"]), rippleAlpha(0.25, 0.35), buttonDisabled(`rgba(${hexToRgbValues(p["grey-700"])}, 0.4)`, "transparent", "transparent"));
10
- const variantGhostPrimary = (p) => css(["", " .btn-focus{box-shadow:inset 0 0 0 0px transparent;}&:hover{", "}&:focus-visible{", " .btn-focus{box-shadow:inset 0 0 0 2px ", ";}}&.pressed,&.active{", "}.btn-ripple{background-color:rgba( ", ",", " );}", ""], buttonColor(p["blue-600"], "transparent", "transparent"), buttonHover(p["blue-600"], `rgba(${hexToRgbValues(p["grey-400"])}, 0.25)`, "transparent"), buttonColor(p["blue-600"], "transparent", "transparent"), p["blue-600"], buttonColor(p["blue-600"], `rgba(${hexToRgbValues(p["grey-400"])}, 0.35)`, `rgba(${hexToRgbValues(p["grey-400"])}, 0.35)`), hexToRgbValues(p["grey-400"]), rippleAlpha(0.25, 0.35), buttonDisabled(`rgba(${hexToRgbValues(p["blue-600"])}, 0.4)`, "transparent", "transparent"));
11
- const variantGhostWhite = (p) => css(["", " .btn-focus{box-shadow:inset 0 0 0 0 transparent;}&:hover{", "}&:focus-visible{", " .btn-focus{box-shadow:inset 0 0 0 2px ", ";}}&.pressed,&.active{", "}.btn-ripple{background-color:rgba( ", ",", " );}", ""], buttonColor(p.white, "transparent", "transparent"), buttonHover(p.white, `rgba(${hexToRgbValues(p["grey-500"])}, 0.25)`, "transparent"), buttonColor(p.white, "transparent", "transparent"), p["blue-600"], buttonColor(p.white, `rgba(${hexToRgbValues(p["grey-500"])}, 0.1)`, `rgba(${hexToRgbValues(p["grey-500"])}, 0.1)`), hexToRgbValues(p["grey-500"]), rippleAlpha(0.25, 0.1), buttonDisabled("rgba(255, 255, 255, 0.4)", "transparent", "transparent"));
12
- const variantDanger = (p) => css(["", " .btn-focus{box-shadow:inset 0 0 0 0 transparent;}&:hover{", " box-shadow:0 2px 4px 0 rgba(255,90,77,0.2);}&:focus-visible{", " .btn-focus{box-shadow:inset 0 0 0 2px ", ";}}&.pressed,&.active{", "}.btn-ripple{background-color:", ";}", ""], buttonColor(p.white, p["red-600"], p["red-600"]), buttonHover(p.white, p["red-500"], p["red-500"]), buttonColor(p.white, p["red-600"], p["red-600"]), p["blue-600"], buttonColor(p.white, p["red-700"], p["red-700"]), p["red-700"], buttonDisabled(p.white, `rgba(${hexToRgbValues(p["red-600"])}, 0.4)`, "transparent"));
13
- const variantSuccess = (p) => css(["", " .btn-focus{box-shadow:inset 0 0 0 0 transparent;}&:hover{", "}&:focus-visible{", " .btn-focus{box-shadow:inset 0 0 0 2px ", ";}}&.pressed,&.active{", "}.btn-ripple{background-color:", ";}", ""], buttonColor(p.white, p["green-600"], p["green-600"]), buttonHover(p.white, p["green-500"], p["green-500"]), buttonColor(p.white, p["green-600"], p["green-500"]), p["blue-700"], buttonColor(p.white, p["green-700"], p["green-700"]), p["green-700"], buttonDisabled(p.white, `rgba(${hexToRgbValues(p["green-600"])}, 0.4)`, "transparent"));
14
- const variantWarning = (p) => css(["", " .btn-focus{box-shadow:inset 0 0 0 0 transparent;}&:hover{", "}&:focus-visible{", " .btn-focus{box-shadow:inset 0 0 0 2px ", ";}}&.pressed,&.active{", "}.btn-ripple{background-color:", ";}", ""], buttonColor(p.white, p["yellow-600"], p["yellow-600"]), buttonHover(p.white, p["yellow-500"], p["yellow-500"]), buttonColor(p.white, p["yellow-600"], p["yellow-500"]), p["blue-600"], buttonColor(p.white, p["yellow-700"], p["yellow-700"]), p["yellow-700"], buttonDisabled(p.white, `rgba(${hexToRgbValues(p["yellow-600"])}, 0.4)`, "transparent"));
5
+ const variantPrimary = () => css(["", " .btn-focus{box-shadow:inset 0 0 0 0 transparent;}&:hover{", "}&:focus-visible{", " .btn-focus{box-shadow:inset 0 0 0 2px var(--ds-buttons-variant-primary-border-focus);}}&.pressed,&.active{", "}.btn-ripple{background-color:var(--ds-buttons-variant-primary-bg-active);}", ""], buttonColor("var(--ds-buttons-variant-primary-text-default)", "var(--ds-buttons-variant-primary-bg-default)", "var(--ds-buttons-variant-primary-bg-default)"), buttonHover("var(--ds-buttons-variant-primary-text-hover)", "var(--ds-buttons-variant-primary-bg-hover)", "var(--ds-buttons-variant-primary-bg-hover)"), buttonColor("var(--ds-buttons-variant-primary-text-focus)", "var(--ds-buttons-variant-primary-bg-focus)", "var(--ds-buttons-variant-primary-border-focus)"), buttonColor("var(--ds-buttons-variant-primary-text-active)", "var(--ds-buttons-variant-primary-bg-active)", "var(--ds-buttons-variant-primary-bg-active)"), buttonDisabled("var(--ds-buttons-variant-primary-text-disabled)", "var(--ds-buttons-variant-primary-bg-disabled)", "var(--ds-buttons-variant-primary-border-disabled)"));
6
+ const variantDefault = () => css(["", " .btn-focus{box-shadow:inset 0 0 0 1px var(--ds-buttons-variant-secondary-border-default);}&:hover{", "}&:focus-visible{", " .btn-focus{box-shadow:inset 0 0 0 2px var(--ds-buttons-variant-secondary-border-focus);}}&.pressed,&.active{", "}.btn-ripple{background-color:var(--ds-color-background-base-muted);}", ""], buttonColor("var(--ds-buttons-variant-secondary-text-default)", "var(--ds-buttons-variant-secondary-bg-default)", "var(--ds-buttons-variant-secondary-border-default)"), buttonHover("var(--ds-buttons-variant-secondary-text-hover)", "var(--ds-buttons-variant-secondary-bg-hover)", "var(--ds-buttons-variant-secondary-border-hover)"), buttonColor("var(--ds-buttons-variant-secondary-text-focus)", "var(--ds-buttons-variant-secondary-bg-focus)", "var(--ds-buttons-variant-secondary-border-focus)"), buttonColor("var(--ds-buttons-variant-secondary-text-active)", "var(--ds-buttons-variant-secondary-bg-active)", "var(--ds-buttons-variant-secondary-border-active)"), buttonDisabled("var(--ds-buttons-variant-secondary-text-disabled)", "var(--ds-buttons-variant-secondary-bg-disabled)", "var(--ds-buttons-variant-secondary-border-disabled)"));
7
+ const variantTertiary = () => css(["", " .btn-focus{box-shadow:inset 0 0 0 0px transparent;}&:hover{", "}&:focus-visible{", " .btn-focus{box-shadow:inset 0 0 0 2px var(--ds-buttons-variant-tertiary-border-focus);}}&.pressed,&.active{", "}.btn-ripple{background-color:var(--ds-buttons-variant-tertiary-ripple);}", ""], buttonColor("var(--ds-buttons-variant-tertiary-text-default)", "var(--ds-buttons-variant-tertiary-bg-default)", "var(--ds-buttons-variant-tertiary-border-default)"), buttonHover("var(--ds-buttons-variant-tertiary-text-hover)", "var(--ds-buttons-variant-tertiary-bg-hover)", "var(--ds-buttons-variant-tertiary-border-hover)"), buttonColor("var(--ds-buttons-variant-tertiary-text-focus)", "var(--ds-buttons-variant-tertiary-bg-focus)", "var(--ds-buttons-variant-tertiary-border-focus)"), buttonColor("var(--ds-buttons-variant-tertiary-text-active)", "var(--ds-buttons-variant-tertiary-bg-active)", "var(--ds-buttons-variant-tertiary-bg-active)"), buttonDisabled("var(--ds-buttons-variant-tertiary-text-disabled)", "var(--ds-buttons-variant-tertiary-bg-disabled)", "var(--ds-buttons-variant-tertiary-border-disabled)"));
8
+ const variantTertiaryWhite = () => css(["", " .btn-focus{box-shadow:inset 0 0 0 0px transparent;}&:hover{", "}&:focus-visible{", " .btn-focus{box-shadow:inset 0 0 0 2px var(--ds-buttons-variant-tertiary-white-border-focus);}}&.pressed,&.active{", "}.btn-ripple{background-color:var(--ds-buttons-variant-tertiary-white-bg-active);}", ""], buttonColor("var(--ds-buttons-variant-tertiary-white-text-default)", "var(--ds-buttons-variant-tertiary-white-bg-default)", "var(--ds-buttons-variant-tertiary-white-border-default)"), buttonHover("var(--ds-buttons-variant-tertiary-white-text-hover)", "var(--ds-buttons-variant-tertiary-white-bg-hover)", "var(--ds-buttons-variant-tertiary-white-border-hover)"), buttonColor("var(--ds-buttons-variant-tertiary-white-text-focus)", "var(--ds-buttons-variant-tertiary-white-bg-focus)", "var(--ds-buttons-variant-tertiary-white-border-focus)"), buttonColor("var(--ds-buttons-variant-tertiary-white-text-default)", "var(--ds-buttons-variant-tertiary-white-bg-active)", "var(--ds-buttons-variant-tertiary-white-bg-active)"), buttonDisabled("var(--ds-buttons-variant-tertiary-white-text-disabled)", "var(--ds-buttons-variant-tertiary-white-bg-disabled)", "var(--ds-buttons-variant-tertiary-white-border-disabled)"));
9
+ const variantGhost = () => css(["", " box-shadow:none;.btn-focus{box-shadow:inset 0 0 0 0px transparent;}&:hover{", "}&:focus-visible{", " .btn-focus{box-shadow:inset 0 0 0 2px var(--ds-buttons-variant-ghost-secondary-border-focus);}}&.pressed,&.active{", "}.btn-ripple{background-color:var(--ds-buttons-variant-ghost-secondary-ripple);}", ""], buttonColor("var(--ds-buttons-variant-ghost-secondary-text-default)", "var(--ds-buttons-variant-ghost-secondary-bg-default)", "var(--ds-buttons-variant-ghost-secondary-border-default)"), buttonHover("var(--ds-buttons-variant-ghost-secondary-text-hover)", "var(--ds-buttons-variant-ghost-secondary-bg-hover)", "var(--ds-buttons-variant-ghost-secondary-border-hover)"), buttonColor("var(--ds-buttons-variant-ghost-secondary-text-focus)", "var(--ds-buttons-variant-ghost-secondary-bg-focus)", "var(--ds-buttons-variant-ghost-secondary-border-focus)"), buttonColor("var(--ds-buttons-variant-ghost-secondary-text-default)", "var(--ds-buttons-variant-ghost-secondary-bg-active)", "var(--ds-buttons-variant-ghost-secondary-bg-active)"), buttonDisabled("var(--ds-buttons-variant-ghost-secondary-text-disabled)", "var(--ds-buttons-variant-ghost-secondary-bg-disabled)", "var(--ds-buttons-variant-ghost-secondary-border-disabled)"));
10
+ const variantGhostPrimary = () => css(["", " .btn-focus{box-shadow:inset 0 0 0 0px transparent;}&:hover{", "}&:focus-visible{", " .btn-focus{box-shadow:inset 0 0 0 2px var(--ds-buttons-variant-ghost-primary-border-focus);}}&.pressed,&.active{", "}.btn-ripple{background-color:var(--ds-buttons-variant-ghost-primary-ripple);}", ""], buttonColor("var(--ds-buttons-variant-ghost-primary-text-default)", "var(--ds-buttons-variant-ghost-primary-bg-default)", "var(--ds-buttons-variant-ghost-primary-border-default)"), buttonHover("var(--ds-buttons-variant-ghost-primary-text-hover)", "var(--ds-buttons-variant-ghost-primary-bg-hover)", "var(--ds-buttons-variant-ghost-primary-border-hover)"), buttonColor("var(--ds-buttons-variant-ghost-primary-text-focus)", "var(--ds-buttons-variant-ghost-primary-bg-focus)", "var(--ds-buttons-variant-ghost-primary-border-focus)"), buttonColor("var(--ds-buttons-variant-ghost-primary-text-active)", "var(--ds-buttons-variant-ghost-primary-bg-active)", "var(--ds-buttons-variant-ghost-primary-bg-active)"), buttonDisabled("var(--ds-buttons-variant-ghost-primary-text-disabled)", "var(--ds-buttons-variant-ghost-primary-bg-disabled)", "var(--ds-buttons-variant-ghost-primary-border-disabled)"));
11
+ const variantGhostWhite = () => css(["", " .btn-focus{box-shadow:inset 0 0 0 0 transparent;}&:hover{", "}&:focus-visible{", " .btn-focus{box-shadow:inset 0 0 0 2px var(--ds-buttons-variant-ghost-secondary-white-border-focus);}}&.pressed,&.active{", "}.btn-ripple{background-color:var(--ds-buttons-variant-ghost-secondary-white-bg-active);}", ""], buttonColor("var(--ds-buttons-variant-ghost-secondary-white-text-default)", "var(--ds-buttons-variant-ghost-secondary-white-bg-default)", "var(--ds-buttons-variant-ghost-secondary-white-border-default)"), buttonHover("var(--ds-buttons-variant-ghost-secondary-white-text-hover)", "var(--ds-buttons-variant-ghost-secondary-white-bg-hover)", "var(--ds-buttons-variant-ghost-secondary-white-border-hover)"), buttonColor("var(--ds-buttons-variant-ghost-secondary-white-text-focus)", "var(--ds-buttons-variant-ghost-secondary-white-bg-focus)", "var(--ds-buttons-variant-ghost-secondary-white-border-focus)"), buttonColor("var(--ds-buttons-variant-ghost-secondary-white-text-default)", "var(--ds-buttons-variant-ghost-secondary-white-bg-active)", "var(--ds-buttons-variant-ghost-secondary-white-bg-active)"), buttonDisabled("var(--ds-buttons-variant-ghost-secondary-white-text-disabled)", "var(--ds-buttons-variant-ghost-secondary-white-bg-disabled)", "var(--ds-buttons-variant-ghost-secondary-white-border-disabled)"));
12
+ const variantDanger = () => css(["", " .btn-focus{box-shadow:inset 0 0 0 0 transparent;}&:hover{", "}&:focus-visible{", " .btn-focus{box-shadow:inset 0 0 0 2px var(--ds-buttons-variant-primary-danger-border-focus);}}&.pressed,&.active{", "}.btn-ripple{background-color:var(--ds-buttons-variant-primary-danger-bg-active);}", ""], buttonColor("var(--ds-buttons-variant-primary-danger-text-default)", "var(--ds-buttons-variant-primary-danger-bg-default)", "var(--ds-buttons-variant-primary-danger-bg-default)"), buttonHover("var(--ds-buttons-variant-primary-danger-text-hover)", "var(--ds-buttons-variant-primary-danger-bg-hover)", "var(--ds-buttons-variant-primary-danger-bg-hover)"), buttonColor("var(--ds-buttons-variant-primary-danger-text-focus)", "var(--ds-buttons-variant-primary-danger-bg-focus)", "var(--ds-buttons-variant-primary-danger-border-focus)"), buttonColor("var(--ds-buttons-variant-primary-danger-text-active)", "var(--ds-buttons-variant-primary-danger-bg-active)", "var(--ds-buttons-variant-primary-danger-bg-active)"), buttonDisabled("var(--ds-buttons-variant-primary-danger-text-disabled)", "var(--ds-buttons-variant-primary-danger-bg-disabled)", "var(--ds-buttons-variant-primary-danger-border-disabled)"));
13
+ const variantSuccess = () => css(["", " .btn-focus{box-shadow:inset 0 0 0 0 transparent;}&:hover{", "}&:focus-visible{", " .btn-focus{box-shadow:inset 0 0 0 2px var(--ds-buttons-variant-primary-success-border-focus);}}&.pressed,&.active{", "}.btn-ripple{background-color:var(--ds-buttons-variant-primary-success-bg-active);}", ""], buttonColor("var(--ds-buttons-variant-primary-success-text-default)", "var(--ds-buttons-variant-primary-success-bg-default)", "var(--ds-buttons-variant-primary-success-bg-default)"), buttonHover("var(--ds-buttons-variant-primary-success-text-hover)", "var(--ds-buttons-variant-primary-success-bg-hover)", "var(--ds-buttons-variant-primary-success-bg-hover)"), buttonColor("var(--ds-buttons-variant-primary-success-text-focus)", "var(--ds-buttons-variant-primary-success-bg-focus)", "var(--ds-buttons-variant-primary-success-border-focus)"), buttonColor("var(--ds-buttons-variant-primary-success-text-active)", "var(--ds-buttons-variant-primary-success-bg-active)", "var(--ds-buttons-variant-primary-success-bg-active)"), buttonDisabled("var(--ds-buttons-variant-primary-success-text-disabled)", "var(--ds-buttons-variant-primary-success-bg-disabled)", "var(--ds-buttons-variant-primary-success-border-disabled)"));
14
+ const variantWarning = () => css(["", " .btn-focus{box-shadow:inset 0 0 0 0 transparent;}&:hover{", "}&:focus-visible{", " .btn-focus{box-shadow:inset 0 0 0 2px var(--ds-buttons-variant-primary-warning-border-focus);}}&.pressed,&.active{", "}.btn-ripple{background-color:var(--ds-buttons-variant-primary-warning-bg-active);}", ""], buttonColor("var(--ds-buttons-variant-primary-warning-text-default)", "var(--ds-buttons-variant-primary-warning-bg-default)", "var(--ds-buttons-variant-primary-warning-border-default)"), buttonHover("var(--ds-buttons-variant-primary-warning-text-hover)", "var(--ds-buttons-variant-primary-warning-bg-hover)", "var(--ds-buttons-variant-primary-warning-border-hover)"), buttonColor("var(--ds-buttons-variant-primary-warning-text-focus)", "var(--ds-buttons-variant-primary-warning-bg-focus)", "var(--ds-buttons-variant-primary-warning-border-focus)"), buttonColor("var(--ds-buttons-variant-primary-warning-text-active)", "var(--ds-buttons-variant-primary-warning-bg-active)", "var(--ds-buttons-variant-primary-warning-border-active)"), buttonDisabled("var(--ds-buttons-variant-primary-warning-text-disabled)", "var(--ds-buttons-variant-primary-warning-bg-disabled)", "var(--ds-buttons-variant-primary-warning-border-disabled)"));
15
15
  const variantMap = {
16
16
  primary: variantPrimary,
17
17
  default: variantDefault,
@@ -26,23 +26,10 @@ const variantMap = {
26
26
  success: variantSuccess,
27
27
  warning: variantWarning
28
28
  };
29
- const getVariantStyles = (type, palette) => {
29
+ const getVariantStyles = (type) => {
30
30
  const variantFn = variantMap[type || "default"] || variantMap.default;
31
- return variantFn(palette);
31
+ return variantFn();
32
32
  };
33
- function hexToRgbValues(hex) {
34
- const cleaned = hex.replace("#", "");
35
- const r = parseInt(cleaned.substring(0, 2), 16);
36
- const g = parseInt(cleaned.substring(2, 4), 16);
37
- const b = parseInt(cleaned.substring(4, 6), 16);
38
- return `${r}, ${g}, ${b}`;
39
- }
40
- function rippleAlpha(hoverAlpha, pressedAlpha) {
41
- if (pressedAlpha <= hoverAlpha) {
42
- return pressedAlpha;
43
- }
44
- return (pressedAlpha - hoverAlpha) / (1 - hoverAlpha);
45
- }
46
33
  export {
47
34
  getVariantStyles
48
35
  };
@@ -11,7 +11,7 @@ const ButtonToggle = /* @__PURE__ */ styled(({
11
11
  }).withConfig({
12
12
  displayName: "ButtonTogglestyles__ButtonToggle",
13
13
  componentId: "sc-1m60zt6-0"
14
- })(["", ""], (props) => props.toggleType === "ghost" && css(["&:hover:not(:disabled):not(:focus){color:", ";}", ""], props.theme.palette["grey-600"], !props.activated ? css(["&:hover:not(:disabled):not(:focus){color:", ";svg{fill:currentColor;}}"], props.theme.palette["grey-600"]) : css(["", ""], !props.disabled && css(["&&{background:", ";color:", ";svg{fill:currentColor;}", "{box-shadow:none;}}"], props.theme.palette["blue-050"], props.theme.palette["blue-600"], ButtonFocus))));
14
+ })(["", ""], (props) => props.toggleType === "ghost" && css(["&:hover:not(:disabled):not(:focus){color:var(--ds-color-text-base-muted);}", ""], !props.activated ? css(["&:hover:not(:disabled):not(:focus){color:var(--ds-color-text-base-muted);}"]) : css(["", ""], !props.disabled && css(["&&{background:var(--ds-color-background-brand-subtle);color:var(--ds-color-text-brand-default);", "{box-shadow:none;}}"], ButtonFocus))));
15
15
  export {
16
16
  ButtonToggle
17
17
  };
@@ -3,33 +3,15 @@ import { CheckboxDeafultM, CheckboxM } from "@synerise/ds-icon";
3
3
  const IconWrapper = /* @__PURE__ */ styled.span.withConfig({
4
4
  displayName: "Checkboxstyles__IconWrapper",
5
5
  componentId: "sc-ssgaoj-0"
6
- })(["&&{color:", ";svg{fill:", ";}}.ant-btn[disabled] & .ds-icon svg{fill:", " !important;}.ant-btn:hover & .ds-icon svg,.ant-btn:focus:hover & .ds-icon svg{fill:", ";}.ds-button.ant-btn &::before{content:'';display:'block';position:absolute;bottom:0;left:0;right:0;top:0;margin:5px;z-index:-1;}.ds-button.ant-btn &::before,.ds-button.ant-btn:hover &::before,.ds-button.ant-btn:focus:hover &::before{background:", ";}.ds-button.ant-btn[disabled] &::before,.ds-button.ant-btn[disabled]:hover &::before{background:", ";}"], ({
7
- theme,
6
+ })(["&&{color:", ";}.ant-btn:hover & .ds-icon,.ant-btn:focus:hover & .ds-icon{color:var(--ds-color-icon-brand-default);}.ds-button.ant-btn &::before{content:'';display:'block';position:absolute;bottom:0;left:0;right:0;top:0;margin:5px;z-index:-1;}.ds-button.ant-btn &::before,.ds-button.ant-btn:hover &::before,.ds-button.ant-btn:focus:hover &::before{background:var(--ds-color-background-base-default);}"], ({
8
7
  active,
9
8
  error
10
9
  }) => {
11
10
  if (error) {
12
- return theme.palette["red-600"];
11
+ return "var(--ds-color-icon-danger-default)";
13
12
  }
14
- return active ? theme.palette["blue-600"] : theme.palette["grey-300"];
15
- }, ({
16
- theme,
17
- active,
18
- error
19
- }) => {
20
- if (error) {
21
- return theme.palette["red-600"];
22
- }
23
- return active ? theme.palette["blue-600"] : theme.palette["grey-300"];
24
- }, ({
25
- theme
26
- }) => theme.palette["grey-200"], ({
27
- theme
28
- }) => theme.palette["blue-600"], ({
29
- theme
30
- }) => theme.palette.white, ({
31
- theme
32
- }) => theme.palette["grey-050"]);
13
+ return active ? "var(--ds-color-icon-brand-default)" : "var(--ds-color-border-base-strong)";
14
+ });
33
15
  const DefaultIcon = /* @__PURE__ */ styled(CheckboxDeafultM).withConfig({
34
16
  displayName: "Checkboxstyles__DefaultIcon",
35
17
  componentId: "sc-ssgaoj-1"
@@ -1,24 +1,19 @@
1
1
  import styled, { css } from "styled-components";
2
2
  import { IconContainer } from "@synerise/ds-icon";
3
- import { hexToRgba } from "@synerise/ds-utils";
4
3
  import BaseButton from "../BaseButton.js";
5
4
  import { CreatorStatus } from "./Creator.types.js";
6
5
  const CreatorLabel = /* @__PURE__ */ styled.span.withConfig({
7
6
  displayName: "Creatorstyles__CreatorLabel",
8
7
  componentId: "sc-1w96u6h-0"
9
8
  })(["margin:0 12px 0 0;transition:all 0.3s ease;color:inherit;"]);
10
- const errorStyles = ({
11
- theme
12
- }) => css(["border:1px dashed ", ";background:", ";&:focus-visible{background:", ";}&:hover:not(:disabled):not(:focus-visible){border:1px dashed ", ";background:", ";}"], theme.palette["red-600"], theme.palette["red-050"], theme.palette.white, theme.palette["grey-400"], theme.palette.white);
13
- const uploadStyles = ({
14
- theme
15
- }) => css(["&{border:1px dashed ", ";background-color:", ";color:", ";&:hover:not(:disabled):not(:focus-visible){border:1px dashed ", ";background-color:", ";color:", ";}&:focus-visible:active{border:1px dashed ", ";background-color:", ";box-shadow:none;}&:focus-visible{border:1px dashed ", ";box-shadow:none;}&:disabled{color:", ";", "{margin:12px;}}}"], theme.palette["blue-300"], theme.palette["blue-050"], theme.palette["grey-600"], theme.palette["blue-300"], theme.palette["blue-050"], theme.palette["blue-500"], theme.palette["blue-600"], theme.palette["blue-050"], theme.palette["blue-600"], theme.palette["grey-500"], IconContainer);
9
+ const errorStyles = () => css(["border:1px dashed var(--ds-color-border-danger-default);background:var(--ds-color-background-danger-subtle);&:focus-visible{background:var(--ds-color-background-base-default);}&:hover:not(:disabled):not(:focus-visible){border:1px dashed var(--ds-color-border-base-stronghover);background:var(--ds-color-background-base-default);}"]);
10
+ const uploadStyles = () => css(["&{border:1px dashed var(--ds-color-border-brand-strong);background-color:var(--ds-color-background-brand-subtle);color:var(--ds-color-text-base-muted);&:hover:not(:disabled):not(:focus-visible){border:1px dashed var(--ds-color-border-brand-strong);background-color:var(--ds-color-background-brand-subtle);color:var(--ds-button-creator-upload-text-hover);}&:focus-visible:active{border:1px dashed var(--ds-color-border-brand-default);background-color:var(--ds-color-background-brand-subtle);box-shadow:none;}&:focus-visible{border:1px dashed var(--ds-color-border-brand-default);box-shadow:none;}&:disabled{color:var(--ds-color-text-neutral-default);", "{margin:12px;}}}"], IconContainer);
16
11
  const Creator = /* @__PURE__ */ styled(BaseButton).attrs({
17
12
  type: "ghost"
18
13
  }).withConfig({
19
14
  displayName: "Creatorstyles__Creator",
20
15
  componentId: "sc-1w96u6h-1"
21
- })(["&&{display:inline-flex;width:", ";opacity:", ";height:48px;padding:", ";border-radius:3px;border:1px dashed ", ";background:transparent;color:", ";transition:all 0.3s ease;justify-content:", ";align-items:center;> span{display:flex;align-items:center;justify-content:", ";}", "{margin:auto 12px;}&:hover:not(:disabled):not(:focus-visible){border:1px dashed ", ";background-color:", ";}", " &:focus-visible:active{border:1px dashed ", " !important;box-shadow:none;background-color:", ";}&:focus-visible{border:1px dashed ", ";box-shadow:none;}&:disabled{border-color:", ";background-color:", ";}", " ", "}"], (props) => {
16
+ })(["&&{display:inline-flex;width:", ";opacity:", ";height:48px;padding:", ";border-radius:3px;border:1px dashed var(--ds-color-border-base-strong);background:transparent;color:var(--ds-color-text-base-muted);transition:all 0.3s ease;justify-content:", ";align-items:center;> span{display:flex;align-items:center;justify-content:", ";}", "{margin:auto 12px;}&:hover:not(:disabled):not(:focus-visible){border:1px dashed var(--ds-color-border-base-stronghover);background-color:var(--ds-button-creator-bg-hover);}", " &:focus-visible:active{border:1px dashed var(--ds-color-border-base-stronghover) !important;box-shadow:none;background-color:var(--ds-color-background-base-subtle);}&:focus-visible{border:1px dashed var(--ds-color-border-brand-default);box-shadow:none;}&:disabled{border-color:var(--ds-color-border-base-strong);background-color:var(--ds-color-background-base-subtle);}", " ", "}"], (props) => {
22
17
  if (!props.withLabel) {
23
18
  return "48px";
24
19
  }
@@ -26,15 +21,7 @@ const Creator = /* @__PURE__ */ styled(BaseButton).attrs({
26
21
  return "100%";
27
22
  }
28
23
  return "auto";
29
- }, (props) => props.disabled ? `0.4` : "1", (props) => props.withLabel ? `0 12px 0 0` : "0", ({
30
- theme
31
- }) => theme.palette["grey-300"], ({
32
- theme
33
- }) => theme.palette["grey-600"], (props) => props.withLabel && !props.block ? `flex-start` : "center", (props) => props.labelAlign === "center" ? "center" : "flex-start", IconContainer, ({
34
- theme
35
- }) => theme.palette["grey-400"], ({
36
- theme
37
- }) => hexToRgba(theme.palette["grey-200"], 0.25), (props) => props.pressed && `&&{ background-color: ${hexToRgba(props.theme.palette["grey-200"], 0.4)}; }`, (props) => props.theme.palette["grey-400"], (props) => props.theme.palette["grey-050"], (props) => props.theme.palette["blue-600"], (props) => props.theme.palette["grey-300"], (props) => props.theme.palette["grey-050"], (props) => props.status === CreatorStatus.Error && errorStyles(props), (props) => props.status === CreatorStatus.Upload && uploadStyles(props));
24
+ }, (props) => props.disabled ? "var(--ds-buttons-disabled-opacity)" : "1", (props) => props.withLabel ? `0 12px 0 0` : "0", (props) => props.withLabel && !props.block ? `flex-start` : "center", (props) => props.labelAlign === "center" ? "center" : "flex-start", IconContainer, (props) => props.pressed && `&&{ background-color: var(--ds-button-creator-bg-pressed); }`, (props) => props.status === CreatorStatus.Error && errorStyles(), (props) => props.status === CreatorStatus.Upload && uploadStyles());
38
25
  export {
39
26
  Creator,
40
27
  CreatorLabel
@@ -1,11 +1,9 @@
1
- import { Keyframes } from 'styled-components';
2
- import { ThemeProps } from '@synerise/ds-core';
3
1
  export type ExpanderProps = {
4
2
  expanderSize?: number;
5
3
  disabled?: boolean;
6
4
  expanded?: boolean;
7
5
  };
8
- export declare const focusAnimation: ({ theme }: ThemeProps) => Keyframes;
6
+ export declare const focusAnimation: import('styled-components').Keyframes;
9
7
  export declare const Expander: import('styled-components').StyledComponent<import('react').ForwardRefExoticComponent<Omit<import('react').ButtonHTMLAttributes<HTMLButtonElement>, "type" | "onClick"> & {
10
8
  onClick?: (event: import('react').MouseEvent<HTMLElement>) => void;
11
9
  type?: string;
@@ -1,16 +1,14 @@
1
1
  import styled, { css, keyframes } from "styled-components";
2
2
  import { IconContainer } from "@synerise/ds-icon";
3
3
  import BaseButton from "../BaseButton.js";
4
- const focusAnimation = ({
5
- theme
6
- }) => keyframes(["0%{box-shadow:inset 0 0 0 1px inherit;}50%{box-shadow:inset 0 0 0 1px ", ";}100%{box-shadow:inset 0 0 0 1px inherit;}"], theme.palette["blue-600"]);
4
+ const focusAnimation = /* @__PURE__ */ keyframes(["0%{box-shadow:inset 0 0 0 1px var(--ds-button-expander-variant-default-border-default);}50%{box-shadow:inset 0 0 0 1px var(--ds-color-focus-base-default);}100%{box-shadow:inset 0 0 0 1px var(--ds-button-expander-variant-default-border-default);}"]);
7
5
  const SIZE_DEFAULT = 24;
8
6
  const Expander = /* @__PURE__ */ styled(BaseButton).attrs({
9
7
  type: "ghost"
10
8
  }).withConfig({
11
9
  displayName: "Expanderstyles__Expander",
12
10
  componentId: "sc-1a3xe1e-0"
13
- })(["&&{display:flex;align-items:center;justify-content:center;padding:0;width:", "px;height:", "px;border-radius:50%;background-color:", ";box-shadow:inset 0 0 0 1px ", ";", "{svg{opacity:", ";fill:", " !important;transition:transform 0.1s linear;transform:rotate( ", " );}}", "}"], (props) => props.expanderSize || SIZE_DEFAULT, (props) => props.expanderSize || SIZE_DEFAULT, (props) => props.theme.palette["grey-050"], (props) => props.disabled ? props.theme.palette["grey-200"] : props.theme.palette["grey-300"], IconContainer, (props) => props.disabled ? `0.4` : `1`, (props) => props.theme.palette["grey-600"], (props) => props.expanded ? "180deg" : "0deg", (props) => !props.disabled && css(["&:hover{box-shadow:inset 0 0 0 1px ", ";background-color:", ";}&:focus-visible:not(:active){animation:", " 1s ease-in-out 0s 1;}"], props.theme.palette["grey-400"], props.theme.palette["grey-050"], focusAnimation(props)));
11
+ })(["&&{display:flex;align-items:center;justify-content:center;padding:0;width:", "px;height:", "px;border-radius:50%;background-color:var(--ds-button-expander-variant-default-bg-default);color:var(--ds-button-expander-variant-default-icon-default);box-shadow:inset 0 0 0 1px ", ";", "{svg{opacity:", ";transition:transform 0.1s linear;transform:rotate( ", " );}}", "}"], (props) => props.expanderSize || SIZE_DEFAULT, (props) => props.expanderSize || SIZE_DEFAULT, (props) => props.disabled ? "var(--ds-button-expander-variant-default-border-disabled)" : "var(--ds-button-expander-variant-default-border-default)", IconContainer, (props) => props.disabled ? "var(--ds-buttons-disabled-opacity)" : "1", (props) => props.expanded ? "180deg" : "0deg", (props) => !props.disabled && css(["&:hover{box-shadow:inset 0 0 0 1px var(--ds-button-expander-variant-default-border-hover);background-color:var( --ds-button-expander-variant-default-bg-default );}&:focus-visible:not(:active){animation:", " 1s ease-in-out 0s 1;}"], focusAnimation));
14
12
  export {
15
13
  Expander,
16
14
  focusAnimation
@@ -2,24 +2,15 @@ import styled from "styled-components";
2
2
  const IconWrapper = /* @__PURE__ */ styled.span.withConfig({
3
3
  displayName: "Starstyles__IconWrapper",
4
4
  componentId: "sc-k1qcv4-0"
5
- })(["&& svg{fill:", ";}.ant-btn-ghost[disabled] & .ds-icon svg{fill:", " !important;}.ant-btn-ghost:hover & .ds-icon svg,.ant-btn-ghost:focus:hover & .ds-icon svg{fill:", ";}.ant-btn-ghost &::before{clip-path:path( 'M 19.606 9.598 l -4.794 -0.686 l -2.141 -4.276 a 0.781 0.781 0 0 0 -1.342 0 L 9.187 8.912 l -4.793 0.686 a 0.75 0.75 0 0 0 -0.414 1.284 l 3.462 3.325 l -0.817 4.691 a 0.751 0.751 0 0 0 0.74 0.88 a 0.742 0.742 0 0 0 0.344 -0.085 L 12 17.472 l 4.29 2.221 a 0.75 0.75 0 0 0 1.084 -0.795 l -0.816 -4.691 l 3.462 -3.325 a 0.75 0.75 0 0 0 -0.414 -1.284 z z' );content:'';position:absolute;bottom:0;left:0;right:0;top:0;margin:0;z-index:-1;}.ant-btn-ghost[disabled] &:before{background:", ";}.ant-btn-ghost &::before,.ant-btn-ghost:hover &:before,.ant-btn-ghost:focus:hover &:before{background:", ";}"], ({
6
- theme,
5
+ })(["&&{color:", ";}.ant-btn-ghost:hover & .ds-icon,.ant-btn-ghost:focus:hover & .ds-icon{color:var(--ds-color-icon-brand-default);}.ant-btn-ghost &::before{clip-path:path( 'M 19.606 9.598 l -4.794 -0.686 l -2.141 -4.276 a 0.781 0.781 0 0 0 -1.342 0 L 9.187 8.912 l -4.793 0.686 a 0.75 0.75 0 0 0 -0.414 1.284 l 3.462 3.325 l -0.817 4.691 a 0.751 0.751 0 0 0 0.74 0.88 a 0.742 0.742 0 0 0 0.344 -0.085 L 12 17.472 l 4.29 2.221 a 0.75 0.75 0 0 0 1.084 -0.795 l -0.816 -4.691 l 3.462 -3.325 a 0.75 0.75 0 0 0 -0.414 -1.284 z z' );content:'';position:absolute;bottom:0;left:0;right:0;top:0;margin:0;z-index:-1;}.ant-btn-ghost &::before,.ant-btn-ghost:hover &:before,.ant-btn-ghost:focus:hover &:before{background:var(--ds-color-background-base-default);}"], ({
7
6
  active,
8
7
  error
9
8
  }) => {
10
9
  if (error) {
11
- return theme.palette["red-600"];
10
+ return "var(--ds-color-icon-danger-default)";
12
11
  }
13
- return active ? theme.palette["yellow-600"] : theme.palette["grey-300"];
14
- }, ({
15
- theme
16
- }) => theme.palette["grey-200"], ({
17
- theme
18
- }) => theme.palette["blue-600"], ({
19
- theme
20
- }) => theme.palette["grey-050"], ({
21
- theme
22
- }) => theme.palette.white);
12
+ return active ? "var(--ds-color-icon-warning-default)" : "var(--ds-color-border-base-strong)";
13
+ });
23
14
  const Star_styles = {
24
15
  IconWrapper
25
16
  };
package/dist/index.d.ts CHANGED
@@ -40,12 +40,12 @@ declare const _default: import('react').ForwardRefExoticComponent<Omit<import('.
40
40
  fluidMinWidth?: string | number;
41
41
  } & import('react').RefAttributes<HTMLButtonElement>> & {
42
42
  /** @deprecated - use named export `Creator` */
43
- Creator: import('react').ForwardRefExoticComponent<Omit<import('./Creator/Creator.types').CreatorProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
43
+ Creator: import('react').ForwardRefExoticComponent<Omit<import('.').CreatorProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
44
44
  /** @deprecated - use named export `Expander` */
45
- Expander: ({ size, expanded, disabled, onClick, className, }: import('./Expander/Expander.types').ExpanderProps) => import("react").JSX.Element;
45
+ Expander: ({ size, expanded, disabled, onClick, className, }: import('.').ExpanderProps) => import("react").JSX.Element;
46
46
  /** @deprecated - use named export `Star` */
47
- Star: (props: import('./Star/Star.types').StarButtonProps) => React.ReactElement;
47
+ Star: (props: import('.').StarButtonProps) => React.ReactElement;
48
48
  /** @deprecated - use named export `Checkbox` */
49
- Checkbox: (props: import('./Checkbox/Checkbox.types').CheckboxButtonProps) => React.ReactElement;
49
+ Checkbox: (props: import('.').CheckboxButtonProps) => React.ReactElement;
50
50
  };
51
51
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-button",
3
- "version": "2.1.6",
3
+ "version": "2.2.1",
4
4
  "description": "Button UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "synerise/synerise-design",
@@ -39,10 +39,10 @@
39
39
  "sideEffects": false,
40
40
  "types": "dist/index.d.ts",
41
41
  "dependencies": {
42
- "@synerise/ds-icon": "^2.2.3",
43
- "@synerise/ds-tag": "^2.0.11",
44
- "@synerise/ds-tooltip": "^2.0.11",
45
- "@synerise/ds-utils": "^2.2.2",
42
+ "@synerise/ds-icon": "^2.3.1",
43
+ "@synerise/ds-tag": "^2.1.1",
44
+ "@synerise/ds-tooltip": "^2.1.1",
45
+ "@synerise/ds-utils": "^2.3.1",
46
46
  "classnames": "^2.5.1"
47
47
  },
48
48
  "devDependencies": {
@@ -53,5 +53,5 @@
53
53
  "react": ">=16.9.0 <= 18.3.1",
54
54
  "styled-components": "^5.3.3"
55
55
  },
56
- "gitHead": "c356039703d8826bbbdb6dadcb18bb008fea8bc5"
56
+ "gitHead": "2d2a540b35fddf8855da45f0dec2f4612c6d87b6"
57
57
  }