mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[HXCS-1479] Breadcrumbs as secondary entry point (#8750)
* Move breadcrumb outside of the core * Fix styling * Fix storybook
This commit is contained in:
@@ -348,7 +348,9 @@
|
|||||||
"lib/core/auth/**/*.ts",
|
"lib/core/auth/**/*.ts",
|
||||||
"lib/core/auth/**/*.html",
|
"lib/core/auth/**/*.html",
|
||||||
"lib/core/shell/**/*.ts",
|
"lib/core/shell/**/*.ts",
|
||||||
"lib/core/shell/**/*.html"
|
"lib/core/shell/**/*.html",
|
||||||
|
"lib/core/breadcrumbs/**/*.ts",
|
||||||
|
"lib/core/breadcrumbs/**/*.html"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
3
lib/core/breadcrumbs/README.md
Normal file
3
lib/core/breadcrumbs/README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# @alfresco/adf-core/breadcrumbs
|
||||||
|
|
||||||
|
Secondary entry point of `@alfresco/adf-core`. It can be used by importing from `@alfresco/adf-core/breadcrumbs`.
|
5
lib/core/breadcrumbs/ng-package.json
Normal file
5
lib/core/breadcrumbs/ng-package.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"lib": {
|
||||||
|
"entryFile": "src/index.ts"
|
||||||
|
}
|
||||||
|
}
|
18
lib/core/breadcrumbs/public-api.ts
Normal file
18
lib/core/breadcrumbs/public-api.ts
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/*!
|
||||||
|
* @license
|
||||||
|
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export * from './src/index';
|
@@ -22,7 +22,7 @@ import { MatIconModule } from '@angular/material/icon';
|
|||||||
import { BreadcrumbComponent } from '../components/breadcrumb/breadcrumb.component';
|
import { BreadcrumbComponent } from '../components/breadcrumb/breadcrumb.component';
|
||||||
import { BreadcrumbItemComponent } from '../components/breadcrumb-item/breadcrumb-item.component';
|
import { BreadcrumbItemComponent } from '../components/breadcrumb-item/breadcrumb-item.component';
|
||||||
import { DemoBreadcrumbComponent } from './demo-breadcrumb.component';
|
import { DemoBreadcrumbComponent } from './demo-breadcrumb.component';
|
||||||
import { CoreStoryModule } from '../../testing/core.story.module';
|
import { CoreStoryModule } from '../../../src/lib/testing/core.story.module';
|
||||||
|
|
||||||
// https://stackoverflow.com/a/58210459/8820824
|
// https://stackoverflow.com/a/58210459/8820824
|
||||||
type NonFunctionPropertyNames<T> = {[K in keyof T]: T[K] extends () => any ? never : K}[keyof T];
|
type NonFunctionPropertyNames<T> = {[K in keyof T]: T[K] extends () => any ? never : K}[keyof T];
|
Before Width: | Height: | Size: 469 B After Width: | Height: | Size: 469 B |
33
lib/core/breadcrumbs/src/styles/_breadcrumb.theme.scss
Normal file
33
lib/core/breadcrumbs/src/styles/_breadcrumb.theme.scss
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
@use 'sass:map';
|
||||||
|
@use '@angular/material' as mat;
|
||||||
|
|
||||||
|
@mixin adf-breadcrumb-theme($theme) {
|
||||||
|
$config: mat.get-color-config($theme);
|
||||||
|
$foreground-palette: map.get($config, foreground);
|
||||||
|
$primary-palette: map.get($config, primary);
|
||||||
|
$text-color: mat.get-color-from-palette($foreground-palette, text);
|
||||||
|
$primary: mat.get-color-from-palette($primary-palette, text);
|
||||||
|
|
||||||
|
adf-breadcrumb {
|
||||||
|
.adf-breadcrumb__show-all-button-icon--rotate {
|
||||||
|
color: mat.get-color-from-palette($primary-palette, 500);
|
||||||
|
}
|
||||||
|
|
||||||
|
.adf-breadcrumb__item-wrapper {
|
||||||
|
a,
|
||||||
|
a:active,
|
||||||
|
a:visited {
|
||||||
|
color: $primary;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-child a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: $text-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-child a:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -2,6 +2,11 @@
|
|||||||
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
||||||
"dest": "../../dist/libs/core",
|
"dest": "../../dist/libs/core",
|
||||||
"assets": [
|
"assets": [
|
||||||
|
{
|
||||||
|
"glob": "**/*.scss",
|
||||||
|
"input": "./breadcrumbs/src/styles",
|
||||||
|
"output": "./breadcrumbs/styles"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"glob": "custom-theme/**/*",
|
"glob": "custom-theme/**/*",
|
||||||
"input": "./",
|
"input": "./",
|
||||||
|
@@ -14,6 +14,9 @@
|
|||||||
"exports": {
|
"exports": {
|
||||||
"./theming": {
|
"./theming": {
|
||||||
"sass": "./lib/theming/_index.scss"
|
"sass": "./lib/theming/_index.scss"
|
||||||
|
},
|
||||||
|
"./breadcrumbs": {
|
||||||
|
"sass": "./breadcrumbs/styles/_breadcrumb.theme.scss"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@@ -1,22 +0,0 @@
|
|||||||
@use 'sass:map';
|
|
||||||
@use '@angular/material' as mat;
|
|
||||||
|
|
||||||
@mixin adf-breadcrumb-theme($theme) {
|
|
||||||
$config: mat.get-color-config($theme);
|
|
||||||
$foreground-palette: map.get($config, foreground);
|
|
||||||
$primary-palette: map.get($config, primary);
|
|
||||||
$text-color: mat.get-color-from-palette($foreground-palette, text);
|
|
||||||
|
|
||||||
.adf-breadcrumb__show-all-button-icon--rotate {
|
|
||||||
color: mat.get-color-from-palette($primary-palette, 500);
|
|
||||||
}
|
|
||||||
|
|
||||||
.adf-breadcrumb .adf-breadcrumb__item-wrapper:last-child a {
|
|
||||||
text-decoration: none;
|
|
||||||
color: $text-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.adf-breadcrumb .adf-breadcrumb__item-wrapper:last-child a:hover {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -8,7 +8,6 @@
|
|||||||
@import '../styles/mixins';
|
@import '../styles/mixins';
|
||||||
@import '../form/components/widgets/form.theme';
|
@import '../form/components/widgets/form.theme';
|
||||||
@import '../clipboard/clipboard.theme';
|
@import '../clipboard/clipboard.theme';
|
||||||
@import '../breadcrumb/breadcrumb.theme';
|
|
||||||
@import './snackbar.theme';
|
@import './snackbar.theme';
|
||||||
@import './material.theme';
|
@import './material.theme';
|
||||||
@import './components-variables';
|
@import './components-variables';
|
||||||
@@ -112,7 +111,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@include mat-datetimepicker-theme($theme);
|
@include mat-datetimepicker-theme($theme);
|
||||||
@include adf-breadcrumb-theme($theme);
|
|
||||||
@include adf-snackbar-theme;
|
@include adf-snackbar-theme;
|
||||||
@include adf-material-theme;
|
@include adf-material-theme;
|
||||||
@include adf-components-variables;
|
@include adf-components-variables;
|
||||||
|
@@ -25,9 +25,10 @@
|
|||||||
"@alfresco/adf-content-services": ["lib/content-services"],
|
"@alfresco/adf-content-services": ["lib/content-services"],
|
||||||
"@alfresco/adf-core": ["lib/core"],
|
"@alfresco/adf-core": ["lib/core"],
|
||||||
"@alfresco/adf-core/*": ["lib/core/*/public-api.ts"],
|
"@alfresco/adf-core/*": ["lib/core/*/public-api.ts"],
|
||||||
"@alfresco/adf-core/auth": ["lib/core/auth/src/index.ts"],
|
|
||||||
"@alfresco/adf-core/shell": ["lib/core/shell/src/index.ts"],
|
|
||||||
"@alfresco/adf-core/api": ["lib/core/api/src/index.ts"],
|
"@alfresco/adf-core/api": ["lib/core/api/src/index.ts"],
|
||||||
|
"@alfresco/adf-core/auth": ["lib/core/auth/src/index.ts"],
|
||||||
|
"@alfresco/adf-core/breadcrumbs": ["lib/core/breadcrumbs/src/index.ts"],
|
||||||
|
"@alfresco/adf-core/shell": ["lib/core/shell/src/index.ts"],
|
||||||
"@alfresco/adf-extensions": ["lib/extensions"],
|
"@alfresco/adf-extensions": ["lib/extensions"],
|
||||||
"@alfresco/adf-insights": ["lib/insights"],
|
"@alfresco/adf-insights": ["lib/insights"],
|
||||||
"@alfresco/adf-process-services": ["lib/process-services"],
|
"@alfresco/adf-process-services": ["lib/process-services"],
|
||||||
|
Reference in New Issue
Block a user