vector-prototype-components 0.1.1 → 0.1.3

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 (218) hide show
  1. package/Accordion/Accordion.js +79 -0
  2. package/Accordion/Accordion.js.map +1 -0
  3. package/Accordion/Accordion.module.css +1 -0
  4. package/Accordion/Accordion.module.css.js +36 -0
  5. package/Accordion/Accordion.module.css.js.map +1 -0
  6. package/ActionMenu/ActionMenu.js +49 -0
  7. package/ActionMenu/ActionMenu.js.map +1 -0
  8. package/ActionMenu/ActionMenu.module.css +1 -0
  9. package/ActionMenu/ActionMenu.module.css.js +16 -0
  10. package/ActionMenu/ActionMenu.module.css.js.map +1 -0
  11. package/Autocomplete/Autocomplete.js +226 -0
  12. package/Autocomplete/Autocomplete.js.map +1 -0
  13. package/Autocomplete/Autocomplete.module.css +1 -0
  14. package/Autocomplete/Autocomplete.module.css.js +46 -0
  15. package/Autocomplete/Autocomplete.module.css.js.map +1 -0
  16. package/Avatar/Avatar.js +66 -0
  17. package/Avatar/Avatar.js.map +1 -0
  18. package/Avatar/Avatar.module.css +1 -0
  19. package/Avatar/Avatar.module.css.js +26 -0
  20. package/Avatar/Avatar.module.css.js.map +1 -0
  21. package/Badge/Badge.js +40 -0
  22. package/Badge/Badge.js.map +1 -0
  23. package/Badge/Badge.module.css +1 -0
  24. package/Badge/Badge.module.css.js +24 -0
  25. package/Badge/Badge.module.css.js.map +1 -0
  26. package/BottomBar/BottomBar.js +19 -0
  27. package/BottomBar/BottomBar.js.map +1 -0
  28. package/BottomBar/BottomBar.module.css +1 -0
  29. package/BottomBar/BottomBar.module.css.js +10 -0
  30. package/BottomBar/BottomBar.module.css.js.map +1 -0
  31. package/Breadcrumbs/Breadcrumbs.js +40 -0
  32. package/Breadcrumbs/Breadcrumbs.js.map +1 -0
  33. package/Breadcrumbs/Breadcrumbs.module.css +1 -0
  34. package/Breadcrumbs/Breadcrumbs.module.css.js +18 -0
  35. package/Breadcrumbs/Breadcrumbs.module.css.js.map +1 -0
  36. package/Button/Button.js +53 -0
  37. package/Button/Button.js.map +1 -0
  38. package/Button/Button.module.css +1 -0
  39. package/Button/Button.module.css.js +24 -0
  40. package/Button/Button.module.css.js.map +1 -0
  41. package/Callout/Callout.js +66 -0
  42. package/Callout/Callout.js.map +1 -0
  43. package/Callout/Callout.module.css +1 -0
  44. package/Callout/Callout.module.css.js +28 -0
  45. package/Callout/Callout.module.css.js.map +1 -0
  46. package/Card/Card.js +39 -0
  47. package/Card/Card.js.map +1 -0
  48. package/Card/Card.module.css +1 -0
  49. package/Card/Card.module.css.js +18 -0
  50. package/Card/Card.module.css.js.map +1 -0
  51. package/Checkbox/Checkbox.js +90 -0
  52. package/Checkbox/Checkbox.js.map +1 -0
  53. package/Checkbox/Checkbox.module.css +1 -0
  54. package/Checkbox/Checkbox.module.css.js +22 -0
  55. package/Checkbox/Checkbox.module.css.js.map +1 -0
  56. package/Chip/Chip.js +62 -0
  57. package/Chip/Chip.js.map +1 -0
  58. package/Chip/Chip.module.css +1 -0
  59. package/Chip/Chip.module.css.js +24 -0
  60. package/Chip/Chip.module.css.js.map +1 -0
  61. package/DatePicker/DatePicker.js +157 -0
  62. package/DatePicker/DatePicker.js.map +1 -0
  63. package/DatePicker/DatePicker.module.css +1 -0
  64. package/DatePicker/DatePicker.module.css.js +48 -0
  65. package/DatePicker/DatePicker.module.css.js.map +1 -0
  66. package/DatePicker/DatePickerCalendar.js +94 -0
  67. package/DatePicker/DatePickerCalendar.js.map +1 -0
  68. package/DatePicker/DatePickerCalendar.module.css +1 -0
  69. package/DatePicker/DatePickerCalendar.module.css.js +32 -0
  70. package/DatePicker/DatePickerCalendar.module.css.js.map +1 -0
  71. package/Divider/Divider.js +22 -0
  72. package/Divider/Divider.js.map +1 -0
  73. package/Divider/Divider.module.css +1 -0
  74. package/Divider/Divider.module.css.js +12 -0
  75. package/Divider/Divider.module.css.js.map +1 -0
  76. package/Dropdown/Dropdown.js +100 -0
  77. package/Dropdown/Dropdown.js.map +1 -0
  78. package/Dropdown/Dropdown.module.css +1 -0
  79. package/Dropdown/Dropdown.module.css.js +20 -0
  80. package/Dropdown/Dropdown.module.css.js.map +1 -0
  81. package/Icon/Icon.js +8 -0
  82. package/Icon/Icon.js.map +1 -0
  83. package/IconButton/IconButton.js +42 -0
  84. package/IconButton/IconButton.js.map +1 -0
  85. package/IconButton/IconButton.module.css +1 -0
  86. package/IconButton/IconButton.module.css.js +20 -0
  87. package/IconButton/IconButton.module.css.js.map +1 -0
  88. package/InputNumber/InputNumber.js +106 -0
  89. package/InputNumber/InputNumber.js.map +1 -0
  90. package/InputNumber/InputNumber.module.css +1 -0
  91. package/InputNumber/InputNumber.module.css.js +30 -0
  92. package/InputNumber/InputNumber.module.css.js.map +1 -0
  93. package/Menu/Menu.js +182 -0
  94. package/Menu/Menu.js.map +1 -0
  95. package/Menu/Menu.module.css +1 -0
  96. package/Menu/Menu.module.css.js +56 -0
  97. package/Menu/Menu.module.css.js.map +1 -0
  98. package/Menu/menuData.js +188 -0
  99. package/Menu/menuData.js.map +1 -0
  100. package/Message/Message.js +88 -0
  101. package/Message/Message.js.map +1 -0
  102. package/Message/Message.module.css +1 -0
  103. package/Message/Message.module.css.js +32 -0
  104. package/Message/Message.module.css.js.map +1 -0
  105. package/Modal/Modal.js +186 -0
  106. package/Modal/Modal.js.map +1 -0
  107. package/Modal/Modal.module.css +1 -0
  108. package/Modal/Modal.module.css.js +44 -0
  109. package/Modal/Modal.module.css.js.map +1 -0
  110. package/Multiselect/Multiselect.js +249 -0
  111. package/Multiselect/Multiselect.js.map +1 -0
  112. package/Multiselect/Multiselect.module.css +1 -0
  113. package/Multiselect/Multiselect.module.css.js +64 -0
  114. package/Multiselect/Multiselect.module.css.js.map +1 -0
  115. package/Overlay/Overlay.js +18 -0
  116. package/Overlay/Overlay.js.map +1 -0
  117. package/Overlay/Overlay.module.css +1 -0
  118. package/Overlay/Overlay.module.css.js +8 -0
  119. package/Overlay/Overlay.module.css.js.map +1 -0
  120. package/Paginator/Paginator.js +118 -0
  121. package/Paginator/Paginator.js.map +1 -0
  122. package/Paginator/Paginator.module.css +1 -0
  123. package/Paginator/Paginator.module.css.js +22 -0
  124. package/Paginator/Paginator.module.css.js.map +1 -0
  125. package/Panel/Panel.js +38 -0
  126. package/Panel/Panel.js.map +1 -0
  127. package/Panel/Panel.module.css +1 -0
  128. package/Panel/Panel.module.css.js +16 -0
  129. package/Panel/Panel.module.css.js.map +1 -0
  130. package/ProgressSpinner/ProgressSpinner.js +64 -0
  131. package/ProgressSpinner/ProgressSpinner.js.map +1 -0
  132. package/ProgressSpinner/ProgressSpinner.module.css +1 -0
  133. package/ProgressSpinner/ProgressSpinner.module.css.js +16 -0
  134. package/ProgressSpinner/ProgressSpinner.module.css.js.map +1 -0
  135. package/Radio/Radio.js +44 -0
  136. package/Radio/Radio.js.map +1 -0
  137. package/Radio/Radio.module.css +1 -0
  138. package/Radio/Radio.module.css.js +18 -0
  139. package/Radio/Radio.module.css.js.map +1 -0
  140. package/SegmentControl/SegmentControl.js +74 -0
  141. package/SegmentControl/SegmentControl.js.map +1 -0
  142. package/SegmentControl/SegmentControl.module.css +1 -0
  143. package/SegmentControl/SegmentControl.module.css.js +16 -0
  144. package/SegmentControl/SegmentControl.module.css.js.map +1 -0
  145. package/Select/Select.js +153 -0
  146. package/Select/Select.js.map +1 -0
  147. package/Select/Select.module.css +1 -0
  148. package/Select/Select.module.css.js +46 -0
  149. package/Select/Select.module.css.js.map +1 -0
  150. package/Skeleton/Skeleton.js +78 -0
  151. package/Skeleton/Skeleton.js.map +1 -0
  152. package/Skeleton/Skeleton.module.css +1 -0
  153. package/Skeleton/Skeleton.module.css.js +18 -0
  154. package/Skeleton/Skeleton.module.css.js.map +1 -0
  155. package/Slider/Slider.js +116 -0
  156. package/Slider/Slider.js.map +1 -0
  157. package/Slider/Slider.module.css +1 -0
  158. package/Slider/Slider.module.css.js +24 -0
  159. package/Slider/Slider.module.css.js.map +1 -0
  160. package/Slot/Slot.js +25 -0
  161. package/Slot/Slot.js.map +1 -0
  162. package/Slot/Slot.module.css +1 -0
  163. package/Slot/Slot.module.css.js +16 -0
  164. package/Slot/Slot.module.css.js.map +1 -0
  165. package/Switch/Switch.js +42 -0
  166. package/Switch/Switch.js.map +1 -0
  167. package/Switch/Switch.module.css +1 -0
  168. package/Switch/Switch.module.css.js +11 -0
  169. package/Switch/Switch.module.css.js.map +1 -0
  170. package/Table/Table.js +268 -0
  171. package/Table/Table.js.map +1 -0
  172. package/Table/Table.module.css +1 -0
  173. package/Table/Table.module.css.js +64 -0
  174. package/Table/Table.module.css.js.map +1 -0
  175. package/TableTree/TableTree.js +139 -0
  176. package/TableTree/TableTree.js.map +1 -0
  177. package/TableTree/TableTree.module.css +1 -0
  178. package/TableTree/TableTree.module.css.js +62 -0
  179. package/TableTree/TableTree.module.css.js.map +1 -0
  180. package/Tabs/Tabs.js +92 -0
  181. package/Tabs/Tabs.js.map +1 -0
  182. package/Tabs/Tabs.module.css +1 -0
  183. package/Tabs/Tabs.module.css.js +18 -0
  184. package/Tabs/Tabs.module.css.js.map +1 -0
  185. package/Tag/Tag.js +48 -0
  186. package/Tag/Tag.js.map +1 -0
  187. package/Tag/Tag.module.css +1 -0
  188. package/Tag/Tag.module.css.js +30 -0
  189. package/Tag/Tag.module.css.js.map +1 -0
  190. package/TextField/TextField.js +93 -0
  191. package/TextField/TextField.js.map +1 -0
  192. package/TextField/TextField.module.css +1 -0
  193. package/TextField/TextField.module.css.js +36 -0
  194. package/TextField/TextField.module.css.js.map +1 -0
  195. package/Textarea/Textarea.js +52 -0
  196. package/Textarea/Textarea.js.map +1 -0
  197. package/Textarea/Textarea.module.css +1 -0
  198. package/Textarea/Textarea.module.css.js +32 -0
  199. package/Textarea/Textarea.module.css.js.map +1 -0
  200. package/Toast/Toast.js +82 -0
  201. package/Toast/Toast.js.map +1 -0
  202. package/Toast/Toast.module.css +1 -0
  203. package/Toast/Toast.module.css.js +28 -0
  204. package/Toast/Toast.module.css.js.map +1 -0
  205. package/Tooltip/Tooltip.js +61 -0
  206. package/Tooltip/Tooltip.js.map +1 -0
  207. package/Tooltip/Tooltip.module.css +1 -0
  208. package/Tooltip/Tooltip.module.css.js +26 -0
  209. package/Tooltip/Tooltip.module.css.js.map +1 -0
  210. package/TopBar/TopBar.js +87 -0
  211. package/TopBar/TopBar.js.map +1 -0
  212. package/TopBar/TopBar.module.css +1 -0
  213. package/TopBar/TopBar.module.css.js +30 -0
  214. package/TopBar/TopBar.module.css.js.map +1 -0
  215. package/index.js +90 -4157
  216. package/index.js.map +1 -1
  217. package/package.json +3 -4
  218. package/style.css +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Modal.js","sources":["../../src/Modal/Modal.tsx"],"sourcesContent":["import React, { useEffect, useRef } from 'react';\nimport { Warning, XCircle, CheckCircle, X } from '@phosphor-icons/react';\nimport { Icon } from '../Icon/index.js';\nimport { Button } from '../Button/index.js';\nimport { IconButton } from '../IconButton/index.js';\nimport type { ButtonProps } from '../Button/index.js';\nimport { Divider } from '../Divider/index.js';\nimport { ProgressSpinner } from '../ProgressSpinner/index.js';\nimport { Slot } from '../Slot/index.js';\nimport styles from './Modal.module.css';\n\n/* ────────────────────────────────────────────────────────────────\n * Types\n * ──────────────────────────────────────────────────────────────── */\n\nexport type ModalSize = 'small' | 'medium' | 'large';\nexport type ModalDialogType = 'warn' | 'error' | 'success' | 'loading';\n\n/** Props shared by both Modal and ModalDialog */\ninterface ModalBaseProps {\n /** Whether the modal is visible. Defaults to false. */\n open?: boolean;\n /** Called when the close button is clicked or Escape is pressed. */\n onClose?: () => void;\n /** Additional class names on the panel element. */\n className?: string;\n}\n\n/* ────────────────────────────────────────────────────────────────\n * Modal (panel modal with head / body / footer)\n * ──────────────────────────────────────────────────────────────── */\n\nexport interface ModalFooterAction\n extends Pick<ButtonProps, 'onClick' | 'disabled'> {\n label: string;\n variant?: ButtonProps['variant'];\n}\n\nexport interface ModalProps extends ModalBaseProps {\n /** Size variant: controls panel width. Defaults to \"small\". */\n size?: ModalSize;\n /** Modal heading text. */\n title?: string;\n /** Content rendered inside the body slot. */\n children?: React.ReactNode;\n /** Array of footer action buttons (left=secondary, right=primary). */\n footerActions?: ModalFooterAction[];\n /** Hide the backdrop overlay. */\n noBackdrop?: boolean;\n /** Fired when the backdrop is clicked. Defaults to calling onClose. */\n onBackdropClick?: () => void;\n}\n\nconst SIZE_CLASS: Record<ModalSize, string> = {\n small: styles.sizeSmall,\n medium: styles.sizeMedium,\n large: styles.sizeLarge,\n};\n\nexport function Modal({\n open = false,\n size = 'small',\n title = '',\n children,\n footerActions,\n onClose,\n noBackdrop = false,\n onBackdropClick,\n className,\n}: ModalProps) {\n const panelRef = useRef<HTMLDivElement>(null);\n\n // Close on Escape\n useEffect(() => {\n if (!open) return;\n const handler = (e: KeyboardEvent) => {\n if (e.key === 'Escape') onClose?.();\n };\n document.addEventListener('keydown', handler);\n return () => document.removeEventListener('keydown', handler);\n }, [open, onClose]);\n\n // Trap focus inside modal\n useEffect(() => {\n if (!open) return;\n const el = panelRef.current;\n if (!el) return;\n const prev = document.activeElement as HTMLElement | null;\n const focusable = el.querySelectorAll<HTMLElement>(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n focusable[0]?.focus();\n return () => { prev?.focus(); };\n }, [open]);\n\n if (!open) return null;\n\n const handleBackdropClick = () => {\n if (onBackdropClick) {\n onBackdropClick();\n } else {\n onClose?.();\n }\n };\n\n const panelCls = [styles.modal, SIZE_CLASS[size], className]\n .filter(Boolean)\n .join(' ');\n\n const panel = (\n <div\n ref={panelRef}\n className={panelCls}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={title ? 'modal-title' : undefined}\n onClick={(e) => e.stopPropagation()}\n >\n {/* Head */}\n <div className={styles.head}>\n <div className={styles.titleRow}>\n <h2 id=\"modal-title\" className={styles.title}>{title}</h2>\n </div>\n <Divider />\n </div>\n\n {/* Body */}\n <div className={styles.body}>\n <Slot>{children}</Slot>\n </div>\n\n {/* Footer */}\n {footerActions && footerActions.length > 0 && (\n <div className={styles.footer}>\n <div className={styles.footerButtons}>\n {footerActions.map((action, i) => (\n <Button\n key={i}\n variant={action.variant ?? (i === footerActions.length - 1 ? 'primary' : 'secondary')}\n size=\"medium\"\n disabled={action.disabled}\n onClick={action.onClick}\n >\n {action.label}\n </Button>\n ))}\n </div>\n </div>\n )}\n\n {/* Close button */}\n {onClose && (\n <IconButton\n icon={X}\n variant=\"ghost\"\n size=\"xsmall\"\n aria-label=\"Fechar modal\"\n onClick={onClose}\n className={styles.closeButton}\n />\n )}\n </div>\n );\n\n if (noBackdrop) return panel;\n\n return (\n <div className={styles.backdrop} onClick={handleBackdropClick}>\n {panel}\n </div>\n );\n}\n\n/* ────────────────────────────────────────────────────────────────\n * ModalDialog (confirmation dialog with status icon)\n * ──────────────────────────────────────────────────────────────── */\n\nexport interface ModalDialogProps extends ModalBaseProps {\n /** Dialog type — controls the status icon shown. */\n type?: ModalDialogType;\n /** Dialog heading. */\n title?: string;\n /** Supporting text below the heading. */\n text?: string;\n /** Primary action button label. */\n primaryLabel?: string;\n /** Primary action callback. */\n onPrimary?: () => void;\n /** Secondary action button label. */\n secondaryLabel?: string;\n /** Secondary action callback. */\n onSecondary?: () => void;\n /** Hide the backdrop overlay. */\n noBackdrop?: boolean;\n /** Fired when the backdrop is clicked. Defaults to calling onClose. */\n onBackdropClick?: () => void;\n}\n\nconst DIALOG_ICON_COLOR: Record<ModalDialogType, string> = {\n warn: 'var(--color-icon-feedback-warning-default)',\n error: 'var(--color-icon-feedback-danger-default)',\n success: 'var(--color-icon-feedback-success-default)',\n loading: 'var(--color-fill-brand-default)',\n};\n\nexport function ModalDialog({\n open = false,\n type = 'warn',\n title = '',\n text,\n primaryLabel,\n onPrimary,\n secondaryLabel,\n onSecondary,\n onClose,\n noBackdrop = false,\n onBackdropClick,\n className,\n}: ModalDialogProps) {\n const panelRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (!open) return;\n const handler = (e: KeyboardEvent) => {\n if (e.key === 'Escape' && type !== 'loading') onClose?.();\n };\n document.addEventListener('keydown', handler);\n return () => document.removeEventListener('keydown', handler);\n }, [open, onClose, type]);\n\n useEffect(() => {\n if (!open) return;\n const el = panelRef.current;\n if (!el) return;\n const prev = document.activeElement as HTMLElement | null;\n const focusable = el.querySelectorAll<HTMLElement>(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n focusable[0]?.focus();\n return () => { prev?.focus(); };\n }, [open]);\n\n if (!open) return null;\n\n const handleBackdropClick = () => {\n if (onBackdropClick) {\n onBackdropClick();\n } else if (type !== 'loading') {\n onClose?.();\n }\n };\n\n const isLoading = type === 'loading';\n const showActions = !isLoading && (primaryLabel || secondaryLabel);\n const showClose = !isLoading && Boolean(onClose);\n\n const iconColor = DIALOG_ICON_COLOR[type];\n\n const renderIcon = () => {\n switch (type) {\n case 'warn': return <Icon as={Warning} size={64} weight=\"regular\" color={iconColor} />;\n case 'error': return <Icon as={XCircle} size={64} weight=\"regular\" color={iconColor} />;\n case 'success': return <Icon as={CheckCircle} size={64} weight=\"regular\" color={iconColor} />;\n case 'loading': return <ProgressSpinner label=\"Carregando\" />;\n }\n };\n\n const dialogBodyCls = [\n styles.dialogBody,\n isLoading ? styles.loading : undefined,\n ]\n .filter(Boolean)\n .join(' ');\n\n const panelCls = [styles.modal, styles.dialog, className]\n .filter(Boolean)\n .join(' ');\n\n const panel = (\n <div\n ref={panelRef}\n className={panelCls}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={title ? 'modal-dialog-title' : undefined}\n onClick={(e) => e.stopPropagation()}\n >\n {/* Body */}\n <div className={dialogBodyCls}>\n <div className={styles.dialogIconWrap}>\n {renderIcon()}\n </div>\n <div className={styles.dialogTextGroup}>\n {title && (\n <p id=\"modal-dialog-title\" className={styles.dialogTitle}>{title}</p>\n )}\n {text && (\n <p className={styles.dialogText}>{text}</p>\n )}\n </div>\n </div>\n\n {/* Footer actions */}\n {showActions && (\n <div className={styles.footer}>\n <div className={styles.footerButtons}>\n {secondaryLabel && (\n <Button variant=\"secondary\" size=\"medium\" onClick={onSecondary}>\n {secondaryLabel}\n </Button>\n )}\n {primaryLabel && (\n <Button variant=\"primary\" size=\"medium\" onClick={onPrimary}>\n {primaryLabel}\n </Button>\n )}\n </div>\n </div>\n )}\n\n {/* Close button */}\n {showClose && (\n <IconButton\n icon={X}\n variant=\"ghost\"\n size=\"xsmall\"\n aria-label=\"Fechar modal\"\n onClick={onClose}\n className={styles.closeButton}\n />\n )}\n </div>\n );\n\n if (noBackdrop) return panel;\n\n return (\n <div className={styles.backdrop} onClick={handleBackdropClick}>\n {panel}\n </div>\n );\n}\n"],"names":["SIZE_CLASS","styles","Modal","open","size","title","children","footerActions","onClose","noBackdrop","onBackdropClick","className","panelRef","useRef","useEffect","handler","e","el","prev","_a","handleBackdropClick","panelCls","panel","jsxs","jsx","Divider","Slot","action","Button","IconButton","X","DIALOG_ICON_COLOR","ModalDialog","type","text","primaryLabel","onPrimary","secondaryLabel","onSecondary","isLoading","showActions","showClose","iconColor","renderIcon","Icon","Warning","XCircle","CheckCircle","ProgressSpinner","dialogBodyCls"],"mappings":";;;;;;;;;;AAqDA,MAAMA,IAAwC;AAAA,EAC5C,OAAQC,EAAO;AAAA,EACf,QAAQA,EAAO;AAAA,EACf,OAAQA,EAAO;AACjB;AAEO,SAASC,EAAM;AAAA,EACpB,MAAAC,IAAO;AAAA,EACP,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,UAAAC;AAAA,EACA,eAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,iBAAAC;AAAA,EACA,WAAAC;AACF,GAAe;AACb,QAAMC,IAAWC,EAAuB,IAAI;AAyB5C,MAtBAC,EAAU,MAAM;AACd,QAAI,CAACX,EAAM;AACX,UAAMY,IAAU,CAACC,MAAqB;AACp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,UAACK;AAAA,UAAA;AAAA,YACC,MAAMC;AAAA,YACN,SAAQ;AAAA,YACR,MAAK;AAAA,YACL,cAAW;AAAA,YACX,SAAStB;AAAA,YACT,WAAWP,EAAO;AAAA,UAAA;AAAA,QAAA;AAAA,MACpB;AAAA,IAAA;AAAA,EAAA;AAKN,SAAIQ,IAAmBa,sBAGpB,OAAA,EAAI,WAAWrB,EAAO,UAAU,SAASmB,GACvC,UAAAE,GACH;AAEJ;"}
@@ -0,0 +1 @@
1
+ ._backdrop_1jp0m_2{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#0e0f237a;display:flex;align-items:center;justify-content:center;z-index:1000;padding:24px}._modal_1jp0m_14{position:relative;display:flex;flex-direction:column;align-items:flex-start;background-color:var(--color-canvas-neutral-white);border-radius:12px;box-shadow:var(--shadow-layer-md);padding-top:24px;padding-bottom:24px;font-family:var(--font-family-base, system-ui, sans-serif);max-width:100%}._sizeSmall_1jp0m_29{width:500px}._sizeMedium_1jp0m_30{width:768px}._sizeLarge_1jp0m_31{width:960px}._dialog_1jp0m_34{width:400px;min-height:290px}._head_1jp0m_40{display:flex;flex-direction:column;gap:16px;align-items:flex-start;justify-content:center;padding-left:24px;padding-right:24px;width:100%;flex-shrink:0}._titleRow_1jp0m_52{display:flex;align-items:center;justify-content:center;padding-right:32px;width:100%;flex-shrink:0}._title_1jp0m_52{flex:1 0 0;min-width:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--font-size-20);font-weight:var(--font-weight-semibold);line-height:var(--font-line-height-20, 28px);color:var(--color-text-neutral-default);margin:0}._divider_1jp0m_74{width:100%;height:1px;flex-shrink:0;background-color:var(--color-stroke-neutral-default);border:none;margin:0}._body_1jp0m_84{display:flex;flex-direction:column;align-items:flex-start;padding:24px;width:100%;flex-shrink:0}._footer_1jp0m_94{display:flex;flex-direction:column;align-items:center;padding-left:24px;padding-right:24px;width:100%;flex-shrink:0}._footerButtons_1jp0m_104{display:flex;flex-direction:row;gap:8px;align-items:center;flex-shrink:0}._closeButton_1jp0m_113{position:absolute;top:8px;right:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:9999px;border:none;background-color:transparent;cursor:pointer;color:var(--color-icon-neutral-default);padding:0;transition:background-color .12s ease,color .12s ease;flex-shrink:0}._closeButton_1jp0m_113:hover{background-color:var(--color-fill-interaction-neutral-subtle-hover)}._closeButton_1jp0m_113:focus-visible{outline:none;box-shadow:var(--shadow-focus)}._dialogBody_1jp0m_144{display:flex;flex-direction:column;gap:16px;align-items:center;padding:24px 24px 40px;width:100%;flex-shrink:0;text-align:center}._dialogBody_1jp0m_144._loading_1jp0m_155{flex:1 0 0;min-height:1px;justify-content:center}._dialogIconWrap_1jp0m_161{display:flex;align-items:center;justify-content:center;width:64px;height:64px;flex-shrink:0}._dialogTextGroup_1jp0m_170{display:flex;flex-direction:column;gap:8px;align-items:flex-start;width:100%;flex-shrink:0}._dialogTitle_1jp0m_179{font-size:var(--font-size-18);font-weight:var(--font-weight-semibold);line-height:var(--font-line-height-18, 28px);color:var(--color-text-neutral-default);width:100%;margin:0;text-align:center}._dialogText_1jp0m_170{font-size:var(--font-size-14);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-14, 20px);color:var(--color-text-neutral-mudle);width:100%;margin:0;text-align:center}._dialogIconWrap_1jp0m_161 svg{display:block}
@@ -0,0 +1,44 @@
1
+ import './Modal.module.css';const o = "_backdrop_1jp0m_2", t = "_modal_1jp0m_14", _ = "_sizeSmall_1jp0m_29", e = "_sizeMedium_1jp0m_30", l = "_sizeLarge_1jp0m_31", i = "_dialog_1jp0m_34", a = "_head_1jp0m_40", d = "_titleRow_1jp0m_52", s = "_title_1jp0m_52", n = "_body_1jp0m_84", c = "_footer_1jp0m_94", p = "_footerButtons_1jp0m_104", m = "_closeButton_1jp0m_113", g = "_dialogBody_1jp0m_144", j = "_loading_1jp0m_155", r = "_dialogIconWrap_1jp0m_161", u = "_dialogTextGroup_1jp0m_170", z = "_dialogTitle_1jp0m_179", B = "_dialogText_1jp0m_170", T = {
2
+ backdrop: o,
3
+ modal: t,
4
+ sizeSmall: _,
5
+ sizeMedium: e,
6
+ sizeLarge: l,
7
+ dialog: i,
8
+ head: a,
9
+ titleRow: d,
10
+ title: s,
11
+ body: n,
12
+ footer: c,
13
+ footerButtons: p,
14
+ closeButton: m,
15
+ dialogBody: g,
16
+ loading: j,
17
+ dialogIconWrap: r,
18
+ dialogTextGroup: u,
19
+ dialogTitle: z,
20
+ dialogText: B
21
+ };
22
+ export {
23
+ o as backdrop,
24
+ n as body,
25
+ m as closeButton,
26
+ T as default,
27
+ i as dialog,
28
+ g as dialogBody,
29
+ r as dialogIconWrap,
30
+ B as dialogText,
31
+ u as dialogTextGroup,
32
+ z as dialogTitle,
33
+ c as footer,
34
+ p as footerButtons,
35
+ a as head,
36
+ j as loading,
37
+ t as modal,
38
+ l as sizeLarge,
39
+ e as sizeMedium,
40
+ _ as sizeSmall,
41
+ s as title,
42
+ d as titleRow
43
+ };
44
+ //# sourceMappingURL=Modal.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Modal.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,249 @@
1
+ import { jsxs as a, jsx as n, Fragment as ae } from "react/jsx-runtime";
2
+ import { useId as re, useState as y, useRef as I, useCallback as oe, useEffect as F } from "react";
3
+ import { CaretDown as ce, MagnifyingGlass as de } from "@phosphor-icons/react";
4
+ import { Icon as G } from "../Icon/Icon.js";
5
+ import { Checkbox as ue } from "../Checkbox/Checkbox.js";
6
+ import { Chip as fe } from "../Chip/Chip.js";
7
+ import l from "./Multiselect.module.css.js";
8
+ const he = {
9
+ large: l.sizeLarge,
10
+ medium: l.sizeMedium,
11
+ small: l.sizeSmall,
12
+ xsmall: l.sizeXsmall
13
+ };
14
+ function me({ checked: r, indeterminate: c = !1 }) {
15
+ const p = [
16
+ l.optionCheckbox,
17
+ r || c ? l.optionCheckboxChecked : void 0
18
+ ].filter(Boolean).join(" ");
19
+ return /* @__PURE__ */ n("span", { className: p, "aria-hidden": "true", children: c ? /* @__PURE__ */ n(
20
+ "svg",
21
+ {
22
+ width: "16",
23
+ height: "16",
24
+ viewBox: "0 0 16 16",
25
+ fill: "none",
26
+ xmlns: "http://www.w3.org/2000/svg",
27
+ "aria-hidden": "true",
28
+ children: /* @__PURE__ */ n("path", { d: "M3 8H13", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
29
+ }
30
+ ) : r ? /* @__PURE__ */ n(
31
+ "svg",
32
+ {
33
+ width: "16",
34
+ height: "16",
35
+ viewBox: "0 0 16 16",
36
+ fill: "none",
37
+ xmlns: "http://www.w3.org/2000/svg",
38
+ "aria-hidden": "true",
39
+ children: /* @__PURE__ */ n(
40
+ "path",
41
+ {
42
+ d: "M2.5 8L6.5 12L13.5 4",
43
+ stroke: "currentColor",
44
+ strokeWidth: "2",
45
+ strokeLinecap: "round",
46
+ strokeLinejoin: "round"
47
+ }
48
+ )
49
+ }
50
+ ) : null });
51
+ }
52
+ function Ce({
53
+ options: r,
54
+ value: c,
55
+ defaultValue: p,
56
+ onChange: d,
57
+ label: u,
58
+ placeholder: Q = "Selecionar opção",
59
+ hint: S,
60
+ size: W = "medium",
61
+ state: L = "default",
62
+ disabled: H = !1,
63
+ showSearch: v = !0,
64
+ maxChips: X = 3,
65
+ className: Z,
66
+ "aria-label": D,
67
+ "aria-labelledby": _,
68
+ id: q
69
+ }) {
70
+ const J = re(), b = q ?? J, E = `${b}-listbox`, O = `${b}-label`, g = c !== void 0, [U, Y] = y(
71
+ p ?? []
72
+ ), i = g ? c : U, [s, j] = y(!1), [z, w] = y(""), x = I(null), B = I(null), R = I(null), o = H || L === "disabled", M = L === "error", K = r.filter(
73
+ (e) => e.label.toLowerCase().includes(z.toLowerCase())
74
+ ), k = r.filter((e) => !e.disabled), V = i.length, f = k.length > 0 && k.every((e) => i.includes(e.value)), P = V > 0 && !f, h = oe(
75
+ (e) => {
76
+ g || Y(e), d == null || d(e);
77
+ },
78
+ [g, d]
79
+ );
80
+ function ee(e) {
81
+ const t = i.includes(e) ? i.filter((N) => N !== e) : [...i, e];
82
+ h(t);
83
+ }
84
+ function le() {
85
+ if (f)
86
+ h([]);
87
+ else {
88
+ const e = k.map((t) => t.value);
89
+ h(e);
90
+ }
91
+ }
92
+ function ne(e, t) {
93
+ t.stopPropagation(), h(i.filter((N) => N !== e));
94
+ }
95
+ function $() {
96
+ o || (j(!0), w(""));
97
+ }
98
+ function m() {
99
+ var e;
100
+ j(!1), w(""), (e = B.current) == null || e.focus();
101
+ }
102
+ function te(e) {
103
+ (e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), s || $()), e.key === "Escape" && (e.preventDefault(), m());
104
+ }
105
+ function se(e) {
106
+ e.key === "Escape" && (e.preventDefault(), m());
107
+ }
108
+ F(() => {
109
+ if (!s) return;
110
+ function e(t) {
111
+ x.current && !x.current.contains(t.target) && m();
112
+ }
113
+ return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
114
+ }, [s]), F(() => {
115
+ if (s && v) {
116
+ const e = setTimeout(() => {
117
+ var t;
118
+ return (t = R.current) == null ? void 0 : t.focus();
119
+ }, 50);
120
+ return () => clearTimeout(e);
121
+ }
122
+ }, [s, v]);
123
+ const C = r.filter((e) => i.includes(e.value)), A = C.slice(0, X), T = C.length - A.length, ie = [
124
+ l.multiselect,
125
+ he[W],
126
+ M ? l.stateError : void 0,
127
+ s ? l.stateOpen : void 0,
128
+ o ? l.disabled : void 0,
129
+ Z
130
+ ].filter(Boolean).join(" ");
131
+ return /* @__PURE__ */ a("div", { ref: x, className: ie, id: b, children: [
132
+ u && /* @__PURE__ */ n("span", { id: O, className: l.label, children: u }),
133
+ /* @__PURE__ */ a(
134
+ "div",
135
+ {
136
+ ref: B,
137
+ role: "combobox",
138
+ tabIndex: o ? -1 : 0,
139
+ className: l.trigger,
140
+ "aria-haspopup": "listbox",
141
+ "aria-expanded": s,
142
+ "aria-controls": E,
143
+ "aria-label": D,
144
+ "aria-labelledby": u ? `${O}` : _,
145
+ "aria-disabled": o,
146
+ onClick: o ? void 0 : s ? m : $,
147
+ onKeyDown: te,
148
+ children: [
149
+ /* @__PURE__ */ n("span", { className: l.chipGroup, children: C.length === 0 ? /* @__PURE__ */ n("span", { className: l.placeholder, children: Q }) : /* @__PURE__ */ a(ae, { children: [
150
+ A.map((e) => /* @__PURE__ */ n(
151
+ fe,
152
+ {
153
+ type: "outline",
154
+ size: "xsmall",
155
+ showClose: !0,
156
+ closeLabel: `Remover ${e.label}`,
157
+ disabled: o,
158
+ onClose: (t) => ne(e.value, t),
159
+ children: e.label
160
+ },
161
+ e.value
162
+ )),
163
+ T > 0 && /* @__PURE__ */ a("span", { className: l.overflowCount, children: [
164
+ "+",
165
+ T
166
+ ] })
167
+ ] }) }),
168
+ /* @__PURE__ */ n(
169
+ "span",
170
+ {
171
+ className: [l.caret, s ? l.caretOpen : void 0].filter(Boolean).join(" "),
172
+ "aria-hidden": "true",
173
+ children: /* @__PURE__ */ n(G, { as: ce, size: 16 })
174
+ }
175
+ )
176
+ ]
177
+ }
178
+ ),
179
+ S && /* @__PURE__ */ n("span", { className: [l.hint, M ? l.hintError : void 0].filter(Boolean).join(" "), children: S }),
180
+ s && /* @__PURE__ */ n(
181
+ "div",
182
+ {
183
+ className: l.panel,
184
+ onKeyDown: se,
185
+ children: /* @__PURE__ */ a("div", { className: l.panelInner, children: [
186
+ v && /* @__PURE__ */ a("div", { className: l.searchRow, children: [
187
+ /* @__PURE__ */ n(
188
+ ue,
189
+ {
190
+ checked: f ? !0 : P ? "indeterminate" : !1,
191
+ onChange: le,
192
+ "aria-label": f || P ? "Deselect all" : "Select all"
193
+ }
194
+ ),
195
+ /* @__PURE__ */ a("div", { className: l.searchField, children: [
196
+ /* @__PURE__ */ n(
197
+ "input",
198
+ {
199
+ ref: R,
200
+ type: "text",
201
+ className: l.searchInput,
202
+ placeholder: "Placeholder",
203
+ value: z,
204
+ onChange: (e) => w(e.target.value),
205
+ "aria-label": "Search options"
206
+ }
207
+ ),
208
+ /* @__PURE__ */ n("span", { className: l.searchIcon, "aria-hidden": "true", children: /* @__PURE__ */ n(G, { as: de, size: 16 }) })
209
+ ] })
210
+ ] }),
211
+ /* @__PURE__ */ n(
212
+ "div",
213
+ {
214
+ id: E,
215
+ role: "listbox",
216
+ "aria-multiselectable": "true",
217
+ "aria-label": u ?? D ?? "Options",
218
+ className: l.list,
219
+ children: K.length === 0 ? /* @__PURE__ */ n("div", { className: l.noResults, children: "No results found" }) : K.map((e) => {
220
+ const t = i.includes(e.value);
221
+ return /* @__PURE__ */ a(
222
+ "button",
223
+ {
224
+ type: "button",
225
+ role: "option",
226
+ "aria-selected": t,
227
+ "aria-disabled": e.disabled,
228
+ className: l.option,
229
+ onClick: () => !e.disabled && ee(e.value),
230
+ tabIndex: e.disabled ? -1 : 0,
231
+ children: [
232
+ /* @__PURE__ */ n(me, { checked: t }),
233
+ /* @__PURE__ */ n("span", { className: l.optionLabel, children: e.label })
234
+ ]
235
+ },
236
+ e.value
237
+ );
238
+ })
239
+ }
240
+ )
241
+ ] })
242
+ }
243
+ )
244
+ ] });
245
+ }
246
+ export {
247
+ Ce as Multiselect
248
+ };
249
+ //# sourceMappingURL=Multiselect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Multiselect.js","sources":["../../src/Multiselect/Multiselect.tsx"],"sourcesContent":["import React, { useId, useRef, useState, useEffect, useCallback } from 'react';\nimport { CaretDown, MagnifyingGlass } from '@phosphor-icons/react';\nimport { Icon } from '../Icon/index.js';\nimport { Checkbox } from '../Checkbox/index.js';\nimport { Chip } from '../Chip/index.js';\nimport styles from './Multiselect.module.css';\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\nexport type MultiselectSize = 'large' | 'medium' | 'small' | 'xsmall';\nexport type MultiselectState = 'default' | 'error' | 'disabled';\n\nexport interface MultiselectOption {\n /** Unique value for this option. */\n value: string;\n /** Display label. */\n label: string;\n /** Whether this option is disabled and cannot be selected. */\n disabled?: boolean;\n}\n\nexport interface MultiselectProps {\n /** List of selectable options. */\n options: MultiselectOption[];\n /** Currently selected values (controlled). */\n value?: string[];\n /** Default selected values (uncontrolled). */\n defaultValue?: string[];\n /** Called when the selection changes. */\n onChange?: (values: string[]) => void;\n /** Field label rendered above the trigger. */\n label?: string;\n /** Placeholder text when nothing is selected. */\n placeholder?: string;\n /** Hint text rendered below the trigger. */\n hint?: string;\n /** Size variant of the trigger field. */\n size?: MultiselectSize;\n /** Visual state of the field. */\n state?: MultiselectState;\n /** Whether the field is disabled. */\n disabled?: boolean;\n /** Whether to show the search/filter input inside the dropdown. */\n showSearch?: boolean;\n /** Maximum number of chip labels to show before showing \"+N\" overflow count. */\n maxChips?: number;\n /** Additional class name for the root element. */\n className?: string;\n /** ARIA label for the combobox trigger. */\n 'aria-label'?: string;\n /** ARIA labelledby for the combobox trigger. */\n 'aria-labelledby'?: string;\n /** ID attribute for the root element. */\n id?: string;\n}\n\n// ─── Helpers ──────────────────────────────────────────────────────────────────\n\nconst SIZE_CLASS: Record<MultiselectSize, string> = {\n large: styles.sizeLarge,\n medium: styles.sizeMedium,\n small: styles.sizeSmall,\n xsmall: styles.sizeXsmall,\n};\n\n// ─── Inner checkbox visual ─────────────────────────────────────────────────────\n\ninterface CheckboxBoxProps {\n checked: boolean;\n indeterminate?: boolean;\n}\n\nfunction CheckboxBox({ checked, indeterminate = false }: CheckboxBoxProps) {\n const cls = [\n styles.optionCheckbox,\n checked || indeterminate ? styles.optionCheckboxChecked : undefined,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <span className={cls} aria-hidden=\"true\">\n {/*\n Marcas idênticas às do Checkbox da biblioteca (SVG inline 16×16) para\n manter o visual default — a linha da opção é um <button>, então não dá\n para aninhar o <Checkbox> real (input interativo dentro de button).\n Se a marca mudar na lib (Checkbox.tsx), sincronizar aqui.\n */}\n {indeterminate ? (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <path d=\"M3 8H13\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" />\n </svg>\n ) : checked ? (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M2.5 8L6.5 12L13.5 4\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n ) : null}\n </span>\n );\n}\n\n// ─── Multiselect ───────────────────────────────────────────────────────────────\n\nexport function Multiselect({\n options,\n value: valueProp,\n defaultValue,\n onChange,\n label,\n placeholder = 'Selecionar opção',\n hint,\n size = 'medium',\n state = 'default',\n disabled = false,\n showSearch = true,\n maxChips = 3,\n className,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n id: idProp,\n}: MultiselectProps) {\n const generatedId = useId();\n const id = idProp ?? generatedId;\n const listboxId = `${id}-listbox`;\n const labelId = `${id}-label`;\n\n // ─── State ───────────────────────────────────────────────────\n const isControlled = valueProp !== undefined;\n const [internalSelected, setInternalSelected] = useState<string[]>(\n defaultValue ?? [],\n );\n const selected = isControlled ? valueProp! : internalSelected;\n\n const [isOpen, setIsOpen] = useState(false);\n const [searchQuery, setSearchQuery] = useState('');\n\n const rootRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLDivElement>(null);\n const searchRef = useRef<HTMLInputElement>(null);\n\n // ─── Derived ─────────────────────────────────────────────────\n const effectiveDisabled = disabled || state === 'disabled';\n const isError = state === 'error';\n\n const filteredOptions = options.filter((opt) =>\n opt.label.toLowerCase().includes(searchQuery.toLowerCase()),\n );\n\n const selectableOptions = options.filter((opt) => !opt.disabled);\n const selectedCount = selected.length;\n const allSelected =\n selectableOptions.length > 0 &&\n selectableOptions.every((opt) => selected.includes(opt.value));\n const someSelected = selectedCount > 0 && !allSelected;\n\n // ─── Handlers ────────────────────────────────────────────────\n const updateSelected = useCallback(\n (next: string[]) => {\n if (!isControlled) {\n setInternalSelected(next);\n }\n onChange?.(next);\n },\n [isControlled, onChange],\n );\n\n function toggleOption(optValue: string) {\n const next = selected.includes(optValue)\n ? selected.filter((v) => v !== optValue)\n : [...selected, optValue];\n updateSelected(next);\n }\n\n function toggleAll() {\n if (allSelected) {\n updateSelected([]);\n } else {\n const allValues = selectableOptions.map((o) => o.value);\n updateSelected(allValues);\n }\n }\n\n function removeChip(optValue: string, e: React.MouseEvent) {\n e.stopPropagation();\n updateSelected(selected.filter((v) => v !== optValue));\n }\n\n function openPanel() {\n if (effectiveDisabled) return;\n setIsOpen(true);\n setSearchQuery('');\n }\n\n function closePanel() {\n setIsOpen(false);\n setSearchQuery('');\n triggerRef.current?.focus();\n }\n\n function handleTriggerKeyDown(e: React.KeyboardEvent) {\n if (e.key === 'Enter' || e.key === ' ' || e.key === 'ArrowDown') {\n e.preventDefault();\n if (!isOpen) openPanel();\n }\n if (e.key === 'Escape') {\n e.preventDefault();\n closePanel();\n }\n }\n\n function handlePanelKeyDown(e: React.KeyboardEvent) {\n if (e.key === 'Escape') {\n e.preventDefault();\n closePanel();\n }\n }\n\n // Close on outside click\n useEffect(() => {\n if (!isOpen) return;\n function handleOutside(e: MouseEvent) {\n if (rootRef.current && !rootRef.current.contains(e.target as Node)) {\n closePanel();\n }\n }\n document.addEventListener('mousedown', handleOutside);\n return () => document.removeEventListener('mousedown', handleOutside);\n }, [isOpen]);\n\n // Focus search when panel opens\n useEffect(() => {\n if (isOpen && showSearch) {\n // slight delay so the panel is mounted before focus\n const t = setTimeout(() => searchRef.current?.focus(), 50);\n return () => clearTimeout(t);\n }\n }, [isOpen, showSearch]);\n\n // ─── Chip rendering ──────────────────────────────────────────\n const selectedOptions = options.filter((o) => selected.includes(o.value));\n const visibleChips = selectedOptions.slice(0, maxChips);\n const overflowCount = selectedOptions.length - visibleChips.length;\n\n // ─── Class names ─────────────────────────────────────────────\n const rootCls = [\n styles.multiselect,\n SIZE_CLASS[size],\n isError ? styles.stateError : undefined,\n isOpen ? styles.stateOpen : undefined,\n effectiveDisabled ? styles.disabled : undefined,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n // ─── Render ───────────────────────────────────────────────────\n return (\n <div ref={rootRef} className={rootCls} id={id}>\n {/* Label */}\n {label && (\n <span id={labelId} className={styles.label}>\n {label}\n </span>\n )}\n\n {/* Trigger — div (não button) para permitir Chips com botão de fechar dentro */}\n <div\n ref={triggerRef}\n role=\"combobox\"\n tabIndex={effectiveDisabled ? -1 : 0}\n className={styles.trigger}\n aria-haspopup=\"listbox\"\n aria-expanded={isOpen}\n aria-controls={listboxId}\n aria-label={ariaLabel}\n aria-labelledby={label ? `${labelId}` : ariaLabelledby}\n aria-disabled={effectiveDisabled}\n onClick={effectiveDisabled ? undefined : (isOpen ? closePanel : openPanel)}\n onKeyDown={handleTriggerKeyDown}\n >\n {/* Chip group / placeholder */}\n <span className={styles.chipGroup}>\n {selectedOptions.length === 0 ? (\n <span className={styles.placeholder}>{placeholder}</span>\n ) : (\n <>\n {visibleChips.map((opt) => (\n <Chip\n key={opt.value}\n type=\"outline\"\n size=\"xsmall\"\n showClose\n closeLabel={`Remover ${opt.label}`}\n disabled={effectiveDisabled}\n onClose={(e) => removeChip(opt.value, e as unknown as React.MouseEvent)}\n >\n {opt.label}\n </Chip>\n ))}\n {overflowCount > 0 && (\n <span className={styles.overflowCount}>\n +{overflowCount}\n </span>\n )}\n </>\n )}\n </span>\n\n {/* Caret */}\n <span\n className={[styles.caret, isOpen ? styles.caretOpen : undefined]\n .filter(Boolean)\n .join(' ')}\n aria-hidden=\"true\"\n >\n <Icon as={CaretDown} size={16} />\n </span>\n </div>\n\n {/* Hint */}\n {hint && (\n <span className={[styles.hint, isError ? styles.hintError : undefined]\n .filter(Boolean)\n .join(' ')}>\n {hint}\n </span>\n )}\n\n {/* Dropdown panel */}\n {isOpen && (\n <div\n className={styles.panel}\n onKeyDown={handlePanelKeyDown}\n >\n <div className={styles.panelInner}>\n {/* Search row */}\n {showSearch && (\n <div className={styles.searchRow}>\n <Checkbox\n checked={allSelected ? true : someSelected ? 'indeterminate' : false}\n onChange={toggleAll}\n aria-label={allSelected || someSelected ? 'Deselect all' : 'Select all'}\n />\n <div className={styles.searchField}>\n <input\n ref={searchRef}\n type=\"text\"\n className={styles.searchInput}\n placeholder=\"Placeholder\"\n value={searchQuery}\n onChange={(e) => setSearchQuery(e.target.value)}\n aria-label=\"Search options\"\n />\n <span className={styles.searchIcon} aria-hidden=\"true\">\n <Icon as={MagnifyingGlass} size={16} />\n </span>\n </div>\n </div>\n )}\n\n {/* Options list */}\n <div\n id={listboxId}\n role=\"listbox\"\n aria-multiselectable=\"true\"\n aria-label={label ?? ariaLabel ?? 'Options'}\n className={styles.list}\n >\n {filteredOptions.length === 0 ? (\n <div className={styles.noResults}>No results found</div>\n ) : (\n filteredOptions.map((opt) => {\n const isSelected = selected.includes(opt.value);\n return (\n <button\n key={opt.value}\n type=\"button\"\n role=\"option\"\n aria-selected={isSelected}\n aria-disabled={opt.disabled}\n className={styles.option}\n onClick={() => !opt.disabled && toggleOption(opt.value)}\n tabIndex={opt.disabled ? -1 : 0}\n >\n <CheckboxBox checked={isSelected} />\n <span className={styles.optionLabel}>{opt.label}</span>\n </button>\n );\n })\n )}\n </div>\n </div>\n </div>\n )}\n </div>\n );\n}\n"],"names":["SIZE_CLASS","styles","CheckboxBox","checked","indeterminate","cls","jsx","Multiselect","options","valueProp","defaultValue","onChange","label","placeholder","hint","size","state","disabled","showSearch","maxChips","className","ariaLabel","ariaLabelledby","idProp","generatedId","useId","id","listboxId","labelId","isControlled","internalSelected","setInternalSelected","useState","selected","isOpen","setIsOpen","searchQuery","setSearchQuery","rootRef","useRef","triggerRef","searchRef","effectiveDisabled","isError","filteredOptions","opt","selectableOptions","selectedCount","allSelected","someSelected","updateSelected","useCallback","next","toggleOption","optValue","v","toggleAll","allValues","o","removeChip","e","openPanel","closePanel","_a","handleTriggerKeyDown","handlePanelKeyDown","useEffect","handleOutside","t","selectedOptions","visibleChips","overflowCount","rootCls","jsxs","Fragment","Chip","Icon","CaretDown","Checkbox","MagnifyingGlass","isSelected"],"mappings":";;;;;;;AA0DA,MAAMA,KAA8C;AAAA,EAClD,OAASC,EAAO;AAAA,EAChB,QAASA,EAAO;AAAA,EAChB,OAASA,EAAO;AAAA,EAChB,QAASA,EAAO;AAClB;AASA,SAASC,GAAY,EAAE,SAAAC,GAAS,eAAAC,IAAgB,MAA2B;AACzE,QAAMC,IAAM;AAAA,IACVJ,EAAO;AAAA,IACPE,KAAWC,IAAgBH,EAAO,wBAAwB;AAAA,EAAA,EAEzD,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,2BACG,QAAA,EAAK,WAAWI,GAAK,eAAY,QAO/B,UAAAD,IACC,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAM;AAAA,MACN,QAAO;AAAA,MACP,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,OAAM;AAAA,MACN,eAAY;AAAA,MAEZ,UAAA,gBAAAA,EAAC,UAAK,GAAE,WAAU,QAAO,gBAAe,aAAY,KAAI,eAAc,QAAA,CAAQ;AAAA,IAAA;AAAA,EAAA,IAE9EH,IACF,gBAAAG;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAM;AAAA,MACN,QAAO;AAAA,MACP,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,OAAM;AAAA,MACN,eAAY;AAAA,MAEZ,UAAA,gBAAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,GAAE;AAAA,UACF,QAAO;AAAA,UACP,aAAY;AAAA,UACZ,eAAc;AAAA,UACd,gBAAe;AAAA,QAAA;AAAA,MAAA;AAAA,IACjB;AAAA,EAAA,IAEA,KAAA,CACN;AAEJ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,KAAK;AAC9C,uBACE,gBAAA4B;AAAA,kBAAC;AAAA,kBAAA;AAAA,oBAEC,MAAK;AAAA,oBACL,MAAK;AAAA,oBACL,iBAAeO;AAAA,oBACf,iBAAenC,EAAI;AAAA,oBACnB,WAAW5C,EAAO;AAAA,oBAClB,SAAS,MAAM,CAAC4C,EAAI,YAAYQ,GAAaR,EAAI,KAAK;AAAA,oBACtD,UAAUA,EAAI,WAAW,KAAK;AAAA,oBAE9B,UAAA;AAAA,sBAAA,gBAAAvC,EAACJ,IAAA,EAAY,SAAS8E,EAAA,CAAY;AAAA,wCACjC,QAAA,EAAK,WAAW/E,EAAO,aAAc,YAAI,MAAA,CAAM;AAAA,oBAAA;AAAA,kBAAA;AAAA,kBAV3C4C,EAAI;AAAA,gBAAA;AAAA,cAaf,CAAC;AAAA,YAAA;AAAA,UAAA;AAAA,QAEL,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GAEJ;AAEJ;"}
@@ -0,0 +1 @@
1
+ ._scrollable_1rjtm_9{scrollbar-width:thin;scrollbar-color:var(--color-fill-neutral-muted) transparent}._scrollable_1rjtm_9::-webkit-scrollbar{width:8px;height:8px}._scrollable_1rjtm_9::-webkit-scrollbar-track{background:transparent;border-radius:4px}._scrollable_1rjtm_9::-webkit-scrollbar-thumb{background-color:var(--color-fill-neutral-muted);border-radius:4px}._scrollable_1rjtm_9::-webkit-scrollbar-thumb:hover{background-color:var(--color-fill-neutral-default)}._scrollable_1rjtm_9::-webkit-scrollbar-thumb:active{background-color:var(--color-fill-neutral-strong)}._multiselect_1x1if_2{position:relative;display:inline-flex;flex-direction:column;gap:8px;width:320px;font-family:var(--font-family-base, system-ui, sans-serif);box-sizing:border-box}._label_1x1if_13{display:flex;align-items:center;gap:4px;font-size:var(--font-size-14);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-14, 20px);color:var(--color-text-neutral-mudle)}._trigger_1x1if_24{display:flex;align-items:center;gap:4px;width:100%;padding:0 12px;border-radius:8px;background-color:var(--color-fill-neutral-muted);border:1px solid transparent;cursor:pointer;box-sizing:border-box;transition:background-color .12s ease,border-color .12s ease,box-shadow .12s ease;text-align:left}._trigger_1x1if_24:focus-visible{outline:none;box-shadow:var(--shadow-focus)}._sizeLarge_1x1if_48 ._trigger_1x1if_24{height:48px}._sizeMedium_1x1if_49 ._trigger_1x1if_24{height:42px}._sizeSmall_1x1if_50 ._trigger_1x1if_24{height:36px}._sizeXsmall_1x1if_51 ._trigger_1x1if_24{height:32px}._trigger_1x1if_24:hover:not(:disabled):not(:focus-visible){background-color:var(--color-fill-interaction-neutral-muted-hover)}._stateError_1x1if_58 ._trigger_1x1if_24{background-color:var(--color-canvas-neutral-white);border-color:var(--color-stroke-feedback-danger-default)}._stateError_1x1if_58 ._trigger_1x1if_24:hover:not(:disabled){background-color:var(--color-canvas-neutral-white);border-color:var(--color-stroke-feedback-danger-default)}._stateOpen_1x1if_68 ._trigger_1x1if_24{background-color:var(--color-canvas-neutral-white);border-color:var(--color-stroke-brand-default);box-shadow:var(--shadow-focus)}._stateOpen_1x1if_68 ._trigger_1x1if_24:hover:not(:disabled){background-color:var(--color-canvas-neutral-white);border-color:var(--color-stroke-brand-default);box-shadow:var(--shadow-focus)}._multiselect_1x1if_2._disabled_1x1if_82{opacity:.5;cursor:not-allowed;pointer-events:none}._multiselect_1x1if_2._disabled_1x1if_82 ._trigger_1x1if_24{background-color:var(--color-fill-neutral-muted);border-color:transparent;cursor:not-allowed}._chipGroup_1x1if_95{display:flex;flex-wrap:nowrap;align-items:center;gap:4px;flex:1 0 0;min-width:0;overflow:hidden}._placeholder_1x1if_106{font-size:var(--font-size-14);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-14, 20px);color:var(--color-text-neutral-subtlest);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 0 0;min-width:0}._overflowCount_1x1if_121{display:inline-flex;align-items:center;gap:4px;height:24px;padding:4px 12px;border-radius:9999px;background-color:var(--color-canvas-neutral-white);border:1px solid var(--color-stroke-neutral-default);font-size:var(--font-size-12);font-weight:var(--font-weight-semibold);line-height:var(--font-line-height-12, 16px);color:var(--color-text-neutral-mudle);white-space:nowrap;flex-shrink:0}._caret_1x1if_139{flex-shrink:0;width:16px;height:16px;color:var(--color-icon-neutral-default);transition:transform .2s ease}._caretOpen_1x1if_147{transform:rotate(180deg)}._panel_1x1if_152{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:1000;display:flex;gap:4px;padding:12px;background-color:var(--color-canvas-neutral-white);border:1px solid var(--color-stroke-neutral-default);border-radius:8px;box-shadow:var(--shadow-layer-sm);box-sizing:border-box}._panelInner_1x1if_168{display:flex;flex-direction:column;flex:1 0 0;min-width:0}._searchRow_1x1if_176{display:flex;align-items:center;gap:8px;padding-left:8px;flex-shrink:0}._searchField_1x1if_184{display:flex;flex:1 0 0;align-items:center;height:36px;padding:8px;border:1px solid var(--color-stroke-neutral-default);border-radius:8px;background-color:var(--color-canvas-neutral-white);gap:8px;min-width:0;box-sizing:border-box;transition:border-color .12s ease,box-shadow .12s ease}._searchField_1x1if_184:focus-within{border-color:var(--color-stroke-brand-default);box-shadow:var(--shadow-focus);outline:none}._searchField_1x1if_184:hover:not(:focus-within){border-color:var(--color-stroke-interaction-neutral-hover)}._searchInput_1x1if_211{flex:1 0 0;min-width:0;border:none;outline:none;background:transparent;font-family:var(--font-family-base, system-ui, sans-serif);font-size:var(--font-size-14);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-14, 20px);color:var(--color-text-neutral-mudle)}._searchInput_1x1if_211::placeholder{color:var(--color-text-neutral-subtlest)}._searchIcon_1x1if_228{flex-shrink:0;width:16px;height:16px;color:var(--color-icon-neutral-subtle)}._list_1x1if_238{display:flex;flex-direction:column;overflow-y:auto;max-height:280px}._option_1x1if_247{display:flex;align-items:center;gap:8px;height:42px;padding:0 8px;border-radius:8px;background-color:var(--color-canvas-neutral-white);border:none;cursor:pointer;width:100%;text-align:left;box-sizing:border-box;transition:background-color .12s ease;flex-shrink:0}._option_1x1if_247:hover{background-color:var(--color-fill-interaction-neutral-subtle-hover)}._option_1x1if_247:focus-visible{outline:none;box-shadow:var(--shadow-focus)}._option_1x1if_247[aria-disabled=true]{opacity:.5;cursor:not-allowed;pointer-events:none}._optionCheckbox_1x1if_282{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:24px;height:24px;border-radius:4px;border:2px solid var(--color-stroke-neutral-default);background-color:var(--color-canvas-neutral-white);box-sizing:border-box;transition:background-color .12s ease,border-color .12s ease;color:var(--color-icon-neutral-inverse);pointer-events:none}._option_1x1if_247:hover ._optionCheckbox_1x1if_282{border-color:var(--color-stroke-interaction-neutral-hover)}._optionCheckboxChecked_1x1if_304{background-color:var(--color-fill-brand-default);border-color:var(--color-fill-brand-default)}._option_1x1if_247:hover ._optionCheckboxChecked_1x1if_304{background-color:var(--color-fill-interaction-brand-hover);border-color:var(--color-stroke-interaction-brand-hover)}._optionLabel_1x1if_315{font-size:var(--font-size-14);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-14, 20px);color:var(--color-text-neutral-mudle);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 0 0;min-width:0}._noResults_1x1if_328{padding:12px 8px;font-size:var(--font-size-14);font-weight:var(--font-weight-regular);color:var(--color-text-neutral-subtlest);text-align:center}._hint_1x1if_337{display:flex;align-items:center;gap:4px;font-size:var(--font-size-12);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-12, 16px);color:var(--color-text-neutral-mudle)}._hintError_1x1if_347{color:var(--color-text-feedback-danger-default)}
@@ -0,0 +1,64 @@
1
+ import './Multiselect.module.css';const e = "_multiselect_1x1if_2", o = "_label_1x1if_13", t = "_trigger_1x1if_24", _ = "_sizeLarge_1x1if_48", s = "_sizeMedium_1x1if_49", i = "_sizeSmall_1x1if_50", n = "_sizeXsmall_1x1if_51", c = "_stateError_1x1if_58", r = "_stateOpen_1x1if_68", l = "_disabled_1x1if_82", a = "_chipGroup_1x1if_95", p = "_placeholder_1x1if_106", x = "_overflowCount_1x1if_121", f = "_caret_1x1if_139", h = "_caretOpen_1x1if_147", d = "_panel_1x1if_152", u = "_panelInner_1x1if_168", b = "_searchRow_1x1if_176", m = "_searchField_1x1if_184", z = "_searchInput_1x1if_211", C = "_searchIcon_1x1if_228", g = "_list_1x1if_238 _scrollable_1rjtm_9", k = "_option_1x1if_247", I = "_optionCheckbox_1x1if_282", w = "_optionCheckboxChecked_1x1if_304", E = "_optionLabel_1x1if_315", L = "_noResults_1x1if_328", O = "_hint_1x1if_337", R = "_hintError_1x1if_347", v = {
2
+ multiselect: e,
3
+ label: o,
4
+ trigger: t,
5
+ sizeLarge: _,
6
+ sizeMedium: s,
7
+ sizeSmall: i,
8
+ sizeXsmall: n,
9
+ stateError: c,
10
+ stateOpen: r,
11
+ disabled: l,
12
+ chipGroup: a,
13
+ placeholder: p,
14
+ overflowCount: x,
15
+ caret: f,
16
+ caretOpen: h,
17
+ panel: d,
18
+ panelInner: u,
19
+ searchRow: b,
20
+ searchField: m,
21
+ searchInput: z,
22
+ searchIcon: C,
23
+ list: g,
24
+ option: k,
25
+ optionCheckbox: I,
26
+ optionCheckboxChecked: w,
27
+ optionLabel: E,
28
+ noResults: L,
29
+ hint: O,
30
+ hintError: R
31
+ };
32
+ export {
33
+ f as caret,
34
+ h as caretOpen,
35
+ a as chipGroup,
36
+ v as default,
37
+ l as disabled,
38
+ O as hint,
39
+ R as hintError,
40
+ o as label,
41
+ g as list,
42
+ e as multiselect,
43
+ L as noResults,
44
+ k as option,
45
+ I as optionCheckbox,
46
+ w as optionCheckboxChecked,
47
+ E as optionLabel,
48
+ x as overflowCount,
49
+ d as panel,
50
+ u as panelInner,
51
+ p as placeholder,
52
+ m as searchField,
53
+ C as searchIcon,
54
+ z as searchInput,
55
+ b as searchRow,
56
+ _ as sizeLarge,
57
+ s as sizeMedium,
58
+ i as sizeSmall,
59
+ n as sizeXsmall,
60
+ c as stateError,
61
+ r as stateOpen,
62
+ t as trigger
63
+ };
64
+ //# sourceMappingURL=Multiselect.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Multiselect.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,18 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import i from "./Overlay.module.css.js";
3
+ function l({ className: r, ...e }) {
4
+ const o = [i.overlay, r].filter(Boolean).join(" ");
5
+ return /* @__PURE__ */ t(
6
+ "div",
7
+ {
8
+ className: o,
9
+ role: "presentation",
10
+ "aria-hidden": "true",
11
+ ...e
12
+ }
13
+ );
14
+ }
15
+ export {
16
+ l as Overlay
17
+ };
18
+ //# sourceMappingURL=Overlay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Overlay.js","sources":["../../src/Overlay/Overlay.tsx"],"sourcesContent":["import React from 'react';\nimport styles from './Overlay.module.css';\n\nexport interface OverlayProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Additional class names forwarded to the root element. */\n className?: string;\n}\n\n/**\n * A semi-transparent backdrop that dims the underlying content to\n * focus attention on a modal or dialog. Use as the foundation for\n * any modal, dialog, or focused popover.\n *\n * Renders as a `position:fixed` element that covers the full\n * viewport. The consumer is responsible for mounting/unmounting\n * the Overlay and layering the dialog on top of it via z-index.\n */\nexport function Overlay({ className, ...props }: OverlayProps) {\n const cls = [styles.overlay, className].filter(Boolean).join(' ');\n\n return (\n <div\n className={cls}\n role=\"presentation\"\n aria-hidden=\"true\"\n {...props}\n />\n );\n}\n"],"names":["Overlay","className","props","cls","styles","jsx"],"mappings":";;AAiBO,SAASA,EAAQ,EAAE,WAAAC,GAAW,GAAGC,KAAuB;AAC7D,QAAMC,IAAM,CAACC,EAAO,SAASH,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAEhE,SACE,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWF;AAAA,MACX,MAAK;AAAA,MACL,eAAY;AAAA,MACX,GAAGD;AAAA,IAAA;AAAA,EAAA;AAGV;"}
@@ -0,0 +1 @@
1
+ ._overlay_18hjd_8{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--color-fill-neutral-intense);opacity:.4;z-index:100;cursor:default}
@@ -0,0 +1,8 @@
1
+ import './Overlay.module.css';const e = "_overlay_18hjd_8", o = {
2
+ overlay: e
3
+ };
4
+ export {
5
+ o as default,
6
+ e as overlay
7
+ };
8
+ //# sourceMappingURL=Overlay.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Overlay.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -0,0 +1,118 @@
1
+ import { jsxs as N, jsx as l } from "react/jsx-runtime";
2
+ import { CaretDoubleLeft as k, CaretLeft as w, CaretRight as x, CaretDoubleRight as L, CaretDown as D } from "@phosphor-icons/react";
3
+ import { Icon as m } from "../Icon/Icon.js";
4
+ import a from "./Paginator.module.css.js";
5
+ function y({
6
+ currentPage: t,
7
+ totalPages: s,
8
+ pageWindowSize: n = 3,
9
+ pageSize: h = 10,
10
+ pageSizeOptions: e = [10, 20, 30, 50, 100],
11
+ onPageChange: r,
12
+ onPageSizeChange: o,
13
+ showPageSizeSelect: c = !0,
14
+ className: p
15
+ }) {
16
+ const u = t <= 1, f = t >= s, v = M(t, s, n);
17
+ function d(i) {
18
+ i < 1 || i > s || i === t || r == null || r(i);
19
+ }
20
+ function j(i) {
21
+ const b = Number(i.target.value);
22
+ o == null || o(b);
23
+ }
24
+ const A = [a.paginator, p].filter(Boolean).join(" ");
25
+ return /* @__PURE__ */ N("nav", { className: A, "aria-label": "Pagination", children: [
26
+ /* @__PURE__ */ l(
27
+ "button",
28
+ {
29
+ className: [a.btn, a.btnArrow].join(" "),
30
+ onClick: () => d(1),
31
+ disabled: u,
32
+ "aria-disabled": u,
33
+ "aria-label": "First page",
34
+ children: /* @__PURE__ */ l(m, { as: k, size: 16, weight: "bold" })
35
+ }
36
+ ),
37
+ /* @__PURE__ */ l(
38
+ "button",
39
+ {
40
+ className: [a.btn, a.btnArrow].join(" "),
41
+ onClick: () => d(t - 1),
42
+ disabled: u,
43
+ "aria-disabled": u,
44
+ "aria-label": "Previous page",
45
+ children: /* @__PURE__ */ l(m, { as: w, size: 16, weight: "bold" })
46
+ }
47
+ ),
48
+ v.map((i) => {
49
+ const b = i === t, C = [
50
+ a.btn,
51
+ a.btnNumber,
52
+ b ? a.btnNumberActive : ""
53
+ ].filter(Boolean).join(" ");
54
+ return /* @__PURE__ */ l(
55
+ "button",
56
+ {
57
+ className: C,
58
+ onClick: () => d(i),
59
+ disabled: b,
60
+ "aria-disabled": b,
61
+ "aria-label": `Page ${i}`,
62
+ "aria-current": b ? "page" : void 0,
63
+ children: i
64
+ },
65
+ i
66
+ );
67
+ }),
68
+ /* @__PURE__ */ l(
69
+ "button",
70
+ {
71
+ className: [a.btn, a.btnArrow].join(" "),
72
+ onClick: () => d(t + 1),
73
+ disabled: f,
74
+ "aria-disabled": f,
75
+ "aria-label": "Next page",
76
+ children: /* @__PURE__ */ l(m, { as: x, size: 16, weight: "bold" })
77
+ }
78
+ ),
79
+ /* @__PURE__ */ l(
80
+ "button",
81
+ {
82
+ className: [a.btn, a.btnArrow].join(" "),
83
+ onClick: () => d(s),
84
+ disabled: f,
85
+ "aria-disabled": f,
86
+ "aria-label": "Last page",
87
+ children: /* @__PURE__ */ l(m, { as: L, size: 16, weight: "bold" })
88
+ }
89
+ ),
90
+ c && /* @__PURE__ */ N("div", { className: a.selectWrap, children: [
91
+ /* @__PURE__ */ l(
92
+ "select",
93
+ {
94
+ className: a.select,
95
+ value: h,
96
+ onChange: j,
97
+ "aria-label": "Rows per page",
98
+ children: e.map((i) => /* @__PURE__ */ l("option", { value: i, children: i }, i))
99
+ }
100
+ ),
101
+ /* @__PURE__ */ l("span", { className: a.selectCaret, "aria-hidden": "true", children: /* @__PURE__ */ l(m, { as: D, size: 16 }) })
102
+ ] })
103
+ ] });
104
+ }
105
+ function M(t, s, n) {
106
+ if (s <= 0) return [];
107
+ const h = Math.floor(n / 2);
108
+ let e = t - h, r = e + n - 1;
109
+ e < 1 && (e = 1, r = Math.min(n, s)), r > s && (r = s, e = Math.max(1, r - n + 1));
110
+ const o = [];
111
+ for (let c = e; c <= r; c++)
112
+ o.push(c);
113
+ return o;
114
+ }
115
+ export {
116
+ y as Paginator
117
+ };
118
+ //# sourceMappingURL=Paginator.js.map