@pequity/squirrel 8.6.0 → 10.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.
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const toNumberOrNull = (val) => {
4
- if (val === "" || val === null || isNaN(Number(val))) {
4
+ if (val === "" || val === null) {
5
5
  return null;
6
6
  }
7
- return Number(val);
7
+ const num = Number(val);
8
+ return isFinite(num) ? num : null;
8
9
  };
9
10
  exports.toNumberOrNull = toNumberOrNull;
@@ -8,7 +8,7 @@ import { T } from "./index.js";
8
8
  const _hoisted_1 = { class: "slot-wrapper empty:hidden" };
9
9
  const btnClasses = {
10
10
  slots: {
11
- button: "relative inline-block whitespace-nowrap rounded font-medium outline-none disabled:pointer-events-none disabled:cursor-default disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:cursor-default aria-disabled:opacity-50",
11
+ button: "relative inline-flex whitespace-nowrap rounded font-medium outline-none disabled:pointer-events-none disabled:cursor-default disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:cursor-default aria-disabled:opacity-50",
12
12
  content: "flex items-center justify-center has-[.slot-wrapper:empty]:gap-0",
13
13
  loader: "absolute bottom-0 left-0 right-0 top-0 flex items-center justify-center font-medium",
14
14
  icon: "shrink-0"
@@ -41,24 +41,31 @@ const btnClasses = {
41
41
  loader: "text-p-red-50"
42
42
  },
43
43
  success: { button: "bg-p-green-40 text-white hover:bg-p-green-50", loader: "text-white" },
44
+ black: { button: "bg-night text-white hover:bg-p-gray-80", loader: "text-white" },
45
+ "black-outline-gradient": {
46
+ button: "bg-gradient-to-r from-[#17c0e8] via-[#8e8bda] to-[#f65ece] hover:bg-gradient-to-l p-px group",
47
+ content: "bg-night rounded-[calc(theme(borderRadius.DEFAULT)-1px)] text-white group-hover:bg-p-gray-80 transition-colors duration-300",
48
+ icon: "-mx-px",
49
+ loader: "text-white"
50
+ },
44
51
  "primary-link": { button: "bg-transparent text-primary underline hover:text-accent", loader: "text-p-blue-60" },
45
52
  "secondary-ghost": { button: "text-on-surface hover:bg-p-gray-20", loader: "text-p-purple-60" },
46
53
  "secondary-ghost-dark": { button: "text-white hover:bg-p-purple-50", loader: "text-p-blue-15" }
47
54
  },
48
55
  size: {
49
56
  sm: {
50
- button: "px-3 has-[.slot-wrapper:empty]:px-1.5 py-1.5 text-sm leading-5 h-8",
51
- content: "gap-1",
57
+ button: "text-sm leading-5 h-8",
58
+ content: "px-3 has-[.slot-wrapper:empty]:px-1.5 py-1.5 gap-1",
52
59
  icon: "text-base p-0.5"
53
60
  },
54
61
  md: {
55
- button: "px-6 has-[.slot-wrapper:empty]:px-2.5 has-[.slot-wrapper:empty]:py-2.5 py-2 text-base h-10",
56
- content: "gap-2",
62
+ button: "text-base h-10",
63
+ content: "px-6 has-[.slot-wrapper:empty]:px-2.5 has-[.slot-wrapper:empty]:py-2.5 py-2 gap-2",
57
64
  icon: "text-xl"
58
65
  },
59
66
  lg: {
60
- button: "px-6 has-[.slot-wrapper:empty]:px-3 py-3 text-lg leading-6 h-12",
61
- content: "gap-2.5",
67
+ button: "text-lg leading-6 h-12",
68
+ content: "px-6 has-[.slot-wrapper:empty]:px-3 py-3 gap-2.5",
62
69
  icon: "text-2xl"
63
70
  }
64
71
  }