@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,1242 @@
|
|
|
1
|
+
import { Component, OnInit, signal, effect } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { ModusButtonComponent } from './modus-button.component';
|
|
4
|
+
import { ModusAlertComponent } from './modus-alert.component';
|
|
5
|
+
import { ModusBadgeComponent } from './modus-badge.component';
|
|
6
|
+
import { ModusIconComponent } from './modus-icon.component';
|
|
7
|
+
import { ModusAccordionComponent } from './modus-accordion.component';
|
|
8
|
+
import { ModusCollapseComponent, ICollapseOptions } from './modus-collapse.component';
|
|
9
|
+
import { ModusThemeSwitcherComponent } from './modus-theme-switcher.component';
|
|
10
|
+
import { ModusAvatarComponent } from './modus-avatar.component';
|
|
11
|
+
import { ModusBreadcrumbsComponent } from './modus-breadcrumbs.component';
|
|
12
|
+
import { ModusCardComponent } from './modus-card.component';
|
|
13
|
+
import { ModusCheckboxComponent } from './modus-checkbox.component';
|
|
14
|
+
import { ModusChipComponent } from './modus-chip.component';
|
|
15
|
+
import { ModusDateComponent } from './modus-date.component';
|
|
16
|
+
import { ModusDropdownMenuComponent } from './modus-dropdown-menu.component';
|
|
17
|
+
import { ModusFileDropzoneComponent } from './modus-file-dropzone.component';
|
|
18
|
+
import { ModusInputFeedbackComponent } from './modus-input-feedback.component';
|
|
19
|
+
import { ModusInputLabelComponent } from './modus-input-label.component';
|
|
20
|
+
import { ModusLoaderComponent } from './modus-loader.component';
|
|
21
|
+
import { ModusMenuComponent } from './modus-menu.component';
|
|
22
|
+
import { ModusMenuItemComponent } from './modus-menu-item.component';
|
|
23
|
+
import { ModusModalComponent } from './modus-modal.component';
|
|
24
|
+
import { ModusNumberInputComponent } from './modus-number-input.component';
|
|
25
|
+
import { ModusPaginationComponent } from './modus-pagination.component';
|
|
26
|
+
import { ModusProgressComponent } from './modus-progress.component';
|
|
27
|
+
import { ModusRadioComponent } from './modus-radio.component';
|
|
28
|
+
import { ModusRatingComponent } from './modus-rating.component';
|
|
29
|
+
import { ModusAutocompleteComponent } from './modus-autocomplete.component';
|
|
30
|
+
import { ModusNavbarComponent, INavbarUserCard } from './modus-navbar.component';
|
|
31
|
+
import { ModusSelectComponent } from './modus-select.component';
|
|
32
|
+
import { ModusSideNavigationComponent } from './modus-side-navigation.component';
|
|
33
|
+
import { ModusSkeletonComponent } from './modus-skeleton.component';
|
|
34
|
+
import { ModusSliderComponent } from './modus-slider.component';
|
|
35
|
+
import { ModusStepperComponent, IStepperItem } from './modus-stepper.component';
|
|
36
|
+
import { ModusSwitchComponent } from './modus-switch.component';
|
|
37
|
+
import { ModusTableComponent } from './modus-table.component';
|
|
38
|
+
import { ModusTabsComponent } from './modus-tabs.component';
|
|
39
|
+
import { ModusTextareaComponent } from './modus-textarea.component';
|
|
40
|
+
import { ModusTextInputComponent } from './modus-text-input.component';
|
|
41
|
+
import { ModusTimeInputComponent } from './modus-time-input.component';
|
|
42
|
+
import { ModusToastComponent } from './modus-toast.component';
|
|
43
|
+
import { ModusToolbarComponent } from './modus-toolbar.component';
|
|
44
|
+
import { ModusTooltipComponent } from './modus-tooltip.component';
|
|
45
|
+
import { ModusTypographyComponent } from './modus-typography.component';
|
|
46
|
+
import { ModusUtilityPanelComponent } from './modus-utility-panel.component';
|
|
47
|
+
import { ThemeService, ThemeName, ThemeMode, ThemeConfig } from '../services/theme.service';
|
|
48
|
+
import type {
|
|
49
|
+
IBreadcrumb,
|
|
50
|
+
IPageChange,
|
|
51
|
+
IRatingChange,
|
|
52
|
+
IAutocompleteItem,
|
|
53
|
+
ISelectOption,
|
|
54
|
+
ITab,
|
|
55
|
+
ITableColumn,
|
|
56
|
+
} from '@trimble-oss/moduswebcomponents';
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Demo component to test and demonstrate theme switching functionality.
|
|
60
|
+
* Shows all available themes (Modus Classic, Modern, Connect) in both light and dark modes.
|
|
61
|
+
*/
|
|
62
|
+
@Component({
|
|
63
|
+
selector: 'app-theme-demo',
|
|
64
|
+
standalone: true,
|
|
65
|
+
imports: [
|
|
66
|
+
CommonModule,
|
|
67
|
+
ModusAccordionComponent,
|
|
68
|
+
ModusAlertComponent,
|
|
69
|
+
ModusAvatarComponent,
|
|
70
|
+
ModusBadgeComponent,
|
|
71
|
+
ModusBreadcrumbsComponent,
|
|
72
|
+
ModusButtonComponent,
|
|
73
|
+
ModusCardComponent,
|
|
74
|
+
ModusCheckboxComponent,
|
|
75
|
+
ModusChipComponent,
|
|
76
|
+
ModusCollapseComponent,
|
|
77
|
+
ModusDateComponent,
|
|
78
|
+
ModusDropdownMenuComponent,
|
|
79
|
+
ModusFileDropzoneComponent,
|
|
80
|
+
ModusIconComponent,
|
|
81
|
+
ModusInputFeedbackComponent,
|
|
82
|
+
ModusInputLabelComponent,
|
|
83
|
+
ModusLoaderComponent,
|
|
84
|
+
ModusMenuComponent,
|
|
85
|
+
ModusMenuItemComponent,
|
|
86
|
+
ModusModalComponent,
|
|
87
|
+
ModusNumberInputComponent,
|
|
88
|
+
ModusPaginationComponent,
|
|
89
|
+
ModusProgressComponent,
|
|
90
|
+
ModusRadioComponent,
|
|
91
|
+
ModusRatingComponent,
|
|
92
|
+
ModusThemeSwitcherComponent,
|
|
93
|
+
ModusAutocompleteComponent,
|
|
94
|
+
ModusNavbarComponent,
|
|
95
|
+
ModusSelectComponent,
|
|
96
|
+
ModusSideNavigationComponent,
|
|
97
|
+
ModusSkeletonComponent,
|
|
98
|
+
ModusSliderComponent,
|
|
99
|
+
ModusStepperComponent,
|
|
100
|
+
ModusSwitchComponent,
|
|
101
|
+
ModusTableComponent,
|
|
102
|
+
ModusTabsComponent,
|
|
103
|
+
ModusTextareaComponent,
|
|
104
|
+
ModusTextInputComponent,
|
|
105
|
+
ModusTimeInputComponent,
|
|
106
|
+
ModusToastComponent,
|
|
107
|
+
ModusToolbarComponent,
|
|
108
|
+
ModusTooltipComponent,
|
|
109
|
+
ModusTypographyComponent,
|
|
110
|
+
ModusUtilityPanelComponent,
|
|
111
|
+
],
|
|
112
|
+
template: `
|
|
113
|
+
<div class="theme-demo-container">
|
|
114
|
+
<div class="theme-demo-header">
|
|
115
|
+
<h1>Modus Theme Demo</h1>
|
|
116
|
+
<p>Test different themes and modes</p>
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
<div class="theme-controls">
|
|
120
|
+
<div class="control-group">
|
|
121
|
+
<h2>Theme Switcher</h2>
|
|
122
|
+
<modus-theme-switcher
|
|
123
|
+
ariaLabel="Toggle light/dark mode"
|
|
124
|
+
(themeChange)="onThemeChange($event)"
|
|
125
|
+
/>
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
<div class="control-group">
|
|
129
|
+
<h2>Select Theme</h2>
|
|
130
|
+
<div class="theme-buttons">
|
|
131
|
+
<modus-button
|
|
132
|
+
[color]="currentTheme() === 'modus-classic' ? 'primary' : 'secondary'"
|
|
133
|
+
(buttonClick)="setTheme('modus-classic')"
|
|
134
|
+
>
|
|
135
|
+
Classic
|
|
136
|
+
</modus-button>
|
|
137
|
+
<modus-button
|
|
138
|
+
[color]="currentTheme() === 'modus-modern' ? 'primary' : 'secondary'"
|
|
139
|
+
(buttonClick)="setTheme('modus-modern')"
|
|
140
|
+
>
|
|
141
|
+
Modern
|
|
142
|
+
</modus-button>
|
|
143
|
+
<modus-button
|
|
144
|
+
[color]="currentTheme() === 'connect' ? 'primary' : 'secondary'"
|
|
145
|
+
(buttonClick)="setTheme('connect')"
|
|
146
|
+
>
|
|
147
|
+
Connect
|
|
148
|
+
</modus-button>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
|
|
152
|
+
<div class="control-group">
|
|
153
|
+
<h2>Mode</h2>
|
|
154
|
+
<div class="mode-buttons">
|
|
155
|
+
<modus-button
|
|
156
|
+
[color]="currentMode() === 'light' ? 'primary' : 'secondary'"
|
|
157
|
+
(buttonClick)="setMode('light')"
|
|
158
|
+
>
|
|
159
|
+
Light
|
|
160
|
+
</modus-button>
|
|
161
|
+
<modus-button
|
|
162
|
+
[color]="currentMode() === 'dark' ? 'primary' : 'secondary'"
|
|
163
|
+
(buttonClick)="setMode('dark')"
|
|
164
|
+
>
|
|
165
|
+
Dark
|
|
166
|
+
</modus-button>
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
</div>
|
|
170
|
+
|
|
171
|
+
<div class="current-theme-info">
|
|
172
|
+
<p><strong>Current Theme:</strong> {{ currentTheme() }}</p>
|
|
173
|
+
<p><strong>Current Mode:</strong> {{ currentMode() }}</p>
|
|
174
|
+
<p><strong>Full Theme:</strong> {{ fullThemeName() }}</p>
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
<div class="demo-components">
|
|
178
|
+
<h2>Component Examples</h2>
|
|
179
|
+
|
|
180
|
+
<div class="component-row">
|
|
181
|
+
<modus-card padding="normal">
|
|
182
|
+
<h3 slot="header">Card Example</h3>
|
|
183
|
+
<p>This card demonstrates the current theme colors and styling.</p>
|
|
184
|
+
<div slot="footer">
|
|
185
|
+
<modus-button color="primary">Action</modus-button>
|
|
186
|
+
</div>
|
|
187
|
+
</modus-card>
|
|
188
|
+
</div>
|
|
189
|
+
|
|
190
|
+
<div class="component-row">
|
|
191
|
+
<h3>Buttons</h3>
|
|
192
|
+
<div class="button-group">
|
|
193
|
+
<modus-button color="primary">Primary</modus-button>
|
|
194
|
+
<modus-button color="secondary">Secondary</modus-button>
|
|
195
|
+
<modus-button color="tertiary">Tertiary</modus-button>
|
|
196
|
+
<modus-button color="warning">Warning</modus-button>
|
|
197
|
+
<modus-button color="danger">Danger</modus-button>
|
|
198
|
+
</div>
|
|
199
|
+
</div>
|
|
200
|
+
|
|
201
|
+
<div class="component-row">
|
|
202
|
+
<h3>Buttons with Icons</h3>
|
|
203
|
+
<div class="button-group">
|
|
204
|
+
<modus-button color="primary" icon="add" iconPosition="left">Add Item</modus-button>
|
|
205
|
+
<modus-button color="secondary" icon="search" iconPosition="left">Search</modus-button>
|
|
206
|
+
<modus-button color="primary" icon="check_circle" iconPosition="right"
|
|
207
|
+
>Submit</modus-button
|
|
208
|
+
>
|
|
209
|
+
<modus-button color="secondary" icon="close" iconPosition="right">Cancel</modus-button>
|
|
210
|
+
<modus-button color="tertiary" icon="info" iconPosition="left">Info</modus-button>
|
|
211
|
+
<modus-button color="warning" icon="warning" iconPosition="left">Warning</modus-button>
|
|
212
|
+
<modus-button color="danger" icon="close" iconPosition="right">Delete</modus-button>
|
|
213
|
+
</div>
|
|
214
|
+
</div>
|
|
215
|
+
|
|
216
|
+
<div class="component-row">
|
|
217
|
+
<h3>Buttons with Different Sizes and Icons</h3>
|
|
218
|
+
<div class="button-group">
|
|
219
|
+
<modus-button color="primary" icon="add" iconPosition="left" size="xs"
|
|
220
|
+
>Extra Small</modus-button
|
|
221
|
+
>
|
|
222
|
+
<modus-button color="primary" icon="add" iconPosition="left" size="sm"
|
|
223
|
+
>Small</modus-button
|
|
224
|
+
>
|
|
225
|
+
<modus-button color="primary" icon="add" iconPosition="left" size="md"
|
|
226
|
+
>Medium</modus-button
|
|
227
|
+
>
|
|
228
|
+
<modus-button color="primary" icon="add" iconPosition="left" size="lg"
|
|
229
|
+
>Large</modus-button
|
|
230
|
+
>
|
|
231
|
+
</div>
|
|
232
|
+
</div>
|
|
233
|
+
|
|
234
|
+
<div class="component-row">
|
|
235
|
+
<h3>Full Width Button</h3>
|
|
236
|
+
<div class="button-group">
|
|
237
|
+
<modus-button color="primary" [fullWidth]="true">Full Width Button</modus-button>
|
|
238
|
+
<modus-button color="secondary" [fullWidth]="true" icon="add" iconPosition="left"
|
|
239
|
+
>Full Width with Icon</modus-button
|
|
240
|
+
>
|
|
241
|
+
<modus-button color="tertiary" [fullWidth]="true" size="lg"
|
|
242
|
+
>Large Full Width Button</modus-button
|
|
243
|
+
>
|
|
244
|
+
</div>
|
|
245
|
+
</div>
|
|
246
|
+
|
|
247
|
+
<div class="component-row">
|
|
248
|
+
<h3>Icon-Only Buttons</h3>
|
|
249
|
+
<div class="button-group">
|
|
250
|
+
<modus-button
|
|
251
|
+
color="primary"
|
|
252
|
+
icon="add"
|
|
253
|
+
iconPosition="only"
|
|
254
|
+
ariaLabel="Add item"
|
|
255
|
+
size="xs"
|
|
256
|
+
></modus-button>
|
|
257
|
+
<modus-button
|
|
258
|
+
color="primary"
|
|
259
|
+
icon="add"
|
|
260
|
+
iconPosition="only"
|
|
261
|
+
ariaLabel="Add item"
|
|
262
|
+
size="sm"
|
|
263
|
+
></modus-button>
|
|
264
|
+
<modus-button
|
|
265
|
+
color="primary"
|
|
266
|
+
icon="add"
|
|
267
|
+
iconPosition="only"
|
|
268
|
+
ariaLabel="Add item"
|
|
269
|
+
size="md"
|
|
270
|
+
></modus-button>
|
|
271
|
+
<modus-button
|
|
272
|
+
color="primary"
|
|
273
|
+
icon="add"
|
|
274
|
+
iconPosition="only"
|
|
275
|
+
ariaLabel="Add item"
|
|
276
|
+
size="lg"
|
|
277
|
+
></modus-button>
|
|
278
|
+
<modus-button
|
|
279
|
+
color="secondary"
|
|
280
|
+
icon="search"
|
|
281
|
+
iconPosition="only"
|
|
282
|
+
ariaLabel="Search"
|
|
283
|
+
></modus-button>
|
|
284
|
+
<modus-button
|
|
285
|
+
color="tertiary"
|
|
286
|
+
icon="info"
|
|
287
|
+
iconPosition="only"
|
|
288
|
+
ariaLabel="Information"
|
|
289
|
+
></modus-button>
|
|
290
|
+
<modus-button
|
|
291
|
+
color="warning"
|
|
292
|
+
icon="warning"
|
|
293
|
+
iconPosition="only"
|
|
294
|
+
ariaLabel="Warning"
|
|
295
|
+
></modus-button>
|
|
296
|
+
<modus-button
|
|
297
|
+
color="danger"
|
|
298
|
+
icon="close"
|
|
299
|
+
iconPosition="only"
|
|
300
|
+
ariaLabel="Close"
|
|
301
|
+
></modus-button>
|
|
302
|
+
<modus-button
|
|
303
|
+
color="primary"
|
|
304
|
+
icon="check_circle"
|
|
305
|
+
iconPosition="only"
|
|
306
|
+
ariaLabel="Success"
|
|
307
|
+
></modus-button>
|
|
308
|
+
</div>
|
|
309
|
+
</div>
|
|
310
|
+
|
|
311
|
+
<div class="component-row">
|
|
312
|
+
<h3>Badges</h3>
|
|
313
|
+
<div class="badge-group">
|
|
314
|
+
<modus-badge color="primary">Primary Badge</modus-badge>
|
|
315
|
+
<modus-badge color="secondary">Secondary Badge</modus-badge>
|
|
316
|
+
<modus-badge color="tertiary">Tertiary Badge</modus-badge>
|
|
317
|
+
<modus-badge color="warning">Warning Badge</modus-badge>
|
|
318
|
+
<modus-badge color="danger">Danger Badge</modus-badge>
|
|
319
|
+
</div>
|
|
320
|
+
</div>
|
|
321
|
+
|
|
322
|
+
<div class="component-row">
|
|
323
|
+
<h3>Alerts</h3>
|
|
324
|
+
<div class="alert-group">
|
|
325
|
+
<modus-alert
|
|
326
|
+
alertTitle="Information"
|
|
327
|
+
alertDescription="General guidance for the current view."
|
|
328
|
+
variant="info"
|
|
329
|
+
/>
|
|
330
|
+
<modus-alert
|
|
331
|
+
alertTitle="Success"
|
|
332
|
+
alertDescription="All updates completed successfully."
|
|
333
|
+
variant="success"
|
|
334
|
+
[dismissible]="true"
|
|
335
|
+
/>
|
|
336
|
+
<modus-alert
|
|
337
|
+
alertTitle="Warning"
|
|
338
|
+
alertDescription="Check the highlighted fields before continuing."
|
|
339
|
+
variant="warning"
|
|
340
|
+
/>
|
|
341
|
+
<modus-alert
|
|
342
|
+
alertTitle="Error"
|
|
343
|
+
alertDescription="Something went wrong while saving changes."
|
|
344
|
+
variant="error"
|
|
345
|
+
[dismissible]="true"
|
|
346
|
+
/>
|
|
347
|
+
</div>
|
|
348
|
+
</div>
|
|
349
|
+
|
|
350
|
+
<div class="component-row">
|
|
351
|
+
<h3>Icons</h3>
|
|
352
|
+
<div class="icon-group">
|
|
353
|
+
<div class="icon-example">
|
|
354
|
+
<modus-icon name="alert" variant="outlined" size="lg" />
|
|
355
|
+
<span>alert (outlined)</span>
|
|
356
|
+
</div>
|
|
357
|
+
<div class="icon-example">
|
|
358
|
+
<modus-icon name="alert" variant="solid" size="lg" />
|
|
359
|
+
<span>alert (solid)</span>
|
|
360
|
+
</div>
|
|
361
|
+
<div class="icon-example">
|
|
362
|
+
<modus-icon name="accessibility_circle" variant="solid" size="lg" />
|
|
363
|
+
<span>accessibility_circle (solid)</span>
|
|
364
|
+
</div>
|
|
365
|
+
<div class="icon-example">
|
|
366
|
+
<modus-icon name="check_circle" variant="outlined" size="lg" />
|
|
367
|
+
<span>check_circle (outlined)</span>
|
|
368
|
+
</div>
|
|
369
|
+
<div class="icon-example">
|
|
370
|
+
<modus-icon name="check_circle" variant="solid" size="lg" />
|
|
371
|
+
<span>check_circle (solid)</span>
|
|
372
|
+
</div>
|
|
373
|
+
<div class="icon-example">
|
|
374
|
+
<modus-icon name="info" variant="outlined" size="lg" />
|
|
375
|
+
<span>info (outlined)</span>
|
|
376
|
+
</div>
|
|
377
|
+
</div>
|
|
378
|
+
</div>
|
|
379
|
+
|
|
380
|
+
<div class="component-row">
|
|
381
|
+
<h3>Icons with Custom Styling</h3>
|
|
382
|
+
<div class="icon-group">
|
|
383
|
+
<div class="icon-example">
|
|
384
|
+
<modus-icon name="alert" variant="solid" size="lg" className="text-primary" />
|
|
385
|
+
<span>Info color</span>
|
|
386
|
+
</div>
|
|
387
|
+
<div class="icon-example">
|
|
388
|
+
<modus-icon name="check_circle" variant="solid" size="lg" className="text-success" />
|
|
389
|
+
<span>Success color</span>
|
|
390
|
+
</div>
|
|
391
|
+
<div class="icon-example">
|
|
392
|
+
<modus-icon name="warning" variant="solid" size="lg" className="text-warning" />
|
|
393
|
+
<span>Warning color</span>
|
|
394
|
+
</div>
|
|
395
|
+
<div class="icon-example">
|
|
396
|
+
<modus-icon name="alert" variant="solid" size="lg" className="text-error" />
|
|
397
|
+
<span>Error color</span>
|
|
398
|
+
</div>
|
|
399
|
+
</div>
|
|
400
|
+
</div>
|
|
401
|
+
|
|
402
|
+
<div class="component-row">
|
|
403
|
+
<h3>Accessible Icons</h3>
|
|
404
|
+
<div class="icon-group">
|
|
405
|
+
<div class="icon-example">
|
|
406
|
+
<modus-icon
|
|
407
|
+
name="accessibility_circle"
|
|
408
|
+
variant="solid"
|
|
409
|
+
size="md"
|
|
410
|
+
[decorative]="false"
|
|
411
|
+
ariaLabel="Accessibility features"
|
|
412
|
+
/>
|
|
413
|
+
<span>With aria-label</span>
|
|
414
|
+
</div>
|
|
415
|
+
<div class="icon-example">
|
|
416
|
+
<modus-icon name="info" variant="outlined" size="md" [decorative]="true" />
|
|
417
|
+
<span>Decorative (hidden from screen readers)</span>
|
|
418
|
+
</div>
|
|
419
|
+
</div>
|
|
420
|
+
</div>
|
|
421
|
+
|
|
422
|
+
<div class="component-row">
|
|
423
|
+
<h3>Avatars</h3>
|
|
424
|
+
<div class="avatar-group">
|
|
425
|
+
<modus-avatar alt="Ada Lovelace" initials="AL" size="lg" />
|
|
426
|
+
<modus-avatar alt="Grace Hopper" imgSrc="https://via.placeholder.com/64" size="md" />
|
|
427
|
+
<modus-avatar alt="Design System" initials="DS" shape="square" size="sm" />
|
|
428
|
+
</div>
|
|
429
|
+
</div>
|
|
430
|
+
|
|
431
|
+
<div class="component-row">
|
|
432
|
+
<h3>Breadcrumbs</h3>
|
|
433
|
+
<modus-breadcrumbs
|
|
434
|
+
[items]="breadcrumbItems"
|
|
435
|
+
(breadcrumbClick)="onBreadcrumbClick($event)"
|
|
436
|
+
/>
|
|
437
|
+
</div>
|
|
438
|
+
|
|
439
|
+
<div class="component-row">
|
|
440
|
+
<h3>Chips</h3>
|
|
441
|
+
<div class="chip-group">
|
|
442
|
+
<modus-chip label="Default" />
|
|
443
|
+
<modus-chip label="Active" [active]="true" />
|
|
444
|
+
<modus-chip label="Dismiss" [showRemove]="true" />
|
|
445
|
+
<modus-chip label="Error" [hasError]="true" variant="outline" />
|
|
446
|
+
</div>
|
|
447
|
+
</div>
|
|
448
|
+
|
|
449
|
+
<div class="component-row">
|
|
450
|
+
<h3>Form Controls</h3>
|
|
451
|
+
<div class="form-grid">
|
|
452
|
+
<div class="form-control">
|
|
453
|
+
<modus-input-label forId="demo-checkbox" labelText="Checkbox" [required]="true" />
|
|
454
|
+
<modus-checkbox inputId="demo-checkbox" label="Accept terms" [value]="true" />
|
|
455
|
+
<modus-input-feedback level="success" message="Thanks for confirming." />
|
|
456
|
+
</div>
|
|
457
|
+
<div class="form-control">
|
|
458
|
+
<modus-input-label forId="demo-radio" labelText="Radio" />
|
|
459
|
+
<modus-radio inputId="demo-radio" label="Option A" name="radio-demo" [value]="true" />
|
|
460
|
+
<modus-radio
|
|
461
|
+
inputId="demo-radio-b"
|
|
462
|
+
label="Option B"
|
|
463
|
+
name="radio-demo"
|
|
464
|
+
[value]="false"
|
|
465
|
+
/>
|
|
466
|
+
</div>
|
|
467
|
+
<div class="form-control">
|
|
468
|
+
<modus-input-label forId="demo-date" labelText="Date" />
|
|
469
|
+
<modus-date inputId="demo-date" label="Pick a date" value="2025-01-15" />
|
|
470
|
+
</div>
|
|
471
|
+
<div class="form-control">
|
|
472
|
+
<modus-input-label forId="demo-number" labelText="Number" />
|
|
473
|
+
<modus-number-input
|
|
474
|
+
inputId="demo-number"
|
|
475
|
+
label="Quantity"
|
|
476
|
+
placeholder="0"
|
|
477
|
+
[value]="'12'"
|
|
478
|
+
[step]="1"
|
|
479
|
+
/>
|
|
480
|
+
</div>
|
|
481
|
+
</div>
|
|
482
|
+
</div>
|
|
483
|
+
|
|
484
|
+
<div class="component-row">
|
|
485
|
+
<h3>Dropdown Menu</h3>
|
|
486
|
+
<modus-dropdown-menu buttonAriaLabel="Actions menu">
|
|
487
|
+
<span slot="button">Open Menu</span>
|
|
488
|
+
<div slot="menu">
|
|
489
|
+
<modus-menu>
|
|
490
|
+
<modus-menu-item label="Profile" value="profile" />
|
|
491
|
+
<modus-menu-item label="Settings" value="settings" />
|
|
492
|
+
<modus-menu-item label="Log out" value="logout" />
|
|
493
|
+
</modus-menu>
|
|
494
|
+
</div>
|
|
495
|
+
</modus-dropdown-menu>
|
|
496
|
+
</div>
|
|
497
|
+
|
|
498
|
+
<div class="component-row">
|
|
499
|
+
<h3>Menu</h3>
|
|
500
|
+
<div class="menu-grid">
|
|
501
|
+
<modus-menu [bordered]="true">
|
|
502
|
+
<modus-menu-item label="Dashboard" value="dashboard" [selected]="true" />
|
|
503
|
+
<modus-menu-item label="Projects" value="projects" />
|
|
504
|
+
<modus-menu-item label="Reports" value="reports" />
|
|
505
|
+
</modus-menu>
|
|
506
|
+
<modus-menu orientation="horizontal">
|
|
507
|
+
<modus-menu-item label="Left" value="left" />
|
|
508
|
+
<modus-menu-item label="Center" value="center" />
|
|
509
|
+
<modus-menu-item label="Right" value="right" />
|
|
510
|
+
</modus-menu>
|
|
511
|
+
</div>
|
|
512
|
+
</div>
|
|
513
|
+
|
|
514
|
+
<div class="component-row">
|
|
515
|
+
<h3>File Dropzone</h3>
|
|
516
|
+
<modus-file-dropzone
|
|
517
|
+
acceptFileTypes=".pdf,.docx"
|
|
518
|
+
instructions="Drag files here or click to upload"
|
|
519
|
+
successMessage="Upload complete"
|
|
520
|
+
>
|
|
521
|
+
<p>Supports PDF and DOCX files up to 10MB.</p>
|
|
522
|
+
</modus-file-dropzone>
|
|
523
|
+
</div>
|
|
524
|
+
|
|
525
|
+
<div class="component-row">
|
|
526
|
+
<h3>Loader</h3>
|
|
527
|
+
<div class="loader-group">
|
|
528
|
+
<modus-loader />
|
|
529
|
+
<modus-loader color="success" variant="dots" />
|
|
530
|
+
<modus-loader color="warning" variant="spinner" size="lg" />
|
|
531
|
+
</div>
|
|
532
|
+
</div>
|
|
533
|
+
|
|
534
|
+
<div class="component-row">
|
|
535
|
+
<h3>Pagination & Progress</h3>
|
|
536
|
+
<div class="pagination-grid">
|
|
537
|
+
<div>
|
|
538
|
+
<modus-pagination
|
|
539
|
+
[count]="paginationState.count"
|
|
540
|
+
[page]="paginationState.page"
|
|
541
|
+
(pageChange)="onPageChange($event)"
|
|
542
|
+
/>
|
|
543
|
+
<p class="pagination-info">
|
|
544
|
+
Current page: {{ paginationState.page }} / {{ paginationState.count }}
|
|
545
|
+
</p>
|
|
546
|
+
</div>
|
|
547
|
+
<div class="progress-stack">
|
|
548
|
+
<modus-progress [value]="45" [label]="'45% complete'" />
|
|
549
|
+
<modus-progress variant="radial" [value]="72" [label]="'72%'">
|
|
550
|
+
<strong>72%</strong>
|
|
551
|
+
</modus-progress>
|
|
552
|
+
</div>
|
|
553
|
+
</div>
|
|
554
|
+
</div>
|
|
555
|
+
|
|
556
|
+
<div class="component-row">
|
|
557
|
+
<h3>Rating</h3>
|
|
558
|
+
<div class="rating-group">
|
|
559
|
+
<modus-rating
|
|
560
|
+
[value]="ratingValue"
|
|
561
|
+
variant="star"
|
|
562
|
+
[allowHalf]="true"
|
|
563
|
+
(ratingChange)="onRatingChange($event)"
|
|
564
|
+
/>
|
|
565
|
+
<span>Selected rating: {{ ratingValue }}</span>
|
|
566
|
+
</div>
|
|
567
|
+
</div>
|
|
568
|
+
|
|
569
|
+
<div class="component-row">
|
|
570
|
+
<h3>Modal</h3>
|
|
571
|
+
<modus-button color="primary" (buttonClick)="openDemoModal()">Open Modal</modus-button>
|
|
572
|
+
<modus-modal modalId="theme-demo-modal" [showFullscreenToggle]="true" backdrop="default">
|
|
573
|
+
<h3 slot="header">Theme Demo Modal</h3>
|
|
574
|
+
<div slot="content">
|
|
575
|
+
<p>This modal showcases the Modus modal wrapper.</p>
|
|
576
|
+
<p>Use the buttons in the header to close or toggle fullscreen.</p>
|
|
577
|
+
</div>
|
|
578
|
+
<div slot="footer">
|
|
579
|
+
<modus-button color="secondary">Dismiss</modus-button>
|
|
580
|
+
<modus-button color="primary">Confirm</modus-button>
|
|
581
|
+
</div>
|
|
582
|
+
</modus-modal>
|
|
583
|
+
</div>
|
|
584
|
+
|
|
585
|
+
<div class="component-row">
|
|
586
|
+
<h3>Accordion</h3>
|
|
587
|
+
<div class="accordion-example">
|
|
588
|
+
<modus-accordion (expandedChange)="onAccordionChange($event)">
|
|
589
|
+
<modus-collapse [options]="collapseOptions[0]">
|
|
590
|
+
<div slot="content">
|
|
591
|
+
<p>This is the content for the first accordion item.</p>
|
|
592
|
+
<p>You can add any HTML content here, including other components.</p>
|
|
593
|
+
</div>
|
|
594
|
+
</modus-collapse>
|
|
595
|
+
<modus-collapse [options]="collapseOptions[1]">
|
|
596
|
+
<div slot="content">
|
|
597
|
+
<p>This is the content for the second accordion item.</p>
|
|
598
|
+
<ul>
|
|
599
|
+
<li>List item one</li>
|
|
600
|
+
<li>List item two</li>
|
|
601
|
+
<li>List item three</li>
|
|
602
|
+
</ul>
|
|
603
|
+
</div>
|
|
604
|
+
</modus-collapse>
|
|
605
|
+
<modus-collapse [options]="collapseOptions[2]">
|
|
606
|
+
<div slot="content">
|
|
607
|
+
<p>This is the content for the third accordion item.</p>
|
|
608
|
+
<modus-button color="primary">Action Button</modus-button>
|
|
609
|
+
</div>
|
|
610
|
+
</modus-collapse>
|
|
611
|
+
</modus-accordion>
|
|
612
|
+
</div>
|
|
613
|
+
</div>
|
|
614
|
+
|
|
615
|
+
<div class="component-row">
|
|
616
|
+
<h3>Autocomplete</h3>
|
|
617
|
+
<div class="form-grid">
|
|
618
|
+
<div class="form-control">
|
|
619
|
+
<modus-autocomplete
|
|
620
|
+
label="Search cities"
|
|
621
|
+
placeholder="Type to search..."
|
|
622
|
+
[items]="autocompleteItems"
|
|
623
|
+
[includeSearch]="true"
|
|
624
|
+
/>
|
|
625
|
+
</div>
|
|
626
|
+
<div class="form-control">
|
|
627
|
+
<modus-autocomplete
|
|
628
|
+
label="Multi-select tags"
|
|
629
|
+
placeholder="Select multiple items"
|
|
630
|
+
[items]="autocompleteItems"
|
|
631
|
+
[multiSelect]="true"
|
|
632
|
+
[includeClear]="true"
|
|
633
|
+
/>
|
|
634
|
+
</div>
|
|
635
|
+
</div>
|
|
636
|
+
</div>
|
|
637
|
+
|
|
638
|
+
<div class="component-row">
|
|
639
|
+
<h3>Select</h3>
|
|
640
|
+
<div class="form-grid">
|
|
641
|
+
<div class="form-control">
|
|
642
|
+
<modus-select label="Choose a country" [options]="selectOptions" />
|
|
643
|
+
</div>
|
|
644
|
+
<div class="form-control">
|
|
645
|
+
<modus-select
|
|
646
|
+
label="Required field"
|
|
647
|
+
[options]="selectOptions"
|
|
648
|
+
[required]="true"
|
|
649
|
+
size="lg"
|
|
650
|
+
/>
|
|
651
|
+
</div>
|
|
652
|
+
</div>
|
|
653
|
+
</div>
|
|
654
|
+
|
|
655
|
+
<div class="component-row">
|
|
656
|
+
<h3>Text Input</h3>
|
|
657
|
+
<div class="form-grid">
|
|
658
|
+
<div class="form-control">
|
|
659
|
+
<modus-text-input
|
|
660
|
+
label="Email address"
|
|
661
|
+
type="email"
|
|
662
|
+
placeholder="user@example.com"
|
|
663
|
+
[includeClear]="true"
|
|
664
|
+
/>
|
|
665
|
+
</div>
|
|
666
|
+
<div class="form-control">
|
|
667
|
+
<modus-text-input
|
|
668
|
+
label="Password"
|
|
669
|
+
type="password"
|
|
670
|
+
placeholder="Enter password"
|
|
671
|
+
[required]="true"
|
|
672
|
+
/>
|
|
673
|
+
</div>
|
|
674
|
+
</div>
|
|
675
|
+
</div>
|
|
676
|
+
|
|
677
|
+
<div class="component-row">
|
|
678
|
+
<h3>Textarea</h3>
|
|
679
|
+
<div class="form-grid">
|
|
680
|
+
<div class="form-control">
|
|
681
|
+
<modus-textarea
|
|
682
|
+
label="Comments"
|
|
683
|
+
placeholder="Enter your comments here..."
|
|
684
|
+
[rows]="4"
|
|
685
|
+
/>
|
|
686
|
+
</div>
|
|
687
|
+
<div class="form-control">
|
|
688
|
+
<modus-textarea
|
|
689
|
+
label="Description"
|
|
690
|
+
placeholder="Max 200 characters"
|
|
691
|
+
[maxLength]="200"
|
|
692
|
+
[rows]="3"
|
|
693
|
+
/>
|
|
694
|
+
</div>
|
|
695
|
+
</div>
|
|
696
|
+
</div>
|
|
697
|
+
|
|
698
|
+
<div class="component-row">
|
|
699
|
+
<h3>Switch</h3>
|
|
700
|
+
<div class="form-grid">
|
|
701
|
+
<div class="form-control">
|
|
702
|
+
<modus-switch label="Enable notifications" [value]="true" />
|
|
703
|
+
</div>
|
|
704
|
+
<div class="form-control">
|
|
705
|
+
<modus-switch label="Dark mode" [value]="false" size="lg" />
|
|
706
|
+
</div>
|
|
707
|
+
</div>
|
|
708
|
+
</div>
|
|
709
|
+
|
|
710
|
+
<div class="component-row">
|
|
711
|
+
<h3>Slider</h3>
|
|
712
|
+
<div class="form-grid">
|
|
713
|
+
<div class="form-control">
|
|
714
|
+
<modus-slider label="Volume" [min]="0" [max]="100" [value]="50" [step]="5" />
|
|
715
|
+
</div>
|
|
716
|
+
<div class="form-control">
|
|
717
|
+
<modus-slider label="Temperature" [min]="0" [max]="100" [value]="25" />
|
|
718
|
+
</div>
|
|
719
|
+
</div>
|
|
720
|
+
</div>
|
|
721
|
+
|
|
722
|
+
<div class="component-row">
|
|
723
|
+
<h3>Time Input</h3>
|
|
724
|
+
<div class="form-grid">
|
|
725
|
+
<div class="form-control">
|
|
726
|
+
<modus-time-input label="Start time" value="09:00" />
|
|
727
|
+
</div>
|
|
728
|
+
<div class="form-control">
|
|
729
|
+
<modus-time-input label="End time" value="17:00" [required]="true" />
|
|
730
|
+
</div>
|
|
731
|
+
</div>
|
|
732
|
+
</div>
|
|
733
|
+
|
|
734
|
+
<div class="component-row">
|
|
735
|
+
<h3>Tabs</h3>
|
|
736
|
+
<div class="menu-grid">
|
|
737
|
+
<div>
|
|
738
|
+
<modus-tabs [tabs]="tabItems" [activeTabIndex]="0">
|
|
739
|
+
<div slot="tab-0">
|
|
740
|
+
<p>Content for the first tab</p>
|
|
741
|
+
</div>
|
|
742
|
+
<div slot="tab-1">
|
|
743
|
+
<p>Content for the second tab</p>
|
|
744
|
+
</div>
|
|
745
|
+
<div slot="tab-2">
|
|
746
|
+
<p>Content for the third tab</p>
|
|
747
|
+
</div>
|
|
748
|
+
</modus-tabs>
|
|
749
|
+
</div>
|
|
750
|
+
<div>
|
|
751
|
+
<modus-tabs [tabs]="tabItemsSmall" [activeTabIndex]="1" size="sm">
|
|
752
|
+
<div slot="tab-0">Small tab 1</div>
|
|
753
|
+
<div slot="tab-1">Small tab 2</div>
|
|
754
|
+
</modus-tabs>
|
|
755
|
+
</div>
|
|
756
|
+
</div>
|
|
757
|
+
</div>
|
|
758
|
+
|
|
759
|
+
<div class="component-row">
|
|
760
|
+
<h3>Stepper</h3>
|
|
761
|
+
<div class="menu-grid">
|
|
762
|
+
<div>
|
|
763
|
+
<modus-stepper [steps]="stepperItems" orientation="horizontal" />
|
|
764
|
+
</div>
|
|
765
|
+
<div>
|
|
766
|
+
<modus-stepper [steps]="stepperItemsVertical" orientation="vertical" />
|
|
767
|
+
</div>
|
|
768
|
+
</div>
|
|
769
|
+
</div>
|
|
770
|
+
|
|
771
|
+
<div class="component-row">
|
|
772
|
+
<h3>Tooltip</h3>
|
|
773
|
+
<div class="button-group">
|
|
774
|
+
<modus-tooltip content="This is a tooltip on the top" position="top">
|
|
775
|
+
<modus-button color="primary">Hover me (Top)</modus-button>
|
|
776
|
+
</modus-tooltip>
|
|
777
|
+
<modus-tooltip content="This is a tooltip on the right" position="right">
|
|
778
|
+
<modus-button color="secondary">Hover me (Right)</modus-button>
|
|
779
|
+
</modus-tooltip>
|
|
780
|
+
</div>
|
|
781
|
+
</div>
|
|
782
|
+
|
|
783
|
+
<div class="component-row">
|
|
784
|
+
<h3>Toast</h3>
|
|
785
|
+
<div class="button-group">
|
|
786
|
+
<modus-toast position="top-end" [delay]="5000">
|
|
787
|
+
<div>Success message displayed as toast</div>
|
|
788
|
+
</modus-toast>
|
|
789
|
+
<modus-toast position="bottom-center" [delay]="3000">
|
|
790
|
+
<div>Info message in center</div>
|
|
791
|
+
</modus-toast>
|
|
792
|
+
</div>
|
|
793
|
+
</div>
|
|
794
|
+
|
|
795
|
+
<div class="component-row">
|
|
796
|
+
<h3>Skeleton</h3>
|
|
797
|
+
<div class="menu-grid">
|
|
798
|
+
<div>
|
|
799
|
+
<modus-skeleton />
|
|
800
|
+
</div>
|
|
801
|
+
<div>
|
|
802
|
+
<modus-skeleton shape="circle" />
|
|
803
|
+
</div>
|
|
804
|
+
</div>
|
|
805
|
+
</div>
|
|
806
|
+
|
|
807
|
+
<div class="component-row">
|
|
808
|
+
<h3>Typography</h3>
|
|
809
|
+
<div class="menu-grid">
|
|
810
|
+
<div>
|
|
811
|
+
<modus-typography hierarchy="h1" size="xl" weight="bold">Heading 1</modus-typography>
|
|
812
|
+
<modus-typography hierarchy="h2" size="lg">Heading 2</modus-typography>
|
|
813
|
+
<modus-typography hierarchy="p">Body text</modus-typography>
|
|
814
|
+
</div>
|
|
815
|
+
<div>
|
|
816
|
+
<modus-typography hierarchy="h3" weight="semibold">Semibold Heading</modus-typography>
|
|
817
|
+
<modus-typography hierarchy="p" size="sm" weight="light">Light text</modus-typography>
|
|
818
|
+
</div>
|
|
819
|
+
</div>
|
|
820
|
+
</div>
|
|
821
|
+
|
|
822
|
+
<div class="component-row">
|
|
823
|
+
<h3>Toolbar</h3>
|
|
824
|
+
<div class="menu-grid">
|
|
825
|
+
<div>
|
|
826
|
+
<modus-toolbar>
|
|
827
|
+
<modus-button slot="start" color="primary" size="sm">Start</modus-button>
|
|
828
|
+
<div slot="center">Center Content</div>
|
|
829
|
+
<modus-button slot="end" color="secondary" size="sm">End</modus-button>
|
|
830
|
+
</modus-toolbar>
|
|
831
|
+
</div>
|
|
832
|
+
<div>
|
|
833
|
+
<modus-toolbar>
|
|
834
|
+
<modus-icon slot="start" name="menu" size="lg" />
|
|
835
|
+
<div slot="center">Another Toolbar</div>
|
|
836
|
+
<modus-icon slot="end" name="settings" size="lg" />
|
|
837
|
+
</modus-toolbar>
|
|
838
|
+
</div>
|
|
839
|
+
</div>
|
|
840
|
+
</div>
|
|
841
|
+
|
|
842
|
+
<div class="component-row">
|
|
843
|
+
<h3>Table</h3>
|
|
844
|
+
<div class="menu-grid">
|
|
845
|
+
<div>
|
|
846
|
+
<modus-table
|
|
847
|
+
[columns]="tableColumns"
|
|
848
|
+
[data]="tableData"
|
|
849
|
+
[paginated]="true"
|
|
850
|
+
[sortable]="true"
|
|
851
|
+
[hover]="true"
|
|
852
|
+
/>
|
|
853
|
+
</div>
|
|
854
|
+
<div>
|
|
855
|
+
<modus-table
|
|
856
|
+
[columns]="tableColumns"
|
|
857
|
+
[data]="tableData"
|
|
858
|
+
[zebra]="true"
|
|
859
|
+
density="compact"
|
|
860
|
+
caption="Compact table with zebra stripes"
|
|
861
|
+
/>
|
|
862
|
+
</div>
|
|
863
|
+
</div>
|
|
864
|
+
</div>
|
|
865
|
+
|
|
866
|
+
<div class="component-row">
|
|
867
|
+
<h3>Side Navigation</h3>
|
|
868
|
+
<div class="menu-grid">
|
|
869
|
+
<div>
|
|
870
|
+
<modus-side-navigation [expanded]="true" mode="push">
|
|
871
|
+
<p>Side navigation content in push mode</p>
|
|
872
|
+
</modus-side-navigation>
|
|
873
|
+
</div>
|
|
874
|
+
<div>
|
|
875
|
+
<modus-side-navigation [expanded]="false" mode="overlay">
|
|
876
|
+
<p>Side navigation in overlay mode (collapsed)</p>
|
|
877
|
+
</modus-side-navigation>
|
|
878
|
+
</div>
|
|
879
|
+
</div>
|
|
880
|
+
</div>
|
|
881
|
+
|
|
882
|
+
<div class="component-row">
|
|
883
|
+
<h3>Navbar</h3>
|
|
884
|
+
<div class="menu-grid">
|
|
885
|
+
<div>
|
|
886
|
+
<modus-navbar
|
|
887
|
+
[userCard]="navbarUserCard"
|
|
888
|
+
[visibility]="{ user: true, search: true }"
|
|
889
|
+
/>
|
|
890
|
+
</div>
|
|
891
|
+
<div>
|
|
892
|
+
<modus-navbar
|
|
893
|
+
[userCard]="navbarUserCard"
|
|
894
|
+
[visibility]="{ user: true, mainMenu: true, notifications: true }"
|
|
895
|
+
[condensed]="true"
|
|
896
|
+
/>
|
|
897
|
+
</div>
|
|
898
|
+
</div>
|
|
899
|
+
</div>
|
|
900
|
+
|
|
901
|
+
<div class="component-row">
|
|
902
|
+
<h3>Utility Panel</h3>
|
|
903
|
+
<div class="menu-grid">
|
|
904
|
+
<div>
|
|
905
|
+
<modus-utility-panel [expanded]="false" [pushContent]="false">
|
|
906
|
+
<div slot="header">Utility Panel Header</div>
|
|
907
|
+
<div slot="body">Utility panel body content</div>
|
|
908
|
+
<div slot="footer">Utility Panel Footer</div>
|
|
909
|
+
</modus-utility-panel>
|
|
910
|
+
</div>
|
|
911
|
+
<div>
|
|
912
|
+
<modus-utility-panel [expanded]="true" [pushContent]="true">
|
|
913
|
+
<div slot="header">Expanded Panel Header</div>
|
|
914
|
+
<div slot="body">Expanded panel with push content enabled</div>
|
|
915
|
+
<div slot="footer">Expanded Panel Footer</div>
|
|
916
|
+
</modus-utility-panel>
|
|
917
|
+
</div>
|
|
918
|
+
</div>
|
|
919
|
+
</div>
|
|
920
|
+
</div>
|
|
921
|
+
</div>
|
|
922
|
+
`,
|
|
923
|
+
styles: [
|
|
924
|
+
`
|
|
925
|
+
.theme-demo-container {
|
|
926
|
+
padding: 2rem;
|
|
927
|
+
max-width: 1200px;
|
|
928
|
+
margin: 0 auto;
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
.theme-demo-header {
|
|
932
|
+
text-align: center;
|
|
933
|
+
margin-bottom: 2rem;
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
.theme-demo-header h1 {
|
|
937
|
+
margin-bottom: 0.5rem;
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
.theme-controls {
|
|
941
|
+
display: grid;
|
|
942
|
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
943
|
+
gap: 2rem;
|
|
944
|
+
margin-bottom: 2rem;
|
|
945
|
+
padding: 1.5rem;
|
|
946
|
+
background: var(--card);
|
|
947
|
+
border-radius: 0.5rem;
|
|
948
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
.control-group h2 {
|
|
952
|
+
margin-bottom: 1rem;
|
|
953
|
+
font-size: 1.1rem;
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
.theme-buttons,
|
|
957
|
+
.mode-buttons {
|
|
958
|
+
display: flex;
|
|
959
|
+
gap: 0.5rem;
|
|
960
|
+
flex-wrap: wrap;
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
.current-theme-info {
|
|
964
|
+
background: var(--muted);
|
|
965
|
+
padding: 1rem;
|
|
966
|
+
border-radius: 0.5rem;
|
|
967
|
+
margin-bottom: 2rem;
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
.current-theme-info p {
|
|
971
|
+
margin: 0.5rem 0;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
.demo-components {
|
|
975
|
+
margin-top: 2rem;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
.demo-components h2 {
|
|
979
|
+
margin-bottom: 1.5rem;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
.component-row {
|
|
983
|
+
margin-bottom: 2rem;
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
.component-row h3 {
|
|
987
|
+
margin-bottom: 1rem;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
.button-group,
|
|
991
|
+
.badge-group {
|
|
992
|
+
display: flex;
|
|
993
|
+
gap: 0.5rem;
|
|
994
|
+
flex-wrap: wrap;
|
|
995
|
+
align-items: center;
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
.alert-group {
|
|
999
|
+
display: flex;
|
|
1000
|
+
flex-direction: column;
|
|
1001
|
+
gap: 0.5rem;
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
.icon-group {
|
|
1005
|
+
display: grid;
|
|
1006
|
+
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
|
1007
|
+
gap: 1rem;
|
|
1008
|
+
align-items: center;
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
.avatar-group,
|
|
1012
|
+
.chip-group,
|
|
1013
|
+
.loader-group {
|
|
1014
|
+
display: flex;
|
|
1015
|
+
gap: 1rem;
|
|
1016
|
+
align-items: center;
|
|
1017
|
+
flex-wrap: wrap;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
.form-grid {
|
|
1021
|
+
display: grid;
|
|
1022
|
+
gap: 1.5rem;
|
|
1023
|
+
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
.form-control {
|
|
1027
|
+
display: flex;
|
|
1028
|
+
flex-direction: column;
|
|
1029
|
+
gap: 0.5rem;
|
|
1030
|
+
padding: 1rem;
|
|
1031
|
+
background: var(--muted);
|
|
1032
|
+
border-radius: 0.5rem;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
.menu-grid {
|
|
1036
|
+
display: flex;
|
|
1037
|
+
flex-wrap: wrap;
|
|
1038
|
+
gap: 2rem;
|
|
1039
|
+
align-items: flex-start;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
.pagination-grid {
|
|
1043
|
+
display: flex;
|
|
1044
|
+
flex-wrap: wrap;
|
|
1045
|
+
gap: 2rem;
|
|
1046
|
+
align-items: center;
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
.pagination-info {
|
|
1050
|
+
margin-top: 0.5rem;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
.progress-stack {
|
|
1054
|
+
display: flex;
|
|
1055
|
+
gap: 1rem;
|
|
1056
|
+
align-items: center;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
.rating-group {
|
|
1060
|
+
display: flex;
|
|
1061
|
+
flex-direction: column;
|
|
1062
|
+
gap: 0.5rem;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
.icon-example {
|
|
1066
|
+
display: flex;
|
|
1067
|
+
flex-direction: column;
|
|
1068
|
+
align-items: center;
|
|
1069
|
+
gap: 0.5rem;
|
|
1070
|
+
padding: 1rem;
|
|
1071
|
+
background: var(--muted);
|
|
1072
|
+
border-radius: 0.5rem;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
.icon-example span {
|
|
1076
|
+
font-size: 0.875rem;
|
|
1077
|
+
text-align: center;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
.accordion-example {
|
|
1081
|
+
max-width: 800px;
|
|
1082
|
+
}
|
|
1083
|
+
`,
|
|
1084
|
+
],
|
|
1085
|
+
})
|
|
1086
|
+
export class ThemeDemoComponent implements OnInit {
|
|
1087
|
+
currentTheme = signal<ThemeName>('modus-modern');
|
|
1088
|
+
currentMode = signal<ThemeMode>('light');
|
|
1089
|
+
fullThemeName = signal<string>('modus-modern-light');
|
|
1090
|
+
|
|
1091
|
+
/** Collapse options for accordion items */
|
|
1092
|
+
collapseOptions: ICollapseOptions[] = [
|
|
1093
|
+
{
|
|
1094
|
+
title: 'Item One',
|
|
1095
|
+
description: 'Item one description',
|
|
1096
|
+
icon: 'info',
|
|
1097
|
+
iconAriaLabel: 'Information',
|
|
1098
|
+
},
|
|
1099
|
+
{
|
|
1100
|
+
title: 'Item Two',
|
|
1101
|
+
description: 'Item two description',
|
|
1102
|
+
icon: 'warning',
|
|
1103
|
+
iconAriaLabel: 'Warning',
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
title: 'Item Three',
|
|
1107
|
+
description: 'Item three description',
|
|
1108
|
+
icon: 'check_circle',
|
|
1109
|
+
iconAriaLabel: 'Success',
|
|
1110
|
+
},
|
|
1111
|
+
];
|
|
1112
|
+
|
|
1113
|
+
breadcrumbItems: IBreadcrumb[] = [
|
|
1114
|
+
{ label: 'Home', url: '#home' },
|
|
1115
|
+
{ label: 'Components', url: '#components' },
|
|
1116
|
+
{ label: 'Theme Demo' },
|
|
1117
|
+
];
|
|
1118
|
+
|
|
1119
|
+
paginationState = { page: 2, count: 8 };
|
|
1120
|
+
|
|
1121
|
+
ratingValue = 3.5;
|
|
1122
|
+
|
|
1123
|
+
autocompleteItems: IAutocompleteItem[] = [
|
|
1124
|
+
{ label: 'New York', value: 'ny', visibleInMenu: true },
|
|
1125
|
+
{ label: 'Los Angeles', value: 'la', visibleInMenu: true },
|
|
1126
|
+
{ label: 'Chicago', value: 'ch', visibleInMenu: true },
|
|
1127
|
+
{ label: 'Houston', value: 'ho', visibleInMenu: true },
|
|
1128
|
+
{ label: 'Phoenix', value: 'ph', visibleInMenu: true },
|
|
1129
|
+
];
|
|
1130
|
+
|
|
1131
|
+
selectOptions: ISelectOption[] = [
|
|
1132
|
+
{ label: 'United States', value: 'us' },
|
|
1133
|
+
{ label: 'Canada', value: 'ca' },
|
|
1134
|
+
{ label: 'Mexico', value: 'mx' },
|
|
1135
|
+
{ label: 'United Kingdom', value: 'uk' },
|
|
1136
|
+
{ label: 'Germany', value: 'de' },
|
|
1137
|
+
];
|
|
1138
|
+
|
|
1139
|
+
tabItems: ITab[] = [{ label: 'Tab One' }, { label: 'Tab Two' }, { label: 'Tab Three' }];
|
|
1140
|
+
|
|
1141
|
+
tabItemsSmall: ITab[] = [{ label: 'Small Tab 1' }, { label: 'Small Tab 2' }];
|
|
1142
|
+
|
|
1143
|
+
stepperItems: IStepperItem[] = [
|
|
1144
|
+
{ label: 'Step 1', color: 'primary' },
|
|
1145
|
+
{ label: 'Step 2', color: 'info' },
|
|
1146
|
+
{ label: 'Step 3' },
|
|
1147
|
+
];
|
|
1148
|
+
|
|
1149
|
+
stepperItemsVertical: IStepperItem[] = [
|
|
1150
|
+
{ label: 'Setup', color: 'success' },
|
|
1151
|
+
{ label: 'Configure', color: 'warning' },
|
|
1152
|
+
{ label: 'Deploy', color: 'error' },
|
|
1153
|
+
];
|
|
1154
|
+
|
|
1155
|
+
tableColumns: ITableColumn[] = [
|
|
1156
|
+
{ id: 'name', header: 'Name', accessor: 'name', sortable: true },
|
|
1157
|
+
{ id: 'email', header: 'Email', accessor: 'email', sortable: true },
|
|
1158
|
+
{ id: 'role', header: 'Role', accessor: 'role' },
|
|
1159
|
+
];
|
|
1160
|
+
|
|
1161
|
+
tableData: Record<string, unknown>[] = [
|
|
1162
|
+
{ id: '1', name: 'John Doe', email: 'john@example.com', role: 'Admin' },
|
|
1163
|
+
{ id: '2', name: 'Jane Smith', email: 'jane@example.com', role: 'User' },
|
|
1164
|
+
{ id: '3', name: 'Bob Johnson', email: 'bob@example.com', role: 'User' },
|
|
1165
|
+
];
|
|
1166
|
+
|
|
1167
|
+
navbarUserCard: INavbarUserCard = {
|
|
1168
|
+
name: 'John Doe',
|
|
1169
|
+
email: 'john.doe@example.com',
|
|
1170
|
+
avatarSrc: 'https://via.placeholder.com/64',
|
|
1171
|
+
avatarAlt: 'User avatar',
|
|
1172
|
+
};
|
|
1173
|
+
|
|
1174
|
+
constructor(private themeService: ThemeService) {
|
|
1175
|
+
// Use effect to react to theme changes
|
|
1176
|
+
effect(() => {
|
|
1177
|
+
const theme = this.themeService.theme();
|
|
1178
|
+
this.currentTheme.set(theme);
|
|
1179
|
+
this.updateFullThemeName();
|
|
1180
|
+
});
|
|
1181
|
+
|
|
1182
|
+
effect(() => {
|
|
1183
|
+
const mode = this.themeService.mode();
|
|
1184
|
+
this.currentMode.set(mode);
|
|
1185
|
+
this.updateFullThemeName();
|
|
1186
|
+
});
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
ngOnInit(): void {
|
|
1190
|
+
// Initialize current values
|
|
1191
|
+
const config = this.themeService.getThemeConfig();
|
|
1192
|
+
this.currentTheme.set(config.theme);
|
|
1193
|
+
this.currentMode.set(config.mode);
|
|
1194
|
+
this.updateFullThemeName();
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
setTheme(theme: ThemeName): void {
|
|
1198
|
+
this.themeService.setThemeName(theme);
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
setMode(mode: ThemeMode): void {
|
|
1202
|
+
this.themeService.setMode(mode);
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
onThemeChange(config: ThemeConfig): void {
|
|
1206
|
+
if (config && config.theme && config.mode) {
|
|
1207
|
+
this.themeService.setTheme(config.theme, config.mode);
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
private updateFullThemeName(): void {
|
|
1212
|
+
this.fullThemeName.set(this.themeService.getFullThemeName());
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
/**
|
|
1216
|
+
* Handles accordion expanded change events
|
|
1217
|
+
*
|
|
1218
|
+
* @param event - Event containing expanded state and index
|
|
1219
|
+
*/
|
|
1220
|
+
onAccordionChange(event: { expanded: boolean; index: number }): void {
|
|
1221
|
+
console.log('Accordion item changed:', event);
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
onBreadcrumbClick(item: IBreadcrumb): void {
|
|
1225
|
+
console.log('Breadcrumb clicked:', item);
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
onPageChange(change: IPageChange): void {
|
|
1229
|
+
this.paginationState = { ...this.paginationState, page: change.newPage };
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
onRatingChange(change: IRatingChange): void {
|
|
1233
|
+
this.ratingValue = change.newRating;
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
openDemoModal(): void {
|
|
1237
|
+
const dialog = document.getElementById('theme-demo-modal') as HTMLDialogElement | null;
|
|
1238
|
+
if (dialog && typeof dialog.showModal === 'function') {
|
|
1239
|
+
dialog.showModal();
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
}
|