softable-pixels-web 1.2.29 → 1.2.30

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 (43) hide show
  1. package/dist/{CheckItem-C4uiE7u4.js → CheckItem-D45HN7Ir.js} +2 -2
  2. package/dist/{CheckItem-C4uiE7u4.js.map → CheckItem-D45HN7Ir.js.map} +1 -1
  3. package/dist/{Checkbox-z5m8nxGi.js → Checkbox-ClKDCBdz.js} +2 -2
  4. package/dist/{Checkbox-z5m8nxGi.js.map → Checkbox-ClKDCBdz.js.map} +1 -1
  5. package/dist/{DatePicker-24h82Qqd.js → DatePicker-BtPT01Vt.js} +2 -2
  6. package/dist/{DatePicker-24h82Qqd.js.map → DatePicker-BtPT01Vt.js.map} +1 -1
  7. package/dist/{FileInput-C6N2PiPi.js → FileInput-CFaWGwh1.js} +60 -24
  8. package/dist/FileInput-CFaWGwh1.js.map +1 -0
  9. package/dist/{Icon-lVgQoCFP.js → Icon-bV19y393.js} +2 -2
  10. package/dist/Icon-bV19y393.js.map +1 -0
  11. package/dist/{Input-C9pWx1Y7.js → Input-sl0cRZUS.js} +2 -2
  12. package/dist/{Input-C9pWx1Y7.js.map → Input-sl0cRZUS.js.map} +1 -1
  13. package/dist/{Pagination-DPX_O37l.js → Pagination-CqVu9N0h.js} +2 -2
  14. package/dist/{Pagination-DPX_O37l.js.map → Pagination-CqVu9N0h.js.map} +1 -1
  15. package/dist/{SearchInput-WHXwVu4s.js → SearchInput-BdscRWx2.js} +2 -2
  16. package/dist/{SearchInput-WHXwVu4s.js.map → SearchInput-BdscRWx2.js.map} +1 -1
  17. package/dist/{Select-CUqDDNwI.js → Select-DCtpaxaW.js} +2 -2
  18. package/dist/{Select-CUqDDNwI.js.map → Select-DCtpaxaW.js.map} +1 -1
  19. package/dist/check-item.js +2 -2
  20. package/dist/checkbox.js +2 -2
  21. package/dist/context-menu.d.ts +1 -1
  22. package/dist/date-picker.js +2 -2
  23. package/dist/file-input.d.ts +1 -1
  24. package/dist/file-input.js +2 -2
  25. package/dist/{index-BBmC9Lfb.d.ts → index-BQRzf4rc.d.ts} +3 -3
  26. package/dist/{index-DlVdtSCT.d.ts → index-DAAEXO7G.d.ts} +2 -2
  27. package/dist/{index-CHsvpknw.d.ts → index-DDF3jbpO.d.ts} +2 -1
  28. package/dist/{index-C31Z2a2S.d.ts → index-DFfPk9_X.d.ts} +2 -2
  29. package/dist/{index-Q90gI7Q2.d.ts → index-Ll44Zh-u.d.ts} +2 -2
  30. package/dist/{index-Bo6Mz8jJ.d.ts → index-R4SFv1ug.d.ts} +3 -3
  31. package/dist/index.d.ts +6 -6
  32. package/dist/index.js +9 -9
  33. package/dist/input.d.ts +1 -1
  34. package/dist/input.js +2 -2
  35. package/dist/pagination.js +2 -2
  36. package/dist/searchInput.js +2 -2
  37. package/dist/select.d.ts +1 -1
  38. package/dist/select.js +2 -2
  39. package/dist/tab-switch.d.ts +1 -1
  40. package/dist/text-area.d.ts +1 -1
  41. package/package.json +1 -1
  42. package/dist/FileInput-C6N2PiPi.js.map +0 -1
  43. package/dist/Icon-lVgQoCFP.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Select-CUqDDNwI.js","names":["value","Select: React.FC<SelectProps>","result: React.ReactNode[] | string"],"sources":["../src/components/commons/inputs/Select/components/OptionItem/styles.ts","../src/components/commons/inputs/Select/components/OptionItem/index.tsx","../src/hooks/useCompositeListNavigation/index.ts","../src/components/commons/inputs/Select/hooks/useSelect/index.ts","../src/components/commons/inputs/Select/styles.ts","../src/components/commons/inputs/Select/types.ts","../src/components/commons/inputs/Select/index.tsx"],"sourcesContent":["import type { OptionItemProps } from './types'\nimport { styled } from '@hooks/useThemedStyles/types'\n\nexport function createOptionsStyles(\n props: OptionItemProps & { ['data-active']?: string }\n) {\n const { isSelected } = props\n const isActive = props['data-active'] === 'true'\n const highlighted = isSelected || isActive\n\n return styled({\n container: {\n width: '100%',\n\n display: 'flex',\n alignItems: 'center',\n textAlign: 'left',\n\n borderRadius: '0.25rem',\n padding: '0.5rem 0.75rem',\n\n cursor: 'pointer',\n transition: 'background-color 0.2s ease-out',\n\n backgroundColor: highlighted\n ? 'var(--px-background-card-hover)'\n : 'transparent',\n\n __rules: {\n '&:hover': {\n backgroundColor: 'var(--px-background-card-hover) !important'\n },\n\n '&:focus': {\n outlineOffset: '-2px',\n outline: '2px solid var(--px-color-primary)'\n }\n }\n },\n\n text: {\n flex: 1,\n\n fontSize: '1rem',\n fontWeight: 500,\n lineHeight: '1.5rem',\n fontFamily: 'inherit',\n color: 'var(--px-text-primary)',\n\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis'\n },\n\n optionContent: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n columnGap: '0.25rem'\n }\n })\n}\n","/** biome-ignore-all lint/a11y/useSemanticElements: It's a custom select component */\nimport type React from 'react'\nimport { forwardRef } from 'react'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { OptionItemProps } from './types'\n\n// Styles\nimport { createOptionsStyles } from './styles'\n\ntype NativeButtonProps = Omit<\n React.ComponentPropsWithoutRef<'button'>,\n 'onClick'\n>\n\nexport const OptionItem = forwardRef<\n HTMLButtonElement,\n OptionItemProps & NativeButtonProps\n>((props, ref) => {\n const { styles, classes } = useThemedStyles(props, createOptionsStyles)\n\n const { option, isSelected, onClick, ...rest } = props\n\n return (\n <button\n {...rest}\n ref={ref}\n type=\"button\"\n role=\"option\"\n style={styles.container}\n className={classes.container}\n aria-label={option.label}\n aria-selected={isSelected}\n onClick={() => onClick(option.value)}\n >\n <div style={styles.optionContent}>\n {option.startIcon}\n <span style={styles.text}> {option.label}</span>\n </div>\n </button>\n )\n})\n\nOptionItem.displayName = 'OptionItem'\n","// External Libraries\nimport { useCallback, useEffect, useRef, useState } from 'react'\n\nexport type CompositeItemMeta = {\n disabled?: boolean\n hasChildren?: boolean\n onActivate?: () => void\n onOpenChildren?: () => void\n onCloseChildren?: () => void\n}\n\ntype Params = {\n open: boolean\n itemCount: number\n initialIndex?: number\n onCloseByTab?: () => void\n setOpen: (v: boolean) => void\n makeMeta: (index: number) => CompositeItemMeta\n}\n\nfunction findNextEnabled(\n start: number,\n dir: 1 | -1,\n count: number,\n isDisabled: (i: number) => boolean\n) {\n if (count <= 0) return 0\n let i = start\n for (let step = 0; step < count; step++) {\n i = (i + dir + count) % count\n if (!isDisabled(i)) return i\n }\n return start\n}\n\nfunction findFirstEnabled(count: number, isDisabled: (i: number) => boolean) {\n for (let i = 0; i < count; i++) if (!isDisabled(i)) return i\n return 0\n}\n\nexport function useCompositeListNavigation({\n open,\n itemCount,\n initialIndex,\n setOpen,\n makeMeta,\n onCloseByTab\n}: Params) {\n const listRef = useRef<HTMLElement | null>(null)\n const itemRefs = useRef<Array<HTMLButtonElement | null>>([])\n\n const isDisabled = useCallback(\n (i: number) => !!makeMeta(i).disabled,\n [makeMeta]\n )\n\n const [activeIndex, setActiveIndex] = useState(0)\n\n const focusItem = useCallback((i: number) => {\n const el = itemRefs.current[i]\n if (!el) return\n el.focus({ preventScroll: true })\n el.scrollIntoView({ block: 'nearest' })\n }, [])\n\n const openAndFocus = useCallback(\n (index?: number) => {\n setOpen(true)\n\n const next =\n typeof index === 'number'\n ? index\n : typeof initialIndex === 'number'\n ? initialIndex\n : findFirstEnabled(itemCount, isDisabled)\n\n setActiveIndex(next)\n requestAnimationFrame(() => focusItem(next))\n },\n [focusItem, initialIndex, isDisabled, itemCount, setOpen]\n )\n\n useEffect(() => {\n if (!open) return\n requestAnimationFrame(() => focusItem(activeIndex))\n }, [open, activeIndex, focusItem])\n\n const move = useCallback(\n (dir: 1 | -1) => {\n const next = findNextEnabled(activeIndex, dir, itemCount, isDisabled)\n setActiveIndex(next)\n requestAnimationFrame(() => focusItem(next))\n },\n [activeIndex, itemCount, isDisabled, focusItem]\n )\n\n const activate = useCallback(() => {\n const meta = makeMeta(activeIndex)\n if (meta.disabled) return\n meta.onActivate?.()\n }, [activeIndex, makeMeta])\n\n const onListKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (!open) return\n\n switch (e.key) {\n case 'Tab': {\n // ✅ fecha e deixa o browser focar o próximo\n // (e NÃO restaura foco pro trigger)\n onCloseByTab?.()\n setOpen(false)\n return\n }\n\n case 'ArrowDown':\n e.preventDefault()\n move(+1)\n return\n\n case 'ArrowUp':\n e.preventDefault()\n move(-1)\n return\n\n case 'Home': {\n e.preventDefault()\n const first = findFirstEnabled(itemCount, isDisabled)\n setActiveIndex(first)\n requestAnimationFrame(() => focusItem(first))\n return\n }\n\n case 'End': {\n e.preventDefault()\n let last = itemCount - 1\n for (let i = itemCount - 1; i >= 0; i--) {\n if (!isDisabled(i)) {\n last = i\n break\n }\n }\n setActiveIndex(last)\n requestAnimationFrame(() => focusItem(last))\n return\n }\n\n case 'Enter':\n case ' ': {\n e.preventDefault()\n activate()\n return\n }\n\n case 'Escape':\n e.preventDefault()\n setOpen(false)\n return\n\n case 'ArrowRight': {\n e.preventDefault()\n const meta = makeMeta(activeIndex)\n if (meta.hasChildren) meta.onOpenChildren?.()\n return\n }\n\n case 'ArrowLeft': {\n e.preventDefault()\n const meta = makeMeta(activeIndex)\n meta.onCloseChildren?.()\n return\n }\n }\n },\n [\n open,\n itemCount,\n activeIndex,\n move,\n setOpen,\n activate,\n makeMeta,\n focusItem,\n isDisabled,\n onCloseByTab\n ]\n )\n\n const getTriggerProps = useCallback(() => {\n return {\n onKeyDown: (e: React.KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ' || e.key === 'ArrowDown') {\n e.preventDefault()\n if (!open) openAndFocus()\n return\n }\n\n if (e.key === 'ArrowUp') {\n e.preventDefault()\n if (!open) openAndFocus(itemCount > 0 ? itemCount - 1 : 0)\n }\n }\n }\n }, [open, openAndFocus, itemCount])\n\n const getListProps = useCallback(() => {\n return {\n ref: (el: HTMLElement | null) => {\n listRef.current = el\n },\n onKeyDown: onListKeyDown\n }\n }, [onListKeyDown])\n\n const getItemProps = useCallback(\n (index: number) => {\n const isActive = index === activeIndex\n return {\n ref: (el: HTMLButtonElement | null) => {\n itemRefs.current[index] = el\n },\n tabIndex: isActive ? 0 : -1,\n 'data-active': isActive ? 'true' : 'false'\n } as const\n },\n [activeIndex]\n )\n\n return {\n activeIndex,\n getListProps,\n getItemProps,\n openAndFocus,\n setActiveIndex,\n getTriggerProps\n }\n}\n","// External Libraries\nimport { useState } from 'react'\n\n// Types\nimport type { SelectProps } from '../../types'\nimport { useCompositeListNavigation } from '@hooks/useCompositeListNavigation'\n\nexport function useSelect({\n value,\n options,\n multiple,\n disabled,\n canClear,\n onChange\n}: SelectProps) {\n // States\n const [open, setOpen] = useState(false)\n\n // Hooks\n const nav = useCompositeListNavigation({\n open,\n itemCount: options.length,\n setOpen: changeOpen,\n makeMeta: makeMeta\n })\n\n // Functions\n function handleOptionClick(option: string) {\n const isAlreadySelected = value.includes(option)\n\n if (!multiple) {\n if (isAlreadySelected) {\n if (canClear) onChange([])\n } else onChange([option])\n\n setOpen(false)\n return\n }\n\n if (isAlreadySelected) {\n if (value.length === 1) {\n if (canClear) onChange([])\n } else onChange(value.filter(v => v !== option))\n } else onChange([...value, option])\n }\n\n function makeMeta(index: number) {\n const opt = options[index]\n return {\n onActivate: () => {\n if (opt) handleOptionClick(opt.value)\n }\n }\n }\n\n function changeOpen(value: boolean) {\n setOpen(value)\n }\n\n function togglePanel() {\n if (disabled) return\n if (!open) nav.openAndFocus()\n }\n\n function closePanel() {\n setOpen(false)\n }\n\n return {\n nav,\n open,\n makeMeta,\n changeOpen,\n togglePanel,\n closePanel,\n handleOptionClick\n }\n}\n","import { styled } from '@hooks/useThemedStyles/types'\nimport type { SelectProps } from './types'\n\nexport function createSelectStyles(props: SelectProps) {\n return styled({\n container: {\n width: '100%',\n\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n\n rowGap: '0.375rem'\n },\n\n content: {\n width: '100%',\n height: '2.75rem',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n\n borderWidth: 1,\n columnGap: '0.25rem',\n borderRadius: '0.5rem',\n padding: '0.625rem 0.875rem',\n\n opacity: props.disabled || props.isLoading ? 0.5 : 1,\n cursor: props.isLoading\n ? 'progress'\n : props.disabled\n ? 'not-allowed'\n : 'pointer',\n boxShadow: 'var(--px-shadow-default)',\n borderColor: props.errorMessage\n ? 'var(--px-color-error)'\n : 'var(--px-border-primary)',\n\n __rules: {\n '&:focus-within': {\n outlineOffset: '-1px !important',\n outline: `2px solid var(${props.errorMessage ? '--px-color-error' : '--px-color-primary'}) !important`\n }\n }\n },\n\n text: {\n flex: 1,\n\n textAlign: 'left',\n\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n\n fontSize: '1rem',\n lineHeight: '1.5rem',\n fontFamily: 'inherit',\n fontWeight: props.value.length ? 500 : 400,\n color: props.value.length\n ? 'var(--px-text-primary)'\n : 'var(--px-text-secondary)'\n },\n\n panel: { width: '100%' },\n\n contentValueImage: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n columnGap: '0.25rem'\n },\n\n iconContainer: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n maxWidth: '1rem'\n }\n })\n}\n","import type {\n TextProps,\n LayoutProps,\n MarginProps,\n TypeStyles\n} from '@hooks/useThemedStyles/types'\nimport type { createSelectStyles } from './styles'\nimport type { FloatingOptions } from '@hooks/useFloating/types'\nimport type { PopoverProps } from '@components/commons/toolkit/Popover/types'\nimport type { Pagination } from '@components/commons/toolkit/ScrollPaginationContainer/types'\n\nexport interface SelectProps extends LayoutProps, MarginProps {\n label: string\n value: string[]\n placeholder?: string\n options: SelectOption[]\n isLoading?: boolean\n\n portalId?: PopoverProps['portalId']\n strategy?: FloatingOptions['strategy']\n scrollContainerId?: FloatingOptions['scrollContainerId']\n absoluteReference?: FloatingOptions['absoluteReference']\n placement?: FloatingOptions['placement']\n\n canClear?: boolean\n multiple?: boolean\n required?: boolean\n disabled?: boolean\n hideLabel?: boolean\n errorMessage?: string\n maxVisibleItems?: number\n maxHeightPopover?: string\n\n pagination?: Pagination\n\n startIcon?: React.ReactNode\n styles?: TypeStyles<typeof createSelectStyles>\n\n requiredColor?: string\n labelConfig?: TextProps\n\n onChange: (value: string[]) => void\n}\n\nexport interface SelectOption {\n label: string\n value: string\n startIcon?: React.ReactNode\n}\n","/** biome-ignore-all lint/a11y/useSemanticElements: It's a custom select component */\n// External Libraries\nimport type React from 'react'\nimport { useMemo } from 'react'\n\n// Components\nimport { OptionItem } from './components/OptionItem'\nimport { Icon } from '@components/commons/toolkit/Icon'\nimport { Label } from '@components/commons/toolkit/Label'\nimport { ErrorMessage } from '../../toolkit/ErrorMessage'\nimport { Loader } from '@components/commons/toolkit/Loader'\nimport { Typography } from '@components/commons/toolkit/Typography'\nimport { BasePopover } from '@components/commons/structure/BasePopover'\nimport { ScrollPaginationContainer } from '@components/commons/toolkit/ScrollPaginationContainer'\n\n// Hooks\nimport { useSelect } from './hooks/useSelect'\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { SelectProps } from './types'\nimport type { PopoverTriggerRenderProps } from '@components/commons/toolkit/Popover/types'\n\n// Styles\nimport { createSelectStyles } from './styles'\nimport { ScrollDirection } from '@components/commons/toolkit/ScrollPaginationContainer/types'\n\nexport * as SelectTypes from './types'\n\nexport const Select: React.FC<SelectProps> = props => {\n const { nav, open, changeOpen, handleOptionClick } = useSelect(props)\n const { styles, classes } = useThemedStyles(props, createSelectStyles, {\n pick: p => [p.disabled, p.errorMessage, p.value, p.isLoading],\n override: props.styles,\n applyCommonProps: true,\n commonSlot: 'container'\n })\n\n const maxVisible = props.maxVisibleItems ?? Infinity\n const optionsMap = useMemo(\n () =>\n new Map(\n props.options.map(option => [\n option.value,\n { label: option.label, startIcon: option.startIcon }\n ])\n ),\n [props.options]\n )\n\n // Functions\n function renderContent() {\n if (!props.value?.length) return props.placeholder\n\n const resolvedValues = props.value.map(\n val => optionsMap.get(val) ?? { label: val, startIcon: null }\n )\n const visibleItems = resolvedValues.slice(0, maxVisible)\n const hiddenCount = resolvedValues.length - visibleItems.length\n\n let result: React.ReactNode[] | string = []\n\n if (props.multiple) {\n result = visibleItems.map(i => i.label).join(', ')\n } else {\n result = visibleItems.map(i => (\n <span key={i.label} style={styles.contentValueImage}>\n {i.startIcon ? i.startIcon : null}\n <span style={styles.text}>{i.label}</span>\n </span>\n ))\n }\n\n if (typeof result === 'object' && hiddenCount > 0)\n result.push(<span key=\"hidden-count\">{hiddenCount}</span>)\n\n if (typeof result === 'string' && hiddenCount > 0)\n result = `${result} ${hiddenCount}`\n\n return result\n }\n\n function renderTrigger({\n ref,\n ariaExpanded,\n onClick\n }: PopoverTriggerRenderProps) {\n const triggerKeyProps = nav.getTriggerProps()\n\n return (\n <button\n ref={ref as React.RefObject<HTMLButtonElement>}\n dir=\"ltr\"\n type=\"button\"\n role=\"combobox\"\n style={styles.content}\n aria-autocomplete=\"none\"\n aria-label={props.label}\n className={classes.content}\n aria-expanded={ariaExpanded}\n disabled={props.disabled || props.isLoading}\n {...triggerKeyProps}\n onClick={onClick}\n >\n {props.value.length ? props.startIcon : null}\n\n <span id=\"text-content\" style={styles.text}>\n {renderContent()}\n </span>\n\n {props.isLoading ? (\n <Loader size=\"1rem\" color=\"var(--px-color-primary)\" />\n ) : (\n <div style={styles.iconContainer}>\n <Icon size=\"sm\" name=\"chevrons-down\" />\n </div>\n )}\n </button>\n )\n }\n\n function renderOptions() {\n if (props.options.length === 0) {\n return (\n <Typography variant=\"b2\" textAlign=\"center\">\n No options\n </Typography>\n )\n }\n\n return props.options.map((option, idx) => (\n <OptionItem\n key={option.value}\n option={option}\n onClick={handleOptionClick}\n isSelected={props.value.includes(option.value)}\n {...nav.getItemProps(idx)}\n />\n ))\n }\n\n return (\n <div style={styles.container}>\n {props.hideLabel ? null : (\n <Label\n label={props.label}\n required={props.required}\n requiredColor={props.requiredColor}\n {...props.labelConfig}\n />\n )}\n\n <BasePopover\n open={open}\n portalId={props.portalId}\n absoluteReference={props.absoluteReference}\n maxHeight={props.maxHeightPopover}\n floatingOptions={{\n viewportMargin: 0,\n strategy: props.strategy,\n placement: props.placement,\n scrollContainerId: props.scrollContainerId\n }}\n trigger={renderTrigger}\n onOpenChange={changeOpen}\n >\n <ScrollPaginationContainer\n fillFlex\n direction={ScrollDirection.Vertical}\n verticalPagination={props.pagination}\n >\n <div style={styles.panel} role=\"listbox\" {...nav.getListProps()}>\n {renderOptions()}\n </div>\n </ScrollPaginationContainer>\n </BasePopover>\n\n {props.errorMessage ? (\n <ErrorMessage message={props.errorMessage} />\n ) : null}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;AAGA,SAAgB,oBACd,OACA;CACA,MAAM,EAAE,eAAe;CACvB,MAAM,WAAW,MAAM,mBAAmB;AAG1C,QAAO,OAAO;EACZ,WAAW;GACT,OAAO;GAEP,SAAS;GACT,YAAY;GACZ,WAAW;GAEX,cAAc;GACd,SAAS;GAET,QAAQ;GACR,YAAY;GAEZ,iBAhBgB,cAAc,WAiB1B,oCACA;GAEJ,SAAS;IACP,WAAW,EACT,iBAAiB,8CAClB;IAED,WAAW;KACT,eAAe;KACf,SAAS;KACV;IACF;GACF;EAED,MAAM;GACJ,MAAM;GAEN,UAAU;GACV,YAAY;GACZ,YAAY;GACZ,YAAY;GACZ,OAAO;GAEP,UAAU;GACV,YAAY;GACZ,cAAc;GACf;EAED,eAAe;GACb,SAAS;GACT,eAAe;GACf,YAAY;GACZ,WAAW;GACZ;EACF,CAAC;;;;;AC1CJ,MAAa,aAAa,YAGvB,OAAO,QAAQ;CAChB,MAAM,EAAE,QAAQ,YAAY,gBAAgB,OAAO,oBAAoB;CAEvE,MAAM,EAAE,QAAQ,YAAY,SAAS,GAAG,SAAS;AAEjD,QACE,oBAAC;EACC,GAAI;EACC;EACL,MAAK;EACL,MAAK;EACL,OAAO,OAAO;EACd,WAAW,QAAQ;EACnB,cA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AU,GAAI,IAAI,cAAc;gBAC5D,eAAe;OACZ;MACoB;KAChB;GAEb,MAAM,eACL,oBAAC,gBAAa,SAAS,MAAM,eAAgB,GAC3C;;GACA"}
1
+ {"version":3,"file":"Select-DCtpaxaW.js","names":["value","Select: React.FC<SelectProps>","result: React.ReactNode[] | string"],"sources":["../src/components/commons/inputs/Select/components/OptionItem/styles.ts","../src/components/commons/inputs/Select/components/OptionItem/index.tsx","../src/hooks/useCompositeListNavigation/index.ts","../src/components/commons/inputs/Select/hooks/useSelect/index.ts","../src/components/commons/inputs/Select/styles.ts","../src/components/commons/inputs/Select/types.ts","../src/components/commons/inputs/Select/index.tsx"],"sourcesContent":["import type { OptionItemProps } from './types'\nimport { styled } from '@hooks/useThemedStyles/types'\n\nexport function createOptionsStyles(\n props: OptionItemProps & { ['data-active']?: string }\n) {\n const { isSelected } = props\n const isActive = props['data-active'] === 'true'\n const highlighted = isSelected || isActive\n\n return styled({\n container: {\n width: '100%',\n\n display: 'flex',\n alignItems: 'center',\n textAlign: 'left',\n\n borderRadius: '0.25rem',\n padding: '0.5rem 0.75rem',\n\n cursor: 'pointer',\n transition: 'background-color 0.2s ease-out',\n\n backgroundColor: highlighted\n ? 'var(--px-background-card-hover)'\n : 'transparent',\n\n __rules: {\n '&:hover': {\n backgroundColor: 'var(--px-background-card-hover) !important'\n },\n\n '&:focus': {\n outlineOffset: '-2px',\n outline: '2px solid var(--px-color-primary)'\n }\n }\n },\n\n text: {\n flex: 1,\n\n fontSize: '1rem',\n fontWeight: 500,\n lineHeight: '1.5rem',\n fontFamily: 'inherit',\n color: 'var(--px-text-primary)',\n\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis'\n },\n\n optionContent: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n columnGap: '0.25rem'\n }\n })\n}\n","/** biome-ignore-all lint/a11y/useSemanticElements: It's a custom select component */\nimport type React from 'react'\nimport { forwardRef } from 'react'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { OptionItemProps } from './types'\n\n// Styles\nimport { createOptionsStyles } from './styles'\n\ntype NativeButtonProps = Omit<\n React.ComponentPropsWithoutRef<'button'>,\n 'onClick'\n>\n\nexport const OptionItem = forwardRef<\n HTMLButtonElement,\n OptionItemProps & NativeButtonProps\n>((props, ref) => {\n const { styles, classes } = useThemedStyles(props, createOptionsStyles)\n\n const { option, isSelected, onClick, ...rest } = props\n\n return (\n <button\n {...rest}\n ref={ref}\n type=\"button\"\n role=\"option\"\n style={styles.container}\n className={classes.container}\n aria-label={option.label}\n aria-selected={isSelected}\n onClick={() => onClick(option.value)}\n >\n <div style={styles.optionContent}>\n {option.startIcon}\n <span style={styles.text}> {option.label}</span>\n </div>\n </button>\n )\n})\n\nOptionItem.displayName = 'OptionItem'\n","// External Libraries\nimport { useCallback, useEffect, useRef, useState } from 'react'\n\nexport type CompositeItemMeta = {\n disabled?: boolean\n hasChildren?: boolean\n onActivate?: () => void\n onOpenChildren?: () => void\n onCloseChildren?: () => void\n}\n\ntype Params = {\n open: boolean\n itemCount: number\n initialIndex?: number\n onCloseByTab?: () => void\n setOpen: (v: boolean) => void\n makeMeta: (index: number) => CompositeItemMeta\n}\n\nfunction findNextEnabled(\n start: number,\n dir: 1 | -1,\n count: number,\n isDisabled: (i: number) => boolean\n) {\n if (count <= 0) return 0\n let i = start\n for (let step = 0; step < count; step++) {\n i = (i + dir + count) % count\n if (!isDisabled(i)) return i\n }\n return start\n}\n\nfunction findFirstEnabled(count: number, isDisabled: (i: number) => boolean) {\n for (let i = 0; i < count; i++) if (!isDisabled(i)) return i\n return 0\n}\n\nexport function useCompositeListNavigation({\n open,\n itemCount,\n initialIndex,\n setOpen,\n makeMeta,\n onCloseByTab\n}: Params) {\n const listRef = useRef<HTMLElement | null>(null)\n const itemRefs = useRef<Array<HTMLButtonElement | null>>([])\n\n const isDisabled = useCallback(\n (i: number) => !!makeMeta(i).disabled,\n [makeMeta]\n )\n\n const [activeIndex, setActiveIndex] = useState(0)\n\n const focusItem = useCallback((i: number) => {\n const el = itemRefs.current[i]\n if (!el) return\n el.focus({ preventScroll: true })\n el.scrollIntoView({ block: 'nearest' })\n }, [])\n\n const openAndFocus = useCallback(\n (index?: number) => {\n setOpen(true)\n\n const next =\n typeof index === 'number'\n ? index\n : typeof initialIndex === 'number'\n ? initialIndex\n : findFirstEnabled(itemCount, isDisabled)\n\n setActiveIndex(next)\n requestAnimationFrame(() => focusItem(next))\n },\n [focusItem, initialIndex, isDisabled, itemCount, setOpen]\n )\n\n useEffect(() => {\n if (!open) return\n requestAnimationFrame(() => focusItem(activeIndex))\n }, [open, activeIndex, focusItem])\n\n const move = useCallback(\n (dir: 1 | -1) => {\n const next = findNextEnabled(activeIndex, dir, itemCount, isDisabled)\n setActiveIndex(next)\n requestAnimationFrame(() => focusItem(next))\n },\n [activeIndex, itemCount, isDisabled, focusItem]\n )\n\n const activate = useCallback(() => {\n const meta = makeMeta(activeIndex)\n if (meta.disabled) return\n meta.onActivate?.()\n }, [activeIndex, makeMeta])\n\n const onListKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (!open) return\n\n switch (e.key) {\n case 'Tab': {\n // ✅ fecha e deixa o browser focar o próximo\n // (e NÃO restaura foco pro trigger)\n onCloseByTab?.()\n setOpen(false)\n return\n }\n\n case 'ArrowDown':\n e.preventDefault()\n move(+1)\n return\n\n case 'ArrowUp':\n e.preventDefault()\n move(-1)\n return\n\n case 'Home': {\n e.preventDefault()\n const first = findFirstEnabled(itemCount, isDisabled)\n setActiveIndex(first)\n requestAnimationFrame(() => focusItem(first))\n return\n }\n\n case 'End': {\n e.preventDefault()\n let last = itemCount - 1\n for (let i = itemCount - 1; i >= 0; i--) {\n if (!isDisabled(i)) {\n last = i\n break\n }\n }\n setActiveIndex(last)\n requestAnimationFrame(() => focusItem(last))\n return\n }\n\n case 'Enter':\n case ' ': {\n e.preventDefault()\n activate()\n return\n }\n\n case 'Escape':\n e.preventDefault()\n setOpen(false)\n return\n\n case 'ArrowRight': {\n e.preventDefault()\n const meta = makeMeta(activeIndex)\n if (meta.hasChildren) meta.onOpenChildren?.()\n return\n }\n\n case 'ArrowLeft': {\n e.preventDefault()\n const meta = makeMeta(activeIndex)\n meta.onCloseChildren?.()\n return\n }\n }\n },\n [\n open,\n itemCount,\n activeIndex,\n move,\n setOpen,\n activate,\n makeMeta,\n focusItem,\n isDisabled,\n onCloseByTab\n ]\n )\n\n const getTriggerProps = useCallback(() => {\n return {\n onKeyDown: (e: React.KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ' || e.key === 'ArrowDown') {\n e.preventDefault()\n if (!open) openAndFocus()\n return\n }\n\n if (e.key === 'ArrowUp') {\n e.preventDefault()\n if (!open) openAndFocus(itemCount > 0 ? itemCount - 1 : 0)\n }\n }\n }\n }, [open, openAndFocus, itemCount])\n\n const getListProps = useCallback(() => {\n return {\n ref: (el: HTMLElement | null) => {\n listRef.current = el\n },\n onKeyDown: onListKeyDown\n }\n }, [onListKeyDown])\n\n const getItemProps = useCallback(\n (index: number) => {\n const isActive = index === activeIndex\n return {\n ref: (el: HTMLButtonElement | null) => {\n itemRefs.current[index] = el\n },\n tabIndex: isActive ? 0 : -1,\n 'data-active': isActive ? 'true' : 'false'\n } as const\n },\n [activeIndex]\n )\n\n return {\n activeIndex,\n getListProps,\n getItemProps,\n openAndFocus,\n setActiveIndex,\n getTriggerProps\n }\n}\n","// External Libraries\nimport { useState } from 'react'\n\n// Types\nimport type { SelectProps } from '../../types'\nimport { useCompositeListNavigation } from '@hooks/useCompositeListNavigation'\n\nexport function useSelect({\n value,\n options,\n multiple,\n disabled,\n canClear,\n onChange\n}: SelectProps) {\n // States\n const [open, setOpen] = useState(false)\n\n // Hooks\n const nav = useCompositeListNavigation({\n open,\n itemCount: options.length,\n setOpen: changeOpen,\n makeMeta: makeMeta\n })\n\n // Functions\n function handleOptionClick(option: string) {\n const isAlreadySelected = value.includes(option)\n\n if (!multiple) {\n if (isAlreadySelected) {\n if (canClear) onChange([])\n } else onChange([option])\n\n setOpen(false)\n return\n }\n\n if (isAlreadySelected) {\n if (value.length === 1) {\n if (canClear) onChange([])\n } else onChange(value.filter(v => v !== option))\n } else onChange([...value, option])\n }\n\n function makeMeta(index: number) {\n const opt = options[index]\n return {\n onActivate: () => {\n if (opt) handleOptionClick(opt.value)\n }\n }\n }\n\n function changeOpen(value: boolean) {\n setOpen(value)\n }\n\n function togglePanel() {\n if (disabled) return\n if (!open) nav.openAndFocus()\n }\n\n function closePanel() {\n setOpen(false)\n }\n\n return {\n nav,\n open,\n makeMeta,\n changeOpen,\n togglePanel,\n closePanel,\n handleOptionClick\n }\n}\n","import { styled } from '@hooks/useThemedStyles/types'\nimport type { SelectProps } from './types'\n\nexport function createSelectStyles(props: SelectProps) {\n return styled({\n container: {\n width: '100%',\n\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n\n rowGap: '0.375rem'\n },\n\n content: {\n width: '100%',\n height: '2.75rem',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n\n borderWidth: 1,\n columnGap: '0.25rem',\n borderRadius: '0.5rem',\n padding: '0.625rem 0.875rem',\n\n opacity: props.disabled || props.isLoading ? 0.5 : 1,\n cursor: props.isLoading\n ? 'progress'\n : props.disabled\n ? 'not-allowed'\n : 'pointer',\n boxShadow: 'var(--px-shadow-default)',\n borderColor: props.errorMessage\n ? 'var(--px-color-error)'\n : 'var(--px-border-primary)',\n\n __rules: {\n '&:focus-within': {\n outlineOffset: '-1px !important',\n outline: `2px solid var(${props.errorMessage ? '--px-color-error' : '--px-color-primary'}) !important`\n }\n }\n },\n\n text: {\n flex: 1,\n\n textAlign: 'left',\n\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n\n fontSize: '1rem',\n lineHeight: '1.5rem',\n fontFamily: 'inherit',\n fontWeight: props.value.length ? 500 : 400,\n color: props.value.length\n ? 'var(--px-text-primary)'\n : 'var(--px-text-secondary)'\n },\n\n panel: { width: '100%' },\n\n contentValueImage: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n columnGap: '0.25rem'\n },\n\n iconContainer: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n maxWidth: '1rem'\n }\n })\n}\n","import type {\n TextProps,\n LayoutProps,\n MarginProps,\n TypeStyles\n} from '@hooks/useThemedStyles/types'\nimport type { createSelectStyles } from './styles'\nimport type { FloatingOptions } from '@hooks/useFloating/types'\nimport type { PopoverProps } from '@components/commons/toolkit/Popover/types'\nimport type { Pagination } from '@components/commons/toolkit/ScrollPaginationContainer/types'\n\nexport interface SelectProps extends LayoutProps, MarginProps {\n label: string\n value: string[]\n placeholder?: string\n options: SelectOption[]\n isLoading?: boolean\n\n portalId?: PopoverProps['portalId']\n strategy?: FloatingOptions['strategy']\n scrollContainerId?: FloatingOptions['scrollContainerId']\n absoluteReference?: FloatingOptions['absoluteReference']\n placement?: FloatingOptions['placement']\n\n canClear?: boolean\n multiple?: boolean\n required?: boolean\n disabled?: boolean\n hideLabel?: boolean\n errorMessage?: string\n maxVisibleItems?: number\n maxHeightPopover?: string\n\n pagination?: Pagination\n\n startIcon?: React.ReactNode\n styles?: TypeStyles<typeof createSelectStyles>\n\n requiredColor?: string\n labelConfig?: TextProps\n\n onChange: (value: string[]) => void\n}\n\nexport interface SelectOption {\n label: string\n value: string\n startIcon?: React.ReactNode\n}\n","/** biome-ignore-all lint/a11y/useSemanticElements: It's a custom select component */\n// External Libraries\nimport type React from 'react'\nimport { useMemo } from 'react'\n\n// Components\nimport { OptionItem } from './components/OptionItem'\nimport { Icon } from '@components/commons/toolkit/Icon'\nimport { Label } from '@components/commons/toolkit/Label'\nimport { ErrorMessage } from '../../toolkit/ErrorMessage'\nimport { Loader } from '@components/commons/toolkit/Loader'\nimport { Typography } from '@components/commons/toolkit/Typography'\nimport { BasePopover } from '@components/commons/structure/BasePopover'\nimport { ScrollPaginationContainer } from '@components/commons/toolkit/ScrollPaginationContainer'\n\n// Hooks\nimport { useSelect } from './hooks/useSelect'\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { SelectProps } from './types'\nimport type { PopoverTriggerRenderProps } from '@components/commons/toolkit/Popover/types'\n\n// Styles\nimport { createSelectStyles } from './styles'\nimport { ScrollDirection } from '@components/commons/toolkit/ScrollPaginationContainer/types'\n\nexport * as SelectTypes from './types'\n\nexport const Select: React.FC<SelectProps> = props => {\n const { nav, open, changeOpen, handleOptionClick } = useSelect(props)\n const { styles, classes } = useThemedStyles(props, createSelectStyles, {\n pick: p => [p.disabled, p.errorMessage, p.value, p.isLoading],\n override: props.styles,\n applyCommonProps: true,\n commonSlot: 'container'\n })\n\n const maxVisible = props.maxVisibleItems ?? Infinity\n const optionsMap = useMemo(\n () =>\n new Map(\n props.options.map(option => [\n option.value,\n { label: option.label, startIcon: option.startIcon }\n ])\n ),\n [props.options]\n )\n\n // Functions\n function renderContent() {\n if (!props.value?.length) return props.placeholder\n\n const resolvedValues = props.value.map(\n val => optionsMap.get(val) ?? { label: val, startIcon: null }\n )\n const visibleItems = resolvedValues.slice(0, maxVisible)\n const hiddenCount = resolvedValues.length - visibleItems.length\n\n let result: React.ReactNode[] | string = []\n\n if (props.multiple) {\n result = visibleItems.map(i => i.label).join(', ')\n } else {\n result = visibleItems.map(i => (\n <span key={i.label} style={styles.contentValueImage}>\n {i.startIcon ? i.startIcon : null}\n <span style={styles.text}>{i.label}</span>\n </span>\n ))\n }\n\n if (typeof result === 'object' && hiddenCount > 0)\n result.push(<span key=\"hidden-count\">{hiddenCount}</span>)\n\n if (typeof result === 'string' && hiddenCount > 0)\n result = `${result} ${hiddenCount}`\n\n return result\n }\n\n function renderTrigger({\n ref,\n ariaExpanded,\n onClick\n }: PopoverTriggerRenderProps) {\n const triggerKeyProps = nav.getTriggerProps()\n\n return (\n <button\n ref={ref as React.RefObject<HTMLButtonElement>}\n dir=\"ltr\"\n type=\"button\"\n role=\"combobox\"\n style={styles.content}\n aria-autocomplete=\"none\"\n aria-label={props.label}\n className={classes.content}\n aria-expanded={ariaExpanded}\n disabled={props.disabled || props.isLoading}\n {...triggerKeyProps}\n onClick={onClick}\n >\n {props.value.length ? props.startIcon : null}\n\n <span id=\"text-content\" style={styles.text}>\n {renderContent()}\n </span>\n\n {props.isLoading ? (\n <Loader size=\"1rem\" color=\"var(--px-color-primary)\" />\n ) : (\n <div style={styles.iconContainer}>\n <Icon size=\"sm\" name=\"chevrons-down\" />\n </div>\n )}\n </button>\n )\n }\n\n function renderOptions() {\n if (props.options.length === 0) {\n return (\n <Typography variant=\"b2\" textAlign=\"center\">\n No options\n </Typography>\n )\n }\n\n return props.options.map((option, idx) => (\n <OptionItem\n key={option.value}\n option={option}\n onClick={handleOptionClick}\n isSelected={props.value.includes(option.value)}\n {...nav.getItemProps(idx)}\n />\n ))\n }\n\n return (\n <div style={styles.container}>\n {props.hideLabel ? null : (\n <Label\n label={props.label}\n required={props.required}\n requiredColor={props.requiredColor}\n {...props.labelConfig}\n />\n )}\n\n <BasePopover\n open={open}\n portalId={props.portalId}\n absoluteReference={props.absoluteReference}\n maxHeight={props.maxHeightPopover}\n floatingOptions={{\n viewportMargin: 0,\n strategy: props.strategy,\n placement: props.placement,\n scrollContainerId: props.scrollContainerId\n }}\n trigger={renderTrigger}\n onOpenChange={changeOpen}\n >\n <ScrollPaginationContainer\n fillFlex\n direction={ScrollDirection.Vertical}\n verticalPagination={props.pagination}\n >\n <div style={styles.panel} role=\"listbox\" {...nav.getListProps()}>\n {renderOptions()}\n </div>\n </ScrollPaginationContainer>\n </BasePopover>\n\n {props.errorMessage ? (\n <ErrorMessage message={props.errorMessage} />\n ) : null}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;AAGA,SAAgB,oBACd,OACA;CACA,MAAM,EAAE,eAAe;CACvB,MAAM,WAAW,MAAM,mBAAmB;AAG1C,QAAO,OAAO;EACZ,WAAW;GACT,OAAO;GAEP,SAAS;GACT,YAAY;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GAAK,WAAU;aAAS;IAE/B;AAIjB,SAAO,MAAM,QAAQ,KAAK,QAAQ,QAChC,oBAAC;GAES;GACR,SAAS;GACT,YAAY,MAAM,MAAM,SAAS,OAAO,MAAM;GAC9C,GAAI,IAAI,aAAa,IAAI;KAJpB,OAAO,MAKZ,CACF;;AAGJ,QACE,qBAAC;EAAI,OAAO,OAAO;;GAChB,MAAM,YAAY,OACjB,oBAAC;IACC,OAAO,MAAM;IACb,UAAU,MAAM;IAChB,eAAe,MAAM;IACrB,GAAI,MAAM;KACV;GAGJ,oBAAC;IACO;IACN,UAAU,MAAM;IAChB,mBAAmB,MAAM;IACzB,WAAW,MAAM;IACjB,iBAAiB;KACf,gBAAgB;KAChB,UAAU,MAAM;KAChB,WAAW,MAAM;KACjB,mBAAmB,MAAM;KAC1B;IACD,SAAS;IACT,cAAc;cAEd,oBAAC;KACC;KACA,WAAW,gBAAgB;KAC3B,oBAAoB,MAAM;eAE1B,oBAAC;MAAI,OAAO,OAAO;MAAO,MAAK;MAAU,GAAI,IAAI,cAAc;gBAC5D,eAAe;OACZ;MACoB;KAChB;GAEb,MAAM,eACL,oBAAC,gBAAa,SAAS,MAAM,eAAgB,GAC3C;;GACA"}
@@ -1,6 +1,6 @@
1
1
  import "./useThemedStyles-Dco_54KA.js";
2
2
  import "./Typography-D1dxTP-6.js";
3
- import "./Icon-lVgQoCFP.js";
4
- import { t as CheckItem } from "./CheckItem-C4uiE7u4.js";
3
+ import "./Icon-bV19y393.js";
4
+ import { t as CheckItem } from "./CheckItem-D45HN7Ir.js";
5
5
 
6
6
  export { CheckItem };
package/dist/checkbox.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./useThemedStyles-Dco_54KA.js";
2
2
  import "./Typography-D1dxTP-6.js";
3
- import "./Icon-lVgQoCFP.js";
4
- import { t as Checkbox } from "./Checkbox-z5m8nxGi.js";
3
+ import "./Icon-bV19y393.js";
4
+ import { t as Checkbox } from "./Checkbox-ClKDCBdz.js";
5
5
 
6
6
  export { Checkbox };
@@ -1,2 +1,2 @@
1
- import { n as types_d_exports, t as ContextMenu } from "./index-Bo6Mz8jJ.js";
1
+ import { n as types_d_exports, t as ContextMenu } from "./index-R4SFv1ug.js";
2
2
  export { ContextMenu, types_d_exports as ContextMenuTypes };
@@ -3,8 +3,8 @@ import "./Typography-D1dxTP-6.js";
3
3
  import "./useDismiss-Dpzg5Xpf.js";
4
4
  import "./useFloating-D-2IDIWG.js";
5
5
  import "./Popover-BV_1hBez.js";
6
- import "./Icon-lVgQoCFP.js";
7
- import { n as types_exports, t as DatePicker } from "./DatePicker-24h82Qqd.js";
6
+ import "./Icon-bV19y393.js";
7
+ import { n as types_exports, t as DatePicker } from "./DatePicker-BtPT01Vt.js";
8
8
  import "./BasePopover-aHgl90XE.js";
9
9
  import "./Label-lzG8Cp8P.js";
10
10
  import "./ErrorMessage-kAHOafpg.js";
@@ -1,2 +1,2 @@
1
- import { n as types_d_exports, t as FileInput } from "./index-CHsvpknw.js";
1
+ import { n as types_d_exports, t as FileInput } from "./index-DDF3jbpO.js";
2
2
  export { FileInput, types_d_exports as FileInputTypes };
@@ -1,8 +1,8 @@
1
1
  import "./useThemedStyles-Dco_54KA.js";
2
2
  import "./Typography-D1dxTP-6.js";
3
- import "./Icon-lVgQoCFP.js";
3
+ import "./Icon-bV19y393.js";
4
4
  import "./Label-lzG8Cp8P.js";
5
5
  import "./ErrorMessage-kAHOafpg.js";
6
- import { n as types_exports, t as FileInput } from "./FileInput-C6N2PiPi.js";
6
+ import { n as types_exports, t as FileInput } from "./FileInput-CFaWGwh1.js";
7
7
 
8
8
  export { FileInput, types_exports as FileInputTypes };
@@ -1,7 +1,7 @@
1
1
  import { t as CommonStyleProps } from "./styleProps-Bq2PkDym.js";
2
2
  import { r as TypeStyles } from "./useThemedStyles-DoHwc6h5.js";
3
3
  import { ReactNode } from "react";
4
- import * as react_jsx_runtime1 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
5
5
 
6
6
  //#region src/components/commons/toolkit/TabSwitch/styles.d.ts
7
7
  declare function createTabSwitchStyles<T>(props: TabSwitchProps<T>): {
@@ -47,7 +47,7 @@ interface TabSwitchProps<T> extends CommonStyleProps {
47
47
  }
48
48
  //#endregion
49
49
  //#region src/components/commons/toolkit/TabSwitch/index.d.ts
50
- declare const TabSwitch: <T>(props: TabSwitchProps<T>) => react_jsx_runtime1.JSX.Element;
50
+ declare const TabSwitch: <T>(props: TabSwitchProps<T>) => react_jsx_runtime0.JSX.Element;
51
51
  //#endregion
52
52
  export { types_d_exports as n, TabSwitch as t };
53
- //# sourceMappingURL=index-BBmC9Lfb.d.ts.map
53
+ //# sourceMappingURL=index-BQRzf4rc.d.ts.map
@@ -27,7 +27,7 @@ declare function createSelectStyles(props: SelectProps): {
27
27
  opacity: number;
28
28
  cursor: "not-allowed" | "pointer" | "progress";
29
29
  boxShadow: "var(--px-shadow-default)";
30
- borderColor: "var(--px-color-error)" | "var(--px-border-primary)";
30
+ borderColor: "var(--px-border-primary)" | "var(--px-color-error)";
31
31
  __rules: {
32
32
  '&:focus-within': {
33
33
  outlineOffset: string;
@@ -102,4 +102,4 @@ interface SelectOption {
102
102
  declare const Select: React$1.FC<SelectProps>;
103
103
  //#endregion
104
104
  export { types_d_exports as n, Select as t };
105
- //# sourceMappingURL=index-DlVdtSCT.d.ts.map
105
+ //# sourceMappingURL=index-DAAEXO7G.d.ts.map
@@ -12,6 +12,7 @@ interface FileInputProps extends MarginProps, PaddingProps, LayoutProps {
12
12
  required?: boolean;
13
13
  errorMessage?: string;
14
14
  borderVariant?: 'solid' | 'dashed';
15
+ variantFileCard?: 'default' | 'badge';
15
16
  maxFileSizeInMB?: number;
16
17
  acceptedExtensions?: string[];
17
18
  onFileChange: (files: File[]) => void;
@@ -21,4 +22,4 @@ interface FileInputProps extends MarginProps, PaddingProps, LayoutProps {
21
22
  declare const FileInput: React.FC<FileInputProps>;
22
23
  //#endregion
23
24
  export { types_d_exports as n, FileInput as t };
24
- //# sourceMappingURL=index-CHsvpknw.d.ts.map
25
+ //# sourceMappingURL=index-DDF3jbpO.d.ts.map
@@ -22,7 +22,7 @@ declare function createInputStyles(props: InputProps): {
22
22
  padding: string;
23
23
  opacity: number;
24
24
  boxShadow: "var(--px-shadow-default)";
25
- borderColor: "var(--px-color-error)" | "var(--px-border-primary)";
25
+ borderColor: "var(--px-border-primary)" | "var(--px-color-error)";
26
26
  __rules: {
27
27
  '&:focus-within': {
28
28
  outlineOffset: string;
@@ -103,4 +103,4 @@ interface InputMethods {
103
103
  declare const Input: react0.ForwardRefExoticComponent<InputProps & react0.RefAttributes<InputMethods>>;
104
104
  //#endregion
105
105
  export { Input as t };
106
- //# sourceMappingURL=index-C31Z2a2S.d.ts.map
106
+ //# sourceMappingURL=index-DFfPk9_X.d.ts.map
@@ -27,7 +27,7 @@ declare function createTextAreaStyles(props: TextAreaProps): {
27
27
  fontWeight: "400";
28
28
  fontSize: string;
29
29
  color: "var(--px-text-primary)";
30
- borderColor: "var(--px-color-error)" | "var(--px-border-primary)";
30
+ borderColor: "var(--px-border-primary)" | "var(--px-color-error)";
31
31
  outlineOffset: string;
32
32
  cursor: "default" | undefined;
33
33
  __rules: {
@@ -70,4 +70,4 @@ interface TextAreaProps {
70
70
  declare const TextArea: (props: TextAreaProps) => react_jsx_runtime0.JSX.Element;
71
71
  //#endregion
72
72
  export { TextArea as t };
73
- //# sourceMappingURL=index-Q90gI7Q2.d.ts.map
73
+ //# sourceMappingURL=index-Ll44Zh-u.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { r as TypeStyles } from "./useThemedStyles-DoHwc6h5.js";
2
2
  import { n as Placement } from "./types-CsM6b8c5.js";
3
3
  import { ReactNode } from "react";
4
- import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
5
5
 
6
6
  //#region src/components/commons/toolkit/ContextMenu/styles.d.ts
7
7
  declare function createContextMenuStyles<T>(_props: ContextMenuProps<T>): {
@@ -68,7 +68,7 @@ interface ContextMenuProps<T> {
68
68
  }
69
69
  //#endregion
70
70
  //#region src/components/commons/toolkit/ContextMenu/index.d.ts
71
- declare const ContextMenu: <T extends string>(props: ContextMenuProps<T>) => react_jsx_runtime0.JSX.Element;
71
+ declare const ContextMenu: <T extends string>(props: ContextMenuProps<T>) => react_jsx_runtime1.JSX.Element;
72
72
  //#endregion
73
73
  export { types_d_exports as n, ContextMenu as t };
74
- //# sourceMappingURL=index-Bo6Mz8jJ.d.ts.map
74
+ //# sourceMappingURL=index-R4SFv1ug.d.ts.map
package/dist/index.d.ts CHANGED
@@ -4,13 +4,13 @@ import { t as IconButton } from "./index-2zCiMZnT.js";
4
4
  import { n as types_d_exports$1, t as ColorPicker } from "./index-CLDq1eQr.js";
5
5
  import { n as types_d_exports$5 } from "./types-vfa_y8KH.js";
6
6
  import { n as types_d_exports$3, t as DatePicker } from "./index-UoeT_1nR.js";
7
- import { n as types_d_exports$4, t as FileInput } from "./index-CHsvpknw.js";
7
+ import { n as types_d_exports$4, t as FileInput } from "./index-DDF3jbpO.js";
8
8
  import { n as Locale, r as MaskType, t as MaskModule } from "./index-CSRzYxDc.js";
9
- import { t as Input } from "./index-C31Z2a2S.js";
9
+ import { t as Input } from "./index-DFfPk9_X.js";
10
10
  import { t as SearchInput } from "./index-MyZ_XVsH.js";
11
- import { n as types_d_exports$6, t as Select } from "./index-DlVdtSCT.js";
11
+ import { n as types_d_exports$6, t as Select } from "./index-DAAEXO7G.js";
12
12
  import { t as index_d_exports } from "./index-CriBmhqv.js";
13
- import { t as TextArea } from "./index-Q90gI7Q2.js";
13
+ import { t as TextArea } from "./index-Ll44Zh-u.js";
14
14
  import { t as Popover } from "./index-tivXt3ba.js";
15
15
  import { t as BasePopover } from "./index-BKsKKh1p.js";
16
16
  import { t as Breadcrumb } from "./index-CBHEtmuG.js";
@@ -20,12 +20,12 @@ import { t as Checkbox } from "./index-DlP2AWaD.js";
20
20
  import { r as types_d_exports } from "./types-Db3dpdVw.js";
21
21
  import { Chip } from "./chip.js";
22
22
  import { t as ChipList } from "./index-CdGHX8AR.js";
23
- import { n as types_d_exports$2, t as ContextMenu } from "./index-Bo6Mz8jJ.js";
23
+ import { n as types_d_exports$2, t as ContextMenu } from "./index-R4SFv1ug.js";
24
24
  import { InfoSummary, InfoSummaryItem, InfoSummaryProps } from "./info-summary.js";
25
25
  import { t as Pagination } from "./index-D5kC89SC.js";
26
26
  import { ScrollPaginationContainer } from "./scroll-pagination-container.js";
27
27
  import { t as Switch } from "./index-B0g1F3X4.js";
28
- import { n as types_d_exports$7, t as TabSwitch } from "./index-BBmC9Lfb.js";
28
+ import { n as types_d_exports$7, t as TabSwitch } from "./index-BQRzf4rc.js";
29
29
  import { Typography } from "./typography.js";
30
30
  import { a as ThemeName, c as ThemeRegistry, i as ThemeMode, l as ThemeTokens, n as useTheme, o as ThemePersistence, r as ThemeContextData, s as ThemeProviderProps, t as ThemeProvider } from "./index-DPmfBsga.js";
31
31
  import { useDismiss } from "./use-dismiss.js";
package/dist/index.js CHANGED
@@ -4,12 +4,12 @@ import { t as Typography } from "./Typography-D1dxTP-6.js";
4
4
  import { t as useDismiss } from "./useDismiss-Dpzg5Xpf.js";
5
5
  import { t as useFloating } from "./useFloating-D-2IDIWG.js";
6
6
  import { n as types_exports$5, t as Popover } from "./Popover-BV_1hBez.js";
7
- import "./Icon-lVgQoCFP.js";
8
- import { t as Checkbox } from "./Checkbox-z5m8nxGi.js";
9
- import { n as types_exports$3, t as DatePicker } from "./DatePicker-24h82Qqd.js";
7
+ import "./Icon-bV19y393.js";
8
+ import { t as Checkbox } from "./Checkbox-ClKDCBdz.js";
9
+ import { n as types_exports$3, t as DatePicker } from "./DatePicker-BtPT01Vt.js";
10
10
  import { n as useTheme, t as ThemeProvider } from "./ThemeContext-CRVo1wLa.js";
11
11
  import { n as types_exports$8, t as TabSwitch } from "./TabSwitch-2PNcQRsB.js";
12
- import { t as CheckItem } from "./CheckItem-C4uiE7u4.js";
12
+ import { t as CheckItem } from "./CheckItem-D45HN7Ir.js";
13
13
  import { t as InfoSummary } from "./InfoSummary-BLsz7swQ.js";
14
14
  import { t as BasePopover } from "./BasePopover-aHgl90XE.js";
15
15
  import { n as types_exports$2, t as ContextMenu } from "./ContextMenu-DOIbV9BE.js";
@@ -18,18 +18,18 @@ import "./Label-lzG8Cp8P.js";
18
18
  import "./ErrorMessage-kAHOafpg.js";
19
19
  import { t as ChipList } from "./ChipList-DLehs_z2.js";
20
20
  import { t as IconButton } from "./IconButton-izpMeHBl.js";
21
- import { t as Pagination } from "./Pagination-DPX_O37l.js";
21
+ import { t as Pagination } from "./Pagination-CqVu9N0h.js";
22
22
  import "./Loader-D21KyoAr.js";
23
23
  import { t as Button } from "./Button-BnPQoBEH.js";
24
24
  import { n as types_exports$6, t as ScrollPaginationContainer } from "./ScrollPaginationContainer-C_VJlEww.js";
25
25
  import { a as Locale, o as MaskType, s as MaskModule } from "./MaskModule-DKpEoLUF.js";
26
- import { t as Input } from "./Input-C9pWx1Y7.js";
27
- import { n as types_exports$7, t as Select } from "./Select-CUqDDNwI.js";
26
+ import { t as Input } from "./Input-sl0cRZUS.js";
27
+ import { n as types_exports$7, t as Select } from "./Select-DCtpaxaW.js";
28
28
  import { t as TextArea } from "./TextArea-NeN7ynND.js";
29
- import { t as SearchInput } from "./SearchInput-WHXwVu4s.js";
29
+ import { t as SearchInput } from "./SearchInput-BdscRWx2.js";
30
30
  import { n as types_exports$1, t as ColorPicker } from "./ColorPicker-v5ULLhFP.js";
31
31
  import { t as Skeleton } from "./Skeleton-pvWAx_gn.js";
32
- import { n as types_exports$4, t as FileInput } from "./FileInput-C6N2PiPi.js";
32
+ import { n as types_exports$4, t as FileInput } from "./FileInput-CFaWGwh1.js";
33
33
  import { useVirtualAnchor } from "./use-virtual-anchor.js";
34
34
  import { t as Breadcrumb } from "./Breadcrumb-CBCBNcIC.js";
35
35
 
package/dist/input.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { t as Input } from "./index-C31Z2a2S.js";
1
+ import { t as Input } from "./index-DFfPk9_X.js";
2
2
  export { Input };
package/dist/input.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import "./useThemedStyles-Dco_54KA.js";
2
2
  import "./Typography-D1dxTP-6.js";
3
- import "./Icon-lVgQoCFP.js";
3
+ import "./Icon-bV19y393.js";
4
4
  import "./Label-lzG8Cp8P.js";
5
5
  import "./ErrorMessage-kAHOafpg.js";
6
6
  import "./MaskModule-DKpEoLUF.js";
7
- import { t as Input } from "./Input-C9pWx1Y7.js";
7
+ import { t as Input } from "./Input-sl0cRZUS.js";
8
8
 
9
9
  export { Input };
@@ -1,8 +1,8 @@
1
1
  import "./useThemedStyles-Dco_54KA.js";
2
2
  import "./Typography-D1dxTP-6.js";
3
- import "./Icon-lVgQoCFP.js";
3
+ import "./Icon-bV19y393.js";
4
4
  import "./IconButton-izpMeHBl.js";
5
- import { t as Pagination } from "./Pagination-DPX_O37l.js";
5
+ import { t as Pagination } from "./Pagination-CqVu9N0h.js";
6
6
  import "./Loader-D21KyoAr.js";
7
7
  import "./Button-BnPQoBEH.js";
8
8
 
@@ -1,7 +1,7 @@
1
1
  import "./useThemedStyles-Dco_54KA.js";
2
2
  import "./Typography-D1dxTP-6.js";
3
- import "./Icon-lVgQoCFP.js";
3
+ import "./Icon-bV19y393.js";
4
4
  import "./Label-lzG8Cp8P.js";
5
- import { t as SearchInput } from "./SearchInput-WHXwVu4s.js";
5
+ import { t as SearchInput } from "./SearchInput-BdscRWx2.js";
6
6
 
7
7
  export { SearchInput };
package/dist/select.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import "./types-vfa_y8KH.js";
2
- import { n as types_d_exports, t as Select } from "./index-DlVdtSCT.js";
2
+ import { n as types_d_exports, t as Select } from "./index-DAAEXO7G.js";
3
3
  import "./index-CriBmhqv.js";
4
4
  export { Select, types_d_exports as SelectTypes };
package/dist/select.js CHANGED
@@ -3,12 +3,12 @@ import "./Typography-D1dxTP-6.js";
3
3
  import "./useDismiss-Dpzg5Xpf.js";
4
4
  import "./useFloating-D-2IDIWG.js";
5
5
  import "./Popover-BV_1hBez.js";
6
- import "./Icon-lVgQoCFP.js";
6
+ import "./Icon-bV19y393.js";
7
7
  import "./BasePopover-aHgl90XE.js";
8
8
  import "./Label-lzG8Cp8P.js";
9
9
  import "./ErrorMessage-kAHOafpg.js";
10
10
  import "./Loader-D21KyoAr.js";
11
11
  import "./ScrollPaginationContainer-C_VJlEww.js";
12
- import { n as types_exports, t as Select } from "./Select-CUqDDNwI.js";
12
+ import { n as types_exports, t as Select } from "./Select-DCtpaxaW.js";
13
13
 
14
14
  export { Select, types_exports as SelectTypes };
@@ -1,2 +1,2 @@
1
- import { n as types_d_exports, t as TabSwitch } from "./index-BBmC9Lfb.js";
1
+ import { n as types_d_exports, t as TabSwitch } from "./index-BQRzf4rc.js";
2
2
  export { TabSwitch, types_d_exports as TabSwitchTypes };
@@ -1,2 +1,2 @@
1
- import { t as TextArea } from "./index-Q90gI7Q2.js";
1
+ import { t as TextArea } from "./index-Ll44Zh-u.js";
2
2
  export { TextArea };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "softable-pixels-web",
3
- "version": "1.2.29",
3
+ "version": "1.2.30",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "softable",
@@ -1 +0,0 @@
1
- {"version":3,"file":"FileInput-C6N2PiPi.js","names":["RemoveButton: React.FC<RemoveButtonProps>","FileCard: React.FC<FileCardProps>","FileInput: React.FC<FileInputProps>"],"sources":["../src/components/commons/inputs/FileInput/components/FileCard/components/RemoveButton/styles.ts","../src/components/commons/inputs/FileInput/components/FileCard/components/RemoveButton/index.tsx","../src/components/commons/inputs/FileInput/components/FileCard/styles.ts","../src/components/commons/inputs/FileInput/components/FileCard/index.tsx","../src/components/commons/inputs/FileInput/constants.ts","../src/components/commons/inputs/FileInput/hooks/useFileInput/index.tsx","../src/components/commons/inputs/FileInput/styles.ts","../src/components/commons/inputs/FileInput/types.ts","../src/components/commons/inputs/FileInput/index.tsx"],"sourcesContent":["import { styled } from '@hooks/useThemedStyles/types'\n\nexport function createRemoveButtonStyles() {\n return styled({\n container: {\n position: 'absolute',\n top: 0,\n right: 0,\n cursor: 'pointer',\n\n padding: 2,\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n\n borderColor: 'var(--px-border-primary)',\n borderWidth: 1,\n borderRadius: 40,\n backgroundColor: 'var(--px-bg)',\n\n transform: 'translateY(-50%) translateX(50%)'\n }\n })\n}\n","// Components\nimport { Icon } from '@components/commons/toolkit/Icon'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { RemoveButtonProps } from './types'\n\n// Styles\nimport { createRemoveButtonStyles } from './styles'\n\nexport const RemoveButton: React.FC<RemoveButtonProps> = ({ onClick }) => {\n // Hooks\n const { styles } = useThemedStyles({}, createRemoveButtonStyles)\n\n return (\n <button type=\"button\" style={styles.container} onClick={onClick}>\n <Icon name=\"general-close\" size=\"xs\" color=\"var(--color-error)\" />\n </button>\n )\n}\n","import { styled } from '@hooks/useThemedStyles/types'\n\nexport function createFileCardStyles() {\n return styled({\n container: {\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n rowGap: 4\n },\n content: {\n position: 'relative',\n width: 80,\n height: 60,\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n\n borderColor: 'var(--px-border-primary)',\n borderWidth: 1,\n borderRadius: 8\n }\n })\n}\n","// Components\nimport { Icon } from '@components/commons/toolkit/Icon'\nimport { Typography } from '@components/commons/toolkit/Typography'\nimport { RemoveButton } from './components/RemoveButton'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { FileCardProps } from './types'\n\n// Styles\nimport { createFileCardStyles } from './styles'\n\nexport const FileCard: React.FC<FileCardProps> = ({ file, onRemoveClick }) => {\n // Hooks\n const { styles } = useThemedStyles({}, createFileCardStyles)\n\n // Functions\n function renderName() {\n if (file.name.length <= 10) return file.name\n return `${file.name.substring(0, 10)}...`\n }\n\n return (\n <div style={styles.container}>\n <div style={styles.content}>\n <RemoveButton onClick={onRemoveClick} />\n\n <Icon name=\"general-file\" />\n </div>\n\n <Typography variant=\"b3\" color=\"var(--px-text-primary)\">\n {renderName()}\n </Typography>\n </div>\n )\n}\n","export const MAX_FILE_SIZE_IN_MB = 5\nexport const BYTES_IN_MB = 1024 * 1024\n","// External Libraries\nimport { useRef, useState } from 'react'\n\n// Constants\nimport { BYTES_IN_MB, MAX_FILE_SIZE_IN_MB } from '../../constants'\n\n// Types\nimport type { FileInputProps } from '../../types'\n\nexport function useFileInput({\n files,\n multiple,\n maxFileSizeInMB = MAX_FILE_SIZE_IN_MB,\n acceptedExtensions,\n onFileChange\n}: FileInputProps) {\n // Refs\n const inputRef = useRef<HTMLInputElement>(null)\n\n // Constants\n const accept = acceptedExtensions?.map(extension => `.${extension}`).join(',')\n const maxFileSizeInBytes = maxFileSizeInMB * BYTES_IN_MB\n\n // States\n const [isDragging, setIsDragging] = useState(false)\n\n // Functions\n function handleInputClick(e: React.MouseEvent) {\n e.stopPropagation()\n\n if (inputRef.current) inputRef.current.value = ''\n inputRef.current?.click()\n }\n\n function handleFileChange(e: React.ChangeEvent<HTMLInputElement>) {\n const selectedFiles = Array.from(e.target.files ?? [])\n\n if (!selectedFiles.length) return\n\n const validFiles = selectedFiles.filter(isSizeAllowed)\n\n if (!validFiles.length) return\n\n if (multiple) {\n onFileChange([...(files ?? []), ...validFiles])\n } else {\n onFileChange([validFiles[0]])\n }\n }\n\n function handleFileDrop(e: React.DragEvent<HTMLButtonElement>) {\n e.preventDefault()\n e.stopPropagation()\n\n setIsDragging(false)\n\n const droppedFiles = Array.from(e.dataTransfer.files)\n\n if (!droppedFiles.length) return\n\n const allowedFiles = droppedFiles.filter(file => isSizeAllowed(file))\n\n if (multiple) {\n onFileChange([...files, ...allowedFiles])\n } else {\n onFileChange([allowedFiles[0]])\n }\n }\n\n function handleDragEnter(e: React.DragEvent<HTMLButtonElement>) {\n e.preventDefault()\n e.stopPropagation()\n\n setIsDragging(true)\n }\n\n function handleDragOver(e: React.DragEvent<HTMLButtonElement>) {\n e.preventDefault()\n e.stopPropagation()\n }\n\n function handleDragLeave(e: React.DragEvent<HTMLButtonElement>) {\n e.preventDefault()\n e.stopPropagation()\n\n setIsDragging(false)\n }\n\n function handleRemoveClick(file: File) {\n const filesSet = new Set(files)\n filesSet.delete(file)\n const nextFiles = Array.from(filesSet)\n onFileChange(nextFiles)\n }\n\n function isSizeAllowed(file: File) {\n return file.size <= maxFileSizeInBytes\n }\n\n return {\n accept,\n inputRef,\n isDragging,\n maxFileSizeInMB,\n handleFileDrop,\n handleDragOver,\n handleDragEnter,\n handleDragLeave,\n handleFileChange,\n handleInputClick,\n handleRemoveClick\n }\n}\n","// Types\nimport type { FileInputProps } from './types'\nimport { styled } from '@hooks/useThemedStyles/types'\n\ninterface Props extends FileInputProps {\n isDragging: boolean\n}\n\nexport function createFileInputStyles(props: Props) {\n return styled({\n container: {\n width: '100%',\n\n display: 'flex',\n flexDirection: 'column',\n rowGap: 12\n },\n wrapper: {\n width: '100%',\n height: '100%',\n\n display: 'flex',\n flexDirection: 'column',\n rowGap: 8\n },\n input: {\n width: '100%',\n height: '100%',\n\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n rowGap: 8,\n\n paddingTop: 24,\n paddingBottom: 24,\n paddingLeft: 40,\n paddingRight: 40,\n\n borderColor: props.isDragging\n ? 'var(--px-color-primary)'\n : 'var(--px-border-primary)',\n borderWidth: 1,\n borderStyle: props.isDragging\n ? 'dashed'\n : (props.borderVariant ?? 'solid'),\n borderRadius: 16,\n\n cursor: props.isDragging ? 'grabbing' : 'pointer',\n\n __rules: {\n '&:hover': {\n borderColor: 'var(--px-color-primary) !important'\n }\n }\n },\n icon: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n padding: 12,\n border: '1px solid var(--px-border-primary)',\n borderRadius: 'var(--px-radius-lg)',\n boxShadow: 'var(--px-shadow-xs)',\n pointerEvents: 'none'\n },\n title: {\n display: 'flex',\n alignItems: 'center',\n columnGap: 4,\n pointerEvents: 'none'\n },\n description: {\n pointerEvents: 'none'\n },\n files: {\n display: 'flex',\n alignItems: 'center',\n columnGap: 16\n }\n })\n}\n","import type {\n LayoutProps,\n MarginProps,\n PaddingProps\n} from '@hooks/useThemedStyles/types'\n\nexport interface FileInputProps extends MarginProps, PaddingProps, LayoutProps {\n files: File[]\n label?: string\n multiple?: boolean\n required?: boolean\n errorMessage?: string\n borderVariant?: 'solid' | 'dashed'\n maxFileSizeInMB?: number\n acceptedExtensions?: string[]\n onFileChange: (files: File[]) => void\n}\n","// External Libraries\nimport type React from 'react'\n\n// Components\nimport { FileCard } from './components/FileCard'\nimport { Icon } from '@components/commons/toolkit/Icon'\nimport { Label } from '@components/commons/toolkit/Label'\nimport { Typography } from '@components/commons/toolkit/Typography'\n\n// Hooks\nimport { useFileInput } from './hooks/useFileInput'\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { FileInputProps } from './types'\n\n// Styles\nimport { createFileInputStyles } from './styles'\nimport { ErrorMessage } from '@components/commons/toolkit/ErrorMessage'\n\nexport * as FileInputTypes from './types'\n\nexport const FileInput: React.FC<FileInputProps> = props => {\n // Constants\n const { files, multiple, acceptedExtensions } = props\n\n // Hooks\n const {\n accept,\n inputRef,\n isDragging,\n maxFileSizeInMB,\n handleFileDrop,\n handleDragOver,\n handleDragEnter,\n handleDragLeave,\n handleFileChange,\n handleInputClick,\n handleRemoveClick\n } = useFileInput(props)\n const { styles } = useThemedStyles(\n { ...props, isDragging },\n createFileInputStyles,\n {\n applyCommonProps: true,\n pick: p => [p.files, p.isDragging]\n }\n )\n\n // Functions\n function renderExtensions() {\n if (!acceptedExtensions) return ''\n\n const extensions = acceptedExtensions\n .map(extension => `.${extension}`)\n .join(', ')\n return `Formatos aceitos: ${extensions}`\n }\n\n function renderSeparator() {\n return acceptedExtensions && maxFileSizeInMB ? ' - ' : ''\n }\n\n function renderMaxAllowedSize() {\n return `Tamanho máximo ${maxFileSizeInMB} MB`\n }\n\n function renderFiles() {\n return files.map(file => (\n <FileCard\n key={file.name}\n file={file}\n onRemoveClick={() => handleRemoveClick(file)}\n />\n ))\n }\n\n return (\n <div style={styles.container}>\n {props.label ? (\n <Label\n label={props.label}\n required={props.required}\n htmlFor=\"fileInput\"\n />\n ) : null}\n\n <div style={styles.wrapper}>\n <button\n type=\"button\"\n style={styles.input}\n onClick={handleInputClick}\n onDrop={handleFileDrop}\n onDragOver={handleDragOver}\n onDragEnter={handleDragEnter}\n onDragLeave={handleDragLeave}\n >\n <div style={styles.icon}>\n <Icon name=\"general-upload\" />\n </div>\n\n <div style={styles.title}>\n <Typography\n variant=\"b1\"\n color=\"var(--px-color-primary)\"\n fontWeight=\"bold\"\n >\n Clique para carregar\n </Typography>\n\n <Typography variant=\"b1\">ou arraste um arquivo</Typography>\n </div>\n\n <div style={styles.description}>\n <Typography variant=\"b2\" color=\"var(--px-text-primary)\">\n {renderExtensions()}\n\n {renderSeparator()}\n\n {renderMaxAllowedSize()}\n </Typography>\n </div>\n\n <input\n hidden\n type=\"file\"\n id=\"fileInput\"\n ref={inputRef}\n accept={accept}\n multiple={multiple}\n onChange={handleFileChange}\n />\n </button>\n\n {props.errorMessage ? (\n <ErrorMessage message={props.errorMessage} />\n ) : null}\n </div>\n\n <div style={styles.files}>{renderFiles()}</div>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;AAEA,SAAgB,2BAA2B;AACzC,QAAO,OAAO,EACZ,WAAW;EACT,UAAU;EACV,KAAK;EACL,OAAO;EACP,QAAQ;EAER,SAAS;EACT,SAAS;EACT,gBAAgB;EAChB,YAAY;EAEZ,aAAa;EACb,aAAa;EACb,cAAc;EACd,iBAAiB;EAEjB,WAAW;EACZ,EACF,CAAC;;;;;ACVJ,MAAaA,g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BAAuB;AAC9B,SAAO,kBAAkB,gBAAgB;;CAG3C,SAAS,cAAc;AACrB,SAAO,MAAM,KAAI,SACf,oBAAC;GAEO;GACN,qBAAqB,kBAAkB,KAAK;KAFvC,KAAK,KAGV,CACF;;AAGJ,QACE,qBAAC;EAAI,OAAO,OAAO;;GAChB,MAAM,QACL,oBAAC;IACC,OAAO,MAAM;IACb,UAAU,MAAM;IAChB,SAAQ;KACR,GACA;GAEJ,qBAAC;IAAI,OAAO,OAAO;eACjB,qBAAC;KACC,MAAK;KACL,OAAO,OAAO;KACd,SAAS;KACT,QAAQ;KACR,YAAY;KACZ,aAAa;KACb,aAAa;;MAEb,oBAAC;OAAI,OAAO,OAAO;iBACjB,oBAAC,QAAK,MAAK,mBAAmB;QAC1B;MAEN,qBAAC;OAAI,OAAO,OAAO;kBACjB,oBAAC;QACC,SAAQ;QACR,OAAM;QACN,YAAW;kBACZ;SAEY,EAEb,oBAAC;QAAW,SAAQ;kBAAK;SAAkC;QACvD;MAEN,oBAAC;OAAI,OAAO,OAAO;iBACjB,qBAAC;QAAW,SAAQ;QAAK,OAAM;;SAC5B,kBAAkB;SAElB,iBAAiB;SAEjB,sBAAsB;;SACZ;QACT;MAEN,oBAAC;OACC;OACA,MAAK;OACL,IAAG;OACH,KAAK;OACG;OACE;OACV,UAAU;QACV;;MACK,EAER,MAAM,eACL,oBAAC,gBAAa,SAAS,MAAM,eAAgB,GAC3C;KACA;GAEN,oBAAC;IAAI,OAAO,OAAO;cAAQ,aAAa;KAAO;;GAC3C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Icon-lVgQoCFP.js","names":["ICON_SIZE_MAP: Record<string, CSSProperties>","IconLoaders"],"sources":["../src/assets/icons/__generated__/arrows/arrow-right.tsx","../src/assets/icons/__generated__/general/calendar.tsx","../src/assets/icons/__generated__/general/check.tsx","../src/assets/icons/__generated__/general/clock.tsx","../src/assets/icons/__generated__/general/close.tsx","../src/assets/icons/__generated__/chevrons/double-left.tsx","../src/assets/icons/__generated__/chevrons/double-right.tsx","../src/assets/icons/__generated__/chevrons/down.tsx","../src/assets/icons/__generated__/general/eye.tsx","../src/assets/icons/__generated__/general/eye-off.tsx","../src/assets/icons/__generated__/brands/facebook.tsx","../src/assets/icons/__generated__/brands/facebook-fit.tsx","../src/assets/icons/__generated__/general/file.tsx","../src/assets/icons/__generated__/brands/google.tsx","../src/assets/icons/__generated__/chevrons/left.tsx","../src/assets/icons/__generated__/chevrons/right.tsx","../src/assets/icons/__generated__/general/search.tsx","../src/assets/icons/__generated__/chevrons/up.tsx","../src/assets/icons/__generated__/general/upload.tsx","../src/assets/icons/index.tsx","../src/components/commons/toolkit/Icon/constants.ts","../src/components/commons/toolkit/Icon/style.ts","../src/components/commons/toolkit/Icon/index.tsx"],"sourcesContent":["// Auto-generated from arrows/arrow-right.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type ArrowRightProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const ArrowRight = ({ title, ...props }: ArrowRightProps) => (\n<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n<path d=\"M4 12H20M20 12L14 6M20 12L14 18\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n <title>{title ?? 'arrow-right'}</title>\n</svg>\n)\n","// Auto-generated from general/calendar.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type CalendarProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const Calendar = ({ title, ...props }: CalendarProps) => (\n<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" {...props}>\n<path d=\"M14 6.66683H2M10.6667 1.3335V4.00016M5.33333 1.3335V4.00016M5.2 14.6668H10.8C11.9201 14.6668 12.4802 14.6668 12.908 14.4488C13.2843 14.2571 13.5903 13.9511 13.782 13.5748C14 13.147 14 12.5869 14 11.4668V5.86683C14 4.74672 14 4.18667 13.782 3.75885C13.5903 3.38252 13.2843 3.07656 12.908 2.88482C12.4802 2.66683 11.9201 2.66683 10.8 2.66683H5.2C4.0799 2.66683 3.51984 2.66683 3.09202 2.88482C2.71569 3.07656 2.40973 3.38252 2.21799 3.75885C2 4.18667 2 4.74672 2 5.86683V11.4668C2 12.5869 2 13.147 2.21799 13.5748C2.40973 13.9511 2.71569 14.2571 3.09202 14.4488C3.51984 14.6668 4.0799 14.6668 5.2 14.6668Z\" stroke=\"currentColor\" strokeWidth={1.5} strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n <title>{title ?? 'calendar'}</title>\n</svg>\n)\n","// Auto-generated from general/check.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type CheckProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const Check = ({ title, ...props }: CheckProps) => (\n<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\" {...props}>\n <title>{title ?? 'check'}</title><polyline points=\"20 6 9 17 4 12\"></polyline></svg>\n)\n","// Auto-generated from general/clock.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type ClockProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const Clock = ({ title, ...props }: ClockProps) => (\n<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n<path d=\"M12 6V12L16 14M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n <title>{title ?? 'clock'}</title>\n</svg>\n)\n","// Auto-generated from general/close.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type CloseProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const Close = ({ title, ...props }: CloseProps) => (\n<svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.5} strokeLinecap=\"round\" strokeLinejoin=\"round\" {...props}>\n <title>{title ?? 'close'}</title>\n<line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n<line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\">\n</line>\n</svg>\n)\n","// Auto-generated from chevrons/double-left.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type DoubleLeftProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const DoubleLeft = ({ title, ...props }: DoubleLeftProps) => (\n<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\" {...props}><path d=\"M11 17l-5-5 5-5M18 17l-5-5 5-5\"/>\n <title>{title ?? 'double-left'}</title></svg>\n)\n","// Auto-generated from chevrons/double-right.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type DoubleRightProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const DoubleRight = ({ title, ...props }: DoubleRightProps) => (\n<svg viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n<path d=\"M6 17L11 12L6 7M13 17L18 12L13 7\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n <title>{title ?? 'double-right'}</title>\n</svg>\n)\n","// Auto-generated from chevrons/down.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type DownProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const Down = ({ title, ...props }: DownProps) => (\n<svg viewBox=\"0 0 16 16\" fill=\"none\" {...props}>\n<path d=\"M4 6L8 10L12 6\" stroke=\"currentColor\" strokeWidth={1.5} strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n <title>{title ?? 'down'}</title>\n</svg>\n)\n","// Auto-generated from general/eye.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type EyeProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const Eye = ({ title, ...props }: EyeProps) => (\n<svg viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n<path d=\"M2.42012 12.7132C2.28394 12.4975 2.21584 12.3897 2.17772 12.2234C2.14909 12.0985 2.14909 11.9015 2.17772 11.7766C2.21584 11.6103 2.28394 11.5025 2.42012 11.2868C3.54553 9.50484 6.8954 5 12.0004 5C17.1054 5 20.4553 9.50484 21.5807 11.2868C21.7169 11.5025 21.785 11.6103 21.8231 11.7766C21.8517 11.9015 21.8517 12.0985 21.8231 12.2234C21.785 12.3897 21.7169 12.4975 21.5807 12.7132C20.4553 14.4952 17.1054 19 12.0004 19C6.8954 19 3.54553 14.4952 2.42012 12.7132Z\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n <title>{title ?? 'eye'}</title>\n<path d=\"M12.0004 15C13.6573 15 15.0004 13.6569 15.0004 12C15.0004 10.3431 13.6573 9 12.0004 9C10.3435 9 9.0004 10.3431 9.0004 12C9.0004 13.6569 10.3435 15 12.0004 15Z\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n</svg>\n)\n","// Auto-generated from general/eye-off.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type EyeOffProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const EyeOff = ({ title, ...props }: EyeOffProps) => (\n<svg viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n<path d=\"M10.7429 5.09232C11.1494 5.03223 11.5686 5 12.0004 5C17.1054 5 20.4553 9.50484 21.5807 11.2868C21.7169 11.5025 21.785 11.6103 21.8231 11.7767C21.8518 11.9016 21.8517 12.0987 21.8231 12.2236C21.7849 12.3899 21.7164 12.4985 21.5792 12.7156C21.2793 13.1901 20.8222 13.8571 20.2165 14.5805M6.72432 6.71504C4.56225 8.1817 3.09445 10.2194 2.42111 11.2853C2.28428 11.5019 2.21587 11.6102 2.17774 11.7765C2.1491 11.9014 2.14909 12.0984 2.17771 12.2234C2.21583 12.3897 2.28393 12.4975 2.42013 12.7132C3.54554 14.4952 6.89541 19 12.0004 19C14.0588 19 15.8319 18.2676 17.2888 17.2766M3.00042 3L21.0004 21M9.8791 9.87868C9.3362 10.4216 9.00042 11.1716 9.00042 12C9.00042 13.6569 10.3436 15 12.0004 15C12.8288 15 13.5788 14.6642 14.1217 14.1213\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n <title>{title ?? 'eye-off'}</title>\n</svg>\n)\n","// Auto-generated from brands/facebook.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type FacebookProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const Facebook = ({ title, ...props }: FacebookProps) => (\n<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" {...props}>\n<path d=\"M16 8C16 11.9927 13.0707 15.3027 9.24667 15.9033V10.328H11.106L11.46 8.02133H9.24667V6.52467C9.24667 5.89333 9.556 5.27867 10.5467 5.27867H11.5527V3.31467C11.5527 3.31467 10.6393 3.15867 9.76667 3.15867C7.944 3.15867 6.75333 4.26333 6.75333 6.26267V8.02067H4.72733V10.3273H6.75333V15.9027C2.93 15.3013 0 11.992 0 8C0 3.582 3.582 0 8 0C12.418 0 16 3.58133 16 8Z\" fill=\"currentColor\"/>\n <title>{title ?? 'facebook'}</title>\n</svg>\n)\n","// Auto-generated from brands/facebook-fit.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type FacebookFitProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const FacebookFit = ({ title, ...props }: FacebookFitProps) => (\n<svg viewBox=\"0 0 1024 1024\" id=\"facebook\" {...props}>\n <path fill=\"#1877f2\" d=\"M1024,512C1024,229.23016,794.76978,0,512,0S0,229.23016,0,512c0,255.554,187.231,467.37012,432,505.77777V660H302V512H432V399.2C432,270.87982,508.43854,200,625.38922,200,681.40765,200,740,210,740,210V336H675.43713C611.83508,336,592,375.46667,592,415.95728V512H734L711.3,660H592v357.77777C836.769,979.37012,1024,767.554,1024,512Z\"></path>\n <title>{title ?? 'facebook-fit'}</title>\n <path fill=\"#fff\" d=\"M711.3,660,734,512H592V415.95728C592,375.46667,611.83508,336,675.43713,336H740V210s-58.59235-10-114.61078-10C508.43854,200,432,270.87982,432,399.2V512H302V660H432v357.77777a517.39619,517.39619,0,0,0,160,0V660Z\"></path>\n</svg>\n)\n","// Auto-generated from general/file.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type FileProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const File = ({ title, ...props }: FileProps) => (\n<svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.5} strokeLinecap=\"round\" strokeLinejoin=\"round\" {...props}>\n<path d=\"M14 2H6a2 2 0 0 0-2 2v16c0 1.1.9 2 2 2h12a2 2 0 0 0 2-2V8l-6-6z\"/>\n <title>{title ?? 'file'}</title>\n<path d=\"M14 3v5h5M16 13H8M16 17H8M10 9H8\"/>\n</svg>\n)\n","// Auto-generated from brands/google.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type GoogleProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const Google = ({ title, ...props }: GoogleProps) => (\n<svg width=\"800px\" height=\"800px\" viewBox=\"-3 0 262 262\" version=\"1.1\" preserveAspectRatio=\"xMidYMid\" {...props}>\n\t<g>\n\t\t<path d=\"M255.878,133.451 C255.878,122.717 255.007,114.884 253.122,106.761 L130.55,106.761 L130.55,155.209 L202.497,155.209 C201.047,167.249 193.214,185.381 175.807,197.565 L175.563,199.187 L214.318,229.21 L217.003,229.478 C241.662,206.704 255.878,173.196 255.878,133.451\" fill=\"#4285F4\"></path>\n <title>{title ?? 'google'}</title>\n\t\t<path d=\"M130.55,261.1 C165.798,261.1 195.389,249.495 217.003,229.478 L175.807,197.565 C164.783,205.253 149.987,210.62 130.55,210.62 C96.027,210.62 66.726,187.847 56.281,156.37 L54.75,156.5 L14.452,187.687 L13.925,189.152 C35.393,231.798 79.49,261.1 130.55,261.1\" fill=\"#34A853\"></path>\n\t\t<path d=\"M56.281,156.37 C53.525,148.247 51.93,139.543 51.93,130.55 C51.93,121.556 53.525,112.853 56.136,104.73 L56.063,103 L15.26,71.312 L13.925,71.947 C5.077,89.644 0,109.517 0,130.55 C0,151.583 5.077,171.455 13.925,189.152 L56.281,156.37\" fill=\"#FBBC05\"></path>\n\t\t<path d=\"M130.55,50.479 C155.064,50.479 171.6,61.068 181.029,69.917 L217.873,33.943 C195.245,12.91 165.798,0 130.55,0 C79.49,0 35.393,29.301 13.925,71.947 L56.136,104.73 C66.726,73.253 96.027,50.479 130.55,50.479\" fill=\"#EB4335\"></path>\n\t</g>\n</svg>\n)\n","// Auto-generated from chevrons/left.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type LeftProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const Left = ({ title, ...props }: LeftProps) => (\n<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\" {...props}><path d=\"M15 18l-6-6 6-6\"/>\n <title>{title ?? 'left'}</title></svg>\n)\n","// Auto-generated from chevrons/right.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type RightProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const Right = ({ title, ...props }: RightProps) => (\n<svg viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n<path d=\"M9 18L15 12L9 6\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n <title>{title ?? 'right'}</title>\n</svg>\n)\n","// Auto-generated from general/search.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type SearchProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const Search = ({ title, ...props }: SearchProps) => (\n<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n<path d=\"M21 21L17.5001 17.5M20 11.5C20 16.1944 16.1944 20 11.5 20C6.80558 20 3 16.1944 3 11.5C3 6.80558 6.80558 3 11.5 3C16.1944 3 20 6.80558 20 11.5Z\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n <title>{title ?? 'search'}</title>\n</svg>\n)\n","// Auto-generated from chevrons/up.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type UpProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const Up = ({ title, ...props }: UpProps) => (\n<svg viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n<path d=\"M18 15L12 9L6 15\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n <title>{title ?? 'up'}</title>\n</svg>\n)\n","// Auto-generated from general/upload.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type UploadProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const Upload = ({ title, ...props }: UploadProps) => (\n<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" {...props}>\n<path d=\"M6.66699 13.3333L10.0003 10M10.0003 10L13.3337 13.3333M10.0003 10V17.5M16.667 13.9524C17.6849 13.1117 18.3337 11.8399 18.3337 10.4167C18.3337 7.88536 16.2816 5.83333 13.7503 5.83333C13.5682 5.83333 13.3979 5.73833 13.3054 5.58145C12.2187 3.73736 10.2124 2.5 7.91699 2.5C4.46521 2.5 1.66699 5.29822 1.66699 8.75C1.66699 10.4718 2.3632 12.0309 3.48945 13.1613\" stroke=\"currentColor\" strokeWidth={1.66667} strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n <title>{title ?? 'upload'}</title>\n</svg>\n)\n","// Auto-generated by generate-icon-components.sh. Do not edit manually.\n/** biome-ignore-all lint/suspicious/noShadowRestrictedNames: generated */\n\nimport { ArrowRight } from './__generated__/arrows/arrow-right'\nimport { Calendar } from './__generated__/general/calendar'\nimport { Check } from './__generated__/general/check'\nimport { Clock } from './__generated__/general/clock'\nimport { Close } from './__generated__/general/close'\nimport { DoubleLeft } from './__generated__/chevrons/double-left'\nimport { DoubleRight } from './__generated__/chevrons/double-right'\nimport { Down } from './__generated__/chevrons/down'\nimport { Eye } from './__generated__/general/eye'\nimport { EyeOff } from './__generated__/general/eye-off'\nimport { Facebook } from './__generated__/brands/facebook'\nimport { FacebookFit } from './__generated__/brands/facebook-fit'\nimport { File } from './__generated__/general/file'\nimport { Google } from './__generated__/brands/google'\nimport { Left } from './__generated__/chevrons/left'\nimport { Right } from './__generated__/chevrons/right'\nimport { Search } from './__generated__/general/search'\nimport { Up } from './__generated__/chevrons/up'\nimport { Upload } from './__generated__/general/upload'\n\nconst icons = {\n 'arrows-arrow-right': <ArrowRight />,\n 'brands-facebook': <Facebook />,\n 'brands-facebook-fit': <FacebookFit />,\n 'brands-google': <Google />,\n 'chevrons-double-left': <DoubleLeft />,\n 'chevrons-double-right': <DoubleRight />,\n 'chevrons-down': <Down />,\n 'chevrons-left': <Left />,\n 'chevrons-right': <Right />,\n 'chevrons-up': <Up />,\n 'general-calendar': <Calendar />,\n 'general-check': <Check />,\n 'general-clock': <Clock />,\n 'general-close': <Close />,\n 'general-eye': <Eye />,\n 'general-eye-off': <EyeOff />,\n 'general-file': <File />,\n 'general-search': <Search />,\n 'general-upload': <Upload />,\n}\n\nexport type IconName = keyof typeof icons\nexport default icons\n","// External Libraries\nimport type { CSSProperties } from \"react\";\n\nexport const ICON_SIZE_MAP: Record<string, CSSProperties> = {\n xs: {\n width: '0.75rem',\n height: '0.75rem'\n },\n sm: {\n width: '1rem',\n height: '1rem'\n },\n md: {\n width: '1.25rem',\n height: '1.25rem'\n },\n lg: {\n width: '1.5rem',\n height: '1.5rem'\n },\n xl: {\n width: '1.75rem',\n height: '1.75rem'\n },\n '2xl': {\n width: '2rem',\n height: '2rem'\n },\n '3xl': {\n width: '2.5rem',\n height: '2.5rem'\n }\n} as const","// Types\nimport type { IconProps } from './types'\n\n// Utils\nimport { ICON_SIZE_MAP } from './constants'\nimport { styled } from '@hooks/useThemedStyles/types'\n\nexport function createIconStyles(props: IconProps) {\n const { color, size = 'md' } = props\n\n return styled({\n container: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n color:\n color === 'primary'\n ? 'var(--px-text-primary)'\n : color === 'secondary'\n ? 'var(--px-text-secondary)'\n : color,\n ...(ICON_SIZE_MAP[size] as any),\n __rules: {\n '& > svg': { width: '100%', height: '100%' }\n }\n }\n })\n}\n","// External Libraries\nimport { useMemo } from 'react'\n\n// Components\nimport IconLoaders from '@assets/icons'\n\n// Types\nimport type { IconProps } from './types'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Styles\nimport { createIconStyles } from './style'\n\nexport const Icon = (props: IconProps) => {\n const { name } = props\n\n // Hooks\n const { styles, classes } = useThemedStyles(props, createIconStyles, {\n pick: p => [p.color, p.size],\n override: props.styles,\n applyCommonProps: true\n })\n\n // Constants\n const IconComponent = useMemo(() => {\n const loader = IconLoaders[name]\n return loader as unknown as React.ReactNode\n }, [name])\n\n if (!IconComponent) {\n console.warn(`Icon \"${name}\" not found.`)\n return null\n }\n\n return (\n <span className={classes.container} style={styles.container}>\n {IconComponent}\n </span>\n )\n}\n"],"mappings":";;;;;AAOA,MAAa,cAAc,EAAE,OAAO,GAAG,YACvC,qBAAC;CAAI,OAAM;CAAK,QAAO;CAAK,SAAQ;CAAY,MA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