@yeverlibs/ds 1.1.12 → 1.1.14

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.d.mts CHANGED
@@ -214,19 +214,6 @@ type CheckboxGroupProps<T extends string | number | boolean = string> = {
214
214
 
215
215
  declare const CheckboxGroup: <T extends string | number | boolean = string>({ options, onChange, label, multiSelect, useSvgCheck, wrapperClassName, labelClassName, defaultSelectedValue, isBackgroundChecked, variant, allowUncheck, }: CheckboxGroupProps<T>) => react_jsx_runtime.JSX.Element;
216
216
 
217
- type ModalProps = {
218
- isModalOpen: boolean
219
- setIsModalOpen: Dispatch<SetStateAction<boolean>>
220
- onDelete: () => Promise<any>
221
- successMessage?: string
222
- location?: string
223
- title: string
224
- message: string
225
- onSuccess?: () => void
226
- }
227
-
228
- declare const DeleteModal: React.FC<ModalProps>;
229
-
230
217
  interface DropdownContextType {
231
218
  isOpen: boolean;
232
219
  toggleDropdown: () => void;
@@ -1515,4 +1502,4 @@ declare const useCopyToClipboard: (successMessage?: string) => {
1515
1502
  copyToClipboard: (initialText: string) => void;
1516
1503
  };
1517
1504
 
1518
- export { Alert, MemoAlertDefault as AlertDefault, MemoAlertError as AlertError, MemoAlertGuard as AlertGuard, MemoAlertInfo as AlertInfo, MemoAlertWarning as AlertWarning, MemoApi as Api, MemoArrowLeft as ArrowLeft, MemoArrowNarrowUpRight as ArrowNarrowUpRight, Avatar, BarChart, MemoBoleto as Boleto, Box, Button, type ButtonProps, ButtonToggleGroup, type ButtonToggleGroupProps, CSV, MemoCalendar as Calendar, MemoCard as Card, MemoCarrFree as CarrFree, MemoCarretDown as CarretDown, MemoCarretSingleRight as CarretSingleRight, CarrinhoAbandonado, MemoCart as Cart, MemoChargeback as Chargeback, MemoCheck as Check, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxOption, MemoCheckout as Checkout, MemoChevronDown as ChevronDown, MemoChevronLeftDouble as ChevronLeftDouble, MemoCloseCheckbox as CloseCheckbox, MemoCloseIcon as CloseIcon, MemoCloud as Cloud, MemoCodeCircle as CodeCircle, type Column, MemoConfiguracoes as Configuracoes, MemoCopy as Copy, MemoCopyLink as CopyLink, Counter, MemoCreditCard as CreditCard, MemoCupom as Cupom, CurrencyInput, CustomSelect, MemoDashboard as Dashboard, DatePicker, type DatePickerProps, type DateStateProps, DeleteModal, MemoDelivery as Delivery, MemoDepoimentos as Depoimentos, MemoDistribuicao as Distribuicao, MemoDistribution as Distribution, MemoDominios as Dominios, MemoDownloadArrow as DownloadArrow, MemoDrag as Drag, DropdownContext, DropdownItens, DropdownTrigger, DrowpdownButton, MemoEdit as Edit, Emails, MemoExtrato as Extrato, MemoEyeInput as EyeInput, MemoEyeOff as EyeOff, FeedbackBadge, MemoFileMinus as FileMinus, FileUploadWithDisplayName as FileUpload, FilterDrawer, MemoFilterLines as FilterLines, FilterList, FilterListContext, FilterTrigger, MemoFinanceiro as Financeiro, FormWrapper, MemoFrete as Frete, MemoFreteGratis as FreteGratis, GeneralPageLinks, MemoGestao as Gestao, MemoGlobe as Globe, GlobeVariant, Grid, GridColumn, Guard, Heading, MemoHeadphones as Headphones, MemoHelp as Help, MemoHelpCircle as HelpCircle, Home, MemoInfoCircle as InfoCircle, Input, MemoIntegracoes as Integracoes, LineChart, Link$1 as Link, MemoLink as LinkIcon, type LinkProps, MemoLoadingSpinner as LoadingSpinner, MemoLock as Lock, MemoLockInput as LockInput, Logistica, MemoLoja as Loja, LojaAlert, LojaAlertSuccess, MemoMail as Mail, MemoMailInput as MailInput, MemoMarkerPin as MarkerPin, MemoMarketing as Marketing, MediumRisk, MemoMessage as Message, Modal, MemoMoney as Money, MultiSelect, NewIcons, MemoNewMessage as NewMessage, MemoNewNotification as NewNotification, MemoNotificacoes as Notificacoes, MemoNotification as Notification, NotificationItem, MemoNotifications as Notifications, type OpenAsBlobOptions, MemoOrderBump as OrderBump, PageContainer, PaginatedData, PaymentCard, MemoPermissaoDeAcesso as PermissaoDeAcesso, PhoneCall, PieChart, MemoPix as Pix, MemoPixels as Pixels, Planilha, MemoPlus as Plus, MemoPrechargeback as Prechargeback, PrefetchLink, PreviewPhone, PriceSkeleton, MemoProduto as Produto, MemoProdutos as Produtos, MemoPromocoes as Promocoes, RecuperacaoDeCarrinho, MemoRefresh as Refresh, MemoRelatorios as Relatorios, MemoRestricaoDeAcesso as RestricaoDeAcesso, Ribbon, MemoRisco as Risco, MemoSac as Sac, MemoSearchMd as SearchMd, SelectableOption, Separator, MemoSignout as Signout, SliderInput, SlidingPanel, Spinner$1 as Spinner, MemoSpinner as SpinnerIcon, StatusBadge, MemoStore as Store, Switch$1 as Switch, MemoSwitch as SwitchIcon, type SwitchProps, Table, Tabs, Text, Textarea, TimeInput, TimerCounter, type CounterInputProps$1 as TimerCounterProps, TimerCounterWithoutSeconds, type CounterInputProps as TimerCounterWithoutSecondsProps, Tooltip, MemoTransfer as Transfer, MemoTrash as Trash, MemoTruck as Truck, MemoUpsell as Upsell, MemoUser as User, MemoUsers as Users, MemoVerticalPoints as VerticalPoints, MemoWarning as Warning, MemoWebhook as Webhook, MemoWebhook$1 as WebhookConfig, MemoWhatsapp as Whatsapp, Xlsx, MemoYever as Yever, calculateCurrencyOperation, cn, colors, fontFamily, formatCNPJ, formatCNPJCPF, formatCPF, formatCurrency, formatCurrencyShort, formatDate, formatDateAndReturnPassedHours, formatDateGeneric, formatDateInPassedDays, formatDateTime, formatDateToISO, formatIP, formatName, formatNumberToCurrency, formatPhone, formatPostalCode, formatRawDigitsToCurrency, formatTime$1 as formatTimeWithSeconds, formatTime as formatTimeWithoutSeconds, getDates, handleFormSubmission, nextReplaceUrl, parseFormattedCurrency, parseParametersIntoUrl, searchParamsToUrl, shadow, transformDateToAmericanFormat, transformToCurrency, transformToNumber, transformToPercentage, truncateString, useCopyToClipboard, useFetchClientSide };
1505
+ export { Alert, MemoAlertDefault as AlertDefault, MemoAlertError as AlertError, MemoAlertGuard as AlertGuard, MemoAlertInfo as AlertInfo, MemoAlertWarning as AlertWarning, MemoApi as Api, MemoArrowLeft as ArrowLeft, MemoArrowNarrowUpRight as ArrowNarrowUpRight, Avatar, BarChart, MemoBoleto as Boleto, Box, Button, type ButtonProps, ButtonToggleGroup, type ButtonToggleGroupProps, CSV, MemoCalendar as Calendar, MemoCard as Card, MemoCarrFree as CarrFree, MemoCarretDown as CarretDown, MemoCarretSingleRight as CarretSingleRight, CarrinhoAbandonado, MemoCart as Cart, MemoChargeback as Chargeback, MemoCheck as Check, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxOption, MemoCheckout as Checkout, MemoChevronDown as ChevronDown, MemoChevronLeftDouble as ChevronLeftDouble, MemoCloseCheckbox as CloseCheckbox, MemoCloseIcon as CloseIcon, MemoCloud as Cloud, MemoCodeCircle as CodeCircle, type Column, MemoConfiguracoes as Configuracoes, MemoCopy as Copy, MemoCopyLink as CopyLink, Counter, MemoCreditCard as CreditCard, MemoCupom as Cupom, CurrencyInput, CustomSelect, MemoDashboard as Dashboard, DatePicker, type DatePickerProps, type DateStateProps, MemoDelivery as Delivery, MemoDepoimentos as Depoimentos, MemoDistribuicao as Distribuicao, MemoDistribution as Distribution, MemoDominios as Dominios, MemoDownloadArrow as DownloadArrow, MemoDrag as Drag, DropdownContext, DropdownItens, DropdownTrigger, DrowpdownButton, MemoEdit as Edit, Emails, MemoExtrato as Extrato, MemoEyeInput as EyeInput, MemoEyeOff as EyeOff, FeedbackBadge, MemoFileMinus as FileMinus, FileUploadWithDisplayName as FileUpload, FilterDrawer, MemoFilterLines as FilterLines, FilterList, FilterListContext, FilterTrigger, MemoFinanceiro as Financeiro, FormWrapper, MemoFrete as Frete, MemoFreteGratis as FreteGratis, GeneralPageLinks, MemoGestao as Gestao, MemoGlobe as Globe, GlobeVariant, Grid, GridColumn, Guard, Heading, MemoHeadphones as Headphones, MemoHelp as Help, MemoHelpCircle as HelpCircle, Home, MemoInfoCircle as InfoCircle, Input, MemoIntegracoes as Integracoes, LineChart, Link$1 as Link, MemoLink as LinkIcon, type LinkProps, MemoLoadingSpinner as LoadingSpinner, MemoLock as Lock, MemoLockInput as LockInput, Logistica, MemoLoja as Loja, LojaAlert, LojaAlertSuccess, MemoMail as Mail, MemoMailInput as MailInput, MemoMarkerPin as MarkerPin, MemoMarketing as Marketing, MediumRisk, MemoMessage as Message, Modal, MemoMoney as Money, MultiSelect, NewIcons, MemoNewMessage as NewMessage, MemoNewNotification as NewNotification, MemoNotificacoes as Notificacoes, MemoNotification as Notification, NotificationItem, MemoNotifications as Notifications, type OpenAsBlobOptions, MemoOrderBump as OrderBump, PageContainer, PaginatedData, PaymentCard, MemoPermissaoDeAcesso as PermissaoDeAcesso, PhoneCall, PieChart, MemoPix as Pix, MemoPixels as Pixels, Planilha, MemoPlus as Plus, MemoPrechargeback as Prechargeback, PrefetchLink, PreviewPhone, PriceSkeleton, MemoProduto as Produto, MemoProdutos as Produtos, MemoPromocoes as Promocoes, RecuperacaoDeCarrinho, MemoRefresh as Refresh, MemoRelatorios as Relatorios, MemoRestricaoDeAcesso as RestricaoDeAcesso, Ribbon, MemoRisco as Risco, MemoSac as Sac, MemoSearchMd as SearchMd, SelectableOption, Separator, MemoSignout as Signout, SliderInput, SlidingPanel, Spinner$1 as Spinner, MemoSpinner as SpinnerIcon, StatusBadge, MemoStore as Store, Switch$1 as Switch, MemoSwitch as SwitchIcon, type SwitchProps, Table, Tabs, Text, Textarea, TimeInput, TimerCounter, type CounterInputProps$1 as TimerCounterProps, TimerCounterWithoutSeconds, type CounterInputProps as TimerCounterWithoutSecondsProps, Tooltip, MemoTransfer as Transfer, MemoTrash as Trash, MemoTruck as Truck, MemoUpsell as Upsell, MemoUser as User, MemoUsers as Users, MemoVerticalPoints as VerticalPoints, MemoWarning as Warning, MemoWebhook as Webhook, MemoWebhook$1 as WebhookConfig, MemoWhatsapp as Whatsapp, Xlsx, MemoYever as Yever, calculateCurrencyOperation, cn, colors, fontFamily, formatCNPJ, formatCNPJCPF, formatCPF, formatCurrency, formatCurrencyShort, formatDate, formatDateAndReturnPassedHours, formatDateGeneric, formatDateInPassedDays, formatDateTime, formatDateToISO, formatIP, formatName, formatNumberToCurrency, formatPhone, formatPostalCode, formatRawDigitsToCurrency, formatTime$1 as formatTimeWithSeconds, formatTime as formatTimeWithoutSeconds, getDates, handleFormSubmission, nextReplaceUrl, parseFormattedCurrency, parseParametersIntoUrl, searchParamsToUrl, shadow, transformDateToAmericanFormat, transformToCurrency, transformToNumber, transformToPercentage, truncateString, useCopyToClipboard, useFetchClientSide };
package/dist/index.d.ts CHANGED
@@ -214,19 +214,6 @@ type CheckboxGroupProps<T extends string | number | boolean = string> = {
214
214
 
215
215
  declare const CheckboxGroup: <T extends string | number | boolean = string>({ options, onChange, label, multiSelect, useSvgCheck, wrapperClassName, labelClassName, defaultSelectedValue, isBackgroundChecked, variant, allowUncheck, }: CheckboxGroupProps<T>) => react_jsx_runtime.JSX.Element;
216
216
 
217
- type ModalProps = {
218
- isModalOpen: boolean
219
- setIsModalOpen: Dispatch<SetStateAction<boolean>>
220
- onDelete: () => Promise<any>
221
- successMessage?: string
222
- location?: string
223
- title: string
224
- message: string
225
- onSuccess?: () => void
226
- }
227
-
228
- declare const DeleteModal: React.FC<ModalProps>;
229
-
230
217
  interface DropdownContextType {
231
218
  isOpen: boolean;
232
219
  toggleDropdown: () => void;
@@ -1515,4 +1502,4 @@ declare const useCopyToClipboard: (successMessage?: string) => {
1515
1502
  copyToClipboard: (initialText: string) => void;
1516
1503
  };
1517
1504
 
1518
- export { Alert, MemoAlertDefault as AlertDefault, MemoAlertError as AlertError, MemoAlertGuard as AlertGuard, MemoAlertInfo as AlertInfo, MemoAlertWarning as AlertWarning, MemoApi as Api, MemoArrowLeft as ArrowLeft, MemoArrowNarrowUpRight as ArrowNarrowUpRight, Avatar, BarChart, MemoBoleto as Boleto, Box, Button, type ButtonProps, ButtonToggleGroup, type ButtonToggleGroupProps, CSV, MemoCalendar as Calendar, MemoCard as Card, MemoCarrFree as CarrFree, MemoCarretDown as CarretDown, MemoCarretSingleRight as CarretSingleRight, CarrinhoAbandonado, MemoCart as Cart, MemoChargeback as Chargeback, MemoCheck as Check, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxOption, MemoCheckout as Checkout, MemoChevronDown as ChevronDown, MemoChevronLeftDouble as ChevronLeftDouble, MemoCloseCheckbox as CloseCheckbox, MemoCloseIcon as CloseIcon, MemoCloud as Cloud, MemoCodeCircle as CodeCircle, type Column, MemoConfiguracoes as Configuracoes, MemoCopy as Copy, MemoCopyLink as CopyLink, Counter, MemoCreditCard as CreditCard, MemoCupom as Cupom, CurrencyInput, CustomSelect, MemoDashboard as Dashboard, DatePicker, type DatePickerProps, type DateStateProps, DeleteModal, MemoDelivery as Delivery, MemoDepoimentos as Depoimentos, MemoDistribuicao as Distribuicao, MemoDistribution as Distribution, MemoDominios as Dominios, MemoDownloadArrow as DownloadArrow, MemoDrag as Drag, DropdownContext, DropdownItens, DropdownTrigger, DrowpdownButton, MemoEdit as Edit, Emails, MemoExtrato as Extrato, MemoEyeInput as EyeInput, MemoEyeOff as EyeOff, FeedbackBadge, MemoFileMinus as FileMinus, FileUploadWithDisplayName as FileUpload, FilterDrawer, MemoFilterLines as FilterLines, FilterList, FilterListContext, FilterTrigger, MemoFinanceiro as Financeiro, FormWrapper, MemoFrete as Frete, MemoFreteGratis as FreteGratis, GeneralPageLinks, MemoGestao as Gestao, MemoGlobe as Globe, GlobeVariant, Grid, GridColumn, Guard, Heading, MemoHeadphones as Headphones, MemoHelp as Help, MemoHelpCircle as HelpCircle, Home, MemoInfoCircle as InfoCircle, Input, MemoIntegracoes as Integracoes, LineChart, Link$1 as Link, MemoLink as LinkIcon, type LinkProps, MemoLoadingSpinner as LoadingSpinner, MemoLock as Lock, MemoLockInput as LockInput, Logistica, MemoLoja as Loja, LojaAlert, LojaAlertSuccess, MemoMail as Mail, MemoMailInput as MailInput, MemoMarkerPin as MarkerPin, MemoMarketing as Marketing, MediumRisk, MemoMessage as Message, Modal, MemoMoney as Money, MultiSelect, NewIcons, MemoNewMessage as NewMessage, MemoNewNotification as NewNotification, MemoNotificacoes as Notificacoes, MemoNotification as Notification, NotificationItem, MemoNotifications as Notifications, type OpenAsBlobOptions, MemoOrderBump as OrderBump, PageContainer, PaginatedData, PaymentCard, MemoPermissaoDeAcesso as PermissaoDeAcesso, PhoneCall, PieChart, MemoPix as Pix, MemoPixels as Pixels, Planilha, MemoPlus as Plus, MemoPrechargeback as Prechargeback, PrefetchLink, PreviewPhone, PriceSkeleton, MemoProduto as Produto, MemoProdutos as Produtos, MemoPromocoes as Promocoes, RecuperacaoDeCarrinho, MemoRefresh as Refresh, MemoRelatorios as Relatorios, MemoRestricaoDeAcesso as RestricaoDeAcesso, Ribbon, MemoRisco as Risco, MemoSac as Sac, MemoSearchMd as SearchMd, SelectableOption, Separator, MemoSignout as Signout, SliderInput, SlidingPanel, Spinner$1 as Spinner, MemoSpinner as SpinnerIcon, StatusBadge, MemoStore as Store, Switch$1 as Switch, MemoSwitch as SwitchIcon, type SwitchProps, Table, Tabs, Text, Textarea, TimeInput, TimerCounter, type CounterInputProps$1 as TimerCounterProps, TimerCounterWithoutSeconds, type CounterInputProps as TimerCounterWithoutSecondsProps, Tooltip, MemoTransfer as Transfer, MemoTrash as Trash, MemoTruck as Truck, MemoUpsell as Upsell, MemoUser as User, MemoUsers as Users, MemoVerticalPoints as VerticalPoints, MemoWarning as Warning, MemoWebhook as Webhook, MemoWebhook$1 as WebhookConfig, MemoWhatsapp as Whatsapp, Xlsx, MemoYever as Yever, calculateCurrencyOperation, cn, colors, fontFamily, formatCNPJ, formatCNPJCPF, formatCPF, formatCurrency, formatCurrencyShort, formatDate, formatDateAndReturnPassedHours, formatDateGeneric, formatDateInPassedDays, formatDateTime, formatDateToISO, formatIP, formatName, formatNumberToCurrency, formatPhone, formatPostalCode, formatRawDigitsToCurrency, formatTime$1 as formatTimeWithSeconds, formatTime as formatTimeWithoutSeconds, getDates, handleFormSubmission, nextReplaceUrl, parseFormattedCurrency, parseParametersIntoUrl, searchParamsToUrl, shadow, transformDateToAmericanFormat, transformToCurrency, transformToNumber, transformToPercentage, truncateString, useCopyToClipboard, useFetchClientSide };
1505
+ export { Alert, MemoAlertDefault as AlertDefault, MemoAlertError as AlertError, MemoAlertGuard as AlertGuard, MemoAlertInfo as AlertInfo, MemoAlertWarning as AlertWarning, MemoApi as Api, MemoArrowLeft as ArrowLeft, MemoArrowNarrowUpRight as ArrowNarrowUpRight, Avatar, BarChart, MemoBoleto as Boleto, Box, Button, type ButtonProps, ButtonToggleGroup, type ButtonToggleGroupProps, CSV, MemoCalendar as Calendar, MemoCard as Card, MemoCarrFree as CarrFree, MemoCarretDown as CarretDown, MemoCarretSingleRight as CarretSingleRight, CarrinhoAbandonado, MemoCart as Cart, MemoChargeback as Chargeback, MemoCheck as Check, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxOption, MemoCheckout as Checkout, MemoChevronDown as ChevronDown, MemoChevronLeftDouble as ChevronLeftDouble, MemoCloseCheckbox as CloseCheckbox, MemoCloseIcon as CloseIcon, MemoCloud as Cloud, MemoCodeCircle as CodeCircle, type Column, MemoConfiguracoes as Configuracoes, MemoCopy as Copy, MemoCopyLink as CopyLink, Counter, MemoCreditCard as CreditCard, MemoCupom as Cupom, CurrencyInput, CustomSelect, MemoDashboard as Dashboard, DatePicker, type DatePickerProps, type DateStateProps, MemoDelivery as Delivery, MemoDepoimentos as Depoimentos, MemoDistribuicao as Distribuicao, MemoDistribution as Distribution, MemoDominios as Dominios, MemoDownloadArrow as DownloadArrow, MemoDrag as Drag, DropdownContext, DropdownItens, DropdownTrigger, DrowpdownButton, MemoEdit as Edit, Emails, MemoExtrato as Extrato, MemoEyeInput as EyeInput, MemoEyeOff as EyeOff, FeedbackBadge, MemoFileMinus as FileMinus, FileUploadWithDisplayName as FileUpload, FilterDrawer, MemoFilterLines as FilterLines, FilterList, FilterListContext, FilterTrigger, MemoFinanceiro as Financeiro, FormWrapper, MemoFrete as Frete, MemoFreteGratis as FreteGratis, GeneralPageLinks, MemoGestao as Gestao, MemoGlobe as Globe, GlobeVariant, Grid, GridColumn, Guard, Heading, MemoHeadphones as Headphones, MemoHelp as Help, MemoHelpCircle as HelpCircle, Home, MemoInfoCircle as InfoCircle, Input, MemoIntegracoes as Integracoes, LineChart, Link$1 as Link, MemoLink as LinkIcon, type LinkProps, MemoLoadingSpinner as LoadingSpinner, MemoLock as Lock, MemoLockInput as LockInput, Logistica, MemoLoja as Loja, LojaAlert, LojaAlertSuccess, MemoMail as Mail, MemoMailInput as MailInput, MemoMarkerPin as MarkerPin, MemoMarketing as Marketing, MediumRisk, MemoMessage as Message, Modal, MemoMoney as Money, MultiSelect, NewIcons, MemoNewMessage as NewMessage, MemoNewNotification as NewNotification, MemoNotificacoes as Notificacoes, MemoNotification as Notification, NotificationItem, MemoNotifications as Notifications, type OpenAsBlobOptions, MemoOrderBump as OrderBump, PageContainer, PaginatedData, PaymentCard, MemoPermissaoDeAcesso as PermissaoDeAcesso, PhoneCall, PieChart, MemoPix as Pix, MemoPixels as Pixels, Planilha, MemoPlus as Plus, MemoPrechargeback as Prechargeback, PrefetchLink, PreviewPhone, PriceSkeleton, MemoProduto as Produto, MemoProdutos as Produtos, MemoPromocoes as Promocoes, RecuperacaoDeCarrinho, MemoRefresh as Refresh, MemoRelatorios as Relatorios, MemoRestricaoDeAcesso as RestricaoDeAcesso, Ribbon, MemoRisco as Risco, MemoSac as Sac, MemoSearchMd as SearchMd, SelectableOption, Separator, MemoSignout as Signout, SliderInput, SlidingPanel, Spinner$1 as Spinner, MemoSpinner as SpinnerIcon, StatusBadge, MemoStore as Store, Switch$1 as Switch, MemoSwitch as SwitchIcon, type SwitchProps, Table, Tabs, Text, Textarea, TimeInput, TimerCounter, type CounterInputProps$1 as TimerCounterProps, TimerCounterWithoutSeconds, type CounterInputProps as TimerCounterWithoutSecondsProps, Tooltip, MemoTransfer as Transfer, MemoTrash as Trash, MemoTruck as Truck, MemoUpsell as Upsell, MemoUser as User, MemoUsers as Users, MemoVerticalPoints as VerticalPoints, MemoWarning as Warning, MemoWebhook as Webhook, MemoWebhook$1 as WebhookConfig, MemoWhatsapp as Whatsapp, Xlsx, MemoYever as Yever, calculateCurrencyOperation, cn, colors, fontFamily, formatCNPJ, formatCNPJCPF, formatCPF, formatCurrency, formatCurrencyShort, formatDate, formatDateAndReturnPassedHours, formatDateGeneric, formatDateInPassedDays, formatDateTime, formatDateToISO, formatIP, formatName, formatNumberToCurrency, formatPhone, formatPostalCode, formatRawDigitsToCurrency, formatTime$1 as formatTimeWithSeconds, formatTime as formatTimeWithoutSeconds, getDates, handleFormSubmission, nextReplaceUrl, parseFormattedCurrency, parseParametersIntoUrl, searchParamsToUrl, shadow, transformDateToAmericanFormat, transformToCurrency, transformToNumber, transformToPercentage, truncateString, useCopyToClipboard, useFetchClientSide };
package/dist/index.js CHANGED
@@ -6,15 +6,15 @@ var React107 = require('react');
6
6
  var navigation = require('next/navigation');
7
7
  var jsxRuntime = require('react/jsx-runtime');
8
8
  var tw5 = require('tailwind-styled-components');
9
- var Image4 = require('next/image');
9
+ var Image3 = require('next/image');
10
10
  var ReactDOM = require('react-dom');
11
- var sonner = require('sonner');
12
11
  var Select = require('react-select');
13
12
  var dateFns = require('date-fns');
14
13
  var locale = require('date-fns/locale');
15
14
  var reactHookForm = require('react-hook-form');
16
15
  var Link2 = require('next/link');
17
16
  var framerMotion = require('framer-motion');
17
+ var sonner = require('sonner');
18
18
  var bar = require('@nivo/bar');
19
19
  var line = require('@nivo/line');
20
20
  var pie = require('@nivo/pie');
@@ -43,7 +43,7 @@ function _interopNamespace(e) {
43
43
 
44
44
  var React107__namespace = /*#__PURE__*/_interopNamespace(React107);
45
45
  var tw5__default = /*#__PURE__*/_interopDefault(tw5);
46
- var Image4__default = /*#__PURE__*/_interopDefault(Image4);
46
+ var Image3__default = /*#__PURE__*/_interopDefault(Image3);
47
47
  var ReactDOM__default = /*#__PURE__*/_interopDefault(ReactDOM);
48
48
  var Select__default = /*#__PURE__*/_interopDefault(Select);
49
49
  var Link2__default = /*#__PURE__*/_interopDefault(Link2);
@@ -3433,7 +3433,7 @@ var Avatar = ({ name, src, size = "large", className }) => {
3433
3433
  size === "xlarge" && "h-[44px] min-w-[44px]",
3434
3434
  className
3435
3435
  ),
3436
- children: src ? /* @__PURE__ */ jsxRuntime.jsx(Image4__default.default, { src, alt: name || "Avatar", layout: "fill", className: "object-cover" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full w-full items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("font-medium text-white", size === "small" && "text-xs", size === "large" && "text-2xl"), children: getInitials(name) }) })
3436
+ children: src ? /* @__PURE__ */ jsxRuntime.jsx(Image3__default.default, { src, alt: name || "Avatar", layout: "fill", className: "object-cover" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full w-full items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("font-medium text-white", size === "small" && "text-xs", size === "large" && "text-2xl"), children: getInitials(name) }) })
3437
3437
  }
3438
3438
  );
3439
3439
  };
@@ -3958,222 +3958,6 @@ var CheckboxGroup = ({
3958
3958
  ] });
3959
3959
  };
3960
3960
  var checkbox_group_default = CheckboxGroup;
3961
- var ModalContainer = ({ isOpen, onClose, className, children }) => {
3962
- const [isVisible, setIsVisible] = React107.useState(false);
3963
- const [isMounted, setIsMounted] = React107.useState(false);
3964
- React107.useEffect(() => {
3965
- setIsMounted(true);
3966
- }, []);
3967
- React107.useEffect(() => {
3968
- if (isOpen) {
3969
- document.documentElement.classList.add("no-scroll-modal");
3970
- setIsVisible(true);
3971
- } else {
3972
- document.documentElement.classList.remove("no-scroll-modal");
3973
- setIsVisible(false);
3974
- }
3975
- }, [isOpen]);
3976
- React107.useEffect(() => {
3977
- const handleEsc = (event) => {
3978
- if (event.key === "Escape") {
3979
- onClose();
3980
- }
3981
- };
3982
- window.addEventListener("keydown", handleEsc);
3983
- return () => {
3984
- window.removeEventListener("keydown", handleEsc);
3985
- };
3986
- }, [onClose]);
3987
- if (!isMounted) return null;
3988
- const portalContainer = document.getElementById("portal-root");
3989
- if (!portalContainer) return null;
3990
- return ReactDOM__default.default.createPortal(
3991
- /* @__PURE__ */ jsxRuntime.jsxs(
3992
- "div",
3993
- {
3994
- className: cn(
3995
- "fixed inset-0 z-[60] flex items-center justify-center",
3996
- isOpen ? "opacity-100" : "opacity-0",
3997
- isVisible ? "pointer-events-auto" : "pointer-events-none",
3998
- "transition-opacity duration-300 md:mx-auto",
3999
- className
4000
- ),
4001
- children: [
4002
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50", onClick: onClose }),
4003
- /* @__PURE__ */ jsxRuntime.jsx(
4004
- "div",
4005
- {
4006
- className: cn(
4007
- "shadow-lg z-10 w-full transform overflow-hidden rounded-lg bg-white transition-transform duration-300",
4008
- isOpen ? "scale-100" : "scale-95",
4009
- className ? className : "max-w-lg"
4010
- ),
4011
- style: { margin: "1rem" },
4012
- children
4013
- }
4014
- )
4015
- ]
4016
- }
4017
- ),
4018
- portalContainer
4019
- );
4020
- };
4021
- var ModalHeader = ({ children, onClose, className = "" }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative flex items-center justify-between border-b border-gray-300 px-6 pb-4 pt-6", className), children: [
4022
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-between gap-3", children }),
4023
- /* @__PURE__ */ jsxRuntime.jsx(
4024
- Button,
4025
- {
4026
- onClick: onClose,
4027
- $variant: "tertiary",
4028
- className: "absolute right-4 top-4 w-auto border-none p-0",
4029
- type: "button",
4030
- children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon_default, {})
4031
- }
4032
- )
4033
- ] });
4034
- var ModalContent = ({ children, className = "" }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("px-8 py-6", className), children });
4035
- var ModalFooter = ({ children, className = "" }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex border-t border-gray-300 px-6 py-4", className), children });
4036
- var Modal = {
4037
- Container: ModalContainer,
4038
- Header: ModalHeader,
4039
- Content: ModalContent,
4040
- Footer: ModalFooter
4041
- };
4042
-
4043
- // src/_design-system/typography/heading/styles.ts
4044
- var headingStyles = {
4045
- h1: "text-2xl font-semibold text-black",
4046
- h2: "text-lg font-semibold text-black",
4047
- h3: "text-lg font-semibold text-black",
4048
- h4: "text-base font-semibold text-black",
4049
- h5: "text-sm font-semibold text-black",
4050
- h6: ""
4051
- };
4052
- var Heading = ({ $as: Tag, children, className = "", tooltip }) => {
4053
- return /* @__PURE__ */ jsxRuntime.jsxs(Tag, { className: cn(headingStyles[Tag], className, tooltip ? "flex items-center gap-2" : ""), children: [
4054
- children,
4055
- tooltip ? /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { text: tooltip }) : null
4056
- ] });
4057
- };
4058
-
4059
- // src/_design-system/typography/text/styles.ts
4060
- var textStyles = {
4061
- p: "text-base font-normal text-gray-600",
4062
- span: "text-sm font-medium text-gray-600",
4063
- div: "",
4064
- small: "text-sm font-normal text-gray-600",
4065
- label: "text-sm font-medium text-gray-600"
4066
- };
4067
- var Text = ({ $as: Tag, children, className = "", ...props }) => {
4068
- const elementProps = {
4069
- className: cn(textStyles[Tag], className),
4070
- ...props
4071
- };
4072
- return /* @__PURE__ */ jsxRuntime.jsx(Tag, { ...elementProps, children });
4073
- };
4074
- async function handleFormSubmission({
4075
- id,
4076
- createAction,
4077
- updateAction,
4078
- customAction,
4079
- successMessages,
4080
- onSuccess
4081
- }) {
4082
- let result = null;
4083
- let message = null;
4084
- if (customAction) {
4085
- result = await customAction();
4086
- message = successMessages?.custom || "";
4087
- } else {
4088
- if (id) {
4089
- if (updateAction) {
4090
- result = await updateAction();
4091
- message = successMessages?.update || "";
4092
- }
4093
- } else {
4094
- if (createAction) {
4095
- result = await createAction();
4096
- message = successMessages?.create || "";
4097
- }
4098
- }
4099
- }
4100
- if (result && typeof result === "object") {
4101
- const errorData = result.props?.error || result.error;
4102
- if (errorData) {
4103
- if (errorData?.status === 422 && errorData?.errors) {
4104
- Object.values(errorData.errors).forEach((errorMessages) => {
4105
- if (Array.isArray(errorMessages)) {
4106
- errorMessages.forEach((message2) => {
4107
- if (message2.trim()) {
4108
- sonner.toast.error(message2.trim());
4109
- }
4110
- });
4111
- } else if (typeof errorMessages === "string") {
4112
- sonner.toast.error(errorMessages);
4113
- }
4114
- });
4115
- return null;
4116
- }
4117
- if (errorData?.message) {
4118
- sonner.toast.error(errorData.message);
4119
- return null;
4120
- }
4121
- }
4122
- }
4123
- if (message) {
4124
- sonner.toast.success(message);
4125
- }
4126
- if (onSuccess) {
4127
- onSuccess(result);
4128
- }
4129
- return result;
4130
- }
4131
- var DeleteModal = ({
4132
- isModalOpen,
4133
- setIsModalOpen,
4134
- onDelete,
4135
- successMessage,
4136
- location,
4137
- title,
4138
- message,
4139
- onSuccess
4140
- }) => {
4141
- const [loading, setLoading] = React107.useState(false);
4142
- const router = navigation.useRouter();
4143
- const handleSubmit = async () => {
4144
- if (!onDelete) {
4145
- console.error("DeleteModal: onDelete function is required");
4146
- return;
4147
- }
4148
- setLoading(true);
4149
- await handleFormSubmission({
4150
- customAction: onDelete,
4151
- successMessages: {
4152
- custom: successMessage || "Item deletado com sucesso"
4153
- },
4154
- onSuccess: () => {
4155
- setIsModalOpen(false);
4156
- if (onSuccess) {
4157
- onSuccess();
4158
- } else if (location) {
4159
- router.push(location);
4160
- }
4161
- }
4162
- });
4163
- setLoading(false);
4164
- };
4165
- return /* @__PURE__ */ jsxRuntime.jsxs(Modal.Container, { isOpen: isModalOpen, onClose: () => setIsModalOpen(false), className: "max-w-[590px]", children: [
4166
- /* @__PURE__ */ jsxRuntime.jsxs(Modal.Header, { onClose: () => setIsModalOpen(false), children: [
4167
- /* @__PURE__ */ jsxRuntime.jsx(Image4__default.default, { src: "/images/modal-delete-icon.svg", alt: "Secure", width: 40, height: 40 }),
4168
- /* @__PURE__ */ jsxRuntime.jsx(Heading, { $as: "h3", children: title })
4169
- ] }),
4170
- /* @__PURE__ */ jsxRuntime.jsx(Modal.Content, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-6", children: /* @__PURE__ */ jsxRuntime.jsx(Text, { $as: "p", children: message }) }) }),
4171
- /* @__PURE__ */ jsxRuntime.jsxs(Modal.Footer, { className: "flex items-center justify-end gap-4", children: [
4172
- /* @__PURE__ */ jsxRuntime.jsx(Button, { $variant: "tertiary", onClick: () => setIsModalOpen(false), className: "w-fit", disabled: loading, children: "Cancelar" }),
4173
- /* @__PURE__ */ jsxRuntime.jsx(Button, { className: "w-fit", $variant: "warning", onClick: handleSubmit, disabled: loading, $isLoading: loading, children: "Remover" })
4174
- ] })
4175
- ] });
4176
- };
4177
3961
  var DropdownContext = React107.createContext({
4178
3962
  isOpen: false,
4179
3963
  toggleDropdown: () => void 0,
@@ -5290,6 +5074,38 @@ var SlidingPanel = {
5290
5074
  Footer: SlidingPanelFooter
5291
5075
  };
5292
5076
 
5077
+ // src/_design-system/typography/heading/styles.ts
5078
+ var headingStyles = {
5079
+ h1: "text-2xl font-semibold text-black",
5080
+ h2: "text-lg font-semibold text-black",
5081
+ h3: "text-lg font-semibold text-black",
5082
+ h4: "text-base font-semibold text-black",
5083
+ h5: "text-sm font-semibold text-black",
5084
+ h6: ""
5085
+ };
5086
+ var Heading = ({ $as: Tag, children, className = "", tooltip }) => {
5087
+ return /* @__PURE__ */ jsxRuntime.jsxs(Tag, { className: cn(headingStyles[Tag], className, tooltip ? "flex items-center gap-2" : ""), children: [
5088
+ children,
5089
+ tooltip ? /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { text: tooltip }) : null
5090
+ ] });
5091
+ };
5092
+
5093
+ // src/_design-system/typography/text/styles.ts
5094
+ var textStyles = {
5095
+ p: "text-base font-normal text-gray-600",
5096
+ span: "text-sm font-medium text-gray-600",
5097
+ div: "",
5098
+ small: "text-sm font-normal text-gray-600",
5099
+ label: "text-sm font-medium text-gray-600"
5100
+ };
5101
+ var Text = ({ $as: Tag, children, className = "", ...props }) => {
5102
+ const elementProps = {
5103
+ className: cn(textStyles[Tag], className),
5104
+ ...props
5105
+ };
5106
+ return /* @__PURE__ */ jsxRuntime.jsx(Tag, { ...elementProps, children });
5107
+ };
5108
+
5293
5109
  // src/utils/next-replace-url/index.ts
5294
5110
  var nextReplaceUrl = (key, value, pathname) => {
5295
5111
  const params = new URLSearchParams(window.location.search);
@@ -5866,6 +5682,87 @@ var Link4 = ({
5866
5682
  }
5867
5683
  );
5868
5684
  };
5685
+ var ModalContainer = ({ isOpen, onClose, className, children }) => {
5686
+ const [isVisible, setIsVisible] = React107.useState(false);
5687
+ const [isMounted, setIsMounted] = React107.useState(false);
5688
+ React107.useEffect(() => {
5689
+ setIsMounted(true);
5690
+ }, []);
5691
+ React107.useEffect(() => {
5692
+ if (isOpen) {
5693
+ document.documentElement.classList.add("no-scroll-modal");
5694
+ setIsVisible(true);
5695
+ } else {
5696
+ document.documentElement.classList.remove("no-scroll-modal");
5697
+ setIsVisible(false);
5698
+ }
5699
+ }, [isOpen]);
5700
+ React107.useEffect(() => {
5701
+ const handleEsc = (event) => {
5702
+ if (event.key === "Escape") {
5703
+ onClose();
5704
+ }
5705
+ };
5706
+ window.addEventListener("keydown", handleEsc);
5707
+ return () => {
5708
+ window.removeEventListener("keydown", handleEsc);
5709
+ };
5710
+ }, [onClose]);
5711
+ if (!isMounted) return null;
5712
+ const portalContainer = document.getElementById("portal-root");
5713
+ if (!portalContainer) return null;
5714
+ return ReactDOM__default.default.createPortal(
5715
+ /* @__PURE__ */ jsxRuntime.jsxs(
5716
+ "div",
5717
+ {
5718
+ className: cn(
5719
+ "fixed inset-0 z-[60] flex items-center justify-center",
5720
+ isOpen ? "opacity-100" : "opacity-0",
5721
+ isVisible ? "pointer-events-auto" : "pointer-events-none",
5722
+ "transition-opacity duration-300 md:mx-auto",
5723
+ className
5724
+ ),
5725
+ children: [
5726
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50", onClick: onClose }),
5727
+ /* @__PURE__ */ jsxRuntime.jsx(
5728
+ "div",
5729
+ {
5730
+ className: cn(
5731
+ "shadow-lg z-10 w-full transform overflow-hidden rounded-lg bg-white transition-transform duration-300",
5732
+ isOpen ? "scale-100" : "scale-95",
5733
+ className ? className : "max-w-lg"
5734
+ ),
5735
+ style: { margin: "1rem" },
5736
+ children
5737
+ }
5738
+ )
5739
+ ]
5740
+ }
5741
+ ),
5742
+ portalContainer
5743
+ );
5744
+ };
5745
+ var ModalHeader = ({ children, onClose, className = "" }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative flex items-center justify-between border-b border-gray-300 px-6 pb-4 pt-6", className), children: [
5746
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-between gap-3", children }),
5747
+ /* @__PURE__ */ jsxRuntime.jsx(
5748
+ Button,
5749
+ {
5750
+ onClick: onClose,
5751
+ $variant: "tertiary",
5752
+ className: "absolute right-4 top-4 w-auto border-none p-0",
5753
+ type: "button",
5754
+ children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon_default, {})
5755
+ }
5756
+ )
5757
+ ] });
5758
+ var ModalContent = ({ children, className = "" }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("px-8 py-6", className), children });
5759
+ var ModalFooter = ({ children, className = "" }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex border-t border-gray-300 px-6 py-4", className), children });
5760
+ var Modal = {
5761
+ Container: ModalContainer,
5762
+ Header: ModalHeader,
5763
+ Content: ModalContent,
5764
+ Footer: ModalFooter
5765
+ };
5869
5766
 
5870
5767
  // src/_design-system/helpers/formatDateAndReturnPassedHours.ts
5871
5768
  var formatDateAndReturnPassedHours = (date) => {
@@ -5876,7 +5773,7 @@ var formatDateAndReturnPassedHours = (date) => {
5876
5773
  var NotificationItem = ({ user, message, date }) => {
5877
5774
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex cursor-pointer items-start gap-4 px-6 py-4 hover:bg-gray-0", children: [
5878
5775
  /* @__PURE__ */ jsxRuntime.jsx(
5879
- Image4__default.default,
5776
+ Image3__default.default,
5880
5777
  {
5881
5778
  src: "/images/yever-notification-avatar.svg",
5882
5779
  width: 49,
@@ -5935,7 +5832,7 @@ var PaymentCard = ({
5935
5832
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-black", children: paymentDate })
5936
5833
  ] })
5937
5834
  ] }),
5938
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full justify-center sm:w-auto sm:justify-end", children: brand ? /* @__PURE__ */ jsxRuntime.jsx(Image4__default.default, { src: `/images/payments/${brand}.svg`, alt: "brand", width: 60, height: 47 }) : /* @__PURE__ */ jsxRuntime.jsx(Image4__default.default, { src: `/images/payments/others.svg`, alt: "brand", width: 60, height: 47 }) })
5835
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full justify-center sm:w-auto sm:justify-end", children: brand ? /* @__PURE__ */ jsxRuntime.jsx(Image3__default.default, { src: `/images/payments/${brand}.svg`, alt: "brand", width: 60, height: 47 }) : /* @__PURE__ */ jsxRuntime.jsx(Image3__default.default, { src: `/images/payments/others.svg`, alt: "brand", width: 60, height: 47 }) })
5939
5836
  ] });
5940
5837
  };
5941
5838
  var PreviewPhone = ({ children, cartPosition = "bottom", bodyColor }) => {
@@ -6492,7 +6389,7 @@ var TableContent = ({
6492
6389
  rowIndex
6493
6390
  )) : /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: columns.length + (selectable ? 1 : 0), style: { textAlign: "center" }, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-6", children: [
6494
6391
  /* @__PURE__ */ jsxRuntime.jsx(
6495
- Image4__default.default,
6392
+ Image3__default.default,
6496
6393
  {
6497
6394
  src: "/empty-table.svg",
6498
6395
  width: 666,
@@ -6957,7 +6854,7 @@ var MultiSelect = ({
6957
6854
  onSelect(newValue);
6958
6855
  };
6959
6856
  const formatOptionLabel = (option) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
6960
- option.icon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative mr-2 flex h-[24px] max-h-[24px] w-[24px] max-w-[24px] items-center justify-center rounded border border-gray-300", children: /* @__PURE__ */ jsxRuntime.jsx(Image4__default.default, { src: option.icon, alt: option.label, fill: true, className: "p-1", quality: 100 }) }),
6857
+ option.icon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative mr-2 flex h-[24px] max-h-[24px] w-[24px] max-w-[24px] items-center justify-center rounded border border-gray-300", children: /* @__PURE__ */ jsxRuntime.jsx(Image3__default.default, { src: option.icon, alt: option.label, fill: true, className: "p-1", quality: 100 }) }),
6961
6858
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: option.label })
6962
6859
  ] });
6963
6860
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative w-full", className), children: [
@@ -7045,7 +6942,7 @@ var CustomSelect = ({
7045
6942
  onSelect(option);
7046
6943
  };
7047
6944
  const formatOptionLabel = (option) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
7048
- option.icon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative mr-2 flex h-[24px] max-h-[24px] w-[24px] max-w-[24px] items-center justify-center rounded border border-gray-300", children: /* @__PURE__ */ jsxRuntime.jsx(Image4__default.default, { src: option.icon, alt: option.label, fill: true, className: "p-1", quality: 100 }) }),
6945
+ option.icon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative mr-2 flex h-[24px] max-h-[24px] w-[24px] max-w-[24px] items-center justify-center rounded border border-gray-300", children: /* @__PURE__ */ jsxRuntime.jsx(Image3__default.default, { src: option.icon, alt: option.label, fill: true, className: "p-1", quality: 100 }) }),
7049
6946
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: option.label })
7050
6947
  ] });
7051
6948
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative w-full", className), children: [
@@ -7855,7 +7752,7 @@ function FileUploadComponent({
7855
7752
  }
7856
7753
  ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex h-full w-full items-center justify-center", children: filePreview && isImagePreview(filePreview) ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7857
7754
  /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: `${name}-input`, className: "block h-full w-full cursor-pointer", children: /* @__PURE__ */ jsxRuntime.jsx(
7858
- Image4__default.default,
7755
+ Image3__default.default,
7859
7756
  {
7860
7757
  src: filePreview,
7861
7758
  alt: "Preview",
@@ -7882,7 +7779,7 @@ function FileUploadComponent({
7882
7779
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-center justify-between gap-4 rounded-md border border-gray-200 bg-white p-4", children: [
7883
7780
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
7884
7781
  /* @__PURE__ */ jsxRuntime.jsx(
7885
- Image4__default.default,
7782
+ Image3__default.default,
7886
7783
  {
7887
7784
  src: isPdfFile ? "/icons/pdf.png" : "/icons/xlsx.png",
7888
7785
  alt: "Preview",
@@ -9942,6 +9839,63 @@ var shadow = {
9942
9839
  store: "0px 4px 8px 3px rgba(0, 0, 0, 0.04)"
9943
9840
  };
9944
9841
  var shadow_default = shadow;
9842
+ async function handleFormSubmission({
9843
+ id,
9844
+ createAction,
9845
+ updateAction,
9846
+ customAction,
9847
+ successMessages,
9848
+ onSuccess
9849
+ }) {
9850
+ let result = null;
9851
+ let message = null;
9852
+ if (customAction) {
9853
+ result = await customAction();
9854
+ message = successMessages?.custom || "";
9855
+ } else {
9856
+ if (id) {
9857
+ if (updateAction) {
9858
+ result = await updateAction();
9859
+ message = successMessages?.update || "";
9860
+ }
9861
+ } else {
9862
+ if (createAction) {
9863
+ result = await createAction();
9864
+ message = successMessages?.create || "";
9865
+ }
9866
+ }
9867
+ }
9868
+ if (result && typeof result === "object") {
9869
+ const errorData = result.props?.error || result.error;
9870
+ if (errorData) {
9871
+ if (errorData?.status === 422 && errorData?.errors) {
9872
+ Object.values(errorData.errors).forEach((errorMessages) => {
9873
+ if (Array.isArray(errorMessages)) {
9874
+ errorMessages.forEach((message2) => {
9875
+ if (message2.trim()) {
9876
+ sonner.toast.error(message2.trim());
9877
+ }
9878
+ });
9879
+ } else if (typeof errorMessages === "string") {
9880
+ sonner.toast.error(errorMessages);
9881
+ }
9882
+ });
9883
+ return null;
9884
+ }
9885
+ if (errorData?.message) {
9886
+ sonner.toast.error(errorData.message);
9887
+ return null;
9888
+ }
9889
+ }
9890
+ }
9891
+ if (message) {
9892
+ sonner.toast.success(message);
9893
+ }
9894
+ if (onSuccess) {
9895
+ onSuccess(result);
9896
+ }
9897
+ return result;
9898
+ }
9945
9899
  var useCopyToClipboard = (successMessage) => {
9946
9900
  const copyToClipboard = (initialText) => {
9947
9901
  const textArea = document.createElement("textarea");
@@ -9999,7 +9953,6 @@ exports.CurrencyInput = CurrencyInput;
9999
9953
  exports.CustomSelect = CustomSelect;
10000
9954
  exports.Dashboard = Dashboard_default;
10001
9955
  exports.DatePicker = datapicker_default;
10002
- exports.DeleteModal = DeleteModal;
10003
9956
  exports.Delivery = Delivery_default;
10004
9957
  exports.Depoimentos = Depoimentos_default;
10005
9958
  exports.Distribuicao = Distribuicao_default;