├── .npmrc ├── docs ├── .gitignore ├── src │ ├── vite-env.d.ts │ ├── components │ │ ├── ui │ │ │ ├── footer │ │ │ │ ├── index.ts │ │ │ │ ├── footer.types.ts │ │ │ │ └── footer.ts │ │ │ ├── kbd │ │ │ │ ├── index.ts │ │ │ │ ├── kbd.types.ts │ │ │ │ └── kbd.ts │ │ │ ├── card │ │ │ │ ├── index.ts │ │ │ │ └── card.types.ts │ │ │ ├── menu │ │ │ │ ├── index.ts │ │ │ │ ├── menu.types.ts │ │ │ │ └── menu.ts │ │ │ ├── divider │ │ │ │ ├── index.ts │ │ │ │ ├── divider.types.ts │ │ │ │ └── divider.ts │ │ │ ├── loading │ │ │ │ ├── index.ts │ │ │ │ ├── loading.types.ts │ │ │ │ └── loading.ts │ │ │ ├── collapse │ │ │ │ ├── index.ts │ │ │ │ └── collapse.types.ts │ │ │ ├── dropdown │ │ │ │ ├── index.ts │ │ │ │ └── dropdown.types.ts │ │ │ ├── card-body │ │ │ │ ├── index.ts │ │ │ │ ├── card-body.types.ts │ │ │ │ └── card-body.ts │ │ │ ├── card-title │ │ │ │ ├── index.ts │ │ │ │ ├── card-title.types.ts │ │ │ │ └── card-title.ts │ │ │ ├── menu-item │ │ │ │ ├── index.ts │ │ │ │ ├── menu-item.types.ts │ │ │ │ └── menu-item.ts │ │ │ ├── card-actions │ │ │ │ ├── index.ts │ │ │ │ ├── card-actions.types.ts │ │ │ │ └── card-actions.ts │ │ │ ├── collapse-title │ │ │ │ ├── index.ts │ │ │ │ ├── collapse-title.types.ts │ │ │ │ └── collapse-title.ts │ │ │ ├── dropdown-label │ │ │ │ ├── index.ts │ │ │ │ ├── dropdown-label.types.ts │ │ │ │ └── dropdown-label.ts │ │ │ ├── collapse-content │ │ │ │ ├── index.ts │ │ │ │ ├── collapse-content.types.ts │ │ │ │ └── collapse-content.ts │ │ │ ├── dropdown-content │ │ │ │ ├── index.ts │ │ │ │ ├── dropdown-content.types.ts │ │ │ │ └── dropdown-content.ts │ │ │ ├── icon │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── icons │ │ │ ├── index.ts │ │ │ ├── icon.types.ts │ │ │ ├── create-icon.ts │ │ │ └── duotone │ │ │ │ ├── caret-right.ts │ │ │ │ ├── caret-left.ts │ │ │ │ ├── arrow-right.ts │ │ │ │ ├── layout.ts │ │ │ │ └── path.ts │ │ ├── navbar │ │ │ ├── search-form.ts │ │ │ └── docs-nav-bar.ts │ │ ├── common │ │ │ └── loader.ts │ │ ├── home │ │ │ └── index.ts │ │ └── docs │ │ │ ├── docs-scroll-bullet.ts │ │ │ └── explore-packages.ts │ ├── utils │ │ ├── set-title.ts │ │ ├── cn.ts │ │ ├── use-collection.ts │ │ └── use-content.ts │ ├── content │ │ ├── cli.collection.js │ │ ├── conventions.collection.js │ │ └── blog │ │ │ ├── third-post.md │ │ │ ├── second-post.md │ │ │ └── getting-started.md │ ├── pages │ │ ├── about.ts │ │ ├── docs │ │ │ ├── jsx.ts │ │ │ └── system.ts │ │ └── home.ts │ ├── locales │ │ ├── index.ts │ │ └── config.ts │ ├── layouts │ │ ├── site.layout.ts │ │ └── docs.layout.ts │ ├── main.ts │ └── styles │ │ └── fscroll.css ├── public │ └── assets │ │ └── images │ │ ├── hero.png │ │ ├── user1.jpg │ │ ├── user2.jpg │ │ ├── user3.jpg │ │ ├── bg-signin.png │ │ ├── mockup-app.png │ │ ├── benefit-one.png │ │ ├── benefit-two.png │ │ └── logo.svg ├── tsconfig.json ├── index.html └── vite.config.js ├── packages ├── cli │ ├── .npmignore │ ├── .npmrc │ ├── src │ │ ├── index.ts │ │ ├── commands │ │ │ ├── init │ │ │ │ ├── modules │ │ │ │ │ ├── setup-test-tools.ts │ │ │ │ │ └── setup-project-type.ts │ │ │ │ └── templates │ │ │ │ │ ├── css-file.ts │ │ │ │ │ └── index-file.ts │ │ │ ├── build │ │ │ │ ├── modules │ │ │ │ │ ├── static │ │ │ │ │ │ ├── init-static.ts │ │ │ │ │ │ ├── proxy.ts │ │ │ │ │ │ └── register-loader.ts │ │ │ │ │ └── prepare │ │ │ │ │ │ └── parse-markdown.ts │ │ │ │ ├── types │ │ │ │ │ └── index.ts │ │ │ │ ├── utils │ │ │ │ │ └── find-script-and-src.ts │ │ │ │ └── register │ │ │ │ │ └── register-build-command.ts │ │ │ └── ui │ │ │ │ ├── types │ │ │ │ └── index.ts │ │ │ │ └── register │ │ │ │ └── register-ui-command.ts │ │ ├── options │ │ │ └── jayjs-define-options.ts │ │ └── bin │ │ │ └── jayjs.ts │ ├── README.md │ ├── tsconfig.esm.json │ ├── tsconfig.json │ └── .swcrc ├── jsx │ ├── .npmignore │ ├── .npmrc │ ├── src │ │ ├── types │ │ │ └── global.d.ts │ │ └── index.ts │ └── .swcrc ├── static │ ├── .npmignore │ ├── .npmrc │ ├── src │ │ ├── index.ts │ │ └── vite-plugin │ │ │ ├── index.ts │ │ │ ├── utils │ │ │ ├── extract-module-parameter.ts │ │ │ ├── reduce-metadata.ts │ │ │ ├── extract-metadata.ts │ │ │ └── parse-markdown.ts │ │ │ ├── types │ │ │ └── index.ts │ │ │ ├── options │ │ │ └── jay-js-vite-define-options.ts │ │ │ └── services │ │ │ ├── get-parsed-file-content.ts │ │ │ └── write-collection.ts │ ├── README.md │ ├── .swcrc │ └── tsconfig.json ├── system │ ├── .npmignore │ ├── .npmrc │ ├── src │ │ ├── forms │ │ │ ├── resolvers │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── lazy │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── utils │ │ │ ├── theme │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── state │ │ │ └── index.ts │ │ ├── router │ │ │ └── index.ts │ │ └── index.ts │ └── vitest.config.ts ├── ui │ ├── .npmignore │ ├── src │ │ ├── utils │ │ │ ├── index.ts │ │ │ └── cn.ts │ │ ├── components │ │ │ ├── diff │ │ │ │ ├── index.ts │ │ │ │ ├── diff.types.ts │ │ │ │ └── diff.ts │ │ │ ├── stack │ │ │ │ ├── index.ts │ │ │ │ ├── stack.types.ts │ │ │ │ └── stack.ts │ │ │ ├── footer │ │ │ │ ├── index.ts │ │ │ │ ├── footer.types.ts │ │ │ │ └── footer.ts │ │ │ ├── rating │ │ │ │ ├── index.ts │ │ │ │ ├── rating.types.ts │ │ │ │ └── rating.ts │ │ │ ├── diff-item │ │ │ │ ├── index.ts │ │ │ │ ├── diff-item.types.ts │ │ │ │ └── diff-item.ts │ │ │ ├── indicator │ │ │ │ ├── index.ts │ │ │ │ ├── indicator.types.ts │ │ │ │ └── indicator.ts │ │ │ ├── timeline │ │ │ │ ├── index.ts │ │ │ │ ├── timeline.types.ts │ │ │ │ └── timeline.ts │ │ │ ├── diff-resizer │ │ │ │ ├── index.ts │ │ │ │ ├── diff-resizer.types.ts │ │ │ │ └── diff-resizer.ts │ │ │ ├── indicator-item │ │ │ │ ├── index.ts │ │ │ │ ├── indicator-item.types.ts │ │ │ │ └── indicator-item.ts │ │ │ ├── timeline-item │ │ │ │ ├── index.ts │ │ │ │ ├── timeline-item.types.ts │ │ │ │ └── timeline-item.ts │ │ │ ├── timeline-items │ │ │ │ ├── index.ts │ │ │ │ ├── timeline-items.types.ts │ │ │ │ └── timeline-items.ts │ │ │ ├── toast-container │ │ │ │ └── index.ts │ │ │ ├── link │ │ │ │ ├── index.ts │ │ │ │ ├── link.types.ts │ │ │ │ └── link.ts │ │ │ ├── button │ │ │ │ └── index.ts │ │ │ ├── card │ │ │ │ ├── index.ts │ │ │ │ └── card.types.ts │ │ │ ├── chat │ │ │ │ ├── index.ts │ │ │ │ ├── chat.types.ts │ │ │ │ └── chat.ts │ │ │ ├── join │ │ │ │ ├── index.ts │ │ │ │ ├── join.types.ts │ │ │ │ └── join.ts │ │ │ ├── kbd │ │ │ │ ├── index.ts │ │ │ │ ├── kbd.types.ts │ │ │ │ └── kbd.ts │ │ │ ├── menu │ │ │ │ ├── index.ts │ │ │ │ ├── menu.types.ts │ │ │ │ └── menu.ts │ │ │ ├── radio │ │ │ │ ├── index.ts │ │ │ │ ├── radio.types.ts │ │ │ │ └── radio.ts │ │ │ ├── range │ │ │ │ ├── index.ts │ │ │ │ ├── range.types.ts │ │ │ │ └── range.ts │ │ │ ├── select │ │ │ │ ├── index.ts │ │ │ │ ├── select.types.ts │ │ │ │ └── select.ts │ │ │ ├── swap │ │ │ │ ├── index.ts │ │ │ │ ├── swap.types.ts │ │ │ │ └── swap.ts │ │ │ ├── tabs │ │ │ │ ├── index.ts │ │ │ │ ├── tabs.types.ts │ │ │ │ └── tabs.ts │ │ │ ├── alert │ │ │ │ ├── index.ts │ │ │ │ ├── alert.types.ts │ │ │ │ └── alert.ts │ │ │ ├── badge │ │ │ │ ├── index.ts │ │ │ │ ├── badge.types.ts │ │ │ │ └── badge.ts │ │ │ ├── modal │ │ │ │ ├── index.ts │ │ │ │ ├── modal.types.ts │ │ │ │ └── modal.ts │ │ │ ├── steps │ │ │ │ ├── index.ts │ │ │ │ ├── steps.types.ts │ │ │ │ └── steps.ts │ │ │ ├── toast │ │ │ │ ├── index.ts │ │ │ │ └── toast.types.ts │ │ │ ├── avatar │ │ │ │ ├── index.ts │ │ │ │ ├── avatar.types.ts │ │ │ │ └── avatar.ts │ │ │ ├── checkbox │ │ │ │ ├── index.ts │ │ │ │ └── checkbox.types.ts │ │ │ ├── divider │ │ │ │ ├── index.ts │ │ │ │ ├── divider.types.ts │ │ │ │ └── divider.ts │ │ │ ├── drawer │ │ │ │ ├── index.ts │ │ │ │ └── drawer.types.ts │ │ │ ├── loading │ │ │ │ ├── index.ts │ │ │ │ ├── loading.types.ts │ │ │ │ └── loading.ts │ │ │ ├── navbar │ │ │ │ ├── index.ts │ │ │ │ ├── navbar.types.ts │ │ │ │ └── navbar.ts │ │ │ ├── progress │ │ │ │ ├── index.ts │ │ │ │ ├── progress.types.ts │ │ │ │ └── progress.ts │ │ │ ├── text-area │ │ │ │ ├── index.ts │ │ │ │ ├── text-area.types.ts │ │ │ │ └── text-area.ts │ │ │ ├── toggle │ │ │ │ ├── index.ts │ │ │ │ └── toggle.types.ts │ │ │ ├── tooltip │ │ │ │ ├── index.ts │ │ │ │ └── tooltip.types.ts │ │ │ ├── card-body │ │ │ │ ├── index.ts │ │ │ │ ├── card-body.types.ts │ │ │ │ └── card-body.ts │ │ │ ├── collapse │ │ │ │ ├── index.ts │ │ │ │ └── collapse.types.ts │ │ │ ├── dropdown │ │ │ │ ├── index.ts │ │ │ │ └── dropdown.types.ts │ │ │ ├── file-input │ │ │ │ ├── index.ts │ │ │ │ ├── file-input.types.ts │ │ │ │ └── file-input.ts │ │ │ ├── menu-item │ │ │ │ ├── index.ts │ │ │ │ ├── menu-item.types.ts │ │ │ │ └── menu-item.ts │ │ │ ├── modal-box │ │ │ │ ├── index.ts │ │ │ │ ├── modal-box.types.ts │ │ │ │ └── modal-box.ts │ │ │ ├── step-item │ │ │ │ ├── index.ts │ │ │ │ ├── step-item.types.ts │ │ │ │ └── step-item.ts │ │ │ ├── swap-item │ │ │ │ ├── index.ts │ │ │ │ ├── swap-item.types.ts │ │ │ │ └── swap-item.ts │ │ │ ├── tab-item │ │ │ │ ├── index.ts │ │ │ │ ├── tab-item.types.ts │ │ │ │ └── tab-item.ts │ │ │ ├── card-title │ │ │ │ ├── index.ts │ │ │ │ ├── card-title.types.ts │ │ │ │ └── card-title.ts │ │ │ ├── menu-title │ │ │ │ ├── index.ts │ │ │ │ ├── menu-title.types.ts │ │ │ │ └── menu-title.ts │ │ │ ├── text-input │ │ │ │ └── index.ts │ │ │ ├── breadcrumbs │ │ │ │ ├── index.ts │ │ │ │ ├── breadcrumbs.types.ts │ │ │ │ └── breadcrumbs.ts │ │ │ ├── card-actions │ │ │ │ ├── index.ts │ │ │ │ ├── card-actions.types.ts │ │ │ │ └── card-actions.ts │ │ │ ├── card-figure │ │ │ │ ├── index.ts │ │ │ │ ├── card-figure.types.ts │ │ │ │ └── card-figure.ts │ │ │ ├── date-picker │ │ │ │ └── index.ts │ │ │ ├── modal-action │ │ │ │ ├── index.ts │ │ │ │ ├── modal-action.types.ts │ │ │ │ └── modal-action.ts │ │ │ ├── chat-component │ │ │ │ ├── index.ts │ │ │ │ ├── chat-component.types.ts │ │ │ │ └── chat-component.ts │ │ │ ├── collapse-title │ │ │ │ ├── index.ts │ │ │ │ ├── collapse-title.types.ts │ │ │ │ └── collapse-title.ts │ │ │ ├── drawer-content │ │ │ │ ├── index.ts │ │ │ │ └── drawer-content.types.ts │ │ │ ├── drawer-overlay │ │ │ │ ├── index.ts │ │ │ │ └── drawer-overlay.types.ts │ │ │ ├── dropdown-label │ │ │ │ ├── index.ts │ │ │ │ ├── dropdown-label.types.ts │ │ │ │ └── dropdown-label.ts │ │ │ ├── modal-backdrop │ │ │ │ ├── index.ts │ │ │ │ ├── modal-backdrop.types.ts │ │ │ │ └── modal-backdrop.ts │ │ │ ├── radial-progress │ │ │ │ ├── index.ts │ │ │ │ └── radial-progress.types.ts │ │ │ ├── bottom-navigation │ │ │ │ ├── index.ts │ │ │ │ ├── bottom-navigation.types.ts │ │ │ │ └── bottom-navigation.ts │ │ │ ├── card-description │ │ │ │ ├── index.ts │ │ │ │ ├── card-description.types.ts │ │ │ │ └── card-description.ts │ │ │ ├── collapse-content │ │ │ │ ├── index.ts │ │ │ │ ├── collapse-content.types.ts │ │ │ │ └── collapse-content.ts │ │ │ ├── date-range-picker │ │ │ │ └── index.ts │ │ │ ├── dropdown-content │ │ │ │ ├── index.ts │ │ │ │ ├── dropdown-content.types.ts │ │ │ │ └── dropdown-content.ts │ │ │ ├── navbar-component │ │ │ │ ├── index.ts │ │ │ │ ├── navbar-component.types.ts │ │ │ │ └── navbar-component.ts │ │ │ ├── resizable-splitter │ │ │ │ ├── index.ts │ │ │ │ └── resizable-splitter.types.ts │ │ │ └── bottom-navigation-item │ │ │ │ ├── index.ts │ │ │ │ ├── bottom-navigation-item.types.ts │ │ │ │ └── bottom-navigation-item.ts │ │ ├── hooks │ │ │ ├── index.ts │ │ │ ├── use-ref.ts │ │ │ └── use-listener.ts │ │ └── index.ts │ ├── vitest.config.ts │ └── .swcrc ├── elements │ ├── src │ │ ├── outlet │ │ │ ├── index.ts │ │ │ └── outlet.ts │ │ ├── base │ │ │ └── index.ts │ │ ├── box │ │ │ ├── index.ts │ │ │ ├── box.types.ts │ │ │ └── box.ts │ │ ├── form │ │ │ ├── index.ts │ │ │ ├── form.types.ts │ │ │ └── form.ts │ │ ├── img │ │ │ ├── index.ts │ │ │ ├── img.types.ts │ │ │ └── img.ts │ │ ├── link │ │ │ ├── index.ts │ │ │ ├── link.types.ts │ │ │ └── link.ts │ │ ├── list │ │ │ ├── index.ts │ │ │ ├── list.types.ts │ │ │ └── list.ts │ │ ├── input │ │ │ ├── index.ts │ │ │ ├── input.types.ts │ │ │ └── input.ts │ │ ├── utils │ │ │ ├── index.ts │ │ │ ├── use-ref.ts │ │ │ └── uni-key.ts │ │ ├── button │ │ │ ├── index.ts │ │ │ ├── button.types.ts │ │ │ └── button.ts │ │ ├── section │ │ │ ├── index.ts │ │ │ ├── section.types.ts │ │ │ └── section.ts │ │ ├── select │ │ │ ├── index.ts │ │ │ ├── select.types.ts │ │ │ └── select.ts │ │ ├── fragment │ │ │ ├── index.ts │ │ │ └── fragment.types.ts │ │ ├── list-item │ │ │ ├── index.ts │ │ │ ├── list-item.types.ts │ │ │ └── list-item.ts │ │ ├── progress │ │ │ ├── index.ts │ │ │ ├── progress.types.ts │ │ │ └── progress.ts │ │ ├── text-area │ │ │ ├── index.ts │ │ │ ├── text-area.types.ts │ │ │ └── text-area.ts │ │ ├── typography │ │ │ ├── index.ts │ │ │ ├── typography.types.ts │ │ │ └── typography.ts │ │ ├── select-item │ │ │ ├── index.ts │ │ │ ├── select-item.types.ts │ │ │ └── select-item.ts │ │ ├── @types │ │ │ └── images.d.ts │ │ └── index.ts │ ├── vitest.config.ts │ ├── .swcrc │ └── tsconfig.json └── inspector │ ├── src │ ├── runtime │ │ └── index.ts │ └── index.ts │ ├── .swcrc │ └── vitest.config.ts ├── templates ├── spa-tsx-multi │ └── src │ │ ├── locales │ │ ├── i18n.types.ts │ │ ├── en-us.ts │ │ └── i18n.ts │ │ ├── pages │ │ └── about.tsx │ │ └── main.ts ├── static-ts-multi │ └── src │ │ ├── locales │ │ ├── i18n.types.ts │ │ ├── en-us.ts │ │ └── i18n.ts │ │ ├── content │ │ └── blog │ │ │ ├── third-post.md │ │ │ ├── hello-world.md │ │ │ └── second-post.md │ │ ├── pages │ │ └── about.ts │ │ ├── main.ts │ │ └── utils │ │ ├── use-collection.ts │ │ └── use-content.ts ├── static-tsx-multi │ └── src │ │ ├── locales │ │ ├── i18n.types.ts │ │ ├── en-us.ts │ │ └── i18n.ts │ │ ├── pages │ │ ├── about.tsx │ │ └── home.tsx │ │ ├── content │ │ └── blog │ │ │ ├── third-post.md │ │ │ ├── hello-world.md │ │ │ └── second-post.md │ │ ├── main.ts │ │ └── utils │ │ ├── use-collection.ts │ │ └── use-content.ts ├── spa-ts-multi │ └── src │ │ ├── locales │ │ ├── i18n.types.ts │ │ ├── en-us.ts │ │ └── i18n.ts │ │ ├── main.ts │ │ └── pages │ │ └── about.ts ├── spa-js │ └── src │ │ ├── main.js │ │ └── pages │ │ └── about.js ├── spa-ts │ └── src │ │ ├── main.ts │ │ └── pages │ │ └── about.ts ├── spa-tsx │ └── src │ │ ├── main.ts │ │ ├── pages │ │ └── about.tsx │ │ └── components │ │ └── navbar.tsx ├── spa-jsx │ └── src │ │ ├── main.js │ │ ├── pages │ │ └── about.jsx │ │ └── components │ │ └── navbar.jsx ├── static-jsx │ └── src │ │ ├── pages │ │ ├── about.jsx │ │ └── home.jsx │ │ ├── main.js │ │ ├── content │ │ └── blog │ │ │ ├── third-post.md │ │ │ ├── hello-world.md │ │ │ └── second-post.md │ │ └── utils │ │ ├── use-collection.js │ │ └── use-content.js ├── static-tsx │ └── src │ │ ├── pages │ │ ├── about.tsx │ │ └── home.tsx │ │ ├── main.ts │ │ ├── content │ │ └── blog │ │ │ ├── third-post.md │ │ │ ├── hello-world.md │ │ │ └── second-post.md │ │ └── utils │ │ ├── use-collection.ts │ │ └── use-content.ts ├── static-js │ └── src │ │ ├── main.js │ │ ├── pages │ │ └── about.js │ │ ├── content │ │ └── blog │ │ │ ├── third-post.md │ │ │ ├── hello-world.md │ │ │ └── second-post.md │ │ └── utils │ │ ├── use-collection.js │ │ └── use-content.js ├── static-ts │ └── src │ │ ├── main.ts │ │ ├── pages │ │ └── about.ts │ │ ├── content │ │ └── blog │ │ │ ├── third-post.md │ │ │ ├── hello-world.md │ │ │ └── second-post.md │ │ └── utils │ │ ├── use-collection.ts │ │ └── use-content.ts ├── spa-jsx-multi │ └── src │ │ ├── pages │ │ └── about.jsx │ │ ├── main.js │ │ ├── locales │ │ ├── en-us.js │ │ └── i18n.js │ │ └── components │ │ └── navbar.jsx ├── static-jsx-multi │ └── src │ │ ├── pages │ │ ├── about.jsx │ │ └── home.jsx │ │ ├── content │ │ └── blog │ │ │ ├── third-post.md │ │ │ ├── hello-world.md │ │ │ └── second-post.md │ │ ├── locales │ │ ├── en-us.js │ │ └── i18n.js │ │ ├── main.js │ │ └── utils │ │ ├── use-collection.js │ │ └── use-content.js ├── spa-js-multi │ └── src │ │ ├── main.js │ │ ├── pages │ │ └── about.js │ │ └── locales │ │ ├── en-us.js │ │ └── i18n.js └── static-js-multi │ └── src │ ├── content │ └── blog │ │ ├── third-post.md │ │ ├── hello-world.md │ │ └── second-post.md │ ├── pages │ └── about.js │ ├── locales │ ├── en-us.js │ └── i18n.js │ ├── main.js │ └── utils │ ├── use-collection.js │ └── use-content.js ├── .gitignore ├── clean-package.config.json ├── .editorconfig ├── workspace.json └── nx.json /.npmrc: -------------------------------------------------------------------------------- 1 | enable-pre-post-scripts=true -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist -------------------------------------------------------------------------------- /packages/cli/.npmignore: -------------------------------------------------------------------------------- 1 | * 2 | !dist/ -------------------------------------------------------------------------------- /packages/jsx/.npmignore: -------------------------------------------------------------------------------- 1 | * 2 | !dist/ -------------------------------------------------------------------------------- /packages/static/.npmignore: -------------------------------------------------------------------------------- 1 | * 2 | !dist/ -------------------------------------------------------------------------------- /packages/system/.npmignore: -------------------------------------------------------------------------------- 1 | * 2 | !dist/ -------------------------------------------------------------------------------- /packages/ui/.npmignore: -------------------------------------------------------------------------------- 1 | * 2 | !dist/ -------------------------------------------------------------------------------- /packages/cli/.npmrc: -------------------------------------------------------------------------------- 1 | enable-pre-post-scripts=true -------------------------------------------------------------------------------- /packages/cli/src/index.ts: -------------------------------------------------------------------------------- 1 | export default {}; 2 | -------------------------------------------------------------------------------- /packages/jsx/.npmrc: -------------------------------------------------------------------------------- 1 | enable-pre-post-scripts=true -------------------------------------------------------------------------------- /packages/static/.npmrc: -------------------------------------------------------------------------------- 1 | enable-pre-post-scripts=true -------------------------------------------------------------------------------- /packages/system/.npmrc: -------------------------------------------------------------------------------- 1 | enable-pre-post-scripts=true -------------------------------------------------------------------------------- /packages/ui/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./cn.js"; 2 | -------------------------------------------------------------------------------- /docs/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /docs/src/components/ui/footer/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./footer.js"; 2 | -------------------------------------------------------------------------------- /packages/elements/src/outlet/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./outlet.js"; 2 | -------------------------------------------------------------------------------- /packages/static/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./vite-plugin/index.js"; 2 | -------------------------------------------------------------------------------- /packages/ui/src/components/diff/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./diff.js"; 2 | -------------------------------------------------------------------------------- /packages/ui/src/components/stack/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./stack.js"; 2 | -------------------------------------------------------------------------------- /packages/ui/src/components/footer/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./footer.js"; 2 | -------------------------------------------------------------------------------- /packages/ui/src/components/rating/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./rating.js"; 2 | -------------------------------------------------------------------------------- /packages/ui/src/components/diff-item/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./diff-item.js"; 2 | -------------------------------------------------------------------------------- /packages/ui/src/components/indicator/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./indicator.js"; 2 | -------------------------------------------------------------------------------- /packages/ui/src/components/timeline/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./timeline.js"; 2 | -------------------------------------------------------------------------------- /packages/ui/src/components/diff-resizer/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./diff-resizer.js"; 2 | -------------------------------------------------------------------------------- /packages/ui/src/components/indicator-item/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./indicator-item.js"; 2 | -------------------------------------------------------------------------------- /packages/ui/src/components/timeline-item/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./timeline-item.js"; 2 | -------------------------------------------------------------------------------- /packages/ui/src/components/timeline-items/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./timeline-items.js"; 2 | -------------------------------------------------------------------------------- /packages/ui/src/components/toast-container/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./toast-container.js"; 2 | -------------------------------------------------------------------------------- /templates/spa-tsx-multi/src/locales/i18n.types.ts: -------------------------------------------------------------------------------- 1 | export type Ii18nBase = Record; -------------------------------------------------------------------------------- /docs/src/components/icons/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./duotone"; 2 | export * from "./icon.types"; 3 | -------------------------------------------------------------------------------- /docs/src/components/ui/kbd/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./kbd.js"; 2 | export * from "./kbd.types.js"; 3 | -------------------------------------------------------------------------------- /packages/elements/src/base/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./base.js"; 2 | export * from "./base.types.js"; 3 | -------------------------------------------------------------------------------- /packages/elements/src/box/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./box.js"; 2 | export * from "./box.types.js"; 3 | -------------------------------------------------------------------------------- /packages/elements/src/form/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./form.js"; 2 | export * from "./form.types.js"; 3 | -------------------------------------------------------------------------------- /packages/elements/src/img/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./img.js"; 2 | export * from "./img.types.js"; 3 | -------------------------------------------------------------------------------- /packages/elements/src/link/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./link.js"; 2 | export * from "./link.types.js"; 3 | -------------------------------------------------------------------------------- /packages/elements/src/list/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./list.js"; 2 | export * from "./list.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/link/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./link"; 2 | export * from "./link.types"; 3 | -------------------------------------------------------------------------------- /templates/static-ts-multi/src/locales/i18n.types.ts: -------------------------------------------------------------------------------- 1 | export type Ii18nBase = Record; 2 | -------------------------------------------------------------------------------- /templates/static-tsx-multi/src/locales/i18n.types.ts: -------------------------------------------------------------------------------- 1 | export type Ii18nBase = Record; -------------------------------------------------------------------------------- /docs/src/components/ui/card/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./card.js"; 2 | export * from "./card.types.js"; 3 | -------------------------------------------------------------------------------- /docs/src/components/ui/menu/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./menu.js"; 2 | export * from "./menu.types.js"; 3 | -------------------------------------------------------------------------------- /packages/elements/src/input/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./input.js"; 2 | export * from "./input.types.js"; 3 | -------------------------------------------------------------------------------- /packages/elements/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./uni-key.js"; 2 | export * from "./use-ref.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/button/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./button"; 2 | export * from "./button.types"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/card/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./card.js"; 2 | export * from "./card.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/chat/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./chat.js"; 2 | export * from "./chat.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/join/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./join.js"; 2 | export * from "./join.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/kbd/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./kbd.js"; 2 | export * from "./kbd.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/menu/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./menu.js"; 2 | export * from "./menu.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/radio/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./radio"; 2 | export * from "./radio.types"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/range/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./range"; 2 | export * from "./range.types"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/select/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./select"; 2 | export * from "./select.types"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/swap/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./swap.js"; 2 | export * from "./swap.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/tabs/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./tabs.js"; 2 | export * from "./tabs.types.js"; 3 | -------------------------------------------------------------------------------- /templates/spa-ts-multi/src/locales/i18n.types.ts: -------------------------------------------------------------------------------- 1 | export type Ii18nBase = Record; 2 | 3 | -------------------------------------------------------------------------------- /docs/src/components/ui/divider/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./divider.js"; 2 | export * from "./divider.types.js"; 3 | -------------------------------------------------------------------------------- /docs/src/components/ui/loading/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./loading.js"; 2 | export * from "./loading.types.js"; 3 | -------------------------------------------------------------------------------- /packages/elements/src/button/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./button.js"; 2 | export * from "./button.types.js"; 3 | -------------------------------------------------------------------------------- /packages/elements/src/section/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./section.js"; 2 | export * from "./section.types.js"; 3 | -------------------------------------------------------------------------------- /packages/elements/src/select/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./select.js"; 2 | export * from "./select.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/alert/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./alert.js"; 2 | export * from "./alert.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/badge/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./badge.js"; 2 | export * from "./badge.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/modal/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./modal.js"; 2 | export * from "./modal.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/steps/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./steps.js"; 2 | export * from "./steps.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/toast/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./toast.js"; 2 | export * from "./toast.types.js"; 3 | -------------------------------------------------------------------------------- /docs/src/components/ui/collapse/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./collapse.js"; 2 | export * from "./collapse.types.js"; 3 | -------------------------------------------------------------------------------- /docs/src/components/ui/dropdown/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./dropdown.js"; 2 | export * from "./dropdown.types.js"; 3 | -------------------------------------------------------------------------------- /packages/elements/src/fragment/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./fragment.js"; 2 | export * from "./fragment.types.js"; 3 | -------------------------------------------------------------------------------- /packages/elements/src/list-item/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./list-item.js"; 2 | export * from "./list-item.types.js"; 3 | -------------------------------------------------------------------------------- /packages/elements/src/progress/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./progress.js"; 2 | export * from "./progress.types.js"; 3 | -------------------------------------------------------------------------------- /packages/elements/src/text-area/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./text-area.js"; 2 | export * from "./text-area.types.js"; 3 | -------------------------------------------------------------------------------- /packages/inspector/src/runtime/index.ts: -------------------------------------------------------------------------------- 1 | export { __jayjs_debug__, JayJsInspectorRuntime } from "./inspector.js"; 2 | -------------------------------------------------------------------------------- /packages/ui/src/components/avatar/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./avatar.js"; 2 | export * from "./avatar.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/checkbox/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./checkbox"; 2 | export * from "./checkbox.types"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/divider/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./divider.js"; 2 | export * from "./divider.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/drawer/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./drawer.js"; 2 | export * from "./drawer.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/loading/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./loading.js"; 2 | export * from "./loading.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/navbar/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./navbar.js"; 2 | export * from "./navbar.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/progress/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./progress"; 2 | export * from "./progress.types"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/text-area/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./text-area"; 2 | export * from "./text-area.types"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/toggle/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./toggle.js"; 2 | export * from "./toggle.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/tooltip/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./tooltip.js"; 2 | export * from "./tooltip.types.js"; 3 | -------------------------------------------------------------------------------- /templates/spa-js/src/main.js: -------------------------------------------------------------------------------- 1 | import "./styles/globals.css"; 2 | import { Routes } from "./routes/routes"; 3 | Routes(); -------------------------------------------------------------------------------- /docs/public/assets/images/hero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AJCastello/jay-js/HEAD/docs/public/assets/images/hero.png -------------------------------------------------------------------------------- /docs/public/assets/images/user1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AJCastello/jay-js/HEAD/docs/public/assets/images/user1.jpg -------------------------------------------------------------------------------- /docs/public/assets/images/user2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AJCastello/jay-js/HEAD/docs/public/assets/images/user2.jpg -------------------------------------------------------------------------------- /docs/public/assets/images/user3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AJCastello/jay-js/HEAD/docs/public/assets/images/user3.jpg -------------------------------------------------------------------------------- /docs/src/components/ui/card-body/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./card-body.js"; 2 | export * from "./card-body.types.js"; 3 | -------------------------------------------------------------------------------- /docs/src/components/ui/card-title/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./card-title.js"; 2 | export * from "./card-title.types.js"; 3 | -------------------------------------------------------------------------------- /docs/src/components/ui/menu-item/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./menu-item.js"; 2 | export * from "./menu-item.types.js"; 3 | -------------------------------------------------------------------------------- /docs/src/utils/set-title.ts: -------------------------------------------------------------------------------- 1 | export function setTitle(title: string) { 2 | document.title = `${title} - JayJS`; 3 | } 4 | -------------------------------------------------------------------------------- /packages/elements/src/typography/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./typography.js"; 2 | export * from "./typography.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/card-body/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./card-body.js"; 2 | export * from "./card-body.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/collapse/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./collapse.js"; 2 | export * from "./collapse.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/dropdown/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./dropdown.js"; 2 | export * from "./dropdown.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/file-input/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./file-input"; 2 | export * from "./file-input.types"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/menu-item/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./menu-item.js"; 2 | export * from "./menu-item.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/modal-box/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./modal-box.js"; 2 | export * from "./modal-box.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/step-item/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./step-item.js"; 2 | export * from "./step-item.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/swap-item/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./swap-item.js"; 2 | export * from "./swap-item.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/tab-item/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./tab-item.js"; 2 | export * from "./tab-item.types.js"; 3 | -------------------------------------------------------------------------------- /templates/spa-ts/src/main.ts: -------------------------------------------------------------------------------- 1 | import "./styles/globals.css"; 2 | import { Routes } from "./routes/routes"; 3 | Routes(); 4 | -------------------------------------------------------------------------------- /templates/spa-tsx/src/main.ts: -------------------------------------------------------------------------------- 1 | import "./styles/globals.css"; 2 | import { Routes } from "./routes/routes"; 3 | Routes(); -------------------------------------------------------------------------------- /docs/src/components/ui/card-actions/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./card-actions.js"; 2 | export * from "./card-actions.types.js"; 3 | -------------------------------------------------------------------------------- /packages/elements/src/select-item/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./select-item.js"; 2 | export * from "./select-item.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/card-title/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./card-title.js"; 2 | export * from "./card-title.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/menu-title/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./menu-title.js"; 2 | export * from "./menu-title.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/text-input/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./text-input.js"; 2 | export * from "./text-input.types.js"; 3 | -------------------------------------------------------------------------------- /templates/spa-jsx/src/main.js: -------------------------------------------------------------------------------- 1 | import "./styles/globals.css"; 2 | import { Routes } from "./routes/routes"; 3 | Routes(); 4 | -------------------------------------------------------------------------------- /docs/public/assets/images/bg-signin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AJCastello/jay-js/HEAD/docs/public/assets/images/bg-signin.png -------------------------------------------------------------------------------- /docs/public/assets/images/mockup-app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AJCastello/jay-js/HEAD/docs/public/assets/images/mockup-app.png -------------------------------------------------------------------------------- /packages/static/src/vite-plugin/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./modules/jay-js-vite-static.js"; 2 | export * from "./types/index.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/breadcrumbs/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./breadcrumbs.js"; 2 | export * from "./breadcrumbs.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/card-actions/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./card-actions.js"; 2 | export * from "./card-actions.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/card-figure/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./card-figure.js"; 2 | export * from "./card-figure.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/date-picker/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./date-picker.js"; 2 | export * from "./date-picker.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/modal-action/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./modal-action.js"; 2 | export * from "./modal-action.types.js"; 3 | -------------------------------------------------------------------------------- /docs/public/assets/images/benefit-one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AJCastello/jay-js/HEAD/docs/public/assets/images/benefit-one.png -------------------------------------------------------------------------------- /docs/public/assets/images/benefit-two.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AJCastello/jay-js/HEAD/docs/public/assets/images/benefit-two.png -------------------------------------------------------------------------------- /docs/src/components/ui/collapse-title/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./collapse-title.js"; 2 | export * from "./collapse-title.types.js"; 3 | -------------------------------------------------------------------------------- /docs/src/components/ui/dropdown-label/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./dropdown-label.js"; 2 | export * from "./dropdown-label.types.js"; 3 | -------------------------------------------------------------------------------- /packages/cli/README.md: -------------------------------------------------------------------------------- 1 | # @jay-js/cli 2 | 3 | > A CLI for Jay JS 4 | 5 | The documentation is not yet available. Please check back later. -------------------------------------------------------------------------------- /packages/ui/src/components/chat-component/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./chat-component.js"; 2 | export * from "./chat-component.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/collapse-title/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./collapse-title.js"; 2 | export * from "./collapse-title.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/drawer-content/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./drawer-content.js"; 2 | export * from "./drawer-content.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/drawer-overlay/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./drawer-overlay.js"; 2 | export * from "./drawer-overlay.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/dropdown-label/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./dropdown-label.js"; 2 | export * from "./dropdown-label.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/modal-backdrop/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./modal-backdrop.js"; 2 | export * from "./modal-backdrop.types.js"; 3 | -------------------------------------------------------------------------------- /docs/src/components/ui/collapse-content/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./collapse-content.js"; 2 | export * from "./collapse-content.types.js"; 3 | -------------------------------------------------------------------------------- /docs/src/components/ui/dropdown-content/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./dropdown-content.js"; 2 | export * from "./dropdown-content.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/radial-progress/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./radial-progress.js"; 2 | export * from "./radial-progress.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/bottom-navigation/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./bottom-navigation.js"; 2 | export * from "./bottom-navigation.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/card-description/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./card-description.js"; 2 | export * from "./card-description.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/collapse-content/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./collapse-content.js"; 2 | export * from "./collapse-content.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/date-range-picker/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./date-range-picker.js"; 2 | export * from "./date-range-picker.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/dropdown-content/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./dropdown-content.js"; 2 | export * from "./dropdown-content.types.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/navbar-component/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./navbar-component.js"; 2 | export * from "./navbar-component.types.js"; 3 | -------------------------------------------------------------------------------- /packages/system/src/forms/resolvers/index.ts: -------------------------------------------------------------------------------- 1 | export { yupResolver } from "./yup-resolver.js"; 2 | export { zodResolver } from "./zod-resolver.js"; 3 | -------------------------------------------------------------------------------- /packages/ui/src/components/resizable-splitter/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./resizable-splitter.js"; 2 | export * from "./resizable-splitter.types.js"; 3 | -------------------------------------------------------------------------------- /packages/elements/src/box/box.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "../base"; 2 | 3 | export type TBox = TBase; 4 | -------------------------------------------------------------------------------- /packages/elements/src/select/select.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "../base"; 2 | 3 | export type TSelect = TBase; 4 | -------------------------------------------------------------------------------- /packages/static/README.md: -------------------------------------------------------------------------------- 1 | # @jay-js/static 2 | 3 | > A static site manager for Jay JS 4 | 5 | The documentation is not yet available. Please check back later. -------------------------------------------------------------------------------- /packages/ui/src/components/bottom-navigation-item/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./bottom-navigation-item.js"; 2 | export * from "./bottom-navigation-item.types.js"; 3 | -------------------------------------------------------------------------------- /packages/elements/src/form/form.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "../base/base.types.js"; 2 | export type TForm = TBase; 3 | -------------------------------------------------------------------------------- /packages/elements/src/img/img.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "../base/base.types.js"; 2 | 3 | export type TImg = TBase; 4 | -------------------------------------------------------------------------------- /packages/ui/src/components/resizable-splitter/resizable-splitter.types.ts: -------------------------------------------------------------------------------- 1 | export interface IResizableSplitter { 2 | direction?: "horizontal" | "vertical"; 3 | } 4 | -------------------------------------------------------------------------------- /packages/elements/src/link/link.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "../base/base.types.js"; 2 | 3 | export type TLink = TBase; 4 | -------------------------------------------------------------------------------- /packages/elements/src/list/list.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "../base/base.types.js"; 2 | 3 | export type TList = TBase; 4 | -------------------------------------------------------------------------------- /packages/ui/src/components/diff/diff.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TDiff = TBase; 4 | -------------------------------------------------------------------------------- /packages/ui/src/components/join/join.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TJoin = TBase; 4 | -------------------------------------------------------------------------------- /packages/elements/src/button/button.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "../base/base.types"; 2 | 3 | export type TButton = TBase; 4 | -------------------------------------------------------------------------------- /packages/elements/src/input/input.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "../base/base.types.js"; 2 | 3 | export type TInput = TBase; 4 | -------------------------------------------------------------------------------- /packages/jsx/src/types/global.d.ts: -------------------------------------------------------------------------------- 1 | declare global { 2 | interface Window { 3 | __jayjs_debug__?: (element: any, metadata: any) => void; 4 | } 5 | } 6 | 7 | export {}; 8 | -------------------------------------------------------------------------------- /packages/ui/src/components/navbar/navbar.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TNavbar = TBase; 4 | -------------------------------------------------------------------------------- /templates/spa-jsx/src/pages/about.jsx: -------------------------------------------------------------------------------- 1 | export function About() { 2 | return ( 3 |
4 | This is your lazy loaded About page. 5 |
6 | ) 7 | } -------------------------------------------------------------------------------- /templates/spa-tsx/src/pages/about.tsx: -------------------------------------------------------------------------------- 1 | export function About() { 2 | return ( 3 |
4 | This is your lazy loaded About page 5 |
6 | ) 7 | } -------------------------------------------------------------------------------- /templates/static-jsx/src/pages/about.jsx: -------------------------------------------------------------------------------- 1 | export function About() { 2 | return ( 3 |
4 | This is your lazy loaded About page. 5 |
6 | ) 7 | } -------------------------------------------------------------------------------- /templates/static-tsx/src/pages/about.tsx: -------------------------------------------------------------------------------- 1 | export function About() { 2 | return ( 3 |
4 | This is your lazy loaded About page 5 |
6 | ) 7 | } -------------------------------------------------------------------------------- /docs/src/components/ui/card-body/card-body.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TCardBody = TBase; 4 | -------------------------------------------------------------------------------- /packages/elements/src/progress/progress.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "../base/base.types.js"; 2 | 3 | export type TProgress = TBase; 4 | -------------------------------------------------------------------------------- /packages/elements/src/section/section.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "../base/base.types.js"; 2 | 3 | export type TSection = TBase; 4 | -------------------------------------------------------------------------------- /packages/elements/src/text-area/text-area.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "../base/index.js"; 2 | 3 | export type TTextArea = TBase; 4 | -------------------------------------------------------------------------------- /docs/src/components/ui/card-title/card-title.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TCardTitle = TBase; 4 | -------------------------------------------------------------------------------- /packages/elements/src/list-item/list-item.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "../base/base.types.js"; 2 | 3 | export type TListItem = TBase; 4 | -------------------------------------------------------------------------------- /packages/ui/src/components/card-body/card-body.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TCardBody = TBase; 4 | -------------------------------------------------------------------------------- /packages/ui/src/components/card-title/card-title.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TCardTitle = TBase; 4 | -------------------------------------------------------------------------------- /packages/ui/src/components/indicator/indicator.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TIndicator = TBase; 4 | -------------------------------------------------------------------------------- /packages/ui/src/components/menu-title/menu-title.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TMenuTitle = TBase; 4 | -------------------------------------------------------------------------------- /packages/ui/src/components/modal-box/modal-box.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TModalBox = TBase; 4 | -------------------------------------------------------------------------------- /docs/src/components/ui/card-actions/card-actions.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TCardActions = TBase; 4 | -------------------------------------------------------------------------------- /packages/elements/src/fragment/fragment.types.ts: -------------------------------------------------------------------------------- 1 | export interface IFragment extends Partial> { 2 | children: string | Node | (string | Node)[]; 3 | } 4 | -------------------------------------------------------------------------------- /packages/elements/src/select-item/select-item.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "../base/base.types.js"; 2 | 3 | export type TSelectItem = TBase; 4 | -------------------------------------------------------------------------------- /packages/elements/src/typography/typography.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "../base/base.types.js"; 2 | 3 | export type TTypography = TBase; 4 | -------------------------------------------------------------------------------- /packages/ui/src/components/breadcrumbs/breadcrumbs.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TBreadcrumbs = TBase; 4 | -------------------------------------------------------------------------------- /packages/ui/src/components/card-figure/card-figure.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TCardFigure = TBase; 4 | -------------------------------------------------------------------------------- /docs/src/components/ui/collapse-title/collapse-title.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TCollapseTitle = TBase; 4 | -------------------------------------------------------------------------------- /docs/src/components/ui/dropdown-label/dropdown-label.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TDropdownLabel = TBase; 4 | -------------------------------------------------------------------------------- /packages/cli/src/commands/init/modules/setup-test-tools.ts: -------------------------------------------------------------------------------- 1 | import type { IJayJSCLIInitOptions } from "../types"; 2 | 3 | export async function setupTestTools(_options: IJayJSCLIInitOptions) {} 4 | -------------------------------------------------------------------------------- /packages/ui/src/components/card-actions/card-actions.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TCardActions = TBase; 4 | -------------------------------------------------------------------------------- /packages/ui/src/components/diff-resizer/diff-resizer.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TDiffResizer = TBase; 4 | -------------------------------------------------------------------------------- /packages/ui/src/components/modal-action/modal-action.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TModalAction = TBase; 4 | -------------------------------------------------------------------------------- /docs/src/components/ui/collapse-content/collapse-content.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TCollapseContent = TBase; 4 | -------------------------------------------------------------------------------- /packages/ui/src/components/collapse-title/collapse-title.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TCollapseTitle = TBase; 4 | -------------------------------------------------------------------------------- /packages/ui/src/components/dropdown-label/dropdown-label.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TDropdownLabel = TBase; 4 | -------------------------------------------------------------------------------- /packages/ui/src/components/modal-backdrop/modal-backdrop.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TModalBackdrop = TBase; 4 | -------------------------------------------------------------------------------- /packages/ui/src/components/timeline-items/timeline-items.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TTimelineItems = TBase; 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | examples 3 | implement 4 | package-lock.json 5 | dist 6 | .turbo/ 7 | .nx/ 8 | .nx/cache 9 | pnpm-lock.yaml 10 | builder 11 | firebase.json 12 | .ai 13 | llm 14 | console -------------------------------------------------------------------------------- /docs/src/components/icons/icon.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBox } from "@jay-js/elements"; 2 | export type TAppIconOptions = TBox<"div">; 3 | export type TAppIcon = (options?: TAppIconOptions) => HTMLElement; 4 | -------------------------------------------------------------------------------- /docs/src/content/cli.collection.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | "title": "Overview", 4 | "slug": "overview", 5 | "category": "CLI", 6 | "categoryId": 1, 7 | "articleId": 1 8 | } 9 | ]; -------------------------------------------------------------------------------- /packages/cli/src/commands/build/modules/static/init-static.ts: -------------------------------------------------------------------------------- 1 | export async function initStatic() { 2 | const { staticCompiler } = await import("./static-compiler.js"); 3 | await staticCompiler(); 4 | } 5 | -------------------------------------------------------------------------------- /packages/cli/src/commands/init/templates/css-file.ts: -------------------------------------------------------------------------------- 1 | export function cssFile(): string { 2 | return `@import "tailwindcss"; 3 | 4 | html, 5 | body { 6 | @apply bg-zinc-800 text-zinc-100; 7 | }`; 8 | } 9 | -------------------------------------------------------------------------------- /packages/ui/src/components/card-description/card-description.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TCardDescription = TBase; 4 | -------------------------------------------------------------------------------- /packages/ui/src/components/collapse-content/collapse-content.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TCollapseContent = TBase; 4 | -------------------------------------------------------------------------------- /packages/ui/src/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./use-drawer.js"; 2 | export * from "./use-listener.js"; 3 | export * from "./use-modal.js"; 4 | export * from "./use-ref.js"; 5 | export * from "./use-toast.js"; 6 | -------------------------------------------------------------------------------- /templates/static-js/src/main.js: -------------------------------------------------------------------------------- 1 | import "./styles/globals.css"; 2 | import { resolvedRoutes } from "@jay-js/system"; 3 | import { Routes } from "./routes/routes"; 4 | Routes(); 5 | 6 | export default { resolvedRoutes } -------------------------------------------------------------------------------- /templates/static-jsx/src/main.js: -------------------------------------------------------------------------------- 1 | import "./styles/globals.css"; 2 | import { resolvedRoutes } from "@jay-js/system"; 3 | import { Routes } from "./routes/routes"; 4 | Routes(); 5 | 6 | export default { resolvedRoutes } -------------------------------------------------------------------------------- /templates/static-ts/src/main.ts: -------------------------------------------------------------------------------- 1 | import "./styles/globals.css"; 2 | import { resolvedRoutes } from "@jay-js/system"; 3 | import { Routes } from "./routes/routes"; 4 | Routes(); 5 | 6 | export default { resolvedRoutes } -------------------------------------------------------------------------------- /templates/static-tsx/src/main.ts: -------------------------------------------------------------------------------- 1 | import "./styles/globals.css"; 2 | import { resolvedRoutes } from "@jay-js/system"; 3 | import { Routes } from "./routes/routes"; 4 | Routes(); 5 | 6 | export default { resolvedRoutes } -------------------------------------------------------------------------------- /docs/src/content/conventions.collection.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | "title": "Overview", 4 | "slug": "overview", 5 | "category": "Conventions", 6 | "categoryId": 1, 7 | "articleId": 1 8 | } 9 | ]; -------------------------------------------------------------------------------- /docs/src/utils/cn.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | export function cn(...inputs: ClassValue[]): string { 5 | return twMerge(clsx(inputs)); 6 | } 7 | -------------------------------------------------------------------------------- /packages/inspector/src/index.ts: -------------------------------------------------------------------------------- 1 | export { jayJsInspector } from "./plugin/index.js"; 2 | export type { JayJsInspectorOptions } from "./plugin/types.js"; 3 | export { JayJsInspectorRuntime } from "./runtime/index.js"; 4 | -------------------------------------------------------------------------------- /packages/system/src/forms/index.ts: -------------------------------------------------------------------------------- 1 | export { useForm } from "./core/use-form.js"; 2 | export { yupResolver, zodResolver } from "./resolvers/index.js"; 3 | export * from "./types.js"; 4 | export * from "./utils/validators.js"; 5 | -------------------------------------------------------------------------------- /packages/ui/src/components/chat/chat.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TChat = { 4 | position?: "chat-start" | "chat-end"; 5 | } & TBase; 6 | -------------------------------------------------------------------------------- /packages/ui/src/components/diff-item/diff-item.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TDiffItem = { 4 | side?: "left" | "right"; 5 | } & TBase; 6 | -------------------------------------------------------------------------------- /packages/ui/src/components/drawer-overlay/drawer-overlay.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TDrawerOverlay = { 4 | id?: string; 5 | } & TBase; 6 | -------------------------------------------------------------------------------- /packages/ui/src/components/swap/swap.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TSwap = { 4 | effect?: "swap-rotate" | "swap-flip"; 5 | } & TBase; 6 | -------------------------------------------------------------------------------- /packages/ui/src/utils/cn.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | export function cn(...inputs: ClassValue[]): string { 5 | return twMerge(clsx(inputs)); 6 | } 7 | -------------------------------------------------------------------------------- /packages/ui/src/components/swap-item/swap-item.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TSwapItem = { 4 | state?: "swap-on" | "swap-off"; 5 | } & TBase; 6 | -------------------------------------------------------------------------------- /templates/spa-js/src/pages/about.js: -------------------------------------------------------------------------------- 1 | import { Section } from "@jay-js/elements"; 2 | 3 | export function About() { 4 | return Section({ 5 | tag: "section", 6 | children: "This is your lazy loaded About page." 7 | }) 8 | } -------------------------------------------------------------------------------- /templates/spa-ts/src/pages/about.ts: -------------------------------------------------------------------------------- 1 | import { Section } from "@jay-js/elements"; 2 | 3 | export function About() { 4 | return Section({ 5 | tag: "section", 6 | children: "This is your lazy loaded About page." 7 | }) 8 | } -------------------------------------------------------------------------------- /packages/ui/src/components/avatar/avatar.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type IAvatar = { 4 | state?: "avatar-online" | "avatar-offline"; 5 | } & TBase; 6 | -------------------------------------------------------------------------------- /templates/static-js/src/pages/about.js: -------------------------------------------------------------------------------- 1 | import { Section } from "@jay-js/elements"; 2 | 3 | export function About() { 4 | return Section({ 5 | tag: "section", 6 | children: "This is your lazy loaded About page." 7 | }) 8 | } -------------------------------------------------------------------------------- /templates/static-ts/src/pages/about.ts: -------------------------------------------------------------------------------- 1 | import { Section } from "@jay-js/elements"; 2 | 3 | export function About() { 4 | return Section({ 5 | tag: "section", 6 | children: "This is your lazy loaded About page." 7 | }) 8 | } -------------------------------------------------------------------------------- /docs/src/components/ui/icon/index.ts: -------------------------------------------------------------------------------- 1 | import { Typography } from "@jay-js/elements"; 2 | 3 | export function Icon(props: any) { 4 | return Typography({ 5 | tag: "i", 6 | ...props, 7 | children: props.icon, 8 | }); 9 | } 10 | -------------------------------------------------------------------------------- /docs/src/components/ui/kbd/kbd.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TKbd = { 4 | size?: "kbd-xl" | "kbd-lg" | "kbd-md" | "kbd-sm" | "kbd-xs"; 5 | } & TBase; 6 | -------------------------------------------------------------------------------- /packages/system/src/lazy/index.ts: -------------------------------------------------------------------------------- 1 | export { setLazyOptions } from "./core/configuration.js"; 2 | export { LazyModule } from "./core/lazy-module.js"; 3 | export * from "./types.js"; 4 | export { ModuleCollector } from "./utils/collector.js"; 5 | -------------------------------------------------------------------------------- /packages/system/src/utils/theme/index.ts: -------------------------------------------------------------------------------- 1 | export { themeDefineOptions } from "./core/configuration.js"; 2 | export { getCurrentTheme, initTheme, setTheme, toggleThemeMode } from "./core/theme-manager.js"; 3 | export * from "./types.js"; 4 | -------------------------------------------------------------------------------- /packages/ui/src/components/steps/steps.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TSteps = { 4 | orientation?: "steps-vertical" | "steps-horizontal"; 5 | } & TBase; 6 | -------------------------------------------------------------------------------- /templates/spa-jsx-multi/src/pages/about.jsx: -------------------------------------------------------------------------------- 1 | import { i18n } from "../locales/i18n"; 2 | 3 | export function About() { 4 | return ( 5 |
6 | {i18n("This is your lazy loaded About page.")} 7 |
8 | ) 9 | } -------------------------------------------------------------------------------- /templates/spa-tsx-multi/src/pages/about.tsx: -------------------------------------------------------------------------------- 1 | import { i18n } from "../locales/i18n"; 2 | 3 | export function About() { 4 | return ( 5 |
6 | {i18n("This is your lazy loaded About page.")} 7 |
8 | ) 9 | } -------------------------------------------------------------------------------- /templates/static-jsx-multi/src/pages/about.jsx: -------------------------------------------------------------------------------- 1 | import { i18n } from "../locales/i18n"; 2 | 3 | export function About() { 4 | return ( 5 |
6 | {i18n("This is your lazy loaded About page.")} 7 |
8 | ) 9 | } -------------------------------------------------------------------------------- /templates/static-tsx-multi/src/pages/about.tsx: -------------------------------------------------------------------------------- 1 | import { i18n } from "../locales/i18n"; 2 | 3 | export function About() { 4 | return ( 5 |
6 | {i18n("This is your lazy loaded About page.")} 7 |
8 | ) 9 | } -------------------------------------------------------------------------------- /docs/src/components/ui/divider/divider.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TDivider = { 4 | orientation?: "divider-vertical" | "divider-horizontal"; 5 | } & TBase; 6 | -------------------------------------------------------------------------------- /packages/ui/src/components/kbd/kbd.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TKbd = { 4 | size?: "kbd-xl" | "kbd-lg" | "kbd-md" | "kbd-sm" | "kbd-xs"; 5 | } & TBase; 6 | -------------------------------------------------------------------------------- /packages/ui/src/components/tabs/tabs.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TTabs = { 4 | variant?: "tabs-boxed" | "tabs-bordered" | "tabs-lifted"; 5 | } & TBase; 6 | -------------------------------------------------------------------------------- /packages/cli/src/commands/build/types/index.ts: -------------------------------------------------------------------------------- 1 | import type { Route } from "../../../types"; 2 | 3 | export type TBuildCommandOptions = { 4 | static: boolean; 5 | prepare: boolean; 6 | }; 7 | 8 | export type TResolvedRoutes = Map; 9 | -------------------------------------------------------------------------------- /packages/ui/src/components/divider/divider.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TDivider = { 4 | orientation?: "divider-vertical" | "divider-horizontal"; 5 | } & TBase; 6 | -------------------------------------------------------------------------------- /packages/ui/src/components/drawer-content/drawer-content.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TDrawerContent = { 4 | position?: "top" | "left" | "right" | "bottom"; 5 | } & TBase; 6 | -------------------------------------------------------------------------------- /packages/ui/src/components/stack/stack.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TStack = { 4 | position?: "stack-top" | "stack-bottom" | "stack-start" | "stack-end"; 5 | } & TBase; 6 | -------------------------------------------------------------------------------- /packages/ui/src/components/drawer/drawer.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TDrawer = { 4 | asChild?: boolean; 5 | position?: "top" | "left" | "right" | "bottom"; 6 | } & TBase; 7 | -------------------------------------------------------------------------------- /docs/src/components/ui/menu-item/menu-item.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBaseTagMap, TListItem } from "@jay-js/elements"; 2 | 3 | export type TMenuItem = { 4 | disabled?: boolean; 5 | active?: boolean; 6 | focus?: boolean; 7 | } & TListItem; 8 | -------------------------------------------------------------------------------- /docs/src/content/blog/third-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: third-post 3 | title: Third Post 4 | date: 2030-01-01 5 | description: This is your third blog post. 6 | --- 7 | 8 | # Third Post 9 | 10 | This is your third blog post content. Replace this with your own content. -------------------------------------------------------------------------------- /packages/system/src/state/index.ts: -------------------------------------------------------------------------------- 1 | export { State } from "./core/state.js"; 2 | export { subscriberManager } from "./core/subscriber.js"; 3 | export * from "./types.js"; 4 | export { CombineStates, Derived, Effect, PersistentState, Values } from "./utils/helpers.js"; 5 | -------------------------------------------------------------------------------- /packages/ui/src/components/menu-item/menu-item.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBaseTagMap, TListItem } from "@jay-js/elements"; 2 | 3 | export type TMenuItem = { 4 | disabled?: boolean; 5 | active?: boolean; 6 | focus?: boolean; 7 | } & TListItem; 8 | -------------------------------------------------------------------------------- /docs/src/components/ui/dropdown-content/dropdown-content.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TDropdownContent = { 4 | orientation?: "divider-vertical" | "divider-horizontal"; 5 | } & TBase; 6 | -------------------------------------------------------------------------------- /docs/src/components/ui/footer/footer.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TFooter = { 4 | position?: "footer-center"; 5 | direction?: "footer-vertical" | "footer-horizontal"; 6 | } & TBase; 7 | -------------------------------------------------------------------------------- /docs/src/pages/about.ts: -------------------------------------------------------------------------------- 1 | import { Section } from "@jay-js/elements"; 2 | import { intl } from "../locales"; 3 | 4 | export function About() { 5 | return Section({ 6 | tag: "section", 7 | children: intl("This is your lazy loaded About page."), 8 | }); 9 | } 10 | -------------------------------------------------------------------------------- /packages/ui/src/components/dropdown-content/dropdown-content.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TDropdownContent = { 4 | orientation?: "divider-vertical" | "divider-horizontal"; 5 | } & TBase; 6 | -------------------------------------------------------------------------------- /packages/ui/src/components/footer/footer.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TFooter = { 4 | position?: "footer-center"; 5 | direction?: "footer-vertical" | "footer-horizontal"; 6 | } & TBase; 7 | -------------------------------------------------------------------------------- /packages/ui/src/components/modal/modal.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TModal = { 4 | position?: "modal-top" | "modal-bottom" | "modal-middle" | "modal-start" | "modal-end"; 5 | } & TBase; 6 | -------------------------------------------------------------------------------- /packages/system/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export { uniKey } from "./core/keys.js"; 2 | export { 3 | selector, 4 | selectors, 5 | } from "./dom/query.js"; 6 | export { render } from "./dom/render.js"; 7 | export * from "./theme/index.js"; 8 | 9 | export * from "./types.js"; 10 | -------------------------------------------------------------------------------- /packages/ui/src/components/bottom-navigation-item/bottom-navigation-item.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TBottomNavigationItem = { 4 | active?: boolean; 5 | disabled?: boolean; 6 | } & TBase; 7 | -------------------------------------------------------------------------------- /packages/ui/src/components/navbar-component/navbar-component.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TNavbarComponent = { 4 | component?: "navbar-start" | "navbar-center" | "navbar-end"; 5 | } & TBase; 6 | -------------------------------------------------------------------------------- /packages/ui/src/components/radial-progress/radial-progress.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TRadialProgress = { 4 | value?: number; 5 | size?: string; 6 | thickness?: string; 7 | } & TBase; 8 | -------------------------------------------------------------------------------- /packages/ui/src/components/timeline/timeline.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TTimeline = { 4 | direction?: "timeline-vertical" | "timeline-horizontal"; 5 | compact?: boolean; 6 | } & TBase; 7 | -------------------------------------------------------------------------------- /templates/spa-js-multi/src/main.js: -------------------------------------------------------------------------------- 1 | import "./styles/globals.css"; 2 | import { i18nProvider } from "@jay-js/system"; 3 | import { Routes } from "./routes/routes"; 4 | import { i18nConfig } from "./locales/i18n"; 5 | 6 | i18nProvider(() => { 7 | Routes(); 8 | }, i18nConfig); 9 | -------------------------------------------------------------------------------- /templates/spa-jsx-multi/src/main.js: -------------------------------------------------------------------------------- 1 | import "./styles/globals.css"; 2 | import { i18nProvider } from "@jay-js/system"; 3 | import { Routes } from "./routes/routes"; 4 | import { i18nConfig } from "./locales/i18n"; 5 | 6 | i18nProvider(() => { 7 | Routes(); 8 | }, i18nConfig); 9 | -------------------------------------------------------------------------------- /templates/spa-ts-multi/src/main.ts: -------------------------------------------------------------------------------- 1 | import "./styles/globals.css"; 2 | import { i18nProvider } from "@jay-js/system"; 3 | import { Routes } from "./routes/routes"; 4 | import { i18nConfig } from "./locales/i18n"; 5 | 6 | i18nProvider(() => { 7 | Routes(); 8 | }, i18nConfig); 9 | -------------------------------------------------------------------------------- /templates/spa-tsx-multi/src/main.ts: -------------------------------------------------------------------------------- 1 | import "./styles/globals.css"; 2 | import { i18nProvider } from "@jay-js/system"; 3 | import { Routes } from "./routes/routes"; 4 | import { i18nConfig } from "./locales/i18n"; 5 | 6 | i18nProvider(() => { 7 | Routes(); 8 | }, i18nConfig); 9 | -------------------------------------------------------------------------------- /clean-package.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": { 3 | "main": "index.js", 4 | "types": "index.d.ts" 5 | }, 6 | "remove": [ 7 | "files", 8 | "exports", 9 | "scripts", 10 | "publishConfig", 11 | "clean-package", 12 | "devDependencies" 13 | ] 14 | } -------------------------------------------------------------------------------- /docs/src/content/blog/second-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: second-post 3 | title: Second Post 4 | date: 2030-01-01 5 | description: This is your second blog post. 6 | --- 7 | 8 | # Second Post 9 | 10 | This is your second blog post content. Replace this with your own content. 11 | -------------------------------------------------------------------------------- /packages/static/src/vite-plugin/utils/extract-module-parameter.ts: -------------------------------------------------------------------------------- 1 | export function extractModuleParameter(module: string, line: string) { 2 | const regex = new RegExp(`"${module}\\(([^")]+)\\)"`); 3 | const match = line.match(regex); 4 | return match ? match[1].trim() : null; 5 | } 6 | -------------------------------------------------------------------------------- /templates/static-js/src/content/blog/third-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: third-post 3 | title: Third Post 4 | date: 2030-01-01 5 | description: This is your third blog post. 6 | --- 7 | 8 | # Third Post 9 | 10 | This is your third blog post content. Replace this with your own content. -------------------------------------------------------------------------------- /templates/static-jsx/src/content/blog/third-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: third-post 3 | title: Third Post 4 | date: 2030-01-01 5 | description: This is your third blog post. 6 | --- 7 | 8 | # Third Post 9 | 10 | This is your third blog post content. Replace this with your own content. -------------------------------------------------------------------------------- /templates/static-ts/src/content/blog/third-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: third-post 3 | title: Third Post 4 | date: 2030-01-01 5 | description: This is your third blog post. 6 | --- 7 | 8 | # Third Post 9 | 10 | This is your third blog post content. Replace this with your own content. -------------------------------------------------------------------------------- /templates/static-tsx/src/content/blog/third-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: third-post 3 | title: Third Post 4 | date: 2030-01-01 5 | description: This is your third blog post. 6 | --- 7 | 8 | # Third Post 9 | 10 | This is your third blog post content. Replace this with your own content. -------------------------------------------------------------------------------- /docs/src/components/ui/collapse/collapse.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TCollapse = { 4 | variant?: "collapse-arrow" | "collapse-plus"; 5 | forceOpen?: boolean; 6 | forceClose?: boolean; 7 | } & TBase; 8 | -------------------------------------------------------------------------------- /packages/ui/src/components/bottom-navigation/bottom-navigation.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type IBottomNavigation = { 4 | size?: "btm-nav-xs" | "btm-nav-sm" | "btm-nav-md" | "btm-nav-lg"; 5 | } & TBase; 6 | -------------------------------------------------------------------------------- /templates/spa-js-multi/src/pages/about.js: -------------------------------------------------------------------------------- 1 | import { Section } from "@jay-js/elements"; 2 | import { i18n } from "../locales/i18n"; 3 | 4 | export function About() { 5 | return Section({ 6 | tag: "section", 7 | children: i18n("This is your lazy loaded About page."), 8 | }) 9 | } -------------------------------------------------------------------------------- /templates/spa-ts-multi/src/pages/about.ts: -------------------------------------------------------------------------------- 1 | import { Section } from "@jay-js/elements"; 2 | import { i18n } from "../locales/i18n"; 3 | 4 | export function About() { 5 | return Section({ 6 | tag: "section", 7 | children: i18n("This is your lazy loaded About page."), 8 | }) 9 | } -------------------------------------------------------------------------------- /templates/static-js-multi/src/content/blog/third-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: third-post 3 | title: Third Post 4 | date: 2030-01-01 5 | description: This is your third blog post. 6 | --- 7 | 8 | # Third Post 9 | 10 | This is your third blog post content. Replace this with your own content. -------------------------------------------------------------------------------- /templates/static-js-multi/src/pages/about.js: -------------------------------------------------------------------------------- 1 | import { Section } from "@jay-js/elements"; 2 | import { i18n } from "../locales/i18n"; 3 | 4 | export function About() { 5 | return Section({ 6 | tag: "section", 7 | children: i18n("This is your lazy loaded About page."), 8 | }) 9 | } -------------------------------------------------------------------------------- /templates/static-ts-multi/src/content/blog/third-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: third-post 3 | title: Third Post 4 | date: 2030-01-01 5 | description: This is your third blog post. 6 | --- 7 | 8 | # Third Post 9 | 10 | This is your third blog post content. Replace this with your own content. -------------------------------------------------------------------------------- /templates/static-ts-multi/src/pages/about.ts: -------------------------------------------------------------------------------- 1 | import { Section } from "@jay-js/elements"; 2 | import { i18n } from "../locales/i18n"; 3 | 4 | export function About() { 5 | return Section({ 6 | tag: "section", 7 | children: i18n("This is your lazy loaded About page."), 8 | }) 9 | } -------------------------------------------------------------------------------- /docs/src/components/navbar/search-form.ts: -------------------------------------------------------------------------------- 1 | import { Box, Input } from "@jay-js/elements"; 2 | 3 | export function SearchForm() { 4 | return Box({ 5 | children: Input({ 6 | type: "search", 7 | placeholder: "Search", 8 | className: "w-64 pr-24", 9 | }), 10 | }); 11 | } 12 | -------------------------------------------------------------------------------- /packages/ui/src/components/collapse/collapse.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TCollapse = { 4 | variant?: "collapse-arrow" | "collapse-plus"; 5 | forceOpen?: boolean; 6 | forceClose?: boolean; 7 | } & TBase; 8 | -------------------------------------------------------------------------------- /packages/ui/src/components/rating/rating.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TRating = { 4 | size?: "rating-lg" | "rating-md" | "rating-sm" | "rating-xs"; 5 | half?: boolean; 6 | hidden?: boolean; 7 | } & TBase; 8 | -------------------------------------------------------------------------------- /packages/ui/src/components/tab-item/tab-item.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TTabItem = { 4 | size?: "tab-xs" | "tab-sm" | "tab-md" | "tab-lg"; 5 | active?: boolean; 6 | disabled?: boolean; 7 | } & TBase; 8 | -------------------------------------------------------------------------------- /templates/spa-js-multi/src/locales/en-us.js: -------------------------------------------------------------------------------- 1 | const enUs = { 2 | "Welcome to Jay JS!": "Welcome to Jay JS!", 3 | "Home": "Home", 4 | "About": "About", 5 | "Blog": "Blog", 6 | "This is your lazy loaded About page.": "This is your lazy loaded About page." 7 | } 8 | 9 | export default enUs; -------------------------------------------------------------------------------- /templates/spa-jsx-multi/src/locales/en-us.js: -------------------------------------------------------------------------------- 1 | const enUs = { 2 | "Welcome to Jay JS!": "Welcome to Jay JS!", 3 | "Home": "Home", 4 | "About": "About", 5 | "Blog": "Blog", 6 | "This is your lazy loaded About page.": "This is your lazy loaded About page." 7 | } 8 | 9 | export default enUs; -------------------------------------------------------------------------------- /templates/static-js/src/content/blog/hello-world.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: hello-world 3 | title: Hello World 4 | date: 2030-01-01 5 | description: This is your first blog post. 6 | --- 7 | 8 | # Hello World 9 | 10 | This is your first blog post content. Replace this with your own content. 11 | -------------------------------------------------------------------------------- /templates/static-jsx-multi/src/content/blog/third-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: third-post 3 | title: Third Post 4 | date: 2030-01-01 5 | description: This is your third blog post. 6 | --- 7 | 8 | # Third Post 9 | 10 | This is your third blog post content. Replace this with your own content. -------------------------------------------------------------------------------- /templates/static-jsx/src/content/blog/hello-world.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: hello-world 3 | title: Hello World 4 | date: 2030-01-01 5 | description: This is your first blog post. 6 | --- 7 | 8 | # Hello World 9 | 10 | This is your first blog post content. Replace this with your own content. 11 | -------------------------------------------------------------------------------- /templates/static-ts/src/content/blog/hello-world.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: hello-world 3 | title: Hello World 4 | date: 2030-01-01 5 | description: This is your first blog post. 6 | --- 7 | 8 | # Hello World 9 | 10 | This is your first blog post content. Replace this with your own content. 11 | -------------------------------------------------------------------------------- /templates/static-tsx-multi/src/content/blog/third-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: third-post 3 | title: Third Post 4 | date: 2030-01-01 5 | description: This is your third blog post. 6 | --- 7 | 8 | # Third Post 9 | 10 | This is your third blog post content. Replace this with your own content. -------------------------------------------------------------------------------- /templates/static-tsx/src/content/blog/hello-world.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: hello-world 3 | title: Hello World 4 | date: 2030-01-01 5 | description: This is your first blog post. 6 | --- 7 | 8 | # Hello World 9 | 10 | This is your first blog post content. Replace this with your own content. 11 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | indent_style = space 8 | indent_size = 2 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = false 12 | insert_final_newline = false -------------------------------------------------------------------------------- /docs/src/components/ui/menu/menu.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBaseTagMap, TList } from "@jay-js/elements"; 2 | 3 | export type TMenu = { 4 | size?: "menu-xs" | "menu-sm" | "menu-md" | "menu-lg" | "menu-xl"; 5 | position?: "menu-vertical" | "menu-horizontal"; 6 | } & TList; 7 | -------------------------------------------------------------------------------- /docs/src/locales/index.ts: -------------------------------------------------------------------------------- 1 | import { useI18n } from "@jay-js/system"; 2 | // import defaultLanguage from "./languages/en-us"; 3 | 4 | // export type Ti18n = Record; 5 | export type Ti18n = Record; 6 | 7 | export const intl = useI18n(); 8 | -------------------------------------------------------------------------------- /packages/elements/src/outlet/outlet.ts: -------------------------------------------------------------------------------- 1 | import { Base } from "../base/base.js"; 2 | 3 | export function Outlet(): HTMLDivElement { 4 | return Base({ 5 | style: { 6 | display: "contents", 7 | }, 8 | dataset: { 9 | router: "outlet", 10 | }, 11 | }) as HTMLDivElement; 12 | } 13 | -------------------------------------------------------------------------------- /packages/ui/src/components/timeline-item/timeline-item.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type ITimelineItem = { 4 | component?: "timeline-start" | "timeline-middle" | "timeline-end"; 5 | boxed?: boolean; 6 | } & TBase; 7 | -------------------------------------------------------------------------------- /templates/static-js-multi/src/content/blog/hello-world.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: hello-world 3 | title: Hello World 4 | date: 2030-01-01 5 | description: This is your first blog post. 6 | --- 7 | 8 | # Hello World 9 | 10 | This is your first blog post content. Replace this with your own content. 11 | -------------------------------------------------------------------------------- /templates/static-js-multi/src/locales/en-us.js: -------------------------------------------------------------------------------- 1 | const enUs = { 2 | "Welcome to Jay JS!": "Welcome to Jay JS!", 3 | "Home": "Home", 4 | "About": "About", 5 | "Blog": "Blog", 6 | "This is your lazy loaded About page.": "This is your lazy loaded About page." 7 | } 8 | 9 | export default enUs; -------------------------------------------------------------------------------- /templates/static-js/src/content/blog/second-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: second-post 3 | title: Second Post 4 | date: 2030-01-01 5 | description: This is your second blog post. 6 | --- 7 | 8 | # Second Post 9 | 10 | This is your second blog post content. Replace this with your own content. 11 | -------------------------------------------------------------------------------- /templates/static-jsx-multi/src/locales/en-us.js: -------------------------------------------------------------------------------- 1 | const enUs = { 2 | "Welcome to Jay JS!": "Welcome to Jay JS!", 3 | "Home": "Home", 4 | "About": "About", 5 | "Blog": "Blog", 6 | "This is your lazy loaded About page.": "This is your lazy loaded About page." 7 | } 8 | 9 | export default enUs; -------------------------------------------------------------------------------- /templates/static-jsx/src/content/blog/second-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: second-post 3 | title: Second Post 4 | date: 2030-01-01 5 | description: This is your second blog post. 6 | --- 7 | 8 | # Second Post 9 | 10 | This is your second blog post content. Replace this with your own content. 11 | -------------------------------------------------------------------------------- /templates/static-ts-multi/src/content/blog/hello-world.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: hello-world 3 | title: Hello World 4 | date: 2030-01-01 5 | description: This is your first blog post. 6 | --- 7 | 8 | # Hello World 9 | 10 | This is your first blog post content. Replace this with your own content. 11 | -------------------------------------------------------------------------------- /templates/static-ts/src/content/blog/second-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: second-post 3 | title: Second Post 4 | date: 2030-01-01 5 | description: This is your second blog post. 6 | --- 7 | 8 | # Second Post 9 | 10 | This is your second blog post content. Replace this with your own content. 11 | -------------------------------------------------------------------------------- /templates/static-tsx/src/content/blog/second-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: second-post 3 | title: Second Post 4 | date: 2030-01-01 5 | description: This is your second blog post. 6 | --- 7 | 8 | # Second Post 9 | 10 | This is your second blog post content. Replace this with your own content. 11 | -------------------------------------------------------------------------------- /packages/ui/src/components/menu/menu.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBaseTagMap, TList } from "@jay-js/elements"; 2 | 3 | export type TMenu = { 4 | size?: "menu-xs" | "menu-sm" | "menu-md" | "menu-lg" | "menu-xl"; 5 | position?: "menu-vertical" | "menu-horizontal"; 6 | } & TList; 7 | -------------------------------------------------------------------------------- /templates/static-js-multi/src/content/blog/second-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: second-post 3 | title: Second Post 4 | date: 2030-01-01 5 | description: This is your second blog post. 6 | --- 7 | 8 | # Second Post 9 | 10 | This is your second blog post content. Replace this with your own content. 11 | -------------------------------------------------------------------------------- /templates/static-jsx-multi/src/content/blog/hello-world.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: hello-world 3 | title: Hello World 4 | date: 2030-01-01 5 | description: This is your first blog post. 6 | --- 7 | 8 | # Hello World 9 | 10 | This is your first blog post content. Replace this with your own content. 11 | -------------------------------------------------------------------------------- /templates/static-jsx-multi/src/content/blog/second-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: second-post 3 | title: Second Post 4 | date: 2030-01-01 5 | description: This is your second blog post. 6 | --- 7 | 8 | # Second Post 9 | 10 | This is your second blog post content. Replace this with your own content. 11 | -------------------------------------------------------------------------------- /templates/static-ts-multi/src/content/blog/second-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: second-post 3 | title: Second Post 4 | date: 2030-01-01 5 | description: This is your second blog post. 6 | --- 7 | 8 | # Second Post 9 | 10 | This is your second blog post content. Replace this with your own content. 11 | -------------------------------------------------------------------------------- /templates/static-tsx-multi/src/content/blog/hello-world.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: hello-world 3 | title: Hello World 4 | date: 2030-01-01 5 | description: This is your first blog post. 6 | --- 7 | 8 | # Hello World 9 | 10 | This is your first blog post content. Replace this with your own content. 11 | -------------------------------------------------------------------------------- /templates/static-tsx-multi/src/content/blog/second-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: second-post 3 | title: Second Post 4 | date: 2030-01-01 5 | description: This is your second blog post. 6 | --- 7 | 8 | # Second Post 9 | 10 | This is your second blog post content. Replace this with your own content. 11 | -------------------------------------------------------------------------------- /packages/cli/src/commands/build/modules/static/proxy.ts: -------------------------------------------------------------------------------- 1 | const queryParams = new URL(import.meta.url).searchParams; 2 | const originalPath = queryParams.get("path"); 3 | 4 | if (originalPath === null) { 5 | throw new Error("'path' query parameter is required"); 6 | } 7 | 8 | export default originalPath; 9 | -------------------------------------------------------------------------------- /packages/elements/src/box/box.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "../base"; 2 | import type { TBox } from "./box.types"; 3 | 4 | export function Box(props: TBox = { tag: "div" }): HTMLElementTagNameMap[T] { 5 | return Base(props) as HTMLElementTagNameMap[T]; 6 | } 7 | -------------------------------------------------------------------------------- /packages/cli/src/commands/ui/types/index.ts: -------------------------------------------------------------------------------- 1 | export interface ComponentDownloadOptions { 2 | components: string[]; 3 | targetPath?: string; 4 | } 5 | 6 | export interface GitHubApiFile { 7 | name: string; 8 | path: string; 9 | type: "file" | "dir"; 10 | download_url: string; 11 | size: number; 12 | } 13 | -------------------------------------------------------------------------------- /docs/public/assets/images/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /docs/src/content/blog/getting-started.md: -------------------------------------------------------------------------------- 1 | --- 2 | category: Introduction 3 | categoryId: 1 4 | postId: 1 5 | slug: getting-started 6 | title: Getting Started 7 | description: Getting started with your new blog. 8 | --- 9 | 10 | # How It Works 11 | 12 | This is your first blog post content. Replace this with your own content. 13 | -------------------------------------------------------------------------------- /packages/ui/src/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @author: AJCastello 3 | * @version: 1.0.2 4 | * @date: 2023-04-30 5 | * @description: Jay-JS UI component library for building responsive and scalable web applications. 6 | * @license: MIT 7 | * 8 | */ 9 | 10 | export * from "./components/index.js"; 11 | export * from "./hooks/index.js"; 12 | -------------------------------------------------------------------------------- /templates/static-js-multi/src/main.js: -------------------------------------------------------------------------------- 1 | import "./styles/globals.css"; 2 | import { i18nProvider, resolvedRoutes } from "@jay-js/system"; 3 | import { Routes } from "./routes/routes"; 4 | import { i18nConfig } from "./locales/i18n"; 5 | 6 | i18nProvider(() => { 7 | Routes(); 8 | }, i18nConfig); 9 | 10 | export default { resolvedRoutes } -------------------------------------------------------------------------------- /templates/static-ts-multi/src/main.ts: -------------------------------------------------------------------------------- 1 | import "./styles/globals.css"; 2 | import { i18nProvider, resolvedRoutes } from "@jay-js/system"; 3 | import { Routes } from "./routes/routes"; 4 | import { i18nConfig } from "./locales/i18n"; 5 | 6 | i18nProvider(() => { 7 | Routes(); 8 | }, i18nConfig); 9 | 10 | export default { resolvedRoutes } -------------------------------------------------------------------------------- /packages/static/src/vite-plugin/utils/reduce-metadata.ts: -------------------------------------------------------------------------------- 1 | export function reduceMetadata(parsedContent: any, metadata?: Array) { 2 | if (metadata === undefined) { 3 | return parsedContent; 4 | } 5 | return metadata.reduce((acc, item) => { 6 | (acc as any)[item] = parsedContent[item]; 7 | return acc; 8 | }, {}); 9 | } 10 | -------------------------------------------------------------------------------- /templates/static-js/src/utils/use-collection.js: -------------------------------------------------------------------------------- 1 | export function useCollection({ dir, metadata }) { 2 | return { 3 | dir, 4 | metadata, 5 | async get() { 6 | const filePath = `../content/${this.dir}.collection.js`; 7 | const data = await import(/* @vite-ignore */ filePath); 8 | return data.default; 9 | }, 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /templates/static-jsx-multi/src/main.js: -------------------------------------------------------------------------------- 1 | import "./styles/globals.css"; 2 | import { i18nProvider, resolvedRoutes } from "@jay-js/system"; 3 | import { Routes } from "./routes/routes"; 4 | import { i18nConfig } from "./locales/i18n"; 5 | 6 | i18nProvider(() => { 7 | Routes(); 8 | }, i18nConfig); 9 | 10 | export default { resolvedRoutes } -------------------------------------------------------------------------------- /templates/static-tsx-multi/src/main.ts: -------------------------------------------------------------------------------- 1 | import "./styles/globals.css"; 2 | import { i18nProvider, resolvedRoutes } from "@jay-js/system"; 3 | import { Routes } from "./routes/routes"; 4 | import { i18nConfig } from "./locales/i18n"; 5 | 6 | i18nProvider(() => { 7 | Routes(); 8 | }, i18nConfig); 9 | 10 | export default { resolvedRoutes } -------------------------------------------------------------------------------- /docs/src/components/ui/card/card.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TCard = { 4 | imagePosition?: "left" | "right"; 5 | imageFull?: boolean; 6 | variant?: "card-border" | "card-dash"; 7 | size?: "card-xs" | "card-sm" | "card-md" | "card-lg" | "card-xl"; 8 | } & TBase; 9 | -------------------------------------------------------------------------------- /docs/src/components/ui/dropdown/dropdown.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TDropdown = { 4 | position?: "dropdown-top" | "dropdown-bottom" | "dropdown-left" | "dropdown-right"; 5 | openOnHover?: boolean; 6 | forceOpen?: boolean; 7 | toEnd?: boolean; 8 | } & TBase; 9 | -------------------------------------------------------------------------------- /docs/src/layouts/site.layout.ts: -------------------------------------------------------------------------------- 1 | import { Outlet, Section } from "@jay-js/elements"; 2 | import { Footer } from "../components/common/footer"; 3 | import { NavBar } from "../components/common/navbar"; 4 | 5 | export function SiteLayout() { 6 | return Section({ 7 | tag: "main", 8 | children: [NavBar(), Outlet(), Footer()], 9 | }); 10 | } 11 | -------------------------------------------------------------------------------- /packages/elements/src/form/form.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "../base"; 2 | import type { TForm } from "./form.types"; 3 | 4 | export function Form({ ...props }: TForm): HTMLElementTagNameMap[T] { 5 | return Base({ 6 | ...props, 7 | tag: "form", 8 | }) as HTMLElementTagNameMap[T]; 9 | } 10 | -------------------------------------------------------------------------------- /packages/ui/src/components/dropdown/dropdown.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TDropdown = { 4 | position?: "dropdown-top" | "dropdown-bottom" | "dropdown-left" | "dropdown-right"; 5 | openOnHover?: boolean; 6 | forceOpen?: boolean; 7 | toEnd?: boolean; 8 | } & TBase; 9 | -------------------------------------------------------------------------------- /templates/static-jsx/src/utils/use-collection.js: -------------------------------------------------------------------------------- 1 | export function useCollection({ dir, metadata }) { 2 | return { 3 | dir, 4 | metadata, 5 | async get() { 6 | const filePath = `../content/${this.dir}.collection.js`; 7 | const data = await import(/* @vite-ignore */ filePath); 8 | return data.default; 9 | }, 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /packages/ui/src/components/card/card.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TCard = { 4 | imagePosition?: "left" | "right"; 5 | imageFull?: boolean; 6 | variant?: "card-border" | "card-dash"; 7 | size?: "card-xs" | "card-sm" | "card-md" | "card-lg" | "card-xl"; 8 | } & TBase; 9 | -------------------------------------------------------------------------------- /packages/ui/src/components/indicator-item/indicator-item.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TIndicatorItem = { 4 | vertical?: "indicator-top" | "indicator-middle" | "indicator-bottom"; 5 | horizontal?: "indicator-start" | "indicator-center" | "indicator-end"; 6 | } & TBase; 7 | -------------------------------------------------------------------------------- /templates/static-js-multi/src/utils/use-collection.js: -------------------------------------------------------------------------------- 1 | export function useCollection({ dir, metadata }) { 2 | return { 3 | dir, 4 | metadata, 5 | async get() { 6 | const filePath = `../content/${this.dir}.collection.js`; 7 | const data = await import(/* @vite-ignore */ filePath); 8 | return data.default; 9 | }, 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /templates/static-jsx-multi/src/utils/use-collection.js: -------------------------------------------------------------------------------- 1 | export function useCollection({ dir, metadata }) { 2 | return { 3 | dir, 4 | metadata, 5 | async get() { 6 | const filePath = `../content/${this.dir}.collection.js`; 7 | const data = await import(/* @vite-ignore */ filePath); 8 | return data.default; 9 | }, 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /packages/elements/src/img/img.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "../base"; 2 | import type { TImg } from "./img.types"; 3 | 4 | export function Img({ ...props }: TImg = { tag: "img" }): HTMLElementTagNameMap[T] { 5 | return Base({ 6 | ...props, 7 | tag: "img", 8 | }) as HTMLElementTagNameMap[T]; 9 | } 10 | -------------------------------------------------------------------------------- /packages/elements/src/link/link.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "../base"; 2 | import type { TLink } from "./link.types"; 3 | 4 | export function Link({ ...props }: TLink = { tag: "a" }): HTMLElementTagNameMap[T] { 5 | return Base({ 6 | ...props, 7 | tag: "a", 8 | }) as HTMLElementTagNameMap[T]; 9 | } 10 | -------------------------------------------------------------------------------- /packages/elements/src/list/list.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "../base"; 2 | import type { TList } from "./list.types"; 3 | 4 | export function List({ ...props }: TList = { tag: "ul" }): HTMLElementTagNameMap[T] { 5 | return Base({ 6 | tag: "ul", 7 | ...props, 8 | }) as HTMLElementTagNameMap[T]; 9 | } 10 | -------------------------------------------------------------------------------- /docs/src/main.ts: -------------------------------------------------------------------------------- 1 | import "./styles/globals.css"; 2 | import "./styles/fscroll.css"; 3 | import { i18nProvider, initTheme, resolvedRoutes } from "@jay-js/system"; 4 | import i18nConfig from "./locales/config"; 5 | import { Routes } from "./routes/routes"; 6 | 7 | initTheme(); 8 | i18nProvider(Routes, i18nConfig); 9 | 10 | export default { resolvedRoutes }; 11 | -------------------------------------------------------------------------------- /packages/static/src/vite-plugin/types/index.ts: -------------------------------------------------------------------------------- 1 | export interface IJayJsViteOptions { 2 | contentPath: string; 3 | } 4 | 5 | export interface Metadata { 6 | [key: string]: any; 7 | } 8 | 9 | export interface IBuildCollection { 10 | contentPath: string; 11 | dir: string; 12 | format?: string; 13 | metadata?: Array; 14 | suffix?: string; 15 | } 16 | -------------------------------------------------------------------------------- /templates/spa-ts-multi/src/locales/en-us.ts: -------------------------------------------------------------------------------- 1 | import { Ii18nBase } from "./i18n.types"; 2 | 3 | const enUs: Ii18nBase = { 4 | "Welcome to Jay JS!": "Welcome to Jay JS!", 5 | "Home": "Home", 6 | "About": "About", 7 | "Blog": "Blog", 8 | "This is your lazy loaded About page.": "This is your lazy loaded About page." 9 | } 10 | 11 | export default enUs; -------------------------------------------------------------------------------- /templates/spa-tsx-multi/src/locales/en-us.ts: -------------------------------------------------------------------------------- 1 | import { Ii18nBase } from "./i18n.types"; 2 | 3 | const enUs: Ii18nBase = { 4 | "Welcome to Jay JS!": "Welcome to Jay JS!", 5 | "Home": "Home", 6 | "About": "About", 7 | "Blog": "Blog", 8 | "This is your lazy loaded About page.": "This is your lazy loaded About page." 9 | } 10 | 11 | export default enUs; -------------------------------------------------------------------------------- /templates/static-ts-multi/src/locales/en-us.ts: -------------------------------------------------------------------------------- 1 | import { Ii18nBase } from "./i18n.types"; 2 | 3 | const enUs: Ii18nBase = { 4 | "Welcome to Jay JS!": "Welcome to Jay JS!", 5 | "Home": "Home", 6 | "About": "About", 7 | "Blog": "Blog", 8 | "This is your lazy loaded About page.": "This is your lazy loaded About page." 9 | } 10 | 11 | export default enUs; -------------------------------------------------------------------------------- /templates/static-tsx-multi/src/locales/en-us.ts: -------------------------------------------------------------------------------- 1 | import { Ii18nBase } from "./i18n.types"; 2 | 3 | const enUs: Ii18nBase = { 4 | "Welcome to Jay JS!": "Welcome to Jay JS!", 5 | "Home": "Home", 6 | "About": "About", 7 | "Blog": "Blog", 8 | "This is your lazy loaded About page.": "This is your lazy loaded About page." 9 | } 10 | 11 | export default enUs; -------------------------------------------------------------------------------- /workspace.json: -------------------------------------------------------------------------------- 1 | { 2 | "projects": { 3 | "@jay-js/system": { 4 | "targets": { 5 | "test": { 6 | "executor": "@nx/jest:jest", 7 | "options": { 8 | "jestConfig": "packages/system/jest.config.js", 9 | "tsConfig": "packages/system/tsconfig.json", 10 | "passWithNoTests": true 11 | } 12 | } 13 | } 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /docs/src/components/common/loader.ts: -------------------------------------------------------------------------------- 1 | import { Box } from "@jay-js/elements"; 2 | import { Loading } from "../ui"; 3 | 4 | export function Loader() { 5 | return Box({ 6 | className: "flex justify-center items-center p-10 h-full w-full flex-grow", 7 | children: Loading({ 8 | className: "text-primary", 9 | size: "loading-lg", 10 | }), 11 | }); 12 | } 13 | -------------------------------------------------------------------------------- /packages/ui/src/components/step-item/step-item.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TStepItem = { 4 | color?: 5 | | "step-primary" 6 | | "step-secondary" 7 | | "step-accent" 8 | | "step-info" 9 | | "step-success" 10 | | "step-warning" 11 | | "step-error"; 12 | } & TBase; 13 | -------------------------------------------------------------------------------- /templates/static-js/src/utils/use-content.js: -------------------------------------------------------------------------------- 1 | export function useContent({ dir, param, fileExt }) { 2 | return { 3 | dir, 4 | fileExt, 5 | param, 6 | async get(slug) { 7 | const filePath = `../content/${this.dir}/${slug}.${this.fileExt}`; 8 | const data = await import(/* @vite-ignore */ filePath); 9 | return data.default; 10 | }, 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /templates/static-jsx/src/utils/use-content.js: -------------------------------------------------------------------------------- 1 | export function useContent({ dir, param, fileExt }) { 2 | return { 3 | dir, 4 | fileExt, 5 | param, 6 | async get(slug) { 7 | const filePath = `../content/${this.dir}/${slug}.${this.fileExt}`; 8 | const data = await import(/* @vite-ignore */ filePath); 9 | return data.default; 10 | }, 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /packages/elements/src/section/section.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "../base"; 2 | import type { TSection } from "./section.types"; 3 | 4 | export function Section( 5 | props: TSection = { tag: "section" }, 6 | ): HTMLElementTagNameMap[T] { 7 | return Base({ 8 | ...props, 9 | }) as HTMLElementTagNameMap[T]; 10 | } 11 | -------------------------------------------------------------------------------- /packages/ui/src/components/alert/alert.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TAlert = { 4 | severity?: "alert-error" | "alert-warning" | "alert-info" | "alert-success"; 5 | direction?: "alert-vertical" | "alert-horizontal"; 6 | variation?: "alert-outline" | "alert-dash" | "alert-soft"; 7 | } & TBase; 8 | -------------------------------------------------------------------------------- /templates/static-js-multi/src/utils/use-content.js: -------------------------------------------------------------------------------- 1 | export function useContent({ dir, param, fileExt }) { 2 | return { 3 | dir, 4 | fileExt, 5 | param, 6 | async get(slug) { 7 | const filePath = `../content/${this.dir}/${slug}.${this.fileExt}`; 8 | const data = await import(/* @vite-ignore */ filePath); 9 | return data.default; 10 | }, 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /templates/static-jsx-multi/src/utils/use-content.js: -------------------------------------------------------------------------------- 1 | export function useContent({ dir, param, fileExt }) { 2 | return { 3 | dir, 4 | fileExt, 5 | param, 6 | async get(slug) { 7 | const filePath = `../content/${this.dir}/${slug}.${this.fileExt}`; 8 | const data = await import(/* @vite-ignore */ filePath); 9 | return data.default; 10 | }, 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /docs/src/components/ui/loading/loading.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TLoading = { 4 | type?: "loading-spinner" | "loading-dots" | "loading-ring" | "loading-ball" | "loading-bars" | "loading-infinity"; 5 | size?: "loading-xs" | "loading-sm" | "loading-md" | "loading-lg" | "loading-xl"; 6 | } & TBase; 7 | -------------------------------------------------------------------------------- /docs/src/utils/use-collection.ts: -------------------------------------------------------------------------------- 1 | export function useCollection({ dir, metadata }: { dir: string; metadata: Array }) { 2 | return { 3 | dir, 4 | metadata, 5 | async get(): Promise { 6 | const filePath = `../content/${this.dir}.collection.js`; 7 | const data = await import(/* @vite-ignore */ filePath); 8 | return data.default; 9 | }, 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /packages/cli/src/commands/build/utils/find-script-and-src.ts: -------------------------------------------------------------------------------- 1 | export function findScriptAndSrc(inputString: string): { script: string; src: string } | null { 2 | const scriptRegex = / 9 | Jay JS 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/src/components/ui/kbd/kbd.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../../utils/cn"; 3 | import type { TKbd } from "./kbd.types"; 4 | 5 | export function Kbd( 6 | { size, ...props }: TKbd = { tag: "kbd" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("kbd", size, props.className); 9 | 10 | return Base({ 11 | tag: "kbd", 12 | ...props, 13 | className, 14 | }) as HTMLElementTagNameMap[T]; 15 | } 16 | -------------------------------------------------------------------------------- /packages/cli/src/options/jayjs-define-options.ts: -------------------------------------------------------------------------------- 1 | import type { IJayJsOptions } from "../types/index.js"; 2 | 3 | export let jayJsOptions: IJayJsOptions = { 4 | build: { 5 | srcDir: "src", 6 | outDir: "dist", 7 | transformedDir: "transformed", 8 | contentDir: "content", 9 | contentTransformedDir: "content_transformed", 10 | }, 11 | }; 12 | 13 | export function jayJsDefineOptions(options: IJayJsOptions) { 14 | jayJsOptions = { ...jayJsOptions, ...options }; 15 | return jayJsOptions; 16 | } 17 | -------------------------------------------------------------------------------- /packages/elements/src/utils/use-ref.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Represents a reference object holding a value of type T 3 | */ 4 | export type TRefObject = { 5 | current: T | null; 6 | }; 7 | 8 | /** 9 | * Creates a mutable reference object that persists across renders 10 | * @template T The type of value the reference will hold 11 | * @returns A reference object with a mutable .current property 12 | */ 13 | export function useRef(): TRefObject { 14 | return { 15 | current: null, 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /packages/ui/src/components/avatar/avatar.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { IAvatar } from "./avatar.types"; 4 | 5 | export function Avatar( 6 | { state, ...props }: IAvatar = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("avatar", state, props.className); 9 | return Base({ 10 | ...props, 11 | className, 12 | }) as HTMLElementTagNameMap[T]; 13 | } 14 | -------------------------------------------------------------------------------- /packages/ui/src/components/kbd/kbd.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TKbd } from "./kbd.types"; 4 | 5 | export function Kbd( 6 | { size, ...props }: TKbd = { tag: "kbd" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("kbd", size, props.className); 9 | 10 | return Base({ 11 | tag: "kbd", 12 | ...props, 13 | className, 14 | }) as HTMLElementTagNameMap[T]; 15 | } 16 | -------------------------------------------------------------------------------- /packages/ui/src/components/swap/swap.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TSwap } from "./swap.types"; 4 | 5 | export function Swap( 6 | { effect, ...props }: TSwap = { tag: "label" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("swap", effect, props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /docs/src/components/ui/card-body/card-body.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../../utils/cn"; 3 | import type { TCardBody } from "./card-body.types"; 4 | 5 | export function CardBody( 6 | { ...props }: TCardBody = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("card-body", props.className); 9 | return Base({ 10 | ...props, 11 | className, 12 | }) as HTMLElementTagNameMap[T]; 13 | } 14 | -------------------------------------------------------------------------------- /docs/src/components/ui/menu/menu.ts: -------------------------------------------------------------------------------- 1 | import { List, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../../utils/cn"; 3 | import type { TMenu } from "./menu.types"; 4 | 5 | export function Menu( 6 | { size, position, ...props }: TMenu = { tag: "ul" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("menu", size, position, props.className); 9 | 10 | return List({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/elements/src/@types/images.d.ts: -------------------------------------------------------------------------------- 1 | declare module "*.png" { 2 | const value: string; 3 | export default value; 4 | } 5 | 6 | declare module "*.jpg" { 7 | const value: string; 8 | export default value; 9 | } 10 | 11 | declare module "*.jpeg" { 12 | const value: string; 13 | export default value; 14 | } 15 | 16 | declare module "*.gif" { 17 | const value: string; 18 | export default value; 19 | } 20 | 21 | declare module "*.svg" { 22 | const value: string; 23 | export default value; 24 | } 25 | -------------------------------------------------------------------------------- /packages/ui/src/components/card-body/card-body.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TCardBody } from "./card-body.types"; 4 | 5 | export function CardBody( 6 | { ...props }: TCardBody = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("card-body", props.className); 9 | return Base({ 10 | ...props, 11 | className, 12 | }) as HTMLElementTagNameMap[T]; 13 | } 14 | -------------------------------------------------------------------------------- /packages/ui/src/components/tooltip/tooltip.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TTooltip = { 4 | tip?: string; 5 | color?: 6 | | "tooltip-primary" 7 | | "tooltip-secondary" 8 | | "tooltip-accent" 9 | | "tooltip-info" 10 | | "tooltip-success" 11 | | "tooltip-warning" 12 | | "tooltip-error"; 13 | position?: "tooltip-top" | "tooltip-bottom" | "tooltip-left" | "tooltip-right"; 14 | forceOpen?: boolean; 15 | } & TBase; 16 | -------------------------------------------------------------------------------- /templates/static-jsx/src/pages/home.jsx: -------------------------------------------------------------------------------- 1 | export function Home() { 2 | return ( 3 |
4 |

5 | Ideal para sites de conteúdo, blogs, documentação e landing pages que precisam de performance máxima e SEO otimizado. 6 |

7 | 8 | Saiba mais 9 | 10 |
11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /templates/static-tsx/src/pages/home.tsx: -------------------------------------------------------------------------------- 1 | export function Home() { 2 | return ( 3 |
4 |

5 | Ideal para sites de conteúdo, blogs, documentação e landing pages que precisam de performance máxima e SEO otimizado. 6 |

7 | 8 | Saiba mais 9 | 10 |
11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /packages/ui/src/components/menu/menu.ts: -------------------------------------------------------------------------------- 1 | import { List, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TMenu } from "./menu.types"; 4 | 5 | export function Menu( 6 | { size, position, ...props }: TMenu = { tag: "ul" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("menu", size, position, props.className); 9 | 10 | return List({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/ui/src/components/modal-box/modal-box.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TModalBox } from "./modal-box.types"; 4 | 5 | export function ModalBox( 6 | { ...props }: TModalBox = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("modal-box", props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/ui/src/components/swap-item/swap-item.ts: -------------------------------------------------------------------------------- 1 | import { Box, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TSwapItem } from "./swap-item.types"; 4 | 5 | export function SwapItem( 6 | { state, ...props }: TSwapItem = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn(state, props.className); 9 | 10 | return Box({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /docs/src/components/ui/card-title/card-title.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../../utils/cn"; 3 | import type { TCardTitle } from "./card-title.types"; 4 | 5 | export function CardTitle( 6 | { ...props }: TCardTitle = { tag: "h1" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("card-title", props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/ui/src/components/badge/badge.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type IBadge = { 4 | variant?: "badge-outline" | "badge-dash" | "badge-soft"; 5 | color?: 6 | | "badge-primary" 7 | | "badge-secondary" 8 | | "badge-accent" 9 | | "badge-ghost" 10 | | "badge-info" 11 | | "badge-success" 12 | | "badge-warning" 13 | | "badge-error"; 14 | size?: "badge-xl" | "badge-lg" | "badge-md" | "badge-sm" | "badge-xs"; 15 | } & TBase; 16 | -------------------------------------------------------------------------------- /packages/ui/src/components/card-title/card-title.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TCardTitle } from "./card-title.types"; 4 | 5 | export function CardTitle( 6 | { ...props }: TCardTitle = { tag: "h1" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("card-title", props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/ui/src/components/chat/chat.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TChat } from "./chat.types"; 4 | 5 | export function Chat( 6 | { position = "chat-start", ...props }: TChat = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("chat", position, props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/ui/src/components/indicator/indicator.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TIndicator } from "./indicator.types"; 4 | 5 | export function Indicator( 6 | { ...props }: TIndicator = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("indicator", props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /templates/static-jsx-multi/src/pages/home.jsx: -------------------------------------------------------------------------------- 1 | export function Home() { 2 | return ( 3 |
4 |

5 | Ideal para sites de conteúdo, blogs, documentação e landing pages que precisam de performance máxima e SEO otimizado. 6 |

7 | 8 | Saiba mais 9 | 10 |
11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /templates/static-tsx-multi/src/pages/home.tsx: -------------------------------------------------------------------------------- 1 | export function Home() { 2 | return ( 3 |
4 |

5 | Ideal para sites de conteúdo, blogs, documentação e landing pages que precisam de performance máxima e SEO otimizado. 6 |

7 | 8 | Saiba mais 9 | 10 |
11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /packages/jsx/src/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Main entry point for the JSX package 3 | * @description Provides JSX runtime functions and TypeScript declarations for Jay JS 4 | */ 5 | 6 | // Export development JSX runtime 7 | export { jsxDEV } from "./jsx-dev-runtime.js"; 8 | 9 | // Export production JSX runtime 10 | export * from "./jsx-runtime.js"; 11 | 12 | // Export JSX types 13 | export { JSX } from "./types/intrinsic-elements.js"; 14 | 15 | // Ensure TypeScript recognizes this as a module 16 | export default {}; 17 | -------------------------------------------------------------------------------- /packages/ui/src/components/breadcrumbs/breadcrumbs.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TBreadcrumbs } from "./breadcrumbs.types"; 4 | 5 | export function Breadcrumbs( 6 | { ...props }: TBreadcrumbs = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("breadcrumbs", props.className); 9 | return Base({ 10 | ...props, 11 | className, 12 | }) as HTMLElementTagNameMap[T]; 13 | } 14 | -------------------------------------------------------------------------------- /packages/ui/src/components/link/link.ts: -------------------------------------------------------------------------------- 1 | import { Link as LinkElement, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TLink } from "./link.types"; 4 | 5 | export function Link( 6 | { className, variant, color, ...props }: TLink = { tag: "a" }, 7 | ): HTMLElementTagNameMap[T] { 8 | return LinkElement({ 9 | ...props, 10 | tag: "a", 11 | className: cn("link", variant, color, className), 12 | }) as HTMLElementTagNameMap[T]; 13 | } 14 | -------------------------------------------------------------------------------- /packages/ui/src/components/tabs/tabs.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TTabs } from "./tabs.types"; 4 | 5 | export function Tabs( 6 | { variant, ...props }: TTabs = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("tabs", variant, props.className); 9 | 10 | return Base({ 11 | ...props, 12 | role: "tablist", 13 | className, 14 | }) as HTMLElementTagNameMap[T]; 15 | } 16 | -------------------------------------------------------------------------------- /docs/src/components/docs/docs-scroll-bullet.ts: -------------------------------------------------------------------------------- 1 | import { Box } from "@jay-js/elements"; 2 | 3 | export function DocsScrollBullet() { 4 | return Box({ 5 | className: "w-6 flex justify-center", 6 | children: [ 7 | // Box({ 8 | // className: "reading-progress-vertical", 9 | // }), 10 | Box({ 11 | className: "docs-section-progress flex items-center justify-center", 12 | children: Box({ 13 | className: "bg-primary w-3 rounded-full h-3 animate-pulse", 14 | }), 15 | }), 16 | ], 17 | }); 18 | } 19 | -------------------------------------------------------------------------------- /docs/src/components/ui/card-actions/card-actions.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../../utils/cn"; 3 | import type { TCardActions } from "./card-actions.types"; 4 | 5 | export function CardActions( 6 | { ...props }: TCardActions = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("card-actions", props.className); 9 | return Base({ 10 | ...props, 11 | className, 12 | }) as HTMLElementTagNameMap[T]; 13 | } 14 | -------------------------------------------------------------------------------- /packages/ui/src/components/card-actions/card-actions.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TCardActions } from "./card-actions.types"; 4 | 5 | export function CardActions( 6 | { ...props }: TCardActions = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("card-actions", props.className); 9 | return Base({ 10 | ...props, 11 | className, 12 | }) as HTMLElementTagNameMap[T]; 13 | } 14 | -------------------------------------------------------------------------------- /packages/ui/src/components/step-item/step-item.ts: -------------------------------------------------------------------------------- 1 | import { ListItem, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TStepItem } from "./step-item.types"; 4 | 5 | export function StepItem( 6 | { color, ...props }: TStepItem = { tag: "li" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("step", color, props.className); 9 | 10 | return ListItem({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /docs/src/components/ui/divider/divider.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../../utils/cn.js"; 3 | import type { TDivider } from "./divider.types.js"; 4 | 5 | export function Divider( 6 | { orientation, ...props }: TDivider = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("divider", orientation, props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/ui/src/components/diff-resizer/diff-resizer.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TDiffResizer } from "./diff-resizer.types"; 4 | 5 | export function DiffResizer( 6 | { ...props }: TDiffResizer = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("diff-resizer", props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/ui/src/components/divider/divider.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TDivider } from "./divider.types.js"; 4 | 5 | export function Divider( 6 | { orientation, ...props }: TDivider = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("divider", orientation, props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/ui/src/components/modal-action/modal-action.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TModalAction } from "./modal-action.types"; 4 | 5 | export function ModalAction( 6 | { ...props }: TModalAction = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("modal-action", props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/ui/src/components/steps/steps.ts: -------------------------------------------------------------------------------- 1 | import { List, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TSteps } from "./steps.types"; 4 | 5 | export function Steps( 6 | { orientation = "steps-horizontal", ...props }: TSteps = { tag: "ul" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("steps", orientation, props.className); 9 | 10 | return List({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /docs/src/layouts/docs.layout.ts: -------------------------------------------------------------------------------- 1 | import { Box, Outlet, Section } from "@jay-js/elements"; 2 | import { DocsFooter } from "../components/footer/docs-footer"; 3 | import { DocsNavBar } from "../components/navbar/docs-nav-bar"; 4 | 5 | export function Docs() { 6 | return Section({ 7 | className: "min-h-screen flex flex-col", 8 | children: [ 9 | DocsNavBar(), 10 | Box({ 11 | className: "max-w-screen-2xl w-full mx-auto pb-8 pt-20 grow", 12 | children: Outlet(), 13 | }), 14 | DocsFooter(), 15 | ], 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /packages/cli/tsconfig.esm.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES6", 4 | "module": "CommonJS", 5 | "lib": [ 6 | "ESNext", 7 | "DOM" 8 | ], 9 | "moduleResolution": "Node", 10 | "allowSyntheticDefaultImports": true, 11 | "sourceMap": true, 12 | "declaration": true, 13 | "outDir": "./dist", 14 | "strict": true, 15 | "noImplicitAny": true, 16 | }, 17 | "include": ["./src/**/*","./src/index.ts"], 18 | "exclude": [ 19 | "./node_modules", 20 | "./dist" 21 | ] 22 | } -------------------------------------------------------------------------------- /packages/ui/src/components/chat-component/chat-component.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TChatComponent = { 4 | component?: "chat-bubble" | "chat-image" | "chat-header" | "chat-footer"; 5 | color?: 6 | | "chat-bubble-primary" 7 | | "chat-bubble-neutral" 8 | | "chat-bubble-secondary" 9 | | "chat-bubble-accent" 10 | | "chat-bubble-info" 11 | | "chat-bubble-success" 12 | | "chat-bubble-warning" 13 | | "chat-bubble-error"; 14 | } & TBase; 15 | -------------------------------------------------------------------------------- /packages/ui/src/components/modal/modal.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TModal } from "./modal.types"; 4 | 5 | export function Modal( 6 | { position, ...props }: TModal = { tag: "dialog" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("modal", position, props.className); 9 | 10 | return Base({ 11 | ...props, 12 | tag: "dialog", 13 | className, 14 | }) as HTMLElementTagNameMap[T]; 15 | } 16 | -------------------------------------------------------------------------------- /packages/ui/src/components/radio/radio.ts: -------------------------------------------------------------------------------- 1 | import { Input, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TRadio } from "./radio.types"; 4 | 5 | export function Radio( 6 | { className, color, size, ...props }: TRadio = { tag: "input" }, 7 | ): HTMLElementTagNameMap[T] { 8 | return Input({ 9 | ...props, 10 | tag: "input", 11 | type: "radio", 12 | className: cn("radio", color, size, className), 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/ui/src/components/range/range.ts: -------------------------------------------------------------------------------- 1 | import { Input, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TRange } from "./range.types"; 4 | 5 | export function Range( 6 | { className, color, size, ...props }: TRange = { tag: "input" }, 7 | ): HTMLElementTagNameMap[T] { 8 | return Input({ 9 | ...props, 10 | tag: "input", 11 | type: "range", 12 | className: cn("range", color, size, className), 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/ui/src/components/timeline-items/timeline-items.ts: -------------------------------------------------------------------------------- 1 | import { ListItem, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TTimelineItems } from "./timeline-items.types"; 4 | 5 | export function TimelineItems( 6 | { ...props }: TTimelineItems = { tag: "li" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn(props.className); 9 | 10 | return ListItem({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /docs/src/components/ui/footer/footer.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../../utils/cn"; 3 | import type { TFooter } from "./footer.types"; 4 | 5 | export function Footer( 6 | { position, direction, ...props }: TFooter = { tag: "footer" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("footer", position, direction, props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/elements/src/utils/uni-key.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * It returns a string of random characters of a specified length. 3 | * @param [length=10] - The length of the key you want to generate. 4 | * @returns A string of random characters. 5 | */ 6 | export function uniKey(length = 10): string { 7 | let key = ""; 8 | const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz0123456789"; 9 | for (let i = 0; i < length; i++) { 10 | key += chars.charAt(Math.floor(Math.random() * chars.length)); 11 | } 12 | return key; 13 | } 14 | -------------------------------------------------------------------------------- /packages/ui/src/components/footer/footer.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TFooter } from "./footer.types"; 4 | 5 | export function Footer( 6 | { position, direction, ...props }: TFooter = { tag: "footer" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("footer", position, direction, props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/ui/src/components/menu-title/menu-title.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TMenuTitle } from "./menu-title.types"; 4 | 5 | export function MenuTitle( 6 | { tag = "li", ...props }: TMenuTitle = { tag: "li" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("menu-title", props.className); 9 | 10 | return Base({ 11 | tag, 12 | ...props, 13 | className, 14 | }) as HTMLElementTagNameMap[T]; 15 | } 16 | -------------------------------------------------------------------------------- /packages/ui/src/components/select/select.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TSelect = { 4 | variant?: "select-ghost"; 5 | color?: 6 | | "select-primary" 7 | | "select-secondary" 8 | | "select-accent" 9 | | "select-neutral" 10 | | "select-success" 11 | | "select-warning" 12 | | "select-info" 13 | | "select-error"; 14 | size?: "select-xl" | "select-lg" | "select-md" | "select-sm" | "select-xs"; 15 | fullWidth?: boolean; 16 | } & TBase; 17 | -------------------------------------------------------------------------------- /docs/src/components/ui/collapse-title/collapse-title.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../../utils/cn"; 3 | import type { TCollapseTitle } from "./collapse-title.types"; 4 | 5 | export function CollapseTitle( 6 | { ...props }: TCollapseTitle = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("collapse-title", props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/ui/src/components/badge/badge.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { IBadge } from "./badge.types"; 4 | 5 | export function Badge( 6 | { variant, color, size, ...props }: IBadge = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("badge", variant, color, size, props.className); 9 | return Base({ 10 | tag: "span", 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/ui/src/components/checkbox/checkbox.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TCheckbox = { 4 | color?: 5 | | "checkbox-primary" 6 | | "checkbox-secondary" 7 | | "checkbox-accent" 8 | | "checkbox-neutral" 9 | | "checkbox-success" 10 | | "checkbox-warning" 11 | | "checkbox-info" 12 | | "checkbox-error"; 13 | size?: "checkbox-xl" | "checkbox-lg" | "checkbox-md" | "checkbox-sm" | "checkbox-xs"; 14 | indeterminate?: boolean; 15 | } & TBase; 16 | -------------------------------------------------------------------------------- /packages/ui/src/components/collapse-title/collapse-title.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TCollapseTitle } from "./collapse-title.types"; 4 | 5 | export function CollapseTitle( 6 | { ...props }: TCollapseTitle = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("collapse-title", props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /docs/src/components/icons/duotone/caret-right.ts: -------------------------------------------------------------------------------- 1 | import { createIcon } from "../create-icon"; 2 | import type { TAppIconOptions } from "../icon.types"; 3 | 4 | export function IconCaretRightDuotone(options?: TAppIconOptions) { 5 | const svg = 6 | ''; 7 | return createIcon(svg, options); 8 | } 9 | -------------------------------------------------------------------------------- /docs/src/pages/home.ts: -------------------------------------------------------------------------------- 1 | import { Section } from "@jay-js/elements"; 2 | import { 3 | CallToAction, 4 | CodeExamples, 5 | Community, 6 | FeaturesSection, 7 | GettingStarted, 8 | Hero, 9 | Packages, 10 | WhyJayJS, 11 | } from "../components/home"; 12 | 13 | export function Home() { 14 | return Section({ 15 | tag: "main", 16 | children: [ 17 | Hero(), 18 | FeaturesSection(), 19 | WhyJayJS(), 20 | Packages(), 21 | CodeExamples(), 22 | GettingStarted(), 23 | Community(), 24 | CallToAction(), 25 | ], 26 | }); 27 | } 28 | -------------------------------------------------------------------------------- /packages/ui/src/components/diff-item/diff-item.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TDiffItem } from "./diff-item.types"; 4 | 5 | export function DiffItem( 6 | { side, ...props }: TDiffItem = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn(side === "left" ? "diff-left" : "diff-right", props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/cli/src/commands/init/templates/index-file.ts: -------------------------------------------------------------------------------- 1 | export function indexFile(projectName: string, ext: string): string { 2 | return ` 3 | 4 | 5 | 6 | 7 | 8 | Jay JS (${projectName}) 9 | 10 | 11 |
12 | 13 | 14 | `; 15 | } 16 | -------------------------------------------------------------------------------- /packages/ui/src/components/card-description/card-description.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TCardDescription } from "./card-description.types"; 4 | 5 | export function CardDescription( 6 | { ...props }: TCardDescription = { tag: "p" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("card-description", props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /docs/src/components/ui/collapse-content/collapse-content.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../../utils/cn"; 3 | import type { TCollapseContent } from "./collapse-content.types"; 4 | 5 | export function CollapseContent( 6 | { ...props }: TCollapseContent = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("collapse-content", props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /docs/src/components/ui/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./card"; 2 | export * from "./card-actions"; 3 | export * from "./card-body"; 4 | export * from "./card-title"; 5 | export * from "./collapse"; 6 | export * from "./collapse-content"; 7 | export * from "./collapse-title"; 8 | export * from "./divider"; 9 | export * from "./dropdown"; 10 | export * from "./dropdown-content"; 11 | export * from "./dropdown-label"; 12 | export * from "./footer"; 13 | export * from "./kbd"; 14 | export * from "./loading"; 15 | export * from "./menu"; 16 | export * from "./menu-item"; 17 | -------------------------------------------------------------------------------- /packages/cli/src/commands/build/modules/prepare/parse-markdown.ts: -------------------------------------------------------------------------------- 1 | // parsers 2 | import matter from "gray-matter"; 3 | import { marked } from "marked"; 4 | import { log } from "../../../../utils/terminal"; 5 | 6 | export async function parseMarkdown(src: string): Promise> { 7 | try { 8 | const { data, content } = matter(src); 9 | const htmlContent = await marked(content); 10 | return { ...data, content: htmlContent }; 11 | } catch (error) { 12 | log`Failed to parse markdown: ${error}`; 13 | return { content: "" }; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/ui/src/components/alert/alert.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TAlert } from "./alert.types"; 4 | 5 | export function Alert( 6 | { severity = "alert-info", direction, variation, ...props }: TAlert = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("alert", severity, direction, variation, props.className); 9 | return Base({ 10 | ...props, 11 | className, 12 | }) as HTMLElementTagNameMap[T]; 13 | } 14 | -------------------------------------------------------------------------------- /packages/ui/src/components/bottom-navigation/bottom-navigation.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { IBottomNavigation } from "./bottom-navigation.types"; 4 | 5 | export function BottomNavigation( 6 | { size, ...props }: IBottomNavigation = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("btm-nav", size, props.className); 9 | return Base({ 10 | ...props, 11 | className, 12 | }) as HTMLElementTagNameMap[T]; 13 | } 14 | -------------------------------------------------------------------------------- /packages/ui/src/components/collapse-content/collapse-content.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TCollapseContent } from "./collapse-content.types"; 4 | 5 | export function CollapseContent( 6 | { ...props }: TCollapseContent = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("collapse-content", props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/ui/src/components/modal-backdrop/modal-backdrop.ts: -------------------------------------------------------------------------------- 1 | import { Base, Box, type TBaseTagMap, type TButton } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | 4 | export function ModalBackdrop( 5 | { ...props }: TButton = { tag: "div" }, 6 | ): HTMLDivElement { 7 | const className = cn("modal-backdrop", props.className); 8 | 9 | return Box({ 10 | className, 11 | children: Base<"button">({ 12 | tag: "button", 13 | type: "button", 14 | ...props, 15 | }), 16 | }) as HTMLDivElement; 17 | } 18 | -------------------------------------------------------------------------------- /packages/ui/src/hooks/use-listener.ts: -------------------------------------------------------------------------------- 1 | import type { Listener } from "@jay-js/elements"; 2 | 3 | /** 4 | * A hook to handle event listeners 5 | * 6 | * @param type - The event type to listen for (e.g., 'click', 'input') 7 | * @param listeners - An object containing event handler functions 8 | * @returns void 9 | */ 10 | export function useListener(type: string, listeners: Listener): void { 11 | const listener = Object.entries(listeners).find(([key, _value]) => key === type); 12 | if (!listener || !listener[1]) return; 13 | (listener[1] as any)(); 14 | } 15 | -------------------------------------------------------------------------------- /templates/spa-jsx/src/components/navbar.jsx: -------------------------------------------------------------------------------- 1 | import { Navigate } from "@jay-js/system"; 2 | 3 | export function NavBar() { 4 | function handleNavigate(ev, path) { 5 | ev.preventDefault(); 6 | Navigate(path); 7 | } 8 | 9 | return ( 10 | 18 | ) 19 | } -------------------------------------------------------------------------------- /docs/src/components/icons/duotone/caret-left.ts: -------------------------------------------------------------------------------- 1 | import { createIcon } from "../create-icon"; 2 | import type { TAppIconOptions } from "../icon.types"; 3 | 4 | export function IconCaretLeftDuotone(options?: TAppIconOptions) { 5 | const svg = 6 | ''; 7 | return createIcon(svg, options); 8 | } 9 | -------------------------------------------------------------------------------- /packages/static/src/vite-plugin/services/get-parsed-file-content.ts: -------------------------------------------------------------------------------- 1 | // utils 2 | import { extractMetadata } from "../utils/extract-metadata.js"; 3 | 4 | export function getParsedFileContent(file: string, src: string): any { 5 | if (file.endsWith(".js")) { 6 | const runContent = new Function(`return ${src.replace("export default ", "")}`); 7 | return runContent(); 8 | } 9 | 10 | if (file.endsWith(".json")) { 11 | return JSON.parse(src); 12 | } 13 | 14 | if (file.endsWith(".md") || file.endsWith(".mdx")) { 15 | return extractMetadata(src); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/ui/src/components/progress/progress.ts: -------------------------------------------------------------------------------- 1 | import { Progress as ProgressElement, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TProgress } from "./progress.types"; 4 | 5 | export function Progress( 6 | { className, color, ...props }: TProgress = { tag: "progress" }, 7 | ): HTMLElementTagNameMap[T] { 8 | return ProgressElement({ 9 | ...props, 10 | tag: "progress", 11 | className: cn("progress", color, className), 12 | }) as HTMLElementTagNameMap[T]; 13 | } 14 | -------------------------------------------------------------------------------- /docs/src/components/icons/duotone/arrow-right.ts: -------------------------------------------------------------------------------- 1 | import { createIcon } from "../create-icon"; 2 | import type { TAppIconOptions } from "../icon.types"; 3 | 4 | export function IconArrowRightDuotone(options?: TAppIconOptions) { 5 | const svg = 6 | ''; 7 | return createIcon(svg, options); 8 | } 9 | -------------------------------------------------------------------------------- /packages/elements/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./base"; 2 | export * from "./box"; 3 | export * from "./button"; 4 | export * from "./form"; 5 | export * from "./fragment"; 6 | export * from "./img"; 7 | export * from "./input"; 8 | export * from "./link"; 9 | export * from "./list"; 10 | export * from "./list-item"; 11 | export * from "./outlet"; 12 | export * from "./progress"; 13 | export * from "./section"; 14 | export * from "./select"; 15 | export * from "./select-item"; 16 | export * from "./text-area"; 17 | export * from "./typography"; 18 | export * from "./utils"; 19 | -------------------------------------------------------------------------------- /packages/inspector/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vitest/config'; 2 | 3 | export default defineConfig({ 4 | test: { 5 | environment: 'jsdom', 6 | include: ['**/__tests__/**/*.{test,spec}.ts', '**/*.{test,spec}.ts'], 7 | exclude: ['**/dist/**'], 8 | globals: true, 9 | coverage: { 10 | provider: 'v8', 11 | reporter: ['text', 'html'], 12 | include: ['src/**/*.{js,ts}'], 13 | exclude: ['src/**/*.d.ts'], 14 | }, 15 | }, 16 | resolve: { 17 | alias: { 18 | '@': '/src', 19 | }, 20 | }, 21 | }); 22 | -------------------------------------------------------------------------------- /packages/static/.swcrc: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/swcrc", 3 | "module": { 4 | "type": "es6", 5 | "resolveFully": true 6 | }, 7 | "jsc": { 8 | "parser": { 9 | "syntax": "typescript", 10 | "dynamicImport": true, 11 | "decorators": true 12 | }, 13 | "baseUrl": "./src", 14 | "paths": { 15 | "src/*": ["./src/*"] 16 | }, 17 | "transform": {}, 18 | "target": "es2015", 19 | "loose": false, 20 | "externalHelpers": false, 21 | "keepClassNames": false 22 | }, 23 | "minify": false 24 | } -------------------------------------------------------------------------------- /packages/static/src/vite-plugin/services/write-collection.ts: -------------------------------------------------------------------------------- 1 | // node.js modules 2 | import { writeFileSync } from "node:fs"; 3 | 4 | export function writeCollection(collection: Array, collectionFile: string, format: string) { 5 | if (format === "json") { 6 | const collectionFileContent = JSON.stringify(collection, null, 2); 7 | writeFileSync(collectionFile, collectionFileContent); 8 | return; 9 | } 10 | const collectionFileContent = `export default ${JSON.stringify(collection, null, 2)};`; 11 | writeFileSync(collectionFile, collectionFileContent); 12 | } 13 | -------------------------------------------------------------------------------- /packages/cli/src/commands/ui/register/register-ui-command.ts: -------------------------------------------------------------------------------- 1 | import type { Command } from "commander"; 2 | import { ui } from "../action/ui-action.js"; 3 | 4 | export function registerUiCommand(program: Command) { 5 | const uiCmd = program.command("ui").description("Manage UI components"); 6 | 7 | uiCmd 8 | .command("add") 9 | .description("Add UI component(s) to your project") 10 | .argument("", "Component name(s) to add (e.g., card, card-title, button)") 11 | .action(async (components: string[]) => { 12 | await ui(components); 13 | }); 14 | } 15 | -------------------------------------------------------------------------------- /packages/system/src/lazy/types.ts: -------------------------------------------------------------------------------- 1 | export type ConfigChangeCallback = (options: TLazyOptions) => void; 2 | 3 | export type TImportedModule = { 4 | module: any; 5 | lastUsed: number; 6 | collect: boolean; 7 | }; 8 | 9 | export type TLazyModule = { 10 | module?: string; 11 | import: () => Promise; 12 | params?: Record; 13 | collect?: boolean; 14 | loader?: HTMLElement | DocumentFragment; 15 | }; 16 | 17 | export type TLazyOptions = { 18 | gcThreshold?: number; 19 | gcInterval?: number; 20 | defaultLoader?: HTMLElement | DocumentFragment; 21 | }; 22 | -------------------------------------------------------------------------------- /packages/ui/src/components/rating/rating.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TRating } from "./rating.types"; 4 | 5 | export function Rating( 6 | { size, half, hidden, ...props }: TRating = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("rating", size, half ? "rating-half" : "", hidden ? "rating-hidden" : "", props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/ui/src/components/timeline/timeline.ts: -------------------------------------------------------------------------------- 1 | import { List, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TTimeline } from "./timeline.types.js"; 4 | 5 | export function Timeline( 6 | { direction, compact, ...props }: TTimeline = { tag: "ul" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("timeline", direction, compact ? "timeline-compact" : "", props.className); 9 | 10 | return List({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/ui/src/components/toggle/toggle.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TToggle = { 4 | label?: string; 5 | color?: 6 | | "toggle-primary" 7 | | "toggle-secondary" 8 | | "toggle-accent" 9 | | "toggle-neutral" 10 | | "toggle-success" 11 | | "toggle-warning" 12 | | "toggle-info" 13 | | "toggle-error"; 14 | size?: "toggle-xl" | "toggle-lg" | "toggle-md" | "toggle-sm" | "toggle-xs"; 15 | position?: "toggle-before" | "toggle-after"; 16 | formControl?: TBase; 17 | } & TBase; 18 | -------------------------------------------------------------------------------- /docs/src/components/icons/duotone/layout.ts: -------------------------------------------------------------------------------- 1 | import { createIcon } from "../create-icon"; 2 | import type { TAppIconOptions } from "../icon.types"; 3 | 4 | export function IconLayoutDuotone(options?: TAppIconOptions) { 5 | const svg = 6 | ''; 7 | return createIcon(svg, options); 8 | } 9 | -------------------------------------------------------------------------------- /docs/src/components/ui/dropdown-content/dropdown-content.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../../utils/cn"; 3 | import type { TDropdownContent } from "./dropdown-content.types"; 4 | 5 | export function DropdownContent( 6 | { ...props }: TDropdownContent = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("dropdown-content", props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | tabIndex: 0, 14 | }) as HTMLElementTagNameMap[T]; 15 | } 16 | -------------------------------------------------------------------------------- /docs/src/components/ui/loading/loading.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../../utils/cn"; 3 | import type { TLoading } from "./loading.types"; 4 | 5 | export function Loading( 6 | { type = "loading-spinner", size = "loading-md", ...props }: TLoading = { tag: "span" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("loading", type, size, props.className); 9 | 10 | return Base({ 11 | tag: "span", 12 | ...props, 13 | className, 14 | }) as HTMLElementTagNameMap[T]; 15 | } 16 | -------------------------------------------------------------------------------- /packages/ui/src/components/chat-component/chat-component.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TChatComponent } from "./chat-component.types"; 4 | 5 | export function ChatComponent( 6 | { component = "chat-bubble", color, ...props }: TChatComponent = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn(component, color, props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/ui/src/components/dropdown-content/dropdown-content.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TDropdownContent } from "./dropdown-content.types"; 4 | 5 | export function DropdownContent( 6 | { ...props }: TDropdownContent = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("dropdown-content", props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | tabIndex: 0, 14 | }) as HTMLElementTagNameMap[T]; 15 | } 16 | -------------------------------------------------------------------------------- /packages/ui/src/components/loading/loading.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TLoading } from "./loading.types"; 4 | 5 | export function Loading( 6 | { type = "loading-spinner", size = "loading-md", ...props }: TLoading = { tag: "span" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("loading", type, size, props.className); 9 | 10 | return Base({ 11 | tag: "span", 12 | ...props, 13 | className, 14 | }) as HTMLElementTagNameMap[T]; 15 | } 16 | -------------------------------------------------------------------------------- /packages/ui/src/components/navbar-component/navbar-component.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TNavbarComponent } from "./navbar-component.types"; 4 | 5 | export function NavbarComponent( 6 | { component = "navbar-start", ...props }: TNavbarComponent = { tag: "nav" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn(component, props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/ui/src/components/text-area/text-area.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TTextArea = { 4 | variant?: "textarea-ghost"; 5 | color?: 6 | | "textarea-primary" 7 | | "textarea-secondary" 8 | | "textarea-accent" 9 | | "textarea-neutral" 10 | | "textarea-success" 11 | | "textarea-warning" 12 | | "textarea-info" 13 | | "textarea-error"; 14 | size?: "textarea-xl" | "textarea-lg" | "textarea-md" | "textarea-sm" | "textarea-xs"; 15 | fullWidth?: boolean; 16 | } & TBase; 17 | -------------------------------------------------------------------------------- /packages/ui/src/components/timeline-item/timeline-item.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { ITimelineItem } from "./timeline-item.types"; 4 | 5 | export function TimelineItem( 6 | { component, boxed, ...props }: ITimelineItem = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn(component, boxed ? "timeline-box" : "", props.className); 9 | 10 | return Base({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /docs/src/components/navbar/docs-nav-bar.ts: -------------------------------------------------------------------------------- 1 | import { Box, Section } from "@jay-js/elements"; 2 | import { Logo } from "../common/logo"; 3 | import { SearchForm } from "./search-form"; 4 | import { SelectLocation } from "./select-location"; 5 | 6 | export function DocsNavBar() { 7 | return Section({ 8 | tag: "header", 9 | className: "bg-base-300/40 fixed w-full z-50 backdrop-blur-md", 10 | children: Box({ 11 | className: "p-4 flex justify-between items-center max-w-screen-2xl mx-auto", 12 | children: [Logo("w-12"), SearchForm(), SelectLocation()], 13 | }), 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /packages/cli/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES6", 4 | "module": "ESNext", 5 | "lib": [ 6 | "ESNext", 7 | "DOM" 8 | ], 9 | "moduleResolution": "Node", 10 | "allowSyntheticDefaultImports": true, 11 | "sourceMap": true, 12 | "declaration": true, 13 | "outDir": "./dist", 14 | "strict": true, 15 | "noImplicitAny": true, 16 | "skipLibCheck": true, 17 | "types": ["node"] 18 | }, 19 | "include": ["./src/**/*","./src/index.ts"], 20 | "exclude": [ 21 | "./node_modules", 22 | "./dist" 23 | ] 24 | } -------------------------------------------------------------------------------- /packages/ui/.swcrc: -------------------------------------------------------------------------------- 1 | { 2 | "module": { 3 | "type": "es6", 4 | "resolveFully": true 5 | }, 6 | "jsc": { 7 | "parser": { 8 | "syntax": "typescript", 9 | "dynamicImport": true, 10 | "decorators": true 11 | }, 12 | "baseUrl": "./src", 13 | "paths": { 14 | "src/*": ["./src/*"] 15 | }, 16 | "transform": {}, 17 | "target": "es2015", 18 | "loose": false, 19 | "externalHelpers": false, 20 | "keepClassNames": false, 21 | "experimental": { 22 | "emitIsolatedDts": true 23 | } 24 | }, 25 | "minify": false 26 | } -------------------------------------------------------------------------------- /templates/static-ts-multi/src/locales/i18n.ts: -------------------------------------------------------------------------------- 1 | import { Ii18nOptions, useI18n } from "@jay-js/system"; 2 | 3 | // types 4 | import { Ii18nBase } from "./i18n.types"; 5 | 6 | // locales 7 | import i18nEnUs from "./en-us"; 8 | 9 | export const i18nConfig: Ii18nOptions = { 10 | defaultLocale: "en-US", 11 | nestedKeys: false, 12 | saveToLocalStorage: true, 13 | languages: [ 14 | { 15 | code: "en-US", 16 | // import: async () => (await import("./lang/en-us")).default, 17 | data: i18nEnUs 18 | } 19 | ] 20 | }; 21 | 22 | export const i18n = useI18n(); -------------------------------------------------------------------------------- /packages/cli/src/bin/jayjs.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | // terminal 4 | import { Command } from "commander"; 5 | import { registerBuildCommand } from "../commands/build/register/register-build-command.js"; 6 | // registers 7 | import { registerInitCommand } from "../commands/init/register/register-init-command.js"; 8 | import { registerUiCommand } from "../commands/ui/register/register-ui-command.js"; 9 | 10 | const program = new Command(); 11 | 12 | registerInitCommand(program); 13 | registerBuildCommand(program); 14 | registerUiCommand(program); 15 | 16 | program.parse(process.argv); 17 | -------------------------------------------------------------------------------- /packages/elements/.swcrc: -------------------------------------------------------------------------------- 1 | { 2 | "module": { 3 | "type": "es6", 4 | "resolveFully": true 5 | }, 6 | "jsc": { 7 | "parser": { 8 | "syntax": "typescript", 9 | "dynamicImport": true, 10 | "decorators": true 11 | }, 12 | "baseUrl": "./src", 13 | "paths": { 14 | "src/*": ["./src/*"] 15 | }, 16 | "transform": {}, 17 | "target": "es2015", 18 | "loose": false, 19 | "externalHelpers": false, 20 | "keepClassNames": false, 21 | "experimental": { 22 | "emitIsolatedDts": true 23 | } 24 | }, 25 | "minify": false 26 | } -------------------------------------------------------------------------------- /packages/static/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES6", 4 | "module": "ESNext", 5 | "lib": [ 6 | "ESNext", 7 | "DOM" 8 | ], 9 | "moduleResolution": "Node", 10 | "allowSyntheticDefaultImports": true, 11 | "sourceMap": true, 12 | "declaration": true, 13 | "outDir": "./dist", 14 | "strict": true, 15 | "noImplicitAny": true, 16 | "skipLibCheck": true, 17 | "types": ["node"] 18 | }, 19 | "include": ["./src/**/*","./src/index.ts"], 20 | "exclude": [ 21 | "./node_modules", 22 | "./dist" 23 | ] 24 | } -------------------------------------------------------------------------------- /templates/static-tsx-multi/src/locales/i18n.ts: -------------------------------------------------------------------------------- 1 | import { Ii18nOptions, useI18n } from "@jay-js/system"; 2 | 3 | // types 4 | import { Ii18nBase } from "./i18n.types"; 5 | 6 | // locales 7 | import i18nEnUs from "./en-us"; 8 | 9 | export const i18nConfig: Ii18nOptions = { 10 | defaultLocale: "en-US", 11 | nestedKeys: false, 12 | saveToLocalStorage: true, 13 | languages: [ 14 | { 15 | code: "en-US", 16 | // import: async () => (await import("./lang/en-us")).default, 17 | data: i18nEnUs 18 | } 19 | ] 20 | }; 21 | 22 | export const i18n = useI18n(); -------------------------------------------------------------------------------- /docs/src/components/docs/explore-packages.ts: -------------------------------------------------------------------------------- 1 | import { Box, Typography } from "@jay-js/elements"; 2 | import { PACKAGES } from "../../constants"; 3 | import { CardPackage } from "./card-package"; 4 | 5 | export function ExplorePackages() { 6 | return Box({ 7 | className: "mt-12", 8 | children: [ 9 | Typography({ 10 | className: "font-bold mb-8 italic", 11 | children: "Explore Jay JS Packages:", 12 | }), 13 | Box({ 14 | className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4", 15 | children: PACKAGES.map(CardPackage), 16 | }), 17 | ], 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /packages/elements/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES6", 4 | "module": "ES6", 5 | "lib": [ 6 | "ESNext", 7 | "DOM" 8 | ], 9 | "moduleResolution": "Node", 10 | "sourceMap": true, 11 | "declaration": true, 12 | "outDir": "./dist", 13 | "strict": true, 14 | "noImplicitAny": true, 15 | "types": [ 16 | "node" 17 | ], 18 | "esModuleInterop": true 19 | }, 20 | "include": [ 21 | "./src/**/*", 22 | "./src/index.ts", 23 | ], 24 | "exclude": [ 25 | "./node_modules", 26 | "./dist" 27 | ] 28 | } -------------------------------------------------------------------------------- /docs/src/components/ui/menu-item/menu-item.ts: -------------------------------------------------------------------------------- 1 | import { ListItem, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../../utils/cn"; 3 | import type { TMenuItem } from "./menu-item.types"; 4 | 5 | export function MenuItem( 6 | { disabled, active, focus, ...props }: TMenuItem = { tag: "li" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn(disabled ? "disabled" : "", active ? "active" : "", focus ? "focus" : "", props.className); 9 | 10 | return ListItem({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/cli/.swcrc: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/swcrc", 3 | "module": { 4 | "type": "es6", 5 | "resolveFully": true 6 | }, 7 | "jsc": { 8 | "parser": { 9 | "syntax": "typescript", 10 | "dynamicImport": true, 11 | "decorators": true 12 | }, 13 | "baseUrl": "./src", 14 | "paths": { 15 | "src/*": ["./src/*"] 16 | }, 17 | "transform": {}, 18 | "target": "esnext", 19 | "loose": false, 20 | "externalHelpers": false, 21 | "keepClassNames": false 22 | }, 23 | "minify": false, 24 | "sourceMaps": "inline" 25 | } -------------------------------------------------------------------------------- /packages/ui/src/components/menu-item/menu-item.ts: -------------------------------------------------------------------------------- 1 | import { ListItem, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TMenuItem } from "./menu-item.types"; 4 | 5 | export function MenuItem( 6 | { disabled, active, focus, ...props }: TMenuItem = { tag: "li" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn(disabled ? "disabled" : "", active ? "active" : "", focus ? "focus" : "", props.className); 9 | 10 | return ListItem({ 11 | ...props, 12 | className, 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/ui/src/components/select/select.ts: -------------------------------------------------------------------------------- 1 | import { Select as SelectElement, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TSelect } from "./select.types"; 4 | 5 | export function Select( 6 | { className, variant, color, size, fullWidth, ...props }: TSelect = { tag: "select" }, 7 | ): HTMLElementTagNameMap[T] { 8 | return SelectElement({ 9 | ...props, 10 | tag: "select", 11 | className: cn("select", variant, color, size, fullWidth ? "w-full" : "", className), 12 | }) as HTMLElementTagNameMap[T]; 13 | } 14 | -------------------------------------------------------------------------------- /templates/spa-tsx/src/components/navbar.tsx: -------------------------------------------------------------------------------- 1 | import { Navigate } from "@jay-js/system"; 2 | 3 | export function NavBar() { 4 | function handleNavigate(ev: MouseEvent, path: string) { 5 | ev.preventDefault(); 6 | Navigate(path); 7 | } 8 | 9 | return ( 10 | 18 | ) 19 | } -------------------------------------------------------------------------------- /packages/ui/src/components/file-input/file-input.types.ts: -------------------------------------------------------------------------------- 1 | import type { TBase, TBaseTagMap } from "@jay-js/elements"; 2 | 3 | export type TFileInput = { 4 | variant?: "file-input-ghost"; 5 | color?: 6 | | "file-input-primary" 7 | | "file-input-secondary" 8 | | "file-input-accent" 9 | | "file-input-neutral" 10 | | "file-input-success" 11 | | "file-input-warning" 12 | | "file-input-info" 13 | | "file-input-error"; 14 | size?: "file-input-xl" | "file-input-lg" | "file-input-md" | "file-input-sm" | "file-input-xs"; 15 | fullWidth?: boolean; 16 | } & TBase; 17 | -------------------------------------------------------------------------------- /packages/ui/src/components/indicator-item/indicator-item.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TIndicatorItem } from "./indicator-item.types"; 4 | 5 | export function IndicatorItem( 6 | { horizontal, vertical, ...props }: TIndicatorItem = { tag: "span" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("indicator-item", horizontal, vertical, props.className); 9 | 10 | return Base({ 11 | ...props, 12 | tag: "span", 13 | className, 14 | }) as HTMLElementTagNameMap[T]; 15 | } 16 | -------------------------------------------------------------------------------- /packages/ui/src/components/tab-item/tab-item.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TTabItem } from "./tab-item.types"; 4 | 5 | export function TabItem( 6 | { size, active, disabled, ...props }: TTabItem = { tag: "a" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn("tab", active ? "tab-active" : "", disabled ? "tab-disabled" : "", size, props.className); 9 | 10 | return Base({ 11 | ...props, 12 | role: "tab", 13 | className, 14 | }) as HTMLElementTagNameMap[T]; 15 | } 16 | -------------------------------------------------------------------------------- /docs/vite.config.js: -------------------------------------------------------------------------------- 1 | import tailwindcss from "@tailwindcss/vite" 2 | import { defineConfig } from "vite"; 3 | import { jayJsViteStatic } from "@jay-js/static/vite-plugin"; 4 | import path from "path"; 5 | 6 | export default defineConfig({ 7 | plugins: [ 8 | tailwindcss(), 9 | jayJsViteStatic({ 10 | contentPath: path.resolve(__dirname, "./src/content") 11 | }) 12 | ], 13 | server: { 14 | host: '0.0.0.0', 15 | port: 5173 16 | }, 17 | build: { 18 | minify: "terser", 19 | terserOptions: { 20 | format: { 21 | comments: false, 22 | }, 23 | }, 24 | }, 25 | }); -------------------------------------------------------------------------------- /packages/ui/src/components/file-input/file-input.ts: -------------------------------------------------------------------------------- 1 | import { Input, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TFileInput } from "./file-input.types"; 4 | 5 | export function FileInput( 6 | { className, variant, color, size, fullWidth, ...props }: TFileInput = { tag: "input" }, 7 | ): HTMLElementTagNameMap[T] { 8 | return Input({ 9 | ...props, 10 | tag: "input", 11 | type: "file", 12 | className: cn("file-input", variant, color, size, fullWidth ? "w-full" : "", className), 13 | }) as HTMLElementTagNameMap[T]; 14 | } 15 | -------------------------------------------------------------------------------- /docs/src/components/icons/duotone/path.ts: -------------------------------------------------------------------------------- 1 | import { createIcon } from "../create-icon"; 2 | import type { TAppIconOptions } from "../icon.types"; 3 | 4 | export function IconPathDuotone(options?: TAppIconOptions) { 5 | const svg = 6 | ''; 7 | return createIcon(svg, options); 8 | } 9 | -------------------------------------------------------------------------------- /packages/ui/src/components/bottom-navigation-item/bottom-navigation-item.ts: -------------------------------------------------------------------------------- 1 | import { Base, type TBaseTagMap } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TBottomNavigationItem } from "./bottom-navigation-item.types"; 4 | 5 | export function BottomNavigationItem( 6 | { active, disabled, ...props }: TBottomNavigationItem = { tag: "div" }, 7 | ): HTMLElementTagNameMap[T] { 8 | const className = cn(active ? "active" : "", disabled ? "disabled" : "", props.className); 9 | return Base({ 10 | ...props, 11 | className, 12 | }) as HTMLElementTagNameMap[T]; 13 | } 14 | -------------------------------------------------------------------------------- /packages/ui/src/components/text-area/text-area.ts: -------------------------------------------------------------------------------- 1 | import { type TBaseTagMap, TextArea as TextAreaElement } from "@jay-js/elements"; 2 | import { cn } from "../../utils/cn"; 3 | import type { TTextArea } from "./text-area.types"; 4 | 5 | export function TextArea( 6 | { className, variant, color, size, fullWidth, ...props }: TTextArea = { tag: "textarea" }, 7 | ): HTMLElementTagNameMap[T] { 8 | return TextAreaElement({ 9 | ...props, 10 | tag: "textarea", 11 | className: cn("textarea", variant, color, size, fullWidth ? "w-full" : "", className), 12 | }) as HTMLElementTagNameMap[T]; 13 | } 14 | -------------------------------------------------------------------------------- /templates/spa-jsx-multi/src/components/navbar.jsx: -------------------------------------------------------------------------------- 1 | import { Navigate } from "@jay-js/system"; 2 | import { i18n } from "../locales/i18n"; 3 | 4 | export function NavBar() { 5 | function handleNavigate(ev, path) { 6 | ev.preventDefault(); 7 | Navigate(path); 8 | } 9 | 10 | return ( 11 | 19 | ) 20 | } -------------------------------------------------------------------------------- /packages/jsx/.swcrc: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/swcrc", 3 | "exclude": [".*__tests__.*", ".*\\.test\\.tsx?$", ".*\\.spec\\.tsx?$"], 4 | "module": { 5 | "type": "es6", 6 | "resolveFully": true 7 | }, 8 | "jsc": { 9 | "parser": { 10 | "syntax": "typescript", 11 | "dynamicImport": true, 12 | "decorators": true 13 | }, 14 | "baseUrl": "./src", 15 | "paths": { 16 | "src/*": ["./src/*"] 17 | }, 18 | "transform": {}, 19 | "target": "es2015", 20 | "loose": false, 21 | "externalHelpers": false, 22 | "keepClassNames": false 23 | }, 24 | "minify": false 25 | } --------------------------------------------------------------------------------