├── api-docs ├── .gitignore └── .nojekyll ├── .browserslistrc ├── .editorconfig ├── src ├── components │ ├── next │ │ ├── index.ts │ │ └── registry.tsx │ ├── swipe │ │ └── index.ts │ ├── theme-switcher │ │ └── index.ts │ ├── use-tabs │ │ └── index.ts │ ├── usp-cell │ │ └── index.ts │ ├── section │ │ └── index.ts │ ├── css-baseline │ │ ├── index.ts │ │ └── __tests__ │ │ │ └── baseline.test.tsx │ ├── gradient-word │ │ └── index.ts │ ├── sidebar │ │ ├── index.ts │ │ └── types.ts │ ├── use-is-mounted │ │ └── index.ts │ ├── box │ │ └── index.ts │ ├── col │ │ └── index.ts │ ├── dot │ │ └── index.ts │ ├── row │ │ └── index.ts │ ├── tag │ │ └── index.ts │ ├── use-click-away │ │ └── index.ts │ ├── utils │ │ ├── use-clipboard.ts │ │ ├── use-body-scroll.ts │ │ ├── use-current-state.ts │ │ ├── use-click-away.ts │ │ ├── use-constructor.ts │ │ ├── use-previous.ts │ │ ├── use-click-anywhere.ts │ │ ├── use-resize.ts │ │ ├── use-ssr.ts │ │ ├── use-visibile.ts │ │ └── use-warning.ts │ ├── text │ │ ├── shared.ts │ │ └── index.ts │ ├── use-classes │ │ └── index.ts │ ├── code │ │ └── index.ts │ ├── constants │ │ └── index.ts │ ├── link │ │ └── index.ts │ ├── note │ │ └── index.ts │ ├── routing-indicator │ │ └── index.ts │ ├── use-current-state │ │ └── index.ts │ ├── video │ │ └── index.ts │ ├── button │ │ ├── index.ts │ │ ├── __tests__ │ │ │ └── __snapshots__ │ │ │ │ └── index.test.tsx.snap │ │ └── styles.ts │ ├── slider │ │ └── index.ts │ ├── spacer │ │ └── index.ts │ ├── display │ │ └── index.ts │ ├── gauge │ │ └── index.ts │ ├── spinner │ │ └── index.ts │ ├── capacity │ │ └── index.ts │ ├── keyboard │ │ └── index.ts │ ├── pin-code │ │ └── index.ts │ ├── skeleton │ │ └── index.ts │ ├── config │ │ └── index.ts │ ├── show-more │ │ └── index.ts │ ├── page-width │ │ └── index.ts │ ├── use-charts │ │ ├── helpers │ │ │ ├── tsconfig.composite.json │ │ │ ├── mutable.ts │ │ │ ├── logger.ts │ │ │ ├── isubscription.ts │ │ │ ├── idestroyable.ts │ │ │ ├── events.ts │ │ │ ├── is-running-on-client-side.ts │ │ │ └── nominal.ts │ │ ├── views │ │ │ ├── pane │ │ │ │ ├── iaxis-view.ts │ │ │ │ ├── ipane-view.ts │ │ │ │ └── iupdatable-pane-view.ts │ │ │ ├── time-axis │ │ │ │ └── itime-axis-view.ts │ │ │ └── price-axis │ │ │ │ └── iprice-axis-view.ts │ │ ├── model │ │ │ ├── coordinate.ts │ │ │ ├── point.ts │ │ │ ├── default-price-scale.ts │ │ │ ├── sort-sources.ts │ │ │ └── price-formatter-fn.ts │ │ ├── gui │ │ │ ├── tsconfig.composite.json │ │ │ ├── ipane-view-getter.ts │ │ │ └── iaxis-view-getters.ts │ │ ├── formatters │ │ │ ├── tsconfig.composite.json │ │ │ ├── iprice-formatter.ts │ │ │ ├── percentage-formatter.ts │ │ │ ├── date-formatter.ts │ │ │ └── time-formatter.ts │ │ ├── api │ │ │ ├── tsconfig.composite.json │ │ │ ├── options │ │ │ │ ├── layout-options-defaults.ts │ │ │ │ ├── grid-options-defaults.ts │ │ │ │ ├── watermark-options-defaults.ts │ │ │ │ ├── price-line-options-defaults.ts │ │ │ │ ├── price-scale-options-defaults.ts │ │ │ │ ├── time-scale-options-defaults.ts │ │ │ │ └── crosshair-options-defaults.ts │ │ │ └── candlestick-series-api.ts │ │ └── renderers │ │ │ ├── iaxis-view-renderer.ts │ │ │ ├── ipane-renderer.ts │ │ │ ├── series-markers-text.ts │ │ │ ├── composite-renderer.ts │ │ │ └── itime-axis-view-renderer.ts │ ├── use-input │ │ └── index.ts │ ├── use-modal │ │ └── index.ts │ ├── input-group │ │ └── index.ts │ ├── rating │ │ └── index.ts │ ├── use-swipe │ │ └── index.ts │ ├── description │ │ ├── index.ts │ │ └── __tests__ │ │ │ └── __snapshots__ │ │ │ └── index.test.tsx.snap │ ├── progress │ │ └── index.ts │ ├── textarea │ │ └── index.ts │ ├── loading-spinner │ │ └── index.ts │ ├── use-search │ │ ├── index.ts │ │ ├── search-context.tsx │ │ └── search-provider.tsx │ ├── shared │ │ ├── __tests__ │ │ │ ├── __snapshots__ │ │ │ │ ├── dropdown.test.tsx.snap │ │ │ │ ├── transition.test.tsx.snap │ │ │ │ └── ellipsis.test.tsx.snap │ │ │ └── ellipsis.test.tsx │ │ └── ellipsis.tsx │ ├── toggle │ │ └── index.ts │ ├── use-body-scroll │ │ └── index.ts │ ├── use-all-themes │ │ ├── index.ts │ │ └── all-themes-context.ts │ ├── use-toasts │ │ └── index.ts │ ├── user-profile-menu │ │ └── index.ts │ ├── auto-complete │ │ ├── __tests__ │ │ │ └── __snapshots__ │ │ │ │ └── index.test.tsx.snap │ │ └── auto-complete-context.ts │ ├── use-clipboard │ │ └── index.ts │ ├── divider │ │ └── index.ts │ ├── tooltip │ │ └── index.ts │ ├── use-media-query │ │ └── index.ts │ ├── layout │ │ └── index.ts │ ├── snippet │ │ └── index.ts │ ├── button-group │ │ ├── index.ts │ │ └── button-group-context.ts │ ├── use-scale │ │ └── index.ts │ ├── themes │ │ ├── index.ts │ │ └── presets │ │ │ └── shared.ts │ ├── scroll │ │ └── index.ts │ ├── quick-bar │ │ ├── index.ts │ │ └── share.ts │ ├── toggle-list │ │ ├── shared.ts │ │ ├── index.ts │ │ └── toggle-list-provider.ts │ ├── use-keyboard │ │ └── index.ts │ ├── use-mobile-menu │ │ ├── index.ts │ │ └── mobile-menu-context.tsx │ ├── header │ │ └── controls │ │ │ ├── left-control.tsx │ │ │ ├── right-control.tsx │ │ │ └── center-control.tsx │ ├── user │ │ └── index.ts │ ├── carousel │ │ ├── utils │ │ │ ├── index.ts │ │ │ ├── classNames │ │ │ │ └── classNames.ts │ │ │ ├── isObject │ │ │ │ ├── isObject.ts │ │ │ │ └── test │ │ │ │ │ └── isObject.test.ts │ │ │ └── isEqualShallow │ │ │ │ └── isEqualShallow.ts │ │ └── carousel-item.tsx │ ├── page-layout │ │ ├── index.ts │ │ └── page-layout-context.tsx │ ├── modal │ │ └── modal-context.ts │ ├── running-text │ │ └── index.ts │ ├── tabs │ │ └── index.ts │ ├── image │ │ ├── helpers.ts │ │ ├── index.ts │ │ └── __tests__ │ │ │ └── __snapshots__ │ │ │ └── index.test.tsx.snap │ ├── table │ │ └── index.ts │ ├── avatar │ │ └── index.ts │ ├── badge │ │ └── index.ts │ ├── select │ │ ├── index.ts │ │ └── select-context.ts │ ├── collapse │ │ ├── index.ts │ │ └── collapse-context.ts │ ├── use-config │ │ └── index.ts │ ├── tree │ │ ├── index.ts │ │ ├── __tests__ │ │ │ └── __snapshots__ │ │ │ │ └── index.test.tsx.snap │ │ └── tree-context.ts │ ├── checkbox │ │ ├── index.ts │ │ └── checkbox-context.ts │ ├── search │ │ ├── index.ts │ │ └── utils.ts │ ├── popover │ │ ├── popover-context.ts │ │ └── index.ts │ ├── count-up │ │ ├── count-up.tsx │ │ └── easing.ts │ ├── radio │ │ └── radio-context.ts │ ├── button-dropdown │ │ ├── index.ts │ │ └── button-dropdown-context.ts │ ├── navigation │ │ └── navigation-context.tsx │ ├── chart │ │ └── chart-context.ts │ ├── fieldset │ │ └── fieldset-context.ts │ ├── grid │ │ └── index.ts │ ├── icons │ │ ├── minus.tsx │ │ ├── x.tsx │ │ ├── plus.tsx │ │ ├── check.tsx │ │ ├── menu.tsx │ │ ├── playFill.tsx │ │ ├── sort.tsx │ │ ├── type.tsx │ │ ├── arrowUp.tsx │ │ ├── chevronUp.tsx │ │ ├── code.tsx │ │ ├── volume.tsx │ │ ├── zap.tsx │ │ ├── chevronDown.tsx │ │ ├── chevronLeft.tsx │ │ ├── circleFill.tsx │ │ ├── divider.tsx │ │ ├── hash.tsx │ │ ├── italic.tsx │ │ ├── send.tsx │ │ ├── terminal.tsx │ │ ├── activity.tsx │ │ ├── archive.tsx │ │ ├── arrowDown.tsx │ │ ├── arrowLeft.tsx │ │ ├── arrowRight.tsx │ │ ├── arrowUpLeft.tsx │ │ ├── barChart.tsx │ │ ├── barChart2.tsx │ │ ├── chevronRight.tsx │ │ ├── cursor.tsx │ │ ├── filter.tsx │ │ ├── pauseFill.tsx │ │ ├── play.tsx │ │ ├── playSolidFill.tsx │ │ ├── power.tsx │ │ ├── skipBack.tsx │ │ ├── alignLeft.tsx │ │ ├── arrowUpRight.tsx │ │ ├── circle.tsx │ │ ├── droplet.tsx │ │ ├── navigation.tsx │ │ ├── navigation2.tsx │ │ ├── rewind.tsx │ │ ├── skipForward.tsx │ │ ├── alignRight.tsx │ │ ├── arrowDownLeft.tsx │ │ ├── arrowDownRight.tsx │ │ ├── bluetooth.tsx │ │ ├── chevronsDown.tsx │ │ ├── chevronsUp.tsx │ │ ├── cloud.tsx │ │ ├── framer.tsx │ │ ├── grid.tsx │ │ ├── list.tsx │ │ ├── map.tsx │ │ ├── moon.tsx │ │ ├── pause.tsx │ │ ├── shield.tsx │ │ ├── square.tsx │ │ ├── twitch.tsx │ │ ├── vercelTriangle.tsx │ │ ├── volumeX.tsx │ │ ├── alignCenter.tsx │ │ ├── alignJustify.tsx │ │ ├── chevronsLeft.tsx │ │ ├── chevronsRight.tsx │ │ ├── fastForward.tsx │ │ ├── maximize2.tsx │ │ ├── minimize2.tsx │ │ ├── playSolid.tsx │ │ ├── bookmark.tsx │ │ ├── clock.tsx │ │ ├── edit2.tsx │ │ ├── layers.tsx │ │ ├── shuffle.tsx │ │ ├── underline.tsx │ │ ├── volume1.tsx │ │ ├── disc.tsx │ │ ├── edit3.tsx │ │ ├── flag.tsx │ │ ├── logIn.tsx │ │ ├── meh.tsx │ │ └── share.tsx │ ├── footer │ │ ├── footer-block.tsx │ │ └── footer-bottom-block.tsx │ ├── hero │ │ ├── share.ts │ │ └── index.ts │ └── pagination │ │ └── pagination-context.ts ├── lib │ ├── components │ │ ├── pures │ │ │ ├── index.ts │ │ │ └── anchor │ │ │ │ └── anchor-icon.tsx │ │ ├── circle.png │ │ ├── playground │ │ │ └── index.ts │ │ ├── mdx-widgets │ │ │ ├── parsed-codes │ │ │ │ └── index.ts │ │ │ ├── README.md │ │ │ ├── icons-gallery │ │ │ │ └── index.tsx │ │ │ └── index.ts │ │ ├── attributes │ │ │ └── index.ts │ │ └── index.ts │ ├── constants.ts │ ├── use-dom-clean.ts │ ├── get-attribute-data.ts │ ├── doc-types.ts │ ├── providers.tsx │ └── data │ │ ├── metadata-guide.json │ │ └── index.ts ├── public │ ├── favicon.ico │ ├── images │ │ ├── avatar.png │ │ ├── himalaya-banner.png │ │ ├── himalaya-preview.png │ │ ├── himalaya-banner-dark.png │ │ └── himalaya-banner-text.png │ └── robots.txt ├── app │ ├── components │ │ ├── box │ │ │ └── page.tsx │ │ ├── dot │ │ │ └── page.tsx │ │ ├── tag │ │ │ └── page.tsx │ │ ├── avatar │ │ │ └── page.tsx │ │ ├── badge │ │ │ └── page.tsx │ │ ├── button │ │ │ └── page.tsx │ │ ├── card │ │ │ └── page.tsx │ │ ├── charts │ │ │ └── page.tsx │ │ ├── code │ │ │ └── page.tsx │ │ ├── drawer │ │ │ └── page.tsx │ │ ├── entity │ │ │ └── page.tsx │ │ ├── footer │ │ │ └── page.tsx │ │ ├── gauge │ │ │ └── page.tsx │ │ ├── grid │ │ │ └── page.tsx │ │ ├── header │ │ │ └── page.tsx │ │ ├── hero │ │ │ └── page.tsx │ │ ├── icons │ │ │ └── page.tsx │ │ ├── image │ │ │ └── page.tsx │ │ ├── input │ │ │ └── page.tsx │ │ ├── link │ │ │ └── page.tsx │ │ ├── menu │ │ │ └── page.tsx │ │ ├── modal │ │ │ └── page.tsx │ │ ├── note │ │ │ └── page.tsx │ │ ├── radio │ │ │ └── page.tsx │ │ ├── rating │ │ │ └── page.tsx │ │ ├── search │ │ │ └── page.tsx │ │ ├── select │ │ │ └── page.tsx │ │ ├── slider │ │ │ └── page.tsx │ │ ├── spacer │ │ │ └── page.tsx │ │ ├── table │ │ │ └── page.tsx │ │ ├── tabs │ │ │ └── page.tsx │ │ ├── text │ │ │ └── page.tsx │ │ ├── toast │ │ │ ├── page.tsx │ │ │ └── toast.mdx │ │ ├── toggle │ │ │ └── page.tsx │ │ ├── user │ │ │ └── page.tsx │ │ ├── video │ │ │ └── page.tsx │ │ ├── capacity │ │ │ └── page.tsx │ │ ├── carousel │ │ │ └── page.tsx │ │ ├── checkbox │ │ │ └── page.tsx │ │ ├── collapse │ │ │ └── page.tsx │ │ ├── count-up │ │ │ └── page.tsx │ │ ├── display │ │ │ └── page.tsx │ │ ├── divider │ │ │ └── page.tsx │ │ ├── fieldset │ │ │ └── page.tsx │ │ ├── keyboard │ │ │ └── page.tsx │ │ ├── pin-code │ │ │ └── page.tsx │ │ ├── popover │ │ │ └── page.tsx │ │ ├── progress │ │ │ └── page.tsx │ │ ├── sidebar │ │ │ └── page.tsx │ │ ├── skeleton │ │ │ └── page.tsx │ │ ├── snippet │ │ │ └── page.tsx │ │ ├── spinner │ │ │ ├── page.tsx │ │ │ └── spinner.mdx │ │ ├── textarea │ │ │ └── page.tsx │ │ ├── tooltip │ │ │ └── page.tsx │ │ ├── breadcrumbs │ │ │ └── page.tsx │ │ ├── description │ │ │ └── page.tsx │ │ ├── file-tree │ │ │ └── page.tsx │ │ ├── input-group │ │ │ └── page.tsx │ │ ├── mobile-menu │ │ │ └── page.tsx │ │ ├── navigation │ │ │ └── page.tsx │ │ ├── page-layout │ │ │ └── page.tsx │ │ ├── page-width │ │ │ └── page.tsx │ │ ├── pagination │ │ │ └── page.tsx │ │ ├── section │ │ │ └── page.tsx │ │ ├── show-more │ │ │ └── page.tsx │ │ ├── toggle-list │ │ │ └── page.tsx │ │ ├── button-group │ │ │ └── page.tsx │ │ ├── content-page │ │ │ └── page.tsx │ │ ├── gradient-word │ │ │ └── page.tsx │ │ ├── inner-scroll │ │ │ └── page.tsx │ │ ├── quick-bar │ │ │ └── page.tsx │ │ ├── auto-complete │ │ │ └── page.tsx │ │ ├── button-dropdown │ │ │ └── page.tsx │ │ ├── gradient-content │ │ │ └── page.tsx │ │ ├── loading-spinner │ │ │ └── page.tsx │ │ ├── running-text │ │ │ └── page.tsx │ │ ├── animated-cursor │ │ │ ├── page.tsx │ │ │ └── animated-cursor.mdx │ │ ├── bottom-navigation │ │ │ └── page.tsx │ │ ├── routing-indicator │ │ │ └── page.tsx │ │ ├── loading.tsx │ │ └── layout.tsx │ ├── guide │ │ ├── colors │ │ │ └── page.tsx │ │ ├── scale │ │ │ └── page.tsx │ │ ├── themes │ │ │ └── page.tsx │ │ ├── bundle-size │ │ │ └── page.tsx │ │ ├── installation │ │ │ └── page.tsx │ │ ├── introduction │ │ │ └── page.tsx │ │ ├── server-render │ │ │ └── page.tsx │ │ ├── loading.tsx │ │ └── layout.tsx │ ├── hooks │ │ ├── use-tabs │ │ │ └── page.tsx │ │ ├── use-classes │ │ │ └── page.tsx │ │ ├── use-config │ │ │ └── page.tsx │ │ ├── use-input │ │ │ └── page.tsx │ │ ├── use-modal │ │ │ └── page.tsx │ │ ├── use-scale │ │ │ └── page.tsx │ │ ├── use-search │ │ │ └── page.tsx │ │ ├── use-toast │ │ │ └── page.tsx │ │ ├── use-clipboard │ │ │ └── page.tsx │ │ ├── use-keyboard │ │ │ └── page.tsx │ │ ├── use-body-scroll │ │ │ └── page.tsx │ │ ├── use-click-away │ │ │ └── page.tsx │ │ ├── use-media-query │ │ │ └── page.tsx │ │ ├── use-page-layout │ │ │ └── page.tsx │ │ ├── use-current-state │ │ │ └── page.tsx │ │ ├── loading.tsx │ │ └── layout.tsx │ └── not-found.tsx ├── typings │ ├── meta.d.ts │ ├── styled.d.ts │ ├── mdx.d.ts │ ├── _global-types.d.ts │ └── _build-time-constants.d.ts ├── next-env.d.ts ├── .eslintignore ├── conversion.md └── mdx-components.tsx ├── .vercelignore ├── .husky ├── pre-commit └── pre-push ├── .github ├── PULL_REQUEST_TEMPLATE.md └── ISSUE_TEMPLATE │ ├── config.yml │ ├── 3-docs.md │ ├── 2-feature-request.md │ └── 1-bug-report.md ├── .prettierignore ├── scripts ├── built-in │ └── styled-jsx-server.es.js ├── .eslintrc.js ├── side-effects.js └── move-server-in.js ├── tests ├── .babelrc.js ├── setup.ts ├── __mocks__ │ └── styled-jsx │ │ └── css.js └── utils.ts ├── .codecov.yml ├── vercel.json ├── prettier.json ├── typedoc.json ├── .travis.yml ├── tsconfig.json ├── .release-it.json └── .gitignore /api-docs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | last 2 years 2 | > 1% 3 | not dead 4 | not ie <= 11 -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*.{js,ts,tsx,jsx}] 4 | charset = utf-8 5 | -------------------------------------------------------------------------------- /src/components/next/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NextStyleRegistry } from './registry'; 2 | -------------------------------------------------------------------------------- /src/lib/components/pures/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VirtualAnchor } from './anchor'; 2 | -------------------------------------------------------------------------------- /.vercelignore: -------------------------------------------------------------------------------- 1 | .vercel 2 | .husky 3 | .circleci 4 | .codecov.yml 5 | .gitlab-ci.yml 6 | dist 7 | -------------------------------------------------------------------------------- /src/components/swipe/index.ts: -------------------------------------------------------------------------------- 1 | export { default as SwipeProvider } from './swipe-provider'; 2 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npm run prettier 5 | -------------------------------------------------------------------------------- /src/components/theme-switcher/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ThemeSwitcher } from './theme-switcher'; 2 | -------------------------------------------------------------------------------- /src/components/use-tabs/index.ts: -------------------------------------------------------------------------------- 1 | import useTabs from './use-tabs'; 2 | 3 | export default useTabs; 4 | -------------------------------------------------------------------------------- /src/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/red-ninjas/himalaya-ui/HEAD/src/public/favicon.ico -------------------------------------------------------------------------------- /src/components/usp-cell/index.ts: -------------------------------------------------------------------------------- 1 | export { default as UspCell, type HomeCellProps } from './usp-cell'; 2 | -------------------------------------------------------------------------------- /src/components/section/index.ts: -------------------------------------------------------------------------------- 1 | import { default as Section } from './section'; 2 | export default Section; 3 | -------------------------------------------------------------------------------- /.husky/pre-push: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npm run lint 5 | npm run build 6 | -------------------------------------------------------------------------------- /src/components/css-baseline/index.ts: -------------------------------------------------------------------------------- 1 | import CssBaseline from './css-baseline'; 2 | export default CssBaseline; 3 | -------------------------------------------------------------------------------- /src/components/gradient-word/index.ts: -------------------------------------------------------------------------------- 1 | import GradientWord from './gradient-word'; 2 | export default GradientWord; 3 | -------------------------------------------------------------------------------- /src/lib/components/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/red-ninjas/himalaya-ui/HEAD/src/lib/components/circle.png -------------------------------------------------------------------------------- /src/lib/components/playground/index.ts: -------------------------------------------------------------------------------- 1 | import Playground from './playground'; 2 | 3 | export default Playground; 4 | -------------------------------------------------------------------------------- /src/public/images/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/red-ninjas/himalaya-ui/HEAD/src/public/images/avatar.png -------------------------------------------------------------------------------- /src/components/sidebar/index.ts: -------------------------------------------------------------------------------- 1 | export { Sidebar } from './types'; 2 | export type { SidebarProps } from './sidebar'; 3 | -------------------------------------------------------------------------------- /src/components/use-is-mounted/index.ts: -------------------------------------------------------------------------------- 1 | import { useIsMounted } from './is-mounted'; 2 | export default useIsMounted; 3 | -------------------------------------------------------------------------------- /src/components/box/index.ts: -------------------------------------------------------------------------------- 1 | import Box from './box'; 2 | 3 | export type { BoxProps } from './box'; 4 | export default Box; 5 | -------------------------------------------------------------------------------- /src/components/col/index.ts: -------------------------------------------------------------------------------- 1 | import Col from './col'; 2 | 3 | export type { ColProps } from './col'; 4 | export default Col; 5 | -------------------------------------------------------------------------------- /src/components/dot/index.ts: -------------------------------------------------------------------------------- 1 | import Dot from './dot'; 2 | 3 | export type { DotProps } from './dot'; 4 | export default Dot; 5 | -------------------------------------------------------------------------------- /src/components/row/index.ts: -------------------------------------------------------------------------------- 1 | import Row from './row'; 2 | 3 | export type { RowProps } from './row'; 4 | export default Row; 5 | -------------------------------------------------------------------------------- /src/components/tag/index.ts: -------------------------------------------------------------------------------- 1 | import Tag from './tag'; 2 | 3 | export type { TagProps } from './tag'; 4 | export default Tag; 5 | -------------------------------------------------------------------------------- /src/components/use-click-away/index.ts: -------------------------------------------------------------------------------- 1 | import useClickAway from './use-click-away'; 2 | 3 | export default useClickAway; 4 | -------------------------------------------------------------------------------- /src/components/utils/use-clipboard.ts: -------------------------------------------------------------------------------- 1 | import useClipboard from '../use-clipboard'; 2 | 3 | export default useClipboard; 4 | -------------------------------------------------------------------------------- /src/components/text/shared.ts: -------------------------------------------------------------------------------- 1 | import { Gradient } from '../themes/presets'; 2 | 3 | export type TextColor = string | Gradient; 4 | -------------------------------------------------------------------------------- /src/components/use-classes/index.ts: -------------------------------------------------------------------------------- 1 | import { default as useClasses } from './use-classes'; 2 | 3 | export default useClasses; 4 | -------------------------------------------------------------------------------- /src/components/utils/use-body-scroll.ts: -------------------------------------------------------------------------------- 1 | import useBodyScroll from '../use-body-scroll'; 2 | 3 | export default useBodyScroll; 4 | -------------------------------------------------------------------------------- /src/public/images/himalaya-banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/red-ninjas/himalaya-ui/HEAD/src/public/images/himalaya-banner.png -------------------------------------------------------------------------------- /src/components/code/index.ts: -------------------------------------------------------------------------------- 1 | import Code from './code'; 2 | 3 | export type { CodeProps } from './code'; 4 | export default Code; 5 | -------------------------------------------------------------------------------- /src/components/constants/index.ts: -------------------------------------------------------------------------------- 1 | export const THEME_COOKIE_NAME: string = 'theme'; 2 | export const CUSTOM_THEME_TYPE = 'Custom'; 3 | -------------------------------------------------------------------------------- /src/components/link/index.ts: -------------------------------------------------------------------------------- 1 | import Link from './link'; 2 | 3 | export type { LinkProps } from './link'; 4 | export default Link; 5 | -------------------------------------------------------------------------------- /src/components/note/index.ts: -------------------------------------------------------------------------------- 1 | import Note from './note'; 2 | 3 | export type { NoteProps } from './note'; 4 | export default Note; 5 | -------------------------------------------------------------------------------- /src/components/routing-indicator/index.ts: -------------------------------------------------------------------------------- 1 | import RoutingIndicator from './routing-indicator'; 2 | export default RoutingIndicator; 3 | -------------------------------------------------------------------------------- /src/components/use-current-state/index.ts: -------------------------------------------------------------------------------- 1 | import useCurrentState from './use-current-state'; 2 | 3 | export default useCurrentState; 4 | -------------------------------------------------------------------------------- /src/components/utils/use-current-state.ts: -------------------------------------------------------------------------------- 1 | import useCurrentState from '../use-current-state'; 2 | 3 | export default useCurrentState; 4 | -------------------------------------------------------------------------------- /src/public/images/himalaya-preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/red-ninjas/himalaya-ui/HEAD/src/public/images/himalaya-preview.png -------------------------------------------------------------------------------- /src/components/utils/use-click-away.ts: -------------------------------------------------------------------------------- 1 | import { default as useClickAway } from '../use-click-away'; 2 | 3 | export default useClickAway; 4 | -------------------------------------------------------------------------------- /src/components/video/index.ts: -------------------------------------------------------------------------------- 1 | import Video from './video'; 2 | 3 | export type { VideoProps } from './video'; 4 | export default Video; 5 | -------------------------------------------------------------------------------- /src/lib/components/mdx-widgets/parsed-codes/index.ts: -------------------------------------------------------------------------------- 1 | export * from './clock'; 2 | export * from './greeting'; 3 | export * from './types'; 4 | -------------------------------------------------------------------------------- /src/public/images/himalaya-banner-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/red-ninjas/himalaya-ui/HEAD/src/public/images/himalaya-banner-dark.png -------------------------------------------------------------------------------- /src/public/images/himalaya-banner-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/red-ninjas/himalaya-ui/HEAD/src/public/images/himalaya-banner-text.png -------------------------------------------------------------------------------- /src/components/button/index.ts: -------------------------------------------------------------------------------- 1 | import Button from './button'; 2 | 3 | export type { ButtonProps } from './button'; 4 | export default Button; 5 | -------------------------------------------------------------------------------- /src/components/slider/index.ts: -------------------------------------------------------------------------------- 1 | import Slider from './slider'; 2 | 3 | export type { SliderProps } from './slider'; 4 | export default Slider; 5 | -------------------------------------------------------------------------------- /src/components/spacer/index.ts: -------------------------------------------------------------------------------- 1 | import Spacer from './spacer'; 2 | 3 | export type { SpacerProps } from './spacer'; 4 | export default Spacer; 5 | -------------------------------------------------------------------------------- /src/components/display/index.ts: -------------------------------------------------------------------------------- 1 | import Display from './display'; 2 | 3 | export type { DisplayProps } from './display'; 4 | export default Display; 5 | -------------------------------------------------------------------------------- /src/components/gauge/index.ts: -------------------------------------------------------------------------------- 1 | import Gauge from './gauge'; 2 | 3 | export type { GaugeProps, GaugeColors } from './gauge'; 4 | export default Gauge; 5 | -------------------------------------------------------------------------------- /src/components/spinner/index.ts: -------------------------------------------------------------------------------- 1 | import Spinner from './spinner'; 2 | 3 | export type { SpinnerProps } from './spinner'; 4 | export default Spinner; 5 | -------------------------------------------------------------------------------- /src/components/capacity/index.ts: -------------------------------------------------------------------------------- 1 | import Capacity from './capacity'; 2 | 3 | export type { CapacityProps } from './capacity'; 4 | export default Capacity; 5 | -------------------------------------------------------------------------------- /src/components/keyboard/index.ts: -------------------------------------------------------------------------------- 1 | import Keyboard from './keyboard'; 2 | 3 | export type { KeyboardProps } from './keyboard'; 4 | export default Keyboard; 5 | -------------------------------------------------------------------------------- /src/components/pin-code/index.ts: -------------------------------------------------------------------------------- 1 | import PinCode from './pin-code'; 2 | 3 | export type { PinCodeProps } from './pin-code'; 4 | export default PinCode; 5 | -------------------------------------------------------------------------------- /src/components/skeleton/index.ts: -------------------------------------------------------------------------------- 1 | import Skeleton from './skeleton'; 2 | 3 | export type { SkeletonProps } from './skeleton'; 4 | export default Skeleton; 5 | -------------------------------------------------------------------------------- /api-docs/.nojekyll: -------------------------------------------------------------------------------- 1 | TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. -------------------------------------------------------------------------------- /src/components/config/index.ts: -------------------------------------------------------------------------------- 1 | export * from './config-provider'; 2 | import ConfigProvider from './config-provider'; 3 | 4 | export default ConfigProvider; 5 | -------------------------------------------------------------------------------- /src/components/show-more/index.ts: -------------------------------------------------------------------------------- 1 | import ShowMore from './show-more'; 2 | 3 | export type { ShowMoreProps } from './show-more'; 4 | export default ShowMore; 5 | -------------------------------------------------------------------------------- /src/components/page-width/index.ts: -------------------------------------------------------------------------------- 1 | import PageWidth from './page-width'; 2 | 3 | export type { PageWidthProps } from './page-width'; 4 | export default PageWidth; 5 | -------------------------------------------------------------------------------- /src/components/use-charts/helpers/tsconfig.composite.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.composite.base.json", 3 | "include": [ 4 | "./**/*.ts" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /src/components/use-input/index.ts: -------------------------------------------------------------------------------- 1 | import useInput from './use-input'; 2 | 3 | export type { BindingsChangeTarget } from './use-input'; 4 | export default useInput; 5 | -------------------------------------------------------------------------------- /src/components/use-modal/index.ts: -------------------------------------------------------------------------------- 1 | import useModal from './use-modal'; 2 | 3 | export type { ModalHooksBindings } from './use-modal'; 4 | export default useModal; 5 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Checklist 2 | 3 | - [ ] Fix linting errors 4 | - [ ] Tests have been added / updated (or snapshots) 5 | 6 | ## Change information 7 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .github 2 | .next 3 | .now 4 | .circleci 5 | dist 6 | coverage 7 | public 8 | esm 9 | *.json 10 | *.d.ts 11 | *.yml 12 | *.snap 13 | *.mdx 14 | *.MD -------------------------------------------------------------------------------- /src/app/components/box/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './box.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/dot/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './dot.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/tag/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './tag.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/guide/colors/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './colors.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/guide/scale/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './scale.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/guide/themes/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './themes.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/components/input-group/index.ts: -------------------------------------------------------------------------------- 1 | import InputGroup from './input-group'; 2 | 3 | export type { InputGroupProps } from './input-group'; 4 | export default InputGroup; 5 | -------------------------------------------------------------------------------- /src/components/rating/index.ts: -------------------------------------------------------------------------------- 1 | import Rating from './rating'; 2 | 3 | export type { RatingProps, RatingCount, RatingValue } from './rating'; 4 | export default Rating; 5 | -------------------------------------------------------------------------------- /src/components/use-swipe/index.ts: -------------------------------------------------------------------------------- 1 | import { useSwipe } from './swipe-context'; 2 | export { type SwipeContextProps } from './swipe-context'; 3 | export default useSwipe; 4 | -------------------------------------------------------------------------------- /src/app/components/avatar/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './avatar.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/badge/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './badge.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/button/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './button.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/card/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './card.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/charts/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './charts.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/code/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './code.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/drawer/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './drawer.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/entity/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './entity.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/footer/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './footer.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/gauge/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './gauge.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/grid/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './grid.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/header/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './header.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/hero/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './hero.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/icons/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './icons.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/image/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './image.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/input/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './input.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/link/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './link.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/menu/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './menu.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/modal/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './modal.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/note/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './note.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/radio/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './radio.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/rating/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './rating.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/search/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './search.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/select/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './select.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/slider/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './slider.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/spacer/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './spacer.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/table/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './table.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/tabs/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './tabs.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/text/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './text.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/toast/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './toast.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/toggle/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './toggle.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/user/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './user.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/video/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './video.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/hooks/use-tabs/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './use-tabs.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/components/description/index.ts: -------------------------------------------------------------------------------- 1 | import Description from './description'; 2 | 3 | export type { DescriptionProps } from './description'; 4 | export default Description; 5 | -------------------------------------------------------------------------------- /src/components/progress/index.ts: -------------------------------------------------------------------------------- 1 | import Progress from './progress'; 2 | 3 | export type { ProgressProps, ProgressColors } from './progress'; 4 | export default Progress; 5 | -------------------------------------------------------------------------------- /src/components/textarea/index.ts: -------------------------------------------------------------------------------- 1 | import Textarea from './textarea'; 2 | 3 | export type { TextareaProps, TextareaResizes } from './textarea'; 4 | export default Textarea; 5 | -------------------------------------------------------------------------------- /src/app/components/capacity/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './capacity.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/carousel/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './carousel.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/checkbox/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './checkbox.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/collapse/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './collapse.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/count-up/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './count-up.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/display/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './display.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/divider/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './divider.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/fieldset/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './fieldset.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/keyboard/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './keyboard.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/pin-code/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './pin-code.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/popover/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './popover.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/progress/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './progress.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/sidebar/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './sidebar.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/skeleton/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './skeleton.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/snippet/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './snippet.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/spinner/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './spinner.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/textarea/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './textarea.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/tooltip/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './tooltip.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/guide/bundle-size/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './bundle-size.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/hooks/use-classes/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './use-classes.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/hooks/use-config/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './use-config.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/hooks/use-input/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './use-input.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/hooks/use-modal/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './use-modal.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/hooks/use-scale/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './use-scale.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/hooks/use-search/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './use-search.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/hooks/use-toast/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './use-toast.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/components/loading-spinner/index.ts: -------------------------------------------------------------------------------- 1 | import Loading from './loading-spinner'; 2 | 3 | export type { LoadingSpinnerProps } from './loading-spinner'; 4 | export default Loading; 5 | -------------------------------------------------------------------------------- /src/components/use-charts/helpers/mutable.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Removes "readonly" from all properties 3 | */ 4 | export type Mutable = { 5 | -readonly [P in keyof T]: T[P]; 6 | }; 7 | -------------------------------------------------------------------------------- /src/components/use-search/index.ts: -------------------------------------------------------------------------------- 1 | import { useSearch } from './search-context'; 2 | export { default as SearchProvider } from './search-provider'; 3 | export default useSearch; 4 | -------------------------------------------------------------------------------- /scripts/built-in/styled-jsx-server.es.js: -------------------------------------------------------------------------------- 1 | import { server } from './styled-jsx.es' 2 | const { flushToHTML } = server 3 | 4 | export { server, flushToHTML } 5 | export default server 6 | -------------------------------------------------------------------------------- /src/app/components/breadcrumbs/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './breadcrumbs.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/description/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './description.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/file-tree/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './file-tree.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/input-group/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './input-group.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/mobile-menu/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './mobile-menu.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/navigation/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './navigation.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/page-layout/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './page-layout.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/page-width/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './page-width.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/pagination/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './pagination.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/section/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import Documentation from './section.mdx'; 4 | 5 | export default function Page() { 6 | return ; 7 | } 8 | -------------------------------------------------------------------------------- /src/app/components/show-more/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './show-more.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/toggle-list/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './toggle-list.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/guide/installation/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './installation.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/guide/introduction/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './introduction.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/guide/server-render/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './server-render.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/hooks/use-clipboard/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './use-clipboard.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/hooks/use-keyboard/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './use-keyboard.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/not-found.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { ErrorPage404 } from 'components'; 4 | 5 | export default function Error() { 6 | return ; 7 | } 8 | -------------------------------------------------------------------------------- /src/app/components/button-group/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './button-group.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/content-page/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './content-page.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/gradient-word/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './gradient-word.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/inner-scroll/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './inner-scroll.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/quick-bar/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import Documentation from './quick-bar.mdx'; 4 | 5 | export default function Page() { 6 | return ; 7 | } 8 | -------------------------------------------------------------------------------- /src/app/hooks/use-body-scroll/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './use-body-scroll.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/hooks/use-click-away/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './use-click-away.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/hooks/use-media-query/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './use-media-query.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/hooks/use-page-layout/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './use-page-layout.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/components/shared/__tests__/__snapshots__/dropdown.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Dropdown should render correctly 1`] = `"
"`; 4 | -------------------------------------------------------------------------------- /src/components/text/index.ts: -------------------------------------------------------------------------------- 1 | import Text from './text'; 2 | 3 | export type { TextProps, TextTypes } from './text'; 4 | export type { TextColor } from './shared'; 5 | export default Text; 6 | -------------------------------------------------------------------------------- /src/components/toggle/index.ts: -------------------------------------------------------------------------------- 1 | import Toggle from './toggle'; 2 | 3 | export type { ToggleProps, ToggleSize, ToggleEvent, ToggleEventTarget } from './toggle'; 4 | export default Toggle; 5 | -------------------------------------------------------------------------------- /src/components/use-body-scroll/index.ts: -------------------------------------------------------------------------------- 1 | import useBodyScroll from './use-body-scroll'; 2 | 3 | export type { BodyScrollOptions } from './use-body-scroll'; 4 | export default useBodyScroll; 5 | -------------------------------------------------------------------------------- /src/public/robots.txt: -------------------------------------------------------------------------------- 1 | # * 2 | User-agent: * 3 | Allow: / 4 | 5 | # Host 6 | Host: https://himalaya-ui.com 7 | 8 | # Sitemaps 9 | Sitemap: https://himalaya-ui.com/sitemap.xml 10 | -------------------------------------------------------------------------------- /tests/.babelrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@babel/env', '@babel/react', '@babel/typescript'], 3 | plugins: ['styled-jsx/babel-test', '@babel/plugin-transform-runtime'], 4 | } 5 | -------------------------------------------------------------------------------- /src/app/components/auto-complete/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import Documentation from './auto-complete.mdx'; 4 | 5 | export default function Page() { 6 | return ; 7 | } 8 | -------------------------------------------------------------------------------- /src/app/components/button-dropdown/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './button-dropdown.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/gradient-content/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './gradient-content.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/loading-spinner/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './loading-spinner.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/running-text/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import Documentation from './running-text.mdx'; 4 | 5 | export default function Page() { 6 | return ; 7 | } 8 | -------------------------------------------------------------------------------- /src/app/hooks/use-current-state/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './use-current-state.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/components/description/__tests__/__snapshots__/index.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Description should render correctly 1`] = `ReactWrapper {}`; 4 | -------------------------------------------------------------------------------- /src/components/use-all-themes/index.ts: -------------------------------------------------------------------------------- 1 | import { useAllThemes } from './all-themes-context'; 2 | 3 | export type { AllThemesConfig } from './all-themes-context'; 4 | export default useAllThemes; 5 | -------------------------------------------------------------------------------- /src/components/use-toasts/index.ts: -------------------------------------------------------------------------------- 1 | import useToasts from './use-toast'; 2 | 3 | export type { ToastAction, Toast, ToastInput, ToastLayout } from './use-toast'; 4 | export default useToasts; 5 | -------------------------------------------------------------------------------- /src/lib/constants.ts: -------------------------------------------------------------------------------- 1 | export const GITHUB_URL = 'https://github.com/red-ninjas/himalaya-ui'; 2 | 3 | export const GITHUB_CONTRIBUTORS_URL = 'https://api.github.com/repos/red-ninjas/himalaya-ui'; 4 | -------------------------------------------------------------------------------- /src/app/components/animated-cursor/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import Documentation from './animated-cursor.mdx'; 4 | 5 | export default function Page() { 6 | return ; 7 | } 8 | -------------------------------------------------------------------------------- /src/app/components/bottom-navigation/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import Documentation from './bottom-navigation.mdx'; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/guide/loading.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { LoadingSpinner } from 'components'; 4 | 5 | export default function Loading() { 6 | return Loading; 7 | } 8 | -------------------------------------------------------------------------------- /src/app/hooks/loading.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { LoadingSpinner } from 'components'; 4 | 5 | export default function Loading() { 6 | return Loading; 7 | } 8 | -------------------------------------------------------------------------------- /src/components/user-profile-menu/index.ts: -------------------------------------------------------------------------------- 1 | import UserProfileMenu from './user-profile-menu'; 2 | export type { UserProfileMenuProps } from './user-profile-menu'; 3 | export default UserProfileMenu; 4 | -------------------------------------------------------------------------------- /src/lib/components/mdx-widgets/README.md: -------------------------------------------------------------------------------- 1 | ## MDX Widgets 2 | 3 | These components are used as examples for mdx files, please do not refer to this content for other components in the `lib` folder. 4 | -------------------------------------------------------------------------------- /src/typings/meta.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | declare module 'react' { 4 | interface MetaHTMLAttributes extends React.MetaHTMLAttributes { 5 | itemprop?: string 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/app/components/routing-indicator/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import Documentation from './routing-indicator.mdx'; 4 | 5 | export default function Page() { 6 | return ; 7 | } 8 | -------------------------------------------------------------------------------- /src/components/auto-complete/__tests__/__snapshots__/index.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`AutoComplete should render correctly 1`] = ``; 4 | -------------------------------------------------------------------------------- /src/components/use-charts/views/pane/iaxis-view.ts: -------------------------------------------------------------------------------- 1 | import { IAxisRenderer } from '../../renderers/iaxis-view-renderer'; 2 | 3 | export interface IAxisView { 4 | renderer(): IAxisRenderer | null; 5 | } 6 | -------------------------------------------------------------------------------- /src/components/use-clipboard/index.ts: -------------------------------------------------------------------------------- 1 | import useClipboard from './use-clipboard'; 2 | 3 | export type { UseClipboardOptions, UseClipboardResult } from './use-clipboard'; 4 | export default useClipboard; 5 | -------------------------------------------------------------------------------- /.codecov.yml: -------------------------------------------------------------------------------- 1 | codecov: 2 | require_ci_to_pass: yes 3 | comment: 4 | layout: "reach, diff, flags, files" 5 | behavior: default 6 | require_changes: false 7 | branches: 8 | - "master" 9 | -------------------------------------------------------------------------------- /src/components/divider/index.ts: -------------------------------------------------------------------------------- 1 | import Divider from './divider'; 2 | 3 | export type { DividerProps } from './divider'; 4 | export type { DividerAlign } from '../utils/prop-types'; 5 | export default Divider; 6 | -------------------------------------------------------------------------------- /src/components/tooltip/index.ts: -------------------------------------------------------------------------------- 1 | import Tooltip from './tooltip'; 2 | 3 | export type { TooltipProps, TooltipOnVisibleChange, TooltipTriggers, TooltipPlacement } from './tooltip'; 4 | export default Tooltip; 5 | -------------------------------------------------------------------------------- /src/components/use-media-query/index.ts: -------------------------------------------------------------------------------- 1 | import useMediaQuery from './use-media-query'; 2 | 3 | export type { ResponsiveBreakpoint, ResponsiveOptions } from './use-media-query'; 4 | export default useMediaQuery; 5 | -------------------------------------------------------------------------------- /src/app/components/loading.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import LoadingSpinner from 'components/loading-spinner'; 4 | 5 | export default function Loading() { 6 | return Loading; 7 | } 8 | -------------------------------------------------------------------------------- /src/app/guide/layout.tsx: -------------------------------------------------------------------------------- 1 | import DocumentationLayout from 'lib/layouts/documentation-layout'; 2 | export default function Layout({ children }) { 3 | return {children}; 4 | } 5 | -------------------------------------------------------------------------------- /src/app/hooks/layout.tsx: -------------------------------------------------------------------------------- 1 | import DocumentationLayout from 'lib/layouts/documentation-layout'; 2 | export default function Layout({ children }) { 3 | return {children}; 4 | } 5 | -------------------------------------------------------------------------------- /src/components/use-charts/model/coordinate.ts: -------------------------------------------------------------------------------- 1 | import { Nominal } from '../helpers/nominal'; 2 | 3 | /** 4 | * Represents a coordiate as a `number`. 5 | */ 6 | export type Coordinate = Nominal; 7 | -------------------------------------------------------------------------------- /src/components/use-charts/views/pane/ipane-view.ts: -------------------------------------------------------------------------------- 1 | import { IPaneRenderer } from '../../renderers/ipane-renderer'; 2 | 3 | export interface IPaneView { 4 | renderer(addAnchors?: boolean): IPaneRenderer | null; 5 | } 6 | -------------------------------------------------------------------------------- /vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "buildCommand": "npm run docs:build", 4 | "installCommand": "npm install", 5 | "devCommand": "npm run dev", 6 | "outputDirectory": "src/.next", 7 | "framework": "nextjs" 8 | } -------------------------------------------------------------------------------- /scripts/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | node: true, 4 | project: 'tsconfig.json', 5 | tsconfigRootDir: __dirname, 6 | }, 7 | rules: { 8 | 'no-console': ['off'], 9 | }, 10 | } 11 | -------------------------------------------------------------------------------- /src/components/layout/index.ts: -------------------------------------------------------------------------------- 1 | export { default as GradientContent } from './gradient-content'; 2 | 3 | export interface GradientContentProps { 4 | gradient?: string; 5 | img?: string; 6 | maxHeight?: string; 7 | } 8 | -------------------------------------------------------------------------------- /src/components/snippet/index.ts: -------------------------------------------------------------------------------- 1 | import Snippet from './snippet'; 2 | 3 | export type { SnippetProps } from './snippet'; 4 | export type { CopyTypes, SnippetTypes } from '../utils/prop-types'; 5 | export default Snippet; 6 | -------------------------------------------------------------------------------- /src/app/components/layout.tsx: -------------------------------------------------------------------------------- 1 | import DocumentationLayout from 'lib/layouts/documentation-layout'; 2 | export default async function Layout({ children }) { 3 | return {children}; 4 | } 5 | -------------------------------------------------------------------------------- /src/components/use-charts/views/time-axis/itime-axis-view.ts: -------------------------------------------------------------------------------- 1 | import { TimeAxisViewRenderer } from '../../renderers/time-axis-view-renderer'; 2 | 3 | export interface ITimeAxisView { 4 | renderer(): TimeAxisViewRenderer; 5 | } 6 | -------------------------------------------------------------------------------- /src/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /src/components/button-group/index.ts: -------------------------------------------------------------------------------- 1 | import ButtonGroup from './button-group'; 2 | 3 | export type { ButtonGroupProps } from './button-group'; 4 | export type { ButtonTypes } from '../utils/prop-types'; 5 | export default ButtonGroup; 6 | -------------------------------------------------------------------------------- /src/components/shared/__tests__/__snapshots__/transition.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`CssTransition should render correctly 1`] = `"test"`; 4 | -------------------------------------------------------------------------------- /src/components/use-charts/gui/tsconfig.composite.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.composite.base.json", 3 | "references": [ 4 | { "path": "../tsconfig.model.json" } 5 | ], 6 | "include": [ 7 | "./**/*.ts", 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /src/components/use-scale/index.ts: -------------------------------------------------------------------------------- 1 | import withScale from './with-scale'; 2 | import { useScale } from './scale-context'; 3 | export * from './utils'; 4 | export * from './scale-context'; 5 | 6 | export default useScale; 7 | export { withScale }; 8 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | contact_links: 2 | - name: Help or Questions 🙀 3 | url: https://github.com/red-ninjas/himalaya-ui/discussions 4 | about: This issue tracker is not for support questions. Please refer to the Github's Discussions. -------------------------------------------------------------------------------- /src/lib/components/mdx-widgets/icons-gallery/index.tsx: -------------------------------------------------------------------------------- 1 | import dynamic from 'next/dynamic'; 2 | 3 | const IconsGallery = dynamic(() => import('./icons-gallery'), { 4 | ssr: false, 5 | loading: () => null, 6 | }); 7 | 8 | export default IconsGallery; 9 | -------------------------------------------------------------------------------- /src/components/themes/index.ts: -------------------------------------------------------------------------------- 1 | import Themes from './themes'; 2 | 3 | export type { UIThemes, UIThemesExpressiveness, UIThemesFont, UIThemesPalette, UIColorTypes } from './presets'; 4 | export type { UIUserTheme } from './themes'; 5 | export default Themes; 6 | -------------------------------------------------------------------------------- /src/components/use-charts/formatters/tsconfig.composite.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.composite.base.json", 3 | "references": [ 4 | { "path": "../helpers/tsconfig.composite.json" } 5 | ], 6 | "include": [ 7 | "./**/*.ts" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /prettier.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/prettierrc", 3 | "semi": true, 4 | "tabWidth": 2, 5 | "useTabs": false, 6 | "printWidth": 160, 7 | "trailingComma": "all", 8 | "arrowParens": "avoid", 9 | "singleQuote": true 10 | } -------------------------------------------------------------------------------- /tests/setup.ts: -------------------------------------------------------------------------------- 1 | import '@testing-library/jest-dom/extend-expect' 2 | import enzyme from 'enzyme' 3 | /** 4 | * The official repository does not currently support React 17 5 | * https://github.com/enzymejs/enzyme/issues/2429 6 | */ 7 | 8 | enzyme.configure({}) 9 | -------------------------------------------------------------------------------- /tests/__mocks__/styled-jsx/css.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | resolve: () => ({ 3 | className: 'mock', 4 | style: null, 5 | }), 6 | css: { 7 | resolve: () => ({ 8 | className: 'mock', 9 | style: null, 10 | }), 11 | }, 12 | } 13 | -------------------------------------------------------------------------------- /src/components/scroll/index.ts: -------------------------------------------------------------------------------- 1 | export interface InnerScrollEvent { 2 | scrollTop: number; 3 | scrollHeight: number; 4 | clientHeight: number; 5 | } 6 | 7 | export { default as InnerScroll } from './inner-scroll'; 8 | export type { InnerScrollProps } from './inner-scroll'; 9 | -------------------------------------------------------------------------------- /src/components/use-charts/views/pane/iupdatable-pane-view.ts: -------------------------------------------------------------------------------- 1 | import { IPaneView } from './ipane-view'; 2 | 3 | export type UpdateType = 'data' | 'other' | 'options'; 4 | 5 | export interface IUpdatablePaneView extends IPaneView { 6 | update(updateType?: UpdateType): void; 7 | } 8 | -------------------------------------------------------------------------------- /typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "json": "api-types.json", 4 | "out": "./api-docs", 5 | "readme": "none", 6 | "name": "Typedoc project reference documentation", 7 | "entryPoints": [ 8 | "./src/components/index.ts", 9 | ] 10 | } -------------------------------------------------------------------------------- /src/components/quick-bar/index.ts: -------------------------------------------------------------------------------- 1 | import { default as QuickBar } from './quick-bar'; 2 | export { default as QuickAction } from './quick-action'; 3 | 4 | export type { QuickActionProps } from './share'; 5 | export type { QuickBarProps } from './quick-bar'; 6 | 7 | export default QuickBar; 8 | -------------------------------------------------------------------------------- /src/components/utils/use-constructor.ts: -------------------------------------------------------------------------------- 1 | import { useState } from 'react'; 2 | 3 | export const useConstructor = (callBack = () => {}) => { 4 | const [hasBeenCalled, setHasBeenCalled] = useState(false); 5 | if (hasBeenCalled) return; 6 | callBack(); 7 | setHasBeenCalled(true); 8 | }; 9 | -------------------------------------------------------------------------------- /src/.eslintignore: -------------------------------------------------------------------------------- 1 | .now/* 2 | .next/* 3 | examples/* 4 | dist/* 5 | esm/* 6 | public/* 7 | scripts/* 8 | tests/* 9 | __tests__/* 10 | *.config.js 11 | __tests__ 12 | *.spec.ts 13 | *.test.ts 14 | *.spec.tsx 15 | *.test.ts 16 | **/*.spec.ts 17 | **/*.test.ts 18 | **/*.spec.tsx 19 | **/*.test.ts -------------------------------------------------------------------------------- /src/components/use-charts/helpers/logger.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | export function warn(msg: string): void { 4 | if (process.env.NODE_ENV === 'development') { 5 | // eslint-disable-next-line no-console 6 | console.warn(msg); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/components/toggle-list/shared.ts: -------------------------------------------------------------------------------- 1 | export interface ToggleEventTarget { 2 | checked: boolean; 3 | } 4 | 5 | export interface ToggleListEvent { 6 | target: ToggleEventTarget; 7 | stopPropagation: () => void; 8 | preventDefault: () => void; 9 | nativeEvent: React.ChangeEvent; 10 | } 11 | -------------------------------------------------------------------------------- /src/components/use-charts/gui/ipane-view-getter.ts: -------------------------------------------------------------------------------- 1 | import { IDataSource } from '../model/idata-source'; 2 | import { Pane } from '../model/pane'; 3 | import { IPaneView } from '../views/pane/ipane-view'; 4 | 5 | export type IPaneViewsGetter = (source: IDataSource, pane: Pane) => readonly IPaneView[]; 6 | -------------------------------------------------------------------------------- /src/components/use-keyboard/index.ts: -------------------------------------------------------------------------------- 1 | import useKeyboard from './use-keyboard'; 2 | import { KeyMod, KeyCode } from './codes'; 3 | 4 | export { KeyMod, KeyCode }; 5 | export type { UseKeyboardHandler, KeyboardOptions, KeyboardResult, UseKeyboard } from './use-keyboard'; 6 | export default useKeyboard; 7 | -------------------------------------------------------------------------------- /src/components/use-mobile-menu/index.ts: -------------------------------------------------------------------------------- 1 | import { useMobileMenu } from './mobile-menu-context'; 2 | export { default as MobileMenuProvider } from './mobile-menu-provider'; 3 | 4 | export interface MobileMenuProviderProps { 5 | contentAnimationTime?: number; 6 | } 7 | 8 | export default useMobileMenu; 9 | -------------------------------------------------------------------------------- /src/lib/use-dom-clean.ts: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react'; 2 | 3 | const useDomClean = (): void => { 4 | useEffect(() => { 5 | document.documentElement.removeAttribute('style'); 6 | document.body.removeAttribute('style'); 7 | }, []); 8 | }; 9 | 10 | export default useDomClean; 11 | -------------------------------------------------------------------------------- /src/lib/components/attributes/index.ts: -------------------------------------------------------------------------------- 1 | import Attributes from './attributes'; 2 | import AttributesTitle from './attributes-title'; 3 | import AttributesTable from './attributes-table'; 4 | 5 | Attributes.Title = AttributesTitle; 6 | Attributes.Table = AttributesTable; 7 | 8 | export default Attributes; 9 | -------------------------------------------------------------------------------- /src/typings/styled.d.ts: -------------------------------------------------------------------------------- 1 | // Definitions by: @types/styled-jsx 2 | 3 | import 'react' 4 | 5 | declare module 'react' { 6 | interface StyleHTMLAttributes extends HTMLAttributes { 7 | jsx?: boolean 8 | global?: boolean 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - 13.9.0 5 | 6 | cache: 7 | directories: 8 | - "node_modules" 9 | 10 | notifications: 11 | email: 12 | on_success: never 13 | 14 | branches: 15 | only: 16 | - master 17 | 18 | install: 19 | - yarn 20 | 21 | script: 22 | - npm run build 23 | -------------------------------------------------------------------------------- /scripts/side-effects.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs-extra') 3 | 4 | ;(async () => { 5 | const pkgPath = path.join(__dirname, '../package.json') 6 | const json = await fs.readJson(pkgPath) 7 | json.sideEffects = false 8 | await fs.writeJson(pkgPath, json, { spaces: 2 }) 9 | })() 10 | -------------------------------------------------------------------------------- /src/components/header/controls/left-control.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import { PropsWithChildren } from 'react'; 3 | 4 | const LeftHeaderControl: React.FC = ({ children }) => { 5 | return children; 6 | }; 7 | 8 | LeftHeaderControl.displayName = 'HimalyaLeftHeader'; 9 | export default LeftHeaderControl; 10 | -------------------------------------------------------------------------------- /src/lib/get-attribute-data.ts: -------------------------------------------------------------------------------- 1 | import typesData from '../docs/types.json'; 2 | import { ProjectAttributeGroup, ProjectParams } from './doc-types'; 3 | 4 | export const getAttributeTableData = (key: string): ProjectAttributeGroup[] | undefined => { 5 | const project = typesData as ProjectParams; 6 | return project[key]; 7 | }; 8 | -------------------------------------------------------------------------------- /src/components/header/controls/right-control.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import { PropsWithChildren } from 'react'; 3 | 4 | const RightHeaderControl: React.FC = ({ children }) => { 5 | return children; 6 | }; 7 | 8 | RightHeaderControl.displayName = 'HimalyaRightHeader'; 9 | export default RightHeaderControl; 10 | -------------------------------------------------------------------------------- /src/lib/doc-types.ts: -------------------------------------------------------------------------------- 1 | export type ProjectAttribute = { 2 | name: string; 3 | optional: boolean; 4 | types: string[]; 5 | }; 6 | export type ProjectAttributeGroup = { 7 | name: string; 8 | attributes: ProjectAttribute[]; 9 | }; 10 | export type ProjectParams = { 11 | [key: string]: ProjectAttributeGroup[]; 12 | }; 13 | -------------------------------------------------------------------------------- /src/components/header/controls/center-control.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import { PropsWithChildren } from 'react'; 3 | 4 | const CenterHeaderControl: React.FC = ({ children }) => { 5 | return children; 6 | }; 7 | 8 | CenterHeaderControl.displayName = 'HimalyaCenterHeader'; 9 | export default CenterHeaderControl; 10 | -------------------------------------------------------------------------------- /src/components/user/index.ts: -------------------------------------------------------------------------------- 1 | import User from './user'; 2 | import UserLink from './user-link'; 3 | 4 | export type UserComponentType = typeof User & { 5 | Link: typeof UserLink; 6 | }; 7 | (User as UserComponentType).Link = UserLink; 8 | 9 | export type { UserProps } from './user'; 10 | export default User as UserComponentType; 11 | -------------------------------------------------------------------------------- /src/components/use-charts/model/point.ts: -------------------------------------------------------------------------------- 1 | import { Coordinate } from './coordinate'; 2 | 3 | /** 4 | * Represents a point on the chart. 5 | */ 6 | export interface Point { 7 | /** 8 | * The x coordinate. 9 | */ 10 | readonly x: Coordinate; 11 | /** 12 | * The y coordinate. 13 | */ 14 | readonly y: Coordinate; 15 | } 16 | -------------------------------------------------------------------------------- /src/components/use-charts/api/tsconfig.composite.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.composite.base.json", 3 | "references": [ 4 | { "path": "../formatters/tsconfig.composite.json" }, 5 | { "path": "../gui/tsconfig.composite.json" }, 6 | { "path": "../tsconfig.model.json" } 7 | ], 8 | "include": [ 9 | "./**/*.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /src/components/use-charts/model/default-price-scale.ts: -------------------------------------------------------------------------------- 1 | export const enum DefaultPriceScaleId { 2 | Left = 'left', 3 | Right = 'right', 4 | } 5 | 6 | export function isDefaultPriceScale(priceScaleId: string): priceScaleId is DefaultPriceScaleId { 7 | return priceScaleId === DefaultPriceScaleId.Left || priceScaleId === DefaultPriceScaleId.Right; 8 | } 9 | -------------------------------------------------------------------------------- /src/components/carousel/utils/index.ts: -------------------------------------------------------------------------------- 1 | export { classNames } from './classNames/classNames'; 2 | export { isEqualDeep } from './isEqualDeep/isEqualDeep'; 3 | export { isEqualShallow } from './isEqualShallow/isEqualShallow'; 4 | export { isObject } from './isObject/isObject'; 5 | export { merge } from './merge/merge'; 6 | export { forOwn } from './forOwn/forOwn'; 7 | -------------------------------------------------------------------------------- /src/components/use-charts/gui/iaxis-view-getters.ts: -------------------------------------------------------------------------------- 1 | import { IDataSource } from '../model/idata-source'; 2 | import { IAxisView } from '../views/pane/iaxis-view'; 3 | 4 | type IAxisViewsGetter = (source: IDataSource) => readonly IAxisView[]; 5 | 6 | export type IPriceAxisViewsGetter = IAxisViewsGetter; 7 | export type ITimeAxisViewsGetter = IAxisViewsGetter; 8 | -------------------------------------------------------------------------------- /src/components/use-charts/renderers/iaxis-view-renderer.ts: -------------------------------------------------------------------------------- 1 | import { CanvasRenderingTarget2D } from 'fancy-canvas'; 2 | 3 | export interface IAxisRenderer { 4 | draw(target: CanvasRenderingTarget2D, isHovered: boolean, hitTestData?: unknown): void; 5 | drawBackground?(target: CanvasRenderingTarget2D, isHovered: boolean, hitTestData?: unknown): void; 6 | } 7 | -------------------------------------------------------------------------------- /src/components/utils/use-previous.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useRef } from 'react'; 2 | 3 | const usePrevious = (state: T): T | undefined | null => { 4 | const ref = useRef(null); 5 | 6 | useEffect(() => { 7 | ref.current = state; 8 | }); 9 | 10 | return ref ? ref.current : null; 11 | }; 12 | 13 | export default usePrevious; 14 | -------------------------------------------------------------------------------- /src/components/page-layout/index.ts: -------------------------------------------------------------------------------- 1 | import { default as PageLayout } from './page-layout'; 2 | export type { PageLayoutProps, PageLayoutProviderProps, PageLayoutProviderContextProps } from './shared'; 3 | 4 | export { usePageLayout } from './page-layout-context'; 5 | export { default as PageLayoutProvider } from './page-layout-provider'; 6 | 7 | export default PageLayout; 8 | -------------------------------------------------------------------------------- /src/components/modal/modal-context.ts: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | 4 | export interface ModalConfig { 5 | close?: () => void; 6 | } 7 | 8 | const defaultContext = {}; 9 | export const ModalContext = React.createContext(defaultContext); 10 | export const useModalContext = (): ModalConfig => React.useContext(ModalContext); 11 | -------------------------------------------------------------------------------- /src/components/toggle-list/index.ts: -------------------------------------------------------------------------------- 1 | import ToggleList from './toggle-list'; 2 | import ToggleItem from './toggle-list-item'; 3 | 4 | export * from './shared'; 5 | export type ToggleComponentType = typeof ToggleList & { 6 | Item: typeof ToggleItem; 7 | }; 8 | (ToggleList as ToggleComponentType).Item = ToggleItem; 9 | export default ToggleList as ToggleComponentType; 10 | -------------------------------------------------------------------------------- /src/components/carousel/utils/classNames/classNames.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Combines valid class names. 3 | * 4 | * @param classes - An array with classes. 5 | * 6 | * @return A concatenated string with provided class names. 7 | */ 8 | export function classNames(...classes: Array): string { 9 | return classes.filter(Boolean).join(' '); 10 | } 11 | -------------------------------------------------------------------------------- /src/components/use-charts/formatters/iprice-formatter.ts: -------------------------------------------------------------------------------- 1 | /** Interface to be implemented by the object in order to be used as a price formatter */ 2 | export interface IPriceFormatter { 3 | /** 4 | * Formatting function 5 | * 6 | * @param price - Original price to be formatted 7 | * @returns Formatted price 8 | */ 9 | format(price: number): string; 10 | } 11 | -------------------------------------------------------------------------------- /src/components/use-charts/formatters/percentage-formatter.ts: -------------------------------------------------------------------------------- 1 | import { PriceFormatter } from './price-formatter'; 2 | 3 | export class PercentageFormatter extends PriceFormatter { 4 | public constructor(priceScale: number = 100) { 5 | super(priceScale); 6 | } 7 | 8 | public override format(price: number): string { 9 | return `${super.format(price)}%`; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/components/carousel/utils/isObject/isObject.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Checks if the given subject is an object or not. 3 | * 4 | * @param subject - A subject to check. 5 | * 6 | * @return `true` if the subject is an object, or otherwise `false`. 7 | */ 8 | export function isObject(subject: unknown): subject is object { 9 | return subject !== null && typeof subject === 'object'; 10 | } 11 | -------------------------------------------------------------------------------- /src/components/running-text/index.ts: -------------------------------------------------------------------------------- 1 | import RunningText from './running-text'; 2 | export interface NativeRunningTextProps { 3 | animationTime?: number; 4 | gap?: number; 5 | } 6 | 7 | type NativeAttrs = Omit, keyof NativeRunningTextProps>; 8 | export type RunningTextProps = NativeRunningTextProps & NativeAttrs; 9 | 10 | export default RunningText; 11 | -------------------------------------------------------------------------------- /src/components/use-charts/model/sort-sources.ts: -------------------------------------------------------------------------------- 1 | import { ensureNotNull } from '../helpers/assertions'; 2 | 3 | import { ZOrdered } from './idata-source'; 4 | 5 | export function sortSources(sources: readonly T[]): T[] { 6 | return sources.slice().sort((s1: ZOrdered, s2: ZOrdered) => { 7 | return ensureNotNull(s1.zorder()) - ensureNotNull(s2.zorder()); 8 | }); 9 | } 10 | -------------------------------------------------------------------------------- /src/components/carousel/carousel-item.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import React from 'react'; 4 | import { classNames } from './utils'; 5 | 6 | export const CarouselItem: React.FC = ({ children, className, ...props }) => { 7 | return ( 8 |
  • 9 | {children} 10 |
  • 11 | ); 12 | }; 13 | -------------------------------------------------------------------------------- /src/app/components/toast/toast.mdx: -------------------------------------------------------------------------------- 1 | import { Attributes } from 'lib/components' 2 | 3 | export const meta = { 4 | title: 'Toast', 5 | group: 'Feedback', 6 | } 7 | 8 | # Toast 9 | 10 | The Toast component only supports Hooks calls, please see the [useToast](/hooks/use-toast 'Toast Hooks') documentation for details. 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/components/use-charts/model/price-formatter-fn.ts: -------------------------------------------------------------------------------- 1 | import { BarPrice } from './bar'; 2 | 3 | /** 4 | * A function used to format a {@link BarPrice} as a string. 5 | */ 6 | export type PriceFormatterFn = (priceValue: BarPrice) => string; 7 | 8 | /** 9 | * A function used to format a percentage value as a string. 10 | */ 11 | export type PercentageFormatterFn = (percentageValue: number) => string; 12 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "compilerOptions": { 4 | "target": "ES2022", 5 | "module": "Node16", 6 | "lib": [ 7 | "ESNext", 8 | "DOM" 9 | ], 10 | }, 11 | "include": [ 12 | "scripts/attributes/generate.ts", 13 | ], 14 | "ts-node": { 15 | "esm": true, 16 | "experimentalSpecifierResolution": "node", 17 | } 18 | } -------------------------------------------------------------------------------- /src/components/tabs/index.ts: -------------------------------------------------------------------------------- 1 | import Tabs from './tabs'; 2 | import TabsItem from './tabs-item'; 3 | 4 | export type TabsComponentType = typeof Tabs & { 5 | Item: typeof TabsItem; 6 | Tab: typeof TabsItem; 7 | }; 8 | (Tabs as TabsComponentType).Item = TabsItem; 9 | (Tabs as TabsComponentType).Tab = TabsItem; 10 | 11 | export type { TabsProps } from './tabs'; 12 | export default Tabs as TabsComponentType; 13 | -------------------------------------------------------------------------------- /src/components/button/__tests__/__snapshots__/index.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Button should render empty button correctly 1`] = ``; 4 | 5 | exports[`Button should render special styles 1`] = `ReactWrapper {}`; 6 | 7 | exports[`Button should render special styles 2`] = ` 8 | 11 | button 12 | 13 | `; 14 | -------------------------------------------------------------------------------- /src/components/image/helpers.ts: -------------------------------------------------------------------------------- 1 | export const transformDataSource = (src: string) => { 2 | const left = `${src}`.slice(0, 4); 3 | if (encodeURIComponent(left) === '%3Csvg') { 4 | return `data:image/svg+xml;utf8,${src}`; 5 | } 6 | return src; 7 | }; 8 | 9 | export const getHostFromUrl = (url: string) => { 10 | try { 11 | return new URL(url).host; 12 | } catch (e) { 13 | return url; 14 | } 15 | }; 16 | -------------------------------------------------------------------------------- /src/components/table/index.ts: -------------------------------------------------------------------------------- 1 | import Table from './table'; 2 | 3 | export type { TableProps } from './table'; 4 | export type { TableColumnProps } from './table-column'; 5 | export type { 6 | TableOnCellClick, 7 | TableAbstractColumn, 8 | TableOnChange, 9 | TableOnRowClick, 10 | TableRowClassNameHandler, 11 | TableDataItemBase, 12 | TableColumnRender, 13 | } from './table-types'; 14 | export default Table; 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/3-docs.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 'About `docs` 🛠️' 3 | about: 'Issues and feature requests for docs' 4 | --- 5 | 6 | 7 | 8 | 9 | # About `docs` 10 | 11 | This is a document site related issue. 12 | 13 | ### Languages 14 | 15 | - [x] English 16 | - [ ] Chinese 17 | 18 | ### Description 19 | 20 | ### Page Links (Optional) 21 | -------------------------------------------------------------------------------- /src/components/use-charts/helpers/isubscription.ts: -------------------------------------------------------------------------------- 1 | export type Callback = (param1: T1, param2: T2, param3: T3) => void; 2 | 3 | export interface ISubscription { 4 | subscribe(callback: Callback, linkedObject?: unknown, singleshot?: boolean): void; 5 | unsubscribe(callback: Callback): void; 6 | unsubscribeAll(linkedObject: unknown): void; 7 | } 8 | -------------------------------------------------------------------------------- /src/components/avatar/index.ts: -------------------------------------------------------------------------------- 1 | import Avatar from './avatar'; 2 | import AvatarGroup from './avatar-group'; 3 | 4 | export type AvatarComponentType = typeof Avatar & { 5 | Group: typeof AvatarGroup; 6 | }; 7 | (Avatar as AvatarComponentType).Group = AvatarGroup; 8 | 9 | export type { AvatarProps } from './avatar'; 10 | export type { AvatarGroupProps } from './avatar-group'; 11 | 12 | export default Avatar as AvatarComponentType; 13 | -------------------------------------------------------------------------------- /src/components/utils/use-click-anywhere.ts: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react'; 2 | 3 | const useClickAnyWhere = (handler: (event: Event) => void) => { 4 | useEffect(() => { 5 | const callback = (event: Event) => handler(event); 6 | 7 | document.addEventListener('click', callback); 8 | return () => document.removeEventListener('click', callback); 9 | }, [handler]); 10 | }; 11 | 12 | export default useClickAnyWhere; 13 | -------------------------------------------------------------------------------- /src/components/badge/index.ts: -------------------------------------------------------------------------------- 1 | import Badge from './badge'; 2 | import BadgeAnchor from './badge-anchor'; 3 | 4 | export type BadgeComponentType = typeof Badge & { 5 | Anchor: typeof BadgeAnchor; 6 | }; 7 | (Badge as BadgeComponentType).Anchor = BadgeAnchor; 8 | 9 | export type { BadgeProps } from './badge'; 10 | export type { BadgeAnchorProps, BadgeAnchorPlacement } from './badge-anchor'; 11 | export default Badge as BadgeComponentType; 12 | -------------------------------------------------------------------------------- /src/components/image/index.ts: -------------------------------------------------------------------------------- 1 | import Image from './image'; 2 | import ImageBrowser from './image-browser'; 3 | 4 | export type ImageComponentType = typeof Image & { 5 | Browser: typeof ImageBrowser; 6 | }; 7 | (Image as ImageComponentType).Browser = ImageBrowser; 8 | 9 | export type { ImageProps } from './image'; 10 | export type { ImageBrowserProps, ImageAnchorProps } from './image-browser'; 11 | export default Image as ImageComponentType; 12 | -------------------------------------------------------------------------------- /.release-it.json: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "commit": true, 4 | "commitMessage": "chore: release v${version}", 5 | "tag": true, 6 | "tagName": "v${version}", 7 | "push": true 8 | }, 9 | "npm": { 10 | "publish": false 11 | }, 12 | "plugins": { 13 | "@release-it/conventional-changelog": { 14 | "preset": "angular", 15 | "infile": "CHANGELOG.md" 16 | } 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /src/components/select/index.ts: -------------------------------------------------------------------------------- 1 | import Select from './select'; 2 | import SelectOption from './select-option'; 3 | 4 | export type SelectComponentType = typeof Select & { 5 | Option: typeof SelectOption; 6 | }; 7 | (Select as SelectComponentType).Option = SelectOption; 8 | 9 | export type { SelectProps, SelectRef } from './select'; 10 | export type { SelectOptionProps } from './select-option'; 11 | export default Select as SelectComponentType; 12 | -------------------------------------------------------------------------------- /src/components/use-charts/api/options/layout-options-defaults.ts: -------------------------------------------------------------------------------- 1 | import { defaultFontFamily } from '../../helpers/make-font'; 2 | 3 | import { ColorType, LayoutOptions } from '../../model/layout-options'; 4 | 5 | export const layoutOptionsDefaults: LayoutOptions = { 6 | background: { 7 | type: ColorType.Solid, 8 | color: '#FFFFFF', 9 | }, 10 | textColor: '#191919', 11 | fontSize: 12, 12 | fontFamily: defaultFontFamily, 13 | }; 14 | -------------------------------------------------------------------------------- /src/typings/mdx.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.mdx' { 2 | let MDXComponent: (props: any) => JSX.Element 3 | export default MDXComponent 4 | } 5 | 6 | declare module "@mdx-js/react" { 7 | import { ComponentType, StyleHTMLAttributes } from "react" 8 | 9 | type MDXProps = { 10 | children: React.ReactNode 11 | components: { [key:? string]: React.ReactNode, } 12 | } 13 | export class MDXProvider extends React.Component {} 14 | } 15 | -------------------------------------------------------------------------------- /src/components/use-charts/api/options/grid-options-defaults.ts: -------------------------------------------------------------------------------- 1 | import { GridOptions } from '../../model/grid'; 2 | import { LineStyle } from '../../renderers/draw-line'; 3 | 4 | export const gridOptionsDefaults: GridOptions = { 5 | vertLines: { 6 | color: '#D6DCDE', 7 | style: LineStyle.Solid, 8 | visible: true, 9 | }, 10 | horzLines: { 11 | color: '#D6DCDE', 12 | style: LineStyle.Solid, 13 | visible: true, 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /src/components/utils/use-resize.ts: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react'; 2 | 3 | const useResize = (callback: () => unknown, immediatelyInvoke: boolean = true): void => { 4 | useEffect(() => { 5 | const fn = () => callback(); 6 | if (immediatelyInvoke) { 7 | fn(); 8 | } 9 | window.addEventListener('resize', fn); 10 | return () => window.removeEventListener('resize', fn); 11 | }, []); 12 | }; 13 | 14 | export default useResize; 15 | -------------------------------------------------------------------------------- /src/components/collapse/index.ts: -------------------------------------------------------------------------------- 1 | import Collapse from './collapse'; 2 | import CollapseGroup from './collapse-group'; 3 | 4 | export type CollapseComponentType = typeof Collapse & { 5 | Group: typeof CollapseGroup; 6 | }; 7 | (Collapse as CollapseComponentType).Group = CollapseGroup; 8 | 9 | export type { CollapseProps } from './collapse'; 10 | export type { CollapseGroupProps } from './collapse-group'; 11 | export default Collapse as CollapseComponentType; 12 | -------------------------------------------------------------------------------- /src/components/shared/__tests__/__snapshots__/ellipsis.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Ellipsis should render correctly 1`] = ` 4 | "
    text
    " 13 | `; 14 | -------------------------------------------------------------------------------- /src/components/use-config/index.ts: -------------------------------------------------------------------------------- 1 | export { useConfig, defaultToastLayout } from './config-context'; 2 | import { useConfig } from './config-context'; 3 | export type { UpdateToastsFunction, UpdateToastsLayoutFunction, UpdateToastsIDFunction } from './config-context'; 4 | 5 | export type { LayoutProps, BreakpointsItem, UIThemesBreakpoints, LayoutPropsContext, ConfigProps } from './shared'; 6 | export { defaultBreakpoints } from './shared'; 7 | 8 | export default useConfig; 9 | -------------------------------------------------------------------------------- /src/lib/components/mdx-widgets/index.ts: -------------------------------------------------------------------------------- 1 | export { default as HybridLink } from './hybrid-link'; 2 | export { default as HybridCode } from './hybrid-code'; 3 | export { default as MockPage } from './mock-page'; 4 | export { default as Colors } from './colors'; 5 | export { default as HomeCell } from './home-cell'; 6 | export { default as IconsGallery } from './icons-gallery'; 7 | export { default as GridDemo } from './grid-demo'; 8 | export * as ParsedCodes from './parsed-codes'; 9 | -------------------------------------------------------------------------------- /src/components/tree/index.ts: -------------------------------------------------------------------------------- 1 | import Tree from './tree'; 2 | import TreeFile from './tree-file'; 3 | import TreeFolder from './tree-folder'; 4 | 5 | export type TreeComponentType = typeof Tree & { 6 | File: typeof TreeFile; 7 | Folder: typeof TreeFolder; 8 | }; 9 | (Tree as TreeComponentType).File = TreeFile; 10 | (Tree as TreeComponentType).Folder = TreeFolder; 11 | 12 | export type { TreeProps, TreeFile } from './tree'; 13 | export default Tree as TreeComponentType; 14 | -------------------------------------------------------------------------------- /src/components/use-charts/api/options/watermark-options-defaults.ts: -------------------------------------------------------------------------------- 1 | import { defaultFontFamily } from '../../helpers/make-font'; 2 | 3 | import { WatermarkOptions } from '../../model/watermark'; 4 | 5 | export const watermarkOptionsDefaults: WatermarkOptions = { 6 | color: 'rgba(0, 0, 0, 0)', 7 | visible: false, 8 | fontSize: 48, 9 | fontFamily: defaultFontFamily, 10 | fontStyle: '', 11 | text: '', 12 | horzAlign: 'center', 13 | vertAlign: 'center', 14 | }; 15 | -------------------------------------------------------------------------------- /src/components/use-charts/helpers/idestroyable.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * IDESTRØYÅBLE 3 | * ┌────────────────┐ 4 | * │ ┏━━━━━┓ │ 5 | * │ ┃ ○ ○ ┃ │ ┏━━━━━┓ ┌╲╌╌╱╌┐ 6 | * │ ┃ ○ ○ ┃ x 1 │ ┃ ○ ○ ┃ destroy() ┊ ╲╱ ╵ 7 | * │ ┠─────┨ │ ┃ ○ ○ ┃ ╭───╯╲ ╷ ╱╲ ┊ 8 | * │ ┗━━━━━┛ │ ┠─────┨ ╰───╮╱ ├╱ ╌╲ ┤ 9 | * │ destroy() x 1 │ ┗━━━━━┛ └ ╌╌ ╌┘ 10 | * └────────────────┘ 11 | */ 12 | export interface IDestroyable { 13 | destroy(): void; 14 | } 15 | -------------------------------------------------------------------------------- /src/components/use-charts/api/options/price-line-options-defaults.ts: -------------------------------------------------------------------------------- 1 | import { PriceLineOptions } from '../../model/price-line-options'; 2 | import { LineStyle } from '../../renderers/draw-line'; 3 | 4 | export const priceLineOptionsDefaults: PriceLineOptions = { 5 | color: '#FF0000', 6 | price: 0, 7 | lineStyle: LineStyle.Dashed, 8 | lineWidth: 1, 9 | lineVisible: true, 10 | axisLabelVisible: true, 11 | title: '', 12 | axisLabelColor: '', 13 | axisLabelTextColor: '', 14 | }; 15 | -------------------------------------------------------------------------------- /src/components/checkbox/index.ts: -------------------------------------------------------------------------------- 1 | import Checkbox from './checkbox'; 2 | import CheckboxGroup from './checkbox-group'; 3 | 4 | export type CheckboxComponentType = typeof Checkbox & { 5 | Group: typeof CheckboxGroup; 6 | }; 7 | (Checkbox as CheckboxComponentType).Group = CheckboxGroup; 8 | 9 | export type { CheckboxProps, CheckboxEvent, CheckboxEventTarget } from './checkbox'; 10 | export type { CheckboxGroupProps } from './checkbox-group'; 11 | export default Checkbox as CheckboxComponentType; 12 | -------------------------------------------------------------------------------- /src/components/use-charts/api/candlestick-series-api.ts: -------------------------------------------------------------------------------- 1 | import { CandlestickSeriesPartialOptions, fillUpDownCandlesticksColors } from '../model/series-options'; 2 | 3 | import { SeriesApi } from './series-api'; 4 | 5 | export class CandlestickSeriesApi extends SeriesApi<'Candlestick', HorzScaleItem> { 6 | public override applyOptions(options: CandlestickSeriesPartialOptions): void { 7 | fillUpDownCandlesticksColors(options); 8 | super.applyOptions(options); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/components/carousel/utils/isEqualShallow/isEqualShallow.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Checks if provided two arrays are shallowly equal or not. 3 | * 4 | * @param array1 - An array to test. 5 | * @param array2 - Another array to test. 6 | * 7 | * @return `true` if they are considered as equal, or otherwise `false`. 8 | */ 9 | export function isEqualShallow(array1: unknown[], array2: unknown[]): boolean { 10 | return array1.length === array2.length && !array1.some((elm, index) => elm !== array2[index]); 11 | } 12 | -------------------------------------------------------------------------------- /src/components/quick-bar/share.ts: -------------------------------------------------------------------------------- 1 | import { UIColorTypes } from '../themes/presets'; 2 | import { ScaleResponsiveParameter } from '../use-scale'; 3 | 4 | export interface ActionProps { 5 | tooltip?: string | React.ReactNode; 6 | active?: boolean; 7 | type?: UIColorTypes; 8 | space?: ScaleResponsiveParameter; 9 | } 10 | 11 | type ActionPropsNative = Omit, keyof ActionProps>; 12 | export type QuickActionProps = ActionProps & ActionPropsNative; 13 | -------------------------------------------------------------------------------- /src/components/search/index.ts: -------------------------------------------------------------------------------- 1 | import Search from './search'; 2 | 3 | export type { SearchIconProps } from './search-icon'; 4 | export type { SearchItemProps } from './search-item'; 5 | export type { SearchItemsProps } from './search-items'; 6 | export type { SearchResult, SearchResultGroup, SearchResults, SearchFunction, SearchProps } from './utils'; 7 | 8 | export { useSearch } from '../use-search/search-context'; 9 | 10 | export { default as SearchButton } from './search-button'; 11 | export default Search; 12 | -------------------------------------------------------------------------------- /src/components/shared/__tests__/ellipsis.test.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { mount } from 'enzyme'; 3 | import Ellipsis from '../ellipsis'; 4 | 5 | describe('Ellipsis', () => { 6 | it('should render correctly', () => { 7 | const wrapper = mount( 8 |
    9 | text 10 |
    , 11 | ); 12 | expect(wrapper.html()).toMatchSnapshot(); 13 | expect(() => wrapper.unmount()).not.toThrow(); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /src/components/tree/__tests__/__snapshots__/index.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Tree should mount correctly 1`] = ` 4 | 10 | `; 11 | 12 | exports[`Tree should mount correctly 2`] = ` 13 | 19 | `; 20 | 21 | exports[`Tree should mount correctly 3`] = `ReactWrapper {}`; 22 | -------------------------------------------------------------------------------- /src/components/tree/tree-context.ts: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | 4 | export interface TreeConfig { 5 | onFileClick?: (path: string) => void; 6 | initialExpand: boolean; 7 | isImperative: boolean; 8 | } 9 | 10 | const defaultContext = { 11 | initialExpand: false, 12 | isImperative: false, 13 | }; 14 | 15 | export const TreeContext = React.createContext(defaultContext); 16 | 17 | export const useTreeContext = (): TreeConfig => React.useContext(TreeContext); 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/2-feature-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 'Feature request 🚀' 3 | about: 'I have a suggestion!' 4 | --- 5 | 6 | 7 | 8 | 9 | # Feature request 🚀 10 | 11 | - [ ] I will create Pull Request 12 | - [x] It's just a suggestion 13 | 14 | ### Expected 15 | 16 | - Component or something else 17 | 18 | ### Examples 19 | 20 | ```jsx 21 | 22 | ``` 23 | 24 | ### Programme (Optional) 25 | 26 | ### Others (Optional) 27 | -------------------------------------------------------------------------------- /src/components/button/styles.ts: -------------------------------------------------------------------------------- 1 | export interface ButtonCursorGroup { 2 | cursor: string; 3 | events: string; 4 | } 5 | 6 | export const getButtonCursor = (disabled: boolean, loading: boolean): ButtonCursorGroup => { 7 | if (disabled) 8 | return { 9 | cursor: 'not-allowed', 10 | events: 'auto', 11 | }; 12 | if (loading) 13 | return { 14 | cursor: 'default', 15 | events: 'none', 16 | }; 17 | 18 | return { 19 | cursor: 'pointer', 20 | events: 'auto', 21 | }; 22 | }; 23 | -------------------------------------------------------------------------------- /src/components/use-charts/formatters/date-formatter.ts: -------------------------------------------------------------------------------- 1 | import { formatDate } from './format-date'; 2 | 3 | export class DateFormatter { 4 | private readonly _locale: string; 5 | private readonly _dateFormat: string; 6 | 7 | public constructor(dateFormat: string = 'yyyy-MM-dd', locale: string = 'default') { 8 | this._dateFormat = dateFormat; 9 | this._locale = locale; 10 | } 11 | 12 | public format(date: Date): string { 13 | return formatDate(date, this._dateFormat, this._locale); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/components/use-search/search-context.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | 4 | export interface SearchContextProps { 5 | isEnabled: boolean; 6 | setIsEnabled: (value: boolean) => void; 7 | } 8 | 9 | export const defaultConfigs: SearchContextProps = { 10 | setIsEnabled: () => {}, 11 | isEnabled: false, 12 | }; 13 | 14 | export const SearchContext = React.createContext(defaultConfigs); 15 | export const useSearch = (): SearchContextProps => React.useContext(SearchContext); 16 | -------------------------------------------------------------------------------- /src/components/utils/use-ssr.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from 'react'; 2 | import { isBrowser } from './collections'; 3 | 4 | export type SSRState = { 5 | isBrowser: boolean; 6 | isServer: boolean; 7 | }; 8 | 9 | const useSSR = (): SSRState => { 10 | const [browser, setBrowser] = useState(false); 11 | useEffect(() => { 12 | setBrowser(isBrowser()); 13 | }, []); 14 | 15 | return { 16 | isBrowser: browser, 17 | isServer: !browser, 18 | }; 19 | }; 20 | 21 | export default useSSR; 22 | -------------------------------------------------------------------------------- /src/lib/components/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Playground } from './playground'; 2 | export { default as PlaygroundTitle } from './playground/title'; 3 | export { default as Attributes } from './attributes'; 4 | export { default as Facts } from './facts'; 5 | export { default as Portfolio } from './portfolio'; 6 | export { default as Services } from './services'; 7 | export { default as Partners } from './partners'; 8 | export { default as RunningSlogan } from './running-slogan'; 9 | 10 | export * from './mdx-widgets'; 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/1-bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 'Bug report 🐞' 3 | about: "If something isn't working as expected 🤔." 4 | --- 5 | 6 | 7 | 8 | 9 | # Bug report 🐞 10 | 11 | ## Version & Environment 12 | 13 | - Version of browser 14 | - Version of `@himalaya-ui/core` 15 | 16 | ## Expected Behaviour 17 | 18 | The behavior I expect is ... 19 | 20 | ## Actual results (or Errors) 21 | 22 | I got an error: 23 | 24 | ``` 25 | code 26 | ``` 27 | -------------------------------------------------------------------------------- /src/components/popover/popover-context.ts: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React, { useContext } from 'react'; 3 | 4 | export type PopoverConfig = { 5 | disableItemsAutoClose: boolean; 6 | onItemClick: (e: React.MouseEvent) => void; 7 | }; 8 | 9 | const defaultContext = { 10 | disableItemsAutoClose: false, 11 | onItemClick: () => {}, 12 | }; 13 | 14 | export const PopoverContext = React.createContext(defaultContext); 15 | export const usePopoverContext = () => useContext(PopoverContext); 16 | -------------------------------------------------------------------------------- /src/components/use-charts/helpers/events.ts: -------------------------------------------------------------------------------- 1 | import { isChrome } from './browsers'; 2 | import { MouseEventButton } from '../typings/common'; 3 | 4 | export function preventScrollByWheelClick(el: HTMLElement): void { 5 | if (!isChrome()) { 6 | return; 7 | } 8 | 9 | el.addEventListener('mousedown', (e: MouseEvent) => { 10 | if (e.button === MouseEventButton.Middle) { 11 | // prevent incorrect scrolling event 12 | e.preventDefault(); 13 | return false; 14 | } 15 | return undefined; 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /src/components/use-charts/renderers/ipane-renderer.ts: -------------------------------------------------------------------------------- 1 | import { CanvasRenderingTarget2D } from 'fancy-canvas'; 2 | 3 | import { HoveredObject } from '../model/chart-model'; 4 | import { Coordinate } from '../model/coordinate'; 5 | 6 | export interface IPaneRenderer { 7 | draw(target: CanvasRenderingTarget2D, isHovered: boolean, hitTestData?: unknown): void; 8 | drawBackground?(target: CanvasRenderingTarget2D, isHovered: boolean, hitTestData?: unknown): void; 9 | hitTest?(x: Coordinate, y: Coordinate): HoveredObject | null; 10 | } 11 | -------------------------------------------------------------------------------- /src/components/count-up/count-up.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import type { Props, ReturnProps } from './'; 3 | import { useCountUp } from './useCountUp'; 4 | 5 | export interface CountUpProps { 6 | children: (value: ReturnProps) => React.ReactNode | string; 7 | } 8 | 9 | export const CountUp: React.FC = ({ children, ...props }) => { 10 | const countUpProps = useCountUp(props); 11 | return typeof children === 'function' ? children(countUpProps) : countUpProps.value; 12 | }; 13 | 14 | CountUp.displayName = 'CountUp'; 15 | -------------------------------------------------------------------------------- /src/components/sidebar/types.ts: -------------------------------------------------------------------------------- 1 | import { default as SidebarComponent } from './sidebar'; 2 | import SidebarGroup from './sidebar-group'; 3 | import SidebarLink from './sidebar-link'; 4 | 5 | export type SidebarComponentType = typeof SidebarComponent & { 6 | Group: typeof SidebarGroup; 7 | Item: typeof SidebarLink; 8 | }; 9 | 10 | (SidebarComponent as SidebarComponentType).Group = SidebarGroup; 11 | (SidebarComponent as SidebarComponentType).Item = SidebarLink; 12 | 13 | export const Sidebar = SidebarComponent as SidebarComponentType; 14 | -------------------------------------------------------------------------------- /src/components/collapse/collapse-context.ts: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import React from 'react'; 4 | 5 | export interface CollapseConfig { 6 | values: Array; 7 | updateValues?: (currentIndex: number | string | undefined, nextState: boolean) => unknown; 8 | } 9 | 10 | const defaultContext = { 11 | values: [], 12 | }; 13 | 14 | export const CollapseContext = React.createContext(defaultContext); 15 | 16 | export const useCollapseContext = (): CollapseConfig => React.useContext(CollapseContext); 17 | -------------------------------------------------------------------------------- /src/components/radio/radio-context.ts: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | 4 | export interface RadioConfig { 5 | updateState?: (value: string | number) => void; 6 | disabledAll: boolean; 7 | value?: string | number; 8 | inGroup: boolean; 9 | } 10 | 11 | const defaultContext = { 12 | disabledAll: false, 13 | inGroup: false, 14 | }; 15 | 16 | export const RadioContext = React.createContext(defaultContext); 17 | 18 | export const useRadioContext = (): RadioConfig => React.useContext(RadioContext); 19 | -------------------------------------------------------------------------------- /src/components/utils/use-visibile.ts: -------------------------------------------------------------------------------- 1 | import { RefObject, useEffect, useState } from 'react'; 2 | 3 | export default function useVisible(ref: RefObject) { 4 | const [isIntersecting, setIntersecting] = useState(false); 5 | 6 | useEffect(() => { 7 | const observer = new IntersectionObserver(([entry]) => setIntersecting(entry.isIntersecting)); 8 | 9 | if (ref.current) { 10 | observer.observe(ref.current); 11 | } 12 | return () => observer.disconnect(); 13 | }, []); 14 | 15 | return isIntersecting; 16 | } 17 | -------------------------------------------------------------------------------- /src/components/use-charts/renderers/series-markers-text.ts: -------------------------------------------------------------------------------- 1 | import { Coordinate } from '../model/coordinate'; 2 | 3 | export function drawText(ctx: CanvasRenderingContext2D, text: string, x: number, y: number): void { 4 | ctx.fillText(text, x, y); 5 | } 6 | 7 | export function hitTestText(textX: number, textY: number, textWidth: number, textHeight: number, x: Coordinate, y: Coordinate): boolean { 8 | const halfHeight = textHeight / 2; 9 | 10 | return x >= textX && x <= textX + textWidth && y >= textY - halfHeight && y <= textY + halfHeight; 11 | } 12 | -------------------------------------------------------------------------------- /src/conversion.md: -------------------------------------------------------------------------------- 1 | conversion 2 | 3 | 4 | 5 | //step 1 6 | accents_0 => hex_900 7 | 8 | //step 2 9 | accents_1 => 8 10 | 11 | //step 2 12 | accents_2 => 7 13 | 14 | //step 4 15 | accents_3 => 6 16 | 17 | //step 5 -> issue 18 | accents_4 => 5 19 | 20 | //step 5 -> issue 21 | accents_5 => 4 22 | 23 | //step 5 -> issue 24 | accents_6 => 3 25 | 26 | //step 5 -> issue 27 | accents_7 => 2 28 | 29 | //step 5 -> issue 30 | accents_8 => 1 31 | 32 | // zum schluss 33 | lighter => 8 34 | light => 9 35 | 36 | value = 10 37 | dark = 11 38 | darker = 12 39 | -------------------------------------------------------------------------------- /src/typings/_global-types.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This type should be used when you need to save result of the setTimeout/setInterval functions. 3 | * It makes the compilation with non-composite project happy. 4 | */ 5 | type TimerId = ReturnType; 6 | 7 | /** 8 | * The type declares compile-time constants for mouse buttons. 9 | * e.button values for MouseEvents. 10 | * It's NOT e.buttons (with s)! 11 | */ 12 | declare const enum MouseEventButton { 13 | Left = 0, 14 | Middle = 1, 15 | Right = 2, 16 | Fourth = 3, 17 | Fifth = 4, 18 | } -------------------------------------------------------------------------------- /src/components/button-dropdown/index.ts: -------------------------------------------------------------------------------- 1 | import ButtonDropdown from './button-dropdown'; 2 | import ButtonDropdownItem from './button-dropdown-item'; 3 | 4 | type ButtonDropdownType = typeof ButtonDropdown & { 5 | Item: typeof ButtonDropdownItem; 6 | }; 7 | (ButtonDropdown as ButtonDropdownType).Item = ButtonDropdownItem; 8 | 9 | export type { ButtonDropdownProps, ButtonProps } from './button-dropdown'; 10 | export type { ButtonDropdownItemProps, ButtonDropdownItemTypes } from './button-dropdown-item'; 11 | export default ButtonDropdown as ButtonDropdownType; 12 | -------------------------------------------------------------------------------- /src/components/navigation/navigation-context.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import { ReactiveDomReact } from '../utils/layouts'; 3 | import React from 'react'; 4 | 5 | export interface NavigationConfig { 6 | rect?: ReactiveDomReact; 7 | onMouseOver: (e: ReactiveDomReact) => void; 8 | } 9 | 10 | export const defaultConfigs: NavigationConfig = { 11 | onMouseOver: () => {}, 12 | }; 13 | 14 | export const NavigationContext = React.createContext(defaultConfigs); 15 | export const useNavigation = (): NavigationConfig => React.useContext(NavigationContext); 16 | -------------------------------------------------------------------------------- /src/components/search/utils.ts: -------------------------------------------------------------------------------- 1 | export type SearchResult = { 2 | name?: string; 3 | symbol?: React.ReactNode; 4 | url: string; 5 | group: string; 6 | }; 7 | 8 | export type SearchResultGroup = { 9 | title: string; 10 | items: SearchResults; 11 | }; 12 | 13 | export type SearchResults = Array; 14 | export type SearchFunction = (keyword: string) => Promise; 15 | 16 | export type SearchProps = { 17 | searchFunction?: SearchFunction; 18 | visibile?: boolean; 19 | placeholder?: string; 20 | onClose?: () => void; 21 | }; 22 | -------------------------------------------------------------------------------- /src/components/toggle-list/toggle-list-provider.ts: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | 4 | export interface ToggleListConfig { 5 | updateState?: (value: string | number) => void; 6 | disabledAll: boolean; 7 | value?: string | number; 8 | } 9 | 10 | const defaultContext = { 11 | disabledAll: false, 12 | inGroup: false, 13 | }; 14 | 15 | export const ToggleListContext = React.createContext(defaultContext); 16 | export const useToggleListContext = (): ToggleListConfig => React.useContext(ToggleListContext); 17 | -------------------------------------------------------------------------------- /src/components/use-charts/api/options/price-scale-options-defaults.ts: -------------------------------------------------------------------------------- 1 | import { PriceScaleMode, PriceScaleOptions } from '../../model/price-scale'; 2 | 3 | export const priceScaleOptionsDefaults: PriceScaleOptions = { 4 | autoScale: true, 5 | mode: PriceScaleMode.Normal, 6 | invertScale: false, 7 | alignLabels: true, 8 | borderVisible: true, 9 | borderColor: '#2B2B43', 10 | entireTextOnly: false, 11 | visible: false, 12 | ticksVisible: false, 13 | scaleMargins: { 14 | bottom: 0.1, 15 | top: 0.2, 16 | }, 17 | minimumWidth: 0, 18 | }; 19 | -------------------------------------------------------------------------------- /src/components/use-charts/helpers/is-running-on-client-side.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * When you're trying to use the library in server-side context (for instance in SSR) 3 | * you don't have some browser-specific variables like navigator or window 4 | * and if the library will use them on the top level of the library 5 | * the import will fail due ReferenceError 6 | * thus, this allows use the navigator on the top level and being imported in server-side context as well 7 | * See issue #446 8 | */ 9 | 10 | export const isRunningOnClientSide = typeof window !== 'undefined'; 11 | -------------------------------------------------------------------------------- /src/components/utils/use-warning.ts: -------------------------------------------------------------------------------- 1 | const warningStack: { [key: string]: boolean } = {}; 2 | 3 | const useWarning = (message: string, component?: string) => { 4 | const tag = component ? ` [${component}]` : ' '; 5 | const log = `[HimalayaUI]${tag}: ${message}`; 6 | 7 | if (typeof console === 'undefined') return; 8 | if (warningStack[log]) return; 9 | warningStack[log] = true; 10 | 11 | if (process.env.NODE_ENV !== 'production') { 12 | return console.error(log); 13 | } 14 | 15 | console.warn(log); 16 | }; 17 | 18 | export default useWarning; 19 | -------------------------------------------------------------------------------- /src/lib/providers.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { ConfigProvider } from 'components'; 4 | import { PropsWithChildren } from 'react'; 5 | import { SwipeProvider } from '../components/swipe'; 6 | import { CoreLayout } from './layouts/core-layout'; 7 | 8 | export function Providers({ children, defaultTheme }: PropsWithChildren<{ defaultTheme: string }>) { 9 | return ( 10 | 11 | 12 | {children} 13 | 14 | 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /src/components/popover/index.ts: -------------------------------------------------------------------------------- 1 | import Popover from './popover'; 2 | import PopoverItem from './popover-item'; 3 | 4 | export type PopoverComponentType = typeof Popover & { 5 | Item: typeof PopoverItem; 6 | Option: typeof PopoverItem; 7 | }; 8 | (Popover as PopoverComponentType).Item = PopoverItem; 9 | (Popover as PopoverComponentType).Option = PopoverItem; 10 | 11 | export type { PopoverProps, PopoverTriggerTypes, PopoverPlacement } from './popover'; 12 | export type { PopoverItemProps } from './popover-item'; 13 | export default Popover as PopoverComponentType; 14 | -------------------------------------------------------------------------------- /src/app/components/spinner/spinner.mdx: -------------------------------------------------------------------------------- 1 | import { Playground, Attributes } from 'lib/components' 2 | import { Spinner } from 'components' 3 | 4 | export const meta = { 5 | title: 'Spinner', 6 | group: 'Feedback', 7 | } 8 | 9 | # Spinner 10 | 11 | Indicate an action running in the background. 12 | 13 | As an indicator of load waiting, see also component [Loading](/components/loading). 14 | 15 | 19 | `} 20 | /> 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/components/carousel/utils/isObject/test/isObject.test.ts: -------------------------------------------------------------------------------- 1 | import { isObject } from '../isObject'; 2 | 3 | describe('isObject', () => { 4 | test('can return `true` if the subject is an object.', () => { 5 | [{}, { a: 1 }, new Map(), []].forEach(subject => { 6 | expect(isObject(subject)).toBe(true); 7 | }); 8 | }); 9 | 10 | test('can return `false` if the subject is not an object.', () => { 11 | [1, true, '1', () => 1, null, undefined, NaN, BigInt(1)].forEach(subject => { 12 | expect(isObject(subject)).toBe(false); 13 | }); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /src/components/chart/chart-context.ts: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import React from 'react'; 4 | import { IChartApi } from '../use-charts/api/create-chart'; 5 | import { ILegendStatesDictonary } from './shared'; 6 | 7 | export interface ChartConfig { 8 | chart: IChartApi | undefined; 9 | series: ILegendStatesDictonary; 10 | } 11 | 12 | const defaultContext = { 13 | chart: undefined, 14 | series: [], 15 | }; 16 | 17 | export const ChartContext = React.createContext(defaultContext); 18 | export const useChart = (): ChartConfig => React.useContext(ChartContext); 19 | -------------------------------------------------------------------------------- /src/components/checkbox/checkbox-context.ts: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | 4 | export interface CheckboxConfig { 5 | updateState?: (value: string, checked: boolean) => void; 6 | disabledAll: boolean; 7 | values: string[]; 8 | inGroup: boolean; 9 | } 10 | 11 | const defaultContext = { 12 | disabledAll: false, 13 | inGroup: false, 14 | values: [], 15 | }; 16 | 17 | export const CheckboxContext = React.createContext(defaultContext); 18 | 19 | export const useCheckbox = (): CheckboxConfig => React.useContext(CheckboxContext); 20 | -------------------------------------------------------------------------------- /src/components/image/__tests__/__snapshots__/index.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Image should render correctly 1`] = `ReactWrapper {}`; 4 | 5 | exports[`Image should render correctly 2`] = `ReactWrapper {}`; 6 | 7 | exports[`Image should render correctly 3`] = `ReactWrapper {}`; 8 | 9 | exports[`Image should render correctly with svg string 1`] = `ReactWrapper {}`; 10 | 11 | exports[`Image should render correctly with svg string 2`] = `ReactWrapper {}`; 12 | 13 | exports[`Image should render correctly with svg string 3`] = `ReactWrapper {}`; 14 | -------------------------------------------------------------------------------- /src/components/fieldset/fieldset-context.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export interface FieldItem { 4 | value: string; 5 | label: string; 6 | } 7 | 8 | export interface FieldsetConfig { 9 | register?: (item: FieldItem) => void; 10 | currentValue: string; 11 | inGroup: boolean; 12 | } 13 | 14 | const defaultContext = { 15 | inGroup: false, 16 | currentValue: '', 17 | }; 18 | 19 | export const FieldsetContext = React.createContext(defaultContext); 20 | 21 | export const useFieldset = (): FieldsetConfig => React.useContext(FieldsetContext); 22 | -------------------------------------------------------------------------------- /src/components/use-all-themes/all-themes-context.ts: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import Themes from '../themes/themes'; 4 | import { UIThemes } from '../themes/presets'; 5 | 6 | export type AllThemesConfig = { 7 | themes: Array; 8 | }; 9 | 10 | const defaultAllThemesConfig = { 11 | themes: Themes.getPresets(), 12 | }; 13 | 14 | export const AllThemesContext: React.Context = React.createContext(defaultAllThemesConfig); 15 | export const useAllThemes = (): AllThemesConfig => React.useContext(AllThemesContext); 16 | -------------------------------------------------------------------------------- /tests/utils.ts: -------------------------------------------------------------------------------- 1 | import { act } from 'react-dom/test-utils' 2 | import { ReactWrapper } from 'enzyme' 3 | 4 | export const sleep = (time: number) => { 5 | return new Promise(resolve => setTimeout(resolve, time)) 6 | } 7 | 8 | export const updateWrapper = async (wrapper: ReactWrapper, time: number = 0) => { 9 | await act(async () => { 10 | await sleep(time) 11 | wrapper.update() 12 | }) 13 | } 14 | 15 | export const mockNativeEvent = (fn: Function = () => {}) => ({ 16 | nativeEvent: { stopImmediatePropagation: fn }, 17 | }) 18 | 19 | export const nativeEvent = mockNativeEvent() 20 | -------------------------------------------------------------------------------- /src/components/grid/index.ts: -------------------------------------------------------------------------------- 1 | import Grid from './grid'; 2 | import GridContainer from './grid-container'; 3 | 4 | export type GridComponentType = typeof Grid & { 5 | Container: typeof GridContainer; 6 | }; 7 | (Grid as GridComponentType).Container = GridContainer; 8 | 9 | export type { GridContainerProps } from './grid-container'; 10 | export type { GridProps } from './grid'; 11 | export type { GridBreakpointsValue } from './basic-item'; 12 | export type { GridAlignContent, GridAlignItems, GridDirection, GridJustify, GridWrap } from './grid-types'; 13 | export default Grid as GridComponentType; 14 | -------------------------------------------------------------------------------- /scripts/move-server-in.js: -------------------------------------------------------------------------------- 1 | const { resolve, join } = require('path') 2 | const fs = require('fs-extra') 3 | const documentationPath = resolve(__dirname, '../src') 4 | const publicPath = resolve(__dirname, '../src/public') 5 | const serverPath = resolve(__dirname, '../dist/server/src') 6 | const serverPublicPath = resolve(__dirname, '../dist/server') 7 | 8 | const moveFiles = async () => { 9 | console.log(documentationPath, " to ", serverPath); 10 | await fs.copy(documentationPath, serverPath, { overwrite: true }) 11 | await fs.copy(publicPath, serverPublicPath, { recursive: true }) 12 | } 13 | 14 | moveFiles(); -------------------------------------------------------------------------------- /src/lib/data/metadata-guide.json: -------------------------------------------------------------------------------- 1 | [{"name":"Bundle Size","url":"\\guide\\bundle-size","index":11,"group":"Getting Started"},{"name":"Colors","url":"\\guide\\colors","index":20,"group":"Customization"},{"name":"Installation","url":"\\guide\\installation","index":10,"group":"Getting Started"},{"name":"Introduction","url":"\\guide\\introduction","index":5,"group":"Getting Started"},{"name":"Scale","url":"\\guide\\scale","index":30,"group":"Customization"},{"name":"Server Render","url":"\\guide\\server-render","index":15,"group":"Getting Started"},{"name":"Themes","url":"\\guide\\themes","index":25,"group":"Customization"}] 2 | -------------------------------------------------------------------------------- /src/lib/data/index.ts: -------------------------------------------------------------------------------- 1 | import _ from 'lodash'; 2 | import enUS from './metadata.json'; 3 | export type MetadataEntry = { 4 | name: string; 5 | url?: string; 6 | group?: string; 7 | index?: number; 8 | localeName?: string; 9 | description?: string; 10 | children?: MetadataEntry | Array; 11 | }; 12 | 13 | const datas: MetadataEntry[] = enUS as MetadataEntry[]; 14 | export default datas; 15 | 16 | const result = _.compact(_.flatten(datas.map(df => df.children))); 17 | const metaDataArray = _.compact(_.flatten(result.map(df => df.children))); 18 | 19 | export const Seeds = metaDataArray; 20 | -------------------------------------------------------------------------------- /src/components/button-group/button-group-context.ts: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { ButtonTypes } from '../utils/prop-types'; 4 | 5 | export interface ButtonGroupConfig { 6 | type?: ButtonTypes; 7 | ghost?: boolean; 8 | disabled?: boolean; 9 | isButtonGroup: boolean; 10 | } 11 | 12 | const defaultContext = { 13 | isButtonGroup: false, 14 | disabled: false, 15 | }; 16 | 17 | export const ButtonGroupContext = React.createContext(defaultContext); 18 | export const useButtonGroupContext = (): ButtonGroupConfig => React.useContext(ButtonGroupContext); 19 | -------------------------------------------------------------------------------- /src/components/use-charts/formatters/time-formatter.ts: -------------------------------------------------------------------------------- 1 | import { numberToStringWithLeadingZero } from './price-formatter'; 2 | 3 | export class TimeFormatter { 4 | private _formatStr: string; 5 | 6 | public constructor(format?: string) { 7 | this._formatStr = format || '%h:%m:%s'; 8 | } 9 | 10 | public format(date: Date): string { 11 | return this._formatStr 12 | .replace('%h', numberToStringWithLeadingZero(date.getUTCHours(), 2)) 13 | .replace('%m', numberToStringWithLeadingZero(date.getUTCMinutes(), 2)) 14 | .replace('%s', numberToStringWithLeadingZero(date.getUTCSeconds(), 2)); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/components/page-layout/page-layout-context.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { PageLayoutProviderContextProps } from './shared'; 4 | 5 | export const DefaultPageLayoutProviderConfig: PageLayoutProviderContextProps = { 6 | setQuickBarEnabled: () => {}, 7 | isQuickbarEnabled: true, 8 | setSideBarEnabled: () => {}, 9 | isSidebarEnabled: true, 10 | }; 11 | 12 | export const PageLayoutProviderContext = React.createContext(DefaultPageLayoutProviderConfig); 13 | export const usePageLayout = (): PageLayoutProviderContextProps => React.useContext(PageLayoutProviderContext); 14 | -------------------------------------------------------------------------------- /src/components/shared/ellipsis.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | 4 | export type EllipsisProps = { 5 | height: string; 6 | }; 7 | 8 | const Ellipsis: React.FC> = ({ children, height }) => { 9 | return ( 10 | 11 | {children} 12 | 21 | 22 | ); 23 | }; 24 | 25 | export default React.memo(Ellipsis); 26 | -------------------------------------------------------------------------------- /src/typings/_build-time-constants.d.ts: -------------------------------------------------------------------------------- 1 | // this file contains build-time constants 2 | // which will be replaced (injected) by rollup while bundling 3 | // see rollup.config.js for the reference 4 | 5 | declare namespace NodeJS { 6 | interface ProcessEnv { 7 | // eslint-disable-next-line @typescript-eslint/naming-convention 8 | NODE_ENV: 'development' | 'production'; 9 | 10 | // eslint-disable-next-line @typescript-eslint/naming-convention 11 | BUILD_VERSION: string; 12 | } 13 | 14 | interface Process { 15 | env: ProcessEnv; 16 | } 17 | } 18 | 19 | // eslint-disable-next-line no-var 20 | declare var process: NodeJS.Process; 21 | -------------------------------------------------------------------------------- /src/components/next/registry.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import React, { useState } from 'react'; 4 | import { useServerInsertedHTML } from 'next/navigation'; 5 | import { StyleRegistry, createStyleRegistry } from 'styled-jsx'; 6 | 7 | export default function NextStyleRegistry({ children }: { children: React.ReactNode }) { 8 | const [jsxStyleRegistry] = useState(() => createStyleRegistry()); 9 | 10 | useServerInsertedHTML(() => { 11 | const styles = jsxStyleRegistry.styles(); 12 | jsxStyleRegistry.flush(); 13 | return styles; 14 | }); 15 | 16 | return {children}; 17 | } 18 | -------------------------------------------------------------------------------- /src/components/use-search/search-provider.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React, { useState } from 'react'; 3 | import { SearchContext } from './search-context'; 4 | 5 | const SearchProvider: React.FC = ({ children }: React.PropsWithChildren<{}>) => { 6 | const [isEnabled, setIsEnabled] = useState(false); 7 | return ( 8 | 14 | {children} 15 | 16 | ); 17 | }; 18 | 19 | SearchProvider.displayName = 'HimalayaSearchProvider'; 20 | export default SearchProvider; 21 | -------------------------------------------------------------------------------- /src/components/use-charts/renderers/composite-renderer.ts: -------------------------------------------------------------------------------- 1 | import { CanvasRenderingTarget2D } from 'fancy-canvas'; 2 | 3 | import { IPaneRenderer } from './ipane-renderer'; 4 | 5 | export class CompositeRenderer implements IPaneRenderer { 6 | private _renderers: readonly IPaneRenderer[] = []; 7 | 8 | public setRenderers(renderers: readonly IPaneRenderer[]): void { 9 | this._renderers = renderers; 10 | } 11 | 12 | public draw(target: CanvasRenderingTarget2D, isHovered: boolean, hitTestData?: unknown): void { 13 | this._renderers.forEach((r: IPaneRenderer) => { 14 | r.draw(target, isHovered, hitTestData); 15 | }); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/components/auto-complete/auto-complete-context.ts: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React, { MutableRefObject } from 'react'; 3 | 4 | export interface AutoCompleteConfig { 5 | value?: string; 6 | updateValue?: (val: string) => unknown; 7 | visible?: boolean; 8 | updateVisible?: (next: boolean) => unknown; 9 | ref?: MutableRefObject; 10 | } 11 | 12 | const defaultContext = { 13 | visible: false, 14 | }; 15 | 16 | export const AutoCompleteContext = React.createContext(defaultContext); 17 | 18 | export const useAutoCompleteContext = (): AutoCompleteConfig => React.useContext(AutoCompleteContext); 19 | -------------------------------------------------------------------------------- /src/components/icons/minus.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Minus = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Minus; 24 | -------------------------------------------------------------------------------- /src/components/icons/x.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const X = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default X; 24 | -------------------------------------------------------------------------------- /src/components/use-charts/api/options/time-scale-options-defaults.ts: -------------------------------------------------------------------------------- 1 | import { HorzScaleOptions } from '../../model/time-scale'; 2 | 3 | export const timeScaleOptionsDefaults: HorzScaleOptions = { 4 | rightOffset: 0, 5 | barSpacing: 6, 6 | minBarSpacing: 0.5, 7 | fixLeftEdge: false, 8 | fixRightEdge: false, 9 | lockVisibleTimeRangeOnResize: false, 10 | rightBarStaysOnScroll: false, 11 | borderVisible: true, 12 | borderColor: '#2B2B43', 13 | visible: true, 14 | timeVisible: false, 15 | secondsVisible: true, 16 | shiftVisibleRangeOnNewBar: true, 17 | ticksVisible: false, 18 | uniformDistribution: false, 19 | minimumHeight: 0, 20 | }; 21 | -------------------------------------------------------------------------------- /src/components/footer/footer-block.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import React, { PropsWithChildren } from 'react'; 4 | import { FooterBottomItemProps } from './index'; 5 | 6 | const FooterBlock: React.FC> = ({ children, justify = 'flex-start', ...props }) => { 7 | return ( 8 |
    9 | {children} 10 | 18 |
    19 | ); 20 | }; 21 | 22 | export default FooterBlock; 23 | -------------------------------------------------------------------------------- /src/components/icons/plus.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Plus = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Plus; 24 | -------------------------------------------------------------------------------- /src/components/hero/share.ts: -------------------------------------------------------------------------------- 1 | import { Gradient } from '../themes/presets'; 2 | import { HTMLAttributes } from 'react'; 3 | export type HeroProps = { 4 | extraPaddingDown?: number; 5 | withDownArrow?: boolean; 6 | scrollToId?: string; 7 | }; 8 | 9 | type NativeAttrs = Omit, keyof HeroProps>; 10 | export type HeroPropsNative = HeroProps & NativeAttrs; 11 | 12 | export type HeroCoreProps = { 13 | Tag?: 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; 14 | }; 15 | 16 | export interface HeroTagProps extends HeroCoreProps { 17 | hasGradient?: boolean; 18 | background?: string; 19 | gradient?: Gradient; 20 | textColor?: string; 21 | } 22 | -------------------------------------------------------------------------------- /src/components/icons/check.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Check = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Check; 24 | -------------------------------------------------------------------------------- /src/components/themes/presets/shared.ts: -------------------------------------------------------------------------------- 1 | import { UIThemesFont } from './index'; 2 | 3 | export const defaultFont: UIThemesFont = { 4 | sans: '"Instrument Sans Variable", "Inter Variable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif', 5 | mono: '"Roboto Mono Variable", Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace', 6 | prism: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,"Liberation Mono", "Courier New", monospace', 7 | baseSize: 16, 8 | headingFactor: 0.5, 9 | baseLineHeight: 24, 10 | }; 11 | -------------------------------------------------------------------------------- /src/components/use-charts/helpers/nominal.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This is the generic type useful for declaring a nominal type, 3 | * which does not structurally matches with the base type and 4 | * the other types declared over the same base type 5 | * 6 | * @example 7 | * ```ts 8 | * type Index = Nominal; 9 | * // let i: Index = 42; // this fails to compile 10 | * let i: Index = 42 as Index; // OK 11 | * ``` 12 | * @example 13 | * ```ts 14 | * type TagName = Nominal; 15 | * ``` 16 | */ 17 | export type Nominal = T & { 18 | /** The 'name' or species of the nominal. */ 19 | [Symbol.species]: Name; 20 | }; 21 | -------------------------------------------------------------------------------- /src/app/components/animated-cursor/animated-cursor.mdx: -------------------------------------------------------------------------------- 1 | import { Playground, Attributes } from 'lib/components' 2 | import { AnimatedCursor } from 'components' 3 | 4 | export const meta = { 5 | title: 'Animated Cursor', 6 | group: 'Others', 7 | } 8 | 9 | # Animated Cursor 10 | 11 | An `AnimatedCursor` UI component to customizable cursor animations for interactivity. 12 | 13 | 19 | `} 20 | /> 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/components/icons/menu.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Menu = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Menu; 24 | -------------------------------------------------------------------------------- /src/components/icons/playFill.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const PlayFill = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 18 | 19 | 20 | ); 21 | }; 22 | export default PlayFill; 23 | -------------------------------------------------------------------------------- /src/components/icons/sort.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Sort = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Sort; 24 | -------------------------------------------------------------------------------- /src/components/icons/type.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Type = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Type; 24 | -------------------------------------------------------------------------------- /src/mdx-components.tsx: -------------------------------------------------------------------------------- 1 | import { LinkProps } from 'components/link'; 2 | import { HybridCode, HybridLink } from './lib/components'; 3 | import { Image } from 'components'; 4 | import { MDXComponents } from 'mdx/types'; 5 | 6 | export function useMDXComponents(components: MDXComponents): MDXComponents { 7 | return { 8 | a: ({ children, ...props }) => {children}, 9 | img: props => )}>, 10 | pre: ({ children, ...props }) => )}>{children}, 11 | ...components, 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /src/components/icons/arrowUp.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const ArrowUp = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default ArrowUp; 24 | -------------------------------------------------------------------------------- /src/components/icons/chevronUp.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const ChevronUp = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default ChevronUp; 24 | -------------------------------------------------------------------------------- /src/components/icons/code.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Code = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Code; 24 | -------------------------------------------------------------------------------- /src/components/icons/volume.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Volume = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Volume; 24 | -------------------------------------------------------------------------------- /src/components/icons/zap.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Zap = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Zap; 24 | -------------------------------------------------------------------------------- /src/components/select/select-context.ts: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React, { MutableRefObject } from 'react'; 3 | 4 | export interface SelectConfig { 5 | value?: string | string[]; 6 | updateValue?: (next: string | undefined) => unknown; 7 | visible?: boolean; 8 | updateVisible?: (next: boolean) => unknown; 9 | disableAll?: boolean; 10 | ref?: MutableRefObject; 11 | } 12 | 13 | const defaultContext = { 14 | visible: false, 15 | disableAll: false, 16 | }; 17 | 18 | export const SelectContext = React.createContext(defaultContext); 19 | 20 | export const useSelectContext = (): SelectConfig => React.useContext(SelectContext); 21 | -------------------------------------------------------------------------------- /src/components/count-up/easing.ts: -------------------------------------------------------------------------------- 1 | import type { Easing } from './'; 2 | 3 | export const easings = { 4 | easeInCubic: (t: number, b: number, c: number, d: number): number => { 5 | t /= d; 6 | return c * t * t * t + b; 7 | }, 8 | easeOutCubic: (t: number, b: number, c: number, d: number): number => { 9 | t /= d; 10 | t--; 11 | return c * (t * t * t + 1) + b; 12 | }, 13 | linear: (t: number, b: number, c: number, d: number): number => { 14 | return (c * t) / d + b; 15 | }, 16 | }; 17 | 18 | export const defaultEasing = easings.easeOutCubic; 19 | 20 | export const getEasing = (easing: Easing) => (typeof easing === 'function' ? easing : easings[easing]); 21 | -------------------------------------------------------------------------------- /src/components/footer/footer-bottom-block.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import React, { PropsWithChildren } from 'react'; 4 | import { FooterBottomItemProps } from './index'; 5 | 6 | const FooterBottomBlock: React.FC> = ({ children, justify, ...props }) => { 7 | return ( 8 |
    9 | {children} 10 | 18 |
    19 | ); 20 | }; 21 | 22 | export default FooterBottomBlock; 23 | -------------------------------------------------------------------------------- /src/components/hero/index.ts: -------------------------------------------------------------------------------- 1 | import Hero from './hero'; 2 | import HeroActions from './hero-actions'; 3 | import HeroDesc from './hero-desc'; 4 | import HeroTag from './hero-tag'; 5 | import HeroTitle from './hero-title'; 6 | 7 | export type HeroType = typeof Hero & { 8 | Title: typeof HeroTitle; 9 | Desc: typeof HeroDesc; 10 | Actions: typeof HeroActions; 11 | Tag: typeof HeroTag; 12 | }; 13 | (Hero as HeroType).Title = HeroTitle; 14 | (Hero as HeroType).Desc = HeroDesc; 15 | (Hero as HeroType).Actions = HeroActions; 16 | (Hero as HeroType).Tag = HeroTag; 17 | 18 | export type { HeroProps, HeroTagProps, HeroCoreProps } from './share'; 19 | 20 | export default Hero as HeroType; 21 | -------------------------------------------------------------------------------- /src/components/icons/chevronDown.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const ChevronDown = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default ChevronDown; 24 | -------------------------------------------------------------------------------- /src/components/icons/chevronLeft.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const ChevronLeft = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default ChevronLeft; 24 | -------------------------------------------------------------------------------- /src/components/icons/circleFill.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const CircleFill = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 18 | 19 | 20 | ); 21 | }; 22 | export default CircleFill; 23 | -------------------------------------------------------------------------------- /src/components/icons/divider.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Divider = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Divider; 24 | -------------------------------------------------------------------------------- /src/components/icons/hash.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Hash = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Hash; 24 | -------------------------------------------------------------------------------- /src/components/icons/italic.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Italic = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Italic; 24 | -------------------------------------------------------------------------------- /src/components/icons/send.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Send = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Send; 24 | -------------------------------------------------------------------------------- /src/components/icons/terminal.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Terminal = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Terminal; 24 | -------------------------------------------------------------------------------- /src/components/use-charts/renderers/itime-axis-view-renderer.ts: -------------------------------------------------------------------------------- 1 | import { CanvasRenderingTarget2D } from 'fancy-canvas'; 2 | 3 | import { TextWidthCache } from '../model/text-width-cache'; 4 | 5 | export interface TimeAxisViewRendererOptions { 6 | baselineOffset: number; 7 | borderSize: number; 8 | font: string; 9 | fontSize: number; 10 | paddingBottom: number; 11 | paddingTop: number; 12 | tickLength: number; 13 | paddingHorizontal: number; 14 | widthCache: TextWidthCache; 15 | labelBottomOffset: number; 16 | } 17 | 18 | export interface ITimeAxisViewRenderer { 19 | draw(target: CanvasRenderingTarget2D, rendererOptions: TimeAxisViewRendererOptions): void; 20 | } 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | .source 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | 22 | .npmrc 23 | .env* 24 | .idea 25 | 26 | # debug 27 | npm-debug.log* 28 | yarn-debug.log* 29 | yarn-error.log* 30 | 31 | .now 32 | dist 33 | esm 34 | examples/**/yarn.lock 35 | examples/**/out 36 | examples/**/.next 37 | examples/**/node_modules 38 | examples/**/_build 39 | examples/**/.cache 40 | 41 | .next 42 | 43 | # Local Netlify folder 44 | .netlify 45 | .vercel 46 | -------------------------------------------------------------------------------- /src/components/icons/activity.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Activity = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Activity; 24 | -------------------------------------------------------------------------------- /src/components/icons/archive.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Archive = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Archive; 24 | -------------------------------------------------------------------------------- /src/components/icons/arrowDown.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const ArrowDown = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default ArrowDown; 24 | -------------------------------------------------------------------------------- /src/components/icons/arrowLeft.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const ArrowLeft = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default ArrowLeft; 24 | -------------------------------------------------------------------------------- /src/components/icons/arrowRight.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const ArrowRight = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default ArrowRight; 24 | -------------------------------------------------------------------------------- /src/components/icons/arrowUpLeft.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const ArrowUpLeft = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default ArrowUpLeft; 24 | -------------------------------------------------------------------------------- /src/components/icons/barChart.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const BarChart = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default BarChart; 24 | -------------------------------------------------------------------------------- /src/components/icons/barChart2.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const BarChart2 = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default BarChart2; 24 | -------------------------------------------------------------------------------- /src/components/icons/chevronRight.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const ChevronRight = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default ChevronRight; 24 | -------------------------------------------------------------------------------- /src/components/icons/cursor.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Cursor = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Cursor; 24 | -------------------------------------------------------------------------------- /src/components/icons/filter.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Filter = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Filter; 24 | -------------------------------------------------------------------------------- /src/components/icons/pauseFill.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const PauseFill = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 18 | 19 | 20 | ); 21 | }; 22 | export default PauseFill; 23 | -------------------------------------------------------------------------------- /src/components/icons/play.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Play = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Play; 24 | -------------------------------------------------------------------------------- /src/components/icons/playSolidFill.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const PlaySolidFill = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 18 | 19 | 20 | ); 21 | }; 22 | export default PlaySolidFill; 23 | -------------------------------------------------------------------------------- /src/components/icons/power.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Power = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Power; 24 | -------------------------------------------------------------------------------- /src/components/icons/skipBack.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const SkipBack = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default SkipBack; 24 | -------------------------------------------------------------------------------- /src/lib/components/pures/anchor/anchor-icon.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const AnchorIcon = () => { 4 | return ( 5 | 17 | 18 | 19 | 20 | ); 21 | }; 22 | 23 | export default AnchorIcon; 24 | -------------------------------------------------------------------------------- /src/components/icons/alignLeft.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const AlignLeft = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default AlignLeft; 24 | -------------------------------------------------------------------------------- /src/components/icons/arrowUpRight.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const ArrowUpRight = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default ArrowUpRight; 24 | -------------------------------------------------------------------------------- /src/components/icons/circle.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Circle = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Circle; 24 | -------------------------------------------------------------------------------- /src/components/icons/droplet.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Droplet = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Droplet; 24 | -------------------------------------------------------------------------------- /src/components/icons/navigation.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Navigation = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Navigation; 24 | -------------------------------------------------------------------------------- /src/components/icons/navigation2.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Navigation2 = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Navigation2; 24 | -------------------------------------------------------------------------------- /src/components/icons/rewind.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Rewind = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Rewind; 24 | -------------------------------------------------------------------------------- /src/components/icons/skipForward.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const SkipForward = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default SkipForward; 24 | -------------------------------------------------------------------------------- /src/components/button-dropdown/button-dropdown-context.ts: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import React from 'react'; 4 | import { UIColorTypes } from '../themes/presets'; 5 | 6 | export interface ButtonDropdownConfig { 7 | type?: UIColorTypes; 8 | auto?: boolean; 9 | disabled?: boolean; 10 | loading?: boolean; 11 | } 12 | 13 | const defaultContext = { 14 | type: 'default' as UIColorTypes, 15 | auto: false, 16 | disabled: false, 17 | loading: false, 18 | }; 19 | 20 | export const ButtonDropdownContext = React.createContext(defaultContext); 21 | 22 | export const useButtonDropdown = (): ButtonDropdownConfig => React.useContext(ButtonDropdownContext); 23 | -------------------------------------------------------------------------------- /src/components/icons/alignRight.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const AlignRight = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default AlignRight; 24 | -------------------------------------------------------------------------------- /src/components/icons/arrowDownLeft.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const ArrowDownLeft = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default ArrowDownLeft; 24 | -------------------------------------------------------------------------------- /src/components/icons/arrowDownRight.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const ArrowDownRight = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default ArrowDownRight; 24 | -------------------------------------------------------------------------------- /src/components/icons/bluetooth.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Bluetooth = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Bluetooth; 24 | -------------------------------------------------------------------------------- /src/components/icons/chevronsDown.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const ChevronsDown = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default ChevronsDown; 24 | -------------------------------------------------------------------------------- /src/components/icons/chevronsUp.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const ChevronsUp = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default ChevronsUp; 24 | -------------------------------------------------------------------------------- /src/components/icons/cloud.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Cloud = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Cloud; 24 | -------------------------------------------------------------------------------- /src/components/icons/framer.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Framer = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Framer; 24 | -------------------------------------------------------------------------------- /src/components/icons/grid.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Grid = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Grid; 24 | -------------------------------------------------------------------------------- /src/components/icons/list.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const List = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default List; 24 | -------------------------------------------------------------------------------- /src/components/icons/map.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Map = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Map; 24 | -------------------------------------------------------------------------------- /src/components/icons/moon.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Moon = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Moon; 24 | -------------------------------------------------------------------------------- /src/components/icons/pause.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Pause = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Pause; 24 | -------------------------------------------------------------------------------- /src/components/icons/shield.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Shield = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Shield; 24 | -------------------------------------------------------------------------------- /src/components/icons/square.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Square = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Square; 24 | -------------------------------------------------------------------------------- /src/components/icons/twitch.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Twitch = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Twitch; 24 | -------------------------------------------------------------------------------- /src/components/icons/vercelTriangle.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const VercelTriangle = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default VercelTriangle; 24 | -------------------------------------------------------------------------------- /src/components/icons/volumeX.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const VolumeX = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default VolumeX; 24 | -------------------------------------------------------------------------------- /src/components/use-mobile-menu/mobile-menu-context.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | 4 | export interface MobileMenuContextProps { 5 | isEnabled: boolean; 6 | setIsEnabled: (value: boolean) => void; 7 | direction: 'left' | 'right'; 8 | setDirection: (value: 'left' | 'right') => void; 9 | } 10 | 11 | export const defaultConfigs: MobileMenuContextProps = { 12 | setIsEnabled: () => {}, 13 | isEnabled: false, 14 | direction: 'left', 15 | setDirection: () => {}, 16 | }; 17 | 18 | export const MobileMenuContext = React.createContext(defaultConfigs); 19 | export const useMobileMenu = (): MobileMenuContextProps => React.useContext(MobileMenuContext); 20 | -------------------------------------------------------------------------------- /src/components/icons/alignCenter.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const AlignCenter = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default AlignCenter; 24 | -------------------------------------------------------------------------------- /src/components/icons/alignJustify.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const AlignJustify = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default AlignJustify; 24 | -------------------------------------------------------------------------------- /src/components/icons/chevronsLeft.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const ChevronsLeft = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default ChevronsLeft; 24 | -------------------------------------------------------------------------------- /src/components/icons/chevronsRight.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const ChevronsRight = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default ChevronsRight; 24 | -------------------------------------------------------------------------------- /src/components/icons/fastForward.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const FastForward = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default FastForward; 24 | -------------------------------------------------------------------------------- /src/components/icons/maximize2.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Maximize2 = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Maximize2; 24 | -------------------------------------------------------------------------------- /src/components/icons/minimize2.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Minimize2 = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Minimize2; 24 | -------------------------------------------------------------------------------- /src/components/icons/playSolid.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const PlaySolid = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default PlaySolid; 24 | -------------------------------------------------------------------------------- /src/components/pagination/pagination-context.ts: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import React from 'react'; 4 | import { tuple } from '../utils/prop-types'; 5 | const paginationUpdateTypes = tuple('prev', 'next', 'click'); 6 | 7 | export type PaginationUpdateType = (typeof paginationUpdateTypes)[number]; 8 | 9 | export interface PaginationConfig { 10 | isFirst?: boolean; 11 | isLast?: boolean; 12 | update?: (type: PaginationUpdateType) => void; 13 | } 14 | 15 | const defaultContext = {}; 16 | 17 | export const PaginationContext = React.createContext(defaultContext); 18 | 19 | export const usePaginationContext = (): PaginationConfig => React.useContext(PaginationContext); 20 | -------------------------------------------------------------------------------- /src/components/css-baseline/__tests__/baseline.test.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { render } from 'enzyme'; 3 | import { CssBaseline, ConfigProvider } from 'components'; 4 | 5 | describe('CSSBaseline', () => { 6 | it('should render correctly', () => { 7 | const wrapper = render( 8 | 9 | 10 | , 11 | ); 12 | expect(wrapper).toMatchSnapshot(); 13 | }); 14 | 15 | it('should render dark mode correctly', () => { 16 | const wrapper = render( 17 | 18 | 19 | , 20 | ); 21 | expect(wrapper).toMatchSnapshot(); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /src/components/icons/bookmark.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Bookmark = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Bookmark; 24 | -------------------------------------------------------------------------------- /src/components/icons/clock.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Clock = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | 22 | ); 23 | }; 24 | export default Clock; 25 | -------------------------------------------------------------------------------- /src/components/icons/edit2.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Edit2 = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Edit2; 24 | -------------------------------------------------------------------------------- /src/components/icons/layers.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Layers = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Layers; 24 | -------------------------------------------------------------------------------- /src/components/icons/shuffle.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Shuffle = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Shuffle; 24 | -------------------------------------------------------------------------------- /src/components/icons/underline.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Underline = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Underline; 24 | -------------------------------------------------------------------------------- /src/components/icons/volume1.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Volume1 = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Volume1; 24 | -------------------------------------------------------------------------------- /src/components/use-charts/api/options/crosshair-options-defaults.ts: -------------------------------------------------------------------------------- 1 | import { CrosshairMode, CrosshairOptions } from '../../model/crosshair'; 2 | import { LineStyle } from '../../renderers/draw-line'; 3 | 4 | export const crosshairOptionsDefaults: CrosshairOptions = { 5 | vertLine: { 6 | color: '#9598A1', 7 | width: 1, 8 | style: LineStyle.LargeDashed, 9 | visible: true, 10 | labelVisible: true, 11 | labelBackgroundColor: '#131722', 12 | }, 13 | horzLine: { 14 | color: '#9598A1', 15 | width: 1, 16 | style: LineStyle.LargeDashed, 17 | visible: true, 18 | labelVisible: true, 19 | labelBackgroundColor: '#131722', 20 | }, 21 | mode: CrosshairMode.Magnet, 22 | }; 23 | -------------------------------------------------------------------------------- /src/components/use-charts/views/price-axis/iprice-axis-view.ts: -------------------------------------------------------------------------------- 1 | import { PriceScale } from '../../model/price-scale'; 2 | import { IPriceAxisViewRenderer, PriceAxisViewRendererOptions } from '../../renderers/iprice-axis-view-renderer'; 3 | 4 | export interface IPriceAxisView { 5 | coordinate(): number; 6 | getFixedCoordinate(): number; 7 | height(rendererOptions: PriceAxisViewRendererOptions, useSecondLine?: boolean): number; 8 | isVisible(): boolean; 9 | isAxisLabelVisible(): boolean; 10 | renderer(priceScale: PriceScale): IPriceAxisViewRenderer; 11 | paneRenderer(): IPriceAxisViewRenderer; 12 | setFixedCoordinate(value: number | null): void; 13 | text(): string; 14 | update(): void; 15 | } 16 | -------------------------------------------------------------------------------- /src/components/icons/disc.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Disc = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | 22 | ); 23 | }; 24 | export default Disc; 25 | -------------------------------------------------------------------------------- /src/components/icons/edit3.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Edit3 = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Edit3; 24 | -------------------------------------------------------------------------------- /src/components/icons/flag.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Flag = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Flag; 24 | -------------------------------------------------------------------------------- /src/components/icons/logIn.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const LogIn = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default LogIn; 24 | -------------------------------------------------------------------------------- /src/components/icons/meh.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Meh = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | 22 | ); 23 | }; 24 | export default Meh; 25 | -------------------------------------------------------------------------------- /src/components/icons/share.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import React from 'react'; 3 | import { IconPropsNative } from './'; 4 | const Share = ({ size = 24, color, style, ...props }: IconPropsNative) => { 5 | return ( 6 | 19 | 20 | 21 | ); 22 | }; 23 | export default Share; 24 | --------------------------------------------------------------------------------