@stasho/ds 0.3.0 → 0.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stasho/ds",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "stasho design system",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -106,6 +106,7 @@ const buttonVariants = cva(
106
106
  xs: "py-[6px] px-3 text-[11px] gap-1.5",
107
107
  sm: "py-[7px] px-3.5 text-xs gap-[7px]",
108
108
  md: "py-[9px] px-[18px] text-[13px] gap-2",
109
+ lg: "py-[13px] px-6 text-[15px] gap-2.5",
109
110
  },
110
111
  },
111
112
  compoundVariants: [
@@ -113,6 +114,7 @@ const buttonVariants = cva(
113
114
  { variant: "outline", size: "xs", class: "py-[5px] px-[11px]" },
114
115
  { variant: "outline", size: "sm", class: "py-[6px] px-[13px]" },
115
116
  { variant: "outline", size: "md", class: "py-[8px] px-[17px]" },
117
+ { variant: "outline", size: "lg", class: "py-[12px] px-[23px]" },
116
118
  ],
117
119
  defaultVariants: {
118
120
  variant: "primary",
@@ -129,6 +131,7 @@ const ledSizeClass: Record<Size, string> = {
129
131
  xs: "size-1",
130
132
  sm: "size-[5px]",
131
133
  md: "size-1.5",
134
+ lg: "size-2",
132
135
  };
133
136
 
134
137
  // Icon dimensions per size (used for both iconLeft wrapper and iconRight wrapper).
@@ -136,6 +139,7 @@ const iconSizeClass: Record<Size, string> = {
136
139
  xs: "size-[11px]",
137
140
  sm: "size-3",
138
141
  md: "size-[13px]",
142
+ lg: "size-4",
139
143
  };
140
144
 
141
145
  // LED color + static glow per variant.
@@ -8,21 +8,22 @@ const switchVariants = cva(
8
8
  "peer inline-flex shrink-0 cursor-pointer",
9
9
  "items-center rounded-[2px]",
10
10
  "border border-edge bg-muted dark:bg-neutral-900",
11
- "shadow-[inset_0_1px_0_rgba(255,255,255,0.06),inset_0_-1px_0_rgba(0,0,0,0.4)]",
11
+ "[box-shadow:inset_0_1px_0_rgba(255,255,255,0.7),inset_0_-1px_0_rgba(0,0,0,0.10)]",
12
+ "dark:[box-shadow:inset_0_1px_0_rgba(255,255,255,0.06),inset_0_-1px_0_rgba(0,0,0,0.4)]",
12
13
  "focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2",
13
- "disabled:bg-muted dark:disabled:bg-background",
14
- "disabled:border-edge/50 disabled:shadow-none",
14
+ "disabled:bg-edge dark:disabled:bg-background",
15
+ "disabled:border-edge-hover dark:disabled:border-edge/50 disabled:[box-shadow:none]",
15
16
  "disabled:cursor-not-allowed",
16
- "disabled:data-[state=checked]:border-edge/50",
17
+ "disabled:data-[state=checked]:border-edge-hover dark:disabled:data-[state=checked]:border-edge/50",
17
18
  "data-[state=checked]:border-accent/30",
18
19
  "transition-colors",
19
20
  ].join(" "),
20
21
  {
21
22
  variants: {
22
23
  size: {
23
- xs: "h-4 w-7",
24
- sm: "h-5 w-9",
25
- md: "h-6 w-11",
24
+ xs: "h-[18px] w-8",
25
+ sm: "h-[22px] w-10",
26
+ md: "h-[26px] w-[47px]",
26
27
  },
27
28
  },
28
29
  defaultVariants: {
@@ -45,9 +46,9 @@ const thumbVariants = cva(
45
46
  {
46
47
  variants: {
47
48
  size: {
48
- xs: "size-3 data-[state=checked]:translate-x-[12px]",
49
- sm: "size-4 data-[state=checked]:translate-x-[16px]",
50
- md: "size-5 data-[state=checked]:translate-x-[20px]",
49
+ xs: "size-3 data-[state=checked]:translate-x-[16px]",
50
+ sm: "size-4 data-[state=checked]:translate-x-[20px]",
51
+ md: "size-5 data-[state=checked]:translate-x-[23px]",
51
52
  },
52
53
  },
53
54
  defaultVariants: {
@@ -178,10 +178,10 @@
178
178
 
179
179
  --muted: var(--color-base-800);
180
180
  --muted-foreground: oklch(0.62 0.012 273);
181
- --surface: var(--color-base-900);
181
+ --surface: oklch(0.18 0.005 273);
182
182
  --surface-foreground: #f3f3f3;
183
- --edge: rgba(255, 255, 255, 0.08);
184
- --edge-hover: rgba(255, 255, 255, 0.14);
183
+ --edge: rgba(255, 255, 255, 0.16);
184
+ --edge-hover: rgba(255, 255, 255, 0.24);
185
185
  --popover-bg: var(--surface);
186
186
  --popover-border: var(--edge);
187
187