Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/ng/numeric-badge/public-api.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './numeric-badge.component';
export * from '@lucca/prisme/numeric-badge';
8 changes: 1 addition & 7 deletions packages/ng/skeleton/public-api.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
export * from './skeleton-button/skeleton-button.component';
export * from './skeleton-data-table/skeleton-data-table.component';
export * from './skeleton-field/skeleton-field.component';
export * from './skeleton-header/skeleton-header.component';
export * from './skeleton-index-table/skeleton-index-table.component';
export * from './skeleton-resource-card/skeleton-resource-card.component';
export * from './skeleton-table/skeleton-table.component';
export * from '@lucca/prisme/skeleton';
2 changes: 1 addition & 1 deletion packages/ng/tag/public-api.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './tag.component';
export * from '@lucca/prisme/tag';
5 changes: 1 addition & 4 deletions packages/ng/tooltip/public-api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
export * from './animation/index';
export * from './panel/index';
export * from './trigger/index';
export * from './tooltip.module';
export * from '@lucca/prisme/tooltip';
15 changes: 15 additions & 0 deletions packages/prisme/core/misc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
type Nil = null | undefined;

export const isNil = <T>(value: T | Nil): value is Nil => typeof value === 'undefined' || value === null;

export const isNotNil = <T>(value: T): value is NonNullable<T> => !isNil(value);

export function assertNotNil<T>(input: T, errorMessage = '[assertNotNil] Unexpected null or undefined value.'): asserts input is NonNullable<T> {
if (isNil(input)) {
throw new Error(errorMessage);
}
}

export const isNilOrEmptyString = (str: string | Nil): str is Nil | '' => isNil(str) || str === '';

export const isNotNilOrEmptyString = (str: string | Nil): str is string => !isNilOrEmptyString(str);
1 change: 1 addition & 0 deletions packages/prisme/core/public-api.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './class';
export * from './style';
export * from './signal';
export * from './misc';
6 changes: 6 additions & 0 deletions packages/prisme/numeric-badge/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"lib": {
"entryFile": "public-api.ts"
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { booleanAttribute, ChangeDetectionStrategy, Component, computed, inject, input, ViewEncapsulation } from '@angular/core';
import { LuClass, Palette, ɵeffectWithDeps } from '@lucca-front/ng/core';
import { LuTooltipModule } from '@lucca-front/ng/tooltip';
import { PrClass, Palette, ɵeffectWithDeps } from '@lucca/prisme/core';
import { LuTooltipModule } from '@lucca/prisme/tooltip';

@Component({
selector: 'lu-numeric-badge',
selector: 'lu-numeric-badge,pr-numeric-badge',
templateUrl: './numeric-badge.component.html',
styleUrl: './numeric-badge.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [LuTooltipModule],
providers: [LuClass],
providers: [PrClass],
host: {
class: 'numericBadge',
'[class.is-loading]': 'loading()',
Expand All @@ -17,7 +17,7 @@ import { LuTooltipModule } from '@lucca-front/ng/tooltip';
encapsulation: ViewEncapsulation.None,
})
export class NumericBadgeComponent {
#luClass = inject(LuClass);
#luClass = inject(PrClass);

/**
* The value to display, number or string contains number only.
Expand Down
1 change: 1 addition & 0 deletions packages/prisme/numeric-badge/public-api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './numeric-badge.component';
7 changes: 7 additions & 0 deletions packages/prisme/skeleton/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"lib": {
"entryFile": "public-api.ts",
"styleIncludePaths": ["../styles"]
}
}
7 changes: 7 additions & 0 deletions packages/prisme/skeleton/public-api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export * from './skeleton-button/skeleton-button.component';
export * from './skeleton-data-table/skeleton-data-table.component';
export * from './skeleton-field/skeleton-field.component';
export * from './skeleton-header/skeleton-header.component';
export * from './skeleton-index-table/skeleton-index-table.component';
export * from './skeleton-resource-card/skeleton-resource-card.component';
export * from './skeleton-table/skeleton-table.component';
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { booleanAttribute, ChangeDetectionStrategy, Component, input } from '@angular/core';

@Component({
selector: 'lu-skeleton-button',
selector: 'lu-skeleton-button,pr-skeleton-button',
templateUrl: './skeleton-button.component.html',
styleUrl: './skeleton-button.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { booleanAttribute, ChangeDetectionStrategy, Component, computed, input }
export type ColAlignDataTable = 'start' | 'center' | 'end';

@Component({
selector: 'lu-skeleton-data-table',
selector: 'lu-skeleton-data-table,pr-skeleton-data-table',
templateUrl: './skeleton-data-table.component.html',
styleUrl: './skeleton-data-table.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { booleanAttribute, ChangeDetectionStrategy, Component, computed, input, numberAttribute } from '@angular/core';

@Component({
selector: 'lu-skeleton-field',
selector: 'lu-skeleton-field,pr-skeleton-field',
templateUrl: './skeleton-field.component.html',
styleUrl: './skeleton-field.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { booleanAttribute, ChangeDetectionStrategy, Component, input } from '@angular/core';

@Component({
selector: 'lu-skeleton-header',
selector: 'lu-skeleton-header,pr-skeleton-header',
templateUrl: './skeleton-header.component.html',
styleUrl: './skeleton-header.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { booleanAttribute, ChangeDetectionStrategy, Component, computed, input }
export type ColAlignIndexTable = 'start' | 'center' | 'end';

@Component({
selector: 'lu-skeleton-index-table',
selector: 'lu-skeleton-index-table,pr-skeleton-index-table',
templateUrl: './skeleton-index-table.component.html',
styleUrl: './skeleton-index-table.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ChangeDetectionStrategy, Component, computed, input, numberAttribute } from '@angular/core';

@Component({
selector: 'lu-skeleton-resource-card',
selector: 'lu-skeleton-resource-card,pr-skeleton-resource-card',
templateUrl: './skeleton-resource-card.component.html',
styleUrl: './skeleton-resource-card.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { booleanAttribute, ChangeDetectionStrategy, Component, computed, input }
export type ColAlignTable = 'start' | 'center' | 'end';

@Component({
selector: 'lu-skeleton-table',
selector: 'lu-skeleton-table,pr-skeleton-table',
templateUrl: './skeleton-table.component.html',
styleUrl: './skeleton-table.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
6 changes: 6 additions & 0 deletions packages/prisme/tag/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"lib": {
"entryFile": "public-api.ts"
}
}
1 change: 1 addition & 0 deletions packages/prisme/tag/public-api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './tag.component';
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
@if (link()) {
<a [routerLink]="link()" class="tag" [class]="tagClasses()" [class.mod-outlined]="!AI() && outlined()" [class.mod-AI]="AI()">
@if (icon()) {
<lu-icon [icon]="icon()" />
<pr-icon [icon]="icon()" />
}
<span class="tag-content">{{ label() }}</span>
</a>
} @else {
<span class="tag" [class]="tagClasses()" [class.mod-outlined]="!AI() && outlined()" [class.mod-AI]="AI()">
@if (icon()) {
<lu-icon [icon]="icon()" />
<pr-icon [icon]="icon()" />
}
@if (withEllipsis()) {
<span class="tag-content pr-u-ellipsis" luTooltip luTooltipWhenEllipsis>{{ label() }}</span>
<span class="tag-content pr-u-ellipsis" prTooltip prTooltipWhenEllipsis>{{ label() }}</span>
} @else {
<span class="tag-content">{{ label() }}</span>
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { booleanAttribute, ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from '@angular/core';
import { RouterLink } from '@angular/router';
import { LuccaIcon } from '@lucca-front/icons';
import { DecorativePalette, Palette } from '@lucca-front/ng/core';
import { IconComponent } from '@lucca-front/ng/icon';
import { LuTooltipModule } from '@lucca-front/ng/tooltip';
import { DecorativePalette, Palette } from '@lucca/prisme/core';
import { IconComponent, LuccaIcon } from '@lucca/prisme/icon';
import { LuTooltipModule } from '@lucca/prisme/tooltip';

@Component({
selector: 'lu-tag',
selector: 'lu-tag,pr-tag',
templateUrl: './tag.component.html',
styleUrl: './tag.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
7 changes: 7 additions & 0 deletions packages/prisme/tooltip/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"lib": {
"entryFile": "public-api.ts",
"styleIncludePaths": ["../styles"]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { SafeHtml } from '@angular/platform-browser';
import { Subject } from 'rxjs';

@Component({
selector: 'lu-tooltip-panel',
selector: 'lu-tooltip-panel,pr-tooltip-panel',
templateUrl: './tooltip-panel.component.html',
styleUrl: './tooltip-panel.component.scss',
host: {
Expand Down
4 changes: 4 additions & 0 deletions packages/prisme/tooltip/public-api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from './animation/index';
export * from './panel/index';
export * from './trigger/index';
export * from './tooltip.module';
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './tooltip-trigger.directive';
export * from './tooltip-trigger.module';
export * from './tooltip-position';
1 change: 1 addition & 0 deletions packages/prisme/tooltip/trigger/tooltip-position.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type TooltipPosition = 'above' | 'below' | 'before' | 'after';
Loading
Loading