@snksergio/design-system 0.44.0 → 0.45.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.
Files changed (45) hide show
  1. package/dist-lib/chunks/app-shell-mocks-kWIVSzLs.mjs.map +1 -1
  2. package/dist-lib/chunks/app-shell-mocks-oO_IV3Gw.cjs.map +1 -1
  3. package/dist-lib/chunks/avatar-DFWEwBKu.mjs.map +1 -1
  4. package/dist-lib/chunks/avatar-eM5txRFZ.cjs.map +1 -1
  5. package/dist-lib/chunks/chat-v2-mocks-BV9Wha_Z.cjs.map +1 -1
  6. package/dist-lib/chunks/chat-v2-mocks-DvZRkhmz.mjs.map +1 -1
  7. package/dist-lib/chunks/page-header--cPS_Z-a.mjs.map +1 -1
  8. package/dist-lib/chunks/page-header-DvAJoEfb.cjs.map +1 -1
  9. package/dist-lib/chunks/{panel-CvfP8eP1.cjs → panel-4aMDou7z.cjs} +17 -6
  10. package/dist-lib/chunks/panel-4aMDou7z.cjs.map +1 -0
  11. package/dist-lib/chunks/{panel-CCPe1H70.mjs → panel-DtQi10ps.mjs} +17 -6
  12. package/dist-lib/chunks/panel-DtQi10ps.mjs.map +1 -0
  13. package/dist-lib/chunks/sheet-D1vQth7X.mjs.map +1 -1
  14. package/dist-lib/chunks/sheet-j-d_UX7R.cjs.map +1 -1
  15. package/dist-lib/chunks/toggle-group-BC4eS3Gt.cjs.map +1 -1
  16. package/dist-lib/chunks/toggle-group-CFiAGdm7.mjs.map +1 -1
  17. package/dist-lib/chunks/useTheme-C9Y6vxTf.cjs.map +1 -1
  18. package/dist-lib/chunks/useTheme-DCmzLBUR.mjs.map +1 -1
  19. package/dist-lib/index.cjs +161 -93
  20. package/dist-lib/index.cjs.map +1 -1
  21. package/dist-lib/index.mjs +163 -95
  22. package/dist-lib/index.mjs.map +1 -1
  23. package/dist-lib/preview/chat.cjs.map +1 -1
  24. package/dist-lib/preview/chat.mjs.map +1 -1
  25. package/dist-lib/preview/clientes.cjs +1 -1
  26. package/dist-lib/preview/clientes.mjs +1 -1
  27. package/dist-lib/src/components/ui/ChoroplethMap/choropleth-map.d.ts.map +1 -1
  28. package/dist-lib/src/components/ui/ChoroplethMap/choropleth-map.styles.d.ts +24 -6
  29. package/dist-lib/src/components/ui/ChoroplethMap/choropleth-map.styles.d.ts.map +1 -1
  30. package/dist-lib/src/components/ui/ChoroplethMap/choropleth-map.types.d.ts +11 -2
  31. package/dist-lib/src/components/ui/ChoroplethMap/choropleth-map.types.d.ts.map +1 -1
  32. package/dist-lib/src/components/ui/FormField/form-field-select.d.ts.map +1 -1
  33. package/dist-lib/src/components/ui/MessageBubble/message-bubble.d.ts.map +1 -1
  34. package/dist-lib/src/components/ui/MessageBubble/message-bubble.styles.d.ts.map +1 -1
  35. package/dist-lib/src/components/ui/MessageComposer/message-composer.styles.d.ts +9 -3
  36. package/dist-lib/src/components/ui/MessageComposer/message-composer.styles.d.ts.map +1 -1
  37. package/dist-lib/theme/brand-blue.css +110 -110
  38. package/dist-lib/theme/brand-green.css +110 -110
  39. package/dist-lib/theme/brand-pay.css +189 -189
  40. package/dist-lib/theme/brand-vibrant.css +148 -148
  41. package/dist-lib/tokens.cjs.map +1 -1
  42. package/dist-lib/tokens.mjs.map +1 -1
  43. package/package.json +4 -2
  44. package/dist-lib/chunks/panel-CCPe1H70.mjs.map +0 -1
  45. package/dist-lib/chunks/panel-CvfP8eP1.cjs.map +0 -1
@@ -2,8 +2,8 @@ var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
5
+ import { forwardRef, createContext, useContext, useId, useRef, useState, useCallback, useEffect, useMemo, Fragment as Fragment$1, useImperativeHandle, memo } from "react";
5
6
  import { A as AlertDialog, c as AlertDialogContent, f as AlertDialogHeader, i as AlertDialogTitle, d as AlertDialogDescription, e as AlertDialogFooter, b as AlertDialogCancel, a as AlertDialogAction, T as Textarea, S as Select, D as SelectTrigger, E as SelectValue, u as SelectContent, w as SelectItem, l as Checkbox, Q as Switch, C as Calendar$1, R as getPaginationRange, P as Pagination, o as PaginationFirst, t as PaginationPrevious, m as PaginationContent, p as PaginationItem, n as PaginationEllipsis, r as PaginationLink, s as PaginationNext, q as PaginationLast, N as SheetTitle, I as SheetDescription, G as SheetClose, F as Sheet, O as SheetTrigger, L as SheetOverlay } from "./sheet-D1vQth7X.mjs";
6
- import { forwardRef, createContext, useContext, useId, useState, useRef, useCallback, useEffect, useMemo, Fragment as Fragment$1, useImperativeHandle, memo } from "react";
7
7
  import { useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext, closestCorners, DragOverlay, useDroppable, useDraggable, closestCenter } from "@dnd-kit/core";
8
8
  import { useSortable, sortableKeyboardCoordinates, SortableContext, horizontalListSortingStrategy, arrayMove } from "@dnd-kit/sortable";
9
9
  import { useVirtualizer } from "@tanstack/react-virtual";
@@ -500,6 +500,7 @@ const FormFieldTextarea = forwardRef(
500
500
  )
501
501
  );
502
502
  FormFieldTextarea.displayName = "FormFieldTextarea";
503
+ const SENTINELA_VAZIO = "__ds_select_vazio__";
503
504
  function FormFieldSelect({
504
505
  label,
505
506
  required,
@@ -519,6 +520,13 @@ function FormFieldSelect({
519
520
  triggerClassName,
520
521
  contentClassName
521
522
  }) {
523
+ const abertoRef = useRef(false);
524
+ const valorEhOrfao = value !== void 0 && value !== "" && !options.some((opt) => opt.value === value);
525
+ const paraRadix = (v) => v === "" ? SENTINELA_VAZIO : v;
526
+ const aoMudarValor = (proximo) => {
527
+ if (proximo === "" && valorEhOrfao && !abertoRef.current) return;
528
+ onValueChange?.(proximo === SENTINELA_VAZIO ? "" : proximo);
529
+ };
522
530
  return /* @__PURE__ */ jsx(
523
531
  FormField,
524
532
  {
@@ -535,9 +543,12 @@ function FormFieldSelect({
535
543
  children: ({ id: fieldId, state: fieldState }) => /* @__PURE__ */ jsxs(
536
544
  Select,
537
545
  {
538
- value,
539
- defaultValue,
540
- onValueChange,
546
+ value: paraRadix(value),
547
+ defaultValue: paraRadix(defaultValue),
548
+ onValueChange: aoMudarValor,
549
+ onOpenChange: (aberto) => {
550
+ abertoRef.current = aberto;
551
+ },
541
552
  disabled,
542
553
  children: [
543
554
  /* @__PURE__ */ jsx(
@@ -552,7 +563,7 @@ function FormFieldSelect({
552
563
  /* @__PURE__ */ jsx(SelectContent, { className: contentClassName, children: options.map((opt) => /* @__PURE__ */ jsx(
553
564
  SelectItem,
554
565
  {
555
- value: opt.value,
566
+ value: paraRadix(opt.value),
556
567
  disabled: opt.disabled,
557
568
  children: opt.label
558
569
  },
@@ -13044,4 +13055,4 @@ export {
13044
13055
  DataTableActionsCell as y,
13045
13056
  DataTableEditCell as z
13046
13057
  };
13047
- //# sourceMappingURL=panel-CCPe1H70.mjs.map
13058
+ //# sourceMappingURL=panel-DtQi10ps.mjs.map