@deframe-sdk/components 0.1.57 → 0.1.58

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/index.mjs CHANGED
@@ -6048,7 +6048,7 @@ var SwapToCardView = ({
6048
6048
  ] }) });
6049
6049
  };
6050
6050
  var baseClasses = [
6051
- "inline-flex items-center justify-center",
6051
+ "flex-1 inline-flex items-center justify-center",
6052
6052
  "py-[3px] px-[10px]",
6053
6053
  "rounded-[var(--deframe-widget-size-radius-full)]",
6054
6054
  "cursor-pointer text-[12px] transition-all duration-150 outline-none",
@@ -6073,7 +6073,7 @@ var stateClasses = {
6073
6073
  };
6074
6074
  function SlippageChip({
6075
6075
  options = [],
6076
- selected = null,
6076
+ selected = void 0,
6077
6077
  onSelect,
6078
6078
  formatLabel,
6079
6079
  className
@@ -6083,7 +6083,7 @@ function SlippageChip({
6083
6083
  {
6084
6084
  "data-test-id": "slippage-chips",
6085
6085
  "data-slot": "slippage-chips",
6086
- className: twMerge("flex gap-[6px] items-center", className),
6086
+ className: twMerge("flex w-full gap-sm", className),
6087
6087
  children: options.map((bps) => /* @__PURE__ */ jsx(
6088
6088
  "button",
6089
6089
  {
@@ -6094,7 +6094,7 @@ function SlippageChip({
6094
6094
  className: twMerge(baseClasses, stateClasses[bps === selected ? "active" : "default"]),
6095
6095
  children: formatLabel(bps)
6096
6096
  },
6097
- bps
6097
+ String(bps)
6098
6098
  ))
6099
6099
  }
6100
6100
  );
@@ -6107,6 +6107,7 @@ var SwapAdvancedSettingsView = ({
6107
6107
  onSlippageSelect,
6108
6108
  formatPercentage,
6109
6109
  slippageOptions,
6110
+ slippageLabel,
6110
6111
  percentageOptions,
6111
6112
  onPercentageClick,
6112
6113
  slippageFormatted,
@@ -6124,15 +6125,6 @@ var SwapAdvancedSettingsView = ({
6124
6125
  collapseText,
6125
6126
  expandText,
6126
6127
  children: /* @__PURE__ */ jsxs("div", { className: "w-full flex flex-col gap-sm", children: [
6127
- /* @__PURE__ */ jsx(
6128
- SlippageChip,
6129
- {
6130
- options: slippageOptions,
6131
- selected: slippageBps,
6132
- onSelect: onSlippageSelect,
6133
- formatLabel: formatPercentage
6134
- }
6135
- ),
6136
6128
  /* @__PURE__ */ jsx("div", { className: "flex w-full gap-sm", children: percentageOptions.map((pct, index) => {
6137
6129
  const isMax = index === percentageOptions.length - 1;
6138
6130
  const label = isMax ? maxLabel : `${pct / 100}%`;
@@ -6145,7 +6137,19 @@ var SwapAdvancedSettingsView = ({
6145
6137
  },
6146
6138
  pct
6147
6139
  );
6148
- }) })
6140
+ }) }),
6141
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-xs w-full", children: [
6142
+ /* @__PURE__ */ jsx("span", { className: "text-[11px] [font-weight:var(--deframe-widget-font-weight-medium)] text-[color:var(--deframe-widget-color-text-secondary)] font-[var(--deframe-widget-font-family)]", children: slippageLabel }),
6143
+ /* @__PURE__ */ jsx(
6144
+ SlippageChip,
6145
+ {
6146
+ options: slippageOptions,
6147
+ selected: slippageBps,
6148
+ onSelect: onSlippageSelect,
6149
+ formatLabel: formatPercentage
6150
+ }
6151
+ )
6152
+ ] })
6149
6153
  ] })
6150
6154
  }
6151
6155
  ) }) });
@@ -7748,13 +7752,13 @@ function SlippageDetailRow({ label, options, selected, onSelect: handleSelect, f
7748
7752
  "div",
7749
7753
  {
7750
7754
  "data-test-id": "swap-form-simple-slippage-row",
7751
- className: "flex justify-between items-center py-[10px] gap-[var(--deframe-widget-size-gap-sm)]",
7755
+ className: "flex flex-col py-[10px] gap-[var(--deframe-widget-size-gap-sm)]",
7752
7756
  children: [
7753
7757
  /* @__PURE__ */ jsx(
7754
7758
  "span",
7755
7759
  {
7756
7760
  "data-test-id": "swap-form-simple-detail-row-label",
7757
- className: "text-[11px] [font-weight:var(--deframe-widget-font-weight-medium)] uppercase tracking-[0.07em] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)] flex-shrink-0",
7761
+ className: "text-[11px] [font-weight:var(--deframe-widget-font-weight-medium)] uppercase tracking-[0.07em] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]",
7758
7762
  children: label
7759
7763
  }
7760
7764
  ),
@@ -7765,7 +7769,7 @@ function SlippageDetailRow({ label, options, selected, onSelect: handleSelect, f
7765
7769
  selected,
7766
7770
  onSelect: handleSelect,
7767
7771
  formatLabel,
7768
- className: "gap-[4px] [&_button]:py-[2px] [&_button]:px-[7px] [&_button]:text-[11px]"
7772
+ className: "w-full gap-[4px] [&_button]:py-[2px] [&_button]:px-[7px] [&_button]:text-[11px]"
7769
7773
  }
7770
7774
  )
7771
7775
  ]