@pathscale/ui 1.1.24 → 1.1.26

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.
@@ -4,12 +4,13 @@
4
4
  flex-shrink: 0;
5
5
  align-items: center;
6
6
  justify-content: center;
7
- gap: 0.125rem;
7
+ gap: 0.25rem;
8
8
  font-weight: 500;
9
9
 
10
10
  min-height: 1.75rem;
11
11
  min-width: 1.75rem;
12
- border-radius: 1.5rem;
12
+ padding-inline: 0.625rem;
13
+ border-radius: 9999px;
13
14
  font-size: 0.75rem;
14
15
  line-height: 1.34;
15
16
 
@@ -23,7 +24,6 @@
23
24
  }
24
25
 
25
26
  .badge__label {
26
- padding-inline: 0.125rem;
27
27
  }
28
28
 
29
29
  .badge-anchor {
@@ -35,7 +35,7 @@
35
35
  .badge--lg {
36
36
  min-height: 2rem;
37
37
  min-width: 2rem;
38
- border-radius: 1rem;
38
+ padding-inline: 0.75rem;
39
39
  font-size: 0.875rem;
40
40
  line-height: 1.43;
41
41
  }
@@ -47,7 +47,7 @@
47
47
  .badge--sm {
48
48
  min-height: 1rem;
49
49
  min-width: 1rem;
50
- border-radius: 0.75rem;
50
+ padding-inline: 0.375rem;
51
51
  font-size: 10px;
52
52
  line-height: 1.34;
53
53
  }
@@ -8,7 +8,7 @@ declare const BadgeAnchor: (props: BadgeAnchorProps) => JSX.Element;
8
8
  type BadgeColor = "default" | "accent" | "success" | "warning" | "danger";
9
9
  type BadgeVariant = "primary" | "secondary" | "soft";
10
10
  type BadgeSize = "sm" | "md" | "lg";
11
- type BadgePlacement = "top-right" | "top-left" | "bottom-right" | "bottom-left";
11
+ type BadgePlacement = "none" | "top-right" | "top-left" | "bottom-right" | "bottom-left";
12
12
  interface BadgeRootProps extends Omit<JSX.HTMLAttributes<HTMLSpanElement>, "color"> {
13
13
  class?: string;
14
14
  children?: JSX.Element;
@@ -39,6 +39,7 @@ const BADGE_VARIANT_CLASS = {
39
39
  soft: "badge--soft"
40
40
  };
41
41
  const BADGE_PLACEMENT_CLASS = {
42
+ none: "",
42
43
  "top-right": "badge--top-right",
43
44
  "top-left": "badge--top-left",
44
45
  "bottom-right": "badge--bottom-right",
@@ -57,7 +58,7 @@ const BadgeRoot = (props)=>{
57
58
  const size = local.size ?? "md";
58
59
  const color = local.color ?? "default";
59
60
  const variant = local.variant ?? "primary";
60
- const placement = local.placement ?? "top-right";
61
+ const placement = local.placement ?? "none";
61
62
  return (0, __WEBPACK_EXTERNAL_MODULE_tailwind_merge_e05e3e95__.twMerge)((0, __WEBPACK_EXTERNAL_MODULE_clsx__.clsx)("badge", BADGE_SIZE_CLASS[size], BADGE_COLOR_CLASS[color], BADGE_VARIANT_CLASS[variant], BADGE_PLACEMENT_CLASS[placement], local.class));
62
63
  };
63
64
  const badgeChildren = ()=>{
@@ -42,34 +42,33 @@ const ThemeColorPicker_ThemeColorPicker = (props)=>{
42
42
  const GRAYSCALE_SWATCHES = [
43
43
  {
44
44
  label: "White",
45
- lightness: 10
45
+ theme: "light"
46
46
  },
47
47
  {
48
48
  label: "Light gray",
49
- lightness: 5
49
+ theme: "light"
50
50
  },
51
51
  {
52
52
  label: "Gray",
53
- lightness: 0
53
+ theme: "light"
54
54
  },
55
55
  {
56
56
  label: "Dark gray",
57
- lightness: -5
57
+ theme: "dark"
58
58
  },
59
59
  {
60
60
  label: "Charcoal",
61
- lightness: -10
61
+ theme: "dark"
62
62
  },
63
63
  {
64
64
  label: "Black",
65
- lightness: -15
65
+ theme: "dark"
66
66
  }
67
67
  ];
68
- const handleGrayscale = (lightnessOffset)=>{
68
+ const handleGrayscale = (theme)=>{
69
69
  store().setThemeColor(null);
70
70
  local.onColorChange?.(null, 0);
71
- if (lightnessOffset >= 5) local.onThemeSwitch?.("light");
72
- else if (lightnessOffset <= -10) local.onThemeSwitch?.("dark");
71
+ local.onThemeSwitch?.(theme);
73
72
  };
74
73
  (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createEffect)(()=>{
75
74
  if (!isOpen()) return;
@@ -159,7 +158,7 @@ const ThemeColorPicker_ThemeColorPicker = (props)=>{
159
158
  each: GRAYSCALE_SWATCHES,
160
159
  children: (g, i)=>(()=>{
161
160
  var _el$6 = _tmpl$4();
162
- _el$6.$$click = ()=>handleGrayscale(g.lightness);
161
+ _el$6.$$click = ()=>handleGrayscale(g.theme);
163
162
  (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
164
163
  var _v$ = `oklch(${[
165
164
  95,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pathscale/ui",
3
- "version": "1.1.24",
3
+ "version": "1.1.26",
4
4
  "author": "pathscale",
5
5
  "repository": {
6
6
  "type": "git",