├── .npmrc ├── .husky └── pre-commit ├── .prettierignore ├── src ├── version.ts ├── _internal │ ├── clear │ │ └── index.ts │ ├── suffix │ │ └── index.ts │ ├── icon │ │ └── index.ts │ ├── slot-machine │ │ └── index.ts │ ├── close │ │ └── index.ts │ ├── README.md │ ├── icon-switch-transition │ │ └── index.ts │ ├── fade-in-expand-transition │ │ └── index.ts │ ├── wave │ │ ├── index.ts │ │ └── src │ │ │ └── styles │ │ │ └── index.cssr.ts │ ├── focus-detector │ │ └── index.tsx │ ├── menu-mask │ │ ├── index.ts │ │ └── src │ │ │ └── interface.ts │ ├── loading │ │ └── index.ts │ ├── selection │ │ ├── index.ts │ │ ├── styles │ │ │ ├── _common.ts │ │ │ ├── rtl.ts │ │ │ └── index.ts │ │ └── src │ │ │ └── interface.ts │ ├── select-menu │ │ ├── index.ts │ │ └── styles │ │ │ ├── rtl.ts │ │ │ └── index.ts │ ├── scrollbar │ │ ├── index.ts │ │ ├── styles │ │ │ ├── index.ts │ │ │ ├── common.ts │ │ │ ├── rtl.ts │ │ │ └── dark.ts │ │ └── tests │ │ │ └── Scrollbar.spec.ts │ └── icons │ │ └── Switcher.tsx ├── _mixins │ └── common.ts ├── composables │ └── index.ts ├── dialog │ ├── src │ │ └── interface.ts │ └── styles │ │ ├── index.ts │ │ └── rtl.ts ├── marquee │ ├── src │ │ └── public-types.ts │ ├── index.ts │ ├── styles │ │ ├── index.ts │ │ └── dark.ts │ ├── demos │ │ └── zhCN │ │ │ └── basic.demo.vue │ └── tests │ │ └── Marquee.spec.ts ├── popconfirm │ ├── styles │ │ ├── _common.ts │ │ └── index.ts │ ├── index.ts │ └── demos │ │ ├── zhCN │ │ └── no-icon.demo.vue │ │ └── enUS │ │ └── no-icon.demo.vue ├── tooltip │ ├── styles │ │ ├── _common.ts │ │ └── index.ts │ ├── index.ts │ └── demos │ │ ├── zhCN │ │ ├── arrow.demo.vue │ │ ├── basic.demo.vue │ │ └── placement.demo.vue │ │ └── enUS │ │ ├── placement.demo.vue │ │ └── arrow.demo.vue ├── calendar │ ├── styles │ │ ├── _common.ts │ │ └── index.ts │ └── index.ts ├── breadcrumb │ └── styles │ │ ├── _common.ts │ │ ├── index.ts │ │ └── dark.ts ├── global-style │ └── index.ts ├── global.d.ts ├── split │ ├── src │ │ └── types.ts │ ├── styles │ │ ├── index.ts │ │ └── dark.ts │ ├── index.ts │ └── demos │ │ └── zhCN │ │ └── vertical.demo.vue ├── theme-editor │ └── index.ts ├── slider │ ├── src │ │ └── interface.ts │ ├── index.ts │ ├── demos │ │ ├── zhCN │ │ │ ├── disabled.demo.vue │ │ │ ├── show-tooltip.demo.vue │ │ │ ├── disable-tooltip.demo.vue │ │ │ └── format.demo.vue │ │ └── enUS │ │ │ ├── disabled.demo.vue │ │ │ ├── show-tooltip.demo.vue │ │ │ ├── disable-tooltip.demo.vue │ │ │ └── format.demo.vue │ └── styles │ │ ├── index.ts │ │ └── _common.ts ├── form │ ├── src │ │ ├── public-types.ts │ │ └── context.ts │ └── styles │ │ ├── index.ts │ │ └── dark.ts ├── _utils │ ├── dom │ │ ├── index.ts │ │ └── is-document.ts │ ├── env │ │ ├── is-browser.ts │ │ ├── is-native-lazy-load.ts │ │ ├── browser.ts │ │ └── is-jsdom.ts │ ├── css │ │ ├── color-to-class.ts │ │ ├── index.ts │ │ └── rtl-inset.ts │ ├── vue │ │ ├── create-data-key.ts │ │ ├── keysOf.ts │ │ ├── create-injection-key.ts │ │ ├── wrapper.tsx │ │ ├── is-node-v-show-false.ts │ │ └── keep.ts │ ├── naive │ │ └── mutable.ts │ ├── event │ │ └── index.ts │ ├── color │ │ └── index.ts │ └── ts │ │ └── ts.ts ├── config-provider │ ├── src │ │ ├── katex.ts │ │ ├── config.ts │ │ └── context.ts │ ├── index.ts │ ├── tests │ │ └── ConfigProvider.spec.ts │ └── demos │ │ ├── zhCN │ │ ├── inherit-theme.demo.vue │ │ └── transparent.demo.vue │ │ └── enUS │ │ └── inherit-theme.demo.vue ├── page-header │ ├── styles │ │ ├── _common.ts │ │ ├── rtl.ts │ │ ├── index.ts │ │ └── dark.ts │ └── index.ts ├── icon │ ├── index.ts │ ├── styles │ │ ├── index.ts │ │ └── dark.ts │ └── tests │ │ └── __snapshots__ │ │ └── Icon.spec.ts.snap ├── legacy-transfer │ ├── styles │ │ ├── _common.ts │ │ └── index.ts │ └── index.ts ├── code │ ├── index.ts │ └── styles │ │ └── index.ts ├── rate │ ├── index.ts │ ├── demos │ │ ├── enUS │ │ │ ├── basic.demo.vue │ │ │ ├── allow-half.demo.vue │ │ │ ├── readonly.demo.vue │ │ │ ├── color.demo.vue │ │ │ └── clearable.demo.vue │ │ └── zhCN │ │ │ ├── basic.demo.vue │ │ │ ├── allow-half.demo.vue │ │ │ ├── readonly.demo.vue │ │ │ ├── color.demo.vue │ │ │ ├── clearable.demo.vue │ │ │ └── size.demo.vue │ ├── src │ │ └── interface.ts │ └── styles │ │ └── index.ts ├── time │ ├── index.ts │ └── demos │ │ ├── zhCN │ │ ├── timezone.demo.vue │ │ ├── basic.demo.vue │ │ └── type.demo.vue │ │ └── enUS │ │ ├── timezone.demo.vue │ │ ├── basic.demo.vue │ │ └── type.demo.vue ├── affix │ ├── index.ts │ └── src │ │ └── styles │ │ └── index.cssr.ts ├── badge │ ├── index.ts │ ├── demos │ │ ├── zhCN │ │ │ └── color.demo.vue │ │ └── enUS │ │ │ └── color.demo.vue │ └── styles │ │ ├── index.ts │ │ └── rtl.ts ├── dynamic-input │ ├── styles │ │ ├── _common.ts │ │ └── index.ts │ └── index.ts ├── log │ ├── index.ts │ ├── styles │ │ └── index.ts │ ├── src │ │ └── context.ts │ └── demos │ │ ├── zhCN │ │ └── size.demo.vue │ │ └── enUS │ │ └── size.demo.vue ├── space │ ├── index.ts │ ├── styles │ │ ├── _common.ts │ │ ├── index.ts │ │ ├── rtl.ts │ │ └── dark.ts │ ├── src │ │ └── styles │ │ │ └── rtl.cssr.ts │ └── demos │ │ ├── zhCN │ │ ├── reverse.demo.vue │ │ ├── vertical.demo.vue │ │ ├── center.demo.vue │ │ ├── from-end.demo.vue │ │ ├── space-between.demo.vue │ │ ├── space-around.demo.vue │ │ └── basic.demo.vue │ │ └── enUS │ │ ├── reverse.demo.vue │ │ ├── vertical.demo.vue │ │ ├── center.demo.vue │ │ ├── from-end.demo.vue │ │ ├── space-between.demo.vue │ │ ├── space-around.demo.vue │ │ └── basic.demo.vue ├── tag │ ├── index.ts │ ├── styles │ │ ├── index.ts │ │ └── rtl.ts │ └── demos │ │ ├── zhCN │ │ └── color.demo.vue │ │ └── enUS │ │ └── color.demo.vue ├── flex │ ├── styles │ │ ├── _common.ts │ │ ├── index.ts │ │ ├── rtl.ts │ │ └── dark.ts │ ├── src │ │ ├── styles │ │ │ └── rtl.cssr.ts │ │ └── type.ts │ ├── index.ts │ └── demos │ │ ├── zhCN │ │ ├── vertical.demo.vue │ │ ├── center.demo.vue │ │ ├── from-end.demo.vue │ │ ├── space-between.demo.vue │ │ ├── space-around.demo.vue │ │ └── basic.demo.vue │ │ └── enUS │ │ ├── vertical.demo.vue │ │ ├── from-end.demo.vue │ │ ├── center.demo.vue │ │ ├── space-between.demo.vue │ │ ├── space-around.demo.vue │ │ └── basic.demo.vue ├── layout │ ├── src │ │ └── LayoutContent.tsx │ ├── styles │ │ └── index.ts │ └── demos │ │ └── zhCN │ │ └── embedded.demo.vue ├── spin │ ├── index.ts │ ├── styles │ │ ├── index.ts │ │ └── dark.ts │ └── demos │ │ ├── zhCN │ │ └── basic.demo.vue │ │ └── enUS │ │ └── basic.demo.vue ├── anchor │ ├── styles │ │ ├── _common.ts │ │ ├── index.ts │ │ └── dark.ts │ ├── src │ │ └── public-types.tsx │ └── index.ts ├── highlight │ ├── index.ts │ └── src │ │ └── public-types.ts ├── qr-code │ ├── index.ts │ ├── styles │ │ └── index.ts │ └── src │ │ └── styles │ │ └── index.cssr.ts ├── themes │ ├── index.ts │ └── interface.ts ├── alert │ ├── index.ts │ ├── styles │ │ ├── index.ts │ │ ├── rtl.ts │ │ └── _common.ts │ └── demos │ │ ├── zhCN │ │ ├── no-icon.demo.vue │ │ └── marquee.demo.vue │ │ └── enUS │ │ └── no-icon.demo.vue ├── back-top │ ├── index.ts │ ├── styles │ │ ├── _common.ts │ │ └── index.ts │ └── demos │ │ ├── zhCN │ │ └── basic.demo.vue │ │ └── enUS │ │ └── basic.demo.vue ├── divider │ ├── index.ts │ ├── demos │ │ ├── zhCN │ │ │ ├── basic.demo.vue │ │ │ └── vertical.demo.vue │ │ └── enUS │ │ │ ├── basic.demo.vue │ │ │ └── vertical.demo.vue │ └── styles │ │ ├── index.ts │ │ └── dark.ts ├── empty │ ├── demos │ │ ├── enUS │ │ │ ├── locale-debug.demo.vue │ │ │ └── basic.demo.vue │ │ └── zhCN │ │ │ ├── locale-debug.demo.vue │ │ │ └── basic.demo.vue │ ├── index.ts │ └── styles │ │ ├── index.ts │ │ ├── _common.ts │ │ └── dark.ts ├── thing │ ├── index.ts │ ├── styles │ │ ├── index.ts │ │ └── dark.ts │ └── src │ │ └── styles │ │ └── rtl.cssr.ts ├── avatar │ ├── index.ts │ ├── src │ │ ├── interface.ts │ │ └── context.ts │ ├── styles │ │ ├── index.ts │ │ └── dark.ts │ └── demos │ │ ├── zhCN │ │ ├── badge.demo.vue │ │ ├── color.demo.vue │ │ ├── fallback.demo.vue │ │ └── icon.demo.vue │ │ └── enUS │ │ ├── badge.demo.vue │ │ ├── color.demo.vue │ │ └── fallback.demo.vue ├── card │ ├── index.ts │ ├── demos │ │ ├── zhCN │ │ │ ├── no-title.demo.vue │ │ │ ├── border.demo.vue │ │ │ ├── basic.demo.vue │ │ │ └── hoverable.demo.vue │ │ └── enUS │ │ │ ├── no-title.demo.vue │ │ │ ├── border.demo.vue │ │ │ ├── hoverable.demo.vue │ │ │ └── basic.demo.vue │ └── styles │ │ ├── index.ts │ │ └── rtl.ts ├── discrete │ └── index.ts ├── equation │ ├── index.ts │ └── styles │ │ ├── index.ts │ │ └── dark.ts ├── result │ ├── index.ts │ ├── styles │ │ ├── index.ts │ │ └── dark.ts │ └── demos │ │ ├── zhCN │ │ ├── error.demo.vue │ │ ├── success.demo.vue │ │ ├── s-404.demo.vue │ │ ├── size.demo.vue │ │ ├── s-418.demo.vue │ │ ├── s-403.demo.vue │ │ ├── info.demo.vue │ │ └── s-500.demo.vue │ │ └── enUS │ │ ├── error.demo.vue │ │ └── success.demo.vue ├── skeleton │ ├── index.ts │ ├── styles │ │ └── index.ts │ └── demos │ │ ├── zhCN │ │ └── basic.demo.vue │ │ └── enUS │ │ └── basic.demo.vue ├── switch │ ├── index.ts │ ├── src │ │ └── interface.ts │ ├── styles │ │ └── index.ts │ └── demos │ │ ├── zhCN │ │ ├── shape.demo.vue │ │ ├── size.demo.vue │ │ └── content.demo.vue │ │ └── enUS │ │ ├── shape.demo.vue │ │ └── size.demo.vue ├── color-picker │ ├── demos │ │ ├── zhCN │ │ │ ├── disabled.demo.vue │ │ │ ├── modes.demo.vue │ │ │ ├── basic.demo.vue │ │ │ ├── actions.demo.vue │ │ │ ├── native.demo.vue │ │ │ ├── close-debug.demo.vue │ │ │ ├── size.demo.vue │ │ │ └── swatches.demo.vue │ │ └── enUS │ │ │ ├── disabled.demo.vue │ │ │ ├── modes.demo.vue │ │ │ ├── basic.demo.vue │ │ │ ├── actions.demo.vue │ │ │ └── size.demo.vue │ ├── index.ts │ └── styles │ │ └── index.ts ├── icon-wrapper │ ├── index.ts │ └── styles │ │ ├── index.ts │ │ └── dark.ts ├── watermark │ ├── index.ts │ └── styles │ │ └── index.ts ├── image │ ├── styles │ │ └── index.ts │ └── demos │ │ ├── enUS │ │ └── basic.demo.vue │ │ └── zhCN │ │ ├── basic.demo.vue │ │ ├── full-debug.demo.vue │ │ └── preview-disabled.demo.vue ├── button-group │ ├── index.ts │ ├── styles │ │ ├── index.ts │ │ ├── rtl.ts │ │ └── dark.ts │ └── src │ │ └── context.ts ├── scrollbar │ └── index.ts ├── statistic │ ├── index.ts │ └── styles │ │ ├── index.ts │ │ ├── rtl.ts │ │ └── dark.ts ├── time-picker │ ├── styles │ │ ├── _common.ts │ │ └── index.ts │ ├── index.ts │ └── demos │ │ ├── enUS │ │ ├── hours12.demo.vue │ │ ├── basic.demo.vue │ │ └── format.demo.vue │ │ └── zhCN │ │ ├── hours12.demo.vue │ │ ├── basic.demo.vue │ │ ├── format.demo.vue │ │ └── status.demo.vue ├── gradient-text │ ├── index.ts │ └── styles │ │ └── index.ts ├── _styles │ └── common │ │ └── index.ts ├── carousel │ ├── src │ │ └── utils │ │ │ └── event.ts │ └── styles │ │ ├── index.ts │ │ └── dark.ts ├── element │ ├── styles │ │ ├── index.ts │ │ ├── dark.ts │ │ └── light.ts │ └── index.ts ├── heatmap │ ├── src │ │ ├── styles │ │ │ └── rtl.cssr.ts │ │ └── interface.ts │ ├── styles │ │ ├── index.ts │ │ └── rtl.ts │ └── index.ts ├── checkbox │ ├── src │ │ └── styles │ │ │ └── rtl.cssr.ts │ ├── styles │ │ ├── _common.ts │ │ ├── index.ts │ │ └── rtl.ts │ └── demos │ │ └── zhCN │ │ └── size.demo.vue ├── ellipsis │ ├── styles │ │ └── index.ts │ ├── index.ts │ └── demos │ │ └── zhCN │ │ ├── width-debug.demo.vue │ │ └── basic.demo.vue ├── float-button │ ├── index.ts │ └── styles │ │ └── index.ts ├── menu │ ├── styles │ │ └── index.ts │ └── index.ts ├── radio │ ├── src │ │ └── interface.ts │ └── styles │ │ ├── _common.ts │ │ ├── index.ts │ │ └── rtl.ts ├── tabs │ └── styles │ │ └── index.ts ├── virtual-list │ └── index.ts ├── input-number │ ├── src │ │ ├── styles │ │ │ └── rtl.cssr.ts │ │ └── interface.ts │ ├── index.ts │ ├── styles │ │ └── index.ts │ └── demos │ │ ├── zhCN │ │ ├── disable-keyboard.demo.vue │ │ ├── step.demo.vue │ │ ├── basic.demo.vue │ │ ├── status.demo.vue │ │ └── theme-debug.demo.vue │ │ └── enUS │ │ └── basic.demo.vue ├── modal │ ├── styles │ │ └── index.ts │ └── demos │ │ └── zhCN │ │ ├── dark-7-debug.demo.vue │ │ └── dark-8-debug.demo.vue ├── button │ ├── index.ts │ ├── demos │ │ ├── zhCN │ │ │ ├── disabled.demo.vue │ │ │ └── tag.demo.vue │ │ └── enUS │ │ │ └── disabled.demo.vue │ ├── styles │ │ ├── index.ts │ │ └── rtl.ts │ └── src │ │ └── interface.ts ├── input-otp │ ├── index.ts │ ├── src │ │ └── styles │ │ │ └── input-otp-rtl.cssr.ts │ ├── styles │ │ ├── index.ts │ │ └── rtl.ts │ ├── tests │ │ └── InputOtp.spec.tsx │ └── demos │ │ └── zhCN │ │ └── mask.demo.vue ├── input │ ├── styles │ │ ├── _common.ts │ │ ├── index.ts │ │ └── rtl.ts │ └── demos │ │ ├── zhCN │ │ ├── textarea-resize-debug.demo.vue │ │ ├── status.demo.vue │ │ └── round.demo.vue │ │ └── enUS │ │ └── status.demo.vue ├── progress │ ├── index.ts │ ├── styles │ │ └── index.ts │ ├── demos │ │ ├── zhCN │ │ │ ├── circle-offset.demo.vue │ │ │ └── processing.demo.vue │ │ └── enUS │ │ │ ├── circle-offset.demo.vue │ │ │ └── processing.demo.vue │ └── src │ │ └── public-types.ts ├── table │ ├── src │ │ ├── Td.tsx │ │ ├── Th.tsx │ │ ├── Tr.tsx │ │ ├── Tbody.tsx │ │ └── Thead.tsx │ └── styles │ │ ├── index.ts │ │ ├── _common.ts │ │ ├── rtl.ts │ │ └── dark.ts ├── infinite-scroll │ └── index.ts ├── mention │ ├── styles │ │ └── index.ts │ ├── index.ts │ ├── src │ │ └── interface.ts │ └── demos │ │ └── zhCN │ │ └── status.demo.vue ├── typography │ ├── src │ │ ├── li.tsx │ │ └── headers.ts │ └── styles │ │ ├── index.ts │ │ └── dark.ts ├── cascader │ ├── styles │ │ └── index.ts │ ├── index.ts │ └── demos │ │ └── zhCN │ │ └── status.demo.vue ├── dropdown │ └── styles │ │ └── index.ts ├── legacy-grid │ ├── styles │ │ ├── index.ts │ │ ├── rtl.ts │ │ ├── dark.ts │ │ └── light.ts │ └── index.ts ├── timeline │ ├── styles │ │ ├── index.ts │ │ └── _common.ts │ └── index.ts ├── transfer │ ├── styles │ │ └── index.ts │ └── index.ts ├── upload │ ├── src │ │ └── styles │ │ │ └── rtl.cssr.ts │ └── styles │ │ ├── index.ts │ │ └── rtl.ts ├── countdown │ └── index.ts ├── date-picker │ ├── demos │ │ ├── zhCN │ │ │ ├── panel.demo.vue │ │ │ └── status.demo.vue │ │ └── enUS │ │ │ ├── panel.demo.vue │ │ │ └── status.demo.vue │ ├── styles │ │ └── index.ts │ └── index.ts ├── popover │ ├── src │ │ └── styles │ │ │ └── rtl.cssr.ts │ ├── styles │ │ ├── _common.ts │ │ └── index.ts │ ├── demos │ │ ├── zhCN │ │ │ ├── basic.demo.vue │ │ │ └── no-arrow.demo.vue │ │ └── enUS │ │ │ └── no-arrow.demo.vue │ └── index.ts ├── popselect │ ├── src │ │ └── styles │ │ │ └── index.cssr.ts │ ├── styles │ │ └── index.ts │ └── index.ts ├── float-button-group │ ├── index.ts │ └── styles │ │ └── index.ts ├── loading-bar │ └── styles │ │ └── index.ts ├── dynamic-tags │ ├── styles │ │ └── index.ts │ ├── src │ │ └── styles │ │ │ └── index.cssr.ts │ ├── demos │ │ ├── zhCN │ │ │ ├── basic.demo.vue │ │ │ └── max.demo.vue │ │ └── enUS │ │ │ ├── basic.demo.vue │ │ │ └── max.demo.vue │ └── index.ts ├── list │ ├── styles │ │ ├── index.ts │ │ ├── rtl.ts │ │ └── dark.ts │ └── index.ts ├── tree │ └── styles │ │ ├── index.ts │ │ └── rtl.ts ├── auto-complete │ ├── styles │ │ └── index.ts │ └── demos │ │ └── zhCN │ │ └── status.demo.vue ├── collapse-transition │ ├── index.ts │ ├── src │ │ └── styles │ │ │ ├── rtl.cssr.ts │ │ │ └── index.cssr.ts │ └── styles │ │ ├── rtl.ts │ │ └── index.ts ├── descriptions │ └── styles │ │ └── index.ts ├── steps │ ├── styles │ │ ├── index.ts │ │ ├── rtl.ts │ │ └── dark.ts │ └── index.ts ├── locales │ └── date │ │ ├── eo.ts │ │ ├── viVN.ts │ │ ├── arDZ.ts │ │ ├── azAZ.ts │ │ ├── csCZ.ts │ │ ├── daDK.ts │ │ ├── deDE.ts │ │ ├── enGB.ts │ │ ├── esAR.ts │ │ ├── etEE.ts │ │ ├── faIR.ts │ │ ├── frFR.ts │ │ ├── idID.ts │ │ ├── itIT.ts │ │ ├── jaJP.ts │ │ ├── kmKH.ts │ │ ├── koKR.ts │ │ ├── nbNO.ts │ │ ├── nlNL.ts │ │ ├── plPL.ts │ │ ├── ptBR.ts │ │ ├── ruRU.ts │ │ ├── skSK.ts │ │ ├── svSE.ts │ │ ├── thTH.ts │ │ ├── trTR.ts │ │ ├── ugCN.ts │ │ ├── ukUA.ts │ │ ├── uzUZ.ts │ │ ├── zhCN.ts │ │ └── zhTW.ts ├── select │ ├── styles │ │ └── index.ts │ └── demos │ │ ├── zhCN │ │ ├── empty-debug.demo.vue │ │ └── status.demo.vue │ │ └── enUS │ │ └── status.demo.vue ├── message │ ├── styles │ │ ├── index.ts │ │ ├── rtl.ts │ │ ├── dark.ts │ │ └── _common.ts │ └── src │ │ └── styles │ │ └── rtl.cssr.ts ├── drawer │ └── styles │ │ └── index.ts ├── collapse │ └── styles │ │ ├── index.ts │ │ ├── rtl.ts │ │ └── dark.ts ├── grid │ ├── src │ │ └── config.ts │ └── index.ts ├── data-table │ ├── styles │ │ └── index.ts │ └── src │ │ └── publicTypes.ts ├── pagination │ ├── styles │ │ └── index.ts │ ├── demos │ │ ├── enUS │ │ │ ├── basic.demo.vue │ │ │ └── simple.demo.vue │ │ └── zhCN │ │ │ ├── basic.demo.vue │ │ │ ├── simple.demo.vue │ │ │ ├── prev.demo.vue │ │ │ └── item-count.demo.vue │ └── index.ts ├── tree-select │ ├── styles │ │ └── index.ts │ └── demos │ │ └── zhCN │ │ └── status.demo.vue ├── avatar-group │ ├── styles │ │ ├── index.ts │ │ └── rtl.ts │ └── index.ts ├── notification │ ├── styles │ │ ├── index.ts │ │ ├── rtl.ts │ │ └── _common.ts │ └── src │ │ └── context.ts ├── number-animation │ └── index.ts ├── tsconfig.esm.json ├── shims-vue.d.ts ├── tsconfig.cjs.json └── preset.ts ├── themes └── tusimple │ ├── .npmignore │ ├── src │ └── index.ts │ └── tsconfig.esm.json ├── umd-test └── setupVue.js ├── generic └── index.ts ├── vercel.json ├── demo ├── Caveat.md ├── assets │ └── images │ │ └── naivelogo.png ├── styles │ ├── Metropolis-Bold.woff2 │ └── Metropolis.css ├── utils │ └── github-url.js └── pages │ └── docs │ ├── vue3 │ ├── enUS │ │ └── index.vue │ └── zhCN │ │ └── index.vue │ ├── theme │ └── zhCN │ │ └── index.demo-entry.md │ └── changelog │ ├── enUS │ └── index.vue │ └── zhCN │ └── index.vue ├── scripts ├── post-build-site │ └── post-build-site.sh ├── pre-build │ └── pre-cjs-build.ts ├── md-to-vue.ts └── gen-version.ts ├── playground ├── ssr │ ├── client.js │ ├── build.sh │ ├── pre-build.sh │ └── readme.md ├── testColor.js └── collect-vars.js ├── tsconfig.test.json ├── .prettierrc ├── tsconfig.esbuild.json ├── tsconfig.cjs.json └── tsconfig.esm.json /.npmrc: -------------------------------------------------------------------------------- 1 | shell-emulator=true -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | pnpm exec lint-staged 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | *.cssr.js 2 | *.cssr.ts 3 | -------------------------------------------------------------------------------- /src/version.ts: -------------------------------------------------------------------------------- 1 | export default '2.43.2' 2 | -------------------------------------------------------------------------------- /themes/tusimple/.npmignore: -------------------------------------------------------------------------------- 1 | ~* 2 | *.tsbuildinfo -------------------------------------------------------------------------------- /src/_internal/clear/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './src/Clear' 2 | -------------------------------------------------------------------------------- /src/_internal/suffix/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './src/Suffix' 2 | -------------------------------------------------------------------------------- /src/_mixins/common.ts: -------------------------------------------------------------------------------- 1 | export const cssrAnchorMetaName = 'naive-ui-style' 2 | -------------------------------------------------------------------------------- /src/composables/index.ts: -------------------------------------------------------------------------------- 1 | export { useThemeVars } from './use-theme-vars' 2 | -------------------------------------------------------------------------------- /src/dialog/src/interface.ts: -------------------------------------------------------------------------------- 1 | export type IconPlacement = 'left' | 'top' 2 | -------------------------------------------------------------------------------- /umd-test/setupVue.js: -------------------------------------------------------------------------------- 1 | import * as Vue from 'vue' 2 | 3 | window.Vue = Vue 4 | -------------------------------------------------------------------------------- /generic/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NGAvatarGroup } from './AvatarGroup.vue' 2 | -------------------------------------------------------------------------------- /src/_internal/icon/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NBaseIcon } from './src/Icon' 2 | -------------------------------------------------------------------------------- /src/_internal/slot-machine/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './src/SlotMachine' 2 | -------------------------------------------------------------------------------- /src/marquee/src/public-types.ts: -------------------------------------------------------------------------------- 1 | export type { MarqueeProps } from './props' 2 | -------------------------------------------------------------------------------- /src/popconfirm/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | iconSize: '22px' 3 | } 4 | -------------------------------------------------------------------------------- /src/tooltip/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | padding: '8px 14px' 3 | } 4 | -------------------------------------------------------------------------------- /src/_internal/close/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NBaseClose } from './src/Close' 2 | -------------------------------------------------------------------------------- /src/calendar/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | titleFontSize: '22px' 3 | } 4 | -------------------------------------------------------------------------------- /src/breadcrumb/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | fontWeightActive: '400' 3 | } 4 | -------------------------------------------------------------------------------- /src/global-style/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NGlobalStyle } from './src/GlobalStyle' 2 | -------------------------------------------------------------------------------- /src/global.d.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | 3 | declare global { 4 | const __DEV__: boolean 5 | } 6 | -------------------------------------------------------------------------------- /src/split/src/types.ts: -------------------------------------------------------------------------------- 1 | export type SplitOnUpdateSize = (size: string & number) => void 2 | -------------------------------------------------------------------------------- /src/theme-editor/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NThemeEditor } from './src/ThemeEditor' 2 | -------------------------------------------------------------------------------- /src/slider/src/interface.ts: -------------------------------------------------------------------------------- 1 | export type OnUpdateValueImpl = (value: number | number[]) => void 2 | -------------------------------------------------------------------------------- /vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }] 3 | } 4 | -------------------------------------------------------------------------------- /src/_internal/README.md: -------------------------------------------------------------------------------- 1 | Themeable components: 2 | 3 | - selection 4 | - select-menu 5 | - clear 6 | -------------------------------------------------------------------------------- /src/_internal/icon-switch-transition/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './src/IconSwitchTransition' 2 | -------------------------------------------------------------------------------- /src/form/src/public-types.ts: -------------------------------------------------------------------------------- 1 | export type FormValidationStatus = 'success' | 'error' | 'warning' 2 | -------------------------------------------------------------------------------- /src/_internal/fade-in-expand-transition/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './src/FadeInExpandTransition' 2 | -------------------------------------------------------------------------------- /src/_utils/dom/index.ts: -------------------------------------------------------------------------------- 1 | export { download } from './download' 2 | export { isDocument } from './is-document' 3 | -------------------------------------------------------------------------------- /src/config-provider/src/katex.ts: -------------------------------------------------------------------------------- 1 | import type katex from 'katex' 2 | 3 | export type Katex = typeof katex 4 | -------------------------------------------------------------------------------- /src/page-header/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | titleFontSize: '18px', 3 | backSize: '22px' 4 | } 5 | -------------------------------------------------------------------------------- /demo/Caveat.md: -------------------------------------------------------------------------------- 1 | # Caveat 2 | 3 | Code is messy here because I've no time to refactor it. 4 | 5 | It works matter. 6 | -------------------------------------------------------------------------------- /demo/assets/images/naivelogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tusen-ai/naive-ui/HEAD/demo/assets/images/naivelogo.png -------------------------------------------------------------------------------- /scripts/post-build-site/post-build-site.sh: -------------------------------------------------------------------------------- 1 | cp site/index.html site/404.html 2 | 3 | rm -rf node_modules/naive-ui 4 | -------------------------------------------------------------------------------- /src/_internal/wave/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './src/Wave' 2 | export type { BaseWaveRef } from './src/Wave' 3 | -------------------------------------------------------------------------------- /src/icon/index.ts: -------------------------------------------------------------------------------- 1 | export { iconProps, NIcon } from './src/Icon' 2 | export type { IconProps } from './src/Icon' 3 | -------------------------------------------------------------------------------- /src/legacy-transfer/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | extraFontSize: '12px', 3 | width: '440px' 4 | } 5 | -------------------------------------------------------------------------------- /demo/styles/Metropolis-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tusen-ai/naive-ui/HEAD/demo/styles/Metropolis-Bold.woff2 -------------------------------------------------------------------------------- /src/marquee/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NMarquee } from './src/Marquee' 2 | export type * from './src/public-types' 3 | -------------------------------------------------------------------------------- /playground/ssr/client.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './app' 3 | 4 | createApp(App).mount('#app') 5 | -------------------------------------------------------------------------------- /src/_internal/focus-detector/index.tsx: -------------------------------------------------------------------------------- 1 | import FocusDetector from './src/FocusDetector' 2 | 3 | export default FocusDetector 4 | -------------------------------------------------------------------------------- /src/_utils/env/is-browser.ts: -------------------------------------------------------------------------------- 1 | export const isBrowser 2 | = typeof document !== 'undefined' && typeof window !== 'undefined' 3 | -------------------------------------------------------------------------------- /src/code/index.ts: -------------------------------------------------------------------------------- 1 | export { codeProps, default as NCode } from './src/Code' 2 | export type { CodeProps } from './src/Code' 3 | -------------------------------------------------------------------------------- /src/rate/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NRate, rateProps } from './src/Rate' 2 | export type { RateProps } from './src/Rate' 3 | -------------------------------------------------------------------------------- /src/time/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NTime, timeProps } from './src/Time' 2 | export type { TimeProps } from './src/Time' 3 | -------------------------------------------------------------------------------- /tsconfig.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "jsx": "react" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/_internal/menu-mask/index.ts: -------------------------------------------------------------------------------- 1 | export type { MenuMaskRef } from './src/interface' 2 | export { default } from './src/MenuMask' 3 | -------------------------------------------------------------------------------- /src/affix/index.ts: -------------------------------------------------------------------------------- 1 | export { affixProps, default as NAffix } from './src/Affix' 2 | export type { AffixProps } from './src/Affix' 3 | -------------------------------------------------------------------------------- /src/badge/index.ts: -------------------------------------------------------------------------------- 1 | export { badgeProps, default as NBadge } from './src/Badge' 2 | export type { BadgeProps } from './src/Badge' 3 | -------------------------------------------------------------------------------- /src/dynamic-input/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | actionMargin: '0 0 0 20px', 3 | actionMarginRtl: '0 20px 0 0' 4 | } 5 | -------------------------------------------------------------------------------- /src/log/index.ts: -------------------------------------------------------------------------------- 1 | export { logProps, default as NLog } from './src/Log' 2 | export type { LogInst, LogProps } from './src/Log' 3 | -------------------------------------------------------------------------------- /src/rate/demos/enUS/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Basic 3 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /src/rate/demos/zhCN/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 基础用法 3 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /src/space/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NSpace, spaceProps } from './src/Space' 2 | export type { SpaceProps } from './src/Space' 3 | -------------------------------------------------------------------------------- /src/tag/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NTag, tagProps } from './src/Tag' 2 | export type { TagProps, TagSlots } from './src/Tag' 3 | -------------------------------------------------------------------------------- /playground/ssr/build.sh: -------------------------------------------------------------------------------- 1 | webpack ./client.js --mode=development --output-filename=client.js 2 | webpack --config ./webpack.config.server.js -------------------------------------------------------------------------------- /playground/ssr/pre-build.sh: -------------------------------------------------------------------------------- 1 | # make sure cwd is the sh's dir 2 | 3 | cd ./../../ 4 | 5 | ./scripts/pre-build-site/pre-build-site.sh 6 | -------------------------------------------------------------------------------- /src/flex/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | gapSmall: '4px 8px', 3 | gapMedium: '8px 12px', 4 | gapLarge: '12px 16px' 5 | } 6 | -------------------------------------------------------------------------------- /src/layout/src/LayoutContent.tsx: -------------------------------------------------------------------------------- 1 | import { createLayoutComponent } from './Layout' 2 | 3 | export default createLayoutComponent(true) 4 | -------------------------------------------------------------------------------- /src/space/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | gapSmall: '4px 8px', 3 | gapMedium: '8px 12px', 4 | gapLarge: '12px 16px' 5 | } 6 | -------------------------------------------------------------------------------- /src/spin/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NSpin, spinProps } from './src/Spin' 2 | export type { SpinProps, SpinSlots } from './src/Spin' 3 | -------------------------------------------------------------------------------- /demo/utils/github-url.js: -------------------------------------------------------------------------------- 1 | export const repoUrl = 'https://github.com/tusen-ai/naive-ui' 2 | export const blobUrl = `${repoUrl}/blob/main/` 3 | -------------------------------------------------------------------------------- /src/_internal/loading/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './src/Loading' 2 | export type { BaseLoadingExposedProps } from './src/Loading' 3 | -------------------------------------------------------------------------------- /src/_internal/menu-mask/src/interface.ts: -------------------------------------------------------------------------------- 1 | export interface MenuMaskRef { 2 | showOnce: (message: string, duration?: number) => void 3 | } 4 | -------------------------------------------------------------------------------- /src/_internal/selection/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './src/Selection' 2 | export type { InternalSelectionInst } from './src/Selection' 3 | -------------------------------------------------------------------------------- /src/_utils/dom/is-document.ts: -------------------------------------------------------------------------------- 1 | export function isDocument(node: Node): node is Document { 2 | return node.nodeName === '#document' 3 | } 4 | -------------------------------------------------------------------------------- /src/anchor/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | linkFontSize: '13px', 3 | linkPadding: '0 0 0 16px', 4 | railWidth: '4px' 5 | } 6 | -------------------------------------------------------------------------------- /src/highlight/index.ts: -------------------------------------------------------------------------------- 1 | export { highlightProps, default as NHighlight } from './src/Highlight' 2 | export type * from './src/public-types' 3 | -------------------------------------------------------------------------------- /src/qr-code/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NQrCode, qrCodeProps } from './src/QrCode' 2 | export type { QrCodeProps } from './src/QrCode' 3 | -------------------------------------------------------------------------------- /src/themes/index.ts: -------------------------------------------------------------------------------- 1 | export { darkTheme } from './dark' 2 | export { lightTheme } from './light' 3 | export { createTheme } from './utils' 4 | -------------------------------------------------------------------------------- /demo/styles/Metropolis.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Metropolis'; 3 | font-weight: 600; 4 | src: url('./Metropolis-Bold.woff2'); 5 | } -------------------------------------------------------------------------------- /src/_internal/select-menu/index.ts: -------------------------------------------------------------------------------- 1 | export type { InternalSelectMenuRef } from './src/interface' 2 | export { default } from './src/SelectMenu' 3 | -------------------------------------------------------------------------------- /src/_utils/css/color-to-class.ts: -------------------------------------------------------------------------------- 1 | export function color2Class(color: string): string { 2 | return color.replace(/#|\(|\)|,|\s|\./g, '_') 3 | } 4 | -------------------------------------------------------------------------------- /src/alert/index.ts: -------------------------------------------------------------------------------- 1 | export { alertProps, default as NAlert } from './src/Alert' 2 | export type { AlertProps, AlertSlots } from './src/Alert' 3 | -------------------------------------------------------------------------------- /src/back-top/index.ts: -------------------------------------------------------------------------------- 1 | export { backTopProps, default as NBackTop } from './src/BackTop' 2 | export type { BackTopProps } from './src/BackTop' 3 | -------------------------------------------------------------------------------- /src/divider/index.ts: -------------------------------------------------------------------------------- 1 | export { dividerProps, default as NDivider } from './src/Divider' 2 | export type { DividerProps } from './src/Divider' 3 | -------------------------------------------------------------------------------- /src/empty/demos/enUS/locale-debug.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Locale Debug 3 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /src/empty/demos/zhCN/locale-debug.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Locale Debug 3 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /src/empty/index.ts: -------------------------------------------------------------------------------- 1 | export { emptyProps, default as NEmpty } from './src/Empty' 2 | export type { EmptyProps, EmptySlots } from './src/Empty' 3 | -------------------------------------------------------------------------------- /src/rate/demos/zhCN/allow-half.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 允许半颗 3 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /src/thing/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NThing, thingProps } from './src/Thing' 2 | export type { ThingProps, ThingSlots } from './src/Thing' 3 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "singleQuote": true, 4 | "printWidth": 80, 5 | "trailingComma": "none", 6 | "proseWrap": "never" 7 | } 8 | -------------------------------------------------------------------------------- /src/avatar/index.ts: -------------------------------------------------------------------------------- 1 | export { avatarProps, default as NAvatar } from './src/Avatar' 2 | export type { AvatarProps, AvatarSlots } from './src/Avatar' 3 | -------------------------------------------------------------------------------- /src/back-top/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | width: '44px', 3 | height: '44px', 4 | borderRadius: '22px', 5 | iconSize: '26px' 6 | } 7 | -------------------------------------------------------------------------------- /src/calendar/index.ts: -------------------------------------------------------------------------------- 1 | export { calendarProps, default as NCalendar } from './src/Calendar' 2 | export type { CalendarProps } from './src/Calendar' 3 | -------------------------------------------------------------------------------- /src/card/index.ts: -------------------------------------------------------------------------------- 1 | export { cardProps, default as NCard } from './src/Card' 2 | export type { CardProps, CardSegmented, CardSlots } from './src/Card' 3 | -------------------------------------------------------------------------------- /src/discrete/index.ts: -------------------------------------------------------------------------------- 1 | export { createDiscreteApi } from './src/discrete' 2 | export type { DiscreteApi, DiscreteApiOptions } from './src/interface' 3 | -------------------------------------------------------------------------------- /src/equation/index.ts: -------------------------------------------------------------------------------- 1 | export { equationProps, Equation as NEquation } from './src/Equation' 2 | export type { EquationProps } from './src/Equation' 3 | -------------------------------------------------------------------------------- /src/result/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NResult, resultProps } from './src/Result' 2 | export type { ResultProps, ResultSlots } from './src/Result' 3 | -------------------------------------------------------------------------------- /src/skeleton/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NSkeleton, skeletonProps } from './src/Skeleton' 2 | export type { SkeletonProps } from './src/Skeleton' 3 | -------------------------------------------------------------------------------- /src/slider/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NSlider, sliderProps } from './src/Slider' 2 | export type { SliderProps, SliderSlots } from './src/Slider' 3 | -------------------------------------------------------------------------------- /src/switch/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NSwitch, switchProps } from './src/Switch' 2 | export type { SwitchProps, SwitchSlots } from './src/Switch' 3 | -------------------------------------------------------------------------------- /src/color-picker/demos/zhCN/disabled.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 禁用 3 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /src/icon-wrapper/index.ts: -------------------------------------------------------------------------------- 1 | export { iconWrapperProps, NIconWrapper } from './src/IconWrapper' 2 | export type { IconWrapperProps } from './src/IconWrapper' 3 | -------------------------------------------------------------------------------- /src/rate/demos/zhCN/readonly.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 只读 3 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /src/watermark/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NWatermark, watermarkProps } from './src/Watermark' 2 | export type { WatermarkProps } from './src/Watermark' 3 | -------------------------------------------------------------------------------- /src/color-picker/demos/enUS/disabled.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Disabled 3 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /src/divider/demos/zhCN/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 基础 3 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /src/page-header/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import rtlStyle from '../src/styles/rtl.cssr' 2 | 3 | export default { 4 | name: 'PageHeader', 5 | style: rtlStyle 6 | } 7 | -------------------------------------------------------------------------------- /src/rate/src/interface.ts: -------------------------------------------------------------------------------- 1 | export type RateOnUpdateValue = (value: number & null) => void 2 | export type RateOnUpdateValueImpl = (value: number | null) => void 3 | -------------------------------------------------------------------------------- /src/slider/demos/zhCN/disabled.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 禁用 3 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /src/_utils/css/index.ts: -------------------------------------------------------------------------------- 1 | export { color2Class } from './color-to-class' 2 | export { formatLength } from './format-length' 3 | export { rtlInset } from './rtl-inset' 4 | -------------------------------------------------------------------------------- /src/_utils/vue/create-data-key.ts: -------------------------------------------------------------------------------- 1 | export function createDataKey(key: string | number): string { 2 | return typeof key === 'string' ? `s-${key}` : `n-${key}` 3 | } 4 | -------------------------------------------------------------------------------- /src/_utils/vue/keysOf.ts: -------------------------------------------------------------------------------- 1 | export function keysOf>( 2 | obj: T 3 | ): Array { 4 | return Object.keys(obj) as any 5 | } 6 | -------------------------------------------------------------------------------- /src/divider/demos/enUS/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Basic 3 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /src/image/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { imageDark } from './dark' 2 | export { imageLight } from './light' 3 | export type { ImageTheme, ImageThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/rate/demos/enUS/allow-half.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Allow Selecting Half Star 3 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /src/rate/demos/enUS/readonly.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Readonly 3 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /src/avatar/src/interface.ts: -------------------------------------------------------------------------------- 1 | export type Size = number | 'small' | 'medium' | 'large' 2 | export type ObjectFit = 'fill' | 'contain' | 'cover' | 'none' | 'scale-down' 3 | -------------------------------------------------------------------------------- /src/button-group/index.ts: -------------------------------------------------------------------------------- 1 | export { buttonGroupProps, default as NButtonGroup } from './src/ButtonGroup' 2 | export type { ButtonGroupProps } from './src/ButtonGroup' 3 | -------------------------------------------------------------------------------- /src/rate/demos/zhCN/color.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 颜色 3 | 4 | 灾难就是这么发生的。 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/scrollbar/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NScrollbar, scrollbarProps } from './src/Scrollbar' 2 | export type { ScrollbarInst, ScrollbarProps } from './src/Scrollbar' 3 | -------------------------------------------------------------------------------- /src/slider/demos/enUS/disabled.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Disabled 3 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /src/statistic/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NStatistic, statisticProps } from './src/Statistic' 2 | export type { StatisticProps, StatisticSlots } from './src/Statistic' 3 | -------------------------------------------------------------------------------- /src/time-picker/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | itemFontSize: '12px', 3 | itemHeight: '36px', 4 | itemWidth: '52px', 5 | panelActionPadding: '8px 0' 6 | } 7 | -------------------------------------------------------------------------------- /src/tooltip/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NTooltip, tooltipProps } from './src/Tooltip' 2 | export type { TooltipInst, TooltipProps, TooltipSlots } from './src/Tooltip' 3 | -------------------------------------------------------------------------------- /src/anchor/src/public-types.tsx: -------------------------------------------------------------------------------- 1 | import type { VNode } from 'vue' 2 | 3 | export interface AnchorLinkSlots { 4 | default?: () => VNode[] 5 | title?: () => VNode[] 6 | } 7 | -------------------------------------------------------------------------------- /src/card/demos/zhCN/no-title.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 没有标题 3 | 4 | 谁说卡片一定要有标题呢。 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/flex/src/styles/rtl.cssr.ts: -------------------------------------------------------------------------------- 1 | import { cB, cM } from '../../../_utils/cssr' 2 | 3 | export default cB('space', [ 4 | cM('rtl', ` 5 | direction: rtl; 6 | `) 7 | ]) 8 | -------------------------------------------------------------------------------- /src/flex/src/type.ts: -------------------------------------------------------------------------------- 1 | import type { Property } from 'csstype' 2 | 3 | export type FlexAlign = Property.AlignItems 4 | 5 | export type FlexJustify = Property.JustifyContent 6 | -------------------------------------------------------------------------------- /src/gradient-text/index.ts: -------------------------------------------------------------------------------- 1 | export { gradientTextProps, default as NGradientText } from './src/GradientText' 2 | export type { GradientTextProps } from './src/GradientText' 3 | -------------------------------------------------------------------------------- /src/space/src/styles/rtl.cssr.ts: -------------------------------------------------------------------------------- 1 | import { cB, cM } from '../../../_utils/cssr' 2 | 3 | export default cB('space', [ 4 | cM('rtl', ` 5 | direction: rtl; 6 | `) 7 | ]) 8 | -------------------------------------------------------------------------------- /src/_styles/common/index.ts: -------------------------------------------------------------------------------- 1 | export { default as commonDark } from './dark' 2 | export { default as commonLight } from './light' 3 | export type { ThemeCommonVars } from './light' 4 | -------------------------------------------------------------------------------- /src/carousel/src/utils/event.ts: -------------------------------------------------------------------------------- 1 | export function isTouchEvent(e: MouseEvent | TouchEvent): e is TouchEvent { 2 | return window.TouchEvent && e instanceof window.TouchEvent 3 | } 4 | -------------------------------------------------------------------------------- /src/element/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as elementDark } from './dark' 2 | export { default as elementLight } from './light' 3 | export type { ElementTheme } from './light' 4 | -------------------------------------------------------------------------------- /src/heatmap/src/styles/rtl.cssr.ts: -------------------------------------------------------------------------------- 1 | import { cB, cM } from '../../../_utils/cssr' 2 | 3 | export default cB('heatmap', [ 4 | cM('rtl', ` 5 | direction: rtl; 6 | `) 7 | ]) 8 | -------------------------------------------------------------------------------- /src/log/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as logDark } from './dark' 2 | export { default as logLight } from './light' 3 | export type { LogTheme, LogThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/page-header/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NPageHeader, pageHeaderProps } from './src/PageHeader' 2 | export type { PageHeaderProps, PageHeaderSlots } from './src/PageHeader' 3 | -------------------------------------------------------------------------------- /src/skeleton/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { skeletonDark } from './dark' 2 | export { skeletonLight } from './light' 3 | export type { SkeletonTheme, SkeletonThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/switch/src/interface.ts: -------------------------------------------------------------------------------- 1 | export type OnUpdateValue = (value: string & number & boolean) => void 2 | export type OnUpdateValueImpl = (value: string | number | boolean) => void 3 | -------------------------------------------------------------------------------- /src/checkbox/src/styles/rtl.cssr.ts: -------------------------------------------------------------------------------- 1 | import { cB, cM } from '../../../_utils/cssr' 2 | 3 | export default cB('checkbox', [ 4 | cM('rtl', ` 5 | direction: rtl; 6 | `) 7 | ]) 8 | -------------------------------------------------------------------------------- /src/code/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as codeDark } from './dark' 2 | export { default as codeLight } from './light' 3 | export type { CodeTheme, CodeThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/color-picker/index.ts: -------------------------------------------------------------------------------- 1 | export { colorPickerProps, default as NColorPicker } from './src/ColorPicker' 2 | export type { ColorPickerProps, ColorPickerSlots } from './src/ColorPicker' 3 | -------------------------------------------------------------------------------- /src/divider/demos/zhCN/vertical.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 垂直 3 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /src/ellipsis/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ellipsisDark } from './dark' 2 | export { default as ellipsisLight } from './light' 3 | export type { EllipsisTheme } from './light' 4 | -------------------------------------------------------------------------------- /src/flex/index.ts: -------------------------------------------------------------------------------- 1 | export { flexProps, default as NFlex } from './src/Flex' 2 | export type { FlexProps } from './src/Flex' 3 | export type { FlexAlign, FlexJustify } from './src/type' 4 | -------------------------------------------------------------------------------- /src/float-button/index.ts: -------------------------------------------------------------------------------- 1 | export { floatButtonProps, default as NFloatButton } from './src/FloatButton' 2 | export type { FloatButtonProps, FloatButtonSlots } from './src/FloatButton' 3 | -------------------------------------------------------------------------------- /src/form/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as formDark } from './dark' 2 | export { default as formLight } from './light' 3 | export type { FormTheme, FormThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/icon/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as iconDark } from './dark' 2 | export { default as iconLight } from './light' 3 | export type { IconTheme, IconThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/menu/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as menuDark } from './dark' 2 | export { default as menuLight } from './light' 3 | export type { MenuTheme, MenuThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/radio/src/interface.ts: -------------------------------------------------------------------------------- 1 | export type OnUpdateValue = (value: string & number & boolean) => void 2 | 3 | export type OnUpdateValueImpl = (value: string | number | boolean) => void 4 | -------------------------------------------------------------------------------- /src/rate/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as rateDark } from './dark' 2 | export { default as rateLight } from './light' 3 | export type { RateTheme, RateThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/spin/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as spinDark } from './dark' 2 | export { default as spinLight } from './light' 3 | export type { SpinTheme, SpinThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/tabs/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as tabsDark } from './dark' 2 | export { default as tabsLight } from './light' 3 | export type { TabsTheme, TabsThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/virtual-list/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NVirtualList, virtualListProps } from './src/VirtualList' 2 | export type { VirtualListInst, VirtualListProps } from './src/VirtualList' 3 | -------------------------------------------------------------------------------- /src/_utils/env/is-native-lazy-load.ts: -------------------------------------------------------------------------------- 1 | import { isBrowser } from './is-browser' 2 | 3 | export const isImageSupportNativeLazy 4 | = isBrowser && 'loading' in document.createElement('img') 5 | -------------------------------------------------------------------------------- /src/_utils/vue/create-injection-key.ts: -------------------------------------------------------------------------------- 1 | import type { InjectionKey } from 'vue' 2 | 3 | export function createInjectionKey(key: string): InjectionKey { 4 | return key as any 5 | } 6 | -------------------------------------------------------------------------------- /src/_utils/vue/wrapper.tsx: -------------------------------------------------------------------------------- 1 | import { defineComponent } from 'vue' 2 | 3 | export const Wrapper = defineComponent({ 4 | render() { 5 | return this.$slots.default?.() 6 | } 7 | }) 8 | -------------------------------------------------------------------------------- /src/button-group/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as buttonGroupDark } from './dark' 2 | export { default as buttonGroupLight } from './light' 3 | export { buttonGroupRtl } from './rtl' 4 | -------------------------------------------------------------------------------- /src/checkbox/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | sizeSmall: '14px', 3 | sizeMedium: '16px', 4 | sizeLarge: '18px', 5 | labelPadding: '0 8px', 6 | labelFontWeight: '400' 7 | } 8 | -------------------------------------------------------------------------------- /src/empty/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as emptyDark } from './dark' 2 | export { default as emptyLight } from './light' 3 | export type { EmptyTheme, EmptyThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/input-number/src/styles/rtl.cssr.ts: -------------------------------------------------------------------------------- 1 | import { cB, cM } from '../../../_utils/cssr' 2 | 3 | export default cB('input-number', [ 4 | cM('rtl', ` 5 | direction: rtl; 6 | `) 7 | ]) 8 | -------------------------------------------------------------------------------- /src/modal/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as modalDark } from './dark' 2 | export { default as modalLight } from './light' 3 | export type { ModalTheme, ModalThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/rate/demos/enUS/color.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Color 3 | 4 | This can end in disaster. 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/split/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as splitDark } from './dark' 2 | export { default as splitLight } from './light' 3 | export type { SplitTheme, SplitThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/watermark/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as watermarkDark } from './dark' 2 | export { default as watermarkLight } from './light' 3 | export type { WatermarkTheme } from './light' 4 | -------------------------------------------------------------------------------- /src/_internal/selection/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | paddingSingle: '0 26px 0 12px', 3 | paddingMultiple: '3px 26px 0 12px', 4 | clearSize: '16px', 5 | arrowSize: '16px' 6 | } 7 | -------------------------------------------------------------------------------- /src/anchor/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as anchorDark } from './dark' 2 | export { default as anchorLight } from './light' 3 | export type { AnchorTheme, AnchorThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/avatar/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as avatarDark } from './dark' 2 | export { default as avatarLight } from './light' 3 | export type { AvatarTheme, AvatarThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/button/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | buttonProps, 3 | default as NButton, 4 | XButton as NxButton 5 | } from './src/Button' 6 | export type { ButtonProps, ButtonSlots } from './src/Button' 7 | -------------------------------------------------------------------------------- /src/element/index.ts: -------------------------------------------------------------------------------- 1 | export { elementProps, default as NElement } from './src/Element' 2 | export { default as NEl } from './src/Element' 3 | export type { ElementProps } from './src/Element' 4 | -------------------------------------------------------------------------------- /src/empty/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | iconSizeTiny: '28px', 3 | iconSizeSmall: '34px', 4 | iconSizeMedium: '40px', 5 | iconSizeLarge: '46px', 6 | iconSizeHuge: '52px' 7 | } 8 | -------------------------------------------------------------------------------- /src/input-otp/index.ts: -------------------------------------------------------------------------------- 1 | export { inputOtpProps, default as NInputOtp } from './src/InputOtp' 2 | export type { InputOtpProps } from './src/InputOtp' 3 | export type * from './src/public-types' 4 | -------------------------------------------------------------------------------- /src/input/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | paddingTiny: '0 8px', 3 | paddingSmall: '0 10px', 4 | paddingMedium: '0 12px', 5 | paddingLarge: '0 14px', 6 | clearSize: '16px' 7 | } 8 | -------------------------------------------------------------------------------- /src/layout/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as layoutDark } from './dark' 2 | export { default as layoutLight } from './light' 3 | export type { LayoutTheme, LayoutThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/progress/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NProgress, progressProps } from './src/Progress' 2 | export type { ProgressProps } from './src/Progress' 3 | export type * from './src/public-types' 4 | -------------------------------------------------------------------------------- /src/qr-code/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as qrcodeDark } from './dark' 2 | export { default as qrcodeLight } from './light' 3 | export type { QrCodeTheme, QrCodeThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/result/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as resultDark } from './dark' 2 | export { default as resultLight } from './light' 3 | export type { ResultTheme, ResultThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/slider/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as sliderDark } from './dark' 2 | export { default as sliderLight } from './light' 3 | export type { SliderTheme, SliderThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/switch/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as switchDark } from './dark' 2 | export { default as switchLight } from './light' 3 | export type { SwitchTheme, SwitchThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/table/src/Td.tsx: -------------------------------------------------------------------------------- 1 | import { defineComponent, h } from 'vue' 2 | 3 | export default defineComponent({ 4 | name: 'Td', 5 | render() { 6 | return {this.$slots} 7 | } 8 | }) 9 | -------------------------------------------------------------------------------- /src/table/src/Th.tsx: -------------------------------------------------------------------------------- 1 | import { defineComponent, h } from 'vue' 2 | 3 | export default defineComponent({ 4 | name: 'Th', 5 | render() { 6 | return {this.$slots} 7 | } 8 | }) 9 | -------------------------------------------------------------------------------- /src/table/src/Tr.tsx: -------------------------------------------------------------------------------- 1 | import { defineComponent, h } from 'vue' 2 | 3 | export default defineComponent({ 4 | name: 'Tr', 5 | render() { 6 | return {this.$slots} 7 | } 8 | }) 9 | -------------------------------------------------------------------------------- /themes/tusimple/src/index.ts: -------------------------------------------------------------------------------- 1 | export { default as TsConfigProvider } from './TsConfigProvider' 2 | export { useDialog } from './use-ts-dialog' 3 | export { useMessage } from './use-ts-message' 4 | -------------------------------------------------------------------------------- /tsconfig.esbuild.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "jsx": "react", 5 | "jsxFactory": "h", 6 | "jsxFragmentFactory": "Fragment" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/back-top/demos/zhCN/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 基础用法 3 | 4 | BackTop 会找到首个可滚动的祖先元素并且监听它的滚动事件。 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/back-top/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as backTopDark } from './dark' 2 | export { default as backTopLight } from './light' 3 | export type { BackTopTheme, BackTopThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/badge/demos/zhCN/color.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 自定义颜色 3 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /src/button/demos/zhCN/disabled.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 禁用 3 | 4 | 按钮可以被禁用。 5 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /src/color-picker/demos/zhCN/modes.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 设定模式 3 | 4 | 使用 `modes` 设定可选模式。 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/divider/demos/enUS/vertical.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Vertical 3 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /src/divider/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as dividerDark } from './dark' 2 | export { default as dividerLight } from './light' 3 | export type { DividerTheme, DividerThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/heatmap/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as heatmapDark } from './dark' 2 | export { default as heatmapLight } from './light' 3 | export type { HeatmapTheme, HeatmapThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/infinite-scroll/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | infiniteScrollProps, 3 | default as NInfiniteScroll 4 | } from './src/InfiniteScroll' 5 | export type { InfiniteScrollProps } from './src/InfiniteScroll' 6 | -------------------------------------------------------------------------------- /src/marquee/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as marqueeDark } from './dark' 2 | export { default as marqueeLight } from './light' 3 | export type { MarqueeTheme, MarqueeThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/mention/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as mentionDark } from './dark' 2 | export { default as mentionLight } from './light' 3 | export type { MentionTheme, MentionThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/radio/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | radioSizeSmall: '14px', 3 | radioSizeMedium: '16px', 4 | radioSizeLarge: '18px', 5 | labelPadding: '0 8px', 6 | labelFontWeight: '400' 7 | } 8 | -------------------------------------------------------------------------------- /src/split/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NSplit, splitProps } from './src/Split' 2 | export type { SplitProps, SplitSlots } from './src/Split' 3 | export type { SplitOnUpdateSize } from './src/types' 4 | -------------------------------------------------------------------------------- /src/tooltip/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as tooltipDark } from './dark' 2 | export { default as tooltipLight } from './light' 3 | export type { TooltipTheme, TooltipThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/typography/src/li.tsx: -------------------------------------------------------------------------------- 1 | import { defineComponent, h } from 'vue' 2 | 3 | export default defineComponent({ 4 | name: 'Li', 5 | render() { 6 | return
  • {this.$slots}
  • 7 | } 8 | }) 9 | -------------------------------------------------------------------------------- /src/_internal/scrollbar/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | default as NScrollbar, 3 | XScrollbar as NxScrollbar 4 | } from './src/Scrollbar' 5 | export type { ScrollbarInst, ScrollbarProps } from './src/Scrollbar' 6 | -------------------------------------------------------------------------------- /src/calendar/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as calendarDark } from './dark' 2 | export { default as calendarLight } from './light' 3 | export type { CalendarTheme, CalendarThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/card/demos/enUS/no-title.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # No title 3 | 4 | Nobody said a card must have a title. 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/carousel/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as carouselDark } from './dark' 2 | export { default as carouselLight } from './light' 3 | export type { CarouselTheme, CarouselThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/cascader/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as cascaderDark } from './dark' 2 | export { default as cascaderLight } from './light' 3 | export type { CascaderTheme, CascaderThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/dropdown/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as dropdownDark } from './dark' 2 | export { default as dropdownLight } from './light' 3 | export type { DropdownTheme, DropdownThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/equation/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as equationDark } from './dark' 2 | export { default as equationLight } from './light' 3 | export type { EquationTheme, EquationThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/legacy-grid/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as rowDark } from './dark' 2 | export { default as rowLight } from './light' 3 | export type { RowTheme } from './light' 4 | export { rowRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/log/src/context.ts: -------------------------------------------------------------------------------- 1 | import type { LogInjection } from './Log' 2 | import { createInjectionKey } from '../../_utils' 3 | 4 | export const logInjectionKey = createInjectionKey('n-log') 5 | -------------------------------------------------------------------------------- /src/progress/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as progressDark } from './dark' 2 | export { default as progressLight } from './light' 3 | export type { ProgressTheme, ProgressThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/table/src/Tbody.tsx: -------------------------------------------------------------------------------- 1 | import { defineComponent, h } from 'vue' 2 | 3 | export default defineComponent({ 4 | name: 'Tbody', 5 | render() { 6 | return {this.$slots} 7 | } 8 | }) 9 | -------------------------------------------------------------------------------- /src/table/src/Thead.tsx: -------------------------------------------------------------------------------- 1 | import { defineComponent, h } from 'vue' 2 | 3 | export default defineComponent({ 4 | name: 'Thead', 5 | render() { 6 | return {this.$slots} 7 | } 8 | }) 9 | -------------------------------------------------------------------------------- /src/timeline/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as timelineDark } from './dark' 2 | export { default as timelineLight } from './light' 3 | export type { TimelineTheme, TimelineThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/transfer/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as transferDark } from './dark' 2 | export { default as transferLight } from './light' 3 | export type { TransferTheme, TransferThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/upload/src/styles/rtl.cssr.ts: -------------------------------------------------------------------------------- 1 | import { cB, cM } from '../../../_utils/cssr' 2 | 3 | export default cB('upload', [ 4 | cM('rtl', ` 5 | direction: rtl; 6 | text-align: right; 7 | `) 8 | ]) 9 | -------------------------------------------------------------------------------- /playground/ssr/readme.md: -------------------------------------------------------------------------------- 1 | You need to install `webpack` & `webpack-cli` globally. 2 | 3 | ``` 4 | ./pre-build.sh 5 | ./build.sh 6 | 7 | node dist/server.js 8 | 9 | # browse localhost:8086 10 | ``` 11 | -------------------------------------------------------------------------------- /src/color-picker/demos/zhCN/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 基础用法 3 | 4 | 一个基本的颜色选择器。注意如果你在某个模式下选择了值,那么颜色选择器的值的格式会跟随模式。 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/countdown/index.ts: -------------------------------------------------------------------------------- 1 | export { countdownProps, default as NCountdown } from './src/Countdown' 2 | export type { 3 | CountdownInst, 4 | CountdownProps, 5 | CountdownTimeInfo 6 | } from './src/Countdown' 7 | -------------------------------------------------------------------------------- /src/date-picker/demos/zhCN/panel.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 只使用面板 3 | 4 | 这个功能或许有的时候能管点用,我实在不忍心看大家强行调样式。 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/input-otp/src/styles/input-otp-rtl.cssr.ts: -------------------------------------------------------------------------------- 1 | import { cB, cM } from '../../../_utils/cssr' 2 | 3 | // --n-gap 4 | export default cB('input-otp', [ 5 | cM('rtl', ` 6 | direction: rtl; 7 | `) 8 | ]) 9 | -------------------------------------------------------------------------------- /src/popover/src/styles/rtl.cssr.ts: -------------------------------------------------------------------------------- 1 | import { cB, cM } from '../../../_utils/cssr' 2 | 3 | export default cB('popover', [ 4 | cM('rtl', ` 5 | direction: rtl; 6 | text-align: right; 7 | `) 8 | ]) 9 | -------------------------------------------------------------------------------- /src/popselect/src/styles/index.cssr.ts: -------------------------------------------------------------------------------- 1 | import { cB } from '../../../_utils/cssr' 2 | 3 | // --n-menu-box-shadow 4 | export default cB('popselect-menu', ` 5 | box-shadow: var(--n-menu-box-shadow); 6 | `) 7 | -------------------------------------------------------------------------------- /src/popselect/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as popselectDark } from './dark' 2 | export { default as popselectLight } from './light' 3 | export type { PopselectTheme, PopselectThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/themes/interface.ts: -------------------------------------------------------------------------------- 1 | import type { GlobalTheme } from '../config-provider' 2 | 3 | export type BuiltInGlobalTheme = Omit< 4 | Required, 5 | 'InternalSelectMenu' | 'InternalSelection' 6 | > 7 | -------------------------------------------------------------------------------- /src/badge/demos/enUS/color.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Customizing color 3 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /src/breadcrumb/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as breadcrumbDark } from './dark' 2 | export { default as breadcrumbLight } from './light' 3 | export type { BreadcrumbTheme, BreadcrumbThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/date-picker/demos/enUS/panel.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Use panel only 3 | 4 | It may be useful sometimes. 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/date-picker/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as datePickerDark } from './dark' 2 | export { default as datePickerLight } from './light' 3 | export type { DatePickerTheme, DatePickerThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/float-button-group/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | floatButtonGroupProps, 3 | default as NFloatButtonGroup 4 | } from './src/FloatButtonGroup' 5 | export type { FloatButtonGroupProps } from './src/FloatButtonGroup' 6 | -------------------------------------------------------------------------------- /src/loading-bar/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as loadingBarDark } from './dark' 2 | export { default as loadingBarLight } from './light' 3 | export type { LoadingBarTheme, LoadingBarThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/popconfirm/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as popconfirmDark } from './dark' 2 | export { default as popconfirmLight } from './light' 3 | export type { PopconfirmTheme, PopconfirmThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/popover/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | space: '6px', 3 | spaceArrow: '10px', 4 | arrowOffset: '10px', 5 | arrowOffsetVertical: '10px', 6 | arrowHeight: '6px', 7 | padding: '8px 14px' 8 | } 9 | -------------------------------------------------------------------------------- /src/slider/demos/zhCN/show-tooltip.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 始终显示 Tooltip 3 | 4 | 设定 `show-tooltip` 来让 Tooltip 被一直显示。 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/slider/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | railHeight: '4px', 3 | railWidthVertical: '4px', 4 | handleSize: '18px', 5 | dotHeight: '8px', 6 | dotWidth: '8px', 7 | dotBorderRadius: '4px' 8 | } 9 | -------------------------------------------------------------------------------- /src/tag/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as tagDark } from './dark' 2 | export { default as tagLight } from './light' 3 | export type { TagTheme, TagThemeVars } from './light' 4 | export { tagRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/time-picker/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as timePickerDark } from './dark' 2 | export { default as timePickerLight } from './light' 3 | export type { TimePickerTheme, TimePickerThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/typography/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as typographyDark } from './dark' 2 | export { default as typographyLight } from './light' 3 | export type { TypographyTheme, TypographyThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/card/demos/zhCN/border.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 边框 3 | 4 | 卡片可以没有边框。 5 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /src/card/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as cardDark } from './dark' 2 | export { default as cardLight } from './light' 3 | export type { CardTheme, CardThemeVars } from './light' 4 | export { cardRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/color-picker/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as colorPickerDark } from './dark' 2 | export { default as colorPickerLight } from './light' 3 | export type { ColorPickerTheme, ColorPickerThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/dynamic-tags/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as dynamicTagsDark } from './dark' 2 | export { default as dynamicTagsLight } from './light' 3 | export type { DynamicTagsTheme, DynamicTagsThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/flex/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as flexDark } from './dark' 2 | export { default as flexLight } from './light' 3 | export type { FlexTheme, FlexThemeVars } from './light' 4 | export { flexRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/float-button-group/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as floatButtonGroupDark } from './dark' 2 | export { default as floatButtonGroupLight } from './light' 3 | export type { FloatButtonGroupTheme } from './light' 4 | -------------------------------------------------------------------------------- /src/float-button/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as floatButtonDark } from './dark' 2 | export { default as floatButtonLight } from './light' 3 | export type { FloatButtonTheme, FloatButtonThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/icon-wrapper/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as iconWrapperDark } from './dark' 2 | export { default as iconWrapperLight } from './light' 3 | export type { IconWrapperTheme, IconWrapperThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/list/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as listDark } from './dark' 2 | export { default as listLight } from './light' 3 | export type { ListTheme, ListThemeVars } from './light' 4 | export { listRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/tree/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as treeDark } from './dark' 2 | export { default as treeLight } from './light' 3 | export type { TreeTheme, TreeThemeVars } from './light' 4 | export { treeRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /scripts/pre-build/pre-cjs-build.ts: -------------------------------------------------------------------------------- 1 | import { replaceDefine, srcDir } from '../utils' 2 | 3 | ; 4 | 5 | (async () => { 6 | await replaceDefine([srcDir], { 7 | '\'lodash-es\'': '\'lodash\'' 8 | }) 9 | })() 10 | -------------------------------------------------------------------------------- /src/alert/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as alertDark } from './dark' 2 | export { default as alertLight } from './light' 3 | export type { AlertTheme, AlertThemeVars } from './light' 4 | export { alertRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/auto-complete/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as autoCompleteDark } from './dark' 2 | export { default as autoCompleteLight } from './light' 3 | export type { AutoCompleteTheme, AutoCompleteThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/badge/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as badgeDark } from './dark' 2 | export { default as badgeLight } from './light' 3 | export type { BadgeTheme, BadgeThemeVars } from './light' 4 | export { badgeRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/button/demos/enUS/disabled.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Disabled 3 | 4 | Buttons can be disabled. 5 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /src/collapse-transition/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | collapseTransitionProps, 3 | default as NCollapseTransition 4 | } from './src/CollapseTransition' 5 | export type { CollapseTransitionProps } from './src/CollapseTransition' 6 | -------------------------------------------------------------------------------- /src/descriptions/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as descriptionsDark } from './dark' 2 | export { default as descriptionsLight } from './light' 3 | export type { DescriptionsTheme, DescriptionsThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/gradient-text/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as gradientTextDark } from './dark' 2 | export { default as gradientTextLight } from './light' 3 | export type { GradientTextTheme, GradientTextThemeVars } from './light' 4 | -------------------------------------------------------------------------------- /src/input-otp/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as inputOtpDark } from './dark' 2 | export { default as inputOtpLight } from './light' 3 | export type { InputOtpTheme } from './light' 4 | export { inputOtpRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/input/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as inputDark } from './dark' 2 | export { default as inputLight } from './light' 3 | export type { InputTheme, InputThemeVars } from './light' 4 | export { inputRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/marquee/demos/zhCN/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 基础用法 3 | 4 | 在跑马灯中输入文字: 5 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /src/mention/index.ts: -------------------------------------------------------------------------------- 1 | export type { MentionInst, MentionOption } from './src/interface' 2 | export { mentionProps, default as NMention } from './src/Mention' 3 | export type { MentionProps, MentionSlots } from './src/Mention' 4 | -------------------------------------------------------------------------------- /src/progress/demos/zhCN/circle-offset.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 偏移 3 | 4 | 环状的进度可以偏移。 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/radio/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as radioDark } from './dark' 2 | export { default as radioLight } from './light' 3 | export type { RadioTheme, RadioThemeVars } from './light' 4 | export { radioRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/space/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as spaceDark } from './dark' 2 | export { default as spaceLight } from './light' 3 | export type { SpaceTheme, SpaceThemeVars } from './light' 4 | export { spaceRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/steps/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as stepsDark } from './dark' 2 | export { default as stepsLight } from './light' 3 | export type { StepsTheme, StepsThemeVars } from './light' 4 | export { stepsRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/table/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as tableDark } from './dark' 2 | export { default as tableLight } from './light' 3 | export type { TableTheme, TableThemeVars } from './light' 4 | export { tableRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/thing/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as thingDark } from './dark' 2 | export { default as thingLight } from './light' 3 | export type { ThingTheme, ThingThemeVars } from './light' 4 | export { thingRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/button/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as buttonDark } from './dark' 2 | export { default as buttonLight } from './light' 3 | export type { ButtonTheme, ButtonThemeVars } from './light' 4 | export { buttonRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/collapse-transition/src/styles/rtl.cssr.ts: -------------------------------------------------------------------------------- 1 | import { cB, cM } from '../../../_utils/cssr' 2 | 3 | export default cB('collapse-transition', [ 4 | cM('rtl', ` 5 | direction: rtl; 6 | text-align: right; 7 | `) 8 | ]) 9 | -------------------------------------------------------------------------------- /src/dialog/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as dialogDark } from './dark' 2 | export { default as dialogLight } from './light' 3 | export type { DialogTheme, DialogThemeVars } from './light' 4 | export { dialogRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/ellipsis/index.ts: -------------------------------------------------------------------------------- 1 | export { ellipsisProps, default as NEllipsis } from './src/Ellipsis' 2 | export type { EllipsisProps, EllipsisSlots } from './src/Ellipsis' 3 | export { NPerformantEllipsis } from './src/PerformantEllipsis' 4 | -------------------------------------------------------------------------------- /src/legacy-grid/index.ts: -------------------------------------------------------------------------------- 1 | export { colProps, default as NCol } from './src/Col' 2 | export type { ColProps } from './src/Col' 3 | export { default as NRow, rowProps } from './src/Row' 4 | export type { RowProps } from './src/Row' 5 | -------------------------------------------------------------------------------- /src/locales/date/eo.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { eo } from 'date-fns/locale' 3 | 4 | const dateEo: NDateLocale = { 5 | name: 'eo', 6 | locale: eo 7 | } 8 | 9 | export default dateEo 10 | -------------------------------------------------------------------------------- /src/popselect/index.ts: -------------------------------------------------------------------------------- 1 | export type { PopselectInst } from './src/interface' 2 | export { default as NPopselect, popselectProps } from './src/Popselect' 3 | export type { PopselectProps, PopselectSlots } from './src/Popselect' 4 | -------------------------------------------------------------------------------- /src/rate/demos/zhCN/clearable.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 可清空 3 | 4 | 设定 `clearable` 后 `n-rate` 可清空,在你点击当前值对应的图标后值会被设为 `null`。 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/select/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as selectDark } from './dark' 2 | export { default as selectLight } from './light' 3 | export type { SelectTheme, SelectThemeVars } from './light' 4 | export { selectRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/skeleton/demos/zhCN/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 基础用法 3 | 4 | 使用 `text` 设定文本骨架。 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/slider/demos/enUS/show-tooltip.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Always show tooltip 3 | 4 | Set `show-tooltip` to always show tooltip. 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/slider/demos/zhCN/disable-tooltip.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 禁用 Tooltip 3 | 4 | 设定 `:tooltip="false"` 来禁用 tooltip。 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/table/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | thPaddingSmall: '6px', 3 | thPaddingMedium: '12px', 4 | thPaddingLarge: '12px', 5 | tdPaddingSmall: '6px', 6 | tdPaddingMedium: '12px', 7 | tdPaddingLarge: '12px' 8 | } 9 | -------------------------------------------------------------------------------- /src/upload/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as uploadDark } from './dark' 2 | export { default as uploadLight } from './light' 3 | export type { UploadTheme, UploadThemeVars } from './light' 4 | export { uploadRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /tsconfig.cjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "references": [ 3 | { 4 | "path": "./src/tsconfig.cjs.json" 5 | }, 6 | { 7 | "path": "./themes/tusimple/tsconfig.cjs.json" 8 | } 9 | ], 10 | "files": [] 11 | } 12 | -------------------------------------------------------------------------------- /tsconfig.esm.json: -------------------------------------------------------------------------------- 1 | { 2 | "references": [ 3 | { 4 | "path": "./src/tsconfig.esm.json" 5 | }, 6 | { 7 | "path": "./themes/tusimple/tsconfig.esm.json" 8 | } 9 | ], 10 | "files": [] 11 | } 12 | -------------------------------------------------------------------------------- /src/cascader/index.ts: -------------------------------------------------------------------------------- 1 | export { cascaderProps, default as NCascader } from './src/Cascader' 2 | export type { CascaderProps, CascaderSlots } from './src/Cascader' 3 | export type { CascaderInst, CascaderOption } from './src/interface' 4 | -------------------------------------------------------------------------------- /src/color-picker/demos/enUS/modes.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Set mode 3 | 4 | Use `modes` to set restrict the available modes. 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/color-picker/demos/zhCN/actions.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 可清除 3 | 4 | 如果你希望颜色选择器可以清空,你可以在 `'actions'` 属性中添加 `'clear'`。 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/highlight/src/public-types.ts: -------------------------------------------------------------------------------- 1 | import type { ExtractPublicPropTypes } from '../../_utils' 2 | import type { highlightProps } from './Highlight' 3 | 4 | export type HighlightProps = ExtractPublicPropTypes 5 | -------------------------------------------------------------------------------- /src/locales/date/viVN.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { vi } from 'date-fns/locale' 3 | 4 | const dateVi: NDateLocale = { 5 | name: 'vi-VN', 6 | locale: vi 7 | } 8 | 9 | export default dateVi 10 | -------------------------------------------------------------------------------- /src/message/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as messageDark } from './dark' 2 | export { default as messageLight } from './light' 3 | export type { MessageTheme, MessageThemeVars } from './light' 4 | export { messageRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/popconfirm/index.ts: -------------------------------------------------------------------------------- 1 | export type { PopconfirmInst } from './src/interface' 2 | export { default as NPopconfirm, popconfirmProps } from './src/Popconfirm' 3 | export type { PopconfirmProps, PopconfirmSlots } from './src/Popconfirm' 4 | -------------------------------------------------------------------------------- /src/popover/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as popoverDark } from './dark' 2 | export { default as popoverLight } from './light' 3 | export type { PopoverTheme, PopoverThemeVars } from './light' 4 | export { popoverRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/progress/src/public-types.ts: -------------------------------------------------------------------------------- 1 | export type ProgressStatus 2 | = | 'success' 3 | | 'error' 4 | | 'warning' 5 | | 'info' 6 | | 'default' 7 | export interface ProgressGradient { 8 | stops: string[] 9 | } 10 | -------------------------------------------------------------------------------- /src/switch/demos/zhCN/shape.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 形状 3 | 4 | 开关可以设为方形。 5 | 6 | 7 | 13 | -------------------------------------------------------------------------------- /src/time-picker/index.ts: -------------------------------------------------------------------------------- 1 | export type { TimePickerInst } from './src/interface' 2 | export { default as NTimePicker, timePickerProps } from './src/TimePicker' 3 | export type { TimePickerProps, TimePickerSlots } from './src/TimePicker' 4 | -------------------------------------------------------------------------------- /src/_utils/css/rtl-inset.ts: -------------------------------------------------------------------------------- 1 | import { getPadding } from 'seemly' 2 | 3 | export function rtlInset(inset: string): string { 4 | const { left, right, top, bottom } = getPadding(inset) 5 | return `${top} ${left} ${bottom} ${right}` 6 | } 7 | -------------------------------------------------------------------------------- /src/card/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const cardRtl: RtlItem = { 5 | name: 'Card', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/config-provider/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | configProviderProps, 3 | default as NConfigProvider 4 | } from './src/ConfigProvider' 5 | export type { ConfigProviderProps } from './src/ConfigProvider' 6 | export * from './src/interface' 7 | -------------------------------------------------------------------------------- /src/date-picker/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NDatePicker } from './src/DatePicker' 2 | export type { DatePickerSlots } from './src/DatePicker' 3 | export { datePickerProps } from './src/props' 4 | export type * from './src/public-types' 5 | -------------------------------------------------------------------------------- /src/drawer/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as drawerDark } from './dark' 2 | export { default as drawerLight } from './light' 3 | export type { DrawerTheme, DrawerThemeVars } from './light' 4 | export { default as drawerRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/flex/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const flexRtl: RtlItem = { 5 | name: 'Flex', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/image/demos/enUS/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Basic 3 | 4 | 5 | 11 | -------------------------------------------------------------------------------- /src/image/demos/zhCN/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 基础用法 3 | 4 | 5 | 11 | -------------------------------------------------------------------------------- /src/list/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const listRtl: RtlItem = { 5 | name: 'List', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/locales/date/arDZ.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { arDZ } from 'date-fns/locale' 3 | 4 | const dateArDZ: NDateLocale = { 5 | name: 'ar-DZ', 6 | locale: arDZ 7 | } 8 | 9 | export default dateArDZ 10 | -------------------------------------------------------------------------------- /src/locales/date/azAZ.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { az } from 'date-fns/locale' 3 | 4 | const dateAzAZ: NDateLocale = { 5 | name: 'az-AZ', 6 | locale: az 7 | } 8 | 9 | export default dateAzAZ 10 | -------------------------------------------------------------------------------- /src/locales/date/csCZ.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { cs } from 'date-fns/locale' 3 | 4 | const dateCsCZ: NDateLocale = { 5 | name: 'cs-CZ', 6 | locale: cs 7 | } 8 | 9 | export default dateCsCZ 10 | -------------------------------------------------------------------------------- /src/locales/date/daDK.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { da } from 'date-fns/locale' 3 | 4 | const dateDaDK: NDateLocale = { 5 | name: 'da-DK', 6 | locale: da 7 | } 8 | 9 | export default dateDaDK 10 | -------------------------------------------------------------------------------- /src/locales/date/deDE.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { de } from 'date-fns/locale' 3 | 4 | const dateDeDE: NDateLocale = { 5 | name: 'de-DE', 6 | locale: de 7 | } 8 | 9 | export default dateDeDE 10 | -------------------------------------------------------------------------------- /src/locales/date/enGB.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { enGB } from 'date-fns/locale' 3 | 4 | const dateEnGB: NDateLocale = { 5 | name: 'en-GB', 6 | locale: enGB 7 | } 8 | 9 | export default dateEnGB 10 | -------------------------------------------------------------------------------- /src/locales/date/esAR.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { es } from 'date-fns/locale' 3 | 4 | const dateEsAR: NDateLocale = { 5 | name: 'es-AR', 6 | locale: es 7 | } 8 | 9 | export default dateEsAR 10 | -------------------------------------------------------------------------------- /src/locales/date/etEE.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { et } from 'date-fns/locale' 3 | 4 | const dateEtEE: NDateLocale = { 5 | name: 'et-EE', 6 | locale: et 7 | } 8 | 9 | export default dateEtEE 10 | -------------------------------------------------------------------------------- /src/locales/date/faIR.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { faIR } from 'date-fns/locale' 3 | 4 | const dateFaIR: NDateLocale = { 5 | name: 'fa-IR', 6 | locale: faIR 7 | } 8 | 9 | export default dateFaIR 10 | -------------------------------------------------------------------------------- /src/locales/date/frFR.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { fr } from 'date-fns/locale' 3 | 4 | const dateFrFR: NDateLocale = { 5 | name: 'fr-FR', 6 | locale: fr 7 | } 8 | 9 | export default dateFrFR 10 | -------------------------------------------------------------------------------- /src/locales/date/idID.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { id } from 'date-fns/locale' 3 | 4 | const dateIdID: NDateLocale = { 5 | name: 'id-ID', 6 | locale: id 7 | } 8 | 9 | export default dateIdID 10 | -------------------------------------------------------------------------------- /src/locales/date/itIT.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { it } from 'date-fns/locale' 3 | 4 | const dateItIT: NDateLocale = { 5 | name: 'it-IT', 6 | locale: it 7 | } 8 | 9 | export default dateItIT 10 | -------------------------------------------------------------------------------- /src/locales/date/jaJP.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { ja } from 'date-fns/locale' 3 | 4 | const dateJaJP: NDateLocale = { 5 | name: 'ja-JP', 6 | locale: ja 7 | } 8 | 9 | export default dateJaJP 10 | -------------------------------------------------------------------------------- /src/locales/date/kmKH.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { km } from 'date-fns/locale' 3 | 4 | const dateKmKH: NDateLocale = { 5 | name: 'km-KH', 6 | locale: km 7 | } 8 | 9 | export default dateKmKH 10 | -------------------------------------------------------------------------------- /src/locales/date/koKR.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { ko } from 'date-fns/locale' 3 | 4 | const dateKoKR: NDateLocale = { 5 | name: 'ko-KR', 6 | locale: ko 7 | } 8 | 9 | export default dateKoKR 10 | -------------------------------------------------------------------------------- /src/locales/date/nbNO.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { nb } from 'date-fns/locale' 3 | 4 | const dateNbNO: NDateLocale = { 5 | name: 'nb-NO', 6 | locale: nb 7 | } 8 | 9 | export default dateNbNO 10 | -------------------------------------------------------------------------------- /src/locales/date/nlNL.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { nl } from 'date-fns/locale' 3 | 4 | const dateNlNL: NDateLocale = { 5 | name: 'nl-NL', 6 | locale: nl 7 | } 8 | 9 | export default dateNlNL 10 | -------------------------------------------------------------------------------- /src/locales/date/plPL.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { pl } from 'date-fns/locale' 3 | 4 | const datePlPL: NDateLocale = { 5 | name: 'pl-PL', 6 | locale: pl 7 | } 8 | 9 | export default datePlPL 10 | -------------------------------------------------------------------------------- /src/locales/date/ptBR.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { ptBR } from 'date-fns/locale' 3 | 4 | const datePtBr: NDateLocale = { 5 | name: 'pt-BR', 6 | locale: ptBR 7 | } 8 | 9 | export default datePtBr 10 | -------------------------------------------------------------------------------- /src/locales/date/ruRU.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { ru } from 'date-fns/locale' 3 | 4 | const dateRuRU: NDateLocale = { 5 | name: 'ru-RU', 6 | locale: ru 7 | } 8 | 9 | export default dateRuRU 10 | -------------------------------------------------------------------------------- /src/locales/date/skSK.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { sk } from 'date-fns/locale' 3 | 4 | const dateSkSK: NDateLocale = { 5 | name: 'sk-SK', 6 | locale: sk 7 | } 8 | 9 | export default dateSkSK 10 | -------------------------------------------------------------------------------- /src/locales/date/svSE.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { sv } from 'date-fns/locale' 3 | 4 | const dateSvSE: NDateLocale = { 5 | name: 'sv-SE', 6 | locale: sv 7 | } 8 | 9 | export default dateSvSE 10 | -------------------------------------------------------------------------------- /src/locales/date/thTH.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { th } from 'date-fns/locale' 3 | 4 | const dateThTH: NDateLocale = { 5 | name: 'th-TH', 6 | locale: th 7 | } 8 | 9 | export default dateThTH 10 | -------------------------------------------------------------------------------- /src/locales/date/trTR.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { tr } from 'date-fns/locale' 3 | 4 | const dateTrTR: NDateLocale = { 5 | name: 'tr-TR', 6 | locale: tr 7 | } 8 | 9 | export default dateTrTR 10 | -------------------------------------------------------------------------------- /src/locales/date/ugCN.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { ug } from 'date-fns/locale' 3 | 4 | const dateUgCN: NDateLocale = { 5 | name: 'ug-CN', 6 | locale: ug 7 | } 8 | 9 | export default dateUgCN 10 | -------------------------------------------------------------------------------- /src/locales/date/ukUA.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { uk } from 'date-fns/locale' 3 | 4 | const dateUkUA: NDateLocale = { 5 | name: 'uk-UA', 6 | locale: uk 7 | } 8 | 9 | export default dateUkUA 10 | -------------------------------------------------------------------------------- /src/locales/date/uzUZ.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { uz } from 'date-fns/locale' 3 | 4 | const dateUzUZ: NDateLocale = { 5 | name: 'uz-UZ', 6 | locale: uz 7 | } 8 | 9 | export default dateUzUZ 10 | -------------------------------------------------------------------------------- /src/locales/date/zhCN.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { zhCN } from 'date-fns/locale' 3 | 4 | const dateZhCN: NDateLocale = { 5 | name: 'zh-CN', 6 | locale: zhCN 7 | } 8 | 9 | export default dateZhCN 10 | -------------------------------------------------------------------------------- /src/locales/date/zhTW.ts: -------------------------------------------------------------------------------- 1 | import type { NDateLocale } from './enUS' 2 | import { zhTW } from 'date-fns/locale' 3 | 4 | const datezhTW: NDateLocale = { 5 | name: 'zh-TW', 6 | locale: zhTW 7 | } 8 | 9 | export default datezhTW 10 | -------------------------------------------------------------------------------- /src/select/demos/zhCN/empty-debug.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Empty debug 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/tag/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const tagRtl: RtlItem = { 5 | name: 'Tag', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/tree/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const treeRtl: RtlItem = { 5 | name: 'Tree', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /demo/pages/docs/vue3/enUS/index.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /demo/pages/docs/vue3/zhCN/index.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /src/alert/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const alertRtl: RtlItem = { 5 | name: 'Alert', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/avatar/demos/zhCN/badge.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 标记 3 | 4 | 和 `Badge` 一起用也挺好的 (如果你喜欢看到一堆一堆的推送)。 5 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /src/badge/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const badgeRtl: RtlItem = { 5 | name: 'Badge', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/checkbox/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as checkboxDark } from './dark' 2 | export { default as checkboxLight } from './light' 3 | export type { CheckboxTheme, CheckboxThemeVars } from './light' 4 | export { checkboxRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/collapse/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as collapseDark } from './dark' 2 | export { default as collapseLight } from './light' 3 | export type { CollapseTheme, CollapseThemeVars } from './light' 4 | export { collapseRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/ellipsis/demos/zhCN/width-debug.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Width debug 3 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /src/grid/src/config.ts: -------------------------------------------------------------------------------- 1 | import type { NGridInjection } from './Grid' 2 | import { createInjectionKey } from '../../_utils' 3 | 4 | export const defaultSpan = 1 5 | export const gridInjectionKey = createInjectionKey('n-grid') 6 | -------------------------------------------------------------------------------- /src/input-number/index.ts: -------------------------------------------------------------------------------- 1 | export { inputNumberProps, default as NInputNumber } from './src/InputNumber' 2 | export type { InputNumberProps, InputNumberSlots } from './src/InputNumber' 3 | export type { InputNumberInst } from './src/interface' 4 | -------------------------------------------------------------------------------- /src/input/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const inputRtl: RtlItem = { 5 | name: 'Input', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/legacy-grid/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const rowRtl: RtlItem = { 5 | name: 'Row', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/log/demos/zhCN/size.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 行数 3 | 4 | 使用 `rows` 来设定 Log 的尺寸。 5 | 6 | 7 | 18 | -------------------------------------------------------------------------------- /src/page-header/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { pageHeaderDark } from './dark' 2 | export { pageHeaderLight } from './light' 3 | export type { PageHeaderTheme, PageHeaderThemeVars } from './light' 4 | export { default as pageHeaderRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/radio/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const radioRtl: RtlItem = { 5 | name: 'Radio', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/space/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const spaceRtl: RtlItem = { 5 | name: 'Space', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/steps/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const stepsRtl: RtlItem = { 5 | name: 'Steps', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/table/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const tableRtl: RtlItem = { 5 | name: 'Table', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/time/demos/zhCN/timezone.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 时区 3 | 4 | 5 | 9 | -------------------------------------------------------------------------------- /src/button/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const buttonRtl: RtlItem = { 5 | name: 'Button', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/data-table/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as dataTableDark } from './dark' 2 | export { default as dataTableLight } from './light' 3 | export type { DataTableTheme, DataTableThemeVars } from './light' 4 | export { DataTableRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/dialog/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const dialogRtl: RtlItem = { 5 | name: 'Dialog', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/dynamic-tags/src/styles/index.cssr.ts: -------------------------------------------------------------------------------- 1 | import { cB } from '../../../_utils/cssr' 2 | 3 | // vars: 4 | // --input-width 5 | export default cB('dynamic-tags', [ 6 | cB('input', { 7 | minWidth: 'var(--n-input-width)' 8 | }) 9 | ]) 10 | -------------------------------------------------------------------------------- /src/heatmap/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const heatmapRtl: RtlItem = { 5 | name: 'Heatmap', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/input/demos/zhCN/textarea-resize-debug.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # textarea-resize-debug 3 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /src/list/index.ts: -------------------------------------------------------------------------------- 1 | export { listProps, default as NList } from './src/List' 2 | export type { ListProps, ListSlots } from './src/List' 3 | export { default as NListItem } from './src/ListItem' 4 | export type { ListItemSlots } from './src/ListItem' 5 | -------------------------------------------------------------------------------- /src/marquee/tests/Marquee.spec.ts: -------------------------------------------------------------------------------- 1 | import { mount } from '@vue/test-utils' 2 | import { NMarquee } from '../index' 3 | 4 | describe('n-marquee', () => { 5 | it('should work with import on demand', () => { 6 | mount(NMarquee) 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /src/message/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const messageRtl: RtlItem = { 5 | name: 'Message', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/slider/demos/enUS/disable-tooltip.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Disable tooltip 3 | 4 | Set `:tooltip="false"` to disabled the tooltip. 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/statistic/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as statisticDark } from './dark' 2 | export { default as statisticLight } from './light' 3 | export type { StatisticTheme, StatisticThemeVars } from './light' 4 | export { statisticRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/upload/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const uploadRtl: RtlItem = { 5 | name: 'Upload', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/back-top/demos/enUS/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Basic 3 | 4 | BackTop will find its first scrollable ascendant element and listen scroll event on it. 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/checkbox/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const checkboxRtl: RtlItem = { 5 | name: 'Checkbox', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/collapse/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const collapseRtl: RtlItem = { 5 | name: 'Collapse', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/color-picker/demos/zhCN/native.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 原生 3 | 4 | 我们提供了一种通过点击颜色预览块来触发浏览器原生的颜色选择器的方式,因为浏览器厂商在原生的颜色选择器上实现了一些很棒的功能,你可能会需要。 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/config-provider/src/config.ts: -------------------------------------------------------------------------------- 1 | export const defaultBreakpoints = { 2 | xs: 0, // mobile 3 | s: 640, // tablet 4 | m: 1024, // laptop s 5 | l: 1280, // laptop 6 | xl: 1536, // laptop l 7 | xxl: 1920 // normal desktop display 8 | } as const 9 | -------------------------------------------------------------------------------- /src/ellipsis/demos/zhCN/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 基础 3 | 4 | 带弹出提示基本的单行省略。 5 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /src/icon/tests/__snapshots__/Icon.spec.ts.snap: -------------------------------------------------------------------------------- 1 | // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html 2 | 3 | exports[`n-icon > should work with \`depth\` prop 1`] = `"--n-bezier: cubic-bezier(.4, 0, .2, 1); --n-color: #000; --n-opacity: 0.18;"`; 4 | -------------------------------------------------------------------------------- /src/mention/src/interface.ts: -------------------------------------------------------------------------------- 1 | import type { SelectBaseOption } from '../../select/src/interface' 2 | 3 | export type MentionOption = SelectBaseOption 4 | 5 | export interface MentionInst { 6 | focus: () => void 7 | blur: () => void 8 | } 9 | -------------------------------------------------------------------------------- /src/pagination/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as paginationDark } from './dark' 2 | export { default as paginationLight } from './light' 3 | export type { PaginationTheme, PaginationThemeVars } from './light' 4 | export { paginationRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/skeleton/demos/enUS/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Basic usage 3 | 4 | Use `text` to create text skeleton. 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/statistic/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const statisticRtl: RtlItem = { 5 | name: 'Statistic', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/switch/demos/enUS/shape.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Shape 3 | 4 | Switch can have square shape. 5 | 6 | 7 | 13 | -------------------------------------------------------------------------------- /src/tree-select/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as treeSelectDark } from './dark' 2 | export { default as treeSelectLight } from './light' 3 | export type { TreeSelectTheme, TreeSelectThemeVars } from './light' 4 | export { treeSelectRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /demo/pages/docs/theme/zhCN/index.demo-entry.md: -------------------------------------------------------------------------------- 1 | # 创建适配主题的组件 2 | 3 | 你可能觉得只用内置的组件不够爽,想自己也写适配主题的组件。 4 | 5 | Naive UI 提供一些工具帮助开发者简单的创建支持主题的组件。 6 | 7 | ## 演示 8 | 9 | ```demo 10 | provide-theme.vue 11 | element.vue 12 | use-theme-vars.vue 13 | ``` 14 | -------------------------------------------------------------------------------- /src/avatar-group/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as avatarGroupDark } from './dark' 2 | export { default as avatarGroupLight } from './light' 3 | export type { AvatarGroupTheme, AvatarGroupThemeVars } from './light' 4 | export { avatarGroupRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/button-group/src/context.ts: -------------------------------------------------------------------------------- 1 | import type { ButtonGroupInjection } from './ButtonGroup' 2 | import { createInjectionKey } from '../../_utils' 3 | 4 | export const buttonGroupInjectionKey 5 | = createInjectionKey('n-button-group') 6 | -------------------------------------------------------------------------------- /src/button/src/interface.ts: -------------------------------------------------------------------------------- 1 | export type Size = 'tiny' | 'small' | 'medium' | 'large' 2 | 3 | export type Type 4 | = | 'default' 5 | | 'tertiary' 6 | | 'primary' 7 | | 'info' 8 | | 'success' 9 | | 'warning' 10 | | 'error' 11 | -------------------------------------------------------------------------------- /src/card/demos/enUS/border.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Border 3 | 4 | Card can be used without border. 5 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /src/input-number/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as inputNumberDark } from './dark' 2 | export { default as inputNumberLight } from './light' 3 | export type { InputNumberTheme, InputNumberThemeVars } from './light' 4 | export { inputNumberRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/input-otp/tests/InputOtp.spec.tsx: -------------------------------------------------------------------------------- 1 | import { mount } from '@vue/test-utils' 2 | import { NInputOtp } from '../index' 3 | 4 | describe('n-input-number', () => { 5 | it('should work with import on demand', () => { 6 | mount(NInputOtp) 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /src/log/demos/enUS/size.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Rows 3 | 4 | Use `rows` to change the size of log. 5 | 6 | 7 | 18 | -------------------------------------------------------------------------------- /src/progress/demos/enUS/circle-offset.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Offset 3 | 4 | Circular progress can have `offset-degree`. 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/progress/demos/zhCN/processing.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 进行时 3 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /src/space/demos/zhCN/reverse.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 反向 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/split/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { SplitTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | 4 | const splitDark: SplitTheme = { 5 | name: 'Split', 6 | common: commonDark 7 | } 8 | 9 | export default splitDark 10 | -------------------------------------------------------------------------------- /src/switch/demos/enUS/size.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Size 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/switch/demos/zhCN/size.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 尺寸 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/tag/demos/zhCN/color.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 颜色 3 | 4 | 使用一个颜色对象定制标签的颜色。 5 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /src/timeline/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | titleMarginMedium: '0 0 6px 0', 3 | titleMarginLarge: '-2px 0 6px 0', 4 | titleFontSizeMedium: '14px', 5 | titleFontSizeLarge: '16px', 6 | iconSizeMedium: '14px', 7 | iconSizeLarge: '14px' 8 | } 9 | -------------------------------------------------------------------------------- /src/alert/demos/zhCN/no-icon.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 没有图标 3 | 4 | 5 | 11 | -------------------------------------------------------------------------------- /src/button-group/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const buttonGroupRtl: RtlItem = { 5 | name: 'ButtonGroup', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/flex/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { FlexTheme } from './light' 2 | import commonVars from './_common' 3 | 4 | const flexDark: FlexTheme = { 5 | name: 'Flex', 6 | self() { 7 | return commonVars 8 | } 9 | } 10 | 11 | export default flexDark 12 | -------------------------------------------------------------------------------- /src/image/demos/zhCN/full-debug.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 原始尺寸展示图片 Debug 3 | 4 | 5 | 11 | -------------------------------------------------------------------------------- /src/input-otp/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/input-otp-rtl.cssr' 3 | 4 | export const inputOtpRtl: RtlItem = { 5 | name: 'InputOtp', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/notification/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as notificationDark } from './dark' 2 | export { default as notificationLight } from './light' 3 | export type { NotificationTheme, NotificationThemeVars } from './light' 4 | export { notificationRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/notification/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const notificationRtl: RtlItem = { 5 | name: 'Notification', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/progress/demos/enUS/processing.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Processing 3 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /src/space/demos/enUS/reverse.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Reverse 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/steps/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NStep, stepProps } from './src/Step' 2 | export type { StepProps, StepSlots } from './src/Step' 3 | export { default as NSteps, stepsProps } from './src/Steps' 4 | export type { StepsProps, StepsSlots } from './src/Steps' 5 | -------------------------------------------------------------------------------- /src/time/demos/enUS/timezone.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Time zone 3 | 4 | 5 | 9 | -------------------------------------------------------------------------------- /src/_internal/scrollbar/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as scrollbarDark } from './dark' 2 | export { default as scrollbarLight } from './light' 3 | export type { ScrollbarTheme, ScrollbarThemeVars } from './light' 4 | export { default as scrollbarRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/_internal/scrollbar/tests/Scrollbar.spec.ts: -------------------------------------------------------------------------------- 1 | import { mount } from '@vue/test-utils' 2 | import { NScrollbar } from '../index' 3 | 4 | describe('n-scrollbar', () => { 5 | it('should work with import on demand', () => { 6 | mount(NScrollbar) 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /src/_internal/selection/src/interface.ts: -------------------------------------------------------------------------------- 1 | import type { VNodeChild } from 'vue' 2 | import type { SelectOption } from '../../../select/src/interface' 3 | 4 | export type RenderTag = (props: { 5 | option: SelectOption 6 | handleClose: () => void 7 | }) => VNodeChild 8 | -------------------------------------------------------------------------------- /src/_utils/naive/mutable.ts: -------------------------------------------------------------------------------- 1 | export type Mutable 2 | = T extends Record 3 | ? { 4 | -readonly [P in keyof T]: T[P] extends ReadonlyArray 5 | ? Array> 6 | : Mutable 7 | } 8 | : T 9 | -------------------------------------------------------------------------------- /src/alert/demos/enUS/no-icon.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # No icon 3 | 4 | 5 | 11 | -------------------------------------------------------------------------------- /src/card/demos/zhCN/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 基础用法 3 | 4 | 基础卡片 5 | 6 | 7 | 12 | 13 | 18 | -------------------------------------------------------------------------------- /src/card/demos/zhCN/hoverable.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 可悬浮 3 | 4 | 5 | 10 | 11 | 16 | -------------------------------------------------------------------------------- /src/color-picker/demos/enUS/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Basic 3 | 4 | A basic color picker. Note: when choosing a color in a particular mode, that's the mode that will be used. 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/color-picker/demos/zhCN/close-debug.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Close debug 3 | 4 | 5 | 11 | -------------------------------------------------------------------------------- /src/dynamic-input/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as dynamicInputDark } from './dark' 2 | export { default as dynamicInputLight } from './light' 3 | export type { DynamicInputTheme, DynamicInputThemeVars } from './light' 4 | export { dynamicInputRtl } from './rtl' 5 | -------------------------------------------------------------------------------- /src/element/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { ElementTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | 4 | const elementDark: ElementTheme = { 5 | name: 'Element', 6 | common: commonDark 7 | } 8 | 9 | export default elementDark 10 | -------------------------------------------------------------------------------- /src/flex/demos/zhCN/vertical.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 垂直 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/space/demos/zhCN/vertical.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 垂直 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/space/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { SpaceTheme } from './light' 2 | import commonVars from './_common' 3 | 4 | const spaceDark: SpaceTheme = { 5 | name: 'Space', 6 | self() { 7 | return commonVars 8 | } 9 | } 10 | 11 | export default spaceDark 12 | -------------------------------------------------------------------------------- /src/time/demos/enUS/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Basic 3 | 4 | 5 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /src/time/demos/zhCN/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 基础用法 3 | 4 | 5 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /demo/pages/docs/changelog/enUS/index.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /demo/pages/docs/changelog/zhCN/index.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /src/_internal/wave/src/styles/index.cssr.ts: -------------------------------------------------------------------------------- 1 | import { cB } from '../../../../_utils/cssr/index' 2 | 3 | export default cB('base-wave', ` 4 | position: absolute; 5 | left: 0; 6 | right: 0; 7 | top: 0; 8 | bottom: 0; 9 | border-radius: inherit; 10 | `) 11 | -------------------------------------------------------------------------------- /src/avatar-group/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/avatar-group-rtl.cssr' 3 | 4 | export const avatarGroupRtl: RtlItem = { 5 | name: 'AvatarGroup', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/avatar/src/context.ts: -------------------------------------------------------------------------------- 1 | import type { AvatarGroupInjection } from '../../avatar-group/src/AvatarGroup' 2 | import { createInjectionKey } from '../../_utils' 3 | 4 | export const avatarGroupInjectionKey 5 | = createInjectionKey('n-avatar-group') 6 | -------------------------------------------------------------------------------- /src/flex/demos/enUS/vertical.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Vertical 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/flex/demos/zhCN/center.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 从中间 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/flex/demos/zhCN/from-end.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 从尾部 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/number-animation/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | default as NNumberAnimation, 3 | numberAnimationProps 4 | } from './src/NumberAnimation' 5 | export type { NumberAnimationProps } from './src/NumberAnimation' 6 | export type { NumberAnimationInst } from './src/NumberAnimation' 7 | -------------------------------------------------------------------------------- /src/time-picker/demos/enUS/hours12.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 12 hours 3 | 4 | 5 | 11 | -------------------------------------------------------------------------------- /src/time-picker/demos/zhCN/hours12.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 12 小时 3 | 4 | 5 | 11 | -------------------------------------------------------------------------------- /src/tsconfig.esm.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "target": "ES6", 5 | "jsx": "react", 6 | "rootDir": ".", 7 | "module": "ES6", 8 | "outDir": "../es" 9 | }, 10 | "exclude": ["./**/*.spec.*"] 11 | } 12 | -------------------------------------------------------------------------------- /src/avatar-group/index.ts: -------------------------------------------------------------------------------- 1 | export { avatarGroupProps, default as NAvatarGroup } from './src/AvatarGroup' 2 | export type { AvatarGroupProps, AvatarGroupSlots } from './src/AvatarGroup' 3 | export type * from './src/generic-public-types' 4 | export type * from './src/public-types' 5 | -------------------------------------------------------------------------------- /src/color-picker/demos/enUS/actions.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Clearable 3 | 4 | If you want the color picker to be clearable, you can add `'clear'` in `'actions'` prop. 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/config-provider/src/context.ts: -------------------------------------------------------------------------------- 1 | import type { ConfigProviderInjection } from './internal-interface' 2 | import { createInjectionKey } from '../../_utils' 3 | 4 | export const configProviderInjectionKey 5 | = createInjectionKey('n-config-provider') 6 | -------------------------------------------------------------------------------- /src/flex/demos/enUS/from-end.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # From End 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/input-number/src/interface.ts: -------------------------------------------------------------------------------- 1 | export type OnUpdateValue = (value: number | null) => void 2 | export type Size = 'tiny' | 'small' | 'medium' | 'large' 3 | 4 | export interface InputNumberInst { 5 | focus: () => void 6 | blur: () => void 7 | select: () => void 8 | } 9 | -------------------------------------------------------------------------------- /src/rate/demos/enUS/clearable.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Clearable 3 | 4 | After `clearable` is set, you can click at current value's corresponding value to reset value to `null`. 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/space/demos/enUS/vertical.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Vertical 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/space/demos/zhCN/center.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 从中间 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/space/demos/zhCN/from-end.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 从尾部 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/time-picker/demos/enUS/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Basic 3 | 4 | 5 | 11 | -------------------------------------------------------------------------------- /src/time-picker/demos/zhCN/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 基础用法 3 | 4 | 5 | 11 | -------------------------------------------------------------------------------- /src/_internal/selection/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const internalSelectionRtl: RtlItem = { 5 | name: 'InternalSelection', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/affix/src/styles/index.cssr.ts: -------------------------------------------------------------------------------- 1 | import { cB, cM } from '../../../_utils/cssr' 2 | 3 | export default cB('affix', [ 4 | cM('affixed', { 5 | position: 'fixed' 6 | }, [ 7 | cM('absolute-positioned', { 8 | position: 'absolute' 9 | }) 10 | ]) 11 | ]) 12 | -------------------------------------------------------------------------------- /src/avatar/demos/enUS/badge.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Badge 3 | 4 | Using it with `badge` would be nice (if you like tons of notifications). 5 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /src/card/demos/enUS/hoverable.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Hoverable 3 | 4 | 5 | 10 | 11 | 16 | -------------------------------------------------------------------------------- /src/collapse-transition/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const collapseTransitionRtl: RtlItem = { 5 | name: 'CollapseTransition', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/config-provider/tests/ConfigProvider.spec.ts: -------------------------------------------------------------------------------- 1 | import { mount } from '@vue/test-utils' 2 | import { NConfigProvider } from '../index' 3 | 4 | describe('n-config-provider', () => { 5 | it('should work with import on demand', () => { 6 | mount(NConfigProvider) 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /src/date-picker/demos/zhCN/status.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 验证状态 3 | 4 | 输入的验证状态可以脱离表单使用。 5 | 6 | 7 | 13 | -------------------------------------------------------------------------------- /src/flex/demos/enUS/center.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # From Center 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/menu/index.ts: -------------------------------------------------------------------------------- 1 | export type { 2 | MenuDividerOption, 3 | MenuGroupOption, 4 | MenuInst, 5 | MenuNodeProps, 6 | MenuOption 7 | } from './src/interface' 8 | export { menuProps, default as NMenu } from './src/Menu' 9 | export type { MenuProps } from './src/Menu' 10 | -------------------------------------------------------------------------------- /src/space/demos/enUS/center.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # From Center 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/space/demos/enUS/from-end.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # From End 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/_internal/select-menu/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const internalSelectMenuRtl: RtlItem = { 5 | name: 'InternalSelectMenu', 6 | style: rtlStyle 7 | } 8 | -------------------------------------------------------------------------------- /src/card/demos/enUS/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Basic 3 | 4 | A basic card. 5 | 6 | 7 | 12 | 13 | 18 | -------------------------------------------------------------------------------- /src/flex/demos/zhCN/space-between.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 间隙 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/input-number/demos/zhCN/disable-keyboard.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 禁用键盘上下 3 | 4 | 设定 `:keyboard="{ ArrowUp: false, ArrowDown: false }"` 来禁用键盘上下键。 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/legacy-transfer/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as legacyTransferDark } from './dark' 2 | export { default as legacyTransferLight } from './light' 3 | export type { 4 | TransferTheme as LegacyTransferTheme, 5 | TransferThemeVars as LegacyTransferThemeVars 6 | } from './light' 7 | -------------------------------------------------------------------------------- /src/popconfirm/demos/zhCN/no-icon.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 没有图标 3 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /src/result/demos/zhCN/error.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 错误 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/result/demos/zhCN/success.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 成功 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/space/demos/zhCN/space-between.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 间隙 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/_utils/event/index.ts: -------------------------------------------------------------------------------- 1 | const eventSet = new WeakSet() 2 | 3 | export function markEventEffectPerformed(event: Event): void { 4 | eventSet.add(event) 5 | } 6 | 7 | export function eventEffectNotPerformed(event: Event): boolean { 8 | return !eventSet.has(event) 9 | } 10 | -------------------------------------------------------------------------------- /src/button-group/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { ButtonGroupTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | 4 | const buttonGroupDark: ButtonGroupTheme = { 5 | name: 'ButtonGroup', 6 | common: commonDark 7 | } 8 | 9 | export default buttonGroupDark 10 | -------------------------------------------------------------------------------- /src/config-provider/demos/zhCN/inherit-theme.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 继承主题 3 | 4 | 如果不设置 `n-config-provider` 的主题,则 `n-config-provider` 主题默认继承外面的主题。 5 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /src/data-table/src/publicTypes.ts: -------------------------------------------------------------------------------- 1 | import type { TableBaseColumn } from './interface' 2 | 3 | export type DataTableGetCsvCell = ( 4 | value: any, 5 | rowData: object, 6 | column: TableBaseColumn 7 | ) => string 8 | export type DataTableGetCsvHeader = (column: TableBaseColumn) => string 9 | -------------------------------------------------------------------------------- /src/input-number/demos/zhCN/step.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 间隔 3 | 4 | 5 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /src/input/demos/zhCN/status.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 验证状态 3 | 4 | 输入的验证状态可以脱离表单使用。 5 | 6 | 7 | 13 | -------------------------------------------------------------------------------- /src/notification/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | closeMargin: '16px 12px', 3 | closeSize: '20px', 4 | closeIconSize: '16px', 5 | width: '365px', 6 | padding: '16px', 7 | titleFontSize: '16px', 8 | metaFontSize: '12px', 9 | descriptionFontSize: '12px' 10 | } 11 | -------------------------------------------------------------------------------- /src/result/demos/zhCN/s-404.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 404 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/result/demos/zhCN/size.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 尺寸 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | // shims-vue.d.ts 2 | declare module '*.vue' { 3 | import type { DefineComponent } from 'vue' 4 | 5 | const component: DefineComponent< 6 | Record, 7 | Record, 8 | any 9 | > 10 | export default component 11 | } 12 | -------------------------------------------------------------------------------- /src/_utils/vue/is-node-v-show-false.ts: -------------------------------------------------------------------------------- 1 | import type { VNode } from 'vue' 2 | import { vShow } from 'vue' 3 | 4 | export function isNodeVShowFalse(vNode: VNode): boolean { 5 | const showDir = vNode.dirs?.find(({ dir }) => dir === vShow) 6 | return !!(showDir && showDir.value === false) 7 | } 8 | -------------------------------------------------------------------------------- /src/avatar/demos/zhCN/color.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 颜色 3 | 4 | 你可以把它设成某种和你爱吃的东西有关的颜色。 5 | 6 | 7 | 17 | -------------------------------------------------------------------------------- /src/dynamic-tags/demos/zhCN/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 基础用法 3 | 4 | 5 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /src/empty/demos/zhCN/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 基础用法 3 | 4 | 5 | 14 | -------------------------------------------------------------------------------- /src/flex/demos/enUS/space-between.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Space Between 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/flex/demos/zhCN/space-around.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 空间围绕 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/heatmap/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NHeatmap } from './src/Heatmap' 2 | export { heatmapProps } from './src/Heatmap' 3 | export type { HeatmapProps } from './src/Heatmap' 4 | export type * from './src/public-types' 5 | export { heatmapMockData } from './src/utils' 6 | export * from './styles' 7 | -------------------------------------------------------------------------------- /src/input-number/demos/enUS/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Basic 3 | 4 | 5 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /src/input-number/demos/zhCN/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 基础用法 3 | 4 | 5 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /src/legacy-transfer/index.ts: -------------------------------------------------------------------------------- 1 | export type { Option as LegacyTransferOption } from './src/interface' 2 | export { 3 | transferProps as legacyTransferProps, 4 | default as NLegacyTransfer 5 | } from './src/Transfer' 6 | export type { transferProps as LegacyTransferProps } from './src/Transfer' 7 | -------------------------------------------------------------------------------- /src/mention/demos/zhCN/status.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 验证状态 3 | 4 | 输入的验证状态可以脱离表单使用。 5 | 6 | 7 | 13 | -------------------------------------------------------------------------------- /src/modal/demos/zhCN/dark-7-debug.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # pop debug 2 3 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /src/pagination/demos/enUS/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Basic 3 | 4 | 5 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /src/pagination/demos/zhCN/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 基础用法 3 | 4 | 5 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /src/popconfirm/demos/enUS/no-icon.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # No icon 3 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /src/popover/demos/zhCN/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 基础用法 3 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /src/popover/index.ts: -------------------------------------------------------------------------------- 1 | export type { PopoverInst, PopoverTrigger } from './src/interface' 2 | export { default as NPopover, popoverProps } from './src/Popover' 3 | export type { PopoverProps, PopoverSlots } from './src/Popover' 4 | export type { FollowerPlacement as PopoverPlacement } from 'vueuc' 5 | -------------------------------------------------------------------------------- /src/result/demos/zhCN/s-418.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 418 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/select/demos/zhCN/status.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 验证状态 3 | 4 | 输入的验证状态可以脱离表单使用。 5 | 6 | 7 | 13 | -------------------------------------------------------------------------------- /src/spin/demos/zhCN/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 基础用法 3 | 4 | 有 `small`、`medium` 和 `large` 的 Spin. 5 | 6 | 7 | 14 | -------------------------------------------------------------------------------- /src/cascader/demos/zhCN/status.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 验证状态 3 | 4 | 输入的验证状态可以脱离表单使用。 5 | 6 | 7 | 13 | -------------------------------------------------------------------------------- /src/dynamic-tags/demos/zhCN/max.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 最大标签数量 3 | 4 | 5 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /src/icon/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { IconTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | import { self } from './light' 4 | 5 | const iconDark: IconTheme = { 6 | name: 'Icon', 7 | common: commonDark, 8 | self 9 | } 10 | 11 | export default iconDark 12 | -------------------------------------------------------------------------------- /src/legacy-grid/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { Theme } from '../../_mixins' 2 | import { commonDark } from '../../_styles/common' 3 | 4 | const rowDark: Theme<'Row'> = { 5 | name: 'Row', 6 | common: commonDark 7 | } 8 | 9 | export default rowDark 10 | export type RowTheme = typeof rowDark 11 | -------------------------------------------------------------------------------- /src/list/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { ListTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | import { self } from './light' 4 | 5 | const listDark: ListTheme = { 6 | name: 'List', 7 | common: commonDark, 8 | self 9 | } 10 | 11 | export default listDark 12 | -------------------------------------------------------------------------------- /src/notification/src/context.ts: -------------------------------------------------------------------------------- 1 | import type { NotificationProviderInjection } from './NotificationProvider' 2 | import { createInjectionKey } from '../../_utils' 3 | 4 | export const notificationProviderInjectionKey 5 | = createInjectionKey('n-notification-provider') 6 | -------------------------------------------------------------------------------- /src/page-header/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { PageHeaderTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | import { self } from './light' 4 | 5 | export const pageHeaderDark: PageHeaderTheme = { 6 | name: 'PageHeader', 7 | common: commonDark, 8 | self 9 | } 10 | -------------------------------------------------------------------------------- /src/pagination/demos/zhCN/simple.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 简单分页 3 | 4 | 5 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /src/pagination/index.ts: -------------------------------------------------------------------------------- 1 | export type { 2 | PaginationInfo, 3 | PaginationRenderLabel, 4 | PaginationSizeOption 5 | } from './src/interface' 6 | export { default as NPagination, paginationProps } from './src/Pagination' 7 | export type { PaginationProps, PaginationSlots } from './src/Pagination' 8 | -------------------------------------------------------------------------------- /src/qr-code/src/styles/index.cssr.ts: -------------------------------------------------------------------------------- 1 | import { c, cB } from '../../../_utils/cssr' 2 | 3 | // vars: 4 | // --n-border-radius 5 | export default c([ 6 | cB('qr-code', ` 7 | background: #fff; 8 | border-radius: var(--n-border-radius); 9 | display: inline-flex; 10 | `) 11 | ]) 12 | -------------------------------------------------------------------------------- /src/result/demos/enUS/error.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Error 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/space/demos/enUS/space-between.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Space Between 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/space/demos/zhCN/space-around.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 空间围绕 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/spin/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { SpinTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | import { self } from './light' 4 | 5 | const spinDark: SpinTheme = { 6 | name: 'Spin', 7 | common: commonDark, 8 | self 9 | } 10 | 11 | export default spinDark 12 | -------------------------------------------------------------------------------- /src/time-picker/demos/enUS/format.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Format 3 | 4 | 5 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /src/time-picker/demos/zhCN/format.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 格式化 3 | 4 | 5 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /src/tooltip/demos/zhCN/arrow.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 不要箭头 3 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /src/tooltip/demos/zhCN/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 基础用法 3 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /src/_internal/scrollbar/styles/common.ts: -------------------------------------------------------------------------------- 1 | export const commonVars = { 2 | railInsetHorizontalBottom: 'auto 2px 4px 2px', 3 | railInsetHorizontalTop: '4px 2px auto 2px', 4 | railInsetVerticalRight: '2px 4px 2px auto', 5 | railInsetVerticalLeft: '2px auto 2px 4px', 6 | railColor: 'transparent' 7 | } 8 | -------------------------------------------------------------------------------- /src/dynamic-input/index.ts: -------------------------------------------------------------------------------- 1 | export { dynamicInputProps, default as NDynamicInput } from './src/DynamicInput' 2 | export type { DynamicInputProps, DynamicInputSlots } from './src/DynamicInput' 3 | export type { 4 | DynamicInputActionSlotProps, 5 | DynamicInputDefaultSlotProps 6 | } from './src/interface' 7 | -------------------------------------------------------------------------------- /src/dynamic-tags/demos/enUS/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Basic 3 | 4 | 5 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /src/empty/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { EmptyTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | import { self } from './light' 4 | 5 | const emptyDark: EmptyTheme = { 6 | name: 'Empty', 7 | common: commonDark, 8 | self 9 | } 10 | 11 | export default emptyDark 12 | -------------------------------------------------------------------------------- /src/flex/demos/enUS/space-around.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Space Around 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/form/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { FormTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | import { self } from './light' 4 | 5 | const formItemDark: FormTheme = { 6 | name: 'Form', 7 | common: commonDark, 8 | self 9 | } 10 | 11 | export default formItemDark 12 | -------------------------------------------------------------------------------- /src/legacy-grid/styles/light.ts: -------------------------------------------------------------------------------- 1 | import type { Theme } from '../../_mixins' 2 | import { commonLight } from '../../_styles/common' 3 | 4 | const rowLight: Theme<'Row'> = { 5 | name: 'Row', 6 | common: commonLight 7 | } 8 | 9 | export default rowLight 10 | export type RowTheme = typeof rowLight 11 | -------------------------------------------------------------------------------- /src/modal/demos/zhCN/dark-8-debug.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # pop debug 3 3 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /src/rate/demos/zhCN/size.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 尺寸 3 | 4 | 有 `small`、`medium` 和 `large` 尺寸。 5 | 6 | 7 | 14 | -------------------------------------------------------------------------------- /src/spin/demos/enUS/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Basic 3 | 4 | Here are `small`, `medium` and `large` spins. 5 | 6 | 7 | 14 | -------------------------------------------------------------------------------- /src/steps/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { StepsTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | import { self } from './light' 4 | 5 | const stepsDark: StepsTheme = { 6 | name: 'Steps', 7 | common: commonDark, 8 | self 9 | } 10 | 11 | export default stepsDark 12 | -------------------------------------------------------------------------------- /src/table/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { TableTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | import { self } from './light' 4 | 5 | const tableDark: TableTheme = { 6 | name: 'Table', 7 | common: commonDark, 8 | self 9 | } 10 | 11 | export default tableDark 12 | -------------------------------------------------------------------------------- /src/thing/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { ThingTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | import { self } from './light' 4 | 5 | const thingDark: ThingTheme = { 6 | name: 'Thing', 7 | common: commonDark, 8 | self 9 | } 10 | 11 | export default thingDark 12 | -------------------------------------------------------------------------------- /src/tooltip/demos/zhCN/placement.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 位置 3 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /src/_internal/scrollbar/styles/rtl.ts: -------------------------------------------------------------------------------- 1 | import type { RtlItem } from '../../../config-provider/src/internal-interface' 2 | import rtlStyle from '../src/styles/rtl.cssr' 3 | 4 | export const scrollbarRtl: RtlItem = { 5 | name: 'Scrollbar', 6 | style: rtlStyle 7 | } 8 | 9 | export default scrollbarRtl 10 | -------------------------------------------------------------------------------- /src/_internal/selection/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as internalSelectionDark } from './dark' 2 | export { default as internalSelectionLight } from './light' 3 | export type { 4 | InternalSelectionTheme, 5 | InternalSelectionThemeVars 6 | } from './light' 7 | export { internalSelectionRtl } from './rtl' 8 | -------------------------------------------------------------------------------- /src/_utils/color/index.ts: -------------------------------------------------------------------------------- 1 | import { composite } from 'seemly' 2 | 3 | export function createHoverColor(rgb: string): string { 4 | return composite(rgb, [255, 255, 255, 0.16]) 5 | } 6 | 7 | export function createPressedColor(rgb: string): string { 8 | return composite(rgb, [0, 0, 0, 0.12]) 9 | } 10 | -------------------------------------------------------------------------------- /src/_utils/env/browser.ts: -------------------------------------------------------------------------------- 1 | import { isBrowser } from './is-browser' 2 | 3 | export const isChrome = isBrowser && 'chrome' in window 4 | export const isFirefox = isBrowser && navigator.userAgent.includes('Firefox') 5 | export const isSafari 6 | = isBrowser && navigator.userAgent.includes('Safari') && !isChrome 7 | -------------------------------------------------------------------------------- /src/_utils/env/is-jsdom.ts: -------------------------------------------------------------------------------- 1 | let _isJsdom: boolean | undefined 2 | 3 | export function isJsdom(): boolean { 4 | if (_isJsdom === undefined) { 5 | _isJsdom 6 | = navigator.userAgent.includes('Node.js') 7 | || navigator.userAgent.includes('jsdom') 8 | } 9 | return _isJsdom 10 | } 11 | -------------------------------------------------------------------------------- /src/alert/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | iconMargin: '11px 8px 0 12px', 3 | iconMarginRtl: '11px 12px 0 8px', 4 | iconSize: '24px', 5 | closeIconSize: '16px', 6 | closeSize: '20px', 7 | closeMargin: '13px 14px 0 0', 8 | closeMarginRtl: '13px 0 0 14px', 9 | padding: '13px' 10 | } 11 | -------------------------------------------------------------------------------- /src/anchor/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { AnchorTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | import { self } from './light' 4 | 5 | const anchorDark: AnchorTheme = { 6 | name: 'Anchor', 7 | common: commonDark, 8 | self 9 | } 10 | 11 | export default anchorDark 12 | -------------------------------------------------------------------------------- /src/avatar/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { AvatarTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | import { self } from './light' 4 | 5 | const avatarDark: AvatarTheme = { 6 | name: 'Avatar', 7 | common: commonDark, 8 | self 9 | } 10 | 11 | export default avatarDark 12 | -------------------------------------------------------------------------------- /src/color-picker/demos/zhCN/size.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 尺寸 3 | 4 | `small`、`medium`、`large`。 5 | 6 | 7 | 14 | -------------------------------------------------------------------------------- /src/config-provider/demos/zhCN/transparent.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 不需要包裹 DOM 3 | 4 | 如果不需要包裹 DOM,设置 `abstract`。 5 | 6 | 7 | 14 | -------------------------------------------------------------------------------- /src/flex/demos/zhCN/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 基础用法 3 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /src/form/src/context.ts: -------------------------------------------------------------------------------- 1 | import type { FormInjection } from './interface' 2 | import { createInjectionKey } from '../../_utils' 3 | 4 | export const formInjectionKey = createInjectionKey('n-form') 5 | export const formItemInstsInjectionKey 6 | = createInjectionKey('n-form-item-insts') 7 | -------------------------------------------------------------------------------- /src/input-number/demos/zhCN/status.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 验证状态 3 | 4 | 输入的验证状态可以脱离表单使用。 5 | 6 | 7 | 13 | -------------------------------------------------------------------------------- /src/pagination/demos/enUS/simple.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Simple mode 3 | 4 | 5 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /src/pagination/demos/zhCN/prev.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 自定义上一步和下一步 3 | 4 | 5 | 15 | -------------------------------------------------------------------------------- /src/popover/demos/zhCN/no-arrow.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 不要箭头 3 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /src/result/demos/enUS/success.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Success 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/result/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { ResultTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | import { self } from './light' 4 | 5 | const resultDark: ResultTheme = { 6 | name: 'Result', 7 | common: commonDark, 8 | self 9 | } 10 | 11 | export default resultDark 12 | -------------------------------------------------------------------------------- /src/slider/demos/zhCN/format.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 格式化弹出提示 3 | 4 | 5 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /src/space/demos/enUS/space-around.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Space Around 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/tag/demos/enUS/color.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Color 3 | 4 | Use a color object to customize color. 5 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /src/time-picker/demos/zhCN/status.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 验证状态 3 | 4 | 输入的验证状态可以脱离表单使用。 5 | 6 | 7 | 13 | -------------------------------------------------------------------------------- /src/timeline/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NTimeline, timelineProps } from './src/Timeline' 2 | export type { TimelineProps } from './src/Timeline' 3 | export { default as NTimelineItem, timelineItemProps } from './src/TimelineItem' 4 | export type { TimelineItemProps, TimelineItemSlots } from './src/TimelineItem' 5 | -------------------------------------------------------------------------------- /src/tree-select/demos/zhCN/status.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 验证状态 3 | 4 | 输入的验证状态可以脱离表单使用。 5 | 6 | 7 | 13 | -------------------------------------------------------------------------------- /scripts/md-to-vue.ts: -------------------------------------------------------------------------------- 1 | import { argv } from 'node:process' 2 | import { convertFilesByComponentName } from './utils/loader' 3 | 4 | async function translateMdToVue(): Promise { 5 | const componentName = argv[2] 6 | await convertFilesByComponentName(componentName) 7 | } 8 | 9 | translateMdToVue() 10 | -------------------------------------------------------------------------------- /src/_internal/select-menu/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as internalSelectMenuDark } from './dark' 2 | export { default as internalSelectMenuLight } from './light' 3 | export type { 4 | InternalSelectMenuTheme, 5 | InternalSelectMenuThemeVars 6 | } from './light' 7 | export { internalSelectMenuRtl } from './rtl' 8 | -------------------------------------------------------------------------------- /src/_utils/ts/ts.ts: -------------------------------------------------------------------------------- 1 | export type ThemeRelatedProps 2 | = | 'theme' 3 | | 'themeOverrides' 4 | | 'builtinThemeOverrides' 5 | export type Equal 6 | = (() => T extends X ? 1 : 2) extends () => T extends Y ? 1 : 2 7 | ? true 8 | : false 9 | export type Expect = T 10 | -------------------------------------------------------------------------------- /src/auto-complete/demos/zhCN/status.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 验证状态 3 | 4 | 输入的验证状态可以脱离表单使用。 5 | 6 | 7 | 13 | -------------------------------------------------------------------------------- /src/collapse-transition/styles/index.ts: -------------------------------------------------------------------------------- 1 | export { default as collapseTransitionDark } from './dark' 2 | export { default as collapseTransitionLight } from './light' 3 | export type { 4 | CollapseTransitionTheme, 5 | CollapseTransitionThemeVars 6 | } from './light' 7 | export { collapseTransitionRtl } from './rtl' 8 | -------------------------------------------------------------------------------- /src/color-picker/demos/enUS/size.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Size 3 | 4 | `small`, `medium`, `large`. 5 | 6 | 7 | 14 | -------------------------------------------------------------------------------- /src/divider/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { DividerTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | import { self } from './light' 4 | 5 | const dividerDark: DividerTheme = { 6 | name: 'Divider', 7 | common: commonDark, 8 | self 9 | } 10 | 11 | export default dividerDark 12 | -------------------------------------------------------------------------------- /src/flex/demos/enUS/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Basic 3 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /src/image/demos/zhCN/preview-disabled.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 禁止预览 3 | 4 | 你可以使用 `preview-disabled` 来禁止预览。 5 | 6 | 7 | 14 | -------------------------------------------------------------------------------- /src/marquee/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { MarqueeTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | import { self } from './light' 4 | 5 | const marqueeDark: MarqueeTheme = { 6 | name: 'Marquee', 7 | common: commonDark, 8 | self 9 | } 10 | 11 | export default marqueeDark 12 | -------------------------------------------------------------------------------- /src/message/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { MessageTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | import { self } from './light' 4 | 5 | const messageDark: MessageTheme = { 6 | name: 'Message', 7 | common: commonDark, 8 | self 9 | } 10 | 11 | export default messageDark 12 | -------------------------------------------------------------------------------- /src/space/demos/enUS/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Basic 3 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /src/space/demos/zhCN/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 基础用法 3 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /src/tsconfig.cjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "target": "ES6", 5 | "jsx": "react", 6 | "rootDir": ".", 7 | "module": "CommonJS", 8 | "moduleResolution": "node", 9 | "outDir": "../lib" 10 | }, 11 | "exclude": ["./**/*.spec.*"] 12 | } 13 | -------------------------------------------------------------------------------- /src/carousel/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { CarouselTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | import { self } from './light' 4 | 5 | const carouselDark: CarouselTheme = { 6 | name: 'Carousel', 7 | common: commonDark, 8 | self 9 | } 10 | 11 | export default carouselDark 12 | -------------------------------------------------------------------------------- /src/collapse-transition/src/styles/index.cssr.ts: -------------------------------------------------------------------------------- 1 | import { fadeInHeightExpandTransition } from '../../../_styles/transitions/fade-in-height-expand.cssr' 2 | import { cB } from '../../../_utils/cssr' 3 | 4 | export default cB('collapse-transition', { 5 | width: '100%' 6 | }, [ 7 | fadeInHeightExpandTransition() 8 | ]) 9 | -------------------------------------------------------------------------------- /src/collapse/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { CollapseTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | import { self } from './light' 4 | 5 | const collapseDark: CollapseTheme = { 6 | name: 'Collapse', 7 | common: commonDark, 8 | self 9 | } 10 | 11 | export default collapseDark 12 | -------------------------------------------------------------------------------- /src/date-picker/demos/enUS/status.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Validation status 3 | 4 | Validation status can be applied outside form. 5 | 6 | 7 | 13 | -------------------------------------------------------------------------------- /src/dynamic-tags/demos/enUS/max.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Max tag count 3 | 4 | 5 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /src/dynamic-tags/index.ts: -------------------------------------------------------------------------------- 1 | export { dynamicTagsProps, default as NDynamicTags } from './src/DynamicTags' 2 | export type { DynamicTagsProps, DynamicTagsSlots } from './src/DynamicTags' 3 | export type { 4 | DynamicTagsInputSlotProps, 5 | DynamicTagsOption, 6 | DynamicTagsTriggerSlotProps 7 | } from './src/interface' 8 | -------------------------------------------------------------------------------- /src/equation/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { EquationTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | import { self } from './light' 4 | 5 | const equationDark: EquationTheme = { 6 | name: 'Equation', 7 | common: commonDark, 8 | self 9 | } 10 | 11 | export default equationDark 12 | -------------------------------------------------------------------------------- /src/heatmap/src/interface.ts: -------------------------------------------------------------------------------- 1 | import type { HeatmapDataItem } from './public-types' 2 | 3 | export interface DayRect extends HeatmapDataItem { 4 | color: string 5 | dayOfWeek: number // 0 = Sunday 6 | rowIndex: number // 0 = first row, relative to weekStartOn 7 | colIndex: number // column index in the matrix 8 | } 9 | -------------------------------------------------------------------------------- /src/input-number/demos/zhCN/theme-debug.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Theme debug 3 | 4 | 5 | 16 | -------------------------------------------------------------------------------- /src/layout/demos/zhCN/embedded.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 嵌入效果 3 | 4 | 有的时候你希望背景色暗一点,来突出上面显示的内容(尤其是卡片)。 5 | 6 | 7 | 15 | -------------------------------------------------------------------------------- /src/popover/demos/enUS/no-arrow.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # No arrow 3 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /src/slider/demos/enUS/format.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Format tooltip 3 | 4 | 5 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /src/split/demos/zhCN/vertical.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 垂直布局 3 | 4 | 5 | 15 | -------------------------------------------------------------------------------- /src/thing/src/styles/rtl.cssr.ts: -------------------------------------------------------------------------------- 1 | import { cB, cM } from '../../../_utils/cssr' 2 | 3 | export default cB('thing', [ 4 | cM('rtl', ` 5 | direction: rtl; 6 | text-align: right; 7 | `, [ 8 | cB('thing-avatar', ` 9 | margin-left: 12px; 10 | margin-right: 0; 11 | `) 12 | ]) 13 | ]) 14 | -------------------------------------------------------------------------------- /src/tooltip/demos/enUS/placement.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Placement 3 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /src/transfer/index.ts: -------------------------------------------------------------------------------- 1 | export type { 2 | Option as TransferOption, 3 | TransferRenderSourceLabel, 4 | TransferRenderSourceList, 5 | TransferRenderTargetLabel 6 | } from './src/interface' 7 | export { default as NTransfer, transferProps } from './src/Transfer' 8 | export type { TransferProps } from './src/Transfer' 9 | -------------------------------------------------------------------------------- /src/typography/src/headers.ts: -------------------------------------------------------------------------------- 1 | import createHeader from './create-header' 2 | 3 | export const NH1 = createHeader('1') 4 | export const NH2 = createHeader('2') 5 | export const NH3 = createHeader('3') 6 | export const NH4 = createHeader('4') 7 | export const NH5 = createHeader('5') 8 | export const NH6 = createHeader('6') 9 | -------------------------------------------------------------------------------- /themes/tusimple/tsconfig.esm.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "target": "ES6", 5 | "jsx": "react", 6 | "rootDir": "./src", 7 | "module": "ES6", 8 | "outDir": "./es" 9 | }, 10 | "references": [{ "path": "../../src/tsconfig.esm.json" }] 11 | } 12 | -------------------------------------------------------------------------------- /playground/testColor.js: -------------------------------------------------------------------------------- 1 | const tinyColor = require('tinycolor2') 2 | 3 | const red = tinyColor('#ce347c').getBrightness() 4 | const green = tinyColor('#00c060').getBrightness() 5 | const orange = tinyColor('#EF8745').getBrightness() 6 | const blue = tinyColor('#2090f0').getBrightness() 7 | console.log(red, green, orange, blue) 8 | -------------------------------------------------------------------------------- /src/_utils/vue/keep.ts: -------------------------------------------------------------------------------- 1 | export function keep( 2 | object: T, 3 | keys: K[] = [], 4 | rest?: R 5 | ): Pick & R { 6 | const keepedObject: any = {} 7 | keys.forEach((key) => { 8 | keepedObject[key] = (object as any)[key] 9 | }) 10 | return Object.assign(keepedObject, rest) 11 | } 12 | -------------------------------------------------------------------------------- /src/element/styles/light.ts: -------------------------------------------------------------------------------- 1 | import type { Theme } from '../../_mixins' 2 | import { commonLight } from '../../_styles/common' 3 | 4 | const elementLight: Theme<'Element'> = { 5 | name: 'Element', 6 | common: commonLight 7 | } 8 | 9 | export default elementLight 10 | export type ElementTheme = typeof elementLight 11 | -------------------------------------------------------------------------------- /src/empty/demos/enUS/basic.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Basic 3 | 4 | 5 | 14 | -------------------------------------------------------------------------------- /src/grid/index.ts: -------------------------------------------------------------------------------- 1 | export { gridProps, default as NGrid } from './src/Grid' 2 | export type { GridProps } from './src/Grid' 3 | export { gridItemProps, default as NGridItem } from './src/GridItem' 4 | export { gridItemProps as giProps, default as NGi } from './src/GridItem' 5 | export type { GridItemProps } from './src/GridItem' 6 | -------------------------------------------------------------------------------- /src/icon-wrapper/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { IconWrapperTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | import { self } from './light' 4 | 5 | const iconDark: IconWrapperTheme = { 6 | name: 'IconWrapper', 7 | common: commonDark, 8 | self 9 | } 10 | 11 | export default iconDark 12 | -------------------------------------------------------------------------------- /src/pagination/demos/zhCN/item-count.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 使用元素个数控制分页 3 | 4 | 有的时候你不想传递 `page-count`,这个时候你可以设定 `item-count` 和 `page-size`。 5 | 6 | 7 | 14 | -------------------------------------------------------------------------------- /src/preset.ts: -------------------------------------------------------------------------------- 1 | import * as components from './components' 2 | import create from './create' 3 | 4 | const naive = create({ 5 | components: Object.keys(components).map( 6 | key => components[key as keyof typeof components] 7 | ) 8 | }) 9 | 10 | export default naive 11 | export const install = naive.install 12 | -------------------------------------------------------------------------------- /src/result/demos/zhCN/s-403.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 403 3 | 4 | 5 | 16 | -------------------------------------------------------------------------------- /src/anchor/index.ts: -------------------------------------------------------------------------------- 1 | export { anchorProps, default as NAnchor } from './src/AnchorAdapter' 2 | export type { AnchorInst, AnchorProps } from './src/AnchorAdapter' 3 | export { anchorLinkProps, default as NAnchorLink } from './src/Link' 4 | export type { AnchorLinkProps } from './src/Link' 5 | export type * from './src/public-types' 6 | -------------------------------------------------------------------------------- /src/avatar/demos/enUS/color.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Color 3 | 4 | You can set colors related to things you want to eat. 5 | 6 | 7 | 17 | -------------------------------------------------------------------------------- /src/avatar/demos/zhCN/fallback.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 加载失败时显示的图像 3 | 4 | 下面的头像加载失败时会展示 07akioni。 5 | 6 | 7 | 15 | -------------------------------------------------------------------------------- /src/avatar/demos/zhCN/icon.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 图标 3 | 4 | 我喜欢用图标当头像。 5 | 6 | 7 | 10 | 11 | 18 | -------------------------------------------------------------------------------- /src/button/demos/zhCN/tag.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 标签 3 | 4 | 你可以把按钮渲染成不同的标签,比如 ``。 5 | 6 | 7 | 18 | -------------------------------------------------------------------------------- /src/message/src/styles/rtl.cssr.ts: -------------------------------------------------------------------------------- 1 | import { cB, cE, cM } from '../../../_utils/cssr' 2 | 3 | export default cB('message', [ 4 | cM('rtl', ` 5 | direction: rtl; 6 | `, [ 7 | cE('close', ` 8 | margin: 0 10px 0 0; 9 | `), 10 | cE('icon', ` 11 | margin: 0 0 0 10px; 12 | `) 13 | ]) 14 | ]) 15 | -------------------------------------------------------------------------------- /src/result/demos/zhCN/info.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 信息 3 | 4 | 5 | 16 | -------------------------------------------------------------------------------- /src/statistic/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { StatisticTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | import { self } from './light' 4 | 5 | const statisticDark: StatisticTheme = { 6 | name: 'Statistic', 7 | common: commonDark, 8 | self 9 | } 10 | 11 | export default statisticDark 12 | -------------------------------------------------------------------------------- /src/tooltip/demos/enUS/arrow.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # No arrow 3 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /src/avatar/demos/enUS/fallback.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Fallback 3 | 4 | Show 07akioni if loading fails. 5 | 6 | 7 | 15 | -------------------------------------------------------------------------------- /src/breadcrumb/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { BreadcrumbTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | import { self } from './light' 4 | 5 | const breadcrumbDark: BreadcrumbTheme = { 6 | name: 'Breadcrumb', 7 | common: commonDark, 8 | self 9 | } 10 | 11 | export default breadcrumbDark 12 | -------------------------------------------------------------------------------- /src/checkbox/demos/zhCN/size.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 尺寸 3 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /src/input-otp/demos/zhCN/mask.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 密码模式 3 | 4 | 指定 `mask = true`,可开启密码模式。 5 | 6 | 7 | 12 | 13 | 16 | -------------------------------------------------------------------------------- /src/input/demos/enUS/status.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Validation status 3 | 4 | Validation status can be applied outside form. 5 | 6 | 7 | 13 | -------------------------------------------------------------------------------- /src/input/demos/zhCN/round.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 圆角 3 | 4 | 文本输入可以是圆角的。 5 | 6 | 7 | 14 | -------------------------------------------------------------------------------- /src/message/styles/_common.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | margin: '0 0 8px 0', 3 | padding: '10px 20px', 4 | maxWidth: '720px', 5 | minWidth: '420px', 6 | iconMargin: '0 10px 0 0', 7 | closeMargin: '0 0 0 10px', 8 | closeSize: '20px', 9 | closeIconSize: '16px', 10 | iconSize: '20px', 11 | fontSize: '14px' 12 | } 13 | -------------------------------------------------------------------------------- /src/result/demos/zhCN/s-500.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 500 3 | 4 | 5 | 16 | -------------------------------------------------------------------------------- /src/select/demos/enUS/status.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Validation status 3 | 4 | Validation status can be applied outside form. 5 | 6 | 7 | 13 | -------------------------------------------------------------------------------- /src/switch/demos/zhCN/content.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 内容 3 | 4 | 向开关中加入内容。 5 | 6 | 7 | 17 | -------------------------------------------------------------------------------- /src/time/demos/enUS/type.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Type 3 | 4 | `date`, `datetime` or `relative`. 5 | 6 | 7 | 10 | 11 | 16 | -------------------------------------------------------------------------------- /src/time/demos/zhCN/type.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 类型 3 | 4 | `date`、`datetime` 或者 `relative`。 5 | 6 | 7 | 10 | 11 | 16 | -------------------------------------------------------------------------------- /src/typography/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { TypographyTheme } from './light' 2 | import { commonDark } from '../../_styles/common' 3 | import { self } from './light' 4 | 5 | const typographyDark: TypographyTheme = { 6 | name: 'Typography', 7 | common: commonDark, 8 | self 9 | } 10 | 11 | export default typographyDark 12 | -------------------------------------------------------------------------------- /playground/collect-vars.js: -------------------------------------------------------------------------------- 1 | const varRegex = /var\(--([^)]+)\)/g 2 | 3 | function getVars (input) { 4 | console.log( 5 | Array.from( 6 | new Set(Array.from(input.matchAll(varRegex)).map((v) => '// --' + v[1])) 7 | ) 8 | .sort() 9 | .join('\n') 10 | ) 11 | } 12 | 13 | getVars(document.body.textContent) 14 | -------------------------------------------------------------------------------- /scripts/gen-version.ts: -------------------------------------------------------------------------------- 1 | import { writeFileSync } from 'node:fs' 2 | import { resolve } from 'node:path' 3 | import { cwd } from 'node:process' 4 | import packageJson from '../package.json' with { type: 'json' } 5 | 6 | writeFileSync( 7 | resolve(cwd(), 'src', 'version.ts'), 8 | `export default '${packageJson.version}'\n` 9 | ) 10 | -------------------------------------------------------------------------------- /src/_internal/icons/Switcher.tsx: -------------------------------------------------------------------------------- 1 | import { defineComponent, h } from 'vue' 2 | 3 | export default defineComponent({ 4 | name: 'Switcher', 5 | render() { 6 | return ( 7 | 8 | 9 | 10 | ) 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /src/_internal/scrollbar/styles/dark.ts: -------------------------------------------------------------------------------- 1 | import type { ScrollbarTheme } from './light' 2 | import { commonDark } from '../../../_styles/common' 3 | import { self } from './light' 4 | 5 | const scrollbarDark: ScrollbarTheme = { 6 | name: 'Scrollbar', 7 | common: commonDark, 8 | self 9 | } 10 | 11 | export default scrollbarDark 12 | -------------------------------------------------------------------------------- /src/alert/demos/zhCN/marquee.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 跑马灯 3 | 4 | 你可以配合 `n-marquee` 实现轮播的效果。 5 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /src/color-picker/demos/zhCN/swatches.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # 色板 3 | 4 | 你也可以预设一个色板供用户选择。 5 | 6 | 7 | 18 | -------------------------------------------------------------------------------- /src/config-provider/demos/enUS/inherit-theme.demo.vue: -------------------------------------------------------------------------------- 1 | 2 | # Inherit theme 3 | 4 | If you don't set theme of `n-config-provider`, the theme of `n-config-provider` is inherited by default. 5 | 6 | 7 | 12 | --------------------------------------------------------------------------------