From 7ff9be4c6f3537242e16ab83a932e7ea039ac855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20=C3=87etin?= <92744169+mehmetcetin01140@users.noreply.github.com> Date: Fri, 23 Feb 2024 11:43:31 +0300 Subject: [PATCH] iconfield api docs added --- src/app/components/iconfield/iconfield.css | 276 ------------------ .../iconfield/iconfield.interface.ts | 89 ------ src/app/components/iconfield/iconfield.ts | 13 +- src/app/showcase/doc/apidoc/index.json | 22 +- .../pages/iconfield/iconfielddemo.html | 2 +- 5 files changed, 28 insertions(+), 374 deletions(-) delete mode 100755 src/app/components/iconfield/iconfield.css delete mode 100644 src/app/components/iconfield/iconfield.interface.ts diff --git a/src/app/components/iconfield/iconfield.css b/src/app/components/iconfield/iconfield.css deleted file mode 100755 index c996776c864..00000000000 --- a/src/app/components/iconfield/iconfield.css +++ /dev/null @@ -1,276 +0,0 @@ -@layer primeng { - .p-galleria-content { - display: flex; - flex-direction: column; - } - - .p-galleria-item-wrapper { - display: flex; - flex-direction: column; - position: relative; - } - - .p-galleria-item-container { - position: relative; - display: flex; - height: 100%; - } - - .p-galleria-item-nav { - position: absolute; - top: 50%; - margin-top: -0.5rem; - display: inline-flex; - justify-content: center; - align-items: center; - overflow: hidden; - } - - .p-galleria-item-prev { - left: 0; - border-top-left-radius: 0; - border-bottom-left-radius: 0; - } - - .p-galleria-item-next { - right: 0; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - } - - .p-galleria-item { - display: flex; - justify-content: center; - align-items: center; - height: 100%; - width: 100%; - } - - .p-galleria-item-nav-onhover .p-galleria-item-nav { - pointer-events: none; - opacity: 0; - transition: opacity 0.2s ease-in-out; - } - - .p-galleria-item-nav-onhover .p-galleria-item-wrapper:hover .p-galleria-item-nav { - pointer-events: all; - opacity: 1; - } - - .p-galleria-item-nav-onhover .p-galleria-item-wrapper:hover .p-galleria-item-nav.p-disabled { - pointer-events: none; - } - - .p-galleria-caption { - position: absolute; - bottom: 0; - left: 0; - width: 100%; - } - - /* Thumbnails */ - .p-galleria-thumbnail-wrapper { - display: flex; - flex-direction: column; - overflow: auto; - flex-shrink: 0; - } - - .p-galleria-thumbnail-prev, - .p-galleria-thumbnail-next { - align-self: center; - flex: 0 0 auto; - display: flex; - justify-content: center; - align-items: center; - overflow: hidden; - position: relative; - } - - .p-galleria-thumbnail-prev span, - .p-galleria-thumbnail-next span { - display: flex; - justify-content: center; - align-items: center; - } - - .p-galleria-thumbnail-container { - display: flex; - flex-direction: row; - } - - .p-galleria-thumbnail-items-container { - overflow: hidden; - width: 100%; - } - - .p-galleria-thumbnail-items { - display: flex; - } - - .p-galleria-thumbnail-item { - overflow: auto; - display: flex; - align-items: center; - justify-content: center; - cursor: pointer; - opacity: 0.5; - } - - .p-galleria-thumbnail-item:hover { - opacity: 1; - transition: opacity 0.3s; - } - - .p-galleria-thumbnail-item-current { - opacity: 1; - } - - /* Positions */ - /* Thumbnails */ - .p-galleria-thumbnails-left .p-galleria-content, - .p-galleria-thumbnails-right .p-galleria-content { - flex-direction: row; - } - - .p-galleria-thumbnails-left .p-galleria-item-wrapper, - .p-galleria-thumbnails-right .p-galleria-item-wrapper { - flex-direction: row; - } - - .p-galleria-thumbnails-left p-galleriaitem, - .p-galleria-thumbnails-top p-galleriaitem { - order: 2; - } - - .p-galleria-thumbnails-left p-galleriathumbnails, - .p-galleria-thumbnails-top p-galleriathumbnails { - order: 1; - } - - .p-galleria-thumbnails-left .p-galleria-thumbnail-container, - .p-galleria-thumbnails-right .p-galleria-thumbnail-container { - flex-direction: column; - flex-grow: 1; - } - - .p-galleria-thumbnails-left .p-galleria-thumbnail-items, - .p-galleria-thumbnails-right .p-galleria-thumbnail-items { - flex-direction: column; - height: 100%; - } - .p-galleria-thumbnails-left .p-galleria-thumbnail-wrapper, - .p-galleria-thumbnails-right .p-galleria-thumbnail-wrapper { - height: 100%; - } - - /* Indicators */ - .p-galleria-indicators { - display: flex; - align-items: center; - justify-content: center; - } - - .p-galleria-indicator > button { - display: inline-flex; - align-items: center; - } - - .p-galleria-indicators-left .p-galleria-item-wrapper, - .p-galleria-indicators-right .p-galleria-item-wrapper { - flex-direction: row; - align-items: center; - } - - .p-galleria-indicators-left .p-galleria-item-container, - .p-galleria-indicators-top .p-galleria-item-container { - order: 2; - } - - .p-galleria-indicators-left .p-galleria-indicators, - .p-galleria-indicators-top .p-galleria-indicators { - order: 1; - } - - .p-galleria-indicators-left .p-galleria-indicators, - .p-galleria-indicators-right .p-galleria-indicators { - flex-direction: column; - } - - .p-galleria-indicator-onitem .p-galleria-indicators { - position: absolute; - display: flex; - z-index: 1; - } - - .p-galleria-indicator-onitem.p-galleria-indicators-top .p-galleria-indicators { - top: 0; - left: 0; - width: 100%; - align-items: flex-start; - } - - .p-galleria-indicator-onitem.p-galleria-indicators-right .p-galleria-indicators { - right: 0; - top: 0; - height: 100%; - align-items: flex-end; - } - - .p-galleria-indicator-onitem.p-galleria-indicators-bottom .p-galleria-indicators { - bottom: 0; - left: 0; - width: 100%; - align-items: flex-end; - } - - .p-galleria-indicator-onitem.p-galleria-indicators-left .p-galleria-indicators { - left: 0; - top: 0; - height: 100%; - align-items: flex-start; - } - - /* FullScreen */ - .p-galleria-mask { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - display: flex; - align-items: center; - justify-content: center; - background-color: transparent; - transition-property: background-color; - } - - .p-galleria-close { - position: absolute; - top: 0; - right: 0; - display: flex; - justify-content: center; - align-items: center; - overflow: hidden; - } - - .p-galleria-mask .p-galleria-item-nav { - position: fixed; - top: 50%; - margin-top: -0.5rem; - } - - .p-galleria-mask.p-galleria-mask-leave { - background-color: transparent; - } - - /* Keyboard Support */ - .p-items-hidden .p-galleria-thumbnail-item { - visibility: hidden; - } - - .p-items-hidden .p-galleria-thumbnail-item.p-galleria-thumbnail-item-active { - visibility: visible; - } -} diff --git a/src/app/components/iconfield/iconfield.interface.ts b/src/app/components/iconfield/iconfield.interface.ts deleted file mode 100644 index 328a421abdd..00000000000 --- a/src/app/components/iconfield/iconfield.interface.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { TemplateRef } from '@angular/core'; -/** - * Responsive options of the component. - * @group Interface - */ -export interface GalleriaResponsiveOptions { - /** - * Breakpoint for responsive mode. Exp; @media screen and (max-width: ${breakpoint}) {...} - */ - breakpoint: string; - /** - * The number of visible items on breakpoint. - */ - numVisible: number; -} -/** - * Defines valid templates in Galleria. - * @group Templates - */ -export interface GalleriaTemplates { - /** - * Custom template of header. - */ - header(): TemplateRef; - /** - * Custom template of footer. - */ - footer(): TemplateRef; - /** - * Custom template of indicator. - * @param {Object} context - indicator data. - */ - indicator(context: { - /** - * Index of the item. - */ - $implicit: any; - }): TemplateRef<{ $implicit: any }>; - /** - * Custom template of closeicon. - */ - closeicon(): TemplateRef; - /** - * Custom template of itemnexticon. - */ - itemnexticon(): TemplateRef; - /** - * Custom template of itempreviousicon. - */ - itempreviousicon(): TemplateRef; - /** - * Custom template of previousthumbnailicon. - */ - previousthumbnailicon(): TemplateRef; - /** - * Custom template of nextthumbnailicon. - */ - nextthumbnailicon(): TemplateRef; - /** - * Custom template of caption. - * @param {Object} context - item data. - */ - caption(context: { - /** - * Item instance. - */ - $implicit: any; - }): TemplateRef<{ $implicit: any }>; - /** - * Custom template of thumbnail. - * @param {Object} context - item data. - */ - thumbnail(context: { - /** - * Item instance. - */ - $implicit: any; - }): TemplateRef<{ $implicit: any }>; - /** - * Custom template of item. - * @param {Object} context - item data. - */ - item(context: { - /** - * Item instance. - */ - $implicit: any; - }): TemplateRef<{ $implicit: any }>; -} diff --git a/src/app/components/iconfield/iconfield.ts b/src/app/components/iconfield/iconfield.ts index 06ee8c77f47..31b1993f45a 100755 --- a/src/app/components/iconfield/iconfield.ts +++ b/src/app/components/iconfield/iconfield.ts @@ -1,13 +1,8 @@ import { CommonModule } from '@angular/common'; -import { - Component, - Input, - NgModule, -} from '@angular/core'; +import { Component, Input, NgModule } from '@angular/core'; import { SharedModule } from 'primeng/api'; - /** * IconField wraps an input and an icon. * @group Components @@ -21,7 +16,11 @@ import { SharedModule } from 'primeng/api'; } }) export class IconField { - @Input() iconPosition: string | undefined; + /** + * Position of the icon. + * @group Props + */ + @Input() iconPosition: 'right' | 'left' = 'right'; } @NgModule({ diff --git a/src/app/showcase/doc/apidoc/index.json b/src/app/showcase/doc/apidoc/index.json index 55e096e9ea3..14344010e3f 100644 --- a/src/app/showcase/doc/apidoc/index.json +++ b/src/app/showcase/doc/apidoc/index.json @@ -10899,6 +10899,26 @@ } } }, + "iconfield": { + "components": { + "IconField": { + "description": "IconField wraps an input and an icon.", + "props": { + "description": "Defines the input properties of the component.", + "values": [ + { + "name": "iconPosition", + "optional": false, + "readonly": false, + "type": "\"left\" | \"right\"", + "description": "Position of the icon", + "default" :"right" + } + ] + } + } + } + }, "fieldset": { "components": { "Fieldset": { @@ -27736,4 +27756,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/app/showcase/pages/iconfield/iconfielddemo.html b/src/app/showcase/pages/iconfield/iconfielddemo.html index 79d9b3aa903..d748a139bed 100755 --- a/src/app/showcase/pages/iconfield/iconfielddemo.html +++ b/src/app/showcase/pages/iconfield/iconfielddemo.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file