@mlw-packages/react-components 1.8.9 → 1.8.10

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.css CHANGED
@@ -641,6 +641,10 @@ body {
641
641
  margin-left: auto;
642
642
  margin-right: auto;
643
643
  }
644
+ .my-0\.5 {
645
+ margin-top: 0.125rem;
646
+ margin-bottom: 0.125rem;
647
+ }
644
648
  .my-1 {
645
649
  margin-top: 0.25rem;
646
650
  margin-bottom: 0.25rem;
package/dist/index.js CHANGED
@@ -1070,7 +1070,7 @@ var ProgressBase = React33__namespace.forwardRef(
1070
1070
  ]
1071
1071
  }
1072
1072
  ),
1073
- showValue && valuePosition === "right" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-12 text-sm font-extrabold text-left", children: [
1073
+ showValue && valuePosition === "right" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: " text-sm font-bold text-left", children: [
1074
1074
  Math.round(value || 0),
1075
1075
  "%"
1076
1076
  ] }),
@@ -3285,7 +3285,7 @@ function ModeToggleBase({
3285
3285
  DropDownMenuContentBase,
3286
3286
  {
3287
3287
  align: "end",
3288
- className: "border-border bg-popover text-popover-foreground min-w-[140px]",
3288
+ className: "border-border bg-popover text-popover-foreground min-w-[140px] ",
3289
3289
  children: themes.map((theme) => {
3290
3290
  const isActive = currentTheme === theme;
3291
3291
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -3293,8 +3293,8 @@ function ModeToggleBase({
3293
3293
  {
3294
3294
  onClick: () => toggleTheme(theme),
3295
3295
  className: cn(
3296
- "gap-3 transition-all duration-200",
3297
- isActive ? "bg-accent/80 text-accent-foreground border-l-2 border-primary font-medium pl-1.5" : "hover:bg-accent hover:text-accent-foreground"
3296
+ "gap-2 transition-all duration-200",
3297
+ isActive ? "bg-accent/80 text-accent-foreground border-l-2 border-primary font-medium pl-1.5 my-0.5" : "hover:bg-accent hover:text-accent-foreground"
3298
3298
  ),
3299
3299
  children: [
3300
3300
  /* @__PURE__ */ jsxRuntime.jsx(ThemeIcon, { theme }),
@@ -7526,18 +7526,17 @@ function ScrollColumn({ value, onChange, max, label }) {
7526
7526
  }
7527
7527
  }, 100);
7528
7528
  };
7529
- const handleMouseDown = (e) => {
7529
+ const handleStart = (pageY) => {
7530
7530
  if (!containerRef.current) return;
7531
7531
  setIsDragging(true);
7532
- setStartY(e.pageY);
7532
+ setStartY(pageY);
7533
7533
  setScrollTop(containerRef.current.scrollTop);
7534
7534
  };
7535
- const handleMouseMove = (e) => {
7535
+ const handleMove = (pageY) => {
7536
7536
  if (!isDragging || !containerRef.current) return;
7537
- e.preventDefault();
7538
- containerRef.current.scrollTop = scrollTop + (startY - e.pageY) * 2;
7537
+ containerRef.current.scrollTop = scrollTop + (startY - pageY) * 2;
7539
7538
  };
7540
- const handleMouseUp = () => {
7539
+ const handleEnd = () => {
7541
7540
  if (!containerRef.current) return;
7542
7541
  setIsDragging(false);
7543
7542
  requestAnimationFrame(() => {
@@ -7549,8 +7548,32 @@ function ScrollColumn({ value, onChange, max, label }) {
7549
7548
  }
7550
7549
  });
7551
7550
  };
7551
+ const handleMouseDown = (e) => {
7552
+ handleStart(e.pageY);
7553
+ };
7554
+ const handleMouseMove = (e) => {
7555
+ if (isDragging) {
7556
+ e.preventDefault();
7557
+ handleMove(e.pageY);
7558
+ }
7559
+ };
7560
+ const handleMouseUp = () => {
7561
+ handleEnd();
7562
+ };
7552
7563
  const handleMouseLeave = () => {
7553
- if (isDragging) handleMouseUp();
7564
+ if (isDragging) handleEnd();
7565
+ };
7566
+ const handleTouchStart = (e) => {
7567
+ handleStart(e.touches[0].pageY);
7568
+ };
7569
+ const handleTouchMove = (e) => {
7570
+ if (isDragging) {
7571
+ if (e.cancelable) e.preventDefault();
7572
+ handleMove(e.touches[0].pageY);
7573
+ }
7574
+ };
7575
+ const handleTouchEnd = () => {
7576
+ handleEnd();
7554
7577
  };
7555
7578
  const handleWheel = (e) => {
7556
7579
  e.stopPropagation();
@@ -7568,6 +7591,9 @@ function ScrollColumn({ value, onChange, max, label }) {
7568
7591
  onMouseMove: handleMouseMove,
7569
7592
  onMouseUp: handleMouseUp,
7570
7593
  onMouseLeave: handleMouseLeave,
7594
+ onTouchStart: handleTouchStart,
7595
+ onTouchMove: handleTouchMove,
7596
+ onTouchEnd: handleTouchEnd,
7571
7597
  style: {
7572
7598
  height: `${containerHeight}px`,
7573
7599
  paddingTop: `${centerIndex * itemHeight}px`,
package/dist/index.mjs CHANGED
@@ -1027,7 +1027,7 @@ var ProgressBase = React33.forwardRef(
1027
1027
  ]
1028
1028
  }
1029
1029
  ),
1030
- showValue && valuePosition === "right" && /* @__PURE__ */ jsxs("div", { className: "w-12 text-sm font-extrabold text-left", children: [
1030
+ showValue && valuePosition === "right" && /* @__PURE__ */ jsxs("div", { className: " text-sm font-bold text-left", children: [
1031
1031
  Math.round(value || 0),
1032
1032
  "%"
1033
1033
  ] }),
@@ -3242,7 +3242,7 @@ function ModeToggleBase({
3242
3242
  DropDownMenuContentBase,
3243
3243
  {
3244
3244
  align: "end",
3245
- className: "border-border bg-popover text-popover-foreground min-w-[140px]",
3245
+ className: "border-border bg-popover text-popover-foreground min-w-[140px] ",
3246
3246
  children: themes.map((theme) => {
3247
3247
  const isActive = currentTheme === theme;
3248
3248
  return /* @__PURE__ */ jsxs(
@@ -3250,8 +3250,8 @@ function ModeToggleBase({
3250
3250
  {
3251
3251
  onClick: () => toggleTheme(theme),
3252
3252
  className: cn(
3253
- "gap-3 transition-all duration-200",
3254
- isActive ? "bg-accent/80 text-accent-foreground border-l-2 border-primary font-medium pl-1.5" : "hover:bg-accent hover:text-accent-foreground"
3253
+ "gap-2 transition-all duration-200",
3254
+ isActive ? "bg-accent/80 text-accent-foreground border-l-2 border-primary font-medium pl-1.5 my-0.5" : "hover:bg-accent hover:text-accent-foreground"
3255
3255
  ),
3256
3256
  children: [
3257
3257
  /* @__PURE__ */ jsx(ThemeIcon, { theme }),
@@ -7483,18 +7483,17 @@ function ScrollColumn({ value, onChange, max, label }) {
7483
7483
  }
7484
7484
  }, 100);
7485
7485
  };
7486
- const handleMouseDown = (e) => {
7486
+ const handleStart = (pageY) => {
7487
7487
  if (!containerRef.current) return;
7488
7488
  setIsDragging(true);
7489
- setStartY(e.pageY);
7489
+ setStartY(pageY);
7490
7490
  setScrollTop(containerRef.current.scrollTop);
7491
7491
  };
7492
- const handleMouseMove = (e) => {
7492
+ const handleMove = (pageY) => {
7493
7493
  if (!isDragging || !containerRef.current) return;
7494
- e.preventDefault();
7495
- containerRef.current.scrollTop = scrollTop + (startY - e.pageY) * 2;
7494
+ containerRef.current.scrollTop = scrollTop + (startY - pageY) * 2;
7496
7495
  };
7497
- const handleMouseUp = () => {
7496
+ const handleEnd = () => {
7498
7497
  if (!containerRef.current) return;
7499
7498
  setIsDragging(false);
7500
7499
  requestAnimationFrame(() => {
@@ -7506,8 +7505,32 @@ function ScrollColumn({ value, onChange, max, label }) {
7506
7505
  }
7507
7506
  });
7508
7507
  };
7508
+ const handleMouseDown = (e) => {
7509
+ handleStart(e.pageY);
7510
+ };
7511
+ const handleMouseMove = (e) => {
7512
+ if (isDragging) {
7513
+ e.preventDefault();
7514
+ handleMove(e.pageY);
7515
+ }
7516
+ };
7517
+ const handleMouseUp = () => {
7518
+ handleEnd();
7519
+ };
7509
7520
  const handleMouseLeave = () => {
7510
- if (isDragging) handleMouseUp();
7521
+ if (isDragging) handleEnd();
7522
+ };
7523
+ const handleTouchStart = (e) => {
7524
+ handleStart(e.touches[0].pageY);
7525
+ };
7526
+ const handleTouchMove = (e) => {
7527
+ if (isDragging) {
7528
+ if (e.cancelable) e.preventDefault();
7529
+ handleMove(e.touches[0].pageY);
7530
+ }
7531
+ };
7532
+ const handleTouchEnd = () => {
7533
+ handleEnd();
7511
7534
  };
7512
7535
  const handleWheel = (e) => {
7513
7536
  e.stopPropagation();
@@ -7525,6 +7548,9 @@ function ScrollColumn({ value, onChange, max, label }) {
7525
7548
  onMouseMove: handleMouseMove,
7526
7549
  onMouseUp: handleMouseUp,
7527
7550
  onMouseLeave: handleMouseLeave,
7551
+ onTouchStart: handleTouchStart,
7552
+ onTouchMove: handleTouchMove,
7553
+ onTouchEnd: handleTouchEnd,
7528
7554
  style: {
7529
7555
  height: `${containerHeight}px`,
7530
7556
  paddingTop: `${centerIndex * itemHeight}px`,
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@mlw-packages/react-components",
3
- "developer": "Eduardo Ronchi de Araujo - Desenvolvidor de Sistemas Junio",
3
+ "developer": "Eduardo Junio",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "1.8.9",
7
+ "version": "1.8.10",
8
8
  "homepage": "https://main--68e80310a069c2f10b546ef3.chromatic.com/",
9
9
  "repository": {
10
10
  "type": "git",
@@ -15,7 +15,7 @@
15
15
  "types": "dist/index.d.ts",
16
16
  "style": "dist/global.css",
17
17
  "files": [
18
- "dist"
18
+ "dist"
19
19
  ],
20
20
  "scripts": {
21
21
  "dev": "vite",