├── src ├── components │ ├── kbd │ │ ├── index.ts │ │ ├── kbd.tsx │ │ └── utils.ts │ ├── slider │ │ ├── hooks.ts │ │ ├── index.ts │ │ ├── steps.tsx │ │ ├── context.ts │ │ └── handle.tsx │ ├── button-group │ │ ├── index.ts │ │ └── button-group.tsx │ ├── guideline │ │ ├── index.tsx │ │ └── context.ts │ ├── fab │ │ ├── index.ts │ │ └── context.ts │ ├── tag │ │ ├── index.ts │ │ └── context.ts │ ├── chat │ │ ├── index.ts │ │ └── context.ts │ ├── icon │ │ ├── index.ts │ │ ├── .DS_Store │ │ ├── icons │ │ │ ├── file │ │ │ │ ├── index.tsx │ │ │ │ └── file-upload.tsx │ │ │ ├── mock │ │ │ │ └── index.ts │ │ │ ├── home │ │ │ │ └── index.tsx │ │ │ ├── device │ │ │ │ ├── index.ts │ │ │ │ └── dark-mode.tsx │ │ │ ├── toggle │ │ │ │ ├── index.ts │ │ │ │ ├── star.tsx │ │ │ │ ├── star-half.tsx │ │ │ │ └── star-outline.tsx │ │ │ ├── hardware │ │ │ │ ├── keyboard_backspace.svg │ │ │ │ ├── start.svg │ │ │ │ ├── keyboard_return.svg │ │ │ │ ├── keyboard_control_key.svg │ │ │ │ ├── keyboard_option_key.svg │ │ │ │ ├── laptop_chromebook.svg │ │ │ │ ├── power_input.svg │ │ │ │ ├── keyboard_tab.svg │ │ │ │ ├── tablet.svg │ │ │ │ ├── laptop.svg │ │ │ │ ├── keyboard_capslock.svg │ │ │ │ ├── smartphone.svg │ │ │ │ ├── tv.svg │ │ │ │ ├── computer.svg │ │ │ │ ├── monitor.svg │ │ │ │ ├── desktop_mac.svg │ │ │ │ ├── dock.svg │ │ │ │ ├── desktop_windows.svg │ │ │ │ ├── keyboard_double_arrow_down.svg │ │ │ │ ├── keyboard_double_arrow_up.svg │ │ │ │ ├── phone_android.svg │ │ │ │ ├── security.svg │ │ │ │ ├── tablet_android.svg │ │ │ │ ├── device_hub.svg │ │ │ │ ├── laptop_windows.svg │ │ │ │ ├── phonelink.svg │ │ │ │ ├── browser_updated.svg │ │ │ │ ├── smart_display.svg │ │ │ │ ├── headphones.svg │ │ │ │ ├── home_max.svg │ │ │ │ ├── sim_card.svg │ │ │ │ ├── developer_board.svg │ │ │ │ ├── scanner.svg │ │ │ │ ├── cast.svg │ │ │ │ ├── home_mini.svg │ │ │ │ ├── headset_mic.svg │ │ │ │ ├── memory.svg │ │ │ │ ├── cast_connected.svg │ │ │ │ ├── phone_iphone.svg │ │ │ │ ├── tablet_mac.svg │ │ │ │ ├── gamepad.svg │ │ │ │ ├── connected_tv.svg │ │ │ │ ├── headset.svg │ │ │ │ ├── keyboard.svg │ │ │ │ ├── keyboard-arrow-left.tsx │ │ │ │ ├── keyboard_hide.svg │ │ │ │ ├── laptop_mac.svg │ │ │ │ ├── cast_for_education.svg │ │ │ │ ├── adf_scanner.svg │ │ │ │ ├── keyboard_alt.svg │ │ │ │ ├── device_unknown.svg │ │ │ │ ├── keyboard-arrow-up.tsx │ │ │ │ ├── keyboard-arrow-right.tsx │ │ │ │ ├── keyboard-arrow-down.tsx │ │ │ │ ├── headphones_battery.svg │ │ │ │ ├── mouse.svg │ │ │ │ ├── speaker.svg │ │ │ │ ├── keyboard-double-arrow-right.tsx │ │ │ │ ├── phonelink_off.svg │ │ │ │ ├── smart_screen.svg │ │ │ │ ├── index.ts │ │ │ │ ├── keyboard-double-arrow-left.tsx │ │ │ │ ├── keyboard_voice.svg │ │ │ │ ├── watch.svg │ │ │ │ ├── router.svg │ │ │ │ ├── browser_not_supported.svg │ │ │ │ ├── devices_other.svg │ │ │ │ ├── speaker_group.svg │ │ │ │ ├── videogame_asset.svg │ │ │ │ ├── smart_toy.svg │ │ │ │ ├── earbuds_battery.svg │ │ │ │ ├── keyboard_command_key.svg │ │ │ │ ├── videogame_asset_off.svg │ │ │ │ ├── headset_off.svg │ │ │ │ └── developer_board_off.svg │ │ │ ├── content │ │ │ │ ├── index.ts │ │ │ │ ├── clear.tsx │ │ │ │ ├── redo.tsx │ │ │ │ ├── undo.tsx │ │ │ │ ├── font-download.tsx │ │ │ │ └── link-off.tsx │ │ │ ├── navigation │ │ │ │ ├── index.ts │ │ │ │ ├── menu.tsx │ │ │ │ ├── check.tsx │ │ │ │ ├── close.tsx │ │ │ │ ├── menu-open.tsx │ │ │ │ ├── unfold-more.tsx │ │ │ │ ├── more-horiz.tsx │ │ │ │ └── cancel.tsx │ │ │ ├── index.ts │ │ │ ├── alert │ │ │ │ ├── index.ts │ │ │ │ ├── warning.tsx │ │ │ │ ├── error.tsx │ │ │ │ ├── warning-amber.tsx │ │ │ │ ├── error-outline.tsx │ │ │ │ ├── add-alert.tsx │ │ │ │ ├── notification-important.tsx │ │ │ │ └── auto-delete.tsx │ │ │ ├── action │ │ │ │ ├── swap-horiz.tsx │ │ │ │ ├── turned-in.tsx │ │ │ │ ├── swap-vert.tsx │ │ │ │ ├── code.tsx │ │ │ │ ├── done.tsx │ │ │ │ ├── delete.tsx │ │ │ │ ├── logout.tsx │ │ │ │ ├── open-in-new.tsx │ │ │ │ ├── check-circle.tsx │ │ │ │ ├── done-outline.tsx │ │ │ │ ├── check-circle-outline.tsx │ │ │ │ ├── schedule.tsx │ │ │ │ ├── translate.tsx │ │ │ │ ├── visibility.tsx │ │ │ │ ├── preview.tsx │ │ │ │ └── zoom-out.tsx │ │ │ ├── editor │ │ │ │ ├── format-italic.tsx │ │ │ │ ├── notes.tsx │ │ │ │ ├── format-strikethrough.tsx │ │ │ │ ├── format-underlined.tsx │ │ │ │ ├── index.ts │ │ │ │ ├── checklist.tsx │ │ │ │ ├── superscript.tsx │ │ │ │ ├── insert-link.tsx │ │ │ │ ├── subscript.tsx │ │ │ │ ├── attch-file.tsx │ │ │ │ └── format-bold.tsx │ │ │ ├── image │ │ │ │ ├── looks-one.tsx │ │ │ │ ├── looks-four.tsx │ │ │ │ ├── index.ts │ │ │ │ ├── looks-five.tsx │ │ │ │ ├── looks-two.tsx │ │ │ │ ├── looks-six.tsx │ │ │ │ ├── looks-three.tsx │ │ │ │ ├── edit.tsx │ │ │ │ └── bedtime.tsx │ │ │ └── __test__ │ │ │ │ └── index.test.tsx │ │ ├── context.ts │ │ └── hoc.ts │ ├── menu │ │ ├── index.ts │ │ └── context.ts │ ├── rate │ │ ├── index.ts │ │ └── context.ts │ ├── tabs │ │ ├── index.ts │ │ └── context.ts │ ├── tour │ │ ├── index.ts │ │ ├── context.ts │ │ └── hooks.ts │ ├── tree │ │ ├── index.ts │ │ └── context.ts │ ├── badge │ │ ├── index.ts │ │ └── context.ts │ ├── bench │ │ ├── index.ts │ │ └── context.ts │ ├── button │ │ ├── index.ts │ │ └── context.ts │ ├── clock │ │ ├── index.ts │ │ └── context.ts │ ├── dialog │ │ ├── index.ts │ │ └── context.ts │ ├── drawer │ │ ├── index.ts │ │ ├── context.ts │ │ └── hooks.ts │ ├── empty │ │ ├── index.ts │ │ ├── context.ts │ │ └── __test__ │ │ │ └── index.test.tsx │ ├── popper │ │ ├── index.ts │ │ ├── context.tsx │ │ └── popper.tsx │ ├── portal │ │ └── index.ts │ ├── quote │ │ ├── index.ts │ │ ├── context.ts │ │ └── styles.ts │ ├── select │ │ ├── index.ts │ │ └── context.ts │ ├── space │ │ ├── index.ts │ │ └── context.ts │ ├── steps │ │ ├── index.ts │ │ └── context.ts │ ├── switch │ │ ├── index.ts │ │ └── context.ts │ ├── table │ │ ├── index.ts │ │ └── context.ts │ ├── upload │ │ ├── index.ts │ │ ├── utils.ts │ │ └── context.ts │ ├── divider │ │ ├── index.ts │ │ ├── context.ts │ │ └── hooks.ts │ ├── loading │ │ ├── index.ts │ │ └── context.ts │ ├── tooltip │ │ ├── index.ts │ │ ├── context.ts │ │ └── tooltip.tsx │ ├── cascader │ │ ├── index.ts │ │ └── context.ts │ ├── collapse │ │ ├── index.ts │ │ └── context.ts │ ├── ellipsis │ │ ├── index.ts │ │ └── context.ts │ ├── otp-input │ │ └── index.ts │ ├── progress │ │ ├── index.ts │ │ ├── context.ts │ │ └── progress.tsx │ ├── skeleton │ │ ├── index.ts │ │ └── context.ts │ ├── textarea │ │ ├── index.tsx │ │ └── context.ts │ ├── timeline │ │ ├── index.ts │ │ └── context.ts │ ├── transfer │ │ ├── index.ts │ │ └── context.ts │ ├── countdown │ │ ├── index.ts │ │ └── context.ts │ ├── highlight │ │ ├── index.ts │ │ └── context.ts │ ├── split-panel │ │ ├── index.ts │ │ └── context.ts │ ├── waterfall │ │ ├── index.ts │ │ └── context.ts │ ├── watermark │ │ └── index.ts │ ├── breadcrumb │ │ ├── index.ts │ │ └── context.ts │ ├── date-picker │ │ ├── index.ts │ │ ├── context.ts │ │ └── hooks.ts │ ├── i18n-button │ │ ├── index.ts │ │ └── context.ts │ ├── icon-button │ │ └── index.ts │ ├── input │ │ ├── index.ts │ │ └── context.ts │ ├── pagination │ │ ├── index.ts │ │ └── context.ts │ ├── popconfirm │ │ ├── index.ts │ │ └── context.ts │ ├── time-picker │ │ ├── index.ts │ │ ├── context.ts │ │ └── hooks.ts │ ├── number-input │ │ ├── index.ts │ │ ├── hooks.ts │ │ └── number-input.tsx │ ├── button-toggle │ │ ├── index.ts │ │ ├── context.ts │ │ ├── button-toggle.tsx │ │ └── types.ts │ ├── password-input │ │ ├── index.ts │ │ └── context.ts │ ├── session-storage │ │ ├── index.tsx │ │ └── session-storage.tsx │ ├── visually-hidden │ │ ├── index.ts │ │ └── context.ts │ ├── date-range-picker │ │ ├── index.ts │ │ └── context.ts │ ├── form │ │ ├── field │ │ │ ├── index.ts │ │ │ └── supporting.tsx │ │ ├── list │ │ │ ├── context.ts │ │ │ └── index.tsx │ │ ├── index.ts │ │ └── hooks │ │ │ ├── use-form.ts │ │ │ └── use-watch.ts │ ├── ripple │ │ └── index.ts │ ├── picker │ │ ├── index.ts │ │ └── context.ts │ ├── grid │ │ ├── index.ts │ │ └── context.ts │ ├── message │ │ ├── index.ts │ │ └── messager.ts │ ├── theme │ │ ├── index.ts │ │ └── theme-provider.tsx │ ├── calendar │ │ ├── index.ts │ │ └── context.ts │ ├── config │ │ ├── index.ts │ │ ├── hooks.ts │ │ ├── context.ts │ │ └── provider.tsx │ ├── markdown │ │ ├── hooks.ts │ │ └── context.ts │ ├── popover │ │ ├── index.ts │ │ ├── context.ts │ │ └── hooks.ts │ ├── radio │ │ ├── index.ts │ │ ├── context.ts │ │ └── group.tsx │ ├── checkbox │ │ ├── index.ts │ │ ├── context.ts │ │ ├── Indeterminate.tsx │ │ └── check.tsx │ ├── avatar │ │ ├── index.ts │ │ └── context.ts │ ├── image │ │ ├── index.ts │ │ ├── preview │ │ │ └── context.ts │ │ └── context.ts │ ├── notification │ │ ├── context.ts │ │ └── index.ts │ ├── rich-text-editor │ │ ├── plugins │ │ │ ├── editable │ │ │ │ └── index.tsx │ │ │ └── markdown-shortcut │ │ │ │ └── index.tsx │ │ ├── utils │ │ │ └── get-element-by-node.tsx │ │ └── context.ts │ └── layout │ │ ├── index.ts │ │ └── context.ts ├── hooks │ ├── use-resize-observer.ts │ ├── use-gutters.ts │ ├── use-class-names.ts │ └── use-container.ts ├── locale │ ├── locales │ │ └── index.ts │ ├── context.ts │ ├── index.ts │ └── use-locale.ts ├── types │ ├── slider.ts │ ├── empty.ts │ ├── password-input.ts │ ├── markdown.ts │ ├── quote.ts │ ├── highlight.ts │ ├── visually-hidden.ts │ ├── date-picker.ts │ ├── option.ts │ ├── skeleton.ts │ ├── number-input.ts │ ├── element.ts │ ├── guideline.ts │ ├── i18n-button.ts │ ├── ellipsis.ts │ ├── tooltip.ts │ ├── date-range-picker.ts │ ├── countdown.ts │ ├── kbd.ts │ ├── message.ts │ ├── otp-input.ts │ ├── space.ts │ ├── portal.ts │ ├── loading.ts │ ├── progress.ts │ ├── badge.ts │ ├── time-picker.ts │ ├── ripple.ts │ ├── waterfall.ts │ ├── divider.ts │ ├── popconfirm.ts │ ├── tag.ts │ ├── textarea.ts │ └── clock.ts ├── __test__ │ └── index.test.ts ├── env.d.ts └── utils │ ├── keyboard.ts │ ├── date.ts │ └── react.ts ├── .npmrc ├── scripts └── contributors.mjs ├── .gitignore ├── .changeset ├── config.json └── README.md ├── .storybook ├── preview.ts └── main.ts ├── jest.config.js ├── stories ├── clock.stories.tsx ├── tooltip.stories.tsx ├── select.stories.ts ├── markdown.stories.ts ├── fab.stories.tsx ├── progress.stories.tsx ├── transfer.stories.ts ├── tabs.stories.ts ├── dialog.stories.ts ├── layout.stories.tsx └── upload.stories.tsx ├── .github └── dependabot.yml └── README.md /src/components/kbd/index.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/slider/hooks.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/slider/index.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/button-group/index.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/guideline/index.tsx: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | # registry=https://registry.npmmirror.com 2 | git-checks=false 3 | -------------------------------------------------------------------------------- /src/components/fab/index.ts: -------------------------------------------------------------------------------- 1 | import Fab from "./fab"; 2 | 3 | export { Fab }; 4 | -------------------------------------------------------------------------------- /src/components/tag/index.ts: -------------------------------------------------------------------------------- 1 | import Tag from "./tag"; 2 | 3 | export { Tag }; 4 | -------------------------------------------------------------------------------- /src/components/chat/index.ts: -------------------------------------------------------------------------------- 1 | import Chat from "./chat"; 2 | 3 | export { Chat }; 4 | -------------------------------------------------------------------------------- /src/components/icon/index.ts: -------------------------------------------------------------------------------- 1 | import Icon from "./icon"; 2 | 3 | export { Icon }; 4 | -------------------------------------------------------------------------------- /src/components/menu/index.ts: -------------------------------------------------------------------------------- 1 | import Menu from "./menu"; 2 | 3 | export { Menu }; 4 | -------------------------------------------------------------------------------- /src/components/rate/index.ts: -------------------------------------------------------------------------------- 1 | import Rate from "./rate"; 2 | 3 | export { Rate }; 4 | -------------------------------------------------------------------------------- /src/components/tabs/index.ts: -------------------------------------------------------------------------------- 1 | import Tabs from "./tabs"; 2 | 3 | export { Tabs }; 4 | -------------------------------------------------------------------------------- /src/components/tour/index.ts: -------------------------------------------------------------------------------- 1 | import Tour from "./tour"; 2 | 3 | export { Tour }; 4 | -------------------------------------------------------------------------------- /src/components/tree/index.ts: -------------------------------------------------------------------------------- 1 | import Tree from "./tree"; 2 | 3 | export { Tree }; 4 | -------------------------------------------------------------------------------- /src/components/badge/index.ts: -------------------------------------------------------------------------------- 1 | import Badge from "./badge"; 2 | 3 | export { Badge }; 4 | -------------------------------------------------------------------------------- /src/components/bench/index.ts: -------------------------------------------------------------------------------- 1 | import Bench from "./bench"; 2 | 3 | export { Bench }; 4 | -------------------------------------------------------------------------------- /src/components/button/index.ts: -------------------------------------------------------------------------------- 1 | import Button from "./button"; 2 | 3 | export { Button }; 4 | -------------------------------------------------------------------------------- /src/components/clock/index.ts: -------------------------------------------------------------------------------- 1 | import Clock from "./clock"; 2 | 3 | export { Clock }; 4 | -------------------------------------------------------------------------------- /src/components/dialog/index.ts: -------------------------------------------------------------------------------- 1 | import Dialog from "./dialog"; 2 | 3 | export { Dialog }; 4 | -------------------------------------------------------------------------------- /src/components/drawer/index.ts: -------------------------------------------------------------------------------- 1 | import Drawer from "./drawer"; 2 | 3 | export { Drawer }; 4 | -------------------------------------------------------------------------------- /src/components/empty/index.ts: -------------------------------------------------------------------------------- 1 | import Empty from "./empty"; 2 | 3 | export { Empty }; 4 | -------------------------------------------------------------------------------- /src/components/popper/index.ts: -------------------------------------------------------------------------------- 1 | import Popper from "./popper"; 2 | 3 | export { Popper }; 4 | -------------------------------------------------------------------------------- /src/components/portal/index.ts: -------------------------------------------------------------------------------- 1 | import Portal from "./portal"; 2 | 3 | export { Portal }; 4 | -------------------------------------------------------------------------------- /src/components/quote/index.ts: -------------------------------------------------------------------------------- 1 | import Quote from "./quote"; 2 | 3 | export { Quote }; 4 | -------------------------------------------------------------------------------- /src/components/select/index.ts: -------------------------------------------------------------------------------- 1 | import Select from "./select"; 2 | 3 | export { Select }; 4 | -------------------------------------------------------------------------------- /src/components/slider/steps.tsx: -------------------------------------------------------------------------------- 1 | const Steps = () => {}; 2 | 3 | export default Steps; 4 | -------------------------------------------------------------------------------- /src/components/space/index.ts: -------------------------------------------------------------------------------- 1 | import Space from "./space"; 2 | 3 | export { Space }; 4 | -------------------------------------------------------------------------------- /src/components/steps/index.ts: -------------------------------------------------------------------------------- 1 | import Steps from "./steps"; 2 | 3 | export { Steps }; 4 | -------------------------------------------------------------------------------- /src/components/switch/index.ts: -------------------------------------------------------------------------------- 1 | import Switch from "./switch"; 2 | 3 | export { Switch }; 4 | -------------------------------------------------------------------------------- /src/components/table/index.ts: -------------------------------------------------------------------------------- 1 | import Table from "./table"; 2 | 3 | export { Table }; 4 | -------------------------------------------------------------------------------- /src/components/upload/index.ts: -------------------------------------------------------------------------------- 1 | import Upload from "./upload"; 2 | 3 | export { Upload }; 4 | -------------------------------------------------------------------------------- /src/components/divider/index.ts: -------------------------------------------------------------------------------- 1 | import Divider from "./divider"; 2 | 3 | export { Divider }; 4 | -------------------------------------------------------------------------------- /src/components/loading/index.ts: -------------------------------------------------------------------------------- 1 | import Loading from "./loading"; 2 | 3 | export { Loading }; 4 | -------------------------------------------------------------------------------- /src/components/tooltip/index.ts: -------------------------------------------------------------------------------- 1 | import Tooltip from "./tooltip"; 2 | 3 | export { Tooltip }; 4 | -------------------------------------------------------------------------------- /src/components/cascader/index.ts: -------------------------------------------------------------------------------- 1 | import Cascader from "./cascader"; 2 | 3 | export { Cascader }; 4 | -------------------------------------------------------------------------------- /src/components/collapse/index.ts: -------------------------------------------------------------------------------- 1 | import Collapse from "./collapse"; 2 | 3 | export { Collapse }; 4 | -------------------------------------------------------------------------------- /src/components/ellipsis/index.ts: -------------------------------------------------------------------------------- 1 | import Ellipsis from "./ellipsis"; 2 | 3 | export { Ellipsis }; 4 | -------------------------------------------------------------------------------- /src/components/otp-input/index.ts: -------------------------------------------------------------------------------- 1 | import OtpInput from "./otp-input"; 2 | 3 | export { OtpInput }; 4 | -------------------------------------------------------------------------------- /src/components/progress/index.ts: -------------------------------------------------------------------------------- 1 | import Progress from "./progress"; 2 | 3 | export { Progress }; 4 | -------------------------------------------------------------------------------- /src/components/skeleton/index.ts: -------------------------------------------------------------------------------- 1 | import Skeleton from "./skeleton"; 2 | 3 | export { Skeleton }; 4 | -------------------------------------------------------------------------------- /src/components/textarea/index.tsx: -------------------------------------------------------------------------------- 1 | import Textarea from "./textarea"; 2 | 3 | export { Textarea }; 4 | -------------------------------------------------------------------------------- /src/components/timeline/index.ts: -------------------------------------------------------------------------------- 1 | import Timeline from "./timeline"; 2 | 3 | export { Timeline }; 4 | -------------------------------------------------------------------------------- /src/components/transfer/index.ts: -------------------------------------------------------------------------------- 1 | import Transfer from "./transfer"; 2 | 3 | export { Transfer }; 4 | -------------------------------------------------------------------------------- /src/components/countdown/index.ts: -------------------------------------------------------------------------------- 1 | import Countdown from "./countdown"; 2 | 3 | export { Countdown }; 4 | -------------------------------------------------------------------------------- /src/components/highlight/index.ts: -------------------------------------------------------------------------------- 1 | import Highlight from "./highlight"; 2 | 3 | export { Highlight }; 4 | -------------------------------------------------------------------------------- /src/components/icon/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiszlab/musae/HEAD/src/components/icon/.DS_Store -------------------------------------------------------------------------------- /src/components/split-panel/index.ts: -------------------------------------------------------------------------------- 1 | import SplitPanel from './split-panel' 2 | 3 | export { SplitPanel } -------------------------------------------------------------------------------- /src/components/waterfall/index.ts: -------------------------------------------------------------------------------- 1 | import Waterfall from "./waterfall"; 2 | 3 | export { Waterfall }; 4 | -------------------------------------------------------------------------------- /src/components/watermark/index.ts: -------------------------------------------------------------------------------- 1 | import Watermark from "./watermark"; 2 | 3 | export { Watermark }; 4 | -------------------------------------------------------------------------------- /scripts/contributors.mjs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zx 2 | 3 | import { $ } from "zx"; 4 | 5 | await $`git log`.text(); 6 | -------------------------------------------------------------------------------- /src/components/breadcrumb/index.ts: -------------------------------------------------------------------------------- 1 | import Breadcrumb from "./breadcrumb"; 2 | 3 | export { Breadcrumb }; 4 | -------------------------------------------------------------------------------- /src/components/date-picker/index.ts: -------------------------------------------------------------------------------- 1 | import DatePicker from "./date-picker"; 2 | 3 | export { DatePicker }; 4 | -------------------------------------------------------------------------------- /src/components/i18n-button/index.ts: -------------------------------------------------------------------------------- 1 | import I18nButton from "./i18n-button"; 2 | 3 | export { I18nButton }; 4 | -------------------------------------------------------------------------------- /src/components/icon-button/index.ts: -------------------------------------------------------------------------------- 1 | import IconButton from "./icon-button"; 2 | 3 | export { IconButton }; 4 | -------------------------------------------------------------------------------- /src/components/input/index.ts: -------------------------------------------------------------------------------- 1 | import Input, { styles } from "./input"; 2 | 3 | export { Input, styles }; 4 | -------------------------------------------------------------------------------- /src/components/pagination/index.ts: -------------------------------------------------------------------------------- 1 | import Pagination from "./pagination"; 2 | 3 | export { Pagination }; 4 | -------------------------------------------------------------------------------- /src/components/popconfirm/index.ts: -------------------------------------------------------------------------------- 1 | import Popconfirm from "./popconfirm"; 2 | 3 | export { Popconfirm }; 4 | -------------------------------------------------------------------------------- /src/components/time-picker/index.ts: -------------------------------------------------------------------------------- 1 | import TimePicker from "./time-picker"; 2 | 3 | export { TimePicker }; 4 | -------------------------------------------------------------------------------- /src/components/button-group/button-group.tsx: -------------------------------------------------------------------------------- 1 | const ButtonGroup = () => {}; 2 | 3 | export default ButtonGroup; 4 | -------------------------------------------------------------------------------- /src/components/icon/icons/file/index.tsx: -------------------------------------------------------------------------------- 1 | import FileUpload from "./file-upload"; 2 | 3 | export { FileUpload }; 4 | -------------------------------------------------------------------------------- /src/components/number-input/index.ts: -------------------------------------------------------------------------------- 1 | import NumberInput from "./number-input"; 2 | 3 | export { NumberInput }; 4 | -------------------------------------------------------------------------------- /src/hooks/use-resize-observer.ts: -------------------------------------------------------------------------------- 1 | const useResizeObserver = () => { 2 | 3 | } 4 | 5 | export { useResizeObserver } -------------------------------------------------------------------------------- /src/components/button-toggle/index.ts: -------------------------------------------------------------------------------- 1 | import ButtonToggle from "./button-toggle"; 2 | 3 | export { ButtonToggle }; 4 | -------------------------------------------------------------------------------- /src/components/password-input/index.ts: -------------------------------------------------------------------------------- 1 | import PasswordInput from "./password-input"; 2 | 3 | export { PasswordInput }; 4 | -------------------------------------------------------------------------------- /src/components/session-storage/index.tsx: -------------------------------------------------------------------------------- 1 | import SessionStorage from "./session-storage"; 2 | 3 | export { SessionStorage }; 4 | -------------------------------------------------------------------------------- /src/components/visually-hidden/index.ts: -------------------------------------------------------------------------------- 1 | import VisuallyHidden from "./visually-hidden"; 2 | 3 | export { VisuallyHidden }; 4 | -------------------------------------------------------------------------------- /src/locale/locales/index.ts: -------------------------------------------------------------------------------- 1 | import en_US from "./en_US"; 2 | import zh_CN from "./zh_CN"; 3 | 4 | export { en_US, zh_CN }; 5 | -------------------------------------------------------------------------------- /src/components/button-toggle/context.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from "react"; 2 | 3 | export const Context = createContext({}); 4 | -------------------------------------------------------------------------------- /src/components/date-range-picker/index.ts: -------------------------------------------------------------------------------- 1 | import DateRangePicker from "./date-range-picker"; 2 | 3 | export { DateRangePicker }; 4 | -------------------------------------------------------------------------------- /src/components/form/field/index.ts: -------------------------------------------------------------------------------- 1 | import Field from "./field"; 2 | import Layout from "./layout"; 3 | 4 | export { Field, Layout }; 5 | -------------------------------------------------------------------------------- /src/components/ripple/index.ts: -------------------------------------------------------------------------------- 1 | import Ripple from "./ripple"; 2 | 3 | export { Ripple }; 4 | export { useRipple } from "./hooks"; 5 | -------------------------------------------------------------------------------- /src/components/fab/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | export const CLASS_NAMES = { 6 | fab: "fab", 7 | }; 8 | -------------------------------------------------------------------------------- /src/components/picker/index.ts: -------------------------------------------------------------------------------- 1 | import Picker from "./picker"; 2 | import { Context } from "./context"; 3 | 4 | export { Picker, Context }; 5 | -------------------------------------------------------------------------------- /src/components/tag/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | export const CLASS_NAMES = { 6 | tag: "tag", 7 | }; 8 | -------------------------------------------------------------------------------- /src/components/grid/index.ts: -------------------------------------------------------------------------------- 1 | import Row from "./row"; 2 | import Col from "./col"; 3 | 4 | export const Grid = { 5 | Row, 6 | Col, 7 | }; 8 | -------------------------------------------------------------------------------- /src/components/icon/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | export const CLASS_NAMES = { 6 | icon: "icon", 7 | }; 8 | -------------------------------------------------------------------------------- /src/components/icon/icons/mock/index.ts: -------------------------------------------------------------------------------- 1 | import Github from "./github"; 2 | import Loading from "./loading"; 3 | 4 | export { Github, Loading }; 5 | -------------------------------------------------------------------------------- /src/components/ellipsis/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description class names 3 | */ 4 | export const CLASS_NAMES = { 5 | ellipsis: "ellipsis", 6 | }; 7 | -------------------------------------------------------------------------------- /src/components/message/index.ts: -------------------------------------------------------------------------------- 1 | import { useMessage } from "./hooks"; 2 | import Message from "./messager"; 3 | 4 | export { useMessage, Message }; 5 | -------------------------------------------------------------------------------- /src/components/select/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | export const CLASS_NAMES = { 6 | select: "select", 7 | }; 8 | -------------------------------------------------------------------------------- /src/components/skeleton/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | export const CLASS_NAMES = { 6 | skeleton: "skeleton", 7 | }; 8 | -------------------------------------------------------------------------------- /src/components/countdown/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | export const CLASS_NAMES = { 6 | countdown: "countdown", 7 | }; 8 | -------------------------------------------------------------------------------- /src/components/icon/icons/home/index.tsx: -------------------------------------------------------------------------------- 1 | import WindPower from "./wind-power"; 2 | import SmartToy from "./smart-toy"; 3 | 4 | export { WindPower, SmartToy }; 5 | -------------------------------------------------------------------------------- /src/components/i18n-button/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | export const CLASS_NAMES = { 6 | i18nButton: "i18n-button", 7 | }; 8 | -------------------------------------------------------------------------------- /src/components/icon/icons/device/index.ts: -------------------------------------------------------------------------------- 1 | import DarkMode from "./dark-mode"; 2 | import LightMode from "./light-mode"; 3 | 4 | export { DarkMode, LightMode }; 5 | -------------------------------------------------------------------------------- /src/components/theme/index.ts: -------------------------------------------------------------------------------- 1 | import ThemeProvider from "./theme-provider"; 2 | import { useTheme } from "./hooks"; 3 | 4 | export { ThemeProvider, useTheme }; 5 | -------------------------------------------------------------------------------- /src/components/badge/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | export const CLASS_NAMES = { 6 | badge: "badge", 7 | tail: "badge__tail", 8 | }; 9 | -------------------------------------------------------------------------------- /src/components/calendar/index.ts: -------------------------------------------------------------------------------- 1 | import Calendar from "./calendar"; 2 | import ContributionCalendar from "./contribution"; 3 | 4 | export { Calendar, ContributionCalendar }; 5 | -------------------------------------------------------------------------------- /src/components/config/index.ts: -------------------------------------------------------------------------------- 1 | import ConfigProvider from "./provider"; 2 | import { useConfiguration } from "./hooks"; 3 | 4 | export { ConfigProvider, useConfiguration }; 5 | -------------------------------------------------------------------------------- /src/components/markdown/hooks.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description in client side 3 | * use @lexical packages to convert md into html 4 | */ 5 | export const useMarkdown = () => {}; 6 | -------------------------------------------------------------------------------- /src/types/slider.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 滑块轨道`Props` 3 | */ 4 | export interface TrackProps { 5 | /** 6 | * @description 大小 7 | */ 8 | size?: number; 9 | } 10 | -------------------------------------------------------------------------------- /src/components/button-toggle/button-toggle.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | const ButtonToggle = () => { 4 | return
; 5 | }; 6 | 7 | export default ButtonToggle; 8 | -------------------------------------------------------------------------------- /src/components/quote/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | const CLASS_NAMES = { 6 | quote: "quote", 7 | }; 8 | 9 | export { CLASS_NAMES }; 10 | -------------------------------------------------------------------------------- /src/components/space/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | const CLASS_NAMES = { 6 | space: "space", 7 | }; 8 | 9 | export { CLASS_NAMES }; 10 | -------------------------------------------------------------------------------- /src/types/empty.ts: -------------------------------------------------------------------------------- 1 | import { ComponentProps } from "./element"; 2 | 3 | /** 4 | * @description 5 | * empty props 6 | */ 7 | export interface EmptyProps extends ComponentProps {} 8 | -------------------------------------------------------------------------------- /src/components/textarea/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | export const CLASS_NAMES = { 6 | textarea: "textarea", 7 | input: "textarea__input", 8 | }; 9 | -------------------------------------------------------------------------------- /src/components/tooltip/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | const CLASS_NAMES = { 6 | tooltip: "tooltip", 7 | }; 8 | 9 | export { CLASS_NAMES }; 10 | -------------------------------------------------------------------------------- /src/__test__/index.test.ts: -------------------------------------------------------------------------------- 1 | import * as Musae from "../index"; 2 | 3 | describe("`Musae` Entry", () => { 4 | test("without src", () => { 5 | expect(Musae).not.toBeNull(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/components/date-picker/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | export const CLASS_NAMES = { 6 | picker: "date-picker", 7 | input: "date-picker__input", 8 | }; 9 | -------------------------------------------------------------------------------- /src/components/divider/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | export const CLASS_NAMES = { 6 | divider: "divider", 7 | label: "divider__label", 8 | } as const; 9 | -------------------------------------------------------------------------------- /src/components/empty/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class name 4 | */ 5 | export const CLASS_NAMES = { 6 | empty: "empty", 7 | description: "empty__description", 8 | } as const; 9 | -------------------------------------------------------------------------------- /src/env.d.ts: -------------------------------------------------------------------------------- 1 | declare module "react" { 2 | interface CSSProperties { 3 | // 允许`CSS`自定义变量 4 | [$$Key$$: `--${string}`]: string | number | undefined; 5 | } 6 | } 7 | 8 | export {}; 9 | -------------------------------------------------------------------------------- /src/components/cascader/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | export const CLASS_NAMES = { 6 | cascader: "cascader", 7 | options: "cascader__options", 8 | } as const; 9 | -------------------------------------------------------------------------------- /src/components/waterfall/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | export const CLASS_NAMES = { 6 | waterfall: "waterfall", 7 | sequential: "waterfall--sequential", 8 | }; 9 | -------------------------------------------------------------------------------- /src/components/icon/icons/toggle/index.ts: -------------------------------------------------------------------------------- 1 | import Star from "./star"; 2 | import StarHalf from "./star-half"; 3 | import StarOutline from "./star-outline"; 4 | 5 | export { Star, StarHalf, StarOutline }; 6 | -------------------------------------------------------------------------------- /src/components/password-input/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | const CLASS_NAMES = { 6 | passwordInput: "password-input", 7 | }; 8 | 9 | export { CLASS_NAMES }; 10 | -------------------------------------------------------------------------------- /src/components/popper/context.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | export const CLASS_NAMES = { 6 | popper: "popper", 7 | dropdown: "dropdown", 8 | arrow: "arrow", 9 | }; 10 | -------------------------------------------------------------------------------- /src/components/visually-hidden/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | const CLASS_NAMES = { 6 | visuallyHidden: "visually-hidden", 7 | }; 8 | 9 | export { CLASS_NAMES }; 10 | -------------------------------------------------------------------------------- /src/components/popover/index.ts: -------------------------------------------------------------------------------- 1 | import Popover from "./popover"; 2 | import type { PopoverProps, PopoverRef } from "../../types/popover"; 3 | 4 | export { Popover }; 5 | export type { PopoverProps, PopoverRef }; 6 | -------------------------------------------------------------------------------- /src/types/password-input.ts: -------------------------------------------------------------------------------- 1 | import { InputProps } from "./input"; 2 | 3 | /** 4 | * @description 5 | * password input props 6 | */ 7 | export type PasswordInputProps = Omit; 8 | -------------------------------------------------------------------------------- /src/components/button/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | const CLASS_NAMES = { 6 | button: "button", 7 | leading: "button__leading", 8 | }; 9 | 10 | export { CLASS_NAMES }; 11 | -------------------------------------------------------------------------------- /src/locale/context.ts: -------------------------------------------------------------------------------- 1 | import { type Locale } from "../types/locale"; 2 | import { createContext } from "react"; 3 | import locale from "./locales/en_US"; 4 | 5 | export const LocaleContext = createContext(locale); 6 | -------------------------------------------------------------------------------- /src/locale/index.ts: -------------------------------------------------------------------------------- 1 | import { LocaleContext } from "./context"; 2 | import { useLocale } from "./use-locale"; 3 | import DEFAULT_LOCALE from "./locales/zh_CN"; 4 | 5 | export { LocaleContext, useLocale, DEFAULT_LOCALE }; 6 | -------------------------------------------------------------------------------- /src/components/popover/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | export const CLASS_NAMES = { 6 | popover: "popover", 7 | title: "popover__title", 8 | content: "popover__content", 9 | }; 10 | -------------------------------------------------------------------------------- /src/components/highlight/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | const CLASS_NAMES = { 6 | highlight: "highlight", 7 | capture: "highlight__capture", 8 | }; 9 | 10 | export { CLASS_NAMES }; 11 | -------------------------------------------------------------------------------- /src/components/radio/index.ts: -------------------------------------------------------------------------------- 1 | import _Radio from "./radio"; 2 | import Group from "./group"; 3 | import type { TypedRadio } from "../../types/radio"; 4 | 5 | export const Radio: TypedRadio = Object.assign(_Radio, { 6 | Group, 7 | }); 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # build output 2 | dist 3 | 4 | # package manager 5 | node_modules 6 | node-compile-cache 7 | 8 | # editor 9 | .idea 10 | .vscode 11 | 12 | # unit test 13 | coverage 14 | 15 | *storybook.log 16 | 17 | storybook-static 18 | -------------------------------------------------------------------------------- /src/components/pagination/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | const CLASS_NAMES = { 6 | pagination: "pagination", 7 | sizeSelector: "pagination__size-selector", 8 | }; 9 | 10 | export { CLASS_NAMES }; 11 | -------------------------------------------------------------------------------- /src/components/checkbox/index.ts: -------------------------------------------------------------------------------- 1 | import _Checkbox from "./checkbox"; 2 | import Group from "./group"; 3 | import styles from "./styles"; 4 | 5 | export const Checkbox = Object.assign(_Checkbox, { 6 | Group, 7 | }); 8 | 9 | export { styles }; 10 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/keyboard_backspace.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/components/config/hooks.ts: -------------------------------------------------------------------------------- 1 | import { useContext } from "react"; 2 | import Context from "./context"; 3 | 4 | /** 5 | * @description 6 | * configuration 7 | */ 8 | export const useConfiguration = () => { 9 | return useContext(Context); 10 | }; 11 | -------------------------------------------------------------------------------- /src/components/loading/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | export const CLASS_NAMES = { 6 | loading: "loading", 7 | spin: "loading__spin", 8 | spinning: "loading__spin-spinning", 9 | content: "loading__content", 10 | }; 11 | -------------------------------------------------------------------------------- /src/components/input/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | export const CLASS_NAMES = { 6 | inputor: "input__inputor", 7 | input: "input", 8 | focused: "input__inputor--focused", 9 | invalid: "input__inputor--invalid", 10 | }; 11 | -------------------------------------------------------------------------------- /src/components/avatar/index.ts: -------------------------------------------------------------------------------- 1 | import _Avatar from "./avatar"; 2 | import Group from "./group"; 3 | import type { TypedAvatar } from "../../types/avatar"; 4 | 5 | const Avatar: TypedAvatar = Object.assign(_Avatar, { 6 | Group, 7 | }); 8 | 9 | export { Avatar }; 10 | -------------------------------------------------------------------------------- /src/components/button-toggle/types.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * button toggle props 4 | */ 5 | export type ButtonToggleProps = {}; 6 | 7 | /** 8 | * @description 9 | * context value 10 | */ 11 | export type ContextValue = { 12 | selected: unknown; 13 | }; 14 | -------------------------------------------------------------------------------- /src/components/date-range-picker/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | export const CLASS_NAMES = { 6 | picker: "date-range-picker", 7 | input: "date-range-picker__input", 8 | separator: "date-range-picker__separator", 9 | } as const; 10 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/start.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /src/types/markdown.ts: -------------------------------------------------------------------------------- 1 | import { ComponentProps } from "./element"; 2 | 3 | /** 4 | * @description 5 | * markdown props 6 | */ 7 | export type MarkdownProps = ComponentProps & { 8 | /** 9 | * @description 10 | * value 11 | */ 12 | value: string; 13 | }; 14 | -------------------------------------------------------------------------------- /src/components/config/context.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from "react"; 2 | import type { ContextValue } from "../../types/config"; 3 | 4 | const Context = createContext({ 5 | notifier: null, 6 | prefix: "musae", 7 | }); 8 | 9 | export default Context; 10 | -------------------------------------------------------------------------------- /src/components/guideline/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | export const CLASS_NAMES = { 6 | guideline: "guideline", 7 | figure: "guideline__figure", 8 | label: "guideline__caption-label", 9 | caption: "guideline__caption", 10 | }; 11 | -------------------------------------------------------------------------------- /src/components/icon/icons/content/index.ts: -------------------------------------------------------------------------------- 1 | import Clear from "./clear"; 2 | import Redo from "./redo"; 3 | import Undo from "./undo"; 4 | import LinkOff from "./link-off"; 5 | import FontDownload from "./font-download"; 6 | 7 | export { Clear, Redo, Undo, LinkOff, FontDownload }; 8 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/keyboard_return.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /src/components/image/index.ts: -------------------------------------------------------------------------------- 1 | import _Image from "./image"; 2 | import type { TypedImage } from "../../types/image"; 3 | import Group from "./preview/group"; 4 | 5 | const Image = Object.assign(_Image, { 6 | Group, 7 | }) satisfies TypedImage; 8 | 9 | export { Image }; 10 | -------------------------------------------------------------------------------- /src/types/quote.ts: -------------------------------------------------------------------------------- 1 | import type { ComponentProps } from "./element"; 2 | 3 | /** 4 | * @description 5 | * quote props 6 | */ 7 | export type QuoteProps = ComponentProps & { 8 | /** 9 | * @description 10 | * children 11 | */ 12 | children?: string; 13 | }; 14 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/keyboard_control_key.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/keyboard_option_key.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/components/image/preview/context.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from "react"; 2 | import type { PreviewGroupContextValue } from "../../../types/image"; 3 | 4 | const PreviewGroupContext = createContext(null); 5 | 6 | export default PreviewGroupContext; 7 | -------------------------------------------------------------------------------- /src/components/drawer/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | export const CLASS_NAMES = { 6 | drawer: "drawer", 7 | overlay: "drawer__overlay", 8 | panel: "drawer__panel", 9 | header: "drawer__header", 10 | body: "drawer__body", 11 | } as const; 12 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/laptop_chromebook.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /src/components/notification/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | export const CLASS_NAMES = { 6 | notification: "notification", 7 | title: "notification__title", 8 | description: "notification__description", 9 | closer: "notification__closer", 10 | }; 11 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/power_input.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/utils/keyboard.ts: -------------------------------------------------------------------------------- 1 | export enum Keyboard { 2 | Escape = "Escape", 3 | Backspace = "Backspace", 4 | Delete = "Delete", 5 | Space = " ", 6 | ArrowLeft = "ArrowLeft", 7 | ArrowRight = "ArrowRight", 8 | ArrowUp = "ArrowUp", 9 | ArrowDown = "ArrowDown", 10 | Enter= 'Enter' 11 | } 12 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/keyboard_tab.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/types/highlight.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * highlight props 4 | */ 5 | export type HighlightProps = { 6 | /** 7 | * @description 8 | * children 9 | */ 10 | children: string; 11 | 12 | /** 13 | * @description 14 | * capture 15 | */ 16 | capture?: string | RegExp; 17 | }; 18 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/tablet.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/clock/context.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from "react"; 2 | 3 | /** 4 | * @description 5 | * class names 6 | */ 7 | export const CLASS_NAMES = { 8 | clock: "clock", 9 | column: "clock__column", 10 | }; 11 | 12 | export const Context = createContext({ 13 | classNames: CLASS_NAMES, 14 | }); 15 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/laptop.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/keyboard_capslock.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/smartphone.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/tv.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/types/visually-hidden.ts: -------------------------------------------------------------------------------- 1 | import type { DOMAttributes, ReactNode } from "react"; 2 | 3 | /** 4 | * @description 5 | * visually hidden props 6 | */ 7 | export type VisuallyHiddenProps = DOMAttributes & { 8 | /** 9 | * @description 10 | * children 11 | */ 12 | children?: ReactNode; 13 | }; 14 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/computer.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/monitor.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/radio/context.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from "react"; 2 | import type { ContextValue } from "../../types/radio"; 3 | 4 | /** 5 | * @description 6 | * class name 7 | */ 8 | export const CLASS_NAMES = { 9 | radio: "radio", 10 | }; 11 | 12 | export const Context = createContext(null); 13 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/desktop_mac.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/dock.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@3.0.1/schema.json", 3 | "changelog": "@changesets/cli/changelog", 4 | "commit": false, 5 | "fixed": [], 6 | "linked": [], 7 | "access": "restricted", 8 | "baseBranch": "main", 9 | "updateInternalDependencies": "patch", 10 | "ignore": [] 11 | } 12 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/desktop_windows.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/keyboard_double_arrow_down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/keyboard_double_arrow_up.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/phone_android.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/security.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/rich-text-editor/plugins/editable/index.tsx: -------------------------------------------------------------------------------- 1 | interface Props { 2 | isEditable: boolean; 3 | } 4 | 5 | /** 6 | * @description 7 | * editable plugin 8 | */ 9 | const EditablePlugin = ({ isEditable }: Props) => { 10 | if (isEditable) return null; 11 | return null; 12 | }; 13 | 14 | export default EditablePlugin; 15 | -------------------------------------------------------------------------------- /src/components/popconfirm/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | const CLASS_NAMES = { 6 | popconfirm: "popconfirm", 7 | leading: "popconfirm__leading", 8 | title: "popconfirm__title", 9 | description: "popconfirm__description", 10 | footer: "popconfirm__footer", 11 | }; 12 | 13 | export { CLASS_NAMES }; 14 | -------------------------------------------------------------------------------- /src/components/switch/context.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * class names 4 | */ 5 | const CLASS_NAMES = { 6 | switch: "switch", 7 | slider: "switch__slider", 8 | supporting: "switch__supporting", 9 | leading: "switch__supporting-leading", 10 | trailing: "switch__supporting-trailing", 11 | }; 12 | 13 | export { CLASS_NAMES }; 14 | -------------------------------------------------------------------------------- /src/components/upload/utils.ts: -------------------------------------------------------------------------------- 1 | import type { FileItem, RemoteFileItem, UploadedItem } from "../../types/upload"; 2 | 3 | /** 4 | * @description 5 | * check current value is provided by user 6 | */ 7 | export const isRemoteFile = (file: FileItem): file is RemoteFileItem => { 8 | return !file.key || !(file as UploadedItem).file; 9 | }; 10 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/tablet_android.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/device_hub.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /.storybook/preview.ts: -------------------------------------------------------------------------------- 1 | import type { Preview } from "@storybook/react-vite"; 2 | import "../dist/styles.css"; 3 | 4 | const preview: Preview = { 5 | parameters: { 6 | controls: { 7 | matchers: { 8 | color: /(background|color)$/i, 9 | date: /Date$/i, 10 | }, 11 | }, 12 | }, 13 | }; 14 | 15 | export default preview; 16 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @returns {Promise} 3 | */ 4 | const config = async () => { 5 | return { 6 | testEnvironment: "jsdom", 7 | transformIgnorePatterns: ["node_modules/(?!(.pnpm|@aiszlab/relax)/)"], 8 | transform: { 9 | "\\.[jt]sx?$": "babel-jest", 10 | }, 11 | }; 12 | }; 13 | 14 | export default config; 15 | -------------------------------------------------------------------------------- /src/utils/date.ts: -------------------------------------------------------------------------------- 1 | import type { Dayjs } from "dayjs"; 2 | 3 | /** 4 | * @description 5 | * get first sunday of the month 6 | */ 7 | export const firstSundayInMonth = (date: Dayjs) => { 8 | const _from = date.startOf("month"); 9 | 10 | if (_from.day() === 0) { 11 | return _from; 12 | } 13 | 14 | return _from.startOf("week").add(1, "week"); 15 | }; 16 | -------------------------------------------------------------------------------- /src/components/breadcrumb/context.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from "react"; 2 | 3 | /** 4 | * @description 5 | * class names 6 | */ 7 | export const CLASS_NAMES = { 8 | breadcrumb: "breadcrumb", 9 | item: "breadcrumb__item", 10 | separator: "breadcrumb__separator", 11 | }; 12 | 13 | export const Context = createContext({ 14 | classNames: CLASS_NAMES, 15 | }); 16 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/laptop_windows.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/phonelink.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/notification/index.ts: -------------------------------------------------------------------------------- 1 | import type { HolderRef, Notifier, Type, NotificationConfig } from "../../types/notification"; 2 | import Holder from "./holder"; 3 | import { useNotification } from "./hooks"; 4 | import Notification from "./notifier"; 5 | 6 | export type { HolderRef, Notifier, Type, NotificationConfig }; 7 | export { Holder, useNotification, Notification }; 8 | -------------------------------------------------------------------------------- /src/components/progress/context.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from "react"; 2 | 3 | /** 4 | * @description 5 | * class names 6 | */ 7 | const CLASS_NAMES = { 8 | progress: "progress", 9 | segment: "progress__segment", 10 | }; 11 | 12 | const Context = createContext({ 13 | classNames: CLASS_NAMES, 14 | }); 15 | 16 | export default Context; 17 | export { CLASS_NAMES }; 18 | -------------------------------------------------------------------------------- /src/components/rich-text-editor/utils/get-element-by-node.tsx: -------------------------------------------------------------------------------- 1 | import { type LexicalNode, type LexicalEditor } from "lexical"; 2 | 3 | export function getElementByNode( 4 | editor: LexicalEditor, 5 | node?: LexicalNode | null, 6 | ): HTMLElement | null { 7 | if (!node) return null; 8 | const key = node.getKey(); 9 | return editor._keyToDOMMap.get(key) ?? null; 10 | } 11 | -------------------------------------------------------------------------------- /src/components/drawer/hooks.ts: -------------------------------------------------------------------------------- 1 | import type { Placement } from "../../types/drawer"; 2 | 3 | export const PLACEMENTS: Record = { 4 | right: ["translateX(100%)", "translateX(0)"], 5 | left: ["translateX(-100%)", "translateX(0)"], 6 | bottom: ["translateY(100%)", "translateY(0)"], 7 | top: ["translateY(-100%)", "translateY(0)"], 8 | }; 9 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/browser_updated.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/icon/icons/navigation/index.ts: -------------------------------------------------------------------------------- 1 | import Cancel from "./cancel"; 2 | import MoreHoriz from "./more-horiz"; 3 | import Close from "./close"; 4 | import Check from "./check"; 5 | import UnfoldMore from "./unfold-more"; 6 | import MenuOpen from "./menu-open"; 7 | import Menu from "./menu"; 8 | 9 | export { Cancel, Close, MoreHoriz, Check, UnfoldMore, MenuOpen, Menu }; 10 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/smart_display.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/headphones.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/icon/icons/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./action"; 2 | export * from "./alert"; 3 | export * from "./content"; 4 | export * from "./hardware"; 5 | export * from "./navigation"; 6 | export * from "./image"; 7 | export * from "./toggle"; 8 | export * from "./editor"; 9 | export * from "./mock"; 10 | export * from "./home"; 11 | export * from "./device"; 12 | export * from "./file"; 13 | -------------------------------------------------------------------------------- /src/components/grid/context.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from "react"; 2 | 3 | /** 4 | * @description 5 | * class names 6 | */ 7 | export const CLASS_NAMES = { 8 | row: "grid__row", 9 | col: "grid__col", 10 | }; 11 | 12 | /** 13 | * Grid Span 14 | */ 15 | export const SPANS = 24; 16 | 17 | export const Context = createContext({ 18 | classNames: CLASS_NAMES, 19 | }); 20 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/home_max.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /.storybook/main.ts: -------------------------------------------------------------------------------- 1 | import type { StorybookConfig } from "@storybook/react-vite"; 2 | 3 | const config: StorybookConfig = { 4 | stories: ["../stories/**/*.mdx", "../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)"], 5 | addons: ["@storybook/addon-docs", "@storybook/addon-onboarding"], 6 | framework: { 7 | name: "@storybook/react-vite", 8 | options: {}, 9 | }, 10 | }; 11 | export default config; 12 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/sim_card.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/developer_board.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/scanner.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/image/context.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from "react"; 2 | 3 | /** 4 | * class name 5 | */ 6 | export const CLASS_NAMES = { 7 | image: "image", 8 | img: "img", 9 | overlay: "overlay", 10 | }; 11 | 12 | /** 13 | * image context 14 | * @description 图片上下文,提供图片额外定制的能力 15 | */ 16 | export default createContext<{ 17 | /** 18 | * 移除图片 19 | */ 20 | onRemove?: () => void; 21 | }>({}); 22 | -------------------------------------------------------------------------------- /src/components/markdown/context.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from "react"; 2 | 3 | /** 4 | * @description class names 5 | */ 6 | const CLASS_NAMES = { 7 | markdown: "markdown", 8 | loading: "markdown__loading", 9 | } as const; 10 | 11 | const Context = createContext<{ classNames: typeof CLASS_NAMES }>({ 12 | classNames: CLASS_NAMES, 13 | }); 14 | 15 | export default Context; 16 | export { CLASS_NAMES }; 17 | -------------------------------------------------------------------------------- /src/components/time-picker/context.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from "react"; 2 | 3 | /** 4 | * @description 5 | * class names 6 | */ 7 | export const CLASS_NAMES = { 8 | picker: "time-picker", 9 | input: "time-picker__input", 10 | panel: "time-picker__panel", 11 | panelFooter: "time-picker__panel-footer", 12 | }; 13 | 14 | export const Context = createContext({ 15 | classNames: CLASS_NAMES, 16 | }); 17 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/cast.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/home_mini.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/types/date-picker.ts: -------------------------------------------------------------------------------- 1 | import type { Dayjs } from "dayjs"; 2 | 3 | /** 4 | * @description 5 | * date picker props 6 | */ 7 | export interface DatePickerProps { 8 | /** 9 | * @description 10 | * value 11 | * @default void 0 12 | */ 13 | value?: Dayjs; 14 | 15 | /** 16 | * @description 17 | * change handler 18 | * @default void 0 19 | */ 20 | onChange?: (value: Dayjs) => void; 21 | } 22 | -------------------------------------------------------------------------------- /stories/clock.stories.tsx: -------------------------------------------------------------------------------- 1 | import type { Meta, StoryObj } from "@storybook/react-vite"; 2 | import { Clock } from "../dist"; 3 | 4 | const meta: Meta = { 5 | title: "clock", 6 | component: Clock, 7 | parameters: {}, 8 | tags: ["autodocs"], 9 | argTypes: {}, 10 | }; 11 | 12 | export default meta; 13 | type Story = StoryObj; 14 | 15 | export const Normal: Story = {}; 16 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/headset_mic.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/memory.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/icon/hoc.ts: -------------------------------------------------------------------------------- 1 | import { type FC, createElement } from "react"; 2 | import type { AsProps, IconProps } from "../../types/icon"; 3 | import Icon from "./icon"; 4 | 5 | /** 6 | * @description 7 | * with icon 8 | */ 9 | export const withIcon = (as: FC) => { 10 | return (props: Omit) => { 11 | return createElement(Icon, { 12 | ...props, 13 | as, 14 | }); 15 | }; 16 | }; 17 | -------------------------------------------------------------------------------- /src/types/option.ts: -------------------------------------------------------------------------------- 1 | import type { Key, ReactNode } from "react"; 2 | 3 | export interface Option { 4 | /** 5 | * @description 6 | * value 7 | * @requires 8 | */ 9 | value: Key; 10 | 11 | /** 12 | * @description 13 | * label 14 | * @default void 0 15 | */ 16 | label?: ReactNode; 17 | 18 | /** 19 | * @description 20 | * children 21 | * @default void 0 22 | */ 23 | children?: Option[]; 24 | } 25 | -------------------------------------------------------------------------------- /src/components/layout/index.ts: -------------------------------------------------------------------------------- 1 | import _Layout from "./layout"; 2 | import type { TypedLayout } from "../../types/layout"; 3 | import Header from "./header"; 4 | import Sidebar from "./sidebar"; 5 | import Main from "./main"; 6 | import Footer from "./footer"; 7 | import Heading from "./heading"; 8 | 9 | export const Layout: TypedLayout = Object.assign(_Layout, { 10 | Header, 11 | Sidebar, 12 | Main, 13 | Footer, 14 | Heading, 15 | }); 16 | -------------------------------------------------------------------------------- /src/components/picker/context.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from "react"; 2 | import type { ContextValue } from "../../types/picker"; 3 | 4 | export const CLASS_NAMES = { 5 | picker: "picker", 6 | focused: "picker--focused", 7 | invalid: "picker--invalid", 8 | dropdown: "picker__dropdown", 9 | } as const; 10 | 11 | export const Context = createContext({ 12 | open: null, 13 | isFocused: false, 14 | isOpen: false, 15 | }); 16 | -------------------------------------------------------------------------------- /src/types/skeleton.ts: -------------------------------------------------------------------------------- 1 | import type { ComponentProps } from "./element"; 2 | import type { ReactNode } from "react"; 3 | 4 | /** 5 | * @description 6 | * skeleton props 7 | */ 8 | export type SkeletonProps = ComponentProps & { 9 | /** 10 | * @description 11 | * animation 12 | * @default true 13 | */ 14 | animation?: boolean; 15 | 16 | /** 17 | * @description 18 | * children 19 | */ 20 | children?: ReactNode; 21 | }; 22 | -------------------------------------------------------------------------------- /src/components/rate/context.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from "react"; 2 | 3 | /** 4 | * @description 5 | * class names 6 | */ 7 | const CLASS_NAMES = { 8 | rate: "rate", 9 | star: "rate__star", 10 | half: "rate__star-half", 11 | full: "rate__star-full", 12 | }; 13 | 14 | const Context = createContext<{ classNames: typeof CLASS_NAMES }>({ 15 | classNames: CLASS_NAMES, 16 | }); 17 | 18 | export default Context; 19 | export { CLASS_NAMES }; 20 | -------------------------------------------------------------------------------- /src/types/number-input.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description 3 | * number input props 4 | */ 5 | export type NumberInputProps = { 6 | /** 7 | * @description 8 | * value 9 | */ 10 | value?: number; 11 | 12 | /** 13 | * @description 14 | * number input change handler 15 | */ 16 | onChange?: (value: number) => void; 17 | 18 | /** 19 | * @description 20 | * formatter 21 | */ 22 | formatter?: (value?: string) => string; 23 | }; 24 | -------------------------------------------------------------------------------- /src/components/icon/icons/alert/index.ts: -------------------------------------------------------------------------------- 1 | import ErrorOutline from "./error-outline"; 2 | import AddAlert from "./add-alert"; 3 | import AutoDelete from "./auto-delete"; 4 | import Error from "./error"; 5 | import NotificationImportant from "./notification-important"; 6 | import Warning from "./warning"; 7 | import WarningAmber from "./warning-amber"; 8 | 9 | export { ErrorOutline, AddAlert, AutoDelete, Error, NotificationImportant, Warning, WarningAmber }; 10 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/cast_connected.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/phone_iphone.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/icon/icons/hardware/tablet_mac.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/components/session-storage/session-storage.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | interface SessionStorageProps { 4 | key: string; 5 | value: string; 6 | } 7 | 8 | const SessionStorage = ({ key, value }: SessionStorageProps) => { 9 | return ( 10 |