@spear-ai/spectral 1.15.0 → 1.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion.d.ts.map +1 -1
- package/dist/Accordion.js +3 -3
- package/dist/Accordion.js.map +1 -1
- package/dist/Alert/AlertBase.d.ts.map +1 -1
- package/dist/Alert/AlertBase.js +1 -1
- package/dist/Alert/AlertBase.js.map +1 -1
- package/dist/Alert.js +3 -3
- package/dist/Alert.js.map +1 -1
- package/dist/Avatar.d.ts.map +1 -1
- package/dist/Avatar.js +17 -10
- package/dist/Avatar.js.map +1 -1
- package/dist/Badge.d.ts.map +1 -1
- package/dist/Badge.js +3 -3
- package/dist/Badge.js.map +1 -1
- package/dist/Button.js.map +1 -1
- package/dist/ButtonGroup/ButtonGroupButton.js +1 -1
- package/dist/ButtonGroup/ButtonGroupButton.js.map +1 -1
- package/dist/ButtonGroup.d.ts.map +1 -1
- package/dist/ButtonGroup.js.map +1 -1
- package/dist/ButtonIcon.js.map +1 -1
- package/dist/Checkbox/CheckboxBase.js.map +1 -1
- package/dist/Checkbox.js.map +1 -1
- package/dist/Combobox.js +0 -1
- package/dist/Combobox.js.map +1 -1
- package/dist/ControlGroup/ControlGroupSelect.js.map +1 -1
- package/dist/ControlGroup.d.ts.map +1 -1
- package/dist/ControlGroup.js +1 -1
- package/dist/ControlGroup.js.map +1 -1
- package/dist/DataCard/Card.d.ts.map +1 -1
- package/dist/DataCard/Card.js.map +1 -1
- package/dist/DataCard.js.map +1 -1
- package/dist/DateTimePicker/Calendar.js +1 -1
- package/dist/DateTimePicker/Calendar.js.map +1 -1
- package/dist/DateTimePicker/DateTimeDisplayInput.js.map +1 -1
- package/dist/DateTimePicker/TimePeriodSelect.js.map +1 -1
- package/dist/DateTimePicker/TimePicker.js.map +1 -1
- package/dist/DateTimePicker.js.map +1 -1
- package/dist/Dialog.d.ts +1 -0
- package/dist/Dialog.d.ts.map +1 -1
- package/dist/Dialog.js +7 -6
- package/dist/Dialog.js.map +1 -1
- package/dist/Drawer.d.ts.map +1 -1
- package/dist/Drawer.js +27 -23
- package/dist/Drawer.js.map +1 -1
- package/dist/DropdownMenu.js.map +1 -1
- package/dist/FormFieldMessage.d.ts.map +1 -1
- package/dist/FormFieldMessage.js +2 -2
- package/dist/FormFieldMessage.js.map +1 -1
- package/dist/HoverCard.d.ts.map +1 -1
- package/dist/HoverCard.js.map +1 -1
- package/dist/Icons/AdjustmentsIcon.d.ts.map +1 -1
- package/dist/Icons/AdjustmentsIcon.js.map +1 -1
- package/dist/Icons/AnalyzeIcon.d.ts.map +1 -1
- package/dist/Icons/AnalyzeIcon.js.map +1 -1
- package/dist/Icons/AnnotationsIcon.d.ts.map +1 -1
- package/dist/Icons/AnnotationsIcon.js.map +1 -1
- package/dist/Icons/ApprovedIcon.d.ts.map +1 -1
- package/dist/Icons/ApprovedIcon.js.map +1 -1
- package/dist/Icons/ArrowDownIcon.d.ts.map +1 -1
- package/dist/Icons/ArrowDownIcon.js.map +1 -1
- package/dist/Icons/ArrowUpIcon.d.ts.map +1 -1
- package/dist/Icons/ArrowUpIcon.js.map +1 -1
- package/dist/Icons/BoxToolIcon.d.ts.map +1 -1
- package/dist/Icons/BoxToolIcon.js.map +1 -1
- package/dist/Icons/CalendarIcon.d.ts.map +1 -1
- package/dist/Icons/CalendarIcon.js.map +1 -1
- package/dist/Icons/CheckCircleIcon.d.ts.map +1 -1
- package/dist/Icons/CheckCircleIcon.js.map +1 -1
- package/dist/Icons/CheckSquareIcon.d.ts.map +1 -1
- package/dist/Icons/CheckSquareIcon.js.map +1 -1
- package/dist/Icons/CheckmarkIcon.d.ts.map +1 -1
- package/dist/Icons/CheckmarkIcon.js.map +1 -1
- package/dist/Icons/ChevronDownIcon.d.ts.map +1 -1
- package/dist/Icons/ChevronDownIcon.js.map +1 -1
- package/dist/Icons/ChevronUpIcon.d.ts.map +1 -1
- package/dist/Icons/ChevronUpIcon.js.map +1 -1
- package/dist/Icons/ClockIcon.d.ts.map +1 -1
- package/dist/Icons/ClockIcon.js.map +1 -1
- package/dist/Icons/CloseCircleIcon.d.ts.map +1 -1
- package/dist/Icons/CloseCircleIcon.js.map +1 -1
- package/dist/Icons/CloseIcon.d.ts.map +1 -1
- package/dist/Icons/CloseIcon.js.map +1 -1
- package/dist/Icons/Crosshairs2Icon.d.ts.map +1 -1
- package/dist/Icons/Crosshairs2Icon.js.map +1 -1
- package/dist/Icons/CrosshairsIcon.d.ts.map +1 -1
- package/dist/Icons/CrosshairsIcon.js.map +1 -1
- package/dist/Icons/DashboardIcon.d.ts.map +1 -1
- package/dist/Icons/DashboardIcon.js.map +1 -1
- package/dist/Icons/DatabaseIcon.d.ts.map +1 -1
- package/dist/Icons/DatabaseIcon.js.map +1 -1
- package/dist/Icons/DeleteIcon.d.ts.map +1 -1
- package/dist/Icons/DeleteIcon.js.map +1 -1
- package/dist/Icons/DurationIcon.d.ts.map +1 -1
- package/dist/Icons/DurationIcon.js.map +1 -1
- package/dist/Icons/EditIcon.d.ts.map +1 -1
- package/dist/Icons/EditIcon.js.map +1 -1
- package/dist/Icons/EmailIcon.d.ts.map +1 -1
- package/dist/Icons/EmailIcon.js.map +1 -1
- package/dist/Icons/EraserIcon.d.ts.map +1 -1
- package/dist/Icons/EraserIcon.js.map +1 -1
- package/dist/Icons/ErrorIcon.d.ts.map +1 -1
- package/dist/Icons/ErrorIcon.js.map +1 -1
- package/dist/Icons/EyeClosedIcon.d.ts.map +1 -1
- package/dist/Icons/EyeClosedIcon.js.map +1 -1
- package/dist/Icons/EyeClosedIcon2.d.ts.map +1 -1
- package/dist/Icons/EyeClosedIcon2.js.map +1 -1
- package/dist/Icons/EyeOpenIcon.d.ts.map +1 -1
- package/dist/Icons/EyeOpenIcon.js.map +1 -1
- package/dist/Icons/FileDownloadIcon.d.ts.map +1 -1
- package/dist/Icons/FileDownloadIcon.js.map +1 -1
- package/dist/Icons/GoToFirstIcon.d.ts.map +1 -1
- package/dist/Icons/GoToFirstIcon.js.map +1 -1
- package/dist/Icons/GoToLastIcon.d.ts.map +1 -1
- package/dist/Icons/GoToLastIcon.js.map +1 -1
- package/dist/Icons/HarmonicCursorsIcon.d.ts.map +1 -1
- package/dist/Icons/HarmonicCursorsIcon.js.map +1 -1
- package/dist/Icons/InfoIcon.d.ts.map +1 -1
- package/dist/Icons/InfoIcon.js.map +1 -1
- package/dist/Icons/KeyboardIcon.d.ts.map +1 -1
- package/dist/Icons/KeyboardIcon.js.map +1 -1
- package/dist/Icons/LabelIcon.d.ts.map +1 -1
- package/dist/Icons/LabelIcon.js.map +1 -1
- package/dist/Icons/LassoIcon.d.ts.map +1 -1
- package/dist/Icons/LassoIcon.js.map +1 -1
- package/dist/Icons/LineToolIcon.d.ts.map +1 -1
- package/dist/Icons/LineToolIcon.js.map +1 -1
- package/dist/Icons/LiveViewIcon.d.ts.map +1 -1
- package/dist/Icons/LiveViewIcon.js.map +1 -1
- package/dist/Icons/LoaderIcon.d.ts.map +1 -1
- package/dist/Icons/LoaderIcon.js.map +1 -1
- package/dist/Icons/LocationIcon.d.ts.map +1 -1
- package/dist/Icons/LocationIcon.js.map +1 -1
- package/dist/Icons/LogoutIcon.d.ts.map +1 -1
- package/dist/Icons/LogoutIcon.js.map +1 -1
- package/dist/Icons/MaximizeIcon.d.ts.map +1 -1
- package/dist/Icons/MaximizeIcon.js.map +1 -1
- package/dist/Icons/MeasureIcon.d.ts.map +1 -1
- package/dist/Icons/MeasureIcon.js.map +1 -1
- package/dist/Icons/MenuDotsIcon.d.ts.map +1 -1
- package/dist/Icons/MenuDotsIcon.js.map +1 -1
- package/dist/Icons/MenuIcon.d.ts.map +1 -1
- package/dist/Icons/MenuIcon.js.map +1 -1
- package/dist/Icons/MessagesIcon.d.ts.map +1 -1
- package/dist/Icons/MessagesIcon.js.map +1 -1
- package/dist/Icons/MetadataIcon.d.ts.map +1 -1
- package/dist/Icons/MetadataIcon.js.map +1 -1
- package/dist/Icons/MinimizeIcon.d.ts.map +1 -1
- package/dist/Icons/MinimizeIcon.js.map +1 -1
- package/dist/Icons/MinusIcon.d.ts.map +1 -1
- package/dist/Icons/MinusIcon.js.map +1 -1
- package/dist/Icons/OntologyIcon.d.ts.map +1 -1
- package/dist/Icons/OntologyIcon.js.map +1 -1
- package/dist/Icons/PanelIconClose.d.ts.map +1 -1
- package/dist/Icons/PanelIconClose.js.map +1 -1
- package/dist/Icons/PanelIconOpen.d.ts.map +1 -1
- package/dist/Icons/PanelIconOpen.js.map +1 -1
- package/dist/Icons/PauseIcon.d.ts.map +1 -1
- package/dist/Icons/PauseIcon.js.map +1 -1
- package/dist/Icons/PlayIcon.d.ts.map +1 -1
- package/dist/Icons/PlayIcon.js.map +1 -1
- package/dist/Icons/PlusIcon.d.ts.map +1 -1
- package/dist/Icons/PlusIcon.js.map +1 -1
- package/dist/Icons/PolygonIcon.d.ts.map +1 -1
- package/dist/Icons/PolygonIcon.js.map +1 -1
- package/dist/Icons/PrinterIcon.d.ts.map +1 -1
- package/dist/Icons/PrinterIcon.js.map +1 -1
- package/dist/Icons/ProgressCheckIcon.d.ts.map +1 -1
- package/dist/Icons/ProgressCheckIcon.js.map +1 -1
- package/dist/Icons/ResetIcon.d.ts.map +1 -1
- package/dist/Icons/ResetIcon.js.map +1 -1
- package/dist/Icons/ReviewedIcon.d.ts.map +1 -1
- package/dist/Icons/ReviewedIcon.js.map +1 -1
- package/dist/Icons/ScissorsIcon.d.ts.map +1 -1
- package/dist/Icons/ScissorsIcon.js.map +1 -1
- package/dist/Icons/SearchIcon.d.ts.map +1 -1
- package/dist/Icons/SearchIcon.js.map +1 -1
- package/dist/Icons/SettingsIcon.d.ts.map +1 -1
- package/dist/Icons/SettingsIcon.js.map +1 -1
- package/dist/Icons/SortAscendingIcon.d.ts.map +1 -1
- package/dist/Icons/SortAscendingIcon.js.map +1 -1
- package/dist/Icons/SortAtoZIcon.d.ts.map +1 -1
- package/dist/Icons/SortAtoZIcon.js.map +1 -1
- package/dist/Icons/SortDescendingIcon.d.ts.map +1 -1
- package/dist/Icons/SortDescendingIcon.js.map +1 -1
- package/dist/Icons/SortZtoAIcon.d.ts.map +1 -1
- package/dist/Icons/SortZtoAIcon.js.map +1 -1
- package/dist/Icons/SparklesIcon.d.ts.map +1 -1
- package/dist/Icons/SparklesIcon.js.map +1 -1
- package/dist/Icons/StackIcon.d.ts.map +1 -1
- package/dist/Icons/StackIcon.js.map +1 -1
- package/dist/Icons/StarIcon.d.ts.map +1 -1
- package/dist/Icons/StarIcon.js.map +1 -1
- package/dist/Icons/TrashIcon.d.ts.map +1 -1
- package/dist/Icons/TrashIcon.js.map +1 -1
- package/dist/Icons/UndoIcon.d.ts.map +1 -1
- package/dist/Icons/UndoIcon.js.map +1 -1
- package/dist/Icons/UploadIcon.d.ts.map +1 -1
- package/dist/Icons/UploadIcon.js.map +1 -1
- package/dist/Icons/User2Icon.d.ts.map +1 -1
- package/dist/Icons/User2Icon.js.map +1 -1
- package/dist/Icons/UserIcon.d.ts.map +1 -1
- package/dist/Icons/UserIcon.js.map +1 -1
- package/dist/Icons/WarningIcon.d.ts.map +1 -1
- package/dist/Icons/WarningIcon.js.map +1 -1
- package/dist/Icons/ZoomAllIcon.d.ts.map +1 -1
- package/dist/Icons/ZoomAllIcon.js.map +1 -1
- package/dist/Icons/ZoomXIcon.d.ts.map +1 -1
- package/dist/Icons/ZoomXIcon.js.map +1 -1
- package/dist/Icons/ZoomYIcon.d.ts.map +1 -1
- package/dist/Icons/ZoomYIcon.js.map +1 -1
- package/dist/IconsAnimated/PanelLeftCloseIcon.js.map +1 -1
- package/dist/IconsAnimated/PanelLeftOpenIcon.js.map +1 -1
- package/dist/Input.js +1 -1
- package/dist/Input.js.map +1 -1
- package/dist/InputNumeric.js +0 -6
- package/dist/InputNumeric.js.map +1 -1
- package/dist/InputOTP.d.ts.map +1 -1
- package/dist/InputOTP.js +0 -1
- package/dist/InputOTP.js.map +1 -1
- package/dist/Kbd.d.ts.map +1 -1
- package/dist/Kbd.js.map +1 -1
- package/dist/Label.js.map +1 -1
- package/dist/MultiSelect/MultiSelectBase.js +4 -3
- package/dist/MultiSelect/MultiSelectBase.js.map +1 -1
- package/dist/MultiSelect.js.map +1 -1
- package/dist/Popover.d.ts.map +1 -1
- package/dist/Popover.js.map +1 -1
- package/dist/RadioButton.d.ts +6 -0
- package/dist/RadioButton.d.ts.map +1 -1
- package/dist/RadioButton.js +7 -2
- package/dist/RadioButton.js.map +1 -1
- package/dist/RadioButtonGroup/RadioButtonGroupBase.d.ts +15 -1
- package/dist/RadioButtonGroup/RadioButtonGroupBase.d.ts.map +1 -1
- package/dist/RadioButtonGroup/RadioButtonGroupBase.js +166 -15
- package/dist/RadioButtonGroup/RadioButtonGroupBase.js.map +1 -1
- package/dist/RadioButtonGroup.d.ts +4 -1
- package/dist/RadioButtonGroup.d.ts.map +1 -1
- package/dist/RadioButtonGroup.js.map +1 -1
- package/dist/RadioGroup.d.ts.map +1 -1
- package/dist/RadioGroup.js +1 -1
- package/dist/RadioGroup.js.map +1 -1
- package/dist/Select.js +1 -2
- package/dist/Select.js.map +1 -1
- package/dist/Skeleton.js.map +1 -1
- package/dist/Slider.js.map +1 -1
- package/dist/Switch/SwitchBase.d.ts.map +1 -1
- package/dist/Switch/SwitchBase.js.map +1 -1
- package/dist/Switch.js +4 -4
- package/dist/Switch.js.map +1 -1
- package/dist/Tabs/TabsBase.d.ts.map +1 -1
- package/dist/Tabs/TabsBase.js +11 -56
- package/dist/Tabs/TabsBase.js.map +1 -1
- package/dist/Tabs.d.ts.map +1 -1
- package/dist/Tabs.js +1 -1
- package/dist/Tabs.js.map +1 -1
- package/dist/Textarea.js.map +1 -1
- package/dist/Toast.d.ts.map +1 -1
- package/dist/Toast.js.map +1 -1
- package/dist/Toggle/ToggleBase.js.map +1 -1
- package/dist/Toggle.d.ts +5 -6
- package/dist/Toggle.d.ts.map +1 -1
- package/dist/Toggle.js +4 -19
- package/dist/Toggle.js.map +1 -1
- package/dist/ToggleGroup/ToggleGroupBase.d.ts.map +1 -1
- package/dist/ToggleGroup/ToggleGroupBase.js.map +1 -1
- package/dist/ToggleGroup/ToggleGroupItem.d.ts +3 -2
- package/dist/ToggleGroup/ToggleGroupItem.d.ts.map +1 -1
- package/dist/ToggleGroup/ToggleGroupItem.js +3 -2
- package/dist/ToggleGroup/ToggleGroupItem.js.map +1 -1
- package/dist/ToggleGroup/ToggleGroupSplitMenuItem.d.ts.map +1 -1
- package/dist/ToggleGroup/ToggleGroupSplitMenuItem.js +3 -2
- package/dist/ToggleGroup/ToggleGroupSplitMenuItem.js.map +1 -1
- package/dist/ToggleGroup.d.ts +3 -2
- package/dist/ToggleGroup.d.ts.map +1 -1
- package/dist/ToggleGroup.js +1 -1
- package/dist/ToggleGroup.js.map +1 -1
- package/dist/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip.js +1 -1
- package/dist/Tooltip.js.map +1 -1
- package/dist/Tray.d.ts.map +1 -1
- package/dist/Tray.js +11 -49
- package/dist/Tray.js.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.context.js.map +1 -1
- package/dist/styles/horizon/base.css +18 -7
- package/dist/styles/horizon/colors.css +12 -17
- package/dist/styles/spectral.css +2 -2
- package/dist/utils/activeColorStyle.d.ts +11 -0
- package/dist/utils/activeColorStyle.d.ts.map +1 -0
- package/dist/utils/activeColorStyle.js +41 -0
- package/dist/utils/activeColorStyle.js.map +1 -0
- package/package.json +25 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortAscendingIcon.js","names":[],"sources":["../../src/components/Icons/SortAscendingIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconSortAscending = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase
|
|
1
|
+
{"version":3,"file":"SortAscendingIcon.js","names":[],"sources":["../../src/components/Icons/SortAscendingIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconSortAscending = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase\n size={size}\n className={className}\n title={title}\n description={description}\n ref={ref}\n {...rest}\n >\n <path\n d='M3.05273 5.57141H10.4212'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M3.05273 12H10.4212'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M3.05273 18.4286H12.5264'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M14.6316 8.7857L17.7895 5.57141L20.9474 8.7857'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M17.7896 5.57141V18.4286'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n </IconBase>\n )\n}\n\nexport const SortAscendingIcon = Object.assign(IconSortAscending, { displayName: 'SortAscendingIcon' })\n"],"mappings":";;;;;AAGA,MAAM,qBAAqB,EAAE,KAAK,WAAW,OAAO,aAAa,OAAO,IAAI,GAAG,WAAsB;AACnG,QACE,qBAAC,UAAD;EACQ;EACK;EACJ;EACM;EACR;EACL,GAAI;YANN;GAQE,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACO;;;AAIf,MAAa,oBAAoB,OAAO,OAAO,mBAAmB,EAAE,aAAa,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortAtoZIcon.d.ts","names":[],"sources":["../../src/components/Icons/SortAtoZIcon.tsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"SortAtoZIcon.d.ts","names":[],"sources":["../../src/components/Icons/SortAtoZIcon.tsx"],"mappings":";;;;;cAoDa,YAAA;EAAY,GAAA;EAAA,SAAA;EAAA,KAAA;EAAA,WAAA;EAAA,IAAA;EAAA,GAAA;AAAA,GAjDyD,SAAA,KAAS,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortAtoZIcon.js","names":[],"sources":["../../src/components/Icons/SortAtoZIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconSortAtoZ = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase
|
|
1
|
+
{"version":3,"file":"SortAtoZIcon.js","names":[],"sources":["../../src/components/Icons/SortAtoZIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconSortAtoZ = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase\n size={size}\n className={className}\n title={title}\n description={description}\n ref={ref}\n {...rest}\n >\n <path\n d='M3 16L7 20L11 16'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M7 20V4'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M20 8H15'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M15 10V6.5C15 5.83696 15.2634 5.20107 15.7322 4.73223C16.2011 4.26339 16.837 4 17.5 4C18.163 4 18.7989 4.26339 19.2678 4.73223C19.7366 5.20107 20 5.83696 20 6.5V10'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M15 14H20L15 20H20'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n </IconBase>\n )\n}\n\nexport const SortAtoZIcon = Object.assign(IconSortAtoZ, { displayName: 'SortAtoZIcon' })\n"],"mappings":";;;;;AAGA,MAAM,gBAAgB,EAAE,KAAK,WAAW,OAAO,aAAa,OAAO,IAAI,GAAG,WAAsB;AAC9F,QACE,qBAAC,UAAD;EACQ;EACK;EACJ;EACM;EACR;EACL,GAAI;YANN;GAQE,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACO;;;AAIf,MAAa,eAAe,OAAO,OAAO,cAAc,EAAE,aAAa,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortDescendingIcon.d.ts","names":[],"sources":["../../src/components/Icons/SortDescendingIcon.tsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"SortDescendingIcon.d.ts","names":[],"sources":["../../src/components/Icons/SortDescendingIcon.tsx"],"mappings":";;;;;cAoDa,kBAAA;EAAkB,GAAA;EAAA,SAAA;EAAA,KAAA;EAAA,WAAA;EAAA,IAAA;EAAA,GAAA;AAAA,GAjDyD,SAAA,KAAS,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortDescendingIcon.js","names":[],"sources":["../../src/components/Icons/SortDescendingIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconSortDescending = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase
|
|
1
|
+
{"version":3,"file":"SortDescendingIcon.js","names":[],"sources":["../../src/components/Icons/SortDescendingIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconSortDescending = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase\n size={size}\n className={className}\n title={title}\n description={description}\n ref={ref}\n {...rest}\n >\n <path\n d='M3.05273 5.57141H12.5264'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M3.05273 12H10.4212'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M3.05273 18.4286H10.4212'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M14.6316 15.2143L17.7895 18.4286L20.9474 15.2143'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M17.7896 5.57141V18.4286'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n </IconBase>\n )\n}\n\nexport const SortDescendingIcon = Object.assign(IconSortDescending, { displayName: 'SortDescendingIcon' })\n"],"mappings":";;;;;AAGA,MAAM,sBAAsB,EAAE,KAAK,WAAW,OAAO,aAAa,OAAO,IAAI,GAAG,WAAsB;AACpG,QACE,qBAAC,UAAD;EACQ;EACK;EACJ;EACM;EACR;EACL,GAAI;YANN;GAQE,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACO;;;AAIf,MAAa,qBAAqB,OAAO,OAAO,oBAAoB,EAAE,aAAa,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortZtoAIcon.d.ts","names":[],"sources":["../../src/components/Icons/SortZtoAIcon.tsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"SortZtoAIcon.d.ts","names":[],"sources":["../../src/components/Icons/SortZtoAIcon.tsx"],"mappings":";;;;;cAoDa,YAAA;EAAY,GAAA;EAAA,SAAA;EAAA,KAAA;EAAA,WAAA;EAAA,IAAA;EAAA,GAAA;AAAA,GAjDyD,SAAA,KAAS,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortZtoAIcon.js","names":[],"sources":["../../src/components/Icons/SortZtoAIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconSortZtoA = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase
|
|
1
|
+
{"version":3,"file":"SortZtoAIcon.js","names":[],"sources":["../../src/components/Icons/SortZtoAIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconSortZtoA = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase\n size={size}\n className={className}\n title={title}\n description={description}\n ref={ref}\n {...rest}\n >\n <path\n d='M3 8L7 4L11 8'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M7 4V20'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M20 8H15'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M15 10V6.5C15 5.83696 15.2634 5.20107 15.7322 4.73223C16.2011 4.26339 16.837 4 17.5 4C18.163 4 18.7989 4.26339 19.2678 4.73223C19.7366 5.20107 20 5.83696 20 6.5V10'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M15 14H20L15 20H20'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n </IconBase>\n )\n}\n\nexport const SortZtoAIcon = Object.assign(IconSortZtoA, { displayName: 'SortZtoAIcon' })\n"],"mappings":";;;;;AAGA,MAAM,gBAAgB,EAAE,KAAK,WAAW,OAAO,aAAa,OAAO,IAAI,GAAG,WAAsB;AAC9F,QACE,qBAAC,UAAD;EACQ;EACK;EACJ;EACM;EACR;EACL,GAAI;YANN;GAQE,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACO;;;AAIf,MAAa,eAAe,OAAO,OAAO,cAAc,EAAE,aAAa,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SparklesIcon.d.ts","names":[],"sources":["../../src/components/Icons/SparklesIcon.tsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"SparklesIcon.d.ts","names":[],"sources":["../../src/components/Icons/SparklesIcon.tsx"],"mappings":";;;;;cAwBa,YAAA;EAAY,GAAA;EAAA,SAAA;EAAA,KAAA;EAAA,WAAA;EAAA,IAAA;EAAA,GAAA;AAAA,GArByD,SAAA,KAAS,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SparklesIcon.js","names":[],"sources":["../../src/components/Icons/SparklesIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconSparkles = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase
|
|
1
|
+
{"version":3,"file":"SparklesIcon.js","names":[],"sources":["../../src/components/Icons/SparklesIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconSparkles = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase\n size={size}\n className={className}\n title={title}\n description={description}\n ref={ref}\n {...rest}\n >\n <path\n d='M3.11111 18.6667C3.70048 18.6667 4.26572 18.9008 4.68246 19.3175C5.09921 19.7343 5.33334 20.2995 5.33334 20.8889C5.33334 20.2995 5.56746 19.7343 5.98421 19.3175C6.40096 18.9008 6.96619 18.6667 7.55556 18.6667C6.96619 18.6667 6.40096 18.4325 5.98421 18.0158C5.56746 17.599 5.33334 17.0338 5.33334 16.4444C5.33334 17.0338 5.09921 17.599 4.68246 18.0158C4.26572 18.4325 3.70048 18.6667 3.11111 18.6667ZM16.4444 5.33334C17.0338 5.33334 17.599 5.56746 18.0158 5.98421C18.4325 6.40096 18.6667 6.96619 18.6667 7.55556C18.6667 6.96619 18.9008 6.40096 19.3175 5.98421C19.7343 5.56746 20.2995 5.33334 20.8889 5.33334C20.2995 5.33334 19.7343 5.09921 19.3175 4.68246C18.9008 4.26572 18.6667 3.70048 18.6667 3.11111C18.6667 3.70048 18.4325 4.26572 18.0158 4.68246C17.599 5.09921 17.0338 5.33334 16.4444 5.33334ZM12 18.6667C12 16.8986 12.7024 15.2029 13.9526 13.9526C15.2029 12.7024 16.8986 12 18.6667 12C16.8986 12 15.2029 11.2976 13.9526 10.0474C12.7024 8.79714 12 7.10145 12 5.33334C12 7.10145 11.2976 8.79714 10.0474 10.0474C8.79714 11.2976 7.10145 12 5.33334 12C7.10145 12 8.79714 12.7024 10.0474 13.9526C11.2976 15.2029 12 16.8986 12 18.6667Z'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n </IconBase>\n )\n}\n\nexport const SparklesIcon = Object.assign(IconSparkles, { displayName: 'SparklesIcon' })\n"],"mappings":";;;;;AAGA,MAAM,gBAAgB,EAAE,KAAK,WAAW,OAAO,aAAa,OAAO,IAAI,GAAG,WAAsB;AAC9F,QACE,oBAAC,UAAD;EACQ;EACK;EACJ;EACM;EACR;EACL,GAAI;YAEJ,oBAAC,QAAD;GACE,GAAE;GACF,QAAO;GACP,aAAY;GACZ,eAAc;GACd,gBAAe;GACf;EACO;;AAIf,MAAa,eAAe,OAAO,OAAO,cAAc,EAAE,aAAa,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackIcon.d.ts","names":[],"sources":["../../src/components/Icons/StackIcon.tsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"StackIcon.d.ts","names":[],"sources":["../../src/components/Icons/StackIcon.tsx"],"mappings":";;;;;cA+Ba,SAAA;EAAS,GAAA;EAAA,SAAA;EAAA,KAAA;EAAA,WAAA;EAAA,IAAA;EAAA,GAAA;AAAA,GA5ByD,SAAA,KAAS,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackIcon.js","names":[],"sources":["../../src/components/Icons/StackIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconStack = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase
|
|
1
|
+
{"version":3,"file":"StackIcon.js","names":[],"sources":["../../src/components/Icons/StackIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconStack = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase\n size={size}\n className={className}\n title={title}\n description={description}\n ref={ref}\n {...rest}\n >\n <path\n d='M12 4.5L3 9L12 13.5L21 9L12 4.5Z'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M3 14.5L12 19.5L21 14.5'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n </IconBase>\n )\n}\n\nexport const StackIcon = Object.assign(IconStack, { displayName: 'StackIcon' })\n"],"mappings":";;;;;AAGA,MAAM,aAAa,EAAE,KAAK,WAAW,OAAO,aAAa,OAAO,IAAI,GAAG,WAAsB;AAC3F,QACE,qBAAC,UAAD;EACQ;EACK;EACJ;EACM;EACR;EACL,GAAI;YANN,CAQE,oBAAC,QAAD;GACE,GAAE;GACF,QAAO;GACP,aAAY;GACZ,eAAc;GACd,gBAAe;GACf,GACF,oBAAC,QAAD;GACE,GAAE;GACF,QAAO;GACP,aAAY;GACZ,eAAc;GACd,gBAAe;GACf,EACO;;;AAIf,MAAa,YAAY,OAAO,OAAO,WAAW,EAAE,aAAa,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StarIcon.d.ts","names":[],"sources":["../../src/components/Icons/StarIcon.tsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"StarIcon.d.ts","names":[],"sources":["../../src/components/Icons/StarIcon.tsx"],"mappings":";;;;;cAwBa,QAAA;EAAQ,GAAA;EAAA,SAAA;EAAA,KAAA;EAAA,WAAA;EAAA,IAAA;EAAA,GAAA;AAAA,GArByD,SAAA,KAAS,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StarIcon.js","names":[],"sources":["../../src/components/Icons/StarIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconStar = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase
|
|
1
|
+
{"version":3,"file":"StarIcon.js","names":[],"sources":["../../src/components/Icons/StarIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconStar = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase\n size={size}\n className={className}\n title={title}\n description={description}\n ref={ref}\n {...rest}\n >\n <path\n d='M12 3L14.781 8.92429L21 9.88013L16.5 14.489L17.562 21L12 17.9243L6.438 21L7.5 14.489L3 9.88013L9.219 8.92429L12 3Z'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n </IconBase>\n )\n}\n\nexport const StarIcon = Object.assign(IconStar, { displayName: 'StarIcon' })\n"],"mappings":";;;;;AAGA,MAAM,YAAY,EAAE,KAAK,WAAW,OAAO,aAAa,OAAO,IAAI,GAAG,WAAsB;AAC1F,QACE,oBAAC,UAAD;EACQ;EACK;EACJ;EACM;EACR;EACL,GAAI;YAEJ,oBAAC,QAAD;GACE,GAAE;GACF,QAAO;GACP,aAAY;GACZ,eAAc;GACd,gBAAe;GACf;EACO;;AAIf,MAAa,WAAW,OAAO,OAAO,UAAU,EAAE,aAAa,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrashIcon.d.ts","names":[],"sources":["../../src/components/Icons/TrashIcon.tsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"TrashIcon.d.ts","names":[],"sources":["../../src/components/Icons/TrashIcon.tsx"],"mappings":";;;;;cAqBa,SAAA;EAAS,GAAA;EAAA,SAAA;EAAA,KAAA;EAAA,WAAA;EAAA,IAAA;EAAA,GAAA;AAAA,GAlByD,SAAA,KAAS,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrashIcon.js","names":[],"sources":["../../src/components/Icons/TrashIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconTrash = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase
|
|
1
|
+
{"version":3,"file":"TrashIcon.js","names":[],"sources":["../../src/components/Icons/TrashIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconTrash = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase\n size={size}\n className={className}\n title={title}\n description={description}\n ref={ref}\n {...rest}\n >\n <path\n d='M3 5C2.44772 5 2 5.44772 2 6C2 6.55228 2.44772 7 3 7V5ZM21 7C21.5523 7 22 6.55228 22 6C22 5.44772 21.5523 5 21 5V7ZM11 11C11 10.4477 10.5523 10 10 10C9.44772 10 9 10.4477 9 11H11ZM9 16C9 16.5523 9.44772 17 10 17C10.5523 17 11 16.5523 11 16H9ZM15 11C15 10.4477 14.5523 10 14 10C13.4477 10 13 10.4477 13 11H15ZM13 16C13 16.5523 13.4477 17 14 17C14.5523 17 15 16.5523 15 16H13ZM14.9056 6.24926C15.0432 6.78411 15.5884 7.1061 16.1233 6.96844C16.6581 6.83078 16.9801 6.28559 16.8424 5.75074L14.9056 6.24926ZM4.00221 6.06652L4.87775 19.1996L6.87332 19.0665L5.99779 5.93348L4.00221 6.06652ZM7.87111 22H16.1289V20H7.87111V22ZM19.1222 19.1996L19.9978 6.06652L18.0022 5.93348L17.1267 19.0665L19.1222 19.1996ZM19 5H5V7H19V5ZM3 7H5V5H3V7ZM19 7H21V5H19V7ZM16.1289 22C17.7083 22 19.0172 20.7754 19.1222 19.1996L17.1267 19.0665C17.0917 19.5918 16.6554 20 16.1289 20V22ZM4.87775 19.1996C4.98281 20.7754 6.29171 22 7.87111 22V20C7.34464 20 6.90834 19.5918 6.87332 19.0665L4.87775 19.1996ZM9 11V16H11V11H9ZM13 11V16H15V11H13ZM12 4C13.3965 4 14.5725 4.95512 14.9056 6.24926L16.8424 5.75074C16.2874 3.59442 14.3312 2 12 2V4ZM9.09447 6.24926C9.42756 4.95512 10.6035 4 12 4V2C9.66885 2 7.7126 3.59442 7.1576 5.75074L9.09447 6.24926Z'\n fill='currentColor'\n />\n </IconBase>\n )\n}\n\nexport const TrashIcon = Object.assign(IconTrash, { displayName: 'TrashIcon' })\n"],"mappings":";;;;;AAGA,MAAM,aAAa,EAAE,KAAK,WAAW,OAAO,aAAa,OAAO,IAAI,GAAG,WAAsB;AAC3F,QACE,oBAAC,UAAD;EACQ;EACK;EACJ;EACM;EACR;EACL,GAAI;YAEJ,oBAAC,QAAD;GACE,GAAE;GACF,MAAK;GACL;EACO;;AAIf,MAAa,YAAY,OAAO,OAAO,WAAW,EAAE,aAAa,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UndoIcon.d.ts","names":[],"sources":["../../src/components/Icons/UndoIcon.tsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"UndoIcon.d.ts","names":[],"sources":["../../src/components/Icons/UndoIcon.tsx"],"mappings":";;;;;cAwBa,QAAA;EAAQ,GAAA;EAAA,SAAA;EAAA,KAAA;EAAA,WAAA;EAAA,IAAA;EAAA,GAAA;AAAA,GArByD,SAAA,KAAS,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UndoIcon.js","names":[],"sources":["../../src/components/Icons/UndoIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconUndo = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase
|
|
1
|
+
{"version":3,"file":"UndoIcon.js","names":[],"sources":["../../src/components/Icons/UndoIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconUndo = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase\n size={size}\n className={className}\n title={title}\n description={description}\n ref={ref}\n {...rest}\n >\n <path\n d='M7.8 9.66667L3 14.3333M3 14.3333L7.8 19M3 14.3333H16.2C17.473 14.3333 18.6939 13.8417 19.5941 12.9665C20.4943 12.0913 21 10.9043 21 9.66667C21 8.42899 20.4943 7.242 19.5941 6.36683C18.6939 5.49167 17.473 5 16.2 5H15'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n </IconBase>\n )\n}\n\nexport const UndoIcon = Object.assign(IconUndo, { displayName: 'UndoIcon' })\n"],"mappings":";;;;;AAGA,MAAM,YAAY,EAAE,KAAK,WAAW,OAAO,aAAa,OAAO,IAAI,GAAG,WAAsB;AAC1F,QACE,oBAAC,UAAD;EACQ;EACK;EACJ;EACM;EACR;EACL,GAAI;YAEJ,oBAAC,QAAD;GACE,GAAE;GACF,QAAO;GACP,aAAY;GACZ,eAAc;GACd,gBAAe;GACf;EACO;;AAIf,MAAa,WAAW,OAAO,OAAO,UAAU,EAAE,aAAa,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploadIcon.d.ts","names":[],"sources":["../../src/components/Icons/UploadIcon.tsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"UploadIcon.d.ts","names":[],"sources":["../../src/components/Icons/UploadIcon.tsx"],"mappings":";;;;;cAsCa,UAAA;EAAU,GAAA;EAAA,SAAA;EAAA,KAAA;EAAA,WAAA;EAAA,IAAA;EAAA,GAAA;AAAA,GAnCyD,SAAA,KAAS,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploadIcon.js","names":[],"sources":["../../src/components/Icons/UploadIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconUpload = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase
|
|
1
|
+
{"version":3,"file":"UploadIcon.js","names":[],"sources":["../../src/components/Icons/UploadIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconUpload = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase\n size={size}\n className={className}\n title={title}\n description={description}\n ref={ref}\n {...rest}\n >\n <path\n d='M3.11111 16.4444V18.6667C3.11111 19.256 3.34524 19.8213 3.76199 20.238C4.17874 20.6548 4.74397 20.8889 5.33334 20.8889H18.6667C19.256 20.8889 19.8213 20.6548 20.238 20.238C20.6548 19.8213 20.8889 19.256 20.8889 18.6667V16.4444'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M6.44446 8.66667L12 3.11111L17.5556 8.66667'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M12 3.11111V16.4444'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n </IconBase>\n )\n}\n\nexport const UploadIcon = Object.assign(IconUpload, { displayName: 'UploadIcon' })\n"],"mappings":";;;;;AAGA,MAAM,cAAc,EAAE,KAAK,WAAW,OAAO,aAAa,OAAO,IAAI,GAAG,WAAsB;AAC5F,QACE,qBAAC,UAAD;EACQ;EACK;EACJ;EACM;EACR;EACL,GAAI;YANN;GAQE,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACO;;;AAIf,MAAa,aAAa,OAAO,OAAO,YAAY,EAAE,aAAa,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"User2Icon.d.ts","names":[],"sources":["../../src/components/Icons/User2Icon.tsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"User2Icon.d.ts","names":[],"sources":["../../src/components/Icons/User2Icon.tsx"],"mappings":";;;;;cA4Ba,SAAA;EAAS,GAAA;EAAA,SAAA;EAAA,KAAA;EAAA,WAAA;EAAA,IAAA;EAAA,GAAA;AAAA,GAzByD,SAAA,KAAS,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"User2Icon.js","names":[],"sources":["../../src/components/Icons/User2Icon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconUser2 = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase
|
|
1
|
+
{"version":3,"file":"User2Icon.js","names":[],"sources":["../../src/components/Icons/User2Icon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconUser2 = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase\n size={size}\n className={className}\n title={title}\n description={description}\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n ref={ref}\n {...rest}\n >\n <path\n stroke='none'\n d='M0 0h24v24H0z'\n fill='none'\n />\n <path d='M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0' />\n <path d='M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2' />\n </IconBase>\n )\n}\n\nexport const User2Icon = Object.assign(IconUser2, { displayName: 'User2Icon' })\n"],"mappings":";;;;;AAGA,MAAM,aAAa,EAAE,KAAK,WAAW,OAAO,aAAa,OAAO,IAAI,GAAG,WAAsB;AAC3F,QACE,qBAAC,UAAD;EACQ;EACK;EACJ;EACM;EACb,QAAO;EACP,aAAY;EACZ,eAAc;EACd,gBAAe;EACV;EACL,GAAI;YAVN;GAYE,oBAAC,QAAD;IACE,QAAO;IACP,GAAE;IACF,MAAK;IACL;GACF,oBAAC,QAAD,EAAM,GAAE,qCAAsC;GAC9C,oBAAC,QAAD,EAAM,GAAE,6CAA8C;GAC7C;;;AAIf,MAAa,YAAY,OAAO,OAAO,WAAW,EAAE,aAAa,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserIcon.d.ts","names":[],"sources":["../../src/components/Icons/UserIcon.tsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"UserIcon.d.ts","names":[],"sources":["../../src/components/Icons/UserIcon.tsx"],"mappings":";;;;;cAuBa,QAAA;EAAQ,GAAA;EAAA,SAAA;EAAA,KAAA;EAAA,WAAA;EAAA,IAAA;EAAA,GAAA;AAAA,GApByD,SAAA,KAAS,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserIcon.js","names":[],"sources":["../../src/components/Icons/UserIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconUser = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase
|
|
1
|
+
{"version":3,"file":"UserIcon.js","names":[],"sources":["../../src/components/Icons/UserIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconUser = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase\n size={size}\n className={className}\n title={title}\n description={description}\n ref={ref}\n {...rest}\n >\n <path\n d='M6.11594 18.8103C7.44562 17.0943 9.50054 16 12 16C14.4995 16 16.5544 17.0943 17.8841 18.8103M6.11594 18.8103C7.69368 20.1747 9.75046 21 12 21C14.2495 21 16.3063 20.1747 17.8841 18.8103M6.11594 18.8103C4.20753 17.16 3 14.721 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 14.721 19.7925 17.16 17.8841 18.8103M15 10C15 11.6569 13.6569 13 12 13C10.3431 13 9 11.6569 9 10C9 8.34315 10.3431 7 12 7C13.6569 7 15 8.34315 15 10Z'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinejoin='round'\n />\n </IconBase>\n )\n}\n\nexport const UserIcon = Object.assign(IconUser, { displayName: 'UserIcon' })\n"],"mappings":";;;;;AAGA,MAAM,YAAY,EAAE,KAAK,WAAW,OAAO,aAAa,OAAO,IAAI,GAAG,WAAsB;AAC1F,QACE,oBAAC,UAAD;EACQ;EACK;EACJ;EACM;EACR;EACL,GAAI;YAEJ,oBAAC,QAAD;GACE,GAAE;GACF,QAAO;GACP,aAAY;GACZ,gBAAe;GACf;EACO;;AAIf,MAAa,WAAW,OAAO,OAAO,UAAU,EAAE,aAAa,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WarningIcon.d.ts","names":[],"sources":["../../src/components/Icons/WarningIcon.tsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"WarningIcon.d.ts","names":[],"sources":["../../src/components/Icons/WarningIcon.tsx"],"mappings":";;;;;cAuBa,WAAA;EAAW,GAAA;EAAA,SAAA;EAAA,KAAA;EAAA,WAAA;EAAA,IAAA;EAAA,GAAA;AAAA,GApByD,SAAA,KAAS,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WarningIcon.js","names":[],"sources":["../../src/components/Icons/WarningIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconWarning = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase
|
|
1
|
+
{"version":3,"file":"WarningIcon.js","names":[],"sources":["../../src/components/Icons/WarningIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconWarning = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase\n size={size}\n className={className}\n title={title}\n description={description}\n ref={ref}\n {...rest}\n >\n <path\n d='M12.1125 9.99443V13.0261M12.1125 16.05H12.1226M10.3675 4.90277L3.27825 17.0605C2.49259 18.4079 3.46409 20.1 5.02334 20.1H19.2016C20.7609 20.1 21.7324 18.4079 20.9468 17.0605L13.8575 4.90275C13.078 3.56578 11.147 3.56578 10.3675 4.90277ZM12.3656 16.05C12.3656 16.1899 12.2523 16.3031 12.1125 16.3031C11.9727 16.3031 11.8594 16.1899 11.8594 16.05C11.8594 15.9102 11.9727 15.7969 12.1125 15.7969C12.2523 15.7969 12.3656 15.9102 12.3656 16.05Z'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n />\n </IconBase>\n )\n}\n\nexport const WarningIcon = Object.assign(IconWarning, { displayName: 'WarningIcon' })\n"],"mappings":";;;;;AAGA,MAAM,eAAe,EAAE,KAAK,WAAW,OAAO,aAAa,OAAO,IAAI,GAAG,WAAsB;AAC7F,QACE,oBAAC,UAAD;EACQ;EACK;EACJ;EACM;EACR;EACL,GAAI;YAEJ,oBAAC,QAAD;GACE,GAAE;GACF,QAAO;GACP,aAAY;GACZ,eAAc;GACd;EACO;;AAIf,MAAa,cAAc,OAAO,OAAO,aAAa,EAAE,aAAa,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoomAllIcon.d.ts","names":[],"sources":["../../src/components/Icons/ZoomAllIcon.tsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"ZoomAllIcon.d.ts","names":[],"sources":["../../src/components/Icons/ZoomAllIcon.tsx"],"mappings":";;;;;cAyEa,WAAA;EAAW,GAAA;EAAA,SAAA;EAAA,KAAA;EAAA,WAAA;EAAA,IAAA;EAAA,GAAA;AAAA,GAtEyD,SAAA,KAAS,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoomAllIcon.js","names":[],"sources":["../../src/components/Icons/ZoomAllIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconZoomAll = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase
|
|
1
|
+
{"version":3,"file":"ZoomAllIcon.js","names":[],"sources":["../../src/components/Icons/ZoomAllIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconZoomAll = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase\n size={size}\n className={className}\n title={title}\n description={description}\n ref={ref}\n {...rest}\n >\n <path\n d='M16.0909 3.81818H20.1819V7.90909'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M14.0454 9.95454L20.1818 3.81818'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M7.90915 20.1818H3.81824V16.0909'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M3.81824 20.1818L9.9546 14.0455'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M16.0909 20.1818H20.1819V16.0909'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M14.0454 14.0455L20.1818 20.1818'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M7.90915 3.81818H3.81824V7.9090'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M3.81824 3.81818L9.9546 9.95454'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n </IconBase>\n )\n}\n\nexport const ZoomAllIcon = Object.assign(IconZoomAll, { displayName: 'ZoomAllIcon' })\n"],"mappings":";;;;;AAGA,MAAM,eAAe,EAAE,KAAK,WAAW,OAAO,aAAa,OAAO,IAAI,GAAG,WAAsB;AAC7F,QACE,qBAAC,UAAD;EACQ;EACK;EACJ;EACM;EACR;EACL,GAAI;YANN;GAQE,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACO;;;AAIf,MAAa,cAAc,OAAO,OAAO,aAAa,EAAE,aAAa,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoomXIcon.d.ts","names":[],"sources":["../../src/components/Icons/ZoomXIcon.tsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"ZoomXIcon.d.ts","names":[],"sources":["../../src/components/Icons/ZoomXIcon.tsx"],"mappings":";;;;;cAsCa,SAAA;EAAS,GAAA;EAAA,SAAA;EAAA,KAAA;EAAA,WAAA;EAAA,IAAA;EAAA,GAAA;AAAA,GAnCyD,SAAA,KAAS,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoomXIcon.js","names":[],"sources":["../../src/components/Icons/ZoomXIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconZoomX = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase
|
|
1
|
+
{"version":3,"file":"ZoomXIcon.js","names":[],"sources":["../../src/components/Icons/ZoomXIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconZoomX = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase\n size={size}\n className={className}\n title={title}\n description={description}\n ref={ref}\n {...rest}\n >\n <path\n d='M6.65278 7.875L2.375 12L6.65278 16.125'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M17.3472 7.875L21.6249 12L17.3472 16.125'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M2.375 12H21.625'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n </IconBase>\n )\n}\n\nexport const ZoomXIcon = Object.assign(IconZoomX, { displayName: 'ZoomXIcon' })\n"],"mappings":";;;;;AAGA,MAAM,aAAa,EAAE,KAAK,WAAW,OAAO,aAAa,OAAO,IAAI,GAAG,WAAsB;AAC3F,QACE,qBAAC,UAAD;EACQ;EACK;EACJ;EACM;EACR;EACL,GAAI;YANN;GAQE,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACO;;;AAIf,MAAa,YAAY,OAAO,OAAO,WAAW,EAAE,aAAa,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoomYIcon.d.ts","names":[],"sources":["../../src/components/Icons/ZoomYIcon.tsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"ZoomYIcon.d.ts","names":[],"sources":["../../src/components/Icons/ZoomYIcon.tsx"],"mappings":";;;;;cAsCa,SAAA;EAAS,GAAA;EAAA,SAAA;EAAA,KAAA;EAAA,WAAA;EAAA,IAAA;EAAA,GAAA;AAAA,GAnCyD,SAAA,KAAS,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoomYIcon.js","names":[],"sources":["../../src/components/Icons/ZoomYIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconZoomY = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase
|
|
1
|
+
{"version":3,"file":"ZoomYIcon.js","names":[],"sources":["../../src/components/Icons/ZoomYIcon.tsx"],"sourcesContent":["import { IconBase } from './IconBase'\nimport { type IconProps } from './iconTypes'\n\nconst IconZoomY = ({ ref, className, title, description, size = 24, ...rest }: IconProps) => {\n return (\n <IconBase\n size={size}\n className={className}\n title={title}\n description={description}\n ref={ref}\n {...rest}\n >\n <path\n d='M7.90906 6.94952L12 2.90912L16.0909 6.94952'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M7.90906 17.0505L12 21.0909L16.0909 17.0505'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M12 2.90912V21.0909'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n </IconBase>\n )\n}\n\nexport const ZoomYIcon = Object.assign(IconZoomY, { displayName: 'ZoomYIcon' })\n"],"mappings":";;;;;AAGA,MAAM,aAAa,EAAE,KAAK,WAAW,OAAO,aAAa,OAAO,IAAI,GAAG,WAAsB;AAC3F,QACE,qBAAC,UAAD;EACQ;EACK;EACJ;EACM;EACR;EACL,GAAI;YANN;GAQE,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACF,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf;GACO;;;AAIf,MAAa,YAAY,OAAO,OAAO,WAAW,EAAE,aAAa,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelLeftCloseIcon.js","names":[],"sources":["../../src/components/IconsAnimated/PanelLeftCloseIcon.tsx"],"sourcesContent":["import { cn } from '@utils/twUtils'\nimport { motion, useAnimation, type Transition, type Variants } from 'motion/react'\nimport { type MouseEvent, useCallback, useImperativeHandle, useRef } from 'react'\nimport { type AnimatedIconProps } from './iconTypes'\n\nconst DEFAULT_TRANSITION: Transition = {\n times: [0, 0.4, 1],\n duration: 0.5,\n}\n\nconst PATH_VARIANTS: Variants = {\n normal: { x: 0 },\n animate: { x: [0, -1.5, 0] },\n}\n\nexport const PanelLeftCloseIcon = ({ onMouseEnter, onMouseLeave, className, size = 28, ref, ...props }: AnimatedIconProps) => {\n const controls = useAnimation()\n const isControlledRef = useRef(false)\n\n useImperativeHandle(ref, () => {\n isControlledRef.current = true\n return {\n startAnimation: () => controls.start('animate'),\n stopAnimation: () => controls.start('normal'),\n }\n })\n\n const handleMouseEnter = useCallback(\n (e: MouseEvent<HTMLDivElement>) => {\n if (isControlledRef.current) {\n onMouseEnter?.(e)\n } else {\n controls.start('animate')\n }\n },\n [controls, onMouseEnter],\n )\n\n const handleMouseLeave = useCallback(\n (e: MouseEvent<HTMLDivElement>) => {\n if (isControlledRef.current) {\n onMouseLeave?.(e)\n } else {\n controls.start('normal')\n }\n },\n [controls, onMouseLeave],\n )\n\n return (\n <div
|
|
1
|
+
{"version":3,"file":"PanelLeftCloseIcon.js","names":[],"sources":["../../src/components/IconsAnimated/PanelLeftCloseIcon.tsx"],"sourcesContent":["import { cn } from '@utils/twUtils'\nimport { motion, useAnimation, type Transition, type Variants } from 'motion/react'\nimport { type MouseEvent, useCallback, useImperativeHandle, useRef } from 'react'\nimport { type AnimatedIconProps } from './iconTypes'\n\nconst DEFAULT_TRANSITION: Transition = {\n times: [0, 0.4, 1],\n duration: 0.5,\n}\n\nconst PATH_VARIANTS: Variants = {\n normal: { x: 0 },\n animate: { x: [0, -1.5, 0] },\n}\n\nexport const PanelLeftCloseIcon = ({ onMouseEnter, onMouseLeave, className, size = 28, ref, ...props }: AnimatedIconProps) => {\n const controls = useAnimation()\n const isControlledRef = useRef(false)\n\n useImperativeHandle(ref, () => {\n isControlledRef.current = true\n return {\n startAnimation: () => controls.start('animate'),\n stopAnimation: () => controls.start('normal'),\n }\n })\n\n const handleMouseEnter = useCallback(\n (e: MouseEvent<HTMLDivElement>) => {\n if (isControlledRef.current) {\n onMouseEnter?.(e)\n } else {\n controls.start('animate')\n }\n },\n [controls, onMouseEnter],\n )\n\n const handleMouseLeave = useCallback(\n (e: MouseEvent<HTMLDivElement>) => {\n if (isControlledRef.current) {\n onMouseLeave?.(e)\n } else {\n controls.start('normal')\n }\n },\n [controls, onMouseLeave],\n )\n\n return (\n <div\n className={cn(className)}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n {...props}\n >\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <rect\n height='18'\n rx='2'\n width='18'\n x='3'\n y='3'\n />\n <path d='M9 3v18' />\n <motion.path\n animate={controls}\n d='m16 15-3-3 3-3'\n transition={DEFAULT_TRANSITION}\n variants={PATH_VARIANTS}\n />\n </svg>\n </div>\n )\n}\n"],"mappings":";;;;;;;AAKA,MAAM,qBAAiC;CACrC,OAAO;EAAC;EAAG;EAAK;EAAE;CAClB,UAAU;CACX;AAED,MAAM,gBAA0B;CAC9B,QAAQ,EAAE,GAAG,GAAG;CAChB,SAAS,EAAE,GAAG;EAAC;EAAG;EAAM;EAAE,EAAE;CAC7B;AAED,MAAa,sBAAsB,EAAE,cAAc,cAAc,WAAW,OAAO,IAAI,KAAK,GAAG,YAA+B;CAC5H,MAAM,WAAW,cAAc;CAC/B,MAAM,kBAAkB,OAAO,MAAM;AAErC,qBAAoB,WAAW;AAC7B,kBAAgB,UAAU;AAC1B,SAAO;GACL,sBAAsB,SAAS,MAAM,UAAU;GAC/C,qBAAqB,SAAS,MAAM,SAAS;GAC9C;GACD;CAEF,MAAM,mBAAmB,aACtB,MAAkC;AACjC,MAAI,gBAAgB,QAClB,gBAAe,EAAE;MAEjB,UAAS,MAAM,UAAU;IAG7B,CAAC,UAAU,aAAa,CACzB;CAED,MAAM,mBAAmB,aACtB,MAAkC;AACjC,MAAI,gBAAgB,QAClB,gBAAe,EAAE;MAEjB,UAAS,MAAM,SAAS;IAG5B,CAAC,UAAU,aAAa,CACzB;AAED,QACE,oBAAC,OAAD;EACE,WAAW,GAAG,UAAU;EACxB,cAAc;EACd,cAAc;EACd,GAAI;YAEJ,qBAAC,OAAD;GACE,MAAK;GACL,QAAQ;GACR,QAAO;GACP,eAAc;GACd,gBAAe;GACf,aAAY;GACZ,SAAQ;GACR,OAAO;GACP,OAAM;aATR;IAWE,oBAAC,QAAD;KACE,QAAO;KACP,IAAG;KACH,OAAM;KACN,GAAE;KACF,GAAE;KACF;IACF,oBAAC,QAAD,EAAM,GAAE,WAAY;IACpB,oBAAC,OAAO,MAAR;KACE,SAAS;KACT,GAAE;KACF,YAAY;KACZ,UAAU;KACV;IACE;;EACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelLeftOpenIcon.js","names":[],"sources":["../../src/components/IconsAnimated/PanelLeftOpenIcon.tsx"],"sourcesContent":["import { cn } from '@utils/twUtils'\nimport { motion, useAnimation, type Transition, type Variants } from 'motion/react'\nimport { type MouseEvent, useCallback, useImperativeHandle, useRef } from 'react'\nimport { type AnimatedIconProps } from './iconTypes'\n\nconst DEFAULT_TRANSITION: Transition = {\n times: [0, 0.4, 1],\n duration: 0.5,\n}\n\nconst PATH_VARIANTS: Variants = {\n normal: { x: 0 },\n animate: { x: [0, 1.5, 0] },\n}\n\nexport const PanelLeftOpenIcon = ({ onMouseEnter, onMouseLeave, className, size = 28, ref, ...props }: AnimatedIconProps) => {\n const controls = useAnimation()\n const isControlledRef = useRef(false)\n\n useImperativeHandle(ref, () => {\n isControlledRef.current = true\n return {\n startAnimation: () => controls.start('animate'),\n stopAnimation: () => controls.start('normal'),\n }\n })\n\n const handleMouseEnter = useCallback(\n (e: MouseEvent<HTMLDivElement>) => {\n if (isControlledRef.current) {\n onMouseEnter?.(e)\n } else {\n controls.start('animate')\n }\n },\n [controls, onMouseEnter],\n )\n\n const handleMouseLeave = useCallback(\n (e: MouseEvent<HTMLDivElement>) => {\n if (isControlledRef.current) {\n onMouseLeave?.(e)\n } else {\n controls.start('normal')\n }\n },\n [controls, onMouseLeave],\n )\n\n return (\n <div
|
|
1
|
+
{"version":3,"file":"PanelLeftOpenIcon.js","names":[],"sources":["../../src/components/IconsAnimated/PanelLeftOpenIcon.tsx"],"sourcesContent":["import { cn } from '@utils/twUtils'\nimport { motion, useAnimation, type Transition, type Variants } from 'motion/react'\nimport { type MouseEvent, useCallback, useImperativeHandle, useRef } from 'react'\nimport { type AnimatedIconProps } from './iconTypes'\n\nconst DEFAULT_TRANSITION: Transition = {\n times: [0, 0.4, 1],\n duration: 0.5,\n}\n\nconst PATH_VARIANTS: Variants = {\n normal: { x: 0 },\n animate: { x: [0, 1.5, 0] },\n}\n\nexport const PanelLeftOpenIcon = ({ onMouseEnter, onMouseLeave, className, size = 28, ref, ...props }: AnimatedIconProps) => {\n const controls = useAnimation()\n const isControlledRef = useRef(false)\n\n useImperativeHandle(ref, () => {\n isControlledRef.current = true\n return {\n startAnimation: () => controls.start('animate'),\n stopAnimation: () => controls.start('normal'),\n }\n })\n\n const handleMouseEnter = useCallback(\n (e: MouseEvent<HTMLDivElement>) => {\n if (isControlledRef.current) {\n onMouseEnter?.(e)\n } else {\n controls.start('animate')\n }\n },\n [controls, onMouseEnter],\n )\n\n const handleMouseLeave = useCallback(\n (e: MouseEvent<HTMLDivElement>) => {\n if (isControlledRef.current) {\n onMouseLeave?.(e)\n } else {\n controls.start('normal')\n }\n },\n [controls, onMouseLeave],\n )\n\n return (\n <div\n className={cn(className)}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n {...props}\n >\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <rect\n height='18'\n rx='2'\n width='18'\n x='3'\n y='3'\n />\n <path d='M9 3v18' />\n <motion.path\n animate={controls}\n d='m14 9 3 3-3 3'\n transition={DEFAULT_TRANSITION}\n variants={PATH_VARIANTS}\n />\n </svg>\n </div>\n )\n}\n"],"mappings":";;;;;;;AAKA,MAAM,qBAAiC;CACrC,OAAO;EAAC;EAAG;EAAK;EAAE;CAClB,UAAU;CACX;AAED,MAAM,gBAA0B;CAC9B,QAAQ,EAAE,GAAG,GAAG;CAChB,SAAS,EAAE,GAAG;EAAC;EAAG;EAAK;EAAE,EAAE;CAC5B;AAED,MAAa,qBAAqB,EAAE,cAAc,cAAc,WAAW,OAAO,IAAI,KAAK,GAAG,YAA+B;CAC3H,MAAM,WAAW,cAAc;CAC/B,MAAM,kBAAkB,OAAO,MAAM;AAErC,qBAAoB,WAAW;AAC7B,kBAAgB,UAAU;AAC1B,SAAO;GACL,sBAAsB,SAAS,MAAM,UAAU;GAC/C,qBAAqB,SAAS,MAAM,SAAS;GAC9C;GACD;CAEF,MAAM,mBAAmB,aACtB,MAAkC;AACjC,MAAI,gBAAgB,QAClB,gBAAe,EAAE;MAEjB,UAAS,MAAM,UAAU;IAG7B,CAAC,UAAU,aAAa,CACzB;CAED,MAAM,mBAAmB,aACtB,MAAkC;AACjC,MAAI,gBAAgB,QAClB,gBAAe,EAAE;MAEjB,UAAS,MAAM,SAAS;IAG5B,CAAC,UAAU,aAAa,CACzB;AAED,QACE,oBAAC,OAAD;EACE,WAAW,GAAG,UAAU;EACxB,cAAc;EACd,cAAc;EACd,GAAI;YAEJ,qBAAC,OAAD;GACE,MAAK;GACL,QAAQ;GACR,QAAO;GACP,eAAc;GACd,gBAAe;GACf,aAAY;GACZ,SAAQ;GACR,OAAO;GACP,OAAM;aATR;IAWE,oBAAC,QAAD;KACE,QAAO;KACP,IAAG;KACH,OAAM;KACN,GAAE;KACF,GAAE;KACF;IACF,oBAAC,QAAD,EAAM,GAAE,WAAY;IACpB,oBAAC,OAAO,MAAR;KACE,SAAS;KACT,GAAE;KACF,YAAY;KACZ,UAAU;KACV;IACE;;EACF"}
|
package/dist/Input.js
CHANGED
|
@@ -135,7 +135,7 @@ const Input = (allProps) => {
|
|
|
135
135
|
const inputClasses = cn(getInputClasses(state, className), "[text-indent:var(--prefix-width)]", showClearButtonNow && "pr-10", usesTabularNumbers && "tabular-nums");
|
|
136
136
|
const prefixClasses = cn("inset-y-0 left-4 text-base pointer-events-none absolute flex items-center text-input-text-prefix opacity-100 peer-disabled:opacity-50");
|
|
137
137
|
return /* @__PURE__ */ jsxs("div", {
|
|
138
|
-
className: "
|
|
138
|
+
className: "gap-1.5 flex w-full flex-col",
|
|
139
139
|
"data-testid": "spectral-input-container",
|
|
140
140
|
children: [label && /* @__PURE__ */ jsx(Label, {
|
|
141
141
|
className: cn("mb-2 block", labelClassName, isDisabled && "cursor-not-allowed text-input-text--disabled placeholder:text-input-text-placeholder"),
|
package/dist/Input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","names":[],"sources":["../src/components/Input/Input.tsx"],"sourcesContent":["import { CheckCircleIcon, CloseCircleIcon, ErrorIcon, EyeClosedIcon, EyeOpenIcon, LoaderIcon, WarningIcon } from '@components/Icons'\nimport { Label } from '@components/Label/Label'\nimport { useUncontrolledState } from '@hooks/useUncontrolledState'\nimport { ErrorMessage, WarningMessage, getAriaProps, getFormFieldCSSProperties, getInputClasses, useFormFieldId, useFormFieldState, type BaseFormFieldProps } from '@utils/formFieldUtils'\nimport { cn } from '@utils/twUtils'\nimport { useCallback, useRef, type ChangeEvent, type CSSProperties, type FocusEvent, type InputHTMLAttributes, type ReactElement, type Ref } from 'react'\nimport { useClearOnFocus, usePasswordVisibility, usePrefixWidth } from './InputUtils'\n\nexport type InputType = 'text' | 'email' | 'url' | 'tel' | 'password' | 'number' | 'date' | 'datetime-local'\n\nexport type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'id' | 'onChange'> &\n BaseFormFieldProps & {\n className?: string\n clearOnFocus?: boolean\n endIcon?: ReactElement\n labelClassName?: string\n onBlur?: (e: FocusEvent<HTMLInputElement>) => void\n onChange?: (value: string) => void\n onFocus?: (e: FocusEvent<HTMLInputElement>) => void\n placeholder?: string\n prefix?: string\n showClearButton?: boolean\n showStateIcon?: boolean\n startIcon?: ReactElement\n suppressHydrationWarning?: boolean\n type?: InputType\n value?: string\n warningMessage?: BaseFormFieldProps['errorMessage']\n }\n\nconst mergeRefs = <T,>(...refs: (Ref<T> | undefined)[]): Ref<T> => {\n return (value: T | null) => {\n refs.forEach((ref) => {\n if (!ref) return\n if (typeof ref === 'function') {\n ref(value)\n } else {\n ;(ref as { current: T | null }).current = value\n }\n })\n }\n}\n\nconst getAutoCompleteValue = (type: InputType): string => {\n const autoCompleteMap: Record<InputType, string> = {\n date: 'off',\n email: 'email',\n number: 'off',\n password: 'current-password',\n tel: 'tel',\n text: 'off',\n url: 'url',\n 'datetime-local': 'off',\n }\n return autoCompleteMap[type] || 'off'\n}\n\nexport const Input = (\n allProps: InputProps & {\n ref?: Ref<HTMLInputElement>\n },\n): ReactElement => {\n const {\n className,\n clearOnFocus = false,\n defaultValue,\n disabled,\n endIcon,\n errorMessage,\n id,\n label,\n labelClassName,\n messageReserveLines = 1,\n messageReserveSpace = false,\n name,\n onBlur,\n onChange,\n onFocus,\n placeholder,\n prefix,\n ref,\n required,\n showClearButton = false,\n showStateIcon = true,\n startIcon,\n state = 'default',\n suppressHydrationWarning = true,\n type = 'text',\n value: valueProp,\n warningMessage,\n 'aria-label': ariaLabel,\n 'aria-describedby': ariaDescribedBy,\n ...props\n } = allProps\n const inputId = useFormFieldId(id, name)\n const errorMessageId = `${inputId}-error`\n const warningMessageId = `${inputId}-warning`\n const { isDisabled, isLoading, isInvalid } = useFormFieldState(disabled, state)\n const messageId = state === 'error' ? errorMessageId : state === 'warning' && warningMessage ? warningMessageId : undefined\n const ariaProps = getAriaProps(state, ariaDescribedBy, required, messageId)\n const normalizedDefaultValue = typeof defaultValue === 'string' ? defaultValue : defaultValue !== undefined && defaultValue !== null ? String(defaultValue) : ''\n const [value, setValue] = useUncontrolledState<string>({\n value: valueProp,\n defaultValue: normalizedDefaultValue,\n onChange,\n })\n\n const internalRef = useRef<HTMLInputElement>(null)\n const inputRef = mergeRefs(ref, internalRef)\n\n const { isVisible, toggleVisibility, inputType } = usePasswordVisibility()\n const { prefixWidth, prefixRef } = usePrefixWidth(prefix)\n const { handleFocus: clearOnFocusHandler } = useClearOnFocus(clearOnFocus, (e: ChangeEvent<HTMLInputElement>) => setValue(e.target.value))\n\n const handleBlur = useCallback(\n (e: FocusEvent<HTMLInputElement>): void => {\n onBlur?.(e)\n },\n [onBlur],\n )\n\n const handleFocus = useCallback(\n (e: FocusEvent<HTMLInputElement>): void => {\n clearOnFocusHandler(e, onFocus)\n },\n [clearOnFocusHandler, onFocus],\n )\n\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>): void => {\n const newValue = e.target.value\n setValue(newValue)\n },\n [setValue],\n )\n\n const handleClear = useCallback((): void => {\n const element = internalRef.current\n if (element) {\n setValue('')\n element.focus()\n }\n }, [setValue])\n\n const showClearButtonNow = showClearButton && value.length > 0\n\n const getEndIcon = (): ReactElement | null => {\n const iconClasses = 'absolute right-4 top-1/2 -translate-y-1/2 text-input-icon hover:text-input-icon--hover focus:outline-none cursor-pointer'\n\n const iconComponents = {\n password: () => (\n <button aria-controls={inputId} aria-label={isVisible ? `Hide ${label ?? 'password'}` : `Show ${label ?? 'password'}`} aria-pressed={isVisible} className={iconClasses} data-testid='spectral-input-password-toggle' onClick={toggleVisibility} type='button'>\n {isVisible ? <EyeClosedIcon size={22} /> : <EyeOpenIcon size={22} />}\n </button>\n ),\n clear: () => (\n <button aria-label={String(`Clear ${label ?? 'input'}`)} className={iconClasses} data-testid='spectral-input-clear-button' onClick={handleClear} type='button'>\n <CloseCircleIcon size={24} />\n </button>\n ),\n loading: () => (\n <div className='right-4 text-input-icon absolute top-1/2 -translate-y-1/2' data-testid='spectral-input-loading-icon'>\n <LoaderIcon size={24} />\n </div>\n ),\n error: () => (\n <div className='right-4 absolute top-1/2 -translate-y-1/2 text-danger-400' data-testid='spectral-input-error-icon'>\n <ErrorIcon size={24} />\n </div>\n ),\n success: () => (\n <div className='right-4 absolute top-1/2 -translate-y-1/2 text-success-400' data-testid='spectral-input-success-icon'>\n <CheckCircleIcon size={24} />\n </div>\n ),\n warning: () => (\n <div className='right-4 absolute top-1/2 -translate-y-1/2 text-warning-400' data-testid='spectral-input-warning-icon'>\n <WarningIcon size={24} />\n </div>\n ),\n }\n\n if (endIcon) return <div className='right-4 text-input-icon absolute top-1/2 -translate-y-1/2'>{endIcon}</div>\n if (type === 'password') return iconComponents.password()\n if (showClearButtonNow) return iconComponents.clear()\n if (isLoading) return iconComponents.loading()\n if (!showStateIcon && (state === 'success' || state === 'warning' || state === 'error')) return null\n if (state === 'success') return iconComponents.success()\n if (state === 'warning') return iconComponents.warning()\n if (state === 'error') return iconComponents.error()\n\n return null\n }\n\n const getStartIcon = (): ReactElement | null => {\n if (startIcon) return startIcon\n return null\n }\n\n const usesTabularNumbers = type === 'number' || type === 'date' || type === 'datetime-local'\n const inputClasses = cn(getInputClasses(state, className), '[text-indent:var(--prefix-width)]', showClearButtonNow && 'pr-10', usesTabularNumbers && 'tabular-nums')\n\n const prefixClasses = cn('inset-y-0 left-4 text-base pointer-events-none absolute flex items-center text-input-text-prefix opacity-100 peer-disabled:opacity-50')\n\n return (\n <div className='space-y-1.5 w-full' data-testid='spectral-input-container'>\n {label && (\n <Label className={cn('mb-2 block', labelClassName, isDisabled && 'cursor-not-allowed text-input-text--disabled placeholder:text-input-text-placeholder')} data-testid='spectral-input-label' htmlFor={inputId}>\n {label}\n </Label>\n )}\n <div className='relative' data-testid='spectral-input-wrapper'>\n <div className='relative'>\n {getStartIcon()}\n {prefix && (\n <span ref={prefixRef} className={prefixClasses}>\n {prefix}\n </span>\n )}\n <input\n aria-label={ariaLabel ?? label}\n autoComplete={getAutoCompleteValue(type)}\n className={inputClasses}\n data-state={state}\n data-testid='spectral-input'\n disabled={isDisabled}\n id={inputId}\n name={name}\n onBlur={handleBlur}\n onChange={handleChange}\n onFocus={handleFocus}\n placeholder={placeholder ?? label}\n ref={inputRef}\n required={required}\n style={\n getFormFieldCSSProperties({\n '--prefix-width': prefix ? `${prefixWidth}px` : '0',\n }) as CSSProperties\n }\n suppressHydrationWarning={suppressHydrationWarning}\n type={type === 'password' ? inputType : type}\n value={value}\n {...ariaProps}\n {...props}\n />\n {getEndIcon()}\n </div>\n\n <ErrorMessage dataTestId='spectral-input-error-message' id={errorMessageId} message={isInvalid ? (errorMessage ?? null) : null} messageReserveLines={messageReserveLines} messageReserveSpace={messageReserveSpace && state === 'error'} />\n <WarningMessage dataTestId='spectral-input-warning-message' id={warningMessageId} message={state === 'warning' ? (warningMessage ?? null) : null} messageReserveLines={messageReserveLines} messageReserveSpace={messageReserveSpace && state === 'warning'} />\n </div>\n </div>\n )\n}\nInput.displayName = 'Input'\n"],"mappings":";;;;;;;;;;;;;;;;;;AA8BA,MAAM,aAAiB,GAAG,SAAyC;AACjE,SAAQ,UAAoB;AAC1B,OAAK,SAAS,QAAQ;AACpB,OAAI,CAAC,IAAK;AACV,OAAI,OAAO,QAAQ,WACjB,KAAI,MAAM;OAET,CAAC,IAA8B,UAAU;IAE5C;;;AAIN,MAAM,wBAAwB,SAA4B;AAWxD,QAAO;EATL,MAAM;EACN,OAAO;EACP,QAAQ;EACR,UAAU;EACV,KAAK;EACL,MAAM;EACN,KAAK;EACL,kBAAkB;EAEE,CAAC,SAAS;;AAGlC,MAAa,SACX,aAGiB;CACjB,MAAM,EACJ,WACA,eAAe,OACf,cACA,UACA,SACA,cACA,IACA,OACA,gBACA,sBAAsB,GACtB,sBAAsB,OACtB,MACA,QACA,UACA,SACA,aACA,QACA,KACA,UACA,kBAAkB,OAClB,gBAAgB,MAChB,WACA,QAAQ,WACR,2BAA2B,MAC3B,OAAO,QACP,OAAO,WACP,gBACA,cAAc,WACd,oBAAoB,iBACpB,GAAG,UACD;CACJ,MAAM,UAAU,eAAe,IAAI,KAAK;CACxC,MAAM,iBAAiB,GAAG,QAAQ;CAClC,MAAM,mBAAmB,GAAG,QAAQ;CACpC,MAAM,EAAE,YAAY,WAAW,cAAc,kBAAkB,UAA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YAAhD,CACG,SACC,oBAAC,OAAD;GAAO,WAAW,GAAG,cAAc,gBAAgB,cAAc,uFAAuF;GAAE,eAAY;GAAuB,SAAS;aACnM;GACK,GAEV,qBAAC,OAAD;GAAK,WAAU;GAAW,eAAY;aAAtC;IACE,qBAAC,OAAD;KAAK,WAAU;eAAf;MACG,cAAc;MACd,UACC,oBAAC,QAAD;OAAM,KAAK;OAAW,WAAW;iBAC9B;OACI;MAET,oBAAC,SAAD;OACE,cAAY,aAAa;OACzB,cAAc,qBAAqB,KAAK;OACxC,WAAW;OACX,cAAY;OACZ,eAAY;OACZ,UAAU;OACV,IAAI;OACE;OACN,QAAQ;OACR,UAAU;OACV,SAAS;OACT,aAAa,eAAe;OAC5B,KAAK;OACK;OACV,OACE,0BAA0B,EACxB,kBAAkB,SAAS,GAAG,YAAY,MAAM,KACjD,CAAC;OAEsB;OAC1B,MAAM,SAAS,aAAa,YAAY;OACjC;OACP,GAAI;OACJ,GAAI;OACJ;MACD,YAAY;MACT;;IAEN,oBAAC,cAAD;KAAc,YAAW;KAA+B,IAAI;KAAgB,SAAS,YAAa,gBAAgB,OAAQ;KAA2B;KAAqB,qBAAqB,uBAAuB,UAAU;KAAW;IAC3O,oBAAC,gBAAD;KAAgB,YAAW;KAAiC,IAAI;KAAkB,SAAS,UAAU,YAAa,kBAAkB,OAAQ;KAA2B;KAAqB,qBAAqB,uBAAuB,UAAU;KAAa;IAC3P;KACF;;;AAGV,MAAM,cAAc"}
|
|
1
|
+
{"version":3,"file":"Input.js","names":[],"sources":["../src/components/Input/Input.tsx"],"sourcesContent":["import { CheckCircleIcon, CloseCircleIcon, ErrorIcon, EyeClosedIcon, EyeOpenIcon, LoaderIcon, WarningIcon } from '@components/Icons'\nimport { Label } from '@components/Label/Label'\nimport { useUncontrolledState } from '@hooks/useUncontrolledState'\nimport { ErrorMessage, WarningMessage, getAriaProps, getFormFieldCSSProperties, getInputClasses, useFormFieldId, useFormFieldState, type BaseFormFieldProps } from '@utils/formFieldUtils'\nimport { cn } from '@utils/twUtils'\nimport { useCallback, useRef, type ChangeEvent, type CSSProperties, type FocusEvent, type InputHTMLAttributes, type ReactElement, type Ref } from 'react'\nimport { useClearOnFocus, usePasswordVisibility, usePrefixWidth } from './InputUtils'\n\nexport type InputType = 'text' | 'email' | 'url' | 'tel' | 'password' | 'number' | 'date' | 'datetime-local'\n\nexport type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'id' | 'onChange'> &\n BaseFormFieldProps & {\n className?: string\n clearOnFocus?: boolean\n endIcon?: ReactElement\n labelClassName?: string\n onBlur?: (e: FocusEvent<HTMLInputElement>) => void\n onChange?: (value: string) => void\n onFocus?: (e: FocusEvent<HTMLInputElement>) => void\n placeholder?: string\n prefix?: string\n showClearButton?: boolean\n showStateIcon?: boolean\n startIcon?: ReactElement\n suppressHydrationWarning?: boolean\n type?: InputType\n value?: string\n warningMessage?: BaseFormFieldProps['errorMessage']\n }\n\nconst mergeRefs = <T,>(...refs: (Ref<T> | undefined)[]): Ref<T> => {\n return (value: T | null) => {\n refs.forEach((ref) => {\n if (!ref) return\n if (typeof ref === 'function') {\n ref(value)\n } else {\n ;(ref as { current: T | null }).current = value\n }\n })\n }\n}\n\nconst getAutoCompleteValue = (type: InputType): string => {\n const autoCompleteMap: Record<InputType, string> = {\n date: 'off',\n email: 'email',\n number: 'off',\n password: 'current-password',\n tel: 'tel',\n text: 'off',\n url: 'url',\n 'datetime-local': 'off',\n }\n return autoCompleteMap[type] || 'off'\n}\n\nexport const Input = (\n allProps: InputProps & {\n ref?: Ref<HTMLInputElement>\n },\n): ReactElement => {\n const {\n className,\n clearOnFocus = false,\n defaultValue,\n disabled,\n endIcon,\n errorMessage,\n id,\n label,\n labelClassName,\n messageReserveLines = 1,\n messageReserveSpace = false,\n name,\n onBlur,\n onChange,\n onFocus,\n placeholder,\n prefix,\n ref,\n required,\n showClearButton = false,\n showStateIcon = true,\n startIcon,\n state = 'default',\n suppressHydrationWarning = true,\n type = 'text',\n value: valueProp,\n warningMessage,\n 'aria-label': ariaLabel,\n 'aria-describedby': ariaDescribedBy,\n ...props\n } = allProps\n const inputId = useFormFieldId(id, name)\n const errorMessageId = `${inputId}-error`\n const warningMessageId = `${inputId}-warning`\n const { isDisabled, isLoading, isInvalid } = useFormFieldState(disabled, state)\n const messageId = state === 'error' ? errorMessageId : state === 'warning' && warningMessage ? warningMessageId : undefined\n const ariaProps = getAriaProps(state, ariaDescribedBy, required, messageId)\n const normalizedDefaultValue = typeof defaultValue === 'string' ? defaultValue : defaultValue !== undefined && defaultValue !== null ? String(defaultValue) : ''\n const [value, setValue] = useUncontrolledState<string>({\n value: valueProp,\n defaultValue: normalizedDefaultValue,\n onChange,\n })\n\n const internalRef = useRef<HTMLInputElement>(null)\n const inputRef = mergeRefs(ref, internalRef)\n\n const { isVisible, toggleVisibility, inputType } = usePasswordVisibility()\n const { prefixWidth, prefixRef } = usePrefixWidth(prefix)\n const { handleFocus: clearOnFocusHandler } = useClearOnFocus(clearOnFocus, (e: ChangeEvent<HTMLInputElement>) => setValue(e.target.value))\n\n const handleBlur = useCallback(\n (e: FocusEvent<HTMLInputElement>): void => {\n onBlur?.(e)\n },\n [onBlur],\n )\n\n const handleFocus = useCallback(\n (e: FocusEvent<HTMLInputElement>): void => {\n clearOnFocusHandler(e, onFocus)\n },\n [clearOnFocusHandler, onFocus],\n )\n\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>): void => {\n const newValue = e.target.value\n setValue(newValue)\n },\n [setValue],\n )\n\n const handleClear = useCallback((): void => {\n const element = internalRef.current\n if (element) {\n setValue('')\n element.focus()\n }\n }, [setValue])\n\n const showClearButtonNow = showClearButton && value.length > 0\n\n const getEndIcon = (): ReactElement | null => {\n const iconClasses = 'absolute right-4 top-1/2 -translate-y-1/2 text-input-icon hover:text-input-icon--hover focus:outline-none cursor-pointer'\n\n const iconComponents = {\n password: () => (\n <button\n aria-controls={inputId}\n aria-label={isVisible ? `Hide ${label ?? 'password'}` : `Show ${label ?? 'password'}`}\n aria-pressed={isVisible}\n className={iconClasses}\n data-testid='spectral-input-password-toggle'\n onClick={toggleVisibility}\n type='button'\n >\n {isVisible ? <EyeClosedIcon size={22} /> : <EyeOpenIcon size={22} />}\n </button>\n ),\n clear: () => (\n <button\n aria-label={String(`Clear ${label ?? 'input'}`)}\n className={iconClasses}\n data-testid='spectral-input-clear-button'\n onClick={handleClear}\n type='button'\n >\n <CloseCircleIcon size={24} />\n </button>\n ),\n loading: () => (\n <div\n className='right-4 text-input-icon absolute top-1/2 -translate-y-1/2'\n data-testid='spectral-input-loading-icon'\n >\n <LoaderIcon size={24} />\n </div>\n ),\n error: () => (\n <div\n className='right-4 absolute top-1/2 -translate-y-1/2 text-danger-400'\n data-testid='spectral-input-error-icon'\n >\n <ErrorIcon size={24} />\n </div>\n ),\n success: () => (\n <div\n className='right-4 absolute top-1/2 -translate-y-1/2 text-success-400'\n data-testid='spectral-input-success-icon'\n >\n <CheckCircleIcon size={24} />\n </div>\n ),\n warning: () => (\n <div\n className='right-4 absolute top-1/2 -translate-y-1/2 text-warning-400'\n data-testid='spectral-input-warning-icon'\n >\n <WarningIcon size={24} />\n </div>\n ),\n }\n\n if (endIcon) return <div className='right-4 text-input-icon absolute top-1/2 -translate-y-1/2'>{endIcon}</div>\n if (type === 'password') return iconComponents.password()\n if (showClearButtonNow) return iconComponents.clear()\n if (isLoading) return iconComponents.loading()\n if (!showStateIcon && (state === 'success' || state === 'warning' || state === 'error')) return null\n if (state === 'success') return iconComponents.success()\n if (state === 'warning') return iconComponents.warning()\n if (state === 'error') return iconComponents.error()\n\n return null\n }\n\n const getStartIcon = (): ReactElement | null => {\n if (startIcon) return startIcon\n return null\n }\n\n const usesTabularNumbers = type === 'number' || type === 'date' || type === 'datetime-local'\n const inputClasses = cn(getInputClasses(state, className), '[text-indent:var(--prefix-width)]', showClearButtonNow && 'pr-10', usesTabularNumbers && 'tabular-nums')\n\n const prefixClasses = cn('inset-y-0 left-4 text-base pointer-events-none absolute flex items-center text-input-text-prefix opacity-100 peer-disabled:opacity-50')\n\n return (\n <div\n className='gap-1.5 flex w-full flex-col'\n data-testid='spectral-input-container'\n >\n {label && (\n <Label\n className={cn('mb-2 block', labelClassName, isDisabled && 'cursor-not-allowed text-input-text--disabled placeholder:text-input-text-placeholder')}\n data-testid='spectral-input-label'\n htmlFor={inputId}\n >\n {label}\n </Label>\n )}\n <div\n className='relative'\n data-testid='spectral-input-wrapper'\n >\n <div className='relative'>\n {getStartIcon()}\n {prefix && (\n <span\n ref={prefixRef}\n className={prefixClasses}\n >\n {prefix}\n </span>\n )}\n <input\n aria-label={ariaLabel ?? label}\n autoComplete={getAutoCompleteValue(type)}\n className={inputClasses}\n data-state={state}\n data-testid='spectral-input'\n disabled={isDisabled}\n id={inputId}\n name={name}\n onBlur={handleBlur}\n onChange={handleChange}\n onFocus={handleFocus}\n placeholder={placeholder ?? label}\n ref={inputRef}\n required={required}\n style={\n getFormFieldCSSProperties({\n '--prefix-width': prefix ? `${prefixWidth}px` : '0',\n }) as CSSProperties\n }\n suppressHydrationWarning={suppressHydrationWarning}\n type={type === 'password' ? inputType : type}\n value={value}\n {...ariaProps}\n {...props}\n />\n {getEndIcon()}\n </div>\n\n <ErrorMessage\n dataTestId='spectral-input-error-message'\n id={errorMessageId}\n message={isInvalid ? (errorMessage ?? null) : null}\n messageReserveLines={messageReserveLines}\n messageReserveSpace={messageReserveSpace && state === 'error'}\n />\n <WarningMessage\n dataTestId='spectral-input-warning-message'\n id={warningMessageId}\n message={state === 'warning' ? (warningMessage ?? null) : null}\n messageReserveLines={messageReserveLines}\n messageReserveSpace={messageReserveSpace && state === 'warning'}\n />\n </div>\n </div>\n )\n}\nInput.displayName = 'Input'\n"],"mappings":";;;;;;;;;;;;;;;;;;AA8BA,MAAM,aAAiB,GAAG,SAAyC;AACjE,SAAQ,UAAoB;AAC1B,OAAK,SAAS,QAAQ;AACpB,OAAI,CAAC,IAAK;AACV,OAAI,OAAO,QAAQ,WAC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BAAC,cAAD;KACE,YAAW;KACX,IAAI;KACJ,SAAS,YAAa,gBAAgB,OAAQ;KACzB;KACrB,qBAAqB,uBAAuB,UAAU;KACtD;IACF,oBAAC,gBAAD;KACE,YAAW;KACX,IAAI;KACJ,SAAS,UAAU,YAAa,kBAAkB,OAAQ;KACrC;KACrB,qBAAqB,uBAAuB,UAAU;KACtD;IACE;KACF;;;AAGV,MAAM,cAAc"}
|
package/dist/InputNumeric.js
CHANGED
|
@@ -147,13 +147,8 @@ const InputNumeric = ({ allowDecimal = true, allowNegative = false, className, d
|
|
|
147
147
|
]);
|
|
148
148
|
const inputMode = allowDecimal ? "decimal" : "numeric";
|
|
149
149
|
const pattern = allowDecimal ? "[0-9]*[.]?[0-9]*" : "[0-9]*";
|
|
150
|
-
const normalizedValue = normalizeDecimalSeparator(value, decimalSeparator);
|
|
151
|
-
const ariaValueNow = normalizedValue === "" || normalizedValue === "-" || normalizedValue === "." ? void 0 : Number.parseFloat(normalizedValue);
|
|
152
150
|
return /* @__PURE__ */ jsx(Input, {
|
|
153
151
|
...props,
|
|
154
|
-
"aria-valuemax": parsedMax,
|
|
155
|
-
"aria-valuemin": effectiveMin,
|
|
156
|
-
"aria-valuenow": Number.isFinite(ariaValueNow) ? ariaValueNow : void 0,
|
|
157
152
|
className: cn("tabular-nums", className),
|
|
158
153
|
inputMode,
|
|
159
154
|
max,
|
|
@@ -164,7 +159,6 @@ const InputNumeric = ({ allowDecimal = true, allowNegative = false, className, d
|
|
|
164
159
|
onKeyDown: handleKeyDown,
|
|
165
160
|
onPaste: handlePaste,
|
|
166
161
|
pattern,
|
|
167
|
-
role: "spinbutton",
|
|
168
162
|
step,
|
|
169
163
|
type: "text",
|
|
170
164
|
value
|
package/dist/InputNumeric.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputNumeric.js","names":[],"sources":["../src/components/InputNumeric/InputNumeric.tsx"],"sourcesContent":["import { Input, type InputProps } from '@components/Input/Input'\nimport { useUncontrolledState } from '@hooks/useUncontrolledState'\nimport { cn } from '@utils/twUtils'\nimport { useCallback, type ClipboardEvent, type KeyboardEvent, type ReactElement } from 'react'\n\ntype NumericKeyDownEvent = KeyboardEvent<HTMLInputElement>\ntype NumericPasteEvent = ClipboardEvent<HTMLInputElement>\n\nconst DIGIT_REGEX = /^\\d$/\nconst DISALLOWED_SPECIAL_KEYS = new Set(['e', 'E', '+'])\nconst ALLOWED_CONTROL_KEYS = new Set(['Backspace', 'Delete', 'ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End', 'Tab', 'Enter', 'Escape'])\n\nconst getDecimalSeparator = (locale?: string): string => {\n try {\n const formattedNumber = new Intl.NumberFormat(locale).formatToParts(1.1)\n return formattedNumber.find((part) => part.type === 'decimal')?.value ?? '.'\n } catch {\n return '.'\n }\n}\n\nconst normalizeDecimalSeparator = (value: string, decimalSeparator: string): string => {\n if (decimalSeparator === '.') return value\n return value.replaceAll(decimalSeparator, '.')\n}\n\nconst sanitizeNumericValue = (value: string, allowDecimal: boolean, allowNegative: boolean, decimalSeparator: string): string => {\n if (!value) return ''\n\n let sanitized = normalizeDecimalSeparator(value, decimalSeparator).replace(/[^\\d.-]/g, '')\n\n if (!allowNegative) {\n sanitized = sanitized.replace(/-/g, '')\n } else {\n sanitized = sanitized.replace(/(?!^)-/g, '')\n if (sanitized.startsWith('--')) {\n sanitized = `-${sanitized.replace(/-/g, '')}`\n }\n }\n\n if (!allowDecimal) {\n sanitized = sanitized.replace(/\\./g, '')\n } else {\n const firstDecimalIndex = sanitized.indexOf('.')\n if (firstDecimalIndex >= 0) {\n const integerPart = sanitized.slice(0, firstDecimalIndex + 1)\n const fractionalPart = sanitized.slice(firstDecimalIndex + 1).replace(/\\./g, '')\n sanitized = `${integerPart}${fractionalPart}`\n }\n }\n\n return sanitized\n}\n\nconst shouldAllowDecimalInput = (target: HTMLInputElement): boolean => {\n if (target.selectionStart === null || target.selectionEnd === null) {\n return !target.value.includes('.')\n }\n\n const selectedText = target.value.slice(target.selectionStart, target.selectionEnd)\n return !target.value.includes('.') || selectedText.includes('.')\n}\n\nconst shouldAllowNegativeInput = (target: HTMLInputElement): boolean => {\n if (target.selectionStart === null || target.selectionEnd === null) {\n return target.value.length === 0\n }\n\n const isAtStart = target.selectionStart === 0\n const selectedText = target.value.slice(target.selectionStart, target.selectionEnd)\n return isAtStart && (!target.value.includes('-') || selectedText.includes('-'))\n}\n\nconst parseNumericProp = (value: number | string | undefined): number | undefined => {\n if (value === undefined || value === null || value === '') return undefined\n const parsed = typeof value === 'number' ? value : Number.parseFloat(value)\n return Number.isFinite(parsed) ? parsed : undefined\n}\n\nconst getDecimalPlaces = (value: number): number => {\n const valueString = value.toString()\n if (!valueString.includes('.')) return 0\n return valueString.split('.')[1]?.length ?? 0\n}\n\nconst roundToPrecision = (value: number, precision: number): number => {\n if (precision <= 0) return value\n const factor = 10 ** precision\n return Math.round(value * factor) / factor\n}\n\nexport type InputNumericProps = Omit<InputProps, 'inputMode' | 'onChange' | 'pattern' | 'type'> & {\n allowDecimal?: boolean\n allowNegative?: boolean\n locale?: string\n /** Number of message lines to reserve (default: 1). */\n messageReserveLines?: number\n /** Whether to keep message space reserved when hidden (default: false). */\n messageReserveSpace?: boolean\n onChange?: (value: string) => void\n value?: string\n}\n\nexport const InputNumeric = ({ allowDecimal = true, allowNegative = false, className, defaultValue = '', locale, max, messageReserveLines = 1, messageReserveSpace = false, min, onChange, onKeyDown, onPaste, step, value: valueProp, ...props }: InputNumericProps): ReactElement => {\n const normalizedDefaultValue = typeof defaultValue === 'string' ? defaultValue : defaultValue !== undefined && defaultValue !== null ? String(defaultValue) : ''\n const [value, setValue] = useUncontrolledState<string>({\n value: valueProp,\n defaultValue: normalizedDefaultValue,\n onChange,\n })\n const decimalSeparator = getDecimalSeparator(locale)\n const parsedMin = parseNumericProp(min)\n const parsedMax = parseNumericProp(max)\n const parsedStep = parseNumericProp(step)\n const stepValue = parsedStep && parsedStep > 0 ? parsedStep : 1\n const effectiveMin = parsedMin ?? (!allowNegative ? 0 : undefined)\n\n const handleKeyDown = useCallback(\n (event: NumericKeyDownEvent): void => {\n onKeyDown?.(event)\n if (event.defaultPrevented || event.nativeEvent.isComposing) return\n\n if (event.metaKey || event.ctrlKey || event.altKey) return\n if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {\n event.preventDefault()\n\n const direction = event.key === 'ArrowUp' ? 1 : -1\n const normalizedValue = normalizeDecimalSeparator(value, decimalSeparator)\n const currentValue = Number.parseFloat(normalizedValue)\n const hasCurrentValue = Number.isFinite(currentValue)\n const baseValue = hasCurrentValue ? currentValue : (effectiveMin ?? 0)\n\n let nextValue = baseValue + direction * stepValue\n if (effectiveMin !== undefined) {\n nextValue = Math.max(effectiveMin, nextValue)\n }\n if (parsedMax !== undefined) {\n nextValue = Math.min(parsedMax, nextValue)\n }\n\n if (!allowDecimal) {\n nextValue = Math.trunc(nextValue)\n }\n\n const precision = allowDecimal ? getDecimalPlaces(stepValue) : 0\n const roundedValue = roundToPrecision(nextValue, precision)\n const safeValue = Object.is(roundedValue, -0) ? 0 : roundedValue\n const nextString = precision > 0 ? safeValue.toFixed(precision).replace(/\\.?0+$/, '') : safeValue.toString()\n setValue(sanitizeNumericValue(nextString, allowDecimal, allowNegative, decimalSeparator))\n return\n }\n\n if (ALLOWED_CONTROL_KEYS.has(event.key)) return\n if (DIGIT_REGEX.test(event.key)) return\n\n if (DISALLOWED_SPECIAL_KEYS.has(event.key)) {\n event.preventDefault()\n return\n }\n\n const isDecimalKey = event.key === '.' || event.key === decimalSeparator\n\n if (isDecimalKey) {\n if (!allowDecimal || !shouldAllowDecimalInput(event.currentTarget)) {\n event.preventDefault()\n }\n return\n }\n\n if (event.key === '-') {\n if (!allowNegative || !shouldAllowNegativeInput(event.currentTarget)) {\n event.preventDefault()\n }\n return\n }\n\n event.preventDefault()\n },\n [allowDecimal, allowNegative, decimalSeparator, effectiveMin, onKeyDown, parsedMax, setValue, stepValue, value],\n )\n\n const handlePaste = useCallback(\n (event: NumericPasteEvent): void => {\n onPaste?.(event)\n },\n [onPaste],\n )\n\n const handleChange = useCallback(\n (newValue: string): void => {\n setValue(sanitizeNumericValue(newValue, allowDecimal, allowNegative, decimalSeparator))\n },\n [allowDecimal, allowNegative, decimalSeparator, setValue],\n )\n\n const inputMode = allowDecimal ? 'decimal' : 'numeric'\n const pattern = allowDecimal ? '[0-9]*[.]?[0-9]*' : '[0-9]*'\n const normalizedValue = normalizeDecimalSeparator(value, decimalSeparator)\n const ariaValueNow = normalizedValue === '' || normalizedValue === '-' || normalizedValue === '.' ? undefined : Number.parseFloat(normalizedValue)\n\n return (\n <Input\n {...props}\n aria-valuemax={parsedMax}\n aria-valuemin={effectiveMin}\n aria-valuenow={Number.isFinite(ariaValueNow) ? ariaValueNow : undefined}\n className={cn('tabular-nums', className)}\n inputMode={inputMode}\n max={max}\n messageReserveLines={messageReserveLines}\n messageReserveSpace={messageReserveSpace}\n min={min}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n onPaste={handlePaste}\n pattern={pattern}\n role='spinbutton'\n step={step}\n type='text'\n value={value}\n />\n )\n}\n\nInputNumeric.displayName = 'InputNumeric'\n"],"mappings":";;;;;;;;AAQA,MAAM,cAAc;AACpB,MAAM,0BAA0B,IAAI,IAAI;CAAC;CAAK;CAAK;CAAI,CAAC;AACxD,MAAM,uBAAuB,IAAI,IAAI;CAAC;CAAa;CAAU;CAAa;CAAc;CAAW;CAAa;CAAQ;CAAO;CAAO;CAAS;CAAS,CAAC;AAEzJ,MAAM,uBAAuB,WAA4B;AACvD,KAAI;AAEF,SADwB,IAAI,KAAK,aAAa,OAAO,CAAC,cAAc,IAC9C,CAAC,MAAM,SAAS,KAAK,SAAS,UAAU,EAAE,SAAS;SACnE;AACN,SAAO;;;AAIX,MAAM,6BAA6B,OAAe,qBAAqC;AACrF,KAAI,qBAAqB,IAAK,QAAO;AACrC,QAAO,MAAM,WAAW,kBAAkB,IAAI;;AAG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YAAY;CAC7C,MAAM,UAAU,eAAe,qBAAqB;CACpD,MAAM,kBAAkB,0BAA0B,OAAO,iBAAiB;CAC1E,MAAM,eAAe,oBAAoB,MAAM,oBAAoB,OAAO,oBAAoB,MAAM,SAAY,OAAO,WAAW,gBAAgB;AAElJ,QACE,oBAAC,OAAD;EACE,GAAI;EACJ,iBAAe;EACf,iBAAe;EACf,iBAAe,OAAO,SAAS,aAAa,GAAG,eAAe;EAC9D,WAAW,GAAG,gBAAgB,UAAU;EAC7B;EACN;EACgB;EACA;EAChB;EACL,UAAU;EACV,WAAW;EACX,SAAS;EACA;EACT,MAAK;EACC;EACN,MAAK;EACE;EACP;;AAIN,aAAa,cAAc"}
|
|
1
|
+
{"version":3,"file":"InputNumeric.js","names":[],"sources":["../src/components/InputNumeric/InputNumeric.tsx"],"sourcesContent":["import { Input, type InputProps } from '@components/Input/Input'\nimport { useUncontrolledState } from '@hooks/useUncontrolledState'\nimport { cn } from '@utils/twUtils'\nimport { useCallback, type ClipboardEvent, type KeyboardEvent, type ReactElement } from 'react'\n\ntype NumericKeyDownEvent = KeyboardEvent<HTMLInputElement>\ntype NumericPasteEvent = ClipboardEvent<HTMLInputElement>\n\nconst DIGIT_REGEX = /^\\d$/\nconst DISALLOWED_SPECIAL_KEYS = new Set(['e', 'E', '+'])\nconst ALLOWED_CONTROL_KEYS = new Set(['Backspace', 'Delete', 'ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End', 'Tab', 'Enter', 'Escape'])\n\nconst getDecimalSeparator = (locale?: string): string => {\n try {\n const formattedNumber = new Intl.NumberFormat(locale).formatToParts(1.1)\n return formattedNumber.find((part) => part.type === 'decimal')?.value ?? '.'\n } catch {\n return '.'\n }\n}\n\nconst normalizeDecimalSeparator = (value: string, decimalSeparator: string): string => {\n if (decimalSeparator === '.') return value\n return value.replaceAll(decimalSeparator, '.')\n}\n\nconst sanitizeNumericValue = (value: string, allowDecimal: boolean, allowNegative: boolean, decimalSeparator: string): string => {\n if (!value) return ''\n\n let sanitized = normalizeDecimalSeparator(value, decimalSeparator).replace(/[^\\d.-]/g, '')\n\n if (!allowNegative) {\n sanitized = sanitized.replace(/-/g, '')\n } else {\n sanitized = sanitized.replace(/(?!^)-/g, '')\n if (sanitized.startsWith('--')) {\n sanitized = `-${sanitized.replace(/-/g, '')}`\n }\n }\n\n if (!allowDecimal) {\n sanitized = sanitized.replace(/\\./g, '')\n } else {\n const firstDecimalIndex = sanitized.indexOf('.')\n if (firstDecimalIndex >= 0) {\n const integerPart = sanitized.slice(0, firstDecimalIndex + 1)\n const fractionalPart = sanitized.slice(firstDecimalIndex + 1).replace(/\\./g, '')\n sanitized = `${integerPart}${fractionalPart}`\n }\n }\n\n return sanitized\n}\n\nconst shouldAllowDecimalInput = (target: HTMLInputElement): boolean => {\n if (target.selectionStart === null || target.selectionEnd === null) {\n return !target.value.includes('.')\n }\n\n const selectedText = target.value.slice(target.selectionStart, target.selectionEnd)\n return !target.value.includes('.') || selectedText.includes('.')\n}\n\nconst shouldAllowNegativeInput = (target: HTMLInputElement): boolean => {\n if (target.selectionStart === null || target.selectionEnd === null) {\n return target.value.length === 0\n }\n\n const isAtStart = target.selectionStart === 0\n const selectedText = target.value.slice(target.selectionStart, target.selectionEnd)\n return isAtStart && (!target.value.includes('-') || selectedText.includes('-'))\n}\n\nconst parseNumericProp = (value: number | string | undefined): number | undefined => {\n if (value === undefined || value === null || value === '') return undefined\n const parsed = typeof value === 'number' ? value : Number.parseFloat(value)\n return Number.isFinite(parsed) ? parsed : undefined\n}\n\nconst getDecimalPlaces = (value: number): number => {\n const valueString = value.toString()\n if (!valueString.includes('.')) return 0\n return valueString.split('.')[1]?.length ?? 0\n}\n\nconst roundToPrecision = (value: number, precision: number): number => {\n if (precision <= 0) return value\n const factor = 10 ** precision\n return Math.round(value * factor) / factor\n}\n\nexport type InputNumericProps = Omit<InputProps, 'inputMode' | 'onChange' | 'pattern' | 'type'> & {\n allowDecimal?: boolean\n allowNegative?: boolean\n locale?: string\n /** Number of message lines to reserve (default: 1). */\n messageReserveLines?: number\n /** Whether to keep message space reserved when hidden (default: false). */\n messageReserveSpace?: boolean\n onChange?: (value: string) => void\n value?: string\n}\n\nexport const InputNumeric = ({ allowDecimal = true, allowNegative = false, className, defaultValue = '', locale, max, messageReserveLines = 1, messageReserveSpace = false, min, onChange, onKeyDown, onPaste, step, value: valueProp, ...props }: InputNumericProps): ReactElement => {\n const normalizedDefaultValue = typeof defaultValue === 'string' ? defaultValue : defaultValue !== undefined && defaultValue !== null ? String(defaultValue) : ''\n const [value, setValue] = useUncontrolledState<string>({\n value: valueProp,\n defaultValue: normalizedDefaultValue,\n onChange,\n })\n const decimalSeparator = getDecimalSeparator(locale)\n const parsedMin = parseNumericProp(min)\n const parsedMax = parseNumericProp(max)\n const parsedStep = parseNumericProp(step)\n const stepValue = parsedStep && parsedStep > 0 ? parsedStep : 1\n const effectiveMin = parsedMin ?? (!allowNegative ? 0 : undefined)\n\n const handleKeyDown = useCallback(\n (event: NumericKeyDownEvent): void => {\n onKeyDown?.(event)\n if (event.defaultPrevented || event.nativeEvent.isComposing) return\n\n if (event.metaKey || event.ctrlKey || event.altKey) return\n if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {\n event.preventDefault()\n\n const direction = event.key === 'ArrowUp' ? 1 : -1\n const normalizedValue = normalizeDecimalSeparator(value, decimalSeparator)\n const currentValue = Number.parseFloat(normalizedValue)\n const hasCurrentValue = Number.isFinite(currentValue)\n const baseValue = hasCurrentValue ? currentValue : (effectiveMin ?? 0)\n\n let nextValue = baseValue + direction * stepValue\n if (effectiveMin !== undefined) {\n nextValue = Math.max(effectiveMin, nextValue)\n }\n if (parsedMax !== undefined) {\n nextValue = Math.min(parsedMax, nextValue)\n }\n\n if (!allowDecimal) {\n nextValue = Math.trunc(nextValue)\n }\n\n const precision = allowDecimal ? getDecimalPlaces(stepValue) : 0\n const roundedValue = roundToPrecision(nextValue, precision)\n const safeValue = Object.is(roundedValue, -0) ? 0 : roundedValue\n const nextString = precision > 0 ? safeValue.toFixed(precision).replace(/\\.?0+$/, '') : safeValue.toString()\n setValue(sanitizeNumericValue(nextString, allowDecimal, allowNegative, decimalSeparator))\n return\n }\n\n if (ALLOWED_CONTROL_KEYS.has(event.key)) return\n if (DIGIT_REGEX.test(event.key)) return\n\n if (DISALLOWED_SPECIAL_KEYS.has(event.key)) {\n event.preventDefault()\n return\n }\n\n const isDecimalKey = event.key === '.' || event.key === decimalSeparator\n\n if (isDecimalKey) {\n if (!allowDecimal || !shouldAllowDecimalInput(event.currentTarget)) {\n event.preventDefault()\n }\n return\n }\n\n if (event.key === '-') {\n if (!allowNegative || !shouldAllowNegativeInput(event.currentTarget)) {\n event.preventDefault()\n }\n return\n }\n\n event.preventDefault()\n },\n [allowDecimal, allowNegative, decimalSeparator, effectiveMin, onKeyDown, parsedMax, setValue, stepValue, value],\n )\n\n const handlePaste = useCallback(\n (event: NumericPasteEvent): void => {\n onPaste?.(event)\n },\n [onPaste],\n )\n\n const handleChange = useCallback(\n (newValue: string): void => {\n setValue(sanitizeNumericValue(newValue, allowDecimal, allowNegative, decimalSeparator))\n },\n [allowDecimal, allowNegative, decimalSeparator, setValue],\n )\n\n const inputMode = allowDecimal ? 'decimal' : 'numeric'\n const pattern = allowDecimal ? '[0-9]*[.]?[0-9]*' : '[0-9]*'\n\n return (\n <Input\n {...props}\n className={cn('tabular-nums', className)}\n inputMode={inputMode}\n max={max}\n messageReserveLines={messageReserveLines}\n messageReserveSpace={messageReserveSpace}\n min={min}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n onPaste={handlePaste}\n pattern={pattern}\n step={step}\n type='text'\n value={value}\n />\n )\n}\n\nInputNumeric.displayName = 'InputNumeric'\n"],"mappings":";;;;;;;;AAQA,MAAM,cAAc;AACpB,MAAM,0BAA0B,IAAI,IAAI;CAAC;CAAK;CAAK;CAAI,CAAC;AACxD,MAAM,uBAAuB,IAAI,IAAI;CAAC;CAAa;CAAU;CAA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BAAgB;AAExB;;AAGF,QAAM,gBAAgB;IAExB;EAAC;EAAc;EAAe;EAAkB;EAAc;EAAW;EAAW;EAAU;EAAW;EAAM,CAChH;CAED,MAAM,cAAc,aACjB,UAAmC;AAClC,YAAU,MAAM;IAElB,CAAC,QAAQ,CACV;CAED,MAAM,eAAe,aAClB,aAA2B;AAC1B,WAAS,qBAAqB,UAAU,cAAc,eAAe,iBAAiB,CAAC;IAEzF;EAAC;EAAc;EAAe;EAAkB;EAAS,CAC1D;CAED,MAAM,YAAY,eAAe,YAAY;CAC7C,MAAM,UAAU,eAAe,qBAAqB;AAEpD,QACE,oBAAC,OAAD;EACE,GAAI;EACJ,WAAW,GAAG,gBAAgB,UAAU;EAC7B;EACN;EACgB;EACA;EAChB;EACL,UAAU;EACV,WAAW;EACX,SAAS;EACA;EACH;EACN,MAAK;EACE;EACP;;AAIN,aAAa,cAAc"}
|
package/dist/InputOTP.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputOTP.d.ts","names":[],"sources":["../src/components/InputOTP/InputOTP.tsx"],"mappings":";;;;;;;UAMiB,iBAAA,SAA0B,IAAA,CAAK,aAAA;EAC9C,UAAA,OAAiB,IAAA;EACjB,SAAA;EACA,YAAA;EACA,SAAA;EACA,mBAAA;EACA,mBAAA;EAQQ;;;;;EAFR,OAAA;EACA,SAAA;EACA,KAAA,GAAQ,cAAA;EACR,OAAA;AAAA;AAAA,KAGU,aAAA,GAAgB,iBAAA;EAAuB,KAAA;EAAwB,QAAA,GAAW,QAAA;AAAA;EAAyC,KAAA;EAAe,QAAA;AAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"InputOTP.d.ts","names":[],"sources":["../src/components/InputOTP/InputOTP.tsx"],"mappings":";;;;;;;UAMiB,iBAAA,SAA0B,IAAA,CAAK,aAAA;EAC9C,UAAA,OAAiB,IAAA;EACjB,SAAA;EACA,YAAA;EACA,SAAA;EACA,mBAAA;EACA,mBAAA;EAQQ;;;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