@spear-ai/spectral 1.3.62 → 1.3.64
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/.js +205 -152
- package/dist/Accordion.d.ts +37 -0
- package/dist/Accordion.js +474 -0
- package/dist/Alert/AlertBase.js +2 -2
- package/dist/Alert.js +21 -11
- package/dist/Avatar.js +1 -1
- package/dist/Badge.d.ts +12 -2
- package/dist/Badge.js +28 -4
- package/dist/Button.d.ts +3 -3
- package/dist/Button.js +35 -28
- package/dist/ButtonGroup/ButtonGroupButton.d.ts +13 -0
- package/dist/ButtonGroup/ButtonGroupButton.js +51 -0
- package/dist/ButtonGroup.d.ts +29 -0
- package/dist/ButtonGroup.js +89 -0
- package/dist/ButtonIcon.js +11 -1
- package/dist/Card.d.ts +16 -0
- package/dist/Card.js +32 -0
- package/dist/Checkbox/CheckboxBase.js +1 -1
- package/dist/Checkbox.js +22 -14
- package/dist/Dialog/DialogBase.d.ts +6 -3
- package/dist/Dialog/DialogBase.js +113 -98
- package/dist/Dialog.d.ts +1 -1
- package/dist/Dialog.js +42 -36
- package/dist/Drawer.js +24 -1283
- package/dist/HoverCard.d.ts +29 -0
- package/dist/HoverCard.js +207 -0
- package/dist/Icons/AnalyzeIcon.d.ts +3 -0
- package/dist/Icons/AnalyzeIcon.js +73 -0
- package/dist/Icons/AnnotationsIcon.js +4 -4
- package/dist/Icons/ApprovedIcon.d.ts +3 -0
- package/dist/Icons/ApprovedIcon.js +43 -0
- package/dist/Icons/CalendarIcon.js +7 -7
- package/dist/Icons/CheckCircleIcon.js +14 -14
- package/dist/Icons/CheckSquareIcon.js +14 -14
- package/dist/Icons/CheckmarkIcon.js +9 -9
- package/dist/Icons/ChevronDownIcon.js +6 -6
- package/dist/Icons/ChevronUpIcon.js +7 -7
- package/dist/Icons/ClockIcon.js +10 -10
- package/dist/Icons/CloseCircleIcon.js +10 -10
- package/dist/Icons/CloseIcon.js +5 -5
- package/dist/Icons/DashboardIcon.js +4 -4
- package/dist/Icons/DatabaseIcon.d.ts +3 -0
- package/dist/Icons/DatabaseIcon.js +53 -0
- package/dist/Icons/DeleteIcon.js +24 -6
- package/dist/Icons/DurationIcon.js +7 -7
- package/dist/Icons/EmailIcon.js +4 -4
- package/dist/Icons/EraserIcon.js +20 -11
- package/dist/Icons/ErrorIcon.js +3 -3
- package/dist/Icons/EyeClosedIcon.js +2 -2
- package/dist/Icons/EyeClosedIcon2.js +18 -18
- package/dist/Icons/EyeOpenIcon.js +8 -8
- package/dist/Icons/GoToFirstIcon.js +1 -1
- package/dist/Icons/GoToLastIcon.js +3 -3
- package/dist/Icons/HarmonicCursorsIcon.js +4 -4
- package/dist/Icons/IconBase.d.ts +1 -1
- package/dist/Icons/IconBase.js +15 -17
- package/dist/Icons/InfoIcon.js +4 -4
- package/dist/Icons/LabelIcon.js +6 -6
- package/dist/Icons/LassoIcon.js +6 -6
- package/dist/Icons/LineToolIcon.js +22 -93
- package/dist/Icons/LineToolIcon2.d.ts +3 -0
- package/dist/Icons/LineToolIcon2.js +73 -0
- package/dist/Icons/LiveViewIcon.js +5 -5
- package/dist/Icons/LoaderIcon.js +5 -5
- package/dist/Icons/LocationIcon.js +5 -5
- package/dist/Icons/LogoutIcon.js +11 -11
- package/dist/Icons/MessagesIcon.d.ts +3 -0
- package/dist/Icons/MessagesIcon.js +34 -0
- package/dist/Icons/MetadataIcon.js +5 -5
- package/dist/Icons/MinusIcon.js +9 -9
- package/dist/Icons/OntologyIcon.js +74 -21
- package/dist/Icons/PanelIconClose.js +11 -11
- package/dist/Icons/PanelIconOpen.js +11 -11
- package/dist/Icons/PlayIcon.js +5 -5
- package/dist/Icons/PlusIcon.js +9 -8
- package/dist/Icons/ResetIcon.js +6 -6
- package/dist/Icons/ReviewedIcon.d.ts +3 -0
- package/dist/Icons/ReviewedIcon.js +44 -0
- package/dist/Icons/ScissorsIcon.js +9 -9
- package/dist/Icons/SettingsIcon.js +20 -22
- package/dist/Icons/SortAscendingIcon.d.ts +3 -0
- package/dist/Icons/SortAscendingIcon.js +73 -0
- package/dist/Icons/SortDescendingIcon.d.ts +3 -0
- package/dist/Icons/SortDescendingIcon.js +73 -0
- package/dist/Icons/StackIcon.d.ts +3 -0
- package/dist/Icons/StackIcon.js +43 -0
- package/dist/Icons/StarIcon.d.ts +3 -0
- package/dist/Icons/StarIcon.js +31 -0
- package/dist/Icons/TrashIcon.js +10 -10
- package/dist/Icons/UndoIcon.js +1 -1
- package/dist/Icons/UserIcon.js +1 -1
- package/dist/Icons/WarningIcon.js +9 -9
- package/dist/Icons/ZoomAllIcon.js +97 -57
- package/dist/Icons/ZoomXIcon.js +6 -6
- package/dist/Icons/ZoomYIcon.js +17 -8
- package/dist/Icons/index.d.ts +10 -0
- package/dist/Icons.js +114 -94
- package/dist/Input.d.ts +2 -0
- package/dist/Input.js +100 -82
- package/dist/InputGroup.d.ts +16 -0
- package/dist/InputGroup.js +129 -0
- package/dist/InputOTP.d.ts +0 -2
- package/dist/InputOTP.js +148 -143
- package/dist/Label.d.ts +3 -7
- package/dist/Label.js +11 -11
- package/dist/MultiSelect/MultiSelectBase.js +28 -28
- package/dist/Popover.d.ts +6 -7
- package/dist/Popover.js +60 -71
- package/dist/RadioButtonGroup/RadioButtonGroupBase.js +1 -1
- package/dist/RadioButtonGroup.js +1 -1
- package/dist/RadioGroup.d.ts +1 -1
- package/dist/RadioGroup.js +141 -134
- package/dist/Select.d.ts +12 -12
- package/dist/Select.js +106 -895
- package/dist/Separator.d.ts +12 -0
- package/dist/Separator.js +24 -0
- package/dist/Skeleton.js +3 -3
- package/dist/Slider.d.ts +15 -3
- package/dist/Slider.js +464 -40
- package/dist/Switch/SwitchBase.js +1 -1
- package/dist/Switch.js +2 -2
- package/dist/Tabs/TabsBase.js +1 -1
- package/dist/Tabs.js +16 -16
- package/dist/Textarea.js +58 -50
- package/dist/Toggle.js +2 -2
- package/dist/ToggleGroup.js +1 -1
- package/dist/Tooltip/TooltipBase.js +29 -29
- package/dist/Tooltip.js +15 -15
- package/dist/Tray/TrayStoriesData.d.ts +39 -0
- package/dist/Tray/TrayStoriesData.js +438 -0
- package/dist/Tray.d.ts +28 -0
- package/dist/Tray.js +236 -0
- package/dist/analyzer/network.webp +0 -0
- package/dist/analyzer/sunburst.webp +0 -0
- package/dist/analyzer/visual.webp +0 -0
- package/dist/clsx-OuTLNxxd.js +16 -0
- package/dist/components/Accordion/Accordion.d.ts +37 -0
- package/dist/components/Accordion/Accordion.d.ts.map +1 -0
- package/dist/components/Badge/Badge.d.ts +12 -2
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Button/Button.d.ts +3 -3
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +29 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts.map +1 -0
- package/dist/components/ButtonGroup/ButtonGroupButton.d.ts +13 -0
- package/dist/components/ButtonGroup/ButtonGroupButton.d.ts.map +1 -0
- package/dist/components/Card/Card.d.ts +16 -0
- package/dist/components/Card/Card.d.ts.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog/DialogBase.d.ts +6 -3
- package/dist/components/Dialog/DialogBase.d.ts.map +1 -1
- package/dist/components/HoverCard/HoverCard.d.ts +29 -0
- package/dist/components/HoverCard/HoverCard.d.ts.map +1 -0
- package/dist/components/Icons/AnalyzeIcon.d.ts +3 -0
- package/dist/components/Icons/AnalyzeIcon.d.ts.map +1 -0
- package/dist/components/Icons/ApprovedIcon.d.ts +3 -0
- package/dist/components/Icons/ApprovedIcon.d.ts.map +1 -0
- package/dist/components/Icons/DatabaseIcon.d.ts +3 -0
- package/dist/components/Icons/DatabaseIcon.d.ts.map +1 -0
- package/dist/components/Icons/DeleteIcon.d.ts.map +1 -1
- package/dist/components/Icons/EraserIcon.d.ts.map +1 -1
- package/dist/components/Icons/IconBase.d.ts +1 -1
- package/dist/components/Icons/IconBase.d.ts.map +1 -1
- package/dist/components/Icons/LineToolIcon.d.ts.map +1 -1
- package/dist/components/Icons/LineToolIcon2.d.ts +3 -0
- package/dist/components/Icons/LineToolIcon2.d.ts.map +1 -0
- package/dist/components/Icons/MessagesIcon.d.ts +3 -0
- package/dist/components/Icons/MessagesIcon.d.ts.map +1 -0
- package/dist/components/Icons/OntologyIcon.d.ts.map +1 -1
- package/dist/components/Icons/PlusIcon.d.ts.map +1 -1
- package/dist/components/Icons/ReviewedIcon.d.ts +3 -0
- package/dist/components/Icons/ReviewedIcon.d.ts.map +1 -0
- package/dist/components/Icons/SettingsIcon.d.ts.map +1 -1
- package/dist/components/Icons/SortAscendingIcon.d.ts +3 -0
- package/dist/components/Icons/SortAscendingIcon.d.ts.map +1 -0
- package/dist/components/Icons/SortDescendingIcon.d.ts +3 -0
- package/dist/components/Icons/SortDescendingIcon.d.ts.map +1 -0
- package/dist/components/Icons/StackIcon.d.ts +3 -0
- package/dist/components/Icons/StackIcon.d.ts.map +1 -0
- package/dist/components/Icons/StarIcon.d.ts +3 -0
- package/dist/components/Icons/StarIcon.d.ts.map +1 -0
- package/dist/components/Icons/ZoomAllIcon.d.ts.map +1 -1
- package/dist/components/Icons/ZoomYIcon.d.ts.map +1 -1
- package/dist/components/Icons/index.d.ts +10 -0
- package/dist/components/Icons/index.d.ts.map +1 -1
- package/dist/components/Input/Input.d.ts +2 -0
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/InputGroup/InputGroup.d.ts +16 -0
- package/dist/components/InputGroup/InputGroup.d.ts.map +1 -0
- package/dist/components/InputOTP/InputOTP.d.ts +0 -2
- package/dist/components/InputOTP/InputOTP.d.ts.map +1 -1
- package/dist/components/Label/Label.d.ts +3 -7
- package/dist/components/Label/Label.d.ts.map +1 -1
- package/dist/components/Popover/Popover.d.ts +6 -7
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts +12 -12
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Separator/Separator.d.ts +12 -0
- package/dist/components/Separator/Separator.d.ts.map +1 -0
- package/dist/components/Slider/Slider.d.ts +15 -3
- package/dist/components/Slider/Slider.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/Tray/Tray.d.ts +28 -0
- package/dist/components/Tray/Tray.d.ts.map +1 -0
- package/dist/components/Tray/TrayStoriesData.d.ts +39 -0
- package/dist/components/Tray/TrayStoriesData.d.ts.map +1 -0
- package/dist/{createLucideIcon-CI1yJrZf.js → createLucideIcon-B_8CJpcQ.js} +4 -4
- package/dist/features/AuthCard/ForgotPasswordEmailForm.js +13 -3
- package/dist/features/AuthCard/ForgotPasswordResetForm.js +9 -9
- package/dist/features/AuthCard/PasswordInput.js +87 -9
- package/dist/features/AuthCard/SignInForm.js +25 -15
- package/dist/features/AuthCard/SignUpForm.js +24 -14
- package/dist/features/AuthCard.js +2 -2
- package/dist/features/LabelingTools.js +16 -6
- package/dist/features/SensorMetadata.js +15 -5
- package/dist/features/SettingsPopover.js +22 -12
- package/dist/index-0ioNhtNM.js +10 -0
- package/dist/{index-CBwRmAsQ.js → index-6Abv_Flm.js} +1 -1
- package/dist/{index-DUK1rxhf.js → index-B-GQStVW.js} +6 -5
- package/dist/index-B2oBi8ng.js +142 -0
- package/dist/index-BIpuW_o8.js +146 -0
- package/dist/index-BZPx6jYI.js +8 -0
- package/dist/index-BhufZRa2.js +232 -0
- package/dist/index-CAKA12cC.js +1265 -0
- package/dist/{index-Cfyte2YO.js → index-CGALWSq_.js} +1 -1
- package/dist/index-CVSxKOPp.js +13 -0
- package/dist/index-CevVJ05e.js +822 -0
- package/dist/{index-CRBC94ik.js → index-D29mdTf5.js} +1 -1
- package/dist/{index-FeGk8zep.js → index-NzygPVvJ.js} +10 -9
- package/dist/index-UEFPWH8U.js +54 -0
- package/dist/index-rKs9bXHr.js +6 -0
- package/dist/{index-Cb7rjMhE.js → index-y6Br5T4h.js} +6 -6
- package/dist/index.d.ts +11 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/linear-cursor-small.png +0 -0
- package/dist/{loader-circle-CvdzOiQ_.js → loader-circle-CdRVlFhN.js} +2 -2
- package/dist/main.js +15630 -13510
- package/dist/message-alert-matte-glass-gradient.webp +0 -0
- package/dist/primitives/button.d.ts +10 -0
- package/dist/primitives/button.d.ts.map +1 -0
- package/dist/primitives/button.js +42 -0
- package/dist/primitives/input.d.ts +3 -0
- package/dist/primitives/input.d.ts.map +1 -0
- package/dist/primitives/input.js +18 -0
- package/dist/primitives/select.d.ts +16 -0
- package/dist/primitives/select.d.ts.map +1 -0
- package/dist/primitives/select.js +205 -0
- package/dist/primitives/slot.d.ts.map +1 -1
- package/dist/primitives/slot.js +21 -20
- package/dist/primitives/textarea.d.ts +3 -0
- package/dist/primitives/textarea.d.ts.map +1 -0
- package/dist/primitives/textarea.js +16 -0
- package/dist/{proxy-DD79Ok6n.js → proxy-C9AqCss6.js} +1 -1
- package/dist/speech-bubble-fluid-glass-gradient.webp +0 -0
- package/dist/styles/main.css +1 -1
- package/dist/utils/formFieldUtils.js +1 -1
- package/dist/utils/twUtils.js +2728 -2
- package/dist/{x-BBpi7a_7.js → x-Dl66o_vF.js} +2 -2
- package/package.json +28 -23
- package/dist/Accordion/AccordionBase.d.ts +0 -42
- package/dist/Accordion/AccordionBase.js +0 -225
- package/dist/Badge/BadgeBase.d.ts +0 -13
- package/dist/Badge/BadgeBase.js +0 -35
- package/dist/PasswordInput-ClY_hxuN.js +0 -261
- package/dist/components/Accordion/AccordionBase.d.ts +0 -42
- package/dist/components/Accordion/AccordionBase.d.ts.map +0 -1
- package/dist/components/Badge/BadgeBase.d.ts +0 -13
- package/dist/components/Badge/BadgeBase.d.ts.map +0 -1
- package/dist/index-CA7haECj.js +0 -248
- package/dist/index-CbXx14YO.js +0 -59
- package/dist/index-VXXKXen4.js +0 -15
- package/dist/index-cCg4yNa8.js +0 -132
- package/dist/primitives/label.d.ts +0 -5
- package/dist/primitives/label.d.ts.map +0 -1
- package/dist/primitives/label.js +0 -27
- package/dist/twUtils-CRiPKpXj.js +0 -2743
- /package/dist/{list.yml.webp → analyzer/list.yml.webp} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as o } from "./createLucideIcon-
|
|
1
|
+
import { c as o } from "./createLucideIcon-B_8CJpcQ.js";
|
|
2
2
|
/**
|
|
3
|
-
* @license lucide-react v0.
|
|
3
|
+
* @license lucide-react v0.546.0 - ISC
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the ISC license.
|
|
6
6
|
* See the LICENSE file in the root directory of this source tree.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spear-ai/spectral",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.64",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"repository": {
|
|
@@ -51,54 +51,59 @@
|
|
|
51
51
|
"**/*.css"
|
|
52
52
|
],
|
|
53
53
|
"dependencies": {
|
|
54
|
+
"@radix-ui/react-accordion": "^1.2.12",
|
|
55
|
+
"@radix-ui/react-hover-card": "^1.1.15",
|
|
54
56
|
"@radix-ui/react-popover": "^1.1.15",
|
|
55
57
|
"@radix-ui/react-radio-group": "^1.3.8",
|
|
56
58
|
"@radix-ui/react-select": "^2.2.6",
|
|
59
|
+
"@radix-ui/react-slider": "^1.3.6",
|
|
57
60
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
58
61
|
"class-variance-authority": "^0.7.1",
|
|
59
62
|
"clsx": "^2.1.1",
|
|
60
63
|
"cmdk": "^1.1.1",
|
|
64
|
+
"framer-motion": "^12.23.24",
|
|
61
65
|
"input-otp": "^1.4.2",
|
|
62
|
-
"lucide-react": "^0.
|
|
63
|
-
"motion": "^12.23.
|
|
64
|
-
"react-day-picker": "^9.
|
|
66
|
+
"lucide-react": "^0.546.0",
|
|
67
|
+
"motion": "^12.23.24",
|
|
68
|
+
"react-day-picker": "^9.11.1",
|
|
69
|
+
"react-router": "^7.9.4",
|
|
70
|
+
"react-use-measure": "^2.1.7",
|
|
65
71
|
"sonner": "^2.0.7",
|
|
66
72
|
"tailwind-merge": "^3.3.1",
|
|
67
|
-
"unicornstudio-react": "^1.4.
|
|
73
|
+
"unicornstudio-react": "^1.4.33",
|
|
68
74
|
"vaul": "^1.1.2"
|
|
69
75
|
},
|
|
70
76
|
"devDependencies": {
|
|
71
77
|
"@changesets/cli": "^2.29.6",
|
|
72
78
|
"@chromatic-com/storybook": "^4.1.1",
|
|
73
79
|
"@prettier/plugin-oxc": "^0.0.4",
|
|
74
|
-
"@storybook/addon-docs": "^9.1.
|
|
75
|
-
"@storybook/addon-themes": "^9.1.
|
|
76
|
-
"@storybook/addon-vitest": "^9.1.
|
|
77
|
-
"@storybook/builder-vite": "^9.1.
|
|
78
|
-
"@storybook/react": "^9.1.
|
|
79
|
-
"@
|
|
80
|
-
"@
|
|
81
|
-
"@testing-library/jest-dom": "^6.8.0",
|
|
80
|
+
"@storybook/addon-docs": "^9.1.13",
|
|
81
|
+
"@storybook/addon-themes": "^9.1.13",
|
|
82
|
+
"@storybook/addon-vitest": "^9.1.13",
|
|
83
|
+
"@storybook/builder-vite": "^9.1.13",
|
|
84
|
+
"@storybook/react-vite": "^9.1.13",
|
|
85
|
+
"@tailwindcss/vite": "^4.1.15",
|
|
86
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
82
87
|
"@testing-library/react": "^16.3.0",
|
|
83
|
-
"@types/node": "^24.
|
|
84
|
-
"@types/react": "^19.
|
|
85
|
-
"@types/react-dom": "^19.
|
|
88
|
+
"@types/node": "^24.9.1",
|
|
89
|
+
"@types/react": "^19.2.2",
|
|
90
|
+
"@types/react-dom": "^19.2.2",
|
|
86
91
|
"@vitejs/plugin-react-swc": "^4.0.1",
|
|
87
92
|
"@vitest/browser": "3.2.4",
|
|
88
93
|
"@vitest/coverage-v8": "3.2.4",
|
|
89
94
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
90
95
|
"glob": "^11.0.0",
|
|
91
96
|
"husky": "^9.1.7",
|
|
92
|
-
"oxlint": "^1.
|
|
93
|
-
"playwright": "^1.
|
|
97
|
+
"oxlint": "^1.23.0",
|
|
98
|
+
"playwright": "^1.56.1",
|
|
94
99
|
"prettier": "^3.6.2",
|
|
95
100
|
"prettier-plugin-sort-imports": "^1.8.8",
|
|
96
|
-
"prettier-plugin-tailwindcss": "^0.
|
|
97
|
-
"storybook": "^9.1.
|
|
98
|
-
"tailwindcss": "^4.1.
|
|
101
|
+
"prettier-plugin-tailwindcss": "^0.7.1",
|
|
102
|
+
"storybook": "^9.1.13",
|
|
103
|
+
"tailwindcss": "^4.1.15",
|
|
99
104
|
"tw-animate-css": "^1.3.7",
|
|
100
|
-
"typescript": "^5.9.
|
|
101
|
-
"vite": "^7.1.
|
|
105
|
+
"typescript": "^5.9.3",
|
|
106
|
+
"vite": "^7.1.11",
|
|
102
107
|
"vite-bundle-visualizer": "^1.2.1",
|
|
103
108
|
"vite-plugin-dts": "^4.5.4",
|
|
104
109
|
"vitest": "^3.2.4"
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { AsChildProp } from '../../primitives/slot';
|
|
2
|
-
import { ButtonHTMLAttributes, HTMLAttributes } from 'react';
|
|
3
|
-
type Dir = 'ltr' | 'rtl';
|
|
4
|
-
type AccordionType = 'single' | 'multiple';
|
|
5
|
-
export type AccordionProps = HTMLAttributes<HTMLDivElement> & {
|
|
6
|
-
type?: AccordionType;
|
|
7
|
-
value?: string | string[];
|
|
8
|
-
defaultValue?: string | string[];
|
|
9
|
-
onValueChange?: (value: string | string[]) => void;
|
|
10
|
-
collapsible?: boolean;
|
|
11
|
-
dir?: Dir;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
rovingFocus?: boolean;
|
|
14
|
-
};
|
|
15
|
-
export declare const Accordion: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
16
|
-
type?: AccordionType;
|
|
17
|
-
value?: string | string[];
|
|
18
|
-
defaultValue?: string | string[];
|
|
19
|
-
onValueChange?: (value: string | string[]) => void;
|
|
20
|
-
collapsible?: boolean;
|
|
21
|
-
dir?: Dir;
|
|
22
|
-
disabled?: boolean;
|
|
23
|
-
rovingFocus?: boolean;
|
|
24
|
-
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
25
|
-
export type AccordionItemProps = HTMLAttributes<HTMLDivElement> & {
|
|
26
|
-
value: string;
|
|
27
|
-
disabled?: boolean;
|
|
28
|
-
};
|
|
29
|
-
export declare const AccordionItem: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
30
|
-
value: string;
|
|
31
|
-
disabled?: boolean;
|
|
32
|
-
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
33
|
-
export type AccordionTriggerProps = ButtonHTMLAttributes<HTMLButtonElement> & AsChildProp;
|
|
34
|
-
export declare const AccordionTrigger: import('react').ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & AsChildProp & import('react').RefAttributes<HTMLButtonElement>>;
|
|
35
|
-
export type AccordionContentProps = HTMLAttributes<HTMLDivElement> & AsChildProp & {
|
|
36
|
-
forceMount?: boolean;
|
|
37
|
-
};
|
|
38
|
-
export declare const AccordionContent: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & AsChildProp & {
|
|
39
|
-
forceMount?: boolean;
|
|
40
|
-
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
41
|
-
export {};
|
|
42
|
-
//# sourceMappingURL=AccordionBase.d.ts.map
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../styles/main.css";
|
|
3
|
-
import { jsx as x } from "react/jsx-runtime";
|
|
4
|
-
import { useControllableState as P } from "../hooks/useControllableState.js";
|
|
5
|
-
import { Slot as M } from "../primitives/slot.js";
|
|
6
|
-
import { createContext as j, forwardRef as E, useRef as S, useState as T, useCallback as R, useEffect as O, useContext as D, useId as H, useLayoutEffect as L } from "react";
|
|
7
|
-
function N(...g) {
|
|
8
|
-
return g.filter(Boolean).join(" ");
|
|
9
|
-
}
|
|
10
|
-
const V = j(null), z = E(
|
|
11
|
-
({
|
|
12
|
-
className: g,
|
|
13
|
-
children: u,
|
|
14
|
-
type: i = "single",
|
|
15
|
-
value: f,
|
|
16
|
-
defaultValue: l,
|
|
17
|
-
onValueChange: a,
|
|
18
|
-
collapsible: s = !1,
|
|
19
|
-
dir: o = "ltr",
|
|
20
|
-
disabled: r = !1,
|
|
21
|
-
rovingFocus: n = !0,
|
|
22
|
-
...I
|
|
23
|
-
}, d) => {
|
|
24
|
-
const [v, c] = P({
|
|
25
|
-
value: typeof f == "string" ? f : void 0,
|
|
26
|
-
defaultValue: typeof l == "string" ? l : (Array.isArray(l) && l.length > 0, void 0),
|
|
27
|
-
onChange: (t) => a?.(i === "single" ? t ?? "" : [])
|
|
28
|
-
}), [A, C] = P({
|
|
29
|
-
value: Array.isArray(f) ? f : void 0,
|
|
30
|
-
defaultValue: Array.isArray(l) ? l : [],
|
|
31
|
-
onChange: (t) => a?.(i === "multiple" ? t : "")
|
|
32
|
-
}), h = S([]), [k, p] = T(void 0), F = R(
|
|
33
|
-
(t) => i === "single" ? v === t : A.includes(t),
|
|
34
|
-
[i, v, A]
|
|
35
|
-
), e = R(
|
|
36
|
-
(t) => {
|
|
37
|
-
if (!r) {
|
|
38
|
-
if (i === "single") {
|
|
39
|
-
v === t ? s && c(void 0) : c(t);
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
C((b) => {
|
|
43
|
-
const y = new Set(b);
|
|
44
|
-
return y.has(t) ? y.delete(t) : y.add(t), Array.from(y);
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
[s, r, C, c, i, v]
|
|
49
|
-
), m = R((t) => (h.current.push(t), () => {
|
|
50
|
-
h.current = h.current.filter((b) => b.value !== t.value);
|
|
51
|
-
}), []);
|
|
52
|
-
O(() => {
|
|
53
|
-
if (k) return;
|
|
54
|
-
const t = h.current.find((b) => !b.disabled);
|
|
55
|
-
t && p(t.value);
|
|
56
|
-
}, [k]);
|
|
57
|
-
const w = {
|
|
58
|
-
type: i,
|
|
59
|
-
dir: o,
|
|
60
|
-
collapsible: s,
|
|
61
|
-
disabled: r,
|
|
62
|
-
itemsRef: h,
|
|
63
|
-
registerItem: m,
|
|
64
|
-
isItemOpen: F,
|
|
65
|
-
toggleItem: e,
|
|
66
|
-
focusValue: n ? k : void 0,
|
|
67
|
-
setFocusValue: (t) => {
|
|
68
|
-
n && p(t);
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
return /* @__PURE__ */ x(V.Provider, { value: w, children: /* @__PURE__ */ x("div", { ref: d, className: N("divide-border divide-y", g), ...I, children: u }) });
|
|
72
|
-
}
|
|
73
|
-
);
|
|
74
|
-
z.displayName = "Accordion";
|
|
75
|
-
const $ = j(null), B = E(
|
|
76
|
-
({ className: g, value: u, disabled: i = !1, children: f, ...l }, a) => {
|
|
77
|
-
const s = D(V);
|
|
78
|
-
if (!s) throw new Error("AccordionItem must be used within Accordion");
|
|
79
|
-
const o = s.isItemOpen(u), r = S(null);
|
|
80
|
-
return O(() => {
|
|
81
|
-
const n = { value: u, disabled: i, triggerRef: r };
|
|
82
|
-
return s.registerItem(n);
|
|
83
|
-
}, [s, u, i]), /* @__PURE__ */ x($.Provider, { value: { value: u, open: o, disabled: i || s.disabled }, children: /* @__PURE__ */ x(
|
|
84
|
-
"div",
|
|
85
|
-
{
|
|
86
|
-
ref: a,
|
|
87
|
-
"data-state": o ? "open" : "closed",
|
|
88
|
-
"data-disabled": i || s.disabled ? "" : void 0,
|
|
89
|
-
className: N("outline-none", g),
|
|
90
|
-
...l,
|
|
91
|
-
children: f
|
|
92
|
-
}
|
|
93
|
-
) });
|
|
94
|
-
}
|
|
95
|
-
);
|
|
96
|
-
B.displayName = "AccordionItem";
|
|
97
|
-
const K = E(
|
|
98
|
-
({ asChild: g, className: u, onClick: i, onKeyDown: f, disabled: l, id: a, ...s }, o) => {
|
|
99
|
-
const r = D(V), n = D($);
|
|
100
|
-
if (!r || !n) throw new Error("AccordionTrigger must be used within AccordionItem");
|
|
101
|
-
const I = a ?? `act-${H()}`, d = l || n.disabled || r.disabled, v = n.open, c = g ? M : "button", A = (e) => {
|
|
102
|
-
if (n && "value" in n) {
|
|
103
|
-
const m = r.itemsRef.current.find((w) => w.value === n.value);
|
|
104
|
-
m && (m.triggerRef.current = e);
|
|
105
|
-
}
|
|
106
|
-
typeof o == "function" ? o(e) : o && "current" in o && (o.current = e);
|
|
107
|
-
}, h = (r.focusValue === void 0 ? !0 : r.focusValue === n.value && !d) ? 0 : -1, k = R(
|
|
108
|
-
(e) => {
|
|
109
|
-
i?.(e), !e.defaultPrevented && (d || (r.toggleItem(n.value), r.setFocusValue(n.value)));
|
|
110
|
-
},
|
|
111
|
-
[d, n.value, i, r]
|
|
112
|
-
), p = R(
|
|
113
|
-
(e) => {
|
|
114
|
-
const m = r.itemsRef.current.filter((y) => !y.disabled);
|
|
115
|
-
if (!m.length) return;
|
|
116
|
-
const w = m.findIndex((y) => y.value === n.value);
|
|
117
|
-
let t = w;
|
|
118
|
-
e === "first" ? t = 0 : e === "last" ? t = m.length - 1 : e === "prev" ? t = Math.max(0, w - 1) : t = Math.min(m.length - 1, w + 1);
|
|
119
|
-
const b = m[t];
|
|
120
|
-
b && (r.setFocusValue(b.value), b.triggerRef.current?.focus());
|
|
121
|
-
},
|
|
122
|
-
[n.value, r]
|
|
123
|
-
), F = R(
|
|
124
|
-
(e) => {
|
|
125
|
-
if (f?.(e), !e.defaultPrevented) {
|
|
126
|
-
if (e.key === "Home") {
|
|
127
|
-
e.preventDefault(), p("first");
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
if (e.key === "End") {
|
|
131
|
-
e.preventDefault(), p("last");
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
if (e.key === "ArrowUp" || e.key === "ArrowLeft") {
|
|
135
|
-
e.preventDefault(), p(r.dir === "rtl" ? "next" : "prev");
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
if (e.key === "ArrowDown" || e.key === "ArrowRight") {
|
|
139
|
-
e.preventDefault(), p(r.dir === "rtl" ? "prev" : "next");
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), d || r.toggleItem(n.value));
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
[d, n.value, p, f, r]
|
|
146
|
-
);
|
|
147
|
-
return /* @__PURE__ */ x(
|
|
148
|
-
c,
|
|
149
|
-
{
|
|
150
|
-
id: I,
|
|
151
|
-
ref: A,
|
|
152
|
-
type: "button",
|
|
153
|
-
"aria-expanded": v,
|
|
154
|
-
"aria-controls": `acc-content-${n.value}`,
|
|
155
|
-
"aria-disabled": d || void 0,
|
|
156
|
-
"data-state": v ? "open" : "closed",
|
|
157
|
-
"data-disabled": d ? "" : void 0,
|
|
158
|
-
tabIndex: h,
|
|
159
|
-
onClick: k,
|
|
160
|
-
onKeyDown: F,
|
|
161
|
-
className: N(
|
|
162
|
-
"flex w-full items-center justify-between py-3 text-left",
|
|
163
|
-
"focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",
|
|
164
|
-
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
165
|
-
u
|
|
166
|
-
),
|
|
167
|
-
...s
|
|
168
|
-
}
|
|
169
|
-
);
|
|
170
|
-
}
|
|
171
|
-
);
|
|
172
|
-
K.displayName = "AccordionTrigger";
|
|
173
|
-
const U = E(
|
|
174
|
-
({ asChild: g, className: u, forceMount: i, id: f, ...l }, a) => {
|
|
175
|
-
const s = D(V), o = D($);
|
|
176
|
-
if (!s || !o) throw new Error("AccordionContent must be used within AccordionItem");
|
|
177
|
-
const r = o.open, n = f ?? `acc-content-${o.value}`, I = S(null), d = (c) => {
|
|
178
|
-
I.current = c, typeof a == "function" ? a(c) : a && "current" in a && (a.current = c);
|
|
179
|
-
};
|
|
180
|
-
L(() => {
|
|
181
|
-
const c = I.current;
|
|
182
|
-
if (!c) return;
|
|
183
|
-
const A = () => {
|
|
184
|
-
c.style.setProperty("--radix-accordion-content-height", `${c.scrollHeight}px`);
|
|
185
|
-
};
|
|
186
|
-
A();
|
|
187
|
-
const C = new ResizeObserver(A);
|
|
188
|
-
return C.observe(c), () => C.disconnect();
|
|
189
|
-
}, []);
|
|
190
|
-
const v = g ? M : "div";
|
|
191
|
-
return !r && !i ? /* @__PURE__ */ x(
|
|
192
|
-
v,
|
|
193
|
-
{
|
|
194
|
-
id: n,
|
|
195
|
-
role: "region",
|
|
196
|
-
"aria-labelledby": `act-${o.value}`,
|
|
197
|
-
hidden: !0,
|
|
198
|
-
"data-state": "closed",
|
|
199
|
-
"data-disabled": o.disabled || s.disabled ? "" : void 0,
|
|
200
|
-
className: N(u),
|
|
201
|
-
ref: d,
|
|
202
|
-
...l
|
|
203
|
-
}
|
|
204
|
-
) : /* @__PURE__ */ x(
|
|
205
|
-
v,
|
|
206
|
-
{
|
|
207
|
-
id: n,
|
|
208
|
-
role: "region",
|
|
209
|
-
"aria-labelledby": `act-${o.value}`,
|
|
210
|
-
"data-state": r ? "open" : "closed",
|
|
211
|
-
"data-disabled": o.disabled || s.disabled ? "" : void 0,
|
|
212
|
-
className: N("overflow-hidden", u),
|
|
213
|
-
ref: d,
|
|
214
|
-
...l
|
|
215
|
-
}
|
|
216
|
-
);
|
|
217
|
-
}
|
|
218
|
-
);
|
|
219
|
-
U.displayName = "AccordionContent";
|
|
220
|
-
export {
|
|
221
|
-
z as Accordion,
|
|
222
|
-
U as AccordionContent,
|
|
223
|
-
B as AccordionItem,
|
|
224
|
-
K as AccordionTrigger
|
|
225
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
|
-
export type BadgeProps = ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
4
|
-
asChild?: boolean;
|
|
5
|
-
};
|
|
6
|
-
declare const badgeVariants: (props?: ({
|
|
7
|
-
variant?: "default" | "secondary" | "destructive" | "outline" | null | undefined;
|
|
8
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
-
declare function BadgeBase({ className, variant, asChild, ...props }: ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
10
|
-
asChild?: boolean;
|
|
11
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export { BadgeBase, badgeVariants };
|
|
13
|
-
//# sourceMappingURL=BadgeBase.d.ts.map
|
package/dist/Badge/BadgeBase.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import "../styles/main.css";
|
|
2
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
-
import { Slot as t } from "../primitives/slot.js";
|
|
4
|
-
import { c as o } from "../twUtils-CRiPKpXj.js";
|
|
5
|
-
import { c as s } from "../index-CRBC94ik.js";
|
|
6
|
-
const d = s(
|
|
7
|
-
`inline-flex items-center justify-center rounded-sm px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none
|
|
8
|
-
focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-danger-100/20 dark:aria-invalid:ring-danger-100/40 aria-invalid:border-danger-200
|
|
9
|
-
transition-[color,box-shadow] overflow-hidden`,
|
|
10
|
-
{
|
|
11
|
-
variants: {
|
|
12
|
-
variant: {
|
|
13
|
-
default: "bg-badge-primary-bg text-text-primary [a&]:hover:bg-badge-primary-bg--hover group-data-[state=on]:bg-badge-primary-bg--active",
|
|
14
|
-
secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
15
|
-
destructive: "bg-danger-100 text-white [a&]:hover:bg-danger-100/90 focus-visible:ring-danger-100/20 dark:focus-visible:ring-danger-100/40 dark:bg-danger-100/60",
|
|
16
|
-
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
defaultVariants: {
|
|
20
|
-
variant: "default"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
function l({
|
|
25
|
-
className: r,
|
|
26
|
-
variant: e,
|
|
27
|
-
asChild: a = !1,
|
|
28
|
-
...i
|
|
29
|
-
}) {
|
|
30
|
-
return /* @__PURE__ */ n(a ? t : "span", { "data-slot": "badge", className: o(d({ variant: e }), r), ...i });
|
|
31
|
-
}
|
|
32
|
-
export {
|
|
33
|
-
l as BadgeBase,
|
|
34
|
-
d as badgeVariants
|
|
35
|
-
};
|
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
import "./styles/main.css";
|
|
2
|
-
import { jsx as p, Fragment as K, jsxs as I } from "react/jsx-runtime";
|
|
3
|
-
import "./Icons/AnnotationsIcon.js";
|
|
4
|
-
import "./Icons/CalendarIcon.js";
|
|
5
|
-
import "./Icons/CheckCircleIcon.js";
|
|
6
|
-
import "./Icons/CheckSquareIcon.js";
|
|
7
|
-
import "./Icons/CheckmarkIcon.js";
|
|
8
|
-
import "./Icons/ChevronDownIcon.js";
|
|
9
|
-
import "./Icons/ChevronUpIcon.js";
|
|
10
|
-
import "./Icons/ClockIcon.js";
|
|
11
|
-
import "./Icons/CloseCircleIcon.js";
|
|
12
|
-
import "./Icons/CloseIcon.js";
|
|
13
|
-
import "./Icons/DashboardIcon.js";
|
|
14
|
-
import "./Icons/DeleteIcon.js";
|
|
15
|
-
import "./Icons/DurationIcon.js";
|
|
16
|
-
import "./Icons/EmailIcon.js";
|
|
17
|
-
import "./Icons/EraserIcon.js";
|
|
18
|
-
import "./Icons/ErrorIcon.js";
|
|
19
|
-
import { EyeClosedIcon as U } from "./Icons/EyeClosedIcon.js";
|
|
20
|
-
import "./Icons/EyeClosedIcon2.js";
|
|
21
|
-
import { EyeOpenIcon as V } from "./Icons/EyeOpenIcon.js";
|
|
22
|
-
import "./Icons/GoToFirstIcon.js";
|
|
23
|
-
import "./Icons/GoToLastIcon.js";
|
|
24
|
-
import "./Icons/HarmonicCursorsIcon.js";
|
|
25
|
-
import "./Icons/InfoIcon.js";
|
|
26
|
-
import "./Icons/LabelIcon.js";
|
|
27
|
-
import "./Icons/LassoIcon.js";
|
|
28
|
-
import "./Icons/LineToolIcon.js";
|
|
29
|
-
import "./Icons/LiveViewIcon.js";
|
|
30
|
-
import "./Icons/LoaderIcon.js";
|
|
31
|
-
import "./Icons/LocationIcon.js";
|
|
32
|
-
import "./Icons/LogoutIcon.js";
|
|
33
|
-
import "./Icons/MetadataIcon.js";
|
|
34
|
-
import "./Icons/MinusIcon.js";
|
|
35
|
-
import "./Icons/OntologyIcon.js";
|
|
36
|
-
import "./Icons/PanelIconClose.js";
|
|
37
|
-
import "./Icons/PanelIconOpen.js";
|
|
38
|
-
import "./Icons/PlayIcon.js";
|
|
39
|
-
import "./Icons/PlusIcon.js";
|
|
40
|
-
import "./Icons/ResetIcon.js";
|
|
41
|
-
import "./Icons/ScissorsIcon.js";
|
|
42
|
-
import "./Icons/SettingsIcon.js";
|
|
43
|
-
import "./Icons/TrashIcon.js";
|
|
44
|
-
import "./Icons/UndoIcon.js";
|
|
45
|
-
import "./Icons/UserIcon.js";
|
|
46
|
-
import "./Icons/WarningIcon.js";
|
|
47
|
-
import "./Icons/ZoomAllIcon.js";
|
|
48
|
-
import "./Icons/ZoomXIcon.js";
|
|
49
|
-
import "./Icons/ZoomYIcon.js";
|
|
50
|
-
import { Input as X } from "./Input.js";
|
|
51
|
-
import { calculatePasswordStrength as _ } from "./utils/sharedUtils.js";
|
|
52
|
-
import * as b from "react";
|
|
53
|
-
import { useId as A, useRef as E, useContext as T, useInsertionEffect as B, useMemo as k, Children as F, isValidElement as G, useState as M } from "react";
|
|
54
|
-
import { M as Y, i as q, u as D, P as J, a as Q, b as Z, L as tt, m as L } from "./proxy-DD79Ok6n.js";
|
|
55
|
-
function S(t, r) {
|
|
56
|
-
if (typeof t == "function")
|
|
57
|
-
return t(r);
|
|
58
|
-
t != null && (t.current = r);
|
|
59
|
-
}
|
|
60
|
-
function et(...t) {
|
|
61
|
-
return (r) => {
|
|
62
|
-
let e = !1;
|
|
63
|
-
const i = t.map((s) => {
|
|
64
|
-
const o = S(s, r);
|
|
65
|
-
return !e && typeof o == "function" && (e = !0), o;
|
|
66
|
-
});
|
|
67
|
-
if (e)
|
|
68
|
-
return () => {
|
|
69
|
-
for (let s = 0; s < i.length; s++) {
|
|
70
|
-
const o = i[s];
|
|
71
|
-
typeof o == "function" ? o() : S(t[s], null);
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
function ot(...t) {
|
|
77
|
-
return b.useCallback(et(...t), t);
|
|
78
|
-
}
|
|
79
|
-
class nt extends b.Component {
|
|
80
|
-
getSnapshotBeforeUpdate(r) {
|
|
81
|
-
const e = this.props.childRef.current;
|
|
82
|
-
if (e && r.isPresent && !this.props.isPresent) {
|
|
83
|
-
const i = e.offsetParent, s = q(i) && i.offsetWidth || 0, o = this.props.sizeRef.current;
|
|
84
|
-
o.height = e.offsetHeight || 0, o.width = e.offsetWidth || 0, o.top = e.offsetTop, o.left = e.offsetLeft, o.right = s - o.width - o.left;
|
|
85
|
-
}
|
|
86
|
-
return null;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Required with getSnapshotBeforeUpdate to stop React complaining.
|
|
90
|
-
*/
|
|
91
|
-
componentDidUpdate() {
|
|
92
|
-
}
|
|
93
|
-
render() {
|
|
94
|
-
return this.props.children;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
function rt({ children: t, isPresent: r, anchorX: e, root: i }) {
|
|
98
|
-
const s = A(), o = E(null), f = E({
|
|
99
|
-
width: 0,
|
|
100
|
-
height: 0,
|
|
101
|
-
top: 0,
|
|
102
|
-
left: 0,
|
|
103
|
-
right: 0
|
|
104
|
-
}), { nonce: u } = T(Y), g = ot(o, t?.ref);
|
|
105
|
-
return B(() => {
|
|
106
|
-
const { width: n, height: C, top: l, left: m, right: d } = f.current;
|
|
107
|
-
if (r || !o.current || !n || !C)
|
|
108
|
-
return;
|
|
109
|
-
const y = e === "left" ? `left: ${m}` : `right: ${d}`;
|
|
110
|
-
o.current.dataset.motionPopId = s;
|
|
111
|
-
const a = document.createElement("style");
|
|
112
|
-
u && (a.nonce = u);
|
|
113
|
-
const P = i ?? document.head;
|
|
114
|
-
return P.appendChild(a), a.sheet && a.sheet.insertRule(`
|
|
115
|
-
[data-motion-pop-id="${s}"] {
|
|
116
|
-
position: absolute !important;
|
|
117
|
-
width: ${n}px !important;
|
|
118
|
-
height: ${C}px !important;
|
|
119
|
-
${y}px !important;
|
|
120
|
-
top: ${l}px !important;
|
|
121
|
-
}
|
|
122
|
-
`), () => {
|
|
123
|
-
P.contains(a) && P.removeChild(a);
|
|
124
|
-
};
|
|
125
|
-
}, [r]), p(nt, { isPresent: r, childRef: o, sizeRef: f, children: b.cloneElement(t, { ref: g }) });
|
|
126
|
-
}
|
|
127
|
-
const it = ({ children: t, initial: r, isPresent: e, onExitComplete: i, custom: s, presenceAffectsLayout: o, mode: f, anchorX: u, root: g }) => {
|
|
128
|
-
const n = D(st), C = A();
|
|
129
|
-
let l = !0, m = k(() => (l = !1, {
|
|
130
|
-
id: C,
|
|
131
|
-
initial: r,
|
|
132
|
-
isPresent: e,
|
|
133
|
-
custom: s,
|
|
134
|
-
onExitComplete: (d) => {
|
|
135
|
-
n.set(d, !0);
|
|
136
|
-
for (const y of n.values())
|
|
137
|
-
if (!y)
|
|
138
|
-
return;
|
|
139
|
-
i && i();
|
|
140
|
-
},
|
|
141
|
-
register: (d) => (n.set(d, !1), () => n.delete(d))
|
|
142
|
-
}), [e, n, i]);
|
|
143
|
-
return o && l && (m = { ...m }), k(() => {
|
|
144
|
-
n.forEach((d, y) => n.set(y, !1));
|
|
145
|
-
}, [e]), b.useEffect(() => {
|
|
146
|
-
!e && !n.size && i && i();
|
|
147
|
-
}, [e]), f === "popLayout" && (t = p(rt, { isPresent: e, anchorX: u, root: g, children: t })), p(J.Provider, { value: m, children: t });
|
|
148
|
-
};
|
|
149
|
-
function st() {
|
|
150
|
-
return /* @__PURE__ */ new Map();
|
|
151
|
-
}
|
|
152
|
-
const R = (t) => t.key || "";
|
|
153
|
-
function j(t) {
|
|
154
|
-
const r = [];
|
|
155
|
-
return F.forEach(t, (e) => {
|
|
156
|
-
G(e) && r.push(e);
|
|
157
|
-
}), r;
|
|
158
|
-
}
|
|
159
|
-
const lt = ({ children: t, custom: r, initial: e = !0, onExitComplete: i, presenceAffectsLayout: s = !0, mode: o = "sync", propagate: f = !1, anchorX: u = "left", root: g }) => {
|
|
160
|
-
const [n, C] = Q(f), l = k(() => j(t), [t]), m = f && !n ? [] : l.map(R), d = E(!0), y = E(l), a = D(() => /* @__PURE__ */ new Map()), [P, O] = M(l), [w, $] = M(l);
|
|
161
|
-
Z(() => {
|
|
162
|
-
d.current = !1, y.current = l;
|
|
163
|
-
for (let h = 0; h < w.length; h++) {
|
|
164
|
-
const c = R(w[h]);
|
|
165
|
-
m.includes(c) ? a.delete(c) : a.get(c) !== !0 && a.set(c, !1);
|
|
166
|
-
}
|
|
167
|
-
}, [w, m.length, m.join("-")]);
|
|
168
|
-
const v = [];
|
|
169
|
-
if (l !== P) {
|
|
170
|
-
let h = [...l];
|
|
171
|
-
for (let c = 0; c < w.length; c++) {
|
|
172
|
-
const x = w[c], N = R(x);
|
|
173
|
-
m.includes(N) || (h.splice(c, 0, x), v.push(x));
|
|
174
|
-
}
|
|
175
|
-
return o === "wait" && v.length && (h = v), $(j(h)), O(l), null;
|
|
176
|
-
}
|
|
177
|
-
process.env.NODE_ENV !== "production" && o === "wait" && w.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
|
|
178
|
-
const { forceRender: W } = T(tt);
|
|
179
|
-
return p(K, { children: w.map((h) => {
|
|
180
|
-
const c = R(h), x = f && !n ? !1 : l === w || m.includes(c), N = () => {
|
|
181
|
-
if (a.has(c))
|
|
182
|
-
a.set(c, !0);
|
|
183
|
-
else
|
|
184
|
-
return;
|
|
185
|
-
let z = !0;
|
|
186
|
-
a.forEach((H) => {
|
|
187
|
-
H || (z = !1);
|
|
188
|
-
}), z && (W?.(), $(y.current), f && C?.(), i && i());
|
|
189
|
-
};
|
|
190
|
-
return p(it, { isPresent: x, initial: !d.current || e ? void 0 : !1, custom: r, presenceAffectsLayout: s, mode: o, root: g, onExitComplete: x ? void 0 : N, anchorX: u, children: h }, c);
|
|
191
|
-
}) });
|
|
192
|
-
}, se = ({
|
|
193
|
-
value: t,
|
|
194
|
-
onChange: r,
|
|
195
|
-
id: e,
|
|
196
|
-
label: i,
|
|
197
|
-
placeholder: s = "••••••••",
|
|
198
|
-
showStrength: o = !1,
|
|
199
|
-
className: f = ""
|
|
200
|
-
}) => {
|
|
201
|
-
const [u, g] = M(!1), n = t && o ? _(t) : null;
|
|
202
|
-
return /* @__PURE__ */ I("div", { children: [
|
|
203
|
-
/* @__PURE__ */ p(
|
|
204
|
-
X,
|
|
205
|
-
{
|
|
206
|
-
type: u ? "text" : "password",
|
|
207
|
-
value: t,
|
|
208
|
-
onChange: (C) => r(C.target.value),
|
|
209
|
-
className: f,
|
|
210
|
-
id: e,
|
|
211
|
-
label: i,
|
|
212
|
-
placeholder: s,
|
|
213
|
-
endIcon: u ? /* @__PURE__ */ p(
|
|
214
|
-
U,
|
|
215
|
-
{
|
|
216
|
-
size: 22,
|
|
217
|
-
onClick: () => g(!u),
|
|
218
|
-
className: "absolute top-1/2 right-4 -translate-y-1/2 cursor-pointer transition-colors"
|
|
219
|
-
}
|
|
220
|
-
) : /* @__PURE__ */ p(
|
|
221
|
-
V,
|
|
222
|
-
{
|
|
223
|
-
size: 22,
|
|
224
|
-
onClick: () => g(!u),
|
|
225
|
-
className: "absolute top-1/2 right-4 -translate-y-1/2 cursor-pointer transition-colors"
|
|
226
|
-
}
|
|
227
|
-
)
|
|
228
|
-
}
|
|
229
|
-
),
|
|
230
|
-
/* @__PURE__ */ p(lt, { children: n && t.length > 0 && /* @__PURE__ */ I(
|
|
231
|
-
L.div,
|
|
232
|
-
{
|
|
233
|
-
initial: { opacity: 0, height: 0 },
|
|
234
|
-
animate: { opacity: 1, height: "auto" },
|
|
235
|
-
exit: { opacity: 0, height: 0 },
|
|
236
|
-
transition: { duration: 0.2 },
|
|
237
|
-
className: "mt-2",
|
|
238
|
-
children: [
|
|
239
|
-
/* @__PURE__ */ I("div", { className: "mb-1 flex items-center justify-between", children: [
|
|
240
|
-
/* @__PURE__ */ p("span", { className: "text-text-secondary text-xs", children: "Password strength" }),
|
|
241
|
-
/* @__PURE__ */ p("span", { className: "text-xs font-medium", style: { color: n.color }, children: n.label })
|
|
242
|
-
] }),
|
|
243
|
-
/* @__PURE__ */ p("div", { className: "h-1.5 overflow-hidden rounded-full bg-white/5", children: /* @__PURE__ */ p(
|
|
244
|
-
L.div,
|
|
245
|
-
{
|
|
246
|
-
className: "h-full rounded-full",
|
|
247
|
-
style: { backgroundColor: n.color },
|
|
248
|
-
initial: { width: 0 },
|
|
249
|
-
animate: { width: `${n.score / 5 * 100}%` },
|
|
250
|
-
transition: { duration: 0.3, ease: "easeOut" }
|
|
251
|
-
}
|
|
252
|
-
) })
|
|
253
|
-
]
|
|
254
|
-
}
|
|
255
|
-
) })
|
|
256
|
-
] });
|
|
257
|
-
};
|
|
258
|
-
export {
|
|
259
|
-
lt as A,
|
|
260
|
-
se as P
|
|
261
|
-
};
|