@julianoczkowski/create-trimble-app 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +191 -0
- package/bin/create-trimble-app.js +9 -0
- package/package.json +67 -0
- package/src/cli.js +134 -0
- package/src/frameworks.js +28 -0
- package/src/scaffold.js +209 -0
- package/src/utils/file.js +47 -0
- package/src/utils/git.js +140 -0
- package/src/utils/install.js +25 -0
- package/src/utils/logger.js +124 -0
- package/templates/angular/.cursor/commands/remove-dev-content.md +394 -0
- package/templates/angular/.cursor/mcp.json +13 -0
- package/templates/angular/.cursor/rules/modus-angular-20.mdc +82 -0
- package/templates/angular/.cursor/rules/modus-angular-accordion-state-management-short.mdc +45 -0
- package/templates/angular/.cursor/rules/modus-angular-accordion-state-management.mdc +322 -0
- package/templates/angular/.cursor/rules/modus-angular-best-practices.mdc +472 -0
- package/templates/angular/.cursor/rules/modus-angular-border-usage-short.mdc +48 -0
- package/templates/angular/.cursor/rules/modus-angular-border-usage.mdc +286 -0
- package/templates/angular/.cursor/rules/modus-angular-button-group-usage-short.mdc +47 -0
- package/templates/angular/.cursor/rules/modus-angular-button-group-usage.mdc +263 -0
- package/templates/angular/.cursor/rules/modus-angular-checkbox-value-inversion-short.mdc +36 -0
- package/templates/angular/.cursor/rules/modus-angular-checkbox-value-inversion.mdc +92 -0
- package/templates/angular/.cursor/rules/modus-angular-chrome-devtools-testing-short.mdc +34 -0
- package/templates/angular/.cursor/rules/modus-angular-chrome-devtools-testing.mdc +185 -0
- package/templates/angular/.cursor/rules/modus-angular-color-usage-short.mdc +56 -0
- package/templates/angular/.cursor/rules/modus-angular-color-usage.mdc +208 -0
- package/templates/angular/.cursor/rules/modus-angular-components-reference.mdc +114 -0
- package/templates/angular/.cursor/rules/modus-angular-design-system.mdc +273 -0
- package/templates/angular/.cursor/rules/modus-angular-development-workflow-short.mdc +43 -0
- package/templates/angular/.cursor/rules/modus-angular-development-workflow.mdc +145 -0
- package/templates/angular/.cursor/rules/modus-angular-essentials.mdc +272 -0
- package/templates/angular/.cursor/rules/modus-angular-forms-validation-short.mdc +56 -0
- package/templates/angular/.cursor/rules/modus-angular-forms-validation.mdc +124 -0
- package/templates/angular/.cursor/rules/modus-angular-icon-names.mdc +70 -0
- package/templates/angular/.cursor/rules/modus-angular-icons-short.mdc +40 -0
- package/templates/angular/.cursor/rules/modus-angular-icons.mdc +137 -0
- package/templates/angular/.cursor/rules/modus-angular-implementation-guides-short.mdc +36 -0
- package/templates/angular/.cursor/rules/modus-angular-implementation-guides.mdc +301 -0
- package/templates/angular/.cursor/rules/modus-angular-integration-short.mdc +60 -0
- package/templates/angular/.cursor/rules/modus-angular-integration.mdc +1096 -0
- package/templates/angular/.cursor/rules/modus-angular-master.mdc +164 -0
- package/templates/angular/.cursor/rules/modus-angular-modal-usage-short.mdc +51 -0
- package/templates/angular/.cursor/rules/modus-angular-modal-usage.mdc +115 -0
- package/templates/angular/.cursor/rules/modus-angular-navbar-usage-short.mdc +49 -0
- package/templates/angular/.cursor/rules/modus-angular-navbar-usage.mdc +146 -0
- package/templates/angular/.cursor/rules/modus-angular-no-emojis.mdc +66 -0
- package/templates/angular/.cursor/rules/modus-angular-opacity-utilities-short.mdc +43 -0
- package/templates/angular/.cursor/rules/modus-angular-opacity-utilities.mdc +160 -0
- package/templates/angular/.cursor/rules/modus-angular-select-vs-dropdown-menu-short.mdc +51 -0
- package/templates/angular/.cursor/rules/modus-angular-select-vs-dropdown-menu.mdc +83 -0
- package/templates/angular/.cursor/rules/modus-angular-semantic-html-short.mdc +36 -0
- package/templates/angular/.cursor/rules/modus-angular-semantic-html.mdc +81 -0
- package/templates/angular/.cursor/rules/modus-angular-side-navigation-usage-short.mdc +50 -0
- package/templates/angular/.cursor/rules/modus-angular-side-navigation-usage.mdc +136 -0
- package/templates/angular/.cursor/rules/modus-angular-table-usage-short.mdc +52 -0
- package/templates/angular/.cursor/rules/modus-angular-table-usage.mdc +151 -0
- package/templates/angular/.cursor/rules/modus-angular-tailwind-usage-short.mdc +44 -0
- package/templates/angular/.cursor/rules/modus-angular-tailwind-usage.mdc +242 -0
- package/templates/angular/.cursor/rules/modus-angular-themes-short.mdc +54 -0
- package/templates/angular/.cursor/rules/modus-angular-themes.mdc +222 -0
- package/templates/angular/.cursor/rules/modus-angular-utility-panel-usage-short.mdc +52 -0
- package/templates/angular/.cursor/rules/modus-angular-utility-panel-usage.mdc +130 -0
- package/templates/angular/.cursor/rules/ux/gestalt-laws-detailed.mdc +514 -0
- package/templates/angular/.cursor/rules/ux/ux-ui-foundations.mdc +235 -0
- package/templates/angular/.cursor/skills/run-lint-checks/SKILL.md +169 -0
- package/templates/angular/.editorconfig +17 -0
- package/templates/angular/.github/dependabot.yml +19 -0
- package/templates/angular/.github/workflows/a11y-check.yml +135 -0
- package/templates/angular/.github/workflows/ci.yml +44 -0
- package/templates/angular/.husky/pre-commit +32 -0
- package/templates/angular/.postcssrc.json +5 -0
- package/templates/angular/.vscode/extensions.json +4 -0
- package/templates/angular/.vscode/launch.json +20 -0
- package/templates/angular/.vscode/tasks.json +42 -0
- package/templates/angular/CLAUDE.md +148 -0
- package/templates/angular/README.md +92 -0
- package/templates/angular/amplify.yml +25 -0
- package/templates/angular/angular.json +106 -0
- package/templates/angular/data/modusIcons.ts +861 -0
- package/templates/angular/package-lock.json +11030 -0
- package/templates/angular/package.json +66 -0
- package/templates/angular/public/angular-icon.svg +12 -0
- package/templates/angular/public/favicon.ico +0 -0
- package/templates/angular/public/modus-icons.css +49 -0
- package/templates/angular/public/vite.svg +1 -0
- package/templates/angular/scripts/README.md +410 -0
- package/templates/angular/scripts/check-border-violations.js +352 -0
- package/templates/angular/scripts/check-icon-names.js +402 -0
- package/templates/angular/scripts/check-inline-styles.js +292 -0
- package/templates/angular/scripts/check-modus-colors.js +282 -0
- package/templates/angular/scripts/check-modus-icons.js +263 -0
- package/templates/angular/scripts/check-opacity-utilities.js +426 -0
- package/templates/angular/scripts/check-semantic-html.js +452 -0
- package/templates/angular/scripts/check-typescript.js +109 -0
- package/templates/angular/src/app/app.config.ts +29 -0
- package/templates/angular/src/app/app.css +0 -0
- package/templates/angular/src/app/app.html +4 -0
- package/templates/angular/src/app/app.routes.ts +351 -0
- package/templates/angular/src/app/app.spec.ts +27 -0
- package/templates/angular/src/app/app.ts +47 -0
- package/templates/angular/src/app/components/README.md +77 -0
- package/templates/angular/src/app/components/index.ts +53 -0
- package/templates/angular/src/app/components/modus-accordion.component.ts +50 -0
- package/templates/angular/src/app/components/modus-alert.component.ts +133 -0
- package/templates/angular/src/app/components/modus-autocomplete.component.ts +262 -0
- package/templates/angular/src/app/components/modus-avatar.component.ts +75 -0
- package/templates/angular/src/app/components/modus-badge.component.ts +84 -0
- package/templates/angular/src/app/components/modus-breadcrumbs.component.ts +65 -0
- package/templates/angular/src/app/components/modus-button-group.component.ts +82 -0
- package/templates/angular/src/app/components/modus-button.component.ts +292 -0
- package/templates/angular/src/app/components/modus-card.component.ts +73 -0
- package/templates/angular/src/app/components/modus-checkbox.component.ts +117 -0
- package/templates/angular/src/app/components/modus-chip.component.ts +97 -0
- package/templates/angular/src/app/components/modus-collapse.component.ts +118 -0
- package/templates/angular/src/app/components/modus-date.component.ts +165 -0
- package/templates/angular/src/app/components/modus-dropdown-menu.component.ts +108 -0
- package/templates/angular/src/app/components/modus-file-dropzone.component.ts +121 -0
- package/templates/angular/src/app/components/modus-handle.component.ts +96 -0
- package/templates/angular/src/app/components/modus-icon.component.ts +81 -0
- package/templates/angular/src/app/components/modus-input-feedback.component.ts +54 -0
- package/templates/angular/src/app/components/modus-input-label.component.ts +62 -0
- package/templates/angular/src/app/components/modus-loader.component.ts +48 -0
- package/templates/angular/src/app/components/modus-logo.component.ts +115 -0
- package/templates/angular/src/app/components/modus-menu-item.component.ts +116 -0
- package/templates/angular/src/app/components/modus-menu.component.ts +58 -0
- package/templates/angular/src/app/components/modus-modal.component.ts +70 -0
- package/templates/angular/src/app/components/modus-navbar.component.ts +303 -0
- package/templates/angular/src/app/components/modus-number-input.component.ts +174 -0
- package/templates/angular/src/app/components/modus-pagination.component.ts +74 -0
- package/templates/angular/src/app/components/modus-panel.component.ts +61 -0
- package/templates/angular/src/app/components/modus-progress.component.ts +62 -0
- package/templates/angular/src/app/components/modus-radio.component.ts +102 -0
- package/templates/angular/src/app/components/modus-rating.component.ts +80 -0
- package/templates/angular/src/app/components/modus-select.component.ts +131 -0
- package/templates/angular/src/app/components/modus-side-navigation.component.ts +90 -0
- package/templates/angular/src/app/components/modus-skeleton.component.ts +54 -0
- package/templates/angular/src/app/components/modus-slider.component.ts +132 -0
- package/templates/angular/src/app/components/modus-stepper.component.ts +65 -0
- package/templates/angular/src/app/components/modus-switch.component.ts +118 -0
- package/templates/angular/src/app/components/modus-table.component.ts +204 -0
- package/templates/angular/src/app/components/modus-tabs.component.ts +82 -0
- package/templates/angular/src/app/components/modus-text-input.component.ts +221 -0
- package/templates/angular/src/app/components/modus-textarea.component.ts +168 -0
- package/templates/angular/src/app/components/modus-theme-switcher.component.ts +45 -0
- package/templates/angular/src/app/components/modus-time-input.component.ts +172 -0
- package/templates/angular/src/app/components/modus-toast.component.ts +63 -0
- package/templates/angular/src/app/components/modus-toolbar.component.ts +43 -0
- package/templates/angular/src/app/components/modus-tooltip.component.ts +83 -0
- package/templates/angular/src/app/components/modus-typography.component.ts +79 -0
- package/templates/angular/src/app/components/modus-utility-panel.component.ts +275 -0
- package/templates/angular/src/app/components/theme-demo.component.ts +1242 -0
- package/templates/angular/src/app/data/component-demos.ts +360 -0
- package/templates/angular/src/app/data/modus-icons.ts +806 -0
- package/templates/angular/src/app/demos/accordion/accordion-demo.component.ts +212 -0
- package/templates/angular/src/app/demos/alert/alert-demo.component.ts +108 -0
- package/templates/angular/src/app/demos/autocomplete/autocomplete-demo.component.ts +174 -0
- package/templates/angular/src/app/demos/avatar/avatar-demo.component.ts +149 -0
- package/templates/angular/src/app/demos/badge/badge-demo.component.ts +148 -0
- package/templates/angular/src/app/demos/breadcrumbs/breadcrumbs-demo.component.ts +96 -0
- package/templates/angular/src/app/demos/button/button-demo.component.ts +256 -0
- package/templates/angular/src/app/demos/button-group/button-group-demo.component.ts +215 -0
- package/templates/angular/src/app/demos/card/card-demo.component.ts +180 -0
- package/templates/angular/src/app/demos/checkbox/checkbox-demo.component.ts +71 -0
- package/templates/angular/src/app/demos/chip/chip-demo.component.ts +183 -0
- package/templates/angular/src/app/demos/date/date-demo.component.ts +193 -0
- package/templates/angular/src/app/demos/dropdown/dropdown-demo.component.ts +196 -0
- package/templates/angular/src/app/demos/file-dropzone/file-dropzone-demo.component.ts +176 -0
- package/templates/angular/src/app/demos/handle/handle-demo.component.ts +265 -0
- package/templates/angular/src/app/demos/icon/icon-demo.component.ts +65 -0
- package/templates/angular/src/app/demos/input-feedback/input-feedback-demo.component.ts +189 -0
- package/templates/angular/src/app/demos/input-label/input-label-demo.component.ts +330 -0
- package/templates/angular/src/app/demos/loader/loader-demo.component.ts +143 -0
- package/templates/angular/src/app/demos/logo/logo-demo.component.ts +191 -0
- package/templates/angular/src/app/demos/menu/menu-demo.component.ts +72 -0
- package/templates/angular/src/app/demos/modal/modal-demo.component.ts +278 -0
- package/templates/angular/src/app/demos/navbar/navbar-demo.component.ts +135 -0
- package/templates/angular/src/app/demos/number-input/number-input-demo.component.ts +175 -0
- package/templates/angular/src/app/demos/pagination/pagination-demo.component.ts +134 -0
- package/templates/angular/src/app/demos/panel/panel-demo.component.ts +235 -0
- package/templates/angular/src/app/demos/progress/progress-demo.component.ts +169 -0
- package/templates/angular/src/app/demos/radio/radio-demo.component.ts +161 -0
- package/templates/angular/src/app/demos/rating/rating-demo.component.ts +97 -0
- package/templates/angular/src/app/demos/select/select-demo.component.ts +107 -0
- package/templates/angular/src/app/demos/shared/demo-example-clean.component.ts +41 -0
- package/templates/angular/src/app/demos/shared/demo-example.component.ts +42 -0
- package/templates/angular/src/app/demos/shared/demo-page.component.ts +97 -0
- package/templates/angular/src/app/demos/shared/index.ts +3 -0
- package/templates/angular/src/app/demos/side-navigation/side-navigation-demo.component.ts +524 -0
- package/templates/angular/src/app/demos/skeleton/skeleton-demo.component.ts +112 -0
- package/templates/angular/src/app/demos/slider/slider-demo.component.ts +76 -0
- package/templates/angular/src/app/demos/stepper/stepper-demo.component.ts +79 -0
- package/templates/angular/src/app/demos/switch/switch-demo.component.ts +113 -0
- package/templates/angular/src/app/demos/table/table-demo.component.ts +405 -0
- package/templates/angular/src/app/demos/tabs/tabs-demo.component.ts +318 -0
- package/templates/angular/src/app/demos/text-input/text-input-demo.component.ts +160 -0
- package/templates/angular/src/app/demos/textarea/textarea-demo.component.ts +95 -0
- package/templates/angular/src/app/demos/theme-switcher/theme-switcher-demo.component.ts +38 -0
- package/templates/angular/src/app/demos/time-input/time-input-demo.component.ts +130 -0
- package/templates/angular/src/app/demos/toast/toast-demo.component.ts +258 -0
- package/templates/angular/src/app/demos/toolbar/toolbar-demo.component.ts +54 -0
- package/templates/angular/src/app/demos/tooltip/tooltip-demo.component.ts +163 -0
- package/templates/angular/src/app/demos/utility-panel/utility-panel-demo.component.ts +197 -0
- package/templates/angular/src/app/dev/dev-config.ts +119 -0
- package/templates/angular/src/app/dev/dev-panel/dev-panel.component.ts +215 -0
- package/templates/angular/src/app/dev/dev-panel.service.ts +63 -0
- package/templates/angular/src/app/dev/index.ts +8 -0
- package/templates/angular/src/app/dev/theme-switcher-dropdown/theme-switcher-dropdown.component.ts +134 -0
- package/templates/angular/src/app/dev-pages/color-palette/color-palette.component.ts +229 -0
- package/templates/angular/src/app/dev-pages/components-gallery/components-gallery.component.ts +486 -0
- package/templates/angular/src/app/dev-pages/icons/icons.component.ts +149 -0
- package/templates/angular/src/app/pages/home/home.component.ts +251 -0
- package/templates/angular/src/app/services/README.md +57 -0
- package/templates/angular/src/app/services/theme.service.ts +163 -0
- package/templates/angular/src/environments/environment.development.ts +8 -0
- package/templates/angular/src/environments/environment.ts +8 -0
- package/templates/angular/src/index.html +14 -0
- package/templates/angular/src/main.ts +6 -0
- package/templates/angular/src/styles.css +1328 -0
- package/templates/angular/tsconfig.app.json +15 -0
- package/templates/angular/tsconfig.json +35 -0
- package/templates/angular/tsconfig.spec.json +14 -0
- package/templates/config.json +23 -0
- package/templates/react/.cursor/commands/remove-dev-content.md +311 -0
- package/templates/react/.cursor/mcp.json +13 -0
- package/templates/react/.cursor/rules/README.md +240 -0
- package/templates/react/.cursor/rules/border-usage-guidelines-short.mdc +22 -0
- package/templates/react/.cursor/rules/border-usage-guidelines.mdc +380 -0
- package/templates/react/.cursor/rules/chrome-devtools-testing-react-short.mdc +23 -0
- package/templates/react/.cursor/rules/development-workflow-react-short.mdc +23 -0
- package/templates/react/.cursor/rules/development-workflow-react.mdc +292 -0
- package/templates/react/.cursor/rules/implementation-guides-react-short.mdc +23 -0
- package/templates/react/.cursor/rules/implementation-guides-react.mdc +446 -0
- package/templates/react/.cursor/rules/modus-accordion-state-management-react-short.mdc +23 -0
- package/templates/react/.cursor/rules/modus-accordion-state-management-react.mdc +445 -0
- package/templates/react/.cursor/rules/modus-button-group-usage-react-short.mdc +23 -0
- package/templates/react/.cursor/rules/modus-button-group-usage-react.mdc +117 -0
- package/templates/react/.cursor/rules/modus-checkbox-value-inversion-react-short.mdc +23 -0
- package/templates/react/.cursor/rules/modus-checkbox-value-inversion-react.mdc +492 -0
- package/templates/react/.cursor/rules/modus-color-usage-react-short.mdc +23 -0
- package/templates/react/.cursor/rules/modus-color-usage-react.mdc +420 -0
- package/templates/react/.cursor/rules/modus-components-reference.mdc +366 -0
- package/templates/react/.cursor/rules/modus-icon-names.mdc +63 -0
- package/templates/react/.cursor/rules/modus-icons-react-short.mdc +24 -0
- package/templates/react/.cursor/rules/modus-icons-react.mdc +402 -0
- package/templates/react/.cursor/rules/modus-modal-implementation-react-short.mdc +23 -0
- package/templates/react/.cursor/rules/modus-modal-implementation-react.mdc +831 -0
- package/templates/react/.cursor/rules/modus-navbar-side-navigation-react-short.mdc +23 -0
- package/templates/react/.cursor/rules/modus-navbar-side-navigation-react.mdc +247 -0
- package/templates/react/.cursor/rules/modus-no-emojis-react-short.mdc +23 -0
- package/templates/react/.cursor/rules/modus-opacity-utilities-react-short.mdc +70 -0
- package/templates/react/.cursor/rules/modus-opacity-utilities-react.mdc +208 -0
- package/templates/react/.cursor/rules/modus-react-best-practices-short.mdc +23 -0
- package/templates/react/.cursor/rules/modus-react-best-practices.mdc +508 -0
- package/templates/react/.cursor/rules/modus-react-essentials.mdc +209 -0
- package/templates/react/.cursor/rules/modus-react-integration-short.mdc +23 -0
- package/templates/react/.cursor/rules/modus-react-integration.mdc +509 -0
- package/templates/react/.cursor/rules/modus-react-key-warnings-short.mdc +23 -0
- package/templates/react/.cursor/rules/modus-react-key-warnings.mdc +805 -0
- package/templates/react/.cursor/rules/modus-react-master.mdc +160 -0
- package/templates/react/.cursor/rules/modus-select-vs-dropdown-menu-react-short.mdc +23 -0
- package/templates/react/.cursor/rules/modus-select-vs-dropdown-menu-react.mdc +442 -0
- package/templates/react/.cursor/rules/modus-semantic-html-react-short.mdc +23 -0
- package/templates/react/.cursor/rules/modus-semantic-html-react.mdc +427 -0
- package/templates/react/.cursor/rules/modus-tailwind-usage-react-short.mdc +23 -0
- package/templates/react/.cursor/rules/modus-tailwind-usage-react.mdc +642 -0
- package/templates/react/.cursor/rules/modus-themes-react-short.mdc +23 -0
- package/templates/react/.cursor/rules/modus-themes-react.mdc +506 -0
- package/templates/react/.cursor/rules/ux/gestalt-laws-detailed.mdc +456 -0
- package/templates/react/.cursor/rules/ux/ux-ui-foundations.mdc +211 -0
- package/templates/react/.cursor/skills/create-modus-form-component/SKILL.md +518 -0
- package/templates/react/.cursor/skills/create-modus-wrapper-component/SKILL.md +252 -0
- package/templates/react/.cursor/skills/fix-modus-component-event-issues/SKILL.md +345 -0
- package/templates/react/.cursor/skills/handle-modus-checkbox-value-bug/SKILL.md +202 -0
- package/templates/react/.cursor/skills/implement-modus-modal-with-refs/SKILL.md +386 -0
- package/templates/react/.cursor/skills/integrate-modus-icons/SKILL.md +300 -0
- package/templates/react/.cursor/skills/run-lint-checks/SKILL.md +235 -0
- package/templates/react/.cursor/skills/set-up-modus-event-listeners/SKILL.md +284 -0
- package/templates/react/.cursor/skills/style-modus-components-with-tailwind/SKILL.md +382 -0
- package/templates/react/.env.development +3 -0
- package/templates/react/.env.production +3 -0
- package/templates/react/.github/CODEOWNERS +28 -0
- package/templates/react/.github/ISSUE_TEMPLATE/bug_report.yml +176 -0
- package/templates/react/.github/ISSUE_TEMPLATE/config.yml +20 -0
- package/templates/react/.github/ISSUE_TEMPLATE/documentation.yml +115 -0
- package/templates/react/.github/ISSUE_TEMPLATE/feature_request.yml +171 -0
- package/templates/react/.github/ISSUE_TEMPLATE/question.yml +139 -0
- package/templates/react/.github/copilot-instructions.md +80 -0
- package/templates/react/.github/instructions/components.instructions.md +82 -0
- package/templates/react/.github/instructions/demos.instructions.md +82 -0
- package/templates/react/.github/instructions/pages.instructions.md +76 -0
- package/templates/react/.github/instructions/styles.instructions.md +77 -0
- package/templates/react/.github/instructions/typescript.instructions.md +101 -0
- package/templates/react/.github/pull_request_template.md +188 -0
- package/templates/react/.github/workflows/ci.yml +43 -0
- package/templates/react/.github/workflows/claude-code-review.yml +44 -0
- package/templates/react/.github/workflows/claude.yml +50 -0
- package/templates/react/.husky/pre-commit +28 -0
- package/templates/react/.vscode/extensions.json +8 -0
- package/templates/react/CLAUDE.md +119 -0
- package/templates/react/CODE_OF_CONDUCT.md +79 -0
- package/templates/react/CONTRIBUTING.md +65 -0
- package/templates/react/LICENSE +21 -0
- package/templates/react/README.md +728 -0
- package/templates/react/SECURITY.md +50 -0
- package/templates/react/eslint.config.js +23 -0
- package/templates/react/index.html +13 -0
- package/templates/react/package-lock.json +5209 -0
- package/templates/react/package.json +49 -0
- package/templates/react/postcss.config.js +6 -0
- package/templates/react/public/react.svg +1 -0
- package/templates/react/public/vite.svg +1 -0
- package/templates/react/readme_assets/getting_started_header.png +0 -0
- package/templates/react/readme_assets/hero.png +0 -0
- package/templates/react/readme_assets/modus_comp.png +0 -0
- package/templates/react/readme_assets/modus_figma_mcp.png +0 -0
- package/templates/react/readme_assets/teaser_comp.gif +0 -0
- package/templates/react/scripts/README.md +343 -0
- package/templates/react/scripts/check-border-violations.js +483 -0
- package/templates/react/scripts/check-icon-names.js +486 -0
- package/templates/react/scripts/check-inline-styles.js +364 -0
- package/templates/react/scripts/check-modus-colors.js +247 -0
- package/templates/react/scripts/check-modus-icons.js +256 -0
- package/templates/react/scripts/check-opacity-utilities.js +481 -0
- package/templates/react/scripts/check-semantic-html.js +476 -0
- package/templates/react/scripts/check-typescript.js +109 -0
- package/templates/react/src/App.css +42 -0
- package/templates/react/src/App.tsx +54 -0
- package/templates/react/src/assets/react.svg +1 -0
- package/templates/react/src/components/DemoExample.tsx +61 -0
- package/templates/react/src/components/DemoPage.tsx +81 -0
- package/templates/react/src/components/ModusAccordion.tsx +89 -0
- package/templates/react/src/components/ModusAlert.tsx +85 -0
- package/templates/react/src/components/ModusAutocomplete.tsx +207 -0
- package/templates/react/src/components/ModusAvatar.tsx +50 -0
- package/templates/react/src/components/ModusBadge.tsx +82 -0
- package/templates/react/src/components/ModusBreadcrumbs.tsx +75 -0
- package/templates/react/src/components/ModusButton.tsx +244 -0
- package/templates/react/src/components/ModusButtonGroup.tsx +91 -0
- package/templates/react/src/components/ModusCard.tsx +70 -0
- package/templates/react/src/components/ModusCheckbox.tsx +168 -0
- package/templates/react/src/components/ModusChip.tsx +93 -0
- package/templates/react/src/components/ModusDate.tsx +154 -0
- package/templates/react/src/components/ModusDropdownMenu.tsx +148 -0
- package/templates/react/src/components/ModusFileDropzone.tsx +140 -0
- package/templates/react/src/components/ModusHandle.tsx +101 -0
- package/templates/react/src/components/ModusIcon.tsx +49 -0
- package/templates/react/src/components/ModusInputFeedback.tsx +52 -0
- package/templates/react/src/components/ModusInputLabel.tsx +50 -0
- package/templates/react/src/components/ModusLoader.tsx +42 -0
- package/templates/react/src/components/ModusLogo.tsx +102 -0
- package/templates/react/src/components/ModusMenu.tsx +119 -0
- package/templates/react/src/components/ModusMenuItem.tsx +86 -0
- package/templates/react/src/components/ModusModal.tsx +145 -0
- package/templates/react/src/components/ModusNavbar.tsx +504 -0
- package/templates/react/src/components/ModusNumberInput.tsx +230 -0
- package/templates/react/src/components/ModusPagination.tsx +94 -0
- package/templates/react/src/components/ModusPanel.tsx +92 -0
- package/templates/react/src/components/ModusProgress.tsx +70 -0
- package/templates/react/src/components/ModusProvider.tsx +18 -0
- package/templates/react/src/components/ModusRadio.tsx +114 -0
- package/templates/react/src/components/ModusRating.tsx +108 -0
- package/templates/react/src/components/ModusSelect.tsx +171 -0
- package/templates/react/src/components/ModusSideNavigation.tsx +149 -0
- package/templates/react/src/components/ModusSkeleton.tsx +42 -0
- package/templates/react/src/components/ModusSlider.tsx +128 -0
- package/templates/react/src/components/ModusStepper.tsx +85 -0
- package/templates/react/src/components/ModusSwitch.tsx +130 -0
- package/templates/react/src/components/ModusTable.tsx +309 -0
- package/templates/react/src/components/ModusTabs.tsx +114 -0
- package/templates/react/src/components/ModusTextInput.tsx +179 -0
- package/templates/react/src/components/ModusTextarea.tsx +164 -0
- package/templates/react/src/components/ModusThemeSwitcher.tsx +58 -0
- package/templates/react/src/components/ModusTimeInput.tsx +176 -0
- package/templates/react/src/components/ModusToast.tsx +207 -0
- package/templates/react/src/components/ModusToolbar.tsx +70 -0
- package/templates/react/src/components/ModusTooltip.tsx +97 -0
- package/templates/react/src/components/ModusUtilityPanel.tsx +198 -0
- package/templates/react/src/components/ThemeSwitcherDropdown.tsx +117 -0
- package/templates/react/src/components/ThemeToggleSimple.tsx +157 -0
- package/templates/react/src/config/routes.ts +196 -0
- package/templates/react/src/contexts/ThemeContext.tsx +81 -0
- package/templates/react/src/contexts/ThemeContextData.tsx +89 -0
- package/templates/react/src/data/modusIcons.ts +865 -0
- package/templates/react/src/demos/accordion-demo/page.tsx +236 -0
- package/templates/react/src/demos/alert-demo/page.tsx +94 -0
- package/templates/react/src/demos/autocomplete-demo/page.tsx +166 -0
- package/templates/react/src/demos/avatar-demo/page.tsx +135 -0
- package/templates/react/src/demos/badge-demo/page.tsx +174 -0
- package/templates/react/src/demos/breadcrumbs-demo/page.tsx +88 -0
- package/templates/react/src/demos/button-demo/page.tsx +261 -0
- package/templates/react/src/demos/button-group-demo/page.tsx +231 -0
- package/templates/react/src/demos/card-demo/page.tsx +241 -0
- package/templates/react/src/demos/checkbox-demo/page.tsx +79 -0
- package/templates/react/src/demos/chip-demo/page.tsx +197 -0
- package/templates/react/src/demos/date-demo/page.tsx +179 -0
- package/templates/react/src/demos/dropdown-demo/page.tsx +150 -0
- package/templates/react/src/demos/file-dropzone-demo/page.tsx +186 -0
- package/templates/react/src/demos/handle-demo/page.tsx +313 -0
- package/templates/react/src/demos/icon-demo/page.tsx +72 -0
- package/templates/react/src/demos/input-feedback-demo/page.tsx +202 -0
- package/templates/react/src/demos/input-label-demo/page.tsx +392 -0
- package/templates/react/src/demos/loader-demo/page.tsx +138 -0
- package/templates/react/src/demos/logo-demo/page.tsx +292 -0
- package/templates/react/src/demos/menu-demo/page.tsx +70 -0
- package/templates/react/src/demos/modal-demo/page.tsx +332 -0
- package/templates/react/src/demos/navbar-demo/page.tsx +141 -0
- package/templates/react/src/demos/number-input-demo/page.tsx +180 -0
- package/templates/react/src/demos/pagination-demo/page.tsx +147 -0
- package/templates/react/src/demos/panel-demo/page.tsx +376 -0
- package/templates/react/src/demos/progress-demo/page.tsx +185 -0
- package/templates/react/src/demos/radio-demo/page.tsx +242 -0
- package/templates/react/src/demos/rating-demo/page.tsx +97 -0
- package/templates/react/src/demos/select-demo/page.tsx +111 -0
- package/templates/react/src/demos/side-navigation-demo/page.tsx +775 -0
- package/templates/react/src/demos/skeleton-demo/page.tsx +107 -0
- package/templates/react/src/demos/slider-demo/page.tsx +78 -0
- package/templates/react/src/demos/stepper-demo/page.tsx +86 -0
- package/templates/react/src/demos/switch-demo/page.tsx +146 -0
- package/templates/react/src/demos/table-demo/page.tsx +489 -0
- package/templates/react/src/demos/tabs-demo/page.tsx +187 -0
- package/templates/react/src/demos/text-input-demo/page.tsx +151 -0
- package/templates/react/src/demos/textarea-demo/page.tsx +73 -0
- package/templates/react/src/demos/theme-switcher-demo/page.tsx +26 -0
- package/templates/react/src/demos/time-input-demo/page.tsx +148 -0
- package/templates/react/src/demos/toast-demo/page.tsx +302 -0
- package/templates/react/src/demos/toolbar-demo/page.tsx +49 -0
- package/templates/react/src/demos/tooltip-demo/page.tsx +209 -0
- package/templates/react/src/demos/typography-test/page.tsx +28 -0
- package/templates/react/src/demos/utility-panel-demo/page.tsx +197 -0
- package/templates/react/src/dev/DevPanel.tsx +219 -0
- package/templates/react/src/dev/DevPanelContext.ts +14 -0
- package/templates/react/src/dev/DevPanelProvider.tsx +63 -0
- package/templates/react/src/dev/DevRoutes.tsx +98 -0
- package/templates/react/src/dev/config.ts +127 -0
- package/templates/react/src/dev/index.ts +8 -0
- package/templates/react/src/dev/useDevPanel.ts +17 -0
- package/templates/react/src/dev-pages/ColorPalettePage.tsx +347 -0
- package/templates/react/src/dev-pages/ComponentsGalleryPage.tsx +489 -0
- package/templates/react/src/dev-pages/IconsPage.tsx +137 -0
- package/templates/react/src/dev-pages/index.ts +3 -0
- package/templates/react/src/hooks/useTheme.ts +15 -0
- package/templates/react/src/index.css +635 -0
- package/templates/react/src/main.tsx +14 -0
- package/templates/react/src/pages/HomePage.tsx +283 -0
- package/templates/react/src/vite-env.d.ts +9 -0
- package/templates/react/tailwind.config.js +58 -0
- package/templates/react/tsconfig.app.json +27 -0
- package/templates/react/tsconfig.json +7 -0
- package/templates/react/tsconfig.node.json +25 -0
- package/templates/react/vite.config.ts +18 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { DemoPageComponent } from '../shared/demo-page.component';
|
|
4
|
+
import { DemoExampleComponent } from '../shared/demo-example.component';
|
|
5
|
+
import { ModusMenuComponent } from '../../components/modus-menu.component';
|
|
6
|
+
import { ModusMenuItemComponent } from '../../components/modus-menu-item.component';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Demo page showcasing the Modus Menu component.
|
|
10
|
+
*
|
|
11
|
+
* Demonstrates menu features including:
|
|
12
|
+
* - Vertical menu
|
|
13
|
+
* - Horizontal menu
|
|
14
|
+
* - Selected menu items
|
|
15
|
+
*/
|
|
16
|
+
@Component({
|
|
17
|
+
selector: 'app-menu-demo-page',
|
|
18
|
+
standalone: true,
|
|
19
|
+
imports: [
|
|
20
|
+
CommonModule,
|
|
21
|
+
DemoPageComponent,
|
|
22
|
+
DemoExampleComponent,
|
|
23
|
+
ModusMenuComponent,
|
|
24
|
+
ModusMenuItemComponent,
|
|
25
|
+
],
|
|
26
|
+
template: `
|
|
27
|
+
<demo-page
|
|
28
|
+
title="Modus Menu"
|
|
29
|
+
description="Menus provide navigation and action lists. Use menus to organize related actions or navigation items in a consistent, accessible way."
|
|
30
|
+
>
|
|
31
|
+
<demo-example
|
|
32
|
+
title="Vertical Menu"
|
|
33
|
+
description="Default vertical menu orientation for navigation lists."
|
|
34
|
+
>
|
|
35
|
+
<modus-menu [bordered]="true">
|
|
36
|
+
<modus-menu-item label="Dashboard" value="dashboard" [selected]="true" />
|
|
37
|
+
<modus-menu-item label="Projects" value="projects" />
|
|
38
|
+
<modus-menu-item label="Reports" value="reports" />
|
|
39
|
+
<modus-menu-item label="Settings" value="settings" />
|
|
40
|
+
</modus-menu>
|
|
41
|
+
</demo-example>
|
|
42
|
+
|
|
43
|
+
<demo-example
|
|
44
|
+
title="Horizontal Menu"
|
|
45
|
+
description="Horizontal menu orientation for top navigation."
|
|
46
|
+
>
|
|
47
|
+
<modus-menu orientation="horizontal">
|
|
48
|
+
<modus-menu-item label="Home" value="home" />
|
|
49
|
+
<modus-menu-item label="Products" value="products" />
|
|
50
|
+
<modus-menu-item label="About" value="about" />
|
|
51
|
+
<modus-menu-item label="Contact" value="contact" />
|
|
52
|
+
</modus-menu>
|
|
53
|
+
</demo-example>
|
|
54
|
+
|
|
55
|
+
<demo-example
|
|
56
|
+
title="Selected Menu Items"
|
|
57
|
+
description="Menu with selected items to indicate current state."
|
|
58
|
+
>
|
|
59
|
+
<modus-menu [bordered]="true">
|
|
60
|
+
<modus-menu-item label="All Projects" value="all" [selected]="selectedMenu() === 'all'" />
|
|
61
|
+
<modus-menu-item label="Active" value="active" [selected]="selectedMenu() === 'active'" />
|
|
62
|
+
<modus-menu-item label="Archived" value="archived" [selected]="selectedMenu() === 'archived'" />
|
|
63
|
+
<modus-menu-item label="Deleted" value="deleted" [selected]="selectedMenu() === 'deleted'" />
|
|
64
|
+
</modus-menu>
|
|
65
|
+
</demo-example>
|
|
66
|
+
|
|
67
|
+
</demo-page>
|
|
68
|
+
`,
|
|
69
|
+
})
|
|
70
|
+
export class MenuDemoPageComponent {
|
|
71
|
+
readonly selectedMenu = signal<string>('all');
|
|
72
|
+
}
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { DemoPageComponent } from '../shared/demo-page.component';
|
|
4
|
+
import { DemoExampleComponent } from '../shared/demo-example.component';
|
|
5
|
+
import { ModusModalComponent } from '../../components/modus-modal.component';
|
|
6
|
+
import { ModusButtonComponent } from '../../components/modus-button.component';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Demo page showcasing the Modus Modal component.
|
|
10
|
+
*
|
|
11
|
+
* Demonstrates modal features including:
|
|
12
|
+
* - Centered dialog
|
|
13
|
+
* - Position variants (top, bottom)
|
|
14
|
+
* - Fullscreen modal
|
|
15
|
+
* - Static backdrop
|
|
16
|
+
* - Custom styling
|
|
17
|
+
*/
|
|
18
|
+
@Component({
|
|
19
|
+
selector: 'app-modal-demo-page',
|
|
20
|
+
standalone: true,
|
|
21
|
+
imports: [
|
|
22
|
+
CommonModule,
|
|
23
|
+
DemoPageComponent,
|
|
24
|
+
DemoExampleComponent,
|
|
25
|
+
ModusModalComponent,
|
|
26
|
+
ModusButtonComponent,
|
|
27
|
+
],
|
|
28
|
+
template: `
|
|
29
|
+
<demo-page
|
|
30
|
+
title="Modus Modal"
|
|
31
|
+
description="Modals focus attention on a short, interruptive task. Keep content concise and provide a clear primary action."
|
|
32
|
+
>
|
|
33
|
+
<demo-example
|
|
34
|
+
title="Centered Dialog"
|
|
35
|
+
description="Default centered modal for quick confirmations or lightweight forms."
|
|
36
|
+
>
|
|
37
|
+
<div class="space-y-4">
|
|
38
|
+
<modus-button
|
|
39
|
+
color="primary"
|
|
40
|
+
(buttonClick)="openModal('modal-centered')"
|
|
41
|
+
>Open Centered Modal</modus-button
|
|
42
|
+
>
|
|
43
|
+
<modus-modal
|
|
44
|
+
modalId="modal-centered"
|
|
45
|
+
[showClose]="true"
|
|
46
|
+
[backdrop]="'default'"
|
|
47
|
+
[position]="'center'"
|
|
48
|
+
>
|
|
49
|
+
<div slot="header" class="text-xl font-semibold text-foreground">
|
|
50
|
+
Archive project
|
|
51
|
+
</div>
|
|
52
|
+
<div slot="content" class="text-sm text-foreground-80">
|
|
53
|
+
Archived projects are hidden from your active workspace. You can restore them later
|
|
54
|
+
from the settings panel.
|
|
55
|
+
</div>
|
|
56
|
+
<div slot="footer" class="flex gap-2">
|
|
57
|
+
<modus-button
|
|
58
|
+
variant="borderless"
|
|
59
|
+
(buttonClick)="closeModal('modal-centered')"
|
|
60
|
+
>Cancel</modus-button
|
|
61
|
+
>
|
|
62
|
+
<modus-button
|
|
63
|
+
color="danger"
|
|
64
|
+
(buttonClick)="closeModal('modal-centered')"
|
|
65
|
+
>Archive</modus-button
|
|
66
|
+
>
|
|
67
|
+
</div>
|
|
68
|
+
</modus-modal>
|
|
69
|
+
</div>
|
|
70
|
+
</demo-example>
|
|
71
|
+
|
|
72
|
+
<demo-example
|
|
73
|
+
title="Position Variants"
|
|
74
|
+
description="Different vertical positions for various use cases."
|
|
75
|
+
>
|
|
76
|
+
<div class="flex gap-4 flex-wrap">
|
|
77
|
+
<modus-button
|
|
78
|
+
color="primary"
|
|
79
|
+
(buttonClick)="openModal('modal-top')"
|
|
80
|
+
>Top Position</modus-button
|
|
81
|
+
>
|
|
82
|
+
<modus-button
|
|
83
|
+
color="primary"
|
|
84
|
+
(buttonClick)="openModal('modal-bottom')"
|
|
85
|
+
>Bottom Position</modus-button
|
|
86
|
+
>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<modus-modal
|
|
90
|
+
modalId="modal-top"
|
|
91
|
+
[showClose]="true"
|
|
92
|
+
[backdrop]="'default'"
|
|
93
|
+
[position]="'top'"
|
|
94
|
+
>
|
|
95
|
+
<div slot="header" class="text-xl font-semibold text-foreground">Top Modal</div>
|
|
96
|
+
<div slot="content" class="text-sm text-foreground-80">
|
|
97
|
+
This modal appears at the top of the screen. Useful for notifications or quick actions.
|
|
98
|
+
</div>
|
|
99
|
+
<div slot="footer" class="flex gap-2">
|
|
100
|
+
<modus-button
|
|
101
|
+
variant="borderless"
|
|
102
|
+
(buttonClick)="closeModal('modal-top')"
|
|
103
|
+
>Cancel</modus-button
|
|
104
|
+
>
|
|
105
|
+
<modus-button
|
|
106
|
+
(buttonClick)="closeModal('modal-top')"
|
|
107
|
+
>Confirm</modus-button
|
|
108
|
+
>
|
|
109
|
+
</div>
|
|
110
|
+
</modus-modal>
|
|
111
|
+
|
|
112
|
+
<modus-modal
|
|
113
|
+
modalId="modal-bottom"
|
|
114
|
+
[showClose]="true"
|
|
115
|
+
[backdrop]="'default'"
|
|
116
|
+
[position]="'bottom'"
|
|
117
|
+
>
|
|
118
|
+
<div slot="header" class="text-xl font-semibold text-foreground">Bottom Modal</div>
|
|
119
|
+
<div slot="content" class="text-sm text-foreground-80">
|
|
120
|
+
This modal appears at the bottom of the screen. Great for mobile interfaces.
|
|
121
|
+
</div>
|
|
122
|
+
<div slot="footer" class="flex gap-2">
|
|
123
|
+
<modus-button
|
|
124
|
+
variant="borderless"
|
|
125
|
+
(buttonClick)="closeModal('modal-bottom')"
|
|
126
|
+
>Cancel</modus-button
|
|
127
|
+
>
|
|
128
|
+
<modus-button
|
|
129
|
+
(buttonClick)="closeModal('modal-bottom')"
|
|
130
|
+
>Confirm</modus-button
|
|
131
|
+
>
|
|
132
|
+
</div>
|
|
133
|
+
</modus-modal>
|
|
134
|
+
</demo-example>
|
|
135
|
+
|
|
136
|
+
<demo-example
|
|
137
|
+
title="Fullscreen Modal"
|
|
138
|
+
description="Full-screen modals for complex workflows or detailed content."
|
|
139
|
+
>
|
|
140
|
+
<div class="space-y-4">
|
|
141
|
+
<modus-button
|
|
142
|
+
color="primary"
|
|
143
|
+
(buttonClick)="openModal('modal-fullscreen')"
|
|
144
|
+
>Open Fullscreen Modal</modus-button
|
|
145
|
+
>
|
|
146
|
+
<modus-modal
|
|
147
|
+
modalId="modal-fullscreen"
|
|
148
|
+
[showClose]="true"
|
|
149
|
+
[backdrop]="'default'"
|
|
150
|
+
[fullscreen]="true"
|
|
151
|
+
[showFullscreenToggle]="true"
|
|
152
|
+
>
|
|
153
|
+
<div slot="header" class="text-xl font-semibold text-foreground">
|
|
154
|
+
Fullscreen Modal
|
|
155
|
+
</div>
|
|
156
|
+
<div slot="content" class="space-y-4">
|
|
157
|
+
<div class="text-sm text-foreground-80">
|
|
158
|
+
This is a fullscreen modal that covers the entire viewport. Perfect for complex
|
|
159
|
+
forms or detailed content.
|
|
160
|
+
</div>
|
|
161
|
+
<div class="text-sm text-foreground-80">
|
|
162
|
+
You can toggle between fullscreen and normal size using the button in the header.
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
<div slot="footer" class="flex gap-2">
|
|
166
|
+
<modus-button
|
|
167
|
+
variant="borderless"
|
|
168
|
+
(buttonClick)="closeModal('modal-fullscreen')"
|
|
169
|
+
>Cancel</modus-button
|
|
170
|
+
>
|
|
171
|
+
<modus-button
|
|
172
|
+
(buttonClick)="closeModal('modal-fullscreen')"
|
|
173
|
+
>Save Changes</modus-button
|
|
174
|
+
>
|
|
175
|
+
</div>
|
|
176
|
+
</modus-modal>
|
|
177
|
+
</div>
|
|
178
|
+
</demo-example>
|
|
179
|
+
|
|
180
|
+
<demo-example
|
|
181
|
+
title="Static Backdrop"
|
|
182
|
+
description="Modal that doesn't close when clicking outside - user must use explicit actions."
|
|
183
|
+
>
|
|
184
|
+
<div class="space-y-4">
|
|
185
|
+
<modus-button
|
|
186
|
+
color="primary"
|
|
187
|
+
(buttonClick)="openModal('modal-static')"
|
|
188
|
+
>Open Static Modal</modus-button
|
|
189
|
+
>
|
|
190
|
+
<modus-modal
|
|
191
|
+
modalId="modal-static"
|
|
192
|
+
[showClose]="true"
|
|
193
|
+
[backdrop]="'static'"
|
|
194
|
+
>
|
|
195
|
+
<div slot="header" class="text-xl font-semibold text-foreground">
|
|
196
|
+
Important Action
|
|
197
|
+
</div>
|
|
198
|
+
<div slot="content" class="text-sm text-foreground-80">
|
|
199
|
+
This modal has a static backdrop. Clicking outside won't close it - you must use the
|
|
200
|
+
buttons or press Escape.
|
|
201
|
+
</div>
|
|
202
|
+
<div slot="footer" class="flex gap-2">
|
|
203
|
+
<modus-button
|
|
204
|
+
variant="borderless"
|
|
205
|
+
(buttonClick)="closeModal('modal-static')"
|
|
206
|
+
>Cancel</modus-button
|
|
207
|
+
>
|
|
208
|
+
<modus-button
|
|
209
|
+
color="danger"
|
|
210
|
+
(buttonClick)="closeModal('modal-static')"
|
|
211
|
+
>Delete Forever</modus-button
|
|
212
|
+
>
|
|
213
|
+
</div>
|
|
214
|
+
</modus-modal>
|
|
215
|
+
</div>
|
|
216
|
+
</demo-example>
|
|
217
|
+
|
|
218
|
+
<demo-example
|
|
219
|
+
title="Custom Styling"
|
|
220
|
+
description="Modal with custom dimensions and styling."
|
|
221
|
+
>
|
|
222
|
+
<div class="space-y-4">
|
|
223
|
+
<modus-button
|
|
224
|
+
color="primary"
|
|
225
|
+
(buttonClick)="openModal('modal-custom')"
|
|
226
|
+
>Open Custom Modal</modus-button
|
|
227
|
+
>
|
|
228
|
+
<modus-modal
|
|
229
|
+
modalId="modal-custom"
|
|
230
|
+
[showClose]="true"
|
|
231
|
+
[backdrop]="'default'"
|
|
232
|
+
[className]="'expanded-modal'"
|
|
233
|
+
>
|
|
234
|
+
<div slot="header" class="text-xl font-semibold text-foreground">
|
|
235
|
+
Custom Size Modal
|
|
236
|
+
</div>
|
|
237
|
+
<div slot="content" class="text-sm text-foreground-80">
|
|
238
|
+
This modal has custom dimensions applied via CSS classes. The modal is wider and
|
|
239
|
+
taller than the default.
|
|
240
|
+
</div>
|
|
241
|
+
<div slot="footer" class="flex gap-2">
|
|
242
|
+
<modus-button
|
|
243
|
+
variant="borderless"
|
|
244
|
+
(buttonClick)="closeModal('modal-custom')"
|
|
245
|
+
>Cancel</modus-button
|
|
246
|
+
>
|
|
247
|
+
<modus-button
|
|
248
|
+
(buttonClick)="closeModal('modal-custom')"
|
|
249
|
+
>Save</modus-button
|
|
250
|
+
>
|
|
251
|
+
</div>
|
|
252
|
+
</modus-modal>
|
|
253
|
+
</div>
|
|
254
|
+
</demo-example>
|
|
255
|
+
</demo-page>
|
|
256
|
+
`,
|
|
257
|
+
})
|
|
258
|
+
export class ModalDemoPageComponent {
|
|
259
|
+
/**
|
|
260
|
+
* Opens a modal by finding the dialog element using the modal ID.
|
|
261
|
+
*/
|
|
262
|
+
openModal(modalId: string): void {
|
|
263
|
+
const dialog = document.getElementById(modalId) as HTMLDialogElement | null;
|
|
264
|
+
if (dialog && typeof dialog.showModal === 'function') {
|
|
265
|
+
dialog.showModal();
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Closes a modal by finding the dialog element using the modal ID.
|
|
271
|
+
*/
|
|
272
|
+
closeModal(modalId: string): void {
|
|
273
|
+
const dialog = document.getElementById(modalId) as HTMLDialogElement | null;
|
|
274
|
+
if (dialog && typeof dialog.close === 'function') {
|
|
275
|
+
dialog.close();
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { DemoPageComponent } from '../shared/demo-page.component';
|
|
4
|
+
import { DemoExampleComponent } from '../shared/demo-example.component';
|
|
5
|
+
import { ModusNavbarComponent, INavbarUserCard } from '../../components/modus-navbar.component';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Demo page showcasing the Modus Navbar component.
|
|
9
|
+
*
|
|
10
|
+
* Demonstrates navbar features including:
|
|
11
|
+
* - Basic navbar with user card
|
|
12
|
+
* - Visibility controls
|
|
13
|
+
* - Condensed mode
|
|
14
|
+
* - Custom slots (start, center, end)
|
|
15
|
+
* - Event handling
|
|
16
|
+
*/
|
|
17
|
+
@Component({
|
|
18
|
+
selector: 'app-navbar-demo-page',
|
|
19
|
+
standalone: true,
|
|
20
|
+
imports: [CommonModule, DemoPageComponent, DemoExampleComponent, ModusNavbarComponent],
|
|
21
|
+
template: `
|
|
22
|
+
<demo-page
|
|
23
|
+
title="Modus Navbar"
|
|
24
|
+
description="The navbar provides a consistent top-level navigation and user controls. Use the navbar for primary navigation, user profile access, search, and application-wide actions."
|
|
25
|
+
>
|
|
26
|
+
<demo-example
|
|
27
|
+
title="Basic Navbar"
|
|
28
|
+
description="A basic navbar with user card and search functionality."
|
|
29
|
+
>
|
|
30
|
+
<div class="flex flex-col gap-4">
|
|
31
|
+
<modus-navbar
|
|
32
|
+
[userCard]="navbarUserCard"
|
|
33
|
+
[visibility]="{ user: true, search: true, searchInput: true }"
|
|
34
|
+
/>
|
|
35
|
+
</div>
|
|
36
|
+
</demo-example>
|
|
37
|
+
|
|
38
|
+
<demo-example
|
|
39
|
+
title="Navbar with Help Button"
|
|
40
|
+
description="Navbar with user card and help button for accessing documentation and support."
|
|
41
|
+
>
|
|
42
|
+
<div class="flex flex-col gap-4">
|
|
43
|
+
<modus-navbar
|
|
44
|
+
[userCard]="navbarUserCard"
|
|
45
|
+
[visibility]="{ user: true, help: true }"
|
|
46
|
+
(helpClick)="handleHelpClick($event)"
|
|
47
|
+
/>
|
|
48
|
+
</div>
|
|
49
|
+
</demo-example>
|
|
50
|
+
|
|
51
|
+
<demo-example
|
|
52
|
+
title="Navbar with All Buttons"
|
|
53
|
+
description="Navbar showing all available buttons: user, search, help, apps, notifications, and main menu."
|
|
54
|
+
>
|
|
55
|
+
<div class="flex flex-col gap-4">
|
|
56
|
+
<modus-navbar
|
|
57
|
+
[userCard]="navbarUserCard"
|
|
58
|
+
[visibility]="{
|
|
59
|
+
user: true,
|
|
60
|
+
search: true,
|
|
61
|
+
searchInput: true,
|
|
62
|
+
help: true,
|
|
63
|
+
apps: true,
|
|
64
|
+
notifications: true,
|
|
65
|
+
mainMenu: true,
|
|
66
|
+
}"
|
|
67
|
+
(helpClick)="handleHelpClick($event)"
|
|
68
|
+
(appsClick)="handleAppsClick($event)"
|
|
69
|
+
(notificationsClick)="handleNotificationsClick($event)"
|
|
70
|
+
(mainMenuOpenChange)="handleMainMenuOpenChange($event)"
|
|
71
|
+
/>
|
|
72
|
+
</div>
|
|
73
|
+
</demo-example>
|
|
74
|
+
|
|
75
|
+
<demo-example
|
|
76
|
+
title="Condensed Navbar"
|
|
77
|
+
description="A condensed version of the navbar suitable for tighter spaces."
|
|
78
|
+
>
|
|
79
|
+
<div class="flex flex-col gap-4">
|
|
80
|
+
<modus-navbar
|
|
81
|
+
[userCard]="navbarUserCard"
|
|
82
|
+
[visibility]="{ user: true, mainMenu: true, notifications: true, help: true }"
|
|
83
|
+
[condensed]="true"
|
|
84
|
+
/>
|
|
85
|
+
</div>
|
|
86
|
+
</demo-example>
|
|
87
|
+
|
|
88
|
+
<demo-example
|
|
89
|
+
title="Navbar with Custom Slots"
|
|
90
|
+
description="Navbar with custom content in start, center, and end slots."
|
|
91
|
+
>
|
|
92
|
+
<div class="flex flex-col gap-4">
|
|
93
|
+
<modus-navbar
|
|
94
|
+
[userCard]="navbarUserCard"
|
|
95
|
+
[visibility]="{ user: true, search: true, searchInput: true, help: true }"
|
|
96
|
+
>
|
|
97
|
+
<div slot="start" class="flex items-center gap-2">
|
|
98
|
+
<span class="text-sm text-foreground">Custom Start Content</span>
|
|
99
|
+
</div>
|
|
100
|
+
<div slot="center" class="flex items-center gap-2">
|
|
101
|
+
<span class="text-sm text-foreground">Custom Center Content</span>
|
|
102
|
+
</div>
|
|
103
|
+
<div slot="end" class="flex items-center gap-2">
|
|
104
|
+
<span class="text-sm text-foreground">Custom End Content</span>
|
|
105
|
+
</div>
|
|
106
|
+
</modus-navbar>
|
|
107
|
+
</div>
|
|
108
|
+
</demo-example>
|
|
109
|
+
</demo-page>
|
|
110
|
+
`,
|
|
111
|
+
})
|
|
112
|
+
export class NavbarDemoPageComponent {
|
|
113
|
+
readonly navbarUserCard: INavbarUserCard = {
|
|
114
|
+
name: 'John Doe',
|
|
115
|
+
email: 'john.doe@example.com',
|
|
116
|
+
avatarSrc: 'https://i.pravatar.cc/64?img=12',
|
|
117
|
+
avatarAlt: 'User avatar',
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
handleHelpClick(event: MouseEvent | KeyboardEvent): void {
|
|
121
|
+
console.log('Help button clicked', event);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
handleAppsClick(event: MouseEvent | KeyboardEvent): void {
|
|
125
|
+
console.log('Apps button clicked', event);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
handleNotificationsClick(event: MouseEvent | KeyboardEvent): void {
|
|
129
|
+
console.log('Notifications button clicked', event);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
handleMainMenuOpenChange(event: boolean): void {
|
|
133
|
+
console.log(`Main menu ${event ? 'opened' : 'closed'}`);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { DemoPageComponent } from '../shared/demo-page.component';
|
|
4
|
+
import { DemoExampleComponent } from '../shared/demo-example.component';
|
|
5
|
+
import { ModusNumberInputComponent } from '../../components/modus-number-input.component';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Demo page showcasing the Modus Number Input component.
|
|
9
|
+
*
|
|
10
|
+
* Demonstrates number input features including:
|
|
11
|
+
* - Basic number input
|
|
12
|
+
* - Sizes
|
|
13
|
+
* - Min/max/step validation
|
|
14
|
+
* - Currency symbol
|
|
15
|
+
* - With labels and feedback
|
|
16
|
+
*/
|
|
17
|
+
@Component({
|
|
18
|
+
selector: 'app-number-input-demo-page',
|
|
19
|
+
standalone: true,
|
|
20
|
+
imports: [
|
|
21
|
+
CommonModule,
|
|
22
|
+
DemoPageComponent,
|
|
23
|
+
DemoExampleComponent,
|
|
24
|
+
ModusNumberInputComponent,
|
|
25
|
+
],
|
|
26
|
+
template: `
|
|
27
|
+
<demo-page
|
|
28
|
+
title="Modus Number Input"
|
|
29
|
+
description="Number inputs provide a controlled way to enter numeric values. Use number inputs for quantities, amounts, ratings, or any numeric data entry."
|
|
30
|
+
>
|
|
31
|
+
<demo-example title="Basic Number Input" description="Simple number input with label.">
|
|
32
|
+
<div class="flex flex-col gap-6">
|
|
33
|
+
<div class="flex flex-col gap-2">
|
|
34
|
+
<modus-number-input
|
|
35
|
+
inputId="quantity-input"
|
|
36
|
+
label="Quantity"
|
|
37
|
+
placeholder="0"
|
|
38
|
+
[step]="1"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<div class="flex flex-col gap-2">
|
|
43
|
+
<modus-number-input
|
|
44
|
+
inputId="price-input"
|
|
45
|
+
label="Price"
|
|
46
|
+
placeholder="0.00"
|
|
47
|
+
[step]="0.01"
|
|
48
|
+
/>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</demo-example>
|
|
52
|
+
|
|
53
|
+
<demo-example title="Number Input Sizes" description="Number inputs in different sizes.">
|
|
54
|
+
<div class="flex flex-col gap-6">
|
|
55
|
+
<div class="flex flex-col gap-2">
|
|
56
|
+
<modus-number-input inputId="small-number" label="Small" size="sm" placeholder="0" />
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<div class="flex flex-col gap-2">
|
|
60
|
+
<modus-number-input inputId="medium-number" label="Medium" size="md" placeholder="0" />
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<div class="flex flex-col gap-2">
|
|
64
|
+
<modus-number-input inputId="large-number" label="Large" size="lg" placeholder="0" />
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</demo-example>
|
|
68
|
+
|
|
69
|
+
<demo-example
|
|
70
|
+
title="Number Input with Constraints"
|
|
71
|
+
description="Number inputs with min, max, and step values."
|
|
72
|
+
>
|
|
73
|
+
<div class="flex flex-col gap-6">
|
|
74
|
+
<div class="flex flex-col gap-2">
|
|
75
|
+
<modus-number-input
|
|
76
|
+
inputId="age-input"
|
|
77
|
+
label="Age"
|
|
78
|
+
placeholder="Enter age"
|
|
79
|
+
[min]="1"
|
|
80
|
+
[max]="120"
|
|
81
|
+
[step]="1"
|
|
82
|
+
/>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
<div class="flex flex-col gap-2">
|
|
86
|
+
<modus-number-input
|
|
87
|
+
inputId="percentage-input"
|
|
88
|
+
label="Percentage"
|
|
89
|
+
placeholder="0"
|
|
90
|
+
[min]="0"
|
|
91
|
+
[max]="100"
|
|
92
|
+
[step]="1"
|
|
93
|
+
/>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<div class="flex flex-col gap-2">
|
|
97
|
+
<modus-number-input
|
|
98
|
+
inputId="decimal-input"
|
|
99
|
+
label="Decimal"
|
|
100
|
+
placeholder="0.0"
|
|
101
|
+
[min]="0"
|
|
102
|
+
[max]="10"
|
|
103
|
+
[step]="0.1"
|
|
104
|
+
/>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
</demo-example>
|
|
108
|
+
|
|
109
|
+
<demo-example title="Currency Number Input" description="Number input with currency symbol.">
|
|
110
|
+
<div class="flex flex-col gap-6">
|
|
111
|
+
<div class="flex flex-col gap-2">
|
|
112
|
+
<modus-number-input
|
|
113
|
+
inputId="usd-input"
|
|
114
|
+
label="USD Amount"
|
|
115
|
+
placeholder="0.00"
|
|
116
|
+
currencySymbol="$"
|
|
117
|
+
[step]="0.01"
|
|
118
|
+
/>
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<div class="flex flex-col gap-2">
|
|
122
|
+
<modus-number-input
|
|
123
|
+
inputId="eur-input"
|
|
124
|
+
label="EUR Amount"
|
|
125
|
+
placeholder="0.00"
|
|
126
|
+
currencySymbol="€"
|
|
127
|
+
[step]="0.01"
|
|
128
|
+
/>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
</demo-example>
|
|
132
|
+
|
|
133
|
+
<demo-example
|
|
134
|
+
title="Interactive Example"
|
|
135
|
+
description="Number input with two-way binding and event handling."
|
|
136
|
+
>
|
|
137
|
+
<div class="flex flex-col gap-6">
|
|
138
|
+
<div class="flex flex-col gap-2">
|
|
139
|
+
<modus-number-input
|
|
140
|
+
inputId="interactive-number"
|
|
141
|
+
label="Enter a Number"
|
|
142
|
+
placeholder="0"
|
|
143
|
+
[value]="numberValue()"
|
|
144
|
+
[step]="1"
|
|
145
|
+
(inputChange)="handleNumberChange($event)"
|
|
146
|
+
/>
|
|
147
|
+
</div>
|
|
148
|
+
@if (numberValue() !== null && numberValue() !== '') {
|
|
149
|
+
<div class="p-4 rounded-lg bg-card border-default">
|
|
150
|
+
<p class="text-sm text-foreground mb-2">
|
|
151
|
+
<strong>Current Value:</strong> {{ numberValue() }}
|
|
152
|
+
</p>
|
|
153
|
+
<p class="text-sm text-foreground">
|
|
154
|
+
<strong>Double Value:</strong> {{ getDoubleValue() }}
|
|
155
|
+
</p>
|
|
156
|
+
</div>
|
|
157
|
+
}
|
|
158
|
+
</div>
|
|
159
|
+
</demo-example>
|
|
160
|
+
</demo-page>
|
|
161
|
+
`,
|
|
162
|
+
})
|
|
163
|
+
export class NumberInputDemoPageComponent {
|
|
164
|
+
readonly numberValue = signal<string>('');
|
|
165
|
+
|
|
166
|
+
handleNumberChange(event: InputEvent): void {
|
|
167
|
+
const target = event.target as HTMLInputElement;
|
|
168
|
+
this.numberValue.set(target.value);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
getDoubleValue(): number {
|
|
172
|
+
const num = parseFloat(this.numberValue());
|
|
173
|
+
return isNaN(num) ? 0 : num * 2;
|
|
174
|
+
}
|
|
175
|
+
}
|