@lucian-seo/lucian-ui 0.1.1
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/LICENSE +21 -0
- package/README.md +227 -0
- package/dist/lib/Input-Bv7L1_wj.js +90 -0
- package/dist/lib/Input-Bv7L1_wj.js.map +1 -0
- package/dist/lib/Menu-B3G64GV4.js +321 -0
- package/dist/lib/Menu-B3G64GV4.js.map +1 -0
- package/dist/lib/Switch-BkMnC02l.js +999 -0
- package/dist/lib/Switch-BkMnC02l.js.map +1 -0
- package/dist/lib/Tag-Z8PjnJFt.js +60 -0
- package/dist/lib/Tag-Z8PjnJFt.js.map +1 -0
- package/dist/lib/TagInput-BaGz-QKU.js +372 -0
- package/dist/lib/TagInput-BaGz-QKU.js.map +1 -0
- package/dist/lib/Text-D7hoYpuZ.js +26 -0
- package/dist/lib/Text-D7hoYpuZ.js.map +1 -0
- package/dist/lib/ToggleButton-D6oEjMeF.js +238 -0
- package/dist/lib/ToggleButton-D6oEjMeF.js.map +1 -0
- package/dist/lib/Toolbar-DiP1iR_t.js +3088 -0
- package/dist/lib/Toolbar-DiP1iR_t.js.map +1 -0
- package/dist/lib/Tooltip-BJSUlXS2.js +117 -0
- package/dist/lib/Tooltip-BJSUlXS2.js.map +1 -0
- package/dist/lib/VisuallyHidden-DcE0EFpo.js +194 -0
- package/dist/lib/VisuallyHidden-DcE0EFpo.js.map +1 -0
- package/dist/lib/VoiceControlBar-CWDLR71w.js +3447 -0
- package/dist/lib/VoiceControlBar-CWDLR71w.js.map +1 -0
- package/dist/lib/Waveform-BIE2Ztc8.js +318 -0
- package/dist/lib/Waveform-BIE2Ztc8.js.map +1 -0
- package/dist/lib/components/common/AspectRatio/AspectRatio.d.ts +26 -0
- package/dist/lib/components/common/AspectRatio/index.d.ts +2 -0
- package/dist/lib/components/common/Avatar/Avatar.d.ts +58 -0
- package/dist/lib/components/common/Avatar/index.d.ts +2 -0
- package/dist/lib/components/common/Badge/Badge.d.ts +36 -0
- package/dist/lib/components/common/Badge/index.d.ts +2 -0
- package/dist/lib/components/common/Blockquote/Blockquote.d.ts +40 -0
- package/dist/lib/components/common/Blockquote/index.d.ts +2 -0
- package/dist/lib/components/common/Button/Button.d.ts +38 -0
- package/dist/lib/components/common/Button/index.d.ts +2 -0
- package/dist/lib/components/common/CalibratedPulse/CalibratedPulse.d.ts +63 -0
- package/dist/lib/components/common/CalibratedPulse/index.d.ts +2 -0
- package/dist/lib/components/common/Center/Center.d.ts +23 -0
- package/dist/lib/components/common/Center/index.d.ts +2 -0
- package/dist/lib/components/common/Checkbox/Checkbox.d.ts +35 -0
- package/dist/lib/components/common/Checkbox/index.d.ts +2 -0
- package/dist/lib/components/common/Code/Code.d.ts +37 -0
- package/dist/lib/components/common/Code/index.d.ts +2 -0
- package/dist/lib/components/common/Collapse/Collapse.d.ts +29 -0
- package/dist/lib/components/common/Collapse/index.d.ts +2 -0
- package/dist/lib/components/common/Container/Container.d.ts +28 -0
- package/dist/lib/components/common/Container/index.d.ts +2 -0
- package/dist/lib/components/common/Divider/Divider.d.ts +28 -0
- package/dist/lib/components/common/Divider/index.d.ts +2 -0
- package/dist/lib/components/common/FileInput/FileInput.d.ts +52 -0
- package/dist/lib/components/common/FileInput/index.d.ts +2 -0
- package/dist/lib/components/common/Flex/Flex.d.ts +35 -0
- package/dist/lib/components/common/Flex/index.d.ts +2 -0
- package/dist/lib/components/common/Glass/Glass.d.ts +35 -0
- package/dist/lib/components/common/Glass/index.d.ts +2 -0
- package/dist/lib/components/common/Glass/refraction.d.ts +24 -0
- package/dist/lib/components/common/Glass/rim.d.ts +37 -0
- package/dist/lib/components/common/Grid/Grid.d.ts +28 -0
- package/dist/lib/components/common/Grid/GridItem.d.ts +31 -0
- package/dist/lib/components/common/Grid/index.d.ts +4 -0
- package/dist/lib/components/common/Group/Group.d.ts +38 -0
- package/dist/lib/components/common/Group/index.d.ts +2 -0
- package/dist/lib/components/common/Highlight/Highlight.d.ts +63 -0
- package/dist/lib/components/common/Highlight/index.d.ts +2 -0
- package/dist/lib/components/common/Icon/Icon.d.ts +39 -0
- package/dist/lib/components/common/Icon/index.d.ts +2 -0
- package/dist/lib/components/common/IconButton/IconButton.d.ts +34 -0
- package/dist/lib/components/common/IconButton/index.d.ts +2 -0
- package/dist/lib/components/common/Indicator/Indicator.d.ts +51 -0
- package/dist/lib/components/common/Indicator/index.d.ts +2 -0
- package/dist/lib/components/common/Input/Input.d.ts +84 -0
- package/dist/lib/components/common/Input/index.d.ts +2 -0
- package/dist/lib/components/common/Kbd/Kbd.d.ts +34 -0
- package/dist/lib/components/common/Kbd/index.d.ts +2 -0
- package/dist/lib/components/common/Link/Link.d.ts +21 -0
- package/dist/lib/components/common/Link/index.d.ts +2 -0
- package/dist/lib/components/common/Mark/Mark.d.ts +38 -0
- package/dist/lib/components/common/Mark/index.d.ts +2 -0
- package/dist/lib/components/common/MultiSelect/MultiSelect.d.ts +54 -0
- package/dist/lib/components/common/MultiSelect/index.d.ts +2 -0
- package/dist/lib/components/common/PinInput/PinInput.d.ts +49 -0
- package/dist/lib/components/common/PinInput/index.d.ts +2 -0
- package/dist/lib/components/common/Progress/Progress.d.ts +30 -0
- package/dist/lib/components/common/Progress/index.d.ts +2 -0
- package/dist/lib/components/common/Radio/Radio.d.ts +45 -0
- package/dist/lib/components/common/Radio/index.d.ts +2 -0
- package/dist/lib/components/common/RingProgress/RingProgress.d.ts +40 -0
- package/dist/lib/components/common/RingProgress/index.d.ts +2 -0
- package/dist/lib/components/common/ScrollArea/ScrollArea.d.ts +33 -0
- package/dist/lib/components/common/ScrollArea/index.d.ts +2 -0
- package/dist/lib/components/common/Select/Select.d.ts +50 -0
- package/dist/lib/components/common/Select/index.d.ts +2 -0
- package/dist/lib/components/common/Select/listbox.d.ts +68 -0
- package/dist/lib/components/common/SimpleGrid/SimpleGrid.d.ts +30 -0
- package/dist/lib/components/common/SimpleGrid/index.d.ts +2 -0
- package/dist/lib/components/common/Skeleton/Skeleton.d.ts +23 -0
- package/dist/lib/components/common/Skeleton/index.d.ts +2 -0
- package/dist/lib/components/common/Slider/Slider.d.ts +55 -0
- package/dist/lib/components/common/Slider/index.d.ts +2 -0
- package/dist/lib/components/common/Space/Space.d.ts +29 -0
- package/dist/lib/components/common/Space/index.d.ts +2 -0
- package/dist/lib/components/common/Spinner/Spinner.d.ts +25 -0
- package/dist/lib/components/common/Spinner/index.d.ts +2 -0
- package/dist/lib/components/common/Stack/Stack.d.ts +41 -0
- package/dist/lib/components/common/Stack/index.d.ts +2 -0
- package/dist/lib/components/common/Switch/Switch.d.ts +28 -0
- package/dist/lib/components/common/Switch/index.d.ts +2 -0
- package/dist/lib/components/common/Text/Text.d.ts +57 -0
- package/dist/lib/components/common/Text/index.d.ts +2 -0
- package/dist/lib/components/common/Textarea/Textarea.d.ts +29 -0
- package/dist/lib/components/common/Textarea/index.d.ts +2 -0
- package/dist/lib/components/common/Tooltip/Tooltip.d.ts +33 -0
- package/dist/lib/components/common/Tooltip/index.d.ts +2 -0
- package/dist/lib/components/common/VisuallyHidden/VisuallyHidden.d.ts +20 -0
- package/dist/lib/components/common/VisuallyHidden/index.d.ts +2 -0
- package/dist/lib/components/common/Waveform/Waveform.d.ts +66 -0
- package/dist/lib/components/common/Waveform/index.d.ts +2 -0
- package/dist/lib/components/common/index.d.ts +44 -0
- package/dist/lib/components/common/index.js +7 -0
- package/dist/lib/components/composed/AppShell/AppShell.d.ts +95 -0
- package/dist/lib/components/composed/AppShell/index.d.ts +2 -0
- package/dist/lib/components/composed/Breadcrumb/Breadcrumb.d.ts +46 -0
- package/dist/lib/components/composed/Breadcrumb/index.d.ts +2 -0
- package/dist/lib/components/composed/BulkActionBar/BulkActionBar.d.ts +48 -0
- package/dist/lib/components/composed/BulkActionBar/index.d.ts +2 -0
- package/dist/lib/components/composed/Callout/Callout.d.ts +43 -0
- package/dist/lib/components/composed/Callout/index.d.ts +2 -0
- package/dist/lib/components/composed/Card/Card.d.ts +80 -0
- package/dist/lib/components/composed/Card/index.d.ts +2 -0
- package/dist/lib/components/composed/Carousel/Carousel.d.ts +52 -0
- package/dist/lib/components/composed/Carousel/index.d.ts +2 -0
- package/dist/lib/components/composed/Combobox/Combobox.d.ts +50 -0
- package/dist/lib/components/composed/Combobox/index.d.ts +2 -0
- package/dist/lib/components/composed/CommandPalette/CommandPalette.d.ts +51 -0
- package/dist/lib/components/composed/CommandPalette/index.d.ts +2 -0
- package/dist/lib/components/composed/DatePicker/Calendar.d.ts +49 -0
- package/dist/lib/components/composed/DatePicker/DatePicker.d.ts +36 -0
- package/dist/lib/components/composed/DatePicker/dates.d.ts +50 -0
- package/dist/lib/components/composed/DatePicker/index.d.ts +3 -0
- package/dist/lib/components/composed/DateRangePicker/DateRangePicker.d.ts +40 -0
- package/dist/lib/components/composed/DateRangePicker/index.d.ts +2 -0
- package/dist/lib/components/composed/Disclosure/Disclosure.d.ts +44 -0
- package/dist/lib/components/composed/Disclosure/index.d.ts +2 -0
- package/dist/lib/components/composed/Drawer/Drawer.d.ts +39 -0
- package/dist/lib/components/composed/Drawer/index.d.ts +2 -0
- package/dist/lib/components/composed/EmptyState/EmptyState.d.ts +43 -0
- package/dist/lib/components/composed/EmptyState/index.d.ts +2 -0
- package/dist/lib/components/composed/Field/Field.d.ts +63 -0
- package/dist/lib/components/composed/Field/index.d.ts +2 -0
- package/dist/lib/components/composed/FilterBar/FilterBar.d.ts +58 -0
- package/dist/lib/components/composed/FilterBar/index.d.ts +2 -0
- package/dist/lib/components/composed/FormSection/FormSection.d.ts +35 -0
- package/dist/lib/components/composed/FormSection/index.d.ts +2 -0
- package/dist/lib/components/composed/ListRow/ListRow.d.ts +83 -0
- package/dist/lib/components/composed/ListRow/index.d.ts +2 -0
- package/dist/lib/components/composed/Menu/Menu.d.ts +102 -0
- package/dist/lib/components/composed/Menu/index.d.ts +2 -0
- package/dist/lib/components/composed/Menu/scope.d.ts +15 -0
- package/dist/lib/components/composed/Modal/Modal.d.ts +65 -0
- package/dist/lib/components/composed/Modal/index.d.ts +2 -0
- package/dist/lib/components/composed/PageHeader/PageHeader.d.ts +46 -0
- package/dist/lib/components/composed/PageHeader/index.d.ts +2 -0
- package/dist/lib/components/composed/Pagination/Pagination.d.ts +48 -0
- package/dist/lib/components/composed/Pagination/index.d.ts +2 -0
- package/dist/lib/components/composed/Popover/Popover.d.ts +47 -0
- package/dist/lib/components/composed/Popover/index.d.ts +2 -0
- package/dist/lib/components/composed/PreferenceRow/PreferenceRow.d.ts +43 -0
- package/dist/lib/components/composed/PreferenceRow/index.d.ts +2 -0
- package/dist/lib/components/composed/Sheet/Sheet.d.ts +53 -0
- package/dist/lib/components/composed/Sheet/index.d.ts +2 -0
- package/dist/lib/components/composed/SidePanel/SidePanel.d.ts +34 -0
- package/dist/lib/components/composed/SidePanel/index.d.ts +2 -0
- package/dist/lib/components/composed/SidebarNav/SidebarNav.d.ts +85 -0
- package/dist/lib/components/composed/SidebarNav/index.d.ts +2 -0
- package/dist/lib/components/composed/Spotlight/Spotlight.d.ts +57 -0
- package/dist/lib/components/composed/Spotlight/index.d.ts +2 -0
- package/dist/lib/components/composed/Stepper/Stepper.d.ts +36 -0
- package/dist/lib/components/composed/Stepper/index.d.ts +2 -0
- package/dist/lib/components/composed/Table/Table.d.ts +142 -0
- package/dist/lib/components/composed/Table/index.d.ts +2 -0
- package/dist/lib/components/composed/Tabs/Tabs.d.ts +48 -0
- package/dist/lib/components/composed/Tabs/index.d.ts +2 -0
- package/dist/lib/components/composed/TimeInput/TimeInput.d.ts +41 -0
- package/dist/lib/components/composed/TimeInput/index.d.ts +3 -0
- package/dist/lib/components/composed/TimeInput/times.d.ts +47 -0
- package/dist/lib/components/composed/Toast/Toast.d.ts +37 -0
- package/dist/lib/components/composed/Toast/index.d.ts +2 -0
- package/dist/lib/components/composed/Toolbar/Toolbar.d.ts +45 -0
- package/dist/lib/components/composed/Toolbar/index.d.ts +2 -0
- package/dist/lib/components/composed/index.d.ts +33 -0
- package/dist/lib/components/composed/index.js +3 -0
- package/dist/lib/components/derived/AvatarGroup/AvatarGroup.d.ts +52 -0
- package/dist/lib/components/derived/AvatarGroup/index.d.ts +2 -0
- package/dist/lib/components/derived/ButtonGroup/ButtonGroup.d.ts +33 -0
- package/dist/lib/components/derived/ButtonGroup/index.d.ts +2 -0
- package/dist/lib/components/derived/ChoiceCard/ChoiceCard.d.ts +43 -0
- package/dist/lib/components/derived/ChoiceCard/index.d.ts +2 -0
- package/dist/lib/components/derived/InputGroup/InputGroup.d.ts +23 -0
- package/dist/lib/components/derived/InputGroup/index.d.ts +2 -0
- package/dist/lib/components/derived/MorphIcon/MorphIcon.d.ts +71 -0
- package/dist/lib/components/derived/MorphIcon/index.d.ts +2 -0
- package/dist/lib/components/derived/NumberFlow/NumberFlow.d.ts +47 -0
- package/dist/lib/components/derived/NumberFlow/index.d.ts +2 -0
- package/dist/lib/components/derived/NumberInput/NumberInput.d.ts +54 -0
- package/dist/lib/components/derived/NumberInput/index.d.ts +2 -0
- package/dist/lib/components/derived/PasswordInput/PasswordInput.d.ts +53 -0
- package/dist/lib/components/derived/PasswordInput/index.d.ts +2 -0
- package/dist/lib/components/derived/SearchInput/SearchInput.d.ts +33 -0
- package/dist/lib/components/derived/SearchInput/index.d.ts +2 -0
- package/dist/lib/components/derived/SegmentedControl/SegmentedControl.d.ts +44 -0
- package/dist/lib/components/derived/SegmentedControl/index.d.ts +2 -0
- package/dist/lib/components/derived/SplitButton/SplitButton.d.ts +42 -0
- package/dist/lib/components/derived/SplitButton/index.d.ts +2 -0
- package/dist/lib/components/derived/StatusDot/StatusDot.d.ts +31 -0
- package/dist/lib/components/derived/StatusDot/index.d.ts +2 -0
- package/dist/lib/components/derived/Tag/Tag.d.ts +47 -0
- package/dist/lib/components/derived/Tag/index.d.ts +2 -0
- package/dist/lib/components/derived/TagInput/TagInput.d.ts +28 -0
- package/dist/lib/components/derived/TagInput/index.d.ts +2 -0
- package/dist/lib/components/derived/TextCycle/TextCycle.d.ts +40 -0
- package/dist/lib/components/derived/TextCycle/index.d.ts +2 -0
- package/dist/lib/components/derived/ToggleButton/ToggleButton.d.ts +43 -0
- package/dist/lib/components/derived/ToggleButton/index.d.ts +2 -0
- package/dist/lib/components/derived/index.d.ts +16 -0
- package/dist/lib/components/derived/index.js +4 -0
- package/dist/lib/components/extended/ActivityList/ActivityList.d.ts +38 -0
- package/dist/lib/components/extended/ActivityList/index.d.ts +2 -0
- package/dist/lib/components/extended/AddressForm/AddressForm.d.ts +71 -0
- package/dist/lib/components/extended/AddressForm/index.d.ts +2 -0
- package/dist/lib/components/extended/ApprovalGate/ApprovalGate.d.ts +60 -0
- package/dist/lib/components/extended/ApprovalGate/index.d.ts +2 -0
- package/dist/lib/components/extended/BackgroundProgress/BackgroundProgress.d.ts +63 -0
- package/dist/lib/components/extended/BackgroundProgress/index.d.ts +2 -0
- package/dist/lib/components/extended/Citation/Citation.d.ts +61 -0
- package/dist/lib/components/extended/Citation/index.d.ts +2 -0
- package/dist/lib/components/extended/CommentThread/CommentThread.d.ts +61 -0
- package/dist/lib/components/extended/CommentThread/index.d.ts +2 -0
- package/dist/lib/components/extended/Composer/Composer.d.ts +57 -0
- package/dist/lib/components/extended/Composer/index.d.ts +2 -0
- package/dist/lib/components/extended/CouponField/CouponField.d.ts +59 -0
- package/dist/lib/components/extended/CouponField/index.d.ts +2 -0
- package/dist/lib/components/extended/DataGrid/DataGrid.d.ts +161 -0
- package/dist/lib/components/extended/DataGrid/DataGrid.state.d.ts +93 -0
- package/dist/lib/components/extended/DataGrid/index.d.ts +2 -0
- package/dist/lib/components/extended/Dropzone/Dropzone.d.ts +83 -0
- package/dist/lib/components/extended/Dropzone/index.d.ts +2 -0
- package/dist/lib/components/extended/FeedbackControl/FeedbackControl.d.ts +47 -0
- package/dist/lib/components/extended/FeedbackControl/index.d.ts +2 -0
- package/dist/lib/components/extended/FilterBuilder/FilterBuilder.d.ts +67 -0
- package/dist/lib/components/extended/FilterBuilder/index.d.ts +2 -0
- package/dist/lib/components/extended/FollowUpList/FollowUpList.d.ts +34 -0
- package/dist/lib/components/extended/FollowUpList/index.d.ts +2 -0
- package/dist/lib/components/extended/KanbanColumn/KanbanColumn.d.ts +62 -0
- package/dist/lib/components/extended/KanbanColumn/index.d.ts +2 -0
- package/dist/lib/components/extended/Message/Message.d.ts +43 -0
- package/dist/lib/components/extended/Message/index.d.ts +2 -0
- package/dist/lib/components/extended/MessageList/MessageList.d.ts +66 -0
- package/dist/lib/components/extended/MessageList/index.d.ts +2 -0
- package/dist/lib/components/extended/MetricCard/MetricCard.d.ts +60 -0
- package/dist/lib/components/extended/MetricCard/index.d.ts +2 -0
- package/dist/lib/components/extended/OrderSummary/OrderSummary.d.ts +70 -0
- package/dist/lib/components/extended/OrderSummary/index.d.ts +2 -0
- package/dist/lib/components/extended/PaymentMethodSelector/PaymentMethodSelector.d.ts +65 -0
- package/dist/lib/components/extended/PaymentMethodSelector/index.d.ts +2 -0
- package/dist/lib/components/extended/PresenceBar/PresenceBar.d.ts +49 -0
- package/dist/lib/components/extended/PresenceBar/index.d.ts +2 -0
- package/dist/lib/components/extended/PriceDisplay/PriceDisplay.d.ts +53 -0
- package/dist/lib/components/extended/PriceDisplay/index.d.ts +2 -0
- package/dist/lib/components/extended/ProductCard/ProductCard.d.ts +58 -0
- package/dist/lib/components/extended/ProductCard/index.d.ts +2 -0
- package/dist/lib/components/extended/QuantityStepper/QuantityStepper.d.ts +41 -0
- package/dist/lib/components/extended/QuantityStepper/index.d.ts +2 -0
- package/dist/lib/components/extended/ReasoningDisclosure/ReasoningDisclosure.d.ts +33 -0
- package/dist/lib/components/extended/ReasoningDisclosure/index.d.ts +2 -0
- package/dist/lib/components/extended/RecognitionFallback/RecognitionFallback.d.ts +57 -0
- package/dist/lib/components/extended/RecognitionFallback/index.d.ts +2 -0
- package/dist/lib/components/extended/RunStatusCard/RunStatusCard.d.ts +51 -0
- package/dist/lib/components/extended/RunStatusCard/index.d.ts +2 -0
- package/dist/lib/components/extended/SavedViewTabs/SavedViewTabs.d.ts +49 -0
- package/dist/lib/components/extended/SavedViewTabs/index.d.ts +2 -0
- package/dist/lib/components/extended/SourceChip/SourceChip.d.ts +37 -0
- package/dist/lib/components/extended/SourceChip/index.d.ts +2 -0
- package/dist/lib/components/extended/SourceChipRow/SourceChipRow.d.ts +54 -0
- package/dist/lib/components/extended/SourceChipRow/index.d.ts +2 -0
- package/dist/lib/components/extended/SourcePanel/SourcePanel.d.ts +46 -0
- package/dist/lib/components/extended/SourcePanel/index.d.ts +2 -0
- package/dist/lib/components/extended/StreamingText/StreamingText.d.ts +30 -0
- package/dist/lib/components/extended/StreamingText/index.d.ts +2 -0
- package/dist/lib/components/extended/ToolCallCard/ToolCallCard.d.ts +52 -0
- package/dist/lib/components/extended/ToolCallCard/index.d.ts +2 -0
- package/dist/lib/components/extended/TranscriptSync/TranscriptSync.d.ts +58 -0
- package/dist/lib/components/extended/TranscriptSync/index.d.ts +2 -0
- package/dist/lib/components/extended/TrustBlock/TrustBlock.d.ts +37 -0
- package/dist/lib/components/extended/TrustBlock/index.d.ts +2 -0
- package/dist/lib/components/extended/VoiceControlBar/VoiceControlBar.d.ts +77 -0
- package/dist/lib/components/extended/VoiceControlBar/index.d.ts +2 -0
- package/dist/lib/components/extended/index.d.ts +35 -0
- package/dist/lib/components/extended/index.js +2 -0
- package/dist/lib/fonts/pretendard/LICENSE.txt +94 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.0.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.1.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.10.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.11.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.12.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.13.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.14.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.15.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.16.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.17.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.18.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.19.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.2.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.20.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.21.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.22.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.23.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.24.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.25.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.26.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.27.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.28.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.29.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.3.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.30.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.31.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.32.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.33.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.34.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.35.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.36.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.37.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.38.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.39.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.4.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.40.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.41.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.42.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.43.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.44.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.45.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.46.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.47.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.48.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.49.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.5.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.50.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.51.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.52.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.53.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.54.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.55.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.56.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.57.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.58.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.59.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.6.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.60.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.61.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.62.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.63.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.64.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.65.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.66.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.67.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.68.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.69.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.7.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.70.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.71.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.72.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.73.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.74.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.75.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.76.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.77.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.78.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.79.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.8.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.80.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.81.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.82.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.83.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.84.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.85.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.86.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.87.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.88.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.89.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.9.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.90.woff2 +0 -0
- package/dist/lib/fonts/pretendard/PretendardVariable.subset.91.woff2 +0 -0
- package/dist/lib/foundation/focus.d.ts +10 -0
- package/dist/lib/foundation/josa.d.ts +4 -0
- package/dist/lib/index.d.ts +4 -0
- package/dist/lib/index.js +13 -0
- package/dist/lib/pretendard.css +940 -0
- package/dist/lib/reset.css +50 -0
- package/dist/lib/styles.css +3 -0
- package/dist/lib/tokens.css +1118 -0
- package/package.json +91 -0
|
@@ -0,0 +1,3447 @@
|
|
|
1
|
+
import { i as e, n as t, r as n, s as r, t as i } from "./VisuallyHidden-DcE0EFpo.js";
|
|
2
|
+
import { n as a, t as o } from "./Input-Bv7L1_wj.js";
|
|
3
|
+
import { a as s, i as c, n as l, o as u, r as d, t as f } from "./Waveform-BIE2Ztc8.js";
|
|
4
|
+
import { i as p, n as m, t as h } from "./Tooltip-BJSUlXS2.js";
|
|
5
|
+
import { a as g, i as _, n as v, o as y, r as b, t as x } from "./ToggleButton-D6oEjMeF.js";
|
|
6
|
+
import { a as S, d as C, f as w, i as T, l as E, n as D, o as O, s as ee, t as te } from "./Menu-B3G64GV4.js";
|
|
7
|
+
import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
|
|
8
|
+
import { useCallback as M, useEffect as N, useId as P, useLayoutEffect as ne, useMemo as re, useRef as F, useState as I } from "react";
|
|
9
|
+
import { AlertCircle as L, ArrowDown as ie, ArrowDownRight as ae, ArrowDownToLine as oe, ArrowUp as se, ArrowUpRight as ce, Brain as le, Check as R, CheckCircle2 as z, ChevronDown as ue, ChevronLeft as B, ChevronRight as V, CircleSlash as H, CornerDownRight as U, Eye as de, EyeOff as fe, GripVertical as W, ImageOff as pe, Keyboard as G, Mic as me, MicOff as K, Minus as he, PhoneOff as ge, Plus as q, RotateCcw as J, ShieldAlert as _e, ShieldCheck as ve, ShieldX as ye, SlidersHorizontal as be, Square as xe, Tag as Se, Terminal as Ce, ThumbsDown as we, ThumbsUp as Te, Trash2 as Ee, Upload as De, X as Y, XCircle as Oe } from "lucide-react";
|
|
10
|
+
//#region src/components/extended/ActivityList/ActivityList.tsx
|
|
11
|
+
var ke = {
|
|
12
|
+
pending: "대기 중",
|
|
13
|
+
running: "진행 중",
|
|
14
|
+
done: "완료",
|
|
15
|
+
failed: "실패",
|
|
16
|
+
skipped: "건너뜀"
|
|
17
|
+
};
|
|
18
|
+
function Ae({ steps: t, label: n, announce: a, size: o = "md", className: s, ...c }) {
|
|
19
|
+
let l = t.find((e) => e.state === "running");
|
|
20
|
+
return /* @__PURE__ */ j("div", {
|
|
21
|
+
...c,
|
|
22
|
+
className: `activity-list ${s ?? ""}`.trim(),
|
|
23
|
+
"data-size": o,
|
|
24
|
+
children: [/* @__PURE__ */ A("ol", {
|
|
25
|
+
className: "activity-list__steps",
|
|
26
|
+
"aria-label": n,
|
|
27
|
+
children: t.map((t) => /* @__PURE__ */ j("li", {
|
|
28
|
+
className: "activity-list__step",
|
|
29
|
+
"data-state": t.state,
|
|
30
|
+
"data-part": "step",
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ A("span", {
|
|
33
|
+
className: "activity-list__mark",
|
|
34
|
+
"aria-hidden": "true",
|
|
35
|
+
children: t.state === "running" ? /* @__PURE__ */ A(e, { size: o === "sm" ? "xs" : "sm" }) : t.state === "done" ? /* @__PURE__ */ A(r, {
|
|
36
|
+
icon: R,
|
|
37
|
+
size: "xs"
|
|
38
|
+
}) : t.state === "failed" ? /* @__PURE__ */ A(r, {
|
|
39
|
+
icon: L,
|
|
40
|
+
size: "xs"
|
|
41
|
+
}) : t.state === "skipped" ? /* @__PURE__ */ A(r, {
|
|
42
|
+
icon: he,
|
|
43
|
+
size: "xs"
|
|
44
|
+
}) : null
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ j("span", {
|
|
47
|
+
className: "activity-list__body",
|
|
48
|
+
children: [/* @__PURE__ */ j("span", {
|
|
49
|
+
className: "activity-list__label",
|
|
50
|
+
children: [t.label, /* @__PURE__ */ j(i, { children: [" — ", ke[t.state]] })]
|
|
51
|
+
}), t.detail ? /* @__PURE__ */ A("span", {
|
|
52
|
+
className: "activity-list__detail",
|
|
53
|
+
children: t.detail
|
|
54
|
+
}) : null]
|
|
55
|
+
}),
|
|
56
|
+
t.duration ? /* @__PURE__ */ A("span", {
|
|
57
|
+
className: "activity-list__duration",
|
|
58
|
+
children: t.duration
|
|
59
|
+
}) : null
|
|
60
|
+
]
|
|
61
|
+
}, t.id))
|
|
62
|
+
}), a ? /* @__PURE__ */ A(i, { children: /* @__PURE__ */ A("p", {
|
|
63
|
+
"aria-live": "polite",
|
|
64
|
+
children: l ? `${l.label} — 진행 중` : ""
|
|
65
|
+
}) }) : null]
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/components/extended/BackgroundProgress/BackgroundProgress.tsx
|
|
70
|
+
var je = {
|
|
71
|
+
done: z,
|
|
72
|
+
failed: Oe
|
|
73
|
+
}, Me = {
|
|
74
|
+
running: "진행 중",
|
|
75
|
+
done: "완료",
|
|
76
|
+
failed: "실패"
|
|
77
|
+
};
|
|
78
|
+
function Ne({ title: e, jobs: n, value: a, open: o = !1, onOpenChange: c, onDismiss: l, fit: u = "viewport", className: d, ...f }) {
|
|
79
|
+
let p = n.filter((e) => e.state === "failed").length, m = n.filter((e) => (e.state ?? "running") === "running").length, h = F(null), g = F(/* @__PURE__ */ new Map()), [_, v] = I("");
|
|
80
|
+
N(() => {
|
|
81
|
+
let e = g.current, t = n.filter((t) => {
|
|
82
|
+
let n = t.state ?? "running";
|
|
83
|
+
return n !== "running" && e.has(t.id) && e.get(t.id) !== n;
|
|
84
|
+
}).map((e) => `${e.label} ${Me[e.state ?? "running"]}`);
|
|
85
|
+
g.current = new Map(n.map((e) => [e.id, e.state ?? "running"])), t.length && v(t.join(", "));
|
|
86
|
+
}, [n]);
|
|
87
|
+
let y = F(null);
|
|
88
|
+
return N(() => {
|
|
89
|
+
let e = y.current;
|
|
90
|
+
if (e === null) return;
|
|
91
|
+
y.current = null;
|
|
92
|
+
let t = h.current;
|
|
93
|
+
if (!t || document.activeElement !== document.body) return;
|
|
94
|
+
let n = [...t.querySelectorAll("[data-part=\"cancel\"]")];
|
|
95
|
+
(n[Math.min(e, n.length - 1)] ?? t.querySelector("[data-part=\"toggle\"]"))?.focus();
|
|
96
|
+
}, [n]), /* @__PURE__ */ j("section", {
|
|
97
|
+
...f,
|
|
98
|
+
ref: h,
|
|
99
|
+
className: `background-progress ${d ?? ""}`.trim(),
|
|
100
|
+
"data-fit": u,
|
|
101
|
+
"data-open": o ? "" : void 0,
|
|
102
|
+
"data-failed": p > 0 ? "" : void 0,
|
|
103
|
+
"aria-label": e,
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ A(i, {
|
|
106
|
+
as: "p",
|
|
107
|
+
children: /* @__PURE__ */ A("span", {
|
|
108
|
+
role: "status",
|
|
109
|
+
"data-part": "live",
|
|
110
|
+
children: _
|
|
111
|
+
})
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ j("div", {
|
|
114
|
+
className: "background-progress__head",
|
|
115
|
+
children: [
|
|
116
|
+
/* @__PURE__ */ j("button", {
|
|
117
|
+
type: "button",
|
|
118
|
+
className: "background-progress__toggle",
|
|
119
|
+
"aria-expanded": o,
|
|
120
|
+
onClick: () => c?.(!o),
|
|
121
|
+
"data-part": "toggle",
|
|
122
|
+
children: [/* @__PURE__ */ A(r, {
|
|
123
|
+
icon: ue,
|
|
124
|
+
size: "sm",
|
|
125
|
+
className: "background-progress__chevron",
|
|
126
|
+
"aria-hidden": "true"
|
|
127
|
+
}), /* @__PURE__ */ A("span", {
|
|
128
|
+
className: "background-progress__title",
|
|
129
|
+
children: e
|
|
130
|
+
})]
|
|
131
|
+
}),
|
|
132
|
+
/* @__PURE__ */ j("p", {
|
|
133
|
+
className: "background-progress__count",
|
|
134
|
+
"data-part": "count",
|
|
135
|
+
children: [p > 0 ? `${p}개 실패 · ` : null, m > 0 ? `${m}개 진행 중` : "모두 끝남"]
|
|
136
|
+
}),
|
|
137
|
+
l ? /* @__PURE__ */ A(t, {
|
|
138
|
+
icon: Y,
|
|
139
|
+
label: `${e} 닫기`,
|
|
140
|
+
size: "sm",
|
|
141
|
+
variant: "ghost",
|
|
142
|
+
tone: "neutral",
|
|
143
|
+
onClick: l,
|
|
144
|
+
"data-part": "dismiss"
|
|
145
|
+
}) : null
|
|
146
|
+
]
|
|
147
|
+
}),
|
|
148
|
+
/* @__PURE__ */ A(s, {
|
|
149
|
+
value: a,
|
|
150
|
+
max: 100,
|
|
151
|
+
label: e,
|
|
152
|
+
size: "sm",
|
|
153
|
+
tone: p > 0 ? "danger" : "accent",
|
|
154
|
+
className: "background-progress__bar",
|
|
155
|
+
"data-part": "overall"
|
|
156
|
+
}),
|
|
157
|
+
o ? /* @__PURE__ */ A("ul", {
|
|
158
|
+
className: "background-progress__jobs",
|
|
159
|
+
"data-part": "jobs",
|
|
160
|
+
children: n.map((e) => {
|
|
161
|
+
let n = e.state ?? "running";
|
|
162
|
+
return /* @__PURE__ */ j("li", {
|
|
163
|
+
className: "background-progress__job",
|
|
164
|
+
"data-state": n,
|
|
165
|
+
"data-part": e.id,
|
|
166
|
+
children: [
|
|
167
|
+
/* @__PURE__ */ j("div", {
|
|
168
|
+
className: "background-progress__job-text",
|
|
169
|
+
children: [/* @__PURE__ */ j("p", {
|
|
170
|
+
className: "background-progress__job-label",
|
|
171
|
+
children: [
|
|
172
|
+
n === "running" ? null : /* @__PURE__ */ A(r, {
|
|
173
|
+
icon: je[n],
|
|
174
|
+
size: "xs",
|
|
175
|
+
className: "background-progress__job-glyph",
|
|
176
|
+
"aria-hidden": "true"
|
|
177
|
+
}),
|
|
178
|
+
/* @__PURE__ */ A("span", {
|
|
179
|
+
className: "background-progress__job-name",
|
|
180
|
+
children: e.label
|
|
181
|
+
}),
|
|
182
|
+
/* @__PURE__ */ A("span", {
|
|
183
|
+
className: "background-progress__said",
|
|
184
|
+
children: ` — ${Me[n]}`
|
|
185
|
+
})
|
|
186
|
+
]
|
|
187
|
+
}), e.detail ? /* @__PURE__ */ A("p", {
|
|
188
|
+
className: "background-progress__job-detail",
|
|
189
|
+
children: e.detail
|
|
190
|
+
}) : null]
|
|
191
|
+
}),
|
|
192
|
+
n === "running" ? /* @__PURE__ */ A(s, {
|
|
193
|
+
value: e.value,
|
|
194
|
+
max: 100,
|
|
195
|
+
label: e.label,
|
|
196
|
+
size: "sm",
|
|
197
|
+
className: "background-progress__job-bar",
|
|
198
|
+
"data-part": "job-bar"
|
|
199
|
+
}) : null,
|
|
200
|
+
e.onCancel && n === "running" ? /* @__PURE__ */ A(t, {
|
|
201
|
+
icon: Y,
|
|
202
|
+
label: `${e.label} 취소`,
|
|
203
|
+
size: "sm",
|
|
204
|
+
variant: "ghost",
|
|
205
|
+
tone: "neutral",
|
|
206
|
+
onClick: (t) => {
|
|
207
|
+
let n = [...h.current?.querySelectorAll("[data-part=\"cancel\"]") ?? []];
|
|
208
|
+
y.current = Math.max(0, n.indexOf(t.currentTarget)), e.onCancel?.();
|
|
209
|
+
},
|
|
210
|
+
"data-part": "cancel"
|
|
211
|
+
}) : null
|
|
212
|
+
]
|
|
213
|
+
}, e.id);
|
|
214
|
+
})
|
|
215
|
+
}) : null
|
|
216
|
+
]
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
//#endregion
|
|
220
|
+
//#region src/components/extended/AddressForm/AddressForm.tsx
|
|
221
|
+
var Pe = {
|
|
222
|
+
KR: "대한민국",
|
|
223
|
+
US: "미국"
|
|
224
|
+
}, Fe = {
|
|
225
|
+
KR: [
|
|
226
|
+
"postalCode",
|
|
227
|
+
"line1",
|
|
228
|
+
"line2"
|
|
229
|
+
],
|
|
230
|
+
US: [
|
|
231
|
+
"line1",
|
|
232
|
+
"line2",
|
|
233
|
+
"city",
|
|
234
|
+
"region",
|
|
235
|
+
"postalCode"
|
|
236
|
+
]
|
|
237
|
+
}, Ie = {
|
|
238
|
+
KR: {
|
|
239
|
+
postalCode: "우편번호",
|
|
240
|
+
line1: "도로명 주소",
|
|
241
|
+
line2: "상세주소"
|
|
242
|
+
},
|
|
243
|
+
US: {
|
|
244
|
+
line1: "Street address",
|
|
245
|
+
line2: "Apartment, suite, etc.",
|
|
246
|
+
city: "City",
|
|
247
|
+
region: "State",
|
|
248
|
+
postalCode: "ZIP code"
|
|
249
|
+
}
|
|
250
|
+
}, X = {
|
|
251
|
+
country: "country",
|
|
252
|
+
name: "name",
|
|
253
|
+
phone: "tel",
|
|
254
|
+
postalCode: "postal-code",
|
|
255
|
+
line1: "address-line1",
|
|
256
|
+
line2: "address-line2",
|
|
257
|
+
city: "address-level2",
|
|
258
|
+
region: "address-level1"
|
|
259
|
+
}, Le = [
|
|
260
|
+
"CA",
|
|
261
|
+
"NY",
|
|
262
|
+
"TX",
|
|
263
|
+
"WA",
|
|
264
|
+
"IL",
|
|
265
|
+
"MA"
|
|
266
|
+
];
|
|
267
|
+
function Re({ value: e, onChange: t, label: r, onFindPostcode: i, errors: a, countries: s = ["KR", "US"], regions: c = Le, namePrefix: l, className: u, ...f }) {
|
|
268
|
+
let p = (n) => t({
|
|
269
|
+
...e,
|
|
270
|
+
...n
|
|
271
|
+
}), m = Fe[e.country], h = Ie[e.country], g = P(), _ = (e) => `${g}-${e}`, v = (e) => l ? `${l}.${e}` : e, y = (n) => {
|
|
272
|
+
n !== e.country && t({
|
|
273
|
+
...e,
|
|
274
|
+
country: n,
|
|
275
|
+
postalCode: "",
|
|
276
|
+
line1: "",
|
|
277
|
+
line2: "",
|
|
278
|
+
city: "",
|
|
279
|
+
region: ""
|
|
280
|
+
});
|
|
281
|
+
};
|
|
282
|
+
return /* @__PURE__ */ j("div", {
|
|
283
|
+
...f,
|
|
284
|
+
className: `address-form ${u ?? ""}`.trim(),
|
|
285
|
+
role: "group",
|
|
286
|
+
"aria-label": r,
|
|
287
|
+
children: [
|
|
288
|
+
/* @__PURE__ */ A(E, {
|
|
289
|
+
label: "국가/지역",
|
|
290
|
+
id: _("country"),
|
|
291
|
+
error: a?.country,
|
|
292
|
+
children: (t) => /* @__PURE__ */ A(d, {
|
|
293
|
+
...t,
|
|
294
|
+
name: v("country"),
|
|
295
|
+
value: e.country,
|
|
296
|
+
autoComplete: X.country,
|
|
297
|
+
onChange: (e) => y(e.target.value),
|
|
298
|
+
"data-part": "country",
|
|
299
|
+
children: s.map((e) => /* @__PURE__ */ A("option", {
|
|
300
|
+
value: e,
|
|
301
|
+
children: Pe[e]
|
|
302
|
+
}, e))
|
|
303
|
+
})
|
|
304
|
+
}),
|
|
305
|
+
/* @__PURE__ */ j("div", {
|
|
306
|
+
className: "address-form__pair",
|
|
307
|
+
children: [/* @__PURE__ */ A(E, {
|
|
308
|
+
label: "받는 사람",
|
|
309
|
+
id: _("name"),
|
|
310
|
+
error: a?.name,
|
|
311
|
+
required: !0,
|
|
312
|
+
children: (t) => /* @__PURE__ */ A(o, {
|
|
313
|
+
...t,
|
|
314
|
+
name: v("name"),
|
|
315
|
+
value: e.name,
|
|
316
|
+
autoComplete: X.name,
|
|
317
|
+
onChange: (e) => p({ name: e.target.value }),
|
|
318
|
+
"data-part": "name"
|
|
319
|
+
})
|
|
320
|
+
}), /* @__PURE__ */ A(E, {
|
|
321
|
+
label: "연락처",
|
|
322
|
+
id: _("phone"),
|
|
323
|
+
error: a?.phone,
|
|
324
|
+
required: !0,
|
|
325
|
+
children: (t) => /* @__PURE__ */ A(o, {
|
|
326
|
+
...t,
|
|
327
|
+
name: v("phone"),
|
|
328
|
+
type: "tel",
|
|
329
|
+
inputMode: "tel",
|
|
330
|
+
value: e.phone,
|
|
331
|
+
autoComplete: X.phone,
|
|
332
|
+
onChange: (e) => p({ phone: e.target.value }),
|
|
333
|
+
"data-part": "phone"
|
|
334
|
+
})
|
|
335
|
+
})]
|
|
336
|
+
}),
|
|
337
|
+
m.map((t) => t === "postalCode" && e.country === "KR" ? /* @__PURE__ */ A(E, {
|
|
338
|
+
label: h[t],
|
|
339
|
+
id: _("postalCode"),
|
|
340
|
+
hint: "도로명이나 건물 이름으로 찾습니다",
|
|
341
|
+
error: a?.postalCode,
|
|
342
|
+
required: !0,
|
|
343
|
+
children: (t) => /* @__PURE__ */ j("div", {
|
|
344
|
+
className: "address-form__lookup",
|
|
345
|
+
children: [/* @__PURE__ */ A(o, {
|
|
346
|
+
...t,
|
|
347
|
+
name: v("postalCode"),
|
|
348
|
+
value: e.postalCode,
|
|
349
|
+
inputMode: "numeric",
|
|
350
|
+
autoComplete: X.postalCode,
|
|
351
|
+
readOnly: !!i,
|
|
352
|
+
onChange: (e) => {
|
|
353
|
+
i || p({ postalCode: e.target.value });
|
|
354
|
+
},
|
|
355
|
+
"data-part": "postal"
|
|
356
|
+
}), /* @__PURE__ */ A(n, {
|
|
357
|
+
variant: "outline",
|
|
358
|
+
tone: "neutral",
|
|
359
|
+
disabled: !i,
|
|
360
|
+
onClick: i,
|
|
361
|
+
"data-part": "find",
|
|
362
|
+
children: "주소 찾기"
|
|
363
|
+
})]
|
|
364
|
+
})
|
|
365
|
+
}, t) : t === "region" && e.country === "US" ? /* @__PURE__ */ A(E, {
|
|
366
|
+
label: h[t],
|
|
367
|
+
id: _("region"),
|
|
368
|
+
error: a?.region,
|
|
369
|
+
required: !0,
|
|
370
|
+
children: (t) => /* @__PURE__ */ j(d, {
|
|
371
|
+
...t,
|
|
372
|
+
name: v("region"),
|
|
373
|
+
value: e.region,
|
|
374
|
+
autoComplete: X.region,
|
|
375
|
+
onChange: (e) => p({ region: e.target.value }),
|
|
376
|
+
"data-part": "region",
|
|
377
|
+
children: [/* @__PURE__ */ A("option", {
|
|
378
|
+
value: "",
|
|
379
|
+
children: "Choose"
|
|
380
|
+
}), c.map((e) => /* @__PURE__ */ A("option", {
|
|
381
|
+
value: e,
|
|
382
|
+
children: e
|
|
383
|
+
}, e))]
|
|
384
|
+
})
|
|
385
|
+
}, t) : /* @__PURE__ */ A(E, {
|
|
386
|
+
label: h[t],
|
|
387
|
+
id: _(t),
|
|
388
|
+
error: a?.[t],
|
|
389
|
+
...t === "line2" ? { optional: !0 } : { required: !0 },
|
|
390
|
+
children: (n) => /* @__PURE__ */ A(o, {
|
|
391
|
+
...n,
|
|
392
|
+
name: v(t),
|
|
393
|
+
value: e[t],
|
|
394
|
+
inputMode: t === "postalCode" ? "numeric" : void 0,
|
|
395
|
+
autoComplete: X[t],
|
|
396
|
+
onChange: (e) => p({ [t]: e.target.value }),
|
|
397
|
+
"data-part": t
|
|
398
|
+
})
|
|
399
|
+
}, t))
|
|
400
|
+
]
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
//#endregion
|
|
404
|
+
//#region src/components/extended/ApprovalGate/ApprovalGate.tsx
|
|
405
|
+
function ze({ title: e, action: t, detail: i, scopes: a, scope: o, onScopeChange: s, onApprove: l, onDeny: u, approveLabel: d = "허용", denyLabel: f = "거부", risk: p = "normal", state: m = "waiting", decision: h, className: g, ..._ }) {
|
|
406
|
+
let v = P(), y = P(), b = m === "waiting", x = F(null), S = F(b);
|
|
407
|
+
return N(() => {
|
|
408
|
+
let e = S.current && !b;
|
|
409
|
+
S.current = b, !(!e || document.activeElement !== document.body) && x.current?.focus();
|
|
410
|
+
}, [b]), /* @__PURE__ */ j("section", {
|
|
411
|
+
..._,
|
|
412
|
+
className: `approval-gate ${g ?? ""}`.trim(),
|
|
413
|
+
"data-risk": p,
|
|
414
|
+
"data-state": m,
|
|
415
|
+
"aria-labelledby": v,
|
|
416
|
+
"aria-live": b ? "assertive" : void 0,
|
|
417
|
+
children: [
|
|
418
|
+
/* @__PURE__ */ j("div", {
|
|
419
|
+
className: "approval-gate__head",
|
|
420
|
+
children: [/* @__PURE__ */ A("span", {
|
|
421
|
+
className: "approval-gate__mark",
|
|
422
|
+
"aria-hidden": "true",
|
|
423
|
+
children: /* @__PURE__ */ A(r, {
|
|
424
|
+
icon: m === "approved" ? ve : m === "denied" ? ye : _e,
|
|
425
|
+
size: "sm"
|
|
426
|
+
})
|
|
427
|
+
}), /* @__PURE__ */ A("h3", {
|
|
428
|
+
className: "approval-gate__title",
|
|
429
|
+
id: v,
|
|
430
|
+
children: e
|
|
431
|
+
})]
|
|
432
|
+
}),
|
|
433
|
+
/* @__PURE__ */ A("div", {
|
|
434
|
+
className: "approval-gate__action",
|
|
435
|
+
"data-part": "action",
|
|
436
|
+
children: t
|
|
437
|
+
}),
|
|
438
|
+
i ? /* @__PURE__ */ A("p", {
|
|
439
|
+
className: "approval-gate__detail",
|
|
440
|
+
children: i
|
|
441
|
+
}) : null,
|
|
442
|
+
b && a?.length ? /* @__PURE__ */ j("fieldset", {
|
|
443
|
+
className: "approval-gate__scopes",
|
|
444
|
+
children: [/* @__PURE__ */ A("legend", {
|
|
445
|
+
className: "approval-gate__legend",
|
|
446
|
+
children: "이 결정이 미치는 범위"
|
|
447
|
+
}), a.map((e) => /* @__PURE__ */ A(c, {
|
|
448
|
+
className: "approval-gate__scope",
|
|
449
|
+
name: y,
|
|
450
|
+
value: e.id,
|
|
451
|
+
checked: o === e.id,
|
|
452
|
+
onChange: () => s?.(e.id),
|
|
453
|
+
"data-part": `scope-${e.id}`,
|
|
454
|
+
children: /* @__PURE__ */ j("span", {
|
|
455
|
+
className: "approval-gate__scope-text",
|
|
456
|
+
children: [/* @__PURE__ */ A("span", {
|
|
457
|
+
className: "approval-gate__scope-label",
|
|
458
|
+
children: e.label
|
|
459
|
+
}), /* @__PURE__ */ A("span", {
|
|
460
|
+
className: "approval-gate__scope-detail",
|
|
461
|
+
children: e.description
|
|
462
|
+
})]
|
|
463
|
+
})
|
|
464
|
+
}, e.id))]
|
|
465
|
+
}) : null,
|
|
466
|
+
/* @__PURE__ */ A("div", {
|
|
467
|
+
className: "approval-gate__resolve",
|
|
468
|
+
"aria-live": "polite",
|
|
469
|
+
"data-part": "live",
|
|
470
|
+
children: b ? /* @__PURE__ */ j("div", {
|
|
471
|
+
className: "approval-gate__decide",
|
|
472
|
+
children: [/* @__PURE__ */ A(n, {
|
|
473
|
+
variant: p === "high" ? "solid" : "outline",
|
|
474
|
+
tone: "neutral",
|
|
475
|
+
onClick: u,
|
|
476
|
+
"data-part": "deny",
|
|
477
|
+
children: f
|
|
478
|
+
}), /* @__PURE__ */ A(n, {
|
|
479
|
+
variant: p === "high" ? "outline" : "solid",
|
|
480
|
+
tone: p === "high" ? "danger" : "accent",
|
|
481
|
+
onClick: l,
|
|
482
|
+
"data-part": "approve",
|
|
483
|
+
children: d
|
|
484
|
+
})]
|
|
485
|
+
}) : /* @__PURE__ */ A("p", {
|
|
486
|
+
className: "approval-gate__decision",
|
|
487
|
+
ref: x,
|
|
488
|
+
tabIndex: -1,
|
|
489
|
+
"data-part": "decision",
|
|
490
|
+
children: h ?? (m === "approved" ? "허용했습니다." : m === "denied" ? "거부했습니다." : "요청이 만료되었습니다.")
|
|
491
|
+
})
|
|
492
|
+
})
|
|
493
|
+
]
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
//#endregion
|
|
497
|
+
//#region src/components/extended/Citation/Citation.tsx
|
|
498
|
+
function Be({ index: e, title: t, domain: n, href: r, onActivate: a, className: o, ...s }) {
|
|
499
|
+
let c = n ? `출처 ${e}: ${t} · ${n}` : `출처 ${e}: ${t}`, l = r ? `${c} · 새 창에서 열림` : c, u = (e) => {
|
|
500
|
+
a && (r && (e.metaKey || e.ctrlKey || e.shiftKey) || (e.preventDefault(), a()));
|
|
501
|
+
}, d = /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("span", {
|
|
502
|
+
"aria-hidden": "true",
|
|
503
|
+
children: e
|
|
504
|
+
}), /* @__PURE__ */ A(i, { children: l })] });
|
|
505
|
+
return /* @__PURE__ */ A("sup", {
|
|
506
|
+
className: `citation ${o ?? ""}`.trim(),
|
|
507
|
+
...s,
|
|
508
|
+
children: /* @__PURE__ */ A(h, {
|
|
509
|
+
content: n ? `${t} · ${n}` : t,
|
|
510
|
+
children: r ? /* @__PURE__ */ A("a", {
|
|
511
|
+
className: "citation__mark",
|
|
512
|
+
href: r,
|
|
513
|
+
target: "_blank",
|
|
514
|
+
rel: "noreferrer",
|
|
515
|
+
onClick: u,
|
|
516
|
+
"data-part": "mark",
|
|
517
|
+
children: d
|
|
518
|
+
}) : a ? /* @__PURE__ */ A("button", {
|
|
519
|
+
type: "button",
|
|
520
|
+
className: "citation__mark",
|
|
521
|
+
onClick: u,
|
|
522
|
+
"data-part": "mark",
|
|
523
|
+
children: d
|
|
524
|
+
}) : /* @__PURE__ */ A("span", {
|
|
525
|
+
className: "citation__mark",
|
|
526
|
+
"data-static": "",
|
|
527
|
+
"data-part": "mark",
|
|
528
|
+
children: d
|
|
529
|
+
})
|
|
530
|
+
})
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
//#endregion
|
|
534
|
+
//#region src/components/extended/CommentThread/CommentThread.tsx
|
|
535
|
+
function Ve(e) {
|
|
536
|
+
return e?.length ? e.flatMap((e) => [e, ...Ve(e.replies)]) : [];
|
|
537
|
+
}
|
|
538
|
+
function He({ comment: e, reply: t }) {
|
|
539
|
+
let n = t ? [] : Ve(e.replies);
|
|
540
|
+
return /* @__PURE__ */ j("li", {
|
|
541
|
+
className: "comment-thread__comment",
|
|
542
|
+
"data-reply": t ? "" : void 0,
|
|
543
|
+
"data-part": "comment",
|
|
544
|
+
children: [/* @__PURE__ */ A(a, {
|
|
545
|
+
name: e.author,
|
|
546
|
+
size: "sm",
|
|
547
|
+
decorative: !0
|
|
548
|
+
}), /* @__PURE__ */ j("div", {
|
|
549
|
+
className: "comment-thread__body",
|
|
550
|
+
children: [
|
|
551
|
+
/* @__PURE__ */ j("p", {
|
|
552
|
+
className: "comment-thread__head",
|
|
553
|
+
children: [
|
|
554
|
+
/* @__PURE__ */ A("span", {
|
|
555
|
+
className: "comment-thread__author",
|
|
556
|
+
children: e.author
|
|
557
|
+
}),
|
|
558
|
+
/* @__PURE__ */ A("time", {
|
|
559
|
+
className: "comment-thread__time",
|
|
560
|
+
dateTime: e.time,
|
|
561
|
+
children: e.timeLabel ?? e.time
|
|
562
|
+
}),
|
|
563
|
+
e.edited ? /* @__PURE__ */ A("span", {
|
|
564
|
+
className: "comment-thread__edited",
|
|
565
|
+
children: "편집됨"
|
|
566
|
+
}) : null
|
|
567
|
+
]
|
|
568
|
+
}),
|
|
569
|
+
/* @__PURE__ */ A("div", {
|
|
570
|
+
className: "comment-thread__text",
|
|
571
|
+
children: e.body
|
|
572
|
+
}),
|
|
573
|
+
e.actions ? /* @__PURE__ */ A("div", {
|
|
574
|
+
className: "comment-thread__actions",
|
|
575
|
+
children: e.actions
|
|
576
|
+
}) : null,
|
|
577
|
+
n.length ? /* @__PURE__ */ A("ul", {
|
|
578
|
+
className: "comment-thread__replies",
|
|
579
|
+
children: n.map((e) => /* @__PURE__ */ A(He, {
|
|
580
|
+
comment: e,
|
|
581
|
+
reply: !0
|
|
582
|
+
}, e.id))
|
|
583
|
+
}) : null
|
|
584
|
+
]
|
|
585
|
+
})]
|
|
586
|
+
});
|
|
587
|
+
}
|
|
588
|
+
function Ue({ comments: e, label: t, resolved: i, onResolve: a, onReopen: o, composer: s, loading: c, loadingComments: l = 2, empty: u = "아직 댓글이 없습니다.", error: d, className: f, ...p }) {
|
|
589
|
+
let h = e.reduce((e, t) => e + 1 + Ve(t.replies).length, 0);
|
|
590
|
+
return /* @__PURE__ */ A("section", {
|
|
591
|
+
...p,
|
|
592
|
+
className: `comment-thread ${f ?? ""}`.trim(),
|
|
593
|
+
"data-resolved": i ? "" : void 0,
|
|
594
|
+
"aria-label": t,
|
|
595
|
+
children: i ? /* @__PURE__ */ j("div", {
|
|
596
|
+
className: "comment-thread__resolved",
|
|
597
|
+
"data-part": "resolved",
|
|
598
|
+
children: [
|
|
599
|
+
/* @__PURE__ */ A("span", {
|
|
600
|
+
className: "comment-thread__resolved-mark",
|
|
601
|
+
"aria-hidden": "true",
|
|
602
|
+
children: /* @__PURE__ */ A(r, {
|
|
603
|
+
icon: R,
|
|
604
|
+
size: "xs"
|
|
605
|
+
})
|
|
606
|
+
}),
|
|
607
|
+
/* @__PURE__ */ j("p", {
|
|
608
|
+
className: "comment-thread__resolved-text",
|
|
609
|
+
children: [
|
|
610
|
+
"해결됨 · 댓글 ",
|
|
611
|
+
h,
|
|
612
|
+
"개"
|
|
613
|
+
]
|
|
614
|
+
}),
|
|
615
|
+
o ? /* @__PURE__ */ A(n, {
|
|
616
|
+
size: "sm",
|
|
617
|
+
variant: "ghost",
|
|
618
|
+
tone: "neutral",
|
|
619
|
+
onClick: o,
|
|
620
|
+
"data-part": "reopen",
|
|
621
|
+
children: "다시 열기"
|
|
622
|
+
}) : null
|
|
623
|
+
]
|
|
624
|
+
}) : /* @__PURE__ */ j(k, { children: [
|
|
625
|
+
/* @__PURE__ */ A("ul", {
|
|
626
|
+
className: "comment-thread__comments",
|
|
627
|
+
role: "log",
|
|
628
|
+
"aria-label": t,
|
|
629
|
+
"aria-busy": c || void 0,
|
|
630
|
+
children: d ? /* @__PURE__ */ A("li", {
|
|
631
|
+
className: "comment-thread__state",
|
|
632
|
+
role: "alert",
|
|
633
|
+
"data-part": "error",
|
|
634
|
+
children: d
|
|
635
|
+
}) : c ? Array.from({ length: l }, (e, t) => /* @__PURE__ */ j("li", {
|
|
636
|
+
className: "comment-thread__comment",
|
|
637
|
+
"data-part": "waiting-comment",
|
|
638
|
+
children: [/* @__PURE__ */ A(m, {
|
|
639
|
+
shape: "circle",
|
|
640
|
+
size: "sm"
|
|
641
|
+
}), /* @__PURE__ */ j("div", {
|
|
642
|
+
className: "comment-thread__body",
|
|
643
|
+
children: [/* @__PURE__ */ A(m, {
|
|
644
|
+
shape: "text",
|
|
645
|
+
lines: 1
|
|
646
|
+
}), /* @__PURE__ */ A(m, {
|
|
647
|
+
shape: "text",
|
|
648
|
+
lines: 2
|
|
649
|
+
})]
|
|
650
|
+
})]
|
|
651
|
+
}, `waiting-${t}`)) : e.length === 0 ? /* @__PURE__ */ A("li", {
|
|
652
|
+
className: "comment-thread__state",
|
|
653
|
+
"data-part": "empty",
|
|
654
|
+
children: u
|
|
655
|
+
}) : e.map((e) => /* @__PURE__ */ A(He, { comment: e }, e.id))
|
|
656
|
+
}),
|
|
657
|
+
s ? /* @__PURE__ */ A("div", {
|
|
658
|
+
className: "comment-thread__composer",
|
|
659
|
+
children: s
|
|
660
|
+
}) : null,
|
|
661
|
+
a ? /* @__PURE__ */ A("div", {
|
|
662
|
+
className: "comment-thread__foot",
|
|
663
|
+
children: /* @__PURE__ */ A(n, {
|
|
664
|
+
size: "sm",
|
|
665
|
+
variant: "outline",
|
|
666
|
+
tone: "neutral",
|
|
667
|
+
iconStart: R,
|
|
668
|
+
onClick: a,
|
|
669
|
+
"data-part": "resolve",
|
|
670
|
+
children: "해결로 표시"
|
|
671
|
+
})
|
|
672
|
+
}) : null
|
|
673
|
+
] })
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
//#endregion
|
|
677
|
+
//#region src/components/extended/Composer/Composer.tsx
|
|
678
|
+
function We() {
|
|
679
|
+
let [e, t] = I(() => typeof window > "u" ? !1 : window.matchMedia("(pointer: coarse)").matches);
|
|
680
|
+
return N(() => {
|
|
681
|
+
let e = window.matchMedia("(pointer: coarse)"), n = () => t(e.matches);
|
|
682
|
+
return e.addEventListener("change", n), () => e.removeEventListener("change", n);
|
|
683
|
+
}, []), e;
|
|
684
|
+
}
|
|
685
|
+
function Ge({ value: e, onValueChange: n, onSubmit: r, onStop: i, running: a, label: o, placeholder: s, maxRows: c = 8, attachments: l, tools: u, hint: d, disabled: f, enterSends: p, sendLabel: m = "보내기", stopLabel: h = "중지", className: g, ..._ }) {
|
|
686
|
+
let v = We(), y = p ?? !v, b = e.trim().length === 0, x = !a && !f && !b, S = () => {
|
|
687
|
+
x && r();
|
|
688
|
+
}, C = (e) => {
|
|
689
|
+
e.key !== "Enter" || e.shiftKey || !y || e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229 || x && (e.preventDefault(), r());
|
|
690
|
+
};
|
|
691
|
+
return /* @__PURE__ */ j("form", {
|
|
692
|
+
..._,
|
|
693
|
+
className: `composer ${g ?? ""}`.trim(),
|
|
694
|
+
"data-running": a ? "" : void 0,
|
|
695
|
+
"data-disabled": f ? "" : void 0,
|
|
696
|
+
onSubmit: (e) => {
|
|
697
|
+
e.preventDefault(), S();
|
|
698
|
+
},
|
|
699
|
+
children: [
|
|
700
|
+
l ? /* @__PURE__ */ A("div", {
|
|
701
|
+
className: "composer__attachments",
|
|
702
|
+
"data-part": "attachments",
|
|
703
|
+
children: l
|
|
704
|
+
}) : null,
|
|
705
|
+
/* @__PURE__ */ A("div", {
|
|
706
|
+
className: "composer__grow",
|
|
707
|
+
"data-value": `${e} `,
|
|
708
|
+
"data-rows": c,
|
|
709
|
+
children: /* @__PURE__ */ A("textarea", {
|
|
710
|
+
className: "composer__field",
|
|
711
|
+
value: e,
|
|
712
|
+
onChange: (e) => n(e.target.value),
|
|
713
|
+
onKeyDown: C,
|
|
714
|
+
placeholder: s,
|
|
715
|
+
"aria-label": o,
|
|
716
|
+
disabled: f,
|
|
717
|
+
rows: 1,
|
|
718
|
+
"data-part": "field"
|
|
719
|
+
})
|
|
720
|
+
}),
|
|
721
|
+
/* @__PURE__ */ j("div", {
|
|
722
|
+
className: "composer__bar",
|
|
723
|
+
children: [
|
|
724
|
+
/* @__PURE__ */ A("div", {
|
|
725
|
+
className: "composer__tools",
|
|
726
|
+
children: u
|
|
727
|
+
}),
|
|
728
|
+
d ? /* @__PURE__ */ A("p", {
|
|
729
|
+
className: "composer__hint",
|
|
730
|
+
children: d
|
|
731
|
+
}) : null,
|
|
732
|
+
a ? /* @__PURE__ */ A(t, {
|
|
733
|
+
icon: xe,
|
|
734
|
+
label: h,
|
|
735
|
+
type: "button",
|
|
736
|
+
variant: "solid",
|
|
737
|
+
tone: "neutral",
|
|
738
|
+
shape: "circle",
|
|
739
|
+
onClick: i,
|
|
740
|
+
disabled: !i,
|
|
741
|
+
"data-part": "stop"
|
|
742
|
+
}) : /* @__PURE__ */ A(t, {
|
|
743
|
+
icon: se,
|
|
744
|
+
label: m,
|
|
745
|
+
type: "submit",
|
|
746
|
+
variant: "solid",
|
|
747
|
+
tone: "accent",
|
|
748
|
+
shape: "circle",
|
|
749
|
+
disabled: f || b,
|
|
750
|
+
"data-part": "send"
|
|
751
|
+
})
|
|
752
|
+
]
|
|
753
|
+
})
|
|
754
|
+
]
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
//#endregion
|
|
758
|
+
//#region src/components/extended/CouponField/CouponField.tsx
|
|
759
|
+
function Ke({ value: e, onValueChange: i, onApply: a, applied: s = [], onRemove: c, error: l, pending: u, as: d = "form", label: f = "쿠폰 코드", placeholder: p = "코드를 넣으세요", applyLabel: m = "적용", disabled: h, className: _, ...v }) {
|
|
760
|
+
let y = P(), b = F(s.map((e) => e.code)), [x, S] = I("");
|
|
761
|
+
N(() => {
|
|
762
|
+
let e = b.current, t = s.filter((t) => !e.includes(t.code));
|
|
763
|
+
b.current = s.map((e) => e.code), t.length && S(t.map((e) => `${e.code} 쿠폰을 적용했습니다`).join(", "));
|
|
764
|
+
}, [s]);
|
|
765
|
+
let C = () => {
|
|
766
|
+
u || h || !e.trim() || a();
|
|
767
|
+
}, w = (e) => {
|
|
768
|
+
e.preventDefault(), C();
|
|
769
|
+
}, T = d === "form", E = /* @__PURE__ */ j(k, { children: [
|
|
770
|
+
s.length ? /* @__PURE__ */ A("ul", {
|
|
771
|
+
className: "coupon-field__applied",
|
|
772
|
+
"data-part": "applied",
|
|
773
|
+
children: s.map((e) => /* @__PURE__ */ j("li", {
|
|
774
|
+
className: "coupon-field__coupon",
|
|
775
|
+
children: [
|
|
776
|
+
/* @__PURE__ */ A(r, {
|
|
777
|
+
icon: Se,
|
|
778
|
+
size: "sm",
|
|
779
|
+
tone: "success",
|
|
780
|
+
"aria-hidden": "true"
|
|
781
|
+
}),
|
|
782
|
+
/* @__PURE__ */ A("span", {
|
|
783
|
+
className: "coupon-field__code",
|
|
784
|
+
children: e.code
|
|
785
|
+
}),
|
|
786
|
+
/* @__PURE__ */ A("span", {
|
|
787
|
+
className: "coupon-field__effect",
|
|
788
|
+
children: e.effect
|
|
789
|
+
}),
|
|
790
|
+
c ? /* @__PURE__ */ A(t, {
|
|
791
|
+
icon: Y,
|
|
792
|
+
label: `${e.code} 쿠폰 빼기`,
|
|
793
|
+
size: "sm",
|
|
794
|
+
onClick: () => c(e.code),
|
|
795
|
+
"data-part": "remove"
|
|
796
|
+
}) : null
|
|
797
|
+
]
|
|
798
|
+
}, e.code))
|
|
799
|
+
}) : null,
|
|
800
|
+
/* @__PURE__ */ j(g, {
|
|
801
|
+
label: f,
|
|
802
|
+
children: [/* @__PURE__ */ A(o, {
|
|
803
|
+
value: e,
|
|
804
|
+
onChange: (e) => i(e.target.value),
|
|
805
|
+
onKeyDown: (e) => {
|
|
806
|
+
T || e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(), C());
|
|
807
|
+
},
|
|
808
|
+
placeholder: p,
|
|
809
|
+
"aria-label": f,
|
|
810
|
+
"aria-invalid": l ? !0 : void 0,
|
|
811
|
+
"aria-describedby": l ? y : void 0,
|
|
812
|
+
disabled: h,
|
|
813
|
+
autoCapitalize: "characters",
|
|
814
|
+
autoCorrect: "off",
|
|
815
|
+
spellCheck: !1,
|
|
816
|
+
"data-part": "field"
|
|
817
|
+
}), /* @__PURE__ */ A(n, {
|
|
818
|
+
type: T ? "submit" : "button",
|
|
819
|
+
onClick: T ? void 0 : C,
|
|
820
|
+
variant: "outline",
|
|
821
|
+
tone: "neutral",
|
|
822
|
+
loading: u,
|
|
823
|
+
disabled: h || !e.trim(),
|
|
824
|
+
"data-part": "apply",
|
|
825
|
+
children: m
|
|
826
|
+
})]
|
|
827
|
+
}),
|
|
828
|
+
/* @__PURE__ */ A("p", {
|
|
829
|
+
className: "coupon-field__error",
|
|
830
|
+
id: y,
|
|
831
|
+
"aria-live": "polite",
|
|
832
|
+
"data-part": "error",
|
|
833
|
+
children: l
|
|
834
|
+
}),
|
|
835
|
+
/* @__PURE__ */ A("p", {
|
|
836
|
+
className: "coupon-field__announced",
|
|
837
|
+
role: "status",
|
|
838
|
+
"data-part": "announced",
|
|
839
|
+
children: x
|
|
840
|
+
})
|
|
841
|
+
] }), D = `coupon-field ${_ ?? ""}`.trim();
|
|
842
|
+
return T ? /* @__PURE__ */ A("form", {
|
|
843
|
+
...v,
|
|
844
|
+
className: D,
|
|
845
|
+
onSubmit: w,
|
|
846
|
+
children: E
|
|
847
|
+
}) : /* @__PURE__ */ A("div", {
|
|
848
|
+
...v,
|
|
849
|
+
className: D,
|
|
850
|
+
children: E
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
//#endregion
|
|
854
|
+
//#region src/components/extended/DataGrid/DataGrid.state.ts
|
|
855
|
+
function qe(e, t, n) {
|
|
856
|
+
let r = e.filter((e) => !t.has(e.id)).map((e) => ({
|
|
857
|
+
id: e.id,
|
|
858
|
+
kind: "data",
|
|
859
|
+
column: e
|
|
860
|
+
}));
|
|
861
|
+
return n ? [{
|
|
862
|
+
id: "__select",
|
|
863
|
+
kind: "select"
|
|
864
|
+
}, ...r] : r;
|
|
865
|
+
}
|
|
866
|
+
function Je(e, t) {
|
|
867
|
+
return {
|
|
868
|
+
row: Math.max(0, Math.min(t.rows - 1, e.row)),
|
|
869
|
+
column: Math.max(0, Math.min(t.columns - 1, e.column))
|
|
870
|
+
};
|
|
871
|
+
}
|
|
872
|
+
function Ye(e, t, n, r, i) {
|
|
873
|
+
return Je({
|
|
874
|
+
row: i?.row ?? e.row + n,
|
|
875
|
+
column: i?.column ?? e.column + r
|
|
876
|
+
}, t);
|
|
877
|
+
}
|
|
878
|
+
function Xe(e, t, n) {
|
|
879
|
+
return e ? "error" : t ? "loading" : n === 0 ? "empty" : "rows";
|
|
880
|
+
}
|
|
881
|
+
function Ze(e, t, n) {
|
|
882
|
+
return e === "loading" ? n : e === "rows" ? t : 0;
|
|
883
|
+
}
|
|
884
|
+
function Qe(e, t) {
|
|
885
|
+
let n = new Set(e);
|
|
886
|
+
return n.has(t) ? n.delete(t) : n.add(t), [...n];
|
|
887
|
+
}
|
|
888
|
+
function $e(e, t, n) {
|
|
889
|
+
let r = new Set(e);
|
|
890
|
+
for (let e of t) n ? r.delete(e) : r.add(e);
|
|
891
|
+
return [...r];
|
|
892
|
+
}
|
|
893
|
+
//#endregion
|
|
894
|
+
//#region src/components/extended/DataGrid/DataGrid.tsx
|
|
895
|
+
function et({ rows: e, columns: r, changed: i, rowKey: a, label: o, pinFirst: s, density: c = "compact", height: l = "md", onRowActivate: u, empty: d = "행이 없습니다.", loading: f, loadingRows: h = 5, error: g, selectedKeys: _, onSelectedChange: v, rowLabel: y, sort: b, onSortChange: x, hiddenColumns: S, onHiddenColumnsChange: C, onCellCommit: w, meta: E, className: O, ...P }) {
|
|
896
|
+
let ne = F(null), [L, ae] = I({
|
|
897
|
+
row: 0,
|
|
898
|
+
column: 0
|
|
899
|
+
}), [oe, ce] = I(null), [le, R] = I(""), z = F(null), B = !!v, V = re(() => new Set(_ ?? []), [_]), H = re(() => new Set(S ?? []), [S]), U = re(() => qe(r, H, B), [
|
|
900
|
+
r,
|
|
901
|
+
H,
|
|
902
|
+
B
|
|
903
|
+
]), de = r.some((e) => e.footer), W = Xe(!!g, !!f, e.length), pe = Ze(W, e.length, h), G = M((t, n, r) => {
|
|
904
|
+
ae((i) => Ye(i, {
|
|
905
|
+
rows: e.length,
|
|
906
|
+
columns: U.length
|
|
907
|
+
}, t, n, r));
|
|
908
|
+
}, [e.length, U.length]);
|
|
909
|
+
N(() => {
|
|
910
|
+
ae((t) => {
|
|
911
|
+
let n = Je(t, {
|
|
912
|
+
rows: e.length,
|
|
913
|
+
columns: U.length
|
|
914
|
+
});
|
|
915
|
+
return n.row === t.row && n.column === t.column ? t : n;
|
|
916
|
+
});
|
|
917
|
+
}, [e.length, U.length]);
|
|
918
|
+
let me = (e) => v?.(Qe(V, a(e))), K = e.length > 0 && e.every((e) => V.has(a(e))), he = e.some((e) => V.has(a(e))), ge = () => v?.($e(V, e.map(a), K)), q = (e, t) => {
|
|
919
|
+
!t.editable || !w || (R(t.value?.(e) ?? ""), ce({
|
|
920
|
+
key: a(e),
|
|
921
|
+
columnId: t.id
|
|
922
|
+
}));
|
|
923
|
+
}, J = (e, t, n, r = !1) => {
|
|
924
|
+
z.current = r, e && w && w(t, n.id, le), ce(null);
|
|
925
|
+
}, _e = (e, t) => {
|
|
926
|
+
x?.(t ? {
|
|
927
|
+
columnId: e.id,
|
|
928
|
+
direction: t
|
|
929
|
+
} : null);
|
|
930
|
+
}, ve = (e) => C?.(Qe(H, e)), ye = (t) => {
|
|
931
|
+
let n = t.target;
|
|
932
|
+
if (t.defaultPrevented || !(n instanceof HTMLElement) || !n.matches(".data-grid__cell[role=\"gridcell\"]") || n.closest("[role=\"grid\"]") !== t.currentTarget || oe) return;
|
|
933
|
+
let r = {
|
|
934
|
+
ArrowDown: () => G(1, 0),
|
|
935
|
+
ArrowUp: () => G(-1, 0),
|
|
936
|
+
ArrowRight: () => G(0, 1),
|
|
937
|
+
ArrowLeft: () => G(0, -1),
|
|
938
|
+
PageDown: () => G(10, 0),
|
|
939
|
+
PageUp: () => G(-10, 0),
|
|
940
|
+
Home: () => G(0, 0, t.ctrlKey || t.metaKey ? {
|
|
941
|
+
row: 0,
|
|
942
|
+
column: 0
|
|
943
|
+
} : { column: 0 }),
|
|
944
|
+
End: () => G(0, 0, t.ctrlKey || t.metaKey ? {
|
|
945
|
+
row: e.length - 1,
|
|
946
|
+
column: U.length - 1
|
|
947
|
+
} : { column: U.length - 1 })
|
|
948
|
+
}[t.key];
|
|
949
|
+
if (r) {
|
|
950
|
+
t.preventDefault(), r();
|
|
951
|
+
return;
|
|
952
|
+
}
|
|
953
|
+
let i = e[L.row], a = U[L.column];
|
|
954
|
+
if (!(!i || !a)) {
|
|
955
|
+
if (a.kind === "select" && (t.key === "Enter" || t.key === " ")) {
|
|
956
|
+
t.preventDefault(), me(i);
|
|
957
|
+
return;
|
|
958
|
+
}
|
|
959
|
+
if (a.kind === "data" && a.column.editable && w && t.key === "Enter") {
|
|
960
|
+
t.preventDefault(), q(i, a.column);
|
|
961
|
+
return;
|
|
962
|
+
}
|
|
963
|
+
(t.key === "Enter" || t.key === " ") && u && (t.preventDefault(), u(i));
|
|
964
|
+
}
|
|
965
|
+
}, xe = M((e) => {
|
|
966
|
+
if (!e) return;
|
|
967
|
+
let t = z.current ?? ne.current?.contains(document.activeElement);
|
|
968
|
+
z.current = null, t && (e.focus({ preventScroll: !0 }), e.scrollIntoView({
|
|
969
|
+
block: "nearest",
|
|
970
|
+
inline: "nearest"
|
|
971
|
+
}));
|
|
972
|
+
}, []), Se = (e) => e.kind === "select" ? /* @__PURE__ */ A(p, {
|
|
973
|
+
checked: K,
|
|
974
|
+
indeterminate: !K && he,
|
|
975
|
+
onChange: ge,
|
|
976
|
+
"aria-label": K ? "전부 고르기 해제" : "전부 고르기",
|
|
977
|
+
"data-part": "select-all"
|
|
978
|
+
}) : /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("span", {
|
|
979
|
+
className: "data-grid__header-label",
|
|
980
|
+
children: e.column.header
|
|
981
|
+
}), e.column.sortable && x || e.column.hideable !== !1 && C ? /* @__PURE__ */ A(te, {
|
|
982
|
+
items: /* @__PURE__ */ j(k, { children: [
|
|
983
|
+
e.column.sortable && x ? /* @__PURE__ */ j(k, { children: [
|
|
984
|
+
/* @__PURE__ */ A(T, {
|
|
985
|
+
icon: se,
|
|
986
|
+
onSelect: () => _e(e.column, "asc"),
|
|
987
|
+
children: "오름차순"
|
|
988
|
+
}),
|
|
989
|
+
/* @__PURE__ */ A(T, {
|
|
990
|
+
icon: ie,
|
|
991
|
+
onSelect: () => _e(e.column, "desc"),
|
|
992
|
+
children: "내림차순"
|
|
993
|
+
}),
|
|
994
|
+
b?.columnId === e.column.id ? /* @__PURE__ */ A(T, {
|
|
995
|
+
onSelect: () => _e(e.column, null),
|
|
996
|
+
children: "정렬 없애기"
|
|
997
|
+
}) : null
|
|
998
|
+
] }) : null,
|
|
999
|
+
e.column.sortable && x && e.column.hideable !== !1 && C ? /* @__PURE__ */ A(ee, {}) : null,
|
|
1000
|
+
e.column.hideable !== !1 && C ? /* @__PURE__ */ A(T, {
|
|
1001
|
+
icon: fe,
|
|
1002
|
+
onSelect: () => ve(e.column.id),
|
|
1003
|
+
children: "이 열 숨기기"
|
|
1004
|
+
}) : null
|
|
1005
|
+
] }),
|
|
1006
|
+
children: /* @__PURE__ */ A(t, {
|
|
1007
|
+
icon: ue,
|
|
1008
|
+
label: `${e.column.header} 열 설정`,
|
|
1009
|
+
variant: "ghost",
|
|
1010
|
+
tone: "neutral",
|
|
1011
|
+
size: "sm",
|
|
1012
|
+
"data-part": "column-menu"
|
|
1013
|
+
})
|
|
1014
|
+
}) : null] });
|
|
1015
|
+
return /* @__PURE__ */ j("div", {
|
|
1016
|
+
...P,
|
|
1017
|
+
className: `data-grid ${O ?? ""}`.trim(),
|
|
1018
|
+
"data-row-density": c,
|
|
1019
|
+
"data-height": l,
|
|
1020
|
+
"data-pinned": s ? "" : void 0,
|
|
1021
|
+
children: [
|
|
1022
|
+
C ? /* @__PURE__ */ A("div", {
|
|
1023
|
+
className: "data-grid__bar",
|
|
1024
|
+
children: /* @__PURE__ */ A(te, {
|
|
1025
|
+
items: r.map((e) => /* @__PURE__ */ A(D, {
|
|
1026
|
+
checked: !H.has(e.id),
|
|
1027
|
+
onCheckedChange: () => ve(e.id),
|
|
1028
|
+
disabled: e.hideable === !1,
|
|
1029
|
+
children: e.header
|
|
1030
|
+
}, e.id)),
|
|
1031
|
+
children: /* @__PURE__ */ j(n, {
|
|
1032
|
+
variant: "outline",
|
|
1033
|
+
tone: "neutral",
|
|
1034
|
+
size: "sm",
|
|
1035
|
+
iconStart: be,
|
|
1036
|
+
"data-part": "columns",
|
|
1037
|
+
children: [
|
|
1038
|
+
"열 ",
|
|
1039
|
+
r.length - H.size,
|
|
1040
|
+
"/",
|
|
1041
|
+
r.length
|
|
1042
|
+
]
|
|
1043
|
+
})
|
|
1044
|
+
})
|
|
1045
|
+
}) : null,
|
|
1046
|
+
/* @__PURE__ */ A("div", {
|
|
1047
|
+
className: "data-grid__scroll",
|
|
1048
|
+
"data-part": "scroll",
|
|
1049
|
+
children: /* @__PURE__ */ j("div", {
|
|
1050
|
+
ref: ne,
|
|
1051
|
+
className: "data-grid__grid",
|
|
1052
|
+
role: "grid",
|
|
1053
|
+
"aria-label": o,
|
|
1054
|
+
"aria-rowcount": pe + 1 + +!!de,
|
|
1055
|
+
"aria-colcount": U.length,
|
|
1056
|
+
"aria-multiselectable": B || void 0,
|
|
1057
|
+
onKeyDown: ye,
|
|
1058
|
+
children: [
|
|
1059
|
+
/* @__PURE__ */ A("div", {
|
|
1060
|
+
role: "rowgroup",
|
|
1061
|
+
className: "data-grid__head",
|
|
1062
|
+
children: /* @__PURE__ */ A("div", {
|
|
1063
|
+
role: "row",
|
|
1064
|
+
className: "data-grid__row",
|
|
1065
|
+
"aria-rowindex": 1,
|
|
1066
|
+
children: U.map((e, t) => /* @__PURE__ */ A("div", {
|
|
1067
|
+
role: "columnheader",
|
|
1068
|
+
className: "data-grid__cell",
|
|
1069
|
+
"aria-colindex": t + 1,
|
|
1070
|
+
"aria-sort": e.kind === "data" && e.column.sortable ? b?.columnId === e.column.id ? b.direction === "asc" ? "ascending" : "descending" : "none" : void 0,
|
|
1071
|
+
"data-width": e.kind === "select" ? "select" : e.column.width ?? "md",
|
|
1072
|
+
"data-align": e.kind === "select" ? "start" : e.column.align ?? "start",
|
|
1073
|
+
"data-pin": s && t === 0 ? "" : void 0,
|
|
1074
|
+
"data-part": e.kind === "select" ? "select-header" : void 0,
|
|
1075
|
+
children: Se(e)
|
|
1076
|
+
}, e.id))
|
|
1077
|
+
})
|
|
1078
|
+
}),
|
|
1079
|
+
/* @__PURE__ */ j("div", {
|
|
1080
|
+
role: "rowgroup",
|
|
1081
|
+
className: "data-grid__body",
|
|
1082
|
+
"aria-busy": W === "loading" || void 0,
|
|
1083
|
+
children: [W === "loading" ? Array.from({ length: h }, (e, t) => /* @__PURE__ */ A("div", {
|
|
1084
|
+
role: "row",
|
|
1085
|
+
className: "data-grid__row",
|
|
1086
|
+
"aria-rowindex": t + 2,
|
|
1087
|
+
"data-part": "waiting-row",
|
|
1088
|
+
children: U.map((e, t) => /* @__PURE__ */ A("div", {
|
|
1089
|
+
role: "gridcell",
|
|
1090
|
+
className: "data-grid__cell",
|
|
1091
|
+
"aria-colindex": t + 1,
|
|
1092
|
+
"data-width": e.kind === "select" ? "select" : e.column.width ?? "md",
|
|
1093
|
+
"data-pin": s && t === 0 ? "" : void 0,
|
|
1094
|
+
children: /* @__PURE__ */ A(m, {
|
|
1095
|
+
shape: "text",
|
|
1096
|
+
lines: 1
|
|
1097
|
+
})
|
|
1098
|
+
}, e.id))
|
|
1099
|
+
}, `waiting-${t}`)) : null, W === "rows" ? e.map((e, t) => {
|
|
1100
|
+
let n = a(e), r = V.has(n);
|
|
1101
|
+
return /* @__PURE__ */ A("div", {
|
|
1102
|
+
role: "row",
|
|
1103
|
+
className: "data-grid__row",
|
|
1104
|
+
"aria-rowindex": t + 2,
|
|
1105
|
+
"aria-selected": B ? r : void 0,
|
|
1106
|
+
"data-part": "row",
|
|
1107
|
+
"data-selected": r ? "" : void 0,
|
|
1108
|
+
children: U.map((a, o) => {
|
|
1109
|
+
let c = L.row === t && L.column === o, l = a.kind === "data" && oe?.key === n && oe.columnId === a.column.id;
|
|
1110
|
+
return /* @__PURE__ */ A("div", {
|
|
1111
|
+
ref: c && !l ? xe : void 0,
|
|
1112
|
+
role: "gridcell",
|
|
1113
|
+
className: "data-grid__cell",
|
|
1114
|
+
"aria-colindex": o + 1,
|
|
1115
|
+
"data-width": a.kind === "select" ? "select" : a.column.width ?? "md",
|
|
1116
|
+
"data-align": a.kind === "select" ? "start" : a.column.align ?? "start",
|
|
1117
|
+
"data-numeric": a.kind === "data" && a.column.numeric ? "" : void 0,
|
|
1118
|
+
"data-pin": s && o === 0 ? "" : void 0,
|
|
1119
|
+
"data-here": c ? "" : void 0,
|
|
1120
|
+
"data-editable": a.kind === "data" && a.column.editable && w ? "" : void 0,
|
|
1121
|
+
tabIndex: c && !l ? 0 : -1,
|
|
1122
|
+
onFocus: (e) => {
|
|
1123
|
+
e.target === e.currentTarget && ae({
|
|
1124
|
+
row: t,
|
|
1125
|
+
column: o
|
|
1126
|
+
});
|
|
1127
|
+
},
|
|
1128
|
+
onDoubleClick: a.kind === "data" && a.column.editable && w ? () => q(e, a.column) : u ? () => u(e) : void 0,
|
|
1129
|
+
children: a.kind === "select" ? /* @__PURE__ */ A(p, {
|
|
1130
|
+
checked: r,
|
|
1131
|
+
onChange: () => me(e),
|
|
1132
|
+
"aria-label": y ? y(e) : `${n} 고르기`,
|
|
1133
|
+
"data-part": "select-row"
|
|
1134
|
+
}) : l ? /* @__PURE__ */ A("input", {
|
|
1135
|
+
className: "data-grid__editor",
|
|
1136
|
+
ref: (e) => e?.focus(),
|
|
1137
|
+
value: le,
|
|
1138
|
+
"aria-label": `${a.column.header} 고치기`,
|
|
1139
|
+
"data-part": "editor",
|
|
1140
|
+
onChange: (e) => R(e.target.value),
|
|
1141
|
+
onBlur: () => J(!0, e, a.column),
|
|
1142
|
+
onKeyDown: (t) => {
|
|
1143
|
+
t.stopPropagation(), !(t.nativeEvent.isComposing || t.nativeEvent.keyCode === 229) && (t.key === "Enter" ? (t.preventDefault(), J(!0, e, a.column, !0)) : t.key === "Escape" && (t.preventDefault(), J(!1, e, a.column, !0)));
|
|
1144
|
+
}
|
|
1145
|
+
}) : /* @__PURE__ */ j(k, { children: [(() => {
|
|
1146
|
+
let t = i?.(e, a.column);
|
|
1147
|
+
return t === void 0 ? null : /* @__PURE__ */ A("span", {
|
|
1148
|
+
className: "data-grid__flash",
|
|
1149
|
+
"data-part": "flash",
|
|
1150
|
+
"aria-hidden": "true"
|
|
1151
|
+
}, t);
|
|
1152
|
+
})(), a.column.cell(e)] })
|
|
1153
|
+
}, a.id);
|
|
1154
|
+
})
|
|
1155
|
+
}, n);
|
|
1156
|
+
}) : null]
|
|
1157
|
+
}),
|
|
1158
|
+
de ? /* @__PURE__ */ A("div", {
|
|
1159
|
+
role: "rowgroup",
|
|
1160
|
+
className: "data-grid__foot",
|
|
1161
|
+
children: /* @__PURE__ */ A("div", {
|
|
1162
|
+
role: "row",
|
|
1163
|
+
className: "data-grid__row",
|
|
1164
|
+
"aria-rowindex": pe + 2,
|
|
1165
|
+
children: U.map((t, n) => /* @__PURE__ */ A("div", {
|
|
1166
|
+
role: "gridcell",
|
|
1167
|
+
className: "data-grid__cell",
|
|
1168
|
+
"aria-colindex": n + 1,
|
|
1169
|
+
"data-width": t.kind === "select" ? "select" : t.column.width ?? "md",
|
|
1170
|
+
"data-align": t.kind === "select" ? "start" : t.column.align ?? "start",
|
|
1171
|
+
"data-numeric": t.kind === "data" && t.column.numeric ? "" : void 0,
|
|
1172
|
+
"data-pin": s && n === 0 ? "" : void 0,
|
|
1173
|
+
children: t.kind === "data" ? t.column.footer?.(e) : null
|
|
1174
|
+
}, t.id))
|
|
1175
|
+
})
|
|
1176
|
+
}) : null
|
|
1177
|
+
]
|
|
1178
|
+
})
|
|
1179
|
+
}),
|
|
1180
|
+
W === "error" ? /* @__PURE__ */ A("p", {
|
|
1181
|
+
className: "data-grid__state",
|
|
1182
|
+
role: "alert",
|
|
1183
|
+
"data-part": "error",
|
|
1184
|
+
children: g
|
|
1185
|
+
}) : W === "empty" ? /* @__PURE__ */ A("p", {
|
|
1186
|
+
className: "data-grid__empty",
|
|
1187
|
+
"data-part": "empty",
|
|
1188
|
+
children: d
|
|
1189
|
+
}) : null,
|
|
1190
|
+
E ? /* @__PURE__ */ A("p", {
|
|
1191
|
+
className: "data-grid__meta",
|
|
1192
|
+
role: "status",
|
|
1193
|
+
"data-part": "meta",
|
|
1194
|
+
children: E
|
|
1195
|
+
}) : null
|
|
1196
|
+
]
|
|
1197
|
+
});
|
|
1198
|
+
}
|
|
1199
|
+
//#endregion
|
|
1200
|
+
//#region src/components/extended/Dropzone/Dropzone.tsx
|
|
1201
|
+
function tt(e, t) {
|
|
1202
|
+
let n = (e ?? "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
|
|
1203
|
+
if (n.length === 0) return !0;
|
|
1204
|
+
let r = t.name.toLowerCase(), i = t.type.toLowerCase();
|
|
1205
|
+
return n.some((e) => e.startsWith(".") ? r.endsWith(e) : e.endsWith("/*") ? i.startsWith(e.slice(0, -1)) : i === e);
|
|
1206
|
+
}
|
|
1207
|
+
var nt = {
|
|
1208
|
+
done: z,
|
|
1209
|
+
failed: Oe
|
|
1210
|
+
}, rt = {
|
|
1211
|
+
queued: "대기 중",
|
|
1212
|
+
uploading: "올리는 중",
|
|
1213
|
+
done: "완료",
|
|
1214
|
+
failed: "실패"
|
|
1215
|
+
};
|
|
1216
|
+
function it({ label: e, hint: n, illustration: i, accept: a, multiple: o = !0, name: c, onFiles: l, files: u = [], disabled: d, className: f, ...p }) {
|
|
1217
|
+
let m = P(), h = F(0), g = F(null), [v, y] = I(!1), [b, x] = I([]), S = (e) => {
|
|
1218
|
+
let t = Array.from(e ?? []), n = [], r = t.filter((e) => tt(a, e) ? !0 : (n.push(`${e.name} — 받지 않는 형식입니다. ${a}만 받습니다`), !1));
|
|
1219
|
+
return x(n), o ? r : r.slice(0, 1);
|
|
1220
|
+
}, C = (e) => {
|
|
1221
|
+
if (d) return;
|
|
1222
|
+
let t = S(e), n = g.current;
|
|
1223
|
+
if (n && (n.value = "", c && t.length > 0)) {
|
|
1224
|
+
let e = new DataTransfer();
|
|
1225
|
+
for (let n of t) e.items.add(n);
|
|
1226
|
+
n.files = e.files;
|
|
1227
|
+
}
|
|
1228
|
+
(c || t.length > 0) && l(t);
|
|
1229
|
+
}, w = (e) => {
|
|
1230
|
+
d || (e.preventDefault(), h.current += 1, y(!0));
|
|
1231
|
+
}, T = () => {
|
|
1232
|
+
h.current = Math.max(0, h.current - 1), h.current === 0 && y(!1);
|
|
1233
|
+
};
|
|
1234
|
+
return /* @__PURE__ */ j("div", {
|
|
1235
|
+
...p,
|
|
1236
|
+
className: `dropzone ${f ?? ""}`.trim(),
|
|
1237
|
+
"data-disabled": d ? "" : void 0,
|
|
1238
|
+
children: [
|
|
1239
|
+
/* @__PURE__ */ j("label", {
|
|
1240
|
+
className: "dropzone__area",
|
|
1241
|
+
htmlFor: m,
|
|
1242
|
+
"data-over": v ? "" : void 0,
|
|
1243
|
+
"data-part": "area",
|
|
1244
|
+
onDragEnter: w,
|
|
1245
|
+
onDragOver: (e) => {
|
|
1246
|
+
d || e.preventDefault();
|
|
1247
|
+
},
|
|
1248
|
+
onDragLeave: T,
|
|
1249
|
+
onDrop: (e) => {
|
|
1250
|
+
d || (e.preventDefault(), h.current = 0, y(!1), e.dataTransfer.files.length !== 0 && C(e.dataTransfer.files));
|
|
1251
|
+
},
|
|
1252
|
+
children: [
|
|
1253
|
+
i === void 0 ? /* @__PURE__ */ A(r, {
|
|
1254
|
+
icon: De,
|
|
1255
|
+
size: "md",
|
|
1256
|
+
className: "dropzone__glyph",
|
|
1257
|
+
"aria-hidden": "true"
|
|
1258
|
+
}) : i,
|
|
1259
|
+
/* @__PURE__ */ A("span", {
|
|
1260
|
+
className: "dropzone__label",
|
|
1261
|
+
children: e
|
|
1262
|
+
}),
|
|
1263
|
+
n ? /* @__PURE__ */ A("span", {
|
|
1264
|
+
className: "dropzone__hint",
|
|
1265
|
+
children: n
|
|
1266
|
+
}) : null,
|
|
1267
|
+
/* @__PURE__ */ A("input", {
|
|
1268
|
+
ref: g,
|
|
1269
|
+
id: m,
|
|
1270
|
+
name: c,
|
|
1271
|
+
type: "file",
|
|
1272
|
+
className: "dropzone__input",
|
|
1273
|
+
accept: a,
|
|
1274
|
+
multiple: o,
|
|
1275
|
+
disabled: d,
|
|
1276
|
+
onChange: (e) => {
|
|
1277
|
+
C(e.currentTarget.files);
|
|
1278
|
+
}
|
|
1279
|
+
})
|
|
1280
|
+
]
|
|
1281
|
+
}),
|
|
1282
|
+
/* @__PURE__ */ A("p", {
|
|
1283
|
+
className: "dropzone__refused",
|
|
1284
|
+
role: "alert",
|
|
1285
|
+
"data-part": "refused",
|
|
1286
|
+
children: b.join(" · ")
|
|
1287
|
+
}),
|
|
1288
|
+
u.length > 0 ? /* @__PURE__ */ A("ul", {
|
|
1289
|
+
className: "dropzone__files",
|
|
1290
|
+
"data-part": "files",
|
|
1291
|
+
children: u.map((e) => {
|
|
1292
|
+
let n = e.state ?? "queued";
|
|
1293
|
+
return /* @__PURE__ */ j("li", {
|
|
1294
|
+
className: "dropzone__file",
|
|
1295
|
+
"data-state": n,
|
|
1296
|
+
"data-part": e.id,
|
|
1297
|
+
children: [
|
|
1298
|
+
/* @__PURE__ */ j("div", {
|
|
1299
|
+
className: "dropzone__file-text",
|
|
1300
|
+
children: [/* @__PURE__ */ j("p", {
|
|
1301
|
+
className: "dropzone__file-name",
|
|
1302
|
+
children: [
|
|
1303
|
+
/* @__PURE__ */ A(_, {
|
|
1304
|
+
icon: n === "done" || n === "failed" ? nt[n] : void 0,
|
|
1305
|
+
tone: n === "done" ? "success" : n === "failed" ? "danger" : "neutral",
|
|
1306
|
+
size: "xs",
|
|
1307
|
+
className: "dropzone__file-glyph",
|
|
1308
|
+
"data-part": "glyph"
|
|
1309
|
+
}),
|
|
1310
|
+
e.name,
|
|
1311
|
+
/* @__PURE__ */ A("span", {
|
|
1312
|
+
className: "dropzone__said",
|
|
1313
|
+
children: ` — ${rt[n]}`
|
|
1314
|
+
})
|
|
1315
|
+
]
|
|
1316
|
+
}), n === "failed" && e.error ? /* @__PURE__ */ A("p", {
|
|
1317
|
+
className: "dropzone__file-why",
|
|
1318
|
+
role: "alert",
|
|
1319
|
+
"data-part": "why",
|
|
1320
|
+
children: e.error
|
|
1321
|
+
}) : e.size ? /* @__PURE__ */ A("p", {
|
|
1322
|
+
className: "dropzone__file-size",
|
|
1323
|
+
children: e.size
|
|
1324
|
+
}) : null]
|
|
1325
|
+
}),
|
|
1326
|
+
n === "uploading" ? /* @__PURE__ */ A(s, {
|
|
1327
|
+
value: e.value,
|
|
1328
|
+
max: 100,
|
|
1329
|
+
label: e.name,
|
|
1330
|
+
size: "sm",
|
|
1331
|
+
className: "dropzone__file-bar",
|
|
1332
|
+
"data-part": "bar"
|
|
1333
|
+
}) : null,
|
|
1334
|
+
/* @__PURE__ */ j("div", {
|
|
1335
|
+
className: "dropzone__file-actions",
|
|
1336
|
+
children: [n === "failed" && e.onRetry ? /* @__PURE__ */ A(t, {
|
|
1337
|
+
icon: J,
|
|
1338
|
+
label: `${e.name} 다시 올리기`,
|
|
1339
|
+
size: "sm",
|
|
1340
|
+
variant: "ghost",
|
|
1341
|
+
tone: "neutral",
|
|
1342
|
+
onClick: e.onRetry,
|
|
1343
|
+
"data-part": "retry"
|
|
1344
|
+
}) : null, e.onCancel ? /* @__PURE__ */ A(t, {
|
|
1345
|
+
icon: Y,
|
|
1346
|
+
label: n === "done" ? `${e.name} 지우기` : `${e.name} 취소`,
|
|
1347
|
+
size: "sm",
|
|
1348
|
+
variant: "ghost",
|
|
1349
|
+
tone: "neutral",
|
|
1350
|
+
onClick: e.onCancel,
|
|
1351
|
+
"data-part": "cancel"
|
|
1352
|
+
}) : null]
|
|
1353
|
+
})
|
|
1354
|
+
]
|
|
1355
|
+
}, e.id);
|
|
1356
|
+
})
|
|
1357
|
+
}) : null
|
|
1358
|
+
]
|
|
1359
|
+
});
|
|
1360
|
+
}
|
|
1361
|
+
//#endregion
|
|
1362
|
+
//#region src/components/extended/FeedbackControl/FeedbackControl.tsx
|
|
1363
|
+
function at({ value: e, onRate: t, reasons: r = [], onReasons: i, askOn: a = "down", label: o = "이 답이 도움이 됐나요?", noteLabel: s = "더 알려 주실 것이 있나요?", className: c, ...u }) {
|
|
1364
|
+
let d = F(null), f = P(), [p, m] = I([]), [h, g] = I(""), [_, v] = I(!1), y = !!e && r.length > 0 && !!i && (a === "both" || e === "down");
|
|
1365
|
+
N(() => {
|
|
1366
|
+
m([]), g(""), v(!1);
|
|
1367
|
+
}, [e]);
|
|
1368
|
+
let b = (n) => t(e === n ? null : n), S = F(!1);
|
|
1369
|
+
N(() => {
|
|
1370
|
+
S.current && (S.current = !1, document.activeElement === document.body && (d.current?.querySelector(`[data-part="${e === "up" ? "up" : "down"}"]`) ?? d.current)?.focus());
|
|
1371
|
+
}, [_]);
|
|
1372
|
+
let C = () => {
|
|
1373
|
+
i?.(p, h.trim()), S.current = !0, v(!0);
|
|
1374
|
+
};
|
|
1375
|
+
return /* @__PURE__ */ j("section", {
|
|
1376
|
+
className: `feedback-control ${c ?? ""}`.trim(),
|
|
1377
|
+
ref: d,
|
|
1378
|
+
tabIndex: -1,
|
|
1379
|
+
"aria-labelledby": f,
|
|
1380
|
+
...u,
|
|
1381
|
+
children: [/* @__PURE__ */ j("div", {
|
|
1382
|
+
className: "feedback-control__rating",
|
|
1383
|
+
children: [
|
|
1384
|
+
/* @__PURE__ */ A("p", {
|
|
1385
|
+
className: "feedback-control__label",
|
|
1386
|
+
id: f,
|
|
1387
|
+
children: o
|
|
1388
|
+
}),
|
|
1389
|
+
/* @__PURE__ */ A(x, {
|
|
1390
|
+
icon: Te,
|
|
1391
|
+
pressed: e === "up",
|
|
1392
|
+
onPressedChange: () => b("up"),
|
|
1393
|
+
variant: "ghost",
|
|
1394
|
+
tone: "neutral",
|
|
1395
|
+
size: "sm",
|
|
1396
|
+
"data-part": "up",
|
|
1397
|
+
"data-testid": "up",
|
|
1398
|
+
children: "도움이 됐어요"
|
|
1399
|
+
}),
|
|
1400
|
+
/* @__PURE__ */ A(x, {
|
|
1401
|
+
icon: we,
|
|
1402
|
+
pressed: e === "down",
|
|
1403
|
+
onPressedChange: () => b("down"),
|
|
1404
|
+
variant: "ghost",
|
|
1405
|
+
tone: "neutral",
|
|
1406
|
+
size: "sm",
|
|
1407
|
+
"data-part": "down",
|
|
1408
|
+
"data-testid": "down",
|
|
1409
|
+
children: "도움이 안 됐어요"
|
|
1410
|
+
}),
|
|
1411
|
+
/* @__PURE__ */ A("p", {
|
|
1412
|
+
className: "feedback-control__said",
|
|
1413
|
+
role: "status",
|
|
1414
|
+
"data-part": "said",
|
|
1415
|
+
children: _ ? "보냈습니다. 고맙습니다." : e === "up" ? "도움이 됐다고 표시했습니다." : e === "down" ? "도움이 안 됐다고 표시했습니다." : ""
|
|
1416
|
+
})
|
|
1417
|
+
]
|
|
1418
|
+
}), y && !_ ? /* @__PURE__ */ j("div", {
|
|
1419
|
+
className: "feedback-control__reasons",
|
|
1420
|
+
"data-part": "reasons",
|
|
1421
|
+
children: [
|
|
1422
|
+
/* @__PURE__ */ A("p", {
|
|
1423
|
+
className: "feedback-control__question",
|
|
1424
|
+
children: e === "up" ? "무엇이 좋았나요? 고르지 않고 넘어가도 됩니다." : "무엇이 문제였나요? 고르지 않고 넘어가도 됩니다."
|
|
1425
|
+
}),
|
|
1426
|
+
/* @__PURE__ */ A("div", {
|
|
1427
|
+
className: "feedback-control__chips",
|
|
1428
|
+
children: r.map((e) => /* @__PURE__ */ A(x, {
|
|
1429
|
+
pressed: p.includes(e.id),
|
|
1430
|
+
onPressedChange: () => m((t) => t.includes(e.id) ? t.filter((t) => t !== e.id) : [...t, e.id]),
|
|
1431
|
+
variant: "outline",
|
|
1432
|
+
tone: "neutral",
|
|
1433
|
+
size: "sm",
|
|
1434
|
+
shape: "pill",
|
|
1435
|
+
"data-part": "reason",
|
|
1436
|
+
children: e.label
|
|
1437
|
+
}, e.id))
|
|
1438
|
+
}),
|
|
1439
|
+
/* @__PURE__ */ A(l, {
|
|
1440
|
+
"aria-label": s,
|
|
1441
|
+
placeholder: s,
|
|
1442
|
+
rows: 2,
|
|
1443
|
+
value: h,
|
|
1444
|
+
onChange: (e) => g(e.target.value),
|
|
1445
|
+
"data-part": "note"
|
|
1446
|
+
}),
|
|
1447
|
+
/* @__PURE__ */ A("div", {
|
|
1448
|
+
className: "feedback-control__send",
|
|
1449
|
+
children: /* @__PURE__ */ A(n, {
|
|
1450
|
+
size: "sm",
|
|
1451
|
+
variant: "solid",
|
|
1452
|
+
onClick: C,
|
|
1453
|
+
"data-part": "send",
|
|
1454
|
+
children: "보내기"
|
|
1455
|
+
})
|
|
1456
|
+
})
|
|
1457
|
+
]
|
|
1458
|
+
}) : null]
|
|
1459
|
+
});
|
|
1460
|
+
}
|
|
1461
|
+
//#endregion
|
|
1462
|
+
//#region src/components/extended/FilterBuilder/FilterBuilder.tsx
|
|
1463
|
+
var Z = {
|
|
1464
|
+
text: [
|
|
1465
|
+
{
|
|
1466
|
+
value: "contains",
|
|
1467
|
+
label: "포함"
|
|
1468
|
+
},
|
|
1469
|
+
{
|
|
1470
|
+
value: "is",
|
|
1471
|
+
label: "같음"
|
|
1472
|
+
},
|
|
1473
|
+
{
|
|
1474
|
+
value: "starts",
|
|
1475
|
+
label: "시작"
|
|
1476
|
+
},
|
|
1477
|
+
{
|
|
1478
|
+
value: "empty",
|
|
1479
|
+
label: "비어 있음"
|
|
1480
|
+
}
|
|
1481
|
+
],
|
|
1482
|
+
number: [
|
|
1483
|
+
{
|
|
1484
|
+
value: "eq",
|
|
1485
|
+
label: "="
|
|
1486
|
+
},
|
|
1487
|
+
{
|
|
1488
|
+
value: "gt",
|
|
1489
|
+
label: ">"
|
|
1490
|
+
},
|
|
1491
|
+
{
|
|
1492
|
+
value: "lt",
|
|
1493
|
+
label: "<"
|
|
1494
|
+
},
|
|
1495
|
+
{
|
|
1496
|
+
value: "between",
|
|
1497
|
+
label: "사이"
|
|
1498
|
+
}
|
|
1499
|
+
],
|
|
1500
|
+
date: [
|
|
1501
|
+
{
|
|
1502
|
+
value: "after",
|
|
1503
|
+
label: "이후"
|
|
1504
|
+
},
|
|
1505
|
+
{
|
|
1506
|
+
value: "before",
|
|
1507
|
+
label: "이전"
|
|
1508
|
+
},
|
|
1509
|
+
{
|
|
1510
|
+
value: "on",
|
|
1511
|
+
label: "당일"
|
|
1512
|
+
},
|
|
1513
|
+
{
|
|
1514
|
+
value: "last",
|
|
1515
|
+
label: "최근"
|
|
1516
|
+
}
|
|
1517
|
+
],
|
|
1518
|
+
choice: [{
|
|
1519
|
+
value: "is",
|
|
1520
|
+
label: "하나임"
|
|
1521
|
+
}, {
|
|
1522
|
+
value: "isnot",
|
|
1523
|
+
label: "아님"
|
|
1524
|
+
}]
|
|
1525
|
+
}, ot = /* @__PURE__ */ new Set(["empty"]);
|
|
1526
|
+
function st(e, t) {
|
|
1527
|
+
let n = e[0];
|
|
1528
|
+
return {
|
|
1529
|
+
id: t,
|
|
1530
|
+
field: n.id,
|
|
1531
|
+
operator: Z[n.type][0].value,
|
|
1532
|
+
value: ""
|
|
1533
|
+
};
|
|
1534
|
+
}
|
|
1535
|
+
function ct({ fields: e, rules: r, onRulesChange: i, join: a, onJoinChange: s, label: c, addLabel: l = "조건 추가", className: u, ...f }) {
|
|
1536
|
+
let p = (t) => e.find((e) => e.id === t) ?? e[0], m = (e, t) => i(r.map((n) => n.id === e ? {
|
|
1537
|
+
...n,
|
|
1538
|
+
...t
|
|
1539
|
+
} : n)), h = F(null), g = P(), _ = F(0);
|
|
1540
|
+
N(() => {
|
|
1541
|
+
let t = new Set(e.map((e) => e.id));
|
|
1542
|
+
r.every((e) => t.has(e.field)) || i(r.map((n) => t.has(n.field) ? n : st(e, n.id)));
|
|
1543
|
+
}, [e, r]);
|
|
1544
|
+
let v = F(null);
|
|
1545
|
+
return N(() => {
|
|
1546
|
+
let e = v.current;
|
|
1547
|
+
if (e === null || (v.current = null, document.activeElement !== document.body)) return;
|
|
1548
|
+
let t = h.current?.querySelectorAll("[data-part=\"remove\"]");
|
|
1549
|
+
((t && t.length > 0 ? t[Math.min(e, t.length - 1)] : h.current?.querySelector("[data-part=\"add\"]")) ?? h.current)?.focus();
|
|
1550
|
+
}, [r]), /* @__PURE__ */ j("div", {
|
|
1551
|
+
...f,
|
|
1552
|
+
ref: h,
|
|
1553
|
+
tabIndex: -1,
|
|
1554
|
+
className: `filter-builder ${u ?? ""}`.trim(),
|
|
1555
|
+
role: "group",
|
|
1556
|
+
"aria-label": c,
|
|
1557
|
+
children: [/* @__PURE__ */ A("ul", {
|
|
1558
|
+
className: "filter-builder__rules",
|
|
1559
|
+
children: r.map((n, c) => {
|
|
1560
|
+
let l = p(n.field), u = Z[l.type], f = u.find((e) => e.value === n.operator) ?? u[0], h = `${l.label} ${f.label}${n.value ? ` ${n.value}` : ""}`;
|
|
1561
|
+
return /* @__PURE__ */ j("li", {
|
|
1562
|
+
className: "filter-builder__rule",
|
|
1563
|
+
"data-part": "rule",
|
|
1564
|
+
children: [
|
|
1565
|
+
/* @__PURE__ */ A("span", {
|
|
1566
|
+
className: "filter-builder__join",
|
|
1567
|
+
"data-part": "join",
|
|
1568
|
+
children: c === 0 ? /* @__PURE__ */ A("span", {
|
|
1569
|
+
className: "filter-builder__where",
|
|
1570
|
+
children: "조건"
|
|
1571
|
+
}) : c === 1 ? /* @__PURE__ */ j(d, {
|
|
1572
|
+
size: "sm",
|
|
1573
|
+
value: a,
|
|
1574
|
+
onChange: (e) => s(e.target.value),
|
|
1575
|
+
"aria-label": "조건을 잇는 방법",
|
|
1576
|
+
"data-part": "join-select",
|
|
1577
|
+
children: [/* @__PURE__ */ A("option", {
|
|
1578
|
+
value: "and",
|
|
1579
|
+
children: "그리고"
|
|
1580
|
+
}), /* @__PURE__ */ A("option", {
|
|
1581
|
+
value: "or",
|
|
1582
|
+
children: "또는"
|
|
1583
|
+
})]
|
|
1584
|
+
}) : /* @__PURE__ */ A("span", {
|
|
1585
|
+
className: "filter-builder__word",
|
|
1586
|
+
children: a === "and" ? "그리고" : "또는"
|
|
1587
|
+
})
|
|
1588
|
+
}),
|
|
1589
|
+
/* @__PURE__ */ A(d, {
|
|
1590
|
+
size: "sm",
|
|
1591
|
+
value: n.field,
|
|
1592
|
+
"aria-label": `${c + 1}번 조건의 필드`,
|
|
1593
|
+
"data-part": "field",
|
|
1594
|
+
onChange: (e) => {
|
|
1595
|
+
let t = p(e.target.value);
|
|
1596
|
+
m(n.id, {
|
|
1597
|
+
field: t.id,
|
|
1598
|
+
operator: Z[t.type][0].value,
|
|
1599
|
+
value: ""
|
|
1600
|
+
});
|
|
1601
|
+
},
|
|
1602
|
+
children: e.map((e) => /* @__PURE__ */ A("option", {
|
|
1603
|
+
value: e.id,
|
|
1604
|
+
children: e.label
|
|
1605
|
+
}, e.id))
|
|
1606
|
+
}),
|
|
1607
|
+
/* @__PURE__ */ A(d, {
|
|
1608
|
+
size: "sm",
|
|
1609
|
+
value: f.value,
|
|
1610
|
+
onChange: (e) => {
|
|
1611
|
+
let t = e.target.value;
|
|
1612
|
+
m(n.id, {
|
|
1613
|
+
operator: t,
|
|
1614
|
+
...ot.has(t) ? { value: "" } : null
|
|
1615
|
+
});
|
|
1616
|
+
},
|
|
1617
|
+
"aria-label": `${l.label}에 적용할 연산자`,
|
|
1618
|
+
"data-part": "operator",
|
|
1619
|
+
children: u.map((e) => /* @__PURE__ */ A("option", {
|
|
1620
|
+
value: e.value,
|
|
1621
|
+
children: e.label
|
|
1622
|
+
}, e.value))
|
|
1623
|
+
}),
|
|
1624
|
+
/* @__PURE__ */ A("span", {
|
|
1625
|
+
className: "filter-builder__value",
|
|
1626
|
+
children: ot.has(f.value) ? /* @__PURE__ */ A("span", {
|
|
1627
|
+
className: "filter-builder__none",
|
|
1628
|
+
children: "값 없음"
|
|
1629
|
+
}) : l.type === "choice" ? /* @__PURE__ */ j(d, {
|
|
1630
|
+
size: "sm",
|
|
1631
|
+
value: n.value,
|
|
1632
|
+
onChange: (e) => m(n.id, { value: e.target.value }),
|
|
1633
|
+
"aria-label": `${l.label} 값`,
|
|
1634
|
+
"data-part": "value",
|
|
1635
|
+
children: [/* @__PURE__ */ A("option", {
|
|
1636
|
+
value: "",
|
|
1637
|
+
children: "고르세요"
|
|
1638
|
+
}), l.options?.map((e) => /* @__PURE__ */ A("option", {
|
|
1639
|
+
value: e.value,
|
|
1640
|
+
children: e.label
|
|
1641
|
+
}, e.value))]
|
|
1642
|
+
}) : /* @__PURE__ */ A(o, {
|
|
1643
|
+
size: "sm",
|
|
1644
|
+
type: l.type === "date" ? "date" : l.type === "number" ? "number" : "text",
|
|
1645
|
+
value: n.value,
|
|
1646
|
+
onChange: (e) => m(n.id, { value: e.target.value }),
|
|
1647
|
+
"aria-label": `${l.label} 값`,
|
|
1648
|
+
"data-part": "value"
|
|
1649
|
+
})
|
|
1650
|
+
}),
|
|
1651
|
+
/* @__PURE__ */ A(t, {
|
|
1652
|
+
icon: Y,
|
|
1653
|
+
label: `${h} 조건 지우기`,
|
|
1654
|
+
size: "sm",
|
|
1655
|
+
onClick: () => {
|
|
1656
|
+
v.current = c, i(r.filter((e) => e.id !== n.id));
|
|
1657
|
+
},
|
|
1658
|
+
"data-part": "remove"
|
|
1659
|
+
})
|
|
1660
|
+
]
|
|
1661
|
+
}, n.id);
|
|
1662
|
+
})
|
|
1663
|
+
}), /* @__PURE__ */ A(n, {
|
|
1664
|
+
variant: "ghost",
|
|
1665
|
+
tone: "neutral",
|
|
1666
|
+
size: "sm",
|
|
1667
|
+
onClick: () => {
|
|
1668
|
+
_.current += 1, i([...r, st(e, `rule-${g}-${_.current}`)]);
|
|
1669
|
+
},
|
|
1670
|
+
"data-part": "add",
|
|
1671
|
+
children: l
|
|
1672
|
+
})]
|
|
1673
|
+
});
|
|
1674
|
+
}
|
|
1675
|
+
//#endregion
|
|
1676
|
+
//#region src/components/extended/FollowUpList/FollowUpList.tsx
|
|
1677
|
+
function lt({ items: e, onAsk: t, label: n = "이어서 물어볼 것", collapsible: i, defaultOpen: a = !0, className: o, ...s }) {
|
|
1678
|
+
let c = /* @__PURE__ */ A("ul", {
|
|
1679
|
+
className: "follow-up-list__items",
|
|
1680
|
+
children: e.map((e) => /* @__PURE__ */ A("li", { children: /* @__PURE__ */ j("button", {
|
|
1681
|
+
type: "button",
|
|
1682
|
+
className: "follow-up-list__item",
|
|
1683
|
+
onClick: () => t(e),
|
|
1684
|
+
"data-part": "ask",
|
|
1685
|
+
children: [/* @__PURE__ */ A(r, {
|
|
1686
|
+
icon: U,
|
|
1687
|
+
size: "sm",
|
|
1688
|
+
tone: "muted",
|
|
1689
|
+
"aria-hidden": "true"
|
|
1690
|
+
}), /* @__PURE__ */ A("span", { children: e.question })]
|
|
1691
|
+
}) }, e.id))
|
|
1692
|
+
});
|
|
1693
|
+
return i ? /* @__PURE__ */ A("div", {
|
|
1694
|
+
className: `follow-up-list ${o ?? ""}`.trim(),
|
|
1695
|
+
...s,
|
|
1696
|
+
children: /* @__PURE__ */ A(C, {
|
|
1697
|
+
summary: n,
|
|
1698
|
+
defaultOpen: a,
|
|
1699
|
+
plain: !0,
|
|
1700
|
+
aside: `${e.length}개`,
|
|
1701
|
+
children: c
|
|
1702
|
+
})
|
|
1703
|
+
}) : /* @__PURE__ */ j("section", {
|
|
1704
|
+
className: `follow-up-list ${o ?? ""}`.trim(),
|
|
1705
|
+
"aria-label": n,
|
|
1706
|
+
...s,
|
|
1707
|
+
children: [/* @__PURE__ */ A("p", {
|
|
1708
|
+
className: "follow-up-list__label",
|
|
1709
|
+
children: n
|
|
1710
|
+
}), c]
|
|
1711
|
+
});
|
|
1712
|
+
}
|
|
1713
|
+
//#endregion
|
|
1714
|
+
//#region src/foundation/josa.ts
|
|
1715
|
+
function ut(e) {
|
|
1716
|
+
let t = e.trimEnd().at(-1);
|
|
1717
|
+
if (!t) return !0;
|
|
1718
|
+
let n = t.charCodeAt(0);
|
|
1719
|
+
return n < 44032 || n > 55203 || (n - 44032) % 28 != 0;
|
|
1720
|
+
}
|
|
1721
|
+
function dt(e, t) {
|
|
1722
|
+
let n = ut(e);
|
|
1723
|
+
switch (t) {
|
|
1724
|
+
case "이/가": return n ? "이" : "가";
|
|
1725
|
+
case "을/를": return n ? "을" : "를";
|
|
1726
|
+
case "은/는": return n ? "은" : "는";
|
|
1727
|
+
case "과/와": return n ? "과" : "와";
|
|
1728
|
+
case "으로/로": return n ? (e.trimEnd().charCodeAt(e.trimEnd().length - 1) - 44032) % 28 == 8 ? "로" : "으로" : "로";
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
function Q(e, t) {
|
|
1732
|
+
return `${e}${dt(e, t)}`;
|
|
1733
|
+
}
|
|
1734
|
+
//#endregion
|
|
1735
|
+
//#region src/components/extended/KanbanColumn/KanbanColumn.tsx
|
|
1736
|
+
var ft = "application/x-kanban-card";
|
|
1737
|
+
function pt({ title: e, cards: n, limit: a, onMove: o, onDropCard: s, onAdd: c, loading: l, loadingCards: u = 2, empty: d, error: f, neighbours: p, className: h, ...g }) {
|
|
1738
|
+
let _ = F(null), [v, y] = I(!1), [b, x] = I(""), S = F(null), [C, w] = I(null), T = a !== void 0 && n.length > a;
|
|
1739
|
+
N(() => {
|
|
1740
|
+
let e = S.current, t = _.current;
|
|
1741
|
+
if (S.current = null, !e || !t || document.activeElement !== document.body) return;
|
|
1742
|
+
let n = [...t.querySelectorAll(`[data-part="${e.part}"]`)];
|
|
1743
|
+
(n[Math.min(e.at, n.length - 1)] ?? t.querySelector("[data-part=\"add\"]"))?.focus();
|
|
1744
|
+
}, [n]);
|
|
1745
|
+
let E = (e, t, n) => {
|
|
1746
|
+
let r = n === -1 ? p?.back : p?.forward;
|
|
1747
|
+
x(r ? `${Q(e.title, "을/를")} ${Q(r, "으로/로")} 옮겼습니다` : `${Q(e.title, "을/를")} 옮겼습니다`), S.current = {
|
|
1748
|
+
at: t,
|
|
1749
|
+
part: n === -1 ? "back" : "forward"
|
|
1750
|
+
}, o?.(e.id, n);
|
|
1751
|
+
}, D = (e) => [...e.dataTransfer.types].includes(ft), O = (e) => {
|
|
1752
|
+
!s || !D(e) || (e.preventDefault(), y(!0));
|
|
1753
|
+
};
|
|
1754
|
+
return /* @__PURE__ */ j("section", {
|
|
1755
|
+
...g,
|
|
1756
|
+
className: `kanban-column ${h ?? ""}`.trim(),
|
|
1757
|
+
"data-over": v ? "" : void 0,
|
|
1758
|
+
"data-past": T ? "" : void 0,
|
|
1759
|
+
ref: _,
|
|
1760
|
+
"aria-label": `${e} — ${f ? "불러오지 못했습니다" : l ? "불러오는 중" : `${n.length}장${T ? `, 한도 ${a}장 초과` : ""}`}`,
|
|
1761
|
+
onDragOver: O,
|
|
1762
|
+
onDragEnter: O,
|
|
1763
|
+
onDragLeave: (e) => {
|
|
1764
|
+
let t = e.relatedTarget;
|
|
1765
|
+
t && e.currentTarget.contains(t) || y(!1);
|
|
1766
|
+
},
|
|
1767
|
+
onDrop: (e) => {
|
|
1768
|
+
y(!1);
|
|
1769
|
+
let t = e.dataTransfer.getData(ft);
|
|
1770
|
+
t && s && (e.preventDefault(), s(t));
|
|
1771
|
+
},
|
|
1772
|
+
children: [
|
|
1773
|
+
/* @__PURE__ */ A(i, {
|
|
1774
|
+
as: "p",
|
|
1775
|
+
children: /* @__PURE__ */ A("span", {
|
|
1776
|
+
role: "status",
|
|
1777
|
+
"data-part": "live",
|
|
1778
|
+
children: b
|
|
1779
|
+
})
|
|
1780
|
+
}),
|
|
1781
|
+
/* @__PURE__ */ j("header", {
|
|
1782
|
+
className: "kanban-column__head",
|
|
1783
|
+
children: [
|
|
1784
|
+
/* @__PURE__ */ A("h3", {
|
|
1785
|
+
className: "kanban-column__title",
|
|
1786
|
+
children: e
|
|
1787
|
+
}),
|
|
1788
|
+
/* @__PURE__ */ A("p", {
|
|
1789
|
+
className: "kanban-column__count",
|
|
1790
|
+
"data-part": "count",
|
|
1791
|
+
children: a === void 0 ? n.length : `${n.length} / ${a}`
|
|
1792
|
+
}),
|
|
1793
|
+
c ? /* @__PURE__ */ A(t, {
|
|
1794
|
+
icon: q,
|
|
1795
|
+
label: `${e}에 카드 추가`,
|
|
1796
|
+
size: "sm",
|
|
1797
|
+
onClick: c,
|
|
1798
|
+
"data-part": "add"
|
|
1799
|
+
}) : null
|
|
1800
|
+
]
|
|
1801
|
+
}),
|
|
1802
|
+
/* @__PURE__ */ j("ul", {
|
|
1803
|
+
className: "kanban-column__cards",
|
|
1804
|
+
"aria-busy": l || void 0,
|
|
1805
|
+
children: [l || f ? null : n.map((e, n) => /* @__PURE__ */ j("li", {
|
|
1806
|
+
className: "kanban-column__card",
|
|
1807
|
+
"data-part": "card",
|
|
1808
|
+
draggable: !!s,
|
|
1809
|
+
"data-lifted": C === e.id ? "" : void 0,
|
|
1810
|
+
onDragStart: (t) => {
|
|
1811
|
+
t.dataTransfer.setData(ft, e.id), t.dataTransfer.setData("text/plain", e.id), t.dataTransfer.effectAllowed = "move", w(e.id);
|
|
1812
|
+
},
|
|
1813
|
+
onDragEnd: () => w(null),
|
|
1814
|
+
children: [
|
|
1815
|
+
s ? /* @__PURE__ */ A("span", {
|
|
1816
|
+
className: "kanban-column__grip",
|
|
1817
|
+
"aria-hidden": "true",
|
|
1818
|
+
"data-part": "grip",
|
|
1819
|
+
children: /* @__PURE__ */ A(r, {
|
|
1820
|
+
icon: W,
|
|
1821
|
+
size: "xs"
|
|
1822
|
+
})
|
|
1823
|
+
}) : null,
|
|
1824
|
+
/* @__PURE__ */ A("p", {
|
|
1825
|
+
className: "kanban-column__card-title",
|
|
1826
|
+
children: e.title
|
|
1827
|
+
}),
|
|
1828
|
+
e.meta ? /* @__PURE__ */ A("p", {
|
|
1829
|
+
className: "kanban-column__card-meta",
|
|
1830
|
+
children: e.meta
|
|
1831
|
+
}) : null,
|
|
1832
|
+
e.footer ? /* @__PURE__ */ A("div", {
|
|
1833
|
+
className: "kanban-column__card-foot",
|
|
1834
|
+
children: e.footer
|
|
1835
|
+
}) : null,
|
|
1836
|
+
o ? /* @__PURE__ */ j("div", {
|
|
1837
|
+
className: "kanban-column__move",
|
|
1838
|
+
"data-part": "move",
|
|
1839
|
+
children: [/* @__PURE__ */ A(t, {
|
|
1840
|
+
icon: B,
|
|
1841
|
+
label: p?.back ? `${Q(e.title, "을/를")} ${Q(p.back, "으로/로")} 옮기기` : `${e.title} 앞으로 옮기기`,
|
|
1842
|
+
size: "sm",
|
|
1843
|
+
disabled: !p?.back,
|
|
1844
|
+
onClick: () => E(e, n, -1),
|
|
1845
|
+
"data-part": "back"
|
|
1846
|
+
}), /* @__PURE__ */ A(t, {
|
|
1847
|
+
icon: V,
|
|
1848
|
+
label: p?.forward ? `${Q(e.title, "을/를")} ${Q(p.forward, "으로/로")} 옮기기` : `${e.title} 뒤로 옮기기`,
|
|
1849
|
+
size: "sm",
|
|
1850
|
+
disabled: !p?.forward,
|
|
1851
|
+
onClick: () => E(e, n, 1),
|
|
1852
|
+
"data-part": "forward"
|
|
1853
|
+
})]
|
|
1854
|
+
}) : null
|
|
1855
|
+
]
|
|
1856
|
+
}, e.id)), f ? /* @__PURE__ */ A("li", {
|
|
1857
|
+
className: "kanban-column__state",
|
|
1858
|
+
role: "alert",
|
|
1859
|
+
"data-part": "error",
|
|
1860
|
+
children: f
|
|
1861
|
+
}) : l ? Array.from({ length: u }, (e, t) => /* @__PURE__ */ j("li", {
|
|
1862
|
+
className: "kanban-column__card",
|
|
1863
|
+
"data-part": "waiting-card",
|
|
1864
|
+
children: [/* @__PURE__ */ A(m, {
|
|
1865
|
+
shape: "text",
|
|
1866
|
+
lines: 1
|
|
1867
|
+
}), /* @__PURE__ */ A(m, {
|
|
1868
|
+
shape: "text",
|
|
1869
|
+
lines: 1
|
|
1870
|
+
})]
|
|
1871
|
+
}, `waiting-${t}`)) : n.length === 0 ? /* @__PURE__ */ j("li", {
|
|
1872
|
+
className: "kanban-column__empty",
|
|
1873
|
+
"data-part": "empty",
|
|
1874
|
+
children: [/* @__PURE__ */ A(r, {
|
|
1875
|
+
icon: q,
|
|
1876
|
+
size: "sm",
|
|
1877
|
+
"aria-hidden": "true"
|
|
1878
|
+
}), d ?? "비어 있습니다"]
|
|
1879
|
+
}) : null]
|
|
1880
|
+
}),
|
|
1881
|
+
v ? /* @__PURE__ */ j("p", {
|
|
1882
|
+
className: "kanban-column__drop",
|
|
1883
|
+
"data-part": "drop",
|
|
1884
|
+
"aria-hidden": "true",
|
|
1885
|
+
children: [Q(e, "으로/로"), " 옮기기"]
|
|
1886
|
+
}) : null
|
|
1887
|
+
]
|
|
1888
|
+
});
|
|
1889
|
+
}
|
|
1890
|
+
//#endregion
|
|
1891
|
+
//#region src/components/extended/Message/Message.tsx
|
|
1892
|
+
var mt = {
|
|
1893
|
+
user: "나",
|
|
1894
|
+
assistant: "어시스턴트",
|
|
1895
|
+
system: "시스템"
|
|
1896
|
+
};
|
|
1897
|
+
function ht({ children: e, role: t = "assistant", author: n, avatar: r, time: i, timeLabel: a, state: o = "sent", edited: s, actions: c, attachments: l, footer: u, className: d, ...f }) {
|
|
1898
|
+
let p = n ?? mt[t];
|
|
1899
|
+
return /* @__PURE__ */ j("article", {
|
|
1900
|
+
...f,
|
|
1901
|
+
className: `message ${d ?? ""}`.trim(),
|
|
1902
|
+
"data-role": t,
|
|
1903
|
+
"data-state": o,
|
|
1904
|
+
"aria-label": p,
|
|
1905
|
+
"aria-busy": o === "streaming" || void 0,
|
|
1906
|
+
children: [r ? /* @__PURE__ */ A("div", {
|
|
1907
|
+
className: "message__avatar",
|
|
1908
|
+
"data-part": "avatar",
|
|
1909
|
+
children: r
|
|
1910
|
+
}) : null, /* @__PURE__ */ j("div", {
|
|
1911
|
+
className: "message__body",
|
|
1912
|
+
children: [
|
|
1913
|
+
/* @__PURE__ */ j("header", {
|
|
1914
|
+
className: "message__head",
|
|
1915
|
+
children: [
|
|
1916
|
+
/* @__PURE__ */ A("span", {
|
|
1917
|
+
className: "message__author",
|
|
1918
|
+
children: p
|
|
1919
|
+
}),
|
|
1920
|
+
i ? /* @__PURE__ */ A("time", {
|
|
1921
|
+
className: "message__time",
|
|
1922
|
+
dateTime: i,
|
|
1923
|
+
children: a ?? i
|
|
1924
|
+
}) : null,
|
|
1925
|
+
s ? /* @__PURE__ */ A("span", {
|
|
1926
|
+
className: "message__edited",
|
|
1927
|
+
children: "편집됨"
|
|
1928
|
+
}) : null
|
|
1929
|
+
]
|
|
1930
|
+
}),
|
|
1931
|
+
l ? /* @__PURE__ */ A("div", {
|
|
1932
|
+
className: "message__attachments",
|
|
1933
|
+
children: l
|
|
1934
|
+
}) : null,
|
|
1935
|
+
/* @__PURE__ */ A("div", {
|
|
1936
|
+
className: "message__text",
|
|
1937
|
+
"data-part": "text",
|
|
1938
|
+
children: e
|
|
1939
|
+
}),
|
|
1940
|
+
u ? /* @__PURE__ */ A("div", {
|
|
1941
|
+
className: "message__footer",
|
|
1942
|
+
"data-part": "footer",
|
|
1943
|
+
children: u
|
|
1944
|
+
}) : null,
|
|
1945
|
+
c ? /* @__PURE__ */ A("div", {
|
|
1946
|
+
className: "message__actions",
|
|
1947
|
+
"data-part": "actions",
|
|
1948
|
+
children: c
|
|
1949
|
+
}) : null
|
|
1950
|
+
]
|
|
1951
|
+
})]
|
|
1952
|
+
});
|
|
1953
|
+
}
|
|
1954
|
+
//#endregion
|
|
1955
|
+
//#region src/components/extended/MessageList/MessageList.tsx
|
|
1956
|
+
function gt({ children: e, loading: t, loadingMessages: n = 3, empty: i, error: a, streaming: o, label: s, threshold: c = 32, jumpLabel: l = "맨 아래로", className: u, ...d }) {
|
|
1957
|
+
let f = F(null), p = F(null), h = F(!0), g = F(!1), [_, v] = I(!1), y = M(() => {
|
|
1958
|
+
let e = f.current;
|
|
1959
|
+
if (!e) return;
|
|
1960
|
+
let t = e.scrollHeight - e.scrollTop - e.clientHeight;
|
|
1961
|
+
g.current || (h.current = t <= c, v(!h.current));
|
|
1962
|
+
}, [c]), b = F(0), x = M((e) => {
|
|
1963
|
+
let t = f.current;
|
|
1964
|
+
if (!t) return;
|
|
1965
|
+
cancelAnimationFrame(b.current);
|
|
1966
|
+
let n = () => t.scrollHeight - t.clientHeight, r = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
1967
|
+
if (!e || r) {
|
|
1968
|
+
g.current = !1, t.scrollTop = n();
|
|
1969
|
+
return;
|
|
1970
|
+
}
|
|
1971
|
+
g.current = !0;
|
|
1972
|
+
let i = t.scrollTop, a = performance.now(), o = (e) => {
|
|
1973
|
+
if (!g.current) return;
|
|
1974
|
+
let r = Math.min(1, (e - a) / 320);
|
|
1975
|
+
if (t.scrollTop = i + (n() - i) * (1 - (1 - r) ** 3), r < 1) {
|
|
1976
|
+
b.current = requestAnimationFrame(o);
|
|
1977
|
+
return;
|
|
1978
|
+
}
|
|
1979
|
+
g.current = !1, t.scrollTop = n(), y();
|
|
1980
|
+
};
|
|
1981
|
+
b.current = requestAnimationFrame(o);
|
|
1982
|
+
}, [y]);
|
|
1983
|
+
return N(() => {
|
|
1984
|
+
let e = f.current;
|
|
1985
|
+
if (!e) return;
|
|
1986
|
+
let t = () => {
|
|
1987
|
+
g.current = !1;
|
|
1988
|
+
}, n = [
|
|
1989
|
+
"wheel",
|
|
1990
|
+
"touchstart",
|
|
1991
|
+
"keydown"
|
|
1992
|
+
];
|
|
1993
|
+
for (let r of n) e.addEventListener(r, t, { passive: !0 });
|
|
1994
|
+
return () => {
|
|
1995
|
+
for (let r of n) e.removeEventListener(r, t);
|
|
1996
|
+
};
|
|
1997
|
+
}, []), N(() => {
|
|
1998
|
+
let e = p.current;
|
|
1999
|
+
if (!e) return;
|
|
2000
|
+
let t = new ResizeObserver(() => {
|
|
2001
|
+
if (!g.current) {
|
|
2002
|
+
if (h.current) return x(!1);
|
|
2003
|
+
y();
|
|
2004
|
+
}
|
|
2005
|
+
});
|
|
2006
|
+
return t.observe(e), x(!1), () => {
|
|
2007
|
+
t.disconnect(), cancelAnimationFrame(b.current), g.current = !1;
|
|
2008
|
+
};
|
|
2009
|
+
}, [y, x]), /* @__PURE__ */ j("div", {
|
|
2010
|
+
className: `message-list ${u ?? ""}`.trim(),
|
|
2011
|
+
...d,
|
|
2012
|
+
children: [/* @__PURE__ */ A("div", {
|
|
2013
|
+
ref: f,
|
|
2014
|
+
className: "message-list__scroll",
|
|
2015
|
+
tabIndex: 0,
|
|
2016
|
+
role: "log",
|
|
2017
|
+
"aria-label": s,
|
|
2018
|
+
"aria-busy": t || o || void 0,
|
|
2019
|
+
onScroll: y,
|
|
2020
|
+
"data-part": "scroll",
|
|
2021
|
+
children: /* @__PURE__ */ A("div", {
|
|
2022
|
+
ref: p,
|
|
2023
|
+
className: "message-list__content",
|
|
2024
|
+
children: a ? /* @__PURE__ */ A("p", {
|
|
2025
|
+
className: "message-list__state",
|
|
2026
|
+
role: "alert",
|
|
2027
|
+
"data-part": "error",
|
|
2028
|
+
children: a
|
|
2029
|
+
}) : t ? Array.from({ length: n }, (e, t) => /* @__PURE__ */ A("div", {
|
|
2030
|
+
className: "message-list__waiting",
|
|
2031
|
+
"data-part": "waiting-message",
|
|
2032
|
+
"data-side": t % 2 == 0 ? "them" : "me",
|
|
2033
|
+
children: /* @__PURE__ */ A(m, {
|
|
2034
|
+
shape: "text",
|
|
2035
|
+
lines: t % 2 == 0 ? 2 : 1
|
|
2036
|
+
})
|
|
2037
|
+
}, `waiting-${t}`)) : i ? /* @__PURE__ */ A("p", {
|
|
2038
|
+
className: "message-list__state",
|
|
2039
|
+
"data-part": "empty",
|
|
2040
|
+
children: i
|
|
2041
|
+
}) : e
|
|
2042
|
+
})
|
|
2043
|
+
}), _ ? /* @__PURE__ */ j("button", {
|
|
2044
|
+
type: "button",
|
|
2045
|
+
className: "message-list__jump",
|
|
2046
|
+
onClick: () => {
|
|
2047
|
+
h.current = !0, v(!1), x(!0);
|
|
2048
|
+
},
|
|
2049
|
+
"data-part": "jump",
|
|
2050
|
+
children: [/* @__PURE__ */ A(r, {
|
|
2051
|
+
icon: ie,
|
|
2052
|
+
size: "sm",
|
|
2053
|
+
"aria-hidden": "true"
|
|
2054
|
+
}), l]
|
|
2055
|
+
}) : null]
|
|
2056
|
+
});
|
|
2057
|
+
}
|
|
2058
|
+
//#endregion
|
|
2059
|
+
//#region src/components/extended/MetricCard/MetricCard.tsx
|
|
2060
|
+
var _t = {
|
|
2061
|
+
up: ce,
|
|
2062
|
+
down: ae,
|
|
2063
|
+
flat: he
|
|
2064
|
+
}, vt = {
|
|
2065
|
+
up: "증가",
|
|
2066
|
+
down: "감소",
|
|
2067
|
+
flat: "변화 없음"
|
|
2068
|
+
};
|
|
2069
|
+
function yt({ label: e, value: t, delta: n, compare: i, chart: a, loading: o, empty: s, error: c, className: l, ...u }) {
|
|
2070
|
+
let d = n?.meaning ?? "neutral";
|
|
2071
|
+
return /* @__PURE__ */ j("section", {
|
|
2072
|
+
...u,
|
|
2073
|
+
className: `metric-card ${l ?? ""}`.trim(),
|
|
2074
|
+
"aria-label": e,
|
|
2075
|
+
"aria-busy": o || void 0,
|
|
2076
|
+
children: [
|
|
2077
|
+
/* @__PURE__ */ A("p", {
|
|
2078
|
+
className: "metric-card__label",
|
|
2079
|
+
children: e
|
|
2080
|
+
}),
|
|
2081
|
+
c ? /* @__PURE__ */ A("p", {
|
|
2082
|
+
className: "metric-card__state",
|
|
2083
|
+
role: "alert",
|
|
2084
|
+
"data-part": "error",
|
|
2085
|
+
children: c
|
|
2086
|
+
}) : o ? /* @__PURE__ */ j("div", {
|
|
2087
|
+
className: "metric-card__waiting",
|
|
2088
|
+
"data-part": "waiting",
|
|
2089
|
+
children: [/* @__PURE__ */ A(m, {
|
|
2090
|
+
shape: "rect",
|
|
2091
|
+
"data-part": "waiting-value"
|
|
2092
|
+
}), /* @__PURE__ */ A(m, {
|
|
2093
|
+
shape: "rect",
|
|
2094
|
+
"data-part": "waiting-delta"
|
|
2095
|
+
})]
|
|
2096
|
+
}) : s ? /* @__PURE__ */ A("p", {
|
|
2097
|
+
className: "metric-card__state",
|
|
2098
|
+
"data-part": "empty",
|
|
2099
|
+
children: s
|
|
2100
|
+
}) : /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("p", {
|
|
2101
|
+
className: "metric-card__value",
|
|
2102
|
+
"data-part": "value",
|
|
2103
|
+
children: t
|
|
2104
|
+
}), n ? /* @__PURE__ */ j("p", {
|
|
2105
|
+
className: "metric-card__delta",
|
|
2106
|
+
"data-meaning": d,
|
|
2107
|
+
"data-part": "delta",
|
|
2108
|
+
children: [
|
|
2109
|
+
/* @__PURE__ */ A(r, {
|
|
2110
|
+
icon: _t[n.direction],
|
|
2111
|
+
size: "xs",
|
|
2112
|
+
"aria-hidden": "true"
|
|
2113
|
+
}),
|
|
2114
|
+
/* @__PURE__ */ A("span", { children: n.value }),
|
|
2115
|
+
/* @__PURE__ */ A("span", {
|
|
2116
|
+
className: "metric-card__said",
|
|
2117
|
+
children: ` ${vt[n.direction]}`
|
|
2118
|
+
}),
|
|
2119
|
+
i ? /* @__PURE__ */ A("span", {
|
|
2120
|
+
className: "metric-card__compare",
|
|
2121
|
+
children: i
|
|
2122
|
+
}) : null
|
|
2123
|
+
]
|
|
2124
|
+
}) : i ? /* @__PURE__ */ A("p", {
|
|
2125
|
+
className: "metric-card__compare",
|
|
2126
|
+
"data-part": "compare",
|
|
2127
|
+
children: i
|
|
2128
|
+
}) : null] }),
|
|
2129
|
+
a && !o && !c && !s ? /* @__PURE__ */ A("div", {
|
|
2130
|
+
className: "metric-card__chart",
|
|
2131
|
+
"data-part": "chart",
|
|
2132
|
+
children: a
|
|
2133
|
+
}) : null
|
|
2134
|
+
]
|
|
2135
|
+
});
|
|
2136
|
+
}
|
|
2137
|
+
//#endregion
|
|
2138
|
+
//#region src/components/extended/PriceDisplay/PriceDisplay.tsx
|
|
2139
|
+
var bt = {
|
|
2140
|
+
KRW: "원",
|
|
2141
|
+
JPY: "엔",
|
|
2142
|
+
CNY: "위안"
|
|
2143
|
+
};
|
|
2144
|
+
function $(e, { locale: t = "ko-KR", currency: n = "KRW", affix: r = "word" } = {}) {
|
|
2145
|
+
let i = new Intl.NumberFormat(t, {
|
|
2146
|
+
style: "currency",
|
|
2147
|
+
currency: n
|
|
2148
|
+
}).formatToParts(e), a = bt[n];
|
|
2149
|
+
return r === "symbol" || !a ? i.map((e) => e.value).join("") : `${i.filter((e) => e.type !== "currency").map((e) => e.value).join("").trim()}${a}`;
|
|
2150
|
+
}
|
|
2151
|
+
function xt({ amount: e, was: t, currency: n = "KRW", locale: r = "ko-KR", affix: a = "word", size: o = "md", note: s, saving: c, label: l, className: u, ...d }) {
|
|
2152
|
+
let f = t !== void 0 && t > e, p = f ? Math.floor((t - e) / t * 100) : 0;
|
|
2153
|
+
return /* @__PURE__ */ j("p", {
|
|
2154
|
+
...d,
|
|
2155
|
+
className: `price-display ${u ?? ""}`.trim(),
|
|
2156
|
+
"data-size": o,
|
|
2157
|
+
children: [
|
|
2158
|
+
l ? /* @__PURE__ */ j(i, { children: [l, " "] }) : null,
|
|
2159
|
+
/* @__PURE__ */ j("span", {
|
|
2160
|
+
className: "price-display__now",
|
|
2161
|
+
"data-part": "now",
|
|
2162
|
+
children: [f ? /* @__PURE__ */ A(i, { children: "할인가 " }) : null, /* @__PURE__ */ A("data", {
|
|
2163
|
+
value: e,
|
|
2164
|
+
children: $(e, {
|
|
2165
|
+
locale: r,
|
|
2166
|
+
currency: n,
|
|
2167
|
+
affix: a
|
|
2168
|
+
})
|
|
2169
|
+
})]
|
|
2170
|
+
}),
|
|
2171
|
+
f ? /* @__PURE__ */ j("s", {
|
|
2172
|
+
className: "price-display__was",
|
|
2173
|
+
"data-part": "was",
|
|
2174
|
+
children: [/* @__PURE__ */ A(i, { children: "원래 가격 " }), /* @__PURE__ */ A("data", {
|
|
2175
|
+
value: t,
|
|
2176
|
+
children: $(t, {
|
|
2177
|
+
locale: r,
|
|
2178
|
+
currency: n,
|
|
2179
|
+
affix: a
|
|
2180
|
+
})
|
|
2181
|
+
})]
|
|
2182
|
+
}) : null,
|
|
2183
|
+
f && c && p > 0 ? /* @__PURE__ */ j("span", {
|
|
2184
|
+
className: "price-display__off",
|
|
2185
|
+
"data-part": "off",
|
|
2186
|
+
children: [
|
|
2187
|
+
p,
|
|
2188
|
+
"%",
|
|
2189
|
+
/* @__PURE__ */ A(i, { children: " 할인" })
|
|
2190
|
+
]
|
|
2191
|
+
}) : null,
|
|
2192
|
+
s ? /* @__PURE__ */ A("span", {
|
|
2193
|
+
className: "price-display__note",
|
|
2194
|
+
children: s
|
|
2195
|
+
}) : null
|
|
2196
|
+
]
|
|
2197
|
+
});
|
|
2198
|
+
}
|
|
2199
|
+
//#endregion
|
|
2200
|
+
//#region src/components/extended/OrderSummary/OrderSummary.tsx
|
|
2201
|
+
function St({ lines: e, total: t, label: n, currency: r = "KRW", locale: i = "ko-KR", affix: a = "word", estimated: o, totalNote: s, totalLabel: c = "합계", estimateNote: l = "주소를 넣기 전이라 예상입니다", freeLabel: u = "무료", actions: d, className: f, ...p }) {
|
|
2202
|
+
let m = (e, t) => {
|
|
2203
|
+
if (t === "free") return u;
|
|
2204
|
+
let n = $(e, {
|
|
2205
|
+
locale: i,
|
|
2206
|
+
currency: r,
|
|
2207
|
+
affix: a
|
|
2208
|
+
});
|
|
2209
|
+
return t === "discount" ? `−${n}` : n;
|
|
2210
|
+
}, h = (e) => e.kind === "free" ? 0 : e.kind === "discount" ? -e.amount : e.amount;
|
|
2211
|
+
return /* @__PURE__ */ j("section", {
|
|
2212
|
+
...p,
|
|
2213
|
+
className: `order-summary ${f ?? ""}`.trim(),
|
|
2214
|
+
"aria-label": n,
|
|
2215
|
+
children: [/* @__PURE__ */ j("dl", {
|
|
2216
|
+
className: "order-summary__lines",
|
|
2217
|
+
children: [e.map((e) => /* @__PURE__ */ j("div", {
|
|
2218
|
+
className: "order-summary__line",
|
|
2219
|
+
"data-kind": e.kind ?? "charge",
|
|
2220
|
+
"data-part": "line",
|
|
2221
|
+
children: [/* @__PURE__ */ j("dt", {
|
|
2222
|
+
className: "order-summary__label",
|
|
2223
|
+
children: [e.label, e.note ? /* @__PURE__ */ A("span", {
|
|
2224
|
+
className: "order-summary__note",
|
|
2225
|
+
children: e.note
|
|
2226
|
+
}) : null]
|
|
2227
|
+
}), /* @__PURE__ */ A("dd", {
|
|
2228
|
+
className: "order-summary__amount",
|
|
2229
|
+
children: /* @__PURE__ */ A("data", {
|
|
2230
|
+
value: h(e),
|
|
2231
|
+
children: m(e.amount, e.kind)
|
|
2232
|
+
})
|
|
2233
|
+
})]
|
|
2234
|
+
}, e.id)), /* @__PURE__ */ j("div", {
|
|
2235
|
+
className: "order-summary__line order-summary__line--total",
|
|
2236
|
+
"data-part": "total",
|
|
2237
|
+
children: [/* @__PURE__ */ j("dt", {
|
|
2238
|
+
className: "order-summary__label",
|
|
2239
|
+
children: [
|
|
2240
|
+
c,
|
|
2241
|
+
o ? /* @__PURE__ */ A("span", {
|
|
2242
|
+
className: "order-summary__note",
|
|
2243
|
+
children: l
|
|
2244
|
+
}) : null,
|
|
2245
|
+
s ? /* @__PURE__ */ A("span", {
|
|
2246
|
+
className: "order-summary__note",
|
|
2247
|
+
children: s
|
|
2248
|
+
}) : null
|
|
2249
|
+
]
|
|
2250
|
+
}), /* @__PURE__ */ A("dd", {
|
|
2251
|
+
className: "order-summary__amount",
|
|
2252
|
+
children: /* @__PURE__ */ A("data", {
|
|
2253
|
+
value: t,
|
|
2254
|
+
children: $(t, {
|
|
2255
|
+
locale: i,
|
|
2256
|
+
currency: r,
|
|
2257
|
+
affix: a
|
|
2258
|
+
})
|
|
2259
|
+
})
|
|
2260
|
+
})]
|
|
2261
|
+
})]
|
|
2262
|
+
}), d ? /* @__PURE__ */ A("div", {
|
|
2263
|
+
className: "order-summary__actions",
|
|
2264
|
+
children: d
|
|
2265
|
+
}) : null]
|
|
2266
|
+
});
|
|
2267
|
+
}
|
|
2268
|
+
//#endregion
|
|
2269
|
+
//#region src/components/extended/PaymentMethodSelector/PaymentMethodSelector.tsx
|
|
2270
|
+
function Ct({ methods: e, value: t, onValueChange: n, label: i, name: a = "paymentMethod", className: o, ...s }) {
|
|
2271
|
+
let l = e.find((e) => e.id === t)?.disabled ? e.find((e) => !e.disabled)?.id : void 0;
|
|
2272
|
+
return /* @__PURE__ */ j("fieldset", {
|
|
2273
|
+
...s,
|
|
2274
|
+
className: `payment-method-selector ${o ?? ""}`.trim(),
|
|
2275
|
+
children: [/* @__PURE__ */ A("legend", {
|
|
2276
|
+
className: "payment-method-selector__legend",
|
|
2277
|
+
children: i
|
|
2278
|
+
}), /* @__PURE__ */ A("div", {
|
|
2279
|
+
className: "payment-method-selector__methods",
|
|
2280
|
+
children: e.map((e) => {
|
|
2281
|
+
let i = e.id === t;
|
|
2282
|
+
return /* @__PURE__ */ j("div", {
|
|
2283
|
+
className: "payment-method-selector__method",
|
|
2284
|
+
"data-chosen": i ? "" : void 0,
|
|
2285
|
+
"data-disabled": e.disabled ? "" : void 0,
|
|
2286
|
+
"data-part": "method",
|
|
2287
|
+
children: [/* @__PURE__ */ A(c, {
|
|
2288
|
+
className: "payment-method-selector__choice",
|
|
2289
|
+
name: a,
|
|
2290
|
+
value: e.id,
|
|
2291
|
+
checked: i,
|
|
2292
|
+
disabled: e.disabled,
|
|
2293
|
+
tabIndex: l === void 0 ? void 0 : e.id === l ? 0 : -1,
|
|
2294
|
+
onChange: () => n(e.id),
|
|
2295
|
+
"data-part": `choice-${e.id}`,
|
|
2296
|
+
children: /* @__PURE__ */ j("span", {
|
|
2297
|
+
className: "payment-method-selector__text",
|
|
2298
|
+
children: [
|
|
2299
|
+
/* @__PURE__ */ j("span", {
|
|
2300
|
+
className: "payment-method-selector__label",
|
|
2301
|
+
children: [e.icon ? /* @__PURE__ */ A(r, {
|
|
2302
|
+
icon: e.icon,
|
|
2303
|
+
size: "sm",
|
|
2304
|
+
tone: "muted",
|
|
2305
|
+
"aria-hidden": "true"
|
|
2306
|
+
}) : null, e.label]
|
|
2307
|
+
}),
|
|
2308
|
+
e.note ? /* @__PURE__ */ A("span", {
|
|
2309
|
+
className: "payment-method-selector__note",
|
|
2310
|
+
children: e.note
|
|
2311
|
+
}) : null,
|
|
2312
|
+
e.disabled && e.unavailable ? /* @__PURE__ */ A("span", {
|
|
2313
|
+
className: "payment-method-selector__why",
|
|
2314
|
+
children: e.unavailable
|
|
2315
|
+
}) : null
|
|
2316
|
+
]
|
|
2317
|
+
})
|
|
2318
|
+
}), i && e.fields ? /* @__PURE__ */ A("div", {
|
|
2319
|
+
className: "payment-method-selector__fields",
|
|
2320
|
+
"data-part": "fields",
|
|
2321
|
+
children: e.fields
|
|
2322
|
+
}) : null]
|
|
2323
|
+
}, e.id);
|
|
2324
|
+
})
|
|
2325
|
+
})]
|
|
2326
|
+
});
|
|
2327
|
+
}
|
|
2328
|
+
//#endregion
|
|
2329
|
+
//#region src/components/extended/PresenceBar/PresenceBar.tsx
|
|
2330
|
+
function wt({ people: e, label: t, max: r = 5, size: i = "sm", following: a, onFollow: o, followLabel: s = "따라가기", aside: c, className: l, ...u }) {
|
|
2331
|
+
let d = [...e].sort((e, t) => Number(!!t.you) - Number(!!e.you)), f = e.find((e) => e.id === a), p = d.map((e) => ({
|
|
2332
|
+
id: e.id,
|
|
2333
|
+
name: e.name,
|
|
2334
|
+
src: e.src,
|
|
2335
|
+
status: e.state === "idle" ? "away" : "online",
|
|
2336
|
+
said: [e.you ? "(나)" : "", e.state === "idle" ? "— 자리 비움" : ""].filter(Boolean).join(" ")
|
|
2337
|
+
}));
|
|
2338
|
+
return /* @__PURE__ */ j("div", {
|
|
2339
|
+
...u,
|
|
2340
|
+
className: `presence-bar ${l ?? ""}`.trim(),
|
|
2341
|
+
role: "group",
|
|
2342
|
+
"aria-label": `${t} — ${e.length}명`,
|
|
2343
|
+
children: [
|
|
2344
|
+
/* @__PURE__ */ A(y, {
|
|
2345
|
+
people: p,
|
|
2346
|
+
label: t,
|
|
2347
|
+
max: r,
|
|
2348
|
+
size: i,
|
|
2349
|
+
"data-part": "faces"
|
|
2350
|
+
}),
|
|
2351
|
+
o ? /* @__PURE__ */ A(te, {
|
|
2352
|
+
items: /* @__PURE__ */ j(k, { children: [
|
|
2353
|
+
/* @__PURE__ */ A(S, {
|
|
2354
|
+
value: f?.id ?? "",
|
|
2355
|
+
onValueChange: (e) => o(e || null),
|
|
2356
|
+
children: d.filter((e) => !e.you).map((e) => /* @__PURE__ */ j(O, {
|
|
2357
|
+
value: e.id,
|
|
2358
|
+
"data-part": `follow-${e.id}`,
|
|
2359
|
+
children: [e.name, e.state === "idle" ? " — 자리 비움" : ""]
|
|
2360
|
+
}, e.id))
|
|
2361
|
+
}),
|
|
2362
|
+
/* @__PURE__ */ A(ee, {}),
|
|
2363
|
+
/* @__PURE__ */ A(T, {
|
|
2364
|
+
icon: fe,
|
|
2365
|
+
disabled: !a,
|
|
2366
|
+
onSelect: () => o(null),
|
|
2367
|
+
"data-part": "unfollow",
|
|
2368
|
+
children: "따라가지 않기"
|
|
2369
|
+
})
|
|
2370
|
+
] }),
|
|
2371
|
+
children: /* @__PURE__ */ A(n, {
|
|
2372
|
+
size: "sm",
|
|
2373
|
+
variant: f ? "solid" : "outline",
|
|
2374
|
+
tone: f ? "accent" : "neutral",
|
|
2375
|
+
iconStart: de,
|
|
2376
|
+
"data-part": "follow",
|
|
2377
|
+
children: f ? `${f.name} 따라가는 중` : s
|
|
2378
|
+
})
|
|
2379
|
+
}) : null,
|
|
2380
|
+
c ? /* @__PURE__ */ A("div", {
|
|
2381
|
+
className: "presence-bar__aside",
|
|
2382
|
+
children: c
|
|
2383
|
+
}) : null
|
|
2384
|
+
]
|
|
2385
|
+
});
|
|
2386
|
+
}
|
|
2387
|
+
//#endregion
|
|
2388
|
+
//#region src/components/extended/ProductCard/ProductCard.tsx
|
|
2389
|
+
function Tt({ name: e, href: t, price: n, was: i, currency: a = "KRW", locale: o = "ko-KR", affix: s = "word", image: c, imageAlt: l, flag: d, soldOut: f, swatches: p, swatch: m, onSwatchChange: h, swatchLabel: g, meta: _, className: v, ...y }) {
|
|
2390
|
+
let b = p?.find((e) => e.id === m)?.image ?? c, x = P();
|
|
2391
|
+
return /* @__PURE__ */ j("article", {
|
|
2392
|
+
...y,
|
|
2393
|
+
className: `product-card ${v ?? ""}`.trim(),
|
|
2394
|
+
"data-sold-out": f ? "" : void 0,
|
|
2395
|
+
children: [/* @__PURE__ */ j("div", {
|
|
2396
|
+
className: "product-card__picture",
|
|
2397
|
+
children: [
|
|
2398
|
+
b ? /* @__PURE__ */ A("img", {
|
|
2399
|
+
className: "product-card__image",
|
|
2400
|
+
src: b,
|
|
2401
|
+
alt: l ?? "",
|
|
2402
|
+
loading: "lazy"
|
|
2403
|
+
}) : /* @__PURE__ */ A("span", {
|
|
2404
|
+
className: "product-card__blank",
|
|
2405
|
+
"aria-hidden": "true",
|
|
2406
|
+
children: /* @__PURE__ */ A(r, {
|
|
2407
|
+
icon: pe,
|
|
2408
|
+
size: "md"
|
|
2409
|
+
})
|
|
2410
|
+
}),
|
|
2411
|
+
d ? /* @__PURE__ */ A("span", {
|
|
2412
|
+
className: "product-card__flag",
|
|
2413
|
+
children: d
|
|
2414
|
+
}) : null,
|
|
2415
|
+
f ? /* @__PURE__ */ A("span", {
|
|
2416
|
+
className: "product-card__out",
|
|
2417
|
+
children: /* @__PURE__ */ A(u, {
|
|
2418
|
+
tone: "neutral",
|
|
2419
|
+
variant: "solid",
|
|
2420
|
+
size: "sm",
|
|
2421
|
+
children: "품절"
|
|
2422
|
+
})
|
|
2423
|
+
}) : null
|
|
2424
|
+
]
|
|
2425
|
+
}), /* @__PURE__ */ j("div", {
|
|
2426
|
+
className: "product-card__body",
|
|
2427
|
+
children: [
|
|
2428
|
+
/* @__PURE__ */ A("h3", {
|
|
2429
|
+
className: "product-card__name",
|
|
2430
|
+
children: /* @__PURE__ */ A("a", {
|
|
2431
|
+
className: "product-card__link",
|
|
2432
|
+
href: t,
|
|
2433
|
+
children: e
|
|
2434
|
+
})
|
|
2435
|
+
}),
|
|
2436
|
+
/* @__PURE__ */ A(xt, {
|
|
2437
|
+
amount: n,
|
|
2438
|
+
was: i,
|
|
2439
|
+
currency: a,
|
|
2440
|
+
locale: o,
|
|
2441
|
+
affix: s,
|
|
2442
|
+
saving: !0,
|
|
2443
|
+
size: "sm",
|
|
2444
|
+
"data-part": "price"
|
|
2445
|
+
}),
|
|
2446
|
+
_ ? /* @__PURE__ */ A("p", {
|
|
2447
|
+
className: "product-card__meta",
|
|
2448
|
+
children: _
|
|
2449
|
+
}) : null,
|
|
2450
|
+
p?.length && !f ? /* @__PURE__ */ j("fieldset", {
|
|
2451
|
+
className: "product-card__swatches",
|
|
2452
|
+
"data-part": "swatches",
|
|
2453
|
+
children: [/* @__PURE__ */ A("legend", {
|
|
2454
|
+
className: "product-card__swatch-legend",
|
|
2455
|
+
children: g ?? `${e} 색상`
|
|
2456
|
+
}), p.map((e) => /* @__PURE__ */ j("label", {
|
|
2457
|
+
className: "product-card__swatch",
|
|
2458
|
+
children: [
|
|
2459
|
+
/* @__PURE__ */ A("input", {
|
|
2460
|
+
type: "radio",
|
|
2461
|
+
className: "product-card__swatch-input",
|
|
2462
|
+
name: `${x}-swatch`,
|
|
2463
|
+
value: e.id,
|
|
2464
|
+
checked: m === e.id,
|
|
2465
|
+
onChange: () => h?.(e.id)
|
|
2466
|
+
}),
|
|
2467
|
+
/* @__PURE__ */ A("span", {
|
|
2468
|
+
className: "product-card__swatch-mark",
|
|
2469
|
+
"aria-hidden": "true",
|
|
2470
|
+
children: e.image ? /* @__PURE__ */ A("img", {
|
|
2471
|
+
src: e.image,
|
|
2472
|
+
alt: "",
|
|
2473
|
+
loading: "lazy"
|
|
2474
|
+
}) : null
|
|
2475
|
+
}),
|
|
2476
|
+
/* @__PURE__ */ A("span", {
|
|
2477
|
+
className: "product-card__swatch-name",
|
|
2478
|
+
children: e.name
|
|
2479
|
+
})
|
|
2480
|
+
]
|
|
2481
|
+
}, e.id))]
|
|
2482
|
+
}) : null
|
|
2483
|
+
]
|
|
2484
|
+
})]
|
|
2485
|
+
});
|
|
2486
|
+
}
|
|
2487
|
+
//#endregion
|
|
2488
|
+
//#region src/components/extended/QuantityStepper/QuantityStepper.tsx
|
|
2489
|
+
function Et({ value: t, onValueChange: n, label: r, stock: i, onRemove: a, removeLabel: o, pending: s, min: c = 1, size: l = "md", disabled: u, note: d, className: f, ...p }) {
|
|
2490
|
+
let m = d === void 0 && i !== void 0 && i <= 5, h = d ?? (m || d === void 0 && i !== void 0 && t >= i ? `재고 ${i}개` : void 0), g = F(null), _ = a ? () => {
|
|
2491
|
+
let e = w(g.current);
|
|
2492
|
+
a(), e();
|
|
2493
|
+
} : void 0;
|
|
2494
|
+
return /* @__PURE__ */ j("div", {
|
|
2495
|
+
...p,
|
|
2496
|
+
ref: g,
|
|
2497
|
+
className: `quantity-stepper ${f ?? ""}`.trim(),
|
|
2498
|
+
"data-pending": s ? "" : void 0,
|
|
2499
|
+
children: [/* @__PURE__ */ j("div", {
|
|
2500
|
+
className: "quantity-stepper__control",
|
|
2501
|
+
children: [/* @__PURE__ */ A(b, {
|
|
2502
|
+
value: t,
|
|
2503
|
+
onValueChange: n,
|
|
2504
|
+
label: r,
|
|
2505
|
+
min: c,
|
|
2506
|
+
max: i,
|
|
2507
|
+
unit: "개",
|
|
2508
|
+
size: l,
|
|
2509
|
+
disabled: u,
|
|
2510
|
+
atFloor: _ ? {
|
|
2511
|
+
icon: Ee,
|
|
2512
|
+
label: o ?? `${r} 빼기`,
|
|
2513
|
+
onPress: _,
|
|
2514
|
+
tone: "danger"
|
|
2515
|
+
} : void 0,
|
|
2516
|
+
"data-part": "field"
|
|
2517
|
+
}), s ? /* @__PURE__ */ A("span", {
|
|
2518
|
+
className: "quantity-stepper__pending",
|
|
2519
|
+
"data-part": "pending",
|
|
2520
|
+
children: /* @__PURE__ */ A(e, {
|
|
2521
|
+
size: "sm",
|
|
2522
|
+
label: `${r} 수량 저장 중`
|
|
2523
|
+
})
|
|
2524
|
+
}) : null]
|
|
2525
|
+
}), h ? /* @__PURE__ */ A("p", {
|
|
2526
|
+
className: "quantity-stepper__note",
|
|
2527
|
+
"data-low": m ? "" : void 0,
|
|
2528
|
+
"data-part": "note",
|
|
2529
|
+
children: h
|
|
2530
|
+
}) : null]
|
|
2531
|
+
});
|
|
2532
|
+
}
|
|
2533
|
+
//#endregion
|
|
2534
|
+
//#region src/components/extended/ReasoningDisclosure/ReasoningDisclosure.tsx
|
|
2535
|
+
function Dt({ children: e, state: t = "done", duration: n, summary: r, defaultOpen: i, className: a, ...o }) {
|
|
2536
|
+
let s = r ?? (t === "thinking" ? `생각하는 중${n ? ` · ${n}` : "…"}` : n ? `${n} 동안 생각했습니다` : "생각 보기");
|
|
2537
|
+
return /* @__PURE__ */ A(C, {
|
|
2538
|
+
...o,
|
|
2539
|
+
className: `reasoning-disclosure ${a ?? ""}`.trim(),
|
|
2540
|
+
"data-state": t,
|
|
2541
|
+
icon: le,
|
|
2542
|
+
plain: !0,
|
|
2543
|
+
defaultOpen: i,
|
|
2544
|
+
summary: /* @__PURE__ */ A("span", {
|
|
2545
|
+
className: "reasoning-disclosure__summary",
|
|
2546
|
+
children: s
|
|
2547
|
+
}),
|
|
2548
|
+
children: /* @__PURE__ */ A("div", {
|
|
2549
|
+
className: "reasoning-disclosure__body",
|
|
2550
|
+
"data-part": "body",
|
|
2551
|
+
children: e
|
|
2552
|
+
})
|
|
2553
|
+
});
|
|
2554
|
+
}
|
|
2555
|
+
//#endregion
|
|
2556
|
+
//#region src/components/extended/RecognitionFallback/RecognitionFallback.tsx
|
|
2557
|
+
var Ot = {
|
|
2558
|
+
carried: "여기까지 들었습니다",
|
|
2559
|
+
lost: "듣지 못했습니다"
|
|
2560
|
+
};
|
|
2561
|
+
function kt({ reason: e, carried: t, detail: i, onRetry: a, onType: o, onDiscard: s, className: c, ...l }) {
|
|
2562
|
+
let u = e === "carried" ? t ?? "" : "";
|
|
2563
|
+
return /* @__PURE__ */ A("div", {
|
|
2564
|
+
...l,
|
|
2565
|
+
className: `recognition-fallback ${c ?? ""}`.trim(),
|
|
2566
|
+
"data-reason": e ?? void 0,
|
|
2567
|
+
role: "status",
|
|
2568
|
+
children: e === null ? null : /* @__PURE__ */ j("div", {
|
|
2569
|
+
className: "recognition-fallback__box",
|
|
2570
|
+
"data-part": "box",
|
|
2571
|
+
children: [
|
|
2572
|
+
/* @__PURE__ */ A("p", {
|
|
2573
|
+
className: "recognition-fallback__title",
|
|
2574
|
+
"data-part": "title",
|
|
2575
|
+
children: Ot[e]
|
|
2576
|
+
}),
|
|
2577
|
+
u ? /* @__PURE__ */ A("p", {
|
|
2578
|
+
className: "recognition-fallback__carried",
|
|
2579
|
+
"data-part": "carried",
|
|
2580
|
+
children: u
|
|
2581
|
+
}) : null,
|
|
2582
|
+
i ? /* @__PURE__ */ A("p", {
|
|
2583
|
+
className: "recognition-fallback__detail",
|
|
2584
|
+
"data-part": "detail",
|
|
2585
|
+
children: i
|
|
2586
|
+
}) : null,
|
|
2587
|
+
/* @__PURE__ */ j("div", {
|
|
2588
|
+
className: "recognition-fallback__actions",
|
|
2589
|
+
children: [
|
|
2590
|
+
/* @__PURE__ */ j(n, {
|
|
2591
|
+
variant: "solid",
|
|
2592
|
+
size: "sm",
|
|
2593
|
+
onClick: () => o(u),
|
|
2594
|
+
"data-part": "type",
|
|
2595
|
+
children: [/* @__PURE__ */ A(r, {
|
|
2596
|
+
icon: G,
|
|
2597
|
+
size: "sm",
|
|
2598
|
+
"aria-hidden": "true"
|
|
2599
|
+
}), u ? "이어서 입력하기" : "입력으로 하기"]
|
|
2600
|
+
}),
|
|
2601
|
+
a ? /* @__PURE__ */ j(n, {
|
|
2602
|
+
variant: "outline",
|
|
2603
|
+
size: "sm",
|
|
2604
|
+
tone: "neutral",
|
|
2605
|
+
onClick: a,
|
|
2606
|
+
"data-part": "retry",
|
|
2607
|
+
children: [/* @__PURE__ */ A(r, {
|
|
2608
|
+
icon: J,
|
|
2609
|
+
size: "sm",
|
|
2610
|
+
"aria-hidden": "true"
|
|
2611
|
+
}), "다시 말하기"]
|
|
2612
|
+
}) : null,
|
|
2613
|
+
u && s ? /* @__PURE__ */ j(n, {
|
|
2614
|
+
variant: "plain",
|
|
2615
|
+
size: "sm",
|
|
2616
|
+
tone: "neutral",
|
|
2617
|
+
onClick: s,
|
|
2618
|
+
"data-part": "discard",
|
|
2619
|
+
children: [/* @__PURE__ */ A(r, {
|
|
2620
|
+
icon: Ee,
|
|
2621
|
+
size: "sm",
|
|
2622
|
+
"aria-hidden": "true"
|
|
2623
|
+
}), "버리기"]
|
|
2624
|
+
}) : null
|
|
2625
|
+
]
|
|
2626
|
+
})
|
|
2627
|
+
]
|
|
2628
|
+
})
|
|
2629
|
+
});
|
|
2630
|
+
}
|
|
2631
|
+
//#endregion
|
|
2632
|
+
//#region src/components/extended/RunStatusCard/RunStatusCard.tsx
|
|
2633
|
+
var At = {
|
|
2634
|
+
queued: "대기 중",
|
|
2635
|
+
running: "실행 중",
|
|
2636
|
+
done: "완료",
|
|
2637
|
+
failed: "실패",
|
|
2638
|
+
cancelled: "취소됨"
|
|
2639
|
+
};
|
|
2640
|
+
function jt({ title: t, state: r, elapsed: a, progress: o, detail: c, onCancel: l, cancelLabel: u = "중지", actions: d, className: f, ...p }) {
|
|
2641
|
+
let m = r === "running" || r === "queued", h = P(), g = o ? r === "done" ? o.max : o.value : void 0, [y, b] = I({
|
|
2642
|
+
status: "",
|
|
2643
|
+
alert: ""
|
|
2644
|
+
}), x = F(r);
|
|
2645
|
+
N(() => {
|
|
2646
|
+
let e = x.current;
|
|
2647
|
+
if (x.current = r, r === "running" || r === "queued" || e === r) return;
|
|
2648
|
+
let n = `${t} ${At[r]}`;
|
|
2649
|
+
b(r === "failed" ? {
|
|
2650
|
+
status: "",
|
|
2651
|
+
alert: n
|
|
2652
|
+
} : {
|
|
2653
|
+
status: n,
|
|
2654
|
+
alert: ""
|
|
2655
|
+
});
|
|
2656
|
+
}, [r, t]);
|
|
2657
|
+
let S = F(null), C = F(m);
|
|
2658
|
+
return N(() => {
|
|
2659
|
+
let e = C.current && !m;
|
|
2660
|
+
C.current = m, !(!e || document.activeElement !== document.body) && S.current?.focus();
|
|
2661
|
+
}, [m]), /* @__PURE__ */ j("section", {
|
|
2662
|
+
...p,
|
|
2663
|
+
className: `run-status-card ${f ?? ""}`.trim(),
|
|
2664
|
+
"data-state": r,
|
|
2665
|
+
"aria-labelledby": h,
|
|
2666
|
+
children: [
|
|
2667
|
+
/* @__PURE__ */ j(i, {
|
|
2668
|
+
as: "p",
|
|
2669
|
+
children: [/* @__PURE__ */ A("span", {
|
|
2670
|
+
role: "status",
|
|
2671
|
+
"data-part": "live",
|
|
2672
|
+
children: y.status
|
|
2673
|
+
}), /* @__PURE__ */ A("span", {
|
|
2674
|
+
role: "alert",
|
|
2675
|
+
"data-part": "alert",
|
|
2676
|
+
children: y.alert
|
|
2677
|
+
})]
|
|
2678
|
+
}),
|
|
2679
|
+
/* @__PURE__ */ j("div", {
|
|
2680
|
+
className: "run-status-card__head",
|
|
2681
|
+
children: [
|
|
2682
|
+
/* @__PURE__ */ j("span", {
|
|
2683
|
+
className: "run-status-card__mark",
|
|
2684
|
+
"aria-hidden": "true",
|
|
2685
|
+
children: [m ? /* @__PURE__ */ A(e, { size: "sm" }) : null, /* @__PURE__ */ A(_, {
|
|
2686
|
+
icon: m ? void 0 : r === "done" ? R : r === "failed" ? Oe : H,
|
|
2687
|
+
tone: r === "done" ? "success" : r === "failed" ? "danger" : "neutral",
|
|
2688
|
+
size: "sm",
|
|
2689
|
+
"data-part": "glyph"
|
|
2690
|
+
})]
|
|
2691
|
+
}),
|
|
2692
|
+
/* @__PURE__ */ j("div", {
|
|
2693
|
+
className: "run-status-card__title",
|
|
2694
|
+
ref: S,
|
|
2695
|
+
tabIndex: -1,
|
|
2696
|
+
"data-part": "outcome",
|
|
2697
|
+
children: [/* @__PURE__ */ A("p", {
|
|
2698
|
+
className: "run-status-card__name",
|
|
2699
|
+
id: h,
|
|
2700
|
+
children: t
|
|
2701
|
+
}), /* @__PURE__ */ j("p", {
|
|
2702
|
+
className: "run-status-card__meta",
|
|
2703
|
+
children: [
|
|
2704
|
+
/* @__PURE__ */ A("span", {
|
|
2705
|
+
"data-part": "state",
|
|
2706
|
+
children: At[r]
|
|
2707
|
+
}),
|
|
2708
|
+
a ? /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("span", {
|
|
2709
|
+
"aria-hidden": "true",
|
|
2710
|
+
children: " · "
|
|
2711
|
+
}), /* @__PURE__ */ j("span", {
|
|
2712
|
+
"data-part": "elapsed",
|
|
2713
|
+
children: [a, " 경과"]
|
|
2714
|
+
})] }) : null,
|
|
2715
|
+
o ? /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("span", {
|
|
2716
|
+
"aria-hidden": "true",
|
|
2717
|
+
children: " · "
|
|
2718
|
+
}), /* @__PURE__ */ j("span", {
|
|
2719
|
+
"data-part": "count",
|
|
2720
|
+
children: [
|
|
2721
|
+
o.max,
|
|
2722
|
+
"개 중 ",
|
|
2723
|
+
g,
|
|
2724
|
+
"개"
|
|
2725
|
+
]
|
|
2726
|
+
})] }) : null
|
|
2727
|
+
]
|
|
2728
|
+
})]
|
|
2729
|
+
}),
|
|
2730
|
+
m && l ? /* @__PURE__ */ A(n, {
|
|
2731
|
+
variant: "outline",
|
|
2732
|
+
tone: "neutral",
|
|
2733
|
+
size: "sm",
|
|
2734
|
+
onClick: l,
|
|
2735
|
+
"data-part": "cancel",
|
|
2736
|
+
children: u
|
|
2737
|
+
}) : null
|
|
2738
|
+
]
|
|
2739
|
+
}),
|
|
2740
|
+
o ? /* @__PURE__ */ A(s, {
|
|
2741
|
+
value: g,
|
|
2742
|
+
max: o.max,
|
|
2743
|
+
label: o.label,
|
|
2744
|
+
size: "sm",
|
|
2745
|
+
tone: r === "failed" ? "danger" : "accent",
|
|
2746
|
+
"data-part": "progress"
|
|
2747
|
+
}) : null,
|
|
2748
|
+
c ? /* @__PURE__ */ A("p", {
|
|
2749
|
+
className: "run-status-card__detail",
|
|
2750
|
+
"data-part": "detail",
|
|
2751
|
+
children: m && typeof c == "string" ? /* @__PURE__ */ A(v, { value: c }) : c
|
|
2752
|
+
}) : null,
|
|
2753
|
+
d && !m ? /* @__PURE__ */ A("div", {
|
|
2754
|
+
className: "run-status-card__actions",
|
|
2755
|
+
children: d
|
|
2756
|
+
}) : null
|
|
2757
|
+
]
|
|
2758
|
+
});
|
|
2759
|
+
}
|
|
2760
|
+
//#endregion
|
|
2761
|
+
//#region src/components/extended/SavedViewTabs/SavedViewTabs.tsx
|
|
2762
|
+
function Mt({ views: e, value: t, onValueChange: n, label: i, panelId: a, menu: o, onAdd: s, addLabel: c = "보기 추가", className: l, ...u }) {
|
|
2763
|
+
let d = F(null), f = (e) => d.current?.querySelector(`[data-value="${CSS.escape(e)}"]`) ?? null;
|
|
2764
|
+
N(() => {
|
|
2765
|
+
f(t)?.scrollIntoView({
|
|
2766
|
+
block: "nearest",
|
|
2767
|
+
inline: "nearest"
|
|
2768
|
+
});
|
|
2769
|
+
}, [t]);
|
|
2770
|
+
let p = (e) => {
|
|
2771
|
+
e && (f(e.id)?.focus(), n(e.id));
|
|
2772
|
+
}, m = (t) => {
|
|
2773
|
+
let n = t.target.dataset.value;
|
|
2774
|
+
if (n === void 0) return;
|
|
2775
|
+
let r = e.findIndex((e) => e.id === n), i = {
|
|
2776
|
+
ArrowRight: 1,
|
|
2777
|
+
ArrowLeft: -1
|
|
2778
|
+
}[t.key];
|
|
2779
|
+
if (i !== void 0) {
|
|
2780
|
+
t.preventDefault(), p(e[(r + i + e.length) % e.length]);
|
|
2781
|
+
return;
|
|
2782
|
+
}
|
|
2783
|
+
t.key === "Home" && (t.preventDefault(), p(e[0])), t.key === "End" && (t.preventDefault(), p(e.at(-1)));
|
|
2784
|
+
}, h = e.some((e) => e.id === t);
|
|
2785
|
+
return /* @__PURE__ */ j("div", {
|
|
2786
|
+
className: `saved-view-tabs ${l ?? ""}`.trim(),
|
|
2787
|
+
...u,
|
|
2788
|
+
children: [/* @__PURE__ */ A("div", {
|
|
2789
|
+
ref: d,
|
|
2790
|
+
className: "saved-view-tabs__rail",
|
|
2791
|
+
role: "tablist",
|
|
2792
|
+
"aria-label": i,
|
|
2793
|
+
onKeyDown: m,
|
|
2794
|
+
"data-part": "rail",
|
|
2795
|
+
children: e.map((e, r) => {
|
|
2796
|
+
let i = e.id === t;
|
|
2797
|
+
return /* @__PURE__ */ j("div", {
|
|
2798
|
+
className: "saved-view-tabs__slot",
|
|
2799
|
+
role: "presentation",
|
|
2800
|
+
"data-active": i ? "" : void 0,
|
|
2801
|
+
children: [/* @__PURE__ */ j("button", {
|
|
2802
|
+
type: "button",
|
|
2803
|
+
role: "tab",
|
|
2804
|
+
className: "saved-view-tabs__tab",
|
|
2805
|
+
id: `${a}-tab-${e.id}`,
|
|
2806
|
+
"data-value": e.id,
|
|
2807
|
+
"aria-selected": i,
|
|
2808
|
+
"aria-controls": a,
|
|
2809
|
+
tabIndex: i || !h && r === 0 ? 0 : -1,
|
|
2810
|
+
onClick: () => n(e.id),
|
|
2811
|
+
"data-part": "tab",
|
|
2812
|
+
children: [
|
|
2813
|
+
e.label,
|
|
2814
|
+
e.count === void 0 ? null : /* @__PURE__ */ A("span", {
|
|
2815
|
+
className: "saved-view-tabs__count",
|
|
2816
|
+
children: e.count
|
|
2817
|
+
}),
|
|
2818
|
+
e.dirty ? /* @__PURE__ */ A("span", {
|
|
2819
|
+
className: "saved-view-tabs__dot",
|
|
2820
|
+
"data-part": "dirty",
|
|
2821
|
+
children: /* @__PURE__ */ A("span", {
|
|
2822
|
+
className: "saved-view-tabs__said",
|
|
2823
|
+
children: "저장하지 않은 변경"
|
|
2824
|
+
})
|
|
2825
|
+
}) : null
|
|
2826
|
+
]
|
|
2827
|
+
}), i && o ? /* @__PURE__ */ A("span", {
|
|
2828
|
+
className: "saved-view-tabs__menu",
|
|
2829
|
+
"data-part": "menu",
|
|
2830
|
+
children: o(e)
|
|
2831
|
+
}) : null]
|
|
2832
|
+
}, e.id);
|
|
2833
|
+
})
|
|
2834
|
+
}), s ? /* @__PURE__ */ j("button", {
|
|
2835
|
+
type: "button",
|
|
2836
|
+
className: "saved-view-tabs__add",
|
|
2837
|
+
onClick: s,
|
|
2838
|
+
"data-part": "add",
|
|
2839
|
+
children: [/* @__PURE__ */ A(r, {
|
|
2840
|
+
icon: q,
|
|
2841
|
+
size: "sm",
|
|
2842
|
+
"aria-hidden": "true"
|
|
2843
|
+
}), c]
|
|
2844
|
+
}) : null]
|
|
2845
|
+
});
|
|
2846
|
+
}
|
|
2847
|
+
//#endregion
|
|
2848
|
+
//#region src/components/extended/SourceChip/SourceChip.tsx
|
|
2849
|
+
function Nt({ title: e, domain: t, href: n, index: r, favicon: a, compact: o, size: s = "md", className: c, ...l }) {
|
|
2850
|
+
let [u, d] = I(), f = u !== void 0 && u === a, p = [...t.replace(/^www\./, "")][0]?.toUpperCase() ?? "?";
|
|
2851
|
+
return /* @__PURE__ */ j("a", {
|
|
2852
|
+
...l,
|
|
2853
|
+
className: `source-chip ${c ?? ""}`.trim(),
|
|
2854
|
+
"data-size": s,
|
|
2855
|
+
"data-compact": o ? "" : void 0,
|
|
2856
|
+
href: n,
|
|
2857
|
+
target: "_blank",
|
|
2858
|
+
rel: "noreferrer",
|
|
2859
|
+
children: [
|
|
2860
|
+
r === void 0 ? null : /* @__PURE__ */ A("span", {
|
|
2861
|
+
className: "source-chip__index",
|
|
2862
|
+
"aria-hidden": "true",
|
|
2863
|
+
children: r
|
|
2864
|
+
}),
|
|
2865
|
+
/* @__PURE__ */ A("span", {
|
|
2866
|
+
className: "source-chip__glyph",
|
|
2867
|
+
"aria-hidden": "true",
|
|
2868
|
+
children: a && !f ? /* @__PURE__ */ A("img", {
|
|
2869
|
+
className: "source-chip__favicon",
|
|
2870
|
+
src: a,
|
|
2871
|
+
alt: "",
|
|
2872
|
+
loading: "lazy",
|
|
2873
|
+
onError: () => d(a)
|
|
2874
|
+
}) : /* @__PURE__ */ A("span", {
|
|
2875
|
+
className: "source-chip__letter",
|
|
2876
|
+
children: p
|
|
2877
|
+
})
|
|
2878
|
+
}),
|
|
2879
|
+
/* @__PURE__ */ j("span", {
|
|
2880
|
+
className: "source-chip__text",
|
|
2881
|
+
children: [/* @__PURE__ */ A("span", {
|
|
2882
|
+
className: "source-chip__title",
|
|
2883
|
+
children: e
|
|
2884
|
+
}), o ? null : /* @__PURE__ */ A("span", {
|
|
2885
|
+
className: "source-chip__domain",
|
|
2886
|
+
children: t
|
|
2887
|
+
})]
|
|
2888
|
+
}),
|
|
2889
|
+
/* @__PURE__ */ j(i, { children: [
|
|
2890
|
+
r === void 0 ? " 출처 · " : ` 출처 ${r}번 · `,
|
|
2891
|
+
t,
|
|
2892
|
+
" · 새 창에서 열림"
|
|
2893
|
+
] })
|
|
2894
|
+
]
|
|
2895
|
+
});
|
|
2896
|
+
}
|
|
2897
|
+
//#endregion
|
|
2898
|
+
//#region src/components/extended/SourceChipRow/SourceChipRow.tsx
|
|
2899
|
+
var Pt = 12;
|
|
2900
|
+
function Ft({ sources: e, label: t, onOverflow: n, compact: r, size: i = "md", className: a, ...o }) {
|
|
2901
|
+
let s = F(null), [c, l] = I(e.length), u = M(() => {
|
|
2902
|
+
let e = s.current;
|
|
2903
|
+
if (!e) return;
|
|
2904
|
+
let t = [...e.querySelectorAll("[data-part=\"chip\"]")];
|
|
2905
|
+
if (!t.length) return;
|
|
2906
|
+
let n = e.clientWidth, r = e.querySelector("[data-part=\"more\"]"), i = Number.parseFloat(getComputedStyle(e).columnGap) || 0, a = 0, o = 0;
|
|
2907
|
+
for (let e of t) {
|
|
2908
|
+
let t = a + (o ? i : 0) + e.offsetWidth;
|
|
2909
|
+
if (t > n) break;
|
|
2910
|
+
a = t, o += 1;
|
|
2911
|
+
}
|
|
2912
|
+
if (o < t.length && r) for (; o > 0 && a + i + r.offsetWidth > n;) a -= t[o - 1].offsetWidth + (o > 1 ? i : 0), --o;
|
|
2913
|
+
let c = Math.min(o, 12);
|
|
2914
|
+
l((e) => e === c ? e : c);
|
|
2915
|
+
}, []), d = e.map((e) => [
|
|
2916
|
+
e.id,
|
|
2917
|
+
e.title,
|
|
2918
|
+
e.domain,
|
|
2919
|
+
e.index ?? "",
|
|
2920
|
+
e.favicon ?? ""
|
|
2921
|
+
].join("")).join("");
|
|
2922
|
+
ne(u, [
|
|
2923
|
+
u,
|
|
2924
|
+
d,
|
|
2925
|
+
r,
|
|
2926
|
+
i
|
|
2927
|
+
]), N(() => {
|
|
2928
|
+
let e = s.current;
|
|
2929
|
+
if (!e) return;
|
|
2930
|
+
let t = new ResizeObserver(u);
|
|
2931
|
+
return t.observe(e), () => t.disconnect();
|
|
2932
|
+
}, [u]);
|
|
2933
|
+
let f = Math.max(0, e.length - c);
|
|
2934
|
+
return /* @__PURE__ */ j("div", {
|
|
2935
|
+
...o,
|
|
2936
|
+
ref: s,
|
|
2937
|
+
className: `source-chip-row ${a ?? ""}`.trim(),
|
|
2938
|
+
role: "group",
|
|
2939
|
+
"aria-label": t,
|
|
2940
|
+
"data-visible": Math.min(c, 12),
|
|
2941
|
+
children: [e.map((e) => /* @__PURE__ */ A("span", {
|
|
2942
|
+
className: "source-chip-row__chip",
|
|
2943
|
+
"data-part": "chip",
|
|
2944
|
+
children: /* @__PURE__ */ A(Nt, {
|
|
2945
|
+
title: e.title,
|
|
2946
|
+
domain: e.domain,
|
|
2947
|
+
href: e.href,
|
|
2948
|
+
index: e.index,
|
|
2949
|
+
favicon: e.favicon,
|
|
2950
|
+
compact: r,
|
|
2951
|
+
size: i
|
|
2952
|
+
})
|
|
2953
|
+
}, e.id)), n ? /* @__PURE__ */ j("button", {
|
|
2954
|
+
type: "button",
|
|
2955
|
+
className: "source-chip-row__more",
|
|
2956
|
+
"data-part": "more",
|
|
2957
|
+
"data-hidden": f === 0 ? "" : void 0,
|
|
2958
|
+
"aria-hidden": f === 0 ? "true" : void 0,
|
|
2959
|
+
tabIndex: f === 0 ? -1 : void 0,
|
|
2960
|
+
onClick: n,
|
|
2961
|
+
children: [
|
|
2962
|
+
"+",
|
|
2963
|
+
f,
|
|
2964
|
+
/* @__PURE__ */ A("span", {
|
|
2965
|
+
className: "source-chip-row__more-name",
|
|
2966
|
+
children: "개 더"
|
|
2967
|
+
})
|
|
2968
|
+
]
|
|
2969
|
+
}) : /* @__PURE__ */ j("span", {
|
|
2970
|
+
className: "source-chip-row__more",
|
|
2971
|
+
"data-part": "more",
|
|
2972
|
+
"data-static": "",
|
|
2973
|
+
"data-hidden": f === 0 ? "" : void 0,
|
|
2974
|
+
"aria-hidden": f === 0 ? "true" : void 0,
|
|
2975
|
+
children: [
|
|
2976
|
+
"+",
|
|
2977
|
+
f,
|
|
2978
|
+
/* @__PURE__ */ A("span", {
|
|
2979
|
+
className: "source-chip-row__more-name",
|
|
2980
|
+
children: "개 더"
|
|
2981
|
+
})
|
|
2982
|
+
]
|
|
2983
|
+
})]
|
|
2984
|
+
});
|
|
2985
|
+
}
|
|
2986
|
+
//#endregion
|
|
2987
|
+
//#region src/components/extended/SourcePanel/SourcePanel.tsx
|
|
2988
|
+
function It(e) {
|
|
2989
|
+
return e.replace(/^www\./, "");
|
|
2990
|
+
}
|
|
2991
|
+
function Lt(e) {
|
|
2992
|
+
let t = [], n = /* @__PURE__ */ new Map();
|
|
2993
|
+
for (let r of e) {
|
|
2994
|
+
let e = It(r.domain);
|
|
2995
|
+
n.has(e) || (n.set(e, []), t.push(e)), n.get(e).push(r);
|
|
2996
|
+
}
|
|
2997
|
+
return t.map((e) => ({
|
|
2998
|
+
domain: e,
|
|
2999
|
+
items: n.get(e)
|
|
3000
|
+
}));
|
|
3001
|
+
}
|
|
3002
|
+
function Rt({ sources: e, label: t, found: n, group: r = !0, empty: i = "인용한 근거가 없습니다.", className: a, ...o }) {
|
|
3003
|
+
let [s, c] = I({}), l = Lt(e), u = P();
|
|
3004
|
+
return /* @__PURE__ */ j("section", {
|
|
3005
|
+
...o,
|
|
3006
|
+
className: `source-panel ${a ?? ""}`.trim(),
|
|
3007
|
+
"aria-labelledby": u,
|
|
3008
|
+
children: [/* @__PURE__ */ j("header", {
|
|
3009
|
+
className: "source-panel__head",
|
|
3010
|
+
children: [/* @__PURE__ */ A("h3", {
|
|
3011
|
+
className: "source-panel__title",
|
|
3012
|
+
id: u,
|
|
3013
|
+
children: t
|
|
3014
|
+
}), /* @__PURE__ */ j("p", {
|
|
3015
|
+
className: "source-panel__count",
|
|
3016
|
+
children: [n !== void 0 && n > e.length ? `${n}개 중 ${e.length}개 사용` : `${e.length}개`, r && l.length !== e.length ? ` · ${l.length}개 사이트` : ""]
|
|
3017
|
+
})]
|
|
3018
|
+
}), e.length === 0 ? /* @__PURE__ */ A("p", {
|
|
3019
|
+
className: "source-panel__empty",
|
|
3020
|
+
children: i
|
|
3021
|
+
}) : r ? /* @__PURE__ */ A("ul", {
|
|
3022
|
+
className: "source-panel__groups",
|
|
3023
|
+
children: l.map(({ domain: e, items: t }) => /* @__PURE__ */ j("li", {
|
|
3024
|
+
className: "source-panel__group",
|
|
3025
|
+
children: [/* @__PURE__ */ j("p", {
|
|
3026
|
+
className: "source-panel__domain",
|
|
3027
|
+
children: [
|
|
3028
|
+
/* @__PURE__ */ A("span", {
|
|
3029
|
+
className: "source-panel__glyph",
|
|
3030
|
+
"aria-hidden": "true",
|
|
3031
|
+
children: t.find((e) => e.favicon)?.favicon && !s[e] ? /* @__PURE__ */ A("img", {
|
|
3032
|
+
src: t.find((e) => e.favicon).favicon,
|
|
3033
|
+
alt: "",
|
|
3034
|
+
loading: "lazy",
|
|
3035
|
+
onError: () => c((t) => ({
|
|
3036
|
+
...t,
|
|
3037
|
+
[e]: !0
|
|
3038
|
+
}))
|
|
3039
|
+
}) : /* @__PURE__ */ A("span", {
|
|
3040
|
+
className: "source-panel__letter",
|
|
3041
|
+
children: [...e][0]?.toUpperCase() ?? "?"
|
|
3042
|
+
})
|
|
3043
|
+
}),
|
|
3044
|
+
e,
|
|
3045
|
+
t.length > 1 ? /* @__PURE__ */ j("span", {
|
|
3046
|
+
className: "source-panel__more",
|
|
3047
|
+
children: [t.length, "건"]
|
|
3048
|
+
}) : null
|
|
3049
|
+
]
|
|
3050
|
+
}), /* @__PURE__ */ A("ul", {
|
|
3051
|
+
className: "source-panel__items",
|
|
3052
|
+
children: t.map((t) => /* @__PURE__ */ j("li", {
|
|
3053
|
+
className: "source-panel__item",
|
|
3054
|
+
"data-part": "source",
|
|
3055
|
+
children: [/* @__PURE__ */ A("span", {
|
|
3056
|
+
className: "source-panel__index",
|
|
3057
|
+
"aria-hidden": "true",
|
|
3058
|
+
children: t.index
|
|
3059
|
+
}), /* @__PURE__ */ j("span", {
|
|
3060
|
+
className: "source-panel__body",
|
|
3061
|
+
children: [/* @__PURE__ */ j("a", {
|
|
3062
|
+
className: "source-panel__link",
|
|
3063
|
+
href: t.href,
|
|
3064
|
+
target: "_blank",
|
|
3065
|
+
rel: "noreferrer",
|
|
3066
|
+
children: [t.title, /* @__PURE__ */ j("span", {
|
|
3067
|
+
className: "source-panel__note",
|
|
3068
|
+
children: [
|
|
3069
|
+
" · 출처 ",
|
|
3070
|
+
t.index,
|
|
3071
|
+
"번, ",
|
|
3072
|
+
e,
|
|
3073
|
+
", 새 창에서 열림"
|
|
3074
|
+
]
|
|
3075
|
+
})]
|
|
3076
|
+
}), t.snippet ? /* @__PURE__ */ A("span", {
|
|
3077
|
+
className: "source-panel__snippet",
|
|
3078
|
+
children: t.snippet
|
|
3079
|
+
}) : null]
|
|
3080
|
+
})]
|
|
3081
|
+
}, t.id))
|
|
3082
|
+
})]
|
|
3083
|
+
}, e))
|
|
3084
|
+
}) : /* @__PURE__ */ A("ul", {
|
|
3085
|
+
className: "source-panel__items source-panel__items--flat",
|
|
3086
|
+
children: e.map((e) => /* @__PURE__ */ j("li", {
|
|
3087
|
+
className: "source-panel__item",
|
|
3088
|
+
"data-part": "source",
|
|
3089
|
+
children: [/* @__PURE__ */ A("span", {
|
|
3090
|
+
className: "source-panel__index",
|
|
3091
|
+
"aria-hidden": "true",
|
|
3092
|
+
children: e.index
|
|
3093
|
+
}), /* @__PURE__ */ j("span", {
|
|
3094
|
+
className: "source-panel__body",
|
|
3095
|
+
children: [
|
|
3096
|
+
/* @__PURE__ */ j("a", {
|
|
3097
|
+
className: "source-panel__link",
|
|
3098
|
+
href: e.href,
|
|
3099
|
+
target: "_blank",
|
|
3100
|
+
rel: "noreferrer",
|
|
3101
|
+
children: [e.title, /* @__PURE__ */ j("span", {
|
|
3102
|
+
className: "source-panel__note",
|
|
3103
|
+
children: [
|
|
3104
|
+
" · 출처 ",
|
|
3105
|
+
e.index,
|
|
3106
|
+
"번, ",
|
|
3107
|
+
e.domain,
|
|
3108
|
+
", 새 창에서 열림"
|
|
3109
|
+
]
|
|
3110
|
+
})]
|
|
3111
|
+
}),
|
|
3112
|
+
/* @__PURE__ */ A("span", {
|
|
3113
|
+
className: "source-panel__where",
|
|
3114
|
+
children: e.domain
|
|
3115
|
+
}),
|
|
3116
|
+
e.snippet ? /* @__PURE__ */ A("span", {
|
|
3117
|
+
className: "source-panel__snippet",
|
|
3118
|
+
children: e.snippet
|
|
3119
|
+
}) : null
|
|
3120
|
+
]
|
|
3121
|
+
})]
|
|
3122
|
+
}, e.id))
|
|
3123
|
+
})]
|
|
3124
|
+
});
|
|
3125
|
+
}
|
|
3126
|
+
//#endregion
|
|
3127
|
+
//#region src/components/extended/StreamingText/StreamingText.tsx
|
|
3128
|
+
function zt({ text: e, done: t, placeholder: n, caret: r = !0, className: i, ...a }) {
|
|
3129
|
+
return /* @__PURE__ */ j("p", {
|
|
3130
|
+
...a,
|
|
3131
|
+
className: `streaming-text ${i ?? ""}`.trim(),
|
|
3132
|
+
"data-state": t ? "done" : "streaming",
|
|
3133
|
+
"aria-busy": !t || void 0,
|
|
3134
|
+
children: [
|
|
3135
|
+
e,
|
|
3136
|
+
!e && !t && n ? /* @__PURE__ */ A("span", {
|
|
3137
|
+
className: "streaming-text__placeholder",
|
|
3138
|
+
children: n
|
|
3139
|
+
}) : null,
|
|
3140
|
+
!t && r ? /* @__PURE__ */ A("span", {
|
|
3141
|
+
className: "streaming-text__caret",
|
|
3142
|
+
"aria-hidden": "true",
|
|
3143
|
+
"data-part": "caret"
|
|
3144
|
+
}) : null
|
|
3145
|
+
]
|
|
3146
|
+
});
|
|
3147
|
+
}
|
|
3148
|
+
//#endregion
|
|
3149
|
+
//#region src/components/extended/ToolCallCard/ToolCallCard.tsx
|
|
3150
|
+
var Bt = {
|
|
3151
|
+
pending: "대기 중",
|
|
3152
|
+
running: "실행 중",
|
|
3153
|
+
success: "성공",
|
|
3154
|
+
error: "실패"
|
|
3155
|
+
};
|
|
3156
|
+
function Vt({ name: t, state: n, args: i, result: a, error: o, duration: s, summary: c, actions: l, defaultOpen: u, open: d, onOpenChange: f, className: p, ...m }) {
|
|
3157
|
+
let h = (e) => e != null && e !== !1, g = h(c) || h(i) || h(a) || h(o) || h(l), _ = /* @__PURE__ */ j("span", {
|
|
3158
|
+
className: "tool-call-card__head",
|
|
3159
|
+
children: [
|
|
3160
|
+
/* @__PURE__ */ A("span", {
|
|
3161
|
+
className: "tool-call-card__mark",
|
|
3162
|
+
"aria-hidden": "true",
|
|
3163
|
+
children: n === "running" ? /* @__PURE__ */ A(e, { size: "sm" }) : n === "success" ? /* @__PURE__ */ A(r, {
|
|
3164
|
+
icon: R,
|
|
3165
|
+
size: "xs"
|
|
3166
|
+
}) : n === "error" ? /* @__PURE__ */ A(r, {
|
|
3167
|
+
icon: L,
|
|
3168
|
+
size: "xs"
|
|
3169
|
+
}) : /* @__PURE__ */ A(r, {
|
|
3170
|
+
icon: Ce,
|
|
3171
|
+
size: "xs"
|
|
3172
|
+
})
|
|
3173
|
+
}),
|
|
3174
|
+
/* @__PURE__ */ A("span", {
|
|
3175
|
+
className: "tool-call-card__name",
|
|
3176
|
+
children: t
|
|
3177
|
+
}),
|
|
3178
|
+
/* @__PURE__ */ A("span", {
|
|
3179
|
+
className: "tool-call-card__state",
|
|
3180
|
+
children: Bt[n]
|
|
3181
|
+
}),
|
|
3182
|
+
s ? /* @__PURE__ */ A("span", {
|
|
3183
|
+
className: "tool-call-card__duration",
|
|
3184
|
+
children: s
|
|
3185
|
+
}) : null
|
|
3186
|
+
]
|
|
3187
|
+
}), v = /* @__PURE__ */ j("div", {
|
|
3188
|
+
className: "tool-call-card__body",
|
|
3189
|
+
children: [
|
|
3190
|
+
h(c) ? /* @__PURE__ */ A("p", {
|
|
3191
|
+
className: "tool-call-card__summary",
|
|
3192
|
+
children: c
|
|
3193
|
+
}) : null,
|
|
3194
|
+
h(i) ? /* @__PURE__ */ j("div", {
|
|
3195
|
+
className: "tool-call-card__part",
|
|
3196
|
+
children: [/* @__PURE__ */ A("p", {
|
|
3197
|
+
className: "tool-call-card__caption",
|
|
3198
|
+
children: "인자"
|
|
3199
|
+
}), /* @__PURE__ */ A("pre", {
|
|
3200
|
+
className: "tool-call-card__code",
|
|
3201
|
+
"data-part": "args",
|
|
3202
|
+
children: i
|
|
3203
|
+
})]
|
|
3204
|
+
}) : null,
|
|
3205
|
+
h(o) ? /* @__PURE__ */ j("div", {
|
|
3206
|
+
className: "tool-call-card__part",
|
|
3207
|
+
children: [/* @__PURE__ */ A("p", {
|
|
3208
|
+
className: "tool-call-card__caption",
|
|
3209
|
+
children: "오류"
|
|
3210
|
+
}), /* @__PURE__ */ A("pre", {
|
|
3211
|
+
className: "tool-call-card__code",
|
|
3212
|
+
"data-part": "error",
|
|
3213
|
+
"data-tone": "danger",
|
|
3214
|
+
children: o
|
|
3215
|
+
})]
|
|
3216
|
+
}) : null,
|
|
3217
|
+
h(a) ? /* @__PURE__ */ j("div", {
|
|
3218
|
+
className: "tool-call-card__part",
|
|
3219
|
+
children: [/* @__PURE__ */ A("p", {
|
|
3220
|
+
className: "tool-call-card__caption",
|
|
3221
|
+
children: "결과"
|
|
3222
|
+
}), /* @__PURE__ */ A("div", {
|
|
3223
|
+
className: "tool-call-card__result",
|
|
3224
|
+
"data-part": "result",
|
|
3225
|
+
children: a
|
|
3226
|
+
})]
|
|
3227
|
+
}) : null,
|
|
3228
|
+
h(l) ? /* @__PURE__ */ A("div", {
|
|
3229
|
+
className: "tool-call-card__actions",
|
|
3230
|
+
children: l
|
|
3231
|
+
}) : null
|
|
3232
|
+
]
|
|
3233
|
+
});
|
|
3234
|
+
return g ? /* @__PURE__ */ A(C, {
|
|
3235
|
+
...m,
|
|
3236
|
+
className: `tool-call-card ${p ?? ""}`.trim(),
|
|
3237
|
+
"data-state": n,
|
|
3238
|
+
defaultOpen: u ?? n === "error",
|
|
3239
|
+
open: d,
|
|
3240
|
+
onOpenChange: f,
|
|
3241
|
+
summary: _,
|
|
3242
|
+
children: v
|
|
3243
|
+
}) : /* @__PURE__ */ A("div", {
|
|
3244
|
+
...m,
|
|
3245
|
+
className: `tool-call-card tool-call-card--flat ${p ?? ""}`.trim(),
|
|
3246
|
+
"data-state": n,
|
|
3247
|
+
children: _
|
|
3248
|
+
});
|
|
3249
|
+
}
|
|
3250
|
+
//#endregion
|
|
3251
|
+
//#region src/components/extended/TranscriptSync/TranscriptSync.tsx
|
|
3252
|
+
function Ht({ segments: e, currentTime: t, onSeek: i, label: a, loading: o, empty: s, error: c, className: l, ...u }) {
|
|
3253
|
+
let d = F(null), [f, p] = I(!0), h = F(-1), g = e.findIndex((e) => e.start !== void 0 && e.end !== void 0 && t >= e.start && t < e.end);
|
|
3254
|
+
return N(() => {
|
|
3255
|
+
g < 0 || (h.current = g, f && (d.current?.querySelector(`[data-index="${g}"]`))?.scrollIntoView({
|
|
3256
|
+
block: "nearest",
|
|
3257
|
+
behavior: "auto"
|
|
3258
|
+
}));
|
|
3259
|
+
}, [g, f]), /* @__PURE__ */ j("section", {
|
|
3260
|
+
...u,
|
|
3261
|
+
className: `transcript-sync ${l ?? ""}`.trim(),
|
|
3262
|
+
"aria-label": a,
|
|
3263
|
+
"aria-busy": o || void 0,
|
|
3264
|
+
children: [c ? /* @__PURE__ */ A("p", {
|
|
3265
|
+
className: "transcript-sync__state",
|
|
3266
|
+
role: "alert",
|
|
3267
|
+
"data-part": "error",
|
|
3268
|
+
children: c
|
|
3269
|
+
}) : o ? /* @__PURE__ */ A("div", {
|
|
3270
|
+
className: "transcript-sync__waiting",
|
|
3271
|
+
"data-part": "waiting",
|
|
3272
|
+
children: Array.from({ length: 3 }, (e, t) => /* @__PURE__ */ j("div", {
|
|
3273
|
+
className: "transcript-sync__waiting-turn",
|
|
3274
|
+
children: [/* @__PURE__ */ A(m, {
|
|
3275
|
+
shape: "text",
|
|
3276
|
+
lines: 1
|
|
3277
|
+
}), /* @__PURE__ */ A(m, {
|
|
3278
|
+
shape: "text",
|
|
3279
|
+
lines: 2
|
|
3280
|
+
})]
|
|
3281
|
+
}, t))
|
|
3282
|
+
}) : e.length === 0 ? /* @__PURE__ */ A("p", {
|
|
3283
|
+
className: "transcript-sync__state",
|
|
3284
|
+
"data-part": "empty",
|
|
3285
|
+
children: s ?? "아직 기록이 없습니다"
|
|
3286
|
+
}) : /* @__PURE__ */ A("ol", {
|
|
3287
|
+
className: "transcript-sync__list",
|
|
3288
|
+
ref: d,
|
|
3289
|
+
"data-part": "list",
|
|
3290
|
+
onScroll: (e) => {
|
|
3291
|
+
let t = g >= 0 ? g : h.current;
|
|
3292
|
+
if (t < 0) {
|
|
3293
|
+
p(!1);
|
|
3294
|
+
return;
|
|
3295
|
+
}
|
|
3296
|
+
let n = e.currentTarget.querySelector(`[data-index="${t}"]`);
|
|
3297
|
+
if (!n) return;
|
|
3298
|
+
let r = e.currentTarget.getBoundingClientRect(), i = n.getBoundingClientRect();
|
|
3299
|
+
i.bottom > r.top && i.top < r.bottom || p(!1);
|
|
3300
|
+
},
|
|
3301
|
+
children: e.map((t, n) => {
|
|
3302
|
+
let r = t.start !== void 0, a = t.speaker && t.speaker !== e[n - 1]?.speaker;
|
|
3303
|
+
return /* @__PURE__ */ j("li", {
|
|
3304
|
+
className: "transcript-sync__turn",
|
|
3305
|
+
"data-index": n,
|
|
3306
|
+
"data-current": n === g ? "" : void 0,
|
|
3307
|
+
"data-part": "turn",
|
|
3308
|
+
"data-segment": t.id,
|
|
3309
|
+
"aria-current": n === g ? "true" : void 0,
|
|
3310
|
+
children: [a ? /* @__PURE__ */ A("p", {
|
|
3311
|
+
className: "transcript-sync__speaker",
|
|
3312
|
+
children: t.speaker
|
|
3313
|
+
}) : null, r && i ? /* @__PURE__ */ A("button", {
|
|
3314
|
+
type: "button",
|
|
3315
|
+
className: "transcript-sync__text",
|
|
3316
|
+
onClick: () => i(t.start),
|
|
3317
|
+
"data-part": "seek",
|
|
3318
|
+
children: t.text
|
|
3319
|
+
}) : /* @__PURE__ */ A("p", {
|
|
3320
|
+
className: "transcript-sync__text",
|
|
3321
|
+
"data-untimed": r ? void 0 : "",
|
|
3322
|
+
children: t.text
|
|
3323
|
+
})]
|
|
3324
|
+
}, t.id);
|
|
3325
|
+
})
|
|
3326
|
+
}), !f && !c && !o && e.length > 0 ? /* @__PURE__ */ j(n, {
|
|
3327
|
+
variant: "soft",
|
|
3328
|
+
size: "sm",
|
|
3329
|
+
className: "transcript-sync__follow",
|
|
3330
|
+
onClick: () => p(!0),
|
|
3331
|
+
"data-part": "follow",
|
|
3332
|
+
children: [/* @__PURE__ */ A(r, {
|
|
3333
|
+
icon: oe,
|
|
3334
|
+
size: "sm",
|
|
3335
|
+
"aria-hidden": "true"
|
|
3336
|
+
}), "지금 말하는 곳으로"]
|
|
3337
|
+
}) : null]
|
|
3338
|
+
});
|
|
3339
|
+
}
|
|
3340
|
+
//#endregion
|
|
3341
|
+
//#region src/components/extended/TrustBlock/TrustBlock.tsx
|
|
3342
|
+
function Ut({ points: e, label: t, layout: n = "stack", size: i = "md", align: a = "start", className: o, ...s }) {
|
|
3343
|
+
return /* @__PURE__ */ A("ul", {
|
|
3344
|
+
...s,
|
|
3345
|
+
className: `trust-block ${o ?? ""}`.trim(),
|
|
3346
|
+
"data-layout": n,
|
|
3347
|
+
"data-size": i,
|
|
3348
|
+
"data-align": a,
|
|
3349
|
+
"aria-label": t,
|
|
3350
|
+
children: e.map((e) => /* @__PURE__ */ j("li", {
|
|
3351
|
+
className: "trust-block__point",
|
|
3352
|
+
"data-part": "point",
|
|
3353
|
+
children: [/* @__PURE__ */ A(r, {
|
|
3354
|
+
icon: e.icon,
|
|
3355
|
+
size: i === "sm" ? "sm" : "md",
|
|
3356
|
+
tone: "muted",
|
|
3357
|
+
"aria-hidden": "true"
|
|
3358
|
+
}), /* @__PURE__ */ j("div", {
|
|
3359
|
+
className: "trust-block__text",
|
|
3360
|
+
children: [/* @__PURE__ */ A("p", {
|
|
3361
|
+
className: "trust-block__title",
|
|
3362
|
+
children: e.title
|
|
3363
|
+
}), e.body ? /* @__PURE__ */ A("p", {
|
|
3364
|
+
className: "trust-block__body",
|
|
3365
|
+
children: e.body
|
|
3366
|
+
}) : null]
|
|
3367
|
+
})]
|
|
3368
|
+
}, e.id))
|
|
3369
|
+
});
|
|
3370
|
+
}
|
|
3371
|
+
//#endregion
|
|
3372
|
+
//#region src/components/extended/VoiceControlBar/VoiceControlBar.tsx
|
|
3373
|
+
function Wt({ label: e, state: i, levels: a, elapsed: o, muted: s, onMuteChange: c, onEnd: l, device: u, deviceProblem: d, placement: p = "inline", children: m, className: h, ...g }) {
|
|
3374
|
+
return /* @__PURE__ */ j("div", {
|
|
3375
|
+
...g,
|
|
3376
|
+
className: `voice-control-bar ${h ?? ""}`.trim(),
|
|
3377
|
+
"data-placement": p,
|
|
3378
|
+
role: "group",
|
|
3379
|
+
"aria-label": e,
|
|
3380
|
+
children: [
|
|
3381
|
+
/* @__PURE__ */ j("div", {
|
|
3382
|
+
className: "voice-control-bar__meter",
|
|
3383
|
+
children: [/* @__PURE__ */ A(f, {
|
|
3384
|
+
state: s ? "idle" : i,
|
|
3385
|
+
levels: s ? void 0 : a,
|
|
3386
|
+
label: e,
|
|
3387
|
+
elapsed: s ? void 0 : o,
|
|
3388
|
+
size: p === "full" ? "lg" : "md",
|
|
3389
|
+
"data-part": "meter"
|
|
3390
|
+
}), s ? /* @__PURE__ */ j("p", {
|
|
3391
|
+
className: "voice-control-bar__muted",
|
|
3392
|
+
"data-part": "muted",
|
|
3393
|
+
children: ["음소거 중", o ? /* @__PURE__ */ A("span", {
|
|
3394
|
+
className: "voice-control-bar__elapsed",
|
|
3395
|
+
children: o
|
|
3396
|
+
}) : null]
|
|
3397
|
+
}) : null]
|
|
3398
|
+
}),
|
|
3399
|
+
u || d ? /* @__PURE__ */ j("p", {
|
|
3400
|
+
className: "voice-control-bar__device",
|
|
3401
|
+
"data-part": "device",
|
|
3402
|
+
children: [d ? /* @__PURE__ */ A("span", {
|
|
3403
|
+
className: "voice-control-bar__problem",
|
|
3404
|
+
role: "alert",
|
|
3405
|
+
"data-part": "problem",
|
|
3406
|
+
children: d
|
|
3407
|
+
}) : null, u ? /* @__PURE__ */ A("span", {
|
|
3408
|
+
className: "voice-control-bar__name",
|
|
3409
|
+
"data-part": "name",
|
|
3410
|
+
children: u
|
|
3411
|
+
}) : null]
|
|
3412
|
+
}) : null,
|
|
3413
|
+
/* @__PURE__ */ j("div", {
|
|
3414
|
+
className: "voice-control-bar__controls",
|
|
3415
|
+
children: [
|
|
3416
|
+
m,
|
|
3417
|
+
c ? /* @__PURE__ */ A(t, {
|
|
3418
|
+
icon: s ? K : me,
|
|
3419
|
+
label: "마이크 음소거",
|
|
3420
|
+
variant: s ? "solid" : "outline",
|
|
3421
|
+
tone: s ? "danger" : "neutral",
|
|
3422
|
+
size: p === "full" ? "lg" : "md",
|
|
3423
|
+
"aria-pressed": s,
|
|
3424
|
+
onClick: () => c(!s),
|
|
3425
|
+
"data-part": "mute"
|
|
3426
|
+
}) : null,
|
|
3427
|
+
/* @__PURE__ */ j(n, {
|
|
3428
|
+
variant: "solid",
|
|
3429
|
+
tone: "danger",
|
|
3430
|
+
size: p === "full" ? "lg" : "md",
|
|
3431
|
+
onClick: l,
|
|
3432
|
+
"data-part": "end",
|
|
3433
|
+
children: [/* @__PURE__ */ A(r, {
|
|
3434
|
+
icon: ge,
|
|
3435
|
+
size: "sm",
|
|
3436
|
+
"aria-hidden": "true"
|
|
3437
|
+
}), "통화 끝내기"]
|
|
3438
|
+
})
|
|
3439
|
+
]
|
|
3440
|
+
})
|
|
3441
|
+
]
|
|
3442
|
+
});
|
|
3443
|
+
}
|
|
3444
|
+
//#endregion
|
|
3445
|
+
export { it as A, ht as C, Z as D, ct as E, Be as F, ze as I, Re as L, Ke as M, Ge as N, st as O, Ue as P, Ne as R, gt as S, lt as T, Ct as _, zt as a, $ as b, Ft as c, jt as d, kt as f, wt as g, Tt as h, Vt as i, et as j, at as k, Nt as l, Et as m, Ut as n, Rt as o, Dt as p, Ht as r, Pt as s, Wt as t, Mt as u, St as v, pt as w, yt as x, xt as y, Ae as z };
|
|
3446
|
+
|
|
3447
|
+
//# sourceMappingURL=VoiceControlBar-CWDLR71w.js.map
|