@unicom-cloud/ui 0.8.111 → 0.8.113
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/Affix.js +3 -3
- package/Alert.js +1 -1
- package/AutoComplete.js +1 -1
- package/BackTop.js +1 -1
- package/Badge.js +1 -1
- package/Breadcrumb.js +2 -2
- package/Button.js +1 -1
- package/Calendar.js +1 -1
- package/Card.js +1 -1
- package/Carousel.js +2 -2
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/ColorPicker.js +1 -1
- package/Comment.js +1 -1
- package/ConfigProvider.js +1 -1
- package/Copy.js +3 -47
- package/Countdown.js +9 -43
- package/DatePicker.js +1 -1
- package/Descriptions.js +1 -1
- package/Details.js +7 -43
- package/Development.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Dropdown.js +1 -1
- package/Empty.js +1 -1
- package/Flex.js +8 -44
- package/Form.js +1 -1
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/InputNumber.js +1 -1
- package/Layout.js +1 -1
- package/Link.js +1 -1
- package/LiquidFill.js +9 -44
- package/List.js +1 -1
- package/Loading.js +7 -43
- package/Marquee.js +10 -33
- package/Mentions.js +1 -1
- package/Menu.js +1 -1
- package/Message.js +1 -1
- package/Modal.js +1 -1
- package/Notice.js +6 -42
- package/Notification.js +1 -1
- package/OverflowEllipsis.js +2 -2
- package/PageHeader.js +2 -2
- package/Popconfirm.js +1 -1
- package/Popover.js +1 -1
- package/Progress.js +1 -1
- package/QrCode.js +7 -44
- package/Radio.js +1 -1
- package/Rate.js +1 -1
- package/ResizeBox.js +1 -1
- package/Result.js +1 -1
- package/RichText.js +12 -13
- package/Segmented.js +8 -43
- package/Skeleton.js +1 -1
- package/Slider.js +1 -1
- package/Space.js +8 -44
- package/Spin.js +1 -1
- package/Statistic.js +1 -1
- package/Steps.js +1 -1
- package/Switch.js +1 -1
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +1 -1
- package/Tooltip.js +1 -1
- package/Tour.js +10 -46
- package/Transfer.js +1 -1
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +2 -2
- package/affix/index.js +3 -3
- package/alert/index.js +1 -1
- package/anchor/Anchor.js +2 -2
- package/anchor/Link.js +1 -1
- package/app/App.js +2 -2
- package/auto-complete/index.js +1 -1
- package/avatar/Avatar.js +1 -1
- package/avatar/Group.js +1 -1
- package/back-top/index.js +1 -1
- package/badge/index.js +1 -1
- package/breadcrumb/index.js +2 -2
- package/button/Group.js +1 -1
- package/button/index.js +1 -1
- package/calendar/index.js +2 -2
- package/card/Grid.js +1 -1
- package/card/Meta.js +1 -1
- package/card/index.js +1 -1
- package/carousel/Arrow.js +1 -1
- package/carousel/Indicator.js +1 -1
- package/carousel/index.js +2 -2
- package/cascader/Cascader.js +3 -3
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +2 -2
- package/checkbox/Group.js +2 -2
- package/checkbox/GroupBlock.js +2 -2
- package/checkbox/index.js +2 -2
- package/chunk/{Y_GQsZUt.js → 3t4FwEoB.js} +1 -1
- package/chunk/{Lyh0cz3R.js → BHAu6wbC.js} +1 -1
- package/chunk/{CgN4U7Ou.js → Bcl7dWlJ.js} +2 -2
- package/chunk/Bl3hZtxi.js +51 -0
- package/chunk/{n1tirBXA.js → Bzx5BueA.js} +4 -4
- package/chunk/CAA93JLq.js +6 -0
- package/chunk/{B8W1N4er.js → CHQ8c547.js} +11 -10
- package/chunk/CVMFAeSw.js +39 -0
- package/chunk/{BcEZk8pT.js → CYDaUML7.js} +73 -104
- package/chunk/{Dbw0YUY1.js → CbXCgtzv.js} +48 -82
- package/chunk/{BDgzrqDN.js → ClNkxEcR.js} +5 -5
- package/chunk/{BlflTd2i.js → CwLSam2p.js} +433 -470
- package/chunk/Cy26_CKq.js +33 -0
- package/chunk/D0dVE1v1.js +1839 -0
- package/chunk/{CFyN9Eio.js → DA5AMZwY.js} +4 -4
- package/chunk/{DSqW_efI.js → DB0hUIM1.js} +152 -156
- package/chunk/{BUNoUPLs.js → De8RLlOK.js} +1 -1
- package/chunk/{qsVvkBLU.js → DrYaod6k.js} +1 -1
- package/chunk/{BeHcDey_.js → DzlfiVe2.js} +1 -1
- package/chunk/gJsdBcpG.js +10 -0
- package/chunk/{BnUWOu3_.js → yWKJUe_w.js} +3 -3
- package/collapse/Collapse.js +1 -1
- package/collapse/Item.js +1 -1
- package/color-picker/ControlBar.js +1 -1
- package/color-picker/InputAlpha.js +1 -1
- package/color-picker/InputHex.js +1 -1
- package/color-picker/InputRgb.js +1 -1
- package/color-picker/Palette.js +1 -1
- package/color-picker/Panel.js +2 -2
- package/color-picker/index.js +1 -1
- package/comment/index.js +1 -1
- package/config-provider/ConfigProvider.js +1 -1
- package/config-provider/context.js +1 -1
- package/config-provider/index.js +2 -2
- package/copy/index.js +22 -66
- package/countdown/index.js +34 -68
- package/date-picker/Picker.js +1 -1
- package/date-picker/RangePicker.js +2 -2
- package/date-picker/index.js +1 -1
- package/descriptions/index.js +1 -1
- package/details/index.js +39 -75
- package/development/index.js +1 -1
- package/divider/index.js +1 -1
- package/draggable/index.js +1 -1
- package/drawer/Drawer.js +1 -1
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +1 -1
- package/empty/index.js +1 -1
- package/flex/index.js +30 -64
- package/form/Form.js +2 -2
- package/form/FormItem.js +1 -1
- package/form/index.js +1 -1
- package/grid/Grid.js +1 -1
- package/grid/Item.js +1 -1
- package/hooks/index.js +81 -81
- package/hooks/useId.js +1 -1
- package/hooks/useIsomorphicLayoutEffect.js +1 -1
- package/hooks/useResizeObserver.js +15 -2
- package/hooks/useStateWithPromise.js +1 -1
- package/hooks/useWindowSize.js +1 -1
- package/icon/index.js +1 -1
- package/icon-hover/index.js +1 -1
- package/icons/file.js +1 -1
- package/image/Image.js +2 -2
- package/image/ImagePreview.js +10 -45
- package/image/ImagePreviewArrow.js +1 -1
- package/image/ImagePreviewGroup.js +1 -1
- package/image/index.js +1 -1
- package/index.js +215 -215
- package/input/Button.js +1 -1
- package/input/Group.js +1 -1
- package/input/Input.js +2 -2
- package/input/InputElement.js +2 -2
- package/input/Password.js +1 -1
- package/input/Search.js +1 -1
- package/input/Textarea.js +2 -2
- package/input-number/index.js +1 -1
- package/input-number/useSelectionRange.js +1 -1
- package/input-tag/InputTag.js +1 -1
- package/layout/Content.js +1 -1
- package/layout/Footer.js +1 -1
- package/layout/Header.js +1 -1
- package/layout/Sider.js +1 -1
- package/layout/index.js +1 -1
- package/link/index.js +1 -1
- package/liquid-fill/index.js +49 -84
- package/list/Item.js +1 -1
- package/list/Meta.js +1 -1
- package/list/index.js +1 -1
- package/loading/index.js +19 -55
- package/marquee/index.js +58 -81
- package/marquee-/index.js +60 -83
- package/mentions/index.js +1 -1
- package/menu/Menu.js +3 -3
- package/menu/OverflowWrap.js +2 -2
- package/menu/index.js +2 -2
- package/message/index.js +1 -1
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +2 -2
- package/modal/index.js +2 -2
- package/notice/index.js +6 -42
- package/notification/index.js +1 -1
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +2 -2
- package/overflow-ellipsis/index.js +2 -2
- package/package.json +1 -1
- package/page-header/index.js +2 -2
- package/pagination/PageItem.js +1 -1
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +1 -1
- package/pagination/Pagination.js +1 -1
- package/picker/Input.js +1 -1
- package/picker/InputRange.js +1 -1
- package/popconfirm/index.js +1 -1
- package/popover/index.js +1 -1
- package/progress/CircleProgress.js +1 -1
- package/progress/index.js +1 -1
- package/qr-code/index.js +19 -56
- package/radio/Group.js +2 -2
- package/radio/GroupBlock.js +2 -2
- package/radio/Radio.js +2 -2
- package/radio/index.js +2 -2
- package/rate/index.js +1 -1
- package/resize-box/ResizeTrigger.js +2 -2
- package/resize-box/Split.js +2 -2
- package/resize-box/SplitGroup.js +1 -1
- package/resize-box/index.js +1 -1
- package/result/index.js +1 -1
- package/rich-text/index.js +6333 -78
- package/rich-text/lib/diff/index.d.ts +21 -0
- package/row-col/Col-.js +1 -1
- package/row-col/Col.js +71 -74
- package/row-col/Row.js +1 -1
- package/segmented/index.js +111 -146
- package/select/Option.js +44 -41
- package/select/Select.js +11 -13
- package/select-view/Core.js +1 -1
- package/skeleton/index.js +1 -1
- package/slider/Button.js +1 -1
- package/slider/index.js +1 -1
- package/space/index.js +16 -52
- package/spin/DotLoading.js +1 -1
- package/spin/index.js +1 -1
- package/splitter/Panel.js +1 -1
- package/splitter/SplitBar.js +2 -2
- package/splitter/Splitter.js +3 -3
- package/statistic/index.js +1 -1
- package/steps/index.js +1 -1
- package/style.css +1 -1
- package/switch/index.js +1 -1
- package/table/Table.js +18 -7
- package/table/index.js +77 -120
- package/tabs/Tab.js +3 -3
- package/tabs/TabContent.js +2 -2
- package/tabs/TabPane.js +1 -1
- package/tabs/index.js +2 -2
- package/tag/index.js +1 -1
- package/time-picker/Picker.js +1 -1
- package/time-picker/TimePicker.js +1 -1
- package/timeline/Item.js +1 -1
- package/timeline/Timeline.js +1 -1
- package/tooltip/index.js +1 -1
- package/tour/index.js +71 -107
- package/transfer/Item.js +2 -2
- package/transfer/List.js +2 -2
- package/transfer/index.js +1 -1
- package/tree/Animation.js +2 -2
- package/tree/Node.js +3 -3
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +2 -2
- package/tree/index.js +1 -1
- package/tree-select/Select.js +3 -3
- package/tree-select/index.js +1 -1
- package/trigger/index.js +2 -2
- package/types/common/hooks/src/use-size/index.d.ts +1 -1
- package/types/common/hooks/src/utils/isBrowser.d.ts +1 -1
- package/types/common/hooks/useResizeObserver.d.ts +1 -5
- package/types/common/hooks/useStateWithPromise.d.ts +1 -1
- package/types/common/hooks/useWindowSize.d.ts +1 -1
- package/types/common/utils/dom.d.ts +12 -0
- package/types/common/utils/emitter.d.ts +1 -0
- package/types/pc/carousel/interface.d.ts +2 -2
- package/types/pc/color-picker/Panel.d.ts +1 -1
- package/types/pc/date-picker/RangePicker.d.ts +1 -1
- package/types/pc/index.d.ts +2 -2
- package/types/pc/list/interface.d.ts +2 -2
- package/types/pc/rich-text/index.d.ts +7 -4
- package/types/pc/rich-text/interface.d.ts +3 -2
- package/types/pc/rich-text/{blots → lib/blots}/scroll.d.ts +2 -8
- package/types/pc/rich-text/{core → lib/core}/editor.d.ts +1 -1
- package/types/pc/rich-text/{core → lib/core}/emitter.d.ts +2 -3
- package/types/pc/rich-text/{core → lib/core}/rich.d.ts +14 -51
- package/types/pc/rich-text/{core → lib/core}/selection.d.ts +2 -8
- package/types/pc/rich-text/{core → lib/core}/theme.d.ts +3 -0
- package/types/pc/rich-text/{core.d.ts → lib/core.d.ts} +1 -1
- package/types/pc/rich-text/lib/delta/AttributeMap.d.ts +15 -0
- package/types/pc/rich-text/lib/delta/Op.d.ts +13 -0
- package/types/pc/rich-text/lib/delta/OpIterator.d.ts +14 -0
- package/types/pc/rich-text/lib/delta/index.d.ts +53 -0
- package/types/pc/rich-text/lib/diff/index.d.ts +40 -0
- package/types/pc/rich-text/{formats → lib/formats}/bold.d.ts +1 -1
- package/types/pc/rich-text/{formats → lib/formats}/font.d.ts +1 -1
- package/types/pc/rich-text/lib/formats/hr.d.ts +5 -0
- package/types/pc/rich-text/lib/formats/image-resize/index.d.ts +27 -0
- package/types/pc/rich-text/lib/formats/image-resize/modules/BaseModule.d.ts +10 -0
- package/types/pc/rich-text/lib/formats/image-resize/modules/DisplaySize.d.ts +5 -0
- package/types/pc/rich-text/lib/formats/image-resize/modules/Resize.d.ts +13 -0
- package/types/pc/rich-text/lib/formats/image-resize/options.d.ts +7 -0
- package/types/pc/rich-text/lib/formats/liOl.d.ts +10 -0
- package/types/pc/rich-text/lib/formats/liUl.d.ts +10 -0
- package/types/pc/rich-text/lib/formats/lineHeight.d.ts +3 -0
- package/types/pc/rich-text/{formats → lib/formats}/list.d.ts +1 -0
- package/types/pc/rich-text/{formats → lib/formats}/table.d.ts +3 -3
- package/types/pc/rich-text/{modules → lib/modules}/clipboard.d.ts +2 -2
- package/types/pc/rich-text/{modules → lib/modules}/history.d.ts +1 -1
- package/types/pc/rich-text/{modules → lib/modules}/keyboard.d.ts +1 -1
- package/types/pc/rich-text/{modules → lib/modules}/syntax.d.ts +2 -2
- package/types/pc/rich-text/{modules → lib/modules}/tableEmbed.d.ts +3 -3
- package/types/pc/rich-text/{modules → lib/modules}/toolbar.d.ts +1 -1
- package/types/pc/rich-text/{parchment → lib/parchment}/attributor/attributor.d.ts +3 -3
- package/types/pc/rich-text/{parchment → lib/parchment}/attributor/style.d.ts +2 -2
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/parent.d.ts +2 -4
- package/types/pc/rich-text/{themes → lib/themes}/base.d.ts +3 -0
- package/types/pc/rich-text/{themes/snow.d.ts → lib/themes/pqb.d.ts} +2 -2
- package/types/pc/rich-text/{ui → lib/ui}/icons.d.ts +5 -1
- package/types/pc/rich-text/{ui → lib/ui}/picker.d.ts +1 -0
- package/types/pc/rich-text/{ui → lib/ui}/tooltip.d.ts +2 -0
- package/types/pc/tabs/hook/useDomSize.d.ts +2 -2
- package/types/pc/tabs/hook/useHeaderScroll.d.ts +2 -2
- package/types/pc/tree-select/hook/useStateValue.d.ts +2 -2
- package/types/pc/utils/date.d.ts +1 -0
- package/types/pc/utils/emitter.d.ts +1 -0
- package/types/pc/utils/index.d.ts +2 -2
- package/typography/Base.js +2 -2
- package/typography/Ellipsis.js +70 -114
- package/typography/Operations.js +29 -74
- package/typography/Paragraph.js +1 -1
- package/typography/Typography.js +1 -1
- package/typography/useEllipsis.js +1 -1
- package/upload/TriggerNode.js +1 -1
- package/upload/Upload.js +1 -1
- package/utils/contextHolder.js +1 -1
- package/utils/date.js +1 -0
- package/utils/emitter.js +5 -0
- package/utils/index.js +70 -70
- package/utils/resizeObserver.js +1 -1
- package/verification-code/VerificationCode.js +1 -1
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +218 -217
- package/watermark/Watermark.js +1 -1
- package/chunk/BDMqvmVH.js +0 -4239
- package/chunk/BG6j6Ct7.js +0 -30
- package/chunk/BGJspFG9.js +0 -56
- package/chunk/B_c0gPsX.js +0 -83
- package/chunk/COsRZOz1.js +0 -1813
- package/chunk/CylJZkp8.js +0 -6
- package/chunk/Di5KBCVQ.js +0 -4
- package/chunk/cW_5U6dL.js +0 -28
- package/rich-text/core.js +0 -11
- package/rich-text/rich.js +0 -1877
- package/types/common/utils/index.d.ts +0 -47
- package/types/common/utils/keyboardCode.d.ts +0 -4
- package/types/common/utils/math.d.ts +0 -1
- package/types/common/utils/mitt.d.ts +0 -1
- package/types/common/utils/reactTransitionGroup.d.ts +0 -1
- package/types/common/utils/uuid.d.ts +0 -1
- package/types/common/utils/validate.d.ts +0 -1
- package/types/pc/rich-text/delta/AttributeMap.d.ts +0 -10
- package/types/pc/rich-text/delta/Op.d.ts +0 -11
- package/types/pc/rich-text/delta/OpIterator.d.ts +0 -13
- package/types/pc/rich-text/delta/index.d.ts +0 -45
- package/types/pc/rich-text/themes/bubble.d.ts +0 -18
- package/types/pc/utils/mitt.d.ts +0 -1
- package/utils/mitt.js +0 -5
- package/types/common/hooks/src/utils/{index.d.ts → is.d.ts} +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/block.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/break.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/container.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/cursor.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/embed.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/inline.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/text.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/composition.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/instances.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/logger.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/module.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/utils/createRegistryWithFormats.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/utils/scrollRectIntoView.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/align.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/background.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/blockquote.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/code.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/color.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/direction.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/formula.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/header.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/image.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/indent.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/italic.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/link.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/script.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/size.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/strike.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/underline.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/video.d.ts +0 -0
- package/types/pc/rich-text/{rich.d.ts → lib/index.d.ts} +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/input.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/normalizeExternalHTML/index.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/normalizeExternalHTML/normalizers/googleDocs.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/normalizeExternalHTML/normalizers/msWord.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/table.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/uiNode.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/uploader.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/attributor/class.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/attributor/store.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/blot.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/container.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/leaf.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/shadow.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/block.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/embed.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/inline.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/scroll.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/text.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/collection/linked-list.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/collection/linked-node.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/error.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/index.d.ts +1 -1
- /package/types/pc/rich-text/{parchment → lib/parchment}/registry.d.ts +0 -0
- /package/types/pc/rich-text/{parchment → lib/parchment}/scope.d.ts +0 -0
- /package/types/pc/rich-text/{ui → lib/ui}/color-picker.d.ts +0 -0
- /package/types/pc/rich-text/{ui → lib/ui}/icon-picker.d.ts +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type Diff = [-1 | 0 | 1, string];
|
|
2
|
+
|
|
3
|
+
export interface CursorInfo {
|
|
4
|
+
oldRange: { index: number; length: number };
|
|
5
|
+
newRange: { index: number; length: number };
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const enum ChangeType {
|
|
9
|
+
DELETE = -1,
|
|
10
|
+
INSERT = 1,
|
|
11
|
+
EQUAL = 0,
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare function diff(
|
|
15
|
+
text1: string,
|
|
16
|
+
text2: string,
|
|
17
|
+
cursorPos?: number | CursorInfo,
|
|
18
|
+
cleanup?: boolean,
|
|
19
|
+
): Diff[];
|
|
20
|
+
|
|
21
|
+
export default diff;
|
package/row-col/Col-.js
CHANGED
|
@@ -3,7 +3,7 @@ import G from "lodash/isArray";
|
|
|
3
3
|
import H from "lodash/isNumber";
|
|
4
4
|
import T from "lodash/isPlainObject";
|
|
5
5
|
import { forwardRef as q, useContext as j, useMemo as D } from "react";
|
|
6
|
-
import { a as I } from "../chunk/
|
|
6
|
+
import { a as I } from "../chunk/CYDaUML7.js";
|
|
7
7
|
import { COLS as J } from "../constant/index.js";
|
|
8
8
|
import { u as K } from "../chunk/FgWHhRFz.js";
|
|
9
9
|
import Q from "@unicom-cloud/utils/class-name";
|
package/row-col/Col.js
CHANGED
|
@@ -1,124 +1,121 @@
|
|
|
1
1
|
import { jsx as T } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as U, useContext as E, useMemo as x, useEffect as W } from "react";
|
|
3
|
-
import { a as X } from "../chunk/
|
|
4
|
-
import { COLS as
|
|
3
|
+
import { a as X } from "../chunk/CYDaUML7.js";
|
|
4
|
+
import { COLS as b } from "../constant/index.js";
|
|
5
5
|
import { u as Y } from "../chunk/FgWHhRFz.js";
|
|
6
6
|
import { useResponsive as Z, isResponsiveValue as ee } from "../hooks/useResponsiveState.js";
|
|
7
7
|
import te from "@unicom-cloud/utils/class-name";
|
|
8
8
|
import "../chunk/DsaQZE4X.js";
|
|
9
|
-
import { responsiveArray as
|
|
9
|
+
import { responsiveArray as v } from "../utils/responsiveObserve.js";
|
|
10
10
|
import { RowContext as se } from "./context.js";
|
|
11
|
-
import { isNil as oe, isNumber as l, isPlainObject as
|
|
12
|
-
function
|
|
13
|
-
const { getPrefixCls:
|
|
14
|
-
span:
|
|
11
|
+
import { isNil as oe, isNumber as l, isPlainObject as L, isArray as re } from "@unicom-cloud/utils/is";
|
|
12
|
+
function ne(M, z) {
|
|
13
|
+
const { getPrefixCls: B, componentConfig: y, rtl: P } = E(X), o = B?.("col"), k = Y(M, {
|
|
14
|
+
span: b
|
|
15
15
|
// 默认占据 24 列
|
|
16
16
|
}, {
|
|
17
|
-
...
|
|
18
|
-
...
|
|
19
|
-
}),
|
|
20
|
-
className:
|
|
21
|
-
style:
|
|
17
|
+
...y?.Col,
|
|
18
|
+
...y?.GridCol
|
|
19
|
+
}), F = E(se), { gutter: C, div: f } = F, {
|
|
20
|
+
className: V,
|
|
21
|
+
style: q,
|
|
22
22
|
children: D,
|
|
23
|
-
span: d =
|
|
24
|
-
offset:
|
|
23
|
+
span: d = b,
|
|
24
|
+
offset: p,
|
|
25
25
|
order: c,
|
|
26
26
|
pull: u,
|
|
27
|
-
push:
|
|
27
|
+
push: m,
|
|
28
28
|
xs: N,
|
|
29
|
-
sm:
|
|
30
|
-
md:
|
|
31
|
-
lg:
|
|
32
|
-
xl:
|
|
33
|
-
xxl:
|
|
34
|
-
xxxl:
|
|
29
|
+
sm: w,
|
|
30
|
+
md: I,
|
|
31
|
+
lg: R,
|
|
32
|
+
xl: _,
|
|
33
|
+
xxl: S,
|
|
34
|
+
xxxl: j,
|
|
35
35
|
flex: h,
|
|
36
|
-
breakpoints:
|
|
36
|
+
breakpoints: G,
|
|
37
37
|
...H
|
|
38
|
-
} =
|
|
38
|
+
} = k, g = "flex" in k && !oe(h), O = Z(), a = x(() => ({ ...G, xs: N, sm: w, md: I, lg: R, xl: _, xxl: S, xxxl: j }), [G, R, I, w, _, N, S, j]), J = x(() => {
|
|
39
39
|
const e = {
|
|
40
|
-
[`${
|
|
41
|
-
[`${
|
|
42
|
-
[`${
|
|
43
|
-
[`${
|
|
44
|
-
[`${
|
|
45
|
-
[`${
|
|
46
|
-
[`${
|
|
40
|
+
[`${o}`]: !f,
|
|
41
|
+
[`${o}-order-${c}`]: c,
|
|
42
|
+
[`${o}-${d}`]: !f && !ee(a),
|
|
43
|
+
[`${o}-offset-${p}`]: p,
|
|
44
|
+
[`${o}-pull-${u}`]: u,
|
|
45
|
+
[`${o}-push-${m}`]: m,
|
|
46
|
+
[`${o}-rtl`]: P
|
|
47
47
|
};
|
|
48
|
-
for (const
|
|
49
|
-
const
|
|
50
|
-
if (l(
|
|
51
|
-
e[`${
|
|
52
|
-
else if (
|
|
48
|
+
for (const s in a) {
|
|
49
|
+
const t = a[s];
|
|
50
|
+
if (l(t))
|
|
51
|
+
e[`${o}-${s}-${t}`] = !0;
|
|
52
|
+
else if (L(t)) {
|
|
53
53
|
const {
|
|
54
54
|
span: n,
|
|
55
|
-
offset:
|
|
56
|
-
order:
|
|
55
|
+
offset: r,
|
|
56
|
+
order: $,
|
|
57
57
|
pull: i,
|
|
58
58
|
push: A
|
|
59
|
-
} =
|
|
60
|
-
e[`${
|
|
59
|
+
} = t;
|
|
60
|
+
e[`${o}-${s}-${n}`] = n, e[`${o}-${s}-offset-${r}`] = r, e[`${o}-${s}-order-${$}`] = $, e[`${o}-${s}-pull-${i}`] = i, e[`${o}-${s}-push-${A}`] = A;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
return e;
|
|
64
|
-
}, [
|
|
64
|
+
}, [o, f, c, d, a, p, u, m, P]), K = x(() => {
|
|
65
65
|
const e = {};
|
|
66
66
|
if (f)
|
|
67
67
|
return e;
|
|
68
68
|
if (re(C)) {
|
|
69
|
-
const [
|
|
70
|
-
if (
|
|
71
|
-
let n = l(
|
|
69
|
+
const [s, t] = C;
|
|
70
|
+
if (s) {
|
|
71
|
+
let n = l(s) ? `${s}px` : s;
|
|
72
72
|
n = `calc(${n} / 2)`, e.paddingLeft = n, e.paddingRight = n;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return e;
|
|
76
76
|
}, [C, f]), Q = x(() => {
|
|
77
77
|
const e = {};
|
|
78
|
-
if (
|
|
79
|
-
|
|
80
|
-
return e.flex = t, ne(t) && (["auto", "none"].includes(t) ? e.flex = t : /\d+\w{1,}/.test(t) && (e.flex = `0 0 ${t}`)), l(t) && (e.flex = t), e;
|
|
81
|
-
}
|
|
78
|
+
if (g)
|
|
79
|
+
return e.flex = h, e;
|
|
82
80
|
if (f)
|
|
83
81
|
return e;
|
|
84
|
-
function
|
|
85
|
-
return `${100 /
|
|
82
|
+
function s(r) {
|
|
83
|
+
return `${100 / b * r}%`;
|
|
86
84
|
}
|
|
87
|
-
const
|
|
85
|
+
const t = {
|
|
88
86
|
span: d,
|
|
89
|
-
offset:
|
|
87
|
+
offset: p,
|
|
90
88
|
order: c,
|
|
91
89
|
pull: u,
|
|
92
|
-
push:
|
|
93
|
-
}, n =
|
|
94
|
-
if (n !== -1) for (let
|
|
95
|
-
const
|
|
90
|
+
push: m
|
|
91
|
+
}, n = v.findIndex((r, $, i) => O[r]);
|
|
92
|
+
if (n !== -1) for (let r = n; r < v.length; r++) {
|
|
93
|
+
const $ = v[r], i = a[$];
|
|
96
94
|
if (i !== void 0) {
|
|
97
|
-
if (
|
|
98
|
-
Object.assign(
|
|
95
|
+
if (L(i)) {
|
|
96
|
+
Object.assign(t, i);
|
|
99
97
|
break;
|
|
100
98
|
}
|
|
101
99
|
if (l(i)) {
|
|
102
|
-
|
|
100
|
+
t.span = i;
|
|
103
101
|
break;
|
|
104
102
|
}
|
|
105
103
|
}
|
|
106
104
|
}
|
|
107
|
-
if (l(
|
|
108
|
-
const
|
|
109
|
-
e.width =
|
|
105
|
+
if (l(t.span)) {
|
|
106
|
+
const r = s(t.span);
|
|
107
|
+
e.width = r, e.flexGrow = 0, e.flexShrink = 0, e.flexBasis = r;
|
|
110
108
|
}
|
|
111
|
-
return l(
|
|
109
|
+
return l(t.offset) && (e.marginInlineStart = s(t.offset)), l(t.pull) && (e.insetInlineEnd = s(t.pull)), l(t.push) && (e.insetInlineStart = s(t.push)), l(t.order) && (e.order = t.order), e;
|
|
112
110
|
}, [
|
|
113
|
-
|
|
111
|
+
a,
|
|
114
112
|
f,
|
|
115
113
|
h,
|
|
116
|
-
|
|
117
|
-
|
|
114
|
+
g,
|
|
115
|
+
p,
|
|
118
116
|
c,
|
|
119
117
|
u,
|
|
120
|
-
|
|
121
|
-
g,
|
|
118
|
+
m,
|
|
122
119
|
O,
|
|
123
120
|
d
|
|
124
121
|
]);
|
|
@@ -126,20 +123,20 @@ function ie(L, M) {
|
|
|
126
123
|
}, []), /* @__PURE__ */ T(
|
|
127
124
|
"div",
|
|
128
125
|
{
|
|
129
|
-
ref:
|
|
126
|
+
ref: z,
|
|
130
127
|
...H,
|
|
131
128
|
style: {
|
|
132
|
-
...B,
|
|
133
129
|
...K,
|
|
134
|
-
...Q
|
|
130
|
+
...Q,
|
|
131
|
+
...q
|
|
135
132
|
},
|
|
136
|
-
className: te(
|
|
133
|
+
className: te(g ? o : J, V),
|
|
137
134
|
children: D
|
|
138
135
|
}
|
|
139
136
|
);
|
|
140
137
|
}
|
|
141
|
-
const
|
|
142
|
-
|
|
138
|
+
const ie = U(ne);
|
|
139
|
+
ie.displayName = "Col";
|
|
143
140
|
export {
|
|
144
|
-
|
|
141
|
+
ie as default
|
|
145
142
|
};
|
package/row-col/Row.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as N, useContext as h, useEffect as v } from "react";
|
|
3
|
-
import { a as P } from "../chunk/
|
|
3
|
+
import { a as P } from "../chunk/CYDaUML7.js";
|
|
4
4
|
import { u as j } from "../chunk/FgWHhRFz.js";
|
|
5
5
|
import { useResponsiveState as c } from "../hooks/useResponsiveState.js";
|
|
6
6
|
import z from "@unicom-cloud/utils/class-name";
|
package/segmented/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsx as h, jsxs as H, Fragment as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { a as
|
|
1
|
+
import { jsx as h, jsxs as H, Fragment as $e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as he, useContext as ye, useMemo as ze, useState as xe, useRef as L, useEffect as K, useImperativeHandle as ve } from "react";
|
|
3
|
+
import { a as we } from "../chunk/CYDaUML7.js";
|
|
4
4
|
import "../chunk/DsaQZE4X.js";
|
|
5
|
+
import "@unicom-cloud/utils/constant/platform";
|
|
5
6
|
import "../chunk/CdXR6dj7.js";
|
|
6
|
-
import { u as
|
|
7
|
+
import { u as Se } from "../chunk/BJeTDXdz.js";
|
|
7
8
|
import "@unicom-cloud/utils/js-cookie";
|
|
8
9
|
import "dayjs";
|
|
9
10
|
import "lodash/debounce";
|
|
10
|
-
import { u as
|
|
11
|
+
import { u as ke } from "../chunk/DfChiMIE.js";
|
|
11
12
|
import "@unicom-cloud/utils/screenfull";
|
|
12
|
-
import "../chunk/
|
|
13
|
+
import "../chunk/ClNkxEcR.js";
|
|
13
14
|
import "lodash/throttle";
|
|
14
|
-
import "@unicom-cloud/utils/constant/platform";
|
|
15
15
|
import "lodash/isPlainObject";
|
|
16
16
|
import "@unicom-cloud/utils/query-string";
|
|
17
17
|
import "react-router";
|
|
@@ -20,47 +20,12 @@ import "@unicom-cloud/utils/constant/keyboardCode";
|
|
|
20
20
|
import "lodash/isNumber";
|
|
21
21
|
import "lodash/merge";
|
|
22
22
|
import "../chunk/d1c9z8T1.js";
|
|
23
|
-
import "@unicom-cloud/utils/date";
|
|
24
|
-
import "@unicom-cloud/utils/case-name";
|
|
25
|
-
import M from "@unicom-cloud/utils/class-name";
|
|
26
|
-
import "@unicom-cloud/utils/constant/ui";
|
|
27
|
-
import "@unicom-cloud/utils/clipboard-copy";
|
|
28
|
-
import "../chunk/DS_deHpN.js";
|
|
29
|
-
import "@unicom-cloud/utils/file/fileToURL";
|
|
30
|
-
import "lodash/escapeRegExp";
|
|
31
|
-
import "lodash/isArray";
|
|
32
|
-
import "lodash/isString";
|
|
33
|
-
import "lodash/isFunction";
|
|
34
|
-
import "lodash/camelCase";
|
|
35
|
-
import "lodash/capitalize";
|
|
36
|
-
import "lodash/cloneDeep";
|
|
37
|
-
import "lodash/get";
|
|
38
|
-
import "lodash/has";
|
|
39
|
-
import "lodash/kebabCase";
|
|
40
|
-
import "lodash/mergeWith";
|
|
41
|
-
import "lodash/set";
|
|
42
|
-
import "lodash/setWith";
|
|
43
|
-
import "lodash/snakeCase";
|
|
44
|
-
import "lodash/startCase";
|
|
45
|
-
import "lodash/uniq";
|
|
46
|
-
import "lodash/upperFirst";
|
|
47
|
-
import "@unicom-cloud/utils/math";
|
|
48
|
-
import "@unicom-cloud/utils/mitt";
|
|
49
|
-
import "@unicom-cloud/utils/pinyin";
|
|
50
|
-
import "../chunk/BJ9_azwQ.js";
|
|
51
|
-
import "../chunk/CXrVhA6-.js";
|
|
52
|
-
import "@unicom-cloud/utils/file/saveAs";
|
|
53
|
-
import "@unicom-cloud/utils/constant/ui.js";
|
|
54
|
-
import "@unicom-cloud/utils/tinycolor";
|
|
55
|
-
import "@unicom-cloud/utils/ui-color";
|
|
56
|
-
import "react-is";
|
|
57
|
-
import "@unicom-cloud/utils/tree";
|
|
58
|
-
import { isString as Io, isNumber as T, isFunction as W } from "@unicom-cloud/utils/is";
|
|
59
|
-
import "uuid";
|
|
60
|
-
import "../chunk/hc_ufgVf.js";
|
|
61
23
|
import "../chunk/RjJoagzL.js";
|
|
62
|
-
import { u as
|
|
24
|
+
import { u as Ce } from "../chunk/FgWHhRFz.js";
|
|
25
|
+
import "../chunk/CXrVhA6-.js";
|
|
63
26
|
import "@unicom-cloud/utils/constant";
|
|
27
|
+
import M from "@unicom-cloud/utils/class-name";
|
|
28
|
+
import { isString as Ie, isNumber as T, isFunction as W } from "@unicom-cloud/utils/is";
|
|
64
29
|
const G = {
|
|
65
30
|
mini: {
|
|
66
31
|
root: {
|
|
@@ -102,7 +67,7 @@ const G = {
|
|
|
102
67
|
padding: "19px"
|
|
103
68
|
}
|
|
104
69
|
}
|
|
105
|
-
},
|
|
70
|
+
}, Ne = {
|
|
106
71
|
options: [],
|
|
107
72
|
size: "medium",
|
|
108
73
|
mode: "default",
|
|
@@ -114,114 +79,114 @@ const G = {
|
|
|
114
79
|
keyboardSwitch: !0,
|
|
115
80
|
animationDuration: 300
|
|
116
81
|
};
|
|
117
|
-
function
|
|
118
|
-
const { getPrefixCls: Q, componentConfig: X, rtl: k } =
|
|
82
|
+
function Oe(B, J) {
|
|
83
|
+
const { getPrefixCls: Q, componentConfig: X, rtl: k } = ye(we), f = Ce(
|
|
119
84
|
B,
|
|
120
|
-
|
|
85
|
+
Ne,
|
|
121
86
|
X?.Segmented
|
|
122
87
|
), {
|
|
123
88
|
style: Y,
|
|
124
89
|
className: Z,
|
|
125
90
|
options: C = [],
|
|
126
91
|
defaultValue: _,
|
|
127
|
-
value:
|
|
92
|
+
value: ee,
|
|
128
93
|
size: y = "medium",
|
|
129
94
|
gap: I,
|
|
130
95
|
mode: z = "default",
|
|
131
|
-
disabled:
|
|
96
|
+
disabled: m = !1,
|
|
132
97
|
block: N = !1,
|
|
133
|
-
split:
|
|
98
|
+
split: oe,
|
|
134
99
|
direction: x = "horizontal",
|
|
135
100
|
showIndicator: O = !0,
|
|
136
101
|
keyboardSwitch: q = !0,
|
|
137
102
|
animationDuration: A = 300,
|
|
138
103
|
name: D,
|
|
139
|
-
immediateTrigger:
|
|
104
|
+
immediateTrigger: te = !1,
|
|
140
105
|
onChange: P,
|
|
141
|
-
...
|
|
142
|
-
} =
|
|
143
|
-
function
|
|
144
|
-
let
|
|
145
|
-
return "gap" in
|
|
106
|
+
...ie
|
|
107
|
+
} = f, R = Se(), o = Q?.("segmented"), ne = x === "vertical", V = z === "pill", U = "value" in f, r = ze(() => C.map((e) => Ie(e) || T(e) ? { value: e, label: e } : e), [C]), [re, se] = xe(_), E = L(null), v = L([]), a = U ? ee : re, d = G[y] || G.medium;
|
|
108
|
+
function ae() {
|
|
109
|
+
let e = I;
|
|
110
|
+
return "gap" in f ? e = I : e = d.root.padding, e;
|
|
146
111
|
}
|
|
147
|
-
const u =
|
|
148
|
-
function
|
|
149
|
-
const
|
|
150
|
-
padding: `0 ${
|
|
151
|
-
height: `calc(${
|
|
112
|
+
const u = ae();
|
|
113
|
+
function de() {
|
|
114
|
+
const e = {
|
|
115
|
+
padding: `0 ${d.option.padding}`,
|
|
116
|
+
height: `calc(${d.option.size} - ${d.root.padding} * 2)`
|
|
152
117
|
};
|
|
153
|
-
return V && (
|
|
118
|
+
return V && (e.borderRadius = `calc(${e.height} / 2)`), e;
|
|
154
119
|
}
|
|
155
|
-
const b =
|
|
156
|
-
function
|
|
157
|
-
const
|
|
120
|
+
const b = de();
|
|
121
|
+
function pe() {
|
|
122
|
+
const e = {
|
|
158
123
|
gap: u,
|
|
159
|
-
fontSize:
|
|
160
|
-
padding:
|
|
124
|
+
fontSize: d.root.fontSize,
|
|
125
|
+
padding: d.root.padding,
|
|
161
126
|
...Y
|
|
162
127
|
};
|
|
163
|
-
if (
|
|
164
|
-
b.borderRadius && (
|
|
165
|
-
const i =
|
|
166
|
-
t && (
|
|
128
|
+
if (e["--gap"] = T(u) ? `${u}px` : u, V && (e.borderRadius = `calc(${d.option.size} / 2)`), O) {
|
|
129
|
+
b.borderRadius && (e["--before-border-radius"] = b.borderRadius), A && (e["--before-transition-duration"] = `${A}ms`);
|
|
130
|
+
const i = r.findIndex((n) => n?.value === a), t = v.current[i];
|
|
131
|
+
t && (e["--before-width"] = `${t.offsetWidth}px`, e["--before-height"] = `${t.offsetHeight}px`, ne ? e["--before-top"] = `${t.offsetTop}px` : e["--before-left"] = `${t.offsetLeft}px`);
|
|
167
132
|
}
|
|
168
|
-
return
|
|
133
|
+
return e;
|
|
169
134
|
}
|
|
170
|
-
const
|
|
171
|
-
function g(
|
|
172
|
-
const
|
|
173
|
-
U ||
|
|
135
|
+
const le = pe();
|
|
136
|
+
function g(e, i, t) {
|
|
137
|
+
const n = t || r.find((l) => l.value === e);
|
|
138
|
+
U || se(e), W(P) && P(e, n);
|
|
174
139
|
}
|
|
175
|
-
function
|
|
176
|
-
|
|
140
|
+
function ce(e, i, t, n) {
|
|
141
|
+
n || m || g(e, i, t);
|
|
177
142
|
}
|
|
178
|
-
function
|
|
179
|
-
if (
|
|
143
|
+
function fe(e) {
|
|
144
|
+
if (e.preventDefault(), !q || m)
|
|
180
145
|
return;
|
|
181
|
-
const i =
|
|
146
|
+
const i = r.findIndex((p) => p?.value === a);
|
|
182
147
|
let t = i;
|
|
183
|
-
const
|
|
184
|
-
switch (
|
|
148
|
+
const n = r.length;
|
|
149
|
+
switch (e.key) {
|
|
185
150
|
case "ArrowLeft":
|
|
186
151
|
case "ArrowUp":
|
|
187
|
-
t = (i - 1 +
|
|
152
|
+
t = (i - 1 + n) % n;
|
|
188
153
|
break;
|
|
189
154
|
case "ArrowRight":
|
|
190
155
|
case "ArrowDown":
|
|
191
|
-
t = (i + 1) %
|
|
156
|
+
t = (i + 1) % n;
|
|
192
157
|
break;
|
|
193
158
|
case "Home":
|
|
194
159
|
t = 0;
|
|
195
160
|
break;
|
|
196
161
|
case "End":
|
|
197
|
-
t =
|
|
162
|
+
t = n - 1;
|
|
198
163
|
break;
|
|
199
164
|
default:
|
|
200
165
|
return;
|
|
201
166
|
}
|
|
202
|
-
for (; t !== i &&
|
|
203
|
-
const
|
|
204
|
-
t = (t +
|
|
167
|
+
for (; t !== i && r[t]?.disabled; ) {
|
|
168
|
+
const p = ["ArrowLeft", "ArrowUp"].includes(e.key) ? -1 : 1;
|
|
169
|
+
t = (t + p + n) % n;
|
|
205
170
|
}
|
|
206
|
-
const l =
|
|
171
|
+
const l = r[t], s = l?.value;
|
|
207
172
|
s && s !== a && (g(s, t, l), v.current[t]?.focus?.());
|
|
208
173
|
}
|
|
209
|
-
function
|
|
210
|
-
if (!
|
|
174
|
+
function me(e, i, t) {
|
|
175
|
+
if (!e) return;
|
|
211
176
|
const {
|
|
212
|
-
style:
|
|
177
|
+
style: n,
|
|
213
178
|
className: l,
|
|
214
179
|
value: s,
|
|
215
|
-
label:
|
|
180
|
+
label: p,
|
|
216
181
|
icon: w,
|
|
217
|
-
disabled:
|
|
182
|
+
disabled: ue,
|
|
218
183
|
render: F,
|
|
219
|
-
...
|
|
220
|
-
} =
|
|
184
|
+
...be
|
|
185
|
+
} = e, c = s === a, $ = ue || m, S = !p && !!w, ge = Object.assign(
|
|
221
186
|
{},
|
|
222
187
|
b,
|
|
223
188
|
S ? { padding: 0, width: b.height } : {},
|
|
224
|
-
|
|
189
|
+
n
|
|
225
190
|
);
|
|
226
191
|
return /* @__PURE__ */ H(
|
|
227
192
|
"button",
|
|
@@ -229,31 +194,31 @@ function qo(B, J) {
|
|
|
229
194
|
ref: (j) => {
|
|
230
195
|
v.current[i] = j;
|
|
231
196
|
},
|
|
232
|
-
style:
|
|
197
|
+
style: ge,
|
|
233
198
|
className: M(
|
|
234
|
-
`${
|
|
235
|
-
`${
|
|
236
|
-
`${
|
|
237
|
-
`${
|
|
199
|
+
`${o}-option`,
|
|
200
|
+
`${o}-option-size-${y}`,
|
|
201
|
+
`${o}-option-mode-${z}`,
|
|
202
|
+
`${o}-option-direction-${x}`,
|
|
238
203
|
{
|
|
239
|
-
[`${
|
|
240
|
-
[`${
|
|
241
|
-
[`${
|
|
242
|
-
[`${
|
|
243
|
-
[`${
|
|
204
|
+
[`${o}-option-rtl`]: k,
|
|
205
|
+
[`${o}-option-block`]: N,
|
|
206
|
+
[`${o}-option-split`]: oe,
|
|
207
|
+
[`${o}-option-active`]: c,
|
|
208
|
+
[`${o}-option-disabled`]: $
|
|
244
209
|
},
|
|
245
|
-
S ? `${
|
|
210
|
+
S ? `${o}-option-icon-only` : `${o}-option-not-icon-only`,
|
|
246
211
|
l
|
|
247
212
|
),
|
|
248
213
|
disabled: $,
|
|
249
214
|
role: "radio",
|
|
250
|
-
"aria-checked":
|
|
215
|
+
"aria-checked": c,
|
|
251
216
|
"aria-disabled": $,
|
|
252
|
-
tabIndex:
|
|
217
|
+
tabIndex: c ? 0 : -1,
|
|
253
218
|
onClick: (j) => {
|
|
254
|
-
|
|
219
|
+
ce(s, i, e, $);
|
|
255
220
|
},
|
|
256
|
-
...
|
|
221
|
+
...be,
|
|
257
222
|
children: [
|
|
258
223
|
!!D && /* @__PURE__ */ h(
|
|
259
224
|
"input",
|
|
@@ -261,63 +226,63 @@ function qo(B, J) {
|
|
|
261
226
|
type: "radio",
|
|
262
227
|
name: D,
|
|
263
228
|
value: s,
|
|
264
|
-
checked:
|
|
265
|
-
className: `${
|
|
229
|
+
checked: c,
|
|
230
|
+
className: `${o}-input`,
|
|
266
231
|
tabIndex: -1,
|
|
267
232
|
"aria-hidden": "true"
|
|
268
233
|
}
|
|
269
234
|
),
|
|
270
|
-
W(F) ? F(
|
|
271
|
-
w && /* @__PURE__ */ h("span", { className: `${
|
|
272
|
-
!S && /* @__PURE__ */ h("span", { className: `${
|
|
235
|
+
W(F) ? F(e, c) : /* @__PURE__ */ H($e, { children: [
|
|
236
|
+
w && /* @__PURE__ */ h("span", { className: `${o}-option-icon`, children: w }),
|
|
237
|
+
!S && /* @__PURE__ */ h("span", { className: `${o}-option-label`, children: p })
|
|
273
238
|
] })
|
|
274
239
|
]
|
|
275
240
|
},
|
|
276
|
-
`${
|
|
241
|
+
`${p}-${s}-${i}`
|
|
277
242
|
);
|
|
278
243
|
}
|
|
279
|
-
return
|
|
280
|
-
a === void 0 ||
|
|
281
|
-
}, [
|
|
282
|
-
const
|
|
244
|
+
return ke(() => {
|
|
245
|
+
a === void 0 || r.some((i) => i.value === a) || g(void 0);
|
|
246
|
+
}, [r]), K(() => {
|
|
247
|
+
const e = requestAnimationFrame(() => {
|
|
283
248
|
R();
|
|
284
249
|
});
|
|
285
250
|
return () => {
|
|
286
|
-
cancelAnimationFrame(
|
|
251
|
+
cancelAnimationFrame(e);
|
|
287
252
|
};
|
|
288
|
-
}, [R,
|
|
289
|
-
|
|
290
|
-
}, []),
|
|
253
|
+
}, [R, f]), K(() => {
|
|
254
|
+
te && g(a);
|
|
255
|
+
}, []), ve(J, () => ({
|
|
291
256
|
dom: E.current
|
|
292
257
|
})), /* @__PURE__ */ h(
|
|
293
258
|
"div",
|
|
294
259
|
{
|
|
295
260
|
ref: E,
|
|
296
|
-
...
|
|
297
|
-
style:
|
|
261
|
+
...ie,
|
|
262
|
+
style: le,
|
|
298
263
|
className: M(
|
|
299
|
-
|
|
264
|
+
o,
|
|
300
265
|
{
|
|
301
|
-
[`${
|
|
302
|
-
[`${
|
|
303
|
-
[`${
|
|
304
|
-
[`${
|
|
266
|
+
[`${o}-rtl`]: k,
|
|
267
|
+
[`${o}-block`]: N,
|
|
268
|
+
[`${o}-disabled`]: m,
|
|
269
|
+
[`${o}-indicator`]: O
|
|
305
270
|
},
|
|
306
|
-
`${
|
|
307
|
-
`${
|
|
308
|
-
`${
|
|
271
|
+
`${o}-mode-${z}`,
|
|
272
|
+
`${o}-direction-${x}`,
|
|
273
|
+
`${o}-size-${y}`,
|
|
309
274
|
Z
|
|
310
275
|
),
|
|
311
276
|
role: "radiogroup",
|
|
312
|
-
onKeyDown: q ? (
|
|
313
|
-
|
|
277
|
+
onKeyDown: q ? (e) => {
|
|
278
|
+
fe(e);
|
|
314
279
|
} : void 0,
|
|
315
|
-
children:
|
|
280
|
+
children: r.map(me)
|
|
316
281
|
}
|
|
317
282
|
);
|
|
318
283
|
}
|
|
319
|
-
const
|
|
320
|
-
|
|
284
|
+
const qe = he(Oe);
|
|
285
|
+
qe.displayName = "Segmented";
|
|
321
286
|
export {
|
|
322
|
-
|
|
287
|
+
qe as default
|
|
323
288
|
};
|