@mlw-packages/react-components 1.9.1 → 1.9.2

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/README.md CHANGED
@@ -123,117 +123,6 @@ Use **Controls** para testar props dinamicamente e **Docs** para copiar snippets
123
123
 
124
124
  ---
125
125
 
126
- ### Lista completa de componentes
127
-
128
- Abaixo está a lista completa de componentes :
129
-
130
- - AlertDialog
131
-
132
- - Avatar
133
-
134
- - Badge
135
-
136
- - BarChart
137
-
138
- - Breadcrumb
139
-
140
- - Button
141
-
142
- - Calendar
143
-
144
- - Card
145
-
146
- - Carousel
147
-
148
- - Chart
149
-
150
- - CheckBox
151
-
152
- - Collapsible
153
-
154
- - Combobox
155
-
156
- - ComboboxBase
157
-
158
- - Command
159
-
160
- - ContextMenu
161
-
162
- - DateTimePicker
163
-
164
- - DebouncedInput
165
-
166
- - DestructiveDialog
167
-
168
- - Dialog
169
-
170
- - DraggableTooltip
171
-
172
- - Drawer
173
-
174
- - DropDownMenu
175
-
176
- - FileUploader
177
-
178
- - Filter
179
-
180
- - Home
181
-
182
- - HoverCard
183
-
184
- - Input
185
-
186
- - Input-OTP
187
-
188
- - Label
189
-
190
- - LineChart
191
-
192
- - Loading
193
-
194
- - Modal
195
-
196
- - ModeToggle
197
-
198
- - MultiCombobox
199
-
200
- - NavigationMenu
201
-
202
- - PieChart
203
-
204
- - Popover
205
-
206
- - rogress
207
-
208
- - RangePicker
209
-
210
- - Scrollarea
211
-
212
- - Select
213
-
214
- - Separator
215
-
216
- - Sheet
217
-
218
- - Sidebar
219
-
220
- - Skeleton
221
-
222
- - Slider
223
-
224
- - Sonner
225
-
226
- - Switch
227
-
228
- - Table
229
-
230
- - Tabs
231
-
232
- - TextArea
233
-
234
- - Tooltip
235
-
236
- ---
237
126
 
238
127
  ## Desenvolvimento local
239
128
 
package/dist/index.css CHANGED
@@ -1049,8 +1049,8 @@ body {
1049
1049
  .max-h-\[300px\] {
1050
1050
  max-height: 300px;
1051
1051
  }
1052
- .max-h-\[65vh\] {
1053
- max-height: 65vh;
1052
+ .max-h-\[95vh\] {
1053
+ max-height: 95vh;
1054
1054
  }
1055
1055
  .max-h-\[calc\(100dvh-2rem\)\] {
1056
1056
  max-height: calc(100dvh - 2rem);
@@ -2716,9 +2716,6 @@ body {
2716
2716
  .bg-gradient-to-r {
2717
2717
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
2718
2718
  }
2719
- .bg-gradient-to-t {
2720
- background-image: linear-gradient(to top, var(--tw-gradient-stops));
2721
- }
2722
2719
  .from-background {
2723
2720
  --tw-gradient-from: hsl(var(--background)) var(--tw-gradient-from-position);
2724
2721
  --tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);
@@ -2754,13 +2751,6 @@ body {
2754
2751
  --tw-gradient-to: hsl(var(--ring) / 0) var(--tw-gradient-to-position);
2755
2752
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
2756
2753
  }
2757
- .via-background\/80 {
2758
- --tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);
2759
- --tw-gradient-stops:
2760
- var(--tw-gradient-from),
2761
- hsl(var(--background) / 0.8) var(--tw-gradient-via-position),
2762
- var(--tw-gradient-to);
2763
- }
2764
2754
  .via-ring\/10 {
2765
2755
  --tw-gradient-to: hsl(var(--ring) / 0) var(--tw-gradient-to-position);
2766
2756
  --tw-gradient-stops:
@@ -2786,9 +2776,6 @@ body {
2786
2776
  .to-ring\/20 {
2787
2777
  --tw-gradient-to: hsl(var(--ring) / 0.2) var(--tw-gradient-to-position);
2788
2778
  }
2789
- .to-transparent {
2790
- --tw-gradient-to: transparent var(--tw-gradient-to-position);
2791
- }
2792
2779
  .bg-clip-text {
2793
2780
  -webkit-background-clip: text;
2794
2781
  background-clip: text;
package/dist/index.js CHANGED
@@ -670,7 +670,7 @@ var DialogOverlayBase = React33__namespace.forwardRef(({ className, testid: data
670
670
  {
671
671
  ref,
672
672
  className: cn(
673
- "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 border-border",
673
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 ",
674
674
  className
675
675
  ),
676
676
  "data-testid": dataTestId,
@@ -1315,15 +1315,27 @@ var toast = {
1315
1315
  };
1316
1316
  var MOBILE_BREAKPOINT = 768;
1317
1317
  function useIsMobile() {
1318
- const [isMobile, setIsMobile] = React33__namespace.useState(void 0);
1318
+ const [isMobile, setIsMobile] = React33__namespace.useState(
1319
+ void 0
1320
+ );
1319
1321
  React33__namespace.useEffect(() => {
1322
+ const checkIsMobile = () => {
1323
+ const isTouch = window.matchMedia("(pointer: coarse)").matches || navigator.maxTouchPoints > 0;
1324
+ const isSmallScreen = window.innerWidth < MOBILE_BREAKPOINT;
1325
+ return isTouch || isSmallScreen;
1326
+ };
1320
1327
  const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
1328
+ const touchMql = window.matchMedia("(pointer: coarse)");
1321
1329
  const onChange = () => {
1322
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
1330
+ setIsMobile(checkIsMobile());
1323
1331
  };
1324
1332
  mql.addEventListener("change", onChange);
1325
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
1326
- return () => mql.removeEventListener("change", onChange);
1333
+ touchMql.addEventListener("change", onChange);
1334
+ setIsMobile(checkIsMobile());
1335
+ return () => {
1336
+ mql.removeEventListener("change", onChange);
1337
+ touchMql.removeEventListener("change", onChange);
1338
+ };
1327
1339
  }, []);
1328
1340
  return !!isMobile;
1329
1341
  }
@@ -7764,13 +7776,11 @@ function ScrollColumn({
7764
7776
  } = useScrollColumn({ value, onChange, max, step });
7765
7777
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
7766
7778
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground rounded-md font-semibold text-sm text-center pb-2 uppercase tracking-wider", children: label }),
7767
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative w-24 sm:w-20"), children: [
7768
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-0 left-0 right-0 h-16 bg-gradient-to-b from-background via-background/80 to-transparent pointer-events-none z-20" }),
7769
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-0 left-0 right-0 h-16 bg-gradient-to-t from-background via-background/80 to-transparent pointer-events-none z-20" }),
7779
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative w-20"), children: [
7770
7780
  /* @__PURE__ */ jsxRuntime.jsx(
7771
7781
  "div",
7772
7782
  {
7773
- className: "absolute left-0 right-0 pointer-events-none bg-muted/50 backdrop-blur-sm rounded-md border border-border",
7783
+ className: "absolute left-0 right-0 pointer-events-none bg-muted/50 rounded-md border border-border",
7774
7784
  style: {
7775
7785
  top: `${centerIndex * itemHeight}px`,
7776
7786
  height: `${itemHeight}px`
@@ -8154,7 +8164,7 @@ function DateTimePicker({
8154
8164
  }
8155
8165
  ),
8156
8166
  /* @__PURE__ */ jsxRuntime.jsx(ErrorMessage_default, { error }),
8157
- /* @__PURE__ */ jsxRuntime.jsx(DialogContentBase, { className: "p-0 max-h-[65vh] w-[calc(100vw-24px)] sm:w-[calc(100vw-32px)] overflow-hidden flex flex-col", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-y-auto flex-1", children: renderPickerContent() }) })
8167
+ /* @__PURE__ */ jsxRuntime.jsx(DialogContentBase, { className: "p-0 max-h-[95vh] w-[calc(100vw-24px)] sm:w-[calc(100vw-32px)] overflow-hidden flex flex-col", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-y-auto flex-1", children: renderPickerContent() }) })
8158
8168
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs(PopoverBase, { open, onOpenChange: setOpen, children: [
8159
8169
  /* @__PURE__ */ jsxRuntime.jsx(
8160
8170
  PopoverTriggerBase,
package/dist/index.mjs CHANGED
@@ -627,7 +627,7 @@ var DialogOverlayBase = React33.forwardRef(({ className, testid: dataTestId = "d
627
627
  {
628
628
  ref,
629
629
  className: cn(
630
- "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 border-border",
630
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 ",
631
631
  className
632
632
  ),
633
633
  "data-testid": dataTestId,
@@ -1272,15 +1272,27 @@ var toast = {
1272
1272
  };
1273
1273
  var MOBILE_BREAKPOINT = 768;
1274
1274
  function useIsMobile() {
1275
- const [isMobile, setIsMobile] = React33.useState(void 0);
1275
+ const [isMobile, setIsMobile] = React33.useState(
1276
+ void 0
1277
+ );
1276
1278
  React33.useEffect(() => {
1279
+ const checkIsMobile = () => {
1280
+ const isTouch = window.matchMedia("(pointer: coarse)").matches || navigator.maxTouchPoints > 0;
1281
+ const isSmallScreen = window.innerWidth < MOBILE_BREAKPOINT;
1282
+ return isTouch || isSmallScreen;
1283
+ };
1277
1284
  const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
1285
+ const touchMql = window.matchMedia("(pointer: coarse)");
1278
1286
  const onChange = () => {
1279
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
1287
+ setIsMobile(checkIsMobile());
1280
1288
  };
1281
1289
  mql.addEventListener("change", onChange);
1282
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
1283
- return () => mql.removeEventListener("change", onChange);
1290
+ touchMql.addEventListener("change", onChange);
1291
+ setIsMobile(checkIsMobile());
1292
+ return () => {
1293
+ mql.removeEventListener("change", onChange);
1294
+ touchMql.removeEventListener("change", onChange);
1295
+ };
1284
1296
  }, []);
1285
1297
  return !!isMobile;
1286
1298
  }
@@ -7721,13 +7733,11 @@ function ScrollColumn({
7721
7733
  } = useScrollColumn({ value, onChange, max, step });
7722
7734
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
7723
7735
  /* @__PURE__ */ jsx("span", { className: "text-muted-foreground rounded-md font-semibold text-sm text-center pb-2 uppercase tracking-wider", children: label }),
7724
- /* @__PURE__ */ jsxs("div", { className: cn("relative w-24 sm:w-20"), children: [
7725
- /* @__PURE__ */ jsx("div", { className: "absolute top-0 left-0 right-0 h-16 bg-gradient-to-b from-background via-background/80 to-transparent pointer-events-none z-20" }),
7726
- /* @__PURE__ */ jsx("div", { className: "absolute bottom-0 left-0 right-0 h-16 bg-gradient-to-t from-background via-background/80 to-transparent pointer-events-none z-20" }),
7736
+ /* @__PURE__ */ jsxs("div", { className: cn("relative w-20"), children: [
7727
7737
  /* @__PURE__ */ jsx(
7728
7738
  "div",
7729
7739
  {
7730
- className: "absolute left-0 right-0 pointer-events-none bg-muted/50 backdrop-blur-sm rounded-md border border-border",
7740
+ className: "absolute left-0 right-0 pointer-events-none bg-muted/50 rounded-md border border-border",
7731
7741
  style: {
7732
7742
  top: `${centerIndex * itemHeight}px`,
7733
7743
  height: `${itemHeight}px`
@@ -8111,7 +8121,7 @@ function DateTimePicker({
8111
8121
  }
8112
8122
  ),
8113
8123
  /* @__PURE__ */ jsx(ErrorMessage_default, { error }),
8114
- /* @__PURE__ */ jsx(DialogContentBase, { className: "p-0 max-h-[65vh] w-[calc(100vw-24px)] sm:w-[calc(100vw-32px)] overflow-hidden flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "overflow-y-auto flex-1", children: renderPickerContent() }) })
8124
+ /* @__PURE__ */ jsx(DialogContentBase, { className: "p-0 max-h-[95vh] w-[calc(100vw-24px)] sm:w-[calc(100vw-32px)] overflow-hidden flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "overflow-y-auto flex-1", children: renderPickerContent() }) })
8115
8125
  ] }) : /* @__PURE__ */ jsxs(PopoverBase, { open, onOpenChange: setOpen, children: [
8116
8126
  /* @__PURE__ */ jsx(
8117
8127
  PopoverTriggerBase,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "1.9.1",
7
+ "version": "1.9.2",
8
8
  "homepage": "https://main--68e80310a069c2f10b546ef3.chromatic.com/",
9
9
  "repository": {
10
10
  "type": "git",